@licklist/design 0.58.11-dev.0 → 0.58.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bitbucket-pipelines.yml +8 -0
- package/dist/assets/iframe/calendar.svg +2 -2
- package/dist/assets/iframe/calendar.svg.js +1 -1
- package/dist/assets/iframe/ticket.svg +2 -2
- package/dist/assets/iframe/ticket.svg.js +1 -1
- package/dist/calendar/Calendar.d.ts +1 -1
- package/dist/calendar/Calendar.d.ts.map +1 -1
- package/dist/calendar/Calendar.js +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts +2 -2
- package/dist/calendar/components/CalendarDates/CalendarDates.d.ts.map +1 -1
- package/dist/calendar/components/CalendarDates/CalendarDates.js +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.d.ts +1 -2
- package/dist/iframe/event/event-card/IframeEventCard.d.ts.map +1 -1
- package/dist/iframe/event/event-card/IframeEventCard.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts +2 -2
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/BookingSummary.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts +2 -4
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts +2 -4
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.d.ts.map +1 -1
- package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js +1 -1
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts +0 -4
- package/dist/iframe/order-process/components/BookingSummary/types/index.d.ts.map +1 -1
- package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.js +1 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts +0 -1
- package/dist/iframe/page/components/PageBody/constants.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/constants.js +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.d.ts.map +1 -1
- package/dist/iframe/page/components/PageBody/hooks/useResizePageBody.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.d.ts.map +1 -1
- package/dist/iframe/payment/payment-page/PaymentPage.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts.map +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.js +1 -1
- package/dist/product-set/control/DateInput.d.ts.map +1 -1
- package/dist/product-set/form/ProductSetForm.d.ts +1 -4
- package/dist/product-set/form/ProductSetForm.d.ts.map +1 -1
- package/dist/product-set/hooks/useSortableTreeFunctions.d.ts.map +1 -1
- package/dist/product-set/product/ProductControl.d.ts.map +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts +0 -1
- package/dist/product-set/product-category/ProductCategoryControl.d.ts.map +1 -1
- package/dist/product-set/product-category/ProductCategoryControl.js +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.d.ts.map +1 -1
- package/dist/provider/working-hours-input/WorkingHoursInputDescription.js +1 -1
- package/dist/recurring-date-picker-input/RecurrenceAndFrequencyInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts +1 -3
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/RecurringDatePickerInput.js +1 -1
- package/dist/recurring-date-picker-input/utils.d.ts +0 -9
- package/dist/recurring-date-picker-input/utils.d.ts.map +1 -1
- package/dist/recurring-date-picker-input/utils.js +1 -1
- package/dist/sales/booking/results/components/ResultCard.d.ts.map +1 -1
- package/dist/sales/booking/results/components/ResultCard.js +1 -1
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/static/manual-date-picker/ManualDatePicker.js +1 -1
- package/dist/static/manual-date-picker/constants/index.d.ts +1 -4
- package/dist/static/manual-date-picker/constants/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/constants/index.js +1 -1
- package/dist/static/manual-date-picker/utils/index.d.ts +0 -4
- package/dist/static/manual-date-picker/utils/index.d.ts.map +1 -1
- package/dist/static/manual-date-picker/utils/index.js +1 -1
- package/dist/styles/iframe-events/Card.scss +8 -24
- package/dist/styles/iframe-events/PoweredBy.scss +2 -2
- package/dist/styles/iframe-order-process/IframeOrderProcess.scss +20 -57
- package/dist/styles/iframe-page/Page.scss +0 -1
- package/dist/styles/iframe-page/PageBody.scss +12 -34
- package/dist/styles/iframe-page/PageHeader.scss +39 -41
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/zone/form/utils/dates.d.ts.map +1 -1
- package/jest.config.js +29 -0
- package/package.json +35 -10
- package/src/assets/iframe/calendar.svg +2 -2
- package/src/assets/iframe/ticket.svg +2 -2
- package/src/calendar/Calendar.stories.tsx +0 -23
- package/src/calendar/Calendar.tsx +5 -5
- package/src/calendar/components/CalendarDates/CalendarDates.tsx +5 -0
- package/src/iframe/event/event-card/IframeEventCard.stories.tsx +0 -1
- package/src/iframe/event/event-card/IframeEventCard.tsx +8 -7
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.stories.tsx +0 -9
- package/src/iframe/order-process/components/BookingSummary/BookingSummary.tsx +7 -58
- package/src/iframe/order-process/components/BookingSummary/components/BookingSummaryAccordion/BookingSummaryAccordion.tsx +0 -8
- package/src/iframe/order-process/components/BookingSummary/components/SummaryTotal/components/SummaryTotalBlock.tsx +4 -4
- package/src/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.tsx +10 -63
- package/src/iframe/order-process/components/BookingSummary/types/index.ts +0 -4
- package/src/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.tsx +1 -1
- package/src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx +1 -3
- package/src/iframe/page/components/PageBody/constants.ts +0 -2
- package/src/iframe/page/components/PageBody/hooks/useResizePageBody.ts +0 -10
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/payment/payment-page/PaymentPage.stories.tsx +6 -546
- package/src/iframe/payment/payment-page/PaymentPage.tsx +29 -38
- package/src/iframe/ryft/RyftPaymentForm.tsx +5 -11
- package/src/product-set/control/DateAndRecurrenceInput.tsx +1 -2
- package/src/product-set/control/DateInput.tsx +3 -1
- package/src/product-set/form/ProductCategoriesControl.tsx +1 -1
- package/src/product-set/form/ProductSetForm.tsx +1 -5
- package/src/product-set/hooks/useSortableTreeFunctions.ts +0 -2
- package/src/product-set/product/ProductControl.tsx +3 -6
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -0
- package/src/product-set/product-category/ProductCategoryControl.tsx +43 -105
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +18 -4
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +1 -0
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +1 -11
- package/src/recurring-date-picker-input/utils.ts +0 -75
- package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
- package/src/sales/booking/results/components/ResultCard.tsx +5 -2
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/manual-date-picker/ManualDatePicker.tsx +3 -3
- package/src/static/manual-date-picker/constants/index.ts +2 -6
- package/src/static/manual-date-picker/utils/index.ts +0 -11
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/iframe-events/Card.scss +8 -24
- package/src/styles/iframe-events/PoweredBy.scss +2 -2
- package/src/styles/iframe-order-process/IframeOrderProcess.scss +20 -57
- package/src/styles/iframe-page/Page.scss +0 -1
- package/src/styles/iframe-page/PageBody.scss +12 -34
- package/src/styles/iframe-page/PageHeader.scss +39 -41
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +2 -125
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/zone/form/utils/dates.ts +10 -9
- package/tests/Auth/Authorizer.test.tsx +194 -0
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +43 -0
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +33 -0
- package/tests/Auth/Login/LoginComponent.test.tsx +246 -0
- package/tests/Auth/Login/LoginFormComponent.test.tsx +182 -0
- package/tests/Auth/Register/RegisterComponent.test.tsx +285 -0
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +170 -0
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +130 -0
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +133 -0
- package/tests/Auth/Social/SocialFormComponent.test.tsx +118 -0
- package/tests/FileUpload/FileUpload.test.tsx +42 -0
- package/tests/Notification/EmailTemplate.test.tsx +82 -0
- package/tests/ProductSet/ProductSetPopover.test.tsx +40 -0
- package/tests/Report/Report.test.tsx +48 -0
- package/tests/Sales/Coupon.test.tsx +51 -0
- package/tests/Sales/SalesAndVIews.test.tsx +63 -0
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +56 -0
- package/tests/Table/FilterHelperComponent.test.tsx +88 -0
- package/tests/Table/PaginationHelperComponent.test.tsx +109 -0
- package/tests/Table/PerPageHelperComponent.test.tsx +34 -0
- package/tests/Table/TableHelperComponent.test.tsx +295 -0
- package/tests/TipTapEditor/TipTapEditor.test.tsx +28 -0
- package/tests/__mock__/hooks/useAuthApi.ts +13 -0
- package/tests/__mock__/hooks/useAuthMock.ts +13 -0
- package/tests/__mock__/hooks/useFormMock.ts +27 -0
- package/tests/__mock__/hooks/useNotificationMock.ts +13 -0
- package/tests/__mock__/hooks/useQueryMock.ts +16 -0
- package/tests/__mock__/hooks/useSocialApiMock.ts +20 -0
- package/tests/__mock__/hooks/useTranslationMock.ts +17 -0
- package/tests/__mock__/hooks/useUserApiMock.ts +18 -0
- package/tests/__mock__/hooks/useUserMock.ts +13 -0
- package/tests/__mock__/styleMock.js +1 -0
- package/tests/__mock__/windowMock.ts +5 -0
- package/tests/packages/react-query.tsx +28 -0
- package/tests/setupTests.ts +10 -0
- package/dist/iframe/ryft/utils/ryft-form.d.ts +0 -5
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +0 -1
- package/dist/iframe/ryft/utils/ryft-form.js +0 -1
- package/src/iframe/ryft/utils/ryft-form.ts +0 -47
package/bitbucket-pipelines.yml
CHANGED
|
@@ -16,6 +16,11 @@ definitions:
|
|
|
16
16
|
- yarn install --legacy-peer-deps
|
|
17
17
|
artifacts:
|
|
18
18
|
- node_modules/**
|
|
19
|
+
- step: &test
|
|
20
|
+
image: node:16.15.1-alpine3.15
|
|
21
|
+
name: Test
|
|
22
|
+
script:
|
|
23
|
+
- yarn run test
|
|
19
24
|
- step: &build
|
|
20
25
|
image: node:16.15.1-alpine3.15
|
|
21
26
|
name: Build application
|
|
@@ -50,6 +55,7 @@ pipelines:
|
|
|
50
55
|
- step:
|
|
51
56
|
<<: *install
|
|
52
57
|
- parallel:
|
|
58
|
+
- step: *test
|
|
53
59
|
- step: *build
|
|
54
60
|
- step:
|
|
55
61
|
name: Publish to NPM
|
|
@@ -64,6 +70,7 @@ pipelines:
|
|
|
64
70
|
- step:
|
|
65
71
|
<<: *install
|
|
66
72
|
- parallel:
|
|
73
|
+
- step: *test
|
|
67
74
|
- step: *build_storybook
|
|
68
75
|
- step:
|
|
69
76
|
<<: *deploy
|
|
@@ -81,4 +88,5 @@ pipelines:
|
|
|
81
88
|
"**":
|
|
82
89
|
- step: *install
|
|
83
90
|
- parallel:
|
|
91
|
+
- step: *test
|
|
84
92
|
- step: *build
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
<svg width="16" height="15" viewBox="0 0 16 15" fill="
|
|
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:"
|
|
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="
|
|
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:"
|
|
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;
|
|
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("
|
|
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,
|
|
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"),
|
|
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))}))))};
|
|
@@ -16,8 +16,7 @@ interface IframeEventCardProps {
|
|
|
16
16
|
titleId?: string;
|
|
17
17
|
descriptionId?: string;
|
|
18
18
|
imageClassName?: string;
|
|
19
|
-
showMoreInfo?: boolean;
|
|
20
19
|
}
|
|
21
|
-
export declare function IframeEventCard({ title, type, cost, date, imageSrc, colour, goToDetails, description, isListView, className, shortDate, titleId, descriptionId, imageClassName,
|
|
20
|
+
export declare function IframeEventCard({ title, type, cost, date, imageSrc, colour, goToDetails, description, isListView, className, shortDate, titleId, descriptionId, imageClassName, }: IframeEventCardProps): JSX.Element;
|
|
22
21
|
export {};
|
|
23
22
|
//# sourceMappingURL=IframeEventCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IframeEventCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/event-card/IframeEventCard.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAC;AASpF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,cAAc,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"IframeEventCard.d.ts","sourceRoot":"","sources":["../../../../src/iframe/event/event-card/IframeEventCard.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,OAAO,EAAE,MAAM,2DAA2D,CAAC;AASpF,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,cAAc,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,CAAC;IAC1C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,WAAW,EACX,UAAkB,EAClB,SAAS,EACT,SAAS,EACT,OAAO,EACP,aAAa,EACb,cAAc,GACf,EAAE,oBAAoB,eA6FtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=require("react-i18next"),r=require("react-bootstrap"),i=e(require("clsx")),
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),a=require("react-i18next"),r=require("react-bootstrap"),i=e(require("clsx")),c=require("react-intl"),l=require("../../../tiptap-editor/TipTapEditor.js"),s=require("../../../events/event-card/utils.js"),n=require("../../../assets/iframe/clock.svg.js"),m=require("../../../assets/iframe/calendar.svg.js"),d=require("../../../assets/iframe/ticket.svg.js");exports.IframeEventCard=function(e){var o=e.title,v=e.type,u=e.cost,p=e.date,f=e.imageSrc,E=e.colour,N=e.goToDetails,g=e.description,C=e.isListView,b=void 0!==C&&C,x=e.className,_=e.shortDate,w=e.titleId,T=e.descriptionId,q=e.imageClassName,y=c.useIntl().formatNumber,j=a.useTranslation("Design").t;return t.createElement(r.Card,{style:{"--card-colour":E},className:i("iframe-event-card",{"list-view":b},x),onClick:N?function(){N&&N()}:void 0},f&&t.createElement(r.Card.Img,{className:null!=q?q:"card-image",variant:"top",as:"div",style:{backgroundImage:'url("'.concat(f,'")')}}),t.createElement(r.Card.Body,{className:i("d-flex","flex-column",!f&&"no-image")},t.createElement(r.Card.Title,{className:"iframe-event-card__title",id:w},o),t.createElement("div",{className:"flex-grow-1 iframe-event-card__description"},t.createElement(r.Card.Text,{as:"div"},t.createElement("div",{className:"d-flex align-items-center mb-3"},t.createElement("div",{className:"icon-wrapper"},t.createElement(m.ReactComponent,null)),t.createElement("p",{className:"iframe-event-card__bold m-0 list-view-hided"},p),t.createElement("p",{className:"iframe-event-card__bold m-0 grid-view-hided"},_))),v&&t.createElement(r.Card.Text,{as:"div",className:"list-view-hided"},t.createElement("div",{className:"d-flex align-items-center mb-3"},t.createElement("div",{className:"icon-wrapper"},t.createElement(n.ReactComponent,null)),t.createElement("p",{className:"iframe-event-card__bold m-0"},v))),"number"==typeof u&&t.createElement(r.Card.Text,{as:"div"},t.createElement("div",{className:"d-flex align-items-center mb-3"},t.createElement("div",{className:"icon-wrapper"},t.createElement(d.ReactComponent,null)),t.createElement("p",{className:"iframe-event-card__bold m-0"},j("from")," ",y(u,{style:"currency",currency:"GBP"})))),g&&t.createElement(r.Card.Text,{as:"div",className:"list-view-hided"},t.createElement(l.TipTapEditor,{viewMode:!0,disabled:!0,content:s.formatContent(g,150),id: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,
|
|
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,
|
|
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;
|
|
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"),
|
|
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
|
|
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,
|
|
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,
|
|
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,
|
|
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 +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,
|
|
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,
|
|
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
|
-
|
|
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,
|
|
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":"
|
|
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"}
|
package/dist/iframe/order-process/components/BookingSummary/components/ToggleHeader/ToggleHeader.js
CHANGED
|
@@ -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"),
|
|
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;
|
|
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"}
|
package/dist/iframe/order-process/components/CategoryProduct/components/NumberInput/NumberInput.js
CHANGED
|
@@ -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),a=require("react-bootstrap"),r=e(require("clsx")),u=t.forwardRef((function(e,t){var u=e.className,o=void 0===u?"":u,l=e.value,i=e.onChange,c=e.onArrowDown,m=e.onArrowUp,b=e.min,d=e.max,p=e.placeholder,s=e.defaultValue,f=e.disabled,v=!l,y=d>0&&l===d,N=r("payment-number-input",o);return n.createElement("div",{className:N},n.createElement("button",{type:"button",onClick:function(){l&&(b>0&&(l||0)===b?c(0):m(l-1))},className:"payment-number-input__btn-down ".concat(v&&"disabled-number-input-button"),disabled:f},"−"),n.createElement(a.FormControl,{type:"number",onChange:function(e){return t=Number(e.target.value),void i(d>0&&t>d?d:b>0&&t&&t<b?b:t);var t},value:l,min:
|
|
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),a=require("react-bootstrap"),r=e(require("clsx")),u=t.forwardRef((function(e,t){var u=e.className,o=void 0===u?"":u,l=e.value,i=e.onChange,c=e.onArrowDown,m=e.onArrowUp,b=e.min,d=e.max,p=e.placeholder,s=e.defaultValue,f=e.disabled,v=!l,y=d>0&&l===d,N=r("payment-number-input",o);return n.createElement("div",{className:N},n.createElement("button",{type:"button",onClick:function(){l&&(b>0&&(l||0)===b?c(0):m(l-1))},className:"payment-number-input__btn-down ".concat(v&&"disabled-number-input-button"),disabled:f},"−"),n.createElement(a.FormControl,{type:"number",onChange:function(e){return t=Number(e.target.value),void i(d>0&&t>d?d:b>0&&t&&t<b?b:t);var t},value:l,min:b,max:d,defaultValue:s,placeholder:p,height:"5rem",disabled:f,ref:t}),n.createElement("button",{type:"button",onClick:function(){d>0&&l===d||m(b>0&&(l||0)<b?b:(l||0)+1)},className:"payment-number-input__btn-up ".concat(y&&"disabled-number-input-button"),disabled:f},"+"))}));u.displayName="NumberInput",exports.NumberInput=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeftBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM5E,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C;IACE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,cAAc,CAAC,cAAc,CAAC,CACnC,CAAC;AAEF,eAAO,MAAM,SAAS,+EAOnB,cAAc,
|
|
1
|
+
{"version":3,"file":"LeftBlock.d.ts","sourceRoot":"","sources":["../../../../../../src/iframe/page/components/PageBody/components/LeftBlock/LeftBlock.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAM5E,MAAM,MAAM,cAAc,GAAG,iBAAiB,CAC5C;IACE,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,GAAG,cAAc,CAAC,cAAc,CAAC,CACnC,CAAC;AAEF,eAAO,MAAM,SAAS,+EAOnB,cAAc,gBA6BhB,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"),l=e(require("react")),a=e(require("clsx")),
|
|
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"),l=e(require("react")),a=e(require("clsx")),s=require("../../constants.js"),r=require("@licklist/plugins/dist/context/page/PageContext"),i=require("../../hooks/useResizePageBody.js");exports.LeftBlock=function(e){var n=e.pageTitle,c=e.children,o=e.className,u=e.component,d=e.childrenClassName,m=t.__rest(e,["pageTitle","children","className","component","childrenClassName"]),f=i.useResizePageBody(),g=f.leftBlockStyles,p=f.leftBlockContainerSizes;return l.createElement("div",t.__assign({className:a("left-block",o)},m),l.createElement("div",{className:"navigation"},n&&l.createElement(l.Fragment,null,"string"==typeof n?l.createElement("div",{className:"title"},n):n),u),l.createElement("div",{className:a("left-block-container",d),style:g,id:s.PAGE_LEFT_BLOCK_CONTAINER_ID},l.createElement(r.PageContextProvider,{leftBlockContainerSizes:p},c)))};
|
|
@@ -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,
|
|
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.
|
|
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":"
|
|
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,
|
|
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
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("./index.js"),r=require("../types/index.js"),a=require("../hooks/useTableData.js");exports.getOrderSummaryItems=function(n){var s=n.order,_=n.externalDiscount,l=n.paymentDetail;return n.isPaymentProcessed?function(n){var s=n.order,_=n.paymentDetail,l=_&&!s.payments.length?t.getExternalPaymentDetail(_):Object.keys(a.PAYMENT_TYPE_TRANSLATE_KEYS).map((function(e){return{translateKey:a.PAYMENT_TYPE_TRANSLATE_KEYS[e],price:t.getPaymentValueByType(s.payments,e)}})),i=t.calculateTotalPrice(s,l),u=t.calculateTotalDiscount(s.payments),y=i-Number(u),p=[{translateKey:r.AMOUNT_TOTAL,price:i}];return u&&p.push({translateKey:r.AMOUNT_WITH_DISCOUNT,price:y<0?0:y}),_&&!s.payments.length?e.__spreadArray(e.__spreadArray([],e.__read(p),!1),e.__read(l),!1):(p.push({translateKey:r.TOTAL_PAID,price:y<=0?0:s.totalAmount}),y<=0||(p=e.__spreadArray(e.__spreadArray([],e.__read(p),!1),e.__read(l),!1),y>s.totalAmount&&p.push({translateKey:r.REMAINING_TO_PAY,price:y-s.totalAmount})),p)}({order:s,paymentDetail:l}):function(a){var n=a.order,s=a.externalDiscount,_=a.paymentDetail,l=_?t.getExternalPaymentDetail(_):void 0,i=t.calculateTotalPrice(n,l),u=[{translateKey:r.AMOUNT_TOTAL,price:i}];return s&&u.push({price:s,translateKey:r.AMOUNT_WITH_DISCOUNT}),l?e.__spreadArray(e.__spreadArray([],e.__read(u),!1),e.__read(t.getExternalPaymentDetail(_)),!1):u}({order:s,externalDiscount:_,paymentDetail:l})};
|
|
@@ -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;
|
|
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"),
|
|
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":";
|
|
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"),
|
|
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":"DateAndRecurrenceInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateAndRecurrenceInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAuB7G,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,sBAAsB,mFAKhC,2BAA2B,
|
|
1
|
+
{"version":3,"file":"DateAndRecurrenceInput.d.ts","sourceRoot":"","sources":["../../../src/product-set/control/DateAndRecurrenceInput.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAO1C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AACtF,OAAO,EAAE,oBAAoB,EAAE,MAAM,uEAAuE,CAAC;AAuB7G,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,sBAAsB,mFAKhC,2BAA2B,gBA+Q7B,CAAC;AAEF,eAAO,MAAM,uBAAuB,EAAE,QAAQ,CAC5C,WAAW,EACX,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAsBxB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("tslib"),t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-i18next"),a=require("react-bootstrap"),o=require("../../static/Icon.js"),u=require("react-hook-form"),l=require("@react-aria/utils"),s=require("react-use"),d=require("luxon");require("../../static/index.js");var c=require("@dnd-kit/core"),m=require("@dnd-kit/modifiers"),v=require("@dnd-kit/sortable"),f=require("../../modals/confirmation/ConfirmModal.js"),g=require("@licklist/core/dist/Config/Date"),p=require("../../recurring-date-picker-input/RecurringDatePickerInput.js"),T=require("./ProductSetRecurrenceControl.js"),b=require("../../zone/form/components/AvailableTimesControl.js"),x={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.DateAndRecurrenceInput=function(e){var E,_,R,h,q,D=e.isEventEditProductSet,S=e.providerHasBookingManagement,C=e.workHours,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("tslib"),t=require("react"),n=(e=t)&&"object"==typeof e&&"default"in e?e.default:e,i=require("react-i18next"),a=require("react-bootstrap"),o=require("../../static/Icon.js"),u=require("react-hook-form"),l=require("@react-aria/utils"),s=require("react-use"),d=require("luxon");require("../../static/index.js");var c=require("@dnd-kit/core"),m=require("@dnd-kit/modifiers"),v=require("@dnd-kit/sortable"),f=require("../../modals/confirmation/ConfirmModal.js"),g=require("@licklist/core/dist/Config/Date"),p=require("../../recurring-date-picker-input/RecurringDatePickerInput.js"),T=require("./ProductSetRecurrenceControl.js"),b=require("../../zone/form/components/AvailableTimesControl.js"),x={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.DateAndRecurrenceInput=function(e){var E,_,R,h,q,D=e.isEventEditProductSet,S=e.providerHasBookingManagement,C=e.workHours,y=e.isLoading,k=u.useFormContext(),I=k.control,M=k.register,w=k.formState.errors,A=k.getValues,O=k.setValue,F=k.clearErrors,N=r.__read(t.useState([]),2),j=N[0],P=N[1],V=t.useRef(),L=u.useFieldArray({name:"menuRecurrences",control:I,keyName:"_id"}),W=L.fields,B=L.append,H=L.update,z=L.move,G=r.__read(t.useState(!1),2),K=G[0],J=G[1],Q=r.__read(t.useState({index:null,values:null}),2),U=Q[0],X=Q[1],Y=function(){return X({index:null,values:null})},Z=t.useRef();s.useClickAway(Z,(function(e){var r,t,n;f.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)||(J(!1),Y())}));var $=l.useId(),ee=i.useTranslation("Design").t,re=function(){Y(),J((function(e){return!e}))};return t.useEffect((function(){W.length&&F("menuRecurrences")}),[W,F]),n.createElement(a.Form.Group,null,n.createElement(a.Form.Label,null,ee(D?"whenOverridesAvailable":"productSetAvailable")),n.createElement(a.OverlayTrigger,{show:K,overlay:n.createElement(a.Popover,{id:$,className:"rounded"},n.createElement(a.Popover.Content,{className:"shadow-lg rounded",ref:Z},n.createElement(p.RecurringDatePickerInput,{defaultValues:U.values,onChange:function(e){return r.__awaiter(void 0,void 0,void 0,(function(){var t,n,i,a,o,u,l,s,c,m,v;return r.__generator(this,(function(r){switch(r.label){case 0:return[4,null===(l=V.current)||void 0===l?void 0:l.trigger()];case 1:return t=r.sent(),(null==e?void 0:e.startTime)&&(null==e?void 0:e.endTime)&&t&&(n=d.DateTime.fromISO(e.startTime),i=d.DateTime.fromISO(e.endTime),a=V.current.getValues().availableTimes,!a.every((function(e){var r=d.DateTime.fromFormat(e,g.TIME_FORMAT);return r.diff(n,"minutes").minutes>=0&&r.diff(i,"minutes").minutes<=0})))?(V.current.setError("availableTimes",{message:ee("Validation:fieldTimeBetween",{attribute:ee("Design:startTimesSmall"),min:n.toFormat(g.TIME_FORMAT),max:i.toFormat(g.TIME_FORMAT)})}),[2]):(o=(null===(c=null===(s=null==V?void 0:V.current)||void 0===s?void 0:s.getValues())||void 0===c?void 0:c.availableTimes)||null,u={rrule:e.rrule,startDate:e.startDate,endDate:e.endDate,startTime:e.startTime,endTime:e.endTime,availableTimes:o},(null===(m=U.values)||void 0===m?void 0:m.id)&&(u.id=null===(v=U.values)||void 0===v?void 0:v.id),null!==U.index?H(U.index,u):B(u),J((function(){return!1})),Y(),[2])}}))}))},onDelete:function(){var e=U.index;J(!1),Y(),setTimeout((function(){var r=A().menuRecurrences;O("menuRecurrences",(void 0===r?[]:r).filter((function(r,t){return t!==e})))}),100)}},S&&n.createElement(b.AvailableTimesControl,{workHours:C,isLoading:y,defaultValues:j,ref:V,errorMessage:null===(R=null===(_=null===(E=null==w?void 0:w.menuRecurrences)||void 0===E?void 0:E["".concat(null==U?void 0:U.index)])||void 0===_?void 0:_.availableTimes)||void 0===R?void 0:R.message,clearErrorMessage:function(){return F("menuRecurrences.".concat(null==U?void 0:U.index,".availableTimes"))}})))),trigger:"click",placement:"bottom",popperConfig:{modifiers:[x]}},n.createElement("div",{className:"product-set-recurrences"},n.createElement(c.DndContext,{onDragEnd:function(e){var r=e.over,t=e.active;if(r.id!==t.id){var n=W.findIndex((function(e){return String(e._id)===t.id})),i=W.findIndex((function(e){return String(e._id)===r.id}));z(n,i)}},modifiers:[m.restrictToVerticalAxis]},n.createElement(v.SortableContext,{items:null!==(h=null==W?void 0:W.map((function(e){return String(e._id)})))&&void 0!==h?h:[],strategy:v.verticalListSortingStrategy},W.map((function(e,r){var t,i,a;return n.createElement(T.ProductSetRecurrenceControl,{key:e._id,menuRecurrence:e,onEdit:function(){return function(e,r){Y(),setTimeout((function(){X({index:r,values:e}),P(e.availableTimes||[]),J((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})})))),(!D||(null==W?void 0:W.length)<1)&&n.createElement("div",{className:"product-set-recurrence-icon-wrapper",role:"button",tabIndex:0,onClick:re,onKeyDown:re},n.createElement(o.default,{type:"plus-circle",height:"1rem",className:"product-set-recurrence-icon-add mr-2"}),ee("addDates")),n.createElement(a.Form.Control,r.__assign({type:"hidden"},M("menuRecurrences",{required:{value:!0,message:ee("Validation:fieldMinNumber",{attribute:ee("dates"),min:1})}}))),n.createElement("div",{className:"manual-form-error"},null===(q=w.menuRecurrences)||void 0===q?void 0:q.message))))},exports.sameWidthPopperModifier=x;
|
|
@@ -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;
|
|
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;AAI7G,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAkBtF,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"}
|
|
@@ -11,13 +11,10 @@ import { SelectItem } from "../../types/generic/SelectItem";
|
|
|
11
11
|
export interface WithIsLoading {
|
|
12
12
|
isLoading: boolean;
|
|
13
13
|
}
|
|
14
|
-
export interface WithIdOptional {
|
|
15
|
-
id?: number;
|
|
16
|
-
}
|
|
17
14
|
export interface WithId {
|
|
18
15
|
id: number;
|
|
19
16
|
}
|
|
20
|
-
export interface ProductSetFormValues extends FormValues,
|
|
17
|
+
export interface ProductSetFormValues extends FormValues, WithId, ProductSetControlValues {
|
|
21
18
|
steps: Step[];
|
|
22
19
|
isOverrides?: boolean;
|
|
23
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ProductSetForm.d.ts","sourceRoot":"","sources":["../../../src/product-set/form/ProductSetForm.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,8DAA8D,CAAC;AAI1F,OAAO,EAAE,WAAW,EAAE,MAAM,8DAA8D,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,OAAO,EAAE,gCAAgC,EAAE,MAAM,oFAAoF,CAAC;AACtI,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAEtF,OAAO,EAEL,uBAAuB,EACvB,uBAAuB,EACxB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAEhC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAG5D,MAAM,WAAW,aAAa;IAC5B,SAAS,EAAE,OAAO,CAAC;CACpB;AACD,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;CACZ;AACD,MAAM,WAAW,oBACf,SAAQ,UAAU,EAChB,MAAM,EACN,uBAAuB;IACzB,KAAK,EAAE,IAAI,EAAE,CAAC;IACd,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED,MAAM,WAAW,mBACf,SAAQ,aAAa,EACnB,uBAAuB;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,oBAAoB,CAAC;IACrC,mBAAmB,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,kBAAkB,CAAC,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IAC5D,gBAAgB,CAAC,EAAE,UAAU,EAAE,CAAC;IAChC,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,4BAA4B,CAAC,EAAE,gCAAgC,CAAC,sBAAsB,CAAC,CAAC;IACxF,KAAK,CAAC,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IACtB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB;AAED,wBAAgB,cAAc,CAAC,EAC7B,WAAW,EACX,SAAS,EACT,aAAa,EACb,mBAAmB,EACnB,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,cAAsB,EACtB,YAAiB,EACjB,4BAA4B,EAC5B,KAAK,EACL,cAAc,EACd,SAAS,EACT,WAAW,EACX,GAAG,MAAM,EACV,EAAE,mBAAmB,eAuIrB"}
|