flipper-ui 0.30.4 → 0.30.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.
|
@@ -62,9 +62,8 @@ var renderEditMode = function renderEditMode(column, row, updateRow, errors) {
|
|
|
62
62
|
return /*#__PURE__*/_react["default"].createElement(_maskField["default"], {
|
|
63
63
|
fixedDecimalScale: true,
|
|
64
64
|
type: "text",
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
} : undefined,
|
|
65
|
+
fullWidth: true,
|
|
66
|
+
error: hasError,
|
|
68
67
|
thousandSeparator: ".",
|
|
69
68
|
decimalSeparator: ",",
|
|
70
69
|
decimalScale: decimalScale,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { TableRowProps as MuiTableRowProps } from '@material-ui/core/TableRow';
|
|
2
2
|
import React, { MouseEvent } from 'react';
|
|
3
3
|
import { DefaultProps } from '../../types';
|
|
4
|
-
interface TableRowProps extends DefaultProps {
|
|
4
|
+
export interface TableRowProps extends DefaultProps {
|
|
5
5
|
selected?: boolean;
|
|
6
6
|
hover?: boolean;
|
|
7
7
|
background?: string;
|
|
@@ -1,53 +1,15 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
export interface MaskFieldProps extends
|
|
5
|
-
error?: boolean;
|
|
6
|
-
showEdit?: boolean;
|
|
7
|
-
hasClear?: boolean;
|
|
8
|
-
autoFocus?: boolean;
|
|
9
|
-
multiline?: boolean;
|
|
10
|
-
select?: boolean;
|
|
11
|
-
fullWidth?: boolean;
|
|
12
|
-
required?: boolean;
|
|
13
|
-
disabled?: boolean;
|
|
14
|
-
fixedDecimalScale?: boolean;
|
|
15
|
-
thousandSeparator?: boolean | string;
|
|
16
|
-
margin?: string;
|
|
17
|
-
id?: string;
|
|
18
|
-
name?: string;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { TextFieldProps } from '@/core/inputs/text-field';
|
|
3
|
+
import { NumberFormatProps } from 'react-number-format';
|
|
4
|
+
export interface MaskFieldProps extends NumberFormatProps {
|
|
19
5
|
mask?: string;
|
|
20
|
-
|
|
21
|
-
label?: string;
|
|
22
|
-
autoComplete?: string;
|
|
6
|
+
type?: 'text' | 'tel' | 'password';
|
|
23
7
|
decimalSeparator?: string;
|
|
24
|
-
format?: string
|
|
25
|
-
defaultValue?: string | number;
|
|
26
|
-
value?: string | number;
|
|
27
|
-
rows?: string | number;
|
|
28
|
-
rowsMax?: string | number;
|
|
8
|
+
format?: string;
|
|
29
9
|
decimalScale?: number;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
InputLabelProps?: object;
|
|
34
|
-
options?: IOption[] | string;
|
|
35
|
-
children?: React.ReactNode;
|
|
36
|
-
helperText?: React.ReactNode;
|
|
37
|
-
helperIcon?: React.ReactNode;
|
|
38
|
-
style?: React.CSSProperties;
|
|
39
|
-
inputRef?: React.Ref<HTMLInputElement>;
|
|
40
|
-
type?: 'text' | 'tel' | 'password';
|
|
41
|
-
variant?: 'standard' | 'outlined' | 'filled';
|
|
42
|
-
color?: 'primary' | 'secondary' | undefined;
|
|
43
|
-
customInput?: React.ComponentType;
|
|
44
|
-
onClear?: () => void;
|
|
45
|
-
onBlur?: () => void;
|
|
46
|
-
onHelperClick?: () => void;
|
|
47
|
-
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
48
|
-
onKeyUp?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
49
|
-
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
50
|
-
onPaste?: (event: React.ClipboardEvent<HTMLInputElement>) => void;
|
|
10
|
+
thousandSeparator?: boolean | string;
|
|
11
|
+
fixedDecimalScale?: boolean;
|
|
12
|
+
customInput?: React.ComponentType<TextFieldProps>;
|
|
51
13
|
}
|
|
52
|
-
declare const MaskField: React.
|
|
14
|
+
export declare const MaskField: (props: MaskFieldProps) => React.JSX.Element;
|
|
53
15
|
export default MaskField;
|
|
@@ -4,24 +4,24 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
|
-
exports["default"] = void 0;
|
|
8
|
-
var
|
|
7
|
+
exports["default"] = exports.MaskField = void 0;
|
|
8
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
9
9
|
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
10
10
|
var _react = _interopRequireDefault(require("react"));
|
|
11
11
|
var _textField = _interopRequireDefault(require("../text-field"));
|
|
12
|
-
var _reactNumberFormat = require("react-number-format");
|
|
13
|
-
var _excluded = ["customInput"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
format
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
12
|
+
var _reactNumberFormat = _interopRequireDefault(require("react-number-format"));
|
|
13
|
+
var _excluded = ["customInput"];
|
|
14
|
+
var MaskField = exports.MaskField = function MaskField(props) {
|
|
15
|
+
var customInput = props.customInput,
|
|
16
|
+
otherProps = (0, _objectWithoutProperties2["default"])(props, _excluded);
|
|
17
|
+
return (
|
|
18
|
+
/*#__PURE__*/
|
|
19
|
+
// Although react-number-format allow use of additional props,
|
|
20
|
+
// shows problem with some props like have been do this
|
|
21
|
+
// actually on flipper-ui. (e.g. errors treatment)
|
|
22
|
+
_react["default"].createElement(_reactNumberFormat["default"], (0, _extends2["default"])({}, otherProps, {
|
|
23
|
+
customInput: customInput || _textField["default"]
|
|
24
|
+
}))
|
|
25
|
+
);
|
|
26
26
|
};
|
|
27
27
|
var _default = exports["default"] = MaskField;
|
|
@@ -10,7 +10,7 @@ export interface RadioGroupProps extends DefaultProps {
|
|
|
10
10
|
options?: IOption[];
|
|
11
11
|
onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
|
|
12
12
|
}
|
|
13
|
-
interface IOption {
|
|
13
|
+
export interface IOption {
|
|
14
14
|
value: string;
|
|
15
15
|
label?: ReactNode;
|
|
16
16
|
disabled?: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "flipper-ui",
|
|
3
|
-
"version": "0.30.
|
|
3
|
+
"version": "0.30.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"homepage": "https://flipper-ui.ngi.com.br/",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"nginformatica-styleguide": "1.0.2",
|
|
43
43
|
"ramda": "0.25.0",
|
|
44
44
|
"react-loading-skeleton": "3.3.1",
|
|
45
|
-
"react-number-format": "
|
|
45
|
+
"react-number-format": "4.4.1",
|
|
46
46
|
"sprintf-js": "1.1.3",
|
|
47
47
|
"styled-component": "2.8.0",
|
|
48
48
|
"uuid": "9.0.1"
|