@etsoo/materialui 1.0.17 → 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 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.history.push(href);
15
+ globalApp.redirectTo(href);
16
16
  }, delay);
17
17
  // Click handler
18
18
  const onClickLocl = (event) => {
@@ -3,7 +3,6 @@ import { NotificationRenderProps, NotificationReturn } from '@etsoo/notification
3
3
  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
- import { History } from '@remix-run/router';
7
6
  /**
8
7
  * Global application
9
8
  */
@@ -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
  */
@@ -6,7 +6,6 @@ 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
- import { createBrowserHistory, createMemoryHistory } from '@remix-run/router';
10
9
  /**
11
10
  * Global application
12
11
  */
@@ -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
- this.history.push(url);
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.17",
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",
@@ -57,7 +57,6 @@
57
57
  "@etsoo/shared": "^1.1.57",
58
58
  "@mui/icons-material": "^5.10.3",
59
59
  "@mui/material": "^5.10.5",
60
- "@remix-run/router": "^1.0.0",
61
60
  "@types/pica": "^9.0.1",
62
61
  "@types/pulltorefreshjs": "^0.1.5",
63
62
  "@types/react": "^18.0.20",
package/src/RLink.tsx CHANGED
@@ -22,7 +22,7 @@ export const RLink = React.forwardRef<HTMLAnchorElement, RLinkProps>(
22
22
 
23
23
  const delayed = useDelayedExecutor((href: string) => {
24
24
  // Router push
25
- globalApp.history.push(href);
25
+ globalApp.redirectTo(href);
26
26
  }, delay);
27
27
 
28
28
  // Click handler
@@ -34,11 +34,6 @@ import {
34
34
  UserCalls,
35
35
  UserState
36
36
  } from '@etsoo/react';
37
- import {
38
- History,
39
- createBrowserHistory,
40
- createMemoryHistory
41
- } from '@remix-run/router';
42
37
 
43
38
  /**
44
39
  * Global application
@@ -96,11 +91,6 @@ export interface IReactAppBase {
96
91
  */
97
92
  readonly userState: UserState<any>;
98
93
 
99
- /**
100
- * Router history
101
- */
102
- readonly history: History;
103
-
104
94
  /**
105
95
  * Set page data
106
96
  * @param data Page data
@@ -181,11 +171,6 @@ export class ReactApp<
181
171
  */
182
172
  readonly cultureState: CultureState;
183
173
 
184
- /**
185
- * Router history
186
- */
187
- readonly history: History;
188
-
189
174
  /**
190
175
  * Page state
191
176
  */
@@ -231,11 +216,6 @@ export class ReactApp<
231
216
  );
232
217
 
233
218
  if (BridgeUtils.host) {
234
- const startUrl = BridgeUtils.host.getStartUrl();
235
- this.history = createMemoryHistory({
236
- initialEntries: startUrl == null ? undefined : [startUrl]
237
- });
238
-
239
219
  BridgeUtils.host.onUpdate((app, version) => {
240
220
  this.notifier.message(
241
221
  NotificationMessageType.Success,
@@ -243,8 +223,6 @@ export class ReactApp<
243
223
  this.get('updateReady')
244
224
  );
245
225
  });
246
- } else {
247
- this.history = createBrowserHistory();
248
226
  }
249
227
 
250
228
  this.cultureState = new CultureState(settings.currentCulture);
@@ -393,7 +371,7 @@ export class ReactApp<
393
371
  * @param url Url
394
372
  */
395
373
  override redirectTo(url: string) {
396
- this.history.push(url);
374
+ location.href = url;
397
375
  }
398
376
 
399
377
  /**