@salesforce/templates 66.4.0 → 66.4.2

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.
Files changed (86) hide show
  1. package/lib/generators/baseGenerator.d.ts +1 -1
  2. package/lib/generators/baseGenerator.js +2 -2
  3. package/lib/generators/baseGenerator.js.map +1 -1
  4. package/lib/generators/lightningComponentGenerator.js +1 -3
  5. package/lib/generators/lightningComponentGenerator.js.map +1 -1
  6. package/lib/generators/projectGenerator.js +30 -1
  7. package/lib/generators/projectGenerator.js.map +1 -1
  8. package/lib/templates/project/nativemobile/README.md +21 -0
  9. package/lib/templates/project/nativemobile/ScratchDef.json +5 -0
  10. package/lib/templates/project/nativemobile/appMetadata-content.json +29 -0
  11. package/lib/templates/project/nativemobile/appMetadata-meta.json +5 -0
  12. package/lib/templates/project/nativemobile/buildMetadata-content.json +8 -0
  13. package/lib/templates/project/nativemobile/buildMetadata-meta.json +5 -0
  14. package/lib/templates/project/nativemobile/digitalExperience-meta.xml +4 -0
  15. package/lib/templates/project/nativemobile/ecDefinition-content.json +5 -0
  16. package/lib/templates/project/nativemobile/ecDefinition-meta.json +5 -0
  17. package/lib/templates/project/nativemobile/homeScreen-content.json +77 -0
  18. package/lib/templates/project/nativemobile/homeScreen-meta.json +5 -0
  19. package/lib/templates/project/reactb2e/AGENT.md +17 -13
  20. package/lib/templates/project/reactb2e/CHANGELOG.md +276 -0
  21. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/index.html +2 -2
  22. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/package.json +10 -5
  23. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/app.tsx +1 -9
  24. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/src/components/AgentforceConversationClient.tsx +15 -5
  25. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +1 -0
  26. package/lib/templates/project/reactb2e/_p_/_m_/_w_/_a_/vite.config.ts +1 -2
  27. package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md +11 -5
  28. package/lib/templates/project/reactb2e/_r_/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md +13 -6
  29. package/lib/templates/project/reactb2e/_r_/skills/feature-react-file-upload-file-upload/SKILL.md +396 -0
  30. package/lib/templates/project/reactb2e/_r_/skills/webapp-features/SKILL.md +210 -0
  31. package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-add-component → webapp-react}/SKILL.md +5 -3
  32. package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/header-footer.md +8 -0
  33. package/lib/templates/project/{reactb2x/_r_/skills/webapp-react-add-component → reactb2e/_r_/skills/webapp-react}/implementation/page.md +8 -7
  34. package/lib/templates/project/reactb2e/_r_/skills/webapp-ui-ux/SKILL.md +11 -8
  35. package/lib/templates/project/reactb2e/_r_/webapp-cli-commands.md +88 -0
  36. package/lib/templates/project/reactb2e/_r_/webapp-react-code-quality.md +1 -1
  37. package/lib/templates/project/reactb2e/_r_/webapp-react-typescript.md +1 -1
  38. package/lib/templates/project/reactb2e/_r_/webapp-react.md +55 -1
  39. package/lib/templates/project/reactb2e/_r_/webapp-skills-first.md +1 -1
  40. package/lib/templates/project/reactb2e/_r_/webapp-webapplication.md +159 -0
  41. package/lib/templates/project/reactb2e/_r_/webapp.md +2 -2
  42. package/lib/templates/project/reactb2e/package.json +1 -1
  43. package/lib/templates/project/reactb2e/scripts/prepare-import-unique-fields.js +17 -3
  44. package/lib/templates/project/reactb2e/scripts/setup-cli.mjs +318 -67
  45. package/lib/templates/project/reactb2x/AGENT.md +17 -13
  46. package/lib/templates/project/reactb2x/CHANGELOG.md +276 -0
  47. package/lib/templates/project/reactb2x/_p_/_m_/_d_/_s_/_a1_/sfdc_cms__site/appreacttemplateb2x1/content.json +1 -1
  48. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/index.html +2 -2
  49. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/package.json +10 -4
  50. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/api/userProfileApi.ts +15 -1
  51. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ChangePassword.tsx +1 -1
  52. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ForgotPassword.tsx +1 -1
  53. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Login.tsx +2 -2
  54. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Register.tsx +2 -2
  55. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ResetPassword.tsx +1 -1
  56. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/src/app.tsx +2 -1
  57. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +1 -0
  58. package/lib/templates/project/reactb2x/_p_/_m_/_w_/_a_/vite.config.ts +1 -2
  59. package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/generate-mutation-query.md +11 -5
  60. package/lib/templates/project/reactb2x/_r_/skills/feature-graphql-graphql-data-access/docs/generate-read-query.md +13 -6
  61. package/lib/templates/project/reactb2x/_r_/skills/feature-react-file-upload-file-upload/SKILL.md +396 -0
  62. package/lib/templates/project/reactb2x/_r_/skills/webapp-features/SKILL.md +210 -0
  63. package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-add-component → webapp-react}/SKILL.md +5 -3
  64. package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/header-footer.md +8 -0
  65. package/lib/templates/project/{reactb2e/_r_/skills/webapp-react-add-component → reactb2x/_r_/skills/webapp-react}/implementation/page.md +8 -7
  66. package/lib/templates/project/reactb2x/_r_/skills/webapp-ui-ux/SKILL.md +11 -8
  67. package/lib/templates/project/reactb2x/_r_/webapp-cli-commands.md +88 -0
  68. package/lib/templates/project/reactb2x/_r_/webapp-react-code-quality.md +1 -1
  69. package/lib/templates/project/reactb2x/_r_/webapp-react-typescript.md +1 -1
  70. package/lib/templates/project/reactb2x/_r_/webapp-react.md +55 -1
  71. package/lib/templates/project/reactb2x/_r_/webapp-skills-first.md +1 -1
  72. package/lib/templates/project/reactb2x/_r_/webapp-webapplication.md +159 -0
  73. package/lib/templates/project/reactb2x/_r_/webapp.md +2 -2
  74. package/lib/templates/project/reactb2x/package.json +1 -1
  75. package/lib/templates/project/reactb2x/scripts/prepare-import-unique-fields.js +17 -3
  76. package/lib/templates/project/reactb2x/scripts/setup-cli.mjs +318 -67
  77. package/lib/templates/webapplication/reactbasic/index.html +2 -2
  78. package/lib/templates/webapplication/reactbasic/package.json +3 -3
  79. package/lib/templates/webapplication/reactbasic/src/app.tsx +1 -9
  80. package/lib/templates/webapplication/reactbasic/vite.config.ts +1 -2
  81. package/lib/utils/types.d.ts +1 -1
  82. package/package.json +6 -6
  83. package/lib/templates/project/reactb2e/_r_/webapp-no-node-e.md +0 -65
  84. package/lib/templates/project/reactb2x/_r_/webapp-no-node-e.md +0 -65
  85. /package/lib/templates/project/reactb2e/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/component.md +0 -0
  86. /package/lib/templates/project/reactb2x/_r_/skills/{webapp-react-add-component → webapp-react}/implementation/component.md +0 -0
@@ -3,6 +3,282 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.101.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.101.2...v1.101.3) (2026-03-14)
7
+
8
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.101.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.101.1...v1.101.2) (2026-03-14)
15
+
16
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.101.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.101.0...v1.101.1) (2026-03-13)
23
+
24
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
25
+
26
+
27
+
28
+
29
+
30
+ # [1.101.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.100.2...v1.101.0) (2026-03-13)
31
+
32
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
33
+
34
+
35
+
36
+
37
+
38
+ ## [1.100.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.100.1...v1.100.2) (2026-03-13)
39
+
40
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
41
+
42
+
43
+
44
+
45
+
46
+ ## [1.100.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.100.0...v1.100.1) (2026-03-13)
47
+
48
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
49
+
50
+
51
+
52
+
53
+
54
+ # [1.100.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.99.0...v1.100.0) (2026-03-13)
55
+
56
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
57
+
58
+
59
+
60
+
61
+
62
+ # [1.99.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.98.0...v1.99.0) (2026-03-13)
63
+
64
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
65
+
66
+
67
+
68
+
69
+
70
+ # [1.98.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.97.2...v1.98.0) (2026-03-13)
71
+
72
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
73
+
74
+
75
+
76
+
77
+
78
+ ## [1.97.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.97.1...v1.97.2) (2026-03-13)
79
+
80
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
81
+
82
+
83
+
84
+
85
+
86
+ ## [1.97.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.97.0...v1.97.1) (2026-03-13)
87
+
88
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
89
+
90
+
91
+
92
+
93
+
94
+ # [1.97.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.96.0...v1.97.0) (2026-03-12)
95
+
96
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
97
+
98
+
99
+
100
+
101
+
102
+ # [1.96.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.95.0...v1.96.0) (2026-03-12)
103
+
104
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
105
+
106
+
107
+
108
+
109
+
110
+ # [1.95.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.94.1...v1.95.0) (2026-03-12)
111
+
112
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
113
+
114
+
115
+
116
+
117
+
118
+ ## [1.94.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.94.0...v1.94.1) (2026-03-12)
119
+
120
+
121
+ ### Bug Fixes
122
+
123
+ * adjust features cli @W-21452399 ([#258](https://github.com/salesforce-experience-platform-emu/webapps/issues/258)) ([524abe8](https://github.com/salesforce-experience-platform-emu/webapps/commit/524abe853684a770777b00238432a01d60dd3366))
124
+
125
+
126
+
127
+
128
+
129
+ # [1.94.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.93.1...v1.94.0) (2026-03-12)
130
+
131
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
132
+
133
+
134
+
135
+
136
+
137
+ ## [1.93.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.93.0...v1.93.1) (2026-03-12)
138
+
139
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
140
+
141
+
142
+
143
+
144
+
145
+ # [1.93.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.92.1...v1.93.0) (2026-03-11)
146
+
147
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
148
+
149
+
150
+
151
+
152
+
153
+ ## [1.92.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.92.0...v1.92.1) (2026-03-11)
154
+
155
+
156
+ ### Bug Fixes
157
+
158
+ * **template:** make setup-cli data import idempotent with Apex-based insert ([#254](https://github.com/salesforce-experience-platform-emu/webapps/issues/254)) ([76ee673](https://github.com/salesforce-experience-platform-emu/webapps/commit/76ee673f1f13c117f33550dfbb2fff6870a038dc))
159
+
160
+
161
+
162
+
163
+
164
+ # [1.92.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.91.0...v1.92.0) (2026-03-11)
165
+
166
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
167
+
168
+
169
+
170
+
171
+
172
+ # [1.91.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.4...v1.91.0) (2026-03-11)
173
+
174
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
175
+
176
+
177
+
178
+
179
+
180
+ ## [1.90.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.3...v1.90.4) (2026-03-11)
181
+
182
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
183
+
184
+
185
+
186
+
187
+
188
+ ## [1.90.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.2...v1.90.3) (2026-03-11)
189
+
190
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
191
+
192
+
193
+
194
+
195
+
196
+ ## [1.90.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.1...v1.90.2) (2026-03-11)
197
+
198
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
199
+
200
+
201
+
202
+
203
+
204
+ ## [1.90.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.90.0...v1.90.1) (2026-03-11)
205
+
206
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
207
+
208
+
209
+
210
+
211
+
212
+ # [1.90.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.89.0...v1.90.0) (2026-03-10)
213
+
214
+
215
+ ### Features
216
+
217
+ * Features Skill @W-21452399 ([#248](https://github.com/salesforce-experience-platform-emu/webapps/issues/248)) ([0f4b41b](https://github.com/salesforce-experience-platform-emu/webapps/commit/0f4b41b2887f4b98b48f62b6c133dead8cb5d7e9))
218
+
219
+
220
+
221
+
222
+
223
+ # [1.89.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.88.1...v1.89.0) (2026-03-10)
224
+
225
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
226
+
227
+
228
+
229
+
230
+
231
+ ## [1.88.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.88.0...v1.88.1) (2026-03-10)
232
+
233
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
234
+
235
+
236
+
237
+
238
+
239
+ # [1.88.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.87.0...v1.88.0) (2026-03-10)
240
+
241
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
242
+
243
+
244
+
245
+
246
+
247
+ # [1.87.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.86.0...v1.87.0) (2026-03-10)
248
+
249
+
250
+ ### Features
251
+
252
+ * new webapp specific rules ([#246](https://github.com/salesforce-experience-platform-emu/webapps/issues/246)) ([cff4738](https://github.com/salesforce-experience-platform-emu/webapps/commit/cff4738ed407828c844e1cd412c962e2a64d869d))
253
+
254
+
255
+
256
+
257
+
258
+ # [1.86.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.85.0...v1.86.0) (2026-03-10)
259
+
260
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
261
+
262
+
263
+
264
+
265
+
266
+ # [1.85.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.84.1...v1.85.0) (2026-03-10)
267
+
268
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
269
+
270
+
271
+
272
+
273
+
274
+ ## [1.84.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.84.0...v1.84.1) (2026-03-10)
275
+
276
+ **Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
277
+
278
+
279
+
280
+
281
+
6
282
  # [1.84.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.83.0...v1.84.0) (2026-03-09)
7
283
 
8
284
 
@@ -2,12 +2,12 @@
2
2
  <html lang="en">
3
3
  <head>
4
4
  <meta charset="UTF-8" />
5
- <link rel="icon" type="image/svg+xml" href="/vite.svg" />
5
+ <link rel="icon" type="image/svg+xml" href="vite.svg" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Welcome to React App</title>
8
8
  </head>
9
9
  <body>
10
10
  <div id="root"></div>
11
- <script type="module" src="/src/app.tsx"></script>
11
+ <script type="module" src="src/app.tsx"></script>
12
12
  </body>
13
13
  </html>
@@ -15,11 +15,16 @@
15
15
  "graphql:schema": "node scripts/get-graphql-schema.mjs"
16
16
  },
17
17
  "dependencies": {
18
- "@salesforce/agentforce-conversation-client": "^1.84.0",
19
- "@salesforce/sdk-data": "^1.84.0",
20
- "@salesforce/webapp-experimental": "^1.84.0",
18
+ "@salesforce/agentforce-conversation-client": "file:../../../../../../../../../agentforceConversationClient",
19
+ "@salesforce/micro-frontends-experimental": "file:../../../../../../../../../micro-frontends",
20
+ "@salesforce/sdk-chat": "file:../../../../../../../../../sdk/sdk-chat",
21
+ "@salesforce/sdk-core": "file:../../../../../../../../../sdk/sdk-core",
22
+ "@salesforce/sdk-data": "file:../../../../../../../../../sdk/sdk-data",
23
+ "@salesforce/sdk-lightning": "file:../../../../../../../../../sdk/sdk-lightning",
24
+ "@salesforce/sdk-view": "file:../../../../../../../../../sdk/sdk-view",
25
+ "@salesforce/webapp-experimental": "file:../../../../../../../../../webapps",
21
26
  "@tailwindcss/vite": "^4.1.17",
22
- "@tanstack/react-form": "^1.28.4",
27
+ "@tanstack/react-form": "^1.28.5",
23
28
  "class-variance-authority": "^0.7.1",
24
29
  "clsx": "^2.1.1",
25
30
  "lucide-react": "^0.562.0",
@@ -41,7 +46,7 @@
41
46
  "@graphql-eslint/eslint-plugin": "^4.1.0",
42
47
  "@graphql-tools/utils": "^11.0.0",
43
48
  "@playwright/test": "^1.49.0",
44
- "@salesforce/vite-plugin-webapp-experimental": "^1.84.0",
49
+ "@salesforce/vite-plugin-webapp-experimental": "file:../../../../../../../../../vite-plugin-webapps",
45
50
  "@testing-library/jest-dom": "^6.6.3",
46
51
  "@testing-library/react": "^16.1.0",
47
52
  "@testing-library/user-event": "^14.5.2",
@@ -4,15 +4,7 @@ import { StrictMode } from 'react';
4
4
  import { createRoot } from 'react-dom/client';
5
5
  import './styles/global.css';
6
6
 
7
- // Match Vite base so client-side routes work when deployed under a path (e.g. /lwr/application/ai/c-webapp2/).
8
- // When served at root (e.g. e2e with static serve), use '/' so routes match.
9
- const base = (import.meta.env.BASE_URL ?? '/').replace(/\/$/, '') || '/';
10
- const basename =
11
- typeof window !== 'undefined' &&
12
- (window.location.pathname === '/' ||
13
- !window.location.pathname.startsWith('/lwr/'))
14
- ? '/'
15
- : base;
7
+ const basename = (globalThis as any).SFDC_ENV?.basePath;
16
8
  const router = createBrowserRouter(routes, { basename });
17
9
 
18
10
  createRoot(document.getElementById('root')!).render(
@@ -5,7 +5,7 @@
5
5
  */
6
6
 
7
7
  import { embedAgentforceClient } from "@salesforce/agentforce-conversation-client";
8
- import { useEffect } from "react";
8
+ import { useEffect, useRef } from "react";
9
9
  import type {
10
10
  ResolvedEmbedOptions,
11
11
  AgentforceConversationClientProps,
@@ -57,14 +57,20 @@ export function AgentforceConversationClient({
57
57
  salesforceOrigin,
58
58
  frontdoorUrl,
59
59
  }: AgentforceConversationClientProps) {
60
+ const containerRef = useRef<HTMLDivElement>(null);
61
+ const inline = agentforceClientConfig?.renderingConfig?.mode === "inline";
62
+
60
63
  useEffect(() => {
61
64
  const singleton = getSingleton();
62
65
  if (singleton.initialized || singleton.initPromise) {
63
66
  return;
64
67
  }
65
68
 
69
+ if (inline && !containerRef.current) {
70
+ return;
71
+ }
72
+
66
73
  const initialize = (options: ResolvedEmbedOptions) => {
67
- // If already initialized while this flow was in progress, no-op.
68
74
  if (singleton.initialized) {
69
75
  return;
70
76
  }
@@ -73,7 +79,7 @@ export function AgentforceConversationClient({
73
79
  singleton.initialized = true;
74
80
  return;
75
81
  }
76
- const host = getOrCreateGlobalHost();
82
+ const host = inline ? containerRef.current! : getOrCreateGlobalHost();
77
83
 
78
84
  embedAgentforceClient({
79
85
  container: host,
@@ -119,9 +125,13 @@ export function AgentforceConversationClient({
119
125
  // Intentionally no cleanup:
120
126
  // This component guarantees a single LO initialization per window.
121
127
  };
122
- }, [salesforceOrigin, frontdoorUrl, agentforceClientConfig]);
128
+ }, [salesforceOrigin, frontdoorUrl, agentforceClientConfig, inline]);
129
+
130
+ if (!inline) {
131
+ return null;
132
+ }
123
133
 
124
- return null;
134
+ return <div ref={containerRef} />;
125
135
  }
126
136
 
127
137
  export default AgentforceConversationClient;
@@ -0,0 +1 @@
1
+ {"root":["./src/app.tsx","./src/appLayout.tsx","./src/index.ts","./src/navigationMenu.tsx","./src/router-utils.tsx","./src/routes.tsx","./src/components/AgentforceConversationClient.tsx","./src/components/__inherit_AgentforceConversationClient.tsx","./src/components/alerts/status-alert.tsx","./src/components/layouts/card-layout.tsx","./src/components/ui/alert.tsx","./src/components/ui/button.tsx","./src/components/ui/card.tsx","./src/components/ui/dialog.tsx","./src/components/ui/field.tsx","./src/components/ui/index.ts","./src/components/ui/input.tsx","./src/components/ui/label.tsx","./src/components/ui/pagination.tsx","./src/components/ui/select.tsx","./src/components/ui/separator.tsx","./src/components/ui/skeleton.tsx","./src/components/ui/spinner.tsx","./src/components/ui/table.tsx","./src/components/ui/tabs.tsx","./src/features/global-search/constants.ts","./src/features/global-search/api/objectDetailService.ts","./src/features/global-search/api/objectInfoGraphQLService.ts","./src/features/global-search/api/objectInfoService.ts","./src/features/global-search/api/recordListGraphQLService.ts","./src/features/global-search/components/detail/DetailFields.tsx","./src/features/global-search/components/detail/DetailForm.tsx","./src/features/global-search/components/detail/DetailHeader.tsx","./src/features/global-search/components/detail/DetailLayoutSections.tsx","./src/features/global-search/components/detail/Section.tsx","./src/features/global-search/components/detail/SectionRow.tsx","./src/features/global-search/components/detail/UiApiDetailForm.tsx","./src/features/global-search/components/detail/formatted/FieldValueDisplay.tsx","./src/features/global-search/components/detail/formatted/FormattedAddress.tsx","./src/features/global-search/components/detail/formatted/FormattedEmail.tsx","./src/features/global-search/components/detail/formatted/FormattedPhone.tsx","./src/features/global-search/components/detail/formatted/FormattedText.tsx","./src/features/global-search/components/detail/formatted/FormattedUrl.tsx","./src/features/global-search/components/filters/FilterField.tsx","./src/features/global-search/components/filters/FilterInput.tsx","./src/features/global-search/components/filters/FilterSelect.tsx","./src/features/global-search/components/filters/FiltersPanel.tsx","./src/features/global-search/components/forms/filters-form.tsx","./src/features/global-search/components/forms/submit-button.tsx","./src/features/global-search/components/search/GlobalSearchInput.tsx","./src/features/global-search/components/search/ResultCardFields.tsx","./src/features/global-search/components/search/SearchHeader.tsx","./src/features/global-search/components/search/SearchPagination.tsx","./src/features/global-search/components/search/SearchResultCard.tsx","./src/features/global-search/components/search/SearchResultsPanel.tsx","./src/features/global-search/components/shared/LoadingFallback.tsx","./src/features/global-search/filters/FilterInput.tsx","./src/features/global-search/filters/FilterSelect.tsx","./src/features/global-search/hooks/form.tsx","./src/features/global-search/hooks/useObjectInfoBatch.ts","./src/features/global-search/hooks/useObjectSearchData.ts","./src/features/global-search/hooks/useRecordDetailLayout.ts","./src/features/global-search/hooks/useRecordListGraphQL.ts","./src/features/global-search/pages/DetailPage.tsx","./src/features/global-search/pages/GlobalSearch.tsx","./src/features/global-search/types/schema.d.ts","./src/features/global-search/types/filters/filters.ts","./src/features/global-search/types/filters/picklist.ts","./src/features/global-search/types/objectInfo/objectInfo.ts","./src/features/global-search/types/recordDetail/recordDetail.ts","./src/features/global-search/types/search/searchResults.ts","./src/features/global-search/utils/apiUtils.ts","./src/features/global-search/utils/cacheUtils.ts","./src/features/global-search/utils/debounce.ts","./src/features/global-search/utils/fieldUtils.ts","./src/features/global-search/utils/fieldValueExtractor.ts","./src/features/global-search/utils/filterUtils.ts","./src/features/global-search/utils/formDataTransformUtils.ts","./src/features/global-search/utils/formUtils.ts","./src/features/global-search/utils/graphQLNodeFieldUtils.ts","./src/features/global-search/utils/graphQLObjectInfoAdapter.ts","./src/features/global-search/utils/graphQLRecordAdapter.ts","./src/features/global-search/utils/layoutTransformUtils.ts","./src/features/global-search/utils/linkUtils.ts","./src/features/global-search/utils/paginationUtils.ts","./src/features/global-search/utils/recordUtils.ts","./src/features/global-search/utils/sanitizationUtils.ts","./src/lib/utils.ts","./src/pages/Home.tsx","./src/pages/NotFound.tsx","./src/pages/TestAccPage.tsx","./src/types/conversation.ts","./vite-env.d.ts","./vitest-env.d.ts"],"version":"5.9.3"}
@@ -8,8 +8,7 @@ import codegen from 'vite-plugin-graphql-codegen';
8
8
 
9
9
  export default defineConfig(({ mode }) => {
10
10
  return {
11
- // Ensure root base for e2e/static serve; plugin may override when deployed under a path
12
- base: '/',
11
+ base: './',
13
12
  // Type assertion avoids Plugin type mismatch when dist has its own node_modules (vite/rollup)
14
13
  plugins: [
15
14
  tailwindcss(),
@@ -173,15 +173,21 @@ const QUERY_VARIABLES = {
173
173
 
174
174
  **Workflow**
175
175
 
176
- 1. **Report Step** - Explain that you are able to test the query using the same method used during introspection
177
- 1. You **MUST** report the method you will use, based on the one you used during schema exploration
178
- 2. **Interactive Step** - Ask the user whether they want you to test the query using the proposed method
176
+ 1. **Report Step** - Explain that you are able to test the query using `sf api request rest`
177
+ 2. **Interactive Step** - Ask the user whether they want you to test the query
179
178
  1. **WAIT** for the user's answer.
180
179
  3. **Input Arguments** - You **MUST** ask the user for the input arguments to use
181
180
  1. **WAIT** for the user's answer.
182
181
  4. **Test Query** - If the user are OK with you testing the query:
183
- 1. Use the selected method to test the query
184
- 2. **IMPORTANT** - If you use the Salesforce CLI `sf api request graphql` command, you will need to inject the variable values directly into the query, as this command doesn't accept variables as a parameter
182
+ 1. Use `sf api request rest` to POST the query and variables to the GraphQL endpoint:
183
+ ```bash
184
+ sf api request rest /services/data/v65.0/graphql \
185
+ --method POST \
186
+ --body '{"query":"mutation mutateEntity($input: EntityNameOperationInput!) { uiapi { EntityNameOperation(input: $input) { Record { Id } } } }","variables":{"input":{"EntityName":{"Field":"Value"}}}}'
187
+ ```
188
+ 2. Replace `v65.0` with the API version of the target org
189
+ 3. Replace the `query` value with the generated mutation query string
190
+ 4. Replace the `variables` value with the user-provided input arguments
185
191
  5. **Result Analysis** - Retrieve the `data` and `errors` attributes from the returned payload, and report the result of the test as one of the following options:
186
192
  1. `PARTIAL` if `data` is not an empty object, but `errors` is not an empty list - Explanation: some of the queried fields are not accessible on mutations
187
193
  2. `FAILED` if `data` is an empty object - Explanation: the query is not valid
@@ -168,14 +168,21 @@ const QUERY_VARIABLES = {
168
168
 
169
169
  **Workflow**
170
170
 
171
- 1. **Report Step** - Explain that you are able to test the query using the same method used during introspection
172
- 1. You **MUST** report the method you will use, based on the one you used during schema exploration
173
- 2. **Interactive Step** - Ask the user whether they want you to test the query using the proposed method
171
+ 1. **Report Step** - Explain that you are able to test the query using `sf api request rest`
172
+ 2. **Interactive Step** - Ask the user whether they want you to test the query
174
173
  1. **WAIT** for the user's answer.
175
174
  3. **Test Query** - If the user are OK with you testing the query:
176
- 1. Use the selected method to test the query
177
- 2. Report the result of the test as `SUCCESS` if the query executed without error, or `FAILED` if you got errors
178
- 3. If the query executed without any errors, but you received no data, then the query is valid, and the result of the test is `SUCCESS`
175
+ 1. Use `sf api request rest` to POST the query to the GraphQL endpoint:
176
+ ```bash
177
+ sf api request rest /services/data/v65.0/graphql \
178
+ --method POST \
179
+ --body '{"query":"query GetData { uiapi { query { EntityName { edges { node { Id } } } } } }"}'
180
+ ```
181
+ 2. Replace `v65.0` with the API version of the target org
182
+ 3. Replace the `query` value with the generated read query string
183
+ 4. If the query uses variables, include them in the JSON body as a `variables` key
184
+ 5. Report the result of the test as `SUCCESS` if the query executed without error, or `FAILED` if you got errors
185
+ 6. If the query executed without any errors, but you received no data, then the query is valid, and the result of the test is `SUCCESS`
179
186
  4. **Remediation Step** - If status is `FAILED`, use the [`FAILED` status handling workflows](#failed-status-handling-workflow)
180
187
 
181
188
  ### `FAILED` Status Handling Workflow