@salesforce/webapp-template-feature-react-chart-experimental 1.107.2 → 1.107.4

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 (30) hide show
  1. package/dist/.a4drules/features/feature-react-agentforce-conversation-client-embedded-agent-rule.md +30 -6
  2. package/dist/.a4drules/skills/creating-webapp/SKILL.md +20 -0
  3. package/dist/.a4drules/skills/deploying-to-salesforce/SKILL.md +229 -0
  4. package/dist/.a4drules/skills/exploring-graphql-schema/SKILL.md +7 -18
  5. package/dist/.a4drules/skills/managing-agentforce-conversation-client/SKILL.md +186 -0
  6. package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/constraints.md +134 -0
  7. package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/examples.md +132 -0
  8. package/dist/.a4drules/skills/managing-agentforce-conversation-client/references/style-tokens.md +101 -0
  9. package/dist/.a4drules/skills/{integrating-agentforce-conversation-client/docs → managing-agentforce-conversation-client/references}/troubleshooting.md +9 -12
  10. package/dist/.a4drules/skills/using-graphql/SKILL.md +2 -1
  11. package/dist/.a4drules/webapp-code-quality.md +5 -2
  12. package/dist/.a4drules/webapp-data-access.md +25 -0
  13. package/dist/.a4drules/webapp-deployment.md +32 -0
  14. package/dist/.a4drules/webapp-react-typescript.md +4 -12
  15. package/dist/.a4drules/webapp-react.md +7 -13
  16. package/dist/AGENT.md +3 -0
  17. package/dist/CHANGELOG.md +19 -0
  18. package/dist/eslint.config.js +7 -0
  19. package/dist/force-app/main/default/webapplications/feature-react-chart/eslint.config.js +2 -0
  20. package/dist/force-app/main/default/webapplications/feature-react-chart/package.json +3 -9
  21. package/dist/force-app/main/default/webapplications/feature-react-chart/src/app.tsx +4 -1
  22. package/dist/force-app/main/default/webapplications/feature-react-chart/src/components/alerts/status-alert.tsx +1 -1
  23. package/dist/force-app/main/default/webapplications/feature-react-chart/tsconfig.json +7 -1
  24. package/dist/package-lock.json +9995 -0
  25. package/dist/package.json +7 -7
  26. package/package.json +2 -2
  27. package/dist/.a4drules/skills/generating-micro-frontend-lwc/SKILL.md +0 -137
  28. package/dist/.a4drules/skills/integrating-agentforce-conversation-client/SKILL.md +0 -92
  29. package/dist/.a4drules/skills/integrating-agentforce-conversation-client/docs/embed-examples.md +0 -116
  30. package/dist/force-app/main/default/webapplications/feature-react-chart/tsconfig.tsbuildinfo +0 -1
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "1.107.2",
3
+ "version": "1.107.4",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
@@ -10,7 +10,7 @@
10
10
  "sf-project-setup": "node scripts/sf-project-setup.mjs",
11
11
  "build": "echo 'No build required for base-sfdx-project'",
12
12
  "clean": "echo 'No clean required for base-sfdx-project'",
13
- "lint": "eslint **/{aura,lwc}/**/*.js",
13
+ "lint": "eslint --no-error-on-unmatched-pattern **/{aura,lwc}/**/*.js",
14
14
  "test": "npm run test:unit",
15
15
  "test:coverage": "npm run test",
16
16
  "test:unit": "sfdx-lwc-jest -- --passWithNoTests",
@@ -23,13 +23,13 @@
23
23
  "setup": "node scripts/setup-cli.mjs"
24
24
  },
25
25
  "devDependencies": {
26
- "@lwc/eslint-plugin-lwc": "^2.0.0",
26
+ "@lwc/eslint-plugin-lwc": "^3.3.0",
27
27
  "@prettier/plugin-xml": "^3.2.2",
28
- "@salesforce/eslint-config-lwc": "^3.2.3",
29
- "@salesforce/eslint-plugin-aura": "^2.0.0",
30
- "@salesforce/eslint-plugin-lightning": "^1.0.0",
28
+ "@salesforce/eslint-config-lwc": "^4.1.0",
29
+ "@salesforce/eslint-plugin-aura": "^3.0.0",
30
+ "@salesforce/eslint-plugin-lightning": "^2.0.0",
31
31
  "@salesforce/sfdx-lwc-jest": "^7.0.1",
32
- "eslint": "8.57.1",
32
+ "eslint": "^9.39.0",
33
33
  "eslint-plugin-import": "^2.25.4",
34
34
  "eslint-plugin-jest": "^28.8.1",
35
35
  "husky": "^9.1.5",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-feature-react-chart-experimental",
3
- "version": "1.107.2",
3
+ "version": "1.107.4",
4
4
  "description": "Chart feature with analytics chart components, agent skills, and rules (Recharts)",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -27,7 +27,7 @@
27
27
  "clean": "rm -rf dist"
28
28
  },
29
29
  "devDependencies": {
30
- "@salesforce/webapp-experimental": "^1.107.2",
30
+ "@salesforce/webapp-experimental": "^1.107.4",
31
31
  "@types/react": "^19.2.7",
32
32
  "@types/react-dom": "^19.2.3",
33
33
  "react-dom": "^19.2.1",
@@ -1,137 +0,0 @@
1
- ---
2
- name: generating-micro-frontend-lwc
3
- description: Generate a Micro Frontend LWC component for a Web Application.
4
- license: Proprietary. LICENSE.txt has complete terms
5
- metadata:
6
- author: salesforce-experience-platform-emu/lwc-admins
7
- ---
8
-
9
- # Micro Frontend generation (workflow)
10
-
11
- When the user wants a Micro Frontend for a Web Application, follow this workflow.
12
-
13
- ## 1. Install the dependency
14
-
15
- Micro Frontends are generated using the `generate-micro-frontend` CLI command from the `@salesforce/micro-frontends-experimental` package.
16
-
17
- ```bash
18
- npm install @salesforce/micro-frontends-experimental
19
- ```
20
-
21
- The dependency should be added to the project's `package.json` dependencies.
22
-
23
- ## 2. Identify the Web Application
24
-
25
- - Verify the Web Application exists in `force-app/main/default/webapplications/<web-app-name>/`.
26
- - Confirm the Web Application has a `lightningOut` target in its `webapplication-meta.xml` file.
27
- - If no Web Application exists, the user must create one first using the Web Apps template system.
28
-
29
- ## 3. Generate the Micro Frontend component
30
-
31
- Run the `generate-micro-frontend` command with the Web Application name from the root of an SFDX project:
32
-
33
- ```bash
34
- npx generate-micro-frontend <web-app-name>
35
- ```
36
-
37
- This creates:
38
-
39
- - A custom wrapper LWC component in `force-app/main/default/lwc/<webAppName>/`. This is the "Micro Frontend component".
40
- - The static `microFrontendShell` component that handles iframe communication.
41
-
42
- Notes:
43
-
44
- - The command may be added to the project's `package.json` scripts for convenience.
45
- - The Micro Frontend component uses the Web Application name (e.g. `my-web-app/`) in camelCase for its folder and file names (e.g. `myWebApp/myWebApp.js`, `myWebApp/myWebApp.html`).
46
-
47
- ## 4. Customize the Micro Frontend component metadata
48
-
49
- Edit the `<webAppName>.js-meta.xml` file to:
50
-
51
- - Set appropriate `targets` (e.g. `lightning__HomePage`, `lightning__AppPage`, `lightning__RecordPage`, `lightningCommunity__Page`)
52
- - Add `targetConfigs` for page-specific properties
53
- - Optionally update the `masterLabel` and `description`
54
-
55
- Example:
56
-
57
- ```xml
58
- <targetConfigs>
59
- <targetConfig targets="lightning__HomePage">
60
- <property name="height" type="Integer" min="0" max="600" default="300" />
61
- </targetConfig>
62
- </targetConfigs>
63
- ```
64
-
65
- ## 5. Pass properties to the Micro Frontend component
66
-
67
- Edit the `<webAppName>.js` file to customize the `properties` getter:
68
-
69
- ```javascript
70
- @api height;
71
-
72
- @api get properties() {
73
- return {
74
- height: this.height,
75
- // Add any other data your Web Application needs
76
- };
77
- }
78
- ```
79
-
80
- All properties are passed to the embedded Web Application via `postMessage` and can be accessed in the app's code.
81
-
82
- ## 6. Deploy and test
83
-
84
- Deploy the Micro Frontend component using standard SF CLI commands:
85
-
86
- ```bash
87
- sf project deploy start --source-dir force-app/main/default
88
- ```
89
-
90
- Add the component to a page using Lightning App Builder or Experience Builder and verify it loads correctly.
91
-
92
- # Micro Frontend component customization examples
93
-
94
- ## Record page example
95
-
96
- Command to generate a Micro Frontend component for the `my-site` Web Application:
97
-
98
- ```bash
99
- npx generate-micro-frontend my-site
100
- ```
101
-
102
- `mySite.js-meta.xml` file with a `lightning__RecordPage` target:
103
-
104
- ```xml
105
- <?xml version="1.0" encoding="UTF-8"?>
106
- <LightningComponentBundle xmlns="http://soap.sforce.com/2006/04/metadata">
107
- <apiVersion>66.0</apiVersion>
108
- <isExposed>true</isExposed>
109
- <masterLabel>Micro Frontend for "My Site"</masterLabel>
110
- <targets>
111
- <target>lightning__RecordPage</target>
112
- </targets>
113
- <targetConfigs>
114
- <targetConfig targets="lightning__RecordPage">
115
- <property name="mode" type="String" default="dark" />
116
- </targetConfig>
117
- </targetConfigs>
118
- </LightningComponentBundle>
119
- ```
120
-
121
- `mySite.js` file with public properties and `properties` getter:
122
-
123
- ```js
124
- // Micro Frontend component
125
- export default class mySite extends LightningElement {
126
- @api recordId;
127
- @api mode;
128
-
129
- @api get properties() {
130
- // This data is passed to the Micro Frontend
131
- return {
132
- recordId: this.recordId, // automatically populated for lightning__RecordPage target
133
- mode: this.mode, // matches the mode targetConfig
134
- };
135
- }
136
- }
137
- ```
@@ -1,92 +0,0 @@
1
- ---
2
- name: integrating-agentforce-conversation-client
3
- description: Embed an Agentforce conversation client (chat UI) into a React web application using the AgentforceConversationClient component. Use when the user wants to add or integrate a chat widget, chatbot, conversation client, agent chat, or conversational interface in a React app, or when they mention Agentforce chat, Agentforce widget, employee agent, travel agent, HR agent, or embedding a Salesforce agent. ALWAYS use this skill instead of building a chat UI from scratch. NEVER generate custom chat components, use third-party chat libraries, or implement chat with WebSockets or REST APIs. Do NOT use for Lightning Web Components (LWC), non-React frameworks.
4
- ---
5
-
6
- # Embedded Agentforce chat (flat-prop API)
7
-
8
- Use this workflow whenever the user wants add or update Agentforce chat in React.
9
-
10
- ## 1) Get agent id first
11
-
12
- Ask for the Salesforce agent id (18-char id starting with `0Xx`). Do not proceed without it.
13
-
14
- Placeholder convention for all examples in this file:
15
-
16
- `<AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />`
17
-
18
- ## 2) Install package
19
-
20
- ```bash
21
- npm install @salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental
22
- ```
23
-
24
- ## 3) Use component in app layout
25
-
26
- Render a single instance in the shared layout (alongside `<Outlet />`).
27
-
28
- ```tsx
29
- import { Outlet } from "react-router";
30
- import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
31
-
32
- export default function AppLayout() {
33
- return (
34
- <>
35
- <Outlet />
36
- <AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />
37
- </>
38
- );
39
- }
40
- ```
41
-
42
- ## 4) Flat props only
43
-
44
- This package uses a flat prop API. Use these props directly on the component:
45
-
46
- - `agentId` (required in practice)
47
- - `inline` (`true` = inline, omitted/false = floating)
48
- - `headerEnabled` (defaults to true for floating; actual use case for inline mode)
49
- - `width`, `height` (actual work is when inline mode is true)
50
- - `styleTokens`
51
- - `salesforceOrigin`, `frontdoorUrl`
52
-
53
- ## 5) Inline mode example
54
-
55
- ```tsx
56
- <AgentforceConversationClient
57
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
58
- inline
59
- width={420}
60
- height={600}
61
- />
62
- ```
63
-
64
- ## 6) Theming example
65
-
66
- ```tsx
67
- <AgentforceConversationClient
68
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
69
- styleTokens={{
70
- headerBlockBackground: "#0176d3",
71
- headerBlockTextColor: "#ffffff",
72
- }}
73
- />
74
- ```
75
-
76
- ## 7) Do not do this
77
-
78
- - Do not create custom chat UIs.
79
- - Do not use third-party chat libraries.
80
- - Do not call `embedAgentforceClient` directly from @salesforce/agentforce-conversation-client.
81
-
82
- ## 8) Prerequisites
83
-
84
- Ensure org setup is valid:
85
-
86
- 1. Agent is active and deployed to the correct channel.
87
- 2. `localhost:<PORT>` is trusted for inline frames in local dev.
88
- 3. First-party Salesforce cookie restriction is disabled when required for embedding.
89
-
90
- ## Troubleshooting
91
-
92
- If the chat widget does not appear, fails to authenticate, or behaves unexpectedly, see [troubleshooting.md](docs/troubleshooting.md).
@@ -1,116 +0,0 @@
1
- # Embed examples (flat-prop API)
2
-
3
- All examples use `AgentforceConversationClient` with flat props.
4
-
5
- > `agentId` is required in practice. Use this placeholder pattern in examples: `"<USER_AGENT_ID_18_CHAR_0Xx...>"`.
6
-
7
- ---
8
-
9
- ## Floating mode (default)
10
-
11
- ```tsx
12
- <AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />
13
- ```
14
-
15
- ## Explicit floating
16
-
17
- ```tsx
18
- <AgentforceConversationClient agentId="<USER_AGENT_ID_18_CHAR_0Xx...>" />
19
- ```
20
-
21
- ---
22
-
23
- ## Inline mode
24
-
25
- ### Fixed pixels
26
-
27
- ```tsx
28
- <AgentforceConversationClient
29
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
30
- inline
31
- width={420}
32
- height={600}
33
- />
34
- ```
35
-
36
- ### CSS string size
37
-
38
- ```tsx
39
- <AgentforceConversationClient
40
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
41
- inline
42
- width="100%"
43
- height="80vh"
44
- />
45
- ```
46
-
47
- ### Inline sidebar
48
-
49
- ```tsx
50
- <div style={{ display: "flex", height: "100vh" }}>
51
- <main style={{ flex: 1 }}>{/* App content */}</main>
52
- <aside style={{ width: 400 }}>
53
- <AgentforceConversationClient
54
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
55
- inline
56
- width="100%"
57
- height="100%"
58
- />
59
- </aside>
60
- </div>
61
- ```
62
-
63
- ---
64
-
65
- ## Theming
66
-
67
- ```tsx
68
- <AgentforceConversationClient
69
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
70
- styleTokens={{
71
- headerBlockBackground: "#0176d3",
72
- headerBlockTextColor: "#ffffff",
73
- messageBlockInboundColor: "#0176d3",
74
- }}
75
- />
76
- ```
77
-
78
- ---
79
-
80
- ## Inline with header enabled
81
-
82
- ```tsx
83
- <AgentforceConversationClient
84
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
85
- inline
86
- width={420}
87
- height={600}
88
- headerEnabled
89
- />
90
- ```
91
-
92
- `headerEnabled` defaults to `true` for floating mode, and you can use it in inline mode to add/remove the header.
93
-
94
- ---
95
-
96
- ## Full layout example
97
-
98
- ```tsx
99
- import { Outlet } from "react-router";
100
- import { AgentforceConversationClient } from "@salesforce/webapp-template-feature-react-agentforce-conversation-client-experimental";
101
-
102
- export default function AppLayout() {
103
- return (
104
- <>
105
- <Outlet />
106
- <AgentforceConversationClient
107
- agentId="<USER_AGENT_ID_18_CHAR_0Xx...>"
108
- styleTokens={{
109
- headerBlockBackground: "#0176d3",
110
- headerBlockTextColor: "#ffffff",
111
- }}
112
- />
113
- </>
114
- );
115
- }
116
- ```
@@ -1 +0,0 @@
1
- {"root":["./src/app.tsx","./src/appLayout.tsx","./src/index.ts","./src/navigationMenu.tsx","./src/router-utils.tsx","./src/routes.tsx","./src/components/AnalyticsChart.tsx","./src/components/ChartContainer.tsx","./src/components/alerts/status-alert.tsx","./src/components/layouts/card-layout.tsx","./src/components/ui/alert.tsx","./src/components/ui/badge.tsx","./src/components/ui/breadcrumb.tsx","./src/components/ui/button.tsx","./src/components/ui/calendar.tsx","./src/components/ui/card.tsx","./src/components/ui/checkbox.tsx","./src/components/ui/collapsible.tsx","./src/components/ui/datePicker.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/popover.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/lib/utils.ts","./src/pages/ChartPage.tsx","./src/pages/Home.tsx","./src/pages/NotFound.tsx","./src/types/chart.ts","./vite-env.d.ts","./vitest-env.d.ts"],"version":"5.9.3"}