@arquimedes.co/eureka-forms 1.9.14 → 1.9.15-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/AYFFormStep.d.ts +1 -1
- package/dist/@Types/CBRFormStep.d.ts +1 -1
- package/dist/@Types/Form.d.ts +2 -2
- package/dist/@Types/FormStep.d.ts +3 -3
- package/dist/App.js +11 -11
- package/dist/AxiosWidget.js +1 -1
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +8 -8
- package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +2 -2
- package/dist/FormComponents/Form/Form.js +8 -8
- package/dist/FormComponents/Form/StepperForm/StepperForm.js +1 -1
- package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +1 -1
- package/dist/FormComponents/Section/Section.js +2 -2
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/CBRIncidentsStep.js +2 -2
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/Incident/Incident.js +3 -3
- package/dist/FormComponents/Step/@Construction/CBRIncidentsStep/MaterialCBRIncidentsStep/MaterialCBRIncidentsStep.js +6 -6
- package/dist/FormComponents/Step/@Construction/CBRLocativasStep/CBRLocativasStep.js +9 -9
- package/dist/FormComponents/Step/@Construction/CBRPropertyStep/CBRPropertyStep.js +7 -7
- package/dist/FormComponents/Step/AYFStepMapper.js +6 -6
- package/dist/FormComponents/Step/CBRStepMapper.js +22 -22
- package/dist/FormComponents/Step/CheckBoxStep/CheckBoxStep.js +2 -2
- package/dist/FormComponents/Step/CheckBoxStep/MaterialCheckBoxStep/MaterialCheckBoxStep.js +4 -4
- package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +2 -2
- package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +8 -8
- package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +2 -2
- package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +2 -2
- package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +2 -2
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +11 -11
- package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +7 -7
- package/dist/FormComponents/Step/RatingStep/MaterialRatingStep/MaterialRatingStep.js +5 -5
- package/dist/FormComponents/Step/RatingStep/RatingStep.js +2 -2
- package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +6 -6
- package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +2 -2
- package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +1 -1
- package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +2 -2
- package/dist/FormComponents/Step/SmartSelectStep/MaterialSmartSelectStep/MaterialSmartSelectStep.js +5 -5
- package/dist/FormComponents/Step/SmartSelectStep/SmartSelectStep.js +2 -2
- package/dist/FormComponents/Step/Step.js +13 -13
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +1 -1
- package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +7 -7
- package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +2 -2
- package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +2 -2
- package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +2 -2
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +2 -2
- package/dist/FormComponents/Step/TitleStep/TitleStep.js +2 -2
- package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +6 -6
- package/dist/FormComponents/Term/Term.js +2 -2
- package/dist/Widget.js +1 -1
- package/dist/controllers/FileService.js +2 -2
- package/dist/index.js +1 -1
- package/dist/shared/Loader/Loader.js +1 -1
- package/dist/shared/Navbar/Navbar.js +1 -1
- package/dist/shared/Rating/Rating.js +4 -4
- package/dist/shared/Rating/Ratings/LikeRating.js +3 -3
- package/dist/shared/Rating/Ratings/SatisfactionRating.js +5 -5
- package/dist/shared/Rating/Ratings/ScaleRating.js +4 -4
- package/dist/shared/RoundedButton/RoundedButton.js +1 -1
- package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +2 -2
- package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +7 -7
- package/dist/shared/RoundedSelect/RoundedSelect.js +3 -3
- package/dist/shared/RoundedSmartSelect/RoundedSmartSelect.js +5 -5
- package/dist/shared/RoundedTextField/RoundedTextField.js +3 -3
- package/package.json +2 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import AYFFormStepTypes from '../constants/AYFFormStepTypes';
|
|
2
2
|
import { GDatePicker, GSmartSelect, GTextInput } from './GenericFormSteps';
|
|
3
|
-
export
|
|
3
|
+
export type AYFFormStep = AYFListStep | AYFBillNumStep | AYFYearStep | AYFCutOffDateStep;
|
|
4
4
|
export interface AYFListStep extends Omit<GSmartSelect, 'searchable'> {
|
|
5
5
|
type: AYFFormStepTypes.AYF_START_MONTH | AYFFormStepTypes.AYF_END_MONTH;
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Types from '../constants/CBRFormStepTypes';
|
|
2
2
|
import { GSmartSelect, GTextArea, GTextInput, GBaseStep } from './GenericFormSteps';
|
|
3
|
-
export
|
|
3
|
+
export type CBRFormStep = CBRFirstNameStep | CBRMiddleNameStep | CBRLastNameStep | CBRSecondLastNameStep | PostVentaStep | CBRProjectStep | CBRDocStep | CBRCelStep | CBRPhoneStep | CBRDocTypeStep | CBREmailStep | CBRRequesterTypeStep | CBRPropertyStep | CBRSpaceTypeStep | CBRElementStep | CBRCommentStep | CBRIncidentsStep;
|
|
4
4
|
export interface PostVentaStep extends GBaseStep {
|
|
5
5
|
type: Types.CBR_POSTVENTA;
|
|
6
6
|
}
|
package/dist/@Types/Form.d.ts
CHANGED
|
@@ -44,8 +44,8 @@ export interface Classifier {
|
|
|
44
44
|
export interface ParentClassifier extends Classifier {
|
|
45
45
|
children: Classifier[];
|
|
46
46
|
}
|
|
47
|
-
export
|
|
48
|
-
export
|
|
47
|
+
export type FormStyle = MaterialStyle;
|
|
48
|
+
export type StyleKeys = keyof Omit<FormStyle, 'type'>;
|
|
49
49
|
export interface MaterialStyle {
|
|
50
50
|
type: FormStyleTypes.MATERIAL;
|
|
51
51
|
backgroundColor: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Types, { ClassifierOptionTypes, OptionTypes, RatingTypes } from '../constants/FormStepTypes';
|
|
2
2
|
import * as GSteps from './GenericFormSteps';
|
|
3
|
-
export
|
|
3
|
+
export type FormStep = Title | Rating | CheckBox | TextArea | TextInput | DatePicker | FileUpload | Separator | FormSelector | ClassifierSelector;
|
|
4
4
|
export interface Title extends GSteps.GBaseStep {
|
|
5
5
|
type: Types.TITLE;
|
|
6
6
|
title: string;
|
|
@@ -46,7 +46,7 @@ export interface FormSelector extends GSteps.GBaseStep {
|
|
|
46
46
|
size: 1 | 2 | 3 | 4;
|
|
47
47
|
maxSize: number;
|
|
48
48
|
}
|
|
49
|
-
export
|
|
49
|
+
export type FormSelectorOption = DefaultFormSelectorOption | NestedStepOption | AddSectionOption;
|
|
50
50
|
interface DefaultFormSelectorOption {
|
|
51
51
|
label: string;
|
|
52
52
|
value: string;
|
|
@@ -75,7 +75,7 @@ export interface ClassifierSelector extends GSteps.GBaseStep {
|
|
|
75
75
|
size: 1 | 2 | 3 | 4;
|
|
76
76
|
maxSize: number;
|
|
77
77
|
}
|
|
78
|
-
export
|
|
78
|
+
export type FormClassifierSelectorOption = NestedStepClassifierOption | HideValueOption;
|
|
79
79
|
interface NestedStepClassifierOption {
|
|
80
80
|
type: ClassifierOptionTypes.NESTED;
|
|
81
81
|
idClassifier: string;
|
package/dist/App.js
CHANGED
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -180,7 +180,7 @@ function App(_a) {
|
|
|
180
180
|
case 0:
|
|
181
181
|
_b.trys.push([0, 5, , 6]);
|
|
182
182
|
if (!domain) return [3 /*break*/, 2];
|
|
183
|
-
return [4 /*yield*/, widgetInstance.get("/organization?idOrganization="
|
|
183
|
+
return [4 /*yield*/, widgetInstance.get("/organization?idOrganization=".concat(domain))];
|
|
184
184
|
case 1:
|
|
185
185
|
_a = _b.sent();
|
|
186
186
|
return [3 /*break*/, 4];
|
|
@@ -223,8 +223,8 @@ function App(_a) {
|
|
|
223
223
|
case 0:
|
|
224
224
|
_a.trys.push([0, 2, , 3]);
|
|
225
225
|
return [4 /*yield*/, (domain
|
|
226
|
-
? widgetInstance.get("/form/"
|
|
227
|
-
: axiosInstance.get("/form/"
|
|
226
|
+
? widgetInstance.get("/form/".concat(apiKey, "?idOrganization=").concat(domain))
|
|
227
|
+
: axiosInstance.get("/form/".concat(apiKey)))];
|
|
228
228
|
case 1:
|
|
229
229
|
response = _a.sent();
|
|
230
230
|
if (response) {
|
|
@@ -242,22 +242,22 @@ function App(_a) {
|
|
|
242
242
|
}); };
|
|
243
243
|
if (form === undefined || organizationInfo === undefined) {
|
|
244
244
|
if (isWidget) {
|
|
245
|
-
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: (_c = (_b = organizationInfo === null || organizationInfo === void 0 ? void 0 : organizationInfo.styles) === null || _b === void 0 ? void 0 : _b.primaryColor) !== null && _c !== void 0 ? _c : '#b8b8b8' }
|
|
245
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: (_c = (_b = organizationInfo === null || organizationInfo === void 0 ? void 0 : organizationInfo.styles) === null || _b === void 0 ? void 0 : _b.primaryColor) !== null && _c !== void 0 ? _c : '#b8b8b8' }) })) })));
|
|
246
246
|
}
|
|
247
|
-
return (_jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: (_e = (_d = organizationInfo === null || organizationInfo === void 0 ? void 0 : organizationInfo.styles) === null || _d === void 0 ? void 0 : _d.primaryColor) !== null && _e !== void 0 ? _e : '#b8b8b8' }
|
|
247
|
+
return (_jsx("div", __assign({ className: styles.curtain }, { children: _jsx(Loader, { size: 50, color: (_e = (_d = organizationInfo === null || organizationInfo === void 0 ? void 0 : organizationInfo.styles) === null || _d === void 0 ? void 0 : _d.primaryColor) !== null && _e !== void 0 ? _e : '#b8b8b8' }) })));
|
|
248
248
|
}
|
|
249
249
|
else if (form === null) {
|
|
250
250
|
if (organizationInfo === null) {
|
|
251
251
|
if (isWidget) {
|
|
252
|
-
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "Error" })
|
|
252
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "Error" })) })));
|
|
253
253
|
}
|
|
254
|
-
return _jsx("div", __assign({ className: styles.curtain }, { children: "Error" })
|
|
254
|
+
return _jsx("div", __assign({ className: styles.curtain }, { children: "Error" }));
|
|
255
255
|
}
|
|
256
256
|
else {
|
|
257
257
|
if (isWidget) {
|
|
258
|
-
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "404" })
|
|
258
|
+
return (_jsx("div", __assign({ className: styles.widgetContainer }, { children: _jsx("div", __assign({ className: styles.curtain }, { children: "404" })) })));
|
|
259
259
|
}
|
|
260
|
-
return _jsx("div", __assign({ className: styles.curtain }, { children: "404" })
|
|
260
|
+
return _jsx("div", __assign({ className: styles.curtain }, { children: "404" }));
|
|
261
261
|
}
|
|
262
262
|
}
|
|
263
263
|
else {
|
|
@@ -270,7 +270,7 @@ function App(_a) {
|
|
|
270
270
|
if (handleConfirmed) {
|
|
271
271
|
handleConfirmed();
|
|
272
272
|
}
|
|
273
|
-
}, editable: editable, postview: postview === true, partial: partial === true, internal: internal === true, apiKey: apiKey, domain: domain, customSend: customSend, originalValues: originalValues, containerRef: containerRef, organization: organizationInfo !== null && organizationInfo !== void 0 ? organizationInfo : { idOrganization: domain }, customSteps: customSteps !== null && customSteps !== void 0 ? customSteps : {}, isWidget: isWidget === true })
|
|
273
|
+
}, editable: editable, postview: postview === true, partial: partial === true, internal: internal === true, apiKey: apiKey, domain: domain, customSend: customSend, originalValues: originalValues, containerRef: containerRef, organization: organizationInfo !== null && organizationInfo !== void 0 ? organizationInfo : { idOrganization: domain }, customSteps: customSteps !== null && customSteps !== void 0 ? customSteps : {}, isWidget: isWidget === true })) })));
|
|
274
274
|
}
|
|
275
275
|
}
|
|
276
276
|
export default App;
|
package/dist/AxiosWidget.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import axios from 'axios';
|
|
2
2
|
var headers = {};
|
|
3
3
|
var widgetInstance = axios.create({
|
|
4
|
-
baseURL: "https://api.forms."
|
|
4
|
+
baseURL: "https://api.forms.".concat(process.env.REACT_APP_DOMAIN, "/api"),
|
|
5
5
|
timeout: 30000,
|
|
6
6
|
headers: headers,
|
|
7
7
|
});
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -91,7 +91,7 @@ function ColumnForm(_a) {
|
|
|
91
91
|
handleLoaded();
|
|
92
92
|
}, []);
|
|
93
93
|
if (sections === undefined) {
|
|
94
|
-
return _jsx("div", {}
|
|
94
|
+
return _jsx("div", {});
|
|
95
95
|
}
|
|
96
96
|
var onSubmit = function (token) { return __awaiter(_this, void 0, void 0, function () {
|
|
97
97
|
var valid, values, _i, _a, idStep, payload, url, resp, _b, error_1;
|
|
@@ -129,9 +129,9 @@ function ColumnForm(_a) {
|
|
|
129
129
|
if (token) {
|
|
130
130
|
payload.token = token;
|
|
131
131
|
}
|
|
132
|
-
url = "/ticket/"
|
|
132
|
+
url = "/ticket/".concat(internal ? form.apiKey : apiKey);
|
|
133
133
|
if (!(domain || internal)) return [3 /*break*/, 6];
|
|
134
|
-
return [4 /*yield*/, widgetInstance.post(url
|
|
134
|
+
return [4 /*yield*/, widgetInstance.post("".concat(url, "?idOrganization=").concat(domain), payload)];
|
|
135
135
|
case 5:
|
|
136
136
|
_b = _c.sent();
|
|
137
137
|
return [3 /*break*/, 8];
|
|
@@ -155,15 +155,15 @@ function ColumnForm(_a) {
|
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
}); };
|
|
158
|
-
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [loading && _jsx("div", { className: styles.curtain }
|
|
158
|
+
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [loading && _jsx("div", { className: styles.curtain }), showConfirmation !== undefined && (_jsx(ConfirmationDialog, { formStyle: formStyle, confirmation: showConfirmation, onClose: function () {
|
|
159
159
|
reload();
|
|
160
160
|
setShowConfirmation(undefined);
|
|
161
|
-
} }
|
|
161
|
+
} })), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, sendLabel: sendLabel, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps, setDependencyStore: setDependencyStore, dependencyStore: dependencyStore, trigger: trigger }, others), index)); }), form.terms &&
|
|
162
162
|
(!internal || (internal && postview)) &&
|
|
163
163
|
(originalValues === null || originalValues === void 0 ? void 0 : originalValues['INTERNAL_CREATING_AGENT']) === undefined && (_jsx("div", __assign({ className: styles.termsContainer, style: {
|
|
164
164
|
width: (form.size.blockSize + form.size.spacingSize) *
|
|
165
165
|
form.size.blockNum,
|
|
166
|
-
} }, { children: form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }) })
|
|
166
|
+
} }, { children: form.terms.map(function (term, index) { return (_jsx(TermComponent, { setValue: setValue, postview: postview, tempError: tempError, term: term, control: control, errors: errors, form: form, formStyle: formStyle }, index)); }) }))), !postview && (_jsxs(React.Fragment, { children: [form.hasCaptcha && !internal && (_jsx(ReCAPTCHA, { ref: recaptchaRef, sitekey: "6LcL22kkAAAAAEotDeAFbRATob-u5vbibbCyWL2p", size: 'invisible', badge: 'bottomright' })), _jsx("div", __assign({ className: styles.submitBtnContainer }, { children: _jsxs("button", __assign({ "data-testid": "form__submit", className: styles.submitBtn, onClick: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
167
167
|
var valid, captcha;
|
|
168
168
|
return __generator(this, function (_a) {
|
|
169
169
|
switch (_a.label) {
|
|
@@ -197,7 +197,7 @@ function ColumnForm(_a) {
|
|
|
197
197
|
color: formStyle.primaryContrastColor,
|
|
198
198
|
}, disabled: loading }, { children: [_jsx("div", __assign({ style: {
|
|
199
199
|
visibility: loading ? 'hidden' : 'visible',
|
|
200
|
-
} }, { children: sendLabel !== null && sendLabel !== void 0 ? sendLabel : 'Enviar' })
|
|
200
|
+
} }, { children: sendLabel !== null && sendLabel !== void 0 ? sendLabel : 'Enviar' })), loading && (_jsx("div", __assign({ className: styles.loaderContainer }, { children: _jsx(Loader, { color: formStyle.primaryContrastColor, position: "unset" }) })))] })) }))] }))] })));
|
|
201
201
|
}
|
|
202
202
|
export default ColumnForm;
|
|
203
203
|
function calcNextSection(form, idSection, sections) {
|
|
@@ -24,8 +24,8 @@ function ConfirmationDialog(_a) {
|
|
|
24
24
|
},
|
|
25
25
|
}, open: true }, { children: _jsxs("div", __assign({ className: styles.confirmationContainer, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
|
|
26
26
|
onClose();
|
|
27
|
-
} }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }
|
|
27
|
+
} }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }) })), _jsxs("div", __assign({ className: styles.container }, { children: [_jsx("div", __assign({ className: styles.checkContainer, style: { color: formStyle.primaryColor } }, { children: _jsx(CheckCircleOutlineRoundedIcon, { fontSize: "inherit", style: { fontSize: '160px' } }) })), _jsxs("div", __assign({ className: styles.messageContainer }, { children: ["Tu caso n\u00FAmero", ' ', _jsx("span", __assign({ style: { fontWeight: 'bold' } }, { children: confirmation.case })), ' ', "ha sido registrado!"] })), _jsx("div", __assign({ className: styles.messageContainer }, { children: "Pronto te estaremos dando respuesta." })), _jsxs("div", __assign({ className: styles.linkContainer }, { children: ["Puedes consultar el estado aqui:", ' '] })), _jsx("a", __assign({ className: styles.url, "data-testid": "ResUrl", target: "_blank", href: confirmation.url, style: {
|
|
28
28
|
color: formStyle.textColor,
|
|
29
|
-
} }, { children: confirmation.url })
|
|
29
|
+
} }, { children: confirmation.url }))] }))] })) })));
|
|
30
30
|
}
|
|
31
31
|
export default ConfirmationDialog;
|
|
@@ -94,21 +94,21 @@ function FormComponent(_a) {
|
|
|
94
94
|
minHeight: form.isStandAlone && !isWidget ? '100vh' : '100%',
|
|
95
95
|
} }, { children: _jsx("div", __assign({ className: styles.widgetFormContainer, ref: containerRef }, { children: _jsx(FormTypeComponent, __assign({}, others, { handleLoaded: function () {
|
|
96
96
|
setLoaded(true);
|
|
97
|
-
}, widthStats: widthStats, form: form, internal: internal, postview: postview, organization: organization, formStyle: internal ? InternalFormStyle : form.style })
|
|
97
|
+
}, widthStats: widthStats, form: form, internal: internal, postview: postview, organization: organization, formStyle: internal ? InternalFormStyle : form.style })) })) })));
|
|
98
98
|
}
|
|
99
99
|
else if (organization && widthStats !== undefined) {
|
|
100
100
|
//Standalone cant have widget
|
|
101
|
-
return (_jsxs(React.Fragment, { children: [_jsx(Navbar, { logo: organization.logoUrl, color: (_c = organization.styles) === null || _c === void 0 ? void 0 : _c.primaryColor }
|
|
101
|
+
return (_jsxs(React.Fragment, { children: [_jsx(Navbar, { logo: organization.logoUrl, color: (_c = organization.styles) === null || _c === void 0 ? void 0 : _c.primaryColor }), _jsx("div", __assign({ className: styles.standAloneFormContainer, ref: containerRef }, { children: _jsx("div", __assign({ className: widthStats.isResponsive
|
|
102
102
|
? styles.fullScreenStandAloneForm
|
|
103
103
|
: styles.standAloneFormCard, style: {
|
|
104
104
|
backgroundColor: form.style.backgroundColor,
|
|
105
105
|
visibility: loaded ? 'visible' : 'hidden',
|
|
106
106
|
} }, { children: _jsx(FormTypeComponent, __assign({}, others, { internal: internal, postview: postview, widthStats: widthStats, form: form, formStyle: form.style, organization: organization, handleLoaded: function () {
|
|
107
107
|
setLoaded(true);
|
|
108
|
-
} })
|
|
108
|
+
} })) })) }))] }));
|
|
109
109
|
}
|
|
110
110
|
else {
|
|
111
|
-
return _jsx("div", {}
|
|
111
|
+
return _jsx("div", {});
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
var muiTheme = createTheme({
|
|
@@ -125,19 +125,19 @@ function FormTypeComponent(_a) {
|
|
|
125
125
|
var renderTypes = function () {
|
|
126
126
|
switch (props.form.type) {
|
|
127
127
|
case FormTypes.COLUMN: {
|
|
128
|
-
return _jsx(ColumnForm, __assign({}, props)
|
|
128
|
+
return _jsx(ColumnForm, __assign({}, props));
|
|
129
129
|
}
|
|
130
130
|
case FormTypes.STEPPER: {
|
|
131
|
-
return _jsx(StepperForm, __assign({}, props)
|
|
131
|
+
return _jsx(StepperForm, __assign({}, props));
|
|
132
132
|
}
|
|
133
133
|
default: {
|
|
134
|
-
return _jsx(ColumnForm, __assign({}, props)
|
|
134
|
+
return _jsx(ColumnForm, __assign({}, props));
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
};
|
|
138
138
|
switch (props.formStyle.type) {
|
|
139
139
|
case FormStyleTypes.MATERIAL:
|
|
140
|
-
return (_jsx(StylesProvider, __assign({ generateClassName: generateClassName }, { children: _jsx(ThemeProvider, __assign({ theme: muiTheme }, { children: _jsx(MuiPickersUtilsProvider, __assign({ utils: DateFnsUtils, locale: getLocale() }, { children: renderTypes() })
|
|
140
|
+
return (_jsx(StylesProvider, __assign({ generateClassName: generateClassName }, { children: _jsx(ThemeProvider, __assign({ theme: muiTheme }, { children: _jsx(MuiPickersUtilsProvider, __assign({ utils: DateFnsUtils, locale: getLocale() }, { children: renderTypes() })) })) })));
|
|
141
141
|
default:
|
|
142
142
|
return renderTypes();
|
|
143
143
|
}
|
|
@@ -15,10 +15,10 @@ import MaterialSection from './MaterialSection/MaterialSection';
|
|
|
15
15
|
function SectionComponent(props) {
|
|
16
16
|
switch (props.formStyle.type) {
|
|
17
17
|
case FormStyleTypes.MATERIAL: {
|
|
18
|
-
return _jsx(MaterialSection, __assign({}, props)
|
|
18
|
+
return _jsx(MaterialSection, __assign({}, props));
|
|
19
19
|
}
|
|
20
20
|
default: {
|
|
21
|
-
return _jsx(MaterialSection, __assign({}, props)
|
|
21
|
+
return _jsx(MaterialSection, __assign({}, props));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -15,10 +15,10 @@ import MaterialCBRIncidentsStep from './MaterialCBRIncidentsStep/MaterialCBRInci
|
|
|
15
15
|
function CBRIncidentsStep(props) {
|
|
16
16
|
switch (props.formStyle.type) {
|
|
17
17
|
case FormStyleTypes.MATERIAL: {
|
|
18
|
-
return _jsx(MaterialCBRIncidentsStep, __assign({}, props)
|
|
18
|
+
return _jsx(MaterialCBRIncidentsStep, __assign({}, props));
|
|
19
19
|
}
|
|
20
20
|
default: {
|
|
21
|
-
return _jsx(MaterialCBRIncidentsStep, __assign({}, props)
|
|
21
|
+
return _jsx(MaterialCBRIncidentsStep, __assign({}, props));
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
@@ -31,19 +31,19 @@ function IncidentComponent(_a) {
|
|
|
31
31
|
var elementStep = form.steps[incident.idElementStep];
|
|
32
32
|
var commentStep = form.steps[incident.idCommentStep];
|
|
33
33
|
if (incident.deleted) {
|
|
34
|
-
return _jsx("div", {}
|
|
34
|
+
return _jsx("div", {});
|
|
35
35
|
}
|
|
36
36
|
return (_jsx("div", __assign({ className: others.widthStats.isMobile || form.size.blockNum < 3
|
|
37
37
|
? styles.mobileContainer
|
|
38
38
|
: styles.container }, { children: _jsxs("div", __assign({ className: styles.contentContainer, style: {
|
|
39
39
|
width: (form.size.blockSize + form.size.spacingSize) *
|
|
40
40
|
(form.size.blockNum - 1),
|
|
41
|
-
} }, { children: [_jsxs("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: [step.unitLabel + ' ' + incident.num, ":"] })
|
|
41
|
+
} }, { children: [_jsxs("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: [step.unitLabel + ' ' + incident.num, ":"] })), _jsx("div", __assign({ className: !others.editable || others.postview
|
|
42
42
|
? styles.disabledDeleteBtn
|
|
43
43
|
: styles.deleteBtn, style: { color: formStyle.textColor }, onClick: function () {
|
|
44
44
|
if (others.editable && !others.postview) {
|
|
45
45
|
handleDelete();
|
|
46
46
|
}
|
|
47
|
-
} }, { children: _jsx(DeleteRoundedIcon, { fontSize: "inherit" }
|
|
47
|
+
} }, { children: _jsx(DeleteRoundedIcon, { fontSize: "inherit" }) })), _jsx(StepComponent, __assign({}, others, { formStyle: formStyle, form: form, step: spaceStep, handleSizeChange: function () { }, level: level + 1 })), _jsx(StepComponent, __assign({}, others, { form: form, formStyle: formStyle, step: elementStep, handleSizeChange: function () { }, level: level + 1 })), _jsx(TextAreaStep, __assign({}, others, { form: form, backgroundColor: 'transparent', formStyle: formStyle, step: commentStep, maxLength: 200, handleSizeChange: function () { }, level: level + 1 }))] })) })));
|
|
48
48
|
}
|
|
49
49
|
export default IncidentComponent;
|
|
@@ -82,11 +82,11 @@ function Incidents(_a) {
|
|
|
82
82
|
addRecursiveElementStep(idSubStep, newSubStep, idStep, steps, dependencyStore, idProjectDep);
|
|
83
83
|
}
|
|
84
84
|
};
|
|
85
|
-
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.titleLbl }, { children: step.label })
|
|
85
|
+
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.titleLbl }, { children: step.label })), step.description && (_jsx("p", __assign({ className: styles.descriptionPar, style: {
|
|
86
86
|
margin: step.description
|
|
87
87
|
? '10px 0px'
|
|
88
88
|
: '0px 0px 5px 0px',
|
|
89
|
-
} }, { children: step.description })
|
|
89
|
+
} }, { children: step.description }))), incidents.map(function (incident, index) { return (_jsx(IncidentComponent, __assign({ incident: incident, formStyle: formStyle, step: step, form: localForm, editable: editable, postview: postview, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore, handleDelete: function () {
|
|
90
90
|
var tempIncidents = __spreadArray([], incidents, true);
|
|
91
91
|
tempIncidents[index].deleted = true;
|
|
92
92
|
var n = 1;
|
|
@@ -98,11 +98,11 @@ function Incidents(_a) {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
onChange(tempIncidents);
|
|
101
|
-
} }, others), index)); }), _jsxs("div", __assign({ className: styles.btnContainer }, { children: [_jsx("input", { ref: btnRef, className: styles.hiddenInput }
|
|
101
|
+
} }, others), index)); }), _jsxs("div", __assign({ className: styles.btnContainer }, { children: [_jsx("input", { ref: btnRef, className: styles.hiddenInput }), _jsx(RoundedButton, { disabled: !editable || postview, text: step.addBtnLabel, color: formStyle.primaryContrastColor, backgroundColor: formStyle.primaryColor, fontSize: '1rem', padding: '5px 15px 5px 15px', onClick: function () {
|
|
102
102
|
if (editable && !postview) {
|
|
103
103
|
handleAddIncident();
|
|
104
104
|
}
|
|
105
|
-
} }
|
|
105
|
+
} })] }))] })));
|
|
106
106
|
}
|
|
107
107
|
function CBRIncidentsStep(props) {
|
|
108
108
|
return (_jsx(Controller, { name: props.step.id, control: props.control, defaultValue: [], rules: {
|
|
@@ -111,7 +111,7 @@ function CBRIncidentsStep(props) {
|
|
|
111
111
|
: undefined,
|
|
112
112
|
}, shouldUnregister: true, render: function (_a) {
|
|
113
113
|
var field = _a.field;
|
|
114
|
-
return (_jsx(Incidents, __assign({}, props, { incidents: field.value, onChange: field.onChange, btnRef: field.ref })
|
|
115
|
-
} }
|
|
114
|
+
return (_jsx(Incidents, __assign({}, props, { incidents: field.value, onChange: field.onChange, btnRef: field.ref })));
|
|
115
|
+
} }));
|
|
116
116
|
}
|
|
117
117
|
export default CBRIncidentsStep;
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -55,7 +55,7 @@ function CBRLocativasStep(props) {
|
|
|
55
55
|
height: 23,
|
|
56
56
|
width: 23,
|
|
57
57
|
marginTop: 2,
|
|
58
|
-
} }
|
|
58
|
+
} }), getOptions: getLocativasOptions, getOptionSelected: function (option, value) {
|
|
59
59
|
return option.id === value.id;
|
|
60
60
|
}, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; }, calcDepError: calcDepError, calcInvalidDeps: calcInvalidDependencies, valueOverwrite: function (value) {
|
|
61
61
|
if (value) {
|
|
@@ -64,27 +64,27 @@ function CBRLocativasStep(props) {
|
|
|
64
64
|
else {
|
|
65
65
|
return null;
|
|
66
66
|
}
|
|
67
|
-
} }, { children: _jsx(LocativasSubStepRenderer, {}
|
|
67
|
+
} }, { children: _jsx(LocativasSubStepRenderer, {}) })));
|
|
68
68
|
}
|
|
69
69
|
export default CBRLocativasStep;
|
|
70
70
|
function LocativasSubStepRenderer(_a) {
|
|
71
71
|
var _b;
|
|
72
72
|
var value = _a.value, stepProps = _a.stepProps;
|
|
73
73
|
if (!value || stepProps == undefined) {
|
|
74
|
-
return _jsx("div", {}
|
|
74
|
+
return _jsx("div", {});
|
|
75
75
|
}
|
|
76
76
|
var subStep = stepProps === null || stepProps === void 0 ? void 0 : stepProps.form.steps[(_b = stepProps.step.subStep) !== null && _b !== void 0 ? _b : ''];
|
|
77
77
|
if ((subStep === null || subStep === void 0 ? void 0 : subStep.type) !== CBRFormStepTypes.CBR_LOCATIVAS) {
|
|
78
|
-
return _jsx("div", {}
|
|
78
|
+
return _jsx("div", {});
|
|
79
79
|
}
|
|
80
80
|
return (_jsx(SmartSelectStep, __assign({}, stepProps, { step: subStep, level: stepProps.level + 1, icon: _jsx(Leak, { fill: "#757575", style: {
|
|
81
81
|
display: 'flex',
|
|
82
82
|
height: 23,
|
|
83
83
|
width: 23,
|
|
84
84
|
marginTop: 2,
|
|
85
|
-
} }
|
|
85
|
+
} }), calcInvalidDeps: calcInvalidDependencies, getOptions: getLocativasOptions, calcDepError: calcDepError, getOptionSelected: function (option, value) {
|
|
86
86
|
return option.id === value.id;
|
|
87
|
-
}, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } }, { children: _jsx(LocativasSubStepRenderer, {}
|
|
87
|
+
}, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; } }, { children: _jsx(LocativasSubStepRenderer, {}) })));
|
|
88
88
|
}
|
|
89
89
|
var getLocativasOptions = function (idOrganization, step, dependencyStore) { return __awaiter(void 0, void 0, void 0, function () {
|
|
90
90
|
var idProyecto, response, father_1;
|
|
@@ -97,7 +97,7 @@ var getLocativasOptions = function (idOrganization, step, dependencyStore) { ret
|
|
|
97
97
|
if (!idProyecto) {
|
|
98
98
|
return [2 /*return*/, null]; //null para indicar que falta la depedency
|
|
99
99
|
}
|
|
100
|
-
return [4 /*yield*/, axios.get("https://integrations."
|
|
100
|
+
return [4 /*yield*/, axios.get("https://integrations.".concat(process.env.REACT_APP_DOMAIN, "/sinco/cbr/Locativas?idOrganization=").concat(idOrganization))];
|
|
101
101
|
case 1:
|
|
102
102
|
response = (_b.sent()).data;
|
|
103
103
|
father_1 = dependencyStore[step.dependencies[1]];
|
|
@@ -142,4 +142,4 @@ var calcDepError = function (types) {
|
|
|
142
142
|
}
|
|
143
143
|
return undefined;
|
|
144
144
|
};
|
|
145
|
-
var Leak = function (props) { return (_jsxs("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "512pt", viewBox: "0 -86 512.00056 512", width: "512pt", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "m203.484375 196.359375c2.402344 0 4.753906-.867187 6.601563-2.492187l26.621093-23.394532c3.03125-2.664062 4.164063-6.890625 2.871094-10.714844l-9.21875-27.257812 21.613281-18.996094c3.03125-2.664062 4.164063-6.890625 2.871094-10.714844l-11.359375-33.570312c-1.070313-3.167969-3.652344-5.589844-6.882813-6.457031l-57.925781-15.519531c-5.335937-1.433594-10.816406 1.734374-12.246093 7.070312-1.429688 5.335938 1.734374 10.820312 7.070312 12.25l52.753906 14.132812 7.507813 22.1875-21.613281 18.996094c-3.03125 2.664063-4.164063 6.890625-2.871094 10.714844l9.21875 27.257812-17.59375 15.460938-130.027344-34.839844 30.992188-115.667968c.6875-2.5625.328124-5.292969-.996094-7.589844-1.328125-2.296875-3.511719-3.972656-6.074219-4.660156l-45.574219-12.210938c-5.332031-1.429688-10.816406 1.734375-12.246094 7.070312l-36.636718 136.722657c-.6875 2.5625-.324219 5.292969 1 7.589843 1.324218 2.292969 3.511718 3.972657 6.070312 4.65625l45.574219 12.210938c.867187.234375 1.738281.34375 2.597656.34375 4.414063 0 8.453125-2.945312 9.652344-7.414062l.464844-1.734376 135.199219 36.226563c.851562.230469 1.722656.34375 2.585937.34375zm-181.238281-56.703125 31.460937-117.40625 26.253907 7.035156-31.457032 117.40625zm0 0" }
|
|
145
|
+
var Leak = function (props) { return (_jsxs("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "512pt", viewBox: "0 -86 512.00056 512", width: "512pt", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "m203.484375 196.359375c2.402344 0 4.753906-.867187 6.601563-2.492187l26.621093-23.394532c3.03125-2.664062 4.164063-6.890625 2.871094-10.714844l-9.21875-27.257812 21.613281-18.996094c3.03125-2.664062 4.164063-6.890625 2.871094-10.714844l-11.359375-33.570312c-1.070313-3.167969-3.652344-5.589844-6.882813-6.457031l-57.925781-15.519531c-5.335937-1.433594-10.816406 1.734374-12.246093 7.070312-1.429688 5.335938 1.734374 10.820312 7.070312 12.25l52.753906 14.132812 7.507813 22.1875-21.613281 18.996094c-3.03125 2.664063-4.164063 6.890625-2.871094 10.714844l9.21875 27.257812-17.59375 15.460938-130.027344-34.839844 30.992188-115.667968c.6875-2.5625.328124-5.292969-.996094-7.589844-1.328125-2.296875-3.511719-3.972656-6.074219-4.660156l-45.574219-12.210938c-5.332031-1.429688-10.816406 1.734375-12.246094 7.070312l-36.636718 136.722657c-.6875 2.5625-.324219 5.292969 1 7.589843 1.324218 2.292969 3.511718 3.972657 6.070312 4.65625l45.574219 12.210938c.867187.234375 1.738281.34375 2.597656.34375 4.414063 0 8.453125-2.945312 9.652344-7.414062l.464844-1.734376 135.199219 36.226563c.851562.230469 1.722656.34375 2.585937.34375zm-181.238281-56.703125 31.460937-117.40625 26.253907 7.035156-31.457032 117.40625zm0 0" }), _jsx("path", { d: "m511.660156 144.136719-36.636718-136.722657c-1.429688-5.332031-6.910157-8.5-12.246094-7.070312l-45.574219 12.210938c-2.5625.6875-4.746094 2.363281-6.070313 4.660156-1.328124 2.296875-1.6875 5.023437-1 7.585937l.464844 1.734375-135.199218 36.226563c-3.28125.878906-5.894532 3.367187-6.933594 6.605469-1.039063 3.238281-.363282 6.777343 1.796875 9.40625l19.121093 23.265624-5.867187 25.070313c-.796875 3.40625.242187 6.980469 2.738281 9.425781l19.386719 18.988282-6.847656 28.496093c-.824219 3.429688.21875 7.039063 2.742187 9.5 1.894532 1.84375 4.40625 2.839844 6.980469 2.839844.863281 0 1.730469-.113281 2.585937-.34375l57.925782-15.519531c5.335937-1.429688 8.5-6.914063 7.070312-12.25-1.429687-5.332032-6.914062-8.5-12.246094-7.070313l-41.683593 11.171875 4.246093-17.664062c.820313-3.421875-.214843-7.023438-2.726562-9.484375l-19.417969-19.015625 5.714844-24.398438c.710937-3.035156-.035156-6.222656-2.011719-8.628906l-12.40625-15.09375 120.207032-32.207031 30.992187 115.667969c1.199219 4.46875 5.238281 7.414062 9.65625 7.414062.855469 0 1.726563-.109375 2.59375-.339844l45.574219-12.210937c2.5625-.6875 4.746094-2.363281 6.070312-4.660157 1.328125-2.296874 1.6875-5.027343 1-7.589843zm-48.160156 2.554687-30.996094-115.667968s0 0 0-.003907v-.003906l-.464844-1.730469 26.257813-7.035156 31.457031 117.40625zm0 0" }), _jsx("path", { d: "m263.386719 203.265625c-1.894531-2.078125-4.574219-3.261719-7.386719-3.261719-2.808594 0-5.492188 1.183594-7.386719 3.261719-.78125.855469-1.640625 1.789063-2.570312 2.792969-14.488281 15.730468-44.640625 48.457031-44.640625 79.34375 0 30.105468 24.492187 54.601562 54.597656 54.601562s54.597656-24.496094 54.597656-54.601562c0-30.886719-30.148437-63.613282-44.640625-79.339844-.925781-1.007812-1.789062-1.941406-2.570312-2.796875zm-7.386719 116.738281c-19.078125 0-34.597656-15.523437-34.597656-34.601562 0-20.492188 20.960937-45.539063 34.597656-60.601563 13.636719 15.0625 34.597656 40.109375 34.597656 60.601563 0 19.078125-15.519531 34.601562-34.597656 34.601562zm0 0" }), _jsx("path", { d: "m129.878906 54.871094c.917969.261718 1.839844.386718 2.75.386718 4.351563 0 8.355469-2.863281 9.609375-7.253906 1.519531-5.3125-1.554687-10.847656-6.867187-12.363281h-.007813c-5.308593-1.519531-10.839843 1.554687-12.359375 6.867187-1.515625 5.308594 1.5625 10.847657 6.875 12.363282zm0 0" }), _jsx("path", { d: "m407.335938 149.527344-.007813.003906c-5.335937 1.421875-8.507813 6.898438-7.082031 12.238281 1.191406 4.472657 5.238281 7.421875 9.65625 7.421875.855468 0 1.722656-.109375 2.585937-.339844 5.335938-1.421874 8.507813-6.902343 7.085938-12.238281-1.425781-5.335937-6.90625-8.511719-12.238281-7.085937zm0 0" })] }))); };
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -54,7 +54,7 @@ import axios from 'axios';
|
|
|
54
54
|
import React, { useState } from 'react';
|
|
55
55
|
import { Dialog } from '@material-ui/core';
|
|
56
56
|
import RoundedButton from '../../../../shared/RoundedButton/RoundedButton';
|
|
57
|
-
var baseUrl = "https://integrations."
|
|
57
|
+
var baseUrl = "https://integrations.".concat(process.env.REACT_APP_DOMAIN, "/sinco/cbr/");
|
|
58
58
|
function CBRPropertyStepComponent(props) {
|
|
59
59
|
var _this = this;
|
|
60
60
|
var _a = useState(undefined), showWarning = _a[0], setShowWarning = _a[1];
|
|
@@ -86,7 +86,7 @@ function CBRPropertyStepComponent(props) {
|
|
|
86
86
|
display: 'flex',
|
|
87
87
|
height: 23,
|
|
88
88
|
width: 23,
|
|
89
|
-
} }
|
|
89
|
+
} }), getOptionSelected: function (option, value) {
|
|
90
90
|
return option.id === value.id;
|
|
91
91
|
}, getValueString: function (value) { return value === null || value === void 0 ? void 0 : value.id; }, getValueWarning: props.step.validation
|
|
92
92
|
? function (value) {
|
|
@@ -117,7 +117,7 @@ function CBRPropertyStepComponent(props) {
|
|
|
117
117
|
}
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
: undefined, getOptions: getInmueblesOptions })
|
|
120
|
+
: undefined, getOptions: getInmueblesOptions })), showWarning !== undefined && (_jsx(Dialog, __assign({ PaperProps: {
|
|
121
121
|
style: {
|
|
122
122
|
borderRadius: '20px',
|
|
123
123
|
maxWidth: '100vw',
|
|
@@ -125,9 +125,9 @@ function CBRPropertyStepComponent(props) {
|
|
|
125
125
|
},
|
|
126
126
|
}, open: true }, { children: _jsxs("div", __assign({ className: styles.confirmationContainer, style: { color: props.formStyle.textColor } }, { children: [_jsx("div", __assign({ className: styles.closeIcon, onClick: function () {
|
|
127
127
|
setShowWarning(undefined);
|
|
128
|
-
} }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }
|
|
128
|
+
} }, { children: _jsx(CloseRoundedIcon, { fontSize: "inherit" }) })), _jsxs("div", __assign({ className: styles.container }, { children: [_jsx("div", __assign({ className: styles.warningContainer, style: { color: props.formStyle.primaryColor } }, { children: _jsx(WarningRoundedIcon, { fontSize: "inherit", style: { fontSize: '160px' } }) })), _jsxs("div", __assign({ className: styles.messageContainer }, { children: ["La garant\u00EDa de su inmueble expir\u00F3 el d\u00EDa", ' ', showWarning.toLocaleDateString(), "."] })), _jsx("div", __assign({ className: styles.btnContainer }, { children: _jsx(RoundedButton, { text: 'Continuar', color: props.formStyle.primaryContrastColor, backgroundColor: props.formStyle.primaryColor, fontSize: '1rem', padding: '5px 15px 5px 15px', onClick: function () {
|
|
129
129
|
setShowWarning(undefined);
|
|
130
|
-
} }
|
|
130
|
+
} }) }))] }))] })) })))] }));
|
|
131
131
|
}
|
|
132
132
|
export default CBRPropertyStepComponent;
|
|
133
|
-
var PropertyIcon = function (props) { return (_jsx("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "512", viewBox: "0 0 512 512", width: "512", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("g", __assign({ id: "_01-home", "data-name": "01-home" }, { children: _jsxs("g", __assign({ id: "glyph" }, { children: [_jsx("path", { d: "m256 4c-108.075 0-196 87.925-196 196 0 52.5 31.807 119.92 94.537 200.378a1065.816 1065.816 0 0 0 93.169 104.294 12 12 0 0 0 16.588 0 1065.816 1065.816 0 0 0 93.169-104.294c62.73-80.458 94.537-147.878 94.537-200.378 0-108.075-87.925-196-196-196zm0 336c-77.2 0-140-62.8-140-140s62.8-140 140-140 140 62.8 140 140-62.8 140-140 140z" }
|
|
133
|
+
var PropertyIcon = function (props) { return (_jsx("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "512", viewBox: "0 0 512 512", width: "512", xmlns: "http://www.w3.org/2000/svg" }, { children: _jsx("g", __assign({ id: "_01-home", "data-name": "01-home" }, { children: _jsxs("g", __assign({ id: "glyph" }, { children: [_jsx("path", { d: "m256 4c-108.075 0-196 87.925-196 196 0 52.5 31.807 119.92 94.537 200.378a1065.816 1065.816 0 0 0 93.169 104.294 12 12 0 0 0 16.588 0 1065.816 1065.816 0 0 0 93.169-104.294c62.73-80.458 94.537-147.878 94.537-200.378 0-108.075-87.925-196-196-196zm0 336c-77.2 0-140-62.8-140-140s62.8-140 140-140 140 62.8 140 140-62.8 140-140 140z" }), _jsx("path", { d: "m352.072 183.121-88-80a12 12 0 0 0 -16.144 0l-88 80a12.006 12.006 0 0 0 -2.23 15.039 12.331 12.331 0 0 0 10.66 5.84h11.642v76a12 12 0 0 0 12 12h28a12 12 0 0 0 12-12v-44a12 12 0 0 1 12-12h24a12 12 0 0 1 12 12v44a12 12 0 0 0 12 12h28a12 12 0 0 0 12-12v-76h11.642a12.331 12.331 0 0 0 10.66-5.84 12.006 12.006 0 0 0 -2.23-15.039z" })] })) })) }))); };
|
|
@@ -24,7 +24,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
24
24
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
25
25
|
function step(op) {
|
|
26
26
|
if (f) throw new TypeError("Generator is already executing.");
|
|
27
|
-
while (_) try {
|
|
27
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
28
28
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
29
29
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
30
30
|
switch (op[0]) {
|
|
@@ -82,20 +82,20 @@ function AYFStepMapper(props) {
|
|
|
82
82
|
fontSize: 20,
|
|
83
83
|
marginRight: 4,
|
|
84
84
|
marginTop: 2,
|
|
85
|
-
} }
|
|
85
|
+
} }) })));
|
|
86
86
|
case AYFFormStepTypes.AYF_YEAR:
|
|
87
87
|
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, defaultValue: new Date().getFullYear().toString(), icon: _jsx(CalendarTodayRoundedIcon, { fontSize: "inherit", style: {
|
|
88
88
|
color: '#757575',
|
|
89
89
|
fontSize: 20,
|
|
90
90
|
marginRight: 4,
|
|
91
91
|
marginTop: 2,
|
|
92
|
-
} }
|
|
92
|
+
} }) })));
|
|
93
93
|
case AYFFormStepTypes.AYF_BILL_NUM:
|
|
94
|
-
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }
|
|
94
|
+
return (_jsx(TextInputStep, __assign({}, props, { step: props.step, icon: _jsx(DescriptionIcon, { style: { color: '#757575', fontSize: 23 } }) })));
|
|
95
95
|
case AYFFormStepTypes.AYF_CUT_OFF_DATE:
|
|
96
|
-
return (_jsx(DatePickerStep, __assign({}, props, { step: props.step, defaultValue: new Date() })
|
|
96
|
+
return (_jsx(DatePickerStep, __assign({}, props, { step: props.step, defaultValue: new Date() })));
|
|
97
97
|
default:
|
|
98
|
-
return _jsx("div", {}
|
|
98
|
+
return _jsx("div", {});
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
101
|
export default AYFStepMapper;
|