@omniumretail/shared-resources 0.0.24 → 0.0.25

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 (185) hide show
  1. package/.eslintrc.json +31 -31
  2. package/README.md +44 -44
  3. package/dist/bundle.js +259 -193
  4. package/dist/types/components/BottomDrawer/index.d.ts +9 -9
  5. package/dist/types/components/Button/index.d.ts +2 -2
  6. package/dist/types/components/Footer/index.d.ts +3 -3
  7. package/dist/types/components/Form/FormInputField/index.d.ts +8 -8
  8. package/dist/types/components/Form/FormSelectField/index.d.ts +9 -9
  9. package/dist/types/components/Form/index.d.ts +2 -2
  10. package/dist/types/components/Header/index.d.ts +4 -4
  11. package/dist/types/components/Link/index.d.ts +6 -6
  12. package/dist/types/components/Navigation/index.d.ts +8 -8
  13. package/dist/types/components/Page/index.d.ts +13 -13
  14. package/dist/types/components/SharedContextProvider/index.d.ts +7 -7
  15. package/dist/types/components/index.d.ts +9 -9
  16. package/dist/types/constants/Icons.d.ts +15 -14
  17. package/dist/types/constants/QueryClient.d.ts +2 -2
  18. package/dist/types/constants/index.d.ts +2 -2
  19. package/dist/types/contexts/useStore.d.ts +8 -8
  20. package/dist/types/hooks/activateEvaluationCycleQuery.hook.d.ts +2 -2
  21. package/dist/types/hooks/activateQuestionnaireQuery.hook.d.ts +2 -2
  22. package/dist/types/hooks/cancelEvaluationCycleQuery.hook.d.ts +2 -2
  23. package/dist/types/hooks/cancelQuestionnaireQuery.hook.d.ts +2 -2
  24. package/dist/types/hooks/deleteEvaluationCycleQuery.hook.d.ts +2 -2
  25. package/dist/types/hooks/deleteQuestionnaireQuery.hook.d.ts +2 -2
  26. package/dist/types/hooks/duplicateQuestionnaireQuery.hook.d.ts +2 -2
  27. package/dist/types/hooks/finishEvaluationCycleQuery.hook.d.ts +2 -2
  28. package/dist/types/hooks/finishQuestionnaireQuery.hook.d.ts +2 -2
  29. package/dist/types/hooks/index.d.ts +42 -39
  30. package/dist/types/hooks/useAllRolesQuery.hook.d.ts +11 -11
  31. package/dist/types/hooks/useAllStoreQuery.hook.d.ts +13 -11
  32. package/dist/types/hooks/useAnalyticsEvaluationCyclesQuery.hook.d.ts +7 -7
  33. package/dist/types/hooks/useAnalyticsQuestionsQuery.hook.d.ts +9 -9
  34. package/dist/types/hooks/useAnalyticsSideBarQuery.hook.d.ts +7 -7
  35. package/dist/types/hooks/useAnalyticsUserIdQuery.hook.d.ts +9 -9
  36. package/dist/types/hooks/useAnalyticsUserQuery.hook.d.ts +9 -9
  37. package/dist/types/hooks/useAnswerIdQuery.hook.d.ts +2 -2
  38. package/dist/types/hooks/useAnswerMutateQuery.hook.d.ts +9 -9
  39. package/dist/types/hooks/useAnswersUserSupervisorQuery.hook.d.ts +7 -7
  40. package/dist/types/hooks/useApplicationDataQuery.hook.d.ts +2 -2
  41. package/dist/types/hooks/useContractStatesQuery.hook.d.ts +7 -7
  42. package/dist/types/hooks/useCountriesQuery.hook.d.ts +7 -7
  43. package/dist/types/hooks/useCustomersQuery.hook.d.ts +138 -138
  44. package/dist/types/hooks/useEvaluationCycleIdQuery.hook.d.ts +2 -2
  45. package/dist/types/hooks/useEvaluationCycleMutateQuery.hook.d.ts +2 -2
  46. package/dist/types/hooks/useEvaluationCycleQuery.hook.d.ts +8 -8
  47. package/dist/types/hooks/useJobTitlesQuery.hook.d.ts +7 -7
  48. package/dist/types/hooks/useProductHierarchies.hook.d.ts +7 -7
  49. package/dist/types/hooks/useProductsQuery.hook.d.ts +138 -138
  50. package/dist/types/hooks/useQuestionnaireIdQuery.hook.d.ts +2 -2
  51. package/dist/types/hooks/useQuestionnaireMutateQuery.hook.d.ts +2 -2
  52. package/dist/types/hooks/useQuestionnaireQuery.hook.d.ts +9 -9
  53. package/dist/types/hooks/useSingleUserIdMutateQuery.hook.d.ts +2 -2
  54. package/dist/types/hooks/useSingleUserIdQuery.hook.d.ts +2 -2
  55. package/dist/types/hooks/useSingleUserResetPassword.hook.d.ts +2 -0
  56. package/dist/types/hooks/useStoreQuery.d.ts +7 -7
  57. package/dist/types/hooks/useTermNotificationQuery.hook.d.ts +2 -2
  58. package/dist/types/hooks/useUserBlockQuery.hook.d.ts +2 -2
  59. package/dist/types/hooks/useUserEmailVerifQuery.hook.d.ts +2 -2
  60. package/dist/types/hooks/useUserIdQuery.hook.d.ts +2 -2
  61. package/dist/types/hooks/useUserListQuery.hook.d.ts +8 -8
  62. package/dist/types/hooks/useUserQuery.hook.d.ts +10 -10
  63. package/dist/types/index.d.ts +7 -7
  64. package/dist/types/interfaces/AnalyticsEvaluationCycle.d.ts +19 -19
  65. package/dist/types/interfaces/AnalyticsUserId.d.ts +11 -11
  66. package/dist/types/interfaces/Answer.d.ts +12 -12
  67. package/dist/types/interfaces/AnswersUserSupervisor.d.ts +42 -42
  68. package/dist/types/interfaces/ApplicationsByCategory.d.ts +16 -16
  69. package/dist/types/interfaces/Brand.d.ts +4 -4
  70. package/dist/types/interfaces/Cart.d.ts +10 -9
  71. package/dist/types/interfaces/Configuration.d.ts +6 -6
  72. package/dist/types/interfaces/ContractStates.d.ts +7 -7
  73. package/dist/types/interfaces/Countries.d.ts +10 -10
  74. package/dist/types/interfaces/Customer.d.ts +21 -21
  75. package/dist/types/interfaces/EvaluationCycle.d.ts +32 -32
  76. package/dist/types/interfaces/JobTitles.d.ts +7 -7
  77. package/dist/types/interfaces/Product.d.ts +15 -16
  78. package/dist/types/interfaces/ProductsHierarchies.d.ts +5 -5
  79. package/dist/types/interfaces/Questionnaire.d.ts +36 -36
  80. package/dist/types/interfaces/ResponseList.d.ts +5 -5
  81. package/dist/types/interfaces/Roles.d.ts +5 -5
  82. package/dist/types/interfaces/Store.d.ts +7 -7
  83. package/dist/types/interfaces/TermNotification.d.ts +5 -5
  84. package/dist/types/interfaces/User.d.ts +65 -65
  85. package/dist/types/interfaces/index.d.ts +21 -19
  86. package/dist/types/services/ApiService/index.d.ts +9 -9
  87. package/dist/types/services/InitService/index.d.ts +3 -3
  88. package/dist/types/services/index.d.ts +2 -2
  89. package/package.json +54 -54
  90. package/src/assets/sitoo.svg +9 -9
  91. package/src/components/BottomDrawer/index.tsx +32 -32
  92. package/src/components/BottomDrawer/styles.module.scss +59 -59
  93. package/src/components/Button/index.tsx +7 -7
  94. package/src/components/Footer/index.tsx +44 -44
  95. package/src/components/Footer/styles.module.scss +33 -33
  96. package/src/components/Form/FormInputField/index.tsx +18 -18
  97. package/src/components/Form/FormSelectField/index.tsx +16 -16
  98. package/src/components/Form/index.ts +2 -2
  99. package/src/components/Header/index.tsx +20 -20
  100. package/src/components/Header/styles.module.scss +16 -16
  101. package/src/components/Link/index.tsx +21 -21
  102. package/src/components/Link/styles.module.scss +24 -24
  103. package/src/components/Navigation/index.tsx +30 -30
  104. package/src/components/Navigation/styles.module.scss +34 -34
  105. package/src/components/Page/index.tsx +35 -35
  106. package/src/components/Page/styles.module.scss +26 -26
  107. package/src/components/SharedContextProvider/index.tsx +30 -30
  108. package/src/components/index.ts +9 -9
  109. package/src/constants/Icons.ts +23 -20
  110. package/src/constants/QueryClient.ts +10 -10
  111. package/src/constants/index.ts +2 -2
  112. package/src/contexts/useStore.tsx +20 -20
  113. package/src/global.scss +124 -124
  114. package/src/hooks/activateEvaluationCycleQuery.hook.ts +15 -15
  115. package/src/hooks/activateQuestionnaireQuery.hook.ts +15 -15
  116. package/src/hooks/cancelEvaluationCycleQuery.hook.ts +15 -15
  117. package/src/hooks/cancelQuestionnaireQuery.hook.ts +15 -15
  118. package/src/hooks/deleteEvaluationCycleQuery.hook.ts +15 -15
  119. package/src/hooks/deleteQuestionnaireQuery.hook.ts +15 -15
  120. package/src/hooks/duplicateQuestionnaireQuery.hook.ts +14 -14
  121. package/src/hooks/finishEvaluationCycleQuery.hook.ts +15 -15
  122. package/src/hooks/finishQuestionnaireQuery.hook.ts +15 -15
  123. package/src/hooks/index.ts +42 -41
  124. package/src/hooks/useAllRolesQuery.hook.ts +21 -21
  125. package/src/hooks/useAllStoreQuery.hook.ts +39 -27
  126. package/src/hooks/useAnalyticsEvaluationCyclesQuery.hook.ts +21 -21
  127. package/src/hooks/useAnalyticsQuestionsQuery.hook.ts +22 -22
  128. package/src/hooks/useAnalyticsSideBarQuery.hook.ts +21 -21
  129. package/src/hooks/useAnalyticsUserIdQuery.hook.ts +24 -24
  130. package/src/hooks/useAnalyticsUserQuery.hook.ts +27 -27
  131. package/src/hooks/useAnswerIdQuery.hook.ts +13 -13
  132. package/src/hooks/useAnswerMutateQuery.hook.ts +31 -31
  133. package/src/hooks/useAnswersUserSupervisorQuery.hook.tsx +21 -21
  134. package/src/hooks/useApplicationDataQuery.hook.ts +10 -10
  135. package/src/hooks/useContractStatesQuery.hook.ts +14 -14
  136. package/src/hooks/useCountriesQuery.hook.ts +14 -14
  137. package/src/hooks/useCustomersQuery.hook.ts +30 -30
  138. package/src/hooks/useEvaluationCycleIdQuery.hook.ts +13 -13
  139. package/src/hooks/useEvaluationCycleMutateQuery.hook.ts +17 -17
  140. package/src/hooks/useEvaluationCycleQuery.hook.ts +25 -25
  141. package/src/hooks/useJobTitlesQuery.hook.ts +14 -14
  142. package/src/hooks/useProductHierarchies.hook.ts +12 -12
  143. package/src/hooks/useProductsQuery.hook.ts +30 -30
  144. package/src/hooks/useQuestionnaireIdQuery.hook.ts +13 -13
  145. package/src/hooks/useQuestionnaireMutateQuery.hook.ts +17 -17
  146. package/src/hooks/useQuestionnaireQuery.hook.ts +27 -27
  147. package/src/hooks/useSingleUserIdMutateQuery.hook.ts +18 -18
  148. package/src/hooks/useSingleUserIdQuery.hook.ts +14 -14
  149. package/src/hooks/useSingleUserResetPassword.hook.ts +15 -0
  150. package/src/hooks/useStoreQuery.ts +13 -13
  151. package/src/hooks/useTermNotificationQuery.hook.ts +11 -11
  152. package/src/hooks/useUserBlockQuery.hook.ts +15 -15
  153. package/src/hooks/useUserEmailVerifQuery.hook.ts +15 -15
  154. package/src/hooks/useUserIdQuery.hook.ts +14 -14
  155. package/src/hooks/useUserListQuery.hook.ts +25 -25
  156. package/src/hooks/useUserQuery.hook.ts +29 -29
  157. package/src/index.ts +9 -9
  158. package/src/interfaces/AnalyticsEvaluationCycle.ts +24 -24
  159. package/src/interfaces/AnalyticsUserId.ts +12 -12
  160. package/src/interfaces/Answer.ts +13 -13
  161. package/src/interfaces/AnswersUserSupervisor.ts +45 -45
  162. package/src/interfaces/ApplicationsByCategory.ts +19 -19
  163. package/src/interfaces/Brand.ts +4 -4
  164. package/src/interfaces/Cart.ts +13 -12
  165. package/src/interfaces/Configuration.ts +7 -7
  166. package/src/interfaces/ContractStates.ts +7 -7
  167. package/src/interfaces/Countries.ts +10 -10
  168. package/src/interfaces/Customer.ts +23 -23
  169. package/src/interfaces/EvaluationCycle.ts +32 -32
  170. package/src/interfaces/JobTitles.ts +7 -7
  171. package/src/interfaces/Product.ts +17 -18
  172. package/src/interfaces/ProductsHierarchies.ts +6 -6
  173. package/src/interfaces/Questionnaire.ts +38 -38
  174. package/src/interfaces/ResponseList.ts +6 -6
  175. package/src/interfaces/Roles.ts +5 -5
  176. package/src/interfaces/Store.ts +8 -8
  177. package/src/interfaces/TermNotification.ts +5 -5
  178. package/src/interfaces/User.ts +69 -69
  179. package/src/interfaces/index.ts +21 -21
  180. package/src/services/ApiService/index.ts +125 -125
  181. package/src/services/InitService/index.ts +7 -7
  182. package/src/services/index.ts +3 -3
  183. package/src/types/Global.d.ts +4 -4
  184. package/tsconfig.json +27 -27
  185. package/webpack.config.js +48 -48
@@ -1,125 +1,125 @@
1
- import 'whatwg-fetch';
2
- import { appConfig } from "../InitService";
3
-
4
- export const get = <T>(path: string, params?: Record<string, unknown>): Promise<T> => {
5
- return buildApiRequest<T>(`${path}?${buildParams(params || {})}`, 'GET');
6
- }
7
-
8
- export const getAuth0 = <T>(path: string, params?: Record<string, unknown>): Promise<T> => {
9
- return buildApiRequestForAuth0<T>(`${path}?${buildParams(params || {})}`, 'GET');
10
- }
11
-
12
- export const putAuth0 = <T>(path: string, params?: Record<string, unknown>, body?: unknown, bodyType?: string): Promise<T> => {
13
- return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'PUT', body, bodyType);
14
- }
15
-
16
- export const postAuth0 = <T>(path: string, params?: Record<string, unknown>, body?: unknown,bodyType?: string): Promise<T> => {
17
- return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'POST', body, bodyType);
18
- }
19
-
20
- export const toDeleteAuth0 = <T>(path: string, params?: Record<string, unknown>, body?: unknown): Promise<T> => {
21
- return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'DELETE', body);
22
- }
23
-
24
- export const post = <T>(path: string, body?: unknown): Promise<T> => {
25
- return buildApiRequest<T>(path, 'POST', body);
26
- }
27
-
28
- export const put = <T>(path: string, body?: unknown): Promise<T> => {
29
- return buildApiRequest<T>(path, 'PUT', body);
30
- }
31
-
32
- export const toDelete = <T>(path: string, body?: unknown): Promise<T> => {
33
- return buildApiRequest<T>(path, 'DELETE', body);
34
- }
35
-
36
-
37
- const buildParams = (params: Record<string, unknown>): string => {
38
- return Object.entries(params).reduce((c, [key, value]) => [...c, `${key}=${value}`], [] as string[]).join('&');
39
- }
40
-
41
- /**
42
- * Build the api request
43
- * @param path
44
- * @param method
45
- * @param data
46
- * @param bodyType
47
- * @returns
48
- */
49
- const buildApiRequest = <T>(path: string, method = 'GET', data?: unknown, bodyType?: string): Promise<T> => {
50
- const requestUri = buildPath(path);
51
-
52
- const headers: HeadersInit = {
53
- Authorization: appConfig.token,
54
- };
55
-
56
- let body: FormData | string | undefined | any;
57
-
58
- if (['POST', 'PUT'].includes(method)) {
59
- if (bodyType === 'formdata') {
60
- // Não é necessário dar set do contentType porque o fetch faz isso por nós quando usamos o fetch
61
- body = data;
62
- } else {
63
- headers['Content-Type'] = 'application/json';
64
- body = JSON.stringify(data);
65
- }
66
- }
67
-
68
- return fetch(requestUri, {
69
- method,
70
- headers,
71
- body,
72
- }).then((response) => {
73
- if (response.status >= 200 && response.status <= 300) {
74
- return response.json();
75
- }
76
- return response.json().then((data) => Promise.reject(data));
77
- });
78
- }
79
-
80
- /**
81
- * Build the api request with auth
82
- * @param path
83
- * @param method
84
- * @param data
85
- * @returns
86
- */
87
- const buildApiRequestForAuth0 = <T>(path: string, method = 'GET', data?: unknown, bodyType?: string): Promise<T> => {
88
- const requestUri = buildPath(path);
89
-
90
- const headers: HeadersInit = {
91
- Authorization: `Bearer ${appConfig.tokenAuth0}`,
92
- };
93
-
94
- let body: FormData | string | undefined | any;
95
-
96
- if (['POST', 'PUT'].includes(method)) {
97
- if (bodyType === 'formdata') {
98
- // Não é necessário dar set do contentType porque o fetch faz isso por nós quando usamos o fetch
99
- body = data;
100
- } else {
101
- headers['Content-Type'] = 'application/json';
102
- body = JSON.stringify(data);
103
- }
104
- }
105
-
106
- return fetch(requestUri, {
107
- method,
108
- headers,
109
- body,
110
- }).then((response) => {
111
- if (response.status >= 200 && response.status <= 300) {
112
- return response.json();
113
- }
114
- return response.json().then((data) => Promise.reject(data));
115
- });
116
- }
117
-
118
- /**
119
- * Builds the path to access the api
120
- * @param path
121
- * @returns
122
- */
123
- const buildPath = (path: string): string => {
124
- return `${appConfig.ApiHost}${appConfig.ApiPath}${path}`;
125
- };
1
+ import 'whatwg-fetch';
2
+ import { appConfig } from "../InitService";
3
+
4
+ export const get = <T>(path: string, params?: Record<string, unknown>): Promise<T> => {
5
+ return buildApiRequest<T>(`${path}?${buildParams(params || {})}`, 'GET');
6
+ }
7
+
8
+ export const getAuth0 = <T>(path: string, params?: Record<string, unknown>): Promise<T> => {
9
+ return buildApiRequestForAuth0<T>(`${path}?${buildParams(params || {})}`, 'GET');
10
+ }
11
+
12
+ export const putAuth0 = <T>(path: string, params?: Record<string, unknown>, body?: unknown, bodyType?: string): Promise<T> => {
13
+ return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'PUT', body, bodyType);
14
+ }
15
+
16
+ export const postAuth0 = <T>(path: string, params?: Record<string, unknown>, body?: unknown,bodyType?: string): Promise<T> => {
17
+ return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'POST', body, bodyType);
18
+ }
19
+
20
+ export const toDeleteAuth0 = <T>(path: string, params?: Record<string, unknown>, body?: unknown): Promise<T> => {
21
+ return buildApiRequestForAuth0<T>(`${path}${buildParams(params || {})}`, 'DELETE', body);
22
+ }
23
+
24
+ export const post = <T>(path: string, body?: unknown): Promise<T> => {
25
+ return buildApiRequest<T>(path, 'POST', body);
26
+ }
27
+
28
+ export const put = <T>(path: string, body?: unknown): Promise<T> => {
29
+ return buildApiRequest<T>(path, 'PUT', body);
30
+ }
31
+
32
+ export const toDelete = <T>(path: string, body?: unknown): Promise<T> => {
33
+ return buildApiRequest<T>(path, 'DELETE', body);
34
+ }
35
+
36
+
37
+ const buildParams = (params: Record<string, unknown>): string => {
38
+ return Object.entries(params).reduce((c, [key, value]) => [...c, `${key}=${value}`], [] as string[]).join('&');
39
+ }
40
+
41
+ /**
42
+ * Build the api request
43
+ * @param path
44
+ * @param method
45
+ * @param data
46
+ * @param bodyType
47
+ * @returns
48
+ */
49
+ const buildApiRequest = <T>(path: string, method = 'GET', data?: unknown, bodyType?: string): Promise<T> => {
50
+ const requestUri = buildPath(path);
51
+
52
+ const headers: HeadersInit = {
53
+ Authorization: appConfig.token,
54
+ };
55
+
56
+ let body: FormData | string | undefined | any;
57
+
58
+ if (['POST', 'PUT'].includes(method)) {
59
+ if (bodyType === 'formdata') {
60
+ // Não é necessário dar set do contentType porque o fetch faz isso por nós quando usamos o fetch
61
+ body = data;
62
+ } else {
63
+ headers['Content-Type'] = 'application/json';
64
+ body = JSON.stringify(data);
65
+ }
66
+ }
67
+
68
+ return fetch(requestUri, {
69
+ method,
70
+ headers,
71
+ body,
72
+ }).then((response) => {
73
+ if (response.status >= 200 && response.status <= 300) {
74
+ return response.json();
75
+ }
76
+ return response.json().then((data) => Promise.reject(data));
77
+ });
78
+ }
79
+
80
+ /**
81
+ * Build the api request with auth
82
+ * @param path
83
+ * @param method
84
+ * @param data
85
+ * @returns
86
+ */
87
+ const buildApiRequestForAuth0 = <T>(path: string, method = 'GET', data?: unknown, bodyType?: string): Promise<T> => {
88
+ const requestUri = buildPath(path);
89
+
90
+ const headers: HeadersInit = {
91
+ Authorization: `Bearer ${appConfig.tokenAuth0}`,
92
+ };
93
+
94
+ let body: FormData | string | undefined | any;
95
+
96
+ if (['POST', 'PUT'].includes(method)) {
97
+ if (bodyType === 'formdata') {
98
+ // Não é necessário dar set do contentType porque o fetch faz isso por nós quando usamos o fetch
99
+ body = data;
100
+ } else {
101
+ headers['Content-Type'] = 'application/json';
102
+ body = JSON.stringify(data);
103
+ }
104
+ }
105
+
106
+ return fetch(requestUri, {
107
+ method,
108
+ headers,
109
+ body,
110
+ }).then((response) => {
111
+ if (response.status >= 200 && response.status <= 300) {
112
+ return response.json();
113
+ }
114
+ return response.json().then((data) => Promise.reject(data));
115
+ });
116
+ }
117
+
118
+ /**
119
+ * Builds the path to access the api
120
+ * @param path
121
+ * @returns
122
+ */
123
+ const buildPath = (path: string): string => {
124
+ return `${appConfig.ApiHost}${appConfig.ApiPath}${path}`;
125
+ };
@@ -1,7 +1,7 @@
1
- import { Configuration } from "../../interfaces/Configuration";
2
-
3
- export const appConfig: Partial<Configuration> = {};
4
-
5
- export const initService = (configuration: Configuration) => {
6
- Object.assign(appConfig, configuration);
7
- }
1
+ import { Configuration } from "../../interfaces/Configuration";
2
+
3
+ export const appConfig: Partial<Configuration> = {};
4
+
5
+ export const initService = (configuration: Configuration) => {
6
+ Object.assign(appConfig, configuration);
7
+ }
@@ -1,3 +1,3 @@
1
-
2
- export * from './InitService';
3
- export * from './ApiService';
1
+
2
+ export * from './InitService';
3
+ export * from './ApiService';
@@ -1,4 +1,4 @@
1
- declare module "*.module.css";
2
- declare module "*.module.scss";
3
- declare module "*.png";
4
- declare module "*.svg";
1
+ declare module "*.module.css";
2
+ declare module "*.module.scss";
3
+ declare module "*.png";
4
+ declare module "*.svg";
package/tsconfig.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es5",
4
- "outDir": "./dist",
5
- "lib": ["dom", "dom.iterable", "esnext"],
6
- "allowJs": true,
7
- "skipLibCheck": true,
8
- "esModuleInterop": true,
9
- "allowSyntheticDefaultImports": true,
10
- "strict": false,
11
- "strictNullChecks": false,
12
- "forceConsistentCasingInFileNames": true,
13
- "noFallthroughCasesInSwitch": true,
14
- "module": "esnext",
15
- "moduleResolution": "node",
16
- "declaration": true,
17
- "declarationDir": "./dist/types",
18
- "resolveJsonModule": true,
19
- "isolatedModules": true,
20
- "noEmit": false,
21
- "sourceMap": true,
22
- "jsx": "react-jsx",
23
- "experimentalDecorators": true,
24
- "downlevelIteration": true,
25
- },
26
- "include": ["src"]
27
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es5",
4
+ "outDir": "./dist",
5
+ "lib": ["dom", "dom.iterable", "esnext"],
6
+ "allowJs": true,
7
+ "skipLibCheck": true,
8
+ "esModuleInterop": true,
9
+ "allowSyntheticDefaultImports": true,
10
+ "strict": false,
11
+ "strictNullChecks": false,
12
+ "forceConsistentCasingInFileNames": true,
13
+ "noFallthroughCasesInSwitch": true,
14
+ "module": "esnext",
15
+ "moduleResolution": "node",
16
+ "declaration": true,
17
+ "declarationDir": "./dist/types",
18
+ "resolveJsonModule": true,
19
+ "isolatedModules": true,
20
+ "noEmit": false,
21
+ "sourceMap": true,
22
+ "jsx": "react-jsx",
23
+ "experimentalDecorators": true,
24
+ "downlevelIteration": true,
25
+ },
26
+ "include": ["src"]
27
+ }
package/webpack.config.js CHANGED
@@ -1,48 +1,48 @@
1
- const path = require('path');
2
-
3
- module.exports = {
4
- mode: 'development',
5
- entry: './src/index.ts',
6
- devtool: "eval-cheap-source-map",
7
- output: {
8
- path: path.resolve(__dirname, 'dist'),
9
- filename: 'bundle.js',
10
- libraryTarget: 'umd',
11
- library: 'lib',
12
- },
13
- resolve: {
14
- extensions: ['.js', '.jsx', '.ts', '.tsx'],
15
- },
16
- module: {
17
- rules: [
18
- {
19
- test: /\.s?css$/,
20
- use: [
21
- { loader: 'style-loader' },
22
- {
23
- loader: 'css-loader',
24
- options: {
25
- modules: true
26
- }
27
- },
28
- { loader: 'sass-loader' }
29
- ]
30
- },
31
- {
32
- test: /\.(png|svg|jpg|gif)$/,
33
- loader: 'url-loader',
34
- options: {
35
- limit: Infinity // everything
36
- }
37
- },
38
- { test: /\.tsx?$/, use: 'ts-loader' },
39
- ],
40
- },
41
- externals: {
42
- react: "react",
43
- "react-dom": "react-dom",
44
- "react-router-dom": "react-router-dom",
45
- // "@tanstack/react-query": "@tanstack/react-query",
46
- "@tanstack/query-core": "@tanstack/query-core",
47
- },
48
- };
1
+ const path = require('path');
2
+
3
+ module.exports = {
4
+ mode: 'development',
5
+ entry: './src/index.ts',
6
+ devtool: "eval-cheap-source-map",
7
+ output: {
8
+ path: path.resolve(__dirname, 'dist'),
9
+ filename: 'bundle.js',
10
+ libraryTarget: 'umd',
11
+ library: 'lib',
12
+ },
13
+ resolve: {
14
+ extensions: ['.js', '.jsx', '.ts', '.tsx'],
15
+ },
16
+ module: {
17
+ rules: [
18
+ {
19
+ test: /\.s?css$/,
20
+ use: [
21
+ { loader: 'style-loader' },
22
+ {
23
+ loader: 'css-loader',
24
+ options: {
25
+ modules: true
26
+ }
27
+ },
28
+ { loader: 'sass-loader' }
29
+ ]
30
+ },
31
+ {
32
+ test: /\.(png|svg|jpg|gif)$/,
33
+ loader: 'url-loader',
34
+ options: {
35
+ limit: Infinity // everything
36
+ }
37
+ },
38
+ { test: /\.tsx?$/, use: 'ts-loader' },
39
+ ],
40
+ },
41
+ externals: {
42
+ react: "react",
43
+ "react-dom": "react-dom",
44
+ "react-router-dom": "react-router-dom",
45
+ // "@tanstack/react-query": "@tanstack/react-query",
46
+ "@tanstack/query-core": "@tanstack/query-core",
47
+ },
48
+ };