@redneckz/wildless-cms-uni-blocks 0.14.550 → 0.14.552
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +6 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +20 -4
- package/bundle/model/AspectsProps.d.ts +1 -1
- package/dist/api/LeadServiceAPI.js +4 -3
- package/dist/api/LeadServiceAPI.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +20 -4
- package/dist/model/AspectsProps.d.ts +1 -1
- package/dist/ui-kit/Radio/Radio.js +1 -1
- package/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/lib/api/LeadServiceAPI.js +4 -3
- package/lib/api/LeadServiceAPI.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +20 -4
- package/lib/model/AspectsProps.d.ts +1 -1
- package/lib/ui-kit/Radio/Radio.js +1 -1
- package/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +6 -5
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +20 -4
- package/mobile/bundle/model/AspectsProps.d.ts +1 -1
- package/mobile/dist/api/LeadServiceAPI.js +4 -3
- package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +20 -4
- package/mobile/dist/model/AspectsProps.d.ts +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js +1 -1
- package/mobile/dist/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/lib/api/LeadServiceAPI.js +4 -3
- package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +20 -4
- package/mobile/lib/model/AspectsProps.d.ts +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js +1 -1
- package/mobile/lib/ui-kit/Radio/Radio.js.map +1 -1
- package/mobile/src/api/LeadServiceAPI.ts +5 -2
- package/mobile/src/components/ApplicationForm/ApplicationForm.example.json +4 -0
- package/mobile/src/components/ApplicationForm/ApplicationForm.ui.json +3 -0
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +24 -4
- package/mobile/src/model/AspectsProps.ts +1 -1
- package/mobile/src/ui-kit/Radio/Radio.tsx +1 -1
- package/package.json +1 -1
- package/src/api/LeadServiceAPI.ts +5 -2
- package/src/components/ApplicationForm/ApplicationForm.example.json +4 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.mobile.tsx +1 -0
- package/src/components/ApplicationForm/ApplicationForm.fixture.tsx +1 -0
- package/src/components/ApplicationForm/ApplicationForm.ui.json +3 -0
- package/src/components/ApplicationForm/ApplicationFormContent.ts +24 -4
- package/src/model/AspectsProps.ts +1 -1
- package/src/ui-kit/Radio/Radio.tsx +1 -1
|
@@ -70,6 +70,25 @@ export declare type SectionsProps = TitleProps & {
|
|
|
70
70
|
columns?: FormColumnsCount;
|
|
71
71
|
inputs?: FieldDef[];
|
|
72
72
|
};
|
|
73
|
+
/** @title Дефолтная форма */
|
|
74
|
+
declare type hideProductDef = {
|
|
75
|
+
/** @default "" */
|
|
76
|
+
showProduct: '';
|
|
77
|
+
};
|
|
78
|
+
/** @title Продуктовая форма */
|
|
79
|
+
declare type showProductDef = productType & {
|
|
80
|
+
/** @default "show" */
|
|
81
|
+
showProduct: 'show';
|
|
82
|
+
};
|
|
83
|
+
declare type productType = {
|
|
84
|
+
/** @title Продукт */
|
|
85
|
+
product?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @title Отображать выбор продукта
|
|
89
|
+
* @default { "showProduct": "" }
|
|
90
|
+
*/
|
|
91
|
+
declare type additionalParamsType = hideProductDef | showProductDef;
|
|
73
92
|
/**
|
|
74
93
|
* @title Форма заявки настраиваемая
|
|
75
94
|
*/
|
|
@@ -91,10 +110,7 @@ export declare type ApplicationFormContent = UniBlockContent & TitleProps & Aspe
|
|
|
91
110
|
sections?: SectionsProps[];
|
|
92
111
|
endpoint?: EndpointType;
|
|
93
112
|
/** @title Дополнительные параметры формы */
|
|
94
|
-
additionalParams?:
|
|
95
|
-
/** @title Продукт */
|
|
96
|
-
product?: string;
|
|
97
|
-
};
|
|
113
|
+
additionalParams?: additionalParamsType;
|
|
98
114
|
/** @title Показать контакты */
|
|
99
115
|
isContacts?: boolean;
|
|
100
116
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AspectData } from '../hooks/useAspects/useAspects';
|
|
2
2
|
/**
|
|
3
3
|
* @title Отправить событие в Snoplow
|
|
4
|
-
* @default {"aspectName": "snowplowEvent", "params": {"eventAction": "", eventCategory: ""}}
|
|
4
|
+
* @default {"aspectName": "snowplowEvent", "params": {"eventAction": "", eventCategory: "", eventValueText: ""}}
|
|
5
5
|
*/
|
|
6
6
|
export declare type SnowplowEventAspect = {
|
|
7
7
|
aspectName: 'snowplowEvent';
|
|
@@ -4,7 +4,7 @@ const formatDate_1 = require("../utils/formatDate");
|
|
|
4
4
|
const formatPhone_1 = require("../utils/formatPhone");
|
|
5
5
|
function LeadServiceAPI() {
|
|
6
6
|
async function send(body, isIndividualType = false) {
|
|
7
|
-
const { typeForm, region, phone = '', email, birthday, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, serviceDirection, ...staticBody } = body;
|
|
7
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, serviceDirection, ...staticBody } = body;
|
|
8
8
|
const isNaturalPerson = isIndividualType && serviceDirection !== 'Юридическое лицо / ИП';
|
|
9
9
|
const url = isNaturalPerson ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
|
|
10
10
|
const submitBody = {
|
|
@@ -12,7 +12,8 @@ function LeadServiceAPI() {
|
|
|
12
12
|
...getRegion(region, isNaturalPerson),
|
|
13
13
|
...getEmail(email, isNaturalPerson),
|
|
14
14
|
...getPhone(phone),
|
|
15
|
-
...(
|
|
15
|
+
...getFormatDate(desiredMeetingDate, 'desiredMeetingDate'),
|
|
16
|
+
...(isNaturalPerson ? getFormatDate(birthday) : { inn, fullName }),
|
|
16
17
|
...(typeForm === 'FEEDBACK'
|
|
17
18
|
? {}
|
|
18
19
|
: {
|
|
@@ -46,7 +47,7 @@ function LeadServiceAPI() {
|
|
|
46
47
|
}
|
|
47
48
|
exports.LeadServiceAPI = LeadServiceAPI;
|
|
48
49
|
const getPhone = (phone) => (phone ? { phone: (0, formatPhone_1.formatPhone)(phone) } : {});
|
|
49
|
-
const
|
|
50
|
+
const getFormatDate = (date, key = 'birthday') => date ? { [key]: (0, formatDate_1.formatDate)(date) } : {};
|
|
50
51
|
const getRegion = (region, isNaturalPerson = true) => ({
|
|
51
52
|
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
52
53
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeadServiceAPI.js","sourceRoot":"","sources":["../../src/api/LeadServiceAPI.ts"],"names":[],"mappings":";;AACA,oDAAiD;AACjD,sDAAmD;AAyBnD,SAAgB,cAAc;IAC5B,KAAK,UAAU,IAAI,CAAC,IAAiB,EAAE,gBAAgB,GAAG,KAAK;QAC7D,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,GAAG,EAAE,EACV,KAAK,EACL,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,aAAa,EACb,cAAc,GAAG,EAAE,EACnB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,GAAG,UAAU,EACd,GAAG,IAAI,CAAC;QACT,MAAM,eAAe,GAAG,gBAAgB,IAAI,gBAAgB,KAAK,uBAAuB,CAAC;QACzF,MAAM,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,2BAA2B,CAAC;QAC3E,MAAM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AC,KAAc,EAAE,eAAe,GAAG,IAAI,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK;CAC5C,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,cAAc,GAAG,EAAE,EAAE,EAAE;IAChD,OAAO,CAAC,cAAc,IAAI,cAAc,KAAK,MAAM;QACjD,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,oBAAoB,EAAE,IAAA,yBAAW,EAAC,cAAc,CAAC,EAAE,CAAC;AAC5D,CAAC,CAAC"}
|
|
@@ -70,6 +70,25 @@ export declare type SectionsProps = TitleProps & {
|
|
|
70
70
|
columns?: FormColumnsCount;
|
|
71
71
|
inputs?: FieldDef[];
|
|
72
72
|
};
|
|
73
|
+
/** @title Дефолтная форма */
|
|
74
|
+
declare type hideProductDef = {
|
|
75
|
+
/** @default "" */
|
|
76
|
+
showProduct: '';
|
|
77
|
+
};
|
|
78
|
+
/** @title Продуктовая форма */
|
|
79
|
+
declare type showProductDef = productType & {
|
|
80
|
+
/** @default "show" */
|
|
81
|
+
showProduct: 'show';
|
|
82
|
+
};
|
|
83
|
+
declare type productType = {
|
|
84
|
+
/** @title Продукт */
|
|
85
|
+
product?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @title Отображать выбор продукта
|
|
89
|
+
* @default { "showProduct": "" }
|
|
90
|
+
*/
|
|
91
|
+
declare type additionalParamsType = hideProductDef | showProductDef;
|
|
73
92
|
/**
|
|
74
93
|
* @title Форма заявки настраиваемая
|
|
75
94
|
*/
|
|
@@ -91,10 +110,7 @@ export declare type ApplicationFormContent = UniBlockContent & TitleProps & Aspe
|
|
|
91
110
|
sections?: SectionsProps[];
|
|
92
111
|
endpoint?: EndpointType;
|
|
93
112
|
/** @title Дополнительные параметры формы */
|
|
94
|
-
additionalParams?:
|
|
95
|
-
/** @title Продукт */
|
|
96
|
-
product?: string;
|
|
97
|
-
};
|
|
113
|
+
additionalParams?: additionalParamsType;
|
|
98
114
|
/** @title Показать контакты */
|
|
99
115
|
isContacts?: boolean;
|
|
100
116
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AspectData } from '../hooks/useAspects/useAspects';
|
|
2
2
|
/**
|
|
3
3
|
* @title Отправить событие в Snoplow
|
|
4
|
-
* @default {"aspectName": "snowplowEvent", "params": {"eventAction": "", eventCategory: ""}}
|
|
4
|
+
* @default {"aspectName": "snowplowEvent", "params": {"eventAction": "", eventCategory: "", eventValueText: ""}}
|
|
5
5
|
*/
|
|
6
6
|
export declare type SnowplowEventAspect = {
|
|
7
7
|
aspectName: 'snowplowEvent';
|
|
@@ -6,5 +6,5 @@ const style_1 = require("../../utils/style");
|
|
|
6
6
|
const checkboxStyle_1 = require("../Checkbox/checkboxStyle");
|
|
7
7
|
const inputValidStyle_1 = require("../Input/inputValidStyle");
|
|
8
8
|
const Text_1 = require("../Text/Text");
|
|
9
|
-
exports.Radio = (0, uni_jsx_1.JSX)(({ name, text, value, checked, onChange, className }) => ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsxs)("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [(0, jsx_runtime_1.jsx)("input", { className: (0, style_1.style)(inputValidStyle_1.inputValidStyle, checkboxStyle_1.defaultCheckStyle, 'flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full', 'checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main'), type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange?.(_.target.value), role: "radio" }), text ? (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-primary-text", children: text }) : null] }) })));
|
|
9
|
+
exports.Radio = (0, uni_jsx_1.JSX)(({ name, text, value, checked, onChange, className }) => ((0, jsx_runtime_1.jsx)("div", { className: className, children: (0, jsx_runtime_1.jsxs)("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [(0, jsx_runtime_1.jsx)("input", { className: (0, style_1.style)(inputValidStyle_1.inputValidStyle.split(' ').filter((_) => _ !== 'rounded'), checkboxStyle_1.defaultCheckStyle, 'flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full', 'checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main'), type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange?.(_.target.value), role: "radio" }), text ? (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-primary-text", children: text }) : null] }) })));
|
|
10
10
|
//# sourceMappingURL=Radio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/ui-kit/Radio/Radio.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,6DAA8D;AAC9D,8DAA2D;AAC3D,uCAAoC;AAGvB,QAAA,KAAK,GAAG,IAAA,aAAG,EAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5F,gCAAK,SAAS,EAAE,SAAS,YACvB,mCAAO,SAAS,EAAC,2DAA2D,aAC1E,kCACE,SAAS,EAAE,IAAA,aAAK,EACd,iCAAe,
|
|
1
|
+
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/ui-kit/Radio/Radio.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,6CAA0C;AAC1C,6DAA8D;AAC9D,8DAA2D;AAC3D,uCAAoC;AAGvB,QAAA,KAAK,GAAG,IAAA,aAAG,EAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5F,gCAAK,SAAS,EAAE,SAAS,YACvB,mCAAO,SAAS,EAAC,2DAA2D,aAC1E,kCACE,SAAS,EAAE,IAAA,aAAK,EACd,iCAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,EACzD,iCAAiB,EACjB,sGAAsG,EACtG,+GAA+G,CAChH,EACD,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,IAAI,EAAC,OAAO,GACZ,EACD,IAAI,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,KAAK,EAAC,mBAAmB,YAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,IACtD,GACJ,CACP,CAAC,CAAC"}
|
|
@@ -2,7 +2,7 @@ import { formatDate } from '../utils/formatDate.js';
|
|
|
2
2
|
import { formatPhone } from '../utils/formatPhone.js';
|
|
3
3
|
export function LeadServiceAPI() {
|
|
4
4
|
async function send(body, isIndividualType = false) {
|
|
5
|
-
const { typeForm, region, phone = '', email, birthday, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, serviceDirection, ...staticBody } = body;
|
|
5
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, serviceDirection, ...staticBody } = body;
|
|
6
6
|
const isNaturalPerson = isIndividualType && serviceDirection !== 'Юридическое лицо / ИП';
|
|
7
7
|
const url = isNaturalPerson ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
|
|
8
8
|
const submitBody = {
|
|
@@ -10,7 +10,8 @@ export function LeadServiceAPI() {
|
|
|
10
10
|
...getRegion(region, isNaturalPerson),
|
|
11
11
|
...getEmail(email, isNaturalPerson),
|
|
12
12
|
...getPhone(phone),
|
|
13
|
-
...(
|
|
13
|
+
...getFormatDate(desiredMeetingDate, 'desiredMeetingDate'),
|
|
14
|
+
...(isNaturalPerson ? getFormatDate(birthday) : { inn, fullName }),
|
|
14
15
|
...(typeForm === 'FEEDBACK'
|
|
15
16
|
? {}
|
|
16
17
|
: {
|
|
@@ -43,7 +44,7 @@ export function LeadServiceAPI() {
|
|
|
43
44
|
};
|
|
44
45
|
}
|
|
45
46
|
const getPhone = (phone) => (phone ? { phone: formatPhone(phone) } : {});
|
|
46
|
-
const
|
|
47
|
+
const getFormatDate = (date, key = 'birthday') => date ? { [key]: formatDate(date) } : {};
|
|
47
48
|
const getRegion = (region, isNaturalPerson = true) => ({
|
|
48
49
|
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
49
50
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LeadServiceAPI.js","sourceRoot":"","sources":["../../src/api/LeadServiceAPI.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAyBnD,MAAM,UAAU,cAAc;IAC5B,KAAK,UAAU,IAAI,CAAC,IAAiB,EAAE,gBAAgB,GAAG,KAAK;QAC7D,MAAM,EACJ,QAAQ,EACR,MAAM,EACN,KAAK,GAAG,EAAE,EACV,KAAK,EACL,QAAQ,EACR,GAAG,EACH,QAAQ,EACR,aAAa,EACb,cAAc,GAAG,EAAE,EACnB,WAAW,EACX,eAAe,EACf,gBAAgB,EAChB,GAAG,UAAU,EACd,GAAG,IAAI,CAAC;QACT,MAAM,eAAe,GAAG,gBAAgB,IAAI,gBAAgB,KAAK,uBAAuB,CAAC;QACzF,MAAM,GAAG,GAAG,eAAe,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,2BAA2B,CAAC;QAC3E,MAAM,UAAU,GAAG;YACjB,QAAQ;YACR,GAAG,SAAS,CAAC,MAAM,EAAE,eAAe,CA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AG,IAAI,EAAE,EAAE,CAAC,CAAC;IAC5D,CAAC,eAAe,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,KAAK;CAC5C,CAAC,CAAC;AAEH,MAAM,iBAAiB,GAAG,CAAC,cAAc,GAAG,EAAE,EAAE,EAAE;IAChD,OAAO,CAAC,cAAc,IAAI,cAAc,KAAK,MAAM;QACjD,CAAC,CAAC,EAAE;QACJ,CAAC,CAAC,EAAE,oBAAoB,EAAE,WAAW,CAAC,cAAc,CAAC,EAAE,CAAC;AAC5D,CAAC,CAAC"}
|
|
@@ -70,6 +70,25 @@ export declare type SectionsProps = TitleProps & {
|
|
|
70
70
|
columns?: FormColumnsCount;
|
|
71
71
|
inputs?: FieldDef[];
|
|
72
72
|
};
|
|
73
|
+
/** @title Дефолтная форма */
|
|
74
|
+
declare type hideProductDef = {
|
|
75
|
+
/** @default "" */
|
|
76
|
+
showProduct: '';
|
|
77
|
+
};
|
|
78
|
+
/** @title Продуктовая форма */
|
|
79
|
+
declare type showProductDef = productType & {
|
|
80
|
+
/** @default "show" */
|
|
81
|
+
showProduct: 'show';
|
|
82
|
+
};
|
|
83
|
+
declare type productType = {
|
|
84
|
+
/** @title Продукт */
|
|
85
|
+
product?: string;
|
|
86
|
+
};
|
|
87
|
+
/**
|
|
88
|
+
* @title Отображать выбор продукта
|
|
89
|
+
* @default { "showProduct": "" }
|
|
90
|
+
*/
|
|
91
|
+
declare type additionalParamsType = hideProductDef | showProductDef;
|
|
73
92
|
/**
|
|
74
93
|
* @title Форма заявки настраиваемая
|
|
75
94
|
*/
|
|
@@ -91,10 +110,7 @@ export declare type ApplicationFormContent = UniBlockContent & TitleProps & Aspe
|
|
|
91
110
|
sections?: SectionsProps[];
|
|
92
111
|
endpoint?: EndpointType;
|
|
93
112
|
/** @title Дополнительные параметры формы */
|
|
94
|
-
additionalParams?:
|
|
95
|
-
/** @title Продукт */
|
|
96
|
-
product?: string;
|
|
97
|
-
};
|
|
113
|
+
additionalParams?: additionalParamsType;
|
|
98
114
|
/** @title Показать контакты */
|
|
99
115
|
isContacts?: boolean;
|
|
100
116
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AspectData } from '../hooks/useAspects/useAspects';
|
|
2
2
|
/**
|
|
3
3
|
* @title Отправить событие в Snoplow
|
|
4
|
-
* @default {"aspectName": "snowplowEvent", "params": {"eventAction": "", eventCategory: ""}}
|
|
4
|
+
* @default {"aspectName": "snowplowEvent", "params": {"eventAction": "", eventCategory: "", eventValueText: ""}}
|
|
5
5
|
*/
|
|
6
6
|
export declare type SnowplowEventAspect = {
|
|
7
7
|
aspectName: 'snowplowEvent';
|
|
@@ -4,5 +4,5 @@ import { style } from '../../utils/style.js';
|
|
|
4
4
|
import { defaultCheckStyle } from '../Checkbox/checkboxStyle.js';
|
|
5
5
|
import { inputValidStyle } from '../Input/inputValidStyle.js';
|
|
6
6
|
import { Text } from '../Text/Text.js';
|
|
7
|
-
export const Radio = JSX(({ name, text, value, checked, onChange, className }) => (_jsx("div", { className: className, children: _jsxs("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [_jsx("input", { className: style(inputValidStyle, defaultCheckStyle, 'flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full', 'checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main'), type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange?.(_.target.value), role: "radio" }), text ? _jsx(Text, { color: "text-primary-text", children: text }) : null] }) })));
|
|
7
|
+
export const Radio = JSX(({ name, text, value, checked, onChange, className }) => (_jsx("div", { className: className, children: _jsxs("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [_jsx("input", { className: style(inputValidStyle.split(' ').filter((_) => _ !== 'rounded'), defaultCheckStyle, 'flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full', 'checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main'), type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange?.(_.target.value), role: "radio" }), text ? _jsx(Text, { color: "text-primary-text", children: text }) : null] }) })));
|
|
8
8
|
//# sourceMappingURL=Radio.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/ui-kit/Radio/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5F,cAAK,SAAS,EAAE,SAAS,YACvB,iBAAO,SAAS,EAAC,2DAA2D,aAC1E,gBACE,SAAS,EAAE,KAAK,CACd,eAAe,
|
|
1
|
+
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/ui-kit/Radio/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAGpC,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,CAAa,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5F,cAAK,SAAS,EAAE,SAAS,YACvB,iBAAO,SAAS,EAAC,2DAA2D,aAC1E,gBACE,SAAS,EAAE,KAAK,CACd,eAAe,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,EACzD,iBAAiB,EACjB,sGAAsG,EACtG,+GAA+G,CAChH,EACD,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAC3C,IAAI,EAAC,OAAO,GACZ,EACD,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,KAAK,EAAC,mBAAmB,YAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,IACtD,GACJ,CACP,CAAC,CAAC"}
|
|
@@ -896,7 +896,7 @@
|
|
|
896
896
|
|
|
897
897
|
function LeadServiceAPI() {
|
|
898
898
|
async function send(body, isIndividualType = false) {
|
|
899
|
-
const { typeForm, region, phone = '', email, birthday, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, serviceDirection, ...staticBody } = body;
|
|
899
|
+
const { typeForm, region, phone = '', email, birthday, desiredMeetingDate, inn, fullName, addressBranch, secondaryPhone = '', bankEmpolee, applicationDate, serviceDirection, ...staticBody } = body;
|
|
900
900
|
const isNaturalPerson = isIndividualType && serviceDirection !== 'Юридическое лицо / ИП';
|
|
901
901
|
const url = isNaturalPerson ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
|
|
902
902
|
const submitBody = {
|
|
@@ -904,7 +904,8 @@
|
|
|
904
904
|
...getRegion$1(region, isNaturalPerson),
|
|
905
905
|
...getEmail(email, isNaturalPerson),
|
|
906
906
|
...getPhone(phone),
|
|
907
|
-
...(
|
|
907
|
+
...getFormatDate(desiredMeetingDate, 'desiredMeetingDate'),
|
|
908
|
+
...(isNaturalPerson ? getFormatDate(birthday) : { inn, fullName }),
|
|
908
909
|
...(typeForm === 'FEEDBACK'
|
|
909
910
|
? {}
|
|
910
911
|
: {
|
|
@@ -937,7 +938,7 @@
|
|
|
937
938
|
};
|
|
938
939
|
}
|
|
939
940
|
const getPhone = (phone) => (phone ? { phone: formatPhone(phone) } : {});
|
|
940
|
-
const
|
|
941
|
+
const getFormatDate = (date, key = 'birthday') => date ? { [key]: formatDate(date) } : {};
|
|
941
942
|
const getRegion$1 = (region, isNaturalPerson = true) => ({
|
|
942
943
|
[isNaturalPerson ? 'regionBranch' : 'region']: region,
|
|
943
944
|
});
|
|
@@ -1886,7 +1887,7 @@
|
|
|
1886
1887
|
|
|
1887
1888
|
const UltraPremiumField = JSX(({ field }) => (jsx(SelectControl, { label: "\u0422\u0438\u043F \u043E\u0431\u0441\u043B\u0443\u0436\u0438\u0432\u0430\u043D\u0438\u044F", options: SERVICE_TYPES, ...withValidator(field('serviceType'), validatorObj.serviceType) })));
|
|
1888
1889
|
|
|
1889
|
-
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [jsx("input", { className: style(inputValidStyle, defaultCheckStyle, 'flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full', 'checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main'), type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange?.(_.target.value), role: "radio" }), text ? jsx(Text, { color: "text-primary-text", children: text }) : null] }) })));
|
|
1890
|
+
const Radio = JSX(({ name, text, value, checked, onChange, className }) => (jsx("div", { className: className, children: jsxs("label", { className: "font-sans flex gap-s items-center relative cursor-pointer", children: [jsx("input", { className: style(inputValidStyle.split(' ').filter((_) => _ !== 'rounded'), defaultCheckStyle, 'flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full', 'checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main'), type: "radio", value: value, name: name, checked: checked, onChange: (_) => onChange?.(_.target.value), role: "radio" }), text ? jsx(Text, { color: "text-primary-text", children: text }) : null] }) })));
|
|
1890
1891
|
|
|
1891
1892
|
const VED_TYPES = [
|
|
1892
1893
|
'currencyControl',
|
|
@@ -6181,7 +6182,7 @@
|
|
|
6181
6182
|
slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
|
|
6182
6183
|
});
|
|
6183
6184
|
|
|
6184
|
-
const packageVersion = "0.14.
|
|
6185
|
+
const packageVersion = "0.14.551";
|
|
6185
6186
|
|
|
6186
6187
|
exports.Blocks = Blocks;
|
|
6187
6188
|
exports.ContentPage = ContentPage;
|