Skip to content

Commit 1201b79

Browse files
author
Raymond Augé
committed
make both GlobalStore and redux functions available on a StateManager object
Signed-off-by: Raymond Augé <[email protected]>
1 parent 41b4fa5 commit 1201b79

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
**/bin
99
**/build
1010
**/build_gradle
11+
**/liferay-npm-bundler-report.html
1112
**/node_modules
1213
**/test-coverage
1314
**/test-results

modules/remote-web-component-admin-web/.npmbundlerrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

modules/remote-web-component-admin-web/bnd.bnd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ Export-Package: com.liferay.remote.web.component.admin.web.configuration
55
Import-Package: \
66
com.liferay.portal.kernel.util;version="[9.21.0,10.0.0)",\
77
*
8-
Liferay-JS-Resources-Top-Head: /remote-web-component-admin-web.js
8+
Liferay-JS-Resources-Top-Head: /remote-web-component-admin-web.js?t=${currenttime}
99
Liferay-Top-Head-Weight: 1000
1010
Web-ContextPath: /remote-web-component-admin-web

modules/remote-web-component-admin-web/src/main/java/com/liferay/remote/web/component/admin/web/internal/portlet/RemoteWebComponentPortlet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public void render(
9595
printWriter.append(routerBasePage);
9696
printWriter.append("\" router-base-site=\"");
9797
printWriter.append(routerBaseSite);
98-
printWriter.append("\" store-descriptor=\"Liferay.State\"");
98+
printWriter.append("\" store-descriptor=\"StateManager\"");
9999

100100
StringBuffer sb = new StringBuffer();
101101

modules/remote-web-component-admin-web/src/main/resources/META-INF/resources/js/index.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
*/
1414

1515
import { GlobalStore } from 'redux-micro-frontend';
16+
import * as redux from 'redux';
1617

1718
declare global {
18-
interface Window { GlobalStore: any; }
19+
interface Window { StateManager: any; }
1920
}
2021

21-
window.GlobalStore = window.GlobalStore || GlobalStore;
22+
window.StateManager = window.StateManager || { 'GlobalStore': GlobalStore, ...redux};

0 commit comments

Comments
 (0)