@aws/mynah-ui 4.18.1 → 4.20.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/README.md CHANGED
@@ -48,8 +48,8 @@ Please refer to the following guides:
48
48
  * [Startup guide](./docs/STARTUP.md)
49
49
  * [Constructor properties](./docs/PROPERTIES.md)
50
50
  * [Configuration](./docs/CONFIG.md)
51
- * [Usage](./docs/USAGE.md)
52
51
  * [Data model](./docs/DATAMODEL.md)
52
+ * [Usage](./docs/USAGE.md)
53
53
  * [Styling](./docs/STYLING.md)
54
54
  * [Developer guidelines (contribution)](./docs/DEVELOPER.md)
55
55
 
@@ -19,6 +19,7 @@ export interface ButtonProps {
19
19
  primary?: boolean;
20
20
  border?: boolean;
21
21
  status?: 'main' | 'primary' | 'info' | 'success' | 'warning' | 'error' | 'clear';
22
+ fillState?: 'hover' | 'always';
22
23
  additionalEvents?: Partial<Record<GenericEvents, DomBuilderEventHandler | DomBuilderEventHandlerWithOptions>>;
23
24
  onClick: (e: Event) => void;
24
25
  onHover?: (e: Event) => void;
@@ -0,0 +1,10 @@
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 '../../styles/components/_spinner.scss';
7
+ export declare class Spinner {
8
+ render: ExtendedHTMLElement;
9
+ constructor();
10
+ }
@@ -19,13 +19,17 @@ import 'prismjs/components/prism-markdown.min';
19
19
  import 'prismjs/components/prism-mongodb.min';
20
20
  import 'prismjs/components/prism-c.min';
21
21
  import 'prismjs/components/prism-bash.min';
22
+ import 'prismjs/components/prism-go.min';
22
23
  import 'prismjs/components/prism-csharp.min';
23
24
  import 'prismjs/components/prism-objectivec.min';
24
25
  import 'prismjs/components/prism-python.min';
25
26
  import 'prismjs/components/prism-regex.min';
27
+ import 'prismjs/components/prism-swift.min';
26
28
  import 'prismjs/components/prism-scala.min';
27
29
  import 'prismjs/components/prism-scss.min';
28
30
  import 'prismjs/components/prism-less.min';
31
+ import 'prismjs/components/prism-ruby.min';
32
+ import 'prismjs/components/prism-rust.min';
29
33
  import 'prismjs/plugins/line-numbers/prism-line-numbers.js';
30
34
  import 'prismjs/plugins/keep-markup/prism-keep-markup.js';
31
35
  import 'prismjs/plugins/diff-highlight/prism-diff-highlight.min';
@@ -69,7 +69,7 @@ export declare class DomBuilder {
69
69
  build: (domBuilderObject: DomBuilderObject) => ExtendedHTMLElement;
70
70
  update: (domToUpdate: ExtendedHTMLElement, domBuilderObject: DomBuilderObjectFilled) => ExtendedHTMLElement;
71
71
  createPortal: (portalName: string, builderObject: DomBuilderObject, position: 'beforebegin' | 'afterbegin' | 'beforeend' | 'afterend') => ExtendedHTMLElement;
72
- getPortal: (portalName: string) => ExtendedHTMLElement;
72
+ getPortal: (portalName: string) => ExtendedHTMLElement | undefined;
73
73
  removePortal: (portalName: string) => void;
74
74
  removeAllPortals: (portalsWithName: MynahPortalNames) => void;
75
75
  }
@@ -13,9 +13,9 @@ export declare class EmptyMynahUITabsStoreModel {
13
13
  export declare class MynahUITabsStore {
14
14
  private static instance;
15
15
  private readonly subscriptions;
16
- private readonly tabDefaults;
17
16
  private readonly tabsStore;
18
17
  private readonly tabsDataStore;
18
+ private tabDefaults;
19
19
  private constructor();
20
20
  private readonly deselectAllTabs;
21
21
  readonly addTab: (tabData?: MynahUITabStoreTab) => string | undefined;
@@ -84,5 +84,10 @@ export declare class MynahUITabsStore {
84
84
  * @returns tabs length
85
85
  */
86
86
  tabsLength: () => number;
87
+ /**
88
+ * Updates defaults of the tab store
89
+ * @param defaults MynahUITabStoreTab
90
+ */
91
+ updateTabDefaults: (defaults: MynahUITabStoreTab) => void;
87
92
  }
88
93
  export {};
package/dist/main.d.ts CHANGED
@@ -21,6 +21,10 @@ export { default as MynahUITestIds } from './helper/test-ids';
21
21
  export interface MynahUIProps {
22
22
  rootSelector?: string;
23
23
  defaults?: MynahUITabStoreTab;
24
+ splashScreenInitialStatus?: {
25
+ visible: boolean;
26
+ text: string;
27
+ };
24
28
  tabs?: MynahUITabStoreModel;
25
29
  config?: Partial<ConfigModel>;
26
30
  onShowMoreWebResultsClick?: (tabId: string, messageId: string, eventId?: string) => void;
@@ -80,6 +84,8 @@ export declare class MynahUI {
80
84
  private readonly render;
81
85
  private lastEventId;
82
86
  private readonly props;
87
+ private readonly splashLoader;
88
+ private readonly splashLoaderText;
83
89
  private readonly tabsWrapper;
84
90
  private readonly tabContentsWrapper;
85
91
  private readonly feedbackForm?;
@@ -137,6 +143,11 @@ export declare class MynahUI {
137
143
  * @param data A full or partial set of data with values.
138
144
  */
139
145
  updateStore: (tabId: string | '', data: MynahUIDataModel) => string | undefined;
146
+ /**
147
+ * Updates defaults of the tab store
148
+ * @param defaults MynahUITabStoreTab
149
+ */
150
+ updateTabDefaults: (defaults: MynahUITabStoreTab) => void;
140
151
  /**
141
152
  * This function returns the selected tab id if there is any, otherwise returns undefined
142
153
  * @returns string selectedTabId or undefined
@@ -147,6 +158,10 @@ export declare class MynahUI {
147
158
  * @returns string selectedTabId or undefined
148
159
  */
149
160
  getAllTabs: () => MynahUITabStoreModel;
161
+ /**
162
+ * Toggles the visibility of the splash loader screen
163
+ */
164
+ toggleSplashLoader: (visible: boolean, text?: string) => void;
150
165
  /**
151
166
  * Simply creates and shows a notification
152
167
  * @param props NotificationProps