@salesforce/ui-bundle-template-app-react-sample-b2e 11.71.3 → 11.71.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.
- package/dist/CHANGELOG.md +8 -0
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/package.json +4 -4
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/utils/__tests__/filterUtils.test.ts +36 -1
- package/dist/force-app/main/default/uiBundles/propertymanagementapp/src/features/search/utils/filterUtils.ts +7 -2
- package/dist/package-lock.json +2 -2
- package/dist/package.json +1 -1
- package/package.json +2 -2
package/dist/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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.71.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.71.3...v11.71.4) (2026-08-28)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
6
14
|
## [11.71.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v11.71.2...v11.71.3) (2026-08-27)
|
|
7
15
|
|
|
8
16
|
**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.71.
|
|
22
|
-
"@salesforce/ui-bundle": "^11.71.
|
|
21
|
+
"@salesforce/platform-sdk": "^11.71.4",
|
|
22
|
+
"@salesforce/ui-bundle": "^11.71.4",
|
|
23
23
|
"@tailwindcss/vite": "^4.1.17",
|
|
24
24
|
"class-variance-authority": "^0.7.1",
|
|
25
25
|
"clsx": "^2.1.1",
|
|
@@ -46,8 +46,8 @@
|
|
|
46
46
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
47
47
|
"@graphql-tools/utils": "^11.0.0",
|
|
48
48
|
"@playwright/test": "^1.49.0",
|
|
49
|
-
"@salesforce/graphiti": "^11.71.
|
|
50
|
-
"@salesforce/vite-plugin-ui-bundle": "^11.71.
|
|
49
|
+
"@salesforce/graphiti": "^11.71.4",
|
|
50
|
+
"@salesforce/vite-plugin-ui-bundle": "^11.71.4",
|
|
51
51
|
"@testing-library/jest-dom": "^6.6.3",
|
|
52
52
|
"@testing-library/react": "^16.1.0",
|
|
53
53
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
// W-23860670: negative min must clamp to the configured bound.
|
|
8
8
|
import { describe, it, expect } from "vitest";
|
|
9
|
-
import { buildFilter } from "../filterUtils";
|
|
9
|
+
import { buildFilter, buildGlobalQueryClause } from "../filterUtils";
|
|
10
10
|
import type { ActiveFilterValue, FilterFieldConfig } from "../filterUtils";
|
|
11
11
|
|
|
12
12
|
describe("buildFilter numeric bounds", () => {
|
|
@@ -36,3 +36,38 @@ describe("buildFilter numeric bounds", () => {
|
|
|
36
36
|
expect(buildFilter(filters, configs)).toEqual({ Price: { lte: 0 } });
|
|
37
37
|
});
|
|
38
38
|
});
|
|
39
|
+
|
|
40
|
+
// W-23935484: LIKE metacharacters in user input must be escaped, not treated as wildcards.
|
|
41
|
+
describe("LIKE pattern escaping", () => {
|
|
42
|
+
const configs: FilterFieldConfig[] = [{ field: "Name", label: "Name", type: "text" }];
|
|
43
|
+
|
|
44
|
+
it("escapes %, _, and \\ in a text filter value", () => {
|
|
45
|
+
const filters: ActiveFilterValue[] = [
|
|
46
|
+
{ field: "Name", label: "Name", type: "text", value: "50%_off\\deal" },
|
|
47
|
+
];
|
|
48
|
+
|
|
49
|
+
expect(buildFilter(filters, configs)).toEqual({
|
|
50
|
+
Name: { like: "%50\\%\\_off\\\\deal%" },
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
it("leaves ordinary characters in a text filter value untouched", () => {
|
|
55
|
+
const filters: ActiveFilterValue[] = [
|
|
56
|
+
{ field: "Name", label: "Name", type: "text", value: "widget" },
|
|
57
|
+
];
|
|
58
|
+
|
|
59
|
+
expect(buildFilter(filters, configs)).toEqual({ Name: { like: "%widget%" } });
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it("escapes %, _, and \\ in the global query across a single searchable field", () => {
|
|
63
|
+
expect(buildGlobalQueryClause("50%_off\\deal", ["Name"])).toEqual({
|
|
64
|
+
Name: { like: "%50\\%\\_off\\\\deal%" },
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
it("escapes %, _, and \\ in the global query across multiple/nested searchable fields", () => {
|
|
69
|
+
expect(buildGlobalQueryClause("a_b", ["Name", "Owner.Name"])).toEqual({
|
|
70
|
+
or: [{ Name: { like: "%a\\_b%" } }, { Owner: { Name: { like: "%a\\_b%" } } }],
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
});
|
|
@@ -208,12 +208,17 @@ function toEndOfDay(d: string) {
|
|
|
208
208
|
return `${d}T23:59:59.999Z`;
|
|
209
209
|
}
|
|
210
210
|
|
|
211
|
+
/** Escapes LIKE metacharacters (`\`, `%`, `_`) so user input is matched literally. */
|
|
212
|
+
function escapeLikePattern(value: string): string {
|
|
213
|
+
return value.replace(/[\\%_]/g, "\\$&");
|
|
214
|
+
}
|
|
215
|
+
|
|
211
216
|
function buildSingleFilter(filter: ActiveFilterValue, config?: FilterFieldConfig): unknown {
|
|
212
217
|
const { field, type, value, min, max } = filter;
|
|
213
218
|
switch (type) {
|
|
214
219
|
case "text": {
|
|
215
220
|
if (!value) return null;
|
|
216
|
-
return { [field]: { like: `%${value}%` } };
|
|
221
|
+
return { [field]: { like: `%${escapeLikePattern(value)}%` } };
|
|
217
222
|
}
|
|
218
223
|
case "picklist": {
|
|
219
224
|
if (!value) return null;
|
|
@@ -284,7 +289,7 @@ export function buildGlobalQueryClause(q: string, searchableFields: string[]): u
|
|
|
284
289
|
if (!trimmed || searchableFields.length === 0) return undefined;
|
|
285
290
|
const clauses = searchableFields.map((path) => {
|
|
286
291
|
const parts = path.split(".");
|
|
287
|
-
let clause: Record<string, unknown> = { like: `%${trimmed}%` };
|
|
292
|
+
let clause: Record<string, unknown> = { like: `%${escapeLikePattern(trimmed)}%` };
|
|
288
293
|
for (let i = parts.length - 1; i >= 0; i--) {
|
|
289
294
|
clause = { [parts[i]]: clause };
|
|
290
295
|
}
|
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.71.
|
|
3
|
+
"version": "11.71.4",
|
|
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.71.
|
|
9
|
+
"version": "11.71.4",
|
|
10
10
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"fast-xml-parser": "^5.9.3",
|
package/dist/package.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/ui-bundle-template-app-react-sample-b2e",
|
|
3
|
-
"version": "11.71.
|
|
3
|
+
"version": "11.71.4",
|
|
4
4
|
"description": "Salesforce sample property rental React app",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"clean": "rm -rf dist"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@salesforce/ui-bundle": "^11.71.
|
|
19
|
+
"@salesforce/ui-bundle": "^11.71.4",
|
|
20
20
|
"sonner": "^1.7.0"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|