@eui/core 21.0.0-next.23 → 21.0.0-next.25
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 +37 -0
- package/docs/changelog.html +24 -0
- package/docs/injectables/EuiGrowlService.html +21 -37
- package/docs/js/search/search_index.js +2 -2
- package/docs/properties.html +1 -1
- package/fesm2022/eui-core.mjs +17 -17
- package/fesm2022/eui-core.mjs.map +1 -1
- package/package.json +2 -2
- package/types/eui-core.d.ts +7 -7
- package/types/eui-core.d.ts.map +1 -1
package/docs/properties.html
CHANGED
package/fesm2022/eui-core.mjs
CHANGED
|
@@ -1288,13 +1288,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.0.0", ngImpor
|
|
|
1288
1288
|
|
|
1289
1289
|
class EuiGrowlService {
|
|
1290
1290
|
constructor() {
|
|
1291
|
-
this.growlMessages = [];
|
|
1292
|
-
this.isGrowlSticky = false;
|
|
1293
|
-
this.isCloseAllSticky = false;
|
|
1294
|
-
this.growlLife = 3000;
|
|
1295
|
-
this.growlPosition = 'bottom-right';
|
|
1296
|
-
this.growlCallback = null;
|
|
1297
|
-
this.ariaGrowlLive = 'polite';
|
|
1291
|
+
this.growlMessages = new BehaviorSubject([]);
|
|
1292
|
+
this.isGrowlSticky = new BehaviorSubject(false);
|
|
1293
|
+
this.isCloseAllSticky = new BehaviorSubject(false);
|
|
1294
|
+
this.growlLife = new BehaviorSubject(3000);
|
|
1295
|
+
this.growlPosition = new BehaviorSubject('bottom-right');
|
|
1296
|
+
this.growlCallback = new BehaviorSubject(null);
|
|
1297
|
+
this.ariaGrowlLive = new BehaviorSubject('polite');
|
|
1298
1298
|
}
|
|
1299
1299
|
/**
|
|
1300
1300
|
* displays a growl UxMessage item, isSticky
|
|
@@ -1305,41 +1305,41 @@ class EuiGrowlService {
|
|
|
1305
1305
|
}
|
|
1306
1306
|
else {
|
|
1307
1307
|
if (isMultiple === undefined || !isMultiple) {
|
|
1308
|
-
this.growlMessages
|
|
1308
|
+
this.growlMessages.next([]);
|
|
1309
1309
|
}
|
|
1310
|
-
this.growlMessages = this.growlMessages.concat(msg);
|
|
1311
1310
|
msg.life = life || msg.life;
|
|
1312
1311
|
msg.sticky = isSticky || msg.sticky;
|
|
1312
|
+
this.growlMessages.next([...this.growlMessages.value, msg]);
|
|
1313
1313
|
if (life === undefined || isNaN(life)) {
|
|
1314
1314
|
if (msg.severity === 'danger') {
|
|
1315
1315
|
isSticky = true;
|
|
1316
1316
|
}
|
|
1317
1317
|
else {
|
|
1318
|
-
this.growlLife
|
|
1318
|
+
this.growlLife.next(3000);
|
|
1319
1319
|
}
|
|
1320
1320
|
}
|
|
1321
1321
|
else {
|
|
1322
|
-
this.growlLife
|
|
1322
|
+
this.growlLife.next(life);
|
|
1323
1323
|
}
|
|
1324
1324
|
if (isSticky) {
|
|
1325
|
-
this.isGrowlSticky
|
|
1325
|
+
this.isGrowlSticky.next(isSticky);
|
|
1326
1326
|
}
|
|
1327
1327
|
else {
|
|
1328
|
-
this.isGrowlSticky
|
|
1328
|
+
this.isGrowlSticky.next(false);
|
|
1329
1329
|
}
|
|
1330
1330
|
if (position) {
|
|
1331
|
-
this.growlPosition
|
|
1331
|
+
this.growlPosition.next(position);
|
|
1332
1332
|
}
|
|
1333
1333
|
if (callback) {
|
|
1334
|
-
this.growlCallback
|
|
1334
|
+
this.growlCallback.next(callback);
|
|
1335
1335
|
}
|
|
1336
1336
|
if (ariaLive) {
|
|
1337
|
-
this.ariaGrowlLive
|
|
1337
|
+
this.ariaGrowlLive.next(ariaLive);
|
|
1338
1338
|
}
|
|
1339
1339
|
}
|
|
1340
1340
|
}
|
|
1341
1341
|
clearGrowl() {
|
|
1342
|
-
this.growlMessages
|
|
1342
|
+
this.growlMessages.next([]);
|
|
1343
1343
|
}
|
|
1344
1344
|
growlSuccess(msg, position) {
|
|
1345
1345
|
this.growl({ severity: 'success', summary: 'SUCCESS', detail: msg }, false, false, undefined, position);
|