@salesforce/webapp-template-feature-react-global-search-experimental 1.112.8 → 1.112.9
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,17 @@
|
|
|
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.112.9](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.8...v1.112.9) (2026-03-24)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* address PR [#81](https://github.com/salesforce-experience-platform-emu/webapps/issues/81) review feedback on graphql-search.sh ([#345](https://github.com/salesforce-experience-platform-emu/webapps/issues/345)) ([54a6e59](https://github.com/salesforce-experience-platform-emu/webapps/commit/54a6e590afd1923a12f776eba6b6cc147729c697))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
6
17
|
## [1.112.8](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.112.7...v1.112.8) (2026-03-24)
|
|
7
18
|
|
|
8
19
|
**Note:** Version bump only for package @salesforce/webapp-template-base-sfdx-project-experimental
|
package/dist/force-app/main/default/webapplications/feature-react-global-search/package.json
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.112.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.112.
|
|
18
|
+
"@salesforce/sdk-data": "^1.112.9",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.112.9",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"class-variance-authority": "^0.7.1",
|
|
22
22
|
"clsx": "^2.1.1",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
44
44
|
"@graphql-tools/utils": "^11.0.0",
|
|
45
45
|
"@playwright/test": "^1.49.0",
|
|
46
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.112.
|
|
46
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.112.9",
|
|
47
47
|
"@testing-library/jest-dom": "^6.6.3",
|
|
48
48
|
"@testing-library/react": "^16.1.0",
|
|
49
49
|
"@testing-library/user-event": "^14.5.2",
|
package/dist/package-lock.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-base-sfdx-project-experimental",
|
|
3
|
-
"version": "1.112.
|
|
3
|
+
"version": "1.112.9",
|
|
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": "1.112.
|
|
9
|
+
"version": "1.112.9",
|
|
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,4 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
|
+
set -euo pipefail # exit on error (-e), undefined vars (-u), and propagate pipeline failures (-o pipefail)
|
|
2
3
|
# graphql-search.sh — Look up one or more Salesforce entities in schema.graphql.
|
|
3
4
|
#
|
|
4
5
|
# Run from the SFDX project root (where schema.graphql lives):
|
|
@@ -10,11 +11,13 @@
|
|
|
10
11
|
# bash scripts/graphql-search.sh --schema ./other/schema.graphql Account Contact
|
|
11
12
|
#
|
|
12
13
|
# Output sections per entity:
|
|
13
|
-
# 1. Type definition
|
|
14
|
-
# 2. Filter options
|
|
15
|
-
# 3. Sort options
|
|
16
|
-
# 4. Create
|
|
17
|
-
# 5.
|
|
14
|
+
# 1. Type definition — all fields and relationships
|
|
15
|
+
# 2. Filter options — <Entity>_Filter input (for `where:`)
|
|
16
|
+
# 3. Sort options — <Entity>_OrderBy input (for `orderBy:`)
|
|
17
|
+
# 4. Create mutation wrapper — <Entity>CreateInput
|
|
18
|
+
# 5. Create mutation fields — <Entity>CreateRepresentation (for create mutations)
|
|
19
|
+
# 6. Update mutation wrapper — <Entity>UpdateInput
|
|
20
|
+
# 7. Update mutation fields — <Entity>UpdateRepresentation (for update mutations)
|
|
18
21
|
|
|
19
22
|
SCHEMA="./schema.graphql"
|
|
20
23
|
|
|
@@ -62,6 +65,19 @@ if [ ! -f "$SCHEMA" ]; then
|
|
|
62
65
|
exit 1
|
|
63
66
|
fi
|
|
64
67
|
|
|
68
|
+
if [ ! -r "$SCHEMA" ]; then
|
|
69
|
+
echo "ERROR: schema.graphql is not readable at $SCHEMA"
|
|
70
|
+
echo " Check file permissions: ls -la $SCHEMA"
|
|
71
|
+
exit 1
|
|
72
|
+
fi
|
|
73
|
+
|
|
74
|
+
if [ ! -s "$SCHEMA" ]; then
|
|
75
|
+
echo "ERROR: schema.graphql is empty at $SCHEMA"
|
|
76
|
+
echo " Regenerate it from the webapp dir:"
|
|
77
|
+
echo " cd force-app/main/default/webapplications/<app-name> && npm run graphql:schema"
|
|
78
|
+
exit 1
|
|
79
|
+
fi
|
|
80
|
+
|
|
65
81
|
# ── Helper: extract lines from a grep match through the closing brace ────────
|
|
66
82
|
# Prints up to MAX_LINES lines after (and including) the first match of PATTERN.
|
|
67
83
|
# Uses a generous line count — blocks are always closed by a "}" line.
|
|
@@ -72,68 +88,104 @@ extract_block() {
|
|
|
72
88
|
local max_lines="$3"
|
|
73
89
|
|
|
74
90
|
local match
|
|
75
|
-
|
|
91
|
+
local grep_exit=0
|
|
92
|
+
match=$(grep -nE "$pattern" "$SCHEMA" | head -1) || grep_exit=$?
|
|
93
|
+
|
|
94
|
+
if [ "$grep_exit" -eq 2 ]; then
|
|
95
|
+
echo " ERROR: grep failed on pattern: $pattern" >&2
|
|
96
|
+
return 1
|
|
97
|
+
fi
|
|
76
98
|
|
|
77
99
|
if [ -z "$match" ]; then
|
|
78
100
|
echo " (not found: $pattern)"
|
|
79
|
-
return
|
|
101
|
+
return 3
|
|
80
102
|
fi
|
|
81
103
|
|
|
82
104
|
echo "### $label"
|
|
83
105
|
grep -E "$pattern" "$SCHEMA" -A "$max_lines" | \
|
|
84
106
|
awk '/^\}$/{print; exit} {print}' | \
|
|
85
|
-
head -n "$max_lines"
|
|
107
|
+
head -n "$max_lines" || true
|
|
86
108
|
echo ""
|
|
87
109
|
}
|
|
88
110
|
|
|
89
111
|
# ── Main loop ────────────────────────────────────────────────────────────────
|
|
90
112
|
|
|
91
113
|
for ENTITY in "$@"; do
|
|
114
|
+
# Validate entity name: must be a valid PascalCase identifier (letters, digits, underscores)
|
|
115
|
+
if [[ ! "$ENTITY" =~ ^[A-Za-z_][A-Za-z0-9_]*$ ]]; then
|
|
116
|
+
echo "ERROR: Invalid entity name: '$ENTITY'"
|
|
117
|
+
echo " Entity names must start with a letter or underscore, followed by letters, digits, or underscores."
|
|
118
|
+
echo " Examples: Account, My_Custom_Object__c"
|
|
119
|
+
continue
|
|
120
|
+
fi
|
|
121
|
+
|
|
92
122
|
echo ""
|
|
93
123
|
echo "======================================================================"
|
|
94
124
|
echo " SCHEMA LOOKUP: $ENTITY"
|
|
95
125
|
echo "======================================================================"
|
|
96
126
|
echo ""
|
|
97
127
|
|
|
128
|
+
found=0
|
|
129
|
+
|
|
130
|
+
# Helper: call extract_block, track matches, surface errors
|
|
131
|
+
try_extract() {
|
|
132
|
+
local rc=0
|
|
133
|
+
extract_block "$@" || rc=$?
|
|
134
|
+
if [ "$rc" -eq 0 ]; then
|
|
135
|
+
found=$((found + 1))
|
|
136
|
+
elif [ "$rc" -eq 1 ]; then
|
|
137
|
+
echo " Aborting lookup for '$ENTITY' due to grep error" >&2
|
|
138
|
+
fi
|
|
139
|
+
# rc=3 is not-found — continue silently (already printed by extract_block)
|
|
140
|
+
}
|
|
141
|
+
|
|
98
142
|
# 1. Type definition — all fields and relationships
|
|
99
|
-
|
|
143
|
+
try_extract \
|
|
100
144
|
"Type definition — fields and relationships" \
|
|
101
145
|
"^type ${ENTITY} implements Record" \
|
|
102
146
|
200
|
|
103
147
|
|
|
104
148
|
# 2. Filter input — used in `where:` arguments
|
|
105
|
-
|
|
149
|
+
try_extract \
|
|
106
150
|
"Filter options — use in where: { ... }" \
|
|
107
151
|
"^input ${ENTITY}_Filter" \
|
|
108
152
|
100
|
|
109
153
|
|
|
110
154
|
# 3. OrderBy input — used in `orderBy:` arguments
|
|
111
|
-
|
|
155
|
+
try_extract \
|
|
112
156
|
"Sort options — use in orderBy: { ... }" \
|
|
113
157
|
"^input ${ENTITY}_OrderBy" \
|
|
114
158
|
60
|
|
115
159
|
|
|
116
|
-
# 4. Create mutation
|
|
117
|
-
|
|
160
|
+
# 4. Create mutation wrapper
|
|
161
|
+
try_extract \
|
|
118
162
|
"Create mutation wrapper — ${ENTITY}CreateInput" \
|
|
119
163
|
"^input ${ENTITY}CreateInput" \
|
|
120
164
|
10
|
|
121
165
|
|
|
122
|
-
|
|
166
|
+
# 5. Create mutation fields
|
|
167
|
+
try_extract \
|
|
123
168
|
"Create mutation fields — ${ENTITY}CreateRepresentation" \
|
|
124
169
|
"^input ${ENTITY}CreateRepresentation" \
|
|
125
170
|
100
|
|
126
171
|
|
|
127
|
-
#
|
|
128
|
-
|
|
172
|
+
# 6. Update mutation wrapper
|
|
173
|
+
try_extract \
|
|
129
174
|
"Update mutation wrapper — ${ENTITY}UpdateInput" \
|
|
130
175
|
"^input ${ENTITY}UpdateInput" \
|
|
131
176
|
10
|
|
132
177
|
|
|
133
|
-
|
|
178
|
+
# 7. Update mutation fields
|
|
179
|
+
try_extract \
|
|
134
180
|
"Update mutation fields — ${ENTITY}UpdateRepresentation" \
|
|
135
181
|
"^input ${ENTITY}UpdateRepresentation" \
|
|
136
182
|
100
|
|
137
183
|
|
|
184
|
+
if [ "$found" -eq 0 ]; then
|
|
185
|
+
echo "WARNING: No schema entries found for '$ENTITY'."
|
|
186
|
+
echo " - Names are PascalCase (e.g., 'Account' not 'account')"
|
|
187
|
+
echo " - Custom objects may need deployment first"
|
|
188
|
+
fi
|
|
189
|
+
|
|
138
190
|
echo ""
|
|
139
191
|
done
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/webapp-template-feature-react-global-search-experimental",
|
|
3
|
-
"version": "1.112.
|
|
3
|
+
"version": "1.112.9",
|
|
4
4
|
"description": "Global search feature for Salesforce objects with filtering and pagination",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"author": "",
|