@bikdotai/bik-component-library 0.0.339 → 0.0.340-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/_virtual/index.js +1 -0
- package/dist/cjs/_virtual/index2.js +1 -0
- package/dist/cjs/_virtual/index3.js +1 -0
- package/dist/cjs/_virtual/react-is.development.js +1 -0
- package/dist/cjs/_virtual/react-is.development2.js +1 -0
- package/dist/cjs/_virtual/react-is.production.min.js +1 -0
- package/dist/cjs/_virtual/react-is.production.min2.js +1 -0
- package/dist/cjs/assets/icons/WhiteStarFilled.svg.js +1 -0
- package/dist/cjs/assets/icons/checkCircle.svg.js +1 -0
- package/dist/cjs/assets/icons/drag_handle.svg.js +1 -0
- package/dist/cjs/assets/icons/quotes.svg.js +1 -0
- package/dist/cjs/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/cjs/components/QueryBuilder/constants/DATE_OPERATORS_OPTIONS.js +1 -1
- package/dist/cjs/components/accordion/Accordion.d.ts +2 -0
- package/dist/cjs/components/accordion/Accordion.js +1 -1
- package/dist/cjs/components/accordion/Accordion.style.d.ts +1 -0
- package/dist/cjs/components/accordion/Accordion.style.js +1 -1
- 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/alerts/Alert.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +3 -0
- package/dist/cjs/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/CommonStyles.js +1 -1
- package/dist/cjs/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/cjs/components/avatar/Avatar.js +1 -1
- package/dist/cjs/components/bik-layout/BikLayout.d.ts +2 -0
- package/dist/cjs/components/bik-layout/BikLayout.js +1 -1
- package/dist/cjs/components/bik-layout/CommonStyles.d.ts +10 -0
- package/dist/cjs/components/bik-layout/CommonStyles.js +1 -1
- package/dist/cjs/components/bik-layout/FeatureModal.d.ts +1 -1
- package/dist/cjs/components/bik-layout/FeatureModalV2.d.ts +12 -0
- package/dist/cjs/components/bik-layout/FeatureModalV2.js +1 -0
- package/dist/cjs/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/cjs/components/bik-layout/ShowShopifyRestrictedModal.d.ts +13 -0
- package/dist/cjs/components/bik-layout/ShowShopifyRestrictedModal.js +1 -0
- package/dist/cjs/components/bik-layout/index.d.ts +2 -0
- package/dist/cjs/components/button/Button.js +1 -1
- package/dist/cjs/components/button/Button.styled.js +1 -1
- package/dist/cjs/components/button/model.d.ts +1 -1
- package/dist/cjs/components/button/themes.d.ts +3 -2
- package/dist/cjs/components/button/themes.js +1 -1
- package/dist/cjs/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/cjs/components/datePicker/DatePicker.js +1 -1
- 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/input/Input.js +1 -1
- package/dist/cjs/components/input/Input.styled.d.ts +6 -0
- package/dist/cjs/components/input/Input.styled.js +1 -1
- package/dist/cjs/components/input-with-vars/InputWithVariables.d.ts +2 -0
- package/dist/cjs/components/input-with-vars/InputWithVariables.js +4 -4
- package/dist/cjs/components/modals/Modal.d.ts +1 -0
- package/dist/cjs/components/modals/Modal.js +1 -1
- package/dist/cjs/components/modals/styledModal.d.ts +1 -0
- package/dist/cjs/components/modals/styledModal.js +1 -1
- package/dist/cjs/components/plans/NewSubscriptionPlan.d.ts +18 -0
- package/dist/cjs/components/plans/NewSubscriptionPlan.js +1 -0
- package/dist/cjs/components/plans/SubscriptionPlan.d.ts +3 -2
- package/dist/cjs/components/plans/SubscriptionPlan.js +1 -1
- package/dist/cjs/components/plans/SubscriptionPlanSelector.js +1 -1
- package/dist/cjs/components/plans/SubscriptionPlanStyled.d.ts +7 -0
- package/dist/cjs/components/plans/SubscriptionPlanStyled.js +1 -1
- package/dist/cjs/components/plans/SubscriptionPlansCollected.d.ts +14 -0
- package/dist/cjs/components/plans/SubscriptionPlansCollected.js +6 -0
- package/dist/cjs/components/plans/index.d.ts +2 -0
- package/dist/cjs/components/product-picker-v2/collectionScreen.d.ts +2 -0
- package/dist/cjs/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.d.ts +13 -1
- package/dist/cjs/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/cjs/components/product-picker-v2/modal.d.ts +24 -3
- package/dist/cjs/components/product-picker-v2/modal.js +1 -1
- package/dist/cjs/components/product-picker-v2/productScreen.d.ts +7 -0
- package/dist/cjs/components/product-picker-v2/productScreen.js +1 -1
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.d.ts +18 -0
- package/dist/cjs/components/product-picker-v2/rearrangeScreen.js +1 -0
- package/dist/cjs/components/product-picker-v2/style.d.ts +5 -0
- package/dist/cjs/components/product-picker-v2/style.js +45 -13
- package/dist/cjs/components/product-picker-v2/variant.d.ts +32 -0
- package/dist/cjs/components/product-picker-v2/variant.js +1 -0
- package/dist/cjs/components/product-picker-v2/variantComponents.d.ts +21 -0
- package/dist/cjs/components/product-picker-v2/variantComponents.js +1 -0
- package/dist/cjs/components/slider/index.d.ts +1 -0
- package/dist/cjs/components/slider/slider.d.ts +10 -0
- package/dist/cjs/components/slider/slider.js +1 -0
- package/dist/cjs/components/star-rating/Star.d.ts +1 -0
- package/dist/cjs/components/star-rating/Star.js +1 -1
- package/dist/cjs/components/star-rating/StarRating.d.ts +1 -0
- package/dist/cjs/components/star-rating/StarRating.js +1 -1
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.d.ts +2 -1
- package/dist/cjs/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/cjs/components/template-context-mapper/context/templateModalContext.d.ts +2 -0
- package/dist/cjs/components/template-context-mapper/context/templateModalContext.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.d.ts +1 -0
- package/dist/cjs/components/template-context-mapper/modalElements/EditMediaV2.js +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/MobilePreview.js +2 -2
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
- package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/cjs/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/cjs/components/testimonial-card/TestimonialCard.d.ts +14 -0
- package/dist/cjs/components/testimonial-card/TestimonialCard.js +1 -0
- package/dist/cjs/components/testimonial-card/TestimonialCard.style.d.ts +16 -0
- package/dist/cjs/components/testimonial-card/TestimonialCard.style.js +1 -0
- package/dist/cjs/components/testimonial-card/index.d.ts +1 -0
- package/dist/cjs/components/tooltips/Tooltip.js +1 -1
- package/dist/cjs/components/tooltips/TooltipInternal.d.ts +1 -0
- package/dist/cjs/components/tooltips/TooltipInternal.js +1 -1
- package/dist/cjs/constants/Theme.d.ts +25 -0
- package/dist/cjs/constants/Theme.js +1 -1
- package/dist/cjs/index.d.ts +2 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/extends.js +1 -0
- package/dist/cjs/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -0
- package/dist/cjs/node_modules/@mui/base/node_modules/clsx/dist/clsx.mjs.js +1 -0
- package/dist/cjs/node_modules/@mui/base/useSlider/useSlider.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/appendOwnerState.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/areArraysEqual.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/extractEventHandlers.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/isHostComponent.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/mergeSlotProps.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/omitEventHandlers.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/resolveComponentProps.js +1 -0
- package/dist/cjs/node_modules/@mui/base/utils/useSlotProps.js +1 -0
- package/dist/cjs/node_modules/@mui/material/Slider/Slider.js +1 -0
- package/dist/cjs/node_modules/@mui/material/Slider/SliderValueLabel.js +1 -0
- package/dist/cjs/node_modules/@mui/material/Slider/sliderClasses.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/blue.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/common.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/green.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/grey.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/lightBlue.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/orange.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/purple.js +1 -0
- package/dist/cjs/node_modules/@mui/material/colors/red.js +1 -0
- package/dist/cjs/node_modules/@mui/material/node_modules/clsx/dist/clsx.mjs.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/createMixins.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/createPalette.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/createTheme.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/createTransitions.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/createTypography.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/defaultTheme.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/identifier.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/shadows.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/styled.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/useTheme.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/useThemeProps.js +1 -0
- package/dist/cjs/node_modules/@mui/material/styles/zIndex.js +1 -0
- package/dist/cjs/node_modules/@mui/material/utils/capitalize.js +1 -0
- package/dist/cjs/node_modules/@mui/material/utils/shouldSpreadAdditionalProps.js +1 -0
- package/dist/cjs/node_modules/@mui/styled-engine/index.js +8 -0
- package/dist/cjs/node_modules/@mui/system/esm/borders.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/breakpoints.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/colorManipulator.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/compose.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/createStyled.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/createTheme/createBreakpoints.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/createTheme/createSpacing.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/createTheme/createTheme.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/createTheme/shape.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/cssGrid.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/memoize.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/merge.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/palette.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/propsToClassKey.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/responsivePropType.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/sizing.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/spacing.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/style.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/useTheme.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js +1 -0
- package/dist/cjs/node_modules/@mui/system/esm/useThemeWithoutDefault.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/capitalize/capitalize.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/deepmerge.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/formatMuiErrorMessage.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/getDisplayName.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/resolveProps.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/setRef.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/useControlled/useControlled.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/useIsFocusVisible.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/esm/visuallyHidden.js +1 -0
- package/dist/cjs/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js +10 -0
- package/dist/cjs/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.min.js +10 -0
- package/dist/cjs/node_modules/@mui/utils/node_modules/react-is/index.js +1 -0
- package/dist/cjs/node_modules/object-assign/index.js +7 -0
- package/dist/cjs/node_modules/prop-types/checkPropTypes.js +1 -0
- package/dist/cjs/node_modules/prop-types/factoryWithThrowingShims.js +1 -0
- package/dist/cjs/node_modules/prop-types/factoryWithTypeCheckers.js +1 -0
- package/dist/cjs/node_modules/prop-types/index.js +1 -0
- package/dist/cjs/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -0
- package/dist/cjs/node_modules/prop-types/lib/has.js +1 -0
- package/dist/cjs/node_modules/react-is/cjs/react-is.development.js +9 -0
- package/dist/cjs/node_modules/react-is/cjs/react-is.production.min.js +9 -0
- package/dist/cjs/node_modules/react-is/index.js +1 -0
- package/dist/esm/_virtual/index.js +1 -0
- package/dist/esm/_virtual/index2.js +1 -0
- package/dist/esm/_virtual/index3.js +1 -0
- package/dist/esm/_virtual/react-is.development.js +1 -0
- package/dist/esm/_virtual/react-is.development2.js +1 -0
- package/dist/esm/_virtual/react-is.production.min.js +1 -0
- package/dist/esm/_virtual/react-is.production.min2.js +1 -0
- package/dist/esm/assets/icons/WhiteStarFilled.svg.js +1 -0
- package/dist/esm/assets/icons/checkCircle.svg.js +1 -0
- package/dist/esm/assets/icons/drag_handle.svg.js +1 -0
- package/dist/esm/assets/icons/quotes.svg.js +1 -0
- package/dist/esm/components/QueryBuilder/Filters/Event/components/EventFilter.js +1 -1
- package/dist/esm/components/QueryBuilder/constants/DATE_OPERATORS_OPTIONS.js +1 -1
- package/dist/esm/components/accordion/Accordion.d.ts +2 -0
- package/dist/esm/components/accordion/Accordion.js +1 -1
- package/dist/esm/components/accordion/Accordion.style.d.ts +1 -0
- package/dist/esm/components/accordion/Accordion.style.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/alerts/Alert.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsDropdown.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.d.ts +3 -0
- package/dist/esm/components/analytics-chips-and-dropdowns/AnalyticsTrend.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.js +1 -1
- package/dist/esm/components/analytics-chips-and-dropdowns/chart/Pie/PieChartAnalytics.js +1 -1
- package/dist/esm/components/avatar/Avatar.js +1 -1
- package/dist/esm/components/bik-layout/BikLayout.d.ts +2 -0
- package/dist/esm/components/bik-layout/BikLayout.js +1 -1
- package/dist/esm/components/bik-layout/CommonStyles.d.ts +10 -0
- package/dist/esm/components/bik-layout/CommonStyles.js +1 -1
- package/dist/esm/components/bik-layout/FeatureModal.d.ts +1 -1
- package/dist/esm/components/bik-layout/FeatureModalV2.d.ts +12 -0
- package/dist/esm/components/bik-layout/FeatureModalV2.js +1 -0
- package/dist/esm/components/bik-layout/MockMenus.d.ts +1 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.d.ts +13 -0
- package/dist/esm/components/bik-layout/ShowShopifyRestrictedModal.js +1 -0
- package/dist/esm/components/bik-layout/index.d.ts +2 -0
- package/dist/esm/components/button/Button.js +1 -1
- package/dist/esm/components/button/Button.styled.js +1 -1
- package/dist/esm/components/button/model.d.ts +1 -1
- package/dist/esm/components/button/themes.d.ts +3 -2
- package/dist/esm/components/button/themes.js +1 -1
- package/dist/esm/components/carousel-secondary/CarouselSecondary.js +1 -1
- package/dist/esm/components/datePicker/DatePicker.js +1 -1
- 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/input/Input.js +1 -1
- package/dist/esm/components/input/Input.styled.d.ts +6 -0
- package/dist/esm/components/input/Input.styled.js +1 -1
- package/dist/esm/components/input-with-vars/InputWithVariables.d.ts +2 -0
- package/dist/esm/components/input-with-vars/InputWithVariables.js +4 -4
- package/dist/esm/components/modals/Modal.d.ts +1 -0
- package/dist/esm/components/modals/Modal.js +1 -1
- package/dist/esm/components/modals/styledModal.d.ts +1 -0
- package/dist/esm/components/modals/styledModal.js +1 -1
- package/dist/esm/components/plans/NewSubscriptionPlan.d.ts +18 -0
- package/dist/esm/components/plans/NewSubscriptionPlan.js +1 -0
- package/dist/esm/components/plans/SubscriptionPlan.d.ts +3 -2
- package/dist/esm/components/plans/SubscriptionPlan.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlanSelector.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlanStyled.d.ts +7 -0
- package/dist/esm/components/plans/SubscriptionPlanStyled.js +1 -1
- package/dist/esm/components/plans/SubscriptionPlansCollected.d.ts +14 -0
- package/dist/esm/components/plans/SubscriptionPlansCollected.js +6 -0
- package/dist/esm/components/plans/index.d.ts +2 -0
- package/dist/esm/components/product-picker-v2/collectionScreen.d.ts +2 -0
- package/dist/esm/components/product-picker-v2/collectionScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.d.ts +13 -1
- package/dist/esm/components/product-picker-v2/helpers/ProductHelper.js +1 -1
- package/dist/esm/components/product-picker-v2/modal.d.ts +24 -3
- package/dist/esm/components/product-picker-v2/modal.js +1 -1
- package/dist/esm/components/product-picker-v2/productScreen.d.ts +7 -0
- package/dist/esm/components/product-picker-v2/productScreen.js +1 -1
- package/dist/esm/components/product-picker-v2/rearrangeScreen.d.ts +18 -0
- package/dist/esm/components/product-picker-v2/rearrangeScreen.js +1 -0
- package/dist/esm/components/product-picker-v2/style.d.ts +5 -0
- package/dist/esm/components/product-picker-v2/style.js +44 -12
- package/dist/esm/components/product-picker-v2/variant.d.ts +32 -0
- package/dist/esm/components/product-picker-v2/variant.js +1 -0
- package/dist/esm/components/product-picker-v2/variantComponents.d.ts +21 -0
- package/dist/esm/components/product-picker-v2/variantComponents.js +1 -0
- package/dist/esm/components/slider/index.d.ts +1 -0
- package/dist/esm/components/slider/slider.d.ts +10 -0
- package/dist/esm/components/slider/slider.js +1 -0
- package/dist/esm/components/star-rating/Star.d.ts +1 -0
- package/dist/esm/components/star-rating/Star.js +1 -1
- package/dist/esm/components/star-rating/StarRating.d.ts +1 -0
- package/dist/esm/components/star-rating/StarRating.js +1 -1
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.d.ts +2 -1
- package/dist/esm/components/template-context-mapper/TemplateContextMapper.js +1 -1
- package/dist/esm/components/template-context-mapper/context/templateModalContext.d.ts +2 -0
- package/dist/esm/components/template-context-mapper/context/templateModalContext.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.d.ts +1 -0
- package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/MobilePreview.js +2 -2
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js +1 -1
- package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.js +3 -3
- package/dist/esm/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js +1 -1
- package/dist/esm/components/template-preview/SmsTemplatePreview.js +1 -1
- package/dist/esm/components/testimonial-card/TestimonialCard.d.ts +14 -0
- package/dist/esm/components/testimonial-card/TestimonialCard.js +1 -0
- package/dist/esm/components/testimonial-card/TestimonialCard.style.d.ts +16 -0
- package/dist/esm/components/testimonial-card/TestimonialCard.style.js +1 -0
- package/dist/esm/components/testimonial-card/index.d.ts +1 -0
- package/dist/esm/components/tooltips/Tooltip.js +1 -1
- package/dist/esm/components/tooltips/TooltipInternal.d.ts +1 -0
- package/dist/esm/components/tooltips/TooltipInternal.js +1 -1
- package/dist/esm/constants/Theme.d.ts +25 -0
- package/dist/esm/constants/Theme.js +1 -1
- package/dist/esm/index.d.ts +2 -0
- package/dist/esm/index.js +1 -1
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/extends.js +1 -0
- package/dist/esm/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +1 -0
- package/dist/esm/node_modules/@mui/base/node_modules/clsx/dist/clsx.mjs.js +1 -0
- package/dist/esm/node_modules/@mui/base/useSlider/useSlider.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/appendOwnerState.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/areArraysEqual.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/extractEventHandlers.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/isHostComponent.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/mergeSlotProps.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/omitEventHandlers.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/resolveComponentProps.js +1 -0
- package/dist/esm/node_modules/@mui/base/utils/useSlotProps.js +1 -0
- package/dist/esm/node_modules/@mui/material/Slider/Slider.js +1 -0
- package/dist/esm/node_modules/@mui/material/Slider/SliderValueLabel.js +1 -0
- package/dist/esm/node_modules/@mui/material/Slider/sliderClasses.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/blue.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/common.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/green.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/grey.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/lightBlue.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/orange.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/purple.js +1 -0
- package/dist/esm/node_modules/@mui/material/colors/red.js +1 -0
- package/dist/esm/node_modules/@mui/material/node_modules/clsx/dist/clsx.mjs.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/createMixins.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/createPalette.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/createTheme.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/createTransitions.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/createTypography.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/defaultTheme.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/identifier.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/shadows.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/styled.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/useTheme.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/useThemeProps.js +1 -0
- package/dist/esm/node_modules/@mui/material/styles/zIndex.js +1 -0
- package/dist/esm/node_modules/@mui/material/utils/capitalize.js +1 -0
- package/dist/esm/node_modules/@mui/material/utils/shouldSpreadAdditionalProps.js +1 -0
- package/dist/esm/node_modules/@mui/styled-engine/index.js +8 -0
- package/dist/esm/node_modules/@mui/system/esm/borders.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/breakpoints.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/colorManipulator.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/compose.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/createStyled.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/createTheme/createBreakpoints.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/createTheme/createSpacing.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/createTheme/createTheme.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/createTheme/shape.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/cssGrid.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/memoize.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/merge.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/palette.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/propsToClassKey.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/responsivePropType.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/sizing.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/spacing.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/style.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/useTheme.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/useThemeProps/getThemeProps.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/useThemeProps/useThemeProps.js +1 -0
- package/dist/esm/node_modules/@mui/system/esm/useThemeWithoutDefault.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/capitalize/capitalize.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/chainPropTypes/chainPropTypes.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/composeClasses/composeClasses.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/deepmerge.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/formatMuiErrorMessage.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/getDisplayName.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/resolveProps.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/setRef.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/useControlled/useControlled.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/useForkRef/useForkRef.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/useIsFocusVisible.js +1 -0
- package/dist/esm/node_modules/@mui/utils/esm/visuallyHidden.js +1 -0
- package/dist/esm/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.development.js +10 -0
- package/dist/esm/node_modules/@mui/utils/node_modules/react-is/cjs/react-is.production.min.js +10 -0
- package/dist/esm/node_modules/@mui/utils/node_modules/react-is/index.js +1 -0
- package/dist/esm/node_modules/object-assign/index.js +6 -0
- package/dist/esm/node_modules/prop-types/checkPropTypes.js +1 -0
- package/dist/esm/node_modules/prop-types/factoryWithThrowingShims.js +1 -0
- package/dist/esm/node_modules/prop-types/factoryWithTypeCheckers.js +1 -0
- package/dist/esm/node_modules/prop-types/index.js +1 -0
- package/dist/esm/node_modules/prop-types/lib/ReactPropTypesSecret.js +1 -0
- package/dist/esm/node_modules/prop-types/lib/has.js +1 -0
- package/dist/esm/node_modules/react-is/cjs/react-is.development.js +9 -0
- package/dist/esm/node_modules/react-is/cjs/react-is.production.min.js +9 -0
- package/dist/esm/node_modules/react-is/index.js +1 -0
- package/package.json +6 -4
|
@@ -18,6 +18,9 @@ interface ProductsScreenInterface {
|
|
|
18
18
|
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
19
19
|
hideVariantCheckbox?: boolean;
|
|
20
20
|
selectProductsFromCustomCollection?: boolean;
|
|
21
|
+
renderCoreComponent?: boolean;
|
|
22
|
+
pickerType?: 'COLLECTION' | 'PRODUCT';
|
|
23
|
+
hideProductVariants?: boolean;
|
|
21
24
|
}
|
|
22
25
|
export declare const ProductsScreen: (props: ProductsScreenInterface) => import("react/jsx-runtime").JSX.Element;
|
|
23
26
|
interface ProductGroupInterface {
|
|
@@ -32,6 +35,8 @@ interface ProductGroupInterface {
|
|
|
32
35
|
hideProductCheckbox?: boolean;
|
|
33
36
|
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
34
37
|
hideVariantCheckbox?: boolean;
|
|
38
|
+
hideProductVariants?: boolean;
|
|
39
|
+
pickerType?: 'COLLECTION' | 'PRODUCT';
|
|
35
40
|
}
|
|
36
41
|
export declare const ProductGroup: (props: ProductGroupInterface) => import("react/jsx-runtime").JSX.Element;
|
|
37
42
|
interface ProductCardInterface {
|
|
@@ -48,6 +53,8 @@ interface ProductCardInterface {
|
|
|
48
53
|
hideProductCheckbox?: boolean;
|
|
49
54
|
outOfStockAction?: OUT_OF_STOCK_ACTION;
|
|
50
55
|
hideVariantCheckbox?: boolean;
|
|
56
|
+
hideProductVariants?: boolean;
|
|
57
|
+
pickerType?: 'COLLECTION' | 'PRODUCT';
|
|
51
58
|
}
|
|
52
59
|
export declare const ProductCard: (props: ProductCardInterface) => import("react/jsx-runtime").JSX.Element;
|
|
53
60
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),i=require("../../assets/icons/box.svg.js"),o=require("../../assets/icons/search.svg.js"),c=require("lodash"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),i=require("../../assets/icons/box.svg.js"),o=require("../../assets/icons/search.svg.js"),c=require("lodash"),r=require("react"),d=require("../tag/Tag.js"),s=require("../../constants/Theme.js"),n=require("../checkBox/CheckBox.js"),l=require("../icon-button/IconButton.js"),a=require("../input/Input.js"),u=require("../shimmer/ShimmerComponent/BikShimmer.js"),h=require("../shimmer-image/ShimmerImage.js"),p=require("../spinner/Spinner.js"),v=require("../TypographyStyle.js"),j=require("./collectionScreen.js"),x=require("./emptyState.js"),y=require("./helpers/ProductHelper.js"),g=require("./reducers.js"),C=require("./style.js"),k=require("./type.js"),m=require("./utility.js");const b=t=>{const{collectionId:i,productId:o,data:c,selectedData:r,selectedCollectionsDispatch:d,viewOnly:s,upliftAdditions:n,isProductPartiallyChecked:l,hideProductCheckbox:a,outOfStockAction:u,hideVariantCheckbox:h,hideProductVariants:p,pickerType:v}=t,j=e=>{var t,c,d,s,n,l;if(!(null===(c=null===(t=null==r?void 0:r[i])||void 0===t?void 0:t.products)||void 0===c?void 0:c[o]))return!1;return!!(null===(l=null===(n=null===(s=null===(d=null==r?void 0:r[i])||void 0===d?void 0:d.products)||void 0===s?void 0:s[o])||void 0===n?void 0:n.variants)||void 0===l?void 0:l[e])};return e.jsxs("div",{children:[e.jsx(O,{isVariant:!1,data:c,productId:o,collectionId:i,isSelected:!!(null===(y=null===(x=null==r?void 0:r[i])||void 0===x?void 0:x.products)||void 0===y?void 0:y[o]),isPartiallyChecked:l,selectedCollectionsDispatch:d,upliftAdditions:n,viewOnly:s,hideProductCheckbox:a,hideVariantCheckbox:h,hideProductVariants:p,pickerType:v},o),p?null:Object.keys(c.variants||[]).map((t=>e.jsx(O,{isVariant:!0,hideVariantCheckbox:h,data:c.variants[t],variantId:t,productId:o,viewOnly:s,upliftAdditions:n,collectionId:i,isSelected:j(t),selectedCollectionsDispatch:d,outOfStockAction:u},t)))]});var x,y},O=t=>{const{isVariant:i,data:o,productId:c,collectionId:r,variantId:s,isSelected:l,selectedCollectionsDispatch:a,viewOnly:u,upliftAdditions:p,isPartiallyChecked:x,hideProductCheckbox:g,outOfStockAction:k,hideVariantCheckbox:m,hideProductVariants:b,pickerType:O}=t,I=y.ProductHelper.getProductLabels(o,k);return e.jsxs(C.ProductCardStyle,Object.assign({isVariant:i,onClick:e=>{"PRODUCT"===O&&b&&(e.stopPropagation(),a({type:"reset",data:{}}),p("variantSelected",{productId:c,variantId:s||Object.keys(o.variants)[0],collectionId:r,variant:o}))},isActive:l},{children:[i&&!u&&!m||!i&&!u&&!g?e.jsx(n.CheckBox,{isChecked:l,isPartiallyChecked:x||!1,onValueChange:function(e){i?e?p("variantSelected",{productId:c,variantId:s,collectionId:r,variant:o}):a({type:"variantUnselected",data:{productId:c,variantId:s,collectionId:r}}):e?p("productSelected",{productId:c,collectionId:r,product:o}):a({type:"productUnselected",data:{productId:c,collectionId:r}})}}):e.jsx(e.Fragment,{}),e.jsx("div",{children:e.jsx(h.ShimmerImage,{width:40,height:40,imageUrl:o.image,alt:"Item",borderRadius:4})}),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column"}},{children:[e.jsx(v.TitleRegular,{children:j.truncate(o.name,40,!0)}),I?e.jsx("div",Object.assign({style:{width:90,display:"flex"}},{children:e.jsx(d.Tag,{tagText:I,type:"warning",theme:"light"})})):e.jsx(e.Fragment,{})]}))]}))};exports.ProductCard=O,exports.ProductGroup=b,exports.ProductsScreen=d=>{const h=r.useContext(g.CollectionIdContext),{data:j,collectionsDispatch:y,selectedData:O,selectedCollectionsDispatch:I,productFetcher:S,storeId:f,setScreen:P,setSaveDisabled:q,hideInCollectionSearch:T,customCollectionRestriction:V,hideProductCheckbox:E,outOfStockAction:D=k.OUT_OF_STOCK_ACTION.BLUR,hideVariantCheckbox:w=!1,selectProductsFromCustomCollection:A=!1,pickerType:B,hideProductVariants:R}=d,[F,U]=r.useState(""),[_,H]=r.useState(!1),[L,K]=r.useState(j);r.useEffect((()=>{const e=setTimeout((()=>{F.length?(H(!0),d.searchInCollectionFetcher(f,h,F).then((e=>{var t;const i=c.cloneDeep(j);i.products={};for(const o of e)(null===(t=null==j?void 0:j.products)||void 0===t?void 0:t[o])&&(i.products[o]=j.products[o]);K(i),q(!1),H(!1)}))):K(j)}),800);return()=>clearTimeout(e)}),[F]);const N=!!V&&j.isSmartCollection,W=e=>{var t,i,o,c,r,d,s,n;let l=0,a=0;return!!((null===(i=null===(t=null==O?void 0:O[h])||void 0===t?void 0:t.products)||void 0===i?void 0:i[e])&&(null===(r=Object.keys((null===(c=null===(o=null==j?void 0:j.products)||void 0===o?void 0:o[e])||void 0===c?void 0:c.variants)||[]))||void 0===r||r.forEach((()=>a++)),Object.keys((null===(n=null===(s=null===(d=null==O?void 0:O[h])||void 0===d?void 0:d.products)||void 0===s?void 0:s[e])||void 0===n?void 0:n.variants)||[]).forEach((()=>l++)),l>0&&a!==l))};r.useEffect((()=>{(null==j?void 0:j.products)||z()}),[]);const z=()=>{q(!0),H(!0),S(h,f).then((e=>{Object.keys(e).length&&(y({type:"productsFetched",data:{collectionId:h,products:e}}),K(Object.assign(Object.assign({},L),{products:e}))),q(!1),H(!1)})).catch()},G=(e,t)=>{const i=m.liftTheStateUp(t,j);I({type:e,data:Object.assign(Object.assign({},i),{isRestricted:V})})};return e.jsxs("div",{children:[e.jsxs(C.ProductScreenHeader,{children:[e.jsx(l.IconButton,{Icon:t.default,height:16,onClick:()=>{P("collections")}}),e.jsx(v.BodyCaption,Object.assign({style:{color:s.COLORS.content.secondary}},{children:j.name}))]}),!T&&e.jsx("div",Object.assign({style:{padding:16,height:"76px",borderBottom:"1px solid #E0E0E0"}},{children:e.jsx(a.Input,{noKeyDownChange:!0,noErrorHint:!0,rightIcon:{icon:()=>_&&F.length?e.jsx(p.Spinner,{size:"small",color:s.COLORS.content.primary}):e.jsx(o.default,{})},id:"listInput",height:"24px",type:"text",value:F,onChangeText:e=>{e.length&&e.trim().length?U(e):U("")},placeholder:"Search products in this collection..."})})),e.jsxs("div",{children:[Object.keys((null==L?void 0:L.products)||[]).length>0&&!N&&!F.length&&!E&&e.jsxs(C.ProductScreenCollectionCardStyle,{children:[e.jsx(n.CheckBox,{isChecked:!!(null==O?void 0:O[h]),isPartiallyChecked:(e=>{var t;let i=0,o=0;if(O[e]){const c=null==j?void 0:j.products;c&&Object.keys(c).forEach((e=>{var t;const o=null===(t=c[e])||void 0===t?void 0:t.variants;o&&Object.keys(o).forEach((e=>i+=1))}));const r=null===(t=O[e])||void 0===t?void 0:t.products;return r&&Object.keys(r).forEach((e=>{var t;const i=null===(t=r[e])||void 0===t?void 0:t.variants;i&&Object.keys(i).forEach((()=>o+=1))})),o>0&&i!==o}return!1})(h),onValueChange:function(e){I(e?{type:"selected",data:{id:h,val:j}}:{type:"unselected",data:{id:h}})}}),e.jsx("div",Object.assign({style:{width:40,height:40}},{children:e.jsx(i.default,{})})),e.jsx(v.TitleRegular,{children:"All Products"})]}),Object.keys((null==L?void 0:L.products)||[]).length?Object.keys(L.products||[]).map((t=>e.jsx(b,{outOfStockAction:D,collectionId:h,isProductPartiallyChecked:W(t),productId:t,data:L.products[t],selectedData:O,selectedCollectionsDispatch:I,viewOnly:!A&&!!N,upliftAdditions:G,hideProductCheckbox:E,hideVariantCheckbox:w,hideProductVariants:R,pickerType:B},t))):_?[1,2,3,4,5,6,7,8,9,10].map(((t,i)=>e.jsx("div",Object.assign({style:{borderBottom:"1px solid #E0E0E0"}},{children:e.jsx(u.BikShimmer,{boxes:[{height:"64px",width:"100%",marginTop:"0px"}]})}),i))):e.jsx(x.EmptyState,{title:"No products to show",subtitle:F.length?"We couldn't find the product you were looking for":"We couldn’t find any product in this collection."})]})]})};
|
|
@@ -0,0 +1,18 @@
|
|
|
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 {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../assets/icons/arrow_left.svg.js"),r=require("react"),s=require("react-beautiful-dnd"),c=require("../../constants/Theme.js"),n=require("../icon-button/IconButton.js"),i=require("../TypographyStyle.js"),o=require("./emptyState.js"),a=require("./helpers/ProductHelper.js"),l=require("./style.js"),d=require("./variantComponents.js");exports.RearrangeScreen=u=>{const{selectedCollections:p,selectedCollectionsDispatch:j,setScreen:S,rearrangeViewType:h,outOfStockAction:y}=u,[x,q]=r.useState(a.parseSelectedVariantsToArray(p));r.useEffect((()=>{q(a.parseSelectedVariantsToArray(p))}),[p]);return e.jsxs(s.DragDropContext,Object.assign({onDragEnd:e=>{if(!e.destination)return;const t=x,[r]=t.splice(e.source.index,1);t.splice(e.destination.index,0,r),t.forEach(((e,t)=>{e.displayOrder=t})),q(t)}},{children:[e.jsxs(l.SelectedScreenHeader,{children:[e.jsx(n.IconButton,{Icon:t.default,width:16,height:16,color:c.COLORS.content.secondary,onClick:()=>{S("collections")}}),e.jsx(i.BodyCaption,Object.assign({color:c.COLORS.content.secondary},{children:"All Products"}))]}),Object.keys(p).length>0?"list"===h?e.jsx(d.VariantsList,{selectedVariants:x,setSelectedVariants:q,selectedCollectionsDispatch:j,outOfStockAction:y}):e.jsx(d.VariantsGrid,{selectedVariants:x,setSelectedVariants:q,selectedCollectionsDispatch:j}):e.jsx(o.EmptyState,{title:"No Products Selected",subtitle:"Selected products will appear here"})]}))};
|
|
@@ -2,6 +2,7 @@ export declare const ContainerStyle: import("styled-components").StyledComponent
|
|
|
2
2
|
export declare const ScrollContainerStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
3
3
|
export declare const CollectionCardStyle: import("styled-components").StyledComponent<"div", any, {
|
|
4
4
|
isDisabled: boolean;
|
|
5
|
+
isActive: boolean;
|
|
5
6
|
}, never>;
|
|
6
7
|
export declare const CollectionCardInfoStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
7
8
|
export declare const CollectionCardDetailStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -9,6 +10,10 @@ export declare const ProductScreenHeader: import("styled-components").StyledComp
|
|
|
9
10
|
export declare const ProductScreenCollectionCardStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
10
11
|
export declare const ProductCardStyle: import("styled-components").StyledComponent<"div", any, {
|
|
11
12
|
isVariant: boolean;
|
|
13
|
+
isActive: boolean;
|
|
12
14
|
}, never>;
|
|
13
15
|
export declare const SelectedScreenHeader: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
14
16
|
export declare const CollectionNameHolder: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
17
|
+
export declare const VariantCardListStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
18
|
+
export declare const VariantCardGridStyle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
19
|
+
export declare const StyledHeaderRightIcon: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("styled-components"),t=require("../../constants/Theme.js");function i(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=i(e);const l=o.default.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
background-color: white;
|
|
4
4
|
max-height: 600px;
|
|
5
5
|
min-height: 600px;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
`,r=
|
|
7
|
+
`,r=o.default.div`
|
|
8
8
|
overflow-y: scroll;
|
|
9
9
|
overflow-x: hidden;
|
|
10
|
-
`,
|
|
10
|
+
`,d=o.default.div`
|
|
11
11
|
height: 64px;
|
|
12
|
-
background-color: ${e=>e.isDisabled?"#F0F0F0":"white"};
|
|
12
|
+
background-color: ${e=>e.isDisabled?"#F0F0F0":e.isActive?t.COLORS.background.positive.light:"white"};
|
|
13
13
|
border-bottom: 1px solid #e0e0e0;
|
|
14
14
|
padding: 12px 24px;
|
|
15
15
|
display: flex;
|
|
@@ -17,17 +17,17 @@
|
|
|
17
17
|
column-gap: 16px;
|
|
18
18
|
justify-content: space-between;
|
|
19
19
|
align-items: center;
|
|
20
|
-
`,
|
|
20
|
+
`,n=o.default.div`
|
|
21
21
|
display: flex;
|
|
22
22
|
flex-direction: row;
|
|
23
23
|
justify-content: center;
|
|
24
24
|
align-items: center;
|
|
25
25
|
column-gap: 18px;
|
|
26
|
-
`,a=
|
|
26
|
+
`,a=o.default.div`
|
|
27
27
|
display: flex;
|
|
28
28
|
flex-direction: column;
|
|
29
29
|
justify-content: center;
|
|
30
|
-
`,
|
|
30
|
+
`,p=o.default.div`
|
|
31
31
|
display: flex;
|
|
32
32
|
flex-direction: row;
|
|
33
33
|
max-height: 32px;
|
|
@@ -37,16 +37,16 @@
|
|
|
37
37
|
align-items: center;
|
|
38
38
|
padding: 8px 16px;
|
|
39
39
|
margin-top: 16px;
|
|
40
|
-
`,x=
|
|
40
|
+
`,x=o.default.div`
|
|
41
41
|
display: flex;
|
|
42
42
|
flex-direction: row;
|
|
43
43
|
column-gap: 16px;
|
|
44
44
|
padding: 12px 16px;
|
|
45
45
|
border-bottom: 1px solid #e0e0e0;
|
|
46
46
|
align-items: center;
|
|
47
|
-
`,
|
|
47
|
+
`,c=o.default.div`
|
|
48
48
|
height: 64px;
|
|
49
|
-
background-color: white;
|
|
49
|
+
background-color: ${e=>e.isActive?t.COLORS.background.positive.light:"white"};
|
|
50
50
|
border-bottom: 1px solid #e0e0e0;
|
|
51
51
|
padding: 12px 16px;
|
|
52
52
|
display: flex;
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
justify-content: flex-start;
|
|
56
56
|
align-items: center;
|
|
57
57
|
padding-left: ${e=>e.isVariant?"42px":"16px"};
|
|
58
|
-
`,s=
|
|
58
|
+
`,s=o.default.div`
|
|
59
59
|
display: flex;
|
|
60
60
|
flex-direction: row;
|
|
61
61
|
max-height: 32px;
|
|
@@ -64,7 +64,39 @@
|
|
|
64
64
|
justify-content: flex-start;
|
|
65
65
|
align-items: center;
|
|
66
66
|
padding: 8px 16px;
|
|
67
|
-
`,f=
|
|
67
|
+
`,f=o.default.div`
|
|
68
68
|
display: flex;
|
|
69
69
|
flex-direction: column;
|
|
70
|
-
|
|
70
|
+
`,u=o.default.div`
|
|
71
|
+
height: 72px;
|
|
72
|
+
background: white;
|
|
73
|
+
padding: 12px 16px;
|
|
74
|
+
display: flex;
|
|
75
|
+
flex-direction: row;
|
|
76
|
+
gap: 16px;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: center;
|
|
79
|
+
|
|
80
|
+
.tooltip-title-tag {
|
|
81
|
+
display: flex;
|
|
82
|
+
flex: 1;
|
|
83
|
+
flex-direction: column;
|
|
84
|
+
gap: 2px;
|
|
85
|
+
}
|
|
86
|
+
`,g=o.default.div`
|
|
87
|
+
height: 72px;
|
|
88
|
+
width: 72px;
|
|
89
|
+
display: flex;
|
|
90
|
+
align-items: center;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
margin: 16px;
|
|
93
|
+
`;o.default.div`
|
|
94
|
+
display: flex;
|
|
95
|
+
width: 32px;
|
|
96
|
+
height: 32px;
|
|
97
|
+
padding: 6px;
|
|
98
|
+
justify-content: center;
|
|
99
|
+
align-items: center;
|
|
100
|
+
border: 1px solid ${t.COLORS.stroke.primary};
|
|
101
|
+
border-radius: 4px;
|
|
102
|
+
`,exports.CollectionCardDetailStyle=a,exports.CollectionCardInfoStyle=n,exports.CollectionCardStyle=d,exports.CollectionNameHolder=f,exports.ContainerStyle=l,exports.ProductCardStyle=c,exports.ProductScreenCollectionCardStyle=x,exports.ProductScreenHeader=p,exports.ScrollContainerStyle=r,exports.SelectedScreenHeader=s,exports.VariantCardGridStyle=g,exports.VariantCardListStyle=u;
|
|
@@ -0,0 +1,32 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
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"),l=require("../TypographyStyle.js"),n=require("./collectionScreen.js"),o=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:m,selectedCollectionsDispatch:j,outOfStockAction:g}=h,p=o.ProductHelper.getProductLabels(m,g),x=e=>{let t;return t=m.name.includes(m.productName)?m.name:`${m.productName} ${m.name}`,e?n.truncate(t,34,!0):t};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:m.image,alt:"Item",borderRadius:4},m.variantId)}),e.jsxs("div",Object.assign({className:"tooltip-title-tag"},{children:[e.jsx(c.Tooltip,Object.assign({body:x(!1),placement:"bottom",delay:400},{children:e.jsx(l.TitleRegular,{children:x(!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:()=>{j&&j({type:"variantUnselected",data:{productId:m.productId,variantId:m.variantId,collectionId:m.collectionId}}),h.onDelete&&h.onDelete()}})]})};
|
|
@@ -0,0 +1,21 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),a=require("react-beautiful-dnd"),s=require("../../constants/Theme.js"),t=require("./variant.js");exports.VariantsGrid=r=>{let{selectedVariants:s}=r;return e.jsx(a.Droppable,Object.assign({droppableId:"droppable-horizontal"},{children:r=>e.jsxs("div",Object.assign({},r.droppableProps,{ref:r.innerRef,style:Object.assign(Object.assign({},r.droppableProps.style),{display:"flex"})},{children:[e.jsx(a.Droppable,Object.assign({droppableId:"droppable-vertical",direction:"horizontal"},{children:r=>e.jsxs("div",Object.assign({},r.droppableProps,{ref:r.innerRef,style:Object.assign(Object.assign({},r.droppableProps.style),{display:"flex",flexWrap:"wrap",flexDirection:"row"})},{children:[s.map(((r,s)=>e.jsx(a.Draggable,Object.assign({draggableId:`${r.productId}-${r.variantId}`,index:s},{children:(a,s)=>e.jsxs("div",Object.assign({ref:a.innerRef},a.draggableProps,a.dragHandleProps,{children:[e.jsx(t.VariantCardGridView,{data:r}),a.placeholder]}))}),`${r.productId}-${r.variantId}`))),r.placeholder]}))})),r.placeholder]}))}))},exports.VariantsList=i=>{let{selectedVariants:n,setSelectedVariants:d,selectedCollectionsDispatch:l,outOfStockAction:o}=i;const[p,c]=r.useState(-1);function b(e){if(null==e?void 0:e.transform){const r=`translate(0px, ${e.transform.split(",").pop()}`;return Object.assign(Object.assign({},e),{transform:r})}return e}return e.jsx(a.Droppable,Object.assign({droppableId:"droppable-list"},{children:(r,i)=>e.jsxs("div",Object.assign({},r.droppableProps,{ref:r.innerRef,style:Object.assign({backgroundColor:s.COLORS.surface.subdued,padding:"0.05px",height:n.length<8?"550px":"100%"},r.droppableProps.style)},{children:[n.map(((r,i)=>e.jsx("div",Object.assign({style:{background:s.COLORS.surface.hovered,margin:"5px",boxShadow:i===p?"0px 4px 12px rgba(0, 0, 0, 0.12)":""},onMouseEnter:()=>c(i),onMouseLeave:()=>c(-1)},{children:e.jsx(a.Draggable,Object.assign({draggableId:`${r.productId}-${r.variantId}`,index:i},{children:(a,s)=>e.jsx("div",Object.assign({ref:a.innerRef},a.draggableProps,a.dragHandleProps,{style:b(Object.assign(Object.assign({},a.draggableProps.style),a.draggableSnapshot))},{children:e.jsx(t.VariantCardListView,{data:r,selectedCollectionsDispatch:l,onDelete:()=>{const e=n.slice();e[i].displayOrder=null,e.splice(i,1),d(e)},outOfStockAction:o},`${r.productId}-${r.variantId}`)}))}),`${r.productId}-${r.variantId}`)}),`${r.productId}-${r.variantId}`))),r.placeholder&&i.isDraggingOver?e.jsx("div",Object.assign({style:{background:s.COLORS.surface.hovered,margin:"5px"}},{children:r.placeholder})):null]}))}))};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './slider';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SliderBikProps {
|
|
3
|
+
min: number;
|
|
4
|
+
max: number;
|
|
5
|
+
defaultValue: number;
|
|
6
|
+
onChange: (event: Event) => void;
|
|
7
|
+
step?: number;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const BikSlider: React.FC<SliderBikProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("../../constants/Theme.js"),a=require("../../node_modules/@mui/material/styles/styled.js"),o=require("../../node_modules/@mui/material/Slider/Slider.js");const d=a.default(o.default)({marginTop:"30px",color:r.COLORS.background.brand,height:8,"& .MuiSlider-track":{border:"none"},"& .MuiSlider-thumb":{height:24,width:24,backgroundColor:r.COLORS.background.brand,border:`2px solid ${r.COLORS.background.brand}`,"&:hover":{boxShadow:"0px 0px 0px 8px rgba(115, 29, 207, 0.08)"},"&:focused":{boxShadow:"0px 0px 0px 8px rgba(115, 29, 207, 0.33)"},"&.Mui-active":{boxShadow:"0px 0px 0px 8px rgba(115, 29, 207, 0.5)"},"&.Mui-focusVisible":{boxShadow:"0px 0px 0px 8px rgba(115, 29, 207, 0.08)"},"&:before":{display:"none"}},"& .MuiSlider-valueLabel":{lineHeight:1.2,fontSize:12,background:"unset",padding:0,width:32,height:32,borderRadius:"50% 50% 50% 0",backgroundColor:r.COLORS.background.brand,transformOrigin:"bottom left",transform:"translate(50%, -100%) rotate(-45deg) scale(0)","&:before":{display:"none"},"&.MuiSlider-valueLabelOpen":{transform:"translate(50%, -100%) rotate(-45deg) scale(1)"},"& > *":{transform:"rotate(45deg)"}}});exports.BikSlider=r=>{let{min:a,max:o,defaultValue:i,onChange:t,step:l=1,disabled:n=!1}=r;return e.jsx(d,{valueLabelDisplay:"auto","aria-label":"bik slider",value:i,min:a,max:o,onChange:t,step:l,disabled:n})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../constants/Theme.js"),o=require("../../assets/icons/starEmpty.svg.js"),s=require("../../assets/icons/starFilled.svg.js");exports.Star=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),r=require("react"),t=require("../../constants/Theme.js"),o=require("../../assets/icons/starEmpty.svg.js"),s=require("../../assets/icons/starFilled.svg.js");exports.Star=l=>{let{size:n,filled:u,emptyColor:i,filledColor:a,onClick:c,asHovered:d,onHover:E,mode:f}=l;const[h,v]=r.useState(!1);return r.useEffect((()=>{null==E||E(h)}),[h]),r.useEffect((()=>{d||v(!1)}),[d]),d?e.jsx(s.default,{onClick:()=>{null==c||c("select")},onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),style:{cursor:"pointer"},width:n,height:n,color:null!=a?a:t.COLORS.background.warning.vibrant}):h?e.jsx(s.default,{onMouseLeave:()=>v(!1),onMouseEnter:()=>v(!0),style:{cursor:"pointer"},onClick:()=>{null==c||c("select")},width:n,height:n,color:null!=a?a:t.COLORS.background.warning.vibrant}):u?e.jsx(s.default,{onMouseEnter:()=>"VIEW"!==f&&v(!0),onMouseLeave:()=>"VIEW"!==f&&v(!1),style:{cursor:"VIEW"!==f?"pointer":"default"},onClick:()=>{"VIEW"!==f&&(null==c||c("de-select"))},width:n,height:n,color:null!=a?a:t.COLORS.background.warning.vibrant}):e.jsx(o.default,{onMouseEnter:()=>"VIEW"!==f&&v(!0),onMouseLeave:()=>"VIEW"!==f&&v(!1),style:{cursor:"VIEW"!==f?"pointer":"default"},onClick:()=>{"VIEW"!==f&&(null==c||c("select"))},width:n,height:n,color:null!=i?i:t.COLORS.surface.standard})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var g=require("@emotion/styled/base"),I=require("react/jsx-runtime"),C=require("react"),A=require("./Star.js");function c(g){return g&&"object"==typeof g&&"default"in g?g:{default:g}}const e=c(g).default("div","production"===process.env.NODE_ENV?{target:"e1yh3w250"}:{target:"e1yh3w250",label:"Container"})("production"===process.env.NODE_ENV?{name:"31c8wb",styles:"display:flex;flex-direction:row;gap:12px;justify-content:start;align-items:center"}:{name:"31c8wb",styles:"display:flex;flex-direction:row;gap:12px;justify-content:start;align-items:center",map:"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlN0YXJSYXRpbmcudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUk2QiIsImZpbGUiOiJTdGFyUmF0aW5nLnRzeCIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGpzeCBhcyBfanN4IH0gZnJvbSBcInJlYWN0L2pzeC1ydW50aW1lXCI7XHJcbmltcG9ydCBzdHlsZWQgZnJvbSAnQGVtb3Rpb24vc3R5bGVkJztcclxuaW1wb3J0IHsgdXNlRWZmZWN0LCB1c2VNZW1vLCB1c2VTdGF0ZSB9IGZyb20gJ3JlYWN0JztcclxuaW1wb3J0IHsgU3RhciB9IGZyb20gJy4vU3Rhcic7XHJcbmNvbnN0IENvbnRhaW5lciA9IHN0eWxlZC5kaXYgYFxuXHRkaXNwbGF5OiBmbGV4O1xuXHRmbGV4LWRpcmVjdGlvbjogcm93O1xuXHRnYXA6IDEycHg7XG5cdGp1c3RpZnktY29udGVudDogc3RhcnQ7XG5cdGFsaWduLWl0ZW1zOiBjZW50ZXI7XG5gO1xyXG5leHBvcnQgY29uc3QgU3RhclJhdGluZyA9ICh7IGVtcHR5Q29sb3IsIGZpbGxlZENvbG9yLCBvbkNoYW5nZSwgdmFsdWUsIG1heFZhbHVlLCBzdGFyU2l6ZSwgbW9kZSwgfSkgPT4ge1xyXG4gICAgY29uc3QgW3N0YXJzLCBzZXRTdGFyc10gPSB1c2VTdGF0ZSh2YWx1ZSAhPT0gbnVsbCAmJiB2YWx1ZSAhPT0gdm9pZCAwID8gdmFsdWUgOiAwKTtcclxuICAgIGNvbnN0IFttb3VudGVkLCBzZXRNb3VudGVkRmxhZ10gPSB1c2VTdGF0ZShmYWxzZSk7XHJcbiAgICBjb25zdCBbaG92ZXJlZFN0YXIsIHNldEhvdmVyZWRTdGFyXSA9IHVzZVN0YXRlKDApO1xyXG4gICAgY29uc3QgYXJyID0gdXNlTWVtbygoKSA9PiB7XHJcbiAgICAgICAgY29uc3QgbGltaXQgPSBtYXhWYWx1ZSAhPT0gbnVsbCAmJiBtYXhWYWx1ZSAhPT0gdm9pZCAwID8gbWF4VmFsdWUgOiA1O1xyXG4gICAgICAgIHJldHVybiBBcnJheShsaW1pdClcclxuICAgICAgICAgICAgLmZpbGwobnVsbClcclxuICAgICAgICAgICAgLm1hcCgoXywgaWR4KSA9PiBpZHggKyAxKTtcclxuICAgIH0sIFttYXhWYWx1ZV0pO1xyXG4gICAgdXNlRWZmZWN0KCgpID0+IHtcclxuICAgICAgICBpZiAobW91bnRlZCkge1xyXG4gICAgICAgICAgICBvbkNoYW5nZShzdGFycyk7XHJcbiAgICAgICAgfVxyXG4gICAgfSwgW3N0YXJzXSk7XHJcbiAgICB1c2VFZmZlY3QoKCkgPT4ge1xyXG4gICAgICAgIHNldE1vdW50ZWRGbGFnKHRydWUpO1xyXG4gICAgfSwgW10pO1xyXG4gICAgcmV0dXJuIChfanN4KENvbnRhaW5lciwgeyBjaGlsZHJlbjogYXJyLm1hcCgoaWR4KSA9PiAoX2pzeChTdGFyLCB7IGFzSG92ZXJlZDogaG92ZXJlZFN0YXIgPyBpZHggPD0gaG92ZXJlZFN0YXIgOiBmYWxzZSwgc2l6ZTogc3RhclNpemUgIT09IG51bGwgJiYgc3RhclNpemUgIT09IHZvaWQgMCA/IHN0YXJTaXplIDogMjQsIGZpbGxlZDogaG92ZXJlZFN0YXIgPyB1bmRlZmluZWQgOiBpZHggPD0gc3RhcnMsIGVtcHR5Q29sb3I6IGVtcHR5Q29sb3IsIGZpbGxlZENvbG9yOiBmaWxsZWRDb2xvciwgb25DbGljazogKGFjdGlvbikgPT4ge1xyXG4gICAgICAgICAgICAgICAgaWYgKGFjdGlvbiA9PT0gJ2RlLXNlbGVjdCcpIHtcclxuICAgICAgICAgICAgICAgICAgICBpZiAoaWR4IDwgc3RhcnMpIHtcclxuICAgICAgICAgICAgICAgICAgICAgICAgc2V0U3RhcnMoaWR4KTtcclxuICAgICAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgICAgIHNldFN0YXJzKGlkeCAtIDEpO1xyXG4gICAgICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIH1cclxuICAgICAgICAgICAgICAgIGVsc2Uge1xyXG4gICAgICAgICAgICAgICAgICAgIHNldFN0YXJzKGlkeCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sIG9uSG92ZXI6IChob3ZlcmVkKSA9PiB7XHJcbiAgICAgICAgICAgICAgICBpZiAoaG92ZXJlZClcclxuICAgICAgICAgICAgICAgICAgICBzZXRIb3ZlcmVkU3RhcihpZHgpO1xyXG4gICAgICAgICAgICAgICAgZWxzZSB7XHJcbiAgICAgICAgICAgICAgICAgICAgc2V0SG92ZXJlZFN0YXIoMCk7XHJcbiAgICAgICAgICAgICAgICB9XHJcbiAgICAgICAgICAgIH0sIG1vZGU6IG1vZGUgfSwgaWR4KSkpIH0pKTtcclxufTtcclxuLy8jIHNvdXJjZU1hcHBpbmdVUkw9U3RhclJhdGluZy5qcy5tYXAiXX0= */",toString:function(){return"You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."}});exports.StarRating=g=>{let{emptyColor:c,filledColor:l,onChange:t,value:i,maxValue:Z,starSize:b,mode:G}=g;const[a,X]=C.useState(null!=i?i:0),[s,o]=C.useState(!1),[d,n]=C.useState(0),u=C.useMemo((()=>Array(null!=Z?Z:5).fill(null).map(((g,I)=>I+1))),[Z]);return C.useEffect((()=>{s&&t(a)}),[a]),C.useEffect((()=>{o(!0)}),[]),I.jsx(e,{children:u.map((g=>I.jsx(A.Star,{asHovered:!!d&&g<=d,size:null!=b?b:24,filled:d?void 0:g<=a,emptyColor:c,filledColor:l,onClick:I=>{X("de-select"===I?g<a?g:g-1:g)},onHover:I=>{n(I?g:0)},mode:G},g)))})};
|
|
@@ -24,5 +24,6 @@ export interface TemplateContextMapperProps {
|
|
|
24
24
|
discountCode?: string;
|
|
25
25
|
setDiscountCode?: (code: string) => void;
|
|
26
26
|
enabledCustomText?: boolean;
|
|
27
|
+
disableEditVariable?: boolean;
|
|
27
28
|
}
|
|
28
|
-
export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
29
|
+
export declare const TemplateContextMapper: ({ selectedTemplate, closeDialog, showVariableMapping, channel, htmlContent, templateVariables, onTemplateSelect, globalPlaceholders, showOnlyContent, whatsappSpecificPickerMeta, zIndex, showVariableModal, variableList, discountCode, setDiscountCode, onBackPress, enabledCustomText, disableEditVariable, }: TemplateContextMapperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("../../utils/StringUtils.js"),a=require("../modals/styledModal.js"),s=require("../template-preview/models/Channels.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("../../utils/StringUtils.js"),a=require("../modals/styledModal.js"),s=require("../template-preview/models/Channels.js"),i=require("./context/templateModalContext.js"),o=require("./modalElements/Footer.js"),r=require("./modalElements/TemplateSelectModalContent.js"),n=require("./utils/convertPlaceholdersToBikDropdown.js");exports.TemplateContextMapper=d=>{let{selectedTemplate:c,closeDialog:u,showVariableMapping:p,channel:m,htmlContent:b,templateVariables:h,onTemplateSelect:C,globalPlaceholders:g,showOnlyContent:S,whatsappSpecificPickerMeta:T,zIndex:v,showVariableModal:E,variableList:j,discountCode:x,setDiscountCode:M,onBackPress:P,enabledCustomText:L,disableEditVariable:f}=d;var w,q;t.useEffect((()=>{V(b)}),[b]);const[y,A]=t.useState(m===s.CHANNEL_TYPE.EMAIL?"desktop":"mobile"),[N,V]=t.useState(b),[k,D]=t.useState(!1),[_,H]=t.useState(c),[I,O]=t.useState(null!=h?h:[]),[B,Y]=t.useState(!1);const z=t.useMemo((()=>n.convertPlaceholdersToBikDropdown(g)),[g]);return e.jsx(i.TemplateModalContext.Provider,Object.assign({value:{template:_,setTemplate:H,device:y,setDevice:A,display_content:N,setDisplayContent:V,originalVariableList:I,setOriginalVariableList:O,isError:k,setIsError:D,channel:m,globalNormalizedPlaceholders:z,templateSelectionTriggered:B,setTemplateSelectionTriggered:Y,enabledCustomText:L,disableEditVariable:f}},{children:S?e.jsx(r.default,{channel:s.CHANNEL_TYPE.EMAIL,hideHeader:!0}):e.jsxs(a.StyledModal,Object.assign({zIndex:v,centralContainerStyles:{width:m===s.CHANNEL_TYPE.EMAIL&&p?1e3:650},open:!0,onClose:()=>{null==u||u()},headingTitle:null==_?void 0:_.label,headingSubtitle:m===s.CHANNEL_TYPE.WHATSAPP?`${l.default.capitaliseFirstLetterOfString(null!==(w=null==_?void 0:_.category)&&void 0!==w?w:"")} • ${null!==(q=null==_?void 0:_.templateCategory)&&void 0!==q?q:""}`:"",onBackPress:()=>{null==P||P()}},{children:[e.jsx(r.default,{showVariableMapping:p,channel:m,whatsappSpecificPickerMeta:T,showVariableModal:E,variableList:j,discountCode:x,setDiscountCode:M}),C?e.jsx(o.default,{onSelect:function(){const e=null==C?void 0:C(_,I,null!=N?N:"");e?D(!!e):Y(!0)}}):e.jsx(e.Fragment,{})]}))}))};
|
|
@@ -22,6 +22,7 @@ export declare const TemplateModalContext: React.Context<{
|
|
|
22
22
|
templateSelectionTriggered: boolean;
|
|
23
23
|
setTemplateSelectionTriggered?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
24
24
|
enabledCustomText?: boolean | undefined;
|
|
25
|
+
disableEditVariable?: boolean | undefined;
|
|
25
26
|
}>;
|
|
26
27
|
export declare const useTemplateModalContext: () => {
|
|
27
28
|
device: DEVICE_TYPES;
|
|
@@ -40,4 +41,5 @@ export declare const useTemplateModalContext: () => {
|
|
|
40
41
|
templateSelectionTriggered: boolean;
|
|
41
42
|
setTemplateSelectionTriggered?: React.Dispatch<React.SetStateAction<boolean>> | undefined;
|
|
42
43
|
enabledCustomText?: boolean | undefined;
|
|
44
|
+
disableEditVariable?: boolean | undefined;
|
|
43
45
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../template-preview/models/Channels.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("../../template-preview/models/Channels.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const a=l(e).default.createContext({device:"desktop",templateSelectionTriggered:!1,display_content:null,originalVariableList:[],channel:t.CHANNEL_TYPE.EMAIL,template:null,isError:!1,enabledCustomText:!1,disableEditVariable:!1});exports.TemplateModalContext=a,exports.useTemplateModalContext=()=>e.useContext(a);
|
|
@@ -6,6 +6,7 @@ export interface EditMediaV2Props {
|
|
|
6
6
|
isLoading?: boolean;
|
|
7
7
|
mediaType?: HEADER_TYPES;
|
|
8
8
|
handleImageChange?: () => void;
|
|
9
|
+
disableEditVariable?: boolean;
|
|
9
10
|
}
|
|
10
11
|
declare const EditMediaV2: (props: EditMediaV2Props) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default EditMediaV2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/document_pdf.svg.js"),i=require("../../../assets/icons/edit.svg.js"),s=require("../../../assets/icons/refresh.svg.js"),r=require("../../../assets/icons/video_camcorder.svg.js"),n=require("styled-components"),o=require("../../spinner/Spinner.js"),l=require("../../template-preview/models/TemplateMeta.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("../../../assets/icons/document_pdf.svg.js"),i=require("../../../assets/icons/edit.svg.js"),s=require("../../../assets/icons/refresh.svg.js"),r=require("../../../assets/icons/video_camcorder.svg.js"),n=require("styled-components"),o=require("../../spinner/Spinner.js"),l=require("../../template-preview/models/TemplateMeta.js"),a=require("../../TypographyStyle.js"),d=require("../../../utils/StringUtils.js"),c=require("../../../constants/Theme.js"),h=require("./EditMediaV2.style.js");function g(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}const j=g(n).default.div`
|
|
2
2
|
padding-left: 14px;
|
|
3
3
|
padding-right: 6px;
|
|
4
4
|
width: 44px;
|
|
5
5
|
height: 24px;
|
|
6
6
|
border-left: 1px solid ${c.COLORS.stroke.primary};
|
|
7
7
|
cursor: pointer;
|
|
8
|
-
`;exports.default=n=>{const{imageName:g,error:u,isLoading:p,mediaType:x,handleImageChange:y}=n,
|
|
8
|
+
`;exports.default=n=>{const{imageName:g,error:u,isLoading:p,mediaType:x,handleImageChange:y,disableEditVariable:O}=n,m=null==g?void 0:g[0].split("/"),f=null==m?void 0:m[m.length-1];return e.jsxs(h.Container,{children:[e.jsx(h.ImageContainer,Object.assign({error:!!u,onClick:u?y:void 0},{children:u?e.jsx(s.default,{color:c.COLORS.content.brand,width:32,height:32}):p?e.jsx(o.Spinner,{size:"small"}):x===l.HEADER_TYPES.IMAGE?e.jsx("img",{alt:"",src:null==g?void 0:g[0],style:{width:"100%",height:"56px",borderRadius:8,objectFit:"cover"}}):x===l.HEADER_TYPES.VIDEO?e.jsx(r.default,{width:18,height:22,color:c.COLORS.content.placeholder}):e.jsx(t.default,{width:18,height:22,color:c.COLORS.content.placeholder})})),e.jsxs(h.RightComponent,{children:[e.jsx("div",Object.assign({style:{flex:1}},{children:g&&u?e.jsx(e.Fragment,{}):p?e.jsx(a.BodyCaption,Object.assign({style:{marginLeft:8}},{children:"Your media is getting loaded..."})):e.jsx(a.BodySecondary,Object.assign({style:{color:c.COLORS.content.primary,marginLeft:8}},{children:d.default.toCapitilize(null==x?void 0:x.toLowerCase())||f}))})),!!u&&e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"column",marginLeft:8}},{children:[e.jsxs(a.BodySecondary,Object.assign({style:{color:c.COLORS.content.negative}},{children:["Error loading this ",null==x?void 0:x.toLowerCase(),". Retry"]})),e.jsx(a.Caption,Object.assign({style:{color:c.COLORS.content.secondary}},{children:u}))]})),!O&&!u&&!p&&e.jsx(j,Object.assign({onClick:y,onKeyDown:y,role:"presentation"},{children:e.jsx(i.default,{width:24,height:24,color:c.COLORS.content.placeholder})}))]})]})};
|
package/dist/cjs/components/template-context-mapper/modalElements/EditWhatsAppTemplateMediaV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../../../_virtual/_tslib.js"),t=require("react/jsx-runtime"),i=require("react"),r=require("../../helpers/FileUploaderHelper.js"),a=require("../../image-cropper/BikImageCropper.js");require("../../image-compress/ImageCompress.js"),require("../../states/StateComponent.js"),require("../../../constants/zindex.js"),require("../../modals/styledModal.js"),require("../../spinner/Spinner.js");var o=require("../../template-preview/models/TemplateMeta.js"),l=require("../context/templateModalContext.js"),n=require("./EditMediaV2.js");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=s(i);exports.default=s=>{let{mediaComponent:u,template:c,updateTemplateImageUrl:p,whatsappSpecificPickerMeta:m}=s;var f,v;const{disableEditVariable:E}=l.useTemplateModalContext(),[j,g]=i.useState(void 0),[_,h]=i.useState(),C=d.default.createRef(),[q,S]=i.useState(!1),[x,A]=i.useState("");function M(t){var i;return e.__awaiter(this,void 0,void 0,(function*(){const e=new r.FileUploaderHelper;if(t instanceof Blob){const r=e.validate(t);if(r)A(r),S(!1);else{const e=u.format===o.HEADER_TYPES.IMAGE,r=yield m.uploadMediaFiles({file:t,fileName:j,isImage:e});if(r.success){const[e]=t.type.split("/");p(null!==(i=r.url)&&void 0!==i?i:"","application"===e?o.HEADER_TYPES.DOCUMENT:o.HEADER_TYPES[e.toUpperCase()])}else A("An unknown technical error occured");S(!1)}}else A("An unknown technical error occured"),S(!1)}))}let y;return y=u.format===o.HEADER_TYPES.IMAGE?"image/png, image/jpeg":u.format===o.HEADER_TYPES.VIDEO?"video/mp4":"application/pdf",t.jsxs(t.Fragment,{children:[!!_&&t.jsx(a.BikImageCropper,{aspectRatio:15/8,src:_,onCropComplete:function(t){return e.__awaiter(this,void 0,void 0,(function*(){S(!1),A("");const e=yield fetch(t);M(yield e.blob()).then((()=>{h(void 0)}))}))},onCancel:()=>{S(!1),h("")}}),t.jsx("input",{ref:C,style:{display:"none"},type:"file",onChange:function(e){var t;A(""),S(!0);const i=null===(t=e.target.files)||void 0===t?void 0:t[0];if(u.format===o.HEADER_TYPES.IMAGE){const e=new FileReader;h(""),g(""),e.onload=()=>{h(e.result),g(null==i?void 0:i.name)},i&&e.readAsDataURL(i)}else M(i)},accept:y}),t.jsx(n.default,{imageName:null!==(v=null===(f=null==u?void 0:u.example)||void 0===f?void 0:f.header_handle)&&void 0!==v?v:[],handleImageChange:function(){var e;(null===(e=null==C?void 0:C.current)||void 0===e?void 0:e.click)&&C.current.click()},mediaType:null==u?void 0:u.format,error:x,isLoading:q,disableEditVariable:E})]})};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
position: relative;
|
|
3
3
|
height: 100%;
|
|
4
4
|
border-radius: 31px;
|
|
5
|
-
width: ${e=>e.channel===r.CHANNEL_TYPE.WHATSAPP?"236px":"
|
|
5
|
+
width: ${e=>e.channel===r.CHANNEL_TYPE.WHATSAPP?"236px":"300px"};
|
|
6
6
|
background-color: white;
|
|
7
7
|
margin: auto;
|
|
8
8
|
overflow-y: auto;
|
|
@@ -17,4 +17,4 @@
|
|
|
17
17
|
height: calc(100% - 17px);
|
|
18
18
|
border-radius: 16px;
|
|
19
19
|
overflow-y: auto;
|
|
20
|
-
`,
|
|
20
|
+
`,d=s.default.forwardRef(((t,i)=>{let{display_content:o,channel:s,template:l}=t;return e.jsx("div",{children:e.jsxs(p,Object.assign({channel:s},{children:[e.jsx("img",{alt:"",src:"https://firebasestorage.googleapis.com/v0/b/staging-bikayi.appspot.com/o/bik%2FkNwEVoGlLpVjOsXoO1M8WgvWicP2%2F6f07b850-8b4b-4d58-96cc-8ba6df7b4e4a-Device___Frame.jpg?alt=media&token=253f1bfe-8481-4f54-bdef-3c0a73697d6a",style:{width:s===r.CHANNEL_TYPE.WHATSAPP?236:300,height:443}}),e.jsx(n,Object.assign({ref:i},{children:e.jsx(a.TemplatePreview,{template:l,channel:s,smsSpecificMeta:{smsDisplayContent:o},whatsAppSpecificMeta:{showWhatsAppHeader:!0,whatsAppExtras:!0,containerStyle:{border:"none",borderBottomRightRadius:0,borderBottomLeftRadius:0,minHeight:426}},size:"small",hideHeader:!0,emailSpecificMeta:{emailDisplayContent:o,hideViewButtonForEmail:!0,emailHtmlContainerId:"template_html_mobile",containerStyle:{height:"100%",width:"100%"},templateContainerStyles:{height:"100%"}}})}))]}))})}));d.displayName="MobilePreview",exports.default=d;
|
package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorWhatsApp.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../../input/Input.js"),r=require("../../TypographyStyle.js"),t=require("../../../constants/Theme.js"),i=require("../context/templateModalContext.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../../input/Input.js"),r=require("../../TypographyStyle.js"),t=require("../../../constants/Theme.js"),i=require("../context/templateModalContext.js"),l=require("./VariableConnector.js");exports.default=s=>{let{descriptionComponent:n,type:o,showVariableModal:d,variableList:p}=s;var u;const{originalVariableList:b,disableEditVariable:c}=i.useTemplateModalContext();return"BODY"===n.type?e.jsx("div",{children:null===(u=null==b?void 0:b.body)||void 0===u?void 0:u.map(((i,s)=>c||!i.isEditableVariable?e.jsxs("div",Object.assign({style:{margin:"16px 8px"}},{children:[e.jsxs(r.BodySecondary,Object.assign({style:{color:t.COLORS.content.primary}},{children:["HEADER"===o?"Header":""," Locked variable ",s+1]})),e.jsx(a.Input,{state:"disabled",placeholder:i.variableName,onChangeText:()=>{}})]}),s):e.jsx(l.default,{index:s,variable:i,showVariableModal:d,variableList:p},`${s}-${i.index}`)))}):e.jsx(e.Fragment,{})};
|
package/dist/cjs/components/template-context-mapper/modalElements/VariableConnectorsPanel.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../../../assets/icons/info.svg.js"),t=require("react"),i=require("styled-components"),r=require("../../add-variableV2/AddVariableV2SideModal.js")
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),a=require("../../../assets/icons/info.svg.js"),t=require("react"),i=require("styled-components"),r=require("../../add-variableV2/AddVariableV2SideModal.js");require("../../../_virtual/_tslib.js");var s=require("../../../assets/icons/plus.svg.js");require("../../add-variableV2/AddVariableV2.styled.js"),require("../../button/Button.js"),require("../../icon-button/IconButton.js");var l=require("../../input/Input.js"),n=require("../../tooltips/Tooltip.js"),o=require("../../../constants/Theme.js");require("../../switch/Switch.js");var d=require("../../TypographyStyle.js"),c=require("../../checkBox/CheckBox.js"),u=require("../context/templateModalContext.js"),h=require("./VariableConnector.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=x(i);const j=b.default.div`
|
|
2
2
|
overflow-y: auto;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
height: 100%;
|
|
6
|
-
`,
|
|
6
|
+
`,p=b.default.button`
|
|
7
7
|
padding: 2px 8px;
|
|
8
8
|
cursor: pointer;
|
|
9
9
|
color: white;
|
|
@@ -25,4 +25,4 @@
|
|
|
25
25
|
display: flex;
|
|
26
26
|
align-items: center;
|
|
27
27
|
}
|
|
28
|
-
`;exports.AddVariableStyled=
|
|
28
|
+
`;exports.AddVariableStyled=p,exports.Container=j,exports.default=i=>{let{onFocus:x,showVariableModal:b,variableList:g,discountCode:f,setDiscountCode:v}=i;const{originalVariableList:y,disableEditVariable:m}=u.useTemplateModalContext(),[V,O]=t.useState(!1),[S,q]=t.useState(!1),[w,C]=t.useState(!1),[k,T]=t.useState(""),[B,L]=t.useState(!1),E=t.useRef(),A=t.useRef();return t.useEffect((()=>{v&&v(f+k)}),[k]),t.useEffect((()=>{y.forEach((e=>{"checkout.checkoutUrl"===e.updatedValue.replace("{{","").replace("}}","")&&(O(!0),f&&L&&L(!0))}))}),[y]),e.jsxs(j,{children:[e.jsxs("div",Object.assign({style:{padding:8}},{children:[e.jsxs("div",Object.assign({style:{display:"flex",gap:8,alignItems:"center",marginBottom:4}},{children:[e.jsx(d.TitleRegular,Object.assign({style:{color:o.COLORS.content.primary}},{children:"Edit variables and links"})),e.jsx(n.Tooltip,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:e.jsx("div",Object.assign({style:{display:"flex"}},{children:e.jsx(a.default,{width:20,height:20,color:o.COLORS.content.placeholder})}))}))]})),e.jsx(d.BodySecondary,Object.assign({style:{color:o.COLORS.content.secondary}},{children:"You can view variables and links on the left underlined in purple colour."}))]})),null==y?void 0:y.map(((a,t)=>!a.isEditableVariable||m?e.jsxs("div",Object.assign({style:{margin:"16px 8px"}},{children:[e.jsxs(d.BodySecondary,Object.assign({style:{color:o.COLORS.content.primary}},{children:["Locked variable ",t+1]})),e.jsx(l.Input,{state:"disabled",placeholder:a.variableName,onChangeText:()=>{}})]}),t):e.jsx("div",Object.assign({style:{marginTop:16}},{children:e.jsx(h.default,{index:t,variable:a,onFocus:()=>null==x?void 0:x(t),showVariableModal:b,variableList:g,setShowDiscountCheckBox:O})}),t))),(V||f)&&e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",marginLeft:10,marginTop:8}},{children:[e.jsx(c.CheckBox,{isChecked:B,onValueChange:()=>{B&&v&&v(""),L(!B)}}),e.jsx(d.TitleSmall,Object.assign({style:{marginLeft:8}},{children:"Add discount code"}))]})),B&&e.jsxs("div",Object.assign({ref:E,style:{margin:10}},{children:[e.jsx(l.Input,{placeholder:"Enter your discount code",onChangeText:e=>{v&&v(e)},value:f,onFocus:()=>{q(!0)},onBlur:e=>{var a;"addVar"===(null===(a=e.relatedTarget)||void 0===a?void 0:a.id)?(E.current&&E.current.focus(),q(!0)):(q(!1),C(!1))},noErrorHint:!0,validate:e=>[!0,""]}),S&&e.jsx(p,Object.assign({ref:A,id:"addVar",onClick:e=>{e.stopPropagation(),C(!0)}},{children:e.jsxs("div",Object.assign({className:"add"},{children:[e.jsx(s.default,{width:20,height:20,color:"white"}),e.jsx("div",Object.assign({className:"variable"},{children:"Add variable"}))]}))}))]})),w&&e.jsx(r.AddVariableV2SideModal,{zIndex:2e3,data:null!=g?g:[],showVariable:w,setShowVariable:C,variableValue:k,setVariableValue:T,placeholder:"Add a variable",customTrigger:e=>{T(e.actualValue),q(!1)}})]})};
|
package/dist/cjs/components/template-context-mapper/modalElements/WhatsAppTemplateCardButtonV2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("../../dropdown/Dropdown.js"),a=require("../../input/Input.js"),s=require("../../template-preview/constants/regexPatterns.js"),n=require("../../template-preview/models/TemplateMeta.js"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),t=require("react"),l=require("../../dropdown/Dropdown.js"),a=require("../../input/Input.js"),s=require("../../template-preview/constants/regexPatterns.js"),n=require("../../template-preview/models/TemplateMeta.js"),i=require("../../template-preview/models/WhatsAppTemplate.js"),r=require("../../TypographyStyle.js"),o=require("../../../constants/Theme.js"),d=require("../context/templateModalContext.js"),u=require("../utils/validateIsUrl.js"),p=require("./VariableConnector.js");exports.default=c=>{let{button:b,updateSelectedURLTemplateBtn:m,updateSelectedQRBTemplateBtn:j,originalVariableList:x,CTAoptions:v,QRBoptions:y}=c;const[f,g]=t.useState(""),[h,O]=t.useState(),{setOriginalVariableList:R,isError:U,disableEditVariable:L}=d.useTemplateModalContext();function T(e){g(e);const t=[Object.assign(Object.assign({},x.buttons[0]),{type:i.BUTTON_TYPE.URL,buttonVariable:"((customPlaceholderName))",example:[`https://${e}`]})];null==R||R({body:[...x.body],buttons:[...t]}),null==m||m(`https://${e}`,"custom")}return t.useEffect((()=>{var e;if(b.buttonVariable&&s.editableVarPattern.test(b.buttonVariable))O(n.CUSTOM_URL_NAME),g((null===(e=b.example)||void 0===e?void 0:e[0].split("https://")[1])||"");else{let e=-1;const t="URL"===b.type?v:y;e="URL"===b.type?t.findIndex((e=>e.placeHolder===b.buttonVariable)):t.findIndex((e=>e.label===b.flowName)),e>-1&&O(t[e])}}),[]),e.jsxs(p.Container,{children:[e.jsx("div",Object.assign({style:{marginBottom:8}},{children:e.jsxs(r.BodySecondary,Object.assign({style:{color:o.COLORS.content.primary}},{children:[b.text," button"]}))})),e.jsx("div",Object.assign({style:{marginBottom:12}},{children:e.jsx(l.Dropdown,{disabled:L,options:"URL"===b.type?v:y,isSearchable:!1,onSelect:function(e,t){const l=e;O(l);const a=("URL"===b.type?v:y).find((e=>e.placeHolder===l.placeHolder));if(a)if("custom_link"!==a.value){let e;"URL"===b.type?(e=[Object.assign(Object.assign({},x.buttons[0]),{type:"URL",buttonVariable:l.placeHolder,example:["https://bik.ai/"]})],null==m||m({defaultValue:a.value,placeHolder:a.placeHolder},"placeholder")):(e=x.buttons.map(((e,t)=>t===b.index?Object.assign(Object.assign({},e),{type:"QUICK_REPLY",flowName:l.label,flowId:l.value}):e)),null==j||j({flowName:l.label,flowId:l.value},"placeholder",b.index)),null==R||R({body:[...x.body],buttons:[...e]})}else T("")},defaultOptions:h?[Object.assign(Object.assign({},h),{selected:!0})]:[]})})),"custom_link"===(null==h?void 0:h.value)&&e.jsx("div",Object.assign({style:{marginBottom:20}},{children:e.jsx(a.Input,{state:L?"disabled":"none",errorMessage:U?f?u.validateIsUrl(f)?"":"Enter valid URL":"Required field":"",value:f,prefixText:"custom_link"===(null==h?void 0:h.value)?"https://":"",placeholder:"Enter custom URL here",onChangeText:T})}))]})};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/arrow_left.svg.js"),r=require("../../assets/icons/more_vertical.svg.js"),t=require("../../assets/icons/search.svg.js"),i=require("../../constants/Theme.js"),l=require("../TypographyStyle.js"),n=require("./helpers/SmsTemplateHelper.js"),a=require("./SMS/SMSBubble.js"),o=require("./SmsTemplatePreview.styled.js");exports.default=d=>{let{template:c,variableStore:
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react/jsx-runtime"),s=require("../../assets/icons/arrow_left.svg.js"),r=require("../../assets/icons/more_vertical.svg.js"),t=require("../../assets/icons/search.svg.js"),i=require("../../constants/Theme.js"),l=require("../TypographyStyle.js"),n=require("./helpers/SmsTemplateHelper.js"),a=require("./SMS/SMSBubble.js"),o=require("./SmsTemplatePreview.styled.js");exports.default=d=>{let{template:c,variableStore:u,hideHeader:j,display_content:h,onlyTemplateContent:x,size:g}=d;var p;const S=null==c?void 0:c.content;return e.jsxs(e.Fragment,{children:[!j&&!x&&e.jsx(o.SMSCardHeader,{children:e.jsx(l.TitleRegular,Object.assign({style:{maxWidth:"100%"}},{children:c.name}))}),!x&&e.jsx(o.SMSHeader,{children:e.jsxs(e.Fragment,{children:[e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e.jsx(s.default,{width:16,height:16,color:i.COLORS.content.secondary}),e.jsx(l.Caption,{children:null===(p=null==c?void 0:c.headers)||void 0===p?void 0:p[0]})]})),e.jsxs("div",Object.assign({style:{display:"flex",flexDirection:"row",gap:8}},{children:[e.jsx(t.default,{width:16,height:16,color:i.COLORS.content.secondary}),e.jsx(r.default,{width:16,height:16,color:i.COLORS.content.secondary})]}))]})}),e.jsx(o.SMSBubbleContainer,Object.assign({size:g},{children:e.jsx(a.default,{size:null!=g?g:"large",content:null!=h?h:n.renderVariableUIForPreview(S,null!=u?u:[])})}))]})};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SIZE } from "../avatar";
|
|
3
|
+
export interface TestimonialCardProps {
|
|
4
|
+
testimonial: string;
|
|
5
|
+
ratingValue: number;
|
|
6
|
+
reviewerName: string;
|
|
7
|
+
avatarUrl: string;
|
|
8
|
+
reviewerCaption?: string;
|
|
9
|
+
ratingMaxValue?: number;
|
|
10
|
+
avatarSize?: SIZE;
|
|
11
|
+
width?: string;
|
|
12
|
+
height?: string;
|
|
13
|
+
}
|
|
14
|
+
export declare const TestimonialCard: React.FC<TestimonialCardProps>;
|