@salesforce/templates 66.17.0 → 66.17.2
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/lib/templates/project/angularextapp/_p_/_m_/_w_/_a_/package-lock.json +3 -3
- package/lib/templates/project/angularintapp/_p_/_m_/_w_/_a_/package-lock.json +3 -3
- package/lib/templates/project/reactexternalapp/CHANGELOG.md +129 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/package-lock.json +9 -9
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/package.json +6 -6
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/forms/auth-form.tsx +14 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/hooks/form.tsx +12 -3
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/layouts/privateRouteLayout.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/menu/AuthMenu.tsx +43 -5
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ChangePassword.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ForgotPassword.tsx +8 -4
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Login.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/Register.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/pages/ResetPassword.tsx +2 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/sessionTimeout/SessionTimeoutValidator.tsx +32 -9
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/adapters/sobject/parseResponse.ts +1 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/api/distinctValuesService.ts +3 -6
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/MergedSearchResults.tsx +4 -4
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/Search.tsx +5 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/SourceSection.tsx +5 -4
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/controls/PaginationControls.tsx +5 -6
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/controls/SearchBar.tsx +4 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/results/CmsResultRow.tsx +52 -5
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/results/DefaultResultRow.tsx +4 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/search/types.ts +1 -3
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/appLayout.tsx +13 -4
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/alerts/status-alert.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/alert.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/button.tsx +2 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/checkbox.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/input.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/components/ui/select.tsx +1 -1
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/pages/AccountObjectDetailPage.tsx +34 -17
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/pages/NotFound.tsx +22 -15
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/routes.tsx +1 -0
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/styles/global.css +2 -2
- package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +1 -1
- package/lib/templates/project/reactexternalapp/package.json +1 -1
- package/lib/templates/project/reactexternalapp/scripts/network-senders.mjs +84 -0
- package/lib/templates/project/reactexternalapp/scripts/org-setup-xml.mjs +11 -6
- package/lib/templates/project/reactexternalapp/scripts/org-setup.mjs +13 -5
- package/lib/templates/project/reactinternalapp/CHANGELOG.md +129 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/package-lock.json +9 -9
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/package.json +6 -6
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/adapters/sobject/parseResponse.ts +1 -2
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/api/distinctValuesService.ts +3 -6
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/MergedSearchResults.tsx +4 -4
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/Search.tsx +5 -2
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/SourceSection.tsx +5 -4
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/controls/PaginationControls.tsx +5 -6
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/controls/SearchBar.tsx +4 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/results/CmsResultRow.tsx +52 -5
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/components/results/DefaultResultRow.tsx +4 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/_f_/search/types.ts +1 -3
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/appLayout.tsx +10 -4
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/alerts/status-alert.tsx +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/alert.tsx +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/button.tsx +2 -2
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/checkbox.tsx +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/input.tsx +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/components/ui/select.tsx +1 -1
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/pages/AccountObjectDetailPage.tsx +30 -13
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/pages/NotFound.tsx +22 -15
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/routes.tsx +1 -0
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/src/styles/global.css +2 -2
- package/lib/templates/project/reactinternalapp/_p_/_m_/_w_/_a_/tsconfig.tsbuildinfo +1 -1
- package/lib/templates/project/reactinternalapp/package.json +1 -1
- package/lib/templates/project/reactinternalapp/scripts/network-senders.mjs +84 -0
- package/lib/templates/project/reactinternalapp/scripts/org-setup-xml.mjs +11 -6
- package/lib/templates/project/reactinternalapp/scripts/org-setup.mjs +13 -5
- package/lib/templates/uiBundles/angularbasic/package-lock.json +3 -3
- package/lib/templates/uiBundles/reactbasic/package-lock.json +9 -9
- package/lib/templates/uiBundles/reactbasic/package.json +6 -6
- package/lib/templates/uiBundles/reactbasic/src/components/alerts/status-alert.tsx +1 -1
- package/lib/templates/uiBundles/reactbasic/src/components/ui/alert.tsx +1 -1
- package/lib/templates/uiBundles/reactbasic/src/components/ui/button.tsx +2 -2
- package/lib/templates/uiBundles/reactbasic/src/components/ui/checkbox.tsx +1 -1
- package/lib/templates/uiBundles/reactbasic/src/components/ui/input.tsx +1 -1
- package/lib/templates/uiBundles/reactbasic/src/components/ui/select.tsx +1 -1
- package/lib/templates/uiBundles/reactbasic/src/styles/global.css +2 -2
- package/lib/templates/uiBundles/vuebasic/package-lock.json +10 -10
- package/package.json +6 -5
|
@@ -12360,9 +12360,9 @@
|
|
|
12360
12360
|
}
|
|
12361
12361
|
},
|
|
12362
12362
|
"node_modules/electron-to-chromium": {
|
|
12363
|
-
"version": "1.5.
|
|
12364
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
12365
|
-
"integrity": "sha512-
|
|
12363
|
+
"version": "1.5.454",
|
|
12364
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.454.tgz",
|
|
12365
|
+
"integrity": "sha512-NqD5GhkXnxJpDQVCmmpc546qjH6kei2VI9m45CTF+sQU7bcS7YeVt7ba0cnjueMH1AXGRu/driZUP9iYVSv7vg==",
|
|
12366
12366
|
"license": "ISC"
|
|
12367
12367
|
},
|
|
12368
12368
|
"node_modules/emoji-regex": {
|
|
@@ -12379,9 +12379,9 @@
|
|
|
12379
12379
|
}
|
|
12380
12380
|
},
|
|
12381
12381
|
"node_modules/electron-to-chromium": {
|
|
12382
|
-
"version": "1.5.
|
|
12383
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
12384
|
-
"integrity": "sha512-
|
|
12382
|
+
"version": "1.5.454",
|
|
12383
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.454.tgz",
|
|
12384
|
+
"integrity": "sha512-NqD5GhkXnxJpDQVCmmpc546qjH6kei2VI9m45CTF+sQU7bcS7YeVt7ba0cnjueMH1AXGRu/driZUP9iYVSv7vg==",
|
|
12385
12385
|
"license": "ISC"
|
|
12386
12386
|
},
|
|
12387
12387
|
"node_modules/emoji-regex": {
|
|
@@ -3,6 +3,135 @@
|
|
|
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
|
+
## [12.9.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.8.0...v12.9.0) (2026-09-29)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
## [12.8.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.7.0...v12.8.0) (2026-09-23)
|
|
15
|
+
|
|
16
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## [12.7.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.6.3...v12.7.0) (2026-09-22)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### Bug Fixes
|
|
26
|
+
|
|
27
|
+
* **template-sfdx-project:** preserve target network sender addresses @W-24209513@ ([#993](https://github.com/salesforce-experience-platform-emu/webapps/issues/993)) ([fddbfdd](https://github.com/salesforce-experience-platform-emu/webapps/commit/fddbfddcb41270720372b0fd4c486f043d9ba8c5))
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## [12.6.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.6.2...v12.6.3) (2026-09-14)
|
|
32
|
+
|
|
33
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
## [12.6.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.6.1...v12.6.2) (2026-09-14)
|
|
40
|
+
|
|
41
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
## [12.6.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.6.0...v12.6.1) (2026-09-11)
|
|
48
|
+
|
|
49
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## [12.6.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.8...v12.6.0) (2026-09-11)
|
|
56
|
+
|
|
57
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
## [12.5.8](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.7...v12.5.8) (2026-09-11)
|
|
64
|
+
|
|
65
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
## [12.5.7](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.6...v12.5.7) (2026-09-11)
|
|
72
|
+
|
|
73
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
## [12.5.6](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.5...v12.5.6) (2026-09-11)
|
|
80
|
+
|
|
81
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
## [12.5.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.4...v12.5.5) (2026-09-10)
|
|
88
|
+
|
|
89
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
## [12.5.4](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.3...v12.5.4) (2026-09-09)
|
|
96
|
+
|
|
97
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
## [12.5.3](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.2...v12.5.3) (2026-09-08)
|
|
104
|
+
|
|
105
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
## [12.5.2](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.1...v12.5.2) (2026-09-08)
|
|
112
|
+
|
|
113
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
## [12.5.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.5.0...v12.5.1) (2026-09-07)
|
|
120
|
+
|
|
121
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## [12.5.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.4.5...v12.5.0) (2026-09-04)
|
|
128
|
+
|
|
129
|
+
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
6
135
|
## [12.4.5](https://github.com/salesforce-experience-platform-emu/webapps/compare/v12.4.4...v12.4.5) (2026-09-03)
|
|
7
136
|
|
|
8
137
|
**Note:** Version bump only for package @salesforce/ui-bundle-template-base-sfdx-project
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
"version": "1.59.0",
|
|
10
10
|
"hasInstallScript": true,
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@salesforce/platform-sdk": "^12.
|
|
13
|
-
"@salesforce/ui-bundle": "^12.
|
|
12
|
+
"@salesforce/platform-sdk": "^12.9.0",
|
|
13
|
+
"@salesforce/ui-bundle": "^12.9.0",
|
|
14
14
|
"@tailwindcss/vite": "^4.1.17",
|
|
15
15
|
"@tanstack/react-form": "^1.27.7",
|
|
16
16
|
"class-variance-authority": "^0.7.1",
|
|
@@ -37,8 +37,8 @@
|
|
|
37
37
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
38
38
|
"@graphql-tools/utils": "^11.0.0",
|
|
39
39
|
"@playwright/test": "^1.49.0",
|
|
40
|
-
"@salesforce/graphiti": "^12.
|
|
41
|
-
"@salesforce/vite-plugin-ui-bundle": "^12.
|
|
40
|
+
"@salesforce/graphiti": "^12.9.0",
|
|
41
|
+
"@salesforce/vite-plugin-ui-bundle": "^12.9.0",
|
|
42
42
|
"@testing-library/jest-dom": "^6.6.3",
|
|
43
43
|
"@testing-library/react": "^16.1.0",
|
|
44
44
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@types/react": "^19.2.5",
|
|
47
47
|
"@types/react-dom": "^19.2.3",
|
|
48
48
|
"@vitejs/plugin-react": "^5.1.1",
|
|
49
|
-
"@vitest/ui": "^4.1.
|
|
49
|
+
"@vitest/ui": "^4.1.11",
|
|
50
50
|
"eslint": "^9.39.1",
|
|
51
51
|
"eslint-plugin-react": "^7.37.2",
|
|
52
52
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"typescript-eslint": "^8.46.4",
|
|
62
62
|
"vite": "^7.2.4",
|
|
63
63
|
"vite-plugin-graphql-codegen": "^3.6.3",
|
|
64
|
-
"vitest": "^4.1.
|
|
64
|
+
"vitest": "^4.1.11"
|
|
65
65
|
},
|
|
66
66
|
"engines": {
|
|
67
67
|
"node": ">=22"
|
|
@@ -14754,9 +14754,9 @@
|
|
|
14754
14754
|
"license": "MIT"
|
|
14755
14755
|
},
|
|
14756
14756
|
"node_modules/electron-to-chromium": {
|
|
14757
|
-
"version": "1.5.
|
|
14758
|
-
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.
|
|
14759
|
-
"integrity": "sha512-
|
|
14757
|
+
"version": "1.5.454",
|
|
14758
|
+
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.454.tgz",
|
|
14759
|
+
"integrity": "sha512-NqD5GhkXnxJpDQVCmmpc546qjH6kei2VI9m45CTF+sQU7bcS7YeVt7ba0cnjueMH1AXGRu/driZUP9iYVSv7vg==",
|
|
14760
14760
|
"license": "ISC"
|
|
14761
14761
|
},
|
|
14762
14762
|
"node_modules/emoji-regex": {
|
|
@@ -19,8 +19,8 @@
|
|
|
19
19
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
-
"@salesforce/platform-sdk": "^12.
|
|
23
|
-
"@salesforce/ui-bundle": "^12.
|
|
22
|
+
"@salesforce/platform-sdk": "^12.9.0",
|
|
23
|
+
"@salesforce/ui-bundle": "^12.9.0",
|
|
24
24
|
"@tailwindcss/vite": "^4.1.17",
|
|
25
25
|
"class-variance-authority": "^0.7.1",
|
|
26
26
|
"clsx": "^2.1.1",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
48
48
|
"@graphql-tools/utils": "^11.0.0",
|
|
49
49
|
"@playwright/test": "^1.49.0",
|
|
50
|
-
"@salesforce/graphiti": "^12.
|
|
51
|
-
"@salesforce/vite-plugin-ui-bundle": "^12.
|
|
50
|
+
"@salesforce/graphiti": "^12.9.0",
|
|
51
|
+
"@salesforce/vite-plugin-ui-bundle": "^12.9.0",
|
|
52
52
|
"@testing-library/jest-dom": "^6.6.3",
|
|
53
53
|
"@testing-library/react": "^16.1.0",
|
|
54
54
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
"@types/react": "^19.2.5",
|
|
57
57
|
"@types/react-dom": "^19.2.3",
|
|
58
58
|
"@vitejs/plugin-react": "^5.1.1",
|
|
59
|
-
"@vitest/ui": "^4.1.
|
|
59
|
+
"@vitest/ui": "^4.1.11",
|
|
60
60
|
"eslint": "^9.39.1",
|
|
61
61
|
"eslint-plugin-react": "^7.37.2",
|
|
62
62
|
"eslint-plugin-react-hooks": "^7.0.1",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"typescript-eslint": "^8.46.4",
|
|
72
72
|
"vite": "^7.2.4",
|
|
73
73
|
"vite-plugin-graphql-codegen": "^3.6.3",
|
|
74
|
-
"vitest": "^4.1.
|
|
74
|
+
"vitest": "^4.1.11"
|
|
75
75
|
},
|
|
76
76
|
"overrides": {
|
|
77
77
|
"lodash": "^4.18.1",
|
|
@@ -62,6 +62,7 @@ export function AuthForm({
|
|
|
62
62
|
|
|
63
63
|
return (
|
|
64
64
|
<CardLayout title={title} description={description}>
|
|
65
|
+
<h1 className="sr-only">{title}</h1>
|
|
65
66
|
<div className="space-y-6">
|
|
66
67
|
{/* [Dev Note] Auth status alert for authenticated users on public pages */}
|
|
67
68
|
{showAuthAlert && <StatusAlert variant="info">You are already logged in.</StatusAlert>}
|
|
@@ -71,10 +72,21 @@ export function AuthForm({
|
|
|
71
72
|
|
|
72
73
|
<form
|
|
73
74
|
id={id}
|
|
74
|
-
onSubmit={(e) => {
|
|
75
|
+
onSubmit={async (e) => {
|
|
75
76
|
e.preventDefault();
|
|
76
77
|
e.stopPropagation();
|
|
77
|
-
|
|
78
|
+
const formElement = e.currentTarget;
|
|
79
|
+
const previousFocus = document.activeElement;
|
|
80
|
+
await form.handleSubmit();
|
|
81
|
+
if (!form.state.isValid) {
|
|
82
|
+
requestAnimationFrame(() => {
|
|
83
|
+
if (formElement.isConnected && document.activeElement === previousFocus) {
|
|
84
|
+
formElement
|
|
85
|
+
.querySelector<HTMLElement>('[aria-invalid="true"]:not(:disabled)')
|
|
86
|
+
?.focus();
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}
|
|
78
90
|
}}
|
|
79
91
|
{...props}
|
|
80
92
|
>
|
package/lib/templates/project/reactexternalapp/_p_/_m_/_w_/_a_/src/_f_/authentication/hooks/form.tsx
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useId } from "react";
|
|
2
|
-
import { createFormHookContexts, createFormHook } from "@tanstack/react-form";
|
|
2
|
+
import { createFormHookContexts, createFormHook, useStore } from "@tanstack/react-form";
|
|
3
3
|
import {
|
|
4
4
|
Field,
|
|
5
5
|
FieldDescription,
|
|
@@ -40,7 +40,10 @@ function TextField({
|
|
|
40
40
|
const id = providedId ?? generatedId;
|
|
41
41
|
const descriptionId = `${id}-description`;
|
|
42
42
|
const errorId = `${id}-error`;
|
|
43
|
-
|
|
43
|
+
// Submitted fields can be invalid before their first blur.
|
|
44
|
+
const submissionAttempts = useStore(field.form.store, (state) => state.submissionAttempts);
|
|
45
|
+
const isInvalid =
|
|
46
|
+
(field.state.meta.isBlurred || submissionAttempts > 0) && field.state.meta.errors.length > 0;
|
|
44
47
|
|
|
45
48
|
// Deduplicate errors by message
|
|
46
49
|
const errors = field.state.meta.errors;
|
|
@@ -64,7 +67,13 @@ function TextField({
|
|
|
64
67
|
aria-describedby={cn(description && descriptionId, isInvalid && errorId)}
|
|
65
68
|
{...props}
|
|
66
69
|
/>
|
|
67
|
-
{isInvalid && uniqueErrors.length > 0 &&
|
|
70
|
+
{isInvalid && uniqueErrors.length > 0 && (
|
|
71
|
+
<FieldError
|
|
72
|
+
id={errorId}
|
|
73
|
+
errors={uniqueErrors}
|
|
74
|
+
role={submissionAttempts > 0 ? undefined : "alert"}
|
|
75
|
+
/>
|
|
76
|
+
)}
|
|
68
77
|
</Field>
|
|
69
78
|
);
|
|
70
79
|
}
|
|
@@ -12,7 +12,7 @@ export default function PrivateRoute() {
|
|
|
12
12
|
const { isAuthenticated, loading } = useAuth();
|
|
13
13
|
const location = useLocation();
|
|
14
14
|
|
|
15
|
-
if (loading) return
|
|
15
|
+
if (loading) return <p role="status">Checking sign-in…</p>;
|
|
16
16
|
|
|
17
17
|
if (!isAuthenticated) {
|
|
18
18
|
const searchParams = new URLSearchParams();
|
|
@@ -1,5 +1,12 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { useEffect, useId, useRef } from "react";
|
|
1
8
|
import { CircleUser, LogIn, LogOut, UserPen, UserPlus } from "lucide-react";
|
|
2
|
-
import { Link } from "react-router";
|
|
9
|
+
import { Link, useLocation } from "react-router";
|
|
3
10
|
import { useAuth } from "../context/AuthContext";
|
|
4
11
|
import { ROUTES } from "../authenticationConfig";
|
|
5
12
|
import { Button } from "../../../components/ui/button";
|
|
@@ -31,6 +38,13 @@ export interface AuthMenuProps {
|
|
|
31
38
|
|
|
32
39
|
export function AuthMenu({ trigger, guestContent, menuItems, className }: AuthMenuProps) {
|
|
33
40
|
const { user, isAuthenticated, loading, logout } = useAuth();
|
|
41
|
+
const { pathname } = useLocation();
|
|
42
|
+
const userLabelId = useId();
|
|
43
|
+
const openedPathname = useRef(pathname);
|
|
44
|
+
const currentPathname = useRef(pathname);
|
|
45
|
+
useEffect(() => {
|
|
46
|
+
currentPathname.current = pathname;
|
|
47
|
+
}, [pathname]);
|
|
34
48
|
|
|
35
49
|
if (loading) {
|
|
36
50
|
return <Skeleton className="size-8 rounded-full" />;
|
|
@@ -49,14 +63,38 @@ export function AuthMenu({ trigger, guestContent, menuItems, className }: AuthMe
|
|
|
49
63
|
const triggerNode = (isAuthenticated && user && trigger?.(user)) || defaultTrigger;
|
|
50
64
|
|
|
51
65
|
return (
|
|
52
|
-
<DropdownMenu
|
|
66
|
+
<DropdownMenu
|
|
67
|
+
onOpenChange={(open) => {
|
|
68
|
+
if (open) openedPathname.current = pathname;
|
|
69
|
+
}}
|
|
70
|
+
>
|
|
53
71
|
<DropdownMenuTrigger asChild>{triggerNode}</DropdownMenuTrigger>
|
|
54
72
|
|
|
55
|
-
<DropdownMenuContent
|
|
73
|
+
<DropdownMenuContent
|
|
74
|
+
align="end"
|
|
75
|
+
aria-describedby={isAuthenticated ? userLabelId : undefined}
|
|
76
|
+
className={className ?? "w-48"}
|
|
77
|
+
onCloseAutoFocus={(event) => {
|
|
78
|
+
if (openedPathname.current === currentPathname.current) return;
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
// Recover page focus intercepted by the closing menu trap.
|
|
81
|
+
const active = document.activeElement;
|
|
82
|
+
if (active && active !== document.body && active.isConnected) return;
|
|
83
|
+
const target =
|
|
84
|
+
document.querySelector<HTMLElement>("main h1, [role='main'] h1") ??
|
|
85
|
+
document.querySelector<HTMLElement>("main, [role='main']");
|
|
86
|
+
if (target) {
|
|
87
|
+
if (!target.hasAttribute("tabindex")) target.setAttribute("tabindex", "-1");
|
|
88
|
+
target.focus();
|
|
89
|
+
}
|
|
90
|
+
}}
|
|
91
|
+
>
|
|
56
92
|
{isAuthenticated ? (
|
|
57
93
|
<>
|
|
58
|
-
<DropdownMenuLabel className="truncate">
|
|
59
|
-
|
|
94
|
+
<DropdownMenuLabel id={userLabelId} className="truncate" aria-hidden="true">
|
|
95
|
+
{user?.name}
|
|
96
|
+
</DropdownMenuLabel>
|
|
97
|
+
<DropdownMenuSeparator aria-hidden="true" />
|
|
60
98
|
<DropdownMenuItem asChild>
|
|
61
99
|
<Link to={ROUTES.PROFILE.PATH}>
|
|
62
100
|
<UserPen className="size-4" />
|
|
@@ -4,11 +4,15 @@ import { CenteredPageLayout } from "../layout/centered-page-layout";
|
|
|
4
4
|
import { AuthForm } from "../forms/auth-form";
|
|
5
5
|
import { useAppForm } from "../hooks/form";
|
|
6
6
|
import { createDataSDK } from "@salesforce/platform-sdk";
|
|
7
|
-
import { ROUTES
|
|
7
|
+
import { ROUTES } from "../authenticationConfig";
|
|
8
8
|
import { ApiError, handleApiResponse } from "../utils/helpers";
|
|
9
9
|
|
|
10
10
|
const forgotPasswordSchema = z.object({
|
|
11
|
-
username: z
|
|
11
|
+
username: z
|
|
12
|
+
.string()
|
|
13
|
+
.trim()
|
|
14
|
+
.toLowerCase()
|
|
15
|
+
.email("Enter your username in email format, for example asmith@example.com"),
|
|
12
16
|
});
|
|
13
17
|
|
|
14
18
|
export default function ForgotPassword() {
|
|
@@ -42,7 +46,7 @@ export default function ForgotPassword() {
|
|
|
42
46
|
err.errors.length === 1 ? (
|
|
43
47
|
err.errors[0]
|
|
44
48
|
) : (
|
|
45
|
-
<ul>
|
|
49
|
+
<ul role="list">
|
|
46
50
|
{err.errors.map((e, i) => (
|
|
47
51
|
<li key={i}>{e}</li>
|
|
48
52
|
))}
|
|
@@ -75,7 +79,7 @@ export default function ForgotPassword() {
|
|
|
75
79
|
{(field) => (
|
|
76
80
|
<field.TextField
|
|
77
81
|
label="Username"
|
|
78
|
-
placeholder=
|
|
82
|
+
placeholder="asmith@example.com"
|
|
79
83
|
autoComplete="username"
|
|
80
84
|
disabled={success}
|
|
81
85
|
/>
|
|
@@ -45,7 +45,7 @@ export default function ResetPassword() {
|
|
|
45
45
|
err.errors.length === 1 ? (
|
|
46
46
|
err.errors[0]
|
|
47
47
|
) : (
|
|
48
|
-
<ul>
|
|
48
|
+
<ul role="list">
|
|
49
49
|
{err.errors.map((e, i) => (
|
|
50
50
|
<li key={i}>{e}</li>
|
|
51
51
|
))}
|
|
@@ -64,6 +64,7 @@ export default function ResetPassword() {
|
|
|
64
64
|
return (
|
|
65
65
|
<CenteredPageLayout title={ROUTES.RESET_PASSWORD.TITLE}>
|
|
66
66
|
<CardLayout title="Reset Password">
|
|
67
|
+
<h1 className="sr-only">Reset Password</h1>
|
|
67
68
|
<StatusAlert>
|
|
68
69
|
Reset token is invalid or expired.{" "}
|
|
69
70
|
<Link to={ROUTES.FORGOT_PASSWORD.PATH} className="underline underline-offset-4">
|
|
@@ -378,6 +378,7 @@ function SessionWarningModal({
|
|
|
378
378
|
onCountdownExpire,
|
|
379
379
|
}: SessionWarningModalProps) {
|
|
380
380
|
const continueButtonRef = useRef<HTMLButtonElement>(null);
|
|
381
|
+
const previousFocusRef = useRef<HTMLElement | null>(null);
|
|
381
382
|
|
|
382
383
|
// Countdown timer with accessibility
|
|
383
384
|
const timer = useCountdownTimer({
|
|
@@ -399,13 +400,6 @@ function SessionWarningModal({
|
|
|
399
400
|
start();
|
|
400
401
|
}, [isOpen, timeRemaining, start, stop, reset]);
|
|
401
402
|
|
|
402
|
-
// Focus the continue button when dialog opens
|
|
403
|
-
useEffect(() => {
|
|
404
|
-
if (isOpen) {
|
|
405
|
-
continueButtonRef.current?.focus();
|
|
406
|
-
}
|
|
407
|
-
}, [isOpen]);
|
|
408
|
-
|
|
409
403
|
// Handle "Continue Working" button click
|
|
410
404
|
const handleContinue = useCallback(() => {
|
|
411
405
|
stop();
|
|
@@ -421,6 +415,30 @@ function SessionWarningModal({
|
|
|
421
415
|
return (
|
|
422
416
|
<Dialog open={isOpen} onOpenChange={() => {}}>
|
|
423
417
|
<DialogContent
|
|
418
|
+
aria-labelledby="session-warning-title"
|
|
419
|
+
aria-describedby="session-warning-description"
|
|
420
|
+
onOpenAutoFocus={(event) => {
|
|
421
|
+
event.preventDefault();
|
|
422
|
+
previousFocusRef.current =
|
|
423
|
+
document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
424
|
+
continueButtonRef.current?.focus();
|
|
425
|
+
}}
|
|
426
|
+
onCloseAutoFocus={(event) => {
|
|
427
|
+
event.preventDefault();
|
|
428
|
+
const previous = previousFocusRef.current;
|
|
429
|
+
previousFocusRef.current = null;
|
|
430
|
+
if (previous?.isConnected && previous !== document.body) {
|
|
431
|
+
previous.focus();
|
|
432
|
+
if (document.activeElement === previous) return;
|
|
433
|
+
}
|
|
434
|
+
const target = document.querySelector<HTMLElement>("main, #main-content");
|
|
435
|
+
if (target) {
|
|
436
|
+
if (target.tabIndex < 0 && !target.hasAttribute("tabindex")) {
|
|
437
|
+
target.setAttribute("tabindex", "-1");
|
|
438
|
+
}
|
|
439
|
+
target.focus();
|
|
440
|
+
}
|
|
441
|
+
}}
|
|
424
442
|
showCloseButton={false}
|
|
425
443
|
onEscapeKeyDown={(e) => e.preventDefault()}
|
|
426
444
|
onPointerDownOutside={(e) => e.preventDefault()}
|
|
@@ -454,10 +472,10 @@ function SessionWarningModal({
|
|
|
454
472
|
</div>
|
|
455
473
|
|
|
456
474
|
<DialogFooter className="flex gap-4 justify-end">
|
|
457
|
-
<Button variant="outline" onClick={handleLogoutClick}
|
|
475
|
+
<Button variant="outline" onClick={handleLogoutClick}>
|
|
458
476
|
{LABELS.logoutButton}
|
|
459
477
|
</Button>
|
|
460
|
-
<Button variant="default" onClick={handleContinue}
|
|
478
|
+
<Button variant="default" onClick={handleContinue} ref={continueButtonRef}>
|
|
461
479
|
{LABELS.continueButton}
|
|
462
480
|
</Button>
|
|
463
481
|
</DialogFooter>
|
|
@@ -578,6 +596,11 @@ export default function SessionTimeoutValidator({
|
|
|
578
596
|
*/
|
|
579
597
|
const handleDismissAlert = useCallback(() => {
|
|
580
598
|
setShowExpiredAlert(false);
|
|
599
|
+
const main = document.querySelector<HTMLElement>("main, #main-content");
|
|
600
|
+
if (main) {
|
|
601
|
+
if (!main.hasAttribute("tabindex")) main.setAttribute("tabindex", "-1");
|
|
602
|
+
main.focus();
|
|
603
|
+
}
|
|
581
604
|
}, []);
|
|
582
605
|
|
|
583
606
|
return (
|
|
@@ -31,8 +31,7 @@ export function parseSObjectResponse(
|
|
|
31
31
|
request: SourceRequest<SObjectSourceConfig>,
|
|
32
32
|
): SourceResult | null {
|
|
33
33
|
const queryRoot = (root?.uiapi as Record<string, unknown> | undefined)?.query as
|
|
34
|
-
|
|
35
|
-
| undefined;
|
|
34
|
+
Record<string, RawSourceResult | null | undefined> | undefined;
|
|
36
35
|
|
|
37
36
|
const raw = queryRoot?.[request.source.key];
|
|
38
37
|
if (raw == null) return null;
|
|
@@ -64,18 +64,15 @@ export async function fetchDistinctValues(
|
|
|
64
64
|
|
|
65
65
|
const root = response.data as Record<string, unknown> | undefined;
|
|
66
66
|
const aggregate = (root?.uiapi as Record<string, unknown> | undefined)?.aggregate as
|
|
67
|
-
|
|
68
|
-
| undefined;
|
|
67
|
+
Record<string, unknown> | undefined;
|
|
69
68
|
const objectAgg = aggregate?.[objectName] as
|
|
70
|
-
|
|
71
|
-
| undefined;
|
|
69
|
+
{ edges?: Array<{ node?: { aggregate?: Record<string, unknown> } }> } | undefined;
|
|
72
70
|
const edges = objectAgg?.edges ?? [];
|
|
73
71
|
|
|
74
72
|
return edges
|
|
75
73
|
.map((edge) => {
|
|
76
74
|
const field = edge?.node?.aggregate?.[fieldName] as
|
|
77
|
-
|
|
78
|
-
| undefined;
|
|
75
|
+
{ value?: string | null; displayValue?: string | null; label?: string | null } | undefined;
|
|
79
76
|
const value = field?.value;
|
|
80
77
|
if (value == null || value === "") return null;
|
|
81
78
|
return { value, label: field?.label ?? field?.displayValue ?? value };
|
|
@@ -137,7 +137,7 @@ export function MergedSearchResults({
|
|
|
137
137
|
whole-request/network failure). Shown once, above the grid. */}
|
|
138
138
|
{error && (
|
|
139
139
|
<Alert variant="destructive" role="alert">
|
|
140
|
-
<AlertCircle />
|
|
140
|
+
<AlertCircle aria-hidden="true" />
|
|
141
141
|
<AlertTitle>Search failed</AlertTitle>
|
|
142
142
|
<AlertDescription>{error}</AlertDescription>
|
|
143
143
|
</Alert>
|
|
@@ -151,7 +151,7 @@ export function MergedSearchResults({
|
|
|
151
151
|
.filter((c) => !!c.error)
|
|
152
152
|
.map((c) => (
|
|
153
153
|
<Alert key={c.config.key} variant="destructive" role="alert">
|
|
154
|
-
<AlertCircle />
|
|
154
|
+
<AlertCircle aria-hidden="true" />
|
|
155
155
|
<AlertTitle>Failed to load {c.config.label}</AlertTitle>
|
|
156
156
|
<AlertDescription>{c.error}</AlertDescription>
|
|
157
157
|
</Alert>
|
|
@@ -171,14 +171,14 @@ export function MergedSearchResults({
|
|
|
171
171
|
<Skeleton key={i} className="h-48 w-full rounded-lg" />
|
|
172
172
|
))}
|
|
173
173
|
</div>
|
|
174
|
-
) : isShortQuery ? (
|
|
174
|
+
) : error ? null : isShortQuery ? (
|
|
175
175
|
<p className="py-12 text-center text-sm text-muted-foreground">{shortQueryMessage}</p>
|
|
176
176
|
) : mergedResults.length === 0 ? (
|
|
177
177
|
<p className="py-12 text-center text-sm text-muted-foreground">
|
|
178
178
|
{emptyMessage ?? "No results found."}
|
|
179
179
|
</p>
|
|
180
180
|
) : (
|
|
181
|
-
<ul className={gridClassName}>
|
|
181
|
+
<ul role="list" className={gridClassName}>
|
|
182
182
|
{mergedResults.map(({ sourceKey, node }, i) => {
|
|
183
183
|
const source = handle.sources[sourceKey]?.config;
|
|
184
184
|
if (!source) return null;
|