@bikdotai/bik-component-library 0.0.153-beta1.0 → 0.0.154-beta

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 (67) hide show
  1. package/dist/cjs/assets/icons/box.svg.js +1 -0
  2. package/dist/cjs/components/bik-layout/MockMenus.d.ts +0 -1
  3. package/dist/cjs/components/checkBox/CheckBox.d.ts +0 -4
  4. package/dist/cjs/components/checkBox/CheckBox.js +1 -1
  5. package/dist/cjs/components/checkBox/CheckBox.styled.js +1 -1
  6. package/dist/cjs/components/colourInput/ColourInput.js +1 -1
  7. package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
  8. package/dist/cjs/components/discount-modal/DiscountModal.styled.d.ts +0 -4
  9. package/dist/cjs/components/discount-modal/DiscountModal.styled.js +1 -1
  10. package/dist/cjs/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
  11. package/dist/cjs/components/discount-modal/type.d.ts +1 -0
  12. package/dist/cjs/components/modals/Modal.js +1 -1
  13. package/dist/cjs/components/modals/modal.styled.js +1 -1
  14. package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -0
  15. package/dist/cjs/components/product-picker-v2/modal.js +1 -0
  16. package/dist/cjs/components/product-picker-v2/productScreen.js +1 -0
  17. package/dist/cjs/components/{product-picker-hackathon → product-picker-v2}/style.js +13 -45
  18. package/dist/cjs/components/shimmer/ShimmerComponent/ShimmerStyled.js +2 -2
  19. package/dist/cjs/components/stepper/WorkingStepper.d.ts +0 -1
  20. package/dist/cjs/index.d.ts +1 -1
  21. package/dist/cjs/index.js +1 -1
  22. package/dist/esm/assets/icons/box.svg.js +1 -0
  23. package/dist/esm/components/bik-layout/MockMenus.d.ts +0 -1
  24. package/dist/esm/components/checkBox/CheckBox.d.ts +0 -4
  25. package/dist/esm/components/checkBox/CheckBox.js +1 -1
  26. package/dist/esm/components/checkBox/CheckBox.styled.js +1 -1
  27. package/dist/esm/components/colourInput/ColourInput.js +1 -1
  28. package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
  29. package/dist/esm/components/discount-modal/DiscountModal.styled.d.ts +0 -4
  30. package/dist/esm/components/discount-modal/DiscountModal.styled.js +1 -1
  31. package/dist/esm/components/discount-modal/StaticCoupon/StaticCoupon.js +1 -1
  32. package/dist/esm/components/discount-modal/type.d.ts +1 -0
  33. package/dist/esm/components/modals/Modal.js +1 -1
  34. package/dist/esm/components/modals/modal.styled.js +1 -1
  35. package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -0
  36. package/dist/esm/components/product-picker-v2/modal.js +1 -0
  37. package/dist/esm/components/product-picker-v2/productScreen.js +1 -0
  38. package/dist/esm/components/{product-picker-hackathon → product-picker-v2}/style.js +13 -45
  39. package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.js +2 -2
  40. package/dist/esm/components/stepper/WorkingStepper.d.ts +0 -1
  41. package/dist/esm/index.d.ts +1 -1
  42. package/dist/esm/index.js +1 -1
  43. package/package.json +1 -1
  44. package/dist/cjs/components/product-picker-hackathon/PickerHackathon.d.ts +0 -55
  45. package/dist/cjs/components/product-picker-hackathon/PickerHackathon.js +0 -1
  46. package/dist/cjs/components/product-picker-hackathon/collectionScreen.d.ts +0 -23
  47. package/dist/cjs/components/product-picker-hackathon/collectionScreen.js +0 -1
  48. package/dist/cjs/components/product-picker-hackathon/index.d.ts +0 -1
  49. package/dist/cjs/components/product-picker-hackathon/productScreen.d.ts +0 -39
  50. package/dist/cjs/components/product-picker-hackathon/productScreen.js +0 -1
  51. package/dist/cjs/components/product-picker-hackathon/reducers.d.ts +0 -17
  52. package/dist/cjs/components/product-picker-hackathon/selectedScreen.d.ts +0 -14
  53. package/dist/cjs/components/product-picker-hackathon/style.d.ts +0 -18
  54. package/dist/esm/components/product-picker-hackathon/PickerHackathon.d.ts +0 -55
  55. package/dist/esm/components/product-picker-hackathon/PickerHackathon.js +0 -1
  56. package/dist/esm/components/product-picker-hackathon/collectionScreen.d.ts +0 -23
  57. package/dist/esm/components/product-picker-hackathon/collectionScreen.js +0 -1
  58. package/dist/esm/components/product-picker-hackathon/index.d.ts +0 -1
  59. package/dist/esm/components/product-picker-hackathon/productScreen.d.ts +0 -39
  60. package/dist/esm/components/product-picker-hackathon/productScreen.js +0 -1
  61. package/dist/esm/components/product-picker-hackathon/reducers.d.ts +0 -17
  62. package/dist/esm/components/product-picker-hackathon/selectedScreen.d.ts +0 -14
  63. package/dist/esm/components/product-picker-hackathon/style.d.ts +0 -18
  64. /package/dist/cjs/components/{product-picker-hackathon → product-picker-v2}/reducers.js +0 -0
  65. /package/dist/cjs/components/{product-picker-hackathon → product-picker-v2}/selectedScreen.js +0 -0
  66. /package/dist/esm/components/{product-picker-hackathon → product-picker-v2}/reducers.js +0 -0
  67. /package/dist/esm/components/{product-picker-hackathon → product-picker-v2}/selectedScreen.js +0 -0
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, SelectedItems } from '.';
3
- import { SelectedCollectionsActions } from './reducers';
4
- interface SelectedScreenInterface {
5
- selectedCollections: SelectedItems;
6
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
7
- upliftAdditions: any;
8
- setScreen: React.Dispatch<React.SetStateAction<string>>;
9
- collections: {
10
- [key: string]: Collection;
11
- };
12
- }
13
- export declare const SelectedScreen: (props: SelectedScreenInterface) => JSX.Element;
14
- export {};
@@ -1,18 +0,0 @@
1
- export declare const PickerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const ListContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const FooterStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const PreviewContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const ScrollContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const CollectionCardStyle: import("styled-components").StyledComponent<"div", any, {
7
- isDisabled: boolean;
8
- }, never>;
9
- export declare const CollectionCardInfoStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
10
- export declare const CollectionCardDetailStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
11
- export declare const ProductScreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const ProductScreenCollectionCardStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const ProductCardStyle: import("styled-components").StyledComponent<"div", any, {
14
- isVariant: boolean;
15
- }, never>;
16
- export declare const SelectedScreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
17
- export declare const CollectionNameHolder: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export declare const ProductCard: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -1,55 +0,0 @@
1
- /// <reference types="react" />
2
- export interface ProductVariant {
3
- name: string;
4
- price: string;
5
- image: string;
6
- }
7
- export interface Product {
8
- name: string;
9
- image: string;
10
- variants?: {
11
- [key: string]: ProductVariant;
12
- };
13
- }
14
- export interface Collection {
15
- id: string;
16
- name: string;
17
- image: string;
18
- isSmartCollection: boolean;
19
- products?: {
20
- [key: string]: Product;
21
- };
22
- }
23
- export type SelectedItems = {
24
- [key: string]: Collection;
25
- };
26
- export type CollectionFetcherReturn = Promise<{
27
- collections: {
28
- [key: string]: {
29
- image: string;
30
- name: string;
31
- isSmartCollection: string;
32
- };
33
- };
34
- }>;
35
- export type ProductFetcherReturn = Promise<{
36
- [key: string]: Product;
37
- }>;
38
- export interface ProductPickerInterface {
39
- collectionFetcher: (offset: number, storeId: string) => CollectionFetcherReturn;
40
- productFetcher: (collectionId: string, storeId: string) => ProductFetcherReturn;
41
- storeId: string;
42
- selectedItems: SelectedItems;
43
- onAdd: (items: SelectedItems) => void;
44
- onClose: () => void;
45
- visible: boolean;
46
- zIndex?: number;
47
- previewElement?: boolean;
48
- onCancel: () => void;
49
- onProceed: (payload: ProductPost) => void;
50
- }
51
- export interface ProductPost {
52
- selectedProduct?: Product;
53
- selectedUrl?: string;
54
- }
55
- export declare const PickerHackathon: (props: ProductPickerInterface) => JSX.Element;
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as t}from"react/jsx-runtime";import{useReducer as c,useState as o,useEffect as l}from"react";import{CheckMark as i}from"../checkBox/CheckBox.js";import{Button as r}from"../button/Button.js";import{CollectionsScreen as s}from"./collectionScreen.js";import{ProductsScreen as n}from"./productScreen.js";import{collectionsReducer as d,selectedColectionsReducer as a,CollectionIdContext as p}from"./reducers.js";import{SelectedScreen as u}from"./selectedScreen.js";import{PickerStyle as h,ListContainerStyle as m,ScrollContainerStyle as v,PreviewContainerStyle as f,ProductCard as x,FooterStyle as b}from"./style.js";const y=y=>{const{storeId:g,selectedItems:j}=y,[C,D]=c(d,{}),[O,k]=o("collections"),[w,S]=o(""),[F,P]=o(0),[I,G]=c(a,Object.keys(j).length?j:{}),T=Object.keys(I||[]).flatMap((e=>{var t;return Object.keys((null===(t=I[e])||void 0===t?void 0:t.products)||[]).map((t=>{var c;return null===(c=I[e].products)||void 0===c?void 0:c[t]}))}))||[],[B,z]=o(),[W,A]=o(),[,M]=o(!1);l((()=>{M(!0),y.collectionFetcher(F,g).then((e=>{D({type:"fetched",data:(null==e?void 0:e.collections)||{}}),M(!1),P((e=>e+1))})).catch()}),[]),l((()=>{var e;w&&!(null===(e=null==C?void 0:C[w])||void 0===e?void 0:e.products)&&(M(!0),y.productFetcher(w,g).then((e=>{Object.keys(e).length&&(D({type:"productsFetched",data:{collectionId:w,products:e}}),M(!1))})).catch())}),[w]);return e("div",Object.assign({style:{display:"flex",flexDirection:"column",flex:1}},{children:[e(h,{children:[t(m,{children:e(v,{children:["collections"===O&&t(s,{collections:C,selectedCollectionsDispatch:G,setCollectionId:S,setScreen:k,selectedCollections:I,collectionFetcher:y.collectionFetcher,storeId:g,collectionsDispatch:D,setSaveDisabled:M,pagingControls:{curPage:F,setCurPage:P}}),"products"===O&&w&&t(p.Provider,Object.assign({value:w},{children:t(n,{productFetcher:y.productFetcher,setScreen:k,storeId:g,data:C[w],collectionsDispatch:D,selectedCollectionsDispatch:G,selectedData:I,setSaveDisabled:M})})),"view"===O&&t(u,{selectedCollections:I||{},selectedCollectionsDispatch:G,upliftAdditions:null,setScreen:k,collections:C})]})}),t(f,{children:T.length?t("div",Object.assign({style:{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:"12px",columnGap:"16px"}},{children:T.map((c=>t("div",Object.assign({style:{display:"flex",flexDirection:"row",flexWrap:"wrap",rowGap:"12px",columnGap:"16px"}},{children:c.image&&e(x,Object.assign({onClick:()=>{return e=c,t=c.image,z(e),void A(t);var e,t}},{children:[t("img",{height:160,width:160,src:c.image,style:{borderRadius:"4px"}}),W===c.image&&t("div",Object.assign({style:{position:"absolute",top:"8px",left:"8px"}},{children:t(i,{isPartial:!1,isDisabled:!1})}))]}))}),c.name)))})):t("div",{})})]}),e(b,{children:[t(r,{onClick:y.onCancel,buttonText:"Cancel",buttonType:"tertiaryGray",size:"small"}),t(r,{buttonText:"Proceed",buttonType:"primary",size:"small",onClick:()=>y.onProceed({selectedProduct:B,selectedUrl:W})})]})]}))};export{y as PickerHackathon};
@@ -1,23 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, CollectionFetcherReturn, SelectedItems } from '.';
3
- import { CollectionsActions, SelectedCollectionsActions } from './reducers';
4
- export declare const truncate: (str: string, n: number, useWordBoundary: boolean) => string;
5
- interface CollectionsScreenInterface {
6
- collections: {
7
- [key: string]: Collection;
8
- };
9
- selectedCollections: SelectedItems;
10
- collectionFetcher: (offset: number, storeId: string) => CollectionFetcherReturn;
11
- storeId: string;
12
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
13
- setCollectionId: React.Dispatch<React.SetStateAction<string>>;
14
- setScreen: React.Dispatch<React.SetStateAction<string>>;
15
- collectionsDispatch: React.Dispatch<CollectionsActions>;
16
- setSaveDisabled: React.Dispatch<boolean>;
17
- pagingControls: {
18
- curPage: number;
19
- setCurPage: React.Dispatch<React.SetStateAction<number>>;
20
- };
21
- }
22
- export declare const CollectionsScreen: (props: CollectionsScreenInterface) => JSX.Element;
23
- export {};
@@ -1 +0,0 @@
1
- import{jsxs as e,jsx as t,Fragment as o}from"react/jsx-runtime";import s from"../../assets/icons/chevronRight.svg.js";import{useRef as r,useState as c,useEffect as i}from"react";import{COLORS as n}from"../../constants/Theme.js";import{CheckBox as l}from"../checkBox/CheckBox.js";import{IconButton as d}from"../icon-button/IconButton.js";import{BikShimmer as a}from"../shimmer/ShimmerComponent/BikShimmer.js";import{TitleRegular as h,BodyCaption as u}from"../TypographyStyle.js";import{CollectionCardStyle as p,CollectionCardInfoStyle as m,CollectionCardDetailStyle as v,CollectionNameHolder as b}from"./style.js";const g=(e,t,o)=>{if(e.length<=t)return e;const s=e.slice(0,t-1);return(o?s.slice(0,s.lastIndexOf(" ")):s)+"..."},j=o=>{const{collections:s,selectedCollectionsDispatch:n,setCollectionId:l,selectedCollections:d,setScreen:h,collectionFetcher:u,collectionsDispatch:p,pagingControls:m,storeId:v,setSaveDisabled:b}=o,g=r(null),j=r(m.curPage),C=(null==d?void 0:d.isCustom)||!1,[f,k]=c(!1);i((()=>{j.current=m.curPage}),[m.curPage]),i((()=>{const e=new IntersectionObserver((e=>{e[0].isIntersecting&&j.current>0&&(b(!0),k(!0),u(j.current,v).then((e=>{p({type:"paged",data:(null==e?void 0:e.collections)||{}}),m.setCurPage(j.current+1),k(!1),b(!1)})).catch())}),{threshold:1});return g.current&&e.observe(g.current),()=>{g.current&&e.unobserve(g.current)}}),[g]);const O=e=>{var t,o;let r=0,c=0;if(d[e]){const i=null===(t=s[e])||void 0===t?void 0:t.products;i&&Object.keys(i).forEach((e=>{var t;const o=null===(t=i[e])||void 0===t?void 0:t.variants;o&&Object.keys(o).forEach((e=>r+=1))}));const n=null===(o=d[e])||void 0===o?void 0:o.products;return n&&Object.keys(n).forEach((e=>{var t;const o=null===(t=n[e])||void 0===t?void 0:t.variants;o&&Object.keys(o).forEach((e=>c+=1))})),!(r<=0&&c>0)&&(c>0&&r!==c)}return!1};return e("div",{children:[Object.keys(s).length?Object.keys(s).map((e=>t(y,{data:s[e],isDisabled:C&&!(null==d?void 0:d[e]),isChecked:!!(null==d?void 0:d[e]),isPartiallyChecked:O(e),selectedCollectionsDispatch:n,setCollectionId:l,setScreen:h,id:s[e].id},e))):[1,2,3,4,5,6,7,8,9,10].map(((e,o)=>t("div",Object.assign({style:{borderBottom:"1px solid #E0E0E0"}},{children:t(a,{boxes:[{height:"64px",width:"100%",marginTop:"0px"}]})}),o))),t("div",{ref:g}),f&&[1,2,3,4,5].map(((e,o)=>t("div",Object.assign({style:{borderBottom:"1px solid #E0E0E0"}},{children:t(a,{boxes:[{height:"64px",width:"100%",marginTop:"0px"}]})}),o)))]})},y=r=>{const{data:c,selectedCollectionsDispatch:i,setCollectionId:a,isPartiallyChecked:j,setScreen:y,id:C,isChecked:f,isDisabled:k}=r;return e(p,Object.assign({isDisabled:k},{children:[e(m,{children:[t(l,{isDisabled:k,isChecked:f,isPartiallyChecked:j,onValueChange:function(e,t){i(e?{type:"selected",data:{id:C,val:c}}:{type:"unselected",data:{id:C}}),a(e?C:"")}}),t(v,{children:e(b,{children:[t(h,{children:g(c.name,40,!0)}),Object.keys(c.products||{}).length?e(u,Object.assign({color:n.content.placeholder},{children:[Object.keys(c.products||{}).length," products"]})):t(o,{})]})})]}),t(d,{onClick:()=>{k||(a(C),y("products"))},Icon:s})]}))};export{j as CollectionsScreen,g as truncate};
@@ -1 +0,0 @@
1
- export * from './PickerHackathon';
@@ -1,39 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, Product, ProductFetcherReturn, ProductVariant, SelectedItems } from '.';
3
- import { CollectionsActions, SelectedCollectionsActions } from './reducers';
4
- interface ProductsScreenInterface {
5
- data: Collection;
6
- collectionsDispatch: React.Dispatch<CollectionsActions>;
7
- selectedData: SelectedItems;
8
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
9
- productFetcher: (collectionId: string, storeId: string) => ProductFetcherReturn;
10
- storeId: string;
11
- setScreen: React.Dispatch<React.SetStateAction<string>>;
12
- setSaveDisabled: React.Dispatch<React.SetStateAction<boolean>>;
13
- }
14
- export declare const ProductsScreen: (props: ProductsScreenInterface) => JSX.Element;
15
- interface ProductGroupInterface {
16
- collectionId: string;
17
- productId: string;
18
- data: Product;
19
- selectedData: SelectedItems;
20
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
21
- upliftAdditions: any;
22
- viewOnly: boolean;
23
- isProductPartiallyChecked?: boolean;
24
- }
25
- export declare const ProductGroup: (props: ProductGroupInterface) => JSX.Element;
26
- interface ProductCardInterface {
27
- isVariant: boolean;
28
- data: Product | ProductVariant;
29
- productId: string;
30
- collectionId: string;
31
- variantId?: string;
32
- isSelected: boolean;
33
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
34
- upliftAdditions: any;
35
- viewOnly: boolean;
36
- isPartiallyChecked?: boolean;
37
- }
38
- export declare const ProductCard: (props: ProductCardInterface) => JSX.Element;
39
- export {};
@@ -1 +0,0 @@
1
- import{jsxs as t,jsx as o,Fragment as e}from"react/jsx-runtime";import i from"../../assets/icons/arrow_left.svg.js";import{cloneDeep as d}from"lodash";import{useContext as c,useState as l,useEffect as n}from"react";import{COLORS as r}from"../../constants/Theme.js";import{CheckBox as s}from"../checkBox/CheckBox.js";import{IconButton as a}from"../icon-button/IconButton.js";import{BikShimmer as p}from"../shimmer/ShimmerComponent/BikShimmer.js";import{BodyCaption as u,TitleRegular as v}from"../TypographyStyle.js";import{truncate as h}from"./collectionScreen.js";import{CollectionIdContext as m}from"./reducers.js";import{ProductScreenHeader as y,ProductCardStyle as I}from"./style.js";const j=e=>{const s=c(m),{data:v,collectionsDispatch:h,selectedData:I,selectedCollectionsDispatch:j,productFetcher:O,storeId:g,setScreen:b,setSaveDisabled:C}=e,[k]=l(v),D=(null==v?void 0:v.isSmartCollection)||!1,S=t=>{var o,e,i,d,c,l,n,r;let a=0,p=0;return!!((null===(e=null===(o=null==I?void 0:I[s])||void 0===o?void 0:o.products)||void 0===e?void 0:e[t])&&(null===(c=Object.keys((null===(d=null===(i=null==v?void 0:v.products)||void 0===i?void 0:i[t])||void 0===d?void 0:d.variants)||[]))||void 0===c||c.forEach((()=>p++)),Object.keys((null===(r=null===(n=null===(l=null==I?void 0:I[s])||void 0===l?void 0:l.products)||void 0===n?void 0:n[t])||void 0===r?void 0:r.variants)||[]).forEach((()=>a++)),a>0&&p!==a))};n((()=>{(null==v?void 0:v.products)||(C(!0),O(s,g).then((t=>{Object.keys(t||[]).length&&h({type:"productsFetched",data:{collectionId:s,products:t}}),C(!1)})).catch())}),[]);const x=(t,o)=>{const e=d(v);if(delete e.products,(o=Object.assign(Object.assign({},o),{catalogOnlyData:e})).productId&&v.products){const t=d(v.products[o.productId]);(null==t?void 0:t.variants)&&delete t.variants,o=Object.assign(Object.assign({},o),{catalogOnlyData:e,productOnlyData:t})}j({type:t,data:o})};return t("div",{children:[t(y,{children:[o(a,{Icon:i,height:16,onClick:()=>{b("collections")}}),o(u,Object.assign({style:{color:r.content.secondary}},{children:null==v?void 0:v.name}))]}),o("div",{children:Object.keys((null==k?void 0:k.products)||[]).length?Object.keys(k.products||[]).map((t=>o(f,{collectionId:s,isProductPartiallyChecked:S(t),productId:t,data:k.products[t],selectedData:I,selectedCollectionsDispatch:j,upliftAdditions:x,viewOnly:!!D},t))):[1,2,3,4,5,6,7,8,9,10].map(((t,e)=>o("div",Object.assign({style:{borderBottom:"1px solid #E0E0E0"}},{children:o(p,{boxes:[{height:"64px",width:"100%",marginTop:"0px"}]})}),e)))})]})},f=t=>{const{collectionId:e,productId:i,data:d,selectedData:c,selectedCollectionsDispatch:l,upliftAdditions:n,viewOnly:r,isProductPartiallyChecked:s}=t;return o("div",{children:o(O,{isVariant:!1,data:d,productId:i,collectionId:e,isSelected:!!(null===(p=null===(a=null==c?void 0:c[e])||void 0===a?void 0:a.products)||void 0===p?void 0:p[i]),isPartiallyChecked:s,selectedCollectionsDispatch:l,upliftAdditions:n,viewOnly:r},i)});var a,p},O=i=>{const{isVariant:d,data:c,productId:l,collectionId:n,variantId:r,isSelected:a,selectedCollectionsDispatch:p,upliftAdditions:u,viewOnly:m,isPartiallyChecked:y}=i;return t(I,Object.assign({isVariant:d},{children:[m?o(e,{}):o(s,{isChecked:a,isPartiallyChecked:y||!1,onValueChange:function(t){d?t?u("variantSelected",{productId:l,variantId:r,collectionId:n,variant:c}):p({type:"variantUnselected",data:{productId:l,variantId:r,collectionId:n}}):t?u("productSelected",{productId:l,collectionId:n,product:c}):p({type:"productUnselected",data:{productId:l,collectionId:n}})}}),o(v,{children:h(null==c?void 0:c.name,40,!0)})]}))};export{O as ProductCard,f as ProductGroup,j as ProductsScreen};
@@ -1,17 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, SelectedItems } from '.';
3
- export interface SelectedCollectionsActions {
4
- type: string;
5
- data: {
6
- [key: string]: any;
7
- };
8
- }
9
- export declare function selectedColectionsReducer(collections: SelectedItems, action: SelectedCollectionsActions): SelectedItems;
10
- export interface CollectionsActions {
11
- type: string;
12
- data: {
13
- [key: string]: any;
14
- };
15
- }
16
- export declare function collectionsReducer(collections: Collection, action: CollectionsActions): any;
17
- export declare const CollectionIdContext: import("react").Context<string>;
@@ -1,14 +0,0 @@
1
- /// <reference types="react" />
2
- import { Collection, SelectedItems } from '.';
3
- import { SelectedCollectionsActions } from './reducers';
4
- interface SelectedScreenInterface {
5
- selectedCollections: SelectedItems;
6
- selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
7
- upliftAdditions: any;
8
- setScreen: React.Dispatch<React.SetStateAction<string>>;
9
- collections: {
10
- [key: string]: Collection;
11
- };
12
- }
13
- export declare const SelectedScreen: (props: SelectedScreenInterface) => JSX.Element;
14
- export {};
@@ -1,18 +0,0 @@
1
- export declare const PickerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
2
- export declare const ListContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
3
- export declare const FooterStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
4
- export declare const PreviewContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
5
- export declare const ScrollContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
6
- export declare const CollectionCardStyle: import("styled-components").StyledComponent<"div", any, {
7
- isDisabled: boolean;
8
- }, never>;
9
- export declare const CollectionCardInfoStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
10
- export declare const CollectionCardDetailStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
11
- export declare const ProductScreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
12
- export declare const ProductScreenCollectionCardStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
13
- export declare const ProductCardStyle: import("styled-components").StyledComponent<"div", any, {
14
- isVariant: boolean;
15
- }, never>;
16
- export declare const SelectedScreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
17
- export declare const CollectionNameHolder: import("styled-components").StyledComponent<"div", any, {}, never>;
18
- export declare const ProductCard: import("styled-components").StyledComponent<"div", any, {}, never>;