@automattic/plans-grid-next 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/dist/cjs/_shared.scss +4 -3
- package/dist/cjs/components/comparison-grid/index.js +99 -92
- package/dist/cjs/components/comparison-grid/index.js.map +1 -1
- package/dist/cjs/components/comparison-grid/style.scss +10 -2
- package/dist/cjs/components/features-grid/client-logo-list/client-list.js +0 -12
- package/dist/cjs/components/features-grid/client-logo-list/client-list.js.map +1 -1
- package/dist/cjs/components/features-grid/index.js +9 -6
- package/dist/cjs/components/features-grid/index.js.map +1 -1
- package/dist/cjs/components/features-grid/plan-features-list.js +10 -3
- package/dist/cjs/components/features-grid/plan-features-list.js.map +1 -1
- package/dist/cjs/components/features-grid/plan-headers.js +2 -2
- package/dist/cjs/components/features-grid/plan-headers.js.map +1 -1
- package/dist/cjs/components/features-grid/plan-tagline.js +1 -1
- package/dist/cjs/components/features-grid/plan-tagline.js.map +1 -1
- package/dist/cjs/components/features-grid/style.scss +107 -19
- package/dist/cjs/components/features-grid/table.js +1 -1
- package/dist/cjs/components/features-grid/table.js.map +1 -1
- package/dist/cjs/components/features.js +43 -4
- package/dist/cjs/components/features.js.map +1 -1
- package/dist/cjs/components/item.js +1 -1
- package/dist/cjs/components/item.js.map +1 -1
- package/dist/cjs/components/plan-button/index.js +5 -3
- package/dist/cjs/components/plan-button/index.js.map +1 -1
- package/dist/cjs/components/plan-button/style.scss +75 -51
- package/dist/cjs/components/plan-div-td-container.js +4 -1
- package/dist/cjs/components/plan-div-td-container.js.map +1 -1
- package/dist/cjs/components/plan-logo.js +6 -3
- package/dist/cjs/components/plan-logo.js.map +1 -1
- package/dist/cjs/components/plan-type-selector/components/interval-type-dropdown.js +12 -1
- package/dist/cjs/components/plan-type-selector/components/interval-type-dropdown.js.map +1 -1
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discount.js +4 -33
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discount.js.map +1 -1
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js +11 -13
- package/dist/cjs/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js.map +1 -1
- package/dist/cjs/components/plans-2023-tooltip.js +16 -5
- package/dist/cjs/components/plans-2023-tooltip.js.map +1 -1
- package/dist/cjs/components/shared/action-button/index.js +22 -7
- package/dist/cjs/components/shared/action-button/index.js.map +1 -1
- package/dist/cjs/components/shared/action-button/style.scss +4 -0
- package/dist/cjs/components/shared/billing-timeframe/index.js +8 -4
- package/dist/cjs/components/shared/billing-timeframe/index.js.map +1 -1
- package/dist/cjs/components/shared/header-price/index.js +60 -15
- package/dist/cjs/components/shared/header-price/index.js.map +1 -1
- package/dist/cjs/components/shared/header-price/style.scss +9 -3
- package/dist/cjs/components/shared/storage/components/plan-storage.js +2 -2
- package/dist/cjs/components/shared/storage/components/plan-storage.js.map +1 -1
- package/dist/cjs/components/shared/storage/components/storage-dropdown.js +29 -6
- package/dist/cjs/components/shared/storage/components/storage-dropdown.js.map +1 -1
- package/dist/cjs/components/shared/storage/components/storage-feature-label.js +2 -1
- package/dist/cjs/components/shared/storage/components/storage-feature-label.js.map +1 -1
- package/dist/cjs/components/shared/storage/hooks/use-plan-storage.js +2 -0
- package/dist/cjs/components/shared/storage/hooks/use-plan-storage.js.map +1 -1
- package/dist/cjs/fixtures/sites-purchases.js +2 -4
- package/dist/cjs/fixtures/sites-purchases.js.map +1 -1
- package/dist/cjs/grid-context.js +4 -1
- package/dist/cjs/grid-context.js.map +1 -1
- package/dist/cjs/hooks/data-store/get-renewal-pricing-text.js +50 -0
- package/dist/cjs/hooks/data-store/get-renewal-pricing-text.js.map +1 -0
- package/dist/cjs/hooks/data-store/use-grid-plans-for-comparison-grid.js +6 -1
- package/dist/cjs/hooks/data-store/use-grid-plans-for-comparison-grid.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-grid-plans-for-features-grid.js +6 -1
- package/dist/cjs/hooks/data-store/use-grid-plans-for-features-grid.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-grid-plans.js +175 -21
- package/dist/cjs/hooks/data-store/use-grid-plans.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-highlight-labels.js +13 -4
- package/dist/cjs/hooks/data-store/use-highlight-labels.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-plan-billing-description.js +68 -13
- package/dist/cjs/hooks/data-store/use-plan-billing-description.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-plan-features-for-grid-plans.js +76 -2
- package/dist/cjs/hooks/data-store/use-plan-features-for-grid-plans.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js +60 -12
- package/dist/cjs/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js.map +1 -1
- package/dist/cjs/hooks/data-store/use-title-badges.js +19 -0
- package/dist/cjs/hooks/data-store/use-title-badges.js.map +1 -0
- package/dist/cjs/hooks/use-is-large-currency.js +2 -2
- package/dist/cjs/hooks/use-is-large-currency.js.map +1 -1
- package/dist/cjs/hooks/use-visible-grid-plans.js +70 -0
- package/dist/cjs/hooks/use-visible-grid-plans.js.map +1 -0
- package/dist/cjs/index.js +6 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/lib/get-plan-features-object.js +15 -2
- package/dist/cjs/lib/get-plan-features-object.js.map +1 -1
- package/dist/cjs/lib/plan-pricing-utils.js +135 -0
- package/dist/cjs/lib/plan-pricing-utils.js.map +1 -0
- package/dist/esm/_shared.scss +4 -3
- package/dist/esm/components/comparison-grid/index.js +100 -93
- package/dist/esm/components/comparison-grid/index.js.map +1 -1
- package/dist/esm/components/comparison-grid/style.scss +10 -2
- package/dist/esm/components/features-grid/client-logo-list/client-list.js +0 -12
- package/dist/esm/components/features-grid/client-logo-list/client-list.js.map +1 -1
- package/dist/esm/components/features-grid/index.js +9 -6
- package/dist/esm/components/features-grid/index.js.map +1 -1
- package/dist/esm/components/features-grid/plan-features-list.js +10 -3
- package/dist/esm/components/features-grid/plan-features-list.js.map +1 -1
- package/dist/esm/components/features-grid/plan-headers.js +3 -3
- package/dist/esm/components/features-grid/plan-headers.js.map +1 -1
- package/dist/esm/components/features-grid/plan-tagline.js +1 -1
- package/dist/esm/components/features-grid/plan-tagline.js.map +1 -1
- package/dist/esm/components/features-grid/style.scss +107 -19
- package/dist/esm/components/features-grid/table.js +1 -1
- package/dist/esm/components/features-grid/table.js.map +1 -1
- package/dist/esm/components/features.js +44 -5
- package/dist/esm/components/features.js.map +1 -1
- package/dist/esm/components/item.js +1 -1
- package/dist/esm/components/item.js.map +1 -1
- package/dist/esm/components/plan-button/index.js +5 -3
- package/dist/esm/components/plan-button/index.js.map +1 -1
- package/dist/esm/components/plan-button/style.scss +75 -51
- package/dist/esm/components/plan-div-td-container.js +4 -1
- package/dist/esm/components/plan-div-td-container.js.map +1 -1
- package/dist/esm/components/plan-logo.js +7 -4
- package/dist/esm/components/plan-logo.js.map +1 -1
- package/dist/esm/components/plan-type-selector/components/interval-type-dropdown.js +12 -1
- package/dist/esm/components/plan-type-selector/components/interval-type-dropdown.js.map +1 -1
- package/dist/esm/components/plan-type-selector/hooks/use-max-discount.js +3 -33
- package/dist/esm/components/plan-type-selector/hooks/use-max-discount.js.map +1 -1
- package/dist/esm/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js +11 -13
- package/dist/esm/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.js.map +1 -1
- package/dist/esm/components/plans-2023-tooltip.js +16 -5
- package/dist/esm/components/plans-2023-tooltip.js.map +1 -1
- package/dist/esm/components/shared/action-button/index.js +22 -7
- package/dist/esm/components/shared/action-button/index.js.map +1 -1
- package/dist/esm/components/shared/action-button/style.scss +4 -0
- package/dist/esm/components/shared/billing-timeframe/index.js +8 -4
- package/dist/esm/components/shared/billing-timeframe/index.js.map +1 -1
- package/dist/esm/components/shared/header-price/index.js +60 -15
- package/dist/esm/components/shared/header-price/index.js.map +1 -1
- package/dist/esm/components/shared/header-price/style.scss +9 -3
- package/dist/esm/components/shared/storage/components/plan-storage.js +2 -2
- package/dist/esm/components/shared/storage/components/plan-storage.js.map +1 -1
- package/dist/esm/components/shared/storage/components/storage-dropdown.js +30 -7
- package/dist/esm/components/shared/storage/components/storage-dropdown.js.map +1 -1
- package/dist/esm/components/shared/storage/components/storage-feature-label.js +2 -1
- package/dist/esm/components/shared/storage/components/storage-feature-label.js.map +1 -1
- package/dist/esm/components/shared/storage/hooks/use-plan-storage.js +3 -1
- package/dist/esm/components/shared/storage/hooks/use-plan-storage.js.map +1 -1
- package/dist/esm/fixtures/sites-purchases.js +2 -4
- package/dist/esm/fixtures/sites-purchases.js.map +1 -1
- package/dist/esm/grid-context.js +4 -1
- package/dist/esm/grid-context.js.map +1 -1
- package/dist/esm/hooks/data-store/get-renewal-pricing-text.js +47 -0
- package/dist/esm/hooks/data-store/get-renewal-pricing-text.js.map +1 -0
- package/dist/esm/hooks/data-store/use-grid-plans-for-comparison-grid.js +6 -1
- package/dist/esm/hooks/data-store/use-grid-plans-for-comparison-grid.js.map +1 -1
- package/dist/esm/hooks/data-store/use-grid-plans-for-features-grid.js +6 -1
- package/dist/esm/hooks/data-store/use-grid-plans-for-features-grid.js.map +1 -1
- package/dist/esm/hooks/data-store/use-grid-plans.js +176 -22
- package/dist/esm/hooks/data-store/use-grid-plans.js.map +1 -1
- package/dist/esm/hooks/data-store/use-highlight-labels.js +14 -5
- package/dist/esm/hooks/data-store/use-highlight-labels.js.map +1 -1
- package/dist/esm/hooks/data-store/use-plan-billing-description.js +66 -11
- package/dist/esm/hooks/data-store/use-plan-billing-description.js.map +1 -1
- package/dist/esm/hooks/data-store/use-plan-features-for-grid-plans.js +77 -3
- package/dist/esm/hooks/data-store/use-plan-features-for-grid-plans.js.map +1 -1
- package/dist/esm/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js +59 -11
- package/dist/esm/hooks/data-store/use-restructured-plan-features-for-comparison-grid.js.map +1 -1
- package/dist/esm/hooks/data-store/use-title-badges.js +17 -0
- package/dist/esm/hooks/data-store/use-title-badges.js.map +1 -0
- package/dist/esm/hooks/use-is-large-currency.js +1 -1
- package/dist/esm/hooks/use-is-large-currency.js.map +1 -1
- package/dist/esm/hooks/use-visible-grid-plans.js +66 -0
- package/dist/esm/hooks/use-visible-grid-plans.js.map +1 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/lib/get-plan-features-object.js +15 -2
- package/dist/esm/lib/get-plan-features-object.js.map +1 -1
- package/dist/esm/lib/plan-pricing-utils.js +129 -0
- package/dist/esm/lib/plan-pricing-utils.js.map +1 -0
- package/dist/tsconfig-cjs.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/components/comparison-grid/index.d.ts +1 -1
- package/dist/types/components/comparison-grid/index.d.ts.map +1 -1
- package/dist/types/components/features-grid/client-logo-list/client-list.d.ts.map +1 -1
- package/dist/types/components/features-grid/index.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-features-list.d.ts.map +1 -1
- package/dist/types/components/features-grid/plan-headers.d.ts +2 -0
- package/dist/types/components/features-grid/plan-headers.d.ts.map +1 -1
- package/dist/types/components/features-grid/table.d.ts.map +1 -1
- package/dist/types/components/features.d.ts.map +1 -1
- package/dist/types/components/item.d.ts +2 -1
- package/dist/types/components/item.d.ts.map +1 -1
- package/dist/types/components/plan-button/index.d.ts +2 -1
- package/dist/types/components/plan-button/index.d.ts.map +1 -1
- package/dist/types/components/plan-div-td-container.d.ts +2 -0
- package/dist/types/components/plan-div-td-container.d.ts.map +1 -1
- package/dist/types/components/plan-logo.d.ts.map +1 -1
- package/dist/types/components/plan-type-selector/components/interval-type-dropdown.d.ts.map +1 -1
- package/dist/types/components/plan-type-selector/hooks/use-max-discount.d.ts.map +1 -1
- package/dist/types/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.d.ts.map +1 -1
- package/dist/types/components/plans-2023-tooltip.d.ts.map +1 -1
- package/dist/types/components/shared/action-button/index.d.ts +2 -1
- package/dist/types/components/shared/action-button/index.d.ts.map +1 -1
- package/dist/types/components/shared/billing-timeframe/index.d.ts.map +1 -1
- package/dist/types/components/shared/header-price/index.d.ts.map +1 -1
- package/dist/types/components/shared/storage/components/storage-dropdown.d.ts.map +1 -1
- package/dist/types/components/shared/storage/components/storage-feature-label.d.ts.map +1 -1
- package/dist/types/components/shared/storage/hooks/use-plan-storage.d.ts +1 -1
- package/dist/types/components/shared/storage/hooks/use-plan-storage.d.ts.map +1 -1
- package/dist/types/fixtures/sites-purchases.d.ts +2 -4
- package/dist/types/fixtures/sites-purchases.d.ts.map +1 -1
- package/dist/types/grid-context.d.ts +4 -1
- package/dist/types/grid-context.d.ts.map +1 -1
- package/dist/types/hooks/data-store/get-renewal-pricing-text.d.ts +14 -0
- package/dist/types/hooks/data-store/get-renewal-pricing-text.d.ts.map +1 -0
- package/dist/types/hooks/data-store/types.d.ts +21 -0
- package/dist/types/hooks/data-store/types.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-comparison-grid.d.ts +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-comparison-grid.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-features-grid.d.ts +1 -1
- package/dist/types/hooks/data-store/use-grid-plans-for-features-grid.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-grid-plans.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-highlight-labels.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-plan-billing-description.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-plan-features-for-grid-plans.d.ts +4 -1
- package/dist/types/hooks/data-store/use-plan-features-for-grid-plans.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-restructured-plan-features-for-comparison-grid.d.ts +4 -1
- package/dist/types/hooks/data-store/use-restructured-plan-features-for-comparison-grid.d.ts.map +1 -1
- package/dist/types/hooks/data-store/use-title-badges.d.ts +9 -0
- package/dist/types/hooks/data-store/use-title-badges.d.ts.map +1 -0
- package/dist/types/hooks/use-visible-grid-plans.d.ts +14 -0
- package/dist/types/hooks/use-visible-grid-plans.d.ts.map +1 -0
- package/dist/types/index.d.ts +7 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/get-plan-features-object.d.ts +1 -1
- package/dist/types/lib/get-plan-features-object.d.ts.map +1 -1
- package/dist/types/lib/plan-pricing-utils.d.ts +105 -0
- package/dist/types/lib/plan-pricing-utils.d.ts.map +1 -0
- package/dist/types/types.d.ts +29 -2
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +38 -28
- package/src/_shared.scss +4 -3
- package/src/components/comparison-grid/index.tsx +258 -181
- package/src/components/comparison-grid/style.scss +10 -2
- package/src/components/features-grid/client-logo-list/client-list.tsx +0 -25
- package/src/components/features-grid/index.tsx +35 -18
- package/src/components/features-grid/plan-features-list.tsx +15 -4
- package/src/components/features-grid/plan-headers.tsx +10 -3
- package/src/components/features-grid/plan-tagline.tsx +1 -1
- package/src/components/features-grid/style.scss +107 -19
- package/src/components/features-grid/table.tsx +4 -2
- package/src/components/features.tsx +66 -6
- package/src/components/item.tsx +6 -3
- package/src/components/plan-button/index.tsx +7 -1
- package/src/components/plan-button/style.scss +75 -51
- package/src/components/plan-div-td-container.tsx +6 -2
- package/src/components/plan-logo.tsx +16 -9
- package/src/components/plan-type-selector/components/interval-type-dropdown.tsx +14 -1
- package/src/components/plan-type-selector/hooks/use-max-discount.ts +8 -47
- package/src/components/plan-type-selector/hooks/use-max-discounts-for-plan-terms.ts +19 -17
- package/src/components/plans-2023-tooltip.tsx +17 -5
- package/src/components/shared/action-button/index.tsx +46 -5
- package/src/components/shared/action-button/style.scss +4 -0
- package/src/components/shared/billing-timeframe/index.tsx +12 -7
- package/src/components/shared/header-price/index.tsx +129 -27
- package/src/components/shared/header-price/style.scss +9 -3
- package/src/components/shared/storage/components/plan-storage.tsx +2 -2
- package/src/components/shared/storage/components/storage-dropdown.tsx +36 -15
- package/src/components/shared/storage/components/storage-feature-label.tsx +2 -1
- package/src/components/shared/storage/hooks/use-plan-storage.ts +3 -0
- package/src/components/test/actions-button.tsx +5 -0
- package/src/components/test/billing-timeframe.tsx +1 -1
- package/src/components/test/header-price.tsx +342 -4
- package/src/fixtures/sites-purchases.ts +2 -4
- package/src/grid-context.tsx +9 -0
- package/src/hooks/data-store/get-renewal-pricing-text.ts +73 -0
- package/src/hooks/data-store/types.ts +21 -0
- package/src/hooks/data-store/use-grid-plans-for-comparison-grid.ts +10 -0
- package/src/hooks/data-store/use-grid-plans-for-features-grid.ts +10 -0
- package/src/hooks/data-store/use-grid-plans.tsx +189 -23
- package/src/hooks/data-store/use-highlight-labels.ts +12 -3
- package/src/hooks/data-store/use-plan-billing-description.tsx +80 -15
- package/src/hooks/data-store/use-plan-features-for-grid-plans.ts +135 -1
- package/src/hooks/data-store/use-restructured-plan-features-for-comparison-grid.ts +93 -20
- package/src/hooks/data-store/use-title-badges.ts +31 -0
- package/src/hooks/test/use-visible-grid-plans.tsx +116 -0
- package/src/hooks/use-is-large-currency.ts +1 -1
- package/src/hooks/use-visible-grid-plans.tsx +102 -0
- package/src/index.tsx +18 -0
- package/src/lib/get-plan-features-object.ts +23 -2
- package/src/lib/plan-pricing-utils.ts +211 -0
- package/src/lib/test/plan-pricing-utils.ts +594 -0
- package/src/style-imports.d.ts +3 -0
- package/src/types.ts +41 -0
- package/dist/cjs/components/features-grid/mobile-free-domain.js +0 -25
- package/dist/cjs/components/features-grid/mobile-free-domain.js.map +0 -1
- package/dist/cjs/lib/get-plan-pricing-info-from-grid-plans.js +0 -15
- package/dist/cjs/lib/get-plan-pricing-info-from-grid-plans.js.map +0 -1
- package/dist/esm/components/features-grid/mobile-free-domain.js +0 -23
- package/dist/esm/components/features-grid/mobile-free-domain.js.map +0 -1
- package/dist/esm/lib/get-plan-pricing-info-from-grid-plans.js +0 -12
- package/dist/esm/lib/get-plan-pricing-info-from-grid-plans.js.map +0 -1
- package/dist/types/components/features-grid/mobile-free-domain.d.ts +0 -8
- package/dist/types/components/features-grid/mobile-free-domain.d.ts.map +0 -1
- package/dist/types/lib/get-plan-pricing-info-from-grid-plans.d.ts +0 -9
- package/dist/types/lib/get-plan-pricing-info-from-grid-plans.d.ts.map +0 -1
- package/src/components/features-grid/mobile-free-domain.tsx +0 -51
- package/src/lib/get-plan-pricing-info-from-grid-plans.ts +0 -31
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
-
const calypso_products_1 = require("@automattic/calypso-products");
|
|
5
|
-
const i18n_calypso_1 = require("i18n-calypso");
|
|
6
|
-
const item_1 = require("../item");
|
|
7
|
-
const MobileFreeDomain = ({ gridPlan: { planSlug, isMonthlyPlan, features }, paidDomainName, }) => {
|
|
8
|
-
const translate = (0, i18n_calypso_1.useTranslate)();
|
|
9
|
-
if (isMonthlyPlan || (0, calypso_products_1.isWpComFreePlan)(planSlug) || (0, calypso_products_1.isWpcomEnterpriseGridPlan)(planSlug)) {
|
|
10
|
-
return null;
|
|
11
|
-
}
|
|
12
|
-
// Remove the custom domain feature for Woo Express plans with introductory offer.
|
|
13
|
-
if ((0, calypso_products_1.isWooExpressPlan)(planSlug) &&
|
|
14
|
-
!features.wpcomFeatures.some((feature) => feature.getSlug() === calypso_products_1.FEATURE_CUSTOM_DOMAIN)) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
const displayText = paidDomainName
|
|
18
|
-
? translate('%(paidDomainName)s is included', {
|
|
19
|
-
args: { paidDomainName },
|
|
20
|
-
})
|
|
21
|
-
: translate('Free domain for one year');
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "plan-features-2023-grid__highlighted-feature", children: (0, jsx_runtime_1.jsx)(item_1.PlanFeaturesItem, { children: (0, jsx_runtime_1.jsx)("span", { className: "plan-features-2023-grid__item-info is-annual-plan-feature is-available", children: (0, jsx_runtime_1.jsx)("span", { className: "plan-features-2023-grid__item-title is-bold", children: displayText }) }) }) }));
|
|
23
|
-
};
|
|
24
|
-
exports.default = MobileFreeDomain;
|
|
25
|
-
//# sourceMappingURL=mobile-free-domain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-free-domain.js","sourceRoot":"","sources":["../../../../src/components/features-grid/mobile-free-domain.tsx"],"names":[],"mappings":";;;AAAA,mEAKsC;AACtC,+CAA4C;AAE5C,kCAA2C;AAO3C,MAAM,gBAAgB,GAAG,CAAE,EAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,EAC/C,cAAc,GACS,EAAG,EAAE;IAC5B,MAAM,SAAS,GAAG,IAAA,2BAAY,GAAE,CAAC;IAEjC,IAAK,aAAa,IAAI,IAAA,kCAAe,EAAE,QAAQ,CAAE,IAAI,IAAA,4CAAyB,EAAE,QAAQ,CAAE,EAAG,CAAC;QAC7F,OAAO,IAAI,CAAC;IACb,CAAC;IAED,kFAAkF;IAClF,IACC,IAAA,mCAAgB,EAAE,QAAQ,CAAE;QAC5B,CAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAE,CAAE,OAAO,EAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,wCAAqB,CAAE,EAC1F,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,WAAW,GAAG,cAAc;QACjC,CAAC,CAAC,SAAS,CAAE,gCAAgC,EAAE;YAC7C,IAAI,EAAE,EAAE,cAAc,EAAE;SACvB,CAAE;QACL,CAAC,CAAC,SAAS,CAAE,0BAA0B,CAAE,CAAC;IAE3C,OAAO,CACN,gCAAK,SAAS,EAAC,8CAA8C,YAC5D,uBAAC,uBAAgB,cAChB,iCAAM,SAAS,EAAC,wEAAwE,YACvF,iCAAM,SAAS,EAAC,6CAA6C,YAAG,WAAW,GAAS,GAC9E,GACW,GACd,CACN,CAAC;AACH,CAAC,CAAC;AAEF,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getPlanPricingInfoFromGridPlans = getPlanPricingInfoFromGridPlans;
|
|
4
|
-
function getPlanPricingInfoFromGridPlans({ gridPlans, returnMonthly = true, }) {
|
|
5
|
-
return gridPlans.reduce((acc, gridPlan) => {
|
|
6
|
-
const { pricing: { originalPrice, discountedPrice, currencyCode }, } = gridPlan;
|
|
7
|
-
const originalPriceForTerm = originalPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
8
|
-
const discountedPriceForTerm = discountedPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
9
|
-
return {
|
|
10
|
-
prices: [...acc.prices, originalPriceForTerm, discountedPriceForTerm],
|
|
11
|
-
...(currencyCode && { currencyCode }),
|
|
12
|
-
};
|
|
13
|
-
}, { prices: [], currencyCode: 'USD' });
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=get-plan-pricing-info-from-grid-plans.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-plan-pricing-info-from-grid-plans.js","sourceRoot":"","sources":["../../../src/lib/get-plan-pricing-info-from-grid-plans.ts"],"names":[],"mappings":";;AAOA,0EAuBC;AAvBD,SAAgB,+BAA+B,CAAE,EAChD,SAAS,EACT,aAAa,GAAG,IAAI,GAIpB;IACA,OAAO,SAAS,CAAC,MAAM,CACtB,CAAE,GAAgB,EAAE,QAAQ,EAAG,EAAE;QAChC,MAAM,EACL,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,GACzD,GAAG,QAAQ,CAAC;QAEb,MAAM,oBAAoB,GAAG,aAAa,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QACtF,MAAM,sBAAsB,GAAG,eAAe,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QAE1F,OAAO;YACN,MAAM,EAAE,CAAE,GAAG,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAE;YACvE,GAAG,CAAE,YAAY,IAAI,EAAE,YAAY,EAAE,CAAE;SACvC,CAAC;IACH,CAAC,EACD,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CACnC,CAAC;AACH,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FEATURE_CUSTOM_DOMAIN, isWooExpressPlan, isWpComFreePlan, isWpcomEnterpriseGridPlan, } from '@automattic/calypso-products';
|
|
3
|
-
import { useTranslate } from 'i18n-calypso';
|
|
4
|
-
import { PlanFeaturesItem } from '../item';
|
|
5
|
-
const MobileFreeDomain = ({ gridPlan: { planSlug, isMonthlyPlan, features }, paidDomainName, }) => {
|
|
6
|
-
const translate = useTranslate();
|
|
7
|
-
if (isMonthlyPlan || isWpComFreePlan(planSlug) || isWpcomEnterpriseGridPlan(planSlug)) {
|
|
8
|
-
return null;
|
|
9
|
-
}
|
|
10
|
-
// Remove the custom domain feature for Woo Express plans with introductory offer.
|
|
11
|
-
if (isWooExpressPlan(planSlug) &&
|
|
12
|
-
!features.wpcomFeatures.some((feature) => feature.getSlug() === FEATURE_CUSTOM_DOMAIN)) {
|
|
13
|
-
return null;
|
|
14
|
-
}
|
|
15
|
-
const displayText = paidDomainName
|
|
16
|
-
? translate('%(paidDomainName)s is included', {
|
|
17
|
-
args: { paidDomainName },
|
|
18
|
-
})
|
|
19
|
-
: translate('Free domain for one year');
|
|
20
|
-
return (_jsx("div", { className: "plan-features-2023-grid__highlighted-feature", children: _jsx(PlanFeaturesItem, { children: _jsx("span", { className: "plan-features-2023-grid__item-info is-annual-plan-feature is-available", children: _jsx("span", { className: "plan-features-2023-grid__item-title is-bold", children: displayText }) }) }) }));
|
|
21
|
-
};
|
|
22
|
-
export default MobileFreeDomain;
|
|
23
|
-
//# sourceMappingURL=mobile-free-domain.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-free-domain.js","sourceRoot":"","sources":["../../../../src/components/features-grid/mobile-free-domain.tsx"],"names":[],"mappings":";AAAA,OAAO,EACN,qBAAqB,EACrB,gBAAgB,EAChB,eAAe,EACf,yBAAyB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAO3C,MAAM,gBAAgB,GAAG,CAAE,EAC1B,QAAQ,EAAE,EAAE,QAAQ,EAAE,aAAa,EAAE,QAAQ,EAAE,EAC/C,cAAc,GACS,EAAG,EAAE;IAC5B,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,IAAK,aAAa,IAAI,eAAe,CAAE,QAAQ,CAAE,IAAI,yBAAyB,CAAE,QAAQ,CAAE,EAAG,CAAC;QAC7F,OAAO,IAAI,CAAC;IACb,CAAC;IAED,kFAAkF;IAClF,IACC,gBAAgB,CAAE,QAAQ,CAAE;QAC5B,CAAE,QAAQ,CAAC,aAAa,CAAC,IAAI,CAAE,CAAE,OAAO,EAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,qBAAqB,CAAE,EAC1F,CAAC;QACF,OAAO,IAAI,CAAC;IACb,CAAC;IAED,MAAM,WAAW,GAAG,cAAc;QACjC,CAAC,CAAC,SAAS,CAAE,gCAAgC,EAAE;YAC7C,IAAI,EAAE,EAAE,cAAc,EAAE;SACvB,CAAE;QACL,CAAC,CAAC,SAAS,CAAE,0BAA0B,CAAE,CAAC;IAE3C,OAAO,CACN,cAAK,SAAS,EAAC,8CAA8C,YAC5D,KAAC,gBAAgB,cAChB,eAAM,SAAS,EAAC,wEAAwE,YACvF,eAAM,SAAS,EAAC,6CAA6C,YAAG,WAAW,GAAS,GAC9E,GACW,GACd,CACN,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export function getPlanPricingInfoFromGridPlans({ gridPlans, returnMonthly = true, }) {
|
|
2
|
-
return gridPlans.reduce((acc, gridPlan) => {
|
|
3
|
-
const { pricing: { originalPrice, discountedPrice, currencyCode }, } = gridPlan;
|
|
4
|
-
const originalPriceForTerm = originalPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
5
|
-
const discountedPriceForTerm = discountedPrice[returnMonthly ? 'monthly' : 'full'] || 0;
|
|
6
|
-
return {
|
|
7
|
-
prices: [...acc.prices, originalPriceForTerm, discountedPriceForTerm],
|
|
8
|
-
...(currencyCode && { currencyCode }),
|
|
9
|
-
};
|
|
10
|
-
}, { prices: [], currencyCode: 'USD' });
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=get-plan-pricing-info-from-grid-plans.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-plan-pricing-info-from-grid-plans.js","sourceRoot":"","sources":["../../../src/lib/get-plan-pricing-info-from-grid-plans.ts"],"names":[],"mappings":"AAOA,MAAM,UAAU,+BAA+B,CAAE,EAChD,SAAS,EACT,aAAa,GAAG,IAAI,GAIpB;IACA,OAAO,SAAS,CAAC,MAAM,CACtB,CAAE,GAAgB,EAAE,QAAQ,EAAG,EAAE;QAChC,MAAM,EACL,OAAO,EAAE,EAAE,aAAa,EAAE,eAAe,EAAE,YAAY,EAAE,GACzD,GAAG,QAAQ,CAAC;QAEb,MAAM,oBAAoB,GAAG,aAAa,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QACtF,MAAM,sBAAsB,GAAG,eAAe,CAAE,aAAa,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC;QAE1F,OAAO;YACN,MAAM,EAAE,CAAE,GAAG,GAAG,CAAC,MAAM,EAAE,oBAAoB,EAAE,sBAAsB,CAAE;YACvE,GAAG,CAAE,YAAY,IAAI,EAAE,YAAY,EAAE,CAAE;SACvC,CAAC;IACH,CAAC,EACD,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,EAAE,CACnC,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { GridPlan } from '../../types';
|
|
2
|
-
type MobileFreeDomainProps = {
|
|
3
|
-
gridPlan: GridPlan;
|
|
4
|
-
paidDomainName?: string;
|
|
5
|
-
};
|
|
6
|
-
declare const MobileFreeDomain: ({ gridPlan: { planSlug, isMonthlyPlan, features }, paidDomainName, }: MobileFreeDomainProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
-
export default MobileFreeDomain;
|
|
8
|
-
//# sourceMappingURL=mobile-free-domain.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mobile-free-domain.d.ts","sourceRoot":"","sources":["../../../../src/components/features-grid/mobile-free-domain.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGvC,KAAK,qBAAqB,GAAG;IAC5B,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAEF,QAAA,MAAM,gBAAgB,GAAK,sEAGxB,qBAAqB,mDA8BvB,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { GridPlan } from '../types';
|
|
2
|
-
export declare function getPlanPricingInfoFromGridPlans({ gridPlans, returnMonthly, }: {
|
|
3
|
-
gridPlans: GridPlan[];
|
|
4
|
-
returnMonthly?: boolean;
|
|
5
|
-
}): {
|
|
6
|
-
currencyCode?: string | undefined;
|
|
7
|
-
prices: number[];
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=get-plan-pricing-info-from-grid-plans.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"get-plan-pricing-info-from-grid-plans.d.ts","sourceRoot":"","sources":["../../../src/lib/get-plan-pricing-info-from-grid-plans.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAOzC,wBAAgB,+BAA+B,CAAE,EAChD,SAAS,EACT,aAAoB,GACpB,EAAE;IACF,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;CACxB;;;EAiBA"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
FEATURE_CUSTOM_DOMAIN,
|
|
3
|
-
isWooExpressPlan,
|
|
4
|
-
isWpComFreePlan,
|
|
5
|
-
isWpcomEnterpriseGridPlan,
|
|
6
|
-
} from '@automattic/calypso-products';
|
|
7
|
-
import { useTranslate } from 'i18n-calypso';
|
|
8
|
-
import { GridPlan } from '../../types';
|
|
9
|
-
import { PlanFeaturesItem } from '../item';
|
|
10
|
-
|
|
11
|
-
type MobileFreeDomainProps = {
|
|
12
|
-
gridPlan: GridPlan;
|
|
13
|
-
paidDomainName?: string;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const MobileFreeDomain = ( {
|
|
17
|
-
gridPlan: { planSlug, isMonthlyPlan, features },
|
|
18
|
-
paidDomainName,
|
|
19
|
-
}: MobileFreeDomainProps ) => {
|
|
20
|
-
const translate = useTranslate();
|
|
21
|
-
|
|
22
|
-
if ( isMonthlyPlan || isWpComFreePlan( planSlug ) || isWpcomEnterpriseGridPlan( planSlug ) ) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// Remove the custom domain feature for Woo Express plans with introductory offer.
|
|
27
|
-
if (
|
|
28
|
-
isWooExpressPlan( planSlug ) &&
|
|
29
|
-
! features.wpcomFeatures.some( ( feature ) => feature.getSlug() === FEATURE_CUSTOM_DOMAIN )
|
|
30
|
-
) {
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
const displayText = paidDomainName
|
|
35
|
-
? translate( '%(paidDomainName)s is included', {
|
|
36
|
-
args: { paidDomainName },
|
|
37
|
-
} )
|
|
38
|
-
: translate( 'Free domain for one year' );
|
|
39
|
-
|
|
40
|
-
return (
|
|
41
|
-
<div className="plan-features-2023-grid__highlighted-feature">
|
|
42
|
-
<PlanFeaturesItem>
|
|
43
|
-
<span className="plan-features-2023-grid__item-info is-annual-plan-feature is-available">
|
|
44
|
-
<span className="plan-features-2023-grid__item-title is-bold">{ displayText }</span>
|
|
45
|
-
</span>
|
|
46
|
-
</PlanFeaturesItem>
|
|
47
|
-
</div>
|
|
48
|
-
);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
export default MobileFreeDomain;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { GridPlan } from '../types';
|
|
2
|
-
|
|
3
|
-
type PricingInfo = {
|
|
4
|
-
prices: number[];
|
|
5
|
-
currencyCode?: string;
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export function getPlanPricingInfoFromGridPlans( {
|
|
9
|
-
gridPlans,
|
|
10
|
-
returnMonthly = true,
|
|
11
|
-
}: {
|
|
12
|
-
gridPlans: GridPlan[];
|
|
13
|
-
returnMonthly?: boolean;
|
|
14
|
-
} ) {
|
|
15
|
-
return gridPlans.reduce(
|
|
16
|
-
( acc: PricingInfo, gridPlan ) => {
|
|
17
|
-
const {
|
|
18
|
-
pricing: { originalPrice, discountedPrice, currencyCode },
|
|
19
|
-
} = gridPlan;
|
|
20
|
-
|
|
21
|
-
const originalPriceForTerm = originalPrice[ returnMonthly ? 'monthly' : 'full' ] || 0;
|
|
22
|
-
const discountedPriceForTerm = discountedPrice[ returnMonthly ? 'monthly' : 'full' ] || 0;
|
|
23
|
-
|
|
24
|
-
return {
|
|
25
|
-
prices: [ ...acc.prices, originalPriceForTerm, discountedPriceForTerm ],
|
|
26
|
-
...( currencyCode && { currencyCode } ),
|
|
27
|
-
};
|
|
28
|
-
},
|
|
29
|
-
{ prices: [], currencyCode: 'USD' }
|
|
30
|
-
);
|
|
31
|
-
}
|