@redneckz/wildless-cms-uni-blocks 0.14.288 → 0.14.290
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 +95 -85
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -5
- package/bundle/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/bundle/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -1
- package/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/bundle/components/LinkDocs/LinkDocsContent.d.ts +2 -1
- package/bundle/components/TabsLayout/TabsLayoutContent.d.ts +2 -1
- package/bundle/data/SitemapData.d.ts +5 -5
- package/bundle/hooks/useAspects/handleAspects.d.ts +10 -0
- package/bundle/hooks/useForm.d.ts +4 -4
- package/bundle/model/AspectsProps.d.ts +4 -4
- package/bundle/model/LinkProps.d.ts +2 -3
- package/bundle/model/LogoType.d.ts +1 -3
- package/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -2
- package/bundle/utils/dataAttributes.d.ts +2 -2
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +13 -6
- package/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -5
- package/dist/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -1
- package/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocItem.js +3 -2
- package/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/dist/components/LinkDocs/LinkDocsContent.d.ts +2 -1
- package/dist/components/LinkDocs/linkDocsContentExample.js +8 -0
- package/dist/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayoutButton.js +2 -1
- package/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -1
- package/dist/components/TabsLayout/TabsLayoutContent.d.ts +2 -1
- package/dist/data/SitemapData.d.ts +5 -5
- package/dist/hooks/useAspects/applyAspects.js +2 -3
- package/dist/hooks/useAspects/applyAspects.js.map +1 -1
- package/dist/hooks/useAspects/handleAspects.d.ts +10 -0
- package/dist/hooks/useAspects/handleAspects.js +10 -0
- package/dist/hooks/useAspects/handleAspects.js.map +1 -0
- package/dist/hooks/useForm.d.ts +4 -4
- package/dist/hooks/useForm.js +4 -4
- package/dist/hooks/useForm.js.map +1 -1
- package/dist/model/AspectsProps.d.ts +4 -4
- package/dist/model/LinkProps.d.ts +2 -3
- package/dist/model/LogoType.d.ts +1 -3
- package/dist/ui-kit/InputRange/InputRange.js +2 -2
- package/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -2
- package/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/dist/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/dist/utils/dataAttributes.d.ts +2 -2
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +14 -7
- package/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -5
- package/lib/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -1
- package/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocItem.js +3 -2
- package/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/lib/components/LinkDocs/LinkDocsContent.d.ts +2 -1
- package/lib/components/LinkDocs/linkDocsContentExample.js +8 -0
- package/lib/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayoutButton.js +2 -1
- package/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -1
- package/lib/components/TabsLayout/TabsLayoutContent.d.ts +2 -1
- package/lib/data/SitemapData.d.ts +5 -5
- package/lib/hooks/useAspects/applyAspects.js +2 -3
- package/lib/hooks/useAspects/applyAspects.js.map +1 -1
- package/lib/hooks/useAspects/handleAspects.d.ts +10 -0
- package/lib/hooks/useAspects/handleAspects.js +7 -0
- package/lib/hooks/useAspects/handleAspects.js.map +1 -0
- package/lib/hooks/useForm.d.ts +4 -4
- package/lib/hooks/useForm.js +4 -4
- package/lib/hooks/useForm.js.map +1 -1
- package/lib/model/AspectsProps.d.ts +4 -4
- package/lib/model/LinkProps.d.ts +2 -3
- package/lib/model/LogoType.d.ts +1 -3
- package/lib/ui-kit/InputRange/InputRange.js +2 -2
- package/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -2
- package/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/lib/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/lib/utils/dataAttributes.d.ts +2 -2
- package/mobile/bundle/bundle.umd.js +93 -83
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -5
- package/mobile/bundle/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/mobile/bundle/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/mobile/bundle/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -1
- package/mobile/bundle/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/mobile/bundle/components/LinkDocs/LinkDocsContent.d.ts +2 -1
- package/mobile/bundle/components/TabsLayout/TabsLayoutContent.d.ts +2 -1
- package/mobile/bundle/data/SitemapData.d.ts +5 -5
- package/mobile/bundle/hooks/useAspects/handleAspects.d.ts +10 -0
- package/mobile/bundle/hooks/useForm.d.ts +4 -4
- package/mobile/bundle/model/AspectsProps.d.ts +4 -4
- package/mobile/bundle/model/LinkProps.d.ts +2 -3
- package/mobile/bundle/model/LogoType.d.ts +1 -3
- package/mobile/bundle/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -2
- package/mobile/bundle/utils/dataAttributes.d.ts +2 -2
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js +13 -6
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -5
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/mobile/dist/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/mobile/dist/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/mobile/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/dist/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -1
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/mobile/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocItem.js +3 -2
- package/mobile/dist/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/dist/components/LinkDocs/LinkDocsContent.d.ts +2 -1
- package/mobile/dist/components/LinkDocs/linkDocsContentExample.js +8 -0
- package/mobile/dist/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.js +2 -1
- package/mobile/dist/components/TabsLayout/TabsLayoutButton.js.map +1 -1
- package/mobile/dist/components/TabsLayout/TabsLayoutContent.d.ts +2 -1
- package/mobile/dist/data/SitemapData.d.ts +5 -5
- package/mobile/dist/hooks/useAspects/applyAspects.js +2 -3
- package/mobile/dist/hooks/useAspects/applyAspects.js.map +1 -1
- package/mobile/dist/hooks/useAspects/handleAspects.d.ts +10 -0
- package/mobile/dist/hooks/useAspects/handleAspects.js +10 -0
- package/mobile/dist/hooks/useAspects/handleAspects.js.map +1 -0
- package/mobile/dist/hooks/useForm.d.ts +4 -4
- package/mobile/dist/hooks/useForm.js +4 -4
- package/mobile/dist/hooks/useForm.js.map +1 -1
- package/mobile/dist/model/AspectsProps.d.ts +4 -4
- package/mobile/dist/model/LinkProps.d.ts +2 -3
- package/mobile/dist/model/LogoType.d.ts +1 -3
- package/mobile/dist/ui-kit/InputRange/InputRange.js +2 -2
- package/mobile/dist/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/mobile/dist/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -2
- package/mobile/dist/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/mobile/dist/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/mobile/dist/utils/dataAttributes.d.ts +2 -2
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js +14 -7
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustom.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/ApplicationFormCustomContent.d.ts +11 -5
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.d.ts +2 -3
- package/mobile/lib/components/ApplicationFormCustom/getFormatData.js.map +1 -1
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.d.ts +4 -0
- package/mobile/lib/components/ApplicationFormCustom/getInitialFormState.js.map +1 -1
- package/mobile/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js +2 -2
- package/mobile/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.js.map +1 -1
- package/mobile/lib/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts +2 -1
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.d.ts +1 -2
- package/mobile/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocItem.js +3 -2
- package/mobile/lib/components/LinkDocs/LinkDocItem.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocs.js.map +1 -1
- package/mobile/lib/components/LinkDocs/LinkDocsContent.d.ts +2 -1
- package/mobile/lib/components/LinkDocs/linkDocsContentExample.js +8 -0
- package/mobile/lib/components/LinkDocs/linkDocsContentExample.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.js +2 -1
- package/mobile/lib/components/TabsLayout/TabsLayoutButton.js.map +1 -1
- package/mobile/lib/components/TabsLayout/TabsLayoutContent.d.ts +2 -1
- package/mobile/lib/data/SitemapData.d.ts +5 -5
- package/mobile/lib/hooks/useAspects/applyAspects.js +2 -3
- package/mobile/lib/hooks/useAspects/applyAspects.js.map +1 -1
- package/mobile/lib/hooks/useAspects/handleAspects.d.ts +10 -0
- package/mobile/lib/hooks/useAspects/handleAspects.js +7 -0
- package/mobile/lib/hooks/useAspects/handleAspects.js.map +1 -0
- package/mobile/lib/hooks/useForm.d.ts +4 -4
- package/mobile/lib/hooks/useForm.js +4 -4
- package/mobile/lib/hooks/useForm.js.map +1 -1
- package/mobile/lib/model/AspectsProps.d.ts +4 -4
- package/mobile/lib/model/LinkProps.d.ts +2 -3
- package/mobile/lib/model/LogoType.d.ts +1 -3
- package/mobile/lib/ui-kit/InputRange/InputRange.js +2 -2
- package/mobile/lib/ui-kit/InputRange/InputRange.js.map +1 -1
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js +2 -2
- package/mobile/lib/ui-kit/InputRange/renderRangeWithTicks.js.map +1 -1
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.d.ts +1 -2
- package/mobile/lib/ui-kit/LinkWrapper/LinkWrapper.js.map +1 -1
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js +1 -1
- package/mobile/lib/ui-kit/PhoneInput/PhoneInput.js.map +1 -1
- package/mobile/lib/utils/dataAttributes.d.ts +2 -2
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +0 -1
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +31 -16
- package/mobile/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +12 -5
- package/mobile/src/components/ApplicationFormCustom/getFormatData.tsx +6 -5
- package/mobile/src/components/ApplicationFormCustom/getInitialFormState.tsx +4 -0
- package/mobile/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.tsx +2 -1
- package/mobile/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.ts +7 -5
- package/mobile/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
- package/mobile/src/components/LinkDocs/LinkDocItem.tsx +4 -1
- package/mobile/src/components/LinkDocs/LinkDocs.tsx +1 -0
- package/mobile/src/components/LinkDocs/LinkDocsContent.ts +6 -4
- package/mobile/src/components/LinkDocs/linkDocsContentExample.ts +8 -0
- package/mobile/src/components/TabsLayout/TabsLayoutButton.tsx +3 -0
- package/mobile/src/components/TabsLayout/TabsLayoutContent.ts +3 -1
- package/mobile/src/data/SitemapData.ts +5 -5
- package/mobile/src/hooks/useAspects/applyAspects.ts +2 -4
- package/mobile/src/hooks/useAspects/handleAspects.ts +18 -0
- package/mobile/src/hooks/useForm.ts +12 -6
- package/mobile/src/model/AspectsProps.ts +4 -4
- package/mobile/src/model/LinkProps.ts +2 -3
- package/mobile/src/model/LogoType.ts +1 -1
- package/mobile/src/ui-kit/InputRange/InputRange.tsx +2 -2
- package/mobile/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -2
- package/mobile/src/ui-kit/LinkWrapper/LinkWrapper.tsx +1 -2
- package/mobile/src/ui-kit/PhoneInput/PhoneInput.tsx +2 -2
- package/mobile/src/utils/dataAttributes.ts +2 -2
- package/package.json +1 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.example.json +0 -1
- package/src/components/ApplicationFormCustom/ApplicationFormCustom.tsx +31 -16
- package/src/components/ApplicationFormCustom/ApplicationFormCustomContent.ts +12 -5
- package/src/components/ApplicationFormCustom/getFormatData.tsx +6 -5
- package/src/components/ApplicationFormCustom/getInitialFormState.tsx +4 -0
- package/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.fixture.tsx +8 -0
- package/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.tsx +2 -1
- package/src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.ts +7 -5
- package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -2
- package/src/components/LinkDocs/LinkDocItem.tsx +4 -1
- package/src/components/LinkDocs/LinkDocs.tsx +1 -0
- package/src/components/LinkDocs/LinkDocsContent.ts +6 -4
- package/src/components/LinkDocs/linkDocsContentExample.ts +8 -0
- package/src/components/TabsLayout/TabsLayoutButton.tsx +3 -0
- package/src/components/TabsLayout/TabsLayoutContent.ts +3 -1
- package/src/data/SitemapData.ts +5 -5
- package/src/hooks/useAspects/applyAspects.ts +2 -4
- package/src/hooks/useAspects/handleAspects.ts +18 -0
- package/src/hooks/useForm.ts +12 -6
- package/src/model/AspectsProps.ts +4 -4
- package/src/model/LinkProps.ts +2 -3
- package/src/model/LogoType.ts +1 -1
- package/src/ui-kit/InputRange/InputRange.tsx +2 -2
- package/src/ui-kit/InputRange/renderRangeWithTicks.tsx +2 -2
- package/src/ui-kit/LinkWrapper/LinkWrapper.tsx +1 -2
- package/src/ui-kit/PhoneInput/PhoneInput.tsx +2 -2
- package/src/utils/dataAttributes.ts +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
1
2
|
import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
3
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
3
4
|
import { type LinkProps } from '../../model/LinkProps';
|
|
@@ -6,9 +7,6 @@ interface Required {
|
|
|
6
7
|
/** @title Обязательно для заполнения */
|
|
7
8
|
required?: boolean;
|
|
8
9
|
}
|
|
9
|
-
/**
|
|
10
|
-
* @title Кнопка
|
|
11
|
-
*/
|
|
12
10
|
export declare type SubmitButtonProps = TextProps & {
|
|
13
11
|
version?: LinkButtonVersion;
|
|
14
12
|
};
|
|
@@ -19,7 +17,7 @@ export declare type SubmitButtonProps = TextProps & {
|
|
|
19
17
|
*/
|
|
20
18
|
export declare type NameFieldDef = 'surname' | 'name' | 'middleName' | 'email' | 'phone' | 'fullName' | 'inn' | 'comment' | 'region' | 'addressBranch' | 'typeForm' | 'birthday' | 'isClient' | 'consentToReceiveMaterials' | 'acquiringType' | 'onlineCheckout' | 'posTerminal' | 'serviceDirection' | 'serviceType' | 'feedbackType' | 'feedbackMethod' | 'bankEmpolee' | 'applicationDate' | 'secondaryPhone' | 'vedTypes' | 'term' | 'amount' | 'annualRevenue' | 'collectionCount' | 'partnerComments' | 'consentDataProcessing';
|
|
21
19
|
export declare type ConditionFieldProps = {
|
|
22
|
-
/** @title Условия отображения полей */
|
|
20
|
+
/** @title Условия отображения полей формы */
|
|
23
21
|
condition?: {
|
|
24
22
|
name: NameFieldDef;
|
|
25
23
|
/** @title Значения при которых отображаются поля */
|
|
@@ -79,15 +77,23 @@ export declare type SectionsProps = TitleProps & {
|
|
|
79
77
|
/**
|
|
80
78
|
* @title Форма заявки настраиваемая
|
|
81
79
|
*/
|
|
82
|
-
export declare type ApplicationFormCustomContent = UniBlockContent & TitleProps & {
|
|
80
|
+
export declare type ApplicationFormCustomContent = UniBlockContent & TitleProps & AspectsProps & {
|
|
81
|
+
/** @title Кнопка */
|
|
83
82
|
button?: SubmitButtonProps;
|
|
83
|
+
/**
|
|
84
|
+
* @title Условия передачи данных
|
|
85
|
+
* @required ["text", "href"]
|
|
86
|
+
*/
|
|
84
87
|
link?: LinkProps;
|
|
85
88
|
typeForm?: TypeFormFieldDef;
|
|
86
89
|
sections?: SectionsProps[];
|
|
87
90
|
endpoint?: EndpointType;
|
|
91
|
+
/** @title Дополнительные параметры формы */
|
|
88
92
|
additionalParams?: {
|
|
93
|
+
/** @title Продукт */
|
|
89
94
|
product?: string;
|
|
90
95
|
};
|
|
96
|
+
/** @title Показать контакты */
|
|
91
97
|
isContacts?: boolean;
|
|
92
98
|
};
|
|
93
99
|
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import { type FormState } from './getInitialFormState';
|
|
2
|
+
export declare const getFormatData: (data: FormState) => Record<string, any>;
|
|
@@ -10,6 +10,10 @@ export interface FormState {
|
|
|
10
10
|
secondaryPhone?: string;
|
|
11
11
|
email?: string;
|
|
12
12
|
acquiringType?: Option;
|
|
13
|
+
serviceType?: Option;
|
|
14
|
+
feedbackType?: Option;
|
|
15
|
+
vedTypes?: string;
|
|
16
|
+
region?: Option;
|
|
13
17
|
onlineCheckout?: boolean;
|
|
14
18
|
posTerminal?: boolean;
|
|
15
19
|
term?: number;
|
package/bundle/components/ApplicationFormGrantSupport/ApplicationFormGrantSupportContent.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
2
3
|
import { type TitleProps } from '../../model/HeadlineType';
|
|
3
4
|
import { type SubmitButtonProps } from '../ApplicationFormCustom/ApplicationFormCustomContent';
|
|
4
5
|
declare type RegionGrand = {
|
|
@@ -11,7 +12,7 @@ declare type RegionGrand = {
|
|
|
11
12
|
/**
|
|
12
13
|
* @title Грантовая поддержка
|
|
13
14
|
*/
|
|
14
|
-
export declare type ApplicationFormGrantSupportContent = TitleProps & {
|
|
15
|
+
export declare type ApplicationFormGrantSupportContent = TitleProps & AspectsProps & {
|
|
15
16
|
button?: SubmitButtonProps;
|
|
16
17
|
/** @title Список регионов */
|
|
17
18
|
regionSource?: RegionGrand & JSONRefObject;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
2
2
|
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
3
3
|
import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
|
|
4
|
-
export interface HeaderSecondaryMenuButtonProps extends ImageContent {
|
|
4
|
+
export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
isRounded?: boolean;
|
|
7
7
|
buttonSize?: 'default' | 'large';
|
|
@@ -9,6 +9,5 @@ export interface HeaderSecondaryMenuButtonProps extends ImageContent {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
ariaLabel?: string;
|
|
11
11
|
onClick?: (ev: PreventableEventWithTarget) => void;
|
|
12
|
-
data?: AspectsProps;
|
|
13
12
|
}
|
|
14
13
|
export declare const HeaderSecondaryMenuButton: import("@redneckz/uni-jsx").UNIComponent<HeaderSecondaryMenuButtonProps, any, any>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
1
2
|
import { type Attachment } from '../../model/Attachment';
|
|
2
3
|
import { type AlignProps, type HeadlineCommonProps, type TextProps } from '../../model/HeadlineType';
|
|
3
4
|
import { type LinkProps, type Target } from '../../model/LinkProps';
|
|
@@ -33,7 +34,7 @@ export declare type LinkDocDef = LinkDoc & {
|
|
|
33
34
|
/**
|
|
34
35
|
* @title Файл
|
|
35
36
|
*/
|
|
36
|
-
export declare type AttachmentDocDef = AttachmentDoc & {
|
|
37
|
+
export declare type AttachmentDocDef = AttachmentDoc & AspectsProps & {
|
|
37
38
|
/** @default "Attachment" */
|
|
38
39
|
docType: 'Attachment';
|
|
39
40
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type Align } from '../../model/Align';
|
|
2
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
2
3
|
import { type DescriptionProps, type TitleProps } from '../../model/HeadlineType';
|
|
3
4
|
import { type LinkCommonProps } from '../../model/LinkProps';
|
|
4
5
|
import { type IconProps } from '../../model/Picture';
|
|
@@ -6,7 +7,7 @@ import { type UniBlockContent } from '../../UniBlock/UniBlockProps';
|
|
|
6
7
|
/**
|
|
7
8
|
* @title Таб
|
|
8
9
|
*/
|
|
9
|
-
export declare type Tab = TitleProps & DescriptionProps & IconProps & LinkCommonProps & {
|
|
10
|
+
export declare type Tab = TitleProps & DescriptionProps & IconProps & LinkCommonProps & AspectsProps & {
|
|
10
11
|
/** @title Вкладка выбрана по-умолчанию */
|
|
11
12
|
selected?: boolean;
|
|
12
13
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type AspectsDef } from '../model/AspectsProps';
|
|
2
2
|
import { type LinkCommonProps, type LinkProps } from '../model/LinkProps';
|
|
3
3
|
import { type LogoType } from '../model/LogoType';
|
|
4
4
|
import { type IconProps, type Picture } from '../model/Picture';
|
|
5
5
|
export interface SitemapLinkProps extends LinkProps {
|
|
6
6
|
displayArea?: string;
|
|
7
|
-
dataHeader?:
|
|
8
|
-
dataFooter?:
|
|
7
|
+
dataHeader?: AspectsDef[];
|
|
8
|
+
dataFooter?: AspectsDef[];
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
11
|
* @title Ссылка
|
|
@@ -17,9 +17,9 @@ export interface TopMenuItemProps extends LinkProps, IconProps {
|
|
|
17
17
|
/** @hidden */
|
|
18
18
|
displayArea?: string;
|
|
19
19
|
/** @hidden */
|
|
20
|
-
dataHeader?:
|
|
20
|
+
dataHeader?: AspectsDef[];
|
|
21
21
|
/** @hidden */
|
|
22
|
-
dataFooter?:
|
|
22
|
+
dataFooter?: AspectsDef[];
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* @title Ссылка дополнительного меню
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type FormState } from '../../components/ApplicationFormCustom/getInitialFormState';
|
|
2
|
+
import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
|
|
3
|
+
import { type Aspects, type AspectsAttribute } from './useAspects';
|
|
4
|
+
export declare type HandleAspectsProps = {
|
|
5
|
+
aspectsAttributes: AspectsAttribute[];
|
|
6
|
+
aspects: Aspects;
|
|
7
|
+
ev: PreventableEventWithTarget;
|
|
8
|
+
formData?: FormState;
|
|
9
|
+
};
|
|
10
|
+
export declare const handleAspects: ({ aspectsAttributes, aspects, ev, formData }: HandleAspectsProps) => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ControlProps } from '../ui-kit/ControlProps';
|
|
2
|
-
import { type PreventableEvent } from '../ui-kit/PreventableEvent';
|
|
2
|
+
import { type PreventableEvent, type PreventableEventWithTarget } from '../ui-kit/PreventableEvent';
|
|
3
3
|
export interface FieldProps<V> extends ControlProps<V> {
|
|
4
4
|
isDirty?: boolean;
|
|
5
5
|
}
|
|
@@ -13,10 +13,10 @@ export interface FormOperatorProps<FormState extends Record<string, any>> {
|
|
|
13
13
|
field: FormFieldRegisterer<FormState>;
|
|
14
14
|
update: (_: FormState) => void;
|
|
15
15
|
reset: () => void;
|
|
16
|
-
onSubmit?: (
|
|
16
|
+
onSubmit?: (ev: PreventableEvent) => void;
|
|
17
17
|
}
|
|
18
|
-
export declare const useForm: <FormState extends Record<string, any>>(initialState: FormState, { resetOnSubmit, onSubmit }?: {
|
|
18
|
+
export declare const useForm: <FormState extends Record<string, any>>(initialState: FormState, { resetOnSubmit, onSubmit, }?: {
|
|
19
19
|
resetOnSubmit?: boolean | undefined;
|
|
20
|
-
onSubmit?: ((_: FormState) => void) | undefined;
|
|
20
|
+
onSubmit?: ((_: FormState, ev: PreventableEventWithTarget) => void) | undefined;
|
|
21
21
|
}) => [FormState, FormOperatorProps<FormState>];
|
|
22
22
|
export {};
|
|
@@ -34,7 +34,7 @@ export declare type EmptyAspect = {
|
|
|
34
34
|
* @default { "aspectName": "" }
|
|
35
35
|
*/
|
|
36
36
|
export declare type AspectsDef = EmptyAspect | ChatBotAspect | YandexReachGoalAspect | MindboxEventAspect;
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
37
|
+
export declare type AspectsProps = {
|
|
38
|
+
/** @title Дополнительные атрибуты */
|
|
39
|
+
data?: AspectsDef[];
|
|
40
|
+
};
|
|
@@ -11,13 +11,12 @@ import { type TextProps } from './HeadlineType';
|
|
|
11
11
|
* ]
|
|
12
12
|
*/
|
|
13
13
|
export declare type Target = '' | '_self' | '_blank' | '_parent' | '_top';
|
|
14
|
-
export
|
|
14
|
+
export declare type LinkCommonProps = AspectsProps & {
|
|
15
15
|
/** @title URL (href) */
|
|
16
16
|
href?: string;
|
|
17
17
|
/** @default "" */
|
|
18
18
|
target?: Target;
|
|
19
|
-
|
|
20
|
-
}
|
|
19
|
+
};
|
|
21
20
|
/**
|
|
22
21
|
* @title Ссылка
|
|
23
22
|
* @required ["text", "href"]
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
2
2
|
import { type Target } from '../../model/LinkProps';
|
|
3
|
-
interface LinkWrapperProps {
|
|
3
|
+
interface LinkWrapperProps extends AspectsProps {
|
|
4
4
|
className?: string;
|
|
5
5
|
href?: string;
|
|
6
6
|
target?: Target;
|
|
7
7
|
isRemote?: boolean;
|
|
8
8
|
onClick?: () => void;
|
|
9
|
-
data?: AspectsProps;
|
|
10
9
|
}
|
|
11
10
|
export declare const LinkWrapper: import("@redneckz/uni-jsx").UNIComponent<LinkWrapperProps, any, any>;
|
|
12
11
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type
|
|
2
|
-
export declare const getAspectsAttributes: (data?:
|
|
1
|
+
import { type AspectsDef } from '../model/AspectsProps';
|
|
2
|
+
export declare const getAspectsAttributes: (data?: AspectsDef[]) => {
|
|
3
3
|
'data-aspects': string;
|
|
4
4
|
} | {
|
|
5
5
|
'data-aspects'?: undefined;
|
|
@@ -4,6 +4,8 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const hooks_1 = require("@redneckz/uni-jsx/lib/hooks");
|
|
6
6
|
const LeadServiceAPI_1 = require("../../api/LeadServiceAPI");
|
|
7
|
+
const handleAspects_1 = require("../../hooks/useAspects/handleAspects");
|
|
8
|
+
const useAspects_1 = require("../../hooks/useAspects/useAspects");
|
|
7
9
|
const useForm_1 = require("../../hooks/useForm");
|
|
8
10
|
const ApplicationFormLayout_1 = require("../../ui-kit/ApplicationFormLayout/ApplicationFormLayout");
|
|
9
11
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
@@ -17,19 +19,23 @@ const getObjectValidator_1 = require("./getObjectValidator");
|
|
|
17
19
|
const renderAgreementSubmit_1 = require("./renderAgreementSubmit");
|
|
18
20
|
const renderContacts_1 = require("./renderContacts");
|
|
19
21
|
const API = (0, LeadServiceAPI_1.LeadServiceAPI)();
|
|
20
|
-
exports.ApplicationFormCustom = (0, uni_jsx_1.JSX)(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, ...rest }) => {
|
|
22
|
+
exports.ApplicationFormCustom = (0, uni_jsx_1.JSX)(({ className, title, typeForm = '', sections = [], button, link, endpoint, additionalParams, isContacts, data, ...rest }) => {
|
|
21
23
|
const inputs = (sections?.flatMap((_) => _?.inputs) || []);
|
|
22
24
|
const initialFormState = (0, getInitialFormState_1.getInitialFormState)(inputs, typeForm);
|
|
23
25
|
const [responseType, setResponseType] = (0, hooks_1.useState)('');
|
|
24
|
-
const handleSubmit = (0, hooks_1.useCallback)(async (
|
|
25
|
-
const inputsFiltered = getFilteredInputs(inputs,
|
|
26
|
+
const handleSubmit = (0, hooks_1.useCallback)(async (formData, ev) => {
|
|
27
|
+
const inputsFiltered = getFilteredInputs(inputs, formData);
|
|
26
28
|
const feedbackValidator = (0, objectValidator_1.objectValidator)((0, getObjectValidator_1.getObjectValidator)(inputsFiltered));
|
|
27
|
-
if (!(0, validator_1.isValidationSuccess)(feedbackValidator(
|
|
29
|
+
if (!(0, validator_1.isValidationSuccess)(feedbackValidator(formData))) {
|
|
28
30
|
return 'Fail';
|
|
29
31
|
}
|
|
30
|
-
const formatData = (0, getFormatData_1.getFormatData)({ ...
|
|
32
|
+
const formatData = (0, getFormatData_1.getFormatData)({ ...formData, ...additionalParams });
|
|
31
33
|
const status = (await API.send(formatData, endpoint === 'lead')) ? 'OK' : 'Fail';
|
|
32
34
|
setResponseType(status);
|
|
35
|
+
if (status === 'OK' && data) {
|
|
36
|
+
const aspects = (0, useAspects_1.useAspects)();
|
|
37
|
+
(0, handleAspects_1.handleAspects)({ aspectsAttributes: data, aspects, ev, formData: formatData });
|
|
38
|
+
}
|
|
33
39
|
return status;
|
|
34
40
|
}, []);
|
|
35
41
|
const [, { field, onSubmit, reset }] = (0, useForm_1.useForm)(initialFormState, { onSubmit: handleSubmit });
|
|
@@ -39,8 +45,9 @@ exports.ApplicationFormCustom = (0, uni_jsx_1.JSX)(({ className, title, typeForm
|
|
|
39
45
|
reset();
|
|
40
46
|
}
|
|
41
47
|
}, [responseType]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(ApplicationFormLayout_1.ApplicationFormLayout, { className: (0, style_1.style)('container space-y-m', className), title: title, responseType: responseType, ...rest, children: [(0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [sections.map((_, i) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [
|
|
48
|
+
return ((0, jsx_runtime_1.jsxs)(ApplicationFormLayout_1.ApplicationFormLayout, { className: (0, style_1.style)('container space-y-m', className), title: title, responseType: responseType, ...rest, children: [(0, jsx_runtime_1.jsxs)("form", { onSubmit: onSubmit, children: [sections.map((_, i) => ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(inputColumnStyles(_.columns), 'grid gap-x-m'), children: [renderTitle(_.title), (_?.inputs || [])?.map((0, getField_1.getField)(field, typeForm))] }, `section-${i}`))), (0, renderAgreementSubmit_1.renderAgreementSubmit)(fieldName ? field('consentDataProcessing') : undefined, link, button)] }), isContacts ? (0, renderContacts_1.renderContacts)() : null] }));
|
|
43
49
|
});
|
|
50
|
+
const renderTitle = (title) => title ? ((0, jsx_runtime_1.jsx)("div", { className: "@xl:text-center @xl:col-span-2 mb-m", children: (0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", children: title }) })) : null;
|
|
44
51
|
const inputColumnStyles = (column) => column === 2 ? '@xl:grid-cols-2' : '';
|
|
45
52
|
const getConsentDataProcessing = (inputs) => inputs?.find((_) => _?.name === 'consentDataProcessing');
|
|
46
53
|
const getFilteredInputs = (inputs, data) => inputs
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationFormCustom.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormCustom/ApplicationFormCustom.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,6DAA0D;AAC1D,iDAA8C;AAC9C,oGAAiG;
|
|
1
|
+
{"version":3,"file":"ApplicationFormCustom.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormCustom/ApplicationFormCustom.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uDAA+E;AAC/E,6DAA0D;AAC1D,wEAAqE;AACrE,kEAA+D;AAC/D,iDAA8C;AAC9C,oGAAiG;AAEjG,iDAA8C;AAE9C,6CAA0C;AAC1C,sEAAmE;AACnE,0DAAiE;AAMjE,yCAAsC;AACtC,mDAAgD;AAChD,+DAA4E;AAC5E,6DAA0D;AAC1D,mEAAgE;AAChE,qDAAkD;AAGlD,MAAM,GAAG,GAAG,IAAA,+BAAc,GAAE,CAAC;AAEhB,QAAA,qBAAqB,GAAG,IAAA,aAAG,EACtC,CAAC,EACC,SAAS,EACT,KAAK,EACL,QAAQ,GAAG,EAAE,EACb,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from '../../model/AspectsProps';
|
|
1
2
|
import { type LabelProps, type TextProps, type TitleProps } from '../../model/HeadlineType';
|
|
2
3
|
import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
|
|
3
4
|
import { type LinkProps } from '../../model/LinkProps';
|
|
@@ -6,9 +7,6 @@ interface Required {
|
|
|
6
7
|
/** @title Обязательно для заполнения */
|
|
7
8
|
required?: boolean;
|
|
8
9
|
}
|
|
9
|
-
/**
|
|
10
|
-
* @title Кнопка
|
|
11
|
-
*/
|
|
12
10
|
export declare type SubmitButtonProps = TextProps & {
|
|
13
11
|
version?: LinkButtonVersion;
|
|
14
12
|
};
|
|
@@ -19,7 +17,7 @@ export declare type SubmitButtonProps = TextProps & {
|
|
|
19
17
|
*/
|
|
20
18
|
export declare type NameFieldDef = 'surname' | 'name' | 'middleName' | 'email' | 'phone' | 'fullName' | 'inn' | 'comment' | 'region' | 'addressBranch' | 'typeForm' | 'birthday' | 'isClient' | 'consentToReceiveMaterials' | 'acquiringType' | 'onlineCheckout' | 'posTerminal' | 'serviceDirection' | 'serviceType' | 'feedbackType' | 'feedbackMethod' | 'bankEmpolee' | 'applicationDate' | 'secondaryPhone' | 'vedTypes' | 'term' | 'amount' | 'annualRevenue' | 'collectionCount' | 'partnerComments' | 'consentDataProcessing';
|
|
21
19
|
export declare type ConditionFieldProps = {
|
|
22
|
-
/** @title Условия отображения полей */
|
|
20
|
+
/** @title Условия отображения полей формы */
|
|
23
21
|
condition?: {
|
|
24
22
|
name: NameFieldDef;
|
|
25
23
|
/** @title Значения при которых отображаются поля */
|
|
@@ -79,15 +77,23 @@ export declare type SectionsProps = TitleProps & {
|
|
|
79
77
|
/**
|
|
80
78
|
* @title Форма заявки настраиваемая
|
|
81
79
|
*/
|
|
82
|
-
export declare type ApplicationFormCustomContent = UniBlockContent & TitleProps & {
|
|
80
|
+
export declare type ApplicationFormCustomContent = UniBlockContent & TitleProps & AspectsProps & {
|
|
81
|
+
/** @title Кнопка */
|
|
83
82
|
button?: SubmitButtonProps;
|
|
83
|
+
/**
|
|
84
|
+
* @title Условия передачи данных
|
|
85
|
+
* @required ["text", "href"]
|
|
86
|
+
*/
|
|
84
87
|
link?: LinkProps;
|
|
85
88
|
typeForm?: TypeFormFieldDef;
|
|
86
89
|
sections?: SectionsProps[];
|
|
87
90
|
endpoint?: EndpointType;
|
|
91
|
+
/** @title Дополнительные параметры формы */
|
|
88
92
|
additionalParams?: {
|
|
93
|
+
/** @title Продукт */
|
|
89
94
|
product?: string;
|
|
90
95
|
};
|
|
96
|
+
/** @title Показать контакты */
|
|
91
97
|
isContacts?: boolean;
|
|
92
98
|
};
|
|
93
99
|
export {};
|
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
};
|
|
1
|
+
import { type FormState } from './getInitialFormState';
|
|
2
|
+
export declare const getFormatData: (data: FormState) => Record<string, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getFormatData.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormCustom/getFormatData.tsx"],"names":[],"mappings":"AAAA,sDAAsD;;;
|
|
1
|
+
{"version":3,"file":"getFormatData.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormCustom/getFormatData.tsx"],"names":[],"mappings":"AAAA,sDAAsD;;;AAItD,6DAA0D;AAC1D,yCAAuC;AAEhC,MAAM,aAAa,GAAG,CAAC,IAAe,EAAuB,EAAE;IACpE,MAAM,EACJ,aAAa,EACb,cAAc,EACd,WAAW,EACX,MAAM,EACN,IAAI,EACJ,aAAa,EACb,WAAW,EACX,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,GAAG,QAAQ,EACZ,GAAG,IAAI,CAAC;IACT,MAAM,eAAe,GAAG,aAAa,IAAI,aAAa,CAAC,CAAC,CAAC,IAAA,uCAAkB,EAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;IACzF,MAAM,UAAU,GAAG;QACjB,GAAG,QAAQ;QACX,GAAG,WAAW,C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+
serviceType?: Option;
|
|
14
|
+
feedbackType?: Option;
|
|
15
|
+
vedTypes?: string;
|
|
16
|
+
region?: Option;
|
|
13
17
|
onlineCheckout?: boolean;
|
|
14
18
|
posTerminal?: boolean;
|
|
15
19
|
term?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getInitialFormState.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormCustom/getInitialFormState.tsx"],"names":[],"mappings":";;AACA,qDAAmD;AAEnD,yCAAgG;AAChG,yCAAuC;
|
|
1
|
+
{"version":3,"file":"getInitialFormState.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormCustom/getInitialFormState.tsx"],"names":[],"mappings":";;AACA,qDAAmD;AAEnD,yCAAgG;AAChG,yCAAuC;AAwBvC,MAAM,gBAAgB,GAAG;IACvB,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7B,aAAa,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IACpC,OAAO,EAAE,EAAE;IACX,IAAI,EAAE,EAAE;IACR,KAAK,EAAE,EAAE;IACT,cAAc,EAAE,EAAE;IAClB,OAAO,EAAE,EAAE;IACX,OAAO,EAAE,EAAE;IACX,eAAe,EAAE,EAAE;IACnB,aAAa,EAAE,EAAE;IACjB,IAAI,EAAE,EAAE;IACR,MAAM,EAAE,IAAI;IACZ,aAAa,EAAE,gCAAe,CAAC,CAAC,CAAC;IACjC,WAAW,EAAE,wBAAa,CAAC,CAAC,CAAC;IAC7B,YAAY,EAAE,yBAAc,CAAC,CAAC,CAAC;IAC/B,cAAc,EAAE,0BAAe,CAAC,CAAC,CAAC;IAClC,gBAAgB,EAAE,6BAAkB,CAAC,CAAC,CAAC;IACvC,QAAQ,EAAE,oBAAS,CAAC,CAAC,CAAC;IACtB,QAAQ,EAAE,SAAS;IACnB,QAAQ,EAAE,KAAK;IACf,cAAc,EAAE,KAAK;IACrB,WAAW,EAAE,KAAK;IAClB,yBAAyB,EAAE,KAAK;IAChC,qBAAqB,EAAE,KAAK;CAC7B,CAAC;AAEK,MAAM,mBAAmB,GAAG,CAAC,MAAkB,EAAE,QAAQ,GAAG,EAAE,EAAa,EAAE;IAClF,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAClC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC;QAChB,CAAC,CAAC,IAAI;QACN,CAAC,CAAC,CAAC,SAAS,KAAK,KAAK,IAAI,CAAC,EAAE,YAAY,CAAC,IAAI,gBAAgB,CAAC,CAAC,CAAC,IAAI,CAAC;KACvE,CAAC,CACH,CAAC;IAEF,IAAI,SAAS,EAAE,WAAW,IAAI,QAAQ,KAAK,gBAAgB,EAAE;QAC3D,SAAS,CAAC,WAAW,GAAG,wBAAa,CAAC,CAAC,CAAC,CAAC;KAC1C;IAED,OAAO,EAAE,GAAG,SAAS,EAAE,QAAQ,EAAE,EAAE,GAAG,EAAE,EAAE,IAAI,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,EAAE,CAAC;AACvE,CAAC,CAAC;AAbW,QAAA,mBAAmB,uBAa9B"}
|
|
@@ -9,7 +9,7 @@ const LinkButton_1 = require("../../ui-kit/LinkButton/LinkButton");
|
|
|
9
9
|
const SelectControl_1 = require("../../ui-kit/Select/SelectControl");
|
|
10
10
|
const UniBlock_1 = require("../../UniBlock/UniBlock");
|
|
11
11
|
const style_1 = require("../../utils/style");
|
|
12
|
-
exports.ApplicationFormGrantSupport = (0, UniBlock_1.UniBlock)(({ className, title, button, regionSource, ...rest }) => {
|
|
12
|
+
exports.ApplicationFormGrantSupport = (0, UniBlock_1.UniBlock)(({ className, title, button, regionSource, data, ...rest }) => {
|
|
13
13
|
const [region, setRegion] = (0, hooks_1.useState)({ key: '' });
|
|
14
14
|
const regions = regionSource?.regions ?? [];
|
|
15
15
|
const buttonStyle = (0, getRegularButtonClasses_1.getRegularButtonClasses)({
|
|
@@ -18,6 +18,6 @@ exports.ApplicationFormGrantSupport = (0, UniBlock_1.UniBlock)(({ className, tit
|
|
|
18
18
|
});
|
|
19
19
|
const regionHref = regions?.find((_) => _.name === region.key)?.href;
|
|
20
20
|
const buttonText = button?.text ? button.text : 'Перейти';
|
|
21
|
-
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "container max-w-[978px] space-y-m", children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? ((0, jsx_runtime_1.jsx)(SelectControl_1.SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? ((0, jsx_runtime_1.jsx)("div", { className: "text-center", children: (0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { href: regionHref, target: "_blank", className: (0, style_1.style)('p-m w-full @xl:w-auto', buttonStyle), children: buttonText }) })) : null] }) }));
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: className, defaultPadding: "p-6xl", ...rest, children: (0, jsx_runtime_1.jsxs)("div", { className: "container max-w-[978px] space-y-m", children: [title ? (0, jsx_runtime_1.jsx)(Heading_1.Heading, { headingType: "h3", title: title, className: "@xl:text-center" }) : null, regions ? ((0, jsx_runtime_1.jsx)(SelectControl_1.SelectControl, { label: "\u0412\u0430\u0448 \u0440\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D", isSearch: true, options: regions.map(({ name = '' }) => ({ key: name, text: name })), value: region, onChange: setRegion })) : null, regionHref ? ((0, jsx_runtime_1.jsx)("div", { className: "text-center", children: (0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { href: regionHref, target: "_blank", className: (0, style_1.style)('p-m w-full @xl:w-auto', buttonStyle), data: data, children: buttonText }) })) : null] }) }));
|
|
22
22
|
});
|
|
23
23
|
//# sourceMappingURL=ApplicationFormGrantSupport.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationFormGrantSupport.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.tsx"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,4DAAyD;AACzD,0DAAuD;AACvD,6FAA0F;AAC1F,mEAAgE;AAChE,qEAAkE;AAClE,sDAAmD;AAEnD,6CAA0C;AAO7B,QAAA,2BAA2B,GAAG,IAAA,mBAAQ,EACjD,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;
|
|
1
|
+
{"version":3,"file":"ApplicationFormGrantSupport.js","sourceRoot":"","sources":["../../../src/components/ApplicationFormGrantSupport/ApplicationFormGrantSupport.tsx"],"names":[],"mappings":";;;AAAA,uDAAuD;AACvD,4DAAyD;AACzD,0DAAuD;AACvD,6FAA0F;AAC1F,mEAAgE;AAChE,qEAAkE;AAClE,sDAAmD;AAEnD,6CAA0C;AAO7B,QAAA,2BAA2B,GAAG,IAAA,mBAAQ,EACjD,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE;IAC5D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,OAAO,GAAG,YAAY,EAAE,OAAO,IAAI,EAAE,CAAC;IAE5C,MAAM,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,EAAE,IAAI,YAET,UAAU,GACA,GACT,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,GACO,CAChB,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { type JSONRefObject } from '../../data/JSONRefObject';
|
|
2
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
2
3
|
import { type TitleProps } from '../../model/HeadlineType';
|
|
3
4
|
import { type SubmitButtonProps } from '../ApplicationFormCustom/ApplicationFormCustomContent';
|
|
4
5
|
declare type RegionGrand = {
|
|
@@ -11,7 +12,7 @@ declare type RegionGrand = {
|
|
|
11
12
|
/**
|
|
12
13
|
* @title Грантовая поддержка
|
|
13
14
|
*/
|
|
14
|
-
export declare type ApplicationFormGrantSupportContent = TitleProps & {
|
|
15
|
+
export declare type ApplicationFormGrantSupportContent = TitleProps & AspectsProps & {
|
|
15
16
|
button?: SubmitButtonProps;
|
|
16
17
|
/** @title Список регионов */
|
|
17
18
|
regionSource?: RegionGrand & JSONRefObject;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type AspectsProps } from '../../model/AspectsProps';
|
|
2
2
|
import { type ImageContent } from '../../ui-kit/Img/ImgProps';
|
|
3
3
|
import { type PreventableEventWithTarget } from '../../ui-kit/PreventableEvent';
|
|
4
|
-
export interface HeaderSecondaryMenuButtonProps extends ImageContent {
|
|
4
|
+
export interface HeaderSecondaryMenuButtonProps extends ImageContent, AspectsProps {
|
|
5
5
|
className?: string;
|
|
6
6
|
isRounded?: boolean;
|
|
7
7
|
buttonSize?: 'default' | 'large';
|
|
@@ -9,6 +9,5 @@ export interface HeaderSecondaryMenuButtonProps extends ImageContent {
|
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
ariaLabel?: string;
|
|
11
11
|
onClick?: (ev: PreventableEventWithTarget) => void;
|
|
12
|
-
data?: AspectsProps;
|
|
13
12
|
}
|
|
14
13
|
export declare const HeaderSecondaryMenuButton: import("@redneckz/uni-jsx").UNIComponent<HeaderSecondaryMenuButtonProps, any, any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HeaderSecondaryMenuButton.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenuButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,8CAA2C;AAG3C,+DAAkE;AAClE,6CAA0C;
|
|
1
|
+
{"version":3,"file":"HeaderSecondaryMenuButton.js","sourceRoot":"","sources":["../../../src/components/Header/HeaderSecondaryMenuButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,8CAA2C;AAG3C,+DAAkE;AAClE,6CAA0C;AAY1C,MAAM,iBAAiB,GAAG;IACxB,OAAO,EAAE,SAAS;IAClB,KAAK,EAAE,WAAW;CACnB,CAAC;AAEW,QAAA,yBAAyB,GAAG,IAAA,aAAG,EAC1C,CAAC,EACC,SAAS,EACT,SAAS,EACT,UAAU,GAAG,SAAS,EACtB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAI,EACJ,OAAO,GACR,EAAE,EAAE,CAAC,CACJ,mCACE,SAAS,EAAE,IAAA,aAAK,EACd,+CAA+C,EAC/C,QAAQ,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,gBAAgB,EAChD,QAAQ,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,EAC/C,SAAS;QACP,CAAC,CAAC,wDAAwD;QAC1D,CAAC,CAAC,GAAG,iBAAiB,CAAC,UAAU,CAAC,4CAA4C,EAChF,mCAAmC,EACnC,SAAS,CACV,EACD,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,QAAQ,gBACN,SAAS,EACrB,OAAO,EAAE,OAAO,KAEZ,IAAA,qCAAoB,EAAC,IAAI,CAAC,YAE9B,uBAAC,SAAG,IACF,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,IAAA,aAAK,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC,iCAAiC,CAAC,CAAC,CAAC,EAAE,CAAC,EAC9E,cAAc,EAAC,6DAA6D,GAC5E,GACK,CACV,CACF,CAAC"}
|
|
@@ -3,11 +3,12 @@ exports.LinkDocItem = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const Text_1 = require("../../ui-kit/Text/Text");
|
|
6
|
-
|
|
6
|
+
const dataAttributes_1 = require("../../utils/dataAttributes");
|
|
7
|
+
exports.LinkDocItem = (0, uni_jsx_1.JSX)(({ icon, text, href, target, fileFormat, data, fileSize }) => {
|
|
7
8
|
const prefix = fileSize && fileFormat ? ',' : '';
|
|
8
9
|
const size = fileSize ?? '';
|
|
9
10
|
const format = fileFormat ? String(fileFormat) : '';
|
|
10
|
-
return ((0, jsx_runtime_1.jsxs)("a", { className: "flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main", href: href, target: target, children: [icon, text ? ((0, jsx_runtime_1.jsxs)(Text_1.Text, { size: "text-l", font: "font-light", children: [text, " ", addSpace(size, format), (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-secondary-text", children: href && `${size + prefix + format}` })] })) : null] }));
|
|
11
|
+
return ((0, jsx_runtime_1.jsxs)("a", { className: "flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main", href: href, target: target, ...(0, dataAttributes_1.getAspectsAttributes)(data), children: [icon, text ? ((0, jsx_runtime_1.jsxs)(Text_1.Text, { size: "text-l", font: "font-light", children: [text, " ", addSpace(size, format), (0, jsx_runtime_1.jsx)(Text_1.Text, { color: "text-secondary-text", children: href && `${size + prefix + format}` })] })) : null] }));
|
|
11
12
|
});
|
|
12
13
|
const addSpace = (size, format) => (size || format ? (0, jsx_runtime_1.jsx)("span", { children: ",\u00A0" }) : '');
|
|
13
14
|
//# sourceMappingURL=LinkDocItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocItem.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iDAA8C;
|
|
1
|
+
{"version":3,"file":"LinkDocItem.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAExC,iDAA8C;AAC9C,+DAAkE;AAOrD,QAAA,WAAW,GAAG,IAAA,aAAG,EAC5B,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,EAAE;IAC3D,MAAM,MAAM,GAAG,QAAQ,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IACjD,MAAM,IAAI,GAAG,QAAQ,IAAI,EAAE,CAAC;IAC5B,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEpD,OAAO,CACL,+BACE,SAAS,EAAC,qGAAqG,EAC/G,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,MAAM,KAEV,IAAA,qCAAoB,EAAC,IAAI,CAAC,aAE7B,IAAI,EACJ,IAAI,CAAC,CAAC,CAAC,CACN,wBAAC,WAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,aAClC,IAAI,OAAG,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,EAC9B,uBAAC,WAAI,IAAC,KAAK,EAAC,qBAAqB,YAAE,IAAI,IAAI,GAAG,IAAI,GAAG,MAAM,GAAG,MAAM,EAAE,GAAQ,IACzE,CACR,CAAC,CAAC,CAAC,IAAI,IACN,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,QAAQ,GAAG,CAAC,IAAY,EAAE,MAAc,EAAE,EAAE,CAAC,CAAC,IAAI,IAAI,MAAM,CAAC,CAAC,CAAC,uDAAwB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC"}
|
|
@@ -28,7 +28,7 @@ const renderLinkDocItem = (router, icon) => (docBlockDef, i) => {
|
|
|
28
28
|
? (0, formatBytes_1.formatBytes)(docBlockDef?.attachment?.fileSize || 0)
|
|
29
29
|
: docBlockDef?.fileSize;
|
|
30
30
|
const fileFormat = docBlockDef?.docType === 'Attachment' ? getExtFromHref(href) : docBlockDef?.fileFormat;
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)("div", { role: "listitem", children: (0, jsx_runtime_1.jsx)(LinkDocItem_1.LinkDocItem, { text: docBlockDef?.text, target: docBlockDef?.target, href: href, fileFormat: fileFormat, fileSize: fileSize, icon: icon ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: linkIconStyle_1.linkIconStyle, image: icon, width: "24", height: "24" }) : null }) }, String(i)));
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)("div", { role: "listitem", children: (0, jsx_runtime_1.jsx)(LinkDocItem_1.LinkDocItem, { text: docBlockDef?.text, target: docBlockDef?.target, href: href, fileFormat: fileFormat, fileSize: fileSize, icon: icon ? (0, jsx_runtime_1.jsx)(Img_1.Img, { className: linkIconStyle_1.linkIconStyle, image: icon, width: "24", height: "24" }) : null, data: docBlockDef?.data }) }, String(i)));
|
|
32
32
|
};
|
|
33
33
|
const getExtFromHref = (href) => {
|
|
34
34
|
if (!href) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkDocs.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/LinkDocs.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,qDAA+D;AAE/D,4DAAyD;AACzD,8CAA2C;AAE3C,uDAAoD;AACpD,yDAAsD;AACtD,6CAA0C;AAC1C,mDAAgD;AAChD,+CAA4C;AAE5C,mDAAgD;AAEhD,MAAM,uBAAuB,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AS,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAEhE,OAAO,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC7E,CAAC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type AspectsProps } from '../../model/AspectsProps';
|
|
1
2
|
import { type Attachment } from '../../model/Attachment';
|
|
2
3
|
import { type AlignProps, type HeadlineCommonProps, type TextProps } from '../../model/HeadlineType';
|
|
3
4
|
import { type LinkProps, type Target } from '../../model/LinkProps';
|
|
@@ -33,7 +34,7 @@ export declare type LinkDocDef = LinkDoc & {
|
|
|
33
34
|
/**
|
|
34
35
|
* @title Файл
|
|
35
36
|
*/
|
|
36
|
-
export declare type AttachmentDocDef = AttachmentDoc & {
|
|
37
|
+
export declare type AttachmentDocDef = AttachmentDoc & AspectsProps & {
|
|
37
38
|
/** @default "Attachment" */
|
|
38
39
|
docType: 'Attachment';
|
|
39
40
|
};
|
|
@@ -9,6 +9,14 @@ exports.linkDocsContentExample = {
|
|
|
9
9
|
text: 'target self',
|
|
10
10
|
attachment: { src: '/abc1/cooldoc.doc/content?content' },
|
|
11
11
|
target: '_self',
|
|
12
|
+
data: [
|
|
13
|
+
{
|
|
14
|
+
aspectName: 'mindboxEvent',
|
|
15
|
+
params: {
|
|
16
|
+
eventvaluetext: 'test-mindbox',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
],
|
|
12
20
|
},
|
|
13
21
|
{
|
|
14
22
|
docType: 'Link',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"linkDocsContentExample.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/linkDocsContentExample.ts"],"names":[],"mappings":";;AAEa,QAAA,sBAAsB,GAAoB;IACrD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,oCAAoC;IACjD,SAAS,EAAE;QACT;YACE,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,aAAa;YACnB,UAAU,EAAE,EAAE,GAAG,EAAE,mCAAmC,EAAE;YACxD,MAAM,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"linkDocsContentExample.js","sourceRoot":"","sources":["../../../src/components/LinkDocs/linkDocsContentExample.ts"],"names":[],"mappings":";;AAEa,QAAA,sBAAsB,GAAoB;IACrD,KAAK,EAAE,0BAA0B;IACjC,WAAW,EAAE,oCAAoC;IACjD,SAAS,EAAE;QACT;YACE,OAAO,EAAE,YAAY;YACrB,IAAI,EAAE,aAAa;YACnB,UAAU,EAAE,EAAE,GAAG,EAAE,mCAAmC,EAAE;YACxD,MAAM,EAAE,OAAO;YACf,IAAI,EAAE;gBACJ;oBACE,UAAU,EAAE,cAAc;oBAC1B,MAAM,EAAE;wBACN,cAAc,EAAE,cAAc;qBAC/B;iBACF;aACF;SACF;QACD;YACE,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,cAAc;YACpB,IAAI,EAAE,eAAe;YACrB,UAAU,EAAE,KAAK;YACjB,MAAM,EAAE,QAAQ;SACjB;QACD,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,EAAE;QAClF,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE;QACtE,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE;QACtD,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,KAAK,EAAE;QACjF,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,KAAK,EAAE;QACtF;YACE,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,kIAAkI;YACxI,IAAI,EAAE,mBAAmB;YACzB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,OAAO;SAClB;QACD;YACE,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,sBAAsB;YAC5B,IAAI,EAAE,kBAAkB;YACxB,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,OAAO;SAClB;QACD;YACE,OAAO,EAAE,MAAM;YACf,IAAI,EAAE,qDAAqD;YAC3D,IAAI,EAAE,SAAS;YACf,UAAU,EAAE,KAAK;YACjB,QAAQ,EAAE,MAAM;SACjB;KACF;CACF,CAAC"}
|
|
@@ -3,6 +3,7 @@ exports.TabsLayoutButton = void 0;
|
|
|
3
3
|
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
4
|
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
5
|
const Img_1 = require("../../ui-kit/Img/Img");
|
|
6
|
+
const dataAttributes_1 = require("../../utils/dataAttributes");
|
|
6
7
|
const style_1 = require("../../utils/style");
|
|
7
8
|
const getButtonClassNames = (isActive) => ({
|
|
8
9
|
btn: `w-96 ${isActive
|
|
@@ -15,7 +16,7 @@ const getButtonClassNames = (isActive) => ({
|
|
|
15
16
|
});
|
|
16
17
|
exports.TabsLayoutButton = (0, uni_jsx_1.JSX)(({ tab, className, onClick, isActive }) => {
|
|
17
18
|
const buttonClassNames = getButtonClassNames(isActive);
|
|
18
|
-
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: (0, style_1.style)('border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs', buttonClassNames.btn, className), children: [tab?.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: (0, style_1.style)('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)("button", { type: "button", onClick: onClick, "aria-label": tab?.title, className: (0, style_1.style)('border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs', buttonClassNames.btn, className), ...(0, dataAttributes_1.getAspectsAttributes)(tab?.data), children: [tab?.icon ? ((0, jsx_runtime_1.jsx)(Img_1.Img, { className: (0, style_1.style)('h-6 w-6 min-w-6 min-h-6', buttonClassNames.icon), image: {
|
|
19
20
|
...tab?.icon,
|
|
20
21
|
iconVersion: tab?.icon?.iconVersion ?? buttonClassNames.iconVersion,
|
|
21
22
|
}, width: "24", height: "24" })) : null, (0, jsx_runtime_1.jsxs)("div", { className: "border-0", children: [tab?.title ? (0, jsx_runtime_1.jsx)("div", { className: buttonClassNames.title, children: tab.title }) : null, tab?.description ? (0, jsx_runtime_1.jsx)("div", { className: buttonClassNames.desc, children: tab.description }) : null] })] }));
|