ordering-ui-admin-external 1.43.86 → 1.43.88
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.89cc92ea829107eb0896.js → ordering-ui-admin.79d573230ba669643af1.js} +2 -2
- package/_modules/components/Orders/AllInOne/index.js +38 -38
- package/_modules/components/Orders/DeliveriesManager/index.js +13 -15
- package/_modules/components/Orders/OrderContactInformation/index.js +4 -2
- package/_modules/components/Orders/OrderDetails/index.js +3 -1
- package/_modules/components/Orders/OrdersContentHeader/index.js +4 -2
- package/_modules/components/Orders/OrdersFilterGroup/index.js +1 -2
- package/_modules/components/Orders/OrdersHeaderFilterGroup/index.js +4 -2
- package/_modules/components/Orders/OrdersManager/index.js +35 -33
- package/_modules/components/Stores/BusinessPaymentMethods/index.js +39 -2
- package/_modules/components/Stores/PaymentOptionStripeLink/index.js +347 -0
- package/_modules/components/Stores/PaymentOptionStripeLink/styles.js +57 -0
- package/_modules/components/Stores/ProductExtraOptionDetails/index.js +10 -8
- package/_modules/components/Stores/ProductExtraSuboption/index.js +13 -3
- package/_modules/components/Stores/index.js +7 -0
- package/_modules/index.js +6 -0
- package/package.json +2 -2
- package/src/components/Orders/AllInOne/index.js +5 -2
- package/src/components/Orders/DeliveriesManager/index.js +3 -2
- package/src/components/Orders/OrderContactInformation/index.js +3 -1
- package/src/components/Orders/OrderDetails/index.js +3 -1
- package/src/components/Orders/OrdersContentHeader/index.js +3 -1
- package/src/components/Orders/OrdersFilterGroup/index.js +0 -2
- package/src/components/Orders/OrdersHeaderFilterGroup/index.js +3 -1
- package/src/components/Orders/OrdersManager/index.js +7 -2
- package/src/components/Stores/BusinessPaymentMethods/index.js +41 -0
- package/src/components/Stores/PaymentOptionStripeLink/index.js +357 -0
- package/src/components/Stores/PaymentOptionStripeLink/styles.js +171 -0
- package/src/components/Stores/ProductExtraOptionDetails/index.js +5 -4
- package/src/components/Stores/ProductExtraSuboption/index.js +15 -3
- package/src/components/Stores/index.js +2 -0
- package/src/index.js +2 -0
- /package/_bundles/{ordering-ui-admin.89cc92ea829107eb0896.js.LICENSE.txt → ordering-ui-admin.79d573230ba669643af1.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import styled, { css } from 'styled-components'
|
|
2
|
+
import { darken } from 'polished'
|
|
3
|
+
|
|
4
|
+
export const Container = styled.div`
|
|
5
|
+
padding: 20px;
|
|
6
|
+
overflow: auto;
|
|
7
|
+
transition: 0.3s;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
display: flex;
|
|
10
|
+
flex-direction: column;
|
|
11
|
+
|
|
12
|
+
> button {
|
|
13
|
+
margin-top: 20px;
|
|
14
|
+
padding: 5px 15px 35px;
|
|
15
|
+
position: sticky;
|
|
16
|
+
top: 100%;
|
|
17
|
+
width: fit-content;
|
|
18
|
+
height: 42px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.message {
|
|
22
|
+
margin: 0px;
|
|
23
|
+
font-size: 12px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.alert-message {
|
|
27
|
+
margin: 30px 0 0 0;
|
|
28
|
+
font-weight: 700;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.select {
|
|
32
|
+
width: 100%;
|
|
33
|
+
> div:first-child {
|
|
34
|
+
padding: 8px 15px;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
@media (min-width: 1000px) {
|
|
39
|
+
width: 0;
|
|
40
|
+
${props => props.theme?.rtl ? css`
|
|
41
|
+
border-right: 1px solid #E9ECEF;
|
|
42
|
+
` : css`
|
|
43
|
+
border-left: 1px solid #E9ECEF;
|
|
44
|
+
`}
|
|
45
|
+
}
|
|
46
|
+
`
|
|
47
|
+
|
|
48
|
+
export const Option = styled.div`
|
|
49
|
+
display: flex;
|
|
50
|
+
align-items: center;
|
|
51
|
+
column-gap: 10px;
|
|
52
|
+
font-size: 13px;
|
|
53
|
+
line-height: 2;
|
|
54
|
+
font-weight: 500;
|
|
55
|
+
`
|
|
56
|
+
|
|
57
|
+
export const SandboxWrapper = styled.div`
|
|
58
|
+
margin-top: 30px;
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
color: ${props => props.theme.colors.headingColor};
|
|
62
|
+
span {
|
|
63
|
+
${props => props.theme?.rtl ? css`
|
|
64
|
+
margin-right: 10px;
|
|
65
|
+
` : css`
|
|
66
|
+
margin-left: 10px;
|
|
67
|
+
`}
|
|
68
|
+
}
|
|
69
|
+
`
|
|
70
|
+
|
|
71
|
+
export const FieldName = styled.p`
|
|
72
|
+
color: ${props => props.theme.colors.headingColor};
|
|
73
|
+
margin: 30px 0 10px;
|
|
74
|
+
`
|
|
75
|
+
|
|
76
|
+
export const Header = styled.div`
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
h1 {
|
|
80
|
+
font-size: 20px;
|
|
81
|
+
color: ${props => props.theme.colors.headingColor};
|
|
82
|
+
font-weight: 700;
|
|
83
|
+
flex: 1;
|
|
84
|
+
margin: 0;
|
|
85
|
+
}
|
|
86
|
+
`
|
|
87
|
+
|
|
88
|
+
export const CloseButton = styled.div`
|
|
89
|
+
display: none;
|
|
90
|
+
@media (min-width: 1000px) {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
}
|
|
94
|
+
`
|
|
95
|
+
export const TabOption = styled.div`
|
|
96
|
+
display: flex;
|
|
97
|
+
align-items: center;
|
|
98
|
+
padding: 12px 0;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
color: ${props => props.theme.colors.headingColor};
|
|
101
|
+
|
|
102
|
+
> svg {
|
|
103
|
+
font-size: 20px;
|
|
104
|
+
&.fill {
|
|
105
|
+
color: ${props => props.theme.colors.primary};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
`
|
|
109
|
+
|
|
110
|
+
export const TabOptionName = styled.span`
|
|
111
|
+
color: ${props => props.theme.colors.headingColor};
|
|
112
|
+
${props => props.theme?.rtl ? css`
|
|
113
|
+
margin-right: 10px;
|
|
114
|
+
` : css`
|
|
115
|
+
margin-left: 10px;
|
|
116
|
+
`}
|
|
117
|
+
`
|
|
118
|
+
export const ActionSelectorWrapper = styled.div`
|
|
119
|
+
margin: 0 10px;
|
|
120
|
+
button {
|
|
121
|
+
background: transparent !important;
|
|
122
|
+
border: none;
|
|
123
|
+
padding: 0px 5px;
|
|
124
|
+
&:active,
|
|
125
|
+
&:focus {
|
|
126
|
+
border-color: unset !important;
|
|
127
|
+
box-shadow: none !important;
|
|
128
|
+
}
|
|
129
|
+
svg {
|
|
130
|
+
color: ${props => props.theme.colors.headingColor};
|
|
131
|
+
font-size: 20px;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
&:after {
|
|
135
|
+
display: none;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:hover {
|
|
139
|
+
background: ${props => darken(0.04, props.theme.colors.secundary)} !important;
|
|
140
|
+
}
|
|
141
|
+
&:active {
|
|
142
|
+
background: ${props => darken(0.1, props.theme.colors.secundary)} !important;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
.show {
|
|
147
|
+
button {
|
|
148
|
+
background: ${props => darken(0.04, props.theme.colors.secundary)} !important;
|
|
149
|
+
}
|
|
150
|
+
>div {
|
|
151
|
+
border: 1px solid ${props => props.theme.colors.borderColor};
|
|
152
|
+
box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.12);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
> div {
|
|
157
|
+
> div {
|
|
158
|
+
border-radius: 8px;
|
|
159
|
+
.dropdown-item {
|
|
160
|
+
font-size: 12px;
|
|
161
|
+
color: ${props => props.theme.colors.headingColor};
|
|
162
|
+
&:active {
|
|
163
|
+
background: ${props => darken(0.1, props.theme.colors.secundary)} !important;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
.dropdown-item:last-child {
|
|
167
|
+
color: #E63757;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
`
|
|
@@ -94,6 +94,7 @@ const ProductExtraOptionDetailsUI = (props) => {
|
|
|
94
94
|
const [cropState, setCropState] = useState({ name: null, data: null, open: false })
|
|
95
95
|
const [externalId, setExternalId] = useState()
|
|
96
96
|
const [isExtraOptionSnooze, setIsExtraOptionSnooze] = useState(false)
|
|
97
|
+
const [isDraggingExtraOption, setIsDraggingExtraOption] = useState(false)
|
|
97
98
|
|
|
98
99
|
const handleClickSubOptionImage = (id) => {
|
|
99
100
|
document.getElementById(id).click()
|
|
@@ -286,6 +287,8 @@ const ProductExtraOptionDetailsUI = (props) => {
|
|
|
286
287
|
handleDrop={handleDrop}
|
|
287
288
|
handleDragEnd={handleDragEnd}
|
|
288
289
|
handleDuplicateSubOption={handleDuplicateSubOption}
|
|
290
|
+
isDraggingExtraOption={isDraggingExtraOption}
|
|
291
|
+
setIsDraggingExtraOption={setIsDraggingExtraOption}
|
|
289
292
|
/>
|
|
290
293
|
)
|
|
291
294
|
})}
|
|
@@ -309,12 +312,10 @@ const ProductExtraOptionDetailsUI = (props) => {
|
|
|
309
312
|
<DragAndDrop
|
|
310
313
|
onDrop={dataTransfer => handleSubOptionFiles(dataTransfer.files, 'add_suboption_image')}
|
|
311
314
|
accept='image/png, image/jpeg, image/jpg'
|
|
312
|
-
disabled={optionState.loading}
|
|
315
|
+
disabled={optionState.loading || isDraggingExtraOption}
|
|
313
316
|
>
|
|
314
317
|
{
|
|
315
|
-
(changesState?.
|
|
316
|
-
? (<img src={changesState?.result?.image} alt='sub option image' loading='lazy' />)
|
|
317
|
-
: (changesState?.changes?.image && editSubOptionId === null) && (<img src={changesState?.changes?.image} alt='sub option image' loading='lazy' />)
|
|
318
|
+
(changesState?.changes?.image && editSubOptionId === null) && (<img src={changesState?.changes?.image} alt='sub option image' loading='lazy' />)
|
|
318
319
|
}
|
|
319
320
|
<UploadImageIconContainer>
|
|
320
321
|
<UploadImageIcon small>
|
|
@@ -45,7 +45,9 @@ export const ProductExtraSuboption = (props) => {
|
|
|
45
45
|
hanldeDragOver,
|
|
46
46
|
handleDrop,
|
|
47
47
|
handleDragEnd,
|
|
48
|
-
handleDuplicateSubOption
|
|
48
|
+
handleDuplicateSubOption,
|
|
49
|
+
isDraggingExtraOption,
|
|
50
|
+
setIsDraggingExtraOption
|
|
49
51
|
} = props
|
|
50
52
|
|
|
51
53
|
const theme = useTheme()
|
|
@@ -133,6 +135,15 @@ export const ProductExtraSuboption = (props) => {
|
|
|
133
135
|
setExternalIdOpen(false)
|
|
134
136
|
}
|
|
135
137
|
|
|
138
|
+
const handleDropSubOption = (e, subOption) => {
|
|
139
|
+
setIsDraggingExtraOption(false)
|
|
140
|
+
handleDrop(e, subOption)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
const handleDragStartSubOption = () => {
|
|
144
|
+
setIsDraggingExtraOption(true)
|
|
145
|
+
}
|
|
146
|
+
|
|
136
147
|
useEffect(() => {
|
|
137
148
|
if (Object.keys(errors).length > 0) {
|
|
138
149
|
setAlertState({
|
|
@@ -160,8 +171,9 @@ export const ProductExtraSuboption = (props) => {
|
|
|
160
171
|
onSubmit={handleSubmit(onSubmit)}
|
|
161
172
|
isDragOver={dragoverSubOptionId === subOption.id}
|
|
162
173
|
isBorderBottom={isSubOptionsBottom && isLastSubOption}
|
|
174
|
+
onDragStart={handleDragStartSubOption}
|
|
163
175
|
onDragOver={e => hanldeDragOver(e, subOption, isLastSubOption)}
|
|
164
|
-
onDrop={e =>
|
|
176
|
+
onDrop={e => handleDropSubOption(e, subOption)}
|
|
165
177
|
onDragEnd={handleDragEnd}
|
|
166
178
|
className='draggable-suboption'
|
|
167
179
|
>
|
|
@@ -186,7 +198,7 @@ export const ProductExtraSuboption = (props) => {
|
|
|
186
198
|
<DragAndDrop
|
|
187
199
|
onDrop={dataTransfer => handleSubOptionFiles(dataTransfer.files, subOption.id)}
|
|
188
200
|
accept='image/png, image/jpeg, image/jpg'
|
|
189
|
-
disabled={optionState.loading}
|
|
201
|
+
disabled={optionState.loading || isDraggingExtraOption}
|
|
190
202
|
>
|
|
191
203
|
{
|
|
192
204
|
(changesState?.result?.image && editSubOptionId === subOption.id)
|
|
@@ -44,6 +44,7 @@ import { BusinessMenuOptions } from './BusinessMenuOptions'
|
|
|
44
44
|
import { BusinessDeliveryDetails } from './BusinessDeliveryDetails'
|
|
45
45
|
import { BusinessPickupDetails } from './BusinessPickupDetails'
|
|
46
46
|
import { PaymentOptionStripeDirect } from './PaymentOptionStripeDirect'
|
|
47
|
+
import { PaymentOptionStripeLink } from './PaymentOptionStripeLink'
|
|
47
48
|
import { PaymentOption } from './PaymentOption'
|
|
48
49
|
import { PaymethodOptionPaypalExpress } from './PaymethodOptionPaypalExpress'
|
|
49
50
|
import { PaymethodOptionStripeRedirect } from './PaymethodOptionStripeRedirect'
|
|
@@ -163,6 +164,7 @@ export {
|
|
|
163
164
|
BusinessDeliveryDetails,
|
|
164
165
|
BusinessPickupDetails,
|
|
165
166
|
PaymentOptionStripeDirect,
|
|
167
|
+
PaymentOptionStripeLink,
|
|
166
168
|
PaymentOption,
|
|
167
169
|
PaymethodOptionPaypalExpress,
|
|
168
170
|
PaymethodOptionStripeRedirect,
|
package/src/index.js
CHANGED
|
@@ -254,6 +254,7 @@ import {
|
|
|
254
254
|
BusinessDeliveryDetails,
|
|
255
255
|
BusinessPickupDetails,
|
|
256
256
|
PaymentOptionStripeDirect,
|
|
257
|
+
PaymentOptionStripeLink,
|
|
257
258
|
PaymentOption,
|
|
258
259
|
PaymethodOptionPaypalExpress,
|
|
259
260
|
PaymethodOptionStripeRedirect,
|
|
@@ -685,6 +686,7 @@ export {
|
|
|
685
686
|
BusinessDeliveryDetails,
|
|
686
687
|
BusinessPickupDetails,
|
|
687
688
|
PaymentOptionStripeDirect,
|
|
689
|
+
PaymentOptionStripeLink,
|
|
688
690
|
PaymentOption,
|
|
689
691
|
PaymethodOptionPaypalExpress,
|
|
690
692
|
PaymethodOptionStripeRedirect,
|