@licklist/design 0.62.3-dev.1 → 0.62.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.
- package/bitbucket-pipelines.yml +8 -0
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +1 -3
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts +1 -3
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.js +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts +1 -3
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.d.ts.map +1 -1
- package/dist/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.js +1 -1
- package/dist/iframe/payment/order-items-table/utils/paymentSummary.js +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.d.ts.map +1 -1
- package/dist/iframe/ryft/RyftPaymentForm.js +1 -1
- package/dist/iframe/ryft/utils/ryft-form.d.ts.map +1 -1
- package/dist/iframe/ryft/utils/ryft-form.js +1 -1
- package/dist/product-set/control/DateAndRecurrenceInput.d.ts +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/control/DateInput.js +1 -1
- package/dist/product-set/control/ProductSetControl.d.ts +1 -1
- package/dist/product-set/control/ProductSetControl.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/ProductControl.js +1 -1
- package/dist/product-set/product/fixed-duration-fields/FixedDurationOptions.d.ts.map +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 -12
- 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/sales/coupon/control/CouponFormControl.d.ts +1 -2
- package/dist/sales/coupon/control/CouponFormControl.d.ts.map +1 -1
- package/dist/sales/coupon/control/CouponFormControl.js +1 -1
- package/dist/sales/coupon/form/CouponFrom.d.ts +2 -2
- package/dist/sales/coupon/form/CouponFrom.d.ts.map +1 -1
- package/dist/setting/admin/AdminSettingForm.d.ts +2 -2
- package/dist/setting/admin/AdminSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts +0 -1
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +1 -2
- package/dist/typeahead/Typeahead.d.ts.map +1 -1
- package/dist/typeahead/Typeahead.js +1 -1
- package/dist/zone/form/ZoneForm.d.ts +2 -2
- package/dist/zone/form/ZoneForm.d.ts.map +1 -1
- package/dist/zone/form/ZoneForm.js +1 -1
- package/dist/zone/form/components/ZoneControl.d.ts +2 -2
- package/dist/zone/form/components/ZoneControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneControl.js +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts +4 -4
- package/dist/zone/form/components/ZoneRecurrencesControl.d.ts.map +1 -1
- package/dist/zone/form/components/ZoneRecurrencesControl.js +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/date-time-button/DateTimeButton.stories.tsx +1 -2
- package/src/date-time-button/DateTimeButton.tsx +5 -7
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +0 -4
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +8 -10
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +0 -4
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/ryft/RyftPaymentForm.tsx +4 -12
- package/src/iframe/ryft/utils/ryft-form.ts +4 -8
- package/src/product-set/control/DateAndRecurrenceInput.tsx +2 -3
- package/src/product-set/control/DateInput.tsx +4 -2
- package/src/product-set/control/ProductSetControl.tsx +1 -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 +38 -38
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +2 -0
- 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 -77
- package/src/sales/booking/results/BookingResults.stories.tsx +2 -3
- package/src/sales/booking/results/components/ResultCard.tsx +5 -2
- package/src/sales/coupon/control/CouponFormControl.tsx +50 -29
- package/src/sales/coupon/form/CouponFrom.tsx +15 -5
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/dashboard/DashboardSettingForm.tsx +0 -13
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +113 -99
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +3 -16
- package/src/zone/form/ZoneForm.tsx +2 -3
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +5 -7
- 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/sales/coupon/utils/index.d.ts +0 -7
- package/dist/sales/coupon/utils/index.d.ts.map +0 -1
- package/dist/sales/coupon/utils/index.js +0 -1
- package/src/sales/coupon/utils/index.ts +0 -13
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from "react";
|
|
2
2
|
import { Frequency, Weekday } from "rrule";
|
|
3
3
|
import { DateTime } from "luxon";
|
|
4
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
5
4
|
import { SupportedFrequency } from "./utils";
|
|
6
5
|
export interface RecurringDatePickerInputProps {
|
|
7
6
|
disabled?: boolean;
|
|
@@ -11,7 +10,6 @@ export interface RecurringDatePickerInputProps {
|
|
|
11
10
|
initialFrequency?: Frequency;
|
|
12
11
|
setInitialStartDateAfterSelect?: boolean;
|
|
13
12
|
minDate?: string;
|
|
14
|
-
workHours: WorkHour[] | undefined;
|
|
15
13
|
}
|
|
16
14
|
export interface RecurringDatePickerInputValues {
|
|
17
15
|
rrule?: string;
|
|
@@ -26,6 +24,6 @@ export interface RecurringDatePickerInputValues {
|
|
|
26
24
|
count?: number;
|
|
27
25
|
withOutEndDate?: boolean;
|
|
28
26
|
}
|
|
29
|
-
export declare function RecurringDatePickerInput({ disabled, onChange, onDelete, defaultValues, initialFrequency, setInitialStartDateAfterSelect, children, minDate,
|
|
27
|
+
export declare function RecurringDatePickerInput({ disabled, onChange, onDelete, defaultValues, initialFrequency, setInitialStartDateAfterSelect, children, minDate, }: PropsWithChildren<RecurringDatePickerInputProps>): JSX.Element;
|
|
30
28
|
export declare const getDateTimeObject: (date: string, time: string) => DateTime | string;
|
|
31
29
|
//# sourceMappingURL=RecurringDatePickerInput.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RecurringDatePickerInput.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/RecurringDatePickerInput.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAsB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACrE,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"RecurringDatePickerInput.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/RecurringDatePickerInput.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAsB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AACrE,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAGlD,OAAO,EAAE,QAAQ,EAAY,MAAM,OAAO,CAAC;AAY3C,OAAO,EAAyB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAIpE,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,aAAa,CAAC,EAAE,OAAO,CAAC,8BAA8B,CAAC,CAAC;IACxD,QAAQ,EAAE,CAAC,KAAK,EAAE,8BAA8B,KAAK,IAAI,CAAC;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,gBAAgB,CAAC,EAAE,SAAS,CAAC;IAC7B,8BAA8B,CAAC,EAAE,OAAO,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,8BAA8B;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,wBAAwB,CAAC,EACvC,QAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,gBAAkC,EAClC,8BAAsC,EACtC,QAAQ,EACR,OAAO,GACR,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,eA0LlD;AAmGD,eAAO,MAAM,iBAAiB,SACtB,MAAM,QACN,MAAM,KACX,QAAQ,GAAG,MAiBb,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"),n=require("react"),r=e(n),a=require("react-i18next"),i=e(require("react-bootstrap/Button")),l=require("react-bootstrap"),u=require("react-hook-form"),o=require("luxon"),
|
|
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"),n=require("react"),r=e(n),a=require("react-i18next"),i=e(require("react-bootstrap/Button")),l=require("react-bootstrap"),u=require("react-hook-form"),o=require("luxon"),d=require("../modals/confirmation/ConfirmModal.js");require("../modals/dialog/Dialog.js"),require("../modals/dialog/DialogContext.js");var s=require("../product-set/elements/DeleteFieldButton.js"),c=require("rrule"),m=e(c),f=require("@licklist/core/dist/Config/Date"),v=require("react-intl"),D=require("@licklist/plugins/dist/hooks/Value/usePreviousValue"),y=require("./RecurrenceIntervalAndFrequencyInput.js"),T=require("./utils.js"),p=require("./RecurrenceWeekdaysInput.js");var q=function(e){var n=e.rrule,r=e.startDate,a=e.endDate,i=e.startTime,l=e.endTime,u=e.initialFrequency,o=void 0===u?c.Frequency.DAILY:u;return t.__assign({startDate:r,endDate:a,startTime:i,endTime:l,interval:1,freq:o},n&&T.parseAndValidateRRule({rrule:n,date:r}))},g=function(e){var r=e.startDate,a=e.endDate,i=e.startTime,l=e.endTime,u=e.byWeekDay,d=void 0===u?[]:u,s=k(r,i||"00:00:00"),c=k(a,l||"23:59:59"),m=v.useIntl(),f=m.formatList,D=m.formatNumber;return n.useMemo((function(){if(s instanceof o.DateTime&&c instanceof o.DateTime&&s.isValid&&c.isValid){var e=o.Interval.fromDateTimes(s.set({second:0}),c.set({second:0})).toDuration(["days","hours","minutes"]);if(e.isValid){var n=function(e,t){return D(e,{style:"unit",unit:t,unitDisplay:"long"})},r=o.Interval.fromDateTimes(s.minus({second:1}),c.plus({second:1})).splitBy({days:1});if(!(d.length?r.reduce((function(e,t){return d.some((function(e){return e.weekday+1===t.start.weekday}))?e+1:e}),0):1))return n(0,"minute");var a=[[e.days,"day"],[e.hours,"hour"],[e.minutes,"minute"]].filter((function(e){return t.__read(e,1)[0]}));return a.length||a.push([0,"minute"]),f(a.map((function(e){return n.apply(void 0,t.__spreadArray([],t.__read(e),!1))})),{style:"long",type:"unit"})}}}),[s,c,d,f,D])},k=function(e,t){var n=o.DateTime.fromFormat("".concat(e," ").concat(t),f.DATE_TIME_FORMAT);if(n.isValid)return n;var r=o.DateTime.fromFormat("".concat(e," ").concat(t),f.DATE_TIME_FULL_FORMAT);return r.isValid?r:""};exports.RecurringDatePickerInput=function(e){var v,T,_,b,F,E,w=e.disabled,h=void 0!==w&&w,I=e.onChange,A=e.onDelete,V=e.defaultValues,x=e.initialFrequency,L=void 0===x?c.Frequency.DAILY:x,j=e.setInitialStartDateAfterSelect,M=void 0!==j&&j,R=e.children,S=e.minDate,N=a.useTranslation(["Design"]).t,C=u.useForm({defaultValues:q({rrule:null!==(v=null==V?void 0:V.rrule)&&void 0!==v?v:"",startDate:null!==(T=null==V?void 0:V.startDate)&&void 0!==T?T:"",endDate:null!==(_=null==V?void 0:V.endDate)&&void 0!==_?_:"",startTime:null!==(b=null==V?void 0:V.startTime)&&void 0!==b?b:"",endTime:null!==(F=null==V?void 0:V.endTime)&&void 0!==F?F:"",initialFrequency:null!==(E=null==V?void 0:V.freq)&&void 0!==E?E:L}),mode:"onChange"}),O=C.watch,P=C.setValue,W=C.handleSubmit,B=O("startDate"),Y=O("endDate"),U=O("startTime"),Q=O("endTime"),J=O("byweekday"),K=D.usePreviousValue(B),z=g({startDate:B,endDate:Y,startTime:U,endTime:Q,byWeekDay:J}),G=function(e){var n,r=k(Y,Q||"23:59:59"),a=Array.isArray(e.byweekday)?e.byweekday.map((function(e){return e instanceof c.Weekday?e:new c.Weekday(null==e?void 0:e.weekday)})):e.byweekday,i=(null==e?void 0:e.endTime)?o.DateTime.fromISO(null==e?void 0:e.endTime).toFormat(f.TIME_FULL_FORMAT):"",l=null!==(n=null==e?void 0:e.endDate)&&void 0!==n?n:"",u=m.optionsToString({until:r instanceof o.DateTime&&r.isValid?null==r?void 0:r.toJSDate():null,byweekday:a,count:e.count,freq:(null==a?void 0:a.length)?c.Frequency.WEEKLY:c.Frequency.DAILY,interval:e.interval}).replace("RRULE:","");I(t.__assign(t.__assign({},e),{endDate:l,endTime:i,rrule:u}))};return n.useEffect((function(){var e,t;if(M&&(!K||B)&&!B&&J&&J.length&&!Number.isNaN(null===(e=J[0])||void 0===e?void 0:e.weekday)){var n=(null===(t=J[0])||void 0===t?void 0:t.weekday)+1,r=o.DateTime.local(),a=o.DateTime.local().set({weekday:n});a>=r||n===r.weekday?P("startDate",a.toSQLDate()):P("startDate",a.plus({week:1}).toSQLDate())}}),[J,M]),r.createElement(u.FormProvider,t.__assign({},C),r.createElement(l.Form,{noValidate:!0,onSubmit:function(e){return e.preventDefault(),e.stopPropagation(),W(G)(e)}},r.createElement(p.default,{date:B,disabled:h}),r.createElement(y.default,{disabled:h,minDate:S}),R,r.createElement("div",{className:"d-inline-flex align-items-center w-100"},r.createElement(i,{type:"submit"},N("Design:apply")),r.createElement("div",{className:"d-flex flex-grow-1 text-muted mx-3 flex-column"},r.createElement("div",null,z&&"lasts ".concat(z))),V&&r.createElement("div",{className:"d-flex justify-content-end delete-btn"},r.createElement(d.ConfirmModal,null,(function(e){return r.createElement(s.DeleteFieldButton,{onDelete:function(){return e(A)}})}))))))},exports.getDateTimeObject=k;
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
2
1
|
import { Frequency, Weekday } from "rrule";
|
|
3
2
|
export declare const getWeekdayForFrequency: ({ date, frequency, }: {
|
|
4
3
|
date: string;
|
|
@@ -16,15 +15,4 @@ export declare const parseAndValidateRRule: ({ rrule, date, }: {
|
|
|
16
15
|
rrule: string;
|
|
17
16
|
date: string;
|
|
18
17
|
}) => ParsedRRuleOptions;
|
|
19
|
-
export declare const useWorkHoursValidationRules: (byWeekDay: Weekday[], workHours: WorkHour[] | undefined) => {
|
|
20
|
-
startTimeRules?: undefined;
|
|
21
|
-
endTimeRules?: undefined;
|
|
22
|
-
} | {
|
|
23
|
-
startTimeRules: {
|
|
24
|
-
validate: (date: string) => string | true;
|
|
25
|
-
};
|
|
26
|
-
endTimeRules: {
|
|
27
|
-
validate: (date: string) => string | true;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
18
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/utils.ts"],"names":[],"mappings":"AACA,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/utils.ts"],"names":[],"mappings":"AACA,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,sBAAsB;UAI3B,MAAM;eACD,SAAS;MAClB,OAUH,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAC1B,SAAS,CAAC,KAAK,GACf,SAAS,CAAC,MAAM,GAChB,SAAS,CAAC,OAAO,GACjB,SAAS,CAAC,MAAM,CAAC;AAErB,MAAM,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,kBAAkB,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,EAAE,CAAC;IACtB,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,eAAO,MAAM,qBAAqB;WAIzB,MAAM;UACP,MAAM;wBAsEb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,r=require("luxon"),n=require("rrule"),t=(e=n)&&"object"==typeof e&&"default"in e?e.default:e,u=function(e){var t=e.date,u=e.frequency,o=r.DateTime.fromISO(t);return new n.Weekday(o.weekday-1,u!==n.Frequency.MONTHLY?void 0:o.day+7>o.daysInMonth?-1:Math.floor(o.day/7)+1)};exports.getWeekdayForFrequency=u,exports.parseAndValidateRRule=function(e){var r,o,a=e.rrule,i=e.date,y="Unsupported RRule",d=new Set(["interval","freq","byweekday","until","count"]),l=new Set([n.Frequency.DAILY,n.Frequency.WEEKLY,n.Frequency.MONTHLY,n.Frequency.YEARLY]),f=t.parseString(a.includes("EXDATE")?a.split(";EXDATE=")[0]:a);if(Object.keys(f).some((function(e){return!d.has(e)}))||void 0===f.freq||!l.has(f.freq)||f.until&&f.count)throw new Error(y);if(f.byweekday){var c=f.byweekday;if(f.freq===n.Frequency.WEEKLY){if(c.some((function(e){return void 0!==e.n})))throw new Error(y)}else{if(f.freq!==n.Frequency.MONTHLY)throw new Error(y);var q=u({date:i,frequency:n.Frequency.MONTHLY});if(c.length>1||(null===(r=c[0])||void 0===r?void 0:r.weekday)!==q.weekday||(null===(o=c[0])||void 0===o?void 0:o.n)!==q.n)throw new Error(y)}}return{interval:f.interval,freq:f.freq,byweekday:f.byweekday,count:f.count,until:f.until}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;
|
|
1
|
+
{"version":3,"file":"ResultCard.d.ts","sourceRoot":"","sources":["../../../../../src/sales/booking/results/components/ResultCard.tsx"],"names":[],"mappings":";AAKA,OAAO,EACL,KAAK,EAEN,MAAM,sDAAsD,CAAC;AAC9D,OAAO,EAAE,IAAI,EAAE,MAAM,oDAAoD,CAAC;AAQ1E,MAAM,MAAM,eAAe,GAAG;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,CAAC,EAAE,IAAI,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC,CAAC;AAIF,eAAO,MAAM,UAAU,oDAKpB,eAAe,gBA2FjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),r=require("@licklist/core/dist/Config"),l=require("react-i18next"),a=require("../../../../static/Icon.js"),n=e(require("clsx")),i=require("luxon"),c=require("react-intl"),u=require("@licklist/plugins/dist/utils/formatDate"),s=require("@licklist/core/dist/DataMapper/Order/OrderDataMapper"),o=require("@licklist/plugins/dist/utils/sourceTitle");exports.ResultCard=function(e){var m,d,p,E=e.order,f=e.className,v=e.staffMember,y=e.onCardClick,N=l.useTranslation("Design").t,q=c.useIntl().formatNumber,D=E.id,g=E.people,C=E.user,O=E.status,M=E.startDate,T=E.products,b=E.source,k=E.
|
|
1
|
+
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=e(require("react")),r=require("@licklist/core/dist/Config"),l=require("react-i18next"),a=require("../../../../static/Icon.js"),n=e(require("clsx")),i=require("luxon"),c=require("react-intl"),u=require("@licklist/plugins/dist/utils/formatDate"),s=require("@licklist/core/dist/DataMapper/Order/OrderDataMapper"),o=require("@licklist/plugins/dist/utils/sourceTitle");exports.ResultCard=function(e){var m,d,p,E=e.order,f=e.className,v=e.staffMember,y=e.onCardClick,N=l.useTranslation("Design").t,q=c.useIntl().formatNumber,D=E.id,g=E.people,C=E.user,O=E.status,M=E.startDate,T=E.products,b=E.source,k=E.totalAmount,x=E.event,A=E.menu,h=E.remainingToPay,I=(null===(m=T.map((function(e){return e.name})))||void 0===m?void 0:m.join(", "))||"",R=(null==x?void 0:x.name)||(null==A?void 0:A.name)||"",_=function(){y&&y(D)};return t.createElement("div",{className:n("result-card",f),onClick:_,onKeyUp:_,role:"button",tabIndex:0},t.createElement("div",{className:"card-content"},t.createElement("div",{className:"order-id"},D),t.createElement("div",{className:"order-people"},t.createElement(a.default,{type:"user",width:"10",height:"11"}),g),t.createElement("div",{className:"order-description"},t.createElement("p",{className:"name"},C.firstName," ",C.lastName),C.email&&t.createElement("p",null,C.email),(null===(d=C.userDetail)||void 0===d?void 0:d.phone)&&t.createElement("p",null,null===(p=C.userDetail)||void 0===p?void 0:p.phone),t.createElement("p",null,"------"),t.createElement("p",null,N("activity"),": ",R," "),b===s.ORDER_SOURCE_MANUAL&&v&&t.createElement("p",null,N("staff"),": ","".concat(v.firstName," ").concat(v.lastName)),t.createElement("p",null,N("status"),": ",N(O)),t.createElement("p",null,N("date"),": ",u.formatDateStringForEvent(M,!1)),t.createElement("p",null,N("time"),": ",i.DateTime.fromISO(M).toFormat(r.TIME_FORMAT)),t.createElement("p",{className:"products",title:I},N("products"),": ",I),!!h&&t.createElement("p",null,N("remainingAmount"),":"," ",q(h,{style:"currency",currency:r.Currency.GBP})),t.createElement("p",null,N("paidAmount"),":"," ",q(k,{style:"currency",currency:r.Currency.GBP})),t.createElement("p",null,N("source"),": ",N(o.getOrderSourceTitle(b))))))};
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { ProductGroup } from "@licklist/core/dist/DataMapper/Product/ProductGroupDataMapper";
|
|
3
3
|
import { CouponTotalType, CouponType } from "@licklist/core/dist/DataMapper/Product/CouponDataMapper";
|
|
4
|
-
import { TypeaheadOptions } from "../../../typeahead";
|
|
5
4
|
export interface CouponFormValues {
|
|
6
5
|
name?: string;
|
|
7
6
|
code: string;
|
|
8
7
|
discountType: CouponType;
|
|
9
|
-
productGroupIds:
|
|
8
|
+
productGroupIds: string[];
|
|
10
9
|
discount: number;
|
|
11
10
|
totalType: CouponTotalType;
|
|
12
11
|
startFrom: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CouponFormControl.d.ts","sourceRoot":"","sources":["../../../../src/sales/coupon/control/CouponFormControl.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAC7F,OAAO,EAOL,eAAe,EACf,UAAU,EACX,MAAM,yDAAyD,CAAC;
|
|
1
|
+
{"version":3,"file":"CouponFormControl.d.ts","sourceRoot":"","sources":["../../../../src/sales/coupon/control/CouponFormControl.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAC7F,OAAO,EAOL,eAAe,EACf,UAAU,EACX,MAAM,yDAAyD,CAAC;AAajE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,UAAU,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,iBAAiB,kCAG3B,eAAe,gBAgXjB,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=require("react"),n=e(l),r=require("react-i18next"),o=require("react-bootstrap"),a=require("react-hook-form"),i=require("luxon"),m=require("
|
|
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=require("react"),n=e(l),r=require("react-i18next"),o=require("react-bootstrap"),a=require("react-hook-form"),i=require("luxon"),m=require("@licklist/core/dist/DataMapper/Product/CouponDataMapper"),u=e(require("@licklist/plugins/dist/validation/Rules/couponCodeRules"));exports.CouponFormControl=function(e){var s,d,c,E,p,g,v,F,C,_=e.isLoading,b=void 0!==_&&_,f=e.productGroups,D=a.useFormContext(),y=D.register,T=D.setValue,P=D.getValues,x=D.formState.errors,O=D.watch,G=r.useTranslation(["Design","Notification","App"]).t,R=t.__read(l.useState([]),2),N=R[0],k=R[1],L=O("startFrom"),A=O("validTill"),h=l.useRef(null),w=l.useRef(null),q=((s={})[m.COUPON_TYPE_FIXED]=G("Design:fixed"),s[m.COUPON_TYPE_FIXED_PER_PERSON]=G("Design:fixedPerPerson"),s[m.COUPON_TYPE_PERCENTAGE]=G("Design:percentage"),s[m.COUPON_TYPE_PERCENTAGE_PER_PERSON]=G("Design:percentagePerPerson"),s),S=((d={})[m.COUPON_TOTAL_TYPE_GROSS]=G("Design:grossTotal"),d[m.COUPON_TOTAL_TYPE_TOTAL]=G("Design:depositTotal"),d);return l.useEffect((function(){k(P("productGroupIds"))}),[P]),l.useEffect((function(){T("productGroupIds",N)}),[P,T,N]),n.createElement(o.Row,null,n.createElement(o.Col,{md:5},n.createElement("h2",{className:"mb-5"},G("Design:coupon")),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:name")),n.createElement(o.Form.Control,t.__assign({isInvalid:void 0!==x.name},y("name",{required:G("Validation:fieldRequired",{attribute:G("Design:name")})}),{disabled:b})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(c=null==x?void 0:x.name)||void 0===c?void 0:c.message))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:couponCode")),n.createElement(o.Form.Control,t.__assign({isInvalid:void 0!==x.code},y("code",{required:G("Validation:fieldRequired",{attribute:G("Design:code")}),pattern:{message:"".concat(G("Validation:fieldCouponCode")),value:u}}),{disabled:b})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(E=null==x?void 0:x.code)||void 0===E?void 0:E.message)))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:discountType")),n.createElement(o.Form.Control,t.__assign({},y("discountType",{required:!0}),{as:"select",defaultValue:null!==(p=P("discountType"))&&void 0!==p?p:1,disabled:b}),Object.keys(q).map((function(e){return n.createElement("option",{value:e,key:e},q[e])}))))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:discount")),n.createElement(o.Form.Control,t.__assign({type:"number",isInvalid:void 0!==x.discount},y("discount",{required:G("Validation:fieldRequired",{attribute:G("Design:discount")})}),{disabled:b})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(g=null==x?void 0:x.discount)||void 0===g?void 0:g.message)))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:applyOn")),n.createElement(o.Form.Control,t.__assign({},y("totalType",{required:!0}),{as:"select",defaultValue:null!==(v=P("totalType"))&&void 0!==v?v:1,disabled:b}),Object.keys(S).map((function(e){return n.createElement("option",{value:e,key:e},S[e])}))))))),n.createElement(o.Col,{md:{span:5,offset:1}},n.createElement("h2",{className:"mb-5"},G("Design:limitations")),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:startFrom")),n.createElement(o.Form.Control,t.__assign({type:"date"},y("startFrom"),{value:L,isInvalid:void 0!==x.startFrom,onChange:function(e){var t=i.DateTime.fromSQL(e.target.value).toISODate();T("startFrom",t)},className:L&&"date-input-with-value",ref:h,onClick:function(){var e;return null===(e=null==h?void 0:h.current)||void 0===e?void 0:e.showPicker()},disabled:b})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(F=null==x?void 0:x.startFrom)||void 0===F?void 0:F.message))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:validTill")),n.createElement(o.Form.Control,t.__assign({type:"date"},y("validTill"),{value:A,onChange:function(e){var t=i.DateTime.fromSQL(e.target.value).toISODate();T("validTill",t)},ref:w,className:A&&"date-input-with-value",onClick:function(){var e;return null===(e=null==w?void 0:w.current)||void 0===e?void 0:e.showPicker()},disabled:b}))))),f&&(null==f?void 0:f.length)>0&&n.createElement(o.Row,null,n.createElement(o.Col,{md:12},n.createElement("h5",{className:"mt-4"},G("Design:productGroups")),n.createElement(o.Form.Group,{className:"d-flex flex-wrap justify-content-between mt-4 mb-5"},null==f?void 0:f.map((function(e){var l,r,a=null!==(r=null===(l=P("productGroupIds"))||void 0===l?void 0:l.includes(String(e.id)))&&void 0!==r&&r;return n.createElement(o.Form.Check,{key:e.id,label:e.name,defaultChecked:a,disabled:b,onChange:function(l){l.target.checked?k((function(l){return Array.from(new Set(t.__spreadArray(t.__spreadArray([],t.__read(l),!1),[String(e.id)],!1)))})):k((function(t){return t.filter((function(t){return String(e.id)!==t}))}))}})})),n.createElement(o.Form.Control,t.__assign({},y("productGroupIds"),{hidden:!0,value:N,disabled:b}))))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:totalCoupons")),n.createElement(o.Form.Control,t.__assign({},y("totalCoupons"),{type:"number",isInvalid:void 0!==x.totalCoupons,disabled:b})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(C=null==x?void 0:x.totalCoupons)||void 0===C?void 0:C.message))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:usesPerUser")),n.createElement(o.Form.Control,t.__assign({type:"number"},y("usesPerUser"),{disabled:b}))))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:useAgain")),n.createElement(o.Form.Control,t.__assign({type:"number"},y("useAgain"),{disabled:b})),n.createElement(o.Form.Text,{className:"text-muted"},G("Design:useAgainExplanation")))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:usesPerUserDay")),n.createElement(o.Form.Control,t.__assign({type:"number"},y("usesPerUserDay"),{disabled:b})),n.createElement(o.Form.Text,{className:"text-muted"},G("Design:usesPerUserDayExplanation"))))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:minAmount")),n.createElement(o.Form.Control,t.__assign({type:"number"},y("minAmount"),{disabled:b})),n.createElement(o.Form.Text,{className:"text-muted"},G("Design:minAmountExplanation")))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,G("Design:maxAmount")),n.createElement(o.Form.Control,t.__assign({type:"number"},y("maxAmount"),{disabled:b})),n.createElement(o.Form.Text,{className:"text-muted"},G("Design:maxAmountExplanation")))))))};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ProductGroup
|
|
2
|
+
import { ProductGroup } from "@licklist/core/dist/DataMapper/Product/ProductGroupDataMapper";
|
|
3
3
|
import { CouponTotalType, CouponType } from "@licklist/core/dist/DataMapper/Product/CouponDataMapper";
|
|
4
4
|
import { ServerError } from "@licklist/plugins/dist/hooks/Api/useHttpQuery";
|
|
5
5
|
export interface CouponFormValues {
|
|
6
6
|
name?: string;
|
|
7
7
|
code: string;
|
|
8
8
|
discountType: CouponType;
|
|
9
|
-
productGroupIds:
|
|
9
|
+
productGroupIds: string[];
|
|
10
10
|
discount: number;
|
|
11
11
|
totalType: CouponTotalType;
|
|
12
12
|
startFrom: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CouponFrom.d.ts","sourceRoot":"","sources":["../../../../src/sales/coupon/form/CouponFrom.tsx"],"names":[],"mappings":";AACA,OAAO,
|
|
1
|
+
{"version":3,"file":"CouponFrom.d.ts","sourceRoot":"","sources":["../../../../src/sales/coupon/form/CouponFrom.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAC7F,OAAO,EACL,eAAe,EACf,UAAU,EACX,MAAM,yDAAyD,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAK5E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,UAAU,CAAC;IACzB,eAAe,EAAE,MAAM,EAAE,CAAC;IAC1B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,eAAe,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,aAAa,CAAC,EAAE,gBAAgB,CAAC;IACjC,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC7C,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,UAAU,wFAOpB,eAAe,gBA+CjB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
3
|
-
import {
|
|
3
|
+
import { ProviderType } from "@licklist/core/dist/DataMapper/Provider/ProvidableDataMapper";
|
|
4
4
|
import { PaymentFeeFormFieldValues } from "./PaymentFeeForm";
|
|
5
5
|
import { Currency } from "../../types/currency";
|
|
6
6
|
export type AdminSettingFormFieldValues = {
|
|
@@ -19,7 +19,7 @@ export interface AdminSettingFormProps extends HasPermissionProp {
|
|
|
19
19
|
providerMetadata: {
|
|
20
20
|
country?: string;
|
|
21
21
|
providableId?: number;
|
|
22
|
-
providerType?:
|
|
22
|
+
providerType?: ProviderType;
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
export declare const AdminSettingForm: ({ isLoading, defaultValues, onSubmit, currencies, hasPermission, providerMetadata, }: AdminSettingFormProps) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AdminSettingForm.d.ts","sourceRoot":"","sources":["../../../src/setting/admin/AdminSettingForm.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAOvF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"AdminSettingForm.d.ts","sourceRoot":"","sources":["../../../src/setting/admin/AdminSettingForm.tsx"],"names":[],"mappings":";AAMA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AAOvF,OAAO,EAAE,YAAY,EAAE,MAAM,8DAA8D,CAAC;AAE5F,OAAO,EAAkB,yBAAyB,EAAE,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,MAAM,2BAA2B,GAAG;IACxC,uBAAuB,EAAE,MAAM,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,IAAI,GAAG,OAAO,CAAC;IAC/B,oBAAoB,EAAE,IAAI,GAAG,OAAO,CAAC;IACrC,+BAA+B,EAAE,IAAI,GAAG,OAAO,CAAC;IAChD,0BAA0B,EAAE,IAAI,GAAG,OAAO,CAAC;CAC5C,GAAG,yBAAyB,CAAC;AAE9B,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,IAAI,CAAC;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACrD,UAAU,CAAC,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC;IAC7B,gBAAgB,EAAE;QAChB,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,YAAY,CAAC,EAAE,YAAY,CAAC;KAC7B,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,yFAO1B,qBAAqB,gBAwJvB,CAAC"}
|
|
@@ -10,7 +10,6 @@ export type DashboardSettingFormFieldValues = {
|
|
|
10
10
|
isEnquiryOnly: boolean;
|
|
11
11
|
hasUserVerification: boolean;
|
|
12
12
|
metaPixelId?: number;
|
|
13
|
-
eventDeadlineErrorMessage?: string;
|
|
14
13
|
} & EventSettingFormFieldValues & ProviderSettingFormFieldValues;
|
|
15
14
|
export interface DashboardSettingFormProps extends HasPermissionProp {
|
|
16
15
|
isLoading: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DashboardSettingForm.d.ts","sourceRoot":"","sources":["../../../src/setting/dashboard/DashboardSettingForm.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAM5E,OAAO,EAEL,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAEL,8BAA8B,EAC/B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,+BAA+B,GAAG;IAC5C,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"DashboardSettingForm.d.ts","sourceRoot":"","sources":["../../../src/setting/dashboard/DashboardSettingForm.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,iBAAiB,EAAE,MAAM,oDAAoD,CAAC;AACvF,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAM5E,OAAO,EAEL,2BAA2B,EAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAEL,8BAA8B,EAC/B,MAAM,uBAAuB,CAAC;AAE/B,MAAM,MAAM,+BAA+B,GAAG;IAC5C,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC;IAC1B,aAAa,EAAE,OAAO,CAAC;IACvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,GAAG,2BAA2B,GAC7B,8BAA8B,CAAC;AAYjC,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,+BAA+B,KAAK,IAAI,CAAC;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC,CAAC;IACzD,YAAY,CAAC,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,oBAAoB,yEAM9B,yBAAyB,gBAsM3B,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"),
|
|
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"),a=e(t),n=require("react-i18next"),o=e(require("react-bootstrap/Row")),l=e(require("react-bootstrap/Col")),i=require("react-bootstrap"),s=require("react-hook-form"),d=e(require("@licklist/plugins/dist/services/Form/HookFormService")),m=e(require("@licklist/plugins/dist/services/Form/FormErrorService")),c=e(require("react-bootstrap/Form")),u=require("@react-aria/utils"),v=require("../../static/switch/BooleanSwitch.js");require("../../static/index.js");var E=require("../../help/popover/HelpPopover.js"),p=require("./EventSettingForm.js"),b=require("./ProviderSettingForm.js");exports.DashboardSettingForm=function(e){var f,g,h=e.isLoading,F=void 0!==h&&h,S=e.defaultValues,q=void 0===S?{}:S,I=e.onSubmit,C=e.hasPermission,x=void 0===C||C,P=e.serverErrors,B=s.useForm({mode:"onChange",defaultValues:r.__assign({},q)}),O=B.register,R=B.handleSubmit,L=B.formState,_=L.errors,y=L.isValid,V=L.isDirty,j=B.setError,k=n.useTranslation(["Design","Validation"]).t;t.useEffect((function(){m.handleServerErrors(P,j)}),[P,j]);var w=u.useId(),H=u.useId(),N=u.useId(),G=u.useId(),A=u.useId(),D=[{id:1,value:k("groupItemsByOrder")}];return a.createElement(c,{className:"d-flex flex-column",noValidate:!0,onSubmit:R(I)},a.createElement(s.FormProvider,r.__assign({},B),a.createElement(o,null,a.createElement(l,{xs:12,sm:6},a.createElement(c.Group,{controlId:w},a.createElement(c.Label,null,k("notificationOnEachOrder")," ",a.createElement(E.HelpPopover,{variant:"info"},k("notificationOnEachOrderHelp"))),a.createElement(s.Controller,{render:function(e){var r=e.field,t=r.name,n=r.value,o=r.onChange;return a.createElement(v.BooleanSwitch,{name:t,value:Boolean(n),onChange:d.booleanAsNumber(o),disabled:F})},name:"notificationOnEachOrder",control:B.control})),a.createElement(c.Group,{controlId:H},a.createElement(c.Label,null,k("orderReportOnEventStart")," ",a.createElement(E.HelpPopover,{variant:"info"},k("orderReportOnEventStartHelp"))),a.createElement(s.Controller,{render:function(e){var r=e.field,t=r.name,n=r.value,o=r.onChange;return a.createElement(v.BooleanSwitch,{name:t,value:Boolean(n),onChange:d.booleanAsNumber(o),disabled:F})},name:"orderReportOnEventStart",control:B.control})),a.createElement(c.Group,{controlId:G},a.createElement(c.Label,null,k("hasUserVerification")),a.createElement(s.Controller,{render:function(e){var r=e.field,t=r.name,n=r.value,o=r.onChange;return a.createElement(v.BooleanSwitch,{name:t,value:Boolean(n),onChange:o,disabled:F})},name:"hasUserVerification",control:B.control})),a.createElement(c.Group,{controlId:A},a.createElement(c.Label,null,k("metaPixelId")),a.createElement(c.Control,r.__assign({type:"number"},O("metaPixelId",{minLength:{value:15,message:k("Validation:fieldMinLength",{attribute:k("metaPixelId"),min:15})}}),{isInvalid:Boolean(_.metaPixelId),disabled:F})),a.createElement(c.Control.Feedback,{type:"invalid"},null===(f=_.metaPixelId)||void 0===f?void 0:f.message))),a.createElement(l,{xs:12,sm:6},a.createElement(c.Group,{controlId:N},a.createElement(c.Label,null,k("orderReportFormat")),a.createElement(c.Control,r.__assign({as:"select"},O("orderReportFormat",{required:k("Validation:fieldRequired",{attribute:k("orderReportFormat")}),valueAsNumber:!0}),{name:"orderReportFormat",isInvalid:Boolean(_.orderReportFormat),disabled:F}),D.map((function(e){return a.createElement("option",{value:e.id,key:e.id},e.value)}))),a.createElement(c.Control.Feedback,{type:"invalid"},null===(g=_.orderReportFormat)||void 0===g?void 0:g.message)))),a.createElement(p.EventSettingForm,{isLoading:F}),a.createElement(b.ProviderSettingForm,{isLoading:F})),x&&a.createElement(i.Button,{type:"submit",disabled:F||!y||!V,className:"d-flex align-items-center align-self-end"},F&&a.createElement(i.Spinner,{animation:"border",size:"sm",role:"status","aria-hidden":"true",className:"mr-2"}),k("update")))};
|
|
@@ -47,127 +47,141 @@
|
|
|
47
47
|
margin-left: 0.5rem;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
|
+
.ryft-payment-form {
|
|
51
|
+
.submit-button-wrapper {
|
|
52
|
+
margin: -1rem 0 1rem;
|
|
53
|
+
|
|
54
|
+
button {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
#mobile-pay-divider-container {
|
|
59
|
+
display: flex;
|
|
60
|
+
position: relative;
|
|
61
|
+
margin-bottom: 1rem;
|
|
62
|
+
#mobile-pay-divider-text {
|
|
63
|
+
margin-right: 1rem;
|
|
64
|
+
font-size: 0.875rem;
|
|
65
|
+
font-weight: 600;
|
|
66
|
+
}
|
|
67
|
+
#mobile-pay-divider {
|
|
68
|
+
width: 100%;
|
|
69
|
+
border-bottom: 1px #dfdfdf solid;
|
|
70
|
+
margin-bottom: 0.6rem;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
#card-title-container {
|
|
75
|
+
height: auto;
|
|
76
|
+
border: none;
|
|
77
|
+
margin-bottom: 0.5rem;
|
|
78
|
+
text-align: left;
|
|
79
|
+
:first-child {
|
|
80
|
+
font-size: 1rem;
|
|
81
|
+
font-weight: 600;
|
|
82
|
+
margin-bottom: 1rem;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.form-label {
|
|
86
|
+
margin-bottom: 0.5rem;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
.mobile-pay-title {
|
|
90
|
+
display: block;
|
|
91
|
+
font-weight: 600;
|
|
92
|
+
font-size: 1rem;
|
|
93
|
+
color: black;
|
|
94
|
+
padding: 0;
|
|
95
|
+
font-style: normal;
|
|
96
|
+
font-family: inherit;
|
|
97
|
+
margin-bottom: 1rem;
|
|
98
|
+
}
|
|
99
|
+
}
|
|
50
100
|
.form {
|
|
51
101
|
.input {
|
|
52
102
|
border: 2px solid #525252 !important;
|
|
53
103
|
}
|
|
54
104
|
}
|
|
55
105
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
106
|
+
.ryft-payment-form {
|
|
107
|
+
@include media-breakpoint-up(md) {
|
|
108
|
+
.submit-button-wrapper {
|
|
109
|
+
max-width: 15.5rem;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
114
|
+
.ryft-pay-grid {
|
|
115
|
+
width: 100%;
|
|
116
|
+
max-width: 15.5rem;
|
|
117
|
+
margin-bottom: 1rem;
|
|
118
|
+
}
|
|
119
|
+
.ryft-pay-apple-pay-button {
|
|
120
|
+
border-radius: 0.25rem;
|
|
60
121
|
}
|
|
61
122
|
}
|
|
62
|
-
}
|
|
63
123
|
|
|
124
|
+
.divider {
|
|
125
|
+
display: none !important;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
64
128
|
@include media-breakpoint-down(sm) {
|
|
65
|
-
|
|
66
|
-
|
|
129
|
+
.left-block-container {
|
|
130
|
+
max-height: 100%;
|
|
131
|
+
overflow: visible;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
67
135
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
136
|
+
@include media-breakpoint-down(sm) {
|
|
137
|
+
flex-direction: column-reverse;
|
|
138
|
+
overflow: scroll;
|
|
139
|
+
|
|
140
|
+
@include media-breakpoint-down(sm) {
|
|
141
|
+
.left-block {
|
|
142
|
+
min-height: 100%;
|
|
143
|
+
}
|
|
144
|
+
.right-block {
|
|
145
|
+
margin: 0 auto;
|
|
146
|
+
width: 100%;
|
|
147
|
+
.children-wrapper {
|
|
148
|
+
.accordion {
|
|
149
|
+
.collapse {
|
|
150
|
+
overflow: visible;
|
|
151
|
+
overflow-x: unset;
|
|
152
|
+
scrollbar-width: unset;
|
|
82
153
|
}
|
|
83
154
|
}
|
|
84
155
|
}
|
|
85
156
|
}
|
|
86
157
|
}
|
|
87
158
|
}
|
|
88
|
-
::-webkit-scrollbar {
|
|
89
|
-
display: none;
|
|
90
|
-
scrollbar-width: none;
|
|
91
|
-
}
|
|
92
159
|
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
display: none;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
.ryft-payment-form {
|
|
100
|
-
.submit-button-wrapper {
|
|
101
|
-
margin: -1rem 0 1rem;
|
|
102
|
-
|
|
103
|
-
button {
|
|
104
|
-
width: 100%;
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
#mobile-pay-divider-container {
|
|
108
|
-
display: flex;
|
|
109
|
-
position: relative;
|
|
110
|
-
margin-bottom: 1rem;
|
|
111
|
-
#mobile-pay-divider-text {
|
|
112
|
-
margin-right: 1rem;
|
|
113
|
-
font-size: 0.875rem;
|
|
114
|
-
font-weight: 600;
|
|
115
|
-
}
|
|
116
|
-
#mobile-pay-divider {
|
|
117
|
-
width: 100%;
|
|
118
|
-
border-bottom: 1px #dfdfdf solid;
|
|
119
|
-
margin-bottom: 0.6rem;
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
#card-title-container {
|
|
124
|
-
height: auto;
|
|
125
|
-
border: none;
|
|
126
|
-
margin-bottom: 0.5rem;
|
|
127
|
-
text-align: left;
|
|
128
|
-
:first-child {
|
|
129
|
-
font-size: 1rem;
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
margin-bottom: 1rem;
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
.form-label {
|
|
135
|
-
margin-bottom: 0.5rem;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
.mobile-pay-title {
|
|
139
|
-
display: block;
|
|
140
|
-
font-weight: 600;
|
|
141
|
-
font-size: 1rem;
|
|
142
|
-
color: black;
|
|
143
|
-
padding: 0;
|
|
144
|
-
font-style: normal;
|
|
145
|
-
font-family: inherit;
|
|
146
|
-
margin-bottom: 1rem;
|
|
160
|
+
::-webkit-scrollbar {
|
|
161
|
+
display: none;
|
|
162
|
+
scrollbar-width: none;
|
|
147
163
|
}
|
|
148
164
|
}
|
|
149
165
|
|
|
150
|
-
@include media-breakpoint-
|
|
151
|
-
.
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
166
|
+
@include media-breakpoint-down(md) {
|
|
167
|
+
.payment_link {
|
|
168
|
+
.page-body {
|
|
169
|
+
.left-block {
|
|
170
|
+
.left-block-container {
|
|
171
|
+
.ryft-payment-form {
|
|
172
|
+
position: relative;
|
|
173
|
+
max-height: 300px !important;
|
|
174
|
+
.ryft-pay-grid {
|
|
175
|
+
width: 100%;
|
|
176
|
+
max-width: 100%;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
157
181
|
}
|
|
158
182
|
}
|
|
183
|
+
}
|
|
159
184
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
width: 100%;
|
|
163
|
-
max-width: 15.5rem;
|
|
164
|
-
margin-bottom: 1rem;
|
|
165
|
-
}
|
|
166
|
-
.ryft-pay-apple-pay-button {
|
|
167
|
-
border-radius: 0.25rem;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.divider {
|
|
171
|
-
display: none !important;
|
|
172
|
-
}
|
|
185
|
+
#ryft-threeDSMethodIframe {
|
|
186
|
+
display: none;
|
|
173
187
|
}
|
|
@@ -12,8 +12,7 @@ export interface TypeaheadProps {
|
|
|
12
12
|
isMultipleChoise?: boolean;
|
|
13
13
|
noOptionsMessage: string;
|
|
14
14
|
isInvalid?: boolean;
|
|
15
|
-
isCouponForm?: boolean;
|
|
16
15
|
}
|
|
17
|
-
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name,
|
|
16
|
+
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, noOptionsMessage, isInvalid, }: TypeaheadProps): JSX.Element;
|
|
18
17
|
export { Typeahead };
|
|
19
18
|
//# sourceMappingURL=Typeahead.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Typeahead.d.ts","sourceRoot":"","sources":["../../src/typeahead/Typeahead.tsx"],"names":[],"mappings":";AAIA,MAAM,MAAM,gBAAgB,GAAG;IAC7B,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,GAAG,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,gBAAgB,EAChB,IAAS,EACT,gBAAqB,EACrB,SAAS,GACV,EAAE,cAAc,eAiChB;AAED,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var r=require("tslib"),n=e(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 r=require("tslib"),n=e(require("react")),t=require("react-hook-form"),o=e(require("react-select"));exports.Typeahead=function(e){var i=e.options,l=e.placeholder,a=e.isRequired,u=void 0!==a&&a,s=e.isMultipleChoise,c=e.name,d=void 0===c?"":c,p=e.noOptionsMessage,f=void 0===p?"":p,v=e.isInvalid,m=t.useFormContext().control;return n.createElement(n.Fragment,null,n.createElement(t.Controller,{name:d,control:m,rules:{required:u},render:function(e){var t=e.field;return n.createElement(o,{placeholder:l,value:t.value,isMulti:s,styles:{control:function(e){return r.__assign(r.__assign({},e),v?{borderColor:"red"}:{})}},onChange:function(e){t.onChange(e)},options:i,noOptionsMessage:function(){return n.createElement("span",null,f)}})}}))};
|
|
@@ -7,10 +7,10 @@ export type ZoneFormProps = {
|
|
|
7
7
|
onSubmit: (values: Partial<Zone>) => void;
|
|
8
8
|
serverErrors?: ServerError;
|
|
9
9
|
isLoading?: boolean;
|
|
10
|
-
workHours
|
|
10
|
+
workHours?: WorkHour[];
|
|
11
11
|
};
|
|
12
12
|
export type ZoneFormValues = Partial<Zone> & {
|
|
13
13
|
localImageBlobURL?: string;
|
|
14
14
|
};
|
|
15
|
-
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading,
|
|
15
|
+
export declare const ZoneForm: ({ defaultValues, onSubmit, serverErrors, isLoading, }: ZoneFormProps) => JSX.Element;
|
|
16
16
|
//# sourceMappingURL=ZoneForm.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"ZoneForm.d.ts","sourceRoot":"","sources":["../../../src/zone/form/ZoneForm.tsx"],"names":[],"mappings":";AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,wDAAwD,CAAC;AAC9E,OAAO,EAAE,WAAW,EAAE,MAAM,+CAA+C,CAAC;AAE5E,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,MAAM,MAAM,aAAa,GAAG;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,QAAQ,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC;IAC1C,YAAY,CAAC,EAAE,WAAW,CAAC;IAC3B,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,QAAQ,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG;IAC3C,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,QAAQ,0DAKlB,aAAa,gBAiDf,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"),o=e(t),n=require("react-i18next"),s=require("react-bootstrap"),a=require("react-hook-form"),l=e(require("@licklist/plugins/dist/services/Form/FormErrorService")),
|
|
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"),o=e(t),n=require("react-i18next"),s=require("react-bootstrap"),a=require("react-hook-form"),l=e(require("@licklist/plugins/dist/services/Form/FormErrorService")),i=require("./components/ZoneControl.js");exports.ZoneForm=function(e){var u=e.defaultValues,c=e.onSubmit,m=e.serverErrors,d=e.isLoading,f=void 0!==d&&d,b=n.useTranslation("Design").t,p=a.useForm({mode:"onChange",defaultValues:{zoneRecurrences:[]}}),v=p.reset,E=p.setError,g=p.handleSubmit,q=(0,p.watch)();return t.useEffect((function(){u&&v(u)}),[u,v]),t.useEffect((function(){m&&l.handleServerErrors(m,E)}),[m,E]),o.createElement(a.FormProvider,r.__assign({},p),o.createElement(s.Form,{onSubmit:g((function(e){e.localImageBlobURL;var t=r.__rest(e,["localImageBlobURL"]);c(t)}))},o.createElement(i.ZoneControl,{isLoading:f}),o.createElement(s.Row,null,o.createElement(s.Col,{md:6,sm:12}),o.createElement(s.Col,{className:"product-set-save-btn-wrapper p-0 pl-4 d-flex mw-100",md:6,sm:12},o.createElement(s.Button,{className:"product-set-save-btn mt-5 ml-5 d-no dne d-md-block",type:"submit",disabled:f||!q.name},b("saveAndClose"))))))};
|