@bikdotai/bik-component-library 0.0.382-beta.3 → 0.0.382-beta.5
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/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/style.js +1 -1
- package/dist/cjs/components/product-picker-v2/variant.js +1 -1
- package/dist/cjs/components/product-picker-v2/variantComponents.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/style.js +1 -1
- package/dist/esm/components/product-picker-v2/variant.js +1 -1
- package/dist/esm/components/product-picker-v2/variantComponents.js +1 -1
- package/package.json +1 -1
|
@@ -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"),s=require("react"),r=require("react-beautiful-dnd"),n=require("../icon-button/IconButton.js"),c=require("../TypographyStyle.js"),i=require("./emptyState.js"),o=require("./helpers/ProductHelper.js"),l=require("./style.js"),a=require("./variantComponents.js");exports.RearrangeScreen=d=>{const{selectedCollections:u,selectedCollectionsDispatch:p,setScreen:j,rearrangeViewType:g}=d;console.log("vj: inside rearrangeScreen",u);const[S,x]=s.useState(o.parseSelectedVariantsToArray(u));console.log("vj: selected variants",S),console.log("vj: selected Collections",u);return e.jsxs(r.DragDropContext,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=S,[s]=t.splice(e.source.index,1);t.splice(e.destination.index,0,s),t.forEach(((e,t)=>{e.displayOrder=t})),console.log("vj: drag ended",t),x(t)}},{children:[e.jsxs(l.SelectedScreenHeader,{children:[e.jsx(n.IconButton,{Icon:t.default,onClick:()=>{j("collections")}}),e.jsx(c.BodyCaption,{children:"All Products"})]}),Object.keys(u).length>0?"list"===g?e.jsx(a.VariantsList,{selectedVariants:S,setSelectedVariants:x,selectedCollectionsDispatch:p}):e.jsx(a.VariantsGrid,{selectedVariants:S,setSelectedVariants:x,selectedCollectionsDispatch:p}):e.jsx(i.EmptyState,{title:"No Products Selected",subtitle:"Select products will appear here"})]}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/delete.svg.js"),r=require("../../assets/icons/drag_handle.svg.js"),i=require("../../constants/Theme.js"),a=require("../icon-button/IconButton.js"),s=require("../shimmer-image/ShimmerImage.js"),l=require("../TypographyStyle.js"),n=require("./
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/delete.svg.js"),r=require("../../assets/icons/drag_handle.svg.js"),i=require("../../constants/Theme.js"),a=require("../icon-button/IconButton.js"),s=require("../shimmer-image/ShimmerImage.js"),l=require("../TypographyStyle.js"),n=require("./helpers/ProductHelper.js"),o=require("./style.js"),d=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js");exports.VariantCardGridView=t=>{const{data:r}=t;return e.jsx(o.VariantCardGridStyle,{children:e.jsx(c.Tooltip,Object.assign({body:r.name,alwaysVisible:!1,variant:"dark",placement:"bottom"},{children:e.jsx(s.ShimmerImage,{width:72,height:72,imageUrl:r.image,alt:"Item",borderRadius:4})}))})},exports.VariantCardListView=c=>{const{data:h,selectedCollectionsDispatch:u,outOfStockAction:j}=c,g=n.ProductHelper.getProductLabels(h,j);return e.jsxs(o.VariantCardListStyle,{children:[e.jsx(r.default,{width:24,height:24,color:i.COLORS.content.placeholder}),e.jsx("div",{children:e.jsx(s.ShimmerImage,{width:40,height:40,imageUrl:h.image,alt:"Item",borderRadius:4},h.variantId)}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:2}},{children:[e.jsx(l.TitleRegular,{children:`${h.productName} ${h.name}`}),g?e.jsx("div",Object.assign({style:{width:90,display:"flex"}},{children:e.jsx(d.Tag,{tagText:g,type:"warning",theme:"light"})})):e.jsx(e.Fragment,{})]})),e.jsx(a.IconButton,{Icon:()=>e.jsx(t.default,{width:24,height:24,color:i.COLORS.content.placeholder}),onClick:()=>{u&&u({type:"variantUnselected",data:{productId:h.productId,variantId:h.variantId,collectionId:h.collectionId}}),c.onDelete&&c.onDelete()}})]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react-beautiful-dnd"),a=require("../../constants/Theme.js"),s=require("./variant.js");exports.VariantsGrid=a=>{let{selectedVariants:d}=a;return e.jsx(r.Droppable,Object.assign({droppableId:"droppable-horizontal"},{children:a=>e.jsxs("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",width:"500px"})},{children:[e.jsx(r.Droppable,Object.assign({droppableId:"droppable-vertical",direction:"horizontal"},{children:a=>e.jsxs("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"})},{children:[d.map(((a,d)=>e.jsx(r.Draggable,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:d},{children:(r,d)=>e.jsxs("div",Object.assign({ref:r.innerRef},r.draggableProps,r.dragHandleProps,{children:[e.jsx(s.VariantCardGridView,{data:a}),r.placeholder]}))}),`${a.productId}-${a.variantId}`))),a.placeholder]}))})),a.placeholder]}))}))},exports.VariantsList=d=>{let{selectedVariants:i,setSelectedVariants:t,selectedCollectionsDispatch:l}=d;return e.jsx(r.Droppable,Object.assign({droppableId:"droppable-list"},{children:d=>e.jsxs("div",Object.assign({},d.droppableProps,{ref:d.innerRef,style:Object.assign({backgroundColor:a.COLORS.surface.subdued,padding:"0.05px",height:"550px"},d.droppableProps.style)},{children:[i.map(((a,d)=>e.jsx(r.Draggable,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:d},{children:(r,n)=>e.jsx("div",Object.assign({ref:r.innerRef},r.draggableProps,r.dragHandleProps,{children:e.jsx(s.VariantCardListView,{data:a,selectedCollectionsDispatch:l,onDelete:()=>{const e=i.slice();e[d].displayOrder=null,e.splice(d,1),t(e)}},`${a.productId}-${a.variantId}`)}))}),`${a.productId}-${a.variantId}`))),d.placeholder]}))}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react-beautiful-dnd"),a=require("../../constants/Theme.js"),s=require("./variant.js");exports.VariantsGrid=a=>{let{selectedVariants:d}=a;return e.jsx(r.Droppable,Object.assign({droppableId:"droppable-horizontal"},{children:a=>e.jsxs("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",width:"500px"})},{children:[e.jsx(r.Droppable,Object.assign({droppableId:"droppable-vertical",direction:"horizontal"},{children:a=>e.jsxs("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"})},{children:[d.map(((a,d)=>e.jsx(r.Draggable,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:d},{children:(r,d)=>e.jsxs("div",Object.assign({ref:r.innerRef},r.draggableProps,r.dragHandleProps,{children:[e.jsx(s.VariantCardGridView,{data:a}),r.placeholder]}))}),`${a.productId}-${a.variantId}`))),a.placeholder]}))})),a.placeholder]}))}))},exports.VariantsList=d=>{let{selectedVariants:i,setSelectedVariants:t,selectedCollectionsDispatch:l}=d;return e.jsx(r.Droppable,Object.assign({droppableId:"droppable-list"},{children:d=>e.jsxs("div",Object.assign({},d.droppableProps,{ref:d.innerRef,style:Object.assign({backgroundColor:a.COLORS.surface.subdued,padding:"0.05px",height:i.length<8?"550px":"100%"},d.droppableProps.style)},{children:[i.map(((a,d)=>e.jsx(r.Draggable,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:d},{children:(r,n)=>e.jsx("div",Object.assign({ref:r.innerRef},r.draggableProps,r.dragHandleProps,{children:e.jsx(s.VariantCardListView,{data:a,selectedCollectionsDispatch:l,onDelete:()=>{const e=i.slice();e[d].displayOrder=null,e.splice(d,1),t(e)}},`${a.productId}-${a.variantId}`)}))}),`${a.productId}-${a.variantId}`))),d.placeholder]}))}))};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useState as r}from"react";import{DragDropContext as s}from"react-beautiful-dnd";import{IconButton as n}from"../icon-button/IconButton.js";import{BodyCaption as
|
|
1
|
+
import{jsxs as e,jsx as t}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useState as r}from"react";import{DragDropContext as s}from"react-beautiful-dnd";import{IconButton as n}from"../icon-button/IconButton.js";import{BodyCaption as c}from"../TypographyStyle.js";import{EmptyState as l}from"./emptyState.js";import{parseSelectedVariantsToArray as i}from"./helpers/ProductHelper.js";import{SelectedScreenHeader as a}from"./style.js";import{VariantsList as d,VariantsGrid as p}from"./variantComponents.js";const m=m=>{const{selectedCollections:f,selectedCollectionsDispatch:j,setScreen:u,rearrangeViewType:g}=m;console.log("vj: inside rearrangeScreen",f);const[h,y]=r(i(f));console.log("vj: selected variants",h),console.log("vj: selected Collections",f);return e(s,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=h,[o]=t.splice(e.source.index,1);t.splice(e.destination.index,0,o),t.forEach(((e,t)=>{e.displayOrder=t})),console.log("vj: drag ended",t),y(t)}},{children:[e(a,{children:[t(n,{Icon:o,onClick:()=>{u("collections")}}),t(c,{children:"All Products"})]}),Object.keys(f).length>0?t("list"===g?d:p,{selectedVariants:h,setSelectedVariants:y,selectedCollectionsDispatch:j}):t(l,{title:"No Products Selected",subtitle:"Select products will appear here"})]}))};export{m as RearrangeScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import
|
|
1
|
+
import{jsxs as t,jsx as e,Fragment as o}from"react/jsx-runtime";import i from"../../assets/icons/delete.svg.js";import r from"../../assets/icons/drag_handle.svg.js";import{COLORS as a}from"../../constants/Theme.js";import{IconButton as l}from"../icon-button/IconButton.js";import{ShimmerImage as n}from"../shimmer-image/ShimmerImage.js";import{TitleRegular as s}from"../TypographyStyle.js";import{ProductHelper as c}from"./helpers/ProductHelper.js";import{VariantCardListStyle as d,VariantCardGridStyle as m}from"./style.js";import{Tag as h}from"../tag/Tag.js";import{Tooltip as p}from"../tooltips/Tooltip.js";const g=m=>{const{data:p,selectedCollectionsDispatch:g,outOfStockAction:f}=m,j=c.getProductLabels(p,f);return t(d,{children:[e(r,{width:24,height:24,color:a.content.placeholder}),e("div",{children:e(n,{width:40,height:40,imageUrl:p.image,alt:"Item",borderRadius:4},p.variantId)}),t("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:2}},{children:[e(s,{children:`${p.productName} ${p.name}`}),j?e("div",Object.assign({style:{width:90,display:"flex"}},{children:e(h,{tagText:j,type:"warning",theme:"light"})})):e(o,{})]})),e(l,{Icon:()=>e(i,{width:24,height:24,color:a.content.placeholder}),onClick:()=>{g&&g({type:"variantUnselected",data:{productId:p.productId,variantId:p.variantId,collectionId:p.collectionId}}),m.onDelete&&m.onDelete()}})]})},f=t=>{const{data:o}=t;return e(m,{children:e(p,Object.assign({body:o.name,alwaysVisible:!1,variant:"dark",placement:"bottom"},{children:e(n,{width:72,height:72,imageUrl:o.image,alt:"Item",borderRadius:4})}))})};export{f as VariantCardGridView,g as VariantCardListView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Droppable as a,Draggable as d}from"react-beautiful-dnd";import{COLORS as
|
|
1
|
+
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Droppable as a,Draggable as d}from"react-beautiful-dnd";import{COLORS as t}from"../../constants/Theme.js";import{VariantCardListView as s,VariantCardGridView as i}from"./variant.js";const l=i=>{let{selectedVariants:l,setSelectedVariants:n,selectedCollectionsDispatch:p}=i;return e(a,Object.assign({droppableId:"droppable-list"},{children:a=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign({backgroundColor:t.surface.subdued,padding:"0.05px",height:l.length<8?"550px":"100%"},a.droppableProps.style)},{children:[l.map(((r,a)=>e(d,Object.assign({draggableId:`${r.productId}-${r.variantId}`,index:a},{children:(d,t)=>e("div",Object.assign({ref:d.innerRef},d.draggableProps,d.dragHandleProps,{children:e(s,{data:r,selectedCollectionsDispatch:p,onDelete:()=>{const e=l.slice();e[a].displayOrder=null,e.splice(a,1),n(e)}},`${r.productId}-${r.variantId}`)}))}),`${r.productId}-${r.variantId}`))),a.placeholder]}))}))},n=t=>{let{selectedVariants:s}=t;return e(a,Object.assign({droppableId:"droppable-horizontal"},{children:t=>r("div",Object.assign({},t.droppableProps,{ref:t.innerRef,style:Object.assign(Object.assign({},t.droppableProps.style),{display:"flex",width:"500px"})},{children:[e(a,Object.assign({droppableId:"droppable-vertical",direction:"horizontal"},{children:a=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"})},{children:[s.map(((a,t)=>e(d,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:t},{children:(d,t)=>r("div",Object.assign({ref:d.innerRef},d.draggableProps,d.dragHandleProps,{children:[e(i,{data:a}),d.placeholder]}))}),`${a.productId}-${a.variantId}`))),a.placeholder]}))})),t.placeholder]}))}))};export{n as VariantsGrid,l as VariantsList};
|