@licklist/design 0.50.0 → 0.50.1-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.
- package/dist/calendar/Calendar.d.ts +3 -0
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/components/CalendarButtons/CalendarButtons.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/calendar/utils/index.d.ts +2 -1
- package/dist/calendar/utils/index.d.ts.map +1 -1
- package/dist/calendar/utils/index.js +1 -1
- package/dist/date-time-button/DateTimeButton.d.ts +3 -2
- package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
- package/dist/date-time-button/DateTimeButton.js +1 -1
- 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 +1 -1
- package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
- package/dist/iframe/event/event-booking-products/EventBookingProducts.js +1 -1
- package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts +2 -2
- package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.d.ts.map +1 -1
- package/dist/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
- package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts +2 -1
- package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.d.ts +1 -1
- 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 +1 -1
- package/dist/iframe/order-process/components/utils/useCategoryVerification.js +1 -1
- package/dist/index.js +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.d.ts.map +1 -1
- package/dist/notification/email-template/control/EmailTemplateControl.js +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +2 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
- package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
- package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
- package/dist/static/date-range-input/DateRangeInput.js +1 -1
- package/dist/static/switch/BooleanSwitch.d.ts +3 -1
- package/dist/static/switch/BooleanSwitch.d.ts.map +1 -1
- package/dist/static/switch/BooleanSwitch.js +1 -1
- package/dist/styles/events/EventCard.scss +3 -6
- package/dist/styles/resources-blocking/_index.scss +6 -0
- package/dist/styles/sales/BookingFilter.scss +21 -1
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/styles/sales/BookingTabs.scss +63 -5
- package/dist/styles/sales/LifeTimeSales.scss +1 -0
- package/dist/styles/sales/ManualBooking.scss +62 -3
- package/dist/styles/sales/SourceOfSales.scss +3 -0
- package/dist/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
- package/dist/styles/static/Switch.scss +1 -0
- package/dist/styles/static/Tabs.scss +6 -0
- package/dist/styles/themes/bookedit/_index.scss +9 -8
- package/dist/table/TableHelperComponent.d.ts +2 -1
- package/dist/table/TableHelperComponent.d.ts.map +1 -1
- package/dist/table/TableHelperComponent.js +1 -1
- package/package.json +3 -3
- package/src/calendar/Calendar.tsx +5 -0
- package/src/calendar/components/CalendarButtons/CalendarButtons.tsx +3 -3
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -2
- package/src/calendar/utils/index.ts +15 -6
- package/src/date-time-button/DateTimeButton.tsx +16 -3
- package/src/events/event-card/EventCard.stories.tsx +1 -0
- package/src/events/event-card/EventCard.tsx +8 -1
- package/src/iframe/event/event-booking-products/EventBookingProducts.tsx +1 -1
- package/src/iframe/event/event-booking-products/components/AccordionItem/AccordionItem.tsx +8 -8
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +5 -5
- package/src/iframe/order-process/components/BookingSummary/components/ProductsByMenuStep/ProductsByMenuStep.tsx +2 -2
- package/src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx +16 -3
- package/src/iframe/order-process/components/CategoryProduct/components/ProductQuantityInput/ProductQuantityInput.tsx +2 -2
- package/src/iframe/order-process/components/utils/useCategoryVerification.ts +1 -1
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +1 -1
- package/src/notification/email-template/control/EmailTemplateControl.tsx +5 -15
- package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +9 -1
- package/src/static/date-range-input/DateRangeInput.tsx +23 -2
- package/src/static/switch/BooleanSwitch.tsx +6 -2
- package/src/styles/events/EventCard.scss +3 -6
- package/src/styles/resources-blocking/_index.scss +6 -0
- package/src/styles/sales/BookingFilter.scss +21 -1
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/styles/sales/BookingTabs.scss +63 -5
- package/src/styles/sales/LifeTimeSales.scss +1 -0
- package/src/styles/sales/ManualBooking.scss +62 -3
- package/src/styles/sales/SourceOfSales.scss +3 -0
- package/src/styles/snippet-templates/SnippetTemplateCard.scss +3 -2
- package/src/styles/static/Switch.scss +1 -0
- package/src/styles/static/Tabs.scss +6 -0
- package/src/styles/themes/bookedit/_index.scss +9 -8
- package/src/table/TableHelperComponent.tsx +73 -18
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),r=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,a=require("react-i18next"),i=require("react-bootstrap"),s=require("../Icon.js"),o=require("@react-aria/utils"),u=require("react-date-range"),c=require("react-use"),l=require("./utils/index.js"),d=require("../../iframe/order-process/components/BookingSummary/types/index.js");require("react-date-range/dist/styles.css"),require("react-date-range/dist/theme/default.css"),require("../index.js");var m={name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;Object.assign(t.styles.popper,{marginLeft:"-2px",maxWidth:"unset"})},effect:function(e){var t=e.state;Object.assign(t.elements.popper.style,{maxWidth:"unset"})}};exports.DateRangeInput=function(e){var f=e.placeholder,p=e.startDate,g=e.endDate,D=e.onDateChange,v=e.months,h=void 0===v?2:v,y=e.disabled,_=a.useTranslation("Design").t,E=t.__read(n.useState("horizontal"),2),w=E[0],q=E[1],b=t.__read(n.useState([{startDate:new Date,endDate:new Date,key:"selection"}]),2),x=b[0],j=b[1],k=t.__read(n.useState(!1),2),C=k[0],S=k[1],I=o.useId(),N=n.useRef();c.useClickAway(N,(function(){return S(!1)}));return n.useEffect((function(){p&&g&&j((function(e){return[t.__assign(t.__assign({},e[0]),l.stringDatesToJSDates({startDate:p,endDate:g}))]}))}),[p,g]),n.useEffect((function(){var e=function(){window.innerWidth>d.MOBILE_WIDTH?q("horizontal"):q("vertical")};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}}),[]),r.createElement("div",null,r.createElement(i.OverlayTrigger,{show:C,overlay:r.createElement(i.Popover,{id:I,className:"rounded"},r.createElement(i.Popover.Content,{className:"shadow-lg rounded",ref:N},r.createElement(u.DateRange,{onChange:function(e){return j([e.selection])},moveRangeOnFirstSelection:!1,ranges:x,months:h,direction:w}),r.createElement("div",{className:"mt-3 d-flex justify-content-end"},r.createElement(i.Button,{onClick:function(){D&&D({}),j((function(e){return[t.__assign(t.__assign({},e[0]),{startDate:new Date,endDate:new Date})]})),S(!1)},variant:"link"},_("clear")),r.createElement(i.Button,{onClick:function(){D&&D(l.rangeDatesToStringDates(x)),S(!1)},className:"ml-3",variant:"link"},_("apply"))))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[m]}},r.createElement("div",{onClick:function(){return S((function(e){return!e}))},onKeyDown:function(){return S((function(e){return!e}))},role:"button",tabIndex:0,className:"date-range-input-wrapper"},r.createElement(i.Form.Control,{type:"input",placeholder:f,disabled:y,readOnly:!0,className:"date-range-input",value:l.stringDatesToInputValue({startDate:p,endDate:g})}),r.createElement(s.default,{type:"calendar",height:"1rem",className:"date-range-input-icon"}))))};
|
|
@@ -4,6 +4,8 @@ export interface BooleanSwitchProps {
|
|
|
4
4
|
value?: boolean;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
onChange: (value: boolean) => void;
|
|
7
|
+
firstValueTitle?: string;
|
|
8
|
+
secondValueTitle?: string;
|
|
7
9
|
}
|
|
8
|
-
export declare function BooleanSwitch({ name, value, disabled, onChange, }: BooleanSwitchProps): JSX.Element;
|
|
10
|
+
export declare function BooleanSwitch({ name, value, disabled, onChange, firstValueTitle, secondValueTitle, }: BooleanSwitchProps): JSX.Element;
|
|
9
11
|
//# sourceMappingURL=BooleanSwitch.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BooleanSwitch.d.ts","sourceRoot":"","sources":["../../../src/static/switch/BooleanSwitch.tsx"],"names":[],"mappings":";AAKA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;
|
|
1
|
+
{"version":3,"file":"BooleanSwitch.d.ts","sourceRoot":"","sources":["../../../src/static/switch/BooleanSwitch.tsx"],"names":[],"mappings":";AAKA,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,gBAAgB,GACjB,EAAE,kBAAkB,eAwBpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),a=require("react"),i=(e=a)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-i18next"),l=require("./Switch.js");exports.BooleanSwitch=function(e){var r=e.name,u=e.value,o=e.disabled,s=e.onChange,c=e.firstValueTitle,d=e.secondValueTitle,v=n.useTranslation("Design").t,b=[{id:1,value:null!=c?c:v("yes")},{id:0,value:null!=d?d:v("no")}],f=a.useCallback((function(e){s(Boolean(e))}),[s]);return i.createElement(l.Switch,t.__assign({name:r},void 0!==u&&{value:Number(u)},{options:b,disabled:o,onChange:f}))};
|
|
@@ -7,8 +7,6 @@ $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
|
-
|
|
12
10
|
$event-card-image-container-overflow-top: sp(3) !default;
|
|
13
11
|
$event-card-image-container-overflow-x: sp(3) !default;
|
|
14
12
|
$event-card-image-container-aspect-ratio: 1.6 !default;
|
|
@@ -34,7 +32,7 @@ $event-card-views-gutter: sp(3) !default;
|
|
|
34
32
|
transition: ease-in 0.25s;
|
|
35
33
|
border-radius: $event-card-border-radius;
|
|
36
34
|
|
|
37
|
-
|
|
35
|
+
> * + * {
|
|
38
36
|
margin-top: $event-card-contents-gutter;
|
|
39
37
|
}
|
|
40
38
|
|
|
@@ -54,7 +52,7 @@ $event-card-views-gutter: sp(3) !default;
|
|
|
54
52
|
min-height: 13.75rem;
|
|
55
53
|
max-height: 22rem;
|
|
56
54
|
}
|
|
57
|
-
|
|
55
|
+
}
|
|
58
56
|
}
|
|
59
57
|
|
|
60
58
|
.card-title {
|
|
@@ -74,7 +72,6 @@ $event-card-views-gutter: sp(3) !default;
|
|
|
74
72
|
border: unset;
|
|
75
73
|
border-radius: unset;
|
|
76
74
|
padding: 0;
|
|
77
|
-
height: $event-card-footer-height;
|
|
78
75
|
|
|
79
76
|
svg {
|
|
80
77
|
height: 100%;
|
|
@@ -175,4 +172,4 @@ $event-card-views-gutter: sp(3) !default;
|
|
|
175
172
|
color: #504f4f;
|
|
176
173
|
width: 1.7rem;
|
|
177
174
|
}
|
|
178
|
-
}
|
|
175
|
+
}
|
|
@@ -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 {
|
|
@@ -164,10 +177,12 @@
|
|
|
164
177
|
|
|
165
178
|
@include media-breakpoint-down(md) {
|
|
166
179
|
flex-wrap: wrap;
|
|
180
|
+
|
|
167
181
|
.date-container {
|
|
168
182
|
width: 100%;
|
|
169
183
|
flex: 1;
|
|
170
184
|
}
|
|
185
|
+
|
|
171
186
|
.btn-primary {
|
|
172
187
|
margin-top: 1rem;
|
|
173
188
|
}
|
|
@@ -228,6 +243,11 @@
|
|
|
228
243
|
transform: rotate(45deg);
|
|
229
244
|
}
|
|
230
245
|
}
|
|
246
|
+
|
|
247
|
+
@include media-breakpoint-down(sm) {
|
|
248
|
+
flex-direction: column;
|
|
249
|
+
justify-content: flex-start;
|
|
250
|
+
}
|
|
231
251
|
}
|
|
232
252
|
}
|
|
233
|
-
}
|
|
253
|
+
}
|
|
@@ -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
|
|
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
|
|
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
|
}
|
|
@@ -361,10 +361,11 @@
|
|
|
361
361
|
width: inherit;
|
|
362
362
|
|
|
363
363
|
@include media-breakpoint-down(sm) {
|
|
364
|
-
|
|
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
|
+
}
|
|
@@ -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
|
+
}
|
|
@@ -27,6 +27,7 @@ $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;
|
|
30
31
|
|
|
31
32
|
&:hover,
|
|
32
33
|
&:active,
|
|
@@ -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,
|
|
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;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { SetStateAction } from "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,6 +18,7 @@ export interface TableHelperComponentProps {
|
|
|
18
18
|
[key: string]: any;
|
|
19
19
|
};
|
|
20
20
|
initialOptions?: Partial<ITableProps>;
|
|
21
|
+
filteredOrdersOptions?: (value: SetStateAction<ITableProps>) => void;
|
|
21
22
|
}
|
|
22
23
|
/**
|
|
23
24
|
* TableHelperComponent
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableHelperComponent.d.ts","sourceRoot":"","sources":["../../src/table/TableHelperComponent.tsx"],"names":[],"mappings":";
|
|
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 +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"),
|
|
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})}))}})))};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@licklist/design",
|
|
3
|
-
"version": "0.50.0",
|
|
3
|
+
"version": "0.50.1-dev.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": "
|
|
56
|
+
"@licklist/core": ">=0.15.41-dev.0 < 0.15.41",
|
|
57
57
|
"@licklist/eslint-config": "0.3.4",
|
|
58
|
-
"@licklist/plugins": "
|
|
58
|
+
"@licklist/plugins": ">=0.24.0-dev.0 < 0.24.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,6 +4,9 @@ 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
|
+
|
|
7
10
|
export const defaultStartDay = DateTime.now().set({
|
|
8
11
|
millisecond: 0,
|
|
9
12
|
second: 0,
|
|
@@ -23,6 +26,8 @@ export type CalendarProps = {
|
|
|
23
26
|
initialDate?: DateTime;
|
|
24
27
|
getAvailability?: (date: DateTime) => ZoneResourcesAvailability | null;
|
|
25
28
|
includeAvailability?: boolean;
|
|
29
|
+
availableTimes?: AvailableTimes;
|
|
30
|
+
shouldCalculateResources?: boolean;
|
|
26
31
|
};
|
|
27
32
|
|
|
28
33
|
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 {
|
|
7
|
+
import { isDateDisabled } 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 (
|
|
69
|
+
if (isDateDisabled(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 (
|
|
78
|
+
if (isDateDisabled(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 {
|
|
5
|
+
import { isDateDisabled } from "../../utils";
|
|
6
6
|
import { CalendarProps } from "../../Calendar";
|
|
7
7
|
|
|
8
8
|
export type CalendarDatesProps = Omit<
|
|
@@ -19,6 +19,8 @@ export const CalendarDates = ({
|
|
|
19
19
|
fromPrice,
|
|
20
20
|
getAvailability,
|
|
21
21
|
includeAvailability,
|
|
22
|
+
shouldCalculateResources,
|
|
23
|
+
availableTimes,
|
|
22
24
|
}: CalendarDatesProps) => {
|
|
23
25
|
const fillCalendarDates = useMemo(() => {
|
|
24
26
|
let firstDayOfWeek = calendarDates[0]?.weekday ?? 0;
|
|
@@ -45,7 +47,7 @@ export const CalendarDates = ({
|
|
|
45
47
|
if (date === null) return <div />;
|
|
46
48
|
|
|
47
49
|
const isDisabled =
|
|
48
|
-
isLoading ||
|
|
50
|
+
isLoading || isDateDisabled(date, disabledDates, availableTimes);
|
|
49
51
|
|
|
50
52
|
return (
|
|
51
53
|
<DateTimeButton
|
|
@@ -60,6 +62,7 @@ export const CalendarDates = ({
|
|
|
60
62
|
resources={getAvailability?.(date)}
|
|
61
63
|
showResources={includeAvailability}
|
|
62
64
|
variant={Variant.month}
|
|
65
|
+
shouldCalculateResources={shouldCalculateResources}
|
|
63
66
|
/>
|
|
64
67
|
);
|
|
65
68
|
})}
|
|
@@ -1,13 +1,22 @@
|
|
|
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";
|
|
3
5
|
|
|
4
|
-
export const
|
|
5
|
-
|
|
6
|
-
disabledDates: DateTime[] = []
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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())
|
|
10
13
|
);
|
|
14
|
+
|
|
15
|
+
const noAvailableTimes = availableTimes
|
|
16
|
+
? !availableTimes?.[date.toFormat(DATE_FORMAT)]
|
|
17
|
+
: false;
|
|
18
|
+
|
|
19
|
+
return disabledByDates || noAvailableTimes;
|
|
11
20
|
};
|
|
12
21
|
|
|
13
22
|
export const getMonthCalendarDates = (initialDate: DateTime): DateTime[] => {
|