@teselagen/ui 0.3.59 → 0.3.60
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/index.cjs.js +104 -73
- package/index.es.js +104 -73
- package/package.json +1 -1
- package/src/style.css +18 -0
- package/src/toastr.js +47 -1
- package/style.css +18 -1
package/index.cjs.js
CHANGED
|
@@ -5513,10 +5513,10 @@ var ownKeys$3 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownK
|
|
|
5513
5513
|
/* istanbul ignore next */
|
|
5514
5514
|
Object.getOwnPropertyNames
|
|
5515
5515
|
);
|
|
5516
|
-
function toPrimitive$
|
|
5516
|
+
function toPrimitive$3(value) {
|
|
5517
5517
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
5518
5518
|
}
|
|
5519
|
-
__name(toPrimitive$
|
|
5519
|
+
__name(toPrimitive$3, "toPrimitive$3");
|
|
5520
5520
|
function hasProp(target, prop) {
|
|
5521
5521
|
return objectPrototype$1.hasOwnProperty.call(target, prop);
|
|
5522
5522
|
}
|
|
@@ -6413,7 +6413,7 @@ var ObservableValue = /* @__PURE__ */ function(_Atom) {
|
|
|
6413
6413
|
return this.name_ + "[" + this.value_ + "]";
|
|
6414
6414
|
}, "toString");
|
|
6415
6415
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6416
|
-
return toPrimitive$
|
|
6416
|
+
return toPrimitive$3(this.get());
|
|
6417
6417
|
}, "valueOf");
|
|
6418
6418
|
_proto[_Symbol$toPrimitive] = function() {
|
|
6419
6419
|
return this.valueOf();
|
|
@@ -6598,7 +6598,7 @@ var ComputedValue = /* @__PURE__ */ function() {
|
|
|
6598
6598
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
6599
6599
|
}, "toString");
|
|
6600
6600
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6601
|
-
return toPrimitive$
|
|
6601
|
+
return toPrimitive$3(this.get());
|
|
6602
6602
|
}, "valueOf");
|
|
6603
6603
|
_proto[_Symbol$toPrimitive$1] = function() {
|
|
6604
6604
|
return this.valueOf();
|
|
@@ -11232,7 +11232,7 @@ lodash.exports;
|
|
|
11232
11232
|
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
11233
11233
|
);
|
|
11234
11234
|
var Buffer2 = moduleExports2 ? context.Buffer : undefined$12, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe2 = Buffer2 ? Buffer2.allocUnsafe : undefined$12, getPrototype2 = overArg2(Object2.getPrototypeOf, Object2), objectCreate2 = Object2.create, propertyIsEnumerable3 = objectProto2.propertyIsEnumerable, splice3 = arrayProto2.splice, spreadableSymbol2 = Symbol2 ? Symbol2.isConcatSpreadable : undefined$12, symIterator = Symbol2 ? Symbol2.iterator : undefined$12, symToStringTag2 = Symbol2 ? Symbol2.toStringTag : undefined$12;
|
|
11235
|
-
var
|
|
11235
|
+
var defineProperty6 = function() {
|
|
11236
11236
|
try {
|
|
11237
11237
|
var func = getNative2(Object2, "defineProperty");
|
|
11238
11238
|
func({}, "", {});
|
|
@@ -11672,8 +11672,8 @@ lodash.exports;
|
|
|
11672
11672
|
}
|
|
11673
11673
|
__name(baseAssignIn2, "baseAssignIn");
|
|
11674
11674
|
function baseAssignValue2(object2, key, value) {
|
|
11675
|
-
if (key == "__proto__" &&
|
|
11676
|
-
|
|
11675
|
+
if (key == "__proto__" && defineProperty6) {
|
|
11676
|
+
defineProperty6(object2, key, {
|
|
11677
11677
|
"configurable": true,
|
|
11678
11678
|
"enumerable": true,
|
|
11679
11679
|
"value": value,
|
|
@@ -12406,8 +12406,8 @@ lodash.exports;
|
|
|
12406
12406
|
metaMap.set(func, data);
|
|
12407
12407
|
return func;
|
|
12408
12408
|
};
|
|
12409
|
-
var baseSetToString2 = !
|
|
12410
|
-
return
|
|
12409
|
+
var baseSetToString2 = !defineProperty6 ? identity3 : function(func, string2) {
|
|
12410
|
+
return defineProperty6(func, "toString", {
|
|
12411
12411
|
"configurable": true,
|
|
12412
12412
|
"enumerable": false,
|
|
12413
12413
|
"value": constant2(string2),
|
|
@@ -16956,20 +16956,11 @@ var _fails = /* @__PURE__ */ __name(function(exec) {
|
|
|
16956
16956
|
return true;
|
|
16957
16957
|
}
|
|
16958
16958
|
}, "_fails");
|
|
16959
|
-
var _descriptors
|
|
16960
|
-
|
|
16961
|
-
|
|
16962
|
-
|
|
16963
|
-
|
|
16964
|
-
hasRequired_descriptors = 1;
|
|
16965
|
-
_descriptors = !_fails(function() {
|
|
16966
|
-
return Object.defineProperty({}, "a", { get: function() {
|
|
16967
|
-
return 7;
|
|
16968
|
-
} }).a != 7;
|
|
16969
|
-
});
|
|
16970
|
-
return _descriptors;
|
|
16971
|
-
}
|
|
16972
|
-
__name(require_descriptors, "require_descriptors");
|
|
16959
|
+
var _descriptors = !_fails(function() {
|
|
16960
|
+
return Object.defineProperty({}, "a", { get: function() {
|
|
16961
|
+
return 7;
|
|
16962
|
+
} }).a != 7;
|
|
16963
|
+
});
|
|
16973
16964
|
var _domCreate;
|
|
16974
16965
|
var hasRequired_domCreate;
|
|
16975
16966
|
function require_domCreate() {
|
|
@@ -16985,7 +16976,7 @@ function require_domCreate() {
|
|
|
16985
16976
|
return _domCreate;
|
|
16986
16977
|
}
|
|
16987
16978
|
__name(require_domCreate, "require_domCreate");
|
|
16988
|
-
var _ie8DomDefine = !
|
|
16979
|
+
var _ie8DomDefine = !_descriptors && !_fails(function() {
|
|
16989
16980
|
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
16990
16981
|
return 7;
|
|
16991
16982
|
} }).a != 7;
|
|
@@ -17003,33 +16994,25 @@ var _toPrimitive = /* @__PURE__ */ __name(function(it, S2) {
|
|
|
17003
16994
|
return val;
|
|
17004
16995
|
throw TypeError("Can't convert object to primitive value");
|
|
17005
16996
|
}, "_toPrimitive");
|
|
17006
|
-
var
|
|
17007
|
-
|
|
17008
|
-
|
|
17009
|
-
|
|
17010
|
-
|
|
17011
|
-
|
|
17012
|
-
|
|
17013
|
-
|
|
17014
|
-
|
|
17015
|
-
|
|
17016
|
-
|
|
17017
|
-
|
|
17018
|
-
|
|
17019
|
-
|
|
17020
|
-
|
|
17021
|
-
|
|
17022
|
-
|
|
17023
|
-
|
|
17024
|
-
|
|
17025
|
-
throw TypeError("Accessors not supported!");
|
|
17026
|
-
if ("value" in Attributes)
|
|
17027
|
-
O2[P2] = Attributes.value;
|
|
17028
|
-
return O2;
|
|
17029
|
-
}, "defineProperty");
|
|
17030
|
-
return _objectDp;
|
|
17031
|
-
}
|
|
17032
|
-
__name(require_objectDp, "require_objectDp");
|
|
16997
|
+
var anObject$3 = _anObject;
|
|
16998
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
16999
|
+
var toPrimitive$2 = _toPrimitive;
|
|
17000
|
+
var dP$2 = Object.defineProperty;
|
|
17001
|
+
_objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
|
|
17002
|
+
anObject$3(O2);
|
|
17003
|
+
P2 = toPrimitive$2(P2, true);
|
|
17004
|
+
anObject$3(Attributes);
|
|
17005
|
+
if (IE8_DOM_DEFINE$1)
|
|
17006
|
+
try {
|
|
17007
|
+
return dP$2(O2, P2, Attributes);
|
|
17008
|
+
} catch (e2) {
|
|
17009
|
+
}
|
|
17010
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
17011
|
+
throw TypeError("Accessors not supported!");
|
|
17012
|
+
if ("value" in Attributes)
|
|
17013
|
+
O2[P2] = Attributes.value;
|
|
17014
|
+
return O2;
|
|
17015
|
+
}, "defineProperty");
|
|
17033
17016
|
var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
17034
17017
|
return {
|
|
17035
17018
|
enumerable: !(bitmap & 1),
|
|
@@ -17038,9 +17021,9 @@ var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
|
17038
17021
|
value
|
|
17039
17022
|
};
|
|
17040
17023
|
}, "_propertyDesc");
|
|
17041
|
-
var dP$1 =
|
|
17024
|
+
var dP$1 = _objectDp;
|
|
17042
17025
|
var createDesc$3 = _propertyDesc;
|
|
17043
|
-
var _hide =
|
|
17026
|
+
var _hide = _descriptors ? function(object2, key, value) {
|
|
17044
17027
|
return dP$1.f(object2, key, createDesc$3(1, value));
|
|
17045
17028
|
} : function(object2, key, value) {
|
|
17046
17029
|
object2[key] = value;
|
|
@@ -17227,7 +17210,15 @@ var _objectKeys = Object.keys || /* @__PURE__ */ __name(function keys(O2) {
|
|
|
17227
17210
|
var _objectGops = {};
|
|
17228
17211
|
_objectGops.f = Object.getOwnPropertySymbols;
|
|
17229
17212
|
var _objectPie = {};
|
|
17230
|
-
|
|
17213
|
+
var hasRequired_objectPie;
|
|
17214
|
+
function require_objectPie() {
|
|
17215
|
+
if (hasRequired_objectPie)
|
|
17216
|
+
return _objectPie;
|
|
17217
|
+
hasRequired_objectPie = 1;
|
|
17218
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
17219
|
+
return _objectPie;
|
|
17220
|
+
}
|
|
17221
|
+
__name(require_objectPie, "require_objectPie");
|
|
17231
17222
|
var defined$1 = _defined;
|
|
17232
17223
|
var _toObject = /* @__PURE__ */ __name(function(it) {
|
|
17233
17224
|
return Object(defined$1(it));
|
|
@@ -17238,10 +17229,10 @@ function require_objectAssign() {
|
|
|
17238
17229
|
if (hasRequired_objectAssign)
|
|
17239
17230
|
return _objectAssign;
|
|
17240
17231
|
hasRequired_objectAssign = 1;
|
|
17241
|
-
var DESCRIPTORS2 =
|
|
17232
|
+
var DESCRIPTORS2 = _descriptors;
|
|
17242
17233
|
var getKeys2 = _objectKeys;
|
|
17243
17234
|
var gOPS2 = _objectGops;
|
|
17244
|
-
var pIE2 =
|
|
17235
|
+
var pIE2 = require_objectPie();
|
|
17245
17236
|
var toObject2 = _toObject;
|
|
17246
17237
|
var IObject2 = require_iobject();
|
|
17247
17238
|
var $assign = Object.assign;
|
|
@@ -17310,10 +17301,10 @@ function require_objectDps() {
|
|
|
17310
17301
|
if (hasRequired_objectDps)
|
|
17311
17302
|
return _objectDps;
|
|
17312
17303
|
hasRequired_objectDps = 1;
|
|
17313
|
-
var dP2 =
|
|
17304
|
+
var dP2 = _objectDp;
|
|
17314
17305
|
var anObject2 = _anObject;
|
|
17315
17306
|
var getKeys2 = _objectKeys;
|
|
17316
|
-
_objectDps =
|
|
17307
|
+
_objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties) {
|
|
17317
17308
|
anObject2(O2);
|
|
17318
17309
|
var keys3 = getKeys2(Properties);
|
|
17319
17310
|
var length = keys3.length;
|
|
@@ -17392,7 +17383,7 @@ var $exports = _wks.exports = function(name) {
|
|
|
17392
17383
|
};
|
|
17393
17384
|
$exports.store = store;
|
|
17394
17385
|
var _wksExports = _wks.exports;
|
|
17395
|
-
var def =
|
|
17386
|
+
var def = _objectDp.f;
|
|
17396
17387
|
var has$9 = _has;
|
|
17397
17388
|
var TAG$1 = _wksExports("toStringTag");
|
|
17398
17389
|
var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
|
|
@@ -17665,7 +17656,7 @@ var ArrayProto = Array.prototype;
|
|
|
17665
17656
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
17666
17657
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
17667
17658
|
}, "_isArrayIter");
|
|
17668
|
-
var $defineProperty$1 =
|
|
17659
|
+
var $defineProperty$1 = _objectDp;
|
|
17669
17660
|
var createDesc$2 = _propertyDesc;
|
|
17670
17661
|
var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
|
|
17671
17662
|
if (index2 in object2)
|
|
@@ -17794,9 +17785,9 @@ var _default$8 = /* @__PURE__ */ __name(function(instance, Constructor) {
|
|
|
17794
17785
|
}
|
|
17795
17786
|
}, "_default$8");
|
|
17796
17787
|
var $export$3 = _export;
|
|
17797
|
-
$export$3($export$3.S + $export$3.F * !
|
|
17788
|
+
$export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
|
|
17798
17789
|
var $Object$2 = _coreExports.Object;
|
|
17799
|
-
var defineProperty$9 = /* @__PURE__ */ __name(function
|
|
17790
|
+
var defineProperty$9 = /* @__PURE__ */ __name(function defineProperty3(it, key, desc) {
|
|
17800
17791
|
return $Object$2.defineProperty(it, key, desc);
|
|
17801
17792
|
}, "defineProperty");
|
|
17802
17793
|
var defineProperty$8 = { "default": defineProperty$9, __esModule: true };
|
|
@@ -17835,7 +17826,7 @@ var _meta = { exports: {} };
|
|
|
17835
17826
|
var META$1 = _uid("meta");
|
|
17836
17827
|
var isObject$c = _isObject;
|
|
17837
17828
|
var has$7 = _has;
|
|
17838
|
-
var setDesc =
|
|
17829
|
+
var setDesc = _objectDp.f;
|
|
17839
17830
|
var id = 0;
|
|
17840
17831
|
var isExtensible = Object.isExtensible || function() {
|
|
17841
17832
|
return true;
|
|
@@ -17888,7 +17879,7 @@ var meta = _meta.exports = {
|
|
|
17888
17879
|
var _metaExports = _meta.exports;
|
|
17889
17880
|
var core = _coreExports;
|
|
17890
17881
|
var wksExt$1 = _wksExt;
|
|
17891
|
-
var defineProperty$7 =
|
|
17882
|
+
var defineProperty$7 = _objectDp.f;
|
|
17892
17883
|
var _wksDefine = /* @__PURE__ */ __name(function(name) {
|
|
17893
17884
|
var $Symbol2 = core.Symbol || (core.Symbol = {});
|
|
17894
17885
|
if (name.charAt(0) != "_" && !(name in $Symbol2))
|
|
@@ -17896,7 +17887,7 @@ var _wksDefine = /* @__PURE__ */ __name(function(name) {
|
|
|
17896
17887
|
}, "_wksDefine");
|
|
17897
17888
|
var getKeys = _objectKeys;
|
|
17898
17889
|
var gOPS$1 = _objectGops;
|
|
17899
|
-
var pIE$1 =
|
|
17890
|
+
var pIE$1 = require_objectPie();
|
|
17900
17891
|
var _enumKeys = /* @__PURE__ */ __name(function(it) {
|
|
17901
17892
|
var result = getKeys(it);
|
|
17902
17893
|
var getSymbols2 = gOPS$1.f;
|
|
@@ -17937,14 +17928,14 @@ _objectGopnExt.f = /* @__PURE__ */ __name(function getOwnPropertyNames2(it) {
|
|
|
17937
17928
|
return windowNames && toString$5.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
|
|
17938
17929
|
}, "getOwnPropertyNames");
|
|
17939
17930
|
var _objectGopd = {};
|
|
17940
|
-
var pIE =
|
|
17931
|
+
var pIE = require_objectPie();
|
|
17941
17932
|
var createDesc$1 = _propertyDesc;
|
|
17942
17933
|
var toIObject$1 = _toIobject;
|
|
17943
17934
|
var toPrimitive$1 = _toPrimitive;
|
|
17944
17935
|
var has$6 = _has;
|
|
17945
17936
|
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
17946
17937
|
var gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
17947
|
-
_objectGopd.f =
|
|
17938
|
+
_objectGopd.f = _descriptors ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor(O2, P2) {
|
|
17948
17939
|
O2 = toIObject$1(O2);
|
|
17949
17940
|
P2 = toPrimitive$1(P2, true);
|
|
17950
17941
|
if (IE8_DOM_DEFINE)
|
|
@@ -17957,7 +17948,7 @@ _objectGopd.f = require_descriptors() ? gOPD$2 : /* @__PURE__ */ __name(function
|
|
|
17957
17948
|
}, "getOwnPropertyDescriptor");
|
|
17958
17949
|
var global$1 = _globalExports;
|
|
17959
17950
|
var has$5 = _has;
|
|
17960
|
-
var DESCRIPTORS =
|
|
17951
|
+
var DESCRIPTORS = _descriptors;
|
|
17961
17952
|
var $export$2 = _export;
|
|
17962
17953
|
var redefine = _redefine;
|
|
17963
17954
|
var META = _metaExports.KEY;
|
|
@@ -17980,7 +17971,7 @@ var _create$1 = require_objectCreate();
|
|
|
17980
17971
|
var gOPNExt = _objectGopnExt;
|
|
17981
17972
|
var $GOPD = _objectGopd;
|
|
17982
17973
|
var $GOPS = _objectGops;
|
|
17983
|
-
var $DP =
|
|
17974
|
+
var $DP = _objectDp;
|
|
17984
17975
|
var $keys$1 = _objectKeys;
|
|
17985
17976
|
var gOPD$1 = $GOPD.f;
|
|
17986
17977
|
var dP = $DP.f;
|
|
@@ -18023,7 +18014,7 @@ var isSymbol$8 = USE_NATIVE && typeof $Symbol.iterator == "symbol" ? function(it
|
|
|
18023
18014
|
} : function(it) {
|
|
18024
18015
|
return it instanceof $Symbol;
|
|
18025
18016
|
};
|
|
18026
|
-
var $defineProperty = /* @__PURE__ */ __name(function
|
|
18017
|
+
var $defineProperty = /* @__PURE__ */ __name(function defineProperty4(it, key, D2) {
|
|
18027
18018
|
if (it === ObjectProto)
|
|
18028
18019
|
$defineProperty(OPSymbols, key, D2);
|
|
18029
18020
|
anObject(it);
|
|
@@ -18117,7 +18108,7 @@ if (!USE_NATIVE) {
|
|
|
18117
18108
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
18118
18109
|
$DP.f = $defineProperty;
|
|
18119
18110
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
18120
|
-
|
|
18111
|
+
require_objectPie().f = $propertyIsEnumerable;
|
|
18121
18112
|
$GOPS.f = $getOwnPropertySymbols;
|
|
18122
18113
|
if (DESCRIPTORS && !_library) {
|
|
18123
18114
|
redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
|
|
@@ -42446,10 +42437,44 @@ const generateToast = /* @__PURE__ */ __name((intent) => (message, options) => {
|
|
|
42446
42437
|
if (intent === core$5.Intent.DANGER) {
|
|
42447
42438
|
console.error("Toastr error message: ", message);
|
|
42448
42439
|
}
|
|
42440
|
+
const maybeAddClearAll = /* @__PURE__ */ __name(() => {
|
|
42441
|
+
const existingClearAllButtons = document.querySelectorAll(`.tg-clear-all-toasts`);
|
|
42442
|
+
existingClearAllButtons.forEach((button) => {
|
|
42443
|
+
button.remove();
|
|
42444
|
+
});
|
|
42445
|
+
const activeToasts = document.querySelectorAll(
|
|
42446
|
+
`.bp3-toast:not(.bp3-toast-exit)`
|
|
42447
|
+
);
|
|
42448
|
+
if (activeToasts.length > 1) {
|
|
42449
|
+
const topToaster = document.querySelector(`.bp3-toast`);
|
|
42450
|
+
if (!topToaster)
|
|
42451
|
+
return;
|
|
42452
|
+
const closeButton = document.createElement("div");
|
|
42453
|
+
closeButton.classList.add(
|
|
42454
|
+
core$5.Classes.BUTTON,
|
|
42455
|
+
core$5.Classes.LARGE,
|
|
42456
|
+
core$5.Classes.INTENT_PRIMARY,
|
|
42457
|
+
"tg-clear-all-toasts"
|
|
42458
|
+
);
|
|
42459
|
+
closeButton.innerText = "Clear all";
|
|
42460
|
+
closeButton.onclick = window.__tgClearAllToasts;
|
|
42461
|
+
closeButton.style.position = "absolute";
|
|
42462
|
+
closeButton.style.right = "-100px";
|
|
42463
|
+
topToaster.appendChild(closeButton);
|
|
42464
|
+
}
|
|
42465
|
+
}, "maybeAddClearAll");
|
|
42449
42466
|
const uniqKey = toastToUse.show(
|
|
42450
42467
|
{
|
|
42451
42468
|
intent,
|
|
42452
42469
|
message,
|
|
42470
|
+
onDismiss: () => {
|
|
42471
|
+
if (options.onDismiss) {
|
|
42472
|
+
options.onDismiss();
|
|
42473
|
+
}
|
|
42474
|
+
setTimeout(() => {
|
|
42475
|
+
maybeAddClearAll();
|
|
42476
|
+
}, 0);
|
|
42477
|
+
},
|
|
42453
42478
|
timeout: options.timeout || updatedTimeout || (!window.Cypress && intent === core$5.Intent.DANGER ? 6e4 : void 0),
|
|
42454
42479
|
action: options.action,
|
|
42455
42480
|
icon: options.icon,
|
|
@@ -42457,8 +42482,14 @@ const generateToast = /* @__PURE__ */ __name((intent) => (message, options) => {
|
|
|
42457
42482
|
},
|
|
42458
42483
|
options.key
|
|
42459
42484
|
);
|
|
42485
|
+
setTimeout(() => {
|
|
42486
|
+
maybeAddClearAll();
|
|
42487
|
+
}, 0);
|
|
42460
42488
|
function clear2() {
|
|
42461
42489
|
toastToUse.dismiss(uniqKey);
|
|
42490
|
+
setTimeout(() => {
|
|
42491
|
+
maybeAddClearAll();
|
|
42492
|
+
}, 0);
|
|
42462
42493
|
}
|
|
42463
42494
|
__name(clear2, "clear");
|
|
42464
42495
|
clear2.key = uniqKey;
|
|
@@ -54071,7 +54102,7 @@ var KNOWN_STATICS = {
|
|
|
54071
54102
|
arguments: true,
|
|
54072
54103
|
arity: true
|
|
54073
54104
|
};
|
|
54074
|
-
var
|
|
54105
|
+
var defineProperty5 = Object.defineProperty;
|
|
54075
54106
|
var getOwnPropertyNames4 = Object.getOwnPropertyNames;
|
|
54076
54107
|
var getOwnPropertySymbols3 = Object.getOwnPropertySymbols;
|
|
54077
54108
|
var getOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;
|
|
@@ -54094,7 +54125,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
|
54094
54125
|
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
|
54095
54126
|
var descriptor2 = getOwnPropertyDescriptor3(sourceComponent, key);
|
|
54096
54127
|
try {
|
|
54097
|
-
|
|
54128
|
+
defineProperty5(targetComponent, key, descriptor2);
|
|
54098
54129
|
} catch (e2) {
|
|
54099
54130
|
}
|
|
54100
54131
|
}
|
package/index.es.js
CHANGED
|
@@ -5495,10 +5495,10 @@ var ownKeys$3 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownK
|
|
|
5495
5495
|
/* istanbul ignore next */
|
|
5496
5496
|
Object.getOwnPropertyNames
|
|
5497
5497
|
);
|
|
5498
|
-
function toPrimitive$
|
|
5498
|
+
function toPrimitive$3(value) {
|
|
5499
5499
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
5500
5500
|
}
|
|
5501
|
-
__name(toPrimitive$
|
|
5501
|
+
__name(toPrimitive$3, "toPrimitive$3");
|
|
5502
5502
|
function hasProp(target, prop) {
|
|
5503
5503
|
return objectPrototype$1.hasOwnProperty.call(target, prop);
|
|
5504
5504
|
}
|
|
@@ -6395,7 +6395,7 @@ var ObservableValue = /* @__PURE__ */ function(_Atom) {
|
|
|
6395
6395
|
return this.name_ + "[" + this.value_ + "]";
|
|
6396
6396
|
}, "toString");
|
|
6397
6397
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6398
|
-
return toPrimitive$
|
|
6398
|
+
return toPrimitive$3(this.get());
|
|
6399
6399
|
}, "valueOf");
|
|
6400
6400
|
_proto[_Symbol$toPrimitive] = function() {
|
|
6401
6401
|
return this.valueOf();
|
|
@@ -6580,7 +6580,7 @@ var ComputedValue = /* @__PURE__ */ function() {
|
|
|
6580
6580
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
6581
6581
|
}, "toString");
|
|
6582
6582
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6583
|
-
return toPrimitive$
|
|
6583
|
+
return toPrimitive$3(this.get());
|
|
6584
6584
|
}, "valueOf");
|
|
6585
6585
|
_proto[_Symbol$toPrimitive$1] = function() {
|
|
6586
6586
|
return this.valueOf();
|
|
@@ -11214,7 +11214,7 @@ lodash.exports;
|
|
|
11214
11214
|
"^" + funcToString2.call(hasOwnProperty2).replace(reRegExpChar2, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
11215
11215
|
);
|
|
11216
11216
|
var Buffer2 = moduleExports2 ? context.Buffer : undefined$12, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe2 = Buffer2 ? Buffer2.allocUnsafe : undefined$12, getPrototype2 = overArg2(Object2.getPrototypeOf, Object2), objectCreate2 = Object2.create, propertyIsEnumerable3 = objectProto2.propertyIsEnumerable, splice3 = arrayProto2.splice, spreadableSymbol2 = Symbol2 ? Symbol2.isConcatSpreadable : undefined$12, symIterator = Symbol2 ? Symbol2.iterator : undefined$12, symToStringTag2 = Symbol2 ? Symbol2.toStringTag : undefined$12;
|
|
11217
|
-
var
|
|
11217
|
+
var defineProperty6 = function() {
|
|
11218
11218
|
try {
|
|
11219
11219
|
var func = getNative2(Object2, "defineProperty");
|
|
11220
11220
|
func({}, "", {});
|
|
@@ -11654,8 +11654,8 @@ lodash.exports;
|
|
|
11654
11654
|
}
|
|
11655
11655
|
__name(baseAssignIn2, "baseAssignIn");
|
|
11656
11656
|
function baseAssignValue2(object2, key, value) {
|
|
11657
|
-
if (key == "__proto__" &&
|
|
11658
|
-
|
|
11657
|
+
if (key == "__proto__" && defineProperty6) {
|
|
11658
|
+
defineProperty6(object2, key, {
|
|
11659
11659
|
"configurable": true,
|
|
11660
11660
|
"enumerable": true,
|
|
11661
11661
|
"value": value,
|
|
@@ -12388,8 +12388,8 @@ lodash.exports;
|
|
|
12388
12388
|
metaMap.set(func, data);
|
|
12389
12389
|
return func;
|
|
12390
12390
|
};
|
|
12391
|
-
var baseSetToString2 = !
|
|
12392
|
-
return
|
|
12391
|
+
var baseSetToString2 = !defineProperty6 ? identity3 : function(func, string2) {
|
|
12392
|
+
return defineProperty6(func, "toString", {
|
|
12393
12393
|
"configurable": true,
|
|
12394
12394
|
"enumerable": false,
|
|
12395
12395
|
"value": constant2(string2),
|
|
@@ -16938,20 +16938,11 @@ var _fails = /* @__PURE__ */ __name(function(exec) {
|
|
|
16938
16938
|
return true;
|
|
16939
16939
|
}
|
|
16940
16940
|
}, "_fails");
|
|
16941
|
-
var _descriptors
|
|
16942
|
-
|
|
16943
|
-
|
|
16944
|
-
|
|
16945
|
-
|
|
16946
|
-
hasRequired_descriptors = 1;
|
|
16947
|
-
_descriptors = !_fails(function() {
|
|
16948
|
-
return Object.defineProperty({}, "a", { get: function() {
|
|
16949
|
-
return 7;
|
|
16950
|
-
} }).a != 7;
|
|
16951
|
-
});
|
|
16952
|
-
return _descriptors;
|
|
16953
|
-
}
|
|
16954
|
-
__name(require_descriptors, "require_descriptors");
|
|
16941
|
+
var _descriptors = !_fails(function() {
|
|
16942
|
+
return Object.defineProperty({}, "a", { get: function() {
|
|
16943
|
+
return 7;
|
|
16944
|
+
} }).a != 7;
|
|
16945
|
+
});
|
|
16955
16946
|
var _domCreate;
|
|
16956
16947
|
var hasRequired_domCreate;
|
|
16957
16948
|
function require_domCreate() {
|
|
@@ -16967,7 +16958,7 @@ function require_domCreate() {
|
|
|
16967
16958
|
return _domCreate;
|
|
16968
16959
|
}
|
|
16969
16960
|
__name(require_domCreate, "require_domCreate");
|
|
16970
|
-
var _ie8DomDefine = !
|
|
16961
|
+
var _ie8DomDefine = !_descriptors && !_fails(function() {
|
|
16971
16962
|
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
16972
16963
|
return 7;
|
|
16973
16964
|
} }).a != 7;
|
|
@@ -16985,33 +16976,25 @@ var _toPrimitive = /* @__PURE__ */ __name(function(it, S2) {
|
|
|
16985
16976
|
return val;
|
|
16986
16977
|
throw TypeError("Can't convert object to primitive value");
|
|
16987
16978
|
}, "_toPrimitive");
|
|
16988
|
-
var
|
|
16989
|
-
|
|
16990
|
-
|
|
16991
|
-
|
|
16992
|
-
|
|
16993
|
-
|
|
16994
|
-
|
|
16995
|
-
|
|
16996
|
-
|
|
16997
|
-
|
|
16998
|
-
|
|
16999
|
-
|
|
17000
|
-
|
|
17001
|
-
|
|
17002
|
-
|
|
17003
|
-
|
|
17004
|
-
|
|
17005
|
-
|
|
17006
|
-
|
|
17007
|
-
throw TypeError("Accessors not supported!");
|
|
17008
|
-
if ("value" in Attributes)
|
|
17009
|
-
O2[P2] = Attributes.value;
|
|
17010
|
-
return O2;
|
|
17011
|
-
}, "defineProperty");
|
|
17012
|
-
return _objectDp;
|
|
17013
|
-
}
|
|
17014
|
-
__name(require_objectDp, "require_objectDp");
|
|
16979
|
+
var anObject$3 = _anObject;
|
|
16980
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
16981
|
+
var toPrimitive$2 = _toPrimitive;
|
|
16982
|
+
var dP$2 = Object.defineProperty;
|
|
16983
|
+
_objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty2(O2, P2, Attributes) {
|
|
16984
|
+
anObject$3(O2);
|
|
16985
|
+
P2 = toPrimitive$2(P2, true);
|
|
16986
|
+
anObject$3(Attributes);
|
|
16987
|
+
if (IE8_DOM_DEFINE$1)
|
|
16988
|
+
try {
|
|
16989
|
+
return dP$2(O2, P2, Attributes);
|
|
16990
|
+
} catch (e2) {
|
|
16991
|
+
}
|
|
16992
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
16993
|
+
throw TypeError("Accessors not supported!");
|
|
16994
|
+
if ("value" in Attributes)
|
|
16995
|
+
O2[P2] = Attributes.value;
|
|
16996
|
+
return O2;
|
|
16997
|
+
}, "defineProperty");
|
|
17015
16998
|
var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
17016
16999
|
return {
|
|
17017
17000
|
enumerable: !(bitmap & 1),
|
|
@@ -17020,9 +17003,9 @@ var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
|
17020
17003
|
value
|
|
17021
17004
|
};
|
|
17022
17005
|
}, "_propertyDesc");
|
|
17023
|
-
var dP$1 =
|
|
17006
|
+
var dP$1 = _objectDp;
|
|
17024
17007
|
var createDesc$3 = _propertyDesc;
|
|
17025
|
-
var _hide =
|
|
17008
|
+
var _hide = _descriptors ? function(object2, key, value) {
|
|
17026
17009
|
return dP$1.f(object2, key, createDesc$3(1, value));
|
|
17027
17010
|
} : function(object2, key, value) {
|
|
17028
17011
|
object2[key] = value;
|
|
@@ -17209,7 +17192,15 @@ var _objectKeys = Object.keys || /* @__PURE__ */ __name(function keys(O2) {
|
|
|
17209
17192
|
var _objectGops = {};
|
|
17210
17193
|
_objectGops.f = Object.getOwnPropertySymbols;
|
|
17211
17194
|
var _objectPie = {};
|
|
17212
|
-
|
|
17195
|
+
var hasRequired_objectPie;
|
|
17196
|
+
function require_objectPie() {
|
|
17197
|
+
if (hasRequired_objectPie)
|
|
17198
|
+
return _objectPie;
|
|
17199
|
+
hasRequired_objectPie = 1;
|
|
17200
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
17201
|
+
return _objectPie;
|
|
17202
|
+
}
|
|
17203
|
+
__name(require_objectPie, "require_objectPie");
|
|
17213
17204
|
var defined$1 = _defined;
|
|
17214
17205
|
var _toObject = /* @__PURE__ */ __name(function(it) {
|
|
17215
17206
|
return Object(defined$1(it));
|
|
@@ -17220,10 +17211,10 @@ function require_objectAssign() {
|
|
|
17220
17211
|
if (hasRequired_objectAssign)
|
|
17221
17212
|
return _objectAssign;
|
|
17222
17213
|
hasRequired_objectAssign = 1;
|
|
17223
|
-
var DESCRIPTORS2 =
|
|
17214
|
+
var DESCRIPTORS2 = _descriptors;
|
|
17224
17215
|
var getKeys2 = _objectKeys;
|
|
17225
17216
|
var gOPS2 = _objectGops;
|
|
17226
|
-
var pIE2 =
|
|
17217
|
+
var pIE2 = require_objectPie();
|
|
17227
17218
|
var toObject2 = _toObject;
|
|
17228
17219
|
var IObject2 = require_iobject();
|
|
17229
17220
|
var $assign = Object.assign;
|
|
@@ -17292,10 +17283,10 @@ function require_objectDps() {
|
|
|
17292
17283
|
if (hasRequired_objectDps)
|
|
17293
17284
|
return _objectDps;
|
|
17294
17285
|
hasRequired_objectDps = 1;
|
|
17295
|
-
var dP2 =
|
|
17286
|
+
var dP2 = _objectDp;
|
|
17296
17287
|
var anObject2 = _anObject;
|
|
17297
17288
|
var getKeys2 = _objectKeys;
|
|
17298
|
-
_objectDps =
|
|
17289
|
+
_objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties2(O2, Properties) {
|
|
17299
17290
|
anObject2(O2);
|
|
17300
17291
|
var keys3 = getKeys2(Properties);
|
|
17301
17292
|
var length = keys3.length;
|
|
@@ -17374,7 +17365,7 @@ var $exports = _wks.exports = function(name) {
|
|
|
17374
17365
|
};
|
|
17375
17366
|
$exports.store = store;
|
|
17376
17367
|
var _wksExports = _wks.exports;
|
|
17377
|
-
var def =
|
|
17368
|
+
var def = _objectDp.f;
|
|
17378
17369
|
var has$9 = _has;
|
|
17379
17370
|
var TAG$1 = _wksExports("toStringTag");
|
|
17380
17371
|
var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
|
|
@@ -17647,7 +17638,7 @@ var ArrayProto = Array.prototype;
|
|
|
17647
17638
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
17648
17639
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
17649
17640
|
}, "_isArrayIter");
|
|
17650
|
-
var $defineProperty$1 =
|
|
17641
|
+
var $defineProperty$1 = _objectDp;
|
|
17651
17642
|
var createDesc$2 = _propertyDesc;
|
|
17652
17643
|
var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
|
|
17653
17644
|
if (index2 in object2)
|
|
@@ -17776,9 +17767,9 @@ var _default$8 = /* @__PURE__ */ __name(function(instance, Constructor) {
|
|
|
17776
17767
|
}
|
|
17777
17768
|
}, "_default$8");
|
|
17778
17769
|
var $export$3 = _export;
|
|
17779
|
-
$export$3($export$3.S + $export$3.F * !
|
|
17770
|
+
$export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
|
|
17780
17771
|
var $Object$2 = _coreExports.Object;
|
|
17781
|
-
var defineProperty$9 = /* @__PURE__ */ __name(function
|
|
17772
|
+
var defineProperty$9 = /* @__PURE__ */ __name(function defineProperty3(it, key, desc) {
|
|
17782
17773
|
return $Object$2.defineProperty(it, key, desc);
|
|
17783
17774
|
}, "defineProperty");
|
|
17784
17775
|
var defineProperty$8 = { "default": defineProperty$9, __esModule: true };
|
|
@@ -17817,7 +17808,7 @@ var _meta = { exports: {} };
|
|
|
17817
17808
|
var META$1 = _uid("meta");
|
|
17818
17809
|
var isObject$c = _isObject;
|
|
17819
17810
|
var has$7 = _has;
|
|
17820
|
-
var setDesc =
|
|
17811
|
+
var setDesc = _objectDp.f;
|
|
17821
17812
|
var id = 0;
|
|
17822
17813
|
var isExtensible = Object.isExtensible || function() {
|
|
17823
17814
|
return true;
|
|
@@ -17870,7 +17861,7 @@ var meta = _meta.exports = {
|
|
|
17870
17861
|
var _metaExports = _meta.exports;
|
|
17871
17862
|
var core = _coreExports;
|
|
17872
17863
|
var wksExt$1 = _wksExt;
|
|
17873
|
-
var defineProperty$7 =
|
|
17864
|
+
var defineProperty$7 = _objectDp.f;
|
|
17874
17865
|
var _wksDefine = /* @__PURE__ */ __name(function(name) {
|
|
17875
17866
|
var $Symbol2 = core.Symbol || (core.Symbol = {});
|
|
17876
17867
|
if (name.charAt(0) != "_" && !(name in $Symbol2))
|
|
@@ -17878,7 +17869,7 @@ var _wksDefine = /* @__PURE__ */ __name(function(name) {
|
|
|
17878
17869
|
}, "_wksDefine");
|
|
17879
17870
|
var getKeys = _objectKeys;
|
|
17880
17871
|
var gOPS$1 = _objectGops;
|
|
17881
|
-
var pIE$1 =
|
|
17872
|
+
var pIE$1 = require_objectPie();
|
|
17882
17873
|
var _enumKeys = /* @__PURE__ */ __name(function(it) {
|
|
17883
17874
|
var result = getKeys(it);
|
|
17884
17875
|
var getSymbols2 = gOPS$1.f;
|
|
@@ -17919,14 +17910,14 @@ _objectGopnExt.f = /* @__PURE__ */ __name(function getOwnPropertyNames2(it) {
|
|
|
17919
17910
|
return windowNames && toString$5.call(it) == "[object Window]" ? getWindowNames(it) : gOPN$1(toIObject$2(it));
|
|
17920
17911
|
}, "getOwnPropertyNames");
|
|
17921
17912
|
var _objectGopd = {};
|
|
17922
|
-
var pIE =
|
|
17913
|
+
var pIE = require_objectPie();
|
|
17923
17914
|
var createDesc$1 = _propertyDesc;
|
|
17924
17915
|
var toIObject$1 = _toIobject;
|
|
17925
17916
|
var toPrimitive$1 = _toPrimitive;
|
|
17926
17917
|
var has$6 = _has;
|
|
17927
17918
|
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
17928
17919
|
var gOPD$2 = Object.getOwnPropertyDescriptor;
|
|
17929
|
-
_objectGopd.f =
|
|
17920
|
+
_objectGopd.f = _descriptors ? gOPD$2 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor(O2, P2) {
|
|
17930
17921
|
O2 = toIObject$1(O2);
|
|
17931
17922
|
P2 = toPrimitive$1(P2, true);
|
|
17932
17923
|
if (IE8_DOM_DEFINE)
|
|
@@ -17939,7 +17930,7 @@ _objectGopd.f = require_descriptors() ? gOPD$2 : /* @__PURE__ */ __name(function
|
|
|
17939
17930
|
}, "getOwnPropertyDescriptor");
|
|
17940
17931
|
var global$1 = _globalExports;
|
|
17941
17932
|
var has$5 = _has;
|
|
17942
|
-
var DESCRIPTORS =
|
|
17933
|
+
var DESCRIPTORS = _descriptors;
|
|
17943
17934
|
var $export$2 = _export;
|
|
17944
17935
|
var redefine = _redefine;
|
|
17945
17936
|
var META = _metaExports.KEY;
|
|
@@ -17962,7 +17953,7 @@ var _create$1 = require_objectCreate();
|
|
|
17962
17953
|
var gOPNExt = _objectGopnExt;
|
|
17963
17954
|
var $GOPD = _objectGopd;
|
|
17964
17955
|
var $GOPS = _objectGops;
|
|
17965
|
-
var $DP =
|
|
17956
|
+
var $DP = _objectDp;
|
|
17966
17957
|
var $keys$1 = _objectKeys;
|
|
17967
17958
|
var gOPD$1 = $GOPD.f;
|
|
17968
17959
|
var dP = $DP.f;
|
|
@@ -18005,7 +17996,7 @@ var isSymbol$8 = USE_NATIVE && typeof $Symbol.iterator == "symbol" ? function(it
|
|
|
18005
17996
|
} : function(it) {
|
|
18006
17997
|
return it instanceof $Symbol;
|
|
18007
17998
|
};
|
|
18008
|
-
var $defineProperty = /* @__PURE__ */ __name(function
|
|
17999
|
+
var $defineProperty = /* @__PURE__ */ __name(function defineProperty4(it, key, D2) {
|
|
18009
18000
|
if (it === ObjectProto)
|
|
18010
18001
|
$defineProperty(OPSymbols, key, D2);
|
|
18011
18002
|
anObject(it);
|
|
@@ -18099,7 +18090,7 @@ if (!USE_NATIVE) {
|
|
|
18099
18090
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
18100
18091
|
$DP.f = $defineProperty;
|
|
18101
18092
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
18102
|
-
|
|
18093
|
+
require_objectPie().f = $propertyIsEnumerable;
|
|
18103
18094
|
$GOPS.f = $getOwnPropertySymbols;
|
|
18104
18095
|
if (DESCRIPTORS && !_library) {
|
|
18105
18096
|
redefine(ObjectProto, "propertyIsEnumerable", $propertyIsEnumerable);
|
|
@@ -42428,10 +42419,44 @@ const generateToast = /* @__PURE__ */ __name((intent) => (message, options) => {
|
|
|
42428
42419
|
if (intent === Intent.DANGER) {
|
|
42429
42420
|
console.error("Toastr error message: ", message);
|
|
42430
42421
|
}
|
|
42422
|
+
const maybeAddClearAll = /* @__PURE__ */ __name(() => {
|
|
42423
|
+
const existingClearAllButtons = document.querySelectorAll(`.tg-clear-all-toasts`);
|
|
42424
|
+
existingClearAllButtons.forEach((button) => {
|
|
42425
|
+
button.remove();
|
|
42426
|
+
});
|
|
42427
|
+
const activeToasts = document.querySelectorAll(
|
|
42428
|
+
`.bp3-toast:not(.bp3-toast-exit)`
|
|
42429
|
+
);
|
|
42430
|
+
if (activeToasts.length > 1) {
|
|
42431
|
+
const topToaster = document.querySelector(`.bp3-toast`);
|
|
42432
|
+
if (!topToaster)
|
|
42433
|
+
return;
|
|
42434
|
+
const closeButton = document.createElement("div");
|
|
42435
|
+
closeButton.classList.add(
|
|
42436
|
+
Classes.BUTTON,
|
|
42437
|
+
Classes.LARGE,
|
|
42438
|
+
Classes.INTENT_PRIMARY,
|
|
42439
|
+
"tg-clear-all-toasts"
|
|
42440
|
+
);
|
|
42441
|
+
closeButton.innerText = "Clear all";
|
|
42442
|
+
closeButton.onclick = window.__tgClearAllToasts;
|
|
42443
|
+
closeButton.style.position = "absolute";
|
|
42444
|
+
closeButton.style.right = "-100px";
|
|
42445
|
+
topToaster.appendChild(closeButton);
|
|
42446
|
+
}
|
|
42447
|
+
}, "maybeAddClearAll");
|
|
42431
42448
|
const uniqKey = toastToUse.show(
|
|
42432
42449
|
{
|
|
42433
42450
|
intent,
|
|
42434
42451
|
message,
|
|
42452
|
+
onDismiss: () => {
|
|
42453
|
+
if (options.onDismiss) {
|
|
42454
|
+
options.onDismiss();
|
|
42455
|
+
}
|
|
42456
|
+
setTimeout(() => {
|
|
42457
|
+
maybeAddClearAll();
|
|
42458
|
+
}, 0);
|
|
42459
|
+
},
|
|
42435
42460
|
timeout: options.timeout || updatedTimeout || (!window.Cypress && intent === Intent.DANGER ? 6e4 : void 0),
|
|
42436
42461
|
action: options.action,
|
|
42437
42462
|
icon: options.icon,
|
|
@@ -42439,8 +42464,14 @@ const generateToast = /* @__PURE__ */ __name((intent) => (message, options) => {
|
|
|
42439
42464
|
},
|
|
42440
42465
|
options.key
|
|
42441
42466
|
);
|
|
42467
|
+
setTimeout(() => {
|
|
42468
|
+
maybeAddClearAll();
|
|
42469
|
+
}, 0);
|
|
42442
42470
|
function clear2() {
|
|
42443
42471
|
toastToUse.dismiss(uniqKey);
|
|
42472
|
+
setTimeout(() => {
|
|
42473
|
+
maybeAddClearAll();
|
|
42474
|
+
}, 0);
|
|
42444
42475
|
}
|
|
42445
42476
|
__name(clear2, "clear");
|
|
42446
42477
|
clear2.key = uniqKey;
|
|
@@ -54053,7 +54084,7 @@ var KNOWN_STATICS = {
|
|
|
54053
54084
|
arguments: true,
|
|
54054
54085
|
arity: true
|
|
54055
54086
|
};
|
|
54056
|
-
var
|
|
54087
|
+
var defineProperty5 = Object.defineProperty;
|
|
54057
54088
|
var getOwnPropertyNames4 = Object.getOwnPropertyNames;
|
|
54058
54089
|
var getOwnPropertySymbols3 = Object.getOwnPropertySymbols;
|
|
54059
54090
|
var getOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;
|
|
@@ -54076,7 +54107,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
|
54076
54107
|
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
|
54077
54108
|
var descriptor2 = getOwnPropertyDescriptor3(sourceComponent, key);
|
|
54078
54109
|
try {
|
|
54079
|
-
|
|
54110
|
+
defineProperty5(targetComponent, key, descriptor2);
|
|
54080
54111
|
} catch (e2) {
|
|
54081
54112
|
}
|
|
54082
54113
|
}
|
package/package.json
CHANGED
package/src/style.css
CHANGED
|
@@ -224,3 +224,21 @@ button:not(:disabled):active {
|
|
|
224
224
|
.bp3-tabs.bp3-vertical > .bp3-tab-panel {
|
|
225
225
|
min-width: 0px;
|
|
226
226
|
}
|
|
227
|
+
.bp3-toast[class*="bp3-intent-"] .bp3-button.tg-clear-all-toasts:hover {
|
|
228
|
+
/* background: blue !important; */
|
|
229
|
+
/* background: unset !important; */
|
|
230
|
+
background-color: #137cbd !important;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/* .bp3-toast .tg-clear-all-toasts {
|
|
234
|
+
background: unset !important;
|
|
235
|
+
color: unset !important;
|
|
236
|
+
padding: unset !important;
|
|
237
|
+
margin: unset !important;
|
|
238
|
+
font-size: unset !important;
|
|
239
|
+
line-height: unset !important;
|
|
240
|
+
border: unset !important;
|
|
241
|
+
box-shadow: unset !important;
|
|
242
|
+
text-align: unset !important;
|
|
243
|
+
cursor: pointer !important;
|
|
244
|
+
} */
|
package/src/toastr.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Position, Toaster, Intent } from "@blueprintjs/core";
|
|
1
|
+
import { Position, Toaster, Intent, Classes } from "@blueprintjs/core";
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
|
|
4
4
|
const TopToaster = Toaster.create({
|
|
@@ -32,10 +32,50 @@ const generateToast = intent => (message, options) => {
|
|
|
32
32
|
if (intent === Intent.DANGER) {
|
|
33
33
|
console.error("Toastr error message: ", message);
|
|
34
34
|
}
|
|
35
|
+
|
|
36
|
+
const maybeAddClearAll = () => {
|
|
37
|
+
// wipe any existing clear all buttons
|
|
38
|
+
const existingClearAllButtons =
|
|
39
|
+
document.querySelectorAll(`.tg-clear-all-toasts`);
|
|
40
|
+
existingClearAllButtons.forEach(button => {
|
|
41
|
+
button.remove();
|
|
42
|
+
});
|
|
43
|
+
const activeToasts = document.querySelectorAll(
|
|
44
|
+
`.bp3-toast:not(.bp3-toast-exit)`
|
|
45
|
+
);
|
|
46
|
+
if (activeToasts.length > 1) {
|
|
47
|
+
// add custom clear all button
|
|
48
|
+
|
|
49
|
+
const topToaster = document.querySelector(`.bp3-toast`);
|
|
50
|
+
if (!topToaster) return;
|
|
51
|
+
const closeButton = document.createElement("div");
|
|
52
|
+
closeButton.classList.add(
|
|
53
|
+
Classes.BUTTON,
|
|
54
|
+
Classes.LARGE,
|
|
55
|
+
Classes.INTENT_PRIMARY,
|
|
56
|
+
"tg-clear-all-toasts"
|
|
57
|
+
);
|
|
58
|
+
closeButton.innerText = "Clear all";
|
|
59
|
+
closeButton.onclick = window.__tgClearAllToasts;
|
|
60
|
+
// position the button to the right of the message
|
|
61
|
+
closeButton.style.position = "absolute";
|
|
62
|
+
closeButton.style.right = "-100px";
|
|
63
|
+
|
|
64
|
+
topToaster.appendChild(closeButton);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
35
67
|
const uniqKey = toastToUse.show(
|
|
36
68
|
{
|
|
37
69
|
intent,
|
|
38
70
|
message,
|
|
71
|
+
onDismiss: () => {
|
|
72
|
+
if (options.onDismiss) {
|
|
73
|
+
options.onDismiss();
|
|
74
|
+
}
|
|
75
|
+
setTimeout(() => {
|
|
76
|
+
maybeAddClearAll();
|
|
77
|
+
}, 0);
|
|
78
|
+
},
|
|
39
79
|
timeout:
|
|
40
80
|
options.timeout ||
|
|
41
81
|
updatedTimeout ||
|
|
@@ -46,8 +86,14 @@ const generateToast = intent => (message, options) => {
|
|
|
46
86
|
},
|
|
47
87
|
options.key
|
|
48
88
|
);
|
|
89
|
+
setTimeout(() => {
|
|
90
|
+
maybeAddClearAll();
|
|
91
|
+
}, 0);
|
|
49
92
|
function clear() {
|
|
50
93
|
toastToUse.dismiss(uniqKey);
|
|
94
|
+
setTimeout(() => {
|
|
95
|
+
maybeAddClearAll();
|
|
96
|
+
}, 0);
|
|
51
97
|
}
|
|
52
98
|
clear.key = uniqKey;
|
|
53
99
|
return clear;
|
package/style.css
CHANGED
|
@@ -9042,7 +9042,24 @@ button:not(:disabled):active {
|
|
|
9042
9042
|
.bp3-tabs.bp3-vertical > .bp3-tab-panel {
|
|
9043
9043
|
min-width: 0px;
|
|
9044
9044
|
}
|
|
9045
|
-
.
|
|
9045
|
+
.bp3-toast[class*="bp3-intent-"] .bp3-button.tg-clear-all-toasts:hover {
|
|
9046
|
+
/* background: blue !important; */
|
|
9047
|
+
/* background: unset !important; */
|
|
9048
|
+
background-color: #137cbd !important;
|
|
9049
|
+
}
|
|
9050
|
+
|
|
9051
|
+
/* .bp3-toast .tg-clear-all-toasts {
|
|
9052
|
+
background: unset !important;
|
|
9053
|
+
color: unset !important;
|
|
9054
|
+
padding: unset !important;
|
|
9055
|
+
margin: unset !important;
|
|
9056
|
+
font-size: unset !important;
|
|
9057
|
+
line-height: unset !important;
|
|
9058
|
+
border: unset !important;
|
|
9059
|
+
box-shadow: unset !important;
|
|
9060
|
+
text-align: unset !important;
|
|
9061
|
+
cursor: pointer !important;
|
|
9062
|
+
} */.tippy-box[data-animation=fade][data-state=hidden]{opacity:0}[data-tippy-root]{max-width:calc(100vw - 10px)}.tippy-box{position:relative;background-color:#333;color:#fff;border-radius:4px;font-size:14px;line-height:1.4;white-space:normal;outline:0;transition-property:transform,visibility,opacity}.tippy-box[data-placement^=top]>.tippy-arrow{bottom:0}.tippy-box[data-placement^=top]>.tippy-arrow:before{bottom:-7px;left:0;border-width:8px 8px 0;border-top-color:initial;transform-origin:center top}.tippy-box[data-placement^=bottom]>.tippy-arrow{top:0}.tippy-box[data-placement^=bottom]>.tippy-arrow:before{top:-7px;left:0;border-width:0 8px 8px;border-bottom-color:initial;transform-origin:center bottom}.tippy-box[data-placement^=left]>.tippy-arrow{right:0}.tippy-box[data-placement^=left]>.tippy-arrow:before{border-width:8px 0 8px 8px;border-left-color:initial;right:-7px;transform-origin:center left}.tippy-box[data-placement^=right]>.tippy-arrow{left:0}.tippy-box[data-placement^=right]>.tippy-arrow:before{left:-7px;border-width:8px 8px 8px 0;border-right-color:initial;transform-origin:center right}.tippy-box[data-inertia][data-state=visible]{transition-timing-function:cubic-bezier(.54,1.5,.38,1.11)}.tippy-arrow{width:16px;height:16px;color:#333}.tippy-arrow:before{content:"";position:absolute;border-color:transparent;border-style:solid}.tippy-content{position:relative;padding:5px 9px;z-index:1}.rg-celleditor-input,
|
|
9046
9063
|
.rg-celleditor input {
|
|
9047
9064
|
border: none;
|
|
9048
9065
|
}
|