Commit 93198895 authored by Muhammadali's avatar Muhammadali

update

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