Commit 93198895 authored by Muhammadali's avatar Muhammadali

update

parent 455ae8ef
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "4.8.51", "version": "4.8.78",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "boxdialer", "name": "boxdialer",
"version": "4.8.51", "version": "4.8.78",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1", "react-hot-toast": "^2.4.1",
"styled-components": "^5.3.5", "styled-components": "^5.3.5",
"uuid": "^9.0.1",
"zustand": "^4.4.6" "zustand": "^4.4.6"
}, },
"devDependencies": { "devDependencies": {
...@@ -9693,6 +9694,15 @@ ...@@ -9693,6 +9694,15 @@
"websocket-driver": "^0.7.4" "websocket-driver": "^0.7.4"
} }
}, },
"node_modules/sockjs/node_modules/uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==",
"dev": true,
"bin": {
"uuid": "dist/bin/uuid"
}
},
"node_modules/source-map": { "node_modules/source-map": {
"version": "0.6.1", "version": "0.6.1",
"resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
...@@ -10164,10 +10174,13 @@ ...@@ -10164,10 +10174,13 @@
} }
}, },
"node_modules/uuid": { "node_modules/uuid": {
"version": "8.3.2", "version": "9.0.1",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==",
"dev": true, "funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"bin": { "bin": {
"uuid": "dist/bin/uuid" "uuid": "dist/bin/uuid"
} }
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"react-hot-toast": "^2.4.1", "react-hot-toast": "^2.4.1",
"styled-components": "^5.3.5", "styled-components": "^5.3.5",
"uuid": "^9.0.1",
"zustand": "^4.4.6" "zustand": "^4.4.6"
}, },
"devDependencies": { "devDependencies": {
......
import React from 'react' import React from 'react'
import TableBlock from "./style" import TableBlock from "./style"
import { v4 as uuidv4 } from 'uuid';
// id, title, inputTag, type: 'row' || 'column' // id, title, inputTag, type: 'row' || 'column'
const MiniTable = ({ const MiniTable = ({
data, data,
gap = '5px' gap = '5px'
}) => { }) => {
console.log('miniTable_data', data)
return (<TableBlock gap={gap}> return (<TableBlock gap={gap}>
{data?.map(({id, title, inputTag, type, child, gap}) => ( {data?.map(({ id, title, inputTag, type, child, gap }) => (
<TableBlock.Row id={id} gap={gap}> <TableBlock.Row id={`${id}`} gap={gap} key={id}>
<TableBlock.RowInset blockType={type}> <TableBlock.RowInset blockType={type}>
<p className={'title'}>{title}</p> <p className={'title'}>{title}</p>
<div className={'inputArea'}>{inputTag}</div> <div className={'inputArea'}>{inputTag}</div>
......
import React, {useEffect, useState} from 'react' import React, { useEffect, useState } from 'react'
import SettingMainStyle from './style' import SettingMainStyle from './style'
import CheckBoxOutlineBlankIcon from '@mui/icons-material/CheckBoxOutlineBlank';
import FormatPaintIcon from '@mui/icons-material/FormatPaint'; import FormatPaintIcon from '@mui/icons-material/FormatPaint';
import BuildIcon from '@mui/icons-material/Build'; import BuildIcon from '@mui/icons-material/Build';
import FixComponent from "../settingComponents/fixComponent" import FixComponent from "../settingComponents/fixComponent"
import StyleComponent from "../settingComponents/styleComponent" import StyleComponent from "../settingComponents/styleComponent"
import {useColorConfig} from "../../storage/globalColorConfig" import { useColorConfig } from "../../storage/globalColorConfig"
import { v4 as uuidv4 } from 'uuid';
const SettingComponent = ({ const SettingComponent = ({
settingHidden, variant, position settingHidden, variant, position
}) => { }) => {
const [settingPage, setSettingPage] = useState(0) const [settingPage, setSettingPage] = useState(0)
const elem = document.getElementById('data'); const elem = document.getElementById('data');
const useColorConfigStore = useColorConfig((store) => store) const useColorConfigStore = useColorConfig((store) => store)
const allData = [ const allData = [
{ {
id: 2, id: uuidv4(),
title: 'Test-1', title: 'Test-1',
icon: <FormatPaintIcon className={'leftIcons'} />, icon: <FormatPaintIcon className={'leftIcons'} />,
content: <SettingMainStyle.RightSelectInfoOneBlock><StyleComponent /></SettingMainStyle.RightSelectInfoOneBlock> content: (key) => <SettingMainStyle.RightSelectInfoOneBlock key={key}><StyleComponent /></SettingMainStyle.RightSelectInfoOneBlock>
}, },
{ {
id: 1, id: uuidv4(),
title: 'Test-2', title: 'Test-2',
icon: <BuildIcon className={'leftIcons'} />, icon: <BuildIcon className={'leftIcons'} />,
content: <SettingMainStyle.RightSelectInfoOneBlock><FixComponent /></SettingMainStyle.RightSelectInfoOneBlock> content: (key) => <SettingMainStyle.RightSelectInfoOneBlock key={key}><FixComponent /></SettingMainStyle.RightSelectInfoOneBlock>
} }
] ]
...@@ -34,8 +37,8 @@ const SettingComponent = ({ ...@@ -34,8 +37,8 @@ const SettingComponent = ({
useEffect(() => { useEffect(() => {
console.log('settingPage: ', settingPage) console.log('settingPage: ', settingPage)
if(elem){ if (elem) {
elem.scrollTo({top: elem.scrollHeight / allData.length * settingPage, behavior: typeof useColorConfigStore.state.switchAnim !== 'undefined' ? useColorConfigStore.state.switchAnim ? 'smooth' : 'auto' : 'smooth'}) elem.scrollTo({ top: elem.scrollHeight / allData.length * settingPage, behavior: typeof useColorConfigStore.state.switchAnim !== 'undefined' ? useColorConfigStore.state.switchAnim ? 'smooth' : 'auto' : 'smooth' })
} }
}, [settingPage]); }, [settingPage]);
...@@ -47,7 +50,7 @@ const SettingComponent = ({ ...@@ -47,7 +50,7 @@ const SettingComponent = ({
> >
<SettingMainStyle.LeftMenu> <SettingMainStyle.LeftMenu>
{ {
allData.map(({id, title, icon}, index)=> <div id={id} className={`menuItem ${settingPage === index && 'active'}`} onClick={()=> changeSettingPageCountFunc(index)}> allData?.map(({ id, icon }, index) => <div id={id} key={id} className={`menuItem ${settingPage === index && 'active'}`} onClick={() => changeSettingPageCountFunc(index)}>
{icon} {icon}
<div className={'backgroundFilter'}></div> <div className={'backgroundFilter'}></div>
</div>) </div>)
...@@ -55,7 +58,7 @@ const SettingComponent = ({ ...@@ -55,7 +58,7 @@ const SettingComponent = ({
</SettingMainStyle.LeftMenu> </SettingMainStyle.LeftMenu>
<SettingMainStyle.RightSelectInfo id={'data'}> <SettingMainStyle.RightSelectInfo id={'data'}>
{ {
allData.map(({content, id})=> content) allData?.map(({ content, id }) => { content(id) })
} }
</SettingMainStyle.RightSelectInfo> </SettingMainStyle.RightSelectInfo>
......
...@@ -4,6 +4,7 @@ import Switch from '@mui/material/Switch'; ...@@ -4,6 +4,7 @@ import Switch from '@mui/material/Switch';
import MiniTable from "../../MiniTable" import MiniTable from "../../MiniTable"
import {useColorConfig} from "../../../storage/globalColorConfig" import {useColorConfig} from "../../../storage/globalColorConfig"
import Slider from '@mui/material/Slider'; import Slider from '@mui/material/Slider';
import { v4 as uuidv4 } from 'uuid'
const FixComponent = () => { const FixComponent = () => {
...@@ -28,7 +29,7 @@ const FixComponent = () => { ...@@ -28,7 +29,7 @@ const FixComponent = () => {
const tableData = [ const tableData = [
{ {
id: '1', id: uuidv4(),
title: 'Auto answer', title: 'Auto answer',
type: 'row', type: 'row',
child: useColorConfigStore.state.autoAnswer && <div style={{padding: '0 20px 0 5px'}}> child: useColorConfigStore.state.autoAnswer && <div style={{padding: '0 20px 0 5px'}}>
......
...@@ -2,50 +2,50 @@ import React from 'react' ...@@ -2,50 +2,50 @@ import React from 'react'
import StyleBlock from "./style" import StyleBlock from "./style"
import MiniTable from "../../MiniTable" import MiniTable from "../../MiniTable"
import Checkbox from '@mui/material/Checkbox'; import Checkbox from '@mui/material/Checkbox';
import {useColorConfig} from "../../../storage/globalColorConfig" import { useColorConfig } from "../../../storage/globalColorConfig"
import Slider from "@mui/material/Slider" import Slider from "@mui/material/Slider"
import { v4 as uuidv4 } from 'uuid';
const StyleComponent = () => { const StyleComponent = () => {
const useColorConfigStore = useColorConfig((store) => store) const useColorConfigStore = useColorConfig((store) => store)
const marks = [{ const marks = [{
value: 0, label: <span style={{fontSize: 12}}>none</span>, value: 0, label: <span style={{ fontSize: 12 }}>none</span>,
}, { }, {
value: 25, label: <span style={{fontSize: 12}}>+2px</span>, value: 25, label: <span style={{ fontSize: 12 }}>+2px</span>,
}, { }, {
value: 50, label: <span style={{fontSize: 12}}>+3px</span>, value: 50, label: <span style={{ fontSize: 12 }}>+3px</span>,
}, { }, {
value: 75, label: <span style={{fontSize: 12}}>+4px</span>, value: 75, label: <span style={{ fontSize: 12 }}>+4px</span>,
}, { }, {
value: 100, label: <span style={{fontSize: 12}}>+5px</span>, value: 100, label: <span style={{ fontSize: 12 }}>+5px</span>,
}]; }];
const tableData = [{ const tableData = [{
id: '1', title: 'Show version', type: 'row', inputTag: <Checkbox id: uuidv4(), title: 'Show version', type: 'row', inputTag: <Checkbox
defaultChecked={typeof useColorConfigStore.state.showVersion === 'undefined' ? true : useColorConfigStore.state.showVersion} defaultChecked={typeof useColorConfigStore.state.showVersion === 'undefined' ? true : useColorConfigStore.state.showVersion}
onChange={(e) => useColorConfigStore.setColor({name: 'showVersion', value: e.target.checked})}/> onChange={(e) => useColorConfigStore.setColor({ name: 'showVersion', value: e.target.checked })} />
}, { }, {
id: '2', id: uuidv4(),
title: 'Font size of Boxdialer', title: 'Font size of Boxdialer',
type: 'column', type: 'column',
child: <div style={{padding: '0 20px 0 15px'}}><Slider child: <div style={{ padding: '0 20px 0 15px' }}><Slider
aria-label="Restricted values" aria-label="Restricted values"
defaultValue={50} defaultValue={50}
step={null} step={null}
value={typeof useColorConfigStore.state.sizePixel === 'undefined' ? true : useColorConfigStore.state.sizePixel} value={typeof useColorConfigStore.state.sizePixel === 'undefined' ? true : useColorConfigStore.state.sizePixel}
marks={marks} marks={marks}
onChange={(e) => useColorConfigStore.setColor({name: 'sizePixel', value: e.target.value})} onChange={(e) => useColorConfigStore.setColor({ name: 'sizePixel', value: e.target.value })}
/></div> /></div>
}, { }, {
id: '1', title: 'Switch On/Off anm.', type: 'row', inputTag: <Checkbox id: uuidv4(), title: 'Switch On/Off anm.', type: 'row', inputTag: <Checkbox
defaultChecked={typeof useColorConfigStore.state.switchAnim === 'undefined' ? true : useColorConfigStore.state.switchAnim} defaultChecked={typeof useColorConfigStore.state.switchAnim === 'undefined' ? true : useColorConfigStore.state.switchAnim}
onChange={(e) => useColorConfigStore.setColor({name: 'switchAnim', value: e.target.checked})}/> onChange={(e) => useColorConfigStore.setColor({ name: 'switchAnim', value: e.target.checked })} />
},] },]
return (<StyleBlock> return (<StyleBlock>
<MiniTable data={tableData} gap={'10px'}/> <MiniTable data={tableData} gap={'10px'} />
</StyleBlock>) </StyleBlock>)
} }
......
...@@ -208,12 +208,8 @@ export class BoxDialer { ...@@ -208,12 +208,8 @@ export class BoxDialer {
console.log('%c confirmed', 'font-size: 22px; color: green;', e); console.log('%c confirmed', 'font-size: 22px; color: green;', e);
this.setGuiPhoneState({ this.setGuiPhoneState({
funcName: 'modalState', funcName: 'modalState', stateCode: 'connected', funcParam: {
stateCode: 'connected', bool: true, callType: 'connected', callFromName: 'Test',
funcParam: {
bool: true,
callType: 'connected',
callFromName: 'Test',
}, },
}); });
...@@ -407,7 +403,6 @@ export class BoxDialer { ...@@ -407,7 +403,6 @@ export class BoxDialer {
} }
this.onSipStateChange.innerCallerModal({ this.onSipStateChange.innerCallerModal({
bool: true, type: 'connectingIncoming', from: this?.callSession?._remote_identity?._uri?.user, bool: true, type: 'connectingIncoming', from: this?.callSession?._remote_identity?._uri?.user,
}); });
...@@ -654,12 +649,7 @@ export class BoxDialer { ...@@ -654,12 +649,7 @@ export class BoxDialer {
} else if (!window?.alovoice_wsphone && !!funcName && this.onSipStateChange[funcName] !== 'undefined' && !!funcParam) { } else if (!window?.alovoice_wsphone && !!funcName && this.onSipStateChange[funcName] !== 'undefined' && !!funcParam) {
console.log('setGuiPhoneState_for_alovoice_cloud_run_command: ', { console.log('setGuiPhoneState_for_alovoice_cloud_run_command: ', {
stateCode, funcName, funcParam, stateCode, funcName, funcParam,
}, }, !window?.alovoice_wsphone, !!funcName, this.onSipStateChange[funcName] !== 'undefined', !!funcParam)
!window?.alovoice_wsphone,
!!funcName,
this.onSipStateChange[funcName] !== 'undefined',
!!funcParam
)
this.onSipStateChange[funcName](funcParam); this.onSipStateChange[funcName](funcParam);
} }
} }
...@@ -801,6 +791,7 @@ export class BoxDialer { ...@@ -801,6 +791,7 @@ export class BoxDialer {
this.onSipStateChange.innerCallerModal({ this.onSipStateChange.innerCallerModal({
bool: false, type: null, from: '', bool: false, type: null, from: '',
}); });
this.sipBxState = null;
console.log('hangupButtonClick========-----------', this.callSession._status,); console.log('hangupButtonClick========-----------', this.callSession._status,);
if (this.callSession && this.callSession._status != '8') this.callSession.terminate(); if (this.callSession && this.callSession._status != '8') this.callSession.terminate();
} }
......
/** @format */ /** @format */
import React, {useContext, useEffect, useState} from 'react'; import React, { useContext, useEffect, useState } from 'react';
import packageJson from '../../package.json'; import packageJson from '../../package.json';
import DefaultWidjetUi from '../components/DefaultWidjetUi'; import DefaultWidjetUi from '../components/DefaultWidjetUi';
import ModalPhoneNumpad from '../components/ModalPhoneNumpad'; import ModalPhoneNumpad from '../components/ModalPhoneNumpad';
...@@ -8,11 +8,11 @@ import Modal from '../components/Modal'; ...@@ -8,11 +8,11 @@ import Modal from '../components/Modal';
import BxMiniWidjetUi from '../components/BxMiniWidjetUi'; import BxMiniWidjetUi from '../components/BxMiniWidjetUi';
import SecondNotifSip from '../components/SecondNotifSip'; import SecondNotifSip from '../components/SecondNotifSip';
import InnerCaller from '../components/InnerCaller'; import InnerCaller from '../components/InnerCaller';
import {useConfigHoldMute} from "../storage" import { useConfigHoldMute } from "../storage"
import SettingComponent from "../components/setting" import SettingComponent from "../components/setting"
import {useColorConfig} from "../storage/globalColorConfig" import { useColorConfig } from "../storage/globalColorConfig"
const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => { const Root = ({ wsphonedata, onSetDnd, setWsphonedata, callMethod }) => {
const boxDialer = window.BoxDialer; const boxDialer = window.BoxDialer;
const useColorConfigStore = useColorConfig((store) => store) const useColorConfigStore = useColorConfig((store) => store)
...@@ -85,9 +85,8 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => { ...@@ -85,9 +85,8 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
// useEffect(()=> { // useEffect(()=> {
// console.log('auto_answer running: ', modalState.callType === 'incoming' && modalState.bool) // console.log('auto_answer running: ', modalState.callType === 'incoming' && modalState.bool)
//
// }, [modalState.callType, modalState.bool, useColorConfigStore.state?.autoAnswer, useColorConfigStore.state?.autoAnswerSecond]) // }, [modalState.callType, modalState.bool, useColorConfigStore.state?.autoAnswer, useColorConfigStore.state?.autoAnswerSecond])
//
const selectWidjetType = (type) => { const selectWidjetType = (type) => {
switch (type) { switch (type) {
...@@ -175,7 +174,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => { ...@@ -175,7 +174,7 @@ const Root = ({wsphonedata, onSetDnd, setWsphonedata, callMethod}) => {
innerTimer={innerTimer} innerTimer={innerTimer}
/> />
<SecondNotifSip secondLine={secondLine}/> <SecondNotifSip secondLine={secondLine} />
</>); </>);
}; };
export default Root; export default Root;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment