@salesforcedevs/docs-components 0.0.7-edit → 0.0.8-edit

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": "0.0.7-edit",
3
+ "version": "0.0.8-edit",
4
4
  "description": "Docs Lightning web components for DSC",
5
5
  "license": "MIT",
6
6
  "main": "index.js",
@@ -6,7 +6,6 @@
6
6
  position: absolute;
7
7
  top: 10px;
8
8
  left: 50%;
9
- transform: translateX(-50%);
10
9
  z-index: 1000;
11
10
  }
12
11
 
@@ -4,7 +4,9 @@ import { normalizeBoolean } from "dxUtils/normalizers";
4
4
 
5
5
  interface ApiResponse {
6
6
  success: boolean;
7
- data?: string;
7
+ data?: {
8
+ content: string;
9
+ };
8
10
  message?: string;
9
11
  error?: string;
10
12
  }
@@ -35,7 +37,7 @@ export default class EditFile extends LightningElement {
35
37
  private _disabled: boolean = false;
36
38
 
37
39
  // API Configuration
38
- private static readonly FETCH_ENDPOINT = "/api/file/fetch";
40
+ private static readonly FETCH_ENDPOINT = "https://1208ddd77328.ngrok-free.app/api/file-retrieval/retrieve";
39
41
  private static readonly SAVE_ENDPOINT = "/api/file/save";
40
42
 
41
43
  get popoverClass() {
@@ -89,8 +91,8 @@ export default class EditFile extends LightningElement {
89
91
  "Content-Type": "application/json",
90
92
  },
91
93
  body: JSON.stringify({
92
- fileName: this.fileName,
93
- action: "fetch"
94
+ source: this.source,
95
+ href: this.fileName
94
96
  })
95
97
  });
96
98
 
@@ -101,8 +103,8 @@ export default class EditFile extends LightningElement {
101
103
  const data: ApiResponse = await response.json();
102
104
 
103
105
  if (data.success && data.data !== undefined) {
104
- this.fileContent = data.data;
105
- this.originalContent = data.data;
106
+ this.fileContent = data.data.content;
107
+ this.originalContent = data.data.content;
106
108
  this.errorMessage = "";
107
109
  } else {
108
110
  this.errorMessage = data.error || data.message || "Failed to load file content";