@aws/mynah-ui 1.0.0 → 1.1.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.
@@ -5,7 +5,6 @@
5
5
  import { FeedbackPayload } from '../../static';
6
6
  import { ExtendedHTMLElement } from '../../helper/dom';
7
7
  export interface FeedbackFormProps {
8
- onFeedbackSet: (feedbackPayload: FeedbackPayload) => void;
9
8
  initPayload?: FeedbackPayload;
10
9
  }
11
10
  export declare class FeedbackForm {
@@ -17,6 +16,6 @@ export declare class FeedbackForm {
17
16
  private readonly feedbackSubmitButton;
18
17
  readonly feedbackFormContainer: ExtendedHTMLElement;
19
18
  readonly feedbackContainer: ExtendedHTMLElement;
19
+ constructor(props?: FeedbackFormProps);
20
20
  private readonly onFeedbackSet;
21
- constructor(props: FeedbackFormProps);
22
21
  }
@@ -3,23 +3,11 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../helper/dom';
6
- import { OnCopiedToClipboardFunctionWithSuggestionId, RelevancyVoteType, Suggestion, SuggestionEngagement } from '../static';
6
+ import { Suggestion } from '../static';
7
7
  export interface MainContainerProps {
8
- onSuggestionOpen?: (suggestion: Suggestion) => void;
9
- onSuggestionLinkClick?: (suggestion: Suggestion) => void;
10
- onSuggestionLinkCopy?: (suggestion: Suggestion) => void;
11
- onSuggestionEngaged?: (engagementInfo: SuggestionEngagement) => void;
12
- onCopiedToClipboard?: OnCopiedToClipboardFunctionWithSuggestionId;
13
- onVoteChange: (suggestion: Suggestion, vote: RelevancyVoteType) => void;
14
8
  onScroll?: (e: Event) => void;
15
9
  }
16
10
  export declare class MainContainer {
17
- private readonly onSuggestionOpen;
18
- private readonly onSuggestionLinkClick;
19
- private readonly onSuggestionLinkCopy;
20
- private readonly onSuggestionEngaged;
21
- private readonly onCopiedToClipboard;
22
- private readonly onVoteChange;
23
11
  private readonly cardsWrapper;
24
12
  private readonly skeletonWrapper;
25
13
  render: ExtendedHTMLElement;
@@ -3,26 +3,8 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { DomBuilderObject, ExtendedHTMLElement } from '../../helper/dom';
6
+ import { NotificationType } from '../../static';
6
7
  declare type NotificationContentType = string | ExtendedHTMLElement | HTMLElement | DomBuilderObject;
7
- /**
8
- * Options for where to show the notification
9
- */
10
- export declare enum NotificationTarget {
11
- /**
12
- * Shows an IDE level notification
13
- */
14
- IDE = "ide",
15
- /**
16
- * Shows a notification inside the extension UI
17
- */
18
- UI = "ui"
19
- }
20
- export declare enum NotificationType {
21
- INFO = "info",
22
- SUCCESS = "ok-circled",
23
- WARNING = "warning",
24
- ERROR = "error"
25
- }
26
8
  export interface NotificationProps {
27
9
  duration?: number;
28
10
  type?: NotificationType;
@@ -8,7 +8,6 @@ export interface AutocompleteContentProps {
8
8
  searchQuery: string;
9
9
  referenceElement: Element | ExtendedHTMLElement;
10
10
  autocompleteSuggestions: AutocompleteItem[];
11
- onAutocompleteClick: (autocompleteQuery: AutocompleteItem, index: number, count: number) => void;
12
11
  onClose?: () => void;
13
12
  }
14
13
  export declare class AutocompleteContent {
@@ -3,36 +3,12 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- export interface SearchApiHelpProps {
7
- code: string;
8
- fileName?: string;
9
- range?: {
10
- start: {
11
- row: string;
12
- column?: string;
13
- };
14
- end?: {
15
- row: string;
16
- column?: string;
17
- };
18
- };
19
- }
20
6
  export declare class SearchApiHelp {
21
- props: SearchApiHelpProps;
22
7
  render: ExtendedHTMLElement;
23
8
  private isCollapsed;
24
- private readonly onCodeDetailsClicked?;
25
- constructor(onCodeDetailsClicked?: (code: string, fileName?: string, range?: {
26
- start: {
27
- row: string;
28
- column?: string;
29
- };
30
- end?: {
31
- row: string;
32
- column?: string;
33
- };
34
- }) => void);
35
- hide: () => void;
36
- show: () => void;
37
- updateContent: (props: SearchApiHelpProps) => void;
9
+ constructor();
10
+ private readonly hide;
11
+ private readonly show;
12
+ private readonly updateContent;
13
+ private readonly onCodeDetailsClicked;
38
14
  }
@@ -2,13 +2,11 @@
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 { FeedbackPayload } from '../../static';
6
5
  import { ExtendedHTMLElement } from '../../helper/dom';
7
- export interface SearchCardHeaderProps {
8
- onFeedbackSet: (feedbackPayload: FeedbackPayload) => void;
9
- }
10
6
  export declare class SearchCardHeader {
11
7
  private readonly feedbackForm;
8
+ private readonly infoBar;
12
9
  render: ExtendedHTMLElement;
13
- constructor(props: SearchCardHeaderProps);
10
+ constructor();
11
+ private readonly getHeaderInfoContent;
14
12
  }
@@ -3,72 +3,17 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- import { LiveSearchState, SearchPayload, SearchPayloadMatchPolicy, Suggestion, SearchHistoryItem, FeedbackPayload, AutocompleteItem, SearchHistoryFilters } from '../../static';
7
- export interface SearchCardProps {
8
- onSearch: (searchPayload: SearchPayload, isFromAutocomplete: boolean, currAutocompleteSuggestionSelected?: number, autocompleteSuggestionsCount?: number) => void;
9
- onHistoryChange?: (historySuggestions: Suggestion[], searchPayload: SearchPayload) => void;
10
- onLiveSearchToggle?: (value: LiveSearchState) => void;
11
- onFeedbackSet: (feedbackPayload: FeedbackPayload) => void;
12
- onHistoryOpen: (filterPayload: SearchHistoryFilters) => Promise<SearchHistoryItem[]>;
13
- onAutocompleteRequest: (input: string) => Promise<AutocompleteItem[]>;
14
- onCodeDetailsClicked?: (code: string, fileName?: string, range?: {
15
- start: {
16
- row: string;
17
- column?: string;
18
- };
19
- end?: {
20
- row: string;
21
- column?: string;
22
- };
23
- }) => void;
24
- initContextList?: SearchPayloadMatchPolicy;
25
- initText?: string;
26
- liveSearch?: boolean;
27
- codeSelection?: {
28
- selectedCode: string;
29
- file?: {
30
- range: {
31
- start: {
32
- row: string;
33
- column: string;
34
- };
35
- end: {
36
- row: string;
37
- column: string;
38
- };
39
- };
40
- name: string;
41
- };
42
- };
43
- codeQuery?: {
44
- simpleNames: string[];
45
- usedFullyQualifiedNames: string[];
46
- };
47
- }
48
6
  export declare class SearchCard {
49
- props: SearchCardProps;
50
- private historyProcess;
7
+ private unfoldedByContextInsertion;
8
+ private unfoldedByButton;
51
9
  private readonly searchInput;
52
10
  private readonly searchAPIHelp;
53
- private liveSearchToggle;
54
- private searchPayload;
11
+ private readonly liveSearchToggle;
55
12
  private readonly foldUnfoldButton;
56
13
  private readonly contextManagement;
57
14
  private readonly searchCardHeader;
58
- private unfoldedByContextInsertion;
59
- private unfoldedByButton;
60
15
  render: ExtendedHTMLElement;
61
- constructor(props: SearchCardProps);
16
+ constructor();
62
17
  addFocusOnInput: () => void;
63
- private readonly performSearch;
64
- private readonly handleSearchQueryChange;
65
- private readonly handleContextChange;
66
- private readonly handleHistoryChange;
67
- setSearchQuery: (value: string) => void;
68
- setContextItems: (contextItems: SearchPayloadMatchPolicy) => void;
69
- setWaitState: (waitState: boolean) => void;
70
18
  setFolded: (folded: boolean) => void;
71
- removeLiveSearchToggle: () => void;
72
- onLiveSearchDataReceived: () => void;
73
- changeLiveSearchState: (state: LiveSearchState) => void;
74
19
  }
@@ -18,10 +18,9 @@ export declare class SearchContext {
18
18
  private readonly onContextInsertionEnabled;
19
19
  private readonly onContextInsertionDisabled;
20
20
  constructor(props?: SearchContextProps);
21
- updateLocalContext: (contextItems: SearchPayloadMatchPolicy) => void;
22
- private readonly updateContextItems;
23
21
  private readonly enableContextInsertion;
24
22
  private readonly disableContextInsertion;
23
+ private readonly createContextItemElements;
25
24
  private readonly contextInsertionKeydownHandler;
26
25
  private readonly inputAutoWidth;
27
26
  private contextInsertionInput;
@@ -7,7 +7,6 @@ import { SearchHistoryItem } from '../../static';
7
7
  export interface HistoryContentProps {
8
8
  referenceElement: Element | ExtendedHTMLElement;
9
9
  searchHistory: SearchHistoryItem[];
10
- onHistoryChange: (historyItem: SearchHistoryItem) => void;
11
10
  }
12
11
  export declare class HistoryContent {
13
12
  private historyItemsOverlay;
@@ -3,18 +3,7 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- import { AutocompleteItem, SearchHistoryFilters, SearchHistoryItem } from '../../static';
7
- export interface SearchInputProps {
8
- onSearch: (queryText: string, isFromAutocomplete: boolean, currAutocompleteSuggestionSelected?: number, autocompleteSuggestionsCount?: number) => void;
9
- onHistoryOpen: (filterPayload: SearchHistoryFilters) => Promise<SearchHistoryItem[]>;
10
- onAutocompleteRequest: (input: string) => Promise<AutocompleteItem[]>;
11
- onHistoryChange: (historyItem: SearchHistoryItem) => void;
12
- initText?: string;
13
- searchAlwaysActive?: boolean;
14
- hideHistoryButton?: boolean;
15
- }
16
6
  export declare class SearchInput {
17
- props: SearchInputProps;
18
7
  render: ExtendedHTMLElement;
19
8
  private searchTextInput;
20
9
  private readonly searchButton;
@@ -22,15 +11,12 @@ export declare class SearchInput {
22
11
  private readonly remainingIndicator;
23
12
  private autocompleteContent;
24
13
  private readonly allowedCharCount;
25
- constructor(props: SearchInputProps);
14
+ private codeSelectionAvailable;
15
+ constructor();
26
16
  addFocusOnInput: () => void;
27
17
  private readonly handleInputKeydown;
28
- triggerSearch: () => void;
29
- triggerSearchHistory: () => void;
30
- getAutocompleteSuggestions: (input: string) => void;
31
- private readonly handleHistoryChange;
32
- private readonly handleAutocompleteClick;
33
- getSearchText: () => string;
34
- setSearchText: (value: string) => void;
35
- setWaitState: (waitState?: boolean | undefined) => void;
18
+ private readonly triggerSearch;
19
+ private readonly triggerSearchHistory;
20
+ private readonly handleAutocompleteSuggestions;
21
+ private readonly setWaitState;
36
22
  }
@@ -3,16 +3,13 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- import { LiveSearchState } from '../../static';
7
6
  export interface SearchLiveToggleProps {
8
7
  label: string;
9
- value: LiveSearchState.RESUME | LiveSearchState.PAUSE;
10
- onChange?: (value: LiveSearchState.RESUME | LiveSearchState.PAUSE) => void;
11
8
  }
12
9
  export declare class SearchLiveToggle {
13
10
  render: ExtendedHTMLElement;
14
11
  private readonly toggle;
12
+ private queryChangeSubscriptionId;
15
13
  constructor(props: SearchLiveToggleProps);
16
- setToggleState: (state: LiveSearchState) => void;
17
14
  flashToggle: () => void;
18
15
  }
@@ -3,11 +3,9 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- import { OnCopiedToClipboardFunction, RelevancyVoteType, Suggestion } from '../../static';
6
+ import { Suggestion } from '../../static';
7
7
  export interface SuggestionCardBodyProps {
8
8
  suggestion: Suggestion;
9
- onVoteChange: (suggestion: Suggestion, vote: RelevancyVoteType) => void;
10
- onCopiedToClipboard?: OnCopiedToClipboardFunction;
11
9
  }
12
10
  export declare class SuggestionCardBody {
13
11
  render: ExtendedHTMLElement;
@@ -2,15 +2,13 @@
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 { RelevancyVoteType, Suggestion } from '../../static';
5
+ import { Suggestion } from '../../static';
6
6
  import { ExtendedHTMLElement } from '../../helper/dom';
7
7
  export interface SuggestionCardRelevanceVoteProps {
8
8
  suggestion: Suggestion;
9
- onVoteChange: (suggestion: Suggestion, vote: RelevancyVoteType) => void;
10
9
  }
11
10
  export declare class SuggestionCardRelevanceVote {
12
11
  render: ExtendedHTMLElement;
13
- private readonly onVoteChange;
14
12
  constructor(props: SuggestionCardRelevanceVoteProps);
15
13
  private readonly handleVoteChange;
16
14
  }
@@ -3,22 +3,15 @@
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
5
  import { ExtendedHTMLElement } from '../../helper/dom';
6
- import { OnCopiedToClipboardFunctionWithSuggestionId, RelevancyVoteType, Suggestion, SuggestionEngagement } from '../../static';
6
+ import { Suggestion } from '../../static';
7
7
  export interface SuggestionCardProps {
8
8
  suggestion: Suggestion;
9
- onSuggestionOpen?: (suggestion: Suggestion) => void;
10
- onSuggestionLinkClick?: (suggestion: Suggestion) => void;
11
- onSuggestionLinkCopy?: (suggestion: Suggestion) => void;
12
- onSuggestionEngaged?: (engagementInfo: SuggestionEngagement) => void;
13
- onCopiedToClipboard?: OnCopiedToClipboardFunctionWithSuggestionId;
14
- onVoteChange: (suggestion: Suggestion, vote: RelevancyVoteType) => void;
15
9
  }
16
10
  export declare class SuggestionCard {
17
11
  private engagementStartTime;
18
12
  private totalMouseDistanceTraveled;
19
13
  private previousMousePosition;
20
14
  private mouseDownInfo;
21
- private readonly onSuggestionEngaged;
22
15
  private readonly suggestion;
23
16
  render: ExtendedHTMLElement;
24
17
  constructor(props: SuggestionCardProps);
@@ -18,10 +18,12 @@ export interface ToggleProps {
18
18
  export declare class Toggle {
19
19
  render: ExtendedHTMLElement;
20
20
  private readonly props;
21
+ private currentValue?;
21
22
  private readonly relocateTransitioner;
22
23
  constructor(props: ToggleProps);
23
24
  private readonly getChildren;
24
25
  private readonly setRelocatePosition;
25
26
  private readonly updateSelectionRender;
26
27
  setValue: (value: string) => void;
28
+ getValue: () => string | undefined;
27
29
  }
@@ -2,14 +2,9 @@
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 { StateManager } from '../static';
6
- export interface MynahConfigProps {
7
- stateManager: StateManager;
8
- }
9
5
  export declare class MynahConfig {
10
6
  private config;
11
- private readonly stateManager;
12
- constructor(props: MynahConfigProps);
7
+ constructor();
13
8
  getConfig: (configName: string) => any;
14
9
  setConfig: (configName: string, configValue: string) => void;
15
10
  }
@@ -2,11 +2,11 @@
2
2
  * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
3
  * SPDX-License-Identifier: Apache-2.0
4
4
  */
5
- export declare const getTimeDiff: (differenceInMs: number, show?: 1 | 2 | 3 | 4 | 5 | 6 | {
5
+ export declare const getTimeDiff: (differenceInMs: number, show?: {
6
6
  years?: boolean | undefined;
7
7
  months?: boolean | undefined;
8
8
  weeks?: boolean | undefined;
9
9
  days?: boolean | undefined;
10
10
  hours?: boolean | undefined;
11
11
  minutes?: boolean | undefined;
12
- } | undefined, separator?: string | undefined) => string;
12
+ } | 1 | 2 | 3 | 4 | 5 | 6 | undefined, separator?: string | undefined) => string;
@@ -49,4 +49,3 @@ export declare class DomBuilder {
49
49
  getPortal: (portalName: string) => ExtendedHTMLElement;
50
50
  removePortal: (portalName: string) => void;
51
51
  }
52
- export declare const cancelEvent: (event: Event) => boolean;
@@ -0,0 +1,30 @@
1
+ /*!
2
+ * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { MynahEventNames } from '../static';
6
+ export declare const cancelEvent: (event: Event) => boolean;
7
+ export declare class MynahUIGlobalEvents {
8
+ private static instance;
9
+ private readonly listeners;
10
+ private constructor();
11
+ static getInstance: () => MynahUIGlobalEvents;
12
+ /**
13
+ * Subscribe to value changes of a specific item in data store
14
+ * @param eventKey One of the keys in MynahUIDataModel
15
+ * @param handler function will be called with optional data field
16
+ * @returns listenerId which will be necessary to removeListener
17
+ */
18
+ addListener: (eventKey: MynahEventNames, handler: (data?: any) => void) => string;
19
+ /**
20
+ * Unsubscribe from changes of a specific item in data store
21
+ * @param eventKey One of the keys in MynahUIDataModel
22
+ * @param listenerId listenerId which is returned from addListener function
23
+ */
24
+ removeListener: (eventKey: MynahEventNames, listenerId: string) => void;
25
+ /**
26
+ * Updates the store and informs the subscribers.
27
+ * @param data A full or partial set of store data model with values.
28
+ */
29
+ dispatch: (eventKey: MynahEventNames, data?: any) => void;
30
+ }
@@ -0,0 +1,44 @@
1
+ /*!
2
+ * Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ import { MynahUIDataModel } from '../static';
6
+ export declare class EmptyMynahUIDataModel {
7
+ data: Required<MynahUIDataModel>;
8
+ constructor();
9
+ }
10
+ export declare class MynahUIDataStore {
11
+ private static instance;
12
+ private readonly subsciptions;
13
+ private store;
14
+ private constructor();
15
+ static getInstance: (initialData?: MynahUIDataModel | undefined) => MynahUIDataStore;
16
+ /**
17
+ * Subscribe to value changes of a specific item in data store
18
+ * @param storeKey One of the keys in MynahUIDataModel
19
+ * @param handler function will be called when value of the given key is updated in store with new and old values
20
+ * @returns subscriptionId which needed to unsubscribe
21
+ */
22
+ subscribe: (storeKey: keyof MynahUIDataModel, handler: (newValue: any, oldValue?: any) => void) => string;
23
+ /**
24
+ * Unsubscribe from changes of a specific item in data store
25
+ * @param storeKey One of the keys in MynahUIDataModel
26
+ * @param subscriptionId subsciptionId which is returned from subscribe function
27
+ */
28
+ unsubscribe: (storeKey: keyof MynahUIDataModel, subscriptionId: string) => void;
29
+ /**
30
+ * Returns current value of an item in data store
31
+ * @param storeKey One of the keys in MynahUIDataModel
32
+ * @returns value of the given key in data store
33
+ */
34
+ getValue: (storeKey: keyof MynahUIDataModel) => any;
35
+ /**
36
+ * Updates the store and informs the subscribers.
37
+ * @param data A full or partial set of store data model with values.
38
+ */
39
+ updateStore: (data: MynahUIDataModel) => void;
40
+ /**
41
+ * Clears store data and informs all the subscribers
42
+ */
43
+ resetStore: () => void;
44
+ }
package/dist/main.d.ts CHANGED
@@ -2,25 +2,57 @@
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 { SearchPayload, ServiceConnector, StateManager } from './static';
5
+ import { SuggestionEngagement, Suggestion, SearchPayload, LiveSearchState, SuggestionEventName, RelevancyVoteType, FeedbackPayload, MynahUIDataModel, ContextChangeType, ContextType, SearchHistoryFilters, NotificationType } from './static';
6
6
  import './styles/styles.scss';
7
- export { AutocompleteItem, SearchPayloadCodeSelection, FeedbackPayload, RelevancyVoteType, LiveSearchState, SearchPayload, Suggestion, ContextType, SearchHistoryItem, EngagementType, SuggestionEngagement, } from './static';
7
+ export { AutocompleteItem, SearchPayloadCodeSelection, FeedbackPayload, RelevancyVoteType, LiveSearchState, SearchPayload, Suggestion, ContextType, SearchHistoryItem, EngagementType, SuggestionEngagement, SuggestionEventName, SearchHistoryFilters, MynahUIDataModel, ContextChangeType, ContextSource, ContextTypes, NotificationType, } from './static';
8
8
  export interface MynahUIProps {
9
- serviceConnector: ServiceConnector;
10
- stateManager: StateManager;
9
+ storeData?: MynahUIDataModel;
10
+ onSearch?: (searchPayload: SearchPayload, isFromHistory?: boolean, isFromAutocomplete?: boolean) => void;
11
+ onReady?: () => void;
12
+ onClickSuggestionVote?: (suggestion: Suggestion, vote: RelevancyVoteType) => void;
13
+ onClickCodeDetails?: (code: string, fileName?: string, range?: {
14
+ start: {
15
+ row: string;
16
+ column?: string;
17
+ };
18
+ end?: {
19
+ row: string;
20
+ column?: string;
21
+ };
22
+ }) => void;
23
+ onChangeContext?: (changeType: ContextChangeType, queryContext: ContextType) => void;
24
+ onSuggestionEngagement?: (engagement: SuggestionEngagement) => void;
25
+ onSuggestionClipboardInteraction?: (suggestionId: string, type?: string, text?: string) => void;
26
+ onSuggestionInteraction?: (eventName: SuggestionEventName, suggestion: Suggestion) => void;
27
+ onSendFeedback?: (feedbackPayload: FeedbackPayload) => void;
28
+ onRequestHistoryRecords?: (filterPayload: SearchHistoryFilters) => void;
29
+ onRequestAutocompleteList?: (input: string) => void;
30
+ onChangeLiveSearchState?: (liveSearchState: LiveSearchState) => void;
31
+ onClickAutocompleteItem?: (text: string, currSelected?: number, suggestionCount?: number) => void;
11
32
  }
12
33
  export declare class MynahUI {
34
+ private readonly props;
13
35
  private readonly wrapper;
14
36
  private readonly searchCard;
15
37
  private readonly mainContainer;
16
38
  private readonly config;
17
- private readonly connector;
18
39
  constructor(props: MynahUIProps);
19
- updateSearchPayload: (searchPayload: SearchPayload) => void;
20
- private readonly handleLiveSearchExternalCommand;
21
- private readonly handlePayloadChange;
22
- private readonly handleLiveSearch;
23
- private readonly handleContentUpdate;
24
- handleSearch: (payload: SearchPayload, isFromAutocomplete: boolean, currAutocompleteSuggestionSelected?: number | undefined, autocompleteSuggestionsCount?: number | undefined) => void;
25
- private readonly recordContextChange;
40
+ private readonly addGlobalListeners;
41
+ /**
42
+ * Updates only the UI with the given data.
43
+ * @param data A full or partial set of data with values.
44
+ */
45
+ updateStore: (data: MynahUIDataModel) => void;
46
+ /**
47
+ * Simply creates and shows a notification
48
+ * @param props NotificationProps
49
+ */
50
+ notify: (props: {
51
+ duration?: number;
52
+ type?: NotificationType;
53
+ title?: string;
54
+ content: string;
55
+ onNotificationClick?: () => void;
56
+ onNotificationHide?: () => void;
57
+ }) => void;
26
58
  }