@bikdotai/bik-component-library 0.0.382-beta.10 → 0.0.382-beta.100

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.
Files changed (37) hide show
  1. package/dist/cjs/components/add-variableV2/AddVariableV2.js +1 -1
  2. package/dist/cjs/components/add-variableV2/AddVariableV2.styled.js +2 -0
  3. package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  4. package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  5. package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.d.ts +1 -13
  6. package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.js +1 -1
  7. package/dist/cjs/components/product-picker-v2/modal.d.ts +0 -3
  8. package/dist/cjs/components/product-picker-v2/modal.js +1 -1
  9. package/dist/cjs/components/product-picker-v2/style.d.ts +0 -3
  10. package/dist/cjs/components/product-picker-v2/style.js +11 -43
  11. package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
  12. package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
  13. package/dist/esm/components/add-variableV2/AddVariableV2.styled.js +2 -0
  14. package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
  15. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
  16. package/dist/esm/components/product-picker-v2/helpers/ProductHelper.d.ts +1 -13
  17. package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
  18. package/dist/esm/components/product-picker-v2/modal.d.ts +0 -3
  19. package/dist/esm/components/product-picker-v2/modal.js +1 -1
  20. package/dist/esm/components/product-picker-v2/style.d.ts +0 -3
  21. package/dist/esm/components/product-picker-v2/style.js +9 -41
  22. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
  23. package/package.json +1 -2
  24. package/dist/cjs/assets/icons/drag_handle.svg.js +0 -1
  25. package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +0 -18
  26. package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +0 -1
  27. package/dist/cjs/components/product-picker-v2/variant.d.ts +0 -32
  28. package/dist/cjs/components/product-picker-v2/variant.js +0 -1
  29. package/dist/cjs/components/product-picker-v2/variantComponents.d.ts +0 -21
  30. package/dist/cjs/components/product-picker-v2/variantComponents.js +0 -1
  31. package/dist/esm/assets/icons/drag_handle.svg.js +0 -1
  32. package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +0 -18
  33. package/dist/esm/components/product-picker-v2/rearrangeScreen.js +0 -1
  34. package/dist/esm/components/product-picker-v2/variant.d.ts +0 -32
  35. package/dist/esm/components/product-picker-v2/variant.js +0 -1
  36. package/dist/esm/components/product-picker-v2/variantComponents.d.ts +0 -21
  37. package/dist/esm/components/product-picker-v2/variantComponents.js +0 -1
@@ -1 +0,0 @@
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 n}from"../icon-button/IconButton.js";import{ShimmerImage as s}from"../shimmer-image/ShimmerImage.js";import{TitleRegular as c}from"../TypographyStyle.js";import{truncate as l}from"./collectionScreen.js";import{ProductHelper as m}from"./helpers/ProductHelper.js";import{VariantCardListStyle as d,VariantCardGridStyle as h}from"./style.js";import{Tooltip as p}from"../tooltips/Tooltip.js";import{Tag as g}from"../tag/Tag.js";const j=h=>{const{data:j,selectedCollectionsDispatch:f,outOfStockAction:u}=h,b=m.getProductLabels(j,u);return t(d,{children:[e(r,{width:24,height:24,color:a.content.placeholder}),e("div",{children:e(s,{width:40,height:40,imageUrl:j.image,alt:"Item",borderRadius:4},j.variantId)}),t("div",Object.assign({className:"tooltip-title-tag"},{children:[e(p,Object.assign({body:`${j.productName} ${j.name}`,placement:"bottom"},{children:e(c,{children:l(`${j.productName} ${j.name}`,34,!0)})})),b?e("div",Object.assign({style:{width:90,display:"flex"}},{children:e(g,{tagText:b,type:"warning",theme:"light"})})):e(o,{})]})),e(n,{Icon:()=>e(i,{width:24,height:24,color:a.content.placeholder}),onClick:()=>{f&&f({type:"variantUnselected",data:{productId:j.productId,variantId:j.variantId,collectionId:j.collectionId}}),h.onDelete&&h.onDelete()}})]})},f=t=>{const{data:o}=t;return e(h,{children:e(p,Object.assign({body:o.name,alwaysVisible:!1,variant:"dark",placement:"bottom"},{children:e(s,{width:72,height:72,imageUrl:o.image,alt:"Item",borderRadius:4})}))})};export{f as VariantCardGridView,j as VariantCardListView};
@@ -1,21 +0,0 @@
1
- /// <reference types="react" />
2
- import { SelectedCollectionsActions } from './reducers';
3
- import { OUT_OF_STOCK_ACTION } from './type';
4
- import { ProductVariantForRearrange } from './variant';
5
- /**
6
- * Props for list of variants - applicable both in list and grid view
7
- */
8
- export type VariantsComponentProps = {
9
- selectedVariants: ProductVariantForRearrange[];
10
- setSelectedVariants: React.Dispatch<React.SetStateAction<ProductVariantForRearrange[]>>;
11
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
12
- outOfStockAction?: OUT_OF_STOCK_ACTION;
13
- };
14
- /**
15
- * Returns a react component of variants list, which are eligible to drag and drop.
16
- */
17
- export declare const VariantsList: ({ selectedVariants, setSelectedVariants, selectedCollectionsDispatch, outOfStockAction, }: VariantsComponentProps) => import("react/jsx-runtime").JSX.Element;
18
- /**
19
- * Returns a react component of variants grid, which are eligible to drag and drop.
20
- */
21
- export declare const VariantsGrid: ({ selectedVariants }: VariantsComponentProps) => import("react/jsx-runtime").JSX.Element;
@@ -1 +0,0 @@
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 i,VariantCardGridView as s}from"./variant.js";const l=s=>{let{selectedVariants:l,setSelectedVariants:n,selectedCollectionsDispatch:o,outOfStockAction:c}=s;return e(a,Object.assign({droppableId:"droppable-list"},{children:(a,s)=>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("div",Object.assign({style:{background:t.surface.hovered,margin:"5px"}},{children: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(i,{data:r,selectedCollectionsDispatch:o,onDelete:()=>{const e=l.slice();e[a].displayOrder=null,e.splice(a,1),n(e)},outOfStockAction:c},`${r.productId}-${r.variantId}`)}))}),`${r.productId}-${r.variantId}`)}),`${r.productId}-${r.variantId}`))),a.placeholder&&s.isDraggingOver?e("div",Object.assign({style:{background:t.surface.hovered,margin:"5px"}},{children:a.placeholder})):null]}))}))},n=t=>{let{selectedVariants:i}=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:[i.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(s,{data:a}),d.placeholder]}))}),`${a.productId}-${a.variantId}`))),a.placeholder]}))})),t.placeholder]}))}))};export{n as VariantsGrid,l as VariantsList};