@atomsolution/sdk-merchant 1.6.3 → 1.6.4
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/assets/locales/en/file.json.d.ts +4 -1
- package/dist/assets/locales/vi/file.json.d.ts +4 -1
- package/dist/assets/locales/vi/merchant-batch-create-form.json.d.ts +1 -1
- package/dist/batch-product-creation.cjs +8 -8
- package/dist/batch-product-creation.cjs.map +1 -1
- package/dist/batch-product-creation.esm.js +8 -8
- package/dist/batch-product-creation.esm.js.map +1 -1
- package/dist/batch-product-creation.js +8 -8
- package/dist/batch-product-creation.js.map +1 -1
- package/dist/digistore.cjs +1 -1
- package/dist/digistore.esm.js +1 -1
- package/dist/digistore.js +1 -1
- package/dist/{dropdownMenuAbsolute-CLw6DPyb.js → dropdownMenuAbsolute-CZJdH-DA.js} +2 -2
- package/dist/{dropdownMenuAbsolute-CLw6DPyb.js.map → dropdownMenuAbsolute-CZJdH-DA.js.map} +1 -1
- package/dist/{dropdownMenuAbsolute-DlrCbNFH.cjs → dropdownMenuAbsolute-Dwd-XAjy.cjs} +2 -2
- package/dist/{dropdownMenuAbsolute-DlrCbNFH.cjs.map → dropdownMenuAbsolute-Dwd-XAjy.cjs.map} +1 -1
- package/dist/merchant-profile.cjs +2 -2
- package/dist/merchant-profile.esm.js +2 -2
- package/dist/merchant-profile.js +2 -2
- package/dist/use-external-config.store-CaaNmLce.js.map +1 -1
- package/dist/use-external-config.store-WVwivWvK.cjs.map +1 -1
- package/dist/{use-translation-FLryNm-e.cjs → use-translation-CEsmTQjP.cjs} +13 -4
- package/dist/{use-translation-FLryNm-e.cjs.map → use-translation-CEsmTQjP.cjs.map} +1 -1
- package/dist/{use-translation-B8KAf9vm.js → use-translation-IKmTNALv.js} +13 -4
- package/dist/{use-translation-B8KAf9vm.js.map → use-translation-IKmTNALv.js.map} +1 -1
- package/dist/utils/translations.d.ts +4 -0
- package/package.json +1 -1
|
@@ -53,8 +53,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
53
53
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
54
54
|
const jsxRuntime = require("./jsx-runtime-DV8UmLi4.cjs");
|
|
55
55
|
const React = require("react");
|
|
56
|
-
const dropdownMenuAbsolute = require("./dropdownMenuAbsolute-
|
|
57
|
-
const useTranslation = require("./use-translation-
|
|
56
|
+
const dropdownMenuAbsolute = require("./dropdownMenuAbsolute-Dwd-XAjy.cjs");
|
|
57
|
+
const useTranslation = require("./use-translation-CEsmTQjP.cjs");
|
|
58
58
|
const usePortalApiConfig_store = require("./use-portal-api-config.store-C8a2gebE.cjs");
|
|
59
59
|
const axios = require("axios");
|
|
60
60
|
var runtime = { exports: {} };
|
|
@@ -51,8 +51,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51
51
|
};
|
|
52
52
|
import { j as jsxRuntimeExports } from "./jsx-runtime-ClP9nxnW.js";
|
|
53
53
|
import { useState, useCallback, useEffect, useRef, memo, useMemo } from "react";
|
|
54
|
-
import { c as commonjsRequire, g as getDefaultExportFromCjs, B as Button, D as DropdownMenu, u as useMediaQuery, T as TableSkeleton, R as ReusableTable, a as DropdownMenuAbsolute } from "./dropdownMenuAbsolute-
|
|
55
|
-
import { u as useTranslation } from "./use-translation-
|
|
54
|
+
import { c as commonjsRequire, g as getDefaultExportFromCjs, B as Button, D as DropdownMenu, u as useMediaQuery, T as TableSkeleton, R as ReusableTable, a as DropdownMenuAbsolute } from "./dropdownMenuAbsolute-CZJdH-DA.js";
|
|
55
|
+
import { u as useTranslation } from "./use-translation-IKmTNALv.js";
|
|
56
56
|
import { u as usePortalApiConfig } from "./use-portal-api-config.store-C1UTTpK9.js";
|
|
57
57
|
import axios from "axios";
|
|
58
58
|
var runtime = { exports: {} };
|
package/dist/merchant-profile.js
CHANGED
|
@@ -51,8 +51,8 @@ var __async = (__this, __arguments, generator) => {
|
|
|
51
51
|
};
|
|
52
52
|
import { j as jsxRuntimeExports } from "./jsx-runtime-ClP9nxnW.js";
|
|
53
53
|
import { useState, useCallback, useEffect, useRef, memo, useMemo } from "react";
|
|
54
|
-
import { c as commonjsRequire, g as getDefaultExportFromCjs, B as Button, D as DropdownMenu, u as useMediaQuery, T as TableSkeleton, R as ReusableTable, a as DropdownMenuAbsolute } from "./dropdownMenuAbsolute-
|
|
55
|
-
import { u as useTranslation } from "./use-translation-
|
|
54
|
+
import { c as commonjsRequire, g as getDefaultExportFromCjs, B as Button, D as DropdownMenu, u as useMediaQuery, T as TableSkeleton, R as ReusableTable, a as DropdownMenuAbsolute } from "./dropdownMenuAbsolute-CZJdH-DA.js";
|
|
55
|
+
import { u as useTranslation } from "./use-translation-IKmTNALv.js";
|
|
56
56
|
import { u as usePortalApiConfig } from "./use-portal-api-config.store-C1UTTpK9.js";
|
|
57
57
|
import axios from "axios";
|
|
58
58
|
var runtime = { exports: {} };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-external-config.store-CaaNmLce.js","sources":["../src/shared/store/use-external-config.store.ts"],"sourcesContent":["import { Language } from
|
|
1
|
+
{"version":3,"file":"use-external-config.store-CaaNmLce.js","sources":["../src/shared/store/use-external-config.store.ts"],"sourcesContent":["import { Language } from \"@/hooks/use-translation\";\nimport { UserInfo } from \"@/types/user\";\nimport create from \"zustand\";\n\ntype ExternalConfig = {\n language: Language;\n setLanguage: (language: Language) => void;\n userInfo: UserInfo | null;\n setUserInfo: (userInfo: UserInfo) => void;\n};\n\nconst useExternalConfigStore = create<ExternalConfig>((set) => ({\n language: \"vi\",\n setLanguage: (language: Language) => set({ language }),\n userInfo: null,\n setUserInfo: (userInfo: UserInfo) => set({ userInfo }),\n}));\n\nexport default useExternalConfigStore;\n"],"names":[],"mappings":";AAWA,MAAM,yBAAyB,OAAuB,CAAC,SAAS;AAAA,EAC9D,UAAU;AAAA,EACV,aAAa,CAAC,aAAuB,IAAI,EAAE,UAAU;AAAA,EACrD,UAAU;AAAA,EACV,aAAa,CAAC,aAAuB,IAAI,EAAE,UAAU;AACvD,EAAE;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-external-config.store-WVwivWvK.cjs","sources":["../src/shared/store/use-external-config.store.ts"],"sourcesContent":["import { Language } from
|
|
1
|
+
{"version":3,"file":"use-external-config.store-WVwivWvK.cjs","sources":["../src/shared/store/use-external-config.store.ts"],"sourcesContent":["import { Language } from \"@/hooks/use-translation\";\nimport { UserInfo } from \"@/types/user\";\nimport create from \"zustand\";\n\ntype ExternalConfig = {\n language: Language;\n setLanguage: (language: Language) => void;\n userInfo: UserInfo | null;\n setUserInfo: (userInfo: UserInfo) => void;\n};\n\nconst useExternalConfigStore = create<ExternalConfig>((set) => ({\n language: \"vi\",\n setLanguage: (language: Language) => set({ language }),\n userInfo: null,\n setUserInfo: (userInfo: UserInfo) => set({ userInfo }),\n}));\n\nexport default useExternalConfigStore;\n"],"names":[],"mappings":";;AAWA,MAAM,yBAAyB,OAAuB,CAAC,SAAS;AAAA,EAC9D,UAAU;AAAA,EACV,aAAa,CAAC,aAAuB,IAAI,EAAE,UAAU;AAAA,EACrD,UAAU;AAAA,EACV,aAAa,CAAC,aAAuB,IAAI,EAAE,UAAU;AACvD,EAAE;;"}
|
|
@@ -525,7 +525,7 @@ const name_invalid$1 = "Tên sản phẩm không hợp lệ";
|
|
|
525
525
|
const unit_must_be_string$1 = "Đơn vị tính phải là chuỗi";
|
|
526
526
|
const unit_invalid$1 = "Đơn vị tính không hợp lệ";
|
|
527
527
|
const code_must_be_string$1 = "Mã sản phẩm phải là chuỗi";
|
|
528
|
-
const tax_invalid$1 = "Thuế không hợp lệ";
|
|
528
|
+
const tax_invalid$1 = "Thuế không hợp lệ !!!";
|
|
529
529
|
const code_required$1 = "Mã sản phẩm không được bỏ trống";
|
|
530
530
|
const code_invalid$1 = "Mã sản phẩm không hợp lệ";
|
|
531
531
|
const code_min$1 = "Mã sản phẩm phải có ít nhất 2 ký tự";
|
|
@@ -902,6 +902,8 @@ const stopUpload$1 = "Ngưng tải lên";
|
|
|
902
902
|
const mergeDataTitle$1 = "Ghép trường & Kiểm tra dữ liệu";
|
|
903
903
|
const mergeDescription$1 = "Mỗi lượt tải lên danh sách chỉ được tối đa 01 tệp và tối đa 100 dòng thông tin (sản phẩm). \n Trường hợp danh sách có nhiều hơn số dòng thông tin quy định, hệ thống sẽ lấy theo thứ tự dòng thông tin số 1 đến dòng thông tin số 100 (không bao gồm tiêu đề).\n \nXem trước dữ liệu từ file .xlsx. Ghép từng cột trong file với trường của hệ thống để tiếp tục tạo sản phẩm.";
|
|
904
904
|
const directTaxNote$1 = "Hệ thống đã tự động áp dụng cho toàn bộ sản phẩm theo phương pháp thiết lập thuế <span class='font-bold'>Trực tiếp.</span>";
|
|
905
|
+
const cancelUploadTitle$1 = "Bạn có chắc muốn thoát tác vụ tải lên danh sách?";
|
|
906
|
+
const cancelUploadDescription$1 = "Thông tin đã tải lên sẽ không được lưu và không được dùng để tạo sản phẩm.";
|
|
905
907
|
const FILE_VI = {
|
|
906
908
|
fileTooLarge: fileTooLarge$1,
|
|
907
909
|
invalidExtension: invalidExtension$1,
|
|
@@ -937,7 +939,9 @@ const FILE_VI = {
|
|
|
937
939
|
stopUpload: stopUpload$1,
|
|
938
940
|
mergeDataTitle: mergeDataTitle$1,
|
|
939
941
|
mergeDescription: mergeDescription$1,
|
|
940
|
-
directTaxNote: directTaxNote$1
|
|
942
|
+
directTaxNote: directTaxNote$1,
|
|
943
|
+
cancelUploadTitle: cancelUploadTitle$1,
|
|
944
|
+
cancelUploadDescription: cancelUploadDescription$1
|
|
941
945
|
};
|
|
942
946
|
const fileTooLarge = "File exceeds the maximum size, please choose another";
|
|
943
947
|
const invalidExtension = "Only .xlsx format is supported";
|
|
@@ -985,6 +989,8 @@ const stopUpload = "Stop upload";
|
|
|
985
989
|
const mergeDataTitle = "Merge Fields & Validate Data";
|
|
986
990
|
const mergeDescription = "Each upload is limited to 1 file and up to 100 rows of information (products).\n If the list contains more rows than allowed, the system will take rows 1 through 100 in order (excluding the header).\n\nPreview data from the .xlsx file. Map each column in the file to a system field to continue creating products.";
|
|
987
991
|
const directTaxNote = "The system has automatically applied the tax method to all products using the <span class='font-bold'>Direct tax setting method.</span>";
|
|
992
|
+
const cancelUploadTitle = "Are you sure you want to exit the upload process?";
|
|
993
|
+
const cancelUploadDescription = "Uploaded data will not be saved and will not be used to create products.";
|
|
988
994
|
const FILE_VN = {
|
|
989
995
|
fileTooLarge,
|
|
990
996
|
invalidExtension,
|
|
@@ -1020,7 +1026,9 @@ const FILE_VN = {
|
|
|
1020
1026
|
stopUpload,
|
|
1021
1027
|
mergeDataTitle,
|
|
1022
1028
|
mergeDescription,
|
|
1023
|
-
directTaxNote
|
|
1029
|
+
directTaxNote,
|
|
1030
|
+
cancelUploadTitle,
|
|
1031
|
+
cancelUploadDescription
|
|
1024
1032
|
};
|
|
1025
1033
|
const title$3 = "Tải file mẫu";
|
|
1026
1034
|
const description$1 = "Tải file mẫu, điền thông tin sản phẩm và tải lên để hệ thống tự động tạo danh sách sản phẩm cho bạn. Tệp mẫu tiêu chuẩn dùng cho chức năng tạo sản phẩm hàng loạt.\nVui lòng tham khảo bảng hướng dẫn bên dưới để nhập đúng định dạng.";
|
|
@@ -1290,6 +1298,7 @@ const TRANSLATIONS = {
|
|
|
1290
1298
|
};
|
|
1291
1299
|
const translate = (key, name_space = "table", language) => {
|
|
1292
1300
|
const lang = language || useExternalConfig_store.useExternalConfigStore.getState().language;
|
|
1301
|
+
console.log("Xin chào", lang);
|
|
1293
1302
|
const splitKey = key == null ? void 0 : key.split(":");
|
|
1294
1303
|
const [namespace, derivedKey] = splitKey.length > 1 ? splitKey : [name_space, key];
|
|
1295
1304
|
const ns = namespace;
|
|
@@ -1308,4 +1317,4 @@ const useTranslation = (defaultNs = "table", manualLanguage) => {
|
|
|
1308
1317
|
};
|
|
1309
1318
|
exports.translate = translate;
|
|
1310
1319
|
exports.useTranslation = useTranslation;
|
|
1311
|
-
//# sourceMappingURL=use-translation-
|
|
1320
|
+
//# sourceMappingURL=use-translation-CEsmTQjP.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation-
|
|
1
|
+
{"version":3,"file":"use-translation-CEsmTQjP.cjs","sources":["../src/utils/translations.ts","../src/hooks/use-translation.ts"],"sourcesContent":["import TABLE_VI from '@/assets/locales/vi/table.json';\nimport TABLE_EN from '@/assets/locales/en/table.json';\nimport FORM_VI from '@/assets/locales/vi/form.json';\nimport FORM_EN from '@/assets/locales/en/form.json';\nimport BATCH_CREATE_PRODUCT_VI from '@/assets/locales/vi/merchant-batch-create-form.json';\nimport BATCH_CREATE_PRODUCT_EN from '@/assets/locales/en/merchant-batch-create-form.json';\nimport COMMON_VI from '@/assets/locales/vi/common.json';\nimport COMMON_EN from '@/assets/locales/en/common.json';\nimport FILE_VI from '@/assets/locales/vi/file.json';\nimport FILE_VN from '@/assets/locales/en/file.json';\nimport DOWNLOAD_SAMPLE_VI from '@/assets/locales/vi/download-sample.json';\nimport DOWNLOAD_SAMPLE_EN from '@/assets/locales/en/download-sample.json';\nimport DIGISTORE_ID_VI from '@/assets/locales/vi/digistore-id.json';\nimport DIGISTORE_ID_EN from '@/assets/locales/en/digistore-id.json';\n\nexport const TRANSLATIONS = {\n vi: {\n common: COMMON_VI,\n table: TABLE_VI,\n form: FORM_VI,\n 'batch-create-product': BATCH_CREATE_PRODUCT_VI,\n file: FILE_VI,\n 'download-sample': DOWNLOAD_SAMPLE_VI,\n 'digistore-id': DIGISTORE_ID_VI\n },\n en: {\n common: COMMON_EN,\n table: TABLE_EN,\n form: FORM_EN,\n 'batch-create-product': BATCH_CREATE_PRODUCT_EN,\n file: FILE_VN,\n 'download-sample': DOWNLOAD_SAMPLE_EN,\n 'digistore-id': DIGISTORE_ID_EN\n },\n} as const;\n","import useExternalConfigStore from '@/shared/store/use-external-config.store';\nimport { TRANSLATIONS } from '../utils/translations';\n\nexport type Language = keyof typeof TRANSLATIONS;\ntype Namespace = keyof (typeof TRANSLATIONS)[Language];\n\ninterface UseTranslationReturn {\n translate: (key: string) => string;\n language?: Language;\n}\n\nexport const translate = (\n key: string,\n name_space: Namespace = \"table\",\n language?: Language\n): string => {\n const lang = language || useExternalConfigStore.getState().language;\n console.log(\"Xin chào\", lang);\n const splitKey = key?.split(\":\");\n const [namespace, derivedKey] =\n splitKey.length > 1 ? splitKey : [name_space, key];\n\n const ns = namespace as Namespace;\n const translations = TRANSLATIONS[lang][ns] as any;\n const keys = derivedKey.split('.');\n let value: any = translations;\n for (const k of keys) {\n value = value?.[k];\n }\n\n return value ?? key;\n};\n\nexport const useTranslation = (\n defaultNs: Namespace = 'table',\n manualLanguage?: Language\n): UseTranslationReturn => {\n const language: Language =\n manualLanguage || useExternalConfigStore.getState().language;\n const translateWithDefault = (key: string) =>\n translate(key, defaultNs, language);\n\n return { translate: translateWithDefault, language };\n};\n"],"names":["useExternalConfigStore"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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EpB;ACvBO,MAAM,YAAY,CACvB,KACA,aAAwB,SACxB,aACW;AACX,QAAM,OAAO,YAAYA,+CAAuB,SAAA,EAAW;AAC3D,UAAQ,IAAI,YAAY,IAAI;AAC5B,QAAM,WAAW,2BAAK,MAAM;AAC5B,QAAM,CAAC,WAAW,UAAU,IAC1B,SAAS,SAAS,IAAI,WAAW,CAAC,YAAY,GAAG;AAEnD,QAAM,KAAK;AACX,QAAM,eAAe,aAAa,IAAI,EAAE,EAAE;AAC1C,QAAM,OAAO,WAAW,MAAM,GAAG;AACjC,MAAI,QAAa;AACjB,aAAW,KAAK,MAAM;AACpB,YAAQ,+BAAQ;AAAA,EAClB;AAEA,SAAO,wBAAS;AAClB;AAEO,MAAM,iBAAiB,CAC5B,YAAuB,SACvB,mBACyB;AACzB,QAAM,WACJ,kBAAkBA,+CAAuB,SAAA,EAAW;AACtD,QAAM,uBAAuB,CAAC,QAC5B,UAAU,KAAK,WAAW,QAAQ;AAEpC,SAAO,EAAE,WAAW,sBAAsB,SAAA;AAC5C;;;"}
|
|
@@ -524,7 +524,7 @@ const name_invalid$1 = "Tên sản phẩm không hợp lệ";
|
|
|
524
524
|
const unit_must_be_string$1 = "Đơn vị tính phải là chuỗi";
|
|
525
525
|
const unit_invalid$1 = "Đơn vị tính không hợp lệ";
|
|
526
526
|
const code_must_be_string$1 = "Mã sản phẩm phải là chuỗi";
|
|
527
|
-
const tax_invalid$1 = "Thuế không hợp lệ";
|
|
527
|
+
const tax_invalid$1 = "Thuế không hợp lệ !!!";
|
|
528
528
|
const code_required$1 = "Mã sản phẩm không được bỏ trống";
|
|
529
529
|
const code_invalid$1 = "Mã sản phẩm không hợp lệ";
|
|
530
530
|
const code_min$1 = "Mã sản phẩm phải có ít nhất 2 ký tự";
|
|
@@ -901,6 +901,8 @@ const stopUpload$1 = "Ngưng tải lên";
|
|
|
901
901
|
const mergeDataTitle$1 = "Ghép trường & Kiểm tra dữ liệu";
|
|
902
902
|
const mergeDescription$1 = "Mỗi lượt tải lên danh sách chỉ được tối đa 01 tệp và tối đa 100 dòng thông tin (sản phẩm). \n Trường hợp danh sách có nhiều hơn số dòng thông tin quy định, hệ thống sẽ lấy theo thứ tự dòng thông tin số 1 đến dòng thông tin số 100 (không bao gồm tiêu đề).\n \nXem trước dữ liệu từ file .xlsx. Ghép từng cột trong file với trường của hệ thống để tiếp tục tạo sản phẩm.";
|
|
903
903
|
const directTaxNote$1 = "Hệ thống đã tự động áp dụng cho toàn bộ sản phẩm theo phương pháp thiết lập thuế <span class='font-bold'>Trực tiếp.</span>";
|
|
904
|
+
const cancelUploadTitle$1 = "Bạn có chắc muốn thoát tác vụ tải lên danh sách?";
|
|
905
|
+
const cancelUploadDescription$1 = "Thông tin đã tải lên sẽ không được lưu và không được dùng để tạo sản phẩm.";
|
|
904
906
|
const FILE_VI = {
|
|
905
907
|
fileTooLarge: fileTooLarge$1,
|
|
906
908
|
invalidExtension: invalidExtension$1,
|
|
@@ -936,7 +938,9 @@ const FILE_VI = {
|
|
|
936
938
|
stopUpload: stopUpload$1,
|
|
937
939
|
mergeDataTitle: mergeDataTitle$1,
|
|
938
940
|
mergeDescription: mergeDescription$1,
|
|
939
|
-
directTaxNote: directTaxNote$1
|
|
941
|
+
directTaxNote: directTaxNote$1,
|
|
942
|
+
cancelUploadTitle: cancelUploadTitle$1,
|
|
943
|
+
cancelUploadDescription: cancelUploadDescription$1
|
|
940
944
|
};
|
|
941
945
|
const fileTooLarge = "File exceeds the maximum size, please choose another";
|
|
942
946
|
const invalidExtension = "Only .xlsx format is supported";
|
|
@@ -984,6 +988,8 @@ const stopUpload = "Stop upload";
|
|
|
984
988
|
const mergeDataTitle = "Merge Fields & Validate Data";
|
|
985
989
|
const mergeDescription = "Each upload is limited to 1 file and up to 100 rows of information (products).\n If the list contains more rows than allowed, the system will take rows 1 through 100 in order (excluding the header).\n\nPreview data from the .xlsx file. Map each column in the file to a system field to continue creating products.";
|
|
986
990
|
const directTaxNote = "The system has automatically applied the tax method to all products using the <span class='font-bold'>Direct tax setting method.</span>";
|
|
991
|
+
const cancelUploadTitle = "Are you sure you want to exit the upload process?";
|
|
992
|
+
const cancelUploadDescription = "Uploaded data will not be saved and will not be used to create products.";
|
|
987
993
|
const FILE_VN = {
|
|
988
994
|
fileTooLarge,
|
|
989
995
|
invalidExtension,
|
|
@@ -1019,7 +1025,9 @@ const FILE_VN = {
|
|
|
1019
1025
|
stopUpload,
|
|
1020
1026
|
mergeDataTitle,
|
|
1021
1027
|
mergeDescription,
|
|
1022
|
-
directTaxNote
|
|
1028
|
+
directTaxNote,
|
|
1029
|
+
cancelUploadTitle,
|
|
1030
|
+
cancelUploadDescription
|
|
1023
1031
|
};
|
|
1024
1032
|
const title$3 = "Tải file mẫu";
|
|
1025
1033
|
const description$1 = "Tải file mẫu, điền thông tin sản phẩm và tải lên để hệ thống tự động tạo danh sách sản phẩm cho bạn. Tệp mẫu tiêu chuẩn dùng cho chức năng tạo sản phẩm hàng loạt.\nVui lòng tham khảo bảng hướng dẫn bên dưới để nhập đúng định dạng.";
|
|
@@ -1289,6 +1297,7 @@ const TRANSLATIONS = {
|
|
|
1289
1297
|
};
|
|
1290
1298
|
const translate = (key, name_space = "table", language) => {
|
|
1291
1299
|
const lang = language || useExternalConfigStore.getState().language;
|
|
1300
|
+
console.log("Xin chào", lang);
|
|
1292
1301
|
const splitKey = key == null ? void 0 : key.split(":");
|
|
1293
1302
|
const [namespace, derivedKey] = splitKey.length > 1 ? splitKey : [name_space, key];
|
|
1294
1303
|
const ns = namespace;
|
|
@@ -1309,4 +1318,4 @@ export {
|
|
|
1309
1318
|
translate as t,
|
|
1310
1319
|
useTranslation as u
|
|
1311
1320
|
};
|
|
1312
|
-
//# sourceMappingURL=use-translation-
|
|
1321
|
+
//# sourceMappingURL=use-translation-IKmTNALv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation-
|
|
1
|
+
{"version":3,"file":"use-translation-IKmTNALv.js","sources":["../src/utils/translations.ts","../src/hooks/use-translation.ts"],"sourcesContent":["import TABLE_VI from '@/assets/locales/vi/table.json';\nimport TABLE_EN from '@/assets/locales/en/table.json';\nimport FORM_VI from '@/assets/locales/vi/form.json';\nimport FORM_EN from '@/assets/locales/en/form.json';\nimport BATCH_CREATE_PRODUCT_VI from '@/assets/locales/vi/merchant-batch-create-form.json';\nimport BATCH_CREATE_PRODUCT_EN from '@/assets/locales/en/merchant-batch-create-form.json';\nimport COMMON_VI from '@/assets/locales/vi/common.json';\nimport COMMON_EN from '@/assets/locales/en/common.json';\nimport FILE_VI from '@/assets/locales/vi/file.json';\nimport FILE_VN from '@/assets/locales/en/file.json';\nimport DOWNLOAD_SAMPLE_VI from '@/assets/locales/vi/download-sample.json';\nimport DOWNLOAD_SAMPLE_EN from '@/assets/locales/en/download-sample.json';\nimport DIGISTORE_ID_VI from '@/assets/locales/vi/digistore-id.json';\nimport DIGISTORE_ID_EN from '@/assets/locales/en/digistore-id.json';\n\nexport const TRANSLATIONS = {\n vi: {\n common: COMMON_VI,\n table: TABLE_VI,\n form: FORM_VI,\n 'batch-create-product': BATCH_CREATE_PRODUCT_VI,\n file: FILE_VI,\n 'download-sample': DOWNLOAD_SAMPLE_VI,\n 'digistore-id': DIGISTORE_ID_VI\n },\n en: {\n common: COMMON_EN,\n table: TABLE_EN,\n form: FORM_EN,\n 'batch-create-product': BATCH_CREATE_PRODUCT_EN,\n file: FILE_VN,\n 'download-sample': DOWNLOAD_SAMPLE_EN,\n 'digistore-id': DIGISTORE_ID_EN\n },\n} as const;\n","import useExternalConfigStore from '@/shared/store/use-external-config.store';\nimport { TRANSLATIONS } from '../utils/translations';\n\nexport type Language = keyof typeof TRANSLATIONS;\ntype Namespace = keyof (typeof TRANSLATIONS)[Language];\n\ninterface UseTranslationReturn {\n translate: (key: string) => string;\n language?: Language;\n}\n\nexport const translate = (\n key: string,\n name_space: Namespace = \"table\",\n language?: Language\n): string => {\n const lang = language || useExternalConfigStore.getState().language;\n console.log(\"Xin chào\", lang);\n const splitKey = key?.split(\":\");\n const [namespace, derivedKey] =\n splitKey.length > 1 ? splitKey : [name_space, key];\n\n const ns = namespace as Namespace;\n const translations = TRANSLATIONS[lang][ns] as any;\n const keys = derivedKey.split('.');\n let value: any = translations;\n for (const k of keys) {\n value = value?.[k];\n }\n\n return value ?? key;\n};\n\nexport const useTranslation = (\n defaultNs: Namespace = 'table',\n manualLanguage?: Language\n): UseTranslationReturn => {\n const language: Language =\n manualLanguage || useExternalConfigStore.getState().language;\n const translateWithDefault = (key: string) =>\n translate(key, defaultNs, language);\n\n return { translate: translateWithDefault, language };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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U,IAC1B,SAAS,SAAS,IAAI,WAAW,CAAC,YAAY,GAAG;AAEnD,QAAM,KAAK;AACX,QAAM,eAAe,aAAa,IAAI,EAAE,EAAE;AAC1C,QAAM,OAAO,WAAW,MAAM,GAAG;AACjC,MAAI,QAAa;AACjB,aAAW,KAAK,MAAM;AACpB,YAAQ,+BAAQ;AAAA,EAClB;AAEA,SAAO,wBAAS;AAClB;AAEO,MAAM,iBAAiB,CAC5B,YAAuB,SACvB,mBACyB;AACzB,QAAM,WACJ,kBAAkB,uBAAuB,SAAA,EAAW;AACtD,QAAM,uBAAuB,CAAC,QAC5B,UAAU,KAAK,WAAW,QAAQ;AAEpC,SAAO,EAAE,WAAW,sBAAsB,SAAA;AAC5C;"}
|
|
@@ -262,6 +262,8 @@ export declare const TRANSLATIONS: {
|
|
|
262
262
|
mergeDataTitle: string;
|
|
263
263
|
mergeDescription: string;
|
|
264
264
|
directTaxNote: string;
|
|
265
|
+
cancelUploadTitle: string;
|
|
266
|
+
cancelUploadDescription: string;
|
|
265
267
|
};
|
|
266
268
|
readonly 'download-sample': {
|
|
267
269
|
title: string;
|
|
@@ -619,6 +621,8 @@ export declare const TRANSLATIONS: {
|
|
|
619
621
|
mergeDataTitle: string;
|
|
620
622
|
mergeDescription: string;
|
|
621
623
|
directTaxNote: string;
|
|
624
|
+
cancelUploadTitle: string;
|
|
625
|
+
cancelUploadDescription: string;
|
|
622
626
|
};
|
|
623
627
|
readonly 'download-sample': {
|
|
624
628
|
title: string;
|