@tracktor/shared-module 0.6.0 → 0.6.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.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
1
  # [Versions](https://github.com/Tracktor/react-google-tag-manager/releases)
2
2
 
3
- ## v0.6.0
4
- - **[feat]** : add `MaskTextField` component
3
+ ## v0.6.2
4
+ - **[feat]** : Documentation
@@ -1,7 +1,25 @@
1
1
  import { ComponentProps, ComponentType } from "react";
2
2
  interface MaskTextFieldProps<T> {
3
+ /**
4
+ * Mask pattern.
5
+ * e.g. `Date: {d}.{m}.{y}`
6
+ * e.g. `Phone: +{7}(000)000-00-00`
7
+ * @see https://imask.js.org/guide.html#masked-pattern
8
+ */
3
9
  mask?: unknown;
10
+ /**
11
+ * Definitions.
12
+ */
13
+ definitions?: unknown;
14
+ /**
15
+ * Text field component dependency.
16
+ */
4
17
  TextField: T;
18
+ /**
19
+ * Mask mixin dependency.
20
+ * @param param
21
+ * @constructor
22
+ */
5
23
  IMaskMixin: (param: (props: any) => any) => any;
6
24
  }
7
25
  declare const MaskTextField: <T extends ComponentType<{}>>({ IMaskMixin, ...props }: MaskTextFieldProps<T> & ComponentProps<T>) => JSX.Element;
@@ -1,7 +1,16 @@
1
1
  import { InjectDependenciesContextProps } from '../../context/InjectDependenciesProvider';
2
2
  export interface GTMSendPageViewProps {
3
+ /**
4
+ * useGoogleTagManager is the hook that will be used to send page view
5
+ */
3
6
  useGoogleTagManager?: InjectDependenciesContextProps["useGoogleTagManager"];
7
+ /**
8
+ * Outlet is the component that will be rendered
9
+ */
4
10
  Outlet?: InjectDependenciesContextProps["Outlet"];
11
+ /**
12
+ * useLocation is the hook that will be used to get current pathname
13
+ */
5
14
  useLocation?: InjectDependenciesContextProps["useLocation"];
6
15
  }
7
16
  /**
@@ -8,10 +8,26 @@ interface I18nConfigProps<I, L, R> {
8
8
  on: (event: string, callback: (lng: string) => void) => void;
9
9
  resolvedLanguage?: string;
10
10
  };
11
+ /**
12
+ * i18next language detector dependency
13
+ */
11
14
  LanguageDetector?: L;
15
+ /**
16
+ * i18next ressources
17
+ * exemple
18
+ * {
19
+ * en: {
20
+ * roles: {...},
21
+ * translation: {...},
22
+ * },
23
+ * }
24
+ */
12
25
  resources?: {
13
26
  [language: string]: any;
14
27
  };
28
+ /**
29
+ * i18next innit react plugin dependency
30
+ */
15
31
  initReactI18next?: R;
16
32
  }
17
33
  /**
@@ -10,6 +10,9 @@ interface SentryConfigProps<T> {
10
10
  }) => void;
11
11
  BrowserTracing: any;
12
12
  };
13
+ /**
14
+ * Sentry DSN
15
+ */
13
16
  dsn: string;
14
17
  }
15
18
  /**
@@ -20,6 +20,9 @@ interface QueryClientConfigProviderProps<T> extends PropsWithChildren {
20
20
  client: T;
21
21
  children: ReactNode;
22
22
  }) => any;
23
+ /**
24
+ * Default options for queries
25
+ */
23
26
  defaultOptions?: {
24
27
  [key: string]: any;
25
28
  };
@@ -25,6 +25,7 @@ export interface useResponseErrorParams {
25
25
  }
26
26
  /**
27
27
  * This hook is used to print error messages from the API
28
+ * @param params
28
29
  */
29
30
  export declare const useResponseError: <T = ResponseError>(params?: useResponseErrorParams) => {
30
31
  printError: (error?: any) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tracktor/shared-module",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "license": "UNLICENSED",
6
6
  "types": "./dist/main.d.ts",