@aws/mynah-ui 1.1.13 → 1.2.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.
@@ -10,5 +10,6 @@ export declare class NavivationTabs {
10
10
  render: ExtendedHTMLElement;
11
11
  private readonly props;
12
12
  constructor(props: NavivationTabsProps);
13
+ private readonly setLoading;
13
14
  private readonly getTabsRender;
14
15
  }
@@ -20,6 +20,16 @@ export declare const highlighters: {
20
20
  textReplacement: string;
21
21
  };
22
22
  };
23
+ export declare const ellipsis: {
24
+ start: {
25
+ markup: string;
26
+ textReplacement: string;
27
+ };
28
+ end: {
29
+ markup: string;
30
+ textReplacement: string;
31
+ };
32
+ };
23
33
  export interface SyntaxHighlighterProps {
24
34
  codeStringWithMarkup: string;
25
35
  language?: SupportedCodingLanguagesType;
@@ -6,12 +6,13 @@ import { ExtendedHTMLElement } from '../helper/dom';
6
6
  export interface ToggleOption {
7
7
  label?: ExtendedHTMLElement | string | HTMLElement;
8
8
  color?: string;
9
+ disabled?: boolean;
9
10
  value: string;
10
11
  }
11
12
  export interface ToggleProps {
12
13
  options: ToggleOption[];
13
14
  type?: 'switch' | 'tabs';
14
- value?: string;
15
+ value?: string | null;
15
16
  name: string;
16
17
  disabled?: boolean;
17
18
  onChange?: (selectedValue: string) => void;
@@ -0,0 +1,13 @@
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;
@@ -52,7 +52,7 @@ export declare class MynahUIDataStore {
52
52
  * Updates the store and informs the subscribers.
53
53
  * @param data A full or partial set of store data model with values.
54
54
  */
55
- updateStore: (data: MynahUIDataModel) => void;
55
+ updateStore: (data: MynahUIDataModel, skipSubscribers?: boolean | undefined) => void;
56
56
  /**
57
57
  * Clears store data and informs all the subscribers
58
58
  */
package/dist/main.d.ts CHANGED
@@ -5,6 +5,7 @@
5
5
  import { SuggestionEngagement, Suggestion, SearchPayload, LiveSearchState, SuggestionEventName, RelevancyVoteType, FeedbackPayload, MynahUIDataModel, ContextChangeType, ContextType, SearchHistoryFilters, NotificationType } from './static';
6
6
  import './styles/styles.scss';
7
7
  export { AutocompleteItem, SearchPayloadCodeSelection, FeedbackPayload, RelevancyVoteType, LiveSearchState, SearchPayload, Suggestion, ContextType, SearchHistoryItem, EngagementType, SuggestionEngagement, SuggestionEventName, SearchHistoryFilters, MynahUIDataModel, ContextChangeType, ContextSource, ContextTypes, NotificationType, } from './static';
8
+ export { transformPayloadData, validateRulesOnPayloadData, PayloadTransformRule, } from './helper/payload-transformer';
8
9
  export interface MynahUIProps {
9
10
  rootSelector?: string;
10
11
  storeData?: MynahUIDataModel;
@@ -29,7 +30,7 @@ export interface MynahUIProps {
29
30
  onSuggestionInteraction?: (eventName: SuggestionEventName, suggestion: Suggestion, mouseEvent?: MouseEvent) => void;
30
31
  onSendFeedback?: (feedbackPayload: FeedbackPayload) => void;
31
32
  onRequestHistoryRecords?: (filterPayload: SearchHistoryFilters) => void;
32
- onRequestAutocompleteList?: (input: string) => void;
33
+ onInputQueryChange?: (input: string) => void;
33
34
  onChangeLiveSearchState?: (liveSearchState: LiveSearchState) => void;
34
35
  onClickAutocompleteItem?: (text: string, currSelected?: number, suggestionCount?: number) => void;
35
36
  }