linear-react-components-ui 1.1.21-beta.4 → 1.1.21-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/button.scss +1 -0
- package/lib/assets/styles/calendar.scss +64 -30
- package/lib/assets/styles/datepicker.scss +26 -6
- package/lib/assets/styles/periodpicker.scss +60 -20
- package/lib/assets/styles/select.scss +19 -15
- package/lib/assets/styles/sidenav.scss +1 -1
- package/lib/assets/styles/tabs.scss +48 -18
- package/lib/buttons/DefaultButton.js +6 -3
- package/lib/buttons/types.d.ts +1 -0
- package/lib/calendar/DangerCalendar.d.ts +1 -0
- package/lib/calendar/InfoCalendar.d.ts +1 -0
- package/lib/calendar/PrimaryCalendar.d.ts +1 -0
- package/lib/calendar/SuccessCalendar.d.ts +1 -0
- package/lib/calendar/WarningCalendar.d.ts +1 -0
- package/lib/calendar/base/Day.d.ts +1 -0
- package/lib/calendar/base/Day.js +6 -2
- package/lib/calendar/base/Month.d.ts +2 -1
- package/lib/calendar/base/Month.js +2 -0
- package/lib/calendar/base/Week.d.ts +1 -0
- package/lib/calendar/base/index.d.ts +1 -0
- package/lib/calendar/base/index.js +61 -13
- package/lib/calendar/index.d.ts +1 -0
- package/lib/calendar/types.d.ts +5 -0
- package/lib/checkbox/Label.js +31 -0
- package/lib/dialog/base/Content.js +5 -4
- package/lib/dialog/base/Header.js +0 -1
- package/lib/dialog/base/index.js +26 -3
- package/lib/drawer/Drawer.js +1 -1
- package/lib/dropdown/Popup.d.ts +2 -2
- package/lib/dropdown/Popup.js +38 -17
- package/lib/dropdown/types.d.ts +7 -3
- package/lib/dropdown/withDropdown.js +5 -4
- package/lib/form/Field.js +11 -2
- package/lib/form/FieldArray.js +11 -2
- package/lib/form/FieldNumber.js +10 -1
- package/lib/form/FieldPeriod.js +15 -12
- package/lib/form/index.d.ts +1 -1
- package/lib/form/index.js +25 -3
- package/lib/form/types.d.ts +13 -1
- package/lib/form/withFieldHOC.js +4 -2
- package/lib/inputs/base/InputTextBase.js +9 -2
- package/lib/inputs/base/types.d.ts +2 -0
- package/lib/inputs/date/Dialog.js +5 -4
- package/lib/inputs/date/Dropdown.js +13 -7
- package/lib/inputs/date/helpers.d.ts +31 -11
- package/lib/inputs/date/helpers.js +32 -15
- package/lib/inputs/date/index.js +142 -102
- package/lib/inputs/date/types.d.ts +8 -6
- package/lib/inputs/mask/BaseMask.d.ts +1 -1
- package/lib/inputs/mask/BaseMask.js +6 -4
- package/lib/inputs/mask/helpers.d.ts +6 -53
- package/lib/inputs/mask/helpers.js +15 -35
- package/lib/inputs/mask/imaskHOC.js +203 -0
- package/lib/inputs/mask/types.d.ts +1 -0
- package/lib/inputs/number/BaseNumber.d.ts +1 -1
- package/lib/inputs/number/BaseNumber.js +9 -2
- package/lib/inputs/number/Currency.d.ts +1 -1
- package/lib/inputs/number/Currency.js +11 -4
- package/lib/inputs/period/Dialog.d.ts +1 -1
- package/lib/inputs/period/Dialog.js +5 -3
- package/lib/inputs/period/Dropdown.js +16 -8
- package/lib/inputs/period/PeriodList.js +3 -12
- package/lib/inputs/period/index.js +210 -74
- package/lib/inputs/period/types.d.ts +10 -8
- package/lib/inputs/select/ActionButtons.js +3 -2
- package/lib/inputs/select/Dropdown.js +4 -2
- package/lib/inputs/select/multiple/Selecteds.d.ts +1 -1
- package/lib/inputs/select/multiple/Selecteds.js +3 -1
- package/lib/inputs/select/multiple/index.js +12 -5
- package/lib/inputs/select/simple/index.js +10 -4
- package/lib/inputs/select/types.d.ts +5 -0
- package/lib/inputs/types.d.ts +1 -0
- package/lib/menus/sidenav/popup_menu_help/index.js +85 -0
- package/lib/popover/PopoverText.d.ts +1 -0
- package/lib/popover/PopoverTitle.d.ts +1 -0
- package/lib/popover/index.d.ts +3 -5
- package/lib/popover/index.js +21 -15
- package/lib/popover/types.d.ts +11 -0
- package/lib/tabs/DropdownItems.js +62 -0
- package/lib/tabs/DropdownTabs.js +21 -7
- package/lib/tabs/Menu.d.ts +1 -1
- package/lib/tabs/Menu.js +4 -2
- package/lib/tabs/MenuItems.js +70 -0
- package/lib/tabs/MenuTabs.js +16 -5
- package/lib/tabs/context.d.ts +1 -1
- package/lib/tabs/context.js +6 -4
- package/lib/tabs/index.d.ts +1 -1
- package/lib/tabs/index.js +13 -6
- package/lib/tabs/types.d.ts +8 -1
- package/lib/toolbar/types.d.ts +2 -1
- package/lib/treeview_old/Header.js +29 -0
- package/lib/treeview_old/Node.js +68 -0
- package/lib/treeview_old/index.js +43 -0
- package/package.json +1 -1
|
@@ -5,14 +5,17 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _uuid = require("uuid");
|
|
8
9
|
var _moment = _interopRequireDefault(require("moment"));
|
|
9
10
|
var _Month = _interopRequireDefault(require("./Month"));
|
|
10
11
|
var _buttons = _interopRequireDefault(require("../../buttons"));
|
|
12
|
+
var _gridlayout = _interopRequireDefault(require("../../gridlayout"));
|
|
11
13
|
var _helpers = require("./helpers");
|
|
12
14
|
require("../../assets/styles/calendar.scss");
|
|
13
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
16
|
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
17
|
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; }
|
|
18
|
+
const arrowKeys = ['ArrowUp', 'ArrowRight', 'ArrowDown', 'ArrowLeft'];
|
|
16
19
|
const Calendar = props => {
|
|
17
20
|
const {
|
|
18
21
|
currentDate = (0, _moment.default)(),
|
|
@@ -20,12 +23,14 @@ const Calendar = props => {
|
|
|
20
23
|
drawGridLines = false,
|
|
21
24
|
colorStyle,
|
|
22
25
|
unpadding = false,
|
|
23
|
-
customClass
|
|
26
|
+
customClass,
|
|
27
|
+
gridLayout,
|
|
28
|
+
currentDateButton,
|
|
29
|
+
calendarContainer
|
|
24
30
|
} = props;
|
|
31
|
+
const currentMonth = (0, _react.useRef)(null);
|
|
32
|
+
const currentCalendarRef = (0, _react.useRef)(null);
|
|
25
33
|
const [dataAtual, setDataAtual] = (0, _react.useState)((0, _helpers.validDate)(currentDate));
|
|
26
|
-
(0, _react.useEffect)(() => {
|
|
27
|
-
setDataAtual((0, _helpers.validDate)(currentDate));
|
|
28
|
-
}, []);
|
|
29
34
|
const onDateChangeFunction = date => {
|
|
30
35
|
if (onDateChange) onDateChange(date);
|
|
31
36
|
setDataAtual(date);
|
|
@@ -38,12 +43,46 @@ const Calendar = props => {
|
|
|
38
43
|
const currentDateClone = dataAtual.clone();
|
|
39
44
|
setDataAtual(currentDateClone.add(1, 'month'));
|
|
40
45
|
};
|
|
46
|
+
const navigateWithArrows = event => {
|
|
47
|
+
const sourceTarget = event.target;
|
|
48
|
+
const daysOfMonth = currentMonth.current?.getElementsByClassName('daybutton');
|
|
49
|
+
let indexCurrentDay = 0;
|
|
50
|
+
if (daysOfMonth.length) {
|
|
51
|
+
Array.from(daysOfMonth).find((dayButton, index) => {
|
|
52
|
+
if (dayButton && dayButton.id === sourceTarget.id) indexCurrentDay = index;
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
const element = {
|
|
56
|
+
ArrowUp: daysOfMonth[indexCurrentDay - 7],
|
|
57
|
+
ArrowRight: daysOfMonth[indexCurrentDay + 1],
|
|
58
|
+
ArrowDown: daysOfMonth[indexCurrentDay + 7],
|
|
59
|
+
ArrowLeft: daysOfMonth[indexCurrentDay - 1]
|
|
60
|
+
}[event.code];
|
|
61
|
+
if (element) element.focus();
|
|
62
|
+
};
|
|
41
63
|
const contextValues = {
|
|
42
64
|
handleDateChange: onDateChangeFunction
|
|
43
65
|
};
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
66
|
+
(0, _react.useEffect)(() => {
|
|
67
|
+
calendarContainer?.(currentCalendarRef?.current);
|
|
68
|
+
setDataAtual((0, _helpers.validDate)(currentDate));
|
|
69
|
+
document.addEventListener('keydown', event => {
|
|
70
|
+
if (event && event.code && arrowKeys.includes(event.code) && currentCalendarRef.current && currentCalendarRef.current.contains(document.activeElement) && currentMonth.current && currentMonth.current.contains(document.activeElement)) {
|
|
71
|
+
navigateWithArrows(event);
|
|
72
|
+
event.stopPropagation();
|
|
73
|
+
event.preventDefault();
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
return () => {
|
|
77
|
+
document.removeEventListener('keydown', () => {});
|
|
78
|
+
};
|
|
79
|
+
}, []);
|
|
80
|
+
(0, _react.useEffect)(() => {
|
|
81
|
+
const daysOfMonth = currentMonth.current?.getElementsByClassName('-selectedday')[0];
|
|
82
|
+
currentDateButton?.(daysOfMonth.firstChild);
|
|
83
|
+
}, [currentDate]);
|
|
84
|
+
const component = /*#__PURE__*/_react.default.createElement("div", {
|
|
85
|
+
ref: currentCalendarRef,
|
|
47
86
|
className: (0, _helpers.getCalendarCssClass)({
|
|
48
87
|
unpadding,
|
|
49
88
|
drawGridLines,
|
|
@@ -53,27 +92,36 @@ const Calendar = props => {
|
|
|
53
92
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
54
93
|
className: "calendarheader"
|
|
55
94
|
}, /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
56
|
-
|
|
95
|
+
id: (0, _uuid.v1)(),
|
|
57
96
|
boxShadow: false,
|
|
97
|
+
iconName: "arrow_left",
|
|
98
|
+
customClass: "navbutton nav-arrow-left",
|
|
58
99
|
onClick: () => {
|
|
59
100
|
previousMonth();
|
|
60
|
-
}
|
|
61
|
-
customClass: "navbutton"
|
|
101
|
+
}
|
|
62
102
|
}), /*#__PURE__*/_react.default.createElement("span", {
|
|
63
103
|
className: "monthname"
|
|
64
104
|
}, dataAtual.format('MMMM YYYY')), /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
105
|
+
id: (0, _uuid.v1)(),
|
|
65
106
|
boxShadow: false,
|
|
66
107
|
iconName: "arrow_right",
|
|
108
|
+
customClass: "navbutton nav-arrow-right",
|
|
67
109
|
onClick: () => {
|
|
68
110
|
nextMonth();
|
|
69
|
-
}
|
|
70
|
-
customClass: "navbutton"
|
|
111
|
+
}
|
|
71
112
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
72
113
|
className: "daynames"
|
|
73
114
|
}, (0, _helpers.dayNames)().map(name => /*#__PURE__*/_react.default.createElement("div", {
|
|
74
115
|
key: `day-${name}`
|
|
75
116
|
}, name))), /*#__PURE__*/_react.default.createElement(_Month.default, {
|
|
117
|
+
monthRef: currentMonth,
|
|
76
118
|
currentDate: dataAtual
|
|
77
|
-
}))
|
|
119
|
+
}));
|
|
120
|
+
return /*#__PURE__*/_react.default.createElement(_helpers.CalendarContext.Provider, {
|
|
121
|
+
value: contextValues
|
|
122
|
+
}, !gridLayout ? component : /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
|
|
123
|
+
customClass: "-withinput",
|
|
124
|
+
cols: gridLayout
|
|
125
|
+
}, component));
|
|
78
126
|
};
|
|
79
127
|
var _default = exports.default = Calendar;
|
package/lib/calendar/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { default as DangerCalendar } from './DangerCalendar.js';
|
|
|
5
5
|
export { default as WarningCalendar } from './WarningCalendar.js';
|
|
6
6
|
export { default as InfoCalendar } from './InfoCalendar.js';
|
|
7
7
|
import './types.js';
|
|
8
|
+
import 'react';
|
|
8
9
|
import 'moment';
|
|
9
10
|
import '../@types/ColorStyles.js';
|
|
10
11
|
|
package/lib/calendar/types.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { LegacyRef } from 'react';
|
|
1
2
|
import { Moment } from 'moment';
|
|
2
3
|
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
3
4
|
|
|
@@ -9,6 +10,9 @@ interface ICalendarProps {
|
|
|
9
10
|
onDateChange?: (date: Moment) => void;
|
|
10
11
|
colorStyle?: ColorStyles;
|
|
11
12
|
handleDateChange?: (date: Moment) => void;
|
|
13
|
+
gridLayout?: string;
|
|
14
|
+
currentDateButton?: (buttonElement: HTMLButtonElement) => void;
|
|
15
|
+
calendarContainer?: (calendarElement: HTMLDivElement | null) => void;
|
|
12
16
|
}
|
|
13
17
|
interface IWeekProps {
|
|
14
18
|
weekStartDate: Moment;
|
|
@@ -19,6 +23,7 @@ interface IDayProps {
|
|
|
19
23
|
day: Moment;
|
|
20
24
|
}
|
|
21
25
|
interface IMonthProps {
|
|
26
|
+
monthRef: LegacyRef<HTMLDivElement> | undefined;
|
|
22
27
|
currentDate: Moment;
|
|
23
28
|
}
|
|
24
29
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
|
|
9
|
+
var _hint = _interopRequireDefault(require("../hint"));
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const Label = _ref => {
|
|
12
|
+
let {
|
|
13
|
+
label,
|
|
14
|
+
targetSpanRef,
|
|
15
|
+
disabled,
|
|
16
|
+
hint
|
|
17
|
+
} = _ref;
|
|
18
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
|
+
className: "description"
|
|
20
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
21
|
+
ref: r => {
|
|
22
|
+
if (targetSpanRef) targetSpanRef(r);
|
|
23
|
+
}
|
|
24
|
+
}, label), /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
25
|
+
disabled: disabled,
|
|
26
|
+
visible: !!hint,
|
|
27
|
+
description: hint,
|
|
28
|
+
customClass: "hint"
|
|
29
|
+
}));
|
|
30
|
+
};
|
|
31
|
+
var _default = exports.default = (0, _withTooltip.default)(Label);
|
|
@@ -4,19 +4,20 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
var _react =
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
8
|
require("../../assets/styles/dialog.scss");
|
|
9
|
-
function
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
10
11
|
const Content = _ref => {
|
|
11
12
|
let {
|
|
12
13
|
children,
|
|
13
14
|
styleForContent,
|
|
14
15
|
className = ''
|
|
15
16
|
} = _ref;
|
|
16
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
17
|
+
return /*#__PURE__*/_react.default.createElement(_react.Suspense, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
17
18
|
id: "modal-dialog-content",
|
|
18
19
|
className: `dialog-content ${className}`,
|
|
19
20
|
style: styleForContent
|
|
20
|
-
}, children);
|
|
21
|
+
}, children));
|
|
21
22
|
};
|
|
22
23
|
var _default = exports.default = Content;
|
|
@@ -14,7 +14,6 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
14
14
|
const getCloseButton = handleClose => /*#__PURE__*/_react.default.createElement("button", {
|
|
15
15
|
id: "botao-fechar-modal-cabecalho",
|
|
16
16
|
className: "close-button",
|
|
17
|
-
tabIndex: 0,
|
|
18
17
|
onClick: handleClose
|
|
19
18
|
}, /*#__PURE__*/_react.default.createElement(_icons.default, {
|
|
20
19
|
name: "cancel2"
|
package/lib/dialog/base/index.js
CHANGED
|
@@ -36,6 +36,7 @@ const BaseDialog = props => {
|
|
|
36
36
|
headerRef
|
|
37
37
|
} = (0, _react.useContext)(_form.FormDialogContext);
|
|
38
38
|
const wrapperEl = (0, _react.useRef)(null);
|
|
39
|
+
const modalContainerRef = (0, _react.useRef)(null);
|
|
39
40
|
const [isDragging, setIsDragging] = (0, _react.useState)(false);
|
|
40
41
|
const [open = true, setOpen] = (0, _react.useState)(openProp);
|
|
41
42
|
if (openProp !== undefined && openProp !== open) {
|
|
@@ -57,12 +58,23 @@ const BaseDialog = props => {
|
|
|
57
58
|
handleClose();
|
|
58
59
|
}
|
|
59
60
|
};
|
|
60
|
-
const
|
|
61
|
+
const onKeyDownPress = event => {
|
|
61
62
|
if (event?.key === 'Escape') {
|
|
62
63
|
event.stopPropagation();
|
|
63
64
|
handleClose();
|
|
64
65
|
}
|
|
65
66
|
};
|
|
67
|
+
const modalContainerWithoutBlur = event => {
|
|
68
|
+
const focusOnAnotherField = !modalContainerRef.current?.contains(event.relatedTarget);
|
|
69
|
+
const modalContent = wrapperEl.current?.querySelector('#modal-dialog-content');
|
|
70
|
+
const elementsFocusable = modalContent?.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
|
|
71
|
+
if (focusOnAnotherField && elementsFocusable?.length) {
|
|
72
|
+
const firstElement = elementsFocusable[0];
|
|
73
|
+
setTimeout(() => {
|
|
74
|
+
firstElement.focus();
|
|
75
|
+
}, 150);
|
|
76
|
+
}
|
|
77
|
+
};
|
|
66
78
|
const onDialogPositionChange = _ref => {
|
|
67
79
|
let {
|
|
68
80
|
positionX,
|
|
@@ -106,6 +118,8 @@ const BaseDialog = props => {
|
|
|
106
118
|
};
|
|
107
119
|
const createdModal = /*#__PURE__*/_react.default.createElement("div", {
|
|
108
120
|
id: id,
|
|
121
|
+
ref: modalContainerRef,
|
|
122
|
+
onBlur: modalContainerWithoutBlur,
|
|
109
123
|
className: "modalcontainer",
|
|
110
124
|
onMouseDown: handleClickOutside,
|
|
111
125
|
style: {
|
|
@@ -123,14 +137,23 @@ const BaseDialog = props => {
|
|
|
123
137
|
style: (0, _style.default)(props),
|
|
124
138
|
ref: wrapperEl
|
|
125
139
|
}, children)));
|
|
140
|
+
(0, _react.useLayoutEffect)(() => {
|
|
141
|
+
const {
|
|
142
|
+
activeElement
|
|
143
|
+
} = document;
|
|
144
|
+
const lastElementActiveBeforeOpen = activeElement;
|
|
145
|
+
return () => {
|
|
146
|
+
lastElementActiveBeforeOpen?.focus();
|
|
147
|
+
};
|
|
148
|
+
}, []);
|
|
126
149
|
(0, _react.useEffect)(() => {
|
|
127
150
|
if (open) {
|
|
128
151
|
if (closeOnEsc) {
|
|
129
|
-
document.addEventListener('keydown',
|
|
152
|
+
document.addEventListener('keydown', onKeyDownPress);
|
|
130
153
|
}
|
|
131
154
|
}
|
|
132
155
|
return () => {
|
|
133
|
-
document.removeEventListener('keydown',
|
|
156
|
+
document.removeEventListener('keydown', onKeyDownPress);
|
|
134
157
|
};
|
|
135
158
|
}, [open, closeOnEsc]);
|
|
136
159
|
(0, _react.useEffect)(() => {
|
package/lib/drawer/Drawer.js
CHANGED
|
@@ -136,7 +136,7 @@ const BaseDrawer = _ref => {
|
|
|
136
136
|
className: `drawercontent ${skeletonize ? '-skeletonized' : ''} ${customClassForContent}`
|
|
137
137
|
}, title && /*#__PURE__*/_react.default.createElement(_.DrawerHeader, _extends({}, headerProps, {
|
|
138
138
|
customClass: customClassForDrawer
|
|
139
|
-
})), content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children, getSpinner())));
|
|
139
|
+
})), /*#__PURE__*/_react.default.createElement(_react.Suspense, null, content ? /*#__PURE__*/_react.default.createElement(_.DrawerContent, null, content) : children), getSpinner())));
|
|
140
140
|
return /*#__PURE__*/_reactDom.default.createPortal(drawerContent(), drawerContainerEl.current);
|
|
141
141
|
};
|
|
142
142
|
var _default = exports.default = BaseDrawer;
|
package/lib/dropdown/Popup.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { IPopupProps } from './types.js';
|
|
3
3
|
|
|
4
|
-
declare const DropdownPopup: ({ id, customClassForDropdown, align, isFloatMenu, topPosition, leftPosition, rightPosition, minWidth, ...props }:
|
|
4
|
+
declare const DropdownPopup: ({ id, customClassForDropdown, align, isFloatMenu, topPosition, leftPosition, rightPosition, minWidth, targetRef, ...props }: IPopupProps) => React.ReactPortal;
|
|
5
5
|
|
|
6
6
|
export { DropdownPopup as default };
|
package/lib/dropdown/Popup.js
CHANGED
|
@@ -7,20 +7,36 @@ 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
|
+
const _excluded = ["id", "customClassForDropdown", "align", "isFloatMenu", "topPosition", "leftPosition", "rightPosition", "minWidth", "targetRef"];
|
|
11
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
12
|
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var s = Object.getOwnPropertySymbols(e); for (r = 0; r < s.length; r++) o = s[r], t.includes(o) || {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
13
13
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (e.includes(n)) continue; t[n] = r[n]; } return t; }
|
|
14
|
-
const
|
|
14
|
+
const getDropdownStyles = _ref => {
|
|
15
15
|
let {
|
|
16
|
-
topPosition,
|
|
17
|
-
leftPosition,
|
|
18
|
-
rightPosition,
|
|
19
16
|
align,
|
|
20
17
|
isFloatMenu,
|
|
21
|
-
minWidth
|
|
18
|
+
minWidth,
|
|
19
|
+
container,
|
|
20
|
+
target
|
|
22
21
|
} = _ref;
|
|
23
|
-
|
|
22
|
+
if (!container || !target) return '';
|
|
23
|
+
const targetDimensions = target.getBoundingClientRect();
|
|
24
|
+
const rightPosition = !isFloatMenu ? window.innerWidth - targetDimensions.x - targetDimensions.width - 4 : undefined;
|
|
25
|
+
const leftPosition = targetDimensions.left;
|
|
26
|
+
let topPosition = targetDimensions.top + window.scrollY + targetDimensions.height;
|
|
27
|
+
let top = topPosition + (isFloatMenu ? 6 : 2);
|
|
28
|
+
let maxHeight = undefined;
|
|
29
|
+
let showScroll = false;
|
|
30
|
+
const isOverflowing = top + container.scrollHeight > window.innerHeight;
|
|
31
|
+
if (isOverflowing) {
|
|
32
|
+
const targetPosition = targetDimensions.top;
|
|
33
|
+
const containerHeight = container.scrollHeight;
|
|
34
|
+
showScroll = containerHeight > targetPosition;
|
|
35
|
+
maxHeight = showScroll ? targetPosition - 10 : containerHeight;
|
|
36
|
+
top = top - maxHeight - targetDimensions.height - (isFloatMenu ? 6 : 2) - 5;
|
|
37
|
+
}
|
|
38
|
+
let style = `top: ${top}px; min-width: ${minWidth}px;`;
|
|
39
|
+
if (showScroll) style += `max-height: ${maxHeight}px; overflow-y: scroll;`;
|
|
24
40
|
if (align === 'left') {
|
|
25
41
|
style += `left: ${leftPosition}px;`;
|
|
26
42
|
} else if (align === 'right') {
|
|
@@ -28,7 +44,9 @@ const getCalendarDropdownStyle = _ref => {
|
|
|
28
44
|
}
|
|
29
45
|
return style;
|
|
30
46
|
};
|
|
31
|
-
const
|
|
47
|
+
const {
|
|
48
|
+
body
|
|
49
|
+
} = document;
|
|
32
50
|
const DropdownPopup = _ref2 => {
|
|
33
51
|
let {
|
|
34
52
|
id,
|
|
@@ -38,20 +56,13 @@ const DropdownPopup = _ref2 => {
|
|
|
38
56
|
topPosition = 0,
|
|
39
57
|
leftPosition = 0,
|
|
40
58
|
rightPosition = 0,
|
|
41
|
-
minWidth = 0
|
|
59
|
+
minWidth = 0,
|
|
60
|
+
targetRef
|
|
42
61
|
} = _ref2,
|
|
43
62
|
props = _objectWithoutProperties(_ref2, _excluded);
|
|
44
63
|
const popup = (0, _react.useRef)(document.createElement('div'));
|
|
45
64
|
popup.current.className = `dropdown-component ${customClassForDropdown}`;
|
|
46
65
|
popup.current.dataset.testid = 'dropdown-component';
|
|
47
|
-
popup.current.style.cssText = getCalendarDropdownStyle({
|
|
48
|
-
topPosition,
|
|
49
|
-
leftPosition,
|
|
50
|
-
rightPosition,
|
|
51
|
-
align,
|
|
52
|
-
isFloatMenu,
|
|
53
|
-
minWidth
|
|
54
|
-
});
|
|
55
66
|
if (popup && popup.current) {
|
|
56
67
|
const modalContainers = document.body.getElementsByClassName('modalcontainer');
|
|
57
68
|
const lastModalContainer = modalContainers[modalContainers.length - 1];
|
|
@@ -60,6 +71,16 @@ const DropdownPopup = _ref2 => {
|
|
|
60
71
|
(0, _react.useEffect)(() => {
|
|
61
72
|
body.appendChild(popup.current);
|
|
62
73
|
popup.current.id = id || `dropdown-component-${(0, _uuid.v1)()}`;
|
|
74
|
+
popup.current.style.cssText = getDropdownStyles({
|
|
75
|
+
topPosition,
|
|
76
|
+
leftPosition,
|
|
77
|
+
rightPosition,
|
|
78
|
+
align,
|
|
79
|
+
isFloatMenu,
|
|
80
|
+
minWidth,
|
|
81
|
+
container: popup.current,
|
|
82
|
+
target: targetRef
|
|
83
|
+
});
|
|
63
84
|
return () => {
|
|
64
85
|
body.removeChild(popup.current);
|
|
65
86
|
};
|
package/lib/dropdown/types.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ interface WithDropdownProps {
|
|
|
10
10
|
closeDropdownOnClickOutside?: boolean;
|
|
11
11
|
showDropdown?: () => void;
|
|
12
12
|
isFloatMenu?: boolean;
|
|
13
|
+
handlerClose?: (cb: () => void) => void;
|
|
13
14
|
}
|
|
14
15
|
interface WrappedComponentProps extends WithDropdownProps {
|
|
15
16
|
getDropdownPopup?: (ref: Ref<HTMLElement | null>) => ReactElement;
|
|
@@ -21,7 +22,7 @@ interface GetDisplayNameParams {
|
|
|
21
22
|
interface WithDropdownContextProps {
|
|
22
23
|
handleDropdownClose: () => void;
|
|
23
24
|
}
|
|
24
|
-
interface
|
|
25
|
+
interface IPopupProps {
|
|
25
26
|
id?: string;
|
|
26
27
|
children?: ReactNode;
|
|
27
28
|
customClassForDropdown?: string;
|
|
@@ -31,14 +32,17 @@ interface IPopUpProps {
|
|
|
31
32
|
leftPosition?: number;
|
|
32
33
|
rightPosition?: number;
|
|
33
34
|
minWidth?: number;
|
|
35
|
+
targetRef?: HTMLElement | HTMLInputElement | null;
|
|
34
36
|
}
|
|
35
|
-
interface
|
|
37
|
+
interface GetDropdownStyleParams {
|
|
36
38
|
align: 'left' | 'right';
|
|
37
39
|
minWidth: number;
|
|
38
40
|
isFloatMenu: boolean;
|
|
39
41
|
topPosition: number;
|
|
40
42
|
leftPosition: number;
|
|
41
43
|
rightPosition: number;
|
|
44
|
+
container?: HTMLDivElement;
|
|
45
|
+
target?: HTMLElement | HTMLInputElement | null;
|
|
42
46
|
}
|
|
43
47
|
|
|
44
|
-
export {
|
|
48
|
+
export { GetDisplayNameParams, GetDropdownStyleParams, IPopupProps, WithDropdownContextProps, WithDropdownProps, WrappedComponentProps };
|
|
@@ -20,6 +20,7 @@ const withDropdown = WrappedComponent => {
|
|
|
20
20
|
showDropdown,
|
|
21
21
|
dropdown,
|
|
22
22
|
closeDropdownOnClickOutside = true,
|
|
23
|
+
handlerClose,
|
|
23
24
|
customClassForDropdown,
|
|
24
25
|
children,
|
|
25
26
|
dropdownAlign = 'left',
|
|
@@ -48,11 +49,8 @@ const withDropdown = WrappedComponent => {
|
|
|
48
49
|
const getDropdown = targetRef => {
|
|
49
50
|
if (!targetRef || !opened) return null;
|
|
50
51
|
wrappedComponentRef.current = targetRef;
|
|
51
|
-
const targetDimensions = targetRef.getBoundingClientRect();
|
|
52
52
|
return /*#__PURE__*/_react.default.createElement(_Popup.default, {
|
|
53
|
-
|
|
54
|
-
rightPosition: !isFloatMenu ? window.innerWidth - targetDimensions.x - targetDimensions.width - 4 : undefined,
|
|
55
|
-
leftPosition: targetDimensions.left,
|
|
53
|
+
targetRef: targetRef,
|
|
56
54
|
align: dropdownAlign,
|
|
57
55
|
customClassForDropdown: customClassForDropdown,
|
|
58
56
|
isFloatMenu: isFloatMenu
|
|
@@ -73,6 +71,9 @@ const withDropdown = WrappedComponent => {
|
|
|
73
71
|
}
|
|
74
72
|
};
|
|
75
73
|
}, []);
|
|
74
|
+
(0, _react.useEffect)(() => {
|
|
75
|
+
if (handlerClose) handlerClose(() => setOpened(false));
|
|
76
|
+
}, [handlerClose]);
|
|
76
77
|
const contextValues = {
|
|
77
78
|
handleDropdownClose: onDropdownClick
|
|
78
79
|
};
|
package/lib/form/Field.js
CHANGED
|
@@ -9,7 +9,7 @@ var _lodash = _interopRequireDefault(require("lodash"));
|
|
|
9
9
|
var _withFieldHOC = _interopRequireDefault(require("./withFieldHOC"));
|
|
10
10
|
var _helpers = require("./helpers");
|
|
11
11
|
var constants = _interopRequireWildcard(require("../internals/constants"));
|
|
12
|
-
const _excluded = ["handlerFieldChange", "handlerFieldValidate", "onChange", "onBlur", "name", "validators", "data", "fieldErrors", "handlerStoreValidators", "handlerRemoveValidators", "component", "externalFieldErrors", "originalData"];
|
|
12
|
+
const _excluded = ["handlerFieldChange", "handlerFieldValidate", "onChange", "onBlur", "name", "validators", "data", "fieldErrors", "handlerStoreValidators", "handlerRemoveValidators", "component", "externalFieldErrors", "originalData", "handleValidationErrorsOnTab"];
|
|
13
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
14
14
|
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
15
|
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; }
|
|
@@ -104,13 +104,22 @@ const Field = /*#__PURE__*/(0, _react.forwardRef)((props, ref) => {
|
|
|
104
104
|
handlerRemoveValidators,
|
|
105
105
|
component: Component,
|
|
106
106
|
externalFieldErrors,
|
|
107
|
-
originalData
|
|
107
|
+
originalData,
|
|
108
|
+
handleValidationErrorsOnTab
|
|
108
109
|
} = props,
|
|
109
110
|
rest = _objectWithoutProperties(props, _excluded);
|
|
110
111
|
const {
|
|
111
112
|
handlerSetValidatorFromComponent,
|
|
112
113
|
validatorFromComponent
|
|
113
114
|
} = (0, _react.useContext)(_helpers.withFieldContext);
|
|
115
|
+
const hasErrorsMessagesOnField = (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
116
|
+
fieldErrors: props.fieldErrors
|
|
117
|
+
}));
|
|
118
|
+
if (handleValidationErrorsOnTab) handleValidationErrorsOnTab({
|
|
119
|
+
name: name,
|
|
120
|
+
tabId: props.tabId,
|
|
121
|
+
hasErrors: !!hasErrorsMessagesOnField.length
|
|
122
|
+
});
|
|
114
123
|
return /*#__PURE__*/_react.default.createElement(Component, _extends({}, rest, getEvents({
|
|
115
124
|
name,
|
|
116
125
|
validators,
|
package/lib/form/FieldArray.js
CHANGED
|
@@ -10,7 +10,7 @@ var _withFieldHOC = _interopRequireDefault(require("./withFieldHOC"));
|
|
|
10
10
|
var _gridlayout = _interopRequireDefault(require("../gridlayout"));
|
|
11
11
|
var _fieldset = _interopRequireDefault(require("../fieldset"));
|
|
12
12
|
var _helpers = require("./helpers");
|
|
13
|
-
const _excluded = ["cols", "label", "bordered", "labelContainerStyle", "skipLabel", "data", "name", "handlerStoreValidators", "component", "handlerFieldChange", "handlerFieldValidate", "changePropName", "fieldErrors", "externalMessagesErrors", "handlerRemoveValidators", "validators", "valuePropName", "originalData", "handlerSelecionados"];
|
|
13
|
+
const _excluded = ["cols", "label", "bordered", "labelContainerStyle", "skipLabel", "data", "name", "handlerStoreValidators", "component", "handlerFieldChange", "handlerFieldValidate", "changePropName", "fieldErrors", "externalMessagesErrors", "handlerRemoveValidators", "validators", "valuePropName", "originalData", "handlerSelecionados", "handleValidationErrorsOnTab"];
|
|
14
14
|
/* eslint-disable react-hooks/rules-of-hooks */
|
|
15
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
16
|
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); }
|
|
@@ -69,10 +69,19 @@ const FieldArray = props => {
|
|
|
69
69
|
validators,
|
|
70
70
|
valuePropName,
|
|
71
71
|
originalData,
|
|
72
|
-
handlerSelecionados
|
|
72
|
+
handlerSelecionados,
|
|
73
|
+
handleValidationErrorsOnTab
|
|
73
74
|
} = props,
|
|
74
75
|
rest = _objectWithoutProperties(props, _excluded);
|
|
75
76
|
let content = null;
|
|
77
|
+
const hasErrorsMessagesOnField = (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
78
|
+
fieldErrors: props.fieldErrors
|
|
79
|
+
}));
|
|
80
|
+
if (handleValidationErrorsOnTab) handleValidationErrorsOnTab({
|
|
81
|
+
name: name,
|
|
82
|
+
tabId: props.tabId,
|
|
83
|
+
hasErrors: !!hasErrorsMessagesOnField.length
|
|
84
|
+
});
|
|
76
85
|
if (Component) {
|
|
77
86
|
if (!skipLabel && label) {
|
|
78
87
|
content = /*#__PURE__*/_react.default.createElement(_fieldset.default, {
|
package/lib/form/FieldNumber.js
CHANGED
|
@@ -55,9 +55,18 @@ const getEventProps = _ref => {
|
|
|
55
55
|
const FieldMask = props => {
|
|
56
56
|
const {
|
|
57
57
|
data,
|
|
58
|
-
name
|
|
58
|
+
name,
|
|
59
|
+
handleValidationErrorsOnTab
|
|
59
60
|
} = props;
|
|
60
61
|
const currentValue = _lodash.default.get(data, name);
|
|
62
|
+
const hasErrorsMessagesOnField = (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
63
|
+
fieldErrors: props.fieldErrors
|
|
64
|
+
}));
|
|
65
|
+
if (handleValidationErrorsOnTab) handleValidationErrorsOnTab({
|
|
66
|
+
name: name,
|
|
67
|
+
tabId: props.tabId,
|
|
68
|
+
hasErrors: !!hasErrorsMessagesOnField.length
|
|
69
|
+
});
|
|
61
70
|
return /*#__PURE__*/_react.default.createElement(props.component, _extends({}, props, getEventProps(_objectSpread({}, props)), {
|
|
62
71
|
errorMessages: (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
63
72
|
fieldErrors: props.fieldErrors
|
package/lib/form/FieldPeriod.js
CHANGED
|
@@ -6,13 +6,17 @@ 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 _gridlayout = _interopRequireDefault(require("../gridlayout"));
|
|
10
9
|
var _withFieldHOC = _interopRequireDefault(require("./withFieldHOC"));
|
|
11
10
|
var _helpers = require("./helpers");
|
|
12
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
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); }
|
|
14
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; }
|
|
15
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
15
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
16
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
16
20
|
const FieldPeriod = props => {
|
|
17
21
|
const {
|
|
18
22
|
data,
|
|
@@ -25,10 +29,10 @@ const FieldPeriod = props => {
|
|
|
25
29
|
onChange,
|
|
26
30
|
validators,
|
|
27
31
|
originalData,
|
|
28
|
-
gridLayout,
|
|
29
32
|
component: Component,
|
|
30
33
|
name,
|
|
31
|
-
externalFieldErrors
|
|
34
|
+
externalFieldErrors,
|
|
35
|
+
handleValidationErrorsOnTab
|
|
32
36
|
} = props;
|
|
33
37
|
let content = null;
|
|
34
38
|
const [showValidateMessages, setShowValidateMessages] = (0, _react.useState)(false);
|
|
@@ -47,6 +51,14 @@ const FieldPeriod = props => {
|
|
|
47
51
|
externalFieldErrors,
|
|
48
52
|
externalMessagesErrors
|
|
49
53
|
});
|
|
54
|
+
const hasErrorsMessagesOnField = (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
55
|
+
fieldErrors: props.fieldErrors
|
|
56
|
+
}));
|
|
57
|
+
if (handleValidationErrorsOnTab) handleValidationErrorsOnTab({
|
|
58
|
+
name: name,
|
|
59
|
+
tabId: props.tabId,
|
|
60
|
+
hasErrors: !!hasErrorsMessagesOnField.length
|
|
61
|
+
});
|
|
50
62
|
if (Component) {
|
|
51
63
|
content = /*#__PURE__*/_react.default.createElement(Component, _extends({}, props, {
|
|
52
64
|
errorMessages: errorMessages,
|
|
@@ -84,15 +96,6 @@ const FieldPeriod = props => {
|
|
|
84
96
|
}
|
|
85
97
|
}));
|
|
86
98
|
}
|
|
87
|
-
if (gridLayout !== undefined) {
|
|
88
|
-
return /*#__PURE__*/_react.default.createElement(_gridlayout.default, {
|
|
89
|
-
customClass: "-withinput",
|
|
90
|
-
cols: gridLayout,
|
|
91
|
-
style: {
|
|
92
|
-
height: '100%'
|
|
93
|
-
}
|
|
94
|
-
}, content);
|
|
95
|
-
}
|
|
96
99
|
return content;
|
|
97
100
|
};
|
|
98
101
|
var _default = exports.default = (0, _withFieldHOC.default)(FieldPeriod);
|
package/lib/form/index.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ import '../@types/Period.js';
|
|
|
13
13
|
import '../internals/types.js';
|
|
14
14
|
import '../@types/Position.js';
|
|
15
15
|
|
|
16
|
-
declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, securityData, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, useInternalState, }: FormProps) => JSX.Element;
|
|
16
|
+
declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, securityData, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, useInternalState, onValidateErrorsOnTab, }: FormProps) => JSX.Element;
|
|
17
17
|
|
|
18
18
|
export { Form as default };
|