ui-kit-ck-consultant 0.5.258 → 0.5.259
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 +10 -0
- package/dist/index.js +64 -6
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +65 -7
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { Fragment as Fragment$1, createRef, Component } from 'react';
|
2
2
|
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
3
|
-
import { faCheck, faTimes, faCaretUp, faCaretDown, faArrowLeft, faEllipsisV, faArrowRight, faChevronLeft, faChevronRight, faPlus, faBan, faCaretRight, faCaretLeft, faUser, faTrash, faFilePdf, faFileWord, faFileExcel, faFileImage, faFileCsv, faFile, faTimesCircle } from '@fortawesome/free-solid-svg-icons';
|
3
|
+
import { faUpDownLeftRight, faCheck, faTimes, faCaretUp, faCaretDown, faArrowLeft, faEllipsisV, faArrowRight, faChevronLeft, faChevronRight, faPlus, faBan, faCaretRight, faCaretLeft, faUser, faTrash, faFilePdf, faFileWord, faFileExcel, faFileImage, faFileCsv, faFile, faTimesCircle } from '@fortawesome/free-solid-svg-icons';
|
4
4
|
import classNames$1 from 'classnames';
|
5
5
|
import { Doughnut, Bar, Radar, HorizontalBar } from 'react-chartjs-2';
|
6
6
|
import 'chartjs-plugin-datalabels';
|
@@ -42,17 +42,57 @@ function _setPrototypeOf(o, p) {
|
|
42
42
|
return _setPrototypeOf(o, p);
|
43
43
|
}
|
44
44
|
|
45
|
-
var style = {"modal":"_Tr9L0","modal_container":"_2YluD","no_background":"_2vjgy","large":"_22C7A","modal_valid":"_RsujT","modal_close":"_1AbTJ","modal_custom":"_33Wb2","modal_header":"_2EzqX","modal_body":"_1-Y1J","full_modal_container":"_1w6wH","full_modal_header":"_2wSoq","full_modal_body":"_3bfp5","full_modal_body_no_padding":"_Pf5Uh","full_modal_body_no_overflow":"_3sTgK"};
|
45
|
+
var style = {"modal":"_Tr9L0","modal_container":"_2YluD","no_background":"_2vjgy","large":"_22C7A","modal_move":"_20eCx","modal_valid":"_RsujT","modal_close":"_1AbTJ","modal_custom":"_33Wb2","modal_header":"_2EzqX","modal_body":"_1-Y1J","full_modal_container":"_1w6wH","full_modal_header":"_2wSoq","full_modal_body":"_3bfp5","full_modal_body_no_padding":"_Pf5Uh","full_modal_body_no_overflow":"_3sTgK"};
|
46
46
|
|
47
47
|
var Modal = /*#__PURE__*/function (_React$Component) {
|
48
48
|
_inheritsLoose(Modal, _React$Component);
|
49
49
|
|
50
|
-
function Modal() {
|
51
|
-
|
50
|
+
function Modal(props) {
|
51
|
+
var _this;
|
52
|
+
|
53
|
+
_this = _React$Component.call(this, props) || this;
|
54
|
+
|
55
|
+
_this.handleMouseUp = function () {
|
56
|
+
_this.setState({
|
57
|
+
isMove: false
|
58
|
+
}, function () {
|
59
|
+
window.removeEventListener('mousemove', _this.updateMousePosition);
|
60
|
+
});
|
61
|
+
};
|
62
|
+
|
63
|
+
_this.updateMousePosition = function (e) {
|
64
|
+
_this.setState({
|
65
|
+
x: e.clientX,
|
66
|
+
y: e.clientY
|
67
|
+
});
|
68
|
+
};
|
69
|
+
|
70
|
+
_this.state = {
|
71
|
+
isMove: false,
|
72
|
+
xStart: null,
|
73
|
+
yStart: null,
|
74
|
+
x: null,
|
75
|
+
y: null
|
76
|
+
};
|
77
|
+
return _this;
|
52
78
|
}
|
53
79
|
|
54
80
|
var _proto = Modal.prototype;
|
55
81
|
|
82
|
+
_proto.componentDidMount = function componentDidMount() {
|
83
|
+
if (this.props.show) {
|
84
|
+
document.body.style.overflow = 'hidden';
|
85
|
+
} else {
|
86
|
+
document.body.style.overflow = 'unset';
|
87
|
+
}
|
88
|
+
|
89
|
+
window.addEventListener('mouseup', this.handleMouseUp);
|
90
|
+
};
|
91
|
+
|
92
|
+
_proto.componentWillUnmount = function componentWillUnmount() {
|
93
|
+
window.removeEventListener('mouseup', this.handleMouseUp);
|
94
|
+
};
|
95
|
+
|
56
96
|
_proto.componentDidUpdate = function componentDidUpdate() {
|
57
97
|
if (this.props.show) {
|
58
98
|
document.body.style.overflow = 'hidden';
|
@@ -69,7 +109,7 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
69
109
|
|
70
110
|
_proto.render = function render() {
|
71
111
|
var _classNames,
|
72
|
-
|
112
|
+
_this2 = this;
|
73
113
|
|
74
114
|
if (!this.props.show) {
|
75
115
|
return null;
|
@@ -79,11 +119,29 @@ var Modal = /*#__PURE__*/function (_React$Component) {
|
|
79
119
|
return /*#__PURE__*/React.createElement("div", {
|
80
120
|
className: style.modal,
|
81
121
|
onMouseDown: function onMouseDown(e) {
|
82
|
-
return
|
122
|
+
return _this2.handleClickModal(e);
|
83
123
|
}
|
84
124
|
}, /*#__PURE__*/React.createElement("div", {
|
85
|
-
className: modalContainerClass
|
125
|
+
className: modalContainerClass,
|
126
|
+
style: {
|
127
|
+
left: this.state.x && this.state.xStart ? this.state.x - this.state.xStart : 0,
|
128
|
+
top: this.state.y && this.state.yStart ? this.state.y - this.state.yStart : 0
|
129
|
+
}
|
86
130
|
}, /*#__PURE__*/React.createElement("div", {
|
131
|
+
className: style.modal_move,
|
132
|
+
onMouseDown: function onMouseDown(e) {
|
133
|
+
_this2.setState({
|
134
|
+
isMove: true,
|
135
|
+
xStart: _this2.state.xStart || e.clientX,
|
136
|
+
yStart: _this2.state.yStart || e.clientY
|
137
|
+
}, function () {
|
138
|
+
return window.addEventListener('mousemove', _this2.updateMousePosition);
|
139
|
+
});
|
140
|
+
}
|
141
|
+
}, this.props.isMove ? /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|
142
|
+
className: this.state.isMove ? 'red' : '',
|
143
|
+
icon: faUpDownLeftRight
|
144
|
+
}) : ''), /*#__PURE__*/React.createElement("div", {
|
87
145
|
className: style.modal_valid,
|
88
146
|
onClick: this.props.onValid
|
89
147
|
}, this.props.onValid ? /*#__PURE__*/React.createElement(FontAwesomeIcon, {
|