@arquimedes.co/eureka-forms 1.9.82-test → 1.9.84-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 -62
- 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 -8
- 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 -42
- 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 -39
- 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
package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/MapperElement.module.css
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
.container,
|
|
2
|
-
.mobileContainer {
|
|
3
|
-
background-color: #f0f0f0;
|
|
4
|
-
border: 1px solid #d6d6d6;
|
|
5
|
-
width: fit-content;
|
|
6
|
-
border-radius: 20px;
|
|
7
|
-
margin-bottom: 10px;
|
|
8
|
-
margin-top: 10px;
|
|
9
|
-
margin-left: auto;
|
|
10
|
-
margin-right: auto;
|
|
11
|
-
padding-top: 20px;
|
|
12
|
-
padding-bottom: 20px;
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
.container {
|
|
16
|
-
max-width: calc(100% - 112px);
|
|
17
|
-
padding-right: 55px;
|
|
18
|
-
padding-left: 55px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.mobileContainer {
|
|
22
|
-
max-width: calc(100% - 42px);
|
|
23
|
-
padding-right: 20px;
|
|
24
|
-
padding-left: 20px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.titleLbl {
|
|
28
|
-
width: 100%;
|
|
29
|
-
font-size: 20px;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
text-overflow: ellipsis;
|
|
34
|
-
cursor: default;
|
|
35
|
-
margin-left: 10px;
|
|
36
|
-
margin-bottom: 10px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.contentContainer {
|
|
40
|
-
margin-left: auto;
|
|
41
|
-
margin-right: auto;
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-flow: row wrap;
|
|
44
|
-
height: fit-content;
|
|
45
|
-
max-width: 100%;
|
|
46
|
-
overflow-x: hidden;
|
|
47
|
-
overflow-y: hidden;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.deleteBtn,
|
|
51
|
-
.disabledDeleteBtn {
|
|
52
|
-
font-size: 24px;
|
|
53
|
-
position: absolute;
|
|
54
|
-
right: 15px;
|
|
55
|
-
top: 15px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.deleteBtn {
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MapperStepProps } from '../../../MapperStep';
|
|
3
|
-
import { MapperElementComponentProps } from '../MapperElement';
|
|
4
|
-
declare function PillElementContainer<Type = any>({ step, form, num, element, children, editable, postview, formStyle, handleDelete, widthStats, customElementModifiers, }: MapperStepProps & MapperElementComponentProps<Type> & {
|
|
5
|
-
num: number;
|
|
6
|
-
formStyle: {
|
|
7
|
-
textColor: string;
|
|
8
|
-
};
|
|
9
|
-
handleDelete?: Function;
|
|
10
|
-
/** children to render */
|
|
11
|
-
children?: any;
|
|
12
|
-
}): JSX.Element;
|
|
13
|
-
export default PillElementContainer;
|
|
@@ -1,33 +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 { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import styles from './PillElementContainer.module.css';
|
|
14
|
-
import DeleteRoundedIcon from '@material-ui/icons/DeleteRounded';
|
|
15
|
-
function PillElementContainer(_a) {
|
|
16
|
-
var _b, _c;
|
|
17
|
-
var step = _a.step, form = _a.form, num = _a.num, element = _a.element, children = _a.children, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, handleDelete = _a.handleDelete, widthStats = _a.widthStats, customElementModifiers = _a.customElementModifiers;
|
|
18
|
-
var size = form.size;
|
|
19
|
-
var calcName = (customElementModifiers !== null && customElementModifiers !== void 0 ? customElementModifiers : {}).calcName;
|
|
20
|
-
return (_jsx("div", __assign({ className: widthStats.isMobile ? styles.mobileContainer : styles.container }, { children: _jsxs("div", __assign({ className: styles.contentContainer, style: {
|
|
21
|
-
width: (size.blockSize + size.spacingSize) *
|
|
22
|
-
((_c = (_b = step.style) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : size.blockNum - 1),
|
|
23
|
-
} }, { children: [_jsxs("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: [calcName
|
|
24
|
-
? calcName(element)
|
|
25
|
-
: step.unitLabel + ' ' + (num + 1), ":"] })), step.deletable !== false && (_jsx("div", __assign({ className: !editable || postview
|
|
26
|
-
? styles.disabledDeleteBtn
|
|
27
|
-
: styles.deleteBtn, style: { color: formStyle.textColor }, onClick: function () {
|
|
28
|
-
if (editable && !postview) {
|
|
29
|
-
handleDelete === null || handleDelete === void 0 ? void 0 : handleDelete();
|
|
30
|
-
}
|
|
31
|
-
} }, { children: _jsx(DeleteRoundedIcon, { fontSize: "inherit" }) }))), children] })) })));
|
|
32
|
-
}
|
|
33
|
-
export default PillElementContainer;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
.container,
|
|
2
|
-
.mobileContainer {
|
|
3
|
-
background-color: #f0f0f0;
|
|
4
|
-
border: 1px solid #d6d6d6;
|
|
5
|
-
width: fit-content;
|
|
6
|
-
border-radius: 20px;
|
|
7
|
-
margin-bottom: 10px;
|
|
8
|
-
margin-top: 10px;
|
|
9
|
-
margin-left: auto;
|
|
10
|
-
margin-right: auto;
|
|
11
|
-
padding-top: 20px;
|
|
12
|
-
padding-bottom: 20px;
|
|
13
|
-
position: relative;
|
|
14
|
-
}
|
|
15
|
-
.container {
|
|
16
|
-
max-width: calc(100% - 112px);
|
|
17
|
-
padding-right: 55px;
|
|
18
|
-
padding-left: 55px;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.mobileContainer {
|
|
22
|
-
max-width: calc(100% - 42px);
|
|
23
|
-
padding-right: 20px;
|
|
24
|
-
padding-left: 20px;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
.titleLbl {
|
|
28
|
-
width: 100%;
|
|
29
|
-
font-size: 20px;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
overflow: hidden;
|
|
33
|
-
text-overflow: ellipsis;
|
|
34
|
-
cursor: default;
|
|
35
|
-
margin-left: 10px;
|
|
36
|
-
margin-bottom: 10px;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.contentContainer {
|
|
40
|
-
margin-left: auto;
|
|
41
|
-
margin-right: auto;
|
|
42
|
-
display: flex;
|
|
43
|
-
flex-flow: row wrap;
|
|
44
|
-
height: fit-content;
|
|
45
|
-
max-width: 100%;
|
|
46
|
-
overflow-x: hidden;
|
|
47
|
-
overflow-y: hidden;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
.deleteBtn,
|
|
51
|
-
.disabledDeleteBtn {
|
|
52
|
-
font-size: 24px;
|
|
53
|
-
position: absolute;
|
|
54
|
-
right: 15px;
|
|
55
|
-
top: 15px;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.deleteBtn {
|
|
59
|
-
cursor: pointer;
|
|
60
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { MapperStepProps } from '../MapperStep';
|
|
3
|
-
export interface MapperElement<Type> {
|
|
4
|
-
ids: Record<string, string>;
|
|
5
|
-
id: string;
|
|
6
|
-
deleted?: boolean;
|
|
7
|
-
value?: Type;
|
|
8
|
-
}
|
|
9
|
-
export declare function ElementsComponent<Type = any>({ step, form, inputRef, editable, postview, elements, formStyle, customAdd, dependencyStore, setDependencyStore, ...others }: MapperStepProps & {
|
|
10
|
-
onChange: (elements: MapperElement<Type>[]) => void;
|
|
11
|
-
elements: MapperElement<Type>[];
|
|
12
|
-
inputRef: any;
|
|
13
|
-
}): JSX.Element;
|
|
14
|
-
declare function MapperStep(props: MapperStepProps): JSX.Element;
|
|
15
|
-
export default MapperStep;
|
|
@@ -1,275 +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
|
-
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
24
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
25
|
-
if (ar || !(i in from)) {
|
|
26
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
27
|
-
ar[i] = from[i];
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
|
-
};
|
|
32
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
-
import { useState, useEffect, cloneElement } from 'react';
|
|
34
|
-
import styles from './MaterialMapperStep.module.css';
|
|
35
|
-
import { Controller } from 'react-hook-form';
|
|
36
|
-
import StepTypes, { ClassifierOptionTypes, EntityValueOptionTypes, MapperStyleTypes, OptionTypes, } from '../../../../constants/FormStepTypes';
|
|
37
|
-
import RoundedButton from '../../../../shared/RoundedButton/RoundedButton';
|
|
38
|
-
import { nanoid } from 'nanoid';
|
|
39
|
-
import { calcStepDependencyValue } from '../../../Form/ColumnForm/ColumnForm';
|
|
40
|
-
import MapperElementComponent from './Element/MapperElement';
|
|
41
|
-
import AYFFormStepTypes from '../../../../constants/AYFFormStepTypes';
|
|
42
|
-
import CBRFormStepTypes from '../../../../constants/CBRFormStepTypes';
|
|
43
|
-
export function ElementsComponent(_a) {
|
|
44
|
-
var _b, _c;
|
|
45
|
-
var step = _a.step, form = _a.form, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, elements = _a.elements, formStyle = _a.formStyle, customAdd = _a.customAdd, dependencyStore = _a.dependencyStore, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["step", "form", "inputRef", "editable", "postview", "elements", "formStyle", "customAdd", "dependencyStore", "setDependencyStore"]);
|
|
46
|
-
var _d = useState(true), firstRender = _d[0], setFirstRender = _d[1];
|
|
47
|
-
/** Mapper Steps to pass down */
|
|
48
|
-
var _e = useState(), localSteps = _e[0], setLocalSteps = _e[1];
|
|
49
|
-
var onChange = function (elements) {
|
|
50
|
-
var _a;
|
|
51
|
-
var _b;
|
|
52
|
-
if (dependencyStore[step.id] !== undefined && customAdd) {
|
|
53
|
-
setDependencyStore(__assign(__assign({}, dependencyStore), (_a = {}, _a[step.id] = (_b = elements.map(function (element) { return element.value; })) !== null && _b !== void 0 ? _b : null, _a)));
|
|
54
|
-
}
|
|
55
|
-
others.onChange(elements);
|
|
56
|
-
};
|
|
57
|
-
useEffect(function () {
|
|
58
|
-
var _a;
|
|
59
|
-
if (firstRender) {
|
|
60
|
-
if (elements.length > 0) {
|
|
61
|
-
var newSteps = {};
|
|
62
|
-
var deps = __assign({}, dependencyStore);
|
|
63
|
-
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
|
|
64
|
-
var element = elements_1[_i];
|
|
65
|
-
var elemSteps = {};
|
|
66
|
-
for (var _b = 0, _c = Object.keys(step.steps); _b < _c.length; _b++) {
|
|
67
|
-
var idStep = _c[_b];
|
|
68
|
-
var baseStep = JSON.parse(JSON.stringify((_a = step.steps[idStep]) !== null && _a !== void 0 ? _a : '{}'));
|
|
69
|
-
var newIdStep = element.ids[idStep];
|
|
70
|
-
baseStep.id = newIdStep;
|
|
71
|
-
elemSteps[newIdStep] = baseStep;
|
|
72
|
-
newSteps[newIdStep] = baseStep;
|
|
73
|
-
}
|
|
74
|
-
calcRecursiveData(element, elemSteps, deps, others.customSteps, others.originalValues);
|
|
75
|
-
}
|
|
76
|
-
setDependencyStore(deps);
|
|
77
|
-
setLocalSteps(__assign(__assign({}, localSteps), newSteps));
|
|
78
|
-
}
|
|
79
|
-
else if (elements.length === 0 && !postview && editable) {
|
|
80
|
-
handleAddElement();
|
|
81
|
-
}
|
|
82
|
-
setFirstRender(false);
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
onChange([]);
|
|
86
|
-
}
|
|
87
|
-
}, __spreadArray([], ((_c = (_b = step.dependencies) === null || _b === void 0 ? void 0 : _b.map(function (dep) { return dependencyStore[dep]; })) !== null && _c !== void 0 ? _c : []), true));
|
|
88
|
-
var handleAddElement = function (value) {
|
|
89
|
-
var idElement = nanoid();
|
|
90
|
-
var newElement = {
|
|
91
|
-
ids: {},
|
|
92
|
-
id: idElement,
|
|
93
|
-
value: value,
|
|
94
|
-
};
|
|
95
|
-
var newSteps = {};
|
|
96
|
-
for (var _i = 0, _a = Object.keys(step.steps); _i < _a.length; _i++) {
|
|
97
|
-
var idStep = _a[_i];
|
|
98
|
-
var baseStep = JSON.parse(JSON.stringify(step.steps[idStep]));
|
|
99
|
-
var newIdStep = step.id + '-' + idStep + '-' + idElement;
|
|
100
|
-
baseStep.id = newIdStep;
|
|
101
|
-
newElement.ids[idStep] = newIdStep;
|
|
102
|
-
newSteps[newIdStep] = baseStep;
|
|
103
|
-
}
|
|
104
|
-
var deps = __assign({}, dependencyStore);
|
|
105
|
-
calcRecursiveData(newElement, newSteps, others.customSteps, deps);
|
|
106
|
-
onChange(__spreadArray(__spreadArray([], elements, true), [newElement], false));
|
|
107
|
-
setLocalSteps(__assign(__assign({}, localSteps), newSteps));
|
|
108
|
-
setDependencyStore(deps);
|
|
109
|
-
};
|
|
110
|
-
var calcStyles = function () {
|
|
111
|
-
var _a;
|
|
112
|
-
switch ((_a = step.style) === null || _a === void 0 ? void 0 : _a.type) {
|
|
113
|
-
case MapperStyleTypes.LIST:
|
|
114
|
-
return { container: styles.listContainer };
|
|
115
|
-
case MapperStyleTypes.PILL:
|
|
116
|
-
default:
|
|
117
|
-
return { container: styles.pillContainer };
|
|
118
|
-
}
|
|
119
|
-
};
|
|
120
|
-
var container = calcStyles().container;
|
|
121
|
-
if (!localSteps)
|
|
122
|
-
return _jsx("div", {});
|
|
123
|
-
return (_jsxs("div", __assign({ className: container, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.titleLbl }, { children: step.label })), step.description && (_jsx("p", __assign({ className: styles.descriptionPar, style: {
|
|
124
|
-
margin: step.description
|
|
125
|
-
? '10px 0px'
|
|
126
|
-
: '0px 0px 5px 0px',
|
|
127
|
-
} }, { children: step.description }))), elements.map(function (element, index) { return (_jsx(MapperElementComponent, __assign({ num: index, element: element, formStyle: formStyle, step: step, form: __assign(__assign({}, form), { steps: __assign(__assign({}, form.steps), localSteps) }), editable: editable, postview: postview, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore, handleDelete: function () {
|
|
128
|
-
var tempElements = __spreadArray([], elements, true);
|
|
129
|
-
tempElements[index].deleted = true;
|
|
130
|
-
onChange(tempElements);
|
|
131
|
-
} }, others), element.id)); }), _jsxs("div", __assign({ className: styles.btnContainer }, { children: [_jsx("input", { ref: inputRef, className: styles.hiddenInput }), step.creatable !== false && !customAdd && (_jsx(RoundedButton, { disabled: !editable || postview, text: step.addBtnLabel, color: formStyle.primaryContrastColor, backgroundColor: formStyle.primaryColor, fontSize: '1rem', padding: '5px 15px 5px 15px', onClick: function () {
|
|
132
|
-
if (editable && !postview) {
|
|
133
|
-
handleAddElement();
|
|
134
|
-
}
|
|
135
|
-
} })), step.creatable !== false &&
|
|
136
|
-
customAdd &&
|
|
137
|
-
cloneElement(customAdd, {
|
|
138
|
-
inputRef: inputRef,
|
|
139
|
-
disabled: !editable || postview,
|
|
140
|
-
handleAddElement: handleAddElement,
|
|
141
|
-
})] }))] })));
|
|
142
|
-
}
|
|
143
|
-
function MapperStep(props) {
|
|
144
|
-
return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: [], rules: {
|
|
145
|
-
required: props.step.required
|
|
146
|
-
? 'Este campo es obligatorio'
|
|
147
|
-
: undefined,
|
|
148
|
-
}, shouldUnregister: true, render: function (_a) {
|
|
149
|
-
var _b = _a.field, ref = _b.ref, value = _b.value, field = __rest(_b, ["ref", "value"]);
|
|
150
|
-
return (_jsx(ElementsComponent, __assign({}, props, field, { elements: value, inputRef: ref })));
|
|
151
|
-
} }));
|
|
152
|
-
}
|
|
153
|
-
export default MapperStep;
|
|
154
|
-
function calcRecursiveData(element, newSteps, deps, customSteps, originalValues) {
|
|
155
|
-
if (originalValues === void 0) { originalValues = {}; }
|
|
156
|
-
for (var _i = 0, _a = Object.keys(newSteps); _i < _a.length; _i++) {
|
|
157
|
-
var idStep = _a[_i];
|
|
158
|
-
var step = newSteps[idStep];
|
|
159
|
-
if (step.dependencies) {
|
|
160
|
-
for (var i = 0; i < step.dependencies.length; i++) {
|
|
161
|
-
var idDep = step.dependencies[i];
|
|
162
|
-
var newId = element.ids[idDep];
|
|
163
|
-
if (newId) {
|
|
164
|
-
step.dependencies[i] = newId;
|
|
165
|
-
deps[newId] = calcStepDependencyValue(newSteps[newId], originalValues);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
}
|
|
169
|
-
var custom = customSteps[step === null || step === void 0 ? void 0 : step.type];
|
|
170
|
-
if (custom === null || custom === void 0 ? void 0 : custom.calcRecursiveData) {
|
|
171
|
-
custom.calcRecursiveData(step, element.ids);
|
|
172
|
-
}
|
|
173
|
-
switch (step.type) {
|
|
174
|
-
case StepTypes.SELECTOR: {
|
|
175
|
-
for (var _b = 0, _c = step.options; _b < _c.length; _b++) {
|
|
176
|
-
var option = _c[_b];
|
|
177
|
-
if (option.type === OptionTypes.NESTED) {
|
|
178
|
-
for (var i = 0; i < option.steps.length; i++) {
|
|
179
|
-
var idStep_1 = option.steps[i];
|
|
180
|
-
var newId = element.ids[idStep_1];
|
|
181
|
-
option.steps[i] = newId;
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
break;
|
|
186
|
-
}
|
|
187
|
-
case StepTypes.CLASSIFIER_SELECTOR:
|
|
188
|
-
for (var _d = 0, _e = Object.keys(step.options); _d < _e.length; _d++) {
|
|
189
|
-
var idOption = _e[_d];
|
|
190
|
-
var option = step.options[idOption];
|
|
191
|
-
if (option.type === ClassifierOptionTypes.NESTED) {
|
|
192
|
-
for (var i = 0; i < option.steps.length; i++) {
|
|
193
|
-
var idStep_2 = option.steps[i];
|
|
194
|
-
var newId = element.ids[idStep_2];
|
|
195
|
-
option.steps[i] = newId;
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
break;
|
|
200
|
-
case StepTypes.RATING:
|
|
201
|
-
if (step.nestedSteps) {
|
|
202
|
-
for (var _f = 0, _g = step.nestedSteps; _f < _g.length; _f++) {
|
|
203
|
-
var steps = _g[_f];
|
|
204
|
-
for (var i = 0; i < steps.length; i++) {
|
|
205
|
-
var idStep_3 = steps[i];
|
|
206
|
-
var newId = element.ids[idStep_3];
|
|
207
|
-
steps[i] = newId;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
break;
|
|
212
|
-
case StepTypes.COLLAPSIBLE: {
|
|
213
|
-
for (var i = 0; i < step.steps.length; i++) {
|
|
214
|
-
var idStep_4 = step.steps[i];
|
|
215
|
-
var newId = element.ids[idStep_4];
|
|
216
|
-
step.steps[i] = newId;
|
|
217
|
-
}
|
|
218
|
-
break;
|
|
219
|
-
}
|
|
220
|
-
case StepTypes.CHECKBOX: {
|
|
221
|
-
if (step.steps) {
|
|
222
|
-
for (var i = 0; i < step.steps.length; i++) {
|
|
223
|
-
var idStep_5 = step.steps[i];
|
|
224
|
-
var newId = element.ids[idStep_5];
|
|
225
|
-
step.steps[i] = newId;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
break;
|
|
229
|
-
}
|
|
230
|
-
case StepTypes.ENTITYVALUEPICKER:
|
|
231
|
-
for (var _h = 0, _j = step.filters; _h < _j.length; _h++) {
|
|
232
|
-
var filter = _j[_h];
|
|
233
|
-
if (filter.idStep) {
|
|
234
|
-
var newId = element.ids[filter.idStep];
|
|
235
|
-
if (newId) {
|
|
236
|
-
filter.idStep = newId;
|
|
237
|
-
deps[newId] = calcStepDependencyValue(newSteps[newId], originalValues);
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
for (var _k = 0, _l = Object.keys(step.options); _k < _l.length; _k++) {
|
|
242
|
-
var idOption = _l[_k];
|
|
243
|
-
var option = step.options[idOption];
|
|
244
|
-
if (option.type === EntityValueOptionTypes.NESTED) {
|
|
245
|
-
for (var i = 0; i < option.steps.length; i++) {
|
|
246
|
-
var idStep_6 = option.steps[i];
|
|
247
|
-
var newId = element.ids[idStep_6];
|
|
248
|
-
option.steps[i] = newId;
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
break;
|
|
253
|
-
case CBRFormStepTypes.CBR_LOCATIVAS:
|
|
254
|
-
var elementStep = step;
|
|
255
|
-
if (elementStep.subStep) {
|
|
256
|
-
var newId = element.ids[elementStep.subStep];
|
|
257
|
-
if (newId) {
|
|
258
|
-
elementStep.subStep = newId;
|
|
259
|
-
}
|
|
260
|
-
}
|
|
261
|
-
break;
|
|
262
|
-
case AYFFormStepTypes.AYF_ICA_CITY:
|
|
263
|
-
var cityStep = step;
|
|
264
|
-
if (cityStep.idNitStep) {
|
|
265
|
-
var newId = element.ids[cityStep.idNitStep];
|
|
266
|
-
if (newId) {
|
|
267
|
-
cityStep.idNitStep = newId;
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
break;
|
|
271
|
-
default:
|
|
272
|
-
break;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
}
|
package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.module.css
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
.pillContainer {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: calc(100% - 20px);
|
|
5
|
-
max-width: calc(100% - 20px);
|
|
6
|
-
padding: 5px 10px;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
.listContainer {
|
|
10
|
-
display: flex;
|
|
11
|
-
flex-direction: column;
|
|
12
|
-
padding: 5px 0px;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.hiddenInput {
|
|
16
|
-
height: 0;
|
|
17
|
-
width: 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
border-width: 0;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.titleLbl {
|
|
23
|
-
font-size: 24px;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
white-space: nowrap;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
text-overflow: ellipsis;
|
|
28
|
-
cursor: default;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.descriptionPar {
|
|
32
|
-
font-size: 16px;
|
|
33
|
-
white-space: pre-wrap;
|
|
34
|
-
cursor: default;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.btnContainer {
|
|
38
|
-
margin-top: 15px;
|
|
39
|
-
margin-left: 15px;
|
|
40
|
-
margin-bottom: 3px;
|
|
41
|
-
width: fit-content;
|
|
42
|
-
}
|
|
@@ -1,71 +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 { createElement as _createElement } from "react";
|
|
25
|
-
import styles from './MaterialRatingStep.module.css';
|
|
26
|
-
import { Controller } from 'react-hook-form';
|
|
27
|
-
import React from 'react';
|
|
28
|
-
import Rating from '../../../../shared/Rating/Rating';
|
|
29
|
-
import { RatingTypes } from '../../../../constants/FormStepTypes';
|
|
30
|
-
import StepComponent from '../../Step';
|
|
31
|
-
function MaterialRatingStep(_a) {
|
|
32
|
-
var _b, _c, _d, _e, _f;
|
|
33
|
-
var form = _a.form, step = _a.step, value = _a.value, level = _a.level, errors = _a.errors, onChange = _a.onChange, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats, others = __rest(_a, ["form", "step", "value", "level", "errors", "onChange", "inputRef", "editable", "postview", "formStyle", "widthStats"]);
|
|
34
|
-
var renderNestedOption = function () {
|
|
35
|
-
var currentOption;
|
|
36
|
-
if (value !== undefined && value !== null && step.nestedSteps) {
|
|
37
|
-
if (step.ratingType === RatingTypes.LIKE) {
|
|
38
|
-
currentOption = step.nestedSteps[value];
|
|
39
|
-
}
|
|
40
|
-
else {
|
|
41
|
-
currentOption = step.nestedSteps[value - 1];
|
|
42
|
-
}
|
|
43
|
-
if (currentOption && currentOption.length > 0) {
|
|
44
|
-
return (_jsx(React.Fragment, { children: currentOption.map(function (idSubStep) {
|
|
45
|
-
var subStep = form.steps[idSubStep];
|
|
46
|
-
return (_createElement(StepComponent, __assign({}, others, { form: form, postview: postview, editable: editable, formStyle: formStyle, errors: errors, widthStats: widthStats, step: subStep, key: idSubStep, level: level + 1 })));
|
|
47
|
-
}) }));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
return (_jsxs(React.Fragment, { children: [_jsxs("div", __assign({ className: styles.container, style: {
|
|
52
|
-
paddingBottom: step.description || step.required ? 0 : 15,
|
|
53
|
-
} }, { children: [_jsx("div", __assign({ className: styles.labelLabel }, { children: step.label + (step.required ? ' *' : '') })), _jsx("div", __assign({ className: styles.ratingContainer }, { children: _jsx(Rating, { name: step.id, type: step.ratingType, isMobile: widthStats.isMobile, focusColor: (_b = formStyle.primaryColor) !== null && _b !== void 0 ? _b : '#3d5a7f', unSelectedColor: (_c = formStyle.outlineColor) !== null && _c !== void 0 ? _c : '#b8b8b8', disabled: !editable || postview, value: value, onChange: onChange, inputRef: inputRef }) })), (step.description || step.required) && (_jsx("div", __assign({ className: styles.stepDescriptionLabel, style: {
|
|
54
|
-
color: !!errors[step.id] && value === null
|
|
55
|
-
? (_d = formStyle.errorColor) !== null && _d !== void 0 ? _d : '#cc2936'
|
|
56
|
-
: (_e = formStyle.descriptionTextColor) !== null && _e !== void 0 ? _e : '#989898',
|
|
57
|
-
} }, { children: !!errors[step.id] && value === null
|
|
58
|
-
? (_f = errors[step.id]) === null || _f === void 0 ? void 0 : _f.message
|
|
59
|
-
: step.description })))] })), renderNestedOption()] }));
|
|
60
|
-
}
|
|
61
|
-
function RatingStep(props) {
|
|
62
|
-
return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: null, rules: {
|
|
63
|
-
required: props.step.required
|
|
64
|
-
? 'Este campo es obligatorio'
|
|
65
|
-
: undefined,
|
|
66
|
-
}, shouldUnregister: true, render: function (_a) {
|
|
67
|
-
var _b = _a.field, ref = _b.ref, field = __rest(_b, ["ref"]);
|
|
68
|
-
return (_jsx(MaterialRatingStep, __assign({}, props, field, { inputRef: ref })));
|
|
69
|
-
} }));
|
|
70
|
-
}
|
|
71
|
-
export default RatingStep;
|
package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.module.css
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
.container {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
width: 100%;
|
|
5
|
-
max-width: calc(100% - 20px);
|
|
6
|
-
padding: 5px 10px;
|
|
7
|
-
padding-bottom: 15px;
|
|
8
|
-
}
|
|
9
|
-
.labelLabel {
|
|
10
|
-
font-size: 16px;
|
|
11
|
-
margin-bottom: 10px;
|
|
12
|
-
text-align: center;
|
|
13
|
-
}
|
|
14
|
-
.ratingContainer {
|
|
15
|
-
display: flex;
|
|
16
|
-
align-items: center;
|
|
17
|
-
justify-content: center;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
.stepDescriptionLabel {
|
|
21
|
-
font-size: 0.75rem;
|
|
22
|
-
margin-top: 5px;
|
|
23
|
-
font-weight: 400;
|
|
24
|
-
line-height: 1.66;
|
|
25
|
-
max-width: 100%;
|
|
26
|
-
overflow: hidden;
|
|
27
|
-
text-overflow: ellipsis;
|
|
28
|
-
text-align: center;
|
|
29
|
-
min-height: 20px;
|
|
30
|
-
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Rating } from '../../../@Types/FormStep';
|
|
3
|
-
import { StepProps } from '../Step';
|
|
4
|
-
export interface RatingStepProps extends StepProps {
|
|
5
|
-
/** The RatingStep to display */
|
|
6
|
-
step: Rating;
|
|
7
|
-
}
|
|
8
|
-
declare function RatingStep(props: RatingStepProps): JSX.Element;
|
|
9
|
-
export default RatingStep;
|
|
@@ -1,23 +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 { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
-
import { FormStyleTypes } from '../../../constants/FormStepTypes';
|
|
14
|
-
import MaterialRatingStep from './MaterialRatingStep/MaterialRatingStep';
|
|
15
|
-
function RatingStep(props) {
|
|
16
|
-
switch (props.formStyle.type) {
|
|
17
|
-
case FormStyleTypes.MATERIAL:
|
|
18
|
-
default: {
|
|
19
|
-
return _jsx(MaterialRatingStep, __assign({}, props));
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
export default RatingStep;
|