@etsoo/materialui 1.0.16 → 1.0.18
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/lib/RLink.js +1 -1
- package/lib/app/ReactApp.d.ts +0 -9
- package/lib/app/ReactApp.js +1 -9
- package/package.json +12 -12
- package/src/RLink.tsx +1 -1
- package/src/app/ReactApp.ts +1 -19
package/lib/RLink.js
CHANGED
|
@@ -12,7 +12,7 @@ export const RLink = React.forwardRef((props, ref) => {
|
|
|
12
12
|
const { delay = 0, href, target, onClick, ...rest } = props;
|
|
13
13
|
const delayed = useDelayedExecutor((href) => {
|
|
14
14
|
// Router push
|
|
15
|
-
globalApp.
|
|
15
|
+
globalApp.redirectTo(href);
|
|
16
16
|
}, delay);
|
|
17
17
|
// Click handler
|
|
18
18
|
const onClickLocl = (event) => {
|
package/lib/app/ReactApp.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { CoreApp, IActionResult, IApp, IAppSettings, ICoreApp, IUser } from '@et
|
|
|
2
2
|
import { NotificationRenderProps, NotificationReturn } from '@etsoo/notificationbase';
|
|
3
3
|
import { DataTypes } from '@etsoo/shared';
|
|
4
4
|
import React from 'react';
|
|
5
|
-
import { History } from 'history';
|
|
6
5
|
import { CultureAction, CultureState, INotificationReact, InputDialogProps, IPageData, IStateProps, NotificationReactCallProps, PageAction, PageState, UserAction, UserState } from '@etsoo/react';
|
|
7
6
|
/**
|
|
8
7
|
* Global application
|
|
@@ -28,10 +27,6 @@ export interface IReactAppBase {
|
|
|
28
27
|
* User state
|
|
29
28
|
*/
|
|
30
29
|
readonly userState: UserState<any>;
|
|
31
|
-
/**
|
|
32
|
-
* Router history
|
|
33
|
-
*/
|
|
34
|
-
readonly history: History;
|
|
35
30
|
/**
|
|
36
31
|
* Set page data
|
|
37
32
|
* @param data Page data
|
|
@@ -77,10 +72,6 @@ export declare class ReactApp<S extends IAppSettings, D extends IUser, P extends
|
|
|
77
72
|
* Culture state
|
|
78
73
|
*/
|
|
79
74
|
readonly cultureState: CultureState;
|
|
80
|
-
/**
|
|
81
|
-
* Router history
|
|
82
|
-
*/
|
|
83
|
-
readonly history: History;
|
|
84
75
|
/**
|
|
85
76
|
* Page state
|
|
86
77
|
*/
|
package/lib/app/ReactApp.js
CHANGED
|
@@ -5,7 +5,6 @@ import React from 'react';
|
|
|
5
5
|
import { NotifierMU } from '../NotifierMU';
|
|
6
6
|
import { ProgressCount } from '../ProgressCount';
|
|
7
7
|
import { Labels } from './Labels';
|
|
8
|
-
import { createBrowserHistory, createMemoryHistory } from 'history';
|
|
9
8
|
import { CultureState, PageActionType, PageState, UserActionType, UserState } from '@etsoo/react';
|
|
10
9
|
/**
|
|
11
10
|
* Global application
|
|
@@ -64,17 +63,10 @@ export class ReactApp extends CoreApp {
|
|
|
64
63
|
*/
|
|
65
64
|
this.userState = new UserState();
|
|
66
65
|
if (BridgeUtils.host) {
|
|
67
|
-
const startUrl = BridgeUtils.host.getStartUrl();
|
|
68
|
-
this.history = createMemoryHistory({
|
|
69
|
-
initialEntries: startUrl == null ? undefined : [startUrl]
|
|
70
|
-
});
|
|
71
66
|
BridgeUtils.host.onUpdate((app, version) => {
|
|
72
67
|
this.notifier.message(NotificationMessageType.Success, this.get('updateTip') + `(${[app, version].join(', ')})`, this.get('updateReady'));
|
|
73
68
|
});
|
|
74
69
|
}
|
|
75
|
-
else {
|
|
76
|
-
this.history = createBrowserHistory();
|
|
77
|
-
}
|
|
78
70
|
this.cultureState = new CultureState(settings.currentCulture);
|
|
79
71
|
this.pageState = new PageState();
|
|
80
72
|
globalApp = this;
|
|
@@ -206,7 +198,7 @@ export class ReactApp extends CoreApp {
|
|
|
206
198
|
* @param url Url
|
|
207
199
|
*/
|
|
208
200
|
redirectTo(url) {
|
|
209
|
-
|
|
201
|
+
location.href = url;
|
|
210
202
|
}
|
|
211
203
|
/**
|
|
212
204
|
* Set page data
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@etsoo/materialui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"description": "TypeScript Material-UI Implementation",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -51,15 +51,15 @@
|
|
|
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.2.
|
|
54
|
+
"@etsoo/appscript": "^1.2.92",
|
|
55
55
|
"@etsoo/notificationbase": "^1.1.7",
|
|
56
|
-
"@etsoo/react": "^1.5.
|
|
57
|
-
"@etsoo/shared": "^1.1.
|
|
56
|
+
"@etsoo/react": "^1.5.91",
|
|
57
|
+
"@etsoo/shared": "^1.1.57",
|
|
58
58
|
"@mui/icons-material": "^5.10.3",
|
|
59
59
|
"@mui/material": "^5.10.5",
|
|
60
60
|
"@types/pica": "^9.0.1",
|
|
61
61
|
"@types/pulltorefreshjs": "^0.1.5",
|
|
62
|
-
"@types/react": "^18.0.
|
|
62
|
+
"@types/react": "^18.0.20",
|
|
63
63
|
"@types/react-avatar-editor": "^13.0.0",
|
|
64
64
|
"@types/react-dom": "^18.0.6",
|
|
65
65
|
"@types/react-input-mask": "^3.0.1",
|
|
@@ -71,18 +71,18 @@
|
|
|
71
71
|
"react-dom": "^18.2.0",
|
|
72
72
|
"react-draggable": "^4.4.5",
|
|
73
73
|
"react-imask": "^6.4.2",
|
|
74
|
-
"react-router-dom": "^6.
|
|
74
|
+
"react-router-dom": "^6.4.0",
|
|
75
75
|
"react-window": "^1.8.7"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@babel/cli": "^7.18.10",
|
|
79
|
-
"@babel/core": "^7.19.
|
|
80
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
81
|
-
"@babel/preset-env": "^7.19.
|
|
82
|
-
"@babel/runtime-corejs3": "^7.19.
|
|
79
|
+
"@babel/core": "^7.19.1",
|
|
80
|
+
"@babel/plugin-transform-runtime": "^7.19.1",
|
|
81
|
+
"@babel/preset-env": "^7.19.1",
|
|
82
|
+
"@babel/runtime-corejs3": "^7.19.1",
|
|
83
83
|
"@testing-library/jest-dom": "^5.16.5",
|
|
84
84
|
"@testing-library/react": "^13.4.0",
|
|
85
|
-
"@types/jest": "^29.0.
|
|
85
|
+
"@types/jest": "^29.0.3",
|
|
86
86
|
"@typescript-eslint/eslint-plugin": "^5.37.0",
|
|
87
87
|
"@typescript-eslint/parser": "^5.37.0",
|
|
88
88
|
"eslint": "^8.23.1",
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
"eslint-plugin-react": "^7.31.8",
|
|
92
92
|
"jest": "^29.0.3",
|
|
93
93
|
"jest-environment-jsdom": "^29.0.3",
|
|
94
|
-
"ts-jest": "^29.0.
|
|
94
|
+
"ts-jest": "^29.0.1",
|
|
95
95
|
"typescript": "^4.8.3"
|
|
96
96
|
}
|
|
97
97
|
}
|
package/src/RLink.tsx
CHANGED
package/src/app/ReactApp.ts
CHANGED
|
@@ -18,7 +18,6 @@ import React from 'react';
|
|
|
18
18
|
import { NotifierMU } from '../NotifierMU';
|
|
19
19
|
import { ProgressCount } from '../ProgressCount';
|
|
20
20
|
import { Labels } from './Labels';
|
|
21
|
-
import { createBrowserHistory, createMemoryHistory, History } from 'history';
|
|
22
21
|
import {
|
|
23
22
|
CultureAction,
|
|
24
23
|
CultureState,
|
|
@@ -92,11 +91,6 @@ export interface IReactAppBase {
|
|
|
92
91
|
*/
|
|
93
92
|
readonly userState: UserState<any>;
|
|
94
93
|
|
|
95
|
-
/**
|
|
96
|
-
* Router history
|
|
97
|
-
*/
|
|
98
|
-
readonly history: History;
|
|
99
|
-
|
|
100
94
|
/**
|
|
101
95
|
* Set page data
|
|
102
96
|
* @param data Page data
|
|
@@ -177,11 +171,6 @@ export class ReactApp<
|
|
|
177
171
|
*/
|
|
178
172
|
readonly cultureState: CultureState;
|
|
179
173
|
|
|
180
|
-
/**
|
|
181
|
-
* Router history
|
|
182
|
-
*/
|
|
183
|
-
readonly history: History;
|
|
184
|
-
|
|
185
174
|
/**
|
|
186
175
|
* Page state
|
|
187
176
|
*/
|
|
@@ -227,11 +216,6 @@ export class ReactApp<
|
|
|
227
216
|
);
|
|
228
217
|
|
|
229
218
|
if (BridgeUtils.host) {
|
|
230
|
-
const startUrl = BridgeUtils.host.getStartUrl();
|
|
231
|
-
this.history = createMemoryHistory({
|
|
232
|
-
initialEntries: startUrl == null ? undefined : [startUrl]
|
|
233
|
-
});
|
|
234
|
-
|
|
235
219
|
BridgeUtils.host.onUpdate((app, version) => {
|
|
236
220
|
this.notifier.message(
|
|
237
221
|
NotificationMessageType.Success,
|
|
@@ -239,8 +223,6 @@ export class ReactApp<
|
|
|
239
223
|
this.get('updateReady')
|
|
240
224
|
);
|
|
241
225
|
});
|
|
242
|
-
} else {
|
|
243
|
-
this.history = createBrowserHistory();
|
|
244
226
|
}
|
|
245
227
|
|
|
246
228
|
this.cultureState = new CultureState(settings.currentCulture);
|
|
@@ -389,7 +371,7 @@ export class ReactApp<
|
|
|
389
371
|
* @param url Url
|
|
390
372
|
*/
|
|
391
373
|
override redirectTo(url: string) {
|
|
392
|
-
|
|
374
|
+
location.href = url;
|
|
393
375
|
}
|
|
394
376
|
|
|
395
377
|
/**
|