@bikdotai/bik-component-library 0.0.657-9 → 0.0.657-beta.0
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/cjs/assets/icons/bik_livechat.svg.js +1 -0
- package/dist/cjs/components/avatar/Avatar.d.ts +3 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +0 -1
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/product.js +1 -1
- package/dist/cjs/components/product-picker-v2/productInfoOverlay.js +7 -7
- package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/style.d.ts +0 -6
- package/dist/cjs/components/product-picker-v2/style.js +16 -33
- package/dist/esm/assets/icons/bik_livechat.svg.js +1 -0
- package/dist/esm/components/avatar/Avatar.d.ts +3 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +0 -1
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/product.js +1 -1
- package/dist/esm/components/product-picker-v2/productInfoOverlay.js +7 -7
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/style.d.ts +0 -6
- package/dist/esm/components/product-picker-v2/style.js +13 -30
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var c=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,c.get?c:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r,c,a=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var c in r)Object.prototype.hasOwnProperty.call(r,c)&&(e[c]=r[c])}return e},n.apply(this,arguments)}var l=e=>a.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 54 54"},e),t||(t=a.createElement("path",{fill:"url(#bik_livechat_svg__a)",d:"M53.368 27a26.368 26.368 0 0 1-39.571 22.827l-10.27 3.425a2.198 2.198 0 0 1-2.78-2.78l3.425-10.27A26.369 26.369 0 1 1 53.368 27Z"})),r||(r=a.createElement("path",{fill:"#fff",d:"M36.983 32.943c-.31 0-.553-.08-.725-.241-.161-.173-.242-.415-.242-.725V21.739c0-.31.08-.546.242-.707.172-.173.414-.26.725-.26h6.301c.242 0 .426.064.552.19.127.116.19.288.19.518 0 .242-.063.426-.19.553-.126.127-.31.19-.552.19h-5.541v3.815h5.161c.253 0 .438.063.553.19.126.127.19.305.19.535 0 .242-.064.426-.19.552-.115.116-.3.173-.553.173h-5.162v4.005h5.542c.242 0 .426.064.552.19.127.127.19.305.19.535 0 .242-.063.426-.19.553-.126.115-.31.172-.552.172h-6.301ZM28.555 33.064c-.253 0-.466-.057-.639-.172a1.37 1.37 0 0 1-.397-.553l-4.644-10.513c-.092-.242-.115-.45-.069-.622a.664.664 0 0 1 .276-.397.917.917 0 0 1 .535-.155c.265 0 .467.057.605.172.138.115.253.288.345.518l4.35 10.082h-.638l4.315-10.099c.104-.219.225-.386.363-.5.15-.116.351-.173.604-.173.207 0 .374.052.5.155a.597.597 0 0 1 .26.397c.034.173 0 .38-.104.622l-4.626 10.513a1.37 1.37 0 0 1-.397.553c-.162.115-.374.172-.64.172ZM20.206 33.064c-.287 0-.512-.08-.673-.242-.15-.16-.224-.385-.224-.673V21.567c0-.3.075-.524.224-.674.161-.16.386-.241.673-.241.288 0 .507.08.657.241.16.15.241.374.241.674v10.582c0 .288-.075.512-.224.673-.15.162-.374.242-.674.242ZM10.699 32.943c-.288 0-.512-.08-.674-.241-.16-.161-.241-.386-.241-.674v-10.41c0-.299.074-.523.224-.673.161-.16.386-.241.673-.241.288 0 .507.08.656.241.162.15.242.374.242.674v9.788h5.352c.253 0 .449.069.587.207.138.127.207.31.207.552 0 .242-.07.432-.207.57-.138.138-.334.207-.587.207h-6.232Z"})),c||(c=a.createElement("defs",null,a.createElement("linearGradient",{id:"bik_livechat_svg__a",x1:27,x2:27,y1:.637,y2:53.371,gradientUnits:"userSpaceOnUse"},a.createElement("stop",{stopColor:"#B143FF"}),a.createElement("stop",{offset:1,stopColor:"#6532FF"})))));exports.default=l;
|
|
@@ -28,6 +28,7 @@ export type AvatarProps = {
|
|
|
28
28
|
isSelected: boolean;
|
|
29
29
|
isComments: boolean;
|
|
30
30
|
};
|
|
31
|
+
status?: 'ONLINE' | 'OFFLINE' | 'AWAY';
|
|
31
32
|
};
|
|
32
33
|
export declare const enum MESSAGE_CHANNELS {
|
|
33
34
|
INSTAGRAM = "instagram",
|
|
@@ -41,6 +42,7 @@ export declare const enum MESSAGE_CHANNELS {
|
|
|
41
42
|
EMAIL = "email",
|
|
42
43
|
SMTP = "smtp",
|
|
43
44
|
FACEBOOK_CATALOG = "facebook-catalog",
|
|
44
|
-
TASKS = "tasks"
|
|
45
|
+
TASKS = "tasks",
|
|
46
|
+
BIK_LIVECHAT = "livechat"
|
|
45
47
|
}
|
|
46
48
|
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("./Avatar.styled.js"),i=require("./AvatarHelper.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("react"),t=require("./Avatar.styled.js"),i=require("./AvatarHelper.js"),r=require("../TypographyStyle.js"),a=require("../../constants/Theme.js"),o=require("../../assets/icons/bik_livechat.svg.js"),n=require("../../assets/icons/CheckSquareOffset.svg.js"),A=require("../../assets/icons/email-channel.svg.js"),S=require("../../assets/icons/facebook_channel.svg.js"),c=require("../../assets/icons/gmail.svg.js"),l=require("../../assets/icons/instagram-channel.svg.js"),E=require("../../assets/icons/whatsapp_color.svg.js");const d={[i.SIZE.SMALL]:16,[i.SIZE.MEDIUM]:20,[i.SIZE.INBOX]:24,[i.SIZE.LARGE]:32},u={[i.AVATAR_BACKGROUND.LIGHT]:a.COLORS.content.secondary,[i.AVATAR_BACKGROUND.DARK]:a.COLORS.surface.standard};var h;exports.MESSAGE_CHANNELS=void 0,(h=exports.MESSAGE_CHANNELS||(exports.MESSAGE_CHANNELS={})).INSTAGRAM="instagram",h.MESSENGER="messenger",h.WHATSAPP="whatsapp",h.GMAIL="gmail",h.LIVECHAT="livechat",h.GOOGLE_BUSINESS_CHAT="gbm",h.SHOPIFY="shopify",h.FACEBOOK="facebook",h.EMAIL="email",h.SMTP="smtp",h.FACEBOOK_CATALOG="facebook-catalog",h.TASKS="tasks",h.BIK_LIVECHAT="livechat";exports.AVATAR_SIZE_VS_ICON_SIZE_MAP=d,exports.Avatar=h=>{const[p,g]=s.useState(!1),x=()=>{const s=(h.name||"").split(".").join(" ").split(" ").map((e=>e.charAt(0).toUpperCase())).slice(0,2).join("");return h.size===i.SIZE.SMALL?e.jsx(r.BodyTiny,Object.assign({style:{color:u[h.background]}},{children:s})):h.size===i.SIZE.MEDIUM||h.size===i.SIZE.INBOX?e.jsx(r.TitleSmall,Object.assign({style:{color:u[h.background]}},{children:s})):h.size===i.SIZE.LARGE?e.jsx(r.TitleMedium,Object.assign({style:{color:u[h.background]}},{children:s})):void 0};return e.jsxs("div",Object.assign({style:{position:"relative"}},{children:[e.jsxs(t.AvatarStyle,Object.assign({type:h.type===i.AVATAR_TYPES.IMAGE&&p&&h.useNameFallback&&h.name?i.AVATAR_TYPES.INITIALS:h.type,size:h.size,background:h.background},{children:[h.type===i.AVATAR_TYPES.IMAGE&&(h.useNameFallback&&!p?e.jsx("img",{alt:"",width:i.AVATAR_SIZE_MAP[h.size],height:i.AVATAR_SIZE_MAP[h.size],style:{borderRadius:(null==h?void 0:h.borderRadius)||"50%",objectFit:"contain"},src:h.photoUrl,onError:()=>{g(!0)}}):h.useNameFallback&&p&&h.name?e.jsx("div",{children:x()}):e.jsx("img",{alt:"",width:i.AVATAR_SIZE_MAP[h.size],height:i.AVATAR_SIZE_MAP[h.size],style:{borderRadius:(null==h?void 0:h.borderRadius)||"50%",objectFit:"contain"},src:h.photoUrl})),h.type===i.AVATAR_TYPES.INITIALS&&e.jsx("div",{children:x()}),h.type===i.AVATAR_TYPES.ICON&&h.icon&&e.jsx(h.icon,{width:d[h.size],height:d[h.size],color:u[h.background]})]})),h.inboxSettings&&e.jsx("div",Object.assign({style:{position:"absolute",left:d[h.size]+"px",top:d[h.size]+"px",width:14,height:14,borderRadius:(null==h?void 0:h.borderRadius)||"50%",display:"flex",justifyContent:"center",backgroundColor:h.inboxSettings.isSelected?h.inboxSettings.isComments?a.COLORS.content.primary:a.COLORS.background.brandLight:h.inboxSettings.isComments?a.COLORS.content.primary:a.COLORS.surface.standard,alignItems:"center"}},{children:(()=>{switch(h.channelName){case exports.MESSAGE_CHANNELS.EMAIL:case exports.MESSAGE_CHANNELS.SMTP:return e.jsx(A.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.FACEBOOK:case exports.MESSAGE_CHANNELS.FACEBOOK_CATALOG:case exports.MESSAGE_CHANNELS.MESSENGER:return e.jsx(S.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.INSTAGRAM:return e.jsx(l.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.WHATSAPP:return e.jsx(E.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.GMAIL:return e.jsx(c.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.TASKS:return e.jsx(n.default,{width:11,height:11});case exports.MESSAGE_CHANNELS.BIK_LIVECHAT:return e.jsx(o.default,{width:11,height:11})}})()})),h.status&&e.jsx("div",Object.assign({style:{position:"absolute",left:d[h.size]+"px",top:d[h.size]+"px",width:11,height:11,borderRadius:"50%",display:"flex",justifyContent:"center",backgroundColor:a.COLORS.surface.standard,alignItems:"center"}},{children:(console.log("props.status",h.status),h.status?e.jsx("div",{style:{backgroundColor:"ONLINE"===h.status?a.COLORS.special.whatsapp.brand:a.COLORS.content.inactive,width:"8px",height:"8px",borderRadius:"50%"}}):null)}))]}))},exports.BACKGROUND_VS_TEXT_COLOR_MAP=u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react/jsx-runtime"),o=require("../../assets/icons/search.svg.js"),c=require("react"),r=require("../../constants/Theme.js"),s=require("../../assets/icons/cross.svg.js"),n=require("../button/Button.js"),i=require("../input/Input.js"),l=require("../modals/styledModal.js"),a=require("../spinner/Spinner.js"),d=require("../tag/Tag.js"),u=require("./collectionScreen.js"),h=require("./productInfoOverlay.js"),p=require("./productScreen.js"),S=require("./rearrangeScreen.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,t=require("react/jsx-runtime"),o=require("../../assets/icons/search.svg.js"),c=require("react"),r=require("../../constants/Theme.js"),s=require("../../assets/icons/cross.svg.js"),n=require("../button/Button.js"),i=require("../input/Input.js"),l=require("../modals/styledModal.js"),a=require("../spinner/Spinner.js"),d=require("../tag/Tag.js"),u=require("./collectionScreen.js"),h=require("./productInfoOverlay.js"),p=require("./productScreen.js"),S=require("./rearrangeScreen.js"),C=require("./reducers.js"),x=require("./searchScreen.js"),g=require("./selectedScreen.js"),j=require("./style.js"),y=require("./type.js"),m=require("./utility.js");exports.ScreenName=void 0,(e=exports.ScreenName||(exports.ScreenName={})).Collections="collections",e.RearrangeProducts="rearrange",e.SelectedProducts="view",e.SearchProducts="searchProducts",e.Products="products";exports.ProductPickerModal=e=>{const{storeId:b,selectedItems:f,onClose:v,visible:k,zIndex:I,exactLimit:P,limit:O,hideCollectionCheckbox:F,hideProductCheckbox:R,outOfStockAction:T=y.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:D,selectProductsFromCustomCollection:q,hideSelectionCount:N,title:E,width:A,left:w,renderWithoutModal:B,onClickSave:L,pickerType:M,hideProductVariants:V=!1,startupScreen:z=exports.ScreenName.Collections,rearrangeEnabled:$,selectSingleItem:_=!1,showProductDetails:H,containerStyle:W,crossButtonInsideHeader:G=!1,footerForNonModal:K={},primaryButton:U,secondaryButton:Y,subtitle:J}=e,[Q,X]=c.useReducer(C.collectionsReducer,{}),[Z,ee]=c.useState([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(z)?z:exports.ScreenName.Collections),[te,oe]=c.useState("grid"),[ce,re]=c.useState(""),[se,ne]=c.useState(""),[ie,le]=c.useState(0),[ae,de]=c.useState(!1),[ue,he]=c.useState(0),[pe,Se]=c.useState(""),[Ce,xe]=c.useState(!1),[ge,je]=c.useState(!1),[ye,me]=c.useReducer(C.searchReducer,{collections:{},products:{}}),[be,fe]=c.useReducer(C.selectedColectionsReducer,Object.keys(f).length>0?f:{}),ve=c.useRef(null),[ke,Ie]=c.useState(!1),[Pe,Oe]=c.useState();c.useEffect((()=>{de(!0),je(!0),e.collectionFetcher(ie,b).then((e=>{X({type:"fetched",data:(null==e?void 0:e.collections)||{}}),de(!1),le((e=>e+1)),je(!1)})).catch()}),[]),c.useEffect((()=>{let e=0;V?Object.keys(be||[]).forEach((t=>{var o;Object.keys((null===(o=be[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&be[-1]&&(null===(c=be[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(be||[]).forEach((t=>{var o;Object.keys((null===(o=be[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=be[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),he(e)}),[Q,be,V]),c.useEffect((()=>{se&&(de(!0),e.productFetcher(se,b).then((e=>{Object.keys(e).length&&X({type:"productsFetched",data:{collectionId:se,products:e}}),de(!1)})).catch())}),[se]),c.useEffect((()=>{const t=setTimeout((()=>{"rearrange"!==Z&&(pe.length||"collections"!==Z)&&(pe.length?(xe(!0),e.searchFetcher(b,pe).then((e=>{"collections"in e&&"products"in e?(me({type:"set",data:e}),X({type:"searched",data:e.collections})):(me({type:"set",data:{collections:{},products:e}}),X({type:"searched",data:e})),ee("searchProducts"),de(!1),xe(!1)}))):ee("collections"))}),800);return()=>clearTimeout(t)}),[pe]),c.useEffect((()=>{L&&(e.onAdd(be,ue),Fe())}),[L]),c.useEffect((()=>{_&&Object.keys(be||{}).length&&ue&&(e.onAdd(be,ue),Fe())}),[_,be,ue]);const Fe=()=>{fe({type:"reset",data:{}})},Re=()=>P&&ue>P?t.jsx(d.Tag,{tagText:`You can only select ${P} products`,type:"negative"}):O&&ue>O?t.jsx(d.Tag,{tagText:`You can only select ${O} products`,type:"negative"}):ue>0?t.jsx(n.Button,{onClick:()=>{ee($?exports.ScreenName.RearrangeProducts:exports.ScreenName.SelectedProducts)},buttonText:P?`${ue}/${P} products selected`:`${ue} products selected`,buttonType:["rearrange","view"].includes(Z)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(Z)}):t.jsx(n.Button,{disabled:!0,buttonText:P?`${ue}/${P} products selected`:`${ue} products selected`,buttonType:"tertiaryGray"}),Te=e=>ae?"Loading...":Z===exports.ScreenName.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",De=t.jsxs(j.ContainerStyle,Object.assign({style:null!=W?W:{}},{children:[e.postHeader&&t.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:e.postHeader})),!e.hideGlobalSearch&&t.jsx(t.Fragment,{children:("collections"===Z||"searchProducts"===Z)&&t.jsx("div",Object.assign({style:{padding:B?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:t.jsx(i.Input,{placeholder:"Search for collections and products, or type a product ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Ce?t.jsx(a.Spinner,{size:"small",color:r.COLORS.content.primary}):t.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:pe,onChangeText:e=>{e.length&&e.trim().length?Se(e):Se("")}})}))}),t.jsxs(j.ScrollContainerStyle,Object.assign({ref:ve,screenName:Z},{children:["collections"===Z&&t.jsx(u.CollectionsScreen,{customCollectionRestriction:e.customCollectionRestriction,dataLoading:ge,collections:Q,selectedCollectionsDispatch:fe,setCollectionId:re,setSelectedCollectionId:ne,setScreen:ee,selectedCollections:be,collectionFetcher:e.collectionFetcher,storeId:b,collectionsDispatch:X,setSaveDisabled:de,pagingControls:{curPage:ie,setCurPage:le},hideCollectionCheckbox:F,renderWithoutModal:B,pickerType:M,scrollContainerRef:ve}),"products"===Z&&ce&&t.jsx(C.CollectionIdContext.Provider,Object.assign({value:ce},{children:t.jsx(p.ProductsScreen,{hideInCollectionSearch:e.hideInCollectionSearch,customCollectionRestriction:e.customCollectionRestriction,productFetcher:e.productFetcher,setScreen:ee,storeId:b,data:Q[ce],collectionsDispatch:X,selectedCollectionsDispatch:fe,selectedData:be,setSaveDisabled:de,searchInCollectionFetcher:e.searchInCollectionFetcher,hideProductCheckbox:R,outOfStockAction:T,hideVariantCheckbox:D,selectProductsFromCustomCollection:q,renderWithoutModal:B,pickerType:M,hideProductVariants:V,fbStatusFetcher:e.fbStatusFetcher,onProductDetailClick:e=>{Ie(!0),Oe(e)},showProductDetailInfoIcon:H,scrollContainerRef:ve})})),"view"===Z&&t.jsx(g.SelectedScreen,{selectedCollections:be||{},selectedCollectionsDispatch:fe,setScreen:ee,collections:Q,hideProductVariants:V,outOfStockAction:T,storeId:b,fbStatusFetcher:e.fbStatusFetcher}),"rearrange"===Z&&t.jsx(S.RearrangeScreen,{selectedCollections:be||{},selectedCollectionsDispatch:fe,setScreen:ee,outOfStockAction:T,rearrangeViewType:"grid"===te?"list":"grid",scrollContainerRef:ve,storeId:b,fbStatusFetcher:e.fbStatusFetcher}),"searchProducts"===Z&&t.jsx(x.SearchScreen,{customCollectionRestriction:e.customCollectionRestriction,selectedCollections:be||{},searchedCollections:ye||{},searchedCollectionsDispatch:me,selectedCollectionsDispatch:fe,setScreen:ee,collections:Q,onBackPress:()=>{Se(""),me({type:"set",data:{collections:{},products:{}}})},pickerType:M,hideProductCheckbox:R,hideProductVariants:V,hideVariantCheckbox:D,storeId:b,fbStatusFetcher:e.fbStatusFetcher,setCollectionId:re,setSelectedCollectionId:ne,renderWithoutModal:B,hideCollectionCheckbox:F,outOfStockAction:T})]}))]}));return t.jsx(t.Fragment,{children:B?t.jsxs(t.Fragment,{children:[De,K.renderFooter?t.jsxs(j.StyledFooterForNonModal,{children:[Re(),t.jsx(n.Button,{buttonText:Te(K.primaryButtonText),disabled:!K.isLoading&&(ae||ue<1||P&&ue<P||!P&&O&&ue>O)||K.primaryButtonDisabled,isLoading:K.isLoading,onClick:()=>{e.onAdd(be,ue),Fe(),ee([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(z)?z:exports.ScreenName.Collections)}})]}):t.jsx(t.Fragment,{}),ke&&Pe?t.jsx(h.ProductInfoOverlay,{productData:Pe,outOfStockAction:T,useDynamicInfoImageSize:e.useDynamicInfoImageSize,onClose:()=>{Ie(!1)}}):t.jsx(t.Fragment,{})]}):t.jsxs(l.StyledModal,Object.assign({zIndex:I,open:k,onClose:()=>{null==v||v(),Fe()},headingTitle:E||("collections"===Z||"products"===Z?"Select Products":"view"===Z?"Selected Products":"searchProducts"===Z?"Searched Results":"rearrange"===Z?"Rearrange Products":void 0),headingSubtitle:J,footerShadow:!0,centralContainerStyles:{width:A||"600px",left:w||"auto"},headerRightCustomElement:G?t.jsx("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:v},{children:t.jsx(s.default,{width:20,height:20,color:r.COLORS.content.secondary})})):t.jsx(t.Fragment,{}),footerContainerStyle:e.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:r.COLORS.surface.standard}:void 0,primaryButton:U?(t=>Object.assign(Object.assign({},t),{disabled:!t.isLoading&&(ae||ue<1||P&&ue<P||!P&&O&&ue>O)||t.disabled,onClick:()=>{e.onAdd(be,ue),Fe(),ee([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(z)?z:exports.ScreenName.Collections)}}))(U):{buttonText:Te(),disabled:ae||ue<1||P&&ue<P||!P&&O&&ue>O||!1,onClick:()=>{e.onAdd(be,ue),Fe()}},secondaryButton:Y?(t=>Object.assign(Object.assign({},t),{disabled:ae||ue<1||P&&ue<P||!P&&O&&ue>O||!1,onClick:()=>{const t=m.updateAllVariantsForSelectedProducts(be,Q,ye);e.onAdd(t,ue,!0)}}))(Y):void 0,wrapperStyle:e.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:N?t.jsx(t.Fragment,{}):Re(),hideCrossButton:ke||G},{children:[De,ke&&Pe?t.jsx(h.ProductInfoOverlay,{productData:Pe,useDynamicInfoImageSize:e.useDynamicInfoImageSize,outOfStockAction:T,onClose:()=>{Ie(!1)}}):t.jsx(t.Fragment,{})]}))})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../constants/Theme.js"),i=require("../../assets/icons/info.svg.js"),o=require("../checkBox/CheckBox.js"),c=require("../icon-button/IconButton.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../constants/Theme.js"),i=require("../../assets/icons/info.svg.js"),o=require("../checkBox/CheckBox.js"),c=require("../icon-button/IconButton.js"),r=require("../shimmer-image/ShimmerImage.js"),d=require("../tooltips/Tooltip.js"),n=require("../TypographyStyle.js"),l=require("./constants.js"),a=require("./helpers/ProductHelper.js"),s=require("./ProductPickerTag.js"),u=require("./style.js"),v=require("./utility.js");const p=l=>{const{isVariant:v,data:p,productId:h,collectionId:y,variantId:I,isSelected:P,selectedCollectionsDispatch:j,viewOnly:x,upliftAdditions:k,isPartiallyChecked:C,hideProductCheckbox:g,outOfStockAction:b,hideVariantCheckbox:O,hideProductVariants:m,pickerType:f="PRODUCT",onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:D}=l,{isVariantForProductPickerTag:V,dataForProductPickerTag:q,tagText:w,tagType:A}=a.ProductHelper.getDataForProductPickerTag(p,v,b);return e.jsxs(u.ProductCardStyle,Object.assign({isVariant:v,onClick:e=>{if(e.stopPropagation(),"PRODUCT"===f&&(g||O)){const e=Object.keys(p.variants);m?P?j({type:"productUnselected",data:{productId:h,collectionId:y}}):k("productSelected",{productId:h,variantId:I,collectionId:y,product:p}):P?j({type:"variantUnselected",data:{productId:h,variantId:I,collectionId:y}}):k("variantSelected",{productId:h,variantId:I||e[0],collectionId:y,variant:p})}},isActive:P},{children:[v&&!x&&!O||!v&&!x&&!g?e.jsx(o.CheckBox,{isChecked:P,isPartiallyChecked:C||!1,onValueChange:function(e,t,i){null==i||i.stopPropagation(),v?e?k(m?"productSelected":"variantSelected",{productId:h,variantId:I,collectionId:y,variant:p}):j({type:m?"productUnselected":"variantUnselected",data:{productId:h,variantId:I,collectionId:y}}):e?k("productSelected",{productId:h,collectionId:y,product:p}):j({type:"productUnselected",data:{productId:h,collectionId:y}})}}):e.jsx(e.Fragment,{}),e.jsx("div",{children:e.jsx(r.ShimmerImage,{width:40,height:40,imageUrl:p.image,alt:"Item",borderRadius:4})}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[e.jsx(d.Tooltip,Object.assign({variant:"light",body:p.name,placement:"bottom",delay:400},{children:e.jsx(n.TitleSmall,Object.assign({numberOfLines:1},{children:p.name}))})),T&&e.jsx(c.IconButton,{onClick:()=>{null==S||S(p)},Icon:()=>e.jsx(i.default,{width:20,height:20,color:t.COLORS.content.placeholder})})]})),e.jsx(s.ProductPickerTag,{isVariant:V,data:q,tagText:w,tagType:A}),e.jsx(n.BodyCaption,Object.assign({color:t.COLORS.content.secondary},{children:!(null==q?void 0:q.fbStatus)&&V||w?null:D}))]}))]}))};exports.ProductCard=p,exports.ProductGroup=t=>{var i,o,c,r,d,n,a,s,u;const{collectionId:h,productId:y,data:I,selectedData:P,selectedCollectionsDispatch:j,viewOnly:x,upliftAdditions:k,isProductPartiallyChecked:C,hideProductCheckbox:g,outOfStockAction:b,hideVariantCheckbox:O,hideProductVariants:m,pickerType:f,onProductDetailClick:S,showProductDetailInfoIcon:T}=t,D=e=>{var t,i,o,c,r,d;if(!(null===(i=null===(t=null==P?void 0:P[h])||void 0===t?void 0:t.products)||void 0===i?void 0:i[y]))return!1;return!!(null===(d=null===(r=null===(c=null===(o=null==P?void 0:P[h])||void 0===o?void 0:o.products)||void 0===c?void 0:c[y])||void 0===r?void 0:r.variants)||void 0===d?void 0:d[e])},V=m||!v.shouldShowVariant(I)?`${I.currency&&null!==(i=l.CurrencySymbols[I.currency])&&void 0!==i?i:""}${null!==(u=null!==(d=null===(r=null===(c=Object.values(null!==(o=I.variants)&&void 0!==o?o:{}))||void 0===c?void 0:c[0])||void 0===r?void 0:r.price)&&void 0!==d?d:null===(s=null===(a=Object.values(null!==(n=I.variants)&&void 0!==n?n:{}))||void 0===a?void 0:a[0])||void 0===s?void 0:s.actualPrice)&&void 0!==u?u:""}`:"";return e.jsxs("div",{children:[e.jsx(p,{isVariant:!1,data:I,productId:y,collectionId:h,isSelected:(()=>{var e,t;return!!(null===(t=null===(e=null==P?void 0:P[h])||void 0===e?void 0:e.products)||void 0===t?void 0:t[y])})(),isPartiallyChecked:C,selectedCollectionsDispatch:j,upliftAdditions:k,viewOnly:x,hideProductCheckbox:g,hideVariantCheckbox:O,hideProductVariants:m,pickerType:f,outOfStockAction:b,onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:V},y),m?null:v.shouldShowVariant(I)&&Object.keys(I.variants||[]).map((t=>{var i,o,c,r,d,n,a;const s=`${I.currency&&null!==(i=l.CurrencySymbols[I.currency])&&void 0!==i?i:""}${null!==(a=null!==(r=null===(c=null===(o=I.variants)||void 0===o?void 0:o[t])||void 0===c?void 0:c.price)&&void 0!==r?r:null===(n=null===(d=I.variants)||void 0===d?void 0:d[t])||void 0===n?void 0:n.actualPrice)&&void 0!==a?a:""}`;return e.jsx(p,{isVariant:!0,hideVariantCheckbox:O,data:Object.assign(Object.assign({},I.variants[t]),{currency:I.currency}),variantId:t,productId:y,viewOnly:x,upliftAdditions:k,collectionId:h,isSelected:D(t),selectedCollectionsDispatch:j,outOfStockAction:b,onProductDetailClick:S,showProductDetailInfoIcon:T,currencyAndPrice:s},t)}))]})};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),o=require("../../constants/Theme.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("styled-components"),o=require("../../constants/Theme.js"),r=require("../../assets/icons/cross.svg.js"),i=require("../icon-button/IconButton.js"),a=require("../shimmer-image/ShimmerImage.js"),n=require("../TypographyStyle.js"),d=require("./constants.js"),c=require("./helpers/ProductHelper.js"),l=require("./ProductPickerTag.js"),u=require("./utility.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=s(t);const x=t=>{var r,i,s,p,x,v,g,f,h,b,D,P,I,S,O,k;const T=void 0===t.productData.variants;let q;if(T)q=`${t.productData.currency&&null!==(r=d.CurrencySymbols[t.productData.currency])&&void 0!==r?r:""}${null!==(x=null!==(s=null===(i=t.productData)||void 0===i?void 0:i.price)&&void 0!==s?s:null===(p=t.productData)||void 0===p?void 0:p.actualPrice)&&void 0!==x?x:""}`;else{const e=null===(v=t.productData)||void 0===v?void 0:v.currency;q=`${e&&null!==(g=d.CurrencySymbols[e])&&void 0!==g?g:""}${null!==(O=null!==(D=null===(b=null===(h=Object.values(null!==(f=t.productData.variants)&&void 0!==f?f:{}))||void 0===h?void 0:h[0])||void 0===b?void 0:b.price)&&void 0!==D?D:null===(S=null===(I=Object.values(null!==(P=t.productData.variants)&&void 0!==P?P:{}))||void 0===I?void 0:I[0])||void 0===S?void 0:S.actualPrice)&&void 0!==O?O:""}`}const{isVariantForProductPickerTag:C,dataForProductPickerTag:w,tagText:$,tagType:z}=c.ProductHelper.getDataForProductPickerTag(t.productData,T,t.outOfStockAction);return e.jsxs(m,{children:[e.jsx(y,{children:e.jsx(a.ShimmerImage,{useDynamicInfoImageSize:t.useDynamicInfoImageSize,imageUrl:t.productData.image,width:200,height:200,borderRadius:4})}),e.jsxs(j,{children:[e.jsx(n.TitleRegular,Object.assign({style:{display:"flex"}},{children:t.productData.name})),e.jsx(n.BodyCaption,Object.assign({color:o.COLORS.content.secondary},{children:`Product ID: ${t.productData.id}`})),e.jsx(n.BodyCaption,{className:"overlay-description",dangerouslySetInnerHTML:{__html:null!==(k=t.productData.description)&&void 0!==k?k:""}}),e.jsx(n.BodyCaption,Object.assign({color:o.COLORS.content.secondary},{children:T?q:u.shouldShowVariant(t.productData)?null:q})),e.jsx(l.ProductPickerTag,{isVariant:C,data:w,tagText:$,tagType:z})]})]})},v=p.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1;
|
|
4
4
|
background: rgba(0, 0, 0, 0.5);
|
|
@@ -17,11 +17,11 @@
|
|
|
17
17
|
word-break: break-word;
|
|
18
18
|
margin-top: 8px;
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,g=p.default.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
flex: 1;
|
|
23
23
|
background: rgba(0, 0, 0, 0.5);
|
|
24
|
-
`,f=
|
|
24
|
+
`,f=p.default.div`
|
|
25
25
|
position: relative;
|
|
26
26
|
|
|
27
27
|
.close-button {
|
|
@@ -32,21 +32,21 @@
|
|
|
32
32
|
background: ${o.COLORS.surface.standard};
|
|
33
33
|
border-radius: 50%;
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`,m=p.default.div`
|
|
36
36
|
display: flex;
|
|
37
37
|
background: white;
|
|
38
38
|
padding: 24px;
|
|
39
39
|
gap: 24px;
|
|
40
40
|
border-radius: 8px 8px 0px 0px;
|
|
41
|
-
`,
|
|
41
|
+
`,y=p.default.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
max-width: min(50%, 200px);
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
justify-content: center;
|
|
46
46
|
align-items: center;
|
|
47
|
-
`,
|
|
47
|
+
`,j=p.default.div`
|
|
48
48
|
display: flex;
|
|
49
49
|
flex: 1;
|
|
50
50
|
flex-direction: column;
|
|
51
51
|
gap: 4px;
|
|
52
|
-
`;exports.ProductInfoCard=
|
|
52
|
+
`;exports.ProductInfoCard=x,exports.ProductInfoOverlay=t=>e.jsxs(v,{children:[e.jsx(g,{}),e.jsx(f,{children:e.jsx(i.IconButton,{className:"close-button",onClick:t.onClose,Icon:r.default,width:20,height:20})}),e.jsx(x,{productData:t.productData,outOfStockAction:t.outOfStockAction,useDynamicInfoImageSize:t.useDynamicInfoImageSize})]});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),r=require("../../assets/icons/box.svg.js"),o=require("../../assets/icons/search.svg.js"),c=require("lodash"),s=require("react"),n=require("../../constants/Theme.js"),i=require("../checkBox/CheckBox.js"),l=require("../icon-button/IconButton.js"),d=require("../InfiniteScroll/InfiniteScroll.js"),u=require("../input/Input.js"),a=require("../spinner/Spinner.js"),h=require("../TypographyStyle.js"),p=require("./emptyState.js"),j=require("./product.js"),v=require("./ProductPickerShimmer.js"),g=require("./reducers.js"),y=require("./style.js"),O=require("./type.js"),b=require("./utility.js");exports.ProductsScreen=f=>{var k,C;const{data:P,collectionsDispatch:x,selectedData:S,selectedCollectionsDispatch:I,productFetcher:m,storeId:q,setScreen:A,setSaveDisabled:D,hideInCollectionSearch:E,customCollectionRestriction:T,hideProductCheckbox:R,outOfStockAction:V=O.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:L=!1,selectProductsFromCustomCollection:F=!1,pickerType:w,hideProductVariants:B,fbStatusFetcher:_,onProductDetailClick:M,showProductDetailInfoIcon:U,scrollContainerRef:H}=f,J=s.useContext(g.CollectionIdContext),K=s.useRef(0),N=s.useRef(!1),[W,z]=s.useState(""),[G,Q]=s.useState(!1),[X,Y]=s.useState(P),Z=s.useRef(!0),$=s.useRef(!1);s.useEffect((()=>{if(Z.current)return void(Z.current=!1);const e=setTimeout((()=>{W.length?(Q(!0),f.searchInCollectionFetcher(q,J,W).then((e=>{const t=c.cloneDeep(P);t.products=e,Y(t);const r=b.getVariantIdsToFetchAtProductLevel(null!=e?e:{});te(r,null!=e?e:{},!0),D(!1),Q(!1)}))):Y(P)}),800);return()=>clearTimeout(e)}),[W]);s.useEffect((()=>{var e,t,r,o;$.current=!1,K.current=Math.floor((null===(t=Object.keys(null!==(e=P.products)&&void 0!==e?e:{}))||void 0===t?void 0:t.length)/10);const c=b.getVariantIdsToFetchAtProductLevel(null!==(r=P.products)&&void 0!==r?r:{});te(c,null!==(o=P.products)&&void 0!==o?o:{})}),[J]);const ee=!!T&&P.isSmartCollection;s.useEffect((()=>{(null==P?void 0:P.products)||re(10)}),[]);const te=(e,t,r)=>{_||(r?b.markVariantsAsApprovedProductsLevel(t,x,J,X,Y):b.markVariantsAsApprovedProductsLevel(t,x,J)),e.length>0&&_&&_(q,e).then((e=>{const o=Object.assign({},t);Object.keys(t).forEach((r=>{var c,s;Object.keys(null!==(s=null===(c=null==t?void 0:t[r])||void 0===c?void 0:c.variants)&&void 0!==s?s:{}).forEach((c=>{var s,n;const i=null===(s=null==t?void 0:t[r].variants)||void 0===s?void 0:s[c];i&&"REJECTED"===e[c]?i.fbStatus="REJECTED":i&&"APPROVED"===e[c]&&(i.fbStatus="APPROVED");const l=null===(n=null==o?void 0:o[r])||void 0===n?void 0:n.variants;l&&l[c]&&(l[c]=i)}))})),r?(Y((e=>{const t=Object.assign({},e);return t.products=o,t})),x({type:"productsPaged",data:{collectionId:J,products:o}})):x({type:"productsPaged",data:{collectionId:J,products:o}})})).catch((e=>{r?b.markVariantsAsApprovedProductsLevel(t,x,J,X,Y):b.markVariantsAsApprovedProductsLevel(t,x,J)}))},re=e=>{D(!0),Q(!0),m(J,q,e,0).then((t=>{if(Object.keys(t).length||($.current=!0),Object.keys(t).length){Y(Object.assign(Object.assign({},X),{products:t}));const e=b.getVariantIdsToFetchAtProductLevel(t);te(e,t),K.current=1}e||I({type:"selected",data:{id:J,val:Object.assign(Object.assign({},P),{products:t})}}),D(!1),Q(!1)})).catch()},oe=(e,t)=>{const r=b.liftTheStateUp(t,P);I({type:e,data:Object.assign(Object.assign({},r),{isRestricted:T})})},ce=!!(null==S?void 0:S[J])&&!!Object.keys(null!==(C=null===(k=null==S?void 0:S[J])||void 0===k?void 0:k.products)&&void 0!==C?C:{}).length;return e.jsxs("div",{children:[e.jsxs(y.ProductScreenHeader,{children:[e.jsx(l.IconButton,{Icon:t.default,height:16,onClick:()=>{A("collections")}}),e.jsx(h.BodyCaption,Object.assign({style:{color:n.COLORS.content.secondary}},{children:P.name}))]}),!E&&e.jsx("div",Object.assign({style:{padding:16,height:"76px",borderBottom:"1px solid #E0E0E0"}},{children:e.jsx(u.Input,{noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>G&&W.length?e.jsx(a.Spinner,{size:"small",color:n.COLORS.content.primary}):e.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:W,onChangeText:e=>{e.length&&e.trim().length?z(e):z("")},placeholder:"Search for a product or type a product ID"})})),Object.keys((null==X?void 0:X.products)||[]).length>0&&!ee&&!W.length&&!R&&"-1"!==J&&e.jsxs(y.ProductScreenCollectionCardStyle,{children:[e.jsx(i.CheckBox,{isChecked:ce,isPartiallyChecked:b.isCollectionPartiallyChecked(J,X,S,B),onValueChange:function(e){e?re():I({type:"unselected",data:{id:J}})}}),e.jsx("div",Object.assign({style:{width:40,height:40}},{children:e.jsx(r.default,{})})),e.jsx(h.TitleRegular,{children:"All Products"})]}),e.jsx(d.InfiniteScroll,Object.assign({hasData:!(Object.keys((null==X?void 0:X.products)||[]).length<10)&&!!Object.keys((null==X?void 0:X.products)||[]).length,fetchMore:()=>(N.current=!0,m(J,q,10,K.current).then((e=>{let t=!1;if(Object.keys(e).length||(t=!0),Object.keys(e).length){const t=X;t.products=Object.assign(Object.assign({},X.products),e),Y(Object.assign({},t));const r=b.getVariantIdsToFetchAtProductLevel(e);te(r,e)}return D(!1),N.current=!1,K.current+=1,t}))),containerRef:H},{children:Object.keys((null==X?void 0:X.products)||[]).length?Object.keys(X.products||[]).map((t=>e.jsx(j.ProductGroup,{outOfStockAction:V,collectionId:J,isProductPartiallyChecked:b.isProductPartiallyChecked(J,t,S,X,B),productId:t,data:X.products[t],selectedData:S,selectedCollectionsDispatch:I,viewOnly:!F&&!!ee,upliftAdditions:oe,hideProductCheckbox:R,hideVariantCheckbox:L,hideProductVariants:B,pickerType:w,onProductDetailClick:M,showProductDetailInfoIcon:U},t))):G?e.jsx(v.ProductPickerShimmer,{limit:10}):e.jsx(p.EmptyState,{title:"No products to show",subtitle:W.length?"We couldn't find the product you were looking for":"We couldn’t find any product in this collection."})}))]})};
|
|
@@ -23,9 +23,3 @@ export declare const VariantCardListStyle: import("styled-components").StyledCom
|
|
|
23
23
|
export declare const VariantCardGridStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
24
24
|
export declare const StyledHeaderRightIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
25
|
export declare const StyledFooterForNonModal: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
26
|
-
export declare const SKUIDBadge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
27
|
-
export declare const EllipsedBodyTiny: import("styled-components").StyledComponent<"div", any, {
|
|
28
|
-
numberOfLines?: number | undefined;
|
|
29
|
-
color?: string | undefined;
|
|
30
|
-
}, never>;
|
|
31
|
-
export declare const ProductSubTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js"),i=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js"),i=require("./modal.js");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var r=o(e);const n=r.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
background-color: white;
|
|
4
4
|
height: ${e=>e.renderWithoutModal?"90%":"75vh"};
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
`,
|
|
6
|
+
`,l=r.default.div`
|
|
7
7
|
overflow-y: scroll;
|
|
8
8
|
overflow-x: hidden;
|
|
9
9
|
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
::-webkit-scrollbar-thumb {
|
|
16
|
-
background-color: ${e=>e.screenName!==
|
|
16
|
+
background-color: ${e=>e.screenName!==i.ScreenName.RearrangeProducts?"#888":"#fff"};
|
|
17
17
|
border-radius: 8px;
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,d=r.default.div`
|
|
20
20
|
height: 64px;
|
|
21
21
|
background-color: ${e=>e.isDisabled?"#F0F0F0":e.isActive?t.COLORS.background.positive.light:"white"};
|
|
22
22
|
border-bottom: 1px solid #e0e0e0;
|
|
@@ -30,17 +30,17 @@
|
|
|
30
30
|
cursor: pointer;
|
|
31
31
|
background-color: ${t.COLORS.surface.hovered};
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`,a=r.default.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: row;
|
|
36
36
|
justify-content: center;
|
|
37
37
|
align-items: center;
|
|
38
38
|
column-gap: 18px;
|
|
39
|
-
`,
|
|
39
|
+
`,p=r.default.div`
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-direction: column;
|
|
42
42
|
justify-content: center;
|
|
43
|
-
`,
|
|
43
|
+
`,c=r.default.div`
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: row;
|
|
46
46
|
max-height: 32px;
|
|
@@ -53,14 +53,14 @@
|
|
|
53
53
|
position: sticky;
|
|
54
54
|
top: 0;
|
|
55
55
|
z-index: 10;
|
|
56
|
-
`,
|
|
56
|
+
`,s=r.default.div`
|
|
57
57
|
display: flex;
|
|
58
58
|
flex-direction: row;
|
|
59
59
|
column-gap: 16px;
|
|
60
60
|
padding: 12px 16px;
|
|
61
61
|
border-bottom: 1px solid #e0e0e0;
|
|
62
62
|
align-items: center;
|
|
63
|
-
`,
|
|
63
|
+
`,x=r.default.div`
|
|
64
64
|
min-height: 64px;
|
|
65
65
|
background-color: ${e=>e.isActive?t.COLORS.background.positive.light:"white"};
|
|
66
66
|
border-bottom: 1px solid #e0e0e0;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
cursor: pointer;
|
|
76
76
|
background-color: ${t.COLORS.surface.hovered};
|
|
77
77
|
}
|
|
78
|
-
`,
|
|
78
|
+
`,u=r.default.div`
|
|
79
79
|
display: flex;
|
|
80
80
|
flex-direction: row;
|
|
81
81
|
max-height: 32px;
|
|
@@ -87,10 +87,10 @@
|
|
|
87
87
|
position: sticky;
|
|
88
88
|
top: 0;
|
|
89
89
|
z-index: 10;
|
|
90
|
-
`,
|
|
90
|
+
`,f=r.default.div`
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
|
-
`,
|
|
93
|
+
`,g=r.default.div`
|
|
94
94
|
min-height: 72px;
|
|
95
95
|
background: white;
|
|
96
96
|
padding: 12px 16px;
|
|
@@ -111,14 +111,14 @@
|
|
|
111
111
|
flex-direction: column;
|
|
112
112
|
gap: 2px;
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,y=r.default.div`
|
|
115
115
|
height: 72px;
|
|
116
116
|
width: 72px;
|
|
117
117
|
display: flex;
|
|
118
118
|
align-items: center;
|
|
119
119
|
justify-content: center;
|
|
120
120
|
margin: 16px;
|
|
121
|
-
`;
|
|
121
|
+
`;r.default.div`
|
|
122
122
|
display: flex;
|
|
123
123
|
width: 32px;
|
|
124
124
|
height: 32px;
|
|
@@ -127,28 +127,11 @@
|
|
|
127
127
|
align-items: center;
|
|
128
128
|
border: 1px solid ${t.COLORS.stroke.primary};
|
|
129
129
|
border-radius: 4px;
|
|
130
|
-
`;const
|
|
130
|
+
`;const h=r.default.div`
|
|
131
131
|
padding: 16px 24px;
|
|
132
132
|
display: flex;
|
|
133
133
|
align-items: center;
|
|
134
134
|
justify-content: space-between;
|
|
135
135
|
margin-top: auto;
|
|
136
136
|
width: 100%;
|
|
137
|
-
|
|
138
|
-
width: fit-content;
|
|
139
|
-
background: ${t.COLORS.background.brandLight};
|
|
140
|
-
padding: 2px 6px;
|
|
141
|
-
border-radius: 14px;
|
|
142
|
-
`,v=d.default(i.BodyTiny)`
|
|
143
|
-
white-space: nowrap;
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
text-overflow: ellipsis;
|
|
146
|
-
max-width: 196px;
|
|
147
|
-
display: block;
|
|
148
|
-
color: ${t.COLORS.background.inverseLight};
|
|
149
|
-
`,w=d.default.div`
|
|
150
|
-
display: flex;
|
|
151
|
-
flex-direction: row;
|
|
152
|
-
align-items: center;
|
|
153
|
-
gap: 5px;
|
|
154
|
-
`;exports.CollectionCardDetailStyle=c,exports.CollectionCardInfoStyle=p,exports.CollectionCardStyle=a,exports.CollectionNameHolder=g,exports.ContainerStyle=l,exports.EllipsedBodyTiny=v,exports.ProductCardStyle=u,exports.ProductScreenCollectionCardStyle=x,exports.ProductScreenHeader=s,exports.ProductSubTitle=w,exports.SKUIDBadge=m,exports.ScrollContainerStyle=n,exports.SelectedScreenHeader=f,exports.StyledFooterForNonModal=b,exports.VariantCardGridStyle=h,exports.VariantCardListStyle=y;
|
|
137
|
+
`;exports.CollectionCardDetailStyle=p,exports.CollectionCardInfoStyle=a,exports.CollectionCardStyle=d,exports.CollectionNameHolder=f,exports.ContainerStyle=n,exports.ProductCardStyle=x,exports.ProductScreenCollectionCardStyle=s,exports.ProductScreenHeader=c,exports.ScrollContainerStyle=l,exports.SelectedScreenHeader=u,exports.StyledFooterForNonModal=h,exports.VariantCardGridStyle=y,exports.VariantCardListStyle=g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import*as e from"react";var t,a,c;function l(){return l=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(e[c]=a[c])}return e},l.apply(this,arguments)}var r=r=>e.createElement("svg",l({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 54 54"},r),t||(t=e.createElement("path",{fill:"url(#bik_livechat_svg__a)",d:"M53.368 27a26.368 26.368 0 0 1-39.571 22.827l-10.27 3.425a2.198 2.198 0 0 1-2.78-2.78l3.425-10.27A26.369 26.369 0 1 1 53.368 27Z"})),a||(a=e.createElement("path",{fill:"#fff",d:"M36.983 32.943c-.31 0-.553-.08-.725-.241-.161-.173-.242-.415-.242-.725V21.739c0-.31.08-.546.242-.707.172-.173.414-.26.725-.26h6.301c.242 0 .426.064.552.19.127.116.19.288.19.518 0 .242-.063.426-.19.553-.126.127-.31.19-.552.19h-5.541v3.815h5.161c.253 0 .438.063.553.19.126.127.19.305.19.535 0 .242-.064.426-.19.552-.115.116-.3.173-.553.173h-5.162v4.005h5.542c.242 0 .426.064.552.19.127.127.19.305.19.535 0 .242-.063.426-.19.553-.126.115-.31.172-.552.172h-6.301ZM28.555 33.064c-.253 0-.466-.057-.639-.172a1.37 1.37 0 0 1-.397-.553l-4.644-10.513c-.092-.242-.115-.45-.069-.622a.664.664 0 0 1 .276-.397.917.917 0 0 1 .535-.155c.265 0 .467.057.605.172.138.115.253.288.345.518l4.35 10.082h-.638l4.315-10.099c.104-.219.225-.386.363-.5.15-.116.351-.173.604-.173.207 0 .374.052.5.155a.597.597 0 0 1 .26.397c.034.173 0 .38-.104.622l-4.626 10.513a1.37 1.37 0 0 1-.397.553c-.162.115-.374.172-.64.172ZM20.206 33.064c-.287 0-.512-.08-.673-.242-.15-.16-.224-.385-.224-.673V21.567c0-.3.075-.524.224-.674.161-.16.386-.241.673-.241.288 0 .507.08.657.241.16.15.241.374.241.674v10.582c0 .288-.075.512-.224.673-.15.162-.374.242-.674.242ZM10.699 32.943c-.288 0-.512-.08-.674-.241-.16-.161-.241-.386-.241-.674v-10.41c0-.299.074-.523.224-.673.161-.16.386-.241.673-.241.288 0 .507.08.656.241.162.15.242.374.242.674v9.788h5.352c.253 0 .449.069.587.207.138.127.207.31.207.552 0 .242-.07.432-.207.57-.138.138-.334.207-.587.207h-6.232Z"})),c||(c=e.createElement("defs",null,e.createElement("linearGradient",{id:"bik_livechat_svg__a",x1:27,x2:27,y1:.637,y2:53.371,gradientUnits:"userSpaceOnUse"},e.createElement("stop",{stopColor:"#B143FF"}),e.createElement("stop",{offset:1,stopColor:"#6532FF"})))));export{r as default};
|
|
@@ -28,6 +28,7 @@ export type AvatarProps = {
|
|
|
28
28
|
isSelected: boolean;
|
|
29
29
|
isComments: boolean;
|
|
30
30
|
};
|
|
31
|
+
status?: 'ONLINE' | 'OFFLINE' | 'AWAY';
|
|
31
32
|
};
|
|
32
33
|
export declare const enum MESSAGE_CHANNELS {
|
|
33
34
|
INSTAGRAM = "instagram",
|
|
@@ -41,6 +42,7 @@ export declare const enum MESSAGE_CHANNELS {
|
|
|
41
42
|
EMAIL = "email",
|
|
42
43
|
SMTP = "smtp",
|
|
43
44
|
FACEBOOK_CATALOG = "facebook-catalog",
|
|
44
|
-
TASKS = "tasks"
|
|
45
|
+
TASKS = "tasks",
|
|
46
|
+
BIK_LIVECHAT = "livechat"
|
|
45
47
|
}
|
|
46
48
|
export declare const Avatar: React.FC<AvatarProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{AvatarStyle as i}from"./Avatar.styled.js";import{SIZE as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useState as s}from"react";import{AvatarStyle as i}from"./Avatar.styled.js";import{SIZE as o,AVATAR_BACKGROUND as r,AVATAR_TYPES as a,AVATAR_SIZE_MAP as n}from"./AvatarHelper.js";import{BodyTiny as c,TitleSmall as l,TitleMedium as d}from"../TypographyStyle.js";import{COLORS as h}from"../../constants/Theme.js";import p from"../../assets/icons/bik_livechat.svg.js";import g from"../../assets/icons/CheckSquareOffset.svg.js";import m from"../../assets/icons/email-channel.svg.js";import u from"../../assets/icons/facebook_channel.svg.js";import b from"../../assets/icons/gmail.svg.js";import A from"../../assets/icons/instagram-channel.svg.js";import I from"../../assets/icons/whatsapp_color.svg.js";const f={[o.SMALL]:16,[o.MEDIUM]:20,[o.INBOX]:24,[o.LARGE]:32},S={[r.LIGHT]:h.content.secondary,[r.DARK]:h.surface.standard};var y;!function(e){e.INSTAGRAM="instagram",e.MESSENGER="messenger",e.WHATSAPP="whatsapp",e.GMAIL="gmail",e.LIVECHAT="livechat",e.GOOGLE_BUSINESS_CHAT="gbm",e.SHOPIFY="shopify",e.FACEBOOK="facebook",e.EMAIL="email",e.SMTP="smtp",e.FACEBOOK_CATALOG="facebook-catalog",e.TASKS="tasks",e.BIK_LIVECHAT="livechat"}(y||(y={}));const j=r=>{const[j,v]=s(!1),E=()=>{const e=(r.name||"").split(".").join(" ").split(" ").map((e=>e.charAt(0).toUpperCase())).slice(0,2).join("");return r.size===o.SMALL?t(c,Object.assign({style:{color:S[r.background]}},{children:e})):r.size===o.MEDIUM||r.size===o.INBOX?t(l,Object.assign({style:{color:S[r.background]}},{children:e})):r.size===o.LARGE?t(d,Object.assign({style:{color:S[r.background]}},{children:e})):void 0};return e("div",Object.assign({style:{position:"relative"}},{children:[e(i,Object.assign({type:r.type===a.IMAGE&&j&&r.useNameFallback&&r.name?a.INITIALS:r.type,size:r.size,background:r.background},{children:[r.type===a.IMAGE&&(r.useNameFallback&&!j?t("img",{alt:"",width:n[r.size],height:n[r.size],style:{borderRadius:(null==r?void 0:r.borderRadius)||"50%",objectFit:"contain"},src:r.photoUrl,onError:()=>{v(!0)}}):r.useNameFallback&&j&&r.name?t("div",{children:E()}):t("img",{alt:"",width:n[r.size],height:n[r.size],style:{borderRadius:(null==r?void 0:r.borderRadius)||"50%",objectFit:"contain"},src:r.photoUrl})),r.type===a.INITIALS&&t("div",{children:E()}),r.type===a.ICON&&r.icon&&t(r.icon,{width:f[r.size],height:f[r.size],color:S[r.background]})]})),r.inboxSettings&&t("div",Object.assign({style:{position:"absolute",left:f[r.size]+"px",top:f[r.size]+"px",width:14,height:14,borderRadius:(null==r?void 0:r.borderRadius)||"50%",display:"flex",justifyContent:"center",backgroundColor:r.inboxSettings.isSelected?r.inboxSettings.isComments?h.content.primary:h.background.brandLight:r.inboxSettings.isComments?h.content.primary:h.surface.standard,alignItems:"center"}},{children:(()=>{switch(r.channelName){case y.EMAIL:case y.SMTP:return t(m,{width:11,height:11});case y.FACEBOOK:case y.FACEBOOK_CATALOG:case y.MESSENGER:return t(u,{width:11,height:11});case y.INSTAGRAM:return t(A,{width:11,height:11});case y.WHATSAPP:return t(I,{width:11,height:11});case y.GMAIL:return t(b,{width:11,height:11});case y.TASKS:return t(g,{width:11,height:11});case y.BIK_LIVECHAT:return t(p,{width:11,height:11})}})()})),r.status&&t("div",Object.assign({style:{position:"absolute",left:f[r.size]+"px",top:f[r.size]+"px",width:11,height:11,borderRadius:"50%",display:"flex",justifyContent:"center",backgroundColor:h.surface.standard,alignItems:"center"}},{children:(console.log("props.status",r.status),r.status?t("div",{style:{backgroundColor:"ONLINE"===r.status?h.special.whatsapp.brand:h.content.inactive,width:"8px",height:"8px",borderRadius:"50%"}}):null)}))]}))};export{f as AVATAR_SIZE_VS_ICON_SIZE_MAP,j as Avatar,S as BACKGROUND_VS_TEXT_COLOR_MAP,y as MESSAGE_CHANNELS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import c from"../../assets/icons/search.svg.js";import{useReducer as r,useState as s,useRef as i,useEffect as n}from"react";import{COLORS as l}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as a}from"../button/Button.js";import{Input as u}from"../input/Input.js";import{StyledModal as h}from"../modals/styledModal.js";import{Spinner as p}from"../spinner/Spinner.js";import{Tag as m}from"../tag/Tag.js";import{CollectionsScreen as
|
|
1
|
+
import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import c from"../../assets/icons/search.svg.js";import{useReducer as r,useState as s,useRef as i,useEffect as n}from"react";import{COLORS as l}from"../../constants/Theme.js";import d from"../../assets/icons/cross.svg.js";import{Button as a}from"../button/Button.js";import{Input as u}from"../input/Input.js";import{StyledModal as h}from"../modals/styledModal.js";import{Spinner as p}from"../spinner/Spinner.js";import{Tag as m}from"../tag/Tag.js";import{CollectionsScreen as C}from"./collectionScreen.js";import{ProductInfoOverlay as g}from"./productInfoOverlay.js";import{ProductsScreen as f}from"./productScreen.js";import{RearrangeScreen as y}from"./rearrangeScreen.js";import{collectionsReducer as b,searchReducer as S,selectedColectionsReducer as v,CollectionIdContext as k}from"./reducers.js";import{SearchScreen as j}from"./searchScreen.js";import{SelectedScreen as I}from"./selectedScreen.js";import{ContainerStyle as x,ScrollContainerStyle as P,StyledFooterForNonModal as O}from"./style.js";import{OUT_OF_STOCK_ACTION as D}from"./type.js";import{updateAllVariantsForSelectedProducts as F}from"./utility.js";var T;!function(e){e.Collections="collections",e.RearrangeProducts="rearrange",e.SelectedProducts="view",e.SearchProducts="searchProducts",e.Products="products"}(T||(T={}));const R=R=>{const{storeId:w,selectedItems:A,onClose:B,visible:E,zIndex:L,exactLimit:z,limit:V,hideCollectionCheckbox:$,hideProductCheckbox:M,outOfStockAction:H=D.BLUR,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,hideSelectionCount:N,title:Y,width:K,left:U,renderWithoutModal:q,onClickSave:J,pickerType:Q,hideProductVariants:X=!1,startupScreen:Z=T.Collections,rearrangeEnabled:_,selectSingleItem:ee=!1,showProductDetails:te,containerStyle:oe,crossButtonInsideHeader:ce=!1,footerForNonModal:re={},primaryButton:se,secondaryButton:ie,subtitle:ne}=R,[le,de]=r(b,{}),[ae,ue]=s([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections),[he,pe]=s("grid"),[me,Ce]=s(""),[ge,fe]=s(""),[ye,be]=s(0),[Se,ve]=s(!1),[ke,je]=s(0),[Ie,xe]=s(""),[Pe,Oe]=s(!1),[De,Fe]=s(!1),[Te,Re]=r(S,{collections:{},products:{}}),[we,Ae]=r(v,Object.keys(A).length>0?A:{}),Be=i(null),[Ee,Le]=s(!1),[ze,Ve]=s();n((()=>{ve(!0),Fe(!0),R.collectionFetcher(ye,w).then((e=>{de({type:"fetched",data:(null==e?void 0:e.collections)||{}}),ve(!1),be((e=>e+1)),Fe(!1)})).catch()}),[]),n((()=>{let e=0;X?Object.keys(we||[]).forEach((t=>{var o;Object.keys((null===(o=we[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c;"-1"!==t&&we[-1]&&(null===(c=we[-1].products)||void 0===c?void 0:c[o])||(e+=1)}))})):Object.keys(we||[]).forEach((t=>{var o;Object.keys((null===(o=we[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var c,r;Object.keys((null===(r=null===(c=we[t].products)||void 0===c?void 0:c[o])||void 0===r?void 0:r.variants)||[]).forEach((()=>{e+=1}))}))})),je(e)}),[le,we,X]),n((()=>{ge&&(ve(!0),R.productFetcher(ge,w).then((e=>{Object.keys(e).length&&de({type:"productsFetched",data:{collectionId:ge,products:e}}),ve(!1)})).catch())}),[ge]),n((()=>{const e=setTimeout((()=>{"rearrange"!==ae&&(Ie.length||"collections"!==ae)&&(Ie.length?(Oe(!0),R.searchFetcher(w,Ie).then((e=>{"collections"in e&&"products"in e?(Re({type:"set",data:e}),de({type:"searched",data:e.collections})):(Re({type:"set",data:{collections:{},products:e}}),de({type:"searched",data:e})),ue("searchProducts"),ve(!1),Oe(!1)}))):ue("collections"))}),800);return()=>clearTimeout(e)}),[Ie]),n((()=>{J&&(R.onAdd(we,ke),$e())}),[J]),n((()=>{ee&&Object.keys(we||{}).length&&ke&&(R.onAdd(we,ke),$e())}),[ee,we,ke]);const $e=()=>{Ae({type:"reset",data:{}})},Me=()=>z&&ke>z?t(m,{tagText:`You can only select ${z} products`,type:"negative"}):V&&ke>V?t(m,{tagText:`You can only select ${V} products`,type:"negative"}):t(a,ke>0?{onClick:()=>{ue(_?T.RearrangeProducts:T.SelectedProducts)},buttonText:z?`${ke}/${z} products selected`:`${ke} products selected`,buttonType:["rearrange","view"].includes(ae)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(ae)}:{disabled:!0,buttonText:z?`${ke}/${z} products selected`:`${ke} products selected`,buttonType:"tertiaryGray"}),He=e=>Se?"Loading...":ae===T.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",We=e(x,Object.assign({style:null!=oe?oe:{}},{children:[R.postHeader&&t("div",Object.assign({style:{padding:"0 24px"}},{children:R.postHeader})),!R.hideGlobalSearch&&t(o,{children:("collections"===ae||"searchProducts"===ae)&&t("div",Object.assign({style:{padding:q?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:t(u,{placeholder:"Search for collections and products, or type a product ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Pe?t(p,{size:"small",color:l.content.primary}):t(c,{})},id:"listInput",height:"24px",type:"text",value:Ie,onChangeText:e=>{e.length&&e.trim().length?xe(e):xe("")}})}))}),e(P,Object.assign({ref:Be,screenName:ae},{children:["collections"===ae&&t(C,{customCollectionRestriction:R.customCollectionRestriction,dataLoading:De,collections:le,selectedCollectionsDispatch:Ae,setCollectionId:Ce,setSelectedCollectionId:fe,setScreen:ue,selectedCollections:we,collectionFetcher:R.collectionFetcher,storeId:w,collectionsDispatch:de,setSaveDisabled:ve,pagingControls:{curPage:ye,setCurPage:be},hideCollectionCheckbox:$,renderWithoutModal:q,pickerType:Q,scrollContainerRef:Be}),"products"===ae&&me&&t(k.Provider,Object.assign({value:me},{children:t(f,{hideInCollectionSearch:R.hideInCollectionSearch,customCollectionRestriction:R.customCollectionRestriction,productFetcher:R.productFetcher,setScreen:ue,storeId:w,data:le[me],collectionsDispatch:de,selectedCollectionsDispatch:Ae,selectedData:we,setSaveDisabled:ve,searchInCollectionFetcher:R.searchInCollectionFetcher,hideProductCheckbox:M,outOfStockAction:H,hideVariantCheckbox:W,selectProductsFromCustomCollection:G,renderWithoutModal:q,pickerType:Q,hideProductVariants:X,fbStatusFetcher:R.fbStatusFetcher,onProductDetailClick:e=>{Le(!0),Ve(e)},showProductDetailInfoIcon:te,scrollContainerRef:Be})})),"view"===ae&&t(I,{selectedCollections:we||{},selectedCollectionsDispatch:Ae,setScreen:ue,collections:le,hideProductVariants:X,outOfStockAction:H,storeId:w,fbStatusFetcher:R.fbStatusFetcher}),"rearrange"===ae&&t(y,{selectedCollections:we||{},selectedCollectionsDispatch:Ae,setScreen:ue,outOfStockAction:H,rearrangeViewType:"grid"===he?"list":"grid",scrollContainerRef:Be,storeId:w,fbStatusFetcher:R.fbStatusFetcher}),"searchProducts"===ae&&t(j,{customCollectionRestriction:R.customCollectionRestriction,selectedCollections:we||{},searchedCollections:Te||{},searchedCollectionsDispatch:Re,selectedCollectionsDispatch:Ae,setScreen:ue,collections:le,onBackPress:()=>{xe(""),Re({type:"set",data:{collections:{},products:{}}})},pickerType:Q,hideProductCheckbox:M,hideProductVariants:X,hideVariantCheckbox:W,storeId:w,fbStatusFetcher:R.fbStatusFetcher,setCollectionId:Ce,setSelectedCollectionId:fe,renderWithoutModal:q,hideCollectionCheckbox:$,outOfStockAction:H})]}))]}));return t(o,{children:q?e(o,{children:[We,re.renderFooter?e(O,{children:[Me(),t(a,{buttonText:He(re.primaryButtonText),disabled:!re.isLoading&&(Se||ke<1||z&&ke<z||!z&&V&&ke>V)||re.primaryButtonDisabled,isLoading:re.isLoading,onClick:()=>{R.onAdd(we,ke),$e(),ue([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections)}})]}):t(o,{}),Ee&&ze?t(g,{productData:ze,outOfStockAction:H,useDynamicInfoImageSize:R.useDynamicInfoImageSize,onClose:()=>{Le(!1)}}):t(o,{})]}):e(h,Object.assign({zIndex:L,open:E,onClose:()=>{null==B||B(),$e()},headingTitle:Y||("collections"===ae||"products"===ae?"Select Products":"view"===ae?"Selected Products":"searchProducts"===ae?"Searched Results":"rearrange"===ae?"Rearrange Products":void 0),headingSubtitle:ne,footerShadow:!0,centralContainerStyles:{width:K||"600px",left:U||"auto"},headerRightCustomElement:ce?t("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:B},{children:t(d,{width:20,height:20,color:l.content.secondary})})):t(o,{}),footerContainerStyle:R.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:l.surface.standard}:void 0,primaryButton:se?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(Se||ke<1||z&&ke<z||!z&&V&&ke>V)||e.disabled,onClick:()=>{R.onAdd(we,ke),$e(),ue([T.Collections,T.RearrangeProducts].includes(Z)?Z:T.Collections)}}))(se):{buttonText:He(),disabled:Se||ke<1||z&&ke<z||!z&&V&&ke>V||!1,onClick:()=>{R.onAdd(we,ke),$e()}},secondaryButton:ie?(e=>Object.assign(Object.assign({},e),{disabled:Se||ke<1||z&&ke<z||!z&&V&&ke>V||!1,onClick:()=>{const e=F(we,le,Te);R.onAdd(e,ke,!0)}}))(ie):void 0,wrapperStyle:R.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:N?t(o,{}):Me(),hideCrossButton:Ee||ce},{children:[We,Ee&&ze?t(g,{productData:ze,useDynamicInfoImageSize:R.useDynamicInfoImageSize,outOfStockAction:H,onClose:()=>{Le(!1)}}):t(o,{})]}))})};export{R as ProductPickerModal,T as ScreenName};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as i,Fragment as o}from"react/jsx-runtime";import{COLORS as e}from"../../constants/Theme.js";import c from"../../assets/icons/info.svg.js";import{CheckBox as d}from"../checkBox/CheckBox.js";import{IconButton as n}from"../icon-button/IconButton.js";import{ShimmerImage as
|
|
1
|
+
import{jsxs as t,jsx as i,Fragment as o}from"react/jsx-runtime";import{COLORS as e}from"../../constants/Theme.js";import c from"../../assets/icons/info.svg.js";import{CheckBox as d}from"../checkBox/CheckBox.js";import{IconButton as n}from"../icon-button/IconButton.js";import{ShimmerImage as r}from"../shimmer-image/ShimmerImage.js";import{Tooltip as l}from"../tooltips/Tooltip.js";import{TitleSmall as a,BodyCaption as s}from"../TypographyStyle.js";import{CurrencySymbols as u}from"./constants.js";import{ProductHelper as v}from"./helpers/ProductHelper.js";import{ProductPickerTag as p}from"./ProductPickerTag.js";import{ProductCardStyle as h}from"./style.js";import{shouldShowVariant as m}from"./utility.js";const I=o=>{var e,c,d,n,r,l,a,s,v;const{collectionId:p,productId:h,data:I,selectedData:P,selectedCollectionsDispatch:f,viewOnly:k,upliftAdditions:g,isProductPartiallyChecked:C,hideProductCheckbox:b,outOfStockAction:j,hideVariantCheckbox:O,hideProductVariants:x,pickerType:D,onProductDetailClick:T,showProductDetailInfoIcon:S}=o,V=t=>{var i,o,e,c,d,n;if(!(null===(o=null===(i=null==P?void 0:P[p])||void 0===i?void 0:i.products)||void 0===o?void 0:o[h]))return!1;return!!(null===(n=null===(d=null===(c=null===(e=null==P?void 0:P[p])||void 0===e?void 0:e.products)||void 0===c?void 0:c[h])||void 0===d?void 0:d.variants)||void 0===n?void 0:n[t])},A=x||!m(I)?`${I.currency&&null!==(e=u[I.currency])&&void 0!==e?e:""}${null!==(v=null!==(r=null===(n=null===(d=Object.values(null!==(c=I.variants)&&void 0!==c?c:{}))||void 0===d?void 0:d[0])||void 0===n?void 0:n.price)&&void 0!==r?r:null===(s=null===(a=Object.values(null!==(l=I.variants)&&void 0!==l?l:{}))||void 0===a?void 0:a[0])||void 0===s?void 0:s.actualPrice)&&void 0!==v?v:""}`:"";return t("div",{children:[i(y,{isVariant:!1,data:I,productId:h,collectionId:p,isSelected:(()=>{var t,i;return!!(null===(i=null===(t=null==P?void 0:P[p])||void 0===t?void 0:t.products)||void 0===i?void 0:i[h])})(),isPartiallyChecked:C,selectedCollectionsDispatch:f,upliftAdditions:g,viewOnly:k,hideProductCheckbox:b,hideVariantCheckbox:O,hideProductVariants:x,pickerType:D,outOfStockAction:j,onProductDetailClick:T,showProductDetailInfoIcon:S,currencyAndPrice:A},h),x?null:m(I)&&Object.keys(I.variants||[]).map((t=>{var o,e,c,d,n,r,l;const a=`${I.currency&&null!==(o=u[I.currency])&&void 0!==o?o:""}${null!==(l=null!==(d=null===(c=null===(e=I.variants)||void 0===e?void 0:e[t])||void 0===c?void 0:c.price)&&void 0!==d?d:null===(r=null===(n=I.variants)||void 0===n?void 0:n[t])||void 0===r?void 0:r.actualPrice)&&void 0!==l?l:""}`;return i(y,{isVariant:!0,hideVariantCheckbox:O,data:Object.assign(Object.assign({},I.variants[t]),{currency:I.currency}),variantId:t,productId:h,viewOnly:k,upliftAdditions:g,collectionId:p,isSelected:V(t),selectedCollectionsDispatch:f,outOfStockAction:j,onProductDetailClick:T,showProductDetailInfoIcon:S,currencyAndPrice:a},t)}))]})},y=u=>{const{isVariant:m,data:I,productId:y,collectionId:P,variantId:f,isSelected:k,selectedCollectionsDispatch:g,viewOnly:C,upliftAdditions:b,isPartiallyChecked:j,hideProductCheckbox:O,outOfStockAction:x,hideVariantCheckbox:D,hideProductVariants:T,pickerType:S="PRODUCT",onProductDetailClick:V,showProductDetailInfoIcon:A,currencyAndPrice:w}=u,{isVariantForProductPickerTag:U,dataForProductPickerTag:$,tagText:B,tagType:F}=v.getDataForProductPickerTag(I,m,x);return t(h,Object.assign({isVariant:m,onClick:t=>{if(t.stopPropagation(),"PRODUCT"===S&&(O||D)){const t=Object.keys(I.variants);T?k?g({type:"productUnselected",data:{productId:y,collectionId:P}}):b("productSelected",{productId:y,variantId:f,collectionId:P,product:I}):k?g({type:"variantUnselected",data:{productId:y,variantId:f,collectionId:P}}):b("variantSelected",{productId:y,variantId:f||t[0],collectionId:P,variant:I})}},isActive:k},{children:[m&&!C&&!D||!m&&!C&&!O?i(d,{isChecked:k,isPartiallyChecked:j||!1,onValueChange:function(t,i,o){null==o||o.stopPropagation(),m?t?b(T?"productSelected":"variantSelected",{productId:y,variantId:f,collectionId:P,variant:I}):g({type:T?"productUnselected":"variantUnselected",data:{productId:y,variantId:f,collectionId:P}}):t?b("productSelected",{productId:y,collectionId:P,product:I}):g({type:"productUnselected",data:{productId:y,collectionId:P}})}}):i(o,{}),i("div",{children:i(r,{width:40,height:40,imageUrl:I.image,alt:"Item",borderRadius:4})}),t("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[t("div",Object.assign({style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},{children:[i(l,Object.assign({variant:"light",body:I.name,placement:"bottom",delay:400},{children:i(a,Object.assign({numberOfLines:1},{children:I.name}))})),A&&i(n,{onClick:()=>{null==V||V(I)},Icon:()=>i(c,{width:20,height:20,color:e.content.placeholder})})]})),i(p,{isVariant:U,data:$,tagText:B,tagType:F}),i(s,Object.assign({color:e.content.secondary},{children:!(null==$?void 0:$.fbStatus)&&U||B?null:w}))]}))]}))};export{y as ProductCard,I as ProductGroup};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{jsxs as o,jsx as t}from"react/jsx-runtime";import i from"styled-components";import{COLORS as r}from"../../constants/Theme.js";import a from"../../assets/icons/cross.svg.js";import{IconButton as e}from"../icon-button/IconButton.js";import{ShimmerImage as n}from"../shimmer-image/ShimmerImage.js";import{
|
|
1
|
+
import{jsxs as o,jsx as t}from"react/jsx-runtime";import i from"styled-components";import{COLORS as r}from"../../constants/Theme.js";import a from"../../assets/icons/cross.svg.js";import{IconButton as e}from"../icon-button/IconButton.js";import{ShimmerImage as n}from"../shimmer-image/ShimmerImage.js";import{TitleRegular as c,BodyCaption as d}from"../TypographyStyle.js";import{CurrencySymbols as l}from"./constants.js";import{ProductHelper as s}from"./helpers/ProductHelper.js";import{ProductPickerTag as u}from"./ProductPickerTag.js";import{shouldShowVariant as p}from"./utility.js";const m=i=>o(g,{children:[t(f,{}),t(x,{children:t(e,{className:"close-button",onClick:i.onClose,Icon:a,width:20,height:20})}),t(v,{productData:i.productData,outOfStockAction:i.outOfStockAction,useDynamicInfoImageSize:i.useDynamicInfoImageSize})]}),v=i=>{var a,e,m,v,g,f,x,D,j,k,I,P,T,S,w,O;const $=void 0===i.productData.variants;let z;if($)z=`${i.productData.currency&&null!==(a=l[i.productData.currency])&&void 0!==a?a:""}${null!==(g=null!==(m=null===(e=i.productData)||void 0===e?void 0:e.price)&&void 0!==m?m:null===(v=i.productData)||void 0===v?void 0:v.actualPrice)&&void 0!==g?g:""}`;else{const o=null===(f=i.productData)||void 0===f?void 0:f.currency;z=`${o&&null!==(x=l[o])&&void 0!==x?x:""}${null!==(w=null!==(I=null===(k=null===(j=Object.values(null!==(D=i.productData.variants)&&void 0!==D?D:{}))||void 0===j?void 0:j[0])||void 0===k?void 0:k.price)&&void 0!==I?I:null===(S=null===(T=Object.values(null!==(P=i.productData.variants)&&void 0!==P?P:{}))||void 0===T?void 0:T[0])||void 0===S?void 0:S.actualPrice)&&void 0!==w?w:""}`}const{isVariantForProductPickerTag:A,dataForProductPickerTag:F,tagText:C,tagType:H}=s.getDataForProductPickerTag(i.productData,$,i.outOfStockAction);return o(y,{children:[t(h,{children:t(n,{useDynamicInfoImageSize:i.useDynamicInfoImageSize,imageUrl:i.productData.image,width:200,height:200,borderRadius:4})}),o(b,{children:[t(c,Object.assign({style:{display:"flex"}},{children:i.productData.name})),t(d,Object.assign({color:r.content.secondary},{children:`Product ID: ${i.productData.id}`})),t(d,{className:"overlay-description",dangerouslySetInnerHTML:{__html:null!==(O=i.productData.description)&&void 0!==O?O:""}}),t(d,Object.assign({color:r.content.secondary},{children:$?z:p(i.productData)?null:z})),t(u,{isVariant:A,data:F,tagText:C,tagType:H})]})]})},g=i.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1;
|
|
4
4
|
background: rgba(0, 0, 0, 0.5);
|
|
@@ -17,11 +17,11 @@ import{jsxs as o,jsx as t}from"react/jsx-runtime";import i from"styled-component
|
|
|
17
17
|
word-break: break-word;
|
|
18
18
|
margin-top: 8px;
|
|
19
19
|
}
|
|
20
|
-
`,
|
|
20
|
+
`,f=i.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
flex: 1;
|
|
23
23
|
background: rgba(0, 0, 0, 0.5);
|
|
24
|
-
`,
|
|
24
|
+
`,x=i.div`
|
|
25
25
|
position: relative;
|
|
26
26
|
|
|
27
27
|
.close-button {
|
|
@@ -32,21 +32,21 @@ import{jsxs as o,jsx as t}from"react/jsx-runtime";import i from"styled-component
|
|
|
32
32
|
background: ${r.surface.standard};
|
|
33
33
|
border-radius: 50%;
|
|
34
34
|
}
|
|
35
|
-
`,
|
|
35
|
+
`,y=i.div`
|
|
36
36
|
display: flex;
|
|
37
37
|
background: white;
|
|
38
38
|
padding: 24px;
|
|
39
39
|
gap: 24px;
|
|
40
40
|
border-radius: 8px 8px 0px 0px;
|
|
41
|
-
`,
|
|
41
|
+
`,h=i.div`
|
|
42
42
|
display: flex;
|
|
43
43
|
max-width: min(50%, 200px);
|
|
44
44
|
flex-direction: column;
|
|
45
45
|
justify-content: center;
|
|
46
46
|
align-items: center;
|
|
47
|
-
`,
|
|
47
|
+
`,b=i.div`
|
|
48
48
|
display: flex;
|
|
49
49
|
flex: 1;
|
|
50
50
|
flex-direction: column;
|
|
51
51
|
gap: 4px;
|
|
52
|
-
`;export{
|
|
52
|
+
`;export{v as ProductInfoCard,m as ProductInfoOverlay};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import c from"../../assets/icons/box.svg.js";import r from"../../assets/icons/search.svg.js";import{cloneDeep as n}from"lodash";import{useContext as i,useRef as s,useState as l,useEffect as d}from"react";import{COLORS as a}from"../../constants/Theme.js";import{CheckBox as u}from"../checkBox/CheckBox.js";import{IconButton as h}from"../icon-button/IconButton.js";import{InfiniteScroll as p}from"../InfiniteScroll/InfiniteScroll.js";import{Input as m}from"../input/Input.js";import{Spinner as g}from"../spinner/Spinner.js";import{BodyCaption as j,TitleRegular as f}from"../TypographyStyle.js";import{EmptyState as v}from"./emptyState.js";import{ProductGroup as b}from"./product.js";import{ProductPickerShimmer as y}from"./ProductPickerShimmer.js";import{CollectionIdContext as O}from"./reducers.js";import{ProductScreenHeader as k,ProductScreenCollectionCardStyle as C}from"./style.js";import{OUT_OF_STOCK_ACTION as P}from"./type.js";import{getVariantIdsToFetchAtProductLevel as I,markVariantsAsApprovedProductsLevel as D,isCollectionPartiallyChecked as S,isProductPartiallyChecked as x,liftTheStateUp as E}from"./utility.js";const R=R=>{var T,w;const{data:V,collectionsDispatch:A,selectedData:B,selectedCollectionsDispatch:F,productFetcher:J,storeId:M,setScreen:W,setSaveDisabled:z,hideInCollectionSearch:H,customCollectionRestriction:K,hideProductCheckbox:L,outOfStockAction:N=P.BLUR,hideVariantCheckbox:U=!1,selectProductsFromCustomCollection:_=!1,pickerType:q,hideProductVariants:G,fbStatusFetcher:Q,onProductDetailClick:X,showProductDetailInfoIcon:Y,scrollContainerRef:Z}=R,$=i(O),tt=s(0),et=s(!1),[ot,ct]=l(""),[rt,nt]=l(!1),[it,st]=l(V),lt=s(!0),dt=s(!1);d((()=>{if(lt.current)return void(lt.current=!1);const t=setTimeout((()=>{ot.length?(nt(!0),R.searchInCollectionFetcher(M,$,ot).then((t=>{const e=n(V);e.products=t,
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import c from"../../assets/icons/box.svg.js";import r from"../../assets/icons/search.svg.js";import{cloneDeep as n}from"lodash";import{useContext as i,useRef as s,useState as l,useEffect as d}from"react";import{COLORS as a}from"../../constants/Theme.js";import{CheckBox as u}from"../checkBox/CheckBox.js";import{IconButton as h}from"../icon-button/IconButton.js";import{InfiniteScroll as p}from"../InfiniteScroll/InfiniteScroll.js";import{Input as m}from"../input/Input.js";import{Spinner as g}from"../spinner/Spinner.js";import{BodyCaption as j,TitleRegular as f}from"../TypographyStyle.js";import{EmptyState as v}from"./emptyState.js";import{ProductGroup as b}from"./product.js";import{ProductPickerShimmer as y}from"./ProductPickerShimmer.js";import{CollectionIdContext as O}from"./reducers.js";import{ProductScreenHeader as k,ProductScreenCollectionCardStyle as C}from"./style.js";import{OUT_OF_STOCK_ACTION as P}from"./type.js";import{getVariantIdsToFetchAtProductLevel as I,markVariantsAsApprovedProductsLevel as D,isCollectionPartiallyChecked as S,isProductPartiallyChecked as x,liftTheStateUp as E}from"./utility.js";const R=R=>{var T,w;const{data:V,collectionsDispatch:A,selectedData:B,selectedCollectionsDispatch:F,productFetcher:J,storeId:M,setScreen:W,setSaveDisabled:z,hideInCollectionSearch:H,customCollectionRestriction:K,hideProductCheckbox:L,outOfStockAction:N=P.BLUR,hideVariantCheckbox:U=!1,selectProductsFromCustomCollection:_=!1,pickerType:q,hideProductVariants:G,fbStatusFetcher:Q,onProductDetailClick:X,showProductDetailInfoIcon:Y,scrollContainerRef:Z}=R,$=i(O),tt=s(0),et=s(!1),[ot,ct]=l(""),[rt,nt]=l(!1),[it,st]=l(V),lt=s(!0),dt=s(!1);d((()=>{if(lt.current)return void(lt.current=!1);const t=setTimeout((()=>{ot.length?(nt(!0),R.searchInCollectionFetcher(M,$,ot).then((t=>{const e=n(V);e.products=t,st(e);const o=I(null!=t?t:{});ut(o,null!=t?t:{},!0),z(!1),nt(!1)}))):st(V)}),800);return()=>clearTimeout(t)}),[ot]);d((()=>{var t,e,o,c;dt.current=!1,tt.current=Math.floor((null===(e=Object.keys(null!==(t=V.products)&&void 0!==t?t:{}))||void 0===e?void 0:e.length)/10);const r=I(null!==(o=V.products)&&void 0!==o?o:{});ut(r,null!==(c=V.products)&&void 0!==c?c:{})}),[$]);const at=!!K&&V.isSmartCollection;d((()=>{(null==V?void 0:V.products)||ht(10)}),[]);const ut=(t,e,o)=>{Q||(o?D(e,A,$,it,st):D(e,A,$)),t.length>0&&Q&&Q(M,t).then((t=>{const c=Object.assign({},e);Object.keys(e).forEach((o=>{var r,n;Object.keys(null!==(n=null===(r=null==e?void 0:e[o])||void 0===r?void 0:r.variants)&&void 0!==n?n:{}).forEach((r=>{var n,i;const s=null===(n=null==e?void 0:e[o].variants)||void 0===n?void 0:n[r];s&&"REJECTED"===t[r]?s.fbStatus="REJECTED":s&&"APPROVED"===t[r]&&(s.fbStatus="APPROVED");const l=null===(i=null==c?void 0:c[o])||void 0===i?void 0:i.variants;l&&l[r]&&(l[r]=s)}))})),o?(st((t=>{const e=Object.assign({},t);return e.products=c,e})),A({type:"productsPaged",data:{collectionId:$,products:c}})):A({type:"productsPaged",data:{collectionId:$,products:c}})})).catch((t=>{o?D(e,A,$,it,st):D(e,A,$)}))},ht=t=>{z(!0),nt(!0),J($,M,t,0).then((e=>{if(Object.keys(e).length||(dt.current=!0),Object.keys(e).length){st(Object.assign(Object.assign({},it),{products:e}));const t=I(e);ut(t,e),tt.current=1}t||F({type:"selected",data:{id:$,val:Object.assign(Object.assign({},V),{products:e})}}),z(!1),nt(!1)})).catch()},pt=(t,e)=>{const o=E(e,V);F({type:t,data:Object.assign(Object.assign({},o),{isRestricted:K})})},mt=!!(null==B?void 0:B[$])&&!!Object.keys(null!==(w=null===(T=null==B?void 0:B[$])||void 0===T?void 0:T.products)&&void 0!==w?w:{}).length;return t("div",{children:[t(k,{children:[e(h,{Icon:o,height:16,onClick:()=>{W("collections")}}),e(j,Object.assign({style:{color:a.content.secondary}},{children:V.name}))]}),!H&&e("div",Object.assign({style:{padding:16,height:"76px",borderBottom:"1px solid #E0E0E0"}},{children:e(m,{noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>rt&&ot.length?e(g,{size:"small",color:a.content.primary}):e(r,{})},id:"listInput",height:"24px",type:"text",value:ot,onChangeText:t=>{t.length&&t.trim().length?ct(t):ct("")},placeholder:"Search for a product or type a product ID"})})),Object.keys((null==it?void 0:it.products)||[]).length>0&&!at&&!ot.length&&!L&&"-1"!==$&&t(C,{children:[e(u,{isChecked:mt,isPartiallyChecked:S($,it,B,G),onValueChange:function(t){t?ht():F({type:"unselected",data:{id:$}})}}),e("div",Object.assign({style:{width:40,height:40}},{children:e(c,{})})),e(f,{children:"All Products"})]}),e(p,Object.assign({hasData:!(Object.keys((null==it?void 0:it.products)||[]).length<10)&&!!Object.keys((null==it?void 0:it.products)||[]).length,fetchMore:()=>(et.current=!0,J($,M,10,tt.current).then((t=>{let e=!1;if(Object.keys(t).length||(e=!0),Object.keys(t).length){const e=it;e.products=Object.assign(Object.assign({},it.products),t),st(Object.assign({},e));const o=I(t);ut(o,t)}return z(!1),et.current=!1,tt.current+=1,e}))),containerRef:Z},{children:Object.keys((null==it?void 0:it.products)||[]).length?Object.keys(it.products||[]).map((t=>e(b,{outOfStockAction:N,collectionId:$,isProductPartiallyChecked:x($,t,B,it,G),productId:t,data:it.products[t],selectedData:B,selectedCollectionsDispatch:F,viewOnly:!_&&!!at,upliftAdditions:pt,hideProductCheckbox:L,hideVariantCheckbox:U,hideProductVariants:G,pickerType:q,onProductDetailClick:X,showProductDetailInfoIcon:Y},t))):rt?e(y,{limit:10}):e(v,{title:"No products to show",subtitle:ot.length?"We couldn't find the product you were looking for":"We couldn’t find any product in this collection."})}))]})};export{R as ProductsScreen};
|
|
@@ -23,9 +23,3 @@ export declare const VariantCardListStyle: import("styled-components").StyledCom
|
|
|
23
23
|
export declare const VariantCardGridStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
24
24
|
export declare const StyledHeaderRightIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
25
25
|
export declare const StyledFooterForNonModal: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
26
|
-
export declare const SKUIDBadge: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
27
|
-
export declare const EllipsedBodyTiny: import("styled-components").StyledComponent<"div", any, {
|
|
28
|
-
numberOfLines?: number | undefined;
|
|
29
|
-
color?: string | undefined;
|
|
30
|
-
}, never>;
|
|
31
|
-
export declare const ProductSubTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import e from"styled-components";import{COLORS as i}from"../../constants/Theme.js";import{
|
|
1
|
+
import e from"styled-components";import{COLORS as i}from"../../constants/Theme.js";import{ScreenName as t}from"./modal.js";const o=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
background-color: white;
|
|
4
4
|
height: ${e=>e.renderWithoutModal?"90%":"75vh"};
|
|
5
5
|
flex-direction: column;
|
|
6
|
-
`,
|
|
6
|
+
`,n=e.div`
|
|
7
7
|
overflow-y: scroll;
|
|
8
8
|
overflow-x: hidden;
|
|
9
9
|
|
|
@@ -13,10 +13,10 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
::-webkit-scrollbar-thumb {
|
|
16
|
-
background-color: ${e=>e.screenName!==
|
|
16
|
+
background-color: ${e=>e.screenName!==t.RearrangeProducts?"#888":"#fff"};
|
|
17
17
|
border-radius: 8px;
|
|
18
18
|
}
|
|
19
|
-
`,
|
|
19
|
+
`,r=e.div`
|
|
20
20
|
height: 64px;
|
|
21
21
|
background-color: ${e=>e.isDisabled?"#F0F0F0":e.isActive?i.background.positive.light:"white"};
|
|
22
22
|
border-bottom: 1px solid #e0e0e0;
|
|
@@ -30,17 +30,17 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
30
30
|
cursor: pointer;
|
|
31
31
|
background-color: ${i.surface.hovered};
|
|
32
32
|
}
|
|
33
|
-
`,
|
|
33
|
+
`,d=e.div`
|
|
34
34
|
display: flex;
|
|
35
35
|
flex-direction: row;
|
|
36
36
|
justify-content: center;
|
|
37
37
|
align-items: center;
|
|
38
38
|
column-gap: 18px;
|
|
39
|
-
`,
|
|
39
|
+
`,p=e.div`
|
|
40
40
|
display: flex;
|
|
41
41
|
flex-direction: column;
|
|
42
42
|
justify-content: center;
|
|
43
|
-
`,
|
|
43
|
+
`,l=e.div`
|
|
44
44
|
display: flex;
|
|
45
45
|
flex-direction: row;
|
|
46
46
|
max-height: 32px;
|
|
@@ -60,7 +60,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
60
60
|
padding: 12px 16px;
|
|
61
61
|
border-bottom: 1px solid #e0e0e0;
|
|
62
62
|
align-items: center;
|
|
63
|
-
`,
|
|
63
|
+
`,a=e.div`
|
|
64
64
|
min-height: 64px;
|
|
65
65
|
background-color: ${e=>e.isActive?i.background.positive.light:"white"};
|
|
66
66
|
border-bottom: 1px solid #e0e0e0;
|
|
@@ -75,7 +75,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
75
75
|
cursor: pointer;
|
|
76
76
|
background-color: ${i.surface.hovered};
|
|
77
77
|
}
|
|
78
|
-
`,
|
|
78
|
+
`,s=e.div`
|
|
79
79
|
display: flex;
|
|
80
80
|
flex-direction: row;
|
|
81
81
|
max-height: 32px;
|
|
@@ -87,10 +87,10 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
87
87
|
position: sticky;
|
|
88
88
|
top: 0;
|
|
89
89
|
z-index: 10;
|
|
90
|
-
`,
|
|
90
|
+
`,x=e.div`
|
|
91
91
|
display: flex;
|
|
92
92
|
flex-direction: column;
|
|
93
|
-
`,
|
|
93
|
+
`,g=e.div`
|
|
94
94
|
min-height: 72px;
|
|
95
95
|
background: white;
|
|
96
96
|
padding: 12px 16px;
|
|
@@ -111,7 +111,7 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
111
111
|
flex-direction: column;
|
|
112
112
|
gap: 2px;
|
|
113
113
|
}
|
|
114
|
-
`,
|
|
114
|
+
`,f=e.div`
|
|
115
115
|
height: 72px;
|
|
116
116
|
width: 72px;
|
|
117
117
|
display: flex;
|
|
@@ -134,21 +134,4 @@ import e from"styled-components";import{COLORS as i}from"../../constants/Theme.j
|
|
|
134
134
|
justify-content: space-between;
|
|
135
135
|
margin-top: auto;
|
|
136
136
|
width: 100%;
|
|
137
|
-
|
|
138
|
-
width: fit-content;
|
|
139
|
-
background: ${i.background.brandLight};
|
|
140
|
-
padding: 2px 6px;
|
|
141
|
-
border-radius: 14px;
|
|
142
|
-
`,b=e(t)`
|
|
143
|
-
white-space: nowrap;
|
|
144
|
-
overflow: hidden;
|
|
145
|
-
text-overflow: ellipsis;
|
|
146
|
-
max-width: 196px;
|
|
147
|
-
display: block;
|
|
148
|
-
color: ${i.background.inverseLight};
|
|
149
|
-
`,y=e.div`
|
|
150
|
-
display: flex;
|
|
151
|
-
flex-direction: row;
|
|
152
|
-
align-items: center;
|
|
153
|
-
gap: 5px;
|
|
154
|
-
`;export{l as CollectionCardDetailStyle,p as CollectionCardInfoStyle,d as CollectionCardStyle,g as CollectionNameHolder,n as ContainerStyle,b as EllipsedBodyTiny,s as ProductCardStyle,c as ProductScreenCollectionCardStyle,a as ProductScreenHeader,y as ProductSubTitle,m as SKUIDBadge,r as ScrollContainerStyle,x as SelectedScreenHeader,u as StyledFooterForNonModal,h as VariantCardGridStyle,f as VariantCardListStyle};
|
|
137
|
+
`;export{p as CollectionCardDetailStyle,d as CollectionCardInfoStyle,r as CollectionCardStyle,x as CollectionNameHolder,o as ContainerStyle,a as ProductCardStyle,c as ProductScreenCollectionCardStyle,l as ProductScreenHeader,n as ScrollContainerStyle,s as SelectedScreenHeader,u as StyledFooterForNonModal,f as VariantCardGridStyle,g as VariantCardListStyle};
|