@aws/mynah-ui 2.0.0-beta.8.2 → 2.0.0-beta.9.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.
@@ -8,6 +8,7 @@ export interface TabsProps {
8
8
  }
9
9
  export declare class Tabs {
10
10
  render: ExtendedHTMLElement;
11
+ private tabIdSubscriptions;
11
12
  private toggleGroup;
12
13
  private readonly props;
13
14
  constructor(props: TabsProps);
@@ -32,6 +32,7 @@ export declare class Toggle {
32
32
  setValue: (value: string) => void;
33
33
  addOption: (option: ToggleOption) => void;
34
34
  removeOption: (value: string) => void;
35
+ updateOptionTitle: (value: string, title: string) => void;
35
36
  snapToOption: (value: string) => void;
36
37
  getValue: () => string | undefined | null;
37
38
  }
@@ -2,7 +2,7 @@
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 { MynahUITabStoreModel, MynahUITabStoreTab } from '../static';
5
+ import { MynahUIDataModel, MynahUITabStoreModel, MynahUITabStoreTab } from '../static';
6
6
  interface TabStoreSubscription {
7
7
  'add': Record<string, (tabId: string, tabData?: MynahUITabStoreTab) => void>;
8
8
  'remove': Record<string, (tabId: string, newSelectedTab?: MynahUITabStoreTab) => void>;
@@ -27,6 +27,8 @@ export declare class MynahUITabsStore {
27
27
  updateTab: (tabId: string, tabData?: Partial<MynahUITabStoreTab> | undefined, skipSubscribers?: boolean | undefined) => void;
28
28
  static getInstance: (initialData?: MynahUITabStoreModel | undefined, defaults?: MynahUITabStoreTab | undefined) => MynahUITabsStore;
29
29
  addListener: (eventName: keyof TabStoreSubscription, handler: (tabId: string, tabData?: MynahUITabStoreTab | undefined) => void) => string;
30
+ addListenerToDataStore: (tabId: string, storeKey: keyof MynahUIDataModel, handler: (newValue: any, oldValue?: any) => void) => string | null;
31
+ removeListenerFromDataStore: (tabId: string, subscriptionId: string, storeKey: keyof MynahUIDataModel) => void;
30
32
  removeListener: (eventName: keyof TabStoreSubscription, subscriptionId: string) => void;
31
33
  private readonly informSubscribers;
32
34
  getTab: (tabId: string) => MynahUITabStoreTab | null;