@salesforce/ui-bundle-template-app-react-template-b2e 7.1.0 → 8.0.1
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/CHANGELOG.md +16 -0
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/api/graphqlClient.ts +12 -12
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/object-search/__examples__/pages/AccountObjectDetailPage.tsx +4 -4
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/object-search/api/objectSearchService.ts +13 -18
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/pages/AccountObjectDetailPage.tsx +4 -4
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +1 -1
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [8.0.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v8.0.0...v8.0.1) (2026-05-18)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [8.0.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v7.1.0...v8.0.0) (2026-05-15)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [7.1.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v7.0.1...v7.1.0) (2026-05-14)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Thin GraphQL client: createDataSDK +
|
|
3
|
-
* Use with gql-tagged queries and generated operation types
|
|
2
|
+
* Thin GraphQL client: createDataSDK + sdk.graphql.query with centralized
|
|
3
|
+
* error handling. Use with gql-tagged queries and generated operation types
|
|
4
|
+
* for type-safe calls.
|
|
4
5
|
*/
|
|
5
6
|
import { createDataSDK } from '@salesforce/platform-sdk';
|
|
6
7
|
|
|
@@ -9,20 +10,19 @@ export async function executeGraphQL<TData, TVariables>(
|
|
|
9
10
|
variables?: TVariables
|
|
10
11
|
): Promise<TData> {
|
|
11
12
|
const data = await createDataSDK();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
variables,
|
|
13
|
+
const result = await data.graphql!.query<TData, TVariables>({
|
|
14
|
+
query: query,
|
|
15
|
+
variables: variables,
|
|
16
16
|
});
|
|
17
17
|
|
|
18
|
-
if (
|
|
19
|
-
|
|
18
|
+
if (result.errors?.length) {
|
|
19
|
+
const msg = result.errors.map(e => e.message).join('; ');
|
|
20
|
+
throw new Error(`GraphQL Error: ${msg}`);
|
|
20
21
|
}
|
|
21
22
|
|
|
22
|
-
if (
|
|
23
|
-
|
|
24
|
-
throw new Error(`GraphQL Error: ${msg}`);
|
|
23
|
+
if (result.data == null) {
|
|
24
|
+
throw new Error('GraphQL response data is null');
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
return
|
|
27
|
+
return result.data;
|
|
28
28
|
}
|
|
@@ -29,16 +29,16 @@ type AccountNode = NonNullable<
|
|
|
29
29
|
|
|
30
30
|
async function fetchAccountDetail(recordId: string): Promise<AccountNode | null | undefined> {
|
|
31
31
|
const data = await createDataSDK();
|
|
32
|
-
const
|
|
32
|
+
const result = await data.graphql!.query<GetAccountDetailQuery, GetAccountDetailQueryVariables>({
|
|
33
33
|
query: GET_ACCOUNT_DETAIL,
|
|
34
34
|
variables: { id: recordId },
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
if (
|
|
38
|
-
throw new Error(
|
|
37
|
+
if (result.errors?.length) {
|
|
38
|
+
throw new Error(result.errors.map((e) => e.message).join("; "));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
return
|
|
41
|
+
return result.data?.uiapi?.query?.Account?.edges?.[0]?.node;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
export default function AccountObjectDetail() {
|
|
@@ -21,24 +21,20 @@ export async function searchObjects<TResult, TQuery, TVariables>(
|
|
|
21
21
|
const { where, orderBy, first = 20, after } = options;
|
|
22
22
|
|
|
23
23
|
const data = await createDataSDK();
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
after,
|
|
29
|
-
where,
|
|
30
|
-
orderBy,
|
|
31
|
-
} as TVariables,
|
|
24
|
+
const variables = { first, after, where, orderBy } as TVariables;
|
|
25
|
+
const result = await data.graphql!.query<TQuery, TVariables>({
|
|
26
|
+
query: query,
|
|
27
|
+
variables: variables,
|
|
32
28
|
});
|
|
33
29
|
|
|
34
|
-
if (
|
|
35
|
-
throw new Error(
|
|
30
|
+
if (result.errors?.length) {
|
|
31
|
+
throw new Error(result.errors.map((e) => e.message).join("; "));
|
|
36
32
|
}
|
|
37
33
|
|
|
38
|
-
const
|
|
34
|
+
const uiapi = (result.data as Record<string, unknown> | undefined)?.uiapi as
|
|
39
35
|
| Record<string, unknown>
|
|
40
36
|
| undefined;
|
|
41
|
-
const queryResult = (
|
|
37
|
+
const queryResult = (uiapi?.query as Record<string, unknown> | undefined)?.[objectName] as
|
|
42
38
|
| TResult
|
|
43
39
|
| undefined;
|
|
44
40
|
|
|
@@ -59,17 +55,16 @@ export async function fetchDistinctValues<TQuery>(
|
|
|
59
55
|
fieldName: string,
|
|
60
56
|
): Promise<PicklistOption[]> {
|
|
61
57
|
const data = await createDataSDK();
|
|
62
|
-
const
|
|
63
|
-
const errors = response?.errors;
|
|
58
|
+
const result = await data.graphql!.query<TQuery>({ query: query });
|
|
64
59
|
|
|
65
|
-
if (errors?.length) {
|
|
66
|
-
throw new Error(errors.map((e) => e.message).join("; "));
|
|
60
|
+
if (result.errors?.length) {
|
|
61
|
+
throw new Error(result.errors.map((e) => e.message).join("; "));
|
|
67
62
|
}
|
|
68
63
|
|
|
69
|
-
const
|
|
64
|
+
const uiapi = (result.data as Record<string, unknown> | undefined)?.uiapi as
|
|
70
65
|
| Record<string, unknown>
|
|
71
66
|
| undefined;
|
|
72
|
-
const aggregate = (
|
|
67
|
+
const aggregate = (uiapi?.aggregate as Record<string, unknown> | undefined)?.[objectName] as
|
|
73
68
|
| { edges?: Array<{ node?: { aggregate?: Record<string, unknown> } }> }
|
|
74
69
|
| undefined;
|
|
75
70
|
|
package/dist/force-app/main/default/uiBundles/reactinternalapp/src/pages/AccountObjectDetailPage.tsx
CHANGED
|
@@ -33,16 +33,16 @@ type AccountNode = NonNullable<
|
|
|
33
33
|
|
|
34
34
|
async function fetchAccountDetail(recordId: string): Promise<AccountNode | null | undefined> {
|
|
35
35
|
const data = await createDataSDK();
|
|
36
|
-
const
|
|
36
|
+
const result = await data.graphql!.query<GetAccountDetailQuery, GetAccountDetailQueryVariables>({
|
|
37
37
|
query: GET_ACCOUNT_DETAIL,
|
|
38
38
|
variables: { id: recordId },
|
|
39
39
|
});
|
|
40
40
|
|
|
41
|
-
if (
|
|
42
|
-
throw new Error(
|
|
41
|
+
if (result.errors?.length) {
|
|
42
|
+
throw new Error(result.errors.map((e) => e.message).join("; "));
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
return
|
|
45
|
+
return result.data?.uiapi?.query?.Account?.edges?.[0]?.node;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export default function AccountObjectDetail() {
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "8.0.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "8.0.1",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@lwc/eslint-plugin-lwc": "^3.3.0",
|
package/dist/package.json
CHANGED