@redneckz/wildless-cms-uni-blocks 0.14.133 → 0.14.135
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/bundle.umd.js +58 -46
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +4 -5
- package/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/bundle/components/ApplicationForm/InputControl.d.ts +2 -9
- package/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/bundle/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/bundle/ui-kit/Input/InputProps.d.ts +2 -1
- package/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +4 -5
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js +21 -19
- package/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/dist/components/ApplicationForm/InputControl.d.ts +2 -9
- package/dist/components/ApplicationForm/InputControl.js +1 -1
- package/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/dist/components/ApplicationForm/feedbackTypes.js +1 -1
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/dist/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/dist/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/dist/components/ApplicationForm/renderTextarea.js +2 -1
- package/dist/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTable.js +2 -1
- package/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/dist/ui-kit/InnerTable/InnerTableHeader.js +4 -1
- package/dist/ui-kit/InnerTable/InnerTableHeader.js.map +1 -1
- package/dist/ui-kit/InnerTable/renderInnerTableRow.js +5 -3
- package/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/dist/ui-kit/Input/Input.js +8 -5
- package/dist/ui-kit/Input/Input.js.map +1 -1
- package/dist/ui-kit/Input/InputProps.d.ts +2 -1
- package/lib/common.css +1 -1
- package/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +4 -5
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js +21 -19
- package/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/lib/components/ApplicationForm/InputControl.d.ts +2 -9
- package/lib/components/ApplicationForm/InputControl.js +1 -1
- package/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/lib/components/ApplicationForm/feedbackTypes.js +1 -1
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/lib/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/lib/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/lib/components/ApplicationForm/renderTextarea.js +2 -1
- package/lib/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTable.js +2 -1
- package/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/lib/ui-kit/InnerTable/InnerTableHeader.js +4 -1
- package/lib/ui-kit/InnerTable/InnerTableHeader.js.map +1 -1
- package/lib/ui-kit/InnerTable/renderInnerTableRow.js +5 -3
- package/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/lib/ui-kit/Input/Input.js +8 -5
- package/lib/ui-kit/Input/Input.js.map +1 -1
- package/lib/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/bundle/bundle.umd.js +58 -46
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormFeedback.d.ts +4 -5
- package/mobile/bundle/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/InputControl.d.ts +2 -9
- package/mobile/bundle/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/mobile/bundle/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.d.ts +4 -5
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js +21 -19
- package/mobile/dist/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/mobile/dist/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/InputControl.d.ts +2 -9
- package/mobile/dist/components/ApplicationForm/InputControl.js +1 -1
- package/mobile/dist/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/feedbackTypes.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.js +2 -1
- package/mobile/dist/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js +2 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.js +4 -1
- package/mobile/dist/ui-kit/InnerTable/InnerTableHeader.js.map +1 -1
- package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js +5 -3
- package/mobile/dist/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/mobile/dist/ui-kit/Input/Input.js +8 -5
- package/mobile/dist/ui-kit/Input/Input.js.map +1 -1
- package/mobile/dist/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.d.ts +4 -5
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js +21 -19
- package/mobile/lib/components/ApplicationForm/ApplicationFormFeedback.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js +9 -9
- package/mobile/lib/components/ApplicationForm/ApplicationFormIndividuals.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js +5 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormWed.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/InputControl.d.ts +2 -9
- package/mobile/lib/components/ApplicationForm/InputControl.js +1 -1
- package/mobile/lib/components/ApplicationForm/InputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/PhoneInputControl.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/feedbackTypes.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderAgreementWithSubmit.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderIndividualsFields.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.d.ts +9 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.js +2 -1
- package/mobile/lib/components/ApplicationForm/renderTextarea.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderUserData.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js +2 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTable.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.js +4 -1
- package/mobile/lib/ui-kit/InnerTable/InnerTableHeader.js.map +1 -1
- package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js +5 -3
- package/mobile/lib/ui-kit/InnerTable/renderInnerTableRow.js.map +1 -1
- package/mobile/lib/ui-kit/Input/Input.js +8 -5
- package/mobile/lib/ui-kit/Input/Input.js.map +1 -1
- package/mobile/lib/ui-kit/Input/InputProps.d.ts +2 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormFeedback.tsx +66 -54
- package/mobile/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +13 -12
- package/mobile/src/components/ApplicationForm/ApplicationFormWed.tsx +5 -4
- package/mobile/src/components/ApplicationForm/InputControl.tsx +5 -11
- package/mobile/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
- package/mobile/src/components/ApplicationForm/feedbackTypes.ts +1 -1
- package/mobile/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +1 -1
- package/mobile/src/components/ApplicationForm/renderIndividualsFields.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderTextarea.tsx +35 -23
- package/mobile/src/components/ApplicationForm/renderUserData.tsx +4 -4
- package/mobile/src/ui-kit/InnerTable/InnerTable.tsx +3 -2
- package/mobile/src/ui-kit/InnerTable/InnerTableHeader.tsx +13 -4
- package/mobile/src/ui-kit/InnerTable/renderInnerTableRow.tsx +19 -5
- package/mobile/src/ui-kit/Input/Input.tsx +45 -31
- package/mobile/src/ui-kit/Input/InputProps.ts +2 -1
- package/package.json +1 -1
- package/src/components/ApplicationForm/ApplicationFormFeedback.tsx +66 -54
- package/src/components/ApplicationForm/ApplicationFormIndividuals.tsx +13 -12
- package/src/components/ApplicationForm/ApplicationFormWed.tsx +5 -4
- package/src/components/ApplicationForm/InputControl.tsx +5 -11
- package/src/components/ApplicationForm/PhoneInputControl.tsx +2 -2
- package/src/components/ApplicationForm/feedbackTypes.ts +1 -1
- package/src/components/ApplicationForm/renderAgreementWithSubmit.tsx +1 -1
- package/src/components/ApplicationForm/renderIndividualsFields.tsx +2 -2
- package/src/components/ApplicationForm/renderTextarea.tsx +35 -23
- package/src/components/ApplicationForm/renderUserData.tsx +4 -4
- package/src/ui-kit/InnerTable/InnerTable.tsx +3 -2
- package/src/ui-kit/InnerTable/InnerTableHeader.tsx +13 -4
- package/src/ui-kit/InnerTable/renderInnerTableRow.tsx +19 -5
- package/src/ui-kit/Input/Input.tsx +45 -31
- package/src/ui-kit/Input/InputProps.ts +2 -1
package/bundle/bundle.umd.js
CHANGED
|
@@ -981,7 +981,7 @@
|
|
|
981
981
|
const ApplicationFieldsetLayout = JSX(({ title, firstChildren, secondChildren }) => (jsxs("fieldset", { className: "grid @xl:flex @xl:justify-between gap-lg border-b border-b-main-divider @xl:border-none", children: [title ? (jsx("legend", { className: "w-full", children: jsx(Heading, { title: title, headingType: "h6", className: "@xl:text-center" }) })) : null, firstChildren, secondChildren] })));
|
|
982
982
|
const formChildrenStyle = '@xl:w-1/2 space-y-s';
|
|
983
983
|
|
|
984
|
-
const Input = JSX(({ key, className = '',
|
|
984
|
+
const Input = JSX(({ key, className = '', id, name, type = 'text', label, placeholder, value = '', valid = true, children, onChange, onFocus, onBlur, pattern, autoFocus = false, isTextarea = false, }) => {
|
|
985
985
|
const inputRef = useRef(null);
|
|
986
986
|
const handleChange = useCallback((e) => {
|
|
987
987
|
onChange && onChange(e.target?.value || '');
|
|
@@ -991,16 +991,19 @@
|
|
|
991
991
|
inputRef.current?.focus();
|
|
992
992
|
}
|
|
993
993
|
}, [autoFocus, inputRef]);
|
|
994
|
+
const defaultStyle = 'w-full border rounded-md text-primary-text outline-none p-m';
|
|
994
995
|
const paddingStyle = children ? 'pr-3xl' : '';
|
|
995
|
-
const validStyle = valid
|
|
996
|
-
|
|
997
|
-
: 'border-error';
|
|
998
|
-
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx("input", { ref: inputRef, className: style('w-full h-14 border rounded-md text-primary-text outline-none p-m', paddingStyle, validStyle, inputClassName), id: id, name: name || id, placeholder: placeholder, type: type, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key)] }), children] }));
|
|
996
|
+
const validStyle = getValidStyle(valid);
|
|
997
|
+
return (jsxs("div", { className: style('relative', className), children: [jsxs("label", { children: [label ? renderLabel$1(label) : null, isTextarea ? (jsx("textarea", { className: style('block resize-y min-h-24', defaultStyle, validStyle), id: style('textarea', id), name: name || id, placeholder: placeholder, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur }, key)) : (jsx("input", { type: type, className: style('h-14', defaultStyle, paddingStyle, validStyle), ref: inputRef, id: id, name: name || id, placeholder: placeholder, value: value, onInput: handleChange, onFocus: onFocus, onBlur: onBlur, pattern: pattern }, key))] }), children] }));
|
|
999
998
|
});
|
|
999
|
+
const renderLabel$1 = (label) => (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) }));
|
|
1000
|
+
const getValidStyle = (valid) => valid
|
|
1001
|
+
? 'border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text'
|
|
1002
|
+
: 'border-error';
|
|
1000
1003
|
|
|
1001
1004
|
const renderErrorText = (error) => (jsx("div", { className: "h-4", children: error ? (jsx(Text, { size: "text-xs", font: "font-light", color: "text-error", children: error })) : null }));
|
|
1002
1005
|
|
|
1003
|
-
const InputControl = JSX(({ className, label, value = '', error, onChange, onBlur }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur }), renderErrorText(error)] })));
|
|
1006
|
+
const InputControl = JSX(({ className, label, value = '', placeholder, error, onChange, onBlur, isTextarea }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [jsx(Input, { type: "text", "aria-label": label, label: label, valid: Boolean(!error), value: value, onChange: onChange, onBlur: onBlur, isTextarea: isTextarea, placeholder: placeholder }), renderErrorText(error)] })));
|
|
1004
1007
|
|
|
1005
1008
|
const isPlaceholder = (_) => _ === '_';
|
|
1006
1009
|
const isDigit = (_) => /\d/.test(_);
|
|
@@ -1424,7 +1427,7 @@
|
|
|
1424
1427
|
},
|
|
1425
1428
|
{
|
|
1426
1429
|
text: 'Качество обслуживания',
|
|
1427
|
-
key: '
|
|
1430
|
+
key: 'FEEDBACK_QS',
|
|
1428
1431
|
},
|
|
1429
1432
|
];
|
|
1430
1433
|
const FEEDBACK_METHOD = [
|
|
@@ -1464,10 +1467,7 @@
|
|
|
1464
1467
|
});
|
|
1465
1468
|
const checkboxStyle = (value) => style('rounded border', value ? 'bg-primary-main' : '');
|
|
1466
1469
|
|
|
1467
|
-
const renderAgreementWithSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex w-full justify-between items-baseline", children: [jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderErrorText(withValidator(consentDataProcessing, consentDataProcessingValidator).error)] }), renderSubmitButton(button)] }));
|
|
1468
|
-
|
|
1469
|
-
const activeTextareaStyles = 'hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text';
|
|
1470
|
-
const renderTextarea = (textField, text, placeholder = '') => (jsxs("label", { className: "space-y-xs", htmlFor: "textarea", children: [text ? (jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", children: text }) })) : null, jsx("textarea", { id: "textarea", placeholder: placeholder, className: style('block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray', activeTextareaStyles), value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }));
|
|
1470
|
+
const renderAgreementWithSubmit = (consentDataProcessing, link, button) => (jsxs("div", { className: "flex flex-col lg:flex-row w-full justify-between items-baseline", children: [jsxs("div", { children: [jsxs("div", { className: "flex gap-3", children: [jsx(Checkbox, { ...consentDataProcessing }), jsx(Footnote, { text: "\u0421\u043E\u0433\u043B\u0430\u0441\u0435\u043D \u0441 ", link: link })] }), renderErrorText(withValidator(consentDataProcessing, consentDataProcessingValidator).error)] }), renderSubmitButton(button)] }));
|
|
1471
1471
|
|
|
1472
1472
|
const formatDate = (date, toTimeStamp = false) => {
|
|
1473
1473
|
if (typeof date === 'string') {
|
|
@@ -1624,7 +1624,7 @@
|
|
|
1624
1624
|
|
|
1625
1625
|
const DatePickerControl = JSX(({ className, label, value = undefined, error, onChange }) => (jsxs("div", { className: style('shrink-0 w-full', className), children: [label ? (jsx("div", { className: "mb-xs", children: jsx(Text, { size: "text-m", font: "font-light", children: label }) })) : null, jsx(DatePicker, { value: value, onChange: onChange, valid: Boolean(!error) }), renderErrorText(error)] })));
|
|
1626
1626
|
|
|
1627
|
-
const renderUserData = (field) => (jsxs("div", { children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F*", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F*", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...
|
|
1627
|
+
const renderUserData = (field) => (jsxs("div", { children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F*", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u0418\u043C\u044F*", ...withValidator(field('name'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E (\u041E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E, \u043F\u0440\u0438 \u043D\u0430\u043B\u0438\u0447\u0438\u0438)", ...field('middleName') }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F*", ...withValidator(field('birthday'), defaultValidator) })] }));
|
|
1628
1628
|
|
|
1629
1629
|
const initialFormState$2 = {
|
|
1630
1630
|
typeForm: { key: 'FEEDBACK', text: 'Задать вопрос по продуктам и услугам' },
|
|
@@ -1632,12 +1632,10 @@
|
|
|
1632
1632
|
surname: '',
|
|
1633
1633
|
name: '',
|
|
1634
1634
|
middleName: '',
|
|
1635
|
-
|
|
1635
|
+
birthday: undefined,
|
|
1636
1636
|
feedbackMethod: { key: 'Телефонный звонок' },
|
|
1637
1637
|
phone: '',
|
|
1638
|
-
|
|
1639
|
-
mail: '',
|
|
1640
|
-
text: '',
|
|
1638
|
+
email: '',
|
|
1641
1639
|
comment: '',
|
|
1642
1640
|
consentDataProcessing: false,
|
|
1643
1641
|
};
|
|
@@ -1646,34 +1644,39 @@
|
|
|
1646
1644
|
region: defaultValidator,
|
|
1647
1645
|
department: defaultValidator,
|
|
1648
1646
|
name: nameValidator,
|
|
1649
|
-
|
|
1647
|
+
birthday: defaultValidator,
|
|
1650
1648
|
feedbackMethod: defaultValidator,
|
|
1651
1649
|
phone: phoneValidator,
|
|
1652
|
-
|
|
1650
|
+
email: defaultValidator,
|
|
1653
1651
|
consentDataProcessing: consentDataProcessingValidator,
|
|
1654
1652
|
inn: innValidator,
|
|
1655
1653
|
});
|
|
1656
1654
|
const ApplicationFormFeedback = JSX(({ button, link, onSubmit }) => {
|
|
1657
1655
|
const handleSubmit = useCallback((formState) => {
|
|
1656
|
+
const { typeForm, region, department, phone, email, inn, fullName, feedbackMethod, ...usedFields } = formState;
|
|
1658
1657
|
const submitData = {
|
|
1659
|
-
...
|
|
1660
|
-
typeForm:
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1658
|
+
...usedFields,
|
|
1659
|
+
typeForm: typeForm.key,
|
|
1660
|
+
department: department?.text || '',
|
|
1661
|
+
feedbackMethod: feedbackMethod.text,
|
|
1662
|
+
[isLegalEntity ? 'region' : 'regionBranch']: region?.text,
|
|
1663
|
+
[isLegalEntity ? 'phone' : 'phoneNumber']: phone.replace(/[^+\d]/g, ''),
|
|
1664
|
+
[isLegalEntity ? 'mail' : 'email']: email,
|
|
1665
|
+
...(isLegalEntity ? { inn, fullName } : {}),
|
|
1664
1666
|
};
|
|
1665
|
-
isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData);
|
|
1667
|
+
isValidationSuccess(feedbackValidator(formState)) && onSubmit(submitData, isLegalEntity);
|
|
1666
1668
|
}, [onSubmit]);
|
|
1667
1669
|
const [formState, { field, ...formProps }] = useForm(initialFormState$2, handleSubmit);
|
|
1668
|
-
const
|
|
1669
|
-
const
|
|
1670
|
-
const isQualityService = field('typeForm').value?.key === '
|
|
1671
|
-
const isLegalEntity =
|
|
1672
|
-
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { firstChildren: jsxs("div", { className: "w-full max-w-xl space-y-s m-auto", children: [jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(field('typeForm'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), defaultValidator) })) : null, jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options:
|
|
1670
|
+
const branch = useGetRegions();
|
|
1671
|
+
const regions = useBranches(formState?.region?.key).filter((region) => region?.address);
|
|
1672
|
+
const isQualityService = field('typeForm').value?.key === 'FEEDBACK_QS';
|
|
1673
|
+
const isLegalEntity = getLegalEntity(field('typeForm').value?.key, field('serviceDirection').value?.key);
|
|
1674
|
+
return (jsx("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: jsx(ApplicationFieldsetLayout, { firstChildren: jsxs("div", { className: "w-full max-w-xl space-y-s m-auto", children: [jsx(SelectControl, { label: "\u0422\u0435\u043C\u0430*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0442\u0435\u043C\u0443", options: FEEDBACK_TYPES, ...withValidator(field('typeForm'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u041D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043D\u0430\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0438\u0435", options: SERVICE_DIRECTIONS, ...withValidator(field('serviceDirection'), defaultValidator) })) : null, jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: branch.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) }), isQualityService ? (jsx(SelectControl, { label: "\u0410\u0434\u0440\u0435\u0441*", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441", options: regions.map(({ branchCode = '', address = '' }) => ({
|
|
1673
1675
|
key: branchCode,
|
|
1674
1676
|
text: address,
|
|
1675
|
-
})), ...withValidator(field('department'), defaultValidator) }), renderUserData(field), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...
|
|
1677
|
+
})), ...withValidator(field('department'), defaultValidator) })) : null, renderUserData(field), isLegalEntity ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0418\u041D\u041D*", ...withValidator(field('inn'), innValidator) }), jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...field('fullName') })] })) : null, jsx(SelectControl, { label: "\u0421\u043F\u043E\u0441\u043E\u0431 \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u0438\u044F \u043E\u0442\u0432\u0435\u0442\u0430*", options: FEEDBACK_METHOD, ...withValidator(field('feedbackMethod'), defaultValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D*", ...withValidator(field('phone'), phoneValidator) }), isQualityService ? (jsxs("div", { children: [jsx(InputControl, { label: "\u0414\u043E\u043F\u043E\u043B\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0439 \u0442\u0435\u043B\u0435\u0444\u043E\u043D", ...field('secondaryPhoneNumber') }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430*", ...withValidator(field('email'), defaultValidator) }), 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') }), 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') })] })) : (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430*", ...withValidator(field('email'), defaultValidator) })), jsx(InputControl, { ...withValidator(field('comment'), defaultValidator), placeholder: "\u0412\u0430\u0448\u0435 \u0441\u043E\u043E\u0431\u0449\u0435\u043D\u0438\u0435*", isTextarea: true }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }) }) }));
|
|
1676
1678
|
});
|
|
1679
|
+
const getLegalEntity = (typeFormKey = '', serviceDirectionKey = '') => typeFormKey === 'FEEDBACK_QS' && serviceDirectionKey === 'Юридическое лицо / ИП';
|
|
1677
1680
|
|
|
1678
1681
|
const ApplicationFormGrantSupport = JSX((props) => {
|
|
1679
1682
|
const { button, sourceBookDir } = props;
|
|
@@ -1692,8 +1695,8 @@
|
|
|
1692
1695
|
name: '',
|
|
1693
1696
|
middleName: '',
|
|
1694
1697
|
phone: '',
|
|
1695
|
-
|
|
1696
|
-
|
|
1698
|
+
email: '',
|
|
1699
|
+
birthday: undefined,
|
|
1697
1700
|
consentDataProcessing: true,
|
|
1698
1701
|
};
|
|
1699
1702
|
const individualsValidator = objectValidator({
|
|
@@ -1701,28 +1704,28 @@
|
|
|
1701
1704
|
name: nameValidator,
|
|
1702
1705
|
middleName: nameValidator,
|
|
1703
1706
|
phone: phoneValidator,
|
|
1704
|
-
|
|
1705
|
-
|
|
1707
|
+
email: defaultValidator,
|
|
1708
|
+
birthday: defaultValidator,
|
|
1706
1709
|
});
|
|
1707
1710
|
const ApplicationFormIndividuals = JSX((props) => {
|
|
1708
1711
|
const { button, link, product, onSubmit } = props;
|
|
1709
1712
|
const handleSubmit = useCallback((formState) => {
|
|
1710
|
-
const { surname, name, middleName, phone,
|
|
1713
|
+
const { surname, name, middleName, phone, email, birthday, consentDataProcessing } = formState;
|
|
1711
1714
|
isValidationSuccess(individualsValidator(formState)) &&
|
|
1712
1715
|
onSubmit({
|
|
1713
1716
|
typeForm: 'dpst',
|
|
1714
1717
|
surname,
|
|
1715
1718
|
name,
|
|
1716
1719
|
middleName,
|
|
1717
|
-
|
|
1720
|
+
email,
|
|
1718
1721
|
consentDataProcessing,
|
|
1719
|
-
|
|
1720
|
-
|
|
1722
|
+
phoneNumber: phone.replace(/[^+\d]/g, ''),
|
|
1723
|
+
birthday: birthday?.toISOString().slice(0, 10) || '',
|
|
1721
1724
|
product: product || '',
|
|
1722
1725
|
}, true);
|
|
1723
1726
|
}, [onSubmit]);
|
|
1724
1727
|
const [, { field, ...formProps }] = useForm(initialFormState$1, handleSubmit);
|
|
1725
|
-
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(ApplicationFieldsetLayout, { firstChildren: jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E", ...withValidator(field('middleName'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), secondChildren: jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F*", ...withValidator(field('
|
|
1728
|
+
return (jsxs("form", { className: formStyle$1, onSubmit: formProps.onSubmit, children: [jsx(ApplicationFieldsetLayout, { firstChildren: jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0424\u0430\u043C\u0438\u043B\u0438\u044F", ...withValidator(field('surname'), nameValidator) }), jsx(InputControl, { label: "\u041E\u0442\u0447\u0435\u0441\u0442\u0432\u043E", ...withValidator(field('middleName'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) })] }), secondChildren: jsxs("div", { className: formChildrenStyle, children: [jsx(InputControl, { label: "\u0418\u043C\u044F", ...withValidator(field('name'), nameValidator) }), jsx(DatePickerControl, { label: "\u0414\u0430\u0442\u0430 \u0440\u043E\u0436\u0434\u0435\u043D\u0438\u044F*", ...withValidator(field('birthday'), defaultValidator) }), jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('email'), defaultValidator) })] }) }), renderAgreementWithSubmit(field('consentDataProcessing'), link, button)] }));
|
|
1726
1729
|
});
|
|
1727
1730
|
|
|
1728
1731
|
const renderContacts = () => (jsxs("div", { className: "flex gap-xl", children: [jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", href: `tel:8 (800) 200-78-70`, "aria-label": "8 (800) 200-78-70", children: [jsx(Img, { image: { icon: 'PhoneIcon' }, width: "24", height: "24" }), jsx("span", { children: "8 (800) 200-78-70" })] }), jsxs("a", { className: "flex gap-s items-center text-primary-text no-underline", "aria-label": "ved@rshb.ru", href: `mailto:ved@rshb.ru`, children: [jsx(Img, { image: { icon: 'MailIcon' }, width: "24", height: "24" }), jsx("span", { children: "ved@rshb.ru" })] })] }));
|
|
@@ -1734,6 +1737,9 @@
|
|
|
1734
1737
|
return (jsx(ApplicationFieldsetLayout, { firstChildren: jsxs("div", { className: "gap-xl grid @xl:flex @xl:items-center", children: [jsx(Radio, { name: "vedTypes", text: "\u0412\u0430\u043B\u044E\u0442\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0440\u043E\u043B\u044C", value: "currencyControl", checked: value === 'currencyControl', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0414\u043E\u043A\u0443\u043C\u0435\u043D\u0442\u0430\u0440\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "documentOperations", checked: value === 'documentOperations', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u041A\u043E\u043D\u0432\u0435\u0440\u0441\u0438\u043E\u043D\u043D\u044B\u0435 \u043E\u043F\u0435\u0440\u0430\u0446\u0438\u0438", value: "conversionTransactions", checked: value === 'conversionTransactions', onChange: (_) => onChange && onChange(_) }), jsx(Radio, { name: "vedTypes", text: "\u0418\u043D\u044B\u0435 \u0432\u043E\u043F\u0440\u043E\u0441\u044B \u0412\u042D\u0414", value: "otherIssues", checked: value === 'otherIssues', onChange: (_) => onChange && onChange(_) })] }) }));
|
|
1735
1738
|
};
|
|
1736
1739
|
|
|
1740
|
+
const activeTextareaStyles = 'hover:border-primary-hover active:focus:border-primary-text focus:border-primary-text';
|
|
1741
|
+
const renderTextarea = ({ textField, text, placeholder = '', error }) => (jsxs("div", { children: [jsxs("label", { className: "space-y-xs", htmlFor: "textarea", children: [text ? (jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", children: text }) })) : null, jsx("textarea", { id: "textarea", placeholder: placeholder, className: style('block w-full resize-y min-h-24 p-m outline-none border rounded-md border-gray', activeTextareaStyles), value: textField.value, onInput: ((e) => textField.onChange && textField.onChange(e.target?.value || '')) })] }), renderErrorText(error)] }));
|
|
1742
|
+
|
|
1737
1743
|
const renderWedDataOrganization = ({ field, regions }) => {
|
|
1738
1744
|
const isCurrencyControl = field('vedTypes').value === 'currencyControl';
|
|
1739
1745
|
return (jsxs("div", { className: "space-y-s", children: [isCurrencyControl ? (jsx(SelectControl, { label: "\u0424\u0438\u043B\u0438\u0430\u043B", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0444\u0438\u043B\u0438\u0430\u043B", isSearch: true, options: regions.map(({ code = '', name = '' }) => ({ key: code, text: name })), ...withValidator(field('region'), defaultValidator) })) : null, jsxs("div", { className: "grid @xl:grid-cols-2 @xl:gap-x-lg gap-s", children: [isCurrencyControl ? (jsx(InputControl, { label: "\u0418\u041D\u041D", ...withValidator(field('inn'), innValidator) })) : null, jsx(InputControl, { label: "\u041D\u0430\u0438\u043C\u0435\u043D\u043E\u0432\u0430\u043D\u0438\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", ...withValidator(field('fullName'), defaultValidator) }), jsx(InputControl, { label: "\u0424\u0418\u041E", ...withValidator(field('name'), nameValidator) }), jsx(PhoneInputControl, { label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", ...withValidator(field('phone'), phoneValidator) }), !isCurrencyControl ? (jsx(InputControl, { label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", ...withValidator(field('mail'), defaultValidator) })) : null] })] }));
|
|
@@ -1788,7 +1794,11 @@
|
|
|
1788
1794
|
const [, { field, ...formProps }] = useForm(initialFormState, handleSubmit);
|
|
1789
1795
|
const regions = useGetRegions();
|
|
1790
1796
|
const textField = field('text');
|
|
1791
|
-
return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field, regions }), renderTextarea(
|
|
1797
|
+
return (jsxs("form", { className: "container space-y-lg", onSubmit: formProps.onSubmit, children: [renderQuestionsInterested(field), jsx(Heading, { headingType: "h6", title: "\u0414\u0430\u043D\u043D\u044B\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438", className: "@xl:text-center" }), renderWedDataOrganization({ field, regions }), renderTextarea({
|
|
1798
|
+
textField,
|
|
1799
|
+
text: 'Обращение',
|
|
1800
|
+
placeholder: 'Укажите интересующий вас вопрос, место ведения бизнеса и удобное время для телефонного звонка',
|
|
1801
|
+
}), renderSubmitButton(button), jsx(Footnote, { link: link }), jsx(Heading, { headingType: "h6", title: "\u0418\u043B\u0438 \u0441\u0432\u044F\u0436\u0438\u0442\u0435\u0441\u044C \u0441 \u043D\u0430\u043C\u0438 \u0443\u0434\u043E\u0431\u043D\u044B\u043C \u0441\u043F\u043E\u0441\u043E\u0431\u043E\u043C", className: "@xl:text-center" }), renderContacts()] }));
|
|
1792
1802
|
});
|
|
1793
1803
|
|
|
1794
1804
|
const EmbeddableForms = {
|
|
@@ -5528,11 +5538,12 @@
|
|
|
5528
5538
|
}
|
|
5529
5539
|
const [headerColumn, ...columns] = rowData;
|
|
5530
5540
|
const columnsStyle = style('flex duration-1000 text-center', rowIdx !== 0 ? 'font-normal' : 'font-light');
|
|
5531
|
-
return (jsxs("div", { className: "flex border-main-divider border-b border-solid h-full", children: [headerColumn?.data ? (jsx("div", { className: "
|
|
5541
|
+
return (jsxs("div", { className: "flex border-main-divider border-b border-solid h-full", children: [headerColumn?.data ? (jsx("div", { className: "w-56 min-w-56 py-lg", children: jsx(Text, { size: "text-xl", font: "font-light", children: headerColumn.data }) })) : null, jsx("div", { className: "flex flex-grow overflow-hidden", children: jsx("div", { className: columnsStyle, style: {
|
|
5532
5542
|
transform: `translateX(-${getHorizontalShift(columns, activeColumnIndex)}px)`,
|
|
5533
|
-
}, children: columns?.map((_, i) => (jsxs("div", { className: "flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider", children: [_?.data ? jsx(
|
|
5543
|
+
}, children: columns?.map((_, i) => (jsxs("div", { className: "flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider", children: [_?.data ? (jsx(Text, { size: "text-xl", font: "font-light", children: _.data })) : null, _?.cols ? renderCols(_.cols, activeColumnIndex) : null] }, `row${i}`))) }) })] }, String(rowIdx)));
|
|
5534
5544
|
};
|
|
5535
|
-
const
|
|
5545
|
+
const ColsColor = (isEqual = false) => `${isEqual ? 'text-secondary-text' : ''}`;
|
|
5546
|
+
const renderCols = (cols, rowIndex) => cols?.length > 0 ? (jsx("div", { className: "flex", children: cols.map((data, i) => (jsx("div", { className: "w-20 mx-lg", children: jsx(Text, { size: "text-h6", color: ColsColor(rowIndex === 0), children: data }) }, String(i)))) })) : null;
|
|
5536
5547
|
|
|
5537
5548
|
const InnerTableBodyItem = JSX(({ rows }) => {
|
|
5538
5549
|
const rowsLength = rows?.[0]?.length ?? 0;
|
|
@@ -5557,7 +5568,8 @@
|
|
|
5557
5568
|
|
|
5558
5569
|
const linkButtonVersion = 'secondary';
|
|
5559
5570
|
|
|
5560
|
-
const
|
|
5571
|
+
const TableColor = (isEqual = false) => `${isEqual ? 'text-white' : 'text-secondary-text'}`;
|
|
5572
|
+
const InnerTableHeader = JSX(({ currencies, linkToPDF, activeTabIndex, setActiveTabIndex }) => (jsxs("div", { className: "flex justify-between items-center w-full py-lg", children: [currencies && currencies.length > 1 ? (jsx("div", { className: "flex bg-secondary-light p-2xs rounded-md", children: currencies.map((currency, idx) => (jsx("div", { className: style('rounded-md px-4 py-3 cursor-pointer', idx === activeTabIndex ? 'bg-primary-main' : ''), onClick: () => setActiveTabIndex(idx), children: jsx(Text, { size: "text-xl", font: "font-light", color: TableColor(idx === activeTabIndex), children: currency || idx + 1 }) }, currency))) })) : null, linkToPDF ? (jsx(LinkButton, { className: "text-primary-main", href: linkToPDF, version: linkButtonVersion, target: "_blank", appendLeft: jsx(Icon, { name: "DocDownloadIcon", iconVersion: "color", className: "mr-3xs", width: "20", height: "20" }), text: "\u0421\u043A\u0430\u0447\u0430\u0442\u044C \u0432 PDF" })) : null] })));
|
|
5561
5573
|
|
|
5562
5574
|
function useTariffsInnerTableData(directoryName) {
|
|
5563
5575
|
const { data } = useAsyncData(tariffsInnerTableDataUrl(directoryName), fetchTariffsInnerTableData);
|
|
@@ -5578,7 +5590,7 @@
|
|
|
5578
5590
|
const handleActiveTabIndex = useCallback((_) => setActiveTabIndex(_), []);
|
|
5579
5591
|
const items = tableData?.[activeTabIndex]?.items ?? [];
|
|
5580
5592
|
const currencies = tableData?.map((item) => item.currency ?? '');
|
|
5581
|
-
return tableData ? (jsxs("div", { className: "bg-white z-10", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: handleActiveTabIndex, linkToPDF: pdfUrl }), jsx(InnerTableBody, { activeTabIndex: activeTabIndex, items: items }), jsx(TableInnerButton, { className: "mt-xl", onClick: onClick, isOpen: true })] })) : (jsxs("div", { className: "my-lg space-y-m text-
|
|
5593
|
+
return tableData ? (jsxs("div", { className: "bg-white z-10", children: [jsx(InnerTableHeader, { currencies: currencies, activeTabIndex: activeTabIndex, setActiveTabIndex: handleActiveTabIndex, linkToPDF: pdfUrl }), jsx(InnerTableBody, { activeTabIndex: activeTabIndex, items: items }), jsx(TableInnerButton, { className: "mt-xl", onClick: onClick, isOpen: true })] })) : (jsxs("div", { className: "my-lg space-y-m text-center", children: [jsx(Text, { size: "text-h6", children: EMPTY_DATA }), jsx(TableInnerButton, { onClick: onClick, isOpen: true })] }));
|
|
5582
5594
|
});
|
|
5583
5595
|
|
|
5584
5596
|
const TariffsTableRowContainer = JSX(({ children, tableInner, onHideContentClick }) => (jsxs("div", { className: "self-start flex flex-col", role: "row", children: [jsx("div", { className: style(dividerStyle, 'flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg'), children: children }), tableInner ? (jsx("div", { className: "origin-top animate-expansion", children: jsx(InnerTable, { ...tableInner, onClick: onHideContentClick }) })) : null] })));
|
|
@@ -5887,7 +5899,7 @@
|
|
|
5887
5899
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-3xl sticky bottom-0 pointer-events-auto" }) }));
|
|
5888
5900
|
}
|
|
5889
5901
|
|
|
5890
|
-
const packageVersion = "0.14.
|
|
5902
|
+
const packageVersion = "0.14.134";
|
|
5891
5903
|
|
|
5892
5904
|
exports.Blocks = Blocks;
|
|
5893
5905
|
exports.ContentPage = ContentPage;
|