@teselagen/ui 0.3.16 → 0.3.18
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 +134 -88
- package/index.es.js +134 -89
- package/package.json +2 -3
- package/src/DialogFooter/index.js +8 -1
- package/src/index.js +1 -0
- package/src/showConfirmationDialog/index.js +44 -12
package/index.cjs.js
CHANGED
|
@@ -30208,6 +30208,8 @@ function DialogFooter({
|
|
|
30208
30208
|
style,
|
|
30209
30209
|
onClick = lodashExports.noop,
|
|
30210
30210
|
secondaryAction,
|
|
30211
|
+
secondaryDisabled,
|
|
30212
|
+
secondaryNotMinimal,
|
|
30211
30213
|
intent = core$5.Intent.PRIMARY,
|
|
30212
30214
|
secondaryIntent,
|
|
30213
30215
|
backText = "Back",
|
|
@@ -30239,7 +30241,8 @@ function DialogFooter({
|
|
|
30239
30241
|
core$5.Button,
|
|
30240
30242
|
{
|
|
30241
30243
|
intent: secondaryIntent,
|
|
30242
|
-
|
|
30244
|
+
disabled: secondaryDisabled,
|
|
30245
|
+
className: (!secondaryNotMinimal ? core$5.Classes.MINIMAL : "") + " " + secondaryClassName,
|
|
30243
30246
|
text: secondaryText,
|
|
30244
30247
|
onClick: secondaryAction || hideModal || function() {
|
|
30245
30248
|
try {
|
|
@@ -30366,17 +30369,17 @@ var _toPrimitive = function (it, S) {
|
|
|
30366
30369
|
throw TypeError("Can't convert object to primitive value");
|
|
30367
30370
|
};
|
|
30368
30371
|
|
|
30369
|
-
var anObject$
|
|
30372
|
+
var anObject$3 = _anObject;
|
|
30370
30373
|
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
30371
30374
|
var toPrimitive$2 = _toPrimitive;
|
|
30372
|
-
var dP$
|
|
30375
|
+
var dP$2 = Object.defineProperty;
|
|
30373
30376
|
|
|
30374
30377
|
_objectDp.f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
30375
|
-
anObject$
|
|
30378
|
+
anObject$3(O);
|
|
30376
30379
|
P = toPrimitive$2(P, true);
|
|
30377
|
-
anObject$
|
|
30380
|
+
anObject$3(Attributes);
|
|
30378
30381
|
if (IE8_DOM_DEFINE$1) try {
|
|
30379
|
-
return dP$
|
|
30382
|
+
return dP$2(O, P, Attributes);
|
|
30380
30383
|
} catch (e) { /* empty */ }
|
|
30381
30384
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
30382
30385
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
@@ -30392,10 +30395,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30392
30395
|
};
|
|
30393
30396
|
};
|
|
30394
30397
|
|
|
30395
|
-
var dP$
|
|
30398
|
+
var dP$1 = _objectDp;
|
|
30396
30399
|
var createDesc$3 = _propertyDesc;
|
|
30397
30400
|
var _hide = _descriptors ? function (object, key, value) {
|
|
30398
|
-
return dP$
|
|
30401
|
+
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30399
30402
|
} : function (object, key, value) {
|
|
30400
30403
|
object[key] = value;
|
|
30401
30404
|
return object;
|
|
@@ -30411,7 +30414,7 @@ var core$3 = _coreExports;
|
|
|
30411
30414
|
var ctx$1 = _ctx;
|
|
30412
30415
|
var hide$2 = _hide;
|
|
30413
30416
|
var has$b = _has;
|
|
30414
|
-
var PROTOTYPE$
|
|
30417
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30415
30418
|
|
|
30416
30419
|
var $export$8 = function (type, name, source) {
|
|
30417
30420
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30421,8 +30424,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30421
30424
|
var IS_BIND = type & $export$8.B;
|
|
30422
30425
|
var IS_WRAP = type & $export$8.W;
|
|
30423
30426
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30424
|
-
var expProto = exports[PROTOTYPE$
|
|
30425
|
-
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$
|
|
30427
|
+
var expProto = exports[PROTOTYPE$1];
|
|
30428
|
+
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$1];
|
|
30426
30429
|
var key, own, out;
|
|
30427
30430
|
if (IS_GLOBAL) source = name;
|
|
30428
30431
|
for (key in source) {
|
|
@@ -30446,7 +30449,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30446
30449
|
} return new C(a, b, c);
|
|
30447
30450
|
} return C.apply(this, arguments);
|
|
30448
30451
|
};
|
|
30449
|
-
F[PROTOTYPE$
|
|
30452
|
+
F[PROTOTYPE$1] = C[PROTOTYPE$1];
|
|
30450
30453
|
return F;
|
|
30451
30454
|
// make static versions for prototype methods
|
|
30452
30455
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30575,14 +30578,14 @@ var _sharedKey = function (key) {
|
|
|
30575
30578
|
var has$a = _has;
|
|
30576
30579
|
var toIObject$4 = _toIobject;
|
|
30577
30580
|
var arrayIndexOf = _arrayIncludes(false);
|
|
30578
|
-
var IE_PROTO$
|
|
30581
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30579
30582
|
|
|
30580
30583
|
var _objectKeysInternal = function (object, names) {
|
|
30581
30584
|
var O = toIObject$4(object);
|
|
30582
30585
|
var i = 0;
|
|
30583
30586
|
var result = [];
|
|
30584
30587
|
var key;
|
|
30585
|
-
for (key in O) if (key != IE_PROTO$
|
|
30588
|
+
for (key in O) if (key != IE_PROTO$1) has$a(O, key) && result.push(key);
|
|
30586
30589
|
// Don't enum bug & hidden keys
|
|
30587
30590
|
while (names.length > i) if (has$a(O, key = names[i++])) {
|
|
30588
30591
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30596,11 +30599,11 @@ var _enumBugKeys = (
|
|
|
30596
30599
|
).split(',');
|
|
30597
30600
|
|
|
30598
30601
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30599
|
-
var $keys$
|
|
30600
|
-
var enumBugKeys
|
|
30602
|
+
var $keys$2 = _objectKeysInternal;
|
|
30603
|
+
var enumBugKeys = _enumBugKeys;
|
|
30601
30604
|
|
|
30602
30605
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30603
|
-
return $keys$
|
|
30606
|
+
return $keys$2(O, enumBugKeys);
|
|
30604
30607
|
};
|
|
30605
30608
|
|
|
30606
30609
|
var _objectGops = {};
|
|
@@ -30707,19 +30710,27 @@ var _iterators = {};
|
|
|
30707
30710
|
|
|
30708
30711
|
var _redefine = _hide;
|
|
30709
30712
|
|
|
30710
|
-
var
|
|
30711
|
-
var
|
|
30712
|
-
var getKeys$1 = _objectKeys;
|
|
30713
|
+
var _objectDps;
|
|
30714
|
+
var hasRequired_objectDps;
|
|
30713
30715
|
|
|
30714
|
-
|
|
30715
|
-
|
|
30716
|
-
|
|
30717
|
-
|
|
30718
|
-
|
|
30719
|
-
|
|
30720
|
-
|
|
30721
|
-
|
|
30722
|
-
|
|
30716
|
+
function require_objectDps () {
|
|
30717
|
+
if (hasRequired_objectDps) return _objectDps;
|
|
30718
|
+
hasRequired_objectDps = 1;
|
|
30719
|
+
var dP = _objectDp;
|
|
30720
|
+
var anObject = _anObject;
|
|
30721
|
+
var getKeys = _objectKeys;
|
|
30722
|
+
|
|
30723
|
+
_objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30724
|
+
anObject(O);
|
|
30725
|
+
var keys = getKeys(Properties);
|
|
30726
|
+
var length = keys.length;
|
|
30727
|
+
var i = 0;
|
|
30728
|
+
var P;
|
|
30729
|
+
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
30730
|
+
return O;
|
|
30731
|
+
};
|
|
30732
|
+
return _objectDps;
|
|
30733
|
+
}
|
|
30723
30734
|
|
|
30724
30735
|
var _html;
|
|
30725
30736
|
var hasRequired_html;
|
|
@@ -30732,47 +30743,55 @@ function require_html () {
|
|
|
30732
30743
|
return _html;
|
|
30733
30744
|
}
|
|
30734
30745
|
|
|
30735
|
-
|
|
30736
|
-
var
|
|
30737
|
-
var dPs = _objectDps;
|
|
30738
|
-
var enumBugKeys = _enumBugKeys;
|
|
30739
|
-
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30740
|
-
var Empty = function () { /* empty */ };
|
|
30741
|
-
var PROTOTYPE$1 = 'prototype';
|
|
30746
|
+
var _objectCreate;
|
|
30747
|
+
var hasRequired_objectCreate;
|
|
30742
30748
|
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30753
|
-
|
|
30754
|
-
|
|
30755
|
-
|
|
30756
|
-
|
|
30757
|
-
|
|
30758
|
-
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
|
|
30766
|
-
|
|
30767
|
-
|
|
30768
|
-
|
|
30769
|
-
|
|
30770
|
-
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30749
|
+
function require_objectCreate () {
|
|
30750
|
+
if (hasRequired_objectCreate) return _objectCreate;
|
|
30751
|
+
hasRequired_objectCreate = 1;
|
|
30752
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30753
|
+
var anObject = _anObject;
|
|
30754
|
+
var dPs = require_objectDps();
|
|
30755
|
+
var enumBugKeys = _enumBugKeys;
|
|
30756
|
+
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30757
|
+
var Empty = function () { /* empty */ };
|
|
30758
|
+
var PROTOTYPE = 'prototype';
|
|
30759
|
+
|
|
30760
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30761
|
+
var createDict = function () {
|
|
30762
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30763
|
+
var iframe = require_domCreate()('iframe');
|
|
30764
|
+
var i = enumBugKeys.length;
|
|
30765
|
+
var lt = '<';
|
|
30766
|
+
var gt = '>';
|
|
30767
|
+
var iframeDocument;
|
|
30768
|
+
iframe.style.display = 'none';
|
|
30769
|
+
require_html().appendChild(iframe);
|
|
30770
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30771
|
+
// createDict = iframe.contentWindow.Object;
|
|
30772
|
+
// html.removeChild(iframe);
|
|
30773
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30774
|
+
iframeDocument.open();
|
|
30775
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30776
|
+
iframeDocument.close();
|
|
30777
|
+
createDict = iframeDocument.F;
|
|
30778
|
+
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30779
|
+
return createDict();
|
|
30780
|
+
};
|
|
30781
|
+
|
|
30782
|
+
_objectCreate = Object.create || function create(O, Properties) {
|
|
30783
|
+
var result;
|
|
30784
|
+
if (O !== null) {
|
|
30785
|
+
Empty[PROTOTYPE] = anObject(O);
|
|
30786
|
+
result = new Empty();
|
|
30787
|
+
Empty[PROTOTYPE] = null;
|
|
30788
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30789
|
+
result[IE_PROTO] = O;
|
|
30790
|
+
} else result = createDict();
|
|
30791
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30792
|
+
};
|
|
30793
|
+
return _objectCreate;
|
|
30794
|
+
}
|
|
30776
30795
|
|
|
30777
30796
|
var _wks = {exports: {}};
|
|
30778
30797
|
|
|
@@ -30798,7 +30817,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30798
30817
|
if (it && !has$9(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30799
30818
|
};
|
|
30800
30819
|
|
|
30801
|
-
var create$3 =
|
|
30820
|
+
var create$3 = require_objectCreate();
|
|
30802
30821
|
var descriptor = _propertyDesc;
|
|
30803
30822
|
var setToStringTag$2 = _setToStringTag;
|
|
30804
30823
|
var IteratorPrototype = {};
|
|
@@ -31372,17 +31391,24 @@ var _objectGopnExt = {};
|
|
|
31372
31391
|
|
|
31373
31392
|
var _objectGopn = {};
|
|
31374
31393
|
|
|
31375
|
-
|
|
31376
|
-
var $keys$2 = _objectKeysInternal;
|
|
31377
|
-
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
|
|
31394
|
+
var hasRequired_objectGopn;
|
|
31378
31395
|
|
|
31379
|
-
|
|
31380
|
-
|
|
31381
|
-
|
|
31396
|
+
function require_objectGopn () {
|
|
31397
|
+
if (hasRequired_objectGopn) return _objectGopn;
|
|
31398
|
+
hasRequired_objectGopn = 1;
|
|
31399
|
+
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
|
31400
|
+
var $keys = _objectKeysInternal;
|
|
31401
|
+
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
|
|
31402
|
+
|
|
31403
|
+
_objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
31404
|
+
return $keys(O, hiddenKeys);
|
|
31405
|
+
};
|
|
31406
|
+
return _objectGopn;
|
|
31407
|
+
}
|
|
31382
31408
|
|
|
31383
31409
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
31384
31410
|
var toIObject$2 = _toIobject;
|
|
31385
|
-
var gOPN$1 =
|
|
31411
|
+
var gOPN$1 = require_objectGopn().f;
|
|
31386
31412
|
var toString$5 = {}.toString;
|
|
31387
31413
|
|
|
31388
31414
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
@@ -31441,7 +31467,7 @@ var toObject$1 = _toObject;
|
|
|
31441
31467
|
var toIObject = _toIobject;
|
|
31442
31468
|
var toPrimitive = _toPrimitive;
|
|
31443
31469
|
var createDesc = _propertyDesc;
|
|
31444
|
-
var _create$1 =
|
|
31470
|
+
var _create$1 = require_objectCreate();
|
|
31445
31471
|
var gOPNExt = _objectGopnExt;
|
|
31446
31472
|
var $GOPD = _objectGopd;
|
|
31447
31473
|
var $GOPS = _objectGops;
|
|
@@ -31569,7 +31595,7 @@ if (!USE_NATIVE) {
|
|
|
31569
31595
|
|
|
31570
31596
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
31571
31597
|
$DP.f = $defineProperty;
|
|
31572
|
-
|
|
31598
|
+
require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
|
|
31573
31599
|
require_objectPie().f = $propertyIsEnumerable;
|
|
31574
31600
|
$GOPS.f = $getOwnPropertySymbols;
|
|
31575
31601
|
|
|
@@ -31751,7 +31777,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31751
31777
|
|
|
31752
31778
|
var $export = _export;
|
|
31753
31779
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31754
|
-
$export($export.S, 'Object', { create:
|
|
31780
|
+
$export($export.S, 'Object', { create: require_objectCreate() });
|
|
31755
31781
|
|
|
31756
31782
|
var $Object$1 = _coreExports.Object;
|
|
31757
31783
|
var create$2 = function create(P, D) {
|
|
@@ -89613,16 +89639,22 @@ class AlertWrapper extends React$1.Component {
|
|
|
89613
89639
|
state = { isOpen: true };
|
|
89614
89640
|
render() {
|
|
89615
89641
|
const {
|
|
89642
|
+
title,
|
|
89616
89643
|
handleClose,
|
|
89617
89644
|
text,
|
|
89618
89645
|
resolve,
|
|
89619
89646
|
noCancelButton,
|
|
89620
89647
|
content,
|
|
89621
89648
|
className,
|
|
89649
|
+
thirdButtonNotMinimal,
|
|
89650
|
+
thirdButtonClassName,
|
|
89622
89651
|
thirdButtonText,
|
|
89623
89652
|
thirdButtonIntent,
|
|
89653
|
+
fourthButtonNotMinimal,
|
|
89654
|
+
fourthButtonClassName,
|
|
89624
89655
|
fourthButtonText,
|
|
89625
89656
|
fourthButtonIntent,
|
|
89657
|
+
handleSubmit,
|
|
89626
89658
|
canEscapeKeyCancel,
|
|
89627
89659
|
confirmButtonText = "OK",
|
|
89628
89660
|
cancelButtonText = "Cancel",
|
|
@@ -89637,19 +89669,28 @@ class AlertWrapper extends React$1.Component {
|
|
|
89637
89669
|
return /* @__PURE__ */ React$1.createElement(
|
|
89638
89670
|
core$5.Dialog,
|
|
89639
89671
|
{
|
|
89640
|
-
|
|
89672
|
+
title,
|
|
89673
|
+
className: (title ? "" : "bp3-alert") + ` ${className || ""}`,
|
|
89641
89674
|
isOpen: this.state.isOpen,
|
|
89642
89675
|
intent,
|
|
89643
89676
|
cancelButtonText,
|
|
89644
89677
|
onCancel: cancelButtonText ? () => doClose(false) : void 0,
|
|
89645
|
-
onConfirm: () => doClose(true),
|
|
89678
|
+
onConfirm: handleSubmit ? handleSubmit((v) => doClose(v)) : () => doClose(true),
|
|
89646
89679
|
...rest,
|
|
89647
89680
|
...noCancelButton && {
|
|
89648
89681
|
onCancel: void 0,
|
|
89649
89682
|
cancelButtonText: void 0
|
|
89650
89683
|
}
|
|
89651
89684
|
},
|
|
89652
|
-
/* @__PURE__ */ React$1.createElement(
|
|
89685
|
+
/* @__PURE__ */ React$1.createElement(
|
|
89686
|
+
"div",
|
|
89687
|
+
{
|
|
89688
|
+
className: title ? "bp3-dialog-body" : "bp3-alert-contents",
|
|
89689
|
+
style: { padding: 5 }
|
|
89690
|
+
},
|
|
89691
|
+
content,
|
|
89692
|
+
text && /* @__PURE__ */ React$1.createElement("div", { style: { marginBottom: 10 } }, text)
|
|
89693
|
+
),
|
|
89653
89694
|
/* @__PURE__ */ React$1.createElement(
|
|
89654
89695
|
DialogFooter,
|
|
89655
89696
|
{
|
|
@@ -89660,23 +89701,27 @@ class AlertWrapper extends React$1.Component {
|
|
|
89660
89701
|
additionalButtons: thirdButtonText || fourthButtonText ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, !!fourthButtonText && /* @__PURE__ */ React$1.createElement(
|
|
89661
89702
|
core$5.Button,
|
|
89662
89703
|
{
|
|
89704
|
+
className: (!fourthButtonNotMinimal ? core$5.Classes.MINIMAL : "") + " " + fourthButtonClassName,
|
|
89663
89705
|
intent: fourthButtonIntent,
|
|
89664
89706
|
text: fourthButtonText,
|
|
89665
|
-
onClick:
|
|
89666
|
-
doClose(
|
|
89667
|
-
|
|
89707
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89708
|
+
(v) => doClose({ ...v, fourthButtonClicked: true })
|
|
89709
|
+
) : () => doClose("fourthButtonClicked")
|
|
89668
89710
|
}
|
|
89669
89711
|
), !!thirdButtonText && /* @__PURE__ */ React$1.createElement(
|
|
89670
89712
|
core$5.Button,
|
|
89671
89713
|
{
|
|
89714
|
+
className: (!thirdButtonNotMinimal ? core$5.Classes.MINIMAL : "") + " " + thirdButtonClassName,
|
|
89672
89715
|
intent: thirdButtonIntent,
|
|
89673
89716
|
text: thirdButtonText,
|
|
89674
|
-
onClick:
|
|
89717
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89718
|
+
(v) => doClose({ ...v, thirdButtonClicked: true })
|
|
89719
|
+
) : () => {
|
|
89675
89720
|
doClose("thirdButtonClicked");
|
|
89676
89721
|
}
|
|
89677
89722
|
}
|
|
89678
89723
|
)) : void 0,
|
|
89679
|
-
containerClassname: "bp3-alert-footer",
|
|
89724
|
+
containerClassname: title ? "" : "bp3-alert-footer",
|
|
89680
89725
|
backText: noCancelButton ? "" : cancelButtonText,
|
|
89681
89726
|
text: confirmButtonText,
|
|
89682
89727
|
intent
|
|
@@ -107030,6 +107075,7 @@ function showDialogOnDocBody(DialogComp, options = {}) {
|
|
|
107030
107075
|
const noop = () => void 0;
|
|
107031
107076
|
|
|
107032
107077
|
exports.AdvancedOptions = AdvancedOptions;
|
|
107078
|
+
exports.AlertWrapper = AlertWrapper;
|
|
107033
107079
|
exports.AssignDefaultsModeContext = AssignDefaultsModeContext;
|
|
107034
107080
|
exports.AsyncValidateFieldSpinner = AsyncValidateFieldSpinner;
|
|
107035
107081
|
exports.BPSelect = BPSelect;
|
package/index.es.js
CHANGED
|
@@ -30187,6 +30187,8 @@ function DialogFooter({
|
|
|
30187
30187
|
style,
|
|
30188
30188
|
onClick = lodashExports.noop,
|
|
30189
30189
|
secondaryAction,
|
|
30190
|
+
secondaryDisabled,
|
|
30191
|
+
secondaryNotMinimal,
|
|
30190
30192
|
intent = Intent.PRIMARY,
|
|
30191
30193
|
secondaryIntent,
|
|
30192
30194
|
backText = "Back",
|
|
@@ -30218,7 +30220,8 @@ function DialogFooter({
|
|
|
30218
30220
|
Button,
|
|
30219
30221
|
{
|
|
30220
30222
|
intent: secondaryIntent,
|
|
30221
|
-
|
|
30223
|
+
disabled: secondaryDisabled,
|
|
30224
|
+
className: (!secondaryNotMinimal ? Classes.MINIMAL : "") + " " + secondaryClassName,
|
|
30222
30225
|
text: secondaryText,
|
|
30223
30226
|
onClick: secondaryAction || hideModal || function() {
|
|
30224
30227
|
try {
|
|
@@ -30345,17 +30348,17 @@ var _toPrimitive = function (it, S) {
|
|
|
30345
30348
|
throw TypeError("Can't convert object to primitive value");
|
|
30346
30349
|
};
|
|
30347
30350
|
|
|
30348
|
-
var anObject$
|
|
30351
|
+
var anObject$3 = _anObject;
|
|
30349
30352
|
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
30350
30353
|
var toPrimitive$2 = _toPrimitive;
|
|
30351
|
-
var dP$
|
|
30354
|
+
var dP$2 = Object.defineProperty;
|
|
30352
30355
|
|
|
30353
30356
|
_objectDp.f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
|
|
30354
|
-
anObject$
|
|
30357
|
+
anObject$3(O);
|
|
30355
30358
|
P = toPrimitive$2(P, true);
|
|
30356
|
-
anObject$
|
|
30359
|
+
anObject$3(Attributes);
|
|
30357
30360
|
if (IE8_DOM_DEFINE$1) try {
|
|
30358
|
-
return dP$
|
|
30361
|
+
return dP$2(O, P, Attributes);
|
|
30359
30362
|
} catch (e) { /* empty */ }
|
|
30360
30363
|
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
|
|
30361
30364
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
@@ -30371,10 +30374,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30371
30374
|
};
|
|
30372
30375
|
};
|
|
30373
30376
|
|
|
30374
|
-
var dP$
|
|
30377
|
+
var dP$1 = _objectDp;
|
|
30375
30378
|
var createDesc$3 = _propertyDesc;
|
|
30376
30379
|
var _hide = _descriptors ? function (object, key, value) {
|
|
30377
|
-
return dP$
|
|
30380
|
+
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30378
30381
|
} : function (object, key, value) {
|
|
30379
30382
|
object[key] = value;
|
|
30380
30383
|
return object;
|
|
@@ -30390,7 +30393,7 @@ var core$3 = _coreExports;
|
|
|
30390
30393
|
var ctx$1 = _ctx;
|
|
30391
30394
|
var hide$2 = _hide;
|
|
30392
30395
|
var has$b = _has;
|
|
30393
|
-
var PROTOTYPE$
|
|
30396
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30394
30397
|
|
|
30395
30398
|
var $export$8 = function (type, name, source) {
|
|
30396
30399
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30400,8 +30403,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30400
30403
|
var IS_BIND = type & $export$8.B;
|
|
30401
30404
|
var IS_WRAP = type & $export$8.W;
|
|
30402
30405
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30403
|
-
var expProto = exports[PROTOTYPE$
|
|
30404
|
-
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$
|
|
30406
|
+
var expProto = exports[PROTOTYPE$1];
|
|
30407
|
+
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$1];
|
|
30405
30408
|
var key, own, out;
|
|
30406
30409
|
if (IS_GLOBAL) source = name;
|
|
30407
30410
|
for (key in source) {
|
|
@@ -30425,7 +30428,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30425
30428
|
} return new C(a, b, c);
|
|
30426
30429
|
} return C.apply(this, arguments);
|
|
30427
30430
|
};
|
|
30428
|
-
F[PROTOTYPE$
|
|
30431
|
+
F[PROTOTYPE$1] = C[PROTOTYPE$1];
|
|
30429
30432
|
return F;
|
|
30430
30433
|
// make static versions for prototype methods
|
|
30431
30434
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30554,14 +30557,14 @@ var _sharedKey = function (key) {
|
|
|
30554
30557
|
var has$a = _has;
|
|
30555
30558
|
var toIObject$4 = _toIobject;
|
|
30556
30559
|
var arrayIndexOf = _arrayIncludes(false);
|
|
30557
|
-
var IE_PROTO$
|
|
30560
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30558
30561
|
|
|
30559
30562
|
var _objectKeysInternal = function (object, names) {
|
|
30560
30563
|
var O = toIObject$4(object);
|
|
30561
30564
|
var i = 0;
|
|
30562
30565
|
var result = [];
|
|
30563
30566
|
var key;
|
|
30564
|
-
for (key in O) if (key != IE_PROTO$
|
|
30567
|
+
for (key in O) if (key != IE_PROTO$1) has$a(O, key) && result.push(key);
|
|
30565
30568
|
// Don't enum bug & hidden keys
|
|
30566
30569
|
while (names.length > i) if (has$a(O, key = names[i++])) {
|
|
30567
30570
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30575,11 +30578,11 @@ var _enumBugKeys = (
|
|
|
30575
30578
|
).split(',');
|
|
30576
30579
|
|
|
30577
30580
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30578
|
-
var $keys$
|
|
30579
|
-
var enumBugKeys
|
|
30581
|
+
var $keys$2 = _objectKeysInternal;
|
|
30582
|
+
var enumBugKeys = _enumBugKeys;
|
|
30580
30583
|
|
|
30581
30584
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30582
|
-
return $keys$
|
|
30585
|
+
return $keys$2(O, enumBugKeys);
|
|
30583
30586
|
};
|
|
30584
30587
|
|
|
30585
30588
|
var _objectGops = {};
|
|
@@ -30686,19 +30689,27 @@ var _iterators = {};
|
|
|
30686
30689
|
|
|
30687
30690
|
var _redefine = _hide;
|
|
30688
30691
|
|
|
30689
|
-
var
|
|
30690
|
-
var
|
|
30691
|
-
var getKeys$1 = _objectKeys;
|
|
30692
|
+
var _objectDps;
|
|
30693
|
+
var hasRequired_objectDps;
|
|
30692
30694
|
|
|
30693
|
-
|
|
30694
|
-
|
|
30695
|
-
|
|
30696
|
-
|
|
30697
|
-
|
|
30698
|
-
|
|
30699
|
-
|
|
30700
|
-
|
|
30701
|
-
|
|
30695
|
+
function require_objectDps () {
|
|
30696
|
+
if (hasRequired_objectDps) return _objectDps;
|
|
30697
|
+
hasRequired_objectDps = 1;
|
|
30698
|
+
var dP = _objectDp;
|
|
30699
|
+
var anObject = _anObject;
|
|
30700
|
+
var getKeys = _objectKeys;
|
|
30701
|
+
|
|
30702
|
+
_objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30703
|
+
anObject(O);
|
|
30704
|
+
var keys = getKeys(Properties);
|
|
30705
|
+
var length = keys.length;
|
|
30706
|
+
var i = 0;
|
|
30707
|
+
var P;
|
|
30708
|
+
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
30709
|
+
return O;
|
|
30710
|
+
};
|
|
30711
|
+
return _objectDps;
|
|
30712
|
+
}
|
|
30702
30713
|
|
|
30703
30714
|
var _html;
|
|
30704
30715
|
var hasRequired_html;
|
|
@@ -30711,47 +30722,55 @@ function require_html () {
|
|
|
30711
30722
|
return _html;
|
|
30712
30723
|
}
|
|
30713
30724
|
|
|
30714
|
-
|
|
30715
|
-
var
|
|
30716
|
-
var dPs = _objectDps;
|
|
30717
|
-
var enumBugKeys = _enumBugKeys;
|
|
30718
|
-
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30719
|
-
var Empty = function () { /* empty */ };
|
|
30720
|
-
var PROTOTYPE$1 = 'prototype';
|
|
30725
|
+
var _objectCreate;
|
|
30726
|
+
var hasRequired_objectCreate;
|
|
30721
30727
|
|
|
30722
|
-
|
|
30723
|
-
|
|
30724
|
-
|
|
30725
|
-
|
|
30726
|
-
|
|
30727
|
-
|
|
30728
|
-
|
|
30729
|
-
|
|
30730
|
-
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
|
|
30734
|
-
|
|
30735
|
-
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
30743
|
-
|
|
30744
|
-
|
|
30745
|
-
|
|
30746
|
-
|
|
30747
|
-
|
|
30748
|
-
|
|
30749
|
-
|
|
30750
|
-
|
|
30751
|
-
|
|
30752
|
-
|
|
30753
|
-
|
|
30754
|
-
|
|
30728
|
+
function require_objectCreate () {
|
|
30729
|
+
if (hasRequired_objectCreate) return _objectCreate;
|
|
30730
|
+
hasRequired_objectCreate = 1;
|
|
30731
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30732
|
+
var anObject = _anObject;
|
|
30733
|
+
var dPs = require_objectDps();
|
|
30734
|
+
var enumBugKeys = _enumBugKeys;
|
|
30735
|
+
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30736
|
+
var Empty = function () { /* empty */ };
|
|
30737
|
+
var PROTOTYPE = 'prototype';
|
|
30738
|
+
|
|
30739
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30740
|
+
var createDict = function () {
|
|
30741
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30742
|
+
var iframe = require_domCreate()('iframe');
|
|
30743
|
+
var i = enumBugKeys.length;
|
|
30744
|
+
var lt = '<';
|
|
30745
|
+
var gt = '>';
|
|
30746
|
+
var iframeDocument;
|
|
30747
|
+
iframe.style.display = 'none';
|
|
30748
|
+
require_html().appendChild(iframe);
|
|
30749
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30750
|
+
// createDict = iframe.contentWindow.Object;
|
|
30751
|
+
// html.removeChild(iframe);
|
|
30752
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30753
|
+
iframeDocument.open();
|
|
30754
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30755
|
+
iframeDocument.close();
|
|
30756
|
+
createDict = iframeDocument.F;
|
|
30757
|
+
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30758
|
+
return createDict();
|
|
30759
|
+
};
|
|
30760
|
+
|
|
30761
|
+
_objectCreate = Object.create || function create(O, Properties) {
|
|
30762
|
+
var result;
|
|
30763
|
+
if (O !== null) {
|
|
30764
|
+
Empty[PROTOTYPE] = anObject(O);
|
|
30765
|
+
result = new Empty();
|
|
30766
|
+
Empty[PROTOTYPE] = null;
|
|
30767
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30768
|
+
result[IE_PROTO] = O;
|
|
30769
|
+
} else result = createDict();
|
|
30770
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30771
|
+
};
|
|
30772
|
+
return _objectCreate;
|
|
30773
|
+
}
|
|
30755
30774
|
|
|
30756
30775
|
var _wks = {exports: {}};
|
|
30757
30776
|
|
|
@@ -30777,7 +30796,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30777
30796
|
if (it && !has$9(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30778
30797
|
};
|
|
30779
30798
|
|
|
30780
|
-
var create$3 =
|
|
30799
|
+
var create$3 = require_objectCreate();
|
|
30781
30800
|
var descriptor = _propertyDesc;
|
|
30782
30801
|
var setToStringTag$2 = _setToStringTag;
|
|
30783
30802
|
var IteratorPrototype = {};
|
|
@@ -31351,17 +31370,24 @@ var _objectGopnExt = {};
|
|
|
31351
31370
|
|
|
31352
31371
|
var _objectGopn = {};
|
|
31353
31372
|
|
|
31354
|
-
|
|
31355
|
-
var $keys$2 = _objectKeysInternal;
|
|
31356
|
-
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
|
|
31373
|
+
var hasRequired_objectGopn;
|
|
31357
31374
|
|
|
31358
|
-
|
|
31359
|
-
|
|
31360
|
-
|
|
31375
|
+
function require_objectGopn () {
|
|
31376
|
+
if (hasRequired_objectGopn) return _objectGopn;
|
|
31377
|
+
hasRequired_objectGopn = 1;
|
|
31378
|
+
// 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
|
|
31379
|
+
var $keys = _objectKeysInternal;
|
|
31380
|
+
var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
|
|
31381
|
+
|
|
31382
|
+
_objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
31383
|
+
return $keys(O, hiddenKeys);
|
|
31384
|
+
};
|
|
31385
|
+
return _objectGopn;
|
|
31386
|
+
}
|
|
31361
31387
|
|
|
31362
31388
|
// fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
|
|
31363
31389
|
var toIObject$2 = _toIobject;
|
|
31364
|
-
var gOPN$1 =
|
|
31390
|
+
var gOPN$1 = require_objectGopn().f;
|
|
31365
31391
|
var toString$5 = {}.toString;
|
|
31366
31392
|
|
|
31367
31393
|
var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
|
|
@@ -31420,7 +31446,7 @@ var toObject$1 = _toObject;
|
|
|
31420
31446
|
var toIObject = _toIobject;
|
|
31421
31447
|
var toPrimitive = _toPrimitive;
|
|
31422
31448
|
var createDesc = _propertyDesc;
|
|
31423
|
-
var _create$1 =
|
|
31449
|
+
var _create$1 = require_objectCreate();
|
|
31424
31450
|
var gOPNExt = _objectGopnExt;
|
|
31425
31451
|
var $GOPD = _objectGopd;
|
|
31426
31452
|
var $GOPS = _objectGops;
|
|
@@ -31548,7 +31574,7 @@ if (!USE_NATIVE) {
|
|
|
31548
31574
|
|
|
31549
31575
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
31550
31576
|
$DP.f = $defineProperty;
|
|
31551
|
-
|
|
31577
|
+
require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
|
|
31552
31578
|
require_objectPie().f = $propertyIsEnumerable;
|
|
31553
31579
|
$GOPS.f = $getOwnPropertySymbols;
|
|
31554
31580
|
|
|
@@ -31730,7 +31756,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31730
31756
|
|
|
31731
31757
|
var $export = _export;
|
|
31732
31758
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31733
|
-
$export($export.S, 'Object', { create:
|
|
31759
|
+
$export($export.S, 'Object', { create: require_objectCreate() });
|
|
31734
31760
|
|
|
31735
31761
|
var $Object$1 = _coreExports.Object;
|
|
31736
31762
|
var create$2 = function create(P, D) {
|
|
@@ -89592,16 +89618,22 @@ class AlertWrapper extends Component {
|
|
|
89592
89618
|
state = { isOpen: true };
|
|
89593
89619
|
render() {
|
|
89594
89620
|
const {
|
|
89621
|
+
title,
|
|
89595
89622
|
handleClose,
|
|
89596
89623
|
text,
|
|
89597
89624
|
resolve,
|
|
89598
89625
|
noCancelButton,
|
|
89599
89626
|
content,
|
|
89600
89627
|
className,
|
|
89628
|
+
thirdButtonNotMinimal,
|
|
89629
|
+
thirdButtonClassName,
|
|
89601
89630
|
thirdButtonText,
|
|
89602
89631
|
thirdButtonIntent,
|
|
89632
|
+
fourthButtonNotMinimal,
|
|
89633
|
+
fourthButtonClassName,
|
|
89603
89634
|
fourthButtonText,
|
|
89604
89635
|
fourthButtonIntent,
|
|
89636
|
+
handleSubmit,
|
|
89605
89637
|
canEscapeKeyCancel,
|
|
89606
89638
|
confirmButtonText = "OK",
|
|
89607
89639
|
cancelButtonText = "Cancel",
|
|
@@ -89616,19 +89648,28 @@ class AlertWrapper extends Component {
|
|
|
89616
89648
|
return /* @__PURE__ */ React__default.createElement(
|
|
89617
89649
|
Dialog,
|
|
89618
89650
|
{
|
|
89619
|
-
|
|
89651
|
+
title,
|
|
89652
|
+
className: (title ? "" : "bp3-alert") + ` ${className || ""}`,
|
|
89620
89653
|
isOpen: this.state.isOpen,
|
|
89621
89654
|
intent,
|
|
89622
89655
|
cancelButtonText,
|
|
89623
89656
|
onCancel: cancelButtonText ? () => doClose(false) : void 0,
|
|
89624
|
-
onConfirm: () => doClose(true),
|
|
89657
|
+
onConfirm: handleSubmit ? handleSubmit((v) => doClose(v)) : () => doClose(true),
|
|
89625
89658
|
...rest,
|
|
89626
89659
|
...noCancelButton && {
|
|
89627
89660
|
onCancel: void 0,
|
|
89628
89661
|
cancelButtonText: void 0
|
|
89629
89662
|
}
|
|
89630
89663
|
},
|
|
89631
|
-
/* @__PURE__ */ React__default.createElement(
|
|
89664
|
+
/* @__PURE__ */ React__default.createElement(
|
|
89665
|
+
"div",
|
|
89666
|
+
{
|
|
89667
|
+
className: title ? "bp3-dialog-body" : "bp3-alert-contents",
|
|
89668
|
+
style: { padding: 5 }
|
|
89669
|
+
},
|
|
89670
|
+
content,
|
|
89671
|
+
text && /* @__PURE__ */ React__default.createElement("div", { style: { marginBottom: 10 } }, text)
|
|
89672
|
+
),
|
|
89632
89673
|
/* @__PURE__ */ React__default.createElement(
|
|
89633
89674
|
DialogFooter,
|
|
89634
89675
|
{
|
|
@@ -89639,23 +89680,27 @@ class AlertWrapper extends Component {
|
|
|
89639
89680
|
additionalButtons: thirdButtonText || fourthButtonText ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !!fourthButtonText && /* @__PURE__ */ React__default.createElement(
|
|
89640
89681
|
Button,
|
|
89641
89682
|
{
|
|
89683
|
+
className: (!fourthButtonNotMinimal ? Classes.MINIMAL : "") + " " + fourthButtonClassName,
|
|
89642
89684
|
intent: fourthButtonIntent,
|
|
89643
89685
|
text: fourthButtonText,
|
|
89644
|
-
onClick:
|
|
89645
|
-
doClose(
|
|
89646
|
-
|
|
89686
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89687
|
+
(v) => doClose({ ...v, fourthButtonClicked: true })
|
|
89688
|
+
) : () => doClose("fourthButtonClicked")
|
|
89647
89689
|
}
|
|
89648
89690
|
), !!thirdButtonText && /* @__PURE__ */ React__default.createElement(
|
|
89649
89691
|
Button,
|
|
89650
89692
|
{
|
|
89693
|
+
className: (!thirdButtonNotMinimal ? Classes.MINIMAL : "") + " " + thirdButtonClassName,
|
|
89651
89694
|
intent: thirdButtonIntent,
|
|
89652
89695
|
text: thirdButtonText,
|
|
89653
|
-
onClick:
|
|
89696
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89697
|
+
(v) => doClose({ ...v, thirdButtonClicked: true })
|
|
89698
|
+
) : () => {
|
|
89654
89699
|
doClose("thirdButtonClicked");
|
|
89655
89700
|
}
|
|
89656
89701
|
}
|
|
89657
89702
|
)) : void 0,
|
|
89658
|
-
containerClassname: "bp3-alert-footer",
|
|
89703
|
+
containerClassname: title ? "" : "bp3-alert-footer",
|
|
89659
89704
|
backText: noCancelButton ? "" : cancelButtonText,
|
|
89660
89705
|
text: confirmButtonText,
|
|
89661
89706
|
intent
|
|
@@ -107008,4 +107053,4 @@ function showDialogOnDocBody(DialogComp, options = {}) {
|
|
|
107008
107053
|
|
|
107009
107054
|
const noop = () => void 0;
|
|
107010
107055
|
|
|
107011
|
-
export { AdvancedOptions, AssignDefaultsModeContext, AsyncValidateFieldSpinner, BPSelect, BlueprintError, CheckboxField, CmdButton, CmdCheckbox, CmdDiv, CmdSwitch, CollapsibleCard, WrappedDT as DataTable, DateInputField, DateRangeInputField, DialogFooter, DropdownButton, DynamicMenuItem, EditableTextField, EnhancedMenuItem, FileUploadField, FillWindow, HotkeysDialog, InfoHelper, InputField, IntentText, Loading, MenuBar, MenuItemWithTooltip, NumericInputField, ConnectedPagingTool as PagingTool, PromptUnsavedChanges, RadioGroupField, ReactColorField, ReactSelectField, RenderBlueprintInput, RenderReactColorPicker, ResizableDraggableDialog, ScrollToTop, SelectField, SuggestField, SwitchField, TableFormTrackerContext, TextareaField, TgSelect$1 as TgSelect, Timeline, TimelineEvent, Uploader, WorkflowDefaultParamsContext, adHoc, basicHandleActionsWithFullState, bluntFeatureIcon, cardDetailsIcon, combineReducers as combineReducersWithFullState, comboToLabel, commandMenuEnhancer, createCommandBarMenu, createCommandMenu, createDynamicBarMenu, createDynamicMenu, createMenu, designIcon, dnaIcon, doesSearchValMatchText, driveIcon, featureIcon, fieldRequired, flaskIcon, generateField, genericCommandFactory, getCommandHandlers, getCommandHotkeyHandlers, getCommandHotkeys, getCurrentParamsFromUrl, getHotkeyProps, getIdOrCodeOrIndex, getKeyedTagsAndTagOptions, getSelectedEntities, getStringFromReactComponent, getTagColorStyle, getTagProps, getTagsAndTagOptions, getTextFromEl, hotkeysById, inventoryIcon, keyboardIcon, mergeSchemas, moleculeIcon, noop, onBlurHelper, onEnterHelper, onEnterOrBlurHelper, orfIcon, popoverOverflowModifiers, proteinIcon, pure as pureNoFunc, removeDuplicatesIcon, renderBlueprintCheckbox, renderBlueprintDateInput, renderBlueprintDateRangeInput, renderBlueprintEditableText, renderBlueprintNumericInput, renderBlueprintRadioGroup, renderBlueprintSwitch, renderBlueprintTextarea, renderFileUpload, renderReactSelect, renderSelect, renderSuggest, renderSuggest_old, rerenderOnWindowResize, reverseFeatureIcon, setCurrentParamsOnUrl, sharedDriveIcon, showAppSpinner, showCommandContextMenu, showConfirmationDialog, showContextMenu, showDialogOnDocBody, showProgressToast, strainIcon, tgFormValues, tg_modalState, tickMenuEnhancer, tubeIcon, useDialog, withAbstractWrapper, withCommand, withDialog, WithField as withField, WithFields as withFields, withHotkeys, withSelectTableRecords, withSelectedEntities, withStore, withTableParams, workflowDefaultParamsObj, workflowIcon, workqueueIcon, wrapDialog };
|
|
107056
|
+
export { AdvancedOptions, AlertWrapper, AssignDefaultsModeContext, AsyncValidateFieldSpinner, BPSelect, BlueprintError, CheckboxField, CmdButton, CmdCheckbox, CmdDiv, CmdSwitch, CollapsibleCard, WrappedDT as DataTable, DateInputField, DateRangeInputField, DialogFooter, DropdownButton, DynamicMenuItem, EditableTextField, EnhancedMenuItem, FileUploadField, FillWindow, HotkeysDialog, InfoHelper, InputField, IntentText, Loading, MenuBar, MenuItemWithTooltip, NumericInputField, ConnectedPagingTool as PagingTool, PromptUnsavedChanges, RadioGroupField, ReactColorField, ReactSelectField, RenderBlueprintInput, RenderReactColorPicker, ResizableDraggableDialog, ScrollToTop, SelectField, SuggestField, SwitchField, TableFormTrackerContext, TextareaField, TgSelect$1 as TgSelect, Timeline, TimelineEvent, Uploader, WorkflowDefaultParamsContext, adHoc, basicHandleActionsWithFullState, bluntFeatureIcon, cardDetailsIcon, combineReducers as combineReducersWithFullState, comboToLabel, commandMenuEnhancer, createCommandBarMenu, createCommandMenu, createDynamicBarMenu, createDynamicMenu, createMenu, designIcon, dnaIcon, doesSearchValMatchText, driveIcon, featureIcon, fieldRequired, flaskIcon, generateField, genericCommandFactory, getCommandHandlers, getCommandHotkeyHandlers, getCommandHotkeys, getCurrentParamsFromUrl, getHotkeyProps, getIdOrCodeOrIndex, getKeyedTagsAndTagOptions, getSelectedEntities, getStringFromReactComponent, getTagColorStyle, getTagProps, getTagsAndTagOptions, getTextFromEl, hotkeysById, inventoryIcon, keyboardIcon, mergeSchemas, moleculeIcon, noop, onBlurHelper, onEnterHelper, onEnterOrBlurHelper, orfIcon, popoverOverflowModifiers, proteinIcon, pure as pureNoFunc, removeDuplicatesIcon, renderBlueprintCheckbox, renderBlueprintDateInput, renderBlueprintDateRangeInput, renderBlueprintEditableText, renderBlueprintNumericInput, renderBlueprintRadioGroup, renderBlueprintSwitch, renderBlueprintTextarea, renderFileUpload, renderReactSelect, renderSelect, renderSuggest, renderSuggest_old, rerenderOnWindowResize, reverseFeatureIcon, setCurrentParamsOnUrl, sharedDriveIcon, showAppSpinner, showCommandContextMenu, showConfirmationDialog, showContextMenu, showDialogOnDocBody, showProgressToast, strainIcon, tgFormValues, tg_modalState, tickMenuEnhancer, tubeIcon, useDialog, withAbstractWrapper, withCommand, withDialog, WithField as withField, WithFields as withFields, withHotkeys, withSelectTableRecords, withSelectedEntities, withStore, withTableParams, workflowDefaultParamsObj, workflowIcon, workqueueIcon, wrapDialog };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ui",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.18",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
13
|
"@teselagen/file-utils": "0.3.9",
|
|
14
|
-
"@teselagen/bounce-loader": "0.3.
|
|
14
|
+
"@teselagen/bounce-loader": "0.3.11",
|
|
15
15
|
"@blueprintjs/core": "3.52.0",
|
|
16
16
|
"@blueprintjs/datetime": "3.23.19",
|
|
17
17
|
"@blueprintjs/icons": "3.33.0",
|
|
@@ -58,6 +58,5 @@
|
|
|
58
58
|
"use-deep-compare-effect": "^1.6.1",
|
|
59
59
|
"write-excel-file": "^1.4.25"
|
|
60
60
|
},
|
|
61
|
-
"type": "module",
|
|
62
61
|
"license": "MIT"
|
|
63
62
|
}
|
|
@@ -13,6 +13,8 @@ function DialogFooter({
|
|
|
13
13
|
style,
|
|
14
14
|
onClick = noop,
|
|
15
15
|
secondaryAction,
|
|
16
|
+
secondaryDisabled,
|
|
17
|
+
secondaryNotMinimal,
|
|
16
18
|
intent = Intent.PRIMARY,
|
|
17
19
|
secondaryIntent,
|
|
18
20
|
backText = "Back",
|
|
@@ -43,7 +45,12 @@ function DialogFooter({
|
|
|
43
45
|
{!noCancel && (
|
|
44
46
|
<Button
|
|
45
47
|
intent={secondaryIntent}
|
|
46
|
-
|
|
48
|
+
disabled={secondaryDisabled}
|
|
49
|
+
className={
|
|
50
|
+
(!secondaryNotMinimal ? Classes.MINIMAL : "") +
|
|
51
|
+
" " +
|
|
52
|
+
secondaryClassName
|
|
53
|
+
}
|
|
47
54
|
text={secondaryText}
|
|
48
55
|
onClick={
|
|
49
56
|
secondaryAction ||
|
package/src/index.js
CHANGED
|
@@ -53,6 +53,7 @@ export * from "./FormComponents";
|
|
|
53
53
|
export * from "./useDialog";
|
|
54
54
|
|
|
55
55
|
export * from "./toastr";
|
|
56
|
+
export * from "./showConfirmationDialog";
|
|
56
57
|
export * from "./utils/handlerHelpers";
|
|
57
58
|
export * from "./customIcons";
|
|
58
59
|
export { default as basicHandleActionsWithFullState } from "./utils/basicHandleActionsWithFullState";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from "react";
|
|
2
|
-
import { Button, Dialog, Intent } from "@blueprintjs/core";
|
|
2
|
+
import { Button, Classes, Dialog, Intent } from "@blueprintjs/core";
|
|
3
3
|
import { renderOnDoc } from "../utils/renderOnDoc";
|
|
4
4
|
import DialogFooter from "../DialogFooter";
|
|
5
5
|
|
|
@@ -28,20 +28,26 @@ export default function showConfirmationDialog(opts) {
|
|
|
28
28
|
});
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
class AlertWrapper extends Component {
|
|
31
|
+
export class AlertWrapper extends Component {
|
|
32
32
|
state = { isOpen: true };
|
|
33
33
|
render() {
|
|
34
34
|
const {
|
|
35
|
+
title,
|
|
35
36
|
handleClose,
|
|
36
37
|
text,
|
|
37
38
|
resolve,
|
|
38
39
|
noCancelButton,
|
|
39
40
|
content,
|
|
40
41
|
className,
|
|
42
|
+
thirdButtonNotMinimal,
|
|
43
|
+
thirdButtonClassName,
|
|
41
44
|
thirdButtonText,
|
|
42
45
|
thirdButtonIntent,
|
|
46
|
+
fourthButtonNotMinimal,
|
|
47
|
+
fourthButtonClassName,
|
|
43
48
|
fourthButtonText,
|
|
44
49
|
fourthButtonIntent,
|
|
50
|
+
handleSubmit,
|
|
45
51
|
canEscapeKeyCancel,
|
|
46
52
|
confirmButtonText = "OK",
|
|
47
53
|
cancelButtonText = "Cancel",
|
|
@@ -55,19 +61,25 @@ class AlertWrapper extends Component {
|
|
|
55
61
|
};
|
|
56
62
|
return (
|
|
57
63
|
<Dialog
|
|
58
|
-
|
|
64
|
+
title={title}
|
|
65
|
+
className={(title ? "" : "bp3-alert") + ` ${className || ""}`}
|
|
59
66
|
isOpen={this.state.isOpen}
|
|
60
67
|
intent={intent}
|
|
61
68
|
cancelButtonText={cancelButtonText}
|
|
62
69
|
onCancel={cancelButtonText ? () => doClose(false) : undefined}
|
|
63
|
-
onConfirm={
|
|
70
|
+
onConfirm={
|
|
71
|
+
handleSubmit ? handleSubmit(v => doClose(v)) : () => doClose(true)
|
|
72
|
+
}
|
|
64
73
|
{...rest}
|
|
65
74
|
{...(noCancelButton && {
|
|
66
75
|
onCancel: undefined,
|
|
67
76
|
cancelButtonText: undefined
|
|
68
77
|
})}
|
|
69
78
|
>
|
|
70
|
-
<div
|
|
79
|
+
<div
|
|
80
|
+
className={title ? "bp3-dialog-body" : "bp3-alert-contents"}
|
|
81
|
+
style={{ padding: 5 }}
|
|
82
|
+
>
|
|
71
83
|
{content}
|
|
72
84
|
{text && <div style={{ marginBottom: 10 }}>{text}</div>}
|
|
73
85
|
</div>
|
|
@@ -84,25 +96,45 @@ class AlertWrapper extends Component {
|
|
|
84
96
|
<React.Fragment>
|
|
85
97
|
{!!fourthButtonText && (
|
|
86
98
|
<Button
|
|
99
|
+
className={
|
|
100
|
+
(!fourthButtonNotMinimal ? Classes.MINIMAL : "") +
|
|
101
|
+
" " +
|
|
102
|
+
fourthButtonClassName
|
|
103
|
+
}
|
|
87
104
|
intent={fourthButtonIntent}
|
|
88
105
|
text={fourthButtonText}
|
|
89
|
-
onClick={
|
|
90
|
-
|
|
91
|
-
|
|
106
|
+
onClick={
|
|
107
|
+
handleSubmit
|
|
108
|
+
? handleSubmit(v =>
|
|
109
|
+
doClose({ ...v, fourthButtonClicked: true })
|
|
110
|
+
)
|
|
111
|
+
: () => doClose("fourthButtonClicked")
|
|
112
|
+
}
|
|
92
113
|
></Button>
|
|
93
114
|
)}
|
|
94
115
|
{!!thirdButtonText && (
|
|
95
116
|
<Button
|
|
117
|
+
className={
|
|
118
|
+
(!thirdButtonNotMinimal ? Classes.MINIMAL : "") +
|
|
119
|
+
" " +
|
|
120
|
+
thirdButtonClassName
|
|
121
|
+
}
|
|
96
122
|
intent={thirdButtonIntent}
|
|
97
123
|
text={thirdButtonText}
|
|
98
|
-
onClick={
|
|
99
|
-
|
|
100
|
-
|
|
124
|
+
onClick={
|
|
125
|
+
handleSubmit
|
|
126
|
+
? handleSubmit(v =>
|
|
127
|
+
doClose({ ...v, thirdButtonClicked: true })
|
|
128
|
+
)
|
|
129
|
+
: () => {
|
|
130
|
+
doClose("thirdButtonClicked");
|
|
131
|
+
}
|
|
132
|
+
}
|
|
101
133
|
></Button>
|
|
102
134
|
)}
|
|
103
135
|
</React.Fragment>
|
|
104
136
|
) : undefined,
|
|
105
|
-
containerClassname: "bp3-alert-footer",
|
|
137
|
+
containerClassname: title ? "" : "bp3-alert-footer",
|
|
106
138
|
backText: noCancelButton ? "" : cancelButtonText,
|
|
107
139
|
text: confirmButtonText,
|
|
108
140
|
intent
|