ui-kit-ck-consultant 0.5.133 → 0.5.137
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/dist/index.css +13 -0
- package/dist/index.js +50 -12
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +51 -13
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.css
CHANGED
@@ -2095,7 +2095,10 @@
|
|
2095
2095
|
}
|
2096
2096
|
|
2097
2097
|
._2CYNt {
|
2098
|
+
display: flex;
|
2099
|
+
flex-direction: column;
|
2098
2100
|
margin: auto;
|
2101
|
+
text-align: center;
|
2099
2102
|
}
|
2100
2103
|
|
2101
2104
|
._3ysPX {
|
@@ -2104,6 +2107,16 @@
|
|
2104
2107
|
margin: 0 auto;
|
2105
2108
|
}
|
2106
2109
|
|
2110
|
+
._2CYNt > p {
|
2111
|
+
margin: 0;
|
2112
|
+
margin-top: 1rem;
|
2113
|
+
color: #ffffff;
|
2114
|
+
background-color: var(--primary-color);
|
2115
|
+
border-radius: 12px;
|
2116
|
+
padding: 0.8rem;
|
2117
|
+
font-size: 16px;
|
2118
|
+
}
|
2119
|
+
|
2107
2120
|
._3ysPX span {
|
2108
2121
|
display: inline-block;
|
2109
2122
|
width: 6px;
|
package/dist/index.js
CHANGED
@@ -267,7 +267,8 @@ var FormInput = /*#__PURE__*/function (_React$Component) {
|
|
267
267
|
_proto.render = function render() {
|
268
268
|
if (this.props.children) {
|
269
269
|
return /*#__PURE__*/React__default.createElement("div", {
|
270
|
-
className: classNames$1(style$2.form_input_container, this.props.className)
|
270
|
+
className: classNames$1(style$2.form_input_container, this.props.className),
|
271
|
+
style: this.props.style
|
271
272
|
}, this.props.title ? /*#__PURE__*/React__default.createElement("span", {
|
272
273
|
className: this.props.classNameTitle
|
273
274
|
}, this.props.title, ' ', this.props.required ? /*#__PURE__*/React__default.createElement("span", {
|
@@ -291,7 +292,8 @@ var FormInput = /*#__PURE__*/function (_React$Component) {
|
|
291
292
|
}, this.props.error) : '');
|
292
293
|
} else {
|
293
294
|
return /*#__PURE__*/React__default.createElement("div", {
|
294
|
-
className: classNames$1(style$2.form_input_container, this.props.className)
|
295
|
+
className: classNames$1(style$2.form_input_container, this.props.className),
|
296
|
+
style: this.props.style
|
295
297
|
}, this.props.title ? /*#__PURE__*/React__default.createElement("span", {
|
296
298
|
className: this.props.classNameTitle
|
297
299
|
}, this.props.title, ' ', this.props.required ? /*#__PURE__*/React__default.createElement("span", {
|
@@ -429,19 +431,31 @@ var FormRange = /*#__PURE__*/function (_React$Component) {
|
|
429
431
|
|
430
432
|
_this = _React$Component.call(this, props) || this;
|
431
433
|
|
434
|
+
_this.handleClickOutside = function (event) {
|
435
|
+
if (_this.refComponent && _this.refComponent.current && !_this.refComponent.current.contains(event.target)) {
|
436
|
+
_this.setState({
|
437
|
+
isOpen: false
|
438
|
+
});
|
439
|
+
}
|
440
|
+
};
|
441
|
+
|
432
442
|
_this.findText = function (options, value) {
|
433
|
-
|
434
|
-
return
|
435
|
-
}
|
436
|
-
|
443
|
+
if (_this.props.input) {
|
444
|
+
return value;
|
445
|
+
} else {
|
446
|
+
var result = options.filter(function (item) {
|
447
|
+
return item.value.toString() === value.toString();
|
448
|
+
});
|
449
|
+
return result.length ? result[0].text : '';
|
450
|
+
}
|
437
451
|
};
|
438
452
|
|
439
453
|
_this.getLabel = function (value1, value2, options1, options2) {
|
440
454
|
if (_this.findText(options1, value1) === _this.findText(options2, value2)) {
|
441
455
|
return "" + _this.findText(options1, value1);
|
442
|
-
} else if (value1 !== 'DEFAULT' && value2 === 'DEFAULT') {
|
456
|
+
} else if (value1 !== 'DEFAULT' && value1 !== '' && (value2 === 'DEFAULT' || value2 === '')) {
|
443
457
|
return ">= " + _this.findText(options1, value1);
|
444
|
-
} else if (value1 === 'DEFAULT' && value2 !== 'DEFAULT') {
|
458
|
+
} else if ((value1 === 'DEFAULT' || value1 === '') && value2 !== 'DEFAULT' && value2 !== '') {
|
445
459
|
return "<= " + _this.findText(options2, value2);
|
446
460
|
} else {
|
447
461
|
return _this.findText(options1, value1) + " - " + _this.findText(options2, value2);
|
@@ -451,11 +465,20 @@ var FormRange = /*#__PURE__*/function (_React$Component) {
|
|
451
465
|
_this.state = {
|
452
466
|
isOpen: false
|
453
467
|
};
|
468
|
+
_this.refComponent = React__default.createRef();
|
454
469
|
return _this;
|
455
470
|
}
|
456
471
|
|
457
472
|
var _proto = FormRange.prototype;
|
458
473
|
|
474
|
+
_proto.componentDidMount = function componentDidMount() {
|
475
|
+
document.addEventListener('mousedown', this.handleClickOutside);
|
476
|
+
};
|
477
|
+
|
478
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
479
|
+
document.removeEventListener('mousedown', this.handleClickOutside);
|
480
|
+
};
|
481
|
+
|
459
482
|
_proto.render = function render() {
|
460
483
|
var _this2 = this;
|
461
484
|
|
@@ -475,8 +498,22 @@ var FormRange = /*#__PURE__*/function (_React$Component) {
|
|
475
498
|
}, /*#__PURE__*/React__default.createElement("span", null, this.getLabel(this.props.value1, this.props.value2, this.props.options1, this.props.options2)), /*#__PURE__*/React__default.createElement("div", null, /*#__PURE__*/React__default.createElement(reactFontawesome.FontAwesomeIcon, {
|
476
499
|
icon: this.state.isOpen ? freeSolidSvgIcons.faCaretUp : freeSolidSvgIcons.faCaretDown
|
477
500
|
}))), this.state.isOpen ? /*#__PURE__*/React__default.createElement("div", {
|
501
|
+
ref: this.refComponent,
|
478
502
|
className: style$4.form_range_modal
|
479
|
-
}, /*#__PURE__*/React__default.createElement(
|
503
|
+
}, this.props.input ? /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(FormInput, {
|
504
|
+
type: this.props.type,
|
505
|
+
name: this.props.name1,
|
506
|
+
value: this.props.value1,
|
507
|
+
onChange: this.props.onChange1,
|
508
|
+
className: "mr-10 w-100"
|
509
|
+
}), /*#__PURE__*/React__default.createElement(FormInput, {
|
510
|
+
type: this.props.type,
|
511
|
+
name: this.props.name2,
|
512
|
+
value: this.props.value2,
|
513
|
+
onChange: this.props.onChange2,
|
514
|
+
className: "w-100"
|
515
|
+
})) : /*#__PURE__*/React__default.createElement(React.Fragment, null, /*#__PURE__*/React__default.createElement(FormSelect, {
|
516
|
+
type: this.props.type,
|
480
517
|
name: this.props.name1,
|
481
518
|
options: this.props.options1,
|
482
519
|
value: this.props.value1,
|
@@ -486,6 +523,7 @@ var FormRange = /*#__PURE__*/function (_React$Component) {
|
|
486
523
|
disabled: false,
|
487
524
|
init: this.props.init1
|
488
525
|
}), /*#__PURE__*/React__default.createElement(FormSelect, {
|
526
|
+
type: this.props.type,
|
489
527
|
name: this.props.name2,
|
490
528
|
options: this.props.options2,
|
491
529
|
value: this.props.value2,
|
@@ -494,7 +532,7 @@ var FormRange = /*#__PURE__*/function (_React$Component) {
|
|
494
532
|
ignore: true,
|
495
533
|
disabled: false,
|
496
534
|
init: this.props.init2
|
497
|
-
})) : null);
|
535
|
+
}))) : null);
|
498
536
|
};
|
499
537
|
|
500
538
|
return FormRange;
|
@@ -856,7 +894,7 @@ var Card = /*#__PURE__*/function (_React$Component) {
|
|
856
894
|
_proto.render = function render() {
|
857
895
|
return /*#__PURE__*/React__default.createElement("div", {
|
858
896
|
className: classNames$1(style$b.card, this.props.className)
|
859
|
-
}, this.props.
|
897
|
+
}, this.props.isLoad ? /*#__PURE__*/React__default.createElement("div", {
|
860
898
|
className: style$b.card_loader_container
|
861
899
|
}, /*#__PURE__*/React__default.createElement("div", {
|
862
900
|
className: classNames$1(style$b.loader_element, this.props.classNameChildren)
|
@@ -2423,7 +2461,7 @@ var Loader = /*#__PURE__*/function (_React$Component) {
|
|
2423
2461
|
className: classNames$1(style$k.loader_element, this.props.classNameChildren)
|
2424
2462
|
}, /*#__PURE__*/React__default.createElement("div", {
|
2425
2463
|
className: style$k.loader
|
2426
|
-
}, /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null))));
|
2464
|
+
}, /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null), /*#__PURE__*/React__default.createElement("span", null)), this.props.message ? /*#__PURE__*/React__default.createElement("p", null, this.props.message) : null));
|
2427
2465
|
};
|
2428
2466
|
|
2429
2467
|
return Loader;
|