@soleil-se/app-util 4.1.3 → 4.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 CHANGED
@@ -1,107 +1,162 @@
1
1
  # Changelog
2
+
2
3
  All notable changes to this project will be documented in this file.
3
4
 
4
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
7
 
8
+ ## [4.1.4] - 2021-05-25
9
+
10
+ ### Fixed
11
+
12
+ - Return empty object instead of undefined when app data isn't set.
13
+
14
+ ### Removed
15
+
16
+ - Remove `vue` as optional dependency.
17
+
7
18
  ## [4.1.3] - 2021-03-31
19
+
8
20
  ### Fixed
21
+
9
22
  - Consistent rendering when using `serverServer` and `render` for Svelte.
10
23
 
11
24
  ### Added
25
+
12
26
  - Docs for Svelte `renderServer` function.
13
27
 
14
28
  ## [4.1.2] - 2021-02-24
29
+
15
30
  ### Fixed
31
+
16
32
  - Escape tags when parsing data to prevent closure of script tags.
17
33
 
18
34
  ## [4.1.1] - 2021-02-17
35
+
19
36
  ### Fixed
37
+
20
38
  - Validation error for `id` on script tags, even though it's allowed.
21
39
 
22
40
  ## [4.1.0] - 2021-02-17
41
+
23
42
  ### Changed
43
+
24
44
  - Put app data and metadata in script elements instead of data attributes.
25
45
 
26
46
  ## [4.0.1] - 2021-01-28
47
+
27
48
  ### Fixed
49
+
28
50
  - Crashes when no data is passed to app and then trying to call `getAppData`.
29
51
 
30
52
  ## [4.0.0] - 2021-01-27
31
- A much needed major overhaul of the package.
53
+
54
+ A much needed major overhaul of the package.
32
55
  See [MIGRATION](./MIGRATION.md).
33
56
 
34
57
  ### Changed
58
+
35
59
  - Major refactoring of package.
36
- - Exports for render functions are moved.
60
+ - Exports for render functions are moved.
37
61
  - All documented constants and functions from base import (`@soleil-api/webapp-util`) now works both in a server and client context.
38
62
  - Settings for selector is moved from server to client rendering functions.
39
63
 
40
64
  ### Removed
65
+
41
66
  - `noScript` option in `render` (formerly `renderApp`) has been removed. If a no script message is needed use the `html` option wrapped in `<noscript>`.
42
67
  - `@soleil-api/webapp-util/app-data` has been removed, use [getAppData](./README.md#getAppData) from `@soleil-api/webapp-util`.
43
68
 
44
69
  ## [3.0.3] - 2020-11-03
70
+
45
71
  - Nothing, Lerna wanted to publish...
46
72
 
47
73
  ## [3.0.2] - 2020-10-19
74
+
48
75
  - Nothing, Lerna wanted to publish...
49
76
 
50
77
  ## [3.0.1] - 2020-09-28
78
+
51
79
  ### Added
80
+
52
81
  - Homepage link
53
82
 
54
83
  ## [3.0.0] - 2020-09-28
84
+
55
85
  ### Added
86
+
56
87
  - Svelte support.
57
88
  - New exports:
58
89
  - `uniqueId` - A unique id for the app instance.
59
90
 
60
91
  ## [2.4.1] - 2020-09-01
92
+
61
93
  ### Fixed
94
+
62
95
  - App data with single quotes crashes app in edit mode, use double quotes instead.
63
96
 
64
97
  ## [2.4.0] - 2020-05-26
98
+
65
99
  ### Fixed
100
+
66
101
  - `getViewUri` returns correct URI when in offline mode and in the Addons view.
67
102
 
68
103
  ## [2.3.0] - 2020-05-22
104
+
69
105
  ### Added
70
- - `renderApp` now accepts `req` as a setting to opimize script loading when multiple instances of the app exists. If `req` is present the script will only be loaded once in all browsers except IE11 that needs a unique script src for the currentScript polyfill to work.
106
+
107
+ - `renderApp` now accepts `req` as a setting to opimize script loading when multiple instances of the app exists. If `req` is present the script will only be loaded once in all browsers except IE11 that needs a unique script src for the currentScript polyfill to work.
71
108
 
72
109
  ### Fixed
110
+
73
111
  - `noScript` in `renderApp` was not wrapped in a `<noscript>` tag.
74
112
 
75
113
  ## [2.2.0] - 2020-05-20
114
+
76
115
  ### Added
116
+
77
117
  - `renderTemplate` function is now available inside templates rendered by the function.
118
+
78
119
  ## [2.1.4] - 2020-04-07
120
+
79
121
  ### Fixed
122
+
80
123
  - `getViewUri` had incorrect portlet ID.
124
+
81
125
  ## [2.1.3] - 2020-02-25
126
+
82
127
  ### Fixed
128
+
83
129
  - Add timestamp to script url in edit mode as well.
84
130
 
85
131
  ## [2.1.2] - 2020-02-21
132
+
86
133
  ### Fixed
134
+
87
135
  - Wrapped `renderApp` script in svDocReady in edit mode to be sure it executes when other bundles are loaded.
88
136
 
89
137
  ## [2.1.1] - 2020-02-14
138
+
90
139
  ### Changed
140
+
91
141
  - Updated readme, heading levels and examples.
92
142
 
93
143
  ## [2.1.0] - 2020-02-14
144
+
94
145
  ### Added
146
+
95
147
  - App data import in client, `@soleil-api/webapp-util/app-data`.
96
148
  - `getViewUri` to get the URI that also renders the page.
97
149
  - `isOnline` to see if the app is online.
98
150
 
99
151
  ### Changed
152
+
100
153
  - `vue` is now an optional depedency.
101
154
 
102
155
  ## [2.0.0] - 2020-02-12
156
+
103
157
  ### Changed
158
+
104
159
  - Now using `currentScript` to reference the script element the app is running in to pass data when using `renderApp`.
105
160
  - `renderApp` is no longer using appName.
106
- - `render` is now called directly in `./app_src/client/index.js`.
107
- - `render` and `App` no longer needs to be exported from `./app_src/client/index.js`.
161
+ - `render` is now called directly in `./app_src/client/index.js`.
162
+ - `render` and `App` no longer needs to be exported from `./app_src/client/index.js`.
package/common/index.js CHANGED
@@ -124,7 +124,7 @@ export function getAppMetadata() {
124
124
  };
125
125
  }
126
126
 
127
- let appData = process.browser ? parseJson('app_data') : undefined;
127
+ let appData = process.browser ? parseJson('app_data') : {};
128
128
 
129
129
  export function setAppData(data) {
130
130
  appData = data;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soleil-se/app-util",
3
- "version": "4.1.3",
4
- "description": "Utility functions for Webapps.",
3
+ "version": "4.1.4",
4
+ "description": "Utility and rendering functions for WebApps.",
5
5
  "main": "./common/index.js",
6
6
  "author": "Soleil AB",
7
7
  "contributors": [
@@ -11,10 +11,7 @@
11
11
  "license": "UNLICENSED",
12
12
  "private": false,
13
13
  "homepage": "https://docs.soleilit.se/03.packages/@soleil-api&app-util",
14
- "optionalDependencies": {
15
- "vue": "^2.6.11"
16
- },
17
- "gitHead": "9fc1fba75e8419058746c7170dcf96ea6c78f4eb",
14
+ "gitHead": "6651e6eb4eb4133134d952e498c45121176c0b13",
18
15
  "dependencies": {},
19
16
  "devDependencies": {}
20
17
  }