linear-react-components-ui 1.1.2-beta.8 → 1.1.3-beta.0
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/.eslintcache +1 -0
- package/.gitlab-ci.yml +1 -0
- package/.vscode/settings.json +10 -1
- package/lib/@types/SizePixels.d.ts +1 -1
- package/lib/assets/styles/button.scss +11 -9
- package/lib/assets/styles/checkbox.scss +37 -38
- package/lib/assets/styles/colors.scss +2 -0
- package/lib/assets/styles/commons.scss +1 -0
- package/lib/assets/styles/error.scss +9 -0
- package/lib/assets/styles/fieldset.scss +3 -0
- package/lib/assets/styles/gridlayout.scss +0 -2
- package/lib/assets/styles/hint.scss +21 -0
- package/lib/assets/styles/input.scss +7 -7
- package/lib/assets/styles/table.scss +2 -1
- package/lib/buttons/DefaultButton.js +29 -12
- package/lib/buttons/types.d.ts +1 -0
- package/lib/checkbox/Label.js +13 -4
- package/lib/checkbox/index.js +15 -11
- package/lib/dialog/Custom.js +4 -2
- package/lib/dialog/base/index.js +3 -2
- package/lib/dialog/form/index.js +3 -3
- package/lib/drawer/Drawer.js +1 -1
- package/lib/fieldset/index.js +4 -2
- package/lib/fieldset/types.d.ts +2 -0
- package/lib/form/Field.d.ts +2 -0
- package/lib/form/FieldArray.d.ts +2 -0
- package/lib/form/FieldArray.js +12 -26
- package/lib/form/FieldNumber.d.ts +2 -0
- package/lib/form/FieldPeriod.d.ts +2 -0
- package/lib/form/helpers.d.ts +2 -0
- package/lib/form/index.d.ts +2 -0
- package/lib/form/index.js +6 -7
- package/lib/form/types.d.ts +5 -2
- package/lib/form/withFieldHOC.d.ts +2 -0
- package/lib/form/withFormSecurity.d.ts +2 -0
- package/lib/gridlayout/GridRow.js +10 -2
- package/lib/gridlayout/types.d.ts +1 -1
- package/lib/hint/helpers.d.ts +3 -0
- package/lib/hint/helpers.js +21 -0
- package/lib/hint/index.d.ts +2 -1
- package/lib/hint/index.js +9 -15
- package/lib/hint/types.d.ts +3 -0
- package/lib/icons/helper.d.ts +4 -0
- package/lib/icons/helper.js +4 -0
- package/lib/inputs/base/InputTextBase.d.ts +2 -0
- package/lib/inputs/base/InputTextBase.js +51 -7
- package/lib/inputs/base/Label.d.ts +14 -0
- package/lib/inputs/base/Label.js +35 -0
- package/lib/inputs/base/helpers.d.ts +3 -2
- package/lib/inputs/base/helpers.js +1 -8
- package/lib/inputs/base/types.d.ts +14 -2
- package/lib/inputs/date/Dialog.d.ts +2 -0
- package/lib/inputs/date/Dropdown.d.ts +2 -0
- package/lib/inputs/date/helpers.d.ts +2 -0
- package/lib/inputs/date/index.d.ts +2 -0
- package/lib/inputs/date/index.js +2 -0
- package/lib/inputs/date/types.d.ts +3 -0
- package/lib/inputs/errorMessage/index.d.ts +17 -0
- package/lib/inputs/errorMessage/index.js +26 -0
- package/lib/inputs/file/DefaultFile.d.ts +2 -0
- package/lib/inputs/file/DefaultFile.js +4 -2
- package/lib/inputs/file/DragDropFile.d.ts +2 -0
- package/lib/inputs/file/DragDropFile.js +4 -2
- package/lib/inputs/file/File.d.ts +2 -0
- package/lib/inputs/file/FileButtonSettings.d.ts +2 -0
- package/lib/inputs/file/helpers.d.ts +2 -0
- package/lib/inputs/file/index.d.ts +2 -0
- package/lib/inputs/file/types.d.ts +2 -0
- package/lib/inputs/inputHOC.d.ts +3 -1
- package/lib/inputs/mask/BaseMask.d.ts +3 -0
- package/lib/inputs/mask/Cnpj.d.ts +3 -0
- package/lib/inputs/mask/Cpf.d.ts +3 -0
- package/lib/inputs/mask/Cpf.js +0 -1
- package/lib/inputs/mask/Phone.d.ts +3 -0
- package/lib/inputs/mask/ZipCode.d.ts +3 -0
- package/lib/inputs/mask/helpers.d.ts +2 -1
- package/lib/inputs/mask/imaskHOC.d.ts +3 -1
- package/lib/inputs/mask/index.d.ts +3 -0
- package/lib/inputs/mask/types.d.ts +5 -1
- package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -0
- package/lib/inputs/multiSelect/Dropdown.d.ts +2 -0
- package/lib/inputs/multiSelect/helper.d.ts +2 -0
- package/lib/inputs/multiSelect/index.d.ts +2 -0
- package/lib/inputs/multiSelect/index.js +2 -2
- package/lib/inputs/multiSelect/types.d.ts +2 -0
- package/lib/inputs/number/BaseNumber.d.ts +3 -1
- package/lib/inputs/number/Currency.d.ts +3 -1
- package/lib/inputs/number/Decimal.d.ts +3 -1
- package/lib/inputs/number/index.d.ts +3 -1
- package/lib/inputs/number/types.d.ts +3 -1
- package/lib/inputs/period/Dialog.d.ts +2 -0
- package/lib/inputs/period/Dropdown.d.ts +2 -0
- package/lib/inputs/period/PeriodList.d.ts +2 -0
- package/lib/inputs/period/helper.d.ts +2 -0
- package/lib/inputs/period/index.d.ts +2 -0
- package/lib/inputs/period/index.js +4 -1
- package/lib/inputs/period/types.d.ts +2 -0
- package/lib/inputs/search/index.d.ts +3 -1
- package/lib/inputs/select/ActionButtons.d.ts +3 -1
- package/lib/inputs/select/Dropdown.d.ts +3 -1
- package/lib/inputs/select/helper.d.ts +3 -1
- package/lib/inputs/select/index.d.ts +2 -0
- package/lib/inputs/select/multiple/Selecteds.d.ts +2 -0
- package/lib/inputs/select/multiple/index.d.ts +2 -0
- package/lib/inputs/select/multiple/index.js +9 -3
- package/lib/inputs/select/simple/index.d.ts +2 -0
- package/lib/inputs/select/simple/index.js +9 -3
- package/lib/inputs/select/types.d.ts +4 -2
- package/lib/inputs/textarea/index.d.ts +2 -0
- package/lib/inputs/textarea/types.d.ts +2 -0
- package/lib/inputs/types.d.ts +10 -3
- package/lib/internals/types.d.ts +5 -2
- package/lib/internals/withTooltip.d.ts +3 -2
- package/lib/internals/withTooltip.js +25 -10
- package/lib/list/Item.js +19 -6
- package/lib/menus/sidenav/index.js +3 -3
- package/lib/menus/sidenav/popup_menu_search/index.js +1 -1
- package/lib/table/RowColumn.js +6 -8
- package/lib/toolbar/types.d.ts +1 -0
- package/lib/tooltip/index.js +2 -2
- package/lib/treeview/Node.js +2 -2
- package/lib/uitour/index.d.ts +2 -1
- package/lib/uitour/index.js +57 -4
- package/lib/uitour/types.d.ts +9 -1
- package/package.json +5 -5
- package/.tool-versions +0 -1
package/lib/fieldset/index.js
CHANGED
|
@@ -28,7 +28,9 @@ const Fieldset = props => {
|
|
|
28
28
|
styleTitle,
|
|
29
29
|
template = 'none',
|
|
30
30
|
titleCustomClass,
|
|
31
|
-
permissionAttr
|
|
31
|
+
permissionAttr,
|
|
32
|
+
leftElements = null,
|
|
33
|
+
rightElements = null
|
|
32
34
|
} = props;
|
|
33
35
|
const {
|
|
34
36
|
hideContent,
|
|
@@ -69,7 +71,7 @@ const Fieldset = props => {
|
|
|
69
71
|
style: styleTitle,
|
|
70
72
|
align: titleAlign,
|
|
71
73
|
className: "legend ".concat(titleCustomClass)
|
|
72
|
-
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
74
|
+
}, leftElements, title, rightElements), /*#__PURE__*/_react.default.createElement("div", {
|
|
73
75
|
className: "contentfieldset -template".concat(template, " "),
|
|
74
76
|
style: Object.assign(getContentStyle(props), styleContent)
|
|
75
77
|
}, children)));
|
package/lib/fieldset/types.d.ts
CHANGED
package/lib/form/Field.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<Pick<IFieldProps & React__default.RefAttributes<unknown>, keyof IFieldProps | "key"> & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
package/lib/form/FieldArray.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<IFieldArrayProps & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
package/lib/form/FieldArray.js
CHANGED
|
@@ -10,7 +10,8 @@ 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", "handlerFieldValidade", "changePropName", "fieldErrors", "externalMessagesErrors", "handlerRemoveValidators", "validators", "valuePropName", "originalData"];
|
|
13
|
+
const _excluded = ["cols", "label", "bordered", "labelContainerStyle", "skipLabel", "data", "name", "handlerStoreValidators", "component", "handlerFieldChange", "handlerFieldValidade", "changePropName", "fieldErrors", "externalMessagesErrors", "handlerRemoveValidators", "validators", "valuePropName", "originalData", "handlerSelecionados"];
|
|
14
|
+
/* eslint-disable react-hooks/rules-of-hooks */
|
|
14
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
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); }
|
|
16
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; }
|
|
@@ -33,12 +34,12 @@ const getDefaultProps = (props, handleShowValidateMessages) => {
|
|
|
33
34
|
onBlur
|
|
34
35
|
} = props;
|
|
35
36
|
return {
|
|
36
|
-
onBlur: e => {
|
|
37
|
+
onBlur: (0, _react.useCallback)(e => {
|
|
37
38
|
if (handleShowValidateMessages) handleShowValidateMessages(true);
|
|
38
39
|
if (onBlur) onBlur(e);
|
|
39
|
-
},
|
|
40
|
+
}, [handleShowValidateMessages, onBlur]),
|
|
40
41
|
[valuePropName]: _lodash.default.get(data, name),
|
|
41
|
-
[changePropName]: ids => {
|
|
42
|
+
[changePropName]: (0, _react.useCallback)(ids => {
|
|
42
43
|
if (handlerFieldChange) handlerFieldChange({
|
|
43
44
|
target: {
|
|
44
45
|
value: ids,
|
|
@@ -47,19 +48,7 @@ const getDefaultProps = (props, handleShowValidateMessages) => {
|
|
|
47
48
|
});
|
|
48
49
|
if (handlerSelecionados) handlerSelecionados(ids);
|
|
49
50
|
if (handleShowValidateMessages) handleShowValidateMessages(true);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
};
|
|
53
|
-
const getEvents = _ref => {
|
|
54
|
-
let {
|
|
55
|
-
onBlur,
|
|
56
|
-
handleShowValidateMessages
|
|
57
|
-
} = _ref;
|
|
58
|
-
return {
|
|
59
|
-
onBlur: e => {
|
|
60
|
-
handleShowValidateMessages(true);
|
|
61
|
-
if (onBlur) onBlur(e);
|
|
62
|
-
}
|
|
51
|
+
}, [handlerFieldChange, handlerSelecionados, handleShowValidateMessages, changePropName])
|
|
63
52
|
};
|
|
64
53
|
};
|
|
65
54
|
const FieldArray = props => {
|
|
@@ -81,15 +70,16 @@ const FieldArray = props => {
|
|
|
81
70
|
handlerRemoveValidators,
|
|
82
71
|
validators,
|
|
83
72
|
valuePropName,
|
|
84
|
-
originalData
|
|
73
|
+
originalData,
|
|
74
|
+
handlerSelecionados
|
|
85
75
|
} = props,
|
|
86
76
|
rest = _objectWithoutProperties(props, _excluded);
|
|
87
77
|
const [showValidateMessages, setShowValidateMessages] = (0, _react.useState)(false);
|
|
88
78
|
const currentValue = _lodash.default.get(data, name);
|
|
89
79
|
const originalValue = _lodash.default.get(originalData, name);
|
|
90
|
-
const handleShowValidateMessages = value => {
|
|
80
|
+
const handleShowValidateMessages = (0, _react.useCallback)(value => {
|
|
91
81
|
setShowValidateMessages(value);
|
|
92
|
-
};
|
|
82
|
+
}, []);
|
|
93
83
|
(0, _react.useEffect)(() => {
|
|
94
84
|
if (!_lodash.default.isEqual(currentValue, originalValue) && Array.isArray(currentValue) && currentValue.length > 0) {
|
|
95
85
|
setShowValidateMessages(true);
|
|
@@ -105,9 +95,7 @@ const FieldArray = props => {
|
|
|
105
95
|
customClass: "arraycontainer ".concat(bordered && '-bordered'),
|
|
106
96
|
style: labelContainerStyle,
|
|
107
97
|
titleCustomClass: "label"
|
|
108
|
-
}, /*#__PURE__*/_react.default.createElement(Component, _extends({}, rest, getDefaultProps(props, handleShowValidateMessages),
|
|
109
|
-
handleShowValidateMessages: value => setShowValidateMessages(value)
|
|
110
|
-
})), {
|
|
98
|
+
}, /*#__PURE__*/_react.default.createElement(Component, _extends({}, rest, getDefaultProps(props, handleShowValidateMessages), {
|
|
111
99
|
label: label,
|
|
112
100
|
name: name,
|
|
113
101
|
errorMessages: (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -115,9 +103,7 @@ const FieldArray = props => {
|
|
|
115
103
|
}))
|
|
116
104
|
})));
|
|
117
105
|
} else {
|
|
118
|
-
content = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(Component, _extends({}, rest, getDefaultProps(props, handleShowValidateMessages),
|
|
119
|
-
handleShowValidateMessages: value => setShowValidateMessages(value)
|
|
120
|
-
})), {
|
|
106
|
+
content = /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(Component, _extends({}, rest, getDefaultProps(props, handleShowValidateMessages), {
|
|
121
107
|
label: label,
|
|
122
108
|
name: name,
|
|
123
109
|
errorMessages: (0, _helpers.getErrorMessages)(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<IFieldProps & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const _default: React__default.ForwardRefExoticComponent<IFieldPeriodProps & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
package/lib/form/helpers.d.ts
CHANGED
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const securityBeforeUnload = "securityBeforeUnload";
|
|
11
13
|
declare const FormContext: React__default.Context<FormContextProps>;
|
package/lib/form/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ import '../@types/DataCombo.js';
|
|
|
10
10
|
import '../@types/PermissionAttr.js';
|
|
11
11
|
import '../inputs/base/types.js';
|
|
12
12
|
import '../@types/Period.js';
|
|
13
|
+
import '../internals/types.js';
|
|
14
|
+
import '../@types/Position.js';
|
|
13
15
|
|
|
14
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;
|
|
15
17
|
|
package/lib/form/index.js
CHANGED
|
@@ -110,17 +110,16 @@ const Form = _ref => {
|
|
|
110
110
|
if (updateState) setFieldErrors(currentFieldErrors);
|
|
111
111
|
return Object.values(currentFieldErrors).every(value => value.length === 0);
|
|
112
112
|
};
|
|
113
|
-
const onFieldChange = event => {
|
|
113
|
+
const onFieldChange = (0, _react.useCallback)(event => {
|
|
114
114
|
const {
|
|
115
115
|
target
|
|
116
116
|
} = event;
|
|
117
117
|
if (!useInternalState && onDataChange) {
|
|
118
|
-
|
|
119
|
-
onDataChange(newData);
|
|
118
|
+
onDataChange(prevState => (0, _helpers.changeValue)(prevState, target));
|
|
120
119
|
} else {
|
|
121
120
|
setData(prevState => (0, _helpers.changeValue)(prevState, target));
|
|
122
121
|
}
|
|
123
|
-
};
|
|
122
|
+
}, []);
|
|
124
123
|
const onValidate = (fieldName, fieldValue, validators) => {
|
|
125
124
|
if (validators) {
|
|
126
125
|
let currentFieldErrors = fieldErrors;
|
|
@@ -135,10 +134,10 @@ const Form = _ref => {
|
|
|
135
134
|
setFieldErrors(currentFieldErrors);
|
|
136
135
|
}
|
|
137
136
|
};
|
|
138
|
-
const onFormSubmit = event => {
|
|
137
|
+
const onFormSubmit = (0, _react.useCallback)(event => {
|
|
139
138
|
if (event) event.preventDefault();
|
|
140
139
|
if (checkIsValid(usedData)) onSubmit(usedData);
|
|
141
|
-
};
|
|
140
|
+
}, [usedData]);
|
|
142
141
|
const onReset = () => {
|
|
143
142
|
if (!useInternalState && onDataChange) {
|
|
144
143
|
onDataChange(JSON.parse(JSON.stringify(originalData)));
|
|
@@ -186,7 +185,7 @@ const Form = _ref => {
|
|
|
186
185
|
onChangedData(false);
|
|
187
186
|
}
|
|
188
187
|
}
|
|
189
|
-
if (onDataChange) onDataChange(usedData);
|
|
188
|
+
if (onDataChange && useInternalState) onDataChange(usedData);
|
|
190
189
|
|
|
191
190
|
// TODO - Usar debounce para evitar chamada a cada letra digitada
|
|
192
191
|
if (onValidateForm) onValidateForm(checkIsValid(usedData, true));
|
package/lib/form/types.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ import '../@types/DataCombo.js';
|
|
|
5
5
|
import '../@types/PermissionAttr.js';
|
|
6
6
|
import '../inputs/base/types.js';
|
|
7
7
|
import '../@types/Period.js';
|
|
8
|
+
import '../internals/types.js';
|
|
9
|
+
import '../@types/Position.js';
|
|
8
10
|
|
|
9
11
|
type Validator = (value: string) => string | undefined;
|
|
10
12
|
type PeriodValidator = (value: {
|
|
@@ -36,12 +38,13 @@ type BaseFormProps = {
|
|
|
36
38
|
skeletonize?: boolean;
|
|
37
39
|
disabled?: boolean;
|
|
38
40
|
};
|
|
41
|
+
type OnDataChange = React.Dispatch<React.SetStateAction<any>>;
|
|
39
42
|
type FormProps = BaseFormProps & ({
|
|
40
43
|
useInternalState?: false;
|
|
41
|
-
onDataChange:
|
|
44
|
+
onDataChange: OnDataChange;
|
|
42
45
|
} | {
|
|
43
46
|
useInternalState: true;
|
|
44
|
-
onDataChange?:
|
|
47
|
+
onDataChange?: OnDataChange;
|
|
45
48
|
});
|
|
46
49
|
type Data = {
|
|
47
50
|
[key: string]: any;
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const withFieldHOC: <ComponentProps extends WithFieldProps>(WrappedComponent: React__default.ComponentType<ComponentProps>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<ComponentProps> & React__default.RefAttributes<HTMLElement>>;
|
|
11
13
|
|
|
@@ -6,6 +6,8 @@ import '../@types/DataCombo.js';
|
|
|
6
6
|
import '../@types/PermissionAttr.js';
|
|
7
7
|
import '../inputs/base/types.js';
|
|
8
8
|
import '../@types/Period.js';
|
|
9
|
+
import '../internals/types.js';
|
|
10
|
+
import '../@types/Position.js';
|
|
9
11
|
|
|
10
12
|
declare const FormSecurityContext: React__default.Context<IFormSecurityContext>;
|
|
11
13
|
declare const withFormSecurity: <ComponentProps extends IWithFormSecurity>(WrappedComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
|
|
@@ -7,17 +7,25 @@ exports.default = void 0;
|
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
require("../assets/styles/gridlayout.scss");
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
const getClass = props => "row ".concat(props.customClass, "\n ").concat(props.withTrim && ' -withtrim', "\n ").concat(props.verticalAlign && " align-items-".concat(props.verticalAlign), "\n ").concat(props.horizontalAlign && " justify-content-".concat(props.horizontalAlign));
|
|
11
16
|
const GridRow = props => {
|
|
12
17
|
const {
|
|
13
18
|
style,
|
|
14
19
|
children,
|
|
20
|
+
verticalAlign = 'start',
|
|
15
21
|
visible = true
|
|
16
22
|
} = props;
|
|
17
23
|
if (!visible) return null;
|
|
18
24
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
19
25
|
style: style,
|
|
20
|
-
className: getClass(props)
|
|
26
|
+
className: getClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
27
|
+
verticalAlign
|
|
28
|
+
}))
|
|
21
29
|
}, children);
|
|
22
30
|
};
|
|
23
31
|
var _default = exports.default = GridRow;
|
|
@@ -9,7 +9,7 @@ interface IGridCol {
|
|
|
9
9
|
}
|
|
10
10
|
interface IGridRow {
|
|
11
11
|
children: ReactNode | ReactNode[];
|
|
12
|
-
verticalAlign?:
|
|
12
|
+
verticalAlign?: 'start' | 'center' | 'end' | 'baseline' | 'stretch';
|
|
13
13
|
horizontalAlign?: string;
|
|
14
14
|
style?: CSSProperties;
|
|
15
15
|
withTrim?: boolean;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.showHintList = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
const showHintList = arrayHint => /*#__PURE__*/_react.default.createElement("div", {
|
|
10
|
+
className: "rules-list",
|
|
11
|
+
style: {
|
|
12
|
+
padding: '15px 0px'
|
|
13
|
+
}
|
|
14
|
+
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
15
|
+
style: {
|
|
16
|
+
listStyleType: 'none'
|
|
17
|
+
}
|
|
18
|
+
}, arrayHint.map((hint, index) => /*#__PURE__*/_react.default.createElement("li", {
|
|
19
|
+
key: index.toString()
|
|
20
|
+
}, "- ", hint))));
|
|
21
|
+
exports.showHintList = showHintList;
|
package/lib/hint/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { HintProps } from './types.js';
|
|
2
2
|
import 'react';
|
|
3
|
+
import '../@types/ColorStyles.js';
|
|
3
4
|
|
|
4
|
-
declare const Hint: ({ visible, description, customClass, skeletonize, style, }: HintProps) => JSX.Element | null;
|
|
5
|
+
declare const Hint: ({ visible, description, customClass, skeletonize, style, disabled, color, }: HintProps) => JSX.Element | null;
|
|
5
6
|
|
|
6
7
|
export { Hint as default };
|
package/lib/hint/index.js
CHANGED
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _helpers = require("./helpers");
|
|
8
9
|
require("../assets/styles/hint.scss");
|
|
9
10
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
11
|
const Hint = _ref => {
|
|
@@ -13,24 +14,17 @@ const Hint = _ref => {
|
|
|
13
14
|
description,
|
|
14
15
|
customClass,
|
|
15
16
|
skeletonize = false,
|
|
16
|
-
style
|
|
17
|
+
style,
|
|
18
|
+
disabled = false,
|
|
19
|
+
color
|
|
17
20
|
} = _ref;
|
|
18
21
|
if (!visible || !description) return null;
|
|
19
|
-
const showHintList = arrayHint => /*#__PURE__*/_react.default.createElement("div", {
|
|
20
|
-
className: "rules-list",
|
|
21
|
-
style: {
|
|
22
|
-
padding: '15px 0px'
|
|
23
|
-
}
|
|
24
|
-
}, /*#__PURE__*/_react.default.createElement("ul", {
|
|
25
|
-
style: {
|
|
26
|
-
listStyleType: 'none'
|
|
27
|
-
}
|
|
28
|
-
}, arrayHint.map((hint, index) => /*#__PURE__*/_react.default.createElement("li", {
|
|
29
|
-
key: index.toString()
|
|
30
|
-
}, "- ", hint))));
|
|
31
22
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
23
|
+
"aria-disabled": disabled,
|
|
32
24
|
style: style,
|
|
33
|
-
className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ")
|
|
34
|
-
}, Array.isArray(description) ? showHintList(description) : /*#__PURE__*/_react.default.createElement("span",
|
|
25
|
+
className: "\n hint-component\n ".concat(customClass, "\n ").concat(skeletonize ? '-skeletonized' : '', "\n ").concat(disabled ? '-disabled' : '', "\n -").concat(color, "\n ")
|
|
26
|
+
}, Array.isArray(description) ? (0, _helpers.showHintList)(description) : /*#__PURE__*/_react.default.createElement("span", {
|
|
27
|
+
"aria-disabled": disabled
|
|
28
|
+
}, description));
|
|
35
29
|
};
|
|
36
30
|
var _default = exports.default = Hint;
|
package/lib/hint/types.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
+
import { ColorStyles } from '../@types/ColorStyles.js';
|
|
2
3
|
|
|
3
4
|
interface HintProps {
|
|
4
5
|
description?: string | string[];
|
|
5
6
|
visible?: boolean;
|
|
6
7
|
customClass?: string;
|
|
7
8
|
skeletonize?: boolean;
|
|
9
|
+
disabled?: boolean;
|
|
8
10
|
style?: CSSProperties;
|
|
11
|
+
color?: ColorStyles;
|
|
9
12
|
}
|
|
10
13
|
|
|
11
14
|
export type { HintProps };
|
package/lib/icons/helper.d.ts
CHANGED
package/lib/icons/helper.js
CHANGED
|
@@ -608,5 +608,9 @@ var _default = exports.default = {
|
|
|
608
608
|
videoCamOutline: {
|
|
609
609
|
viewbox: '0 0 16 16',
|
|
610
610
|
paths: ['M15.294 4.004c-0.165 0-0.335 0.058-0.491 0.168l-2.803 1.978v-1.651c0-0.825-0.675-1.5-1.5-1.5h-9c-0.825 0-1.5 0.675-1.5 1.5v7c0 0.825 0.675 1.5 1.5 1.5h9c0.825 0 1.5-0.675 1.5-1.5v-1.65l2.803 1.978c0.156 0.11 0.326 0.168 0.491 0.168 0 0 0 0 0 0 0.22 0 0.421-0.101 0.551-0.278 0.101-0.137 0.154-0.313 0.154-0.51v-6.415c-0-0.518-0.355-0.788-0.706-0.788zM15 10.743l-2.469-1.743h-1.531v2.5c0 0.271-0.229 0.5-0.5 0.5h-9c-0.271 0-0.5-0.229-0.5-0.5v-7c0-0.271 0.229-0.5 0.5-0.5h9c0.271 0 0.5 0.229 0.5 0.5v2.5h1.531l2.469-1.743v5.486z', 'M4 5l5 3-5 3z']
|
|
611
|
+
},
|
|
612
|
+
user_block: {
|
|
613
|
+
viewbox: '0 0 16 16',
|
|
614
|
+
paths: ['M7.5 16h-6.977c-0.14 0-0.274-0.059-0.369-0.163s-0.141-0.242-0.129-0.382c0.11-1.22 0.585-2.363 1.373-3.305 0.697-0.832 1.59-1.452 2.602-1.809l0-0.475c-0.562-0.385-1.037-0.926-1.385-1.582-0.402-0.758-0.615-1.634-0.615-2.535 0-1.251 0.405-2.431 1.139-3.323 0.758-0.92 1.774-1.427 2.861-1.427 2.119 0 3.874 1.966 3.993 4.476 0.013 0.276-0.2 0.51-0.476 0.523s-0.51-0.2-0.523-0.476c-0.094-1.976-1.41-3.524-2.995-3.524-1.654 0-3 1.682-3 3.75 0 1.457 0.687 2.795 1.75 3.408 0.155 0.089 0.25 0.254 0.25 0.433l-0 1.116c0 0.224-0.149 0.42-0.364 0.481-0.967 0.274-1.822 0.828-2.471 1.604-0.538 0.643-0.901 1.397-1.064 2.208h6.4c0.276 0 0.5 0.224 0.5 0.5s-0.224 0.5-0.5 0.5z', 'M11.5 7c-2.481 0-4.5 2.019-4.5 4.5s2.019 4.5 4.5 4.5 4.5-2.019 4.5-4.5-2.019-4.5-4.5-4.5zM8 11.5c0-1.93 1.57-3.5 3.5-3.5 0.785 0 1.511 0.26 2.095 0.698l-4.897 4.897c-0.438-0.584-0.698-1.31-0.698-2.095zM11.5 15c-0.785 0-1.511-0.26-2.095-0.698l4.897-4.897c0.438 0.584 0.698 1.31 0.698 2.095 0 1.93-1.57 3.5-3.5 3.5z']
|
|
611
615
|
}
|
|
612
616
|
};
|
|
@@ -3,6 +3,8 @@ import 'react';
|
|
|
3
3
|
import '../../@types/Align.js';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
6
8
|
|
|
7
9
|
declare const _default: (props: IBaseProps) => JSX.Element;
|
|
8
10
|
|
|
@@ -12,6 +12,8 @@ var helpers = _interopRequireWildcard(require("./helpers"));
|
|
|
12
12
|
var _withTooltip = _interopRequireDefault(require("../../internals/withTooltip"));
|
|
13
13
|
var _permissionValidations = require("../../permissionValidations");
|
|
14
14
|
var _hint = _interopRequireDefault(require("../../hint"));
|
|
15
|
+
var _errorMessage = require("../errorMessage");
|
|
16
|
+
var _Label = _interopRequireDefault(require("./Label"));
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
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); }
|
|
17
19
|
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; }
|
|
@@ -69,11 +71,13 @@ const InputTextBase = props => {
|
|
|
69
71
|
} = props;
|
|
70
72
|
let propsInput;
|
|
71
73
|
const options = [_permissionValidations.OPTIONS_ON_DENIED.disabled, _permissionValidations.OPTIONS_ON_DENIED.unvisible, _permissionValidations.OPTIONS_ON_DENIED.readOnly, _permissionValidations.OPTIONS_ON_DENIED.hideContent];
|
|
74
|
+
const labelRef = (0, _react.useRef)(null);
|
|
72
75
|
const onDenied = onDeniedActions || (0, _permissionValidations.actionsOnPermissionDenied)(options, permissionAttr);
|
|
73
76
|
const {
|
|
74
77
|
hideContent,
|
|
75
78
|
unvisible
|
|
76
79
|
} = onDenied;
|
|
80
|
+
const [showTooltip, setShowTooltip] = (0, _react.useState)(false);
|
|
77
81
|
(0, _react.useEffect)(() => {
|
|
78
82
|
if (handlerSetOnDenied) handlerSetOnDenied(onDenied);
|
|
79
83
|
}, []);
|
|
@@ -144,6 +148,39 @@ const InputTextBase = props => {
|
|
|
144
148
|
}
|
|
145
149
|
return propsInput;
|
|
146
150
|
};
|
|
151
|
+
const onHoverLabel = e => {
|
|
152
|
+
const target = e.target;
|
|
153
|
+
if (target.offsetWidth < target.scrollWidth) {
|
|
154
|
+
setShowTooltip(true);
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
(0, _react.useEffect)(() => {
|
|
158
|
+
const resize = new ResizeObserver(_ref => {
|
|
159
|
+
let [element] = _ref;
|
|
160
|
+
const {
|
|
161
|
+
target
|
|
162
|
+
} = element;
|
|
163
|
+
setShowTooltip(prevState => {
|
|
164
|
+
var overflowing = target.clientWidth < target.scrollWidth;
|
|
165
|
+
return prevState === overflowing ? prevState : overflowing;
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
if (labelRef.current) {
|
|
169
|
+
resize.observe(labelRef.current);
|
|
170
|
+
}
|
|
171
|
+
return () => {
|
|
172
|
+
if (resize) {
|
|
173
|
+
resize.disconnect();
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
}, []);
|
|
177
|
+
if (labelRef.current) {
|
|
178
|
+
const element = labelRef.current;
|
|
179
|
+
const overflowing = element.offsetWidth < element.scrollWidth;
|
|
180
|
+
if (overflowing && !showTooltip) {
|
|
181
|
+
setShowTooltip(true);
|
|
182
|
+
}
|
|
183
|
+
}
|
|
147
184
|
if (!visible || unvisible) return null;
|
|
148
185
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
149
186
|
style: style,
|
|
@@ -154,12 +191,16 @@ const InputTextBase = props => {
|
|
|
154
191
|
style: {
|
|
155
192
|
textAlign: textAlign === 'center' ? 'left' : textAlign
|
|
156
193
|
}
|
|
157
|
-
}, /*#__PURE__*/_react.default.createElement(
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
194
|
+
}, /*#__PURE__*/_react.default.createElement(_Label.default, {
|
|
195
|
+
labelRef: labelRef,
|
|
196
|
+
label: label,
|
|
197
|
+
required: required,
|
|
198
|
+
onHoverLabel: onHoverLabel,
|
|
199
|
+
customClassForLabel: customClassForLabel,
|
|
200
|
+
labelUppercase: labelUppercase,
|
|
201
|
+
tooltip: showTooltip ? label.toString() : undefined,
|
|
202
|
+
tooltipPosition: "top"
|
|
203
|
+
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
163
204
|
"data-testid": "testInputWrapper",
|
|
164
205
|
style: styleForWrapper,
|
|
165
206
|
className: helpers.getInputWrapperClass(_objectSpread(_objectSpread({}, props), {}, {
|
|
@@ -179,9 +220,12 @@ const InputTextBase = props => {
|
|
|
179
220
|
autoComplete: autoComplete,
|
|
180
221
|
tabIndex: applyTabIndex()
|
|
181
222
|
}, inputProps())), children), helpers.getRightElements(errorMessages || [], skeletonize, rightElements)), /*#__PURE__*/_react.default.createElement(_hint.default, {
|
|
223
|
+
disabled: disabled,
|
|
182
224
|
visible: !!hint,
|
|
183
225
|
customClass: "hint",
|
|
184
226
|
description: hint
|
|
185
|
-
}),
|
|
227
|
+
}), /*#__PURE__*/_react.default.createElement(_errorMessage.ErrorMessage, {
|
|
228
|
+
messages: errorMessages
|
|
229
|
+
}));
|
|
186
230
|
};
|
|
187
231
|
var _default = exports.default = (0, _inputHOC.default)((0, _withTooltip.default)(InputTextBase));
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { InputLabelProps } from './types.js';
|
|
2
|
+
import 'react';
|
|
3
|
+
import '../../@types/Align.js';
|
|
4
|
+
import '../../@types/Period.js';
|
|
5
|
+
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
8
|
+
|
|
9
|
+
declare const _default: {
|
|
10
|
+
(props: InputLabelProps): JSX.Element;
|
|
11
|
+
displayName: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { _default as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
const Label = props => {
|
|
11
|
+
const {
|
|
12
|
+
label,
|
|
13
|
+
styleForLabel,
|
|
14
|
+
customClassForLabel,
|
|
15
|
+
labelUppercase,
|
|
16
|
+
required,
|
|
17
|
+
targetRef,
|
|
18
|
+
labelRef,
|
|
19
|
+
onHoverLabel
|
|
20
|
+
} = props;
|
|
21
|
+
return /*#__PURE__*/_react.default.createElement("span", {
|
|
22
|
+
style: styleForLabel,
|
|
23
|
+
ref: ref => {
|
|
24
|
+
if (ref) {
|
|
25
|
+
if (labelRef) labelRef.current = ref;
|
|
26
|
+
if (targetRef) targetRef(ref);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
onMouseEnter: onHoverLabel,
|
|
30
|
+
className: "label ".concat(customClassForLabel, " ").concat(labelUppercase && ' -uppercase')
|
|
31
|
+
}, label, required && /*#__PURE__*/_react.default.createElement("span", {
|
|
32
|
+
className: "-requiredlabel"
|
|
33
|
+
}, "*"));
|
|
34
|
+
};
|
|
35
|
+
var _default = exports.default = (0, _withTooltip.default)(Label);
|
|
@@ -3,6 +3,8 @@ import { TextAlign } from '../../@types/Align.js';
|
|
|
3
3
|
import 'react';
|
|
4
4
|
import '../../@types/Period.js';
|
|
5
5
|
import '../../@types/PermissionAttr.js';
|
|
6
|
+
import '../../internals/types.js';
|
|
7
|
+
import '../../@types/Position.js';
|
|
6
8
|
|
|
7
9
|
declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
8
10
|
textAlign?: TextAlign | undefined;
|
|
@@ -10,7 +12,6 @@ declare const getInputClass: ({ textAlign, readOnly, readOnlyClass, }: {
|
|
|
10
12
|
readOnlyClass?: string | undefined;
|
|
11
13
|
}) => string;
|
|
12
14
|
declare const getInputWrapperClass: (props: IBaseProps) => string;
|
|
13
|
-
declare const getErrorMessages: (messages: string[]) => JSX.Element;
|
|
14
15
|
declare const getRightElements: (errorMessages: string[], skeletonize: boolean, rightElements?: JSX.Element | JSX.Element[]) => JSX.Element[] | null;
|
|
15
16
|
|
|
16
|
-
export {
|
|
17
|
+
export { getInputClass, getInputWrapperClass, getRightElements };
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.getRightElements = exports.getInputWrapperClass = exports.getInputClass =
|
|
6
|
+
exports.getRightElements = exports.getInputWrapperClass = exports.getInputClass = void 0;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
8
|
var _lodash = _interopRequireDefault(require("lodash"));
|
|
9
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -27,13 +27,6 @@ const getInputWrapperClass = props => {
|
|
|
27
27
|
return "inputwrapper ".concat(inputHasFocus && ' -focusable', "\n ").concat(customClassForWrapper, "\n ").concat(errorMessages && errorMessages.length > 0 && ' -requirederror', "\n ").concat(rounded && ' -roundedborders', "\n ").concat(disabled && ' -disabled');
|
|
28
28
|
};
|
|
29
29
|
exports.getInputWrapperClass = getInputWrapperClass;
|
|
30
|
-
const getErrorMessages = messages => {
|
|
31
|
-
if (!messages || messages.length === 0) return /*#__PURE__*/_react.default.createElement("noscript", null);
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement("p", {
|
|
33
|
-
className: "errormessages"
|
|
34
|
-
}, messages.join(', '));
|
|
35
|
-
};
|
|
36
|
-
exports.getErrorMessages = getErrorMessages;
|
|
37
30
|
const getRightElements = (errorMessages, skeletonize, rightElements) => {
|
|
38
31
|
let elements = rightElements || [];
|
|
39
32
|
if (skeletonize) return null;
|