@soleil-se/app-util 1.1.6 → 1.1.7

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/README.md CHANGED
@@ -1,4 +1,5 @@
1
1
  # Webapp Util
2
+ Utility functions for Webapps.
2
3
  ## Install
3
4
  `yarn add @soleil-se/webapp-util`
4
5
 
package/dist/index.js CHANGED
@@ -7,9 +7,9 @@ import app from 'app';
7
7
  import _ from 'underscore';
8
8
 
9
9
  /** If the webapp is running in offline mode or not. */
10
- export const isOffline = VersionUtil.getCurrentVersion() === VersionUtil.OFFLINE_VERSION;
10
+ export var isOffline = VersionUtil.getCurrentVersion() === VersionUtil.OFFLINE_VERSION;
11
11
 
12
- const portletId = app.portletId.replace('.', '_');
12
+ var portletId = app.portletId.replace('.', '_');
13
13
 
14
14
  /**
15
15
  * Get URI for a resource.
@@ -58,8 +58,8 @@ export function renderApp(name, data, ref) {
58
58
  var async = ref.async; if ( async === void 0 ) async = true;
59
59
  var defer = ref.defer; if ( defer === void 0 ) defer = false;
60
60
 
61
- const options = Object.assign({}, {webapp: app, isOffline: isOffline}, data);
62
- const clientUri = getResourceUri('client/index.js');
61
+ var options = Object.assign({}, {webapp: app, isOffline: isOffline}, data);
62
+ var clientUri = getResourceUri('client/index.js');
63
63
 
64
64
  if (isOffline) {
65
65
  return ("\n<!-- Generated by WebappUtil." + (this.name) + "() -->\n<div data-portlet-id=\"" + portletId + "\">" + noScript + "</div>\n<script src=\"" + clientUri + "\"></script>\n<script> \n Soleil.webapps['" + name + "'].render('" + name + "', '" + selector + "', " + (JSON.stringify(options)) + ");\n</script>\n");
@@ -73,10 +73,10 @@ export function renderApp(name, data, ref) {
73
73
  * @returns {String} URI for route.
74
74
  */
75
75
  export function getRouteUri(route) {
76
- const currentPortlet = PortletContextUtil.getCurrentPortlet();
76
+ var currentPortlet = PortletContextUtil.getCurrentPortlet();
77
77
  if (currentPortlet) {
78
- const currentPortletId = currentPortlet.getIdentifier();
79
- const currentPageUri = PropertyUtil.getString(PortletContextUtil.getCurrentPage(), 'URI');
78
+ var currentPortletId = currentPortlet.getIdentifier();
79
+ var currentPageUri = PropertyUtil.getString(PortletContextUtil.getCurrentPage(), 'URI');
80
80
  return (currentPageUri + "?sv." + currentPortletId + ".route=" + (encodeURI(route)) + "&sv.target=" + currentPortletId);
81
81
  }
82
82
  return '';
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@soleil-se/app-util",
3
- "version": "1.1.6",
3
+ "version": "1.1.7",
4
+ "description": "Utility functions for Webapps.",
4
5
  "main": "./dist/index.js",
5
6
  "author": "Soleil AB",
6
7
  "license": "UNLICENSED",
@@ -8,7 +9,7 @@
8
9
  "homepage": "https://github.com/soleilit/server-monorepo/tree/master/packages/app-util",
9
10
  "scripts": {
10
11
  "build": "yarn build-server && yarn build-render-vue",
11
- "build-server": "npx buble ./src/index.js --output ./dist/index.js --no modules,arrow,letConst,destructuring --objectAssign=Object.assign",
12
+ "build-server": "npx buble ./src/index.js --output ./dist/index.js --no modules,arrow --objectAssign=Object.assign",
12
13
  "build-render-vue": "npx buble ./render-vue/src/index.js --output ./render-vue/index.js --no modules --objectAssign=Object.assign"
13
14
  },
14
15
  "dependencies": {},