microboard-ui-temp 0.1.52 → 0.1.53
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/dist/index.js
CHANGED
|
@@ -332635,16 +332635,16 @@ Upgrade to Plus to increase the limit and keep working`,
|
|
|
332635
332635
|
upgradePlan: "Upgrade Plan",
|
|
332636
332636
|
currentPlanFree: {
|
|
332637
332637
|
part1: "The ",
|
|
332638
|
-
part2: " plan is active.
|
|
332638
|
+
part2: " plan is active."
|
|
332639
332639
|
},
|
|
332640
332640
|
limits: "Limits",
|
|
332641
332641
|
currentPlanPending: {
|
|
332642
332642
|
part1: "The ",
|
|
332643
|
-
part2: " plan is paid until {{cancellationDate}}.
|
|
332643
|
+
part2: " plan is paid until {{cancellationDate}}."
|
|
332644
332644
|
},
|
|
332645
332645
|
currentPlanActive: {
|
|
332646
332646
|
part1: "The current ",
|
|
332647
|
-
part2: " plan is paid until {{cancellationDate}}.
|
|
332647
|
+
part2: " plan is paid until {{cancellationDate}}. Auto-payment is enabled."
|
|
332648
332648
|
},
|
|
332649
332649
|
nextPayment: "Next payment: {{paymentDate}}",
|
|
332650
332650
|
pendingBtn: "The plan will be effective as of {{activationDate}}",
|
|
@@ -332699,8 +332699,6 @@ Upgrade to Plus to increase the limit and keep working`,
|
|
|
332699
332699
|
name: "Basic",
|
|
332700
332700
|
description: "GPT-4o mini",
|
|
332701
332701
|
features: [
|
|
332702
|
-
"GPT-4o mini",
|
|
332703
|
-
"DeepSeek-R1",
|
|
332704
332702
|
"Unlimited boards and figures",
|
|
332705
332703
|
"Media storage — up to 100 MB"
|
|
332706
332704
|
],
|
|
@@ -332711,7 +332709,6 @@ Upgrade to Plus to increase the limit and keep working`,
|
|
|
332711
332709
|
description: "GPT-4o mini",
|
|
332712
332710
|
features: [
|
|
332713
332711
|
"All features of the Basic plan",
|
|
332714
|
-
"All premium board features except extra AI",
|
|
332715
332712
|
"Media storage — up to 100 GB",
|
|
332716
332713
|
"Premium support"
|
|
332717
332714
|
],
|
|
@@ -333873,16 +333870,16 @@ var ru_default = {
|
|
|
333873
333870
|
upgradePlan: "Выбрать тариф",
|
|
333874
333871
|
currentPlanFree: {
|
|
333875
333872
|
part1: "Тариф ",
|
|
333876
|
-
part2: " активен.
|
|
333873
|
+
part2: " активен."
|
|
333877
333874
|
},
|
|
333878
333875
|
limits: "Лимиты",
|
|
333879
333876
|
currentPlanPending: {
|
|
333880
333877
|
part1: "Тариф ",
|
|
333881
|
-
part2: " оплачен до {{cancellationDate}}.
|
|
333878
|
+
part2: " оплачен до {{cancellationDate}}."
|
|
333882
333879
|
},
|
|
333883
333880
|
currentPlanActive: {
|
|
333884
333881
|
part1: "Тариф ",
|
|
333885
|
-
part2: " оплачен до {{cancellationDate}}.
|
|
333882
|
+
part2: " оплачен до {{cancellationDate}}. Подключен автоплатеж."
|
|
333886
333883
|
},
|
|
333887
333884
|
nextPayment: "Следующее списание: {{paymentDate}}",
|
|
333888
333885
|
pendingBtn: "Будет действовать с {{activationDate}}",
|
|
@@ -333964,8 +333961,6 @@ var ru_default = {
|
|
|
333964
333961
|
name: "Базовый",
|
|
333965
333962
|
description: "GPT-4o mini",
|
|
333966
333963
|
features: [
|
|
333967
|
-
"GPT-4o mini",
|
|
333968
|
-
"DeepSeek-R1",
|
|
333969
333964
|
"Доски, фигуры — без ограничений",
|
|
333970
333965
|
"Добавление медиа - до 100 МБ"
|
|
333971
333966
|
],
|
|
@@ -333976,7 +333971,6 @@ var ru_default = {
|
|
|
333976
333971
|
description: "GPT-4o mini",
|
|
333977
333972
|
features: [
|
|
333978
333973
|
"Все возможности тарифа Базовый",
|
|
333979
|
-
"Все премиум возможности доски за исключением ИИ",
|
|
333980
333974
|
"Добавление медиа - до 100 ГБ",
|
|
333981
333975
|
"Премиум поддержка"
|
|
333982
333976
|
],
|
|
@@ -343228,29 +343222,7 @@ function PlanCard({
|
|
|
343228
343222
|
pattern: "tertiary"
|
|
343229
343223
|
}, getButtonLabel())), description && /* @__PURE__ */ import_react165.default.createElement("div", {
|
|
343230
343224
|
className: PlanCard_module_default.models
|
|
343231
|
-
}, description)),
|
|
343232
|
-
onClick: getHandler(),
|
|
343233
|
-
className: PlanCard_module_default.button,
|
|
343234
|
-
disabled: state26 === "current" && !buttonText || state26 === "pending",
|
|
343235
|
-
pattern: state26 === "pending" ? "tertiary" : "primary"
|
|
343236
|
-
}, getButtonLabel())), additionalFeature && /* @__PURE__ */ import_react165.default.createElement("div", {
|
|
343237
|
-
className: clsx_default(PlanCard_module_default.feature, PlanCard_module_default.tokenFeature)
|
|
343238
|
-
}, /* @__PURE__ */ import_react165.default.createElement("span", null, additionalFeature), additionalFeatureTooltip && /* @__PURE__ */ import_react165.default.createElement("div", {
|
|
343239
|
-
className: PlanCard_module_default.tooltipContainer
|
|
343240
|
-
}, /* @__PURE__ */ import_react165.default.createElement(Icon, {
|
|
343241
|
-
iconName: "InformationLine",
|
|
343242
|
-
width: 24,
|
|
343243
|
-
height: 24,
|
|
343244
|
-
className: PlanCard_module_default.tooltipIcon
|
|
343245
|
-
}), /* @__PURE__ */ import_react165.default.createElement(Tooltip, {
|
|
343246
|
-
id: `${name2}-${additionalFeature}-tooltip`,
|
|
343247
|
-
tooltip: additionalFeatureTooltip,
|
|
343248
|
-
tooltipPosition: "right",
|
|
343249
|
-
tooltipAlign: "left",
|
|
343250
|
-
className: PlanCard_module_default.tooltip,
|
|
343251
|
-
allowTextWrap: true,
|
|
343252
|
-
width: "232px"
|
|
343253
|
-
}))), /* @__PURE__ */ import_react165.default.createElement(UiSeparator, null), /* @__PURE__ */ import_react165.default.createElement("ul", {
|
|
343225
|
+
}, description)), /* @__PURE__ */ import_react165.default.createElement(UiSeparator, null), /* @__PURE__ */ import_react165.default.createElement("ul", {
|
|
343254
343226
|
className: PlanCard_module_default.features
|
|
343255
343227
|
}, features.map((feature) => /* @__PURE__ */ import_react165.default.createElement("li", {
|
|
343256
343228
|
className: PlanCard_module_default.feature,
|
|
@@ -343834,11 +343806,9 @@ function PlusAIPlanCard() {
|
|
|
343834
343806
|
const { openModal: openModal2 } = useUiModalContext();
|
|
343835
343807
|
const { openModalConfirm } = useConfirmModalContext();
|
|
343836
343808
|
const [plan, setPlan] = import_react167.useState(null);
|
|
343837
|
-
const [plans, setPlans] = import_react167.useState([]);
|
|
343838
343809
|
const [isLoading, setIsLoading] = import_react167.useState(true);
|
|
343839
343810
|
import_react167.useEffect(() => {
|
|
343840
343811
|
exports_billing.getPlans().then(({ data }) => {
|
|
343841
|
-
setPlans(data ?? []);
|
|
343842
343812
|
const plusAIPlan = data?.find(({ id: id3 }) => id3 === "plusAI");
|
|
343843
343813
|
setPlan(plusAIPlan ?? null);
|
|
343844
343814
|
}).finally(() => setIsLoading(false));
|
|
@@ -343908,32 +343878,20 @@ function PlusAIPlanCard() {
|
|
|
343908
343878
|
return;
|
|
343909
343879
|
};
|
|
343910
343880
|
const isPlusAIPlan = account.billingInfo?.plan.name === plan?.name;
|
|
343911
|
-
const isPlusActive = account.billingInfo?.plan.name === "plus";
|
|
343912
|
-
const plusPlan = plans.find((p4) => p4.id === "plus");
|
|
343913
|
-
const plusAIPrice = plan?.price ? Number(plan.price) : 0;
|
|
343914
|
-
const plusPrice = plusPlan?.price ? Number(plusPlan.price) : 0;
|
|
343915
|
-
const discountedPrice = isPlusActive ? Math.max(plusAIPrice - plusPrice, 0) : plusAIPrice;
|
|
343916
|
-
const handleUpgradeWithDiscount = async (ev) => {
|
|
343917
|
-
ev.preventDefault();
|
|
343918
|
-
ev.stopPropagation();
|
|
343919
|
-
await exports_billing.createCheckout({
|
|
343920
|
-
planId: plan?.id || "plusAI",
|
|
343921
|
-
successUrl: window.location.href,
|
|
343922
|
-
cancelUrl: window.location.href
|
|
343923
|
-
});
|
|
343924
|
-
};
|
|
343925
343881
|
const planState = getPlusSubState();
|
|
343926
343882
|
return /* @__PURE__ */ import_react167.default.createElement(PlanCard, {
|
|
343927
343883
|
name: t10("userPlan.plans.plusAI.name"),
|
|
343928
|
-
features: t10("userPlan.plans.plusAI.features", {
|
|
343884
|
+
features: t10("userPlan.plans.plusAI.features", {
|
|
343885
|
+
returnObjects: true
|
|
343886
|
+
}),
|
|
343929
343887
|
additionalFeature: t10("userPlan.plans.plusAI.tokensFeature"),
|
|
343930
343888
|
additionalFeatureTooltip: t10("userPlan.tokensTooltip"),
|
|
343931
343889
|
variant: "plus",
|
|
343932
|
-
price:
|
|
343890
|
+
price: isPlusAIPlan ? 8 : account.getIsAnnualPayment() ? annualToMonthlyPrice(plan?.annualPrice) : plan?.price,
|
|
343933
343891
|
isTokenPrice: isPlusAIPlan,
|
|
343934
343892
|
oldPrice: !isPlusAIPlan && account.getIsAnnualPayment() ? typeof plan?.price === "number" ? plan.price : null : null,
|
|
343935
343893
|
state: planState,
|
|
343936
|
-
onSubscribe:
|
|
343894
|
+
onSubscribe: isPlusAIPlan ? handleBuyTokens : handleOpenPaymentModal,
|
|
343937
343895
|
onDowngrade,
|
|
343938
343896
|
isLoading,
|
|
343939
343897
|
buttonText: isPlusAIPlan ? t10("userPlan.buyTokens") : undefined
|
|
@@ -344017,29 +343975,21 @@ function PlusPlanCard() {
|
|
|
344017
343975
|
return;
|
|
344018
343976
|
};
|
|
344019
343977
|
const isPlusPlan = account.billingInfo?.plan.name === plan?.name;
|
|
344020
|
-
const isPlusAIActive = account.billingInfo?.plan.name === "plusAI";
|
|
344021
343978
|
const planState = getPlusSubState();
|
|
344022
|
-
const handleDowngradeFromPlusAI = async () => {
|
|
344023
|
-
await changePlan("plus");
|
|
344024
|
-
notify2({
|
|
344025
|
-
header: "Тариф обновлен",
|
|
344026
|
-
body: t10("userPlan.downgradeModal.description", {
|
|
344027
|
-
planName: conf.planNames["plus"]
|
|
344028
|
-
})
|
|
344029
|
-
});
|
|
344030
|
-
};
|
|
344031
343979
|
return /* @__PURE__ */ import_react167.default.createElement(PlanCard, {
|
|
344032
343980
|
name: t10("userPlan.plans.plus.name"),
|
|
344033
|
-
features: t10("userPlan.plans.plus.features", {
|
|
343981
|
+
features: t10("userPlan.plans.plus.features", {
|
|
343982
|
+
returnObjects: true
|
|
343983
|
+
}),
|
|
344034
343984
|
variant: "basic",
|
|
344035
|
-
price: isPlusPlan ? 6 : account.getIsAnnualPayment() ? annualToMonthlyPrice(plan?.annualPrice) : plan?.price
|
|
343985
|
+
price: isPlusPlan ? 6 : account.getIsAnnualPayment() ? annualToMonthlyPrice(plan?.annualPrice) : plan?.price,
|
|
344036
343986
|
additionalFeature: t10("userPlan.plans.plus.tokensFeature"),
|
|
344037
343987
|
additionalFeatureTooltip: t10("userPlan.tokensTooltip"),
|
|
344038
343988
|
isTokenPrice: isPlusPlan,
|
|
344039
343989
|
oldPrice: !isPlusPlan && account.getIsAnnualPayment() ? typeof plan?.price === "number" ? plan.price : null : null,
|
|
344040
|
-
state:
|
|
343990
|
+
state: planState,
|
|
344041
343991
|
onSubscribe: handleOpenPaymentModal,
|
|
344042
|
-
onDowngrade
|
|
343992
|
+
onDowngrade,
|
|
344043
343993
|
isLoading,
|
|
344044
343994
|
buttonText: isPlusPlan ? t10("userPlan.buyTokens") : undefined
|
|
344045
343995
|
});
|
|
@@ -344176,24 +344126,46 @@ function ModelRow({
|
|
|
344176
344126
|
}, formatDate(startDate), " - ", formatDate(endDate))), /* @__PURE__ */ import_react168.default.createElement("td", null, formatDate(startDate)), /* @__PURE__ */ import_react168.default.createElement("td", null, paymentType === "card" ? `$${centToUsd2(price)}` : `${price} ${symbol}`), /* @__PURE__ */ import_react168.default.createElement("td", null, PAYMENT_TYPE_DISPLAYNAME[paymentType]));
|
|
344177
344127
|
}
|
|
344178
344128
|
|
|
344129
|
+
// src/features/UserPlan/HistoryModal.tsx
|
|
344130
|
+
var import_react169 = __toESM(require_react(), 1);
|
|
344131
|
+
var HISTORY_MODAL_ID = Symbol("historyModal");
|
|
344132
|
+
function HistoryModal() {
|
|
344133
|
+
const { t: t10 } = useTranslation();
|
|
344134
|
+
const { openModal: openModal2 } = useUiModalContext();
|
|
344135
|
+
const handleBackButton = () => openModal2(USER_PLAN_MODAL_ID);
|
|
344136
|
+
return /* @__PURE__ */ import_react169.default.createElement(UiModal, {
|
|
344137
|
+
modalId: HISTORY_MODAL_ID,
|
|
344138
|
+
closeByBgClick: false
|
|
344139
|
+
}, /* @__PURE__ */ import_react169.default.createElement("div", {
|
|
344140
|
+
className: UserPlanModal_module_default.wrapper
|
|
344141
|
+
}, /* @__PURE__ */ import_react169.default.createElement("h1", {
|
|
344142
|
+
className: UserPlanModal_module_default.heading
|
|
344143
|
+
}, t10("userPlan.paymentHistoryHeading")), /* @__PURE__ */ import_react169.default.createElement(HistoryTable, null), /* @__PURE__ */ import_react169.default.createElement("button", {
|
|
344144
|
+
className: UserPlanModal_module_default.plansBtn,
|
|
344145
|
+
onClick: handleBackButton
|
|
344146
|
+
}, /* @__PURE__ */ import_react169.default.createElement(Icon, {
|
|
344147
|
+
iconName: "ArrowLeft1"
|
|
344148
|
+
}), t10("userPlan.backToPlans"))));
|
|
344149
|
+
}
|
|
344150
|
+
|
|
344179
344151
|
// src/features/UserPlan/LimitsModal.tsx
|
|
344180
|
-
var
|
|
344152
|
+
var import_react173 = __toESM(require_react(), 1);
|
|
344181
344153
|
|
|
344182
344154
|
// src/features/UserPlan/LimitsTable.tsx
|
|
344183
|
-
var
|
|
344155
|
+
var import_react172 = __toESM(require_react(), 1);
|
|
344184
344156
|
var import_react_dom7 = __toESM(require_react_dom(), 1);
|
|
344185
344157
|
|
|
344186
344158
|
// src/shared/lib/useClientRect.ts
|
|
344187
|
-
var
|
|
344159
|
+
var import_react170 = __toESM(require_react(), 1);
|
|
344188
344160
|
function useBoundingClientRect() {
|
|
344189
|
-
const elementRef =
|
|
344190
|
-
const [rect, setRect] =
|
|
344191
|
-
const updateRect =
|
|
344161
|
+
const elementRef = import_react170.useRef(null);
|
|
344162
|
+
const [rect, setRect] = import_react170.useState(null);
|
|
344163
|
+
const updateRect = import_react170.useCallback(() => {
|
|
344192
344164
|
if (elementRef.current) {
|
|
344193
344165
|
setRect(elementRef.current.getBoundingClientRect());
|
|
344194
344166
|
}
|
|
344195
344167
|
}, []);
|
|
344196
|
-
|
|
344168
|
+
import_react170.useLayoutEffect(() => {
|
|
344197
344169
|
updateRect();
|
|
344198
344170
|
const observer = new MutationObserver(() => updateRect());
|
|
344199
344171
|
if (elementRef.current) {
|
|
@@ -344213,9 +344185,9 @@ function useBoundingClientRect() {
|
|
|
344213
344185
|
}
|
|
344214
344186
|
|
|
344215
344187
|
// src/shared/lib/useHoverState.ts
|
|
344216
|
-
var
|
|
344188
|
+
var import_react171 = __toESM(require_react(), 1);
|
|
344217
344189
|
function useHoverState() {
|
|
344218
|
-
const [isHover, setIsHover] =
|
|
344190
|
+
const [isHover, setIsHover] = import_react171.useState(false);
|
|
344219
344191
|
const handlePointerEnter = () => setIsHover(true);
|
|
344220
344192
|
const handlePointerLeave = () => setIsHover(false);
|
|
344221
344193
|
return {
|
|
@@ -344251,17 +344223,17 @@ function LimitsTable() {
|
|
|
344251
344223
|
const currentPlanName = account.billingInfo?.plan.name || "basic";
|
|
344252
344224
|
const isPlusAI = currentPlanName.toLowerCase() === "plusai";
|
|
344253
344225
|
const sortedModels = models?.filter(({ id: id3 }) => MODELS_ORDER.includes(id3)).sort((model1, model2) => MODELS_ORDER.indexOf(model1.id) - MODELS_ORDER.indexOf(model2.id));
|
|
344254
|
-
return /* @__PURE__ */
|
|
344226
|
+
return /* @__PURE__ */ import_react172.default.createElement("table", {
|
|
344255
344227
|
className: LimitsTable_module_default.table
|
|
344256
|
-
}, /* @__PURE__ */
|
|
344228
|
+
}, /* @__PURE__ */ import_react172.default.createElement("thead", null, /* @__PURE__ */ import_react172.default.createElement("tr", {
|
|
344257
344229
|
className: LimitsTable_module_default.header
|
|
344258
|
-
}, /* @__PURE__ */
|
|
344230
|
+
}, /* @__PURE__ */ import_react172.default.createElement("th", {
|
|
344259
344231
|
className: LimitsTable_module_default.modelsHeading
|
|
344260
|
-
}, t10("userPlan.limitsTable.modelName")), /* @__PURE__ */
|
|
344232
|
+
}, t10("userPlan.limitsTable.modelName")), /* @__PURE__ */ import_react172.default.createElement("th", {
|
|
344261
344233
|
className: clsx_default(!isPlusAI && LimitsTable_module_default.currentTariff)
|
|
344262
|
-
}, t10("userPlan.plans.basic.name") + "/" + t10("userPlan.plans.plus.name"), /* @__PURE__ */
|
|
344234
|
+
}, t10("userPlan.plans.basic.name") + "/" + t10("userPlan.plans.plus.name"), /* @__PURE__ */ import_react172.default.createElement("div", null, t10("userPlan.limitsTable.costPerRequest"))), /* @__PURE__ */ import_react172.default.createElement("th", {
|
|
344263
344235
|
className: clsx_default(isPlusAI && LimitsTable_module_default.currentTariff)
|
|
344264
|
-
}, t10("userPlan.plans.plusAI.name"), /* @__PURE__ */
|
|
344236
|
+
}, t10("userPlan.plans.plusAI.name"), /* @__PURE__ */ import_react172.default.createElement("div", null, t10("userPlan.limitsTable.costPerRequest"))))), /* @__PURE__ */ import_react172.default.createElement("tbody", null, sortedModels?.map((model) => /* @__PURE__ */ import_react172.default.createElement(ModelRow2, {
|
|
344265
344237
|
key: model.id,
|
|
344266
344238
|
name: DISPLAYNAME_MAP[model.id] || model.displayName,
|
|
344267
344239
|
description: t10(`models.descriptions.${model.id}`, ""),
|
|
@@ -344278,22 +344250,22 @@ function ModelRow2({ description, name: name2, tokenCost, id: id3, isPlus }) {
|
|
|
344278
344250
|
console.log(id3, isAvailableInBasic);
|
|
344279
344251
|
const isAvailableInPlus = tokenCost > 0;
|
|
344280
344252
|
const basicCost = isAvailableInBasic ? tokenCost : null;
|
|
344281
|
-
return /* @__PURE__ */
|
|
344253
|
+
return /* @__PURE__ */ import_react172.default.createElement("tr", {
|
|
344282
344254
|
className: LimitsTable_module_default.row
|
|
344283
|
-
}, /* @__PURE__ */
|
|
344255
|
+
}, /* @__PURE__ */ import_react172.default.createElement("td", {
|
|
344284
344256
|
className: LimitsTable_module_default.model
|
|
344285
|
-
}, /* @__PURE__ */
|
|
344257
|
+
}, /* @__PURE__ */ import_react172.default.createElement("p", {
|
|
344286
344258
|
className: LimitsTable_module_default.modelName
|
|
344287
|
-
}, name2), /* @__PURE__ */
|
|
344259
|
+
}, name2), /* @__PURE__ */ import_react172.default.createElement("p", {
|
|
344288
344260
|
className: LimitsTable_module_default.modelDescription
|
|
344289
|
-
}, description)), /* @__PURE__ */
|
|
344261
|
+
}, description)), /* @__PURE__ */ import_react172.default.createElement("td", {
|
|
344290
344262
|
className: clsx_default(LimitsTable_module_default.limit, !isAvailableInBasic && LimitsTable_module_default.modelDisabled, !isPlus && LimitsTable_module_default.currentTariff)
|
|
344291
|
-
}, isAvailableInBasic ? basicCost : t10("userPlan.limitsTable.unavailable")), /* @__PURE__ */
|
|
344263
|
+
}, isAvailableInBasic ? basicCost : t10("userPlan.limitsTable.unavailable")), /* @__PURE__ */ import_react172.default.createElement("td", {
|
|
344292
344264
|
onPointerEnter: !isAvailableInPlus ? handlePointerEnter : undefined,
|
|
344293
344265
|
onPointerLeave: !isAvailableInPlus ? handlePointerLeave : undefined,
|
|
344294
344266
|
ref: elementRef,
|
|
344295
344267
|
className: clsx_default(LimitsTable_module_default.limit, isPlus && LimitsTable_module_default.currentTariff)
|
|
344296
|
-
}, isAvailableInPlus ? tokenCost : /* @__PURE__ */
|
|
344268
|
+
}, isAvailableInPlus ? tokenCost : /* @__PURE__ */ import_react172.default.createElement(import_react172.default.Fragment, null, t10("userPlan.limitsTable.unavailable"), /* @__PURE__ */ import_react172.default.createElement(Tooltip2, {
|
|
344297
344269
|
text: t10("userPlan.limitsTable.availableOnPlus"),
|
|
344298
344270
|
x: (rect?.left ?? 0) + (rect?.width ?? 0) - 55,
|
|
344299
344271
|
y: (rect?.top ?? 0) + (rect?.height ?? 0) + 12,
|
|
@@ -344301,12 +344273,12 @@ function ModelRow2({ description, name: name2, tokenCost, id: id3, isPlus }) {
|
|
|
344301
344273
|
}))));
|
|
344302
344274
|
}
|
|
344303
344275
|
function Tooltip2({ text: text5, x: x9, y: y14, visible }) {
|
|
344304
|
-
return import_react_dom7.createPortal(/* @__PURE__ */
|
|
344276
|
+
return import_react_dom7.createPortal(/* @__PURE__ */ import_react172.default.createElement("div", {
|
|
344305
344277
|
className: clsx_default(LimitsTable_module_default.tipContainer, LimitsTable_module_default.bottomRight, visible && LimitsTable_module_default.visible),
|
|
344306
344278
|
style: { left: x9, top: y14 }
|
|
344307
|
-
}, /* @__PURE__ */
|
|
344279
|
+
}, /* @__PURE__ */ import_react172.default.createElement("div", {
|
|
344308
344280
|
className: clsx_default(LimitsTable_module_default.tip)
|
|
344309
|
-
}, /* @__PURE__ */
|
|
344281
|
+
}, /* @__PURE__ */ import_react172.default.createElement("span", {
|
|
344310
344282
|
className: clsx_default(LimitsTable_module_default.tipText, LimitsTable_module_default.center)
|
|
344311
344283
|
}, text5))), document.getElementById("tooltip"));
|
|
344312
344284
|
}
|
|
@@ -344320,11 +344292,11 @@ function LimitsModal() {
|
|
|
344320
344292
|
const handleBackButton = () => openModal2(USER_PLAN_MODAL_ID);
|
|
344321
344293
|
const { openModalConfirm } = useConfirmModalContext();
|
|
344322
344294
|
const onDowngrade = () => {
|
|
344323
|
-
openModalConfirm(/* @__PURE__ */
|
|
344295
|
+
openModalConfirm(/* @__PURE__ */ import_react173.default.createElement("h2", {
|
|
344324
344296
|
className: UserPlanModal_module_default.downgradeHeading
|
|
344325
344297
|
}, t10("userPlan.downgradeModal.heading", {
|
|
344326
344298
|
planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"]
|
|
344327
|
-
})), /* @__PURE__ */
|
|
344299
|
+
})), /* @__PURE__ */ import_react173.default.createElement("p", {
|
|
344328
344300
|
className: UserPlanModal_module_default.downgradeDesc
|
|
344329
344301
|
}, t10("userPlan.downgradeModal.description", {
|
|
344330
344302
|
planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"],
|
|
@@ -344344,14 +344316,14 @@ function LimitsModal() {
|
|
|
344344
344316
|
planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"]
|
|
344345
344317
|
}), t10("userPlan.downgradeModal.cancel"), UserPlanModal_module_default.downgradeConfirmation);
|
|
344346
344318
|
};
|
|
344347
|
-
return /* @__PURE__ */
|
|
344319
|
+
return /* @__PURE__ */ import_react173.default.createElement(UiModal, {
|
|
344348
344320
|
modalId: LIMITS_MODAL_ID,
|
|
344349
344321
|
closeByBgClick: false
|
|
344350
|
-
}, /* @__PURE__ */
|
|
344322
|
+
}, /* @__PURE__ */ import_react173.default.createElement("div", {
|
|
344351
344323
|
className: UserPlanModal_module_default.wrapper
|
|
344352
|
-
}, /* @__PURE__ */
|
|
344324
|
+
}, /* @__PURE__ */ import_react173.default.createElement("h1", {
|
|
344353
344325
|
className: UserPlanModal_module_default.heading
|
|
344354
|
-
}, t10("userPlan.currentPlanHeading")), /* @__PURE__ */
|
|
344326
|
+
}, t10("userPlan.currentPlanHeading")), /* @__PURE__ */ import_react173.default.createElement(UserPlanUsage, {
|
|
344355
344327
|
cancellationDate: account.billingInfo?.plan.endDate,
|
|
344356
344328
|
planName: conf.planNames[account.billingInfo?.plan.name ?? "basic"],
|
|
344357
344329
|
isFree: account.billingInfo?.plan.name === "basic",
|
|
@@ -344359,36 +344331,14 @@ function LimitsModal() {
|
|
|
344359
344331
|
hasHistory: account.billingHistory.filter((entry) => entry.planId !== "basic").length > 0,
|
|
344360
344332
|
onCancel: account.billingInfo?.plan.name !== "basic" ? onDowngrade : undefined,
|
|
344361
344333
|
status: account.billingInfo?.plan.status ?? "active"
|
|
344362
|
-
}), /* @__PURE__ */
|
|
344334
|
+
}), /* @__PURE__ */ import_react173.default.createElement("main", {
|
|
344363
344335
|
className: UserPlanModal_module_default.tables
|
|
344364
|
-
}, /* @__PURE__ */
|
|
344365
|
-
className: UserPlanModal_module_default.plansBtn,
|
|
344366
|
-
onClick: handleBackButton
|
|
344367
|
-
}, /* @__PURE__ */ import_react172.default.createElement(Icon, {
|
|
344368
|
-
iconName: "ArrowLeft1"
|
|
344369
|
-
}), t10("userPlan.backToPlans"))));
|
|
344370
|
-
}
|
|
344371
|
-
|
|
344372
|
-
// src/features/UserPlan/HistoryModal.tsx
|
|
344373
|
-
var import_react173 = __toESM(require_react(), 1);
|
|
344374
|
-
var HISTORY_MODAL_ID = Symbol("historyModal");
|
|
344375
|
-
function HistoryModal() {
|
|
344376
|
-
const { t: t10 } = useTranslation();
|
|
344377
|
-
const { openModal: openModal2 } = useUiModalContext();
|
|
344378
|
-
const handleBackButton = () => openModal2(LIMITS_MODAL_ID);
|
|
344379
|
-
return /* @__PURE__ */ import_react173.default.createElement(UiModal, {
|
|
344380
|
-
modalId: HISTORY_MODAL_ID,
|
|
344381
|
-
closeByBgClick: false
|
|
344382
|
-
}, /* @__PURE__ */ import_react173.default.createElement("div", {
|
|
344383
|
-
className: UserPlanModal_module_default.wrapper
|
|
344384
|
-
}, /* @__PURE__ */ import_react173.default.createElement("h1", {
|
|
344385
|
-
className: UserPlanModal_module_default.heading
|
|
344386
|
-
}, t10("userPlan.paymentHistoryHeading")), /* @__PURE__ */ import_react173.default.createElement(HistoryTable, null), /* @__PURE__ */ import_react173.default.createElement("button", {
|
|
344336
|
+
}, /* @__PURE__ */ import_react173.default.createElement(LimitsTable, null)), /* @__PURE__ */ import_react173.default.createElement("button", {
|
|
344387
344337
|
className: UserPlanModal_module_default.plansBtn,
|
|
344388
344338
|
onClick: handleBackButton
|
|
344389
344339
|
}, /* @__PURE__ */ import_react173.default.createElement(Icon, {
|
|
344390
344340
|
iconName: "ArrowLeft1"
|
|
344391
|
-
}), t10("userPlan.
|
|
344341
|
+
}), t10("userPlan.backToPlans"))));
|
|
344392
344342
|
}
|
|
344393
344343
|
|
|
344394
344344
|
// src/features/UserPlan/UserPlanUsage.tsx
|
|
@@ -344443,9 +344393,7 @@ function UserPlanUsage({
|
|
|
344443
344393
|
className: UserPlanUsage_module_default.planUsage
|
|
344444
344394
|
}, isFree ? /* @__PURE__ */ import_react174.default.createElement(import_react174.default.Fragment, null, t10("userPlan.currentPlanFree.part1"), /* @__PURE__ */ import_react174.default.createElement("span", {
|
|
344445
344395
|
className: clsx_default(UserPlanUsage_module_default.planHighlight, UserPlanUsage_module_default.basicPlan)
|
|
344446
|
-
}, t10("userPlan.plans.basic.name")), t10("userPlan.currentPlanFree.part2", {
|
|
344447
|
-
tokensBalance
|
|
344448
|
-
}), " ", !history2 && /* @__PURE__ */ import_react174.default.createElement("span", {
|
|
344396
|
+
}, t10("userPlan.plans.basic.name")), t10("userPlan.currentPlanFree.part2"), " ", !history2 && /* @__PURE__ */ import_react174.default.createElement("span", {
|
|
344449
344397
|
className: UserPlanUsage_module_default.limitsBtn,
|
|
344450
344398
|
onClick: handleOpenLimitsModal
|
|
344451
344399
|
}, " ", t10("userPlan.limits"), " ", /* @__PURE__ */ import_react174.default.createElement(Icon, {
|
|
@@ -344458,25 +344406,23 @@ function UserPlanUsage({
|
|
|
344458
344406
|
[UserPlanUsage_module_default.proPlan]: planName === "Pro"
|
|
344459
344407
|
})
|
|
344460
344408
|
}, planName), t10("userPlan.currentPlanPending.part2", {
|
|
344461
|
-
cancellationDate: formattedCancellationDate
|
|
344462
|
-
tokensBalance
|
|
344409
|
+
cancellationDate: formattedCancellationDate
|
|
344463
344410
|
})) : /* @__PURE__ */ import_react174.default.createElement(import_react174.default.Fragment, null, t10("userPlan.currentPlanActive.part1"), /* @__PURE__ */ import_react174.default.createElement("span", {
|
|
344464
344411
|
className: clsx_default(UserPlanUsage_module_default.planHighlight, {
|
|
344465
344412
|
[UserPlanUsage_module_default.plusPlan]: planName === "Plus",
|
|
344466
344413
|
[UserPlanUsage_module_default.proPlan]: planName === "Pro"
|
|
344467
344414
|
})
|
|
344468
344415
|
}, planName), t10("userPlan.currentPlanActive.part2", {
|
|
344469
|
-
cancellationDate: formattedPreviousCancellationDate
|
|
344470
|
-
tokensBalance
|
|
344416
|
+
cancellationDate: formattedPreviousCancellationDate
|
|
344471
344417
|
}))), " ", history2 ? hasHistory && /* @__PURE__ */ import_react174.default.createElement("span", {
|
|
344472
344418
|
onClick: handleOpenHistoryModal,
|
|
344473
344419
|
className: UserPlanUsage_module_default.limitsBtn
|
|
344474
344420
|
}, t10("userPlan.paymentHistoryHeading"), !isFree && ".") : !isFree && /* @__PURE__ */ import_react174.default.createElement("span", {
|
|
344475
344421
|
className: UserPlanUsage_module_default.limitsBtn,
|
|
344476
|
-
onClick:
|
|
344422
|
+
onClick: handleOpenHistoryModal
|
|
344477
344423
|
}, status2 === "active" ? t10("userPlan.nextPayment", {
|
|
344478
344424
|
paymentDate: formattedCancellationDate
|
|
344479
|
-
}) : t10("userPlan.
|
|
344425
|
+
}) : t10("userPlan.paymentHistoryHeading"), /* @__PURE__ */ import_react174.default.createElement(Icon, {
|
|
344480
344426
|
width: 24,
|
|
344481
344427
|
height: 24,
|
|
344482
344428
|
iconName: "ArrowRightSm"
|
|
@@ -344547,7 +344493,7 @@ function UserPlanModal() {
|
|
|
344547
344493
|
className: UserPlanModal_module_default.cardsScroll
|
|
344548
344494
|
}, /* @__PURE__ */ import_react175.default.createElement("div", {
|
|
344549
344495
|
className: UserPlanModal_module_default.cards
|
|
344550
|
-
}, /* @__PURE__ */ import_react175.default.createElement(BasicPlanCard, null), /* @__PURE__ */ import_react175.default.createElement(PlusPlanCard, null), /* @__PURE__ */ import_react175.default.createElement(PlusAIPlanCard, null), /* @__PURE__ */ import_react175.default.createElement(ProPlanCard, null))), /* @__PURE__ */ import_react175.default.createElement(UiButton, {
|
|
344496
|
+
}, /* @__PURE__ */ import_react175.default.createElement(BasicPlanCard, null), /* @__PURE__ */ import_react175.default.createElement(PlusPlanCard, null), window.enableAI && /* @__PURE__ */ import_react175.default.createElement(PlusAIPlanCard, null), /* @__PURE__ */ import_react175.default.createElement(ProPlanCard, null))), /* @__PURE__ */ import_react175.default.createElement(UiButton, {
|
|
344551
344497
|
variant: "ghostFilled",
|
|
344552
344498
|
className: UserPlanModal_module_default.back,
|
|
344553
344499
|
onClick: handleOpenProfileSettings,
|
|
@@ -426872,7 +426818,7 @@ function AppView() {
|
|
|
426872
426818
|
}), /* @__PURE__ */ import_react414.default.createElement(ContextMenu, null), /* @__PURE__ */ import_react414.default.createElement(ItemTooltip, null), /* @__PURE__ */ import_react414.default.createElement(ViewModeGuard, {
|
|
426873
426819
|
mode: "edit"
|
|
426874
426820
|
}, (interfaceType) => {
|
|
426875
|
-
if (interfaceType === "edit") {
|
|
426821
|
+
if (interfaceType === "edit" && window.enableAI) {
|
|
426876
426822
|
return /* @__PURE__ */ import_react414.default.createElement(AIInput, null);
|
|
426877
426823
|
}
|
|
426878
426824
|
return null;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
2
1
|
export declare function BasicPlanCard(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare function PlusAIPlanCard():
|
|
4
|
-
export declare function PlusPlanCard():
|
|
2
|
+
export declare function PlusAIPlanCard(): JSX.Element;
|
|
3
|
+
export declare function PlusPlanCard(): JSX.Element;
|
|
5
4
|
export declare function ProPlanCard(): import("react/jsx-runtime").JSX.Element;
|
package/dist/types/global.d.ts
CHANGED