@licklist/design 0.71.20 → 0.71.22
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/dist/iframe/activity-card/ActivityCard.d.ts +1 -2
- package/dist/iframe/activity-card/ActivityCard.d.ts.map +1 -1
- package/dist/iframe/activity-card/ActivityCard.js +1 -7
- package/dist/index.js +1 -1
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +48 -2
- package/dist/product-set/form/SelectCategoryModal.d.ts +12 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts +1 -1
- package/dist/report/ReportRunnerModal/ReportRunnerModal.d.ts.map +1 -1
- package/dist/sales/modals/refund-modal/RefundModal.d.ts +6 -2
- package/dist/sales/modals/refund-modal/RefundModal.d.ts.map +1 -1
- package/dist/sales/modals/refund-modal/RefundModal.js +8 -4
- package/dist/sales/modals/refund-modal/index.d.ts +2 -2
- package/dist/sales/modals/refund-modal/index.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts +2 -1
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +10 -4
- package/dist/styles/date-time-button/DateTimeButton.scss +1 -1
- package/dist/styles/product-set/ProductSetForm.scss +25 -2
- package/package.json +2 -2
- package/src/iframe/activity-card/ActivityCard.stories.tsx +0 -2
- package/src/iframe/activity-card/ActivityCard.tsx +0 -4
- package/src/product-set/form/ProductCategoriesControl.tsx +37 -1
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/report/ReportRunnerModal/ReportRunnerModal.tsx +1 -1
- package/src/sales/modals/refund-modal/RefundModal.tsx +15 -6
- package/src/sales/modals/refund-modal/index.ts +7 -2
- package/src/sortable-tree/SortableTreeItem.tsx +12 -1
- package/src/styles/date-time-button/DateTimeButton.scss +1 -1
- package/src/styles/product-set/ProductSetForm.scss +25 -2
- package/yarn.lock +219 -219
|
@@ -9,9 +9,18 @@ import { FaTimes } from 'react-icons/fa'
|
|
|
9
9
|
import { EXTENDED_PAYMENT_TYPE_TRANSLATION_KEYS } from '../../constants'
|
|
10
10
|
import { CurrencyNumberInput } from '../../../static/CurrencyNumberInput'
|
|
11
11
|
|
|
12
|
+
export const FULL_REFUND_TYPE = 'fullRefund'
|
|
13
|
+
export const PARTIAL_REFUND_TYPE = 'partialRefund'
|
|
14
|
+
export const NET_REFUND_TYPE = 'netRefund'
|
|
15
|
+
|
|
16
|
+
export type RefundType =
|
|
17
|
+
| typeof FULL_REFUND_TYPE
|
|
18
|
+
| typeof PARTIAL_REFUND_TYPE
|
|
19
|
+
| typeof NET_REFUND_TYPE
|
|
20
|
+
|
|
12
21
|
export interface RefundModalProps {
|
|
13
22
|
isVisible: boolean
|
|
14
|
-
|
|
23
|
+
refundType?: RefundType
|
|
15
24
|
onHide: () => void
|
|
16
25
|
onSubmit: (amount?: number) => void
|
|
17
26
|
isLoading?: boolean
|
|
@@ -29,12 +38,14 @@ export const RefundModal = ({
|
|
|
29
38
|
onHide,
|
|
30
39
|
onSubmit,
|
|
31
40
|
isLoading = false,
|
|
32
|
-
|
|
41
|
+
refundType = PARTIAL_REFUND_TYPE,
|
|
33
42
|
paymentType,
|
|
34
43
|
defaultValue = 0,
|
|
35
44
|
maxValue,
|
|
36
45
|
}: RefundModalProps) => {
|
|
37
46
|
const { t } = useTranslation(['Design', 'Validation'])
|
|
47
|
+
const isInputDisabled =
|
|
48
|
+
isLoading || refundType === 'fullRefund' || refundType === 'netRefund'
|
|
38
49
|
|
|
39
50
|
const {
|
|
40
51
|
handleSubmit,
|
|
@@ -64,9 +75,7 @@ export const RefundModal = ({
|
|
|
64
75
|
>
|
|
65
76
|
<Form onSubmit={handleSubmit(onModalSubmit)}>
|
|
66
77
|
<ModalHeader className='align-items-center border-0'>
|
|
67
|
-
<ModalTitle as='h5'>
|
|
68
|
-
{t(isFullRefund ? 'Design:fullRefund' : 'Design:partialRefund')}
|
|
69
|
-
</ModalTitle>
|
|
78
|
+
<ModalTitle as='h5'>{t(`Design:${refundType}`)}</ModalTitle>
|
|
70
79
|
|
|
71
80
|
<Button variant='danger' className='btn-sm rounded' onClick={onHide}>
|
|
72
81
|
<FaTimes size={20} />
|
|
@@ -111,7 +120,7 @@ export const RefundModal = ({
|
|
|
111
120
|
},
|
|
112
121
|
})}
|
|
113
122
|
step={0.01}
|
|
114
|
-
disabled={
|
|
123
|
+
disabled={isInputDisabled}
|
|
115
124
|
isInvalid={!!errors.amount}
|
|
116
125
|
min={0}
|
|
117
126
|
/>
|
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
export {
|
|
2
|
-
|
|
1
|
+
export {
|
|
2
|
+
RefundModal,
|
|
3
|
+
FULL_REFUND_TYPE,
|
|
4
|
+
NET_REFUND_TYPE,
|
|
5
|
+
PARTIAL_REFUND_TYPE,
|
|
6
|
+
} from './RefundModal'
|
|
7
|
+
export type { RefundModalProps, RefundType } from './RefundModal'
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {
|
|
2
|
+
ReactNode,
|
|
3
|
+
useCallback,
|
|
4
|
+
useEffect,
|
|
5
|
+
useState,
|
|
6
|
+
} from 'react'
|
|
2
7
|
import { DndContext, useDraggable } from '@dnd-kit/core'
|
|
3
8
|
import {
|
|
4
9
|
SortableContext,
|
|
@@ -33,6 +38,7 @@ export interface SortableTreeItemProps {
|
|
|
33
38
|
body: ReactNode
|
|
34
39
|
children?: ReactNode
|
|
35
40
|
preItem?: ReactNode
|
|
41
|
+
itemButton?: ReactNode
|
|
36
42
|
postItem?: ReactNode
|
|
37
43
|
sortableItems?: string[]
|
|
38
44
|
isExpanded?: boolean
|
|
@@ -82,6 +88,7 @@ export function SortableTreeItem({
|
|
|
82
88
|
secondaryBadge,
|
|
83
89
|
setIsExpanded,
|
|
84
90
|
isOverride,
|
|
91
|
+
itemButton,
|
|
85
92
|
}: SortableTreeItemProps) {
|
|
86
93
|
const [expanded, setExpanded] = useState(isExpanded)
|
|
87
94
|
const [isModalVisible, setIsModalVisible] = useState(isNewAdded)
|
|
@@ -287,9 +294,13 @@ export function SortableTreeItem({
|
|
|
287
294
|
className={clsx(
|
|
288
295
|
'sortable-tree-item-title',
|
|
289
296
|
modalLabel && 'sortable-tree-product-set-element-title',
|
|
297
|
+
'd-flex justify-content-between',
|
|
290
298
|
)}
|
|
291
299
|
>
|
|
292
300
|
{title}
|
|
301
|
+
<div className='sortable-tree-item-subtitle'>
|
|
302
|
+
{itemButton}
|
|
303
|
+
</div>
|
|
293
304
|
</span>
|
|
294
305
|
{!expanded && (
|
|
295
306
|
<span className='sortable-tree-item-subtitle'>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
.product-set-form {
|
|
2
|
+
|
|
2
3
|
input,
|
|
3
4
|
textarea,
|
|
4
5
|
select,
|
|
@@ -15,10 +16,12 @@
|
|
|
15
16
|
height: 2.5rem;
|
|
16
17
|
border-width: 2px;
|
|
17
18
|
padding: 2px;
|
|
19
|
+
|
|
18
20
|
label,
|
|
19
21
|
.btn-switch-indicator {
|
|
20
22
|
border-radius: 0.375rem !important;
|
|
21
23
|
}
|
|
24
|
+
|
|
22
25
|
label {
|
|
23
26
|
height: 2rem;
|
|
24
27
|
}
|
|
@@ -34,6 +37,7 @@
|
|
|
34
37
|
margin-top: 1.5rem;
|
|
35
38
|
margin-bottom: 1.5rem;
|
|
36
39
|
}
|
|
40
|
+
|
|
37
41
|
@include media-breakpoint-down(sm) {
|
|
38
42
|
padding: 1.5rem 1rem;
|
|
39
43
|
margin-top: 0.5rem;
|
|
@@ -59,10 +63,21 @@
|
|
|
59
63
|
background-color: #ffdbdb;
|
|
60
64
|
color: #d52902;
|
|
61
65
|
}
|
|
66
|
+
|
|
62
67
|
.category-badge {
|
|
63
68
|
background-color: #e8f4f6;
|
|
64
69
|
color: #1a93aa;
|
|
65
70
|
}
|
|
71
|
+
|
|
72
|
+
.item-icon {
|
|
73
|
+
display: flex;
|
|
74
|
+
justify-items: center;
|
|
75
|
+
align-items: center;
|
|
76
|
+
font-size: 0.65rem;
|
|
77
|
+
padding: 0.2rem;
|
|
78
|
+
margin-right: 1rem;
|
|
79
|
+
}
|
|
80
|
+
|
|
66
81
|
.product-badge {
|
|
67
82
|
background-color: #e9f5ea;
|
|
68
83
|
color: #269b36;
|
|
@@ -75,10 +90,12 @@
|
|
|
75
90
|
|
|
76
91
|
.product-set-mobile-modal {
|
|
77
92
|
margin: 0;
|
|
93
|
+
|
|
78
94
|
.modal-content {
|
|
79
95
|
border-radius: 1rem 1rem 0 0;
|
|
80
96
|
border-width: 0;
|
|
81
97
|
margin: 0;
|
|
98
|
+
|
|
82
99
|
.modal-body {
|
|
83
100
|
padding: 1rem 0;
|
|
84
101
|
}
|
|
@@ -100,18 +117,22 @@
|
|
|
100
117
|
font-weight: 600;
|
|
101
118
|
font-size: 0.625rem;
|
|
102
119
|
}
|
|
120
|
+
|
|
103
121
|
.product-set-subtitle-dot {
|
|
104
122
|
margin-right: 0.375rem;
|
|
105
123
|
width: 0.375rem;
|
|
106
124
|
height: 0.375rem;
|
|
107
125
|
border-radius: 3px;
|
|
108
126
|
}
|
|
127
|
+
|
|
109
128
|
.product-set-subtitle-category-dot {
|
|
110
129
|
background-color: #269b36;
|
|
111
130
|
}
|
|
131
|
+
|
|
112
132
|
.product-set-subtitle-step-dot {
|
|
113
133
|
background-color: #1a93aa;
|
|
114
134
|
}
|
|
135
|
+
|
|
115
136
|
.product-set-subtitle-product-dot {
|
|
116
137
|
background-color: #269b36;
|
|
117
138
|
}
|
|
@@ -156,6 +177,7 @@
|
|
|
156
177
|
justify-self: flex-end;
|
|
157
178
|
align-items: flex-end;
|
|
158
179
|
}
|
|
180
|
+
|
|
159
181
|
.small-badge {
|
|
160
182
|
font-size: 0.5rem;
|
|
161
183
|
height: 1rem;
|
|
@@ -163,6 +185,7 @@
|
|
|
163
185
|
padding: 0 0.2rem;
|
|
164
186
|
margin-bottom: 0.2rem;
|
|
165
187
|
}
|
|
188
|
+
|
|
166
189
|
.product-set-save-btn-wrapper {
|
|
167
190
|
padding-left: 0 !important;
|
|
168
191
|
display: flex;
|
|
@@ -177,8 +200,8 @@
|
|
|
177
200
|
|
|
178
201
|
.sortable-tree-item-toggle {
|
|
179
202
|
.product-zone-badge {
|
|
180
|
-
background-color: #
|
|
181
|
-
color: #
|
|
203
|
+
background-color: #EFE9F5;
|
|
204
|
+
color: #84269B;
|
|
182
205
|
font-size: 0.875rem;
|
|
183
206
|
font-weight: 600;
|
|
184
207
|
}
|