@lwrjs/view-registry 0.6.1 → 0.6.5

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.
@@ -156,14 +156,9 @@ var LwrViewRegistry = class {
156
156
  return false;
157
157
  }
158
158
  async getViewDefinition(view, viewParams, runtimeEnvironment, runtimeParams, renderOptions) {
159
- const {id, bootstrap, rootComponent, contentTemplate, layoutTemplate} = view;
160
159
  const {skipCaching, freezeAssets, viewParamCacheKey} = (0, import_utils.normalizeRenderOptions)(this.runtimeEnvironment, renderOptions);
161
160
  const viewDefCacheKey = (0, import_shared_utils.getCacheKeyFromJson)({
162
- id,
163
- bootstrap,
164
- rootComponent,
165
- contentTemplate,
166
- layoutTemplate,
161
+ ...view,
167
162
  freezeAssets,
168
163
  locale: runtimeParams?.locale,
169
164
  debug: runtimeEnvironment.debug
@@ -180,13 +175,13 @@ var LwrViewRegistry = class {
180
175
  if (this.pendingViewDefinitions.has(pendingViewDefCacheKey)) {
181
176
  return this.pendingViewDefinitions.get(pendingViewDefCacheKey);
182
177
  }
183
- const pendingViewDefinition = this.renderView({id, bootstrap, rootComponent, contentTemplate, layoutTemplate}, viewParams, runtimeEnvironment, runtimeParams, renderOptions);
178
+ const pendingViewDefinition = this.renderView(view, viewParams, runtimeEnvironment, runtimeParams, renderOptions);
184
179
  this.pendingViewDefinitions.set(pendingViewDefCacheKey, pendingViewDefinition);
185
180
  const viewDefinition = await pendingViewDefinition;
186
181
  this.pendingViewDefinitions.delete(pendingViewDefCacheKey);
187
182
  if (cacheDisabled === false) {
188
183
  this.viewDefinitions.set(viewDefCacheKey, {
189
- view: {id, bootstrap, rootComponent, contentTemplate, layoutTemplate},
184
+ view,
190
185
  viewDefinition,
191
186
  paramKey: viewParamKey
192
187
  });
package/build/es/index.js CHANGED
@@ -155,14 +155,9 @@ export class LwrViewRegistry {
155
155
  return false;
156
156
  }
157
157
  async getViewDefinition(view, viewParams, runtimeEnvironment, runtimeParams, renderOptions) {
158
- const { id, bootstrap, rootComponent, contentTemplate, layoutTemplate } = view;
159
158
  const { skipCaching, freezeAssets, viewParamCacheKey } = normalizeRenderOptions(this.runtimeEnvironment, renderOptions);
160
159
  const viewDefCacheKey = getCacheKeyFromJson({
161
- id,
162
- bootstrap,
163
- rootComponent,
164
- contentTemplate,
165
- layoutTemplate,
160
+ ...view,
166
161
  freezeAssets,
167
162
  locale: runtimeParams?.locale,
168
163
  debug: runtimeEnvironment.debug,
@@ -187,13 +182,13 @@ export class LwrViewRegistry {
187
182
  if (this.pendingViewDefinitions.has(pendingViewDefCacheKey)) {
188
183
  return this.pendingViewDefinitions.get(pendingViewDefCacheKey);
189
184
  }
190
- const pendingViewDefinition = this.renderView({ id, bootstrap, rootComponent, contentTemplate, layoutTemplate }, viewParams, runtimeEnvironment, runtimeParams, renderOptions);
185
+ const pendingViewDefinition = this.renderView(view, viewParams, runtimeEnvironment, runtimeParams, renderOptions);
191
186
  this.pendingViewDefinitions.set(pendingViewDefCacheKey, pendingViewDefinition);
192
187
  const viewDefinition = await pendingViewDefinition;
193
188
  this.pendingViewDefinitions.delete(pendingViewDefCacheKey);
194
189
  if (cacheDisabled === false) {
195
190
  this.viewDefinitions.set(viewDefCacheKey, {
196
- view: { id, bootstrap, rootComponent, contentTemplate, layoutTemplate },
191
+ view,
197
192
  viewDefinition,
198
193
  paramKey: viewParamKey,
199
194
  });
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.6.1",
7
+ "version": "0.6.5",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,15 +30,14 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/app-service": "0.6.1",
34
- "@lwrjs/diagnostics": "0.6.1",
35
- "@lwrjs/shared-utils": "0.6.1"
33
+ "@lwrjs/app-service": "0.6.5",
34
+ "@lwrjs/diagnostics": "0.6.5",
35
+ "@lwrjs/shared-utils": "0.6.5"
36
36
  },
37
37
  "devDependencies": {
38
- "@lwrjs/types": "0.6.1"
38
+ "@lwrjs/types": "0.6.5"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=14.15.4 <17"
42
- },
43
- "gitHead": "4d7c44dfae958fe24ef1c94b0f60aa2b15e12f24"
42
+ }
44
43
  }
package/LICENSE DELETED
@@ -1,10 +0,0 @@
1
- MIT LICENSE
2
-
3
- Copyright (c) 2020, Salesforce.com, Inc.
4
- All rights reserved.
5
-
6
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7
-
8
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.