@tracktor/shared-module 2.0.0-beta.1 → 2.0.0-beta.11

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