@gudhub/ssg-web-components-library 1.0.28 → 1.0.30

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gudhub/ssg-web-components-library",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -20,6 +20,8 @@ class BreadcrumbsComponent extends GHComponent {
20
20
 
21
21
  let currentUrl = new URL(window.location.href);
22
22
  currentUrl = currentUrl.searchParams.get('path');
23
+
24
+ this.items = this.generateBreadcrumbs(this.initialRoute, currentUrl);
23
25
  }
24
26
 
25
27
  this.items === null ? console.error(`Didn't find current route in config, current URL: ${currentUrl}`) : null;
@@ -17,8 +17,11 @@ class MasonryGallery extends GHComponent {
17
17
  }
18
18
 
19
19
  async onServerRender() {
20
+ // If this.application is null, and then getGhData is called, the null value is passed as an argument to the chapter parameter of the getGhData method, which causes an error.
21
+ // If this.application is null, we pass undefined instead, so the parameter can be set to the default value specified in getGhData.
22
+ this.application = this.hasAttribute('application') ? this.getAttribute('application') : undefined;
20
23
  this.ghId = this.getAttribute('data-gh-id') || null;
21
- this.json = await super.getGhData(this.ghId);
24
+ this.json = await super.getGhData(this.ghId, this.application);
22
25
 
23
26
  if (Array.isArray(this.json.items)) {
24
27
  const isMoreItems = this.json.moreItems ? this.json.moreItems : null;
@@ -2,6 +2,7 @@ masonry-gallery {
2
2
  --border-radius: 7px;
3
3
  --max-grid-height: none;
4
4
  --grid-item-margin-bottom: 10px;
5
+ background-color: var(--bg-color);
5
6
  .masonry-grid {
6
7
  width: 100%;
7
8
  height: 100%;