@medusajs/dashboard 3.0.0-snapshot-20251215083939 → 3.0.0-snapshot-20251216103925
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/{api-key-management-detail-7T6OT2S2.mjs → api-key-management-detail-NRGL7HHX.mjs} +1 -1
- package/dist/app.css +0 -8
- package/dist/app.js +197 -198
- package/dist/app.mjs +2 -2
- package/dist/{campaign-detail-RT3BIGQA.mjs → campaign-detail-22Q6XWGL.mjs} +1 -1
- package/dist/{categories-metadata-QHA62GA3.mjs → categories-metadata-J7M3XWI7.mjs} +1 -1
- package/dist/{category-detail-TDB4GR5S.mjs → category-detail-RRKJPMEG.mjs} +2 -2
- package/dist/{category-products-KRSKJDWS.mjs → category-products-EFZRTCSF.mjs} +2 -2
- package/dist/{chunk-WJKYXU6P.mjs → chunk-DK7IWUMK.mjs} +1 -1
- package/dist/{chunk-7ESWXA2P.mjs → chunk-GRZSG4EP.mjs} +31 -9
- package/dist/{chunk-P5TFUYGS.mjs → chunk-O7WJSSQR.mjs} +104 -98
- package/dist/{chunk-7ZJK3NWL.mjs → chunk-OHY2N2Q4.mjs} +2 -2
- package/dist/{chunk-QCRM6BTM.mjs → chunk-PHLCT2HA.mjs} +1 -1
- package/dist/{chunk-6EFHOMPL.mjs → chunk-RL5EYTP6.mjs} +1 -1
- package/dist/{chunk-SKA4MWCK.mjs → chunk-YYOPBKME.mjs} +1 -1
- package/dist/{chunk-QBDKK5O4.mjs → chunk-ZMG5B4FG.mjs} +1 -1
- package/dist/{collection-add-products-4RJKJ7XJ.mjs → collection-add-products-XUMV6XR7.mjs} +2 -2
- package/dist/{collection-detail-IR23ZT2F.mjs → collection-detail-ONRBKJLN.mjs} +2 -2
- package/dist/{collection-list-J4OTLQQL.mjs → collection-list-XCC4SIPJ.mjs} +2 -2
- package/dist/{collection-metadata-6XWOWMBN.mjs → collection-metadata-QK7MI3D2.mjs} +1 -1
- package/dist/{customer-detail-ZHU4NN7E.mjs → customer-detail-FR6J37ZC.mjs} +1 -1
- package/dist/{customer-group-detail-NGJXBGGG.mjs → customer-group-detail-YSKSNETG.mjs} +1 -1
- package/dist/{customer-group-list-YLAMT3ZQ.mjs → customer-group-list-XBCD4FZH.mjs} +1 -1
- package/dist/{customers-add-customer-group-A2EPZW26.mjs → customers-add-customer-group-Q7FMR2Y5.mjs} +1 -1
- package/dist/{edit-rules-4UN6YMCZ.mjs → edit-rules-SMVRTCUP.mjs} +1 -1
- package/dist/en.json +3 -0
- package/dist/{inventory-create-UB3TTWPQ.mjs → inventory-create-3XONKYMZ.mjs} +1 -1
- package/dist/{inventory-detail-FIC7BFZ7.mjs → inventory-detail-6A6GOLB6.mjs} +1 -1
- package/dist/{inventory-metadata-WP73FZBX.mjs → inventory-metadata-FNEJ3RAT.mjs} +1 -1
- package/dist/{inventory-stock-RR4F6HGF.mjs → inventory-stock-S3ZYYCMZ.mjs} +1 -1
- package/dist/{location-detail-MLYCXNYR.mjs → location-detail-N3GUZSY7.mjs} +1 -1
- package/dist/{location-fulfillment-providers-CAAUD5VG.mjs → location-fulfillment-providers-WM6DT252.mjs} +2 -2
- package/dist/{location-service-zone-shipping-option-create-HHEGEBVB.mjs → location-service-zone-shipping-option-create-MJPH3WKX.mjs} +1 -1
- package/dist/{login-C7GZL37K.mjs → login-VNOLI5YG.mjs} +1 -1
- package/dist/{order-create-claim-2RQ4SFKM.mjs → order-create-claim-GUYTLVPB.mjs} +1 -1
- package/dist/{order-create-edit-JL7FWVNC.mjs → order-create-edit-ODIN6GRW.mjs} +1 -1
- package/dist/{order-create-exchange-7EPUMDFZ.mjs → order-create-exchange-ZT5RBRKL.mjs} +1 -1
- package/dist/{order-create-fulfillment-5PUUSLCV.mjs → order-create-fulfillment-OWUVTZXW.mjs} +1 -1
- package/dist/{order-create-refund-3NYCD4UR.mjs → order-create-refund-Q6HQY42R.mjs} +1 -1
- package/dist/{order-create-shipment-PWT3BPP6.mjs → order-create-shipment-WAGGEPRW.mjs} +1 -1
- package/dist/{order-detail-CN7VCKHF.mjs → order-detail-HFJONELJ.mjs} +1 -1
- package/dist/{order-edit-billing-address-PLAKMBVH.mjs → order-edit-billing-address-UM76J4KX.mjs} +1 -1
- package/dist/{order-edit-email-UAP26F5X.mjs → order-edit-email-CL3KNOCM.mjs} +1 -1
- package/dist/{order-edit-shipping-address-HAC7UQZS.mjs → order-edit-shipping-address-PIESTGVL.mjs} +1 -1
- package/dist/{order-export-ZI4QK6OQ.mjs → order-export-4MZUPMGD.mjs} +1 -1
- package/dist/{order-metadata-VQJWKPQC.mjs → order-metadata-FHBB7MTG.mjs} +1 -1
- package/dist/{order-receive-return-VTHRRRAB.mjs → order-receive-return-PRVKP6J2.mjs} +1 -1
- package/dist/{order-request-transfer-MCWICULW.mjs → order-request-transfer-XSAGRUMT.mjs} +1 -1
- package/dist/{price-list-create-KF4BTDBF.mjs → price-list-create-YHXRQSC3.mjs} +2 -2
- package/dist/{price-list-detail-UHJWBRBT.mjs → price-list-detail-FR3FQR3H.mjs} +2 -2
- package/dist/{price-list-prices-add-YHPWWETC.mjs → price-list-prices-add-GJVI47OY.mjs} +2 -2
- package/dist/{product-attributes-CCRPVPA3.mjs → product-attributes-QD3BWV5V.mjs} +2 -2
- package/dist/{product-create-TIJWWJEC.mjs → product-create-E2GZYQX4.mjs} +2 -2
- package/dist/{product-create-variant-EBVDKJA2.mjs → product-create-variant-KEBN5OR7.mjs} +1 -1
- package/dist/{product-detail-MFRDWD74.mjs → product-detail-QBGGKRZ2.mjs} +2 -2
- package/dist/{product-edit-VRUDQ3JT.mjs → product-edit-YP4KOQ4T.mjs} +2 -2
- package/dist/{product-export-DZKMXMUX.mjs → product-export-WUZYHPS5.mjs} +2 -2
- package/dist/{product-image-variants-edit-NN76FX7Y.mjs → product-image-variants-edit-Y363J5NG.mjs} +1 -1
- package/dist/{product-import-24JJ73RO.mjs → product-import-V3KQN4TV.mjs} +1 -1
- package/dist/{product-list-YMCK3X7X.mjs → product-list-DNTS7WUN.mjs} +2 -2
- package/dist/{product-metadata-KFBUYD7A.mjs → product-metadata-GL2MVPDI.mjs} +1 -1
- package/dist/{product-organization-BYRWH4KK.mjs → product-organization-H557PLLB.mjs} +2 -2
- package/dist/{product-stock-YEHDIJQI.mjs → product-stock-NYUFMEVG.mjs} +1 -1
- package/dist/{product-tag-create-BPU54Y3F.mjs → product-tag-create-PQMDDKWH.mjs} +1 -1
- package/dist/{product-tag-detail-SYQWG3AL.mjs → product-tag-detail-EHBB3WUB.mjs} +3 -3
- package/dist/{product-tag-edit-5XEMIUW6.mjs → product-tag-edit-K3BBQLJR.mjs} +1 -1
- package/dist/{product-tag-list-7SQNKPJQ.mjs → product-tag-list-LSW5FFVN.mjs} +3 -3
- package/dist/{product-tag-metadata-ZB56PD4G.mjs → product-tag-metadata-MJH5LH7E.mjs} +1 -1
- package/dist/{product-type-detail-RMYDLMPI.mjs → product-type-detail-3VB6AWUW.mjs} +2 -2
- package/dist/{product-type-metadata-UKF26V3N.mjs → product-type-metadata-CDJDFFGQ.mjs} +1 -1
- package/dist/{product-variant-detail-56MJKJZQ.mjs → product-variant-detail-43T33AQP.mjs} +1 -1
- package/dist/{product-variant-edit-PVZNSIIQ.mjs → product-variant-edit-DEZEY2H2.mjs} +1 -1
- package/dist/{product-variant-metadata-PNFRS7SQ.mjs → product-variant-metadata-VTZDNWUT.mjs} +1 -1
- package/dist/{promotion-create-RGLB6D7K.mjs → promotion-create-HWFNUQXG.mjs} +1 -1
- package/dist/{promotion-detail-MCCRIT2M.mjs → promotion-detail-VJB55PJK.mjs} +1 -1
- package/dist/{refund-reason-create-JYY2USGC.mjs → refund-reason-create-YHCDEHGQ.mjs} +1 -1
- package/dist/{refund-reason-edit-5NFS4TQ7.mjs → refund-reason-edit-CZ5QZ2SZ.mjs} +1 -1
- package/dist/{refund-reason-list-SDLJWAV3.mjs → refund-reason-list-URYYYEK6.mjs} +1 -1
- package/dist/{region-metadata-YBOCBHWP.mjs → region-metadata-H6XXUQ4S.mjs} +1 -1
- package/dist/{reservation-detail-7MXAMP3C.mjs → reservation-detail-LZAQL4XA.mjs} +1 -1
- package/dist/{reservation-metadata-6NZUP64D.mjs → reservation-metadata-5HZSDDOK.mjs} +1 -1
- package/dist/{sales-channel-add-products-BELGXDPF.mjs → sales-channel-add-products-VH5T3GDA.mjs} +2 -2
- package/dist/{sales-channel-detail-FAGKAQK2.mjs → sales-channel-detail-I2ZHVXMG.mjs} +2 -2
- package/dist/{sales-channel-list-E5QO23E5.mjs → sales-channel-list-3FV4S2NN.mjs} +1 -1
- package/dist/{sales-channel-metadata-AXAQY4MY.mjs → sales-channel-metadata-M364R4RJ.mjs} +1 -1
- package/dist/{shipping-option-type-create-YTBF47L7.mjs → shipping-option-type-create-C5WUWON7.mjs} +1 -1
- package/dist/{shipping-option-type-detail-XJFVNP2V.mjs → shipping-option-type-detail-PENS2K73.mjs} +2 -2
- package/dist/{shipping-option-type-edit-DFXO32AG.mjs → shipping-option-type-edit-CIU5EHRP.mjs} +1 -1
- package/dist/{shipping-option-type-list-UI7ZTCO7.mjs → shipping-option-type-list-ZMZMXFME.mjs} +2 -2
- package/dist/{shipping-profile-metadata-FGZRQKNN.mjs → shipping-profile-metadata-75G2NNMA.mjs} +1 -1
- package/dist/{store-add-locales-3MSEBHQG.mjs → store-add-locales-IZOZP5C6.mjs} +1 -1
- package/dist/{store-detail-MLYFQGBC.mjs → store-detail-4IBAEVSD.mjs} +1 -1
- package/dist/{store-metadata-ITA6AL6H.mjs → store-metadata-CYXTVJUE.mjs} +1 -1
- package/dist/{tax-region-create-AXM2SE4T.mjs → tax-region-create-DWGL4EUT.mjs} +1 -1
- package/dist/{tax-region-detail-WFXSRH3U.mjs → tax-region-detail-O2T7BI3V.mjs} +5 -5
- package/dist/{tax-region-edit-CZ4EDU4K.mjs → tax-region-edit-EEVEEU2Q.mjs} +1 -1
- package/dist/{tax-region-province-detail-4B5GWCY7.mjs → tax-region-province-detail-2W7RXAM5.mjs} +5 -5
- package/dist/{tax-region-tax-override-create-GDDSUSHK.mjs → tax-region-tax-override-create-7IM4ZVPH.mjs} +3 -3
- package/dist/{tax-region-tax-override-edit-QXCSGDVG.mjs → tax-region-tax-override-edit-3ZT5IZYR.mjs} +4 -4
- package/dist/{translation-list-S4477JFR.mjs → translation-list-IAKEB7MY.mjs} +74 -85
- package/dist/{translations-edit-S3V7SSDA.mjs → translations-edit-QKLE4L5B.mjs} +27 -26
- package/dist/{user-metadata-SILGZHTG.mjs → user-metadata-2WPJOEJA.mjs} +1 -1
- package/dist/{workflow-execution-detail-GJTST4GO.mjs → workflow-execution-detail-H2AKEZJX.mjs} +1 -1
- package/package.json +9 -9
- package/src/hooks/api/translations.tsx +61 -31
- package/src/i18n/translations/$schema.json +12 -3
- package/src/i18n/translations/en.json +3 -0
- package/src/i18n/translations/es.json +3 -0
- package/src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx +8 -10
- package/src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx +16 -10
- package/src/routes/translations/translation-list/translation-list.tsx +71 -68
- package/src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx +7 -2
- package/src/routes/translations/translations-edit/translations-edit.tsx +27 -12
- package/src/routes/translations/translations-edit/utils/index.ts +0 -1
- package/src/routes/translations/translations-edit/utils/reference-label-map.ts +0 -10
package/dist/app.js
CHANGED
|
@@ -11887,6 +11887,9 @@ var init_en = __esm({
|
|
|
11887
11887
|
},
|
|
11888
11888
|
title: "Translation domains",
|
|
11889
11889
|
subtitle: "Manage translations of your data in Medusa",
|
|
11890
|
+
list: {
|
|
11891
|
+
metrics: "{{translated}} of {{total}} fields translated"
|
|
11892
|
+
},
|
|
11890
11893
|
bulk: {
|
|
11891
11894
|
header: "Translations Bulk Editor",
|
|
11892
11895
|
mainColumn: "Locale"
|
|
@@ -15098,6 +15101,9 @@ var init_es = __esm({
|
|
|
15098
15101
|
},
|
|
15099
15102
|
translations: {
|
|
15100
15103
|
domain: "Traducciones",
|
|
15104
|
+
list: {
|
|
15105
|
+
metrics: "{{translated}} de {{total}} textos traducidos"
|
|
15106
|
+
},
|
|
15101
15107
|
actions: {
|
|
15102
15108
|
manage: "Gestionar traducciones",
|
|
15103
15109
|
manageLocales: "Gestionar idiomas"
|
|
@@ -93634,7 +93640,7 @@ var init_tax_rates = __esm({
|
|
|
93634
93640
|
});
|
|
93635
93641
|
|
|
93636
93642
|
// src/hooks/api/translations.tsx
|
|
93637
|
-
var import_react_query43, TRANSLATIONS_QUERY_KEY, translationsQueryKeys, useReferenceTranslations, useBatchTranslations;
|
|
93643
|
+
var import_react_query43, TRANSLATIONS_QUERY_KEY, translationsQueryKeys, TRANSLATION_SETTINGS_QUERY_KEY, translationSettingsQueryKeys, TRANSLATION_STATISTICS_QUERY_KEY, translationStatisticsQueryKeys, useReferenceTranslations, useBatchTranslations, useTranslationSettings, useTranslationStatistics;
|
|
93638
93644
|
var init_translations2 = __esm({
|
|
93639
93645
|
"src/hooks/api/translations.tsx"() {
|
|
93640
93646
|
"use strict";
|
|
@@ -93650,12 +93656,19 @@ var init_translations2 = __esm({
|
|
|
93650
93656
|
init_product_types();
|
|
93651
93657
|
TRANSLATIONS_QUERY_KEY = "translations";
|
|
93652
93658
|
translationsQueryKeys = queryKeysFactory(TRANSLATIONS_QUERY_KEY);
|
|
93653
|
-
|
|
93659
|
+
TRANSLATION_SETTINGS_QUERY_KEY = "translation_settings";
|
|
93660
|
+
translationSettingsQueryKeys = queryKeysFactory(
|
|
93661
|
+
TRANSLATION_SETTINGS_QUERY_KEY
|
|
93662
|
+
);
|
|
93663
|
+
TRANSLATION_STATISTICS_QUERY_KEY = "translation_statistics";
|
|
93664
|
+
translationStatisticsQueryKeys = queryKeysFactory(
|
|
93665
|
+
TRANSLATION_STATISTICS_QUERY_KEY
|
|
93666
|
+
);
|
|
93667
|
+
useReferenceTranslations = (reference, translatableFields, referenceId, options) => {
|
|
93654
93668
|
const referenceHookMap = /* @__PURE__ */ new Map([
|
|
93655
93669
|
[
|
|
93656
93670
|
"product",
|
|
93657
93671
|
() => {
|
|
93658
|
-
const translatableFields = ["title", "description"];
|
|
93659
93672
|
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
93660
93673
|
const { data: data2, ...rest2 } = useInfiniteProducts(
|
|
93661
93674
|
{ fields, id: referenceId ?? [] },
|
|
@@ -93667,7 +93680,6 @@ var init_translations2 = __esm({
|
|
|
93667
93680
|
data: {
|
|
93668
93681
|
translations: products?.flatMap((product) => product.translations ?? []) ?? [],
|
|
93669
93682
|
references: products ?? [],
|
|
93670
|
-
translatableFields,
|
|
93671
93683
|
count: data2?.pages[0]?.count ?? 0
|
|
93672
93684
|
}
|
|
93673
93685
|
};
|
|
@@ -93676,7 +93688,6 @@ var init_translations2 = __esm({
|
|
|
93676
93688
|
[
|
|
93677
93689
|
"product_variant",
|
|
93678
93690
|
() => {
|
|
93679
|
-
const translatableFields = ["title"];
|
|
93680
93691
|
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
93681
93692
|
const { data: data2, ...rest2 } = useInfiniteVariants(
|
|
93682
93693
|
{ id: referenceId ?? [], fields },
|
|
@@ -93697,7 +93708,6 @@ var init_translations2 = __esm({
|
|
|
93697
93708
|
[
|
|
93698
93709
|
"product_category",
|
|
93699
93710
|
() => {
|
|
93700
|
-
const translatableFields = ["name", "description"];
|
|
93701
93711
|
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
93702
93712
|
const { data: data2, ...rest2 } = useInfiniteCategories(
|
|
93703
93713
|
{ id: referenceId ?? [], fields },
|
|
@@ -93718,7 +93728,6 @@ var init_translations2 = __esm({
|
|
|
93718
93728
|
[
|
|
93719
93729
|
"product_collection",
|
|
93720
93730
|
() => {
|
|
93721
|
-
const translatableFields = ["title"];
|
|
93722
93731
|
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
93723
93732
|
const { data: data2, ...rest2 } = useInfiniteCollections(
|
|
93724
93733
|
{ id: referenceId ?? [], fields },
|
|
@@ -93741,7 +93750,6 @@ var init_translations2 = __esm({
|
|
|
93741
93750
|
[
|
|
93742
93751
|
"product_type",
|
|
93743
93752
|
() => {
|
|
93744
|
-
const translatableFields = ["value"];
|
|
93745
93753
|
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
93746
93754
|
const { data: data2, ...rest2 } = useInfiniteProductTypes(
|
|
93747
93755
|
{ id: referenceId ?? [], fields },
|
|
@@ -93762,7 +93770,6 @@ var init_translations2 = __esm({
|
|
|
93762
93770
|
[
|
|
93763
93771
|
"product_tag",
|
|
93764
93772
|
() => {
|
|
93765
|
-
const translatableFields = ["value"];
|
|
93766
93773
|
const fields = translatableFields.concat(["translations.*"]).join(",");
|
|
93767
93774
|
const { data: data2, ...rest2 } = useInfiniteProductTags(
|
|
93768
93775
|
{ id: referenceId ?? [], fields },
|
|
@@ -93804,11 +93811,30 @@ var init_translations2 = __esm({
|
|
|
93804
93811
|
queryClient.invalidateQueries({
|
|
93805
93812
|
queryKey: referenceInvalidationKeysMap.get(reference)
|
|
93806
93813
|
});
|
|
93814
|
+
queryClient.invalidateQueries({
|
|
93815
|
+
queryKey: translationStatisticsQueryKeys.lists()
|
|
93816
|
+
});
|
|
93807
93817
|
options?.onSuccess?.(data, variables, context);
|
|
93808
93818
|
},
|
|
93809
93819
|
...options
|
|
93810
93820
|
});
|
|
93811
93821
|
};
|
|
93822
|
+
useTranslationSettings = (query, options) => {
|
|
93823
|
+
const { data, ...rest } = (0, import_react_query43.useQuery)({
|
|
93824
|
+
queryKey: translationSettingsQueryKeys.list(query),
|
|
93825
|
+
queryFn: () => sdk.admin.translation.settings(query),
|
|
93826
|
+
...options
|
|
93827
|
+
});
|
|
93828
|
+
return { ...data, ...rest };
|
|
93829
|
+
};
|
|
93830
|
+
useTranslationStatistics = (query, options) => {
|
|
93831
|
+
const { data, ...rest } = (0, import_react_query43.useQuery)({
|
|
93832
|
+
queryKey: translationStatisticsQueryKeys.list(query),
|
|
93833
|
+
queryFn: () => sdk.admin.translation.statistics(query),
|
|
93834
|
+
...options
|
|
93835
|
+
});
|
|
93836
|
+
return { ...data, ...rest };
|
|
93837
|
+
};
|
|
93812
93838
|
}
|
|
93813
93839
|
});
|
|
93814
93840
|
|
|
@@ -187274,30 +187300,29 @@ var init_active_locales_section = __esm({
|
|
|
187274
187300
|
});
|
|
187275
187301
|
|
|
187276
187302
|
// src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx
|
|
187277
|
-
var import_ui450, import_react_router_dom246, import_jsx_runtime686, TranslationListSection;
|
|
187303
|
+
var import_ui450, import_react_router_dom246, import_react_i18next484, import_jsx_runtime686, TranslationListSection;
|
|
187278
187304
|
var init_translation_list_section = __esm({
|
|
187279
187305
|
"src/routes/translations/translation-list/components/translation-list-section/translation-list-section.tsx"() {
|
|
187280
187306
|
"use strict";
|
|
187281
187307
|
import_ui450 = require("@medusajs/ui");
|
|
187282
187308
|
import_react_router_dom246 = require("react-router-dom");
|
|
187309
|
+
import_react_i18next484 = require("react-i18next");
|
|
187283
187310
|
import_jsx_runtime686 = require("react/jsx-runtime");
|
|
187284
187311
|
TranslationListSection = ({
|
|
187285
187312
|
entities,
|
|
187286
187313
|
hasLocales = false
|
|
187287
187314
|
}) => {
|
|
187315
|
+
const { t: t5 } = (0, import_react_i18next484.useTranslation)();
|
|
187288
187316
|
return /* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Container, { className: "divide-y p-0", children: entities.map((entity) => /* @__PURE__ */ (0, import_jsx_runtime686.jsxs)(
|
|
187289
187317
|
"div",
|
|
187290
187318
|
{
|
|
187291
187319
|
className: "grid grid-cols-[250px_1fr_auto] items-center gap-x-4 px-6 py-4",
|
|
187292
187320
|
children: [
|
|
187293
187321
|
/* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", weight: "plus", children: entity.label }),
|
|
187294
|
-
/* @__PURE__ */ (0, import_jsx_runtime686.
|
|
187295
|
-
(entity.translatedCount ?? 0).toLocaleString(),
|
|
187296
|
-
|
|
187297
|
-
|
|
187298
|
-
(entity.totalCount ?? 0).toLocaleString(),
|
|
187299
|
-
" fields translated"
|
|
187300
|
-
] }),
|
|
187322
|
+
/* @__PURE__ */ (0, import_jsx_runtime686.jsx)(import_ui450.Text, { size: "small", className: "text-ui-fg-subtle", children: t5("translations.list.metrics", {
|
|
187323
|
+
translated: (entity.translatedCount ?? 0).toLocaleString(),
|
|
187324
|
+
total: (entity.totalCount ?? 0).toLocaleString()
|
|
187325
|
+
}) }),
|
|
187301
187326
|
/* @__PURE__ */ (0, import_jsx_runtime686.jsx)(
|
|
187302
187327
|
import_react_router_dom246.Link,
|
|
187303
187328
|
{
|
|
@@ -187314,24 +187339,30 @@ var init_translation_list_section = __esm({
|
|
|
187314
187339
|
});
|
|
187315
187340
|
|
|
187316
187341
|
// src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx
|
|
187317
|
-
var import_ui451,
|
|
187342
|
+
var import_ui451, import_react_i18next485, import_jsx_runtime687, TranslationsCompletionSection;
|
|
187318
187343
|
var init_translations_completion_section = __esm({
|
|
187319
187344
|
"src/routes/translations/translation-list/components/translations-completion-section/translations-completion-section.tsx"() {
|
|
187320
187345
|
"use strict";
|
|
187321
187346
|
import_ui451 = require("@medusajs/ui");
|
|
187322
|
-
|
|
187347
|
+
import_react_i18next485 = require("react-i18next");
|
|
187323
187348
|
import_jsx_runtime687 = require("react/jsx-runtime");
|
|
187324
187349
|
TranslationsCompletionSection = ({
|
|
187325
|
-
|
|
187326
|
-
totalCount = 0
|
|
187350
|
+
statistics
|
|
187327
187351
|
}) => {
|
|
187328
|
-
const { t: t5 } = (0,
|
|
187352
|
+
const { t: t5 } = (0, import_react_i18next485.useTranslation)();
|
|
187353
|
+
const { translatedCount, totalCount } = Object.values(statistics).reduce(
|
|
187354
|
+
(acc, curr) => ({
|
|
187355
|
+
translatedCount: acc.translatedCount + curr.translated,
|
|
187356
|
+
totalCount: acc.totalCount + curr.expected
|
|
187357
|
+
}),
|
|
187358
|
+
{ totalCount: 0, translatedCount: 0 }
|
|
187359
|
+
);
|
|
187329
187360
|
const percentage = totalCount > 0 ? translatedCount / totalCount * 100 : 0;
|
|
187330
187361
|
const remaining = Math.max(0, totalCount - translatedCount);
|
|
187331
187362
|
return /* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Container, { className: "flex flex-col gap-y-3 px-6 py-4", children: [
|
|
187332
187363
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
187333
187364
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)(import_ui451.Heading, { children: t5("translations.completion.heading") }),
|
|
187334
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187365
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
187335
187366
|
translatedCount.toLocaleString(),
|
|
187336
187367
|
" ",
|
|
187337
187368
|
t5("general.of"),
|
|
@@ -187339,11 +187370,11 @@ var init_translations_completion_section = __esm({
|
|
|
187339
187370
|
totalCount.toLocaleString()
|
|
187340
187371
|
] })
|
|
187341
187372
|
] }),
|
|
187342
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)("div", { className: "flex h-
|
|
187373
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)("div", { className: "flex h-3 w-full overflow-hidden", children: percentage > 0 ? /* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_jsx_runtime687.Fragment, { children: [
|
|
187343
187374
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)(
|
|
187344
187375
|
"div",
|
|
187345
187376
|
{
|
|
187346
|
-
className: "mr-0.5 h-full rounded-
|
|
187377
|
+
className: "mr-0.5 h-full rounded-sm transition-all",
|
|
187347
187378
|
style: {
|
|
187348
187379
|
width: `${percentage}%`,
|
|
187349
187380
|
backgroundColor: "var(--bg-interactive)"
|
|
@@ -187353,7 +187384,7 @@ var init_translations_completion_section = __esm({
|
|
|
187353
187384
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsx)(
|
|
187354
187385
|
"div",
|
|
187355
187386
|
{
|
|
187356
|
-
className: "h-full flex-1 rounded-
|
|
187387
|
+
className: "h-full flex-1 rounded-sm",
|
|
187357
187388
|
style: {
|
|
187358
187389
|
backgroundColor: "var(--bg-interactive)",
|
|
187359
187390
|
opacity: 0.3
|
|
@@ -187371,11 +187402,11 @@ var init_translations_completion_section = __esm({
|
|
|
187371
187402
|
}
|
|
187372
187403
|
) }),
|
|
187373
187404
|
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)("div", { className: "flex items-center justify-between", children: [
|
|
187374
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187405
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
187375
187406
|
percentage.toFixed(1),
|
|
187376
187407
|
"%"
|
|
187377
187408
|
] }),
|
|
187378
|
-
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", className: "text-ui-fg-subtle", children: [
|
|
187409
|
+
/* @__PURE__ */ (0, import_jsx_runtime687.jsxs)(import_ui451.Text, { size: "small", weight: "plus", className: "text-ui-fg-subtle", children: [
|
|
187379
187410
|
remaining.toLocaleString(),
|
|
187380
187411
|
" ",
|
|
187381
187412
|
t5("general.remaining").toLowerCase()
|
|
@@ -187387,89 +187418,70 @@ var init_translations_completion_section = __esm({
|
|
|
187387
187418
|
});
|
|
187388
187419
|
|
|
187389
187420
|
// src/routes/translations/translation-list/translation-list.tsx
|
|
187390
|
-
var import_ui452,
|
|
187421
|
+
var import_ui452, import_react_i18next486, import_react304, import_jsx_runtime688, TranslationList;
|
|
187391
187422
|
var init_translation_list = __esm({
|
|
187392
187423
|
"src/routes/translations/translation-list/translation-list.tsx"() {
|
|
187393
187424
|
"use strict";
|
|
187394
187425
|
import_ui452 = require("@medusajs/ui");
|
|
187395
187426
|
init_pages();
|
|
187396
|
-
|
|
187397
|
-
import_icons175 = require("@medusajs/icons");
|
|
187427
|
+
import_react_i18next486 = require("react-i18next");
|
|
187398
187428
|
init_api();
|
|
187399
187429
|
init_active_locales_section();
|
|
187400
187430
|
init_translation_list_section();
|
|
187401
187431
|
init_translations_completion_section();
|
|
187402
187432
|
init_skeleton2();
|
|
187433
|
+
import_react304 = require("react");
|
|
187403
187434
|
import_jsx_runtime688 = require("react/jsx-runtime");
|
|
187404
|
-
TRANSLATABLE_ENTITIES = [
|
|
187405
|
-
{
|
|
187406
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187407
|
-
label: "Product",
|
|
187408
|
-
reference: "product",
|
|
187409
|
-
translatedCount: 4,
|
|
187410
|
-
totalCount: 96
|
|
187411
|
-
},
|
|
187412
|
-
{
|
|
187413
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187414
|
-
label: "Product Variants",
|
|
187415
|
-
reference: "product_variant",
|
|
187416
|
-
translatedCount: 4,
|
|
187417
|
-
totalCount: 2e5
|
|
187418
|
-
},
|
|
187419
|
-
{
|
|
187420
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187421
|
-
label: "Product Categories",
|
|
187422
|
-
reference: "product_category",
|
|
187423
|
-
translatedCount: 96,
|
|
187424
|
-
totalCount: 96
|
|
187425
|
-
},
|
|
187426
|
-
{
|
|
187427
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187428
|
-
label: "Product Collections",
|
|
187429
|
-
reference: "product_collection",
|
|
187430
|
-
translatedCount: 4,
|
|
187431
|
-
totalCount: 96
|
|
187432
|
-
},
|
|
187433
|
-
{
|
|
187434
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187435
|
-
label: "Product Types",
|
|
187436
|
-
reference: "product_type",
|
|
187437
|
-
translatedCount: 4,
|
|
187438
|
-
totalCount: 96
|
|
187439
|
-
},
|
|
187440
|
-
{
|
|
187441
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187442
|
-
label: "Product Tags",
|
|
187443
|
-
reference: "product_tag",
|
|
187444
|
-
translatedCount: 96,
|
|
187445
|
-
totalCount: 96
|
|
187446
|
-
},
|
|
187447
|
-
{
|
|
187448
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187449
|
-
label: "Product Options",
|
|
187450
|
-
reference: "product_option",
|
|
187451
|
-
translatedCount: 96,
|
|
187452
|
-
totalCount: 96
|
|
187453
|
-
},
|
|
187454
|
-
{
|
|
187455
|
-
icon: /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(import_icons175.Buildings, {}),
|
|
187456
|
-
label: "Product Option Values",
|
|
187457
|
-
reference: "product_option_value",
|
|
187458
|
-
translatedCount: 96,
|
|
187459
|
-
totalCount: 96
|
|
187460
|
-
}
|
|
187461
|
-
];
|
|
187462
187435
|
TranslationList = () => {
|
|
187463
|
-
const { t: t5 } = (0,
|
|
187436
|
+
const { t: t5 } = (0, import_react_i18next486.useTranslation)();
|
|
187464
187437
|
const { store, isPending, isError, error } = useStore();
|
|
187465
|
-
|
|
187466
|
-
|
|
187438
|
+
const {
|
|
187439
|
+
translatable_fields,
|
|
187440
|
+
isPending: isTranslationSettingsPending,
|
|
187441
|
+
isError: isTranslationSettingsError,
|
|
187442
|
+
error: translationSettingsError
|
|
187443
|
+
} = useTranslationSettings();
|
|
187444
|
+
const {
|
|
187445
|
+
statistics,
|
|
187446
|
+
isPending: isTranslationStatisticsPending,
|
|
187447
|
+
isError: isTranslationStatisticsError,
|
|
187448
|
+
error: translationStatisticsError
|
|
187449
|
+
} = useTranslationStatistics(
|
|
187450
|
+
{
|
|
187451
|
+
locales: store?.supported_locales?.map(
|
|
187452
|
+
(suportedLocale) => suportedLocale.locale_code
|
|
187453
|
+
) ?? [],
|
|
187454
|
+
entity_types: Object.keys(translatable_fields ?? {})
|
|
187455
|
+
},
|
|
187456
|
+
{
|
|
187457
|
+
enabled: !!translatable_fields && !!store
|
|
187458
|
+
}
|
|
187459
|
+
);
|
|
187460
|
+
if (isError || isTranslationSettingsError || isTranslationStatisticsError) {
|
|
187461
|
+
throw error || translationSettingsError || translationStatisticsError;
|
|
187467
187462
|
}
|
|
187468
|
-
const
|
|
187463
|
+
const hasLocales = (store?.supported_locales ?? []).length > 0;
|
|
187464
|
+
const translatableEntities = (0, import_react304.useMemo)(() => {
|
|
187465
|
+
if (!translatable_fields || !statistics) {
|
|
187466
|
+
return [];
|
|
187467
|
+
}
|
|
187468
|
+
return Object.entries(translatable_fields).filter(
|
|
187469
|
+
([entity]) => !["product_option", "product_option_value"].includes(entity)
|
|
187470
|
+
).map(([entity, fields]) => {
|
|
187471
|
+
const entityStatistics = statistics[entity];
|
|
187472
|
+
return {
|
|
187473
|
+
label: entity.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" "),
|
|
187474
|
+
reference: entity,
|
|
187475
|
+
translatableFields: fields,
|
|
187476
|
+
translatedCount: entityStatistics.translated,
|
|
187477
|
+
totalCount: entityStatistics.expected
|
|
187478
|
+
};
|
|
187479
|
+
});
|
|
187480
|
+
}, [translatable_fields, statistics]);
|
|
187481
|
+
const isReady = !!store && !isPending && !isTranslationSettingsPending && !isTranslationStatisticsPending && !!translatable_fields && !!statistics;
|
|
187469
187482
|
if (!isReady) {
|
|
187470
187483
|
return /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(TwoColumnPageSkeleton, { sidebarSections: 2 });
|
|
187471
187484
|
}
|
|
187472
|
-
const hasLocales = (store?.supported_locales ?? []).length > 0;
|
|
187473
187485
|
return /* @__PURE__ */ (0, import_jsx_runtime688.jsxs)(
|
|
187474
187486
|
TwoColumnPage,
|
|
187475
187487
|
{
|
|
@@ -187491,7 +187503,7 @@ var init_translation_list = __esm({
|
|
|
187491
187503
|
/* @__PURE__ */ (0, import_jsx_runtime688.jsx)(
|
|
187492
187504
|
TranslationListSection,
|
|
187493
187505
|
{
|
|
187494
|
-
entities:
|
|
187506
|
+
entities: translatableEntities,
|
|
187495
187507
|
hasLocales
|
|
187496
187508
|
}
|
|
187497
187509
|
)
|
|
@@ -187505,7 +187517,7 @@ var init_translation_list = __esm({
|
|
|
187505
187517
|
) ?? []
|
|
187506
187518
|
}
|
|
187507
187519
|
),
|
|
187508
|
-
/* @__PURE__ */ (0, import_jsx_runtime688.jsx)(TranslationsCompletionSection, {})
|
|
187520
|
+
statistics && /* @__PURE__ */ (0, import_jsx_runtime688.jsx)(TranslationsCompletionSection, { statistics })
|
|
187509
187521
|
] })
|
|
187510
187522
|
]
|
|
187511
187523
|
}
|
|
@@ -187526,32 +187538,6 @@ var init_translation_list2 = __esm({
|
|
|
187526
187538
|
}
|
|
187527
187539
|
});
|
|
187528
187540
|
|
|
187529
|
-
// src/routes/translations/translations-edit/utils/reference-label-map.ts
|
|
187530
|
-
var REFERENCE_LABEL_MAP;
|
|
187531
|
-
var init_reference_label_map = __esm({
|
|
187532
|
-
"src/routes/translations/translations-edit/utils/reference-label-map.ts"() {
|
|
187533
|
-
"use strict";
|
|
187534
|
-
REFERENCE_LABEL_MAP = {
|
|
187535
|
-
product: "Products",
|
|
187536
|
-
product_variant: "Product Variants",
|
|
187537
|
-
product_category: "Product Categories",
|
|
187538
|
-
product_collection: "Product Collections",
|
|
187539
|
-
product_type: "Product Types",
|
|
187540
|
-
product_tag: "Product Tags",
|
|
187541
|
-
product_option: "Product Options",
|
|
187542
|
-
product_option_value: "Product Option Values"
|
|
187543
|
-
};
|
|
187544
|
-
}
|
|
187545
|
-
});
|
|
187546
|
-
|
|
187547
|
-
// src/routes/translations/translations-edit/utils/index.ts
|
|
187548
|
-
var init_utils14 = __esm({
|
|
187549
|
-
"src/routes/translations/translations-edit/utils/index.ts"() {
|
|
187550
|
-
"use strict";
|
|
187551
|
-
init_reference_label_map();
|
|
187552
|
-
}
|
|
187553
|
-
});
|
|
187554
|
-
|
|
187555
187541
|
// src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx
|
|
187556
187542
|
function isEntityRow(row) {
|
|
187557
187543
|
return row._type === "entity";
|
|
@@ -187640,8 +187626,8 @@ function useTranslationsGridColumns({
|
|
|
187640
187626
|
availableLocales,
|
|
187641
187627
|
modalFields = []
|
|
187642
187628
|
}) {
|
|
187643
|
-
const { t: t5 } = (0,
|
|
187644
|
-
const columns = (0,
|
|
187629
|
+
const { t: t5 } = (0, import_react_i18next487.useTranslation)();
|
|
187630
|
+
const columns = (0, import_react305.useMemo)(() => {
|
|
187645
187631
|
return [
|
|
187646
187632
|
columnHelper93.column({
|
|
187647
187633
|
id: "field",
|
|
@@ -187661,7 +187647,9 @@ function useTranslationsGridColumns({
|
|
|
187661
187647
|
columnHelper93.column({
|
|
187662
187648
|
id: "original",
|
|
187663
187649
|
name: "original",
|
|
187650
|
+
size: 300,
|
|
187664
187651
|
header: t5("general.original"),
|
|
187652
|
+
disableHiding: true,
|
|
187665
187653
|
cell: (context) => {
|
|
187666
187654
|
const row = context.row.original;
|
|
187667
187655
|
if (isEntityRow(row)) {
|
|
@@ -187680,6 +187668,7 @@ function useTranslationsGridColumns({
|
|
|
187680
187668
|
return columnHelper93.column({
|
|
187681
187669
|
id: locale.locale_code,
|
|
187682
187670
|
name: locale.locale.name,
|
|
187671
|
+
size: 300,
|
|
187683
187672
|
header: () => locale.locale.name,
|
|
187684
187673
|
cell: (context) => {
|
|
187685
187674
|
const row = context.row.original;
|
|
@@ -187717,22 +187706,21 @@ function useTranslationsGridColumns({
|
|
|
187717
187706
|
}, [t5, translatableFields, availableLocales, modalFields]);
|
|
187718
187707
|
return columns;
|
|
187719
187708
|
}
|
|
187720
|
-
var import_zod166, import_ui453,
|
|
187709
|
+
var import_zod166, import_ui453, import_react305, import_react_hook_form144, import_react_i18next487, import_zod167, import_jsx_runtime689, LocaleTranslationSchema, EntityTranslationsSchema, TranslationsFormSchema, columnHelper93, TranslationsEditForm;
|
|
187721
187710
|
var init_translations_edit_form = __esm({
|
|
187722
187711
|
"src/routes/translations/translations-edit/components/translations-edit-form/translations-edit-form.tsx"() {
|
|
187723
187712
|
"use strict";
|
|
187724
187713
|
import_zod166 = require("@hookform/resolvers/zod");
|
|
187725
187714
|
import_ui453 = require("@medusajs/ui");
|
|
187726
|
-
|
|
187715
|
+
import_react305 = require("react");
|
|
187727
187716
|
import_react_hook_form144 = require("react-hook-form");
|
|
187728
|
-
|
|
187717
|
+
import_react_i18next487 = require("react-i18next");
|
|
187729
187718
|
import_zod167 = require("zod");
|
|
187730
187719
|
init_data_grid2();
|
|
187731
187720
|
init_modals();
|
|
187732
187721
|
init_keybound_form2();
|
|
187733
187722
|
init_translations2();
|
|
187734
187723
|
init_use_document_direction();
|
|
187735
|
-
init_utils14();
|
|
187736
187724
|
import_jsx_runtime689 = require("react/jsx-runtime");
|
|
187737
187725
|
LocaleTranslationSchema = import_zod167.z.object({
|
|
187738
187726
|
id: import_zod167.z.string().nullish(),
|
|
@@ -187758,15 +187746,15 @@ var init_translations_edit_form = __esm({
|
|
|
187758
187746
|
isFetchingNextPage,
|
|
187759
187747
|
referenceCount
|
|
187760
187748
|
}) => {
|
|
187761
|
-
const { t: t5 } = (0,
|
|
187749
|
+
const { t: t5 } = (0, import_react_i18next487.useTranslation)();
|
|
187762
187750
|
const { handleSuccess, setCloseOnEscape } = useRouteModal();
|
|
187763
187751
|
const direction = useDocumentDirection();
|
|
187764
|
-
const entities = (0,
|
|
187765
|
-
const totalCount = (0,
|
|
187752
|
+
const entities = (0, import_react305.useMemo)(() => references, [references]);
|
|
187753
|
+
const totalCount = (0, import_react305.useMemo)(
|
|
187766
187754
|
() => referenceCount * (translatableFields.length + 1),
|
|
187767
187755
|
[referenceCount, translatableFields]
|
|
187768
187756
|
);
|
|
187769
|
-
const initialState = (0,
|
|
187757
|
+
const initialState = (0, import_react305.useRef)(
|
|
187770
187758
|
initTranslationsFormState(
|
|
187771
187759
|
translations,
|
|
187772
187760
|
entities,
|
|
@@ -187778,7 +187766,7 @@ var init_translations_edit_form = __esm({
|
|
|
187778
187766
|
resolver: (0, import_zod166.zodResolver)(TranslationsFormSchema),
|
|
187779
187767
|
defaultValues: initialState.current
|
|
187780
187768
|
});
|
|
187781
|
-
const rows = (0,
|
|
187769
|
+
const rows = (0, import_react305.useMemo)(
|
|
187782
187770
|
() => buildTranslationRows(entities, translatableFields),
|
|
187783
187771
|
[entities, translatableFields]
|
|
187784
187772
|
);
|
|
@@ -187847,7 +187835,7 @@ var init_translations_edit_form = __esm({
|
|
|
187847
187835
|
defaultValue: entityType,
|
|
187848
187836
|
className: "flex h-full flex-col overflow-hidden",
|
|
187849
187837
|
children: [
|
|
187850
|
-
/* @__PURE__ */ (0, import_jsx_runtime689.jsx)(RouteFocusModal.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)("div", { className: "-my-2 w-full border-l", children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)(import_ui453.ProgressTabs.List, { className: "justify-start-start flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)(import_ui453.ProgressTabs.Trigger, { value: entityType, children:
|
|
187838
|
+
/* @__PURE__ */ (0, import_jsx_runtime689.jsx)(RouteFocusModal.Header, { children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)("div", { className: "-my-2 w-full border-l", children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)(import_ui453.ProgressTabs.List, { className: "justify-start-start flex w-full items-center", children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)(import_ui453.ProgressTabs.Trigger, { value: entityType, children: entityType.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ") }) }) }) }),
|
|
187851
187839
|
/* @__PURE__ */ (0, import_jsx_runtime689.jsx)(RouteFocusModal.Body, { className: "size-full overflow-hidden", children: /* @__PURE__ */ (0, import_jsx_runtime689.jsx)(
|
|
187852
187840
|
import_ui453.ProgressTabs.Content,
|
|
187853
187841
|
{
|
|
@@ -187893,14 +187881,14 @@ var init_translations_edit_form2 = __esm({
|
|
|
187893
187881
|
});
|
|
187894
187882
|
|
|
187895
187883
|
// src/routes/translations/translations-edit/translations-edit.tsx
|
|
187896
|
-
var import_react_router_dom247,
|
|
187884
|
+
var import_react_router_dom247, import_react306, import_react_query105, import_jsx_runtime690, TranslationsEdit;
|
|
187897
187885
|
var init_translations_edit = __esm({
|
|
187898
187886
|
"src/routes/translations/translations-edit/translations-edit.tsx"() {
|
|
187899
187887
|
"use strict";
|
|
187900
187888
|
import_react_router_dom247 = require("react-router-dom");
|
|
187901
187889
|
init_api();
|
|
187902
187890
|
init_translations_edit_form2();
|
|
187903
|
-
|
|
187891
|
+
import_react306 = require("react");
|
|
187904
187892
|
init_modals();
|
|
187905
187893
|
init_feature_flag_provider();
|
|
187906
187894
|
import_react_query105 = require("@tanstack/react-query");
|
|
@@ -187911,16 +187899,21 @@ var init_translations_edit = __esm({
|
|
|
187911
187899
|
const [searchParams] = (0, import_react_router_dom247.useSearchParams)();
|
|
187912
187900
|
const reference = searchParams.get("reference");
|
|
187913
187901
|
const referenceIdParam = searchParams.getAll("reference_id");
|
|
187914
|
-
(0,
|
|
187902
|
+
(0, import_react306.useEffect)(() => {
|
|
187915
187903
|
if (!reference || !isTranslationsEnabled) {
|
|
187916
187904
|
navigate(-1);
|
|
187917
187905
|
return;
|
|
187918
187906
|
}
|
|
187919
187907
|
}, [reference, navigate, isTranslationsEnabled]);
|
|
187908
|
+
const {
|
|
187909
|
+
translatable_fields,
|
|
187910
|
+
isPending: isTranslationSettingsPending,
|
|
187911
|
+
isError: isTranslationSettingsError,
|
|
187912
|
+
error: translationSettingsError
|
|
187913
|
+
} = useTranslationSettings({ entity_type: reference });
|
|
187920
187914
|
const {
|
|
187921
187915
|
translations,
|
|
187922
187916
|
references,
|
|
187923
|
-
translatableFields,
|
|
187924
187917
|
fetchNextPage,
|
|
187925
187918
|
count,
|
|
187926
187919
|
isFetchingNextPage,
|
|
@@ -187928,18 +187921,24 @@ var init_translations_edit = __esm({
|
|
|
187928
187921
|
isPending,
|
|
187929
187922
|
isError,
|
|
187930
187923
|
error
|
|
187931
|
-
} = useReferenceTranslations(
|
|
187932
|
-
|
|
187933
|
-
|
|
187924
|
+
} = useReferenceTranslations(
|
|
187925
|
+
reference,
|
|
187926
|
+
translatable_fields?.[reference] ?? [],
|
|
187927
|
+
referenceIdParam,
|
|
187928
|
+
{
|
|
187929
|
+
enabled: !!translatable_fields && !!reference,
|
|
187930
|
+
placeholderData: import_react_query105.keepPreviousData
|
|
187931
|
+
}
|
|
187932
|
+
);
|
|
187934
187933
|
const {
|
|
187935
187934
|
store,
|
|
187936
187935
|
isPending: isStorePending,
|
|
187937
187936
|
isError: isStoreError,
|
|
187938
187937
|
error: storeError
|
|
187939
187938
|
} = useStore();
|
|
187940
|
-
const ready = !isPending && !!translations && !!
|
|
187941
|
-
if (isError || isStoreError) {
|
|
187942
|
-
throw error || storeError;
|
|
187939
|
+
const ready = !isPending && !!translations && !!translatable_fields && !isTranslationSettingsPending && !!references && !isStorePending && !!store;
|
|
187940
|
+
if (isError || isStoreError || isTranslationSettingsError) {
|
|
187941
|
+
throw error || storeError || translationSettingsError;
|
|
187943
187942
|
}
|
|
187944
187943
|
return /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(RouteFocusModal, { prev: referenceIdParam.length ? -1 : "..", children: ready && /* @__PURE__ */ (0, import_jsx_runtime690.jsx)(
|
|
187945
187944
|
TranslationsEditForm,
|
|
@@ -187948,8 +187947,8 @@ var init_translations_edit = __esm({
|
|
|
187948
187947
|
references,
|
|
187949
187948
|
entityType: reference,
|
|
187950
187949
|
availableLocales: store?.supported_locales ?? [],
|
|
187951
|
-
translatableFields,
|
|
187952
|
-
modalFields:
|
|
187950
|
+
translatableFields: translatable_fields[reference],
|
|
187951
|
+
modalFields: translatable_fields[reference],
|
|
187953
187952
|
fetchNextPage,
|
|
187954
187953
|
hasNextPage,
|
|
187955
187954
|
isFetchingNextPage,
|
|
@@ -187981,7 +187980,7 @@ function AvatarBox({ checked }) {
|
|
|
187981
187980
|
className: "bg-ui-button-neutral shadow-buttons-neutral after:button-neutral-gradient relative mb-4 flex h-[50px] w-[50px] items-center justify-center rounded-xl after:inset-0 after:content-['']",
|
|
187982
187981
|
children: [
|
|
187983
187982
|
checked && /* @__PURE__ */ (0, import_jsx_runtime691.jsx)(
|
|
187984
|
-
|
|
187983
|
+
import_react307.motion.div,
|
|
187985
187984
|
{
|
|
187986
187985
|
className: "absolute -right-[5px] -top-1 flex size-5 items-center justify-center rounded-full border-[0.5px] border-[rgba(3,7,18,0.2)] bg-[#3B82F6] bg-gradient-to-b from-white/0 to-white/20 shadow-[0px_1px_2px_0px_rgba(3,7,18,0.12),0px_1px_2px_0px_rgba(255,255,255,0.10)_inset,0px_-1px_5px_0px_rgba(255,255,255,0.10)_inset,0px_0px_0px_0px_rgba(3,7,18,0.06)_inset]",
|
|
187987
187986
|
initial: { opacity: 0, scale: 0.5 },
|
|
@@ -188000,7 +187999,7 @@ function AvatarBox({ checked }) {
|
|
|
188000
187999
|
viewBox: "0 0 20 20",
|
|
188001
188000
|
fill: "none",
|
|
188002
188001
|
children: /* @__PURE__ */ (0, import_jsx_runtime691.jsx)(
|
|
188003
|
-
|
|
188002
|
+
import_react307.motion.path,
|
|
188004
188003
|
{
|
|
188005
188004
|
d: "M5.8335 10.4167L9.16683 13.75L14.1668 6.25",
|
|
188006
188005
|
stroke: "white",
|
|
@@ -188078,25 +188077,25 @@ function AvatarBox({ checked }) {
|
|
|
188078
188077
|
}
|
|
188079
188078
|
);
|
|
188080
188079
|
}
|
|
188081
|
-
var
|
|
188080
|
+
var import_react307, import_jsx_runtime691;
|
|
188082
188081
|
var init_avatar_box = __esm({
|
|
188083
188082
|
"src/components/common/logo-box/avatar-box.tsx"() {
|
|
188084
188083
|
"use strict";
|
|
188085
|
-
|
|
188084
|
+
import_react307 = require("motion/react");
|
|
188086
188085
|
init_icon_avatar2();
|
|
188087
188086
|
import_jsx_runtime691 = require("react/jsx-runtime");
|
|
188088
188087
|
}
|
|
188089
188088
|
});
|
|
188090
188089
|
|
|
188091
188090
|
// src/routes/login/login.tsx
|
|
188092
|
-
var import_zod168, import_ui454, import_react_hook_form145,
|
|
188091
|
+
var import_zod168, import_ui454, import_react_hook_form145, import_react_i18next488, import_react_router_dom248, z64, import_jsx_runtime692, LoginSchema, Login;
|
|
188093
188092
|
var init_login = __esm({
|
|
188094
188093
|
"src/routes/login/login.tsx"() {
|
|
188095
188094
|
"use strict";
|
|
188096
188095
|
import_zod168 = require("@hookform/resolvers/zod");
|
|
188097
188096
|
import_ui454 = require("@medusajs/ui");
|
|
188098
188097
|
import_react_hook_form145 = require("react-hook-form");
|
|
188099
|
-
|
|
188098
|
+
import_react_i18next488 = require("react-i18next");
|
|
188100
188099
|
import_react_router_dom248 = require("react-router-dom");
|
|
188101
188100
|
z64 = __toESM(require("zod"));
|
|
188102
188101
|
init_form2();
|
|
@@ -188110,7 +188109,7 @@ var init_login = __esm({
|
|
|
188110
188109
|
password: z64.string()
|
|
188111
188110
|
});
|
|
188112
188111
|
Login = () => {
|
|
188113
|
-
const { t: t5 } = (0,
|
|
188112
|
+
const { t: t5 } = (0, import_react_i18next488.useTranslation)();
|
|
188114
188113
|
const location = (0, import_react_router_dom248.useLocation)();
|
|
188115
188114
|
const navigate = (0, import_react_router_dom248.useNavigate)();
|
|
188116
188115
|
const { getWidgets } = useExtension();
|
|
@@ -188230,7 +188229,7 @@ var init_login = __esm({
|
|
|
188230
188229
|
})
|
|
188231
188230
|
] }),
|
|
188232
188231
|
/* @__PURE__ */ (0, import_jsx_runtime692.jsx)("span", { className: "text-ui-fg-muted txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime692.jsx)(
|
|
188233
|
-
|
|
188232
|
+
import_react_i18next488.Trans,
|
|
188234
188233
|
{
|
|
188235
188234
|
i18nKey: "login.forgotPassword",
|
|
188236
188235
|
components: [
|
|
@@ -188263,12 +188262,12 @@ var init_login2 = __esm({
|
|
|
188263
188262
|
});
|
|
188264
188263
|
|
|
188265
188264
|
// src/components/common/logo-box/logo-box.tsx
|
|
188266
|
-
var import_ui455,
|
|
188265
|
+
var import_ui455, import_react308, import_jsx_runtime693, LogoBox;
|
|
188267
188266
|
var init_logo_box = __esm({
|
|
188268
188267
|
"src/components/common/logo-box/logo-box.tsx"() {
|
|
188269
188268
|
"use strict";
|
|
188270
188269
|
import_ui455 = require("@medusajs/ui");
|
|
188271
|
-
|
|
188270
|
+
import_react308 = require("motion/react");
|
|
188272
188271
|
import_jsx_runtime693 = require("react/jsx-runtime");
|
|
188273
188272
|
LogoBox = ({
|
|
188274
188273
|
className,
|
|
@@ -188294,7 +188293,7 @@ var init_logo_box = __esm({
|
|
|
188294
188293
|
),
|
|
188295
188294
|
children: [
|
|
188296
188295
|
checked && /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
|
|
188297
|
-
|
|
188296
|
+
import_react308.motion.div,
|
|
188298
188297
|
{
|
|
188299
188298
|
className: "size-5 absolute -right-[5px] -top-1 flex items-center justify-center rounded-full border-[0.5px] border-[rgba(3,7,18,0.2)] bg-[#3B82F6] bg-gradient-to-b from-white/0 to-white/20 shadow-[0px_1px_2px_0px_rgba(3,7,18,0.12),0px_1px_2px_0px_rgba(255,255,255,0.10)_inset,0px_-1px_5px_0px_rgba(255,255,255,0.10)_inset,0px_0px_0px_0px_rgba(3,7,18,0.06)_inset]",
|
|
188300
188299
|
initial: { opacity: 0, scale: 0.5 },
|
|
@@ -188309,7 +188308,7 @@ var init_logo_box = __esm({
|
|
|
188309
188308
|
viewBox: "0 0 20 20",
|
|
188310
188309
|
fill: "none",
|
|
188311
188310
|
children: /* @__PURE__ */ (0, import_jsx_runtime693.jsx)(
|
|
188312
|
-
|
|
188311
|
+
import_react308.motion.path,
|
|
188313
188312
|
{
|
|
188314
188313
|
d: "M5.8335 10.4167L9.16683 13.75L14.1668 6.25",
|
|
188315
188314
|
stroke: "white",
|
|
@@ -188359,17 +188358,17 @@ var init_logo_box2 = __esm({
|
|
|
188359
188358
|
});
|
|
188360
188359
|
|
|
188361
188360
|
// src/routes/reset-password/reset-password.tsx
|
|
188362
|
-
var import_zod169, import_ui456, import_react_hook_form146,
|
|
188361
|
+
var import_zod169, import_ui456, import_react_hook_form146, import_react_i18next489, import_react_router_dom249, z65, import_react309, import_react_jwt, import_jsx_runtime694, ResetPasswordInstructionsSchema, ResetPasswordSchema, ResetPasswordTokenSchema, validateDecodedResetPasswordToken, InvalidResetToken, ChooseNewPassword, ResetPassword;
|
|
188363
188362
|
var init_reset_password = __esm({
|
|
188364
188363
|
"src/routes/reset-password/reset-password.tsx"() {
|
|
188365
188364
|
"use strict";
|
|
188366
188365
|
import_zod169 = require("@hookform/resolvers/zod");
|
|
188367
188366
|
import_ui456 = require("@medusajs/ui");
|
|
188368
188367
|
import_react_hook_form146 = require("react-hook-form");
|
|
188369
|
-
|
|
188368
|
+
import_react_i18next489 = require("react-i18next");
|
|
188370
188369
|
import_react_router_dom249 = require("react-router-dom");
|
|
188371
188370
|
z65 = __toESM(require("zod"));
|
|
188372
|
-
|
|
188371
|
+
import_react309 = require("react");
|
|
188373
188372
|
import_react_jwt = require("react-jwt");
|
|
188374
188373
|
init_form2();
|
|
188375
188374
|
init_logo_box2();
|
|
@@ -188401,7 +188400,7 @@ var init_reset_password = __esm({
|
|
|
188401
188400
|
return ResetPasswordTokenSchema.safeParse(decoded).success;
|
|
188402
188401
|
};
|
|
188403
188402
|
InvalidResetToken = () => {
|
|
188404
|
-
const { t: t5 } = (0,
|
|
188403
|
+
const { t: t5 } = (0, import_react_i18next489.useTranslation)();
|
|
188405
188404
|
const navigate = (0, import_react_router_dom249.useNavigate)();
|
|
188406
188405
|
return /* @__PURE__ */ (0, import_jsx_runtime694.jsx)("div", { className: "bg-ui-bg-base flex min-h-dvh w-dvw items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsxs)("div", { className: "m-4 flex w-full max-w-[300px] flex-col items-center", children: [
|
|
188407
188406
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)(LogoBox, { className: "mb-4" }),
|
|
@@ -188419,7 +188418,7 @@ var init_reset_password = __esm({
|
|
|
188419
188418
|
}
|
|
188420
188419
|
) }),
|
|
188421
188420
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
|
|
188422
|
-
|
|
188421
|
+
import_react_i18next489.Trans,
|
|
188423
188422
|
{
|
|
188424
188423
|
i18nKey: "resetPassword.backToLogin",
|
|
188425
188424
|
components: [
|
|
@@ -188437,8 +188436,8 @@ var init_reset_password = __esm({
|
|
|
188437
188436
|
] }) });
|
|
188438
188437
|
};
|
|
188439
188438
|
ChooseNewPassword = ({ token }) => {
|
|
188440
|
-
const { t: t5 } = (0,
|
|
188441
|
-
const [showAlert, setShowAlert] = (0,
|
|
188439
|
+
const { t: t5 } = (0, import_react_i18next489.useTranslation)();
|
|
188440
|
+
const [showAlert, setShowAlert] = (0, import_react309.useState)(false);
|
|
188442
188441
|
const invite = token ? (0, import_react_jwt.decodeToken)(token) : null;
|
|
188443
188442
|
const isValidResetPasswordToken = invite && validateDecodedResetPasswordToken(invite);
|
|
188444
188443
|
const form = (0, import_react_hook_form146.useForm)({
|
|
@@ -188538,7 +188537,7 @@ var init_reset_password = __esm({
|
|
|
188538
188537
|
}
|
|
188539
188538
|
) }) }),
|
|
188540
188539
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
|
|
188541
|
-
|
|
188540
|
+
import_react_i18next489.Trans,
|
|
188542
188541
|
{
|
|
188543
188542
|
i18nKey: "resetPassword.backToLogin",
|
|
188544
188543
|
components: [
|
|
@@ -188556,9 +188555,9 @@ var init_reset_password = __esm({
|
|
|
188556
188555
|
] }) });
|
|
188557
188556
|
};
|
|
188558
188557
|
ResetPassword = () => {
|
|
188559
|
-
const { t: t5 } = (0,
|
|
188558
|
+
const { t: t5 } = (0, import_react_i18next489.useTranslation)();
|
|
188560
188559
|
const [searchParams] = (0, import_react_router_dom249.useSearchParams)();
|
|
188561
|
-
const [showAlert, setShowAlert] = (0,
|
|
188560
|
+
const [showAlert, setShowAlert] = (0, import_react309.useState)(false);
|
|
188562
188561
|
const token = searchParams.get("token");
|
|
188563
188562
|
const form = (0, import_react_hook_form146.useForm)({
|
|
188564
188563
|
resolver: (0, import_zod169.zodResolver)(ResetPasswordInstructionsSchema),
|
|
@@ -188627,7 +188626,7 @@ var init_reset_password = __esm({
|
|
|
188627
188626
|
}
|
|
188628
188627
|
) }) }),
|
|
188629
188628
|
/* @__PURE__ */ (0, import_jsx_runtime694.jsx)("span", { className: "txt-small my-6", children: /* @__PURE__ */ (0, import_jsx_runtime694.jsx)(
|
|
188630
|
-
|
|
188629
|
+
import_react_i18next489.Trans,
|
|
188631
188630
|
{
|
|
188632
188631
|
i18nKey: "resetPassword.backToLogin",
|
|
188633
188632
|
components: [
|
|
@@ -188660,17 +188659,17 @@ var init_reset_password2 = __esm({
|
|
|
188660
188659
|
});
|
|
188661
188660
|
|
|
188662
188661
|
// src/routes/invite/invite.tsx
|
|
188663
|
-
var import_zod170, import_ui457, import_i18next8,
|
|
188662
|
+
var import_zod170, import_ui457, import_i18next8, import_react310, import_react311, import_react_hook_form147, import_react_i18next490, import_react_jwt2, import_react_router_dom250, z66, import_jsx_runtime695, CreateAccountSchema, Invite, LoginLink, InvalidView, CreateView, SuccessView, InviteSchema, validateDecodedInvite;
|
|
188664
188663
|
var init_invite = __esm({
|
|
188665
188664
|
"src/routes/invite/invite.tsx"() {
|
|
188666
188665
|
"use strict";
|
|
188667
188666
|
import_zod170 = require("@hookform/resolvers/zod");
|
|
188668
188667
|
import_ui457 = require("@medusajs/ui");
|
|
188669
188668
|
import_i18next8 = __toESM(require("i18next"));
|
|
188670
|
-
|
|
188671
|
-
|
|
188669
|
+
import_react310 = require("motion/react");
|
|
188670
|
+
import_react311 = require("react");
|
|
188672
188671
|
import_react_hook_form147 = require("react-hook-form");
|
|
188673
|
-
|
|
188672
|
+
import_react_i18next490 = require("react-i18next");
|
|
188674
188673
|
import_react_jwt2 = require("react-jwt");
|
|
188675
188674
|
import_react_router_dom250 = require("react-router-dom");
|
|
188676
188675
|
z66 = __toESM(require("zod"));
|
|
@@ -188697,14 +188696,14 @@ var init_invite = __esm({
|
|
|
188697
188696
|
});
|
|
188698
188697
|
Invite = () => {
|
|
188699
188698
|
const [searchParams] = (0, import_react_router_dom250.useSearchParams)();
|
|
188700
|
-
const [success, setSuccess] = (0,
|
|
188699
|
+
const [success, setSuccess] = (0, import_react311.useState)(false);
|
|
188701
188700
|
const token = searchParams.get("token");
|
|
188702
188701
|
const invite = token ? (0, import_react_jwt2.decodeToken)(token) : null;
|
|
188703
188702
|
const isValidInvite = invite && validateDecodedInvite(invite);
|
|
188704
188703
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "bg-ui-bg-subtle relative flex min-h-dvh w-dvw items-center justify-center p-4", children: /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex w-full max-w-[360px] flex-col items-center", children: [
|
|
188705
188704
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(AvatarBox, { checked: success }),
|
|
188706
|
-
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "max-h-[557px] w-full will-change-contents", children: isValidInvite ? /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
|
|
188707
|
-
|
|
188705
|
+
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "max-h-[557px] w-full will-change-contents", children: isValidInvite ? /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_react310.AnimatePresence, { children: !success ? /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
|
|
188706
|
+
import_react310.motion.div,
|
|
188708
188707
|
{
|
|
188709
188708
|
initial: false,
|
|
188710
188709
|
animate: {
|
|
@@ -188722,7 +188721,7 @@ var init_invite = __esm({
|
|
|
188722
188721
|
},
|
|
188723
188722
|
className: "w-full will-change-transform",
|
|
188724
188723
|
children: /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
|
|
188725
|
-
|
|
188724
|
+
import_react310.motion.div,
|
|
188726
188725
|
{
|
|
188727
188726
|
initial: false,
|
|
188728
188727
|
animate: {
|
|
@@ -188752,7 +188751,7 @@ var init_invite = __esm({
|
|
|
188752
188751
|
},
|
|
188753
188752
|
"create-account"
|
|
188754
188753
|
) : /* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
|
|
188755
|
-
|
|
188754
|
+
import_react310.motion.div,
|
|
188756
188755
|
{
|
|
188757
188756
|
initial: {
|
|
188758
188757
|
opacity: 0,
|
|
@@ -188775,7 +188774,7 @@ var init_invite = __esm({
|
|
|
188775
188774
|
] }) });
|
|
188776
188775
|
};
|
|
188777
188776
|
LoginLink = () => {
|
|
188778
|
-
const { t: t5 } = (0,
|
|
188777
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188779
188778
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex w-full flex-col items-center", children: [
|
|
188780
188779
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)("div", { className: "my-6 h-px w-full border-b border-dotted" }),
|
|
188781
188780
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(
|
|
@@ -188790,7 +188789,7 @@ var init_invite = __esm({
|
|
|
188790
188789
|
] });
|
|
188791
188790
|
};
|
|
188792
188791
|
InvalidView = () => {
|
|
188793
|
-
const { t: t5 } = (0,
|
|
188792
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188794
188793
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col items-center", children: [
|
|
188795
188794
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
|
|
188796
188795
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { children: t5("invite.invalidTokenTitle") }),
|
|
@@ -188804,8 +188803,8 @@ var init_invite = __esm({
|
|
|
188804
188803
|
token,
|
|
188805
188804
|
invite
|
|
188806
188805
|
}) => {
|
|
188807
|
-
const { t: t5 } = (0,
|
|
188808
|
-
const [invalid, setInvalid] = (0,
|
|
188806
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188807
|
+
const [invalid, setInvalid] = (0, import_react311.useState)(false);
|
|
188809
188808
|
const [params2] = (0, import_react_router_dom250.useSearchParams)();
|
|
188810
188809
|
const isFirstRun = params2.get("first_run") === "true";
|
|
188811
188810
|
const form = (0, import_react_hook_form147.useForm)({
|
|
@@ -188979,7 +188978,7 @@ var init_invite = __esm({
|
|
|
188979
188978
|
] });
|
|
188980
188979
|
};
|
|
188981
188980
|
SuccessView = () => {
|
|
188982
|
-
const { t: t5 } = (0,
|
|
188981
|
+
const { t: t5 } = (0, import_react_i18next490.useTranslation)();
|
|
188983
188982
|
return /* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex w-full flex-col items-center gap-y-6", children: [
|
|
188984
188983
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsxs)("div", { className: "flex flex-col items-center gap-y-1", children: [
|
|
188985
188984
|
/* @__PURE__ */ (0, import_jsx_runtime695.jsx)(import_ui457.Heading, { className: "text-center", children: t5("invite.successTitle") }),
|
|
@@ -189022,22 +189021,22 @@ var init_invite2 = __esm({
|
|
|
189022
189021
|
});
|
|
189023
189022
|
|
|
189024
189023
|
// src/routes/no-match/no-match.tsx
|
|
189025
|
-
var
|
|
189024
|
+
var import_icons175, import_ui458, import_react_i18next491, import_react_router_dom251, import_jsx_runtime696, NoMatch;
|
|
189026
189025
|
var init_no_match = __esm({
|
|
189027
189026
|
"src/routes/no-match/no-match.tsx"() {
|
|
189028
189027
|
"use strict";
|
|
189029
|
-
|
|
189028
|
+
import_icons175 = require("@medusajs/icons");
|
|
189030
189029
|
import_ui458 = require("@medusajs/ui");
|
|
189031
|
-
|
|
189030
|
+
import_react_i18next491 = require("react-i18next");
|
|
189032
189031
|
import_react_router_dom251 = require("react-router-dom");
|
|
189033
189032
|
import_jsx_runtime696 = require("react/jsx-runtime");
|
|
189034
189033
|
NoMatch = () => {
|
|
189035
|
-
const { t: t5 } = (0,
|
|
189034
|
+
const { t: t5 } = (0, import_react_i18next491.useTranslation)();
|
|
189036
189035
|
const title = t5("errorBoundary.notFoundTitle");
|
|
189037
189036
|
const message = t5("errorBoundary.noMatchMessage");
|
|
189038
189037
|
return /* @__PURE__ */ (0, import_jsx_runtime696.jsx)("div", { className: "flex size-full min-h-screen items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col items-center gap-y-6", children: [
|
|
189039
189038
|
/* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "text-ui-fg-subtle flex flex-col items-center gap-y-3", children: [
|
|
189040
|
-
/* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
|
|
189039
|
+
/* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_icons175.ExclamationCircle, {}),
|
|
189041
189040
|
/* @__PURE__ */ (0, import_jsx_runtime696.jsxs)("div", { className: "flex flex-col items-center justify-center gap-y-1", children: [
|
|
189042
189041
|
/* @__PURE__ */ (0, import_jsx_runtime696.jsx)(import_ui458.Text, { size: "small", leading: "compact", weight: "plus", children: title }),
|
|
189043
189042
|
/* @__PURE__ */ (0, import_jsx_runtime696.jsx)(
|
|
@@ -190548,7 +190547,7 @@ var init_get_route_map = __esm({
|
|
|
190548
190547
|
|
|
190549
190548
|
// src/dashboard-app/routes/utils.ts
|
|
190550
190549
|
var settingsRouteRegex, getRouteExtensions, createBranchRoute, createLeafRoute, createParallelRoute, processParallelRoutes, addRoute, createRouteMap;
|
|
190551
|
-
var
|
|
190550
|
+
var init_utils14 = __esm({
|
|
190552
190551
|
"src/dashboard-app/routes/utils.ts"() {
|
|
190553
190552
|
"use strict";
|
|
190554
190553
|
init_error_boundary2();
|
|
@@ -190715,7 +190714,7 @@ var init_dashboard_app = __esm({
|
|
|
190715
190714
|
init_providers2();
|
|
190716
190715
|
init_translations();
|
|
190717
190716
|
init_get_route_map();
|
|
190718
|
-
|
|
190717
|
+
init_utils14();
|
|
190719
190718
|
init_sort_menu_items_by_rank();
|
|
190720
190719
|
import_jsx_runtime698 = require("react/jsx-runtime");
|
|
190721
190720
|
OPTIONAL_LAST_SEGMENT_MATCH = /\/([^\/])+\?$/;
|
|
@@ -191065,7 +191064,7 @@ function getFieldType(type) {
|
|
|
191065
191064
|
return "unsupported";
|
|
191066
191065
|
}
|
|
191067
191066
|
var import_zod171;
|
|
191068
|
-
var
|
|
191067
|
+
var init_utils15 = __esm({
|
|
191069
191068
|
"src/dashboard-app/forms/form-extension-zone/utils.ts"() {
|
|
191070
191069
|
"use strict";
|
|
191071
191070
|
import_zod171 = require("zod");
|
|
@@ -191079,14 +191078,14 @@ function getFieldLabel(field) {
|
|
|
191079
191078
|
}
|
|
191080
191079
|
return field.name.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
191081
191080
|
}
|
|
191082
|
-
var import_ui459,
|
|
191081
|
+
var import_ui459, import_react_i18next492, import_jsx_runtime699, FormExtensionZone, FormExtensionField, FormExtensionFieldComponent;
|
|
191083
191082
|
var init_form_extension_zone = __esm({
|
|
191084
191083
|
"src/dashboard-app/forms/form-extension-zone/form-extension-zone.tsx"() {
|
|
191085
191084
|
"use strict";
|
|
191086
191085
|
import_ui459 = require("@medusajs/ui");
|
|
191087
|
-
|
|
191086
|
+
import_react_i18next492 = require("react-i18next");
|
|
191088
191087
|
init_form2();
|
|
191089
|
-
|
|
191088
|
+
init_utils15();
|
|
191090
191089
|
import_jsx_runtime699 = require("react/jsx-runtime");
|
|
191091
191090
|
FormExtensionZone = ({ fields, form }) => {
|
|
191092
191091
|
return /* @__PURE__ */ (0, import_jsx_runtime699.jsx)("div", { children: fields.map((field, index) => /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(FormExtensionField, { field, form }, index)) });
|
|
@@ -191128,7 +191127,7 @@ var init_form_extension_zone = __esm({
|
|
|
191128
191127
|
component,
|
|
191129
191128
|
placeholder
|
|
191130
191129
|
}) => {
|
|
191131
|
-
const { t: t5 } = (0,
|
|
191130
|
+
const { t: t5 } = (0, import_react_i18next492.useTranslation)();
|
|
191132
191131
|
if (component) {
|
|
191133
191132
|
const Component5 = component;
|
|
191134
191133
|
return /* @__PURE__ */ (0, import_jsx_runtime699.jsx)(Component5, { ...field, placeholder });
|
|
@@ -191180,7 +191179,7 @@ function getLinkedFields(model, fields = "") {
|
|
|
191180
191179
|
return appendLinkableFields(fields, links);
|
|
191181
191180
|
}
|
|
191182
191181
|
var import_links;
|
|
191183
|
-
var
|
|
191182
|
+
var init_utils16 = __esm({
|
|
191184
191183
|
"src/dashboard-app/links/utils.ts"() {
|
|
191185
191184
|
"use strict";
|
|
191186
191185
|
import_links = __toESM(require("virtual:medusa/links"));
|
|
@@ -191193,8 +191192,8 @@ var init_dashboard_app2 = __esm({
|
|
|
191193
191192
|
"use strict";
|
|
191194
191193
|
init_dashboard_app();
|
|
191195
191194
|
init_forms();
|
|
191196
|
-
|
|
191197
|
-
|
|
191195
|
+
init_utils16();
|
|
191196
|
+
init_utils14();
|
|
191198
191197
|
}
|
|
191199
191198
|
});
|
|
191200
191199
|
|