@atomsolution/sdk-merchant 1.0.0

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 (159) hide show
  1. package/README.md +93 -0
  2. package/dist/App.d.ts +3 -0
  3. package/dist/assets/locales/en/common.json.d.ts +18 -0
  4. package/dist/assets/locales/en/digistore-id.json.d.ts +32 -0
  5. package/dist/assets/locales/en/download-sample.json.d.ts +59 -0
  6. package/dist/assets/locales/en/file.json.d.ts +48 -0
  7. package/dist/assets/locales/en/form.json.d.ts +85 -0
  8. package/dist/assets/locales/en/merchant-batch-create-form.json.d.ts +92 -0
  9. package/dist/assets/locales/en/table.json.d.ts +36 -0
  10. package/dist/assets/locales/vi/common.json.d.ts +18 -0
  11. package/dist/assets/locales/vi/digistore-id.json.d.ts +32 -0
  12. package/dist/assets/locales/vi/download-sample.json.d.ts +59 -0
  13. package/dist/assets/locales/vi/file.json.d.ts +48 -0
  14. package/dist/assets/locales/vi/form.json.d.ts +85 -0
  15. package/dist/assets/locales/vi/merchant-batch-create-form.json.d.ts +92 -0
  16. package/dist/assets/locales/vi/table.json.d.ts +35 -0
  17. package/dist/bvbLogo.png +0 -0
  18. package/dist/components/MerchantBatchCreateForm/DownloadSampleFile.d.ts +1 -0
  19. package/dist/components/MerchantBatchCreateForm/FileUpload/fileUploadButton.d.ts +6 -0
  20. package/dist/components/MerchantBatchCreateForm/FileUpload/sheetDropDown.d.ts +7 -0
  21. package/dist/components/MerchantBatchCreateForm/Layout/Layout.d.ts +12 -0
  22. package/dist/components/MerchantBatchCreateForm/ProductInfoPreview/ProductPreviewTable/CategoryCell.d.ts +8 -0
  23. package/dist/components/MerchantBatchCreateForm/ProductInfoPreview/ProductPreviewTable/UploadImageCell.d.ts +9 -0
  24. package/dist/components/MerchantBatchCreateForm/ProductInfoPreview/ProductPreviewTable/index.d.ts +8 -0
  25. package/dist/components/MerchantBatchCreateForm/ProductInfoPreview/index.d.ts +2 -0
  26. package/dist/components/MerchantBatchCreateForm/fieldMappingPopup.d.ts +8 -0
  27. package/dist/components/MerchantBatchCreateForm/fileUploadTab.d.ts +1 -0
  28. package/dist/components/MerchantBatchCreateForm/hook/useFileValidator.d.ts +8 -0
  29. package/dist/components/MerchantBatchCreateForm/index.d.ts +1 -0
  30. package/dist/components/MerchantBatchCreateForm/mergeAndCheckData.d.ts +1 -0
  31. package/dist/components/MerchantBatchCreateForm/modals/CreateProductConfirmModal.d.ts +10 -0
  32. package/dist/components/MerchantBatchCreateForm/modals/CreateProductSuccessModal.d.ts +12 -0
  33. package/dist/components/MerchantBatchCreateForm/modals/DeleteImageConfirmModal.d.ts +8 -0
  34. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/CategoriesInput/index.d.ts +9 -0
  35. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/DropdownContent/ActionButtons.d.ts +7 -0
  36. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/DropdownContent/AddOptionComponent.d.ts +13 -0
  37. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/DropdownContent/OptionItem/EditOptionComponent.d.ts +14 -0
  38. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/DropdownContent/OptionItem/index.d.ts +18 -0
  39. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/DropdownContent/SelectButton.d.ts +11 -0
  40. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/DropdownContent/index.d.ts +22 -0
  41. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/index.d.ts +4 -0
  42. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/utils/LocalStorage.d.ts +6 -0
  43. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/UnitSelectUI/utils/validation.d.ts +7 -0
  44. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UnitSelect/index.d.ts +10 -0
  45. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/UploadImage.d.ts +12 -0
  46. package/dist/components/MerchantBatchCreateForm/modals/UpdateProductModal/index.d.ts +16 -0
  47. package/dist/components/MerchantBatchCreateForm/store/useMappingStore.d.ts +9 -0
  48. package/dist/components/MerchantBatchCreateForm/store/useUploadStore.d.ts +27 -0
  49. package/dist/components/MerchantBatchCreateForm/utils/download.d.ts +4 -0
  50. package/dist/components/MerchantBatchCreateForm/utils/upload.d.ts +5 -0
  51. package/dist/components/MerchantEdit/AddressFields.d.ts +16 -0
  52. package/dist/components/MerchantEdit/FileUpload.d.ts +13 -0
  53. package/dist/components/MerchantEdit/Header.d.ts +9 -0
  54. package/dist/components/MerchantEdit/UserTypeForm.d.ts +22 -0
  55. package/dist/components/MerchantEdit/index.d.ts +10 -0
  56. package/dist/components/MerchantRegistrationForm/AddressFields.d.ts +16 -0
  57. package/dist/components/MerchantRegistrationForm/FileUpload.d.ts +12 -0
  58. package/dist/components/MerchantRegistrationForm/Header.d.ts +9 -0
  59. package/dist/components/MerchantRegistrationForm/IndustrySelect.d.ts +8 -0
  60. package/dist/components/MerchantRegistrationForm/MerchantRegistrationForm.d.ts +37 -0
  61. package/dist/components/MerchantRegistrationForm/UserTypeForm.d.ts +21 -0
  62. package/dist/components/MerchantTable/index.d.ts +11 -0
  63. package/dist/components/MerchantTable/merchantTableAction.d.ts +8 -0
  64. package/dist/components/MerchantTable/merchantTableFilter.d.ts +16 -0
  65. package/dist/components/MerchantTable/merchantTableHeader.d.ts +6 -0
  66. package/dist/components/MerchantView/AddressFields.d.ts +16 -0
  67. package/dist/components/MerchantView/FileUpload.d.ts +13 -0
  68. package/dist/components/MerchantView/Header.d.ts +9 -0
  69. package/dist/components/MerchantView/UserTypeForm.d.ts +22 -0
  70. package/dist/components/MerchantView/index.d.ts +10 -0
  71. package/dist/components/NewAccountCreate/FormHeader.d.ts +8 -0
  72. package/dist/components/NewAccountCreate/Icon.d.ts +6 -0
  73. package/dist/components/NewAccountCreate/InputField.d.ts +21 -0
  74. package/dist/components/NewAccountCreate/PasswordRequirements.d.ts +6 -0
  75. package/dist/components/NewAccountCreate/RequirementItem.d.ts +6 -0
  76. package/dist/components/NewAccountCreate/SubmitButton.d.ts +11 -0
  77. package/dist/components/NewAccountCreate/index.d.ts +8 -0
  78. package/dist/components/NewAccountCreate/types.d.ts +7 -0
  79. package/dist/components/common/button.d.ts +11 -0
  80. package/dist/components/common/custom-toast/index.d.ts +6 -0
  81. package/dist/components/common/dataTable/dataTable.d.ts +25 -0
  82. package/dist/components/common/dataTable/pagination.d.ts +14 -0
  83. package/dist/components/common/dataTable/statusBadge.d.ts +9 -0
  84. package/dist/components/common/dataTable/tableBody.d.ts +8 -0
  85. package/dist/components/common/dataTable/tableHeader.d.ts +6 -0
  86. package/dist/components/common/dataTable/tableSkeleton.d.ts +7 -0
  87. package/dist/components/common/datePicker.d.ts +10 -0
  88. package/dist/components/common/dropdownMenu.d.ts +27 -0
  89. package/dist/components/common/dropdownMenuAbsolute.d.ts +4 -0
  90. package/dist/components/common/form/error-message.d.ts +14 -0
  91. package/dist/components/common/input.d.ts +3 -0
  92. package/dist/components/common/label.d.ts +6 -0
  93. package/dist/components/common/modals/ConfirmModal.d.ts +13 -0
  94. package/dist/components/common/modals/ExitConfirmGuard.d.ts +11 -0
  95. package/dist/components/common/modals/WrapModal.d.ts +9 -0
  96. package/dist/components/common/number-input.d.ts +5 -0
  97. package/dist/components/ui/button.d.ts +12 -0
  98. package/dist/components/ui/confirmModal.d.ts +10 -0
  99. package/dist/components/ui/error-modal.d.ts +8 -0
  100. package/dist/components/ui/input.d.ts +18 -0
  101. package/dist/components/ui/success-modal.d.ts +8 -0
  102. package/dist/configs/portalAxiosClient.d.ts +2 -0
  103. package/dist/configs/wesapAxiosClient.d.ts +2 -0
  104. package/dist/constants/merchant-batch-create-form.constant.d.ts +4 -0
  105. package/dist/fonts/inter/Inter_18pt-Bold.ttf +0 -0
  106. package/dist/fonts/inter/Inter_18pt-Medium.ttf +0 -0
  107. package/dist/fonts/inter/Inter_18pt-Regular.ttf +0 -0
  108. package/dist/fonts/inter/Inter_18pt-SemiBold.ttf +0 -0
  109. package/dist/hooks/use-address.d.ts +9 -0
  110. package/dist/hooks/use-create-merchant.d.ts +20 -0
  111. package/dist/hooks/use-edit-merchant.d.ts +20 -0
  112. package/dist/hooks/use-media-query.d.ts +1 -0
  113. package/dist/hooks/use-merchant-table.d.ts +13 -0
  114. package/dist/hooks/use-translation.d.ts +10 -0
  115. package/dist/hooks/useClickOutside.d.ts +3 -0
  116. package/dist/hooks/useDebounce.d.ts +1 -0
  117. package/dist/hooks/useMCCList.d.ts +6 -0
  118. package/dist/hooks/useMerchantDetail.d.ts +8 -0
  119. package/dist/hooks/usePasswordValidation.d.ts +9 -0
  120. package/dist/index.cjs +73887 -0
  121. package/dist/index.cjs.map +1 -0
  122. package/dist/index.d.ts +11 -0
  123. package/dist/index.esm.js +73871 -0
  124. package/dist/index.esm.js.map +1 -0
  125. package/dist/main.d.ts +0 -0
  126. package/dist/provider/index.d.ts +5 -0
  127. package/dist/provider/toast-provider.d.ts +2 -0
  128. package/dist/services/MCCList.d.ts +2 -0
  129. package/dist/services/addressService.d.ts +10 -0
  130. package/dist/services/create-products.service.d.ts +6 -0
  131. package/dist/services/createDigistoreAccountService.d.ts +7 -0
  132. package/dist/services/editFormService.d.ts +5 -0
  133. package/dist/services/merchantFormService.d.ts +5 -0
  134. package/dist/services/merchantService.d.ts +3 -0
  135. package/dist/store/use-external-config.store.d.ts +10 -0
  136. package/dist/store/use-portal-api-config.store.d.ts +8 -0
  137. package/dist/store/use-unsaved-changes.store.d.ts +11 -0
  138. package/dist/store/use-wesap-api-config.store.d.ts +10 -0
  139. package/dist/style.css +2971 -0
  140. package/dist/types/MCCList.d.ts +5 -0
  141. package/dist/types/addressType.d.ts +17 -0
  142. package/dist/types/formData.d.ts +58 -0
  143. package/dist/types/global.d.ts +3 -0
  144. package/dist/types/merchant-batch-create-form/product-info-preview.d.ts +45 -0
  145. package/dist/types/merchant-batch-create-form/sheet-product-validation.d.ts +10 -0
  146. package/dist/types/merchant-batch-create-form/table.d.ts +1 -0
  147. package/dist/types/merchant-batch-create-form/unit-select.d.ts +14 -0
  148. package/dist/types/merchantDetail.d.ts +30 -0
  149. package/dist/types/merchantTableData.d.ts +16 -0
  150. package/dist/types/user.d.ts +23 -0
  151. package/dist/utils/commonFunctions.d.ts +2 -0
  152. package/dist/utils/datetime.d.ts +8 -0
  153. package/dist/utils/form.d.ts +1 -0
  154. package/dist/utils/mapLicenseData.d.ts +25 -0
  155. package/dist/utils/merchantTableData.d.ts +3 -0
  156. package/dist/utils/tokenManager.d.ts +2 -0
  157. package/dist/utils/translations.d.ts +685 -0
  158. package/dist/vite.svg +1 -0
  159. package/package.json +90 -0
package/dist/main.d.ts ADDED
File without changes
@@ -0,0 +1,5 @@
1
+ import { default as React } from 'react';
2
+ declare const CommonProvider: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => import("react/jsx-runtime").JSX.Element;
5
+ export default CommonProvider;
@@ -0,0 +1,2 @@
1
+ declare const ToastProvider: () => import("react/jsx-runtime").JSX.Element;
2
+ export default ToastProvider;
@@ -0,0 +1,2 @@
1
+ import { MCCOption } from '../types/MCCList';
2
+ export declare const getMCCList: () => Promise<MCCOption[]>;
@@ -0,0 +1,10 @@
1
+ interface LocationOption {
2
+ id?: string;
3
+ code?: string;
4
+ name: string;
5
+ }
6
+ export declare const getCountries: () => Promise<LocationOption[]>;
7
+ export declare const getCities: (countryCode: string) => Promise<LocationOption[]>;
8
+ export declare const getDistricts: (cityId: string) => Promise<LocationOption[]>;
9
+ export declare const getWards: (districtId: string) => Promise<LocationOption[]>;
10
+ export {};
@@ -0,0 +1,6 @@
1
+ import { ProductPayload, CreatedProductResponse } from '../types/merchant-batch-create-form/product-info-preview';
2
+ import { ValidationProductResponse } from '../types/merchant-batch-create-form/sheet-product-validation';
3
+ export declare const createProductsService: {
4
+ createProducts: (payload: ProductPayload[]) => Promise<CreatedProductResponse>;
5
+ validateProduct: (payload: Pick<ProductPayload, "code" | "name">[]) => Promise<import('axios').AxiosResponse<ValidationProductResponse, any, {}>>;
6
+ };
@@ -0,0 +1,7 @@
1
+ interface ForgotPasswordPayload {
2
+ new_password: string;
3
+ email: string;
4
+ current_password?: string;
5
+ }
6
+ export declare const forgotPassword: (payload: ForgotPasswordPayload) => Promise<any>;
7
+ export {};
@@ -0,0 +1,5 @@
1
+ import { CreateMerchantPayload } from '../types/formData';
2
+ export declare function updateMerchant(merchantId: string, data: CreateMerchantPayload, accessToken?: string): Promise<{
3
+ success: boolean;
4
+ message: string;
5
+ }>;
@@ -0,0 +1,5 @@
1
+ import { CreateMerchantPayload } from '../types/formData';
2
+ export declare function createMerchant(data: CreateMerchantPayload, accessToken?: string): Promise<{
3
+ success: boolean;
4
+ message: string;
5
+ }>;
@@ -0,0 +1,3 @@
1
+ import { MerchantDetail } from '../types/merchantDetail';
2
+ export declare const getMerchantList: (authToken: string, accountType?: string, status?: string, page?: number, pageSize?: number) => Promise<import('axios').AxiosResponse<any, any, {}> | undefined>;
3
+ export declare const getMerchantDetail: (authToken: string, merchantDetailId: string) => Promise<MerchantDetail>;
@@ -0,0 +1,10 @@
1
+ import { Language } from '../hooks/use-translation';
2
+ import { UserInfo } from '../types/user';
3
+ type ExternalConfig = {
4
+ language: Language;
5
+ setLanguage: (language: Language) => void;
6
+ userInfo: UserInfo | null;
7
+ setUserInfo: (userInfo: UserInfo) => void;
8
+ };
9
+ declare const useExternalConfigStore: import('zustand').UseBoundStore<ExternalConfig, import('zustand').StoreApi<ExternalConfig>>;
10
+ export default useExternalConfigStore;
@@ -0,0 +1,8 @@
1
+ type PortalApiConfigState = {
2
+ accessToken: string;
3
+ baseURL: string;
4
+ setAccessToken: (accessToken: string) => void;
5
+ setBaseURL: (baseURL: string) => void;
6
+ };
7
+ declare const usePortalApiConfig: import('zustand').UseBoundStore<PortalApiConfigState, import('zustand').StoreApi<PortalApiConfigState>>;
8
+ export default usePortalApiConfig;
@@ -0,0 +1,11 @@
1
+ type UnsavedChangesState = {
2
+ isDirty: boolean;
3
+ isNavigating: boolean;
4
+ navigationPath: string;
5
+ setIsDirty: (isDirty: boolean) => void;
6
+ setIsNavigating: (isNavigating: boolean) => void;
7
+ setNavigationPath: (navigationPath: string) => void;
8
+ clear: () => void;
9
+ };
10
+ declare const useUnsavedChangesStore: import('zustand').UseBoundStore<UnsavedChangesState, import('zustand').StoreApi<UnsavedChangesState>>;
11
+ export default useUnsavedChangesStore;
@@ -0,0 +1,10 @@
1
+ type WesapApiConfigState = {
2
+ accessToken: string;
3
+ baseURL: string;
4
+ baseURLImage: string;
5
+ setAccessToken: (accessToken: string) => void;
6
+ setBaseURL: (baseURL: string) => void;
7
+ setBaseURLImage: (baseURLImage: string) => void;
8
+ };
9
+ declare const useWesapApiConfig: import('zustand').UseBoundStore<WesapApiConfigState, import('zustand').StoreApi<WesapApiConfigState>>;
10
+ export default useWesapApiConfig;