@bikdotai/bik-component-library 0.0.679-beta.1 → 0.0.679-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.d.ts +1 -0
- package/dist/cjs/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.d.ts +2 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/cjs/components/data-source-panel/DataSourcePanel.style.js +40 -3
- package/dist/cjs/components/data-source-panel/Modals/DescriptionModal.d.ts +8 -0
- package/dist/cjs/components/data-source-panel/Modals/DescriptionModal.js +48 -0
- package/dist/cjs/components/data-source-panel/model.d.ts +8 -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/dropdown/ChipInput.js +1 -1
- package/dist/cjs/components/dropdown/Dropdown.js +1 -1
- package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/cjs/components/dropdown/hooks/useDropdown.d.ts +4 -1
- package/dist/cjs/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/cjs/components/dropdown/type.d.ts +1 -0
- package/dist/cjs/components/modals/Modal.d.ts +2 -0
- package/dist/cjs/components/modals/Modal.js +1 -1
- package/dist/cjs/components/modals/modal.styled.d.ts +6 -0
- package/dist/cjs/components/modals/modal.styled.js +1 -1
- package/dist/cjs/components/modals/styledModal.d.ts +2 -0
- package/dist/cjs/components/modals/styledModal.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/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/cjs/components/states-modal/StateModalComponent.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.d.ts +1 -0
- package/dist/esm/components/data-source-panel/DataSourceInfoFooter.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.d.ts +2 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.js +1 -1
- package/dist/esm/components/data-source-panel/DataSourcePanel.style.js +40 -3
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.d.ts +8 -0
- package/dist/esm/components/data-source-panel/Modals/DescriptionModal.js +48 -0
- package/dist/esm/components/data-source-panel/model.d.ts +8 -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/dropdown/ChipInput.js +1 -1
- package/dist/esm/components/dropdown/Dropdown.js +1 -1
- package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +4 -1
- package/dist/esm/components/dropdown/hooks/useDropdown.js +1 -1
- package/dist/esm/components/dropdown/type.d.ts +1 -0
- package/dist/esm/components/modals/Modal.d.ts +2 -0
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/modal.styled.d.ts +6 -0
- package/dist/esm/components/modals/modal.styled.js +1 -1
- package/dist/esm/components/modals/styledModal.d.ts +2 -0
- package/dist/esm/components/modals/styledModal.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/components/states-modal/StateModalComponent.d.ts +1 -0
- package/dist/esm/components/states-modal/StateModalComponent.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),t=require("../../../assets/icons/info.svg.js"),o=require("../../alerts/Alert.js"),s=require("../../alerts/AlertHelper.js"),n=require("../../button/Button.js"),r=require("../../checkBox/CheckBox.js");require("react");var l=require("../type.js");require("../../dropdown/DropdownPopover/index.js");var a=require("../../dropdown/Dropdown.js");require("../../dropdown/ChipDropdown.js"),require("../../zeroState/ZeroState.js");var d=require("../../TypographyStyle.js"),c=require("../../../constants/Theme.js");require("../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../list-item/ListItem.js"),require("../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../icon-button/IconButton.js");var u=require("../../input/Input.js"),p=require("../../../assets/icons/cross.svg.js");require("../../dropdown/MenuItem/MenuItem.js"),require("../../modals/styledModal.js"),require("../../../node_modules/lodash.debounce/index.js"),require("../../bik-layout/CommonStyles.js"),require("../../product-picker/ProductPicker.styled.js"),require("../../../utils/DateUtils.js"),require("../../tag/Tag.js"),require("../../tooltips/Tooltip.js"),require("../../product-picker-v2/modal.js"),require("../../variable-picker-v3/model.js"),require("../../modals/modal.styled.js");var T=require("../../../assets/icons/plus.svg.js");require("../../accordion/Accordion.style.js"),require("../../accordion/AccordionArrow.js"),require("../../switch/Switch.js"),require("../../variable-picker-v3/NoResult.js"),require("../../variable-picker-v3/styles.js"),require("lodash");var C,E=require("../DiscountModal.styled.js"),D=require("../CouponExpiration/CouponExpiration.js"),O=require("../../radioButton/RadioButton.js"),S=require("../../../assets/icons/cubeIcon.svg.js"),P=require("../../../assets/icons/delete.svg.js"),I=require("../../../assets/icons/edit.svg.js"),x=require("./DynamicCoupon.styled.js"),v=require("./MinimumRequirementComponent.js"),j=require("./ZeroState.js");exports.DISCOUNT_PRODUCTS=void 0,(C=exports.DISCOUNT_PRODUCTS||(exports.DISCOUNT_PRODUCTS={})).ENTITLED="entitled",C.PREREQUISITE="prerequisite";exports.default=C=>{var _,b,m,g,y,h,U,R;const N=[{selected:C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER,label:"Entire Order",value:l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER},{selected:C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS,label:"Specific Product",value:l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS},{selected:C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS}],V=[{selected:C.offerAppliesToBuy===l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS,label:"Specific Product",value:l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS},{selected:C.offerAppliesToBuy===l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS}],A=[{selected:C.offerAppliesToGet===l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS,label:"Specific Product",value:l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS},{selected:C.offerAppliesToGet===l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS}],L=(e,r,a)=>{var u,E,D,O,v,j,_,b,m,g,y,h;let U=[],R=[],N={},V={};C.useNewPicker?(N=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,V=null!==(u=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==u?u:[],(null==N?void 0:N.isCustom)&&delete N.isCustom,(null==V?void 0:V.isCustom)&&delete V.isCustom,Object.values(N).forEach((e=>{Object.keys(e.products).forEach((i=>{U.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(V).forEach((e=>{"isCustom"!==e&&R.push({id:e,name:V[e].name,image:V[e].image})}))):(U=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,R=null!==(E=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==E?E:[]);const A=[null===(D=C.dynamicDiscountValidationError)||void 0===D?void 0:D.inValidProductSelection,null===(O=C.dynamicDiscountValidationError)||void 0===O?void 0:O.inValidProductVariableSelection,null===(v=C.dynamicDiscountValidationError)||void 0===v?void 0:v.inValidCollectionSelection],L=[null===(j=C.dynamicDiscountValidationError)||void 0===j?void 0:j.inValidBuyXCollectionSelection,null===(_=C.dynamicDiscountValidationError)||void 0===_?void 0:_.inValidBuyXProductSelection,null===(b=C.dynamicDiscountValidationError)||void 0===b?void 0:b.inValidBuyXProductVariableSelection],q=[null===(m=C.dynamicDiscountValidationError)||void 0===m?void 0:m.inValidGetYCollectionSelection,null===(g=C.dynamicDiscountValidationError)||void 0===g?void 0:g.inValidGetYProductSelection,null===(y=C.dynamicDiscountValidationError)||void 0===y?void 0:y.inValidGetYProductVariableSelection];let f=!1;return"couponAppliesTo"===a&&(f=A.some(Boolean)),"buyX"===a&&(f=L.some(Boolean)),"getY"===a&&(f=q.some(Boolean)),i.jsxs(i.Fragment,{children:[i.jsxs("div",Object.assign({style:{display:"flex",gap:18}},{children:[e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS&&0===U.length&&(r===exports.DISCOUNT_PRODUCTS.ENTITLED&&!C.entitledProductVariable||r===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&!C.preRequisiteProductVariable)&&!(null==R?void 0:R.length)&&i.jsxs(x.AddProductButtonsContainer,{children:[i.jsx("div",Object.assign({style:{width:C.isProductVariableSupported?"284px":"300px",display:"flex"}},{children:i.jsx(n.Button,{buttonText:"Add Product(s)",buttonType:"dashRegular",LeadingIcon:T.default,matchParentWidth:!0,onClick:()=>{C.setIsProductPickerOpen(r)},error:f})})),C.isProductVariableSupported&&C.productVariableList&&i.jsxs(i.Fragment,{children:[i.jsx(d.BodySecondary,Object.assign({color:c.DEFAULT_THEME.colorsV2.content.placeholder},{children:"OR"})),i.jsx(n.Button,{buttonText:"Add Product(s) Variable",buttonType:"dashRegular",LeadingIcon:T.default,matchParentWidth:!0,onClick:()=>{C.setIsProductVariablePickerOpen(r)},error:f})]})]}),e===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS&&0===R.length&&!(null==U?void 0:U.length)&&i.jsx("div",Object.assign({style:{width:"300px",display:"flex"}},{children:i.jsx(n.Button,{buttonText:"Add collection(s)",buttonType:"dashRegular",LeadingIcon:T.default,matchParentWidth:!0,onClick:()=>{C.setIsCollectionPickerOpen(r)},style:{marginTop:"16px"},error:f})}))]})),f&&i.jsx("div",Object.assign({style:{margin:"8px 0 0"}},{children:i.jsx(o.Alert,{type:s.ALERT_TYPES.NEGATIVE,text:"Required Field",contentPosition:s.CONTENT_POSITION.START,icon:()=>i.jsx(t.default,{width:16,height:16,color:c.DEFAULT_THEME.colorsV2.content.negative})})})),U.length||R.length?i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{margin:"8px 0"}},{children:e===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS?"Collection(s)":"Product(s)"})),i.jsxs(x.ProductCollectionCard,{children:[i.jsx(x.CubeIconContainer,{children:i.jsx(S.default,{width:20,height:20,color:c.DEFAULT_THEME.colorsV2.content.secondary})}),i.jsxs(d.TitleSmall,{children:[e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?U.length:R.length," ",e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?"Product(s)":"Collection(s)"," ","added"]}),i.jsxs("div",Object.assign({style:{display:"flex",gap:4}},{children:[i.jsx(x.IconContainer,Object.assign({onClick:()=>{e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?C.setIsProductPickerOpen(r):C.setIsCollectionPickerOpen(r)}},{children:i.jsx(I.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.placeholder})})),i.jsx(x.IconContainer,Object.assign({onClick:()=>{e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.setEntitledProducts([]):C.setPrerequisiteProducts([]):r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.setEntitledCollections([]):C.setPrerequisiteCollections([])}},{children:i.jsx(P.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.placeholder})}))]}))]})]}):r===exports.DISCOUNT_PRODUCTS.ENTITLED&&C.entitledProductVariable?i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i.jsxs(x.ProductVariableCard,{children:[i.jsx(d.TitleSmall,{children:C.entitledProductVariable.displayName}),i.jsx("div",Object.assign({style:{display:"flex",gap:4}},{children:i.jsx(x.IconContainer,Object.assign({onClick:()=>{C.setEntitledProductVariable(void 0)}},{children:i.jsx(p.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.primary})}))}))]})]}):r===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&(null===(h=C.preRequisiteProductVariable)||void 0===h?void 0:h.displayName)?i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i.jsxs(x.ProductVariableCard,{children:[i.jsx(d.TitleSmall,{children:C.preRequisiteProductVariable.displayName}),i.jsx("div",Object.assign({style:{display:"flex",gap:4}},{children:i.jsx(x.IconContainer,Object.assign({onClick:()=>{C.setPreRequisiteProductVariable(void 0)}},{children:i.jsx(p.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.primary})}))}))]})]}):i.jsx(i.Fragment,{children:" "})]})},q=(e,t)=>{var o,s,n,r,c,p,T,E,D,O;let S=[],P=[],I={},x={};C.useNewPicker?(I=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,x=null!==(o=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==o?o:[],(null==I?void 0:I.isCustom)&&delete I.isCustom,(null==x?void 0:x.isCustom)&&delete x.isCustom,Object.values(I).forEach((e=>{Object.keys(e.products).forEach((i=>{S.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(x).forEach((e=>{"isCustom"!==e&&P.push({id:e,name:x[e].name,image:x[e].image})}))):(S=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,P=null!==(s=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==s?s:[]);const v=e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?C.offerAppliesToBuy:C.offerAppliesToGet,j=e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?exports.DISCOUNT_PRODUCTS.PREREQUISITE:exports.DISCOUNT_PRODUCTS.ENTITLED,_=v===l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS?l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS:l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS;return i.jsxs("div",{children:[i.jsx(d.TitleSmall,Object.assign({style:{marginBottom:16}},{children:e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?"Customer buys":"Customer gets"})),i.jsxs("div",Object.assign({style:{display:"flex"}},{children:[!t&&i.jsx("div",{children:i.jsxs("div",Object.assign({className:"input__rows"},{children:[i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(u.Input,{value:e===exports.DISCOUNT_PRODUCTS.ENTITLED?null!==(r=null===(n=C.discountData.entitledQuantity)||void 0===n?void 0:n.toString())&&void 0!==r?r:"":null!==(p=null===(c=C.discountData.prerequisiteQuantity)||void 0===c?void 0:c.toString())&&void 0!==p?p:"",type:"number",onChangeText:i=>{e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.setDiscountData(Object.assign(Object.assign({},C.discountData),{entitledQuantity:parseInt(i)})):C.setDiscountData(Object.assign(Object.assign({},C.discountData),{prerequisiteQuantity:parseInt(i)}))},labelText:"Quantity of products",placeholder:"Eg. 2",width:"300px",errorMessage:e===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&(null===(T=C.dynamicDiscountValidationError)||void 0===T?void 0:T.inValidBuyXValue)||e===exports.DISCOUNT_PRODUCTS.ENTITLED&&(null===(E=C.dynamicDiscountValidationError)||void 0===E?void 0:E.inValidGetYValue)?"Required Field":"",state:e===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&(null===(D=C.dynamicDiscountValidationError)||void 0===D?void 0:D.inValidBuyXValue)||e===exports.DISCOUNT_PRODUCTS.ENTITLED&&(null===(O=C.dynamicDiscountValidationError)||void 0===O?void 0:O.inValidGetYValue)?"invalid":"none"})})),i.jsx("div",{className:"input__wrapper"})]}))}),i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{marginBottom:8}},{children:"Any items from"})),e===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&i.jsx(a.Dropdown,{width:"244px",options:V,placement:"bottom-start",onSelect:e=>{var i,t,o;C.setOfferAppliesToBuy(e.value),C.setPrerequisiteProducts([]),C.setPrerequisiteCollections([]),C.setPreRequisiteProductVariable(void 0),C.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidBuyXCollectionSelection:!1,inValidBuyXProductSelection:!1,inValidBuyXProductVariableSelection:!1}))),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:null===(i=C.discountData.collectionsConf)||void 0===i?void 0:i.entitledCollections,prerequisiteCollections:{}},productsConf:{entitledProducts:null===(t=C.discountData.productsConf)||void 0===t?void 0:t.entitledProducts,prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:null===(o=C.discountData.productVariableConf)||void 0===o?void 0:o.entitledProductVariable,prerequisiteProductVariable:{}}}))}}),e===exports.DISCOUNT_PRODUCTS.ENTITLED&&i.jsx(a.Dropdown,{width:"244px",options:A,placement:"bottom-start",onSelect:e=>{var i,t,o;C.setOfferAppliesToGet(e.value),C.setEntitledProducts([]),C.setEntitledCollections([]),C.setEntitledProductVariable(void 0),C.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidGetYCollectionSelection:!1,inValidGetYProductSelection:!1,inValidGetYProductVariableSelection:!1}))),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{entitledCollectionIds:[],entitledProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:null===(i=C.discountData.collectionsConf)||void 0===i?void 0:i.prerequisiteCollections},productsConf:{entitledProducts:{},prerequisiteProducts:null===(t=C.discountData.productsConf)||void 0===t?void 0:t.prerequisiteProducts},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:null===(o=C.discountData.productVariableConf)||void 0===o?void 0:o.prerequisiteProductVariable}}))}})]})]})),L(_,j,e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?"buyX":"getY")]})};return i.jsxs(E.DynamicCouponContainer,{children:[i.jsxs("div",{children:[i.jsxs("div",Object.assign({style:{display:"flex",gap:16}},{children:[i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(u.Input,{value:null!==(_=C.discountData.title)&&void 0!==_?_:"",onChangeText:e=>{var i;C.setDiscountData(Object.assign(Object.assign({},C.discountData),{title:null!==(i=null==e?void 0:e.trim())&&void 0!==i?i:""}))},maxCharLimit:30,labelText:"Discount Coupon Title",placeholder:`Eg. “Flat ${null!==(b=C.currency)&&void 0!==b?b:""} 15 Off”`,hintText:"Will be same for everyone. Can’t be changed later",width:"300px",isRequired:!0,errorMessage:(null===(m=C.dynamicDiscountValidationError)||void 0===m?void 0:m.invalidCouponTitle)?"Required Field":"",state:(null===(g=C.dynamicDiscountValidationError)||void 0===g?void 0:g.invalidCouponTitle)?"invalid":"none"})})),!C.hideProbability&&i.jsx(u.Input,{value:null!==(h=null===(y=C.discountData.probability)||void 0===y?void 0:y.toString())&&void 0!==h?h:"",type:"number",onChangeText:e=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability of getting coupon ",hintText:"Enter a decimal value between 0-1",placeholder:"Eg. 0.5",maxCharLimit:4,width:"300px",isRequired:!0,errorMessage:(null===(U=C.dynamicDiscountValidationError)||void 0===U?void 0:U.inValidProbability)?"Required Field":"",state:(null===(R=C.dynamicDiscountValidationError)||void 0===R?void 0:R.inValidProbability)?"invalid":"none"})]})),i.jsx("div",{style:{height:"1px",width:"100%",background:c.DEFAULT_THEME.colorsV2.stroke.primary,margin:"24px 0 8px"}})]}),C.allowStaticCoupon&&i.jsx((()=>i.jsxs("div",{children:[i.jsx(d.TitleRegular,{children:"Discount Details"}),i.jsx(x.DiscountOptionsContainer,{children:C.discountDetailsOptions.map((t=>{return i.jsxs(x.DiscountDetailsOption,Object.assign({selected:C.selectedDiscountDetails.id===t.id,onClick:()=>(i=>{if(C.selectedDiscountDetails.id!==i.id)if(C.resetValidationErrors(),C.setValidationErrorMessage(""),C.setDiscountCouponAppliesTo(l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER),C.setSelectedDiscountDetails(i),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:void 0})),C.setPreRequisiteProductVariable(void 0),C.setEntitledProductVariable(void 0),["percentage","amount"].includes(i.value)){C.onChangeCouponType({label:"Amount off on order",selected:!0,value:l.DISCOUNT_TYPES.AMOUNT_OFF_ORDER});const t=Object.assign(Object.assign({},C.discountData),{valueType:"percentage"===i.value?l.DISCOUNT_VALUE_TYPES.PERCENTAGE:l.DISCOUNT_VALUE_TYPES.FIXED_AMOUNT,value:void 0,targetType:l.DISCOUNT_TARGET_TYPES.LINE_ITEM,targetSelection:l.DISCOUNT_TARGET_SELECTION.ALL,entitledCollectionIds:[],entitledProductIds:[],prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:{}},productsConf:{entitledProducts:{},prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:{}}}),o=e.__rest(t,["entitledQuantity","prerequisiteQuantity"]);C.setDiscountData(o)}else C.onChangeCouponType({label:i.label,selected:!0,value:i.value})})(t)},{children:[t.icon((o=t.id,C.selectedDiscountDetails.id===o?c.DEFAULT_THEME.colorsV2.stroke.brand:c.DEFAULT_THEME.colorsV2.text.secondary)),t.label]}),t.id);var o}))})]})),{}),(C.selectedCouponType===l.DISCOUNT_TYPES.AMOUNT_OFF_ORDER||C.selectedCouponType===l.DISCOUNT_TYPES.AMOUNT_OFF_PRODUCTS)&&(()=>{var e,t,o,s,n,r;return i.jsxs(i.Fragment,{children:[i.jsx("div",Object.assign({className:"input__rows"},{children:i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(u.Input,{value:null!==(o=null===(t=null===(e=C.discountData)||void 0===e?void 0:e.value)||void 0===t?void 0:t.toString())&&void 0!==o?o:"",labelText:"Discount amount",type:"number",width:"300px",onChangeText:e=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:parseInt(e)}))},placeholder:"15",prefixText:C.discountData.valueType===l.DISCOUNT_VALUE_TYPES.FIXED_AMOUNT?null!==(s=C.currency)&&void 0!==s?s:"":void 0,suffixText:C.discountData.valueType===l.DISCOUNT_VALUE_TYPES.PERCENTAGE?"%":void 0,errorMessage:(null===(n=C.dynamicDiscountValidationError)||void 0===n?void 0:n.inValidDiscountAmount)?"Required Field":"",state:(null===(r=C.dynamicDiscountValidationError)||void 0===r?void 0:r.inValidDiscountAmount)?"invalid":"none"})}))})),i.jsx("div",Object.assign({style:{paddingTop:"24px",marginTop:16,borderTop:`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`}},{children:i.jsxs("div",Object.assign({className:"input__wrapper"},{children:[i.jsx(d.TitleRegular,Object.assign({style:{marginBottom:10}},{children:"Applies to"})),i.jsx("div",Object.assign({style:{display:"flex",flexGrow:0,flexShrink:0,flexBasis:"auto"}},{children:i.jsx(a.Dropdown,{width:"300px",options:N,placement:"bottom-start",onSelect:e=>{const i="value"in e&&e.value===l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER?{label:"Amount off on order",selected:!0,value:l.DISCOUNT_TYPES.AMOUNT_OFF_ORDER}:{label:"Amount off on products",selected:!0,value:l.DISCOUNT_TYPES.AMOUNT_OFF_PRODUCTS};C.onChangeCouponType(i),C.setDiscountCouponAppliesTo(e.value),C.setEntitledProductVariable(void 0),C.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidProductVariableSelection:!1,inValidProductSelection:!1,inValidCollectionSelection:!1})))}})})),(C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS||C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS)&&L(C.discountCouponAppliesTo,exports.DISCOUNT_PRODUCTS.ENTITLED,"couponAppliesTo")]}))}))]})})(),C.selectedCouponType===l.DISCOUNT_TYPES.BUY_X_GET_Y&&(()=>{var e,t,o,s,n;return i.jsxs(E.DynamicCouponContainer,Object.assign({style:{border:`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`,padding:"16px",borderRadius:"4px",margin:0}},{children:[q(exports.DISCOUNT_PRODUCTS.PREREQUISITE),i.jsx("div",{style:{width:"100%",height:"1px",backgroundColor:c.DEFAULT_THEME.colorsV2.stroke.primary,margin:"8px 0"}}),q(exports.DISCOUNT_PRODUCTS.ENTITLED),i.jsx(d.BodySecondary,Object.assign({style:{marginTop:"8px"}},{children:"At a discounted value"})),i.jsx("div",{children:i.jsx(O.RadioButton,{label:"Free",isActive:100===C.discountData.value,onValueChange:e=>{e?C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:100})):C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:void 0}))}})}),i.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[i.jsx(O.RadioButton,{label:"Percentage off",isActive:100!==C.discountData.value,onValueChange:()=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:void 0}))}}),100!==C.discountData.value&&i.jsx("div",Object.assign({style:{marginTop:8}},{children:i.jsx(u.Input,{value:null!==(o=null===(t=null===(e=C.discountData)||void 0===e?void 0:e.value)||void 0===t?void 0:t.toString())&&void 0!==o?o:"",onChangeText:e=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:parseInt(e)}))},type:"number",placeholder:"Eg. 50",suffixText:"%",width:"300px",errorMessage:(null===(s=C.dynamicDiscountValidationError)||void 0===s?void 0:s.inValidDiscountAmount)?"Required Field":"",state:(null===(n=C.dynamicDiscountValidationError)||void 0===n?void 0:n.inValidDiscountAmount)?"invalid":"none"})}))]}))]}))})(),!C.selectedCouponType&&i.jsx(j.default,{}),C.allowStaticCoupon&&C.selectedCouponType!==l.DISCOUNT_TYPES.BUY_X_GET_Y&&i.jsx("div",Object.assign({style:{padding:"24px 0 16px",marginTop:16,borderTop:`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`}},{children:i.jsx(v.default,{selectedMinimumRequirement:C.selectedMinimumRequirement,setSelectedMinimumRequirement:C.setSelectedMinimumRequirement,discountData:C.discountData,setDiscountData:C.setDiscountData,currency:C.currency,dynamicDiscountValidationError:C.dynamicDiscountValidationError})})),C.selectedCouponType&&!C.hideExpiration&&i.jsxs("div",Object.assign({style:{padding:C.selectedCouponType!==l.DISCOUNT_TYPES.BUY_X_GET_Y?"24px 0 16px":"8px 0",borderTop:C.selectedCouponType!==l.DISCOUNT_TYPES.BUY_X_GET_Y?`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`:"none"}},{children:[i.jsx(r.CheckBox,{label:"Add expiration",isDisabled:!!C.makeExpiryMandatory,isChecked:C.isAddExpirationChecked,onValueChange:e=>{C.setIsAddExpirationChecked(e),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{expireAfter:void 0,expireAt:void 0})),C.setSelectedExpiration(l.COUPON_EXPIRATION.DYNAMIC_EXPIRATION)},boldOnChecked:!0,labelSize:"DEFAULT"}),i.jsx(d.BodySecondary,Object.assign({style:{color:c.DEFAULT_THEME.colorsV2.text.secondary,marginLeft:28}},{children:"Make coupon only valid till a certain time"})),C.isAddExpirationChecked&&i.jsx(D.CouponExpiration,{discountData:C.discountData,setDiscountData:C.setDiscountData,isAddExpirationChecked:C.isAddExpirationChecked,inValidCouponExpiry:C.dynamicDiscountValidationError.inValidCouponExpiry,selectedExpiration:C.selectedExpiration,setSelectedExpiration:C.setSelectedExpiration})]}))]})};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),i=require("react/jsx-runtime"),t=require("../../../assets/icons/info.svg.js"),o=require("../../alerts/Alert.js"),s=require("../../alerts/AlertHelper.js"),n=require("../../button/Button.js"),r=require("../../checkBox/CheckBox.js");require("../../../node_modules/@bikdotai/bik-models/growth/models/bik-store.js"),require("react");var l=require("../type.js");require("../../dropdown/DropdownPopover/index.js");var a=require("../../dropdown/Dropdown.js");require("../../dropdown/ChipDropdown.js"),require("../../zeroState/ZeroState.js");var d=require("../../TypographyStyle.js"),c=require("../../../constants/Theme.js");require("../../dropdown/OpenedDropdown/components/description/Description.styled.js"),require("../../list-item/ListItem.js"),require("../../dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.js"),require("../../dropdown/OpenedDropdown/components/menu/MenuItem.js"),require("../../dropdown/OpenedDropdown/components/menu/MenuList.styled.js"),require("../../dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.js"),require("../../dropdown/OpenedDropdown/components/OpennedDropdown.styled.js"),require("../../icon-button/IconButton.js");var u=require("../../input/Input.js"),p=require("../../../assets/icons/cross.svg.js");require("../../dropdown/MenuItem/MenuItem.js"),require("../../modals/styledModal.js"),require("../../../node_modules/lodash.debounce/index.js"),require("../../bik-layout/CommonStyles.js"),require("../../product-picker/ProductPicker.styled.js"),require("../../../utils/DateUtils.js"),require("../../tag/Tag.js"),require("../../tooltips/Tooltip.js"),require("../../product-picker-v2/modal.js"),require("../../variable-picker-v3/model.js"),require("../../modals/modal.styled.js");var T=require("../../../assets/icons/plus.svg.js");require("../../accordion/Accordion.style.js"),require("../../accordion/AccordionArrow.js"),require("../../switch/Switch.js"),require("../../variable-picker-v3/NoResult.js"),require("../../variable-picker-v3/styles.js"),require("lodash");var C,E=require("../DiscountModal.styled.js"),D=require("../CouponExpiration/CouponExpiration.js"),O=require("../../radioButton/RadioButton.js"),S=require("../../../assets/icons/cubeIcon.svg.js"),P=require("../../../assets/icons/delete.svg.js"),I=require("../../../assets/icons/edit.svg.js"),x=require("./DynamicCoupon.styled.js"),v=require("./MinimumRequirementComponent.js"),j=require("./ZeroState.js");exports.DISCOUNT_PRODUCTS=void 0,(C=exports.DISCOUNT_PRODUCTS||(exports.DISCOUNT_PRODUCTS={})).ENTITLED="entitled",C.PREREQUISITE="prerequisite";exports.default=C=>{var _,b,m,g,y,h,U,R;const N=[{selected:C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER,label:"Entire Order",value:l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER},{selected:C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS,label:"Specific Product",value:l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS},{selected:C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS}],V=[{selected:C.offerAppliesToBuy===l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS,label:"Specific Product",value:l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS},{selected:C.offerAppliesToBuy===l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS}],A=[{selected:C.offerAppliesToGet===l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS,label:"Specific Product",value:l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS},{selected:C.offerAppliesToGet===l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS,label:"Specific Collections",value:l.OFFER_APPLIES_TO.SPECIFIC_COLLECTIONS}],q=(e,r,a)=>{var u,E,D,O,v,j,_,b,m,g,y,h;let U=[],R=[],N={},V={};C.useNewPicker?(N=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,V=null!==(u=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==u?u:[],(null==N?void 0:N.isCustom)&&delete N.isCustom,(null==V?void 0:V.isCustom)&&delete V.isCustom,Object.values(N).forEach((e=>{Object.keys(e.products).forEach((i=>{U.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(V).forEach((e=>{"isCustom"!==e&&R.push({id:e,name:V[e].name,image:V[e].image})}))):(U=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,R=null!==(E=r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==E?E:[]);const A=[null===(D=C.dynamicDiscountValidationError)||void 0===D?void 0:D.inValidProductSelection,null===(O=C.dynamicDiscountValidationError)||void 0===O?void 0:O.inValidProductVariableSelection,null===(v=C.dynamicDiscountValidationError)||void 0===v?void 0:v.inValidCollectionSelection],q=[null===(j=C.dynamicDiscountValidationError)||void 0===j?void 0:j.inValidBuyXCollectionSelection,null===(_=C.dynamicDiscountValidationError)||void 0===_?void 0:_.inValidBuyXProductSelection,null===(b=C.dynamicDiscountValidationError)||void 0===b?void 0:b.inValidBuyXProductVariableSelection],L=[null===(m=C.dynamicDiscountValidationError)||void 0===m?void 0:m.inValidGetYCollectionSelection,null===(g=C.dynamicDiscountValidationError)||void 0===g?void 0:g.inValidGetYProductSelection,null===(y=C.dynamicDiscountValidationError)||void 0===y?void 0:y.inValidGetYProductVariableSelection];let f=!1;return"couponAppliesTo"===a&&(f=A.some(Boolean)),"buyX"===a&&(f=q.some(Boolean)),"getY"===a&&(f=L.some(Boolean)),i.jsxs(i.Fragment,{children:[i.jsxs("div",Object.assign({style:{display:"flex",gap:18}},{children:[e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS&&0===U.length&&(r===exports.DISCOUNT_PRODUCTS.ENTITLED&&!C.entitledProductVariable||r===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&!C.preRequisiteProductVariable)&&!(null==R?void 0:R.length)&&i.jsxs(x.AddProductButtonsContainer,{children:[i.jsx("div",Object.assign({style:{width:C.isProductVariableSupported?"284px":"300px",display:"flex"}},{children:i.jsx(n.Button,{buttonText:"Add Product(s)",buttonType:"dashRegular",LeadingIcon:T.default,matchParentWidth:!0,onClick:()=>{C.setIsProductPickerOpen(r)},error:f})})),C.isProductVariableSupported&&C.productVariableList&&i.jsxs(i.Fragment,{children:[i.jsx(d.BodySecondary,Object.assign({color:c.DEFAULT_THEME.colorsV2.content.placeholder},{children:"OR"})),i.jsx(n.Button,{buttonText:"Add Product(s) Variable",buttonType:"dashRegular",LeadingIcon:T.default,matchParentWidth:!0,onClick:()=>{C.setIsProductVariablePickerOpen(r)},error:f})]})]}),e===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS&&0===R.length&&!(null==U?void 0:U.length)&&i.jsx("div",Object.assign({style:{width:"300px",display:"flex"}},{children:i.jsx(n.Button,{buttonText:"Add collection(s)",buttonType:"dashRegular",LeadingIcon:T.default,matchParentWidth:!0,onClick:()=>{C.setIsCollectionPickerOpen(r)},style:{marginTop:"16px"},error:f})}))]})),f&&i.jsx("div",Object.assign({style:{margin:"8px 0 0"}},{children:i.jsx(o.Alert,{type:s.ALERT_TYPES.NEGATIVE,text:"Required Field",contentPosition:s.CONTENT_POSITION.START,icon:()=>i.jsx(t.default,{width:16,height:16,color:c.DEFAULT_THEME.colorsV2.content.negative})})})),U.length||R.length?i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{margin:"8px 0"}},{children:e===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS?"Collection(s)":"Product(s)"})),i.jsxs(x.ProductCollectionCard,{children:[i.jsx(x.CubeIconContainer,{children:i.jsx(S.default,{width:20,height:20,color:c.DEFAULT_THEME.colorsV2.content.secondary})}),i.jsxs(d.TitleSmall,{children:[e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?U.length:R.length," ",e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?"Product(s)":"Collection(s)"," ","added"]}),i.jsxs("div",Object.assign({style:{display:"flex",gap:4}},{children:[i.jsx(x.IconContainer,Object.assign({onClick:()=>{e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?C.setIsProductPickerOpen(r):C.setIsCollectionPickerOpen(r)}},{children:i.jsx(I.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.placeholder})})),i.jsx(x.IconContainer,Object.assign({onClick:()=>{e===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS?r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.setEntitledProducts([]):C.setPrerequisiteProducts([]):r===exports.DISCOUNT_PRODUCTS.ENTITLED?C.setEntitledCollections([]):C.setPrerequisiteCollections([])}},{children:i.jsx(P.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.placeholder})}))]}))]})]}):r===exports.DISCOUNT_PRODUCTS.ENTITLED&&C.entitledProductVariable?i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i.jsxs(x.ProductVariableCard,{children:[i.jsx(d.TitleSmall,{children:C.entitledProductVariable.displayName}),i.jsx("div",Object.assign({style:{display:"flex",gap:4}},{children:i.jsx(x.IconContainer,Object.assign({onClick:()=>{C.setEntitledProductVariable(void 0)}},{children:i.jsx(p.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.primary})}))}))]})]}):r===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&(null===(h=C.preRequisiteProductVariable)||void 0===h?void 0:h.displayName)?i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{margin:"16px 0 8px"}},{children:"Product Variable"})),i.jsxs(x.ProductVariableCard,{children:[i.jsx(d.TitleSmall,{children:C.preRequisiteProductVariable.displayName}),i.jsx("div",Object.assign({style:{display:"flex",gap:4}},{children:i.jsx(x.IconContainer,Object.assign({onClick:()=>{C.setPreRequisiteProductVariable(void 0)}},{children:i.jsx(p.default,{width:24,height:24,color:c.DEFAULT_THEME.colorsV2.content.primary})}))}))]})]}):i.jsx(i.Fragment,{children:" "})]})},L=(e,t)=>{var o,s,n,r,c,p,T,E,D,O;let S=[],P=[],I={},x={};C.useNewPicker?(I=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,x=null!==(o=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==o?o:[],(null==I?void 0:I.isCustom)&&delete I.isCustom,(null==x?void 0:x.isCustom)&&delete x.isCustom,Object.values(I).forEach((e=>{Object.keys(e.products).forEach((i=>{S.push({id:i,name:e.products[i].name,image:e.products[i].image})}))})),Object.keys(x).forEach((e=>{"isCustom"!==e&&P.push({id:e,name:x[e].name,image:x[e].image})}))):(S=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledProducts:C.prerequisiteProducts,P=null!==(s=e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.entitledCollections:C.prerequisiteCollections)&&void 0!==s?s:[]);const v=e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?C.offerAppliesToBuy:C.offerAppliesToGet,j=e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?exports.DISCOUNT_PRODUCTS.PREREQUISITE:exports.DISCOUNT_PRODUCTS.ENTITLED,_=v===l.OFFER_APPLIES_TO.SPECIFIC_PRODUCTS?l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS:l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS;return i.jsxs("div",{children:[i.jsx(d.TitleSmall,Object.assign({style:{marginBottom:16}},{children:e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?"Customer buys":"Customer gets"})),i.jsxs("div",Object.assign({style:{display:"flex"}},{children:[!t&&i.jsx("div",{children:i.jsxs("div",Object.assign({className:"input__rows"},{children:[i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(u.Input,{value:e===exports.DISCOUNT_PRODUCTS.ENTITLED?null!==(r=null===(n=C.discountData.entitledQuantity)||void 0===n?void 0:n.toString())&&void 0!==r?r:"":null!==(p=null===(c=C.discountData.prerequisiteQuantity)||void 0===c?void 0:c.toString())&&void 0!==p?p:"",type:"number",onChangeText:i=>{e===exports.DISCOUNT_PRODUCTS.ENTITLED?C.setDiscountData(Object.assign(Object.assign({},C.discountData),{entitledQuantity:parseInt(i)})):C.setDiscountData(Object.assign(Object.assign({},C.discountData),{prerequisiteQuantity:parseInt(i)}))},labelText:"Quantity of products",placeholder:"Eg. 2",width:"300px",errorMessage:e===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&(null===(T=C.dynamicDiscountValidationError)||void 0===T?void 0:T.inValidBuyXValue)||e===exports.DISCOUNT_PRODUCTS.ENTITLED&&(null===(E=C.dynamicDiscountValidationError)||void 0===E?void 0:E.inValidGetYValue)?"Required Field":"",state:e===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&(null===(D=C.dynamicDiscountValidationError)||void 0===D?void 0:D.inValidBuyXValue)||e===exports.DISCOUNT_PRODUCTS.ENTITLED&&(null===(O=C.dynamicDiscountValidationError)||void 0===O?void 0:O.inValidGetYValue)?"invalid":"none"})})),i.jsx("div",{className:"input__wrapper"})]}))}),i.jsxs("div",{children:[i.jsx(d.BodySecondary,Object.assign({style:{marginBottom:8}},{children:"Any items from"})),e===exports.DISCOUNT_PRODUCTS.PREREQUISITE&&i.jsx(a.Dropdown,{width:"244px",options:V,placement:"bottom-start",onSelect:e=>{var i,t,o;C.setOfferAppliesToBuy(e.value),C.setPrerequisiteProducts([]),C.setPrerequisiteCollections([]),C.setPreRequisiteProductVariable(void 0),C.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidBuyXCollectionSelection:!1,inValidBuyXProductSelection:!1,inValidBuyXProductVariableSelection:!1}))),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:null===(i=C.discountData.collectionsConf)||void 0===i?void 0:i.entitledCollections,prerequisiteCollections:{}},productsConf:{entitledProducts:null===(t=C.discountData.productsConf)||void 0===t?void 0:t.entitledProducts,prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:null===(o=C.discountData.productVariableConf)||void 0===o?void 0:o.entitledProductVariable,prerequisiteProductVariable:{}}}))}}),e===exports.DISCOUNT_PRODUCTS.ENTITLED&&i.jsx(a.Dropdown,{width:"244px",options:A,placement:"bottom-start",onSelect:e=>{var i,t,o;C.setOfferAppliesToGet(e.value),C.setEntitledProducts([]),C.setEntitledCollections([]),C.setEntitledProductVariable(void 0),C.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidGetYCollectionSelection:!1,inValidGetYProductSelection:!1,inValidGetYProductVariableSelection:!1}))),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{entitledCollectionIds:[],entitledProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:null===(i=C.discountData.collectionsConf)||void 0===i?void 0:i.prerequisiteCollections},productsConf:{entitledProducts:{},prerequisiteProducts:null===(t=C.discountData.productsConf)||void 0===t?void 0:t.prerequisiteProducts},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:null===(o=C.discountData.productVariableConf)||void 0===o?void 0:o.prerequisiteProductVariable}}))}})]})]})),q(_,j,e===exports.DISCOUNT_PRODUCTS.PREREQUISITE?"buyX":"getY")]})};return i.jsxs(E.DynamicCouponContainer,{children:[i.jsxs("div",{children:[i.jsxs("div",Object.assign({style:{display:"flex",gap:16}},{children:[i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(u.Input,{value:null!==(_=C.discountData.title)&&void 0!==_?_:"",onChangeText:e=>{var i;C.setDiscountData(Object.assign(Object.assign({},C.discountData),{title:null!==(i=null==e?void 0:e.trim())&&void 0!==i?i:""}))},maxCharLimit:30,labelText:"Discount Coupon Title",placeholder:`Eg. “Flat ${null!==(b=C.currency)&&void 0!==b?b:""} 15 Off”`,hintText:"Will be same for everyone. Can’t be changed later",width:"300px",isRequired:!0,errorMessage:(null===(m=C.dynamicDiscountValidationError)||void 0===m?void 0:m.invalidCouponTitle)?"Required Field":"",state:(null===(g=C.dynamicDiscountValidationError)||void 0===g?void 0:g.invalidCouponTitle)?"invalid":"none"})})),!C.hideProbability&&i.jsx(u.Input,{value:null!==(h=null===(y=C.discountData.probability)||void 0===y?void 0:y.toString())&&void 0!==h?h:"",type:"number",onChangeText:e=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{probability:e.startsWith(".")?parseFloat(parseFloat(`0${e}`).toFixed(2)):parseFloat(parseFloat(e).toFixed(2))}))},labelText:"Probability of getting coupon ",hintText:"Enter a decimal value between 0-1",placeholder:"Eg. 0.5",maxCharLimit:4,width:"300px",isRequired:!0,errorMessage:(null===(U=C.dynamicDiscountValidationError)||void 0===U?void 0:U.inValidProbability)?"Required Field":"",state:(null===(R=C.dynamicDiscountValidationError)||void 0===R?void 0:R.inValidProbability)?"invalid":"none"})]})),i.jsx("div",{style:{height:"1px",width:"100%",background:c.DEFAULT_THEME.colorsV2.stroke.primary,margin:"24px 0 8px"}})]}),C.allowStaticCoupon&&i.jsx((()=>i.jsxs("div",{children:[i.jsx(d.TitleRegular,{children:"Discount Details"}),i.jsx(x.DiscountOptionsContainer,{children:C.discountDetailsOptions.map((t=>{return i.jsxs(x.DiscountDetailsOption,Object.assign({selected:C.selectedDiscountDetails.id===t.id,onClick:()=>(i=>{if(C.selectedDiscountDetails.id!==i.id)if(C.resetValidationErrors(),C.setValidationErrorMessage(""),C.setDiscountCouponAppliesTo(l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER),C.setSelectedDiscountDetails(i),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:void 0})),C.setPreRequisiteProductVariable(void 0),C.setEntitledProductVariable(void 0),["percentage","amount"].includes(i.value)){C.onChangeCouponType({label:"Amount off on order",selected:!0,value:l.DISCOUNT_TYPES.AMOUNT_OFF_ORDER});const t=Object.assign(Object.assign({},C.discountData),{valueType:"percentage"===i.value?l.DISCOUNT_VALUE_TYPES.PERCENTAGE:l.DISCOUNT_VALUE_TYPES.FIXED_AMOUNT,value:void 0,targetType:l.DISCOUNT_TARGET_TYPES.LINE_ITEM,targetSelection:l.DISCOUNT_TARGET_SELECTION.ALL,entitledCollectionIds:[],entitledProductIds:[],prerequisiteCollectionIds:[],prerequisiteProductIds:[],collectionsConf:{entitledCollections:{},prerequisiteCollections:{}},productsConf:{entitledProducts:{},prerequisiteProducts:{}},productVariableConf:{entitledProductVariable:{},prerequisiteProductVariable:{}}}),o=e.__rest(t,["entitledQuantity","prerequisiteQuantity"]);C.setDiscountData(o)}else C.onChangeCouponType({label:i.label,selected:!0,value:i.value})})(t)},{children:[t.icon((o=t.id,C.selectedDiscountDetails.id===o?c.DEFAULT_THEME.colorsV2.stroke.brand:c.DEFAULT_THEME.colorsV2.text.secondary)),t.label]}),t.id);var o}))})]})),{}),(C.selectedCouponType===l.DISCOUNT_TYPES.AMOUNT_OFF_ORDER||C.selectedCouponType===l.DISCOUNT_TYPES.AMOUNT_OFF_PRODUCTS)&&(()=>{var e,t,o,s,n,r;return i.jsxs(i.Fragment,{children:[i.jsx("div",Object.assign({className:"input__rows"},{children:i.jsx("div",Object.assign({className:"input__wrapper"},{children:i.jsx(u.Input,{value:null!==(o=null===(t=null===(e=C.discountData)||void 0===e?void 0:e.value)||void 0===t?void 0:t.toString())&&void 0!==o?o:"",labelText:"Discount amount",type:"number",width:"300px",onChangeText:e=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:parseInt(e)}))},placeholder:"15",prefixText:C.discountData.valueType===l.DISCOUNT_VALUE_TYPES.FIXED_AMOUNT?null!==(s=C.currency)&&void 0!==s?s:"":void 0,suffixText:C.discountData.valueType===l.DISCOUNT_VALUE_TYPES.PERCENTAGE?"%":void 0,errorMessage:(null===(n=C.dynamicDiscountValidationError)||void 0===n?void 0:n.inValidDiscountAmount)?"Required Field":"",state:(null===(r=C.dynamicDiscountValidationError)||void 0===r?void 0:r.inValidDiscountAmount)?"invalid":"none"})}))})),i.jsx("div",Object.assign({style:{paddingTop:"24px",marginTop:16,borderTop:`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`}},{children:i.jsxs("div",Object.assign({className:"input__wrapper"},{children:[i.jsx(d.TitleRegular,Object.assign({style:{marginBottom:10}},{children:"Applies to"})),i.jsx("div",Object.assign({style:{display:"flex",flexGrow:0,flexShrink:0,flexBasis:"auto"}},{children:i.jsx(a.Dropdown,{width:"300px",options:N,placement:"bottom-start",onSelect:e=>{const i="value"in e&&e.value===l.DISCOUNT_APPLIES_TO.ENTIRE_ORDER?{label:"Amount off on order",selected:!0,value:l.DISCOUNT_TYPES.AMOUNT_OFF_ORDER}:{label:"Amount off on products",selected:!0,value:l.DISCOUNT_TYPES.AMOUNT_OFF_PRODUCTS};C.onChangeCouponType(i),C.setDiscountCouponAppliesTo(e.value),C.setEntitledProductVariable(void 0),C.setDynamicDiscountValidationError((e=>Object.assign(Object.assign({},e),{inValidProductVariableSelection:!1,inValidProductSelection:!1,inValidCollectionSelection:!1})))}})})),(C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_PRODUCTS||C.discountCouponAppliesTo===l.DISCOUNT_APPLIES_TO.SPECIFIC_COLLECTIONS)&&q(C.discountCouponAppliesTo,exports.DISCOUNT_PRODUCTS.ENTITLED,"couponAppliesTo")]}))}))]})})(),C.selectedCouponType===l.DISCOUNT_TYPES.BUY_X_GET_Y&&(()=>{var e,t,o,s,n;return i.jsxs(E.DynamicCouponContainer,Object.assign({style:{border:`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`,padding:"16px",borderRadius:"4px",margin:0}},{children:[L(exports.DISCOUNT_PRODUCTS.PREREQUISITE),i.jsx("div",{style:{width:"100%",height:"1px",backgroundColor:c.DEFAULT_THEME.colorsV2.stroke.primary,margin:"8px 0"}}),L(exports.DISCOUNT_PRODUCTS.ENTITLED),i.jsx(d.BodySecondary,Object.assign({style:{marginTop:"8px"}},{children:"At a discounted value"})),i.jsx("div",{children:i.jsx(O.RadioButton,{label:"Free",isActive:100===C.discountData.value,onValueChange:e=>{e?C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:100})):C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:void 0}))}})}),i.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[i.jsx(O.RadioButton,{label:"Percentage off",isActive:100!==C.discountData.value,onValueChange:()=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:void 0}))}}),100!==C.discountData.value&&i.jsx("div",Object.assign({style:{marginTop:8}},{children:i.jsx(u.Input,{value:null!==(o=null===(t=null===(e=C.discountData)||void 0===e?void 0:e.value)||void 0===t?void 0:t.toString())&&void 0!==o?o:"",onChangeText:e=>{C.setDiscountData(Object.assign(Object.assign({},C.discountData),{value:parseInt(e)}))},type:"number",placeholder:"Eg. 50",suffixText:"%",width:"300px",errorMessage:(null===(s=C.dynamicDiscountValidationError)||void 0===s?void 0:s.inValidDiscountAmount)?"Required Field":"",state:(null===(n=C.dynamicDiscountValidationError)||void 0===n?void 0:n.inValidDiscountAmount)?"invalid":"none"})}))]}))]}))})(),!C.selectedCouponType&&i.jsx(j.default,{}),C.allowStaticCoupon&&C.selectedCouponType!==l.DISCOUNT_TYPES.BUY_X_GET_Y&&i.jsx("div",Object.assign({style:{padding:"24px 0 16px",marginTop:16,borderTop:`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`}},{children:i.jsx(v.default,{selectedMinimumRequirement:C.selectedMinimumRequirement,setSelectedMinimumRequirement:C.setSelectedMinimumRequirement,discountData:C.discountData,setDiscountData:C.setDiscountData,currency:C.currency,dynamicDiscountValidationError:C.dynamicDiscountValidationError})})),C.selectedCouponType&&!C.hideExpiration&&i.jsxs("div",Object.assign({style:{padding:C.selectedCouponType!==l.DISCOUNT_TYPES.BUY_X_GET_Y?"24px 0 16px":"8px 0",borderTop:C.selectedCouponType!==l.DISCOUNT_TYPES.BUY_X_GET_Y?`1px solid ${c.DEFAULT_THEME.colorsV2.stroke.primary}`:"none"}},{children:[i.jsx(r.CheckBox,{label:"Add expiration",isDisabled:!!C.makeExpiryMandatory,isChecked:C.isAddExpirationChecked,onValueChange:e=>{C.setIsAddExpirationChecked(e),C.setDiscountData(Object.assign(Object.assign({},C.discountData),{expireAfter:void 0,expireAt:void 0})),C.setSelectedExpiration(l.COUPON_EXPIRATION.DYNAMIC_EXPIRATION)},boldOnChecked:!0,labelSize:"DEFAULT"}),i.jsx(d.BodySecondary,Object.assign({style:{color:c.DEFAULT_THEME.colorsV2.text.secondary,marginLeft:28}},{children:"Make coupon only valid till a certain time"})),C.isAddExpirationChecked&&i.jsx(D.CouponExpiration,{discountData:C.discountData,setDiscountData:C.setDiscountData,isAddExpirationChecked:C.isAddExpirationChecked,inValidCouponExpiry:C.dynamicDiscountValidationError.inValidCouponExpiry,selectedExpiration:C.selectedExpiration,setSelectedExpiration:C.setSelectedExpiration})]}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../../utils/StringUtils.js"),l=require("../../constants/Theme.js"),r=require("../../assets/icons/chevronDown.svg.js"),i=require("../../assets/icons/cross.svg.js"),n=require("../../assets/icons/errorInfo.svg.js"),o=require("../input/Input.styled.js"),a=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),d=require("../TypographyStyle.js"),h=require("./Common.styled.js");exports.default=j=>{let{chips:g,onDeleteChip:u,containerStyle:p={},sizeToUse:x="default",isDropdownOpened:O,placeholder:b="Select..",errorMessage:y="",showLabelsOnMoreHover:m=!1}=j;const[v,f]=t.useState(),[q,C]=t.useState(0),[S,T]=t.useState([]);return t.useEffect((()=>{if(!g)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(g);let s=g.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&g.length>0&&(s=[g[0]]),f(s);const l=g.filter((e=>!s.includes(e))).map((e=>e.label));T(l),C(g.length-s.length)}),[g]),e.jsxs(e.Fragment,{children:[e.jsxs(h.ChipInputWrapper,Object.assign({style:Object.assign({},p),error:!!y},{children:[e.jsxs("div",Object.assign({className:"chips-container"},{children:[null==v?void 0:v.map(((t,l)=>e.jsx("div",Object.assign({style:{zIndex:2}},{children:e.jsx(a.Tag,Object.assign({tagText:s.default.truncateText(t.selectedLabel||t.label,40),TrailingIcon:()=>e.jsx(i.default,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{u(t)}})},{children:t.selectedLabel||t.label}))}),l))),!!q&&e.jsx("div",Object.assign({style:{position:"relative",zIndex:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("../../utils/StringUtils.js"),l=require("../../constants/Theme.js"),r=require("../../assets/icons/chevronDown.svg.js"),i=require("../../assets/icons/cross.svg.js"),n=require("../../assets/icons/errorInfo.svg.js"),o=require("../input/Input.styled.js"),a=require("../tag/Tag.js"),c=require("../tooltips/Tooltip.js"),d=require("../TypographyStyle.js"),h=require("./Common.styled.js");exports.default=j=>{let{chips:g,onDeleteChip:u,containerStyle:p={},sizeToUse:x="default",isDropdownOpened:O,placeholder:b="Select..",errorMessage:y="",showLabelsOnMoreHover:m=!1}=j;const[v,f]=t.useState(),[q,C]=t.useState(0),[S,T]=t.useState([]);return t.useEffect((()=>{if(!g)return;let e=0;const t=(e=>1===e.length?100:2===e.length?40:34)(g);let s=g.filter((s=>(e+=s.label.length,e<=t)));0===s.length&&g.length>0&&(s=[g[0]]),f(s);const l=g.filter((e=>!s.includes(e))).map((e=>e.label));T(l),C(g.length-s.length)}),[g]),e.jsxs(e.Fragment,{children:[e.jsxs(h.ChipInputWrapper,Object.assign({style:Object.assign({},p),error:!!y},{children:[e.jsxs("div",Object.assign({className:"chips-container"},{children:[null==v?void 0:v.map(((t,l)=>e.jsx("div",Object.assign({style:{zIndex:2}},{children:e.jsx(a.Tag,Object.assign({tagText:s.default.truncateText(t.selectedLabel||t.label,40),TrailingIcon:()=>e.jsx(i.default,{width:12,height:12,style:{cursor:"pointer"},onClick:()=>{u(t)}})},{children:t.selectedLabel||t.label}))}),l))),!!q&&e.jsx("div",Object.assign({style:{position:"relative",zIndex:2,pointerEvents:"auto"}},{children:e.jsx(c.Tooltip,Object.assign({body:"",placement:"bottom",tooltipContent:m&&S.length>0?e.jsx("div",Object.assign({style:{padding:"4px"}},{children:S.map(((t,s)=>e.jsx(d.BodyCaption,Object.assign({style:{color:l.COLORS.text.white}},{children:t}),s)))})):void 0},{children:e.jsx(d.BodyCaption,Object.assign({color:l.COLORS.content.placeholder},{children:`+${q} more`}))}))})),0===g.length&&e.jsx("div",Object.assign({style:{color:l.COLORS.content.placeholder}},{children:b}))]})),e.jsx("div",{children:e.jsx(r.default,{style:{transform:O?"rotate(180deg)":"rotate(0deg)"},width:"x-small"===x?16:"small"===x?20:24,height:"x-small"===x?16:"small"===x?20:24,color:l.COLORS.content.primary})})]})),!!y&&e.jsxs(o.InputFooter,Object.assign({invalid:!0},{children:[!!y&&e.jsx(n.default,{width:16,height:16}),y]}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),o=require("../../constants/Theme.js"),l=require("../../assets/icons/chevronDown.svg.js"),r=require("../input/Input.js"),i=require("../input/context/InputStyleProvider.js"),s=require("./ChipInput.js"),a=require("./DropdownPopover/index.js"),d=require("./OpenedDropdown/utils/iterationOnOptions.js");function u(){}const c=c=>{var p,h,v,g,x,{placeHolder:w,size:j,onSelect:f,defaultOptions:b,disabled:O,noErrorHint:I,placeHolderHeight:y,showPlaceholderWhenSelected:S=!1,inputStyle:m={},inputType:H="default",onDeleteChip:D,truncatedText:P,showLeadingIconInPlaceholder:T=!1,showTrailingIconPlaceholder:q=!1,showLabelsOnMoreHover:C=!1}=c,E=e.__rest(c,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover"]);const[L,M]=n.useState(!1),_=null!=j?j:"default",z=n.useRef(),[W,A]=n.useState(null!=b?b:[]);n.useEffect((()=>{var e;const t=[];null===(e=null==E?void 0:E.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),A([...t])}),[E.options]),n.useEffect((()=>{b&&A([...b])}),[b]);const R=d.getSelectedOptionsAsText(W);return t.jsx(i.InputStyleContext.Provider,Object.assign({value:{InputWrapper:Object.assign({height:y||("x-small"===_?24:"small"===_?32:48),width:null!==(h=null!==(p=E.buttonWidth)&&void 0!==p?p:E.width)&&void 0!==h?h:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===_?"4px 8px":"6px 8px"},m),input:{minHeight:"100%"}}},{children:t.jsxs(a.DropdownPopover,Object.assign({"data-test":E["data-test"],ref:z,onSelect:function(e){Array.isArray(e)?A([...e]):A([e]),null==f||f(e)},disabled:O,onDropdownVisbilityChange:e=>M(e)},E,{children:["default"==H&&t.jsx(r.Input,{version:E.version,noErrorHint:I,state:O?"disabled":"none",value:S?w:null!=R?R:"",errorMessage:E.error,variant:_,placeholder:null!=w?w:"Select an option",width:null!==(v=E.width)&&void 0!==v?v:"100%",onChangeText:u,leftIcon:T&&(null===(g=W[0])||void 0===g?void 0:g.leadingIcon)?{icon:()=>{var e;return t.jsx(t.Fragment,{children:null===(e=W[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return t.jsxs("div",Object.assign({style:{display:"flex"}},{children:[q&&(null===(e=W[0])||void 0===e?void 0:e.trailingIcon),t.jsx(l.default,{style:{transform:L?"rotate(180deg)":"rotate(0deg)"},onClick:u,width:"x-small"===_?16:"small"===_?20:24,height:"x-small"===_?16:"small"===_?20:24,color:o.COLORS.content.primary})]}))}},truncateText:null==P||P}),"chip"==H&&t.jsx(s.default,{placeholder:null!=w?w:"Select options",chips:W,onDeleteChip:e=>{null==D||D(e)},errorMessage:E.error,isDropdownOpened:L,sizeToUse:_,containerStyle:{width:null!==(x=E.width)&&void 0!==x?x:"100%",cursor:"pointer"},showLabelsOnMoreHover:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),n=require("react"),o=require("../../constants/Theme.js"),l=require("../../assets/icons/chevronDown.svg.js"),r=require("../input/Input.js"),i=require("../input/context/InputStyleProvider.js"),s=require("./ChipInput.js"),a=require("./DropdownPopover/index.js"),d=require("./OpenedDropdown/utils/iterationOnOptions.js");function u(){}const c=c=>{var p,h,v,g,x,{placeHolder:w,size:j,onSelect:f,defaultOptions:b,disabled:O,noErrorHint:I,placeHolderHeight:y,showPlaceholderWhenSelected:S=!1,inputStyle:m={},inputType:H="default",onDeleteChip:D,truncatedText:P,showLeadingIconInPlaceholder:T=!1,showTrailingIconPlaceholder:q=!1,showLabelsOnMoreHover:C=!1}=c,E=e.__rest(c,["placeHolder","size","onSelect","defaultOptions","disabled","noErrorHint","placeHolderHeight","showPlaceholderWhenSelected","inputStyle","inputType","onDeleteChip","truncatedText","showLeadingIconInPlaceholder","showTrailingIconPlaceholder","showLabelsOnMoreHover"]);const[L,M]=n.useState(!1),_=null!=j?j:"default",z=n.useRef(),[W,A]=n.useState(null!=b?b:[]);n.useEffect((()=>{var e;const t=[];null===(e=null==E?void 0:E.options)||void 0===e||e.forEach((e=>{e.options?e.options.forEach((e=>{e.selected&&t.push(Object.assign(Object.assign({},e),{label:e.label}))})):e.selected&&t.push(e)})),A([...t])}),[E.options]),n.useEffect((()=>{b&&A([...b])}),[b]);const R=d.getSelectedOptionsAsText(W);return t.jsx(i.InputStyleContext.Provider,Object.assign({value:{InputWrapper:Object.assign({height:y||("x-small"===_?24:"small"===_?32:48),width:null!==(h=null!==(p=E.buttonWidth)&&void 0!==p?p:E.width)&&void 0!==h?h:"100%",zIndex:1,cursor:"pointer",padding:"x-small"===_?"4px 8px":"6px 8px"},m),input:{minHeight:"100%"}}},{children:t.jsxs(a.DropdownPopover,Object.assign({"data-test":E["data-test"],ref:z,onSelect:function(e){Array.isArray(e)?A([...e]):A([e]),null==f||f(e)},disabled:O,onDropdownVisbilityChange:e=>M(e)},E,{children:["default"==H&&t.jsx(r.Input,{version:E.version,noErrorHint:I,state:O?"disabled":"none",value:S?w:null!=R?R:"",errorMessage:E.error,variant:_,placeholder:null!=w?w:"Select an option",width:null!==(v=E.width)&&void 0!==v?v:"100%",onChangeText:u,leftIcon:T&&(null===(g=W[0])||void 0===g?void 0:g.leadingIcon)?{icon:()=>{var e;return t.jsx(t.Fragment,{children:null===(e=W[0])||void 0===e?void 0:e.leadingIcon})}}:void 0,rightIcon:{icon:()=>{var e;return t.jsxs("div",Object.assign({style:{display:"flex"}},{children:[q&&(null===(e=W[0])||void 0===e?void 0:e.trailingIcon),t.jsx(l.default,{style:{transform:L?"rotate(180deg)":"rotate(0deg)"},onClick:u,width:"x-small"===_?16:"small"===_?20:24,height:"x-small"===_?16:"small"===_?20:24,color:o.COLORS.content.primary})]}))}},truncateText:null==P||P}),"chip"==H&&t.jsx(s.default,{placeholder:null!=w?w:"Select options",chips:W,onDeleteChip:e=>{null==D||D(e)},errorMessage:E.error,isDropdownOpened:L,sizeToUse:_,containerStyle:{width:null!==(x=E.width)&&void 0!==x?x:"100%",cursor:"pointer"},showLabelsOnMoreHover:C})]}))}))};c.displayName="Dropdown",exports.Dropdown=c;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),n=require("../../../zeroState/ZeroState.js"),s=require("../../../../hooks/useOutside.js"),i=require("../../hooks/useDropdown.js"),r=require("./description/Description.js"),o=require("./menu/FreeFormMenu.js"),l=require("./menu/MenuList.js"),u=require("./menu/SelectAllMenu.js"),a=require("./multiSelect/MultiSelectDropdownBottomBar.js"),c=require("./OpennedDropdown.styled.js"),d=require("./searchbox/SearchBox.js"),p=require("./searchbox/SearchZeroState.js");const h=304,S=290;exports.OpenedDropdown=j=>{let{options:b,isSearchable:f,isMultiSelect:g,maxSelections:x,width:O,allowFreeForm:m,height:v,onClose:w,onSelect:y,onSearch:C,version:D,skipSorting:M,headerRef:q,hideSelectAll:L,primaryButtonText:F,onInfiniteScroll:k,onMultiSelectClear:A,onDropdownItemClick:B,buttonOptions:I,isSearchLoading:H,disableSearchOptions:R,disableSearchedOptionExcept:T,useDefaultCursor:Z,containerStyle:z={},zeroState:E}=j;const{dropdownOptions:P,search:_,searchedString:K,searchedOptions:N,onApplyHandler:W,selectAllHandler:G,onMultiSelectClear:J,onFreeFormSelect:Q,onMultiSelectApply:U,latestDropdownOptionsRef:V,getSelectedOptions:X,getCurrentSelectionCount:Y}=i.useDropdown(D,b,y,M,g,C,R,T,x),[$,ee]=t.useState(null!=O?O:S),[te,ne]=t.useState(null),se=t.useRef(null),ie=t.useRef([]);s.useOutside(se,(()=>{if(ne(null),g&&"2.0"===D){const e=X(V.current);null==w||w(e)}else null==w||w(P)}),[q,ie]);const re=null!=v?v:h,oe="number"==typeof re?f&&g?re-96:f&&!g||!f&&g?re-48:re:re;t.useEffect((()=>{const e=null!=O?O:S;if(null===te)ee(e);else if("number"==typeof e)ee(2*e);else if("string"==typeof e&&e.endsWith("px")){const t=2*parseInt(e.replace("px",""));ee(t)}}),[te]);const le=[],ue=(e=>{if(!g||!x&&0!==x)return e;const t=Y(e)>=x;return t?e.map((e=>{if(e.options)return Object.assign(Object.assign({},e),{options:e.options.map((e=>Object.assign(Object.assign({},e),{disabled:e.disabled||!e.selected&&t})))});{const n=e;return Object.assign(Object.assign({},n),{disabled:n.disabled||!n.selected&&t})}})):e})((K&&C?N:P).map((e=>{var t,n;if(K&&!C){if(e.options){const t=Object.assign({},e);return t.options=t.options.filter((e=>{var t;return!!(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(K.toLowerCase()))&&(le.push(!K||e.label===K),!0)})),t.options.length>0?t:null}return(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(K.toLowerCase()))||(null===(n=e.searchKey)||void 0===n?void 0:n.toLowerCase().includes(K.toLowerCase()))?(le.push(!K||e.label===K),e):null}return e})).filter((e=>null!==e))),ae=!!f&&K&&0===ue.length;return e.jsxs(c.OpennedDropdownContainer,Object.assign({version:D,ref:se,style:Object.assign({width:$},z)},{children:[e.jsxs("div",Object.assign({style:{width:te?"50%":"100%",display:"flex",flexDirection:"column",background:"white"}},{children:[!!f&&e.jsx(d.SearchBox,{onSearch:_,version:D}),ue.length||K?e.jsxs(c.MenuListContainer,Object.assign({minHeight:re,maxHeight:oe},{children:[!!g&&!ae&&!L&&e.jsx(u.SelectAllMenu,{version:D,options:K&&C?N:P,onSelect:G}),!m&&ae&&e.jsx(p.SearchZeroState,{isLoading:H,height:oe,searchedString:K}),m&&(ae||!!le.length&&le.every((e=>!1===e)))&&e.jsx(o.FreeFormMenu,{version:D,isMultiSelect:g,onSelect:Q,searchedString:K}),e.jsx(l.MenuList,{onInfiniteScroll:k,onDropdownItemClick:B,version:D,onSelect:W,showDescription:function(e,t){ne(e&&t?{title:e,description:t}:null)},isMultiSelect:g,options:ue,useDefaultCursor:Z,ref:ie})]})):e.jsx("div",Object.assign({style:{height:re,display:"flex"}},{children:e.jsx(n.ZeroState,Object.assign({},E,{title:(null==E?void 0:E.title)||"No results found",subTitle:(null==E?void 0:E.subTitle)||"Please try again later or contact us at support@bik.ai if you require further assistance."}))})),!!g&&!(!ue.length&&!K)&&"2.0"!==D&&e.jsx(a.default,{onClear:()=>{J(),null==A||A()},onApply:U,list:K&&C?N:P,buttonText:F,buttonOptions:I})]})),!!te&&e.jsx(r.Description,{title:te.title,description:te.description,version:D})]}))};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { SelectAllCheckboxState } from '../OpenedDropdown/components/menu/SelectAllMenu';
|
|
3
3
|
import { DropdownOption, SingleOption } from '../type';
|
|
4
|
-
export declare const useDropdown: (version: string | undefined, options: DropdownOption[], onSelect: ((option: DropdownOption | DropdownOption[]) => void) | undefined, skipSorting?: boolean, isMultiSelect?: boolean, onSearch?: ((searchKey: string) => Promise<DropdownOption[]>) | undefined, disableOtherSearchedOption?: boolean, disableSearchedOptionExcept?: string[]) => {
|
|
4
|
+
export declare const useDropdown: (version: string | undefined, options: DropdownOption[], onSelect: ((option: DropdownOption | DropdownOption[]) => void) | undefined, skipSorting?: boolean, isMultiSelect?: boolean, onSearch?: ((searchKey: string) => Promise<DropdownOption[]>) | undefined, disableOtherSearchedOption?: boolean, disableSearchedOptionExcept?: string[], maxSelections?: number) => {
|
|
5
5
|
latestDropdownOptionsRef: import("react").MutableRefObject<DropdownOption[]>;
|
|
6
6
|
dropdownOptions: DropdownOption[];
|
|
7
7
|
search: (searchKey: string) => void;
|
|
@@ -46,4 +46,7 @@ export declare const useDropdown: (version: string | undefined, options: Dropdow
|
|
|
46
46
|
onFreeFormSelect: (selected: boolean) => void;
|
|
47
47
|
onMultiSelectApply: (options?: DropdownOption[]) => void;
|
|
48
48
|
getSelectedOptions: (data: DropdownOption[]) => DropdownOption[];
|
|
49
|
+
getCurrentSelectionCount: (data: DropdownOption[]) => number;
|
|
50
|
+
isMaxSelectionsReached: (data: DropdownOption[]) => boolean;
|
|
51
|
+
maxSelections: number | undefined;
|
|
49
52
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../OpenedDropdown/utils/iterationOnOptions.js");exports.useDropdown=function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1.0",n=arguments.length>1?arguments[1]:void 0,l=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[];const[
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../OpenedDropdown/utils/iterationOnOptions.js");exports.useDropdown=function(){let s=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"1.0",n=arguments.length>1?arguments[1]:void 0,l=arguments.length>2?arguments[2]:void 0,i=arguments.length>3?arguments[3]:void 0,c=arguments.length>4?arguments[4]:void 0,o=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,u=arguments.length>7&&void 0!==arguments[7]?arguments[7]:[],r=arguments.length>8?arguments[8]:void 0;const[d,p]=e.useState(null!=n?n:[]),[v,f]=e.useState([]),[O,g]=e.useState(""),b=e.useRef(d);e.useEffect((()=>{if(b.current=d,v.length&&O&&o){let e=[...v];const t=d.map((e=>{if(e.options)return e.options.map((e=>({value:e.value,selected:e.selected})));const t=e;return{value:t.value,selected:t.selected}})).flat();e=e.map((e=>{const s=t.find((t=>e.value===t.value));return s?Object.assign(Object.assign({},e),{selected:s.selected}):e})),a&&(e=e.map((e=>Object.assign(Object.assign({},e),{disabled:!u.includes(e.value)})))),f(c&&!i?[...e.sort((e=>e.selected?-1:1))]:[...e])}}),[d]),e.useEffect((()=>{if(n){const e=[...n];p(c&&!i?[...e.sort((e=>e.selected?-1:1))]:[...e])}}),[n]);const h=e=>{const t=[];return e.forEach((e=>{if(e.options){const s=e.options.filter((e=>!0===e.selected));t.push(Object.assign(Object.assign({},e),{options:[...s]}))}else e.selected&&t.push(Object.assign({},e))})),t},j=e=>{let t=0;return e.forEach((e=>{e.options?t+=e.options.filter((e=>!0===e.selected)).length:e.selected&&t++})),t},m=e=>!(!c||!r&&0!==r)&&j(e)>=r;function S(e,n){if(c){if(e.selected&&r&&m(d))return;if(v.length&&O&&o)if(e.selected){if(r&&m(d))return;let l=!1;const i=t.iterateOnOptions(d,{selected:e.selected},(t=>t.value===e.value&&(l=!0,!0)));if(l||i.push(e),n)return[...i];p([...i]),"2.0"===s&&w(i)}else{let l=!1,i=t.iterateOnOptions(d,{selected:e.selected},(t=>t.value===e.value&&(l=!0,!0)));if(l&&(i=i.filter((t=>t.value!==e.value))),n)return[...i];p([...i]),"2.0"===s&&w(i)}else{const l=t.iterateOnOptions(d,{selected:e.selected},(t=>t.value===e.value));if(n)return[...l];p([...l]),"2.0"===s&&w(l)}}else null==l||l(e)}function w(e){const t=h(null!=e?e:b.current);null==l||l([...t])}return{latestDropdownOptionsRef:b,dropdownOptions:d,search:function(e){if(g(e),f([]),e&&o){const s=[];t.iterateOnOptionsRaw(d,(e=>{e.selected&&!s.includes(e.value)&&s.push(e.value)})),o(e).then((e=>{if(e){const t=e.map((e=>{if(e.options){const t=e;return Object.assign(Object.assign({},t),{options:t.options.map((e=>Object.assign(Object.assign({},e),{selected:s.includes(e.value)})))})}return Object.assign(Object.assign({},e),{selected:s.includes(e.value)})}));f([...t])}}))}},searchedString:O,searchedOptions:v,onApplyHandler:S,selectAllHandler:function(e){if(v.length&&O&&o)!function(e){let t=[...d];e?v.forEach((e=>{let s=!1;t=t.map((t=>{const n=e;return void 0!==n.value&&n.value===t.value?(s=!0,Object.assign(Object.assign({},t),{selected:!0})):t})),s||t.push(Object.assign(Object.assign({},e),{selected:!0}))})):v.forEach((e=>{t=t.map((t=>{const s=e;return void 0!==s.value&&s.value===t.value?Object.assign(Object.assign({},t),{selected:!1}):t}))})),p([...t]),"2.0"===s&&w(t)}("selectAll"===e);else if("selectAll"===e){const e=t.iterateOnOptions(d,{selected:!0},(e=>{var t;return O?(null===(t=e.label)||void 0===t?void 0:t.toLowerCase().includes(O.toLowerCase()))&&!e.disabled:!e.disabled}));p([...e]),"2.0"===s&&w(e)}else if("notSelected"===e){const e=t.iterateOnOptions(d,{selected:!1},(e=>!e.disabled));p([...e]),"2.0"===s&&w(e)}},onMultiSelectClear:function(){const e=t.iterateOnOptions(d,{selected:!1});p([...e]),"2.0"===s&&w(e)},onFreeFormSelect:function(e){if(!c)return void S({label:O,value:O,isFreeForm:!0,selected:!0});const t=d.map((t=>t.options?t:Object.assign(Object.assign({},t),{selected:t.label===O&&t.value===O?e:t.selected})));e&&(t.some((e=>e.label===O&&e.value===O))||t.unshift({label:O,value:O,isFreeForm:!0,selected:!0})),p([...t]),"2.0"===s&&w(t)},onMultiSelectApply:w,getSelectedOptions:h,getCurrentSelectionCount:j,isMaxSelectionsReached:m,maxSelections:r}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("./modal.styled.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),s=require("./modal.styled.js"),i=require("../../constants/Theme.js"),n=require("../../assets/icons/cross.svg.js"),o=require("../TypographyStyle.js");exports.Modal=r=>{var a;const[l,c]=t.useState(r.timeOut||5);t.useEffect((()=>{if(!r.skipModalWithTimer)return;const e=setInterval((()=>{c((t=>{const s=t-1;return s<=0?(clearInterval(e),0):s}))}),1e3);return()=>clearInterval(e)}),[r.skipModalWithTimer]);return e.jsx(e.Fragment,{children:r.open&&e.jsx("div",Object.assign({id:r.id||"bik-modal"},{children:e.jsx(s.RootContainer,Object.assign({"data-test":r["data-test"],zIndex:r.zIndex,onClick:e=>{r.closeOnOutsideClick&&r.onClose?r.skipModalWithTimer&&l>0?e.stopPropagation():r.onClose():e.stopPropagation()}},{children:e.jsx(s.CentralContainer,Object.assign({style:Object.assign({},null!==(a=r.centralContainerStyles)&&void 0!==a?a:{}),onClick:e=>{e.stopPropagation()},width:r.width},{children:e.jsxs(e.Fragment,{children:[!(null==r?void 0:r.hideCrossButton)&&!r.skipModalWithTimer&&e.jsx(s.CloseButtonContainer,Object.assign({"data-test":(r["data-test"]||"")+"-close-button",onClick:()=>r.onClose&&r.onClose()},{children:e.jsx(n.default,{height:20,width:20,color:i.COLORS.content.secondary})})),r.skipModalWithTimer&&e.jsxs(s.CloseButtonWithTimer,Object.assign({"data-test":(r["data-test"]||"")+"-timer-close-button",onClick:()=>{l>0||r.onClose&&r.onClose()},timerExists:l>0},{children:[l>0?e.jsxs(o.BodySecondary,{children:["Skip in ",l," sec "]}):e.jsx(e.Fragment,{}),e.jsx(n.default,{height:20,width:20,color:l>0?i.COLORS.stroke.primary:i.COLORS.content.secondary})]})),r.children]})}))}))}))})};
|
|
@@ -15,3 +15,9 @@ export declare const CloseButtonContainer: import("@emotion/styled").StyledCompo
|
|
|
15
15
|
theme?: import("@emotion/react").Theme | undefined;
|
|
16
16
|
as?: import("react").ElementType<any> | undefined;
|
|
17
17
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
18
|
+
export declare const CloseButtonWithTimer: import("@emotion/styled").StyledComponent<{
|
|
19
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
20
|
+
as?: import("react").ElementType<any> | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
timerExists?: boolean | undefined;
|
|
23
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),b=require("../../constants/Theme.js"),l=require("../../constants/zindex.js");function t(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}var e=t(c);const X=e.default("div","production"===process.env.NODE_ENV?{target:"en6feff2"}:{target:"en6feff2",label:"RootContainer"})("position:fixed;top:0;left:0;z-index:",(c=>c.zIndex||l.ComponentZindex.MODAL),";height:100%;width:100%;background-color:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR3dDIiwiZmlsZSI6Im1vZGFsLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgQ29tcG9uZW50WmluZGV4IH0gZnJvbSBcIi4uLy4uL2NvbnN0YW50cy96aW5kZXhcIjtcclxuZXhwb3J0IGNvbnN0IFJvb3RDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0cG9zaXRpb246IGZpeGVkO1xuXHR0b3A6IDA7XG5cdGxlZnQ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xpZCAke0NPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ei1pbmRleDogMjtcbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPW1vZGFsLnN0eWxlZC5qcy5tYXAiXX0= */")),G=e.default("div","production"===process.env.NODE_ENV?{target:"en6feff1"}:{target:"en6feff1",label:"CentralContainer"})("width:",(c=>{var b;return null!==(b=c.width)&&void 0!==b?b:"640px"}),";background-color:",b.COLORS.surface.standard,";border-radius:4px;position:relative;display:flex;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZTJDIiwiZmlsZSI6Im1vZGFsLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgQ29tcG9uZW50WmluZGV4IH0gZnJvbSBcIi4uLy4uL2NvbnN0YW50cy96aW5kZXhcIjtcclxuZXhwb3J0IGNvbnN0IFJvb3RDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0cG9zaXRpb246IGZpeGVkO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdHotaW5kZXg6ICR7KHByb3BzKSA9PiBwcm9wcy56SW5kZXggfHwgQ29tcG9uZW50WmluZGV4Lk1PREFMfTtcblx0aGVpZ2h0OiAxMDAlO1xuXHR3aWR0aDogMTAwJTtcblx0YmFja2dyb3VuZC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjYpO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbmA7XHJcbmV4cG9ydCBjb25zdCBDZW50cmFsQ29udGFpbmVyID0gc3R5bGVkLmRpdiBgXG5cdHdpZHRoOiAkeyhwcm9wcykgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBwcm9wcy53aWR0aCkgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJzY0MHB4JzsgfX07XG5cdGJhY2tncm91bmQtY29sb3I6ICR7Q09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXItcmFkaXVzOiA0cHg7XG5cdHBvc2l0aW9uOiByZWxhdGl2ZTtcblx0ZGlzcGxheTogZmxleDtcbmA7XHJcbmV4cG9ydCBjb25zdCBDbG9zZUJ1dHRvbkNvbnRhaW5lciA9IHN0eWxlZC5kaXYgYFxuXHRoZWlnaHQ6IDM2cHg7XG5cdHdpZHRoOiAzNnB4O1xuXHRib3JkZXItcmFkaXVzOiA1MCU7XG5cdHBvc2l0aW9uOiBhYnNvbHV0ZTtcblx0cmlnaHQ6IDA7XG5cdHRvcDogMDtcblx0dHJhbnNsYXRlOiA1MCUgLTUwJTtcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGJhY2tncm91bmQtY29sb3I6ICR7Q09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAke0NPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGN1cnNvcjogcG9pbnRlcjtcblx0ei1pbmRleDogMjtcbmA7XHJcbi8vIyBzb3VyY2VNYXBwaW5nVVJMPW1vZGFsLnN0eWxlZC5qcy5tYXAiXX0= */")),d=e.default("div","production"===process.env.NODE_ENV?{target:"en6feff0"}:{target:"en6feff0",label:"CloseButtonContainer"})("height:36px;width:36px;border-radius:50%;position:absolute;right:0;top:0;translate:50% -50%;display:flex;align-items:center;justify-content:center;background-color:",b.COLORS.surface.standard,";border:1px solid ",b.COLORS.stroke.primary,";cursor:pointer;z-index:2;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0IrQyIsImZpbGUiOiJtb2RhbC5zdHlsZWQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmltcG9ydCB7IENvbXBvbmVudFppbmRleCB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvemluZGV4XCI7XHJcbmV4cG9ydCBjb25zdCBSb290Q29udGFpbmVyID0gc3R5bGVkLmRpdiBgXG5cdHBvc2l0aW9uOiBmaXhlZDtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHR6LWluZGV4OiAkeyhwcm9wcykgPT4gcHJvcHMuekluZGV4IHx8IENvbXBvbmVudFppbmRleC5NT0RBTH07XG5cdGhlaWdodDogMTAwJTtcblx0d2lkdGg6IDEwMCU7XG5cdGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC42KTtcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgQ2VudHJhbENvbnRhaW5lciA9IHN0eWxlZC5kaXYgYFxuXHR3aWR0aDogJHsocHJvcHMpID0+IHsgdmFyIF9hOyByZXR1cm4gKF9hID0gcHJvcHMud2lkdGgpICE9PSBudWxsICYmIF9hICE9PSB2b2lkIDAgPyBfYSA6ICc2NDBweCc7IH19O1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAke0NPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyLXJhZGl1czogNHB4O1xuXHRwb3NpdGlvbjogcmVsYXRpdmU7XG5cdGRpc3BsYXk6IGZsZXg7XG5gO1xyXG5leHBvcnQgY29uc3QgQ2xvc2VCdXR0b25Db250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0aGVpZ2h0OiAzNnB4O1xuXHR3aWR0aDogMzZweDtcblx0Ym9yZGVyLXJhZGl1czogNTAlO1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHRyYW5zbGF0ZTogNTAlIC01MCU7XG5cdGRpc3BsYXk6IGZsZXg7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5cdGp1c3RpZnktY29udGVudDogY2VudGVyO1xuXHRiYWNrZ3JvdW5kLWNvbG9yOiAke0NPTE9SUy5zdXJmYWNlLnN0YW5kYXJkfTtcblx0Ym9yZGVyOiAxcHggc29saWQgJHtDT0xPUlMuc3Ryb2tlLnByaW1hcnl9O1xuXHRjdXJzb3I6IHBvaW50ZXI7XG5cdHotaW5kZXg6IDI7XG5gO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1tb2RhbC5zdHlsZWQuanMubWFwIl19 */"));exports.CentralContainer=G,exports.CloseButtonContainer=d,exports.RootContainer=X;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var c=require("@emotion/styled/base"),b=require("../../constants/Theme.js"),l=require("../../constants/zindex.js");function G(c){return c&&"object"==typeof c&&"default"in c?c:{default:c}}var d=G(c);const X=d.default("div","production"===process.env.NODE_ENV?{target:"en6feff3"}:{target:"en6feff3",label:"RootContainer"})("position:fixed;top:0;left:0;z-index:",(c=>c.zIndex||l.ComponentZindex.MODAL),";height:100%;width:100%;background-color:rgba(0, 0, 0, 0.6);display:flex;align-items:center;justify-content:center;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR3dDIiwiZmlsZSI6Im1vZGFsLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgQ29tcG9uZW50WmluZGV4IH0gZnJvbSBcIi4uLy4uL2NvbnN0YW50cy96aW5kZXhcIjtcclxuZXhwb3J0IGNvbnN0IFJvb3RDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0cG9zaXRpb246IGZpeGVkO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdHotaW5kZXg6ICR7KHByb3BzKSA9PiBwcm9wcy56SW5kZXggfHwgQ29tcG9uZW50WmluZGV4Lk1PREFMfTtcblx0aGVpZ2h0OiAxMDAlO1xuXHR3aWR0aDogMTAwJTtcblx0YmFja2dyb3VuZC1jb2xvcjogcmdiYSgwLCAwLCAwLCAwLjYpO1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcbmA7XHJcbmV4cG9ydCBjb25zdCBDZW50cmFsQ29udGFpbmVyID0gc3R5bGVkLmRpdiBgXG5cdHdpZHRoOiAkeyhwcm9wcykgPT4geyB2YXIgX2E7IHJldHVybiAoX2EgPSBwcm9wcy53aWR0aCkgIT09IG51bGwgJiYgX2EgIT09IHZvaWQgMCA/IF9hIDogJzY0MHB4JzsgfX07XG5cdGJhY2tncm91bmQtY29sb3I6ICR7Q09MT1JTLnN1c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GFuZGFyZH07XG5cdGJvcmRlcjogMXB4IHNvbGlkICR7Q09MT1JTLnN0cm9rZS5wcmltYXJ5fTtcblx0Y3Vyc29yOiAkeyhwcm9wcykgPT4gKHByb3BzLnRpbWVyRXhpc3RzID8gJ25vdC1hbGxvd2VkJyA6ICdwb2ludGVyJyl9O1xuXHR6LWluZGV4OiAyO1xuXHRwYWRkaW5nOiA4cHg7XG5gO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1tb2RhbC5zdHlsZWQuanMubWFwIl19 */")),t=d.default("div","production"===process.env.NODE_ENV?{target:"en6feff2"}:{target:"en6feff2",label:"CentralContainer"})("width:",(c=>{var b;return null!==(b=c.width)&&void 0!==b?b:"640px"}),";background-color:",b.COLORS.surface.standard,";border-radius:4px;position:relative;display:flex;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBZTJDIiwiZmlsZSI6Im1vZGFsLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gJ0BlbW90aW9uL3N0eWxlZCc7XHJcbmltcG9ydCB7IENPTE9SUyB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvVGhlbWVcIjtcclxuaW1wb3J0IHsgQ29tcG9uZW50WmluZGV4IH0gZnJvbSBcIi4uLy4uL2NvbnN0YW50cy96aW5kZXhcIjtcclxuZXhwb3J0IGNvbnN0IFJvb3RDb250YWluZXIgPSBzdHlsZWQuZGl2IGBcblx0cG9zaXRpb246IGZpeGVkO1xuXHR0b3A6IDA7XG5cdGxlZnQ6IDA7XG5cdHotaW5kZXg6ICR7KHByb3BzKSA9PiBwcm9wcy56SW5kZXggfHwgQ29tcG9uZW50WmluZGV4Lk1PREFMfTtcblx0aGVpZ2h0OiAxMDAlO1xuXHR3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RvbldpdGhUaW1lciA9IHN0eWxlZC5kaXYgYFxuXHRib3JkZXItcmFkaXVzOiAyNHB4O1xuXHRwb3NpdGlvbjogYWJzb2x1dGU7XG5cdHJpZ2h0OiAwO1xuXHR0b3A6IDA7XG5cdHRyYW5zZm9ybTogJHsocHJvcHMpID0+IHByb3BzLnRpbWVyRXhpc3RzID8gJ3RyYW5zbGF0ZSgyMCUsIC01MCUpJyA6ICd0cmFuc2xhdGUoNTAlLCAtNTAlKSd9O1xuXHRkaXNwbGF5OiBmbGV4O1xuXHRhbGlnbi1pdGVtczogY2VudGVyO1xuXHRqdXN0aWZ5LWNvbnRlbnQ6IGNlbnRlcjtcblx0YmFja2dyb3VuZC1jb2xvcjogJHtDT0xPUlMuc3VyZmFjZS5zdGFuZGFyZH07XG5cdGJvcmRlcjogMXB4IHNvbGlkICR7Q09MT1JTLnN0cm9rZS5wcmltYXJ5fTtcblx0Y3Vyc29yOiAkeyhwcm9wcykgPT4gKHByb3BzLnRpbWVyRXhpc3RzID8gJ25vdC1hbGxvd2VkJyA6ICdwb2ludGVyJyl9O1xuXHR6LWluZGV4OiAyO1xuXHRwYWRkaW5nOiA4cHg7XG5gO1xyXG4vLyMgc291cmNlTWFwcGluZ1VSTD1tb2RhbC5zdHlsZWQuanMubWFwIl19 */")),Z=d.default("div","production"===process.env.NODE_ENV?{target:"en6feff1"}:{target:"en6feff1",label:"CloseButtonContainer"})("height:36px;width:36px;border-radius:50%;position:absolute;right:0;top:0;translate:50% -50%;display:flex;align-items:center;justify-content:center;background-color:",b.COLORS.surface.standard,";border:1px solid ",b.COLORS.stroke.primary,";cursor:pointer;z-index:2;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0IrQyIsImZpbGUiOiJtb2RhbC5zdHlsZWQudHN4I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1hcHBpbmdVUkw9bW9kYWwuc3R5bGVkLmpzLm1hcCJdfQ== */")),e=d.default("div","production"===process.env.NODE_ENV?{target:"en6feff0"}:{target:"en6feff0",label:"CloseButtonWithTimer"})("border-radius:24px;position:absolute;right:0;top:0;transform:",(c=>c.timerExists?"translate(20%, -50%)":"translate(50%, -50%)"),";display:flex;align-items:center;justify-content:center;background-color:",b.COLORS.surface.standard,";border:1px solid ",b.COLORS.stroke.primary,";cursor:",(c=>c.timerExists?"not-allowed":"pointer"),";z-index:2;padding:8px;"+("production"===process.env.NODE_ENV?"":"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm1vZGFsLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBc0MrQyIsImZpbGUiOiJtb2RhbC5zdHlsZWQudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHN0eWxlZCBmcm9tICdAZW1vdGlvbi9zdHlsZWQnO1xyXG5pbXBvcnQgeyBDT0xPUlMgfSBmcm9tIFwiLi4vLi4vY29uc3RhbnRzL1RoZW1lXCI7XHJcbmltcG9ydCB7IENvbXBvbmVudFppbmRleCB9IGZyb20gXCIuLi8uLi9jb25zdGFudHMvemluZGV4XCI7XHJcbmV4cG9ydCBjb25zdCBSb290Q29udGFpbmVyID0gc3R5bGVkLmRpdiBgXG5cdHBvc2l0aW9uOiBmaXhlZDtcblx0dG9wOiAwO1xuXHRsZWZ0OiAwO1xuXHR6LWluZGV4OiAkeyhwcm9wcykgPT4gcHJvcHMuekluZGV4IHx8IENvbXBvbmVudFppbmRleC5NT0RBTH07XG5cdGhlaWdodDogMTAwJTtcblx0d2lkdGg6IDEwMCU7XG5cdGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC42KTtcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW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KHByb3BzKSA9PiBwcm9wcy50aW1lckV4aXN0cyA/ICd0cmFuc2xhdGUoMjAlLCAtNTAlKScgOiAndHJhbnNsYXRlKDUwJSwgLTUwJSknfTtcblx0ZGlzcGxheTogZmxleDtcblx0YWxpZ24taXRlbXM6IGNlbnRlcjtcblx0anVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG5cdGJhY2tncm91bmQtY29sb3I6ICR7Q09MT1JTLnN1cmZhY2Uuc3RhbmRhcmR9O1xuXHRib3JkZXI6IDFweCBzb2xpZCAke0NPTE9SUy5zdHJva2UucHJpbWFyeX07XG5cdGN1cnNvcjogJHsocHJvcHMpID0+IChwcm9wcy50aW1lckV4aXN0cyA/ICdub3QtYWxsb3dlZCcgOiAncG9pbnRlcicpfTtcblx0ei1pbmRleDogMjtcblx0cGFkZGluZzogOHB4O1xuYDtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9bW9kYWwuc3R5bGVkLmpzLm1hcCJdfQ== */"));exports.CentralContainer=t,exports.CloseButtonContainer=Z,exports.CloseButtonWithTimer=e,exports.RootContainer=X;
|