@soleil-se/app-util 2.4.0 → 2.4.1
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 +4 -0
- package/package.json +1 -1
- package/src/index.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,10 @@ 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.4.1] - 2020-09-01
|
|
8
|
+
### Fixed
|
|
9
|
+
- App data with single quotes crashes app in edit mode, use double quotes instead.
|
|
10
|
+
|
|
7
11
|
## [2.4.0] - 2020-05-26
|
|
8
12
|
### Fixed
|
|
9
13
|
- `getViewUri` returns correct URI when in offline mode and in the Addons view.
|
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -77,10 +77,10 @@ export function renderApp(data, {
|
|
|
77
77
|
<script>
|
|
78
78
|
window.svDocReady(function() {
|
|
79
79
|
var targetElement = document.querySelector('[data-portlet-id="${portletId}"]');
|
|
80
|
-
var script = document.createElement(
|
|
81
|
-
script.src =
|
|
82
|
-
script.setAttribute(
|
|
83
|
-
script.setAttribute(
|
|
80
|
+
var script = document.createElement("script");
|
|
81
|
+
script.src = "${getResourceUri('client/index.js')}?${appInfo.appImportDate}${portletId.replace('_', '')}";
|
|
82
|
+
script.setAttribute("data-app", "${encodeURIComponent(JSON.stringify({ ...data, isOffline }))}");
|
|
83
|
+
script.setAttribute("data-selector", "${encodeURIComponent(selector)}");
|
|
84
84
|
targetElement.parentNode.insertBefore(script, targetElement.nextSibling);
|
|
85
85
|
});
|
|
86
86
|
</script>`;
|