diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml index 4f24ad4f..5e8b104e 100644 --- a/.github/workflows/build-image.yml +++ b/.github/workflows/build-image.yml @@ -16,13 +16,11 @@ jobs: IMAGETAG: ${{ github.ref_name }} steps: - uses: actions/checkout@v2 - - id: update-podman + - id: install-podman run: | - # Update podman - echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/unstable/xUbuntu_22.04/ /' | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list - curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_22.04/Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/devel_kubic_libcontainers_unstable.gpg > /dev/null + # Install podman sudo apt update - sudo apt install podman -y + sudo apt-get -y install --install-recommends podman - id: build run: | # Build the module image @@ -35,7 +33,7 @@ jobs: echo "REPOBASE=$REPOBASE" >> $GITHUB_ENV echo "IMAGETAG=$IMAGETAG" >> $GITHUB_ENV echo "IMAGENAME=$IMAGENAME" >> $GITHUB_ENV - podman build --env ICONS_TOKEN="${{ secrets.ICONS_TOKEN }}" -t ${IMAGENAME}:${IMAGETAG} . + podman build -t ${IMAGENAME}:${IMAGETAG} . - id: publish run: | # Publish the branch diff --git a/Dockerfile b/Dockerfile index 9b44a4e9..1fa71724 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,9 +6,6 @@ WORKDIR /app # Install dependencies based on the preferred package manager COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ -RUN sed -i "s#github:nethesis#git+https://${ICONS_TOKEN}:x-oauth-basic@github.com/nethesis#g" package.json -RUN sed -i "s#github:nethesis#git+https://${ICONS_TOKEN}:x-oauth-basic@github.com/nethesis#g" package-lock.json -RUN sed -i "s#git+ssh://git@github.com/nethesis/nethesis-icons#git+https://${ICONS_TOKEN}:x-oauth-basic@github.com/nethesis/nethesis-icons#g" package-lock.json RUN \ if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ diff --git a/components/common/CopyComponent.tsx b/components/common/CopyComponent.tsx new file mode 100644 index 00000000..2f789ca1 --- /dev/null +++ b/components/common/CopyComponent.tsx @@ -0,0 +1,58 @@ +import React, { useState } from 'react' +import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' +import { faClone } from '@fortawesome/free-solid-svg-icons' +import { motion, AnimatePresence } from 'framer-motion' +import { Tooltip } from 'react-tooltip' +import { Button } from './Button' +import { t } from 'i18next' + +interface CopyToClipboardProps { + number: string + id: string +} + +const CopyToClipboard: React.FC = ({ number, id }) => { + const [showMessage, setShowMessage] = useState(false) + + const handleCopy = (event: React.MouseEvent) => { + event.preventDefault() + event.stopPropagation() + + navigator.clipboard.writeText(number).then(() => { + setShowMessage(true) + setTimeout(() => setShowMessage(false), 2000) + }) + } + + return ( + <> +
+ +
+ + {showMessage && ( + + {t('Common.Copied in clipboard')} + + )} + + + + ) +} + +export default CopyToClipboard diff --git a/components/devices/DownloadDesktopLinkContent.tsx b/components/devices/DownloadDesktopLinkContent.tsx index dcb0c92c..38b1f7bf 100644 --- a/components/devices/DownloadDesktopLinkContent.tsx +++ b/components/devices/DownloadDesktopLinkContent.tsx @@ -77,8 +77,9 @@ export const DownloadDesktopLinkContent = forwardRef<
+ {/* Hidden at the moment, but it will be back when it will be the support for Linux */} {/* Linux */} -
)}
-
+ */} {/* Apple */}
{} @@ -208,6 +216,31 @@ export const GlobalSearch: FC = () => { // global keyborad shortcut useHotkeys('ctrl+shift+f', () => focusGlobalSearch(), []) + const removeFocus = () => { + store.dispatch.globalSearch.setFocused(false) + store.dispatch.globalSearch.setOpen(false) + store.dispatch.globalSearch.setRightSideTitleClicked(false) + } + + // remove focus on globals search + useHotkeys('esc', () => removeFocus(), []) + + const inputRef = useRef(null) + + useEffect(() => { + const handleVisibilityChange = () => { + if (document.visibilityState === 'visible') { + inputRef.current?.focus() + } + } + + document.addEventListener('visibilitychange', handleVisibilityChange) + + return () => { + document.removeEventListener('visibilitychange', handleVisibilityChange) + } + }, []) + return ( <> {globalSearchStore?.isFocused && !globalSearchStore?.isCustomerCardsRedirect && ( @@ -231,7 +264,7 @@ export const GlobalSearch: FC = () => { )} > - {({ open, activeOption }: any) => ( + {({ activeOption }: any) => ( <>
= () => { as='div' key={index} value={index} - className={({ active }) => - classNames( - 'flex cursor-default select-none items-center rounded-md p-2 h-14', - ) - } + className={classNames( + 'flex cursor-default select-none items-center rounded-md p-2 h-14', + )} >
@@ -307,12 +338,10 @@ export const GlobalSearch: FC = () => { {isLoaded && !results.length && query.length > 2 && ( - classNames( - 'flex justify-center cursor-default select-none items-center rounded-md p-2', - ) - } + value={''} + className={classNames( + 'flex justify-center cursor-default select-none items-center rounded-md p-2', + )} > = () => { {isLoaded && !!results?.length && results.map((result: any, index: number) => ( - - classNames( - 'flex select-none items-center rounded-md p-2 h-14 cursor-pointer', - active && - 'bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100', - ) - } - > - {({ active }) => ( - <> - {/* call phone number */} + + {({ active }: any) => ( +
+ {/* Call phone number */} {result?.resultType === 'callPhoneNumber' && ( <>
@@ -359,7 +383,8 @@ export const GlobalSearch: FC = () => { )} - {/* add to phonebook */} + + {/* Add to phonebook */} {result?.resultType === 'addToPhonebook' && ( <>
@@ -373,7 +398,8 @@ export const GlobalSearch: FC = () => { )} - {/* operator */} + + {/* Operator */} {result?.resultType === 'operator' && ( <> = () => { {result?.name} )} - {/* phonebook contact */} - {result.resultType === 'contact' && ( + + {/* Phonebook contact */} + {result?.resultType === 'contact' && ( <> - {result?.displayName !== '' && result?.displayName !== ' ' - ? result?.displayName - : result?.name !== '' && result?.name !== ' ' - ? result?.name - : result?.company && - result?.company !== '' && - result?.company !== ' ' - ? result?.company - : '-'} + {result?.displayName?.trim() || + result?.name?.trim() || + result?.company?.trim() || + '-'} )} + + {/* Icon when active */} {active && ( = () => { aria-hidden='true' /> )} - +
)} ))} @@ -437,6 +461,7 @@ export const GlobalSearch: FC = () => { contact={activeOption} isShownContactMenu={false} isShownSideDrawerLink={true} + isGlobalSearch={true} /> )}
diff --git a/components/layout/Layout.tsx b/components/layout/Layout.tsx index 7c0179ce..4677d090 100644 --- a/components/layout/Layout.tsx +++ b/components/layout/Layout.tsx @@ -44,6 +44,7 @@ import { Tooltip } from 'react-tooltip' import { getJSONItem, setJSONItem } from '../../lib/storage' import { eventDispatch } from '../../lib/hooks/eventDispatch' import { setMainDevice } from '../../lib/devices' +import { useHotkeys } from 'react-hotkeys-hook' export const Layout: FC = ({ children }) => { const [openMobileMenu, setOpenMobileMenu] = useState(false) @@ -995,6 +996,12 @@ export const Layout: FC = ({ children }) => { } }, [phoneIslandThemePreference, theme]) + const closePhoneIslandCall = () => { + eventDispatch('phone-island-call-end', {}) + } + // global keyborad shortcut + useHotkeys('ctrl+alt+c', () => closePhoneIslandCall(), []) + return ( <>
diff --git a/components/operators/ButtonDropdown.tsx b/components/operators/ButtonDropdown.tsx index 63eea388..9dbeb211 100644 --- a/components/operators/ButtonDropdown.tsx +++ b/components/operators/ButtonDropdown.tsx @@ -1,8 +1,7 @@ // Copyright (C) 2024 Nethesis S.r.l. // SPDX-License-Identifier: AGPL-3.0-or-later -import React from 'react' -import { Fragment } from 'react' +import React, { Fragment } from 'react' import { Menu, MenuButton, MenuItem, MenuItems, Transition } from '@headlessui/react' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { @@ -11,7 +10,6 @@ import { faPhone, faRightLeft, } from '@fortawesome/free-solid-svg-icons' -import classNames from 'classnames' import { t } from 'i18next' import { callPhoneNumber, transferCall } from '../../lib/utils' import { callOperator } from '../../lib/operators' @@ -32,120 +30,116 @@ export const ButtonDropdown: React.FC = ({ const auth = useSelector((state: RootState) => state.authentication) const operatorsStore = useSelector((state: RootState) => state.operators) + const isDeviceInConversation = operator?.conversations?.some((conversation: any) => { + const devicesToCheck = [operatorDevices?.mainExtension, operatorDevices?.cellphone].filter( + Boolean, + ) + + return devicesToCheck.some((device) => + [conversation.chDest?.callerNum, conversation.chSource?.callerNum].includes(device), + ) + }) + + const isDisabled = + !operatorDevices?.mainExtension || + operator?.username === auth?.username || + isDeviceInConversation || + ['busy', 'onhold'].includes( + operator?.status || + operatorsStore?.operators[operator?.username]?.mainPresence === 'busy' || + operatorsStore?.operators[operator?.username]?.status === 'busy' || + operatorsStore?.operators[operator?.username]?.status === 'onhold' || + operatorsStore?.operators[operator?.username]?.username === auth?.username || + '', + ) + return (
- {isTransfer ? ( - - ) : ( - - )} + - {/* Vertical divider */} -
@@ -109,18 +114,31 @@ export const OperatorSummary = forwardRef {isShownFavorite && ( - } - offIcon={} - changed={() => toggleFavorite()} - className={'mr-5'} - > - {t('OperatorDrawer.Toggle favorite operator')} - + <> + } + offIcon={} + changed={() => toggleFavorite()} + className={'mr-5'} + data-tooltip-id={'tooltip-toggle-favorite'} + data-tooltip-content={ + isFavorite + ? t('OperatorDrawer.Set favorite operator') || '' + : t('OperatorDrawer.Remove favorite operator') || '' + } + > + + {t('OperatorDrawer.Toggle favorite operator')} + + + {/* Tooltip for favorite operators toggle */} + + )}
+ {operator?.endpoints?.mainextension[0]?.id} diff --git a/components/phonebook/ContactSummary.tsx b/components/phonebook/ContactSummary.tsx index ff40b4c5..a11912a0 100644 --- a/components/phonebook/ContactSummary.tsx +++ b/components/phonebook/ContactSummary.tsx @@ -17,7 +17,6 @@ import { RootState, store } from '../../store' import { callPhoneNumber, closeSideDrawer, transferCallToExtension } from '../../lib/utils' import { startOfDay, subDays } from 'date-fns' import { - faArrowUpRightFromSquare, faEllipsisVertical, faPen, faPhone, @@ -28,6 +27,7 @@ import { faFileLines, faTrash, faUser, + faClone, } from '@fortawesome/free-solid-svg-icons' import {} from '@fortawesome/free-regular-svg-icons' import { @@ -37,21 +37,31 @@ import { openEditContactDrawer, openShowContactDrawer, reloadPhonebook, - retrieveContact, } from '../../lib/phonebook' import { useTranslation } from 'react-i18next' import { useRouter } from 'next/router' -import { isEmpty } from 'lodash' import { LastCallsDrawerTable } from '../history/LastCallsDrawerTable' +import CopyComponent from '../common/CopyComponent' export interface ContactSummaryProps extends ComponentPropsWithRef<'div'> { contact: any isShownContactMenu: boolean isShownSideDrawerLink: boolean + isGlobalSearch?: boolean } export const ContactSummary = forwardRef( - ({ contact, isShownContactMenu, isShownSideDrawerLink = false, className, ...props }, ref) => { + ( + { + contact, + isShownContactMenu, + isShownSideDrawerLink = false, + isGlobalSearch, + className, + ...props + }, + ref, + ) => { const { t } = useTranslation() const auth = useSelector((state: RootState) => state.authentication) const [showDeleteModal, setShowDeleteModal] = useState(false) @@ -59,6 +69,8 @@ export const ContactSummary = forwardRef const cancelDeleteButtonRef = useRef() as MutableRefObject const { profile } = useSelector((state: RootState) => state.user) + const [copied, setCopied] = useState(false) + const operatorsStore = useSelector((state: RootState) => state.operators) //Get sideDrawer status from store @@ -147,12 +159,7 @@ export const ContactSummary = forwardRef // Get all company information useEffect(() => { async function searchCompanyInformation() { - if ( - isEmpty(companyInformation) && - contact && - contact?.kind === 'person' && - contact?.company - ) { + if (contact && contact?.kind === 'person' && contact?.company) { try { //Remove space and slash characters let noSlashCharactersCompanyInformation = contact?.company?.replace(/\//g, '') @@ -323,7 +330,7 @@ export const ContactSummary = forwardRef {/* extension */} {contact.extension && (
-
+
{t('Phonebook.Extension')}
@@ -343,6 +350,8 @@ export const ContactSummary = forwardRef > {contact?.extension} + {/* copy component */} +
@@ -350,7 +359,7 @@ export const ContactSummary = forwardRef {/* work phone */} {contact.workphone && (
-
+
{t('Phonebook.Work phone')}
@@ -368,8 +377,10 @@ export const ContactSummary = forwardRef : callPhoneNumber(contact?.workphone) } > - {contact.workphone} + {contact?.workphone} + {/* copy component */} +
@@ -377,7 +388,7 @@ export const ContactSummary = forwardRef {/* mobile phone */} {contact.cellphone && (
-
+
{t('Phonebook.Mobile phone')}
@@ -397,6 +408,8 @@ export const ContactSummary = forwardRef > {contact?.cellphone} + {/* copy component */} +
@@ -404,7 +417,7 @@ export const ContactSummary = forwardRef {/* home phone */} {contact.homephone && (
-
+
{t('Phonebook.Home phone')}
@@ -424,6 +437,8 @@ export const ContactSummary = forwardRef > {contact?.homephone} + {/* copy component */} +
diff --git a/components/settings/Integrations.tsx b/components/settings/Integrations.tsx index 834babce..fc2239d0 100644 --- a/components/settings/Integrations.tsx +++ b/components/settings/Integrations.tsx @@ -4,9 +4,9 @@ import { RefObject, createRef, useState, useEffect } from 'react' import { faCheck, - faClipboard, faTriangleExclamation, faCircleNotch, + faCopy, } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' import { Button, InlineNotification, Modal } from '../common' @@ -21,6 +21,7 @@ import { } from '../../services/authentication' import { useTranslation } from 'react-i18next' import { getProductName } from '../../lib/utils' +import CopyComponent from '../common/CopyComponent' export const Integrations = () => { const [copied, setCopied] = useState(false) @@ -123,19 +124,7 @@ export const Integrations = () => {
{config}
- setCopied(true)}> - - +
)} diff --git a/lib/operators.ts b/lib/operators.ts index b7657b98..03061de7 100644 --- a/lib/operators.ts +++ b/lib/operators.ts @@ -125,6 +125,9 @@ export const callOperator = (operator: any, event: any = undefined) => { const phoneNumber = operator.endpoints.mainextension[0].id callPhoneNumber(phoneNumber) + store.dispatch.globalSearch.setFocused(false) + store.dispatch.globalSearch.setOpen(false) + store.dispatch.globalSearch.setRightSideTitleClicked(true) // stop propagation of click event if (event) { event.stopPropagation() diff --git a/lib/utils.ts b/lib/utils.ts index bab3e804..90f9f5df 100644 --- a/lib/utils.ts +++ b/lib/utils.ts @@ -120,6 +120,12 @@ export const sortByFavorite = (a: any, b: any) => { export function callPhoneNumber(phoneNumber: string) { eventDispatch('phone-island-call-start', { number: phoneNumber }) + setTimeout(() => { + store.dispatch.globalSearch.setFocused(false) + store.dispatch.globalSearch.setOpen(false) + store.dispatch.globalSearch.setRightSideTitleClicked(true) + }, 350) + console.log('callPhoneNumber', phoneNumber) //// } diff --git a/package-lock.json b/package-lock.json index 176bfdfe..76577a67 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@nethesis/nethesis-brands-svg-icons": "github:nethesis/Font-Awesome#ns-brands", "@nethesis/nethesis-light-svg-icons": "github:nethesis/Font-Awesome#ns-light", "@nethesis/nethesis-solid-svg-icons": "github:nethesis/Font-Awesome#ns-solid", - "@nethesis/phone-island": "^0.8.19", + "@nethesis/phone-island": "^0.8.20", "@rematch/core": "^2.2.0", "@rematch/immer": "^2.1.3", "@types/crypto-js": "^4.1.1", @@ -32,6 +32,7 @@ "date-fns": "^2.30.0", "date-fns-tz": "^1.3.8", "font-awesome": "^4.7.0", + "framer-motion": "^11.11.9", "gravatar": "^1.8.2", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", @@ -4103,59 +4104,59 @@ "integrity": "sha512-Vo+PSpZG2/fmgmiNzYK9qWRh8h/CHrwD0mo1h1DzL4yzHNSfWYujGTYsWGreD000gcgmZ7K4Ys6Tx9TxtsKdDw==" }, "node_modules/@motionone/animation": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.17.0.tgz", - "integrity": "sha512-ANfIN9+iq1kGgsZxs+Nz96uiNcPLGTXwfNo2Xz/fcJXniPYpaz/Uyrfa+7I5BPLxCP82sh7quVDudf1GABqHbg==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/animation/-/animation-10.18.0.tgz", + "integrity": "sha512-9z2p5GFGCm0gBsZbi8rVMOAJCtw1WqBTIPw3ozk06gDvZInBPIsQcHgYogEJ4yuHJ+akuW8g1SEIOpTOvYs8hw==", "dependencies": { - "@motionone/easing": "^10.17.0", - "@motionone/types": "^10.17.0", - "@motionone/utils": "^10.17.0", + "@motionone/easing": "^10.18.0", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", "tslib": "^2.3.1" } }, "node_modules/@motionone/dom": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.17.0.tgz", - "integrity": "sha512-cMm33swRlCX/qOPHWGbIlCl0K9Uwi6X5RiL8Ma6OrlJ/TP7Q+Np5GE4xcZkFptysFjMTi4zcZzpnNQGQ5D6M0Q==", - "dependencies": { - "@motionone/animation": "^10.17.0", - "@motionone/generators": "^10.17.0", - "@motionone/types": "^10.17.0", - "@motionone/utils": "^10.17.0", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/dom/-/dom-10.18.0.tgz", + "integrity": "sha512-bKLP7E0eyO4B2UaHBBN55tnppwRnaE3KFfh3Ps9HhnAkar3Cb69kUCJY9as8LrccVYKgHA+JY5dOQqJLOPhF5A==", + "dependencies": { + "@motionone/animation": "^10.18.0", + "@motionone/generators": "^10.18.0", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", "hey-listen": "^1.0.8", "tslib": "^2.3.1" } }, "node_modules/@motionone/easing": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.17.0.tgz", - "integrity": "sha512-Bxe2wSuLu/qxqW4rBFS5m9tMLOw+QBh8v5A7Z5k4Ul4sTj5jAOfZG5R0bn5ywmk+Fs92Ij1feZ5pmC4TeXA8Tg==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/easing/-/easing-10.18.0.tgz", + "integrity": "sha512-VcjByo7XpdLS4o9T8t99JtgxkdMcNWD3yHU/n6CLEz3bkmKDRZyYQ/wmSf6daum8ZXqfUAgFeCZSpJZIMxaCzg==", "dependencies": { - "@motionone/utils": "^10.17.0", + "@motionone/utils": "^10.18.0", "tslib": "^2.3.1" } }, "node_modules/@motionone/generators": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.17.0.tgz", - "integrity": "sha512-T6Uo5bDHrZWhIfxG/2Aut7qyWQyJIWehk6OB4qNvr/jwA/SRmixwbd7SOrxZi1z5rH3LIeFFBKK1xHnSbGPZSQ==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/generators/-/generators-10.18.0.tgz", + "integrity": "sha512-+qfkC2DtkDj4tHPu+AFKVfR/C30O1vYdvsGYaR13W/1cczPrrcjdvYCj0VLFuRMN+lP1xvpNZHCRNM4fBzn1jg==", "dependencies": { - "@motionone/types": "^10.17.0", - "@motionone/utils": "^10.17.0", + "@motionone/types": "^10.17.1", + "@motionone/utils": "^10.18.0", "tslib": "^2.3.1" } }, "node_modules/@motionone/types": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.0.tgz", - "integrity": "sha512-EgeeqOZVdRUTEHq95Z3t8Rsirc7chN5xFAPMYFobx8TPubkEfRSm5xihmMUkbaR2ErKJTUw3347QDPTHIW12IA==" + "version": "10.17.1", + "resolved": "https://registry.npmjs.org/@motionone/types/-/types-10.17.1.tgz", + "integrity": "sha512-KaC4kgiODDz8hswCrS0btrVrzyU2CSQKO7Ps90ibBVSQmjkrt2teqta6/sOG59v7+dPnKMAg13jyqtMKV2yJ7A==" }, "node_modules/@motionone/utils": { - "version": "10.17.0", - "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.17.0.tgz", - "integrity": "sha512-bGwrki4896apMWIj9yp5rAS2m0xyhxblg6gTB/leWDPt+pb410W8lYWsxyurX+DH+gO1zsQsfx2su/c1/LtTpg==", + "version": "10.18.0", + "resolved": "https://registry.npmjs.org/@motionone/utils/-/utils-10.18.0.tgz", + "integrity": "sha512-3XVF7sgyTSI2KWvTf6uLlBJ5iAgRgmvp3bpuOiQJvInd4nZ19ET8lX5unn30SlmRH7hXbBbH+Gxd0m0klJ3Xtw==", "dependencies": { - "@motionone/types": "^10.17.0", + "@motionone/types": "^10.17.1", "hey-listen": "^1.0.8", "tslib": "^2.3.1" } @@ -4224,9 +4225,9 @@ } }, "node_modules/@nethesis/phone-island": { - "version": "0.8.19", - "resolved": "https://registry.npmjs.org/@nethesis/phone-island/-/phone-island-0.8.19.tgz", - "integrity": "sha512-7EOzDPoeg02mi1suRdzG/MRCvyfsBBXLgfnzsWm5WsXKsCC7SGqTVV0LNVTqfJLYbQLFLqfE8uh2hkXSOwN8Hw==", + "version": "0.8.20", + "resolved": "https://registry.npmjs.org/@nethesis/phone-island/-/phone-island-0.8.20.tgz", + "integrity": "sha512-Wmtr00xkvFslKT2MSOiOlL/ll7173QnPjNwxaJIJnIEuxaCgedafq/vH5c8qckIm+dkZh8rz/C9lgEo8h6kT3Q==", "dependencies": { "@fortawesome/free-solid-svg-icons": "^6.2.1", "@fortawesome/react-fontawesome": "^0.2.0", @@ -4238,7 +4239,7 @@ "@swc/helpers": "^0.4.12", "@testing-library/jest-dom": "^5.11.4", "@testing-library/user-event": "^12.1.10", - "framer-motion": "^7.6.19", + "framer-motion": "^8.5.5", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", "i18next-http-backend": "^2.1.1", @@ -4250,11 +4251,11 @@ "react-i18next": "^12.1.5", "react-moment": "^1.1.2", "react-redux": "^8.0.5", - "react-scripts": "5.0.1", - "react-tooltip": "^5.27.1", + "react-scripts": "^5.0.1", + "react-tooltip": "^5.28.0", "socket.io-client": "^4.5.3", "styled-components": "^5.3.6", - "webrtc-adapter": "^8.2.0" + "webrtc-adapter": "^9.0.1" } }, "node_modules/@nethesis/phone-island/node_modules/@headlessui/react": { @@ -4273,6 +4274,23 @@ "react-dom": "^16 || ^17 || ^18" } }, + "node_modules/@nethesis/phone-island/node_modules/framer-motion": { + "version": "8.5.5", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-8.5.5.tgz", + "integrity": "sha512-5IDx5bxkjWHWUF3CVJoSyUVOtrbAxtzYBBowRE2uYI/6VYhkEBD+rbTHEGuUmbGHRj6YqqSfoG7Aa1cLyWCrBA==", + "dependencies": { + "@motionone/dom": "^10.15.3", + "hey-listen": "^1.0.8", + "tslib": "^2.4.0" + }, + "optionalDependencies": { + "@emotion/is-prop-valid": "^0.8.2" + }, + "peerDependencies": { + "react": "^18.0.0", + "react-dom": "^18.0.0" + } + }, "node_modules/@next/env": { "version": "14.2.14", "resolved": "https://registry.npmjs.org/@next/env/-/env-14.2.14.tgz", @@ -10448,27 +10466,29 @@ } }, "node_modules/framer-motion": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-7.10.3.tgz", - "integrity": "sha512-k2ccYeZNSpPg//HTaqrU+4pRq9f9ZpaaN7rr0+Rx5zA4wZLbk547wtDzge2db1sB+1mnJ6r59P4xb+aEIi/W+w==", + "version": "11.11.9", + "resolved": "https://registry.npmjs.org/framer-motion/-/framer-motion-11.11.9.tgz", + "integrity": "sha512-XpdZseuCrZehdHGuW22zZt3SF5g6AHJHJi7JwQIigOznW4Jg1n0oGPMJQheMaKLC+0rp5gxUKMRYI6ytd3q4RQ==", "dependencies": { - "@motionone/dom": "^10.15.3", - "hey-listen": "^1.0.8", - "tslib": "2.4.0" - }, - "optionalDependencies": { - "@emotion/is-prop-valid": "^0.8.2" + "tslib": "^2.4.0" }, "peerDependencies": { + "@emotion/is-prop-valid": "*", "react": "^18.0.0", "react-dom": "^18.0.0" + }, + "peerDependenciesMeta": { + "@emotion/is-prop-valid": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + } } }, - "node_modules/framer-motion/node_modules/tslib": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.4.0.tgz", - "integrity": "sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==" - }, "node_modules/fresh": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", @@ -22179,9 +22199,9 @@ } }, "node_modules/webrtc-adapter": { - "version": "8.2.3", - "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-8.2.3.tgz", - "integrity": "sha512-gnmRz++suzmvxtp3ehQts6s2JtAGPuDPjA1F3a9ckNpG1kYdYuHWYpazoAnL9FS5/B21tKlhkorbdCXat0+4xQ==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/webrtc-adapter/-/webrtc-adapter-9.0.1.tgz", + "integrity": "sha512-1AQO+d4ElfVSXyzNVTOewgGT/tAomwwztX/6e3totvyyzXPvXIIuUUjAmyZGbKBKbZOXauuJooZm3g6IuFuiNQ==", "dependencies": { "sdp": "^3.2.0" }, diff --git a/package.json b/package.json index 9f680392..17e853aa 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ "@nethesis/nethesis-brands-svg-icons": "github:nethesis/Font-Awesome#ns-brands", "@nethesis/nethesis-light-svg-icons": "github:nethesis/Font-Awesome#ns-light", "@nethesis/nethesis-solid-svg-icons": "github:nethesis/Font-Awesome#ns-solid", - "@nethesis/phone-island": "^0.8.19", + "@nethesis/phone-island": "^0.8.20", "@rematch/core": "^2.2.0", "@rematch/immer": "^2.1.3", "@types/crypto-js": "^4.1.1", @@ -34,6 +34,7 @@ "date-fns": "^2.30.0", "date-fns-tz": "^1.3.8", "font-awesome": "^4.7.0", + "framer-motion": "^11.11.9", "gravatar": "^1.8.2", "i18next": "^22.4.9", "i18next-browser-languagedetector": "^7.0.1", diff --git a/pages/phonebook.tsx b/pages/phonebook.tsx index 94fe69b9..4d34ec8c 100644 --- a/pages/phonebook.tsx +++ b/pages/phonebook.tsx @@ -297,7 +297,7 @@ const Phonebook: NextPage = () => { aria-hidden='true' /> - {contact.company} + {contact?.company} )} @@ -345,7 +345,7 @@ const Phonebook: NextPage = () => { : '' } > - {contact.workphone} + {contact?.workphone} ) : ( @@ -363,7 +363,7 @@ const Phonebook: NextPage = () => { } py-4 px-4 relative`} >
- {contact.cellphone ? ( + {contact?.cellphone ? (