@atomsolution/sdk-merchant 1.4.1 → 1.5.2

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.
Files changed (46) hide show
  1. package/dist/assets/locales/en/file.json.d.ts +3 -1
  2. package/dist/assets/locales/en/merchant-batch-create-form.json.d.ts +3 -1
  3. package/dist/assets/locales/vi/file.json.d.ts +3 -1
  4. package/dist/assets/locales/vi/merchant-batch-create-form.json.d.ts +3 -1
  5. package/dist/batch-product-creation/components/merchant-batch-create-form/file-upload-tab.d.ts +6 -1
  6. package/dist/batch-product-creation/components/merchant-batch-create-form/index.d.ts +6 -1
  7. package/dist/batch-product-creation/components/merchant-batch-create-form/merge-and-check-data.d.ts +5 -1
  8. package/dist/batch-product-creation/components/merchant-batch-create-form/modals/create-product-confirm-modal.d.ts +3 -1
  9. package/dist/batch-product-creation/components/merchant-batch-create-form/modals/update-product-modal/index.d.ts +2 -1
  10. package/dist/batch-product-creation/components/merchant-batch-create-form/product-info-preview/index.d.ts +5 -1
  11. package/dist/batch-product-creation/components/merchant-batch-create-form/product-info-preview/product-preview-table/index.d.ts +2 -2
  12. package/dist/batch-product-creation/store/use-upload-store.d.ts +3 -1
  13. package/dist/batch-product-creation/types/product-info-preview.d.ts +32 -3
  14. package/dist/batch-product-creation.cjs +700 -541
  15. package/dist/batch-product-creation.cjs.map +1 -1
  16. package/dist/batch-product-creation.esm.js +701 -542
  17. package/dist/batch-product-creation.esm.js.map +1 -1
  18. package/dist/batch-product-creation.js +701 -542
  19. package/dist/batch-product-creation.js.map +1 -1
  20. package/dist/components/MerchantBatchCreateForm/index.d.ts +6 -0
  21. package/dist/digistore.cjs +1 -1
  22. package/dist/digistore.esm.js +1 -1
  23. package/dist/digistore.js +1 -1
  24. package/dist/{dropdownMenuAbsolute-BKV3mzgE.cjs → dropdownMenuAbsolute-89gAGgGd.cjs} +2 -2
  25. package/dist/{dropdownMenuAbsolute-BKV3mzgE.cjs.map → dropdownMenuAbsolute-89gAGgGd.cjs.map} +1 -1
  26. package/dist/{dropdownMenuAbsolute-BreOsoPt.js → dropdownMenuAbsolute-Dw7Pk9Ke.js} +2 -2
  27. package/dist/{dropdownMenuAbsolute-BreOsoPt.js.map → dropdownMenuAbsolute-Dw7Pk9Ke.js.map} +1 -1
  28. package/dist/{index.esm-DPmk5fdS.js → index.esm-CW4gWR7r.js} +3 -3
  29. package/dist/{index.esm-DPmk5fdS.js.map → index.esm-CW4gWR7r.js.map} +1 -1
  30. package/dist/merchant-profile.cjs +2 -2
  31. package/dist/merchant-profile.esm.js +2 -2
  32. package/dist/merchant-profile.js +2 -2
  33. package/dist/permission/index.d.ts +1 -1
  34. package/dist/permission.cjs +65 -0
  35. package/dist/permission.cjs.map +1 -1
  36. package/dist/permission.esm.js +66 -1
  37. package/dist/permission.esm.js.map +1 -1
  38. package/dist/permission.js +66 -1
  39. package/dist/permission.js.map +1 -1
  40. package/dist/style.css +4 -0
  41. package/dist/{use-translation-Df6YK55O.js → use-translation-DoUEE54r.js} +17 -5
  42. package/dist/{use-translation-Df6YK55O.js.map → use-translation-DoUEE54r.js.map} +1 -1
  43. package/dist/{use-translation-OSujcs4v.cjs → use-translation-T0TNDEqs.cjs} +17 -5
  44. package/dist/{use-translation-OSujcs4v.cjs.map → use-translation-T0TNDEqs.cjs.map} +1 -1
  45. package/dist/utils/translations.d.ts +4 -0
  46. package/package.json +1 -1
@@ -18,7 +18,9 @@ declare const _default: {
18
18
  "systemFields": [
19
19
  "Product Code",
20
20
  "Product Name",
21
- "Price",
21
+ "Price before tax",
22
+ "Tax (VAT)",
23
+ "Price after tax",
22
24
  "Unit",
23
25
  "Product Category"
24
26
  ],
@@ -10,7 +10,9 @@ declare const _default: {
10
10
  "no_image": "No Image",
11
11
  "name": "Product Name",
12
12
  "code": "Product Code",
13
- "price_vat": "Price",
13
+ "price_vat": "Price after tax",
14
+ "tax": "Tax VAT",
15
+ "price_without_vat": "Price before tax",
14
16
  "category": "Category",
15
17
  "unit": "Unit",
16
18
  "not_available": "Not available",
@@ -18,7 +18,9 @@ declare const _default: {
18
18
  "systemFields": [
19
19
  "Mã sản phẩm",
20
20
  "Tên sản phẩm",
21
- "Giá",
21
+ "Giá bán trước thuế",
22
+ "Thuế VAT",
23
+ "Giá bán sau thuế",
22
24
  "Đơn vị tính",
23
25
  "Danh mục sản phẩm"
24
26
  ],
@@ -10,7 +10,9 @@ declare const _default: {
10
10
  "no_image": "Không có ảnh",
11
11
  "name": "Tên sản phẩm",
12
12
  "code": "Mã sản phẩm",
13
- "price_vat": "Giá",
13
+ "price_vat": "Giá bán sau thuế",
14
+ "tax": "Thuế VAT",
15
+ "price_without_vat": "Giá bán trước thuế",
14
16
  "category": "Danh mục sản phẩm",
15
17
  "unit": "Đơn vị tính",
16
18
  "not_available": "Chưa có",
@@ -1 +1,6 @@
1
- export default function FileUploadTab(): import("react/jsx-runtime").JSX.Element;
1
+ type FileUploadTabProps = {
2
+ taxDeductionMethod: "direct" | "credit";
3
+ directTax?: number;
4
+ };
5
+ export default function FileUploadTab({ taxDeductionMethod, directTax, }: FileUploadTabProps): import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1 +1,6 @@
1
- export declare const MerchantBatchCreateForm: ({}: {}) => import("react/jsx-runtime").JSX.Element;
1
+ type MerchantBatchCreateFormProps = {
2
+ taxDeductionMethod?: "direct" | "credit";
3
+ directTax?: number;
4
+ };
5
+ export declare const MerchantBatchCreateForm: ({ taxDeductionMethod, directTax, }: MerchantBatchCreateFormProps) => import("react/jsx-runtime").JSX.Element;
6
+ export {};
@@ -1 +1,5 @@
1
- export default function MergeAndCheckData(): import("react/jsx-runtime").JSX.Element;
1
+ type Props = {
2
+ taxDeductionMethod: "direct" | "credit";
3
+ };
4
+ export default function MergeAndCheckData({ taxDeductionMethod }: Props): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -5,6 +5,8 @@ type Props = {
5
5
  open: boolean;
6
6
  onClose: () => void;
7
7
  onSuccess: (data: CreatedProductResponse) => void;
8
+ taxDeductionMethod: "direct" | "credit";
9
+ directTax?: number;
8
10
  };
9
- declare const CreateProductConfirmModal: ({ checkedProducts, numCheckedProducts, open, onClose, onSuccess, }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ declare const CreateProductConfirmModal: ({ checkedProducts, numCheckedProducts, open, onClose, onSuccess, taxDeductionMethod, directTax, }: Props) => import("react/jsx-runtime").JSX.Element;
10
12
  export default CreateProductConfirmModal;
@@ -11,6 +11,7 @@ type Props = {
11
11
  }) | null;
12
12
  productsTableData: ProductPreview[];
13
13
  setProductsTableData: React.Dispatch<React.SetStateAction<ProductPreview[]>>;
14
+ taxDeductionMethod: "direct" | "credit";
14
15
  };
15
- declare const UpdateProductModal: ({ product, disable, open, onClose, productsTableData, setProductsTableData, }: Props) => import("react/jsx-runtime").JSX.Element;
16
+ declare const UpdateProductModal: ({ product, disable, open, onClose, productsTableData, setProductsTableData, taxDeductionMethod, }: Props) => import("react/jsx-runtime").JSX.Element;
16
17
  export default UpdateProductModal;
@@ -1,2 +1,6 @@
1
- declare const ProductInfoPreview: () => import("react/jsx-runtime").JSX.Element;
1
+ type Props = {
2
+ taxDeductionMethod: "direct" | "credit";
3
+ directTax?: number;
4
+ };
5
+ declare const ProductInfoPreview: ({ taxDeductionMethod, directTax }: Props) => import("react/jsx-runtime").JSX.Element;
2
6
  export default ProductInfoPreview;
@@ -1,8 +1,8 @@
1
1
  import { ProductPreview } from '../../../../types/product-info-preview';
2
- import { default as React } from 'react';
3
2
  type Props = {
4
3
  checkedProducts: ProductPreview[];
5
4
  setCheckedProducts: React.Dispatch<React.SetStateAction<ProductPreview[]>>;
5
+ taxDeductionMethod: "direct" | "credit";
6
6
  };
7
- declare const ProductPreviewTable: ({ checkedProducts, setCheckedProducts, }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ declare const ProductPreviewTable: ({ checkedProducts, setCheckedProducts, taxDeductionMethod, }: Props) => import("react/jsx-runtime").JSX.Element;
8
8
  export default ProductPreviewTable;
@@ -1,7 +1,9 @@
1
1
  export interface ProductPreview {
2
2
  name: string;
3
3
  code: string;
4
- price: number | null;
4
+ priceBeforeTax: number;
5
+ tax: number;
6
+ priceAfterTax: number | null;
5
7
  category: string;
6
8
  unit: string;
7
9
  note: string;
@@ -1,21 +1,48 @@
1
- import * as z from 'zod';
1
+ import * as z from "zod";
2
2
  export declare const ProductPreviewSchema: z.ZodObject<{
3
3
  img: z.ZodUnion<[z.ZodURL, z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"">, z.ZodNull]>>]>;
4
4
  name: z.ZodString;
5
5
  unit: z.ZodString;
6
6
  code: z.ZodString;
7
- price: z.ZodNumber;
7
+ priceBeforeTax: z.ZodOptional<z.ZodNumber>;
8
+ tax: z.ZodNumber;
9
+ priceAfterTax: z.ZodNumber;
8
10
  category: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
9
11
  unitOfMesure: z.ZodOptional<z.ZodString>;
10
12
  note: z.ZodOptional<z.ZodString>;
11
13
  }, z.core.$strip>;
14
+ export declare const createProductPreviewSchema: (method: "direct" | "credit") => z.ZodObject<{
15
+ img: z.ZodUnion<[z.ZodURL, z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"">, z.ZodNull]>>]>;
16
+ name: z.ZodString;
17
+ unit: z.ZodString;
18
+ code: z.ZodString;
19
+ priceBeforeTax: z.ZodOptional<z.ZodNumber>;
20
+ tax: z.ZodNumber;
21
+ priceAfterTax: z.ZodNumber;
22
+ category: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
23
+ unitOfMesure: z.ZodOptional<z.ZodString>;
24
+ note: z.ZodOptional<z.ZodString>;
25
+ }, z.core.$strip> | z.ZodObject<{
26
+ img: z.ZodUnion<[z.ZodURL, z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"">, z.ZodNull]>>]>;
27
+ name: z.ZodString;
28
+ unit: z.ZodString;
29
+ code: z.ZodString;
30
+ priceBeforeTax: z.ZodOptional<z.ZodNumber>;
31
+ priceAfterTax: z.ZodNumber;
32
+ category: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
33
+ unitOfMesure: z.ZodOptional<z.ZodString>;
34
+ note: z.ZodOptional<z.ZodString>;
35
+ tax: z.ZodAny;
36
+ }, z.core.$strip>;
12
37
  export declare const ProductSchema: z.ZodObject<{
13
38
  id: z.ZodString;
14
39
  img: z.ZodUnion<[z.ZodURL, z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"">, z.ZodNull]>>]>;
15
40
  name: z.ZodString;
16
41
  unit: z.ZodString;
17
42
  code: z.ZodString;
18
- price: z.ZodNumber;
43
+ priceBeforeTax: z.ZodOptional<z.ZodNumber>;
44
+ tax: z.ZodNumber;
45
+ priceAfterTax: z.ZodNumber;
19
46
  category: z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodLiteral<"">]>>;
20
47
  unitOfMesure: z.ZodOptional<z.ZodString>;
21
48
  note: z.ZodOptional<z.ZodString>;
@@ -29,6 +56,8 @@ export type ProductPayload = {
29
56
  code: string;
30
57
  name: string;
31
58
  price: number;
59
+ priceBeforeTax?: number;
60
+ priceAfterTax?: number;
32
61
  img: string;
33
62
  cost: number;
34
63
  tax: number;