@salesforce/ui-bundle-template-app-react-template-b2e 11.56.1 → 11.56.3
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/package.json +4 -4
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/search/README.md +11 -0
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/search/adapters/cms/api/orgApiVersionService.ts +16 -5
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/search/components/SearchResults.tsx +5 -0
- package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/search/components/controls/ScopeSelector.tsx +8 -0
- 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
|
+
## [11.56.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.56.2...v11.56.3) (2026-08-12)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [11.56.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.56.1...v11.56.2) (2026-08-12)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
6
22
|
## [11.56.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.56.0...v11.56.1) (2026-08-12)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@salesforce/platform-sdk": "^11.56.
|
|
22
|
-
"@salesforce/ui-bundle": "^11.56.
|
|
21
|
+
"@salesforce/platform-sdk": "^11.56.3",
|
|
22
|
+
"@salesforce/ui-bundle": "^11.56.3",
|
|
23
23
|
"@tailwindcss/vite": "^4.1.17",
|
|
24
24
|
"class-variance-authority": "^0.7.1",
|
|
25
25
|
"clsx": "^2.1.1",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
46
46
|
"@graphql-tools/utils": "^11.0.0",
|
|
47
47
|
"@playwright/test": "^1.49.0",
|
|
48
|
-
"@salesforce/graphiti": "^11.56.
|
|
49
|
-
"@salesforce/vite-plugin-ui-bundle": "^11.56.
|
|
48
|
+
"@salesforce/graphiti": "^11.56.3",
|
|
49
|
+
"@salesforce/vite-plugin-ui-bundle": "^11.56.3",
|
|
50
50
|
"@testing-library/jest-dom": "^6.6.3",
|
|
51
51
|
"@testing-library/react": "^16.1.0",
|
|
52
52
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/force-app/main/default/uiBundles/reactinternalapp/src/features/search/README.md
CHANGED
|
@@ -85,6 +85,17 @@ CMS search "just works" after adding a `cms` source to `config.json`.
|
|
|
85
85
|
(`UI_BUNDLE_ID_PATTERN = /^9YE[a-zA-Z0-9]{12,15}$/`) — an empty or malformed
|
|
86
86
|
id, or a build below v68, causes the CMS source to be silently dropped from
|
|
87
87
|
the request (no per-source error banner), not sent to the server.
|
|
88
|
+
- **CMS UI surfaces hide on a gated build too.** When CMS search is skipped for
|
|
89
|
+
the build-version reason, its scope entry and result section would only ever
|
|
90
|
+
be empty, so both are hidden using the SAME gate as the fetch skip —
|
|
91
|
+
`isCmsSearchSupported()` (the synchronous core of `getOrgSupportsCmsSearch()`,
|
|
92
|
+
in `adapters/cms/api/orgApiVersionService.ts`). Two minimal guards read it:
|
|
93
|
+
`ScopeSelector` skips the CMS `<SelectItem>` ("Content") and `SearchResults`
|
|
94
|
+
skips the CMS `SourceSection` ("Content" heading + empty state). Both are safe
|
|
95
|
+
during render because the gate reads only the build-time API version. (The
|
|
96
|
+
runtime `bundleId` gate above is _not_ build-constant — it can differ per
|
|
97
|
+
surface — so it stays a per-fetch skip and does not hide the UI; a CMS source
|
|
98
|
+
skipped only for a missing `bundleId` still shows its section, empty.)
|
|
88
99
|
- **The query field:** `adapters/cms/cmsQueryFragment.ts` sends the resolved
|
|
89
100
|
`$UIBundleId` into `searchIdentifiers.uibundleIds` (NOT `channelIds`) on
|
|
90
101
|
`managed_content.search.searchContentInChannels`. Content-type filtering
|
|
@@ -6,9 +6,9 @@ import { getBuildApiVersion } from "./apiUtils";
|
|
|
6
6
|
export const MIN_CMS_API_VERSION = 68;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
* version (`__SF_API_VERSION__`, injected from the
|
|
11
|
-
* at build time) being >= {@link MIN_CMS_API_VERSION}.
|
|
9
|
+
* Whether CMS search can run — the synchronous core of the gate. Gated on the
|
|
10
|
+
* bundle's build-time API version (`__SF_API_VERSION__`, injected from the
|
|
11
|
+
* resolved org's API version at build time) being >= {@link MIN_CMS_API_VERSION}.
|
|
12
12
|
*
|
|
13
13
|
* The build version is the version every SDK GraphQL/REST request is actually
|
|
14
14
|
* issued at, so it already reflects a concrete, org-supported API version: a
|
|
@@ -19,8 +19,19 @@ export const MIN_CMS_API_VERSION = 68;
|
|
|
19
19
|
* bare `/services/data/` version-listing endpoint (which is not routed on guest
|
|
20
20
|
* Experience Sites and would fail-close there), it works on every surface.
|
|
21
21
|
*
|
|
22
|
-
*
|
|
22
|
+
* Because it reads only the baked build version, it is safe to call during
|
|
23
|
+
* render — e.g. to hide the CMS source's scope entry and result section when
|
|
24
|
+
* the backend isn't available (see `ScopeSelector` and `SearchResults`).
|
|
25
|
+
*/
|
|
26
|
+
export function isCmsSearchSupported(): boolean {
|
|
27
|
+
return getBuildApiVersion() >= MIN_CMS_API_VERSION;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Resolves whether CMS search can run. Thin async wrapper over
|
|
32
|
+
* {@link isCmsSearchSupported} that preserves the existing fetch-path call-site
|
|
33
|
+
* contract (the fetch effect awaits it alongside the async UIBundle-id lookup).
|
|
23
34
|
*/
|
|
24
35
|
export function getOrgSupportsCmsSearch(): Promise<boolean> {
|
|
25
|
-
return Promise.resolve(
|
|
36
|
+
return Promise.resolve(isCmsSearchSupported());
|
|
26
37
|
}
|
|
@@ -24,6 +24,7 @@ import { SourceSection } from "./SourceSection";
|
|
|
24
24
|
import { DefaultFilterPanel } from "./filters/DefaultFilterPanel";
|
|
25
25
|
import { resolveResultRenderer, type ResultRenderer } from "./results/resolveResultRenderer";
|
|
26
26
|
import { ALL_SCOPE, parseScope, type SearchHandle } from "../types";
|
|
27
|
+
import { isCmsSearchSupported } from "../adapters/cms/api/orgApiVersionService";
|
|
27
28
|
|
|
28
29
|
type FilterRenderer = (() => ReactNode) | false;
|
|
29
30
|
|
|
@@ -48,6 +49,10 @@ export function SearchResults({
|
|
|
48
49
|
<div className="space-y-10">
|
|
49
50
|
{Object.entries(handle.sources).map(([key, controller]) => {
|
|
50
51
|
if (scopeBase !== ALL_SCOPE && scopeBase !== key) return null;
|
|
52
|
+
// CMS search is skipped on builds below the CMS-search API version, so a
|
|
53
|
+
// CMS source never returns rows — rendering its section would only show
|
|
54
|
+
// an empty "Content" heading. Hide it (same gate as the CMS fetch skip).
|
|
55
|
+
if (controller.config.kind === "cms" && !isCmsSearchSupported()) return null;
|
|
51
56
|
// Resolve the renderer through the shared helper so a CMS source
|
|
52
57
|
// renders via CmsResultRow (never DefaultResultRow) in this mode; a
|
|
53
58
|
// `renderResult[key]` override — including `false` (hide) — still wins.
|
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
} from "../../../../components/ui/select";
|
|
24
24
|
import { ALL_SCOPE, CMS_SCOPE_SEPARATOR, type SearchConfig, type SearchScope } from "../../types";
|
|
25
25
|
import type { DiscoveredContentType } from "../../adapters/cms/contentTypeUtils";
|
|
26
|
+
import { isCmsSearchSupported } from "../../adapters/cms/api/orgApiVersionService";
|
|
26
27
|
|
|
27
28
|
interface ScopeSelectorProps {
|
|
28
29
|
config: SearchConfig;
|
|
@@ -69,6 +70,13 @@ export function ScopeSelector({
|
|
|
69
70
|
<SelectContent>
|
|
70
71
|
<SelectItem value={ALL_SCOPE}>{allLabel}</SelectItem>
|
|
71
72
|
{config.sources.map((source) => {
|
|
73
|
+
// CMS search is skipped entirely on builds below the CMS-search API
|
|
74
|
+
// version (same gate `useSearch` uses to drop the CMS request), so
|
|
75
|
+
// its scope entry ("Content") would only ever yield an empty result.
|
|
76
|
+
// Hide it. Build-version-only — safe to evaluate during render.
|
|
77
|
+
if (source.kind === "cms" && !isCmsSearchSupported()) {
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
72
80
|
// Once the CMS channel's content types are known, the generic CMS
|
|
73
81
|
// source entry (e.g. "Content") is redundant — its per-type entries
|
|
74
82
|
// (appended below) cover the same source at finer granularity, so
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
3
|
-
"version": "11.56.
|
|
3
|
+
"version": "11.56.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@salesforce/ui-bundle-template-base-sfdx-project",
|
|
9
|
-
"version": "11.56.
|
|
9
|
+
"version": "11.56.3",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED