@redneckz/wildless-cms-uni-blocks 0.8.19 → 0.8.20
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 +5 -5
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/dist/api/CorporateLeadAPI.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/dist/components/ApplicationForm/renderBankOffices.js +1 -1
- package/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/dist/components/ApplicationForm/renderSelects.js +2 -2
- package/dist/components/ApplicationForm/renderSelects.js.map +1 -1
- package/dist/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/lib/api/CorporateLeadAPI.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/lib/components/ApplicationForm/renderBankOffices.js +1 -1
- package/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/lib/components/ApplicationForm/renderSelects.js +2 -2
- package/lib/components/ApplicationForm/renderSelects.js.map +1 -1
- package/lib/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +1 -1
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/mobile/dist/api/CorporateLeadAPI.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSelects.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderSelects.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/lib/api/CorporateLeadAPI.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSelects.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderSelects.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/src/api/CorporateLeadAPI.ts +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderSelects.tsx +3 -3
- package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +2 -2
- package/package.json +1 -1
- package/src/api/CorporateLeadAPI.ts +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/src/components/ApplicationForm/renderBankOffices.tsx +2 -2
- package/src/components/ApplicationForm/renderSelects.tsx +3 -3
- package/src/components/ApplicationForm/renderSubmitButton.tsx +2 -2
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import type {
|
|
3
|
-
export declare const renderSubmitButton: (button?:
|
|
2
|
+
import type { SubmitButtonProps } from './ApplicationFormContent';
|
|
3
|
+
export declare const renderSubmitButton: (button?: SubmitButtonProps, className?: string) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"renderSubmitButton.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/renderSubmitButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,
|
|
1
|
+
{"version":3,"file":"renderSubmitButton.js","sourceRoot":"","sources":["../../../src/components/ApplicationForm/renderSubmitButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,6CAA6C,CAAC;AAGtF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAA0B,EAAE,SAAkB,EAAE,EAAE;IACnF,MAAM,WAAW,GAAG,uBAAuB,CAAC;QAC1C,SAAS,EAAE,YAAY;QACvB,OAAO,EAAE,MAAM,EAAE,OAAO;KACzB,CAAC,CAAC;IAEH,OAAO,CACL,iBAAQ,IAAI,EAAC,QAAQ,EAAC,SAAS,EAAE,OAAO,WAAW,IAAI,SAAS,EAAE,YAC/D,MAAM,EAAE,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB,GACzC,CACV,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -15,7 +15,7 @@ export interface DaDataResult {
|
|
|
15
15
|
export function CorporateLeadAPI() {
|
|
16
16
|
async function send(body: Record<string, string>) {
|
|
17
17
|
try {
|
|
18
|
-
const response = await fetch('/api/v1/
|
|
18
|
+
const response = await fetch('/api/v1/sendcorporatelead', {
|
|
19
19
|
method: 'POST',
|
|
20
20
|
headers: { 'Content-Type': 'application/json' },
|
|
21
21
|
mode: 'cors',
|
|
@@ -6,11 +6,11 @@ import { Input } from '../../ui-kit/Input/Input';
|
|
|
6
6
|
import { useGetRegions } from '../SafeDepositRental/useGetRegions';
|
|
7
7
|
import type { ApplicationFormsProps } from './ApplicationFormsProps';
|
|
8
8
|
import { Footnote } from './Footnote';
|
|
9
|
+
import { WrapperSelect } from './WrapperSelect';
|
|
9
10
|
import type { HandleFormStateChange } from './models';
|
|
10
11
|
import { normalizeSelectedRegion } from './normalizeSelectedRegion';
|
|
11
12
|
import { renderSubmitButton } from './renderSubmitButton';
|
|
12
13
|
import { useFormHandlers } from './useFormHandlers';
|
|
13
|
-
import { WrapperSelect } from './WrapperSelect';
|
|
14
14
|
|
|
15
15
|
export interface BusinessCardFormState {
|
|
16
16
|
region: string;
|
|
@@ -135,7 +135,7 @@ const renderRegion = ({ regions, region, handleChange }: RenderRegionProps) => (
|
|
|
135
135
|
<div className="w-full">
|
|
136
136
|
<WrapperSelect
|
|
137
137
|
data={regions}
|
|
138
|
-
fieldValue="
|
|
138
|
+
fieldValue="code"
|
|
139
139
|
fieldLabel="name"
|
|
140
140
|
selected={region}
|
|
141
141
|
setSelected={(value) => handleChange({ region: value })}
|
|
@@ -6,7 +6,7 @@ import type { ButtonAdditionalProps } from '../../ui-kit/Button/ButtonProps';
|
|
|
6
6
|
/**
|
|
7
7
|
* @title Кнопка
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface SubmitButtonProps extends ButtonAdditionalProps {
|
|
10
10
|
/**
|
|
11
11
|
* @title Текст
|
|
12
12
|
* @default "Отправить заявку"
|
|
@@ -25,7 +25,7 @@ export type ApplicationFormContent = TitleProps & {
|
|
|
25
25
|
* @enumNames ["Бизнес-карта", "ВЭД", "Депозит", "Кредит", "Эквайринг"]
|
|
26
26
|
*/
|
|
27
27
|
typeForm?: 'business-card' | 'wed' | 'deposit' | 'credit' | 'acquiring';
|
|
28
|
-
button?:
|
|
28
|
+
button?: SubmitButtonProps;
|
|
29
29
|
/** @title Условия передачи данных */
|
|
30
30
|
link?: LinkProps;
|
|
31
31
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SubmitButtonProps } from './ApplicationFormContent';
|
|
3
3
|
|
|
4
4
|
export interface ApplicationFormsProps {
|
|
5
|
-
button?:
|
|
5
|
+
button?: SubmitButtonProps;
|
|
6
6
|
link?: LinkProps;
|
|
7
7
|
handleSubmit: (data: Record<string, string>) => Promise<string>;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Branch } from '../../hooks/useSafeBoxes';
|
|
2
2
|
import type { CreditFormState } from './ApplicationFormCredit';
|
|
3
|
-
import type { HandleFormStateChange, Select } from './models';
|
|
4
3
|
import { WrapperSelect } from './WrapperSelect';
|
|
4
|
+
import type { HandleFormStateChange, Select } from './models';
|
|
5
5
|
|
|
6
6
|
interface RenderBankOfficesProps {
|
|
7
7
|
regions: Select[];
|
|
@@ -22,7 +22,7 @@ export const renderBankOffices = ({
|
|
|
22
22
|
<div className="w-1/2">
|
|
23
23
|
<WrapperSelect
|
|
24
24
|
data={regions}
|
|
25
|
-
fieldValue="
|
|
25
|
+
fieldValue="code"
|
|
26
26
|
fieldLabel="name"
|
|
27
27
|
selected={region}
|
|
28
28
|
setSelected={(value) => handleChange({ region: value })}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ACQUIRING_TYPES } from './acquiringTypes';
|
|
2
1
|
import type { AcquiringFormState } from './ApplicationFormAcquiring';
|
|
3
|
-
import type { HandleFormStateChange, Select } from './models';
|
|
4
2
|
import { WrapperSelect } from './WrapperSelect';
|
|
3
|
+
import { ACQUIRING_TYPES } from './acquiringTypes';
|
|
4
|
+
import type { HandleFormStateChange, Select } from './models';
|
|
5
5
|
|
|
6
6
|
interface SelectsProps {
|
|
7
7
|
acquiringType: string;
|
|
@@ -26,7 +26,7 @@ export const renderSelects = ({ acquiringType, regions, region, handleChange }:
|
|
|
26
26
|
<div className="w-1/2">
|
|
27
27
|
<WrapperSelect
|
|
28
28
|
data={regions}
|
|
29
|
-
fieldValue="
|
|
29
|
+
fieldValue="code"
|
|
30
30
|
fieldLabel="name"
|
|
31
31
|
selected={region}
|
|
32
32
|
setSelected={(value) => handleChange({ region: value })}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getRegularButtonClasses } from '../../ui-kit/Button/getRegularButtonClasses';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SubmitButtonProps } from './ApplicationFormContent';
|
|
3
3
|
|
|
4
|
-
export const renderSubmitButton = (button?:
|
|
4
|
+
export const renderSubmitButton = (button?: SubmitButtonProps, className?: string) => {
|
|
5
5
|
const buttonStyle = getRegularButtonClasses({
|
|
6
6
|
className: 'text-white',
|
|
7
7
|
version: button?.version,
|
package/package.json
CHANGED
|
@@ -15,7 +15,7 @@ export interface DaDataResult {
|
|
|
15
15
|
export function CorporateLeadAPI() {
|
|
16
16
|
async function send(body: Record<string, string>) {
|
|
17
17
|
try {
|
|
18
|
-
const response = await fetch('/api/v1/
|
|
18
|
+
const response = await fetch('/api/v1/sendcorporatelead', {
|
|
19
19
|
method: 'POST',
|
|
20
20
|
headers: { 'Content-Type': 'application/json' },
|
|
21
21
|
mode: 'cors',
|
|
@@ -6,11 +6,11 @@ import { Input } from '../../ui-kit/Input/Input';
|
|
|
6
6
|
import { useGetRegions } from '../SafeDepositRental/useGetRegions';
|
|
7
7
|
import type { ApplicationFormsProps } from './ApplicationFormsProps';
|
|
8
8
|
import { Footnote } from './Footnote';
|
|
9
|
+
import { WrapperSelect } from './WrapperSelect';
|
|
9
10
|
import type { HandleFormStateChange } from './models';
|
|
10
11
|
import { normalizeSelectedRegion } from './normalizeSelectedRegion';
|
|
11
12
|
import { renderSubmitButton } from './renderSubmitButton';
|
|
12
13
|
import { useFormHandlers } from './useFormHandlers';
|
|
13
|
-
import { WrapperSelect } from './WrapperSelect';
|
|
14
14
|
|
|
15
15
|
export interface BusinessCardFormState {
|
|
16
16
|
region: string;
|
|
@@ -135,7 +135,7 @@ const renderRegion = ({ regions, region, handleChange }: RenderRegionProps) => (
|
|
|
135
135
|
<div className="w-full">
|
|
136
136
|
<WrapperSelect
|
|
137
137
|
data={regions}
|
|
138
|
-
fieldValue="
|
|
138
|
+
fieldValue="code"
|
|
139
139
|
fieldLabel="name"
|
|
140
140
|
selected={region}
|
|
141
141
|
setSelected={(value) => handleChange({ region: value })}
|
|
@@ -6,7 +6,7 @@ import type { ButtonAdditionalProps } from '../../ui-kit/Button/ButtonProps';
|
|
|
6
6
|
/**
|
|
7
7
|
* @title Кнопка
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
9
|
+
export interface SubmitButtonProps extends ButtonAdditionalProps {
|
|
10
10
|
/**
|
|
11
11
|
* @title Текст
|
|
12
12
|
* @default "Отправить заявку"
|
|
@@ -25,7 +25,7 @@ export type ApplicationFormContent = TitleProps & {
|
|
|
25
25
|
* @enumNames ["Бизнес-карта", "ВЭД", "Депозит", "Кредит", "Эквайринг"]
|
|
26
26
|
*/
|
|
27
27
|
typeForm?: 'business-card' | 'wed' | 'deposit' | 'credit' | 'acquiring';
|
|
28
|
-
button?:
|
|
28
|
+
button?: SubmitButtonProps;
|
|
29
29
|
/** @title Условия передачи данных */
|
|
30
30
|
link?: LinkProps;
|
|
31
31
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { LinkProps } from '../../model/LinkProps';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SubmitButtonProps } from './ApplicationFormContent';
|
|
3
3
|
|
|
4
4
|
export interface ApplicationFormsProps {
|
|
5
|
-
button?:
|
|
5
|
+
button?: SubmitButtonProps;
|
|
6
6
|
link?: LinkProps;
|
|
7
7
|
handleSubmit: (data: Record<string, string>) => Promise<string>;
|
|
8
8
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Branch } from '../../hooks/useSafeBoxes';
|
|
2
2
|
import type { CreditFormState } from './ApplicationFormCredit';
|
|
3
|
-
import type { HandleFormStateChange, Select } from './models';
|
|
4
3
|
import { WrapperSelect } from './WrapperSelect';
|
|
4
|
+
import type { HandleFormStateChange, Select } from './models';
|
|
5
5
|
|
|
6
6
|
interface RenderBankOfficesProps {
|
|
7
7
|
regions: Select[];
|
|
@@ -22,7 +22,7 @@ export const renderBankOffices = ({
|
|
|
22
22
|
<div className="w-1/2">
|
|
23
23
|
<WrapperSelect
|
|
24
24
|
data={regions}
|
|
25
|
-
fieldValue="
|
|
25
|
+
fieldValue="code"
|
|
26
26
|
fieldLabel="name"
|
|
27
27
|
selected={region}
|
|
28
28
|
setSelected={(value) => handleChange({ region: value })}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ACQUIRING_TYPES } from './acquiringTypes';
|
|
2
1
|
import type { AcquiringFormState } from './ApplicationFormAcquiring';
|
|
3
|
-
import type { HandleFormStateChange, Select } from './models';
|
|
4
2
|
import { WrapperSelect } from './WrapperSelect';
|
|
3
|
+
import { ACQUIRING_TYPES } from './acquiringTypes';
|
|
4
|
+
import type { HandleFormStateChange, Select } from './models';
|
|
5
5
|
|
|
6
6
|
interface SelectsProps {
|
|
7
7
|
acquiringType: string;
|
|
@@ -26,7 +26,7 @@ export const renderSelects = ({ acquiringType, regions, region, handleChange }:
|
|
|
26
26
|
<div className="w-1/2">
|
|
27
27
|
<WrapperSelect
|
|
28
28
|
data={regions}
|
|
29
|
-
fieldValue="
|
|
29
|
+
fieldValue="code"
|
|
30
30
|
fieldLabel="name"
|
|
31
31
|
selected={region}
|
|
32
32
|
setSelected={(value) => handleChange({ region: value })}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getRegularButtonClasses } from '../../ui-kit/Button/getRegularButtonClasses';
|
|
2
|
-
import type {
|
|
2
|
+
import type { SubmitButtonProps } from './ApplicationFormContent';
|
|
3
3
|
|
|
4
|
-
export const renderSubmitButton = (button?:
|
|
4
|
+
export const renderSubmitButton = (button?: SubmitButtonProps, className?: string) => {
|
|
5
5
|
const buttonStyle = getRegularButtonClasses({
|
|
6
6
|
className: 'text-white',
|
|
7
7
|
version: button?.version,
|