@bikdotai/bik-component-library 0.0.382-beta.114 → 0.0.382-beta.200
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/add-variableV2/AddVariableV2.js +1 -1
- package/dist/cjs/components/add-variableV2/AddVariableV2.styled.js +2 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.d.ts +1 -13
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +2 -16
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/style.d.ts +0 -3
- package/dist/cjs/components/product-picker-v2/style.js +11 -43
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
- package/dist/cjs/index.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.js +1 -1
- package/dist/esm/components/add-variableV2/AddVariableV2.styled.js +2 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.js +1 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.d.ts +1 -13
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +2 -16
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/style.d.ts +0 -3
- package/dist/esm/components/product-picker-v2/style.js +9 -41
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
- package/dist/esm/index.js +1 -1
- package/package.json +1 -2
- package/dist/cjs/assets/icons/drag_handle.svg.js +0 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +0 -18
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +0 -1
- package/dist/cjs/components/product-picker-v2/variant.d.ts +0 -32
- package/dist/cjs/components/product-picker-v2/variant.js +0 -1
- package/dist/cjs/components/product-picker-v2/variantComponents.d.ts +0 -21
- package/dist/cjs/components/product-picker-v2/variantComponents.js +0 -1
- package/dist/esm/assets/icons/drag_handle.svg.js +0 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +0 -18
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +0 -1
- package/dist/esm/components/product-picker-v2/variant.d.ts +0 -32
- package/dist/esm/components/product-picker-v2/variant.js +0 -1
- package/dist/esm/components/product-picker-v2/variantComponents.d.ts +0 -21
- package/dist/esm/components/product-picker-v2/variantComponents.js +0 -1
package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{jsxs as e,jsx as i}from"react/jsx-runtime";import t from"../../../assets/icons/info.svg.js";import{useState as a,useRef as o,useEffect as r}from"react";import l from"styled-components";import{AddVariableV2SideModal as n}from"../../add-variableV2/AddVariableV2SideModal.js";import s from"../../../assets/icons/plus.svg.js";import"../../add-variableV2/AddVariableV2.styled.js";import"../../button/Button.js";import"../../icon-button/IconButton.js";import{Input as d}from"../../input/Input.js";import{Tooltip as c}from"../../tooltips/Tooltip.js";import{COLORS as p}from"../../../constants/Theme.js";import{TitleRegular as h,BodySecondary as m,TitleSmall as b}from"../../TypographyStyle.js";import{CheckBox as
|
|
1
|
+
import{jsxs as e,jsx as i}from"react/jsx-runtime";import t from"../../../assets/icons/info.svg.js";import{useState as a,useRef as o,useEffect as r}from"react";import l from"styled-components";import{AddVariableV2SideModal as n}from"../../add-variableV2/AddVariableV2SideModal.js";import"../../../_virtual/_tslib.js";import s from"../../../assets/icons/plus.svg.js";import"../../add-variableV2/AddVariableV2.styled.js";import"../../button/Button.js";import"../../icon-button/IconButton.js";import{Input as d}from"../../input/Input.js";import{Tooltip as c}from"../../tooltips/Tooltip.js";import{COLORS as p}from"../../../constants/Theme.js";import"../../switch/Switch.js";import{TitleRegular as h,BodySecondary as m,TitleSmall as b}from"../../TypographyStyle.js";import{CheckBox as u}from"../../checkBox/CheckBox.js";import{CHANNEL_TYPE as g}from"../../template-preview/models/Channels.js";import{useTemplateModalContext as f}from"../context/templateModalContext.js";import v from"./VariableConnector.js";const j=l.div`
|
|
2
2
|
overflow-y: auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
height: 100%;
|
|
6
|
-
`,
|
|
6
|
+
`,x=l=>{let{onFocus:x,showVariableModal:V,variableList:w,discountCode:O,setDiscountCode:k}=l;const{originalVariableList:C,channel:T}=f(),[B,L]=a(!1),[A,E]=a(!1),[I,M]=a(!1),[S,D]=a(""),[F,N]=a(!1),z=o(),_=o();return r((()=>{k&&k(O+S)}),[S]),r((()=>{C.forEach((e=>{"checkout.checkoutUrl"===e.updatedValue.replace("{{","").replace("}}","")&&(L(!0),O&&N&&N(!0))}))}),[C]),e(j,{children:[e("div",Object.assign({style:{padding:8}},{children:[e("div",Object.assign({style:{display:"flex",gap:8,alignItems:"center",marginBottom:4}},{children:[i(h,Object.assign({style:{color:p.content.primary}},{children:"Edit variables and links"})),i(c,Object.assign({body:"Variables are placeholder texts which can either be filled by data, eg: customer name or can have any custom text within them"},{children:i("div",Object.assign({style:{display:"flex"}},{children:i(t,{width:20,height:20,color:p.content.placeholder})}))}))]})),i(m,Object.assign({style:{color:p.content.secondary}},{children:"You can view variables and links on the left underlined in purple colour."}))]})),null==C?void 0:C.map(((t,a)=>T!==g.EMAIL||t.isEditableVariable?i("div",Object.assign({style:{marginTop:16}},{children:i(v,{index:a,variable:t,onFocus:()=>null==x?void 0:x(a),showVariableModal:V,variableList:w,setShowDiscountCheckBox:L})}),a):e("div",Object.assign({style:{margin:"16px 8px"}},{children:[e(m,Object.assign({style:{color:p.content.primary}},{children:["Locked variable ",a+1]})),i(d,{state:"disabled",placeholder:t.variableName,onChangeText:()=>{}})]}),a))),(B||O)&&e("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[i(u,{isChecked:F,onValueChange:()=>{F&&k&&k(""),N(!F)}}),i(b,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),F&&e("div",Object.assign({ref:z,style:{margin:10}},{children:[i(d,{placeholder:"Enter your discount code",onChangeText:e=>{k&&k(e)},value:O,onFocus:()=>{E(!0)},onBlur:e=>{var i;"addVar"===(null===(i=e.relatedTarget)||void 0===i?void 0:i.id)?(z.current&&z.current.focus(),E(!0)):(E(!1),M(!1))},noErrorHint:!0,validate:e=>[!0,""]}),A&&i(y,Object.assign({ref:_,id:"addVar",onClick:e=>{e.stopPropagation(),M(!0)}},{children:e("div",Object.assign({className:"add"},{children:[i(s,{width:20,height:20,color:"white"}),i("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),I&&i(n,{zIndex:2e3,data:null!=w?w:[],showVariable:I,setShowVariable:M,variableValue:S,setVariableValue:D,placeholder:"Add a variable",customTrigger:e=>{D(e.actualValue),E(!1)}})]})},y=l.button`
|
|
7
7
|
padding: 2px 8px;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
color: white;
|
|
@@ -25,4 +25,4 @@ import{jsxs as e,jsx as i}from"react/jsx-runtime";import t from"../../../assets/
|
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
}
|
|
28
|
-
`;export{
|
|
28
|
+
`;export{y as AddVariableStyled,j as Container,x as default};
|
package/dist/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import*as o from"./components/template-preview/constants/regexPatterns.js";export{o as regexPatterns};export{default as StringUtils}from"./utils/StringUtils.js";export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{ComponentZindex}from"./constants/zindex.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{TemplatePreview}from"./components/template-preview/TemplatePreview.js";export{WhatsappLikePreview}from"./components/template-preview/WhatsApp/WhatsAppLikePreview.js";export{WhatsappLikePreviewV2}from"./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js";export{renderVariableUIForPreview}from"./components/template-preview/helpers/SmsTemplateHelper.js";export{WhatsAppFormatToHTML}from"./components/template-preview/helpers/WhatsAppFormatToHTML.js";export{VariableEditorHelper}from"./components/template-preview/helpers/VariableEditorHelper.js";export{ACTIONS_TYPES,CUSTOM_URL_NAME,HEADER_TYPES,TEMPLATE_EDITOR,TEMPLATE_STATUS}from"./components/template-preview/models/TemplateMeta.js";export{TemplateContextMapper}from"./components/template-context-mapper/TemplateContextMapper.js";export{getAllDataFromTemplateComponent}from"./components/template-context-mapper/utils/getDataFromTemplateComponent.js";export{validateIsUrl}from"./components/template-context-mapper/utils/validateIsUrl.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown,TooltipStyled}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodyRegular,BodySecondary,BodySecondaryLink,BodyTiny,ButtonLarge,ButtonRegular,Caption,Display,SmallRegular,SubHeading,TitleLarge,TitleMedium,TitleRegular,TitleSmall}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";export{QueryBuilder}from"./components/QueryBuilder/QueryBuilder.js";export{BaseQueryBuilderNode}from"./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";export{PropertyNode,PropertyNodeHeadless}from"./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js";export{queryBuilderSlice}from"./components/QueryBuilder/redux/queryBuilder.reducer.js";export{queryBuilderCacheSlice}from"./components/QueryBuilder/redux/queryBuilderCache.reducer.js";export{AD_STRING_OPERATORS,ANY_AD_OPERATORS,ANY_IG_OPERATORS,BOOLEAN_OPERATORS,DATE_OPERATORS,EVENT_VALUES,EXACTLY_OPERATORS,FREQUENCY_OPERATORS,ICE_BREAKER_OPERATORS,IG_STRING_OPERATORS,INTEGER_OPERATORS,MAIL_SUBJECT_OPERATORS,REACTION_OPERATORS,SPECIFIC_IG_OPERATORS,STRING_OPERATORS,STRING_RESTRICTED_OPERATORS,STRING_RESTRICTED_OPERATORS_2,STRING_RESTRICTED_OPERATORS_3}from"./components/QueryBuilder/types/QueryBuilderOperator.type.js";export{StyledModal}from"./components/modals/styledModal.js";export{DropdownPopover}from"./components/dropdown/DropdownPopover/index.js";export{Dropdown}from"./components/dropdown/Dropdown.js";export{ChipDropdown}from"./components/dropdown/ChipDropdown.js";export{OpenedDropdown}from"./components/dropdown/OpenedDropdown/components/OpennedDropdown.js";export{MenuItemDropdown}from"./components/dropdown/MenuItem/MenuItem.js";export{AnalyticsCard}from"./components/analytics-card/AnalyticsCard.js";export{AnalyticsContainer,CardDataContainer}from"./components/analytics-card/AnalyticsCard.styled.js";export{Input}from"./components/input/Input.js";export{AnalyticsChip}from"./components/analytics-chips-and-dropdowns/AnalyticsChip.js";export{AnalyticsDropdown,EachItem,formatDate}from"./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js";export{AnalyticsMultiChip}from"./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js";export{AnalyticsMetric}from"./components/analytics-chips-and-dropdowns/AnalyticsMetric.js";export{AnalyticsTrend}from"./components/analytics-chips-and-dropdowns/AnalyticsTrend.js";export{LineChart}from"./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";export{LinearChipGroupedChart}from"./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js";export{Card,PieChartAnalytics}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";export{PieChart}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js";export{HorizontalGraph}from"./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";export{StackedBarChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";export{VerticalGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";export{HEAT,HEAT_COLORS,HEAT_GRADING_TYPE,HeatMap}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";export{VerticalBarAndLinearGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";export{AVATAR_SIZE_VS_ICON_SIZE_MAP,Avatar,BACKGROUND_VS_TEXT_COLOR_MAP}from"./components/avatar/Avatar.js";export{AVATAR_BACKGROUND,AVATAR_SIZE_MAP,AVATAR_TYPES,SIZE}from"./components/avatar/AvatarHelper.js";export{Alert}from"./components/alerts/Alert.js";export{ALERT_TYPES,COLOR_CONFIG_MAP}from"./components/alerts/AlertHelper.js";export{RATIO,Thumbnail}from"./components/thumbnail/Thumbnail.js";export{Curtain}from"./components/curtain/Curtain.js";export{DatePicker}from"./components/datePicker/DatePicker.js";export{Loader,Switch,SwitchContainer,Thumb}from"./components/switch/Switch.js";export{SubscriptionPlan}from"./components/plans/SubscriptionPlan.js";export{BottomWrapper,HeaderWrapper,SubscriptionPlanSelector,defaultTabs}from"./components/plans/SubscriptionPlanSelector.js";export{NewSubscriptionPlan}from"./components/plans/NewSubscriptionPlan.js";export{SubscriptionPlansCollected}from"./components/plans/SubscriptionPlansCollected.js";export{TabItemComponent,Tabs}from"./components/tabs/Tabs.js";export{DynamicTabs}from"./components/dynamic-tabs/DynamicTabs.js";export{BikShimmer}from"./components/shimmer/ShimmerComponent/BikShimmer.js";export{TablePagination}from"./components/TablePagination/TablePagination.js";export{TablePaginationCard,TablePaginationCardStyled}from"./components/TablePagination/TablePaginationCard.js";export{StateModalComponent}from"./components/states-modal/StateModalComponent.js";export{DeleteConfirmationModal}from"./components/states-modal/DeleteConfirmationModal.js";export{ButtonActions,ButtonTypes,StateComponent,StateInterface}from"./components/states/StateComponent.js";export{ShopifyScopeWrapper}from"./components/states/ShopifyScopeWrapper.js";export{WhatsAppTextEditor}from"./components/WhatsAppTextEditor/WhatsAppTextEditor.js";export{EditorActionTypes,WhatsAppTextEditorHeader}from"./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js";export{BaseWhatsappContentLangHelper}from"./helpers/BaseWhatsappContentLang.helper.js";export{CardSelectionModal}from"./components/card-selection-modal/CardSelectionModal.js";export{BikImageCropper}from"./components/image-cropper/BikImageCropper.js";export{BikImagePipeline}from"./components/image-cropper/BikImagePipeline/BikImagePipeline.js";export{ButtonGroup}from"./components/buttonGroup/ButtonGroup.js";export{BikAccordion}from"./components/accordion/Accordion.js";export{FileUploader}from"./components/file-uploader/FileUploader.js";export{ColourInput}from"./components/colourInput/ColourInput.js";export{BikHeader}from"./components/bik-layout/BikHeader.js";export{BikLayout}from"./components/bik-layout/BikLayout.js";export{BikProfile}from"./components/bik-layout/BikProfile.js";export{SimpleSidebar}from"./components/bik-layout/SimpleSidebar.js";export{BikSidebar}from"./components/bik-layout/BikSidebar.js";export{FeatureModal}from"./components/bik-layout/FeatureModal.js";export{SidebarSkeleton}from"./components/bik-layout/SidebarSkeleton.js";export{ShowShopifyRestrictedModal}from"./components/bik-layout/ShowShopifyRestrictedModal.js";export{FeatureModalV2}from"./components/bik-layout/FeatureModalV2.js";export{SearchBar}from"./components/searchBar/searchBar.js";export{CustomDateTime}from"./components/custom-date-time/CustomDateTime.js";export{PricePleaseProductPicker,ProductPickerContent}from"./components/product-picker/ProductPickerModal.js";export{DiscountModal}from"./components/discount-modal/DiscountModal.js";export{COUPON_EXPIRATION,CouponExpiration}from"./components/discount-modal/CouponExpiration/CouponExpiration.js";export{DISCOUNT_TARGET_SELECTION,DISCOUNT_TARGET_TYPES,DISCOUNT_TYPES,DISCOUNT_VALUE_TYPES,MIN_PURCHASE_REQUIREMENT}from"./components/discount-modal/type.js";export{CountryCodePicker}from"./components/country-code-picker/CountryCodePicker.js";export{CountriesData}from"./components/country-code-picker/CountryCodePicker.modal.js";export{ShimmerImage}from"./components/shimmer-image/ShimmerImage.js";export{ProductPickerModal,ScreenName}from"./components/product-picker-v2/modal.js";export{Carousel}from"./components/carousel/carousel.js";export{CarouselSecondary}from"./components/carousel-secondary/CarouselSecondary.js";export{AccessTokenTroubleshootDialog}from"./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js";export{RadioList}from"./components/radioList/RadioList.js";export{CheckList}from"./components/checkList/CheckList.js";export{DateKeys,MEDIA_TYPES,PostPicker,dateOptions}from"./components/postPicker/postPicker.js";export{DropdownButton}from"./components/dropdown-button/DropdownButton.js";export{SideModal}from"./components/side-modal/SideModal.js";export{KeywordsInput}from"./components/keywords-input/KeywordsInput.js";export{AddVariableV2SideModal}from"./components/add-variableV2/AddVariableV2SideModal.js";export{AddVariableV2}from"./components/add-variableV2/AddVariableV2.js";export{NaLinkWrapper,NavigationHyperlink}from"./components/navigation-hyperlink/NavigationHyperlink.js";export{SearchFilter}from"./components/SearchFilter/index.js";export{InputWithVariables}from"./components/input-with-vars/InputWithVariables.js";export{DashboardReviewPopUp}from"./components/dashboard-review-popup/DashboardReviewPopUp.js";export{StarRating}from"./components/star-rating/StarRating.js";export{TestimonialCard}from"./components/testimonial-card/TestimonialCard.js";export{BikSlider}from"./components/slider/slider.js";
|
|
1
|
+
import*as o from"./components/template-preview/constants/regexPatterns.js";export{o as regexPatterns};export{default as StringUtils}from"./utils/StringUtils.js";export{BASE_COLORS,COLORS,DEFAULT_THEME,FONTS}from"./constants/Theme.js";export{ComponentZindex}from"./constants/zindex.js";export{CheckBox}from"./components/checkBox/CheckBox.js";export{ListItem}from"./components/list-item/ListItem.js";export{Pagination}from"./components/pagination/Pagination.js";export{RadioButton}from"./components/radioButton/RadioButton.js";export{Toaster}from"./components/toaster/Toaster.js";export{Tooltip}from"./components/tooltips/Tooltip.js";export{Spinner}from"./components/spinner/Spinner.js";export{Stepper}from"./components/stepper/Stepper.js";export{Tag}from"./components/tag/Tag.js";export{IconButton}from"./components/icon-button/IconButton.js";export{TemplatePreview}from"./components/template-preview/TemplatePreview.js";export{WhatsappLikePreview}from"./components/template-preview/WhatsApp/WhatsAppLikePreview.js";export{WhatsappLikePreviewV2}from"./components/template-preview/WhatsApp/WhatsAppLikePreviewV2.js";export{renderVariableUIForPreview}from"./components/template-preview/helpers/SmsTemplateHelper.js";export{WhatsAppFormatToHTML}from"./components/template-preview/helpers/WhatsAppFormatToHTML.js";export{VariableEditorHelper}from"./components/template-preview/helpers/VariableEditorHelper.js";export{ACTIONS_TYPES,CUSTOM_URL_NAME,HEADER_TYPES,TEMPLATE_EDITOR,TEMPLATE_STATUS}from"./components/template-preview/models/TemplateMeta.js";export{TemplateContextMapper}from"./components/template-context-mapper/TemplateContextMapper.js";export{getAllDataFromTemplateComponent}from"./components/template-context-mapper/utils/getDataFromTemplateComponent.js";export{validateIsUrl}from"./components/template-context-mapper/utils/validateIsUrl.js";export{FABMenu}from"./components/fab-menu/FABMenu.js";export{FloatingActionButton}from"./components/floating-action-button/FloatingActionButton.js";export{DROP_POSITION,DropdownToggleContainer,FAB_POSITION,FloatingActionButtonContainer,FloatingActionButtonOuterContainer,MENU_ALIGNMENT,StyledDropdown,TooltipStyled}from"./components/floating-action-button/FloatingActionButton.styles.js";export{ImageService}from"./components/image-compress/ImageCompress.js";export{BodyCaption,BodyLarge,BodyPrimary,BodyPrimaryLink,BodyRegular,BodySecondary,BodySecondaryLink,BodyTiny,ButtonLarge,ButtonRegular,Caption,Display,SmallRegular,SubHeading,TitleLarge,TitleMedium,TitleRegular,TitleSmall}from"./components/TypographyStyle.js";export{Button}from"./components/button/Button.js";export{ProgressBarComponent,ProgressCompletedBar}from"./components/progress-bar/ProgressBarComponent.js";export{QueryBuilder}from"./components/QueryBuilder/QueryBuilder.js";export{BaseQueryBuilderNode}from"./components/QueryBuilder/components/QueryBuilderNode/Base/BaseQueryBuilderNode.js";export{PropertyNode,PropertyNodeHeadless}from"./components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.js";export{queryBuilderSlice}from"./components/QueryBuilder/redux/queryBuilder.reducer.js";export{queryBuilderCacheSlice}from"./components/QueryBuilder/redux/queryBuilderCache.reducer.js";export{AD_STRING_OPERATORS,ANY_AD_OPERATORS,ANY_IG_OPERATORS,BOOLEAN_OPERATORS,DATE_OPERATORS,EVENT_VALUES,EXACTLY_OPERATORS,FREQUENCY_OPERATORS,ICE_BREAKER_OPERATORS,IG_STRING_OPERATORS,INTEGER_OPERATORS,MAIL_SUBJECT_OPERATORS,REACTION_OPERATORS,SPECIFIC_IG_OPERATORS,STRING_OPERATORS,STRING_RESTRICTED_OPERATORS,STRING_RESTRICTED_OPERATORS_2,STRING_RESTRICTED_OPERATORS_3}from"./components/QueryBuilder/types/QueryBuilderOperator.type.js";export{StyledModal}from"./components/modals/styledModal.js";export{DropdownPopover}from"./components/dropdown/DropdownPopover/index.js";export{Dropdown}from"./components/dropdown/Dropdown.js";export{ChipDropdown}from"./components/dropdown/ChipDropdown.js";export{OpenedDropdown}from"./components/dropdown/OpenedDropdown/components/OpennedDropdown.js";export{MenuItemDropdown}from"./components/dropdown/MenuItem/MenuItem.js";export{AnalyticsCard}from"./components/analytics-card/AnalyticsCard.js";export{AnalyticsContainer,CardDataContainer}from"./components/analytics-card/AnalyticsCard.styled.js";export{Input}from"./components/input/Input.js";export{AnalyticsChip}from"./components/analytics-chips-and-dropdowns/AnalyticsChip.js";export{AnalyticsDropdown,EachItem,formatDate}from"./components/analytics-chips-and-dropdowns/AnalyticsDropdown.js";export{AnalyticsMultiChip}from"./components/analytics-chips-and-dropdowns/AnalyticsMultiChip.js";export{AnalyticsMetric}from"./components/analytics-chips-and-dropdowns/AnalyticsMetric.js";export{AnalyticsTrend}from"./components/analytics-chips-and-dropdowns/AnalyticsTrend.js";export{LineChart}from"./components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.js";export{LinearChipGroupedChart}from"./components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.js";export{Card,PieChartAnalytics}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js";export{PieChart}from"./components/analytics-chips-and-dropdowns/chart/Pie/PieChart.js";export{HorizontalGraph}from"./components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.js";export{StackedBarChart}from"./components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.js";export{VerticalGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.js";export{HEAT,HEAT_COLORS,HEAT_GRADING_TYPE,HeatMap}from"./components/analytics-chips-and-dropdowns/chart/heatmap/HeatMap.js";export{VerticalBarAndLinearGraph}from"./components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.js";export{AVATAR_SIZE_VS_ICON_SIZE_MAP,Avatar,BACKGROUND_VS_TEXT_COLOR_MAP}from"./components/avatar/Avatar.js";export{AVATAR_BACKGROUND,AVATAR_SIZE_MAP,AVATAR_TYPES,SIZE}from"./components/avatar/AvatarHelper.js";export{Alert}from"./components/alerts/Alert.js";export{ALERT_TYPES,COLOR_CONFIG_MAP}from"./components/alerts/AlertHelper.js";export{RATIO,Thumbnail}from"./components/thumbnail/Thumbnail.js";export{Curtain}from"./components/curtain/Curtain.js";export{DatePicker}from"./components/datePicker/DatePicker.js";export{Loader,Switch,SwitchContainer,Thumb}from"./components/switch/Switch.js";export{SubscriptionPlan}from"./components/plans/SubscriptionPlan.js";export{BottomWrapper,HeaderWrapper,SubscriptionPlanSelector,defaultTabs}from"./components/plans/SubscriptionPlanSelector.js";export{NewSubscriptionPlan}from"./components/plans/NewSubscriptionPlan.js";export{SubscriptionPlansCollected}from"./components/plans/SubscriptionPlansCollected.js";export{TabItemComponent,Tabs}from"./components/tabs/Tabs.js";export{DynamicTabs}from"./components/dynamic-tabs/DynamicTabs.js";export{BikShimmer}from"./components/shimmer/ShimmerComponent/BikShimmer.js";export{TablePagination}from"./components/TablePagination/TablePagination.js";export{TablePaginationCard,TablePaginationCardStyled}from"./components/TablePagination/TablePaginationCard.js";export{StateModalComponent}from"./components/states-modal/StateModalComponent.js";export{DeleteConfirmationModal}from"./components/states-modal/DeleteConfirmationModal.js";export{ButtonActions,ButtonTypes,StateComponent,StateInterface}from"./components/states/StateComponent.js";export{ShopifyScopeWrapper}from"./components/states/ShopifyScopeWrapper.js";export{WhatsAppTextEditor}from"./components/WhatsAppTextEditor/WhatsAppTextEditor.js";export{EditorActionTypes,WhatsAppTextEditorHeader}from"./components/WhatsAppTextEditor/WhatsAppTextEditorHeader.js";export{BaseWhatsappContentLangHelper}from"./helpers/BaseWhatsappContentLang.helper.js";export{CardSelectionModal}from"./components/card-selection-modal/CardSelectionModal.js";export{BikImageCropper}from"./components/image-cropper/BikImageCropper.js";export{BikImagePipeline}from"./components/image-cropper/BikImagePipeline/BikImagePipeline.js";export{ButtonGroup}from"./components/buttonGroup/ButtonGroup.js";export{BikAccordion}from"./components/accordion/Accordion.js";export{FileUploader}from"./components/file-uploader/FileUploader.js";export{ColourInput}from"./components/colourInput/ColourInput.js";export{BikHeader}from"./components/bik-layout/BikHeader.js";export{BikLayout}from"./components/bik-layout/BikLayout.js";export{BikProfile}from"./components/bik-layout/BikProfile.js";export{SimpleSidebar}from"./components/bik-layout/SimpleSidebar.js";export{BikSidebar}from"./components/bik-layout/BikSidebar.js";export{FeatureModal}from"./components/bik-layout/FeatureModal.js";export{SidebarSkeleton}from"./components/bik-layout/SidebarSkeleton.js";export{ShowShopifyRestrictedModal}from"./components/bik-layout/ShowShopifyRestrictedModal.js";export{FeatureModalV2}from"./components/bik-layout/FeatureModalV2.js";export{SearchBar}from"./components/searchBar/searchBar.js";export{CustomDateTime}from"./components/custom-date-time/CustomDateTime.js";export{PricePleaseProductPicker,ProductPickerContent}from"./components/product-picker/ProductPickerModal.js";export{DiscountModal}from"./components/discount-modal/DiscountModal.js";export{COUPON_EXPIRATION,CouponExpiration}from"./components/discount-modal/CouponExpiration/CouponExpiration.js";export{DISCOUNT_TARGET_SELECTION,DISCOUNT_TARGET_TYPES,DISCOUNT_TYPES,DISCOUNT_VALUE_TYPES,MIN_PURCHASE_REQUIREMENT}from"./components/discount-modal/type.js";export{CountryCodePicker}from"./components/country-code-picker/CountryCodePicker.js";export{CountriesData}from"./components/country-code-picker/CountryCodePicker.modal.js";export{ShimmerImage}from"./components/shimmer-image/ShimmerImage.js";export{ProductPickerModal}from"./components/product-picker-v2/modal.js";export{Carousel}from"./components/carousel/carousel.js";export{CarouselSecondary}from"./components/carousel-secondary/CarouselSecondary.js";export{AccessTokenTroubleshootDialog}from"./components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.js";export{RadioList}from"./components/radioList/RadioList.js";export{CheckList}from"./components/checkList/CheckList.js";export{DateKeys,MEDIA_TYPES,PostPicker,dateOptions}from"./components/postPicker/postPicker.js";export{DropdownButton}from"./components/dropdown-button/DropdownButton.js";export{SideModal}from"./components/side-modal/SideModal.js";export{KeywordsInput}from"./components/keywords-input/KeywordsInput.js";export{AddVariableV2SideModal}from"./components/add-variableV2/AddVariableV2SideModal.js";export{AddVariableV2}from"./components/add-variableV2/AddVariableV2.js";export{NaLinkWrapper,NavigationHyperlink}from"./components/navigation-hyperlink/NavigationHyperlink.js";export{SearchFilter}from"./components/SearchFilter/index.js";export{InputWithVariables}from"./components/input-with-vars/InputWithVariables.js";export{DashboardReviewPopUp}from"./components/dashboard-review-popup/DashboardReviewPopUp.js";export{StarRating}from"./components/star-rating/StarRating.js";export{TestimonialCard}from"./components/testimonial-card/TestimonialCard.js";export{BikSlider}from"./components/slider/slider.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bikdotai/bik-component-library",
|
|
3
|
-
"version": "0.0.382-beta.
|
|
3
|
+
"version": "0.0.382-beta.200",
|
|
4
4
|
"description": "Bik Component Library",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"emoji-picker-react": "^4.4.9",
|
|
59
59
|
"lodash": "^4.17.21",
|
|
60
60
|
"phone": "^3.1.37",
|
|
61
|
-
"react-beautiful-dnd": "^13.1.1",
|
|
62
61
|
"react-bootstrap": "^2.4.0",
|
|
63
62
|
"react-calendar": "^3.7.0",
|
|
64
63
|
"react-chartjs-2": "^4.3.1",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function e(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}Object.defineProperty(exports,"__esModule",{value:!0});var t,r=e(require("react"));function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},n.apply(this,arguments)}var a=e=>r.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},e),t||(t=r.createElement("g",{fill:"#9E9E9E"},r.createElement("path",{d:"M5 9a1 1 0 0 0 0 2h14a1 1 0 1 0 0-2H5ZM5 13a1 1 0 1 0 0 2h14a1 1 0 1 0 0-2H5Z"}))));exports.default=a;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SelectedItems } from '.';
|
|
3
|
-
import { SelectedCollectionsActions } from './reducers';
|
|
4
|
-
import { OUT_OF_STOCK_ACTION } from './type';
|
|
5
|
-
interface RearrangeScreenInterface {
|
|
6
|
-
selectedCollections: SelectedItems;
|
|
7
|
-
selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
|
|
8
|
-
setScreen: React.Dispatch<React.SetStateAction<string>>;
|
|
9
|
-
rearrangeViewType: 'grid' | 'list';
|
|
10
|
-
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Screen will be opened on two conditions -
|
|
14
|
-
* 1. When startupScreen is 'rearrange'- Here, this screen will be opened as beginning.
|
|
15
|
-
2. When rearrangeAfterSelectionEnabled is true - Here instead of selected products screen, rearrange screen will be opened
|
|
16
|
-
*/
|
|
17
|
-
export declare const RearrangeScreen: (props: RearrangeScreenInterface) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
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"),i=require("../icon-button/IconButton.js"),c=require("../TypographyStyle.js"),n=require("./emptyState.js"),a=require("./helpers/ProductHelper.js"),o=require("./style.js"),l=require("./variantComponents.js");exports.RearrangeScreen=d=>{const{selectedCollections:u,selectedCollectionsDispatch:p,setScreen:j,rearrangeViewType:S,outOfStockAction:x}=d,[y,h]=r.useState(a.parseSelectedVariantsToArray(u));r.useEffect((()=>{h(a.parseSelectedVariantsToArray(u))}),[u]);return e.jsxs(s.DragDropContext,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=y,[r]=t.splice(e.source.index,1);t.splice(e.destination.index,0,r),t.forEach(((e,t)=>{e.displayOrder=t})),h(t)}},{children:[e.jsxs(o.SelectedScreenHeader,{children:[e.jsx(i.IconButton,{Icon:t.default,onClick:()=>{j("collections")}}),e.jsx(c.BodyCaption,{children:"All Products"})]}),Object.keys(u).length>0?"list"===S?e.jsx(l.VariantsList,{selectedVariants:y,setSelectedVariants:h,selectedCollectionsDispatch:p,outOfStockAction:x}):e.jsx(l.VariantsGrid,{selectedVariants:y,setSelectedVariants:h,selectedCollectionsDispatch:p}):e.jsx(n.EmptyState,{title:"No Products Selected",subtitle:"Selected products will appear here"})]}))};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ProductVariant } from './modal';
|
|
3
|
-
import { SelectedCollectionsActions } from './reducers';
|
|
4
|
-
import { OUT_OF_STOCK_ACTION } from './type';
|
|
5
|
-
/**
|
|
6
|
-
* Extended type from Product Variant, which contains ids and name.
|
|
7
|
-
*/
|
|
8
|
-
export type ProductVariantForRearrange = ProductVariant & {
|
|
9
|
-
variantId: string;
|
|
10
|
-
productId: string;
|
|
11
|
-
collectionId: string;
|
|
12
|
-
productName: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Props type for variant card in rearrange screen
|
|
16
|
-
*/
|
|
17
|
-
export interface VariantCardInterface {
|
|
18
|
-
data: ProductVariantForRearrange;
|
|
19
|
-
selectedCollectionsDispatch?: React.Dispatch<SelectedCollectionsActions>;
|
|
20
|
-
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
21
|
-
onDelete?: () => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Variant card in list view format.
|
|
25
|
-
* Displays image, name and delete icon
|
|
26
|
-
*/
|
|
27
|
-
export declare const VariantCardListView: (props: VariantCardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
/**
|
|
29
|
-
* Variant card in grid view format.
|
|
30
|
-
* Displays only image
|
|
31
|
-
*/
|
|
32
|
-
export declare const VariantCardGridView: (props: VariantCardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/delete.svg.js"),r=require("../../assets/icons/drag_handle.svg.js"),i=require("../../constants/Theme.js"),a=require("../icon-button/IconButton.js"),s=require("../shimmer-image/ShimmerImage.js"),o=require("../TypographyStyle.js"),l=require("./collectionScreen.js"),n=require("./helpers/ProductHelper.js"),d=require("./style.js"),c=require("../tooltips/Tooltip.js"),u=require("../tag/Tag.js");exports.VariantCardGridView=t=>{const{data:r}=t;return e.jsx(d.VariantCardGridStyle,{children:e.jsx(c.Tooltip,Object.assign({body:r.name,alwaysVisible:!1,variant:"dark",placement:"bottom"},{children:e.jsx(s.ShimmerImage,{width:72,height:72,imageUrl:r.image,alt:"Item",borderRadius:4})}))})},exports.VariantCardListView=h=>{const{data:j,selectedCollectionsDispatch:m,outOfStockAction:g}=h,p=n.ProductHelper.getProductLabels(j,g);return e.jsxs(d.VariantCardListStyle,{children:[e.jsx(r.default,{width:24,height:24,color:i.COLORS.content.placeholder}),e.jsx("div",{children:e.jsx(s.ShimmerImage,{width:40,height:40,imageUrl:j.image,alt:"Item",borderRadius:4},j.variantId)}),e.jsxs("div",Object.assign({className:"tooltip-title-tag"},{children:[e.jsx(c.Tooltip,Object.assign({body:`${j.productName} ${j.name}`,placement:"bottom",delay:400},{children:e.jsx(o.TitleRegular,{children:l.truncate(`${j.productName} ${j.name}`,34,!0)})})),p?e.jsx("div",Object.assign({style:{width:90,display:"flex"}},{children:e.jsx(u.Tag,{tagText:p,type:"warning",theme:"light"})})):e.jsx(e.Fragment,{})]})),e.jsx(a.IconButton,{Icon:()=>e.jsx(t.default,{width:24,height:24,color:i.COLORS.content.placeholder}),onClick:()=>{m&&m({type:"variantUnselected",data:{productId:j.productId,variantId:j.variantId,collectionId:j.collectionId}}),h.onDelete&&h.onDelete()}})]})};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SelectedCollectionsActions } from './reducers';
|
|
3
|
-
import { OUT_OF_STOCK_ACTION } from './type';
|
|
4
|
-
import { ProductVariantForRearrange } from './variant';
|
|
5
|
-
/**
|
|
6
|
-
* Props for list of variants - applicable both in list and grid view
|
|
7
|
-
*/
|
|
8
|
-
export type VariantsComponentProps = {
|
|
9
|
-
selectedVariants: ProductVariantForRearrange[];
|
|
10
|
-
setSelectedVariants: React.Dispatch<React.SetStateAction<ProductVariantForRearrange[]>>;
|
|
11
|
-
selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
|
|
12
|
-
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Returns a react component of variants list, which are eligible to drag and drop.
|
|
16
|
-
*/
|
|
17
|
-
export declare const VariantsList: ({ selectedVariants, setSelectedVariants, selectedCollectionsDispatch, outOfStockAction, }: VariantsComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a react component of variants grid, which are eligible to drag and drop.
|
|
20
|
-
*/
|
|
21
|
-
export declare const VariantsGrid: ({ selectedVariants }: VariantsComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react-beautiful-dnd"),a=require("../../constants/Theme.js"),s=require("./variant.js");exports.VariantsGrid=a=>{let{selectedVariants:d}=a;return e.jsx(r.Droppable,Object.assign({droppableId:"droppable-horizontal"},{children:a=>e.jsxs("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",width:"500px"})},{children:[e.jsx(r.Droppable,Object.assign({droppableId:"droppable-vertical",direction:"horizontal"},{children:a=>e.jsxs("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"})},{children:[d.map(((a,d)=>e.jsx(r.Draggable,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:d},{children:(r,d)=>e.jsxs("div",Object.assign({ref:r.innerRef},r.draggableProps,r.dragHandleProps,{children:[e.jsx(s.VariantCardGridView,{data:a}),r.placeholder]}))}),`${a.productId}-${a.variantId}`))),a.placeholder]}))})),a.placeholder]}))}))},exports.VariantsList=d=>{let{selectedVariants:i,setSelectedVariants:t,selectedCollectionsDispatch:l,outOfStockAction:n}=d;return e.jsx(r.Droppable,Object.assign({droppableId:"droppable-list"},{children:(d,p)=>e.jsxs("div",Object.assign({},d.droppableProps,{ref:d.innerRef,style:Object.assign({backgroundColor:a.COLORS.surface.subdued,padding:"0.05px",height:i.length<8?"550px":"100%"},d.droppableProps.style)},{children:[i.map(((d,p)=>e.jsx("div",Object.assign({style:{background:a.COLORS.surface.hovered,margin:"5px"}},{children:e.jsx(r.Draggable,Object.assign({draggableId:`${d.productId}-${d.variantId}`,index:p},{children:(r,a)=>e.jsx("div",Object.assign({ref:r.innerRef},r.draggableProps,r.dragHandleProps,{children:e.jsx(s.VariantCardListView,{data:d,selectedCollectionsDispatch:l,onDelete:()=>{const e=i.slice();e[p].displayOrder=null,e.splice(p,1),t(e)},outOfStockAction:n},`${d.productId}-${d.variantId}`)}))}),`${d.productId}-${d.variantId}`)}),`${d.productId}-${d.variantId}`))),d.placeholder&&p.isDraggingOver?e.jsx("div",Object.assign({style:{background:a.COLORS.surface.hovered,margin:"5px"}},{children:d.placeholder})):null]}))}))};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import*as e from"react";var t;function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},a.apply(this,arguments)}var r=r=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},r),t||(t=e.createElement("g",{fill:"#9E9E9E"},e.createElement("path",{d:"M5 9a1 1 0 0 0 0 2h14a1 1 0 1 0 0-2H5ZM5 13a1 1 0 1 0 0 2h14a1 1 0 1 0 0-2H5Z"}))));export{r as default};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SelectedItems } from '.';
|
|
3
|
-
import { SelectedCollectionsActions } from './reducers';
|
|
4
|
-
import { OUT_OF_STOCK_ACTION } from './type';
|
|
5
|
-
interface RearrangeScreenInterface {
|
|
6
|
-
selectedCollections: SelectedItems;
|
|
7
|
-
selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
|
|
8
|
-
setScreen: React.Dispatch<React.SetStateAction<string>>;
|
|
9
|
-
rearrangeViewType: 'grid' | 'list';
|
|
10
|
-
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Screen will be opened on two conditions -
|
|
14
|
-
* 1. When startupScreen is 'rearrange'- Here, this screen will be opened as beginning.
|
|
15
|
-
2. When rearrangeAfterSelectionEnabled is true - Here instead of selected products screen, rearrange screen will be opened
|
|
16
|
-
*/
|
|
17
|
-
export declare const RearrangeScreen: (props: RearrangeScreenInterface) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as e,jsx as t}from"react/jsx-runtime";import o from"../../assets/icons/arrow_left.svg.js";import{useState as r,useEffect as s}from"react";import{DragDropContext as i}from"react-beautiful-dnd";import{IconButton as c}from"../icon-button/IconButton.js";import{BodyCaption as n}from"../TypographyStyle.js";import{EmptyState as l}from"./emptyState.js";import{parseSelectedVariantsToArray as a}from"./helpers/ProductHelper.js";import{SelectedScreenHeader as p}from"./style.js";import{VariantsList as d,VariantsGrid as m}from"./variantComponents.js";const f=f=>{const{selectedCollections:u,selectedCollectionsDispatch:h,setScreen:j,rearrangeViewType:S,outOfStockAction:y}=f,[g,C]=r(a(u));s((()=>{C(a(u))}),[u]);return e(i,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=g,[o]=t.splice(e.source.index,1);t.splice(e.destination.index,0,o),t.forEach(((e,t)=>{e.displayOrder=t})),C(t)}},{children:[e(p,{children:[t(c,{Icon:o,onClick:()=>{j("collections")}}),t(n,{children:"All Products"})]}),Object.keys(u).length>0?"list"===S?t(d,{selectedVariants:g,setSelectedVariants:C,selectedCollectionsDispatch:h,outOfStockAction:y}):t(m,{selectedVariants:g,setSelectedVariants:C,selectedCollectionsDispatch:h}):t(l,{title:"No Products Selected",subtitle:"Selected products will appear here"})]}))};export{f as RearrangeScreen};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { ProductVariant } from './modal';
|
|
3
|
-
import { SelectedCollectionsActions } from './reducers';
|
|
4
|
-
import { OUT_OF_STOCK_ACTION } from './type';
|
|
5
|
-
/**
|
|
6
|
-
* Extended type from Product Variant, which contains ids and name.
|
|
7
|
-
*/
|
|
8
|
-
export type ProductVariantForRearrange = ProductVariant & {
|
|
9
|
-
variantId: string;
|
|
10
|
-
productId: string;
|
|
11
|
-
collectionId: string;
|
|
12
|
-
productName: string;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Props type for variant card in rearrange screen
|
|
16
|
-
*/
|
|
17
|
-
export interface VariantCardInterface {
|
|
18
|
-
data: ProductVariantForRearrange;
|
|
19
|
-
selectedCollectionsDispatch?: React.Dispatch<SelectedCollectionsActions>;
|
|
20
|
-
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
21
|
-
onDelete?: () => void;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Variant card in list view format.
|
|
25
|
-
* Displays image, name and delete icon
|
|
26
|
-
*/
|
|
27
|
-
export declare const VariantCardListView: (props: VariantCardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
/**
|
|
29
|
-
* Variant card in grid view format.
|
|
30
|
-
* Displays only image
|
|
31
|
-
*/
|
|
32
|
-
export declare const VariantCardGridView: (props: VariantCardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsxs as t,jsx as e,Fragment as o}from"react/jsx-runtime";import i from"../../assets/icons/delete.svg.js";import r from"../../assets/icons/drag_handle.svg.js";import{COLORS as a}from"../../constants/Theme.js";import{IconButton as n}from"../icon-button/IconButton.js";import{ShimmerImage as l}from"../shimmer-image/ShimmerImage.js";import{TitleRegular as s}from"../TypographyStyle.js";import{truncate as c}from"./collectionScreen.js";import{ProductHelper as m}from"./helpers/ProductHelper.js";import{VariantCardListStyle as d,VariantCardGridStyle as h}from"./style.js";import{Tooltip as p}from"../tooltips/Tooltip.js";import{Tag as g}from"../tag/Tag.js";const j=h=>{const{data:j,selectedCollectionsDispatch:f,outOfStockAction:u}=h,b=m.getProductLabels(j,u);return t(d,{children:[e(r,{width:24,height:24,color:a.content.placeholder}),e("div",{children:e(l,{width:40,height:40,imageUrl:j.image,alt:"Item",borderRadius:4},j.variantId)}),t("div",Object.assign({className:"tooltip-title-tag"},{children:[e(p,Object.assign({body:`${j.productName} ${j.name}`,placement:"bottom",delay:400},{children:e(s,{children:c(`${j.productName} ${j.name}`,34,!0)})})),b?e("div",Object.assign({style:{width:90,display:"flex"}},{children:e(g,{tagText:b,type:"warning",theme:"light"})})):e(o,{})]})),e(n,{Icon:()=>e(i,{width:24,height:24,color:a.content.placeholder}),onClick:()=>{f&&f({type:"variantUnselected",data:{productId:j.productId,variantId:j.variantId,collectionId:j.collectionId}}),h.onDelete&&h.onDelete()}})]})},f=t=>{const{data:o}=t;return e(h,{children:e(p,Object.assign({body:o.name,alwaysVisible:!1,variant:"dark",placement:"bottom"},{children:e(l,{width:72,height:72,imageUrl:o.image,alt:"Item",borderRadius:4})}))})};export{f as VariantCardGridView,j as VariantCardListView};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { SelectedCollectionsActions } from './reducers';
|
|
3
|
-
import { OUT_OF_STOCK_ACTION } from './type';
|
|
4
|
-
import { ProductVariantForRearrange } from './variant';
|
|
5
|
-
/**
|
|
6
|
-
* Props for list of variants - applicable both in list and grid view
|
|
7
|
-
*/
|
|
8
|
-
export type VariantsComponentProps = {
|
|
9
|
-
selectedVariants: ProductVariantForRearrange[];
|
|
10
|
-
setSelectedVariants: React.Dispatch<React.SetStateAction<ProductVariantForRearrange[]>>;
|
|
11
|
-
selectedCollectionsDispatch: React.Dispatch<SelectedCollectionsActions>;
|
|
12
|
-
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
13
|
-
};
|
|
14
|
-
/**
|
|
15
|
-
* Returns a react component of variants list, which are eligible to drag and drop.
|
|
16
|
-
*/
|
|
17
|
-
export declare const VariantsList: ({ selectedVariants, setSelectedVariants, selectedCollectionsDispatch, outOfStockAction, }: VariantsComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a react component of variants grid, which are eligible to drag and drop.
|
|
20
|
-
*/
|
|
21
|
-
export declare const VariantsGrid: ({ selectedVariants }: VariantsComponentProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx as e,jsxs as r}from"react/jsx-runtime";import{Droppable as a,Draggable as d}from"react-beautiful-dnd";import{COLORS as t}from"../../constants/Theme.js";import{VariantCardListView as i,VariantCardGridView as s}from"./variant.js";const l=s=>{let{selectedVariants:l,setSelectedVariants:n,selectedCollectionsDispatch:o,outOfStockAction:c}=s;return e(a,Object.assign({droppableId:"droppable-list"},{children:(a,s)=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign({backgroundColor:t.surface.subdued,padding:"0.05px",height:l.length<8?"550px":"100%"},a.droppableProps.style)},{children:[l.map(((r,a)=>e("div",Object.assign({style:{background:t.surface.hovered,margin:"5px"}},{children:e(d,Object.assign({draggableId:`${r.productId}-${r.variantId}`,index:a},{children:(d,t)=>e("div",Object.assign({ref:d.innerRef},d.draggableProps,d.dragHandleProps,{children:e(i,{data:r,selectedCollectionsDispatch:o,onDelete:()=>{const e=l.slice();e[a].displayOrder=null,e.splice(a,1),n(e)},outOfStockAction:c},`${r.productId}-${r.variantId}`)}))}),`${r.productId}-${r.variantId}`)}),`${r.productId}-${r.variantId}`))),a.placeholder&&s.isDraggingOver?e("div",Object.assign({style:{background:t.surface.hovered,margin:"5px"}},{children:a.placeholder})):null]}))}))},n=t=>{let{selectedVariants:i}=t;return e(a,Object.assign({droppableId:"droppable-horizontal"},{children:t=>r("div",Object.assign({},t.droppableProps,{ref:t.innerRef,style:Object.assign(Object.assign({},t.droppableProps.style),{display:"flex",width:"500px"})},{children:[e(a,Object.assign({droppableId:"droppable-vertical",direction:"horizontal"},{children:a=>r("div",Object.assign({},a.droppableProps,{ref:a.innerRef,style:Object.assign(Object.assign({},a.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"})},{children:[i.map(((a,t)=>e(d,Object.assign({draggableId:`${a.productId}-${a.variantId}`,index:t},{children:(d,t)=>r("div",Object.assign({ref:d.innerRef},d.draggableProps,d.dragHandleProps,{children:[e(s,{data:a}),d.placeholder]}))}),`${a.productId}-${a.variantId}`))),a.placeholder]}))})),t.placeholder]}))}))};export{n as VariantsGrid,l as VariantsList};
|