Repository navigation
Expand file tree
/
Copy pathadmin-shell-overrides.js
More file actions
220 lines (215 loc) · 6.9 KB
/
Copy pathadmin-shell-overrides.js
File metadata and controls
220 lines (215 loc) · 6.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
/**
* Per-component overrides for `generate-manifest.js`.
*
* The goal is a single source of truth (the `app/admin/<folder>/` scan), but a
* handful of components have shell wiring that predates this generator:
*
* - Non-default `componentUsages` key (e.g. `jouleSettingsComponent`).
* The manifest works either way, but keeping the historical key means the
* generator's first pass produces a byte-equivalent manifest.
*
* - Non-default routes. `feedback` and `homepage` each ship several routes
* into the same target (e.g. `homepageShelves` / `homepageRedirects` /
* `homepageConfig` all render `homepageTarget`). Some route names are
* referenced from `Shell.controller.js`'s `NAV_KEY_TO_ROUTE`.
*
* - Two-letter (or occasionally three-letter) `prefix`. UI5's router uses
* this to namespace hash segments. `generate-manifest.js` validates
* collision-freeness at build time — if you add a component without a
* prefix, the generator will pick the first free two-letter combo from
* the camelName and fail the build if none is available.
*
* If you add a new admin app and don't need any of the above,
* this file does not need to change.
*/
module.exports = {
//
// Emission order (matches shell navigation). Anything discovered but not
// listed here is appended in alphabetical order after these entries, so a
// new admin app just needs to slot into the folder scan and the nav model;
// if you want it in a specific position in the manifest, add its folder
// name here.
//
// Ordering here is the discovery output's emission order. The generator
// emits resourceRoots / componentUsages / routes / targets in this order —
// the current hand-authored manifest has three subtly-different orderings
// for those four blocks (e.g. contentModeration lives at position 8 in
// resourceRoots but LAST in componentUsages), and unifying is one of the
// side benefits of this generator.
order: [
'events',
'missions',
'groups',
'puzzles',
'tutorials',
'tags',
'categories',
'concepts',
'content-moderation',
'advocates',
'alerts',
'accomplishments',
'prizes',
'operations',
'accounts',
'changelog',
'privacy-audit',
'devtoberfest',
'devtoberfestSignups',
'analytics',
'tutorial-engagement',
'tutorial-completions',
'joule',
'knowledgeGraph',
'kgCommunities',
'kgOnDemand',
'topicClusters',
'feedback',
'secrets',
'semaphoreConfig',
'quarantine-events',
'uiEvents',
'search',
'navigator',
'display',
'tenant',
'ngds',
'homepage',
'shelf-definitions',
'verb-definitions',
'for-you',
'featured-topics',
'videos',
'video-rotation',
'pats',
'featureFlags',
'petoberfest',
'channels',
'channel-collections',
'channel-topic-map',
'channel-submissions'
],
//
// Non-default `componentUsages` key names (default is `<camelName>Component`).
//
usageName: {
devtoberfest: 'devtoberfest',
joule: 'jouleSettingsComponent',
knowledgeGraph: 'knowledgeGraphSettingsComponent',
uiEvents: 'uiEventsSettingsComponent',
search: 'searchSettingsComponent',
navigator: 'navigatorSettingsComponent',
display: 'displaySettingsComponent',
tenant: 'tenantSettingsComponent'
},
//
// Non-default target id (default is `<camelName>Target`).
//
targetName: {
joule: 'jouleSettingsTarget',
knowledgeGraph: 'knowledgeGraphSettingsTarget',
uiEvents: 'uiEventsSettingsTarget',
search: 'searchSettingsTarget',
navigator: 'navigatorSettingsTarget',
display: 'displaySettingsTarget',
tenant: 'tenantSettingsTarget'
},
//
// Route hand-picked prefix (UI5 router hash segment).
// 2-3 characters, must be unique across all component AND view targets.
// If a component isn't listed here the generator will auto-pick the first
// two-letter combo derived from the camelName; auto-picked prefixes are
// discouraged for stable URL bookmarks, but the collision check will fail
// the build rather than let two components share a prefix.
//
prefix: {
events: 'ev',
missions: 'mi',
groups: 'gr',
puzzles: 'pu',
tutorials: 'tu',
tags: 'ta',
categories: 'ca',
concepts: 'co',
advocates: 'av',
alerts: 'al',
accomplishments: 'ac',
prizes: 'pr',
operations: 'op',
accounts: 'au',
changelog: 'cl',
'privacy-audit': 'pa',
devtoberfest: 'dt',
devtoberfestSignups: 'dsg',
analytics: 'an',
'tutorial-engagement': 'teg',
'tutorial-completions': 'tcp',
joule: 'jo',
knowledgeGraph: 'kg',
kgCommunities: 'kc',
kgOnDemand: 'kod',
topicClusters: 'tc',
feedback: 'fb',
secrets: 'se',
semaphoreConfig: 'sm',
'quarantine-events': 'qu',
uiEvents: 'ue',
search: 'sr',
navigator: 'nv',
display: 'dp',
tenant: 'tn',
ngds: 'ng',
homepage: 'hp',
'verb-definitions': 'vd',
'shelf-definitions': 'sd',
'for-you': 'fy',
'featured-topics': 'ft',
videos: 'vi',
'video-rotation': 'vr',
'content-moderation': 'cm',
pats: 'pt',
featureFlags: 'ffl',
petoberfest: 'pb',
channels: 'ch',
'channel-collections': 'cc',
'channel-topic-map': 'ctm',
'channel-submissions': 'csub'
},
//
// Route mappings.
//
// Default: one route per component with `name = camelName` and
// `pattern = folderName`. Anything more elaborate goes here — additional
// routes into the same target, or a name that must not change because
// it is referenced from `Shell.controller.js` NAV_KEY_TO_ROUTE.
//
// Each entry replaces the default single-route emission for that folder.
//
routes: {
operations: [
{ name: 'operations', pattern: 'operations' },
{ name: 'pipelinelog', pattern: 'pipelinelog' },
{ name: 'joblog', pattern: 'joblog' }
],
feedback: [
// The dashboard variant renders a plain view (feedbackDashboardTarget)
// which lives in the template — this generator only emits the list route.
{ name: 'feedbackList', pattern: 'feedback/list' }
],
homepage: [
{ name: 'homepageShelves', pattern: 'homepage' },
{ name: 'homepageRedirects', pattern: 'homepageRedirects' },
{ name: 'homepageConfig', pattern: 'homepageConfig' }
],
petoberfest: [
// Two routes into the same petoberfestTarget: the default "petoberfest"
// (Pet Photo Moderation) plus "petoberfestContests", which Shell.controller.js
// deep-links to the componentUsage's inner Petoberfests List Report
// ("petoberfestContests&/pb/Petoberfests"). Without this override the
// generator emits only the default route and the Contests nav key 404s on
// the next manifest regeneration (every prebuild/deploy).
{ name: 'petoberfest', pattern: 'petoberfest' },
{ name: 'petoberfestContests', pattern: 'petoberfestContests' }
]
}
}