@arquimedes.co/eureka-forms 1.9.72-test → 1.9.74-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 -135
- 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 -55
- package/dist/App.js +0 -469
- 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 -6
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +0 -369
- 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 -9
- package/dist/FormComponents/Step/MapperStep/MapperStep.js +0 -35
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +0 -9
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +0 -38
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +0 -60
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.d.ts +0 -16
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.js +0 -30
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.module.css +0 -60
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +0 -14
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +0 -242
- 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 -45
- package/dist/constants/FormStepTypes.js +0 -53
- 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,348 +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 } from "react/jsx-runtime";
|
|
39
|
-
import React, { cloneElement } from 'react';
|
|
40
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
41
|
-
import CalendarTodayRoundedIcon from '@material-ui/icons/CalendarTodayRounded';
|
|
42
|
-
import { DatePicker, DateTimePicker, } from '@material-ui/pickers';
|
|
43
|
-
import { getLocale } from '../../FormComponents/Form/Form';
|
|
44
|
-
import { format } from 'date-fns';
|
|
45
|
-
var useDatePickerStyles = function (props) {
|
|
46
|
-
return makeStyles(function () { return ({
|
|
47
|
-
root: {
|
|
48
|
-
borderRadius: props.borderRadius,
|
|
49
|
-
cursor: props.cantEdit ? 'default' : 'pointer',
|
|
50
|
-
height: props.height,
|
|
51
|
-
'& input, textarea': {
|
|
52
|
-
cursor: props.cantEdit ? 'default' : 'pointer',
|
|
53
|
-
padding: props.padding,
|
|
54
|
-
fontWeight: props.fontWeight,
|
|
55
|
-
color: props.textColor,
|
|
56
|
-
fontSize: props.fontSize,
|
|
57
|
-
'&::placeholder': {
|
|
58
|
-
fontSize: props.fontSize,
|
|
59
|
-
},
|
|
60
|
-
backgroundColor: props.backgroundColor,
|
|
61
|
-
borderRadius: props.borderRadius,
|
|
62
|
-
},
|
|
63
|
-
'& .EF-MuiOutlinedInput-notchedOutline': {
|
|
64
|
-
borderColor: props.outlineColor,
|
|
65
|
-
'& span': {
|
|
66
|
-
fontSize: '0.75rem',
|
|
67
|
-
},
|
|
68
|
-
},
|
|
69
|
-
'&.Mui-error .EF-MuiOutlinedInput-notchedOutline': {
|
|
70
|
-
borderColor: props.outlineColor,
|
|
71
|
-
},
|
|
72
|
-
'&.Mui-focused .EF-MuiOutlinedInput-notchedOutline': {
|
|
73
|
-
borderColor: props.focusColor,
|
|
74
|
-
borderWidth: 2,
|
|
75
|
-
},
|
|
76
|
-
'&:hover .EF-MuiOutlinedInput-notchedOutline': {
|
|
77
|
-
borderColor: props.cantEdit
|
|
78
|
-
? props.outlineColor
|
|
79
|
-
: props.focusColor,
|
|
80
|
-
},
|
|
81
|
-
'& .EF-MuiInputAdornment-root': {
|
|
82
|
-
width: 5,
|
|
83
|
-
'& button': {
|
|
84
|
-
marginLeft: -25,
|
|
85
|
-
fontSize: 18,
|
|
86
|
-
padding: 16,
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
'&.Erk-MuiOutlinedInput-adornedEnd': {
|
|
90
|
-
paddingRight: 11,
|
|
91
|
-
},
|
|
92
|
-
'& .Mui-error': {
|
|
93
|
-
color: props.errorColor,
|
|
94
|
-
},
|
|
95
|
-
'&.Mui-disabled': {
|
|
96
|
-
cursor: 'default',
|
|
97
|
-
},
|
|
98
|
-
},
|
|
99
|
-
}); });
|
|
100
|
-
};
|
|
101
|
-
var useDatePickerLabelStyles = function (props) {
|
|
102
|
-
return makeStyles(function () { return ({
|
|
103
|
-
root: {
|
|
104
|
-
whiteSpace: 'nowrap',
|
|
105
|
-
overflow: 'hidden',
|
|
106
|
-
maxWidth: 'calc(100% - 50px)',
|
|
107
|
-
marginTop: props.height != '40px' ? '-4px' : '0px',
|
|
108
|
-
textOverflow: 'ellipsis',
|
|
109
|
-
fontSize: props.fontSize,
|
|
110
|
-
color: props.textColor + '8a',
|
|
111
|
-
'&.Mui-focused': {
|
|
112
|
-
color: props.focusColor,
|
|
113
|
-
},
|
|
114
|
-
'&.EF-MuiInputLabel-shrink': {
|
|
115
|
-
marginTop: '0px',
|
|
116
|
-
maxWidth: 'calc(100% - 5px)',
|
|
117
|
-
},
|
|
118
|
-
'& .Mui-error': {
|
|
119
|
-
color: props.errorColor,
|
|
120
|
-
},
|
|
121
|
-
'&.Mui-error': {
|
|
122
|
-
color: props.errorColor,
|
|
123
|
-
},
|
|
124
|
-
},
|
|
125
|
-
}); });
|
|
126
|
-
};
|
|
127
|
-
var useDatePickerHelperTextStyles = function (props) {
|
|
128
|
-
return makeStyles(function () { return ({
|
|
129
|
-
root: {
|
|
130
|
-
color: props.helperTextColor,
|
|
131
|
-
'&.Mui-error': {
|
|
132
|
-
color: props.errorColor,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
}); });
|
|
136
|
-
};
|
|
137
|
-
var useDatePickerDialogStyles = function (props) {
|
|
138
|
-
return makeStyles(function () { return ({
|
|
139
|
-
datePicker: {
|
|
140
|
-
'& .EF-MuiPickersModal-dialogRoot': {
|
|
141
|
-
color: props.textColor,
|
|
142
|
-
'& .EF-MuiDialogActions-root': {
|
|
143
|
-
'& .EF-MuiButton-root:hover': {
|
|
144
|
-
backgroundColor: props.hoverColor,
|
|
145
|
-
},
|
|
146
|
-
'& .EF-MuiButton-label': {
|
|
147
|
-
color: props.focusColor,
|
|
148
|
-
},
|
|
149
|
-
'& .EF-MuiTouchRipple-root': {
|
|
150
|
-
color: props.focusColor,
|
|
151
|
-
},
|
|
152
|
-
},
|
|
153
|
-
},
|
|
154
|
-
//Days labels
|
|
155
|
-
'& .EF-MuiPickersDay-day': {
|
|
156
|
-
color: props.textColor,
|
|
157
|
-
},
|
|
158
|
-
// Selected day label
|
|
159
|
-
'& .EF-MuiPickersDay-daySelected': {
|
|
160
|
-
color: props.backgroundColor,
|
|
161
|
-
backgroundColor: props.focusColor,
|
|
162
|
-
},
|
|
163
|
-
//Title
|
|
164
|
-
'& .EF-MuiPickersDatePickerRoot-toolbar': {
|
|
165
|
-
color: props.backgroundColor,
|
|
166
|
-
backgroundColor: props.focusColor,
|
|
167
|
-
},
|
|
168
|
-
//Title
|
|
169
|
-
'& .EF-MuiPickersToolbar-toolbar': {
|
|
170
|
-
color: props.backgroundColor,
|
|
171
|
-
backgroundColor: props.focusColor,
|
|
172
|
-
},
|
|
173
|
-
'& .EF-MuiPickerDTTabs-tabs': {
|
|
174
|
-
color: props.backgroundColor,
|
|
175
|
-
backgroundColor: props.focusColor,
|
|
176
|
-
},
|
|
177
|
-
'& .EF-MuiPickersYear-yearSelected, .EF-MuiPickersYear-root:focus': {
|
|
178
|
-
color: props.focusColor,
|
|
179
|
-
},
|
|
180
|
-
'& .EF-MuiTabs-indicator': {
|
|
181
|
-
backgroundColor: props.contrastColor,
|
|
182
|
-
},
|
|
183
|
-
'& .EF-MuiPickersClockNumber-clockNumber': {
|
|
184
|
-
color: props.accentColor,
|
|
185
|
-
},
|
|
186
|
-
'& .EF-MuiPickersClockNumber-clockNumberSelected': {
|
|
187
|
-
color: props.backgroundColor,
|
|
188
|
-
},
|
|
189
|
-
'& .EF-MuiPickersClock-pin, .EF-MuiPickersClockPointer-pointer': {
|
|
190
|
-
backgroundColor: props.focusColor,
|
|
191
|
-
},
|
|
192
|
-
'& .EF-MuiPickersClockPointer-noPoint': {
|
|
193
|
-
backgroundColor: props.focusColor,
|
|
194
|
-
},
|
|
195
|
-
'& .EF-MuiPickersClockPointer-thumb': {
|
|
196
|
-
borderColor: props.focusColor,
|
|
197
|
-
},
|
|
198
|
-
'& .EF-MuiPickersDay-dayDisabled': {
|
|
199
|
-
color: 'rgba(0, 0, 0, 0.38)',
|
|
200
|
-
pointerEvents: 'all',
|
|
201
|
-
},
|
|
202
|
-
'& .EF-MuiPickersDay-current': {
|
|
203
|
-
color: props.backgroundColor,
|
|
204
|
-
backgroundColor: props.secondaryColor,
|
|
205
|
-
},
|
|
206
|
-
'& .EF-MuiPickersDay-hidden': {
|
|
207
|
-
opacity: 0.4,
|
|
208
|
-
pointerEvents: 'none',
|
|
209
|
-
},
|
|
210
|
-
'& .EF-MuiPickersDay-hidden.EF-MuiPickersDay-current': {
|
|
211
|
-
opacity: 0.8,
|
|
212
|
-
pointerEvents: 'none',
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
}); });
|
|
216
|
-
};
|
|
217
|
-
function CustomDatePicker(_a) {
|
|
218
|
-
var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.secondaryColor, secondaryColor = _c === void 0 ? '#98c1d9' : _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.contrastColor, contrastColor = _g === void 0 ? '#ee6c4d' : _g, _h = _a.accentColor, accentColor = _h === void 0 ? '#293241' : _h, _j = _a.errorColor, errorColor = _j === void 0 ? '#cc2936' : _j, _k = _a.borderRadius, borderRadius = _k === void 0 ? 10 : _k, _l = _a.padding, padding = _l === void 0 ? '6px 0px 6px 12px' : _l, _m = _a.fontSize, fontSize = _m === void 0 ? '1rem' : _m, _o = _a.shrunkenFontSize, shrunkenFontSize = _o === void 0 ? '1rem' : _o, _p = _a.helperTextColor, helperTextColor = _p === void 0 ? '#989898' : _p, _q = _a.fontWeight, fontWeight = _q === void 0 ? '300' : _q, _r = _a.height, height = _r === void 0 ? '31px' : _r, _s = _a.cantEdit, cantEdit = _s === void 0 ? false : _s, _t = _a.pickTime, pickTime = _t === void 0 ? false : _t, onChange = _a.onChange, required = _a.required, others = __rest(_a, ["focusColor", "secondaryColor", "outlineColor", "backgroundColor", "textColor", "contrastColor", "accentColor", "errorColor", "borderRadius", "padding", "fontSize", "shrunkenFontSize", "helperTextColor", "fontWeight", "height", "cantEdit", "pickTime", "onChange", "required"]);
|
|
219
|
-
var classes = useDatePickerStyles({
|
|
220
|
-
padding: padding,
|
|
221
|
-
cantEdit: cantEdit,
|
|
222
|
-
textColor: textColor,
|
|
223
|
-
focusColor: focusColor,
|
|
224
|
-
hoverColor: focusColor + '0a',
|
|
225
|
-
outlineColor: outlineColor,
|
|
226
|
-
errorColor: errorColor,
|
|
227
|
-
backgroundColor: backgroundColor,
|
|
228
|
-
borderRadius: borderRadius,
|
|
229
|
-
fontSize: fontSize,
|
|
230
|
-
shrunkenFontSize: shrunkenFontSize,
|
|
231
|
-
fontWeight: fontWeight,
|
|
232
|
-
helperTextColor: helperTextColor,
|
|
233
|
-
height: height,
|
|
234
|
-
})();
|
|
235
|
-
var labelClasses = useDatePickerLabelStyles({
|
|
236
|
-
padding: padding,
|
|
237
|
-
cantEdit: cantEdit,
|
|
238
|
-
textColor: textColor,
|
|
239
|
-
focusColor: focusColor,
|
|
240
|
-
hoverColor: focusColor + '0a',
|
|
241
|
-
errorColor: errorColor,
|
|
242
|
-
outlineColor: outlineColor,
|
|
243
|
-
backgroundColor: backgroundColor,
|
|
244
|
-
borderRadius: borderRadius,
|
|
245
|
-
fontSize: fontSize,
|
|
246
|
-
shrunkenFontSize: shrunkenFontSize,
|
|
247
|
-
fontWeight: fontWeight,
|
|
248
|
-
helperTextColor: helperTextColor,
|
|
249
|
-
height: height,
|
|
250
|
-
})();
|
|
251
|
-
var datePicker = useDatePickerDialogStyles({
|
|
252
|
-
padding: padding,
|
|
253
|
-
cantEdit: cantEdit,
|
|
254
|
-
textColor: textColor,
|
|
255
|
-
secondaryColor: secondaryColor,
|
|
256
|
-
accentColor: accentColor,
|
|
257
|
-
contrastColor: contrastColor,
|
|
258
|
-
focusColor: focusColor,
|
|
259
|
-
hoverColor: focusColor + '0a',
|
|
260
|
-
errorColor: errorColor,
|
|
261
|
-
outlineColor: outlineColor,
|
|
262
|
-
backgroundColor: backgroundColor,
|
|
263
|
-
borderRadius: borderRadius,
|
|
264
|
-
fontSize: fontSize,
|
|
265
|
-
shrunkenFontSize: shrunkenFontSize,
|
|
266
|
-
fontWeight: fontWeight,
|
|
267
|
-
helperTextColor: helperTextColor,
|
|
268
|
-
height: height,
|
|
269
|
-
})().datePicker;
|
|
270
|
-
var helperTextStyles = useDatePickerHelperTextStyles({
|
|
271
|
-
padding: padding,
|
|
272
|
-
textColor: textColor,
|
|
273
|
-
focusColor: focusColor,
|
|
274
|
-
errorColor: errorColor,
|
|
275
|
-
outlineColor: outlineColor,
|
|
276
|
-
backgroundColor: backgroundColor,
|
|
277
|
-
borderRadius: borderRadius,
|
|
278
|
-
fontSize: fontSize,
|
|
279
|
-
shrunkenFontSize: shrunkenFontSize,
|
|
280
|
-
fontWeight: fontWeight,
|
|
281
|
-
helperTextColor: helperTextColor,
|
|
282
|
-
height: height,
|
|
283
|
-
})();
|
|
284
|
-
if (pickTime) {
|
|
285
|
-
return (_jsx(DateTimePicker, __assign({}, others, { inputVariant: "outlined", size: "small", disabled: cantEdit, fullWidth: true, onChange: onChange, placeholder: format(new Date(), 'Pp', { locale: getLocale() }), format: "Pp", required: required, InputLabelProps: { classes: labelClasses }, DialogProps: {
|
|
286
|
-
disableEnforceFocus: true,
|
|
287
|
-
className: datePicker,
|
|
288
|
-
cancelLabel: '',
|
|
289
|
-
} //Fixes the typescript declaration of the library: https://material-ui-pickers.dev/api/KeyboardDatePicker
|
|
290
|
-
, InputProps: {
|
|
291
|
-
required: required,
|
|
292
|
-
classes: classes,
|
|
293
|
-
disabled: cantEdit,
|
|
294
|
-
endAdornment: (_jsx(CalendarTodayRoundedIcon, { fontSize: "inherit", style: {
|
|
295
|
-
color: '#757575',
|
|
296
|
-
fontSize: 20,
|
|
297
|
-
} })),
|
|
298
|
-
}, FormHelperTextProps: {
|
|
299
|
-
classes: helperTextStyles,
|
|
300
|
-
}, renderDay: function (day, selectedDate, dayInCurrentMonth, dayComponent) {
|
|
301
|
-
if (!day) {
|
|
302
|
-
return dayComponent;
|
|
303
|
-
}
|
|
304
|
-
return (_jsx("div", __assign({ onClick: function () {
|
|
305
|
-
onChange(day);
|
|
306
|
-
} }, { children: cloneElement(dayComponent) })));
|
|
307
|
-
}, variant: "dialog" })));
|
|
308
|
-
}
|
|
309
|
-
else {
|
|
310
|
-
return (_jsx(DatePicker, __assign({}, others, { inputVariant: "outlined", size: "small", disabled: cantEdit, fullWidth: true, onChange: onChange, placeholder: format(new Date(), 'P', { locale: getLocale() }), format: "P", required: required, InputLabelProps: { classes: labelClasses }, DialogProps: {
|
|
311
|
-
disableEnforceFocus: true,
|
|
312
|
-
className: datePicker,
|
|
313
|
-
cancelLabel: '',
|
|
314
|
-
} //Fixes the typescript declaration of the library: https://material-ui-pickers.dev/api/KeyboardDatePicker
|
|
315
|
-
, InputProps: {
|
|
316
|
-
required: required,
|
|
317
|
-
classes: classes,
|
|
318
|
-
disabled: cantEdit,
|
|
319
|
-
endAdornment: (_jsx(CalendarTodayRoundedIcon, { fontSize: "inherit", style: {
|
|
320
|
-
color: '#757575',
|
|
321
|
-
fontSize: 20,
|
|
322
|
-
} })),
|
|
323
|
-
}, FormHelperTextProps: {
|
|
324
|
-
classes: helperTextStyles,
|
|
325
|
-
}, renderDay: function (day, selectedDate, dayInCurrentMonth, dayComponent) {
|
|
326
|
-
if (!day) {
|
|
327
|
-
return dayComponent;
|
|
328
|
-
}
|
|
329
|
-
return (_jsx("div", __assign({ onClick: function () {
|
|
330
|
-
onChange(day);
|
|
331
|
-
} }, { children: cloneElement(dayComponent) })));
|
|
332
|
-
}, variant: "dialog" })));
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
/**
|
|
336
|
-
* Generic datepicker with apps designs. Is class do to the use in the react-hook-forms library
|
|
337
|
-
*/
|
|
338
|
-
var RoundedDatePicker = /** @class */ (function (_super) {
|
|
339
|
-
__extends(RoundedDatePicker, _super);
|
|
340
|
-
function RoundedDatePicker() {
|
|
341
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
342
|
-
}
|
|
343
|
-
RoundedDatePicker.prototype.render = function () {
|
|
344
|
-
return _jsx(CustomDatePicker, __assign({}, this.props));
|
|
345
|
-
};
|
|
346
|
-
return RoundedDatePicker;
|
|
347
|
-
}(React.Component));
|
|
348
|
-
export default RoundedDatePicker;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { SelectProps } from '@material-ui/core/Select';
|
|
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 weight of the font of the value and the placeholder */
|
|
21
|
-
fontWeight?: any;
|
|
22
|
-
/** If input is readOnly */
|
|
23
|
-
readOnly?: boolean;
|
|
24
|
-
/** The color of the helper text when not error */
|
|
25
|
-
helperTextColor?: string;
|
|
26
|
-
/** The borderRadius of the input */
|
|
27
|
-
borderRadius?: number;
|
|
28
|
-
/** The padding to the left of the input */
|
|
29
|
-
paddingLeft?: number;
|
|
30
|
-
/** The padding to the right of the input */
|
|
31
|
-
paddingRight?: number;
|
|
32
|
-
/** If custom icon exists and should be displayed */
|
|
33
|
-
showIcon?: boolean;
|
|
34
|
-
}
|
|
35
|
-
interface RoundedSelectProps extends Omit<SelectProps, 'color'>, StyleProps {
|
|
36
|
-
/** children to display in the options */
|
|
37
|
-
children?: any;
|
|
38
|
-
/** Currently selected value */
|
|
39
|
-
value: any;
|
|
40
|
-
/** function called when value changes */
|
|
41
|
-
handleUpdate?: (event: React.ChangeEvent<{
|
|
42
|
-
name?: string | undefined;
|
|
43
|
-
value: any;
|
|
44
|
-
}>, child?: React.ReactNode) => void;
|
|
45
|
-
/** String to place in the label */
|
|
46
|
-
label?: string;
|
|
47
|
-
/** Minimum width in px of the component */
|
|
48
|
-
minWidth?: number;
|
|
49
|
-
/** The color of the outline when selected and hovered on */
|
|
50
|
-
focusColor?: string;
|
|
51
|
-
/** If outline should be error color */
|
|
52
|
-
highlightError?: boolean;
|
|
53
|
-
/** The helper Text to display */
|
|
54
|
-
helperText?: string;
|
|
55
|
-
/** the margin around the selector */
|
|
56
|
-
containerMargin?: string;
|
|
57
|
-
/** The icon to display */
|
|
58
|
-
iconComponent?: any;
|
|
59
|
-
/** the components ref */
|
|
60
|
-
ref?: any;
|
|
61
|
-
}
|
|
62
|
-
/**
|
|
63
|
-
* Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
|
|
64
|
-
*/
|
|
65
|
-
declare class RoundedSelect extends React.Component<RoundedSelectProps> {
|
|
66
|
-
render(): JSX.Element;
|
|
67
|
-
}
|
|
68
|
-
export default RoundedSelect;
|
|
@@ -1,214 +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, { useState } from 'react';
|
|
40
|
-
import { makeStyles } from '@material-ui/core/styles';
|
|
41
|
-
import InputLabel from '@material-ui/core/InputLabel';
|
|
42
|
-
import FormControl from '@material-ui/core/FormControl';
|
|
43
|
-
import OutlinedInput from '@material-ui/core/OutlinedInput';
|
|
44
|
-
import Select from '@material-ui/core/Select';
|
|
45
|
-
import { FormHelperText } from '@material-ui/core';
|
|
46
|
-
var useStyles = makeStyles(function (theme) { return ({
|
|
47
|
-
root: {
|
|
48
|
-
display: 'flex',
|
|
49
|
-
flexWrap: 'wrap',
|
|
50
|
-
},
|
|
51
|
-
formControl: {
|
|
52
|
-
margin: theme.spacing(1),
|
|
53
|
-
minWidth: 120,
|
|
54
|
-
},
|
|
55
|
-
selectEmpty: {
|
|
56
|
-
marginTop: theme.spacing(2),
|
|
57
|
-
},
|
|
58
|
-
}); });
|
|
59
|
-
var useOutlinedInputStyles = function (props) {
|
|
60
|
-
var _a;
|
|
61
|
-
return makeStyles({
|
|
62
|
-
root: {
|
|
63
|
-
cursor: props.cantEdit ? 'default' : 'default',
|
|
64
|
-
height: props.height,
|
|
65
|
-
borderRadius: props.borderRadius,
|
|
66
|
-
backgroundColor: props.backgroundColor,
|
|
67
|
-
fontSize: props.fontSize,
|
|
68
|
-
'& $notchedOutline': {
|
|
69
|
-
borderColor: props.outlineColor,
|
|
70
|
-
'& legend': {
|
|
71
|
-
fontSize: 'calc(' + props.fontSize + ' * 0.75)',
|
|
72
|
-
},
|
|
73
|
-
},
|
|
74
|
-
'&:hover $notchedOutline': {
|
|
75
|
-
borderColor: props.cantEdit
|
|
76
|
-
? props.outlineColor
|
|
77
|
-
: props.focusColor,
|
|
78
|
-
},
|
|
79
|
-
'& .Mui-disabled': {
|
|
80
|
-
cursor: 'default',
|
|
81
|
-
color: props.color,
|
|
82
|
-
pointerEvents: 'none',
|
|
83
|
-
},
|
|
84
|
-
'& .Mui-error': {
|
|
85
|
-
color: props.errorColor,
|
|
86
|
-
},
|
|
87
|
-
'&.Mui-error .EF-MuiOutlinedInput-notchedOutline': {
|
|
88
|
-
borderColor: props.outlineColor,
|
|
89
|
-
},
|
|
90
|
-
'&.Mui-disabled .EF-MuiOutlinedInput-notchedOutline': {
|
|
91
|
-
borderColor: props.outlineColor,
|
|
92
|
-
},
|
|
93
|
-
'& .EF-MuiSelect-root': {
|
|
94
|
-
paddingLeft: props.paddingLeft,
|
|
95
|
-
paddingRight: props.paddingRight,
|
|
96
|
-
},
|
|
97
|
-
'&$focused $notchedOutline': {
|
|
98
|
-
borderColor: props.focusColor,
|
|
99
|
-
},
|
|
100
|
-
'& .EF-MuiSelect-icon': {
|
|
101
|
-
color: ((_a = props.color) === null || _a === void 0 ? void 0 : _a.startsWith('#'))
|
|
102
|
-
? props.color + '8a'
|
|
103
|
-
: props.color,
|
|
104
|
-
},
|
|
105
|
-
'& .EF-MuiSelect-icon.Mui-disabled': {
|
|
106
|
-
color: props.outlineColor,
|
|
107
|
-
},
|
|
108
|
-
'& .EF-MuiSelect-icon.iconOutlined': {
|
|
109
|
-
right: 8,
|
|
110
|
-
},
|
|
111
|
-
'& .EF-MuiSelect-iconOpen': {
|
|
112
|
-
transform: props.showIcon ? 'none' : 'rotate(180deg)',
|
|
113
|
-
},
|
|
114
|
-
color: props.color,
|
|
115
|
-
},
|
|
116
|
-
focused: {},
|
|
117
|
-
notchedOutline: {},
|
|
118
|
-
});
|
|
119
|
-
};
|
|
120
|
-
var useLabelInputStyles = function (props) {
|
|
121
|
-
return makeStyles(function () {
|
|
122
|
-
var _a;
|
|
123
|
-
return ({
|
|
124
|
-
focused: {
|
|
125
|
-
color: props.focusColor + ' !important',
|
|
126
|
-
},
|
|
127
|
-
root: {
|
|
128
|
-
color: ((_a = props.color) === null || _a === void 0 ? void 0 : _a.startsWith('#'))
|
|
129
|
-
? props.color + '8a'
|
|
130
|
-
: props.color,
|
|
131
|
-
fontWeight: props.fontWeight,
|
|
132
|
-
whiteSpace: 'nowrap',
|
|
133
|
-
overflow: 'hidden',
|
|
134
|
-
maxWidth: 'calc(100% - 45px)',
|
|
135
|
-
textOverflow: 'ellipsis',
|
|
136
|
-
marginTop: props.height != '40px' ? '-4px' : '0px',
|
|
137
|
-
'&.EF-MuiInputLabel-shrink': {
|
|
138
|
-
marginTop: '0px',
|
|
139
|
-
maxWidth: 'calc(100% - 5px)',
|
|
140
|
-
},
|
|
141
|
-
'& .Mui-error': {
|
|
142
|
-
color: props.errorColor,
|
|
143
|
-
},
|
|
144
|
-
'&.Mui-error': {
|
|
145
|
-
color: props.errorColor,
|
|
146
|
-
},
|
|
147
|
-
},
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
var useHelperTextStyles = function (props) {
|
|
152
|
-
return makeStyles(function () { return ({
|
|
153
|
-
root: {
|
|
154
|
-
color: props.helperTextColor,
|
|
155
|
-
'&.Mui-error': {
|
|
156
|
-
color: props.errorColor,
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
}); });
|
|
160
|
-
};
|
|
161
|
-
function CustomSelect(_a) {
|
|
162
|
-
var children = _a.children, _b = _a.value, value = _b === void 0 ? '' : _b, handleUpdate = _a.handleUpdate, label = _a.label, minWidth = _a.minWidth, helperText = _a.helperText, _c = _a.color, color = _c === void 0 ? '#293241' : _c, _d = _a.errorColor, errorColor = _d === void 0 ? '#cc2936' : _d, _e = _a.focusColor, focusColor = _e === void 0 ? '#3d5a7f' : _e, _f = _a.outlineColor, outlineColor = _f === void 0 ? '#0000003b' : _f, _g = _a.helperTextColor, helperTextColor = _g === void 0 ? '#989898' : _g, _h = _a.backgroundColor, backgroundColor = _h === void 0 ? '#ffffff' : _h, _j = _a.readOnly, readOnly = _j === void 0 ? false : _j, _k = _a.borderRadius, borderRadius = _k === void 0 ? 10 : _k, _l = _a.paddingLeft, paddingLeft = _l === void 0 ? 14 : _l, _m = _a.paddingRight, paddingRight = _m === void 0 ? 32 : _m, _o = _a.cantEdit, cantEdit = _o === void 0 ? false : _o, _p = _a.showIcon, showIcon = _p === void 0 ? true : _p, _q = _a.containerMargin, containerMargin = _q === void 0 ? '8px' : _q, _r = _a.height, height = _r === void 0 ? '40px' : _r, _s = _a.fontSize, fontSize = _s === void 0 ? '1rem' : _s, required = _a.required, iconComponent = _a.iconComponent, error = _a.error, others = __rest(_a, ["children", "value", "handleUpdate", "label", "minWidth", "helperText", "color", "errorColor", "focusColor", "outlineColor", "helperTextColor", "backgroundColor", "readOnly", "borderRadius", "paddingLeft", "paddingRight", "cantEdit", "showIcon", "containerMargin", "height", "fontSize", "required", "iconComponent", "error"]);
|
|
163
|
-
var styleProps = {
|
|
164
|
-
color: color,
|
|
165
|
-
height: height,
|
|
166
|
-
readOnly: readOnly,
|
|
167
|
-
fontSize: fontSize,
|
|
168
|
-
cantEdit: cantEdit,
|
|
169
|
-
errorColor: errorColor,
|
|
170
|
-
focusColor: focusColor,
|
|
171
|
-
paddingLeft: paddingLeft,
|
|
172
|
-
paddingRight: paddingRight,
|
|
173
|
-
outlineColor: outlineColor,
|
|
174
|
-
borderRadius: borderRadius,
|
|
175
|
-
helperTextColor: helperTextColor,
|
|
176
|
-
backgroundColor: backgroundColor,
|
|
177
|
-
showIcon: showIcon && iconComponent !== undefined,
|
|
178
|
-
};
|
|
179
|
-
var classes = useStyles();
|
|
180
|
-
var outlinedInputClasses = useOutlinedInputStyles(styleProps)();
|
|
181
|
-
var labelClasses = useLabelInputStyles(styleProps)();
|
|
182
|
-
var helperTextClasses = useHelperTextStyles(styleProps)();
|
|
183
|
-
var _t = useState(false), open = _t[0], setOpen = _t[1];
|
|
184
|
-
return (_jsxs(FormControl, __assign({ variant: "outlined", className: classes.formControl, size: "small", style: minWidth !== undefined
|
|
185
|
-
? { minWidth: minWidth, outlineColor: outlineColor, margin: containerMargin }
|
|
186
|
-
: {
|
|
187
|
-
margin: containerMargin,
|
|
188
|
-
}, fullWidth: true, required: required, error: error }, { children: [label && _jsx(InputLabel, __assign({ classes: labelClasses }, { children: label })), _jsx(Select, __assign({}, others, { value: value, MenuProps: {}, onChange: handleUpdate }, (showIcon && iconComponent
|
|
189
|
-
? { IconComponent: iconComponent }
|
|
190
|
-
: {}), { open: open, onFocus: function (e) {
|
|
191
|
-
var _a;
|
|
192
|
-
if (!((_a = e.relatedTarget) === null || _a === void 0 ? void 0 : _a.closest('.EF-MuiPaper-root'))) {
|
|
193
|
-
setOpen(true);
|
|
194
|
-
}
|
|
195
|
-
}, onClose: function () {
|
|
196
|
-
setOpen(false);
|
|
197
|
-
}, onOpen: function () {
|
|
198
|
-
setOpen(true);
|
|
199
|
-
}, input: _jsx(OutlinedInput, { disabled: cantEdit, name: label, label: label ? label + (required ? ' *' : '') : undefined, classes: outlinedInputClasses }) }, { children: children })), helperText !== undefined && (_jsx(FormHelperText, __assign({ classes: helperTextClasses }, { children: helperText })))] })));
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Generic textfield with apps designs. Is class do to the use in the react-hook-forms library
|
|
203
|
-
*/
|
|
204
|
-
var RoundedSelect = /** @class */ (function (_super) {
|
|
205
|
-
__extends(RoundedSelect, _super);
|
|
206
|
-
function RoundedSelect() {
|
|
207
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
208
|
-
}
|
|
209
|
-
RoundedSelect.prototype.render = function () {
|
|
210
|
-
return _jsx(CustomSelect, __assign({}, this.props));
|
|
211
|
-
};
|
|
212
|
-
return RoundedSelect;
|
|
213
|
-
}(React.Component));
|
|
214
|
-
export default RoundedSelect;
|