@licklist/design 0.49.0-dev.2 → 0.49.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 (58) hide show
  1. package/dist/calendar/Calendar.d.ts +0 -1
  2. package/dist/calendar/Calendar.d.ts.map +1 -1
  3. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +1 -1
  4. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  5. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  6. package/dist/date-time-button/DateTimeButton.d.ts +2 -3
  7. package/dist/date-time-button/DateTimeButton.d.ts.map +1 -1
  8. package/dist/date-time-button/DateTimeButton.js +1 -1
  9. package/dist/events/event-venue-map/components/Scrollbars/Scrollbars.js +1 -1
  10. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  11. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts +1 -2
  12. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.d.ts.map +1 -1
  13. package/dist/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.js +1 -1
  14. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  15. package/dist/product-set/product/ProductControl.js +1 -1
  16. package/dist/product-set/product/duration/ProductDurationControl.d.ts +2 -1
  17. package/dist/product-set/product/duration/ProductDurationControl.d.ts.map +1 -1
  18. package/dist/product-set/product/duration/ProductDurationControl.js +1 -1
  19. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts +1 -2
  20. package/dist/sales/manual-booking/summary/ManualBookingSummary.d.ts.map +1 -1
  21. package/dist/sales/manual-booking/summary/ManualBookingSummary.js +1 -1
  22. package/dist/static/date-range-input/DateRangeInput.d.ts.map +1 -1
  23. package/dist/static/date-range-input/DateRangeInput.js +1 -1
  24. package/dist/static/switch/BooleanSwitch.d.ts +1 -3
  25. package/dist/static/switch/BooleanSwitch.d.ts.map +1 -1
  26. package/dist/static/switch/BooleanSwitch.js +1 -1
  27. package/dist/styles/resources-blocking/_index.scss +0 -6
  28. package/dist/styles/sales/BookingFilter.scss +1 -21
  29. package/dist/styles/sales/BookingResults.scss +1 -1
  30. package/dist/styles/sales/BookingTabs.scss +5 -63
  31. package/dist/styles/sales/LifeTimeSales.scss +0 -1
  32. package/dist/styles/sales/ManualBooking.scss +2 -56
  33. package/dist/styles/sales/SourceOfSales.scss +0 -3
  34. package/dist/styles/static/Switch.scss +0 -1
  35. package/dist/styles/static/Tabs.scss +0 -6
  36. package/dist/table/TableHelperComponent.d.ts +1 -2
  37. package/dist/table/TableHelperComponent.d.ts.map +1 -1
  38. package/dist/table/TableHelperComponent.js +1 -1
  39. package/package.json +3 -3
  40. package/src/calendar/Calendar.tsx +0 -1
  41. package/src/calendar/components/CalendarDates/CalendarDates.tsx +0 -2
  42. package/src/date-time-button/DateTimeButton.tsx +3 -16
  43. package/src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx +3 -16
  44. package/src/product-set/product/ProductControl.tsx +4 -1
  45. package/src/product-set/product/duration/ProductDurationControl.tsx +9 -10
  46. package/src/sales/manual-booking/summary/ManualBookingSummary.tsx +1 -9
  47. package/src/static/date-range-input/DateRangeInput.tsx +2 -23
  48. package/src/static/switch/BooleanSwitch.tsx +2 -6
  49. package/src/styles/resources-blocking/_index.scss +0 -6
  50. package/src/styles/sales/BookingFilter.scss +1 -21
  51. package/src/styles/sales/BookingResults.scss +1 -1
  52. package/src/styles/sales/BookingTabs.scss +5 -63
  53. package/src/styles/sales/LifeTimeSales.scss +0 -1
  54. package/src/styles/sales/ManualBooking.scss +2 -56
  55. package/src/styles/sales/SourceOfSales.scss +0 -3
  56. package/src/styles/static/Switch.scss +0 -1
  57. package/src/styles/static/Tabs.scss +0 -6
  58. package/src/table/TableHelperComponent.tsx +18 -73
@@ -14,7 +14,6 @@ export type CalendarProps = {
14
14
  initialDate?: DateTime;
15
15
  getAvailability?: (date: DateTime) => ZoneResourcesAvailability | null;
16
16
  includeAvailability?: boolean;
17
- shouldCalculateResources?: boolean;
18
17
  };
19
18
  export declare const Calendar: ({ disabledDates, initialDate, ...props }: CalendarProps) => JSX.Element;
20
19
  //# sourceMappingURL=Calendar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAC;AAIrH,eAAO,MAAM,eAAe,UAK1B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnD,aAAa,EAAE,QAAQ,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,yBAAyB,GAAG,IAAI,CAAC;IACvE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC,CAAC;AAEF,eAAO,MAAM,QAAQ,6CAIlB,aAAa,gBAaf,CAAC"}
1
+ {"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../src/calendar/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAC;AAIrH,eAAO,MAAM,eAAe,UAK1B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG;IAC1B,WAAW,EAAE,QAAQ,CAAC;IACtB,cAAc,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,CAAC;IACnD,aAAa,EAAE,QAAQ,EAAE,CAAC;IAC1B,aAAa,CAAC,EAAE,QAAQ,EAAE,CAAC;IAC3B,YAAY,EAAE,QAAQ,GAAG,IAAI,CAAC;IAC9B,eAAe,EAAE,QAAQ,CAAC,cAAc,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAC,CAAC;IAC3D,SAAS,CAAC,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,eAAe,CAAC,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,yBAAyB,GAAG,IAAI,CAAC;IACvE,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,eAAO,MAAM,QAAQ,6CAIlB,aAAa,gBAaf,CAAC"}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CalendarProps } from "../../Calendar";
3
3
  export type CalendarDatesProps = Omit<CalendarProps, "currentDate" | "setCurrentDate" | "initialDate">;
4
- export declare const CalendarDates: ({ disabledDates, isLoading, calendarDates, selectedDate, setSelectedDate, fromPrice, getAvailability, includeAvailability, shouldCalculateResources, }: CalendarDatesProps) => JSX.Element;
4
+ export declare const CalendarDates: ({ disabledDates, isLoading, calendarDates, selectedDate, setSelectedDate, fromPrice, getAvailability, includeAvailability, }: CalendarDatesProps) => JSX.Element;
5
5
  //# sourceMappingURL=CalendarDates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACb,aAAa,GAAG,gBAAgB,GAAG,aAAa,CACjD,CAAC;AAEF,eAAO,MAAM,aAAa,2JAUvB,kBAAkB,gBAgDpB,CAAC"}
1
+ {"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACb,aAAa,GAAG,gBAAgB,GAAG,aAAa,CACjD,CAAC;AAEF,eAAO,MAAM,aAAa,iIASvB,kBAAkB,gBA+CpB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),r=require("react"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,l=require("../../utils/index.js"),i=require("../../../date-time-button/DateTimeButton.js"),d=require("../CalendarWeekdays/CalendarWeekdays.js");exports.CalendarDates=function(e){var s=e.disabledDates,n=void 0===s?[]:s,u=e.isLoading,o=void 0!==u&&u,c=e.calendarDates,v=e.selectedDate,m=e.setSelectedDate,f=e.fromPrice,y=e.getAvailability,p=e.includeAvailability,D=e.shouldCalculateResources,_=r.useMemo((function(){var e,r,t=null!==(r=null===(e=c[0])||void 0===e?void 0:e.weekday)&&void 0!==r?r:0;if(1===t)return c;for(var l=[];t>1;)l.push(null),t-=1;return a.__spreadArray(a.__spreadArray([],a.__read(l),!1),a.__read(c),!1)}),[c]);return t.createElement("div",{className:"calendar-dates-wrapper"},t.createElement(d.CalendarWeekdays,null),t.createElement("div",{className:"calendar-dates"},_.map((function(e){if(null===e)return t.createElement("div",null);var a=o||l.isSelectedDateDisabled(e,n);return t.createElement(i.DateTimeButton,{key:+e,isDisabled:a,isSelected:v?e.hasSame(v,"day"):void 0,date:e,onSelect:function(){return m(e)},price:f,resources:null==y?void 0:y(e),showResources:p,variant:i.Variant.month,shouldCalculateResources:D})}))))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),r=require("react"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,i=require("../../utils/index.js"),l=require("../../../date-time-button/DateTimeButton.js"),d=require("../CalendarWeekdays/CalendarWeekdays.js");exports.CalendarDates=function(e){var n=e.disabledDates,s=void 0===n?[]:n,u=e.isLoading,o=void 0!==u&&u,c=e.calendarDates,v=e.selectedDate,m=e.setSelectedDate,f=e.fromPrice,y=e.getAvailability,p=e.includeAvailability,D=r.useMemo((function(){var e,r,t=null!==(r=null===(e=c[0])||void 0===e?void 0:e.weekday)&&void 0!==r?r:0;if(1===t)return c;for(var i=[];t>1;)i.push(null),t-=1;return a.__spreadArray(a.__spreadArray([],a.__read(i),!1),a.__read(c),!1)}),[c]);return t.createElement("div",{className:"calendar-dates-wrapper"},t.createElement(d.CalendarWeekdays,null),t.createElement("div",{className:"calendar-dates"},D.map((function(e){if(null===e)return t.createElement("div",null);var a=o||i.isSelectedDateDisabled(e,s);return t.createElement(l.DateTimeButton,{key:+e,isDisabled:a,isSelected:v?e.hasSame(v,"day"):void 0,date:e,onSelect:function(){return m(e)},price:f,resources:null==y?void 0:y(e),showResources:p,variant:l.Variant.month})}))))};
@@ -13,10 +13,9 @@ export type DateTimeButtonProps = {
13
13
  isSoldOut?: boolean;
14
14
  onSelect: (date: DateTime) => void;
15
15
  price?: string | number | ReactElement | null;
16
- resources: ZoneResourcesAvailability | null | undefined;
16
+ resources?: ZoneResourcesAvailability | null;
17
17
  showResources?: boolean;
18
- shouldCalculateResources?: boolean;
19
18
  variant: Variant;
20
19
  };
21
- export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, shouldCalculateResources, variant, }: DateTimeButtonProps) => JSX.Element;
20
+ export declare const DateTimeButton: ({ date, isDisabled: _isDisabled, isSelected, isSoldOut: _isSoldOut, onSelect, price, resources, showResources, variant, }: DateTimeButtonProps) => JSX.Element;
22
21
  //# sourceMappingURL=DateTimeButton.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAC;AAKrH,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;IAC9C,SAAS,EAAE,yBAAyB,GAAG,IAAI,GAAG,SAAS,CAAC;IACxD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,cAAc,wJAWxB,mBAAmB,gBAuDrB,CAAC"}
1
+ {"version":3,"file":"DateTimeButton.d.ts","sourceRoot":"","sources":["../../src/date-time-button/DateTimeButton.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAC;AAIrH,oBAAY,OAAO;IACjB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,IAAI,SAAS;CACd;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,QAAQ,CAAC;IACf,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,YAAY,GAAG,IAAI,CAAC;IAC9C,SAAS,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IAC7C,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,cAAc,8HAUxB,mBAAmB,gBA6CrB,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,a=e(require("react")),r=e(require("clsx")),i=require("luxon"),o=require("lodash"),s=require("../availability-indicator/AvailabilityIndicator.js"),n=require("./DateContent.js");(t=exports.Variant||(exports.Variant={})).week="week",t.month="month",t.time="time";var l=function(e){return e.toUTC()<=i.DateTime.now().toUTC()};exports.DateTimeButton=function(e){var t=e.date,i=e.isDisabled,u=e.isSelected,c=e.isSoldOut,d=e.onSelect,m=e.price,b=e.resources,v=e.showResources,p=e.shouldCalculateResources,x=void 0===p||p,f=e.variant,h=void 0===f?exports.Variant.week:f,y=c||x&&b&&b.bookedResources>=b.totalResources,k=h===exports.Variant.time,q=k&&l(t),w=x&&(!b||!o.has(b,"bookedResources")||!o.has(b,"totalResources")),C=i||y||q||w;return a.createElement("button",{type:"button",onClick:function(){return d(t)},disabled:C,className:r("date-time-button",C&&"disabled",u&&"selected",k&&"time-button",k&&"only-time-container",!k&&"today",h===exports.Variant.month&&"calendar-view")},a.createElement(n.DateContent,{date:t,isDisabled:C,isSelected:u,variant:h}),m&&!C&&a.createElement("div",{className:"price"},m),v&&b&&a.createElement(s.AvailabilityIndicator,{resources:b,isUnavailable:i||q,isSoldOut:y}))};
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,i=e(require("react")),a=e(require("clsx")),r=require("luxon"),n=require("../availability-indicator/AvailabilityIndicator.js"),o=require("./DateContent.js");(t=exports.Variant||(exports.Variant={})).week="week",t.month="month",t.time="time";var s=function(e){return e.toUTC()<=r.DateTime.now().toUTC()};exports.DateTimeButton=function(e){var t=e.date,r=e.isDisabled,l=e.isSelected,c=e.isSoldOut,u=e.onSelect,d=e.price,m=e.resources,b=e.showResources,v=e.variant,p=void 0===v?exports.Variant.week:v,x=c||m&&m.bookedResources>=m.totalResources,f=p===exports.Variant.time,y=f&&s(t),w=r||x||y;return i.createElement("button",{type:"button",onClick:function(){return u(t)},disabled:w,className:a("date-time-button",w&&"disabled",l&&"selected",f&&"time-button",f&&"only-time-container",!f&&"today",p===exports.Variant.month&&"calendar-view")},i.createElement(o.DateContent,{date:t,isDisabled:w,isSelected:l,variant:p}),d&&!w&&i.createElement("div",{className:"price"},d),b&&m&&i.createElement(n.AvailabilityIndicator,{resources:m,isUnavailable:r||y,isSoldOut:x}))};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/plugins/dist/hooks/Media/useWindowDimensions"),l=require("../../../../iframe/order-process/components/BookingSummary/types/index.js"),i=require("@licklist/plugins/dist/context/event/EventVenueMapContext"),o=require("../../utils/index.js"),s=require("../../hooks/useDrag.js");exports.Scrollbars=function(e){var n=e.stageRef,c=e.imageRef,h=e.layerRef,u=a.useWindowDimensions().width,d=t.useContext(i.EventVenueMapContext).stage,m=s.useDrag({stageRef:n,imageRef:c,layerRef:h}),g=m.onDragX,f=m.onDragY,p=l.MOBILE_WIDTH<=u;return r.createElement("div",{className:"canvas-scrollbars"},r.createElement("div",{className:"scrollbar-wrapper scrollbar-wrapper-horizontal"},p&&r.createElement("div",{className:"scroll-element horizontal-scroll",onPointerDown:g,style:function(){if(!n||!c||!h)return{width:0,left:0};var e=d.x,t=d.y,r=n.attrs,a=r.width,l=r.height,i=o.getElementParameters({x:e,y:t,width:a,height:l,layer:h}),s=i.totalLayerWidth,u=i.maxXOverflowNumber;if(Math.round(s)<=Math.round(a)||2*u>=s)return{width:0,left:0};var m=o.calculateHorizontalScrollParameters({x:e,width:a,totalLayerWidth:s});return{width:m.width,left:m.left}}()})),r.createElement("div",{className:"scrollbar-wrapper scrollbar-wrapper-vertical"},p&&r.createElement("div",{className:"scroll-element vertical-scroll",onPointerDown:f,style:function(){if(!n||!c||!h)return{height:0,top:0};var e=d.x,t=d.y,r=n.attrs,a=r.width,l=r.height,i=o.getElementParameters({x:e,y:t,width:a,height:l,layer:h}),s=i.totalLayerHeight,u=i.maxYOverflowNumber;if(Math.round(s)<=Math.round(l)||2*u>=s)return{height:0,top:0};var m=o.calculateVerticalScrollParameters({y:t,height:l,totalLayerHeight:s});return{height:m.height,top:m.top}}()})))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/plugins/dist/hooks/Media/useWindowDimensions"),l=require("@licklist/plugins/dist/context/event/EventVenueMapContext"),i=require("../../utils/index.js"),o=require("../../hooks/useDrag.js"),s=require("../../../../iframe/order-process/components/BookingSummary/types/index.js");exports.Scrollbars=function(e){var n=e.stageRef,c=e.imageRef,h=e.layerRef,u=a.useWindowDimensions().width,d=t.useContext(l.EventVenueMapContext).stage,m=o.useDrag({stageRef:n,imageRef:c,layerRef:h}),g=m.onDragX,f=m.onDragY,p=s.MOBILE_WIDTH<=u;return r.createElement("div",{className:"canvas-scrollbars"},r.createElement("div",{className:"scrollbar-wrapper scrollbar-wrapper-horizontal"},p&&r.createElement("div",{className:"scroll-element horizontal-scroll",onPointerDown:g,style:function(){if(!n||!c||!h)return{width:0,left:0};var e=d.x,t=d.y,r=n.attrs,a=r.width,l=r.height,o=i.getElementParameters({x:e,y:t,width:a,height:l,layer:h}),s=o.totalLayerWidth,u=o.maxXOverflowNumber;if(Math.round(s)<=Math.round(a)||2*u>=s)return{width:0,left:0};var m=i.calculateHorizontalScrollParameters({x:e,width:a,totalLayerWidth:s});return{width:m.width,left:m.left}}()})),r.createElement("div",{className:"scrollbar-wrapper scrollbar-wrapper-vertical"},p&&r.createElement("div",{className:"scroll-element vertical-scroll",onPointerDown:f,style:function(){if(!n||!c||!h)return{height:0,top:0};var e=d.x,t=d.y,r=n.attrs,a=r.width,l=r.height,o=i.getElementParameters({x:e,y:t,width:a,height:l,layer:h}),s=o.totalLayerHeight,u=o.maxYOverflowNumber;if(Math.round(s)<=Math.round(l)||2*u>=s)return{height:0,top:0};var m=i.calculateVerticalScrollParameters({y:t,height:l,totalLayerHeight:s});return{height:m.height,top:m.top}}()})))};
@@ -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("react"),n=e(t),r=require("react-i18next"),o=require("../../../../../../static/Icon.js"),a=e(require("clsx")),c=require("../../types/index.js");require("../../../../../../static/index.js");var i=require("react-bootstrap/AccordionToggle"),s=e(require("react-bootstrap/AccordionContext"));exports.ToggleHeader=function(e){var l=e.showExpandButton,u=e.isExpanded,d=e.title,m=e.hideComponent,f=r.useTranslation("Design").t,x=t.useContext(s),p=i.useAccordionToggle(c.ACCORDION_KEY);return t.useEffect((function(){x||!u?x&&!u&&p(void 0):p(void 0)}),[u]),m?null:n.createElement("div",{onClick:function(e){return l&&p(e)},onKeyPress:function(e){return l&&p(e)},role:"button",tabIndex:0,className:"d-flex flex-column"},n.createElement("h6",{className:a("title",l&&"pointer")},n.createElement("div",{className:"d-flex w-100 align-content-center justify-content-between"},n.createElement("div",{className:"d-flex"},n.createElement("p",{className:"m-0"},d||f("yourBooking"))),l&&n.createElement("div",{className:"expand-button"},n.createElement(o.default,{type:x===c.ACCORDION_KEY?"chevron-up":"chevron-down",width:"1rem"})))),u&&n.createElement("hr",{className:"mt-3"}))};
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("react"),n=e(t),r=require("react-i18next"),o=require("../../../../../../static/Icon.js"),a=e(require("clsx"));require("../../../../../../static/index.js");var c=require("../../types/index.js"),i=require("react-bootstrap/AccordionToggle"),s=e(require("react-bootstrap/AccordionContext"));exports.ToggleHeader=function(e){var l=e.showExpandButton,u=e.isExpanded,d=e.title,m=e.hideComponent,f=r.useTranslation("Design").t,x=t.useContext(s),p=i.useAccordionToggle(c.ACCORDION_KEY);return t.useEffect((function(){x||!u?x&&!u&&p(void 0):p(void 0)}),[u]),m?null:n.createElement("div",{onClick:function(e){return l&&p(e)},onKeyPress:function(e){return l&&p(e)},role:"button",tabIndex:0,className:"d-flex flex-column"},n.createElement("h6",{className:a("title",l&&"pointer")},n.createElement("div",{className:"d-flex w-100 align-content-center justify-content-between"},n.createElement("div",{className:"d-flex"},n.createElement("p",{className:"m-0"},d||f("yourBooking"))),l&&n.createElement("div",{className:"expand-button"},n.createElement(o.default,{type:x===c.ACCORDION_KEY?"chevron-up":"chevron-down",width:"1rem"})))),u&&n.createElement("hr",{className:"mt-3"}))};
@@ -11,9 +11,8 @@ type FooterProps = Partial<{
11
11
  disabled?: boolean;
12
12
  buttonLabel?: ReactNode;
13
13
  showButton?: boolean;
14
- isLoading: boolean;
15
14
  } & (ButtonPropsWithoutOnClick | ButtonPropsWithOnClick)>;
16
15
  export type BookingSummaryFooterProps = PropsWithChildren<FooterProps>;
17
- export declare const BookingSummaryFooter: ({ disabled: _disabled, onClick, buttonLabel, form, children, showButton, isLoading, }: BookingSummaryFooterProps) => JSX.Element;
16
+ export declare const BookingSummaryFooter: ({ disabled, onClick, buttonLabel, form, children, showButton, }: BookingSummaryFooterProps) => JSX.Element;
18
17
  export {};
19
18
  //# sourceMappingURL=BookingSummaryFooter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookingSummaryFooter.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAM5D,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,KAAK,WAAW,GAAG,OAAO,CACxB;IACE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB,GAAG,CAAC,yBAAyB,GAAG,sBAAsB,CAAC,CACzD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAEvE,eAAO,MAAM,oBAAoB,0FAQ9B,yBAAyB,gBAyB3B,CAAC"}
1
+ {"version":3,"file":"BookingSummaryFooter.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummaryFooter/BookingSummaryFooter.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK5D,KAAK,yBAAyB,GAAG;IAC/B,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,sBAAsB,GAAG;IAC5B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,KAAK,CAAC;CACd,CAAC;AAEF,KAAK,WAAW,GAAG,OAAO,CACxB;IACE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,GAAG,CAAC,yBAAyB,GAAG,sBAAsB,CAAC,CACzD,CAAC;AAEF,MAAM,MAAM,yBAAyB,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;AAEvE,eAAO,MAAM,oBAAoB,oEAO9B,yBAAyB,gBAe3B,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=e(require("react")),n=require("react-i18next"),i=e(require("react-bootstrap/Button")),o=require("react-bootstrap"),a=require("../../constants.js");exports.BookingSummaryFooter=function(e){var s=e.disabled,u=void 0!==s&&s,l=e.onClick,c=e.buttonLabel,d=e.form,m=void 0===d?a.STEP_FORM_ID:d,f=e.children,b=e.showButton,p=void 0===b||b,v=e.isLoading,q=void 0!==v&&v,x=n.useTranslation("Design").t,_=l?{onClick:l}:{type:"submit",form:m},g=u||q;return r.createElement("div",{className:"d-flex flex-column"},f,p&&r.createElement(i,t.__assign({className:"m-0 d-flex align-items-center justify-content-center mt-3",disabled:g},_),q?r.createElement(o.Spinner,{animation:"border",size:"sm",role:"status"}):null!=c?c:x("continue")))};
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=e(require("react")),o=require("react-i18next"),n=e(require("react-bootstrap/Button")),i=require("../../constants.js");exports.BookingSummaryFooter=function(e){var a=e.disabled,s=void 0!==a&&a,u=e.onClick,l=e.buttonLabel,c=e.form,d=void 0===c?i.STEP_FORM_ID:c,m=e.children,f=e.showButton,b=void 0===f||f,v=o.useTranslation("Design").t,p=u?{onClick:u}:{type:"submit",form:d};return r.createElement("div",{className:"d-flex flex-column"},m,b&&r.createElement(n,t.__assign({className:"m-0 mt-3",disabled:s},p),null!=l?l:v("continue")))};
@@ -1 +1 @@
1
- {"version":3,"file":"ProductControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/ProductControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EAMb,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAEvF,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAEtE,OAAc,EACZ,WAAW,EAKZ,MAAM,OAAO,CAAC;AAef,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAO9D,OAAO,EAEL,oCAAoC,EACpC,qCAAqC,EACtC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQ5C,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,2BAA2B,EAC3B,qCAAqC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,CACpC,SAAQ,gBAAgB,EACtB,mBAAmB,CAAC,CAAC,CAAC,EACtB,oCAAoC,CAAC,CAAC,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,EACnD,SAAiB,EACjB,eAAe,EACf,aAAqB,EACrB,oBAA4B,EAC5B,QAAa,EACb,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,GACb,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAgkBxB"}
1
+ {"version":3,"file":"ProductControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/ProductControl.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,YAAY,EAMb,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,0DAA0D,CAAC;AAEvF,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAEtE,OAAc,EACZ,WAAW,EAKZ,MAAM,OAAO,CAAC;AAef,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAO9D,OAAO,EAEL,oCAAoC,EACpC,qCAAqC,EACtC,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAEL,2BAA2B,EAC5B,MAAM,iCAAiC,CAAC;AAOzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAQ5C,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,2BAA2B,EAC3B,qCAAqC;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,OAAO,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB,CAAC,CAAC,CACpC,SAAQ,gBAAgB,EACtB,mBAAmB,CAAC,CAAC,CAAC,EACtB,oCAAoC,CAAC,CAAC,CAAC;IACzC,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,EAAE,CAAC,CAAC,EAAE,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,UAAU,EAAE,EACnD,SAAiB,EACjB,eAAe,EACf,aAAqB,EACrB,oBAA4B,EAC5B,QAAa,EACb,MAAM,EACN,mBAAmB,EACnB,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,GACb,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAmkBxB"}
@@ -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"),a=require("react"),n=e(a),r=require("react-i18next"),o=e(require("react-bootstrap/Row")),i=e(require("react-bootstrap/Col")),l=require("react-bootstrap"),c=require("../../static/Icon.js"),s=require("react-hook-form"),d=e(require("@licklist/plugins/dist/services/Form/HookFormService")),u=require("@react-aria/utils"),m=require("../../static/switch/BooleanSwitch.js"),E=require("../../static/form-number-input/FormNumberInput.js");require("../../static/index.js");var p=require("../form/context.js"),g=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),f=require("./booking-management/ProductBookingManagementControl.js"),C=require("./deposit/ProductDepositControl.js"),v=require("./quantity/ProductQuantityControl.js"),b=require("./quantity/ProductQuantityConstantControl.js"),h=require("./quantity/ProductQuantityRechargingControl.js"),I=e(require("react-bootstrap/Collapse")),N=require("@licklist/plugins/dist/hooks/Media/useImages"),F=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),P=require("../../file-upload/FileUpload.js"),y=require("../../tiptap-editor/TipTapEditor.js"),T=require("./fixed-duration-fields/FixedDurationOptions.js"),q=require("./duration/ProductDurationControl.js"),_=require("./price/ProductPriceControl.js"),x=require("./constants.js");exports.ProductControl=function(e){var k=e.isLoading,A=void 0!==k&&k,L=e.fieldNamePrefix,S=e.allowDeposits,D=void 0!==S&&S,R=e.hasBookingManagement,j=void 0!==R&&R,w=e.zoneList,M=void 0===w?[]:w,G=e.onCopy,O=e.onProductNameChange,B=e.productName,U=e.hasTicket,Y=e.categoryType,Q=e.zoneDuration,V=s.useFormContext(),H=V.register,X=V.control,z=V.formState.errors,W=V.setValue,Z=V.getValues,J=V.watch,K=V.trigger,$=V.clearErrors,ee=a.useContext(p.ProductSetLoadingContext).setLoading,te=r.useTranslation(["Design","Validation"]).t,ae=t.__read(a.useState(!1),2),ne=ae[0],re=ae[1],oe=t.__read(a.useState(null),2),ie=oe[0],le=oe[1],ce=Boolean(J("".concat(L,".isUnlimited"))),se=J("".concat(L,".capacity")),de="0"===se||!se,ue=u.useId(),me=u.useId(),Ee=u.useId(),pe=u.useId(),ge=u.useId(),fe=u.useId(),Ce=u.useId(),ve=u.useId(),be=u.useId(),he=u.useId(),Ie=u.useId(),Ne=[{id:1,value:te("quantitySelector")},{id:2,value:te("stockControl")}],Fe=a.useCallback((function(){return re((function(e){return!e}))}),[]),Pe=s.useWatch({control:X,name:"".concat(L,".quantitySelector")}),ye=N.useImages(ie),Te=ye.images,qe=ye.handleImageRemove,_e=ye.handleImageUploading,xe=ye.isLoading,ke=a.useCallback((function(e){_e(e,F.IMAGE_TYPE_IMAGE)}),[_e]),Ae=a.useCallback((function(e,t){qe(String(e),t)}),[qe]),Le=function(e){return e.target.select()};a.useEffect((function(){ee(xe)}),[ee,xe]),a.useEffect((function(){var e=Z("".concat(L,".images"));le(e)}),[Z,le,L]),a.useEffect((function(){Array.isArray(Te)&&W("".concat(L,".images"),Te)}),[Te,L,W]),a.useEffect((function(){de?(W("".concat(L,".duration"),0),$("".concat(L,".duration"))):K("".concat(L,".duration"))}),[de]);var Se=null!=Pe?Pe:"1",De=g.QUANTITY_TYPE_LIST_DTO[Se];return n.createElement(n.Fragment,null,n.createElement(o,null,n.createElement(i,{lg:8,md:8},n.createElement(l.Form.Group,{controlId:me},n.createElement(l.Form.Label,null,te("name")),n.createElement(l.Form.Control,t.__assign({},H("".concat(L,".name")),{value:B,onChange:O,isInvalid:d.isInvalid("".concat(L,".name"),z),disabled:A,placeholder:te("name")})),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(L,".name"),z))),n.createElement(l.Form.Group,{controlId:Ee},n.createElement(l.Form.Label,null,te("description")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange;return n.createElement(y.TipTapEditor,{withEmoji:!1,viewMode:!1,onUpdate:r,content:a,disabled:A})},rules:{maxLength:{value:x.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH,message:te("Validation:descriptionTooManyCharactersMessage",{max:x.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH})}},control:X,name:"".concat(L,".description")})),n.createElement("div",{className:"invalid-feedback field-values-error d-block"},d.getErrors("".concat(L,".description"),z)),D?n.createElement(o,null,n.createElement(C.ProductDepositControl,{isLoading:A,fieldNamePrefix:L}),n.createElement(_.ProductPriceControl,{isLoading:A,fieldNamePrefix:"".concat(L,".price"),title:te("totalPrice"),allowDeposits:D})):n.createElement(_.ProductPriceControl,{isLoading:A,fieldNamePrefix:"".concat(L,".price")}),n.createElement("div",null,n.createElement(v.ProductQuantityControl,{isLoading:A,fieldNamePrefix:L,onFocus:Le}),De===g.QUANTITY_TYPE_CONSTANT&&n.createElement(b.ProductQuantityConstantControl,{isLoading:A,fieldNamePrefix:L,onFocus:Le,disabled:ce}),De===g.QUANTITY_TYPE_RECHARGING&&n.createElement(h.ProductQuantityRechargingControl,{isLoading:A,fieldNamePrefix:L,onFocus:Le,disabled:ce}),n.createElement(l.Form.Group,{controlId:he,className:"custom-checkbox"},n.createElement(l.Form.Check,t.__assign({custom:!0,type:"checkbox"},H("".concat(L,".isUnlimited")),{name:"".concat(L,".isUnlimited"),disabled:A})),n.createElement(l.Form.Check.Label,null,te("isUnlimited")))),n.createElement(l.Form.Group,{controlId:ve},n.createElement(l.Form.Label,null,te("quantitySelectorType")),n.createElement(l.Form.Control,t.__assign({as:"select",defaultValue:U?Ne[0].id:void 0},H("".concat(L,".quantitySelector")),{isInvalid:d.isInvalid("".concat(L,".quantitySelector"),z),disabled:A||U}),Ne.map((function(e){return n.createElement("option",{value:e.id,key:e.id},e.value)}))),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(L,".quantitySelector"),z))))),Y===g.CATEGORY_TYPE_FIXED_DURATION&&n.createElement(o,{className:"align-items-start duration-capacity-container"},n.createElement(q.ProductDurationControl,{fieldNamePrefix:L,disabled:de}),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(L,".capacity"),label:te("capacity"),rules:{min:{value:0,message:te("Validation:fieldMinNumber",{attribute:te("capacity"),min:0})}}})),de&&n.createElement("div",{className:"duration-hint duration-capacity-container"},te("Design:forDurationEditing"))),Y===g.CATEGORY_TYPE_GAME&&n.createElement(n.Fragment,null,n.createElement(o,{className:"align-items-start duration-capacity-container"},n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(L,".capacity"),label:te("capacity"),onChange:function(e){Q&&W("".concat(L,".duration"),e*Q)},rules:{min:{value:0,message:te("Validation:fieldMinNumber",{attribute:te("capacity"),min:1})}}})),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(L,".duration"),label:te("durationMinutes"),disabled:de,rules:{min:{value:0,message:te("Validation:fieldMinNumber",{attribute:te("duration"),min:0})},validate:function(e){return!(!de&&(!e||e<1))||te("Validation:fieldRequired",{attribute:te("duration")})}}}))),de&&n.createElement("div",{className:"duration-hint pl-0"},te("Design:forDurationEditing"))),n.createElement(o,{className:"mt-4"},n.createElement(i,{lg:8,md:8},n.createElement(l.Form.Group,{controlId:pe},n.createElement(l.Form.Label,null,te("productTermsConditions")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name,i=t.ref;return n.createElement(l.Form.Control,{ref:i,as:"textarea",rows:3,value:a,onChange:r,isInvalid:d.isInvalid("".concat(L,".termsAndConditions"),z),disabled:A,name:o})},control:X,name:"".concat(L,".termsAndConditions")}),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(L,".termsAndConditions"),z)))),n.createElement(i,{lg:4,md:4,className:"licklist-file-upload-wrapper"},n.createElement(P.FileUpload,{onFilesChange:ke,allowedExtensions:["jpeg","jpg","png"],subTitle:".jpeg .jpg .png",enablePreview:!0,onFileRemove:Ae,defaultFiles:Te,isLoading:xe,withIcon:!0,title:te("addImage")}))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(l.Form.Group,{controlId:ge,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,te("isAvailable")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".isAvailable")})),n.createElement(l.Form.Group,{controlId:fe,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,te("isSoldOut")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".isSoldOut")})),n.createElement(l.Form.Group,{controlId:ue,className:"custom-checkbox"},n.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:ue,disabled:A},n.createElement(l.Form.Check.Input,{checked:ne,onChange:Fe,type:"checkbox"}),n.createElement(l.Form.Check.Label,null,te("showAdvancedOptions"))))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(I,{in:ne},n.createElement("div",null,n.createElement(l.Form.Group,{controlId:Ce,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,te("isRequired")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".isRequired")})),n.createElement(l.Form.Group,{controlId:be,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,te("hasSpecialNotes")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".hasSpecialNotes")})),[g.CATEGORY_TYPE_GAME,g.CATEGORY_TYPE_FIXED_DURATION].includes(Y)&&n.createElement(T.FixedDurationOptions,{fieldNamePrefix:L}),n.createElement(l.Form.Group,{controlId:Ie,className:"advanced-switch-container"},n.createElement(_.ProductPriceControl,{title:te("minSpend"),isRequired:!1,isMoreThanZero:!0,allowDeposits:!1,isLoading:A,fieldNamePrefix:"".concat(L,".minSpend")})))),n.createElement(o,null,n.createElement(i,{xs:12},j&&n.createElement(f.ProductBookingManagementControl,{isLoading:A,zoneList:M,fieldNamePrefix:L})))),n.createElement(o,null,n.createElement(i,{xs:!0},n.createElement("div",{className:"d-flex justify-content-end mt-4"},Boolean(G)&&n.createElement(l.Button,{onClick:G,variant:"link",className:"d-flex align-items-center"},n.createElement(c.default,{type:"clipboard",height:"1rem",className:"mr-2"})," ",te("copy"))))))};
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"),a=require("react"),n=e(a),r=require("react-i18next"),o=e(require("react-bootstrap/Row")),i=e(require("react-bootstrap/Col")),l=require("react-bootstrap"),c=require("../../static/Icon.js"),s=require("react-hook-form"),d=e(require("@licklist/plugins/dist/services/Form/HookFormService")),u=require("@react-aria/utils"),m=require("../../static/switch/BooleanSwitch.js"),E=require("../../static/form-number-input/FormNumberInput.js");require("../../static/index.js");var p=require("../form/context.js"),g=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),f=require("./booking-management/ProductBookingManagementControl.js"),C=require("./deposit/ProductDepositControl.js"),v=require("./quantity/ProductQuantityControl.js"),b=require("./quantity/ProductQuantityConstantControl.js"),h=require("./quantity/ProductQuantityRechargingControl.js"),I=e(require("react-bootstrap/Collapse")),N=require("@licklist/plugins/dist/hooks/Media/useImages"),F=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),P=require("../../file-upload/FileUpload.js"),y=require("../../tiptap-editor/TipTapEditor.js"),T=require("./fixed-duration-fields/FixedDurationOptions.js"),q=require("./duration/ProductDurationControl.js"),_=require("./price/ProductPriceControl.js"),k=require("./constants.js");exports.ProductControl=function(e){var x=e.isLoading,A=void 0!==x&&x,L=e.fieldNamePrefix,S=e.allowDeposits,D=void 0!==S&&S,M=e.hasBookingManagement,R=void 0!==M&&M,j=e.zoneList,w=void 0===j?[]:j,G=e.onCopy,O=e.onProductNameChange,B=e.productName,U=e.hasTicket,Y=e.categoryType,Q=e.zoneDuration,V=s.useFormContext(),H=V.register,X=V.control,z=V.formState.errors,W=V.setValue,Z=V.getValues,J=V.watch,K=V.trigger,$=V.clearErrors,ee=a.useContext(p.ProductSetLoadingContext),te=ee.setLoading,ae=ee.providerHasBookingManagement,ne=r.useTranslation(["Design","Validation"]).t,re=t.__read(a.useState(!1),2),oe=re[0],ie=re[1],le=t.__read(a.useState(null),2),ce=le[0],se=le[1],de=Boolean(J("".concat(L,".isUnlimited"))),ue=J("".concat(L,".capacity")),me="0"===ue||!ue,Ee=u.useId(),pe=u.useId(),ge=u.useId(),fe=u.useId(),Ce=u.useId(),ve=u.useId(),be=u.useId(),he=u.useId(),Ie=u.useId(),Ne=u.useId(),Fe=u.useId(),Pe=[{id:1,value:ne("quantitySelector")},{id:2,value:ne("stockControl")}],ye=a.useCallback((function(){return ie((function(e){return!e}))}),[]),Te=s.useWatch({control:X,name:"".concat(L,".quantitySelector")}),qe=N.useImages(ce),_e=qe.images,ke=qe.handleImageRemove,xe=qe.handleImageUploading,Ae=qe.isLoading,Le=a.useCallback((function(e){xe(e,F.IMAGE_TYPE_IMAGE)}),[xe]),Se=a.useCallback((function(e,t){ke(String(e),t)}),[ke]),De=function(e){return e.target.select()};a.useEffect((function(){te(Ae)}),[te,Ae]),a.useEffect((function(){var e=Z("".concat(L,".images"));se(e)}),[Z,se,L]),a.useEffect((function(){Array.isArray(_e)&&W("".concat(L,".images"),_e)}),[_e,L,W]),a.useEffect((function(){me?(W("".concat(L,".duration"),0),$("".concat(L,".duration"))):K("".concat(L,".duration"))}),[me]);var Me=null!=Te?Te:"1",Re=g.QUANTITY_TYPE_LIST_DTO[Me];return n.createElement(n.Fragment,null,n.createElement(o,null,n.createElement(i,{lg:8,md:8},n.createElement(l.Form.Group,{controlId:pe},n.createElement(l.Form.Label,null,ne("name")),n.createElement(l.Form.Control,t.__assign({},H("".concat(L,".name")),{value:B,onChange:O,isInvalid:d.isInvalid("".concat(L,".name"),z),disabled:A,placeholder:ne("name")})),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(L,".name"),z))),n.createElement(l.Form.Group,{controlId:ge},n.createElement(l.Form.Label,null,ne("description")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange;return n.createElement(y.TipTapEditor,{withEmoji:!1,viewMode:!1,onUpdate:r,content:a,disabled:A})},rules:{maxLength:{value:k.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH,message:ne("Validation:descriptionTooManyCharactersMessage",{max:k.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH})}},control:X,name:"".concat(L,".description")})),n.createElement("div",{className:"invalid-feedback field-values-error d-block"},d.getErrors("".concat(L,".description"),z)),D?n.createElement(o,null,n.createElement(C.ProductDepositControl,{isLoading:A,fieldNamePrefix:L}),n.createElement(_.ProductPriceControl,{isLoading:A,fieldNamePrefix:"".concat(L,".price"),title:ne("totalPrice"),allowDeposits:D})):n.createElement(_.ProductPriceControl,{isLoading:A,fieldNamePrefix:"".concat(L,".price")}),n.createElement("div",null,n.createElement(v.ProductQuantityControl,{isLoading:A,fieldNamePrefix:L,onFocus:De}),Re===g.QUANTITY_TYPE_CONSTANT&&n.createElement(b.ProductQuantityConstantControl,{isLoading:A,fieldNamePrefix:L,onFocus:De,disabled:de}),Re===g.QUANTITY_TYPE_RECHARGING&&n.createElement(h.ProductQuantityRechargingControl,{isLoading:A,fieldNamePrefix:L,onFocus:De,disabled:de}),n.createElement(l.Form.Group,{controlId:Ne,className:"custom-checkbox"},n.createElement(l.Form.Check,t.__assign({custom:!0,type:"checkbox"},H("".concat(L,".isUnlimited")),{name:"".concat(L,".isUnlimited"),disabled:A})),n.createElement(l.Form.Check.Label,null,ne("isUnlimited")))),n.createElement(l.Form.Group,{controlId:he},n.createElement(l.Form.Label,null,ne("quantitySelectorType")),n.createElement(l.Form.Control,t.__assign({as:"select",defaultValue:U?Pe[0].id:void 0},H("".concat(L,".quantitySelector")),{isInvalid:d.isInvalid("".concat(L,".quantitySelector"),z),disabled:A||U}),Pe.map((function(e){return n.createElement("option",{value:e.id,key:e.id},e.value)}))),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(L,".quantitySelector"),z))))),Y===g.CATEGORY_TYPE_FIXED_DURATION&&n.createElement(o,{className:"align-items-start duration-capacity-container"},n.createElement(q.ProductDurationControl,{fieldNamePrefix:L,providerHasBookingManagement:ae,disabled:me}),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(L,".capacity"),label:ne("capacity"),rules:{min:{value:0,message:ne("Validation:fieldMinNumber",{attribute:ne("capacity"),min:0})}}})),me&&n.createElement("div",{className:"duration-hint duration-capacity-container"},ne("Design:forDurationEditing"))),Y===g.CATEGORY_TYPE_GAME&&n.createElement(n.Fragment,null,n.createElement(o,{className:"align-items-start duration-capacity-container"},n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(L,".capacity"),label:ne("capacity"),onChange:function(e){Q&&W("".concat(L,".duration"),e*Q)},rules:{min:{value:0,message:ne("Validation:fieldMinNumber",{attribute:ne("capacity"),min:1})}}})),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(L,".duration"),label:ne("durationMinutes"),disabled:me,rules:{min:{value:0,message:ne("Validation:fieldMinNumber",{attribute:ne("duration"),min:0})},validate:function(e){return!(!me&&(!e||e<1))||ne("Validation:fieldRequired",{attribute:ne("duration")})}}}))),me&&n.createElement("div",{className:"duration-hint pl-0"},ne("Design:forDurationEditing"))),n.createElement(o,{className:"mt-4"},n.createElement(i,{lg:8,md:8},n.createElement(l.Form.Group,{controlId:fe},n.createElement(l.Form.Label,null,ne("productTermsConditions")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name,i=t.ref;return n.createElement(l.Form.Control,{ref:i,as:"textarea",rows:3,value:a,onChange:r,isInvalid:d.isInvalid("".concat(L,".termsAndConditions"),z),disabled:A,name:o})},control:X,name:"".concat(L,".termsAndConditions")}),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(L,".termsAndConditions"),z)))),n.createElement(i,{lg:4,md:4,className:"licklist-file-upload-wrapper"},n.createElement(P.FileUpload,{onFilesChange:Le,allowedExtensions:["jpeg","jpg","png"],subTitle:".jpeg .jpg .png",enablePreview:!0,onFileRemove:Se,defaultFiles:_e,isLoading:Ae,withIcon:!0,title:ne("addImage")}))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(l.Form.Group,{controlId:Ce,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ne("isAvailable")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".isAvailable")})),n.createElement(l.Form.Group,{controlId:ve,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ne("isSoldOut")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".isSoldOut")})),n.createElement(l.Form.Group,{controlId:Ee,className:"custom-checkbox"},n.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:Ee,disabled:A},n.createElement(l.Form.Check.Input,{checked:oe,onChange:ye,type:"checkbox"}),n.createElement(l.Form.Check.Label,null,ne("showAdvancedOptions"))))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(I,{in:oe},n.createElement("div",null,n.createElement(l.Form.Group,{controlId:be,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ne("isRequired")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".isRequired")})),n.createElement(l.Form.Group,{controlId:Ie,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ne("hasSpecialNotes")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(m.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:A})},control:X,name:"".concat(L,".hasSpecialNotes")})),[g.CATEGORY_TYPE_GAME,g.CATEGORY_TYPE_FIXED_DURATION].includes(Y)&&n.createElement(T.FixedDurationOptions,{fieldNamePrefix:L}),n.createElement(l.Form.Group,{controlId:Fe,className:"advanced-switch-container"},n.createElement(_.ProductPriceControl,{title:ne("minSpend"),isRequired:!1,isMoreThanZero:!0,allowDeposits:!1,isLoading:A,fieldNamePrefix:"".concat(L,".minSpend")})))),n.createElement(o,null,n.createElement(i,{xs:12},R&&n.createElement(f.ProductBookingManagementControl,{isLoading:A,zoneList:w,fieldNamePrefix:L})))),n.createElement(o,null,n.createElement(i,{xs:!0},n.createElement("div",{className:"d-flex justify-content-end mt-4"},Boolean(G)&&n.createElement(l.Button,{onClick:G,variant:"link",className:"d-flex align-items-center"},n.createElement(c.default,{type:"clipboard",height:"1rem",className:"mr-2"})," ",ne("copy"))))))};
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { FieldNamePrefixPath } from "@licklist/plugins/dist/types/services/Form/hook-form-service";
3
3
  export interface ProductDurationControlProps<T> extends FieldNamePrefixPath<T> {
4
+ providerHasBookingManagement: boolean;
4
5
  disabled: boolean;
5
6
  }
6
- export declare const ProductDurationControl: <T>({ fieldNamePrefix, disabled, }: ProductDurationControlProps<T>) => JSX.Element;
7
+ export declare const ProductDurationControl: <T>({ fieldNamePrefix, providerHasBookingManagement, disabled, }: ProductDurationControlProps<T>) => JSX.Element;
7
8
  //# sourceMappingURL=ProductDurationControl.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProductDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/product-set/product/duration/ProductDurationControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AAOnG,MAAM,WAAW,2BAA2B,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAC5E,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,sBAAsB,oFAwIlC,CAAC"}
1
+ {"version":3,"file":"ProductDurationControl.d.ts","sourceRoot":"","sources":["../../../../src/product-set/product/duration/ProductDurationControl.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8DAA8D,CAAC;AAOnG,MAAM,WAAW,2BAA2B,CAAC,CAAC,CAAE,SAAQ,mBAAmB,CAAC,CAAC,CAAC;IAC5E,4BAA4B,EAAE,OAAO,CAAC;IACtC,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,eAAO,MAAM,sBAAsB,kHAsIlC,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=e(require("react")),r=require("react-i18next"),n=require("react-bootstrap"),a=require("react-hook-form"),o=e(require("@licklist/plugins/dist/services/Form/HookFormService")),l=require("@react-aria/utils"),u=require("../../../assets/dashboard/increment.svg.js");exports.ProductDurationControl=function(e){var i=e.fieldNamePrefix,c=e.disabled,s=r.useTranslation("Design").t,m=l.useId(),d=l.useId(),p=a.useFormContext(),f=p.control,E=p.formState.errors,b=p.setValue,v="".concat(i,".duration"),F=function(e){return b(v,e,{shouldValidate:!0})},C=a.useWatch({control:f,name:v}),g=Math.floor(C/60),I=C%60,N=function(e){F(60*e+I)},h=function(e){F(60*g+(e>59?59:e))},x=o.isInvalid(v,E),q=function(e){return e.target.select()};return t.createElement(a.Controller,{control:f,name:v,rules:{min:{value:0,message:s("Validation:fieldMinNumber",{attribute:s("duration"),min:0})},validate:function(e){return!(!c&&(!e||e<1))||s("Validation:fieldRequired",{attribute:s("duration")})}},render:function(e){var r=e.field;return t.createElement(t.Fragment,null,t.createElement(n.Col,{lg:4,md:4,sm:6},t.createElement(n.Form.Group,{controlId:m,className:"position-relative"},t.createElement(n.Form.Label,null,s("durationHours")),t.createElement(n.InputGroup,{hasValidation:!0},t.createElement(n.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){return N(g+1)}},t.createElement(n.InputGroup.Text,{className:"py-0 px-3"},t.createElement(u.ReactComponent,null))),t.createElement(n.Form.Control,{type:"number",min:0,step:1,value:g,disabled:c,isInvalid:x,onChange:function(e){return N(Number(e.target.value))},ref:r.ref,onFocus:q}),t.createElement(n.Form.Control.Feedback,{type:"invalid"},o.getErrors(v,E))))),t.createElement(n.Col,{lg:4,md:4,sm:6},t.createElement(n.Form.Group,{controlId:d,className:"position-relative"},t.createElement(n.Form.Label,null,s("durationMinutes")),t.createElement(n.InputGroup,{hasValidation:!0},t.createElement(n.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){return h(I+1)}},t.createElement(n.InputGroup.Text,{className:"py-0 px-3"},t.createElement(u.ReactComponent,null))),t.createElement(n.Form.Control,{type:"number",min:0,step:1,disabled:c,value:I,isInvalid:x,onChange:function(e){return h(Number(e.target.value))},onFocus:q}),t.createElement(n.Form.Control.Feedback,{type:"invalid"},o.getErrors(v,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=e(require("react")),r=require("react-i18next"),n=require("react-bootstrap"),a=require("react-hook-form"),o=e(require("@licklist/plugins/dist/services/Form/HookFormService")),l=require("@react-aria/utils"),u=require("../../../assets/dashboard/increment.svg.js");exports.ProductDurationControl=function(e){var i=e.fieldNamePrefix,c=e.providerHasBookingManagement,s=e.disabled,m=r.useTranslation("Design").t,d=l.useId(),p=l.useId(),f=a.useFormContext(),E=f.control,v=f.formState.errors,b=f.setValue,g="".concat(i,".duration"),F=function(e){return b(g,e,{shouldValidate:!0})},C=a.useWatch({control:E,name:g}),I=Math.floor(C/60),N=C%60,h=function(e){F(60*e+N)},q=function(e){F(60*I+(e>59?59:e))},x=o.isInvalid(g,v),k=function(e){return e.target.select()};return t.createElement(a.Controller,{control:E,name:g,rules:{required:{value:Boolean(c),message:m("Validation:fieldRequired",{attribute:m("duration")})},min:{value:1,message:m("Validation:fieldMinNumber",{attribute:m("duration")})}},render:function(e){var r=e.field;return t.createElement(t.Fragment,null,t.createElement(n.Col,{lg:4,md:4,sm:6},t.createElement(n.Form.Group,{controlId:d,className:"position-relative"},t.createElement(n.Form.Label,null,m("durationHours")),t.createElement(n.InputGroup,{hasValidation:!0},t.createElement(n.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){return h(I+1)}},t.createElement(n.InputGroup.Text,{className:"py-0 px-3"},t.createElement(u.ReactComponent,null))),t.createElement(n.Form.Control,{type:"number",min:0,step:1,value:I,disabled:s,isInvalid:x,onChange:function(e){return h(Number(e.target.value))},ref:r.ref,onFocus:k}),t.createElement(n.Form.Control.Feedback,{type:"invalid"},o.getErrors(g,v))))),t.createElement(n.Col,{lg:4,md:4,sm:6},t.createElement(n.Form.Group,{controlId:p,className:"position-relative"},t.createElement(n.Form.Label,null,m("durationMinutes")),t.createElement(n.InputGroup,{hasValidation:!0},t.createElement(n.InputGroup.Prepend,{className:"arrow-up-btn",onClick:function(){return q(N+1)}},t.createElement(n.InputGroup.Text,{className:"py-0 px-3"},t.createElement(u.ReactComponent,null))),t.createElement(n.Form.Control,{type:"number",min:0,step:1,disabled:s,value:N,isInvalid:x,onChange:function(e){return q(Number(e.target.value))},onFocus:k}),t.createElement(n.Form.Control.Feedback,{type:"invalid"},o.getErrors(g,v))))))}})};
@@ -10,7 +10,6 @@ export interface ManualBookingSummaryProps {
10
10
  isFeeFetching: boolean;
11
11
  orderDate: string;
12
12
  relyOnPeopleType?: RelyOnPeopleType | null;
13
- isMobileView?: boolean;
14
13
  }
15
- export declare const ManualBookingSummary: ({ eventName, orders, ordersSum, orderSumIncludingFee, isFeeFetching, orderDate, relyOnPeopleType, hasBookingCategory, isMobileView, }: ManualBookingSummaryProps) => JSX.Element;
14
+ export declare const ManualBookingSummary: ({ eventName, orders, ordersSum, orderSumIncludingFee, isFeeFetching, orderDate, relyOnPeopleType, hasBookingCategory, }: ManualBookingSummaryProps) => JSX.Element;
16
15
  //# sourceMappingURL=ManualBookingSummary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ManualBookingSummary.d.ts","sourceRoot":"","sources":["../../../../src/sales/manual-booking/summary/ManualBookingSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAQnG,OAAO,EAEL,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAIrE,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;IAC3C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,oBAAoB,0IAU9B,yBAAyB,gBAwF3B,CAAC"}
1
+ {"version":3,"file":"ManualBookingSummary.d.ts","sourceRoot":"","sources":["../../../../src/sales/manual-booking/summary/ManualBookingSummary.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+DAA+D,CAAC;AAQnG,OAAO,EAEL,gBAAgB,EACjB,MAAM,6DAA6D,CAAC;AAIrE,MAAM,WAAW,yBAAyB;IACxC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,kBAAkB,EAAE,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,OAAO,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAC5C;AAED,eAAO,MAAM,oBAAoB,4HAS9B,yBAAyB,gBAkF3B,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config");require("../../../static/loader/LoaderIndicator.js");var l=require("../../../static/loader/BlockLoader.js"),n=require("react-i18next");require("../../../static/loader/ButtonLoader.js"),require("../../../static/loader/SnippetLoader.js"),require("../../../static/loader/PaymentLoader.js");var i=require("luxon"),c=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),o=require("react-intl"),m=require("@licklist/plugins/dist/utils/relyOnPeople");exports.ManualBookingSummary=function(e){var t=e.eventName,s=e.orders,u=e.ordersSum,d=e.orderSumIncludingFee,y=e.isFeeFetching,p=e.orderDate,v=e.relyOnPeopleType,E=e.hasBookingCategory,N=e.isMobileView,g=n.useTranslation(["Design","Sale"]).t,q=o.useIntl().formatNumber,O=v&&v!==c.RELY_ON_PEOPLE_QUANTITY,P=i.DateTime.fromISO(p),b=P.toFormat(a.DATE_TIME_MANUAL_BOOKING_FORMAT),k=P.toFormat(a.TIME_FORMAT);return r.createElement("div",{className:N?"manual-booking-summary-mobile":"manual-booking-summary"},r.createElement("div",{className:"receipt-title"},g("Sale:receipt")),r.createElement("div",{className:"event-name border-summary-item"},t),r.createElement("div",{className:"border-summary-item"},b),r.createElement("div",{className:"border-summary-item"},k),s.length>0?r.createElement("div",{className:"summary-item-container"},s.map((function(e){var t=m.getRelyOnPeopleMultiplier({relyOnPeopleType:v,capacity:null==e?void 0:e.capacity,hasBookingCategory:E});return r.createElement("div",{key:e.id,className:"d-flex justify-content-between border-summary-item"},r.createElement("div",null,e.name),O&&!!t&&r.createElement("div",null,"x ".concat(e.quantity*t," ").concat(g("people"))),r.createElement("div",null,q(e.quantity*e.price,{style:"currency",currency:a.Currency.GBP})))})),r.createElement("div",null,r.createElement("div",{className:"total-container"},r.createElement("div",null,g("Sale:total")),r.createElement("div",{className:"total-amount"},q(u,{style:"currency",currency:a.Currency.GBP}))),d&&r.createElement("div",{className:"total-container ".concat(y?"mt-6":"mt-4")},y||!d?r.createElement(l.BlockLoader,null):r.createElement(r.Fragment,null,r.createElement("div",null,g("Sale:includingOperationalCost")),r.createElement("div",{className:"total-amount"},q(d,{style:"currency",currency:a.Currency.GBP})))))):r.createElement("div",{className:"cart-items"},r.createElement("p",{className:"empty-cart"},g("Design:emptyBasket"))))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config");require("../../../static/loader/LoaderIndicator.js");var l=require("../../../static/loader/BlockLoader.js"),n=require("react-i18next");require("../../../static/loader/ButtonLoader.js"),require("../../../static/loader/SnippetLoader.js"),require("../../../static/loader/PaymentLoader.js");var c=require("luxon"),i=require("@licklist/core/dist/DataMapper/Product/ProductSetDataMapper"),o=require("react-intl"),m=require("@licklist/plugins/dist/utils/relyOnPeople");exports.ManualBookingSummary=function(e){var t=e.eventName,s=e.orders,u=e.ordersSum,d=e.orderSumIncludingFee,y=e.isFeeFetching,p=e.orderDate,v=e.relyOnPeopleType,E=e.hasBookingCategory,N=n.useTranslation(["Design","Sale"]).t,g=o.useIntl().formatNumber,q=v&&v!==i.RELY_ON_PEOPLE_QUANTITY,O=c.DateTime.fromISO(p),P=O.toFormat(a.DATE_TIME_MANUAL_BOOKING_FORMAT),f=O.toFormat(a.TIME_FORMAT);return r.createElement("div",{className:"manual-booking-summary"},r.createElement("div",{className:"receipt-title"},N("Sale:receipt")),r.createElement("div",{className:"event-name border-summary-item"},t),r.createElement("div",{className:"border-summary-item"},P),r.createElement("div",{className:"border-summary-item"},f),s.length>0?r.createElement("div",{className:"summary-item-container"},s.map((function(e){var t=m.getRelyOnPeopleMultiplier({relyOnPeopleType:v,capacity:null==e?void 0:e.capacity,hasBookingCategory:E});return r.createElement("div",{key:e.id,className:"d-flex justify-content-between border-summary-item"},r.createElement("div",null,e.name),q&&!!t&&r.createElement("div",null,"x ".concat(e.quantity*t," ").concat(N("people"))),r.createElement("div",null,g(e.quantity*e.price,{style:"currency",currency:a.Currency.GBP})))})),r.createElement("div",null,r.createElement("div",{className:"total-container"},r.createElement("div",null,N("Sale:total")),r.createElement("div",{className:"total-amount"},g(u,{style:"currency",currency:a.Currency.GBP}))),d&&r.createElement("div",{className:"total-container ".concat(y?"mt-6":"mt-4")},y||!d?r.createElement(l.BlockLoader,null):r.createElement(r.Fragment,null,r.createElement("div",null,N("Sale:includingOperationalCost")),r.createElement("div",{className:"total-amount"},g(d,{style:"currency",currency:a.Currency.GBP})))))):r.createElement("div",{className:"cart-items"},r.createElement("p",{className:"empty-cart"},N("Design:emptyBasket"))))};
@@ -1 +1 @@
1
- {"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../../src/static/date-range-input/DateRangeInput.tsx"],"names":[],"mappings":";AAeA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yCAAyC,CAAC;AAIjD,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF,eAAO,MAAM,cAAc,yEAOxB,mBAAmB,gBA8HrB,CAAC"}
1
+ {"version":3,"file":"DateRangeInput.d.ts","sourceRoot":"","sources":["../../../src/static/date-range-input/DateRangeInput.tsx"],"names":[],"mappings":";AAcA,OAAO,kCAAkC,CAAC;AAC1C,OAAO,yCAAyC,CAAC;AAEjD,KAAK,mBAAmB,GAAG;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;CAC1E,CAAC;AAEF,eAAO,MAAM,cAAc,yEAOxB,mBAAmB,gBA4GrB,CAAC"}
@@ -1 +1 @@
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"}))))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),a=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,r=require("react-i18next"),s=require("react-bootstrap"),i=require("../Icon.js"),o=require("@react-aria/utils"),u=require("react-date-range"),c=require("react-use"),l=require("./utils/index.js");require("react-date-range/dist/styles.css"),require("react-date-range/dist/theme/default.css"),require("../index.js");var d={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 m=e.placeholder,p=e.startDate,f=e.endDate,g=e.onDateChange,D=e.months,v=void 0===D?2:D,h=e.disabled,y=r.useTranslation("Design").t,_=t.__read(n.useState([{startDate:new Date,endDate:new Date,key:"selection"}]),2),b=_[0],q=_[1],E=t.__read(n.useState(!1),2),x=E[0],w=E[1],C=o.useId(),j=n.useRef();c.useClickAway(j,(function(){return w(!1)}));return n.useEffect((function(){p&&f&&q((function(e){return[t.__assign(t.__assign({},e[0]),l.stringDatesToJSDates({startDate:p,endDate:f}))]}))}),[p,f]),a.createElement("div",null,a.createElement(s.OverlayTrigger,{show:x,overlay:a.createElement(s.Popover,{id:C,className:"rounded"},a.createElement(s.Popover.Content,{className:"shadow-lg rounded",ref:j},a.createElement(u.DateRange,{onChange:function(e){return q([e.selection])},moveRangeOnFirstSelection:!1,ranges:b,months:v,direction:"horizontal"}),a.createElement("div",{className:"mt-3 d-flex justify-content-end"},a.createElement(s.Button,{onClick:function(){g&&g({}),q((function(e){return[t.__assign(t.__assign({},e[0]),{startDate:new Date,endDate:new Date})]})),w(!1)},variant:"link"},y("clear")),a.createElement(s.Button,{onClick:function(){g&&g(l.rangeDatesToStringDates(b)),w(!1)},className:"ml-3",variant:"link"},y("apply"))))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[d]}},a.createElement("div",{onClick:function(){return w((function(e){return!e}))},onKeyDown:function(){return w((function(e){return!e}))},role:"button",tabIndex:0,className:"date-range-input-wrapper"},a.createElement(s.Form.Control,{type:"input",placeholder:m,disabled:h,readOnly:!0,className:"date-range-input",value:l.stringDatesToInputValue({startDate:p,endDate:f})}),a.createElement(i.default,{type:"calendar",height:"1rem",className:"date-range-input-icon"}))))};
@@ -4,8 +4,6 @@ export interface BooleanSwitchProps {
4
4
  value?: boolean;
5
5
  disabled?: boolean;
6
6
  onChange: (value: boolean) => void;
7
- firstValueTitle?: string;
8
- secondValueTitle?: string;
9
7
  }
10
- export declare function BooleanSwitch({ name, value, disabled, onChange, firstValueTitle, secondValueTitle, }: BooleanSwitchProps): JSX.Element;
8
+ export declare function BooleanSwitch({ name, value, disabled, onChange, }: BooleanSwitchProps): JSX.Element;
11
9
  //# 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;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
+ {"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;CACpC;AAED,wBAAgB,aAAa,CAAC,EAC5B,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE,kBAAkB,eAwBpB"}
@@ -1 +1 @@
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}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),t=require("react"),i=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("react-i18next"),r=require("./Switch.js");exports.BooleanSwitch=function(e){var o=e.name,u=e.value,l=e.disabled,s=e.onChange,c=n.useTranslation("Design").t,d=[{id:1,value:c("yes")},{id:0,value:c("no")}],v=t.useCallback((function(e){s(Boolean(e))}),[s]);return i.createElement(r.Switch,a.__assign({name:o},void 0!==u&&{value:Number(u)},{options:d,disabled:l,onChange:v}))};
@@ -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: 90%;
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,59 +411,6 @@
412
411
  }
413
412
  }
414
413
 
415
- .manual-booking-summary-mobile {
416
- padding: 0 1.5rem;
417
- padding-top: 2rem;
418
- height: max-content;
419
- margin-bottom: 1.5rem;
420
- width: inherit;
421
-
422
- .form-control {
423
- margin-bottom: .5rem;
424
- }
425
- .receipt-title {
426
- font-size: 1.125rem;
427
- font-weight: 600;
428
- padding-bottom: 0.4rem;
429
- margin-bottom: 1rem;
430
- border-bottom: 2px solid $gray-400;
431
- }
432
- .event-name {
433
- font-size: 0.94rem;
434
- font-weight: 600;
435
- }
436
-
437
- .border-summary-item {
438
- padding-bottom: 0.9rem;
439
- margin-bottom: 1%;
440
- border-bottom: 2px solid $gray-100;
441
- flex-wrap: wrap;
442
- }
443
-
444
- .total-container {
445
- display: flex;
446
- justify-content: space-between;
447
- font-size: 1rem;
448
- font-weight: 600;
449
-
450
- @include media-breakpoint-down(lg) {
451
- flex-wrap: wrap;
452
- }
453
- .total-amount {
454
- padding-left: 1rem;
455
- @include media-breakpoint-down(lg) {
456
- padding-left: 0;
457
- }
458
- }
459
- }
460
-
461
- .summary-item-container {
462
- .border-summary-item:nth-last-child(2) {
463
- border-bottom: 2px solid $gray-400;
464
- }
465
- }
466
- }
467
-
468
414
  .menu-list-manual-booking {
469
415
  display: flex;
470
416
  align-items: center;
@@ -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;