ordering-ui-admin-external 1.17.0 → 1.19.0
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/_bundles/{ordering-ui-admin.6c1919d6b0356a2f522f.js → ordering-ui-admin.661a37246ac77dcc4edf.js} +2 -2
- package/_modules/components/Delivery/DeliveryUsersListing/index.js +4 -2
- package/_modules/components/Delivery/DriversGroupLogistics/index.js +1 -1
- package/_modules/components/Delivery/DriversGroupLogs/index.js +1 -0
- package/_modules/components/Delivery/UsersList/index.js +47 -51
- package/_modules/components/Delivery/UsersList/styles.js +6 -4
- package/_modules/components/Home/HomePage/index.js +7 -1
- package/_modules/components/Login/LoginForm/index.js +7 -1
- package/_modules/components/Marketing/EnterprisePromotionListing/index.js +1 -1
- package/_modules/components/Messages/MessagesListing/index.js +1 -1
- package/_modules/components/MyProducts/AdvancedSettings/ButtonShadow.js +98 -0
- package/_modules/components/MyProducts/AdvancedSettings/FontStyleGroup.js +28 -7
- package/_modules/components/MyProducts/AdvancedSettings/HideCheckBox.js +47 -0
- package/_modules/components/MyProducts/AdvancedSettings/ImageBox.js +12 -3
- package/_modules/components/MyProducts/AdvancedSettings/SettingComponent.js +15 -15
- package/_modules/components/MyProducts/AdvancedSettings/index.js +102 -117
- package/_modules/components/MyProducts/AppResources/index.js +132 -0
- package/_modules/components/MyProducts/OrderingWebsite/index.js +47 -2
- package/_modules/components/MyProducts/OrderingWebsite/styles.js +13 -3
- package/_modules/components/OrderingProducts/SiteTheme/index.js +13 -9
- package/_modules/components/Orders/DeliveriesManager/index.js +1 -1
- package/_modules/components/Orders/Messages/index.js +25 -94
- package/_modules/components/Orders/OrderBill/index.js +3 -3
- package/_modules/components/Orders/OrderNotification/index.js +4 -2
- package/_modules/components/Orders/OrdersManager/index.js +3 -1
- package/_modules/components/SidebarMenu/index.js +34 -33
- package/_modules/components/Stores/BusinessAdd/DeliveryZone/index.js +1 -1
- package/_modules/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
- package/_modules/components/Stores/BusinessDetails/index.js +27 -8
- package/_modules/components/Stores/BusinessLocation/index.js +8 -7
- package/_modules/components/Stores/BusinessPlace/index.js +127 -0
- package/_modules/components/Stores/BusinessPlace/styles.js +55 -0
- package/_modules/components/Stores/BusinessPlaceGroup/index.js +258 -0
- package/_modules/components/Stores/BusinessPlaceGroup/styles.js +102 -0
- package/_modules/components/Stores/BusinessProductList/index.js +3 -3
- package/_modules/components/Stores/BusinessProductsListing/index.js +2 -1
- package/_modules/components/Stores/BusinessSummary/index.js +12 -3
- package/_modules/components/Stores/ProductStep/index.js +15 -3
- package/_modules/components/Stores/SpoonityApiKey/index.js +97 -0
- package/_modules/components/Stores/SpoonityApiKey/styles.js +47 -0
- package/_modules/components/Stores/UploadMenuGuide/index.js +8 -0
- package/_modules/components/Users/CustomerPointsWallet/index.js +126 -9
- package/_modules/components/Users/CustomerPointsWallet/styles.js +8 -4
- package/package.json +2 -2
- package/src/components/Delivery/DeliveryUsersListing/index.js +3 -1
- package/src/components/Delivery/DriversGroupLogistics/index.js +1 -1
- package/src/components/Delivery/DriversGroupLogs/index.js +2 -0
- package/src/components/Delivery/UsersList/index.js +79 -61
- package/src/components/Delivery/UsersList/styles.js +4 -12
- package/src/components/Home/HomePage/index.js +2 -2
- package/src/components/Login/LoginForm/index.js +4 -1
- package/src/components/Marketing/EnterprisePromotionListing/index.js +1 -1
- package/src/components/Messages/MessagesListing/index.js +1 -1
- package/src/components/MyProducts/AdvancedSettings/ButtonShadow.js +102 -0
- package/src/components/MyProducts/AdvancedSettings/FontStyleGroup.js +23 -5
- package/src/components/MyProducts/AdvancedSettings/HideCheckBox.js +33 -0
- package/src/components/MyProducts/AdvancedSettings/ImageBox.js +10 -3
- package/src/components/MyProducts/AdvancedSettings/SettingComponent.js +10 -15
- package/src/components/MyProducts/AdvancedSettings/index.js +119 -149
- package/src/components/MyProducts/AppResources/index.js +167 -0
- package/src/components/MyProducts/OrderingWebsite/index.js +66 -2
- package/src/components/MyProducts/OrderingWebsite/styles.js +37 -0
- package/src/components/OrderingProducts/SiteTheme/index.js +7 -3
- package/src/components/Orders/DeliveriesManager/index.js +1 -1
- package/src/components/Orders/Messages/index.js +56 -216
- package/src/components/Orders/OrderBill/index.js +6 -2
- package/src/components/Orders/OrderNotification/index.js +6 -2
- package/src/components/Orders/OrdersManager/index.js +1 -1
- package/src/components/SidebarMenu/index.js +8 -8
- package/src/components/Stores/BusinessAdd/DeliveryZone/index.js +1 -1
- package/src/components/Stores/BusinessDeliveryZoneInformation/index.js +1 -1
- package/src/components/Stores/BusinessDetails/index.js +24 -1
- package/src/components/Stores/BusinessLocation/index.js +2 -1
- package/src/components/Stores/BusinessPlace/index.js +137 -0
- package/src/components/Stores/BusinessPlace/styles.js +132 -0
- package/src/components/Stores/BusinessPlaceGroup/index.js +272 -0
- package/src/components/Stores/BusinessPlaceGroup/styles.js +248 -0
- package/src/components/Stores/BusinessProductList/index.js +9 -1
- package/src/components/Stores/BusinessProductsListing/index.js +1 -0
- package/src/components/Stores/BusinessSummary/index.js +16 -5
- package/src/components/Stores/ProductStep/index.js +19 -2
- package/src/components/Stores/SpoonityApiKey/index.js +87 -0
- package/src/components/Stores/SpoonityApiKey/styles.js +68 -0
- package/src/components/Stores/UploadMenuGuide/index.js +10 -1
- package/src/components/Users/CustomerPointsWallet/index.js +130 -2
- package/src/components/Users/CustomerPointsWallet/styles.js +40 -1
- /package/_bundles/{ordering-ui-admin.6c1919d6b0356a2f522f.js.LICENSE.txt → ordering-ui-admin.661a37246ac77dcc4edf.js.LICENSE.txt} +0 -0
|
@@ -136,7 +136,7 @@ const EnterprisePromotionListingUI = (props) => {
|
|
|
136
136
|
sitesState={sitesState}
|
|
137
137
|
businessesList={businessesList}
|
|
138
138
|
paymethodsState={paymethodsState}
|
|
139
|
-
promotion={selectedPromotion}
|
|
139
|
+
promotion={selectedPromotion || {}}
|
|
140
140
|
promotionId={curPromotionId}
|
|
141
141
|
promotionsList={promotionListState.promotions}
|
|
142
142
|
handleSuccessUpdatePromotions={handleSuccessUpdatePromotions}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import React, { useMemo, useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
|
|
4
|
+
import {
|
|
5
|
+
DropShadowWrapper,
|
|
6
|
+
ShadowInfoWrapper,
|
|
7
|
+
DropShadow,
|
|
8
|
+
ShadowInputGroup,
|
|
9
|
+
ShadowInputControl
|
|
10
|
+
} from './styles'
|
|
11
|
+
|
|
12
|
+
export const ButtonShadow = (props) => {
|
|
13
|
+
const { initialValues, handleUpdateThemeValue, path } = props
|
|
14
|
+
|
|
15
|
+
const [, t] = useLanguage()
|
|
16
|
+
const [shadow, setShadow] = useState({})
|
|
17
|
+
|
|
18
|
+
const shadowValues = useMemo(() => {
|
|
19
|
+
if (!shadow?.x || !shadow?.y || !shadow?.blur || !shadow?.spread) return ''
|
|
20
|
+
return `${shadow?.x}px ${shadow?.y}px ${shadow?.blur}px ${shadow?.spread}px ${shadow?.color}`
|
|
21
|
+
}, [shadow])
|
|
22
|
+
|
|
23
|
+
const handleChangeInput = (value, name) => {
|
|
24
|
+
handleUpdateThemeValue(value, [path, name].join('.'))
|
|
25
|
+
setShadow({ ...shadow, [name]: value })
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
useEffect(() => {
|
|
29
|
+
if (!initialValues) return
|
|
30
|
+
setShadow(JSON.parse(JSON.stringify(initialValues)))
|
|
31
|
+
}, [initialValues])
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<DropShadowWrapper>
|
|
35
|
+
<ShadowInfoWrapper>
|
|
36
|
+
<DropShadow
|
|
37
|
+
style={{
|
|
38
|
+
boxShadow: shadowValues
|
|
39
|
+
}}
|
|
40
|
+
/>
|
|
41
|
+
<span>{t('DROP_SHADOW', 'Drop shadow')}</span>
|
|
42
|
+
</ShadowInfoWrapper>
|
|
43
|
+
<ShadowInputGroup>
|
|
44
|
+
<ShadowInputControl>
|
|
45
|
+
<span>X</span>
|
|
46
|
+
<input
|
|
47
|
+
value={shadow?.x || ''}
|
|
48
|
+
onKeyPress={(e) => {
|
|
49
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
50
|
+
e.preventDefault()
|
|
51
|
+
}
|
|
52
|
+
}}
|
|
53
|
+
onChange={(e) => handleChangeInput(e.target.value, 'x')}
|
|
54
|
+
/>
|
|
55
|
+
</ShadowInputControl>
|
|
56
|
+
<ShadowInputControl>
|
|
57
|
+
<span>Y</span>
|
|
58
|
+
<input
|
|
59
|
+
value={shadow?.y || ''}
|
|
60
|
+
onChange={(e) => handleChangeInput(e.target.value, 'y')}
|
|
61
|
+
onKeyPress={(e) => {
|
|
62
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
63
|
+
e.preventDefault()
|
|
64
|
+
}
|
|
65
|
+
}}
|
|
66
|
+
/>
|
|
67
|
+
</ShadowInputControl>
|
|
68
|
+
<ShadowInputControl>
|
|
69
|
+
<span>B</span>
|
|
70
|
+
<input
|
|
71
|
+
value={shadow?.blur || ''}
|
|
72
|
+
onChange={(e) => handleChangeInput(e.target.value, 'blur')}
|
|
73
|
+
onKeyPress={(e) => {
|
|
74
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
75
|
+
e.preventDefault()
|
|
76
|
+
}
|
|
77
|
+
}}
|
|
78
|
+
/>
|
|
79
|
+
</ShadowInputControl>
|
|
80
|
+
<ShadowInputControl>
|
|
81
|
+
<span>S</span>
|
|
82
|
+
<input
|
|
83
|
+
value={shadow?.spread || ''}
|
|
84
|
+
onChange={(e) => handleChangeInput(e.target.value, 'spread')}
|
|
85
|
+
onKeyPress={(e) => {
|
|
86
|
+
if (!/^[0-9]$/.test(e.key)) {
|
|
87
|
+
e.preventDefault()
|
|
88
|
+
}
|
|
89
|
+
}}
|
|
90
|
+
/>
|
|
91
|
+
</ShadowInputControl>
|
|
92
|
+
<ShadowInputControl>
|
|
93
|
+
<span>C</span>
|
|
94
|
+
<input
|
|
95
|
+
value={shadow?.color || ''}
|
|
96
|
+
onChange={(e) => handleChangeInput(e.target.value, 'color')}
|
|
97
|
+
/>
|
|
98
|
+
</ShadowInputControl>
|
|
99
|
+
</ShadowInputGroup>
|
|
100
|
+
</DropShadowWrapper>
|
|
101
|
+
)
|
|
102
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react'
|
|
1
|
+
import React, { useEffect, useState } from 'react'
|
|
2
2
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
3
|
import { RecordCircleFill, Circle } from 'react-bootstrap-icons'
|
|
4
4
|
import { Select } from '../../../styles/Select/FirstSelect'
|
|
@@ -14,6 +14,9 @@ export const FontStyleGroup = (props) => {
|
|
|
14
14
|
const { isBody, fonts, path, handleUpdateThemeValue } = props
|
|
15
15
|
const [, t] = useLanguage()
|
|
16
16
|
|
|
17
|
+
const [weights, setWeights] = useState([])
|
|
18
|
+
const [font, setFont] = useState('Poppins')
|
|
19
|
+
|
|
17
20
|
const fontFamilyList = [
|
|
18
21
|
{ value: 'Poppins', content: <Option>{t('POPPINS', 'Poppins')}</Option> },
|
|
19
22
|
{ value: 'Lobster', content: <Option>{t('LOBSTER', 'Lobster')}</Option> },
|
|
@@ -32,6 +35,21 @@ export const FontStyleGroup = (props) => {
|
|
|
32
35
|
{ value: 900, name: '900 - Black (Heavy)' }
|
|
33
36
|
]
|
|
34
37
|
|
|
38
|
+
const handleChangeWeights = (value) => {
|
|
39
|
+
handleUpdateThemeValue([value], [path, 'weights'].join('.'))
|
|
40
|
+
setWeights([value])
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const handleUpdateFont = (value) => {
|
|
44
|
+
handleUpdateThemeValue(value, [path, 'name'].join('.'))
|
|
45
|
+
setFont(value)
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
useEffect(() => {
|
|
49
|
+
setWeights(fonts?.weights)
|
|
50
|
+
setFont(fonts?.name)
|
|
51
|
+
}, [JSON.stringify(fonts)])
|
|
52
|
+
|
|
35
53
|
return (
|
|
36
54
|
<>
|
|
37
55
|
<FormControl>
|
|
@@ -40,9 +58,9 @@ export const FontStyleGroup = (props) => {
|
|
|
40
58
|
<Select
|
|
41
59
|
options={fontFamilyList}
|
|
42
60
|
className='select'
|
|
43
|
-
defaultValue={
|
|
61
|
+
defaultValue={font}
|
|
44
62
|
placeholder={t('SELECT_OPTION', 'Select an option')}
|
|
45
|
-
onChange={(value) =>
|
|
63
|
+
onChange={(value) => handleUpdateFont(value)}
|
|
46
64
|
/>
|
|
47
65
|
</SelectWrapper>
|
|
48
66
|
</FormControl>
|
|
@@ -52,8 +70,8 @@ export const FontStyleGroup = (props) => {
|
|
|
52
70
|
</label>
|
|
53
71
|
<FontWeightListWrapper>
|
|
54
72
|
{fontWeightList.map(weight => (
|
|
55
|
-
<FontWeightItem key={weight.value} onClick={() =>
|
|
56
|
-
{
|
|
73
|
+
<FontWeightItem key={weight.value} onClick={() => handleChangeWeights(weight?.value)}>
|
|
74
|
+
{weights?.includes(weight.value) ? <RecordCircleFill className='active' /> : <Circle />}
|
|
57
75
|
<span>{weight.name}</span>
|
|
58
76
|
</FontWeightItem>
|
|
59
77
|
))}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react'
|
|
2
|
+
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
|
+
import {
|
|
4
|
+
CheckSquareFill as CheckedIcon,
|
|
5
|
+
Square as UnCheckedIcon
|
|
6
|
+
} from 'react-bootstrap-icons'
|
|
7
|
+
import { FormControl, HideCheckWrapper } from './styles'
|
|
8
|
+
|
|
9
|
+
export const HideCheckBox = (props) => {
|
|
10
|
+
const { handleUpdateThemeValue, setting, initialCheck, noLabel } = props
|
|
11
|
+
const [isCheck, setIsCheck] = useState(false)
|
|
12
|
+
|
|
13
|
+
const [, t] = useLanguage()
|
|
14
|
+
|
|
15
|
+
const handleClick = () => {
|
|
16
|
+
handleUpdateThemeValue(!isCheck, setting?.path)
|
|
17
|
+
setIsCheck(!isCheck)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
setIsCheck(initialCheck)
|
|
22
|
+
}, [initialCheck])
|
|
23
|
+
|
|
24
|
+
return (
|
|
25
|
+
<FormControl>
|
|
26
|
+
{!noLabel && (<label>{setting.name}</label>)}
|
|
27
|
+
<HideCheckWrapper onClick={() => handleClick()}>
|
|
28
|
+
{isCheck ? <CheckedIcon className='active' /> : <UnCheckedIcon />}
|
|
29
|
+
<span>{noLabel ? setting.name : t('HIDDEN', 'Hidden')} </span>
|
|
30
|
+
</HideCheckWrapper>
|
|
31
|
+
</FormControl>
|
|
32
|
+
)
|
|
33
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useRef, useState } from 'react'
|
|
1
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
2
2
|
import { useLanguage, ExamineClick, DragAndDrop } from 'ordering-components-admin-external'
|
|
3
3
|
import { bytesConverter } from '../../../utils'
|
|
4
4
|
import { Image as DumyPhoto } from 'react-bootstrap-icons'
|
|
@@ -18,9 +18,11 @@ export const ImageBox = (props) => {
|
|
|
18
18
|
const imageRef = useRef()
|
|
19
19
|
const [alertState, setAlertState] = useState({ open: false, content: [] })
|
|
20
20
|
const [cropState, setCropState] = useState({ name: null, data: null, open: false })
|
|
21
|
+
const [picture, setPicture] = useState('')
|
|
21
22
|
|
|
22
23
|
const handleChangeImage = (croppedImg) => {
|
|
23
24
|
handleChangePhoto(croppedImg, path)
|
|
25
|
+
setPicture(croppedImg)
|
|
24
26
|
setCropState({ name: null, data: null, open: false })
|
|
25
27
|
}
|
|
26
28
|
|
|
@@ -58,6 +60,11 @@ export const ImageBox = (props) => {
|
|
|
58
60
|
})
|
|
59
61
|
}
|
|
60
62
|
|
|
63
|
+
useEffect(() => {
|
|
64
|
+
if (!photo) return
|
|
65
|
+
setPicture(photo)
|
|
66
|
+
}, [photo])
|
|
67
|
+
|
|
61
68
|
return (
|
|
62
69
|
<div>
|
|
63
70
|
<ImageBoxContainer isBig={isBig} onClick={() => imageRef.current.click()}>
|
|
@@ -70,8 +77,8 @@ export const ImageBox = (props) => {
|
|
|
70
77
|
onDrop={dataTransfer => handleFiles(dataTransfer.files, 'logo')}
|
|
71
78
|
accept='image/png, image/jpeg, image/jpg'
|
|
72
79
|
>
|
|
73
|
-
{
|
|
74
|
-
<UploadImageIconContainer bgimage={
|
|
80
|
+
{picture && <img src={picture} alt='logo image' loading='lazy' />}
|
|
81
|
+
<UploadImageIconContainer bgimage={picture}>
|
|
75
82
|
<UploadImageIcon>
|
|
76
83
|
<DumyPhoto />
|
|
77
84
|
<span>{t('DRAG_AND_DROP', 'Drag and drop')}</span>
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
import React from 'react'
|
|
2
2
|
import { useLanguage } from 'ordering-components-admin-external'
|
|
3
3
|
import { Select } from '../../../styles/Select/FirstSelect'
|
|
4
|
+
import { ColorPicker } from '../../Shared'
|
|
5
|
+
import { Input } from '../../../styles'
|
|
6
|
+
import { HideCheckBox } from './HideCheckBox'
|
|
4
7
|
import { ImageBox } from './ImageBox'
|
|
5
|
-
import {
|
|
6
|
-
CheckSquareFill as CheckedIcon,
|
|
7
|
-
Square as UnCheckedIcon
|
|
8
|
-
} from 'react-bootstrap-icons'
|
|
9
8
|
import {
|
|
10
9
|
FormControl,
|
|
11
|
-
HideCheckWrapper,
|
|
12
10
|
SelectWrapper,
|
|
13
11
|
Option
|
|
14
12
|
} from './styles'
|
|
15
|
-
import { ColorPicker } from '../../Shared'
|
|
16
|
-
import { Input } from '../../../styles'
|
|
17
13
|
|
|
18
14
|
export const SettingComponent = (props) => {
|
|
19
|
-
const { settingList, handleUpdateThemeValue, advancedValues, themeStructure } = props
|
|
15
|
+
const { settingList, handleUpdateThemeValue, advancedValues, themeStructure, noLabel } = props
|
|
20
16
|
|
|
21
17
|
const [, t] = useLanguage()
|
|
22
18
|
|
|
@@ -47,13 +43,12 @@ export const SettingComponent = (props) => {
|
|
|
47
43
|
{settingList.map((setting, i) => (
|
|
48
44
|
<React.Fragment key={i}>
|
|
49
45
|
{setting.type === 'hidden' && (
|
|
50
|
-
<
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
</FormControl>
|
|
46
|
+
<HideCheckBox
|
|
47
|
+
handleUpdateThemeValue={handleUpdateThemeValue}
|
|
48
|
+
setting={setting}
|
|
49
|
+
initialCheck={deepFind(advancedValues, setting?.path)}
|
|
50
|
+
noLabel={noLabel}
|
|
51
|
+
/>
|
|
57
52
|
)}
|
|
58
53
|
{setting.type === 'position' && (
|
|
59
54
|
<FormControl>
|