@redneckz/wildless-cms-uni-blocks 0.14.601 → 0.14.603
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/bundle/api/RetailApi/RetailApi.d.ts +1 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +156 -129
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/bundle/model/LinkProps.d.ts +3 -1
- package/bundle/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/bundle/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/dist/api/RetailApi/RetailApi.d.ts +1 -0
- package/dist/api/RetailApi/RetailApi.js +1 -0
- package/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/dist/components/ApplicationLeadForm/consents.js +33 -10
- package/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/model/LinkProps.d.ts +3 -1
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js +21 -0
- package/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/dist/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/dist/ui-kit/Checkbox/getDocument.js +9 -0
- package/dist/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/dist/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/dist/ui-kit/FormField/Fields/ConsentField.js +10 -0
- package/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/dist/ui-kit/FormField/getField.js +10 -17
- package/dist/ui-kit/FormField/getField.js.map +1 -1
- package/dist/ui-kit/FormField/validators.js +1 -1
- package/dist/ui-kit/FormField/validators.js.map +1 -1
- package/lib/api/RetailApi/RetailApi.d.ts +1 -0
- package/lib/api/RetailApi/RetailApi.js +1 -0
- package/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/lib/components/ApplicationLeadForm/consents.js +33 -10
- package/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/model/LinkProps.d.ts +3 -1
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js +19 -0
- package/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/lib/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/lib/ui-kit/Checkbox/getDocument.js +6 -0
- package/lib/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/lib/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/lib/ui-kit/FormField/Fields/ConsentField.js +8 -0
- package/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/lib/ui-kit/FormField/getField.js +10 -17
- package/lib/ui-kit/FormField/getField.js.map +1 -1
- package/lib/ui-kit/FormField/validators.js +1 -1
- package/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/bundle/api/RetailApi/RetailApi.d.ts +1 -0
- package/mobile/bundle/bundle.umd.js +156 -129
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/mobile/bundle/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/mobile/bundle/model/LinkProps.d.ts +3 -1
- package/mobile/bundle/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/mobile/bundle/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/mobile/dist/api/RetailApi/RetailApi.d.ts +1 -0
- package/mobile/dist/api/RetailApi/RetailApi.js +1 -0
- package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/dist/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/mobile/dist/components/ApplicationLeadForm/consents.js +33 -10
- package/mobile/dist/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/mobile/dist/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/model/LinkProps.d.ts +3 -1
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js +21 -0
- package/mobile/dist/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/mobile/dist/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/mobile/dist/ui-kit/Checkbox/getDocument.js +9 -0
- package/mobile/dist/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js +10 -0
- package/mobile/dist/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/mobile/dist/ui-kit/FormField/getField.js +10 -17
- package/mobile/dist/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/validators.js +1 -1
- package/mobile/dist/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/lib/api/RetailApi/RetailApi.d.ts +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.js +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +2 -2
- package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js +1 -1
- package/mobile/lib/components/ApplicationLeadForm/GroupedConsents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.d.ts +7 -1
- package/mobile/lib/components/ApplicationLeadForm/consents.js +33 -10
- package/mobile/lib/components/ApplicationLeadForm/consents.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.d.ts +11 -9
- package/mobile/lib/components/ApplicationLeadForm/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +8 -7
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/model/LinkProps.d.ts +3 -1
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.d.ts +6 -0
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js +19 -0
- package/mobile/lib/ui-kit/Checkbox/CheckboxWithDoc.js.map +1 -0
- package/mobile/lib/ui-kit/Checkbox/getDocument.d.ts +1 -0
- package/mobile/lib/ui-kit/Checkbox/getDocument.js +6 -0
- package/mobile/lib/ui-kit/Checkbox/getDocument.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentField.d.ts +2 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js +8 -0
- package/mobile/lib/ui-kit/FormField/Fields/ConsentField.js.map +1 -0
- package/mobile/lib/ui-kit/FormField/getField.js +10 -17
- package/mobile/lib/ui-kit/FormField/getField.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/validators.js +1 -1
- package/mobile/lib/ui-kit/FormField/validators.js.map +1 -1
- package/mobile/src/api/RetailApi/RetailApi.ts +1 -0
- package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
- package/mobile/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -0
- package/mobile/src/components/ApplicationLeadForm/consents.ts +40 -10
- package/mobile/src/components/ApplicationLeadForm/getInitialFormState.tsx +12 -9
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +14 -7
- package/mobile/src/model/LinkProps.ts +4 -1
- package/mobile/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +48 -0
- package/mobile/src/ui-kit/Checkbox/getDocument.ts +7 -0
- package/mobile/src/ui-kit/FormField/Fields/ConsentField.tsx +16 -0
- package/mobile/src/ui-kit/FormField/getField.tsx +11 -19
- package/mobile/src/ui-kit/FormField/validators.ts +1 -1
- package/package.json +1 -1
- package/src/api/RetailApi/RetailApi.ts +1 -0
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.fixture.tsx +1 -1
- package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +2 -2
- package/src/components/ApplicationLeadForm/GroupedConsents.tsx +1 -0
- package/src/components/ApplicationLeadForm/consents.ts +40 -10
- package/src/components/ApplicationLeadForm/getInitialFormState.tsx +12 -9
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +14 -7
- package/src/model/LinkProps.ts +4 -1
- package/src/ui-kit/Checkbox/CheckboxWithDoc.tsx +48 -0
- package/src/ui-kit/Checkbox/getDocument.ts +7 -0
- package/src/ui-kit/FormField/Fields/ConsentField.tsx +16 -0
- package/src/ui-kit/FormField/getField.tsx +11 -19
- package/src/ui-kit/FormField/validators.ts +1 -1
- package/bundle/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/bundle/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentInformField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentProviderField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -9
- package/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentInformField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentProviderField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -7
- package/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/mobile/bundle/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -9
- package/mobile/dist/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentAssignmentField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentCollectionField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentInformField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentPhotoField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentProviderField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.js.map +0 -1
- package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.d.ts +0 -2
- package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js +0 -7
- package/mobile/lib/ui-kit/FormField/Fields/ProcessPersonalDataField.js.map +0 -1
- package/mobile/src/ui-kit/FormField/Fields/ConsentAssignmentField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ConsentCollectionField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ConsentInformField.tsx +0 -12
- package/mobile/src/ui-kit/FormField/Fields/ConsentPhotoField.tsx +0 -12
- package/mobile/src/ui-kit/FormField/Fields/ConsentProviderField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.tsx +0 -16
- package/mobile/src/ui-kit/FormField/Fields/ProcessPersonalDataField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentAssignmentField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentCollectionField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentInformField.tsx +0 -12
- package/src/ui-kit/FormField/Fields/ConsentPhotoField.tsx +0 -12
- package/src/ui-kit/FormField/Fields/ConsentProviderField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ConsentToReceiveMaterialsField.tsx +0 -16
- package/src/ui-kit/FormField/Fields/ProcessPersonalDataField.tsx +0 -16
package/bundle/bundle.umd.js
CHANGED
|
@@ -1094,43 +1094,6 @@
|
|
|
1094
1094
|
|
|
1095
1095
|
const getRegionUrl = (typeForm) => typeForm === 'OUTSERVICE' ? OUT_SERVICE_URL : undefined;
|
|
1096
1096
|
|
|
1097
|
-
const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1098
|
-
|
|
1099
|
-
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1100
|
-
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1101
|
-
const resultOptions = { ...commonOptions, ...options };
|
|
1102
|
-
return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
|
|
1103
|
-
}) }));
|
|
1104
|
-
});
|
|
1105
|
-
|
|
1106
|
-
const defaultCheckStyle = 'appearance-none w-5 h-5 border-solid flex-none';
|
|
1107
|
-
|
|
1108
|
-
const CHECK_PATHS = [
|
|
1109
|
-
{
|
|
1110
|
-
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1111
|
-
fillRule: 'evenodd',
|
|
1112
|
-
clipRule: 'evenodd',
|
|
1113
|
-
fill: 'white',
|
|
1114
|
-
},
|
|
1115
|
-
];
|
|
1116
|
-
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1117
|
-
const handleChange = useCallback((e) => {
|
|
1118
|
-
if (disabled) {
|
|
1119
|
-
return;
|
|
1120
|
-
}
|
|
1121
|
-
e.preventDefault();
|
|
1122
|
-
onChange && onChange(!value);
|
|
1123
|
-
}, [onChange, disabled, value]);
|
|
1124
|
-
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1125
|
-
return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$2(text)] }) }));
|
|
1126
|
-
});
|
|
1127
|
-
const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1128
|
-
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1129
|
-
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1130
|
-
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
1131
|
-
|
|
1132
|
-
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
1133
|
-
|
|
1134
1097
|
function useBool(defaultValue = false) {
|
|
1135
1098
|
const [value, setValue] = useState(defaultValue);
|
|
1136
1099
|
const setTrue = useCallback(() => setValue(true), []);
|
|
@@ -1192,6 +1155,8 @@
|
|
|
1192
1155
|
const getValidStyle = (valid) => (valid ? inputValidStyle : 'border-error');
|
|
1193
1156
|
const defaultStyle$1 = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
1194
1157
|
|
|
1158
|
+
const renderErrorText = (error) => (jsx("div", { className: "h-6", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1159
|
+
|
|
1195
1160
|
const DEFAULT_HINTS_COUNT = 10;
|
|
1196
1161
|
const defaultResponseItemHandler = (item) => item?.value || '';
|
|
1197
1162
|
const getResponseHandler = (itemHandler) => (response) => {
|
|
@@ -1481,7 +1446,7 @@
|
|
|
1481
1446
|
return false;
|
|
1482
1447
|
};
|
|
1483
1448
|
const snilsValidator = (errorMsg) => validator(snilsValidate)(errorMsg);
|
|
1484
|
-
const emailValidate = (email) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2}$/.test(email);
|
|
1449
|
+
const emailValidate = (email) => /^[^\s@]+@[^\s@]+\.[a-zA-Z]{2,4}$/.test(email);
|
|
1485
1450
|
const emailValidator = (errorMsg) => validator((_) => emailValidate(_))(errorMsg);
|
|
1486
1451
|
|
|
1487
1452
|
const validatorObj = {
|
|
@@ -1780,6 +1745,41 @@
|
|
|
1780
1745
|
|
|
1781
1746
|
const AnnualRevenueField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u0413\u043E\u0434\u043E\u0432\u0430\u044F \u0432\u044B\u0440\u0443\u0447\u043A\u0430, \u20BD", ...getValidation(field('annualRevenue'), validatorObj.annualRevenue, input?.required) })));
|
|
1782
1747
|
|
|
1748
|
+
const SVG = JSX(({ className, viewBox, fill = 'none', width, height, paths, ...commonOptions }) => {
|
|
1749
|
+
return (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: className, viewBox: viewBox, fill: fill, width: width, height: height, children: paths.map(({ d, fill: pathFill, ...options }, i) => {
|
|
1750
|
+
const resultOptions = { ...commonOptions, ...options };
|
|
1751
|
+
return (jsx("path", { d: d, fill: pathFill || 'currentColor', stroke: resultOptions.stroke, strokeLinecap: resultOptions.strokeLinecap, strokeLinejoin: resultOptions.strokeLinejoin, strokeWidth: resultOptions.strokeWidth, strokeMiterlimit: resultOptions.strokeMiterlimit }, i));
|
|
1752
|
+
}) }));
|
|
1753
|
+
});
|
|
1754
|
+
|
|
1755
|
+
const defaultCheckStyle = 'appearance-none w-5 h-5 border-solid flex-none';
|
|
1756
|
+
|
|
1757
|
+
const CHECK_PATHS = [
|
|
1758
|
+
{
|
|
1759
|
+
d: 'M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z',
|
|
1760
|
+
fillRule: 'evenodd',
|
|
1761
|
+
clipRule: 'evenodd',
|
|
1762
|
+
fill: 'white',
|
|
1763
|
+
},
|
|
1764
|
+
];
|
|
1765
|
+
const Checkbox = JSX(({ className, value, text, disabled, isRadio, onChange }) => {
|
|
1766
|
+
const handleChange = useCallback((e) => {
|
|
1767
|
+
if (disabled) {
|
|
1768
|
+
return;
|
|
1769
|
+
}
|
|
1770
|
+
e.preventDefault();
|
|
1771
|
+
onChange && onChange(!value);
|
|
1772
|
+
}, [onChange, disabled, value]);
|
|
1773
|
+
const icon = isRadio ? (jsx("div", { className: "absolute left-1 w-3 h-3 rounded-full bg-primary-main" })) : (jsx(SVG, { paths: CHECK_PATHS, className: "absolute left-1 ml-px block", width: "11", height: "9", fill: "white", viewBox: "0 0 11 9" }));
|
|
1774
|
+
return (jsx("div", { className: className, children: jsxs("label", { className: style('flex items-center relative group/box', getCursorStyle(disabled)), onClick: handleChange, children: [jsx("div", { className: style(defaultCheckStyle, 'm-0', isRadio ? 'rounded-full border-2' : checkboxStyle(value), !disabled && value ? 'border-primary-main' : 'border-gray', disabled ? 'bg-main-disabled' : 'group-hover/box:border-primary-hover'), role: role(isRadio), "aria-checked": Boolean(value), "aria-disabled": Boolean(disabled), "aria-label": text }), value ? icon : null, renderText$2(text)] }) }));
|
|
1775
|
+
});
|
|
1776
|
+
const renderText$2 = (text) => text ? (jsx("div", { className: "ml-s", children: jsx(Text, { size: "text-l", font: "font-light", children: text }) })) : null;
|
|
1777
|
+
const getCursorStyle = (disabled = false) => (disabled ? 'cursor-not-allowed' : 'cursor-pointer');
|
|
1778
|
+
const role = (isRadio = false) => (isRadio ? 'radio' : 'checkbox');
|
|
1779
|
+
const checkboxStyle = (value = false) => style('rounded border', { 'bg-primary-main': value });
|
|
1780
|
+
|
|
1781
|
+
const CheckboxWithError = JSX(({ className, text, value, key, disabled, error, onChange }) => (jsxs("div", { className: style('shrink-0', className), children: [jsx(Checkbox, { text: text, value: value, disabled: disabled, onChange: onChange }, key), renderErrorText(error)] })));
|
|
1782
|
+
|
|
1783
1783
|
const ArmyIdFlgField = JSX(({ field }) => (jsx(CheckboxWithError, { text: "\u041D\u0430\u043B\u0438\u0447\u0438\u0435 \u0432\u043E\u0435\u043D\u043D\u043E\u0433\u043E \u0431\u0438\u043B\u0435\u0442\u0430", ...getValidation(field('armyIdFlg'), validatorObj.armyIdFlg) })));
|
|
1784
1784
|
|
|
1785
1785
|
const BankEmpoleeField = JSX(({ field }) => (jsx(InputControl, { label: "\u0424\u0418\u041E \u0438\u043B\u0438 \u0434\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u0432\u0448\u0435\u0433\u043E \u0412\u0430\u0441 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A\u0430 \u0411\u0430\u043D\u043A\u0430", ...field('bankEmpolee') })));
|
|
@@ -1965,17 +1965,109 @@
|
|
|
1965
1965
|
return (jsx(SelectField, { field: field, source: conscription, label: "\u0421\u0442\u0430\u0442\u0443\u0441 \u0432\u043E\u0435\u043D\u043D\u043E\u043E\u0431\u044F\u0437\u0430\u043D\u043D\u043E\u0433\u043E", fieldName: "conscription", input: input }));
|
|
1966
1966
|
});
|
|
1967
1967
|
|
|
1968
|
-
const
|
|
1968
|
+
const CONSENTS = {
|
|
1969
|
+
processPersonalDataLeadFlg: {
|
|
1970
|
+
text: 'Согласие на обработку персональных данных',
|
|
1971
|
+
docId: 4,
|
|
1972
|
+
},
|
|
1973
|
+
consentProviderFlg: {
|
|
1974
|
+
text: 'Согласие об использовании простой электронной подписи',
|
|
1975
|
+
docId: 5,
|
|
1976
|
+
},
|
|
1977
|
+
consentPfrFlg: {
|
|
1978
|
+
text: 'Согласие на запрос в ПФР',
|
|
1979
|
+
docId: 3,
|
|
1980
|
+
},
|
|
1981
|
+
consentPhotoFlg: {
|
|
1982
|
+
text: 'Прочие согласия (согласие на фотографирование)',
|
|
1983
|
+
docId: 1,
|
|
1984
|
+
},
|
|
1985
|
+
consentAssignmentClaimsFlg: {
|
|
1986
|
+
text: 'Прочие согласия (согласие на уступку прав требований)',
|
|
1987
|
+
docId: 1,
|
|
1988
|
+
},
|
|
1989
|
+
consentCollectionFlg: {
|
|
1990
|
+
text: 'Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)',
|
|
1991
|
+
docId: 1,
|
|
1992
|
+
},
|
|
1993
|
+
consentInformFlg: {
|
|
1994
|
+
text: 'Согласие на информирование о продуктах и услугах Банка',
|
|
1995
|
+
docId: 14,
|
|
1996
|
+
},
|
|
1997
|
+
consentToReceiveMaterials: {
|
|
1998
|
+
text: 'Согласен на получение информационных и аналитических материалов по электронной почте',
|
|
1999
|
+
},
|
|
2000
|
+
};
|
|
1969
2001
|
|
|
1970
|
-
const
|
|
2002
|
+
const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", type: "button", children: jsx(Icon, { name: "CloseIcon", width: "20", height: "20", iconVersion: "gray" }) })));
|
|
1971
2003
|
|
|
1972
|
-
const
|
|
2004
|
+
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
2005
|
+
const { close } = useDialogManager();
|
|
2006
|
+
const handleClose = useCallback(() => {
|
|
2007
|
+
close();
|
|
2008
|
+
onClose && onClose();
|
|
2009
|
+
}, [onClose]);
|
|
2010
|
+
return (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white pt-0 p-lg', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
2011
|
+
});
|
|
1973
2012
|
|
|
1974
|
-
const
|
|
2013
|
+
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2014
|
+
const getAthorizationHeaders = () => {
|
|
2015
|
+
const token = sessionStorage.getItem('accessToken');
|
|
2016
|
+
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2017
|
+
};
|
|
2018
|
+
const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
|
|
2019
|
+
const request = async (url, method, body) => await fetch('https://retail-light-api.cprb.dev.rshbdev.ru/api/v1' + url, {
|
|
2020
|
+
method,
|
|
2021
|
+
headers: {
|
|
2022
|
+
'Content-Type': 'application/json',
|
|
2023
|
+
...getAthorizationHeaders(),
|
|
2024
|
+
},
|
|
2025
|
+
credentials: 'include',
|
|
2026
|
+
body: body ? JSON.stringify(body) : null,
|
|
2027
|
+
})
|
|
2028
|
+
.then((response) => {
|
|
2029
|
+
if (response.ok) {
|
|
2030
|
+
return getResponse(response);
|
|
2031
|
+
}
|
|
2032
|
+
else {
|
|
2033
|
+
throw response;
|
|
2034
|
+
}
|
|
2035
|
+
})
|
|
2036
|
+
.catch((error) => {
|
|
2037
|
+
throw error;
|
|
2038
|
+
});
|
|
2039
|
+
const saveToken = (data) => {
|
|
2040
|
+
sessionStorage.setItem('accessToken', data.access_token);
|
|
2041
|
+
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
2042
|
+
};
|
|
2043
|
+
const RETAIL_API = {
|
|
2044
|
+
CreateUserProfile: async (body) => await request('/public-data/createUserProfile', 'POST', body),
|
|
2045
|
+
UpdateUserProfile: async (body) => await request('/user-data/updateUserProfile', 'PUT', body),
|
|
2046
|
+
CreateDraftTask: async (body) => await request('/user-data/createDraftTask', 'POST', body),
|
|
2047
|
+
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2048
|
+
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2049
|
+
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2050
|
+
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2051
|
+
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2052
|
+
GetFileByID: async (id) => await request(`/feedback/file?id=${id}`, 'GET'),
|
|
2053
|
+
};
|
|
2054
|
+
|
|
2055
|
+
const getDocument = async (id) => {
|
|
2056
|
+
const response = await RETAIL_API.GetFileByID(id);
|
|
2057
|
+
return URL.createObjectURL(await response.blob());
|
|
2058
|
+
};
|
|
1975
2059
|
|
|
1976
|
-
const
|
|
2060
|
+
const OPEN_DOC_BUTTON_TEXT = 'Ознакомиться';
|
|
2061
|
+
const CheckboxWithDoc = JSX(({ className, error, docId, ...props }) => {
|
|
2062
|
+
const { open } = useDialogManager();
|
|
2063
|
+
return (jsxs("div", { className: className, children: [jsxs("div", { className: "flex flex-wrap gap-x-m", children: [jsx(Checkbox, { ...props }), docId ? (jsx(LinkButton, { className: "text-primary-main", onClick: () => handleOpenDocument(docId, open), children: jsx(Text, { children: OPEN_DOC_BUTTON_TEXT }) })) : null] }), renderErrorText(error)] }));
|
|
2064
|
+
});
|
|
2065
|
+
const handleOpenDocument = async (id, open) => {
|
|
2066
|
+
const document = await getDocument(id);
|
|
2067
|
+
open(jsx(Dialog, { className: "my-6xl max-w-4xl mx-auto px-0 min-h-0 pb-0", children: jsx("iframe", { src: `${document}#toolbar=0`, className: "w-full h-[80vh]", id: "iframe-dialog" }) }));
|
|
2068
|
+
};
|
|
1977
2069
|
|
|
1978
|
-
const
|
|
2070
|
+
const ConsentField = JSX(({ field, input }) => input && input.name ? (jsx(CheckboxWithDoc, { text: CONSENTS[input.name]?.text, docId: CONSENTS[input.name]?.docId, ...getValidation(field(input.name), validatorObj[input.name], input?.required) })) : null);
|
|
1979
2071
|
|
|
1980
2072
|
const DependentsField = JSX(({ field, input }) => (jsx(InputControl, { label: "\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E \u0438\u0436\u0434\u0438\u0432\u0435\u043D\u0446\u0435\u0432", placeholder: "\u0417\u0430 \u0438\u0441\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u0434\u0435\u0442\u0435\u0439 \u0434\u043E 18 \u043B\u0435\u0442", type: "number", ...getValidation(field('dependents'), validatorObj.dependents, input?.required), ...input })));
|
|
1981
2073
|
|
|
@@ -2152,8 +2244,6 @@
|
|
|
2152
2244
|
|
|
2153
2245
|
const PosTerminalField = JSX(({ field }) => isAcquiringTrade(field('acquiringType')?.value?.key) ? (jsx(SlideCheckbox, { type: "radio", text: "\u0425\u043E\u0447\u0443 POS-\u0442\u0435\u0440\u043C\u0438\u043D\u0430\u043B", ...field('posTerminal') })) : null);
|
|
2154
2246
|
|
|
2155
|
-
const ProcessPersonalDataField = JSX(({ field, input }) => (jsx(CheckboxWithError, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u043D\u0430 \u043E\u0431\u0440\u0430\u0431\u043E\u0442\u043A\u0443 \u043F\u0435\u0440\u0441\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0445 \u0434\u0430\u043D\u043D\u044B\u0445", ...getValidation(field('processPersonalDataLeadFlg'), validatorObj.processPersonalDataLeadFlg, input?.required) })));
|
|
2156
|
-
|
|
2157
2247
|
const ProductField = UniBlock(({ field, source }) => (jsx(SelectControl, { placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043F\u0440\u043E\u0434\u0443\u043A\u0442", label: "\u041F\u0440\u043E\u0434\u0443\u043A\u0442", options: arrayToOptions(source?.productList), ...withValidator(field('product'), validatorObj.product) })));
|
|
2158
2248
|
const arrayToOptions = (array) => (array ?? []).map((_) => ({ key: _, value: _ }));
|
|
2159
2249
|
|
|
@@ -2308,15 +2398,15 @@
|
|
|
2308
2398
|
serviceDirection: jsx(ServiceDirectionField, { field: field, input: input }),
|
|
2309
2399
|
bankEmpolee: jsx(BankEmpoleeField, { field: field }),
|
|
2310
2400
|
secondaryPhone: jsx(SecondaryPhoneField, { field: field }),
|
|
2311
|
-
consentToReceiveMaterials: jsx(
|
|
2312
|
-
processPersonalDataLeadFlg: jsx(
|
|
2313
|
-
consentProviderFlg: jsx(
|
|
2314
|
-
consentPhotoFlg: jsx(
|
|
2315
|
-
consentAssignmentClaimsFlg: jsx(
|
|
2316
|
-
consentCollectionFlg: jsx(
|
|
2317
|
-
consentInformFlg: jsx(
|
|
2401
|
+
consentToReceiveMaterials: jsx(ConsentField, { field: field, input: input }),
|
|
2402
|
+
processPersonalDataLeadFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2403
|
+
consentProviderFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2404
|
+
consentPhotoFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2405
|
+
consentAssignmentClaimsFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2406
|
+
consentCollectionFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2407
|
+
consentInformFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2408
|
+
consentPfrFlg: jsx(ConsentField, { field: field, input: input }),
|
|
2318
2409
|
applicationDate: (jsx(InputControl, { label: "\u0414\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F \u043E\u0431\u0440\u0430\u0449\u0435\u043D\u0438\u044F \u0432 \u0411\u0430\u043D\u043A", ...field('applicationDate') })),
|
|
2319
|
-
consentPfrFlg: (jsx(CheckboxWithError, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0438\u0435 \u043D\u0430 \u0437\u0430\u043F\u0440\u043E\u0441 \u0432 \u041F\u0424\u0420", ...field('consentPfrFlg') })),
|
|
2320
2410
|
region: isPremium ? (jsx(RegionPremiumField, { field: field })) : (jsx(RegionField, { field: field, input: input, url: getRegionUrl(typeForm) })),
|
|
2321
2411
|
education: jsx(EducationField, { field: field, input: input }),
|
|
2322
2412
|
housing: jsx(HousingField, { field: field, input: input }),
|
|
@@ -2328,7 +2418,6 @@
|
|
|
2328
2418
|
positionOrganization: jsx(PositionOrganizationField, { field: field, input: input }),
|
|
2329
2419
|
familyStatus: jsx(FamilyStatusField, { field: field, input: input }),
|
|
2330
2420
|
children: jsx(ChildrenField, { field: field, input: input }),
|
|
2331
|
-
// eslint-disable-next-line max-lines
|
|
2332
2421
|
familyMembers: jsx(FamilyMembersField, { field: field, input: input }),
|
|
2333
2422
|
dependents: jsx(DependentsField, { field: field, input: input }),
|
|
2334
2423
|
totalIncome: jsx(TotalIncomeField, { field: field, input: input }),
|
|
@@ -2338,6 +2427,7 @@
|
|
|
2338
2427
|
armyIdFlg: jsx(ArmyIdFlgField, { field: field, input: input }),
|
|
2339
2428
|
dulSerie: jsx(DulSerieField, { field: field, input: input }),
|
|
2340
2429
|
dulNumber: jsx(DulNumberField, { field: field, input: input }),
|
|
2430
|
+
// eslint-disable-next-line max-lines
|
|
2341
2431
|
dulIssueDateField: jsx(DulIssueDateField, { field: field, input: input }),
|
|
2342
2432
|
dulSubdivisionCode: jsx(DulSubdivisionCodeField, { field: field, input: input }),
|
|
2343
2433
|
dulIssuedBy: jsx(DulIssuedByField, { field: field, input: input }),
|
|
@@ -2383,17 +2473,6 @@
|
|
|
2383
2473
|
: '', className), type: type, role: role, onClick: onClick, children: children }));
|
|
2384
2474
|
});
|
|
2385
2475
|
|
|
2386
|
-
const CloseButton = JSX(({ className, onClose }) => (jsx("button", { className: style('flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none', className), onClick: onClose, title: "\u0417\u0430\u043A\u0440\u044B\u0442\u044C", type: "button", children: jsx(Icon, { name: "CloseIcon", width: "20", height: "20", iconVersion: "gray" }) })));
|
|
2387
|
-
|
|
2388
|
-
const Dialog = JSX(({ className, head, children, onClose, onClick }) => {
|
|
2389
|
-
const { close } = useDialogManager();
|
|
2390
|
-
const handleClose = useCallback(() => {
|
|
2391
|
-
close();
|
|
2392
|
-
onClose && onClose();
|
|
2393
|
-
}, [onClose]);
|
|
2394
|
-
return (jsxs("div", { onClick: onClick, className: style('relative min-h-full bg-white pt-0 p-lg', className), role: "dialog", children: [jsxs("div", { className: "sticky py-xl top-0 bg-white z-10", children: [jsx(CloseButton, { className: "absolute top-0 right-0", onClose: handleClose }), jsx("div", { className: "container", children: head })] }), jsx("div", { className: "container pb-6xl", children: children })] }));
|
|
2395
|
-
});
|
|
2396
|
-
|
|
2397
2476
|
const ResponseTypeDialog = JSX(function ({ responseType, typeForm, }) {
|
|
2398
2477
|
const responseOK = responseType === 'OK';
|
|
2399
2478
|
const statusIcon = responseOK ? 'ResponseOKIcon' : 'ResponseFailIcon';
|
|
@@ -2554,17 +2633,6 @@
|
|
|
2554
2633
|
return [storedValue, setValue];
|
|
2555
2634
|
}
|
|
2556
2635
|
|
|
2557
|
-
const CONSENTS = [
|
|
2558
|
-
'processPersonalDataLeadFlg',
|
|
2559
|
-
'consentProviderFlg',
|
|
2560
|
-
'consentPfrFlg',
|
|
2561
|
-
'consentPhotoFlg',
|
|
2562
|
-
'consentAssignmentClaimsFlg',
|
|
2563
|
-
'consentCollectionFlg',
|
|
2564
|
-
'consentInformFlg',
|
|
2565
|
-
'consentToReceiveMaterials',
|
|
2566
|
-
];
|
|
2567
|
-
|
|
2568
2636
|
const initialFormState = {
|
|
2569
2637
|
typeForm: '',
|
|
2570
2638
|
region: { key: '', text: '' },
|
|
@@ -2665,53 +2733,12 @@
|
|
|
2665
2733
|
const hasValidationErrors = useMemo(() => inputs
|
|
2666
2734
|
?.filter((_) => _.required)
|
|
2667
2735
|
?.some((_) => Boolean(withValidator(field(_?.name), validatorObj[_?.name]).error)), [inputs]);
|
|
2668
|
-
return (jsx("div", { className: "w-fit", children: jsx(Foldable, { isFoldButtonOnTop: true, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, className: "flex flex-col pl-2xl", children: inputs.map(getField(field, typeForm)) })), renderFoldButton: renderGeneralCheckbox(jsxs("div", { children: [jsx(Checkbox, { value: isChecked, onChange: handleGeneralToggle, text: CONSENT_ALL_DOCS_TEXT }, key), renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')] })) }) }));
|
|
2736
|
+
return (jsx("div", { className: "w-fit", children: jsx(Foldable, { isFoldButtonOnTop: true, unfoldedByDefault: true, renderFoldableSection: ({ isUnfolded }) => (jsx(FoldableSection, { isUnfolded: isUnfolded, className: "flex flex-col pl-2xl", children: inputs.map(getField(field, typeForm)) })), renderFoldButton: renderGeneralCheckbox(jsxs("div", { children: [jsx(Checkbox, { value: isChecked, onChange: handleGeneralToggle, text: CONSENT_ALL_DOCS_TEXT }, key), renderErrorText(hasValidationErrors ? CONSENT_REQUIRED : '')] })) }) }));
|
|
2669
2737
|
});
|
|
2670
2738
|
const renderGeneralCheckbox = (generalCheckBox) => (foldableData) => (jsxs("div", { className: "flex items-start", children: [generalCheckBox, jsx("button", { onClick: foldableData.onToggle, className: "px-m py-2xs", children: jsx(Icon, { className: "text-primary-text", name: foldableData.isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', width: "16", height: "16" }) })] }));
|
|
2671
2739
|
|
|
2672
2740
|
const renderSubmitButton = (button, className) => (jsx(Button, { className: style('w-full @xl:w-auto', className), type: "submit", children: button?.text ? button.text : 'Отправить заявку' }));
|
|
2673
2741
|
|
|
2674
|
-
const getResponse = (response) => (isJSON(response) ? response.json() : response);
|
|
2675
|
-
const getAthorizationHeaders = () => {
|
|
2676
|
-
const token = sessionStorage.getItem('accessToken');
|
|
2677
|
-
return token ? { Authorization: `Bearer ${token}` } : null;
|
|
2678
|
-
};
|
|
2679
|
-
const isJSON = (response) => response.headers.get('Content-Type') === 'application/json';
|
|
2680
|
-
const request = async (url, method, body) => await fetch('https://retail-light-api.cprb.dev.rshbdev.ru/api/v1' + url, {
|
|
2681
|
-
method,
|
|
2682
|
-
headers: {
|
|
2683
|
-
'Content-Type': 'application/json',
|
|
2684
|
-
...getAthorizationHeaders(),
|
|
2685
|
-
},
|
|
2686
|
-
credentials: 'include',
|
|
2687
|
-
body: body ? JSON.stringify(body) : null,
|
|
2688
|
-
})
|
|
2689
|
-
.then((response) => {
|
|
2690
|
-
if (response.ok) {
|
|
2691
|
-
return getResponse(response);
|
|
2692
|
-
}
|
|
2693
|
-
else {
|
|
2694
|
-
throw response;
|
|
2695
|
-
}
|
|
2696
|
-
})
|
|
2697
|
-
.catch((error) => {
|
|
2698
|
-
throw error;
|
|
2699
|
-
});
|
|
2700
|
-
const saveToken = (data) => {
|
|
2701
|
-
sessionStorage.setItem('accessToken', data.access_token);
|
|
2702
|
-
sessionStorage.setItem('refreshToken', data.refresh_token);
|
|
2703
|
-
};
|
|
2704
|
-
const RETAIL_API = {
|
|
2705
|
-
CreateUserProfile: async (body) => await request('/public-data/createUserProfile', 'POST', body),
|
|
2706
|
-
UpdateUserProfile: async (body) => await request('/user-data/updateUserProfile', 'PUT', body),
|
|
2707
|
-
CreateDraftTask: async (body) => await request('/user-data/createDraftTask', 'POST', body),
|
|
2708
|
-
UpdateUserTask: async (body) => await request('/user-data/updateUserTask', 'PUT', body),
|
|
2709
|
-
SendCode: async (body) => await request('/sms/sendCode', 'POST', body),
|
|
2710
|
-
CheckCode: async (body) => await request('/sms/checkCode', 'POST', body).then(saveToken),
|
|
2711
|
-
CreateCaptcha: async (phoneNumber) => await request(`/sms/createCaptcha?phoneNumber=${phoneNumber}`, 'GET'),
|
|
2712
|
-
CheckCaptcha: async (body) => await request('/sms/checkCaptcha', 'POST', body),
|
|
2713
|
-
};
|
|
2714
|
-
|
|
2715
2742
|
const getUpdateUserProfileData = (profileId, formData) => {
|
|
2716
2743
|
const { name = '', surname = '', middleName = '', birthday = '', phone = '', email = '', processPersonalDataLeadFlg, consentProviderFlg, consentPfrFlg, consentPhotoFlg, consentAssignmentClaimsFlg, consentCollectionFlg, consentInformFlg, } = formData;
|
|
2717
2744
|
return {
|
|
@@ -3045,10 +3072,13 @@
|
|
|
3045
3072
|
setResponseStatus('Fail');
|
|
3046
3073
|
}
|
|
3047
3074
|
};
|
|
3075
|
+
const acceptedConsents = Object.keys(CONSENTS)
|
|
3076
|
+
.filter((_) => formData[_])
|
|
3077
|
+
.map((_) => CONSENTS[_]?.text);
|
|
3048
3078
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
3049
3079
|
const verifyPhoneDialog = useVerifyPhoneDialog({
|
|
3050
3080
|
close: handleSuccessVerify,
|
|
3051
|
-
...verifyPhoneContent(formData?.phone),
|
|
3081
|
+
...verifyPhoneContent(formData?.phone, acceptedConsents),
|
|
3052
3082
|
});
|
|
3053
3083
|
verifyPhoneDialog.open();
|
|
3054
3084
|
}
|
|
@@ -3062,17 +3092,14 @@
|
|
|
3062
3092
|
responseStatus,
|
|
3063
3093
|
};
|
|
3064
3094
|
};
|
|
3065
|
-
const verifyPhoneContent = (phone) => ({
|
|
3095
|
+
const verifyPhoneContent = (phone, consents) => ({
|
|
3066
3096
|
title: 'Подтвердите номер телефона',
|
|
3067
3097
|
description: `Мы отправили код на ${phone}`,
|
|
3068
3098
|
phoneNumber: formatPhone(phone),
|
|
3069
3099
|
textButton: 'Оформить',
|
|
3070
|
-
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span
|
|
3071
|
-
<ul><li>соглашение о порядке использования простой электронной подписи,
|
|
3072
|
-
</li><li>согласие на обработку персональных данных,
|
|
3073
|
-
</li><li>предоставление и подписание прочих согласий Банка,
|
|
3074
|
-
</li><li>согласие на запрос в ПФР</li></ul>`,
|
|
3100
|
+
__html: `<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>${consentsToList(consents)}`,
|
|
3075
3101
|
});
|
|
3102
|
+
const consentsToList = (consents) => `<ul>${consents?.map((_) => '<li>' + _ + '</li>').join('')}</ul>`;
|
|
3076
3103
|
|
|
3077
3104
|
const useInitApplicationLead = () => {
|
|
3078
3105
|
useEffect(() => {
|
|
@@ -3110,8 +3137,8 @@
|
|
|
3110
3137
|
return consentInputs.length > 2 ? (jsxs("div", { children: [restInputs.map(getField(field, typeForm)), jsx(GroupedConsents, { inputs: consentInputs, field: field })] })) : ((inputs || [])?.map(getField(field, typeForm)));
|
|
3111
3138
|
};
|
|
3112
3139
|
const splitInputs = (inputs) => ({
|
|
3113
|
-
consentInputs: inputs?.filter((_) => CONSENTS.includes(_.name)) || [],
|
|
3114
|
-
restInputs: inputs?.filter((_) => !CONSENTS.includes(_.name)) || [],
|
|
3140
|
+
consentInputs: inputs?.filter((_) => Object.keys(CONSENTS).includes(_.name)) || [],
|
|
3141
|
+
restInputs: inputs?.filter((_) => !Object.keys(CONSENTS).includes(_.name)) || [],
|
|
3115
3142
|
});
|
|
3116
3143
|
|
|
3117
3144
|
const NotFound = JSX(({ title, description }) => {
|
|
@@ -7539,7 +7566,7 @@
|
|
|
7539
7566
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
7540
7567
|
});
|
|
7541
7568
|
|
|
7542
|
-
const packageVersion = "0.14.
|
|
7569
|
+
const packageVersion = "0.14.602";
|
|
7543
7570
|
|
|
7544
7571
|
exports.Blocks = Blocks;
|
|
7545
7572
|
exports.ContentPage = ContentPage;
|