@salesforcedevs/docs-components 1.17.2 → 1.17.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/docs-components",
3
- "version": "1.17.2",
3
+ "version": "1.17.5",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -25,5 +25,5 @@
25
25
  "@types/lodash.orderby": "4.6.9",
26
26
  "@types/lodash.uniqby": "4.7.9"
27
27
  },
28
- "gitHead": "456b8ad8b3162df223f9809e66a454cb66b4add0"
28
+ "gitHead": "5aaacff2c6b494563ccf0d8a08ee809f5c1226b7"
29
29
  }
@@ -17,6 +17,6 @@ iframe {
17
17
  border: 1px solid var(--dx-g-gray-90);
18
18
  }
19
19
 
20
- .container {
20
+ .playground-container {
21
21
  position: relative;
22
22
  }
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <div class="container" lwc:if={playgroundAvailable}>
2
+ <div class="playground-container" lwc:if={playgroundAvailable}>
3
3
  <dx-spinner
4
4
  size="large"
5
5
  variant="brand"
@@ -8,7 +8,7 @@
8
8
  <iframe
9
9
  src={playgroundSrc}
10
10
  onload={handleIframeLoad}
11
- title="Component Playground"
11
+ title={playgroundTitle}
12
12
  allow="clipboard-write"
13
13
  ></iframe>
14
14
  </div>
@@ -8,6 +8,19 @@ export default class ComponentPlayground extends LightningElement {
8
8
 
9
9
  isLoading = true;
10
10
 
11
+ /**
12
+ * Returns a formatted title for the component playground
13
+ * Maps 'aura' model to 'Aura' and 'lwc' model to 'Lightning'
14
+ * Capitalizes the first letter of the component name
15
+ * @returns {string} Formatted playground title
16
+ */
17
+ get playgroundTitle() {
18
+ const modelName = this.model === "aura" ? "Aura" : "Lightning";
19
+ const componentName =
20
+ this.component.charAt(0).toUpperCase() + this.component.slice(1);
21
+ return `Example previews and code for ${modelName} ${componentName} component`;
22
+ }
23
+
11
24
  get playgroundAvailable() {
12
25
  return (
13
26
  this.playgroundAppUrl &&