@redneckz/wildless-cms-uni-blocks 0.14.1039 → 0.14.1041
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 +65 -113
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
- package/bundle/retail/api/getTaskById.d.ts +1 -1
- package/bundle/retail/utils/productTypeToTaskType.d.ts +3 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/components/ReferalForm/ReferalForm.js +6 -6
- package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/dist/components/ReferalForm/referalFormData.d.ts +2 -2
- package/dist/components/ReferalForm/referalFormData.js +8 -14
- package/dist/components/ReferalForm/referalFormData.js.map +1 -1
- package/dist/components/ReferalForm/renderLinkInput.js +4 -1
- package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/dist/retail/api/getTaskById.d.ts +1 -1
- package/dist/retail/api/getTaskById.js +4 -1
- package/dist/retail/api/getTaskById.js.map +1 -1
- package/dist/retail/components/DraftDialog/utils.js +20 -18
- package/dist/retail/components/DraftDialog/utils.js.map +1 -1
- package/dist/retail/utils/productTypeToTaskType.d.ts +3 -0
- package/dist/retail/utils/productTypeToTaskType.js +13 -0
- package/dist/retail/utils/productTypeToTaskType.js.map +1 -0
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/ReferalForm/ReferalForm.js +6 -6
- package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/lib/components/ReferalForm/referalFormData.d.ts +2 -2
- package/lib/components/ReferalForm/referalFormData.js +7 -13
- package/lib/components/ReferalForm/referalFormData.js.map +1 -1
- package/lib/components/ReferalForm/renderLinkInput.js +4 -1
- package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/lib/retail/api/getTaskById.d.ts +1 -1
- package/lib/retail/api/getTaskById.js +4 -1
- package/lib/retail/api/getTaskById.js.map +1 -1
- package/lib/retail/components/DraftDialog/utils.js +20 -18
- package/lib/retail/components/DraftDialog/utils.js.map +1 -1
- package/lib/retail/utils/productTypeToTaskType.d.ts +3 -0
- package/lib/retail/utils/productTypeToTaskType.js +10 -0
- package/lib/retail/utils/productTypeToTaskType.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +65 -113
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/bundle/retail/api/getTaskById.d.ts +1 -1
- package/mobile/bundle/retail/utils/productTypeToTaskType.d.ts +3 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalForm.js +6 -6
- package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/dist/components/ReferalForm/referalFormData.js +8 -14
- package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js +4 -1
- package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/dist/retail/api/getTaskById.d.ts +1 -1
- package/mobile/dist/retail/api/getTaskById.js +4 -1
- package/mobile/dist/retail/api/getTaskById.js.map +1 -1
- package/mobile/dist/retail/components/DraftDialog/utils.js +20 -18
- package/mobile/dist/retail/components/DraftDialog/utils.js.map +1 -1
- package/mobile/dist/retail/utils/productTypeToTaskType.d.ts +3 -0
- package/mobile/dist/retail/utils/productTypeToTaskType.js +13 -0
- package/mobile/dist/retail/utils/productTypeToTaskType.js.map +1 -0
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalForm.js +6 -6
- package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
- package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
- package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -2
- package/mobile/lib/components/ReferalForm/referalFormData.js +7 -13
- package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js +4 -1
- package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
- package/mobile/lib/retail/api/getTaskById.d.ts +1 -1
- package/mobile/lib/retail/api/getTaskById.js +4 -1
- package/mobile/lib/retail/api/getTaskById.js.map +1 -1
- package/mobile/lib/retail/components/DraftDialog/utils.js +20 -18
- package/mobile/lib/retail/components/DraftDialog/utils.js.map +1 -1
- package/mobile/lib/retail/utils/productTypeToTaskType.d.ts +3 -0
- package/mobile/lib/retail/utils/productTypeToTaskType.js +10 -0
- package/mobile/lib/retail/utils/productTypeToTaskType.js.map +1 -0
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +15 -24
- package/mobile/src/components/ReferalForm/ReferalForm.example.json +3 -1
- package/mobile/src/components/ReferalForm/ReferalForm.tsx +11 -11
- package/mobile/src/components/ReferalForm/ReferalFormContent.ts +11 -9
- package/mobile/src/components/ReferalForm/referalFormData.ts +8 -14
- package/mobile/src/components/ReferalForm/renderLinkInput.tsx +5 -1
- package/mobile/src/retail/api/getTaskById.ts +7 -2
- package/mobile/src/retail/components/DraftDialog/utils.ts +20 -18
- package/mobile/src/retail/utils/productTypeToTaskType.ts +13 -0
- package/package.json +1 -1
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +15 -24
- package/src/components/ReferalForm/ReferalForm.example.json +3 -1
- package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +2 -0
- package/src/components/ReferalForm/ReferalForm.fixture.tsx +2 -0
- package/src/components/ReferalForm/ReferalForm.tsx +11 -11
- package/src/components/ReferalForm/ReferalFormContent.ts +11 -9
- package/src/components/ReferalForm/referalFormData.ts +8 -14
- package/src/components/ReferalForm/renderLinkInput.tsx +5 -1
- package/src/retail/api/getTaskById.ts +7 -2
- package/src/retail/components/DraftDialog/utils.ts +20 -18
- package/src/retail/utils/productTypeToTaskType.ts +13 -0
- package/bundle/components/ReferalForm/renderSections.d.ts +0 -3
- package/dist/components/ReferalForm/renderSections.d.ts +0 -3
- package/dist/components/ReferalForm/renderSections.js +0 -10
- package/dist/components/ReferalForm/renderSections.js.map +0 -1
- package/lib/components/ReferalForm/renderSections.d.ts +0 -3
- package/lib/components/ReferalForm/renderSections.js +0 -7
- package/lib/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/bundle/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/dist/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/dist/components/ReferalForm/renderSections.js +0 -10
- package/mobile/dist/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/lib/components/ReferalForm/renderSections.d.ts +0 -3
- package/mobile/lib/components/ReferalForm/renderSections.js +0 -7
- package/mobile/lib/components/ReferalForm/renderSections.js.map +0 -1
- package/mobile/src/components/ReferalForm/renderSections.tsx +0 -18
- package/src/components/ReferalForm/renderSections.tsx +0 -18
|
@@ -15,6 +15,8 @@ export default {
|
|
|
15
15
|
<div className="container grid grid-cols-12">
|
|
16
16
|
<ReferalForm
|
|
17
17
|
link="https://www.rshb.ru/business/dlya-druga/rko"
|
|
18
|
+
description="Заполните ваши данные и получите персональную ссылку"
|
|
19
|
+
title="Как получить бесплатное обслуживание счёта"
|
|
18
20
|
button={{ text: 'Получить ссылку' }}
|
|
19
21
|
copyIcon={icon}
|
|
20
22
|
/>
|
|
@@ -2,7 +2,9 @@ import { useCallback, useMemo, useState } from '@redneckz/uni-jsx/lib/hooks';
|
|
|
2
2
|
import { useForm } from '../../hooks/useForm/useForm';
|
|
3
3
|
import { ApplicationFormLayout } from '../../ui-kit/ApplicationFormLayout/ApplicationFormLayout';
|
|
4
4
|
import { SubmitButton } from '../../ui-kit/Button/SubmitButton';
|
|
5
|
+
import { getField } from '../../ui-kit/FormField/getField';
|
|
5
6
|
import { getFormValidator } from '../../ui-kit/FormField/getObjectValidator';
|
|
7
|
+
import { renderTitle } from '../../ui-kit/FormField/renderTitle';
|
|
6
8
|
import { Link } from '../../ui-kit/Link/Link';
|
|
7
9
|
import { Paragraph } from '../../ui-kit/Paragraph/Paragraph';
|
|
8
10
|
import { type Option } from '../../ui-kit/Select/Option';
|
|
@@ -11,8 +13,7 @@ import { UniBlock } from '../../UniBlock/UniBlock';
|
|
|
11
13
|
import { type UniBlockProps } from '../../UniBlock/UniBlockProps';
|
|
12
14
|
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
13
15
|
import { type ReferalFormContent } from './ReferalFormContent';
|
|
14
|
-
import {
|
|
15
|
-
import { renderSections } from './renderSections';
|
|
16
|
+
import { inputs } from './referalFormData';
|
|
16
17
|
import { ResultLink } from './ResultLink';
|
|
17
18
|
|
|
18
19
|
export interface FormState {
|
|
@@ -23,13 +24,9 @@ export interface FormState {
|
|
|
23
24
|
export interface ReferalFormProps extends ReferalFormContent, UniBlockProps {}
|
|
24
25
|
|
|
25
26
|
export const ReferalForm = UniBlock<ReferalFormProps>(
|
|
26
|
-
({ link = '', button, copyIcon, ...rest }) => {
|
|
27
|
+
({ title, description, link = '', button, copyIcon, ...rest }) => {
|
|
27
28
|
const [isShowResultLink, setIsShowResultLink] = useState(false);
|
|
28
29
|
const [referalLink, setReferalLink] = useState('');
|
|
29
|
-
const inputs = useMemo(
|
|
30
|
-
() => (sections?.flatMap((_) => _?.inputs) || []) as FieldDef[],
|
|
31
|
-
[sections],
|
|
32
|
-
);
|
|
33
30
|
|
|
34
31
|
const formValidator = useMemo(() => getFormValidator(inputs), [inputs]);
|
|
35
32
|
|
|
@@ -52,14 +49,17 @@ export const ReferalForm = UniBlock<ReferalFormProps>(
|
|
|
52
49
|
return (
|
|
53
50
|
<ApplicationFormLayout
|
|
54
51
|
className="container space-y-m col-span-12"
|
|
55
|
-
title={getTitle(isShowResultLink)}
|
|
52
|
+
title={getTitle(title, isShowResultLink)}
|
|
56
53
|
{...rest}
|
|
57
54
|
>
|
|
58
55
|
{isShowResultLink ? (
|
|
59
56
|
<ResultLink link={referalLink} copyIcon={copyIcon} />
|
|
60
57
|
) : (
|
|
61
58
|
<form onSubmit={onSubmit}>
|
|
62
|
-
|
|
59
|
+
<div className="grid @xl:grid-cols-2 gap-x-m">
|
|
60
|
+
{renderTitle(description)}
|
|
61
|
+
{inputs.map(getField<FieldDef>(field))}
|
|
62
|
+
</div>
|
|
63
63
|
<Paragraph size="text-l" font="font-light" color="text-secondary-text">
|
|
64
64
|
<Text>Нажимая кнопку, вы подтверждаете согласие с </Text>
|
|
65
65
|
<Link href="/privacy-policy" target="_blank" ariaLabel="условия передачи данных">
|
|
@@ -76,5 +76,5 @@ export const ReferalForm = UniBlock<ReferalFormProps>(
|
|
|
76
76
|
},
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
-
const getTitle = (isShowResultLink = false) =>
|
|
80
|
-
isShowResultLink ? 'Ваша личная ссылка' :
|
|
79
|
+
const getTitle = (title = '', isShowResultLink = false) =>
|
|
80
|
+
isShowResultLink ? 'Ваша личная ссылка' : title;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
import { type TextProps } from '../../model/HeadlineType';
|
|
1
|
+
import { type DescriptionProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
2
|
import { type Picture } from '../../model/Picture';
|
|
3
3
|
import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* @title Форма для создания реферальной ссылки
|
|
7
7
|
*/
|
|
8
|
-
export type ReferalFormContent = UniBlockContent &
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
export type ReferalFormContent = UniBlockContent &
|
|
9
|
+
TitleProps &
|
|
10
|
+
DescriptionProps & {
|
|
11
|
+
/** @title Адрес страницы с заявкой для реферала */
|
|
12
|
+
link?: string;
|
|
13
|
+
/** @title Кнопка */
|
|
14
|
+
button?: TextProps;
|
|
15
|
+
/** @title Иконка кнопки копирования */
|
|
16
|
+
copyIcon?: Picture;
|
|
17
|
+
};
|
|
@@ -1,18 +1,12 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
{ title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
|
|
3
|
+
export const inputs: FieldDef[] = [
|
|
5
4
|
{
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
name: 'email',
|
|
14
|
-
required: true,
|
|
15
|
-
},
|
|
16
|
-
],
|
|
5
|
+
name: 'dadataPartyInnSelect',
|
|
6
|
+
required: true,
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
name: 'email',
|
|
10
|
+
required: true,
|
|
17
11
|
},
|
|
18
12
|
];
|
|
@@ -10,6 +10,10 @@ type renderLinkInputProps = InputProps & {
|
|
|
10
10
|
copyIcon?: Picture;
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
+
const defaultIcon: Picture = {
|
|
14
|
+
icon: 'CopyIcon',
|
|
15
|
+
};
|
|
16
|
+
|
|
13
17
|
export const renderLinkInput = JSX<renderLinkInputProps>(({ className, value = '', copyIcon }) => {
|
|
14
18
|
const onClick = useCallback(async () => {
|
|
15
19
|
try {
|
|
@@ -28,7 +32,7 @@ export const renderLinkInput = JSX<renderLinkInputProps>(({ className, value = '
|
|
|
28
32
|
disabled={true}
|
|
29
33
|
/>
|
|
30
34
|
<div role="button" className="absolute right-3" onClick={onClick}>
|
|
31
|
-
<Img image={copyIcon} />
|
|
35
|
+
<Img image={copyIcon ?? defaultIcon} width="20px" />
|
|
32
36
|
</div>
|
|
33
37
|
</div>
|
|
34
38
|
);
|
|
@@ -1,12 +1,17 @@
|
|
|
1
|
+
import { checkNewMicroservice } from '../utils/checkNewMicroservice';
|
|
1
2
|
import { fetchRetailJSON } from './doRequest';
|
|
2
3
|
import { type Task } from './draftTasksKZO';
|
|
3
4
|
|
|
4
5
|
type GetTaskByIdBody = {
|
|
5
|
-
taskId: number;
|
|
6
|
+
taskId: string | number;
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
export const getTaskById = async (body: GetTaskByIdBody): Promise<Task | undefined> => {
|
|
9
|
-
const
|
|
10
|
+
const isNewMicroservice = checkNewMicroservice();
|
|
11
|
+
|
|
12
|
+
const endpoint = isNewMicroservice ? '/public-data/getTaskById' : '/user-data/getTaskById';
|
|
13
|
+
|
|
14
|
+
const res = await fetchRetailJSON<Task>(endpoint, 'POST', body);
|
|
10
15
|
|
|
11
16
|
return res || undefined;
|
|
12
17
|
};
|
|
@@ -130,23 +130,25 @@ export const getSelectValue = (
|
|
|
130
130
|
};
|
|
131
131
|
|
|
132
132
|
export const getProductData = (taskType?: DraftTaskType) => {
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
133
|
+
switch (taskType) {
|
|
134
|
+
case 'debit':
|
|
135
|
+
return {
|
|
136
|
+
nextStepLink: '/debit-card-lead',
|
|
137
|
+
newTaskLink: '/natural/debetcards',
|
|
138
|
+
description: 'На дебетовую карту',
|
|
139
|
+
};
|
|
140
|
+
case 'credit':
|
|
141
|
+
return {
|
|
142
|
+
nextStepLink: '/credit-lead',
|
|
143
|
+
newTaskLink: '/natural/loans/all-goals',
|
|
144
|
+
description: 'На получение кредита',
|
|
145
|
+
};
|
|
146
|
+
case 'card':
|
|
147
|
+
default:
|
|
148
|
+
return {
|
|
149
|
+
nextStepLink: '/credit-card-lead',
|
|
150
|
+
newTaskLink: '/natural/creditcards/svoya',
|
|
151
|
+
description: 'На получение кредитной карты',
|
|
152
|
+
};
|
|
145
153
|
}
|
|
146
|
-
|
|
147
|
-
return {
|
|
148
|
-
nextStepLink: '/credit-card-lead',
|
|
149
|
-
newTaskLink: '/natural/creditcards/svoya',
|
|
150
|
-
description: 'На получение кредитной карты',
|
|
151
|
-
};
|
|
152
154
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ProductType } from '../model/ApplicationLeadFormTypes';
|
|
2
|
+
import { type DraftTaskType } from '../model/DraftTaskType';
|
|
3
|
+
|
|
4
|
+
export const productTypeToTaskType = (productType: ProductType): DraftTaskType => {
|
|
5
|
+
if (productType === 'debitCard') {
|
|
6
|
+
return 'debit';
|
|
7
|
+
}
|
|
8
|
+
if (productType === 'creditCard') {
|
|
9
|
+
return 'card';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return 'credit';
|
|
13
|
+
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.renderSections = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const getField_1 = require("../../ui-kit/FormField/getField");
|
|
5
|
-
const inputColumnStyle_1 = require("../../ui-kit/FormField/inputColumnStyle");
|
|
6
|
-
const renderTitle_1 = require("../../ui-kit/FormField/renderTitle");
|
|
7
|
-
const style_1 = require("../../utils/style");
|
|
8
|
-
const renderSections = (sections, field) => sections.map((_, i) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)((0, inputColumnStyle_1.inputColumnStyles)(_.columns), 'grid'), children: [(0, renderTitle_1.renderTitle)(_.title), (_?.inputs || [])?.map((0, getField_1.getField)(field))] }, `section-${i}`)));
|
|
9
|
-
exports.renderSections = renderSections;
|
|
10
|
-
//# sourceMappingURL=renderSections.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderSections.js","sourceRoot":"","sources":["../../../src/components/ReferalForm/renderSections.tsx"],"names":[],"mappings":";;;AAEA,8DAA2D;AAC3D,8EAA4E;AAC5E,oEAAiE;AACjE,6CAA0C;AAGnC,MAAM,cAAc,GAAG,CAC5B,QAAyB,EACzB,KAA+C,EAC/C,EAAE,CACF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,iCAA0B,SAAS,EAAE,IAAA,aAAK,EAAC,IAAA,oCAAiB,EAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,aAC7E,IAAA,yBAAW,EAAC,CAAC,CAAC,KAAK,CAAC,EACpB,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,IAAA,mBAAQ,EAAW,KAAK,CAAC,CAAC,KAF1C,WAAW,CAAC,EAAE,CAGlB,CACP,CAAC,CAAC;AATQ,QAAA,cAAc,kBAStB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { getField } from '../../ui-kit/FormField/getField.js';
|
|
3
|
-
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle.js';
|
|
4
|
-
import { renderTitle } from '../../ui-kit/FormField/renderTitle.js';
|
|
5
|
-
import { style } from '../../utils/style.js';
|
|
6
|
-
export const renderSections = (sections, field) => sections.map((_, i) => (_jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field))] }, `section-${i}`)));
|
|
7
|
-
//# sourceMappingURL=renderSections.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderSections.js","sourceRoot":"","sources":["../../../src/components/ReferalForm/renderSections.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,QAAyB,EACzB,KAA+C,EAC/C,EAAE,CACF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,eAA0B,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,aAC7E,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,EACpB,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAW,KAAK,CAAC,CAAC,KAF1C,WAAW,CAAC,EAAE,CAGlB,CACP,CAAC,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.renderSections = void 0;
|
|
3
|
-
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
-
const getField_1 = require("../../ui-kit/FormField/getField");
|
|
5
|
-
const inputColumnStyle_1 = require("../../ui-kit/FormField/inputColumnStyle");
|
|
6
|
-
const renderTitle_1 = require("../../ui-kit/FormField/renderTitle");
|
|
7
|
-
const style_1 = require("../../utils/style");
|
|
8
|
-
const renderSections = (sections, field) => sections.map((_, i) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)((0, inputColumnStyle_1.inputColumnStyles)(_.columns), 'grid'), children: [(0, renderTitle_1.renderTitle)(_.title), (_?.inputs || [])?.map((0, getField_1.getField)(field))] }, `section-${i}`)));
|
|
9
|
-
exports.renderSections = renderSections;
|
|
10
|
-
//# sourceMappingURL=renderSections.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderSections.js","sourceRoot":"","sources":["../../../src/components/ReferalForm/renderSections.tsx"],"names":[],"mappings":";;;AAEA,8DAA2D;AAC3D,8EAA4E;AAC5E,oEAAiE;AACjE,6CAA0C;AAGnC,MAAM,cAAc,GAAG,CAC5B,QAAyB,EACzB,KAA+C,EAC/C,EAAE,CACF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,iCAA0B,SAAS,EAAE,IAAA,aAAK,EAAC,IAAA,oCAAiB,EAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,aAC7E,IAAA,yBAAW,EAAC,CAAC,CAAC,KAAK,CAAC,EACpB,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,IAAA,mBAAQ,EAAW,KAAK,CAAC,CAAC,KAF1C,WAAW,CAAC,EAAE,CAGlB,CACP,CAAC,CAAC;AATQ,QAAA,cAAc,kBAStB"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
-
import { getField } from '../../ui-kit/FormField/getField.js';
|
|
3
|
-
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle.js';
|
|
4
|
-
import { renderTitle } from '../../ui-kit/FormField/renderTitle.js';
|
|
5
|
-
import { style } from '../../utils/style.js';
|
|
6
|
-
export const renderSections = (sections, field) => sections.map((_, i) => (_jsxs("div", { className: style(inputColumnStyles(_.columns), 'grid'), children: [renderTitle(_.title), (_?.inputs || [])?.map(getField(field))] }, `section-${i}`)));
|
|
7
|
-
//# sourceMappingURL=renderSections.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderSections.js","sourceRoot":"","sources":["../../../src/components/ReferalForm/renderSections.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,WAAW,EAAE,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAG1C,MAAM,CAAC,MAAM,cAAc,GAAG,CAC5B,QAAyB,EACzB,KAA+C,EAC/C,EAAE,CACF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CACrB,eAA0B,SAAS,EAAE,KAAK,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,aAC7E,WAAW,CAAC,CAAC,CAAC,KAAK,CAAC,EACpB,CAAC,CAAC,EAAE,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAW,KAAK,CAAC,CAAC,KAF1C,WAAW,CAAC,EAAE,CAGlB,CACP,CAAC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
2
|
-
import type { SectionsProps } from '../../model/InputSectionsType';
|
|
3
|
-
import { getField } from '../../ui-kit/FormField/getField';
|
|
4
|
-
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
5
|
-
import { renderTitle } from '../../ui-kit/FormField/renderTitle';
|
|
6
|
-
import { style } from '../../utils/style';
|
|
7
|
-
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
8
|
-
|
|
9
|
-
export const renderSections = (
|
|
10
|
-
sections: SectionsProps[],
|
|
11
|
-
field: FormFieldRegisterer<Record<string, any>>,
|
|
12
|
-
) =>
|
|
13
|
-
sections.map((_, i) => (
|
|
14
|
-
<div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid')}>
|
|
15
|
-
{renderTitle(_.title)}
|
|
16
|
-
{(_?.inputs || [])?.map(getField<FieldDef>(field))}
|
|
17
|
-
</div>
|
|
18
|
-
));
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
|
|
2
|
-
import type { SectionsProps } from '../../model/InputSectionsType';
|
|
3
|
-
import { getField } from '../../ui-kit/FormField/getField';
|
|
4
|
-
import { inputColumnStyles } from '../../ui-kit/FormField/inputColumnStyle';
|
|
5
|
-
import { renderTitle } from '../../ui-kit/FormField/renderTitle';
|
|
6
|
-
import { style } from '../../utils/style';
|
|
7
|
-
import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
|
|
8
|
-
|
|
9
|
-
export const renderSections = (
|
|
10
|
-
sections: SectionsProps[],
|
|
11
|
-
field: FormFieldRegisterer<Record<string, any>>,
|
|
12
|
-
) =>
|
|
13
|
-
sections.map((_, i) => (
|
|
14
|
-
<div key={`section-${i}`} className={style(inputColumnStyles(_.columns), 'grid')}>
|
|
15
|
-
{renderTitle(_.title)}
|
|
16
|
-
{(_?.inputs || [])?.map(getField<FieldDef>(field))}
|
|
17
|
-
</div>
|
|
18
|
-
));
|