@licklist/design 0.78.4-dev.0 → 0.78.4-dev.2

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.
@@ -19,7 +19,7 @@ export interface EditEventFormValues extends IntervalInputValues {
19
19
  saleDeadline: number | null;
20
20
  integrationUrl: string | null;
21
21
  recurrenceEndAt?: string;
22
- duplicatedFromId?: number;
22
+ duplicatedFromId?: number | null;
23
23
  editedProductSet?: ProductSetFormValues;
24
24
  }
25
25
  export interface EditEventFormProps extends HasPermissionProp {
@@ -1 +1 @@
1
- {"version":3,"file":"EditEventForm.d.ts","sourceRoot":"","sources":["../../../../../src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,EACN,MAAM,sDAAsD,CAAA;AAO7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AAGtF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAA;AAG3E,OAAO,EAAE,UAAU,EAAE,MAAM,6DAA6D,CAAA;AAExF,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AAS5D,OAAO,EAAiB,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAGxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAA;AAIlF,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,MAAM,CAAA;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC1B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,kBAAkB,EAAE,MAAM,GAAG,IAAI,CAAA;IACjC,OAAO,EAAE,OAAO,GAAG,MAAM,CAAA;IACzB,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAA;IAClC,MAAM,EAAE,KAAK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AAY,CAAC,EAAE,WAAW,CAAA;IAC1B,WAAW,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAA;IAClD,WAAW,CAAC,EAAE,UAAU,EAAE,GAAG,IAAI,CAAA;IACjC,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAA;IACtD,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,4BAA4B,CAAC,EAAE,OAAO,CAAA;IACtC,QAAQ,EAAE,MAAM,CAAA;IAChB,eAAe,CAAC,EAAE,UAAU,CAAA;IAC5B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAC/B;AAOD,eAAO,MAAM,aAAa,8RAmBvB,kBAAkB,4CAqZpB,CAAA"}
@@ -17,9 +17,8 @@ export interface EventCardProps extends HasPermissionProp {
17
17
  eventMetadata?: EventMetadata | null;
18
18
  onStatistic: () => void;
19
19
  titleId?: string;
20
- descriptionId?: string;
21
20
  productSetName?: string;
22
21
  eventID?: string;
23
22
  }
24
- export declare function EventCard({ name, description, date, imageUrl, sales, onPreview, onEdit, onCopy, eventMetadata, onRemove, onOpenQrCode, hasPermission, productSetName, onStatistic, eventStatistic, titleId, descriptionId, eventID, }: EventCardProps): import("react/jsx-runtime").JSX.Element;
23
+ export declare function EventCard({ name, date, imageUrl, sales, onPreview, onEdit, onCopy, eventMetadata, onRemove, onOpenQrCode, hasPermission, productSetName, onStatistic, eventStatistic, titleId, eventID, }: EventCardProps): import("react/jsx-runtime").JSX.Element;
25
24
  //# sourceMappingURL=EventCard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"EventCard.d.ts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ts","sourceRoot":"","sources":["../../../src/events/event-card/EventCard.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAA;AACtF,OAAO,EAAE,cAAc,EAAE,MAAM,kEAAkE,CAAA;AACjG,OAAO,EAAE,aAAa,EAAE,MAAM,4DAA4D,CAAA;AAS1F,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAI3C,MAAM,WAAW,cAAe,SAAQ,iBAAiB;IACvD,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAA;IACd,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,YAAY,EAAE,MAAM,IAAI,CAAA;IACxB,cAAc,CAAC,EAAE,cAAc,GAAG,IAAI,CAAA;IACtC,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAA;IACpC,WAAW,EAAE,MAAM,IAAI,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,CAAC,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,SAAS,CAAC,EACxB,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,SAAS,EACT,MAAM,EACN,MAAM,EACN,aAAa,EACb,QAAQ,EACR,YAAY,EACZ,aAAoB,EACpB,cAAc,EACd,WAAW,EACX,cAAc,EACd,OAAO,EACP,OAAO,GACR,EAAE,cAAc,2CAsKhB"}
@@ -1,12 +1,11 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
3
2
  import { Card, Badge, ProgressBar, OverlayTrigger, Popover } from 'react-bootstrap';
4
3
  import { useIntl } from 'react-intl';
5
4
  import clsx from 'clsx';
6
5
  import { useTranslation } from 'react-i18next';
7
6
  import * as Config from '@licklist/core/dist/Config';
8
7
  import { FaEye, FaQrcode, FaExternalLinkAlt, FaEdit, FaCopy, FaTrashAlt } from 'react-icons/fa';
9
- import { getStatisticInfo, formatContent, EVENT_DESCRIPTION_SIZE } from './utils.js';
8
+ import { getStatisticInfo } from './utils.js';
10
9
  import { ReactComponent as SvgChartBar } from '../../assets/dashboard/chartBar.svg.js';
11
10
 
12
11
  function _object_without_properties(source, excluded) {
@@ -37,21 +36,16 @@ function _object_without_properties_loose(source, excluded) {
37
36
  return target;
38
37
  }
39
38
  function EventCard(param) {
40
- 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, eventMetadata = param.eventMetadata, onRemove = param.onRemove, onOpenQrCode = param.onOpenQrCode, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, productSetName = param.productSetName, onStatistic = param.onStatistic, eventStatistic = param.eventStatistic, titleId = param.titleId; param.descriptionId; var eventID = param.eventID;
39
+ var name = param.name, date = param.date, imageUrl = param.imageUrl, sales = param.sales, onPreview = param.onPreview, onEdit = param.onEdit, onCopy = param.onCopy, eventMetadata = param.eventMetadata, onRemove = param.onRemove, onOpenQrCode = param.onOpenQrCode, _param_hasPermission = param.hasPermission, hasPermission = _param_hasPermission === void 0 ? true : _param_hasPermission, productSetName = param.productSetName, onStatistic = param.onStatistic, eventStatistic = param.eventStatistic, titleId = param.titleId, eventID = param.eventID;
41
40
  var t = useTranslation('Design').t;
42
41
  var _useIntl = useIntl(), formatNumber = _useIntl.formatNumber, formatDate = _useIntl.formatDate;
43
42
  var _getStatisticInfo = getStatisticInfo(eventStatistic, date), totalViews = _getStatisticInfo.totalViews, statistics = _object_without_properties(_getStatisticInfo, [
44
43
  "totalViews"
45
44
  ]);
46
- var duplicatedInfo = (eventMetadata === null || eventMetadata === void 0 ? void 0 : eventMetadata.editorName) && (eventMetadata === null || eventMetadata === void 0 ? void 0 : eventMetadata.duplicatedFromId) ? t('Design:duplicatedInfo', {
45
+ var duplicatedInfo = (eventMetadata === null || eventMetadata === void 0 ? void 0 : eventMetadata.duplicatedFromId) ? t('Design:duplicatedInfo', {
47
46
  ID: eventMetadata === null || eventMetadata === void 0 ? void 0 : eventMetadata.duplicatedFromId,
48
47
  name: eventMetadata === null || eventMetadata === void 0 ? void 0 : eventMetadata.editorName
49
48
  }) : null;
50
- useMemo(function() {
51
- return formatContent(description, EVENT_DESCRIPTION_SIZE);
52
- }, [
53
- description
54
- ]);
55
49
  return /*#__PURE__*/ jsxs(Card, {
56
50
  className: "d-flex flex-column event-card h-100",
57
51
  children: [
@@ -128,7 +122,7 @@ function EventCard(param) {
128
122
  }, key);
129
123
  })
130
124
  }),
131
- sales && sales.map(function(sale) {
125
+ sales === null || sales === void 0 ? void 0 : sales.map(function(sale) {
132
126
  return /*#__PURE__*/ jsxs("div", {
133
127
  className: "event-card-sale",
134
128
  children: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.78.4-dev.0",
3
+ "version": "0.78.4-dev.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -50,7 +50,7 @@ export interface EditEventFormValues extends IntervalInputValues {
50
50
  saleDeadline: number | null
51
51
  integrationUrl: string | null
52
52
  recurrenceEndAt?: string
53
- duplicatedFromId?: number
53
+ duplicatedFromId?: number | null
54
54
  editedProductSet?: ProductSetFormValues
55
55
  }
56
56
 
@@ -208,7 +208,7 @@ export const EditEventForm = ({
208
208
  )
209
209
  const isChangedTime =
210
210
  watchedValues?.start !==
211
- toSimpleDateTime(defaultEventValues?.startAt || '') ||
211
+ toSimpleDateTime(defaultEventValues?.startAt || '') ||
212
212
  watchedValues?.end !== toSimpleDateTime(defaultEventValues?.endAt || '')
213
213
  const isSinglEventWithBooked = !rrule && isBooked && isChangedTime
214
214
 
@@ -221,18 +221,20 @@ export const EditEventForm = ({
221
221
  onApprove={onApproveDialog}
222
222
  onDecline={onDeclineDialog}
223
223
  />
224
- {
225
- duplicatedInfo ? (<div className='d-flex justify-content-between'>
224
+ {duplicatedInfo ? (
225
+ <div className='d-flex justify-content-between'>
226
226
  <h5 className='edit-event-modal-title highlited-primary-title'>
227
227
  {title}
228
228
  </h5>
229
- <Badge className='duplicate-badge' variant='success'>{duplicatedInfo}</Badge>
230
- </div>) : (
231
- <h5 className='edit-event-modal-title highlited-primary-title'>
232
- {title}
233
- </h5>
234
- )
235
- }
229
+ <Badge className='duplicate-badge' variant='success'>
230
+ {duplicatedInfo}
231
+ </Badge>
232
+ </div>
233
+ ) : (
234
+ <h5 className='edit-event-modal-title highlited-primary-title'>
235
+ {title}
236
+ </h5>
237
+ )}
236
238
 
237
239
  <FormProvider {...form}>
238
240
  <Modal.Body
@@ -69,16 +69,13 @@ export const Default: Story<EventCardProps> = () => {
69
69
  console.log('onStatistic')
70
70
  }}
71
71
  titleId='titleId'
72
- descriptionId='descriptionId'
73
72
  />
74
73
  </div>
75
74
  )
76
75
  }
77
76
 
78
- export const Skeleton: Story<EventCardProps> = () => {
79
- return (
80
- <div style={{ maxWidth: '34rem' }}>
81
- <EventCardSkeleton />
82
- </div>
83
- )
84
- }
77
+ export const Skeleton: Story<EventCardProps> = () => (
78
+ <div style={{ maxWidth: '34rem' }}>
79
+ <EventCardSkeleton />
80
+ </div>
81
+ )
@@ -1,4 +1,3 @@
1
- import { useMemo } from 'react'
2
1
  import {
3
2
  Badge,
4
3
  Card,
@@ -22,12 +21,7 @@ import {
22
21
  FaQrcode,
23
22
  } from 'react-icons/fa'
24
23
  import { Sale } from '../../types/bookings'
25
- import { TipTapEditor } from '../../tiptap-editor/TipTapEditor'
26
- import {
27
- EVENT_DESCRIPTION_SIZE,
28
- formatContent,
29
- getStatisticInfo,
30
- } from './utils'
24
+ import { getStatisticInfo } from './utils'
31
25
  import { ReactComponent as ChartBarIcon } from '../../assets/dashboard/chartBar.svg'
32
26
 
33
27
  export interface EventCardProps extends HasPermissionProp {
@@ -45,14 +39,12 @@ export interface EventCardProps extends HasPermissionProp {
45
39
  eventMetadata?: EventMetadata | null
46
40
  onStatistic: () => void
47
41
  titleId?: string
48
- descriptionId?: string
49
42
  productSetName?: string
50
43
  eventID?: string
51
44
  }
52
45
 
53
46
  export function EventCard({
54
47
  name,
55
- description,
56
48
  date,
57
49
  imageUrl,
58
50
  sales,
@@ -67,25 +59,18 @@ export function EventCard({
67
59
  onStatistic,
68
60
  eventStatistic,
69
61
  titleId,
70
- descriptionId,
71
62
  eventID,
72
63
  }: EventCardProps) {
73
64
  const { t } = useTranslation('Design')
74
65
  const { formatNumber, formatDate } = useIntl()
75
66
  const { totalViews, ...statistics } = getStatisticInfo(eventStatistic, date)
76
67
 
77
- const duplicatedInfo =
78
- eventMetadata?.editorName && eventMetadata?.duplicatedFromId
79
- ? t('Design:duplicatedInfo', {
80
- ID: eventMetadata?.duplicatedFromId,
81
- name: eventMetadata?.editorName,
82
- })
83
- : null
84
-
85
- const memoedContent = useMemo(
86
- () => formatContent(description, EVENT_DESCRIPTION_SIZE),
87
- [description],
88
- )
68
+ const duplicatedInfo = eventMetadata?.duplicatedFromId
69
+ ? t('Design:duplicatedInfo', {
70
+ ID: eventMetadata?.duplicatedFromId,
71
+ name: eventMetadata?.editorName,
72
+ })
73
+ : null
89
74
 
90
75
  return (
91
76
  <Card className='d-flex flex-column event-card h-100'>
@@ -119,13 +104,15 @@ export function EventCard({
119
104
  ) : (
120
105
  name
121
106
  )}
122
- {duplicatedInfo && <div className='mt-2 ml-2'>
107
+ {duplicatedInfo && (
108
+ <div className='mt-2 ml-2'>
123
109
  <div className='event-card-sale'>
124
110
  <span className='event-card-sale-name text-success'>
125
111
  {duplicatedInfo}
126
112
  </span>
127
113
  </div>
128
- </div>}
114
+ </div>
115
+ )}
129
116
  </Card.Title>
130
117
  <div className='flex-grow-1'>
131
118
  <div className='mt-2 ml-2'>
@@ -144,23 +131,23 @@ export function EventCard({
144
131
  ))}
145
132
  </div>
146
133
 
147
- {sales &&
148
- sales.map((sale) => (
149
- <div className='event-card-sale' key={sale.id}>
150
- {/* TODO: make it an i18n message instead */}
151
- <div className='event-card-sale-text'>
152
- <span className='event-card-sale-name'>{sale.name}</span>{' '}
153
- <span className='event-card-sale-quantity'>
154
- {[sale.current, sale.max]
155
- .map((value) => formatNumber(value))
156
- .join(' / ')}
157
- </span>
158
- </div>
159
- <ProgressBar now={sale.current} max={sale.max} />
134
+ {sales?.map((sale) => (
135
+ <div className='event-card-sale' key={sale.id}>
136
+ {/* TODO: make it an i18n message instead */}
137
+ <div className='event-card-sale-text'>
138
+ <span className='event-card-sale-name'>{sale.name}</span>{' '}
139
+ <span className='event-card-sale-quantity'>
140
+ {[sale.current, sale.max]
141
+ .map((value) => formatNumber(value))
142
+ .join(' / ')}
143
+ </span>
160
144
  </div>
161
- ))}
145
+ <ProgressBar now={sale.current} max={sale.max} />
146
+ </div>
147
+ ))}
162
148
  </div>
163
149
  </Card.Body>
150
+
164
151
  <Card.Footer className='flex-column'>
165
152
  {productSetName && (
166
153
  <OverlayTrigger
@@ -190,7 +177,6 @@ export function EventCard({
190
177
  </button>
191
178
  <div className='event-card-views'>
192
179
  <FaEye />
193
-
194
180
  <span>{formatNumber(totalViews)}</span>
195
181
  </div>
196
182
  </div>
@@ -209,6 +195,7 @@ export function EventCard({
209
195
  >
210
196
  <FaExternalLinkAlt />
211
197
  </button>
198
+
212
199
  {hasPermission && (
213
200
  <>
214
201
  <button