@lwrjs/view-registry 0.7.0-alpha.10 → 0.7.0-alpha.13

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.
@@ -56,7 +56,6 @@ async function getHtmlResources(view, viewParams, resourceContext) {
56
56
  const visitedCache = new Map();
57
57
  const imports = {};
58
58
  const rootComponents = [];
59
- const rootProperties = {};
60
59
  const requiredAmdModules = [];
61
60
  const preloadAmdModules = [];
62
61
  if (isAMD) {
@@ -114,9 +113,6 @@ async function getHtmlResources(view, viewParams, resourceContext) {
114
113
  moduleResources.push((0, import_utils.getModuleResourceByUri)(uri2, runtimeEnvironment, true));
115
114
  rootComponents.push(specifier);
116
115
  imports[specifier] = uri2;
117
- if (isSSR && props) {
118
- rootProperties[specifier] = props;
119
- }
120
116
  if (isAMD) {
121
117
  preloadAmdModules.push(specifier);
122
118
  for (const staticDep of graph.graphs[0].static) {
@@ -142,7 +138,6 @@ async function getHtmlResources(view, viewParams, resourceContext) {
142
138
  default: (0, import_shared_utils.getModuleUriPrefix)(runtimeEnvironment, runtimeParams)
143
139
  },
144
140
  rootComponents,
145
- rootProperties: isSSR ? rootProperties : void 0,
146
141
  ...isAMD && {requiredModules: requiredAmdModules},
147
142
  ...isAMD && {preloadModules: preloadAmdModules}
148
143
  }, runtimeEnvironment, runtimeParams));
@@ -56,7 +56,6 @@ async function getHtmlResources(view, viewParams, resourceContext) {
56
56
  const visitedCache = new Map();
57
57
  const imports = {};
58
58
  const rootComponents = [];
59
- const rootProperties = {};
60
59
  const requiredAmdModules = [];
61
60
  const preloadAmdModules = [];
62
61
  if (isAMD) {
@@ -115,9 +114,6 @@ async function getHtmlResources(view, viewParams, resourceContext) {
115
114
  moduleResources.push((0, import_utils.getModuleResourceByUri)(uri2, runtimeEnvironment, true));
116
115
  rootComponents.push(specifier);
117
116
  imports[specifier] = uri2;
118
- if (isSSR && props) {
119
- rootProperties[specifier] = props;
120
- }
121
117
  if (isAMD) {
122
118
  preloadAmdModules.push(specifier);
123
119
  for (const staticDep of graph.graphs[0].static) {
@@ -142,7 +138,6 @@ async function getHtmlResources(view, viewParams, resourceContext) {
142
138
  imports: importMetadata?.imports,
143
139
  index: importMetadata?.index,
144
140
  rootComponents,
145
- rootProperties: isSSR ? rootProperties : void 0,
146
141
  ...isAMD && {requiredModules: requiredAmdModules},
147
142
  ...isAMD && {preloadModules: preloadAmdModules}
148
143
  }, runtimeEnvironment, runtimeParams));
@@ -45,7 +45,7 @@ var LwrViewHandler = class {
45
45
  return response;
46
46
  }
47
47
  const {view, viewParams, renderOptions} = normalizeViewProperties(viewRequest, response, route, this.globalConfig);
48
- const viewDefinition2 = await this.viewRegistry.getViewDefinition(view, viewParams, runtimeEnvironment, runtimeParams, renderOptions);
48
+ const viewDefinition2 = await this.viewRegistry.getViewDefinition(view, viewParams, runtimeEnvironment, {...runtimeParams, params: viewRequest.params}, renderOptions);
49
49
  return {
50
50
  ...response,
51
51
  body: viewDefinition2.renderedView,
@@ -114,7 +114,7 @@ var LwrViewHandler = class {
114
114
  rootComponent,
115
115
  contentTemplate,
116
116
  layoutTemplate
117
- }, {page, ...properties}, runtimeEnvironment, runtimeParams);
117
+ }, {page, ...properties}, runtimeEnvironment, {...runtimeParams, params: viewRequest.params});
118
118
  return viewDefinition;
119
119
  }
120
120
  async getRouteHandlerResponse(viewRequest, route, runtimeEnvironment, runtimeParams = {}) {
@@ -35,8 +35,6 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
35
35
  const imports = {};
36
36
  // Collection of root view component specifiers
37
37
  const rootComponents = [];
38
- // Collection of root view component properties, used for SSR hydration
39
- const rootProperties = {};
40
38
  // Collection of modules specifiers that MUST be loaded in the view
41
39
  const requiredAmdModules = [];
42
40
  // Collection of modules that will be loaded in the view
@@ -124,10 +122,6 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
124
122
  // ADD register custom elements as a uri addressable rootComponents
125
123
  rootComponents.push(specifier);
126
124
  imports[specifier] = uri;
127
- // ADD properties for each rootComponent if SSR is on
128
- if (isSSR && props) {
129
- rootProperties[specifier] = props;
130
- }
131
125
  if (isAMD) {
132
126
  preloadAmdModules.push(specifier);
133
127
  for (const staticDep of graph.graphs[0].static) {
@@ -156,7 +150,6 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
156
150
  default: getModuleUriPrefix(runtimeEnvironment, runtimeParams),
157
151
  },
158
152
  rootComponents,
159
- rootProperties: isSSR ? rootProperties : undefined,
160
153
  ...(isAMD && { requiredModules: requiredAmdModules }),
161
154
  ...(isAMD && { preloadModules: preloadAmdModules }),
162
155
  }, runtimeEnvironment, runtimeParams));
@@ -35,8 +35,6 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
35
35
  const imports = {};
36
36
  // Collection of root view component specifiers
37
37
  const rootComponents = [];
38
- // Collection of root view component properties, used for SSR hydration
39
- const rootProperties = {};
40
38
  // Collection of modules specifiers that MUST be loaded in the view
41
39
  const requiredAmdModules = [];
42
40
  // Collection of modules that will be loaded in the view
@@ -124,10 +122,6 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
124
122
  // ADD register custom elements as a uri addressable rootComponents
125
123
  rootComponents.push(specifier);
126
124
  imports[specifier] = uri;
127
- // ADD properties for each rootComponent if SSR is on
128
- if (isSSR && props) {
129
- rootProperties[specifier] = props;
130
- }
131
125
  if (isAMD) {
132
126
  preloadAmdModules.push(specifier);
133
127
  for (const staticDep of graph.graphs[0].static) {
@@ -155,7 +149,6 @@ export async function getHtmlResources(view, viewParams, resourceContext) {
155
149
  imports: importMetadata?.imports,
156
150
  index: importMetadata?.index,
157
151
  rootComponents,
158
- rootProperties: isSSR ? rootProperties : undefined,
159
152
  ...(isAMD && { requiredModules: requiredAmdModules }),
160
153
  ...(isAMD && { preloadModules: preloadAmdModules }),
161
154
  }, runtimeEnvironment, runtimeParams));
@@ -27,7 +27,7 @@ export class LwrViewHandler {
27
27
  }
28
28
  // Process ViewDefinitionResponse
29
29
  const { view, viewParams, renderOptions } = normalizeViewProperties(viewRequest, response, route, this.globalConfig);
30
- const viewDefinition = await this.viewRegistry.getViewDefinition(view, viewParams, runtimeEnvironment, runtimeParams, renderOptions);
30
+ const viewDefinition = await this.viewRegistry.getViewDefinition(view, viewParams, runtimeEnvironment, { ...runtimeParams, params: viewRequest.params }, renderOptions);
31
31
  return {
32
32
  ...response,
33
33
  body: viewDefinition.renderedView,
@@ -127,7 +127,7 @@ export class LwrViewHandler {
127
127
  rootComponent,
128
128
  contentTemplate,
129
129
  layoutTemplate,
130
- }, { page, ...properties }, runtimeEnvironment, runtimeParams);
130
+ }, { page, ...properties }, runtimeEnvironment, { ...runtimeParams, params: viewRequest.params });
131
131
  return viewDefinition;
132
132
  }
133
133
  async getRouteHandlerResponse(
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
7
- "version": "0.7.0-alpha.10",
7
+ "version": "0.7.0-alpha.13",
8
8
  "homepage": "https://developer.salesforce.com/docs/platform/lwr/overview",
9
9
  "repository": {
10
10
  "type": "git",
@@ -30,15 +30,15 @@
30
30
  "build/**/*.d.ts"
31
31
  ],
32
32
  "dependencies": {
33
- "@lwrjs/app-service": "0.7.0-alpha.10",
34
- "@lwrjs/diagnostics": "0.7.0-alpha.10",
35
- "@lwrjs/shared-utils": "0.7.0-alpha.10"
33
+ "@lwrjs/app-service": "0.7.0-alpha.13",
34
+ "@lwrjs/diagnostics": "0.7.0-alpha.13",
35
+ "@lwrjs/shared-utils": "0.7.0-alpha.13"
36
36
  },
37
37
  "devDependencies": {
38
- "@lwrjs/types": "0.7.0-alpha.10"
38
+ "@lwrjs/types": "0.7.0-alpha.13"
39
39
  },
40
40
  "engines": {
41
41
  "node": ">=14.15.4 <17"
42
42
  },
43
- "gitHead": "83c1e65e2169094cb55ac2c37e5aef16d3a9aa4a"
43
+ "gitHead": "d4e342e9d5e39e96e8a520a52308924ec9dd3821"
44
44
  }