@semcore/notice-bubble 3.3.4 → 3.3.7
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/CHANGELOG.md +18 -0
- package/lib/cjs/NoticeBubble.js +1 -1
- package/lib/cjs/index.d.ts +83 -0
- package/lib/es6/NoticeBubble.js +1 -1
- package/lib/es6/index.d.ts +83 -0
- package/package.json +4 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
|
5
|
+
## [3.3.7] - 2022-05-16
|
|
6
|
+
|
|
7
|
+
### Changed
|
|
8
|
+
|
|
9
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.21.0 ~> 2.24.0]).
|
|
10
|
+
|
|
11
|
+
## [3.3.6] - 2022-04-28
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
|
|
15
|
+
- Version patch update due to children dependencies update (`@semcore/icon` [2.20.0 ~> 2.21.0]).
|
|
16
|
+
|
|
17
|
+
## [3.3.5] - 2022-04-03
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- Version patch update due to children dependencies update (`@semcore/animation` [1.5.0 ~> 1.5.0]).
|
|
22
|
+
|
|
5
23
|
## [3.3.4] - 2022-03-21
|
|
6
24
|
|
|
7
25
|
### Changed
|
package/lib/cjs/NoticeBubble.js
CHANGED
|
@@ -163,7 +163,7 @@ var NoticeBubbleContainerRoot = /*#__PURE__*/function (_Component) {
|
|
|
163
163
|
(0, _createClass2["default"])(NoticeBubbleContainerRoot, [{
|
|
164
164
|
key: "render",
|
|
165
165
|
value: function render() {
|
|
166
|
-
var _ref = this
|
|
166
|
+
var _ref = this.asProps,
|
|
167
167
|
_ref3;
|
|
168
168
|
|
|
169
169
|
var SNoticeBubble = _flexBox.Box;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { IPortalProps } from '@semcore/portal';
|
|
2
|
+
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
+
import { IBoxProps } from '@semcore/flex-box';
|
|
4
|
+
|
|
5
|
+
export interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {
|
|
6
|
+
/** Manager copy */
|
|
7
|
+
manager?: INoticeBubbleManager;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface INoticeBubbleInfoProps extends INoticeBubbleProps {
|
|
11
|
+
readonly type?: 'info';
|
|
12
|
+
/** Notice display duration
|
|
13
|
+
* @default 5000
|
|
14
|
+
*/
|
|
15
|
+
duration?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface INoticeBubbleWarningProps extends INoticeBubbleProps {
|
|
19
|
+
readonly type?: 'warning';
|
|
20
|
+
/**
|
|
21
|
+
* Notice display duration
|
|
22
|
+
* @default 0
|
|
23
|
+
*/
|
|
24
|
+
duration?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface INoticeBubbleProps extends IBoxProps {
|
|
28
|
+
/**
|
|
29
|
+
* Manager instance
|
|
30
|
+
* @default NoticeBubbleManager()
|
|
31
|
+
*/
|
|
32
|
+
manager?: INoticeBubbleManager;
|
|
33
|
+
/**
|
|
34
|
+
* Notice visibility
|
|
35
|
+
*/
|
|
36
|
+
visible?: boolean;
|
|
37
|
+
/** Adds controls (buttons, etc.) */
|
|
38
|
+
action?: React.ReactNode;
|
|
39
|
+
|
|
40
|
+
/** Triggered when the notice is closed */
|
|
41
|
+
onClose?: (e?: React.SyntheticEvent) => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface INoticeBubbleManager {
|
|
45
|
+
/**
|
|
46
|
+
* Adding a notice.
|
|
47
|
+
* Takes the props properties of NoticeBubble.
|
|
48
|
+
* Returns an object with the uid and the update, remove functions.
|
|
49
|
+
* */
|
|
50
|
+
add: (
|
|
51
|
+
props: object,
|
|
52
|
+
) => {
|
|
53
|
+
uid: string;
|
|
54
|
+
update: (props: object) => boolean;
|
|
55
|
+
remove: () => boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Updates the notice by uid.
|
|
59
|
+
* Takes the uid-unique identifier and the props-properties of NoticeBubble.
|
|
60
|
+
* Returns a successful or unsuccessful update.
|
|
61
|
+
* */
|
|
62
|
+
update: (uid: string, props: object) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Deletes the notice by uid.
|
|
65
|
+
* Takes an uid-unique identifier.
|
|
66
|
+
* Returns a successful or unsuccessful deletion.
|
|
67
|
+
* */
|
|
68
|
+
remove: (uid: string) => boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;
|
|
72
|
+
declare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;
|
|
73
|
+
declare const NoticeBubbleContainer: (<T>(
|
|
74
|
+
props: CProps<INoticeBubbleContainerProps & T>,
|
|
75
|
+
) => ReturnEl) & {
|
|
76
|
+
Info: typeof NoticeBubble;
|
|
77
|
+
Warning: typeof NoticeBubbleWarning;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const manager: INoticeBubbleManager;
|
|
81
|
+
|
|
82
|
+
export { NoticeBubbleContainer, NoticeBubble, NoticeBubbleWarning };
|
|
83
|
+
export default manager;
|
package/lib/es6/NoticeBubble.js
CHANGED
|
@@ -138,7 +138,7 @@ var NoticeBubbleContainerRoot = /*#__PURE__*/function (_Component) {
|
|
|
138
138
|
_createClass(NoticeBubbleContainerRoot, [{
|
|
139
139
|
key: "render",
|
|
140
140
|
value: function render() {
|
|
141
|
-
var _ref = this
|
|
141
|
+
var _ref = this.asProps,
|
|
142
142
|
_ref3;
|
|
143
143
|
|
|
144
144
|
var SNoticeBubble = Box;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { IPortalProps } from '@semcore/portal';
|
|
2
|
+
import { CProps, ReturnEl } from '@semcore/core';
|
|
3
|
+
import { IBoxProps } from '@semcore/flex-box';
|
|
4
|
+
|
|
5
|
+
export interface INoticeBubbleContainerProps extends IBoxProps, IPortalProps {
|
|
6
|
+
/** Manager copy */
|
|
7
|
+
manager?: INoticeBubbleManager;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface INoticeBubbleInfoProps extends INoticeBubbleProps {
|
|
11
|
+
readonly type?: 'info';
|
|
12
|
+
/** Notice display duration
|
|
13
|
+
* @default 5000
|
|
14
|
+
*/
|
|
15
|
+
duration?: number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface INoticeBubbleWarningProps extends INoticeBubbleProps {
|
|
19
|
+
readonly type?: 'warning';
|
|
20
|
+
/**
|
|
21
|
+
* Notice display duration
|
|
22
|
+
* @default 0
|
|
23
|
+
*/
|
|
24
|
+
duration?: number;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface INoticeBubbleProps extends IBoxProps {
|
|
28
|
+
/**
|
|
29
|
+
* Manager instance
|
|
30
|
+
* @default NoticeBubbleManager()
|
|
31
|
+
*/
|
|
32
|
+
manager?: INoticeBubbleManager;
|
|
33
|
+
/**
|
|
34
|
+
* Notice visibility
|
|
35
|
+
*/
|
|
36
|
+
visible?: boolean;
|
|
37
|
+
/** Adds controls (buttons, etc.) */
|
|
38
|
+
action?: React.ReactNode;
|
|
39
|
+
|
|
40
|
+
/** Triggered when the notice is closed */
|
|
41
|
+
onClose?: (e?: React.SyntheticEvent) => void;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface INoticeBubbleManager {
|
|
45
|
+
/**
|
|
46
|
+
* Adding a notice.
|
|
47
|
+
* Takes the props properties of NoticeBubble.
|
|
48
|
+
* Returns an object with the uid and the update, remove functions.
|
|
49
|
+
* */
|
|
50
|
+
add: (
|
|
51
|
+
props: object,
|
|
52
|
+
) => {
|
|
53
|
+
uid: string;
|
|
54
|
+
update: (props: object) => boolean;
|
|
55
|
+
remove: () => boolean;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Updates the notice by uid.
|
|
59
|
+
* Takes the uid-unique identifier and the props-properties of NoticeBubble.
|
|
60
|
+
* Returns a successful or unsuccessful update.
|
|
61
|
+
* */
|
|
62
|
+
update: (uid: string, props: object) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Deletes the notice by uid.
|
|
65
|
+
* Takes an uid-unique identifier.
|
|
66
|
+
* Returns a successful or unsuccessful deletion.
|
|
67
|
+
* */
|
|
68
|
+
remove: (uid: string) => boolean;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
declare const NoticeBubble: <T>(props: INoticeBubbleInfoProps & T) => ReturnEl;
|
|
72
|
+
declare const NoticeBubbleWarning: <T>(props: INoticeBubbleWarningProps & T) => ReturnEl;
|
|
73
|
+
declare const NoticeBubbleContainer: (<T>(
|
|
74
|
+
props: CProps<INoticeBubbleContainerProps & T>,
|
|
75
|
+
) => ReturnEl) & {
|
|
76
|
+
Info: typeof NoticeBubble;
|
|
77
|
+
Warning: typeof NoticeBubbleWarning;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
declare const manager: INoticeBubbleManager;
|
|
81
|
+
|
|
82
|
+
export { NoticeBubbleContainer, NoticeBubble, NoticeBubbleWarning };
|
|
83
|
+
export default manager;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@semcore/notice-bubble",
|
|
3
3
|
"description": "SEMRush NoticeBubble Component",
|
|
4
|
-
"version": "3.3.
|
|
4
|
+
"version": "3.3.7",
|
|
5
5
|
"main": "lib/cjs/index.js",
|
|
6
6
|
"module": "lib/es6/index.js",
|
|
7
7
|
"typings": "lib/types/index.d.ts",
|
|
@@ -30,5 +30,8 @@
|
|
|
30
30
|
"type": "git",
|
|
31
31
|
"url": "https://github.com/semrush/intergalactic.git",
|
|
32
32
|
"directory": "semcore/notice-bubble"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@semcore/jest-preset-ui": "1.0.0"
|
|
33
36
|
}
|
|
34
37
|
}
|