@licklist/design 0.57.0 → 0.58.0-dev.0

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.
Files changed (69) hide show
  1. package/dist/auth/Login/LoginComponent.d.ts.map +1 -1
  2. package/dist/auth/Login/LoginComponent.js +1 -1
  3. package/dist/calendar/Calendar.d.ts +3 -8
  4. package/dist/calendar/Calendar.d.ts.map +1 -1
  5. package/dist/calendar/Calendar.js +1 -1
  6. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts +2 -2
  7. package/dist/calendar/components/CalendarButtons/CalendarButtons.d.ts.map +1 -1
  8. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
  9. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  10. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  11. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  12. package/dist/calendar/utils/index.d.ts +0 -2
  13. package/dist/calendar/utils/index.d.ts.map +1 -1
  14. package/dist/calendar/utils/index.js +1 -1
  15. package/dist/date-time-button/DateTimeButton.d.ts +3 -3
  16. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  17. package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
  18. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  19. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.d.ts.map +1 -1
  20. package/dist/iframe/order-process/components/CategoryProduct/CategoryProduct.js +1 -1
  21. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  22. package/dist/index.js +1 -1
  23. package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
  24. package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
  25. package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
  26. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +2 -1
  27. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  28. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  29. package/dist/snippet/snippet-template/preview/Preview.d.ts.map +1 -1
  30. package/dist/snippet/snippet-template/preview/Preview.js +1 -1
  31. package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
  32. package/dist/static/date-range-input/DateRangeInput.js +1 -1
  33. package/dist/styles/resources-blocking/_index.scss +6 -0
  34. package/dist/styles/sales/BookingFilter.scss +24 -2
  35. package/dist/styles/sales/BookingResults.scss +1 -1
  36. package/dist/styles/sales/BookingTabs.scss +63 -5
  37. package/dist/styles/sales/LifeTimeSales.scss +1 -0
  38. package/dist/styles/sales/ManualBooking.scss +62 -3
  39. package/dist/styles/sales/SourceOfSales.scss +3 -0
  40. package/dist/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
  41. package/dist/styles/static/Tabs.scss +6 -0
  42. package/dist/styles/themes/bookedit/_index.scss +9 -8
  43. package/dist/styles/themes/bookedit/_variables.scss +2 -0
  44. package/package.json +5 -1
  45. package/src/auth/Login/LoginComponent.tsx +9 -1
  46. package/src/calendar/Calendar.tsx +9 -16
  47. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +8 -5
  48. package/src/calendar/components/CalendarDates/CalendarDates.tsx +12 -13
  49. package/src/calendar/utils/index.ts +0 -19
  50. package/src/date-time-button/DateTimeButton.tsx +3 -3
  51. package/src/iframe/order-process/components/CategoryProduct/CategoryProduct.tsx +5 -2
  52. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +1 -1
  53. package/src/notification/email-template/control/EmailTemplateControl.tsx +5 -15
  54. package/src/sales/booking/results/components/ResultCard.tsx +0 -3
  55. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +9 -1
  56. package/src/snippet/snippet-template/preview/Preview.tsx +3 -0
  57. package/src/static/date-range-input/DateRangeInput.tsx +23 -2
  58. package/src/static/switch/BooleanSwitch.tsx +1 -1
  59. package/src/styles/resources-blocking/_index.scss +6 -0
  60. package/src/styles/sales/BookingFilter.scss +24 -2
  61. package/src/styles/sales/BookingResults.scss +1 -1
  62. package/src/styles/sales/BookingTabs.scss +63 -5
  63. package/src/styles/sales/LifeTimeSales.scss +1 -0
  64. package/src/styles/sales/ManualBooking.scss +62 -3
  65. package/src/styles/sales/SourceOfSales.scss +3 -0
  66. package/src/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
  67. package/src/styles/static/Tabs.scss +6 -0
  68. package/src/styles/themes/bookedit/_index.scss +9 -8
  69. package/src/styles/themes/bookedit/_variables.scss +2 -0
@@ -53,7 +53,7 @@ export const ProductQuantityInput = ({
53
53
  id: product.id,
54
54
  name: product.name,
55
55
  deposit: product?.deposit,
56
- hasDeposit: category.allowDeposits,
56
+ hasDeposit: category.allowDeposits && product?.deposit < product.price,
57
57
  price: product.price,
58
58
  productCategoryId: category.id,
59
59
  zoneId: category.zone?.id,
@@ -201,15 +201,7 @@ export const EmailTemplateControl = React.forwardRef(
201
201
  return (
202
202
  <>
203
203
  <Row>
204
- <Form.Group
205
- as={Col}
206
- controlId="type"
207
- xs
208
- sm={12}
209
- md={8}
210
- lg={10}
211
- xl={12}
212
- >
204
+ <Form.Group as={Col} controlId="type" sm={12}>
213
205
  <Form.Label>{t("type")}</Form.Label>
214
206
  <Form.Control
215
207
  as="select"
@@ -372,9 +364,7 @@ export const EmailTemplateControl = React.forwardRef(
372
364
  if (option.type === OPTION_TYPE.checkbox) {
373
365
  return (
374
366
  <Form.Check
375
- {...register(
376
- `templateOptionValues.${option?.id}.value` as any
377
- )}
367
+ {...register(`templateOptionValues.${option?.id}.value`)}
378
368
  type="checkbox"
379
369
  label={t(`Design:${option.name}`)}
380
370
  id={option.name + option.id}
@@ -397,7 +387,7 @@ export const EmailTemplateControl = React.forwardRef(
397
387
  onChange={() => {
398
388
  setIsIncludePDF(!isIncludePDF);
399
389
  setValue(
400
- `templateOptionValues.${option.id}.value` as any,
390
+ `templateOptionValues.${option.id}.value`,
401
391
  ""
402
392
  );
403
393
  }}
@@ -413,7 +403,7 @@ export const EmailTemplateControl = React.forwardRef(
413
403
  <Form.Control
414
404
  as="select"
415
405
  {...register(
416
- `templateOptionValues.${option.id}.value` as any
406
+ `templateOptionValues.${option.id}.value`
417
407
  )}
418
408
  defaultValue={option.selectedValue || ""}
419
409
  >
@@ -442,7 +432,7 @@ export const EmailTemplateControl = React.forwardRef(
442
432
  </Form.Label>
443
433
  <Form.Control
444
434
  {...register(
445
- `templateOptionValues.${option?.id}.value` as any
435
+ `templateOptionValues.${option?.id}.value`
446
436
  )}
447
437
  type="number"
448
438
  placeholder={t(`Design:${option.name}`)}
@@ -12,7 +12,6 @@ import { TIME_FORMAT } from "@licklist/core/dist/Config";
12
12
  import * as Config from "@licklist/core/dist/Config";
13
13
  import { formatDateStringForEvent } from "@licklist/plugins/dist/utils/formatDate";
14
14
  import { getOrderSourceTitle } from "@licklist/plugins/dist/utils/sourceTitle";
15
-
16
15
  import Icon from "../../../../static/Icon";
17
16
 
18
17
  export type ResultCardProps = {
@@ -22,8 +21,6 @@ export type ResultCardProps = {
22
21
  onCardClick?: (id: number) => void;
23
22
  };
24
23
 
25
- // @TODO integrate when API will be available
26
- // activity and staff keys
27
24
  export const ResultCard = ({
28
25
  order,
29
26
  className,
@@ -24,6 +24,7 @@ export interface ManualBookingSummaryProps {
24
24
  isFeeFetching: boolean;
25
25
  orderDate: string;
26
26
  relyOnPeopleType?: RelyOnPeopleType | null;
27
+ isMobileView?: boolean;
27
28
  }
28
29
 
29
30
  export const ManualBookingSummary = ({
@@ -35,6 +36,7 @@ export const ManualBookingSummary = ({
35
36
  orderDate,
36
37
  relyOnPeopleType,
37
38
  hasBookingCategory,
39
+ isMobileView,
38
40
  }: ManualBookingSummaryProps) => {
39
41
  const { t } = useTranslation(["Design", "Sale"]);
40
42
  const { formatNumber } = useIntl();
@@ -44,7 +46,13 @@ export const ManualBookingSummary = ({
44
46
  const date = currentDate.toFormat(DATE_TIME_MANUAL_BOOKING_FORMAT);
45
47
  const time = currentDate.toFormat(TIME_FORMAT);
46
48
  return (
47
- <div className="manual-booking-summary">
49
+ <div
50
+ className={
51
+ isMobileView
52
+ ? "manual-booking-summary-mobile"
53
+ : "manual-booking-summary"
54
+ }
55
+ >
48
56
  <div className="receipt-title">{t("Sale:receipt")}</div>
49
57
  <div className="event-name border-summary-item">{eventName}</div>
50
58
  <div className="border-summary-item">{date}</div>
@@ -208,6 +208,9 @@ export function Preview({
208
208
  selectedDate={selectedDate}
209
209
  setSelectedDate={setSelectedDate}
210
210
  calendarDates={calendarDates}
211
+ getDateTimeButtonProps={() => ({
212
+ isDisabled: false,
213
+ })}
211
214
  />
212
215
  </SettingButton>
213
216
  </div>
@@ -11,10 +11,13 @@ import {
11
11
  rangeDatesToStringDates,
12
12
  stringDatesToInputValue,
13
13
  } from "./utils";
14
+ import { MOBILE_WIDTH } from "../../iframe/order-process/components/BookingSummary/types";
14
15
 
15
16
  import "react-date-range/dist/styles.css";
16
17
  import "react-date-range/dist/theme/default.css";
17
18
 
19
+ type DateRangeDirection = "vertical" | "horizontal";
20
+
18
21
  type DateRangeInputProps = {
19
22
  placeholder: string;
20
23
  startDate?: string;
@@ -33,7 +36,7 @@ export const DateRangeInput = ({
33
36
  disabled,
34
37
  }: DateRangeInputProps) => {
35
38
  const { t } = useTranslation("Design");
36
-
39
+ const [direction, setDirection] = useState<DateRangeDirection>("horizontal");
37
40
  const [state, setState] = useState<Range[]>([
38
41
  {
39
42
  startDate: new Date(),
@@ -82,6 +85,24 @@ export const DateRangeInput = ({
82
85
  }
83
86
  }, [startDate, endDate]);
84
87
 
88
+ useEffect(() => {
89
+ const resizeBodyInMobile = () => {
90
+ if (window.innerWidth > MOBILE_WIDTH) {
91
+ setDirection("horizontal");
92
+ return;
93
+ }
94
+
95
+ setDirection("vertical");
96
+ };
97
+
98
+ resizeBodyInMobile();
99
+ window.addEventListener("resize", resizeBodyInMobile);
100
+
101
+ return () => {
102
+ window.removeEventListener("resize", resizeBodyInMobile);
103
+ };
104
+ }, []);
105
+
85
106
  return (
86
107
  <div>
87
108
  <OverlayTrigger
@@ -94,7 +115,7 @@ export const DateRangeInput = ({
94
115
  moveRangeOnFirstSelection={false}
95
116
  ranges={state}
96
117
  months={months}
97
- direction="horizontal"
118
+ direction={direction}
98
119
  />
99
120
  <div className="mt-3 d-flex justify-content-end">
100
121
  <Button onClick={onReset} variant="link">
@@ -23,7 +23,7 @@ export function BooleanSwitch({
23
23
  const { t } = useTranslation("Design");
24
24
 
25
25
  const options: SelectItem[] = [
26
- { id: 1, value: firstValueTitle ?? t("yes") },
26
+ { id: 1, value: firstValueTitle ?? t("yes") },
27
27
  { id: 0, value: secondValueTitle ?? t("no") },
28
28
  ];
29
29
 
@@ -106,6 +106,12 @@
106
106
  align-items: center;
107
107
  gap: 0.25rem;
108
108
  margin-bottom: 0.5rem;
109
+
110
+ @include media-breakpoint-down(sm) {
111
+ justify-content: center;
112
+ flex-wrap: wrap;
113
+ }
114
+
109
115
  }
110
116
 
111
117
  .text-input.form-group {
@@ -157,6 +157,19 @@
157
157
  margin-bottom: 0;
158
158
  }
159
159
  }
160
+
161
+ .apply-container{
162
+ display: flex;
163
+ justify-content: space-around;
164
+ column-gap: 2rem;
165
+ margin-left: 3rem;
166
+
167
+ @include media-breakpoint-down(sm) {
168
+ flex-direction: row;
169
+ margin-left: 0rem;
170
+ column-gap: 1rem;
171
+ }
172
+ }
160
173
  }
161
174
 
162
175
  .additional-filter-container {
@@ -175,8 +188,12 @@
175
188
  }
176
189
  }
177
190
 
178
- @include media-breakpoint-between(md, lg) {
179
- flex-wrap: nowrap;
191
+ @include media-breakpoint-down(xl) {
192
+ flex-wrap: wrap;
193
+
194
+ .apply-container {
195
+ margin-left: 4rem;
196
+ }
180
197
 
181
198
  .date-container {
182
199
  width: auto;
@@ -230,6 +247,11 @@
230
247
  transform: rotate(45deg);
231
248
  }
232
249
  }
250
+
251
+ @include media-breakpoint-down(sm) {
252
+ flex-direction: column;
253
+ justify-content: flex-start;
254
+ }
233
255
  }
234
256
  }
235
257
  }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14.25rem;
8
+ height: 14rem;
9
9
  border: 1px solid $gray-400;
10
10
  max-width: calc(50% - 0.75rem);
11
11
  flex: 0 0 calc(50% - 0.75rem);
@@ -1,24 +1,49 @@
1
1
  .booking-tabs-pane {
2
2
  display: flex;
3
3
  flex-direction: row;
4
+ justify-content: space-between;
4
5
  align-items: center;
5
6
  height: 2.75rem;
6
7
  background-color: $white;
7
8
 
8
9
  .booking-tabs {
9
10
  svg {
10
- g > rect:first-child {
11
- fill: $white;
11
+ g>rect:first-child {
12
+ fill: $white;
12
13
  }
13
14
  }
14
-
15
+
15
16
  .active {
16
17
  svg {
17
- g > rect:first-child {
18
- fill: $blue;
18
+ g>rect:first-child {
19
+ fill: $blue;
19
20
  }
20
21
  }
21
22
  }
23
+
24
+ @include media-breakpoint-down(sm) {
25
+ width: 4rem;
26
+ }
27
+ }
28
+
29
+ .content {
30
+ display: flex;
31
+ justify-content: space-between;
32
+ width: 85%;
33
+ flex-direction: row;
34
+
35
+ @include media-breakpoint-down(sm) {
36
+ display: flex;
37
+ flex-direction: column;
38
+ align-items: start;
39
+ height: 4rem;
40
+ }
41
+
42
+ .booking {
43
+ @include media-breakpoint-down(sm) {
44
+ height: 13rem;
45
+ }
46
+ }
22
47
  }
23
48
 
24
49
  .separator {
@@ -29,6 +54,12 @@
29
54
  .children {
30
55
  flex: 1;
31
56
  margin-left: 1rem;
57
+
58
+ @include media-breakpoint-down(sm) {
59
+ display: flex;
60
+ flex-direction: column;
61
+ align-items: start;
62
+ }
32
63
  }
33
64
 
34
65
  .buttons {
@@ -61,6 +92,33 @@
61
92
  border-radius: 0.625rem;
62
93
  margin-right: 0.5rem;
63
94
  }
95
+ @include media-breakpoint-down(sm) {
96
+ width: 12.5rem;
97
+ }
98
+
99
+ }
100
+
101
+ @include media-breakpoint-down(sm) {
102
+ display: flex;
103
+ flex-direction: column;
104
+ align-items: start;
105
+ gap: .5rem;
106
+ margin-top: .5rem;
107
+ white-space: nowrap;
108
+ }
109
+ }
110
+
111
+ @include media-breakpoint-down(sm) {
112
+ display: flex;
113
+ align-items: start;
114
+ gap: 1rem;
115
+ margin-top: 1rem;
116
+ height: 100%;
117
+ }
118
+
119
+ .booking {
120
+ @include media-breakpoint-down(sm) {
121
+ height: 13rem;
64
122
  }
65
123
  }
66
124
  }
@@ -33,6 +33,7 @@
33
33
  }
34
34
 
35
35
  @include media-breakpoint-down(sm) {
36
+ height: 12rem;
36
37
  &__value {
37
38
  line-height: 1rem;
38
39
  font-size: 2rem;
@@ -361,10 +361,11 @@
361
361
  width: inherit;
362
362
 
363
363
  @include media-breakpoint-down(sm) {
364
- padding: 0 0.5rem;
365
- padding-top: 2rem;
364
+ display: none;
366
365
  }
367
366
 
367
+
368
+
368
369
  .form-control {
369
370
  margin-bottom: 1.5rem;
370
371
  }
@@ -411,6 +412,64 @@
411
412
  }
412
413
  }
413
414
 
415
+ .manual-booking-summary-mobile {
416
+ display: none;
417
+
418
+ @include media-breakpoint-down(sm) {
419
+ display: block;
420
+ padding: 0 1.5rem;
421
+ padding-top: 2rem;
422
+ height: max-content;
423
+ margin-bottom: 1.5rem;
424
+ width: inherit;
425
+
426
+ .form-control {
427
+ margin-bottom: .5rem;
428
+ }
429
+ .receipt-title {
430
+ font-size: 1.125rem;
431
+ font-weight: 600;
432
+ padding-bottom: 0.4rem;
433
+ margin-bottom: 1rem;
434
+ border-bottom: 2px solid $gray-400;
435
+ }
436
+ .event-name {
437
+ font-size: 0.94rem;
438
+ font-weight: 600;
439
+ }
440
+
441
+ .border-summary-item {
442
+ padding-bottom: 0.9rem;
443
+ margin-bottom: 1%;
444
+ border-bottom: 2px solid $gray-100;
445
+ flex-wrap: wrap;
446
+ }
447
+
448
+ .total-container {
449
+ display: flex;
450
+ justify-content: space-between;
451
+ font-size: 1rem;
452
+ font-weight: 600;
453
+
454
+ @include media-breakpoint-down(lg) {
455
+ flex-wrap: wrap;
456
+ }
457
+ .total-amount {
458
+ padding-left: 1rem;
459
+ @include media-breakpoint-down(lg) {
460
+ padding-left: 0;
461
+ }
462
+ }
463
+ }
464
+
465
+ .summary-item-container {
466
+ .border-summary-item:nth-last-child(2) {
467
+ border-bottom: 2px solid $gray-400;
468
+ }
469
+ }
470
+ }
471
+ }
472
+
414
473
  .menu-list-manual-booking {
415
474
  display: flex;
416
475
  align-items: center;
@@ -437,4 +496,4 @@
437
496
  color: $blue;
438
497
  }
439
498
  }
440
- }
499
+ }
@@ -13,6 +13,9 @@
13
13
 
14
14
  &__pie-chart {
15
15
  height: 100%;
16
+ @include media-breakpoint-down(sm) {
17
+ height: 12rem;
18
+ }
16
19
  }
17
20
 
18
21
  .colors-0 {
@@ -28,12 +28,13 @@ $snippet-template-card-button-transition: $product-set-card-transition !default;
28
28
  border: 1px solid #ccc;
29
29
  border-radius: $border-radius;
30
30
  height: 10rem;
31
- width: 15rem;
31
+ min-width: 15rem;
32
32
  padding: 1rem;
33
33
 
34
34
  @include media-breakpoint-down(sm) {
35
35
  height: 100%;
36
36
  max-height: 10rem;
37
+ width: 100%;
37
38
  }
38
39
 
39
40
  p {
@@ -109,4 +110,4 @@ $snippet-template-card-button-transition: $product-set-card-transition !default;
109
110
  &:hover {
110
111
  border: 2px solid $blue;
111
112
  }
112
- }
113
+ }
@@ -11,6 +11,12 @@ $tab-nav-link-active-border-bottom: 1px solid $tab-nav-link-active-color !defaul
11
11
  margin-left: -1.25rem;
12
12
  border-bottom: 1px solid $nav-tabs-border-color;
13
13
 
14
+ @include media-breakpoint-down(sm) {
15
+ display: flex;
16
+ flex-direction: column;
17
+ white-space: nowrap;
18
+ }
19
+
14
20
  .nav-link {
15
21
  color: $tab-nav-link-color;
16
22
  background-color: transparent;
@@ -98,7 +98,8 @@
98
98
  color: gray("600");
99
99
 
100
100
  &.sortable {
101
- &::before, &::after {
101
+ &::before,
102
+ &::after {
102
103
  opacity: 1;
103
104
  }
104
105
 
@@ -132,20 +133,20 @@
132
133
  width: 2.5rem;
133
134
  height: 2.5rem;
134
135
  background-color: transparent;
135
-
136
+
136
137
  svg {
137
138
  margin-bottom: 2.5px;
138
139
  }
139
140
 
140
141
  &:hover {
141
142
  cursor: pointer;
142
- border-radius: .5rem;
143
+ border-radius: 0.5rem;
143
144
  background-color: lighten($primary, 40);
144
145
  }
145
146
  }
146
147
 
147
148
  .page-item {
148
- margin-left: .4rem;
149
+ margin-left: 0.4rem;
149
150
  min-width: 15px;
150
151
  width: 2.5rem;
151
152
  height: 2.5rem;
@@ -153,7 +154,7 @@
153
154
  .page-link {
154
155
  border: 0;
155
156
  padding: 0;
156
- border-radius: .5rem;
157
+ border-radius: 0.5rem;
157
158
  height: 100%;
158
159
  display: flex;
159
160
  align-items: center;
@@ -162,13 +163,13 @@
162
163
  color: $black;
163
164
  font-weight: 600;
164
165
  font-size: 0.875rem;
165
-
166
+
166
167
  &:hover {
167
- border-radius: .5rem;
168
+ border-radius: 0.5rem;
168
169
  background-color: lighten($primary, 40);
169
170
  }
170
171
  }
171
-
172
+
172
173
  &.active {
173
174
  .page-link {
174
175
  border: 2px solid $primary;
@@ -197,6 +197,7 @@ $grid-breakpoints: (
197
197
  md: 768px,
198
198
  lg: 992px,
199
199
  xl: 1200px,
200
+ xxl: 1500px,
200
201
  ) !default;
201
202
 
202
203
  @include _assert-ascending($grid-breakpoints, "$grid-breakpoints");
@@ -211,6 +212,7 @@ $container-max-widths: (
211
212
  md: 720px,
212
213
  lg: 960px,
213
214
  xl: 1140px,
215
+ xxl: 1500px,
214
216
  ) !default;
215
217
 
216
218
  @include _assert-ascending($container-max-widths, "$container-max-widths");