@licklist/design 0.58.6-dev.11 → 0.58.6-dev.3

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 (84) hide show
  1. package/dist/assets/iframe/calendar.svg +2 -2
  2. package/dist/assets/iframe/calendar.svg.js +1 -1
  3. package/dist/assets/iframe/ticket.svg +2 -2
  4. package/dist/assets/iframe/ticket.svg.js +1 -1
  5. package/dist/calendar/Calendar.d.ts +1 -1
  6. package/dist/calendar/Calendar.d.ts.map +1 -1
  7. package/dist/calendar/Calendar.js +1 -1
  8. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
  9. package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
  10. package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
  11. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
  12. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
  13. package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
  14. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +2 -4
  15. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
  16. package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
  17. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
  18. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
  19. package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
  20. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +2 -4
  21. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
  22. package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
  23. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -4
  24. package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
  25. package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
  26. package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
  27. package/dist/iframe/page/components/PageBody/constants.js +1 -1
  28. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
  29. package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
  30. package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
  31. package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
  32. package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
  33. package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
  34. package/dist/product-set/control/DateInput.d.ts.map +1 -1
  35. package/dist/product-set/control/DateInput.js +1 -1
  36. package/dist/product-set/product/ProductControl.d.ts.map +1 -1
  37. package/dist/product-set/product/ProductControl.js +1 -1
  38. package/dist/product-set/product/constants.d.ts +0 -1
  39. package/dist/product-set/product/constants.d.ts.map +1 -1
  40. package/dist/product-set/product/constants.js +1 -1
  41. package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
  42. package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
  43. package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
  44. package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
  45. package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
  46. package/dist/snippet/snippet-template/control/PropertyControl.d.ts +1 -2
  47. package/dist/snippet/snippet-template/control/PropertyControl.d.ts.map +1 -1
  48. package/dist/snippet/snippet-template/control/PropertyControl.js +1 -1
  49. package/dist/sortable-tree/SortableTreeItem.d.ts.map +1 -1
  50. package/dist/sortable-tree/SortableTreeItem.js +1 -1
  51. package/dist/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
  52. package/dist/styles/iframe-page/PageBody.scss +1 -2
  53. package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  54. package/package.json +4 -2
  55. package/src/assets/iframe/calendar.svg +2 -2
  56. package/src/assets/iframe/ticket.svg +2 -2
  57. package/src/calendar/Calendar.stories.tsx +0 -23
  58. package/src/calendar/Calendar.tsx +5 -5
  59. package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
  60. package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
  61. package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
  62. package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
  63. package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
  64. package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +10 -63
  65. package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
  66. package/src/iframe/page/components/PageBody/constants.ts +0 -2
  67. package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
  68. package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
  69. package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
  70. package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
  71. package/src/product-set/control/DateInput.tsx +14 -17
  72. package/src/product-set/product/ProductControl.tsx +5 -8
  73. package/src/product-set/product/constants.ts +0 -1
  74. package/src/product-set/product-category/ProductCategoryControl.tsx +43 -105
  75. package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
  76. package/src/snippet/snippet-template/control/PropertyControl.tsx +1 -3
  77. package/src/sortable-tree/SortableTreeItem.tsx +4 -6
  78. package/src/styles/iframe-order-process/IframeOrderProcess.scss +18 -57
  79. package/src/styles/iframe-page/PageBody.scss +1 -2
  80. package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
  81. package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
  82. package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
  83. package/dist/iframe/ryft/utils/ryft-form.js +0 -1
  84. package/src/iframe/ryft/utils/ryft-form.ts +0 -47
@@ -1,3 +1,3 @@
1
- <svg width="16" height="15" viewBox="0 0 16 15" fill="#979797" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M4 0C3.44772 0 3 0.447715 3 1H1C0.447715 1 0 1.44772 0 2V4H16V2C16 1.44772 15.5523 1 15 1H13C13 0.447715 12.5523 0 12 0C11.4477 0 11 0.447715 11 1H5C5 0.447715 4.55228 0 4 0ZM16 6C16 5.44772 15.5523 5 15 5H1C0.447715 5 0 5.44772 0 6V12C0 13.6569 1.34315 15 3 15H13C14.6569 15 16 13.6569 16 12V6ZM2 7H14V12C14 12.5523 13.5523 13 13 13H3L2.88338 12.9933C2.38604 12.9355 2 12.5128 2 12V7ZM10.5 9C10.2239 9 10 9.22386 10 9.5V11.5C10 11.7761 10.2239 12 10.5 12H12.5C12.7761 12 13 11.7761 13 11.5V9.5C13 9.22386 12.7761 9 12.5 9H10.5Z" />
1
+ <svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M4 0C3.44772 0 3 0.447715 3 1H1C0.447715 1 0 1.44772 0 2V4H16V2C16 1.44772 15.5523 1 15 1H13C13 0.447715 12.5523 0 12 0C11.4477 0 11 0.447715 11 1H5C5 0.447715 4.55228 0 4 0ZM16 6C16 5.44772 15.5523 5 15 5H1C0.447715 5 0 5.44772 0 6V12C0 13.6569 1.34315 15 3 15H13C14.6569 15 16 13.6569 16 12V6ZM2 7H14V12C14 12.5523 13.5523 13 13 13H3L2.88338 12.9933C2.38604 12.9355 2 12.5128 2 12V7ZM10.5 9C10.2239 9 10 9.22386 10 9.5V11.5C10 11.7761 10.2239 12 10.5 12H12.5C12.7761 12 13 11.7761 13 11.5V9.5C13 9.22386 12.7761 9 12.5 9H10.5Z" fill="#979797"/>
3
3
  </svg>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},n.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",n({width:16,height:15,fill:"#979797",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0a1 1 0 00-1 1H1a1 1 0 00-1 1v2h16V2a1 1 0 00-1-1h-2a1 1 0 10-2 0H5a1 1 0 00-1-1zm12 6a1 1 0 00-1-1H1a1 1 0 00-1 1v6a3 3 0 003 3h10a3 3 0 003-3V6zM2 7h12v5a1 1 0 01-1 1H3l-.117-.007A1 1 0 012 12V7zm8.5 2a.5.5 0 00-.5.5v2a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-2a.5.5 0 00-.5-.5h-2z"})))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var n in a)({}).hasOwnProperty.call(a,n)&&(e[n]=a[n])}return e},n.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",n({width:16,height:15,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M4 0a1 1 0 00-1 1H1a1 1 0 00-1 1v2h16V2a1 1 0 00-1-1h-2a1 1 0 10-2 0H5a1 1 0 00-1-1zm12 6a1 1 0 00-1-1H1a1 1 0 00-1 1v6a3 3 0 003 3h10a3 3 0 003-3V6zM2 7h12v5a1 1 0 01-1 1H3l-.117-.007A1 1 0 012 12V7zm8.5 2a.5.5 0 00-.5.5v2a.5.5 0 00.5.5h2a.5.5 0 00.5-.5v-2a.5.5 0 00-.5-.5h-2z",fill:"#979797"})))};
@@ -1,3 +1,3 @@
1
- <svg width="18" height="14" viewBox="0 0 18 14" fill="#979797" xmlns="http://www.w3.org/2000/svg">
2
- <path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.00002C18 0.89543 17.1046 0 16 0H2C0.89543 0 0 0.89543 0 2L0.000956201 4.35567C0.00105503 4.59911 0.0899525 4.83415 0.250979 5.01672C0.731269 5.56128 1 6.25846 1 7C1 7.74154 0.731269 8.43872 0.250979 8.98328C0.0899525 9.16585 0.00105503 9.4009 0.000956201 9.64433L0 11.9996C0 13.1046 0.89543 14 2 14H16C17.1046 14 18 13.1046 18 12L17.9999 9.64574C17.9999 9.40205 17.9109 9.16675 17.7497 8.98404C17.269 8.43938 17 7.7419 17 7C17 6.2581 17.269 5.56062 17.7497 5.01596C17.9109 4.83325 17.9999 4.59795 17.9999 4.35426L18 2.00002ZM2.07187 4.09764L2 4.002L1.999 2H5C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2H16L15.999 4.002L15.929 4.09646C15.3306 4.93393 15 5.94228 15 7L15.0069 7.26333C15.057 8.22459 15.3805 9.13586 15.929 9.90354L15.999 9.997L16 12H7C7 11.4477 6.55228 11 6 11C5.44772 11 5 11.4477 5 12H2V9.996L2.07187 9.90236C2.66972 9.06511 3 8.05722 3 7C3 5.94278 2.66972 4.93489 2.07187 4.09764ZM6 6C6.55228 6 7 5.55228 7 5C7 4.44772 6.55228 4 6 4C5.44772 4 5 4.44772 5 5C5 5.55228 5.44772 6 6 6ZM7 9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9C5 8.44771 5.44772 8 6 8C6.55228 8 7 8.44771 7 9Z" />
1
+ <svg width="18" height="14" viewBox="0 0 18 14" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M18 2.00002C18 0.89543 17.1046 0 16 0H2C0.89543 0 0 0.89543 0 2L0.000956201 4.35567C0.00105503 4.59911 0.0899525 4.83415 0.250979 5.01672C0.731269 5.56128 1 6.25846 1 7C1 7.74154 0.731269 8.43872 0.250979 8.98328C0.0899525 9.16585 0.00105503 9.4009 0.000956201 9.64433L0 11.9996C0 13.1046 0.89543 14 2 14H16C17.1046 14 18 13.1046 18 12L17.9999 9.64574C17.9999 9.40205 17.9109 9.16675 17.7497 8.98404C17.269 8.43938 17 7.7419 17 7C17 6.2581 17.269 5.56062 17.7497 5.01596C17.9109 4.83325 17.9999 4.59795 17.9999 4.35426L18 2.00002ZM2.07187 4.09764L2 4.002L1.999 2H5C5 2.55228 5.44772 3 6 3C6.55228 3 7 2.55228 7 2H16L15.999 4.002L15.929 4.09646C15.3306 4.93393 15 5.94228 15 7L15.0069 7.26333C15.057 8.22459 15.3805 9.13586 15.929 9.90354L15.999 9.997L16 12H7C7 11.4477 6.55228 11 6 11C5.44772 11 5 11.4477 5 12H2V9.996L2.07187 9.90236C2.66972 9.06511 3 8.05722 3 7C3 5.94278 2.66972 4.93489 2.07187 4.09764ZM6 6C6.55228 6 7 5.55228 7 5C7 4.44772 6.55228 4 6 4C5.44772 4 5 4.44772 5 5C5 5.55228 5.44772 6 6 6ZM7 9C7 9.55229 6.55228 10 6 10C5.44772 10 5 9.55229 5 9C5 8.44771 5.44772 8 6 8C6.55228 8 7 8.44771 7 9Z" fill="#979797"/>
3
3
  </svg>
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},l.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",l({width:18,height:14,fill:"#979797",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 2a2 2 0 00-2-2H2a2 2 0 00-2 2l.001 2.356a1 1 0 00.25.66C.731 5.562 1 6.259 1 7S.731 8.439.251 8.983a1 1 0 00-.25.661L0 12a2 2 0 002 2h14a2 2 0 002-2V9.646a1 1 0 00-.25-.662A2.984 2.984 0 0117 7c0-.742.269-1.44.75-1.984a1 1 0 00.25-.662V2zM2.072 4.098L2 4.002 1.999 2H5a1 1 0 002 0h9l-.001 2.002-.07.094A4.982 4.982 0 0015 7l.007.263c.05.962.373 1.873.922 2.64l.07.094L16 12H7a1 1 0 10-2 0H2V9.996l.072-.094A4.982 4.982 0 003 7c0-1.057-.33-2.065-.928-2.902zM6 6a1 1 0 100-2 1 1 0 000 2zm1 3a1 1 0 11-2 0 1 1 0 012 0z"})))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t,a=require("react");(e=a)&&"object"==typeof e&&"default"in e&&e.default;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var l in a)({}).hasOwnProperty.call(a,l)&&(e[l]=a[l])}return e},l.apply(null,arguments)}exports.ReactComponent=function(e){return a.createElement("svg",l({width:18,height:14,fill:"none",xmlns:"http://www.w3.org/2000/svg"},e),t||(t=a.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M18 2a2 2 0 00-2-2H2a2 2 0 00-2 2l.001 2.356a1 1 0 00.25.66C.731 5.562 1 6.259 1 7S.731 8.439.251 8.983a1 1 0 00-.25.661L0 12a2 2 0 002 2h14a2 2 0 002-2V9.646a1 1 0 00-.25-.662A2.984 2.984 0 0117 7c0-.742.269-1.44.75-1.984a1 1 0 00.25-.662V2zM2.072 4.098L2 4.002 1.999 2H5a1 1 0 002 0h9l-.001 2.002-.07.094A4.982 4.982 0 0015 7l.007.263c.05.962.373 1.873.922 2.64l.07.094L16 12H7a1 1 0 10-2 0H2V9.996l.072-.094A4.982 4.982 0 003 7c0-1.057-.33-2.065-.928-2.902zM6 6a1 1 0 100-2 1 1 0 000 2zm1 3a1 1 0 11-2 0 1 1 0 012 0z",fill:"#979797"})))};
@@ -13,5 +13,5 @@ export type CalendarProps = {
13
13
  initialDate?: DateTime;
14
14
  getDateTimeButtonProps: (date: DateTime) => Pick<DateTimeButtonProps, "resources" | "showResources" | "shouldCalculateResources" | "isDisabled">;
15
15
  };
16
- export declare const Calendar: (props: CalendarProps) => JSX.Element;
16
+ export declare const Calendar: ({ initialDate, ...props }: CalendarProps) => JSX.Element;
17
17
  //# 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,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAK3D,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,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,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CACP,mBAAmB,EACnB,WAAW,GAAG,eAAe,GAAG,0BAA0B,GAAG,YAAY,CAC1E,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,QAAQ,UAAW,aAAa,gBAW5C,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,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAI3D,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,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,sBAAsB,EAAE,CACtB,IAAI,EAAE,QAAQ,KACX,IAAI,CACP,mBAAmB,EACnB,WAAW,GAAG,eAAe,GAAG,0BAA0B,GAAG,YAAY,CAC1E,CAAC;CACH,CAAC;AAEF,eAAO,MAAM,QAAQ,8BAGlB,aAAa,gBASf,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("../static/loader/LoaderIndicator.js"),i=require("luxon");require("../static/index.js");var s=require("./components/CalendarButtons/CalendarButtons.js"),l=require("./components/CalendarDates/CalendarDates.js"),o=i.DateTime.now().set({millisecond:0,second:0,hour:0,minute:0});exports.Calendar=function(e){var t=e.initialDate,i=void 0===t?o:t,d=e.isLoading;return r.createElement("div",{className:"calendar-wrapper"},r.createElement("div",{className:"calendar"},r.createElement(s.CalendarButtons,a.__assign({initialDate:i},e)),d?r.createElement(n.LoaderIndicator,null):r.createElement(l.CalendarDates,a.__assign({},e))))},exports.defaultStartDay=o;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("luxon"),s=require("./components/CalendarButtons/CalendarButtons.js"),i=require("./components/CalendarDates/CalendarDates.js"),l=n.DateTime.now().set({millisecond:0,second:0,hour:0,minute:0});exports.Calendar=function(e){var t=e.initialDate,n=void 0===t?l:t,o=a.__rest(e,["initialDate"]);return r.createElement("div",{className:"calendar-wrapper"},r.createElement("div",{className:"calendar"},r.createElement(s.CalendarButtons,a.__assign({initialDate:n},o)),r.createElement(i.CalendarDates,a.__assign({},o))))},exports.defaultStartDay=l;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
2
  import { CalendarProps } from "../../Calendar";
3
- export type CalendarDatesProps = Pick<CalendarProps, "calendarDates" | "selectedDate" | "setSelectedDate" | "fromPrice" | "getDateTimeButtonProps">;
4
- export declare const CalendarDates: ({ calendarDates, selectedDate, setSelectedDate, fromPrice, getDateTimeButtonProps, }: CalendarDatesProps) => JSX.Element;
3
+ export type CalendarDatesProps = Pick<CalendarProps, "isLoading" | "calendarDates" | "selectedDate" | "setSelectedDate" | "fromPrice" | "getDateTimeButtonProps">;
4
+ export declare const CalendarDates: ({ isLoading, calendarDates, selectedDate, setSelectedDate, fromPrice, getDateTimeButtonProps, }: 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":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,CAC3B,CAAC;AAEF,eAAO,MAAM,aAAa,yFAMvB,kBAAkB,gBA4CpB,CAAC"}
1
+ {"version":3,"file":"CalendarDates.d.ts","sourceRoot":"","sources":["../../../../src/calendar/components/CalendarDates/CalendarDates.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,kBAAkB,GAAG,IAAI,CACnC,aAAa,EACX,WAAW,GACX,eAAe,GACf,cAAc,GACd,iBAAiB,GACjB,WAAW,GACX,wBAAwB,CAC3B,CAAC;AAEF,eAAO,MAAM,aAAa,oGAOvB,kBAAkB,gBA+CpB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("../../../date-time-button/DateTimeButton.js"),l=require("../CalendarWeekdays/CalendarWeekdays.js");exports.CalendarDates=function(e){var d=e.calendarDates,i=e.selectedDate,u=e.setSelectedDate,s=e.fromPrice,c=e.getDateTimeButtonProps,o=t.useMemo((function(){var e,t,r=null!==(t=null===(e=d[0])||void 0===e?void 0:e.weekday)&&void 0!==t?t:0;if(1===r)return d;for(var n=[];r>1;)n.push(null),r-=1;return a.__spreadArray(a.__spreadArray([],a.__read(n),!1),a.__read(d),!1)}),[d]);return r.createElement("div",{className:"calendar-dates-wrapper"},r.createElement(l.CalendarWeekdays,null),r.createElement("div",{className:"calendar-dates"},o.map((function(e){if(null===e)return r.createElement("div",null);var t=c(e);return r.createElement(n.DateTimeButton,a.__assign({key:+e,isSelected:i?e.hasSame(i,"day"):void 0,date:e,onSelect:function(){return u(e)},price:s,variant:n.Variant.month},t))}))))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,a=require("tslib"),t=require("react"),r=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,n=require("../../../date-time-button/DateTimeButton.js"),d=require("../CalendarWeekdays/CalendarWeekdays.js");exports.CalendarDates=function(e){var i=e.isLoading,l=void 0!==i&&i,s=e.calendarDates,u=e.selectedDate,o=e.setSelectedDate,c=e.fromPrice,m=e.getDateTimeButtonProps,v=t.useMemo((function(){var e,t,r=null!==(t=null===(e=s[0])||void 0===e?void 0:e.weekday)&&void 0!==t?t:0;if(1===r)return s;for(var n=[];r>1;)n.push(null),r-=1;return a.__spreadArray(a.__spreadArray([],a.__read(n),!1),a.__read(s),!1)}),[s]);return r.createElement("div",{className:"calendar-dates-wrapper"},r.createElement(d.CalendarWeekdays,null),r.createElement("div",{className:"calendar-dates"},v.map((function(e){if(null===e)return r.createElement("div",null);var t=m(e),d=l||t.isDisabled;return r.createElement(n.DateTimeButton,a.__assign({key:+e,isDisabled:d,isSelected:u?e.hasSame(u,"day"):void 0,date:e,onSelect:function(){return o(e)},price:c,variant:n.Variant.month},t))}))))};
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { BookingSummaryProps } from "./types";
3
3
  export declare const BookingSummary: {
4
- ({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, transactionFee, productsWithErrors, isLoading, hasPeopleInput, isPaymentLink, peopleAmount, footer, headerComponent, isPaymentPage, }: Omit<BookingSummaryProps, "totallWithDiscount">): JSX.Element;
4
+ ({ date, time, menuSteps, formValues, shouldHidePeopleAmount, eventName, transactionFee, productsWithErrors, isLoading, hasPeopleInput, isPaymentLink, peopleAmount, }: Omit<BookingSummaryProps, "totallWithDiscount">): JSX.Element;
5
5
  SummaryTotal: ({ formValues, totalWithDiscount, transactionFee, isFreePayment, }: Pick<BookingSummaryProps, "formValues" | "totalWithDiscount" | "transactionFee" | "isFreePayment">) => JSX.Element;
6
- Accordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, isPaymentPage, headerComponent, }: import("./components/BookingSummaryAccordion").BookingSummaryAccordionProps) => JSX.Element;
6
+ Accordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, }: import("./components/BookingSummaryAccordion").BookingSummaryAccordionProps) => JSX.Element;
7
7
  };
8
8
  //# sourceMappingURL=BookingSummary.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAM9C,eAAO,MAAM,cAAc;oNAiBxB,KAAK,mBAAmB,EAAE,oBAAoB,CAAC;;;CAiFjD,CAAC"}
1
+ {"version":3,"file":"BookingSummary.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/order-process/components/BookingSummary/BookingSummary.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAI9C,eAAO,MAAM,cAAc;4KAaxB,KAAK,mBAAmB,EAAE,oBAAoB,CAAC;;;CAuEjD,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react"),a=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,r=require("@licklist/core/dist/Config"),n=require("../../../../static/loader/LoaderIndicator.js"),m=require("react-i18next");require("../../../../static/index.js");var l=require("lodash"),c=require("react-intl"),s=require("../../../../assets/iframe/calendar.svg.js"),i=require("../../../../assets/iframe/ticket.svg.js");require("./components/SummaryTotal/components/SummaryTotalBlock.js");var o=require("./components/ProductsByMenuStep/ProductsByMenuStep.js"),u=require("./components/SummaryTotal/SummaryTotal.js"),d=require("./components/BookingSummaryAccordion/BookingSummaryAccordion.js"),p=function(e){var t,s=e.date,i=e.time,u=e.menuSteps,p=e.formValues,E=void 0===p?{}:p,v=e.shouldHidePeopleAmount,g=e.eventName,N=e.transactionFee,f=void 0===N?0:N,h=e.productsWithErrors,P=void 0===h?[]:h,k=e.isLoading,S=e.hasPeopleInput,b=e.isPaymentLink,q=e.peopleAmount,j=e.footer,B=e.headerComponent,x=e.isPaymentPage,A=m.useTranslation("Design").t,T=c.useIntl().formatNumber;return k?a.createElement("div",{className:"payment-booking-summary"},a.createElement(n.LoaderIndicator,{isLoaded:!1})):a.createElement("div",{className:"payment-booking-summary"},a.createElement(d.BookingSummaryAccordion,{isPaymentPage:x,hasPeopleInput:S,headerComponent:B},a.createElement("div",{className:"event-info"},a.createElement(y,{eventName:g,isPaymentPage:x,date:s,time:i})),a.createElement("hr",null),(null===(t=l.values(E))||void 0===t?void 0:t.length)>0?a.createElement("div",null,a.createElement("div",{className:"cart-items"},a.createElement("div",{className:"products-by-menu-step"},u.map((function(e){return a.createElement(o.ProductsByMenuStep,{isPaymentLink:b,key:e.id,orderItems:E,step:e,productsWithErrors:P})}))),!v&&q>0&&a.createElement(a.Fragment,null,a.createElement("hr",null),a.createElement("div",{className:"d-flex justify-content-between mt-3 people"},a.createElement("p",{className:"m-0 payment-metadata"},A("people"),":"),a.createElement("p",{className:"price"},q))),!!f&&a.createElement(a.Fragment,null,a.createElement("hr",null),a.createElement("div",{className:"d-flex justify-content-between mt-3"},a.createElement("p",{className:"m-0 payment-metadata"},A("transactionFee"),":"),a.createElement("p",{className:"price"},T(f,{style:"currency",currency:r.Currency.GBP}))))),j):a.createElement("div",{className:"cart-items"},a.createElement("p",{className:"empty-cart"},A("emptyBasket")))))};p.SummaryTotal=u.SummaryTotal,p.Accordion=d.BookingSummaryAccordion;var y=function(e){var t=e.isPaymentPage,r=e.eventName,n=e.date,m=e.time;return t?a.createElement(a.Fragment,null,a.createElement("div",{className:"d-flex align-items-center mb-5"},a.createElement(i.ReactComponent,{height:16,width:20,fill:"black"}),a.createElement("div",{className:"m-0 pl-2 title event-name metadata"},r)),a.createElement("div",{className:"d-flex align-items-center mb-5"},a.createElement(s.ReactComponent,{height:16,width:20,fill:"black"}),a.createElement("div",{className:"m-0 pl-2 metadata"},n)),m&&a.createElement("div",{className:"mb-5 metadata"},m)):a.createElement(a.Fragment,null,a.createElement("p",{className:"m-0 title event-name"},r),a.createElement("p",{className:"m-0"},n),m&&a.createElement("p",{className:"m-0"},m))};exports.BookingSummary=p;
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"),n=require("../../../../static/loader/LoaderIndicator.js"),m=require("react-i18next");require("../../../../static/index.js");var c=require("lodash"),o=require("react-intl");require("./components/SummaryTotal/components/SummaryTotalBlock.js");var s=require("./components/ProductsByMenuStep/ProductsByMenuStep.js"),l=require("./components/SummaryTotal/SummaryTotal.js"),i=require("./components/BookingSummaryAccordion/BookingSummaryAccordion.js"),u=function(e){var t,l=e.date,u=e.time,d=e.menuSteps,p=e.formValues,y=void 0===p?{}:p,E=e.shouldHidePeopleAmount,v=e.eventName,N=e.transactionFee,S=void 0===N?0:N,f=e.productsWithErrors,g=void 0===f?[]:f,k=e.isLoading,q=e.hasPeopleInput,B=e.isPaymentLink,h=e.peopleAmount,j=m.useTranslation("Design").t,P=o.useIntl().formatNumber;return k?r.createElement("div",{className:"payment-booking-summary"},r.createElement(n.LoaderIndicator,{isLoaded:!1})):r.createElement("div",{className:"payment-booking-summary"},r.createElement(i.BookingSummaryAccordion,{hasPeopleInput:q},r.createElement("div",{className:"event-info"},r.createElement("p",{className:"m-0 title event-name"},v),r.createElement("p",{className:"m-0"},l),u&&r.createElement("p",{className:"m-0"},u)),r.createElement("hr",null),(null===(t=c.values(y))||void 0===t?void 0:t.length)>0?r.createElement("div",null,r.createElement("div",{className:"cart-items"},r.createElement("div",{className:"products-by-menu-step"},d.map((function(e){return r.createElement(s.ProductsByMenuStep,{isPaymentLink:B,key:e.id,orderItems:y,step:e,productsWithErrors:g})}))),!E&&h>0&&r.createElement(r.Fragment,null,r.createElement("hr",null),r.createElement("div",{className:"d-flex justify-content-between mt-3"},r.createElement("p",{className:"m-0"},j("people"),":"),r.createElement("p",{className:"price"},h))),!!S&&r.createElement(r.Fragment,null,r.createElement("hr",null),r.createElement("div",{className:"d-flex justify-content-between mt-3"},r.createElement("p",{className:"m-0"},j("transactionFee"),":"),r.createElement("p",{className:"price"},P(S,{style:"currency",currency:a.Currency.GBP})))))):r.createElement("div",{className:"cart-items"},r.createElement("p",{className:"empty-cart"},j("emptyBasket")))))};u.SummaryTotal=l.SummaryTotal,u.Accordion=i.BookingSummaryAccordion,exports.BookingSummary=u;
@@ -1,10 +1,8 @@
1
- import { PropsWithChildren, ReactElement } from "react";
1
+ import { PropsWithChildren } from "react";
2
2
  export type BookingSummaryAccordionProps = PropsWithChildren<{
3
3
  title?: string;
4
4
  showTitleOnlyOnMobile?: boolean;
5
5
  hasPeopleInput?: boolean;
6
- isPaymentPage?: boolean;
7
- headerComponent?: ReactElement;
8
6
  }>;
9
- export declare const BookingSummaryAccordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, isPaymentPage, headerComponent, }: BookingSummaryAccordionProps) => JSX.Element;
7
+ export declare const BookingSummaryAccordion: ({ children, title, showTitleOnlyOnMobile, hasPeopleInput, }: BookingSummaryAccordionProps) => JSX.Element;
10
8
  //# sourceMappingURL=BookingSummaryAccordion.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BookingSummaryAccordion.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGZ,iBAAiB,EAEjB,YAAY,EACb,MAAM,OAAO,CAAC;AAaf,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;CAChC,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB,gGAOjC,4BAA4B,gBA+D9B,CAAC"}
1
+ {"version":3,"file":"BookingSummaryAccordion.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx"],"names":[],"mappings":"AAAA,OAAc,EAGZ,iBAAiB,EAElB,MAAM,OAAO,CAAC;AAaf,MAAM,MAAM,4BAA4B,GAAG,iBAAiB,CAAC;IAC3D,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC,CAAC;AAEH,eAAO,MAAM,uBAAuB,gEAKjC,4BAA4B,gBA6D9B,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),o=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-bootstrap"),a=require("@licklist/plugins/dist/hooks/Media/useWindowDimensions"),s=require("../../types/index.js"),r=require("../../../../../page/components/PageBody/constants.js"),c=require("../../../../../page/components/PageBody/hooks/useResizePageBody.js"),l=require("../ToggleHeader/ToggleHeader.js");exports.BookingSummaryAccordion=function(e){var d=e.children,u=e.title,E=e.showTitleOnlyOnMobile,p=void 0!==E&&E,C=e.hasPeopleInput,g=e.isPaymentPage,m=e.headerComponent,w=a.useWindowDimensions().width,O=t.__read(n.useState(w<=s.MOBILE_WIDTH),2),_=O[0],h=O[1],v=c.useResizePageBody().rightBlockContentStyles,y=w<=s.MOBILE_WIDTH,f=n.useCallback((function(e){h(e===s.ACCORDION_KEY)}),[]),B=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_EXPAND))}),[]),I=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_EXPANDED))}),[]),P=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_COLLAPSE))}),[]),D=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_COLLAPSED))}),[]);n.useEffect((function(){w>s.MOBILE_WIDTH?h(!0):h(!1)}),[w,h]);var A=!p||p&&y;return o.createElement(i.Accordion,{defaultActiveKey:s.ACCORDION_KEY,onSelect:f},o.createElement(l.ToggleHeader,{isPaymentPage:g,showExpandButton:y,isExpanded:_,title:u,hideComponent:!A,headerComponent:m}),o.createElement(i.Accordion.Collapse,{eventKey:s.ACCORDION_KEY,onEnter:B,onEntered:I,onExit:P,onExited:D,className:"".concat(A&&"has-toggler"," ").concat(C&&"collapse-with-people-input"),style:v},o.createElement("div",{className:"summary-wrapper"},d)))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),o=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-bootstrap"),a=require("@licklist/plugins/dist/hooks/Media/useWindowDimensions"),s=require("../../types/index.js"),r=require("../../../../../page/components/PageBody/constants.js"),c=require("../../../../../page/components/PageBody/hooks/useResizePageBody.js"),l=require("../ToggleHeader/ToggleHeader.js");exports.BookingSummaryAccordion=function(e){var d=e.children,u=e.title,E=e.showTitleOnlyOnMobile,p=void 0!==E&&E,C=e.hasPeopleInput,w=a.useWindowDimensions().width,O=t.__read(n.useState(w<=s.MOBILE_WIDTH),2),_=O[0],g=O[1],v=c.useResizePageBody().rightBlockContentStyles,h=w<=s.MOBILE_WIDTH,m=n.useCallback((function(e){g(e===s.ACCORDION_KEY)}),[]),f=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_EXPAND))}),[]),y=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_EXPANDED))}),[]),B=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_COLLAPSE))}),[]),I=n.useCallback((function(){window.dispatchEvent(new Event(r.RIGHT_BLOCK_COLLAPSED))}),[]);n.useEffect((function(){w>s.MOBILE_WIDTH?g(!0):g(!1)}),[w,g]);var D=!p||p&&h;return o.createElement(i.Accordion,{defaultActiveKey:s.ACCORDION_KEY,onSelect:m},o.createElement(l.ToggleHeader,{showExpandButton:h,isExpanded:_,title:u,hideComponent:!D}),o.createElement(i.Accordion.Collapse,{eventKey:s.ACCORDION_KEY,onEnter:f,onEntered:y,onExit:B,onExited:I,className:"".concat(D&&"has-toggler"," ").concat(C&&"collapse-with-people-input"),style:v},o.createElement("div",{className:"summary-wrapper"},d)))};
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  export type SummaryTotalBlockProps = {
3
- label?: string;
3
+ label: string;
4
4
  amount: number;
5
5
  };
6
6
  export declare const SummaryTotalBlock: ({ label, amount, }: SummaryTotalBlockProps) => JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"SummaryTotalBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,uBAG3B,sBAAsB,gBAcxB,CAAC"}
1
+ {"version":3,"file":"SummaryTotalBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,iBAAiB,uBAG3B,sBAAsB,gBAcxB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,l=require("@licklist/core/dist/Config"),a=require("react-intl");exports.SummaryTotalBlock=function(e){var r=e.label,c=e.amount,u=a.useIntl().formatNumber;return t.createElement("div",{className:"total"},r&&t.createElement("div",null,r),t.createElement("div",{className:"m-0 price"},u(c,{style:"currency",currency:l.Currency.GBP})))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("react"),t=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,a=require("@licklist/core/dist/Config"),c=require("react-intl");exports.SummaryTotalBlock=function(e){var r=e.label,l=e.amount,u=c.useIntl().formatNumber;return t.createElement("div",{className:"total"},t.createElement("p",{className:"m-0"},r),t.createElement("p",{className:"m-0 price"},u(l,{style:"currency",currency:a.Currency.GBP})))};
@@ -1,12 +1,10 @@
1
- import { ReactElement } from "react";
1
+ /// <reference types="react" />
2
2
  type ToggleHeaderProps = {
3
3
  showExpandButton: boolean;
4
4
  isExpanded: boolean;
5
5
  title?: string;
6
6
  hideComponent?: boolean;
7
- headerComponent?: ReactElement;
8
- isPaymentPage: boolean;
9
7
  };
10
- export declare const ToggleHeader: ({ showExpandButton, isExpanded, title, hideComponent, isPaymentPage, headerComponent, }: ToggleHeaderProps) => JSX.Element;
8
+ export declare const ToggleHeader: ({ showExpandButton, isExpanded, title, hideComponent, }: ToggleHeaderProps) => JSX.Element;
11
9
  export {};
12
10
  //# sourceMappingURL=ToggleHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,YAAY,EAAyB,MAAM,OAAO,CAAC;AAQnE,KAAK,iBAAiB,GAAG;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,aAAa,EAAE,OAAO,CAAC;CACxB,CAAC;AAOF,eAAO,MAAM,YAAY,4FAOtB,iBAAiB,gBA8CnB,CAAC"}
1
+ {"version":3,"file":"ToggleHeader.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx"],"names":[],"mappings":";AAQA,KAAK,iBAAiB,GAAG;IACvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAEF,eAAO,MAAM,YAAY,4DAKtB,iBAAiB,gBAqDnB,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("react"),n=e(t),r=require("react-i18next"),a=require("../../../../../../static/Icon.js"),o=e(require("clsx")),c=require("../../types/index.js");require("../../../../../../static/index.js");var l=require("react-bootstrap/AccordionToggle"),i=e(require("react-bootstrap/AccordionContext")),s=function(e){var t=e.title,o=e.showExpandButton,l=e.currentEventKey,i=e.isPaymentPage,s=e.headerComponent,u=r.useTranslation("Design").t;return i?n.createElement(n.Fragment,null,n.createElement("div",{className:"d-flex"},n.createElement("p",{className:"m-0 mr-2 toggle-title"},t||u("yourBooking")),o&&n.createElement("div",{className:"expand-button"},n.createElement(a.default,{type:l===c.ACCORDION_KEY?"chevron-up":"chevron-down",width:"0.5rem"}))),s):n.createElement(n.Fragment,null,n.createElement("div",{className:"d-flex"},n.createElement("p",{className:"m-0"},t||u("yourBooking"))),o&&n.createElement("div",{className:"expand-button"},n.createElement(a.default,{type:l===c.ACCORDION_KEY?"chevron-up":"chevron-down",width:"1rem"})))};exports.ToggleHeader=function(e){var r=e.showExpandButton,a=e.isExpanded,u=e.title,m=e.hideComponent,d=e.isPaymentPage,p=e.headerComponent,E=t.useContext(i),f=l.useAccordionToggle(c.ACCORDION_KEY);return t.useEffect((function(){E||!a?E&&!a&&f(void 0):f(void 0)}),[a]),m?null:n.createElement("div",{onClick:function(e){return r&&f(e)},onKeyPress:function(e){return r&&f(e)},role:"button",tabIndex:0,className:o("d-flex flex-column",d&&"payment-page-toggle")},n.createElement("h6",{className:o("title",r&&"pointer")},n.createElement("div",{className:"d-flex w-100 align-content-center justify-content-between"},n.createElement(s,{showExpandButton:r,title:u,currentEventKey:E,isPaymentPage:d,headerComponent:p}))),a&&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")),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,7 +1,6 @@
1
1
  import { QuantityCheckProductInfo } from "@licklist/plugins/dist/types/Api/verifyStock";
2
2
  import { OrderItems } from "@licklist/plugins/dist/types/context/Iframe/orderItems";
3
3
  import { MenuStep } from "@licklist/plugins/dist/types/context/sale/menuSteps";
4
- import { ReactElement } from "react";
5
4
  export declare const MOBILE_WIDTH = 576;
6
5
  export declare const ACCORDION_KEY = "booking-summary";
7
6
  export type BookingSummaryProps = {
@@ -19,8 +18,5 @@ export type BookingSummaryProps = {
19
18
  isLoading?: boolean;
20
19
  peopleAmount: number;
21
20
  isPaymentLink?: boolean;
22
- isPaymentPage?: boolean;
23
- headerComponent?: ReactElement;
24
- footer?: ReactElement;
25
21
  };
26
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;AAC/E,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAErC,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,eAAe,CAAC,EAAE,YAAY,CAAC;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/order-process/components/BookingSummary/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,8CAA8C,CAAC;AACxF,OAAO,EAAE,UAAU,EAAE,MAAM,wDAAwD,CAAC;AACpF,OAAO,EAAE,QAAQ,EAAE,MAAM,qDAAqD,CAAC;AAE/E,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,aAAa,oBAAoB,CAAC;AAE/C,MAAM,MAAM,mBAAmB,GAAG;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,kBAAkB,CAAC,EAAE,wBAAwB,EAAE,CAAC;IAChD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC"}
@@ -15,6 +15,5 @@ export declare const SEPARATOR_DEFAULT_WIDTH = 2;
15
15
  export declare const COLLAPSE_MARGIN = 36;
16
16
  export declare const PAGE_LEFT_BLOCK_CONTAINER_ID = "page-left-block-container";
17
17
  export declare const PAGE_CALENDAR_SELECT_WRAPPER = "calendar-select-wrapper";
18
- export declare const PAGE_BODY_WITH_SCROLL = "page-body-with-scroll";
19
18
  export declare const PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE = 300;
20
19
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/page/components/PageBody/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,eAAO,MAAM,qBAAqB,QAAU,CAAC;AAE7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAG9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAI9C,eAAO,MAAM,0CAA0C,KAAK,CAAC;AAE7D,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AACnE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AACtE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/iframe/page/components/PageBody/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,eAAO,MAAM,yBAAyB,8BAA8B,CAAC;AAErE,eAAO,MAAM,qBAAqB,QAAU,CAAC;AAE7C,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAG9C,eAAO,MAAM,0BAA0B,MAAM,CAAC;AAI9C,eAAO,MAAM,0CAA0C,KAAK,CAAC;AAE7D,eAAO,MAAM,kBAAkB,+BAA+B,CAAC;AAC/D,eAAO,MAAM,oBAAoB,yBAAyB,CAAC;AAC3D,eAAO,MAAM,oBAAoB,iCAAiC,CAAC;AACnE,eAAO,MAAM,qBAAqB,0BAA0B,CAAC;AAE7D,eAAO,MAAM,mBAAmB,qBAAqB,CAAC;AACtD,eAAO,MAAM,4BAA4B,oCAAoC,CAAC;AAC9E,eAAO,MAAM,0BAA0B,kCAAkC,CAAC;AAC1E,eAAO,MAAM,uBAAuB,IAAI,CAAC;AACzC,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,eAAO,MAAM,4BAA4B,8BAA8B,CAAC;AACxE,eAAO,MAAM,4BAA4B,4BAA4B,CAAC;AACtE,eAAO,MAAM,gCAAgC,MAAM,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.COLLAPSE_MARGIN=36,exports.DEFAULT_RIGHT_BLOCK_HEIGHT=132,exports.PAGE_BODY_WITH_SCROLL="page-body-with-scroll",exports.PAGE_CALENDAR_SELECT_WRAPPER="calendar-select-wrapper",exports.PAGE_LEFT_BLOCK_CONTAINER_ID="page-left-block-container",exports.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE=300,exports.PAGE_RIGHT_BLOCK_BOTTOM_ID="page-right-block-bottom-block",exports.PAGE_RIGHT_BLOCK_CHILDREN_ID="page-right-block-children-block",exports.PAGE_RIGHT_BLOCK_ID="page-right-block",exports.RIGHT_BLOCK_COLLAPSE="RIGHT_BLOCK_COLLAPSE_CLICKED",exports.RIGHT_BLOCK_COLLAPSED="RIGHT_BLOCK_COLLAPSED",exports.RIGHT_BLOCK_EXPAND="RIGHT_BLOCK_EXPAND_CLICKED",exports.RIGHT_BLOCK_EXPANDED="RIGHT_BLOCK_EXPANDED",exports.RIGHT_BLOCK_RESIZED_EVENT="RIGHT_BLOCK_RESIZED_EVENT",exports.SEPARATOR_DEFAULT_WIDTH=2,exports.STANDARD_BODY_PADDING=97,exports.STANDARD_HEADER_FOOTER_SIZE=96,exports.TAB_WIDTH=768;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.COLLAPSE_MARGIN=36,exports.DEFAULT_RIGHT_BLOCK_HEIGHT=132,exports.PAGE_CALENDAR_SELECT_WRAPPER="calendar-select-wrapper",exports.PAGE_LEFT_BLOCK_CONTAINER_ID="page-left-block-container",exports.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE=300,exports.PAGE_RIGHT_BLOCK_BOTTOM_ID="page-right-block-bottom-block",exports.PAGE_RIGHT_BLOCK_CHILDREN_ID="page-right-block-children-block",exports.PAGE_RIGHT_BLOCK_ID="page-right-block",exports.RIGHT_BLOCK_COLLAPSE="RIGHT_BLOCK_COLLAPSE_CLICKED",exports.RIGHT_BLOCK_COLLAPSED="RIGHT_BLOCK_COLLAPSED",exports.RIGHT_BLOCK_EXPAND="RIGHT_BLOCK_EXPAND_CLICKED",exports.RIGHT_BLOCK_EXPANDED="RIGHT_BLOCK_EXPANDED",exports.RIGHT_BLOCK_RESIZED_EVENT="RIGHT_BLOCK_RESIZED_EVENT",exports.SEPARATOR_DEFAULT_WIDTH=2,exports.STANDARD_BODY_PADDING=97,exports.STANDARD_HEADER_FOOTER_SIZE=96,exports.TAB_WIDTH=768;
@@ -1 +1 @@
1
- {"version":3,"file":"useResizePageBody.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/hooks/useResizePageBody.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;eAMnB,MAAM;gBACL,MAAM;;CA4OjB,CAAC"}
1
+ {"version":3,"file":"useResizePageBody.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/hooks/useResizePageBody.ts"],"names":[],"mappings":"AAqBA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;eAMnB,MAAM;gBACL,MAAM;;CAmOjB,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),i=((e=n)&&"object"==typeof e&&"default"in e&&e.default,require("@licklist/plugins/dist/hooks/Media/useWindowDimensions")),r=require("../constants.js");exports.useResizePageBody=function(){var e=i.useWindowDimensions(),u=e.height,_=e.width,o=t.__read(n.useState(r.DEFAULT_RIGHT_BLOCK_HEIGHT),2),E=o[0],c=o[1],d=t.__read(n.useState({width:r.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,height:r.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE}),2),s=d[0],f=d[1],L=n.useRef(void 0),A=n.useRef(!1),T=t.__read(n.useState(!1),2),a=T[0],D=T[1],I=t.__read(n.useState(!1),2),v=I[0],O=I[1],R=t.__read(n.useState(!1),2),l=R[0],B=R[1],h=t.__read(n.useState(!1),2),C=h[0],H=h[1],w=n.useMemo((function(){if(_>=r.TAB_WIDTH)return{};if(!v&&!C)return{};var e=document.getElementById(r.PAGE_CALENDAR_SELECT_WRAPPER),t=e?e.clientHeight:0,n=document.getElementById(r.PAGE_BODY_WITH_SCROLL);return n&&n.scroll({top:-u,behavior:"smooth"}),{maxHeight:u-r.STANDARD_BODY_PADDING-E-r.STANDARD_HEADER_FOOTER_SIZE-t}}),[u,_,E,a,v,l,C]),S=new ResizeObserver((function(){var e=document.getElementById(r.PAGE_LEFT_BLOCK_CONTAINER_ID);if(e){if(_>=r.TAB_WIDTH&&!A)return A.current=!0,void f({width:e.clientWidth,height:e.clientHeight});A.current=!1,f((function(){var t=e.clientWidth<=e.clientHeight?e.clientWidth:e.clientHeight;return(!L.current||L.current&&t>L.current)&&(L.current=t),{width:e.clientWidth,height:L.current}}))}})),P=n.useMemo((function(){if(_>=r.TAB_WIDTH)return{};if(!v&&!C)return{};var e=.75*(u-r.STANDARD_BODY_PADDING-r.STANDARD_HEADER_FOOTER_SIZE),t=0,n=document.getElementById(r.PAGE_RIGHT_BLOCK_BOTTOM_ID);return n&&(t=r.SEPARATOR_DEFAULT_WIDTH+n.clientHeight),{maxHeight:e-t-r.COLLAPSE_MARGIN}}),[u,_,E,a,v,l,C]);return n.useEffect((function(){var e=function(e){var t=e.detail.height;c(t)};return window.addEventListener(r.RIGHT_BLOCK_RESIZED_EVENT,(function(t){return e(t)})),function(){window.removeEventListener(r.RIGHT_BLOCK_RESIZED_EVENT,(function(t){return e(t)}))}}),[]),n.useEffect((function(){var e=function(){D(!0),O(!1),B(!1),H(!1)};return window.addEventListener(r.RIGHT_BLOCK_EXPAND,e),function(){window.removeEventListener(r.RIGHT_BLOCK_EXPAND,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!0),B(!1),H(!1)};return window.addEventListener(r.RIGHT_BLOCK_EXPANDED,e),function(){window.removeEventListener(r.RIGHT_BLOCK_EXPANDED,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!1),B(!0),H(!1)};return window.addEventListener(r.RIGHT_BLOCK_COLLAPSE,e),function(){window.removeEventListener(r.RIGHT_BLOCK_COLLAPSE,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!1),B(!1),H(!0)};return window.addEventListener(r.RIGHT_BLOCK_COLLAPSED,e),function(){window.removeEventListener(r.RIGHT_BLOCK_COLLAPSED,e)}}),[]),n.useEffect((function(){var e=document.getElementById(r.PAGE_LEFT_BLOCK_CONTAINER_ID);if(e)return S.observe(e),function(){e&&S.unobserve(e)}}),[]),n.useEffect((function(){L.current=void 0}),[_]),{leftBlockStyles:w,rightBlockContentStyles:P,leftBlockContainerSizes:s}};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),n=require("react"),i=((e=n)&&"object"==typeof e&&"default"in e&&e.default,require("@licklist/plugins/dist/hooks/Media/useWindowDimensions")),r=require("../constants.js");exports.useResizePageBody=function(){var e=i.useWindowDimensions(),u=e.height,_=e.width,E=t.__read(n.useState(r.DEFAULT_RIGHT_BLOCK_HEIGHT),2),o=E[0],c=E[1],d=t.__read(n.useState({width:r.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE,height:r.PAGE_LEFT_BLOCK_MAP_DEFAULT_SIZE}),2),s=d[0],f=d[1],L=n.useRef(void 0),A=n.useRef(!1),T=t.__read(n.useState(!1),2),a=T[0],D=T[1],v=t.__read(n.useState(!1),2),I=v[0],O=v[1],R=t.__read(n.useState(!1),2),B=R[0],l=R[1],h=t.__read(n.useState(!1),2),w=h[0],C=h[1],H=n.useMemo((function(){if(_>=r.TAB_WIDTH)return{};if(!I&&!w)return{};var e=document.getElementById(r.PAGE_CALENDAR_SELECT_WRAPPER),t=e?e.clientHeight:0;return{maxHeight:u-r.STANDARD_BODY_PADDING-o-r.STANDARD_HEADER_FOOTER_SIZE-t}}),[u,_,o,a,I,B,w]),S=new ResizeObserver((function(){var e=document.getElementById(r.PAGE_LEFT_BLOCK_CONTAINER_ID);if(e){if(_>=r.TAB_WIDTH&&!A)return A.current=!0,void f({width:e.clientWidth,height:e.clientHeight});A.current=!1,f((function(){var t=e.clientWidth<=e.clientHeight?e.clientWidth:e.clientHeight;return(!L.current||L.current&&t>L.current)&&(L.current=t),{width:e.clientWidth,height:L.current}}))}})),P=n.useMemo((function(){if(_>=r.TAB_WIDTH)return{};if(!I&&!w)return{};var e=.75*(u-r.STANDARD_BODY_PADDING-r.STANDARD_HEADER_FOOTER_SIZE),t=0,n=document.getElementById(r.PAGE_RIGHT_BLOCK_BOTTOM_ID);return n&&(t=r.SEPARATOR_DEFAULT_WIDTH+n.clientHeight),{maxHeight:e-t-r.COLLAPSE_MARGIN}}),[u,_,o,a,I,B,w]);return n.useEffect((function(){var e=function(e){var t=e.detail.height;c(t)};return window.addEventListener(r.RIGHT_BLOCK_RESIZED_EVENT,(function(t){return e(t)})),function(){window.removeEventListener(r.RIGHT_BLOCK_RESIZED_EVENT,(function(t){return e(t)}))}}),[]),n.useEffect((function(){var e=function(){D(!0),O(!1),l(!1),C(!1)};return window.addEventListener(r.RIGHT_BLOCK_EXPAND,e),function(){window.removeEventListener(r.RIGHT_BLOCK_EXPAND,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!0),l(!1),C(!1)};return window.addEventListener(r.RIGHT_BLOCK_EXPANDED,e),function(){window.removeEventListener(r.RIGHT_BLOCK_EXPANDED,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!1),l(!0),C(!1)};return window.addEventListener(r.RIGHT_BLOCK_COLLAPSE,e),function(){window.removeEventListener(r.RIGHT_BLOCK_COLLAPSE,e)}}),[]),n.useEffect((function(){var e=function(){D(!1),O(!1),l(!1),C(!0)};return window.addEventListener(r.RIGHT_BLOCK_COLLAPSED,e),function(){window.removeEventListener(r.RIGHT_BLOCK_COLLAPSED,e)}}),[]),n.useEffect((function(){var e=document.getElementById(r.PAGE_LEFT_BLOCK_CONTAINER_ID);if(e)return S.observe(e),function(){e&&S.unobserve(e)}}),[]),n.useEffect((function(){L.current=void 0}),[_]),{leftBlockStyles:H,rightBlockContentStyles:P,leftBlockContainerSizes:s}};
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAI/F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAOpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IACrE,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,gBAkKd,CAAC"}
1
+ {"version":3,"file":"PaymentPage.d.ts","sourceRoot":"","sources":["../../../../src/iframe/payment/payment-page/PaymentPage.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gDAAgD,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,0DAA0D,CAAC;AAI/F,OAAO,EAEL,oBAAoB,EACrB,MAAM,4BAA4B,CAAC;AAMpC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd;AAED,UAAU,YAAa,SAAQ,oBAAoB;IACjD,oBAAoB,CAAC,EAAE,MAAM,IAAI,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,IAAI,CAAC;IACjC,IAAI,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IAClC,SAAS,EAAE,OAAO,CAAC;IACnB,mBAAmB,EAAE,IAAI,CAAC,mBAAmB,EAAE,oBAAoB,CAAC,CAAC;IACrE,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,kIAQrB,YAAY,gBA0Jd,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),r=require("react"),o=(e=r)&&"object"==typeof e&&"default"in e?e.default:e,a=require("react-router-dom"),n=require("../../../static/loader/LoaderIndicator.js"),l=require("react-i18next"),m=require("react-bootstrap");require("../../../static/index.js");var s=require("../../page/components/PageBody/constants.js");require("../../order-process/components/Timer/Timer.js"),require("../../order-process/components/NavigationSteps/NavigationSteps.js");var i=require("../../page/Page.js"),c=require("../../page/components/PageBody/PageBody.js");require("../../page/components/PageHeader/PageHeader.js"),require("../../order-process/components/NavigationFooter/NavigationFooter.js");var u=require("@licklist/plugins/dist/context/payment/PaymentSessionContext"),d=require("../../order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js"),p=require("../../ryft/RyftPaymentForm.js"),y=require("../../order-process/components/BookingSummary/utils/index.js"),g=require("../../order-process/components/BookingSummary/BookingSummary.js");require("../../order-process/components/PaymentCard/PaymentCard.js"),require("../../order-process/components/BookingSummaryFooter/BookingSummaryFooter.js"),require("../../order-process/components/ErrorModal/ErrorModal.js"),require("../../order-process/components/utils/useCategoryVerification.js"),require("../../order-process/components/CalendarStepsForm/CalendarStepsForm.js");var f=require("./PaymentTimer.js");exports.PaymentPage=function(e){var P=e.onCloseIframePayment,E=e.onFailIframePayment,B=e.data,S=e.isLoading,k=e.bookingSummaryProps,q=e.paymentMetadata,v=t.__rest(e,["onCloseIframePayment","onFailIframePayment","data","isLoading","bookingSummaryProps","paymentMetadata"]),j=l.useTranslation("Design").t,b=a.useLocation().search,x=r.useContext(u.PaymentSessionContext).isPaymentSessionExpired,F=Boolean(new URLSearchParams(b).get("isIframePayment"));if(r.useEffect((function(){F&&P&&window.addEventListener("beforeunload",(function(){P()}))}),[]),r.useEffect((function(){x&&F&&E&&E()}),[x]),S)return o.createElement(n.LoaderIndicator,{isLoaded:!1});if(null===B)return o.createElement(i.Page,null,o.createElement(c.PageBody,{leftBlock:o.createElement(c.PageBody.LeftBlock,null,o.createElement("div",{className:"d-flex h-100 w-100 justify-content-center align-items-center flex-column"},o.createElement("h6",null,j("linkNotActiveOrExpired")),o.createElement(m.Col,{xs:12,md:3},o.createElement(m.Button,{className:"mt-5 w-20",onClick:function(){window.location.href="https://booked.it/"}},j("backToSite")))))}));var T=y.cartSumByOrderProducts((null==k?void 0:k.formValues)&&Object.values(null==k?void 0:k.formValues)),C=T>(null==B?void 0:B.amount);return o.createElement(i.Page,{className:"payment_link"},o.createElement(c.PageBody,{id:s.PAGE_BODY_WITH_SCROLL,leftBlock:o.createElement(c.PageBody.LeftBlock,null,o.createElement("div",{className:"d-flex align-items-center mb-5"},o.createElement(f.PaymentTimer,null)),o.createElement(p.RyftPaymentForm,t.__assign({},v))),rightBlock:o.createElement(c.PageBody.RightBlock,null,o.createElement(g.BookingSummary,t.__assign({},k,{isPaymentPage:!0,headerComponent:o.createElement(d.SummaryTotalBlock,{amount:q?q.total:T+((null==k?void 0:k.transactionFee)||0)}),footer:o.createElement("div",{className:"d-flex flex-column justify-content-between"},q?o.createElement(o.Fragment,null,o.createElement(d.SummaryTotalBlock,{label:j("total"),amount:q.total||0}),o.createElement(d.SummaryTotalBlock,{label:j("paidSum"),amount:q.paid||0}),o.createElement(d.SummaryTotalBlock,{label:j("remaining"),amount:q.total-q.paid||0})):o.createElement(o.Fragment,null,C&&o.createElement(d.SummaryTotalBlock,{label:j("total"),amount:T+((null==k?void 0:k.transactionFee)||0)}),o.createElement(d.SummaryTotalBlock,{label:j(C?"totalWithDiscount":"total"),amount:(null==B?void 0:B.amount)+((null==k?void 0:k.transactionFee)||0)})))})))}))};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("tslib"),o=require("react"),r=(e=o)&&"object"==typeof e&&"default"in e?e.default:e,a=require("react-router-dom"),n=require("../../../static/loader/LoaderIndicator.js"),l=require("react-i18next"),m=require("react-bootstrap");require("../../../static/index.js"),require("../../order-process/components/Timer/Timer.js"),require("../../order-process/components/NavigationSteps/NavigationSteps.js");var i=require("../../page/Page.js"),s=require("../../page/components/PageBody/PageBody.js"),c=require("../../page/components/PageHeader/PageHeader.js");require("../../order-process/components/NavigationFooter/NavigationFooter.js");var u=require("@licklist/plugins/dist/context/payment/PaymentSessionContext"),d=require("../../order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js"),y=require("../../ryft/RyftPaymentForm.js"),p=require("../../order-process/components/BookingSummary/utils/index.js"),g=require("../../order-process/components/BookingSummary/BookingSummary.js");require("../../order-process/components/PaymentCard/PaymentCard.js");var f=require("../../order-process/components/BookingSummaryFooter/BookingSummaryFooter.js");require("../../order-process/components/ErrorModal/ErrorModal.js"),require("../../order-process/components/utils/useCategoryVerification.js"),require("../../order-process/components/CalendarStepsForm/CalendarStepsForm.js");var B=require("./PaymentTimer.js");exports.PaymentPage=function(e){var k=e.onCloseIframePayment,E=e.onFailIframePayment,P=e.data,S=e.isLoading,v=e.bookingSummaryProps,j=e.paymentMetadata,q=t.__rest(e,["onCloseIframePayment","onFailIframePayment","data","isLoading","bookingSummaryProps","paymentMetadata"]),b=l.useTranslation("Design").t,x=a.useLocation().search,C=o.useContext(u.PaymentSessionContext).isPaymentSessionExpired,F=Boolean(new URLSearchParams(x).get("isIframePayment")),h=function(){window.close()};if(o.useEffect((function(){F&&k&&window.addEventListener("beforeunload",(function(){k()}))}),[]),o.useEffect((function(){C&&F&&E&&E()}),[C]),S)return r.createElement(n.LoaderIndicator,{isLoaded:!1});if(null===P)return r.createElement(i.Page,null,r.createElement(s.PageBody,{leftBlock:r.createElement(s.PageBody.LeftBlock,null,r.createElement("div",{className:"d-flex h-100 w-100 justify-content-center align-items-center flex-column"},r.createElement("h6",null,b("linkNotActiveOrExpired")),r.createElement(m.Col,{xs:12,md:3},r.createElement(m.Button,{className:"mt-5 w-20",onClick:function(){window.location.href="https://booked.it/"}},b("backToSite")))))}));var w=p.cartSumByOrderProducts((null==v?void 0:v.formValues)&&Object.values(null==v?void 0:v.formValues)),T=w>(null==P?void 0:P.amount);return r.createElement(i.Page,{className:"payment_link",headerBlock:r.createElement(c.PageHeader,{showBackButton:F,onBackButtonClick:F?h:void 0,showCloseButton:F,onCloseButtonClick:F?h:void 0},r.createElement(B.PaymentTimer,null),r.createElement("div",{className:"d-flex align-items-center justify-content-center w-100"},b("paymentDetails")))},r.createElement(s.PageBody,{leftBlock:r.createElement(s.PageBody.LeftBlock,null,r.createElement(y.RyftPaymentForm,t.__assign({},q))),rightBlock:r.createElement(s.PageBody.RightBlock,{bottomBlock:r.createElement(f.BookingSummaryFooter,{showButton:!1},r.createElement("div",{className:"d-flex flex-column justify-content-between"},j?r.createElement(r.Fragment,null,r.createElement(d.SummaryTotalBlock,{label:b("total"),amount:j.total||0}),r.createElement(d.SummaryTotalBlock,{label:b("paidSum"),amount:j.paid||0}),r.createElement(d.SummaryTotalBlock,{label:b("remaining"),amount:j.total-j.paid||0})):r.createElement(r.Fragment,null,T&&r.createElement(d.SummaryTotalBlock,{label:b("total"),amount:w+((null==v?void 0:v.transactionFee)||0)}),r.createElement(d.SummaryTotalBlock,{label:b(T?"totalWithDiscount":"total"),amount:(null==P?void 0:P.amount)+((null==v?void 0:v.transactionFee)||0)}))))},r.createElement("h6",null,b("paymentDetails")),r.createElement(g.BookingSummary,t.__assign({},v)))}))};
@@ -1 +1 @@
1
- {"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":";AAOA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAC;AAI1D,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,uEAMzB,oBAAoB,gBAyJtB,CAAC"}
1
+ {"version":3,"file":"RyftPaymentForm.d.ts","sourceRoot":"","sources":["../../../src/iframe/ryft/RyftPaymentForm.tsx"],"names":[],"mappings":";AAQA,OAAO,EAKL,sBAAsB,EACvB,MAAM,kDAAkD,CAAC;AAG1D,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAW/C,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;AAE1D,MAAM,WAAW,oBAAoB;IAEnC,SAAS,EAAE,GAAG,CAAC;IACf,eAAe,EAAE,OAAO,CAAC;IACzB,QAAQ,EAAE,CACR,SAAS,EAAE,MAAM,IAAI,EACrB,SAAS,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,KAChC,OAAO,CAAC,IAAI,CAAC,CAAC;IACnB,QAAQ,EAAE,MAAM,OAAO,CAAC,sBAAsB,CAAC,CAAC;IAChD,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,eAAO,MAAM,eAAe,uEAMzB,oBAAoB,gBAmJtB,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),a=require("react-router-dom"),i=require("../../static/loader/BlockLoader.js"),o=require("react-i18next"),u=e(require("react-bootstrap/Button")),s=require("react-hook-form"),c=require("../../static/loader/ButtonLoader.js"),l=e(require("react-bootstrap/Alert"));require("../../static/index.js");var d=require("@licklist/plugins/dist/hooks/Ryft/useRyftPayment"),f=require("./utils/ryft-form.js"),m={insufficient_funds:"insufficientFunds",declined_do_not_honour:"declinedDoNotHonour",invalid_card_number:"invalidCardNumber",restricted_card:"restrictedCard",security_violation:"securityViolation",expired_card:"expiredCard",gateway_reject:"gatewayReject",bad_track_data:"badTrackData","3ds_authentication_failure":"3dsAuthenticationFailure",unknown_error:"unknownError"};exports.RyftPaymentForm=function(e){var y,_,v=e.accountId,E=e.isCreateLoading,p=e.initRyft,g=e.resetReferrer,R=e.onSubmit,b=o.useTranslation(["Design","Validation","Ryft"]).t,h=r.useRef(null),q=a.useHistory(),k=t.__read(r.useState(!1),2),w=k[0],N=k[1],S=t.__read(r.useState(!1),2),T=S[0],F=S[1],A=t.__read(r.useState(!1),2),P=A[0],j=A[1],x=t.__read(r.useState(void 0),2),C=x[0],D=x[1],L=d.useRyftPayment().addEventHandler,U=s.useForm(),V=function(){g&&g()},B=function(e){(null==e?void 0:e.id)&&(null==e?void 0:e.returnUrl)&&(window.location.href="".concat(e.returnUrl,"&ps=").concat(e.id),V())};return r.useEffect((function(){return f.injectComponentsInRyftForm({t:b})}),[null===(_=null===(y=h.current)||void 0===y?void 0:y.childNodes)||void 0===_?void 0:_.length]),r.useEffect((function(){v.data&&!v.isError&&p((function(){L("cardValidationChanged",(function(e){N(e.isValid)})),j(!1)}),(function(){return j(!0)}))}),[v.data]),v.isLoading||v.isFetching||E?n.createElement("div",{className:"mt-5 pt-5"},n.createElement(i.BlockLoader,null)):v.isError?n.createElement("div",{className:"mt-5 ryft-init-failure"},n.createElement(l,{key:"danger",variant:"danger"},n.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:noPaymentProviderFound"))):P?n.createElement("div",{className:"mt-5 ryft-init-failure"},n.createElement(l,{key:"danger",variant:"danger"},n.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:initFailureMessage"),n.createElement("div",{className:"flex flex-column align-items-center mt-4"},n.createElement(u,{variant:"primary",onClick:function(){q.go(0)}},b("Ryft:refresh"))))):n.createElement(n.Fragment,null,n.createElement("form",{ref:h,id:"ryft-pay-form",noValidate:!0,onSubmit:U.handleSubmit((function(){return t.__awaiter(void 0,void 0,void 0,(function(){var e,r,n;return t.__generator(this,(function(t){switch(t.label){case 0:F(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,R()];case 2:if((e=t.sent())||D("unknown_error"),"requiredAction"in e){if(e.status!==d.RYFT_STATUS_PENDING_ACTION||!(null===(n=e.requiredAction)||void 0===n?void 0:n.url))return B(e),[2];window.location.href=e.requiredAction.url,V()}return e.status===d.RYFT_STATUS_APPROVED||e.status===d.RYFT_STATUS_CAPTURED?(B(e),[2]):(e.lastError&&(D(e.lastError),V()),[3,5]);case 3:return r=t.sent(),D(r),[3,5];case 4:return F(!1),[7];case 5:return[2]}}))}))})),className:"ryft-payment-form"},n.createElement("div",{className:"submit-button-wrapper mt-4 p-1"},n.createElement(u,{type:"submit",disabled:T||!w},T&&n.createElement(c.ButtonLoader,null),b("Design:buyNow"))),C&&n.createElement("div",{id:"ryft-payment-error"},b("".concat(m[C])))))},exports.ryftErrorMap=m;
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"),a=e(r),n=require("react-router-dom"),i=require("../../static/loader/BlockLoader.js"),o=require("react-i18next"),u=e(require("react-bootstrap/Button")),s=require("react-hook-form"),c=e(require("react-bootstrap/Form")),l=require("../../static/loader/ButtonLoader.js"),d=e(require("react-bootstrap/Alert"));require("../../static/index.js");var f=require("@licklist/plugins/dist/hooks/Ryft/useRyftPayment"),m={insufficient_funds:"insufficientFunds",declined_do_not_honour:"declinedDoNotHonour",invalid_card_number:"invalidCardNumber",restricted_card:"restrictedCard",security_violation:"securityViolation",expired_card:"expiredCard",gateway_reject:"gatewayReject",bad_track_data:"badTrackData","3ds_authentication_failure":"3dsAuthenticationFailure",unknown_error:"unknownError"};exports.RyftPaymentForm=function(e){var y=e.accountId,_=e.isCreateLoading,E=e.initRyft,v=e.resetReferrer,p=e.onSubmit,b=o.useTranslation(["Design","Validation","Ryft"]).t,g=n.useHistory(),R=t.__read(r.useState(!1),2),h=R[0],q=R[1],k=t.__read(r.useState(!1),2),w=k[0],S=k[1],T=t.__read(r.useState(!1),2),F=T[0],N=T[1],A=t.__read(r.useState(void 0),2),P=A[0],x=A[1],D=f.useRyftPayment().addEventHandler,C=s.useForm(),j=function(){v&&v()},L=function(e){(null==e?void 0:e.id)&&(null==e?void 0:e.returnUrl)&&(window.location.href="".concat(e.returnUrl,"&ps=").concat(e.id),j())};return r.useEffect((function(){y.data&&!y.isError&&E((function(){D("cardValidationChanged",(function(e){q(e.isValid)})),N(!1)}),(function(){return N(!0)}))}),[y.data]),y.isLoading||y.isFetching||_?a.createElement("div",{className:"mt-5 pt-5"},a.createElement(i.BlockLoader,null)):y.isError?a.createElement("div",{className:"mt-5 ryft-init-failure"},a.createElement(d,{key:"danger",variant:"danger"},a.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:noPaymentProviderFound"))):F?a.createElement("div",{className:"mt-5 ryft-init-failure"},a.createElement(d,{key:"danger",variant:"danger"},a.createElement("h5",null,b("Ryft:errorMessage")),b("Ryft:initFailureMessage"),a.createElement("div",{className:"flex flex-column align-items-center mt-4"},a.createElement(u,{variant:"primary",onClick:function(){g.go(0)}},b("Ryft:refresh"))))):a.createElement(a.Fragment,null,a.createElement(c.Label,null,b("Design:paymentDetails")),a.createElement("form",{id:"ryft-pay-form",noValidate:!0,onSubmit:C.handleSubmit((function(){return t.__awaiter(void 0,void 0,void 0,(function(){var e,r,a;return t.__generator(this,(function(t){switch(t.label){case 0:S(!0),t.label=1;case 1:return t.trys.push([1,3,4,5]),[4,p()];case 2:if((e=t.sent())||x("unknown_error"),"requiredAction"in e){if(e.status!==f.RYFT_STATUS_PENDING_ACTION||!(null===(a=e.requiredAction)||void 0===a?void 0:a.url))return L(e),[2];window.location.href=e.requiredAction.url,j()}return e.status===f.RYFT_STATUS_APPROVED||e.status===f.RYFT_STATUS_CAPTURED?(L(e),[2]):(e.lastError&&(x(e.lastError),j()),[3,5]);case 3:return r=t.sent(),x(r),[3,5];case 4:return S(!1),[7];case 5:return[2]}}))}))})),className:"ryft-payment-form"},a.createElement("div",{className:"submit-button-wrapper mt-3 p-1"},a.createElement(u,{type:"submit",disabled:w||!h},w&&a.createElement(l.ButtonLoader,null),b("Design:buyNow"))),P&&a.createElement("div",{id:"ryft-payment-error"},b("".concat(m[P])))))},exports.ryftErrorMap=m;
@@ -1 +1 @@
1
- {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAG7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAiBtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,mFAKnB,2BAA2B,gBAqP7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
1
+ {"version":3,"file":"DateInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAG7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAgBtF,MAAM,WAAW,4BAA4B;IAC3C,eAAe,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,EAAE,CAAC;CACnD;AAED,UAAU,2BAA2B;IACnC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;IACvB,4BAA4B,EAAE,OAAO,CAAC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,SAAS,mFAKnB,2BAA2B,gBAmP7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,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 r=require("tslib"),t=require("react"),n=e(t),i=require("react-i18next"),a=require("react-bootstrap"),u=require("../../static/Icon.js"),o=require("react-hook-form"),l=require("@react-aria/utils"),s=require("react-use"),c=require("luxon");require("../../static/index.js");var d=require("../../modals/confirmation/ConfirmModal.js"),m=require("rrule"),v=e(m),f=require("@licklist/core/dist/Config/Date"),p=require("../../recurring-date-picker-input/RecurringDatePickerInput.js"),g=require("../../zone/form/components/AvailableTimesControl.js"),T=require("../product/constants.js"),E=require("../../recurring-date-picker-input/DatePickerInput.js"),b=require("./ProductSetRecurrenceOverridesControl.js"),R={name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var r=e.state,t={width:"".concat(r.rects.reference.width+4,"px"),marginLeft:"-2px",maxWidth:"unset"};Object.assign(r.styles.popper,t)},effect:function(e){var r=e.state,t=r.elements.reference.getBoundingClientRect().width,n={width:"".concat(t,"px"),maxWidth:"unset"};Object.assign(r.elements.popper.style,n)}};exports.DateInput=function(e){var D,_,q,x,h=e.isEventEditProductSet,I=e.isLoading,y=e.workHours,C=e.providerHasBookingManagement,M=o.useFormContext(),O=M.control,k=M.register,w=M.formState.errors,A=M.getValues,N=M.setValue,S=M.clearErrors,j=o.useFieldArray({name:"menuRecurrences",control:O,keyName:"_id"}),F=j.fields,P=j.append,V=j.update,L=r.__read(t.useState(!1),2),W=L[0],B=L[1],H=t.useRef(),U=r.__read(t.useState({index:null,values:null}),2),z=U[0],Y=U[1],G=function(){return Y({index:null,values:null})},J=t.useRef();s.useClickAway(J,(function(e){var r,t,n;d.CONFIRM_MODAL_ACTIONS.includes(null===(n=null===(t=null===(r=e.target)||void 0===r?void 0:r.attributes)||void 0===t?void 0:t.getNamedItem("data-id"))||void 0===n?void 0:n.value)||(B(!1),G())}));var K=l.useId(),Q=i.useTranslation("Design").t,X=function(){F.length>=1||(G(),B((function(e){return!e})))};return n.createElement(a.Form.Group,null,n.createElement(a.Form.Label,null,Q(h?"whenOverridesAvailable":"productSetAvailable")),n.createElement(a.OverlayTrigger,{show:W,overlay:n.createElement(a.Popover,{id:K,className:"rounded"},n.createElement(a.Popover.Content,{className:"shadow-lg rounded",ref:J},n.createElement(E.DatePickerInput,{defaultValues:z.values,onChange:function(e){return r.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a,u,o,l,s,d,g,T,E,b;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,null===(d=H.current)||void 0===d?void 0:d.trigger()];case 1:return t=r.sent(),(null==e?void 0:e.startTime)&&(null==e?void 0:e.endTime)&&t&&(n=c.DateTime.fromISO(e.startTime),i=c.DateTime.fromISO(e.endTime),a=H.current.getValues().availableTimes,!a.every((function(e){var r=c.DateTime.fromFormat(e,f.TIME_FORMAT);return r.diff(n,"minutes").minutes>=0&&r.diff(i,"minutes").minutes<=0})))?(H.current.setError("availableTimes",{message:Q("Validation:fieldTimeBetween",{attribute:Q("Design:startTimesSmall"),min:n.toFormat(f.TIME_FORMAT),max:i.toFormat(f.TIME_FORMAT)})}),[2]):(u=p.getDateTimeObject(e.startDate,e.endTime||"23:59:59"),o=v.optionsToString({until:u.toJSDate(),byweekday:[],freq:m.Frequency.DAILY,tzid:f.TIMEZONE,interval:1}).replace("RRULE:",""),l=(null===(T=null===(g=null==H?void 0:H.current)||void 0===g?void 0:g.getValues())||void 0===T?void 0:T.availableTimes)||null,s={rrule:o,startDate:e.startDate,endDate:e.startDate,startTime:e.startTime,endTime:e.endTime,availableTimes:l},(null===(E=z.values)||void 0===E?void 0:E.id)&&(s.id=null===(b=z.values)||void 0===b?void 0:b.id),null!==z.index?V(z.index,s):P(s),B((function(){return!1})),G(),[2])}}))}))},onDelete:function(){var e=z.index;B(!1),G(),setTimeout((function(){var r=A().menuRecurrences;N("menuRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)}},C&&n.createElement(g.AvailableTimesControl,{workHours:y,isLoading:I,ref:H,defaultValues:[],errorMessage:null===(q=null===(_=null===(D=null==w?void 0:w.menuRecurrences)||void 0===D?void 0:D["".concat(null==z?void 0:z.index)])||void 0===_?void 0:_.availableTimes)||void 0===q?void 0:q.message,clearErrorMessage:function(){return S("menuRecurrences.".concat(null==z?void 0:z.index,".availableTimes"))}})))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[R]}},n.createElement("div",{className:"product-set-recurrences"},F.map((function(e,r){var t,i,a;return n.createElement(b.ProductSetRecurrenceOverridesControl,{key:e._id,menuRecurrence:e,onEdit:function(){return function(e,r){G(),setTimeout((function(){Y({index:r,values:e}),B((function(){return!0}))}),100)}(e,r)},errorMessage:null===(a=null===(i=null===(t=null==w?void 0:w.menuRecurrences)||void 0===t?void 0:t["".concat(r)])||void 0===i?void 0:i.availableTimes)||void 0===a?void 0:a.message})})),F.length<T.MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE&&n.createElement("div",{className:"product-set-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:X,onKeyDown:X},n.createElement(u.default,{type:"plus-circle",height:"1rem",className:"product-set-recurrence-icon-add mr-2"}),Q("addDates")),n.createElement(a.Form.Control,r.__assign({type:"hidden"},k("menuRecurrences",{required:{value:!0,message:Q("Validation:fieldMinNumber",{attribute:Q("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(x=w.menuRecurrences)||void 0===x?void 0:x.message))))},exports.sameWidthPopperModifier=R;
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),t=require("react"),n=e(t),i=require("react-i18next"),a=require("react-bootstrap"),u=require("../../static/Icon.js"),o=require("react-hook-form"),l=require("@react-aria/utils"),s=require("react-use"),c=require("luxon");require("../../static/index.js");var d=require("../../modals/confirmation/ConfirmModal.js"),m=require("rrule"),v=e(m),f=require("@licklist/core/dist/Config/Date"),p=require("../../recurring-date-picker-input/RecurringDatePickerInput.js"),g=require("../../zone/form/components/AvailableTimesControl.js"),T=require("../../recurring-date-picker-input/DatePickerInput.js"),b=require("./ProductSetRecurrenceOverridesControl.js"),E={name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var r=e.state,t={width:"".concat(r.rects.reference.width+4,"px"),marginLeft:"-2px",maxWidth:"unset"};Object.assign(r.styles.popper,t)},effect:function(e){var r=e.state,t=r.elements.reference.getBoundingClientRect().width,n={width:"".concat(t,"px"),maxWidth:"unset"};Object.assign(r.elements.popper.style,n)}};exports.DateInput=function(e){var x,D,q,R,h=e.isEventEditProductSet,_=e.isLoading,y=e.workHours,I=e.providerHasBookingManagement,M=o.useFormContext(),O=M.control,k=M.register,w=M.formState.errors,C=M.getValues,S=M.setValue,F=M.clearErrors,j=o.useFieldArray({name:"menuRecurrences",control:O,keyName:"_id"}),A=j.fields,N=j.append,P=j.update,V=r.__read(t.useState(!1),2),L=V[0],W=V[1],B=t.useRef(),H=r.__read(t.useState({index:null,values:null}),2),z=H[0],G=H[1],J=function(){return G({index:null,values:null})},K=t.useRef();s.useClickAway(K,(function(e){var r,t,n;d.CONFIRM_MODAL_ACTIONS.includes(null===(n=null===(t=null===(r=e.target)||void 0===r?void 0:r.attributes)||void 0===t?void 0:t.getNamedItem("data-id"))||void 0===n?void 0:n.value)||(W(!1),J())}));var U=l.useId(),Y=i.useTranslation("Design").t,Z=function(){A.length>=1||(J(),W((function(e){return!e})))};return n.createElement(a.Form.Group,null,n.createElement(a.Form.Label,null,Y(h?"whenOverridesAvailable":"productSetAvailable")),n.createElement(a.OverlayTrigger,{show:L,overlay:n.createElement(a.Popover,{id:U,className:"rounded"},n.createElement(a.Popover.Content,{className:"shadow-lg rounded",ref:K},n.createElement(T.DatePickerInput,{defaultValues:z.values,onChange:function(e){return r.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a,u,o,l,s,d,g,T,b,E;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,null===(d=B.current)||void 0===d?void 0:d.trigger()];case 1:return t=r.sent(),(null==e?void 0:e.startTime)&&(null==e?void 0:e.endTime)&&t&&(n=c.DateTime.fromISO(e.startTime),i=c.DateTime.fromISO(e.endTime),a=B.current.getValues().availableTimes,!a.every((function(e){var r=c.DateTime.fromFormat(e,f.TIME_FORMAT);return r.diff(n,"minutes").minutes>=0&&r.diff(i,"minutes").minutes<=0})))?(B.current.setError("availableTimes",{message:Y("Validation:fieldTimeBetween",{attribute:Y("Design:startTimesSmall"),min:n.toFormat(f.TIME_FORMAT),max:i.toFormat(f.TIME_FORMAT)})}),[2]):(u=p.getDateTimeObject(e.startDate,e.endTime||"23:59:59"),o=v.optionsToString({until:u.toJSDate(),byweekday:[],freq:m.Frequency.DAILY,tzid:f.TIMEZONE,interval:1}).replace("RRULE:",""),l=(null===(T=null===(g=null==B?void 0:B.current)||void 0===g?void 0:g.getValues())||void 0===T?void 0:T.availableTimes)||null,s={rrule:o,startDate:e.startDate,endDate:e.startDate,startTime:e.startTime,endTime:e.endTime,availableTimes:l},(null===(b=z.values)||void 0===b?void 0:b.id)&&(s.id=null===(E=z.values)||void 0===E?void 0:E.id),null!==z.index?P(z.index,s):N(s),W((function(){return!1})),J(),[2])}}))}))},onDelete:function(){var e=z.index;W(!1),J(),setTimeout((function(){var r=C().menuRecurrences;S("menuRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)}},I&&n.createElement(g.AvailableTimesControl,{workHours:y,isLoading:_,ref:B,defaultValues:[],errorMessage:null===(q=null===(D=null===(x=null==w?void 0:w.menuRecurrences)||void 0===x?void 0:x["".concat(null==z?void 0:z.index)])||void 0===D?void 0:D.availableTimes)||void 0===q?void 0:q.message,clearErrorMessage:function(){return F("menuRecurrences.".concat(null==z?void 0:z.index,".availableTimes"))}})))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[E]}},n.createElement("div",{className:"product-set-recurrences"},A.map((function(e,r){var t,i,a;return n.createElement(b.ProductSetRecurrenceOverridesControl,{key:e._id,menuRecurrence:e,onEdit:function(){return function(e,r){J(),setTimeout((function(){G({index:r,values:e}),W((function(){return!0}))}),100)}(e,r)},errorMessage:null===(a=null===(i=null===(t=null==w?void 0:w.menuRecurrences)||void 0===t?void 0:t["".concat(r)])||void 0===i?void 0:i.availableTimes)||void 0===a?void 0:a.message})})),n.createElement("div",{className:"product-set-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:Z,onKeyDown:Z},n.createElement(u.default,{type:"plus-circle",height:"1rem",className:"product-set-recurrence-icon-add mr-2"}),Y("addDates")),n.createElement(a.Form.Control,r.__assign({type:"hidden"},k("menuRecurrences",{required:{value:!0,message:Y("Validation:fieldMinNumber",{attribute:Y("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(R=w.menuRecurrences)||void 0===R?void 0:R.message))))},exports.sameWidthPopperModifier=E;
@@ -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,EACL,WAAW,EAEZ,MAAM,0DAA0D,CAAC;AAGlE,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAEtE,OAAc,EACZ,WAAW,EAKZ,MAAM,OAAO,CAAC;AAgBf,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;AAQzC,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;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;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,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,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,EACZ,WAAmB,GACpB,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAwlBxB"}
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;AAGvF,OAAO,EACL,mBAAmB,EACnB,UAAU,EACX,MAAM,8DAA8D,CAAC;AAEtE,OAAc,EACZ,WAAW,EAKZ,MAAM,OAAO,CAAC;AAgBf,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;AAQzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAS5C,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;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;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,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,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,EACZ,WAAmB,GACpB,EAAE,mBAAmB,CAAC,CAAC,CAAC,eAulBxB"}
@@ -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=e(require("clsx")),p=require("../../static/switch/BooleanSwitch.js"),E=require("../../static/form-number-input/FormNumberInput.js");require("../../static/index.js");var g=require("../form/context.js"),f=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),C=require("@licklist/core/dist/DataMapper/Product/ProductDataMapper"),v=require("./booking-management/ProductBookingManagementControl.js"),b=require("./deposit/ProductDepositControl.js"),h=require("./quantity/ProductQuantityControl.js"),P=require("./quantity/ProductQuantityConstantControl.js"),I=require("./quantity/ProductQuantityRechargingControl.js"),N=e(require("react-bootstrap/Collapse")),F=require("@licklist/plugins/dist/hooks/Media/useImages"),q=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),T=require("../../file-upload/FileUpload.js");require("../../snippet/snippet-template/context/snippetTemplate.js"),require("../../snippet/snippet-template/context/snippetTemplateLoading.js"),require("../../snippet/snippet-template/context/snippetTemplateView.js");var y=require("../../snippet/snippet-template/control/PropertyControl.js");require("../../snippet/snippet-template/form/SnippetTemplateForm.js");var x=require("../../tiptap-editor/TipTapEditor.js");require("../../snippet/snippet-template/settings/SettingButton.js"),require("../../snippet/snippet-template/preview/Preview.js"),require("../../snippet/snippet-template/SnippetTemplate.js");var _=require("./fixed-duration-fields/FixedDurationOptions.js"),k=require("./duration/ProductDurationControl.js"),S=require("./price/ProductPriceControl.js"),D=require("./constants.js");exports.ProductControl=function(e){var j=e.isLoading,L=void 0!==j&&j,A=e.fieldNamePrefix,R=e.allowDeposits,w=void 0!==R&&R,M=e.hasBookingManagement,O=void 0!==M&&M,G=e.zoneList,U=void 0===G?[]:G,B=e.onCopy,Y=e.onProductNameChange,V=e.productName,Q=e.hasTicket,H=e.categoryType,X=e.zoneDuration,z=e.isOverrides,W=void 0!==z&&z,Z=s.useFormContext(),J=Z.register,K=Z.control,$=Z.formState.errors,ee=Z.setValue,te=Z.getValues,ae=Z.watch,ne=Z.trigger,re=Z.clearErrors,oe=a.useContext(g.ProductSetLoadingContext).setLoading,ie=r.useTranslation(["Design","Validation","ProductSet"]).t,le=t.__read(a.useState(!1),2),ce=le[0],se=le[1],de=t.__read(a.useState(null),2),ue=de[0],me=de[1],pe=Boolean(ae("".concat(A,".isUnlimited"))),Ee=ae("".concat(A,".capacity")),ge="0"===Ee||!Ee,fe=u.useId(),Ce=u.useId(),ve=u.useId(),be=u.useId(),he=u.useId(),Pe=u.useId(),Ie=u.useId(),Ne=u.useId(),Fe=u.useId(),qe=u.useId(),Te=u.useId(),ye=[{id:1,value:ie("quantitySelector")},{id:2,value:ie("stockControl")}],xe=a.useCallback((function(){return se((function(e){return!e}))}),[]),_e=s.useWatch({control:K,name:"".concat(A,".quantitySelector")}),ke=F.useImages(ue),Se=ke.images,De=ke.handleImageRemove,je=ke.handleImageUploading,Le=ke.isLoading,Ae=a.useCallback((function(e){je(e,q.IMAGE_TYPE_IMAGE)}),[je]),Re=a.useCallback((function(e,t){De(String(e),t)}),[De]),we=function(e){return e.target.select()};a.useEffect((function(){oe(Le)}),[oe,Le]),a.useEffect((function(){var e=te("".concat(A,".images"));me(e)}),[te,me,A]),a.useEffect((function(){Array.isArray(Se)&&ee("".concat(A,".images"),Se)}),[Se,A,ee]),a.useEffect((function(){ge?(ee("".concat(A,".duration"),0),re("".concat(A,".duration"))):ne("".concat(A,".duration"))}),[ge]);var Me=null!=_e?_e:"1",Oe=f.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:Ce},n.createElement(l.Form.Label,null,ie("name")),n.createElement(l.Form.Control,t.__assign({},J("".concat(A,".name")),{value:V,onChange:Y,isInvalid:d.isInvalid("".concat(A,".name"),$),disabled:L||W,placeholder:ie("name")})),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(A,".name"),$))),n.createElement(l.Form.Group,{controlId:ve},n.createElement(l.Form.Label,null,ie("description")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange;return n.createElement(x.TipTapEditor,{withEmoji:!1,viewMode:!1,onUpdate:r,content:a,disabled:L||W})},rules:{maxLength:{value:D.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH,message:ie("Validation:descriptionTooManyCharactersMessage",{max:D.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH})}},control:K,name:"".concat(A,".description")})),n.createElement("div",{className:"invalid-feedback field-values-error d-block"},d.getErrors("".concat(A,".description"),$)),w?n.createElement(o,null,n.createElement(b.ProductDepositControl,{isLoading:L,fieldNamePrefix:A}),n.createElement(S.ProductPriceControl,{isLoading:L,fieldNamePrefix:"".concat(A,".price"),title:ie("totalPrice"),allowDeposits:w})):n.createElement(S.ProductPriceControl,{isLoading:L,fieldNamePrefix:"".concat(A,".price")}),n.createElement("div",null,n.createElement(h.ProductQuantityControl,{isLoading:L,fieldNamePrefix:A,isOverrides:W,onFocus:we}),Oe===f.QUANTITY_TYPE_CONSTANT&&n.createElement(P.ProductQuantityConstantControl,{isLoading:L,fieldNamePrefix:A,onFocus:we,disabled:pe}),Oe===f.QUANTITY_TYPE_RECHARGING&&n.createElement(I.ProductQuantityRechargingControl,{isLoading:L,fieldNamePrefix:A,onFocus:we,disabled:pe}),n.createElement(l.Form.Group,{controlId:qe,className:"custom-checkbox"},n.createElement(l.Form.Check,t.__assign({custom:!0,type:"checkbox"},J("".concat(A,".isUnlimited")),{name:"".concat(A,".isUnlimited"),disabled:L})),n.createElement(l.Form.Check.Label,null,ie("isUnlimited")))),n.createElement(l.Form.Group,{controlId:Ne},n.createElement(l.Form.Label,null,ie("quantitySelectorType")),n.createElement(l.Form.Control,t.__assign({as:"select",defaultValue:Q?ye[0].id:void 0},J("".concat(A,".quantitySelector")),{isInvalid:d.isInvalid("".concat(A,".quantitySelector"),$),disabled:L||Q||W}),ye.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(A,".quantitySelector"),$))),n.createElement(y.PropertyControl,{item:"".concat(A,".color"),label:ie("ProductSet:selectColor"),isDisabled:W,isRequired:!1,defaultColors:C.PRODUCT_DEfAULT_COLORS}))),H===f.CATEGORY_TYPE_FIXED_DURATION&&n.createElement(o,{className:"align-items-start duration-capacity-container"},n.createElement(k.ProductDurationControl,{fieldNamePrefix:A,disabled:ge||W}),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(A,".capacity"),label:ie("capacity"),disabled:W,rules:{min:{value:0,message:ie("Validation:fieldMinNumber",{attribute:ie("capacity"),min:0})}}})),ge&&n.createElement("div",{className:"duration-hint duration-capacity-container"},ie("Design:forDurationEditing"))),H===f.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(A,".capacity"),label:ie("capacity"),onChange:function(e){X&&ee("".concat(A,".duration"),e*X)},disabled:W,rules:{min:{value:0,message:ie("Validation:fieldMinNumber",{attribute:ie("capacity"),min:1})}}})),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(A,".duration"),label:ie("durationMinutes"),disabled:ge||W,rules:{min:{value:0,message:ie("Validation:fieldMinNumber",{attribute:ie("duration"),min:0})},validate:function(e){return!(!ge&&(!e||e<1))||ie("Validation:fieldRequired",{attribute:ie("duration")})}}}))),ge&&n.createElement("div",{className:"duration-hint pl-0"},ie("Design:forDurationEditing"))),n.createElement(o,{className:"mt-4"},n.createElement(i,{lg:8,md:8},n.createElement(l.Form.Group,{controlId:be},n.createElement(l.Form.Label,null,ie("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(A,".termsAndConditions"),$),disabled:L||W,name:o})},control:K,name:"".concat(A,".termsAndConditions")}),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(A,".termsAndConditions"),$)))),n.createElement(i,{lg:4,md:4,className:m("licklist-file-upload-wrapper",W&&"opacity-50")},n.createElement(T.FileUpload,{onFilesChange:Ae,allowedExtensions:["jpeg","jpg","png"],subTitle:".jpeg .jpg .png",enablePreview:!0,onFileRemove:Re,defaultFiles:Se,isLoading:Le,disabled:W,withIcon:!0,title:ie("addImage")}))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(l.Form.Group,{controlId:he,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("isAvailable")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L||W})},control:K,name:"".concat(A,".isAvailable")})),n.createElement(l.Form.Group,{controlId:Pe,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("isSoldOut")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L})},control:K,name:"".concat(A,".isSoldOut")})),n.createElement(l.Form.Group,{controlId:fe,className:"custom-checkbox"},n.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:fe,disabled:L||W},n.createElement(l.Form.Check.Input,{checked:ce,onChange:xe,type:"checkbox"}),n.createElement(l.Form.Check.Label,null,ie("showAdvancedOptions"))))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(N,{in:ce},n.createElement("div",null,n.createElement(l.Form.Group,{controlId:Ie,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("isRequired")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L||W})},control:K,name:"".concat(A,".isRequired")})),n.createElement(l.Form.Group,{controlId:Fe,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("hasSpecialNotes")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L||W})},control:K,name:"".concat(A,".hasSpecialNotes")})),[f.CATEGORY_TYPE_GAME,f.CATEGORY_TYPE_FIXED_DURATION].includes(H)&&n.createElement(_.FixedDurationOptions,{fieldNamePrefix:A,isOverrides:W}),n.createElement(l.Form.Group,{controlId:Te,className:"advanced-switch-container"},n.createElement(S.ProductPriceControl,{title:ie("minSpend"),isRequired:!1,isMoreThanZero:!0,allowDeposits:!1,isLoading:L||W,fieldNamePrefix:"".concat(A,".minSpend")})))),n.createElement(o,null,n.createElement(i,{xs:12},O&&n.createElement(v.ProductBookingManagementControl,{isLoading:L,zoneList:U,fieldNamePrefix:A})))),n.createElement(o,null,n.createElement(i,{xs:!0},n.createElement("div",{className:"d-flex justify-content-end mt-4"},Boolean(B)&&n.createElement(l.Button,{onClick:B,variant:"link",className:"d-flex align-items-center"},n.createElement(c.default,{type:"clipboard",height:"1rem",className:"mr-2"})," ",ie("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")),m=require("@react-aria/utils"),u=e(require("clsx")),p=require("../../static/switch/BooleanSwitch.js"),E=require("../../static/form-number-input/FormNumberInput.js");require("../../static/index.js");var g=require("../form/context.js"),f=require("@licklist/core/dist/DataMapper/Product/ProductCategoryDataMapper"),C=require("@licklist/core/dist/DataMapper/Product/ProductDataMapper"),v=require("./booking-management/ProductBookingManagementControl.js"),b=require("./deposit/ProductDepositControl.js"),h=require("./quantity/ProductQuantityControl.js"),P=require("./quantity/ProductQuantityConstantControl.js"),I=require("./quantity/ProductQuantityRechargingControl.js"),N=e(require("react-bootstrap/Collapse")),F=require("@licklist/plugins/dist/hooks/Media/useImages"),q=require("@licklist/core/dist/DataMapper/Media/ImageDataMapper"),T=require("../../file-upload/FileUpload.js");require("../../snippet/snippet-template/context/snippetTemplate.js"),require("../../snippet/snippet-template/context/snippetTemplateLoading.js"),require("../../snippet/snippet-template/context/snippetTemplateView.js");var y=require("../../snippet/snippet-template/control/PropertyControl.js");require("../../snippet/snippet-template/form/SnippetTemplateForm.js");var x=require("../../tiptap-editor/TipTapEditor.js");require("../../snippet/snippet-template/settings/SettingButton.js"),require("../../snippet/snippet-template/preview/Preview.js"),require("../../snippet/snippet-template/SnippetTemplate.js");var _=require("./fixed-duration-fields/FixedDurationOptions.js"),k=require("./duration/ProductDurationControl.js"),S=require("./price/ProductPriceControl.js"),D=require("./constants.js");exports.ProductControl=function(e){var j=e.isLoading,L=void 0!==j&&j,A=e.fieldNamePrefix,w=e.allowDeposits,R=void 0!==w&&w,M=e.hasBookingManagement,O=void 0!==M&&M,G=e.zoneList,U=void 0===G?[]:G,B=e.onCopy,Y=e.onProductNameChange,V=e.productName,Q=e.hasTicket,H=e.categoryType,X=e.zoneDuration,z=e.isOverrides,W=void 0!==z&&z,Z=s.useFormContext(),J=Z.register,K=Z.control,$=Z.formState.errors,ee=Z.setValue,te=Z.getValues,ae=Z.watch,ne=Z.trigger,re=Z.clearErrors,oe=a.useContext(g.ProductSetLoadingContext).setLoading,ie=r.useTranslation(["Design","Validation"]).t,le=t.__read(a.useState(!1),2),ce=le[0],se=le[1],de=t.__read(a.useState(null),2),me=de[0],ue=de[1],pe=Boolean(ae("".concat(A,".isUnlimited"))),Ee=ae("".concat(A,".capacity")),ge="0"===Ee||!Ee,fe=m.useId(),Ce=m.useId(),ve=m.useId(),be=m.useId(),he=m.useId(),Pe=m.useId(),Ie=m.useId(),Ne=m.useId(),Fe=m.useId(),qe=m.useId(),Te=m.useId(),ye=[{id:1,value:ie("quantitySelector")},{id:2,value:ie("stockControl")}],xe=a.useCallback((function(){return se((function(e){return!e}))}),[]),_e=s.useWatch({control:K,name:"".concat(A,".quantitySelector")}),ke=F.useImages(me),Se=ke.images,De=ke.handleImageRemove,je=ke.handleImageUploading,Le=ke.isLoading,Ae=a.useCallback((function(e){je(e,q.IMAGE_TYPE_IMAGE)}),[je]),we=a.useCallback((function(e,t){De(String(e),t)}),[De]),Re=function(e){return e.target.select()};a.useEffect((function(){oe(Le)}),[oe,Le]),a.useEffect((function(){var e=te("".concat(A,".images"));ue(e)}),[te,ue,A]),a.useEffect((function(){Array.isArray(Se)&&ee("".concat(A,".images"),Se)}),[Se,A,ee]),a.useEffect((function(){ge?(ee("".concat(A,".duration"),0),re("".concat(A,".duration"))):ne("".concat(A,".duration"))}),[ge]);var Me=null!=_e?_e:"1",Oe=f.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:Ce},n.createElement(l.Form.Label,null,ie("name")),n.createElement(l.Form.Control,t.__assign({},J("".concat(A,".name")),{value:V,onChange:Y,isInvalid:d.isInvalid("".concat(A,".name"),$),disabled:L||W,placeholder:ie("name")})),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(A,".name"),$))),n.createElement(l.Form.Group,{controlId:ve},n.createElement(l.Form.Label,null,ie("description")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange;return n.createElement(x.TipTapEditor,{withEmoji:!1,viewMode:!1,onUpdate:r,content:a,disabled:L||W})},rules:{maxLength:{value:D.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH,message:ie("Validation:descriptionTooManyCharactersMessage",{max:D.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH})}},control:K,name:"".concat(A,".description")})),n.createElement("div",{className:"invalid-feedback field-values-error d-block"},d.getErrors("".concat(A,".description"),$)),R?n.createElement(o,null,n.createElement(b.ProductDepositControl,{isLoading:L,fieldNamePrefix:A}),n.createElement(S.ProductPriceControl,{isLoading:L,fieldNamePrefix:"".concat(A,".price"),title:ie("totalPrice"),allowDeposits:R})):n.createElement(S.ProductPriceControl,{isLoading:L,fieldNamePrefix:"".concat(A,".price")}),n.createElement("div",null,n.createElement(h.ProductQuantityControl,{isLoading:L,fieldNamePrefix:A,isOverrides:W,onFocus:Re}),Oe===f.QUANTITY_TYPE_CONSTANT&&n.createElement(P.ProductQuantityConstantControl,{isLoading:L,fieldNamePrefix:A,onFocus:Re,disabled:pe}),Oe===f.QUANTITY_TYPE_RECHARGING&&n.createElement(I.ProductQuantityRechargingControl,{isLoading:L,fieldNamePrefix:A,onFocus:Re,disabled:pe}),n.createElement(l.Form.Group,{controlId:qe,className:"custom-checkbox"},n.createElement(l.Form.Check,t.__assign({custom:!0,type:"checkbox"},J("".concat(A,".isUnlimited")),{name:"".concat(A,".isUnlimited"),disabled:L})),n.createElement(l.Form.Check.Label,null,ie("isUnlimited")))),n.createElement(l.Form.Group,{controlId:Ne},n.createElement(l.Form.Label,null,ie("quantitySelectorType")),n.createElement(l.Form.Control,t.__assign({as:"select",defaultValue:Q?ye[0].id:void 0},J("".concat(A,".quantitySelector")),{isInvalid:d.isInvalid("".concat(A,".quantitySelector"),$),disabled:L||Q||W}),ye.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(A,".quantitySelector"),$))),n.createElement(y.PropertyControl,{item:"".concat(A,".color"),label:"Select Color",isDisabled:W,defaultColors:C.PRODUCT_DEfAULT_COLORS}))),H===f.CATEGORY_TYPE_FIXED_DURATION&&n.createElement(o,{className:"align-items-start duration-capacity-container"},n.createElement(k.ProductDurationControl,{fieldNamePrefix:A,disabled:ge||W}),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(A,".capacity"),label:ie("capacity"),disabled:W,rules:{min:{value:0,message:ie("Validation:fieldMinNumber",{attribute:ie("capacity"),min:0})}}})),ge&&n.createElement("div",{className:"duration-hint duration-capacity-container"},ie("Design:forDurationEditing"))),H===f.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(A,".capacity"),label:ie("capacity"),onChange:function(e){X&&ee("".concat(A,".duration"),e*X)},disabled:W,rules:{min:{value:0,message:ie("Validation:fieldMinNumber",{attribute:ie("capacity"),min:1})}}})),n.createElement(i,{lg:4,md:4},n.createElement(E.FormNumberInput,{fieldName:"".concat(A,".duration"),label:ie("durationMinutes"),disabled:ge||W,rules:{min:{value:0,message:ie("Validation:fieldMinNumber",{attribute:ie("duration"),min:0})},validate:function(e){return!(!ge&&(!e||e<1))||ie("Validation:fieldRequired",{attribute:ie("duration")})}}}))),ge&&n.createElement("div",{className:"duration-hint pl-0"},ie("Design:forDurationEditing"))),n.createElement(o,{className:"mt-4"},n.createElement(i,{lg:8,md:8},n.createElement(l.Form.Group,{controlId:be},n.createElement(l.Form.Label,null,ie("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(A,".termsAndConditions"),$),disabled:L||W,name:o})},control:K,name:"".concat(A,".termsAndConditions")}),n.createElement(l.Form.Control.Feedback,{type:"invalid"},d.getErrors("".concat(A,".termsAndConditions"),$)))),n.createElement(i,{lg:4,md:4,className:u("licklist-file-upload-wrapper",W&&"opacity-50")},n.createElement(T.FileUpload,{onFilesChange:Ae,allowedExtensions:["jpeg","jpg","png"],subTitle:".jpeg .jpg .png",enablePreview:!0,onFileRemove:we,defaultFiles:Se,isLoading:Le,disabled:W,withIcon:!0,title:ie("addImage")}))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(l.Form.Group,{controlId:he,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("isAvailable")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L||W})},control:K,name:"".concat(A,".isAvailable")})),n.createElement(l.Form.Group,{controlId:Pe,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("isSoldOut")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L})},control:K,name:"".concat(A,".isSoldOut")})),n.createElement(l.Form.Group,{controlId:fe,className:"custom-checkbox"},n.createElement(l.Form.Check,{custom:!0,type:"checkbox",name:fe,disabled:L||W},n.createElement(l.Form.Check.Input,{checked:ce,onChange:xe,type:"checkbox"}),n.createElement(l.Form.Check.Label,null,ie("showAdvancedOptions"))))),n.createElement(i,{lg:12,md:12,xl:!0,className:"p-0"},n.createElement(N,{in:ce},n.createElement("div",null,n.createElement(l.Form.Group,{controlId:Ie,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("isRequired")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L||W})},control:K,name:"".concat(A,".isRequired")})),n.createElement(l.Form.Group,{controlId:Fe,className:"advanced-switch-container"},n.createElement(l.Form.Label,null,ie("hasSpecialNotes")),n.createElement(s.Controller,{render:function(e){var t=e.field,a=t.value,r=t.onChange,o=t.name;return n.createElement(p.BooleanSwitch,{name:o,value:Boolean(a),onChange:r,disabled:L||W})},control:K,name:"".concat(A,".hasSpecialNotes")})),[f.CATEGORY_TYPE_GAME,f.CATEGORY_TYPE_FIXED_DURATION].includes(H)&&n.createElement(_.FixedDurationOptions,{fieldNamePrefix:A,isOverrides:W}),n.createElement(l.Form.Group,{controlId:Te,className:"advanced-switch-container"},n.createElement(S.ProductPriceControl,{title:ie("minSpend"),isRequired:!1,isMoreThanZero:!0,allowDeposits:!1,isLoading:L||W,fieldNamePrefix:"".concat(A,".minSpend")})))),n.createElement(o,null,n.createElement(i,{xs:12},O&&n.createElement(v.ProductBookingManagementControl,{isLoading:L,zoneList:U,fieldNamePrefix:A})))),n.createElement(o,null,n.createElement(i,{xs:!0},n.createElement("div",{className:"d-flex justify-content-end mt-4"},Boolean(B)&&n.createElement(l.Button,{onClick:B,variant:"link",className:"d-flex align-items-center"},n.createElement(c.default,{type:"clipboard",height:"1rem",className:"mr-2"})," ",ie("copy"))))))};
@@ -1,3 +1,2 @@
1
1
  export declare const MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH = 1000;
2
- export declare const MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE = 1;
3
2
  //# sourceMappingURL=constants.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yCAAyC,OAAO,CAAC;AAC9D,eAAO,MAAM,wCAAwC,IAAI,CAAC"}
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/product-set/product/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yCAAyC,OAAO,CAAC"}
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH=1e3,exports.MAX_QUANTITY_RECURRENCE_DATE_IN_OVERRIDE=1;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.MAX_PRODUCT_DESCRIPTION_CHARACTERS_LENGTH=1e3;
@@ -9,7 +9,6 @@ export interface ProductCategoryControlValues extends FormValues {
9
9
  name: string;
10
10
  minSubItems: number | null;
11
11
  maxSubItems: number | null;
12
- overallQuantity?: number | null;
13
12
  quantityType: QuantityType;
14
13
  type: CategoryType;
15
14
  isTimeRelated: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"ProductCategoryControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product-category/ProductCategoryControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE1F,OAAO,EACL,YAAY,EACZ,YAAY,EAKb,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAG9E,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAI7D,MAAM,WAAW,4BAA6B,SAAQ,UAAU;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,eAAe,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IAErB,oBAAoB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAQD,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,UAAkB,GACnB,EAAE,2BAA2B,eAoiB7B"}
1
+ {"version":3,"file":"ProductCategoryControl.d.ts","sourceRoot":"","sources":["../../../src/product-set/product-category/ProductCategoryControl.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAE1F,OAAO,EACL,YAAY,EACZ,YAAY,EAKb,MAAM,kEAAkE,CAAC;AAC1E,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAG9E,OAAO,EAAE,gBAAgB,EAAmB,MAAM,UAAU,CAAC;AAI7D,MAAM,WAAW,4BAA6B,SAAQ,UAAU;IAC9D,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,YAAY,EAAE,YAAY,CAAC;IAC3B,IAAI,EAAE,YAAY,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,SAAS,EAAE,OAAO,CAAC;IACnB,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,MAAM,CAAC,EAAE,IAAI,CAAC,IAAI,CAAC,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,2BAA4B,SAAQ,gBAAgB;IACnE,SAAS,EAAE,OAAO,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IAErB,oBAAoB,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAQD,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,EACT,YAAY,EACZ,oBAAoB,EACpB,oBAAoB,EACpB,SAAS,EACT,UAAkB,GACnB,EAAE,2BAA2B,eAue7B"}