@pgcorp/ui-kit 0.9.0 → 0.10.0
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/README.md +188 -9
- package/docs/getting-started.md +135 -0
- package/docs/public-api.md +53 -4
- package/docs/rich-document.md +216 -0
- package/docs/scroll-viewport.md +167 -0
- package/package.json +103 -50
- package/src/components/layout/SAppShell.vue +3 -1
- package/src/components/layout/SDockRegion.vue +5 -3
- package/src/components/layout/SWorkbenchPanelShell.vue +4 -2
- package/src/components/shared/_internal/SDialogSurface.css +5 -0
- package/src/components/shared/_internal/SDialogSurface.vue +3 -1
- package/src/components/shared/_internal/SToastItem.css +4 -0
- package/src/components/shared/_internal/SToastItem.vue +44 -8
- package/src/components/shared/_internal/STreeNode.vue +24 -11
- package/src/components/shared/complex/SKanbanLane.vue +4 -2
- package/src/components/shared/containers/SCloudChromeRow.vue +3 -2
- package/src/components/shared/containers/SDrawer.vue +5 -2
- package/src/components/shared/containers/SModal.vue +5 -2
- package/src/components/shared/containers/SPanel.vue +4 -2
- package/src/components/shared/containers/SPopover.vue +7 -3
- package/src/components/shared/containers/SUiKitLocaleProvider.vue +57 -0
- package/src/components/shared/controls/SButton.css +14 -10
- package/src/components/shared/controls/SCombobox.vue +8 -6
- package/src/components/shared/controls/SComboboxTrigger.css +7 -4
- package/src/components/shared/controls/SComboboxTrigger.vue +5 -2
- package/src/components/shared/controls/SContextToggleButton.vue +6 -4
- package/src/components/shared/controls/SDragHandle.vue +8 -4
- package/src/components/shared/controls/SDropdownMenu.vue +7 -4
- package/src/components/shared/controls/SInputText.css +5 -4
- package/src/components/shared/controls/SListbox.vue +4 -2
- package/src/components/shared/controls/SSelect.vue +4 -2
- package/src/components/shared/controls/_internal/SInlineTokenSurface.vue +4 -2
- package/src/components/shared/data-display/SChart.vue +7 -5
- package/src/components/shared/data-display/SChip.vue +3 -1
- package/src/components/shared/data-display/SCodeBlock.css +4 -0
- package/src/components/shared/data-display/SCodeBlock.vue +42 -20
- package/src/components/shared/data-display/SCodeEditor.css +17 -0
- package/src/components/shared/data-display/SCodeEditor.vue +173 -8
- package/src/components/shared/data-display/SCodeSearchPanel.vue +48 -33
- package/src/components/shared/data-display/SCodeWorkspaceEditor.css +13 -0
- package/src/components/shared/data-display/SCodeWorkspaceEditor.vue +355 -0
- package/src/components/shared/data-display/SControlledToastViewport.css +89 -0
- package/src/components/shared/data-display/SControlledToastViewport.vue +205 -0
- package/src/components/shared/data-display/SCopyField.vue +12 -10
- package/src/components/shared/data-display/SDiffViewer.css +122 -0
- package/src/components/shared/data-display/SDiffViewer.vue +499 -0
- package/src/components/shared/data-display/SDocBlock.vue +99 -71
- package/src/components/shared/data-display/SExpandableText.vue +10 -8
- package/src/components/shared/data-display/SJsonTree.vue +4 -2
- package/src/components/shared/data-display/SLinkedSystemsList.vue +4 -2
- package/src/components/shared/data-display/SMessage.vue +6 -6
- package/src/components/shared/data-display/SRichDocument.css +8 -0
- package/src/components/shared/data-display/SRichDocument.vue +65 -0
- package/src/components/shared/data-display/SScrollViewport.css +53 -0
- package/src/components/shared/data-display/SScrollViewport.vue +470 -0
- package/src/components/shared/data-display/STable.vue +38 -19
- package/src/components/shared/data-display/SToastContainer.vue +22 -17
- package/src/components/shared/data-display/_internal/SCodeTokenLine.css +72 -0
- package/src/components/shared/data-display/_internal/SCodeTokenLine.vue +79 -0
- package/src/components/shared/data-display/_internal/SRichBlockNode.css +85 -0
- package/src/components/shared/data-display/_internal/SRichBlockNode.vue +282 -0
- package/src/components/shared/data-display/_internal/SRichInlineNode.css +6 -0
- package/src/components/shared/data-display/_internal/SRichInlineNode.vue +76 -0
- package/src/components/shared/data-display/_internal/SRichMath.css +42 -0
- package/src/components/shared/data-display/_internal/SRichMath.vue +102 -0
- package/src/components/shared/data-display/codeEditor.ts +200 -0
- package/src/components/shared/data-display/codeWorkspace.ts +233 -0
- package/src/components/shared/data-display/diff.ts +541 -0
- package/src/components/shared/data-display/richDocument.ts +876 -0
- package/src/components/shared/data-display/scrollViewport.ts +47 -0
- package/src/components/shared/data-display/toast.ts +194 -0
- package/src/components/shared/database/SDataGrid.vue +7 -4
- package/src/components/shared/database/SSqlEditor.vue +39 -39
- package/src/components/shared/feedback/SAsyncState.vue +3 -1
- package/src/components/shared/graph/SGraphViewport.vue +11 -9
- package/src/components/shared/navigation/SBreadcrumbs.vue +8 -5
- package/src/components/shared/navigation/SCatalogNavigator.vue +26 -20
- package/src/components/shared/navigation/STabList.vue +10 -6
- package/src/components/shared/navigation/STabs.vue +15 -11
- package/src/components/shared/navigation/SWizardSteps.vue +4 -2
- package/src/components/shared/persona/SPersonaProjectPicker.vue +31 -27
- package/src/components/shared/persona/SPersonaRunWorkbench.vue +39 -33
- package/src/components/shared/persona/_internal/SPersonaRunConsole.vue +8 -6
- package/src/components/shared/persona/_internal/labels.ts +66 -57
- package/src/components/shared/persona/presentation.ts +140 -110
- package/src/composables/useFloatingPosition.ts +39 -2
- package/src/composables/useUiKitLocale.ts +17 -0
- package/src/internal/codeHighlight.ts +110 -0
- package/src/internal/diffEngine.ts +464 -0
- package/src/internal/diffRuntime.ts +189 -0
- package/src/internal/feedbackPresentation.ts +33 -14
- package/src/internal/localeContext.ts +22 -0
- package/src/internal/ownedAttrs.ts +8 -0
- package/src/internal/runtimeContract.ts +11 -9
- package/src/internal/semanticSizing.ts +13 -0
- package/src/locales/catalog.ts +634 -0
- package/src/locales/locale.ts +472 -0
- package/src/locales/messages.generated.ts +1826 -0
- package/src/locales/messages.ts +150 -0
- package/src/stores/useNotifierStore.ts +61 -44
- package/src/styles/tokens.css +20 -2
- package/src/theme.ts +59 -32
- package/src/workers/diff.worker.ts +73 -0
- package/src/workers/diffProtocol.ts +155 -0
- package/src/components/shared/data-display/SToastContainer.css +0 -53
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
/** Supported UI-kit locales. */
|
|
2
|
+
export const UI_KIT_LOCALES = ['en', 'ru', 'zh-CN', 'zh-TW'] as const
|
|
3
|
+
|
|
4
|
+
/** Locale identifier owned by one Vue application subtree. */
|
|
5
|
+
export type UiKitLocale = (typeof UI_KIT_LOCALES)[number]
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Complete schema for text owned by UI-kit controls.
|
|
9
|
+
* Domain content supplied by consumers is intentionally outside this schema.
|
|
10
|
+
*/
|
|
11
|
+
export interface UiKitMessages {
|
|
12
|
+
actions: {
|
|
13
|
+
close: string
|
|
14
|
+
dismiss: string
|
|
15
|
+
copy: string
|
|
16
|
+
retry: string
|
|
17
|
+
expand: string
|
|
18
|
+
collapse: string
|
|
19
|
+
select: string
|
|
20
|
+
deselect: string
|
|
21
|
+
selectAll: string
|
|
22
|
+
clearSelection: string
|
|
23
|
+
refresh: string
|
|
24
|
+
search: string
|
|
25
|
+
previous: string
|
|
26
|
+
next: string
|
|
27
|
+
removeChip: string
|
|
28
|
+
}
|
|
29
|
+
clipboard: {
|
|
30
|
+
copy: string
|
|
31
|
+
copied: string
|
|
32
|
+
copyErrorTitle: string
|
|
33
|
+
copyCode: string
|
|
34
|
+
codeCopied: string
|
|
35
|
+
codeCopyUnavailable: string
|
|
36
|
+
clipboardUnavailable: string
|
|
37
|
+
codeCopyFailed: string
|
|
38
|
+
valueCopyFailed: string
|
|
39
|
+
documentCopyFailed: string
|
|
40
|
+
textCopyFailed: string
|
|
41
|
+
emptyCode: string
|
|
42
|
+
valueCopied: string
|
|
43
|
+
emptyValue: string
|
|
44
|
+
copyDocument: string
|
|
45
|
+
documentCopied: string
|
|
46
|
+
emptyDocument: string
|
|
47
|
+
copyText: string
|
|
48
|
+
textCopied: string
|
|
49
|
+
emptyText: string
|
|
50
|
+
}
|
|
51
|
+
feedback: {
|
|
52
|
+
loading: string
|
|
53
|
+
empty: string
|
|
54
|
+
error: string
|
|
55
|
+
unknown: string
|
|
56
|
+
notifications: string
|
|
57
|
+
closeNotification: string
|
|
58
|
+
dismissMessage: string
|
|
59
|
+
titleStatus: string
|
|
60
|
+
titleInformation: string
|
|
61
|
+
titleSuccess: string
|
|
62
|
+
titleWarning: string
|
|
63
|
+
titleError: string
|
|
64
|
+
titleRunning: string
|
|
65
|
+
serverResponseError: string
|
|
66
|
+
request: string
|
|
67
|
+
openLinkFailed: string
|
|
68
|
+
}
|
|
69
|
+
dialog: {
|
|
70
|
+
close: string
|
|
71
|
+
drawer: string
|
|
72
|
+
modal: string
|
|
73
|
+
moreActions: string
|
|
74
|
+
}
|
|
75
|
+
layout: {
|
|
76
|
+
resizeBottomPanel: string
|
|
77
|
+
resizeLeftPanel: string
|
|
78
|
+
resizeRightPanel: string
|
|
79
|
+
resizeSidePanel: string
|
|
80
|
+
dragActive: string
|
|
81
|
+
dragIdle: string
|
|
82
|
+
}
|
|
83
|
+
navigation: {
|
|
84
|
+
main: string
|
|
85
|
+
breadcrumbs: string
|
|
86
|
+
tabs: string
|
|
87
|
+
tabActions: string
|
|
88
|
+
wizardSteps: string
|
|
89
|
+
catalog: string
|
|
90
|
+
found: string
|
|
91
|
+
of: string
|
|
92
|
+
group: string
|
|
93
|
+
sort: string
|
|
94
|
+
catalogItems: string
|
|
95
|
+
allGroups: string
|
|
96
|
+
sortNameAscending: string
|
|
97
|
+
sortNameDescending: string
|
|
98
|
+
sortId: string
|
|
99
|
+
noResults: string
|
|
100
|
+
}
|
|
101
|
+
forms: {
|
|
102
|
+
selectPlaceholder: string
|
|
103
|
+
searchPlaceholder: string
|
|
104
|
+
noOptions: string
|
|
105
|
+
addToContext: string
|
|
106
|
+
removeFromContext: string
|
|
107
|
+
openToken: string
|
|
108
|
+
removeToken: string
|
|
109
|
+
}
|
|
110
|
+
kanban: { empty: string }
|
|
111
|
+
tree: {
|
|
112
|
+
expandNode: string
|
|
113
|
+
collapseNode: string
|
|
114
|
+
selectNode: string
|
|
115
|
+
deselectNode: string
|
|
116
|
+
}
|
|
117
|
+
table: {
|
|
118
|
+
accessibleName: string
|
|
119
|
+
rowDetails: string
|
|
120
|
+
detailsFor: string
|
|
121
|
+
selectAllRows: string
|
|
122
|
+
clearAllRows: string
|
|
123
|
+
selectRow: string
|
|
124
|
+
deselectRow: string
|
|
125
|
+
selectionUnavailable: string
|
|
126
|
+
expandRow: string
|
|
127
|
+
collapseRow: string
|
|
128
|
+
loading: string
|
|
129
|
+
empty: string
|
|
130
|
+
dataGridLoading: string
|
|
131
|
+
dataGridEmpty: string
|
|
132
|
+
sortAscending: string
|
|
133
|
+
sortDescending: string
|
|
134
|
+
clearSort: string
|
|
135
|
+
sortPriority: string
|
|
136
|
+
ascending: string
|
|
137
|
+
descending: string
|
|
138
|
+
addSortAscending: string
|
|
139
|
+
sortNextDescending: string
|
|
140
|
+
removeFromSort: string
|
|
141
|
+
multiSortSummary: string
|
|
142
|
+
rowLabel: string
|
|
143
|
+
}
|
|
144
|
+
editor: {
|
|
145
|
+
codeBlock: string
|
|
146
|
+
documentBlock: string
|
|
147
|
+
loading: string
|
|
148
|
+
search: string
|
|
149
|
+
noSearchResults: string
|
|
150
|
+
previousMatch: string
|
|
151
|
+
nextMatch: string
|
|
152
|
+
closeSearch: string
|
|
153
|
+
matchPosition: string
|
|
154
|
+
find: string
|
|
155
|
+
replace: string
|
|
156
|
+
nextMatchShort: string
|
|
157
|
+
previousMatchShort: string
|
|
158
|
+
selectAllMatches: string
|
|
159
|
+
matchCase: string
|
|
160
|
+
regularExpression: string
|
|
161
|
+
wholeWord: string
|
|
162
|
+
replaceOne: string
|
|
163
|
+
replaceAll: string
|
|
164
|
+
sqlLoading: string
|
|
165
|
+
sqlPlaceholder: string
|
|
166
|
+
diagnosticsCount: string
|
|
167
|
+
plainText: string
|
|
168
|
+
workspaceEmpty: string
|
|
169
|
+
closeDocument: string
|
|
170
|
+
diffBefore: string
|
|
171
|
+
diffAfter: string
|
|
172
|
+
diffComputing: string
|
|
173
|
+
diffNoChanges: string
|
|
174
|
+
diffExpandGap: string
|
|
175
|
+
diffCollapseGap: string
|
|
176
|
+
diffMissingLineBreak: string
|
|
177
|
+
diffSummary: string
|
|
178
|
+
diffUnchangedLine: string
|
|
179
|
+
diffRemovedLine: string
|
|
180
|
+
diffAddedLine: string
|
|
181
|
+
mathLoading: string
|
|
182
|
+
mathError: string
|
|
183
|
+
}
|
|
184
|
+
chart: {
|
|
185
|
+
accessibleName: string
|
|
186
|
+
empty: string
|
|
187
|
+
category: string
|
|
188
|
+
dataFor: string
|
|
189
|
+
noNonZeroValues: string
|
|
190
|
+
}
|
|
191
|
+
graph: {
|
|
192
|
+
invalidData: string
|
|
193
|
+
webglRequired: string
|
|
194
|
+
renderFailed: string
|
|
195
|
+
themeFailed: string
|
|
196
|
+
}
|
|
197
|
+
data: {
|
|
198
|
+
emptyKey: string
|
|
199
|
+
linkedSystems: string
|
|
200
|
+
jsonStructure: string
|
|
201
|
+
}
|
|
202
|
+
persona: {
|
|
203
|
+
projectPicker: string
|
|
204
|
+
runConsole: string
|
|
205
|
+
runLog: string
|
|
206
|
+
noProjects: string
|
|
207
|
+
noEvents: string
|
|
208
|
+
statusUnknown: string
|
|
209
|
+
projectTitle: string
|
|
210
|
+
discoveryTitle: string
|
|
211
|
+
catalogTitle: string
|
|
212
|
+
structureTitle: string
|
|
213
|
+
selectedTestTitle: string
|
|
214
|
+
runSelected: string
|
|
215
|
+
runAll: string
|
|
216
|
+
discover: string
|
|
217
|
+
watch: string
|
|
218
|
+
searchTests: string
|
|
219
|
+
noCatalogTests: string
|
|
220
|
+
emptyStructure: string
|
|
221
|
+
runListTitle: string
|
|
222
|
+
selectedRunTitle: string
|
|
223
|
+
itemsTitle: string
|
|
224
|
+
eventsTitle: string
|
|
225
|
+
loadMoreRuns: string
|
|
226
|
+
loadMoreItems: string
|
|
227
|
+
appendEvents: string
|
|
228
|
+
loadMoreEvents: string
|
|
229
|
+
refreshEvents: string
|
|
230
|
+
cancelRun: string
|
|
231
|
+
reportSummary: string
|
|
232
|
+
emptyRun: string
|
|
233
|
+
noRuns: string
|
|
234
|
+
noItems: string
|
|
235
|
+
noRunEvents: string
|
|
236
|
+
loadingCatalog: string
|
|
237
|
+
loadingRuns: string
|
|
238
|
+
loadingItems: string
|
|
239
|
+
loadingEvents: string
|
|
240
|
+
openRun: string
|
|
241
|
+
artifacts: string
|
|
242
|
+
projectDiagnostics: string
|
|
243
|
+
diagnosticOverview: string
|
|
244
|
+
diagnosticSearch: string
|
|
245
|
+
diagnosticImportance: string
|
|
246
|
+
diagnosticMessages: string
|
|
247
|
+
diagnosticNoResults: string
|
|
248
|
+
showAllMessages: string
|
|
249
|
+
showErrors: string
|
|
250
|
+
showWarnings: string
|
|
251
|
+
allCount: string
|
|
252
|
+
errorsCount: string
|
|
253
|
+
warningsCount: string
|
|
254
|
+
unavailableScenarios: string
|
|
255
|
+
componentAnalysisErrors: string
|
|
256
|
+
pageObjectQualityIssues: string
|
|
257
|
+
unclassifiedMessages: string
|
|
258
|
+
messageOne: string
|
|
259
|
+
messageFew: string
|
|
260
|
+
messageMany: string
|
|
261
|
+
availableOne: string
|
|
262
|
+
availableFew: string
|
|
263
|
+
availableMany: string
|
|
264
|
+
unavailableOne: string
|
|
265
|
+
unavailableFew: string
|
|
266
|
+
unavailableMany: string
|
|
267
|
+
componentOne: string
|
|
268
|
+
componentFew: string
|
|
269
|
+
componentMany: string
|
|
270
|
+
pageOne: string
|
|
271
|
+
pageFew: string
|
|
272
|
+
pageMany: string
|
|
273
|
+
errorOne: string
|
|
274
|
+
errorFew: string
|
|
275
|
+
errorMany: string
|
|
276
|
+
warningOne: string
|
|
277
|
+
warningFew: string
|
|
278
|
+
warningMany: string
|
|
279
|
+
selectTest: string
|
|
280
|
+
linkedTestMaterials: string
|
|
281
|
+
pickerTitle: string
|
|
282
|
+
connected: string
|
|
283
|
+
connectedProjects: string
|
|
284
|
+
active: string
|
|
285
|
+
open: string
|
|
286
|
+
selected: string
|
|
287
|
+
select: string
|
|
288
|
+
openProject: string
|
|
289
|
+
selectArea: string
|
|
290
|
+
projectSearchArea: string
|
|
291
|
+
searchCurrentCatalog: string
|
|
292
|
+
catalogSearch: string
|
|
293
|
+
refreshCatalog: string
|
|
294
|
+
catalogPath: string
|
|
295
|
+
directoriesAndProjects: string
|
|
296
|
+
personaProject: string
|
|
297
|
+
noAccess: string
|
|
298
|
+
projectError: string
|
|
299
|
+
openDirectory: string
|
|
300
|
+
loadingCatalogs: string
|
|
301
|
+
chooseSearchArea: string
|
|
302
|
+
noMatches: string
|
|
303
|
+
noNestedDirectories: string
|
|
304
|
+
adjustSearch: string
|
|
305
|
+
chooseAnotherArea: string
|
|
306
|
+
loadMore: string
|
|
307
|
+
cancel: string
|
|
308
|
+
connectProject: string
|
|
309
|
+
diagnosticError: string
|
|
310
|
+
diagnosticWarning: string
|
|
311
|
+
diagnosticInformation: string
|
|
312
|
+
scenarioNotImported: string
|
|
313
|
+
fixInTestProject: string
|
|
314
|
+
scenarioUnavailable: string
|
|
315
|
+
restoreScenarioImport: string
|
|
316
|
+
componentNotAnalyzed: string
|
|
317
|
+
relatedStructureIncomplete: string
|
|
318
|
+
restoreComponentImport: string
|
|
319
|
+
movePageObject: string
|
|
320
|
+
giveStableName: string
|
|
321
|
+
pageObjectQuality: string
|
|
322
|
+
doesNotBlockScenarios: string
|
|
323
|
+
unclassifiedPersonaMessage: string
|
|
324
|
+
personaClassificationRequired: string
|
|
325
|
+
impactUnspecified: string
|
|
326
|
+
personaMustClassify: string
|
|
327
|
+
overviewAvailable: string
|
|
328
|
+
overviewScenarioImports: string
|
|
329
|
+
overviewComponentAnalysis: string
|
|
330
|
+
overviewSupportQuality: string
|
|
331
|
+
statusCancelled: string
|
|
332
|
+
statusCancelling: string
|
|
333
|
+
statusCompleted: string
|
|
334
|
+
statusDegraded: string
|
|
335
|
+
statusError: string
|
|
336
|
+
statusPassed: string
|
|
337
|
+
statusPaused: string
|
|
338
|
+
statusQueued: string
|
|
339
|
+
statusRunning: string
|
|
340
|
+
statusSkipped: string
|
|
341
|
+
statusTimedOut: string
|
|
342
|
+
semanticAction: string
|
|
343
|
+
semanticCombinedStep: string
|
|
344
|
+
semanticExpectation: string
|
|
345
|
+
semanticFact: string
|
|
346
|
+
semanticGoal: string
|
|
347
|
+
semanticOps: string
|
|
348
|
+
semanticStep: string
|
|
349
|
+
semanticGet: string
|
|
350
|
+
semanticPersonaCall: string
|
|
351
|
+
requiredParameter: string
|
|
352
|
+
severityBlocker: string
|
|
353
|
+
severityCritical: string
|
|
354
|
+
severityMinor: string
|
|
355
|
+
severityNormal: string
|
|
356
|
+
severityTrivial: string
|
|
357
|
+
reportBroken: string
|
|
358
|
+
lifecycleAfterScenario: string
|
|
359
|
+
lifecycleAfterTest: string
|
|
360
|
+
lifecycleBeforeScenario: string
|
|
361
|
+
lifecycleBeforeTest: string
|
|
362
|
+
eventRunCancelled: string
|
|
363
|
+
eventRunCompleted: string
|
|
364
|
+
eventRunFailed: string
|
|
365
|
+
eventRuntimeMessage: string
|
|
366
|
+
eventRunQueued: string
|
|
367
|
+
eventRunStarted: string
|
|
368
|
+
eventRunTimedOut: string
|
|
369
|
+
eventTestQueued: string
|
|
370
|
+
eventTestCancelled: string
|
|
371
|
+
eventTestFinished: string
|
|
372
|
+
eventTestStarted: string
|
|
373
|
+
eventWorkerStarted: string
|
|
374
|
+
eventWorkerStopped: string
|
|
375
|
+
durationUnknown: string
|
|
376
|
+
durationMilliseconds: string
|
|
377
|
+
durationSeconds: string
|
|
378
|
+
}
|
|
379
|
+
theme: {
|
|
380
|
+
classic: string
|
|
381
|
+
pink: string
|
|
382
|
+
green: string
|
|
383
|
+
light: string
|
|
384
|
+
dark: string
|
|
385
|
+
variantLight: string
|
|
386
|
+
variantDark: string
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
type DeepPartial<T> = {
|
|
391
|
+
readonly [Key in keyof T]?: T[Key] extends string ? string : DeepPartial<T[Key]>
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
/** Exact-at-runtime deep override accepted by a locale provider. */
|
|
395
|
+
export type UiKitMessagesOverride = DeepPartial<UiKitMessages>
|
|
396
|
+
|
|
397
|
+
type LeafPath<T, Prefix extends string = ''> = {
|
|
398
|
+
[Key in keyof T & string]: T[Key] extends string
|
|
399
|
+
? `${Prefix}${Key}`
|
|
400
|
+
: LeafPath<T[Key], `${Prefix}${Key}.`>
|
|
401
|
+
}[keyof T & string]
|
|
402
|
+
|
|
403
|
+
/** Dot-separated key for every leaf in {@link UiKitMessages}. */
|
|
404
|
+
export type UiKitMessageKey = LeafPath<UiKitMessages>
|
|
405
|
+
|
|
406
|
+
/** Parameter contracts for messages containing interpolation placeholders. */
|
|
407
|
+
export interface UiKitMessageParameters {
|
|
408
|
+
'actions.removeChip': { readonly label: string }
|
|
409
|
+
'feedback.openLinkFailed': { readonly href: string }
|
|
410
|
+
'layout.dragActive': { readonly label: string }
|
|
411
|
+
'layout.dragIdle': { readonly label: string }
|
|
412
|
+
'forms.openToken': { readonly label: string }
|
|
413
|
+
'forms.removeToken': { readonly label: string }
|
|
414
|
+
'tree.expandNode': { readonly label: string }
|
|
415
|
+
'tree.collapseNode': { readonly label: string }
|
|
416
|
+
'tree.selectNode': { readonly label: string }
|
|
417
|
+
'tree.deselectNode': { readonly label: string }
|
|
418
|
+
'table.detailsFor': { readonly label: string }
|
|
419
|
+
'table.selectRow': { readonly label: string }
|
|
420
|
+
'table.deselectRow': { readonly label: string }
|
|
421
|
+
'table.selectionUnavailable': { readonly label: string }
|
|
422
|
+
'table.expandRow': { readonly label: string }
|
|
423
|
+
'table.collapseRow': { readonly label: string }
|
|
424
|
+
'table.sortAscending': { readonly column: string }
|
|
425
|
+
'table.sortDescending': { readonly column: string }
|
|
426
|
+
'table.clearSort': { readonly column: string }
|
|
427
|
+
'table.sortPriority': { readonly priority: number }
|
|
428
|
+
'table.addSortAscending': { readonly column: string }
|
|
429
|
+
'table.multiSortSummary': {
|
|
430
|
+
readonly column: string
|
|
431
|
+
readonly priority: number
|
|
432
|
+
readonly total: number
|
|
433
|
+
readonly direction: string
|
|
434
|
+
readonly action: string
|
|
435
|
+
}
|
|
436
|
+
'table.rowLabel': { readonly index: number }
|
|
437
|
+
'editor.matchPosition': { readonly current: number; readonly total: number }
|
|
438
|
+
'editor.diagnosticsCount': { readonly count: number }
|
|
439
|
+
'editor.closeDocument': { readonly name: string }
|
|
440
|
+
'editor.diffExpandGap': { readonly count: number }
|
|
441
|
+
'editor.diffCollapseGap': { readonly count: number }
|
|
442
|
+
'editor.diffSummary': { readonly added: number; readonly removed: number }
|
|
443
|
+
'editor.diffUnchangedLine': { readonly before: number | string; readonly after: number | string }
|
|
444
|
+
'editor.diffRemovedLine': { readonly line: number | string }
|
|
445
|
+
'editor.diffAddedLine': { readonly line: number | string }
|
|
446
|
+
'navigation.catalogItems': { readonly catalog: string }
|
|
447
|
+
'chart.dataFor': { readonly chart: string }
|
|
448
|
+
'theme.variantLight': { readonly family: string }
|
|
449
|
+
'theme.variantDark': { readonly family: string }
|
|
450
|
+
'persona.openRun': { readonly title: string }
|
|
451
|
+
'persona.allCount': { readonly count: number }
|
|
452
|
+
'persona.errorsCount': { readonly count: number }
|
|
453
|
+
'persona.warningsCount': { readonly count: number }
|
|
454
|
+
'persona.selectTest': { readonly title: string }
|
|
455
|
+
'persona.openProject': { readonly title: string }
|
|
456
|
+
'persona.openDirectory': { readonly name: string }
|
|
457
|
+
'persona.overviewAvailable': { readonly available: number; readonly total: number }
|
|
458
|
+
'persona.overviewScenarioImports': { readonly count: number }
|
|
459
|
+
'persona.overviewComponentAnalysis': { readonly count: number }
|
|
460
|
+
'persona.overviewSupportQuality': { readonly count: number }
|
|
461
|
+
'persona.durationMilliseconds': { readonly value: number }
|
|
462
|
+
'persona.durationSeconds': { readonly value: string }
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export type UiKitParameterizedMessageKey = keyof UiKitMessageParameters
|
|
466
|
+
export type UiKitStaticMessageKey = Exclude<UiKitMessageKey, UiKitParameterizedMessageKey>
|
|
467
|
+
|
|
468
|
+
/** Strict translator: parameterized keys require exact parameters; static keys accept none. */
|
|
469
|
+
export interface UiKitTranslate {
|
|
470
|
+
<Key extends UiKitStaticMessageKey>(key: Key): string
|
|
471
|
+
<Key extends UiKitParameterizedMessageKey>(key: Key, parameters: UiKitMessageParameters[Key]): string
|
|
472
|
+
}
|