@bikdotai/bik-component-library 0.0.664 → 0.0.665-beta.0.1
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/_virtual/bik-store.js +1 -0
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/cjs/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/cjs/components/alerts/Alert.d.ts +3 -0
- package/dist/cjs/components/alerts/Alert.js +1 -1
- package/dist/cjs/components/alerts/Alert.styled.d.ts +2 -0
- package/dist/cjs/components/alerts/Alert.styled.js +10 -2
- package/dist/cjs/components/alerts/AlertHelper.d.ts +2 -1
- package/dist/cjs/components/alerts/AlertHelper.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/discount-modal/DiscountModal.d.ts +2 -0
- package/dist/cjs/components/discount-modal/DiscountModal.js +1 -1
- package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +7 -5
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/productScreen.d.ts +5 -3
- package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/searchScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/selectedScreen.d.ts +3 -1
- package/dist/cjs/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/utility.d.ts +2 -1
- package/dist/cjs/components/product-picker-v2/utility.js +1 -1
- package/dist/cjs/node_modules/@bikdotai/bik-models/growth/models/bik-store.js +1 -0
- package/dist/esm/_virtual/bik-store.js +1 -0
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/components/EventsTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/EVENTS/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/components/IGTrigger.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts +1 -1
- package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts +2 -2
- package/dist/esm/components/alerts/Alert.d.ts +3 -0
- package/dist/esm/components/alerts/Alert.js +1 -1
- package/dist/esm/components/alerts/Alert.styled.d.ts +2 -0
- package/dist/esm/components/alerts/Alert.styled.js +13 -5
- package/dist/esm/components/alerts/AlertHelper.d.ts +2 -1
- package/dist/esm/components/alerts/AlertHelper.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/discount-modal/DiscountModal.d.ts +2 -0
- package/dist/esm/components/discount-modal/DiscountModal.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +7 -5
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/productScreen.d.ts +5 -3
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/searchScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/searchScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.d.ts +3 -1
- package/dist/esm/components/product-picker-v2/selectedScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/utility.d.ts +2 -1
- package/dist/esm/components/product-picker-v2/utility.js +1 -1
- package/dist/esm/node_modules/@bikdotai/bik-models/growth/models/bik-store.js +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronRight.svg.js"),l=require("react"),i=require("../checkBox/CheckBox.js"),o=require("../icon-button/IconButton.js"),s=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),r=require("../TypographyStyle.js"),n=require("./emptyState.js"),d=require("./ProductPickerShimmer.js"),a=require("./style.js"),u=require("./utility.js");const h=l=>{const{customCollectionRestriction:n,data:d,selectedCollectionsDispatch:u,setCollectionId:h,setSelectedCollectionId:C,isPartiallyChecked:p,setScreen:j,id:v,isChecked:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/chevronRight.svg.js"),l=require("react"),i=require("../checkBox/CheckBox.js"),o=require("../icon-button/IconButton.js"),s=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),r=require("../TypographyStyle.js"),n=require("./emptyState.js"),d=require("./ProductPickerShimmer.js"),a=require("./style.js"),u=require("./utility.js");const h=l=>{const{customCollectionRestriction:n,data:d,selectedCollectionsDispatch:u,setCollectionId:h,setSelectedCollectionId:C,isPartiallyChecked:p,setScreen:j,id:v,isChecked:y,isDisabled:g,hideCollectionCheckbox:x,pickerType:m,usedInSearch:b}=l;return d?e.jsxs(a.CollectionCardStyle,Object.assign({isDisabled:g,onClick:e=>{if(!g){if("COLLECTION"===m)return e.stopPropagation(),u({type:"reset",data:{}}),u({type:"selected",data:{id:v,val:d,isRestricted:n}}),h(v),void C(v);h(v),C(v),j("products")}},isActive:y,usedInSearch:null!=b&&b},{children:[e.jsxs(a.CollectionCardInfoStyle,{children:[!x&&e.jsx(i.CheckBox,{isDisabled:g,isChecked:y,isPartiallyChecked:p,onValueChange:function(e,t,l){null==l||l.stopPropagation(),u(e?{type:"selected",data:{id:v,val:d,isRestricted:n}}:{type:"unselected",data:{id:v}}),C(e?v:"")}}),e.jsx(a.CollectionCardDetailStyle,{children:e.jsx(c.Tooltip,Object.assign({body:d.name,placement:"bottom",delay:400,variant:"light"},{children:e.jsxs(a.CollectionNameHolder,{children:[b?e.jsx(r.BodyPrimary,Object.assign({numberOfLines:1},{children:d.name})):e.jsx(r.TitleRegular,Object.assign({numberOfLines:1},{children:d.name})),d.isSmartCollection?e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(s.Tag,{tagText:"Smart Collection",type:"warning"})})):e.jsx(e.Fragment,{})]})}))})]}),"COLLECTION"!==m&&e.jsx(o.IconButton,{height:12,width:12,disabled:g,Icon:t.default})]})):e.jsx(e.Fragment,{})};exports.CollectionCard=h,exports.CollectionsScreen=t=>{var i;const{customCollectionRestriction:o,dataLoading:s,collections:c,selectedCollectionsDispatch:r,setCollectionId:a,setSelectedCollectionId:C,selectedCollections:p,setScreen:j,collectionFetcher:v,collectionsDispatch:y,pagingControls:g,storeId:x,setSaveDisabled:m,hideCollectionCheckbox:b,renderWithoutModal:k,pickerType:f,scrollContainerRef:S,appType:P}=t,O=l.useRef(g.curPage),I=!!o&&(null==p?void 0:p.isCustom),[T,q]=l.useState(!1),R=l.useRef(!1),D=l.useRef(!1),L=()=>{if(!S||!(null==S?void 0:S.current))return;const{scrollTop:e,clientHeight:t,scrollHeight:l}=S.current;e+t>=l-20&&!R.current&&!D.current&&(m(!0),q(!0),D.current=!0,m(!0),q(!0),v(O.current,x,P).then((e=>{y({type:"paged",data:(null==e?void 0:e.collections)||{}}),g.setCurPage(O.current+1),q(!1),m(!1),D.current=!1,Object.keys(null==e?void 0:e.collections).length||(R.current=!0)})).catch())};return l.useEffect((()=>{var e;return null===(e=null==S?void 0:S.current)||void 0===e||e.addEventListener("scroll",L),()=>{var e;null===(e=null==S?void 0:S.current)||void 0===e||e.removeEventListener("scroll",L)}}),[]),l.useEffect((()=>{O.current=g.curPage}),[g.curPage]),e.jsxs("div",{children:[(null===(i=Object.keys(null!=c?c:{}))||void 0===i?void 0:i.length)?Object.keys(c).map((t=>{var l,i;const s=!!(null==p?void 0:p[t])&&("PRODUCT"!==f||!!Object.keys(null!==(i=null===(l=null==p?void 0:p[t])||void 0===l?void 0:l.products)&&void 0!==i?i:{}).length);return e.jsx(h,{customCollectionRestriction:o,data:c[t],isDisabled:I&&!(null==p?void 0:p[t]),isChecked:s,isPartiallyChecked:u.isCollectionPartiallyChecked(t,null==c?void 0:c[t],p),selectedCollectionsDispatch:r,setCollectionId:a,setSelectedCollectionId:C,setScreen:j,id:t,hideCollectionCheckbox:b||"-1"===t,selectedCollections:p,renderWithoutModal:k,pickerType:f},t)})):s?e.jsx(d.ProductPickerShimmer,{}):e.jsx(n.EmptyState,{title:"No collections to show",subtitle:"We couldn’t find any collection."}),T&&e.jsx(d.ProductPickerShimmer,{})]})},exports.truncate=(e,t,l)=>{if(!e)return"";if(e.length<=t)return e;const i=e.slice(0,t-1);return(l?i.slice(0,i.lastIndexOf(" ")):i)+"..."};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
2
3
|
import { ButtonProps } from '../button/model';
|
|
3
4
|
import { FooterForNonModalI, OUT_OF_STOCK_ACTION } from './type';
|
|
4
5
|
export interface ProductVariant {
|
|
@@ -68,12 +69,13 @@ export type ProductPickerInterface = {
|
|
|
68
69
|
hideGlobalSearch?: boolean;
|
|
69
70
|
hideInCollectionSearch?: boolean;
|
|
70
71
|
customCollectionRestriction?: boolean;
|
|
71
|
-
searchInCollectionFetcher: (storeId: string, collectionId: string, query: string) => ProductFetcherReturn;
|
|
72
|
-
searchFetcher: (storeId: string, query: string) => Promise<SearchedItems | SelectedItems>;
|
|
73
|
-
collectionFetcher: (offset: number, storeId: string) => CollectionFetcherReturn;
|
|
74
|
-
productFetcher: (collectionId: string, storeId: string, limit?: number, offset?: number) => ProductFetcherReturn;
|
|
75
|
-
fbStatusFetcher?: (storeId: string, variantIds: string[]) => FbStatusFetcherReturn;
|
|
72
|
+
searchInCollectionFetcher: (storeId: string, collectionId: string, query: string, appType: ApplicationType) => ProductFetcherReturn;
|
|
73
|
+
searchFetcher: (storeId: string, query: string, appType: ApplicationType) => Promise<SearchedItems | SelectedItems>;
|
|
74
|
+
collectionFetcher: (offset: number, storeId: string, appType: ApplicationType) => CollectionFetcherReturn;
|
|
75
|
+
productFetcher: (collectionId: string, storeId: string, appType: ApplicationType, limit?: number, offset?: number) => ProductFetcherReturn;
|
|
76
|
+
fbStatusFetcher?: (storeId: string, variantIds: string[], appType: ApplicationType) => FbStatusFetcherReturn;
|
|
76
77
|
storeId: string;
|
|
78
|
+
appType?: ApplicationType;
|
|
77
79
|
selectedItems: SelectedItems;
|
|
78
80
|
onAdd: (items: SelectedItems, total: number, secondaryClick?: boolean) => void;
|
|
79
81
|
onClose?: () => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime");require("../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js");var t,o=require("../../assets/icons/search.svg.js"),r=require("react"),c=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"),p=require("./productInfoOverlay.js"),h=require("./productScreen.js"),S=require("./rearrangeScreen.js"),g=require("./reducers.js"),x=require("./searchScreen.js"),C=require("./selectedScreen.js"),y=require("./style.js"),j=require("./type.js"),m=require("./utility.js"),b=require("../../_virtual/bik-store.js");exports.ScreenName=void 0,(t=exports.ScreenName||(exports.ScreenName={})).Collections="collections",t.RearrangeProducts="rearrange",t.SelectedProducts="view",t.SearchProducts="searchProducts",t.Products="products";exports.ProductPickerModal=t=>{const{storeId:f,selectedItems:v,onClose:k,visible:I,zIndex:P,exactLimit:O,limit:F,hideCollectionCheckbox:T,hideProductCheckbox:R,outOfStockAction:D=j.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:q,selectProductsFromCustomCollection:N,hideSelectionCount:E,title:A,width:w,left:B,renderWithoutModal:L,onClickSave:M,pickerType:V,hideProductVariants:_=!1,startupScreen:z=exports.ScreenName.Collections,rearrangeEnabled:$,selectSingleItem:H=!1,showProductDetails:K,containerStyle:W,crossButtonInsideHeader:G=!1,footerForNonModal:U={},primaryButton:Y,secondaryButton:J,subtitle:Q}=t,X=t.appType||b.__exports.ApplicationType.BIK,[Z,ee]=r.useReducer(g.collectionsReducer,{}),[te,oe]=r.useState([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(z)?z:exports.ScreenName.Collections),[re,ce]=r.useState("grid"),[se,ne]=r.useState(""),[ie,le]=r.useState(""),[ae,de]=r.useState(0),[ue,pe]=r.useState(!1),[he,Se]=r.useState(0),[ge,xe]=r.useState(""),[Ce,ye]=r.useState(!1),[je,me]=r.useState(!1),[be,fe]=r.useReducer(g.searchReducer,{collections:{},products:{}}),[ve,ke]=r.useReducer(g.selectedColectionsReducer,Object.keys(v).length>0?v:{}),Ie=r.useRef(null),[Pe,Oe]=r.useState(!1),[Fe,Te]=r.useState();r.useEffect((()=>{pe(!0),me(!0),t.collectionFetcher(ae,f,X).then((e=>{ee({type:"fetched",data:(null==e?void 0:e.collections)||{}}),pe(!1),de((e=>e+1)),me(!1)})).catch()}),[]),r.useEffect((()=>{let e=0;_?Object.keys(ve||[]).forEach((t=>{var o;Object.keys((null===(o=ve[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var r;"-1"!==t&&ve[-1]&&(null===(r=ve[-1].products)||void 0===r?void 0:r[o])||(e+=1)}))})):Object.keys(ve||[]).forEach((t=>{var o;Object.keys((null===(o=ve[t])||void 0===o?void 0:o.products)||[]).forEach((o=>{var r,c;Object.keys((null===(c=null===(r=ve[t].products)||void 0===r?void 0:r[o])||void 0===c?void 0:c.variants)||[]).forEach((()=>{e+=1}))}))})),Se(e)}),[Z,ve,_]),r.useEffect((()=>{ie&&(pe(!0),t.productFetcher(ie,f,X).then((e=>{Object.keys(e).length&&ee({type:"productsFetched",data:{collectionId:ie,products:e}}),pe(!1)})).catch())}),[ie]),r.useEffect((()=>{const e=setTimeout((()=>{"rearrange"!==te&&(ge.length||"collections"!==te)&&(ge.length?(ye(!0),t.searchFetcher(f,ge,X).then((e=>{"collections"in e&&"products"in e?(fe({type:"set",data:e}),ee({type:"searched",data:e.collections})):(fe({type:"set",data:{collections:{},products:e}}),ee({type:"searched",data:e})),oe("searchProducts"),pe(!1),ye(!1)}))):oe("collections"))}),800);return()=>clearTimeout(e)}),[ge]),r.useEffect((()=>{M&&(t.onAdd(ve,he),Re())}),[M]),r.useEffect((()=>{H&&Object.keys(ve||{}).length&&he&&(t.onAdd(ve,he),Re())}),[H,ve,he]);const Re=()=>{ke({type:"reset",data:{}})},De=()=>O&&he>O?e.jsx(d.Tag,{tagText:`You can only select ${O} products`,type:"negative"}):F&&he>F?e.jsx(d.Tag,{tagText:`You can only select ${F} products`,type:"negative"}):he>0?e.jsx(n.Button,{onClick:()=>{oe($?exports.ScreenName.RearrangeProducts:exports.ScreenName.SelectedProducts)},buttonText:O?`${he}/${O} products selected`:`${he} products selected`,buttonType:["rearrange","view"].includes(te)?"tertiaryGray":"tertiary",disabled:["rearrange","view"].includes(te)}):e.jsx(n.Button,{disabled:!0,buttonText:O?`${he}/${O} products selected`:`${he} products selected`,buttonType:"tertiaryGray"}),qe=e=>ue?"Loading...":te===exports.ScreenName.RearrangeProducts?null!=e?e:"Done":null!=e?e:"Add",Ne=e.jsxs(y.ContainerStyle,Object.assign({style:null!=W?W:{}},{children:[t.postHeader&&e.jsx("div",Object.assign({style:{padding:"0 24px"}},{children:t.postHeader})),!t.hideGlobalSearch&&e.jsx(e.Fragment,{children:("collections"===te||"searchProducts"===te)&&e.jsx("div",Object.assign({style:{padding:L?"8px 16px":"12px 24px",borderBottom:"1px solid #E0E0E0"}},{children:e.jsx(i.Input,{placeholder:"Search using ID, Name or SKU ID",noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>Ce?e.jsx(a.Spinner,{size:"small",color:c.COLORS.content.primary}):e.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:ge,onChangeText:e=>{e.length&&e.trim().length?xe(e):xe("")}})}))}),e.jsxs(y.ScrollContainerStyle,Object.assign({ref:Ie,screenName:te},{children:["collections"===te&&e.jsx(u.CollectionsScreen,{customCollectionRestriction:t.customCollectionRestriction,dataLoading:je,collections:Z,selectedCollectionsDispatch:ke,setCollectionId:ne,setSelectedCollectionId:le,setScreen:oe,selectedCollections:ve,collectionFetcher:t.collectionFetcher,storeId:f,appType:X,collectionsDispatch:ee,setSaveDisabled:pe,pagingControls:{curPage:ae,setCurPage:de},hideCollectionCheckbox:T,renderWithoutModal:L,pickerType:V,scrollContainerRef:Ie}),"products"===te&&se&&e.jsx(g.CollectionIdContext.Provider,Object.assign({value:se},{children:e.jsx(h.ProductsScreen,{hideInCollectionSearch:t.hideInCollectionSearch,customCollectionRestriction:t.customCollectionRestriction,productFetcher:t.productFetcher,setScreen:oe,storeId:f,appType:X,data:Z[se],collectionsDispatch:ee,selectedCollectionsDispatch:ke,selectedData:ve,setSaveDisabled:pe,searchInCollectionFetcher:t.searchInCollectionFetcher,hideProductCheckbox:R,outOfStockAction:D,hideVariantCheckbox:q,selectProductsFromCustomCollection:N,renderWithoutModal:L,pickerType:V,hideProductVariants:_,fbStatusFetcher:t.fbStatusFetcher,onProductDetailClick:e=>{Oe(!0),Te(e)},showProductDetailInfoIcon:K,scrollContainerRef:Ie})})),"view"===te&&e.jsx(C.SelectedScreen,{selectedCollections:ve||{},selectedCollectionsDispatch:ke,setScreen:oe,collections:Z,hideProductVariants:_,outOfStockAction:D,storeId:f,appType:X,fbStatusFetcher:t.fbStatusFetcher}),"rearrange"===te&&e.jsx(S.RearrangeScreen,{selectedCollections:ve||{},selectedCollectionsDispatch:ke,setScreen:oe,outOfStockAction:D,rearrangeViewType:"grid"===re?"list":"grid",scrollContainerRef:Ie,storeId:f,appType:X,fbStatusFetcher:t.fbStatusFetcher}),"searchProducts"===te&&e.jsx(x.SearchScreen,{customCollectionRestriction:t.customCollectionRestriction,selectedCollections:ve||{},searchedCollections:be||{},searchedCollectionsDispatch:fe,selectedCollectionsDispatch:ke,setScreen:oe,collections:Z,onBackPress:()=>{xe(""),fe({type:"set",data:{collections:{},products:{}}})},pickerType:V,hideProductCheckbox:R,hideProductVariants:_,hideVariantCheckbox:q,storeId:f,appType:X,fbStatusFetcher:t.fbStatusFetcher,setCollectionId:ne,setSelectedCollectionId:le,renderWithoutModal:L,hideCollectionCheckbox:T,outOfStockAction:D})]}))]}));return e.jsx(e.Fragment,{children:L?e.jsxs(e.Fragment,{children:[Ne,U.renderFooter?e.jsxs(y.StyledFooterForNonModal,{children:[De(),e.jsx(n.Button,{buttonText:qe(U.primaryButtonText),disabled:!U.isLoading&&(ue||he<1||O&&he<O||!O&&F&&he>F)||U.primaryButtonDisabled,isLoading:U.isLoading,onClick:()=>{t.onAdd(ve,he),Re(),oe([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(z)?z:exports.ScreenName.Collections)}})]}):e.jsx(e.Fragment,{}),Pe&&Fe?e.jsx(p.ProductInfoOverlay,{productData:Fe,outOfStockAction:D,useDynamicInfoImageSize:t.useDynamicInfoImageSize,onClose:()=>{Oe(!1)}}):e.jsx(e.Fragment,{})]}):e.jsxs(l.StyledModal,Object.assign({zIndex:P,open:I,onClose:()=>{null==k||k(),Re()},headingTitle:A||("collections"===te||"products"===te?"Select Products":"view"===te?"Selected Products":"searchProducts"===te?"Searched Results":"rearrange"===te?"Rearrange Products":void 0),headingSubtitle:Q,footerShadow:!0,centralContainerStyles:{width:w||"600px",left:B||"auto"},headerRightCustomElement:G?e.jsx("div",Object.assign({style:{cursor:"pointer",display:"flex"},onClick:k},{children:e.jsx(s.default,{width:20,height:20,color:c.COLORS.content.secondary})})):e.jsx(e.Fragment,{}),footerContainerStyle:t.stickyFooter?{position:"absolute",bottom:0,left:0,width:"100%",zIndex:9,background:c.COLORS.surface.standard}:void 0,primaryButton:Y?(e=>Object.assign(Object.assign({},e),{disabled:!e.isLoading&&(ue||he<1||O&&he<O||!O&&F&&he>F)||e.disabled,onClick:()=>{t.onAdd(ve,he),Re(),oe([exports.ScreenName.Collections,exports.ScreenName.RearrangeProducts].includes(z)?z:exports.ScreenName.Collections)}}))(Y):{buttonText:qe(),disabled:ue||he<1||O&&he<O||!O&&F&&he>F||!1,onClick:()=>{t.onAdd(ve,he),Re()}},secondaryButton:J?(e=>Object.assign(Object.assign({},e),{disabled:ue||he<1||O&&he<O||!O&&F&&he>F||!1,onClick:()=>{const e=m.updateAllVariantsForSelectedProducts(ve,Z,be);t.onAdd(e,he,!0)}}))(J):void 0,wrapperStyle:t.stickyFooter?{height:"calc(100vh - 168px)"}:void 0,footerLeftCustomElement:E?e.jsx(e.Fragment,{}):De(),hideCrossButton:Pe||G},{children:[Ne,Pe&&Fe?e.jsx(p.ProductInfoOverlay,{productData:Fe,useDynamicInfoImageSize:t.useDynamicInfoImageSize,outOfStockAction:D,onClose:()=>{Oe(!1)}}):e.jsx(e.Fragment,{})]}))})};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { Collection, FbStatusFetcherReturn, Product, ProductFetcherReturn, ProductVariant, SelectedItems } from '.';
|
|
3
4
|
import { CollectionsActions, SelectedCollectionsActions } from './reducers';
|
|
@@ -9,9 +10,10 @@ interface ProductsScreenInterface {
|
|
|
9
10
|
collectionsDispatch: React.Dispatch<CollectionsActions>;
|
|
10
11
|
selectedData: SelectedItems;
|
|
11
12
|
selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
|
|
12
|
-
searchInCollectionFetcher: (storeId: string, collectionId: string, query: string) => ProductFetcherReturn;
|
|
13
|
-
productFetcher: (collectionId: string, storeId: string, limit?: number, offset?: number) => ProductFetcherReturn;
|
|
13
|
+
searchInCollectionFetcher: (storeId: string, collectionId: string, query: string, appType: ApplicationType) => ProductFetcherReturn;
|
|
14
|
+
productFetcher: (collectionId: string, storeId: string, appType: ApplicationType, limit?: number, offset?: number) => ProductFetcherReturn;
|
|
14
15
|
storeId: string;
|
|
16
|
+
appType: ApplicationType;
|
|
15
17
|
setScreen: React.Dispatch<React.SetStateAction<string>>;
|
|
16
18
|
setSaveDisabled: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
19
|
hideProductCheckbox?: boolean;
|
|
@@ -22,7 +24,7 @@ interface ProductsScreenInterface {
|
|
|
22
24
|
pickerType?: 'COLLECTION' | 'PRODUCT';
|
|
23
25
|
hideProductVariants?: boolean;
|
|
24
26
|
showProductDetailInfoIcon?: boolean;
|
|
25
|
-
fbStatusFetcher?: (storeId: string, variantIds: string[]) => FbStatusFetcherReturn;
|
|
27
|
+
fbStatusFetcher?: (storeId: string, variantIds: string[], appType: ApplicationType) => FbStatusFetcherReturn;
|
|
26
28
|
onProductDetailClick: (productData: Product | ProductVariant) => void;
|
|
27
29
|
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
28
30
|
}
|
|
@@ -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"),r=require("../../assets/icons/box.svg.js"),c=require("../../assets/icons/search.svg.js"),o=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:
|
|
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"),c=require("../../assets/icons/search.svg.js"),o=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:T,customCollectionRestriction:E,hideProductCheckbox:R,outOfStockAction:V=O.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:L=!1,selectProductsFromCustomCollection:F=!1,pickerType:w,hideProductVariants:B,fbStatusFetcher:_,onProductDetailClick:U,showProductDetailInfoIcon:K,scrollContainerRef:M,appType:N}=f,H=s.useContext(g.CollectionIdContext),J=s.useRef(0),W=s.useRef(!1),[z,G]=s.useState(""),[Q,X]=s.useState(!1),[Y,Z]=s.useState(P),$=s.useRef(!0),ee=s.useRef(!1);s.useEffect((()=>{if($.current)return void($.current=!1);const e=setTimeout((()=>{z.length?(X(!0),f.searchInCollectionFetcher(q,H,z,N).then((e=>{const t=o.cloneDeep(P);t.products=e,Z(t);const r=b.getVariantIdsToFetchAtProductLevel(null!=e?e:{});re(r,null!=e?e:{},!0),D(!1),X(!1)}))):Z(P)}),800);return()=>clearTimeout(e)}),[z]);s.useEffect((()=>{var e,t,r,c;ee.current=!1,J.current=Math.floor((null===(t=Object.keys(null!==(e=P.products)&&void 0!==e?e:{}))||void 0===t?void 0:t.length)/10);const o=b.getVariantIdsToFetchAtProductLevel(null!==(r=P.products)&&void 0!==r?r:{});re(o,null!==(c=P.products)&&void 0!==c?c:{})}),[H]);const te=!!E&&P.isSmartCollection;s.useEffect((()=>{(null==P?void 0:P.products)||ce(10)}),[]);const re=(e,t,r)=>{_||(r?b.markVariantsAsApprovedProductsLevel(t,x,H,Y,Z):b.markVariantsAsApprovedProductsLevel(t,x,H)),e.length>0&&_&&_(q,e,N).then((e=>{const c=Object.assign({},t);Object.keys(t).forEach((r=>{var o,s;Object.keys(null!==(s=null===(o=null==t?void 0:t[r])||void 0===o?void 0:o.variants)&&void 0!==s?s:{}).forEach((o=>{var s,n;const i=null===(s=null==t?void 0:t[r].variants)||void 0===s?void 0:s[o];i&&"REJECTED"===e[o]?i.fbStatus="REJECTED":i&&"APPROVED"===e[o]&&(i.fbStatus="APPROVED");const l=null===(n=null==c?void 0:c[r])||void 0===n?void 0:n.variants;l&&l[o]&&(l[o]=i)}))})),r?(Z((e=>{const t=Object.assign({},e);return t.products=c,t})),x({type:"productsPaged",data:{collectionId:H,products:c}})):x({type:"productsPaged",data:{collectionId:H,products:c}})})).catch((e=>{r?b.markVariantsAsApprovedProductsLevel(t,x,H,Y,Z):b.markVariantsAsApprovedProductsLevel(t,x,H)}))},ce=e=>{D(!0),X(!0),m(H,q,N,e,0).then((t=>{if(Object.keys(t).length||(ee.current=!0),Object.keys(t).length){Z(Object.assign(Object.assign({},Y),{products:t}));const e=b.getVariantIdsToFetchAtProductLevel(t);re(e,t),J.current=1}e||I({type:"selected",data:{id:H,val:Object.assign(Object.assign({},P),{products:t})}}),D(!1),X(!1)})).catch()},oe=(e,t)=>{const r=b.liftTheStateUp(t,P);I({type:e,data:Object.assign(Object.assign({},r),{isRestricted:E})})},se=!!(null==S?void 0:S[H])&&!!Object.keys(null!==(C=null===(k=null==S?void 0:S[H])||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}))]}),!T&&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:()=>Q&&z.length?e.jsx(a.Spinner,{size:"small",color:n.COLORS.content.primary}):e.jsx(c.default,{})},id:"listInput",height:"24px",type:"text",value:z,onChangeText:e=>{e.length&&e.trim().length?G(e):G("")},placeholder:"Search using ID, Name or SKU ID"})})),Object.keys((null==Y?void 0:Y.products)||[]).length>0&&!te&&!z.length&&!R&&"-1"!==H&&e.jsxs(y.ProductScreenCollectionCardStyle,{children:[e.jsx(i.CheckBox,{isChecked:se,isPartiallyChecked:b.isCollectionPartiallyChecked(H,Y,S,B),onValueChange:function(e){e?ce():I({type:"unselected",data:{id:H}})}}),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==Y?void 0:Y.products)||[]).length<10)&&!!Object.keys((null==Y?void 0:Y.products)||[]).length,fetchMore:()=>(W.current=!0,m(H,q,N,10,J.current).then((e=>{let t=!1;if(Object.keys(e).length||(t=!0),Object.keys(e).length){const t=Y;t.products=Object.assign(Object.assign({},Y.products),e),Z(Object.assign({},t));const r=b.getVariantIdsToFetchAtProductLevel(e);re(r,e)}return D(!1),W.current=!1,J.current+=1,t}))),containerRef:M},{children:Object.keys((null==Y?void 0:Y.products)||[]).length?Object.keys(Y.products||[]).map((t=>e.jsx(j.ProductGroup,{outOfStockAction:V,collectionId:H,isProductPartiallyChecked:b.isProductPartiallyChecked(H,t,S,Y,B),productId:t,data:Y.products[t],selectedData:S,selectedCollectionsDispatch:I,viewOnly:!F&&!!te,upliftAdditions:oe,hideProductCheckbox:R,hideVariantCheckbox:L,hideProductVariants:B,pickerType:w,onProductDetailClick:U,showProductDetailInfoIcon:K},t))):Q?e.jsx(v.ProductPickerShimmer,{limit:10}):e.jsx(p.EmptyState,{title:"No products to show",subtitle:z.length?"We couldn't find the product you were looking for":"We couldn’t find any product in this collection."})}))]})};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
1
2
|
import React from 'react';
|
|
2
3
|
import { FbStatusFetcherReturn, SelectedItems } from '.';
|
|
3
4
|
import { SelectedCollectionsActions } from './reducers';
|
|
@@ -10,7 +11,8 @@ interface RearrangeScreenInterface {
|
|
|
10
11
|
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
11
12
|
scrollContainerRef: React.RefObject<HTMLDivElement>;
|
|
12
13
|
storeId: string;
|
|
13
|
-
|
|
14
|
+
appType: ApplicationType;
|
|
15
|
+
fbStatusFetcher?: (storeId: string, variantIds: string[], appType: ApplicationType) => FbStatusFetcherReturn;
|
|
14
16
|
}
|
|
15
17
|
/**
|
|
16
18
|
* Screen will be opened on two conditions -
|
|
@@ -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"),r=require("react"),s=require("react-beautiful-dnd"),c=require("../../constants/Theme.js"),o=require("../icon-button/IconButton.js"),i=require("../TypographyStyle.js"),n=require("./emptyState.js"),a=require("./helpers/ProductHelper.js"),l=require("./style.js"),d=require("./utility.js"),u=require("./variantComponents.js");exports.RearrangeScreen=p=>{const{selectedCollections:j,selectedCollectionsDispatch:S,setScreen:h,rearrangeViewType:y,outOfStockAction:f,scrollContainerRef:x,storeId:q,fbStatusFetcher:C}=p,[
|
|
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"),c=require("../../constants/Theme.js"),o=require("../icon-button/IconButton.js"),i=require("../TypographyStyle.js"),n=require("./emptyState.js"),a=require("./helpers/ProductHelper.js"),l=require("./style.js"),d=require("./utility.js"),u=require("./variantComponents.js");exports.RearrangeScreen=p=>{const{selectedCollections:j,selectedCollectionsDispatch:S,setScreen:h,rearrangeViewType:y,outOfStockAction:f,scrollContainerRef:x,storeId:q,fbStatusFetcher:C,appType:O}=p,[g,b]=r.useState(a.parseSelectedVariantsToArray(j));r.useEffect((()=>{b(a.parseSelectedVariantsToArray(j))}),[j]),r.useEffect((()=>{var e;null===(e=null==x?void 0:x.current)||void 0===e||e.scrollTo({top:0}),d.fetchFbStatusCollection(j,q,O,S,C,"update")}),[]);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})),b(t)}},{children:[e.jsxs(l.SelectedScreenHeader,{children:[e.jsx(o.IconButton,{Icon:t.default,width:16,height:16,color:c.COLORS.content.secondary,onClick:()=>{h("collections")}}),e.jsx(i.BodyCaption,Object.assign({color:c.COLORS.content.secondary},{children:"All Products"}))]}),Object.keys(j).length>0?"list"===y?e.jsx(u.VariantsList,{selectedVariants:g,setSelectedVariants:b,selectedCollectionsDispatch:S,outOfStockAction:f}):e.jsx(u.VariantsGrid,{selectedVariants:g,setSelectedVariants:b,selectedCollectionsDispatch:S}):e.jsx(n.EmptyState,{title:"No Products Selected",subtitle:"Selected products will appear here"})]}))};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
2
3
|
import { Collection, FbStatusFetcherReturn, SearchedItems, SelectedItems } from '.';
|
|
3
4
|
import { SearchReducerActions, SelectedCollectionsActions } from './reducers';
|
|
4
5
|
import { OUT_OF_STOCK_ACTION } from './type';
|
|
@@ -20,7 +21,8 @@ interface SearchScreenInterface {
|
|
|
20
21
|
hideProductVariants?: boolean;
|
|
21
22
|
hideProductCheckbox?: boolean;
|
|
22
23
|
storeId: string;
|
|
23
|
-
|
|
24
|
+
appType: ApplicationType;
|
|
25
|
+
fbStatusFetcher?: (storeId: string, variantIds: string[], appType: ApplicationType) => FbStatusFetcherReturn;
|
|
24
26
|
hideCollectionCheckbox?: boolean;
|
|
25
27
|
renderWithoutModal?: boolean;
|
|
26
28
|
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
@@ -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"),o=require("react"),l=require("../icon-button/IconButton.js"),c=require("../TypographyStyle.js"),i=require("./collectionScreen.js"),s=require("./emptyState.js"),d=require("./product.js"),r=require("./style.js"),n=require("./utility.js");exports.SearchScreen=u=>{var a;const{customCollectionRestriction:h,selectedCollections:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),o=require("react"),l=require("../icon-button/IconButton.js"),c=require("../TypographyStyle.js"),i=require("./collectionScreen.js"),s=require("./emptyState.js"),d=require("./product.js"),r=require("./style.js"),n=require("./utility.js");exports.SearchScreen=u=>{var a;const{customCollectionRestriction:h,selectedCollections:p,searchedCollections:v,searchedCollectionsDispatch:C,selectedCollectionsDispatch:j,setScreen:y,collections:k,onBackPress:b,hideVariantCheckbox:x,pickerType:S,hideProductVariants:P,hideProductCheckbox:f,storeId:m,fbStatusFetcher:O,setCollectionId:g,setSelectedCollectionId:I,hideCollectionCheckbox:q,renderWithoutModal:D,outOfStockAction:T,appType:F}=u;o.useEffect((()=>{var e;n.fetchFbStatusCollection(null!==(e=v.products)&&void 0!==e?e:{},m,F,C,O,"setProducts")}),[null==v?void 0:v.products]);const B=!!h&&(null==p?void 0:p.isCustom);return e.jsxs("div",{children:[e.jsxs(r.SelectedScreenHeader,{children:[e.jsx(l.IconButton,{Icon:t.default,onClick:()=>{y("collections"),b()}}),e.jsx(c.BodyCaption,{children:(null===(a=Object.keys(null==v?void 0:v.collections))||void 0===a?void 0:a.length)?"Searched Collections & Products":"Searched Products"})]}),e.jsx("div",{children:Object.keys(null==v?void 0:v.products).length||Object.keys(null==v?void 0:v.collections).length?e.jsxs(e.Fragment,{children:[e.jsx(e.Fragment,{children:Object.keys(null==v?void 0:v.collections).map((t=>e.jsx(i.CollectionCard,{customCollectionRestriction:h,data:null==k?void 0:k[t],isDisabled:B&&!(null==p?void 0:p[t]),isChecked:!!(null==p?void 0:p[t]),isPartiallyChecked:n.isCollectionPartiallyChecked(t,null==k?void 0:k[t],p,P),selectedCollectionsDispatch:j,setCollectionId:g,setSelectedCollectionId:I,setScreen:y,id:t,hideCollectionCheckbox:q||"-1"===t,selectedCollections:p,renderWithoutModal:D,pickerType:S,usedInSearch:!0},t)))}),e.jsx(e.Fragment,{children:Object.keys(null==v?void 0:v.products).map((t=>{var o,l;return Object.keys((null===(l=null===(o=null==v?void 0:v.products)||void 0===o?void 0:o[t])||void 0===l?void 0:l.products)||[]).map((o=>{var l,c,i;let s=!1;return(null===(l=null==v?void 0:v.products)||void 0===l?void 0:l.isCustom)&&(s=!0),e.jsx(d.ProductGroup,{collectionId:t,upliftAdditions:(e,o)=>((e,t,o)=>{var l;const c=n.liftTheStateUp(o,null===(l=null==v?void 0:v.products)||void 0===l?void 0:l[e]);j({type:t,data:Object.assign(Object.assign({},c),{isRestricted:h})})})(t,e,o),productId:o,data:(null===(c=null==v?void 0:v.products)||void 0===c?void 0:c[t].products)[o],isProductPartiallyChecked:n.isProductPartiallyChecked(t,o,p,null===(i=v.products)||void 0===i?void 0:i[t],P),selectedData:p,selectedCollectionsDispatch:j,viewOnly:s,hideProductCheckbox:f,hideVariantCheckbox:x,hideProductVariants:P,pickerType:S,outOfStockAction:T},o)}))}))})]}):e.jsx(s.EmptyState,{title:"No search results found",subtitle:"We couldn’t find the product you were looking for."})})]})};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
2
3
|
import { Collection, FbStatusFetcherReturn, SelectedItems } from '.';
|
|
3
4
|
import { SelectedCollectionsActions } from './reducers';
|
|
4
5
|
import { OUT_OF_STOCK_ACTION } from './type';
|
|
@@ -12,7 +13,8 @@ interface SelectedScreenInterface {
|
|
|
12
13
|
hideProductVariants?: boolean;
|
|
13
14
|
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
14
15
|
storeId: string;
|
|
15
|
-
|
|
16
|
+
appType: ApplicationType;
|
|
17
|
+
fbStatusFetcher?: (storeId: string, variantIds: string[], appType: ApplicationType) => FbStatusFetcherReturn;
|
|
16
18
|
}
|
|
17
19
|
export declare const SelectedScreen: (props: SelectedScreenInterface) => import("react/jsx-runtime").JSX.Element;
|
|
18
20
|
export {};
|
|
@@ -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"),r=require("react"),c=require("../icon-button/IconButton.js"),s=require("../TypographyStyle.js"),n=require("./emptyState.js"),i=require("./product.js"),o=require("./reducers.js"),u=require("./style.js"),l=require("./utility.js");exports.SelectedScreen=d=>{const{selectedCollections:a,selectedCollectionsDispatch:p,setScreen:j,collections:f,hideProductVariants:h=!1,outOfStockAction:y,storeId:S,fbStatusFetcher:v}=d,
|
|
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"),c=require("../icon-button/IconButton.js"),s=require("../TypographyStyle.js"),n=require("./emptyState.js"),i=require("./product.js"),o=require("./reducers.js"),u=require("./style.js"),l=require("./utility.js");exports.SelectedScreen=d=>{const{selectedCollections:a,selectedCollectionsDispatch:p,setScreen:j,collections:f,hideProductVariants:h=!1,outOfStockAction:y,storeId:S,fbStatusFetcher:v,appType:b}=d,x=r.useRef(0),g=r.useRef(null),[q,C]=r.useReducer(o.paginationReducer,{});r.useEffect((()=>{x.current=0;const e=l.paginateSelectedItems(a,10,0);C({type:"paginate",data:e}),l.fetchFbStatusCollection(e,S,b,C,v,"set"),x.current+=1}),[]),r.useEffect((()=>{C({type:"filter",data:a})}),[a]),r.useEffect((()=>{const e=new IntersectionObserver((e=>{if(e[0].isIntersecting&&x.current>0){const e=l.paginateSelectedItems(a,10,x.current);C({type:"paginate",data:e}),l.fetchFbStatusCollection(e,S,b,C,v,"update"),x.current+=1}}),{threshold:1});return g.current&&e.observe(g.current),()=>{g.current&&e.unobserve(g.current)}}),[g,a]);const I=a;return e.jsxs("div",{children:[e.jsxs(u.SelectedScreenHeader,{children:[e.jsx(c.IconButton,{Icon:t.default,onClick:()=>{j("collections")}}),e.jsx(s.BodyCaption,{children:"Selected Products"})]}),e.jsxs("div",{children:[Object.keys(q).length>0?e.jsx(e.Fragment,{children:Object.keys(q).map((t=>{var r;return Object.keys((null===(r=null==q?void 0:q[t])||void 0===r?void 0:r.products)||[]).map((r=>{let c=!1;return(null==I?void 0:I.isCustom)&&(c=!0),e.jsx(i.ProductGroup,{upliftAdditions:null,collectionId:t,productId:r,data:q[t].products[r],isProductPartiallyChecked:l.isProductPartiallyChecked(t,r,I,null==f?void 0:f[t],h),selectedData:I,selectedCollectionsDispatch:p,viewOnly:c,hideProductVariants:h,outOfStockAction:y},r)}))}))}):e.jsx(n.EmptyState,{title:"No Products Selected",subtitle:"Select products will appear here"}),e.jsx("div",{ref:g})]})]})};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ApplicationType } from '@bikdotai/bik-models/growth/models/bik-store';
|
|
1
2
|
import { Collection, FbStatusFetcherReturn, Product, ProductVariant, SearchedItems, SelectedItems } from './modal';
|
|
2
3
|
import { CollectionsActions } from './reducers';
|
|
3
4
|
export declare const liftTheStateUp: (payload: any, data: any) => any;
|
|
@@ -12,7 +13,7 @@ export declare function paginateSelectedItems(selectedItems: SelectedItems, limi
|
|
|
12
13
|
*
|
|
13
14
|
* We first get the variant ids to fetch and only if we have variant ids, we call api.
|
|
14
15
|
*/
|
|
15
|
-
export declare const fetchFbStatusCollection: (data: SelectedItems, storeId: string, dispatcher: any, fbStatusFetcher?: ((storeId: string, variantIds: string[]) => FbStatusFetcherReturn) | undefined, dispatchType?: string) => void;
|
|
16
|
+
export declare const fetchFbStatusCollection: (data: SelectedItems, storeId: string, appType: ApplicationType, dispatcher: any, fbStatusFetcher?: ((storeId: string, variantIds: string[], appType: ApplicationType) => FbStatusFetcherReturn) | undefined, dispatchType?: string) => void;
|
|
16
17
|
/**
|
|
17
18
|
* Instead of collection level, we do it product level.
|
|
18
19
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("lodash");function l(o,l,t){if(!o)return{};const i=Object.keys(o).slice(t,t+l),n={};return i.forEach((l=>{n[l]=o[l]})),n}const t=(o,l,t)=>{Object.keys(o).forEach((l=>{var t,i;const n=null!==(i=null===(t=o[l])||void 0===t?void 0:t.products)&&void 0!==i?i:{};Object.keys(n).forEach((t=>{var i,n,d,v;const s=null!==(v=null===(d=null===(n=null===(i=o[l])||void 0===i?void 0:i.products)||void 0===n?void 0:n[t])||void 0===d?void 0:d.variants)&&void 0!==v?v:{};Object.keys(s).forEach((i=>{var n,d,v,s;const e=null===(s=null===(v=null===(d=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===d?void 0:d[t])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[i];e&&!e.fbStatus&&(e.fbStatus="APPROVED")}))}))})),l({type:t,data:o})};exports.fetchFbStatusCollection=function(o,l,i,n){let
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var o=require("lodash");function l(o,l,t){if(!o)return{};const i=Object.keys(o).slice(t,t+l),n={};return i.forEach((l=>{n[l]=o[l]})),n}const t=(o,l,t)=>{Object.keys(o).forEach((l=>{var t,i;const n=null!==(i=null===(t=o[l])||void 0===t?void 0:t.products)&&void 0!==i?i:{};Object.keys(n).forEach((t=>{var i,n,d,v;const s=null!==(v=null===(d=null===(n=null===(i=o[l])||void 0===i?void 0:i.products)||void 0===n?void 0:n[t])||void 0===d?void 0:d.variants)&&void 0!==v?v:{};Object.keys(s).forEach((i=>{var n,d,v,s;const e=null===(s=null===(v=null===(d=null===(n=o[l])||void 0===n?void 0:n.products)||void 0===d?void 0:d[t])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[i];e&&!e.fbStatus&&(e.fbStatus="APPROVED")}))}))})),l({type:t,data:o})};exports.fetchFbStatusCollection=function(o,l,i,n,d){let v=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"paged";d||t(o,n,v);const s=(o=>{const l=[];return Object.keys(o).forEach((t=>{var i,n;const d=null!==(n=null===(i=o[t])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(d).forEach((i=>{var n,d,v,s;const e=null!==(s=null===(v=null===(d=null===(n=o[t])||void 0===n?void 0:n.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(e).forEach((n=>{var d,v,s,e;const u=null===(e=null===(s=null===(v=null===(d=o[t])||void 0===d?void 0:d.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===e?void 0:e[n];(null==u?void 0:u.fbStatus)||l.push(n)}))}))})),l})(o);s.length>0&&d&&d(l,s,i).then((l=>{const t=Object.assign({},o);Object.keys(t).forEach((o=>{var i,n;const d=null!==(n=null===(i=t[o])||void 0===i?void 0:i.products)&&void 0!==n?n:{};Object.keys(d).forEach((i=>{var n,d,v,s;const e=null!==(s=null===(v=null===(d=null===(n=t[o])||void 0===n?void 0:n.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)&&void 0!==s?s:{};Object.keys(e).forEach((n=>{var d,v,s,e;const u=null===(e=null===(s=null===(v=null===(d=t[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[i])||void 0===s?void 0:s.variants)||void 0===e?void 0:e[n];u&&"REJECTED"===l[n]?u.fbStatus="REJECTED":u&&"APPROVED"===l[n]&&(u.fbStatus="APPROVED")}))}))})),n({type:v,data:t})})).catch((l=>{console.error("Error in fbStatusFetcher",l),t(o,n,v)}))},exports.getSkuId=(o,l)=>{var t;if(l)return o.skuId;const i=Object.values(null!==(t=null==o?void 0:o.variants)&&void 0!==t?t:{});return 1===i.length&&i[0].name.includes(o.name)?i[0].skuId:""},exports.getVariantIdsToFetchAtProductLevel=(o,l)=>{const t=[];return Object.keys(null!=o?o:{}).forEach((i=>{var n,d;const v=null!==(d=null===(n=null==o?void 0:o[i])||void 0===n?void 0:n.variants)&&void 0!==d?d:{};Object.keys(v).forEach((n=>{var d,v,s,e,u;let r;r=l?null===(s=null===(v=null===(d=null==l?void 0:l.products)||void 0===d?void 0:d[i])||void 0===v?void 0:v.variants)||void 0===s?void 0:s[n]:null===(u=null===(e=null==o?void 0:o[i])||void 0===e?void 0:e.variants)||void 0===u?void 0:u[n],(null==r?void 0:r.fbStatus)||t.push(n)}))})),t},exports.isCollectionPartiallyChecked=function(o,l,t){var i,n,d,v;let s=0,e=0;if(arguments.length>3&&void 0!==arguments[3]&&arguments[3]){const v=null!==(i=null==l?void 0:l.products)&&void 0!==i?i:{};s=Object.keys(v).length;const u=null!==(d=null===(n=t[o])||void 0===n?void 0:n.products)&&void 0!==d?d:{};e=Object.keys(u).length}else if(t[o]){const i=null==l?void 0:l.products;i&&Object.keys(i).forEach((o=>{var l;const t=null===(l=i[o])||void 0===l?void 0:l.variants;t&&Object.keys(t).forEach((o=>s+=1))}));const n=null===(v=t[o])||void 0===v?void 0:v.products;if(n&&Object.keys(n).forEach((o=>{var l;const t=null===(l=n[o])||void 0===l?void 0:l.variants;t&&Object.keys(t).forEach((o=>e+=1))})),s<=0&&e>0)return!1}return e>0&&s!==e},exports.isProductPartiallyChecked=(o,l,t,i,n)=>{var d,v,s,e,u,r,c,a,p,b,O,f,j,h,y,g,k,E,P;let D=0,S=0;if(null===(v=null===(d=null==t?void 0:t[o])||void 0===d?void 0:d.products)||void 0===v?void 0:v[l]){if(n)return!1;const d=(null===(u=null===(e=null===(s=null==t?void 0:t[o])||void 0===s?void 0:s.products)||void 0===e?void 0:e[l])||void 0===u?void 0:u.variants)||[];if(1===Object.keys(d).length)for(const i in d){const n=null===(c=null===(r=null==t?void 0:t[o])||void 0===r?void 0:r.products)||void 0===c?void 0:c[l],d=null===(O=null===(b=null===(p=null===(a=null==t?void 0:t[o])||void 0===a?void 0:a.products)||void 0===p?void 0:p[l])||void 0===b?void 0:b.variants)||void 0===O?void 0:O[i];if(null===(f=null==d?void 0:d.name)||void 0===f?void 0:f.includes(null!==(j=null==n?void 0:n.name)&&void 0!==j?j:""))return!1}if(null===(g=Object.keys((null===(y=null===(h=null==i?void 0:i.products)||void 0===h?void 0:h[l])||void 0===y?void 0:y.variants)||[]))||void 0===g||g.forEach((()=>S++)),Object.keys((null===(P=null===(E=null===(k=null==t?void 0:t[o])||void 0===k?void 0:k.products)||void 0===E?void 0:E[l])||void 0===P?void 0:P.variants)||[]).forEach((()=>D++)),D>0&&S!==D)return!0}return!1},exports.liftTheStateUp=(l,t)=>{const i=o.cloneDeep(t);if(delete i.products,(l=Object.assign(Object.assign({},l),{catalogOnlyData:i})).productId&&t.products){const n=o.cloneDeep(t.products[l.productId]);(null==n?void 0:n.variants)&&delete n.variants,l=Object.assign(Object.assign({},l),{catalogOnlyData:i,productOnlyData:n})}return l},exports.markVariantsAsApprovedProductsLevel=(o,l,t,i,n)=>{const d=Object.assign({},o);if(Object.keys(o).forEach((l=>{var t,i;Object.keys(null!==(i=null===(t=null==o?void 0:o[l])||void 0===t?void 0:t.variants)&&void 0!==i?i:{}).forEach((t=>{var i,n;const v=null===(i=null==o?void 0:o[l].variants)||void 0===i?void 0:i[t];v&&(v.fbStatus="APPROVED");const s=null===(n=null==d?void 0:d[l])||void 0===n?void 0:n.variants;s&&s[t]&&(s[t]=v)}))})),i&&n){const o=Object.assign({},i);o.products=d,n(o),l({type:"productsPaged",data:{collectionId:t,products:d}})}else l({type:"productsPaged",data:{collectionId:t,products:d}})},exports.paginateSelectedItems=function(o,t,i){var n;const d={};let v=0;for(const s in o)if(Object.prototype.hasOwnProperty.call(o,s)){const e=o[s],u=l(e.products,t,i-v);u&&Object.keys(u).length>0&&(d[s]=Object.assign(Object.assign({},e),{products:u})),v+=Object.keys(null!==(n=e.products)&&void 0!==n?n:{}).length}return d},exports.shouldShowVariant=o=>{const l=Object.keys(o.variants||[]);let t=!1;return!(l.length<=1)||(l.forEach((l=>{var i,n;t=null!==(n=null===(i=o.variants)||void 0===i?void 0:i[l].name.includes(o.name))&&void 0!==n&&n})),!t)},exports.updateAllVariantsForSelectedProducts=(l,t,i)=>Object.keys(l).reduce(((n,d)=>{var v;return d in t?(n[d]=Object.assign(Object.assign({},l[d]),{products:Object.keys(null!==(v=l[d].products)&&void 0!==v?v:{}).reduce(((n,v)=>{var s,e,u,r,c,a,p,b,O,f;const j=null===(s=t[d].products)||void 0===s?void 0:s[v],h=null===(r=null===(u=null===(e=null==i?void 0:i.products)||void 0===e?void 0:e[d])||void 0===u?void 0:u.products)||void 0===r?void 0:r[v];return j?n[v]=Object.assign(Object.assign({},(null===(c=l[d].products)||void 0===c?void 0:c[v])||{}),{allVariants:o.cloneDeep(j.variants)}):h?n[v]=Object.assign(Object.assign({},(null===(a=l[d].products)||void 0===a?void 0:a[v])||{}),{allVariants:o.cloneDeep(h.variants)}):(null===(b=null===(p=l[d].products)||void 0===p?void 0:p[v])||void 0===b?void 0:b.allVariants)&&(n[v]=Object.assign(Object.assign({},(null===(O=l[d].products)||void 0===O?void 0:O[v])||{}),{allVariants:o.cloneDeep(null===(f=l[d].products)||void 0===f?void 0:f[v].allVariants)})),n}),{})}),n):n}),{});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var e,i,p=require("../../../../../_virtual/bik-store.js");e=p.__exports,Object.defineProperty(e,"__esModule",{value:!0}),e.ApplicationType=void 0,(i=e.ApplicationType||(e.ApplicationType={})).BIK="BIK",i.MANIFEST="MANIFEST",i.BSP="BSP";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var r={};export{r as __exports};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const EventsTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default EventsTrigger;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { QueryBuilderNodeProps } from "../../../
|
|
2
|
+
import { QueryBuilderNodeProps } from "../../../Types/QueryBuilderNodeProps.type";
|
|
3
3
|
declare const IGTrigger: React.FC<QueryBuilderNodeProps>;
|
|
4
4
|
export default IGTrigger;
|
package/dist/esm/components/QueryBuilder/Triggers/IG/selectors/useIGTriggerNameCacheSelector.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { QueryBuilderAPIData } from "../../../
|
|
1
|
+
import { QueryBuilderAPIData } from "../../../Types/QueryBuilderAPI.type";
|
|
2
2
|
export declare const useIGTriggerNameCacheSelector: () => QueryBuilderAPIData[];
|
package/dist/esm/components/QueryBuilder/Triggers/components/BaseTriggerQueryBuilderNode.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { DropdownOption } from "../../../dropdown/type";
|
|
3
|
-
import { QueryBuilderProperty } from "../../
|
|
4
|
-
import { QueryBuilderNodeProps } from "../../
|
|
3
|
+
import { QueryBuilderProperty } from "../../Types/QueryBuilder.type";
|
|
4
|
+
import { QueryBuilderNodeProps } from "../../Types/QueryBuilderNodeProps.type";
|
|
5
5
|
declare const BaseTriggerQueryBuilderNode: React.FC<QueryBuilderNodeProps & {
|
|
6
6
|
cacheKey: string;
|
|
7
7
|
propertyAddBtnText: string;
|
|
@@ -14,5 +14,8 @@ export type AlertProps = {
|
|
|
14
14
|
redirectTo?: string;
|
|
15
15
|
redirectToText?: string;
|
|
16
16
|
iconStyle?: React.CSSProperties;
|
|
17
|
+
handleRedirectButtonClick?: () => void;
|
|
18
|
+
showCrossButton?: boolean;
|
|
19
|
+
handleCrossIconClick?: () => void;
|
|
17
20
|
};
|
|
18
21
|
export declare const Alert: React.FC<AlertProps>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e}from"react/jsx-runtime";import{AlertStyle as
|
|
1
|
+
import{jsxs as t,jsx as e}from"react/jsx-runtime";import o from"../../assets/icons/cross.svg.js";import{AlertStyle as i,AlertContentWrapper as r,CloseIconWrapper as n}from"./Alert.styled.js";import{COLOR_CONFIG_MAP as l}from"./AlertHelper.js";import{BodyCaption as c}from"../TypographyStyle.js";import{COLORS as s}from"../../constants/Theme.js";const d=d=>{var a,h;return t(i,Object.assign({type:d.type,contentPosition:d.contentPosition,style:d.containerStyle},{children:[t(r,{children:[d.icon&&e("div",Object.assign({style:Object.assign(Object.assign({},null==d?void 0:d.iconStyle),{display:(null===(a=null==d?void 0:d.iconStyle)||void 0===a?void 0:a.display)||"flex",alignSelf:(null===(h=null==d?void 0:d.iconStyle)||void 0===h?void 0:h.alignSelf)||"flex-start"})},{children:e(d.icon,{color:l[d.type].textColor,height:16,width:16})})),e(c,Object.assign({style:{color:d.textColor||l[d.type].textColor,marginLeft:8,marginRight:4}},{children:d.text})),d.redirectToText&&d.redirectTo&&e(c,Object.assign({style:{color:s.text.brand,cursor:"pointer",textDecoration:"underline"},onClick:()=>{"INTERNAL"===d.redirectTo&&d.handleRedirectButtonClick?d.handleRedirectButtonClick():d.redirectTo&&window.open(d.redirectTo,"_blank")}},{children:d.redirectToText}))]}),d.showCrossButton&&e(n,{children:e(o,{width:20,height:20,color:s.content.secondary,onClick:()=>{(null==d?void 0:d.handleCrossIconClick)&&d.handleCrossIconClick()}})})]}))};export{d as Alert};
|
|
@@ -3,3 +3,5 @@ export declare const AlertStyle: import("styled-components").StyledComponent<"di
|
|
|
3
3
|
type: ALERT_TYPES;
|
|
4
4
|
contentPosition?: CONTENT_POSITION | undefined;
|
|
5
5
|
}, never>;
|
|
6
|
+
export declare const AlertContentWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
|
+
export declare const CloseIconWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from"styled-components";import{CONTENT_POSITION as o,COLOR_CONFIG_MAP as t}from"./AlertHelper.js";const r=e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
|
-
justify-content: ${
|
|
4
|
+
justify-content: ${e=>e.contentPosition||o.CENTER};
|
|
5
5
|
padding: 8px 16px;
|
|
6
|
-
background-color: ${
|
|
6
|
+
background-color: ${e=>t[e.type].backgroundColor};
|
|
7
7
|
border-radius: 4px;
|
|
8
|
-
border: 1px solid ${
|
|
9
|
-
|
|
8
|
+
border: 1px solid ${e=>t[e.type].borderColor};
|
|
9
|
+
`,i=e.div`
|
|
10
|
+
flex: 1;
|
|
11
|
+
display: flex;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
`,n=e.div`
|
|
14
|
+
margin-left: 16px;
|
|
15
|
+
display: flex;
|
|
16
|
+
align-items: center;
|
|
17
|
+
`;export{i as AlertContentWrapper,r as AlertStyle,n as CloseIconWrapper};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{COLORS as o}from"../../constants/Theme.js";var r,t;!function(o){o.NEGATIVE="Negative",o.WARNING="Warning",o.POSITIVE="Positive",o.NEUTRAL="Neutral",o.BRAND="Brand"}(r||(r={})),function(o){o.START="start",o.CENTER="center",o.END="end"}(t||(t={}));const
|
|
1
|
+
import{COLORS as o}from"../../constants/Theme.js";var r,t;!function(o){o.NEGATIVE="Negative",o.WARNING="Warning",o.POSITIVE="Positive",o.NEUTRAL="Neutral",o.BRAND="Brand"}(r||(r={})),function(o){o.START="start",o.CENTER="center",o.END="end",o.SPACE_BETWEEN="space-between"}(t||(t={}));const e={[r.NEGATIVE]:{backgroundColor:o.background.negative.light,textColor:o.content.negative,borderColor:o.stroke.negative.lightAlt},[r.WARNING]:{backgroundColor:o.background.warning.light,textColor:o.content.warning,borderColor:o.stroke.warning.lightAlt},[r.POSITIVE]:{backgroundColor:o.background.positive.light,textColor:o.content.positive,borderColor:o.stroke.positive.lightAlt},[r.NEUTRAL]:{backgroundColor:o.surface.subdued,textColor:o.content.secondary,borderColor:o.stroke.primary},[r.BRAND]:{backgroundColor:o.background.brandLight,textColor:o.content.brand,borderColor:o.stroke.brandLightAlt}};export{r as ALERT_TYPES,e as COLOR_CONFIG_MAP,t as CONTENT_POSITION};
|