@salesforcedevs/dx-components 1.14.7-alpha5 → 1.14.9-playground-404-1

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": "@salesforcedevs/dx-components",
3
- "version": "1.14.7-alpha5",
3
+ "version": "1.14.9-playground-404-1",
4
4
  "description": "DX Lightning web components",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -5,22 +5,23 @@
5
5
  flex-direction: column;
6
6
  align-items: center;
7
7
  gap: 44px;
8
+ margin-bottom: var(--dx-g-spacing-2xl);
8
9
  }
9
10
 
10
11
  .error-image {
11
- width: 445.467px;
12
- height: 260px;
13
- padding: 42.467px 35.214px 0 35.533px;
12
+ width: 375px;
13
+ height: 218px;
14
14
  }
15
15
 
16
16
  .dx-text-display-4 {
17
17
  font-weight: var(--dx-g-font-demi);
18
18
  letter-spacing: -0.32px;
19
+ text-align: center;
19
20
  }
20
21
 
21
22
  .dx-text-body-1 {
22
23
  letter-spacing: 0.024px;
23
24
  font-weight: var(--dx-g-font-normal);
24
25
  text-align: center;
25
- width: 528px;
26
+ max-width: 528px;
26
27
  }
@@ -5,10 +5,7 @@
5
5
  alt="error fallback image"
6
6
  class="error-image"
7
7
  />
8
- <div class="dx-text-display-4">Temporary Loading Glitch</div>
9
- <div class="dx-text-body-1">
10
- Looks like this content has briefly vanished into the horizon!
11
- Refresh the page and try again.
12
- </div>
8
+ <div class="dx-text-display-4">{title}</div>
9
+ <div class="dx-text-body-1">{description}</div>
13
10
  </div>
14
11
  </template>
@@ -1,3 +1,7 @@
1
- import { LightningElement } from "lwc";
1
+ import { api, LightningElement } from "lwc";
2
2
 
3
- export default class ErrorFallback extends LightningElement {}
3
+ export default class ErrorFallback extends LightningElement {
4
+ @api title: string = "Temporary Loading Glitch";
5
+ @api description: string =
6
+ "Looks like this content has briefly vanished into the horizon! Refresh the page and try again.";
7
+ }
@@ -1,9 +1,7 @@
1
1
  // urlWatcherComponent.ts
2
2
  import { LightningElement } from "lwc";
3
- import UrlWatcher from "../../../utils/urlWatcher";
4
3
 
5
4
  export default class UrlWatcherComponent extends LightningElement {
6
- watcher = UrlWatcher;
7
5
  connectedCallback() {
8
6
  // Just ensure the singleton initializes
9
7
  }
@@ -1,5 +1,9 @@
1
1
  import get from "lodash.get";
2
- import { WordpressPodcastEpisode, WordpressBlogPost } from "typings/custom";
2
+ import {
3
+ WordpressPodcastEpisode,
4
+ WordpressBlogPost,
5
+ WordpressSingleBlogPostResponse
6
+ } from "typings/custom";
3
7
 
4
8
  export const toJson = (value: string | object | null) =>
5
9
  typeof value === "string" ? JSON.parse(value) : value;
@@ -65,6 +69,24 @@ export const normalizePost = ({
65
69
  title
66
70
  });
67
71
 
72
+ export const normalizeSinglePostResponse = ({
73
+ id,
74
+ authors = [],
75
+ date,
76
+ link,
77
+ featured_image,
78
+ yoast_head_json
79
+ }: WordpressSingleBlogPostResponse) => ({
80
+ body: yoast_head_json?.description,
81
+ datetime: date,
82
+ href: link,
83
+ authors: authors,
84
+ imgAlt: "Blogpost image",
85
+ imgSrc: featured_image,
86
+ id,
87
+ title: yoast_head_json?.title
88
+ });
89
+
68
90
  export const normalizeBoolean = (
69
91
  value: string | boolean | number | undefined
70
92
  ): boolean => (typeof value === "string" ? value === "true" : !!value);