@wix/pricing-plans-site-api 1.0.1 → 1.0.2
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/README.md +27 -1
- package/dist/index.d.ts +122 -1
- package/dist/index.js +220 -2
- package/dist/index.js.map +1 -1
- package/dist/messages_ar.dev-DiDnJZZh.js +29 -0
- package/dist/messages_ar.dev-DiDnJZZh.js.map +1 -0
- package/dist/messages_de.dev-U8qwqpK1.js +29 -0
- package/dist/messages_de.dev-U8qwqpK1.js.map +1 -0
- package/dist/messages_es.dev-CC4HAHgh.js +29 -0
- package/dist/messages_es.dev-CC4HAHgh.js.map +1 -0
- package/dist/messages_fr.dev-B9BwbSpM.js +29 -0
- package/dist/messages_fr.dev-B9BwbSpM.js.map +1 -0
- package/dist/messages_he.dev-irsn8eQx.js +29 -0
- package/dist/messages_he.dev-irsn8eQx.js.map +1 -0
- package/dist/messages_ja.dev-B3764ZvN.js +29 -0
- package/dist/messages_ja.dev-B3764ZvN.js.map +1 -0
- package/dist/messages_pl.dev-EfItm9Oi.js +29 -0
- package/dist/messages_pl.dev-EfItm9Oi.js.map +1 -0
- package/dist/messages_pt.dev-BZ6FphPD.js +29 -0
- package/dist/messages_pt.dev-BZ6FphPD.js.map +1 -0
- package/dist/messages_ru.dev-Dcg_zhGV.js +29 -0
- package/dist/messages_ru.dev-Dcg_zhGV.js.map +1 -0
- package/package.json +8 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @wix/pricing-plans-site-api
|
|
2
2
|
|
|
3
|
-
Lets other verticals send site visitors to Pricing Plans pages from their own React components. It replaces the legacy Pricing Plans public API (`getPricingPlansPublicAPI` from `@wix/pricing-plans-tpa-api`).
|
|
3
|
+
Lets other verticals send site visitors to Pricing Plans pages from their own React components, and show a plan's pricing texts in the site's language. It replaces the legacy Pricing Plans public API (`getPricingPlansPublicAPI` from `@wix/pricing-plans-tpa-api`).
|
|
4
4
|
|
|
5
5
|
The site can run either the legacy Pricing Plans app or the new Builder app. The hook works out which one is installed and calls that app's navigation, so the vertical's code is the same for both.
|
|
6
6
|
|
|
@@ -49,6 +49,32 @@ Each method returns a promise. It rejects when the site doesn't have the page, a
|
|
|
49
49
|
|
|
50
50
|
The hook works on any site, even one without Pricing Plans. There, every method rejects with `Pricing Plans is not installed on the site.` and doesn't navigate, so catch the error if your component can render on such sites.
|
|
51
51
|
|
|
52
|
+
## Pricing texts
|
|
53
|
+
|
|
54
|
+
`usePricingPlansPricingDetails({ initI18n, language })` returns a plan's pricing texts, translated and formatted for the site, like the legacy `getTranslatedPricingDetails` and `getTranslatedPricingDetailsPerVariant`:
|
|
55
|
+
|
|
56
|
+
- `getTranslatedPricingDetails(plan, options?)` returns the plan's price, billing cycle, duration, free trial and additional fees. A plan with more than one pricing variant gets "Multiple pricing options" as its price. `options.trimTrailingZeroes` turns `$10.00` into `$10`.
|
|
57
|
+
- `getTranslatedPricingDetailsPerVariant(plan, options?)` returns the same texts for each pricing variant, with its `pricingVariantId`, and its `categoryName` when you pass `options.variantCategoryNameById`.
|
|
58
|
+
|
|
59
|
+
They take a plan from `plansV3` of `@wix/pricing-plans`. The legacy methods also took a v2 `PublicPlan`; these don't. The texts depend only on the plan, so the hook works with both apps and on any site, and needs no `serviceDependencies`.
|
|
60
|
+
|
|
61
|
+
Pass the factory your app builds its i18next instances with, such as `initI18n` of `@wix/fed-cli-i18next` or of `@wix/wix-i18n-config`. The hook builds its own instance with it, so the i18next runtime isn't bundled twice and your app's own instance and translations aren't changed. The factory's instances have to format ICU messages, and the methods reject when they don't:
|
|
62
|
+
|
|
63
|
+
```tsx
|
|
64
|
+
import { i18n as essentialsI18n } from '@wix/essentials';
|
|
65
|
+
import { initI18n } from '@wix/fed-cli-i18next';
|
|
66
|
+
import { usePricingPlansPricingDetails } from '@wix/pricing-plans-site-api';
|
|
67
|
+
|
|
68
|
+
const { getTranslatedPricingDetails } = usePricingPlansPricingDetails({
|
|
69
|
+
initI18n,
|
|
70
|
+
language: essentialsI18n.getLanguage(),
|
|
71
|
+
});
|
|
72
|
+
|
|
73
|
+
const { price, cycle, duration } = await getTranslatedPricingDetails(plan);
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
`language` is the language of the texts, such as `pt`, and prices are formatted in it too. A regional language such as `pt-BR` gets the texts of `pt` when it has no translations of its own, and English when neither has.
|
|
77
|
+
|
|
52
78
|
## Builder app support
|
|
53
79
|
|
|
54
80
|
On the legacy app, every option works as before. The Builder app reads fewer options:
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import "@wix/react-component-utils";
|
|
2
|
+
import { plansV3 } from "@wix/pricing-plans";
|
|
2
3
|
//#region src/types.d.ts
|
|
3
4
|
type BiOptions = {
|
|
4
5
|
referralInfo: string;
|
|
@@ -97,6 +98,126 @@ type PricingPlansSiteApi = {
|
|
|
97
98
|
*/
|
|
98
99
|
navigateToPlanPage(options: NavigateToPlanPageOptions): Promise<void>;
|
|
99
100
|
};
|
|
101
|
+
type FormattedAdditionalFee = {
|
|
102
|
+
name: string;
|
|
103
|
+
amount: string;
|
|
104
|
+
};
|
|
105
|
+
type TranslatedPricingDetails = {
|
|
106
|
+
price: string;
|
|
107
|
+
cycle: string;
|
|
108
|
+
duration: string;
|
|
109
|
+
freeTrial: string;
|
|
110
|
+
additionalFees: FormattedAdditionalFee[];
|
|
111
|
+
};
|
|
112
|
+
type TranslatedVariantPricingDetails = TranslatedPricingDetails & {
|
|
113
|
+
/** ID of the pricing variant these texts describe. */
|
|
114
|
+
pricingVariantId: string;
|
|
115
|
+
/**
|
|
116
|
+
* Name of the variant's pricing variant category, such as "Monthly" or "Annually", the label to
|
|
117
|
+
* show next to the plan name.
|
|
118
|
+
*
|
|
119
|
+
* Read from `variantCategoryNameById`, so it's undefined when that option isn't passed and when
|
|
120
|
+
* the variant has no category.
|
|
121
|
+
*/
|
|
122
|
+
categoryName?: string;
|
|
123
|
+
};
|
|
124
|
+
type GetTranslatedPricingDetailsOptions = {
|
|
125
|
+
/**
|
|
126
|
+
* Trims trailing fraction zeroes from the plan price and the additional fees: `$10.00` becomes
|
|
127
|
+
* `$10`, and `$10.50` stays the same. Defaults to `false`.
|
|
128
|
+
*/
|
|
129
|
+
trimTrailingZeroes?: boolean;
|
|
130
|
+
};
|
|
131
|
+
type GetTranslatedPricingDetailsPerVariantOptions = GetTranslatedPricingDetailsOptions & {
|
|
132
|
+
/**
|
|
133
|
+
* Pricing variant category names by category ID, used for `categoryName` of each entry.
|
|
134
|
+
*
|
|
135
|
+
* The plan doesn't include category names, so read them separately and pass them in. Without this
|
|
136
|
+
* option, no entry has a `categoryName`.
|
|
137
|
+
*/
|
|
138
|
+
variantCategoryNameById?: Record<string, string>;
|
|
139
|
+
};
|
|
140
|
+
/** The parts of an i18next instance the pricing texts use. */
|
|
141
|
+
type I18n = {
|
|
142
|
+
isInitialized: boolean;
|
|
143
|
+
modules?: {
|
|
144
|
+
i18nFormat?: unknown;
|
|
145
|
+
};
|
|
146
|
+
on(event: 'initialized', callback: () => void): unknown;
|
|
147
|
+
t(...args: never[]): unknown;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Factory that builds an i18next instance, such as `initI18n` of `@wix/fed-cli-i18next`. The
|
|
151
|
+
* pricing texts build their own instance with it, so the i18next runtime stays with the app and its
|
|
152
|
+
* own instance isn't changed. The instance has to format ICU messages.
|
|
153
|
+
*/
|
|
154
|
+
type InitI18n = (options: {
|
|
155
|
+
locale: string;
|
|
156
|
+
messages: Record<string, string>;
|
|
157
|
+
}) => I18n;
|
|
158
|
+
type PricingDetailsOptions = {
|
|
159
|
+
/** Factory of the app's i18next instances, such as `initI18n` of `@wix/fed-cli-i18next`. */
|
|
160
|
+
initI18n: InitI18n;
|
|
161
|
+
/**
|
|
162
|
+
* Language of the pricing texts, such as `pt`. Use `i18n.getLanguage()` of `@wix/essentials` for
|
|
163
|
+
* the site's language. A regional language such as `pt-BR` gets the texts of `pt` when it has no
|
|
164
|
+
* translations of its own, and English when neither has. Prices are formatted in it too.
|
|
165
|
+
*/
|
|
166
|
+
language: string;
|
|
167
|
+
};
|
|
168
|
+
type PricingDetailsApi = {
|
|
169
|
+
/**
|
|
170
|
+
* Pricing texts of a plan in the site's language, like the legacy `getTranslatedPricingDetails`:
|
|
171
|
+
* its price, billing cycle, duration, free trial and additional fees.
|
|
172
|
+
*
|
|
173
|
+
* A plan with more than one pricing variant gets "Multiple pricing options" as its price, no
|
|
174
|
+
* `cycle`, and the free trial of the first variant that has one. Use
|
|
175
|
+
* {@link getTranslatedPricingDetailsPerVariant} to get the texts of every variant.
|
|
176
|
+
*
|
|
177
|
+
* Works with both apps, and on sites without Pricing Plans.
|
|
178
|
+
*
|
|
179
|
+
* @param plan A Pricing Plans plan, as `@wix/pricing-plans` `plansV3` returns it.
|
|
180
|
+
* @param options Price formatting.
|
|
181
|
+
* @returns Resolves with the texts once the translations of `language` are loaded.
|
|
182
|
+
* @throws When the instances of `initI18n` don't format ICU messages.
|
|
183
|
+
*/
|
|
184
|
+
getTranslatedPricingDetails(plan: plansV3.Plan, options?: GetTranslatedPricingDetailsOptions): Promise<TranslatedPricingDetails>;
|
|
185
|
+
/**
|
|
186
|
+
* Same texts as {@link getTranslatedPricingDetails}, but one entry for each pricing variant, in
|
|
187
|
+
* the plan's order, with the variant's ID and, when `variantCategoryNameById` is passed, its
|
|
188
|
+
* category name.
|
|
189
|
+
*
|
|
190
|
+
* @param plan A Pricing Plans plan, as `@wix/pricing-plans` `plansV3` returns it.
|
|
191
|
+
* @param options Price formatting and category names.
|
|
192
|
+
* @returns Resolves with the texts once the translations of `language` are loaded.
|
|
193
|
+
* @throws When the instances of `initI18n` don't format ICU messages.
|
|
194
|
+
*/
|
|
195
|
+
getTranslatedPricingDetailsPerVariant(plan: plansV3.Plan, options?: GetTranslatedPricingDetailsPerVariantOptions): Promise<TranslatedVariantPricingDetails[]>;
|
|
196
|
+
};
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/use-pricing-plans-pricing-details.d.ts
|
|
199
|
+
/**
|
|
200
|
+
* Pricing texts of Pricing Plans plans, like the legacy `getTranslatedPricingDetails` and
|
|
201
|
+
* `getTranslatedPricingDetailsPerVariant`.
|
|
202
|
+
*
|
|
203
|
+
* The texts are translated with an i18next instance the hook builds with the app's `initI18n`, so
|
|
204
|
+
* the i18next runtime stays with the app and the app's own instance isn't changed. Its instances
|
|
205
|
+
* have to format ICU messages, like the ones `initI18n` of `@wix/fed-cli-i18next` creates.
|
|
206
|
+
*
|
|
207
|
+
* The texts depend only on the plan, so the hook works with both apps and on sites without Pricing
|
|
208
|
+
* Plans, and needs no `serviceDependencies`.
|
|
209
|
+
*
|
|
210
|
+
* @param options The app's i18next factory, and the language of the texts.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* const { getTranslatedPricingDetails } = usePricingPlansPricingDetails({
|
|
214
|
+
* initI18n,
|
|
215
|
+
* language: essentialsI18n.getLanguage(),
|
|
216
|
+
* });
|
|
217
|
+
*
|
|
218
|
+
* const { price, cycle } = await getTranslatedPricingDetails(plan);
|
|
219
|
+
*/
|
|
220
|
+
declare function usePricingPlansPricingDetails({ initI18n, language }: PricingDetailsOptions): PricingDetailsApi;
|
|
100
221
|
//#endregion
|
|
101
222
|
//#region src/use-pricing-plans-site-api.d.ts
|
|
102
223
|
/**
|
|
@@ -121,5 +242,5 @@ type PricingPlansSiteApi = {
|
|
|
121
242
|
*/
|
|
122
243
|
declare function usePricingPlansSiteApi(): PricingPlansSiteApi;
|
|
123
244
|
//#endregion
|
|
124
|
-
export { type BiOptions, type CheckoutOptions, type NavigateToPlanPageOptions, type NavigateToPricingPageOptions, type NavigateToSectionOptions, type NavigationPolicy, type PricingPlansSiteApi, type ThankYouPageOptions, usePricingPlansSiteApi };
|
|
245
|
+
export { type BiOptions, type CheckoutOptions, type FormattedAdditionalFee, type GetTranslatedPricingDetailsOptions, type GetTranslatedPricingDetailsPerVariantOptions, type InitI18n, type NavigateToPlanPageOptions, type NavigateToPricingPageOptions, type NavigateToSectionOptions, type NavigationPolicy, type PricingDetailsApi, type PricingDetailsOptions, type PricingPlansSiteApi, type ThankYouPageOptions, type TranslatedPricingDetails, type TranslatedVariantPricingDetails, usePricingPlansPricingDetails, usePricingPlansSiteApi };
|
|
125
246
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,11 +1,229 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
1
2
|
import { usePages } from "@wix/react-component-utils";
|
|
2
3
|
import { useGetService, useService } from "@wix/services-manager-react";
|
|
3
4
|
import { UrlDefinition } from "@wix/site-service-url/definition";
|
|
4
|
-
import { useMemo } from "react";
|
|
5
5
|
import { cartV2 } from "@wix/ecom";
|
|
6
6
|
import { plansV3 } from "@wix/pricing-plans";
|
|
7
7
|
import { defineService } from "@wix/services-definitions";
|
|
8
8
|
import { RouterDefinition } from "@wix/site-service-router/definition";
|
|
9
|
+
//#region src/pricing-details/format-price.ts
|
|
10
|
+
function formatPrice(amount, currency, locale, trimTrailingZeroes = false) {
|
|
11
|
+
if (!amount || !currency) return amount ?? "";
|
|
12
|
+
try {
|
|
13
|
+
return new Intl.NumberFormat(locale, {
|
|
14
|
+
style: "currency",
|
|
15
|
+
currency,
|
|
16
|
+
trailingZeroDisplay: trimTrailingZeroes ? "stripIfInteger" : "auto"
|
|
17
|
+
}).format(Number(amount));
|
|
18
|
+
} catch {
|
|
19
|
+
return amount;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
//#region src/pricing-details/messages.ts
|
|
24
|
+
const ENGLISH_MESSAGES = {
|
|
25
|
+
"pp.pricing-details.multiple-prices": "Multiple pricing options",
|
|
26
|
+
"pp.period-recurrency.every-day-plural": "Every {count, plural, one {day} other {{count} days}}",
|
|
27
|
+
"pp.period-recurrency.every-week-plural": "Every {count, plural, one {week} other {{count} weeks}}",
|
|
28
|
+
"pp.period-recurrency.every-month-plural": "Every {count, plural, one {month} other {{count} months}}",
|
|
29
|
+
"pp.period-recurrency.every-year-plural": "Every {count, plural, one {year} other {{count} years}}",
|
|
30
|
+
"pp.plan-validity.valid-for-days-v2": "{amount, plural, one {Valid for one day} other {Valid for {amount} days}}",
|
|
31
|
+
"pp.plan-validity.valid-for-weeks-v2": "{amount, plural, one {Valid for one week} other {Valid for {amount} weeks}}",
|
|
32
|
+
"pp.plan-validity.valid-for-months-v2": "{amount, plural, one {Valid for one month} other {Valid for {amount} months}}",
|
|
33
|
+
"pp.plan-validity.valid-for-years-v2": "{amount, plural, one {Valid for one year} other {Valid for {amount} years}}",
|
|
34
|
+
"pp.plan-validity.valid-unlimited": "Valid until canceled",
|
|
35
|
+
"pp.free-trial-days": "+ {count, plural, =1 {1 day} one {# day} other {# day}} free trial",
|
|
36
|
+
"pp.free-trial-days-unlimited": "{count, plural, =1 {1 day} one {# day} other {# day}} free trial"
|
|
37
|
+
};
|
|
38
|
+
const MESSAGE_FILES = /* #__PURE__ */ Object.assign({});
|
|
39
|
+
const DEV_MESSAGE_FILES = import.meta.env?.DEV ? /* #__PURE__ */ Object.assign({
|
|
40
|
+
"../assets/locale/messages_ar.dev.json": () => import("./messages_ar.dev-DiDnJZZh.js"),
|
|
41
|
+
"../assets/locale/messages_de.dev.json": () => import("./messages_de.dev-U8qwqpK1.js"),
|
|
42
|
+
"../assets/locale/messages_es.dev.json": () => import("./messages_es.dev-CC4HAHgh.js"),
|
|
43
|
+
"../assets/locale/messages_fr.dev.json": () => import("./messages_fr.dev-B9BwbSpM.js"),
|
|
44
|
+
"../assets/locale/messages_he.dev.json": () => import("./messages_he.dev-irsn8eQx.js"),
|
|
45
|
+
"../assets/locale/messages_ja.dev.json": () => import("./messages_ja.dev-B3764ZvN.js"),
|
|
46
|
+
"../assets/locale/messages_pl.dev.json": () => import("./messages_pl.dev-EfItm9Oi.js"),
|
|
47
|
+
"../assets/locale/messages_pt.dev.json": () => import("./messages_pt.dev-BZ6FphPD.js"),
|
|
48
|
+
"../assets/locale/messages_ru.dev.json": () => import("./messages_ru.dev-Dcg_zhGV.js")
|
|
49
|
+
}) : {};
|
|
50
|
+
const loadedMessages = /* @__PURE__ */ new Map();
|
|
51
|
+
const messagesFile = (language) => `../assets/locale/messages_${language}.json`;
|
|
52
|
+
const devMessagesFile = (language) => `../assets/locale/messages_${language}.dev.json`;
|
|
53
|
+
function messageFileLanguages(language) {
|
|
54
|
+
const [baseLanguage] = language.split(/[-_]/);
|
|
55
|
+
return baseLanguage && baseLanguage !== language ? [language, baseLanguage] : [language];
|
|
56
|
+
}
|
|
57
|
+
const loadFile = async (load) => load ? (await load()).default : {};
|
|
58
|
+
function loadMessages(language) {
|
|
59
|
+
const fileLanguage = messageFileLanguages(language).find((candidate) => MESSAGE_FILES[messagesFile(candidate)] || DEV_MESSAGE_FILES[devMessagesFile(candidate)]);
|
|
60
|
+
if (!fileLanguage) return Promise.resolve(ENGLISH_MESSAGES);
|
|
61
|
+
const loaded = loadedMessages.get(fileLanguage);
|
|
62
|
+
if (loaded) return loaded;
|
|
63
|
+
const loading = Promise.all([loadFile(MESSAGE_FILES[messagesFile(fileLanguage)]), loadFile(DEV_MESSAGE_FILES[devMessagesFile(fileLanguage)])]).then(([messages, devMessages]) => ({
|
|
64
|
+
...messages,
|
|
65
|
+
...devMessages
|
|
66
|
+
}), () => {
|
|
67
|
+
loadedMessages.delete(fileLanguage);
|
|
68
|
+
return ENGLISH_MESSAGES;
|
|
69
|
+
});
|
|
70
|
+
loadedMessages.set(fileLanguage, loading);
|
|
71
|
+
return loading;
|
|
72
|
+
}
|
|
73
|
+
//#endregion
|
|
74
|
+
//#region src/pricing-details/translate.ts
|
|
75
|
+
const translations = /* @__PURE__ */ new WeakMap();
|
|
76
|
+
const initialized = (i18n) => i18n.isInitialized ? Promise.resolve() : new Promise((resolve) => {
|
|
77
|
+
i18n.on("initialized", () => resolve());
|
|
78
|
+
});
|
|
79
|
+
async function buildTranslate(initI18n, language) {
|
|
80
|
+
const messages = await loadMessages(language);
|
|
81
|
+
const i18n = initI18n({
|
|
82
|
+
locale: language,
|
|
83
|
+
messages: {
|
|
84
|
+
...ENGLISH_MESSAGES,
|
|
85
|
+
...messages
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
await initialized(i18n);
|
|
89
|
+
if (!i18n.modules?.i18nFormat) throw new Error("Pricing texts need an i18next instance with ICU messages, such as initI18n of @wix/fed-cli-i18next.");
|
|
90
|
+
const t = i18n.t.bind(i18n);
|
|
91
|
+
return (key, values) => String(t(key, values));
|
|
92
|
+
}
|
|
93
|
+
function createTranslate(initI18n, language) {
|
|
94
|
+
const languages = translations.get(initI18n) ?? /* @__PURE__ */ new Map();
|
|
95
|
+
translations.set(initI18n, languages);
|
|
96
|
+
const existing = languages.get(language);
|
|
97
|
+
if (existing) return existing;
|
|
98
|
+
const building = buildTranslate(initI18n, language);
|
|
99
|
+
languages.set(language, building);
|
|
100
|
+
building.catch(() => languages.delete(language));
|
|
101
|
+
return building;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/pricing-details/variant-labels.ts
|
|
105
|
+
const CYCLE_KEYS = {
|
|
106
|
+
DAY: "pp.period-recurrency.every-day-plural",
|
|
107
|
+
WEEK: "pp.period-recurrency.every-week-plural",
|
|
108
|
+
MONTH: "pp.period-recurrency.every-month-plural",
|
|
109
|
+
YEAR: "pp.period-recurrency.every-year-plural"
|
|
110
|
+
};
|
|
111
|
+
const DURATION_KEYS = {
|
|
112
|
+
DAY: "pp.plan-validity.valid-for-days-v2",
|
|
113
|
+
WEEK: "pp.plan-validity.valid-for-weeks-v2",
|
|
114
|
+
MONTH: "pp.plan-validity.valid-for-months-v2",
|
|
115
|
+
YEAR: "pp.plan-validity.valid-for-years-v2"
|
|
116
|
+
};
|
|
117
|
+
const isUnlimitedVariant = (variant) => variant.billingTerms?.endType === "UNTIL_CANCELLED";
|
|
118
|
+
const getCycleDuration = (variant) => parseInt(variant.billingTerms?.billingCycle?.count ?? "1", 10);
|
|
119
|
+
function isRecurringVariant(variant) {
|
|
120
|
+
const terms = variant.billingTerms;
|
|
121
|
+
if (!terms?.billingCycle) return false;
|
|
122
|
+
if (terms.endType === "CYCLES_COMPLETED") return terms.cyclesCompletedDetails?.billingCycleCount !== "1";
|
|
123
|
+
return true;
|
|
124
|
+
}
|
|
125
|
+
const hasFreeTrialDays = (variant) => Boolean(variant.freeTrialDays);
|
|
126
|
+
function getCycleLabel(variant, t) {
|
|
127
|
+
const key = CYCLE_KEYS[variant.billingTerms?.billingCycle?.period ?? ""];
|
|
128
|
+
if (!isRecurringVariant(variant) || !key) return "";
|
|
129
|
+
return t(key, { count: getCycleDuration(variant) });
|
|
130
|
+
}
|
|
131
|
+
function getDurationLabel(variant, t) {
|
|
132
|
+
if (isUnlimitedVariant(variant)) return t("pp.plan-validity.valid-unlimited");
|
|
133
|
+
const key = DURATION_KEYS[variant.billingTerms?.billingCycle?.period ?? ""];
|
|
134
|
+
const cycleDuration = getCycleDuration(variant);
|
|
135
|
+
const cycleCount = parseInt(variant.billingTerms?.cyclesCompletedDetails?.billingCycleCount ?? "", 10);
|
|
136
|
+
if (!key || !cycleDuration || !cycleCount) return "";
|
|
137
|
+
return t(key, { amount: cycleDuration * cycleCount });
|
|
138
|
+
}
|
|
139
|
+
function getFreeTrialLabel(variant, t) {
|
|
140
|
+
if (!variant.freeTrialDays) return "";
|
|
141
|
+
return t(isUnlimitedVariant(variant) ? "pp.free-trial-days-unlimited" : "pp.free-trial-days", { count: variant.freeTrialDays });
|
|
142
|
+
}
|
|
143
|
+
function getAdditionalFees(variant, currency, locale, trimTrailingZeroes) {
|
|
144
|
+
return (variant.fees ?? []).filter((fee) => Boolean(fee.fixedAmountOptions?.amount)).map((fee) => ({
|
|
145
|
+
name: fee.name ?? "",
|
|
146
|
+
amount: formatPrice(fee.fixedAmountOptions?.amount, currency, locale, trimTrailingZeroes)
|
|
147
|
+
}));
|
|
148
|
+
}
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region src/pricing-details/pricing-details.ts
|
|
151
|
+
const EMPTY_PRICING_DETAILS = {
|
|
152
|
+
price: "",
|
|
153
|
+
cycle: "",
|
|
154
|
+
duration: "",
|
|
155
|
+
freeTrial: "",
|
|
156
|
+
additionalFees: []
|
|
157
|
+
};
|
|
158
|
+
function getVariantPricingDetails(plan, variant, t, locale, options) {
|
|
159
|
+
return {
|
|
160
|
+
price: formatPrice(plan.currency ? variant.pricingStrategies?.[0]?.flatRate?.amount : void 0, plan.currency, locale, options?.trimTrailingZeroes),
|
|
161
|
+
cycle: getCycleLabel(variant, t),
|
|
162
|
+
duration: getDurationLabel(variant, t),
|
|
163
|
+
freeTrial: getFreeTrialLabel(variant, t),
|
|
164
|
+
additionalFees: getAdditionalFees(variant, plan.currency, locale, options?.trimTrailingZeroes)
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
function getPlanPricingDetails(plan, t, locale, options) {
|
|
168
|
+
const variants = plan.pricingVariants ?? [];
|
|
169
|
+
const [firstVariant] = variants;
|
|
170
|
+
if (!firstVariant) return EMPTY_PRICING_DETAILS;
|
|
171
|
+
const firstVariantDetails = getVariantPricingDetails(plan, firstVariant, t, locale, options);
|
|
172
|
+
if (variants.length === 1) return firstVariantDetails;
|
|
173
|
+
const freeTrialVariant = variants.find(hasFreeTrialDays);
|
|
174
|
+
return {
|
|
175
|
+
...firstVariantDetails,
|
|
176
|
+
price: t("pp.pricing-details.multiple-prices"),
|
|
177
|
+
cycle: "",
|
|
178
|
+
freeTrial: freeTrialVariant ? getFreeTrialLabel(freeTrialVariant, t) : ""
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
function createPricingDetailsApi({ initI18n, language }) {
|
|
182
|
+
return {
|
|
183
|
+
getTranslatedPricingDetails: async (plan, options) => getPlanPricingDetails(plan, await createTranslate(initI18n, language), language, options),
|
|
184
|
+
getTranslatedPricingDetailsPerVariant: async (plan, options) => {
|
|
185
|
+
const t = await createTranslate(initI18n, language);
|
|
186
|
+
return (plan.pricingVariants ?? []).map((variant) => {
|
|
187
|
+
const [categoryId] = variant.categoryIds ?? [];
|
|
188
|
+
return {
|
|
189
|
+
...getVariantPricingDetails(plan, variant, t, language, options),
|
|
190
|
+
pricingVariantId: variant._id ?? "",
|
|
191
|
+
categoryName: categoryId ? options?.variantCategoryNameById?.[categoryId] : void 0
|
|
192
|
+
};
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
//#endregion
|
|
198
|
+
//#region src/use-pricing-plans-pricing-details.ts
|
|
199
|
+
/**
|
|
200
|
+
* Pricing texts of Pricing Plans plans, like the legacy `getTranslatedPricingDetails` and
|
|
201
|
+
* `getTranslatedPricingDetailsPerVariant`.
|
|
202
|
+
*
|
|
203
|
+
* The texts are translated with an i18next instance the hook builds with the app's `initI18n`, so
|
|
204
|
+
* the i18next runtime stays with the app and the app's own instance isn't changed. Its instances
|
|
205
|
+
* have to format ICU messages, like the ones `initI18n` of `@wix/fed-cli-i18next` creates.
|
|
206
|
+
*
|
|
207
|
+
* The texts depend only on the plan, so the hook works with both apps and on sites without Pricing
|
|
208
|
+
* Plans, and needs no `serviceDependencies`.
|
|
209
|
+
*
|
|
210
|
+
* @param options The app's i18next factory, and the language of the texts.
|
|
211
|
+
*
|
|
212
|
+
* @example
|
|
213
|
+
* const { getTranslatedPricingDetails } = usePricingPlansPricingDetails({
|
|
214
|
+
* initI18n,
|
|
215
|
+
* language: essentialsI18n.getLanguage(),
|
|
216
|
+
* });
|
|
217
|
+
*
|
|
218
|
+
* const { price, cycle } = await getTranslatedPricingDetails(plan);
|
|
219
|
+
*/
|
|
220
|
+
function usePricingPlansPricingDetails({ initI18n, language }) {
|
|
221
|
+
return useMemo(() => createPricingDetailsApi({
|
|
222
|
+
initI18n,
|
|
223
|
+
language
|
|
224
|
+
}), [initI18n, language]);
|
|
225
|
+
}
|
|
226
|
+
//#endregion
|
|
9
227
|
//#region src/constants.ts
|
|
10
228
|
const PRICING_PLANS_APP_ID = "1522827f-c56c-a5c9-2ac9-00f9e6ae12d3";
|
|
11
229
|
//#endregion
|
|
@@ -295,6 +513,6 @@ function usePricingPlansSiteApi() {
|
|
|
295
513
|
]);
|
|
296
514
|
}
|
|
297
515
|
//#endregion
|
|
298
|
-
export { usePricingPlansSiteApi };
|
|
516
|
+
export { usePricingPlansPricingDetails, usePricingPlansSiteApi };
|
|
299
517
|
|
|
300
518
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../src/constants.ts","../src/builder/checkout.ts","../src/builder/plan-purchase.ts","../src/url.ts","../src/app-pages.ts","../src/builder/return-url.ts","../src/builder/checkout-query.ts","../src/builder/plan-page-url.ts","../src/builder/pricing-page-url.ts","../src/builder/success-url.ts","../src/adapters/navigate-to-page.ts","../src/adapters/builder.ts","../src/legacy/pages.ts","../src/legacy/pricing-page-url.ts","../src/adapters/legacy-ooi.ts","../src/adapters/not-installed.ts","../src/create-site-api.ts","../src/public-api-caller.ts","../src/router.ts","../src/use-pricing-plans-site-api.ts"],"sourcesContent":["export const PRICING_PLANS_APP_ID = '1522827f-c56c-a5c9-2ac9-00f9e6ae12d3';\n","import { cartV2 } from '@wix/ecom';\nimport { plansV3 } from '@wix/pricing-plans';\nimport { PRICING_PLANS_APP_ID } from '../constants';\n\nexport async function loadPublicPlan(planId: string): Promise<plansV3.Plan | undefined> {\n const { items } = await plansV3\n .queryPlans()\n .eq('_id', planId)\n .eq('visibility', 'PUBLIC')\n .limit(1)\n .find();\n\n return items[0];\n}\n\nexport async function createCheckoutUrl(planId: string, pricingVariantId: string): Promise<string> {\n const cart = await cartV2.createCart({\n cart: { source: { channelType: 'WEB' } },\n catalogItems: [\n {\n quantity: 1,\n catalogReference: {\n appId: PRICING_PLANS_APP_ID,\n catalogItemId: planId,\n options: { type: 'PLAN', planOptions: { pricingVariantId, membersOnly: false } },\n },\n },\n ],\n });\n\n if (!cart?._id) {\n throw new Error('Cart creation did not return an ID');\n }\n\n const { checkoutUrl } = await cartV2.getCheckoutUrl(cart._id);\n\n if (!checkoutUrl) {\n throw new Error('Checkout URL was not returned');\n }\n\n return checkoutUrl;\n}\n","import type { plansV3 } from '@wix/pricing-plans';\n\nexport type PlanPurchase = {\n pricingVariantId: string;\n requiresCustomization: boolean;\n};\n\nexport function planPurchase(\n plan: plansV3.Plan | undefined,\n pricingVariantId?: string,\n): PlanPurchase | undefined {\n if (!plan || plan.buyable !== true) return;\n\n const variants = (plan.pricingVariants ?? []).filter(\n (variant): variant is plansV3.PricingVariant & { _id: string } =>\n Boolean(variant._id) && variant.visible !== false,\n );\n // Like the legacy app, a hidden or unknown pricingVariantId falls back to the first visible variant.\n const variant = variants.find(({ _id }) => _id === pricingVariantId) ?? variants[0];\n\n if (!variant) return;\n\n const requiresStartDate = plan.startDateSettings\n ? plan.startDateSettings.type === 'DATE_RANGE'\n : variant.billingTerms?.startType === 'CUSTOM';\n\n return {\n pricingVariantId: variant._id,\n requiresCustomization: Boolean(plan.formId) || requiresStartDate,\n };\n}\n","export function siteHref(siteUrl: string, path: string): string {\n return `${siteUrl.replace(/\\/$/, '')}/${path.replace(/^\\//, '')}`;\n}\n\nexport function withQuery(url: string, query: URLSearchParams): string {\n const search = query.toString();\n\n return search ? `${url}?${search}` : url;\n}\n\nexport function queryOf(entries: Array<[string, string | undefined]>): URLSearchParams {\n return new URLSearchParams(\n entries.filter((entry): entry is [string, string] => Boolean(entry[1])),\n );\n}\n\nexport function encodePricingVariants(pricingVariantsByPlanId: Record<string, string[]>): string {\n return Object.entries(pricingVariantsByPlanId)\n .filter(([, pricingVariantIds]) => pricingVariantIds.length)\n .map(([planId, pricingVariantIds]) => [planId, ...pricingVariantIds].join(':'))\n .join(',');\n}\n","import { PRICING_PLANS_APP_ID } from './constants';\nimport type { Page, Pages, UrlContext } from './types';\nimport { siteHref } from './url';\n\nexport function findAppPage(pages: Pages, appPageId: string): Page | undefined {\n const candidates = Object.values(pages).filter(\n (page) => !page.popup && page.appPageId === appPageId,\n );\n const unowned = candidates.filter((page) => !page.appDefinitionId);\n\n return (\n candidates.find((page) => page.appDefinitionId === PRICING_PLANS_APP_ID) ??\n (unowned.length === 1 ? unowned[0] : undefined)\n );\n}\n\nexport function appPageUrl(context: UrlContext, appPageId: string): string | undefined {\n const path = findAppPage(context.pages, appPageId)\n ? context.sectionUrl(PRICING_PLANS_APP_ID, appPageId)\n : undefined;\n\n return path ? siteHref(context.siteUrl, path) : undefined;\n}\n","import type { NavigationPolicy, UrlContext } from '../types';\nimport { siteHref, withQuery } from '../url';\n\nexport function returnUrl(\n { pages, siteUrl, sectionUrl }: UrlContext,\n navigation: NavigationPolicy | undefined,\n): string | undefined {\n if (!navigation) return;\n\n switch (navigation.type) {\n case 'url':\n return onSiteUrl(siteUrl, navigation.url);\n case 'page': {\n const page = pages[navigation.pageId];\n\n return page && siteHref(siteUrl, page.path);\n }\n case 'section': {\n const { appDefinitionId, sectionId, state, queryParams, discardRouterPageSuffix } =\n navigation.options;\n const path = sectionUrl(appDefinitionId, sectionId, discardRouterPageSuffix);\n\n if (!path) return;\n\n const url = siteHref(siteUrl, state ? `${path.replace(/\\/$/, '')}/${state}` : path);\n\n return queryParams\n ? withQuery(url, new URLSearchParams({ appSectionParams: JSON.stringify(queryParams) }))\n : url;\n }\n }\n}\n\n// Matches the targets the Thank You page accepts as `returnUrl`; it sends any other to the homepage.\nfunction onSiteUrl(siteUrl: string, url: string): string | undefined {\n try {\n const site = new URL(siteUrl.endsWith('/') ? siteUrl : `${siteUrl}/`);\n const target = new URL(url.startsWith('/') ? siteHref(siteUrl, url) : url, site);\n const basePath = site.pathname.replace(/\\/$/, '');\n\n if (\n target.origin === site.origin &&\n !target.username &&\n !target.password &&\n (target.protocol === 'https:' || target.protocol === 'http:') &&\n (target.pathname === basePath || target.pathname.startsWith(`${basePath}/`))\n ) {\n return target.href;\n }\n } catch {\n return;\n }\n}\n","import type { CheckoutOptions, UrlContext } from '../types';\nimport { returnUrl } from './return-url';\n\nexport function checkoutQueryEntries(\n context: UrlContext,\n checkout: CheckoutOptions = {},\n): Array<[string, string | undefined]> {\n return [\n ['minStartDate', checkout.minStartDate],\n ['maxStartDate', checkout.maxStartDate],\n ['returnUrl', returnUrl(context, checkout.thankYouPage?.navigation)],\n ];\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigateToPlanPageOptions, UrlContext } from '../types';\nimport { queryOf, withQuery } from '../url';\nimport { checkoutQueryEntries } from './checkout-query';\n\nexport const BUILDER_PLAN_PAGE_ID = 'plan-customization-page';\n\nexport function builderPlanPageUrl(\n context: UrlContext,\n { planId, pricingVariantId, ...checkout }: NavigateToPlanPageOptions,\n): string | undefined {\n const url = appPageUrl(context, BUILDER_PLAN_PAGE_ID);\n\n if (!url) return;\n\n return withQuery(\n url,\n queryOf([\n ['planId', planId],\n ['pricingVariantId', pricingVariantId],\n ...checkoutQueryEntries(context, checkout),\n ]),\n );\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigateToPricingPageOptions, UrlContext } from '../types';\nimport { encodePricingVariants, queryOf, withQuery } from '../url';\nimport { checkoutQueryEntries } from './checkout-query';\n\nexport const BUILDER_PRICING_PAGE_ID = 'plans-page';\n\nexport function builderPricingPageUrl(\n context: UrlContext,\n { planIds, pricingVariantsByPlanId, checkout }: NavigateToPricingPageOptions,\n): string | undefined {\n const url = appPageUrl(context, BUILDER_PRICING_PAGE_ID);\n\n if (!url) return;\n\n const pricingVariants = pricingVariantsByPlanId && encodePricingVariants(pricingVariantsByPlanId);\n\n return withQuery(\n url,\n queryOf([\n pricingVariants ? ['pricingVariants', pricingVariants] : ['planIds', planIds?.join(',')],\n ...checkoutQueryEntries(context, checkout),\n ]),\n );\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigationPolicy, UrlContext } from '../types';\nimport { returnUrl } from './return-url';\n\nexport const BUILDER_THANK_YOU_PAGE_ID = 'thank-you-page';\n\nexport function withSuccessUrl(\n context: UrlContext,\n checkoutUrl: string,\n navigation: NavigationPolicy | undefined,\n): string {\n const thankYouPage = appPageUrl(context, BUILDER_THANK_YOU_PAGE_ID);\n const target = returnUrl(context, navigation);\n\n if (!thankYouPage || !target) {\n return checkoutUrl;\n }\n\n const successUrl = new URL(thankYouPage);\n const url = new URL(checkoutUrl);\n\n successUrl.searchParams.set('returnUrl', target);\n url.searchParams.set('successUrl', successUrl.href);\n\n return url.href;\n}\n","import type { SiteApiContext } from '../types';\n\nexport async function navigateToPage(\n navigateTo: SiteApiContext['navigateTo'],\n href: string | undefined,\n pageName: string,\n): Promise<void> {\n if (!href) {\n throw new Error(`Cannot navigate to ${pageName}, because it is not available on the site.`);\n }\n\n if (!(await navigateTo(href))) {\n throw new Error(`Navigation to ${pageName} failed.`);\n }\n}\n\nexport async function getPageUrl(href: string | undefined, pageName: string): Promise<string> {\n if (!href) {\n throw new Error(`Cannot get ${pageName} URL, because it is not available on the site.`);\n }\n\n return href;\n}\n","import { createCheckoutUrl, loadPublicPlan } from '../builder/checkout';\nimport { planPurchase } from '../builder/plan-purchase';\nimport { builderPlanPageUrl } from '../builder/plan-page-url';\nimport { builderPricingPageUrl } from '../builder/pricing-page-url';\nimport { withSuccessUrl } from '../builder/success-url';\nimport type { SiteApiContext, PricingPlansSiteApi } from '../types';\nimport { getPageUrl, navigateToPage } from './navigate-to-page';\n\nexport function createBuilderSiteApi({\n navigateTo,\n ...context\n}: SiteApiContext): PricingPlansSiteApi {\n return {\n navigateToPricingPage: (options = {}) =>\n navigateToPage(navigateTo, builderPricingPageUrl(context, options), 'pricing page'),\n getPricingPageUrl: (options = {}) =>\n getPageUrl(builderPricingPageUrl(context, options), 'pricing page'),\n navigateToPlanPage: async (options) => {\n const purchase = planPurchase(await loadPublicPlan(options.planId), options.pricingVariantId);\n\n if (!purchase) {\n throw new Error('Plan is not available for online purchase.');\n }\n\n if (purchase.requiresCustomization) {\n return navigateToPage(\n navigateTo,\n builderPlanPageUrl(context, { ...options, pricingVariantId: purchase.pricingVariantId }),\n 'plan page',\n );\n }\n\n const checkoutUrl = await createCheckoutUrl(options.planId, purchase.pricingVariantId);\n\n return navigateToPage(\n navigateTo,\n withSuccessUrl(context, checkoutUrl, options.thankYouPage?.navigation),\n 'checkout',\n );\n },\n };\n}\n","import { findAppPage } from '../app-pages';\nimport type { Page, Pages } from '../types';\n\nexport const LEGACY_PRICING_PAGE_ID = 'membership_plan_picker_tpa';\n\nexport function findLegacyPricingPage(pages: Pages): Page | undefined {\n return findAppPage(pages, LEGACY_PRICING_PAGE_ID);\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigateToPricingPageOptions, UrlContext } from '../types';\nimport { encodePricingVariants, queryOf, withQuery } from '../url';\nimport { LEGACY_PRICING_PAGE_ID } from './pages';\n\nexport function legacyPricingPageUrl(\n context: UrlContext,\n options: NavigateToPricingPageOptions,\n): string | undefined {\n const url = appPageUrl(context, LEGACY_PRICING_PAGE_ID);\n\n return url && withQuery(url, pricingPageQuery(options));\n}\n\nfunction pricingPageQuery({\n planIds,\n pricingVariantsByPlanId,\n title,\n subtitle,\n biOptions,\n checkout,\n}: NavigateToPricingPageOptions): URLSearchParams {\n const { content, navigation } = checkout?.thankYouPage ?? {};\n const pricingVariants = pricingVariantsByPlanId && encodePricingVariants(pricingVariantsByPlanId);\n\n return queryOf([\n ['destination', navigation?.type === 'url' ? navigation.url : undefined],\n ['page', navigation?.type === 'page' ? navigation.pageId : undefined],\n ['section', navigation?.type === 'section' ? encodeBase64Url(navigation.options) : undefined],\n ['referral', biOptions?.referralInfo],\n ['referralId', biOptions?.referralId],\n ['maxStartDate', checkout?.maxStartDate],\n ['minStartDate', checkout?.minStartDate],\n ['thankYouTitle', content?.title],\n ['thankYouMessage', content?.message],\n ['thankYouCTA', content?.cta],\n pricingVariants ? ['pricingVariants', pricingVariants] : ['planIds', planIds?.join(',')],\n ['title', title],\n ['subtitle', subtitle],\n ]);\n}\n\nfunction encodeBase64Url(input: unknown): string {\n const bytes = encodeURIComponent(JSON.stringify(input)).replace(/%[0-9A-F]{2}/g, (percent) =>\n String.fromCharCode(parseInt(percent.slice(1), 16)),\n );\n\n return btoa(bytes).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n","import { legacyPricingPageUrl } from '../legacy/pricing-page-url';\nimport type { SiteApiContext, PricingPlansSiteApi } from '../types';\nimport { getPageUrl, navigateToPage } from './navigate-to-page';\n\nexport function createLegacyOoiSiteApi({\n navigateTo,\n callPublicApi,\n ...context\n}: SiteApiContext): PricingPlansSiteApi {\n return {\n navigateToPricingPage: (options = {}) =>\n navigateToPage(navigateTo, legacyPricingPageUrl(context, options), 'pricing page'),\n getPricingPageUrl: (options = {}) =>\n getPageUrl(legacyPricingPageUrl(context, options), 'pricing page'),\n navigateToPlanPage: async (options) => {\n await callPublicApi('navigateToPlanPage', [options]);\n },\n };\n}\n","import type { PricingPlansSiteApi } from '../types';\n\nconst notInstalled = () => Promise.reject(new Error('Pricing Plans is not installed on the site.'));\n\nexport function createNotInstalledSiteApi(): PricingPlansSiteApi {\n return {\n navigateToPricingPage: notInstalled,\n getPricingPageUrl: notInstalled,\n navigateToPlanPage: notInstalled,\n };\n}\n","import { createBuilderSiteApi } from './adapters/builder';\nimport { createLegacyOoiSiteApi } from './adapters/legacy-ooi';\nimport { createNotInstalledSiteApi } from './adapters/not-installed';\nimport { findAppPage } from './app-pages';\nimport { BUILDER_PLAN_PAGE_ID } from './builder/plan-page-url';\nimport { BUILDER_PRICING_PAGE_ID } from './builder/pricing-page-url';\nimport { BUILDER_THANK_YOU_PAGE_ID } from './builder/success-url';\nimport { PRICING_PLANS_APP_ID } from './constants';\nimport { findLegacyPricingPage } from './legacy/pages';\nimport type { SiteApiContext, PricingPlansSiteApi } from './types';\n\nconst BUILDER_PAGE_IDS = [BUILDER_PRICING_PAGE_ID, BUILDER_PLAN_PAGE_ID, BUILDER_THANK_YOU_PAGE_ID];\n\nexport function createSiteApi(context: SiteApiContext): PricingPlansSiteApi {\n if (findLegacyPricingPage(context.pages)) {\n return createLegacyOoiSiteApi(context);\n }\n\n if (\n Object.values(context.pages).some((page) => page.appDefinitionId === PRICING_PLANS_APP_ID) ||\n BUILDER_PAGE_IDS.some((appPageId) => findAppPage(context.pages, appPageId))\n ) {\n return createBuilderSiteApi(context);\n }\n\n return createNotInstalledSiteApi();\n}\n","import { defineService } from '@wix/services-definitions';\n\ntype PublicApiCaller = {\n callPublicApi(\n appDefinitionId: string,\n methodPath: string | string[],\n args?: unknown[],\n ): Promise<unknown>;\n};\n\nexport const PublicApiCallerDefinition = defineService<PublicApiCaller>(\n '@wix/site-service-public-api-caller',\n);\n","import { defineService } from '@wix/services-definitions';\nimport type { GetService } from '@wix/services-definitions';\nimport { RouterDefinition } from '@wix/site-service-router/definition';\nimport type { IRouterService } from '@wix/site-service-router/definition';\n\nconst LegacyRouterDefinition = defineService<IRouterService>('@wix/viewer-service-router');\n\nexport function getRouter(getService: GetService): IRouterService {\n try {\n return getService(RouterDefinition);\n } catch {\n return getService(LegacyRouterDefinition);\n }\n}\n","import { usePages } from '@wix/react-component-utils';\nimport { useGetService, useService } from '@wix/services-manager-react';\nimport { UrlDefinition } from '@wix/site-service-url/definition';\nimport { useMemo } from 'react';\nimport { PRICING_PLANS_APP_ID } from './constants';\nimport { createSiteApi } from './create-site-api';\nimport { PublicApiCallerDefinition } from './public-api-caller';\nimport { getRouter } from './router';\nimport type { PricingPlansSiteApi } from './types';\n\n/**\n * Navigation to Pricing Plans pages that works with both versions of the Pricing Plans app: the\n * legacy app (OOI) and the Builder app. The hook detects which one the site runs and uses its\n * pages, so the calls are the same for both.\n *\n * Calling the hook is safe on any site. When Pricing Plans isn't installed on the site, every method\n * it returns rejects with the error `Pricing Plans is not installed on the site.` and doesn't\n * navigate. The hook treats Pricing Plans as installed when the site has at least one Pricing Plans\n * page.\n *\n * Use it inside a site component or context provider, and list these services in the extension's\n * `serviceDependencies`: `@wix/site-service-pages`, `@wix/site-service-url`,\n * `@wix/site-service-router`, `@wix/viewer-service-router` and\n * `@wix/site-service-public-api-caller`.\n *\n * @example\n * const { navigateToPlanPage } = usePricingPlansSiteApi();\n *\n * <button onClick={() => navigateToPlanPage({ planId })}>Buy plan</button>\n */\nexport function usePricingPlansSiteApi(): PricingPlansSiteApi {\n const pages = usePages();\n const url = useService(UrlDefinition);\n const getService = useGetService();\n\n return useMemo(\n () =>\n createSiteApi({\n pages,\n siteUrl: url.siteUrl,\n sectionUrl: (appDefinitionId, sectionId, discardRouterPageSuffix) =>\n url.appSectionRelativeUrl(appDefinitionId, sectionId, discardRouterPageSuffix),\n navigateTo: (href) => getRouter(getService).navigateTo({ href }),\n callPublicApi: (methodPath, args) =>\n getService(PublicApiCallerDefinition).callPublicApi(\n PRICING_PLANS_APP_ID,\n methodPath,\n args,\n ),\n }),\n [pages, url, getService],\n );\n}\n"],"mappings":";;;;;;;;;AAAA,MAAa,uBAAuB;;;ACIpC,eAAsB,eAAe,QAAmD;CACtF,MAAM,EAAE,UAAU,MAAM,QACrB,WAAW,CAAC,CACZ,GAAG,OAAO,MAAM,CAAC,CACjB,GAAG,cAAc,QAAQ,CAAC,CAC1B,MAAM,CAAC,CAAC,CACR,KAAK;CAER,OAAO,MAAM;AACf;AAEA,eAAsB,kBAAkB,QAAgB,kBAA2C;CACjG,MAAM,OAAO,MAAM,OAAO,WAAW;EACnC,MAAM,EAAE,QAAQ,EAAE,aAAa,MAAM,EAAE;EACvC,cAAc,CACZ;GACE,UAAU;GACV,kBAAkB;IAChB,OAAO;IACP,eAAe;IACf,SAAS;KAAE,MAAM;KAAQ,aAAa;MAAE;MAAkB,aAAa;KAAM;IAAE;GACjF;EACF,CACF;CACF,CAAC;CAED,IAAI,CAAC,MAAM,KACT,MAAM,IAAI,MAAM,oCAAoC;CAGtD,MAAM,EAAE,gBAAgB,MAAM,OAAO,eAAe,KAAK,GAAG;CAE5D,IAAI,CAA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|
1
|
+
{"version":3,"file":"index.js","names":["englishMessages"],"sources":["../src/pricing-details/format-price.ts","../src/assets/locale/messages_en.dev.json","../src/pricing-details/messages.ts","../src/pricing-details/translate.ts","../src/pricing-details/variant-labels.ts","../src/pricing-details/pricing-details.ts","../src/use-pricing-plans-pricing-details.ts","../src/constants.ts","../src/builder/checkout.ts","../src/builder/plan-purchase.ts","../src/url.ts","../src/app-pages.ts","../src/builder/return-url.ts","../src/builder/checkout-query.ts","../src/builder/plan-page-url.ts","../src/builder/pricing-page-url.ts","../src/builder/success-url.ts","../src/adapters/navigate-to-page.ts","../src/adapters/builder.ts","../src/legacy/pages.ts","../src/legacy/pricing-page-url.ts","../src/adapters/legacy-ooi.ts","../src/adapters/not-installed.ts","../src/create-site-api.ts","../src/public-api-caller.ts","../src/router.ts","../src/use-pricing-plans-site-api.ts"],"sourcesContent":["export function formatPrice(\n amount: string | undefined,\n currency: string | undefined,\n locale: string,\n trimTrailingZeroes = false,\n): string {\n if (!amount || !currency) {\n return amount ?? '';\n }\n\n try {\n return new Intl.NumberFormat(locale, {\n style: 'currency',\n currency,\n trailingZeroDisplay: trimTrailingZeroes ? 'stripIfInteger' : 'auto',\n }).format(Number(amount));\n } catch {\n return amount;\n }\n}\n","","import englishMessages from '../assets/locale/messages_en.dev.json';\n\nexport type Messages = Readonly<Record<string, string>>;\n\ntype MessageFiles = Record<string, () => Promise<{ default: Messages }>>;\n\nexport const ENGLISH_MESSAGES: Messages = englishMessages;\n\nconst MESSAGE_FILES: MessageFiles = import.meta.glob<{ default: Messages }>([\n '../assets/locale/messages_*.json',\n '!../assets/locale/messages_*.dev.json',\n '!../assets/locale/messages_en.json',\n]);\n\n// Behind import.meta.env.DEV, so the production build of the consumer app leaves them out.\nconst DEV_MESSAGE_FILES: MessageFiles = import.meta.env?.DEV\n ? import.meta.glob<{ default: Messages }>([\n '../assets/locale/messages_*.dev.json',\n '!../assets/locale/messages_en.dev.json',\n ])\n : {};\n\nconst loadedMessages = new Map<string, Promise<Messages>>();\n\nconst messagesFile = (language: string) => `../assets/locale/messages_${language}.json`;\n\nconst devMessagesFile = (language: string) => `../assets/locale/messages_${language}.dev.json`;\n\nexport function messageFileLanguages(language: string): string[] {\n const [baseLanguage] = language.split(/[-_]/);\n\n return baseLanguage && baseLanguage !== language ? [language, baseLanguage] : [language];\n}\n\nconst loadFile = async (load: MessageFiles[string] | undefined): Promise<Messages> =>\n load ? (await load()).default : {};\n\nexport function loadMessages(language: string): Promise<Messages> {\n const fileLanguage = messageFileLanguages(language).find(\n (candidate) =>\n MESSAGE_FILES[messagesFile(candidate)] || DEV_MESSAGE_FILES[devMessagesFile(candidate)],\n );\n\n if (!fileLanguage) {\n return Promise.resolve(ENGLISH_MESSAGES);\n }\n\n const loaded = loadedMessages.get(fileLanguage);\n\n if (loaded) {\n return loaded;\n }\n\n const loading = Promise.all([\n loadFile(MESSAGE_FILES[messagesFile(fileLanguage)]),\n loadFile(DEV_MESSAGE_FILES[devMessagesFile(fileLanguage)]),\n ]).then(\n ([messages, devMessages]) => ({ ...messages, ...devMessages }),\n () => {\n loadedMessages.delete(fileLanguage);\n\n return ENGLISH_MESSAGES;\n },\n );\n\n loadedMessages.set(fileLanguage, loading);\n\n return loading;\n}\n","import type { I18n, InitI18n } from '../types';\nimport { ENGLISH_MESSAGES, loadMessages } from './messages';\n\nexport type Translate = (key: string, values?: Record<string, number>) => string;\n\nconst translations = new WeakMap<InitI18n, Map<string, Promise<Translate>>>();\n\nconst initialized = (i18n: I18n) =>\n i18n.isInitialized\n ? Promise.resolve()\n : new Promise<void>((resolve) => {\n i18n.on('initialized', () => resolve());\n });\n\nasync function buildTranslate(initI18n: InitI18n, language: string): Promise<Translate> {\n const messages = await loadMessages(language);\n const i18n = initI18n({ locale: language, messages: { ...ENGLISH_MESSAGES, ...messages } });\n\n await initialized(i18n);\n\n if (!i18n.modules?.i18nFormat) {\n throw new Error(\n 'Pricing texts need an i18next instance with ICU messages, such as initI18n of @wix/fed-cli-i18next.',\n );\n }\n\n // Typed loosely in I18n, so the overloaded t of every i18next version matches it.\n const t = i18n.t.bind(i18n) as unknown as (\n key: string,\n values?: Record<string, number>,\n ) => unknown;\n\n return (key, values) => String(t(key, values));\n}\n\nexport function createTranslate(initI18n: InitI18n, language: string): Promise<Translate> {\n const languages = translations.get(initI18n) ?? new Map<string, Promise<Translate>>();\n\n translations.set(initI18n, languages);\n\n const existing = languages.get(language);\n\n if (existing) {\n return existing;\n }\n\n const building = buildTranslate(initI18n, language);\n\n languages.set(language, building);\n building.catch(() => languages.delete(language));\n\n return building;\n}\n","import type { plansV3 } from '@wix/pricing-plans';\nimport type { FormattedAdditionalFee } from '../types';\nimport { formatPrice } from './format-price';\nimport type { Translate } from './translate';\n\ntype PricingVariant = plansV3.PricingVariant;\n\nconst CYCLE_KEYS: Record<string, string> = {\n DAY: 'pp.period-recurrency.every-day-plural',\n WEEK: 'pp.period-recurrency.every-week-plural',\n MONTH: 'pp.period-recurrency.every-month-plural',\n YEAR: 'pp.period-recurrency.every-year-plural',\n};\n\nconst DURATION_KEYS: Record<string, string> = {\n DAY: 'pp.plan-validity.valid-for-days-v2',\n WEEK: 'pp.plan-validity.valid-for-weeks-v2',\n MONTH: 'pp.plan-validity.valid-for-months-v2',\n YEAR: 'pp.plan-validity.valid-for-years-v2',\n};\n\nconst isUnlimitedVariant = (variant: PricingVariant) =>\n variant.billingTerms?.endType === 'UNTIL_CANCELLED';\n\nconst getCycleDuration = (variant: PricingVariant) =>\n parseInt(variant.billingTerms?.billingCycle?.count ?? '1', 10);\n\nfunction isRecurringVariant(variant: PricingVariant) {\n const terms = variant.billingTerms;\n\n if (!terms?.billingCycle) {\n return false;\n }\n\n if (terms.endType === 'CYCLES_COMPLETED') {\n return terms.cyclesCompletedDetails?.billingCycleCount !== '1';\n }\n\n return true;\n}\n\nexport const hasFreeTrialDays = (variant: PricingVariant) => Boolean(variant.freeTrialDays);\n\nexport function getCycleLabel(variant: PricingVariant, t: Translate): string {\n const key = CYCLE_KEYS[variant.billingTerms?.billingCycle?.period ?? ''];\n\n if (!isRecurringVariant(variant) || !key) {\n return '';\n }\n\n return t(key, { count: getCycleDuration(variant) });\n}\n\nexport function getDurationLabel(variant: PricingVariant, t: Translate): string {\n if (isUnlimitedVariant(variant)) {\n return t('pp.plan-validity.valid-unlimited');\n }\n\n const key = DURATION_KEYS[variant.billingTerms?.billingCycle?.period ?? ''];\n const cycleDuration = getCycleDuration(variant);\n const cycleCount = parseInt(\n variant.billingTerms?.cyclesCompletedDetails?.billingCycleCount ?? '',\n 10,\n );\n\n if (!key || !cycleDuration || !cycleCount) {\n return '';\n }\n\n return t(key, { amount: cycleDuration * cycleCount });\n}\n\nexport function getFreeTrialLabel(variant: PricingVariant, t: Translate): string {\n if (!variant.freeTrialDays) {\n return '';\n }\n\n return t(isUnlimitedVariant(variant) ? 'pp.free-trial-days-unlimited' : 'pp.free-trial-days', {\n count: variant.freeTrialDays,\n });\n}\n\nexport function getAdditionalFees(\n variant: PricingVariant,\n currency: string | undefined,\n locale: string,\n trimTrailingZeroes?: boolean,\n): FormattedAdditionalFee[] {\n return (variant.fees ?? [])\n .filter((fee) => Boolean(fee.fixedAmountOptions?.amount))\n .map((fee) => ({\n name: fee.name ?? '',\n amount: formatPrice(fee.fixedAmountOptions?.amount, currency, locale, trimTrailingZeroes),\n }));\n}\n","import type { plansV3 } from '@wix/pricing-plans';\nimport type {\n GetTranslatedPricingDetailsOptions,\n PricingDetailsApi,\n PricingDetailsOptions,\n TranslatedPricingDetails,\n} from '../types';\nimport { formatPrice } from './format-price';\nimport { createTranslate } from './translate';\nimport type { Translate } from './translate';\nimport {\n getAdditionalFees,\n getCycleLabel,\n getDurationLabel,\n getFreeTrialLabel,\n hasFreeTrialDays,\n} from './variant-labels';\n\nconst EMPTY_PRICING_DETAILS: TranslatedPricingDetails = {\n price: '',\n cycle: '',\n duration: '',\n freeTrial: '',\n additionalFees: [],\n};\n\nfunction getVariantPricingDetails(\n plan: plansV3.Plan,\n variant: plansV3.PricingVariant,\n t: Translate,\n locale: string,\n options?: GetTranslatedPricingDetailsOptions,\n): TranslatedPricingDetails {\n const amount = plan.currency ? variant.pricingStrategies?.[0]?.flatRate?.amount : undefined;\n\n return {\n price: formatPrice(amount, plan.currency, locale, options?.trimTrailingZeroes),\n cycle: getCycleLabel(variant, t),\n duration: getDurationLabel(variant, t),\n freeTrial: getFreeTrialLabel(variant, t),\n additionalFees: getAdditionalFees(variant, plan.currency, locale, options?.trimTrailingZeroes),\n };\n}\n\nfunction getPlanPricingDetails(\n plan: plansV3.Plan,\n t: Translate,\n locale: string,\n options?: GetTranslatedPricingDetailsOptions,\n): TranslatedPricingDetails {\n const variants = plan.pricingVariants ?? [];\n const [firstVariant] = variants;\n\n if (!firstVariant) {\n return EMPTY_PRICING_DETAILS;\n }\n\n const firstVariantDetails = getVariantPricingDetails(plan, firstVariant, t, locale, options);\n\n if (variants.length === 1) {\n return firstVariantDetails;\n }\n\n // A free trial can be set per variant through the API, so the plan shows one when any variant has it.\n const freeTrialVariant = variants.find(hasFreeTrialDays);\n\n return {\n ...firstVariantDetails,\n price: t('pp.pricing-details.multiple-prices'),\n cycle: '',\n freeTrial: freeTrialVariant ? getFreeTrialLabel(freeTrialVariant, t) : '',\n };\n}\n\nexport function createPricingDetailsApi({\n initI18n,\n language,\n}: PricingDetailsOptions): PricingDetailsApi {\n return {\n getTranslatedPricingDetails: async (plan, options) =>\n getPlanPricingDetails(plan, await createTranslate(initI18n, language), language, options),\n getTranslatedPricingDetailsPerVariant: async (plan, options) => {\n const t = await createTranslate(initI18n, language);\n\n return (plan.pricingVariants ?? []).map((variant) => {\n const [categoryId] = variant.categoryIds ?? [];\n\n return {\n ...getVariantPricingDetails(plan, variant, t, language, options),\n pricingVariantId: variant._id ?? '',\n categoryName: categoryId ? options?.variantCategoryNameById?.[categoryId] : undefined,\n };\n });\n },\n };\n}\n","import { useMemo } from 'react';\nimport { createPricingDetailsApi } from './pricing-details/pricing-details';\nimport type { PricingDetailsApi, PricingDetailsOptions } from './types';\n\n/**\n * Pricing texts of Pricing Plans plans, like the legacy `getTranslatedPricingDetails` and\n * `getTranslatedPricingDetailsPerVariant`.\n *\n * The texts are translated with an i18next instance the hook builds with the app's `initI18n`, so\n * the i18next runtime stays with the app and the app's own instance isn't changed. Its instances\n * have to format ICU messages, like the ones `initI18n` of `@wix/fed-cli-i18next` creates.\n *\n * The texts depend only on the plan, so the hook works with both apps and on sites without Pricing\n * Plans, and needs no `serviceDependencies`.\n *\n * @param options The app's i18next factory, and the language of the texts.\n *\n * @example\n * const { getTranslatedPricingDetails } = usePricingPlansPricingDetails({\n * initI18n,\n * language: essentialsI18n.getLanguage(),\n * });\n *\n * const { price, cycle } = await getTranslatedPricingDetails(plan);\n */\nexport function usePricingPlansPricingDetails({\n initI18n,\n language,\n}: PricingDetailsOptions): PricingDetailsApi {\n return useMemo(() => createPricingDetailsApi({ initI18n, language }), [initI18n, language]);\n}\n","export const PRICING_PLANS_APP_ID = '1522827f-c56c-a5c9-2ac9-00f9e6ae12d3';\n","import { cartV2 } from '@wix/ecom';\nimport { plansV3 } from '@wix/pricing-plans';\nimport { PRICING_PLANS_APP_ID } from '../constants';\n\nexport async function loadPublicPlan(planId: string): Promise<plansV3.Plan | undefined> {\n const { items } = await plansV3\n .queryPlans()\n .eq('_id', planId)\n .eq('visibility', 'PUBLIC')\n .limit(1)\n .find();\n\n return items[0];\n}\n\nexport async function createCheckoutUrl(planId: string, pricingVariantId: string): Promise<string> {\n const cart = await cartV2.createCart({\n cart: { source: { channelType: 'WEB' } },\n catalogItems: [\n {\n quantity: 1,\n catalogReference: {\n appId: PRICING_PLANS_APP_ID,\n catalogItemId: planId,\n options: { type: 'PLAN', planOptions: { pricingVariantId, membersOnly: false } },\n },\n },\n ],\n });\n\n if (!cart?._id) {\n throw new Error('Cart creation did not return an ID');\n }\n\n const { checkoutUrl } = await cartV2.getCheckoutUrl(cart._id);\n\n if (!checkoutUrl) {\n throw new Error('Checkout URL was not returned');\n }\n\n return checkoutUrl;\n}\n","import type { plansV3 } from '@wix/pricing-plans';\n\nexport type PlanPurchase = {\n pricingVariantId: string;\n requiresCustomization: boolean;\n};\n\nexport function planPurchase(\n plan: plansV3.Plan | undefined,\n pricingVariantId?: string,\n): PlanPurchase | undefined {\n if (!plan || plan.buyable !== true) return;\n\n const variants = (plan.pricingVariants ?? []).filter(\n (variant): variant is plansV3.PricingVariant & { _id: string } =>\n Boolean(variant._id) && variant.visible !== false,\n );\n // Like the legacy app, a hidden or unknown pricingVariantId falls back to the first visible variant.\n const variant = variants.find(({ _id }) => _id === pricingVariantId) ?? variants[0];\n\n if (!variant) return;\n\n const requiresStartDate = plan.startDateSettings\n ? plan.startDateSettings.type === 'DATE_RANGE'\n : variant.billingTerms?.startType === 'CUSTOM';\n\n return {\n pricingVariantId: variant._id,\n requiresCustomization: Boolean(plan.formId) || requiresStartDate,\n };\n}\n","export function siteHref(siteUrl: string, path: string): string {\n return `${siteUrl.replace(/\\/$/, '')}/${path.replace(/^\\//, '')}`;\n}\n\nexport function withQuery(url: string, query: URLSearchParams): string {\n const search = query.toString();\n\n return search ? `${url}?${search}` : url;\n}\n\nexport function queryOf(entries: Array<[string, string | undefined]>): URLSearchParams {\n return new URLSearchParams(\n entries.filter((entry): entry is [string, string] => Boolean(entry[1])),\n );\n}\n\nexport function encodePricingVariants(pricingVariantsByPlanId: Record<string, string[]>): string {\n return Object.entries(pricingVariantsByPlanId)\n .filter(([, pricingVariantIds]) => pricingVariantIds.length)\n .map(([planId, pricingVariantIds]) => [planId, ...pricingVariantIds].join(':'))\n .join(',');\n}\n","import { PRICING_PLANS_APP_ID } from './constants';\nimport type { Page, Pages, UrlContext } from './types';\nimport { siteHref } from './url';\n\nexport function findAppPage(pages: Pages, appPageId: string): Page | undefined {\n const candidates = Object.values(pages).filter(\n (page) => !page.popup && page.appPageId === appPageId,\n );\n const unowned = candidates.filter((page) => !page.appDefinitionId);\n\n return (\n candidates.find((page) => page.appDefinitionId === PRICING_PLANS_APP_ID) ??\n (unowned.length === 1 ? unowned[0] : undefined)\n );\n}\n\nexport function appPageUrl(context: UrlContext, appPageId: string): string | undefined {\n const path = findAppPage(context.pages, appPageId)\n ? context.sectionUrl(PRICING_PLANS_APP_ID, appPageId)\n : undefined;\n\n return path ? siteHref(context.siteUrl, path) : undefined;\n}\n","import type { NavigationPolicy, UrlContext } from '../types';\nimport { siteHref, withQuery } from '../url';\n\nexport function returnUrl(\n { pages, siteUrl, sectionUrl }: UrlContext,\n navigation: NavigationPolicy | undefined,\n): string | undefined {\n if (!navigation) return;\n\n switch (navigation.type) {\n case 'url':\n return onSiteUrl(siteUrl, navigation.url);\n case 'page': {\n const page = pages[navigation.pageId];\n\n return page && siteHref(siteUrl, page.path);\n }\n case 'section': {\n const { appDefinitionId, sectionId, state, queryParams, discardRouterPageSuffix } =\n navigation.options;\n const path = sectionUrl(appDefinitionId, sectionId, discardRouterPageSuffix);\n\n if (!path) return;\n\n const url = siteHref(siteUrl, state ? `${path.replace(/\\/$/, '')}/${state}` : path);\n\n return queryParams\n ? withQuery(url, new URLSearchParams({ appSectionParams: JSON.stringify(queryParams) }))\n : url;\n }\n }\n}\n\n// Matches the targets the Thank You page accepts as `returnUrl`; it sends any other to the homepage.\nfunction onSiteUrl(siteUrl: string, url: string): string | undefined {\n try {\n const site = new URL(siteUrl.endsWith('/') ? siteUrl : `${siteUrl}/`);\n const target = new URL(url.startsWith('/') ? siteHref(siteUrl, url) : url, site);\n const basePath = site.pathname.replace(/\\/$/, '');\n\n if (\n target.origin === site.origin &&\n !target.username &&\n !target.password &&\n (target.protocol === 'https:' || target.protocol === 'http:') &&\n (target.pathname === basePath || target.pathname.startsWith(`${basePath}/`))\n ) {\n return target.href;\n }\n } catch {\n return;\n }\n}\n","import type { CheckoutOptions, UrlContext } from '../types';\nimport { returnUrl } from './return-url';\n\nexport function checkoutQueryEntries(\n context: UrlContext,\n checkout: CheckoutOptions = {},\n): Array<[string, string | undefined]> {\n return [\n ['minStartDate', checkout.minStartDate],\n ['maxStartDate', checkout.maxStartDate],\n ['returnUrl', returnUrl(context, checkout.thankYouPage?.navigation)],\n ];\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigateToPlanPageOptions, UrlContext } from '../types';\nimport { queryOf, withQuery } from '../url';\nimport { checkoutQueryEntries } from './checkout-query';\n\nexport const BUILDER_PLAN_PAGE_ID = 'plan-customization-page';\n\nexport function builderPlanPageUrl(\n context: UrlContext,\n { planId, pricingVariantId, ...checkout }: NavigateToPlanPageOptions,\n): string | undefined {\n const url = appPageUrl(context, BUILDER_PLAN_PAGE_ID);\n\n if (!url) return;\n\n return withQuery(\n url,\n queryOf([\n ['planId', planId],\n ['pricingVariantId', pricingVariantId],\n ...checkoutQueryEntries(context, checkout),\n ]),\n );\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigateToPricingPageOptions, UrlContext } from '../types';\nimport { encodePricingVariants, queryOf, withQuery } from '../url';\nimport { checkoutQueryEntries } from './checkout-query';\n\nexport const BUILDER_PRICING_PAGE_ID = 'plans-page';\n\nexport function builderPricingPageUrl(\n context: UrlContext,\n { planIds, pricingVariantsByPlanId, checkout }: NavigateToPricingPageOptions,\n): string | undefined {\n const url = appPageUrl(context, BUILDER_PRICING_PAGE_ID);\n\n if (!url) return;\n\n const pricingVariants = pricingVariantsByPlanId && encodePricingVariants(pricingVariantsByPlanId);\n\n return withQuery(\n url,\n queryOf([\n pricingVariants ? ['pricingVariants', pricingVariants] : ['planIds', planIds?.join(',')],\n ...checkoutQueryEntries(context, checkout),\n ]),\n );\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigationPolicy, UrlContext } from '../types';\nimport { returnUrl } from './return-url';\n\nexport const BUILDER_THANK_YOU_PAGE_ID = 'thank-you-page';\n\nexport function withSuccessUrl(\n context: UrlContext,\n checkoutUrl: string,\n navigation: NavigationPolicy | undefined,\n): string {\n const thankYouPage = appPageUrl(context, BUILDER_THANK_YOU_PAGE_ID);\n const target = returnUrl(context, navigation);\n\n if (!thankYouPage || !target) {\n return checkoutUrl;\n }\n\n const successUrl = new URL(thankYouPage);\n const url = new URL(checkoutUrl);\n\n successUrl.searchParams.set('returnUrl', target);\n url.searchParams.set('successUrl', successUrl.href);\n\n return url.href;\n}\n","import type { SiteApiContext } from '../types';\n\nexport async function navigateToPage(\n navigateTo: SiteApiContext['navigateTo'],\n href: string | undefined,\n pageName: string,\n): Promise<void> {\n if (!href) {\n throw new Error(`Cannot navigate to ${pageName}, because it is not available on the site.`);\n }\n\n if (!(await navigateTo(href))) {\n throw new Error(`Navigation to ${pageName} failed.`);\n }\n}\n\nexport async function getPageUrl(href: string | undefined, pageName: string): Promise<string> {\n if (!href) {\n throw new Error(`Cannot get ${pageName} URL, because it is not available on the site.`);\n }\n\n return href;\n}\n","import { createCheckoutUrl, loadPublicPlan } from '../builder/checkout';\nimport { planPurchase } from '../builder/plan-purchase';\nimport { builderPlanPageUrl } from '../builder/plan-page-url';\nimport { builderPricingPageUrl } from '../builder/pricing-page-url';\nimport { withSuccessUrl } from '../builder/success-url';\nimport type { SiteApiContext, PricingPlansSiteApi } from '../types';\nimport { getPageUrl, navigateToPage } from './navigate-to-page';\n\nexport function createBuilderSiteApi({\n navigateTo,\n ...context\n}: SiteApiContext): PricingPlansSiteApi {\n return {\n navigateToPricingPage: (options = {}) =>\n navigateToPage(navigateTo, builderPricingPageUrl(context, options), 'pricing page'),\n getPricingPageUrl: (options = {}) =>\n getPageUrl(builderPricingPageUrl(context, options), 'pricing page'),\n navigateToPlanPage: async (options) => {\n const purchase = planPurchase(await loadPublicPlan(options.planId), options.pricingVariantId);\n\n if (!purchase) {\n throw new Error('Plan is not available for online purchase.');\n }\n\n if (purchase.requiresCustomization) {\n return navigateToPage(\n navigateTo,\n builderPlanPageUrl(context, { ...options, pricingVariantId: purchase.pricingVariantId }),\n 'plan page',\n );\n }\n\n const checkoutUrl = await createCheckoutUrl(options.planId, purchase.pricingVariantId);\n\n return navigateToPage(\n navigateTo,\n withSuccessUrl(context, checkoutUrl, options.thankYouPage?.navigation),\n 'checkout',\n );\n },\n };\n}\n","import { findAppPage } from '../app-pages';\nimport type { Page, Pages } from '../types';\n\nexport const LEGACY_PRICING_PAGE_ID = 'membership_plan_picker_tpa';\n\nexport function findLegacyPricingPage(pages: Pages): Page | undefined {\n return findAppPage(pages, LEGACY_PRICING_PAGE_ID);\n}\n","import { appPageUrl } from '../app-pages';\nimport type { NavigateToPricingPageOptions, UrlContext } from '../types';\nimport { encodePricingVariants, queryOf, withQuery } from '../url';\nimport { LEGACY_PRICING_PAGE_ID } from './pages';\n\nexport function legacyPricingPageUrl(\n context: UrlContext,\n options: NavigateToPricingPageOptions,\n): string | undefined {\n const url = appPageUrl(context, LEGACY_PRICING_PAGE_ID);\n\n return url && withQuery(url, pricingPageQuery(options));\n}\n\nfunction pricingPageQuery({\n planIds,\n pricingVariantsByPlanId,\n title,\n subtitle,\n biOptions,\n checkout,\n}: NavigateToPricingPageOptions): URLSearchParams {\n const { content, navigation } = checkout?.thankYouPage ?? {};\n const pricingVariants = pricingVariantsByPlanId && encodePricingVariants(pricingVariantsByPlanId);\n\n return queryOf([\n ['destination', navigation?.type === 'url' ? navigation.url : undefined],\n ['page', navigation?.type === 'page' ? navigation.pageId : undefined],\n ['section', navigation?.type === 'section' ? encodeBase64Url(navigation.options) : undefined],\n ['referral', biOptions?.referralInfo],\n ['referralId', biOptions?.referralId],\n ['maxStartDate', checkout?.maxStartDate],\n ['minStartDate', checkout?.minStartDate],\n ['thankYouTitle', content?.title],\n ['thankYouMessage', content?.message],\n ['thankYouCTA', content?.cta],\n pricingVariants ? ['pricingVariants', pricingVariants] : ['planIds', planIds?.join(',')],\n ['title', title],\n ['subtitle', subtitle],\n ]);\n}\n\nfunction encodeBase64Url(input: unknown): string {\n const bytes = encodeURIComponent(JSON.stringify(input)).replace(/%[0-9A-F]{2}/g, (percent) =>\n String.fromCharCode(parseInt(percent.slice(1), 16)),\n );\n\n return btoa(bytes).replace(/=/g, '').replace(/\\+/g, '-').replace(/\\//g, '_');\n}\n","import { legacyPricingPageUrl } from '../legacy/pricing-page-url';\nimport type { SiteApiContext, PricingPlansSiteApi } from '../types';\nimport { getPageUrl, navigateToPage } from './navigate-to-page';\n\nexport function createLegacyOoiSiteApi({\n navigateTo,\n callPublicApi,\n ...context\n}: SiteApiContext): PricingPlansSiteApi {\n return {\n navigateToPricingPage: (options = {}) =>\n navigateToPage(navigateTo, legacyPricingPageUrl(context, options), 'pricing page'),\n getPricingPageUrl: (options = {}) =>\n getPageUrl(legacyPricingPageUrl(context, options), 'pricing page'),\n navigateToPlanPage: async (options) => {\n await callPublicApi('navigateToPlanPage', [options]);\n },\n };\n}\n","import type { PricingPlansSiteApi } from '../types';\n\nconst notInstalled = () => Promise.reject(new Error('Pricing Plans is not installed on the site.'));\n\nexport function createNotInstalledSiteApi(): PricingPlansSiteApi {\n return {\n navigateToPricingPage: notInstalled,\n getPricingPageUrl: notInstalled,\n navigateToPlanPage: notInstalled,\n };\n}\n","import { createBuilderSiteApi } from './adapters/builder';\nimport { createLegacyOoiSiteApi } from './adapters/legacy-ooi';\nimport { createNotInstalledSiteApi } from './adapters/not-installed';\nimport { findAppPage } from './app-pages';\nimport { BUILDER_PLAN_PAGE_ID } from './builder/plan-page-url';\nimport { BUILDER_PRICING_PAGE_ID } from './builder/pricing-page-url';\nimport { BUILDER_THANK_YOU_PAGE_ID } from './builder/success-url';\nimport { PRICING_PLANS_APP_ID } from './constants';\nimport { findLegacyPricingPage } from './legacy/pages';\nimport type { SiteApiContext, PricingPlansSiteApi } from './types';\n\nconst BUILDER_PAGE_IDS = [BUILDER_PRICING_PAGE_ID, BUILDER_PLAN_PAGE_ID, BUILDER_THANK_YOU_PAGE_ID];\n\nexport function createSiteApi(context: SiteApiContext): PricingPlansSiteApi {\n if (findLegacyPricingPage(context.pages)) {\n return createLegacyOoiSiteApi(context);\n }\n\n if (\n Object.values(context.pages).some((page) => page.appDefinitionId === PRICING_PLANS_APP_ID) ||\n BUILDER_PAGE_IDS.some((appPageId) => findAppPage(context.pages, appPageId))\n ) {\n return createBuilderSiteApi(context);\n }\n\n return createNotInstalledSiteApi();\n}\n","import { defineService } from '@wix/services-definitions';\n\ntype PublicApiCaller = {\n callPublicApi(\n appDefinitionId: string,\n methodPath: string | string[],\n args?: unknown[],\n ): Promise<unknown>;\n};\n\nexport const PublicApiCallerDefinition = defineService<PublicApiCaller>(\n '@wix/site-service-public-api-caller',\n);\n","import { defineService } from '@wix/services-definitions';\nimport type { GetService } from '@wix/services-definitions';\nimport { RouterDefinition } from '@wix/site-service-router/definition';\nimport type { IRouterService } from '@wix/site-service-router/definition';\n\nconst LegacyRouterDefinition = defineService<IRouterService>('@wix/viewer-service-router');\n\nexport function getRouter(getService: GetService): IRouterService {\n try {\n return getService(RouterDefinition);\n } catch {\n return getService(LegacyRouterDefinition);\n }\n}\n","import { usePages } from '@wix/react-component-utils';\nimport { useGetService, useService } from '@wix/services-manager-react';\nimport { UrlDefinition } from '@wix/site-service-url/definition';\nimport { useMemo } from 'react';\nimport { PRICING_PLANS_APP_ID } from './constants';\nimport { createSiteApi } from './create-site-api';\nimport { PublicApiCallerDefinition } from './public-api-caller';\nimport { getRouter } from './router';\nimport type { PricingPlansSiteApi } from './types';\n\n/**\n * Navigation to Pricing Plans pages that works with both versions of the Pricing Plans app: the\n * legacy app (OOI) and the Builder app. The hook detects which one the site runs and uses its\n * pages, so the calls are the same for both.\n *\n * Calling the hook is safe on any site. When Pricing Plans isn't installed on the site, every method\n * it returns rejects with the error `Pricing Plans is not installed on the site.` and doesn't\n * navigate. The hook treats Pricing Plans as installed when the site has at least one Pricing Plans\n * page.\n *\n * Use it inside a site component or context provider, and list these services in the extension's\n * `serviceDependencies`: `@wix/site-service-pages`, `@wix/site-service-url`,\n * `@wix/site-service-router`, `@wix/viewer-service-router` and\n * `@wix/site-service-public-api-caller`.\n *\n * @example\n * const { navigateToPlanPage } = usePricingPlansSiteApi();\n *\n * <button onClick={() => navigateToPlanPage({ planId })}>Buy plan</button>\n */\nexport function usePricingPlansSiteApi(): PricingPlansSiteApi {\n const pages = usePages();\n const url = useService(UrlDefinition);\n const getService = useGetService();\n\n return useMemo(\n () =>\n createSiteApi({\n pages,\n siteUrl: url.siteUrl,\n sectionUrl: (appDefinitionId, sectionId, discardRouterPageSuffix) =>\n url.appSectionRelativeUrl(appDefinitionId, sectionId, discardRouterPageSuffix),\n navigateTo: (href) => getRouter(getService).navigateTo({ href }),\n callPublicApi: (methodPath, args) =>\n getService(PublicApiCallerDefinition).callPublicApi(\n PRICING_PLANS_APP_ID,\n methodPath,\n args,\n ),\n }),\n [pages, url, getService],\n );\n}\n"],"mappings":";;;;;;;;;AAAA,SAAgB,YACd,QACA,UACA,QACA,qBAAqB,OACb;CACR,IAAI,CAAC,UAAU,CAAC,UACd,OAAO,UAAU;CAGnB,IAAI;EACF,OAAO,IAAI,KAAK,aAAa,QAAQ;GACnC,OAAO;GACP;GACA,qBAAqB,qBAAqB,mBAAmB;EAC/D,CAAC,CAAC,CAAC,OAAO,OAAO,MAAM,CAAC;CAC1B,QAAQ;EACN,OAAO;CACT;AACF;;;AEbA,MAAa,mBAA6BA;;;;;;;;;;;;;AAAAA;AAE1C,MAAM,gBAA8C,uBAAO,OAAO,CAIlE,CAAC;AAGD,MAAM,oBAAkC,YAAY,KAAK,MACrC,uBAAO,OAAO;CAAC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;CAAyC,+CAA+C,OAAO;AAGj1B,CAAC,IACG,CAAC;AAEL,MAAM,iCAAiB,IAAI,IAA+B;AAE1D,MAAM,gBAAgB,aAAqB,6BAA6B,SAAS;AAEjF,MAAM,mBAAmB,aAAqB,6BAA6B,SAAS;AAEpF,SAAgB,qBAAqB,UAA4B;CAC/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AAW,4BACvC,IAAI,sBAAsB,iBAAiB,WAAW,uBAAuB;EAC/E,aAAa,SAAS,UAAU,UAAU,CAAC,CAAC,WAAW,EAAE,KAAK,CAAC;EAC/D,gBAAgB,YAAY,SAC1B,WAAW,yBAAyB,CAAC,CAAC,cACpC,sBACA,YACA,IACF;CACJ,CAAC,GACH;EAAC;EAAO;EAAK;CAAU,CACzB;AACF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_ar.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, zero {كل {count} يوم} one {كل يوم} two {كل {count} من الأيام} few {كل {count} من الأيام} many {كل {count} من الأيام} other {كل {count} من الأيام}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, zero {كل {count} أسبوع} one {كل أسبوع} two {كل {count} من الأسابيع} few {كل {count} من الأسابيع} many {كل {count} من الأسابيع} other {كل {count} من الأسابيع}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, zero {كل {count} شهر} one {كل شهر} two {كل {count} من الأشهر} few {كل {count} من الأشهر} many {كل {count} من الأشهر} other {كل {count} من الأشهر}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, zero {كل {count} سنة} one {كل سنة} two {كل {count} من السنوات} few {كل {count} من السنوات} many {كل {count} من السنوات} other {كل {count} من السنوات}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, zero {صالح لمدة {amount} يوم} one {صالح لمدة يوم واحد} two {صالح لمدة {amount} يومين} few {صالح لمدة {amount} أيام} many {صالح لمدة {amount} يومًا} other {صالح لمدة {amount} يومًا}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, zero {صالح لمدة {amount} أسبوع} one {صالح لمدة أسبوع واحد} two {صالح لمدة {amount} أسبوعين} few {صالح لمدة {amount} أسابيع} many {صالح لمدة {amount} أسبوعًا} other {صالح لمدة {amount} أسبوع}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, zero {صالح لمدة {amount} شهر} one {صالح لمدة شهر واحد} two {صالح لمدة {amount} شهرين} few {صالح لمدة {amount} أشهر} many {صالح لمدة {amount} شهرًا} other {صالح لمدة {amount} شهرًا}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, zero {صالح لمدة {amount} سنة} one {صالح لمدة سنة واحدة} two {صالح لمدة {amount} سنتين} few {صالح لمدة {amount} سنوات} many {صالح لمدة {amount} سنة} other {صالح لمدة {amount} سنة}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "سارٍ حتى الإلغاء";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {تجربة إضافية لأكثر من يوم} zero {+ {count,number} من الأيام مجانًا للتجربة} one {+ {count,number} يوم مجانًا للتجربة} two {+ {count,number} من الأيام مجانًا للتجربة} few {+ {count,number} من الأيام مجانًا للتجربة} many {+ {count,number} من الأيام مجانًا للتجربة} other {+ {count,number} من الأيام مجانًا للتجربة}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {تجربة مجانية ليوم واحد} zero {{count,number} من الأيام مجانًا للتجربة} one {{count,number} يوم مجانًا للتجربة} two {{count,number} من الأيام مجانًا للتجربة} few {{count,number} من الأيام مجانًا للتجربة} many {{count,number} من الأيام مجانًا للتجربة} other {{count,number} من الأيام مجانًا للتجربة}}";
|
|
13
|
+
var messages_ar_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_ar_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_ar.dev-DiDnJZZh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_ar.dev-DiDnJZZh.js","names":[],"sources":["../src/assets/locale/messages_ar.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_de.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {jeden Tag} other {alle {count} Tage}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {jede Woche} other {alle {count} Wochen}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {jeden Monat} other {alle {count} Monate}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {jedes Jahr} other {alle {count} Jahre}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {Gültig für einen Tag} other {Gültig für {amount} Tage}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {Gültig für eine Woche} other {Gültig für {amount} Wochen}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {Gültig für einen Monat} other {Gültig für {amount} Monate}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {Gültig für ein Jahr} other {Gültig für {amount} Jahre}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "Gültig bis zur Kündigung";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ 1 Tag kostenlos testen} one {+ {count,number} Tag kostenlos testen} other {+ {count,number} Tage kostenlose Testphase}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1 Tag kostenlos testen} one {{count,number} Tag kostenlos testen} other {{count,number} Tage kostenlos testen}}";
|
|
13
|
+
var messages_de_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_de_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_de.dev-U8qwqpK1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_de.dev-U8qwqpK1.js","names":[],"sources":["../src/assets/locale/messages_de.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_es.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {Cada día} other {Cada {count} días}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {Cada semana} other {Cada {count} semanas}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {Cada mes} other {Cada {count} meses}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {Cada año} other {Cada {count} años}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {Válido por un día} other {Válido por {amount} días}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {Válido por una semana} other {Válido por {amount} semanas}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {Válido por un mes} other {Válido por {amount} meses}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {Válido por un año} other {Válido por {amount} años}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "Válido hasta que se cancele";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ 1 día de prueba gratuita} one {+ {count,number} día de prueba gratuita} other {+ {count,number} días de prueba gratuita}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1 día de prueba gratuita} one {{count,number} día de prueba gratuita} other {{count,number} días de prueba gratuita}}";
|
|
13
|
+
var messages_es_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_es_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_es.dev-CC4HAHgh.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_es.dev-CC4HAHgh.js","names":[],"sources":["../src/assets/locale/messages_es.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_fr.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {Tous les jours} other {Tous les {count} jours}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {Toutes les semaines} other {Toutes les {count} semaines}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {Tous les mois} other {Tous les {count} mois}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {Tous les ans} other {Tous les {count} ans}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {Valable pendant 1 jour} other {Valable pendant {amount} jours}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {Valide pendant 1 semaine} other {Valable pendant {amount} semaines}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {Valable pendant 1 mois} other {Valable pendant {amount} mois}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {Valable pendant 1 an} other {Valable pendant {amount} ans}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "Valide jusqu'à annulation";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {1 jour d'essai gratuit} one {+ {count,number} jour d'essai gratuit} other {+ {count,number} jours d'essai gratuit}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1 jour d'essai gratuit} one {{count,number} jour d'essai gratuit} other {{count,number} jours d'essai gratuit}}";
|
|
13
|
+
var messages_fr_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_fr_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_fr.dev-B9BwbSpM.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_fr.dev-B9BwbSpM.js","names":[],"sources":["../src/assets/locale/messages_fr.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_he.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {לכל יום} two {לכל {count} ימים} many {לכל {count} ימים} other {לכל {count} ימים}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {לכל שבוע} two {לכל {count} שבועות} many {לכל {count} שבועות} other {לכל {count} שבועות}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {לכל חודש} two {לכל {count} חודשים} many {לכל {count} חודשים} other {לכל {count} חודשים}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {לכל שנה} two {לכל {count} שנים} many {לכל {count} שנים} other {לכל {count} שנים}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {תקף למשך יום אחד} two {תקף למשך {amount} ימים} many {תקף למשך {amount} ימים} other {תקף למשך {amount} ימים}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {תקף למשך שבוע אחד} two {תקף למשך {amount} שבועות} many {תקף למשך {amount} שבועות} other {תקף למשך {amount} שבועות}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {תקף למשך חודש אחד} two {תקף למשך {amount} חודשים} many {תקף למשך {amount} חודשים} other {תקף למשך {amount} חודשים}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {תקף למשך שנה אחת} two {תקף למשך {amount} שנתיים} many {תקף למשך {amount} שנים} other {תקף למשך {amount} שנים}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "בתוקף עד לביטול";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ יום ניסיון ללא תשלום} one {+ יום ניסיון בחינם ({count,number})} two {+ יומיים ניסיון בחינם ({count,number})} many {+ {count,number} ימי ניסיון בחינם} other {+ {count,number} ימי ניסיון בחינם}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {יום ניסיון ללא תשלום} one {יום ניסיון בחינם ({count,number})} two {יומיים ניסיון בחינם ({count,number})} many {{count,number} ימי ניסיון בחינם} other {{count,number} ימי ניסיון בחינם}}";
|
|
13
|
+
var messages_he_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_he_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_he.dev-irsn8eQx.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_he.dev-irsn8eQx.js","names":[],"sources":["../src/assets/locale/messages_he.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_ja.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, other {{count}日ごと}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, other {{count}週間ごと}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, other {{count}か月ごと}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, other {{count}年ごと}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, other {{amount}日間有効}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, other {{amount}週間有効}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, other {{amount}か月間有効}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, other {{amount}年間有効}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "キャンセルされるまで有効";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ 1日無料お試し} other {+ {count,number}日間無料お試し}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1日無料お試し} other {{count,number}日間無料お試し}}";
|
|
13
|
+
var messages_ja_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_ja_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_ja.dev-B3764ZvN.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_ja.dev-B3764ZvN.js","names":[],"sources":["../src/assets/locale/messages_ja.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_pl.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {Co dzień} few {Co {count} dni} many {Co {count} dni} other {Co {count} dnia}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {Co tydzień} few {Co {count} tygodnie} many {Co {count} tygodni} other {Co {count} tygodnia}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {Co miesiąc} few {Co {count} miesiące} many {Co {count} miesięcy} other {Co {count} miesiąca}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {Co rok} few {Co {count} lata} many {Co {count} lat} other {Co {count} roku}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {Ważny przez 1 dzień} few {Ważny przez {amount} dni} many {Ważny przez {amount} dni} other {Ważny przez {amount} dnia}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {Ważny przez tydzień} few {Ważny przez {amount} tygodnie} many {Ważny przez {amount} tygodni} other {Ważny przez {amount} tygodnia}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {Ważny przez miesiąc} few {Ważny przez {amount} miesiące} many {Ważny przez {amount} miesięcy} other {Ważny przez {amount} miesiąca}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {Ważny przez rok} few {Ważny przez {amount} lata} many {Ważny przez {amount} lat} other {Ważny przez {amount} roku}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "Ważne do anulowania";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ 1-dniowy bezpłatny okres próbny} one {+ {count,number} dzień bezpłatnego okresu próbnego} few {+ {count,number} dni bezpłatnego okresu próbnego} many {+ {count,number} dni bezpłatnego okresu próbnego} other {+ {count,number} dnia bezpłatnego okresu próbnego}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1-dniowy bezpłatny okres próbny} one {{count,number} dzień bezpłatnego okresu próbnego} few {{count,number} dni bezpłatnego okresu próbnego} many {{count,number} dni bezpłatnego okresu próbnego} other {{count,number} dnia bezpłatnego okresu próbnego}}";
|
|
13
|
+
var messages_pl_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_pl_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_pl.dev-EfItm9Oi.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_pl.dev-EfItm9Oi.js","names":[],"sources":["../src/assets/locale/messages_pl.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_pt.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {Todo dia} other {A cada {count} dias}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {Toda semana} other {A cada {count} semanas}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {Todo mês} other {A cada {count} meses}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {Todo ano} other {A cada {count} anos}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {Válido por 1 dia} other {Válido por {amount} dias}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {Válido por 1 semana} other {Válido por {amount} semanas}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {Válido por 1 mês} other {Válido por {amount} meses}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {Válido por 1 ano} other {Válido por {amount} anos}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "Válido até ser cancelado";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ 1 dia de período gratuito} one {+ {count,number} dia de período gratuito} other {+ {count,number} dias de período gratuito}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1 dia de período gratuito} one {{count,number} dia de período gratuito} other {{count,number} dias de período gratuito}}";
|
|
13
|
+
var messages_pt_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_pt_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_pt.dev-BZ6FphPD.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_pt.dev-BZ6FphPD.js","names":[],"sources":["../src/assets/locale/messages_pt.dev.json"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//#region src/assets/locale/messages_ru.dev.json
|
|
2
|
+
var pp_period_recurrency_every_day_plural = "{count, plural, one {Каждый день} few {Каждые {count} дня} many {Каждые {count} дней} other {Каждые {count} дня}}";
|
|
3
|
+
var pp_period_recurrency_every_week_plural = "{count, plural, one {Каждую неделю} few {Каждые {count} недели} many {Каждые {count} недель} other {Каждые {count} недели}}";
|
|
4
|
+
var pp_period_recurrency_every_month_plural = "{count, plural, one {Ежемесячно} few {Каждые {count} месяца} many {Каждые {count} месяцев} other {Каждые {count} месяца}}";
|
|
5
|
+
var pp_period_recurrency_every_year_plural = "{count, plural, one {Ежегодно} few {Каждые {count} года} many {Каждые {count} лет} other {Каждые {count} года}}";
|
|
6
|
+
var pp_plan_validity_valid_for_days_v2 = "{amount, plural, one {Действует один день} few {Действует {amount} дня} many {Действует {amount} дней} other {Действует {amount} дня}}";
|
|
7
|
+
var pp_plan_validity_valid_for_weeks_v2 = "{amount, plural, one {Действует одну неделю} few {Действует {amount} недели} many {Действует {amount} недель} other {Действует {amount} недели}}";
|
|
8
|
+
var pp_plan_validity_valid_for_months_v2 = "{amount, plural, one {Действует один месяц} few {Действует {amount} месяца} many {Действует {amount} месяцев} other {Действует {amount} месяца}}";
|
|
9
|
+
var pp_plan_validity_valid_for_years_v2 = "{amount, plural, one {Действует один год} few {Действует {amount} года} many {Действует {amount} лет} other {Действует {amount} года}}";
|
|
10
|
+
var pp_plan_validity_valid_unlimited = "Действует до отмены";
|
|
11
|
+
var pp_free_trial_days = "{count, plural, =1 {+ 1 день бесплатно} one {+ {count,number} день бесплатно} few {+ {count,number} дня бесплатно} many {+ {count,number} дней бесплатно} other {+ {count,number} дня бесплатно}}";
|
|
12
|
+
var pp_free_trial_days_unlimited = "{count, plural, =1 {1 день бесплатно} one {{count,number} день бесплатно} few {{count,number} дня бесплатно} many {{count,number} дней бесплатно} other {{count,number} дня бесплатно}}";
|
|
13
|
+
var messages_ru_dev_default = {
|
|
14
|
+
"pp.period-recurrency.every-day-plural": pp_period_recurrency_every_day_plural,
|
|
15
|
+
"pp.period-recurrency.every-week-plural": pp_period_recurrency_every_week_plural,
|
|
16
|
+
"pp.period-recurrency.every-month-plural": pp_period_recurrency_every_month_plural,
|
|
17
|
+
"pp.period-recurrency.every-year-plural": pp_period_recurrency_every_year_plural,
|
|
18
|
+
"pp.plan-validity.valid-for-days-v2": pp_plan_validity_valid_for_days_v2,
|
|
19
|
+
"pp.plan-validity.valid-for-weeks-v2": pp_plan_validity_valid_for_weeks_v2,
|
|
20
|
+
"pp.plan-validity.valid-for-months-v2": pp_plan_validity_valid_for_months_v2,
|
|
21
|
+
"pp.plan-validity.valid-for-years-v2": pp_plan_validity_valid_for_years_v2,
|
|
22
|
+
"pp.plan-validity.valid-unlimited": pp_plan_validity_valid_unlimited,
|
|
23
|
+
"pp.free-trial-days": pp_free_trial_days,
|
|
24
|
+
"pp.free-trial-days-unlimited": pp_free_trial_days_unlimited
|
|
25
|
+
};
|
|
26
|
+
//#endregion
|
|
27
|
+
export { messages_ru_dev_default as default, pp_free_trial_days as "pp.free-trial-days", pp_free_trial_days_unlimited as "pp.free-trial-days-unlimited", pp_period_recurrency_every_day_plural as "pp.period-recurrency.every-day-plural", pp_period_recurrency_every_month_plural as "pp.period-recurrency.every-month-plural", pp_period_recurrency_every_week_plural as "pp.period-recurrency.every-week-plural", pp_period_recurrency_every_year_plural as "pp.period-recurrency.every-year-plural", pp_plan_validity_valid_for_days_v2 as "pp.plan-validity.valid-for-days-v2", pp_plan_validity_valid_for_months_v2 as "pp.plan-validity.valid-for-months-v2", pp_plan_validity_valid_for_weeks_v2 as "pp.plan-validity.valid-for-weeks-v2", pp_plan_validity_valid_for_years_v2 as "pp.plan-validity.valid-for-years-v2", pp_plan_validity_valid_unlimited as "pp.plan-validity.valid-unlimited" };
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=messages_ru.dev-Dcg_zhGV.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages_ru.dev-Dcg_zhGV.js","names":[],"sources":["../src/assets/locale/messages_ru.dev.json"],"sourcesContent":[""],"mappings":""}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/pricing-plans-site-api",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist"
|
|
6
6
|
],
|
|
@@ -21,9 +21,11 @@
|
|
|
21
21
|
"lint:fix": "oxlint --fix",
|
|
22
22
|
"fmt": "oxfmt",
|
|
23
23
|
"fmt:check": "oxfmt --check",
|
|
24
|
-
"build": "yarn typecheck && rolldown -c",
|
|
24
|
+
"build": "yarn generate-translation-keys && yarn typecheck && rolldown -c",
|
|
25
25
|
"typecheck": "tsc --noEmit",
|
|
26
|
-
"test": "vitest"
|
|
26
|
+
"test": "vitest",
|
|
27
|
+
"generate-translation-keys": "babel-cli",
|
|
28
|
+
"postinstall": "yarn generate-translation-keys"
|
|
27
29
|
},
|
|
28
30
|
"dependencies": {
|
|
29
31
|
"@wix/ecom": "^1.0.2514",
|
|
@@ -34,6 +36,8 @@
|
|
|
34
36
|
},
|
|
35
37
|
"devDependencies": {
|
|
36
38
|
"@types/react": "^18.3.31",
|
|
39
|
+
"@wix/babel-cli": "^1.20.0",
|
|
40
|
+
"@wix/fed-cli-i18next": "^1.6.35",
|
|
37
41
|
"@wix/fed-cli-oxlint": "^1.0.6",
|
|
38
42
|
"@wix/react-component-utils": "^1.13.0",
|
|
39
43
|
"@wix/services-manager-react": "^1.0.8",
|
|
@@ -62,5 +66,5 @@
|
|
|
62
66
|
]
|
|
63
67
|
}
|
|
64
68
|
},
|
|
65
|
-
"falconPackageHash": "
|
|
69
|
+
"falconPackageHash": "d53d3272cbd39cbac8106bb9ef2cd626e7e101e51eb19ed7450174a6"
|
|
66
70
|
}
|