@arquimedes.co/eureka-forms 1.9.84-test → 1.9.86-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/dist/@Types/@Types.d.ts +2 -0
- package/dist/@Types/@Types.js +1 -0
- package/dist/@Types/AYFFormStep.d.ts +19 -0
- package/dist/@Types/AYFFormStep.js +1 -0
- package/dist/@Types/CBRFormStep.d.ts +74 -0
- package/dist/@Types/CBRFormStep.js +1 -0
- package/dist/@Types/Form.d.ts +65 -0
- package/dist/@Types/Form.js +1 -0
- package/dist/@Types/FormStep.d.ts +138 -0
- package/dist/@Types/FormStep.js +1 -0
- package/dist/@Types/GenericFormSteps.d.ts +60 -0
- package/dist/@Types/GenericFormSteps.js +1 -0
- package/dist/@Types/Organization.d.ts +17 -0
- package/dist/@Types/Organization.js +1 -0
- package/dist/@Types/index.d.ts +1 -0
- package/dist/@Types/index.js +1 -0
- package/dist/App.d.ts +62 -0
- package/dist/App.js +470 -0
- package/dist/App.module.css +34 -0
- package/dist/AxiosAPI.d.ts +2 -0
- package/dist/AxiosAPI.js +8 -0
- package/dist/AxiosWidget.d.ts +2 -0
- package/dist/AxiosWidget.js +8 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +8 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +379 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +51 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +12 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +31 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +64 -0
- package/dist/FormComponents/Form/Form.d.ts +42 -0
- package/dist/FormComponents/Form/Form.js +147 -0
- package/dist/FormComponents/Form/Form.module.css +39 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +4 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.js +6 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +4 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +42 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +8 -0
- package/dist/FormComponents/Section/Section.d.ts +39 -0
- package/dist/FormComponents/Section/Section.js +23 -0
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/CBRElementStep/CBRElementStep.js +139 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.d.ts +9 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +23 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +49 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.module.css +60 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.d.ts +11 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +121 -0
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.module.css +34 -0
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.d.ts +8 -0
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +138 -0
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.module.css +54 -0
- package/dist/FormComponents/Step/AYFStepMapper.d.ts +12 -0
- package/dist/FormComponents/Step/AYFStepMapper.js +170 -0
- package/dist/FormComponents/Step/CBRStepMapper.d.ts +13 -0
- package/dist/FormComponents/Step/CBRStepMapper.js +202 -0
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.d.ts +9 -0
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +35 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.d.ts +4 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +65 -0
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.module.css +37 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +35 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +121 -0
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.d.ts +9 -0
- package/dist/FormComponents/Step/CollapsibleStep/CollapsibleStep.js +37 -0
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.d.ts +4 -0
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.js +75 -0
- package/dist/FormComponents/Step/CollapsibleStep/MaterialTitleStep/MaterialCollapsibleStep.module.css +62 -0
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +11 -0
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +23 -0
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -0
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +48 -0
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +9 -0
- package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.d.ts +15 -0
- package/dist/FormComponents/Step/EntityValueStep/EntityValuePickerStep.js +35 -0
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.d.ts +4 -0
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.js +203 -0
- package/dist/FormComponents/Step/EntityValueStep/MaterialEntityValuePickerStep/MaterialEntityValuePickerStep.module.css +25 -0
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +9 -0
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +23 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +13 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +123 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +60 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +16 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +272 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +59 -0
- package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +16 -0
- package/dist/FormComponents/Step/MapperStep/MapperStep.js +35 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.d.ts +10 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.js +29 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css +60 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.d.ts +13 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.js +33 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillElementContainer/PillElementContainer.module.css +60 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.d.ts +15 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +278 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css +42 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.d.ts +4 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +71 -0
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css +30 -0
- package/dist/FormComponents/Step/RatingStep/RatingStep.d.ts +9 -0
- package/dist/FormComponents/Step/RatingStep/RatingStep.js +23 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +104 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +9 -0
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +35 -0
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -0
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +11 -0
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +9 -0
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +35 -0
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.d.ts +10 -0
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +241 -0
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.module.css +9 -0
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.d.ts +33 -0
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +23 -0
- package/dist/FormComponents/Step/Step.d.ts +11 -0
- package/dist/FormComponents/Step/Step.js +108 -0
- package/dist/FormComponents/Step/StepFunctions.d.ts +5 -0
- package/dist/FormComponents/Step/StepFunctions.js +65 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +96 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +13 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +213 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +93 -0
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +10 -0
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +23 -0
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -0
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +76 -0
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +13 -0
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +23 -0
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -0
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +20 -0
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +19 -0
- package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +9 -0
- package/dist/FormComponents/Step/TitleStep/TitleStep.js +35 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +4 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +88 -0
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +83 -0
- package/dist/FormComponents/Term/Term.d.ts +15 -0
- package/dist/FormComponents/Term/Term.js +23 -0
- package/dist/Icons/Construction/LeakIcon.d.ts +3 -0
- package/dist/Icons/Construction/LeakIcon.js +16 -0
- package/dist/Icons/Construction/ProjectIcon.d.ts +3 -0
- package/dist/Icons/Construction/ProjectIcon.js +16 -0
- package/dist/Icons/Construction/PropertyIcon.d.ts +3 -0
- package/dist/Icons/Construction/PropertyIcon.js +16 -0
- package/dist/Icons/Construction/SpaceIcon.d.ts +3 -0
- package/dist/Icons/Construction/SpaceIcon.js +16 -0
- package/dist/Icons/DocumentIcon.d.ts +3 -0
- package/dist/Icons/DocumentIcon.js +16 -0
- package/dist/Icons/Entities/GenericEntityIcon.d.ts +2 -0
- package/dist/Icons/Entities/GenericEntityIcon.js +17 -0
- package/dist/Icons/Entities/HandshakeIcon.d.ts +2 -0
- package/dist/Icons/Entities/HandshakeIcon.js +17 -0
- package/dist/Widget.d.ts +1 -0
- package/dist/Widget.js +61 -0
- package/dist/constants/AYFFormStepTypes.d.ts +9 -0
- package/dist/constants/AYFFormStepTypes.js +10 -0
- package/dist/constants/CBRFormStepTypes.d.ts +21 -0
- package/dist/constants/CBRFormStepTypes.js +22 -0
- package/dist/constants/Files/FileExtensions.d.ts +3 -0
- package/dist/constants/Files/FileExtensions.js +68 -0
- package/dist/constants/Files/FileMaxSize.d.ts +2 -0
- package/dist/constants/Files/FileMaxSize.js +2 -0
- package/dist/constants/FormStepTypes.d.ts +46 -0
- package/dist/constants/FormStepTypes.js +54 -0
- package/dist/constants/IconTypes.d.ts +10 -0
- package/dist/constants/IconTypes.js +11 -0
- package/dist/constants/InternalFormStyle.d.ts +3 -0
- package/dist/constants/InternalFormStyle.js +16 -0
- package/dist/constants/MaterialClassNameSeed.d.ts +1 -0
- package/dist/constants/MaterialClassNameSeed.js +1 -0
- package/dist/controllers/FileService.d.ts +5 -0
- package/dist/controllers/FileService.js +92 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +29 -0
- package/dist/index.lib.d.ts +7 -0
- package/dist/index.lib.js +5 -0
- package/dist/index.module.css +14 -0
- package/dist/shared/InputIcon/InputIcon.d.ts +7 -0
- package/dist/shared/InputIcon/InputIcon.js +81 -0
- package/dist/shared/Loader/Loader.d.ts +18 -0
- package/dist/shared/Loader/Loader.js +26 -0
- package/dist/shared/Loader/Loader.module.css +12 -0
- package/dist/shared/Navbar/Navbar.d.ts +9 -0
- package/dist/shared/Navbar/Navbar.js +18 -0
- package/dist/shared/Navbar/Navbar.module.css +18 -0
- package/dist/shared/Rating/Rating.d.ts +16 -0
- package/dist/shared/Rating/Rating.js +41 -0
- package/dist/shared/Rating/Rating.module.css +32 -0
- package/dist/shared/Rating/Ratings/LikeRating.d.ts +4 -0
- package/dist/shared/Rating/Ratings/LikeRating.js +43 -0
- package/dist/shared/Rating/Ratings/SatisfactionRating.d.ts +4 -0
- package/dist/shared/Rating/Ratings/SatisfactionRating.js +61 -0
- package/dist/shared/Rating/Ratings/ScaleRating.d.ts +4 -0
- package/dist/shared/Rating/Ratings/ScaleRating.js +63 -0
- package/dist/shared/RoundedButton/RoundedButton.d.ts +30 -0
- package/dist/shared/RoundedButton/RoundedButton.js +45 -0
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -0
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +101 -0
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +48 -0
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +348 -0
- package/dist/shared/RoundedSelect/RoundedSelect.d.ts +68 -0
- package/dist/shared/RoundedSelect/RoundedSelect.js +214 -0
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.d.ts +66 -0
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +234 -0
- package/dist/shared/RoundedTextField/RoundedTextField.d.ts +45 -0
- package/dist/shared/RoundedTextField/RoundedTextField.js +175 -0
- package/dist/utils/CbrFunctions.d.ts +8 -0
- package/dist/utils/CbrFunctions.js +53 -0
- package/package.json +1 -1
|
@@ -0,0 +1,26 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import CircularProgress from '@material-ui/core/CircularProgress';
|
|
14
|
+
import styles from './Loader.module.css';
|
|
15
|
+
/**
|
|
16
|
+
* Generic Loader Component with optional curtain.
|
|
17
|
+
*/
|
|
18
|
+
function Loader(_a) {
|
|
19
|
+
var _b = _a.color, color = _b === void 0 ? '#3d5a7f' : _b, _c = _a.curtain, curtain = _c === void 0 ? false : _c, _d = _a.zIndex, zIndex = _d === void 0 ? 20 : _d, _e = _a.size, size = _e === void 0 ? 40 : _e, _f = _a.position, position = _f === void 0 ? 'absolute' : _f;
|
|
20
|
+
return (_jsx("div", __assign({ className: styles.loaderContainer + ' flexbox', style: {
|
|
21
|
+
backgroundColor: curtain ? 'rgb(0, 0, 0, 0.4)' : '',
|
|
22
|
+
zIndex: zIndex,
|
|
23
|
+
position: position,
|
|
24
|
+
} }, { children: _jsx("div", __assign({ className: styles.loader }, { children: _jsx(CircularProgress, { size: size, style: { color: color } }) })) })));
|
|
25
|
+
}
|
|
26
|
+
export default Loader;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface NavBarProps {
|
|
3
|
+
/** Url of the current logo of the current organization */
|
|
4
|
+
logo?: string;
|
|
5
|
+
/** The color of the navbar */
|
|
6
|
+
color?: string;
|
|
7
|
+
}
|
|
8
|
+
declare function Navbar({ logo, color }: NavBarProps): JSX.Element;
|
|
9
|
+
export default Navbar;
|
|
@@ -0,0 +1,18 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import styles from './Navbar.module.css';
|
|
14
|
+
function Navbar(_a) {
|
|
15
|
+
var logo = _a.logo, color = _a.color;
|
|
16
|
+
return (_jsx("div", __assign({ className: styles.navContainer, style: { backgroundColor: color } }, { children: _jsx("img", { src: logo, alt: "Organization Logo", className: styles.navImage }) })));
|
|
17
|
+
}
|
|
18
|
+
export default Navbar;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.navContainer {
|
|
2
|
+
height: 60px;
|
|
3
|
+
display: flex;
|
|
4
|
+
}
|
|
5
|
+
.navImage {
|
|
6
|
+
height: 40px;
|
|
7
|
+
margin: auto 0 auto 15px;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.toogle {
|
|
11
|
+
margin: auto 5px auto auto;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media screen and (max-width: 576px) {
|
|
15
|
+
.toogle {
|
|
16
|
+
display: unset !important;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { RatingTypes } from '../../constants/FormStepTypes';
|
|
3
|
+
export interface RatingProps {
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
name: string;
|
|
6
|
+
isMobile?: boolean;
|
|
7
|
+
value: any;
|
|
8
|
+
onChange: Function;
|
|
9
|
+
inputRef: any;
|
|
10
|
+
focusColor: string;
|
|
11
|
+
unSelectedColor: string;
|
|
12
|
+
}
|
|
13
|
+
declare function Rating({ type, ...others }: RatingProps & {
|
|
14
|
+
type: RatingTypes;
|
|
15
|
+
}): JSX.Element;
|
|
16
|
+
export default Rating;
|
|
@@ -0,0 +1,41 @@
|
|
|
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 } from "react/jsx-runtime";
|
|
24
|
+
import LikeRating from './Ratings/LikeRating';
|
|
25
|
+
import ScaleRating from './Ratings/ScaleRating';
|
|
26
|
+
import SatisfactionRating from './Ratings/SatisfactionRating';
|
|
27
|
+
import { RatingTypes } from '../../constants/FormStepTypes';
|
|
28
|
+
function Rating(_a) {
|
|
29
|
+
var type = _a.type, others = __rest(_a, ["type"]);
|
|
30
|
+
switch (type) {
|
|
31
|
+
case RatingTypes.LIKE:
|
|
32
|
+
return _jsx(LikeRating, __assign({}, others));
|
|
33
|
+
case RatingTypes.SATISFACTION:
|
|
34
|
+
return _jsx(SatisfactionRating, __assign({}, others));
|
|
35
|
+
case RatingTypes.SCALE:
|
|
36
|
+
return _jsx(ScaleRating, __assign({}, others));
|
|
37
|
+
default:
|
|
38
|
+
return _jsx("div", {});
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
export default Rating;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
.ratingContainer {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
justify-content: center;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
.disabledSentimentContainer,
|
|
8
|
+
.sentimentContainer {
|
|
9
|
+
font-size: 60px;
|
|
10
|
+
height: 60px;
|
|
11
|
+
color: var(--eureka-outline);
|
|
12
|
+
}
|
|
13
|
+
.disabledLikeContainer,
|
|
14
|
+
.likeContainer {
|
|
15
|
+
font-size: 60px;
|
|
16
|
+
height: 75px;
|
|
17
|
+
color: var(--eureka-outline);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.likeContainer:hover,
|
|
21
|
+
.sentimentContainer:hover {
|
|
22
|
+
transform: scale(1.2);
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
color: var(--eureka-primary);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.hiddenInput {
|
|
28
|
+
height: 0;
|
|
29
|
+
width: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
border-width: 0;
|
|
32
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import ThumbDownRoundedIcon from '@material-ui/icons/ThumbDownRounded';
|
|
14
|
+
import ThumbUpRoundedIcon from '@material-ui/icons/ThumbUpRounded';
|
|
15
|
+
import styles from '../Rating.module.css';
|
|
16
|
+
function LikeRating(_a) {
|
|
17
|
+
var disabled = _a.disabled, inputRef = _a.inputRef, value = _a.value, onChange = _a.onChange, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
18
|
+
return (_jsxs("div", __assign({ className: styles.ratingContainer, style: {
|
|
19
|
+
'--eureka-primary': focusColor,
|
|
20
|
+
'--eureka-outline': unSelectedColor,
|
|
21
|
+
} }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }), _jsx("div", __assign({ className: disabled
|
|
22
|
+
? styles.disabledLikeContainer
|
|
23
|
+
: styles.likeContainer, onClick: function () {
|
|
24
|
+
if (!disabled)
|
|
25
|
+
onChange(value === 1 ? null : 1);
|
|
26
|
+
} }, { children: _jsx(ThumbUpRoundedIcon, { fontSize: "inherit", style: value === 1
|
|
27
|
+
? {
|
|
28
|
+
color: focusColor,
|
|
29
|
+
}
|
|
30
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
31
|
+
? styles.disabledLikeContainer
|
|
32
|
+
: styles.likeContainer, onClick: function () {
|
|
33
|
+
if (!disabled)
|
|
34
|
+
onChange(value === 0 ? null : 0);
|
|
35
|
+
} }, { children: _jsx(ThumbDownRoundedIcon, { fontSize: "inherit", style: value === 0
|
|
36
|
+
? {
|
|
37
|
+
color: focusColor,
|
|
38
|
+
marginTop: 14,
|
|
39
|
+
marginLeft: 15,
|
|
40
|
+
}
|
|
41
|
+
: { marginTop: 14, marginLeft: 15 } }) }))] })));
|
|
42
|
+
}
|
|
43
|
+
export default LikeRating;
|
|
@@ -0,0 +1,61 @@
|
|
|
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 { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
import styles from '../Rating.module.css';
|
|
14
|
+
import SentimentVeryDissatisfiedIcon from '@material-ui/icons/SentimentVeryDissatisfied';
|
|
15
|
+
import SentimentDissatisfiedIcon from '@material-ui/icons/SentimentDissatisfied';
|
|
16
|
+
import SentimentSatisfiedAltIcon from '@material-ui/icons/SentimentSatisfiedAltOutlined';
|
|
17
|
+
import SentimentVerySatisfiedIcon from '@material-ui/icons/SentimentVerySatisfied';
|
|
18
|
+
function SatisfactionRating(_a) {
|
|
19
|
+
var value = _a.value, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
20
|
+
return (_jsxs("div", __assign({ className: styles.ratingContainer, style: {
|
|
21
|
+
'--eureka-primary': focusColor,
|
|
22
|
+
'--eureka-outline': unSelectedColor,
|
|
23
|
+
} }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }), _jsx("div", __assign({ className: disabled
|
|
24
|
+
? styles.disabledSentimentContainer
|
|
25
|
+
: styles.sentimentContainer, onClick: function () {
|
|
26
|
+
if (!disabled)
|
|
27
|
+
onChange(value === 1 ? null : 1);
|
|
28
|
+
} }, { children: _jsx(SentimentVeryDissatisfiedIcon, { fontSize: "inherit", style: value === 1
|
|
29
|
+
? {
|
|
30
|
+
color: focusColor,
|
|
31
|
+
}
|
|
32
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
33
|
+
? styles.disabledSentimentContainer
|
|
34
|
+
: styles.sentimentContainer, onClick: function () {
|
|
35
|
+
if (!disabled)
|
|
36
|
+
onChange(value === 2 ? null : 2);
|
|
37
|
+
} }, { children: _jsx(SentimentDissatisfiedIcon, { fontSize: "inherit", style: value === 2
|
|
38
|
+
? {
|
|
39
|
+
color: focusColor,
|
|
40
|
+
}
|
|
41
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
42
|
+
? styles.disabledSentimentContainer
|
|
43
|
+
: styles.sentimentContainer, onClick: function () {
|
|
44
|
+
if (!disabled)
|
|
45
|
+
onChange(value === 3 ? null : 3);
|
|
46
|
+
} }, { children: _jsx(SentimentSatisfiedAltIcon, { fontSize: "inherit", style: value === 3
|
|
47
|
+
? {
|
|
48
|
+
color: focusColor,
|
|
49
|
+
}
|
|
50
|
+
: {} }) })), _jsx("div", __assign({ className: disabled
|
|
51
|
+
? styles.disabledSentimentContainer
|
|
52
|
+
: styles.sentimentContainer, onClick: function () {
|
|
53
|
+
if (!disabled)
|
|
54
|
+
onChange(value === 4 ? null : 4);
|
|
55
|
+
} }, { children: _jsx(SentimentVerySatisfiedIcon, { fontSize: "inherit", style: value === 4
|
|
56
|
+
? {
|
|
57
|
+
color: focusColor,
|
|
58
|
+
}
|
|
59
|
+
: {} }) }))] })));
|
|
60
|
+
}
|
|
61
|
+
export default SatisfactionRating;
|
|
@@ -0,0 +1,63 @@
|
|
|
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 styles from '../Rating.module.css';
|
|
25
|
+
import { Rating } from '@material-ui/lab';
|
|
26
|
+
import GradeRoundedIcon from '@material-ui/icons/GradeRounded';
|
|
27
|
+
import { makeStyles } from '@material-ui/core';
|
|
28
|
+
import React from 'react';
|
|
29
|
+
var useRatingStyles = function (props) {
|
|
30
|
+
return makeStyles({
|
|
31
|
+
root: {
|
|
32
|
+
'&.Mui-disabled': {
|
|
33
|
+
opacity: 1,
|
|
34
|
+
},
|
|
35
|
+
'& .EF-MuiRating-iconFilled': {
|
|
36
|
+
color: props.focusColor,
|
|
37
|
+
},
|
|
38
|
+
'& .EF-MuiRating-iconEmpty': {
|
|
39
|
+
color: props.unSelectedColor,
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
function ScaleRating(_a) {
|
|
45
|
+
var value = _a.value, name = _a.name, inputRef = _a.inputRef, disabled = _a.disabled, onChange = _a.onChange, isMobile = _a.isMobile, focusColor = _a.focusColor, unSelectedColor = _a.unSelectedColor;
|
|
46
|
+
var ratingClasses = useRatingStyles({
|
|
47
|
+
unSelectedColor: unSelectedColor,
|
|
48
|
+
focusColor: focusColor,
|
|
49
|
+
})();
|
|
50
|
+
return (_jsxs(React.Fragment, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }), _jsx(Rating, { value: value, onChange: function (_event, newValue) {
|
|
51
|
+
if (!disabled)
|
|
52
|
+
onChange(newValue);
|
|
53
|
+
}, disabled: disabled, classes: ratingClasses, name: name, size: "large", defaultValue: 0, getLabelText: function (value) { return value + '/5'; }, max: 5, IconContainerComponent: isMobile ? SmallIconContainer : IconContainer })] }));
|
|
54
|
+
}
|
|
55
|
+
function IconContainer(_a) {
|
|
56
|
+
var value = _a.value, other = __rest(_a, ["value"]);
|
|
57
|
+
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 60 } }) })));
|
|
58
|
+
}
|
|
59
|
+
function SmallIconContainer(_a) {
|
|
60
|
+
var value = _a.value, other = __rest(_a, ["value"]);
|
|
61
|
+
return (_jsx("span", __assign({ className: 'icon' + value }, other, { children: _jsx(GradeRoundedIcon, { style: { fontSize: 50 } }) })));
|
|
62
|
+
}
|
|
63
|
+
export default ScaleRating;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface ComponentProps {
|
|
3
|
+
/** Button text */
|
|
4
|
+
text: string;
|
|
5
|
+
/** Background Color */
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
/** Font Color */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Button Click Handle */
|
|
10
|
+
onClick: React.MouseEventHandler<HTMLButtonElement>;
|
|
11
|
+
/** If button is disabled */
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
/** Text font size */
|
|
14
|
+
fontSize?: number | string;
|
|
15
|
+
/** Button padding '0 13px 0 13px' format */
|
|
16
|
+
padding?: string;
|
|
17
|
+
/** border radius */
|
|
18
|
+
borderRadius?: number;
|
|
19
|
+
/** Component height */
|
|
20
|
+
height?: number;
|
|
21
|
+
/** If text is bold */
|
|
22
|
+
bold?: boolean;
|
|
23
|
+
/** The width of the button */
|
|
24
|
+
width?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Generic rounded button
|
|
28
|
+
*/
|
|
29
|
+
declare function RoundedButton({ text, backgroundColor, color, onClick, disabled, fontSize, padding, borderRadius, height, bold, width, }: ComponentProps): JSX.Element;
|
|
30
|
+
export default RoundedButton;
|
|
@@ -0,0 +1,45 @@
|
|
|
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 { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { Button, withStyles } from '@material-ui/core';
|
|
14
|
+
/**
|
|
15
|
+
* Generic rounded button
|
|
16
|
+
*/
|
|
17
|
+
function RoundedButton(_a) {
|
|
18
|
+
var text = _a.text, _b = _a.backgroundColor, backgroundColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.color, color = _c === void 0 ? '#ffffff' : _c, onClick = _a.onClick, disabled = _a.disabled, _d = _a.fontSize, fontSize = _d === void 0 ? '1rem' : _d, _e = _a.padding, padding = _e === void 0 ? '0 13px 0 13px' : _e, _f = _a.borderRadius, borderRadius = _f === void 0 ? 10 : _f, _g = _a.height, height = _g === void 0 ? 28 : _g, _h = _a.bold, bold = _h === void 0 ? false : _h, _j = _a.width, width = _j === void 0 ? 'fit-content' : _j;
|
|
19
|
+
var CustomButton = withStyles({
|
|
20
|
+
root: {
|
|
21
|
+
width: width,
|
|
22
|
+
textTransform: 'none',
|
|
23
|
+
fontFamily: 'inherit',
|
|
24
|
+
fontSize: fontSize,
|
|
25
|
+
borderRadius: borderRadius,
|
|
26
|
+
padding: padding,
|
|
27
|
+
height: height,
|
|
28
|
+
boxShadow: 'none',
|
|
29
|
+
backgroundColor: backgroundColor,
|
|
30
|
+
color: color,
|
|
31
|
+
'&:hover': {
|
|
32
|
+
boxShadow: 'none',
|
|
33
|
+
backgroundColor: backgroundColor,
|
|
34
|
+
},
|
|
35
|
+
'&:disabled': {
|
|
36
|
+
backgroundColor: backgroundColor,
|
|
37
|
+
color: color,
|
|
38
|
+
opacity: 0.5,
|
|
39
|
+
},
|
|
40
|
+
fontWeight: bold ? 'bold' : 'normal',
|
|
41
|
+
},
|
|
42
|
+
})(Button);
|
|
43
|
+
return (_jsx(CustomButton, __assign({ variant: "contained", onMouseDown: onClick, disabled: disabled }, { children: text })));
|
|
44
|
+
}
|
|
45
|
+
export default RoundedButton;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { CheckboxProps } from '@material-ui/core';
|
|
3
|
+
interface StyleProps {
|
|
4
|
+
error?: boolean;
|
|
5
|
+
padding?: string;
|
|
6
|
+
uncheckedColor?: string;
|
|
7
|
+
checkedColor?: string;
|
|
8
|
+
checkedHoverColor?: string;
|
|
9
|
+
errorColor?: string;
|
|
10
|
+
disabledColor?: string;
|
|
11
|
+
size?: number | string;
|
|
12
|
+
cantEdit?: boolean;
|
|
13
|
+
}
|
|
14
|
+
interface ComponentProps extends StyleProps {
|
|
15
|
+
onChange?: Function;
|
|
16
|
+
checked: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Generic datepicker with apps designs. Is class do to the use in the react-hook-forms library
|
|
20
|
+
*/
|
|
21
|
+
declare class RoundedCheckBox extends React.Component<ComponentProps & Omit<CheckboxProps, 'size'>> {
|
|
22
|
+
render(): JSX.Element;
|
|
23
|
+
}
|
|
24
|
+
export default RoundedCheckBox;
|
|
@@ -0,0 +1,101 @@
|
|
|
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 from 'react';
|
|
40
|
+
import { Checkbox, makeStyles } from '@material-ui/core';
|
|
41
|
+
import CheckBoxRoundedIcon from '@material-ui/icons/CheckBoxRounded';
|
|
42
|
+
import CheckBoxOutlineBlankRoundedIcon from '@material-ui/icons/CheckBoxOutlineBlankRounded';
|
|
43
|
+
var useCheckBoxStyles = function (props) {
|
|
44
|
+
return makeStyles(function () { return ({
|
|
45
|
+
root: {
|
|
46
|
+
padding: props.padding,
|
|
47
|
+
fontSize: props.size,
|
|
48
|
+
color: props.error ? props.errorColor : props.uncheckedColor,
|
|
49
|
+
'&.Mui-checked': {
|
|
50
|
+
color: props.checkedColor,
|
|
51
|
+
},
|
|
52
|
+
'&.Mui-checked:hover': {
|
|
53
|
+
backgroundColor: props.checkedHoverColor,
|
|
54
|
+
},
|
|
55
|
+
'&.Mui-disabled': {
|
|
56
|
+
cursor: 'default',
|
|
57
|
+
pointerEvents: 'all !important',
|
|
58
|
+
color: props.cantEdit
|
|
59
|
+
? props.disabledColor
|
|
60
|
+
: props.checkedColor,
|
|
61
|
+
},
|
|
62
|
+
'&:hover': {
|
|
63
|
+
backgroundColor: props.cantEdit
|
|
64
|
+
? 'transparent'
|
|
65
|
+
: props.checkedHoverColor,
|
|
66
|
+
},
|
|
67
|
+
},
|
|
68
|
+
}); });
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Generic rounded checkbox
|
|
72
|
+
*/
|
|
73
|
+
function CustomCheckBox(_a) {
|
|
74
|
+
var _b = _a.padding, padding = _b === void 0 ? '9px' : _b, onChange = _a.onChange, _c = _a.error, error = _c === void 0 ? false : _c, _d = _a.size, size = _d === void 0 ? '1.5rem' : _d, _e = _a.checkedColor, checkedColor = _e === void 0 ? '#3d5a7f' : _e, _f = _a.uncheckedColor, uncheckedColor = _f === void 0 ? '#787878' : _f, _g = _a.disabledColor, disabledColor = _g === void 0 ? '#A0A0A0' : _g, _h = _a.errorColor, errorColor = _h === void 0 ? '#cc2936' : _h, _j = _a.cantEdit, cantEdit = _j === void 0 ? false : _j, checked = _a.checked, others = __rest(_a, ["padding", "onChange", "error", "size", "checkedColor", "uncheckedColor", "disabledColor", "errorColor", "cantEdit", "checked"]);
|
|
75
|
+
var classes = useCheckBoxStyles({
|
|
76
|
+
size: size,
|
|
77
|
+
error: error,
|
|
78
|
+
padding: padding,
|
|
79
|
+
cantEdit: cantEdit,
|
|
80
|
+
errorColor: errorColor,
|
|
81
|
+
checkedColor: checkedColor,
|
|
82
|
+
disabledColor: disabledColor,
|
|
83
|
+
uncheckedColor: uncheckedColor,
|
|
84
|
+
checkedHoverColor: checkedColor + '0a',
|
|
85
|
+
})();
|
|
86
|
+
return (_jsx(Checkbox, __assign({}, others, { disabled: cantEdit, classes: classes, checked: checked, onChange: onChange, required: true, icon: _jsx(CheckBoxOutlineBlankRoundedIcon, { fontSize: "inherit" }), checkedIcon: _jsx(CheckBoxRoundedIcon, { fontSize: "inherit" }) })));
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Generic datepicker with apps designs. Is class do to the use in the react-hook-forms library
|
|
90
|
+
*/
|
|
91
|
+
var RoundedCheckBox = /** @class */ (function (_super) {
|
|
92
|
+
__extends(RoundedCheckBox, _super);
|
|
93
|
+
function RoundedCheckBox() {
|
|
94
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
95
|
+
}
|
|
96
|
+
RoundedCheckBox.prototype.render = function () {
|
|
97
|
+
return _jsx(CustomCheckBox, __assign({}, this.props));
|
|
98
|
+
};
|
|
99
|
+
return RoundedCheckBox;
|
|
100
|
+
}(React.Component));
|
|
101
|
+
export default RoundedCheckBox;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { DatePickerProps } from '@material-ui/pickers';
|
|
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
|
+
hoverColor?: string;
|
|
9
|
+
/** The color of the error to display */
|
|
10
|
+
errorColor?: string;
|
|
11
|
+
/** The color of the outline when it is not selected */
|
|
12
|
+
outlineColor?: string;
|
|
13
|
+
/** The backgroundColor of the input */
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
/** The secondary color of the dialog */
|
|
16
|
+
secondaryColor?: string;
|
|
17
|
+
/** The contrastColor of the input */
|
|
18
|
+
contrastColor?: string;
|
|
19
|
+
/** The accent color of the input */
|
|
20
|
+
accentColor?: string;
|
|
21
|
+
/** The borderRadius of the input */
|
|
22
|
+
borderRadius?: number;
|
|
23
|
+
/** If it should display the timePicker */
|
|
24
|
+
pickTime?: boolean;
|
|
25
|
+
/** The padding of the input */
|
|
26
|
+
padding?: string;
|
|
27
|
+
/** The size of the font to display the input in */
|
|
28
|
+
fontSize?: number | string;
|
|
29
|
+
/** The weight of the font of the value and the placeholder */
|
|
30
|
+
fontWeight?: number | string;
|
|
31
|
+
/** The fontsize of the shrunken label */
|
|
32
|
+
shrunkenFontSize?: number | string;
|
|
33
|
+
/** Cant edit */
|
|
34
|
+
cantEdit?: boolean;
|
|
35
|
+
/** The color of the helper text when not error */
|
|
36
|
+
helperTextColor?: string;
|
|
37
|
+
/** Height of the component */
|
|
38
|
+
height?: string;
|
|
39
|
+
}
|
|
40
|
+
interface RoundedDatePickerProps extends StyleProps {
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Generic datepicker with apps designs. Is class do to the use in the react-hook-forms library
|
|
44
|
+
*/
|
|
45
|
+
declare class RoundedDatePicker extends React.Component<RoundedDatePickerProps & DatePickerProps> {
|
|
46
|
+
render(): JSX.Element;
|
|
47
|
+
}
|
|
48
|
+
export default RoundedDatePicker;
|