@tracktor/shared-module 2.0.0-beta.15 → 2.0.0-beta.3

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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/shared-module/releases)
2
2
 
3
- ## v2.0.0-beta.15
4
- - **[fix]** : type dateAdapter path param
3
+ ## v2.0.0-beta.3
4
+ - **[chore]** : improvement
@@ -15,7 +15,9 @@ export interface InjectDependenciesContextProps {
15
15
  axios?: any;
16
16
  dayjs?: any;
17
17
  dayjsPlugin?: any[];
18
- gtm?: any;
18
+ gtm?: {
19
+ useGoogleTagManager: () => any;
20
+ };
19
21
  mapbox?: any;
20
22
  reactRouter?: any;
21
23
  sentry?: any;
@@ -23,11 +25,26 @@ export interface InjectDependenciesContextProps {
23
25
  i18next?: any;
24
26
  initReactI18next?: any;
25
27
  languageDetector?: any;
26
- translateFunction?: any;
27
28
  };
28
29
  reactQuery?: {
29
- QueryClientProvider: any;
30
- QueryClient: any;
30
+ QueryClientProvider: ({ client, children }: {
31
+ client: any;
32
+ children: ReactNode;
33
+ }) => any;
34
+ QueryClient: {
35
+ new (config: {
36
+ defaultOptions: {
37
+ queries: {
38
+ refetchOnWindowFocus: boolean;
39
+ retry: number;
40
+ getNextPageParam: (lastPage: [], allPages: [], lastPageParam: number) => number;
41
+ };
42
+ mutations: {
43
+ [key: string]: any;
44
+ };
45
+ };
46
+ }): any;
47
+ };
31
48
  };
32
49
  };
33
50
  }
@@ -4,14 +4,21 @@ export interface useAdapterParams {
4
4
  * Dayjs library
5
5
  */
6
6
  dayjs?: NonNullable<InjectDependenciesContextProps["libraries"]>["dayjs"];
7
+ /**
8
+ * Translation key returned for the unknown error
9
+ */
10
+ unknownErrorTranslationKey?: string;
7
11
  }
8
12
  /**
9
13
  * Use adapter
10
14
  * @returns
11
15
  */
12
16
  export declare const useAdapter: (params?: useAdapterParams) => {
13
- dateAdapter: (date: string | number | Date | null | undefined, format?: string) => string;
17
+ dateAdapter: (date: string | number | Date | null | undefined, format?: string) => any;
14
18
  distanceAdapter: (distance?: string | number | null | undefined, metric?: string) => string;
15
- filePathAdapter: (path?: string | null, size?: number | "full") => string;
19
+ filePathAdapter: (href?: string | null | {
20
+ pathname: string;
21
+ origin: string;
22
+ }, size?: number | "full") => string;
16
23
  };
17
24
  export default useAdapter;