@etsoo/react 1.5.9 → 1.5.10

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.
@@ -67,7 +67,7 @@ export class ReactApp extends CoreApp {
67
67
  this.userState = new UserState();
68
68
  this.history =
69
69
  window.location.hostname === ''
70
- ? Utils.getMemoryHistory()
70
+ ? Utils.getMemoryHistory(window.location.href)
71
71
  : undefined;
72
72
  this.cultureState = new CultureState(settings.currentCulture);
73
73
  this.pageState = new PageState();
@@ -12,9 +12,10 @@ export declare namespace Utils {
12
12
  function formatInputValue(value: unknown): string | number | any[] | undefined;
13
13
  /**
14
14
  * Get memory history
15
+ * @param initialPath Initial path
15
16
  * @returns History
16
17
  */
17
- function getMemoryHistory(): History;
18
+ function getMemoryHistory(initialPath?: string): History;
18
19
  /**
19
20
  * Is safe click
20
21
  * @param event Mouse event
package/lib/app/Utils.js CHANGED
@@ -26,11 +26,13 @@ export var Utils;
26
26
  Utils.formatInputValue = formatInputValue;
27
27
  /**
28
28
  * Get memory history
29
+ * @param initialPath Initial path
29
30
  * @returns History
30
31
  */
31
- function getMemoryHistory() {
32
+ function getMemoryHistory(initialPath = '/') {
33
+ console.log('getMemoryHistory', initialPath);
32
34
  if (memoryHistory == null) {
33
- memoryHistory = createHistory(createMemorySource('/'));
35
+ memoryHistory = createHistory(createMemorySource(initialPath));
34
36
  }
35
37
  return memoryHistory;
36
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@etsoo/react",
3
- "version": "1.5.9",
3
+ "version": "1.5.10",
4
4
  "description": "TypeScript ReactJs framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -223,7 +223,7 @@ export class ReactApp<
223
223
  );
224
224
  this.history =
225
225
  window.location.hostname === ''
226
- ? Utils.getMemoryHistory()
226
+ ? Utils.getMemoryHistory(window.location.href)
227
227
  : undefined;
228
228
  this.cultureState = new CultureState(settings.currentCulture);
229
229
  this.pageState = new PageState<P>();
package/src/app/Utils.ts CHANGED
@@ -28,11 +28,13 @@ export namespace Utils {
28
28
 
29
29
  /**
30
30
  * Get memory history
31
+ * @param initialPath Initial path
31
32
  * @returns History
32
33
  */
33
- export function getMemoryHistory() {
34
+ export function getMemoryHistory(initialPath: string = '/') {
35
+ console.log('getMemoryHistory', initialPath);
34
36
  if (memoryHistory == null) {
35
- memoryHistory = createHistory(createMemorySource('/'));
37
+ memoryHistory = createHistory(createMemorySource(initialPath));
36
38
  }
37
39
  return memoryHistory;
38
40
  }