@true-engineering/true-react-common-ui-kit 1.1.0 → 1.3.0
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/README.md +6 -0
- package/dist/components/FlexibleTable/types.d.ts +2 -2
- package/dist/components/Select/Select.d.ts +8 -7
- package/dist/components/Select/SelectList/SelectList.d.ts +8 -8
- package/dist/components/Select/helpers.d.ts +1 -0
- package/dist/true-react-common-ui-kit.js +193 -138
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +193 -138
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +3 -2
- package/src/components/DateInput/DateInput.stories.tsx +1 -1
- package/src/components/FiltersPane/FilterWithPeriod/FilterWithPeriod.tsx +1 -1
- package/src/components/FlexibleTable/FlexibleTable.tsx +2 -0
- package/src/components/FlexibleTable/TableRow.tsx +3 -1
- package/src/components/FlexibleTable/TableValue.tsx +2 -5
- package/src/components/FlexibleTable/types.ts +2 -2
- package/src/components/IncrementInput/IncrementInput.stories.tsx +1 -1
- package/src/components/NumberInput/NumberInput.stories.tsx +1 -1
- package/src/components/Select/Select.stories.tsx +30 -18
- package/src/components/Select/Select.tsx +77 -73
- package/src/components/Select/SelectList/SelectList.tsx +35 -42
- package/src/components/Select/helpers.ts +5 -0
|
@@ -3149,7 +3149,7 @@
|
|
|
3149
3149
|
function _non_iterable_spread$4() {
|
|
3150
3150
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
3151
3151
|
}
|
|
3152
|
-
function _object_spread$
|
|
3152
|
+
function _object_spread$N(target) {
|
|
3153
3153
|
for (var i = 1; i < arguments.length; i++) {
|
|
3154
3154
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
3155
3155
|
var ownKeys2 = Object.keys(source);
|
|
@@ -3215,7 +3215,7 @@
|
|
|
3215
3215
|
},
|
|
3216
3216
|
{
|
|
3217
3217
|
name: "flip",
|
|
3218
|
-
options: _object_spread$
|
|
3218
|
+
options: _object_spread$N({
|
|
3219
3219
|
fallbackPlacements: canBeFlipped ? [
|
|
3220
3220
|
"bottom-start",
|
|
3221
3221
|
"top-start"
|
|
@@ -4097,7 +4097,7 @@
|
|
|
4097
4097
|
}
|
|
4098
4098
|
return obj;
|
|
4099
4099
|
}
|
|
4100
|
-
function _object_spread$
|
|
4100
|
+
function _object_spread$M(target) {
|
|
4101
4101
|
for (var i = 1; i < arguments.length; i++) {
|
|
4102
4102
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4103
4103
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4112,7 +4112,7 @@
|
|
|
4112
4112
|
}
|
|
4113
4113
|
return target;
|
|
4114
4114
|
}
|
|
4115
|
-
function ownKeys$
|
|
4115
|
+
function ownKeys$C(object, enumerableOnly) {
|
|
4116
4116
|
var keys = Object.keys(object);
|
|
4117
4117
|
if (Object.getOwnPropertySymbols) {
|
|
4118
4118
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4125,12 +4125,12 @@
|
|
|
4125
4125
|
}
|
|
4126
4126
|
return keys;
|
|
4127
4127
|
}
|
|
4128
|
-
function _object_spread_props$
|
|
4128
|
+
function _object_spread_props$C(target, source) {
|
|
4129
4129
|
source = source != null ? source : {};
|
|
4130
4130
|
if (Object.getOwnPropertyDescriptors) {
|
|
4131
4131
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4132
4132
|
} else {
|
|
4133
|
-
ownKeys$
|
|
4133
|
+
ownKeys$C(Object(source)).forEach(function(key) {
|
|
4134
4134
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4135
4135
|
});
|
|
4136
4136
|
}
|
|
@@ -4141,7 +4141,7 @@
|
|
|
4141
4141
|
var _icon_paths, _icon_rects, _icon_circles;
|
|
4142
4142
|
var theme = React.useContext(ThemeContext).theme;
|
|
4143
4143
|
var icons$1 = React.useMemo(function() {
|
|
4144
|
-
return _object_spread$
|
|
4144
|
+
return _object_spread$M({}, icons, theme.icons);
|
|
4145
4145
|
}, []);
|
|
4146
4146
|
var icon = icons$1[type];
|
|
4147
4147
|
var _icon_viewBox, _path_fill, _path_stroke;
|
|
@@ -4153,7 +4153,7 @@
|
|
|
4153
4153
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4154
4154
|
children: [
|
|
4155
4155
|
(_icon_paths = icon.paths) === null || _icon_paths === void 0 ? void 0 : _icon_paths.map(function(path, index) {
|
|
4156
|
-
return /* @__PURE__ */ jsx("path", _object_spread$
|
|
4156
|
+
return /* @__PURE__ */ jsx("path", _object_spread$M({
|
|
4157
4157
|
fillRule: "evenodd",
|
|
4158
4158
|
clipRule: "evenodd",
|
|
4159
4159
|
fill: (_path_fill = path.fill) !== null && _path_fill !== void 0 ? _path_fill : "currentColor",
|
|
@@ -4161,12 +4161,12 @@
|
|
|
4161
4161
|
}, path), index);
|
|
4162
4162
|
}),
|
|
4163
4163
|
(_icon_rects = icon.rects) === null || _icon_rects === void 0 ? void 0 : _icon_rects.map(function(rect, index) {
|
|
4164
|
-
return /* @__PURE__ */ React.createElement("rect", _object_spread_props$
|
|
4164
|
+
return /* @__PURE__ */ React.createElement("rect", _object_spread_props$C(_object_spread$M({}, rect), {
|
|
4165
4165
|
key: index
|
|
4166
4166
|
}));
|
|
4167
4167
|
}),
|
|
4168
4168
|
(_icon_circles = icon.circles) === null || _icon_circles === void 0 ? void 0 : _icon_circles.map(function(circle, index) {
|
|
4169
|
-
return /* @__PURE__ */ React.createElement("circle", _object_spread_props$
|
|
4169
|
+
return /* @__PURE__ */ React.createElement("circle", _object_spread_props$C(_object_spread$M({}, circle), {
|
|
4170
4170
|
key: index
|
|
4171
4171
|
}));
|
|
4172
4172
|
})
|
|
@@ -4247,7 +4247,7 @@
|
|
|
4247
4247
|
}
|
|
4248
4248
|
return obj;
|
|
4249
4249
|
}
|
|
4250
|
-
function _object_spread$
|
|
4250
|
+
function _object_spread$L(target) {
|
|
4251
4251
|
for (var i = 1; i < arguments.length; i++) {
|
|
4252
4252
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4253
4253
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4266,7 +4266,7 @@
|
|
|
4266
4266
|
var type = param.type;
|
|
4267
4267
|
var theme = React.useContext(ThemeContext).theme;
|
|
4268
4268
|
var icons2 = React.useMemo(function() {
|
|
4269
|
-
return _object_spread$
|
|
4269
|
+
return _object_spread$L({}, complexIcons, theme.complexIcons);
|
|
4270
4270
|
}, []);
|
|
4271
4271
|
var ComplexIcon = icons2[type];
|
|
4272
4272
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -4294,7 +4294,7 @@
|
|
|
4294
4294
|
}
|
|
4295
4295
|
return obj;
|
|
4296
4296
|
}
|
|
4297
|
-
function _object_spread$
|
|
4297
|
+
function _object_spread$K(target) {
|
|
4298
4298
|
for (var i = 1; i < arguments.length; i++) {
|
|
4299
4299
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4300
4300
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4309,7 +4309,7 @@
|
|
|
4309
4309
|
}
|
|
4310
4310
|
return target;
|
|
4311
4311
|
}
|
|
4312
|
-
function ownKeys$
|
|
4312
|
+
function ownKeys$B(object, enumerableOnly) {
|
|
4313
4313
|
var keys = Object.keys(object);
|
|
4314
4314
|
if (Object.getOwnPropertySymbols) {
|
|
4315
4315
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4322,12 +4322,12 @@
|
|
|
4322
4322
|
}
|
|
4323
4323
|
return keys;
|
|
4324
4324
|
}
|
|
4325
|
-
function _object_spread_props$
|
|
4325
|
+
function _object_spread_props$B(target, source) {
|
|
4326
4326
|
source = source != null ? source : {};
|
|
4327
4327
|
if (Object.getOwnPropertyDescriptors) {
|
|
4328
4328
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4329
4329
|
} else {
|
|
4330
|
-
ownKeys$
|
|
4330
|
+
ownKeys$B(Object(source)).forEach(function(key) {
|
|
4331
4331
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4332
4332
|
});
|
|
4333
4333
|
}
|
|
@@ -4339,7 +4339,7 @@
|
|
|
4339
4339
|
var Icon = function(param) {
|
|
4340
4340
|
var type = param.type, data = param.data, tweakStyles = param.tweakStyles;
|
|
4341
4341
|
var classes = useTheme("Icon", styles$K, tweakStyles).classes;
|
|
4342
|
-
return /* @__PURE__ */ jsx("div", _object_spread_props$
|
|
4342
|
+
return /* @__PURE__ */ jsx("div", _object_spread_props$B(_object_spread$K({
|
|
4343
4343
|
className: classes.root
|
|
4344
4344
|
}, addDataAttributes(data)), {
|
|
4345
4345
|
children: isComplexIcon(type) ? /* @__PURE__ */ jsx(ComplexIconBoilerplate, {
|
|
@@ -4408,7 +4408,7 @@
|
|
|
4408
4408
|
}
|
|
4409
4409
|
return obj;
|
|
4410
4410
|
}
|
|
4411
|
-
function _object_spread$
|
|
4411
|
+
function _object_spread$J(target) {
|
|
4412
4412
|
for (var i = 1; i < arguments.length; i++) {
|
|
4413
4413
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4414
4414
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4423,7 +4423,7 @@
|
|
|
4423
4423
|
}
|
|
4424
4424
|
return target;
|
|
4425
4425
|
}
|
|
4426
|
-
function ownKeys$
|
|
4426
|
+
function ownKeys$A(object, enumerableOnly) {
|
|
4427
4427
|
var keys = Object.keys(object);
|
|
4428
4428
|
if (Object.getOwnPropertySymbols) {
|
|
4429
4429
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4436,12 +4436,12 @@
|
|
|
4436
4436
|
}
|
|
4437
4437
|
return keys;
|
|
4438
4438
|
}
|
|
4439
|
-
function _object_spread_props$
|
|
4439
|
+
function _object_spread_props$A(target, source) {
|
|
4440
4440
|
source = source != null ? source : {};
|
|
4441
4441
|
if (Object.getOwnPropertyDescriptors) {
|
|
4442
4442
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4443
4443
|
} else {
|
|
4444
|
-
ownKeys$
|
|
4444
|
+
ownKeys$A(Object(source)).forEach(function(key) {
|
|
4445
4445
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4446
4446
|
});
|
|
4447
4447
|
}
|
|
@@ -4455,7 +4455,7 @@
|
|
|
4455
4455
|
onClick === null || onClick === void 0 ? void 0 : onClick();
|
|
4456
4456
|
};
|
|
4457
4457
|
var _item_testId;
|
|
4458
|
-
return /* @__PURE__ */ jsx("div", _object_spread_props$
|
|
4458
|
+
return /* @__PURE__ */ jsx("div", _object_spread_props$A(_object_spread$J({
|
|
4459
4459
|
className: classes.root
|
|
4460
4460
|
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
4461
4461
|
children: items.map(function(item, idx) {
|
|
@@ -4465,7 +4465,7 @@
|
|
|
4465
4465
|
item.shouldDrawSpacerAbove && /* @__PURE__ */ jsx("div", {
|
|
4466
4466
|
className: classes.spacer
|
|
4467
4467
|
}),
|
|
4468
|
-
/* @__PURE__ */ jsxs("div", _object_spread_props$
|
|
4468
|
+
/* @__PURE__ */ jsxs("div", _object_spread_props$A(_object_spread$J({
|
|
4469
4469
|
className: clsx(classes.item, (_obj = {}, _define_property$K(_obj, classes.disabledItem, item.disabled), _define_property$K(_obj, classes.withIconGap, item.withIconGap), _obj))
|
|
4470
4470
|
}, addDataTestId((_item_testId = item.testId) !== null && _item_testId !== void 0 ? _item_testId : getTestId(testId, "item-".concat(idx))), item.disabled && addDataAttributes({
|
|
4471
4471
|
disabled: item.disabled
|
|
@@ -4507,7 +4507,7 @@
|
|
|
4507
4507
|
}
|
|
4508
4508
|
return obj;
|
|
4509
4509
|
}
|
|
4510
|
-
function _object_spread$
|
|
4510
|
+
function _object_spread$I(target) {
|
|
4511
4511
|
for (var i = 1; i < arguments.length; i++) {
|
|
4512
4512
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4513
4513
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4522,7 +4522,7 @@
|
|
|
4522
4522
|
}
|
|
4523
4523
|
return target;
|
|
4524
4524
|
}
|
|
4525
|
-
function ownKeys$
|
|
4525
|
+
function ownKeys$z(object, enumerableOnly) {
|
|
4526
4526
|
var keys = Object.keys(object);
|
|
4527
4527
|
if (Object.getOwnPropertySymbols) {
|
|
4528
4528
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4535,18 +4535,18 @@
|
|
|
4535
4535
|
}
|
|
4536
4536
|
return keys;
|
|
4537
4537
|
}
|
|
4538
|
-
function _object_spread_props$
|
|
4538
|
+
function _object_spread_props$z(target, source) {
|
|
4539
4539
|
source = source != null ? source : {};
|
|
4540
4540
|
if (Object.getOwnPropertyDescriptors) {
|
|
4541
4541
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4542
4542
|
} else {
|
|
4543
|
-
ownKeys$
|
|
4543
|
+
ownKeys$z(Object(source)).forEach(function(key) {
|
|
4544
4544
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4545
4545
|
});
|
|
4546
4546
|
}
|
|
4547
4547
|
return target;
|
|
4548
4548
|
}
|
|
4549
|
-
var styles$I = _object_spread_props$
|
|
4549
|
+
var styles$I = _object_spread_props$z(_object_spread$I({
|
|
4550
4550
|
root: {
|
|
4551
4551
|
display: "flex"
|
|
4552
4552
|
},
|
|
@@ -4645,7 +4645,7 @@
|
|
|
4645
4645
|
function _non_iterable_rest$n() {
|
|
4646
4646
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
4647
4647
|
}
|
|
4648
|
-
function _object_spread$
|
|
4648
|
+
function _object_spread$H(target) {
|
|
4649
4649
|
for (var i = 1; i < arguments.length; i++) {
|
|
4650
4650
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4651
4651
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4660,7 +4660,7 @@
|
|
|
4660
4660
|
}
|
|
4661
4661
|
return target;
|
|
4662
4662
|
}
|
|
4663
|
-
function ownKeys$
|
|
4663
|
+
function ownKeys$y(object, enumerableOnly) {
|
|
4664
4664
|
var keys = Object.keys(object);
|
|
4665
4665
|
if (Object.getOwnPropertySymbols) {
|
|
4666
4666
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4673,12 +4673,12 @@
|
|
|
4673
4673
|
}
|
|
4674
4674
|
return keys;
|
|
4675
4675
|
}
|
|
4676
|
-
function _object_spread_props$
|
|
4676
|
+
function _object_spread_props$y(target, source) {
|
|
4677
4677
|
source = source != null ? source : {};
|
|
4678
4678
|
if (Object.getOwnPropertyDescriptors) {
|
|
4679
4679
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4680
4680
|
} else {
|
|
4681
|
-
ownKeys$
|
|
4681
|
+
ownKeys$y(Object(source)).forEach(function(key) {
|
|
4682
4682
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4683
4683
|
});
|
|
4684
4684
|
}
|
|
@@ -4719,7 +4719,7 @@
|
|
|
4719
4719
|
return setIsMenuOpen(false);
|
|
4720
4720
|
}, nameRef);
|
|
4721
4721
|
var tweakListStyles = useTweakStyles(componentStyles, tweakStyles, "tweakList");
|
|
4722
|
-
return /* @__PURE__ */ jsxs("div", _object_spread_props$
|
|
4722
|
+
return /* @__PURE__ */ jsxs("div", _object_spread_props$y(_object_spread$H({
|
|
4723
4723
|
className: classes.root
|
|
4724
4724
|
}, addDataAttributes(data)), {
|
|
4725
4725
|
tabIndex: 0,
|
|
@@ -4809,7 +4809,7 @@
|
|
|
4809
4809
|
}
|
|
4810
4810
|
return obj;
|
|
4811
4811
|
}
|
|
4812
|
-
function _object_spread$
|
|
4812
|
+
function _object_spread$G(target) {
|
|
4813
4813
|
for (var i = 1; i < arguments.length; i++) {
|
|
4814
4814
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4815
4815
|
var ownKeys2 = Object.keys(source);
|
|
@@ -4824,7 +4824,7 @@
|
|
|
4824
4824
|
}
|
|
4825
4825
|
return target;
|
|
4826
4826
|
}
|
|
4827
|
-
function ownKeys$
|
|
4827
|
+
function ownKeys$x(object, enumerableOnly) {
|
|
4828
4828
|
var keys = Object.keys(object);
|
|
4829
4829
|
if (Object.getOwnPropertySymbols) {
|
|
4830
4830
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -4837,12 +4837,12 @@
|
|
|
4837
4837
|
}
|
|
4838
4838
|
return keys;
|
|
4839
4839
|
}
|
|
4840
|
-
function _object_spread_props$
|
|
4840
|
+
function _object_spread_props$x(target, source) {
|
|
4841
4841
|
source = source != null ? source : {};
|
|
4842
4842
|
if (Object.getOwnPropertyDescriptors) {
|
|
4843
4843
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4844
4844
|
} else {
|
|
4845
|
-
ownKeys$
|
|
4845
|
+
ownKeys$x(Object(source)).forEach(function(key) {
|
|
4846
4846
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4847
4847
|
});
|
|
4848
4848
|
}
|
|
@@ -4851,7 +4851,7 @@
|
|
|
4851
4851
|
var AddButton = function(param) {
|
|
4852
4852
|
var text = param.text, _param_type = param.type, type = _param_type === void 0 ? "button" : _param_type, isDisabled = param.isDisabled, onClick = param.onClick, isFullWidth = param.isFullWidth, data = param.data, tweakStyles = param.tweakStyles;
|
|
4853
4853
|
var classes = useTheme("AddButton", styles$H, tweakStyles).classes;
|
|
4854
|
-
return /* @__PURE__ */ jsxs("button", _object_spread_props$
|
|
4854
|
+
return /* @__PURE__ */ jsxs("button", _object_spread_props$x(_object_spread$G({
|
|
4855
4855
|
type,
|
|
4856
4856
|
className: clsx(classes.root, isDisabled && classes.disabled, isFullWidth && classes.fullWidth),
|
|
4857
4857
|
onClick: !isDisabled ? onClick : void 0,
|
|
@@ -5026,7 +5026,7 @@
|
|
|
5026
5026
|
}
|
|
5027
5027
|
return obj;
|
|
5028
5028
|
}
|
|
5029
|
-
function _object_spread$
|
|
5029
|
+
function _object_spread$F(target) {
|
|
5030
5030
|
for (var i = 1; i < arguments.length; i++) {
|
|
5031
5031
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5032
5032
|
var ownKeys2 = Object.keys(source);
|
|
@@ -5041,7 +5041,7 @@
|
|
|
5041
5041
|
}
|
|
5042
5042
|
return target;
|
|
5043
5043
|
}
|
|
5044
|
-
function ownKeys$
|
|
5044
|
+
function ownKeys$w(object, enumerableOnly) {
|
|
5045
5045
|
var keys = Object.keys(object);
|
|
5046
5046
|
if (Object.getOwnPropertySymbols) {
|
|
5047
5047
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -5054,12 +5054,12 @@
|
|
|
5054
5054
|
}
|
|
5055
5055
|
return keys;
|
|
5056
5056
|
}
|
|
5057
|
-
function _object_spread_props$
|
|
5057
|
+
function _object_spread_props$w(target, source) {
|
|
5058
5058
|
source = source != null ? source : {};
|
|
5059
5059
|
if (Object.getOwnPropertyDescriptors) {
|
|
5060
5060
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5061
5061
|
} else {
|
|
5062
|
-
ownKeys$
|
|
5062
|
+
ownKeys$w(Object(source)).forEach(function(key) {
|
|
5063
5063
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5064
5064
|
});
|
|
5065
5065
|
}
|
|
@@ -5069,7 +5069,7 @@
|
|
|
5069
5069
|
var _param_type = param.type, type = _param_type === void 0 ? "default" : _param_type, _param_useCurrentColor = param.useCurrentColor, useCurrentColor = _param_useCurrentColor === void 0 ? false : _param_useCurrentColor, data = param.data, tweakStyles = param.tweakStyles;
|
|
5070
5070
|
var _useTheme = useTheme("ThemedPreloader", styles$E, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
5071
5071
|
var preloaderComponentStyles = useTweakStyles(componentStyles, tweakStyles, "tweakPreloaderComponent");
|
|
5072
|
-
return /* @__PURE__ */ jsx("div", _object_spread_props$
|
|
5072
|
+
return /* @__PURE__ */ jsx("div", _object_spread_props$w(_object_spread$F({
|
|
5073
5073
|
className: clsx(classes.root, classes[type], _define_property$G({}, classes.currentColor, useCurrentColor))
|
|
5074
5074
|
}, addDataAttributes(data)), {
|
|
5075
5075
|
children: type === "dots" ? /* @__PURE__ */ jsx(DotsPreloader, {
|
|
@@ -5263,7 +5263,7 @@
|
|
|
5263
5263
|
}
|
|
5264
5264
|
return obj;
|
|
5265
5265
|
}
|
|
5266
|
-
function _object_spread$
|
|
5266
|
+
function _object_spread$E(target) {
|
|
5267
5267
|
for (var i = 1; i < arguments.length; i++) {
|
|
5268
5268
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5269
5269
|
var ownKeys2 = Object.keys(source);
|
|
@@ -5278,7 +5278,7 @@
|
|
|
5278
5278
|
}
|
|
5279
5279
|
return target;
|
|
5280
5280
|
}
|
|
5281
|
-
function ownKeys$
|
|
5281
|
+
function ownKeys$v(object, enumerableOnly) {
|
|
5282
5282
|
var keys = Object.keys(object);
|
|
5283
5283
|
if (Object.getOwnPropertySymbols) {
|
|
5284
5284
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -5291,12 +5291,12 @@
|
|
|
5291
5291
|
}
|
|
5292
5292
|
return keys;
|
|
5293
5293
|
}
|
|
5294
|
-
function _object_spread_props$
|
|
5294
|
+
function _object_spread_props$v(target, source) {
|
|
5295
5295
|
source = source != null ? source : {};
|
|
5296
5296
|
if (Object.getOwnPropertyDescriptors) {
|
|
5297
5297
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5298
5298
|
} else {
|
|
5299
|
-
ownKeys$
|
|
5299
|
+
ownKeys$v(Object(source)).forEach(function(key) {
|
|
5300
5300
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5301
5301
|
});
|
|
5302
5302
|
}
|
|
@@ -5324,7 +5324,7 @@
|
|
|
5324
5324
|
var hasChildren = isNotEmpty(children);
|
|
5325
5325
|
var hasNoAction = isDisabled || isLoading;
|
|
5326
5326
|
var _obj, _obj1;
|
|
5327
|
-
return /* @__PURE__ */ jsxs("button", _object_spread_props$
|
|
5327
|
+
return /* @__PURE__ */ jsxs("button", _object_spread_props$v(_object_spread$E({
|
|
5328
5328
|
type,
|
|
5329
5329
|
className: clsx(classes.root, classes[size], classes[view], (_obj = {}, _define_property$F(_obj, classes.disabled, isDisabled), _define_property$F(_obj, classes.fullWidth, isFullWidth), _define_property$F(_obj, classes.inline, isInline), _define_property$F(_obj, classes.active, isActive), _define_property$F(_obj, classes.loading, isLoading), _define_property$F(_obj, classes.onlyIcon, hasIcon && !hasChildren), _obj)),
|
|
5330
5330
|
tabIndex: shouldSkipTabNavigation ? -1 : void 0,
|
|
@@ -5467,7 +5467,7 @@
|
|
|
5467
5467
|
function _non_iterable_rest$m() {
|
|
5468
5468
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
5469
5469
|
}
|
|
5470
|
-
function _object_spread$
|
|
5470
|
+
function _object_spread$D(target) {
|
|
5471
5471
|
for (var i = 1; i < arguments.length; i++) {
|
|
5472
5472
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5473
5473
|
var ownKeys2 = Object.keys(source);
|
|
@@ -5482,7 +5482,7 @@
|
|
|
5482
5482
|
}
|
|
5483
5483
|
return target;
|
|
5484
5484
|
}
|
|
5485
|
-
function ownKeys$
|
|
5485
|
+
function ownKeys$u(object, enumerableOnly) {
|
|
5486
5486
|
var keys = Object.keys(object);
|
|
5487
5487
|
if (Object.getOwnPropertySymbols) {
|
|
5488
5488
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -5495,12 +5495,12 @@
|
|
|
5495
5495
|
}
|
|
5496
5496
|
return keys;
|
|
5497
5497
|
}
|
|
5498
|
-
function _object_spread_props$
|
|
5498
|
+
function _object_spread_props$u(target, source) {
|
|
5499
5499
|
source = source != null ? source : {};
|
|
5500
5500
|
if (Object.getOwnPropertyDescriptors) {
|
|
5501
5501
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5502
5502
|
} else {
|
|
5503
|
-
ownKeys$
|
|
5503
|
+
ownKeys$u(Object(source)).forEach(function(key) {
|
|
5504
5504
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5505
5505
|
});
|
|
5506
5506
|
}
|
|
@@ -5543,7 +5543,7 @@
|
|
|
5543
5543
|
isChecked
|
|
5544
5544
|
]);
|
|
5545
5545
|
var _obj;
|
|
5546
|
-
return /* @__PURE__ */ jsxs("label", _object_spread_props$
|
|
5546
|
+
return /* @__PURE__ */ jsxs("label", _object_spread_props$u(_object_spread$D({
|
|
5547
5547
|
className: clsx(classes.root, (_obj = {}, _define_property$E(_obj, classes.disabled, isDisabled), _define_property$E(_obj, classes.labelPositionLeft, labelPosition === "left"), _obj))
|
|
5548
5548
|
}, addDataTestId(testId), addDataAttributes(data)), {
|
|
5549
5549
|
children: [
|
|
@@ -5607,7 +5607,7 @@
|
|
|
5607
5607
|
}
|
|
5608
5608
|
return obj;
|
|
5609
5609
|
}
|
|
5610
|
-
function _object_spread$
|
|
5610
|
+
function _object_spread$C(target) {
|
|
5611
5611
|
for (var i = 1; i < arguments.length; i++) {
|
|
5612
5612
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5613
5613
|
var ownKeys2 = Object.keys(source);
|
|
@@ -5622,7 +5622,7 @@
|
|
|
5622
5622
|
}
|
|
5623
5623
|
return target;
|
|
5624
5624
|
}
|
|
5625
|
-
function ownKeys$
|
|
5625
|
+
function ownKeys$t(object, enumerableOnly) {
|
|
5626
5626
|
var keys = Object.keys(object);
|
|
5627
5627
|
if (Object.getOwnPropertySymbols) {
|
|
5628
5628
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -5635,12 +5635,12 @@
|
|
|
5635
5635
|
}
|
|
5636
5636
|
return keys;
|
|
5637
5637
|
}
|
|
5638
|
-
function _object_spread_props$
|
|
5638
|
+
function _object_spread_props$t(target, source) {
|
|
5639
5639
|
source = source != null ? source : {};
|
|
5640
5640
|
if (Object.getOwnPropertyDescriptors) {
|
|
5641
5641
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
5642
5642
|
} else {
|
|
5643
|
-
ownKeys$
|
|
5643
|
+
ownKeys$t(Object(source)).forEach(function(key) {
|
|
5644
5644
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
5645
5645
|
});
|
|
5646
5646
|
}
|
|
@@ -5649,7 +5649,7 @@
|
|
|
5649
5649
|
var CloseButton = function(param) {
|
|
5650
5650
|
var tweakStyles = param.tweakStyles, testId = param.testId, data = param.data, _param_iconType = param.iconType, iconType = _param_iconType === void 0 ? "close" : _param_iconType, onClose = param.onClose;
|
|
5651
5651
|
var classes = useTheme("CloseButton", styles$B, tweakStyles).classes;
|
|
5652
|
-
return /* @__PURE__ */ jsx("button", _object_spread_props$
|
|
5652
|
+
return /* @__PURE__ */ jsx("button", _object_spread_props$t(_object_spread$C({
|
|
5653
5653
|
type: "button",
|
|
5654
5654
|
className: classes.root,
|
|
5655
5655
|
onClick: onClose,
|
|
@@ -5805,7 +5805,7 @@
|
|
|
5805
5805
|
}
|
|
5806
5806
|
return obj;
|
|
5807
5807
|
}
|
|
5808
|
-
function _object_spread$
|
|
5808
|
+
function _object_spread$B(target) {
|
|
5809
5809
|
for (var i = 1; i < arguments.length; i++) {
|
|
5810
5810
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
5811
5811
|
var ownKeys2 = Object.keys(source);
|
|
@@ -5823,7 +5823,7 @@
|
|
|
5823
5823
|
var CssBaseline = function(param) {
|
|
5824
5824
|
var data = param.data, tweakStyles = param.tweakStyles;
|
|
5825
5825
|
var classes = useTheme("CssBaseline", styles$z, tweakStyles).classes;
|
|
5826
|
-
return /* @__PURE__ */ jsx("div", _object_spread$
|
|
5826
|
+
return /* @__PURE__ */ jsx("div", _object_spread$B({
|
|
5827
5827
|
className: classes.root
|
|
5828
5828
|
}, addDataAttributes(data)));
|
|
5829
5829
|
};
|
|
@@ -6186,7 +6186,7 @@
|
|
|
6186
6186
|
function _non_iterable_rest$k() {
|
|
6187
6187
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
6188
6188
|
}
|
|
6189
|
-
function _object_spread$
|
|
6189
|
+
function _object_spread$A(target) {
|
|
6190
6190
|
for (var i = 1; i < arguments.length; i++) {
|
|
6191
6191
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
6192
6192
|
var ownKeys2 = Object.keys(source);
|
|
@@ -6201,7 +6201,7 @@
|
|
|
6201
6201
|
}
|
|
6202
6202
|
return target;
|
|
6203
6203
|
}
|
|
6204
|
-
function ownKeys$
|
|
6204
|
+
function ownKeys$s(object, enumerableOnly) {
|
|
6205
6205
|
var keys = Object.keys(object);
|
|
6206
6206
|
if (Object.getOwnPropertySymbols) {
|
|
6207
6207
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -6214,12 +6214,12 @@
|
|
|
6214
6214
|
}
|
|
6215
6215
|
return keys;
|
|
6216
6216
|
}
|
|
6217
|
-
function _object_spread_props$
|
|
6217
|
+
function _object_spread_props$s(target, source) {
|
|
6218
6218
|
source = source != null ? source : {};
|
|
6219
6219
|
if (Object.getOwnPropertyDescriptors) {
|
|
6220
6220
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
6221
6221
|
} else {
|
|
6222
|
-
ownKeys$
|
|
6222
|
+
ownKeys$s(Object(source)).forEach(function(key) {
|
|
6223
6223
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
6224
6224
|
});
|
|
6225
6225
|
}
|
|
@@ -6392,7 +6392,7 @@
|
|
|
6392
6392
|
var hasLabel = isNotEmpty(label);
|
|
6393
6393
|
var hasPlaceholder = (!hasLabel || hasFocus && !isReadonly) && isNotEmpty(placeholder);
|
|
6394
6394
|
var _obj;
|
|
6395
|
-
var props = _object_spread$
|
|
6395
|
+
var props = _object_spread$A({
|
|
6396
6396
|
className: clsx(classes.input, (_obj = {}, _define_property$B(_obj, classes.withFloatingLabel, hasFloatingLabel && hasLabel), _define_property$B(_obj, classes.withIcons, hasControls), _define_property$B(_obj, classes.withControls, hasControls), _define_property$B(_obj, classes.floatingLabelWithoutPadding, hasFloatingLabel && hasLabel && border === "bottom"), _obj)),
|
|
6397
6397
|
onFocus: handleFocus,
|
|
6398
6398
|
onBlur: handleBlur,
|
|
@@ -6415,14 +6415,14 @@
|
|
|
6415
6415
|
return /* @__PURE__ */ jsxs("div", {
|
|
6416
6416
|
className: classes.root,
|
|
6417
6417
|
children: [
|
|
6418
|
-
/* @__PURE__ */ jsxs("div", _object_spread_props$
|
|
6418
|
+
/* @__PURE__ */ jsxs("div", _object_spread_props$s(_object_spread$A({
|
|
6419
6419
|
className: clsx(classes.inputWrapper, (_obj1 = {}, _define_property$B(_obj1, classes.required, isRequired && !hasRequiredLabel), _define_property$B(_obj1, classes.invalid, isInvalid), _define_property$B(_obj1, classes.focused, hasFocus), _define_property$B(_obj1, classes.disabled, isDisabled), _define_property$B(_obj1, classes.autosize, isAutoSizeable), _obj1), inlineStyle !== void 0 && classes[inlineStyle], border !== void 0 && classes["border-".concat(border)]),
|
|
6420
6420
|
"data-value": isAutoSizeable ? value : void 0
|
|
6421
6421
|
}, addDataAttributes(data)), {
|
|
6422
6422
|
children: [
|
|
6423
|
-
mask === void 0 ? /* @__PURE__ */ jsx("input", _object_spread$
|
|
6423
|
+
mask === void 0 ? /* @__PURE__ */ jsx("input", _object_spread$A({
|
|
6424
6424
|
ref: ref !== null && ref !== void 0 ? ref : inputRef
|
|
6425
|
-
}, props)) : /* @__PURE__ */ jsx(InputMask, _object_spread$
|
|
6425
|
+
}, props)) : /* @__PURE__ */ jsx(InputMask, _object_spread$A({
|
|
6426
6426
|
ref: ref !== null && ref !== void 0 ? ref : inputRef,
|
|
6427
6427
|
mask,
|
|
6428
6428
|
maskPlaceholder
|
|
@@ -6508,7 +6508,7 @@
|
|
|
6508
6508
|
}
|
|
6509
6509
|
return obj;
|
|
6510
6510
|
}
|
|
6511
|
-
function _object_spread$
|
|
6511
|
+
function _object_spread$z(target) {
|
|
6512
6512
|
for (var i = 1; i < arguments.length; i++) {
|
|
6513
6513
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
6514
6514
|
var ownKeys2 = Object.keys(source);
|
|
@@ -6523,7 +6523,7 @@
|
|
|
6523
6523
|
}
|
|
6524
6524
|
return target;
|
|
6525
6525
|
}
|
|
6526
|
-
function ownKeys$
|
|
6526
|
+
function ownKeys$r(object, enumerableOnly) {
|
|
6527
6527
|
var keys = Object.keys(object);
|
|
6528
6528
|
if (Object.getOwnPropertySymbols) {
|
|
6529
6529
|
var symbols = Object.getOwnPropertySymbols(object);
|
|
@@ -6536,12 +6536,12 @@
|
|
|
6536
6536
|
}
|
|
6537
6537
|
return keys;
|
|
6538
6538
|
}
|
|
6539
|
-
function _object_spread_props$
|
|
6539
|
+
function _object_spread_props$r(target, source) {
|
|
6540
6540
|
source = source != null ? source : {};
|
|
6541
6541
|
if (Object.getOwnPropertyDescriptors) {
|
|
6542
6542
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
6543
6543
|
} else {
|
|
6544
|
-
ownKeys$
|
|
6544
|
+
ownKeys$r(Object(source)).forEach(function(key) {
|
|
6545
6545
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
6546
6546
|
});
|
|
6547
6547
|
}
|
|
@@ -6604,10 +6604,10 @@
|
|
|
6604
6604
|
mask: "99.99.9999"
|
|
6605
6605
|
};
|
|
6606
6606
|
var tweakInputStyles = useTweakStyles(componentStyles, tweakStyles, "tweakInput");
|
|
6607
|
-
return /* @__PURE__ */ jsx("div", _object_spread_props$
|
|
6607
|
+
return /* @__PURE__ */ jsx("div", _object_spread_props$r(_object_spread$z({
|
|
6608
6608
|
className: classes.root
|
|
6609
6609
|
}, addDataAttributes(data)), {
|
|
6610
|
-
children: /* @__PURE__ */ jsx(Input, _object_spread_props$
|
|
6610
|
+
children: /* @__PURE__ */ jsx(Input, _object_spread_props$r(_object_spread$z({}, mainProps, props), {
|
|
6611
6611
|
tweakStyles: tweakInputStyles
|
|
6612
6612
|
}))
|
|
6613
6613
|
}));
|
|
@@ -6705,7 +6705,7 @@
|
|
|
6705
6705
|
if (superClass)
|
|
6706
6706
|
_set_prototype_of(subClass, superClass);
|
|
6707
6707
|
}
|
|
6708
|
-
function _object_spread$
|
|
6708
|
+
function _object_spread$y(target) {
|
|
6709
6709
|
for (var i = 1; i < arguments.length; i++) {
|
|
6710
6710
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
6711
6711
|
var ownKeys2 = Object.keys(source);
|
|
@@ -6856,7 +6856,7 @@
|
|
|
6856
6856
|
"children",
|
|
6857
6857
|
"options"
|
|
6858
6858
|
]);
|
|
6859
|
-
return React.createElement(elementType !== null && elementType !== void 0 ? elementType : ScrollIntoViewIfNeededDefaultElementType, _object_spread$
|
|
6859
|
+
return React.createElement(elementType !== null && elementType !== void 0 ? elementType : ScrollIntoViewIfNeededDefaultElementType, _object_spread$y({
|
|
6860
6860
|
ref: this.node
|
|
6861
6861
|
}, wrapperProps), children);
|
|
6862
6862
|
}
|
|
@@ -6878,7 +6878,7 @@
|
|
|
6878
6878
|
}
|
|
6879
6879
|
return obj;
|
|
6880
6880
|
}
|
|
6881
|
-
function _object_spread$
|
|
6881
|
+
function _object_spread$x(target) {
|
|
6882
6882
|
for (var i = 1; i < arguments.length; i++) {
|
|
6883
6883
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
6884
6884
|
var ownKeys2 = Object.keys(source);
|
|
@@ -6910,7 +6910,7 @@
|
|
|
6910
6910
|
],
|
|
6911
6911
|
fontSize: 16
|
|
6912
6912
|
},
|
|
6913
|
-
list: _object_spread$
|
|
6913
|
+
list: _object_spread$x({
|
|
6914
6914
|
height: "100%",
|
|
6915
6915
|
maxHeight: ROW_HEIGHT$1 * 6,
|
|
6916
6916
|
cursor: "pointer",
|
|
@@ -6953,31 +6953,71 @@
|
|
|
6953
6953
|
}
|
|
6954
6954
|
return obj;
|
|
6955
6955
|
}
|
|
6956
|
-
function
|
|
6957
|
-
var
|
|
6958
|
-
|
|
6956
|
+
function _object_spread$w(target) {
|
|
6957
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
6958
|
+
var source = arguments[i] != null ? arguments[i] : {};
|
|
6959
|
+
var ownKeys2 = Object.keys(source);
|
|
6960
|
+
if (typeof Object.getOwnPropertySymbols === "function") {
|
|
6961
|
+
ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
6962
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
6963
|
+
}));
|
|
6964
|
+
}
|
|
6965
|
+
ownKeys2.forEach(function(key) {
|
|
6966
|
+
_define_property$x(target, key, source[key]);
|
|
6967
|
+
});
|
|
6968
|
+
}
|
|
6969
|
+
return target;
|
|
6970
|
+
}
|
|
6971
|
+
function ownKeys$q(object, enumerableOnly) {
|
|
6972
|
+
var keys = Object.keys(object);
|
|
6973
|
+
if (Object.getOwnPropertySymbols) {
|
|
6974
|
+
var symbols = Object.getOwnPropertySymbols(object);
|
|
6975
|
+
if (enumerableOnly) {
|
|
6976
|
+
symbols = symbols.filter(function(sym) {
|
|
6977
|
+
return Object.getOwnPropertyDescriptor(object, sym).enumerable;
|
|
6978
|
+
});
|
|
6979
|
+
}
|
|
6980
|
+
keys.push.apply(keys, symbols);
|
|
6981
|
+
}
|
|
6982
|
+
return keys;
|
|
6983
|
+
}
|
|
6984
|
+
function _object_spread_props$q(target, source) {
|
|
6985
|
+
source = source != null ? source : {};
|
|
6986
|
+
if (Object.getOwnPropertyDescriptors) {
|
|
6987
|
+
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
6988
|
+
} else {
|
|
6989
|
+
ownKeys$q(Object(source)).forEach(function(key) {
|
|
6990
|
+
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
6991
|
+
});
|
|
6992
|
+
}
|
|
6993
|
+
return target;
|
|
6959
6994
|
}
|
|
6960
6995
|
var DEFAULT_OPTION_INDEX = -1;
|
|
6961
6996
|
function SelectList(param) {
|
|
6962
|
-
var options = param.options,
|
|
6997
|
+
var options = param.options, focusedIndex = param.focusedIndex, activeValue = param.activeValue, defaultOptionLabel = param.defaultOptionLabel, _param_noMatchesLabel = param.noMatchesLabel, noMatchesLabel = _param_noMatchesLabel === void 0 ? "Совпадений не найдено" : _param_noMatchesLabel, isLoading = param.isLoading, _param_loadingLabel = param.loadingLabel, loadingLabel = _param_loadingLabel === void 0 ? "Загрузка..." : _param_loadingLabel, tweakStyles = param.tweakStyles, testId = param.testId, _param_shouldScrollToList = param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, isOptionDisabled = param.isOptionDisabled, onOptionClick = param.onOptionClick, convertValueToString = param.convertValueToString, convertValueToReactNode = param.convertValueToReactNode, _param_convertValueToId = param.convertValueToId, convertValueToId = _param_convertValueToId === void 0 ? convertValueToString : _param_convertValueToId;
|
|
6963
6998
|
var classes = useTheme("SelectList", styles$v, tweakStyles).classes;
|
|
6964
6999
|
var activeValueId = isNotEmpty(activeValue) ? convertValueToId(activeValue) : void 0;
|
|
6965
|
-
var convertedToStringOptions = React.useMemo(function() {
|
|
6966
|
-
return options.map(convertValueToString);
|
|
6967
|
-
}, [
|
|
6968
|
-
options,
|
|
6969
|
-
convertValueToString
|
|
6970
|
-
]);
|
|
6971
7000
|
var isActiveOption = function(item) {
|
|
6972
7001
|
return convertValueToId(item) === activeValueId;
|
|
6973
7002
|
};
|
|
6974
|
-
var
|
|
6975
|
-
|
|
7003
|
+
var convertFunction = convertValueToReactNode !== null && convertValueToReactNode !== void 0 ? convertValueToReactNode : convertValueToString;
|
|
7004
|
+
var optionsDisableMap = React.useMemo(function() {
|
|
7005
|
+
return options.map(function(o) {
|
|
7006
|
+
return isOptionDisabled(o);
|
|
7007
|
+
});
|
|
7008
|
+
}, [
|
|
7009
|
+
options,
|
|
7010
|
+
isOptionDisabled
|
|
7011
|
+
]);
|
|
7012
|
+
var listOptions = React.useMemo(function() {
|
|
7013
|
+
return options.map(function(opt, i) {
|
|
7014
|
+
return convertFunction(opt, optionsDisableMap[i]);
|
|
7015
|
+
});
|
|
6976
7016
|
}, [
|
|
6977
7017
|
options,
|
|
6978
|
-
|
|
7018
|
+
convertFunction,
|
|
7019
|
+
optionsDisableMap
|
|
6979
7020
|
]);
|
|
6980
|
-
var listOptions = convertValueToReactNode !== void 0 ? convertedToReactNodesOptions : convertedToStringOptions;
|
|
6981
7021
|
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
|
|
6982
7022
|
active: shouldScrollToList,
|
|
6983
7023
|
className: classes.root,
|
|
@@ -7000,22 +7040,28 @@
|
|
|
7000
7040
|
},
|
|
7001
7041
|
children: defaultOptionLabel
|
|
7002
7042
|
}),
|
|
7003
|
-
listOptions.map(function(opt,
|
|
7004
|
-
var optionValue = options[
|
|
7043
|
+
listOptions.map(function(opt, i) {
|
|
7044
|
+
var optionValue = options[i];
|
|
7045
|
+
var isFocused = i === focusedIndex;
|
|
7005
7046
|
var isActive = isActiveOption(optionValue);
|
|
7006
|
-
var isDisabled =
|
|
7047
|
+
var isDisabled = optionsDisableMap[i];
|
|
7007
7048
|
var _obj;
|
|
7008
|
-
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, {
|
|
7009
|
-
active:
|
|
7049
|
+
return /* @__PURE__ */ jsx(ScrollIntoViewIfNeeded, _object_spread_props$q(_object_spread$w({
|
|
7050
|
+
active: isFocused,
|
|
7010
7051
|
options: {
|
|
7011
7052
|
block: "nearest"
|
|
7012
7053
|
},
|
|
7013
|
-
className: clsx(classes.cell, (_obj = {}, _define_property$x(_obj, classes.focused,
|
|
7054
|
+
className: clsx(classes.cell, (_obj = {}, _define_property$x(_obj, classes.focused, isFocused), _define_property$x(_obj, classes.active, isActive), _define_property$x(_obj, classes.disabled, isDisabled), _obj))
|
|
7055
|
+
}, addDataAttributes({
|
|
7056
|
+
disabled: isDisabled,
|
|
7057
|
+
active: isActive,
|
|
7058
|
+
focused: isFocused
|
|
7059
|
+
})), {
|
|
7014
7060
|
onClick: !isDisabled ? function() {
|
|
7015
|
-
return onOptionClick(
|
|
7061
|
+
return onOptionClick(i);
|
|
7016
7062
|
} : void 0,
|
|
7017
7063
|
children: opt
|
|
7018
|
-
},
|
|
7064
|
+
}), i);
|
|
7019
7065
|
}),
|
|
7020
7066
|
listOptions.length === 0 && /* @__PURE__ */ jsx("div", {
|
|
7021
7067
|
className: clsx(classes.cell, classes.noMatchesLabel),
|
|
@@ -7026,6 +7072,10 @@
|
|
|
7026
7072
|
})
|
|
7027
7073
|
});
|
|
7028
7074
|
}
|
|
7075
|
+
var _option_isDisabled;
|
|
7076
|
+
var defaultIsOptionDisabled = function(option) {
|
|
7077
|
+
return typeof option === "object" && option !== null && ((_option_isDisabled = option === null || option === void 0 ? void 0 : option.isDisabled) !== null && _option_isDisabled !== void 0 ? _option_isDisabled : false);
|
|
7078
|
+
};
|
|
7029
7079
|
var defaultConvertFunction$2 = function(v) {
|
|
7030
7080
|
return v === void 0 ? void 0 : String(v);
|
|
7031
7081
|
};
|
|
@@ -7370,22 +7420,12 @@
|
|
|
7370
7420
|
}
|
|
7371
7421
|
};
|
|
7372
7422
|
function Select(_param) {
|
|
7373
|
-
var options = _param.options, value = _param.value,
|
|
7423
|
+
var options = _param.options, value = _param.value, defaultOptionLabel = _param.defaultOptionLabel, _param_debounceTime = _param.debounceTime, debounceTime = _param_debounceTime === void 0 ? 400 : _param_debounceTime, _param_optionsMode = _param.optionsMode, optionsMode = _param_optionsMode === void 0 ? "normal" : _param_optionsMode, noMatchesLabel = _param.noMatchesLabel, loadingLabel = _param.loadingLabel, tweakStyles = _param.tweakStyles, testId = _param.testId, isDisabled = _param.isDisabled, dropdownOptions = _param.dropdownOptions, _param_minSymbolsCountToOpenList = _param.minSymbolsCountToOpenList, minSymbolsCountToOpenList = _param_minSymbolsCountToOpenList === void 0 ? 0 : _param_minSymbolsCountToOpenList, _param_dropdownIcon = _param.dropdownIcon, dropdownIcon = _param_dropdownIcon === void 0 ? "chevron-down" : _param_dropdownIcon, _param_shouldScrollToList = _param.shouldScrollToList, shouldScrollToList = _param_shouldScrollToList === void 0 ? true : _param_shouldScrollToList, onChange = _param.onChange, onFocus = _param.onFocus, onBlur = _param.onBlur, onType = _param.onType, onOpen = _param.onOpen, _param_isOptionDisabled = _param.isOptionDisabled, isOptionDisabled = _param_isOptionDisabled === void 0 ? defaultIsOptionDisabled : _param_isOptionDisabled, _param_compareValuesOnChange = _param.compareValuesOnChange, compareValuesOnChange = _param_compareValuesOnChange === void 0 ? defaultCompareFunction : _param_compareValuesOnChange, _param_convertValueToString = _param.convertValueToString, convertValueToString = _param_convertValueToString === void 0 ? defaultConvertFunction$2 : _param_convertValueToString, convertValueToId = _param.convertValueToId, convertValueToReactNode = _param.convertValueToReactNode, optionsFilter = _param.optionsFilter, inputProps = _object_without_properties$6(_param, [
|
|
7374
7424
|
"options",
|
|
7375
7425
|
"value",
|
|
7376
|
-
"onChange",
|
|
7377
|
-
"compareValuesOnChange",
|
|
7378
|
-
"convertValueToString",
|
|
7379
|
-
"convertValueToId",
|
|
7380
|
-
"convertValueToReactNode",
|
|
7381
7426
|
"defaultOptionLabel",
|
|
7382
|
-
"onFocus",
|
|
7383
|
-
"onBlur",
|
|
7384
|
-
"onType",
|
|
7385
|
-
"onOpen",
|
|
7386
7427
|
"debounceTime",
|
|
7387
7428
|
"optionsMode",
|
|
7388
|
-
"optionsFilter",
|
|
7389
7429
|
"noMatchesLabel",
|
|
7390
7430
|
"loadingLabel",
|
|
7391
7431
|
"tweakStyles",
|
|
@@ -7394,7 +7434,18 @@
|
|
|
7394
7434
|
"dropdownOptions",
|
|
7395
7435
|
"minSymbolsCountToOpenList",
|
|
7396
7436
|
"dropdownIcon",
|
|
7397
|
-
"shouldScrollToList"
|
|
7437
|
+
"shouldScrollToList",
|
|
7438
|
+
"onChange",
|
|
7439
|
+
"onFocus",
|
|
7440
|
+
"onBlur",
|
|
7441
|
+
"onType",
|
|
7442
|
+
"onOpen",
|
|
7443
|
+
"isOptionDisabled",
|
|
7444
|
+
"compareValuesOnChange",
|
|
7445
|
+
"convertValueToString",
|
|
7446
|
+
"convertValueToId",
|
|
7447
|
+
"convertValueToReactNode",
|
|
7448
|
+
"optionsFilter"
|
|
7398
7449
|
]);
|
|
7399
7450
|
var _useTheme = useTheme("Select", styles$u, tweakStyles), classes = _useTheme.classes, componentStyles = _useTheme.componentStyles;
|
|
7400
7451
|
var isMounted = useIsMounted();
|
|
@@ -7641,6 +7692,32 @@
|
|
|
7641
7692
|
onOpen
|
|
7642
7693
|
]);
|
|
7643
7694
|
var _obj;
|
|
7695
|
+
var listEl = /* @__PURE__ */ jsx("div", _object_spread_props$p(_object_spread$v({
|
|
7696
|
+
className: clsx(classes.listWrapper, (_obj = {}, _define_property$w(_obj, classes.withoutPopper, !shouldUsePopper), _define_property$w(_obj, classes.listWrapperInBody, shouldRenderInBody), _obj)),
|
|
7697
|
+
ref: list,
|
|
7698
|
+
onMouseDown: function(event) {
|
|
7699
|
+
return event.preventDefault();
|
|
7700
|
+
},
|
|
7701
|
+
style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper
|
|
7702
|
+
}, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
|
|
7703
|
+
children: isOpen && /* @__PURE__ */ jsx(SelectList, {
|
|
7704
|
+
options: filteredOptions,
|
|
7705
|
+
defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption ? defaultOptionLabel : void 0,
|
|
7706
|
+
noMatchesLabel,
|
|
7707
|
+
focusedIndex: focusedListCellIndex,
|
|
7708
|
+
activeValue: value,
|
|
7709
|
+
isLoading: inputProps.isLoading,
|
|
7710
|
+
loadingLabel,
|
|
7711
|
+
tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
|
|
7712
|
+
testId: testId !== void 0 ? "".concat(testId, "-list") : void 0,
|
|
7713
|
+
shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll,
|
|
7714
|
+
isOptionDisabled,
|
|
7715
|
+
convertValueToString,
|
|
7716
|
+
convertValueToReactNode,
|
|
7717
|
+
convertValueToId,
|
|
7718
|
+
onOptionClick: handleOptionClick
|
|
7719
|
+
})
|
|
7720
|
+
}));
|
|
7644
7721
|
return /* @__PURE__ */ jsxs("div", {
|
|
7645
7722
|
className: classes.root,
|
|
7646
7723
|
onKeyDown: handleKeyDown,
|
|
@@ -7675,35 +7752,13 @@
|
|
|
7675
7752
|
})
|
|
7676
7753
|
]
|
|
7677
7754
|
}),
|
|
7678
|
-
/* @__PURE__ */ jsx(reactOverlays.Portal, {
|
|
7755
|
+
shouldUsePopper ? /* @__PURE__ */ jsx(reactOverlays.Portal, {
|
|
7679
7756
|
container: shouldRenderInBody ? document.body : inputWrapper.current,
|
|
7680
7757
|
children: /* @__PURE__ */ jsx(Fragment, {
|
|
7681
|
-
children:
|
|
7682
|
-
className: clsx(classes.listWrapper, (_obj = {}, _define_property$w(_obj, classes.withoutPopper, !shouldUsePopper), _define_property$w(_obj, classes.listWrapperInBody, shouldRenderInBody), _obj)),
|
|
7683
|
-
ref: list,
|
|
7684
|
-
onMouseDown: function(event) {
|
|
7685
|
-
return event.preventDefault();
|
|
7686
|
-
},
|
|
7687
|
-
style: popperData === null || popperData === void 0 ? void 0 : popperData.styles.popper
|
|
7688
|
-
}, popperData === null || popperData === void 0 ? void 0 : popperData.attributes.popper), {
|
|
7689
|
-
children: isOpen && /* @__PURE__ */ jsx(SelectList, {
|
|
7690
|
-
options: filteredOptions,
|
|
7691
|
-
convertValueToString,
|
|
7692
|
-
convertValueToReactNode,
|
|
7693
|
-
convertValueToId,
|
|
7694
|
-
onOptionClick: handleOptionClick,
|
|
7695
|
-
defaultOptionLabel: hasDefaultOption && shouldShowDefaultOption ? defaultOptionLabel : void 0,
|
|
7696
|
-
noMatchesLabel,
|
|
7697
|
-
focusedIndex: focusedListCellIndex,
|
|
7698
|
-
activeValue: value,
|
|
7699
|
-
isLoading: inputProps.isLoading,
|
|
7700
|
-
loadingLabel,
|
|
7701
|
-
tweakStyles: tweakStyles === null || tweakStyles === void 0 ? void 0 : tweakStyles.tweakSelectList,
|
|
7702
|
-
testId: testId !== void 0 ? "".concat(testId, "-list") : void 0,
|
|
7703
|
-
shouldScrollToList: shouldScrollToList && !shouldUsePopper && !shouldHideOnScroll
|
|
7704
|
-
})
|
|
7705
|
-
}))
|
|
7758
|
+
children: listEl
|
|
7706
7759
|
})
|
|
7760
|
+
}) : /* @__PURE__ */ jsx(Fragment, {
|
|
7761
|
+
children: isOpen && listEl
|
|
7707
7762
|
})
|
|
7708
7763
|
]
|
|
7709
7764
|
});
|