@bikdotai/bik-component-library 0.0.382-beta.5 → 0.0.382-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -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"),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
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),r=require("react"),s=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:S}=d;console.log("vj: inside rearrangeScreen",u);const[g,x]=r.useState(o.parseSelectedVariantsToArray(u));console.log("vj: selected variants",g),console.log("vj: selected Collections",u),r.useEffect((()=>{x(o.parseSelectedVariantsToArray(u))}),[u]);return e.jsxs(s.DragDropContext,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=g,[r]=t.splice(e.source.index,1);t.splice(e.destination.index,0,r),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"===S?e.jsx(a.VariantsList,{selectedVariants:g,setSelectedVariants:x,selectedCollectionsDispatch:p}):e.jsx(a.VariantsGrid,{selectedVariants:g,setSelectedVariants:x,selectedCollectionsDispatch:p}):e.jsx(i.EmptyState,{title:"No Products Selected",subtitle:"Select products will appear here"})]}))};
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const Menus: ({
2
3
  displayName: string;
3
4
  key: number;
@@ -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 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
+ import{jsxs as e,jsx as t}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useState as r,useEffect as s}from"react";import{DragDropContext as n}from"react-beautiful-dnd";import{IconButton as c}from"../icon-button/IconButton.js";import{BodyCaption as l}from"../TypographyStyle.js";import{EmptyState as i}from"./emptyState.js";import{parseSelectedVariantsToArray as a}from"./helpers/ProductHelper.js";import{SelectedScreenHeader as d}from"./style.js";import{VariantsList as p,VariantsGrid as m}from"./variantComponents.js";const f=f=>{const{selectedCollections:j,selectedCollectionsDispatch:u,setScreen:g,rearrangeViewType:h}=f;console.log("vj: inside rearrangeScreen",j);const[y,v]=r(a(j));console.log("vj: selected variants",y),console.log("vj: selected Collections",j),s((()=>{v(a(j))}),[j]);return e(n,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=y,[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),v(t)}},{children:[e(d,{children:[t(c,{Icon:o,onClick:()=>{g("collections")}}),t(l,{children:"All Products"})]}),Object.keys(j).length>0?t("list"===h?p:m,{selectedVariants:y,setSelectedVariants:v,selectedCollectionsDispatch:u}):t(i,{title:"No Products Selected",subtitle:"Select products will appear here"})]}))};export{f as RearrangeScreen};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bikdotai/bik-component-library",
3
- "version": "0.0.382-beta.5",
3
+ "version": "0.0.382-beta.6",
4
4
  "description": "Bik Component Library",
5
5
  "repository": {
6
6
  "type": "git",