@megafon/ui-shared 2.0.0-beta.24 → 2.0.0-beta.240
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/CHANGELOG.md +2292 -0
- package/README.md +0 -5
- package/dist/es/components/AccordionBox/AccordionBox.css +13 -0
- package/dist/es/components/AccordionBox/AccordionBox.d.ts +33 -0
- package/dist/es/components/AccordionBox/AccordionBox.js +62 -0
- package/dist/es/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/es/components/BannerBox/BannerBox.js +31 -0
- package/dist/es/components/BenefitsIcons/BenefitsIcons.d.ts +16 -5
- package/dist/es/components/BenefitsIcons/BenefitsIcons.js +79 -14
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.d.ts +3 -2
- package/dist/es/components/BenefitsIcons/BenefitsIconsTile.js +13 -12
- package/dist/es/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
- package/dist/es/components/BenefitsIcons/style/BenefitsIconsTile.css +11 -4
- package/dist/es/components/BenefitsIcons/types.d.ts +16 -7
- package/dist/es/components/BenefitsIcons/types.js +9 -7
- package/dist/es/components/BenefitsPictures/BenefitsPictures.d.ts +12 -3
- package/dist/es/components/BenefitsPictures/BenefitsPictures.js +25 -11
- package/dist/es/components/BenefitsPictures/BenfitsPictures.css +1 -1
- package/dist/es/components/BenefitsPictures/types.d.ts +3 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.css +46 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/es/components/Breadcrumbs/Breadcrumbs.js +49 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.css +122 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.d.ts +54 -0
- package/dist/es/components/ButtonBanner/ButtonBanner.js +107 -0
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.d.ts +32 -8
- package/dist/es/components/ButtonLinkBox/ButtonLinkBox.js +45 -10
- package/dist/es/components/Card/Card.css +130 -0
- package/dist/es/components/Card/Card.d.ts +67 -0
- package/dist/es/components/Card/Card.js +176 -0
- package/dist/es/components/CardsBox/CardsBox.d.ts +15 -0
- package/dist/es/components/CardsBox/CardsBox.js +80 -0
- package/dist/es/components/CarouselBox/CarouselBox.d.ts +5 -0
- package/dist/es/components/CarouselBox/CarouselBox.js +31 -0
- package/dist/es/components/Container/Container.css +2830 -0
- package/dist/es/components/Container/Container.d.ts +26 -0
- package/dist/es/components/Container/Container.js +46 -0
- package/dist/es/components/DownloadLinks/DownloadLink.css +36 -0
- package/dist/es/components/DownloadLinks/DownloadLink.d.ts +25 -0
- package/dist/es/components/DownloadLinks/DownloadLink.js +62 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.css +36 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.d.ts +10 -0
- package/dist/es/components/DownloadLinks/DownloadLinks.js +75 -0
- package/dist/es/components/Instructions/Instructions.css +489 -0
- package/dist/es/components/Instructions/Instructions.d.ts +52 -0
- package/dist/es/components/Instructions/Instructions.js +229 -0
- package/dist/es/components/Instructions/img/android.png +0 -0
- package/dist/es/components/Instructions/img/blackIphone.png +0 -0
- package/dist/es/components/Instructions/img/iphone12.png +0 -0
- package/dist/es/components/Instructions/img/laptop.png +0 -0
- package/dist/es/components/Instructions/img/newIphone.png +0 -0
- package/dist/es/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/es/components/PageTitle/PageTitle.css +80 -0
- package/dist/es/components/PageTitle/PageTitle.d.ts +23 -0
- package/dist/es/components/PageTitle/PageTitle.js +65 -0
- package/dist/es/components/Partners/Partners.css +53 -0
- package/dist/es/components/Partners/Partners.d.ts +32 -0
- package/dist/es/components/Partners/Partners.js +114 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.css +80 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.d.ts +28 -0
- package/dist/es/components/PictureWithDescription/PictureWithDescription.js +61 -0
- package/dist/es/components/Property/Property.css +125 -0
- package/dist/es/components/Property/Property.d.ts +33 -0
- package/dist/es/components/Property/Property.js +130 -0
- package/dist/es/components/Property/PropertyDescription.css +17 -0
- package/dist/es/components/Property/PropertyDescription.d.ts +5 -0
- package/dist/es/components/Property/PropertyDescription.js +51 -0
- package/dist/es/components/Property/types.d.ts +14 -0
- package/dist/es/components/Property/types.js +0 -0
- package/dist/es/components/Steps/Steps.css +41 -0
- package/dist/es/components/Steps/Steps.d.ts +10 -0
- package/dist/es/components/Steps/Steps.js +35 -0
- package/dist/es/components/Steps/StepsItem.css +37 -0
- package/dist/es/components/Steps/StepsItem.d.ts +10 -0
- package/dist/es/components/Steps/StepsItem.js +26 -0
- package/dist/es/components/StoreBanner/StoreBanner.css +289 -0
- package/dist/es/components/StoreBanner/StoreBanner.d.ts +65 -0
- package/dist/es/components/StoreBanner/StoreBanner.js +145 -0
- package/dist/es/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/es/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/es/components/StoreBanner/img/android.png +0 -0
- package/dist/es/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/es/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/es/components/StoreButton/StoreButton.css +15 -0
- package/dist/es/components/StoreButton/StoreButton.d.ts +17 -0
- package/dist/es/components/StoreButton/StoreButton.js +37 -0
- package/dist/es/components/StoreButton/img/app-store.png +0 -0
- package/dist/es/components/StoreButton/img/google-play.png +0 -0
- package/dist/es/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/es/components/Table/Table.css +153 -0
- package/dist/es/components/Table/Table.d.ts +14 -0
- package/dist/es/components/Table/Table.js +124 -0
- package/dist/es/components/Table/TableCell.d.ts +6 -0
- package/dist/es/components/Table/TableCell.js +12 -0
- package/dist/es/components/Table/TableRow.d.ts +9 -0
- package/dist/es/components/Table/TableRow.js +13 -0
- package/dist/es/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/es/components/TabsBox/TabBox.js +2 -0
- package/dist/es/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/es/components/TabsBox/TabsBox.js +32 -0
- package/dist/es/components/TextBox/TextBox.css +16 -0
- package/dist/es/components/TextBox/TextBox.d.ts +16 -0
- package/dist/es/components/TextBox/TextBox.js +53 -0
- package/dist/es/components/TextBox/TextBoxPicture.css +24 -0
- package/dist/es/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/es/components/TextBox/TextBoxPicture.js +31 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.css +11 -0
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +13 -7
- package/dist/es/components/TitleDescriptionBox/TitleDescriptionBox.js +33 -13
- package/dist/es/components/VideoBanner/VideoBanner.css +216 -0
- package/dist/es/components/VideoBanner/VideoBanner.d.ts +90 -0
- package/dist/es/components/VideoBanner/VideoBanner.js +272 -0
- package/dist/es/components/VideoBlock/VideoBlock.css +127 -0
- package/dist/es/components/VideoBlock/VideoBlock.d.ts +49 -0
- package/dist/es/components/VideoBlock/VideoBlock.js +147 -0
- package/dist/es/constants/throttleTime.d.ts +4 -0
- package/dist/es/constants/throttleTime.js +3 -0
- package/dist/es/index.d.ts +29 -17
- package/dist/es/index.js +30 -18
- package/dist/lib/components/AccordionBox/AccordionBox.css +13 -0
- package/dist/lib/components/AccordionBox/AccordionBox.d.ts +33 -0
- package/dist/lib/components/AccordionBox/AccordionBox.js +80 -0
- package/dist/lib/components/BannerBox/BannerBox.d.ts +5 -0
- package/dist/lib/components/BannerBox/BannerBox.js +49 -0
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.d.ts +16 -5
- package/dist/lib/components/BenefitsIcons/BenefitsIcons.js +82 -17
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.d.ts +3 -2
- package/dist/lib/components/BenefitsIcons/BenefitsIconsTile.js +14 -15
- package/dist/lib/components/BenefitsIcons/style/BenefitsIcons.css +1 -1
- package/dist/lib/components/BenefitsIcons/style/BenefitsIconsTile.css +11 -4
- package/dist/lib/components/BenefitsIcons/types.d.ts +16 -7
- package/dist/lib/components/BenefitsIcons/types.js +11 -8
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.d.ts +12 -3
- package/dist/lib/components/BenefitsPictures/BenefitsPictures.js +27 -13
- package/dist/lib/components/BenefitsPictures/BenfitsPictures.css +1 -1
- package/dist/lib/components/BenefitsPictures/types.d.ts +3 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.css +46 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.d.ts +21 -0
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.js +65 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.css +122 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.d.ts +54 -0
- package/dist/lib/components/ButtonBanner/ButtonBanner.js +133 -0
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.d.ts +32 -8
- package/dist/lib/components/ButtonLinkBox/ButtonLinkBox.js +53 -13
- package/dist/lib/components/Card/Card.css +130 -0
- package/dist/lib/components/Card/Card.d.ts +67 -0
- package/dist/lib/components/Card/Card.js +199 -0
- package/dist/lib/components/CardsBox/CardsBox.d.ts +15 -0
- package/dist/lib/components/CardsBox/CardsBox.js +105 -0
- package/dist/lib/components/CarouselBox/CarouselBox.d.ts +5 -0
- package/dist/lib/components/CarouselBox/CarouselBox.js +49 -0
- package/dist/lib/components/Container/Container.css +2830 -0
- package/dist/lib/components/Container/Container.d.ts +26 -0
- package/dist/lib/components/Container/Container.js +61 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.css +36 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.d.ts +25 -0
- package/dist/lib/components/DownloadLinks/DownloadLink.js +83 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.css +36 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.d.ts +10 -0
- package/dist/lib/components/DownloadLinks/DownloadLinks.js +95 -0
- package/dist/lib/components/Instructions/Instructions.css +489 -0
- package/dist/lib/components/Instructions/Instructions.d.ts +52 -0
- package/dist/lib/components/Instructions/Instructions.js +258 -0
- package/dist/lib/components/Instructions/img/android.png +0 -0
- package/dist/lib/components/Instructions/img/blackIphone.png +0 -0
- package/dist/lib/components/Instructions/img/iphone12.png +0 -0
- package/dist/lib/components/Instructions/img/laptop.png +0 -0
- package/dist/lib/components/Instructions/img/newIphone.png +0 -0
- package/dist/lib/components/Instructions/img/whiteIphone.png +0 -0
- package/dist/lib/components/PageTitle/PageTitle.css +80 -0
- package/dist/lib/components/PageTitle/PageTitle.d.ts +23 -0
- package/dist/lib/components/PageTitle/PageTitle.js +85 -0
- package/dist/lib/components/Partners/Partners.css +53 -0
- package/dist/lib/components/Partners/Partners.d.ts +32 -0
- package/dist/lib/components/Partners/Partners.js +136 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.css +80 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.d.ts +28 -0
- package/dist/lib/components/PictureWithDescription/PictureWithDescription.js +81 -0
- package/dist/lib/components/Property/Property.css +125 -0
- package/dist/lib/components/Property/Property.d.ts +33 -0
- package/dist/lib/components/Property/Property.js +152 -0
- package/dist/lib/components/Property/PropertyDescription.css +17 -0
- package/dist/lib/components/Property/PropertyDescription.d.ts +5 -0
- package/dist/lib/components/Property/PropertyDescription.js +71 -0
- package/dist/lib/components/Property/types.d.ts +14 -0
- package/dist/lib/components/Property/types.js +1 -0
- package/dist/lib/components/Steps/Steps.css +41 -0
- package/dist/lib/components/Steps/Steps.d.ts +10 -0
- package/dist/lib/components/Steps/Steps.js +55 -0
- package/dist/lib/components/Steps/StepsItem.css +37 -0
- package/dist/lib/components/Steps/StepsItem.d.ts +10 -0
- package/dist/lib/components/Steps/StepsItem.js +39 -0
- package/dist/lib/components/StoreBanner/StoreBanner.css +289 -0
- package/dist/lib/components/StoreBanner/StoreBanner.d.ts +65 -0
- package/dist/lib/components/StoreBanner/StoreBanner.js +169 -0
- package/dist/lib/components/StoreBanner/doc/img/new-iphone-screen.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/qr-code.png +0 -0
- package/dist/lib/components/StoreBanner/doc/img/screen.png +0 -0
- package/dist/lib/components/StoreBanner/img/android.png +0 -0
- package/dist/lib/components/StoreBanner/img/black-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/new-iphone.png +0 -0
- package/dist/lib/components/StoreBanner/img/white-iphone.png +0 -0
- package/dist/lib/components/StoreButton/StoreButton.css +15 -0
- package/dist/lib/components/StoreButton/StoreButton.d.ts +17 -0
- package/dist/lib/components/StoreButton/StoreButton.js +58 -0
- package/dist/lib/components/StoreButton/img/app-store.png +0 -0
- package/dist/lib/components/StoreButton/img/google-play.png +0 -0
- package/dist/lib/components/StoreButton/img/huawei-store.png +0 -0
- package/dist/lib/components/Table/Table.css +153 -0
- package/dist/lib/components/Table/Table.d.ts +14 -0
- package/dist/lib/components/Table/Table.js +146 -0
- package/dist/lib/components/Table/TableCell.d.ts +6 -0
- package/dist/lib/components/Table/TableCell.js +27 -0
- package/dist/lib/components/Table/TableRow.d.ts +9 -0
- package/dist/lib/components/Table/TableRow.js +28 -0
- package/dist/lib/components/TabsBox/TabBox.d.ts +2 -0
- package/dist/lib/components/TabsBox/TabBox.js +11 -0
- package/dist/lib/components/TabsBox/TabsBox.d.ts +8 -0
- package/dist/lib/components/TabsBox/TabsBox.js +50 -0
- package/dist/lib/components/TextBox/TextBox.css +16 -0
- package/dist/lib/components/TextBox/TextBox.d.ts +16 -0
- package/dist/lib/components/TextBox/TextBox.js +70 -0
- package/dist/lib/components/TextBox/TextBoxPicture.css +24 -0
- package/dist/lib/components/TextBox/TextBoxPicture.d.ts +17 -0
- package/dist/lib/components/TextBox/TextBoxPicture.js +48 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.css +11 -0
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.d.ts +13 -7
- package/dist/lib/components/TitleDescriptionBox/TitleDescriptionBox.js +37 -17
- package/dist/lib/components/VideoBanner/VideoBanner.css +216 -0
- package/dist/lib/components/VideoBanner/VideoBanner.d.ts +90 -0
- package/dist/lib/components/VideoBanner/VideoBanner.js +309 -0
- package/dist/lib/components/VideoBlock/VideoBlock.css +127 -0
- package/dist/lib/components/VideoBlock/VideoBlock.d.ts +49 -0
- package/dist/lib/components/VideoBlock/VideoBlock.js +170 -0
- package/dist/lib/constants/throttleTime.d.ts +4 -0
- package/dist/lib/constants/throttleTime.js +10 -0
- package/dist/lib/index.d.ts +29 -17
- package/dist/lib/index.js +147 -51
- package/package.json +22 -77
- package/dist/es/components/ProductCard/ProductCardFeatures.css +0 -35
- package/dist/es/components/ProductCard/ProductCardFeatures.d.ts +0 -61
- package/dist/es/components/ProductCard/ProductCardFeatures.js +0 -82
- package/dist/es/components/ProductCard/ProductCardFeaturesBottom.css +0 -41
- package/dist/es/components/ProductCard/ProductCardFeaturesBottom.d.ts +0 -22
- package/dist/es/components/ProductCard/ProductCardFeaturesBottom.js +0 -80
- package/dist/es/components/ProductCard/ProductCardFeaturesTop.css +0 -16
- package/dist/es/components/ProductCard/ProductCardFeaturesTop.d.ts +0 -25
- package/dist/es/components/ProductCard/ProductCardFeaturesTop.js +0 -67
- package/dist/es/components/ProductCard/ProductCardInfo.css +0 -236
- package/dist/es/components/ProductCard/ProductCardInfo.d.ts +0 -75
- package/dist/es/components/ProductCard/ProductCardInfo.js +0 -169
- package/dist/es/components/ProductCard/ProductCardTotal.css +0 -113
- package/dist/es/components/ProductCard/ProductCardTotal.d.ts +0 -86
- package/dist/es/components/ProductCard/ProductCardTotal.js +0 -161
- package/dist/es/components/ProductCard/ProductCardWrapper.css +0 -162
- package/dist/es/components/ProductCard/ProductCardWrapper.d.ts +0 -53
- package/dist/es/components/ProductCard/ProductCardWrapper.js +0 -109
- package/dist/es/components/ProductSwitcher/ProductSwitcher.css +0 -372
- package/dist/es/components/ProductSwitcher/ProductSwitcher.d.ts +0 -86
- package/dist/es/components/ProductSwitcher/ProductSwitcher.js +0 -612
- package/dist/es/components/ProductTile/ProductTile.d.ts +0 -287
- package/dist/es/components/ProductTile/ProductTile.js +0 -497
- package/dist/es/components/ProductTile/ProductTileBuy.d.ts +0 -53
- package/dist/es/components/ProductTile/ProductTileBuy.js +0 -99
- package/dist/es/components/ProductTile/ProductTileCashback.d.ts +0 -20
- package/dist/es/components/ProductTile/ProductTileCashback.js +0 -60
- package/dist/es/components/ProductTile/ProductTileDynamic.d.ts +0 -42
- package/dist/es/components/ProductTile/ProductTileDynamic.js +0 -109
- package/dist/es/components/ProductTile/ProductTileHint.d.ts +0 -24
- package/dist/es/components/ProductTile/ProductTileHint.js +0 -67
- package/dist/es/components/ProductTile/ProductTileOptions.d.ts +0 -31
- package/dist/es/components/ProductTile/ProductTileOptions.js +0 -130
- package/dist/es/components/ProductTile/ProductTilePrice.d.ts +0 -26
- package/dist/es/components/ProductTile/ProductTilePrice.js +0 -75
- package/dist/es/components/ProductTile/ProductTileStatic.d.ts +0 -20
- package/dist/es/components/ProductTile/ProductTileStatic.js +0 -60
- package/dist/es/components/ProductTile/ProductTileValue.d.ts +0 -31
- package/dist/es/components/ProductTile/ProductTileValue.js +0 -111
- package/dist/es/components/ProductTile/style/ProductTile.css +0 -146
- package/dist/es/components/ProductTile/style/ProductTileBuy.css +0 -76
- package/dist/es/components/ProductTile/style/ProductTileCashback.css +0 -23
- package/dist/es/components/ProductTile/style/ProductTileDynamic.css +0 -38
- package/dist/es/components/ProductTile/style/ProductTileHint.css +0 -93
- package/dist/es/components/ProductTile/style/ProductTileOptions.css +0 -84
- package/dist/es/components/ProductTile/style/ProductTilePrice.css +0 -105
- package/dist/es/components/ProductTile/style/ProductTileStatic.css +0 -23
- package/dist/es/components/ProductTile/style/ProductTileValue.css +0 -58
- package/dist/es/components/ProductTileRest/ProductTileRest.css +0 -226
- package/dist/es/components/ProductTileRest/ProductTileRest.d.ts +0 -109
- package/dist/es/components/ProductTileRest/ProductTileRest.js +0 -291
- package/dist/es/constants/breakpoints.d.ts +0 -1
- package/dist/es/constants/breakpoints.js +0 -1
- package/dist/lib/components/ProductCard/ProductCardFeatures.css +0 -35
- package/dist/lib/components/ProductCard/ProductCardFeatures.d.ts +0 -61
- package/dist/lib/components/ProductCard/ProductCardFeatures.js +0 -141
- package/dist/lib/components/ProductCard/ProductCardFeaturesBottom.css +0 -41
- package/dist/lib/components/ProductCard/ProductCardFeaturesBottom.d.ts +0 -22
- package/dist/lib/components/ProductCard/ProductCardFeaturesBottom.js +0 -140
- package/dist/lib/components/ProductCard/ProductCardFeaturesTop.css +0 -16
- package/dist/lib/components/ProductCard/ProductCardFeaturesTop.d.ts +0 -25
- package/dist/lib/components/ProductCard/ProductCardFeaturesTop.js +0 -124
- package/dist/lib/components/ProductCard/ProductCardInfo.css +0 -236
- package/dist/lib/components/ProductCard/ProductCardInfo.d.ts +0 -75
- package/dist/lib/components/ProductCard/ProductCardInfo.js +0 -241
- package/dist/lib/components/ProductCard/ProductCardTotal.css +0 -113
- package/dist/lib/components/ProductCard/ProductCardTotal.d.ts +0 -86
- package/dist/lib/components/ProductCard/ProductCardTotal.js +0 -218
- package/dist/lib/components/ProductCard/ProductCardWrapper.css +0 -162
- package/dist/lib/components/ProductCard/ProductCardWrapper.d.ts +0 -53
- package/dist/lib/components/ProductCard/ProductCardWrapper.js +0 -170
- package/dist/lib/components/ProductSwitcher/ProductSwitcher.css +0 -372
- package/dist/lib/components/ProductSwitcher/ProductSwitcher.d.ts +0 -86
- package/dist/lib/components/ProductSwitcher/ProductSwitcher.js +0 -686
- package/dist/lib/components/ProductTile/ProductTile.d.ts +0 -287
- package/dist/lib/components/ProductTile/ProductTile.js +0 -590
- package/dist/lib/components/ProductTile/ProductTileBuy.d.ts +0 -53
- package/dist/lib/components/ProductTile/ProductTileBuy.js +0 -156
- package/dist/lib/components/ProductTile/ProductTileCashback.d.ts +0 -20
- package/dist/lib/components/ProductTile/ProductTileCashback.js +0 -117
- package/dist/lib/components/ProductTile/ProductTileDynamic.d.ts +0 -42
- package/dist/lib/components/ProductTile/ProductTileDynamic.js +0 -174
- package/dist/lib/components/ProductTile/ProductTileHint.d.ts +0 -24
- package/dist/lib/components/ProductTile/ProductTileHint.js +0 -124
- package/dist/lib/components/ProductTile/ProductTileOptions.d.ts +0 -31
- package/dist/lib/components/ProductTile/ProductTileOptions.js +0 -193
- package/dist/lib/components/ProductTile/ProductTilePrice.d.ts +0 -26
- package/dist/lib/components/ProductTile/ProductTilePrice.js +0 -136
- package/dist/lib/components/ProductTile/ProductTileStatic.d.ts +0 -20
- package/dist/lib/components/ProductTile/ProductTileStatic.js +0 -123
- package/dist/lib/components/ProductTile/ProductTileValue.d.ts +0 -31
- package/dist/lib/components/ProductTile/ProductTileValue.js +0 -171
- package/dist/lib/components/ProductTile/style/ProductTile.css +0 -146
- package/dist/lib/components/ProductTile/style/ProductTileBuy.css +0 -76
- package/dist/lib/components/ProductTile/style/ProductTileCashback.css +0 -23
- package/dist/lib/components/ProductTile/style/ProductTileDynamic.css +0 -38
- package/dist/lib/components/ProductTile/style/ProductTileHint.css +0 -93
- package/dist/lib/components/ProductTile/style/ProductTileOptions.css +0 -84
- package/dist/lib/components/ProductTile/style/ProductTilePrice.css +0 -105
- package/dist/lib/components/ProductTile/style/ProductTileStatic.css +0 -23
- package/dist/lib/components/ProductTile/style/ProductTileValue.css +0 -58
- package/dist/lib/components/ProductTileRest/ProductTileRest.css +0 -226
- package/dist/lib/components/ProductTileRest/ProductTileRest.d.ts +0 -109
- package/dist/lib/components/ProductTileRest/ProductTileRest.js +0 -364
- package/dist/lib/constants/breakpoints.d.ts +0 -1
- package/dist/lib/constants/breakpoints.js +0 -8
@@ -1,590 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
|
-
require("core-js/modules/es.array.concat");
|
6
|
-
|
7
|
-
require("core-js/modules/es.array.filter");
|
8
|
-
|
9
|
-
require("core-js/modules/es.array.for-each");
|
10
|
-
|
11
|
-
require("core-js/modules/es.array.sort");
|
12
|
-
|
13
|
-
require("core-js/modules/es.date.to-string");
|
14
|
-
|
15
|
-
require("core-js/modules/es.number.constructor");
|
16
|
-
|
17
|
-
require("core-js/modules/es.number.is-integer");
|
18
|
-
|
19
|
-
require("core-js/modules/es.object.keys");
|
20
|
-
|
21
|
-
require("core-js/modules/es.object.to-string");
|
22
|
-
|
23
|
-
require("core-js/modules/es.reflect.construct");
|
24
|
-
|
25
|
-
require("core-js/modules/es.regexp.to-string");
|
26
|
-
|
27
|
-
require("core-js/modules/es.string.link");
|
28
|
-
|
29
|
-
require("core-js/modules/web.dom-collections.for-each");
|
30
|
-
|
31
|
-
Object.defineProperty(exports, "__esModule", {
|
32
|
-
value: true
|
33
|
-
});
|
34
|
-
exports["default"] = void 0;
|
35
|
-
|
36
|
-
require("core-js/modules/es.array.concat");
|
37
|
-
|
38
|
-
require("core-js/modules/es.array.filter");
|
39
|
-
|
40
|
-
require("core-js/modules/es.array.for-each");
|
41
|
-
|
42
|
-
require("core-js/modules/es.array.sort");
|
43
|
-
|
44
|
-
require("core-js/modules/es.date.to-string");
|
45
|
-
|
46
|
-
require("core-js/modules/es.number.constructor");
|
47
|
-
|
48
|
-
require("core-js/modules/es.number.is-integer");
|
49
|
-
|
50
|
-
require("core-js/modules/es.object.keys");
|
51
|
-
|
52
|
-
require("core-js/modules/es.object.to-string");
|
53
|
-
|
54
|
-
require("core-js/modules/es.reflect.construct");
|
55
|
-
|
56
|
-
require("core-js/modules/es.regexp.to-string");
|
57
|
-
|
58
|
-
require("core-js/modules/es.string.link");
|
59
|
-
|
60
|
-
require("core-js/modules/web.dom-collections.for-each");
|
61
|
-
|
62
|
-
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
63
|
-
|
64
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
65
|
-
|
66
|
-
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
67
|
-
|
68
|
-
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
69
|
-
|
70
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
71
|
-
|
72
|
-
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
73
|
-
|
74
|
-
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
75
|
-
|
76
|
-
var React = _interopRequireWildcard(require("react"));
|
77
|
-
|
78
|
-
var PropTypes = _interopRequireWildcard(require("prop-types"));
|
79
|
-
|
80
|
-
var _uiCore = require("@megafon/ui-core");
|
81
|
-
|
82
|
-
var _ProductTileHint = _interopRequireDefault(require("./ProductTileHint"));
|
83
|
-
|
84
|
-
var _ProductTileCashback = _interopRequireDefault(require("./ProductTileCashback"));
|
85
|
-
|
86
|
-
var _ProductTileStatic = _interopRequireDefault(require("./ProductTileStatic"));
|
87
|
-
|
88
|
-
var _ProductTileDynamic = _interopRequireDefault(require("./ProductTileDynamic"));
|
89
|
-
|
90
|
-
var _ProductTilePrice = _interopRequireDefault(require("./ProductTilePrice"));
|
91
|
-
|
92
|
-
var _ProductTileOptions = _interopRequireDefault(require("./ProductTileOptions"));
|
93
|
-
|
94
|
-
var _ProductTileBuy = _interopRequireDefault(require("./ProductTileBuy"));
|
95
|
-
|
96
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
97
|
-
|
98
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
99
|
-
|
100
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
101
|
-
|
102
|
-
function _createSuper(Derived) {
|
103
|
-
return function () {
|
104
|
-
var Super = (0, _getPrototypeOf2["default"])(Derived),
|
105
|
-
result;
|
106
|
-
|
107
|
-
if (_isNativeReflectConstruct()) {
|
108
|
-
var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor;
|
109
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
110
|
-
} else {
|
111
|
-
result = Super.apply(this, arguments);
|
112
|
-
}
|
113
|
-
|
114
|
-
return (0, _possibleConstructorReturn2["default"])(this, result);
|
115
|
-
};
|
116
|
-
}
|
117
|
-
|
118
|
-
function _isNativeReflectConstruct() {
|
119
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
120
|
-
if (Reflect.construct.sham) return false;
|
121
|
-
if (typeof Proxy === "function") return true;
|
122
|
-
|
123
|
-
try {
|
124
|
-
Date.prototype.toString.call(Reflect.construct(Date, [], function () {}));
|
125
|
-
return true;
|
126
|
-
} catch (e) {
|
127
|
-
return false;
|
128
|
-
}
|
129
|
-
}
|
130
|
-
|
131
|
-
var LinkTargetType = PropTypes.oneOf(['_self', '_blank', '_parent', '_top']);
|
132
|
-
var cn = (0, _uiCore.cnCreate)('mfui-beta-product-tile');
|
133
|
-
|
134
|
-
var ProductTile = /*#__PURE__*/function (_React$Component) {
|
135
|
-
(0, _inherits2["default"])(ProductTile, _React$Component);
|
136
|
-
|
137
|
-
var _super = _createSuper(ProductTile);
|
138
|
-
|
139
|
-
function ProductTile(props) {
|
140
|
-
var _this;
|
141
|
-
|
142
|
-
(0, _classCallCheck2["default"])(this, ProductTile);
|
143
|
-
_this = _super.call(this, props);
|
144
|
-
|
145
|
-
_this.getTariffInfo = function () {
|
146
|
-
var _this$props = _this.props,
|
147
|
-
info = _this$props.info,
|
148
|
-
shopTag = _this$props.shopTag,
|
149
|
-
_this$props$payment = _this$props.payment,
|
150
|
-
unitValue = _this$props$payment.unitValue,
|
151
|
-
unitExtra = _this$props$payment.unitExtra;
|
152
|
-
var _this$state = _this.state,
|
153
|
-
_this$state$currentPa = _this$state.currentPack,
|
154
|
-
calls = _this$state$currentPa.calls,
|
155
|
-
traffic = _this$state$currentPa.traffic,
|
156
|
-
packShopTag = _this$state$currentPa.shopTag,
|
157
|
-
price = _this$state.price,
|
158
|
-
discount = _this$state.discount;
|
159
|
-
var callsValue = calls ? calls.value : 0;
|
160
|
-
var trafficValue = traffic ? traffic.value : 0;
|
161
|
-
var currentShopTag = packShopTag || shopTag || '';
|
162
|
-
var priceValue = discount ? discount : price;
|
163
|
-
return (0, _extends2["default"])((0, _extends2["default"])((0, _extends2["default"])({}, info), {
|
164
|
-
callsValue: callsValue,
|
165
|
-
trafficValue: trafficValue,
|
166
|
-
shopTag: currentShopTag,
|
167
|
-
price: priceValue,
|
168
|
-
unitValue: unitValue,
|
169
|
-
unitExtra: unitExtra
|
170
|
-
}), _this.defaultInfo);
|
171
|
-
};
|
172
|
-
|
173
|
-
_this.handleClickConnect = function (e) {
|
174
|
-
var onClickConnect = _this.props.onClickConnect;
|
175
|
-
onClickConnect && onClickConnect(_this.getTariffInfo(), e);
|
176
|
-
};
|
177
|
-
|
178
|
-
_this.handleClickBuy = function (e) {
|
179
|
-
var onClickBuy = _this.props.onClickBuy;
|
180
|
-
onClickBuy && onClickBuy(_this.getTariffInfo(), e);
|
181
|
-
};
|
182
|
-
|
183
|
-
_this.handleClickMore = function (e) {
|
184
|
-
var onClickMore = _this.props.onClickMore;
|
185
|
-
onClickMore && onClickMore(_this.getTariffInfo(), e);
|
186
|
-
};
|
187
|
-
|
188
|
-
_this.handleClickBubble = function () {
|
189
|
-
var onClickBubble = _this.props.onClickBubble;
|
190
|
-
onClickBubble && onClickBubble(_this.getTariffInfo());
|
191
|
-
};
|
192
|
-
|
193
|
-
_this.handleChangeCalls = function (_e, value, index) {
|
194
|
-
var currentValue = Number(value);
|
195
|
-
var onCallsChange = _this.props.onCallsChange;
|
196
|
-
var trafficValue = _this.state.trafficValue;
|
197
|
-
|
198
|
-
var currentPack = _this.getCurrentPack(currentValue, trafficValue);
|
199
|
-
|
200
|
-
if (Object.keys(currentPack).length === 0) {
|
201
|
-
return false;
|
202
|
-
}
|
203
|
-
|
204
|
-
onCallsChange && onCallsChange(index);
|
205
|
-
|
206
|
-
_this.setState((0, _extends2["default"])((0, _extends2["default"])({}, _this.getRestState(currentPack)), {
|
207
|
-
callsValue: currentValue,
|
208
|
-
callsIndex: index
|
209
|
-
}));
|
210
|
-
|
211
|
-
return true;
|
212
|
-
};
|
213
|
-
|
214
|
-
_this.handleChangeTraffic = function (_e, value, index) {
|
215
|
-
var currentValue = Number(value);
|
216
|
-
var onTrafficChange = _this.props.onTrafficChange;
|
217
|
-
var callsValue = _this.state.callsValue;
|
218
|
-
|
219
|
-
var currentPack = _this.getCurrentPack(callsValue, currentValue);
|
220
|
-
|
221
|
-
if (Object.keys(currentPack).length === 0) {
|
222
|
-
return false;
|
223
|
-
}
|
224
|
-
|
225
|
-
onTrafficChange && onTrafficChange(index);
|
226
|
-
|
227
|
-
_this.setState((0, _extends2["default"])((0, _extends2["default"])({}, _this.getRestState(currentPack)), {
|
228
|
-
trafficValue: currentValue,
|
229
|
-
trafficIndex: index
|
230
|
-
}));
|
231
|
-
|
232
|
-
return true;
|
233
|
-
};
|
234
|
-
|
235
|
-
var usePackBuyLink = props.usePackBuyLink,
|
236
|
-
servicePacks = props.servicePacks,
|
237
|
-
_props$payment = props.payment,
|
238
|
-
value = _props$payment.value,
|
239
|
-
discount = _props$payment.discount,
|
240
|
-
defaultBuyLink = props.buyLink,
|
241
|
-
secondParams = props.secondParams,
|
242
|
-
startCallsIndex = props.startCallsIndex,
|
243
|
-
startTrafficIndex = props.startTrafficIndex,
|
244
|
-
cookieCallsIndex = props.cookieCallsIndex,
|
245
|
-
cookieTrafficIndex = props.cookieTrafficIndex;
|
246
|
-
|
247
|
-
var switcher = _this.getSwitcherValues();
|
248
|
-
|
249
|
-
var defaultCallsValue = Number(switcher.calls[startCallsIndex]);
|
250
|
-
var defaultTrafficValue = Number(switcher.traffic[startTrafficIndex]);
|
251
|
-
var currentCallsIndex = Number.isInteger(cookieCallsIndex) ? cookieCallsIndex : startCallsIndex;
|
252
|
-
var currentCallsValue = Number(switcher.calls[currentCallsIndex]);
|
253
|
-
var currentTrafficIndex = Number.isInteger(cookieTrafficIndex) ? cookieTrafficIndex : startTrafficIndex;
|
254
|
-
var currentTrafficValue = Number(switcher.traffic[currentTrafficIndex]);
|
255
|
-
|
256
|
-
var currentPack = _this.getCurrentPack(currentCallsValue, currentTrafficValue);
|
257
|
-
|
258
|
-
var payment = currentPack.payment,
|
259
|
-
options = currentPack.options,
|
260
|
-
_currentPack$buyLink = currentPack.buyLink,
|
261
|
-
buyLink = _currentPack$buyLink === void 0 ? '' : _currentPack$buyLink,
|
262
|
-
_currentPack$shopTag = currentPack.shopTag,
|
263
|
-
shopTag = _currentPack$shopTag === void 0 ? '' : _currentPack$shopTag;
|
264
|
-
var defaultValues = {
|
265
|
-
defaultCallsValue: defaultCallsValue,
|
266
|
-
defaultTrafficValue: defaultTrafficValue,
|
267
|
-
defaultPayment: payment,
|
268
|
-
defaultBuyLink: buyLink
|
269
|
-
};
|
270
|
-
_this.defaultInfo = !servicePacks || servicePacks.length ? defaultValues : {};
|
271
|
-
_this.state = {
|
272
|
-
switcher: switcher,
|
273
|
-
currentPack: currentPack,
|
274
|
-
callsValue: currentCallsValue,
|
275
|
-
callsIndex: currentCallsIndex,
|
276
|
-
trafficValue: currentTrafficValue,
|
277
|
-
trafficIndex: currentTrafficIndex,
|
278
|
-
price: payment && payment.value || value,
|
279
|
-
discount: payment && payment.discount || discount || '',
|
280
|
-
options: options || secondParams,
|
281
|
-
buyLink: usePackBuyLink && buyLink || _this.formHashLink(defaultBuyLink || '', shopTag) || ''
|
282
|
-
};
|
283
|
-
return _this;
|
284
|
-
}
|
285
|
-
|
286
|
-
(0, _createClass2["default"])(ProductTile, [{
|
287
|
-
key: "getRestState",
|
288
|
-
value: function getRestState(currentPack) {
|
289
|
-
var _this$props2 = this.props,
|
290
|
-
_this$props2$buyLink = _this$props2.buyLink,
|
291
|
-
buyLink = _this$props2$buyLink === void 0 ? '' : _this$props2$buyLink,
|
292
|
-
usePackBuyLink = _this$props2.usePackBuyLink;
|
293
|
-
var _currentPack$shopTag2 = currentPack.shopTag,
|
294
|
-
shopTag = _currentPack$shopTag2 === void 0 ? '' : _currentPack$shopTag2;
|
295
|
-
return {
|
296
|
-
currentPack: currentPack,
|
297
|
-
price: currentPack.payment && currentPack.payment.value || '',
|
298
|
-
discount: currentPack.payment && currentPack.payment.discount || '',
|
299
|
-
options: currentPack.options || [],
|
300
|
-
buyLink: usePackBuyLink && currentPack.buyLink || this.formHashLink(buyLink, shopTag) || ''
|
301
|
-
};
|
302
|
-
}
|
303
|
-
}, {
|
304
|
-
key: "getCurrentPack",
|
305
|
-
value: function getCurrentPack(callsValue, trafficValue) {
|
306
|
-
var servicePacks = this.props.servicePacks;
|
307
|
-
|
308
|
-
var _servicePacks$filter = servicePacks.filter(function (pack) {
|
309
|
-
return pack.calls.value === callsValue && pack.traffic.value === trafficValue;
|
310
|
-
}),
|
311
|
-
_servicePacks$filter2 = (0, _slicedToArray2["default"])(_servicePacks$filter, 1),
|
312
|
-
_servicePacks$filter3 = _servicePacks$filter2[0],
|
313
|
-
currentPack = _servicePacks$filter3 === void 0 ? {} : _servicePacks$filter3;
|
314
|
-
|
315
|
-
return currentPack;
|
316
|
-
}
|
317
|
-
}, {
|
318
|
-
key: "getSwitcherValues",
|
319
|
-
value: function getSwitcherValues() {
|
320
|
-
var servicePacks = this.props.servicePacks;
|
321
|
-
var calls = {};
|
322
|
-
var traffic = {};
|
323
|
-
servicePacks.forEach(function (items) {
|
324
|
-
calls[String(items.calls.value)] = true;
|
325
|
-
traffic[String(items.traffic.value)] = true;
|
326
|
-
});
|
327
|
-
return {
|
328
|
-
calls: Object.keys(calls).sort(function (a, b) {
|
329
|
-
return Number(a) - Number(b);
|
330
|
-
}),
|
331
|
-
traffic: Object.keys(traffic).sort(function (a, b) {
|
332
|
-
return Number(a) - Number(b);
|
333
|
-
})
|
334
|
-
};
|
335
|
-
}
|
336
|
-
}, {
|
337
|
-
key: "renderStatic",
|
338
|
-
value: function renderStatic() {
|
339
|
-
var packs = this.props.packs;
|
340
|
-
|
341
|
-
if (!packs) {
|
342
|
-
return null;
|
343
|
-
}
|
344
|
-
|
345
|
-
return /*#__PURE__*/React.createElement(_ProductTileStatic["default"], {
|
346
|
-
packs: packs
|
347
|
-
});
|
348
|
-
}
|
349
|
-
}, {
|
350
|
-
key: "renderDynamic",
|
351
|
-
value: function renderDynamic() {
|
352
|
-
var _this$state2 = this.state,
|
353
|
-
switcher = _this$state2.switcher,
|
354
|
-
currentPack = _this$state2.currentPack,
|
355
|
-
callsIndex = _this$state2.callsIndex,
|
356
|
-
trafficIndex = _this$state2.trafficIndex;
|
357
|
-
return /*#__PURE__*/React.createElement(_ProductTileDynamic["default"], {
|
358
|
-
startCallsIndex: callsIndex,
|
359
|
-
startTrafficIndex: trafficIndex,
|
360
|
-
currentPack: currentPack,
|
361
|
-
switcher: switcher,
|
362
|
-
onChangeCalls: this.handleChangeCalls,
|
363
|
-
onChangeTraffic: this.handleChangeTraffic
|
364
|
-
});
|
365
|
-
}
|
366
|
-
}, {
|
367
|
-
key: "renderTitle",
|
368
|
-
value: function renderTitle() {
|
369
|
-
var _this$props3 = this.props,
|
370
|
-
title = _this$props3.title,
|
371
|
-
link = _this$props3.link,
|
372
|
-
linkTarget = _this$props3.linkTarget;
|
373
|
-
return /*#__PURE__*/React.createElement("h2", {
|
374
|
-
className: cn('title')
|
375
|
-
}, /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
376
|
-
className: cn('title-link'),
|
377
|
-
href: link,
|
378
|
-
target: linkTarget,
|
379
|
-
underlineStyle: "none",
|
380
|
-
color: "black",
|
381
|
-
onClick: this.handleClickMore
|
382
|
-
}, title));
|
383
|
-
}
|
384
|
-
}, {
|
385
|
-
key: "renderLink",
|
386
|
-
value: function renderLink() {
|
387
|
-
var _this$props4 = this.props,
|
388
|
-
_this$props4$link = _this$props4.link,
|
389
|
-
link = _this$props4$link === void 0 ? '' : _this$props4$link,
|
390
|
-
showMoreLink = _this$props4.showMoreLink,
|
391
|
-
moreLinkText = _this$props4.moreLinkText,
|
392
|
-
linkTarget = _this$props4.linkTarget;
|
393
|
-
|
394
|
-
if (!showMoreLink || !moreLinkText) {
|
395
|
-
return null;
|
396
|
-
}
|
397
|
-
|
398
|
-
var _this$state$currentPa2 = this.state.currentPack.shopTag,
|
399
|
-
shopTag = _this$state$currentPa2 === void 0 ? '' : _this$state$currentPa2;
|
400
|
-
var linkWithHash = this.formHashLink(link, shopTag);
|
401
|
-
return /*#__PURE__*/React.createElement("div", {
|
402
|
-
className: cn('link-wrapper')
|
403
|
-
}, /*#__PURE__*/React.createElement(_uiCore.TextLink, {
|
404
|
-
className: cn('detail-link'),
|
405
|
-
href: linkWithHash,
|
406
|
-
target: linkTarget,
|
407
|
-
onClick: this.handleClickMore
|
408
|
-
}, moreLinkText));
|
409
|
-
}
|
410
|
-
}, {
|
411
|
-
key: "formHashLink",
|
412
|
-
value: function formHashLink(link, shopTag) {
|
413
|
-
return !shopTag ? link : "".concat(link, "#").concat(shopTag);
|
414
|
-
}
|
415
|
-
}, {
|
416
|
-
key: "render",
|
417
|
-
value: function render() {
|
418
|
-
var _this$props5 = this.props,
|
419
|
-
servicePacks = _this$props5.servicePacks,
|
420
|
-
cashback = _this$props5.cashback,
|
421
|
-
firstParams = _this$props5.firstParams,
|
422
|
-
className = _this$props5.className,
|
423
|
-
buyButtonText = _this$props5.buyButtonText,
|
424
|
-
connectButtonText = _this$props5.connectButtonText,
|
425
|
-
topBadgeTitle = _this$props5.topBadgeTitle,
|
426
|
-
topBadgeLink = _this$props5.topBadgeLink,
|
427
|
-
secondParamsHead = _this$props5.secondParamsHead,
|
428
|
-
showConnectButton = _this$props5.showConnectButton,
|
429
|
-
showBuyButton = _this$props5.showBuyButton,
|
430
|
-
buttonTheme = _this$props5.buttonTheme,
|
431
|
-
buttonType = _this$props5.buttonType,
|
432
|
-
connectLink = _this$props5.connectLink,
|
433
|
-
topBadgeLinkTarget = _this$props5.topBadgeLinkTarget,
|
434
|
-
buyLinkTarget = _this$props5.buyLinkTarget,
|
435
|
-
connectLinkTarget = _this$props5.connectLinkTarget,
|
436
|
-
isActive = _this$props5.isActive,
|
437
|
-
_this$props5$payment = _this$props5.payment,
|
438
|
-
title = _this$props5$payment.title,
|
439
|
-
unitExtra = _this$props5$payment.unitExtra,
|
440
|
-
unitValue = _this$props5$payment.unitValue;
|
441
|
-
var _this$state3 = this.state,
|
442
|
-
price = _this$state3.price,
|
443
|
-
discount = _this$state3.discount,
|
444
|
-
options = _this$state3.options,
|
445
|
-
buyLink = _this$state3.buyLink;
|
446
|
-
var isServicePacks = !!servicePacks.length;
|
447
|
-
return /*#__PURE__*/React.createElement("div", {
|
448
|
-
className: cn('', {
|
449
|
-
constructor: isServicePacks,
|
450
|
-
active: isActive
|
451
|
-
}, className)
|
452
|
-
}, isServicePacks && !!topBadgeTitle && /*#__PURE__*/React.createElement(_ProductTileHint["default"], {
|
453
|
-
title: topBadgeTitle,
|
454
|
-
linkHref: topBadgeLink,
|
455
|
-
linkTarget: topBadgeLinkTarget
|
456
|
-
}), /*#__PURE__*/React.createElement("div", {
|
457
|
-
className: cn('content')
|
458
|
-
}, this.renderTitle(), this.renderLink(), /*#__PURE__*/React.createElement(_ProductTileCashback["default"], cashback), /*#__PURE__*/React.createElement(_ProductTilePrice["default"], {
|
459
|
-
title: title,
|
460
|
-
value: price,
|
461
|
-
discount: discount,
|
462
|
-
unitExtra: unitExtra,
|
463
|
-
unitValue: unitValue
|
464
|
-
}), /*#__PURE__*/React.createElement("div", {
|
465
|
-
className: cn('constructor')
|
466
|
-
}, isServicePacks ? this.renderDynamic() : this.renderStatic(), /*#__PURE__*/React.createElement(_ProductTileOptions["default"], {
|
467
|
-
options: firstParams.items
|
468
|
-
})), /*#__PURE__*/React.createElement(_ProductTileOptions["default"], {
|
469
|
-
options: options,
|
470
|
-
head: secondParamsHead,
|
471
|
-
onClickBubble: this.handleClickBubble
|
472
|
-
})), /*#__PURE__*/React.createElement(_ProductTileBuy["default"], {
|
473
|
-
buyLink: buyLink,
|
474
|
-
buyLinkTarget: buyLinkTarget,
|
475
|
-
connectLink: connectLink,
|
476
|
-
connectLinkTarget: connectLinkTarget,
|
477
|
-
buyButtonText: buyButtonText,
|
478
|
-
connectButtonText: connectButtonText,
|
479
|
-
showBuyButton: showBuyButton,
|
480
|
-
showConnectButton: showConnectButton,
|
481
|
-
buttonTheme: buttonTheme,
|
482
|
-
buttonType: buttonType,
|
483
|
-
onClickBuy: this.handleClickBuy,
|
484
|
-
onClickConnect: this.handleClickConnect
|
485
|
-
}));
|
486
|
-
}
|
487
|
-
}]);
|
488
|
-
return ProductTile;
|
489
|
-
}(React.Component);
|
490
|
-
|
491
|
-
ProductTile.propTypes = {
|
492
|
-
title: PropTypes.string.isRequired,
|
493
|
-
topBadgeTitle: PropTypes.string,
|
494
|
-
topBadgeLink: PropTypes.string,
|
495
|
-
topBadgeLinkTarget: LinkTargetType,
|
496
|
-
secondParamsHead: PropTypes.string,
|
497
|
-
shopTag: PropTypes.string,
|
498
|
-
startCallsIndex: PropTypes.number,
|
499
|
-
startTrafficIndex: PropTypes.number,
|
500
|
-
cookieCallsIndex: PropTypes.number,
|
501
|
-
cookieTrafficIndex: PropTypes.number,
|
502
|
-
link: PropTypes.string,
|
503
|
-
linkTarget: LinkTargetType,
|
504
|
-
moreLinkText: PropTypes.string,
|
505
|
-
showMoreLink: PropTypes.bool,
|
506
|
-
buyLink: PropTypes.string,
|
507
|
-
buyLinkTarget: LinkTargetType,
|
508
|
-
usePackBuyLink: PropTypes.bool,
|
509
|
-
buyButtonText: PropTypes.string,
|
510
|
-
buttonTheme: _ProductTileBuy["default"].propTypes.buttonTheme,
|
511
|
-
buttonType: _ProductTileBuy["default"].propTypes.buttonType,
|
512
|
-
showBuyButton: PropTypes.bool,
|
513
|
-
connectLink: PropTypes.string,
|
514
|
-
connectLinkTarget: LinkTargetType,
|
515
|
-
connectButtonText: PropTypes.string,
|
516
|
-
showConnectButton: PropTypes.bool,
|
517
|
-
payment: PropTypes.shape({
|
518
|
-
title: PropTypes.string,
|
519
|
-
value: PropTypes.string.isRequired,
|
520
|
-
unitExtra: PropTypes.string,
|
521
|
-
unitValue: PropTypes.string,
|
522
|
-
discount: PropTypes.string
|
523
|
-
}).isRequired,
|
524
|
-
packs: PropTypes.arrayOf(PropTypes.shape({
|
525
|
-
value: PropTypes.number,
|
526
|
-
unit: PropTypes.string
|
527
|
-
})),
|
528
|
-
secondParams: PropTypes.arrayOf(PropTypes.shape({
|
529
|
-
title: PropTypes.string,
|
530
|
-
footnote: PropTypes.string,
|
531
|
-
value: PropTypes.string,
|
532
|
-
unit: PropTypes.string,
|
533
|
-
svgIcon: PropTypes.element
|
534
|
-
})).isRequired,
|
535
|
-
cashback: PropTypes.shape({
|
536
|
-
title: PropTypes.string,
|
537
|
-
value: PropTypes.number,
|
538
|
-
unit: PropTypes.string
|
539
|
-
}).isRequired,
|
540
|
-
firstParams: PropTypes.shape({
|
541
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
542
|
-
title: PropTypes.string,
|
543
|
-
caption: PropTypes.string,
|
544
|
-
svgIcon: PropTypes.element
|
545
|
-
}))
|
546
|
-
}).isRequired,
|
547
|
-
servicePacks: PropTypes.arrayOf(PropTypes.shape({
|
548
|
-
buyLink: PropTypes.string,
|
549
|
-
calls: PropTypes.shape({
|
550
|
-
value: PropTypes.number,
|
551
|
-
unit: PropTypes.string
|
552
|
-
}),
|
553
|
-
traffic: PropTypes.shape({
|
554
|
-
value: PropTypes.number,
|
555
|
-
unit: PropTypes.string
|
556
|
-
}),
|
557
|
-
options: PropTypes.arrayOf(PropTypes.shape({
|
558
|
-
title: PropTypes.string,
|
559
|
-
caption: PropTypes.string,
|
560
|
-
value: PropTypes.string,
|
561
|
-
unit: PropTypes.string,
|
562
|
-
footnote: PropTypes.string,
|
563
|
-
svgIcon: PropTypes.element
|
564
|
-
})),
|
565
|
-
payment: PropTypes.shape({
|
566
|
-
value: PropTypes.string.isRequired,
|
567
|
-
discount: PropTypes.string
|
568
|
-
})
|
569
|
-
})),
|
570
|
-
info: PropTypes.object,
|
571
|
-
isActive: PropTypes.bool,
|
572
|
-
onClickConnect: PropTypes.func,
|
573
|
-
onClickBuy: PropTypes.func,
|
574
|
-
onClickMore: PropTypes.func,
|
575
|
-
onClickBubble: PropTypes.func,
|
576
|
-
onCallsChange: PropTypes.func,
|
577
|
-
onTrafficChange: PropTypes.func
|
578
|
-
};
|
579
|
-
ProductTile.defaultProps = {
|
580
|
-
moreLinkText: 'Подробнее',
|
581
|
-
showMoreLink: true,
|
582
|
-
servicePacks: [],
|
583
|
-
info: {},
|
584
|
-
startCallsIndex: 0,
|
585
|
-
startTrafficIndex: 0,
|
586
|
-
usePackBuyLink: true,
|
587
|
-
linkTarget: '_self'
|
588
|
-
};
|
589
|
-
var _default = ProductTile;
|
590
|
-
exports["default"] = _default;
|
@@ -1,53 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import * as PropTypes from 'prop-types';
|
3
|
-
import { Button } from '@megafon/ui-core';
|
4
|
-
import './style/ProductTileBuy.less';
|
5
|
-
import { TLinkTargetType } from './ProductTile';
|
6
|
-
declare type IButtonProps = React.ComponentProps<typeof Button>;
|
7
|
-
export interface IProductTileBuyProps {
|
8
|
-
/** Class name */
|
9
|
-
className?: string;
|
10
|
-
/** Buy link */
|
11
|
-
buyLink?: string;
|
12
|
-
/** Buy Link target */
|
13
|
-
buyLinkTarget?: TLinkTargetType;
|
14
|
-
/** Buy button text */
|
15
|
-
buyButtonText?: string;
|
16
|
-
/** Show buy button */
|
17
|
-
showBuyButton?: boolean;
|
18
|
-
/** Connect link */
|
19
|
-
connectLink?: string;
|
20
|
-
/** Connect Link target */
|
21
|
-
connectLinkTarget?: TLinkTargetType;
|
22
|
-
/** Connect button text */
|
23
|
-
connectButtonText?: string;
|
24
|
-
/** Show connect button */
|
25
|
-
showConnectButton?: boolean;
|
26
|
-
/** button theme */
|
27
|
-
buttonTheme?: IButtonProps['theme'];
|
28
|
-
/** button type */
|
29
|
-
buttonType?: IButtonProps['type'];
|
30
|
-
/** button background color */
|
31
|
-
onClickConnect?(e: React.SyntheticEvent<EventTarget>): void;
|
32
|
-
/** Buy hander */
|
33
|
-
onClickBuy?(e: React.SyntheticEvent<EventTarget>): void;
|
34
|
-
}
|
35
|
-
declare class ProductTileBuy extends React.Component<IProductTileBuyProps> {
|
36
|
-
static propTypes: {
|
37
|
-
buyLink: PropTypes.Requireable<string>;
|
38
|
-
buyLinkTarget: PropTypes.Requireable<string>;
|
39
|
-
buyButtonText: PropTypes.Requireable<string>;
|
40
|
-
showBuyButton: PropTypes.Requireable<boolean>;
|
41
|
-
connectLink: PropTypes.Requireable<string>;
|
42
|
-
connectLinkTarget: PropTypes.Requireable<string>;
|
43
|
-
connectButtonText: PropTypes.Requireable<string>;
|
44
|
-
showConnectButton: PropTypes.Requireable<boolean>;
|
45
|
-
buttonTheme: React.Validator<"black" | "green" | "purple" | "white" | null | undefined> | undefined;
|
46
|
-
buttonType: React.Validator<"primary" | "outline" | null | undefined> | undefined;
|
47
|
-
onClickBuy: PropTypes.Requireable<(...args: any[]) => any>;
|
48
|
-
onClickConnect: PropTypes.Requireable<(...args: any[]) => any>;
|
49
|
-
};
|
50
|
-
static defaultProps: Partial<IProductTileBuyProps>;
|
51
|
-
render(): JSX.Element;
|
52
|
-
}
|
53
|
-
export default ProductTileBuy;
|