@teselagen/ui 0.4.5 → 0.4.6
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 +60 -80
- package/index.es.js +60 -80
- package/package.json +1 -3
- package/src/DataTable/DisplayOptions.js +2 -2
- package/src/DataTable/PagingTool.js +2 -2
- package/src/DataTable/dataTableEnhancer.js +2 -2
- package/src/DataTable/utils/rowClick.js +2 -2
- package/src/TgSelect/index.js +5 -1
- package/src/utils/menuUtils.js +7 -3
package/index.cjs.js
CHANGED
|
@@ -5543,10 +5543,10 @@ var ownKeys$3 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownK
|
|
|
5543
5543
|
/* istanbul ignore next */
|
|
5544
5544
|
Object.getOwnPropertyNames
|
|
5545
5545
|
);
|
|
5546
|
-
function toPrimitive$
|
|
5546
|
+
function toPrimitive$3(value) {
|
|
5547
5547
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
5548
5548
|
}
|
|
5549
|
-
__name(toPrimitive$
|
|
5549
|
+
__name(toPrimitive$3, "toPrimitive$3");
|
|
5550
5550
|
function hasProp(target, prop) {
|
|
5551
5551
|
return objectPrototype$1.hasOwnProperty.call(target, prop);
|
|
5552
5552
|
}
|
|
@@ -6563,7 +6563,7 @@ var ObservableValue = /* @__PURE__ */ function(_Atom) {
|
|
|
6563
6563
|
return this.name_ + "[" + this.value_ + "]";
|
|
6564
6564
|
}, "toString2");
|
|
6565
6565
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6566
|
-
return toPrimitive$
|
|
6566
|
+
return toPrimitive$3(this.get());
|
|
6567
6567
|
}, "valueOf");
|
|
6568
6568
|
_proto[_Symbol$toPrimitive] = function() {
|
|
6569
6569
|
return this.valueOf();
|
|
@@ -6748,7 +6748,7 @@ var ComputedValue = /* @__PURE__ */ function() {
|
|
|
6748
6748
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
6749
6749
|
}, "toString2");
|
|
6750
6750
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6751
|
-
return toPrimitive$
|
|
6751
|
+
return toPrimitive$3(this.get());
|
|
6752
6752
|
}, "valueOf");
|
|
6753
6753
|
_proto[_Symbol$toPrimitive$1] = function() {
|
|
6754
6754
|
return this.valueOf();
|
|
@@ -14004,20 +14004,11 @@ var _fails = /* @__PURE__ */ __name(function(exec) {
|
|
|
14004
14004
|
return true;
|
|
14005
14005
|
}
|
|
14006
14006
|
}, "_fails");
|
|
14007
|
-
var _descriptors
|
|
14008
|
-
|
|
14009
|
-
|
|
14010
|
-
|
|
14011
|
-
|
|
14012
|
-
hasRequired_descriptors = 1;
|
|
14013
|
-
_descriptors = !_fails(function() {
|
|
14014
|
-
return Object.defineProperty({}, "a", { get: function() {
|
|
14015
|
-
return 7;
|
|
14016
|
-
} }).a != 7;
|
|
14017
|
-
});
|
|
14018
|
-
return _descriptors;
|
|
14019
|
-
}
|
|
14020
|
-
__name(require_descriptors, "require_descriptors");
|
|
14007
|
+
var _descriptors = !_fails(function() {
|
|
14008
|
+
return Object.defineProperty({}, "a", { get: function() {
|
|
14009
|
+
return 7;
|
|
14010
|
+
} }).a != 7;
|
|
14011
|
+
});
|
|
14021
14012
|
var _domCreate;
|
|
14022
14013
|
var hasRequired_domCreate;
|
|
14023
14014
|
function require_domCreate() {
|
|
@@ -14033,20 +14024,11 @@ function require_domCreate() {
|
|
|
14033
14024
|
return _domCreate;
|
|
14034
14025
|
}
|
|
14035
14026
|
__name(require_domCreate, "require_domCreate");
|
|
14036
|
-
var _ie8DomDefine
|
|
14037
|
-
|
|
14038
|
-
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
hasRequired_ie8DomDefine = 1;
|
|
14042
|
-
_ie8DomDefine = !require_descriptors() && !_fails(function() {
|
|
14043
|
-
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
14044
|
-
return 7;
|
|
14045
|
-
} }).a != 7;
|
|
14046
|
-
});
|
|
14047
|
-
return _ie8DomDefine;
|
|
14048
|
-
}
|
|
14049
|
-
__name(require_ie8DomDefine, "require_ie8DomDefine");
|
|
14027
|
+
var _ie8DomDefine = !_descriptors && !_fails(function() {
|
|
14028
|
+
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
14029
|
+
return 7;
|
|
14030
|
+
} }).a != 7;
|
|
14031
|
+
});
|
|
14050
14032
|
var isObject$c = _isObject;
|
|
14051
14033
|
var _toPrimitive = /* @__PURE__ */ __name(function(it, S2) {
|
|
14052
14034
|
if (!isObject$c(it))
|
|
@@ -14060,33 +14042,25 @@ var _toPrimitive = /* @__PURE__ */ __name(function(it, S2) {
|
|
|
14060
14042
|
return val;
|
|
14061
14043
|
throw TypeError("Can't convert object to primitive value");
|
|
14062
14044
|
}, "_toPrimitive");
|
|
14063
|
-
var
|
|
14064
|
-
|
|
14065
|
-
|
|
14066
|
-
|
|
14067
|
-
|
|
14068
|
-
|
|
14069
|
-
|
|
14070
|
-
|
|
14071
|
-
|
|
14072
|
-
|
|
14073
|
-
|
|
14074
|
-
|
|
14075
|
-
|
|
14076
|
-
|
|
14077
|
-
|
|
14078
|
-
|
|
14079
|
-
|
|
14080
|
-
|
|
14081
|
-
|
|
14082
|
-
throw TypeError("Accessors not supported!");
|
|
14083
|
-
if ("value" in Attributes)
|
|
14084
|
-
O2[P2] = Attributes.value;
|
|
14085
|
-
return O2;
|
|
14086
|
-
}, "defineProperty");
|
|
14087
|
-
return _objectDp;
|
|
14088
|
-
}
|
|
14089
|
-
__name(require_objectDp, "require_objectDp");
|
|
14045
|
+
var anObject$5 = _anObject;
|
|
14046
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
14047
|
+
var toPrimitive$2 = _toPrimitive;
|
|
14048
|
+
var dP$3 = Object.defineProperty;
|
|
14049
|
+
_objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty(O2, P2, Attributes) {
|
|
14050
|
+
anObject$5(O2);
|
|
14051
|
+
P2 = toPrimitive$2(P2, true);
|
|
14052
|
+
anObject$5(Attributes);
|
|
14053
|
+
if (IE8_DOM_DEFINE$1)
|
|
14054
|
+
try {
|
|
14055
|
+
return dP$3(O2, P2, Attributes);
|
|
14056
|
+
} catch (e2) {
|
|
14057
|
+
}
|
|
14058
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
14059
|
+
throw TypeError("Accessors not supported!");
|
|
14060
|
+
if ("value" in Attributes)
|
|
14061
|
+
O2[P2] = Attributes.value;
|
|
14062
|
+
return O2;
|
|
14063
|
+
}, "defineProperty");
|
|
14090
14064
|
var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
14091
14065
|
return {
|
|
14092
14066
|
enumerable: !(bitmap & 1),
|
|
@@ -14095,9 +14069,9 @@ var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
|
14095
14069
|
value
|
|
14096
14070
|
};
|
|
14097
14071
|
}, "_propertyDesc");
|
|
14098
|
-
var dP$2 =
|
|
14072
|
+
var dP$2 = _objectDp;
|
|
14099
14073
|
var createDesc$3 = _propertyDesc;
|
|
14100
|
-
var _hide =
|
|
14074
|
+
var _hide = _descriptors ? function(object2, key, value) {
|
|
14101
14075
|
return dP$2.f(object2, key, createDesc$3(1, value));
|
|
14102
14076
|
} : function(object2, key, value) {
|
|
14103
14077
|
object2[key] = value;
|
|
@@ -14303,7 +14277,7 @@ function require_objectAssign() {
|
|
|
14303
14277
|
if (hasRequired_objectAssign)
|
|
14304
14278
|
return _objectAssign;
|
|
14305
14279
|
hasRequired_objectAssign = 1;
|
|
14306
|
-
var DESCRIPTORS2 =
|
|
14280
|
+
var DESCRIPTORS2 = _descriptors;
|
|
14307
14281
|
var getKeys2 = _objectKeys;
|
|
14308
14282
|
var gOPS2 = _objectGops;
|
|
14309
14283
|
var pIE2 = require_objectPie();
|
|
@@ -14369,10 +14343,10 @@ var _iterStep = /* @__PURE__ */ __name(function(done, value) {
|
|
|
14369
14343
|
}, "_iterStep");
|
|
14370
14344
|
var _iterators = {};
|
|
14371
14345
|
var _redefine = _hide;
|
|
14372
|
-
var dP$1 =
|
|
14346
|
+
var dP$1 = _objectDp;
|
|
14373
14347
|
var anObject$4 = _anObject;
|
|
14374
14348
|
var getKeys$1 = _objectKeys;
|
|
14375
|
-
var _objectDps =
|
|
14349
|
+
var _objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties(O2, Properties) {
|
|
14376
14350
|
anObject$4(O2);
|
|
14377
14351
|
var keys3 = getKeys$1(Properties);
|
|
14378
14352
|
var length = keys3.length;
|
|
@@ -14439,7 +14413,7 @@ var $exports = _wks.exports = function(name) {
|
|
|
14439
14413
|
};
|
|
14440
14414
|
$exports.store = store;
|
|
14441
14415
|
var _wksExports = _wks.exports;
|
|
14442
|
-
var def =
|
|
14416
|
+
var def = _objectDp.f;
|
|
14443
14417
|
var has$9 = _has;
|
|
14444
14418
|
var TAG$1 = _wksExports("toStringTag");
|
|
14445
14419
|
var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
|
|
@@ -14712,7 +14686,7 @@ var ArrayProto = Array.prototype;
|
|
|
14712
14686
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
14713
14687
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
14714
14688
|
}, "_isArrayIter");
|
|
14715
|
-
var $defineProperty$3 =
|
|
14689
|
+
var $defineProperty$3 = _objectDp;
|
|
14716
14690
|
var createDesc$2 = _propertyDesc;
|
|
14717
14691
|
var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
|
|
14718
14692
|
if (index2 in object2)
|
|
@@ -14841,9 +14815,9 @@ var _default$8 = /* @__PURE__ */ __name(function(instance, Constructor) {
|
|
|
14841
14815
|
}
|
|
14842
14816
|
}, "_default$8");
|
|
14843
14817
|
var $export$3 = _export;
|
|
14844
|
-
$export$3($export$3.S + $export$3.F * !
|
|
14818
|
+
$export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
|
|
14845
14819
|
var $Object$2 = _coreExports.Object;
|
|
14846
|
-
var defineProperty$7 = /* @__PURE__ */ __name(function
|
|
14820
|
+
var defineProperty$7 = /* @__PURE__ */ __name(function defineProperty3(it, key, desc) {
|
|
14847
14821
|
return $Object$2.defineProperty(it, key, desc);
|
|
14848
14822
|
}, "defineProperty");
|
|
14849
14823
|
var defineProperty$6 = { "default": defineProperty$7, __esModule: true };
|
|
@@ -14882,7 +14856,7 @@ var _meta = { exports: {} };
|
|
|
14882
14856
|
var META$1 = _uid("meta");
|
|
14883
14857
|
var isObject$b = _isObject;
|
|
14884
14858
|
var has$7 = _has;
|
|
14885
|
-
var setDesc =
|
|
14859
|
+
var setDesc = _objectDp.f;
|
|
14886
14860
|
var id = 0;
|
|
14887
14861
|
var isExtensible = Object.isExtensible || function() {
|
|
14888
14862
|
return true;
|
|
@@ -14935,7 +14909,7 @@ var meta = _meta.exports = {
|
|
|
14935
14909
|
var _metaExports = _meta.exports;
|
|
14936
14910
|
var core = _coreExports;
|
|
14937
14911
|
var wksExt$1 = _wksExt;
|
|
14938
|
-
var defineProperty$5 =
|
|
14912
|
+
var defineProperty$5 = _objectDp.f;
|
|
14939
14913
|
var _wksDefine = /* @__PURE__ */ __name(function(name) {
|
|
14940
14914
|
var $Symbol2 = core.Symbol || (core.Symbol = {});
|
|
14941
14915
|
if (name.charAt(0) != "_" && !(name in $Symbol2))
|
|
@@ -14989,9 +14963,9 @@ var createDesc$1 = _propertyDesc;
|
|
|
14989
14963
|
var toIObject$1 = _toIobject;
|
|
14990
14964
|
var toPrimitive$1 = _toPrimitive;
|
|
14991
14965
|
var has$6 = _has;
|
|
14992
|
-
var IE8_DOM_DEFINE =
|
|
14966
|
+
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
14993
14967
|
var gOPD$3 = Object.getOwnPropertyDescriptor;
|
|
14994
|
-
_objectGopd.f =
|
|
14968
|
+
_objectGopd.f = _descriptors ? gOPD$3 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor(O2, P2) {
|
|
14995
14969
|
O2 = toIObject$1(O2);
|
|
14996
14970
|
P2 = toPrimitive$1(P2, true);
|
|
14997
14971
|
if (IE8_DOM_DEFINE)
|
|
@@ -15004,7 +14978,7 @@ _objectGopd.f = require_descriptors() ? gOPD$3 : /* @__PURE__ */ __name(function
|
|
|
15004
14978
|
}, "getOwnPropertyDescriptor");
|
|
15005
14979
|
var global$1 = _globalExports;
|
|
15006
14980
|
var has$5 = _has;
|
|
15007
|
-
var DESCRIPTORS =
|
|
14981
|
+
var DESCRIPTORS = _descriptors;
|
|
15008
14982
|
var $export$2 = _export;
|
|
15009
14983
|
var redefine = _redefine;
|
|
15010
14984
|
var META = _metaExports.KEY;
|
|
@@ -15027,7 +15001,7 @@ var _create$1 = _objectCreate;
|
|
|
15027
15001
|
var gOPNExt = _objectGopnExt;
|
|
15028
15002
|
var $GOPD = _objectGopd;
|
|
15029
15003
|
var $GOPS = _objectGops;
|
|
15030
|
-
var $DP =
|
|
15004
|
+
var $DP = _objectDp;
|
|
15031
15005
|
var $keys$1 = _objectKeys;
|
|
15032
15006
|
var gOPD$2 = $GOPD.f;
|
|
15033
15007
|
var dP = $DP.f;
|
|
@@ -15070,7 +15044,7 @@ var isSymbol$7 = USE_NATIVE && typeof $Symbol.iterator == "symbol" ? function(it
|
|
|
15070
15044
|
} : function(it) {
|
|
15071
15045
|
return it instanceof $Symbol;
|
|
15072
15046
|
};
|
|
15073
|
-
var $defineProperty$2 = /* @__PURE__ */ __name(function
|
|
15047
|
+
var $defineProperty$2 = /* @__PURE__ */ __name(function defineProperty4(it, key, D2) {
|
|
15074
15048
|
if (it === ObjectProto)
|
|
15075
15049
|
$defineProperty$2(OPSymbols, key, D2);
|
|
15076
15050
|
anObject(it);
|
|
@@ -35951,6 +35925,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
|
|
|
35951
35925
|
};
|
|
35952
35926
|
}
|
|
35953
35927
|
render() {
|
|
35928
|
+
var _b2;
|
|
35954
35929
|
const _a2 = this.props, {
|
|
35955
35930
|
multi,
|
|
35956
35931
|
options,
|
|
@@ -35961,6 +35936,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
|
|
|
35961
35936
|
tagInputProps: tagInputProps,
|
|
35962
35937
|
autoFocus,
|
|
35963
35938
|
autoOpen,
|
|
35939
|
+
mustHaveQueryToOpen,
|
|
35964
35940
|
noResultsText,
|
|
35965
35941
|
noResults: _noResults,
|
|
35966
35942
|
inputProps,
|
|
@@ -35984,6 +35960,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
|
|
|
35984
35960
|
"tagInputProps",
|
|
35985
35961
|
"autoFocus",
|
|
35986
35962
|
"autoOpen",
|
|
35963
|
+
"mustHaveQueryToOpen",
|
|
35987
35964
|
"noResultsText",
|
|
35988
35965
|
"noResults",
|
|
35989
35966
|
"inputProps",
|
|
@@ -36000,6 +35977,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
|
|
|
36000
35977
|
let noResults = _noResults;
|
|
36001
35978
|
if (noResults === void 0)
|
|
36002
35979
|
noResults = noResultsDefault;
|
|
35980
|
+
const hasQuery = ((_b2 = this.state.query) == null ? void 0 : _b2.length) > 0;
|
|
36003
35981
|
const hasValue = Array.isArray(value) ? value.length > 0 : !!value || value === 0;
|
|
36004
35982
|
const rightElement = isLoading ? /* @__PURE__ */ React$1.createElement(core$5.Button, { loading: true, minimal: true }) : /* @__PURE__ */ React$1.createElement("span", null, additionalRightEl, hasValue && !disallowClear && !disabled && /* @__PURE__ */ React$1.createElement(
|
|
36005
35983
|
core$5.Button,
|
|
@@ -36052,7 +36030,7 @@ const _TgSelect = class _TgSelect extends React$1.Component {
|
|
|
36052
36030
|
wrapperTagName: "div",
|
|
36053
36031
|
canEscapeKeyClose: true,
|
|
36054
36032
|
onInteraction: this.onInteraction,
|
|
36055
|
-
isOpen: this.state.isOpen,
|
|
36033
|
+
isOpen: mustHaveQueryToOpen ? hasQuery && this.state.isOpen : this.state.isOpen,
|
|
36056
36034
|
modifiers: popoverOverflowModifiers
|
|
36057
36035
|
}, popoverProps),
|
|
36058
36036
|
onItemSelect: this.handleItemSelect,
|
|
@@ -49805,7 +49783,7 @@ var KNOWN_STATICS = {
|
|
|
49805
49783
|
arguments: true,
|
|
49806
49784
|
arity: true
|
|
49807
49785
|
};
|
|
49808
|
-
var
|
|
49786
|
+
var defineProperty5 = Object.defineProperty;
|
|
49809
49787
|
var getOwnPropertyNames4 = Object.getOwnPropertyNames;
|
|
49810
49788
|
var getOwnPropertySymbols3 = Object.getOwnPropertySymbols;
|
|
49811
49789
|
var getOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;
|
|
@@ -49828,7 +49806,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
|
49828
49806
|
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
|
49829
49807
|
var descriptor2 = getOwnPropertyDescriptor3(sourceComponent, key);
|
|
49830
49808
|
try {
|
|
49831
|
-
|
|
49809
|
+
defineProperty5(targetComponent, key, descriptor2);
|
|
49832
49810
|
} catch (e2) {
|
|
49833
49811
|
}
|
|
49834
49812
|
}
|
|
@@ -70944,11 +70922,13 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React$
|
|
|
70944
70922
|
};
|
|
70945
70923
|
__name(_ResizableDraggableDialog, "ResizableDraggableDialog");
|
|
70946
70924
|
let ResizableDraggableDialog = _ResizableDraggableDialog;
|
|
70947
|
-
function MenuItemLink({ text: text2, onClick, icon, navTo }) {
|
|
70925
|
+
function MenuItemLink({ text: text2, onClick, icon, navTo, active: active3 }) {
|
|
70948
70926
|
const handleLinkClick = /* @__PURE__ */ __name((e2) => {
|
|
70949
70927
|
e2.target.closest(`.${core$5.Classes.POPOVER_DISMISS}`).click();
|
|
70950
70928
|
}, "handleLinkClick");
|
|
70951
|
-
return /* @__PURE__ */ React$1.createElement("li", { className: core$5.Classes.POPOVER_DISMISS, onClick }, /* @__PURE__ */ React$1.createElement(Link, { onClick: handleLinkClick, to: navTo, className:
|
|
70929
|
+
return /* @__PURE__ */ React$1.createElement("li", { className: core$5.Classes.POPOVER_DISMISS, onClick }, /* @__PURE__ */ React$1.createElement(Link, { onClick: handleLinkClick, to: navTo, className: classNames(core$5.Classes.MENU_ITEM, {
|
|
70930
|
+
[core$5.Classes.ACTIVE]: active3
|
|
70931
|
+
}) }, icon && /* @__PURE__ */ React$1.createElement(core$5.Icon, { icon }), /* @__PURE__ */ React$1.createElement("div", { className: "bp3-text-overflow-ellipsis bp3-fill" }, text2)));
|
|
70952
70932
|
}
|
|
70953
70933
|
__name(MenuItemLink, "MenuItemLink");
|
|
70954
70934
|
const EnhancedMenuItem = compose(
|
package/index.es.js
CHANGED
|
@@ -5525,10 +5525,10 @@ var ownKeys$3 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownK
|
|
|
5525
5525
|
/* istanbul ignore next */
|
|
5526
5526
|
Object.getOwnPropertyNames
|
|
5527
5527
|
);
|
|
5528
|
-
function toPrimitive$
|
|
5528
|
+
function toPrimitive$3(value) {
|
|
5529
5529
|
return value === null ? null : typeof value === "object" ? "" + value : value;
|
|
5530
5530
|
}
|
|
5531
|
-
__name(toPrimitive$
|
|
5531
|
+
__name(toPrimitive$3, "toPrimitive$3");
|
|
5532
5532
|
function hasProp(target, prop) {
|
|
5533
5533
|
return objectPrototype$1.hasOwnProperty.call(target, prop);
|
|
5534
5534
|
}
|
|
@@ -6545,7 +6545,7 @@ var ObservableValue = /* @__PURE__ */ function(_Atom) {
|
|
|
6545
6545
|
return this.name_ + "[" + this.value_ + "]";
|
|
6546
6546
|
}, "toString2");
|
|
6547
6547
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6548
|
-
return toPrimitive$
|
|
6548
|
+
return toPrimitive$3(this.get());
|
|
6549
6549
|
}, "valueOf");
|
|
6550
6550
|
_proto[_Symbol$toPrimitive] = function() {
|
|
6551
6551
|
return this.valueOf();
|
|
@@ -6730,7 +6730,7 @@ var ComputedValue = /* @__PURE__ */ function() {
|
|
|
6730
6730
|
return this.name_ + "[" + this.derivation.toString() + "]";
|
|
6731
6731
|
}, "toString2");
|
|
6732
6732
|
_proto.valueOf = /* @__PURE__ */ __name(function valueOf() {
|
|
6733
|
-
return toPrimitive$
|
|
6733
|
+
return toPrimitive$3(this.get());
|
|
6734
6734
|
}, "valueOf");
|
|
6735
6735
|
_proto[_Symbol$toPrimitive$1] = function() {
|
|
6736
6736
|
return this.valueOf();
|
|
@@ -13986,20 +13986,11 @@ var _fails = /* @__PURE__ */ __name(function(exec) {
|
|
|
13986
13986
|
return true;
|
|
13987
13987
|
}
|
|
13988
13988
|
}, "_fails");
|
|
13989
|
-
var _descriptors
|
|
13990
|
-
|
|
13991
|
-
|
|
13992
|
-
|
|
13993
|
-
|
|
13994
|
-
hasRequired_descriptors = 1;
|
|
13995
|
-
_descriptors = !_fails(function() {
|
|
13996
|
-
return Object.defineProperty({}, "a", { get: function() {
|
|
13997
|
-
return 7;
|
|
13998
|
-
} }).a != 7;
|
|
13999
|
-
});
|
|
14000
|
-
return _descriptors;
|
|
14001
|
-
}
|
|
14002
|
-
__name(require_descriptors, "require_descriptors");
|
|
13989
|
+
var _descriptors = !_fails(function() {
|
|
13990
|
+
return Object.defineProperty({}, "a", { get: function() {
|
|
13991
|
+
return 7;
|
|
13992
|
+
} }).a != 7;
|
|
13993
|
+
});
|
|
14003
13994
|
var _domCreate;
|
|
14004
13995
|
var hasRequired_domCreate;
|
|
14005
13996
|
function require_domCreate() {
|
|
@@ -14015,20 +14006,11 @@ function require_domCreate() {
|
|
|
14015
14006
|
return _domCreate;
|
|
14016
14007
|
}
|
|
14017
14008
|
__name(require_domCreate, "require_domCreate");
|
|
14018
|
-
var _ie8DomDefine
|
|
14019
|
-
|
|
14020
|
-
|
|
14021
|
-
|
|
14022
|
-
|
|
14023
|
-
hasRequired_ie8DomDefine = 1;
|
|
14024
|
-
_ie8DomDefine = !require_descriptors() && !_fails(function() {
|
|
14025
|
-
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
14026
|
-
return 7;
|
|
14027
|
-
} }).a != 7;
|
|
14028
|
-
});
|
|
14029
|
-
return _ie8DomDefine;
|
|
14030
|
-
}
|
|
14031
|
-
__name(require_ie8DomDefine, "require_ie8DomDefine");
|
|
14009
|
+
var _ie8DomDefine = !_descriptors && !_fails(function() {
|
|
14010
|
+
return Object.defineProperty(require_domCreate()("div"), "a", { get: function() {
|
|
14011
|
+
return 7;
|
|
14012
|
+
} }).a != 7;
|
|
14013
|
+
});
|
|
14032
14014
|
var isObject$c = _isObject;
|
|
14033
14015
|
var _toPrimitive = /* @__PURE__ */ __name(function(it, S2) {
|
|
14034
14016
|
if (!isObject$c(it))
|
|
@@ -14042,33 +14024,25 @@ var _toPrimitive = /* @__PURE__ */ __name(function(it, S2) {
|
|
|
14042
14024
|
return val;
|
|
14043
14025
|
throw TypeError("Can't convert object to primitive value");
|
|
14044
14026
|
}, "_toPrimitive");
|
|
14045
|
-
var
|
|
14046
|
-
|
|
14047
|
-
|
|
14048
|
-
|
|
14049
|
-
|
|
14050
|
-
|
|
14051
|
-
|
|
14052
|
-
|
|
14053
|
-
|
|
14054
|
-
|
|
14055
|
-
|
|
14056
|
-
|
|
14057
|
-
|
|
14058
|
-
|
|
14059
|
-
|
|
14060
|
-
|
|
14061
|
-
|
|
14062
|
-
|
|
14063
|
-
|
|
14064
|
-
throw TypeError("Accessors not supported!");
|
|
14065
|
-
if ("value" in Attributes)
|
|
14066
|
-
O2[P2] = Attributes.value;
|
|
14067
|
-
return O2;
|
|
14068
|
-
}, "defineProperty");
|
|
14069
|
-
return _objectDp;
|
|
14070
|
-
}
|
|
14071
|
-
__name(require_objectDp, "require_objectDp");
|
|
14027
|
+
var anObject$5 = _anObject;
|
|
14028
|
+
var IE8_DOM_DEFINE$1 = _ie8DomDefine;
|
|
14029
|
+
var toPrimitive$2 = _toPrimitive;
|
|
14030
|
+
var dP$3 = Object.defineProperty;
|
|
14031
|
+
_objectDp.f = _descriptors ? Object.defineProperty : /* @__PURE__ */ __name(function defineProperty(O2, P2, Attributes) {
|
|
14032
|
+
anObject$5(O2);
|
|
14033
|
+
P2 = toPrimitive$2(P2, true);
|
|
14034
|
+
anObject$5(Attributes);
|
|
14035
|
+
if (IE8_DOM_DEFINE$1)
|
|
14036
|
+
try {
|
|
14037
|
+
return dP$3(O2, P2, Attributes);
|
|
14038
|
+
} catch (e2) {
|
|
14039
|
+
}
|
|
14040
|
+
if ("get" in Attributes || "set" in Attributes)
|
|
14041
|
+
throw TypeError("Accessors not supported!");
|
|
14042
|
+
if ("value" in Attributes)
|
|
14043
|
+
O2[P2] = Attributes.value;
|
|
14044
|
+
return O2;
|
|
14045
|
+
}, "defineProperty");
|
|
14072
14046
|
var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
14073
14047
|
return {
|
|
14074
14048
|
enumerable: !(bitmap & 1),
|
|
@@ -14077,9 +14051,9 @@ var _propertyDesc = /* @__PURE__ */ __name(function(bitmap, value) {
|
|
|
14077
14051
|
value
|
|
14078
14052
|
};
|
|
14079
14053
|
}, "_propertyDesc");
|
|
14080
|
-
var dP$2 =
|
|
14054
|
+
var dP$2 = _objectDp;
|
|
14081
14055
|
var createDesc$3 = _propertyDesc;
|
|
14082
|
-
var _hide =
|
|
14056
|
+
var _hide = _descriptors ? function(object2, key, value) {
|
|
14083
14057
|
return dP$2.f(object2, key, createDesc$3(1, value));
|
|
14084
14058
|
} : function(object2, key, value) {
|
|
14085
14059
|
object2[key] = value;
|
|
@@ -14285,7 +14259,7 @@ function require_objectAssign() {
|
|
|
14285
14259
|
if (hasRequired_objectAssign)
|
|
14286
14260
|
return _objectAssign;
|
|
14287
14261
|
hasRequired_objectAssign = 1;
|
|
14288
|
-
var DESCRIPTORS2 =
|
|
14262
|
+
var DESCRIPTORS2 = _descriptors;
|
|
14289
14263
|
var getKeys2 = _objectKeys;
|
|
14290
14264
|
var gOPS2 = _objectGops;
|
|
14291
14265
|
var pIE2 = require_objectPie();
|
|
@@ -14351,10 +14325,10 @@ var _iterStep = /* @__PURE__ */ __name(function(done, value) {
|
|
|
14351
14325
|
}, "_iterStep");
|
|
14352
14326
|
var _iterators = {};
|
|
14353
14327
|
var _redefine = _hide;
|
|
14354
|
-
var dP$1 =
|
|
14328
|
+
var dP$1 = _objectDp;
|
|
14355
14329
|
var anObject$4 = _anObject;
|
|
14356
14330
|
var getKeys$1 = _objectKeys;
|
|
14357
|
-
var _objectDps =
|
|
14331
|
+
var _objectDps = _descriptors ? Object.defineProperties : /* @__PURE__ */ __name(function defineProperties(O2, Properties) {
|
|
14358
14332
|
anObject$4(O2);
|
|
14359
14333
|
var keys3 = getKeys$1(Properties);
|
|
14360
14334
|
var length = keys3.length;
|
|
@@ -14421,7 +14395,7 @@ var $exports = _wks.exports = function(name) {
|
|
|
14421
14395
|
};
|
|
14422
14396
|
$exports.store = store;
|
|
14423
14397
|
var _wksExports = _wks.exports;
|
|
14424
|
-
var def =
|
|
14398
|
+
var def = _objectDp.f;
|
|
14425
14399
|
var has$9 = _has;
|
|
14426
14400
|
var TAG$1 = _wksExports("toStringTag");
|
|
14427
14401
|
var _setToStringTag = /* @__PURE__ */ __name(function(it, tag, stat) {
|
|
@@ -14694,7 +14668,7 @@ var ArrayProto = Array.prototype;
|
|
|
14694
14668
|
var _isArrayIter = /* @__PURE__ */ __name(function(it) {
|
|
14695
14669
|
return it !== void 0 && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
|
|
14696
14670
|
}, "_isArrayIter");
|
|
14697
|
-
var $defineProperty$3 =
|
|
14671
|
+
var $defineProperty$3 = _objectDp;
|
|
14698
14672
|
var createDesc$2 = _propertyDesc;
|
|
14699
14673
|
var _createProperty = /* @__PURE__ */ __name(function(object2, index2, value) {
|
|
14700
14674
|
if (index2 in object2)
|
|
@@ -14823,9 +14797,9 @@ var _default$8 = /* @__PURE__ */ __name(function(instance, Constructor) {
|
|
|
14823
14797
|
}
|
|
14824
14798
|
}, "_default$8");
|
|
14825
14799
|
var $export$3 = _export;
|
|
14826
|
-
$export$3($export$3.S + $export$3.F * !
|
|
14800
|
+
$export$3($export$3.S + $export$3.F * !_descriptors, "Object", { defineProperty: _objectDp.f });
|
|
14827
14801
|
var $Object$2 = _coreExports.Object;
|
|
14828
|
-
var defineProperty$7 = /* @__PURE__ */ __name(function
|
|
14802
|
+
var defineProperty$7 = /* @__PURE__ */ __name(function defineProperty3(it, key, desc) {
|
|
14829
14803
|
return $Object$2.defineProperty(it, key, desc);
|
|
14830
14804
|
}, "defineProperty");
|
|
14831
14805
|
var defineProperty$6 = { "default": defineProperty$7, __esModule: true };
|
|
@@ -14864,7 +14838,7 @@ var _meta = { exports: {} };
|
|
|
14864
14838
|
var META$1 = _uid("meta");
|
|
14865
14839
|
var isObject$b = _isObject;
|
|
14866
14840
|
var has$7 = _has;
|
|
14867
|
-
var setDesc =
|
|
14841
|
+
var setDesc = _objectDp.f;
|
|
14868
14842
|
var id = 0;
|
|
14869
14843
|
var isExtensible = Object.isExtensible || function() {
|
|
14870
14844
|
return true;
|
|
@@ -14917,7 +14891,7 @@ var meta = _meta.exports = {
|
|
|
14917
14891
|
var _metaExports = _meta.exports;
|
|
14918
14892
|
var core = _coreExports;
|
|
14919
14893
|
var wksExt$1 = _wksExt;
|
|
14920
|
-
var defineProperty$5 =
|
|
14894
|
+
var defineProperty$5 = _objectDp.f;
|
|
14921
14895
|
var _wksDefine = /* @__PURE__ */ __name(function(name) {
|
|
14922
14896
|
var $Symbol2 = core.Symbol || (core.Symbol = {});
|
|
14923
14897
|
if (name.charAt(0) != "_" && !(name in $Symbol2))
|
|
@@ -14971,9 +14945,9 @@ var createDesc$1 = _propertyDesc;
|
|
|
14971
14945
|
var toIObject$1 = _toIobject;
|
|
14972
14946
|
var toPrimitive$1 = _toPrimitive;
|
|
14973
14947
|
var has$6 = _has;
|
|
14974
|
-
var IE8_DOM_DEFINE =
|
|
14948
|
+
var IE8_DOM_DEFINE = _ie8DomDefine;
|
|
14975
14949
|
var gOPD$3 = Object.getOwnPropertyDescriptor;
|
|
14976
|
-
_objectGopd.f =
|
|
14950
|
+
_objectGopd.f = _descriptors ? gOPD$3 : /* @__PURE__ */ __name(function getOwnPropertyDescriptor(O2, P2) {
|
|
14977
14951
|
O2 = toIObject$1(O2);
|
|
14978
14952
|
P2 = toPrimitive$1(P2, true);
|
|
14979
14953
|
if (IE8_DOM_DEFINE)
|
|
@@ -14986,7 +14960,7 @@ _objectGopd.f = require_descriptors() ? gOPD$3 : /* @__PURE__ */ __name(function
|
|
|
14986
14960
|
}, "getOwnPropertyDescriptor");
|
|
14987
14961
|
var global$1 = _globalExports;
|
|
14988
14962
|
var has$5 = _has;
|
|
14989
|
-
var DESCRIPTORS =
|
|
14963
|
+
var DESCRIPTORS = _descriptors;
|
|
14990
14964
|
var $export$2 = _export;
|
|
14991
14965
|
var redefine = _redefine;
|
|
14992
14966
|
var META = _metaExports.KEY;
|
|
@@ -15009,7 +14983,7 @@ var _create$1 = _objectCreate;
|
|
|
15009
14983
|
var gOPNExt = _objectGopnExt;
|
|
15010
14984
|
var $GOPD = _objectGopd;
|
|
15011
14985
|
var $GOPS = _objectGops;
|
|
15012
|
-
var $DP =
|
|
14986
|
+
var $DP = _objectDp;
|
|
15013
14987
|
var $keys$1 = _objectKeys;
|
|
15014
14988
|
var gOPD$2 = $GOPD.f;
|
|
15015
14989
|
var dP = $DP.f;
|
|
@@ -15052,7 +15026,7 @@ var isSymbol$7 = USE_NATIVE && typeof $Symbol.iterator == "symbol" ? function(it
|
|
|
15052
15026
|
} : function(it) {
|
|
15053
15027
|
return it instanceof $Symbol;
|
|
15054
15028
|
};
|
|
15055
|
-
var $defineProperty$2 = /* @__PURE__ */ __name(function
|
|
15029
|
+
var $defineProperty$2 = /* @__PURE__ */ __name(function defineProperty4(it, key, D2) {
|
|
15056
15030
|
if (it === ObjectProto)
|
|
15057
15031
|
$defineProperty$2(OPSymbols, key, D2);
|
|
15058
15032
|
anObject(it);
|
|
@@ -35933,6 +35907,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
35933
35907
|
};
|
|
35934
35908
|
}
|
|
35935
35909
|
render() {
|
|
35910
|
+
var _b2;
|
|
35936
35911
|
const _a2 = this.props, {
|
|
35937
35912
|
multi,
|
|
35938
35913
|
options,
|
|
@@ -35943,6 +35918,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
35943
35918
|
tagInputProps: tagInputProps,
|
|
35944
35919
|
autoFocus,
|
|
35945
35920
|
autoOpen,
|
|
35921
|
+
mustHaveQueryToOpen,
|
|
35946
35922
|
noResultsText,
|
|
35947
35923
|
noResults: _noResults,
|
|
35948
35924
|
inputProps,
|
|
@@ -35966,6 +35942,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
35966
35942
|
"tagInputProps",
|
|
35967
35943
|
"autoFocus",
|
|
35968
35944
|
"autoOpen",
|
|
35945
|
+
"mustHaveQueryToOpen",
|
|
35969
35946
|
"noResultsText",
|
|
35970
35947
|
"noResults",
|
|
35971
35948
|
"inputProps",
|
|
@@ -35982,6 +35959,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
35982
35959
|
let noResults = _noResults;
|
|
35983
35960
|
if (noResults === void 0)
|
|
35984
35961
|
noResults = noResultsDefault;
|
|
35962
|
+
const hasQuery = ((_b2 = this.state.query) == null ? void 0 : _b2.length) > 0;
|
|
35985
35963
|
const hasValue = Array.isArray(value) ? value.length > 0 : !!value || value === 0;
|
|
35986
35964
|
const rightElement = isLoading ? /* @__PURE__ */ React__default.createElement(Button, { loading: true, minimal: true }) : /* @__PURE__ */ React__default.createElement("span", null, additionalRightEl, hasValue && !disallowClear && !disabled && /* @__PURE__ */ React__default.createElement(
|
|
35987
35965
|
Button,
|
|
@@ -36034,7 +36012,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
36034
36012
|
wrapperTagName: "div",
|
|
36035
36013
|
canEscapeKeyClose: true,
|
|
36036
36014
|
onInteraction: this.onInteraction,
|
|
36037
|
-
isOpen: this.state.isOpen,
|
|
36015
|
+
isOpen: mustHaveQueryToOpen ? hasQuery && this.state.isOpen : this.state.isOpen,
|
|
36038
36016
|
modifiers: popoverOverflowModifiers
|
|
36039
36017
|
}, popoverProps),
|
|
36040
36018
|
onItemSelect: this.handleItemSelect,
|
|
@@ -49787,7 +49765,7 @@ var KNOWN_STATICS = {
|
|
|
49787
49765
|
arguments: true,
|
|
49788
49766
|
arity: true
|
|
49789
49767
|
};
|
|
49790
|
-
var
|
|
49768
|
+
var defineProperty5 = Object.defineProperty;
|
|
49791
49769
|
var getOwnPropertyNames4 = Object.getOwnPropertyNames;
|
|
49792
49770
|
var getOwnPropertySymbols3 = Object.getOwnPropertySymbols;
|
|
49793
49771
|
var getOwnPropertyDescriptor3 = Object.getOwnPropertyDescriptor;
|
|
@@ -49810,7 +49788,7 @@ function hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {
|
|
|
49810
49788
|
if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {
|
|
49811
49789
|
var descriptor2 = getOwnPropertyDescriptor3(sourceComponent, key);
|
|
49812
49790
|
try {
|
|
49813
|
-
|
|
49791
|
+
defineProperty5(targetComponent, key, descriptor2);
|
|
49814
49792
|
} catch (e2) {
|
|
49815
49793
|
}
|
|
49816
49794
|
}
|
|
@@ -70926,11 +70904,13 @@ const _ResizableDraggableDialog = class _ResizableDraggableDialog extends React_
|
|
|
70926
70904
|
};
|
|
70927
70905
|
__name(_ResizableDraggableDialog, "ResizableDraggableDialog");
|
|
70928
70906
|
let ResizableDraggableDialog = _ResizableDraggableDialog;
|
|
70929
|
-
function MenuItemLink({ text: text2, onClick, icon, navTo }) {
|
|
70907
|
+
function MenuItemLink({ text: text2, onClick, icon, navTo, active: active3 }) {
|
|
70930
70908
|
const handleLinkClick = /* @__PURE__ */ __name((e2) => {
|
|
70931
70909
|
e2.target.closest(`.${Classes.POPOVER_DISMISS}`).click();
|
|
70932
70910
|
}, "handleLinkClick");
|
|
70933
|
-
return /* @__PURE__ */ React__default.createElement("li", { className: Classes.POPOVER_DISMISS, onClick }, /* @__PURE__ */ React__default.createElement(Link, { onClick: handleLinkClick, to: navTo, className:
|
|
70911
|
+
return /* @__PURE__ */ React__default.createElement("li", { className: Classes.POPOVER_DISMISS, onClick }, /* @__PURE__ */ React__default.createElement(Link, { onClick: handleLinkClick, to: navTo, className: classNames(Classes.MENU_ITEM, {
|
|
70912
|
+
[Classes.ACTIVE]: active3
|
|
70913
|
+
}) }, icon && /* @__PURE__ */ React__default.createElement(Icon, { icon }), /* @__PURE__ */ React__default.createElement("div", { className: "bp3-text-overflow-ellipsis bp3-fill" }, text2)));
|
|
70934
70914
|
}
|
|
70935
70915
|
__name(MenuItemLink, "MenuItemLink");
|
|
70936
70916
|
const EnhancedMenuItem = compose(
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@teselagen/ui",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.6",
|
|
4
4
|
"main": "./src/index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
@@ -40,9 +40,7 @@
|
|
|
40
40
|
"papaparse": "^5.3.2",
|
|
41
41
|
"prop-types": "^15.6.2",
|
|
42
42
|
"qs": "^6.9.6",
|
|
43
|
-
"react": "18.2.0",
|
|
44
43
|
"react-color": "^2.19.3",
|
|
45
|
-
"react-dom": "18.2.0",
|
|
46
44
|
"react-dropzone": "^11.4.2",
|
|
47
45
|
"react-markdown": "8.0.7",
|
|
48
46
|
"react-redux": "^8.0.5",
|
|
@@ -151,8 +151,8 @@ export default class DisplayOptions extends React.Component {
|
|
|
151
151
|
extraCompact
|
|
152
152
|
? "extraCompact"
|
|
153
153
|
: compact
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
? "compact"
|
|
155
|
+
: "normal"
|
|
156
156
|
}
|
|
157
157
|
>
|
|
158
158
|
<option className={Classes.POPOVER_DISMISS} value="normal">
|
|
@@ -126,8 +126,8 @@ export default compose(
|
|
|
126
126
|
return field.render
|
|
127
127
|
? !field.render(val, e)
|
|
128
128
|
: cellRenderer[field.path]
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
? !cellRenderer[field.path](val, e)
|
|
130
|
+
: !val;
|
|
131
131
|
});
|
|
132
132
|
}
|
|
133
133
|
if (noValsForField) {
|
|
@@ -151,6 +151,6 @@ export function finalizeSelection({ idMap, entities, props }) {
|
|
|
151
151
|
selectedRecords.length === 0
|
|
152
152
|
? onDeselect()
|
|
153
153
|
: selectedRecords.length > 1
|
|
154
|
-
|
|
155
|
-
|
|
154
|
+
? onMultiRowSelect(selectedRecords)
|
|
155
|
+
: onSingleRowSelect(selectedRecords[0]);
|
|
156
156
|
}
|
package/src/TgSelect/index.js
CHANGED
|
@@ -233,6 +233,7 @@ class TgSelect extends React.Component {
|
|
|
233
233
|
tagInputProps,
|
|
234
234
|
autoFocus,
|
|
235
235
|
autoOpen,
|
|
236
|
+
mustHaveQueryToOpen,
|
|
236
237
|
noResultsText,
|
|
237
238
|
noResults: _noResults,
|
|
238
239
|
inputProps,
|
|
@@ -251,6 +252,7 @@ class TgSelect extends React.Component {
|
|
|
251
252
|
|
|
252
253
|
// Null is also a valid value for a React Component, noResultsDefault should only be appplied when noResults is undefined
|
|
253
254
|
if (noResults === undefined) noResults = noResultsDefault;
|
|
255
|
+
const hasQuery = this.state.query?.length > 0;
|
|
254
256
|
const hasValue = Array.isArray(value)
|
|
255
257
|
? value.length > 0
|
|
256
258
|
: !!value || value === 0;
|
|
@@ -321,7 +323,9 @@ class TgSelect extends React.Component {
|
|
|
321
323
|
wrapperTagName: "div",
|
|
322
324
|
canEscapeKeyClose: true,
|
|
323
325
|
onInteraction: this.onInteraction,
|
|
324
|
-
isOpen:
|
|
326
|
+
isOpen: mustHaveQueryToOpen
|
|
327
|
+
? hasQuery && this.state.isOpen
|
|
328
|
+
: this.state.isOpen,
|
|
325
329
|
modifiers: popoverOverflowModifiers,
|
|
326
330
|
...popoverProps
|
|
327
331
|
}}
|
package/src/utils/menuUtils.js
CHANGED
|
@@ -21,16 +21,20 @@ import {
|
|
|
21
21
|
noop
|
|
22
22
|
} from "lodash-es";
|
|
23
23
|
import fuzzysearch from "fuzzysearch";
|
|
24
|
-
|
|
24
|
+
import classNames from "classnames";
|
|
25
25
|
// https://github.com/palantir/blueprint/issues/2820
|
|
26
|
-
function MenuItemLink({ text, onClick, icon, navTo }) {
|
|
26
|
+
function MenuItemLink({ text, onClick, icon, navTo, active }) {
|
|
27
27
|
const handleLinkClick = e => {
|
|
28
28
|
e.target.closest(`.${Classes.POPOVER_DISMISS}`).click();
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
return (
|
|
32
32
|
<li className={Classes.POPOVER_DISMISS} onClick={onClick}>
|
|
33
|
-
<Link onClick={handleLinkClick} to={navTo} className=
|
|
33
|
+
<Link onClick={handleLinkClick} to={navTo} className={
|
|
34
|
+
classNames(Classes.MENU_ITEM, {
|
|
35
|
+
[Classes.ACTIVE]: active
|
|
36
|
+
})
|
|
37
|
+
}>
|
|
34
38
|
{icon && <Icon icon={icon} />}
|
|
35
39
|
<div className="bp3-text-overflow-ellipsis bp3-fill">{text}</div>
|
|
36
40
|
</Link>
|