@arquimedes.co/eureka-forms 1.9.76-test → 1.9.79-test
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/package.json +1 -1
- package/dist/@Types/@Types.d.ts +0 -2
- package/dist/@Types/@Types.js +0 -1
- package/dist/@Types/AYFFormStep.d.ts +0 -19
- package/dist/@Types/AYFFormStep.js +0 -1
- package/dist/@Types/CBRFormStep.d.ts +0 -74
- package/dist/@Types/CBRFormStep.js +0 -1
- package/dist/@Types/Form.d.ts +0 -65
- package/dist/@Types/Form.js +0 -1
- package/dist/@Types/FormStep.d.ts +0 -138
- package/dist/@Types/FormStep.js +0 -1
- package/dist/@Types/GenericFormSteps.d.ts +0 -60
- package/dist/@Types/GenericFormSteps.js +0 -1
- package/dist/@Types/Organization.d.ts +0 -17
- package/dist/@Types/Organization.js +0 -1
- package/dist/@Types/index.d.ts +0 -1
- package/dist/@Types/index.js +0 -1
- package/dist/App.d.ts +0 -58
- package/dist/App.js +0 -470
- package/dist/App.module.css +0 -34
- package/dist/AxiosAPI.d.ts +0 -2
- package/dist/AxiosAPI.js +0 -8
- package/dist/AxiosWidget.d.ts +0 -2
- package/dist/AxiosWidget.js +0 -8
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +0 -7
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +0 -379
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +0 -51
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +0 -12
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +0 -31
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +0 -64
- package/dist/FormComponents/Form/Form.d.ts +0 -41
- package/dist/FormComponents/Form/Form.js +0 -147
- package/dist/FormComponents/Form/Form.module.css +0 -39
- package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +0 -4
- package/dist/FormComponents/Form/StepperForm/StepperForm.js +0 -6
- package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +0 -4
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +0 -42
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +0 -8
- package/dist/FormComponents/Section/Section.d.ts +0 -38
- package/dist/FormComponents/Section/Section.js +0 -23
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +0 -8
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.js +0 -139
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +0 -9
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +0 -23
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +0 -8
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +0 -49
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +0 -60
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +0 -11
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +0 -121
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +0 -34
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +0 -8
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +0 -138
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +0 -54
- package/dist/FormComponents/Step/AYFStepMapper.d.ts +0 -12
- package/dist/FormComponents/Step/AYFStepMapper.js +0 -170
- package/dist/FormComponents/Step/CBRStepMapper.d.ts +0 -13
- package/dist/FormComponents/Step/CBRStepMapper.js +0 -202
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.d.ts +0 -9
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +0 -35
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +0 -4
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +0 -65
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +0 -37
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +0 -9
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +0 -35
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +0 -4
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +0 -121
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +0 -25
- package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.d.ts +0 -9
- package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.js +0 -37
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +0 -4
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +0 -75
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +0 -62
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +0 -11
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +0 -23
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +0 -4
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +0 -48
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +0 -9
- package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.d.ts +0 -15
- package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.js +0 -35
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +0 -4
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +0 -203
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.module.css +0 -25
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +0 -9
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +0 -23
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +0 -13
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +0 -123
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +0 -60
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +0 -16
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +0 -272
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +0 -59
- package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +0 -15
- package/dist/FormComponents/Step/MapperStep/MapperStep.js +0 -35
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +0 -10
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +0 -27
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +0 -60
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.d.ts +0 -13
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.js +0 -33
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.module.css +0 -60
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -15
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +0 -275
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +0 -42
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +0 -4
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +0 -71
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +0 -30
- package/dist/FormComponents/Step/RatingStep/RatingStep.d.ts +0 -9
- package/dist/FormComponents/Step/RatingStep/RatingStep.js +0 -23
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +0 -4
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +0 -104
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +0 -25
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +0 -9
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +0 -35
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +0 -4
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +0 -11
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +0 -7
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +0 -9
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +0 -35
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +0 -10
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +0 -241
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.module.css +0 -9
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +0 -33
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +0 -23
- package/dist/FormComponents/Step/Step.d.ts +0 -11
- package/dist/FormComponents/Step/Step.js +0 -108
- package/dist/FormComponents/Step/StepFunctions.d.ts +0 -5
- package/dist/FormComponents/Step/StepFunctions.js +0 -65
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +0 -96
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +0 -13
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +0 -213
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +0 -93
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +0 -10
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +0 -23
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +0 -4
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +0 -76
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +0 -9
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +0 -13
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +0 -23
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +0 -4
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +0 -20
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +0 -19
- package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +0 -9
- package/dist/FormComponents/Step/TitleStep/TitleStep.js +0 -35
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +0 -4
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +0 -88
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +0 -83
- package/dist/FormComponents/Term/Term.d.ts +0 -15
- package/dist/FormComponents/Term/Term.js +0 -23
- package/dist/Icons/Construction/LeakIcon.d.ts +0 -3
- package/dist/Icons/Construction/LeakIcon.js +0 -16
- package/dist/Icons/Construction/ProjectIcon.d.ts +0 -3
- package/dist/Icons/Construction/ProjectIcon.js +0 -16
- package/dist/Icons/Construction/PropertyIcon.d.ts +0 -3
- package/dist/Icons/Construction/PropertyIcon.js +0 -16
- package/dist/Icons/Construction/SpaceIcon.d.ts +0 -3
- package/dist/Icons/Construction/SpaceIcon.js +0 -16
- package/dist/Icons/DocumentIcon.d.ts +0 -3
- package/dist/Icons/DocumentIcon.js +0 -16
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +0 -2
- package/dist/Icons/Entities/GenericEntityIcon.js +0 -17
- package/dist/Icons/Entities/HandshakeIcon.d.ts +0 -2
- package/dist/Icons/Entities/HandshakeIcon.js +0 -17
- package/dist/Widget.d.ts +0 -1
- package/dist/Widget.js +0 -61
- package/dist/constants/AYFFormStepTypes.d.ts +0 -9
- package/dist/constants/AYFFormStepTypes.js +0 -10
- package/dist/constants/CBRFormStepTypes.d.ts +0 -21
- package/dist/constants/CBRFormStepTypes.js +0 -22
- package/dist/constants/Files/FileExtensions.d.ts +0 -3
- package/dist/constants/Files/FileExtensions.js +0 -68
- package/dist/constants/Files/FileMaxSize.d.ts +0 -2
- package/dist/constants/Files/FileMaxSize.js +0 -2
- package/dist/constants/FormStepTypes.d.ts +0 -46
- package/dist/constants/FormStepTypes.js +0 -54
- package/dist/constants/IconTypes.d.ts +0 -10
- package/dist/constants/IconTypes.js +0 -11
- package/dist/constants/InternalFormStyle.d.ts +0 -3
- package/dist/constants/InternalFormStyle.js +0 -16
- package/dist/constants/MaterialClassNameSeed.d.ts +0 -1
- package/dist/constants/MaterialClassNameSeed.js +0 -1
- package/dist/controllers/FileService.d.ts +0 -5
- package/dist/controllers/FileService.js +0 -92
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -29
- package/dist/index.lib.d.ts +0 -7
- package/dist/index.lib.js +0 -5
- package/dist/index.module.css +0 -14
- package/dist/shared/InputIcon/InputIcon.d.ts +0 -7
- package/dist/shared/InputIcon/InputIcon.js +0 -81
- package/dist/shared/Loader/Loader.d.ts +0 -18
- package/dist/shared/Loader/Loader.js +0 -26
- package/dist/shared/Loader/Loader.module.css +0 -12
- package/dist/shared/Navbar/Navbar.d.ts +0 -9
- package/dist/shared/Navbar/Navbar.js +0 -18
- package/dist/shared/Navbar/Navbar.module.css +0 -18
- package/dist/shared/Rating/Rating.d.ts +0 -16
- package/dist/shared/Rating/Rating.js +0 -41
- package/dist/shared/Rating/Rating.module.css +0 -32
- package/dist/shared/Rating/Ratings/LikeRating.d.ts +0 -4
- package/dist/shared/Rating/Ratings/LikeRating.js +0 -43
- package/dist/shared/Rating/Ratings/SatisfactionRating.d.ts +0 -4
- package/dist/shared/Rating/Ratings/SatisfactionRating.js +0 -61
- package/dist/shared/Rating/Ratings/ScaleRating.d.ts +0 -4
- package/dist/shared/Rating/Ratings/ScaleRating.js +0 -63
- package/dist/shared/RoundedButton/RoundedButton.d.ts +0 -30
- package/dist/shared/RoundedButton/RoundedButton.js +0 -45
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +0 -24
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +0 -101
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +0 -48
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +0 -348
- package/dist/shared/RoundedSelect/RoundedSelect.d.ts +0 -68
- package/dist/shared/RoundedSelect/RoundedSelect.js +0 -214
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +0 -66
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +0 -234
- package/dist/shared/RoundedTextField/RoundedTextField.d.ts +0 -45
- package/dist/shared/RoundedTextField/RoundedTextField.js +0 -175
- package/dist/utils/CbrFunctions.d.ts +0 -8
- package/dist/utils/CbrFunctions.js +0 -53
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextFieldProps } from '@material-ui/core';
|
|
3
|
-
interface StyleProps {
|
|
4
|
-
/** The color of the outline when selected and hovered on */
|
|
5
|
-
focusColor?: string;
|
|
6
|
-
/** The color of the outline when it is not selected */
|
|
7
|
-
outlineColor?: string;
|
|
8
|
-
/** The color of the background */
|
|
9
|
-
backgroundColor?: string;
|
|
10
|
-
/** The color of the error to display */
|
|
11
|
-
errorColor?: string;
|
|
12
|
-
/** If the style should change on hover */
|
|
13
|
-
cantEdit?: boolean;
|
|
14
|
-
/** The hight of the container */
|
|
15
|
-
height?: string;
|
|
16
|
-
/** The color of the text in the form */
|
|
17
|
-
color?: string;
|
|
18
|
-
/** The fontsize of the content */
|
|
19
|
-
fontSize?: string;
|
|
20
|
-
/** The borderRadius of the input */
|
|
21
|
-
borderRadius?: number;
|
|
22
|
-
/** If input is readOnly */
|
|
23
|
-
readOnly?: boolean;
|
|
24
|
-
/** The weight of the font of the value and the placeholder */
|
|
25
|
-
fontWeight?: number | string;
|
|
26
|
-
/** The color of the helper text when not error */
|
|
27
|
-
helperTextColor?: string;
|
|
28
|
-
/** If custom icon exists and should be displayed */
|
|
29
|
-
showIcon?: boolean;
|
|
30
|
-
}
|
|
31
|
-
export interface RoundedSmartSelectProps extends Omit<TextFieldProps, 'color' | 'onFocus'>, StyleProps {
|
|
32
|
-
/** Currently selected value */
|
|
33
|
-
value: any;
|
|
34
|
-
/** The array of options to display */
|
|
35
|
-
options?: any[];
|
|
36
|
-
/** If the input is loading */
|
|
37
|
-
loading?: boolean;
|
|
38
|
-
/** function called when value changes */
|
|
39
|
-
handleUpdate?: (event: React.ChangeEvent<{
|
|
40
|
-
name?: string | undefined;
|
|
41
|
-
value: any;
|
|
42
|
-
}> | string, child?: React.ReactNode) => void;
|
|
43
|
-
/** Strig to place in the label */
|
|
44
|
-
label: string;
|
|
45
|
-
/** Minimum width in px of the component */
|
|
46
|
-
minWidth?: number;
|
|
47
|
-
/** The helper Text to display */
|
|
48
|
-
helperText?: string;
|
|
49
|
-
/** The margin around the selector */
|
|
50
|
-
containerMargin?: string;
|
|
51
|
-
/** The icon to display */
|
|
52
|
-
icon?: React.ReactNode;
|
|
53
|
-
/** If the options are searchable */
|
|
54
|
-
searchable?: boolean;
|
|
55
|
-
/** If can create new option */
|
|
56
|
-
creatable?: boolean;
|
|
57
|
-
/** Function to determine the currently selected option */
|
|
58
|
-
getOptionSelected?: (option: any, value: any) => boolean;
|
|
59
|
-
/** Function to determine the current value in string format */
|
|
60
|
-
getValueString?: (value: any) => string;
|
|
61
|
-
/** Function called on each value change */
|
|
62
|
-
changeListener?: (value: any) => void;
|
|
63
|
-
onFocus?: any;
|
|
64
|
-
}
|
|
65
|
-
export default function RoundedSmartSelect({ options, value, handleUpdate, label, getValueString, color, errorColor, focusColor, helperTextColor, outlineColor, backgroundColor, cantEdit, loading, height, fontSize, required, changeListener, error, getOptionSelected, helperText, readOnly, borderRadius, fontWeight, icon, searchable, containerMargin, showIcon, inputRef, disabled, creatable, onBlur, name, onFocus, }: RoundedSmartSelectProps): JSX.Element;
|
|
66
|
-
export {};
|
|
@@ -1,234 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
-
var t = {};
|
|
14
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
-
t[p] = s[p];
|
|
16
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
-
t[p[i]] = s[p[i]];
|
|
20
|
-
}
|
|
21
|
-
return t;
|
|
22
|
-
};
|
|
23
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
24
|
-
import Autocomplete, { createFilterOptions, } from '@material-ui/lab/Autocomplete';
|
|
25
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
26
|
-
import TextField from '@material-ui/core/TextField';
|
|
27
|
-
import { cloneElement } from 'react';
|
|
28
|
-
import { MenuItem, Popper } from '@material-ui/core';
|
|
29
|
-
import RoundedSelect from '../RoundedSelect/RoundedSelect';
|
|
30
|
-
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
31
|
-
var filter = createFilterOptions();
|
|
32
|
-
var useTextfieldStyles = function (props) {
|
|
33
|
-
return makeStyles(function () {
|
|
34
|
-
var _a, _b, _c;
|
|
35
|
-
return ({
|
|
36
|
-
root: {
|
|
37
|
-
borderRadius: props.borderRadius,
|
|
38
|
-
'& input, textarea': {
|
|
39
|
-
cursor: props.cantEdit ? 'default' : 'text',
|
|
40
|
-
fontWeight: props.fontWeight,
|
|
41
|
-
color: props.color,
|
|
42
|
-
fontSize: props.fontSize,
|
|
43
|
-
'&::placeholder': {
|
|
44
|
-
fontSize: props.fontSize,
|
|
45
|
-
},
|
|
46
|
-
backgroundColor: props.backgroundColor,
|
|
47
|
-
borderRadius: props.borderRadius,
|
|
48
|
-
height: props.height,
|
|
49
|
-
marginTop: '0px !important',
|
|
50
|
-
padding: '0px 38px 0px 12px !important',
|
|
51
|
-
},
|
|
52
|
-
'& .EF-MuiInputBase-root': {
|
|
53
|
-
padding: '0px !important',
|
|
54
|
-
pointerEvents: 'all',
|
|
55
|
-
},
|
|
56
|
-
'& label': {
|
|
57
|
-
marginTop: '-4px',
|
|
58
|
-
fontSize: props.fontSize,
|
|
59
|
-
color: ((_a = props.color) === null || _a === void 0 ? void 0 : _a.startsWith('#'))
|
|
60
|
-
? props.color + '8a'
|
|
61
|
-
: props.color,
|
|
62
|
-
whiteSpace: 'nowrap',
|
|
63
|
-
overflow: 'hidden',
|
|
64
|
-
textOverflow: 'ellipsis',
|
|
65
|
-
maxWidth: 'calc(100% - 22px)',
|
|
66
|
-
},
|
|
67
|
-
'& label.EF-MuiInputLabel-shrink': {
|
|
68
|
-
marginTop: '0px',
|
|
69
|
-
maxWidth: 'calc(100% - 5px)',
|
|
70
|
-
},
|
|
71
|
-
'& input + fieldset': {
|
|
72
|
-
borderRadius: props.borderRadius,
|
|
73
|
-
},
|
|
74
|
-
'& .EF-MuiInput-underline:after': {
|
|
75
|
-
borderBottomColor: props.outlineColor,
|
|
76
|
-
},
|
|
77
|
-
'& .EF-MuiOutlinedInput-root': {
|
|
78
|
-
borderRadius: props.borderRadius,
|
|
79
|
-
'&.Mui-focused fieldset': {
|
|
80
|
-
borderColor: props.focusColor,
|
|
81
|
-
borderWidth: props.readOnly ? 1 : 2,
|
|
82
|
-
},
|
|
83
|
-
'& .EF-MuiOutlinedInput-notchedOutline': {
|
|
84
|
-
borderColor: props.outlineColor,
|
|
85
|
-
},
|
|
86
|
-
height: props.height,
|
|
87
|
-
'& .EF-MuiAutocomplete-input': {
|
|
88
|
-
height: props.height,
|
|
89
|
-
marginTop: -10,
|
|
90
|
-
},
|
|
91
|
-
'& .EF-MuiAutocomplete-input::placeholder': {
|
|
92
|
-
color: '#787878',
|
|
93
|
-
opacity: 1,
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
'& .EF-MuiOutlinedInput-root:hover .EF-MuiOutlinedInput-notchedOutline': {
|
|
97
|
-
borderColor: props.cantEdit
|
|
98
|
-
? props.outlineColor
|
|
99
|
-
: props.focusColor,
|
|
100
|
-
},
|
|
101
|
-
'& label.Mui-focused': {
|
|
102
|
-
color: props.focusColor,
|
|
103
|
-
},
|
|
104
|
-
'& .Mui-error': {
|
|
105
|
-
color: props.errorColor + ' !important',
|
|
106
|
-
},
|
|
107
|
-
'& .EF-MuiFormHelperText-root': {
|
|
108
|
-
color: props.helperTextColor,
|
|
109
|
-
},
|
|
110
|
-
'& .EF-MuiFormHelperText-root.Mui-error': {
|
|
111
|
-
color: props.errorColor + ' !important',
|
|
112
|
-
},
|
|
113
|
-
'& .EF-MuiFormLabel-root.Mui-disabled': {
|
|
114
|
-
color: '#0000008a',
|
|
115
|
-
},
|
|
116
|
-
'& .EF-MuiOutlinedInput-notchedOutline': {
|
|
117
|
-
borderColor: '#0000003b',
|
|
118
|
-
},
|
|
119
|
-
'& .EF-MuiAutocomplete-popupIndicator': {
|
|
120
|
-
padding: 0,
|
|
121
|
-
color: ((_b = props.color) === null || _b === void 0 ? void 0 : _b.startsWith('#'))
|
|
122
|
-
? props.color + '8a'
|
|
123
|
-
: props.color,
|
|
124
|
-
},
|
|
125
|
-
'& .EF-MuiAutocomplete-popupIndicatorOpen': {
|
|
126
|
-
transform: props.showIcon ? 'none' : 'rotate(180deg)',
|
|
127
|
-
},
|
|
128
|
-
'& .EF-MuiAutocomplete-clearIndicator': {
|
|
129
|
-
display: 'none',
|
|
130
|
-
},
|
|
131
|
-
'& .EF-MuiAutocomplete-endAdornment': {
|
|
132
|
-
top: 'calc(50% - 13px)',
|
|
133
|
-
color: ((_c = props.color) === null || _c === void 0 ? void 0 : _c.startsWith('#'))
|
|
134
|
-
? props.color + '8a'
|
|
135
|
-
: props.color,
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
};
|
|
141
|
-
export default function RoundedSmartSelect(_a) {
|
|
142
|
-
var options = _a.options, _b = _a.value, value = _b === void 0 ? '' : _b, handleUpdate = _a.handleUpdate, label = _a.label, _c = _a.getValueString, getValueString = _c === void 0 ? function (value) { return value.value; } : _c, _d = _a.color, color = _d === void 0 ? '#293241' : _d, _e = _a.errorColor, errorColor = _e === void 0 ? '#cc2936' : _e, _f = _a.focusColor, focusColor = _f === void 0 ? '#3d5a7f' : _f, _g = _a.helperTextColor, helperTextColor = _g === void 0 ? '#989898' : _g, _h = _a.outlineColor, outlineColor = _h === void 0 ? '#b8b8b8' : _h, _j = _a.backgroundColor, backgroundColor = _j === void 0 ? '#ffffff' : _j, _k = _a.cantEdit, cantEdit = _k === void 0 ? false : _k, _l = _a.loading, loading = _l === void 0 ? false : _l, _m = _a.height, height = _m === void 0 ? '31px' : _m, _o = _a.fontSize, fontSize = _o === void 0 ? '1rem' : _o, required = _a.required, changeListener = _a.changeListener, error = _a.error, getOptionSelected = _a.getOptionSelected, helperText = _a.helperText, _p = _a.readOnly, readOnly = _p === void 0 ? false : _p, _q = _a.borderRadius, borderRadius = _q === void 0 ? 10 : _q, _r = _a.fontWeight, fontWeight = _r === void 0 ? '400' : _r, icon = _a.icon, _s = _a.searchable, searchable = _s === void 0 ? false : _s, _t = _a.containerMargin, containerMargin = _t === void 0 ? '0px' : _t, _u = _a.showIcon, showIcon = _u === void 0 ? true : _u, inputRef = _a.inputRef, disabled = _a.disabled, _v = _a.creatable, creatable = _v === void 0 ? false : _v, onBlur = _a.onBlur, name = _a.name, onFocus = _a.onFocus;
|
|
143
|
-
var props = {
|
|
144
|
-
color: color,
|
|
145
|
-
height: height,
|
|
146
|
-
errorColor: errorColor,
|
|
147
|
-
focusColor: focusColor,
|
|
148
|
-
outlineColor: outlineColor,
|
|
149
|
-
helperTextColor: helperTextColor,
|
|
150
|
-
backgroundColor: backgroundColor,
|
|
151
|
-
borderRadius: borderRadius,
|
|
152
|
-
readOnly: readOnly,
|
|
153
|
-
fontSize: fontSize,
|
|
154
|
-
fontWeight: fontWeight,
|
|
155
|
-
cantEdit: cantEdit,
|
|
156
|
-
showIcon: showIcon && icon !== undefined,
|
|
157
|
-
};
|
|
158
|
-
var textFieldClasses = useTextfieldStyles(props)();
|
|
159
|
-
if (searchable) {
|
|
160
|
-
return (_jsx(Autocomplete, { onFocus: onFocus, size: "small", fullWidth: true, openOnFocus: true, freeSolo: creatable, disabled: cantEdit || disabled, popupIcon: loading ? (_jsx(CircularProgress, { size: 22, style: { color: '#757575' } })) : showIcon && icon ? (icon) : undefined, onOpen: function () { }, loading: loading, loadingText: 'Cargando...', closeIcon: false, options: options !== null && options !== void 0 ? options : [], getOptionLabel: function (option) {
|
|
161
|
-
var _a, _b;
|
|
162
|
-
// Value selected with enter, right from the input
|
|
163
|
-
if (typeof option === 'string') {
|
|
164
|
-
return option;
|
|
165
|
-
}
|
|
166
|
-
else if (option === null || option === void 0 ? void 0 : option.inputValue) {
|
|
167
|
-
return (_a = option.inputValue) !== null && _a !== void 0 ? _a : '';
|
|
168
|
-
}
|
|
169
|
-
else {
|
|
170
|
-
// Regular option
|
|
171
|
-
return (_b = option.label) !== null && _b !== void 0 ? _b : '';
|
|
172
|
-
}
|
|
173
|
-
}, getOptionSelected: getOptionSelected, PopperComponent: function (_a) {
|
|
174
|
-
var style = _a.style, props = __rest(_a, ["style"]);
|
|
175
|
-
return (_jsx(Popper, __assign({}, props, { style: __assign(__assign({}, style), { zIndex: 1305 }) })));
|
|
176
|
-
}, value: value ? value : null, onChange: function (event, newValue) {
|
|
177
|
-
if (creatable) {
|
|
178
|
-
if (typeof newValue === 'string') {
|
|
179
|
-
changeListener === null || changeListener === void 0 ? void 0 : changeListener(newValue);
|
|
180
|
-
handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(newValue);
|
|
181
|
-
}
|
|
182
|
-
else if (newValue && newValue.inputValue) {
|
|
183
|
-
changeListener === null || changeListener === void 0 ? void 0 : changeListener(newValue.inputValue);
|
|
184
|
-
handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(newValue.inputValue); // Create a new value from the user input
|
|
185
|
-
}
|
|
186
|
-
else {
|
|
187
|
-
changeListener === null || changeListener === void 0 ? void 0 : changeListener(newValue === null || newValue === void 0 ? void 0 : newValue.label);
|
|
188
|
-
handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(newValue === null || newValue === void 0 ? void 0 : newValue.label);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
changeListener === null || changeListener === void 0 ? void 0 : changeListener(newValue);
|
|
193
|
-
handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(newValue);
|
|
194
|
-
}
|
|
195
|
-
}, filterOptions: function (options, params) {
|
|
196
|
-
if (value && value.label === (params === null || params === void 0 ? void 0 : params.inputValue)) {
|
|
197
|
-
return options;
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
var filtered = filter(options, params);
|
|
201
|
-
// Suggest the creation of a new value
|
|
202
|
-
if (creatable && params.inputValue !== '') {
|
|
203
|
-
filtered.push({
|
|
204
|
-
inputValue: params.inputValue,
|
|
205
|
-
label: "Crear \"".concat(params.inputValue, "\""),
|
|
206
|
-
});
|
|
207
|
-
}
|
|
208
|
-
return filtered;
|
|
209
|
-
}
|
|
210
|
-
}, renderOption: function (option) {
|
|
211
|
-
return typeof option === 'string' ? option : option.label;
|
|
212
|
-
}, renderInput: function (params) { return (_jsx(TextField, __assign({ classes: textFieldClasses }, params, { inputRef: inputRef, onBlur: onBlur, name: name, variant: "outlined", label: label, required: required, error: error, helperText: helperText }))); }, style: { pointerEvents: 'none' }, noOptionsText: "No hay opciones" }));
|
|
213
|
-
}
|
|
214
|
-
else {
|
|
215
|
-
return (_jsxs(RoundedSelect, __assign({ onBlur: onBlur, onFocus: onFocus, inputRef: inputRef, name: name, fullWidth: true, handleUpdate: function (event) {
|
|
216
|
-
handleUpdate === null || handleUpdate === void 0 ? void 0 : handleUpdate(options === null || options === void 0 ? void 0 : options.find(function (option) {
|
|
217
|
-
return getValueString(option) == event.target.value;
|
|
218
|
-
}));
|
|
219
|
-
}, onOpen: function () {
|
|
220
|
-
//Show loading icon if loading
|
|
221
|
-
}, value: getValueString(value), color: color, errorColor: errorColor, focusColor: focusColor, helperTextColor: helperTextColor, backgroundColor: backgroundColor, outlineColor: outlineColor, cantEdit: cantEdit, disabled: cantEdit || disabled, label: label, required: required, readOnly: readOnly, helperText: helperText, containerMargin: containerMargin, height: height, fontSize: fontSize, error: error, iconComponent: loading
|
|
222
|
-
? function () { return (_jsx("div", __assign({ style: {
|
|
223
|
-
marginTop: 3,
|
|
224
|
-
marginRight: 8,
|
|
225
|
-
} }, { children: _jsx(CircularProgress, { size: 22, style: {
|
|
226
|
-
color: '#757575',
|
|
227
|
-
} }) }))); }
|
|
228
|
-
: showIcon && icon
|
|
229
|
-
? function (props) {
|
|
230
|
-
return cloneElement(icon, props);
|
|
231
|
-
}
|
|
232
|
-
: undefined, showIcon: showIcon }, { children: [_jsx(MenuItem, __assign({ value: '', style: { whiteSpace: 'normal' } }, { children: _jsx("em", { children: options ? 'Sin Seleccionar' : 'Cargando...' }) }), 'EMPTY'), options === null || options === void 0 ? void 0 : options.map(function (option) { return (_jsx(MenuItem, __assign({ value: getValueString(option), style: { whiteSpace: 'normal' } }, { children: option.label }), getValueString(option))); })] })));
|
|
233
|
-
}
|
|
234
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextFieldProps } from '@material-ui/core/TextField';
|
|
3
|
-
interface StyleProps {
|
|
4
|
-
/** The color of the text */
|
|
5
|
-
textColor?: string;
|
|
6
|
-
/** The color of the outline when selected and hovered on */
|
|
7
|
-
focusColor?: string;
|
|
8
|
-
/** The color of the error to display */
|
|
9
|
-
errorColor?: string;
|
|
10
|
-
/** The color of the outline when it is not selected */
|
|
11
|
-
outlineColor?: string;
|
|
12
|
-
/** The backgroundColor of the input */
|
|
13
|
-
backgroundColor?: string;
|
|
14
|
-
/** The borderRadius of the input */
|
|
15
|
-
borderRadius?: number;
|
|
16
|
-
/** If input is readOnly */
|
|
17
|
-
readOnly?: boolean;
|
|
18
|
-
/** The padding of the input */
|
|
19
|
-
padding?: string;
|
|
20
|
-
/** The size of the font to display the input in */
|
|
21
|
-
fontSize?: number | string;
|
|
22
|
-
/** The weight of the font of the value and the placeholder */
|
|
23
|
-
fontWeight?: number | string;
|
|
24
|
-
/** If the input is multiline */
|
|
25
|
-
multiline?: boolean;
|
|
26
|
-
/** Cant edit */
|
|
27
|
-
cantEdit?: boolean;
|
|
28
|
-
/** The color of the helper text when not error */
|
|
29
|
-
helperTextColor?: string;
|
|
30
|
-
/** The icon to display */
|
|
31
|
-
icon?: React.ReactNode;
|
|
32
|
-
/** The max length of the string */
|
|
33
|
-
maxLength?: number;
|
|
34
|
-
}
|
|
35
|
-
interface RoundedTextFieldProps extends StyleProps {
|
|
36
|
-
/** The value of the textfield */
|
|
37
|
-
value?: any;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
|
|
41
|
-
*/
|
|
42
|
-
declare class RoundedTextField extends React.Component<RoundedTextFieldProps & TextFieldProps> {
|
|
43
|
-
render(): JSX.Element;
|
|
44
|
-
}
|
|
45
|
-
export default RoundedTextField;
|
|
@@ -1,175 +0,0 @@
|
|
|
1
|
-
var __extends = (this && this.__extends) || (function () {
|
|
2
|
-
var extendStatics = function (d, b) {
|
|
3
|
-
extendStatics = Object.setPrototypeOf ||
|
|
4
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
-
return extendStatics(d, b);
|
|
7
|
-
};
|
|
8
|
-
return function (d, b) {
|
|
9
|
-
if (typeof b !== "function" && b !== null)
|
|
10
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
-
extendStatics(d, b);
|
|
12
|
-
function __() { this.constructor = d; }
|
|
13
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
-
};
|
|
15
|
-
})();
|
|
16
|
-
var __assign = (this && this.__assign) || function () {
|
|
17
|
-
__assign = Object.assign || function(t) {
|
|
18
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
19
|
-
s = arguments[i];
|
|
20
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
21
|
-
t[p] = s[p];
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
};
|
|
25
|
-
return __assign.apply(this, arguments);
|
|
26
|
-
};
|
|
27
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
28
|
-
var t = {};
|
|
29
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
30
|
-
t[p] = s[p];
|
|
31
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
32
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
33
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
34
|
-
t[p[i]] = s[p[i]];
|
|
35
|
-
}
|
|
36
|
-
return t;
|
|
37
|
-
};
|
|
38
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
39
|
-
import React from 'react';
|
|
40
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
41
|
-
import TextField from '@material-ui/core/TextField';
|
|
42
|
-
var useTextfieldStyles = function (props) {
|
|
43
|
-
return makeStyles(function () { return ({
|
|
44
|
-
root: {
|
|
45
|
-
borderRadius: props.borderRadius,
|
|
46
|
-
'& input, textarea': {
|
|
47
|
-
cursor: props.cantEdit ? 'default' : 'text',
|
|
48
|
-
padding: props.multiline ? props.padding : props.padding,
|
|
49
|
-
fontWeight: props.fontWeight,
|
|
50
|
-
color: props.textColor,
|
|
51
|
-
fontSize: props.fontSize,
|
|
52
|
-
'&::placeholder': {
|
|
53
|
-
fontSize: props.fontSize,
|
|
54
|
-
},
|
|
55
|
-
backgroundColor: props.backgroundColor,
|
|
56
|
-
borderRadius: props.borderRadius,
|
|
57
|
-
},
|
|
58
|
-
'& label': {
|
|
59
|
-
marginTop: props.multiline ? '0px' : '-4px',
|
|
60
|
-
fontSize: props.fontSize,
|
|
61
|
-
color: props.textColor + '8a',
|
|
62
|
-
whiteSpace: 'nowrap',
|
|
63
|
-
overflow: 'hidden',
|
|
64
|
-
textOverflow: 'ellipsis',
|
|
65
|
-
maxWidth: 'calc(100% - 22px)',
|
|
66
|
-
},
|
|
67
|
-
'& label.EF-MuiInputLabel-shrink': {
|
|
68
|
-
marginTop: '0px',
|
|
69
|
-
maxWidth: 'calc(100% - 5px)',
|
|
70
|
-
},
|
|
71
|
-
'& input + fieldset': {
|
|
72
|
-
borderRadius: props.borderRadius,
|
|
73
|
-
},
|
|
74
|
-
'& .EF-MuiInput-underline:after': {
|
|
75
|
-
borderBottomColor: props.outlineColor,
|
|
76
|
-
},
|
|
77
|
-
'& .EF-MuiOutlinedInput-root': {
|
|
78
|
-
borderRadius: props.borderRadius,
|
|
79
|
-
'&.Mui-focused fieldset': {
|
|
80
|
-
borderColor: props.focusColor,
|
|
81
|
-
borderWidth: props.readOnly ? 1 : 2,
|
|
82
|
-
},
|
|
83
|
-
'& .EF-MuiOutlinedInput-notchedOutline': {
|
|
84
|
-
borderColor: props.outlineColor,
|
|
85
|
-
'& legend': {
|
|
86
|
-
fontSize: 'calc(' + props.fontSize + ' * 0.75)',
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
},
|
|
90
|
-
'& .EF-MuiOutlinedInput-root:hover .EF-MuiOutlinedInput-notchedOutline': {
|
|
91
|
-
borderColor: props.cantEdit
|
|
92
|
-
? props.outlineColor
|
|
93
|
-
: props.focusColor,
|
|
94
|
-
},
|
|
95
|
-
'& label.Mui-focused': {
|
|
96
|
-
color: props.focusColor,
|
|
97
|
-
},
|
|
98
|
-
'& .Mui-error': {
|
|
99
|
-
color: props.errorColor,
|
|
100
|
-
},
|
|
101
|
-
'& .EF-MuiOutlinedInput-adornedEnd': {
|
|
102
|
-
paddingRight: '7px',
|
|
103
|
-
},
|
|
104
|
-
'& .EF-MuiFormHelperText-root': {
|
|
105
|
-
color: props.helperTextColor,
|
|
106
|
-
marginRight: props.maxLength ? 40 : 14,
|
|
107
|
-
},
|
|
108
|
-
'& .EF-MuiFormHelperText-root.Mui-error': {
|
|
109
|
-
color: props.errorColor,
|
|
110
|
-
},
|
|
111
|
-
'& .EF-MuiOutlinedInput-multiline': {
|
|
112
|
-
padding: 0,
|
|
113
|
-
backgroundColor: props.backgroundColor,
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
}); });
|
|
117
|
-
};
|
|
118
|
-
function CustomTextfield(_a) {
|
|
119
|
-
var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.helperTextColor, helperTextColor = _c === void 0 ? '#989898' : _c, _d = _a.outlineColor, outlineColor = _d === void 0 ? '#0000003b' : _d, _e = _a.backgroundColor, backgroundColor = _e === void 0 ? 'white' : _e, _f = _a.textColor, textColor = _f === void 0 ? '#293241' : _f, _g = _a.readOnly, readOnly = _g === void 0 ? false : _g, _h = _a.borderRadius, borderRadius = _h === void 0 ? 10 : _h, _j = _a.padding, padding = _j === void 0 ? '6px 12px' : _j, _k = _a.fontSize, fontSize = _k === void 0 ? '1rem' : _k, _l = _a.errorColor, errorColor = _l === void 0 ? '#cc2936' : _l, _m = _a.fontWeight, fontWeight = _m === void 0 ? '300' : _m, _o = _a.multiline, multiline = _o === void 0 ? false : _o, _p = _a.cantEdit, cantEdit = _p === void 0 ? false : _p, maxLength = _a.maxLength, value = _a.value, icon = _a.icon, others = __rest(_a, ["focusColor", "helperTextColor", "outlineColor", "backgroundColor", "textColor", "readOnly", "borderRadius", "padding", "fontSize", "errorColor", "fontWeight", "multiline", "cantEdit", "maxLength", "value", "icon"]);
|
|
120
|
-
var classes = useTextfieldStyles({
|
|
121
|
-
padding: padding,
|
|
122
|
-
textColor: textColor,
|
|
123
|
-
errorColor: errorColor,
|
|
124
|
-
focusColor: focusColor,
|
|
125
|
-
outlineColor: outlineColor,
|
|
126
|
-
helperTextColor: helperTextColor,
|
|
127
|
-
backgroundColor: backgroundColor,
|
|
128
|
-
borderRadius: borderRadius,
|
|
129
|
-
readOnly: readOnly,
|
|
130
|
-
fontSize: fontSize,
|
|
131
|
-
fontWeight: fontWeight,
|
|
132
|
-
multiline: multiline,
|
|
133
|
-
cantEdit: cantEdit,
|
|
134
|
-
maxLength: maxLength,
|
|
135
|
-
})();
|
|
136
|
-
var length = maxLength ? value.length : null;
|
|
137
|
-
var inputProps = {
|
|
138
|
-
readOnly: readOnly,
|
|
139
|
-
disabled: cantEdit,
|
|
140
|
-
endAdornment: icon,
|
|
141
|
-
};
|
|
142
|
-
if (maxLength) {
|
|
143
|
-
inputProps.inputProps = { maxLength: maxLength };
|
|
144
|
-
}
|
|
145
|
-
return (_jsxs("div", __assign({ style: { position: 'relative', width: '100%', maxWidth: '100%' } }, { children: [_jsx(TextField, __assign({ classes: classes }, others, { value: value !== null && value !== void 0 ? value : '', multiline: multiline, variant: "outlined", size: "small", fullWidth: true, InputProps: inputProps })), length !== null && (_jsxs("div", __assign({ style: others.helperText
|
|
146
|
-
? {
|
|
147
|
-
position: 'absolute',
|
|
148
|
-
bottom: '3px',
|
|
149
|
-
right: '8px',
|
|
150
|
-
fontSize: '12px',
|
|
151
|
-
color: helperTextColor,
|
|
152
|
-
}
|
|
153
|
-
: {
|
|
154
|
-
fontSize: '12px',
|
|
155
|
-
color: helperTextColor,
|
|
156
|
-
textAlign: 'right',
|
|
157
|
-
paddingRight: '8px',
|
|
158
|
-
paddingTop: '2px',
|
|
159
|
-
paddingBottom: '2px',
|
|
160
|
-
} }, { children: [length, "/", maxLength] })))] })));
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
|
|
164
|
-
*/
|
|
165
|
-
var RoundedTextField = /** @class */ (function (_super) {
|
|
166
|
-
__extends(RoundedTextField, _super);
|
|
167
|
-
function RoundedTextField() {
|
|
168
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
169
|
-
}
|
|
170
|
-
RoundedTextField.prototype.render = function () {
|
|
171
|
-
return _jsx(CustomTextfield, __assign({}, this.props));
|
|
172
|
-
};
|
|
173
|
-
return RoundedTextField;
|
|
174
|
-
}(React.Component));
|
|
175
|
-
export default RoundedTextField;
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
var __assign = (this && this.__assign) || function () {
|
|
2
|
-
__assign = Object.assign || function(t) {
|
|
3
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
-
s = arguments[i];
|
|
5
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
-
t[p] = s[p];
|
|
7
|
-
}
|
|
8
|
-
return t;
|
|
9
|
-
};
|
|
10
|
-
return __assign.apply(this, arguments);
|
|
11
|
-
};
|
|
12
|
-
import CBRFormStepTypes from '../constants/CBRFormStepTypes';
|
|
13
|
-
export var calcCbrForm = function (form, formValues) {
|
|
14
|
-
var _a;
|
|
15
|
-
for (var _i = 0, _b = Object.values(form.steps); _i < _b.length; _i++) {
|
|
16
|
-
var step = _b[_i];
|
|
17
|
-
if (step.type === CBRFormStepTypes.CBR_INCIDENCIAS) {
|
|
18
|
-
var incidentStep = step;
|
|
19
|
-
var incValue = formValues[(_a = incidentStep.id) !== null && _a !== void 0 ? _a : ''];
|
|
20
|
-
if (incValue) {
|
|
21
|
-
for (var _c = 0, incValue_1 = incValue; _c < incValue_1.length; _c++) {
|
|
22
|
-
var incident = incValue_1[_c];
|
|
23
|
-
handleAddIncident(incident, incidentStep, form.steps, formValues);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
return form;
|
|
29
|
-
};
|
|
30
|
-
var handleAddIncident = function (incident, step, steps, formValues) {
|
|
31
|
-
var _a, _b;
|
|
32
|
-
var spaceStep = __assign(__assign({}, step.spaceStep), { id: incident.idSpaceStep, type: CBRFormStepTypes.CBR_TIPO_ESPACIO, dependencies: step.dependencies });
|
|
33
|
-
steps[incident.idSpaceStep] = spaceStep;
|
|
34
|
-
var commentStep = __assign(__assign({}, step.commentStep), { id: incident.idCommentStep, type: CBRFormStepTypes.CBR_COMENTARIO });
|
|
35
|
-
steps[incident.idCommentStep] = commentStep;
|
|
36
|
-
addRecursiveElementStep(incident.idElementStep, step.elementStep, null, steps, (_b = (_a = step.dependencies) === null || _a === void 0 ? void 0 : _a[0]) !== null && _b !== void 0 ? _b : '', formValues);
|
|
37
|
-
};
|
|
38
|
-
var addRecursiveElementStep = function (idStep, step, idParent, steps, idProjectDep, formValues) {
|
|
39
|
-
var _a, _b, _c;
|
|
40
|
-
var idSubStep = (_a = formValues[idStep]) === null || _a === void 0 ? void 0 : _a.subStep;
|
|
41
|
-
var newSubStep = step.subStep ? __assign({}, step.subStep) : undefined;
|
|
42
|
-
var newStep = __assign(__assign({}, step), { id: idStep, type: CBRFormStepTypes.CBR_LOCATIVAS, dependencies: [idProjectDep], subStep: null });
|
|
43
|
-
if (newSubStep) {
|
|
44
|
-
newStep.subStep = idSubStep;
|
|
45
|
-
}
|
|
46
|
-
if (idParent) {
|
|
47
|
-
(_c = (_b = newStep.dependencies) === null || _b === void 0 ? void 0 : _b.push) === null || _c === void 0 ? void 0 : _c.call(_b, idParent);
|
|
48
|
-
}
|
|
49
|
-
steps[idStep] = newStep;
|
|
50
|
-
if (newSubStep) {
|
|
51
|
-
addRecursiveElementStep(idSubStep, newSubStep, idStep, steps, idProjectDep, formValues);
|
|
52
|
-
}
|
|
53
|
-
};
|