@salesforce/ui-bundle-template-feature-react-global-search 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 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 + data.graphql with centralized error handling.
3
- * Use with gql-tagged queries and generated operation types for type-safe calls.
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
- // SDK types graphql() first param as string; at runtime it may accept gql DocumentNode too
13
- const response = await data.graphql?.<TData, TVariables>({
14
- query,
15
- variables,
13
+ const result = await data.graphql!.query<TData, TVariables>({
14
+ query: query,
15
+ variables: variables,
16
16
  });
17
17
 
18
- if (!response) {
19
- throw new Error('GraphQL response is undefined');
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 (response?.errors?.length) {
23
- const msg = response.errors.map(e => e.message).join('; ');
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 response.data;
27
+ return result.data;
28
28
  }
@@ -126,12 +126,12 @@ export async function queryForPicklistValues(
126
126
 
127
127
  async function runQuery<Q, V>(query: string, variables: V): Promise<Q> {
128
128
  const data = await createDataSDK();
129
- const response = await data.graphql?.<Q, V>({ query, variables });
129
+ const result = await data.graphql!.query<Q, V>({ query: query, variables: variables });
130
130
 
131
- if (response?.errors?.length) {
132
- const errorMessages = response.errors.map((e) => e.message).join("; ");
131
+ if (result.errors?.length) {
132
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
133
133
  throw new Error(`GraphQL Error: ${errorMessages}`);
134
134
  }
135
135
 
136
- return response?.data ?? ({} as Q);
136
+ return result.data ?? ({} as Q);
137
137
  }
@@ -328,14 +328,17 @@ export async function getRecordsGraphQL(
328
328
  };
329
329
 
330
330
  const data = await createDataSDK();
331
- const response = await data.graphql?.<RecordListGraphQLResult>({ query, variables });
331
+ const result = await data.graphql!.query<RecordListGraphQLResult>({
332
+ query: query,
333
+ variables: variables,
334
+ });
332
335
 
333
- if (response?.errors?.length) {
334
- const errorMessages = response.errors.map((e) => e.message).join("; ");
336
+ if (result.errors?.length) {
337
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
335
338
  throw new Error(`GraphQL Error: ${errorMessages}`);
336
339
  }
337
340
 
338
- return response?.data ?? ({} as RecordListGraphQLResult);
341
+ return result.data ?? ({} as RecordListGraphQLResult);
339
342
  }
340
343
 
341
344
  /**
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@salesforce/webapp-template-base-sfdx-project-experimental",
3
- "version": "7.1.0",
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": "7.1.0",
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-base-sfdx-project",
3
- "version": "7.1.0",
3
+ "version": "8.0.1",
4
4
  "description": "Base SFDX project template",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "publishConfig": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/ui-bundle-template-feature-react-global-search",
3
- "version": "7.1.0",
3
+ "version": "8.0.1",
4
4
  "description": "Global search feature for Salesforce objects with filtering and pagination",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "",
@@ -126,12 +126,12 @@ export async function queryForPicklistValues(
126
126
 
127
127
  async function runQuery<Q, V>(query: string, variables: V): Promise<Q> {
128
128
  const data = await createDataSDK();
129
- const response = await data.graphql?.<Q, V>({ query, variables });
129
+ const result = await data.graphql!.query<Q, V>({ query: query, variables: variables });
130
130
 
131
- if (response?.errors?.length) {
132
- const errorMessages = response.errors.map((e) => e.message).join("; ");
131
+ if (result.errors?.length) {
132
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
133
133
  throw new Error(`GraphQL Error: ${errorMessages}`);
134
134
  }
135
135
 
136
- return response?.data ?? ({} as Q);
136
+ return result.data ?? ({} as Q);
137
137
  }
@@ -328,14 +328,17 @@ export async function getRecordsGraphQL(
328
328
  };
329
329
 
330
330
  const data = await createDataSDK();
331
- const response = await data.graphql?.<RecordListGraphQLResult>({ query, variables });
331
+ const result = await data.graphql!.query<RecordListGraphQLResult>({
332
+ query: query,
333
+ variables: variables,
334
+ });
332
335
 
333
- if (response?.errors?.length) {
334
- const errorMessages = response.errors.map((e) => e.message).join("; ");
336
+ if (result.errors?.length) {
337
+ const errorMessages = result.errors.map((e) => e.message).join("; ");
335
338
  throw new Error(`GraphQL Error: ${errorMessages}`);
336
339
  }
337
340
 
338
- return response?.data ?? ({} as RecordListGraphQLResult);
341
+ return result.data ?? ({} as RecordListGraphQLResult);
339
342
  }
340
343
 
341
344
  /**