@teselagen/ui 0.3.17 → 0.3.19
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 +146 -92
- package/index.es.js +146 -93
- package/package.json +1 -1
- package/src/DialogFooter/index.js +8 -1
- package/src/FormComponents/index.js +3 -3
- package/src/TgSelect/index.js +2 -2
- 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 {
|
|
@@ -30415,10 +30418,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30415
30418
|
};
|
|
30416
30419
|
};
|
|
30417
30420
|
|
|
30418
|
-
var dP$
|
|
30421
|
+
var dP$1 = require_objectDp();
|
|
30419
30422
|
var createDesc$3 = _propertyDesc;
|
|
30420
30423
|
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30421
|
-
return dP$
|
|
30424
|
+
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30422
30425
|
} : function (object, key, value) {
|
|
30423
30426
|
object[key] = value;
|
|
30424
30427
|
return object;
|
|
@@ -30434,7 +30437,7 @@ var core$3 = _coreExports;
|
|
|
30434
30437
|
var ctx$1 = _ctx;
|
|
30435
30438
|
var hide$2 = _hide;
|
|
30436
30439
|
var has$b = _has;
|
|
30437
|
-
var PROTOTYPE$
|
|
30440
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30438
30441
|
|
|
30439
30442
|
var $export$8 = function (type, name, source) {
|
|
30440
30443
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30444,8 +30447,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30444
30447
|
var IS_BIND = type & $export$8.B;
|
|
30445
30448
|
var IS_WRAP = type & $export$8.W;
|
|
30446
30449
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30447
|
-
var expProto = exports[PROTOTYPE$
|
|
30448
|
-
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$
|
|
30450
|
+
var expProto = exports[PROTOTYPE$1];
|
|
30451
|
+
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$1];
|
|
30449
30452
|
var key, own, out;
|
|
30450
30453
|
if (IS_GLOBAL) source = name;
|
|
30451
30454
|
for (key in source) {
|
|
@@ -30469,7 +30472,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30469
30472
|
} return new C(a, b, c);
|
|
30470
30473
|
} return C.apply(this, arguments);
|
|
30471
30474
|
};
|
|
30472
|
-
F[PROTOTYPE$
|
|
30475
|
+
F[PROTOTYPE$1] = C[PROTOTYPE$1];
|
|
30473
30476
|
return F;
|
|
30474
30477
|
// make static versions for prototype methods
|
|
30475
30478
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30498,12 +30501,20 @@ var _cof = function (it) {
|
|
|
30498
30501
|
return toString$6.call(it).slice(8, -1);
|
|
30499
30502
|
};
|
|
30500
30503
|
|
|
30501
|
-
|
|
30502
|
-
var
|
|
30503
|
-
|
|
30504
|
-
|
|
30505
|
-
|
|
30506
|
-
|
|
30504
|
+
var _iobject;
|
|
30505
|
+
var hasRequired_iobject;
|
|
30506
|
+
|
|
30507
|
+
function require_iobject () {
|
|
30508
|
+
if (hasRequired_iobject) return _iobject;
|
|
30509
|
+
hasRequired_iobject = 1;
|
|
30510
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30511
|
+
var cof = _cof;
|
|
30512
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
30513
|
+
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30514
|
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
30515
|
+
};
|
|
30516
|
+
return _iobject;
|
|
30517
|
+
}
|
|
30507
30518
|
|
|
30508
30519
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
30509
30520
|
var _defined = function (it) {
|
|
@@ -30512,7 +30523,7 @@ var _defined = function (it) {
|
|
|
30512
30523
|
};
|
|
30513
30524
|
|
|
30514
30525
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
30515
|
-
var IObject =
|
|
30526
|
+
var IObject = require_iobject();
|
|
30516
30527
|
var defined$2 = _defined;
|
|
30517
30528
|
var _toIobject = function (it) {
|
|
30518
30529
|
return IObject(defined$2(it));
|
|
@@ -30598,14 +30609,14 @@ var _sharedKey = function (key) {
|
|
|
30598
30609
|
var has$a = _has;
|
|
30599
30610
|
var toIObject$4 = _toIobject;
|
|
30600
30611
|
var arrayIndexOf = _arrayIncludes(false);
|
|
30601
|
-
var IE_PROTO$
|
|
30612
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30602
30613
|
|
|
30603
30614
|
var _objectKeysInternal = function (object, names) {
|
|
30604
30615
|
var O = toIObject$4(object);
|
|
30605
30616
|
var i = 0;
|
|
30606
30617
|
var result = [];
|
|
30607
30618
|
var key;
|
|
30608
|
-
for (key in O) if (key != IE_PROTO$
|
|
30619
|
+
for (key in O) if (key != IE_PROTO$1) has$a(O, key) && result.push(key);
|
|
30609
30620
|
// Don't enum bug & hidden keys
|
|
30610
30621
|
while (names.length > i) if (has$a(O, key = names[i++])) {
|
|
30611
30622
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30620,10 +30631,10 @@ var _enumBugKeys = (
|
|
|
30620
30631
|
|
|
30621
30632
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30622
30633
|
var $keys$3 = _objectKeysInternal;
|
|
30623
|
-
var enumBugKeys
|
|
30634
|
+
var enumBugKeys = _enumBugKeys;
|
|
30624
30635
|
|
|
30625
30636
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30626
|
-
return $keys$3(O, enumBugKeys
|
|
30637
|
+
return $keys$3(O, enumBugKeys);
|
|
30627
30638
|
};
|
|
30628
30639
|
|
|
30629
30640
|
var _objectGops = {};
|
|
@@ -30632,7 +30643,14 @@ _objectGops.f = Object.getOwnPropertySymbols;
|
|
|
30632
30643
|
|
|
30633
30644
|
var _objectPie = {};
|
|
30634
30645
|
|
|
30635
|
-
|
|
30646
|
+
var hasRequired_objectPie;
|
|
30647
|
+
|
|
30648
|
+
function require_objectPie () {
|
|
30649
|
+
if (hasRequired_objectPie) return _objectPie;
|
|
30650
|
+
hasRequired_objectPie = 1;
|
|
30651
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
30652
|
+
return _objectPie;
|
|
30653
|
+
}
|
|
30636
30654
|
|
|
30637
30655
|
// 7.1.13 ToObject(argument)
|
|
30638
30656
|
var defined$1 = _defined;
|
|
@@ -30650,9 +30668,9 @@ function require_objectAssign () {
|
|
|
30650
30668
|
var DESCRIPTORS = require_descriptors();
|
|
30651
30669
|
var getKeys = _objectKeys;
|
|
30652
30670
|
var gOPS = _objectGops;
|
|
30653
|
-
var pIE =
|
|
30671
|
+
var pIE = require_objectPie();
|
|
30654
30672
|
var toObject = _toObject;
|
|
30655
|
-
var IObject =
|
|
30673
|
+
var IObject = require_iobject();
|
|
30656
30674
|
var $assign = Object.assign;
|
|
30657
30675
|
|
|
30658
30676
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -30723,19 +30741,27 @@ var _iterators = {};
|
|
|
30723
30741
|
|
|
30724
30742
|
var _redefine = _hide;
|
|
30725
30743
|
|
|
30726
|
-
var
|
|
30727
|
-
var
|
|
30728
|
-
var getKeys$1 = _objectKeys;
|
|
30744
|
+
var _objectDps;
|
|
30745
|
+
var hasRequired_objectDps;
|
|
30729
30746
|
|
|
30730
|
-
|
|
30731
|
-
|
|
30732
|
-
|
|
30733
|
-
|
|
30734
|
-
|
|
30735
|
-
|
|
30736
|
-
|
|
30737
|
-
|
|
30738
|
-
|
|
30747
|
+
function require_objectDps () {
|
|
30748
|
+
if (hasRequired_objectDps) return _objectDps;
|
|
30749
|
+
hasRequired_objectDps = 1;
|
|
30750
|
+
var dP = require_objectDp();
|
|
30751
|
+
var anObject = _anObject;
|
|
30752
|
+
var getKeys = _objectKeys;
|
|
30753
|
+
|
|
30754
|
+
_objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30755
|
+
anObject(O);
|
|
30756
|
+
var keys = getKeys(Properties);
|
|
30757
|
+
var length = keys.length;
|
|
30758
|
+
var i = 0;
|
|
30759
|
+
var P;
|
|
30760
|
+
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
30761
|
+
return O;
|
|
30762
|
+
};
|
|
30763
|
+
return _objectDps;
|
|
30764
|
+
}
|
|
30739
30765
|
|
|
30740
30766
|
var _html;
|
|
30741
30767
|
var hasRequired_html;
|
|
@@ -30748,47 +30774,55 @@ function require_html () {
|
|
|
30748
30774
|
return _html;
|
|
30749
30775
|
}
|
|
30750
30776
|
|
|
30751
|
-
|
|
30752
|
-
var
|
|
30753
|
-
var dPs = _objectDps;
|
|
30754
|
-
var enumBugKeys = _enumBugKeys;
|
|
30755
|
-
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30756
|
-
var Empty = function () { /* empty */ };
|
|
30757
|
-
var PROTOTYPE$1 = 'prototype';
|
|
30777
|
+
var _objectCreate;
|
|
30778
|
+
var hasRequired_objectCreate;
|
|
30758
30779
|
|
|
30759
|
-
|
|
30760
|
-
|
|
30761
|
-
|
|
30762
|
-
|
|
30763
|
-
|
|
30764
|
-
|
|
30765
|
-
|
|
30766
|
-
|
|
30767
|
-
|
|
30768
|
-
|
|
30769
|
-
|
|
30770
|
-
|
|
30771
|
-
|
|
30772
|
-
|
|
30773
|
-
|
|
30774
|
-
|
|
30775
|
-
|
|
30776
|
-
|
|
30777
|
-
|
|
30778
|
-
|
|
30779
|
-
|
|
30780
|
-
|
|
30781
|
-
|
|
30782
|
-
|
|
30783
|
-
|
|
30784
|
-
|
|
30785
|
-
|
|
30786
|
-
|
|
30787
|
-
|
|
30788
|
-
|
|
30789
|
-
|
|
30790
|
-
|
|
30791
|
-
|
|
30780
|
+
function require_objectCreate () {
|
|
30781
|
+
if (hasRequired_objectCreate) return _objectCreate;
|
|
30782
|
+
hasRequired_objectCreate = 1;
|
|
30783
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30784
|
+
var anObject = _anObject;
|
|
30785
|
+
var dPs = require_objectDps();
|
|
30786
|
+
var enumBugKeys = _enumBugKeys;
|
|
30787
|
+
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30788
|
+
var Empty = function () { /* empty */ };
|
|
30789
|
+
var PROTOTYPE = 'prototype';
|
|
30790
|
+
|
|
30791
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30792
|
+
var createDict = function () {
|
|
30793
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30794
|
+
var iframe = require_domCreate()('iframe');
|
|
30795
|
+
var i = enumBugKeys.length;
|
|
30796
|
+
var lt = '<';
|
|
30797
|
+
var gt = '>';
|
|
30798
|
+
var iframeDocument;
|
|
30799
|
+
iframe.style.display = 'none';
|
|
30800
|
+
require_html().appendChild(iframe);
|
|
30801
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30802
|
+
// createDict = iframe.contentWindow.Object;
|
|
30803
|
+
// html.removeChild(iframe);
|
|
30804
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30805
|
+
iframeDocument.open();
|
|
30806
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30807
|
+
iframeDocument.close();
|
|
30808
|
+
createDict = iframeDocument.F;
|
|
30809
|
+
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30810
|
+
return createDict();
|
|
30811
|
+
};
|
|
30812
|
+
|
|
30813
|
+
_objectCreate = Object.create || function create(O, Properties) {
|
|
30814
|
+
var result;
|
|
30815
|
+
if (O !== null) {
|
|
30816
|
+
Empty[PROTOTYPE] = anObject(O);
|
|
30817
|
+
result = new Empty();
|
|
30818
|
+
Empty[PROTOTYPE] = null;
|
|
30819
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30820
|
+
result[IE_PROTO] = O;
|
|
30821
|
+
} else result = createDict();
|
|
30822
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30823
|
+
};
|
|
30824
|
+
return _objectCreate;
|
|
30825
|
+
}
|
|
30792
30826
|
|
|
30793
30827
|
var _wks = {exports: {}};
|
|
30794
30828
|
|
|
@@ -30814,7 +30848,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30814
30848
|
if (it && !has$9(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30815
30849
|
};
|
|
30816
30850
|
|
|
30817
|
-
var create$3 =
|
|
30851
|
+
var create$3 = require_objectCreate();
|
|
30818
30852
|
var descriptor = _propertyDesc;
|
|
30819
30853
|
var setToStringTag$2 = _setToStringTag;
|
|
30820
30854
|
var IteratorPrototype = {};
|
|
@@ -31365,7 +31399,7 @@ var _wksDefine = function (name) {
|
|
|
31365
31399
|
// all enumerable object keys, includes symbols
|
|
31366
31400
|
var getKeys = _objectKeys;
|
|
31367
31401
|
var gOPS$1 = _objectGops;
|
|
31368
|
-
var pIE$1 =
|
|
31402
|
+
var pIE$1 = require_objectPie();
|
|
31369
31403
|
var _enumKeys = function (it) {
|
|
31370
31404
|
var result = getKeys(it);
|
|
31371
31405
|
var getSymbols = gOPS$1.f;
|
|
@@ -31418,7 +31452,7 @@ _objectGopnExt.f = function getOwnPropertyNames(it) {
|
|
|
31418
31452
|
|
|
31419
31453
|
var _objectGopd = {};
|
|
31420
31454
|
|
|
31421
|
-
var pIE =
|
|
31455
|
+
var pIE = require_objectPie();
|
|
31422
31456
|
var createDesc$1 = _propertyDesc;
|
|
31423
31457
|
var toIObject$1 = _toIobject;
|
|
31424
31458
|
var toPrimitive$1 = _toPrimitive;
|
|
@@ -31457,7 +31491,7 @@ var toObject$1 = _toObject;
|
|
|
31457
31491
|
var toIObject = _toIobject;
|
|
31458
31492
|
var toPrimitive = _toPrimitive;
|
|
31459
31493
|
var createDesc = _propertyDesc;
|
|
31460
|
-
var _create$1 =
|
|
31494
|
+
var _create$1 = require_objectCreate();
|
|
31461
31495
|
var gOPNExt = _objectGopnExt;
|
|
31462
31496
|
var $GOPD = _objectGopd;
|
|
31463
31497
|
var $GOPS = _objectGops;
|
|
@@ -31586,7 +31620,7 @@ if (!USE_NATIVE) {
|
|
|
31586
31620
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
31587
31621
|
$DP.f = $defineProperty;
|
|
31588
31622
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
31589
|
-
|
|
31623
|
+
require_objectPie().f = $propertyIsEnumerable;
|
|
31590
31624
|
$GOPS.f = $getOwnPropertySymbols;
|
|
31591
31625
|
|
|
31592
31626
|
if (DESCRIPTORS && !_library) {
|
|
@@ -31767,7 +31801,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31767
31801
|
|
|
31768
31802
|
var $export = _export;
|
|
31769
31803
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31770
|
-
$export($export.S, 'Object', { create:
|
|
31804
|
+
$export($export.S, 'Object', { create: require_objectCreate() });
|
|
31771
31805
|
|
|
31772
31806
|
var $Object$1 = _coreExports.Object;
|
|
31773
31807
|
var create$2 = function create(P, D) {
|
|
@@ -66194,7 +66228,7 @@ class TgSelect extends React$1.Component {
|
|
|
66194
66228
|
if (isTagSelect && item.value && item.value.includes && item.value.includes(":")) {
|
|
66195
66229
|
const topLevelId = item.value.split(":")[0];
|
|
66196
66230
|
valArray = valArray.filter((val) => {
|
|
66197
|
-
if (val
|
|
66231
|
+
if (val?.value && val.value.includes && val.value.includes(":")) {
|
|
66198
66232
|
const valId = val.value.split(":")[0];
|
|
66199
66233
|
if (valId === topLevelId) {
|
|
66200
66234
|
return false;
|
|
@@ -66282,7 +66316,7 @@ class TgSelect extends React$1.Component {
|
|
|
66282
66316
|
getTagProps = (label) => {
|
|
66283
66317
|
const { multi, value = [], disabled: _disabled } = this.props;
|
|
66284
66318
|
const val = Array.isArray(value) ? value : [value];
|
|
66285
|
-
const matchingVal = val.find((op) => op
|
|
66319
|
+
const matchingVal = val.find((op) => op?.label === label);
|
|
66286
66320
|
const disabled = _disabled || matchingVal && matchingVal.disabled;
|
|
66287
66321
|
const className = matchingVal && matchingVal.className;
|
|
66288
66322
|
return {
|
|
@@ -83472,7 +83506,7 @@ const renderReactSelect = (props) => {
|
|
|
83472
83506
|
}
|
|
83473
83507
|
} else if (Array.isArray(value)) {
|
|
83474
83508
|
valueToUse = value.map((val) => {
|
|
83475
|
-
if (val
|
|
83509
|
+
if (val?.userCreated) {
|
|
83476
83510
|
return {
|
|
83477
83511
|
label: val.value,
|
|
83478
83512
|
value: val
|
|
@@ -83499,10 +83533,10 @@ const renderReactSelect = (props) => {
|
|
|
83499
83533
|
let valToPass;
|
|
83500
83534
|
if (Array.isArray(valOrVals)) {
|
|
83501
83535
|
valToPass = valOrVals.map(function(val) {
|
|
83502
|
-
if (val
|
|
83536
|
+
if (val?.userCreated) {
|
|
83503
83537
|
return val;
|
|
83504
83538
|
}
|
|
83505
|
-
return val
|
|
83539
|
+
return val?.value;
|
|
83506
83540
|
});
|
|
83507
83541
|
} else if (valOrVals) {
|
|
83508
83542
|
if (valOrVals.userCreated) {
|
|
@@ -89629,16 +89663,22 @@ class AlertWrapper extends React$1.Component {
|
|
|
89629
89663
|
state = { isOpen: true };
|
|
89630
89664
|
render() {
|
|
89631
89665
|
const {
|
|
89666
|
+
title,
|
|
89632
89667
|
handleClose,
|
|
89633
89668
|
text,
|
|
89634
89669
|
resolve,
|
|
89635
89670
|
noCancelButton,
|
|
89636
89671
|
content,
|
|
89637
89672
|
className,
|
|
89673
|
+
thirdButtonNotMinimal,
|
|
89674
|
+
thirdButtonClassName,
|
|
89638
89675
|
thirdButtonText,
|
|
89639
89676
|
thirdButtonIntent,
|
|
89677
|
+
fourthButtonNotMinimal,
|
|
89678
|
+
fourthButtonClassName,
|
|
89640
89679
|
fourthButtonText,
|
|
89641
89680
|
fourthButtonIntent,
|
|
89681
|
+
handleSubmit,
|
|
89642
89682
|
canEscapeKeyCancel,
|
|
89643
89683
|
confirmButtonText = "OK",
|
|
89644
89684
|
cancelButtonText = "Cancel",
|
|
@@ -89653,19 +89693,28 @@ class AlertWrapper extends React$1.Component {
|
|
|
89653
89693
|
return /* @__PURE__ */ React$1.createElement(
|
|
89654
89694
|
core$5.Dialog,
|
|
89655
89695
|
{
|
|
89656
|
-
|
|
89696
|
+
title,
|
|
89697
|
+
className: (title ? "" : "bp3-alert") + ` ${className || ""}`,
|
|
89657
89698
|
isOpen: this.state.isOpen,
|
|
89658
89699
|
intent,
|
|
89659
89700
|
cancelButtonText,
|
|
89660
89701
|
onCancel: cancelButtonText ? () => doClose(false) : void 0,
|
|
89661
|
-
onConfirm: () => doClose(true),
|
|
89702
|
+
onConfirm: handleSubmit ? handleSubmit((v) => doClose(v)) : () => doClose(true),
|
|
89662
89703
|
...rest,
|
|
89663
89704
|
...noCancelButton && {
|
|
89664
89705
|
onCancel: void 0,
|
|
89665
89706
|
cancelButtonText: void 0
|
|
89666
89707
|
}
|
|
89667
89708
|
},
|
|
89668
|
-
/* @__PURE__ */ React$1.createElement(
|
|
89709
|
+
/* @__PURE__ */ React$1.createElement(
|
|
89710
|
+
"div",
|
|
89711
|
+
{
|
|
89712
|
+
className: title ? "bp3-dialog-body" : "bp3-alert-contents",
|
|
89713
|
+
style: { padding: 5 }
|
|
89714
|
+
},
|
|
89715
|
+
content,
|
|
89716
|
+
text && /* @__PURE__ */ React$1.createElement("div", { style: { marginBottom: 10 } }, text)
|
|
89717
|
+
),
|
|
89669
89718
|
/* @__PURE__ */ React$1.createElement(
|
|
89670
89719
|
DialogFooter,
|
|
89671
89720
|
{
|
|
@@ -89676,23 +89725,27 @@ class AlertWrapper extends React$1.Component {
|
|
|
89676
89725
|
additionalButtons: thirdButtonText || fourthButtonText ? /* @__PURE__ */ React$1.createElement(React$1.Fragment, null, !!fourthButtonText && /* @__PURE__ */ React$1.createElement(
|
|
89677
89726
|
core$5.Button,
|
|
89678
89727
|
{
|
|
89728
|
+
className: (!fourthButtonNotMinimal ? core$5.Classes.MINIMAL : "") + " " + fourthButtonClassName,
|
|
89679
89729
|
intent: fourthButtonIntent,
|
|
89680
89730
|
text: fourthButtonText,
|
|
89681
|
-
onClick:
|
|
89682
|
-
doClose(
|
|
89683
|
-
|
|
89731
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89732
|
+
(v) => doClose({ ...v, fourthButtonClicked: true })
|
|
89733
|
+
) : () => doClose("fourthButtonClicked")
|
|
89684
89734
|
}
|
|
89685
89735
|
), !!thirdButtonText && /* @__PURE__ */ React$1.createElement(
|
|
89686
89736
|
core$5.Button,
|
|
89687
89737
|
{
|
|
89738
|
+
className: (!thirdButtonNotMinimal ? core$5.Classes.MINIMAL : "") + " " + thirdButtonClassName,
|
|
89688
89739
|
intent: thirdButtonIntent,
|
|
89689
89740
|
text: thirdButtonText,
|
|
89690
|
-
onClick:
|
|
89741
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89742
|
+
(v) => doClose({ ...v, thirdButtonClicked: true })
|
|
89743
|
+
) : () => {
|
|
89691
89744
|
doClose("thirdButtonClicked");
|
|
89692
89745
|
}
|
|
89693
89746
|
}
|
|
89694
89747
|
)) : void 0,
|
|
89695
|
-
containerClassname: "bp3-alert-footer",
|
|
89748
|
+
containerClassname: title ? "" : "bp3-alert-footer",
|
|
89696
89749
|
backText: noCancelButton ? "" : cancelButtonText,
|
|
89697
89750
|
text: confirmButtonText,
|
|
89698
89751
|
intent
|
|
@@ -107046,6 +107099,7 @@ function showDialogOnDocBody(DialogComp, options = {}) {
|
|
|
107046
107099
|
const noop = () => void 0;
|
|
107047
107100
|
|
|
107048
107101
|
exports.AdvancedOptions = AdvancedOptions;
|
|
107102
|
+
exports.AlertWrapper = AlertWrapper;
|
|
107049
107103
|
exports.AssignDefaultsModeContext = AssignDefaultsModeContext;
|
|
107050
107104
|
exports.AsyncValidateFieldSpinner = AsyncValidateFieldSpinner;
|
|
107051
107105
|
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 {
|
|
@@ -30394,10 +30397,10 @@ var _propertyDesc = function (bitmap, value) {
|
|
|
30394
30397
|
};
|
|
30395
30398
|
};
|
|
30396
30399
|
|
|
30397
|
-
var dP$
|
|
30400
|
+
var dP$1 = require_objectDp();
|
|
30398
30401
|
var createDesc$3 = _propertyDesc;
|
|
30399
30402
|
var _hide = require_descriptors() ? function (object, key, value) {
|
|
30400
|
-
return dP$
|
|
30403
|
+
return dP$1.f(object, key, createDesc$3(1, value));
|
|
30401
30404
|
} : function (object, key, value) {
|
|
30402
30405
|
object[key] = value;
|
|
30403
30406
|
return object;
|
|
@@ -30413,7 +30416,7 @@ var core$3 = _coreExports;
|
|
|
30413
30416
|
var ctx$1 = _ctx;
|
|
30414
30417
|
var hide$2 = _hide;
|
|
30415
30418
|
var has$b = _has;
|
|
30416
|
-
var PROTOTYPE$
|
|
30419
|
+
var PROTOTYPE$1 = 'prototype';
|
|
30417
30420
|
|
|
30418
30421
|
var $export$8 = function (type, name, source) {
|
|
30419
30422
|
var IS_FORCED = type & $export$8.F;
|
|
@@ -30423,8 +30426,8 @@ var $export$8 = function (type, name, source) {
|
|
|
30423
30426
|
var IS_BIND = type & $export$8.B;
|
|
30424
30427
|
var IS_WRAP = type & $export$8.W;
|
|
30425
30428
|
var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
|
|
30426
|
-
var expProto = exports[PROTOTYPE$
|
|
30427
|
-
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$
|
|
30429
|
+
var expProto = exports[PROTOTYPE$1];
|
|
30430
|
+
var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$1];
|
|
30428
30431
|
var key, own, out;
|
|
30429
30432
|
if (IS_GLOBAL) source = name;
|
|
30430
30433
|
for (key in source) {
|
|
@@ -30448,7 +30451,7 @@ var $export$8 = function (type, name, source) {
|
|
|
30448
30451
|
} return new C(a, b, c);
|
|
30449
30452
|
} return C.apply(this, arguments);
|
|
30450
30453
|
};
|
|
30451
|
-
F[PROTOTYPE$
|
|
30454
|
+
F[PROTOTYPE$1] = C[PROTOTYPE$1];
|
|
30452
30455
|
return F;
|
|
30453
30456
|
// make static versions for prototype methods
|
|
30454
30457
|
})(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
|
|
@@ -30477,12 +30480,20 @@ var _cof = function (it) {
|
|
|
30477
30480
|
return toString$6.call(it).slice(8, -1);
|
|
30478
30481
|
};
|
|
30479
30482
|
|
|
30480
|
-
|
|
30481
|
-
var
|
|
30482
|
-
|
|
30483
|
-
|
|
30484
|
-
|
|
30485
|
-
|
|
30483
|
+
var _iobject;
|
|
30484
|
+
var hasRequired_iobject;
|
|
30485
|
+
|
|
30486
|
+
function require_iobject () {
|
|
30487
|
+
if (hasRequired_iobject) return _iobject;
|
|
30488
|
+
hasRequired_iobject = 1;
|
|
30489
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
30490
|
+
var cof = _cof;
|
|
30491
|
+
// eslint-disable-next-line no-prototype-builtins
|
|
30492
|
+
_iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
|
|
30493
|
+
return cof(it) == 'String' ? it.split('') : Object(it);
|
|
30494
|
+
};
|
|
30495
|
+
return _iobject;
|
|
30496
|
+
}
|
|
30486
30497
|
|
|
30487
30498
|
// 7.2.1 RequireObjectCoercible(argument)
|
|
30488
30499
|
var _defined = function (it) {
|
|
@@ -30491,7 +30502,7 @@ var _defined = function (it) {
|
|
|
30491
30502
|
};
|
|
30492
30503
|
|
|
30493
30504
|
// to indexed object, toObject with fallback for non-array-like ES3 strings
|
|
30494
|
-
var IObject =
|
|
30505
|
+
var IObject = require_iobject();
|
|
30495
30506
|
var defined$2 = _defined;
|
|
30496
30507
|
var _toIobject = function (it) {
|
|
30497
30508
|
return IObject(defined$2(it));
|
|
@@ -30577,14 +30588,14 @@ var _sharedKey = function (key) {
|
|
|
30577
30588
|
var has$a = _has;
|
|
30578
30589
|
var toIObject$4 = _toIobject;
|
|
30579
30590
|
var arrayIndexOf = _arrayIncludes(false);
|
|
30580
|
-
var IE_PROTO$
|
|
30591
|
+
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30581
30592
|
|
|
30582
30593
|
var _objectKeysInternal = function (object, names) {
|
|
30583
30594
|
var O = toIObject$4(object);
|
|
30584
30595
|
var i = 0;
|
|
30585
30596
|
var result = [];
|
|
30586
30597
|
var key;
|
|
30587
|
-
for (key in O) if (key != IE_PROTO$
|
|
30598
|
+
for (key in O) if (key != IE_PROTO$1) has$a(O, key) && result.push(key);
|
|
30588
30599
|
// Don't enum bug & hidden keys
|
|
30589
30600
|
while (names.length > i) if (has$a(O, key = names[i++])) {
|
|
30590
30601
|
~arrayIndexOf(result, key) || result.push(key);
|
|
@@ -30599,10 +30610,10 @@ var _enumBugKeys = (
|
|
|
30599
30610
|
|
|
30600
30611
|
// 19.1.2.14 / 15.2.3.14 Object.keys(O)
|
|
30601
30612
|
var $keys$3 = _objectKeysInternal;
|
|
30602
|
-
var enumBugKeys
|
|
30613
|
+
var enumBugKeys = _enumBugKeys;
|
|
30603
30614
|
|
|
30604
30615
|
var _objectKeys = Object.keys || function keys(O) {
|
|
30605
|
-
return $keys$3(O, enumBugKeys
|
|
30616
|
+
return $keys$3(O, enumBugKeys);
|
|
30606
30617
|
};
|
|
30607
30618
|
|
|
30608
30619
|
var _objectGops = {};
|
|
@@ -30611,7 +30622,14 @@ _objectGops.f = Object.getOwnPropertySymbols;
|
|
|
30611
30622
|
|
|
30612
30623
|
var _objectPie = {};
|
|
30613
30624
|
|
|
30614
|
-
|
|
30625
|
+
var hasRequired_objectPie;
|
|
30626
|
+
|
|
30627
|
+
function require_objectPie () {
|
|
30628
|
+
if (hasRequired_objectPie) return _objectPie;
|
|
30629
|
+
hasRequired_objectPie = 1;
|
|
30630
|
+
_objectPie.f = {}.propertyIsEnumerable;
|
|
30631
|
+
return _objectPie;
|
|
30632
|
+
}
|
|
30615
30633
|
|
|
30616
30634
|
// 7.1.13 ToObject(argument)
|
|
30617
30635
|
var defined$1 = _defined;
|
|
@@ -30629,9 +30647,9 @@ function require_objectAssign () {
|
|
|
30629
30647
|
var DESCRIPTORS = require_descriptors();
|
|
30630
30648
|
var getKeys = _objectKeys;
|
|
30631
30649
|
var gOPS = _objectGops;
|
|
30632
|
-
var pIE =
|
|
30650
|
+
var pIE = require_objectPie();
|
|
30633
30651
|
var toObject = _toObject;
|
|
30634
|
-
var IObject =
|
|
30652
|
+
var IObject = require_iobject();
|
|
30635
30653
|
var $assign = Object.assign;
|
|
30636
30654
|
|
|
30637
30655
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
@@ -30702,19 +30720,27 @@ var _iterators = {};
|
|
|
30702
30720
|
|
|
30703
30721
|
var _redefine = _hide;
|
|
30704
30722
|
|
|
30705
|
-
var
|
|
30706
|
-
var
|
|
30707
|
-
var getKeys$1 = _objectKeys;
|
|
30723
|
+
var _objectDps;
|
|
30724
|
+
var hasRequired_objectDps;
|
|
30708
30725
|
|
|
30709
|
-
|
|
30710
|
-
|
|
30711
|
-
|
|
30712
|
-
|
|
30713
|
-
|
|
30714
|
-
|
|
30715
|
-
|
|
30716
|
-
|
|
30717
|
-
|
|
30726
|
+
function require_objectDps () {
|
|
30727
|
+
if (hasRequired_objectDps) return _objectDps;
|
|
30728
|
+
hasRequired_objectDps = 1;
|
|
30729
|
+
var dP = require_objectDp();
|
|
30730
|
+
var anObject = _anObject;
|
|
30731
|
+
var getKeys = _objectKeys;
|
|
30732
|
+
|
|
30733
|
+
_objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
30734
|
+
anObject(O);
|
|
30735
|
+
var keys = getKeys(Properties);
|
|
30736
|
+
var length = keys.length;
|
|
30737
|
+
var i = 0;
|
|
30738
|
+
var P;
|
|
30739
|
+
while (length > i) dP.f(O, P = keys[i++], Properties[P]);
|
|
30740
|
+
return O;
|
|
30741
|
+
};
|
|
30742
|
+
return _objectDps;
|
|
30743
|
+
}
|
|
30718
30744
|
|
|
30719
30745
|
var _html;
|
|
30720
30746
|
var hasRequired_html;
|
|
@@ -30727,47 +30753,55 @@ function require_html () {
|
|
|
30727
30753
|
return _html;
|
|
30728
30754
|
}
|
|
30729
30755
|
|
|
30730
|
-
|
|
30731
|
-
var
|
|
30732
|
-
var dPs = _objectDps;
|
|
30733
|
-
var enumBugKeys = _enumBugKeys;
|
|
30734
|
-
var IE_PROTO$1 = _sharedKey('IE_PROTO');
|
|
30735
|
-
var Empty = function () { /* empty */ };
|
|
30736
|
-
var PROTOTYPE$1 = 'prototype';
|
|
30756
|
+
var _objectCreate;
|
|
30757
|
+
var hasRequired_objectCreate;
|
|
30737
30758
|
|
|
30738
|
-
|
|
30739
|
-
|
|
30740
|
-
|
|
30741
|
-
|
|
30742
|
-
|
|
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
|
-
|
|
30759
|
+
function require_objectCreate () {
|
|
30760
|
+
if (hasRequired_objectCreate) return _objectCreate;
|
|
30761
|
+
hasRequired_objectCreate = 1;
|
|
30762
|
+
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
30763
|
+
var anObject = _anObject;
|
|
30764
|
+
var dPs = require_objectDps();
|
|
30765
|
+
var enumBugKeys = _enumBugKeys;
|
|
30766
|
+
var IE_PROTO = _sharedKey('IE_PROTO');
|
|
30767
|
+
var Empty = function () { /* empty */ };
|
|
30768
|
+
var PROTOTYPE = 'prototype';
|
|
30769
|
+
|
|
30770
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
30771
|
+
var createDict = function () {
|
|
30772
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
30773
|
+
var iframe = require_domCreate()('iframe');
|
|
30774
|
+
var i = enumBugKeys.length;
|
|
30775
|
+
var lt = '<';
|
|
30776
|
+
var gt = '>';
|
|
30777
|
+
var iframeDocument;
|
|
30778
|
+
iframe.style.display = 'none';
|
|
30779
|
+
require_html().appendChild(iframe);
|
|
30780
|
+
iframe.src = 'javascript:'; // eslint-disable-line no-script-url
|
|
30781
|
+
// createDict = iframe.contentWindow.Object;
|
|
30782
|
+
// html.removeChild(iframe);
|
|
30783
|
+
iframeDocument = iframe.contentWindow.document;
|
|
30784
|
+
iframeDocument.open();
|
|
30785
|
+
iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
|
|
30786
|
+
iframeDocument.close();
|
|
30787
|
+
createDict = iframeDocument.F;
|
|
30788
|
+
while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
|
|
30789
|
+
return createDict();
|
|
30790
|
+
};
|
|
30791
|
+
|
|
30792
|
+
_objectCreate = Object.create || function create(O, Properties) {
|
|
30793
|
+
var result;
|
|
30794
|
+
if (O !== null) {
|
|
30795
|
+
Empty[PROTOTYPE] = anObject(O);
|
|
30796
|
+
result = new Empty();
|
|
30797
|
+
Empty[PROTOTYPE] = null;
|
|
30798
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
30799
|
+
result[IE_PROTO] = O;
|
|
30800
|
+
} else result = createDict();
|
|
30801
|
+
return Properties === undefined ? result : dPs(result, Properties);
|
|
30802
|
+
};
|
|
30803
|
+
return _objectCreate;
|
|
30804
|
+
}
|
|
30771
30805
|
|
|
30772
30806
|
var _wks = {exports: {}};
|
|
30773
30807
|
|
|
@@ -30793,7 +30827,7 @@ var _setToStringTag = function (it, tag, stat) {
|
|
|
30793
30827
|
if (it && !has$9(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
|
|
30794
30828
|
};
|
|
30795
30829
|
|
|
30796
|
-
var create$3 =
|
|
30830
|
+
var create$3 = require_objectCreate();
|
|
30797
30831
|
var descriptor = _propertyDesc;
|
|
30798
30832
|
var setToStringTag$2 = _setToStringTag;
|
|
30799
30833
|
var IteratorPrototype = {};
|
|
@@ -31344,7 +31378,7 @@ var _wksDefine = function (name) {
|
|
|
31344
31378
|
// all enumerable object keys, includes symbols
|
|
31345
31379
|
var getKeys = _objectKeys;
|
|
31346
31380
|
var gOPS$1 = _objectGops;
|
|
31347
|
-
var pIE$1 =
|
|
31381
|
+
var pIE$1 = require_objectPie();
|
|
31348
31382
|
var _enumKeys = function (it) {
|
|
31349
31383
|
var result = getKeys(it);
|
|
31350
31384
|
var getSymbols = gOPS$1.f;
|
|
@@ -31397,7 +31431,7 @@ _objectGopnExt.f = function getOwnPropertyNames(it) {
|
|
|
31397
31431
|
|
|
31398
31432
|
var _objectGopd = {};
|
|
31399
31433
|
|
|
31400
|
-
var pIE =
|
|
31434
|
+
var pIE = require_objectPie();
|
|
31401
31435
|
var createDesc$1 = _propertyDesc;
|
|
31402
31436
|
var toIObject$1 = _toIobject;
|
|
31403
31437
|
var toPrimitive$1 = _toPrimitive;
|
|
@@ -31436,7 +31470,7 @@ var toObject$1 = _toObject;
|
|
|
31436
31470
|
var toIObject = _toIobject;
|
|
31437
31471
|
var toPrimitive = _toPrimitive;
|
|
31438
31472
|
var createDesc = _propertyDesc;
|
|
31439
|
-
var _create$1 =
|
|
31473
|
+
var _create$1 = require_objectCreate();
|
|
31440
31474
|
var gOPNExt = _objectGopnExt;
|
|
31441
31475
|
var $GOPD = _objectGopd;
|
|
31442
31476
|
var $GOPS = _objectGops;
|
|
@@ -31565,7 +31599,7 @@ if (!USE_NATIVE) {
|
|
|
31565
31599
|
$GOPD.f = $getOwnPropertyDescriptor;
|
|
31566
31600
|
$DP.f = $defineProperty;
|
|
31567
31601
|
_objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
|
|
31568
|
-
|
|
31602
|
+
require_objectPie().f = $propertyIsEnumerable;
|
|
31569
31603
|
$GOPS.f = $getOwnPropertySymbols;
|
|
31570
31604
|
|
|
31571
31605
|
if (DESCRIPTORS && !_library) {
|
|
@@ -31746,7 +31780,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
|
|
|
31746
31780
|
|
|
31747
31781
|
var $export = _export;
|
|
31748
31782
|
// 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
|
|
31749
|
-
$export($export.S, 'Object', { create:
|
|
31783
|
+
$export($export.S, 'Object', { create: require_objectCreate() });
|
|
31750
31784
|
|
|
31751
31785
|
var $Object$1 = _coreExports.Object;
|
|
31752
31786
|
var create$2 = function create(P, D) {
|
|
@@ -66173,7 +66207,7 @@ class TgSelect extends React__default.Component {
|
|
|
66173
66207
|
if (isTagSelect && item.value && item.value.includes && item.value.includes(":")) {
|
|
66174
66208
|
const topLevelId = item.value.split(":")[0];
|
|
66175
66209
|
valArray = valArray.filter((val) => {
|
|
66176
|
-
if (val
|
|
66210
|
+
if (val?.value && val.value.includes && val.value.includes(":")) {
|
|
66177
66211
|
const valId = val.value.split(":")[0];
|
|
66178
66212
|
if (valId === topLevelId) {
|
|
66179
66213
|
return false;
|
|
@@ -66261,7 +66295,7 @@ class TgSelect extends React__default.Component {
|
|
|
66261
66295
|
getTagProps = (label) => {
|
|
66262
66296
|
const { multi, value = [], disabled: _disabled } = this.props;
|
|
66263
66297
|
const val = Array.isArray(value) ? value : [value];
|
|
66264
|
-
const matchingVal = val.find((op) => op
|
|
66298
|
+
const matchingVal = val.find((op) => op?.label === label);
|
|
66265
66299
|
const disabled = _disabled || matchingVal && matchingVal.disabled;
|
|
66266
66300
|
const className = matchingVal && matchingVal.className;
|
|
66267
66301
|
return {
|
|
@@ -83451,7 +83485,7 @@ const renderReactSelect = (props) => {
|
|
|
83451
83485
|
}
|
|
83452
83486
|
} else if (Array.isArray(value)) {
|
|
83453
83487
|
valueToUse = value.map((val) => {
|
|
83454
|
-
if (val
|
|
83488
|
+
if (val?.userCreated) {
|
|
83455
83489
|
return {
|
|
83456
83490
|
label: val.value,
|
|
83457
83491
|
value: val
|
|
@@ -83478,10 +83512,10 @@ const renderReactSelect = (props) => {
|
|
|
83478
83512
|
let valToPass;
|
|
83479
83513
|
if (Array.isArray(valOrVals)) {
|
|
83480
83514
|
valToPass = valOrVals.map(function(val) {
|
|
83481
|
-
if (val
|
|
83515
|
+
if (val?.userCreated) {
|
|
83482
83516
|
return val;
|
|
83483
83517
|
}
|
|
83484
|
-
return val
|
|
83518
|
+
return val?.value;
|
|
83485
83519
|
});
|
|
83486
83520
|
} else if (valOrVals) {
|
|
83487
83521
|
if (valOrVals.userCreated) {
|
|
@@ -89608,16 +89642,22 @@ class AlertWrapper extends Component {
|
|
|
89608
89642
|
state = { isOpen: true };
|
|
89609
89643
|
render() {
|
|
89610
89644
|
const {
|
|
89645
|
+
title,
|
|
89611
89646
|
handleClose,
|
|
89612
89647
|
text,
|
|
89613
89648
|
resolve,
|
|
89614
89649
|
noCancelButton,
|
|
89615
89650
|
content,
|
|
89616
89651
|
className,
|
|
89652
|
+
thirdButtonNotMinimal,
|
|
89653
|
+
thirdButtonClassName,
|
|
89617
89654
|
thirdButtonText,
|
|
89618
89655
|
thirdButtonIntent,
|
|
89656
|
+
fourthButtonNotMinimal,
|
|
89657
|
+
fourthButtonClassName,
|
|
89619
89658
|
fourthButtonText,
|
|
89620
89659
|
fourthButtonIntent,
|
|
89660
|
+
handleSubmit,
|
|
89621
89661
|
canEscapeKeyCancel,
|
|
89622
89662
|
confirmButtonText = "OK",
|
|
89623
89663
|
cancelButtonText = "Cancel",
|
|
@@ -89632,19 +89672,28 @@ class AlertWrapper extends Component {
|
|
|
89632
89672
|
return /* @__PURE__ */ React__default.createElement(
|
|
89633
89673
|
Dialog,
|
|
89634
89674
|
{
|
|
89635
|
-
|
|
89675
|
+
title,
|
|
89676
|
+
className: (title ? "" : "bp3-alert") + ` ${className || ""}`,
|
|
89636
89677
|
isOpen: this.state.isOpen,
|
|
89637
89678
|
intent,
|
|
89638
89679
|
cancelButtonText,
|
|
89639
89680
|
onCancel: cancelButtonText ? () => doClose(false) : void 0,
|
|
89640
|
-
onConfirm: () => doClose(true),
|
|
89681
|
+
onConfirm: handleSubmit ? handleSubmit((v) => doClose(v)) : () => doClose(true),
|
|
89641
89682
|
...rest,
|
|
89642
89683
|
...noCancelButton && {
|
|
89643
89684
|
onCancel: void 0,
|
|
89644
89685
|
cancelButtonText: void 0
|
|
89645
89686
|
}
|
|
89646
89687
|
},
|
|
89647
|
-
/* @__PURE__ */ React__default.createElement(
|
|
89688
|
+
/* @__PURE__ */ React__default.createElement(
|
|
89689
|
+
"div",
|
|
89690
|
+
{
|
|
89691
|
+
className: title ? "bp3-dialog-body" : "bp3-alert-contents",
|
|
89692
|
+
style: { padding: 5 }
|
|
89693
|
+
},
|
|
89694
|
+
content,
|
|
89695
|
+
text && /* @__PURE__ */ React__default.createElement("div", { style: { marginBottom: 10 } }, text)
|
|
89696
|
+
),
|
|
89648
89697
|
/* @__PURE__ */ React__default.createElement(
|
|
89649
89698
|
DialogFooter,
|
|
89650
89699
|
{
|
|
@@ -89655,23 +89704,27 @@ class AlertWrapper extends Component {
|
|
|
89655
89704
|
additionalButtons: thirdButtonText || fourthButtonText ? /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, !!fourthButtonText && /* @__PURE__ */ React__default.createElement(
|
|
89656
89705
|
Button,
|
|
89657
89706
|
{
|
|
89707
|
+
className: (!fourthButtonNotMinimal ? Classes.MINIMAL : "") + " " + fourthButtonClassName,
|
|
89658
89708
|
intent: fourthButtonIntent,
|
|
89659
89709
|
text: fourthButtonText,
|
|
89660
|
-
onClick:
|
|
89661
|
-
doClose(
|
|
89662
|
-
|
|
89710
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89711
|
+
(v) => doClose({ ...v, fourthButtonClicked: true })
|
|
89712
|
+
) : () => doClose("fourthButtonClicked")
|
|
89663
89713
|
}
|
|
89664
89714
|
), !!thirdButtonText && /* @__PURE__ */ React__default.createElement(
|
|
89665
89715
|
Button,
|
|
89666
89716
|
{
|
|
89717
|
+
className: (!thirdButtonNotMinimal ? Classes.MINIMAL : "") + " " + thirdButtonClassName,
|
|
89667
89718
|
intent: thirdButtonIntent,
|
|
89668
89719
|
text: thirdButtonText,
|
|
89669
|
-
onClick:
|
|
89720
|
+
onClick: handleSubmit ? handleSubmit(
|
|
89721
|
+
(v) => doClose({ ...v, thirdButtonClicked: true })
|
|
89722
|
+
) : () => {
|
|
89670
89723
|
doClose("thirdButtonClicked");
|
|
89671
89724
|
}
|
|
89672
89725
|
}
|
|
89673
89726
|
)) : void 0,
|
|
89674
|
-
containerClassname: "bp3-alert-footer",
|
|
89727
|
+
containerClassname: title ? "" : "bp3-alert-footer",
|
|
89675
89728
|
backText: noCancelButton ? "" : cancelButtonText,
|
|
89676
89729
|
text: confirmButtonText,
|
|
89677
89730
|
intent
|
|
@@ -107024,4 +107077,4 @@ function showDialogOnDocBody(DialogComp, options = {}) {
|
|
|
107024
107077
|
|
|
107025
107078
|
const noop = () => void 0;
|
|
107026
107079
|
|
|
107027
|
-
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 };
|
|
107080
|
+
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
|
@@ -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 ||
|
|
@@ -692,7 +692,7 @@ export const renderReactSelect = props => {
|
|
|
692
692
|
}
|
|
693
693
|
} else if (Array.isArray(value)) {
|
|
694
694
|
valueToUse = value.map(val => {
|
|
695
|
-
if (val
|
|
695
|
+
if (val?.userCreated) {
|
|
696
696
|
return {
|
|
697
697
|
label: val.value,
|
|
698
698
|
value: val
|
|
@@ -719,10 +719,10 @@ export const renderReactSelect = props => {
|
|
|
719
719
|
let valToPass;
|
|
720
720
|
if (Array.isArray(valOrVals)) {
|
|
721
721
|
valToPass = valOrVals.map(function (val) {
|
|
722
|
-
if (val
|
|
722
|
+
if (val?.userCreated) {
|
|
723
723
|
return val;
|
|
724
724
|
}
|
|
725
|
-
return val
|
|
725
|
+
return val?.value;
|
|
726
726
|
});
|
|
727
727
|
} else if (valOrVals) {
|
|
728
728
|
if (valOrVals.userCreated) {
|
package/src/TgSelect/index.js
CHANGED
|
@@ -76,7 +76,7 @@ class TgSelect extends React.Component {
|
|
|
76
76
|
) {
|
|
77
77
|
const topLevelId = item.value.split(":")[0];
|
|
78
78
|
valArray = valArray.filter(val => {
|
|
79
|
-
if (val
|
|
79
|
+
if (val?.value && val.value.includes && val.value.includes(":")) {
|
|
80
80
|
const valId = val.value.split(":")[0];
|
|
81
81
|
if (valId === topLevelId) {
|
|
82
82
|
return false;
|
|
@@ -187,7 +187,7 @@ class TgSelect extends React.Component {
|
|
|
187
187
|
getTagProps = label => {
|
|
188
188
|
const { multi, value = [], disabled: _disabled } = this.props;
|
|
189
189
|
const val = Array.isArray(value) ? value : [value];
|
|
190
|
-
const matchingVal = val.find(op => op
|
|
190
|
+
const matchingVal = val.find(op => op?.label === label);
|
|
191
191
|
const disabled = _disabled || (matchingVal && matchingVal.disabled);
|
|
192
192
|
const className = matchingVal && matchingVal.className;
|
|
193
193
|
|
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
|