linear-react-components-ui 1.0.10-beta.2 → 1.0.10-beta.20
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/.eslintrc.json +1 -0
- package/.vscode/settings.json +1 -1
- package/README.md +19 -12
- package/lib/@types/Align.d.ts +2 -1
- package/lib/alerts/AlertContainer.d.ts +2 -0
- package/lib/alerts/AlertContainer.js +41 -69
- package/lib/alerts/AlertProvider.d.ts +2 -0
- package/lib/alerts/AlertProvider.js +7 -2
- package/lib/alerts/BaseAlert.d.ts +2 -0
- package/lib/alerts/Message.d.ts +2 -0
- package/lib/alerts/Message.js +1 -1
- package/lib/alerts/helpers.d.ts +2 -0
- package/lib/alerts/index.d.ts +2 -0
- package/lib/alerts/types.d.ts +3 -1
- package/lib/alerts/withAlert.d.ts +2 -0
- package/lib/assets/styles/dialog.scss +9 -6
- package/lib/assets/styles/drawers.scss +9 -0
- package/lib/assets/styles/effects.scss +2 -2
- package/lib/assets/styles/radio.scss +52 -8
- package/lib/assets/styles/table.scss +30 -0
- package/lib/assets/styles/tooltip.scss +42 -2
- package/lib/avatar/index.js +7 -3
- package/lib/buttons/ActivateButton.d.ts +2 -0
- package/lib/buttons/AddButton.d.ts +2 -0
- package/lib/buttons/Button.d.ts +2 -0
- package/lib/buttons/CancelButton.d.ts +2 -0
- package/lib/buttons/DangerButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.d.ts +2 -0
- package/lib/buttons/DefaultButton.js +20 -5
- package/lib/buttons/DestroyButton.d.ts +2 -0
- package/lib/buttons/EditButton.d.ts +2 -0
- package/lib/buttons/InactivateButton.d.ts +2 -0
- package/lib/buttons/InfoButton.d.ts +2 -0
- package/lib/buttons/PrimaryButton.d.ts +2 -0
- package/lib/buttons/RestoreButton.d.ts +2 -0
- package/lib/buttons/SaveButton.d.ts +2 -0
- package/lib/buttons/SuccessButton.d.ts +2 -0
- package/lib/buttons/WarningButton.d.ts +2 -0
- package/lib/buttons/button_container/index.js +7 -2
- package/lib/buttons/index.d.ts +2 -0
- package/lib/buttons/split_button/index.d.ts +2 -0
- package/lib/buttons/types.d.ts +6 -2
- package/lib/dialog/Alert.d.ts +3 -0
- package/lib/dialog/Custom.d.ts +3 -0
- package/lib/dialog/Custom.js +1 -1
- package/lib/dialog/Error.d.ts +3 -0
- package/lib/dialog/Information.d.ts +3 -0
- package/lib/dialog/Question.d.ts +3 -0
- package/lib/dialog/Warning.d.ts +3 -0
- package/lib/dialog/base/Content.d.ts +3 -0
- package/lib/dialog/base/Footer.d.ts +3 -0
- package/lib/dialog/base/Header.d.ts +3 -0
- package/lib/dialog/base/Header.js +12 -1
- package/lib/dialog/base/index.d.ts +3 -0
- package/lib/dialog/base/index.js +78 -16
- package/lib/dialog/form/index.d.ts +7 -3
- package/lib/dialog/form/index.js +18 -6
- package/lib/dialog/index.d.ts +3 -0
- package/lib/dialog/types.d.ts +10 -4
- package/lib/drawer/Content.d.ts +2 -0
- package/lib/drawer/Drawer.d.ts +3 -1
- package/lib/drawer/Drawer.js +29 -4
- package/lib/drawer/Header.d.ts +2 -0
- package/lib/drawer/helpers.d.ts +2 -0
- package/lib/drawer/index.d.ts +2 -0
- package/lib/drawer/types.d.ts +4 -1
- package/lib/dropdown/Popup.js +5 -0
- package/lib/fieldset/index.js +6 -2
- package/lib/form/Field.d.ts +2 -1
- package/lib/form/Field.js +38 -24
- package/lib/form/FieldArray.d.ts +1 -0
- package/lib/form/FieldArray.js +43 -4
- package/lib/form/FieldNumber.d.ts +1 -0
- package/lib/form/FieldNumber.js +29 -5
- package/lib/form/FieldPeriod.d.ts +1 -0
- package/lib/form/FieldPeriod.js +16 -2
- package/lib/form/helpers.d.ts +2 -1
- package/lib/form/helpers.js +9 -6
- package/lib/form/index.d.ts +4 -2
- package/lib/form/index.js +77 -38
- package/lib/form/types.d.ts +25 -6
- package/lib/form/withFieldHOC.d.ts +1 -0
- package/lib/form/withFieldHOC.js +1 -0
- package/lib/form/withFormSecurity.d.ts +1 -0
- package/lib/form/withFormSecurity.js +2 -1
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +4 -0
- package/lib/icons/index.d.ts +2 -0
- package/lib/icons/types.d.ts +3 -1
- package/lib/index.d.ts +4 -1
- package/lib/inputs/base/InputTextBase.d.ts +1 -0
- package/lib/inputs/base/InputTextBase.js +18 -5
- package/lib/inputs/base/helpers.d.ts +2 -1
- package/lib/inputs/base/types.d.ts +2 -1
- package/lib/inputs/date/Dialog.d.ts +1 -0
- package/lib/inputs/date/Dropdown.d.ts +1 -0
- package/lib/inputs/date/helpers.d.ts +2 -1
- package/lib/inputs/date/helpers.js +3 -2
- package/lib/inputs/date/index.d.ts +1 -0
- package/lib/inputs/date/index.js +24 -9
- package/lib/inputs/date/types.d.ts +3 -1
- package/lib/inputs/file/DefaultFile.d.ts +1 -0
- package/lib/inputs/file/DragDropFile.d.ts +1 -0
- package/lib/inputs/file/File.d.ts +1 -0
- package/lib/inputs/file/FileButtonSettings.d.ts +1 -0
- package/lib/inputs/file/helpers.d.ts +1 -0
- package/lib/inputs/file/index.d.ts +1 -0
- package/lib/inputs/file/types.d.ts +1 -0
- package/lib/inputs/inputHOC.d.ts +3 -0
- package/lib/inputs/mask/BaseMask.d.ts +1 -0
- package/lib/inputs/mask/BaseMask.js +28 -7
- package/lib/inputs/mask/Cnpj.d.ts +1 -0
- package/lib/inputs/mask/Cpf.d.ts +1 -0
- package/lib/inputs/mask/Cpf.js +4 -4
- package/lib/inputs/mask/Phone.d.ts +1 -0
- package/lib/inputs/mask/ZipCode.d.ts +1 -0
- package/lib/inputs/mask/helpers.d.ts +3 -0
- package/lib/inputs/mask/helpers.js +7 -2
- package/lib/inputs/mask/imaskHOC.d.ts +3 -0
- package/lib/inputs/mask/imaskHOC.js +1 -1
- package/lib/inputs/mask/index.d.ts +1 -0
- package/lib/inputs/mask/types.d.ts +2 -1
- package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -1
- package/lib/inputs/multiSelect/ActionButtons.js +4 -1
- package/lib/inputs/multiSelect/Dropdown.d.ts +1 -0
- package/lib/inputs/multiSelect/Dropdown.js +10 -6
- package/lib/inputs/multiSelect/helper.d.ts +8 -6
- package/lib/inputs/multiSelect/helper.js +5 -1
- package/lib/inputs/multiSelect/index.d.ts +1 -0
- package/lib/inputs/multiSelect/index.js +21 -12
- package/lib/inputs/multiSelect/types.d.ts +16 -6
- package/lib/inputs/number/BaseNumber.d.ts +3 -0
- package/lib/inputs/number/BaseNumber.js +8 -2
- package/lib/inputs/number/Currency.d.ts +3 -0
- package/lib/inputs/number/Decimal.d.ts +3 -0
- package/lib/inputs/number/format_number.d.ts +2 -1
- package/lib/inputs/number/format_number.js +7 -2
- package/lib/inputs/number/index.d.ts +3 -0
- package/lib/inputs/number/types.d.ts +3 -1
- package/lib/inputs/period/Dialog.d.ts +1 -0
- package/lib/inputs/period/Dropdown.d.ts +1 -0
- package/lib/inputs/period/PeriodList.d.ts +1 -0
- package/lib/inputs/period/helper.d.ts +1 -0
- package/lib/inputs/period/index.d.ts +1 -0
- package/lib/inputs/period/index.js +14 -10
- package/lib/inputs/period/types.d.ts +3 -2
- package/lib/inputs/search/index.d.ts +3 -0
- package/lib/inputs/search/index.js +7 -2
- package/lib/inputs/select/ActionButtons.d.ts +3 -0
- package/lib/inputs/select/Dropdown.d.ts +3 -0
- package/lib/inputs/select/Dropdown.js +8 -4
- package/lib/inputs/select/helper.d.ts +7 -9
- package/lib/inputs/select/helper.js +11 -2
- package/lib/inputs/select/index.d.ts +1 -0
- package/lib/inputs/select/index.js +6 -5
- package/lib/inputs/select/multiple/Selecteds.d.ts +1 -0
- package/lib/inputs/select/multiple/Selecteds.js +1 -1
- package/lib/inputs/select/multiple/index.d.ts +1 -0
- package/lib/inputs/select/multiple/index.js +13 -10
- package/lib/inputs/select/simple/index.d.ts +1 -0
- package/lib/inputs/select/simple/index.js +35 -18
- package/lib/inputs/select/types.d.ts +22 -7
- package/lib/inputs/text/index.d.ts +1 -0
- package/lib/inputs/text/types.d.ts +1 -1
- package/lib/inputs/textarea/index.d.ts +1 -0
- package/lib/inputs/textarea/types.d.ts +1 -0
- package/lib/inputs/types.d.ts +7 -3
- package/lib/internals/types.d.ts +1 -0
- package/lib/internals/withTooltip.js +13 -6
- package/lib/labelMessages/index.d.ts +2 -0
- package/lib/labelMessages/index.js +3 -4
- package/lib/labelMessages/types.d.ts +3 -1
- package/lib/labels/DangerLabel.d.ts +2 -0
- package/lib/labels/DefaultLabel.d.ts +2 -0
- package/lib/labels/InfoLabel.d.ts +2 -0
- package/lib/labels/PrimaryLabel.d.ts +2 -0
- package/lib/labels/SuccessLabel.d.ts +2 -0
- package/lib/labels/WarningLabel.d.ts +2 -0
- package/lib/labels/index.d.ts +2 -0
- package/lib/labels/types.d.ts +3 -1
- package/lib/list/Header.d.ts +2 -0
- package/lib/list/Item.d.ts +2 -0
- package/lib/list/helpers.d.ts +2 -0
- package/lib/list/index.d.ts +2 -0
- package/lib/list/types.d.ts +4 -2
- package/lib/menus/float/MenuItem.d.ts +2 -0
- package/lib/menus/float/helpers.d.ts +2 -0
- package/lib/menus/float/index.d.ts +2 -0
- package/lib/menus/float/types.d.ts +3 -1
- package/lib/menus/index.d.ts +2 -0
- package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
- package/lib/menus/sidenav/MenuLink.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
- package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
- package/lib/menus/sidenav/helpers.d.ts +2 -0
- package/lib/menus/sidenav/index.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
- package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
- package/lib/menus/sidenav/types.d.ts +4 -2
- package/lib/panel/Content.d.ts +3 -1
- package/lib/panel/DangerPanel.d.ts +3 -1
- package/lib/panel/Default.d.ts +3 -1
- package/lib/panel/Header.d.ts +3 -1
- package/lib/panel/Header.js +3 -4
- package/lib/panel/InfoPanel.d.ts +3 -1
- package/lib/panel/PrimaryPanel.d.ts +3 -1
- package/lib/panel/SuccessPanel.d.ts +3 -1
- package/lib/panel/ToolBar.d.ts +3 -1
- package/lib/panel/WarningPanel.d.ts +3 -1
- package/lib/panel/helpers.d.ts +3 -1
- package/lib/panel/index.d.ts +3 -1
- package/lib/panel/types.d.ts +3 -1
- package/lib/popover/PopoverText.d.ts +2 -0
- package/lib/popover/PopoverTitle.d.ts +2 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +1 -2
- package/lib/popover/types.d.ts +3 -1
- package/lib/progress/index.js +7 -2
- package/lib/radio/index.d.ts +2 -1
- package/lib/radio/index.js +12 -3
- package/lib/radio/types.d.ts +4 -1
- package/lib/skeleton/index.js +7 -2
- package/lib/split/Split.js +21 -17
- package/lib/table/Body.js +9 -12
- package/lib/table/Header.js +19 -16
- package/lib/table/Row.js +27 -6
- package/lib/table/RowColumn.js +7 -3
- package/lib/table/index.js +7 -2
- package/lib/table/types.d.ts +7 -0
- package/lib/tabs/DropdownItems.d.ts +2 -0
- package/lib/tabs/Menu.d.ts +2 -0
- package/lib/tabs/MenuItems.d.ts +2 -0
- package/lib/tabs/Panel.d.ts +2 -0
- package/lib/tabs/index.d.ts +2 -0
- package/lib/tabs/tabHelpers.d.ts +2 -0
- package/lib/tabs/types.d.ts +3 -1
- package/lib/toolbar/ButtonBar.d.ts +2 -0
- package/lib/toolbar/ButtonBar.js +6 -2
- package/lib/toolbar/LabelBar.d.ts +2 -0
- package/lib/toolbar/LabelBar.js +7 -3
- package/lib/toolbar/ToolBarGroup.d.ts +2 -0
- package/lib/toolbar/helpers.d.ts +2 -0
- package/lib/toolbar/index.d.ts +2 -0
- package/lib/toolbar/index.js +7 -2
- package/lib/toolbar/types.d.ts +4 -2
- package/lib/tooltip/index.d.ts +1 -1
- package/lib/tooltip/index.js +5 -1
- package/lib/tooltip/types.d.ts +1 -0
- package/lib/treetable/Row.js +10 -5
- package/lib/treetable/index.js +7 -1
- package/lib/treeview/Node.js +7 -3
- package/lib/treeview/index.js +7 -2
- package/lib/treeview_old/Node.js +8 -12
- package/lib/{types-90c43ae1.d.ts → types-c1e2d0c9.d.ts} +2 -1
- package/lib/uitour/index.js +9 -5
- package/package.json +67 -64
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
3
|
Object.defineProperty(exports, "__esModule", {
|
|
5
4
|
value: true
|
|
6
5
|
});
|
|
@@ -16,7 +15,13 @@ var _hint = _interopRequireDefault(require("../../hint"));
|
|
|
16
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
17
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
19
19
|
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); }
|
|
20
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
22
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
20
25
|
var InputTextBase = function InputTextBase(props) {
|
|
21
26
|
var _props$textAlign = props.textAlign,
|
|
22
27
|
textAlign = _props$textAlign === void 0 ? 'left' : _props$textAlign,
|
|
@@ -75,6 +80,9 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
75
80
|
(0, _react.useEffect)(function () {
|
|
76
81
|
if (handlerSetOnDenied) handlerSetOnDenied(onDenied);
|
|
77
82
|
}, []);
|
|
83
|
+
var applyTabIndex = function applyTabIndex() {
|
|
84
|
+
return readOnly ? -1 : 0;
|
|
85
|
+
};
|
|
78
86
|
var shouldDisable = function shouldDisable() {
|
|
79
87
|
return disabled || onDenied.disabled;
|
|
80
88
|
};
|
|
@@ -112,7 +120,7 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
112
120
|
}
|
|
113
121
|
};
|
|
114
122
|
if (!disableCallbacks) {
|
|
115
|
-
propsInput =
|
|
123
|
+
propsInput = _objectSpread(_objectSpread({}, propsInput), {}, {
|
|
116
124
|
onFocus: function onFocus(e) {
|
|
117
125
|
var _props$onInputReceive;
|
|
118
126
|
(_props$onInputReceive = props.onInputReceiveFocus) === null || _props$onInputReceive === void 0 ? void 0 : _props$onInputReceive.call(props);
|
|
@@ -151,7 +159,10 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
151
159
|
className: "input-base-component ".concat(skeletonize ? '-skeletonized' : '', " ").concat(customClass),
|
|
152
160
|
ref: inputBaseRef
|
|
153
161
|
}, label && /*#__PURE__*/_react.default.createElement("div", {
|
|
154
|
-
className: "labelcontainer"
|
|
162
|
+
className: "labelcontainer",
|
|
163
|
+
style: {
|
|
164
|
+
textAlign: textAlign === 'center' ? 'left' : textAlign
|
|
165
|
+
}
|
|
155
166
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
156
167
|
style: styleForLabel,
|
|
157
168
|
className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase')
|
|
@@ -160,7 +171,7 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
160
171
|
}, "*"))), /*#__PURE__*/_react.default.createElement("div", {
|
|
161
172
|
"data-testid": "testInputWrapper",
|
|
162
173
|
style: styleForWrapper,
|
|
163
|
-
className: helpers.getInputWrapperClass(
|
|
174
|
+
className: helpers.getInputWrapperClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
164
175
|
disabled: shouldDisable() || hideContent
|
|
165
176
|
}))
|
|
166
177
|
}, leftElements && /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -173,7 +184,9 @@ var InputTextBase = function InputTextBase(props) {
|
|
|
173
184
|
}, type === 'textarea' ? /*#__PURE__*/_react.default.createElement("textarea", _extends({
|
|
174
185
|
rows: props.rows,
|
|
175
186
|
cols: props.cols
|
|
176
|
-
}, inputProps())) : /*#__PURE__*/_react.default.createElement("input",
|
|
187
|
+
}, inputProps())) : /*#__PURE__*/_react.default.createElement("input", _extends({
|
|
188
|
+
tabIndex: applyTabIndex()
|
|
189
|
+
}, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
177
190
|
visible: !!hint,
|
|
178
191
|
customClass: "hint",
|
|
179
192
|
description: hint
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { IBaseProps } from './types.js';
|
|
2
|
+
import { TextAlign } from '../../@types/Align.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import '../../@types/Period.js';
|
|
4
5
|
import '../../@types/PermissionAttr.js';
|
|
5
6
|
|
|
6
7
|
declare const getInputClass: ({ textAlign, readOnly, readOnlyClass }: {
|
|
7
|
-
textAlign?:
|
|
8
|
+
textAlign?: TextAlign | undefined;
|
|
8
9
|
readOnly?: boolean | undefined;
|
|
9
10
|
readOnlyClass?: string | undefined;
|
|
10
11
|
}) => string;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent, DragEvent, MutableRefObject, RefObject, CSSProperties } from 'react';
|
|
2
|
+
import { TextAlign } from '../../@types/Align.js';
|
|
2
3
|
import { Period } from '../../@types/Period.js';
|
|
3
4
|
import { PermissionAttr, OnDenied } from '../../@types/PermissionAttr.js';
|
|
4
5
|
|
|
@@ -57,7 +58,7 @@ interface IBaseProps {
|
|
|
57
58
|
inputRef?: MutableRefObject<HTMLInputElement | HTMLTextAreaElement | null> | ((ref: HTMLInputElement | HTMLTextAreaElement | null) => void);
|
|
58
59
|
inputBaseRef?: RefObject<HTMLDivElement> | ((ref: HTMLDivElement) => void);
|
|
59
60
|
hint?: string;
|
|
60
|
-
textAlign?:
|
|
61
|
+
textAlign?: TextAlign;
|
|
61
62
|
rounded?: boolean;
|
|
62
63
|
errorMessages?: string[] | undefined;
|
|
63
64
|
visible?: boolean;
|
|
@@ -3,6 +3,7 @@ import 'react';
|
|
|
3
3
|
import '../../@types/ColorStyles.js';
|
|
4
4
|
import '../../@types/PermissionAttr.js';
|
|
5
5
|
import '../base/types.js';
|
|
6
|
+
import '../../@types/Align.js';
|
|
6
7
|
import '../../@types/Period.js';
|
|
7
8
|
|
|
8
9
|
declare const Dialog: ({ handlerClose, children, dialogSize }: IDateDialogProps) => JSX.Element;
|
|
@@ -3,6 +3,7 @@ import { IDateDropdownProps } from './types.js';
|
|
|
3
3
|
import '../../@types/ColorStyles.js';
|
|
4
4
|
import '../../@types/PermissionAttr.js';
|
|
5
5
|
import '../base/types.js';
|
|
6
|
+
import '../../@types/Align.js';
|
|
6
7
|
import '../../@types/Period.js';
|
|
7
8
|
|
|
8
9
|
declare const Dropdown: (props: IDateDropdownProps) => React.ReactPortal;
|
|
@@ -4,11 +4,12 @@ import 'react';
|
|
|
4
4
|
import '../../@types/ColorStyles.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
|
+
import '../../@types/Align.js';
|
|
7
8
|
import '../../@types/Period.js';
|
|
8
9
|
|
|
9
10
|
declare const PT_BR_FORMAT = "DD/MM/YYYY";
|
|
10
11
|
declare const EN_US_FORMAT = "YYYY-MM-DD";
|
|
11
|
-
declare const getCalendarDropdownStyle: ({ topPosition, leftPosition, width }: IDateDropdownProps) => string;
|
|
12
|
+
declare const getCalendarDropdownStyle: ({ topPosition, leftPosition, width, minWidth, }: IDateDropdownProps) => string;
|
|
12
13
|
declare const getMomentValue: (value: string) => moment.Moment;
|
|
13
14
|
|
|
14
15
|
export { EN_US_FORMAT, PT_BR_FORMAT, getCalendarDropdownStyle, getMomentValue };
|
|
@@ -13,8 +13,9 @@ exports.EN_US_FORMAT = EN_US_FORMAT;
|
|
|
13
13
|
var getCalendarDropdownStyle = function getCalendarDropdownStyle(_ref) {
|
|
14
14
|
var topPosition = _ref.topPosition,
|
|
15
15
|
leftPosition = _ref.leftPosition,
|
|
16
|
-
width = _ref.width
|
|
17
|
-
|
|
16
|
+
width = _ref.width,
|
|
17
|
+
minWidth = _ref.minWidth;
|
|
18
|
+
return "top: ".concat(topPosition, "px;\n left: ").concat(leftPosition, "px;\n width: ").concat(width, "px;\n min-width: ").concat(minWidth, "px;");
|
|
18
19
|
};
|
|
19
20
|
exports.getCalendarDropdownStyle = getCalendarDropdownStyle;
|
|
20
21
|
var getMomentValue = function getMomentValue(value) {
|
|
@@ -3,6 +3,7 @@ import 'react';
|
|
|
3
3
|
import '../../@types/ColorStyles.js';
|
|
4
4
|
import '../../@types/PermissionAttr.js';
|
|
5
5
|
import '../base/types.js';
|
|
6
|
+
import '../../@types/Align.js';
|
|
6
7
|
import '../../@types/Period.js';
|
|
7
8
|
|
|
8
9
|
declare const DatePicker: (props: IDatePickerProps) => JSX.Element | null;
|
package/lib/inputs/date/index.js
CHANGED
|
@@ -27,7 +27,9 @@ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len
|
|
|
27
27
|
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
28
28
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
29
29
|
var CALENDAR_BUTTON_WIDTH = 24;
|
|
30
|
+
var CALENDAR_MIN_WIDTH = 250;
|
|
30
31
|
var DatePicker = function DatePicker(props) {
|
|
32
|
+
var _window;
|
|
31
33
|
var _props$showButtonOpen = props.showButtonOpen,
|
|
32
34
|
showButtonOpen = _props$showButtonOpen === void 0 ? true : _props$showButtonOpen,
|
|
33
35
|
_props$openOnFocus = props.openOnFocus,
|
|
@@ -65,22 +67,26 @@ var DatePicker = function DatePicker(props) {
|
|
|
65
67
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
66
68
|
inputDimensions = _useState8[0],
|
|
67
69
|
setInputDimensions = _useState8[1];
|
|
68
|
-
var _useState9 = (0, _react.useState)(
|
|
70
|
+
var _useState9 = (0, _react.useState)(),
|
|
71
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
72
|
+
formatedLeftPosition = _useState10[0],
|
|
73
|
+
setFormatedLeftPosition = _useState10[1];
|
|
74
|
+
var _useState11 = (0, _react.useState)({
|
|
69
75
|
disabled: false,
|
|
70
76
|
readOnly: false,
|
|
71
77
|
unvisible: false,
|
|
72
78
|
hideContent: false
|
|
73
79
|
}),
|
|
74
|
-
|
|
75
|
-
onDenied =
|
|
76
|
-
setOnDenied =
|
|
80
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
81
|
+
onDenied = _useState12[0],
|
|
82
|
+
setOnDenied = _useState12[1];
|
|
77
83
|
var _inputRef = (0, _react.useRef)();
|
|
78
84
|
var buttonOpenRef = (0, _react.useRef)();
|
|
79
85
|
var dropdownContainer = (0, _react.useRef)();
|
|
80
|
-
var
|
|
81
|
-
|
|
82
|
-
insideDropdown =
|
|
83
|
-
setInsideDropdown =
|
|
86
|
+
var _useState13 = (0, _react.useState)(false),
|
|
87
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
88
|
+
insideDropdown = _useState14[0],
|
|
89
|
+
setInsideDropdown = _useState14[1];
|
|
84
90
|
var onScreenResize = function onScreenResize() {
|
|
85
91
|
var _inputRef$current;
|
|
86
92
|
setInputDimensions(_inputRef === null || _inputRef === void 0 ? void 0 : (_inputRef$current = _inputRef.current) === null || _inputRef$current === void 0 ? void 0 : _inputRef$current.getBoundingClientRect());
|
|
@@ -203,13 +209,22 @@ var DatePicker = function DatePicker(props) {
|
|
|
203
209
|
}
|
|
204
210
|
return /*#__PURE__*/_react.default.createElement(_Dropdown.default, {
|
|
205
211
|
topPosition: inputDimensions ? inputDimensions.top + inputDimensions.height + 5 : '',
|
|
206
|
-
leftPosition: inputDimensions ?
|
|
212
|
+
leftPosition: inputDimensions ? formatedLeftPosition : '',
|
|
213
|
+
minWidth: CALENDAR_MIN_WIDTH,
|
|
207
214
|
width: inputDimensions ? inputDimensions.width + (showButtonOpen ? CALENDAR_BUTTON_WIDTH : 0) : '',
|
|
208
215
|
dropdownRef: function dropdownRef(el) {
|
|
209
216
|
dropdownContainer.current = el;
|
|
210
217
|
}
|
|
211
218
|
}, getCalendar(valueState, props === null || props === void 0 ? void 0 : props.calendarColorStyle));
|
|
212
219
|
};
|
|
220
|
+
(0, _react.useEffect)(function () {
|
|
221
|
+
var screenWidth = window.innerWidth;
|
|
222
|
+
if (inputDimensions && screenWidth < inputDimensions.left + CALENDAR_MIN_WIDTH) {
|
|
223
|
+
setFormatedLeftPosition(inputDimensions.left - (CALENDAR_MIN_WIDTH - inputDimensions.width - CALENDAR_BUTTON_WIDTH));
|
|
224
|
+
} else {
|
|
225
|
+
setFormatedLeftPosition(inputDimensions === null || inputDimensions === void 0 ? void 0 : inputDimensions.left);
|
|
226
|
+
}
|
|
227
|
+
}, [(_window = window) === null || _window === void 0 ? void 0 : _window.innerWidth, inputDimensions]);
|
|
213
228
|
if (onDenied && onDenied.unvisible) return null;
|
|
214
229
|
(0, _react.useEffect)(function () {
|
|
215
230
|
window.addEventListener('resize', onScreenResize);
|
|
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
import { ColorStyles } from '../../@types/ColorStyles.js';
|
|
3
3
|
import { PermissionAttr } from '../../@types/PermissionAttr.js';
|
|
4
4
|
import { CustomInputEvent } from '../base/types.js';
|
|
5
|
+
import '../../@types/Align.js';
|
|
5
6
|
import '../../@types/Period.js';
|
|
6
7
|
|
|
7
8
|
interface IDatePickerProps {
|
|
@@ -38,8 +39,9 @@ interface IDateDropdownProps {
|
|
|
38
39
|
children: ReactNode | ReactNode[];
|
|
39
40
|
dropdownRef: (el: HTMLDivElement) => void;
|
|
40
41
|
topPosition: number | string;
|
|
41
|
-
leftPosition
|
|
42
|
+
leftPosition?: number | string;
|
|
42
43
|
width: number | string;
|
|
44
|
+
minWidth: number | string;
|
|
43
45
|
}
|
|
44
46
|
interface IDateDialogProps {
|
|
45
47
|
children: ReactNode | ReactNode[];
|
package/lib/inputs/inputHOC.d.ts
CHANGED
|
@@ -3,9 +3,12 @@ import { IInputHOCProps } from './types.js';
|
|
|
3
3
|
import '../@types/PermissionAttr.js';
|
|
4
4
|
import '../@types/DataCombo.js';
|
|
5
5
|
import './base/types.js';
|
|
6
|
+
import '../@types/Align.js';
|
|
6
7
|
import '../@types/Period.js';
|
|
7
8
|
import '../drawer/types.js';
|
|
8
9
|
import '../@types/Position.js';
|
|
10
|
+
import '../@types/Icon.js';
|
|
11
|
+
import '../icons/helper.js';
|
|
9
12
|
|
|
10
13
|
declare const InputHOC: <ComponentProps extends IInputHOCProps>(WrappedComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
|
11
14
|
|
|
@@ -10,9 +10,15 @@ var _InputTextBase = _interopRequireDefault(require("../base/InputTextBase"));
|
|
|
10
10
|
var _format_number = require("../number/format_number");
|
|
11
11
|
var _excluded = ["inputRef"];
|
|
12
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
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); }
|
|
13
15
|
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; }
|
|
14
16
|
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; }
|
|
15
|
-
function
|
|
17
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
18
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
19
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
20
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
21
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
16
22
|
var returnEventFormattedValue = function returnEventFormattedValue(props, event) {
|
|
17
23
|
if (props.returnFormattedValueOnBlur || props.returnFormattedValueOnKeyDown) {
|
|
18
24
|
// Retornando um objeto com a mesma estrutura do Proxy original
|
|
@@ -21,7 +27,7 @@ var returnEventFormattedValue = function returnEventFormattedValue(props, event)
|
|
|
21
27
|
// mantido o path até a propriedade value e name.
|
|
22
28
|
var name = event.target.name;
|
|
23
29
|
var value = props.defaultValue || '';
|
|
24
|
-
return
|
|
30
|
+
return _objectSpread(_objectSpread({}, event), {}, {
|
|
25
31
|
target: {
|
|
26
32
|
value: (0, _format_number.numberToEnUS)(value),
|
|
27
33
|
name: name
|
|
@@ -35,21 +41,36 @@ var getEventProps = function getEventProps(props) {
|
|
|
35
41
|
return {
|
|
36
42
|
onBlur: function onBlur(e) {
|
|
37
43
|
if (props.onBlur) {
|
|
38
|
-
var
|
|
44
|
+
var value = e.target.value;
|
|
45
|
+
var formatedValue = (0, _format_number.formatOnlyNumbers)(value);
|
|
46
|
+
var eventWithFormatedValue = _objectSpread(_objectSpread({}, e), {}, {
|
|
47
|
+
target: {
|
|
48
|
+
value: formatedValue
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
var formattedEvent = returnEventFormattedValue(props, eventWithFormatedValue);
|
|
39
52
|
props.onBlur(formattedEvent);
|
|
40
53
|
}
|
|
41
54
|
},
|
|
42
55
|
onKeyDown: function onKeyDown(e) {
|
|
43
56
|
if (props.onKeyDown) {
|
|
44
|
-
var
|
|
57
|
+
var _ref = e.target,
|
|
58
|
+
value = _ref.value;
|
|
59
|
+
var formatedValue = (0, _format_number.formatOnlyNumbers)(value);
|
|
60
|
+
var eventWithFormatedValue = _objectSpread(_objectSpread({}, e), {}, {
|
|
61
|
+
target: {
|
|
62
|
+
value: formatedValue
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
var formattedEvent = returnEventFormattedValue(props, eventWithFormatedValue);
|
|
45
66
|
props.onKeyDown(formattedEvent);
|
|
46
67
|
}
|
|
47
68
|
}
|
|
48
69
|
};
|
|
49
70
|
};
|
|
50
|
-
var BaseMask = function BaseMask(
|
|
51
|
-
var inputRef =
|
|
52
|
-
props = _objectWithoutProperties(
|
|
71
|
+
var BaseMask = function BaseMask(_ref2) {
|
|
72
|
+
var inputRef = _ref2.inputRef,
|
|
73
|
+
props = _objectWithoutProperties(_ref2, _excluded);
|
|
53
74
|
return /*#__PURE__*/_react.default.createElement(_InputTextBase.default, _extends({}, props, {
|
|
54
75
|
inputRef: inputRef
|
|
55
76
|
}, getEventProps(props)));
|
package/lib/inputs/mask/Cpf.d.ts
CHANGED
package/lib/inputs/mask/Cpf.js
CHANGED
|
@@ -45,11 +45,11 @@ var CpfField = function CpfField(props) {
|
|
|
45
45
|
return debouncedOnChange.cancel;
|
|
46
46
|
}, []);
|
|
47
47
|
var onChange = function onChange(e) {
|
|
48
|
+
// console.log('onChange >>>', props.onChange);
|
|
48
49
|
if (enableValidation && e) {
|
|
49
50
|
debouncedOnChange(e.target.value);
|
|
50
51
|
if (props.onChange) props.onChange(e);
|
|
51
|
-
}
|
|
52
|
-
if (props.onChange) {
|
|
52
|
+
} else if (props.onChange) {
|
|
53
53
|
props.onChange(e);
|
|
54
54
|
}
|
|
55
55
|
};
|
|
@@ -61,10 +61,10 @@ var CpfField = function CpfField(props) {
|
|
|
61
61
|
}
|
|
62
62
|
return {};
|
|
63
63
|
};
|
|
64
|
-
return /*#__PURE__*/_react.default.createElement(_BaseMask.default, _extends({
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_BaseMask.default, _extends({}, props, {
|
|
65
65
|
onChange: onChange,
|
|
66
66
|
mask: "000.000.000-00"
|
|
67
|
-
},
|
|
67
|
+
}, getErrorMessagesProp()));
|
|
68
68
|
};
|
|
69
69
|
|
|
70
70
|
// Em caso de alteração na propriedade displayName deverá ser atualizada a lógica na função
|
|
@@ -4,9 +4,12 @@ import 'react';
|
|
|
4
4
|
import '../../@types/PermissionAttr.js';
|
|
5
5
|
import '../../@types/DataCombo.js';
|
|
6
6
|
import '../base/types.js';
|
|
7
|
+
import '../../@types/Align.js';
|
|
7
8
|
import '../../@types/Period.js';
|
|
8
9
|
import '../../drawer/types.js';
|
|
9
10
|
import '../../@types/Position.js';
|
|
11
|
+
import '../../@types/Icon.js';
|
|
12
|
+
import '../../icons/helper.js';
|
|
10
13
|
|
|
11
14
|
declare function extractNonMaskProps(props: IMaskHOCProps, maskProps: AnyMaskedOptions): any;
|
|
12
15
|
declare function CPFValidation(cpf?: string, returnMessage?: (msg: string) => void): void | "CPF inválido";
|
|
@@ -7,10 +7,15 @@ exports.CNPJValidation = CNPJValidation;
|
|
|
7
7
|
exports.CPFValidation = CPFValidation;
|
|
8
8
|
exports.extractNonMaskProps = extractNonMaskProps;
|
|
9
9
|
var _lodash = require("lodash");
|
|
10
|
-
function
|
|
10
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
12
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
11
16
|
/* eslint-disable no-plusplus */
|
|
12
17
|
function extractNonMaskProps(props, maskProps) {
|
|
13
|
-
var nonMask =
|
|
18
|
+
var nonMask = _objectSpread({}, props);
|
|
14
19
|
Object.keys(maskProps).forEach(function (maskProp) {
|
|
15
20
|
delete nonMask[maskProp];
|
|
16
21
|
});
|
|
@@ -3,9 +3,12 @@ import { IMaskHOCProps } from '../types.js';
|
|
|
3
3
|
import '../../@types/PermissionAttr.js';
|
|
4
4
|
import '../../@types/DataCombo.js';
|
|
5
5
|
import '../base/types.js';
|
|
6
|
+
import '../../@types/Align.js';
|
|
6
7
|
import '../../@types/Period.js';
|
|
7
8
|
import '../../drawer/types.js';
|
|
8
9
|
import '../../@types/Position.js';
|
|
10
|
+
import '../../@types/Icon.js';
|
|
11
|
+
import '../../icons/helper.js';
|
|
9
12
|
|
|
10
13
|
declare const IMaskHOC: <ComponentProps extends IMaskHOCProps>(ComposedComponent: React__default.ComponentType<ComponentProps>) => {
|
|
11
14
|
(props: ComponentProps): JSX.Element;
|
|
@@ -63,7 +63,7 @@ var IMaskHOC = function IMaskHOC(ComposedComponent) {
|
|
|
63
63
|
_props$isDateField = props.isDateField,
|
|
64
64
|
isDateField = _props$isDateField === void 0 ? false : _props$isDateField;
|
|
65
65
|
var maskOptions = {
|
|
66
|
-
placeholderChar: placeholderChar,
|
|
66
|
+
placeholderChar: placeholderChar === '' ? ' ' : placeholderChar,
|
|
67
67
|
lazy: lazy,
|
|
68
68
|
pattern: pattern,
|
|
69
69
|
radix: radix,
|
|
@@ -5,6 +5,7 @@ export { default as PhoneField } from './Phone.js';
|
|
|
5
5
|
export { default as ZipCodeField } from './ZipCode.js';
|
|
6
6
|
import './types.js';
|
|
7
7
|
import 'react';
|
|
8
|
+
import '../../@types/Align.js';
|
|
8
9
|
import '../../@types/PermissionAttr.js';
|
|
9
10
|
import '../base/types.js';
|
|
10
11
|
import '../../@types/Period.js';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { KeyboardEvent, MutableRefObject } from 'react';
|
|
2
|
+
import { TextAlign } from '../../@types/Align.js';
|
|
2
3
|
import { OnDenied, PermissionAttr } from '../../@types/PermissionAttr.js';
|
|
3
4
|
import { CustomInputEvent } from '../base/types.js';
|
|
4
5
|
import '../../@types/Period.js';
|
|
@@ -26,7 +27,7 @@ interface IBaseMaskProps {
|
|
|
26
27
|
permissionAttr?: PermissionAttr;
|
|
27
28
|
errorMessages?: string[];
|
|
28
29
|
rounded?: boolean;
|
|
29
|
-
textAlign?:
|
|
30
|
+
textAlign?: TextAlign;
|
|
30
31
|
customClassForInputContent?: string;
|
|
31
32
|
label?: string;
|
|
32
33
|
name?: string;
|
|
@@ -2,9 +2,10 @@ import { IActionButtonsProps } from './types.js';
|
|
|
2
2
|
import 'react';
|
|
3
3
|
import '../../@types/DataCombo.js';
|
|
4
4
|
import '../base/types.js';
|
|
5
|
+
import '../../@types/Align.js';
|
|
5
6
|
import '../../@types/Period.js';
|
|
6
7
|
import '../../@types/PermissionAttr.js';
|
|
7
8
|
|
|
8
|
-
declare const ActionButtons: ({ disabled, dropdownOpened, handleOpenClose, handleCheckAll, handleUncheckAll, }: IActionButtonsProps) => JSX.Element;
|
|
9
|
+
declare const ActionButtons: ({ disabled, dropdownOpened, handleOpenClose, handleCheckAll, handleUncheckAll, dropdownAlignButton, }: IActionButtonsProps) => JSX.Element;
|
|
9
10
|
|
|
10
11
|
export { ActionButtons as default };
|
|
@@ -16,7 +16,9 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
16
16
|
dropdownOpened = _ref.dropdownOpened,
|
|
17
17
|
handleOpenClose = _ref.handleOpenClose,
|
|
18
18
|
handleCheckAll = _ref.handleCheckAll,
|
|
19
|
-
handleUncheckAll = _ref.handleUncheckAll
|
|
19
|
+
handleUncheckAll = _ref.handleUncheckAll,
|
|
20
|
+
_ref$dropdownAlignBut = _ref.dropdownAlignButton,
|
|
21
|
+
dropdownAlignButton = _ref$dropdownAlignBut === void 0 ? 'left' : _ref$dropdownAlignBut;
|
|
20
22
|
return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_buttons.default, {
|
|
21
23
|
disabled: disabled,
|
|
22
24
|
size: "small",
|
|
@@ -32,6 +34,7 @@ var ActionButtons = function ActionButtons(_ref) {
|
|
|
32
34
|
boxShadow: false,
|
|
33
35
|
customClass: "actionbutton",
|
|
34
36
|
dropdown: true,
|
|
37
|
+
dropdownAlign: dropdownAlignButton,
|
|
35
38
|
showIconDropdown: false
|
|
36
39
|
}, /*#__PURE__*/_react.default.createElement(_list.default, null, /*#__PURE__*/_react.default.createElement(_list.ListItem, {
|
|
37
40
|
itemId: "1",
|