@schematichq/schematic-components 2.28.0 → 2.29.0
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 +3 -1
- package/dist/schematic-components.browser.cjs.js +210 -103
- package/dist/schematic-components.browser.esm.js +210 -103
- package/dist/schematic-components.cjs.js +210 -103
- package/dist/schematic-components.d.ts +24 -0
- package/dist/schematic-components.esm.js +210 -103
- package/package.json +1 -1
|
@@ -13579,6 +13579,7 @@ var en = {
|
|
|
13579
13579
|
"An invoice is created when charges reach $X; the rest is billed monthly.": "An invoice is created when charges reach {{amount}}; the rest is billed monthly.",
|
|
13580
13580
|
"An unknown error occurred.": "An unknown error occurred.",
|
|
13581
13581
|
"Billed": "Billed {{period}}",
|
|
13582
|
+
"Billing threshold": "Billing threshold",
|
|
13582
13583
|
"Bundle selected": "Bundle selected",
|
|
13583
13584
|
"Buy credits": "Buy credits",
|
|
13584
13585
|
"Cancel": "Cancel",
|
|
@@ -13613,8 +13614,11 @@ var en = {
|
|
|
13613
13614
|
"Due today": "Due today",
|
|
13614
13615
|
"Edit payment details": "Edit payment details",
|
|
13615
13616
|
"Edit": "Edit",
|
|
13617
|
+
"Email": "Email",
|
|
13616
13618
|
"Ends on": "Ends on {{date}}",
|
|
13617
13619
|
"Enter discount code": "Enter discount code",
|
|
13620
|
+
"Enter email address": "Enter email address",
|
|
13621
|
+
"Error": "Error",
|
|
13618
13622
|
"Error initializing payment method change. Please try again.": "Error initializing payment method change. Please try again.",
|
|
13619
13623
|
"Error processing payment. Please try a different payment method.": "Error processing payment. Please try a different payment method.",
|
|
13620
13624
|
"Error retrieving plan details. Please try again in a moment.": "Error retrieving plan details. Please try again in a moment.",
|
|
@@ -13635,6 +13639,7 @@ var en = {
|
|
|
13635
13639
|
"Invoice credit tooltip": "Credit \u2014 this amount was returned to your account, typically due to a plan change or proration",
|
|
13636
13640
|
"Invoice charge tooltip": "Charge \u2014 you were billed this amount",
|
|
13637
13641
|
"Invoices": "Invoices",
|
|
13642
|
+
"Limit": "Limit",
|
|
13638
13643
|
"Limit of": "Limit of {{amount}}",
|
|
13639
13644
|
"Loading": "Loading",
|
|
13640
13645
|
"Manage plan": "Manage plan",
|
|
@@ -13659,6 +13664,8 @@ var en = {
|
|
|
13659
13664
|
"Payment Details": "Payment Details",
|
|
13660
13665
|
"Plan selected": "Plan selected",
|
|
13661
13666
|
"Please accept the agreement to continue.": "Please accept the agreement to continue.",
|
|
13667
|
+
"Please try again later.": "Please try again later.",
|
|
13668
|
+
"Portal not found": "Portal not found",
|
|
13662
13669
|
"Plan": "Plan",
|
|
13663
13670
|
"Plans": "Plans",
|
|
13664
13671
|
"Please provide an access token.": "Please provide an access token.",
|
|
@@ -13710,6 +13717,7 @@ var en = {
|
|
|
13710
13717
|
"There was a problem retrieving your upcoming invoice.": "There was a problem retrieving your upcoming invoice.",
|
|
13711
13718
|
"There was a problem retrieving your invoices.": "There was a problem retrieving your invoices.",
|
|
13712
13719
|
"Tier-based": "Tier-based",
|
|
13720
|
+
"Tiered pricing": "Tiered pricing",
|
|
13713
13721
|
"Tiers apply progressively as quantity increases.": "Tiers apply progressively as quantity increases.",
|
|
13714
13722
|
"Top up balance with:": "Top up balance with:",
|
|
13715
13723
|
"Top-ups": "Top-ups",
|
|
@@ -13783,6 +13791,15 @@ var en = {
|
|
|
13783
13791
|
"$X/unit/period": "{{cost}}/{{unit}}/{{period}}",
|
|
13784
13792
|
"$X/Y units/period": "{{cost}}/{{size}} {{units}}/{{period}}",
|
|
13785
13793
|
"day": "day",
|
|
13794
|
+
"day_one": "day",
|
|
13795
|
+
"day_other": "days",
|
|
13796
|
+
"hour_one": "hour",
|
|
13797
|
+
"hour_other": "hours",
|
|
13798
|
+
"minute_one": "minute",
|
|
13799
|
+
"minute_other": "minutes",
|
|
13800
|
+
"second_one": "second",
|
|
13801
|
+
"second_other": "seconds",
|
|
13802
|
+
"week": "week",
|
|
13786
13803
|
"month": "month",
|
|
13787
13804
|
"quarter": "quarter",
|
|
13788
13805
|
"year": "year",
|
|
@@ -13791,6 +13808,13 @@ var en = {
|
|
|
13791
13808
|
"yr": "yr",
|
|
13792
13809
|
"one time": "one time",
|
|
13793
13810
|
"billing period": "billing period",
|
|
13811
|
+
"billing period_one": "billing period",
|
|
13812
|
+
"billing period_other": "billing periods",
|
|
13813
|
+
"daily": "daily",
|
|
13814
|
+
"weekly": "weekly",
|
|
13815
|
+
"monthly": "monthly",
|
|
13816
|
+
"quarterly": "quarterly",
|
|
13817
|
+
"yearly": "yearly",
|
|
13794
13818
|
"expires after purchase": "expires {{amount}} {{unit}} after purchase",
|
|
13795
13819
|
"expires at the end of the billing period": "expires at the end of the billing period",
|
|
13796
13820
|
"expires at the end of the next billing period": "expires at the end of the next billing period",
|
|
@@ -14480,11 +14504,9 @@ function formatBundleExpiry(bundle, t2) {
|
|
|
14480
14504
|
if (typeof bundle.expiryUnitCount !== "number") {
|
|
14481
14505
|
return void 0;
|
|
14482
14506
|
}
|
|
14483
|
-
const
|
|
14484
|
-
|
|
14485
|
-
|
|
14486
|
-
unit: pluralize(unit, bundle.expiryUnitCount)
|
|
14487
|
-
});
|
|
14507
|
+
const count = bundle.expiryUnitCount;
|
|
14508
|
+
const unit = bundle.expiryUnit === BillingCreditExpiryUnit.BillingPeriods ? t2("billing period", { count }) : t2("day", { count });
|
|
14509
|
+
return t2("expires after purchase", { amount: count, unit });
|
|
14488
14510
|
}
|
|
14489
14511
|
case BillingCreditExpiryType.EndOfBillingPeriod:
|
|
14490
14512
|
return t2("expires at the end of the billing period");
|
|
@@ -14729,16 +14751,33 @@ function entitlementHasHardLimit(entitlement) {
|
|
|
14729
14751
|
}
|
|
14730
14752
|
|
|
14731
14753
|
// src/utils/api/feature.ts
|
|
14732
|
-
function
|
|
14733
|
-
|
|
14754
|
+
function isEnglish(locale) {
|
|
14755
|
+
try {
|
|
14756
|
+
return new Intl.Locale(locale).language === "en";
|
|
14757
|
+
} catch {
|
|
14758
|
+
return true;
|
|
14759
|
+
}
|
|
14760
|
+
}
|
|
14761
|
+
function isOne(count, locale) {
|
|
14762
|
+
return new Intl.PluralRules(locale).select(count) === "one";
|
|
14763
|
+
}
|
|
14764
|
+
function getFeatureName(feature, locale, count, ignore = false) {
|
|
14765
|
+
if (!isEnglish(locale)) {
|
|
14766
|
+
const named = ignore ? { name: feature.name } : feature;
|
|
14767
|
+
const singularName2 = named.singularName || named.name;
|
|
14768
|
+
const pluralName2 = named.pluralName || singularName2;
|
|
14769
|
+
return count !== void 0 && isOne(count, locale) ? singularName2 : pluralName2;
|
|
14770
|
+
}
|
|
14771
|
+
const resolvedCount = count ?? 0;
|
|
14772
|
+
const shouldBePlural = resolvedCount === 0 || resolvedCount > 1;
|
|
14734
14773
|
const { name, singularName, pluralName } = feature;
|
|
14735
14774
|
if (!ignore && pluralName && shouldBePlural) {
|
|
14736
14775
|
return pluralName;
|
|
14737
14776
|
}
|
|
14738
14777
|
if (!ignore && singularName) {
|
|
14739
|
-
return shouldBePlural ? pluralize(singularName,
|
|
14778
|
+
return shouldBePlural ? pluralize(singularName, resolvedCount) : singularName;
|
|
14740
14779
|
}
|
|
14741
|
-
return pluralize(name,
|
|
14780
|
+
return pluralize(name, resolvedCount);
|
|
14742
14781
|
}
|
|
14743
14782
|
|
|
14744
14783
|
// src/utils/color.ts
|
|
@@ -14948,8 +14987,21 @@ function formatCurrency(amount, {
|
|
|
14948
14987
|
function formatOrdinal(n, t2) {
|
|
14949
14988
|
return t2("Ordinal", { count: n, ordinal: true });
|
|
14950
14989
|
}
|
|
14951
|
-
function adjectify(
|
|
14952
|
-
|
|
14990
|
+
function adjectify(period, t2) {
|
|
14991
|
+
switch (period) {
|
|
14992
|
+
case "day":
|
|
14993
|
+
return t2("daily");
|
|
14994
|
+
case "week":
|
|
14995
|
+
return t2("weekly");
|
|
14996
|
+
case "month":
|
|
14997
|
+
return t2("monthly");
|
|
14998
|
+
case "quarter":
|
|
14999
|
+
return t2("quarterly");
|
|
15000
|
+
case "year":
|
|
15001
|
+
return t2("yearly");
|
|
15002
|
+
default:
|
|
15003
|
+
return period;
|
|
15004
|
+
}
|
|
14953
15005
|
}
|
|
14954
15006
|
var CURRENCY_FLAGS = {
|
|
14955
15007
|
usd: "\u{1F1FA}\u{1F1F8}",
|
|
@@ -15065,11 +15117,12 @@ function getBillingPreviewText({
|
|
|
15065
15117
|
);
|
|
15066
15118
|
}
|
|
15067
15119
|
const schedule = scheduleParts.length > 0 ? `${scheduleParts.join(" ")} ` : "";
|
|
15120
|
+
const period = t2(planPeriod);
|
|
15068
15121
|
if (!discount) {
|
|
15069
15122
|
return t2("You will be billed", {
|
|
15070
15123
|
price: subscriptionPrice,
|
|
15071
15124
|
usage,
|
|
15072
|
-
period
|
|
15125
|
+
period,
|
|
15073
15126
|
schedule
|
|
15074
15127
|
});
|
|
15075
15128
|
}
|
|
@@ -15078,7 +15131,7 @@ function getBillingPreviewText({
|
|
|
15078
15131
|
return t2("You will be billed", {
|
|
15079
15132
|
price: discountedPrice,
|
|
15080
15133
|
usage,
|
|
15081
|
-
period
|
|
15134
|
+
period,
|
|
15082
15135
|
schedule
|
|
15083
15136
|
});
|
|
15084
15137
|
}
|
|
@@ -15086,7 +15139,7 @@ function getBillingPreviewText({
|
|
|
15086
15139
|
return t2("You will be billed with discount window", {
|
|
15087
15140
|
price: discountedPrice,
|
|
15088
15141
|
usage,
|
|
15089
|
-
period
|
|
15142
|
+
period,
|
|
15090
15143
|
schedule,
|
|
15091
15144
|
window: t2("for the next months", { count: durationInMonths }),
|
|
15092
15145
|
fullPrice: subscriptionPrice
|
|
@@ -15095,7 +15148,7 @@ function getBillingPreviewText({
|
|
|
15095
15148
|
return t2("You will be billed next bill discount", {
|
|
15096
15149
|
price: discountedPrice,
|
|
15097
15150
|
usage,
|
|
15098
|
-
period
|
|
15151
|
+
period,
|
|
15099
15152
|
schedule,
|
|
15100
15153
|
fullPrice: subscriptionPrice
|
|
15101
15154
|
});
|
|
@@ -15871,7 +15924,7 @@ var reducer = (state, action) => {
|
|
|
15871
15924
|
// src/context/EmbedProvider.tsx
|
|
15872
15925
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
15873
15926
|
var getCustomHeaders = (sessionId) => ({
|
|
15874
|
-
"X-Schematic-Components-Version": "2.
|
|
15927
|
+
"X-Schematic-Components-Version": "2.29.0",
|
|
15875
15928
|
"X-Schematic-Session-ID": sessionId
|
|
15876
15929
|
});
|
|
15877
15930
|
var normalizeCurrencyFilter = (filter) => {
|
|
@@ -16795,6 +16848,7 @@ function useRequest(fn) {
|
|
|
16795
16848
|
var import_react12 = require("react");
|
|
16796
16849
|
function useTrialEnd() {
|
|
16797
16850
|
const { data } = useEmbed();
|
|
16851
|
+
const { t: t2 } = useTranslation();
|
|
16798
16852
|
const { endDate, amount, units } = (0, import_react12.useMemo)(() => {
|
|
16799
16853
|
const billingSubscription = data?.company?.billingSubscription;
|
|
16800
16854
|
const end = typeof billingSubscription?.trialEnd === "number" ? new Date(billingSubscription.trialEnd * 1e3) : void 0;
|
|
@@ -16817,10 +16871,10 @@ function useTrialEnd() {
|
|
|
16817
16871
|
amount2 = Math.floor(difference / SECONDS_IN_MS);
|
|
16818
16872
|
unit = "second";
|
|
16819
16873
|
}
|
|
16820
|
-
units2 =
|
|
16874
|
+
units2 = t2(unit, { count: amount2 });
|
|
16821
16875
|
}
|
|
16822
16876
|
return { endDate: end, amount: amount2, units: units2 };
|
|
16823
|
-
}, [data?.company?.billingSubscription]);
|
|
16877
|
+
}, [data?.company?.billingSubscription, t2]);
|
|
16824
16878
|
return { endDate, amount, units };
|
|
16825
16879
|
}
|
|
16826
16880
|
|
|
@@ -18240,7 +18294,7 @@ var AutoTopupNotice = ({
|
|
|
18240
18294
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
18241
18295
|
Icon3,
|
|
18242
18296
|
{
|
|
18243
|
-
title: "
|
|
18297
|
+
title: t2("Auto Top-up"),
|
|
18244
18298
|
name: "info-rounded",
|
|
18245
18299
|
color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
|
|
18246
18300
|
style: { lineHeight: 0 }
|
|
@@ -18279,7 +18333,7 @@ var BillingThresholdTooltip = ({
|
|
|
18279
18333
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
18280
18334
|
Icon3,
|
|
18281
18335
|
{
|
|
18282
|
-
title: "
|
|
18336
|
+
title: t2("Billing threshold"),
|
|
18283
18337
|
name: "info-rounded",
|
|
18284
18338
|
color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
|
|
18285
18339
|
style: { lineHeight: 0 }
|
|
@@ -18475,7 +18529,7 @@ var Entitlement = ({
|
|
|
18475
18529
|
packageSize,
|
|
18476
18530
|
" "
|
|
18477
18531
|
] }),
|
|
18478
|
-
getFeatureName(entitlement.feature, packageSize),
|
|
18532
|
+
getFeatureName(entitlement.feature, locale, packageSize),
|
|
18479
18533
|
entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18480
18534
|
" ",
|
|
18481
18535
|
t2("per"),
|
|
@@ -18500,12 +18554,13 @@ var Entitlement = ({
|
|
|
18500
18554
|
" ",
|
|
18501
18555
|
getFeatureName(
|
|
18502
18556
|
entitlement.valueCredit,
|
|
18557
|
+
locale,
|
|
18503
18558
|
entitlement.consumptionRate || void 0
|
|
18504
18559
|
),
|
|
18505
18560
|
" ",
|
|
18506
18561
|
t2("per"),
|
|
18507
18562
|
" ",
|
|
18508
|
-
getFeatureName(entitlement.feature, 1)
|
|
18563
|
+
getFeatureName(entitlement.feature, locale, 1)
|
|
18509
18564
|
] });
|
|
18510
18565
|
}
|
|
18511
18566
|
if (entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit) {
|
|
@@ -18513,13 +18568,17 @@ var Entitlement = ({
|
|
|
18513
18568
|
amount: creditBasedEntitlementLimit.limit,
|
|
18514
18569
|
units: getFeatureName(
|
|
18515
18570
|
entitlement.feature,
|
|
18571
|
+
locale,
|
|
18516
18572
|
creditBasedEntitlementLimit.limit
|
|
18517
18573
|
),
|
|
18518
|
-
period:
|
|
18574
|
+
period: t2(
|
|
18575
|
+
creditBasedEntitlementLimit.period
|
|
18576
|
+
)
|
|
18519
18577
|
}) : t2("Up to X units", {
|
|
18520
18578
|
amount: creditBasedEntitlementLimit.limit,
|
|
18521
18579
|
units: getFeatureName(
|
|
18522
18580
|
entitlement.feature,
|
|
18581
|
+
locale,
|
|
18523
18582
|
creditBasedEntitlementLimit.limit
|
|
18524
18583
|
)
|
|
18525
18584
|
}) });
|
|
@@ -18527,11 +18586,11 @@ var Entitlement = ({
|
|
|
18527
18586
|
if (hasNumericValue) {
|
|
18528
18587
|
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18529
18588
|
entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t2("Unlimited", {
|
|
18530
|
-
item: getFeatureName(entitlement.feature)
|
|
18589
|
+
item: getFeatureName(entitlement.feature, locale)
|
|
18531
18590
|
}) : typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18532
18591
|
formatNumber(limit, { locale }),
|
|
18533
18592
|
" ",
|
|
18534
|
-
getFeatureName(entitlement.feature, limit)
|
|
18593
|
+
getFeatureName(entitlement.feature, locale, limit)
|
|
18535
18594
|
] }),
|
|
18536
18595
|
metricPeriodName && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18537
18596
|
" ",
|
|
@@ -18570,7 +18629,7 @@ var Entitlement = ({
|
|
|
18570
18629
|
packageSize,
|
|
18571
18630
|
" "
|
|
18572
18631
|
] }),
|
|
18573
|
-
getFeatureName(entitlement.feature, packageSize),
|
|
18632
|
+
getFeatureName(entitlement.feature, locale, packageSize),
|
|
18574
18633
|
entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_jsx_runtime19.Fragment, { children: [
|
|
18575
18634
|
"/",
|
|
18576
18635
|
shortenPeriod(period, t2)
|
|
@@ -18910,7 +18969,7 @@ var AutoTopup = ({
|
|
|
18910
18969
|
updateAutoTopupConfig
|
|
18911
18970
|
}) => {
|
|
18912
18971
|
const { settings } = useEmbed();
|
|
18913
|
-
const { t: t2 } = useTranslation();
|
|
18972
|
+
const { t: t2, locale } = useTranslation();
|
|
18914
18973
|
const cardPadding = settings.theme.card.padding / TEXT_BASE_SIZE;
|
|
18915
18974
|
const configurableCreditGrants = (0, import_react24.useMemo)(() => {
|
|
18916
18975
|
return planCreditGrants.reduce(
|
|
@@ -18957,7 +19016,7 @@ var AutoTopup = ({
|
|
|
18957
19016
|
}) }) }),
|
|
18958
19017
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Box, { as: "p", $marginBottom: "2rem", children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Text, { children: t2(
|
|
18959
19018
|
"Automatically purchase more credits when your balance is low",
|
|
18960
|
-
{ units: getFeatureName(grant.credit) }
|
|
19019
|
+
{ units: getFeatureName(grant.credit, locale) }
|
|
18961
19020
|
) }) })
|
|
18962
19021
|
] }),
|
|
18963
19022
|
/* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(Flex, { $alignItems: "center", $gap: "0.5rem", $marginBottom: "1rem", children: [
|
|
@@ -19154,7 +19213,7 @@ var Quantity = ({
|
|
|
19154
19213
|
$color: settings.theme.typography.text.color,
|
|
19155
19214
|
children: t2("Currently using", {
|
|
19156
19215
|
quantity: entitlement.usage,
|
|
19157
|
-
unit: getFeatureName(entitlement.feature)
|
|
19216
|
+
unit: getFeatureName(entitlement.feature, locale)
|
|
19158
19217
|
})
|
|
19159
19218
|
}
|
|
19160
19219
|
),
|
|
@@ -19219,7 +19278,11 @@ var Quantity = ({
|
|
|
19219
19278
|
packageSize,
|
|
19220
19279
|
" "
|
|
19221
19280
|
] }),
|
|
19222
|
-
getFeatureName(
|
|
19281
|
+
getFeatureName(
|
|
19282
|
+
entitlement.feature,
|
|
19283
|
+
locale,
|
|
19284
|
+
packageSize
|
|
19285
|
+
),
|
|
19223
19286
|
"/",
|
|
19224
19287
|
shortenPeriod(period, t2)
|
|
19225
19288
|
] })
|
|
@@ -19256,12 +19319,14 @@ var Quantity = ({
|
|
|
19256
19319
|
quantity: entitlement.quantity,
|
|
19257
19320
|
licenseName: getFeatureName(
|
|
19258
19321
|
entitlement.feature,
|
|
19322
|
+
locale,
|
|
19259
19323
|
entitlement.quantity
|
|
19260
19324
|
),
|
|
19261
19325
|
perUnit: perLicenseGrant.amount,
|
|
19262
19326
|
total: includedCredits,
|
|
19263
19327
|
creditName: getFeatureName(
|
|
19264
19328
|
licenseCredit,
|
|
19329
|
+
locale,
|
|
19265
19330
|
includedCredits
|
|
19266
19331
|
),
|
|
19267
19332
|
period: shortenPeriod(licenseCredit.period, t2)
|
|
@@ -19283,11 +19348,13 @@ var Quantity = ({
|
|
|
19283
19348
|
added: addedQuantity,
|
|
19284
19349
|
licenseName: getFeatureName(
|
|
19285
19350
|
entitlement.feature,
|
|
19351
|
+
locale,
|
|
19286
19352
|
addedQuantity
|
|
19287
19353
|
),
|
|
19288
19354
|
credits: addedCredits,
|
|
19289
19355
|
creditName: getFeatureName(
|
|
19290
19356
|
licenseCredit,
|
|
19357
|
+
locale,
|
|
19291
19358
|
addedCredits
|
|
19292
19359
|
)
|
|
19293
19360
|
}),
|
|
@@ -19297,9 +19364,10 @@ var Quantity = ({
|
|
|
19297
19364
|
total: includedCredits,
|
|
19298
19365
|
creditName: getFeatureName(
|
|
19299
19366
|
licenseCredit,
|
|
19367
|
+
locale,
|
|
19300
19368
|
includedCredits
|
|
19301
19369
|
),
|
|
19302
|
-
cadence: adjectify(licenseCredit.period),
|
|
19370
|
+
cadence: adjectify(licenseCredit.period, t2),
|
|
19303
19371
|
day: formatOrdinal(renewalDate.getDate(), t2)
|
|
19304
19372
|
})
|
|
19305
19373
|
] })
|
|
@@ -19338,6 +19406,7 @@ function renderMeteredEntitlementPricing({
|
|
|
19338
19406
|
"/",
|
|
19339
19407
|
feature ? getFeatureName(
|
|
19340
19408
|
feature,
|
|
19409
|
+
locale,
|
|
19341
19410
|
packageSize
|
|
19342
19411
|
) : featureName || "unit"
|
|
19343
19412
|
] });
|
|
@@ -19355,6 +19424,7 @@ function renderMeteredEntitlementPricing({
|
|
|
19355
19424
|
] }),
|
|
19356
19425
|
feature ? getFeatureName(
|
|
19357
19426
|
feature,
|
|
19427
|
+
locale,
|
|
19358
19428
|
packageSize
|
|
19359
19429
|
) : featureName || "unit"
|
|
19360
19430
|
] });
|
|
@@ -19672,7 +19742,7 @@ var Credits = ({
|
|
|
19672
19742
|
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(Text, { display: "heading6", children: [
|
|
19673
19743
|
formatNumber(bundle.quantity ?? 0, { locale }),
|
|
19674
19744
|
" ",
|
|
19675
|
-
getFeatureName(bundle)
|
|
19745
|
+
getFeatureName(bundle, locale)
|
|
19676
19746
|
] }) })
|
|
19677
19747
|
] }),
|
|
19678
19748
|
typeof price === "number" && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Text, { children: formatCurrency(price, {
|
|
@@ -21626,7 +21696,7 @@ var CurrencyPeriodMismatchNotice = ({
|
|
|
21626
21696
|
style: { opacity: 0.85, textAlign: "center" },
|
|
21627
21697
|
children: t2("No {{currency}} price for the {{period}} billing period.", {
|
|
21628
21698
|
currency: currency.toUpperCase(),
|
|
21629
|
-
period
|
|
21699
|
+
period: adjectify(period, t2)
|
|
21630
21700
|
})
|
|
21631
21701
|
}
|
|
21632
21702
|
)
|
|
@@ -21788,7 +21858,7 @@ var HardLimitTooltip = ({
|
|
|
21788
21858
|
feature,
|
|
21789
21859
|
limit
|
|
21790
21860
|
}) => {
|
|
21791
|
-
const { t: t2 } = useTranslation();
|
|
21861
|
+
const { t: t2, locale } = useTranslation();
|
|
21792
21862
|
const { data } = useEmbed();
|
|
21793
21863
|
const isLightBackground = useIsLightBackground();
|
|
21794
21864
|
const showHardLimit = data?.displaySettings?.showHardLimit ?? false;
|
|
@@ -21802,7 +21872,7 @@ var HardLimitTooltip = ({
|
|
|
21802
21872
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
21803
21873
|
Icon3,
|
|
21804
21874
|
{
|
|
21805
|
-
title: "
|
|
21875
|
+
title: t2("Limit"),
|
|
21806
21876
|
name: "info-rounded",
|
|
21807
21877
|
color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
|
|
21808
21878
|
style: { lineHeight: 0 }
|
|
@@ -21810,7 +21880,7 @@ var HardLimitTooltip = ({
|
|
|
21810
21880
|
),
|
|
21811
21881
|
content: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(Text, { children: t2("Up to a limit of", {
|
|
21812
21882
|
amount: limit,
|
|
21813
|
-
units: getFeatureName(feature, limit)
|
|
21883
|
+
units: getFeatureName(feature, locale, limit)
|
|
21814
21884
|
}) })
|
|
21815
21885
|
}
|
|
21816
21886
|
);
|
|
@@ -22174,7 +22244,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
|
|
|
22174
22244
|
)
|
|
22175
22245
|
] }),
|
|
22176
22246
|
stripe && collectEmail && /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(Box, { "data-field": "name", $marginBottom: "1.5rem", $verticalAlign: "top", children: [
|
|
22177
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { htmlFor: "email", children: "Email" }),
|
|
22247
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Label, { htmlFor: "email", children: t2("Email") }),
|
|
22178
22248
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
22179
22249
|
Input2,
|
|
22180
22250
|
{
|
|
@@ -22183,7 +22253,7 @@ var PaymentForm = ({ onConfirm, financeData }) => {
|
|
|
22183
22253
|
type: "email",
|
|
22184
22254
|
value: email,
|
|
22185
22255
|
autoComplete: "email",
|
|
22186
|
-
placeholder: "Enter email address",
|
|
22256
|
+
placeholder: t2("Enter email address"),
|
|
22187
22257
|
required: true,
|
|
22188
22258
|
onChange: (e) => {
|
|
22189
22259
|
userEditedEmailRef.current = true;
|
|
@@ -22310,7 +22380,7 @@ var PeriodToggle = ({
|
|
|
22310
22380
|
},
|
|
22311
22381
|
$size: 15,
|
|
22312
22382
|
$weight: option === selectedOption ? 600 : 400,
|
|
22313
|
-
children: t2("Billed", { period: adjectify(option) })
|
|
22383
|
+
children: t2("Billed", { period: adjectify(option, t2) })
|
|
22314
22384
|
}
|
|
22315
22385
|
)
|
|
22316
22386
|
},
|
|
@@ -22350,7 +22420,7 @@ var PlanCreditText = ({
|
|
|
22350
22420
|
entitlements,
|
|
22351
22421
|
children
|
|
22352
22422
|
}) => {
|
|
22353
|
-
const { t: t2 } = useTranslation();
|
|
22423
|
+
const { t: t2, locale } = useTranslation();
|
|
22354
22424
|
const { settings } = useEmbed();
|
|
22355
22425
|
const sources = entitlements ?? [];
|
|
22356
22426
|
const { perLicenseGrants } = credit;
|
|
@@ -22358,7 +22428,7 @@ var PlanCreditText = ({
|
|
|
22358
22428
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { children: [
|
|
22359
22429
|
credit.quantity,
|
|
22360
22430
|
" ",
|
|
22361
|
-
getFeatureName(credit, credit.quantity),
|
|
22431
|
+
getFeatureName(credit, locale, credit.quantity),
|
|
22362
22432
|
credit.period && /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
|
|
22363
22433
|
" ",
|
|
22364
22434
|
t2("per"),
|
|
@@ -22370,18 +22440,18 @@ var PlanCreditText = ({
|
|
|
22370
22440
|
}
|
|
22371
22441
|
const resolveLicenseName = (grant) => {
|
|
22372
22442
|
const licenseFeature = (findLicenseSource(sources, grant.licenseId) ?? (grant.licenseId ? void 0 : findSoleLicenseSource(sources)))?.feature;
|
|
22373
|
-
return licenseFeature ? getFeatureName(licenseFeature, 1) : t2("license");
|
|
22443
|
+
return licenseFeature ? getFeatureName(licenseFeature, locale, 1) : t2("license");
|
|
22374
22444
|
};
|
|
22375
22445
|
return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Flex, { $flexDirection: "column", $gap: "0.25rem", children: [
|
|
22376
22446
|
perLicenseGrants.map((grant, grantIndex) => /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(Text, { children: [
|
|
22377
22447
|
credit.period ? t2("X credits per license per period", {
|
|
22378
22448
|
amount: grant.amount,
|
|
22379
|
-
creditName: getFeatureName(credit, grant.amount),
|
|
22449
|
+
creditName: getFeatureName(credit, locale, grant.amount),
|
|
22380
22450
|
licenseName: resolveLicenseName(grant),
|
|
22381
22451
|
period: t2(credit.period)
|
|
22382
22452
|
}) : t2("X credits per license", {
|
|
22383
22453
|
amount: grant.amount,
|
|
22384
|
-
creditName: getFeatureName(credit, grant.amount),
|
|
22454
|
+
creditName: getFeatureName(credit, locale, grant.amount),
|
|
22385
22455
|
licenseName: resolveLicenseName(grant)
|
|
22386
22456
|
}),
|
|
22387
22457
|
grantIndex === 0 && children
|
|
@@ -22394,7 +22464,7 @@ var PlanCreditText = ({
|
|
|
22394
22464
|
$color: settings.theme.typography.text.color,
|
|
22395
22465
|
children: t2("Plus X credits per period for your company", {
|
|
22396
22466
|
amount: credit.fixedQuantity,
|
|
22397
|
-
creditName: getFeatureName(credit, credit.fixedQuantity),
|
|
22467
|
+
creditName: getFeatureName(credit, locale, credit.fixedQuantity),
|
|
22398
22468
|
period: t2(credit.period)
|
|
22399
22469
|
})
|
|
22400
22470
|
}
|
|
@@ -22423,7 +22493,7 @@ var PriceText = ({
|
|
|
22423
22493
|
formatCurrency(perUnitPrice, { locale, currency }),
|
|
22424
22494
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("sub", { children: [
|
|
22425
22495
|
"/",
|
|
22426
|
-
getFeatureName(feature, 1)
|
|
22496
|
+
getFeatureName(feature, locale, 1)
|
|
22427
22497
|
] })
|
|
22428
22498
|
] });
|
|
22429
22499
|
}
|
|
@@ -22440,7 +22510,7 @@ var PriceText = ({
|
|
|
22440
22510
|
formatCurrency(perUnitPrice, { locale, currency }),
|
|
22441
22511
|
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)("sub", { children: [
|
|
22442
22512
|
"/",
|
|
22443
|
-
getFeatureName(feature, 1)
|
|
22513
|
+
getFeatureName(feature, locale, 1)
|
|
22444
22514
|
] }),
|
|
22445
22515
|
" + ",
|
|
22446
22516
|
formatCurrency(flatAmount, { locale, currency }),
|
|
@@ -22501,7 +22571,7 @@ var PricingTiersTooltip = ({
|
|
|
22501
22571
|
trigger: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
22502
22572
|
Icon3,
|
|
22503
22573
|
{
|
|
22504
|
-
title: "
|
|
22574
|
+
title: t2("Tiered pricing"),
|
|
22505
22575
|
name: "info-rounded",
|
|
22506
22576
|
color: `hsla(0, 0%, ${isLightBackground ? 0 : 100}%, 0.5)`,
|
|
22507
22577
|
style: { lineHeight: 0 }
|
|
@@ -23003,11 +23073,11 @@ var EntitlementRow = (props) => {
|
|
|
23003
23073
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Text, { display: "heading4", children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
23004
23074
|
quantity,
|
|
23005
23075
|
" ",
|
|
23006
|
-
getFeatureName(feature, quantity)
|
|
23076
|
+
getFeatureName(feature, locale, quantity)
|
|
23007
23077
|
] }) : priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number" ? /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
23008
23078
|
softLimit,
|
|
23009
23079
|
" ",
|
|
23010
|
-
getFeatureName(feature, softLimit)
|
|
23080
|
+
getFeatureName(feature, locale, softLimit)
|
|
23011
23081
|
] }) : feature.name }) }),
|
|
23012
23082
|
/* @__PURE__ */ (0, import_jsx_runtime43.jsx)(Box, { $whiteSpace: "nowrap", $lineHeight: 1, children: priceBehavior === EntitlementPriceBehavior.PayInAdvance ? (
|
|
23013
23083
|
// A tiered scheme still resolves to a fixed amount at the chosen
|
|
@@ -23038,7 +23108,7 @@ var EntitlementRow = (props) => {
|
|
|
23038
23108
|
packageSize,
|
|
23039
23109
|
" "
|
|
23040
23110
|
] }),
|
|
23041
|
-
getFeatureName(feature, packageSize),
|
|
23111
|
+
getFeatureName(feature, locale, packageSize),
|
|
23042
23112
|
feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime43.jsxs)(import_jsx_runtime43.Fragment, { children: [
|
|
23043
23113
|
"/",
|
|
23044
23114
|
shortenPeriod(planPeriod, t2)
|
|
@@ -23335,7 +23405,7 @@ var SubscriptionSidebar = (0, import_react36.forwardRef)(
|
|
|
23335
23405
|
$color: settings.theme.typography.text.color,
|
|
23336
23406
|
children: t2("Includes X credits per period", {
|
|
23337
23407
|
total: includedCredits,
|
|
23338
|
-
creditName: getFeatureName(credit, includedCredits),
|
|
23408
|
+
creditName: getFeatureName(credit, locale, includedCredits),
|
|
23339
23409
|
period: shortenPeriod(credit.period, t2)
|
|
23340
23410
|
})
|
|
23341
23411
|
}
|
|
@@ -24073,7 +24143,7 @@ var SubscriptionSidebar = (0, import_react36.forwardRef)(
|
|
|
24073
24143
|
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(Box, { children: /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(Text, { children: [
|
|
24074
24144
|
formatNumber(amount, { locale }),
|
|
24075
24145
|
" ",
|
|
24076
|
-
getFeatureName(bundle, amount),
|
|
24146
|
+
getFeatureName(bundle, locale, amount),
|
|
24077
24147
|
expiry && ` \xB7 ${expiry}`
|
|
24078
24148
|
] }) })
|
|
24079
24149
|
] }),
|
|
@@ -24367,21 +24437,21 @@ var TieredPricingDetails = ({
|
|
|
24367
24437
|
if (flatAmount === 0 && perUnitPrice === 0) {
|
|
24368
24438
|
return t2("Up to X units for free", {
|
|
24369
24439
|
X: upTo,
|
|
24370
|
-
units: getFeatureName(entitlement.feature, upTo)
|
|
24440
|
+
units: getFeatureName(entitlement.feature, locale, upTo)
|
|
24371
24441
|
});
|
|
24372
24442
|
}
|
|
24373
24443
|
if (flatAmount === 0 && perUnitPrice > 0) {
|
|
24374
24444
|
return t2("Up to X units at $Y/unit", {
|
|
24375
24445
|
X: upTo,
|
|
24376
|
-
units: getFeatureName(entitlement.feature, upTo),
|
|
24446
|
+
units: getFeatureName(entitlement.feature, locale, upTo),
|
|
24377
24447
|
Y: formatCurrency(perUnitPrice, { locale, currency }),
|
|
24378
|
-
unit: getFeatureName(entitlement.feature, 1)
|
|
24448
|
+
unit: getFeatureName(entitlement.feature, locale, 1)
|
|
24379
24449
|
});
|
|
24380
24450
|
}
|
|
24381
24451
|
if (flatAmount > 0 && perUnitPrice === 0) {
|
|
24382
24452
|
return t2("Up to X units for $Y/period", {
|
|
24383
24453
|
X: upTo,
|
|
24384
|
-
units: getFeatureName(entitlement.feature, upTo),
|
|
24454
|
+
units: getFeatureName(entitlement.feature, locale, upTo),
|
|
24385
24455
|
Y: formatCurrency(flatAmount, { locale, currency }),
|
|
24386
24456
|
period
|
|
24387
24457
|
});
|
|
@@ -24389,9 +24459,9 @@ var TieredPricingDetails = ({
|
|
|
24389
24459
|
if (flatAmount > 0 && perUnitPrice > 0) {
|
|
24390
24460
|
return t2("Up to X units at $Y/unit + $Z/period", {
|
|
24391
24461
|
X: upTo,
|
|
24392
|
-
units: getFeatureName(entitlement.feature, upTo),
|
|
24462
|
+
units: getFeatureName(entitlement.feature, locale, upTo),
|
|
24393
24463
|
Y: formatCurrency(perUnitPrice, { locale, currency }),
|
|
24394
|
-
unit: getFeatureName(entitlement.feature, 1),
|
|
24464
|
+
unit: getFeatureName(entitlement.feature, locale, 1),
|
|
24395
24465
|
Z: formatCurrency(flatAmount, { locale, currency }),
|
|
24396
24466
|
period
|
|
24397
24467
|
});
|
|
@@ -24694,6 +24764,7 @@ var Badge = () => {
|
|
|
24694
24764
|
// src/components/layout/RenderLayout.tsx
|
|
24695
24765
|
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
24696
24766
|
var Disabled = () => {
|
|
24767
|
+
const { t: t2 } = useTranslation();
|
|
24697
24768
|
return /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $width: "max-content", $height: "max-content", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Card, { children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(
|
|
24698
24769
|
Element,
|
|
24699
24770
|
{
|
|
@@ -24703,8 +24774,8 @@ var Disabled = () => {
|
|
|
24703
24774
|
$alignItems: "center",
|
|
24704
24775
|
$whiteSpace: "nowrap",
|
|
24705
24776
|
children: [
|
|
24706
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "h1", display: "heading1", children: "Portal not found" }) }),
|
|
24707
|
-
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "p", children: "Please try again later." })
|
|
24777
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "h1", display: "heading1", children: t2("Portal not found") }) }),
|
|
24778
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(Text, { as: "p", children: t2("Please try again later.") })
|
|
24708
24779
|
]
|
|
24709
24780
|
}
|
|
24710
24781
|
) }) });
|
|
@@ -24899,12 +24970,12 @@ var UsageDetails = ({ entitlement, layout }) => {
|
|
|
24899
24970
|
if (priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof allocation === "number") {
|
|
24900
24971
|
return t2("X units", {
|
|
24901
24972
|
amount: formatNumber(allocation, { locale }),
|
|
24902
|
-
units: getFeatureName(feature, allocation)
|
|
24973
|
+
units: getFeatureName(feature, locale, allocation)
|
|
24903
24974
|
});
|
|
24904
24975
|
}
|
|
24905
24976
|
if (priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof price === "number") {
|
|
24906
24977
|
const formattedCost = formatCurrency(price, { locale, currency });
|
|
24907
|
-
const featureName = getFeatureName(feature, packageSize);
|
|
24978
|
+
const featureName = getFeatureName(feature, locale, packageSize);
|
|
24908
24979
|
return packageSize > 1 ? t2("$X per Y units", {
|
|
24909
24980
|
cost: formattedCost,
|
|
24910
24981
|
size: packageSize,
|
|
@@ -24914,15 +24985,15 @@ var UsageDetails = ({ entitlement, layout }) => {
|
|
|
24914
24985
|
if (priceBehavior === EntitlementPriceBehavior.Overage && typeof softLimit === "number") {
|
|
24915
24986
|
return t2("X units", {
|
|
24916
24987
|
amount: formatNumber(softLimit, { locale }),
|
|
24917
|
-
units: getFeatureName(feature, softLimit)
|
|
24988
|
+
units: getFeatureName(feature, locale, softLimit)
|
|
24918
24989
|
});
|
|
24919
24990
|
}
|
|
24920
24991
|
if (priceBehavior === EntitlementPriceBehavior.Tier) {
|
|
24921
24992
|
return typeof currentTier?.to === "number" && (currentTier?.to === Infinity ? t2("Unlimited in this tier", {
|
|
24922
|
-
feature: getFeatureName(feature)
|
|
24993
|
+
feature: getFeatureName(feature, locale)
|
|
24923
24994
|
}) : t2("Up to X units in this tier", {
|
|
24924
24995
|
amount: formatNumber(currentTier.to, { locale }),
|
|
24925
|
-
feature: getFeatureName(feature, currentTier.to)
|
|
24996
|
+
feature: getFeatureName(feature, locale, currentTier.to)
|
|
24926
24997
|
}));
|
|
24927
24998
|
}
|
|
24928
24999
|
if (showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && planEntitlement?.valueCredit && typeof planEntitlement?.consumptionRate === "number") {
|
|
@@ -24930,6 +25001,7 @@ var UsageDetails = ({ entitlement, layout }) => {
|
|
|
24930
25001
|
amount: formatConsumptionRate(planEntitlement.consumptionRate, locale),
|
|
24931
25002
|
units: getFeatureName(
|
|
24932
25003
|
planEntitlement.valueCredit,
|
|
25004
|
+
locale,
|
|
24933
25005
|
planEntitlement.consumptionRate
|
|
24934
25006
|
)
|
|
24935
25007
|
});
|
|
@@ -24937,18 +25009,18 @@ var UsageDetails = ({ entitlement, layout }) => {
|
|
|
24937
25009
|
if (priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof limit === "number") {
|
|
24938
25010
|
return t2("X units remaining", {
|
|
24939
25011
|
amount: formatNumber(limit, { locale }),
|
|
24940
|
-
units: getFeatureName(feature, limit)
|
|
25012
|
+
units: getFeatureName(feature, locale, limit)
|
|
24941
25013
|
});
|
|
24942
25014
|
}
|
|
24943
25015
|
if (!priceBehavior && typeof allocation === "number") {
|
|
24944
25016
|
const numericLimit = limit ?? allocation;
|
|
24945
25017
|
return t2("X units", {
|
|
24946
25018
|
amount: formatNumber(numericLimit, { locale }),
|
|
24947
|
-
units: getFeatureName(feature, numericLimit)
|
|
25019
|
+
units: getFeatureName(feature, locale, numericLimit)
|
|
24948
25020
|
});
|
|
24949
25021
|
}
|
|
24950
25022
|
if (!priceBehavior && allocationType === "unlimited") {
|
|
24951
|
-
return t2("Unlimited", { item: getFeatureName(feature) });
|
|
25023
|
+
return t2("Unlimited", { item: getFeatureName(feature, locale) });
|
|
24952
25024
|
}
|
|
24953
25025
|
}, [
|
|
24954
25026
|
t2,
|
|
@@ -24977,11 +25049,11 @@ var UsageDetails = ({ entitlement, layout }) => {
|
|
|
24977
25049
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react41.Fragment, { children: packageSize > 1 ? t2("$X/Y units/period", {
|
|
24978
25050
|
cost: formatCurrency(price, { locale, currency }),
|
|
24979
25051
|
size: packageSize,
|
|
24980
|
-
units: getFeatureName(feature, packageSize),
|
|
25052
|
+
units: getFeatureName(feature, locale, packageSize),
|
|
24981
25053
|
period: shortenPeriod(period, t2)
|
|
24982
25054
|
}) : t2("$X/unit/period", {
|
|
24983
25055
|
cost: formatCurrency(price, { locale, currency }),
|
|
24984
|
-
unit: getFeatureName(feature, packageSize),
|
|
25056
|
+
unit: getFeatureName(feature, locale, packageSize),
|
|
24985
25057
|
period: shortenPeriod(period, t2)
|
|
24986
25058
|
}) }, index)
|
|
24987
25059
|
);
|
|
@@ -24990,7 +25062,7 @@ var UsageDetails = ({ entitlement, layout }) => {
|
|
|
24990
25062
|
acc.push(
|
|
24991
25063
|
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react41.Fragment, { children: t2("X units used", {
|
|
24992
25064
|
amount: usage,
|
|
24993
|
-
units: getFeatureName(feature, usage)
|
|
25065
|
+
units: getFeatureName(feature, locale, usage)
|
|
24994
25066
|
}) }, index)
|
|
24995
25067
|
);
|
|
24996
25068
|
index += 1;
|
|
@@ -25220,9 +25292,10 @@ var IncludedFeatures = (0, import_react42.forwardRef)(({ className, ...rest }, r
|
|
|
25220
25292
|
singularName: grant.singularName,
|
|
25221
25293
|
pluralName: grant.pluralName
|
|
25222
25294
|
},
|
|
25295
|
+
locale,
|
|
25223
25296
|
grant.creditAmount
|
|
25224
25297
|
),
|
|
25225
|
-
licenseName: entitlement.feature ? getFeatureName(entitlement.feature, 1) : ""
|
|
25298
|
+
licenseName: entitlement.feature ? getFeatureName(entitlement.feature, locale, 1) : ""
|
|
25226
25299
|
}) }, grantIndex)),
|
|
25227
25300
|
props.entitlementExpiration.isVisible && entitlement.entitlementExpirationDate && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
25228
25301
|
Text,
|
|
@@ -25556,7 +25629,7 @@ var PriceDetails = ({
|
|
|
25556
25629
|
packageSize,
|
|
25557
25630
|
" "
|
|
25558
25631
|
] }),
|
|
25559
|
-
getFeatureName(feature, packageSize),
|
|
25632
|
+
getFeatureName(feature, locale, packageSize),
|
|
25560
25633
|
feature.featureType === FeatureType.Trait && period && /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_jsx_runtime56.Fragment, { children: [
|
|
25561
25634
|
"/",
|
|
25562
25635
|
shortenPeriod(period, t2)
|
|
@@ -25581,7 +25654,7 @@ var PriceDetails = ({
|
|
|
25581
25654
|
typeof amount === "number" && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_jsx_runtime56.Fragment, { children: priceBehavior === EntitlementPriceBehavior.Overage ? /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(Text, { children: [
|
|
25582
25655
|
formatNumber(amount, { locale }),
|
|
25583
25656
|
" ",
|
|
25584
|
-
getFeatureName(feature, amount),
|
|
25657
|
+
getFeatureName(feature, locale, amount),
|
|
25585
25658
|
" \xB7 ",
|
|
25586
25659
|
formatCurrency(currentTierPerUnitPrice * amount, {
|
|
25587
25660
|
locale,
|
|
@@ -25709,7 +25782,7 @@ var UsageByUser = ({ source, unit }) => {
|
|
|
25709
25782
|
const total = current?.section?.total ?? 0;
|
|
25710
25783
|
const totalUsers = current?.section?.totalUsers ?? 0;
|
|
25711
25784
|
const unattributed = current?.section?.unattributed;
|
|
25712
|
-
const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, amount)}`;
|
|
25785
|
+
const formatAmount = (amount) => `${formatNumber(amount, { locale })} ${getFeatureName(unit, locale, amount)}`;
|
|
25713
25786
|
if (error) {
|
|
25714
25787
|
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Flex, { $flexDirection: "column", $gap: "0.5rem", $alignItems: "flex-start", children: [
|
|
25715
25788
|
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { display: "heading4", children: t2("Usage by user") }),
|
|
@@ -25815,10 +25888,10 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
|
|
|
25815
25888
|
const acc = [];
|
|
25816
25889
|
acc.push(
|
|
25817
25890
|
priceBehavior === EntitlementPriceBehavior.Tier && typeof currentTier?.to === "number" && typeof feature !== "undefined" ? currentTier?.to === Infinity ? t2("Unlimited in this tier", {
|
|
25818
|
-
feature: getFeatureName(feature)
|
|
25891
|
+
feature: getFeatureName(feature, locale)
|
|
25819
25892
|
}) : t2("Up to X units in this tier", {
|
|
25820
25893
|
amount: currentTier.to,
|
|
25821
|
-
feature: getFeatureName(feature)
|
|
25894
|
+
feature: getFeatureName(feature, locale)
|
|
25822
25895
|
}) : priceBehavior === EntitlementPriceBehavior.Overage && typeof limit === "number" ? t2("X included", {
|
|
25823
25896
|
amount: formatNumber(limit, { locale })
|
|
25824
25897
|
}) : priceBehavior === EntitlementPriceBehavior.PayInAdvance && typeof usage === "number" ? `${formatNumber(usage, { locale })} ${t2("used")}` : priceBehavior === EntitlementPriceBehavior.PayAsYouGo && typeof cost === "number" ? formatCurrency(cost, { locale, currency: billingPrice?.currency }) : data?.displaySettings?.showCredits && priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof planEntitlement?.valueCredit !== "undefined" && typeof planEntitlement?.consumptionRate === "number" ? t2("X units per use", {
|
|
@@ -25828,11 +25901,12 @@ var Limit = ({ entitlement, usageDetails, fontStyle }) => {
|
|
|
25828
25901
|
),
|
|
25829
25902
|
units: getFeatureName(
|
|
25830
25903
|
planEntitlement.valueCredit,
|
|
25904
|
+
locale,
|
|
25831
25905
|
planEntitlement.consumptionRate
|
|
25832
25906
|
)
|
|
25833
25907
|
}) : priceBehavior === EntitlementPriceBehavior.CreditBurndown && typeof feature !== "undefined" && typeof limit === "number" ? t2("X units remaining", {
|
|
25834
25908
|
amount: formatNumber(limit, { locale }),
|
|
25835
|
-
units: getFeatureName(feature, limit)
|
|
25909
|
+
units: getFeatureName(feature, locale, limit)
|
|
25836
25910
|
}) : typeof limit === "number" ? t2("Limit of", {
|
|
25837
25911
|
amount: formatNumber(limit, { locale })
|
|
25838
25912
|
}) : t2("No limit")
|
|
@@ -26034,11 +26108,11 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26034
26108
|
formatNumber(limit, { locale }),
|
|
26035
26109
|
" "
|
|
26036
26110
|
] }),
|
|
26037
|
-
getFeatureName(feature, limit)
|
|
26111
|
+
getFeatureName(feature, locale, limit)
|
|
26038
26112
|
] }) : typeof usage === "number" && /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
26039
26113
|
formatNumber(usage, { locale }),
|
|
26040
26114
|
" ",
|
|
26041
|
-
getFeatureName(feature, usage),
|
|
26115
|
+
getFeatureName(feature, locale, usage),
|
|
26042
26116
|
" ",
|
|
26043
26117
|
t2("used")
|
|
26044
26118
|
] }) }) }),
|
|
@@ -26127,6 +26201,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26127
26201
|
}),
|
|
26128
26202
|
units: getFeatureName(
|
|
26129
26203
|
credit,
|
|
26204
|
+
locale,
|
|
26130
26205
|
credit.total.remaining
|
|
26131
26206
|
)
|
|
26132
26207
|
}) }) }),
|
|
@@ -26168,6 +26243,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26168
26243
|
quantity: licenseQuantity,
|
|
26169
26244
|
licenseName: getFeatureName(
|
|
26170
26245
|
licenseFeature,
|
|
26246
|
+
locale,
|
|
26171
26247
|
licenseQuantity
|
|
26172
26248
|
),
|
|
26173
26249
|
perUnit: perLicenseGrant.amount
|
|
@@ -26192,7 +26268,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26192
26268
|
children: [
|
|
26193
26269
|
t2("Your plan includes credits", {
|
|
26194
26270
|
total,
|
|
26195
|
-
creditName: getFeatureName(credit, total),
|
|
26271
|
+
creditName: getFeatureName(credit, locale, total),
|
|
26196
26272
|
period: shortenPeriod(composition.period, t2),
|
|
26197
26273
|
composition: ` \u2014 ${parts.join(" + ")}`
|
|
26198
26274
|
}),
|
|
@@ -26227,6 +26303,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26227
26303
|
amount: grant.quantity,
|
|
26228
26304
|
item: getFeatureName(
|
|
26229
26305
|
credit,
|
|
26306
|
+
locale,
|
|
26230
26307
|
grant.quantity
|
|
26231
26308
|
)
|
|
26232
26309
|
}) }) }),
|
|
@@ -26248,7 +26325,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26248
26325
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_jsx_runtime58.Fragment, { children: [
|
|
26249
26326
|
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Box, { $display: "table-cell", $padding: padding, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { children: grant.grantReason === BillingCreditGrantReason.Purchased ? /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(import_jsx_runtime58.Fragment, { children: t2("X item bundle", {
|
|
26250
26327
|
amount: grant.quantity,
|
|
26251
|
-
item: getFeatureName(credit, 1),
|
|
26328
|
+
item: getFeatureName(credit, locale, 1),
|
|
26252
26329
|
createdAt: toPrettyDate(
|
|
26253
26330
|
grant.createdAt,
|
|
26254
26331
|
{ locale, month: "short" }
|
|
@@ -26257,6 +26334,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26257
26334
|
amount: grant.quantity,
|
|
26258
26335
|
item: getFeatureName(
|
|
26259
26336
|
credit,
|
|
26337
|
+
locale,
|
|
26260
26338
|
grant.quantity
|
|
26261
26339
|
),
|
|
26262
26340
|
createdAt: toPrettyDate(
|
|
@@ -26267,6 +26345,7 @@ var MeteredFeatures = (0, import_react45.forwardRef)(({ className, ...rest }, re
|
|
|
26267
26345
|
amount: grant.quantity,
|
|
26268
26346
|
item: getFeatureName(
|
|
26269
26347
|
credit,
|
|
26348
|
+
locale,
|
|
26270
26349
|
grant.quantity
|
|
26271
26350
|
),
|
|
26272
26351
|
createdAt: toPrettyDate(
|
|
@@ -27234,7 +27313,7 @@ var UsageDetails2 = ({
|
|
|
27234
27313
|
packageSize,
|
|
27235
27314
|
" "
|
|
27236
27315
|
] }),
|
|
27237
|
-
getFeatureName(entitlement.feature, packageSize),
|
|
27316
|
+
getFeatureName(entitlement.feature, locale, packageSize),
|
|
27238
27317
|
entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
27239
27318
|
"/",
|
|
27240
27319
|
shortenPeriod(period, t2)
|
|
@@ -27254,6 +27333,7 @@ var UsageDetails2 = ({
|
|
|
27254
27333
|
" ",
|
|
27255
27334
|
getFeatureName(
|
|
27256
27335
|
entitlement.planEntitlement.valueCredit,
|
|
27336
|
+
locale,
|
|
27257
27337
|
entitlement.planEntitlement.consumptionRate
|
|
27258
27338
|
),
|
|
27259
27339
|
" ",
|
|
@@ -27289,7 +27369,7 @@ var UsageDetails2 = ({
|
|
|
27289
27369
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsx)(Text, { display: layout.addOns.fontStyle, children: typeof quantity === "number" ? /* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(import_jsx_runtime63.Fragment, { children: [
|
|
27290
27370
|
quantity,
|
|
27291
27371
|
" ",
|
|
27292
|
-
getFeatureName(entitlement.feature, quantity, true)
|
|
27372
|
+
getFeatureName(entitlement.feature, locale, quantity, true)
|
|
27293
27373
|
] }) : entitlement.feature.name }),
|
|
27294
27374
|
/* @__PURE__ */ (0, import_jsx_runtime63.jsxs)(Text, { children: [
|
|
27295
27375
|
description.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
@@ -27750,9 +27830,14 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27750
27830
|
amount: perLicenseGrant.amount,
|
|
27751
27831
|
creditName: getFeatureName(
|
|
27752
27832
|
group,
|
|
27833
|
+
locale,
|
|
27753
27834
|
perLicenseGrant.amount
|
|
27754
27835
|
),
|
|
27755
|
-
licenseName: getFeatureName(
|
|
27836
|
+
licenseName: getFeatureName(
|
|
27837
|
+
licenseFeature,
|
|
27838
|
+
locale,
|
|
27839
|
+
1
|
|
27840
|
+
)
|
|
27756
27841
|
}),
|
|
27757
27842
|
composition.fixedQuantity > 0 && creditPeriod && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
27758
27843
|
" ",
|
|
@@ -27760,6 +27845,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27760
27845
|
amount: composition.fixedQuantity,
|
|
27761
27846
|
creditName: getFeatureName(
|
|
27762
27847
|
group,
|
|
27848
|
+
locale,
|
|
27763
27849
|
composition.fixedQuantity
|
|
27764
27850
|
),
|
|
27765
27851
|
period: t2(
|
|
@@ -27770,7 +27856,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27770
27856
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
27771
27857
|
group.total.value,
|
|
27772
27858
|
" ",
|
|
27773
|
-
getFeatureName(group, group.total.value),
|
|
27859
|
+
getFeatureName(group, locale, group.total.value),
|
|
27774
27860
|
" ",
|
|
27775
27861
|
subscriptionInterval && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
27776
27862
|
t2("per"),
|
|
@@ -27813,6 +27899,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27813
27899
|
quantity: licenseQuantity,
|
|
27814
27900
|
licenseName: getFeatureName(
|
|
27815
27901
|
licenseFeature,
|
|
27902
|
+
locale,
|
|
27816
27903
|
licenseQuantity
|
|
27817
27904
|
),
|
|
27818
27905
|
perUnit: perLicenseGrant.amount,
|
|
@@ -27820,6 +27907,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27820
27907
|
total: resolvedTotal,
|
|
27821
27908
|
creditName: getFeatureName(
|
|
27822
27909
|
group,
|
|
27910
|
+
locale,
|
|
27823
27911
|
resolvedTotal
|
|
27824
27912
|
),
|
|
27825
27913
|
period: shortenPeriod(creditPeriod, t2)
|
|
@@ -27827,12 +27915,14 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27827
27915
|
quantity: licenseQuantity,
|
|
27828
27916
|
licenseName: getFeatureName(
|
|
27829
27917
|
licenseFeature,
|
|
27918
|
+
locale,
|
|
27830
27919
|
licenseQuantity
|
|
27831
27920
|
),
|
|
27832
27921
|
perUnit: perLicenseGrant.amount,
|
|
27833
27922
|
total: resolvedTotal,
|
|
27834
27923
|
creditName: getFeatureName(
|
|
27835
27924
|
group,
|
|
27925
|
+
locale,
|
|
27836
27926
|
resolvedTotal
|
|
27837
27927
|
),
|
|
27838
27928
|
period: shortenPeriod(creditPeriod, t2)
|
|
@@ -27874,7 +27964,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27874
27964
|
if (!autoTopupEnabled) {
|
|
27875
27965
|
acc.push(
|
|
27876
27966
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { $leading: "tight", children: t2("Auto top-up disabled for token", {
|
|
27877
|
-
unit: getFeatureName(grant.credit, 1)
|
|
27967
|
+
unit: getFeatureName(grant.credit, locale, 1)
|
|
27878
27968
|
}) }, grant.id)
|
|
27879
27969
|
);
|
|
27880
27970
|
return acc;
|
|
@@ -27886,6 +27976,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27886
27976
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(Text, { $leading: "tight", children: t2("Adds X tokens when Y remaining in balance", {
|
|
27887
27977
|
unit: getFeatureName(
|
|
27888
27978
|
grant.credit,
|
|
27979
|
+
locale,
|
|
27889
27980
|
autoTopupAmount
|
|
27890
27981
|
),
|
|
27891
27982
|
amount: autoTopupAmount,
|
|
@@ -27945,7 +28036,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27945
28036
|
" (",
|
|
27946
28037
|
group.quantity,
|
|
27947
28038
|
" ",
|
|
27948
|
-
getFeatureName(group, group.quantity),
|
|
28039
|
+
getFeatureName(group, locale, group.quantity),
|
|
27949
28040
|
")"
|
|
27950
28041
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { display: props.addOns.fontStyle, children: [
|
|
27951
28042
|
group.grants.length > 1 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { style: { opacity: 0.5 }, children: [
|
|
@@ -27956,7 +28047,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
27956
28047
|
] }),
|
|
27957
28048
|
group.quantity,
|
|
27958
28049
|
" ",
|
|
27959
|
-
getFeatureName(group, group.quantity)
|
|
28050
|
+
getFeatureName(group, locale, group.quantity)
|
|
27960
28051
|
] }),
|
|
27961
28052
|
group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
27962
28053
|
Text,
|
|
@@ -28016,12 +28107,12 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
28016
28107
|
" (",
|
|
28017
28108
|
group.quantity,
|
|
28018
28109
|
" ",
|
|
28019
|
-
getFeatureName(group, group.quantity),
|
|
28110
|
+
getFeatureName(group, locale, group.quantity),
|
|
28020
28111
|
")"
|
|
28021
28112
|
] }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { display: props.addOns.fontStyle, children: [
|
|
28022
28113
|
group.quantity,
|
|
28023
28114
|
" ",
|
|
28024
|
-
getFeatureName(group, group.quantity)
|
|
28115
|
+
getFeatureName(group, locale, group.quantity)
|
|
28025
28116
|
] }),
|
|
28026
28117
|
group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
28027
28118
|
Text,
|
|
@@ -28072,7 +28163,7 @@ var PlanManager = (0, import_react50.forwardRef)(({ children, className, portal,
|
|
|
28072
28163
|
/* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(Text, { display: props.addOns.fontStyle, children: [
|
|
28073
28164
|
group.quantity,
|
|
28074
28165
|
" ",
|
|
28075
|
-
getFeatureName(group, group.quantity)
|
|
28166
|
+
getFeatureName(group, locale, group.quantity)
|
|
28076
28167
|
] }),
|
|
28077
28168
|
group.total.used > 0 && /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(
|
|
28078
28169
|
Text,
|
|
@@ -28145,6 +28236,7 @@ function renderMeteredEntitlementPricing2({
|
|
|
28145
28236
|
"/",
|
|
28146
28237
|
feature ? getFeatureName(
|
|
28147
28238
|
feature,
|
|
28239
|
+
locale,
|
|
28148
28240
|
packageSize
|
|
28149
28241
|
) : featureName || "unit"
|
|
28150
28242
|
] });
|
|
@@ -28162,6 +28254,7 @@ function renderMeteredEntitlementPricing2({
|
|
|
28162
28254
|
] }),
|
|
28163
28255
|
feature ? getFeatureName(
|
|
28164
28256
|
feature,
|
|
28257
|
+
locale,
|
|
28165
28258
|
packageSize
|
|
28166
28259
|
) : featureName || "unit"
|
|
28167
28260
|
] });
|
|
@@ -28351,7 +28444,7 @@ var AddOn2 = ({
|
|
|
28351
28444
|
{
|
|
28352
28445
|
$flexDirection: "column",
|
|
28353
28446
|
$justifyContent: "center",
|
|
28354
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Text, { children: getFeatureName(entitlement.feature) })
|
|
28447
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(Text, { children: getFeatureName(entitlement.feature, locale) })
|
|
28355
28448
|
}
|
|
28356
28449
|
)
|
|
28357
28450
|
] }),
|
|
@@ -28513,7 +28606,11 @@ var Entitlement2 = ({
|
|
|
28513
28606
|
formatNumber(entitlementPackageSize, { locale }),
|
|
28514
28607
|
" "
|
|
28515
28608
|
] }),
|
|
28516
|
-
getFeatureName(
|
|
28609
|
+
getFeatureName(
|
|
28610
|
+
entitlement.feature,
|
|
28611
|
+
locale,
|
|
28612
|
+
entitlementPackageSize
|
|
28613
|
+
),
|
|
28517
28614
|
entitlement.priceBehavior === EntitlementPriceBehavior.PayInAdvance && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
28518
28615
|
" ",
|
|
28519
28616
|
t2("per"),
|
|
@@ -28531,12 +28628,13 @@ var Entitlement2 = ({
|
|
|
28531
28628
|
" ",
|
|
28532
28629
|
getFeatureName(
|
|
28533
28630
|
entitlement.valueCredit,
|
|
28631
|
+
locale,
|
|
28534
28632
|
entitlement.consumptionRate
|
|
28535
28633
|
),
|
|
28536
28634
|
" ",
|
|
28537
28635
|
t2("per"),
|
|
28538
28636
|
" ",
|
|
28539
|
-
getFeatureName(entitlement.feature, 1)
|
|
28637
|
+
getFeatureName(entitlement.feature, locale, 1)
|
|
28540
28638
|
] }) : entitlement.priceBehavior === EntitlementPriceBehavior.CreditBurndown && creditBasedEntitlementLimit ? /* @__PURE__ */ (0, import_jsx_runtime66.jsx)(import_jsx_runtime66.Fragment, { children: creditBasedEntitlementLimit?.period ? t2("Up to X units per period", {
|
|
28541
28639
|
amount: formatNumber(
|
|
28542
28640
|
creditBasedEntitlementLimit.limit,
|
|
@@ -28544,9 +28642,12 @@ var Entitlement2 = ({
|
|
|
28544
28642
|
),
|
|
28545
28643
|
units: getFeatureName(
|
|
28546
28644
|
entitlement.feature,
|
|
28645
|
+
locale,
|
|
28547
28646
|
creditBasedEntitlementLimit.limit
|
|
28548
28647
|
),
|
|
28549
|
-
period:
|
|
28648
|
+
period: t2(
|
|
28649
|
+
creditBasedEntitlementLimit.period
|
|
28650
|
+
)
|
|
28550
28651
|
}) : t2("Up to X units", {
|
|
28551
28652
|
amount: formatNumber(
|
|
28552
28653
|
creditBasedEntitlementLimit.limit,
|
|
@@ -28554,17 +28655,18 @@ var Entitlement2 = ({
|
|
|
28554
28655
|
),
|
|
28555
28656
|
units: getFeatureName(
|
|
28556
28657
|
entitlement.feature,
|
|
28658
|
+
locale,
|
|
28557
28659
|
creditBasedEntitlementLimit.limit
|
|
28558
28660
|
)
|
|
28559
28661
|
}) }) : entitlement.valueType === EntitlementValueType.Numeric || entitlement.valueType === EntitlementValueType.Unlimited || entitlement.valueType === EntitlementValueType.Trait ? /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
28560
28662
|
entitlement.valueType === EntitlementValueType.Unlimited && !entitlement.priceBehavior ? t2("Unlimited", {
|
|
28561
|
-
item: getFeatureName(entitlement.feature)
|
|
28663
|
+
item: getFeatureName(entitlement.feature, locale)
|
|
28562
28664
|
}) : /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
28563
28665
|
typeof limit === "number" && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
28564
28666
|
formatNumber(limit, { locale }),
|
|
28565
28667
|
" "
|
|
28566
28668
|
] }),
|
|
28567
|
-
getFeatureName(entitlement.feature, limit)
|
|
28669
|
+
getFeatureName(entitlement.feature, locale, limit)
|
|
28568
28670
|
] }),
|
|
28569
28671
|
metricPeriodName && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
28570
28672
|
" ",
|
|
@@ -28593,6 +28695,7 @@ var Entitlement2 = ({
|
|
|
28593
28695
|
] }),
|
|
28594
28696
|
getFeatureName(
|
|
28595
28697
|
entitlement.feature,
|
|
28698
|
+
locale,
|
|
28596
28699
|
entitlementPackageSize
|
|
28597
28700
|
),
|
|
28598
28701
|
entitlement.feature.featureType === FeatureType.Trait && /* @__PURE__ */ (0, import_jsx_runtime66.jsxs)(import_jsx_runtime66.Fragment, { children: [
|
|
@@ -29072,7 +29175,7 @@ var PricingTable = (0, import_react53.forwardRef)(({ className, ...rest }, ref)
|
|
|
29072
29175
|
$alignItems: "center",
|
|
29073
29176
|
$justifyContent: "center",
|
|
29074
29177
|
$padding: `${settings.theme.card.padding / TEXT_BASE_SIZE}rem`,
|
|
29075
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Loader, { "aria-label": "
|
|
29178
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime68.jsx)(Loader, { "aria-label": t2("Loading"), $size: "2xl" })
|
|
29076
29179
|
}
|
|
29077
29180
|
);
|
|
29078
29181
|
}
|
|
@@ -32290,6 +32393,7 @@ var Loading = () => {
|
|
|
32290
32393
|
};
|
|
32291
32394
|
var Error2 = ({ message }) => {
|
|
32292
32395
|
const { settings } = useEmbed();
|
|
32396
|
+
const { t: t2 } = useTranslation();
|
|
32293
32397
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsxs)(
|
|
32294
32398
|
Flex,
|
|
32295
32399
|
{
|
|
@@ -32301,7 +32405,7 @@ var Error2 = ({ message }) => {
|
|
|
32301
32405
|
$alignItems: "center",
|
|
32302
32406
|
$justifyContent: "center",
|
|
32303
32407
|
children: [
|
|
32304
|
-
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { display: "heading1", children: "Error" }) }),
|
|
32408
|
+
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { display: "heading1", children: t2("Error") }) }),
|
|
32305
32409
|
/* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Box, { $marginBottom: "0.5rem", children: /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Text, { children: message }) })
|
|
32306
32410
|
]
|
|
32307
32411
|
}
|
|
@@ -32309,6 +32413,7 @@ var Error2 = ({ message }) => {
|
|
|
32309
32413
|
};
|
|
32310
32414
|
var SchematicEmbed = ({ id, accessToken }) => {
|
|
32311
32415
|
const theme = (0, import_react58.useContext)(import_styled_components23.ThemeContext);
|
|
32416
|
+
const { t: t2 } = useTranslation();
|
|
32312
32417
|
const {
|
|
32313
32418
|
data,
|
|
32314
32419
|
error,
|
|
@@ -32379,13 +32484,15 @@ var SchematicEmbed = ({ id, accessToken }) => {
|
|
|
32379
32484
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error2, { message: error.message });
|
|
32380
32485
|
}
|
|
32381
32486
|
if (accessToken?.length === 0) {
|
|
32382
|
-
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error2, { message: "Please provide an access token." });
|
|
32487
|
+
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(Error2, { message: t2("Please provide an access token.") });
|
|
32383
32488
|
}
|
|
32384
32489
|
if (!accessToken?.startsWith("token_")) {
|
|
32385
32490
|
return /* @__PURE__ */ (0, import_jsx_runtime72.jsx)(
|
|
32386
32491
|
Error2,
|
|
32387
32492
|
{
|
|
32388
|
-
message:
|
|
32493
|
+
message: t2(
|
|
32494
|
+
"Invalid access token; your temporary access token will start with `token_`."
|
|
32495
|
+
)
|
|
32389
32496
|
}
|
|
32390
32497
|
);
|
|
32391
32498
|
}
|