linear-react-components-ui 1.1.2-beta.4 → 1.1.2-beta.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/lib/assets/styles/checkbox.scss +8 -0
- package/lib/assets/styles/dialog.scss +27 -10
- package/lib/assets/styles/multiSelect.scss +6 -1
- package/lib/assets/styles/select.scss +13 -7
- package/lib/assets/styles/tabs.scss +3 -0
- package/lib/checkbox/index.d.ts +2 -2
- package/lib/checkbox/index.js +12 -11
- package/lib/checkbox/types.d.ts +2 -1
- package/lib/dialog/Custom.js +2 -4
- package/lib/dialog/base/Content.js +1 -0
- package/lib/dialog/base/Header.js +4 -4
- package/lib/dialog/base/index.js +29 -4
- package/lib/dialog/form/index.js +3 -3
- package/lib/drawer/Drawer.js +5 -4
- package/lib/dropdown/Popup.d.ts +1 -1
- package/lib/dropdown/Popup.js +5 -2
- package/lib/dropdown/types.d.ts +1 -0
- package/lib/inputs/base/InputTextBase.js +3 -1
- package/lib/inputs/base/types.d.ts +1 -0
- package/lib/inputs/multiSelect/ActionButtons.js +10 -8
- package/lib/inputs/multiSelect/Dropdown.js +2 -6
- package/lib/inputs/multiSelect/index.js +2 -2
- package/lib/inputs/select/ActionButtons.js +16 -25
- package/lib/inputs/select/Dropdown.js +2 -6
- package/lib/inputs/select/multiple/Selecteds.d.ts +1 -1
- package/lib/inputs/select/multiple/Selecteds.js +3 -5
- package/lib/inputs/select/multiple/index.js +29 -21
- package/lib/inputs/select/simple/index.js +51 -32
- package/lib/inputs/select/types.d.ts +1 -1
- package/lib/inputs/types.d.ts +2 -2
- package/lib/menus/sidenav/index.js +3 -3
- package/lib/menus/sidenav/popup_menu_search/index.js +3 -2
- package/lib/table/HeaderColumn.d.ts +1 -1
- package/lib/table/HeaderColumn.js +5 -1
- package/lib/table/types.d.ts +2 -0
- package/lib/tabs/context.js +1 -1
- package/lib/tabs/types.d.ts +3 -3
- package/lib/tooltip/index.js +2 -2
- package/lib/treeview/Node.js +2 -2
- package/package.json +2 -2
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
@import "commons.scss";
|
|
2
2
|
@import "colors.scss";
|
|
3
3
|
@import "effects.scss";
|
|
4
|
+
|
|
5
|
+
$shadow-button-default: 1px 1px 1px rgba(0, 0, 0, 0.2);
|
|
6
|
+
$shadow-button-inset-default: inset 0 0 0 1px $default-border-color, $shadow-button-default;
|
|
4
7
|
.modalcontainer {
|
|
5
8
|
font-family: 'Roboto', sans-serif;
|
|
6
9
|
line-height: 22px;
|
|
@@ -59,23 +62,37 @@
|
|
|
59
62
|
width: 100%;
|
|
60
63
|
margin-left: 2px;
|
|
61
64
|
display: flex;
|
|
65
|
+
justify-content: space-between;
|
|
62
66
|
align-items: center;
|
|
63
|
-
|
|
64
|
-
color:
|
|
65
|
-
font-weight:
|
|
67
|
+
.modal-title {
|
|
68
|
+
color: $font-color-default;
|
|
69
|
+
font-weight: 400;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
68
72
|
.close-button {
|
|
69
|
-
|
|
73
|
+
all: unset;
|
|
70
74
|
line-height: 0;
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
width: 28px;
|
|
79
|
+
height: 28px;
|
|
80
|
+
border: none;
|
|
81
|
+
background-color: $default-color;
|
|
82
|
+
color: $font-color-soft;
|
|
83
|
+
border-radius: 999999px;
|
|
84
|
+
cursor: pointer !important;
|
|
85
|
+
>svg {
|
|
86
|
+
fill: $font-color-soft;
|
|
74
87
|
pointer-events: fill;
|
|
75
88
|
transition: 0.2s fill;
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
}
|
|
90
|
+
&:hover {
|
|
91
|
+
background-color: $default-hover-color;
|
|
92
|
+
}
|
|
93
|
+
&:focus {
|
|
94
|
+
-webkit-box-shadow: $shadow-button-inset-default;
|
|
95
|
+
box-shadow: $shadow-button-inset-default;
|
|
79
96
|
}
|
|
80
97
|
}
|
|
81
98
|
}
|
|
@@ -23,6 +23,10 @@
|
|
|
23
23
|
top: 50%;
|
|
24
24
|
left: 10px;
|
|
25
25
|
transform: translateY(-50%);
|
|
26
|
+
|
|
27
|
+
button {
|
|
28
|
+
all: unset;
|
|
29
|
+
}
|
|
26
30
|
}
|
|
27
31
|
}
|
|
28
32
|
|
|
@@ -95,6 +99,7 @@
|
|
|
95
99
|
}
|
|
96
100
|
|
|
97
101
|
.menubutton {
|
|
102
|
+
all: unset;
|
|
98
103
|
background-color: transparent;
|
|
99
104
|
border: 0;
|
|
100
105
|
padding: 0;
|
|
@@ -117,4 +122,4 @@
|
|
|
117
122
|
}
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
|
-
}
|
|
125
|
+
}
|
|
@@ -10,14 +10,15 @@
|
|
|
10
10
|
height: auto;
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
.selectwrapper .
|
|
14
|
-
cursor: pointer;
|
|
13
|
+
.selectwrapper .actionbuttonsselect {
|
|
15
14
|
display: flex;
|
|
16
|
-
|
|
17
|
-
height: 100%;
|
|
15
|
+
flex-direction: row;
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
.actionbutton {
|
|
18
|
+
all: unset;
|
|
19
|
+
cursor: pointer;
|
|
20
|
+
display: flex;
|
|
21
|
+
align-items: center;
|
|
21
22
|
}
|
|
22
23
|
}
|
|
23
24
|
|
|
@@ -42,6 +43,10 @@
|
|
|
42
43
|
float: left;
|
|
43
44
|
margin: 2px;
|
|
44
45
|
padding: 0px 8px 0px 5px;
|
|
46
|
+
|
|
47
|
+
.close {
|
|
48
|
+
all: unset;
|
|
49
|
+
}
|
|
45
50
|
}
|
|
46
51
|
}
|
|
47
52
|
|
|
@@ -118,6 +123,7 @@
|
|
|
118
123
|
}
|
|
119
124
|
|
|
120
125
|
.menubutton {
|
|
126
|
+
all: unset;
|
|
121
127
|
background-color: transparent;
|
|
122
128
|
border: 0;
|
|
123
129
|
padding: 0;
|
|
@@ -145,4 +151,4 @@
|
|
|
145
151
|
font-style: italic;
|
|
146
152
|
font-size: 13px;
|
|
147
153
|
}
|
|
148
|
-
}
|
|
154
|
+
}
|
package/lib/checkbox/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React__default from 'react';
|
|
2
1
|
import { ICheckBoxProps } from './types.js';
|
|
2
|
+
import 'react';
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/Position.js';
|
|
5
5
|
|
|
@@ -8,6 +8,6 @@ import '../@types/Position.js';
|
|
|
8
8
|
* o componente Field dentro do componente Form, pois o mesmo leva em consideração o tipo do
|
|
9
9
|
* componente para gerar propriedades customizadas.
|
|
10
10
|
*/
|
|
11
|
-
declare const CheckBox:
|
|
11
|
+
declare const CheckBox: ({ name, required, value, label, onChange, autofocus, hint, id, gridLayout, checked, disabled, permissionAttr, tooltip, tooltipPosition, tooltipWidth, skeletonize, targetRef, errorMessages, }: ICheckBoxProps) => JSX.Element | null;
|
|
12
12
|
|
|
13
13
|
export { CheckBox as default };
|
package/lib/checkbox/index.js
CHANGED
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _gridlayout = _interopRequireDefault(require("../gridlayout"));
|
|
9
8
|
var _Label = _interopRequireDefault(require("./Label"));
|
|
10
|
-
require("../assets/styles/checkbox.scss");
|
|
11
|
-
var _permissionValidations = require("../permissionValidations");
|
|
12
9
|
var _hint = _interopRequireDefault(require("../hint"));
|
|
10
|
+
var _gridlayout = _interopRequireDefault(require("../gridlayout"));
|
|
11
|
+
var helpers = _interopRequireWildcard(require("../inputs/base/helpers"));
|
|
12
|
+
var _permissionValidations = require("../permissionValidations");
|
|
13
|
+
require("../assets/styles/checkbox.scss");
|
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
15
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
16
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -20,7 +21,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
20
21
|
* componente para gerar propriedades customizadas.
|
|
21
22
|
*/
|
|
22
23
|
|
|
23
|
-
const CheckBox =
|
|
24
|
+
const CheckBox = _ref => {
|
|
24
25
|
let {
|
|
25
26
|
name,
|
|
26
27
|
required,
|
|
@@ -29,7 +30,7 @@ const CheckBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
29
30
|
onChange,
|
|
30
31
|
autofocus,
|
|
31
32
|
hint,
|
|
32
|
-
id =
|
|
33
|
+
id = '',
|
|
33
34
|
gridLayout,
|
|
34
35
|
checked = false,
|
|
35
36
|
disabled,
|
|
@@ -38,13 +39,13 @@ const CheckBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
38
39
|
tooltipPosition = 'top',
|
|
39
40
|
tooltipWidth = 'auto',
|
|
40
41
|
skeletonize,
|
|
41
|
-
targetRef
|
|
42
|
+
targetRef,
|
|
43
|
+
errorMessages
|
|
42
44
|
} = _ref;
|
|
43
45
|
const [isChecked, setIsChecked] = (0, _react.useState)(checked);
|
|
44
46
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible];
|
|
45
47
|
const [onDenied] = (0, _react.useState)((0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr));
|
|
46
48
|
const inputRef = (0, _react.useRef)(null);
|
|
47
|
-
(0, _react.useImperativeHandle)(ref, () => inputRef.current, [inputRef.current]);
|
|
48
49
|
(0, _react.useEffect)(() => {
|
|
49
50
|
setIsChecked(checked);
|
|
50
51
|
}, [checked]);
|
|
@@ -76,7 +77,8 @@ const CheckBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
76
77
|
onClick: !shouldDisable() && !skeletonize ? () => setIsChecked(!isChecked) : undefined,
|
|
77
78
|
tabIndex: -1,
|
|
78
79
|
role: "checkbox",
|
|
79
|
-
"aria-checked": "false"
|
|
80
|
+
"aria-checked": "false",
|
|
81
|
+
onKeyPress: undefined
|
|
80
82
|
}, /*#__PURE__*/_react.default.createElement("input", {
|
|
81
83
|
ref: r => {
|
|
82
84
|
if (targetRef) targetRef(r);
|
|
@@ -101,12 +103,11 @@ const CheckBox = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
101
103
|
visible: !!hint,
|
|
102
104
|
description: hint,
|
|
103
105
|
customClass: "hint"
|
|
104
|
-
}));
|
|
106
|
+
}), errorMessages && helpers.getErrorMessages(errorMessages));
|
|
105
107
|
if (onDenied.unvisible) return null;
|
|
106
108
|
return gridLayout ? /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
|
|
107
109
|
customClass: "-withinput",
|
|
108
110
|
cols: gridLayout
|
|
109
111
|
}, renderInput()) : renderInput();
|
|
110
|
-
}
|
|
111
|
-
CheckBox.displayName = 'CheckBox';
|
|
112
|
+
};
|
|
112
113
|
var _default = exports.default = CheckBox;
|
package/lib/checkbox/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { Position } from '../@types/Position.js';
|
|
|
4
4
|
|
|
5
5
|
type ChangeEvent = {
|
|
6
6
|
checked: boolean;
|
|
7
|
-
id
|
|
7
|
+
id: string;
|
|
8
8
|
name?: string;
|
|
9
9
|
value: boolean;
|
|
10
10
|
};
|
|
@@ -37,6 +37,7 @@ interface ICheckBoxProps {
|
|
|
37
37
|
skeletonize?: boolean;
|
|
38
38
|
targetRef?: (ref: HTMLInputElement | null) => void;
|
|
39
39
|
targetSpanRef?: (ref: HTMLSpanElement | null) => void;
|
|
40
|
+
errorMessages?: string[] | undefined;
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
export type { ChangeEvent, ICheckBoxProps };
|
package/lib/dialog/Custom.js
CHANGED
|
@@ -5,13 +5,11 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
9
9
|
var _base = _interopRequireDefault(require("./base"));
|
|
10
10
|
var _Footer = _interopRequireDefault(require("./base/Footer"));
|
|
11
11
|
var _icons = _interopRequireDefault(require("../icons"));
|
|
12
12
|
var _buttons = require("../buttons");
|
|
13
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
14
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
15
|
const getIcon = (iconName, icon) => {
|
|
@@ -48,7 +46,7 @@ const Custom = props => {
|
|
|
48
46
|
}, props.text)), props.buttons && props.buttons.length > 0 && /*#__PURE__*/_react.default.createElement(_Footer.default, props, /*#__PURE__*/_react.default.createElement(_buttons.ButtonContainer, {
|
|
49
47
|
position: "right"
|
|
50
48
|
}, props.buttons.map(button => /*#__PURE__*/_react.default.cloneElement(button, {
|
|
51
|
-
key: "button-".concat(
|
|
49
|
+
key: "button-".concat(_uuid.default.v1())
|
|
52
50
|
})))));
|
|
53
51
|
};
|
|
54
52
|
var _default = exports.default = Custom;
|
|
@@ -11,11 +11,11 @@ var _base = require("../base");
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
13
13
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
14
|
-
const getCloseButton = handleClose => /*#__PURE__*/_react.default.createElement("
|
|
14
|
+
const getCloseButton = handleClose => /*#__PURE__*/_react.default.createElement("button", {
|
|
15
|
+
id: "botao-fechar-modal-cabecalho",
|
|
15
16
|
className: "close-button",
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
tabIndex: 0
|
|
17
|
+
tabIndex: 0,
|
|
18
|
+
onClick: handleClose
|
|
19
19
|
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
20
20
|
name: "cancel2"
|
|
21
21
|
}));
|
package/lib/dialog/base/index.js
CHANGED
|
@@ -103,10 +103,10 @@ const BaseDialog = props => {
|
|
|
103
103
|
};
|
|
104
104
|
const createdModal = /*#__PURE__*/_react.default.createElement("div", {
|
|
105
105
|
className: "modalcontainer",
|
|
106
|
+
onMouseDown: handleClickOutside,
|
|
106
107
|
style: {
|
|
107
108
|
zIndex: 99999 + Number(zIndex)
|
|
108
|
-
}
|
|
109
|
-
onMouseDown: handleClickOutside
|
|
109
|
+
}
|
|
110
110
|
}, overlay && /*#__PURE__*/_react.default.createElement("div", {
|
|
111
111
|
className: "modal-overlay",
|
|
112
112
|
"data-testid": "modal-overlay"
|
|
@@ -120,8 +120,33 @@ const BaseDialog = props => {
|
|
|
120
120
|
ref: wrapperEl
|
|
121
121
|
}, children)));
|
|
122
122
|
(0, _react.useEffect)(() => {
|
|
123
|
-
if (open
|
|
124
|
-
|
|
123
|
+
if (open) {
|
|
124
|
+
var _wrapperEl$current;
|
|
125
|
+
if (closeOnEsc) {
|
|
126
|
+
document.addEventListener('keydown', handleCloseOnEsc);
|
|
127
|
+
}
|
|
128
|
+
const modalContent = (_wrapperEl$current = wrapperEl.current) === null || _wrapperEl$current === void 0 ? void 0 : _wrapperEl$current.querySelector('#modal-dialog-content');
|
|
129
|
+
const modalElementsForTrapFocus = (modalContent === null || modalContent === void 0 ? void 0 : modalContent.querySelectorAll('[href], select, textarea, button, input:not([disabled]), [tabindex]:not([tabindex="-1"])')) || [];
|
|
130
|
+
if (wrapperEl && wrapperEl.current && modalElementsForTrapFocus.length) {
|
|
131
|
+
const firstElementInModal = modalElementsForTrapFocus[0];
|
|
132
|
+
let lastElementInModal = modalElementsForTrapFocus[modalElementsForTrapFocus.length - 1];
|
|
133
|
+
const handleTabKeyPress = event => {
|
|
134
|
+
if (event.key === 'Tab') {
|
|
135
|
+
if (event.shiftKey && document.activeElement === firstElementInModal) {
|
|
136
|
+
event.preventDefault();
|
|
137
|
+
lastElementInModal.focus();
|
|
138
|
+
} else if (!event.shiftKey && document.activeElement === lastElementInModal) {
|
|
139
|
+
event.preventDefault();
|
|
140
|
+
firstElementInModal.focus();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
};
|
|
144
|
+
wrapperEl.current.addEventListener('keydown', handleTabKeyPress);
|
|
145
|
+
return () => {
|
|
146
|
+
var _wrapperEl$current2;
|
|
147
|
+
(_wrapperEl$current2 = wrapperEl.current) === null || _wrapperEl$current2 === void 0 ? void 0 : _wrapperEl$current2.removeEventListener('keydown', handleTabKeyPress);
|
|
148
|
+
};
|
|
149
|
+
}
|
|
125
150
|
}
|
|
126
151
|
return () => {
|
|
127
152
|
document.removeEventListener('keydown', handleCloseOnEsc);
|
package/lib/dialog/form/index.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = exports.FormDialogContext = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
9
9
|
var _base = _interopRequireDefault(require("../base"));
|
|
10
10
|
var _Header = _interopRequireDefault(require("../base/Header"));
|
|
11
11
|
var _index = require("../../buttons/index");
|
|
@@ -71,12 +71,12 @@ const ModalForm = props => {
|
|
|
71
71
|
}), props.buttons.map(button => {
|
|
72
72
|
if (context && context.securityBeforeUnload && button && button.type && button.type.name === 'CancelButton') {
|
|
73
73
|
return /*#__PURE__*/_react.default.cloneElement(button, {
|
|
74
|
-
key: "button-".concat(
|
|
74
|
+
key: "button-".concat(_uuid.default.v1()),
|
|
75
75
|
onClick: props.handlerClose
|
|
76
76
|
});
|
|
77
77
|
}
|
|
78
78
|
return /*#__PURE__*/_react.default.cloneElement(button, {
|
|
79
|
-
key: "button-".concat(
|
|
79
|
+
key: "button-".concat(_uuid.default.v1())
|
|
80
80
|
});
|
|
81
81
|
})))));
|
|
82
82
|
};
|
package/lib/drawer/Drawer.js
CHANGED
|
@@ -82,8 +82,9 @@ const BaseDrawer = _ref => {
|
|
|
82
82
|
body.appendChild(drawerOverlay);
|
|
83
83
|
};
|
|
84
84
|
const closeDrawerOnEsc = e => {
|
|
85
|
-
if (closeOnEsc &&
|
|
85
|
+
if (closeOnEsc && e.key === 'ESC') {
|
|
86
86
|
handlerClose === null || handlerClose === void 0 ? void 0 : handlerClose();
|
|
87
|
+
e.stopPropagation();
|
|
87
88
|
}
|
|
88
89
|
};
|
|
89
90
|
(0, _react.useEffect)(() => {
|
|
@@ -98,7 +99,7 @@ const BaseDrawer = _ref => {
|
|
|
98
99
|
if (overlay && !targetId && body) setDrawerOverlay(body);
|
|
99
100
|
return () => {
|
|
100
101
|
const drawerOverlay = document.getElementsByClassName('drawer-overlay')[0];
|
|
101
|
-
if (closeOnEsc) document.body.removeEventListener('
|
|
102
|
+
if (closeOnEsc) document.body.removeEventListener('keydown', closeDrawerOnEsc);
|
|
102
103
|
if (targetId) {
|
|
103
104
|
const drawerComponentTarget = document.getElementById(targetId);
|
|
104
105
|
if (drawerComponentTarget && drawerComponentEl.current) {
|
|
@@ -110,9 +111,9 @@ const BaseDrawer = _ref => {
|
|
|
110
111
|
}, []);
|
|
111
112
|
(0, _react.useEffect)(() => {
|
|
112
113
|
if (closeOnEsc) {
|
|
113
|
-
document.body.addEventListener('
|
|
114
|
+
document.body.addEventListener('keydown', closeDrawerOnEsc);
|
|
114
115
|
}
|
|
115
|
-
return () => document.body.removeEventListener('
|
|
116
|
+
return () => document.body.removeEventListener('keydown', closeDrawerOnEsc);
|
|
116
117
|
}, [closeOnEsc]);
|
|
117
118
|
const contextValues = {
|
|
118
119
|
handlerClose,
|
package/lib/dropdown/Popup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { IPopUpProps } from './types.js';
|
|
3
3
|
|
|
4
|
-
declare const DropdownPopup: ({ customClassForDropdown, align, isFloatMenu, topPosition, leftPosition, rightPosition, minWidth, ...props }: IPopUpProps) => React.ReactPortal;
|
|
4
|
+
declare const DropdownPopup: ({ id, customClassForDropdown, align, isFloatMenu, topPosition, leftPosition, rightPosition, minWidth, ...props }: IPopUpProps) => React.ReactPortal;
|
|
5
5
|
|
|
6
6
|
export { DropdownPopup as default };
|
package/lib/dropdown/Popup.js
CHANGED
|
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
9
|
-
|
|
9
|
+
var _uuid = require("uuid");
|
|
10
|
+
const _excluded = ["id", "customClassForDropdown", "align", "isFloatMenu", "topPosition", "leftPosition", "rightPosition", "minWidth"];
|
|
10
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
12
|
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
12
13
|
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
@@ -30,6 +31,7 @@ const getCalendarDropdownStyle = _ref => {
|
|
|
30
31
|
const body = document.getElementsByTagName('body')[0];
|
|
31
32
|
const DropdownPopup = _ref2 => {
|
|
32
33
|
let {
|
|
34
|
+
id,
|
|
33
35
|
customClassForDropdown = '',
|
|
34
36
|
align = 'left',
|
|
35
37
|
isFloatMenu = false,
|
|
@@ -53,10 +55,11 @@ const DropdownPopup = _ref2 => {
|
|
|
53
55
|
if (popup && popup.current) {
|
|
54
56
|
const modalContainers = document.body.getElementsByClassName('modalcontainer');
|
|
55
57
|
const lastModalContainer = modalContainers[modalContainers.length - 1];
|
|
56
|
-
popup.current.style.zIndex = "".concat(modalContainers.length ? lastModalContainer.style.zIndex : 99999);
|
|
58
|
+
popup.current.style.zIndex = "".concat(modalContainers.length ? Number(lastModalContainer.style.zIndex) + 1 : 99999);
|
|
57
59
|
}
|
|
58
60
|
(0, _react.useEffect)(() => {
|
|
59
61
|
body.appendChild(popup.current);
|
|
62
|
+
popup.current.id = id || "dropdown-component-".concat((0, _uuid.v1)());
|
|
60
63
|
return () => {
|
|
61
64
|
body.removeChild(popup.current);
|
|
62
65
|
};
|
package/lib/dropdown/types.d.ts
CHANGED
|
@@ -64,7 +64,8 @@ const InputTextBase = props => {
|
|
|
64
64
|
onDragOver,
|
|
65
65
|
onDrop,
|
|
66
66
|
onDragLeave,
|
|
67
|
-
readOnlyClass
|
|
67
|
+
readOnlyClass,
|
|
68
|
+
autoComplete = 'on'
|
|
68
69
|
} = props;
|
|
69
70
|
let propsInput;
|
|
70
71
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
@@ -175,6 +176,7 @@ const InputTextBase = props => {
|
|
|
175
176
|
rows: props.rows,
|
|
176
177
|
cols: props.cols
|
|
177
178
|
}, inputProps())) : /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
179
|
+
autoComplete: autoComplete,
|
|
178
180
|
tabIndex: applyTabIndex()
|
|
179
181
|
}, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
180
182
|
visible: !!hint,
|
|
@@ -20,22 +20,24 @@ const ActionButtons = _ref => {
|
|
|
20
20
|
dropdownAlignButton = 'left'
|
|
21
21
|
} = _ref;
|
|
22
22
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
23
|
+
transparent: true,
|
|
24
|
+
tabIndex: -1,
|
|
23
25
|
disabled: disabled,
|
|
26
|
+
boxShadow: false,
|
|
24
27
|
size: "small",
|
|
25
|
-
iconName: dropdownOpened ? 'up' : 'down',
|
|
26
28
|
onClick: handleOpenClose,
|
|
27
29
|
customClass: "actionbutton",
|
|
28
|
-
|
|
29
|
-
boxShadow: false
|
|
30
|
+
iconName: dropdownOpened ? 'up' : 'down'
|
|
30
31
|
}), /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
31
|
-
|
|
32
|
-
iconName: "more1",
|
|
32
|
+
dropdown: true,
|
|
33
33
|
transparent: true,
|
|
34
|
+
disabled: disabled,
|
|
35
|
+
tabIndex: -1,
|
|
34
36
|
boxShadow: false,
|
|
37
|
+
showIconDropdown: false,
|
|
38
|
+
iconName: "more1",
|
|
35
39
|
customClass: "actionbutton",
|
|
36
|
-
|
|
37
|
-
dropdownAlign: dropdownAlignButton,
|
|
38
|
-
showIconDropdown: false
|
|
40
|
+
dropdownAlign: dropdownAlignButton
|
|
39
41
|
}, /*#__PURE__*/_react.default.createElement(_list.default, null, /*#__PURE__*/_react.default.createElement(_list.ListItem, {
|
|
40
42
|
itemId: "1",
|
|
41
43
|
text: "Marcar Todos",
|
|
@@ -94,11 +94,9 @@ const Dropdown = props => {
|
|
|
94
94
|
className: "listcontainer"
|
|
95
95
|
}, dataCombo && dataCombo.length > 0 && /*#__PURE__*/_react.default.createElement("div", {
|
|
96
96
|
className: "item selectall"
|
|
97
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
98
|
-
role: "button",
|
|
97
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
99
98
|
className: "menubutton",
|
|
100
99
|
tabIndex: -1,
|
|
101
|
-
onKeyPress: () => {},
|
|
102
100
|
onClick: () => isAllChecked ? onUncheckAll(true) : onCheckAll(true)
|
|
103
101
|
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
104
102
|
name: isAllChecked && dataCombo.length > 0 ? 'checkboxChecked2' : 'checkboxUnchecked2',
|
|
@@ -110,11 +108,9 @@ const Dropdown = props => {
|
|
|
110
108
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
111
109
|
key: "dropdowmItem ".concat(item[idKey], "}"),
|
|
112
110
|
className: "item ".concat(isChecked && '-selected')
|
|
113
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
114
|
-
role: "button",
|
|
111
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
115
112
|
className: "menubutton",
|
|
116
113
|
tabIndex: -1,
|
|
117
|
-
onKeyPress: () => {},
|
|
118
114
|
onClick: () => {
|
|
119
115
|
onSelect(item);
|
|
120
116
|
}
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
8
8
|
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var
|
|
9
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
10
10
|
var _InputTextBase = _interopRequireDefault(require("../base/InputTextBase"));
|
|
11
11
|
var _ActionButtons = _interopRequireDefault(require("./ActionButtons"));
|
|
12
12
|
var _Dropdown = _interopRequireDefault(require("./Dropdown"));
|
|
@@ -33,7 +33,7 @@ const MultiSelectField = props => {
|
|
|
33
33
|
gridLayout,
|
|
34
34
|
dropdownAlignButton = 'left'
|
|
35
35
|
} = props;
|
|
36
|
-
const componentId = "multiSelect-component".concat(
|
|
36
|
+
const componentId = "multiSelect-component".concat(_uuid.default.v1());
|
|
37
37
|
const [dataCombo, setDataCombo] = (0, _react.useState)(dataSource);
|
|
38
38
|
const [selecteds, setSelecteds] = (0, _react.useState)();
|
|
39
39
|
const [inputValue, setInputValue] = (0, _react.useState)('');
|
|
@@ -11,37 +11,28 @@ const ActionButtons = props => {
|
|
|
11
11
|
const {
|
|
12
12
|
disabled = false,
|
|
13
13
|
showClearButton = true,
|
|
14
|
-
dropDownOpened
|
|
14
|
+
dropDownOpened,
|
|
15
|
+
handlerOpenClose,
|
|
16
|
+
handlerClear
|
|
15
17
|
} = props;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
};
|
|
22
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, showClearButton && /*#__PURE__*/_react.default.createElement("span", {
|
|
23
|
-
role: "button",
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: "actionbuttonsselect"
|
|
20
|
+
}, showClearButton && /*#__PURE__*/_react.default.createElement("button", {
|
|
21
|
+
disabled: disabled,
|
|
22
|
+
tabIndex: -1,
|
|
24
23
|
className: "actionbutton",
|
|
25
|
-
onClick:
|
|
26
|
-
props.handleClear();
|
|
27
|
-
},
|
|
28
|
-
onKeyPress: () => {},
|
|
29
|
-
tabIndex: -1
|
|
24
|
+
onClick: handlerClear
|
|
30
25
|
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
31
|
-
pointerEvents: "none",
|
|
32
26
|
name: "cancel",
|
|
33
|
-
|
|
34
|
-
})), /*#__PURE__*/_react.default.createElement("
|
|
35
|
-
|
|
27
|
+
pointerEvents: "none"
|
|
28
|
+
})), /*#__PURE__*/_react.default.createElement("button", {
|
|
29
|
+
disabled: disabled,
|
|
30
|
+
tabIndex: -1,
|
|
36
31
|
className: "actionbutton",
|
|
37
|
-
onClick:
|
|
38
|
-
returnOnClick();
|
|
39
|
-
},
|
|
40
|
-
onKeyPress: () => {},
|
|
41
|
-
tabIndex: -1
|
|
32
|
+
onClick: handlerOpenClose
|
|
42
33
|
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
43
|
-
|
|
44
|
-
|
|
34
|
+
pointerEvents: "none",
|
|
35
|
+
name: dropDownOpened ? 'mini_up' : 'mini_down'
|
|
45
36
|
})));
|
|
46
37
|
};
|
|
47
38
|
var _default = exports.default = ActionButtons;
|
|
@@ -29,7 +29,6 @@ const Dropdown = props => {
|
|
|
29
29
|
dropdownWidth,
|
|
30
30
|
gridWrapperStyle,
|
|
31
31
|
handleOnSelect,
|
|
32
|
-
handleOnBlur,
|
|
33
32
|
inputValue,
|
|
34
33
|
handleOnFocus,
|
|
35
34
|
opened,
|
|
@@ -83,15 +82,12 @@ const Dropdown = props => {
|
|
|
83
82
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
84
83
|
key: "dropdowmIten ".concat(item[idKey], "}"),
|
|
85
84
|
className: helper.getDropdownItemCssClass(itemSelected, disabled, striped)
|
|
86
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
87
|
-
role: "button",
|
|
85
|
+
}, /*#__PURE__*/_react.default.createElement("button", {
|
|
88
86
|
className: "menubutton",
|
|
89
87
|
tabIndex: -1,
|
|
90
|
-
|
|
91
|
-
onClick: () => {
|
|
88
|
+
onClick: event => {
|
|
92
89
|
if (!disabled) {
|
|
93
90
|
handleOnSelect(item);
|
|
94
|
-
handleOnBlur(item);
|
|
95
91
|
}
|
|
96
92
|
}
|
|
97
93
|
}, item.iconName && /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
@@ -6,6 +6,6 @@ import '../../base/types.js';
|
|
|
6
6
|
import 'react';
|
|
7
7
|
import '../../../@types/Period.js';
|
|
8
8
|
|
|
9
|
-
declare const Selecteds: ({ currents, descriptionKey, idKey,
|
|
9
|
+
declare const Selecteds: ({ currents, descriptionKey, idKey, handlerOnUnselect, }: ISelectedsMultipleProps) => JSX.Element;
|
|
10
10
|
|
|
11
11
|
export { Selecteds as default };
|
|
@@ -11,17 +11,15 @@ const Selecteds = _ref => {
|
|
|
11
11
|
currents,
|
|
12
12
|
descriptionKey,
|
|
13
13
|
idKey,
|
|
14
|
-
|
|
14
|
+
handlerOnUnselect
|
|
15
15
|
} = _ref;
|
|
16
16
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, currents.map(selected => /*#__PURE__*/_react.default.createElement("div", {
|
|
17
17
|
className: "selecteditem",
|
|
18
18
|
key: "selected-".concat(selected[idKey])
|
|
19
|
-
}, typeof descriptionKey === 'string' ? selected[descriptionKey] : descriptionKey(selected), /*#__PURE__*/_react.default.createElement("
|
|
19
|
+
}, typeof descriptionKey === 'string' ? selected[descriptionKey] : descriptionKey(selected), /*#__PURE__*/_react.default.createElement("button", {
|
|
20
20
|
className: "close",
|
|
21
|
-
role: "button",
|
|
22
21
|
tabIndex: -1,
|
|
23
|
-
|
|
24
|
-
onClick: () => handleOnUnselect(selected[idKey])
|
|
22
|
+
onClick: () => handlerOnUnselect(selected[idKey])
|
|
25
23
|
}))));
|
|
26
24
|
};
|
|
27
25
|
var _default = exports.default = Selecteds;
|
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
|
-
var
|
|
9
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
10
10
|
var _Dropdown = _interopRequireDefault(require("../Dropdown"));
|
|
11
11
|
var _ActionButtons = _interopRequireDefault(require("../ActionButtons"));
|
|
12
12
|
var _Selecteds = _interopRequireDefault(require("./Selecteds"));
|
|
@@ -24,7 +24,8 @@ const MultipleSelect = props => {
|
|
|
24
24
|
handlerClear,
|
|
25
25
|
value = [],
|
|
26
26
|
remoteSearch = false,
|
|
27
|
-
descriptionKey
|
|
27
|
+
descriptionKey,
|
|
28
|
+
showClearButton
|
|
28
29
|
} = props;
|
|
29
30
|
const [dataCombo, setDataCombo] = (0, _react.useState)(dataSource);
|
|
30
31
|
const [currents, setCurrents] = (0, _react.useState)([]);
|
|
@@ -35,11 +36,12 @@ const MultipleSelect = props => {
|
|
|
35
36
|
const [insideComponent, setInsideComponent] = (0, _react.useState)(false);
|
|
36
37
|
const [onDenied, setOnDeniedSelect] = (0, _react.useState)();
|
|
37
38
|
const [valueFromProps, setValueFromProps] = (0, _react.useState)([]);
|
|
38
|
-
const componentId = "select-component".concat(
|
|
39
|
+
const componentId = "select-component".concat(_uuid.default.v1());
|
|
39
40
|
const componentRef = (0, _react.useRef)(null);
|
|
40
41
|
const dropdownRef = (0, _react.useRef)(null);
|
|
41
42
|
const selectWrapper = (0, _react.useRef)();
|
|
42
43
|
const gridElRef = (0, _react.useRef)();
|
|
44
|
+
const inputTextRef = (0, _react.useRef)(null);
|
|
43
45
|
const descriptionKeyIsString = typeof descriptionKey === 'string';
|
|
44
46
|
const onScreenResize = () => {
|
|
45
47
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
@@ -53,12 +55,12 @@ const MultipleSelect = props => {
|
|
|
53
55
|
}
|
|
54
56
|
};
|
|
55
57
|
const onMouseMove = event => {
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
const
|
|
61
|
-
setInsideComponent(
|
|
58
|
+
var _dropdownRef$current, _dropdownRef$current$;
|
|
59
|
+
const target = event.target;
|
|
60
|
+
const idDropdown = ((_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : (_dropdownRef$current$ = _dropdownRef$current.parentElement) === null || _dropdownRef$current$ === void 0 ? void 0 : _dropdownRef$current$.id) || '';
|
|
61
|
+
const dropdownElement = document.getElementById(idDropdown);
|
|
62
|
+
const keepDropdownOpen = Boolean(dropdownElement === null || dropdownElement === void 0 ? void 0 : dropdownElement.contains(target));
|
|
63
|
+
setInsideComponent(keepDropdownOpen);
|
|
62
64
|
};
|
|
63
65
|
const onClearClick = () => {
|
|
64
66
|
setSelected(undefined);
|
|
@@ -94,6 +96,7 @@ const MultipleSelect = props => {
|
|
|
94
96
|
setCurrents(currentsSelect);
|
|
95
97
|
setDataCombo(dataSource);
|
|
96
98
|
setInputValue([]);
|
|
99
|
+
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
97
100
|
setOpened(false);
|
|
98
101
|
if (props.onSelect) setSelected(props.onSelect(currentsSelect.map(i => i[idKey])));
|
|
99
102
|
};
|
|
@@ -101,11 +104,13 @@ const MultipleSelect = props => {
|
|
|
101
104
|
if (currents) {
|
|
102
105
|
const result = currents.filter(item => item[idKey] !== id);
|
|
103
106
|
setCurrents(result);
|
|
107
|
+
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
108
|
+
setOpened(false);
|
|
104
109
|
if (props.onSelect) setSelected(props.onSelect(result.map(i => i[idKey])));
|
|
105
110
|
}
|
|
106
111
|
};
|
|
107
112
|
const onOpenClose = () => {
|
|
108
|
-
setOpened(!
|
|
113
|
+
setOpened(prevState => !prevState);
|
|
109
114
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
110
115
|
};
|
|
111
116
|
const onFocus = () => {
|
|
@@ -115,7 +120,10 @@ const MultipleSelect = props => {
|
|
|
115
120
|
};
|
|
116
121
|
const onBlur = e => {
|
|
117
122
|
if (props.onBlur) props.onBlur(e);
|
|
118
|
-
if (!insideComponent)
|
|
123
|
+
if (!insideComponent) {
|
|
124
|
+
setOpened(false);
|
|
125
|
+
setDataCombo(dataSource);
|
|
126
|
+
}
|
|
119
127
|
};
|
|
120
128
|
const onInputKeyDown = e => {
|
|
121
129
|
if (e.keyCode) {
|
|
@@ -190,6 +198,8 @@ const MultipleSelect = props => {
|
|
|
190
198
|
ref: componentRef,
|
|
191
199
|
className: "select-component"
|
|
192
200
|
}, /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({}, props, {
|
|
201
|
+
inputRef: inputTextRef,
|
|
202
|
+
autoComplete: "off",
|
|
193
203
|
value: inputValue.toString(),
|
|
194
204
|
readOnly: shouldBeReadOnly(),
|
|
195
205
|
onFocus: () => {
|
|
@@ -208,21 +218,19 @@ const MultipleSelect = props => {
|
|
|
208
218
|
selectWrapper.current = r;
|
|
209
219
|
},
|
|
210
220
|
handlerSetOnDenied: setOnDenied,
|
|
211
|
-
rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default,
|
|
221
|
+
rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
|
|
222
|
+
showClearButton: showClearButton,
|
|
212
223
|
disabled: shouldDisable() || shouldBeReadOnly(),
|
|
213
224
|
dropDownOpened: opened,
|
|
214
|
-
|
|
225
|
+
handlerClear: () => {
|
|
215
226
|
if (shouldDisable()) return null;
|
|
216
227
|
return onClearClick();
|
|
217
228
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
currents: currents
|
|
224
|
-
}, props, {
|
|
225
|
-
handleOnUnselect: onUnselect
|
|
229
|
+
handlerOpenClose: onOpenClose
|
|
230
|
+
})
|
|
231
|
+
}), /*#__PURE__*/_react.default.createElement(_Selecteds.default, _extends({}, props, {
|
|
232
|
+
currents: currents,
|
|
233
|
+
handlerOnUnselect: onUnselect
|
|
226
234
|
}))), opened && /*#__PURE__*/_react.default.createElement(_Dropdown.default, _extends({}, props, {
|
|
227
235
|
selected: selected,
|
|
228
236
|
selectFieldRef: componentRef,
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
9
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
10
|
var _Dropdown = _interopRequireDefault(require("../Dropdown"));
|
|
11
11
|
var _ActionButtons = _interopRequireDefault(require("../ActionButtons"));
|
|
@@ -19,7 +19,7 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function
|
|
|
19
19
|
const SimpleSelect = props => {
|
|
20
20
|
const {
|
|
21
21
|
value,
|
|
22
|
-
descriptionKey
|
|
22
|
+
descriptionKey,
|
|
23
23
|
dataSource = [],
|
|
24
24
|
gridLayout,
|
|
25
25
|
onSearch,
|
|
@@ -32,7 +32,9 @@ const SimpleSelect = props => {
|
|
|
32
32
|
name = '',
|
|
33
33
|
undigitable,
|
|
34
34
|
searchOnDropdown = false,
|
|
35
|
-
allOptions = undefined
|
|
35
|
+
allOptions = undefined,
|
|
36
|
+
showClearButton = false,
|
|
37
|
+
searchNotFoundText
|
|
36
38
|
} = props;
|
|
37
39
|
const descriptionKeyIsString = typeof descriptionKey === 'string';
|
|
38
40
|
const dataSourceWithAllOptions = allOptions ? [{
|
|
@@ -48,15 +50,11 @@ const SimpleSelect = props => {
|
|
|
48
50
|
const [onDenied, setOnDeniedSelect] = (0, _react.useState)();
|
|
49
51
|
const [isTyping, setIsTyping] = (0, _react.useState)(false);
|
|
50
52
|
const dropdownRef = (0, _react.useRef)(null);
|
|
51
|
-
const componentId = "select-component".concat(
|
|
53
|
+
const componentId = "select-component-".concat(name, "-").concat(_uuid.default.v1());
|
|
52
54
|
const componentRef = (0, _react.useRef)(null);
|
|
53
55
|
const selectWrapper = (0, _react.useRef)();
|
|
54
56
|
const gridElement = (0, _react.useRef)();
|
|
55
|
-
const
|
|
56
|
-
setInputText('');
|
|
57
|
-
setSelected(null);
|
|
58
|
-
setDataCombo(dataSourceWithAllOptions);
|
|
59
|
-
};
|
|
57
|
+
const inputTextRef = (0, _react.useRef)(null);
|
|
60
58
|
const onScreenResize = () => {
|
|
61
59
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
62
60
|
};
|
|
@@ -70,10 +68,12 @@ const SimpleSelect = props => {
|
|
|
70
68
|
}
|
|
71
69
|
};
|
|
72
70
|
const onMouseMove = event => {
|
|
71
|
+
var _dropdownRef$current2, _dropdownRef$current3;
|
|
73
72
|
const target = event.target;
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
|
|
73
|
+
const idDropdown = ((_dropdownRef$current2 = dropdownRef.current) === null || _dropdownRef$current2 === void 0 ? void 0 : (_dropdownRef$current3 = _dropdownRef$current2.parentElement) === null || _dropdownRef$current3 === void 0 ? void 0 : _dropdownRef$current3.id) || '';
|
|
74
|
+
const dropdownElement = document.getElementById(idDropdown);
|
|
75
|
+
const keepDropdownOpen = Boolean(dropdownElement === null || dropdownElement === void 0 ? void 0 : dropdownElement.contains(target));
|
|
76
|
+
setInsideComponent(keepDropdownOpen);
|
|
77
77
|
};
|
|
78
78
|
const getSelectEvent = selectedEvent => ({
|
|
79
79
|
target: {
|
|
@@ -104,7 +104,6 @@ const SimpleSelect = props => {
|
|
|
104
104
|
}
|
|
105
105
|
setOpened(true);
|
|
106
106
|
setInputText(valueFilter);
|
|
107
|
-
setSelected(selectedFilter);
|
|
108
107
|
if (selectedFilter) {
|
|
109
108
|
if (descriptionKeyIsString && valueFilter === selectedFilter[descriptionKey] || !descriptionKeyIsString && valueFilter === descriptionKey(selectedFilter)) {
|
|
110
109
|
onChange(selectedFilter);
|
|
@@ -112,18 +111,22 @@ const SimpleSelect = props => {
|
|
|
112
111
|
}
|
|
113
112
|
};
|
|
114
113
|
const onSelect = selectedDropdown => {
|
|
115
|
-
if (selectedDropdown
|
|
116
|
-
setOpened(false);
|
|
114
|
+
if (!selectedDropdown) return;
|
|
117
115
|
setSelected(selectedDropdown);
|
|
118
116
|
if (descriptionKeyIsString) setInputText(selectedDropdown[descriptionKey]);else setInputText(descriptionKey(selectedDropdown));
|
|
119
|
-
|
|
117
|
+
new Promise(resolve => {
|
|
118
|
+
resolve(onChange(selectedDropdown));
|
|
119
|
+
}).finally(() => {
|
|
120
|
+
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
121
|
+
setOpened(false);
|
|
122
|
+
});
|
|
120
123
|
};
|
|
121
124
|
const onOpenClose = () => {
|
|
122
|
-
setOpened(!
|
|
125
|
+
setOpened(prevState => !prevState);
|
|
123
126
|
if (selectWrapper.current) setDropdownWidth(selectWrapper.current.clientWidth);
|
|
124
127
|
};
|
|
125
128
|
const onFocus = () => {
|
|
126
|
-
|
|
129
|
+
if (openDropdownOnFocus) setOpened(true);
|
|
127
130
|
if (selectWrapper) {
|
|
128
131
|
const dropdownWidthFocus = selectWrapper.current ? selectWrapper.current.clientWidth : 0;
|
|
129
132
|
setDropdownWidth(dropdownWidthFocus);
|
|
@@ -133,15 +136,20 @@ const SimpleSelect = props => {
|
|
|
133
136
|
if (props.onBlur) {
|
|
134
137
|
const event = getSelectEvent(selected);
|
|
135
138
|
props.onBlur(event);
|
|
136
|
-
if (selected) {
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
139
|
+
if (selected && descriptionKeyIsString && inputText !== selected[descriptionKey] || !descriptionKeyIsString && inputText !== descriptionKey(selected)) {
|
|
140
|
+
setSelected(null);
|
|
141
|
+
setInputText(inputText);
|
|
142
|
+
new Promise(resolve => {
|
|
143
|
+
resolve(onChange(null));
|
|
144
|
+
}).finally(() => {
|
|
145
|
+
onChange();
|
|
146
|
+
});
|
|
140
147
|
}
|
|
141
148
|
}
|
|
142
149
|
if (!insideComponent) {
|
|
143
150
|
setOpened(false);
|
|
144
151
|
setIsTyping(false);
|
|
152
|
+
setDataCombo(dataSourceWithAllOptions);
|
|
145
153
|
}
|
|
146
154
|
};
|
|
147
155
|
const onInputKeyDown = e => {
|
|
@@ -159,13 +167,22 @@ const SimpleSelect = props => {
|
|
|
159
167
|
index = dataCombo && index === 0 ? (dataCombo === null || dataCombo === void 0 ? void 0 : dataCombo.length) - 1 : index - 1;
|
|
160
168
|
}
|
|
161
169
|
setSelected(dataCombo[index]);
|
|
170
|
+
if (descriptionKeyIsString) setInputText(dataCombo[index][descriptionKey]);
|
|
171
|
+
if (!descriptionKeyIsString) setInputText(descriptionKey(dataCombo[index]));
|
|
162
172
|
}
|
|
163
173
|
}
|
|
164
174
|
if (!isTyping) setIsTyping(true);
|
|
165
175
|
};
|
|
166
176
|
const onClearClick = () => {
|
|
167
|
-
|
|
168
|
-
|
|
177
|
+
new Promise(resolve => {
|
|
178
|
+
resolve(onChange(null));
|
|
179
|
+
}).finally(() => {
|
|
180
|
+
setSelected(null);
|
|
181
|
+
setInputText('');
|
|
182
|
+
onChange();
|
|
183
|
+
if (inputTextRef && inputTextRef.current) inputTextRef.current.focus();
|
|
184
|
+
setOpened(false);
|
|
185
|
+
});
|
|
169
186
|
};
|
|
170
187
|
const setOnDenied = onDeniedSelect => {
|
|
171
188
|
setOnDeniedSelect(onDeniedSelect);
|
|
@@ -228,6 +245,8 @@ const SimpleSelect = props => {
|
|
|
228
245
|
ref: componentRef,
|
|
229
246
|
className: "select-component"
|
|
230
247
|
}, /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({}, props, {
|
|
248
|
+
inputRef: inputTextRef,
|
|
249
|
+
autoComplete: "off",
|
|
231
250
|
readOnly: undigitable || shouldBeReadOnly(),
|
|
232
251
|
value: inputText,
|
|
233
252
|
onFocus: onFocus,
|
|
@@ -242,18 +261,18 @@ const SimpleSelect = props => {
|
|
|
242
261
|
selectWrapper.current = r;
|
|
243
262
|
},
|
|
244
263
|
handlerSetOnDenied: inputOnDenied => setOnDenied(inputOnDenied),
|
|
245
|
-
rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default,
|
|
264
|
+
rightElements: /*#__PURE__*/_react.default.createElement(_ActionButtons.default, {
|
|
246
265
|
disabled: shouldDisable() || shouldBeReadOnly(),
|
|
266
|
+
showClearButton: showClearButton,
|
|
247
267
|
dropDownOpened: opened,
|
|
248
|
-
|
|
268
|
+
handlerClear: () => {
|
|
249
269
|
if (shouldDisable()) return null;
|
|
250
270
|
return onClearClick();
|
|
251
271
|
},
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
}))
|
|
272
|
+
handlerOpenClose: onOpenClose
|
|
273
|
+
})
|
|
256
274
|
})), opened && /*#__PURE__*/_react.default.createElement(_Dropdown.default, _extends({}, props, {
|
|
275
|
+
opened: opened,
|
|
257
276
|
selected: selected,
|
|
258
277
|
inputValue: inputText,
|
|
259
278
|
selectFieldRef: componentRef,
|
|
@@ -267,9 +286,9 @@ const SimpleSelect = props => {
|
|
|
267
286
|
handleOnKeydown: onInputKeyDown,
|
|
268
287
|
handleOnBlur: () => onBlur,
|
|
269
288
|
handleOnFocus: onFocus,
|
|
270
|
-
opened: opened,
|
|
271
289
|
dataCombo: dataCombo,
|
|
272
|
-
dropdownWidth: dropdownWidth || 0
|
|
290
|
+
dropdownWidth: dropdownWidth || 0,
|
|
291
|
+
searchNotFoundText: searchNotFoundText
|
|
273
292
|
})));
|
|
274
293
|
};
|
|
275
294
|
var _default = exports.default = SimpleSelect;
|
|
@@ -92,7 +92,7 @@ interface ISelectedsMultipleProps {
|
|
|
92
92
|
idKey: string;
|
|
93
93
|
descriptionKey: DescriptionKey;
|
|
94
94
|
currents: DataCombo[];
|
|
95
|
-
|
|
95
|
+
handlerOnUnselect: (id: string) => void;
|
|
96
96
|
}
|
|
97
97
|
interface GetFilteredParams {
|
|
98
98
|
dataSource: DataCombo[];
|
package/lib/inputs/types.d.ts
CHANGED
|
@@ -133,8 +133,8 @@ interface IDropdownSelectProps {
|
|
|
133
133
|
align?: 'left' | 'right';
|
|
134
134
|
}
|
|
135
135
|
interface IActionButtonsSelectProps {
|
|
136
|
-
|
|
137
|
-
|
|
136
|
+
handlerClear: () => void;
|
|
137
|
+
handlerOpenClose: () => void;
|
|
138
138
|
dropDownOpened: boolean;
|
|
139
139
|
showClearButton?: boolean;
|
|
140
140
|
disabled?: boolean;
|
|
@@ -29,7 +29,7 @@ Object.defineProperty(exports, "NavSubMenuItem", {
|
|
|
29
29
|
});
|
|
30
30
|
exports.default = void 0;
|
|
31
31
|
var _react = _interopRequireWildcard(require("react"));
|
|
32
|
-
var
|
|
32
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
33
33
|
var _NavMenuItem = _interopRequireDefault(require("./NavMenuItem"));
|
|
34
34
|
var _NavSubMenuItem = _interopRequireDefault(require("./NavSubMenuItem"));
|
|
35
35
|
var _NavMenuGroup = _interopRequireDefault(require("./NavMenuGroup"));
|
|
@@ -82,7 +82,7 @@ const SideNav = props => {
|
|
|
82
82
|
} = child;
|
|
83
83
|
if ((type === _NavMenuItem.default || type === _NavSubMenuItem.default) && !child.props.children) {
|
|
84
84
|
setMenuItemsContent(prevState => [...prevState, {
|
|
85
|
-
id: "".concat(child.props.title, "-").concat(
|
|
85
|
+
id: "".concat(child.props.title, "-").concat(_uuid.default.v1()),
|
|
86
86
|
content: child.props.title,
|
|
87
87
|
url: child.props.url
|
|
88
88
|
}]);
|
|
@@ -127,7 +127,7 @@ const SideNav = props => {
|
|
|
127
127
|
}, [expanded]);
|
|
128
128
|
const returnMenuItems = () => menuItemsContent.filter(item => item.content !== '');
|
|
129
129
|
const getPopupMenuSearch = () => /*#__PURE__*/_react.default.createElement(_NavMenuGroup.default, {
|
|
130
|
-
key: "popup-menusearch-".concat(
|
|
130
|
+
key: "popup-menusearch-".concat(_uuid.default.v1())
|
|
131
131
|
}, /*#__PURE__*/_react.default.createElement(_NavMenuItem.default, {
|
|
132
132
|
childrenIsSubMenu: false,
|
|
133
133
|
customClass: "-customsidenavitem",
|
|
@@ -34,15 +34,16 @@ const PopupMenuSearch = props => {
|
|
|
34
34
|
const closeOnEsc = e => {
|
|
35
35
|
if (e.keyCode === 27 || e.key === 'ESC') {
|
|
36
36
|
handlerClose();
|
|
37
|
+
e.stopPropagation();
|
|
37
38
|
}
|
|
38
39
|
};
|
|
39
40
|
(0, _react.useEffect)(() => {
|
|
40
41
|
body.appendChild(popupRef.current);
|
|
41
42
|
if (searchFieldRef && searchFieldRef.current) searchFieldRef.current.focus();
|
|
42
|
-
document.body.addEventListener('
|
|
43
|
+
document.body.addEventListener('keydown', closeOnEsc);
|
|
43
44
|
return () => {
|
|
44
45
|
body.removeChild(popupRef.current);
|
|
45
|
-
document.body.removeEventListener('
|
|
46
|
+
document.body.removeEventListener('keydown', closeOnEsc);
|
|
46
47
|
};
|
|
47
48
|
}, []);
|
|
48
49
|
(0, _react.useEffect)(() => {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ITableHeaderProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
|
|
4
|
-
declare const HeaderColumn: ({ customClass, style, children, textAlign, visible, id, }: ITableHeaderProps) => JSX.Element | null;
|
|
4
|
+
declare const HeaderColumn: ({ customClass, style, children, textAlign, visible, id, rowSpan, colSpan, }: ITableHeaderProps) => JSX.Element | null;
|
|
5
5
|
|
|
6
6
|
export { HeaderColumn as default };
|
|
@@ -17,7 +17,9 @@ const HeaderColumn = _ref => {
|
|
|
17
17
|
children,
|
|
18
18
|
textAlign,
|
|
19
19
|
visible = true,
|
|
20
|
-
id
|
|
20
|
+
id,
|
|
21
|
+
rowSpan,
|
|
22
|
+
colSpan
|
|
21
23
|
} = _ref;
|
|
22
24
|
const {
|
|
23
25
|
skeletonize,
|
|
@@ -28,6 +30,8 @@ const HeaderColumn = _ref => {
|
|
|
28
30
|
if (!visible) return null;
|
|
29
31
|
return /*#__PURE__*/_react.default.createElement("th", {
|
|
30
32
|
id: id,
|
|
33
|
+
rowSpan: rowSpan,
|
|
34
|
+
colSpan: colSpan,
|
|
31
35
|
className: "headercolumn ".concat(customClass, " text-align-").concat(textAlign),
|
|
32
36
|
style: style
|
|
33
37
|
}, skeletonize && (skeletonInHeader || !skeletonInRows) && !vertical ? /*#__PURE__*/_react.default.createElement(_skeleton.default, {
|
package/lib/table/types.d.ts
CHANGED
|
@@ -25,6 +25,8 @@ interface ITableHeaderProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
|
25
25
|
textAlign?: string;
|
|
26
26
|
visible?: boolean;
|
|
27
27
|
id?: string;
|
|
28
|
+
rowSpan?: number;
|
|
29
|
+
colSpan?: number;
|
|
28
30
|
}
|
|
29
31
|
interface ITableBodyProps extends TableHTMLAttributes<HTMLTableElement> {
|
|
30
32
|
children?: ReactNode;
|
package/lib/tabs/context.js
CHANGED
|
@@ -67,7 +67,7 @@ function TabsProvider(_ref) {
|
|
|
67
67
|
updateTabs(tabId);
|
|
68
68
|
setSelectedTabId(tabId);
|
|
69
69
|
if (onTabChange) {
|
|
70
|
-
onTabChange(
|
|
70
|
+
onTabChange(tabId);
|
|
71
71
|
}
|
|
72
72
|
}, [onTabChange, setSelectedTabId, updateTabs]);
|
|
73
73
|
const removeTab = (0, _react.useCallback)(tabId => {
|
package/lib/tabs/types.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ interface TabsProviderProps {
|
|
|
23
23
|
container: RefObject<HTMLDivElement>;
|
|
24
24
|
tabsWidth: number | string;
|
|
25
25
|
selectedTab?: string | number | null;
|
|
26
|
-
onTabChange?: (tabId: string) => void;
|
|
26
|
+
onTabChange?: (tabId: string | number) => void;
|
|
27
27
|
onTabClose?: (tabId: string) => void;
|
|
28
28
|
firstTabIdent?: boolean;
|
|
29
29
|
}
|
|
@@ -32,12 +32,12 @@ interface ITabsPros {
|
|
|
32
32
|
toolbar?: ReactElement;
|
|
33
33
|
toolBarRef?: (value: HTMLDivElement | null) => void;
|
|
34
34
|
children?: ReactNode;
|
|
35
|
-
selectedTab?: string;
|
|
35
|
+
selectedTab?: string | number;
|
|
36
36
|
tabMenuSize?: Size;
|
|
37
37
|
tabMenuAlign?: Position;
|
|
38
38
|
firstTabIdent?: boolean;
|
|
39
39
|
tabMenuPosition?: Exclude<Position, 'center'>;
|
|
40
|
-
handlerTabClick?: (id?: string) => void;
|
|
40
|
+
handlerTabClick?: (id?: string | number) => void;
|
|
41
41
|
handlerCloseTab?: (id?: string, idx?: string) => void;
|
|
42
42
|
customClassForToolBar?: string;
|
|
43
43
|
tabsWidth?: string | number;
|
package/lib/tooltip/index.js
CHANGED
|
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
9
|
-
var
|
|
9
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
10
10
|
require("../assets/styles/tooltip.scss");
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
@@ -23,7 +23,7 @@ const Tooltip = _ref => {
|
|
|
23
23
|
} = _ref;
|
|
24
24
|
const tooltipComponent = (0, _react.useRef)(document.createElement('div'));
|
|
25
25
|
(0, _react.useEffect)(() => {
|
|
26
|
-
tooltipComponent.current.id = "tooltip-".concat(
|
|
26
|
+
tooltipComponent.current.id = "tooltip-".concat(_uuid.default.v1());
|
|
27
27
|
tooltipComponent.current.className = "tooltip-component ".concat(className, " ");
|
|
28
28
|
tooltipComponent.current.dataset.testid = 'tooltip-component';
|
|
29
29
|
tooltipComponent.current.style.cssText = style;
|
package/lib/treeview/Node.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var
|
|
8
|
+
var _uuid = _interopRequireDefault(require("uuid"));
|
|
9
9
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
10
10
|
var _checkbox = _interopRequireDefault(require("../checkbox"));
|
|
11
11
|
var _icons = _interopRequireDefault(require("../icons"));
|
|
@@ -166,7 +166,7 @@ const TreeNode = props => {
|
|
|
166
166
|
} : {};
|
|
167
167
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
168
168
|
style: style,
|
|
169
|
-
key: "element-".concat(
|
|
169
|
+
key: "element-".concat(_uuid.default.v1()),
|
|
170
170
|
className: "element"
|
|
171
171
|
}, element);
|
|
172
172
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "linear-react-components-ui",
|
|
3
|
-
"version": "1.1.2-beta.
|
|
3
|
+
"version": "1.1.2-beta.6",
|
|
4
4
|
"description": "Linear Sistemas ReactJs Components",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/index.cjs",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"react-router-dom": "6.21.3",
|
|
55
55
|
"react-syntax-highlighter": "15.5.0",
|
|
56
56
|
"semver": "7.5.4",
|
|
57
|
-
"uuid": "
|
|
57
|
+
"uuid": "3.3.3"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@babel/cli": "7.23.9",
|