@licklist/design 0.62.2 → 0.62.3-dev.2
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 +0 -8
- package/dist/date-time-button/DateTimeButton.js +1 -1
- package/dist/events/edit-event-modal/component/EditEventForm/EditEventForm.d.ts +3 -1
- 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 +3 -1
- 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 +3 -1
- 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 +4 -1
- 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 +3 -1
- 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 +12 -0
- 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 +2 -1
- 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/sales/coupon/utils/index.d.ts +7 -0
- package/dist/sales/coupon/utils/index.d.ts.map +1 -0
- package/dist/sales/coupon/utils/index.js +1 -0
- 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 +1 -0
- package/dist/setting/dashboard/DashboardSettingForm.d.ts.map +1 -1
- package/dist/setting/dashboard/DashboardSettingForm.js +1 -1
- package/dist/styles/iframe-external-modal/IframeExternalModal.scss +1 -0
- package/dist/styles/ryft-payment-form/RyftPaymentForm.scss +99 -113
- package/dist/styles/sales/BookingResults.scss +1 -1
- package/dist/typeahead/Typeahead.d.ts +2 -1
- 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/package.json +10 -35
- package/src/date-time-button/DateTimeButton.stories.tsx +2 -1
- package/src/date-time-button/DateTimeButton.tsx +7 -5
- package/src/events/edit-event-modal/component/EditEventForm/EditEventForm.tsx +4 -0
- package/src/events/edit-event-modal/component/SelectEventProductSet/SelectEventProductSet.tsx +10 -8
- package/src/events/edit-event-modal/component/SelectEventProductSet/component/EditEventProductSet.tsx +4 -0
- package/src/iframe/payment/order-items-table/utils/paymentSummary.tsx +6 -6
- package/src/iframe/ryft/RyftPaymentForm.tsx +12 -4
- package/src/iframe/ryft/utils/ryft-form.ts +8 -4
- package/src/product-set/control/DateAndRecurrenceInput.tsx +3 -2
- package/src/product-set/control/DateInput.tsx +2 -4
- 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 +5 -1
- package/src/product-set/hooks/useSortableTreeFunctions.ts +2 -0
- package/src/product-set/product/ProductControl.tsx +38 -38
- package/src/product-set/product/fixed-duration-fields/FixedDurationOptions.tsx +0 -2
- package/src/provider/working-hours-input/WorkingHoursInputDescription.tsx +4 -18
- package/src/recurring-date-picker-input/RecurrenceAndFrequencyInput.tsx +0 -1
- package/src/recurring-date-picker-input/RecurringDatePickerInput.tsx +11 -1
- package/src/recurring-date-picker-input/utils.ts +77 -0
- package/src/sales/booking/results/BookingResults.stories.tsx +3 -2
- package/src/sales/booking/results/components/ResultCard.tsx +2 -5
- package/src/sales/coupon/control/CouponFormControl.tsx +28 -51
- package/src/sales/coupon/form/CouponFrom.tsx +5 -15
- package/src/sales/coupon/utils/index.ts +13 -0
- package/src/setting/admin/AdminSettingForm.tsx +2 -2
- package/src/setting/dashboard/DashboardSettingForm.tsx +13 -0
- package/src/sortable-tree/SortableTreeItem.tsx +1 -1
- package/src/static/switch/BooleanSwitch.tsx +1 -1
- package/src/styles/iframe-external-modal/IframeExternalModal.scss +1 -0
- package/src/styles/ryft-payment-form/RyftPaymentForm.scss +99 -113
- package/src/styles/sales/BookingResults.scss +1 -1
- package/src/typeahead/Typeahead.tsx +16 -3
- package/src/zone/form/ZoneForm.tsx +3 -2
- package/src/zone/form/components/ZoneControl.tsx +3 -3
- package/src/zone/form/components/ZoneRecurrencesControl.tsx +7 -5
- package/src/zone/form/utils/dates.ts +9 -10
- package/jest.config.js +0 -29
- package/tests/Auth/Authorizer.test.tsx +0 -194
- package/tests/Auth/Layout/UserNavDropDown.test.tsx +0 -43
- package/tests/Auth/Layout/UserNavDropDownToggle.test.tsx +0 -33
- package/tests/Auth/Login/LoginComponent.test.tsx +0 -246
- package/tests/Auth/Login/LoginFormComponent.test.tsx +0 -182
- package/tests/Auth/Register/RegisterComponent.test.tsx +0 -285
- package/tests/Auth/Register/RegisterFormComponent.test.tsx +0 -170
- package/tests/Auth/Settings/Dashboard/IpInput.test.tsx +0 -130
- package/tests/Auth/Social/SocialCallbackComponent.test.tsx +0 -133
- package/tests/Auth/Social/SocialFormComponent.test.tsx +0 -118
- package/tests/FileUpload/FileUpload.test.tsx +0 -42
- package/tests/Notification/EmailTemplate.test.tsx +0 -82
- package/tests/ProductSet/ProductSetPopover.test.tsx +0 -40
- package/tests/Report/Report.test.tsx +0 -48
- package/tests/Sales/Coupon.test.tsx +0 -51
- package/tests/Sales/SalesAndVIews.test.tsx +0 -63
- package/tests/SnippetTemplates/SnippetTemplates.test.tsx +0 -56
- package/tests/Table/FilterHelperComponent.test.tsx +0 -88
- package/tests/Table/PaginationHelperComponent.test.tsx +0 -109
- package/tests/Table/PerPageHelperComponent.test.tsx +0 -34
- package/tests/Table/TableHelperComponent.test.tsx +0 -295
- package/tests/TipTapEditor/TipTapEditor.test.tsx +0 -28
- package/tests/__mock__/hooks/useAuthApi.ts +0 -13
- package/tests/__mock__/hooks/useAuthMock.ts +0 -13
- package/tests/__mock__/hooks/useFormMock.ts +0 -27
- package/tests/__mock__/hooks/useNotificationMock.ts +0 -13
- package/tests/__mock__/hooks/useQueryMock.ts +0 -16
- package/tests/__mock__/hooks/useSocialApiMock.ts +0 -20
- package/tests/__mock__/hooks/useTranslationMock.ts +0 -17
- package/tests/__mock__/hooks/useUserApiMock.ts +0 -18
- package/tests/__mock__/hooks/useUserMock.ts +0 -13
- package/tests/__mock__/styleMock.js +0 -1
- package/tests/__mock__/windowMock.ts +0 -5
- package/tests/packages/react-query.tsx +0 -28
- package/tests/setupTests.ts +0 -10
|
@@ -1,6 +1,7 @@
|
|
|
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";
|
|
4
5
|
import { SupportedFrequency } from "./utils";
|
|
5
6
|
export interface RecurringDatePickerInputProps {
|
|
6
7
|
disabled?: boolean;
|
|
@@ -10,6 +11,7 @@ export interface RecurringDatePickerInputProps {
|
|
|
10
11
|
initialFrequency?: Frequency;
|
|
11
12
|
setInitialStartDateAfterSelect?: boolean;
|
|
12
13
|
minDate?: string;
|
|
14
|
+
workHours: WorkHour[] | undefined;
|
|
13
15
|
}
|
|
14
16
|
export interface RecurringDatePickerInputValues {
|
|
15
17
|
rrule?: string;
|
|
@@ -24,6 +26,6 @@ export interface RecurringDatePickerInputValues {
|
|
|
24
26
|
count?: number;
|
|
25
27
|
withOutEndDate?: boolean;
|
|
26
28
|
}
|
|
27
|
-
export declare function RecurringDatePickerInput({ disabled, onChange, onDelete, defaultValues, initialFrequency, setInitialStartDateAfterSelect, children, minDate, }: PropsWithChildren<RecurringDatePickerInputProps>): JSX.Element;
|
|
29
|
+
export declare function RecurringDatePickerInput({ disabled, onChange, onDelete, defaultValues, initialFrequency, setInitialStartDateAfterSelect, children, minDate, workHours, }: PropsWithChildren<RecurringDatePickerInputProps>): JSX.Element;
|
|
28
30
|
export declare const getDateTimeObject: (date: string, time: string) => DateTime | string;
|
|
29
31
|
//# 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;AAU3C,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAGtF,OAAO,EAEL,kBAAkB,EAEnB,MAAM,SAAS,CAAC;AAIjB,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;IACjB,SAAS,EAAE,QAAQ,EAAE,GAAG,SAAS,CAAC;CACnC;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,EACP,SAAS,GACV,EAAE,iBAAiB,CAAC,6BAA6B,CAAC,eA6LlD;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"),s=require("../modals/confirmation/ConfirmModal.js");require("../modals/dialog/Dialog.js"),require("../modals/dialog/DialogContext.js");var d=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,s=void 0===u?[]:u,d=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(d instanceof o.DateTime&&c instanceof o.DateTime&&d.isValid&&c.isValid){var e=o.Interval.fromDateTimes(d.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(d.minus({second:1}),c.plus({second:1})).splitBy({days:1});if(!(s.length?r.reduce((function(e,t){return s.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"})}}}),[d,c,s,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,_,b,F,E,w,h=e.disabled,I=void 0!==h&&h,V=e.onChange,A=e.onDelete,x=e.defaultValues,L=e.initialFrequency,j=void 0===L?c.Frequency.DAILY:L,R=e.setInitialStartDateAfterSelect,M=void 0!==R&&R,S=e.children,N=e.minDate,W=e.workHours,C=a.useTranslation(["Design"]).t,O=u.useForm({defaultValues:q({rrule:null!==(v=null==x?void 0:x.rrule)&&void 0!==v?v:"",startDate:null!==(_=null==x?void 0:x.startDate)&&void 0!==_?_:"",endDate:null!==(b=null==x?void 0:x.endDate)&&void 0!==b?b:"",startTime:null!==(F=null==x?void 0:x.startTime)&&void 0!==F?F:"",endTime:null!==(E=null==x?void 0:x.endTime)&&void 0!==E?E:"",initialFrequency:null!==(w=null==x?void 0:x.freq)&&void 0!==w?w:j}),mode:"onChange"}),P=O.watch,B=O.setValue,Y=O.handleSubmit,U=P("startDate"),H=P("endDate"),Q=P("startTime"),J=P("endTime"),K=P("byweekday"),z=D.usePreviousValue(U),G=g({startDate:U,endDate:H,startTime:Q,endTime:J,byWeekDay:K}),X=T.useWorkHoursValidationRules(K,W),Z=function(e){var n,r=k(H,J||"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:","");V(t.__assign(t.__assign({},e),{endDate:l,endTime:i,rrule:u}))};return n.useEffect((function(){var e,t;if(M&&(!z||U)&&!U&&K&&K.length&&!Number.isNaN(null===(e=K[0])||void 0===e?void 0:e.weekday)){var n=(null===(t=K[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?B("startDate",a.toSQLDate()):B("startDate",a.plus({week:1}).toSQLDate())}}),[K,M]),r.createElement(u.FormProvider,t.__assign({},O),r.createElement(l.Form,{noValidate:!0,onSubmit:function(e){return e.preventDefault(),e.stopPropagation(),Y(Z)(e)}},r.createElement(p.default,{date:U,disabled:I}),r.createElement(y.default,t.__assign({disabled:I,minDate:N},X)),S,r.createElement("div",{className:"d-inline-flex align-items-center w-100"},r.createElement(i,{type:"submit"},C("Design:apply")),r.createElement("div",{className:"d-flex flex-grow-1 text-muted mx-3 flex-column"},r.createElement("div",null,G&&"lasts ".concat(G))),x&&r.createElement("div",{className:"d-flex justify-content-end delete-btn"},r.createElement(s.ConfirmModal,null,(function(e){return r.createElement(d.DeleteFieldButton,{onDelete:function(){return e(A)}})}))))))},exports.getDateTimeObject=k;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WorkHour } from "@licklist/core/dist/DataMapper/Provider/WorkHourDataMapper";
|
|
1
2
|
import { Frequency, Weekday } from "rrule";
|
|
2
3
|
export declare const getWeekdayForFrequency: ({ date, frequency, }: {
|
|
3
4
|
date: string;
|
|
@@ -15,4 +16,15 @@ export declare const parseAndValidateRRule: ({ rrule, date, }: {
|
|
|
15
16
|
rrule: string;
|
|
16
17
|
date: string;
|
|
17
18
|
}) => 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
|
+
};
|
|
18
30
|
//# 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,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,sBAAsB;UAI3B,MAAM;eACD,SAAS;MAClB,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/recurring-date-picker-input/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,4DAA4D,CAAC;AAItF,OAAc,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAElD,eAAO,MAAM,sBAAsB;UAI3B,MAAM;eACD,SAAS;MAClB,OAWH,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;AAEF,eAAO,MAAM,2BAA2B,cAC3B,OAAO,EAAE,aACT,QAAQ,EAAE,GAAG,SAAS;;;;;yBAsBd,MAAM;;;yBA+BN,MAAM;;CAe1B,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("@licklist/core/dist/Config"),t=require("react-i18next"),n=require("luxon"),i=require("rrule"),a=(e=i)&&"object"==typeof e&&"default"in e?e.default:e,o=require("@licklist/plugins/dist/utils/dateTime"),u=function(e){var r=e.date,t=e.frequency,a=n.DateTime.fromISO(r);return new i.Weekday(a.weekday-1,t!==i.Frequency.MONTHLY?void 0:a.day+7>a.daysInMonth?-1:Math.floor(a.day/7)+1)};exports.getWeekdayForFrequency=u,exports.parseAndValidateRRule=function(e){var r,t,n=e.rrule,o=e.date,d="Unsupported RRule",l=new Set(["interval","freq","byweekday","until","count"]),f=new Set([i.Frequency.DAILY,i.Frequency.WEEKLY,i.Frequency.MONTHLY,i.Frequency.YEARLY]),s=a.parseString(n.includes("EXDATE")?n.split(";EXDATE=")[0]:n);if(Object.keys(s).some((function(e){return!l.has(e)}))||void 0===s.freq||!f.has(s.freq)||s.until&&s.count)throw new Error(d);if(s.byweekday){var m=s.byweekday;if(s.freq===i.Frequency.WEEKLY){if(m.some((function(e){return void 0!==e.n})))throw new Error(d)}else{if(s.freq!==i.Frequency.MONTHLY)throw new Error(d);var T=u({date:o,frequency:i.Frequency.MONTHLY});if(m.length>1||(null===(r=m[0])||void 0===r?void 0:r.weekday)!==T.weekday||(null===(t=m[0])||void 0===t?void 0:t.n)!==T.n)throw new Error(d)}}return{interval:s.interval,freq:s.freq,byweekday:s.byweekday,count:s.count,until:s.until}},exports.useWorkHoursValidationRules=function(e,i){void 0===e&&(e=[]);var a=t.useTranslation("Validation").t;if(!i)return{};var u=e.length?e.map((function(e){var r=e.weekday;return i.find((function(e){return e.day===r}))})):i,d=u.map((function(e){return n.DateTime.fromFormat(e.start,r.TIME_FORMAT)})).sort(o.dateTimesSortFn("desc"))[0],l={validate:function(e){return n.DateTime.fromFormat(e,r.TIME_FORMAT)>=d||a("fieldTimeAfter",{attribute:a("Design:startTimeSmall"),time:d.toFormat(r.TIME_FORMAT)})}},f=u.map((function(e){var t=e.start,i=e.end;return n.DateTime.fromFormat(t,r.TIME_FORMAT)<=n.DateTime.fromFormat(i,r.TIME_FORMAT)?i:"23:59"})).map((function(e){return n.DateTime.fromFormat(e,r.TIME_FORMAT)})).sort(o.dateTimesSortFn("asc"))[0];return{startTimeRules:l,endTimeRules:{validate:function(e){return n.DateTime.fromFormat(e,r.TIME_FORMAT)<=f||a("fieldTimeBefore",{attribute:a("Design:endTimeSmall"),time:f.toFormat(r.TIME_FORMAT)})}}}};
|
|
@@ -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;AAO1E,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;AAEF,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.event,x=E.menu,A=E.remainingToPay,h=E.paidAmount,I=(null===(m=T.map((function(e){return e.name})))||void 0===m?void 0:m.join(", "))||"",R=(null==k?void 0:k.name)||(null==x?void 0:x.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),!!A&&t.createElement("p",null,N("remainingAmount"),":"," ",q(A,{style:"currency",currency:r.Currency.GBP})),t.createElement("p",null,N("paidAmount"),":"," ",q(h,{style:"currency",currency:r.Currency.GBP})),t.createElement("p",null,N("source"),": ",N(o.getOrderSourceTitle(b))))))};
|
|
@@ -1,11 +1,12 @@
|
|
|
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";
|
|
4
5
|
export interface CouponFormValues {
|
|
5
6
|
name?: string;
|
|
6
7
|
code: string;
|
|
7
8
|
discountType: CouponType;
|
|
8
|
-
productGroupIds:
|
|
9
|
+
productGroupIds: Array<TypeaheadOptions | ProductGroup>;
|
|
9
10
|
discount: number;
|
|
10
11
|
totalType: CouponTotalType;
|
|
11
12
|
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;AAYjE,OAAO,EAAa,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGjE,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,EAAE,UAAU,CAAC;IACzB,eAAe,EAAE,KAAK,CAAC,gBAAgB,GAAG,YAAY,CAAC,CAAC;IACxD,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,gBAuVjB,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("@licklist/core/dist/DataMapper/Product/CouponDataMapper"),u=e(require("@licklist/plugins/dist/validation/Rules/couponCodeRules"));exports.CouponFormControl=function(e){var
|
|
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("../../../typeahead/Typeahead.js"),s=require("@licklist/core/dist/DataMapper/Product/CouponDataMapper"),u=e(require("@licklist/plugins/dist/validation/Rules/couponCodeRules")),d=require("../utils/index.js");exports.CouponFormControl=function(e){var c,E,p,g,F,v,C,b,_,D=e.isLoading,T=void 0!==D&&D,f=e.productGroups,y=a.useFormContext(),P=y.register,O=y.setValue,x=y.getValues,G=y.formState.errors,R=y.watch,L=r.useTranslation(["Design","Notification","App"]).t,N=t.__read(l.useState([]),2),h=N[0],q=N[1],k=R("startFrom"),A=R("validTill"),w=l.useRef(null),I=l.useRef(null),S=((c={})[s.COUPON_TYPE_FIXED]=L("Design:fixed"),c[s.COUPON_TYPE_FIXED_PER_PERSON]=L("Design:fixedPerPerson"),c[s.COUPON_TYPE_PERCENTAGE]=L("Design:percentage"),c[s.COUPON_TYPE_PERCENTAGE_PER_PERSON]=L("Design:percentagePerPerson"),c),U=((E={})[s.COUPON_TOTAL_TYPE_GROSS]=L("Design:grossTotal"),E[s.COUPON_TOTAL_TYPE_TOTAL]=L("Design:depositTotal"),E);l.useEffect((function(){var e=x("productGroupIds");q(d.convertToTypeaheadOptions(e))}),[x]),l.useEffect((function(){O("productGroupIds",h)}),[x,O,h]);var V=d.convertToTypeaheadOptions(f);return n.createElement(o.Row,null,n.createElement(o.Col,{md:5},n.createElement("h2",{className:"mb-5"},L("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,L("Design:name")),n.createElement(o.Form.Control,t.__assign({isInvalid:void 0!==G.name},P("name",{required:L("Validation:fieldRequired",{attribute:L("Design:name")})}),{disabled:T})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(p=null==G?void 0:G.name)||void 0===p?void 0:p.message))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:couponCode")),n.createElement(o.Form.Control,t.__assign({isInvalid:void 0!==G.code},P("code",{required:L("Validation:fieldRequired",{attribute:L("Design:code")}),pattern:{message:"".concat(L("Validation:fieldCouponCode")),value:u}}),{disabled:T})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(g=null==G?void 0:G.code)||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,L("Design:discountType")),n.createElement(o.Form.Control,t.__assign({},P("discountType",{required:!0}),{as:"select",defaultValue:null!==(F=x("discountType"))&&void 0!==F?F:1,disabled:T}),Object.keys(S).map((function(e){return n.createElement("option",{value:e,key:e},S[e])}))))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:discount")),n.createElement(o.Form.Control,t.__assign({type:"number",isInvalid:void 0!==G.discount},P("discount",{required:L("Validation:fieldRequired",{attribute:L("Design:discount")})}),{disabled:T})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(v=null==G?void 0:G.discount)||void 0===v?void 0:v.message)))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:applyOn")),n.createElement(o.Form.Control,t.__assign({},P("totalType",{required:!0}),{as:"select",defaultValue:null!==(C=x("totalType"))&&void 0!==C?C:1,disabled:T}),Object.keys(U).map((function(e){return n.createElement("option",{value:e,key:e},U[e])}))))))),n.createElement(o.Col,{md:{span:5,offset:1}},n.createElement("h2",{className:"mb-5"},L("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,L("Design:startFrom")),n.createElement(o.Form.Control,t.__assign({type:"date"},P("startFrom"),{value:k,isInvalid:void 0!==G.startFrom,onChange:function(e){var t=i.DateTime.fromSQL(e.target.value).toISODate();O("startFrom",t)},className:k&&"date-input-with-value",ref:w,onClick:function(){var e;return null===(e=null==w?void 0:w.current)||void 0===e?void 0:e.showPicker()},disabled:T})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(b=null==G?void 0:G.startFrom)||void 0===b?void 0:b.message))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:validTill")),n.createElement(o.Form.Control,t.__assign({type:"date"},P("validTill"),{value:A,onChange:function(e){var t=i.DateTime.fromSQL(e.target.value).toISODate();O("validTill",t)},ref:I,className:A&&"date-input-with-value",onClick:function(){var e;return null===(e=null==I?void 0:I.current)||void 0===e?void 0:e.showPicker()},disabled:T}))))),n.createElement(o.Row,null,n.createElement(o.Col,null,n.createElement(o.Form.Group,{className:"mb-3"},n.createElement(o.Form.Label,null,L("Design:productGroups")),n.createElement(m.Typeahead,{name:"productGroupIds",options:V,isMultipleChoise:!0,isCouponForm:!0,placeholder:L("Design:choose"),noOptionsMessage:L("Design:noSelectedProductGroups")})))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:totalCoupons")),n.createElement(o.Form.Control,t.__assign({},P("totalCoupons"),{type:"number",isInvalid:void 0!==G.totalCoupons,disabled:T})),n.createElement(o.Form.Control.Feedback,{type:"invalid"},null===(_=null==G?void 0:G.totalCoupons)||void 0===_?void 0:_.message))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:usesPerUser")),n.createElement(o.Form.Control,t.__assign({type:"number"},P("usesPerUser"),{disabled:T}))))),n.createElement(o.Row,null,n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:useAgain")),n.createElement(o.Form.Control,t.__assign({type:"number"},P("useAgain"),{disabled:T})),n.createElement(o.Form.Text,{className:"text-muted"},L("Design:useAgainExplanation")))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:usesPerUserDay")),n.createElement(o.Form.Control,t.__assign({type:"number"},P("usesPerUserDay"),{disabled:T})),n.createElement(o.Form.Text,{className:"text-muted"},L("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,L("Design:minAmount")),n.createElement(o.Form.Control,t.__assign({type:"number"},P("minAmount"),{disabled:T})),n.createElement(o.Form.Text,{className:"text-muted"},L("Design:minAmountExplanation")))),n.createElement(o.Col,{md:6},n.createElement(o.Form.Group,null,n.createElement(o.Form.Label,null,L("Design:maxAmount")),n.createElement(o.Form.Control,t.__assign({type:"number"},P("maxAmount"),{disabled:T})),n.createElement(o.Form.Text,{className:"text-muted"},L("Design:maxAmountExplanation")))))))};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { ProductGroup } from "@licklist/core/dist/DataMapper/Product/ProductGroupDataMapper";
|
|
2
|
+
import { ProductGroup, ProductGroupDTO } 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: ProductGroupDTO[];
|
|
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,EACL,YAAY,EACZ,eAAe,EAChB,MAAM,+DAA+D,CAAC;AACvE,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,eAAe,EAAE,CAAC;IACnC,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,gBAkCjB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ProductGroup } from "@licklist/core/dist/DataMapper/Product/ProductGroupDataMapper";
|
|
2
|
+
export declare const convertToTypeaheadOptions: (productGroups?: ProductGroup[]) => {
|
|
3
|
+
id: number;
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/sales/coupon/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,+DAA+D,CAAC;AAE7F,eAAO,MAAM,yBAAyB,mBAAoB,YAAY,EAAE;;;;GAUvE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.convertToTypeaheadOptions=function(e){return e&&e.length?e.map((function(e){var t=e.id,r=e.name;return{id:Number(t),value:r,label:r}})):[]};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { HasPermissionProp } from "@licklist/plugins/dist/types/permission/Permission";
|
|
3
|
-
import {
|
|
3
|
+
import { ProvidableType } 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?: ProvidableType;
|
|
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,cAAc,EAAE,MAAM,8DAA8D,CAAC;AAE9F,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,cAAc,CAAC;KAC/B,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,yFAO1B,qBAAqB,gBAwJvB,CAAC"}
|
|
@@ -10,6 +10,7 @@ export type DashboardSettingFormFieldValues = {
|
|
|
10
10
|
isEnquiryOnly: boolean;
|
|
11
11
|
hasUserVerification: boolean;
|
|
12
12
|
metaPixelId?: number;
|
|
13
|
+
eventDeadlineErrorMessage?: string;
|
|
13
14
|
} & EventSettingFormFieldValues & ProviderSettingFormFieldValues;
|
|
14
15
|
export interface DashboardSettingFormProps extends HasPermissionProp {
|
|
15
16
|
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;IACrB,yBAAyB,CAAC,EAAE,MAAM,CAAC;CACpC,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,gBAkN3B,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"),n=e(t),a=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 g,f,h,F=e.isLoading,I=void 0!==F&&F,S=e.defaultValues,q=void 0===S?{}:S,C=e.onSubmit,x=e.hasPermission,P=void 0===x||x,B=e.serverErrors,_=s.useForm({mode:"onChange",defaultValues:r.__assign({},q)}),L=_.register,O=_.handleSubmit,R=_.formState,y=R.errors,V=R.isValid,k=R.isDirty,j=_.setError,D=a.useTranslation(["Design","Validation"]).t;t.useEffect((function(){m.handleServerErrors(B,j)}),[B,j]);var w=u.useId(),G=u.useId(),H=u.useId(),M=u.useId(),N=u.useId(),A=u.useId(),U=[{id:1,value:D("groupItemsByOrder")}];return n.createElement(c,{className:"d-flex flex-column",noValidate:!0,onSubmit:O(C)},n.createElement(s.FormProvider,r.__assign({},_),n.createElement(o,null,n.createElement(l,{xs:12,sm:6},n.createElement(c.Group,{controlId:w},n.createElement(c.Label,null,D("notificationOnEachOrder")," ",n.createElement(E.HelpPopover,{variant:"info"},D("notificationOnEachOrderHelp"))),n.createElement(s.Controller,{render:function(e){var r=e.field,t=r.name,a=r.value,o=r.onChange;return n.createElement(v.BooleanSwitch,{name:t,value:Boolean(a),onChange:d.booleanAsNumber(o),disabled:I})},name:"notificationOnEachOrder",control:_.control})),n.createElement(c.Group,{controlId:G},n.createElement(c.Label,null,D("orderReportOnEventStart")," ",n.createElement(E.HelpPopover,{variant:"info"},D("orderReportOnEventStartHelp"))),n.createElement(s.Controller,{render:function(e){var r=e.field,t=r.name,a=r.value,o=r.onChange;return n.createElement(v.BooleanSwitch,{name:t,value:Boolean(a),onChange:d.booleanAsNumber(o),disabled:I})},name:"orderReportOnEventStart",control:_.control})),n.createElement(c.Group,{controlId:M},n.createElement(c.Label,null,D("hasUserVerification")),n.createElement(s.Controller,{render:function(e){var r=e.field,t=r.name,a=r.value,o=r.onChange;return n.createElement(v.BooleanSwitch,{name:t,value:Boolean(a),onChange:o,disabled:I})},name:"hasUserVerification",control:_.control})),n.createElement(c.Group,{controlId:N},n.createElement(c.Label,null,D("metaPixelId")),n.createElement(c.Control,r.__assign({type:"number"},L("metaPixelId",{minLength:{value:15,message:D("Validation:fieldMinLength",{attribute:D("metaPixelId"),min:15})}}),{isInvalid:Boolean(y.metaPixelId),disabled:I})),n.createElement(c.Control.Feedback,{type:"invalid"},null===(g=y.metaPixelId)||void 0===g?void 0:g.message))),n.createElement(l,{xs:12,sm:6},n.createElement(c.Group,{controlId:H},n.createElement(c.Label,null,D("orderReportFormat")),n.createElement(c.Control,r.__assign({as:"select"},L("orderReportFormat",{required:D("Validation:fieldRequired",{attribute:D("orderReportFormat")}),valueAsNumber:!0}),{name:"orderReportFormat",isInvalid:Boolean(y.orderReportFormat),disabled:I}),U.map((function(e){return n.createElement("option",{value:e.id,key:e.id},e.value)}))),n.createElement(c.Control.Feedback,{type:"invalid"},null===(f=y.orderReportFormat)||void 0===f?void 0:f.message)))),n.createElement(p.EventSettingForm,{isLoading:I}),n.createElement(b.ProviderSettingForm,{isLoading:I}),n.createElement(c.Group,{controlId:A},n.createElement(c.Label,null,D("eventDeadlineErrorMessage")),n.createElement(c.Control,r.__assign({},L("eventDeadlineErrorMessage"),{isInvalid:Boolean(y.eventDeadlineErrorMessage),disabled:I})),n.createElement(c.Control.Feedback,{type:"invalid"},null===(h=y.eventDeadlineErrorMessage)||void 0===h?void 0:h.message))),P&&n.createElement(i.Button,{type:"submit",disabled:I||!V||!k,className:"d-flex align-items-center align-self-end"},I&&n.createElement(i.Spinner,{animation:"border",size:"sm",role:"status","aria-hidden":"true",className:"mr-2"}),D("update")))};
|
|
@@ -47,141 +47,127 @@
|
|
|
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
|
-
}
|
|
100
50
|
.form {
|
|
101
51
|
.input {
|
|
102
52
|
border: 2px solid #525252 !important;
|
|
103
53
|
}
|
|
104
54
|
}
|
|
105
55
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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;
|
|
56
|
+
@include media-breakpoint-down(sm) {
|
|
57
|
+
.left-block-container {
|
|
58
|
+
max-height: 100%;
|
|
59
|
+
overflow: visible;
|
|
118
60
|
}
|
|
119
|
-
.ryft-pay-apple-pay-button {
|
|
120
|
-
border-radius: 0.25rem;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.divider {
|
|
125
|
-
display: none !important;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
@include media-breakpoint-down(sm) {
|
|
129
|
-
.left-block-container {
|
|
130
|
-
max-height: 100%;
|
|
131
|
-
overflow: visible;
|
|
132
61
|
}
|
|
133
62
|
}
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@include media-breakpoint-down(sm) {
|
|
137
|
-
flex-direction: column-reverse;
|
|
138
|
-
overflow: scroll;
|
|
139
63
|
|
|
140
64
|
@include media-breakpoint-down(sm) {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
65
|
+
flex-direction: column-reverse;
|
|
66
|
+
overflow: scroll;
|
|
67
|
+
|
|
68
|
+
@include media-breakpoint-down(sm) {
|
|
69
|
+
.left-block {
|
|
70
|
+
min-height: 100%;
|
|
71
|
+
}
|
|
72
|
+
.right-block {
|
|
73
|
+
margin: 0 auto;
|
|
74
|
+
width: 100%;
|
|
75
|
+
.children-wrapper {
|
|
76
|
+
.accordion {
|
|
77
|
+
.collapse {
|
|
78
|
+
overflow: visible;
|
|
79
|
+
overflow-x: unset;
|
|
80
|
+
scrollbar-width: unset;
|
|
81
|
+
}
|
|
153
82
|
}
|
|
154
83
|
}
|
|
155
84
|
}
|
|
156
85
|
}
|
|
157
86
|
}
|
|
158
87
|
}
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
88
|
+
::-webkit-scrollbar {
|
|
89
|
+
display: none;
|
|
90
|
+
scrollbar-width: none;
|
|
91
|
+
}
|
|
163
92
|
}
|
|
164
93
|
}
|
|
165
94
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
max-width: 100%;
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
95
|
+
#ryft-threeDSMethodIframe {
|
|
96
|
+
display: none;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.ryft-payment-form {
|
|
100
|
+
.submit-button-wrapper {
|
|
101
|
+
margin: -1rem 0 1rem;
|
|
102
|
+
|
|
103
|
+
button {
|
|
104
|
+
width: 100%;
|
|
181
105
|
}
|
|
182
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;
|
|
147
|
+
}
|
|
183
148
|
}
|
|
184
149
|
|
|
185
|
-
|
|
186
|
-
|
|
150
|
+
@include media-breakpoint-up(md) {
|
|
151
|
+
.ryft-payment-form,
|
|
152
|
+
.iframe-payment-form {
|
|
153
|
+
position: relative;
|
|
154
|
+
max-height: 300px !important;
|
|
155
|
+
.submit-button-wrapper {
|
|
156
|
+
max-width: 15.5rem;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
// it's style for Google and Apple pay container, for unknown reasons we can't move this html elements with appendChild or replaceChild
|
|
161
|
+
.ryft-pay-grid {
|
|
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
|
+
}
|
|
187
173
|
}
|
|
@@ -12,7 +12,8 @@ export interface TypeaheadProps {
|
|
|
12
12
|
isMultipleChoise?: boolean;
|
|
13
13
|
noOptionsMessage: string;
|
|
14
14
|
isInvalid?: boolean;
|
|
15
|
+
isCouponForm?: boolean;
|
|
15
16
|
}
|
|
16
|
-
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, noOptionsMessage, isInvalid, }: TypeaheadProps): JSX.Element;
|
|
17
|
+
declare function Typeahead({ options, placeholder, isRequired, isMultipleChoise, name, isCouponForm, noOptionsMessage, isInvalid, }: TypeaheadProps): JSX.Element;
|
|
17
18
|
export { Typeahead };
|
|
18
19
|
//# 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;IACpB,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,iBAAS,SAAS,CAAC,EACjB,OAAO,EACP,WAAW,EACX,UAAkB,EAClB,gBAAgB,EAChB,IAAS,EACT,YAAoB,EACpB,gBAAqB,EACrB,SAAS,GACV,EAAE,cAAc,eA4ChB;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")),o=require("react-hook-form"),t=e(require("react-select"));exports.Typeahead=function(e){var i=e.options,s=e.placeholder,a=e.isRequired,l=void 0!==a&&a,u=e.isMultipleChoise,c=e.name,d=void 0===c?"":c,p=e.isCouponForm,m=void 0!==p&&p,f=e.noOptionsMessage,v=void 0===f?"":f,g=e.isInvalid,_=o.useFormContext().control;return n.createElement(n.Fragment,null,n.createElement(o.Controller,{name:d,control:_,rules:{required:l},render:function(e){var o=e.field;return n.createElement(t,{placeholder:s,value:o.value,isMulti:u,styles:{control:function(e){return r.__assign(r.__assign({},e),(n=m?{borderRadius:"1rem",minHeight:"3rem"}:{},g?r.__assign({borderColor:"red"},n):r.__assign({},n)));var n}},onChange:function(e){o.onChange(e)},options:i,noOptionsMessage:function(){return n.createElement("span",null,v)}})}}))};
|