@soleil-se/app-util 2.1.2 → 2.1.4
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/CHANGELOG.md +7 -0
- package/package.json +1 -1
- package/src/index.js +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
5
5
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.1.4] - 2020-04-07
|
|
8
|
+
### Fixed
|
|
9
|
+
- `getViewUri` had incorrect portlet ID.
|
|
10
|
+
## [2.1.3] - 2020-02-25
|
|
11
|
+
### Fixed
|
|
12
|
+
- Add timestamp to script url in edit mode as well.
|
|
13
|
+
|
|
7
14
|
## [2.1.2] - 2020-02-21
|
|
8
15
|
### Fixed
|
|
9
16
|
- Wrapped `renderApp` script in svDocReady in edit mode to be sure it executes when other bundles are loaded.
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -67,7 +67,7 @@ export function renderApp(data, {
|
|
|
67
67
|
window.svDocReady(function() {
|
|
68
68
|
var targetElement = document.querySelector('[data-portlet-id="${portletId}"]');
|
|
69
69
|
var script = document.createElement('script');
|
|
70
|
-
script.src = '${getResourceUri('client/index.js')}?${portletId.replace('_', '')}';
|
|
70
|
+
script.src = '${getResourceUri('client/index.js')}?${appInfo.appImportDate}${portletId.replace('_', '')}';
|
|
71
71
|
script.setAttribute('data-app', '${encodeURIComponent(JSON.stringify({ ...data, isOffline }))}');
|
|
72
72
|
script.setAttribute('data-selector', '${encodeURIComponent(selector)}');
|
|
73
73
|
targetElement.parentNode.insertBefore(script, targetElement.nextSibling);
|
|
@@ -103,7 +103,8 @@ export function getRouteUri(route) {
|
|
|
103
103
|
*/
|
|
104
104
|
export function getViewUri(route) {
|
|
105
105
|
const currentPageUri = PropertyUtil.getString(PortletContextUtil.getCurrentPage(), 'URI');
|
|
106
|
-
|
|
106
|
+
const currentPortletId = PortletContextUtil.getCurrentPortlet().getIdentifier();
|
|
107
|
+
return `${currentPageUri}?sv.target=${currentPortletId}&sv.${currentPortletId}.route=${encodeURI(route)}`;
|
|
107
108
|
}
|
|
108
109
|
|
|
109
110
|
export default {
|