@arquimedes.co/eureka-forms 0.1.2 → 0.2.5
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 +1 -1
- package/dist/@Types/@Types.js +1 -1
- package/dist/@Types/Form.d.ts +63 -63
- package/dist/@Types/Form.js +1 -1
- package/dist/@Types/FormStep.d.ts +105 -105
- package/dist/@Types/FormStep.js +1 -1
- package/dist/@Types/Organization.d.ts +16 -16
- package/dist/@Types/Organization.js +1 -1
- package/dist/App.d.ts +34 -32
- package/dist/App.js +262 -261
- package/dist/App.module.css +21 -0
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +4 -4
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +232 -232
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +46 -0
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +12 -12
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +33 -33
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +48 -0
- package/dist/FormComponents/Form/Form.d.ts +24 -23
- package/dist/FormComponents/Form/Form.js +116 -116
- package/dist/FormComponents/Form/Form.module.css +39 -0
- package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +4 -4
- package/dist/FormComponents/Form/StepperForm/StepperForm.js +6 -6
- package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +4 -4
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +42 -42
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +8 -0
- package/dist/FormComponents/Section/Section.d.ts +24 -23
- package/dist/FormComponents/Section/Section.js +25 -25
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -9
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +37 -37
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -4
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +105 -105
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +9 -9
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +25 -25
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -4
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +35 -35
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +9 -0
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +9 -9
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +25 -25
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +11 -11
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +110 -110
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +52 -0
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +13 -13
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +165 -165
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +45 -0
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -4
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +99 -99
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +25 -0
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +9 -9
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +37 -37
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -4
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +11 -11
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +9 -9
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +37 -37
- package/dist/FormComponents/Step/Step.d.ts +10 -10
- package/dist/FormComponents/Step/Step.js +73 -64
- package/dist/FormComponents/Step/StepFunctions.d.ts +5 -5
- package/dist/FormComponents/Step/StepFunctions.js +51 -51
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +35 -0
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +6 -6
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +112 -112
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +58 -0
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +9 -9
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +25 -25
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -4
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +43 -43
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +9 -9
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +25 -25
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -4
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +18 -18
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +35 -0
- package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +9 -9
- package/dist/FormComponents/Step/TitleStep/TitleStep.js +37 -37
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +4 -4
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +77 -77
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +73 -0
- package/dist/FormComponents/Term/Term.d.ts +15 -15
- package/dist/FormComponents/Term/Term.js +25 -25
- package/dist/Widget.d.ts +1 -1
- package/dist/Widget.js +39 -56
- package/dist/constants/Files/FileExtensions.d.ts +3 -3
- package/dist/constants/Files/FileExtensions.js +65 -65
- package/dist/constants/Files/FileMaxSize.d.ts +2 -2
- package/dist/constants/Files/FileMaxSize.js +2 -2
- package/dist/constants/FormStepTypes.d.ts +33 -33
- package/dist/constants/FormStepTypes.js +39 -39
- package/dist/constants/InternalFormStyle.d.ts +3 -3
- package/dist/constants/InternalFormStyle.js +12 -12
- package/dist/constants/MaterialClassNameSeed.d.ts +1 -1
- package/dist/constants/MaterialClassNameSeed.js +1 -1
- package/dist/controllers/FileService.d.ts +5 -5
- package/dist/controllers/FileService.js +89 -89
- package/dist/index.d.ts +1 -2
- package/dist/index.js +16 -17
- package/dist/index.lib.d.ts +3 -0
- package/dist/index.lib.js +3 -0
- package/dist/index.module.css +14 -0
- package/dist/shared/Loader/Loader.d.ts +18 -18
- package/dist/shared/Loader/Loader.js +26 -26
- package/dist/shared/Loader/Loader.module.css +12 -0
- package/dist/shared/Navbar/Navbar.d.ts +9 -9
- package/dist/shared/Navbar/Navbar.js +18 -18
- package/dist/shared/Navbar/Navbar.module.css +18 -0
- package/dist/shared/RoundedButton/RoundedButton.d.ts +30 -30
- package/dist/shared/RoundedButton/RoundedButton.js +45 -45
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -24
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +101 -101
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +40 -40
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +246 -246
- package/dist/shared/RoundedSelect/RoundedSelect.d.ts +42 -42
- package/dist/shared/RoundedSelect/RoundedSelect.js +171 -171
- package/dist/shared/RoundedTextField/RoundedTextField.d.ts +41 -41
- package/dist/shared/RoundedTextField/RoundedTextField.js +138 -138
- package/package.json +2 -2
|
@@ -1,25 +1,25 @@
|
|
|
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 MaterialTextAreaStep from './MaterialTextAreaStep/MaterialTextAreaStep';
|
|
15
|
-
function TextAreaStep(props) {
|
|
16
|
-
switch (props.formStyle.type) {
|
|
17
|
-
case FormStyleTypes.MATERIAL: {
|
|
18
|
-
return _jsx(MaterialTextAreaStep, __assign({}, props), void 0);
|
|
19
|
-
}
|
|
20
|
-
default: {
|
|
21
|
-
return _jsx(MaterialTextAreaStep, __assign({}, props), void 0);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export default TextAreaStep;
|
|
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 MaterialTextAreaStep from './MaterialTextAreaStep/MaterialTextAreaStep';
|
|
15
|
+
function TextAreaStep(props) {
|
|
16
|
+
switch (props.formStyle.type) {
|
|
17
|
+
case FormStyleTypes.MATERIAL: {
|
|
18
|
+
return _jsx(MaterialTextAreaStep, __assign({}, props), void 0);
|
|
19
|
+
}
|
|
20
|
+
default: {
|
|
21
|
+
return _jsx(MaterialTextAreaStep, __assign({}, props), void 0);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export default TextAreaStep;
|
package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextInputStepProps } from '../TextInputStep';
|
|
3
|
-
declare function TextInputStep({ step, form, postview, formStyle, widthStats, control, errors, }: TextInputStepProps): JSX.Element;
|
|
4
|
-
export default TextInputStep;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInputStepProps } from '../TextInputStep';
|
|
3
|
+
declare function TextInputStep({ step, form, postview, formStyle, widthStats, control, errors, }: TextInputStepProps): JSX.Element;
|
|
4
|
+
export default TextInputStep;
|
package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js
CHANGED
|
@@ -1,43 +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 } from "react/jsx-runtime";
|
|
13
|
-
import RoundedTextField from '../../../../shared/RoundedTextField/RoundedTextField';
|
|
14
|
-
import styles from './MaterialTextInputStep.module.css';
|
|
15
|
-
import { Controller } from 'react-hook-form';
|
|
16
|
-
import { calcStepWidth } from '../../StepFunctions';
|
|
17
|
-
function TextInputStep(_a) {
|
|
18
|
-
var step = _a.step, form = _a.form, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats, control = _a.control, errors = _a.errors;
|
|
19
|
-
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
20
|
-
width: widthStats.currentBreakPoint <= step.size
|
|
21
|
-
? '100%'
|
|
22
|
-
: calcStepWidth(step.size, form),
|
|
23
|
-
minHeight: step.description || step.required || step.validation
|
|
24
|
-
? '55px'
|
|
25
|
-
: '43px',
|
|
26
|
-
} }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: "", rules: {
|
|
27
|
-
required: step.required
|
|
28
|
-
? 'Este campo es obligatorio'
|
|
29
|
-
: undefined,
|
|
30
|
-
pattern: step.validation
|
|
31
|
-
? {
|
|
32
|
-
value: new RegExp(step.validation.value),
|
|
33
|
-
message: step.validation.message,
|
|
34
|
-
}
|
|
35
|
-
: undefined,
|
|
36
|
-
}, shouldUnregister: true, render: function (_a) {
|
|
37
|
-
var field = _a.field;
|
|
38
|
-
return (_jsx(RoundedTextField, __assign({}, field, { label: step.label, cantEdit: postview, required: step.required, fontWeight: 400, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperText: errors[step.id]
|
|
39
|
-
? errors[step.id].message
|
|
40
|
-
: step.description, error: !!errors[step.id] }), void 0));
|
|
41
|
-
} }, void 0) }), void 0));
|
|
42
|
-
}
|
|
43
|
-
export default TextInputStep;
|
|
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 RoundedTextField from '../../../../shared/RoundedTextField/RoundedTextField';
|
|
14
|
+
import styles from './MaterialTextInputStep.module.css';
|
|
15
|
+
import { Controller } from 'react-hook-form';
|
|
16
|
+
import { calcStepWidth } from '../../StepFunctions';
|
|
17
|
+
function TextInputStep(_a) {
|
|
18
|
+
var step = _a.step, form = _a.form, postview = _a.postview, formStyle = _a.formStyle, widthStats = _a.widthStats, control = _a.control, errors = _a.errors;
|
|
19
|
+
return (_jsx("div", __assign({ className: styles.container, style: {
|
|
20
|
+
width: widthStats.currentBreakPoint <= step.size
|
|
21
|
+
? '100%'
|
|
22
|
+
: calcStepWidth(step.size, form),
|
|
23
|
+
minHeight: step.description || step.required || step.validation
|
|
24
|
+
? '55px'
|
|
25
|
+
: '43px',
|
|
26
|
+
} }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: "", rules: {
|
|
27
|
+
required: step.required
|
|
28
|
+
? 'Este campo es obligatorio'
|
|
29
|
+
: undefined,
|
|
30
|
+
pattern: step.validation
|
|
31
|
+
? {
|
|
32
|
+
value: new RegExp(step.validation.value),
|
|
33
|
+
message: step.validation.message,
|
|
34
|
+
}
|
|
35
|
+
: undefined,
|
|
36
|
+
}, shouldUnregister: true, render: function (_a) {
|
|
37
|
+
var field = _a.field;
|
|
38
|
+
return (_jsx(RoundedTextField, __assign({}, field, { label: step.label, cantEdit: postview, required: step.required, fontWeight: 400, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, backgroundColor: formStyle.backgroundColor, innerBackgroundColor: formStyle.stepBackgroundColor, helperText: errors[step.id]
|
|
39
|
+
? errors[step.id].message
|
|
40
|
+
: step.description, error: !!errors[step.id] }), void 0));
|
|
41
|
+
} }, void 0) }), void 0));
|
|
42
|
+
}
|
|
43
|
+
export default TextInputStep;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TextInput } from '../../../@Types/FormStep';
|
|
3
|
-
import { StepProps } from '../Step';
|
|
4
|
-
export interface TextInputStepProps extends StepProps {
|
|
5
|
-
/** The TextInputStep to display */
|
|
6
|
-
step: TextInput;
|
|
7
|
-
}
|
|
8
|
-
declare function TextInputStep(props: TextInputStepProps): JSX.Element;
|
|
9
|
-
export default TextInputStep;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TextInput } from '../../../@Types/FormStep';
|
|
3
|
+
import { StepProps } from '../Step';
|
|
4
|
+
export interface TextInputStepProps extends StepProps {
|
|
5
|
+
/** The TextInputStep to display */
|
|
6
|
+
step: TextInput;
|
|
7
|
+
}
|
|
8
|
+
declare function TextInputStep(props: TextInputStepProps): JSX.Element;
|
|
9
|
+
export default TextInputStep;
|
|
@@ -1,25 +1,25 @@
|
|
|
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 MaterialTextInputStep from './MaterialTextInputStep/MaterialTextInputStep';
|
|
15
|
-
function TextInputStep(props) {
|
|
16
|
-
switch (props.formStyle.type) {
|
|
17
|
-
case FormStyleTypes.MATERIAL: {
|
|
18
|
-
return _jsx(MaterialTextInputStep, __assign({}, props), void 0);
|
|
19
|
-
}
|
|
20
|
-
default: {
|
|
21
|
-
return _jsx(MaterialTextInputStep, __assign({}, props), void 0);
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
export default TextInputStep;
|
|
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 MaterialTextInputStep from './MaterialTextInputStep/MaterialTextInputStep';
|
|
15
|
+
function TextInputStep(props) {
|
|
16
|
+
switch (props.formStyle.type) {
|
|
17
|
+
case FormStyleTypes.MATERIAL: {
|
|
18
|
+
return _jsx(MaterialTextInputStep, __assign({}, props), void 0);
|
|
19
|
+
}
|
|
20
|
+
default: {
|
|
21
|
+
return _jsx(MaterialTextInputStep, __assign({}, props), void 0);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
export default TextInputStep;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TitleStepProps } from '../TitleStep';
|
|
3
|
-
declare function TitleStep({ step, formStyle }: TitleStepProps): JSX.Element;
|
|
4
|
-
export default TitleStep;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TitleStepProps } from '../TitleStep';
|
|
3
|
+
declare function TitleStep({ step, formStyle }: TitleStepProps): JSX.Element;
|
|
4
|
+
export default TitleStep;
|
|
@@ -1,18 +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, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
-
import styles from './MaterialTitleStep.module.css';
|
|
14
|
-
function TitleStep(_a) {
|
|
15
|
-
var step = _a.step, formStyle = _a.formStyle;
|
|
16
|
-
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.titleLbl }, { children: step.title }), void 0), step.description && (_jsx("p", __assign({ className: styles.descriptionPar }, { children: step.description }), void 0))] }), void 0));
|
|
17
|
-
}
|
|
18
|
-
export default TitleStep;
|
|
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 './MaterialTitleStep.module.css';
|
|
14
|
+
function TitleStep(_a) {
|
|
15
|
+
var step = _a.step, formStyle = _a.formStyle;
|
|
16
|
+
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.titleLbl }, { children: step.title }), void 0), step.description && (_jsx("p", __assign({ className: styles.descriptionPar }, { children: step.description }), void 0))] }), void 0));
|
|
17
|
+
}
|
|
18
|
+
export default TitleStep;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.container {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
width: 900px;
|
|
5
|
+
margin-bottom: 10px;
|
|
6
|
+
padding: 10px;
|
|
7
|
+
padding-bottom: 0px;
|
|
8
|
+
padding-top: 5px;
|
|
9
|
+
margin-bottom: 5px;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.titleLbl {
|
|
13
|
+
font-size: 24px;
|
|
14
|
+
font-weight: 600;
|
|
15
|
+
white-space: nowrap;
|
|
16
|
+
overflow: hidden;
|
|
17
|
+
text-overflow: ellipsis;
|
|
18
|
+
-moz-user-select: none;
|
|
19
|
+
-khtml-user-select: none;
|
|
20
|
+
-webkit-user-select: none;
|
|
21
|
+
-ms-user-select: none;
|
|
22
|
+
user-select: none;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.descriptionPar {
|
|
26
|
+
font-size: 16px;
|
|
27
|
+
margin: 0px;
|
|
28
|
+
white-space: pre-wrap;
|
|
29
|
+
margin-top: 15px;
|
|
30
|
+
-moz-user-select: none;
|
|
31
|
+
-khtml-user-select: none;
|
|
32
|
+
-webkit-user-select: none;
|
|
33
|
+
-ms-user-select: none;
|
|
34
|
+
user-select: none;
|
|
35
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { Title } from '../../../@Types/FormStep';
|
|
3
|
-
import { StepProps } from '../Step';
|
|
4
|
-
export interface TitleStepProps extends StepProps {
|
|
5
|
-
/** The TitleStep to display */
|
|
6
|
-
step: Title;
|
|
7
|
-
}
|
|
8
|
-
declare function TitleStep({ step, formStyle, ...others }: TitleStepProps): JSX.Element;
|
|
9
|
-
export default TitleStep;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Title } from '../../../@Types/FormStep';
|
|
3
|
+
import { StepProps } from '../Step';
|
|
4
|
+
export interface TitleStepProps extends StepProps {
|
|
5
|
+
/** The TitleStep to display */
|
|
6
|
+
step: Title;
|
|
7
|
+
}
|
|
8
|
+
declare function TitleStep({ step, formStyle, ...others }: TitleStepProps): JSX.Element;
|
|
9
|
+
export default TitleStep;
|
|
@@ -1,37 +1,37 @@
|
|
|
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 { FormStyleTypes } from '../../../constants/FormStepTypes';
|
|
25
|
-
import MaterialTitleStep from './MaterialTitleStep/MaterialTitleStep';
|
|
26
|
-
function TitleStep(_a) {
|
|
27
|
-
var step = _a.step, formStyle = _a.formStyle, others = __rest(_a, ["step", "formStyle"]);
|
|
28
|
-
switch (formStyle.type) {
|
|
29
|
-
case FormStyleTypes.MATERIAL: {
|
|
30
|
-
return (_jsx(MaterialTitleStep, __assign({ step: step, formStyle: formStyle }, others), void 0));
|
|
31
|
-
}
|
|
32
|
-
default: {
|
|
33
|
-
return (_jsx(MaterialTitleStep, __assign({ step: step, formStyle: formStyle }, others), void 0));
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
export default TitleStep;
|
|
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 { FormStyleTypes } from '../../../constants/FormStepTypes';
|
|
25
|
+
import MaterialTitleStep from './MaterialTitleStep/MaterialTitleStep';
|
|
26
|
+
function TitleStep(_a) {
|
|
27
|
+
var step = _a.step, formStyle = _a.formStyle, others = __rest(_a, ["step", "formStyle"]);
|
|
28
|
+
switch (formStyle.type) {
|
|
29
|
+
case FormStyleTypes.MATERIAL: {
|
|
30
|
+
return (_jsx(MaterialTitleStep, __assign({ step: step, formStyle: formStyle }, others), void 0));
|
|
31
|
+
}
|
|
32
|
+
default: {
|
|
33
|
+
return (_jsx(MaterialTitleStep, __assign({ step: step, formStyle: formStyle }, others), void 0));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
export default TitleStep;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
|
-
import { TermComponentProps } from '../Term';
|
|
3
|
-
declare function TermComponent({ term, errors, control, postview, setValue, formStyle, tempError, }: TermComponentProps): JSX.Element;
|
|
4
|
-
export default TermComponent;
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { TermComponentProps } from '../Term';
|
|
3
|
+
declare function TermComponent({ term, errors, control, postview, setValue, formStyle, tempError, }: TermComponentProps): JSX.Element;
|
|
4
|
+
export default TermComponent;
|
|
@@ -1,77 +1,77 @@
|
|
|
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 { Dialog } from '@material-ui/core';
|
|
14
|
-
import React from 'react';
|
|
15
|
-
import { useState } from 'react';
|
|
16
|
-
import { Controller } from 'react-hook-form';
|
|
17
|
-
import RoundedButton from '../../../shared/RoundedButton/RoundedButton';
|
|
18
|
-
import RoundedCheckBox from '../../../shared/RoundedCheckBox/RoundedCheckBox';
|
|
19
|
-
import CloseRoundedIcon from '@material-ui/icons/CloseRounded';
|
|
20
|
-
import styles from './MaterialTerm.module.css';
|
|
21
|
-
function TermComponent(_a) {
|
|
22
|
-
var _b;
|
|
23
|
-
var term = _a.term, errors = _a.errors, control = _a.control, postview = _a.postview, setValue = _a.setValue, formStyle = _a.formStyle, tempError = _a.tempError;
|
|
24
|
-
var _c = useState(false), showDialog = _c[0], setShowDialog = _c[1];
|
|
25
|
-
/**
|
|
26
|
-
* Function that renders the highlighted text
|
|
27
|
-
* @returns a string with span highlighted
|
|
28
|
-
*/
|
|
29
|
-
var renderText = function (text) {
|
|
30
|
-
if (text) {
|
|
31
|
-
var parts = text.split(/{{(.*?)}}/gi);
|
|
32
|
-
for (var i = 1; i < parts.length; i += 2) {
|
|
33
|
-
parts[i] = (_jsx("span", __assign({ className: styles.highlight, style: {
|
|
34
|
-
color: !!errors[term.id] && tempError
|
|
35
|
-
? formStyle.errorColor
|
|
36
|
-
: formStyle.primaryColor,
|
|
37
|
-
}, onClick: function () {
|
|
38
|
-
var _a, _b, _c, _d, _e;
|
|
39
|
-
if (((_a = term.clickEffect) === null || _a === void 0 ? void 0 : _a.type) === 'LINK') {
|
|
40
|
-
(_d = (_c = (_b = window
|
|
41
|
-
.open) === null || _b === void 0 ? void 0 : _b.call(window, term.clickEffect.url, '_blank')) === null || _c === void 0 ? void 0 : _c.focus) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
42
|
-
}
|
|
43
|
-
else if (((_e = term.clickEffect) === null || _e === void 0 ? void 0 : _e.type) === 'DIALOG') {
|
|
44
|
-
setShowDialog(true);
|
|
45
|
-
}
|
|
46
|
-
} }, { children: parts[i] }), i));
|
|
47
|
-
}
|
|
48
|
-
return parts;
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
return (_jsxs(React.Fragment, { children: [_jsx(Dialog, __assign({ PaperProps: {
|
|
52
|
-
style: {
|
|
53
|
-
borderRadius: '20px',
|
|
54
|
-
},
|
|
55
|
-
}, onClose: function () {
|
|
56
|
-
setShowDialog(false);
|
|
57
|
-
}, open: showDialog }, { children: ((_b = term.clickEffect) === null || _b === void 0 ? void 0 : _b.type) === 'DIALOG' && (_jsxs("div", __assign({ className: styles.dialogContainer, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
|
|
58
|
-
setShowDialog(false);
|
|
59
|
-
} }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }, void 0) }), void 0), _jsx("div", __assign({ className: styles.dialogTitle, style: {
|
|
60
|
-
borderBottom: '1px solid ' + formStyle.primaryColor,
|
|
61
|
-
} }, { children: term.clickEffect.title }), void 0), _jsx("div", __assign({ className: styles.dialogContentContainer }, { children: term.clickEffect.text }), void 0), _jsx(RoundedButton, { text: 'Aceptar', padding: "20px 15px", backgroundColor: formStyle.primaryColor, color: formStyle.primaryContrastColor, fontSize: 20, onClick: function () {
|
|
62
|
-
setShowDialog(false);
|
|
63
|
-
if (!postview) {
|
|
64
|
-
setValue(term.id, true);
|
|
65
|
-
}
|
|
66
|
-
} }, void 0)] }), void 0)) }), void 0), _jsxs("div", __assign({ className: styles.container + ' noselect' }, { children: [_jsx("div", __assign({ className: styles.checkboxContainer }, { children: _jsx(Controller, { name: term.id, control: control, rules: {
|
|
67
|
-
required: true,
|
|
68
|
-
}, defaultValue: false, shouldUnregister: true, render: function (_a) {
|
|
69
|
-
var field = _a.field;
|
|
70
|
-
return (_jsx(RoundedCheckBox, { checked: field.value, onChange: field.onChange, cantEdit: postview, padding: "5px", checkedColor: formStyle.primaryColor, errorColor: formStyle.errorColor, size: "1.5rem", error: !!errors[term.id] }, void 0));
|
|
71
|
-
} }, void 0) }), void 0), _jsx("div", __assign({ className: styles.messageContainer, style: {
|
|
72
|
-
color: !!errors[term.id] && tempError
|
|
73
|
-
? formStyle.errorColor
|
|
74
|
-
: 'inherit',
|
|
75
|
-
} }, { children: renderText(term.message) }), void 0)] }), void 0)] }, void 0));
|
|
76
|
-
}
|
|
77
|
-
export default TermComponent;
|
|
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 { Dialog } from '@material-ui/core';
|
|
14
|
+
import React from 'react';
|
|
15
|
+
import { useState } from 'react';
|
|
16
|
+
import { Controller } from 'react-hook-form';
|
|
17
|
+
import RoundedButton from '../../../shared/RoundedButton/RoundedButton';
|
|
18
|
+
import RoundedCheckBox from '../../../shared/RoundedCheckBox/RoundedCheckBox';
|
|
19
|
+
import CloseRoundedIcon from '@material-ui/icons/CloseRounded';
|
|
20
|
+
import styles from './MaterialTerm.module.css';
|
|
21
|
+
function TermComponent(_a) {
|
|
22
|
+
var _b;
|
|
23
|
+
var term = _a.term, errors = _a.errors, control = _a.control, postview = _a.postview, setValue = _a.setValue, formStyle = _a.formStyle, tempError = _a.tempError;
|
|
24
|
+
var _c = useState(false), showDialog = _c[0], setShowDialog = _c[1];
|
|
25
|
+
/**
|
|
26
|
+
* Function that renders the highlighted text
|
|
27
|
+
* @returns a string with span highlighted
|
|
28
|
+
*/
|
|
29
|
+
var renderText = function (text) {
|
|
30
|
+
if (text) {
|
|
31
|
+
var parts = text.split(/{{(.*?)}}/gi);
|
|
32
|
+
for (var i = 1; i < parts.length; i += 2) {
|
|
33
|
+
parts[i] = (_jsx("span", __assign({ className: styles.highlight, style: {
|
|
34
|
+
color: !!errors[term.id] && tempError
|
|
35
|
+
? formStyle.errorColor
|
|
36
|
+
: formStyle.primaryColor,
|
|
37
|
+
}, onClick: function () {
|
|
38
|
+
var _a, _b, _c, _d, _e;
|
|
39
|
+
if (((_a = term.clickEffect) === null || _a === void 0 ? void 0 : _a.type) === 'LINK') {
|
|
40
|
+
(_d = (_c = (_b = window
|
|
41
|
+
.open) === null || _b === void 0 ? void 0 : _b.call(window, term.clickEffect.url, '_blank')) === null || _c === void 0 ? void 0 : _c.focus) === null || _d === void 0 ? void 0 : _d.call(_c);
|
|
42
|
+
}
|
|
43
|
+
else if (((_e = term.clickEffect) === null || _e === void 0 ? void 0 : _e.type) === 'DIALOG') {
|
|
44
|
+
setShowDialog(true);
|
|
45
|
+
}
|
|
46
|
+
} }, { children: parts[i] }), i));
|
|
47
|
+
}
|
|
48
|
+
return parts;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Dialog, __assign({ PaperProps: {
|
|
52
|
+
style: {
|
|
53
|
+
borderRadius: '20px',
|
|
54
|
+
},
|
|
55
|
+
}, onClose: function () {
|
|
56
|
+
setShowDialog(false);
|
|
57
|
+
}, open: showDialog }, { children: ((_b = term.clickEffect) === null || _b === void 0 ? void 0 : _b.type) === 'DIALOG' && (_jsxs("div", __assign({ className: styles.dialogContainer, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
|
|
58
|
+
setShowDialog(false);
|
|
59
|
+
} }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }, void 0) }), void 0), _jsx("div", __assign({ className: styles.dialogTitle, style: {
|
|
60
|
+
borderBottom: '1px solid ' + formStyle.primaryColor,
|
|
61
|
+
} }, { children: term.clickEffect.title }), void 0), _jsx("div", __assign({ className: styles.dialogContentContainer }, { children: term.clickEffect.text }), void 0), _jsx(RoundedButton, { text: 'Aceptar', padding: "20px 15px", backgroundColor: formStyle.primaryColor, color: formStyle.primaryContrastColor, fontSize: 20, onClick: function () {
|
|
62
|
+
setShowDialog(false);
|
|
63
|
+
if (!postview) {
|
|
64
|
+
setValue(term.id, true);
|
|
65
|
+
}
|
|
66
|
+
} }, void 0)] }), void 0)) }), void 0), _jsxs("div", __assign({ className: styles.container + ' noselect' }, { children: [_jsx("div", __assign({ className: styles.checkboxContainer }, { children: _jsx(Controller, { name: term.id, control: control, rules: {
|
|
67
|
+
required: true,
|
|
68
|
+
}, defaultValue: false, shouldUnregister: true, render: function (_a) {
|
|
69
|
+
var field = _a.field;
|
|
70
|
+
return (_jsx(RoundedCheckBox, { checked: field.value, onChange: field.onChange, cantEdit: postview, padding: "5px", checkedColor: formStyle.primaryColor, errorColor: formStyle.errorColor, size: "1.5rem", error: !!errors[term.id] }, void 0));
|
|
71
|
+
} }, void 0) }), void 0), _jsx("div", __assign({ className: styles.messageContainer, style: {
|
|
72
|
+
color: !!errors[term.id] && tempError
|
|
73
|
+
? formStyle.errorColor
|
|
74
|
+
: 'inherit',
|
|
75
|
+
} }, { children: renderText(term.message) }), void 0)] }), void 0)] }, void 0));
|
|
76
|
+
}
|
|
77
|
+
export default TermComponent;
|