@wayke-se/components-react 4.0.0-beta.11 → 4.0.0-beta.12
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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +2 -2
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +2 -2
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4823,7 +4823,7 @@ and ensure you are accounting for this risk.
|
|
|
4823
4823
|
}
|
|
4824
4824
|
`,Vg=zr.div.attrs(()=>({className:"wayke__theme wayke__font--bold"}))`
|
|
4825
4825
|
font-size: 1rem;
|
|
4826
|
-
`;import{useTranslation as B4}from"react-i18next";var F4=({title:e,body:t,actionTitle:r,children:i,onClick:n})=>{let{t:o}=B4(),[a,s]=O4(!1),c=L4(()=>s(!a),[a]);return tt.createElement(tt.Fragment,null,tt.createElement($g,null,tt.createElement(qg,null,tt.createElement(Gg,null,tt.createElement(pu,null,tt.createElement(Vg,null,e)),i&&tt.createElement(pu,null,tt.createElement(zg,{onClick:c,title:o("common.moreInformation")||""},tt.createElement(Hr,{block:!0})))),r&&tt.createElement(Ug,null,tt.createElement(me,{onClick:n,title:r},r))),t&&tt.createElement(jg,null,t)),a&&tt.createElement(xe,{title:e,onClose:c},i))},mu=F4;import $t,{useState as R4,useCallback as Qg,useContext as _4}from"react";import{createContext as H4}from"react";var cn=H4({setCentralStorageId:e=>{}});import{useTranslation as $4}from"react-i18next";var q4=({loading:e,connections:t,onClose:r})=>{let{t:i}=$4(),{centralStorageId:n,setCentralStorageId:o}=_4(cn),[a,s]=R4(n),c=Qg(d=>{d&&o(d)},[]),l=Qg(d=>s(d.currentTarget.value),[]);return a?$t.createElement(xe,{title:i("item.switchBranch"),onClose:r},$t.createElement(E,null,$t.createElement(ce,null,$t.createElement(V,null,$t.createElement("p",null,i("item.switchBranchDescription")))),$t.createElement(ce,null,$t.createElement(lo,null,i("item.chooseBranch")),$t.createElement(es,{value:a,onChange:l,options:t?.map(d=>({value:d.id,displayName:d.name})),title:i("item.chooseBranch")}))),$t.createElement(E,null,$t.createElement(Kt,{disabled:e,fullWidth:!0,onClick:()=>c(a),title:i("item.chooseSelectedBranch")||""},$t.createElement(J,null,i("common.choose"))))):null},ls=q4;import ki from"react";import{marked as j4}from"marked";import{useTranslation as G4}from"react-i18next";var U4=({packageOption:e,onClose:t})=>{let{t:r}=G4();return ki.createElement(xe,{title:e.title||"",onClose:t},e.image&&ki.createElement(E,null,ki.createElement(Ue,{logo:e.image,alt:e.title||void 0,wide:!0})),e.description&&ki.createElement(E,null,ki.createElement(V,{dangerouslySetInnerHTML:{__html:j4(e.description)}})),e.link?.
|
|
4826
|
+
`;import{useTranslation as B4}from"react-i18next";var F4=({title:e,body:t,actionTitle:r,children:i,onClick:n})=>{let{t:o}=B4(),[a,s]=O4(!1),c=L4(()=>s(!a),[a]);return tt.createElement(tt.Fragment,null,tt.createElement($g,null,tt.createElement(qg,null,tt.createElement(Gg,null,tt.createElement(pu,null,tt.createElement(Vg,null,e)),i&&tt.createElement(pu,null,tt.createElement(zg,{onClick:c,title:o("common.moreInformation")||""},tt.createElement(Hr,{block:!0})))),r&&tt.createElement(Ug,null,tt.createElement(me,{onClick:n,title:r},r))),t&&tt.createElement(jg,null,t)),a&&tt.createElement(xe,{title:e,onClose:c},i))},mu=F4;import $t,{useState as R4,useCallback as Qg,useContext as _4}from"react";import{createContext as H4}from"react";var cn=H4({setCentralStorageId:e=>{}});import{useTranslation as $4}from"react-i18next";var q4=({loading:e,connections:t,onClose:r})=>{let{t:i}=$4(),{centralStorageId:n,setCentralStorageId:o}=_4(cn),[a,s]=R4(n),c=Qg(d=>{d&&o(d)},[]),l=Qg(d=>s(d.currentTarget.value),[]);return a?$t.createElement(xe,{title:i("item.switchBranch"),onClose:r},$t.createElement(E,null,$t.createElement(ce,null,$t.createElement(V,null,$t.createElement("p",null,i("item.switchBranchDescription")))),$t.createElement(ce,null,$t.createElement(lo,null,i("item.chooseBranch")),$t.createElement(es,{value:a,onChange:l,options:t?.map(d=>({value:d.id,displayName:d.name})),title:i("item.chooseBranch")}))),$t.createElement(E,null,$t.createElement(Kt,{disabled:e,fullWidth:!0,onClick:()=>c(a),title:i("item.chooseSelectedBranch")||""},$t.createElement(J,null,i("common.choose"))))):null},ls=q4;import ki from"react";import{marked as j4}from"marked";import{useTranslation as G4}from"react-i18next";var U4=({packageOption:e,onClose:t})=>{let{t:r}=G4();return ki.createElement(xe,{title:e.title||"",onClose:t},e.image&&ki.createElement(E,null,ki.createElement(Ue,{logo:e.image,alt:e.title||void 0,wide:!0})),e.description&&ki.createElement(E,null,ki.createElement(V,{dangerouslySetInnerHTML:{__html:j4(e.description)}})),e.link?.url&&ki.createElement(E,null,ki.createElement(me,{as:"a",href:e.link.url,target:"_blank",rel:"noopener noreferrer nofollow"},e.link.title?e.link.title:r("item.readMoreInNewTab"))))},Wg=U4;import{format as V4}from"date-fns";import Q4 from"date-fns/locale/sv/index.js";import W4 from"date-fns/locale/nb/index.js";import{useTranslation as J4}from"react-i18next";var Y4=({marketCode:e,manufacturer:t,packageOptions:r,ecommerce:i,branch:n,contact:o,availableFrom:a,toggleEcomModal:s,loadingCentralStorageVehicle:c})=>{let{t:l}=J4(),[d,p]=Jg(!1),g=us(()=>p(!0),[]),y=us(()=>p(!1),[]),[v,f]=Jg(),m=us(x=>f(x),[]),h=us(()=>f(void 0),[]);z4(()=>{(n||o)&&d&&p(!1)},[n,o]);let b=t?.packageOption;return Z.createElement(Z.Fragment,null,d&&Z.createElement(ls,{loading:c,connections:n?.connections,onClose:y}),v&&Z.createElement(Wg,{packageOption:v,onClose:h}),Z.createElement(E,null,i&&i.enabled&&Z.createElement(ce,null,Z.createElement(Kt,{disabled:!!i.reserved,fullWidth:!0,onClick:s},Z.createElement(J,null,l("item.actions.buyOnline")))),i?.reserved&&Z.createElement(ce,null,Z.createElement(mu,{title:l("item.carIsReserved"),body:l("item.carIsReservedDescription")||void 0},Z.createElement(V,null,Z.createElement("p",null,l("item.carIsReservedModalBody"))))),Z.createElement(Ng,{branch:n,contact:o})),Z.createElement(E,null,a&&new Date(a).valueOf()>new Date().valueOf()&&Z.createElement(ce,null,Z.createElement(Og,{$spacing:1,valign:"center"},Z.createElement(os,{noShrink:!0},Z.createElement(Lg,{$tone:"pending"})),Z.createElement(os,null,Z.createElement(ca,null,l("item.availableFromDate",{date:V4(new Date(a),"dd MMMM yyyy",{locale:e==="NO"?W4:Q4})}))))),Z.createElement(ce,null,Z.createElement(_g,null,b?.title&&Z.createElement(cs,null,Z.createElement(Z.Fragment,null,l("item.includingShort")," ",Z.createElement(me,{onClick:()=>m({title:b?.title,image:b?.image,description:b?.description,link:b?.link})},b.title)," ",l("item.usedWarrany").toLowerCase())),r?.map((x,T)=>Z.createElement(cs,{key:x.title||T},Z.createElement(Z.Fragment,null,l("item.includingShort")," ",Z.createElement(me,{onClick:()=>m({title:x?.title,image:x?.image,description:x?.description,link:x?.link})},x.title)))),i?.withHomeDelivery&&Z.createElement(cs,null,l("item.homeDelivery"))))),(n?.connections.length||0)>1&&Z.createElement(E,null,Z.createElement(mu,{title:l("item.centralWarehouseCar"),actionTitle:l("item.switchBranch")||"",onClick:g},Z.createElement(V,null,Z.createElement("p",null,l("item.centralWarehouseCarDescription"))))))},Yg=Y4;import Nt,{useCallback as aC}from"react";import{useTranslation as sC}from"react-i18next";import ho from"react";import hu from"styled-components";var Zg=hu.div`
|
|
4827
4827
|
display: flex;
|
|
4828
4828
|
align-items: center;
|
|
4829
4829
|
`,Kg=hu.div`
|