@etsoo/materialui 1.0.44 → 1.0.45

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.
@@ -4,10 +4,14 @@ import { DataTypes } from '@etsoo/shared';
4
4
  import React from 'react';
5
5
  import { CultureAction, CultureState, INotificationReact, InputDialogProps, IPageData, IStateProps, NotificationReactCallProps, PageAction, PageState, UserAction, UserState } from '@etsoo/react';
6
6
  import { NavigateFunction, NavigateOptions } from 'react-router-dom';
7
+ /**
8
+ * React Application Type
9
+ */
10
+ export declare type ReactAppType = IApp & IReactAppBase;
7
11
  /**
8
12
  * Global application
9
13
  */
10
- export declare let globalApp: IApp & IReactAppBase;
14
+ export declare let globalApp: ReactAppType;
11
15
  /**
12
16
  * React app state detector
13
17
  * Case 1: undefined, when refresh the whole page
@@ -95,7 +99,6 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
95
99
  * Get notifier provider
96
100
  */
97
101
  static get notifierProvider(): React.FunctionComponent<object>;
98
- private static createApi;
99
102
  private static createNotifier;
100
103
  /**
101
104
  * Culture state
@@ -57,7 +57,7 @@ export class ReactApp extends CoreApp {
57
57
  * @param name Application name
58
58
  */
59
59
  constructor(settings, name) {
60
- super(settings, ReactApp.createApi(settings), ReactApp.createNotifier(), new WindowStorage(), name);
60
+ super(settings, createClient(), ReactApp.createNotifier(), new WindowStorage(), name);
61
61
  /**
62
62
  * User state
63
63
  */
@@ -77,13 +77,6 @@ export class ReactApp extends CoreApp {
77
77
  static get notifierProvider() {
78
78
  return this._notifierProvider;
79
79
  }
80
- static createApi(settings) {
81
- // API
82
- // Support to replace {hostname} with current hostname
83
- const api = createClient();
84
- api.baseUrl = settings.endpoint;
85
- return api;
86
- }
87
80
  static createNotifier() {
88
81
  // Notifier
89
82
  ReactApp._notifierProvider = NotifierMU.setup();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/materialui",
3
- "version": "1.0.44",
3
+ "version": "1.0.45",
4
4
  "description": "TypeScript Material-UI Implementation",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -51,12 +51,12 @@
51
51
  "@emotion/css": "^11.10.0",
52
52
  "@emotion/react": "^11.10.4",
53
53
  "@emotion/styled": "^11.10.4",
54
- "@etsoo/appscript": "^1.3.1",
54
+ "@etsoo/appscript": "^1.3.4",
55
55
  "@etsoo/notificationbase": "^1.1.12",
56
- "@etsoo/react": "^1.6.12",
57
- "@etsoo/shared": "^1.1.59",
58
- "@mui/icons-material": "^5.10.6",
59
- "@mui/material": "^5.10.8",
56
+ "@etsoo/react": "^1.6.14",
57
+ "@etsoo/shared": "^1.1.60",
58
+ "@mui/icons-material": "^5.10.9",
59
+ "@mui/material": "^5.10.9",
60
60
  "@types/pica": "^9.0.1",
61
61
  "@types/pulltorefreshjs": "^0.1.5",
62
62
  "@types/react": "^18.0.21",
@@ -71,24 +71,24 @@
71
71
  "react-dom": "^18.2.0",
72
72
  "react-draggable": "^4.4.5",
73
73
  "react-imask": "^6.4.3",
74
- "react-router-dom": "^6.4.1",
74
+ "react-router-dom": "^6.4.2",
75
75
  "react-window": "^1.8.7"
76
76
  },
77
77
  "devDependencies": {
78
78
  "@babel/cli": "^7.19.3",
79
79
  "@babel/core": "^7.19.3",
80
80
  "@babel/plugin-transform-runtime": "^7.19.1",
81
- "@babel/preset-env": "^7.19.3",
82
- "@babel/runtime-corejs3": "^7.19.1",
81
+ "@babel/preset-env": "^7.19.4",
82
+ "@babel/runtime-corejs3": "^7.19.4",
83
83
  "@testing-library/jest-dom": "^5.16.5",
84
84
  "@testing-library/react": "^13.4.0",
85
- "@types/jest": "^29.1.1",
86
- "@typescript-eslint/eslint-plugin": "^5.39.0",
87
- "@typescript-eslint/parser": "^5.39.0",
88
- "eslint": "^8.24.0",
85
+ "@types/jest": "^29.1.2",
86
+ "@typescript-eslint/eslint-plugin": "^5.40.0",
87
+ "@typescript-eslint/parser": "^5.40.0",
88
+ "eslint": "^8.25.0",
89
89
  "eslint-config-airbnb-base": "^15.0.0",
90
90
  "eslint-plugin-import": "^2.26.0",
91
- "eslint-plugin-react": "^7.31.8",
91
+ "eslint-plugin-react": "^7.31.10",
92
92
  "jest": "^29.1.2",
93
93
  "jest-environment-jsdom": "^29.1.2",
94
94
  "ts-jest": "^29.0.3",
@@ -37,10 +37,15 @@ import {
37
37
  } from '@etsoo/react';
38
38
  import { NavigateFunction, NavigateOptions } from 'react-router-dom';
39
39
 
40
+ /**
41
+ * React Application Type
42
+ */
43
+ export type ReactAppType = IApp & IReactAppBase;
44
+
40
45
  /**
41
46
  * Global application
42
47
  */
43
- export let globalApp: IApp & IReactAppBase;
48
+ export let globalApp: ReactAppType;
44
49
 
45
50
  /**
46
51
  * React app state detector
@@ -192,14 +197,6 @@ export class ReactApp<
192
197
  return this._notifierProvider;
193
198
  }
194
199
 
195
- private static createApi(settings: IAppSettings) {
196
- // API
197
- // Support to replace {hostname} with current hostname
198
- const api = createClient();
199
- api.baseUrl = settings.endpoint;
200
- return api;
201
- }
202
-
203
200
  private static createNotifier() {
204
201
  // Notifier
205
202
  ReactApp._notifierProvider = NotifierMU.setup();
@@ -255,7 +252,7 @@ export class ReactApp<
255
252
  constructor(settings: S, name: string) {
256
253
  super(
257
254
  settings,
258
- ReactApp.createApi(settings),
255
+ createClient(),
259
256
  ReactApp.createNotifier(),
260
257
  new WindowStorage(),
261
258
  name