@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,497 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.array.concat";
|
2
|
-
import "core-js/modules/es.array.filter";
|
3
|
-
import "core-js/modules/es.array.for-each";
|
4
|
-
import "core-js/modules/es.array.sort";
|
5
|
-
import "core-js/modules/es.date.to-string";
|
6
|
-
import "core-js/modules/es.number.constructor";
|
7
|
-
import "core-js/modules/es.number.is-integer";
|
8
|
-
import "core-js/modules/es.object.keys";
|
9
|
-
import "core-js/modules/es.object.to-string";
|
10
|
-
import "core-js/modules/es.reflect.construct";
|
11
|
-
import "core-js/modules/es.regexp.to-string";
|
12
|
-
import "core-js/modules/es.string.link";
|
13
|
-
import "core-js/modules/web.dom-collections.for-each";
|
14
|
-
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
15
|
-
import _extends from "@babel/runtime/helpers/extends";
|
16
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
17
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
18
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
19
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
20
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
21
|
-
|
22
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
23
|
-
|
24
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
25
|
-
|
26
|
-
import * as React from 'react';
|
27
|
-
import * as PropTypes from 'prop-types';
|
28
|
-
import { cnCreate, TextLink } from '@megafon/ui-core';
|
29
|
-
import "./style/ProductTile.css";
|
30
|
-
import Hint from "./ProductTileHint";
|
31
|
-
import Cashback from "./ProductTileCashback";
|
32
|
-
import Static from "./ProductTileStatic";
|
33
|
-
import Dynamic from "./ProductTileDynamic";
|
34
|
-
import Price from "./ProductTilePrice";
|
35
|
-
import Options from "./ProductTileOptions";
|
36
|
-
import Buy from "./ProductTileBuy";
|
37
|
-
var LinkTargetType = PropTypes.oneOf(['_self', '_blank', '_parent', '_top']);
|
38
|
-
var cn = cnCreate('mfui-beta-product-tile');
|
39
|
-
|
40
|
-
var ProductTile = /*#__PURE__*/function (_React$Component) {
|
41
|
-
_inherits(ProductTile, _React$Component);
|
42
|
-
|
43
|
-
var _super = _createSuper(ProductTile);
|
44
|
-
|
45
|
-
function ProductTile(props) {
|
46
|
-
var _this;
|
47
|
-
|
48
|
-
_classCallCheck(this, ProductTile);
|
49
|
-
|
50
|
-
_this = _super.call(this, props);
|
51
|
-
|
52
|
-
_this.getTariffInfo = function () {
|
53
|
-
var _this$props = _this.props,
|
54
|
-
info = _this$props.info,
|
55
|
-
shopTag = _this$props.shopTag,
|
56
|
-
_this$props$payment = _this$props.payment,
|
57
|
-
unitValue = _this$props$payment.unitValue,
|
58
|
-
unitExtra = _this$props$payment.unitExtra;
|
59
|
-
var _this$state = _this.state,
|
60
|
-
_this$state$currentPa = _this$state.currentPack,
|
61
|
-
calls = _this$state$currentPa.calls,
|
62
|
-
traffic = _this$state$currentPa.traffic,
|
63
|
-
packShopTag = _this$state$currentPa.shopTag,
|
64
|
-
price = _this$state.price,
|
65
|
-
discount = _this$state.discount;
|
66
|
-
var callsValue = calls ? calls.value : 0;
|
67
|
-
var trafficValue = traffic ? traffic.value : 0;
|
68
|
-
var currentShopTag = packShopTag || shopTag || '';
|
69
|
-
var priceValue = discount ? discount : price;
|
70
|
-
return _extends(_extends(_extends({}, info), {
|
71
|
-
callsValue: callsValue,
|
72
|
-
trafficValue: trafficValue,
|
73
|
-
shopTag: currentShopTag,
|
74
|
-
price: priceValue,
|
75
|
-
unitValue: unitValue,
|
76
|
-
unitExtra: unitExtra
|
77
|
-
}), _this.defaultInfo);
|
78
|
-
};
|
79
|
-
|
80
|
-
_this.handleClickConnect = function (e) {
|
81
|
-
var onClickConnect = _this.props.onClickConnect;
|
82
|
-
onClickConnect && onClickConnect(_this.getTariffInfo(), e);
|
83
|
-
};
|
84
|
-
|
85
|
-
_this.handleClickBuy = function (e) {
|
86
|
-
var onClickBuy = _this.props.onClickBuy;
|
87
|
-
onClickBuy && onClickBuy(_this.getTariffInfo(), e);
|
88
|
-
};
|
89
|
-
|
90
|
-
_this.handleClickMore = function (e) {
|
91
|
-
var onClickMore = _this.props.onClickMore;
|
92
|
-
onClickMore && onClickMore(_this.getTariffInfo(), e);
|
93
|
-
};
|
94
|
-
|
95
|
-
_this.handleClickBubble = function () {
|
96
|
-
var onClickBubble = _this.props.onClickBubble;
|
97
|
-
onClickBubble && onClickBubble(_this.getTariffInfo());
|
98
|
-
};
|
99
|
-
|
100
|
-
_this.handleChangeCalls = function (_e, value, index) {
|
101
|
-
var currentValue = Number(value);
|
102
|
-
var onCallsChange = _this.props.onCallsChange;
|
103
|
-
var trafficValue = _this.state.trafficValue;
|
104
|
-
|
105
|
-
var currentPack = _this.getCurrentPack(currentValue, trafficValue);
|
106
|
-
|
107
|
-
if (Object.keys(currentPack).length === 0) {
|
108
|
-
return false;
|
109
|
-
}
|
110
|
-
|
111
|
-
onCallsChange && onCallsChange(index);
|
112
|
-
|
113
|
-
_this.setState(_extends(_extends({}, _this.getRestState(currentPack)), {
|
114
|
-
callsValue: currentValue,
|
115
|
-
callsIndex: index
|
116
|
-
}));
|
117
|
-
|
118
|
-
return true;
|
119
|
-
};
|
120
|
-
|
121
|
-
_this.handleChangeTraffic = function (_e, value, index) {
|
122
|
-
var currentValue = Number(value);
|
123
|
-
var onTrafficChange = _this.props.onTrafficChange;
|
124
|
-
var callsValue = _this.state.callsValue;
|
125
|
-
|
126
|
-
var currentPack = _this.getCurrentPack(callsValue, currentValue);
|
127
|
-
|
128
|
-
if (Object.keys(currentPack).length === 0) {
|
129
|
-
return false;
|
130
|
-
}
|
131
|
-
|
132
|
-
onTrafficChange && onTrafficChange(index);
|
133
|
-
|
134
|
-
_this.setState(_extends(_extends({}, _this.getRestState(currentPack)), {
|
135
|
-
trafficValue: currentValue,
|
136
|
-
trafficIndex: index
|
137
|
-
}));
|
138
|
-
|
139
|
-
return true;
|
140
|
-
};
|
141
|
-
|
142
|
-
var usePackBuyLink = props.usePackBuyLink,
|
143
|
-
servicePacks = props.servicePacks,
|
144
|
-
_props$payment = props.payment,
|
145
|
-
value = _props$payment.value,
|
146
|
-
discount = _props$payment.discount,
|
147
|
-
defaultBuyLink = props.buyLink,
|
148
|
-
secondParams = props.secondParams,
|
149
|
-
startCallsIndex = props.startCallsIndex,
|
150
|
-
startTrafficIndex = props.startTrafficIndex,
|
151
|
-
cookieCallsIndex = props.cookieCallsIndex,
|
152
|
-
cookieTrafficIndex = props.cookieTrafficIndex;
|
153
|
-
|
154
|
-
var switcher = _this.getSwitcherValues();
|
155
|
-
|
156
|
-
var defaultCallsValue = Number(switcher.calls[startCallsIndex]);
|
157
|
-
var defaultTrafficValue = Number(switcher.traffic[startTrafficIndex]);
|
158
|
-
var currentCallsIndex = Number.isInteger(cookieCallsIndex) ? cookieCallsIndex : startCallsIndex;
|
159
|
-
var currentCallsValue = Number(switcher.calls[currentCallsIndex]);
|
160
|
-
var currentTrafficIndex = Number.isInteger(cookieTrafficIndex) ? cookieTrafficIndex : startTrafficIndex;
|
161
|
-
var currentTrafficValue = Number(switcher.traffic[currentTrafficIndex]);
|
162
|
-
|
163
|
-
var currentPack = _this.getCurrentPack(currentCallsValue, currentTrafficValue);
|
164
|
-
|
165
|
-
var payment = currentPack.payment,
|
166
|
-
options = currentPack.options,
|
167
|
-
_currentPack$buyLink = currentPack.buyLink,
|
168
|
-
buyLink = _currentPack$buyLink === void 0 ? '' : _currentPack$buyLink,
|
169
|
-
_currentPack$shopTag = currentPack.shopTag,
|
170
|
-
shopTag = _currentPack$shopTag === void 0 ? '' : _currentPack$shopTag;
|
171
|
-
var defaultValues = {
|
172
|
-
defaultCallsValue: defaultCallsValue,
|
173
|
-
defaultTrafficValue: defaultTrafficValue,
|
174
|
-
defaultPayment: payment,
|
175
|
-
defaultBuyLink: buyLink
|
176
|
-
};
|
177
|
-
_this.defaultInfo = !servicePacks || servicePacks.length ? defaultValues : {};
|
178
|
-
_this.state = {
|
179
|
-
switcher: switcher,
|
180
|
-
currentPack: currentPack,
|
181
|
-
callsValue: currentCallsValue,
|
182
|
-
callsIndex: currentCallsIndex,
|
183
|
-
trafficValue: currentTrafficValue,
|
184
|
-
trafficIndex: currentTrafficIndex,
|
185
|
-
price: payment && payment.value || value,
|
186
|
-
discount: payment && payment.discount || discount || '',
|
187
|
-
options: options || secondParams,
|
188
|
-
buyLink: usePackBuyLink && buyLink || _this.formHashLink(defaultBuyLink || '', shopTag) || ''
|
189
|
-
};
|
190
|
-
return _this;
|
191
|
-
}
|
192
|
-
|
193
|
-
_createClass(ProductTile, [{
|
194
|
-
key: "getRestState",
|
195
|
-
value: function getRestState(currentPack) {
|
196
|
-
var _this$props2 = this.props,
|
197
|
-
_this$props2$buyLink = _this$props2.buyLink,
|
198
|
-
buyLink = _this$props2$buyLink === void 0 ? '' : _this$props2$buyLink,
|
199
|
-
usePackBuyLink = _this$props2.usePackBuyLink;
|
200
|
-
var _currentPack$shopTag2 = currentPack.shopTag,
|
201
|
-
shopTag = _currentPack$shopTag2 === void 0 ? '' : _currentPack$shopTag2;
|
202
|
-
return {
|
203
|
-
currentPack: currentPack,
|
204
|
-
price: currentPack.payment && currentPack.payment.value || '',
|
205
|
-
discount: currentPack.payment && currentPack.payment.discount || '',
|
206
|
-
options: currentPack.options || [],
|
207
|
-
buyLink: usePackBuyLink && currentPack.buyLink || this.formHashLink(buyLink, shopTag) || ''
|
208
|
-
};
|
209
|
-
}
|
210
|
-
}, {
|
211
|
-
key: "getCurrentPack",
|
212
|
-
value: function getCurrentPack(callsValue, trafficValue) {
|
213
|
-
var servicePacks = this.props.servicePacks;
|
214
|
-
|
215
|
-
var _servicePacks$filter = servicePacks.filter(function (pack) {
|
216
|
-
return pack.calls.value === callsValue && pack.traffic.value === trafficValue;
|
217
|
-
}),
|
218
|
-
_servicePacks$filter2 = _slicedToArray(_servicePacks$filter, 1),
|
219
|
-
_servicePacks$filter3 = _servicePacks$filter2[0],
|
220
|
-
currentPack = _servicePacks$filter3 === void 0 ? {} : _servicePacks$filter3;
|
221
|
-
|
222
|
-
return currentPack;
|
223
|
-
}
|
224
|
-
}, {
|
225
|
-
key: "getSwitcherValues",
|
226
|
-
value: function getSwitcherValues() {
|
227
|
-
var servicePacks = this.props.servicePacks;
|
228
|
-
var calls = {};
|
229
|
-
var traffic = {};
|
230
|
-
servicePacks.forEach(function (items) {
|
231
|
-
calls[String(items.calls.value)] = true;
|
232
|
-
traffic[String(items.traffic.value)] = true;
|
233
|
-
});
|
234
|
-
return {
|
235
|
-
calls: Object.keys(calls).sort(function (a, b) {
|
236
|
-
return Number(a) - Number(b);
|
237
|
-
}),
|
238
|
-
traffic: Object.keys(traffic).sort(function (a, b) {
|
239
|
-
return Number(a) - Number(b);
|
240
|
-
})
|
241
|
-
};
|
242
|
-
}
|
243
|
-
}, {
|
244
|
-
key: "renderStatic",
|
245
|
-
value: function renderStatic() {
|
246
|
-
var packs = this.props.packs;
|
247
|
-
|
248
|
-
if (!packs) {
|
249
|
-
return null;
|
250
|
-
}
|
251
|
-
|
252
|
-
return /*#__PURE__*/React.createElement(Static, {
|
253
|
-
packs: packs
|
254
|
-
});
|
255
|
-
}
|
256
|
-
}, {
|
257
|
-
key: "renderDynamic",
|
258
|
-
value: function renderDynamic() {
|
259
|
-
var _this$state2 = this.state,
|
260
|
-
switcher = _this$state2.switcher,
|
261
|
-
currentPack = _this$state2.currentPack,
|
262
|
-
callsIndex = _this$state2.callsIndex,
|
263
|
-
trafficIndex = _this$state2.trafficIndex;
|
264
|
-
return /*#__PURE__*/React.createElement(Dynamic, {
|
265
|
-
startCallsIndex: callsIndex,
|
266
|
-
startTrafficIndex: trafficIndex,
|
267
|
-
currentPack: currentPack,
|
268
|
-
switcher: switcher,
|
269
|
-
onChangeCalls: this.handleChangeCalls,
|
270
|
-
onChangeTraffic: this.handleChangeTraffic
|
271
|
-
});
|
272
|
-
}
|
273
|
-
}, {
|
274
|
-
key: "renderTitle",
|
275
|
-
value: function renderTitle() {
|
276
|
-
var _this$props3 = this.props,
|
277
|
-
title = _this$props3.title,
|
278
|
-
link = _this$props3.link,
|
279
|
-
linkTarget = _this$props3.linkTarget;
|
280
|
-
return /*#__PURE__*/React.createElement("h2", {
|
281
|
-
className: cn('title')
|
282
|
-
}, /*#__PURE__*/React.createElement(TextLink, {
|
283
|
-
className: cn('title-link'),
|
284
|
-
href: link,
|
285
|
-
target: linkTarget,
|
286
|
-
underlineStyle: "none",
|
287
|
-
color: "black",
|
288
|
-
onClick: this.handleClickMore
|
289
|
-
}, title));
|
290
|
-
}
|
291
|
-
}, {
|
292
|
-
key: "renderLink",
|
293
|
-
value: function renderLink() {
|
294
|
-
var _this$props4 = this.props,
|
295
|
-
_this$props4$link = _this$props4.link,
|
296
|
-
link = _this$props4$link === void 0 ? '' : _this$props4$link,
|
297
|
-
showMoreLink = _this$props4.showMoreLink,
|
298
|
-
moreLinkText = _this$props4.moreLinkText,
|
299
|
-
linkTarget = _this$props4.linkTarget;
|
300
|
-
|
301
|
-
if (!showMoreLink || !moreLinkText) {
|
302
|
-
return null;
|
303
|
-
}
|
304
|
-
|
305
|
-
var _this$state$currentPa2 = this.state.currentPack.shopTag,
|
306
|
-
shopTag = _this$state$currentPa2 === void 0 ? '' : _this$state$currentPa2;
|
307
|
-
var linkWithHash = this.formHashLink(link, shopTag);
|
308
|
-
return /*#__PURE__*/React.createElement("div", {
|
309
|
-
className: cn('link-wrapper')
|
310
|
-
}, /*#__PURE__*/React.createElement(TextLink, {
|
311
|
-
className: cn('detail-link'),
|
312
|
-
href: linkWithHash,
|
313
|
-
target: linkTarget,
|
314
|
-
onClick: this.handleClickMore
|
315
|
-
}, moreLinkText));
|
316
|
-
}
|
317
|
-
}, {
|
318
|
-
key: "formHashLink",
|
319
|
-
value: function formHashLink(link, shopTag) {
|
320
|
-
return !shopTag ? link : "".concat(link, "#").concat(shopTag);
|
321
|
-
}
|
322
|
-
}, {
|
323
|
-
key: "render",
|
324
|
-
value: function render() {
|
325
|
-
var _this$props5 = this.props,
|
326
|
-
servicePacks = _this$props5.servicePacks,
|
327
|
-
cashback = _this$props5.cashback,
|
328
|
-
firstParams = _this$props5.firstParams,
|
329
|
-
className = _this$props5.className,
|
330
|
-
buyButtonText = _this$props5.buyButtonText,
|
331
|
-
connectButtonText = _this$props5.connectButtonText,
|
332
|
-
topBadgeTitle = _this$props5.topBadgeTitle,
|
333
|
-
topBadgeLink = _this$props5.topBadgeLink,
|
334
|
-
secondParamsHead = _this$props5.secondParamsHead,
|
335
|
-
showConnectButton = _this$props5.showConnectButton,
|
336
|
-
showBuyButton = _this$props5.showBuyButton,
|
337
|
-
buttonTheme = _this$props5.buttonTheme,
|
338
|
-
buttonType = _this$props5.buttonType,
|
339
|
-
connectLink = _this$props5.connectLink,
|
340
|
-
topBadgeLinkTarget = _this$props5.topBadgeLinkTarget,
|
341
|
-
buyLinkTarget = _this$props5.buyLinkTarget,
|
342
|
-
connectLinkTarget = _this$props5.connectLinkTarget,
|
343
|
-
isActive = _this$props5.isActive,
|
344
|
-
_this$props5$payment = _this$props5.payment,
|
345
|
-
title = _this$props5$payment.title,
|
346
|
-
unitExtra = _this$props5$payment.unitExtra,
|
347
|
-
unitValue = _this$props5$payment.unitValue;
|
348
|
-
var _this$state3 = this.state,
|
349
|
-
price = _this$state3.price,
|
350
|
-
discount = _this$state3.discount,
|
351
|
-
options = _this$state3.options,
|
352
|
-
buyLink = _this$state3.buyLink;
|
353
|
-
var isServicePacks = !!servicePacks.length;
|
354
|
-
return /*#__PURE__*/React.createElement("div", {
|
355
|
-
className: cn('', {
|
356
|
-
constructor: isServicePacks,
|
357
|
-
active: isActive
|
358
|
-
}, className)
|
359
|
-
}, isServicePacks && !!topBadgeTitle && /*#__PURE__*/React.createElement(Hint, {
|
360
|
-
title: topBadgeTitle,
|
361
|
-
linkHref: topBadgeLink,
|
362
|
-
linkTarget: topBadgeLinkTarget
|
363
|
-
}), /*#__PURE__*/React.createElement("div", {
|
364
|
-
className: cn('content')
|
365
|
-
}, this.renderTitle(), this.renderLink(), /*#__PURE__*/React.createElement(Cashback, cashback), /*#__PURE__*/React.createElement(Price, {
|
366
|
-
title: title,
|
367
|
-
value: price,
|
368
|
-
discount: discount,
|
369
|
-
unitExtra: unitExtra,
|
370
|
-
unitValue: unitValue
|
371
|
-
}), /*#__PURE__*/React.createElement("div", {
|
372
|
-
className: cn('constructor')
|
373
|
-
}, isServicePacks ? this.renderDynamic() : this.renderStatic(), /*#__PURE__*/React.createElement(Options, {
|
374
|
-
options: firstParams.items
|
375
|
-
})), /*#__PURE__*/React.createElement(Options, {
|
376
|
-
options: options,
|
377
|
-
head: secondParamsHead,
|
378
|
-
onClickBubble: this.handleClickBubble
|
379
|
-
})), /*#__PURE__*/React.createElement(Buy, {
|
380
|
-
buyLink: buyLink,
|
381
|
-
buyLinkTarget: buyLinkTarget,
|
382
|
-
connectLink: connectLink,
|
383
|
-
connectLinkTarget: connectLinkTarget,
|
384
|
-
buyButtonText: buyButtonText,
|
385
|
-
connectButtonText: connectButtonText,
|
386
|
-
showBuyButton: showBuyButton,
|
387
|
-
showConnectButton: showConnectButton,
|
388
|
-
buttonTheme: buttonTheme,
|
389
|
-
buttonType: buttonType,
|
390
|
-
onClickBuy: this.handleClickBuy,
|
391
|
-
onClickConnect: this.handleClickConnect
|
392
|
-
}));
|
393
|
-
}
|
394
|
-
}]);
|
395
|
-
|
396
|
-
return ProductTile;
|
397
|
-
}(React.Component);
|
398
|
-
|
399
|
-
ProductTile.propTypes = {
|
400
|
-
title: PropTypes.string.isRequired,
|
401
|
-
topBadgeTitle: PropTypes.string,
|
402
|
-
topBadgeLink: PropTypes.string,
|
403
|
-
topBadgeLinkTarget: LinkTargetType,
|
404
|
-
secondParamsHead: PropTypes.string,
|
405
|
-
shopTag: PropTypes.string,
|
406
|
-
startCallsIndex: PropTypes.number,
|
407
|
-
startTrafficIndex: PropTypes.number,
|
408
|
-
cookieCallsIndex: PropTypes.number,
|
409
|
-
cookieTrafficIndex: PropTypes.number,
|
410
|
-
link: PropTypes.string,
|
411
|
-
linkTarget: LinkTargetType,
|
412
|
-
moreLinkText: PropTypes.string,
|
413
|
-
showMoreLink: PropTypes.bool,
|
414
|
-
buyLink: PropTypes.string,
|
415
|
-
buyLinkTarget: LinkTargetType,
|
416
|
-
usePackBuyLink: PropTypes.bool,
|
417
|
-
buyButtonText: PropTypes.string,
|
418
|
-
buttonTheme: Buy.propTypes.buttonTheme,
|
419
|
-
buttonType: Buy.propTypes.buttonType,
|
420
|
-
showBuyButton: PropTypes.bool,
|
421
|
-
connectLink: PropTypes.string,
|
422
|
-
connectLinkTarget: LinkTargetType,
|
423
|
-
connectButtonText: PropTypes.string,
|
424
|
-
showConnectButton: PropTypes.bool,
|
425
|
-
payment: PropTypes.shape({
|
426
|
-
title: PropTypes.string,
|
427
|
-
value: PropTypes.string.isRequired,
|
428
|
-
unitExtra: PropTypes.string,
|
429
|
-
unitValue: PropTypes.string,
|
430
|
-
discount: PropTypes.string
|
431
|
-
}).isRequired,
|
432
|
-
packs: PropTypes.arrayOf(PropTypes.shape({
|
433
|
-
value: PropTypes.number,
|
434
|
-
unit: PropTypes.string
|
435
|
-
})),
|
436
|
-
secondParams: PropTypes.arrayOf(PropTypes.shape({
|
437
|
-
title: PropTypes.string,
|
438
|
-
footnote: PropTypes.string,
|
439
|
-
value: PropTypes.string,
|
440
|
-
unit: PropTypes.string,
|
441
|
-
svgIcon: PropTypes.element
|
442
|
-
})).isRequired,
|
443
|
-
cashback: PropTypes.shape({
|
444
|
-
title: PropTypes.string,
|
445
|
-
value: PropTypes.number,
|
446
|
-
unit: PropTypes.string
|
447
|
-
}).isRequired,
|
448
|
-
firstParams: PropTypes.shape({
|
449
|
-
items: PropTypes.arrayOf(PropTypes.shape({
|
450
|
-
title: PropTypes.string,
|
451
|
-
caption: PropTypes.string,
|
452
|
-
svgIcon: PropTypes.element
|
453
|
-
}))
|
454
|
-
}).isRequired,
|
455
|
-
servicePacks: PropTypes.arrayOf(PropTypes.shape({
|
456
|
-
buyLink: PropTypes.string,
|
457
|
-
calls: PropTypes.shape({
|
458
|
-
value: PropTypes.number,
|
459
|
-
unit: PropTypes.string
|
460
|
-
}),
|
461
|
-
traffic: PropTypes.shape({
|
462
|
-
value: PropTypes.number,
|
463
|
-
unit: PropTypes.string
|
464
|
-
}),
|
465
|
-
options: PropTypes.arrayOf(PropTypes.shape({
|
466
|
-
title: PropTypes.string,
|
467
|
-
caption: PropTypes.string,
|
468
|
-
value: PropTypes.string,
|
469
|
-
unit: PropTypes.string,
|
470
|
-
footnote: PropTypes.string,
|
471
|
-
svgIcon: PropTypes.element
|
472
|
-
})),
|
473
|
-
payment: PropTypes.shape({
|
474
|
-
value: PropTypes.string.isRequired,
|
475
|
-
discount: PropTypes.string
|
476
|
-
})
|
477
|
-
})),
|
478
|
-
info: PropTypes.object,
|
479
|
-
isActive: PropTypes.bool,
|
480
|
-
onClickConnect: PropTypes.func,
|
481
|
-
onClickBuy: PropTypes.func,
|
482
|
-
onClickMore: PropTypes.func,
|
483
|
-
onClickBubble: PropTypes.func,
|
484
|
-
onCallsChange: PropTypes.func,
|
485
|
-
onTrafficChange: PropTypes.func
|
486
|
-
};
|
487
|
-
ProductTile.defaultProps = {
|
488
|
-
moreLinkText: 'Подробнее',
|
489
|
-
showMoreLink: true,
|
490
|
-
servicePacks: [],
|
491
|
-
info: {},
|
492
|
-
startCallsIndex: 0,
|
493
|
-
startTrafficIndex: 0,
|
494
|
-
usePackBuyLink: true,
|
495
|
-
linkTarget: '_self'
|
496
|
-
};
|
497
|
-
export default ProductTile;
|
@@ -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;
|
@@ -1,99 +0,0 @@
|
|
1
|
-
import "core-js/modules/es.date.to-string";
|
2
|
-
import "core-js/modules/es.object.to-string";
|
3
|
-
import "core-js/modules/es.reflect.construct";
|
4
|
-
import "core-js/modules/es.regexp.to-string";
|
5
|
-
import _classCallCheck from "@babel/runtime/helpers/classCallCheck";
|
6
|
-
import _createClass from "@babel/runtime/helpers/createClass";
|
7
|
-
import _inherits from "@babel/runtime/helpers/inherits";
|
8
|
-
import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
|
9
|
-
import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
|
10
|
-
|
11
|
-
function _createSuper(Derived) { return function () { var Super = _getPrototypeOf(Derived), result; if (_isNativeReflectConstruct()) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
12
|
-
|
13
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
14
|
-
|
15
|
-
var _a, _b;
|
16
|
-
|
17
|
-
import * as React from 'react';
|
18
|
-
import * as PropTypes from 'prop-types';
|
19
|
-
import { cnCreate, Button, TextLink } from '@megafon/ui-core';
|
20
|
-
import "./style/ProductTileBuy.css";
|
21
|
-
var cn = cnCreate('mfui-beta-product-tile-buy');
|
22
|
-
|
23
|
-
var ProductTileBuy = /*#__PURE__*/function (_React$Component) {
|
24
|
-
_inherits(ProductTileBuy, _React$Component);
|
25
|
-
|
26
|
-
var _super = _createSuper(ProductTileBuy);
|
27
|
-
|
28
|
-
function ProductTileBuy() {
|
29
|
-
_classCallCheck(this, ProductTileBuy);
|
30
|
-
|
31
|
-
return _super.apply(this, arguments);
|
32
|
-
}
|
33
|
-
|
34
|
-
_createClass(ProductTileBuy, [{
|
35
|
-
key: "render",
|
36
|
-
value: function render() {
|
37
|
-
var _this$props = this.props,
|
38
|
-
className = _this$props.className,
|
39
|
-
buyLink = _this$props.buyLink,
|
40
|
-
buyButtonText = _this$props.buyButtonText,
|
41
|
-
showBuyButton = _this$props.showBuyButton,
|
42
|
-
connectLink = _this$props.connectLink,
|
43
|
-
connectButtonText = _this$props.connectButtonText,
|
44
|
-
showConnectButton = _this$props.showConnectButton,
|
45
|
-
buttonTheme = _this$props.buttonTheme,
|
46
|
-
buttonType = _this$props.buttonType,
|
47
|
-
onClickBuy = _this$props.onClickBuy,
|
48
|
-
onClickConnect = _this$props.onClickConnect,
|
49
|
-
buyLinkTarget = _this$props.buyLinkTarget,
|
50
|
-
connectLinkTarget = _this$props.connectLinkTarget;
|
51
|
-
return /*#__PURE__*/React.createElement("div", {
|
52
|
-
className: cn('', {}, className)
|
53
|
-
}, showBuyButton && /*#__PURE__*/React.createElement(Button, {
|
54
|
-
classes: {
|
55
|
-
root: cn('button', {
|
56
|
-
'single-button': !showConnectButton
|
57
|
-
})
|
58
|
-
},
|
59
|
-
theme: buttonTheme,
|
60
|
-
type: buttonType,
|
61
|
-
sizeAll: "medium",
|
62
|
-
href: buyLink,
|
63
|
-
target: buyLinkTarget,
|
64
|
-
onClick: onClickBuy
|
65
|
-
}, buyButtonText), showConnectButton && /*#__PURE__*/React.createElement(TextLink, {
|
66
|
-
className: cn('detail-link'),
|
67
|
-
href: connectLink,
|
68
|
-
target: connectLinkTarget,
|
69
|
-
onClick: onClickConnect
|
70
|
-
}, connectButtonText));
|
71
|
-
}
|
72
|
-
}]);
|
73
|
-
|
74
|
-
return ProductTileBuy;
|
75
|
-
}(React.Component);
|
76
|
-
|
77
|
-
ProductTileBuy.propTypes = {
|
78
|
-
buyLink: PropTypes.string,
|
79
|
-
buyLinkTarget: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
80
|
-
buyButtonText: PropTypes.string,
|
81
|
-
showBuyButton: PropTypes.bool,
|
82
|
-
connectLink: PropTypes.string,
|
83
|
-
connectLinkTarget: PropTypes.oneOf(['_self', '_blank', '_parent', '_top']),
|
84
|
-
connectButtonText: PropTypes.string,
|
85
|
-
showConnectButton: PropTypes.bool,
|
86
|
-
buttonTheme: (_a = Button.propTypes) === null || _a === void 0 ? void 0 : _a.theme,
|
87
|
-
buttonType: (_b = Button.propTypes) === null || _b === void 0 ? void 0 : _b.type,
|
88
|
-
onClickBuy: PropTypes.func,
|
89
|
-
onClickConnect: PropTypes.func
|
90
|
-
};
|
91
|
-
ProductTileBuy.defaultProps = {
|
92
|
-
buyButtonText: 'Купить',
|
93
|
-
showBuyButton: true,
|
94
|
-
connectButtonText: 'Перейти на тариф',
|
95
|
-
showConnectButton: true,
|
96
|
-
buyLinkTarget: '_self',
|
97
|
-
connectLinkTarget: '_self'
|
98
|
-
};
|
99
|
-
export default ProductTileBuy;
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
import * as PropTypes from 'prop-types';
|
3
|
-
import './style/ProductTileCashback.less';
|
4
|
-
export interface IProductTileCashbackProps {
|
5
|
-
/** title */
|
6
|
-
title?: string;
|
7
|
-
/** value */
|
8
|
-
value?: number;
|
9
|
-
/** unit */
|
10
|
-
unit?: string;
|
11
|
-
}
|
12
|
-
declare class ProductTileCashback extends React.Component<IProductTileCashbackProps> {
|
13
|
-
static propTypes: {
|
14
|
-
title: PropTypes.Requireable<string>;
|
15
|
-
value: PropTypes.Requireable<number>;
|
16
|
-
unit: PropTypes.Requireable<string>;
|
17
|
-
};
|
18
|
-
render(): JSX.Element | null;
|
19
|
-
}
|
20
|
-
export default ProductTileCashback;
|