@licklist/design 0.68.2-dev.3 → 0.68.4
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/affiliate/form/AffiliateForm.d.ts.map +1 -1
- package/dist/assets/iframe/selectArrow.svg.js +17 -0
- package/dist/auth/Login/LoginComponent.js +1 -2
- package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +40 -35
- package/dist/events/edit-event-modal/IntervalInput.d.ts.map +1 -1
- package/dist/events/edit-event-modal/IntervalInput.js +1 -7
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -0
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +23 -24
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/utils/getDefaultProductSet.js +1 -0
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +0 -2
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/layout/DropDown.d.ts +1 -2
- package/dist/layout/DropDown.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.d.ts +1 -3
- package/dist/modals/confirmation/ConfirmModal.d.ts.map +1 -1
- package/dist/modals/confirmation/ConfirmModal.js +8 -172
- package/dist/product-set/card/ProductSetCard.d.ts +2 -6
- package/dist/product-set/card/ProductSetCard.d.ts.map +1 -1
- package/dist/product-set/card/ProductSetCard.js +11 -30
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/control/DateInput.js +2 -2
- package/dist/product-set/form/ProductCategoriesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductCategoriesControl.js +2 -48
- package/dist/product-set/form/ProductSetForm.d.ts +1 -4
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.js +1 -59
- package/dist/product-set/form/ProductZonesControl.d.ts.map +1 -1
- package/dist/product-set/form/ProductZonesControl.js +2 -0
- package/dist/product-set/form/SelectCategoryModal.d.ts +0 -12
- package/dist/product-set/form/SelectCategoryModal.d.ts.map +1 -1
- package/dist/product-set/form/SelectCategoryModal.js +1 -1
- package/dist/product-set/form/SubProductsControl.d.ts.map +1 -1
- package/dist/product-set/form/SubProductsControl.js +3 -0
- package/dist/product-set/form/VenueMapsControl.d.ts.map +1 -1
- package/dist/product-set/form/VenueMapsControl.js +3 -0
- package/dist/product-set/form/index.d.ts +0 -1
- package/dist/product-set/form/index.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/utils/index.d.ts +0 -7
- package/dist/product-set/utils/index.d.ts.map +1 -1
- package/dist/product-set/utils/index.js +1 -10
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +2 -0
- package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
- package/dist/snippet/snippet-template/preview/Preview.js +0 -6
- package/dist/sortable-tree/SortableTreeItem.d.ts +1 -2
- package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
- package/dist/sortable-tree/SortableTreeItem.js +4 -10
- package/dist/styles/iframe-events/Calendar.scss +1 -0
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/dist/styles/product-set/ProductSetForm.scss +0 -22
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.d.ts +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.d.ts.map +1 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/utils.js +1 -3
- package/dist/typeahead/Typeahead.d.ts +1 -5
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +2 -9
- package/package.json +7 -9
- package/src/affiliate/form/AffiliateForm.tsx +0 -1
- package/src/auth/Login/LoginComponent.tsx +1 -1
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +28 -29
- package/src/events/edit-event-modal/IntervalInput.tsx +1 -8
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +1 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +85 -82
- package/src/events/edit-event-modal/utils/getDefaultProductSet.ts +1 -0
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +0 -1
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +0 -1
- package/src/layout/DropDown.tsx +1 -2
- package/src/modals/confirmation/ConfirmModal.tsx +3 -19
- package/src/product-set/card/ProductSetCard.tsx +8 -47
- package/src/product-set/control/DateInput.tsx +1 -2
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -37
- package/src/product-set/form/ProductSetForm.tsx +2 -17
- package/src/product-set/form/ProductZonesControl.tsx +4 -1
- package/src/product-set/form/SelectCategoryModal.tsx +2 -2
- package/src/product-set/form/SubProductsControl.tsx +3 -0
- package/src/product-set/form/VenueMapsControl.tsx +3 -0
- package/src/product-set/form/index.ts +0 -1
- package/src/product-set/product/ProductControl.tsx +1 -0
- package/src/product-set/product/advanced-options/AdvancedOptions.tsx +1 -1
- package/src/product-set/product-zone/ProductZoneControl.tsx +1 -1
- package/src/product-set/utils/index.ts +0 -11
- package/src/sales/booking/results/components/ResultCard.tsx +2 -0
- package/src/snippet/snippet-template/preview/Preview.tsx +0 -6
- package/src/sortable-tree/SortableTreeItem.tsx +0 -6
- package/src/styles/iframe-events/Calendar.scss +1 -0
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +2 -2
- package/src/styles/product-set/ProductSetForm.scss +0 -22
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/tiptap-editor/TipTapMenu/extensions/utils.ts +1 -4
- package/src/typeahead/Typeahead.tsx +1 -15
- package/yarn.lock +14 -40
- package/dist/product-set/form/ProductSetNameControl.d.ts +0 -6
- package/dist/product-set/form/ProductSetNameControl.d.ts.map +0 -1
- package/dist/product-set/form/ProductSetNameControl.js +0 -35
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts +0 -2
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.d.ts.map +0 -1
- package/dist/tiptap-editor/TipTapMenu/extensions/constants.js +0 -3
- package/src/product-set/form/ProductSetNameControl.tsx +0 -27
- package/src/tiptap-editor/TipTapMenu/extensions/constants.ts +0 -1
|
@@ -240,7 +240,7 @@ var ProductSetModalClasses = {
|
|
|
240
240
|
productZones: 'edit-product-zone'
|
|
241
241
|
};
|
|
242
242
|
function SortableTreeItem(param) {
|
|
243
|
-
var id = param.id, title = param.title, badge = param.badge, subTitle = param.subTitle, body = param.body, children = param.children, preItem = param.preItem, postItem = param.postItem, sortableItems = param.sortableItems, _param_isExpanded = param.isExpanded, isExpanded = _param_isExpanded === void 0 ? false : _param_isExpanded, _param_shouldExpand = param.shouldExpand, shouldExpand = _param_shouldExpand === void 0 ? true : _param_shouldExpand, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isIconInHeader = param.isIconInHeader, isIconInHeader = _param_isIconInHeader === void 0 ? true : _param_isIconInHeader, _param_treeLineIconColor = param.treeLineIconColor, treeLineIconColor = _param_treeLineIconColor === void 0 ? '' : _param_treeLineIconColor, _param_modalLabel = param.modalLabel, modalLabel = _param_modalLabel === void 0 ? '' : _param_modalLabel, modalClass = param.modalClass, _param_isNewAdded = param.isNewAdded, isNewAdded = _param_isNewAdded === void 0 ? false : _param_isNewAdded, onDelete = param.onDelete, validate = param.validate, cancelChanges = param.cancelChanges, saveValidField = param.saveValidField, edit = param.edit, secondaryBadge = param.secondaryBadge, setIsExpanded = param.setIsExpanded, isOverride = param.isOverride
|
|
243
|
+
var id = param.id, title = param.title, badge = param.badge, subTitle = param.subTitle, body = param.body, children = param.children, preItem = param.preItem, postItem = param.postItem, sortableItems = param.sortableItems, _param_isExpanded = param.isExpanded, isExpanded = _param_isExpanded === void 0 ? false : _param_isExpanded, _param_shouldExpand = param.shouldExpand, shouldExpand = _param_shouldExpand === void 0 ? true : _param_shouldExpand, _param_isInvalid = param.isInvalid, isInvalid = _param_isInvalid === void 0 ? false : _param_isInvalid, _param_isIconInHeader = param.isIconInHeader, isIconInHeader = _param_isIconInHeader === void 0 ? true : _param_isIconInHeader, _param_treeLineIconColor = param.treeLineIconColor, treeLineIconColor = _param_treeLineIconColor === void 0 ? '' : _param_treeLineIconColor, _param_modalLabel = param.modalLabel, modalLabel = _param_modalLabel === void 0 ? '' : _param_modalLabel, modalClass = param.modalClass, _param_isNewAdded = param.isNewAdded, isNewAdded = _param_isNewAdded === void 0 ? false : _param_isNewAdded, onDelete = param.onDelete, validate = param.validate, cancelChanges = param.cancelChanges, saveValidField = param.saveValidField, edit = param.edit, secondaryBadge = param.secondaryBadge, setIsExpanded = param.setIsExpanded, isOverride = param.isOverride;
|
|
244
244
|
var _useState = _sliced_to_array(useState(isExpanded), 2), expanded = _useState[0], setExpanded = _useState[1];
|
|
245
245
|
var _useState1 = _sliced_to_array(useState(isNewAdded), 2), isModalVisible = _useState1[0], setIsModalVisible = _useState1[1];
|
|
246
246
|
var t = useTranslation('Design').t;
|
|
@@ -433,15 +433,9 @@ function SortableTreeItem(param) {
|
|
|
433
433
|
/*#__PURE__*/ jsxs("div", {
|
|
434
434
|
className: clsx(modalLabel ? 'sortable-tree-product-set-title-container' : 'sortable-tree-title-container'),
|
|
435
435
|
children: [
|
|
436
|
-
/*#__PURE__*/
|
|
437
|
-
className: clsx('sortable-tree-item-title', modalLabel && 'sortable-tree-product-set-element-title'
|
|
438
|
-
children:
|
|
439
|
-
title,
|
|
440
|
-
/*#__PURE__*/ jsx("div", {
|
|
441
|
-
className: "sortable-tree-item-subtitle",
|
|
442
|
-
children: itemButton
|
|
443
|
-
})
|
|
444
|
-
]
|
|
436
|
+
/*#__PURE__*/ jsx("span", {
|
|
437
|
+
className: clsx('sortable-tree-item-title', modalLabel && 'sortable-tree-product-set-element-title'),
|
|
438
|
+
children: title
|
|
445
439
|
}),
|
|
446
440
|
!expanded && /*#__PURE__*/ jsx("span", {
|
|
447
441
|
className: "sortable-tree-item-subtitle",
|
|
@@ -15,7 +15,7 @@ body[bkdt-scrollable='false'] .bkdt-mask {
|
|
|
15
15
|
left: 0;
|
|
16
16
|
width: 100%;
|
|
17
17
|
height: 100%;
|
|
18
|
-
z-index:
|
|
18
|
+
z-index: 1000000;
|
|
19
19
|
background-color: rgba(0, 0, 0, 0.5);
|
|
20
20
|
display: none;
|
|
21
21
|
}
|
|
@@ -24,7 +24,7 @@ body[bkdt-scrollable='false'] .bkdt-mask {
|
|
|
24
24
|
position: fixed;
|
|
25
25
|
top: 0;
|
|
26
26
|
left: 0;
|
|
27
|
-
z-index:
|
|
27
|
+
z-index: 1000001;
|
|
28
28
|
display: none;
|
|
29
29
|
width: 100%;
|
|
30
30
|
height: 100%;
|
|
@@ -15,12 +15,10 @@
|
|
|
15
15
|
height: 2.5rem;
|
|
16
16
|
border-width: 2px;
|
|
17
17
|
padding: 2px;
|
|
18
|
-
|
|
19
18
|
label,
|
|
20
19
|
.btn-switch-indicator {
|
|
21
20
|
border-radius: 0.375rem !important;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
label {
|
|
25
23
|
height: 2rem;
|
|
26
24
|
}
|
|
@@ -36,7 +34,6 @@
|
|
|
36
34
|
margin-top: 1.5rem;
|
|
37
35
|
margin-bottom: 1.5rem;
|
|
38
36
|
}
|
|
39
|
-
|
|
40
37
|
@include media-breakpoint-down(sm) {
|
|
41
38
|
padding: 1.5rem 1rem;
|
|
42
39
|
margin-top: 0.5rem;
|
|
@@ -62,21 +59,10 @@
|
|
|
62
59
|
background-color: #ffdbdb;
|
|
63
60
|
color: #d52902;
|
|
64
61
|
}
|
|
65
|
-
|
|
66
62
|
.category-badge {
|
|
67
63
|
background-color: #e8f4f6;
|
|
68
64
|
color: #1a93aa;
|
|
69
65
|
}
|
|
70
|
-
|
|
71
|
-
.item-icon {
|
|
72
|
-
display: flex;
|
|
73
|
-
justify-items: center;
|
|
74
|
-
align-items: center;
|
|
75
|
-
font-size: 0.65rem;
|
|
76
|
-
padding: 0.2rem;
|
|
77
|
-
margin-right: 1rem;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
66
|
.product-badge {
|
|
81
67
|
background-color: #e9f5ea;
|
|
82
68
|
color: #269b36;
|
|
@@ -89,12 +75,10 @@
|
|
|
89
75
|
|
|
90
76
|
.product-set-mobile-modal {
|
|
91
77
|
margin: 0;
|
|
92
|
-
|
|
93
78
|
.modal-content {
|
|
94
79
|
border-radius: 1rem 1rem 0 0;
|
|
95
80
|
border-width: 0;
|
|
96
81
|
margin: 0;
|
|
97
|
-
|
|
98
82
|
.modal-body {
|
|
99
83
|
padding: 1rem 0;
|
|
100
84
|
}
|
|
@@ -116,22 +100,18 @@
|
|
|
116
100
|
font-weight: 600;
|
|
117
101
|
font-size: 0.625rem;
|
|
118
102
|
}
|
|
119
|
-
|
|
120
103
|
.product-set-subtitle-dot {
|
|
121
104
|
margin-right: 0.375rem;
|
|
122
105
|
width: 0.375rem;
|
|
123
106
|
height: 0.375rem;
|
|
124
107
|
border-radius: 3px;
|
|
125
108
|
}
|
|
126
|
-
|
|
127
109
|
.product-set-subtitle-category-dot {
|
|
128
110
|
background-color: #269b36;
|
|
129
111
|
}
|
|
130
|
-
|
|
131
112
|
.product-set-subtitle-step-dot {
|
|
132
113
|
background-color: #1a93aa;
|
|
133
114
|
}
|
|
134
|
-
|
|
135
115
|
.product-set-subtitle-product-dot {
|
|
136
116
|
background-color: #269b36;
|
|
137
117
|
}
|
|
@@ -176,7 +156,6 @@
|
|
|
176
156
|
justify-self: flex-end;
|
|
177
157
|
align-items: flex-end;
|
|
178
158
|
}
|
|
179
|
-
|
|
180
159
|
.small-badge {
|
|
181
160
|
font-size: 0.5rem;
|
|
182
161
|
height: 1rem;
|
|
@@ -184,7 +163,6 @@
|
|
|
184
163
|
padding: 0 0.2rem;
|
|
185
164
|
margin-bottom: 0.2rem;
|
|
186
165
|
}
|
|
187
|
-
|
|
188
166
|
.product-set-save-btn-wrapper {
|
|
189
167
|
padding-left: 0 !important;
|
|
190
168
|
display: flex;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/tiptap-editor/TipTapMenu/extensions/utils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/tiptap-editor/TipTapMenu/extensions/utils.ts"],"names":[],"mappings":"AAEA,iBAAS,YAAY,CAAC,KAAK,EAAE,MAAM;;;;;EASlC;AAED,OAAO,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { parse } from 'twemoji-parser';
|
|
2
|
-
import { EMOJI_URL } from './constants.js';
|
|
3
2
|
|
|
4
3
|
function _array_like_to_array(arr, len) {
|
|
5
4
|
if (len == null || len > arr.length) len = arr.length;
|
|
@@ -49,9 +48,8 @@ function _unsupported_iterable_to_array(o, minLen) {
|
|
|
49
48
|
}
|
|
50
49
|
function parseTwemoji(emoji) {
|
|
51
50
|
var _parse = _sliced_to_array(parse(emoji), 1), twemoji = _parse[0];
|
|
52
|
-
var emojiPathUrl = EMOJI_URL.concat(twemoji.url.split("/").slice(-1));
|
|
53
51
|
return {
|
|
54
|
-
src:
|
|
52
|
+
src: twemoji.url,
|
|
55
53
|
alt: twemoji.text,
|
|
56
54
|
class: 'emoji',
|
|
57
55
|
draggable: 'false'
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { CSSObjectWithLabel } from 'react-select';
|
|
2
1
|
export type TypeaheadOptions = {
|
|
3
2
|
id: number | string;
|
|
4
3
|
value: any;
|
|
@@ -9,14 +8,11 @@ export interface TypeaheadProps {
|
|
|
9
8
|
placeholder: string;
|
|
10
9
|
isRequired?: boolean;
|
|
11
10
|
name: string;
|
|
12
|
-
value?: TypeaheadOptions;
|
|
13
11
|
isMultipleChoise?: boolean;
|
|
14
12
|
noOptionsMessage: string;
|
|
15
13
|
isInvalid?: boolean;
|
|
16
14
|
isCouponForm?: boolean;
|
|
17
|
-
containerStyles?: CSSObjectWithLabel;
|
|
18
|
-
onChangeValue?: (value: TypeaheadOptions) => void;
|
|
19
15
|
}
|
|
20
|
-
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name,
|
|
16
|
+
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, isCouponForm, noOptionsMessage, isInvalid, }: TypeaheadProps): import("react/jsx-runtime").JSX.Element;
|
|
21
17
|
export { Typeahead };
|
|
22
18
|
//# sourceMappingURL=Typeahead.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":"AAGA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAA;IACnB,KAAK,EAAE,GAAG,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;CACd,CAAA;AAED,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,IAAI,EAAE,MAAM,CAAA;IACZ,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,YAAY,CAAC,EAAE,OAAO,CAAA;CACvB;AAED,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,gBAAgB,EAChB,IAAS,EACT,YAAoB,EACpB,gBAAqB,EACrB,SAAS,GACV,EAAE,cAAc,2CA4ChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
|
@@ -31,7 +31,7 @@ function _object_spread(target) {
|
|
|
31
31
|
return target;
|
|
32
32
|
}
|
|
33
33
|
function Typeahead(param) {
|
|
34
|
-
var options = param.options, placeholder = param.placeholder, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, isMultipleChoise = param.isMultipleChoise, _param_name = param.name, name = _param_name === void 0 ? '' : _param_name,
|
|
34
|
+
var options = param.options, placeholder = param.placeholder, _param_isRequired = param.isRequired, isRequired = _param_isRequired === void 0 ? false : _param_isRequired, isMultipleChoise = param.isMultipleChoise, _param_name = param.name, name = _param_name === void 0 ? '' : _param_name, _param_isCouponForm = param.isCouponForm, isCouponForm = _param_isCouponForm === void 0 ? false : _param_isCouponForm, _param_noOptionsMessage = param.noOptionsMessage, noOptionsMessage = _param_noOptionsMessage === void 0 ? '' : _param_noOptionsMessage, isInvalid = param.isInvalid;
|
|
35
35
|
var control = useFormContext().control;
|
|
36
36
|
var getStyle = function() {
|
|
37
37
|
var couponFormStyle = isCouponForm ? {
|
|
@@ -53,21 +53,14 @@ function Typeahead(param) {
|
|
|
53
53
|
var field = param.field;
|
|
54
54
|
return /*#__PURE__*/ jsx(Select, {
|
|
55
55
|
placeholder: placeholder,
|
|
56
|
-
value:
|
|
56
|
+
value: field.value,
|
|
57
57
|
isMulti: isMultipleChoise,
|
|
58
58
|
styles: {
|
|
59
|
-
container: function(base) {
|
|
60
|
-
return _object_spread({}, base, containerStyles);
|
|
61
|
-
},
|
|
62
59
|
control: function(base) {
|
|
63
60
|
return _object_spread({}, base, getStyle());
|
|
64
61
|
}
|
|
65
62
|
},
|
|
66
63
|
onChange: function(value) {
|
|
67
|
-
if (onChangeValue) {
|
|
68
|
-
onChangeValue(value);
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
64
|
field.onChange(value);
|
|
72
65
|
},
|
|
73
66
|
options: options,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.68.
|
|
3
|
+
"version": "0.68.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
|
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
]
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"@licklist/core": "0.30.
|
|
45
|
+
"@licklist/core": "0.30.1",
|
|
46
46
|
"@licklist/eslint-config": "0.5.6",
|
|
47
|
-
"@licklist/plugins": "0.33.
|
|
47
|
+
"@licklist/plugins": "0.33.1",
|
|
48
48
|
"lodash": "4.17.21",
|
|
49
49
|
"luxon": "3.5.0",
|
|
50
50
|
"react": "17.0.2",
|
|
@@ -61,9 +61,9 @@
|
|
|
61
61
|
"@dnd-kit/utilities": "2.0.0",
|
|
62
62
|
"@fortawesome/fontawesome-svg-core": "1.2.34",
|
|
63
63
|
"@fortawesome/free-solid-svg-icons": "5.15.2",
|
|
64
|
-
"@licklist/core": "0.30.
|
|
64
|
+
"@licklist/core": "0.30.1",
|
|
65
65
|
"@licklist/eslint-config": "0.5.6",
|
|
66
|
-
"@licklist/plugins": "0.33.
|
|
66
|
+
"@licklist/plugins": "0.33.1",
|
|
67
67
|
"@mdx-js/react": "1.6.22",
|
|
68
68
|
"@popperjs/core": "2.11.8",
|
|
69
69
|
"@react-aria/utils": "3.9.0",
|
|
@@ -193,10 +193,8 @@
|
|
|
193
193
|
"yarn tsc"
|
|
194
194
|
]
|
|
195
195
|
},
|
|
196
|
-
"packageManager": "yarn@4.4.0",
|
|
197
196
|
"volta": {
|
|
198
197
|
"node": "20.9.0",
|
|
199
198
|
"yarn": "4.4.0"
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
@@ -76,7 +76,6 @@ export const AffiliateForm = ({
|
|
|
76
76
|
const copyToClipboard = () =>
|
|
77
77
|
// eslint-disable-next-line consistent-return
|
|
78
78
|
window.navigator.clipboard.writeText(formValues.link)
|
|
79
|
-
|
|
80
79
|
return (
|
|
81
80
|
<FormProvider {...form}>
|
|
82
81
|
<Form onSubmit={form.handleSubmit(handleSubmit)}>
|
|
@@ -2,7 +2,7 @@ import { useCallback, useMemo } from 'react'
|
|
|
2
2
|
import { Button } from 'react-bootstrap'
|
|
3
3
|
import { useTranslation } from 'react-i18next'
|
|
4
4
|
import { range } from 'lodash'
|
|
5
|
-
import {
|
|
5
|
+
import { ReactComponent as SelectArrow } from '../../../assets/iframe/selectArrow.svg'
|
|
6
6
|
import { CalendarSelect } from '../CalendarSelect'
|
|
7
7
|
import { CalendarProps } from '../../Calendar'
|
|
8
8
|
|
|
@@ -26,21 +26,15 @@ export const CalendarButtons = ({
|
|
|
26
26
|
}: CalendarButtonsProps) => {
|
|
27
27
|
const { t } = useTranslation('Design')
|
|
28
28
|
|
|
29
|
-
const
|
|
30
|
-
(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
if (nextDateTime <= initialDate) {
|
|
35
|
-
setCurrentDate(initialDate)
|
|
36
|
-
return
|
|
37
|
-
}
|
|
29
|
+
const onSelectNextMonth = useCallback(() => {
|
|
30
|
+
setCurrentDate((prevDate) => prevDate.plus({ months: 1 }))
|
|
31
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
32
|
+
}, [])
|
|
38
33
|
|
|
39
|
-
|
|
40
|
-
}
|
|
34
|
+
const onSelectPreviousMonth = useCallback(() => {
|
|
35
|
+
setCurrentDate((prevDate) => prevDate.minus({ month: 1 }))
|
|
41
36
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
42
|
-
|
|
43
|
-
)
|
|
37
|
+
}, [])
|
|
44
38
|
|
|
45
39
|
const yearOptions = useMemo(
|
|
46
40
|
() =>
|
|
@@ -51,16 +45,10 @@ export const CalendarButtons = ({
|
|
|
51
45
|
[initialDate],
|
|
52
46
|
)
|
|
53
47
|
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
label: DateTime.fromObject({ month: monthNumber }).toLocaleString({
|
|
59
|
-
month: 'long',
|
|
60
|
-
}),
|
|
61
|
-
value: monthNumber,
|
|
62
|
-
}))
|
|
63
|
-
}, [initialDate, currentDate])
|
|
48
|
+
const canMoveBack = useMemo(
|
|
49
|
+
() => currentDate > initialDate,
|
|
50
|
+
[currentDate, initialDate],
|
|
51
|
+
)
|
|
64
52
|
|
|
65
53
|
const onSelectYear = (value: string) => {
|
|
66
54
|
const selectedYear = Number(value)
|
|
@@ -122,11 +110,22 @@ export const CalendarButtons = ({
|
|
|
122
110
|
<hr />
|
|
123
111
|
<div className="calendar-buttons">
|
|
124
112
|
<div className="buttons-wrapper">
|
|
125
|
-
<
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
113
|
+
<Button
|
|
114
|
+
className="calendar-button left-button"
|
|
115
|
+
onClick={onSelectPreviousMonth}
|
|
116
|
+
disabled={!canMoveBack}
|
|
117
|
+
variant="link"
|
|
118
|
+
>
|
|
119
|
+
<SelectArrow />
|
|
120
|
+
</Button>
|
|
121
|
+
<div className="month-title">{currentDate.toFormat('MMMM')}</div>
|
|
122
|
+
<Button
|
|
123
|
+
className="calendar-button"
|
|
124
|
+
onClick={onSelectNextMonth}
|
|
125
|
+
variant="link"
|
|
126
|
+
>
|
|
127
|
+
<SelectArrow />
|
|
128
|
+
</Button>
|
|
130
129
|
</div>
|
|
131
130
|
<CalendarSelect
|
|
132
131
|
options={yearOptions}
|
|
@@ -89,13 +89,6 @@ export function IntervalInput({
|
|
|
89
89
|
trigger('end')
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
const onChangeRecurrent = (checked: boolean) => {
|
|
93
|
-
setRecurrent(checked)
|
|
94
|
-
if (!checked) {
|
|
95
|
-
setValue('rrule', null)
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
92
|
return (
|
|
100
93
|
<>
|
|
101
94
|
<Form.Row className="interval-container">
|
|
@@ -151,7 +144,7 @@ export function IntervalInput({
|
|
|
151
144
|
custom
|
|
152
145
|
checked={recurrent}
|
|
153
146
|
onChange={({ target: { checked } }) => {
|
|
154
|
-
|
|
147
|
+
setRecurrent(checked)
|
|
155
148
|
}}
|
|
156
149
|
disabled={disabled || Boolean(editedProductSet)}
|
|
157
150
|
/>
|
package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx
CHANGED
|
@@ -5,11 +5,9 @@ import { useId } from '@react-aria/utils'
|
|
|
5
5
|
import { Controller, useFormContext } from 'react-hook-form'
|
|
6
6
|
import { HasPermissionProp } from '@licklist/plugins/dist/types/permission/Permission'
|
|
7
7
|
import { ProductSet } from '@licklist/core/dist/DataMapper/Product/ProductSetDataMapper'
|
|
8
|
-
import { getTypeHeadItemsFromMenus } from '../../../../product-set/utils'
|
|
9
8
|
import { ConfirmModal } from '../../../../modals/confirmation/ConfirmModal'
|
|
10
9
|
import { EditEventFormValues } from '../EditEventForm/EditEventForm'
|
|
11
10
|
import { EditEventProductSet } from './component/EditEventProductSet'
|
|
12
|
-
import { Typeahead } from '../../../../typeahead'
|
|
13
11
|
|
|
14
12
|
interface SelectEventProductSetProps extends HasPermissionProp {
|
|
15
13
|
productSets?: ProductSet[]
|
|
@@ -44,21 +42,6 @@ export const SelectEventProductSet = ({
|
|
|
44
42
|
const productSetId = watch('productSetId')
|
|
45
43
|
const editedProductSet = watch('editedProductSet')
|
|
46
44
|
|
|
47
|
-
const typeheadValues = getTypeHeadItemsFromMenus(
|
|
48
|
-
editedProductSet
|
|
49
|
-
? productSets.map((productSet) => {
|
|
50
|
-
if (productSet.id === editedProductSet.id) {
|
|
51
|
-
return editedProductSet
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
return productSet
|
|
55
|
-
})
|
|
56
|
-
: productSets,
|
|
57
|
-
)
|
|
58
|
-
const selectedProductSetTypeheadValue = productSetId
|
|
59
|
-
? typeheadValues?.find((typeheadValue) => typeheadValue.id === productSetId)
|
|
60
|
-
: undefined
|
|
61
|
-
|
|
62
45
|
const onEditProductSet = useCallback(
|
|
63
46
|
() => {
|
|
64
47
|
setEditProductSetId(String(productSetId))
|
|
@@ -112,7 +95,6 @@ export const SelectEventProductSet = ({
|
|
|
112
95
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
113
96
|
const onSubmit = (value: EditEventFormValues['editedProductSet']) => {
|
|
114
97
|
setShowEditProductSet(false)
|
|
115
|
-
setValue('productSetId', value.id)
|
|
116
98
|
setValue('editedProductSet', value)
|
|
117
99
|
}
|
|
118
100
|
|
|
@@ -128,72 +110,93 @@ export const SelectEventProductSet = ({
|
|
|
128
110
|
<Controller
|
|
129
111
|
control={control}
|
|
130
112
|
name="productSetId"
|
|
131
|
-
render={() =>
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
113
|
+
render={({ field }) => {
|
|
114
|
+
const fieldValue = String(field.value)
|
|
115
|
+
return (
|
|
116
|
+
<>
|
|
117
|
+
<div className="d-flex align-items-center flex-row w-100">
|
|
118
|
+
<ConfirmModal>
|
|
119
|
+
{(confirm) => (
|
|
120
|
+
<Form.Control
|
|
121
|
+
as="select"
|
|
122
|
+
onChange={(e) =>
|
|
123
|
+
onChangeProductSet(Number(e.target.value), confirm)
|
|
124
|
+
}
|
|
125
|
+
isInvalid={Boolean(errors.productSetId)}
|
|
126
|
+
value={fieldValue}
|
|
127
|
+
>
|
|
128
|
+
<option value="" hidden>
|
|
129
|
+
{t('Design:chooseProductSet')}
|
|
130
|
+
</option>
|
|
131
|
+
{productSets?.map((productSet) => {
|
|
132
|
+
const isCurrentEditedProductSet =
|
|
133
|
+
editedProductSet &&
|
|
134
|
+
editedProductSet?.id === productSet?.id
|
|
135
|
+
return (
|
|
136
|
+
<option key={productSet.id} value={productSet.id}>
|
|
137
|
+
{isCurrentEditedProductSet ||
|
|
138
|
+
productSet.isOverride
|
|
139
|
+
? `[${t('edited')}] ${
|
|
140
|
+
isCurrentEditedProductSet
|
|
141
|
+
? editedProductSet?.name
|
|
142
|
+
: productSet.name
|
|
143
|
+
}`
|
|
144
|
+
: productSet.name}
|
|
145
|
+
</option>
|
|
146
|
+
)
|
|
147
|
+
})}
|
|
148
|
+
</Form.Control>
|
|
149
|
+
)}
|
|
150
|
+
</ConfirmModal>
|
|
151
|
+
|
|
152
|
+
<div className="buttons-container">
|
|
153
|
+
{!showEditProductSet && !editedProductSet && (
|
|
154
|
+
<Button
|
|
155
|
+
variant=""
|
|
156
|
+
className="btn product-set-button mr-4"
|
|
157
|
+
onClick={handleCreateProductSet}
|
|
158
|
+
>
|
|
159
|
+
{t('addNewProductSet')}
|
|
160
|
+
</Button>
|
|
161
|
+
)}
|
|
162
|
+
{showOverrideProductSet && (
|
|
163
|
+
<Button
|
|
164
|
+
variant=""
|
|
165
|
+
className="btn product-set-button "
|
|
166
|
+
onClick={onEditProductSet}
|
|
167
|
+
>
|
|
168
|
+
{isOverrideProductSet
|
|
169
|
+
? t('editOverrides')
|
|
170
|
+
: t('editProductSet')}
|
|
171
|
+
</Button>
|
|
172
|
+
)}
|
|
173
|
+
{showEditProductSet && (
|
|
174
|
+
<Button
|
|
175
|
+
variant=""
|
|
176
|
+
className="btn product-set-button"
|
|
177
|
+
onClick={revertEditProductSet}
|
|
178
|
+
>
|
|
179
|
+
{t('cancelAndRevert')}
|
|
180
|
+
</Button>
|
|
181
|
+
)}
|
|
182
|
+
{!showEditProductSet && editedProductSet && (
|
|
183
|
+
<Button
|
|
184
|
+
variant=""
|
|
185
|
+
className="btn product-set-button ml-4 text-danger"
|
|
186
|
+
onClick={revertEditProductSet}
|
|
187
|
+
>
|
|
188
|
+
{t('undoChanges')}
|
|
189
|
+
</Button>
|
|
190
|
+
)}
|
|
191
|
+
</div>
|
|
189
192
|
</div>
|
|
190
|
-
</div>
|
|
191
193
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
194
|
+
<Form.Control.Feedback type="invalid">
|
|
195
|
+
{errors?.productSetId?.message}
|
|
196
|
+
</Form.Control.Feedback>
|
|
197
|
+
</>
|
|
198
|
+
)
|
|
199
|
+
}}
|
|
197
200
|
/>
|
|
198
201
|
</Form.Group>
|
|
199
202
|
</div>
|