@licklist/design 0.50.0-dev.2 → 0.50.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 (81) hide show
  1. package/dist/calendar/Calendar.d.ts +0 -3
  2. package/dist/calendar/Calendar.d.ts.map +1 -1
  3. package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
  4. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +1 -1
  5. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  6. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  7. package/dist/calendar/utils/index.d.ts +1 -2
  8. package/dist/calendar/utils/index.d.ts.map +1 -1
  9. package/dist/calendar/utils/index.js +1 -1
  10. package/dist/date-time-button/DateTimeButton.d.ts +2 -3
  11. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  12. package/dist/date-time-button/DateTimeButton.js +1 -1
  13. package/dist/events/event-card/EventCard.d.ts +1 -2
  14. package/dist/events/event-card/EventCard.d.ts.map +1 -1
  15. package/dist/events/event-card/EventCard.js +1 -1
  16. package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
  17. package/dist/iframe/event/event-booking-products/EventBookingProducts.js +1 -1
  18. package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts +2 -2
  19. package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts.map +1 -1
  20. package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.js +1 -1
  21. package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.js +1 -1
  22. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  23. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts +1 -2
  24. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts.map +1 -1
  25. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js +1 -1
  26. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -1
  27. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts.map +1 -1
  28. package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.js +1 -1
  29. package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
  30. package/dist/index.js +1 -1
  31. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -2
  32. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  33. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  34. package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
  35. package/dist/static/date-range-input/DateRangeInput.js +1 -1
  36. package/dist/static/switch/BooleanSwitch.d.ts +1 -3
  37. package/dist/static/switch/BooleanSwitch.d.ts.map +1 -1
  38. package/dist/static/switch/BooleanSwitch.js +1 -1
  39. package/dist/styles/events/EventCard.scss +6 -3
  40. package/dist/styles/resources-blocking/_index.scss +0 -6
  41. package/dist/styles/sales/BookingFilter.scss +1 -21
  42. package/dist/styles/sales/BookingResults.scss +1 -1
  43. package/dist/styles/sales/BookingTabs.scss +5 -63
  44. package/dist/styles/sales/LifeTimeSales.scss +0 -1
  45. package/dist/styles/sales/ManualBooking.scss +3 -62
  46. package/dist/styles/sales/SourceOfSales.scss +0 -3
  47. package/dist/styles/static/Switch.scss +0 -1
  48. package/dist/styles/static/Tabs.scss +0 -6
  49. package/dist/table/TableHelperComponent.d.ts +1 -2
  50. package/dist/table/TableHelperComponent.d.ts.map +1 -1
  51. package/dist/table/TableHelperComponent.js +1 -1
  52. package/package.json +3 -3
  53. package/src/calendar/Calendar.tsx +0 -5
  54. package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +3 -3
  55. package/src/calendar/components/CalendarDates/CalendarDates.tsx +2 -5
  56. package/src/calendar/utils/index.ts +6 -15
  57. package/src/date-time-button/DateTimeButton.tsx +3 -16
  58. package/src/events/event-card/EventCard.stories.tsx +0 -1
  59. package/src/events/event-card/EventCard.tsx +1 -8
  60. package/src/iframe/event/event-booking-products/EventBookingProducts.tsx +1 -1
  61. package/src/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.tsx +8 -8
  62. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +5 -5
  63. package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +2 -2
  64. package/src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx +3 -16
  65. package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +2 -2
  66. package/src/iframe/order-process/components/utils/useCategoryVerification.ts +1 -1
  67. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
  68. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +1 -9
  69. package/src/static/date-range-input/DateRangeInput.tsx +2 -23
  70. package/src/static/switch/BooleanSwitch.tsx +2 -6
  71. package/src/styles/events/EventCard.scss +6 -3
  72. package/src/styles/resources-blocking/_index.scss +0 -6
  73. package/src/styles/sales/BookingFilter.scss +1 -21
  74. package/src/styles/sales/BookingResults.scss +1 -1
  75. package/src/styles/sales/BookingTabs.scss +5 -63
  76. package/src/styles/sales/LifeTimeSales.scss +0 -1
  77. package/src/styles/sales/ManualBooking.scss +3 -62
  78. package/src/styles/sales/SourceOfSales.scss +0 -3
  79. package/src/styles/static/Switch.scss +0 -1
  80. package/src/styles/static/Tabs.scss +0 -6
  81. package/src/table/TableHelperComponent.tsx +18 -73
@@ -7,6 +7,8 @@ $event-card-title-font-weight: $font-weight-semibold !default;
7
7
  $event-card-title-font-size: sp(5) !default;
8
8
  $event-card-title-line-height: 4 / 3 !default;
9
9
 
10
+ $event-card-footer-height: sp(6) !default;
11
+
10
12
  $event-card-image-container-overflow-top: sp(3) !default;
11
13
  $event-card-image-container-overflow-x: sp(3) !default;
12
14
  $event-card-image-container-aspect-ratio: 1.6 !default;
@@ -32,7 +34,7 @@ $event-card-views-gutter: sp(3) !default;
32
34
  transition: ease-in 0.25s;
33
35
  border-radius: $event-card-border-radius;
34
36
 
35
- > * + * {
37
+ >*+* {
36
38
  margin-top: $event-card-contents-gutter;
37
39
  }
38
40
 
@@ -52,7 +54,7 @@ $event-card-views-gutter: sp(3) !default;
52
54
  min-height: 13.75rem;
53
55
  max-height: 22rem;
54
56
  }
55
- }
57
+ }
56
58
  }
57
59
 
58
60
  .card-title {
@@ -72,6 +74,7 @@ $event-card-views-gutter: sp(3) !default;
72
74
  border: unset;
73
75
  border-radius: unset;
74
76
  padding: 0;
77
+ height: $event-card-footer-height;
75
78
 
76
79
  svg {
77
80
  height: 100%;
@@ -172,4 +175,4 @@ $event-card-views-gutter: sp(3) !default;
172
175
  color: #504f4f;
173
176
  width: 1.7rem;
174
177
  }
175
- }
178
+ }
@@ -106,12 +106,6 @@
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
-
115
109
  }
116
110
 
117
111
  .text-input.form-group {
@@ -157,19 +157,6 @@
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
- }
173
160
  }
174
161
 
175
162
  .additional-filter-container {
@@ -177,12 +164,10 @@
177
164
 
178
165
  @include media-breakpoint-down(md) {
179
166
  flex-wrap: wrap;
180
-
181
167
  .date-container {
182
168
  width: 100%;
183
169
  flex: 1;
184
170
  }
185
-
186
171
  .btn-primary {
187
172
  margin-top: 1rem;
188
173
  }
@@ -243,11 +228,6 @@
243
228
  transform: rotate(45deg);
244
229
  }
245
230
  }
246
-
247
- @include media-breakpoint-down(sm) {
248
- flex-direction: column;
249
- justify-content: flex-start;
250
- }
251
231
  }
252
232
  }
253
- }
233
+ }
@@ -5,7 +5,7 @@
5
5
  flex-wrap: wrap;
6
6
 
7
7
  .result-card {
8
- height: 14rem;
8
+ height: 14.25rem;
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,49 +1,24 @@
1
1
  .booking-tabs-pane {
2
2
  display: flex;
3
3
  flex-direction: row;
4
- justify-content: space-between;
5
4
  align-items: center;
6
5
  height: 2.75rem;
7
6
  background-color: $white;
8
7
 
9
8
  .booking-tabs {
10
9
  svg {
11
- g>rect:first-child {
12
- fill: $white;
10
+ g > rect:first-child {
11
+ fill: $white;
13
12
  }
14
13
  }
15
-
14
+
16
15
  .active {
17
16
  svg {
18
- g>rect:first-child {
19
- fill: $blue;
17
+ g > rect:first-child {
18
+ fill: $blue;
20
19
  }
21
20
  }
22
21
  }
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
- }
47
22
  }
48
23
 
49
24
  .separator {
@@ -54,12 +29,6 @@
54
29
  .children {
55
30
  flex: 1;
56
31
  margin-left: 1rem;
57
-
58
- @include media-breakpoint-down(sm) {
59
- display: flex;
60
- flex-direction: column;
61
- align-items: start;
62
- }
63
32
  }
64
33
 
65
34
  .buttons {
@@ -92,33 +61,6 @@
92
61
  border-radius: 0.625rem;
93
62
  margin-right: 0.5rem;
94
63
  }
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;
122
64
  }
123
65
  }
124
66
  }
@@ -33,7 +33,6 @@
33
33
  }
34
34
 
35
35
  @include media-breakpoint-down(sm) {
36
- height: 12rem;
37
36
  &__value {
38
37
  line-height: 1rem;
39
38
  font-size: 2rem;
@@ -361,11 +361,10 @@
361
361
  width: inherit;
362
362
 
363
363
  @include media-breakpoint-down(sm) {
364
- display: none;
364
+ padding: 0 0.5rem;
365
+ padding-top: 2rem;
365
366
  }
366
367
 
367
-
368
-
369
368
  .form-control {
370
369
  margin-bottom: 1.5rem;
371
370
  }
@@ -412,64 +411,6 @@
412
411
  }
413
412
  }
414
413
 
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
-
473
414
  .menu-list-manual-booking {
474
415
  display: flex;
475
416
  align-items: center;
@@ -496,4 +437,4 @@
496
437
  color: $blue;
497
438
  }
498
439
  }
499
- }
440
+ }
@@ -13,9 +13,6 @@
13
13
 
14
14
  &__pie-chart {
15
15
  height: 100%;
16
- @include media-breakpoint-down(sm) {
17
- height: 12rem;
18
- }
19
16
  }
20
17
 
21
18
  .colors-0 {
@@ -27,7 +27,6 @@ $btn-switch-option-padding-y: calc(#{$btn-padding-y} - #{sp(1)}) !default;
27
27
  border-radius: $btn-switch-option-border-radius;
28
28
  margin: 0;
29
29
  padding: $btn-switch-option-padding-y $btn-switch-option-padding-x;
30
- min-width: 4.25rem;
31
30
 
32
31
  &:hover,
33
32
  &:active,
@@ -11,12 +11,6 @@ $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
-
20
14
  .nav-link {
21
15
  color: $tab-nav-link-color;
22
16
  background-color: transparent;
@@ -1,4 +1,4 @@
1
- import { SetStateAction } from "react";
1
+ /// <reference types="react" />
2
2
  import ILengthAwarePaginator from "@licklist/plugins/dist/types/services/Table/ILengthAwarePaginator";
3
3
  import ITableHeader from "@licklist/plugins/dist/types/services/Table/ITableHeader";
4
4
  import ITableProps from "@licklist/plugins/dist/types/services/Table/ITableProps";
@@ -18,7 +18,6 @@ export interface TableHelperComponentProps {
18
18
  [key: string]: any;
19
19
  };
20
20
  initialOptions?: Partial<ITableProps>;
21
- filteredOrdersOptions?: (value: SetStateAction<ITableProps>) => void;
22
21
  }
23
22
  /**
24
23
  * TableHelperComponent
@@ -1 +1 @@
1
- {"version":3,"file":"TableHelperComponent.d.ts","sourceRoot":"","sources":["../../src/table/TableHelperComponent.tsx"],"names":[],"mappings":"AACA,OAAc,EAAE,cAAc,EAAuB,MAAM,OAAO,CAAC;AAOnE,OAAO,qBAAqB,MAAM,mEAAmE,CAAC;AACtG,OAAO,YAAY,MAAM,0DAA0D,CAAC;AACpF,OAAO,WAAW,MAAM,yDAAyD,CAAC;AAQlF,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;IACtC,qBAAqB,CAAC,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;CACtE;AAUD;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,eA4S7D;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
1
+ {"version":3,"file":"TableHelperComponent.d.ts","sourceRoot":"","sources":["../../src/table/TableHelperComponent.tsx"],"names":[],"mappings":";AAQA,OAAO,qBAAqB,MAAM,mEAAmE,CAAC;AACtG,OAAO,YAAY,MAAM,0DAA0D,CAAC;AACpF,OAAO,WAAW,MAAM,yDAAyD,CAAC;AAQlF,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,YAAY,EAAE,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACvC,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,eAAe,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IACzC,cAAc,CAAC,EAAE,OAAO,CAAC,WAAW,CAAC,CAAC;CACvC;AAUD;;;;;;GAMG;AACH,iBAAS,oBAAoB,CAAC,KAAK,EAAE,yBAAyB,eAsP7D;AAED,OAAO,EAAE,oBAAoB,EAAE,CAAC"}
@@ -1 +1 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),n=e(r),i=require("react-router-dom"),a=e(require("@licklist/plugins/dist/services/Route/RouteService")),o=require("../static/loader/LoaderIndicator.js"),s=require("react-bootstrap"),l=e(require("@licklist/plugins/dist/hooks/Query/useQuery")),u=require("lodash"),c=require("./FilterHelperComponent.js"),g=require("./PaginationHelperComponent.js"),p=e(require("@licklist/plugins/dist/services/Table/TableService")),d=require("./PerPageHelperComponent.js"),_=require("./utils/index.js");exports.TableHelperComponent=function(e){var f,m,v=e.paginator,y=e.headers,E=e.renderItemFn,S=e.isLoading,h=e.onRefreshFn,C=e.refreshAt,P=e.striped,b=void 0===P||P,q=e.bordered,D=void 0===q||q,F=e.displaySearchBar,j=void 0===F||F,O=e.displayPerPageSelect,k=void 0===O||O,L=e.displayShowingSection,w=void 0===L||L,H=e.externalFilters,R=void 0===H?{}:H,T=e.initialOptions,K=void 0===T?{}:T,N=e.filteredOrdersOptions,V=l(),I=i.useLocation().pathname,x=Number(_.getFilterOptionsValue(V,K,"page")),A=Number(_.getFilterOptionsValue(V,K,"perPage")),U=String(_.getFilterOptionsValue(V,K,"sortKey")),Q=String(_.getFilterOptionsValue(V,K,"sortDirection")),B=String(_.getFilterOptionsValue(V,K,"filter")),G=t.__read(r.useState(),2),M=G[0],z=G[1],J=t.__read(r.useState({page:x,perPage:A,sortKey:U,sortDirection:Q,filter:B}),2),W=J[0],X=J[1],Y=t.__read(r.useState(0),2),Z=Y[0],$=Y[1],ee=t.__read(r.useState(R),2),te=ee[0],re=ee[1];r.useEffect((function(){u.isEqual(M,W)&&u.isEqual(te,R)||N||(z(W),re(R),h&&h(W),a.redirectTo([I,["page=".concat(W.page),"perPage=".concat(W.perPage),"sortKey=".concat(escape(W.sortKey)),"sortDirection=".concat(escape(W.sortDirection)),"filter=".concat(escape(W.filter)),new URLSearchParams(R).toString()].join("&")].join("?")))}),[I,W,h,N,R]),r.useEffect((function(){Z===C||N||($((function(e){return null!=C?C:e})),h&&h(W))}),[h,W,C,N,Z]);var ne=function(e){var r,i;if("string"==typeof e)return n.createElement("th",{key:e.toLowerCase(),className:p.getHeaderClasses(e,U,Q)},e);if("object"==typeof e){var a={width:null!==(r=e.width)&&void 0!==r?r:"auto"};return n.createElement("th",{key:null!==(i=e.key)&&void 0!==i?i:e.title.toLowerCase(),className:p.getHeaderClasses(e,U,Q),style:a,onClick:function(){return e.isSortable&&(r=e.key,n=p.DEFAULT_SORT_DIRECTION,void(U===r?N?N((function(e){return n=p.getSortDirection(e.sortDirection,n),t.__assign(t.__assign({},e),{sortKey:r,sortDirection:n})})):X((function(e){return n=p.getSortDirection(e.sortDirection,n),t.__assign(t.__assign({},e),{sortKey:r,sortDirection:n})})):N?N((function(e){return t.__assign(t.__assign({},e),{sortKey:r,sortDirection:n})})):X((function(e){return t.__assign(t.__assign({},e),{sortKey:r,sortDirection:n})}))));var r,n}},e.title)}return null};return n.createElement("div",{className:["table-helper",S?"py-5":"py-1"].join(" ")},n.createElement(o.LoaderIndicator,{isLoaded:!S},n.createElement(s.Row,null,n.createElement(s.Col,null,k&&n.createElement(d.PerPageHelperComponent,{onChangeFn:function(e){N?N((function(r){return t.__assign(t.__assign({},r),{page:e})})):X((function(r){return t.__assign(t.__assign({},r),{perPage:e})}))},defaultValue:null!==(f=null==v?void 0:v.per_page)&&void 0!==f?f:p.DEFAULT_PER_PAGE})),n.createElement(s.Col,null,j&&n.createElement(c.FilterHelperComponent,{onClickFn:function(e){N&&N((function(r){var n=r.page,i=t.__rest(r,["page"]),a=n;return(!e&&i.filter||e&&!i.filter)&&(a=1),t.__assign(t.__assign({},i),{page:a,filter:e})})),X((function(r){var n=r.page,i=t.__rest(r,["page"]),a=n;return(!e&&i.filter||e&&!i.filter)&&(a=1),t.__assign(t.__assign({},i),{page:a,filter:e})}))},defaultValue:null!==(m=W.filter)&&void 0!==m?m:""}))),n.createElement(s.Row,null,n.createElement(s.Col,null,n.createElement("div",{className:"table-responsive"},n.createElement(s.Table,{striped:b,bordered:D,hover:!0},n.createElement("thead",null,n.createElement("tr",null,y.map((function(e){return ne(e)})))),n.createElement("tbody",null,v?v.data.map((function(e,t){return E(e,t)})):null))))),n.createElement(g.PaginationHelperComponent,{displayShowingSection:w,paginator:v,onPageChangeFn:function(e){N?N((function(r){return t.__assign(t.__assign({},r),{page:e})})):X((function(r){return t.__assign(t.__assign({},r),{page:e})}))}})))};
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("tslib"),r=require("react"),n=e(r),i=require("react-router-dom"),a=e(require("@licklist/plugins/dist/services/Route/RouteService")),o=require("../static/loader/LoaderIndicator.js"),l=require("react-bootstrap"),s=e(require("@licklist/plugins/dist/hooks/Query/useQuery")),u=require("lodash"),c=require("./FilterHelperComponent.js"),p=require("./PaginationHelperComponent.js"),d=e(require("@licklist/plugins/dist/services/Table/TableService")),g=require("./PerPageHelperComponent.js"),f=require("./utils/index.js");exports.TableHelperComponent=function(e){var _,m,v=e.paginator,E=e.headers,y=e.renderItemFn,S=e.isLoading,h=e.onRefreshFn,C=e.refreshAt,P=e.striped,b=void 0===P||P,q=e.bordered,F=void 0===q||q,j=e.displaySearchBar,D=void 0===j||j,k=e.displayPerPageSelect,L=void 0===k||k,w=e.displayShowingSection,H=void 0===w||w,O=e.externalFilters,R=void 0===O?{}:O,T=e.initialOptions,N=void 0===T?{}:T,V=s(),K=i.useLocation().pathname,I=Number(f.getFilterOptionsValue(V,N,"page")),x=Number(f.getFilterOptionsValue(V,N,"perPage")),A=String(f.getFilterOptionsValue(V,N,"sortKey")),U=String(f.getFilterOptionsValue(V,N,"sortDirection")),Q=String(f.getFilterOptionsValue(V,N,"filter")),B=t.__read(r.useState(),2),G=B[0],M=B[1],z=t.__read(r.useState({page:I,perPage:x,sortKey:A,sortDirection:U,filter:Q}),2),J=z[0],W=z[1],X=t.__read(r.useState(0),2),Y=X[0],Z=X[1],$=t.__read(r.useState(R),2),ee=$[0],te=$[1];r.useEffect((function(){u.isEqual(G,J)&&u.isEqual(ee,R)||(M(J),te(R),h&&h(J),a.redirectTo([K,["page=".concat(J.page),"perPage=".concat(J.perPage),"sortKey=".concat(escape(J.sortKey)),"sortDirection=".concat(escape(J.sortDirection)),"filter=".concat(escape(J.filter)),new URLSearchParams(R).toString()].join("&")].join("?")))}),[K,J,h,R]),r.useEffect((function(){Y!==C&&(Z((function(e){return null!=C?C:e})),h&&h(J))}),[h,J,C,Y]);var re=function(e){var r,i;if("string"==typeof e)return n.createElement("th",{key:e.toLowerCase(),className:d.getHeaderClasses(e,A,U)},e);if("object"==typeof e){var a={width:null!==(r=e.width)&&void 0!==r?r:"auto"};return n.createElement("th",{key:null!==(i=e.key)&&void 0!==i?i:e.title.toLowerCase(),className:d.getHeaderClasses(e,A,U),style:a,onClick:function(){return e.isSortable&&(r=e.key,n=d.DEFAULT_SORT_DIRECTION,void W(A===r?function(e){return n=d.getSortDirection(e.sortDirection,n),t.__assign(t.__assign({},e),{sortKey:r,sortDirection:n})}:function(e){return t.__assign(t.__assign({},e),{sortKey:r,sortDirection:n})}));var r,n}},e.title)}return null};return n.createElement("div",{className:["table-helper",S?"py-5":"py-1"].join(" ")},n.createElement(o.LoaderIndicator,{isLoaded:!S},n.createElement(l.Row,null,n.createElement(l.Col,null,L&&n.createElement(g.PerPageHelperComponent,{onChangeFn:function(e){W((function(r){return t.__assign(t.__assign({},r),{perPage:e})}))},defaultValue:null!==(_=null==v?void 0:v.per_page)&&void 0!==_?_:d.DEFAULT_PER_PAGE})),n.createElement(l.Col,null,D&&n.createElement(c.FilterHelperComponent,{onClickFn:function(e){W((function(r){var n=r.page,i=t.__rest(r,["page"]),a=n;return(!e&&i.filter||e&&!i.filter)&&(a=1),t.__assign(t.__assign({},i),{page:a,filter:e})}))},defaultValue:null!==(m=J.filter)&&void 0!==m?m:""}))),n.createElement(l.Row,null,n.createElement(l.Col,null,n.createElement("div",{className:"table-responsive"},n.createElement(l.Table,{striped:b,bordered:F,hover:!0},n.createElement("thead",null,n.createElement("tr",null,E.map((function(e){return re(e)})))),n.createElement("tbody",null,v?v.data.map((function(e,t){return y(e,t)})):null))))),n.createElement(p.PaginationHelperComponent,{displayShowingSection:H,paginator:v,onPageChangeFn:function(e){W((function(r){return t.__assign(t.__assign({},r),{page:e})}))}})))};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@licklist/design",
3
- "version": "0.50.0-dev.2",
3
+ "version": "0.50.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+ssh://git@bitbucket.org/artelogicsoft/licklist_design.git"
@@ -53,9 +53,9 @@
53
53
  "@fortawesome/free-brands-svg-icons": "5.15.2",
54
54
  "@fortawesome/free-solid-svg-icons": "5.15.2",
55
55
  "@fortawesome/react-fontawesome": "0.1.9",
56
- "@licklist/core": ">=0.15.41-dev.0 < 0.15.41",
56
+ "@licklist/core": "^0.17.0",
57
57
  "@licklist/eslint-config": "0.3.4",
58
- "@licklist/plugins": ">=0.24.0-dev.0 < 0.24.0",
58
+ "@licklist/plugins": "^0.23.0",
59
59
  "@mdx-js/react": "1.6.22",
60
60
  "@popperjs/core": "2.11.8",
61
61
  "@react-aria/utils": "3.9.0",
@@ -4,9 +4,6 @@ import { ZoneResourcesAvailability } from "@licklist/core/dist/DataMapper/Order/
4
4
  import { CalendarButtons } from "./components/CalendarButtons";
5
5
  import { CalendarDates } from "./components/CalendarDates";
6
6
 
7
- // same as apps/iframe/src/types/availability.ts
8
- export type AvailableTimes = Record<string, string[]>;
9
-
10
7
  export const defaultStartDay = DateTime.now().set({
11
8
  millisecond: 0,
12
9
  second: 0,
@@ -26,8 +23,6 @@ export type CalendarProps = {
26
23
  initialDate?: DateTime;
27
24
  getAvailability?: (date: DateTime) => ZoneResourcesAvailability | null;
28
25
  includeAvailability?: boolean;
29
- availableTimes?: AvailableTimes;
30
- shouldCalculateResources?: boolean;
31
26
  };
32
27
 
33
28
  export const Calendar = ({
@@ -4,7 +4,7 @@ import { useTranslation } from "react-i18next";
4
4
  import { range } from "lodash";
5
5
  import { ReactComponent as SelectArrow } from "../../../assets/iframe/selectArrow.svg";
6
6
  import { CalendarSelect } from "../CalendarSelect";
7
- import { isDateDisabled } from "../../utils";
7
+ import { isSelectedDateDisabled } from "../../utils";
8
8
  import { CalendarProps } from "../../Calendar";
9
9
 
10
10
  type CalendarButtonsProps = Pick<
@@ -66,7 +66,7 @@ export const CalendarButtons = ({
66
66
  const onTodayClick = () => {
67
67
  setCurrentDate(initialDate);
68
68
 
69
- if (isDateDisabled(initialDate, disabledDates)) return;
69
+ if (isSelectedDateDisabled(initialDate, disabledDates)) return;
70
70
 
71
71
  setSelectedDate(initialDate);
72
72
  };
@@ -75,7 +75,7 @@ export const CalendarButtons = ({
75
75
  const nextDate = initialDate.set({ day: initialDate.day + 1 });
76
76
  setCurrentDate(nextDate);
77
77
 
78
- if (isDateDisabled(nextDate, disabledDates)) return;
78
+ if (isSelectedDateDisabled(nextDate, disabledDates)) return;
79
79
 
80
80
  setSelectedDate(nextDate);
81
81
  };
@@ -2,7 +2,7 @@ import React, { useMemo } from "react";
2
2
  import { DateTime } from "luxon";
3
3
  import { DateTimeButton, Variant } from "../../../date-time-button";
4
4
  import { CalendarWeekdays } from "../CalendarWeekdays";
5
- import { isDateDisabled } from "../../utils";
5
+ import { isSelectedDateDisabled } from "../../utils";
6
6
  import { CalendarProps } from "../../Calendar";
7
7
 
8
8
  export type CalendarDatesProps = Omit<
@@ -19,8 +19,6 @@ export const CalendarDates = ({
19
19
  fromPrice,
20
20
  getAvailability,
21
21
  includeAvailability,
22
- shouldCalculateResources,
23
- availableTimes,
24
22
  }: CalendarDatesProps) => {
25
23
  const fillCalendarDates = useMemo(() => {
26
24
  let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
@@ -47,7 +45,7 @@ export const CalendarDates = ({
47
45
  if (date === null) return <div />;
48
46
 
49
47
  const isDisabled =
50
- isLoading || isDateDisabled(date, disabledDates, availableTimes);
48
+ isLoading || isSelectedDateDisabled(date, disabledDates);
51
49
 
52
50
  return (
53
51
  <DateTimeButton
@@ -62,7 +60,6 @@ export const CalendarDates = ({
62
60
  resources={getAvailability?.(date)}
63
61
  showResources={includeAvailability}
64
62
  variant={Variant.month}
65
- shouldCalculateResources={shouldCalculateResources}
66
63
  />
67
64
  );
68
65
  })}
@@ -1,22 +1,13 @@
1
1
  import { DateTime, Interval } from "luxon";
2
2
  import isEqual from "lodash/isEqual";
3
- import { DATE_FORMAT } from "@licklist/core/dist/Config";
4
- import { AvailableTimes } from "../Calendar";
5
3
 
6
- export const isDateDisabled = (
7
- date: DateTime,
8
- disabledDates: DateTime[] = [],
9
- availableTimes?: AvailableTimes
10
- ): boolean => {
11
- const disabledByDates = !!disabledDates.find((disabledDate) =>
12
- isEqual(disabledDate.toObject(), date.toObject())
4
+ export const isSelectedDateDisabled = (
5
+ selectedDate: DateTime,
6
+ disabledDates: DateTime[] = []
7
+ ) => {
8
+ return !!disabledDates.find((disabledDate) =>
9
+ isEqual(disabledDate.toObject(), selectedDate.toObject())
13
10
  );
14
-
15
- const noAvailableTimes = availableTimes
16
- ? !availableTimes?.[date.toFormat(DATE_FORMAT)]
17
- : false;
18
-
19
- return disabledByDates || noAvailableTimes;
20
11
  };
21
12
 
22
13
  export const getMonthCalendarDates = (initialDate: DateTime): DateTime[] => {
@@ -2,7 +2,6 @@ import React, { ReactElement } from "react";
2
2
  import clsx from "clsx";
3
3
  import { DateTime } from "luxon";
4
4
  import { ZoneResourcesAvailability } from "@licklist/core/dist/DataMapper/Order/ZoneResourcesAvailabilityDataMapper";
5
- import { has } from "lodash";
6
5
  import { AvailabilityIndicator } from "../availability-indicator";
7
6
  import { DateContent } from "./DateContent";
8
7
 
@@ -19,9 +18,8 @@ export type DateTimeButtonProps = {
19
18
  isSoldOut?: boolean;
20
19
  onSelect: (date: DateTime) => void;
21
20
  price?: string | number | ReactElement | null;
22
- resources: ZoneResourcesAvailability | null | undefined;
21
+ resources?: ZoneResourcesAvailability | null;
23
22
  showResources?: boolean;
24
- shouldCalculateResources?: boolean;
25
23
  variant: Variant;
26
24
  };
27
25
 
@@ -34,28 +32,17 @@ export const DateTimeButton = ({
34
32
  price,
35
33
  resources,
36
34
  showResources,
37
- shouldCalculateResources = true,
38
35
  variant = Variant.week,
39
36
  }: DateTimeButtonProps) => {
40
37
  const isSoldOut =
41
38
  _isSoldOut ||
42
- // only consider resources if shouldCalculateResources is true
43
- (shouldCalculateResources &&
44
- resources &&
45
- resources.bookedResources >= resources.totalResources);
39
+ (resources && resources.bookedResources >= resources.totalResources);
46
40
 
47
41
  const isTimeVariant = variant === Variant.time;
48
42
 
49
43
  const isTimeInPast = isTimeVariant && isDateInPast(date);
50
44
 
51
- const noResources =
52
- shouldCalculateResources &&
53
- // only consider resources if shouldCalculateResources is true
54
- (!resources ||
55
- !has(resources, "bookedResources") ||
56
- !has(resources, "totalResources"));
57
-
58
- const isDisabled = _isDisabled || isSoldOut || isTimeInPast || noResources;
45
+ const isDisabled = _isDisabled || isSoldOut || isTimeInPast;
59
46
 
60
47
  return (
61
48
  <button
@@ -33,7 +33,6 @@ export const Default: Story<EventCardProps> = () => {
33
33
  RuPaul's Drag Race UK to VINYL Cambridge! So get excited because
34
34
  the...`}
35
35
  date="2023-08-31T09:35:00.000+03:00"
36
- productSetName="New product set"
37
36
  imageUrl={showImage ? `https://source.unsplash.com/random` : null}
38
37
  hasPermission={hasPermission}
39
38
  onPreview={() => undefined}
@@ -30,7 +30,6 @@ export interface EventCardProps extends HasPermissionProp {
30
30
  onStatistic: () => void;
31
31
  titleId?: string;
32
32
  descriptionId?: string;
33
- productSetName?: string;
34
33
  }
35
34
 
36
35
  export function EventCard({
@@ -44,7 +43,6 @@ export function EventCard({
44
43
  onCopy,
45
44
  onRemove,
46
45
  hasPermission = true,
47
- productSetName,
48
46
  onStatistic,
49
47
  eventStatistic,
50
48
  titleId,
@@ -125,12 +123,7 @@ export function EventCard({
125
123
  ))}
126
124
  </div>
127
125
  </Card.Body>
128
- <Card.Footer className="flex-column">
129
- {productSetName && (
130
- <div className="pl-3 text-truncate">
131
- {t("Design:productSet")}: {productSetName}
132
- </div>
133
- )}
126
+ <Card.Footer>
134
127
  <div className="d-flex w-100 justify-content-between">
135
128
  <div className="d-flex">
136
129
  <button
@@ -27,7 +27,7 @@ export function EventBookingProducts({
27
27
  <AccordionItem
28
28
  key={productsCategory.id}
29
29
  eventKey={`${productsCategory.id}`}
30
- productCategoryId={productsCategory.id}
30
+ productsCategoryId={productsCategory.id}
31
31
  name={productsCategory.name}
32
32
  products={productsCategory.products}
33
33
  order={order}