@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.
Files changed (122) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +65 -113
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  5. package/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
  6. package/bundle/retail/api/getTaskById.d.ts +1 -1
  7. package/bundle/retail/utils/productTypeToTaskType.d.ts +3 -0
  8. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
  9. package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  10. package/dist/components/ReferalForm/ReferalForm.js +6 -6
  11. package/dist/components/ReferalForm/ReferalForm.js.map +1 -1
  12. package/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  13. package/dist/components/ReferalForm/referalFormData.d.ts +2 -2
  14. package/dist/components/ReferalForm/referalFormData.js +8 -14
  15. package/dist/components/ReferalForm/referalFormData.js.map +1 -1
  16. package/dist/components/ReferalForm/renderLinkInput.js +4 -1
  17. package/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
  18. package/dist/retail/api/getTaskById.d.ts +1 -1
  19. package/dist/retail/api/getTaskById.js +4 -1
  20. package/dist/retail/api/getTaskById.js.map +1 -1
  21. package/dist/retail/components/DraftDialog/utils.js +20 -18
  22. package/dist/retail/components/DraftDialog/utils.js.map +1 -1
  23. package/dist/retail/utils/productTypeToTaskType.d.ts +3 -0
  24. package/dist/retail/utils/productTypeToTaskType.js +13 -0
  25. package/dist/retail/utils/productTypeToTaskType.js.map +1 -0
  26. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
  27. package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  28. package/lib/components/ReferalForm/ReferalForm.js +6 -6
  29. package/lib/components/ReferalForm/ReferalForm.js.map +1 -1
  30. package/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  31. package/lib/components/ReferalForm/referalFormData.d.ts +2 -2
  32. package/lib/components/ReferalForm/referalFormData.js +7 -13
  33. package/lib/components/ReferalForm/referalFormData.js.map +1 -1
  34. package/lib/components/ReferalForm/renderLinkInput.js +4 -1
  35. package/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
  36. package/lib/retail/api/getTaskById.d.ts +1 -1
  37. package/lib/retail/api/getTaskById.js +4 -1
  38. package/lib/retail/api/getTaskById.js.map +1 -1
  39. package/lib/retail/components/DraftDialog/utils.js +20 -18
  40. package/lib/retail/components/DraftDialog/utils.js.map +1 -1
  41. package/lib/retail/utils/productTypeToTaskType.d.ts +3 -0
  42. package/lib/retail/utils/productTypeToTaskType.js +10 -0
  43. package/lib/retail/utils/productTypeToTaskType.js.map +1 -0
  44. package/mobile/bundle/bundle.umd.js +65 -113
  45. package/mobile/bundle/bundle.umd.min.js +1 -1
  46. package/mobile/bundle/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  47. package/mobile/bundle/components/ReferalForm/referalFormData.d.ts +2 -2
  48. package/mobile/bundle/retail/api/getTaskById.d.ts +1 -1
  49. package/mobile/bundle/retail/utils/productTypeToTaskType.d.ts +3 -0
  50. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
  51. package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  52. package/mobile/dist/components/ReferalForm/ReferalForm.js +6 -6
  53. package/mobile/dist/components/ReferalForm/ReferalForm.js.map +1 -1
  54. package/mobile/dist/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  55. package/mobile/dist/components/ReferalForm/referalFormData.d.ts +2 -2
  56. package/mobile/dist/components/ReferalForm/referalFormData.js +8 -14
  57. package/mobile/dist/components/ReferalForm/referalFormData.js.map +1 -1
  58. package/mobile/dist/components/ReferalForm/renderLinkInput.js +4 -1
  59. package/mobile/dist/components/ReferalForm/renderLinkInput.js.map +1 -1
  60. package/mobile/dist/retail/api/getTaskById.d.ts +1 -1
  61. package/mobile/dist/retail/api/getTaskById.js +4 -1
  62. package/mobile/dist/retail/api/getTaskById.js.map +1 -1
  63. package/mobile/dist/retail/components/DraftDialog/utils.js +20 -18
  64. package/mobile/dist/retail/components/DraftDialog/utils.js.map +1 -1
  65. package/mobile/dist/retail/utils/productTypeToTaskType.d.ts +3 -0
  66. package/mobile/dist/retail/utils/productTypeToTaskType.js +13 -0
  67. package/mobile/dist/retail/utils/productTypeToTaskType.js.map +1 -0
  68. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +16 -19
  69. package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
  70. package/mobile/lib/components/ReferalForm/ReferalForm.js +6 -6
  71. package/mobile/lib/components/ReferalForm/ReferalForm.js.map +1 -1
  72. package/mobile/lib/components/ReferalForm/ReferalFormContent.d.ts +2 -2
  73. package/mobile/lib/components/ReferalForm/referalFormData.d.ts +2 -2
  74. package/mobile/lib/components/ReferalForm/referalFormData.js +7 -13
  75. package/mobile/lib/components/ReferalForm/referalFormData.js.map +1 -1
  76. package/mobile/lib/components/ReferalForm/renderLinkInput.js +4 -1
  77. package/mobile/lib/components/ReferalForm/renderLinkInput.js.map +1 -1
  78. package/mobile/lib/retail/api/getTaskById.d.ts +1 -1
  79. package/mobile/lib/retail/api/getTaskById.js +4 -1
  80. package/mobile/lib/retail/api/getTaskById.js.map +1 -1
  81. package/mobile/lib/retail/components/DraftDialog/utils.js +20 -18
  82. package/mobile/lib/retail/components/DraftDialog/utils.js.map +1 -1
  83. package/mobile/lib/retail/utils/productTypeToTaskType.d.ts +3 -0
  84. package/mobile/lib/retail/utils/productTypeToTaskType.js +10 -0
  85. package/mobile/lib/retail/utils/productTypeToTaskType.js.map +1 -0
  86. package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +15 -24
  87. package/mobile/src/components/ReferalForm/ReferalForm.example.json +3 -1
  88. package/mobile/src/components/ReferalForm/ReferalForm.tsx +11 -11
  89. package/mobile/src/components/ReferalForm/ReferalFormContent.ts +11 -9
  90. package/mobile/src/components/ReferalForm/referalFormData.ts +8 -14
  91. package/mobile/src/components/ReferalForm/renderLinkInput.tsx +5 -1
  92. package/mobile/src/retail/api/getTaskById.ts +7 -2
  93. package/mobile/src/retail/components/DraftDialog/utils.ts +20 -18
  94. package/mobile/src/retail/utils/productTypeToTaskType.ts +13 -0
  95. package/package.json +1 -1
  96. package/src/components/ApplicationLeadForm/useApplicationLeadApi.tsx +15 -24
  97. package/src/components/ReferalForm/ReferalForm.example.json +3 -1
  98. package/src/components/ReferalForm/ReferalForm.fixture.mobile.tsx +2 -0
  99. package/src/components/ReferalForm/ReferalForm.fixture.tsx +2 -0
  100. package/src/components/ReferalForm/ReferalForm.tsx +11 -11
  101. package/src/components/ReferalForm/ReferalFormContent.ts +11 -9
  102. package/src/components/ReferalForm/referalFormData.ts +8 -14
  103. package/src/components/ReferalForm/renderLinkInput.tsx +5 -1
  104. package/src/retail/api/getTaskById.ts +7 -2
  105. package/src/retail/components/DraftDialog/utils.ts +20 -18
  106. package/src/retail/utils/productTypeToTaskType.ts +13 -0
  107. package/bundle/components/ReferalForm/renderSections.d.ts +0 -3
  108. package/dist/components/ReferalForm/renderSections.d.ts +0 -3
  109. package/dist/components/ReferalForm/renderSections.js +0 -10
  110. package/dist/components/ReferalForm/renderSections.js.map +0 -1
  111. package/lib/components/ReferalForm/renderSections.d.ts +0 -3
  112. package/lib/components/ReferalForm/renderSections.js +0 -7
  113. package/lib/components/ReferalForm/renderSections.js.map +0 -1
  114. package/mobile/bundle/components/ReferalForm/renderSections.d.ts +0 -3
  115. package/mobile/dist/components/ReferalForm/renderSections.d.ts +0 -3
  116. package/mobile/dist/components/ReferalForm/renderSections.js +0 -10
  117. package/mobile/dist/components/ReferalForm/renderSections.js.map +0 -1
  118. package/mobile/lib/components/ReferalForm/renderSections.d.ts +0 -3
  119. package/mobile/lib/components/ReferalForm/renderSections.js +0 -7
  120. package/mobile/lib/components/ReferalForm/renderSections.js.map +0 -1
  121. package/mobile/src/components/ReferalForm/renderSections.tsx +0 -18
  122. 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 { sections } from './referalFormData';
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
- {renderSections(sections, field)}
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
- /** @title Адрес страницы с заявкой для реферала */
10
- link?: string;
11
- /** @title Кнопка */
12
- button?: TextProps;
13
- /** @title Иконка кнопки копирования */
14
- copyIcon?: Picture;
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 SectionsProps } from '../../model/InputSectionsType';
1
+ import { type FieldDef } from '../ApplicationForm/ApplicationFormContent';
2
2
 
3
- export const sections: SectionsProps[] = [
4
- { title: 'Заполните ваши данные и получите персональную ссылку', inputs: [] },
3
+ export const inputs: FieldDef[] = [
5
4
  {
6
- columns: 2,
7
- inputs: [
8
- {
9
- name: 'dadataPartyInnSelect',
10
- required: true,
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 res = await fetchRetailJSON<Task>('/user-data/getTaskById', 'POST', body);
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
- if (taskType === 'debit') {
134
- return {
135
- nextStepLink: '/debit-card-lead',
136
- newTaskLink: '/natural/debetcards',
137
- description: 'На дебетовую карту',
138
- };
139
- } else if (taskType === 'credit') {
140
- return {
141
- nextStepLink: '/credit-lead',
142
- newTaskLink: '/natural/loans/all-goals',
143
- description: 'На получение кредита',
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,3 +0,0 @@
1
- import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import type { SectionsProps } from '../../model/InputSectionsType';
3
- export declare const renderSections: (sections: SectionsProps[], field: FormFieldRegisterer<Record<string, any>>) => any[];
@@ -1,3 +0,0 @@
1
- import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import type { SectionsProps } from '../../model/InputSectionsType';
3
- export declare const renderSections: (sections: SectionsProps[], field: FormFieldRegisterer<Record<string, any>>) => any[];
@@ -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,3 +0,0 @@
1
- import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import type { SectionsProps } from '../../model/InputSectionsType';
3
- export declare const renderSections: (sections: SectionsProps[], field: FormFieldRegisterer<Record<string, any>>) => any[];
@@ -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,3 +0,0 @@
1
- import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import type { SectionsProps } from '../../model/InputSectionsType';
3
- export declare const renderSections: (sections: SectionsProps[], field: FormFieldRegisterer<Record<string, any>>) => any[];
@@ -1,3 +0,0 @@
1
- import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import type { SectionsProps } from '../../model/InputSectionsType';
3
- export declare const renderSections: (sections: SectionsProps[], field: FormFieldRegisterer<Record<string, any>>) => any[];
@@ -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,3 +0,0 @@
1
- import type { FormFieldRegisterer } from '../../hooks/useForm/useForm';
2
- import type { SectionsProps } from '../../model/InputSectionsType';
3
- export declare const renderSections: (sections: SectionsProps[], field: FormFieldRegisterer<Record<string, any>>) => any[];
@@ -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
- ));