@licklist/design 0.72.0-dev.0 → 0.72.0-dev.1
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/events/event-card/EventCard.d.ts +2 -1
- package/dist/events/event-card/EventCard.d.ts.map +1 -1
- package/dist/events/event-card/EventCard.js +11 -2
- package/dist/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.js +2 -2
- package/dist/product-set/form/ProductsControl.js +1 -1
- package/dist/recurrence-input/RecurrenceInput.d.ts.map +1 -1
- package/dist/recurrence-input/RecurrenceInput.js +2 -2
- package/package.json +1 -1
- package/src/events/event-card/EventCard.tsx +15 -4
- package/src/iframe/order-process/components/BookingSummary/components/ProductSummary/ProductSummary.tsx +2 -2
- package/src/product-set/form/ProductsControl.tsx +1 -1
- package/src/recurrence-input/RecurrenceInput.tsx +1 -0
- package/yarn.lock +3 -3
|
@@ -16,6 +16,7 @@ export interface EventCardProps extends HasPermissionProp {
|
|
|
16
16
|
titleId?: string;
|
|
17
17
|
descriptionId?: string;
|
|
18
18
|
productSetName?: string;
|
|
19
|
+
eventID?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare function EventCard({ name, description, date, imageUrl, sales, onPreview, onEdit, onCopy, onRemove, hasPermission, productSetName, onStatistic, eventStatistic, titleId, descriptionId, }: EventCardProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare function EventCard({ name, description, date, imageUrl, sales, onPreview, onEdit, onCopy, onRemove, hasPermission, productSetName, onStatistic, eventStatistic, titleId, descriptionId, eventID, }: EventCardProps): import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
//# sourceMappingURL=EventCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventCard.d.ts","sourceRoot":"","sources":["../../../src/events/event-card/EventCard.tsx"],"names":[],"mappings":"AAYA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,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,EAAE,MAAM,IAAI,CAAA;IACpB,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,WAAW,EACX,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,QAAQ,EACR,aAAoB,EACpB,cAAc,EACd,WAAW,EACX,cAAc,EACd,OAAO,EACP,aAAa,EACb,OAAO,GACR,EAAE,cAAc,2CA0JhB"}
|
|
@@ -38,7 +38,7 @@ function _object_without_properties_loose(source, excluded) {
|
|
|
38
38
|
return target;
|
|
39
39
|
}
|
|
40
40
|
function EventCard(param) {
|
|
41
|
-
var name = param.name, description = param.description, date = param.date, imageUrl = param.imageUrl, sales = param.sales, onPreview = param.onPreview, onEdit = param.onEdit, onCopy = param.onCopy, onRemove = param.onRemove, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, productSetName = param.productSetName, onStatistic = param.onStatistic, eventStatistic = param.eventStatistic, titleId = param.titleId, descriptionId = param.descriptionId;
|
|
41
|
+
var name = param.name, description = param.description, date = param.date, imageUrl = param.imageUrl, sales = param.sales, onPreview = param.onPreview, onEdit = param.onEdit, onCopy = param.onCopy, onRemove = param.onRemove, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, productSetName = param.productSetName, onStatistic = param.onStatistic, eventStatistic = param.eventStatistic, titleId = param.titleId, descriptionId = param.descriptionId, eventID = param.eventID;
|
|
42
42
|
var t = useTranslation('Design').t;
|
|
43
43
|
var _useIntl = useIntl(), formatNumber = _useIntl.formatNumber, formatDate = _useIntl.formatDate;
|
|
44
44
|
var _getStatisticInfo = getStatisticInfo(eventStatistic, date), totalViews = _getStatisticInfo.totalViews, statistics = _object_without_properties(_getStatisticInfo, [
|
|
@@ -79,7 +79,16 @@ function EventCard(param) {
|
|
|
79
79
|
children: [
|
|
80
80
|
/*#__PURE__*/ jsx(Card.Title, {
|
|
81
81
|
id: titleId,
|
|
82
|
-
children:
|
|
82
|
+
children: eventID ? /*#__PURE__*/ jsxs("div", {
|
|
83
|
+
className: "d-flex",
|
|
84
|
+
children: [
|
|
85
|
+
name,
|
|
86
|
+
/*#__PURE__*/ jsx("p", {
|
|
87
|
+
className: "text-secondary ml-2",
|
|
88
|
+
children: "(ID:".concat(eventID, ")")
|
|
89
|
+
})
|
|
90
|
+
]
|
|
91
|
+
}) : name
|
|
83
92
|
}),
|
|
84
93
|
/*#__PURE__*/ jsxs("div", {
|
|
85
94
|
className: "flex-grow-1",
|
|
@@ -9,7 +9,7 @@ var ProductSummary = function(param) {
|
|
|
9
9
|
var t = useTranslation('Design').t;
|
|
10
10
|
var formatNumber = useIntl().formatNumber;
|
|
11
11
|
var priceForOneProduct = orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.price;
|
|
12
|
-
var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers);
|
|
12
|
+
var modifiersSets = (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderModifiersSets) || (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.orderProductModifiers) || [];
|
|
13
13
|
var fullPrice = formatNumber(priceForOneProduct * (orderProduct === null || orderProduct === void 0 ? void 0 : orderProduct.quantity), {
|
|
14
14
|
style: 'currency',
|
|
15
15
|
currency: Config.Currency.GBP
|
|
@@ -38,7 +38,7 @@ var ProductSummary = function(param) {
|
|
|
38
38
|
})
|
|
39
39
|
]
|
|
40
40
|
}),
|
|
41
|
-
!!modifiersSets.length && /*#__PURE__*/ jsx(Fragment, {
|
|
41
|
+
!!(modifiersSets === null || modifiersSets === void 0 ? void 0 : modifiersSets.length) && /*#__PURE__*/ jsx(Fragment, {
|
|
42
42
|
children: modifiersSets.map(function(modifier, index) {
|
|
43
43
|
return /*#__PURE__*/ jsx(ProductWithModifier, {
|
|
44
44
|
modifier: modifier,
|
|
@@ -235,7 +235,7 @@ function ProductsControl(param) {
|
|
|
235
235
|
id: String(product._id),
|
|
236
236
|
isExpanded: isFirstProductAdded,
|
|
237
237
|
isInvalid: !!categoryProductErrors,
|
|
238
|
-
title: value,
|
|
238
|
+
title: "".concat(value, " (ID:").concat(product.id, ")"),
|
|
239
239
|
isOverride: isOverrides,
|
|
240
240
|
badge: /*#__PURE__*/ jsx(Badge, {
|
|
241
241
|
className: "product-badge",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecurrenceInput.d.ts","sourceRoot":"","sources":["../../src/recurrence-input/RecurrenceInput.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAWjD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,gBAAmC,GACpC,EAAE,oBAAoB,
|
|
1
|
+
{"version":3,"file":"RecurrenceInput.d.ts","sourceRoot":"","sources":["../../src/recurrence-input/RecurrenceInput.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,SAAS,EAAW,MAAM,OAAO,CAAA;AAWjD,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,SAAS,CAAA;CAC7B;AAED,wBAAgB,eAAe,CAAC,EAC9B,QAAgB,EAChB,IAAI,EACJ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,gBAAmC,GACpC,EAAE,oBAAoB,2CAyEtB"}
|
|
@@ -117,13 +117,13 @@ function RecurrenceInput(param) {
|
|
|
117
117
|
})), 2), state = _useReducer[0], updateState = _useReducer[1];
|
|
118
118
|
useEffect(// TODO: unhardcode timezone
|
|
119
119
|
function() {
|
|
120
|
-
return onChange(RRule.optionsToString({
|
|
120
|
+
return onChange(RRule.optionsToString(_object_spread({
|
|
121
121
|
freq: state.freq,
|
|
122
122
|
count: state.count,
|
|
123
123
|
interval: state.interval,
|
|
124
124
|
byweekday: state.byweekday,
|
|
125
125
|
tzid: 'Europe/London'
|
|
126
|
-
}).replace('RRULE:', ''));
|
|
126
|
+
}, state)).replace('RRULE:', ''));
|
|
127
127
|
}, [
|
|
128
128
|
state
|
|
129
129
|
]);
|
package/package.json
CHANGED
|
@@ -43,6 +43,7 @@ export interface EventCardProps extends HasPermissionProp {
|
|
|
43
43
|
titleId?: string
|
|
44
44
|
descriptionId?: string
|
|
45
45
|
productSetName?: string
|
|
46
|
+
eventID?: string
|
|
46
47
|
}
|
|
47
48
|
|
|
48
49
|
export function EventCard({
|
|
@@ -61,6 +62,7 @@ export function EventCard({
|
|
|
61
62
|
eventStatistic,
|
|
62
63
|
titleId,
|
|
63
64
|
descriptionId,
|
|
65
|
+
eventID,
|
|
64
66
|
}: EventCardProps) {
|
|
65
67
|
const { t } = useTranslation('Design')
|
|
66
68
|
const { formatNumber, formatDate } = useIntl()
|
|
@@ -93,7 +95,16 @@ export function EventCard({
|
|
|
93
95
|
</Badge>
|
|
94
96
|
</div>
|
|
95
97
|
<Card.Body>
|
|
96
|
-
<Card.Title id={titleId}>
|
|
98
|
+
<Card.Title id={titleId}>
|
|
99
|
+
{eventID ? (
|
|
100
|
+
<div className="d-flex">
|
|
101
|
+
{name}
|
|
102
|
+
<p className="text-secondary ml-2">{`(ID:${eventID})`}</p>
|
|
103
|
+
</div>
|
|
104
|
+
) : (
|
|
105
|
+
name
|
|
106
|
+
)}
|
|
107
|
+
</Card.Title>
|
|
97
108
|
<div className='flex-grow-1'>
|
|
98
109
|
<TipTapEditor
|
|
99
110
|
viewMode
|
|
@@ -109,9 +120,9 @@ export function EventCard({
|
|
|
109
120
|
{t(key)}:{' '}
|
|
110
121
|
{key === 'totalAmount'
|
|
111
122
|
? formatNumber(statistics[key], {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
123
|
+
style: 'currency',
|
|
124
|
+
currency: Config.Currency.GBP,
|
|
125
|
+
})
|
|
115
126
|
: statistics[key]}
|
|
116
127
|
</span>
|
|
117
128
|
</div>
|
|
@@ -26,7 +26,7 @@ export const ProductSummary = ({
|
|
|
26
26
|
const { formatNumber } = useIntl()
|
|
27
27
|
const priceForOneProduct = orderProduct?.price
|
|
28
28
|
|
|
29
|
-
const modifiersSets = orderProduct?.orderModifiersSets || orderProduct?.orderProductModifiers
|
|
29
|
+
const modifiersSets = orderProduct?.orderModifiersSets || orderProduct?.orderProductModifiers || []
|
|
30
30
|
|
|
31
31
|
const fullPrice = formatNumber(priceForOneProduct * orderProduct?.quantity, {
|
|
32
32
|
style: 'currency',
|
|
@@ -44,7 +44,7 @@ export const ProductSummary = ({
|
|
|
44
44
|
<p className='price'>{fullPrice}</p>
|
|
45
45
|
</div>
|
|
46
46
|
|
|
47
|
-
{!!modifiersSets
|
|
47
|
+
{!!modifiersSets?.length && (
|
|
48
48
|
<>
|
|
49
49
|
{modifiersSets.map((modifier, index) => (
|
|
50
50
|
<ProductWithModifier
|
|
@@ -229,7 +229,7 @@ export function ProductsControl({
|
|
|
229
229
|
id={String(product._id)}
|
|
230
230
|
isExpanded={isFirstProductAdded}
|
|
231
231
|
isInvalid={!!categoryProductErrors}
|
|
232
|
-
title={value}
|
|
232
|
+
title={`${value} (ID:${product.id})`}
|
|
233
233
|
isOverride={isOverrides}
|
|
234
234
|
badge={
|
|
235
235
|
<Badge className='product-badge'>{t('product')}</Badge>
|
package/yarn.lock
CHANGED
|
@@ -6604,11 +6604,11 @@ __metadata:
|
|
|
6604
6604
|
linkType: hard
|
|
6605
6605
|
|
|
6606
6606
|
"acorn@npm:^8.14.0, acorn@npm:^8.5.0, acorn@npm:^8.8.2":
|
|
6607
|
-
version: 8.14.
|
|
6608
|
-
resolution: "acorn@npm:8.14.
|
|
6607
|
+
version: 8.14.1
|
|
6608
|
+
resolution: "acorn@npm:8.14.1"
|
|
6609
6609
|
bin:
|
|
6610
6610
|
acorn: bin/acorn
|
|
6611
|
-
checksum: 10c0/
|
|
6611
|
+
checksum: 10c0/dbd36c1ed1d2fa3550140000371fcf721578095b18777b85a79df231ca093b08edc6858d75d6e48c73e431c174dcf9214edbd7e6fa5911b93bd8abfa54e47123
|
|
6612
6612
|
languageName: node
|
|
6613
6613
|
linkType: hard
|
|
6614
6614
|
|