@aws/mynah-ui 1.4.0 → 2.0.0-beta.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/DEVELOPMENT.md +24 -0
- package/README.md +1 -1
- package/dist/components/button.d.ts +1 -0
- package/dist/components/chat-item/chat-item-card.d.ts +28 -0
- package/dist/components/chat-item/chat-item-followup.d.ts +15 -0
- package/dist/components/chat-item/chat-item-relevance-vote.d.ts +17 -0
- package/dist/components/{suggestion-card/suggestion-card-context-wrapper.d.ts → chat-item/chat-item-tree-view-wrapper.d.ts} +6 -4
- package/dist/components/chat-item/chat-item-tree-view.d.ts +22 -0
- package/dist/components/chat-item/chat-prompt-input.d.ts +29 -0
- package/dist/components/chat-item/chat-wrapper.d.ts +24 -0
- package/dist/components/feedback-form/feedback-form-comment.d.ts +2 -2
- package/dist/components/feedback-form/feedback-form.d.ts +6 -5
- package/dist/components/icon/icon-importer.d.ts +9 -0
- package/dist/components/icon.d.ts +8 -3
- package/dist/components/navigation-tabs.d.ts +7 -6
- package/dist/components/notification/notification.d.ts +0 -4
- package/dist/components/overlay/overlay.d.ts +5 -37
- package/dist/components/suggestion-card/suggestion-card-body.d.ts +11 -1
- package/dist/components/suggestion-card/suggestion-card-header.d.ts +2 -3
- package/dist/components/suggestion-card/suggestion-card.d.ts +2 -0
- package/dist/components/suggestion-card/suggestion-skeleton.d.ts +5 -0
- package/dist/components/syntax-highlighter.d.ts +22 -3
- package/dist/components/toggle.d.ts +10 -5
- package/dist/helper/config.d.ts +6 -5
- package/dist/helper/date-time.d.ts +2 -2
- package/dist/helper/dom.d.ts +3 -0
- package/dist/helper/events.d.ts +0 -15
- package/dist/helper/file-tree.d.ts +16 -0
- package/dist/helper/store.d.ts +2 -38
- package/dist/helper/tabs-store.d.ts +40 -0
- package/dist/helper/url.d.ts +1 -0
- package/dist/main.d.ts +33 -50
- package/dist/main.js +1 -1
- package/dist/main.js.LICENSE.txt +5 -0
- package/dist/main.js.map +1 -1
- package/dist/static.d.ts +114 -219
- package/package.json +14 -8
- package/dist/components/context-item.d.ts +0 -16
- package/dist/components/feedback-form/feedback-form-stars.d.ts +0 -15
- package/dist/components/main-container.d.ts +0 -17
- package/dist/components/prioritization-menu.d.ts +0 -18
- package/dist/components/search-block/autocomplete-card.d.ts +0 -20
- package/dist/components/search-block/autocomplete-content.d.ts +0 -32
- package/dist/components/search-block/search-api-help.d.ts +0 -14
- package/dist/components/search-block/search-card-header.d.ts +0 -12
- package/dist/components/search-block/search-card.d.ts +0 -19
- package/dist/components/search-block/search-context.d.ts +0 -30
- package/dist/components/search-block/search-history-card.d.ts +0 -16
- package/dist/components/search-block/search-history-content.d.ts +0 -19
- package/dist/components/search-block/search-input.d.ts +0 -22
- package/dist/components/search-block/search-live-toggle.d.ts +0 -15
- package/dist/components/suggestion-card/suggestion-card-relevance-vote.d.ts +0 -14
- package/dist/helper/find-language.d.ts +0 -17
- package/dist/helper/payload-transformer.d.ts +0 -13
- package/dist/translations/en.d.ts +0 -9
- package/dist/translations/i18n.d.ts +0 -13
package/dist/static.d.ts
CHANGED
|
@@ -2,88 +2,52 @@
|
|
|
2
2
|
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
3
|
* SPDX-License-Identifier: Apache-2.0
|
|
4
4
|
*/
|
|
5
|
-
import {
|
|
5
|
+
import { MynahIcons } from './components/icon';
|
|
6
|
+
export interface QuickActionCommandGroup {
|
|
7
|
+
groupName?: string;
|
|
8
|
+
commands: Array<{
|
|
9
|
+
command: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
promptText?: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
6
14
|
export interface MynahUIDataModel {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
showingHistoricalSearch?: boolean;
|
|
22
|
-
headerInfo?: {
|
|
23
|
-
content: string;
|
|
24
|
-
type?: NotificationType;
|
|
25
|
-
};
|
|
15
|
+
tabTitle?: string;
|
|
16
|
+
loadingChat?: boolean;
|
|
17
|
+
showChatAvatars?: boolean;
|
|
18
|
+
quickActionCommands?: QuickActionCommandGroup[];
|
|
19
|
+
promptInputPlaceholder?: string;
|
|
20
|
+
promptInputDisabledState?: boolean;
|
|
21
|
+
chatItems?: ChatItem[];
|
|
22
|
+
}
|
|
23
|
+
export interface MynahUITabStoreTab {
|
|
24
|
+
isSelected?: boolean;
|
|
25
|
+
store?: MynahUIDataModel;
|
|
26
|
+
}
|
|
27
|
+
export interface MynahUITabStoreModel {
|
|
28
|
+
[tabId: string]: MynahUITabStoreTab;
|
|
26
29
|
}
|
|
27
30
|
export declare enum MynahEventNames {
|
|
28
31
|
RESET_STORE = "resetStore",
|
|
29
|
-
CONTEXT_VISIBILITY_CHANGE = "contextVisibilityChange",
|
|
30
|
-
AUTOCOMPLETE_SUGGESTION_CLICK = "autoCompleteSuggestionClick",
|
|
31
|
-
SEARCH = "search",
|
|
32
|
-
INPUT_QUERY_CHANGE = "inputQueryChange",
|
|
33
|
-
REQUEST_SEARCH_HISTORY = "requestSearchHistory",
|
|
34
|
-
SEARCH_HISTORY_ITEM_CLICK = "searchHistoryItemClick",
|
|
35
|
-
LIVE_SEARCH_STATE_CHANGED = "liveSearchStateChanged",
|
|
36
32
|
FEEDBACK_SET = "feedbackSet",
|
|
37
|
-
|
|
38
|
-
SUGGESTION_VOTE = "suggestionVote",
|
|
33
|
+
CARD_VOTE = "cardVote",
|
|
39
34
|
SUGGESTION_OPEN = "suggestionOpen",
|
|
40
35
|
SUGGESTION_LINK_COPY = "suggestionLinkCopy",
|
|
41
36
|
SUGGESTION_ENGAGEMENT = "suggestionEngagement",
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
file?: {
|
|
57
|
-
range: {
|
|
58
|
-
start: {
|
|
59
|
-
row: string;
|
|
60
|
-
column: string;
|
|
61
|
-
};
|
|
62
|
-
end: {
|
|
63
|
-
row: string;
|
|
64
|
-
column: string;
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
name: string;
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
export interface FullyQualifiedName {
|
|
71
|
-
source: string[];
|
|
72
|
-
symbol: string[];
|
|
73
|
-
}
|
|
74
|
-
export interface SearchPayloadCodeQuery {
|
|
75
|
-
simpleNames: string[];
|
|
76
|
-
fullyQualifiedNames: {
|
|
77
|
-
used: FullyQualifiedName[];
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
export interface SearchPayload {
|
|
81
|
-
query: string;
|
|
82
|
-
matchPolicy: SearchPayloadMatchPolicy;
|
|
83
|
-
codeSelection: SearchPayloadCodeSelection;
|
|
84
|
-
codeQuery?: SearchPayloadCodeQuery;
|
|
85
|
-
code?: string;
|
|
86
|
-
selectedTab?: string;
|
|
37
|
+
COPY_CODE_TO_CLIPBOARD = "copyCodeToClipboard",
|
|
38
|
+
INSERT_CODE_TO_CURSOR_POSITION = "insertCodeToCursorPosition",
|
|
39
|
+
CHAT_PROMPT = "chatPrompt",
|
|
40
|
+
FOLLOW_UP_CLICKED = "followUpClicked",
|
|
41
|
+
UPDATE_LAST_CHAT_ANSWER_STREAM = "updateLastChatAnswerStream",
|
|
42
|
+
SHOW_MORE_WEB_RESULTS_CLICK = "showMoreWebResultsClick",
|
|
43
|
+
SHOW_FEEDBACK_FORM = "showFeedbackForm",
|
|
44
|
+
OPEN_DIFF = "openDiff"
|
|
45
|
+
}
|
|
46
|
+
export declare enum MynahPortalNames {
|
|
47
|
+
WRAPPER = "wrapper",
|
|
48
|
+
SIDE_NAV = "sideNav",
|
|
49
|
+
OVERLAY = "overlay",
|
|
50
|
+
FEEDBACK_FORM = "feedbackForm"
|
|
87
51
|
}
|
|
88
52
|
export interface SuggestionMetaData {
|
|
89
53
|
stars?: number;
|
|
@@ -94,21 +58,50 @@ export interface SuggestionMetaData {
|
|
|
94
58
|
score?: number;
|
|
95
59
|
lastActivityDate?: number;
|
|
96
60
|
}
|
|
97
|
-
export declare type SuggestionMetaDataUnion = Record<string, SuggestionMetaData>;
|
|
98
|
-
export interface CanonicalExample {
|
|
99
|
-
canonicalExample: {
|
|
100
|
-
body: string;
|
|
101
|
-
url: string;
|
|
102
|
-
};
|
|
103
|
-
}
|
|
104
61
|
export interface Suggestion {
|
|
105
|
-
id: string;
|
|
106
62
|
title: string;
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
63
|
+
id?: string;
|
|
64
|
+
url?: string;
|
|
65
|
+
body?: string;
|
|
66
|
+
type?: string;
|
|
67
|
+
metadata?: Record<string, SuggestionMetaData>;
|
|
68
|
+
}
|
|
69
|
+
export declare enum ChatItemType {
|
|
70
|
+
PROMPT = "prompt",
|
|
71
|
+
SYSTEM_PROMPT = "system-prompt",
|
|
72
|
+
AI_PROMPT = "ai-prompt",
|
|
73
|
+
ANSWER = "answer",
|
|
74
|
+
ANSWER_STREAM = "answer-stream",
|
|
75
|
+
ANSWER_PART = "answer-part",
|
|
76
|
+
CODE_RESULT = "code-result"
|
|
77
|
+
}
|
|
78
|
+
export interface ChatItem {
|
|
79
|
+
body?: string | string[];
|
|
80
|
+
type: ChatItemType;
|
|
81
|
+
messageId?: string;
|
|
82
|
+
canBeVoted?: boolean;
|
|
83
|
+
followUp?: {
|
|
84
|
+
text?: string;
|
|
85
|
+
options?: ChatItemFollowUp[];
|
|
86
|
+
};
|
|
87
|
+
relatedContent?: {
|
|
88
|
+
title: string | boolean;
|
|
89
|
+
content: Suggestion[];
|
|
90
|
+
};
|
|
91
|
+
suggestions?: {
|
|
92
|
+
title: string | boolean;
|
|
93
|
+
suggestions: Suggestion[];
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
export interface ChatPrompt {
|
|
97
|
+
prompt?: string;
|
|
98
|
+
attachment?: Suggestion;
|
|
99
|
+
}
|
|
100
|
+
export interface ChatItemFollowUp extends ChatPrompt {
|
|
110
101
|
type?: string;
|
|
111
|
-
|
|
102
|
+
pillText: string;
|
|
103
|
+
status?: 'info' | 'success' | 'warning' | 'error';
|
|
104
|
+
icon?: MynahIcons;
|
|
112
105
|
}
|
|
113
106
|
export declare enum KeyMap {
|
|
114
107
|
ESCAPE = "Escape",
|
|
@@ -128,73 +121,18 @@ export declare enum KeyMap {
|
|
|
128
121
|
TAB = "Tab",
|
|
129
122
|
SHIFT = "Shift",
|
|
130
123
|
CONTROL = "Control",
|
|
131
|
-
ALT = "Alt"
|
|
132
|
-
|
|
133
|
-
export declare enum LiveSearchState {
|
|
134
|
-
PAUSE = "pauseLiveSearch",
|
|
135
|
-
RESUME = "resumeLiveSearch",
|
|
136
|
-
STOP = "stopLiveSearch"
|
|
124
|
+
ALT = "Alt",
|
|
125
|
+
SLASH = "/"
|
|
137
126
|
}
|
|
138
|
-
export
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
ts: string;
|
|
143
|
-
js: string;
|
|
144
|
-
py: string;
|
|
145
|
-
java: string;
|
|
146
|
-
json: string;
|
|
147
|
-
};
|
|
148
|
-
export declare type OnCopiedToClipboardFunction = (type?: 'selection' | 'block', text?: string) => void;
|
|
149
|
-
export interface SearchHistoryFilters {
|
|
150
|
-
/**
|
|
151
|
-
* Flag to define are we looking in global search-history or only in worplace
|
|
152
|
-
*
|
|
153
|
-
* @default - Search will be performed on workplace store
|
|
154
|
-
*/
|
|
155
|
-
isGlobal: boolean;
|
|
156
|
-
/**
|
|
157
|
-
* Flag to define are we looking only for queries which were manually typed by the user,
|
|
158
|
-
* or only for quries whic were generated by plugin itself, or it's not important
|
|
159
|
-
*
|
|
160
|
-
* @default - We won't filter records bases on type of input
|
|
161
|
-
*/
|
|
162
|
-
isManualSearch?: boolean;
|
|
163
|
-
/**
|
|
164
|
-
* Array of language filters. If user chose some, the results would be filtered
|
|
165
|
-
*
|
|
166
|
-
* @default - We won't filter records bases on languages
|
|
167
|
-
*/
|
|
168
|
-
languages: string[];
|
|
169
|
-
/**
|
|
170
|
-
* User text from search bar in search-history part of UI
|
|
171
|
-
*
|
|
172
|
-
* @default - We won't filter records bases on user input in search-history search bar
|
|
173
|
-
*/
|
|
174
|
-
text?: string;
|
|
175
|
-
/**
|
|
176
|
-
* Allow us to skip n-first results
|
|
177
|
-
*
|
|
178
|
-
* @default - The starting offset will be 0
|
|
179
|
-
*/
|
|
180
|
-
resultOffset: number;
|
|
181
|
-
/**
|
|
182
|
-
* Limit of how many results we want to get from store
|
|
183
|
-
*
|
|
184
|
-
* @default - The records count won't be limited
|
|
185
|
-
*/
|
|
186
|
-
resultLimit?: number;
|
|
187
|
-
}
|
|
188
|
-
export interface CodeQuery {
|
|
189
|
-
simpleNames: string[];
|
|
190
|
-
fullyQualifiedNames: {
|
|
191
|
-
used: FullyQualifiedName[];
|
|
127
|
+
export interface ReferenceTrackerInformation {
|
|
128
|
+
range: {
|
|
129
|
+
start: number;
|
|
130
|
+
end: number;
|
|
192
131
|
};
|
|
132
|
+
tooltipMarkdown: string;
|
|
193
133
|
}
|
|
194
|
-
export declare
|
|
195
|
-
|
|
196
|
-
'REMOVE' = "remove"
|
|
197
|
-
}
|
|
134
|
+
export declare type OnCopiedToClipboardFunction = (type?: 'selection' | 'block', text?: string, referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
|
|
135
|
+
export declare type OnInsertToCursorPositionFunction = (type?: 'selection' | 'block', text?: string, referenceTrackerInformation?: ReferenceTrackerInformation[]) => void;
|
|
198
136
|
export declare enum SuggestionEventName {
|
|
199
137
|
OPEN = "openSuggestion",
|
|
200
138
|
COPY = "copy"
|
|
@@ -203,100 +141,57 @@ export declare enum RelevancyVoteType {
|
|
|
203
141
|
UP = "upvote",
|
|
204
142
|
DOWN = "downvote"
|
|
205
143
|
}
|
|
206
|
-
/**
|
|
207
|
-
* 'interaction' will be set if there was a potential text selection or a click input was triggered by the user.
|
|
208
|
-
* If this is a selection selectionDistanceTraveled object will also be filled
|
|
209
|
-
* 'timespend' will be set basically if there is no interaction except mouse movements in a time spent longer than the ENGAGEMENT_DURATION_LIMIT
|
|
210
|
-
* Don't forget that in 'timespend' case, user should leave the suggestion card at some point to count it as an interaction.
|
|
211
|
-
* (They need to go back to the code or move to another card instead)
|
|
212
|
-
*/
|
|
213
144
|
export declare enum EngagementType {
|
|
214
145
|
INTERACTION = "interaction",
|
|
215
146
|
TIME = "timespend"
|
|
216
147
|
}
|
|
217
148
|
export interface SuggestionEngagement {
|
|
218
|
-
/**
|
|
219
|
-
* Suggestion information
|
|
220
|
-
*/
|
|
221
149
|
suggestion: Suggestion;
|
|
222
|
-
/**
|
|
223
|
-
* Engagement type
|
|
224
|
-
*/
|
|
225
150
|
engagementType: EngagementType;
|
|
226
|
-
/**
|
|
227
|
-
* Total duration in ms till the engagement triggered.
|
|
228
|
-
*/
|
|
229
151
|
engagementDurationTillTrigger: number;
|
|
230
|
-
/**
|
|
231
|
-
* This is a little bit more than what you might expect on a normal scroll position of the suggestion card.
|
|
232
|
-
* This attribute gives the value for how much the users traveled their mouses and additionally how much they scrolled to focus on that suggestion
|
|
233
|
-
*/
|
|
234
152
|
scrollDistanceToEngage: number;
|
|
235
|
-
/**
|
|
236
|
-
* Total mouse movement in x and y directions till the engagament triggered.
|
|
237
|
-
* To avoid confusion: this is not the distance between start and end points, this is the total traveled distance.
|
|
238
|
-
*/
|
|
239
153
|
totalMouseDistanceTraveled: {
|
|
240
154
|
x: number;
|
|
241
155
|
y: number;
|
|
242
156
|
};
|
|
243
|
-
/**
|
|
244
|
-
* If the engagementType is "interaction" and this object has a value, you can assume it as a text selection.
|
|
245
|
-
* If the engagementType is "interaction" but this object is not defined, you can assume it as a click
|
|
246
|
-
*/
|
|
247
157
|
selectionDistanceTraveled?: {
|
|
248
158
|
x: number;
|
|
249
159
|
y: number;
|
|
250
160
|
selectedText?: string;
|
|
251
161
|
};
|
|
252
162
|
}
|
|
253
|
-
export interface SearchHistoryItem {
|
|
254
|
-
query: {
|
|
255
|
-
input: string;
|
|
256
|
-
queryContext: SearchPayloadMatchPolicy;
|
|
257
|
-
queryId?: string;
|
|
258
|
-
trigger: string;
|
|
259
|
-
codeQuery: CodeQuery;
|
|
260
|
-
codeSelection: SearchPayloadCodeSelection;
|
|
261
|
-
code?: string;
|
|
262
|
-
selectedTab?: string;
|
|
263
|
-
};
|
|
264
|
-
recordDate?: number;
|
|
265
|
-
suggestions: Suggestion[];
|
|
266
|
-
}
|
|
267
|
-
export declare enum ContextTypes {
|
|
268
|
-
MUST = "must",
|
|
269
|
-
SHOULD = "should",
|
|
270
|
-
MUST_NOT = "mustNot"
|
|
271
|
-
}
|
|
272
|
-
export declare enum ContextSource {
|
|
273
|
-
AUTO = "auto",
|
|
274
|
-
USER = "user",
|
|
275
|
-
SUGGESTION = "suggestion"
|
|
276
|
-
}
|
|
277
|
-
export declare enum ContextTypeClassNames {
|
|
278
|
-
should = "mynah-should-contain",
|
|
279
|
-
must = "mynah-must-contain",
|
|
280
|
-
mustNot = "mynah-must-not-contain"
|
|
281
|
-
}
|
|
282
|
-
export interface ContextType {
|
|
283
|
-
context: string;
|
|
284
|
-
type?: ContextTypes;
|
|
285
|
-
source: ContextSource;
|
|
286
|
-
}
|
|
287
|
-
export declare type FeedbackStars = 1 | 2 | 3 | 4 | 5;
|
|
288
163
|
export interface FeedbackPayload {
|
|
289
|
-
|
|
164
|
+
messageId: string;
|
|
165
|
+
tabId: string;
|
|
166
|
+
selectedOption: string;
|
|
290
167
|
comment?: string;
|
|
291
168
|
}
|
|
292
|
-
export interface AutocompleteItem {
|
|
293
|
-
suggestion: string;
|
|
294
|
-
highlight: string;
|
|
295
|
-
}
|
|
296
169
|
export declare enum NotificationType {
|
|
297
170
|
INFO = "info",
|
|
298
171
|
SUCCESS = "ok-circled",
|
|
299
172
|
WARNING = "warning",
|
|
300
173
|
ERROR = "error"
|
|
301
174
|
}
|
|
302
|
-
export {
|
|
175
|
+
export interface ConfigModel {
|
|
176
|
+
texts: {
|
|
177
|
+
feedbackFormTitle: string;
|
|
178
|
+
feedbackFormOptionsLabel: string;
|
|
179
|
+
feedbackFormCommentLabel: string;
|
|
180
|
+
feedbackThanks: string;
|
|
181
|
+
feedbackReportButtonLabel: string;
|
|
182
|
+
codeSuggestions: string;
|
|
183
|
+
clickFileToViewDiff: string;
|
|
184
|
+
files: string;
|
|
185
|
+
insertAtCursorLabel: string;
|
|
186
|
+
copy: string;
|
|
187
|
+
showMore: string;
|
|
188
|
+
save: string;
|
|
189
|
+
cancel: string;
|
|
190
|
+
submit: string;
|
|
191
|
+
stopGenerating: string;
|
|
192
|
+
};
|
|
193
|
+
feedbackOptions: Array<{
|
|
194
|
+
label: string;
|
|
195
|
+
value: string;
|
|
196
|
+
}>;
|
|
197
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws/mynah-ui",
|
|
3
3
|
"displayName": "AWS Mynah UI",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.0-beta.10.0",
|
|
5
5
|
"description": "AWS Tookit VSCode and Intellij IDE Extension Mynah UI",
|
|
6
6
|
"publisher": "Amazon Web Services",
|
|
7
7
|
"license": "Apache License 2.0",
|
|
@@ -19,30 +19,36 @@
|
|
|
19
19
|
"lint": "npx eslint \"./**\""
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"@types/marked": "^5.0.1",
|
|
22
23
|
"i18n-ts": "1.0.5",
|
|
24
|
+
"marked": "^7.0.3",
|
|
23
25
|
"prismjs": "1.29.0"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
26
|
-
"@types/eslint": "
|
|
28
|
+
"@types/eslint": "^8.44.3",
|
|
27
29
|
"@types/eslint-scope": "3.7.0",
|
|
28
30
|
"@types/estree": "0.0.49",
|
|
29
31
|
"@types/glob": "7.1.3",
|
|
30
32
|
"@types/json-schema": "7.0.7",
|
|
31
33
|
"@types/node": "17.0.29",
|
|
32
34
|
"@types/prismjs": "1.26.0",
|
|
33
|
-
"@typescript-eslint/eslint-plugin": "5.34.0",
|
|
35
|
+
"@typescript-eslint/eslint-plugin": "^5.34.0",
|
|
36
|
+
"@typescript-eslint/parser": "^5.62.0",
|
|
34
37
|
"css-loader": "6.6.0",
|
|
35
|
-
"eslint": "8.22.0",
|
|
36
|
-
"eslint-config-prettier": "^8.
|
|
38
|
+
"eslint": "^8.22.0",
|
|
39
|
+
"eslint-config-prettier": "^8.10.0",
|
|
37
40
|
"eslint-config-standard-with-typescript": "22.0.0",
|
|
38
41
|
"eslint-plugin-header": "^3.1.1",
|
|
39
42
|
"eslint-plugin-import": "2.26.0",
|
|
40
43
|
"eslint-plugin-n": "15.2.5",
|
|
41
44
|
"eslint-plugin-no-null": "^1.0.2",
|
|
45
|
+
"eslint-plugin-prettier": "^5.0.0",
|
|
42
46
|
"eslint-plugin-promise": "6.0.0",
|
|
47
|
+
"prettier": "^3.0.3",
|
|
43
48
|
"sass": "1.49.8",
|
|
44
49
|
"sass-loader": "12.6.0",
|
|
45
50
|
"style-loader": "3.3.1",
|
|
51
|
+
"svg-url-loader": "^8.0.0",
|
|
46
52
|
"ts-loader": "9.2.6",
|
|
47
53
|
"ts-node": "10.4.0",
|
|
48
54
|
"typescript": "4.5.2",
|
|
@@ -50,11 +56,11 @@
|
|
|
50
56
|
"webpack-cli": "4.7.2"
|
|
51
57
|
},
|
|
52
58
|
"prettier": {
|
|
53
|
-
"printWidth":
|
|
59
|
+
"printWidth": 160,
|
|
54
60
|
"trailingComma": "es5",
|
|
55
|
-
"tabWidth":
|
|
61
|
+
"tabWidth": 2,
|
|
56
62
|
"singleQuote": true,
|
|
57
|
-
"semi":
|
|
63
|
+
"semi": true,
|
|
58
64
|
"bracketSpacing": true,
|
|
59
65
|
"arrowParens": "avoid",
|
|
60
66
|
"endOfLine": "lf"
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ContextType } from '../static';
|
|
6
|
-
import { ExtendedHTMLElement } from '../helper/dom';
|
|
7
|
-
export interface ContextPillProps {
|
|
8
|
-
context: ContextType;
|
|
9
|
-
showRemoveButton?: boolean;
|
|
10
|
-
}
|
|
11
|
-
export declare class ContextPill {
|
|
12
|
-
private readonly props;
|
|
13
|
-
render: ExtendedHTMLElement;
|
|
14
|
-
constructor(props: ContextPillProps);
|
|
15
|
-
private readonly handleMenuOpen;
|
|
16
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
import { FeedbackStars } from '../../static';
|
|
7
|
-
export interface FeedbackFormStarsProps {
|
|
8
|
-
onChange?: (star: FeedbackStars) => void;
|
|
9
|
-
initStar?: FeedbackStars;
|
|
10
|
-
}
|
|
11
|
-
export declare class FeedbackFormStars {
|
|
12
|
-
render: ExtendedHTMLElement;
|
|
13
|
-
constructor(props: FeedbackFormStarsProps);
|
|
14
|
-
setStar: (star: FeedbackStars) => void;
|
|
15
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ExtendedHTMLElement } from '../helper/dom';
|
|
6
|
-
import { Suggestion } from '../static';
|
|
7
|
-
export interface MainContainerProps {
|
|
8
|
-
onScroll?: (e: Event) => void;
|
|
9
|
-
}
|
|
10
|
-
export declare class MainContainer {
|
|
11
|
-
private readonly cardsWrapper;
|
|
12
|
-
private readonly skeletonWrapper;
|
|
13
|
-
render: ExtendedHTMLElement;
|
|
14
|
-
constructor(props: MainContainerProps);
|
|
15
|
-
clearCards: () => void;
|
|
16
|
-
updateCards: (suggestions: Suggestion[]) => void;
|
|
17
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ContextType } from '../static';
|
|
6
|
-
import { ExtendedHTMLElement } from '../helper/dom';
|
|
7
|
-
export interface PrioritizationMenuButtonsProps {
|
|
8
|
-
context: ContextType;
|
|
9
|
-
referenceElement: Element | ExtendedHTMLElement;
|
|
10
|
-
onMenuClose: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare class PrioritizationMenuButtons {
|
|
13
|
-
private menuOverlay;
|
|
14
|
-
private readonly props;
|
|
15
|
-
constructor(props: PrioritizationMenuButtonsProps);
|
|
16
|
-
createOverlay(): void;
|
|
17
|
-
private readonly handlePrioritizationButtonClick;
|
|
18
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { AutocompleteItem } from '../../static';
|
|
6
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
7
|
-
export interface AutocompleteCardContentProps {
|
|
8
|
-
searchQuery: string;
|
|
9
|
-
content: AutocompleteItem;
|
|
10
|
-
onAutocompleteClick: (autocompleteQuery: AutocompleteItem, index: number) => void;
|
|
11
|
-
index: number;
|
|
12
|
-
isHovered: boolean | false;
|
|
13
|
-
}
|
|
14
|
-
export declare class AutocompleteCardContent {
|
|
15
|
-
render: ExtendedHTMLElement;
|
|
16
|
-
openSearch: any;
|
|
17
|
-
searchQuery: string;
|
|
18
|
-
constructor(props: AutocompleteCardContentProps);
|
|
19
|
-
private formatSuggestion;
|
|
20
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { AutocompleteItem } from '../../static';
|
|
6
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
7
|
-
export interface AutocompleteContentProps {
|
|
8
|
-
searchQuery: string;
|
|
9
|
-
referenceElement: Element | ExtendedHTMLElement;
|
|
10
|
-
autocompleteSuggestions: AutocompleteItem[];
|
|
11
|
-
onClose?: () => void;
|
|
12
|
-
}
|
|
13
|
-
export declare class AutocompleteContent {
|
|
14
|
-
private readonly autocompleteItemsOverlay;
|
|
15
|
-
suggestions: AutocompleteItem[];
|
|
16
|
-
private searchQuery;
|
|
17
|
-
private currHover;
|
|
18
|
-
private readonly props;
|
|
19
|
-
private isUsed;
|
|
20
|
-
render: ExtendedHTMLElement;
|
|
21
|
-
constructor(props: AutocompleteContentProps);
|
|
22
|
-
autocompleteCards: (autocompleteSuggestions: AutocompleteItem[], hovered: number) => ExtendedHTMLElement[];
|
|
23
|
-
private readonly handleAutocompleteClick;
|
|
24
|
-
updateSuggestions: (autocompleteSuggestions: AutocompleteItem[], hoverQuery: number) => void;
|
|
25
|
-
updateQuery: (searchQuery: string) => void;
|
|
26
|
-
hover: (isUp: boolean) => string;
|
|
27
|
-
setIsUsed: (val: boolean) => void;
|
|
28
|
-
getIsUsed: () => boolean;
|
|
29
|
-
getCurrentSelected: () => number;
|
|
30
|
-
getSuggestionsCount: () => number;
|
|
31
|
-
close: () => void;
|
|
32
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
export declare class SearchApiHelp {
|
|
7
|
-
render: ExtendedHTMLElement;
|
|
8
|
-
private isCollapsed;
|
|
9
|
-
constructor();
|
|
10
|
-
private readonly hide;
|
|
11
|
-
private readonly show;
|
|
12
|
-
private readonly updateContent;
|
|
13
|
-
private readonly onCodeDetailsClicked;
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
export declare class SearchCardHeader {
|
|
7
|
-
private readonly feedbackForm;
|
|
8
|
-
private readonly infoBar;
|
|
9
|
-
render: ExtendedHTMLElement;
|
|
10
|
-
constructor();
|
|
11
|
-
private readonly getHeaderInfoContent;
|
|
12
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
export declare class SearchCard {
|
|
7
|
-
private unfoldedByContextInsertion;
|
|
8
|
-
private unfoldedByButton;
|
|
9
|
-
private readonly searchInput;
|
|
10
|
-
private readonly searchAPIHelp;
|
|
11
|
-
private readonly liveSearchToggle;
|
|
12
|
-
private readonly foldUnfoldButton;
|
|
13
|
-
private readonly contextManagement;
|
|
14
|
-
private readonly searchCardHeader;
|
|
15
|
-
render: ExtendedHTMLElement;
|
|
16
|
-
constructor();
|
|
17
|
-
addFocusOnInput: () => void;
|
|
18
|
-
setFolded: (folded: boolean) => void;
|
|
19
|
-
}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
* Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
|
|
3
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
4
|
-
*/
|
|
5
|
-
import { ExtendedHTMLElement } from '../../helper/dom';
|
|
6
|
-
import { SearchPayloadMatchPolicy } from '../../static';
|
|
7
|
-
export interface SearchContextProps {
|
|
8
|
-
initContextList?: SearchPayloadMatchPolicy;
|
|
9
|
-
onContextInsertionEnabled?: () => void;
|
|
10
|
-
onContextInsertionDisabled?: () => void;
|
|
11
|
-
}
|
|
12
|
-
export declare class SearchContext {
|
|
13
|
-
private readonly allowedCharCount;
|
|
14
|
-
private readonly contextCheckExpression;
|
|
15
|
-
private readonly isAcceptedKeyPress;
|
|
16
|
-
private readonly acceptedNagivationKeys;
|
|
17
|
-
private renderedContextMap;
|
|
18
|
-
private readonly onContextInsertionEnabled;
|
|
19
|
-
private readonly onContextInsertionDisabled;
|
|
20
|
-
constructor(props?: SearchContextProps);
|
|
21
|
-
private readonly enableContextInsertion;
|
|
22
|
-
private readonly disableContextInsertion;
|
|
23
|
-
private readonly createContextItemElements;
|
|
24
|
-
private readonly contextInsertionKeydownHandler;
|
|
25
|
-
private readonly inputAutoWidth;
|
|
26
|
-
private contextInsertionInput;
|
|
27
|
-
private readonly contextInsertionButton;
|
|
28
|
-
private readonly contextWrapper;
|
|
29
|
-
render: ExtendedHTMLElement;
|
|
30
|
-
}
|