@etsoo/materialui 1.4.63 → 1.4.64

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.
@@ -1,7 +1,12 @@
1
1
  import { ApiRefreshTokenDto, IApi, IApiPayload } from "@etsoo/appscript";
2
- import { ReactAppType } from "./ReactApp";
2
+ import { ReactAppData, ReactAppType } from "./ReactApp";
3
3
  import { IServiceUser, ServiceUserToken } from "./IServiceUser";
4
4
  import { IActionResult } from "@etsoo/shared";
5
+ import React from "react";
6
+ /**
7
+ * Service application context
8
+ */
9
+ export declare const ServiceAppContext: React.Context<ReactAppData<IServiceApp> | null>;
5
10
  /**
6
11
  * Service application interface
7
12
  */
@@ -1 +1,5 @@
1
- export {};
1
+ import React from "react";
2
+ /**
3
+ * Service application context
4
+ */
5
+ export const ServiceAppContext = React.createContext(null);
@@ -8,6 +8,19 @@ import { NavigateFunction, NavigateOptions } from "react-router";
8
8
  * React Application Type
9
9
  */
10
10
  export type ReactAppType = IApp & IReactAppBase;
11
+ /**
12
+ * React application data
13
+ */
14
+ export type ReactAppData<A extends ReactAppType> = {
15
+ /**
16
+ * Current application
17
+ */
18
+ app: A;
19
+ };
20
+ /**
21
+ * React application context
22
+ */
23
+ export declare const ReactAppContext: React.Context<ReactAppData<ReactAppType> | null>;
11
24
  /**
12
25
  * Global application
13
26
  */
@@ -6,6 +6,10 @@ import { NotifierMU } from "../NotifierMU";
6
6
  import { ProgressCount } from "../ProgressCount";
7
7
  import { Labels } from "./Labels";
8
8
  import { CultureState, PageActionType, PageState, UserActionType, UserState } from "@etsoo/react";
9
+ /**
10
+ * React application context
11
+ */
12
+ export const ReactAppContext = React.createContext(null);
9
13
  /**
10
14
  * Global application
11
15
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.4.63",
3
+ "version": "1.4.64",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "type": "module",
@@ -1,7 +1,14 @@
1
1
  import { ApiRefreshTokenDto, IApi, IApiPayload } from "@etsoo/appscript";
2
- import { ReactAppType } from "./ReactApp";
2
+ import { ReactAppData, ReactAppType } from "./ReactApp";
3
3
  import { IServiceUser, ServiceUserToken } from "./IServiceUser";
4
4
  import { IActionResult } from "@etsoo/shared";
5
+ import React from "react";
6
+
7
+ /**
8
+ * Service application context
9
+ */
10
+ export const ServiceAppContext =
11
+ React.createContext<ReactAppData<IServiceApp> | null>(null);
5
12
 
6
13
  /**
7
14
  * Service application interface
@@ -42,6 +42,22 @@ import { NavigateFunction, NavigateOptions } from "react-router";
42
42
  */
43
43
  export type ReactAppType = IApp & IReactAppBase;
44
44
 
45
+ /**
46
+ * React application data
47
+ */
48
+ export type ReactAppData<A extends ReactAppType> = {
49
+ /**
50
+ * Current application
51
+ */
52
+ app: A;
53
+ };
54
+
55
+ /**
56
+ * React application context
57
+ */
58
+ export const ReactAppContext =
59
+ React.createContext<ReactAppData<ReactAppType> | null>(null);
60
+
45
61
  /**
46
62
  * Global application
47
63
  */