@aloudata/aloudata-design 2.10.1 → 2.10.3
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/dist/Table/helper.d.ts +1 -1
- package/dist/Table/hooks/useExpandable.d.ts +1 -0
- package/dist/Table/hooks/useExpandable.js +41 -12
- package/dist/Table/index.js +35 -8
- package/dist/Table/style/index.less +16 -1
- package/dist/Table/types.d.ts +2 -0
- package/dist/ald.min.css +1 -1
- package/dist/message/index.d.ts +3 -3
- package/dist/message/index.js +19 -9
- package/dist/message/style/index.less +1 -1
- package/dist/notification/index.d.ts +5 -5
- package/dist/notification/index.js +89 -73
- package/dist/notification/style/index.less +1 -1
- package/package.json +1 -1
- /package/dist/style/components/{toastify.less → toastify.css} +0 -0
package/dist/message/index.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ interface MessageOptions extends ToastOptions {
|
|
|
4
4
|
className?: string;
|
|
5
5
|
}
|
|
6
6
|
declare const message: {
|
|
7
|
-
success: (message?: string, options?: MessageOptions) =>
|
|
8
|
-
error: (message?: string, options?: MessageOptions) =>
|
|
9
|
-
info: (message?: string, options?: MessageOptions) =>
|
|
7
|
+
success: (message?: string, options?: MessageOptions) => void;
|
|
8
|
+
error: (message?: string, options?: MessageOptions) => void;
|
|
9
|
+
info: (message?: string, options?: MessageOptions) => void;
|
|
10
10
|
};
|
|
11
11
|
export type { MessageOptions };
|
|
12
12
|
export default message;
|
package/dist/message/index.js
CHANGED
|
@@ -52,27 +52,37 @@ var getMessage = function getMessage(message, type) {
|
|
|
52
52
|
className: "ald-message-text"
|
|
53
53
|
}, message, " ", closeX));
|
|
54
54
|
};
|
|
55
|
+
var toastId;
|
|
55
56
|
var message = {
|
|
56
57
|
success: function success(message) {
|
|
57
58
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
58
59
|
toast.dismiss();
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
60
|
+
clearTimeout(toastId);
|
|
61
|
+
toastId = setTimeout(function () {
|
|
62
|
+
toast.success(getMessage(message !== null && message !== void 0 ? message : '', 'success'), _objectSpread(_objectSpread(_objectSpread({}, defaultOptions), options), {}, {
|
|
63
|
+
className: classNames('ald-message ald-message-success', options.className)
|
|
64
|
+
}));
|
|
65
|
+
}, 200);
|
|
62
66
|
},
|
|
63
67
|
error: function error(message) {
|
|
64
68
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
65
69
|
toast.dismiss();
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
70
|
+
clearTimeout(toastId);
|
|
71
|
+
toastId = setTimeout(function () {
|
|
72
|
+
toast.error(getMessage(message !== null && message !== void 0 ? message : '', 'error'), _objectSpread(_objectSpread(_objectSpread({}, defaultOptions), options), {}, {
|
|
73
|
+
className: classNames('ald-message ald-message-error', options.className)
|
|
74
|
+
}));
|
|
75
|
+
}, 200);
|
|
69
76
|
},
|
|
70
77
|
info: function info(message) {
|
|
71
78
|
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
72
79
|
toast.dismiss();
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
80
|
+
clearTimeout(toastId);
|
|
81
|
+
toastId = setTimeout(function () {
|
|
82
|
+
toast.info(getMessage(message !== null && message !== void 0 ? message : '', 'info'), _objectSpread(_objectSpread(_objectSpread({}, defaultOptions), options), {}, {
|
|
83
|
+
className: classNames('ald-message ald-message-info', options.className)
|
|
84
|
+
}));
|
|
85
|
+
}, 200);
|
|
76
86
|
}
|
|
77
87
|
};
|
|
78
88
|
export default message;
|
|
@@ -10,11 +10,11 @@ interface IAldArgsProps extends NotificationOptions {
|
|
|
10
10
|
style?: React.CSSProperties;
|
|
11
11
|
}
|
|
12
12
|
declare const notification: {
|
|
13
|
-
open: (config: IAldArgsProps) =>
|
|
14
|
-
success: (config: IAldArgsProps) =>
|
|
15
|
-
error: (config: IAldArgsProps) =>
|
|
16
|
-
info: (config: IAldArgsProps) =>
|
|
17
|
-
warning: (config: IAldArgsProps) =>
|
|
13
|
+
open: (config: IAldArgsProps) => void;
|
|
14
|
+
success: (config: IAldArgsProps) => void;
|
|
15
|
+
error: (config: IAldArgsProps) => void;
|
|
16
|
+
info: (config: IAldArgsProps) => void;
|
|
17
|
+
warning: (config: IAldArgsProps) => void;
|
|
18
18
|
close: (id: number) => void;
|
|
19
19
|
closeAll: () => void;
|
|
20
20
|
};
|
|
@@ -76,6 +76,7 @@ function getPosition(placement) {
|
|
|
76
76
|
return placement;
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
|
+
var toastId;
|
|
79
80
|
var notification = {
|
|
80
81
|
open: function open(config) {
|
|
81
82
|
var message = config.message,
|
|
@@ -85,19 +86,22 @@ var notification = {
|
|
|
85
86
|
className = config.className,
|
|
86
87
|
duration = config.duration,
|
|
87
88
|
restConfig = _objectWithoutProperties(config, _excluded);
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
89
|
+
clearTimeout(toastId);
|
|
90
|
+
toastId = setTimeout(function () {
|
|
91
|
+
toast( /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: "ald-notification-content"
|
|
93
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
94
|
+
className: "ald-notification-message"
|
|
95
|
+
}, message), description && /*#__PURE__*/React.createElement("div", {
|
|
96
|
+
className: 'ald-notification-desc'
|
|
97
|
+
}, description)), _objectSpread(_objectSpread({
|
|
98
|
+
icon: false
|
|
99
|
+
}, defaultOptions), {}, {
|
|
100
|
+
autoClose: duration ? duration * 1000 : 3000,
|
|
101
|
+
position: getPosition(placement),
|
|
102
|
+
className: classNames('ald-notification', className)
|
|
103
|
+
}, restConfig));
|
|
104
|
+
}, 200);
|
|
101
105
|
},
|
|
102
106
|
success: function success(config) {
|
|
103
107
|
var message = config.message,
|
|
@@ -107,21 +111,24 @@ var notification = {
|
|
|
107
111
|
className = config.className,
|
|
108
112
|
duration = config.duration,
|
|
109
113
|
restConfig = _objectWithoutProperties(config, _excluded2);
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
114
|
+
clearTimeout(toastId);
|
|
115
|
+
toastId = setTimeout(function () {
|
|
116
|
+
toast.success( /*#__PURE__*/React.createElement("div", {
|
|
117
|
+
className: "ald-notification-content"
|
|
118
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
119
|
+
className: "ald-notification-message"
|
|
120
|
+
}, message), description && /*#__PURE__*/React.createElement("div", {
|
|
121
|
+
className: 'ald-notification-desc'
|
|
122
|
+
}, description)), _objectSpread(_objectSpread({
|
|
123
|
+
icon: function icon() {
|
|
124
|
+
return iconMap.success;
|
|
125
|
+
}
|
|
126
|
+
}, defaultOptions), {}, {
|
|
127
|
+
autoClose: duration ? duration * 1000 : 3000,
|
|
128
|
+
position: getPosition(placement),
|
|
129
|
+
className: classNames('ald-notification', className)
|
|
130
|
+
}, restConfig));
|
|
131
|
+
}, 200);
|
|
125
132
|
},
|
|
126
133
|
error: function error(config) {
|
|
127
134
|
var message = config.message,
|
|
@@ -131,21 +138,24 @@ var notification = {
|
|
|
131
138
|
className = config.className,
|
|
132
139
|
duration = config.duration,
|
|
133
140
|
restConfig = _objectWithoutProperties(config, _excluded3);
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
141
|
+
clearTimeout(toastId);
|
|
142
|
+
toastId = setTimeout(function () {
|
|
143
|
+
toast.error( /*#__PURE__*/React.createElement("div", {
|
|
144
|
+
className: "ald-notification-content"
|
|
145
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
146
|
+
className: "ald-notification-message"
|
|
147
|
+
}, message), description && /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
className: 'ald-notification-desc'
|
|
149
|
+
}, description)), _objectSpread(_objectSpread({
|
|
150
|
+
icon: function icon() {
|
|
151
|
+
return iconMap.error;
|
|
152
|
+
}
|
|
153
|
+
}, defaultOptions), {}, {
|
|
154
|
+
autoClose: duration ? duration * 1000 : 3000,
|
|
155
|
+
position: getPosition(placement),
|
|
156
|
+
className: classNames('ald-notification', className)
|
|
157
|
+
}, restConfig));
|
|
158
|
+
}, 200);
|
|
149
159
|
},
|
|
150
160
|
info: function info(config) {
|
|
151
161
|
var message = config.message,
|
|
@@ -155,21 +165,24 @@ var notification = {
|
|
|
155
165
|
className = config.className,
|
|
156
166
|
duration = config.duration,
|
|
157
167
|
restConfig = _objectWithoutProperties(config, _excluded4);
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
168
|
+
clearTimeout(toastId);
|
|
169
|
+
toastId = setTimeout(function () {
|
|
170
|
+
toast.info( /*#__PURE__*/React.createElement("div", {
|
|
171
|
+
className: "ald-notification-content"
|
|
172
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
173
|
+
className: "ald-notification-message"
|
|
174
|
+
}, message), description && /*#__PURE__*/React.createElement("div", {
|
|
175
|
+
className: 'ald-notification-desc'
|
|
176
|
+
}, description)), _objectSpread(_objectSpread({
|
|
177
|
+
icon: function icon() {
|
|
178
|
+
return iconMap.info;
|
|
179
|
+
}
|
|
180
|
+
}, defaultOptions), {}, {
|
|
181
|
+
autoClose: duration ? duration * 1000 : 3000,
|
|
182
|
+
position: getPosition(placement),
|
|
183
|
+
className: classNames('ald-notification', className)
|
|
184
|
+
}, restConfig));
|
|
185
|
+
}, 200);
|
|
173
186
|
},
|
|
174
187
|
warning: function warning(config) {
|
|
175
188
|
var message = config.message,
|
|
@@ -179,21 +192,24 @@ var notification = {
|
|
|
179
192
|
className = config.className,
|
|
180
193
|
duration = config.duration,
|
|
181
194
|
restConfig = _objectWithoutProperties(config, _excluded5);
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
clearTimeout(toastId);
|
|
196
|
+
toastId = setTimeout(function () {
|
|
197
|
+
toast.warn( /*#__PURE__*/React.createElement("div", {
|
|
198
|
+
className: "ald-notification-content"
|
|
199
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
200
|
+
className: "ald-notification-message"
|
|
201
|
+
}, message), description && /*#__PURE__*/React.createElement("div", {
|
|
202
|
+
className: 'ald-notification-desc'
|
|
203
|
+
}, description)), _objectSpread(_objectSpread({
|
|
204
|
+
icon: function icon() {
|
|
205
|
+
return iconMap.warning;
|
|
206
|
+
}
|
|
207
|
+
}, defaultOptions), {}, {
|
|
208
|
+
autoClose: duration ? duration * 1000 : 3000,
|
|
209
|
+
position: getPosition(placement),
|
|
210
|
+
className: classNames('ald-notification', className)
|
|
211
|
+
}, restConfig));
|
|
212
|
+
}, 200);
|
|
197
213
|
},
|
|
198
214
|
close: function close(id) {
|
|
199
215
|
toast.dismiss(id);
|
package/package.json
CHANGED
|
File without changes
|