@heycater/qualification-funnel 1.19.5 → 1.19.6
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/dist/heycater-funnel.iife.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +2 -2
- package/package.json +1 -1
|
@@ -877,7 +877,7 @@
|
|
|
877
877
|
${({theme:e})=>e.breakpoints.up("md")} {
|
|
878
878
|
max-width: 320px;
|
|
879
879
|
}
|
|
880
|
-
`;function sP(){var e,t;const
|
|
880
|
+
`;function sP(){var e,t,n;const r=_E(),{answerOf:o,actions:i,state:a}=KO(),{trackAnswer:s}=dj(),l=o("event_date"),u=l?new Date(l):void 0,c=function(e,t){if(h_(2,arguments),!t||"object"!==he(t))return new Date(NaN);var n=t.years?p_(t.years):0,r=t.months?p_(t.months):0,o=t.weeks?p_(t.weeks):0,i=t.days?p_(t.days):0,a=t.hours?p_(t.hours):0,s=t.minutes?p_(t.minutes):0,l=t.seconds?p_(t.seconds):0,u=m_(e),c=r||n?v_(u,r+12*n):u,d=i||o?g_(c,i+7*o):c,f=1e3*(l+60*(s+60*a));return new Date(d.getTime()+f)}(new Date,{days:2}),d="qualification"in a?UL.getAttributes({answers:a.qualification.answers,selectedCaterer:a.qualification.selectedCaterer}):null,f=(null==(e=r.locale)?void 0:e.startsWith("en"))?null==(t=null==d?void 0:d.minDate)?void 0:t.messageEn:null==(n=null==d?void 0:d.minDate)?void 0:n.messageDe,[p]=g.useState(!!o(VL.id));g.useEffect(()=>{l&&i.answerQuestion("has_recurring_need",p)},[p]);const[h,m]=g.useState(u||c);return C.jsx(nP,{dateSelector:C.jsxs(pP,{children:[C.jsx(hP,{children:C.jsx(tP,{components:{Caption:uP,Row:cP,Day:lP},formatters:{formatWeekdayName:(e,t)=>TL(e,"EEEEE",{locale:null==t?void 0:t.locale})},month:h,onDayClick:e=>{i.answerQuestion("event_date",e),s("event_date",TL(e,"yyyy-MM-dd"))},selected:u,fromDate:c,onMonthChange:m,captionLayout:"buttons",locale:r.locale?hM[r.locale]:void 0,showOutsideDays:!0,mode:"single"})}),f&&C.jsx(Fm,{textAlign:"center",mt:2,children:C.jsxs(fP,{children:["*",f]})})]}),sideContent:C.jsx(oP,{})})}function lP(e){const{outside:t}=DT(e.date,e.displayMonth),n=$j();return t&&function(e){return h_(1,arguments),1===m_(e).getDate()}(e.date)?C.jsxs(Fm,{position:"relative",children:[C.jsx(Fm,{position:"absolute",top:"-3px",left:"-3px",children:C.jsx(Qm,{fontSize:9,children:TL(e.date,"MMM",{locale:n.locale})})}),C.jsx(qT,{...e})]}):C.jsx(qT,{...e})}function uP(e){const{goToMonth:t,nextMonth:n,previousMonth:r}=Yj(),o=$j();return C.jsxs(Fm,{display:"flex",justifyContent:"space-between",alignItems:"center",py:1.5,children:[C.jsx(dP,{id:"datepicker__prev-month",type:"button",disabled:!r,onClick:()=>r&&t(r),children:C.jsx(Qj,{})}),C.jsx(Qm,{fontSize:15,fontWeight:600,children:TL(e.displayMonth,"MMMM yyyy",{locale:o.locale})}),C.jsx(dP,{id:"datepicker__next-month",type:"button",disabled:!n,onClick:()=>n&&t(n),children:C.jsx(Jj,{})})]})}function cP(e){const t=new Date;if(FL(t,e.displayMonth)){const n=RL(e.displayMonth),r=RL(t)-n,o=e.dates.map(e=>__(e,r));return o.some(t=>FL(t,e.displayMonth))?C.jsx(UT,{...e,weekNumber:e.weekNumber+r,dates:o}):C.jsx(C.Fragment,{})}return C.jsx(UT,{...e})}const dP=_p.button`
|
|
881
881
|
background-color: transparent;
|
|
882
882
|
border: none;
|
|
883
883
|
cursor: pointer;
|
package/dist/index.cjs.js
CHANGED
|
@@ -726,7 +726,7 @@
|
|
|
726
726
|
${({theme:e})=>e.breakpoints.up("md")} {
|
|
727
727
|
max-width: 320px;
|
|
728
728
|
}
|
|
729
|
-
`;function lh(){var e,r;const
|
|
729
|
+
`;function lh(){var e,r,i;const o=du(),{answerOf:a,actions:s,state:l}=xf(),{trackAnswer:c}=$p(),d=a("event_date"),f=d?new Date(d):void 0,p=rc(new Date,{days:2}),h="qualification"in l?gd.getAttributes({answers:l.qualification.answers,selectedCaterer:l.qualification.selectedCaterer}):null,m=(null==(e=o.locale)?void 0:e.startsWith("en"))?null==(r=null==h?void 0:h.minDate)?void 0:r.messageEn:null==(i=null==h?void 0:h.minDate)?void 0:i.messageDe,[g]=n.useState(!!a(md.id));n.useEffect(()=>{d&&s.answerQuestion("has_recurring_need",g)},[g]);const[y,b]=n.useState(f||p);return t.jsx(rh,{dateSelector:t.jsxs(hh,{children:[t.jsx(mh,{children:t.jsx(u.DayPicker,{components:{Caption:ch,Row:dh,Day:uh},formatters:{formatWeekdayName:(e,t)=>rd(e,"EEEEE",{locale:null==t?void 0:t.locale})},month:y,onDayClick:e=>{s.answerQuestion("event_date",e),c("event_date",rd(e,"yyyy-MM-dd"))},selected:f,fromDate:p,onMonthChange:b,captionLayout:"buttons",locale:o.locale?qf[o.locale]:void 0,showOutsideDays:!0,mode:"single"})}),m&&t.jsx(v,{textAlign:"center",mt:2,children:t.jsxs(ph,{children:["*",m]})})]}),sideContent:t.jsx(oh,{})})}function uh(e){const{outside:n}=u.useActiveModifiers(e.date,e.displayMonth),r=u.useDayPicker();return n&&function(e){return ec(1,arguments),1===tc(e).getDate()}(e.date)?t.jsxs(v,{position:"relative",children:[t.jsx(v,{position:"absolute",top:"-3px",left:"-3px",children:t.jsx(D,{fontSize:9,children:rd(e.date,"MMM",{locale:r.locale})})}),t.jsx(u.Day,{...e})]}):t.jsx(u.Day,{...e})}function ch(e){const{goToMonth:n,nextMonth:r,previousMonth:i}=u.useNavigation(),o=u.useDayPicker();return t.jsxs(v,{display:"flex",justifyContent:"space-between",alignItems:"center",py:1.5,children:[t.jsx(fh,{id:"datepicker__prev-month",type:"button",disabled:!i,onClick:()=>i&&n(i),children:t.jsx(u.IconLeft,{})}),t.jsx(D,{fontSize:15,fontWeight:600,children:rd(e.displayMonth,"MMMM yyyy",{locale:o.locale})}),t.jsx(fh,{id:"datepicker__next-month",type:"button",disabled:!r,onClick:()=>r&&n(r),children:t.jsx(u.IconRight,{})})]})}function dh(e){const n=new Date;if(pd(n,e.displayMonth)){const r=od(e.displayMonth),i=od(n)-r,o=e.dates.map(e=>function(e,t){return ec(2,arguments),nc(e,7*Xu(t))}(e,i));return o.some(t=>pd(t,e.displayMonth))?t.jsx(u.Row,{...e,weekNumber:e.weekNumber+i,dates:o}):t.jsx(t.Fragment,{})}return t.jsx(u.Row,{...e})}const fh=o.button`
|
|
730
730
|
background-color: transparent;
|
|
731
731
|
border: none;
|
|
732
732
|
cursor: pointer;
|
package/dist/index.esm.js
CHANGED
|
@@ -10849,7 +10849,7 @@ const SwitchesWrapper = styled.div`
|
|
|
10849
10849
|
`;
|
|
10850
10850
|
const defaultLeadTimeInDays = DEFAULT_LEAD_DAYS;
|
|
10851
10851
|
function DatePickerEmbedded() {
|
|
10852
|
-
var _a2, _b;
|
|
10852
|
+
var _a2, _b, _c;
|
|
10853
10853
|
const router = useRouter();
|
|
10854
10854
|
const { answerOf, actions, state } = useQualification();
|
|
10855
10855
|
const { trackAnswer } = useTracking();
|
|
@@ -10863,7 +10863,7 @@ function DatePickerEmbedded() {
|
|
|
10863
10863
|
answers: state.qualification.answers,
|
|
10864
10864
|
selectedCaterer: state.qualification.selectedCaterer
|
|
10865
10865
|
}) : null;
|
|
10866
|
-
const minDateMessage = router.locale
|
|
10866
|
+
const minDateMessage = ((_a2 = router.locale) == null ? void 0 : _a2.startsWith("en")) ? (_b = attributes == null ? void 0 : attributes.minDate) == null ? void 0 : _b.messageEn : (_c = attributes == null ? void 0 : attributes.minDate) == null ? void 0 : _c.messageDe;
|
|
10867
10867
|
const [isRecurringNeedSelected] = useState(
|
|
10868
10868
|
!!answerOf(isRecurringQuestion.id)
|
|
10869
10869
|
);
|