@atomsolution/sdk-merchant 1.5.2 → 1.5.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/download-sample.json.d.ts +9 -2
- package/dist/assets/locales/en/file.json.d.ts +2 -1
- package/dist/assets/locales/vi/download-sample.json.d.ts +9 -2
- package/dist/assets/locales/vi/file.json.d.ts +2 -1
- package/dist/batch-product-creation/components/merchant-batch-create-form/field-mapping-popup.d.ts +2 -1
- package/dist/batch-product-creation/components/merchant-batch-create-form/file-upload-tab.d.ts +1 -2
- package/dist/batch-product-creation/components/merchant-batch-create-form/modals/create-product-confirm-modal.d.ts +1 -2
- package/dist/batch-product-creation/components/merchant-batch-create-form/product-info-preview/index.d.ts +1 -2
- package/dist/batch-product-creation.cjs +53 -40
- package/dist/batch-product-creation.cjs.map +1 -1
- package/dist/batch-product-creation.esm.js +53 -40
- package/dist/batch-product-creation.esm.js.map +1 -1
- package/dist/batch-product-creation.js +53 -40
- package/dist/batch-product-creation.js.map +1 -1
- package/dist/components/MerchantBatchCreateForm/index.d.ts +1 -2
- package/dist/digistore.cjs +1 -1
- package/dist/digistore.esm.js +1 -1
- package/dist/digistore.js +1 -1
- package/dist/{dropdownMenuAbsolute-89gAGgGd.cjs → dropdownMenuAbsolute-77lk7HqZ.cjs} +2 -2
- package/dist/{dropdownMenuAbsolute-89gAGgGd.cjs.map → dropdownMenuAbsolute-77lk7HqZ.cjs.map} +1 -1
- package/dist/{dropdownMenuAbsolute-Dw7Pk9Ke.js → dropdownMenuAbsolute-x0WsXrLZ.js} +2 -2
- package/dist/{dropdownMenuAbsolute-Dw7Pk9Ke.js.map → dropdownMenuAbsolute-x0WsXrLZ.js.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/style.css +4 -0
- package/dist/{use-translation-DoUEE54r.js → use-translation-CEr2fmqT.js} +25 -7
- package/dist/{use-translation-DoUEE54r.js.map → use-translation-CEr2fmqT.js.map} +1 -1
- package/dist/{use-translation-T0TNDEqs.cjs → use-translation-CN8MTMJN.cjs} +25 -7
- package/dist/{use-translation-T0TNDEqs.cjs.map → use-translation-CN8MTMJN.cjs.map} +1 -1
- package/dist/utils/translations.d.ts +18 -2
- 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-77lk7HqZ.cjs");
|
|
57
|
+
const useTranslation = require("./use-translation-CN8MTMJN.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-x0WsXrLZ.js";
|
|
55
|
+
import { u as useTranslation } from "./use-translation-CEr2fmqT.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-x0WsXrLZ.js";
|
|
55
|
+
import { u as useTranslation } from "./use-translation-CEr2fmqT.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/style.css
CHANGED
|
@@ -1309,6 +1309,10 @@ video {
|
|
|
1309
1309
|
.bg-black\/30 {
|
|
1310
1310
|
background-color: rgb(0 0 0 / 0.3);
|
|
1311
1311
|
}
|
|
1312
|
+
.bg-blue-200 {
|
|
1313
|
+
--tw-bg-opacity: 1;
|
|
1314
|
+
background-color: rgb(191 219 254 / var(--tw-bg-opacity, 1));
|
|
1315
|
+
}
|
|
1312
1316
|
.bg-blue-50 {
|
|
1313
1317
|
--tw-bg-opacity: 1;
|
|
1314
1318
|
background-color: rgb(239 246 255 / var(--tw-bg-opacity, 1));
|
|
@@ -880,6 +880,7 @@ const close$1 = "Đóng";
|
|
|
880
880
|
const stopUpload$1 = "Ngưng tải lên";
|
|
881
881
|
const mergeDataTitle$1 = "Ghép trường & Kiểm tra dữ liệu";
|
|
882
882
|
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.";
|
|
883
|
+
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>";
|
|
883
884
|
const FILE_VI = {
|
|
884
885
|
fileTooLarge: fileTooLarge$1,
|
|
885
886
|
invalidExtension: invalidExtension$1,
|
|
@@ -914,7 +915,8 @@ const FILE_VI = {
|
|
|
914
915
|
close: close$1,
|
|
915
916
|
stopUpload: stopUpload$1,
|
|
916
917
|
mergeDataTitle: mergeDataTitle$1,
|
|
917
|
-
mergeDescription: mergeDescription$1
|
|
918
|
+
mergeDescription: mergeDescription$1,
|
|
919
|
+
directTaxNote: directTaxNote$1
|
|
918
920
|
};
|
|
919
921
|
const fileTooLarge = "File exceeds the maximum size, please choose another";
|
|
920
922
|
const invalidExtension = "Only .xlsx format is supported";
|
|
@@ -961,6 +963,7 @@ const close = "Close";
|
|
|
961
963
|
const stopUpload = "Stop upload";
|
|
962
964
|
const mergeDataTitle = "Merge Fields & Validate Data";
|
|
963
965
|
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.";
|
|
966
|
+
const directTaxNote = "The system has automatically applied the tax method to all products using the <span class='font-bold'>Direct tax setting method.</span>";
|
|
964
967
|
const FILE_VN = {
|
|
965
968
|
fileTooLarge,
|
|
966
969
|
invalidExtension,
|
|
@@ -995,7 +998,8 @@ const FILE_VN = {
|
|
|
995
998
|
close,
|
|
996
999
|
stopUpload,
|
|
997
1000
|
mergeDataTitle,
|
|
998
|
-
mergeDescription
|
|
1001
|
+
mergeDescription,
|
|
1002
|
+
directTaxNote
|
|
999
1003
|
};
|
|
1000
1004
|
const title$3 = "Tải file mẫu";
|
|
1001
1005
|
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.";
|
|
@@ -1022,8 +1026,15 @@ const fields$1 = {
|
|
|
1022
1026
|
requirementClass: "text-red-500",
|
|
1023
1027
|
example: "BA CHỈ BÒ NƯỚC SỐT THỊT (HÀN QUỐC)"
|
|
1024
1028
|
},
|
|
1025
|
-
|
|
1026
|
-
title: "
|
|
1029
|
+
taxVAT: {
|
|
1030
|
+
title: "Thuế VAT",
|
|
1031
|
+
format: "- Là một trong 04 giá trị: 0, 5, 8, 10",
|
|
1032
|
+
requirement: "Bắt buộc",
|
|
1033
|
+
requirementClass: "text-red-500",
|
|
1034
|
+
example: "Hợp lệ: 0, 5, 8, 10 <br/>Không hợp lệ: Chữ cái, số thập phân, ký tự đặc biệt,..."
|
|
1035
|
+
},
|
|
1036
|
+
priceAfterTax: {
|
|
1037
|
+
title: "Giá bán sau thuế",
|
|
1027
1038
|
format: "- Số nguyên <b>>= 1.000 VND</b>. Không âm, không thập phân.",
|
|
1028
1039
|
requirement: "Bắt buộc",
|
|
1029
1040
|
requirementClass: "text-red-500",
|
|
@@ -1084,8 +1095,15 @@ const fields = {
|
|
|
1084
1095
|
requirementClass: "text-red-500",
|
|
1085
1096
|
example: "BEEF BELLY IN SAUCE (KOREA)"
|
|
1086
1097
|
},
|
|
1087
|
-
|
|
1088
|
-
title: "
|
|
1098
|
+
taxVAT: {
|
|
1099
|
+
title: "Tax VAT",
|
|
1100
|
+
format: "- It is one of four values: 0, 5, 8, 10",
|
|
1101
|
+
requirement: "Required",
|
|
1102
|
+
requirementClass: "text-red-500",
|
|
1103
|
+
example: "Valid: 0, 5, 8, 10 <br/>Invalid: Letters, decimal numbers, special characters,..."
|
|
1104
|
+
},
|
|
1105
|
+
priceAfterTax: {
|
|
1106
|
+
title: "Price After Tax",
|
|
1089
1107
|
format: "- Integer <b>>= 1,000 VND</b>. No negative values, no decimals.",
|
|
1090
1108
|
requirement: "Required",
|
|
1091
1109
|
requirementClass: "text-red-500",
|
|
@@ -1271,4 +1289,4 @@ export {
|
|
|
1271
1289
|
translate as t,
|
|
1272
1290
|
useTranslation as u
|
|
1273
1291
|
};
|
|
1274
|
-
//# sourceMappingURL=use-translation-
|
|
1292
|
+
//# sourceMappingURL=use-translation-CEr2fmqT.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation-
|
|
1
|
+
{"version":3,"file":"use-translation-CEr2fmqT.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\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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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAeO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,EAAA;AAAA,EAElB,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,EAAA;AAEpB;ACvBO,MAAM,YAAY,CACvB,KACA,aAAwB,SACxB,aACW;AACX,QAAM,OAAO,YAAY,uBAAuB,SAAA,EAAW;AAE3D,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,kBAAkB,uBAAuB,SAAA,EAAW;AACtD,QAAM,uBAAuB,CAAC,QAC5B,UAAU,KAAK,WAAW,QAAQ;AAEpC,SAAO,EAAE,WAAW,sBAAsB,SAAA;AAC5C;"}
|
|
@@ -881,6 +881,7 @@ const close$1 = "Đóng";
|
|
|
881
881
|
const stopUpload$1 = "Ngưng tải lên";
|
|
882
882
|
const mergeDataTitle$1 = "Ghép trường & Kiểm tra dữ liệu";
|
|
883
883
|
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.";
|
|
884
|
+
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>";
|
|
884
885
|
const FILE_VI = {
|
|
885
886
|
fileTooLarge: fileTooLarge$1,
|
|
886
887
|
invalidExtension: invalidExtension$1,
|
|
@@ -915,7 +916,8 @@ const FILE_VI = {
|
|
|
915
916
|
close: close$1,
|
|
916
917
|
stopUpload: stopUpload$1,
|
|
917
918
|
mergeDataTitle: mergeDataTitle$1,
|
|
918
|
-
mergeDescription: mergeDescription$1
|
|
919
|
+
mergeDescription: mergeDescription$1,
|
|
920
|
+
directTaxNote: directTaxNote$1
|
|
919
921
|
};
|
|
920
922
|
const fileTooLarge = "File exceeds the maximum size, please choose another";
|
|
921
923
|
const invalidExtension = "Only .xlsx format is supported";
|
|
@@ -962,6 +964,7 @@ const close = "Close";
|
|
|
962
964
|
const stopUpload = "Stop upload";
|
|
963
965
|
const mergeDataTitle = "Merge Fields & Validate Data";
|
|
964
966
|
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.";
|
|
967
|
+
const directTaxNote = "The system has automatically applied the tax method to all products using the <span class='font-bold'>Direct tax setting method.</span>";
|
|
965
968
|
const FILE_VN = {
|
|
966
969
|
fileTooLarge,
|
|
967
970
|
invalidExtension,
|
|
@@ -996,7 +999,8 @@ const FILE_VN = {
|
|
|
996
999
|
close,
|
|
997
1000
|
stopUpload,
|
|
998
1001
|
mergeDataTitle,
|
|
999
|
-
mergeDescription
|
|
1002
|
+
mergeDescription,
|
|
1003
|
+
directTaxNote
|
|
1000
1004
|
};
|
|
1001
1005
|
const title$3 = "Tải file mẫu";
|
|
1002
1006
|
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.";
|
|
@@ -1023,8 +1027,15 @@ const fields$1 = {
|
|
|
1023
1027
|
requirementClass: "text-red-500",
|
|
1024
1028
|
example: "BA CHỈ BÒ NƯỚC SỐT THỊT (HÀN QUỐC)"
|
|
1025
1029
|
},
|
|
1026
|
-
|
|
1027
|
-
title: "
|
|
1030
|
+
taxVAT: {
|
|
1031
|
+
title: "Thuế VAT",
|
|
1032
|
+
format: "- Là một trong 04 giá trị: 0, 5, 8, 10",
|
|
1033
|
+
requirement: "Bắt buộc",
|
|
1034
|
+
requirementClass: "text-red-500",
|
|
1035
|
+
example: "Hợp lệ: 0, 5, 8, 10 <br/>Không hợp lệ: Chữ cái, số thập phân, ký tự đặc biệt,..."
|
|
1036
|
+
},
|
|
1037
|
+
priceAfterTax: {
|
|
1038
|
+
title: "Giá bán sau thuế",
|
|
1028
1039
|
format: "- Số nguyên <b>>= 1.000 VND</b>. Không âm, không thập phân.",
|
|
1029
1040
|
requirement: "Bắt buộc",
|
|
1030
1041
|
requirementClass: "text-red-500",
|
|
@@ -1085,8 +1096,15 @@ const fields = {
|
|
|
1085
1096
|
requirementClass: "text-red-500",
|
|
1086
1097
|
example: "BEEF BELLY IN SAUCE (KOREA)"
|
|
1087
1098
|
},
|
|
1088
|
-
|
|
1089
|
-
title: "
|
|
1099
|
+
taxVAT: {
|
|
1100
|
+
title: "Tax VAT",
|
|
1101
|
+
format: "- It is one of four values: 0, 5, 8, 10",
|
|
1102
|
+
requirement: "Required",
|
|
1103
|
+
requirementClass: "text-red-500",
|
|
1104
|
+
example: "Valid: 0, 5, 8, 10 <br/>Invalid: Letters, decimal numbers, special characters,..."
|
|
1105
|
+
},
|
|
1106
|
+
priceAfterTax: {
|
|
1107
|
+
title: "Price After Tax",
|
|
1090
1108
|
format: "- Integer <b>>= 1,000 VND</b>. No negative values, no decimals.",
|
|
1091
1109
|
requirement: "Required",
|
|
1092
1110
|
requirementClass: "text-red-500",
|
|
@@ -1270,4 +1288,4 @@ const useTranslation = (defaultNs = "table", manualLanguage) => {
|
|
|
1270
1288
|
};
|
|
1271
1289
|
exports.translate = translate;
|
|
1272
1290
|
exports.useTranslation = useTranslation;
|
|
1273
|
-
//# sourceMappingURL=use-translation-
|
|
1291
|
+
//# sourceMappingURL=use-translation-CN8MTMJN.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-translation-
|
|
1
|
+
{"version":3,"file":"use-translation-CN8MTMJN.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\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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;;;;;AAeO,MAAM,eAAe;AAAA,EAC1B,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,EAAA;AAAA,EAElB,IAAI;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,MAAM;AAAA,IACN,wBAAwB;AAAA,IACxB,MAAM;AAAA,IACN,mBAAmB;AAAA,IACnB,gBAAgB;AAAA,EAAA;AAEpB;ACvBO,MAAM,YAAY,CACvB,KACA,aAAwB,SACxB,aACW;AACX,QAAM,OAAO,YAAYA,+CAAuB,SAAA,EAAW;AAE3D,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;;;"}
|
|
@@ -256,6 +256,7 @@ export declare const TRANSLATIONS: {
|
|
|
256
256
|
stopUpload: string;
|
|
257
257
|
mergeDataTitle: string;
|
|
258
258
|
mergeDescription: string;
|
|
259
|
+
directTaxNote: string;
|
|
259
260
|
};
|
|
260
261
|
readonly 'download-sample': {
|
|
261
262
|
title: string;
|
|
@@ -283,7 +284,14 @@ export declare const TRANSLATIONS: {
|
|
|
283
284
|
requirementClass: string;
|
|
284
285
|
example: string;
|
|
285
286
|
};
|
|
286
|
-
|
|
287
|
+
taxVAT: {
|
|
288
|
+
title: string;
|
|
289
|
+
format: string;
|
|
290
|
+
requirement: string;
|
|
291
|
+
requirementClass: string;
|
|
292
|
+
example: string;
|
|
293
|
+
};
|
|
294
|
+
priceAfterTax: {
|
|
287
295
|
title: string;
|
|
288
296
|
format: string;
|
|
289
297
|
requirement: string;
|
|
@@ -600,6 +608,7 @@ export declare const TRANSLATIONS: {
|
|
|
600
608
|
stopUpload: string;
|
|
601
609
|
mergeDataTitle: string;
|
|
602
610
|
mergeDescription: string;
|
|
611
|
+
directTaxNote: string;
|
|
603
612
|
};
|
|
604
613
|
readonly 'download-sample': {
|
|
605
614
|
title: string;
|
|
@@ -627,7 +636,14 @@ export declare const TRANSLATIONS: {
|
|
|
627
636
|
requirementClass: string;
|
|
628
637
|
example: string;
|
|
629
638
|
};
|
|
630
|
-
|
|
639
|
+
taxVAT: {
|
|
640
|
+
title: string;
|
|
641
|
+
format: string;
|
|
642
|
+
requirement: string;
|
|
643
|
+
requirementClass: string;
|
|
644
|
+
example: string;
|
|
645
|
+
};
|
|
646
|
+
priceAfterTax: {
|
|
631
647
|
title: string;
|
|
632
648
|
format: string;
|
|
633
649
|
requirement: string;
|