@teselagen/ui 0.10.21 → 0.10.23
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
CHANGED
|
@@ -32672,7 +32672,7 @@ const _TgSelect = class _TgSelect extends React.Component {
|
|
|
32672
32672
|
};
|
|
32673
32673
|
}
|
|
32674
32674
|
render() {
|
|
32675
|
-
var _b;
|
|
32675
|
+
var _b, _c;
|
|
32676
32676
|
let _a = this.props, {
|
|
32677
32677
|
multi,
|
|
32678
32678
|
asTag,
|
|
@@ -32772,6 +32772,7 @@ const _TgSelect = class _TgSelect extends React.Component {
|
|
|
32772
32772
|
(opt) => opt && opt.value === (value2 && value2.value || value2)
|
|
32773
32773
|
);
|
|
32774
32774
|
});
|
|
32775
|
+
const inputClassname = `${multi ? "tg-multiselect-input" : "tg-single-select-input"} ${tagInputProps && ((_c = tagInputProps.inputProps) == null ? void 0 : _c.className) || ""}`;
|
|
32775
32776
|
const toRet = /* @__PURE__ */ React.createElement(
|
|
32776
32777
|
select.MultiSelect,
|
|
32777
32778
|
__spreadValues(__spreadValues({
|
|
@@ -32848,12 +32849,14 @@ const _TgSelect = class _TgSelect extends React.Component {
|
|
|
32848
32849
|
this.setOpenState(true);
|
|
32849
32850
|
}
|
|
32850
32851
|
}, "onKeyDown"),
|
|
32851
|
-
inputProps: __spreadValues({
|
|
32852
|
+
inputProps: __spreadProps(__spreadValues({
|
|
32852
32853
|
autoComplete: "off",
|
|
32853
32854
|
name: "tg-multiselect-input",
|
|
32854
32855
|
autoFocus: autoFocus || autoOpen,
|
|
32855
32856
|
onBlur
|
|
32856
|
-
}, tagInputProps && tagInputProps.inputProps)
|
|
32857
|
+
}, tagInputProps && tagInputProps.inputProps), {
|
|
32858
|
+
className: inputClassname
|
|
32859
|
+
})
|
|
32857
32860
|
})
|
|
32858
32861
|
}), rest)
|
|
32859
32862
|
);
|
|
@@ -35095,6 +35098,7 @@ const DisplayOptions = /* @__PURE__ */ __name(({
|
|
|
35095
35098
|
}, "DisplayOptions");
|
|
35096
35099
|
const { LoadingComponent: LoadingComponent2 } = ReactTableDefaults;
|
|
35097
35100
|
function DisabledLoadingComponent({ disabled, loading, loadingText }) {
|
|
35101
|
+
if (!loading) return null;
|
|
35098
35102
|
return /* @__PURE__ */ React.createElement(
|
|
35099
35103
|
LoadingComponent2,
|
|
35100
35104
|
{
|
|
@@ -67666,6 +67670,7 @@ function AdvancedOptions({
|
|
|
67666
67670
|
__name(AdvancedOptions, "AdvancedOptions");
|
|
67667
67671
|
const TgHTMLSelect = /* @__PURE__ */ __name((_O) => {
|
|
67668
67672
|
var _P = _O, { disabled } = _P, rest = __objRest(_P, ["disabled"]);
|
|
67673
|
+
rest["data-test-value"] = rest.value;
|
|
67669
67674
|
if (disabled) {
|
|
67670
67675
|
const opt = rest.options.find((o2) => o2.value === rest.value);
|
|
67671
67676
|
return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({}, rest), { className: classNames("bp3-html-select", rest.className) }), opt.label);
|
package/index.es.js
CHANGED
|
@@ -32654,7 +32654,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
32654
32654
|
};
|
|
32655
32655
|
}
|
|
32656
32656
|
render() {
|
|
32657
|
-
var _b;
|
|
32657
|
+
var _b, _c;
|
|
32658
32658
|
let _a = this.props, {
|
|
32659
32659
|
multi,
|
|
32660
32660
|
asTag,
|
|
@@ -32754,6 +32754,7 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
32754
32754
|
(opt) => opt && opt.value === (value2 && value2.value || value2)
|
|
32755
32755
|
);
|
|
32756
32756
|
});
|
|
32757
|
+
const inputClassname = `${multi ? "tg-multiselect-input" : "tg-single-select-input"} ${tagInputProps && ((_c = tagInputProps.inputProps) == null ? void 0 : _c.className) || ""}`;
|
|
32757
32758
|
const toRet = /* @__PURE__ */ React__default.createElement(
|
|
32758
32759
|
MultiSelect,
|
|
32759
32760
|
__spreadValues(__spreadValues({
|
|
@@ -32830,12 +32831,14 @@ const _TgSelect = class _TgSelect extends React__default.Component {
|
|
|
32830
32831
|
this.setOpenState(true);
|
|
32831
32832
|
}
|
|
32832
32833
|
}, "onKeyDown"),
|
|
32833
|
-
inputProps: __spreadValues({
|
|
32834
|
+
inputProps: __spreadProps(__spreadValues({
|
|
32834
32835
|
autoComplete: "off",
|
|
32835
32836
|
name: "tg-multiselect-input",
|
|
32836
32837
|
autoFocus: autoFocus || autoOpen,
|
|
32837
32838
|
onBlur
|
|
32838
|
-
}, tagInputProps && tagInputProps.inputProps)
|
|
32839
|
+
}, tagInputProps && tagInputProps.inputProps), {
|
|
32840
|
+
className: inputClassname
|
|
32841
|
+
})
|
|
32839
32842
|
})
|
|
32840
32843
|
}), rest)
|
|
32841
32844
|
);
|
|
@@ -35077,6 +35080,7 @@ const DisplayOptions = /* @__PURE__ */ __name(({
|
|
|
35077
35080
|
}, "DisplayOptions");
|
|
35078
35081
|
const { LoadingComponent: LoadingComponent2 } = ReactTableDefaults;
|
|
35079
35082
|
function DisabledLoadingComponent({ disabled, loading, loadingText }) {
|
|
35083
|
+
if (!loading) return null;
|
|
35080
35084
|
return /* @__PURE__ */ React__default.createElement(
|
|
35081
35085
|
LoadingComponent2,
|
|
35082
35086
|
{
|
|
@@ -67648,6 +67652,7 @@ function AdvancedOptions({
|
|
|
67648
67652
|
__name(AdvancedOptions, "AdvancedOptions");
|
|
67649
67653
|
const TgHTMLSelect = /* @__PURE__ */ __name((_O) => {
|
|
67650
67654
|
var _P = _O, { disabled } = _P, rest = __objRest(_P, ["disabled"]);
|
|
67655
|
+
rest["data-test-value"] = rest.value;
|
|
67651
67656
|
if (disabled) {
|
|
67652
67657
|
const opt = rest.options.find((o2) => o2.value === rest.value);
|
|
67653
67658
|
return /* @__PURE__ */ React__default.createElement("div", __spreadProps(__spreadValues({}, rest), { className: classNames("bp3-html-select", rest.className) }), opt.label);
|
package/index.umd.js
CHANGED
|
@@ -60275,7 +60275,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
60275
60275
|
};
|
|
60276
60276
|
}
|
|
60277
60277
|
render() {
|
|
60278
|
-
var _b2;
|
|
60278
|
+
var _b2, _c2;
|
|
60279
60279
|
let _a2 = this.props, {
|
|
60280
60280
|
multi,
|
|
60281
60281
|
asTag,
|
|
@@ -60375,6 +60375,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
60375
60375
|
(opt) => opt && opt.value === (value2 && value2.value || value2)
|
|
60376
60376
|
);
|
|
60377
60377
|
});
|
|
60378
|
+
const inputClassname = `${multi ? "tg-multiselect-input" : "tg-single-select-input"} ${tagInputProps && ((_c2 = tagInputProps.inputProps) == null ? void 0 : _c2.className) || ""}`;
|
|
60378
60379
|
const toRet = /* @__PURE__ */ React.createElement(
|
|
60379
60380
|
MultiSelect,
|
|
60380
60381
|
__spreadValues(__spreadValues({
|
|
@@ -60451,12 +60452,14 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
60451
60452
|
this.setOpenState(true);
|
|
60452
60453
|
}
|
|
60453
60454
|
}, "onKeyDown"),
|
|
60454
|
-
inputProps: __spreadValues({
|
|
60455
|
+
inputProps: __spreadProps(__spreadValues({
|
|
60455
60456
|
autoComplete: "off",
|
|
60456
60457
|
name: "tg-multiselect-input",
|
|
60457
60458
|
autoFocus: autoFocus || autoOpen,
|
|
60458
60459
|
onBlur
|
|
60459
|
-
}, tagInputProps && tagInputProps.inputProps)
|
|
60460
|
+
}, tagInputProps && tagInputProps.inputProps), {
|
|
60461
|
+
className: inputClassname
|
|
60462
|
+
})
|
|
60460
60463
|
})
|
|
60461
60464
|
}), rest)
|
|
60462
60465
|
);
|
|
@@ -62698,6 +62701,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
62698
62701
|
}, "DisplayOptions");
|
|
62699
62702
|
const { LoadingComponent } = ReactTableDefaults;
|
|
62700
62703
|
function DisabledLoadingComponent({ disabled, loading, loadingText }) {
|
|
62704
|
+
if (!loading) return null;
|
|
62701
62705
|
return /* @__PURE__ */ React.createElement(
|
|
62702
62706
|
LoadingComponent,
|
|
62703
62707
|
{
|
|
@@ -95101,6 +95105,7 @@ ${latestSubscriptionCallbackError.current.stack}
|
|
|
95101
95105
|
__name(AdvancedOptions, "AdvancedOptions");
|
|
95102
95106
|
const TgHTMLSelect = /* @__PURE__ */ __name((_O) => {
|
|
95103
95107
|
var _P = _O, { disabled } = _P, rest = __objRest(_P, ["disabled"]);
|
|
95108
|
+
rest["data-test-value"] = rest.value;
|
|
95104
95109
|
if (disabled) {
|
|
95105
95110
|
const opt = rest.options.find((o2) => o2.value === rest.value);
|
|
95106
95111
|
return /* @__PURE__ */ React.createElement("div", __spreadProps(__spreadValues({}, rest), { className: classNames$1("bp3-html-select", rest.className) }), opt.label);
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { ReactTableDefaults } from "@teselagen/react-table";
|
|
|
3
3
|
const { LoadingComponent } = ReactTableDefaults;
|
|
4
4
|
|
|
5
5
|
function DisabledLoadingComponent({ disabled, loading, loadingText }) {
|
|
6
|
+
if (!loading) return null;
|
|
6
7
|
return (
|
|
7
8
|
<LoadingComponent
|
|
8
9
|
className={disabled ? "disabled" : ""}
|
|
@@ -6,6 +6,7 @@ import classNames from "classnames";
|
|
|
6
6
|
// look like a regular html select with the selected option displayed
|
|
7
7
|
// (instead of greyed out and without the ability to have tooltips working)
|
|
8
8
|
const TgHTMLSelect = ({ disabled, ...rest }) => {
|
|
9
|
+
rest["data-test-value"] = rest.value;
|
|
9
10
|
if (disabled) {
|
|
10
11
|
const opt = rest.options.find(o => o.value === rest.value);
|
|
11
12
|
return (
|
package/src/TgSelect/index.js
CHANGED
|
@@ -334,6 +334,7 @@ class TgSelect extends React.Component {
|
|
|
334
334
|
opt => opt && opt.value === ((value && value.value) || value)
|
|
335
335
|
);
|
|
336
336
|
});
|
|
337
|
+
const inputClassname = `${multi ? "tg-multiselect-input" : "tg-single-select-input"} ${(tagInputProps && tagInputProps.inputProps?.className) || ""}`;
|
|
337
338
|
const toRet = (
|
|
338
339
|
<MultiSelect
|
|
339
340
|
onActiveItemChange={this.handleActiveItemChange}
|
|
@@ -433,7 +434,8 @@ class TgSelect extends React.Component {
|
|
|
433
434
|
name: "tg-multiselect-input",
|
|
434
435
|
autoFocus: autoFocus || autoOpen,
|
|
435
436
|
onBlur,
|
|
436
|
-
...(tagInputProps && tagInputProps.inputProps)
|
|
437
|
+
...(tagInputProps && tagInputProps.inputProps),
|
|
438
|
+
className: inputClassname
|
|
437
439
|
}
|
|
438
440
|
}
|
|
439
441
|
}}
|