@salesforce/webapp-template-app-react-sample-b2e-experimental 1.53.1 → 1.54.0
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/dist/.a4drules/build-validation.md +1 -1
- package/dist/.a4drules/react.md +1 -1
- package/dist/AGENT.md +1 -1
- package/dist/CHANGELOG.md +19 -0
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/package.json +1 -1
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/dashboard.ts +31 -6
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenance.ts +25 -11
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/properties.ts +13 -2
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/utils/accounts.ts +14 -6
- package/dist/package.json +1 -1
- package/package.json +3 -3
- package/dist/force-app/main/default/webapplications/appreactsampleb2e/package-lock.json +0 -14373
|
@@ -66,7 +66,7 @@ npm run lint # Run ESLint (always available)
|
|
|
66
66
|
|
|
67
67
|
## Key Commands (web app directory)
|
|
68
68
|
```bash
|
|
69
|
-
npm run
|
|
69
|
+
npm run dev # Start development server (vite)
|
|
70
70
|
npm run build # TypeScript + Vite build; check deployment readiness
|
|
71
71
|
npm run lint # Run ESLint
|
|
72
72
|
```
|
package/dist/.a4drules/react.md
CHANGED
|
@@ -33,7 +33,7 @@ The layout file is: `force-app/main/default/webapplications/<appName>/src/appLay
|
|
|
33
33
|
- Main entry component: `force-app/main/default/webapplications/<appName>/src/App.tsx`
|
|
34
34
|
- **Theme/layout shell**: `force-app/main/default/webapplications/<appName>/src/appLayout.tsx` — wraps all routed content (navigation, header, sidebar, outlet). Routes use `<AppLayout />` as the layout element; page content renders inside it via `<Outlet />`. When making UI edits that affect global layout, navigation, header, footer, sidebar, or theme, **you must consider and edit appLayout.tsx** in addition to page or component files; do not only edit individual pages and omit the layout.
|
|
35
35
|
- Running Development Server (from the web app directory):
|
|
36
|
-
- `npm run
|
|
36
|
+
- `npm run dev` — starts the Vite dev server
|
|
37
37
|
- You can generally assume the dev server is already running and don't need to start it.
|
|
38
38
|
- Build (from the web app directory):
|
|
39
39
|
- `npm run build` — TypeScript check + Vite build
|
package/dist/AGENT.md
CHANGED
|
@@ -38,7 +38,7 @@ cd force-app/main/default/webapplications/<appName>
|
|
|
38
38
|
|
|
39
39
|
| Command | Purpose |
|
|
40
40
|
|---------|---------|
|
|
41
|
-
| `npm run
|
|
41
|
+
| `npm run dev` | Start Vite dev server |
|
|
42
42
|
| `npm run build` | TypeScript (`tsc -b`) + Vite build |
|
|
43
43
|
| `npm run lint` | ESLint for the React app |
|
|
44
44
|
| `npm run test` | Vitest |
|
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.54.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.2...v1.54.0) (2026-02-25)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [1.53.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.1...v1.53.2) (2026-02-25)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* move ACC from layout embed to route-based page approach ([#156](https://github.com/salesforce-experience-platform-emu/webapps/issues/156)) ([b778f44](https://github.com/salesforce-experience-platform-emu/webapps/commit/b778f44a7897fbf0914d7b1ebb36079c0b2d70fd))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [1.53.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.53.0...v1.53.1) (2026-02-25)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDataSDK } from "@salesforce/webapp-experimental/api";
|
|
2
2
|
import type { DashboardMetrics, Application } from "../lib/types.js";
|
|
3
3
|
import { gql } from "./utils.js";
|
|
4
4
|
import type {
|
|
@@ -103,7 +103,15 @@ export async function getDashboardMetrics(): Promise<{
|
|
|
103
103
|
properties: any[];
|
|
104
104
|
maintenanceRequests: any[];
|
|
105
105
|
}> {
|
|
106
|
-
const
|
|
106
|
+
const data = await getDataSDK();
|
|
107
|
+
const result = await data.graphql?.<GetDashboardMetricsQuery>(GET_DASHBOARD_METRICS);
|
|
108
|
+
|
|
109
|
+
if (result?.errors?.length) {
|
|
110
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
111
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const response = result?.data;
|
|
107
115
|
const properties = response?.uiapi?.query?.allProperties?.edges?.map((edge) => edge?.node) || [];
|
|
108
116
|
const maintenanceRequests =
|
|
109
117
|
response?.uiapi?.query?.maintenanceRequests?.edges?.map((edge) => edge?.node) || [];
|
|
@@ -113,9 +121,19 @@ export async function getDashboardMetrics(): Promise<{
|
|
|
113
121
|
// Fetch open applications
|
|
114
122
|
export async function getOpenApplications(first: number = 5): Promise<Application[]> {
|
|
115
123
|
const variables: GetOpenApplicationsQueryVariables = { first };
|
|
116
|
-
const
|
|
124
|
+
const data = await getDataSDK();
|
|
125
|
+
const result = await data.graphql?.<GetOpenApplicationsQuery, GetOpenApplicationsQueryVariables>(
|
|
126
|
+
GET_OPEN_APPLICATIONS,
|
|
127
|
+
variables,
|
|
128
|
+
);
|
|
129
|
+
|
|
130
|
+
if (result?.errors?.length) {
|
|
131
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
132
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
133
|
+
}
|
|
134
|
+
|
|
117
135
|
const apps =
|
|
118
|
-
|
|
136
|
+
result?.data?.uiapi?.query?.Application__c?.edges?.map((edge) =>
|
|
119
137
|
transformApplication(edge?.node),
|
|
120
138
|
) || [];
|
|
121
139
|
return apps;
|
|
@@ -124,8 +142,15 @@ export async function getOpenApplications(first: number = 5): Promise<Applicatio
|
|
|
124
142
|
// Fetch current user information
|
|
125
143
|
export async function getUserInfo(): Promise<{ name: string; id: string } | null> {
|
|
126
144
|
try {
|
|
127
|
-
const
|
|
128
|
-
const
|
|
145
|
+
const data = await getDataSDK();
|
|
146
|
+
const result = await data.graphql?.<GetUserInfoQuery>(GET_USER_INFO);
|
|
147
|
+
|
|
148
|
+
if (result?.errors?.length) {
|
|
149
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
150
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const user = result?.data?.uiapi?.query?.User?.edges?.[0]?.node;
|
|
129
154
|
if (user) {
|
|
130
155
|
return {
|
|
131
156
|
id: user.Id,
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/maintenance.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDataSDK } from "@salesforce/webapp-experimental/api";
|
|
2
2
|
import type { MaintenanceRequest } from "../lib/types.js";
|
|
3
3
|
import { gql } from "./utils.js";
|
|
4
4
|
import type {
|
|
@@ -130,12 +130,19 @@ const GET_ALL_MAINTENANCE_REQUESTS = gql`
|
|
|
130
130
|
// Fetch maintenance requests for dashboard
|
|
131
131
|
export async function getMaintenanceRequests(first: number = 5): Promise<MaintenanceRequest[]> {
|
|
132
132
|
const variables: GetMaintenanceRequestsQueryVariables = { first };
|
|
133
|
-
const
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
133
|
+
const data = await getDataSDK();
|
|
134
|
+
const result = await data.graphql?.<
|
|
135
|
+
GetMaintenanceRequestsQuery,
|
|
136
|
+
GetMaintenanceRequestsQueryVariables
|
|
137
|
+
>(GET_MAINTENANCE_REQUESTS, variables);
|
|
138
|
+
|
|
139
|
+
if (result?.errors?.length) {
|
|
140
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
141
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
142
|
+
}
|
|
143
|
+
|
|
137
144
|
const requests =
|
|
138
|
-
|
|
145
|
+
result?.data?.uiapi?.query?.Maintenance_Request__c?.edges?.map((edge) =>
|
|
139
146
|
transformMaintenanceRequest(edge?.node),
|
|
140
147
|
) || [];
|
|
141
148
|
return requests;
|
|
@@ -146,12 +153,19 @@ export async function getAllMaintenanceRequests(
|
|
|
146
153
|
first: number = 100,
|
|
147
154
|
): Promise<MaintenanceRequest[]> {
|
|
148
155
|
const variables: GetAllMaintenanceRequestsQueryVariables = { first };
|
|
149
|
-
const
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
156
|
+
const data = await getDataSDK();
|
|
157
|
+
const result = await data.graphql?.<
|
|
158
|
+
GetAllMaintenanceRequestsQuery,
|
|
159
|
+
GetAllMaintenanceRequestsQueryVariables
|
|
160
|
+
>(GET_ALL_MAINTENANCE_REQUESTS, variables);
|
|
161
|
+
|
|
162
|
+
if (result?.errors?.length) {
|
|
163
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
164
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
165
|
+
}
|
|
166
|
+
|
|
153
167
|
const requests =
|
|
154
|
-
|
|
168
|
+
result?.data?.uiapi?.query?.Maintenance_Request__c?.edges?.map((edge: any) =>
|
|
155
169
|
transformMaintenanceTaskFull(edge?.node),
|
|
156
170
|
) || [];
|
|
157
171
|
return requests;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDataSDK } from "@salesforce/webapp-experimental/api";
|
|
2
2
|
import type { Property } from "../lib/types.js";
|
|
3
3
|
import { gql } from "./utils.js";
|
|
4
4
|
import type {
|
|
@@ -102,7 +102,18 @@ export async function getProperties(first: number = 12, after?: string): Promise
|
|
|
102
102
|
variables.after = after;
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
const
|
|
105
|
+
const data = await getDataSDK();
|
|
106
|
+
const result = await data.graphql?.<GetPropertiesQuery, GetPropertiesQueryVariables>(
|
|
107
|
+
GET_PROPERTIES_PAGINATED,
|
|
108
|
+
variables,
|
|
109
|
+
);
|
|
110
|
+
|
|
111
|
+
if (result?.errors?.length) {
|
|
112
|
+
const errorMessages = result.errors.map((e) => e.message).join("; ");
|
|
113
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const response = result?.data;
|
|
106
117
|
const edges = response?.uiapi?.query?.Property__c?.edges || [];
|
|
107
118
|
const pageInfo = response?.uiapi?.query?.Property__c?.pageInfo || {
|
|
108
119
|
hasNextPage: false,
|
package/dist/force-app/main/default/webapplications/appreactsampleb2e/src/api/utils/accounts.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getDataSDK } from '@salesforce/webapp-experimental/api';
|
|
2
2
|
import HIGH_REVENUE_ACCOUNTS_QUERY from './query/highRevenueAccountsQuery.graphql?raw';
|
|
3
3
|
import type {
|
|
4
4
|
GetHighRevenueAccountsQuery,
|
|
@@ -24,10 +24,18 @@ type AccountNode = NonNullable<
|
|
|
24
24
|
export async function getHighRevenueAccounts(
|
|
25
25
|
variables: GetHighRevenueAccountsQueryVariables
|
|
26
26
|
): Promise<(AccountNode | null | undefined)[]> {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const data = await getDataSDK();
|
|
28
|
+
const response = await data.graphql?.<
|
|
29
|
+
GetHighRevenueAccountsQuery,
|
|
30
|
+
GetHighRevenueAccountsQueryVariables
|
|
31
|
+
>(HIGH_REVENUE_ACCOUNTS_QUERY, variables);
|
|
32
|
+
|
|
33
|
+
if (response?.errors?.length) {
|
|
34
|
+
const errorMessages = response.errors.map(e => e.message).join('; ');
|
|
35
|
+
throw new Error(`GraphQL Error: ${errorMessages}`);
|
|
36
|
+
}
|
|
31
37
|
|
|
32
|
-
return
|
|
38
|
+
return (
|
|
39
|
+
response?.data?.uiapi?.query?.Account?.edges?.map(edge => edge?.node) || []
|
|
40
|
+
);
|
|
33
41
|
}
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-app-react-sample-b2e-experimental",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.54.0",
|
|
4
4
|
"description": "B2E starter app template",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"watch": {
|
|
39
39
|
"executor": "@salesforce/webapp-template-cli-experimental:watch-patches"
|
|
40
40
|
},
|
|
41
|
-
"
|
|
41
|
+
"dev": {
|
|
42
42
|
"executor": "@salesforce/webapp-template-cli-experimental:dev-server"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
},
|
|
46
|
-
"gitHead": "
|
|
46
|
+
"gitHead": "b48827161c23db20c7e546a857fe8c9f5f560c20"
|
|
47
47
|
}
|