@aws/mynah-ui 2.0.0-beta.5 → 2.0.0-beta.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/static.d.ts CHANGED
@@ -2,7 +2,6 @@
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 { ToggleOption } from './components/toggle';
6
5
  export interface QuickActionCommandGroup {
7
6
  groupName?: string;
8
7
  commands: Array<{
@@ -12,22 +11,23 @@ export interface QuickActionCommandGroup {
12
11
  }>;
13
12
  }
14
13
  export interface MynahUIDataModel {
15
- loading?: boolean;
16
14
  loadingChat?: boolean;
17
15
  showChatAvatars?: boolean;
18
- chatMessageOnTopOfSearchResults?: string;
19
16
  quickActionCommands?: QuickActionCommandGroup[];
20
- navigationTabs?: ToggleOption[];
21
- sideNavigationTabs?: ToggleOption[];
22
17
  promptInputPlaceholder?: string;
23
18
  promptInputDisabledState?: boolean;
24
- mode?: MynahMode;
25
- suggestions?: Suggestion[];
26
19
  chatItems?: ChatItem[];
27
20
  }
21
+ export interface MynahUITabStoreTab {
22
+ tabTitle?: string;
23
+ isSelected?: boolean;
24
+ store?: MynahUIDataModel;
25
+ }
26
+ export interface MynahUITabStoreModel {
27
+ [tabId: string]: MynahUITabStoreTab;
28
+ }
28
29
  export declare enum MynahEventNames {
29
30
  RESET_STORE = "resetStore",
30
- SEARCH = "search",
31
31
  FEEDBACK_SET = "feedbackSet",
32
32
  CARD_VOTE = "cardVote",
33
33
  SUGGESTION_OPEN = "suggestionOpen",
@@ -49,30 +49,6 @@ export declare const MynahPortalNames: {
49
49
  OVERLAY: string;
50
50
  FEEDBACK_FORM: string;
51
51
  };
52
- export interface SearchPayloadMatchPolicy {
53
- must: string[];
54
- should: string[];
55
- mustNot: string[];
56
- }
57
- export interface SearchPayloadCodeSelection {
58
- selectedCode: string;
59
- file?: {
60
- range: {
61
- start: {
62
- row: string;
63
- column: string;
64
- };
65
- end: {
66
- row: string;
67
- column: string;
68
- };
69
- };
70
- name: string;
71
- };
72
- }
73
- export interface SearchPayload {
74
- selectedTab?: string;
75
- }
76
52
  export interface SuggestionMetaData {
77
53
  stars?: number;
78
54
  forks?: number;
@@ -83,19 +59,13 @@ export interface SuggestionMetaData {
83
59
  lastActivityDate?: number;
84
60
  }
85
61
  export declare type SuggestionMetaDataUnion = Record<string, SuggestionMetaData>;
86
- export interface CanonicalExample {
87
- canonicalExample: {
88
- body: string;
89
- url: string;
90
- };
91
- }
92
62
  export interface Suggestion {
93
63
  title: string;
94
64
  id?: string;
95
65
  url?: string;
96
66
  body?: string;
97
67
  type?: string;
98
- metadata?: SuggestionMetaDataUnion | CanonicalExample;
68
+ metadata?: SuggestionMetaDataUnion;
99
69
  }
100
70
  export declare enum ChatItemType {
101
71
  PROMPT = "prompt",
@@ -107,7 +77,7 @@ export declare enum ChatItemType {
107
77
  CODE_RESULT = "code-result"
108
78
  }
109
79
  export interface ChatItem {
110
- body?: string;
80
+ body?: string | string[];
111
81
  type: ChatItemType;
112
82
  id?: string;
113
83
  canBeVoted?: boolean;
@@ -132,10 +102,6 @@ export interface ChatItemFollowUp extends ChatPrompt {
132
102
  type?: string;
133
103
  pillText: string;
134
104
  }
135
- export declare enum MynahMode {
136
- CHAT = "chat",
137
- SEARCH = "search"
138
- }
139
105
  export declare enum KeyMap {
140
106
  ESCAPE = "Escape",
141
107
  ENTER = "Enter",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws/mynah-ui",
3
3
  "displayName": "AWS Mynah UI",
4
- "version": "2.0.0-beta.5",
4
+ "version": "2.0.0-beta.6.1",
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",
@@ -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 { ExtendedHTMLElement } from '../helper/dom';
6
- import { Suggestion } from '../static';
7
- export interface MainContainerProps {
8
- onNavigationTabChange?: (selectedTab: string) => void;
9
- onCloseButtonClick?: () => void;
10
- }
11
- export declare class MainContainer {
12
- private readonly navTabs;
13
- private readonly cardsWrapper;
14
- private readonly skeletonWrapper;
15
- private readonly mainContainer;
16
- render: ExtendedHTMLElement;
17
- constructor(props: MainContainerProps);
18
- clearCards: () => void;
19
- updateCards: (suggestions: Suggestion[]) => void;
20
- }
@@ -1,13 +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 { NavivationTabsProps } from './navigation-tabs';
7
- export declare class NavivationTabsVertical {
8
- render: ExtendedHTMLElement;
9
- private readonly props;
10
- constructor(props: NavivationTabsProps);
11
- private readonly setLoading;
12
- private readonly getTabsRender;
13
- }
@@ -1,10 +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 QueryTextShortView {
7
- render: ExtendedHTMLElement;
8
- private readonly textBlock;
9
- constructor();
10
- }
@@ -1,13 +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 { SearchPayload } from '../static';
6
- export interface PayloadTransformRule {
7
- targetRoute: string[];
8
- method: 'add' | 'remove' | 'set';
9
- value?: any;
10
- values?: any[];
11
- }
12
- export declare const transformPayloadData: (rules: PayloadTransformRule[], payloadData: SearchPayload) => SearchPayload;
13
- export declare const validateRulesOnPayloadData: (rules: PayloadTransformRule[], payloadData: SearchPayload) => boolean;