@redneckz/wildless-cms-uni-blocks 0.14.695 → 0.14.697
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/bin/migrate.js +2 -5
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +40 -13
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/RollupItem/getIconName.d.ts +1 -1
- package/bundle/icons/IconName.d.ts +218 -218
- package/bundle/model/LinkProps.d.ts +3 -3
- package/cosmos-static/icons/sprites.svg +101 -101
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +1 -1
- package/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js +9 -2
- package/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js +1 -1
- package/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/dist/components/CreditForm/useCreditFormAPI.js +9 -2
- package/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/dist/components/RollupItem/getIconName.d.ts +1 -1
- package/dist/components/StepsBlock/renderStep.js +1 -1
- package/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/dist/components/StepsBlock/renderStepMobile.js +1 -1
- package/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
- package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/dist/components/TextBlock/TextBlock.js +2 -2
- package/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/dist/content-page-repository/ContentPageRepository.js +2 -3
- package/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/dist/icons/IconName.d.ts +218 -218
- package/dist/icons/IconName.js +217 -217
- package/dist/icons/IconName.js.map +1 -1
- package/dist/model/LinkProps.d.ts +3 -3
- package/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/dist/ui-kit/FormField/Fields/AddressFactField.js +14 -1
- package/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
- package/lib/common.css +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +1 -1
- package/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js +9 -2
- package/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js +1 -1
- package/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/lib/components/CreditForm/useCreditFormAPI.js +9 -2
- package/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/lib/components/RollupItem/getIconName.d.ts +1 -1
- package/lib/components/StepsBlock/renderStep.js +1 -1
- package/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/lib/components/StepsBlock/renderStepMobile.js +1 -1
- package/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
- package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/lib/components/TextBlock/TextBlock.js +2 -2
- package/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/lib/content-page-repository/ContentPageRepository.js +2 -3
- package/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/lib/icons/IconName.d.ts +218 -218
- package/lib/icons/IconName.js +217 -217
- package/lib/icons/IconName.js.map +1 -1
- package/lib/model/LinkProps.d.ts +3 -3
- package/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/lib/ui-kit/FormField/Fields/AddressFactField.js +14 -1
- package/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +41 -14
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/RollupItem/getIconName.d.ts +1 -1
- package/mobile/bundle/icons/IconName.d.ts +218 -218
- package/mobile/bundle/model/LinkProps.d.ts +3 -3
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js +1 -1
- package/mobile/dist/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js +9 -2
- package/mobile/dist/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js +1 -1
- package/mobile/dist/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js +9 -2
- package/mobile/dist/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/dist/components/RollupItem/getIconName.d.ts +1 -1
- package/mobile/dist/components/StepsBlock/renderStep.js +1 -1
- package/mobile/dist/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/dist/components/StepsBlock/renderStepMobile.js +1 -1
- package/mobile/dist/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
- package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/mobile/dist/components/TextBlock/TextBlock.js +2 -2
- package/mobile/dist/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/dist/content-page-repository/ContentPageRepository.js +2 -3
- package/mobile/dist/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/dist/icons/IconName.d.ts +218 -218
- package/mobile/dist/icons/IconName.js +217 -217
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/model/LinkProps.d.ts +3 -3
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/mobile/dist/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/dist/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js +14 -1
- package/mobile/dist/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js +1 -1
- package/mobile/lib/components/CreditCardForm/CreditCardFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js +9 -2
- package/mobile/lib/components/CreditCardForm/useCreditCardFormAPI.js.map +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js +1 -1
- package/mobile/lib/components/CreditForm/CreditFormStatusTracker.js.map +1 -1
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js +9 -2
- package/mobile/lib/components/CreditForm/useCreditFormAPI.js.map +1 -1
- package/mobile/lib/components/RollupItem/getIconName.d.ts +1 -1
- package/mobile/lib/components/StepsBlock/renderStep.js +1 -1
- package/mobile/lib/components/StepsBlock/renderStep.js.map +1 -1
- package/mobile/lib/components/StepsBlock/renderStepMobile.js +1 -1
- package/mobile/lib/components/StepsBlock/renderStepMobile.js.map +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
- package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
- package/mobile/lib/components/TextBlock/TextBlock.js +2 -2
- package/mobile/lib/components/TextBlock/TextBlock.js.map +1 -1
- package/mobile/lib/content-page-repository/ContentPageRepository.js +2 -3
- package/mobile/lib/content-page-repository/ContentPageRepository.js.map +1 -1
- package/mobile/lib/icons/IconName.d.ts +218 -218
- package/mobile/lib/icons/IconName.js +217 -217
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/model/LinkProps.d.ts +3 -3
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js +1 -1
- package/mobile/lib/ui-kit/Calculator/CalculatorStyle.js.map +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js +1 -1
- package/mobile/lib/ui-kit/DialogManager/Dialog.js.map +1 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js +14 -1
- package/mobile/lib/ui-kit/FormField/Fields/AddressFactField.js.map +1 -1
- package/mobile/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +1 -1
- package/mobile/src/components/CreditCardForm/useCreditCardFormAPI.tsx +10 -2
- package/mobile/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -1
- package/mobile/src/components/CreditForm/useCreditFormAPI.tsx +10 -2
- package/mobile/src/components/StepsBlock/renderStep.tsx +1 -5
- package/mobile/src/components/StepsBlock/renderStepMobile.tsx +1 -5
- package/mobile/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +1 -1
- package/mobile/src/components/TextBlock/TextBlock.tsx +2 -7
- package/mobile/src/content-page-repository/ContentPageRepository.ts +2 -3
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/model/LinkProps.ts +3 -3
- package/mobile/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
- package/mobile/src/ui-kit/DialogManager/Dialog.tsx +1 -5
- package/mobile/src/ui-kit/FormField/Fields/AddressFactField.tsx +14 -1
- package/package.json +5 -6
- package/src/components/CreditCardForm/CreditCardFormStatusTracker.tsx +1 -1
- package/src/components/CreditCardForm/useCreditCardFormAPI.tsx +10 -2
- package/src/components/CreditForm/CreditFormStatusTracker.tsx +1 -1
- package/src/components/CreditForm/useCreditFormAPI.tsx +10 -2
- package/src/components/StepsBlock/renderStep.tsx +1 -5
- package/src/components/StepsBlock/renderStepMobile.tsx +1 -5
- package/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +1 -1
- package/src/components/TextBlock/TextBlock.tsx +2 -7
- package/src/content-page-repository/ContentPageRepository.ts +2 -3
- package/src/icons/IconName.ts +5 -5
- package/src/model/LinkProps.ts +3 -3
- package/src/ui-kit/Calculator/CalculatorStyle.tsx +1 -1
- package/src/ui-kit/DialogManager/Dialog.tsx +1 -5
- package/src/ui-kit/FormField/Fields/AddressFactField.tsx +14 -1
|
@@ -24,6 +24,7 @@ export const useCreditCardFormAPI = ({
|
|
|
24
24
|
saveStep,
|
|
25
25
|
finishForm,
|
|
26
26
|
}: CreditCardFormApiProps) => {
|
|
27
|
+
const isFinalStep = step === 5;
|
|
27
28
|
const [taskId] = useLocalStorage<number>('taskId');
|
|
28
29
|
const [profileId] = useLocalStorage<number>('profileId');
|
|
29
30
|
const [participantId] = useLocalStorage<number>('participantId');
|
|
@@ -41,7 +42,7 @@ export const useCreditCardFormAPI = ({
|
|
|
41
42
|
|
|
42
43
|
try {
|
|
43
44
|
if (taskId && profileId && participantId) {
|
|
44
|
-
await updateUserTask(
|
|
45
|
+
const response = await updateUserTask(
|
|
45
46
|
getCreditCardFormTaskData({
|
|
46
47
|
participantId,
|
|
47
48
|
taskId,
|
|
@@ -50,6 +51,7 @@ export const useCreditCardFormAPI = ({
|
|
|
50
51
|
formData: formData as any,
|
|
51
52
|
}),
|
|
52
53
|
);
|
|
54
|
+
resetForm(isFinalStep, response);
|
|
53
55
|
}
|
|
54
56
|
} catch (ex) {
|
|
55
57
|
return 'Fail';
|
|
@@ -57,7 +59,7 @@ export const useCreditCardFormAPI = ({
|
|
|
57
59
|
|
|
58
60
|
onNextStep();
|
|
59
61
|
|
|
60
|
-
if (
|
|
62
|
+
if (isFinalStep) {
|
|
61
63
|
finishForm?.(true);
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -69,6 +71,12 @@ export const useCreditCardFormAPI = ({
|
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
|
|
74
|
+
const resetForm = (isFinalStep: boolean, response: Response) => {
|
|
75
|
+
if (isFinalStep && response.ok) {
|
|
76
|
+
globalThis.localStorage.removeItem('leadForm');
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
72
80
|
const getValue =
|
|
73
81
|
(formData: FormState): GetValue =>
|
|
74
82
|
(name) =>
|
|
@@ -24,6 +24,7 @@ export const useCreditFormAPI = ({
|
|
|
24
24
|
saveStep,
|
|
25
25
|
finishForm,
|
|
26
26
|
}: CreditFormApiProps) => {
|
|
27
|
+
const isFinalStep = step === 5;
|
|
27
28
|
const [taskId] = useLocalStorage<number>('taskId');
|
|
28
29
|
const [profileId] = useLocalStorage<number>('profileId');
|
|
29
30
|
const [participantId] = useLocalStorage<number>('participantId');
|
|
@@ -41,7 +42,7 @@ export const useCreditFormAPI = ({
|
|
|
41
42
|
|
|
42
43
|
try {
|
|
43
44
|
if (taskId && profileId && participantId) {
|
|
44
|
-
await updateUserTask(
|
|
45
|
+
const response = await updateUserTask(
|
|
45
46
|
getCreditFormTaskData({
|
|
46
47
|
participantId,
|
|
47
48
|
taskId,
|
|
@@ -50,6 +51,7 @@ export const useCreditFormAPI = ({
|
|
|
50
51
|
formData: formData as any,
|
|
51
52
|
}),
|
|
52
53
|
);
|
|
54
|
+
resetForm(isFinalStep, response);
|
|
53
55
|
}
|
|
54
56
|
} catch (ex) {
|
|
55
57
|
return 'Fail';
|
|
@@ -57,7 +59,7 @@ export const useCreditFormAPI = ({
|
|
|
57
59
|
|
|
58
60
|
onNextStep();
|
|
59
61
|
|
|
60
|
-
if (
|
|
62
|
+
if (isFinalStep) {
|
|
61
63
|
finishForm?.(true);
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -69,6 +71,12 @@ export const useCreditFormAPI = ({
|
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
|
|
74
|
+
const resetForm = (isFinalStep: boolean, response: Response) => {
|
|
75
|
+
if (isFinalStep && response.ok) {
|
|
76
|
+
globalThis.localStorage.removeItem('leadForm');
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
72
80
|
const getValue =
|
|
73
81
|
(formData: FormState): GetValue =>
|
|
74
82
|
(name) =>
|
|
@@ -40,11 +40,7 @@ export const renderStep =
|
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
{button?.text ? (
|
|
43
|
-
<LinkButton
|
|
44
|
-
className="box-border py-s w-full max-w-60 mt-auto"
|
|
45
|
-
version={version}
|
|
46
|
-
{...button}
|
|
47
|
-
>
|
|
43
|
+
<LinkButton className="box-border py-s w-full mt-auto" version={version} {...button}>
|
|
48
44
|
{button?.text}
|
|
49
45
|
</LinkButton>
|
|
50
46
|
) : null}
|
|
@@ -31,11 +31,7 @@ export const renderStepMobile =
|
|
|
31
31
|
>
|
|
32
32
|
{renderText(step)}
|
|
33
33
|
{button?.text ? (
|
|
34
|
-
<LinkButton
|
|
35
|
-
className="box-border py-s w-full max-w-60 mt-lg"
|
|
36
|
-
version={version}
|
|
37
|
-
{...button}
|
|
38
|
-
>
|
|
34
|
+
<LinkButton className="box-border py-s w-full mt-lg" version={version} {...button}>
|
|
39
35
|
{button?.text}
|
|
40
36
|
</LinkButton>
|
|
41
37
|
) : null}
|
|
@@ -15,7 +15,7 @@ export const StickyBottomMenuDialog = JSX<StickyBottomMenuDialogProps>(
|
|
|
15
15
|
({ className, head, children, onClose, onClick }) => (
|
|
16
16
|
<div
|
|
17
17
|
onClick={onClick}
|
|
18
|
-
className={style('relative
|
|
18
|
+
className={style('relative bg-white p-0 rounded-xl top-32', className)}
|
|
19
19
|
role="dialog"
|
|
20
20
|
>
|
|
21
21
|
<div className="sticky py-xl top-0 rounded-xl bg-white z-10">
|
|
@@ -12,10 +12,7 @@ export interface TextBlockProps extends TextBlockContent, UniBlockProps {}
|
|
|
12
12
|
export const TextBlock = JSX<TextBlockProps>(
|
|
13
13
|
({ className = '', title, description, iconVersion, __html, richVersion, ...rest }) => (
|
|
14
14
|
<BlockWrapper
|
|
15
|
-
className={style(
|
|
16
|
-
'flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10',
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
15
|
+
className={style('flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10', className)}
|
|
19
16
|
{...rest}
|
|
20
17
|
>
|
|
21
18
|
{iconVersion === 'small' ? renderIcon() : null}
|
|
@@ -37,9 +34,7 @@ export const TextBlock = JSX<TextBlockProps>(
|
|
|
37
34
|
);
|
|
38
35
|
|
|
39
36
|
const renderIcon = () => (
|
|
40
|
-
<div
|
|
41
|
-
className={`rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main`}
|
|
42
|
-
>
|
|
37
|
+
<div className="rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main">
|
|
43
38
|
i
|
|
44
39
|
</div>
|
|
45
40
|
);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import glob from 'glob';
|
|
2
|
+
import { glob } from 'glob';
|
|
3
3
|
import util from 'util';
|
|
4
4
|
import { type ContentPageDef } from '../model/ContentPageDef';
|
|
5
5
|
import { type TransformationOptions } from './TransformationOptions';
|
|
6
6
|
import { generatedPagePath, transformContentPage } from './transformContentPage';
|
|
7
7
|
|
|
8
|
-
const find = util.promisify(glob);
|
|
9
8
|
const readFile = util.promisify(fs.readFile);
|
|
10
9
|
|
|
11
10
|
export class ContentPageRepository {
|
|
@@ -19,7 +18,7 @@ export class ContentPageRepository {
|
|
|
19
18
|
) {}
|
|
20
19
|
|
|
21
20
|
listAllContentPages(): Promise<string[]> {
|
|
22
|
-
return
|
|
21
|
+
return glob(`${this.options.contentDir}/**/*.page.json`);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
async readPage(filePath: string): Promise<ContentPageDef> {
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
/* eslint-disable max-len, max-lines */
|
|
4
4
|
|
|
5
5
|
export const IconsWithoutInversion = new Set([
|
|
6
|
-
'
|
|
6
|
+
'SoundIcon', 'SignDocsIcon', 'ResponseOKIcon', 'ResponseFailIcon', 'RefreshIcon', 'PercentIcon', 'PassSendIcon', 'PackA4Icon', 'NewDocIcon', 'MoneyInsuranceIcon', 'MapOpenedIcon', 'MapMarkerSingleIcon', 'MapMarkerClusterYellowIcon', 'MapMarkerClusterIcon', 'MagnifierIcon', 'LogoIcon', 'HouseIcon', 'HeartIcon', 'HeadphonesIcon', 'GosUslugiIcon', 'FullScreenIcon', 'EuroIcon', 'DoneIcon', 'DollarIcon', 'ClientIcon', 'ChevronLeftIcon', 'ChartIcon', 'BelarusianFlag', 'AlarmIcon', 'ActualBalanceIcon'
|
|
7
7
|
]);
|
|
8
8
|
|
|
9
9
|
export enum IconMap {
|
|
10
|
-
|
|
10
|
+
YoutubeIcon = 'YoutubeIcon', WalletWithMoneyIcon = 'WalletWithMoneyIcon', WalletIcon = 'WalletIcon', WalletAddIcon = 'WalletAddIcon', VKIcon = 'VKIcon', UserTickIcon = 'UserTickIcon', UserSquareIcon = 'UserSquareIcon', UserGeoLocationIcon = 'UserGeoLocationIcon', TelegramIcon = 'TelegramIcon', StarIcon = 'StarIcon', SoundIcon = 'SoundIcon', SmallClockIcon = 'SmallClockIcon', SignDocsIcon = 'SignDocsIcon', ShieldTickIcon = 'ShieldTickIcon', SecurityСardIcon = 'SecurityСardIcon', SafeIcon = 'SafeIcon', RutubeIcon = 'RutubeIcon', RustoreIcon = 'RustoreIcon', RoundRubleIcon = 'RoundRubleIcon', ResponseOKIcon = 'ResponseOKIcon', ResponseFailIcon = 'ResponseFailIcon', RefreshIcon = 'RefreshIcon', ProfileIcon = 'ProfileIcon', Profile2UserIcon = 'Profile2UserIcon', PlusIcon = 'PlusIcon', PlusCircleIcon = 'PlusCircleIcon', PlayMarketIcon = 'PlayMarketIcon', PhoneIcon = 'PhoneIcon', PhoneCallingIcon = 'PhoneCallingIcon', PersonalCardIcon = 'PersonalCardIcon', PercentageRoundIcon = 'PercentageRoundIcon', PercentIcon = 'PercentIcon', PassSendIcon = 'PassSendIcon', PackA4Icon = 'PackA4Icon', OkIcon = 'OkIcon', NotificationBingIcon = 'NotificationBingIcon', NewDocIcon = 'NewDocIcon', MonitorMobileIcon = 'MonitorMobileIcon', MoneyInsuranceIcon = 'MoneyInsuranceIcon', MoneyIcon = 'MoneyIcon', MinusIcon = 'MinusIcon', MapOpenedIcon = 'MapOpenedIcon', MapMarkerSingleIcon = 'MapMarkerSingleIcon', MapMarkerClusterYellowIcon = 'MapMarkerClusterYellowIcon', MapMarkerClusterIcon = 'MapMarkerClusterIcon', MailIcon = 'MailIcon', MagnifierIcon = 'MagnifierIcon', LoupeIcon = 'LoupeIcon', LogoIcon = 'LogoIcon', LockIcon = 'LockIcon', InfoCircleIcon = 'InfoCircleIcon', HuaweiIcon = 'HuaweiIcon', HouseIcon = 'HouseIcon', HeartTickIcon = 'HeartTickIcon', HeartIcon = 'HeartIcon', HeadphonesIcon = 'HeadphonesIcon', GridIcon = 'GridIcon', GpsIcon = 'GpsIcon', GosUslugiIcon = 'GosUslugiIcon', GlobalIcon = 'GlobalIcon', GeolocationIcon = 'GeolocationIcon', FullScreenIcon = 'FullScreenIcon', FaxIcon = 'FaxIcon', EuroIcon = 'EuroIcon', EmptyWalletIcon = 'EmptyWalletIcon', EmptyWalletChangeIcon = 'EmptyWalletChangeIcon', DzenIcon = 'DzenIcon', DoneSimpleIcon = 'DoneSimpleIcon', DoneIcon = 'DoneIcon', DollarIcon = 'DollarIcon', DocIcon = 'DocIcon', DocDownloadIcon = 'DocDownloadIcon', DiscountShapeIcon = 'DiscountShapeIcon', DevIcon = 'DevIcon', CupIcon = 'CupIcon', CourtHouseIcon = 'CourtHouseIcon', CopyIcon = 'CopyIcon', ConvertCardIcon = 'ConvertCardIcon', CoinIcon = 'CoinIcon', CloseIcon = 'CloseIcon', ClientIcon = 'ClientIcon', ChineseYuanRenminbiIcon = 'ChineseYuanRenminbiIcon', ChevronLeftIcon = 'ChevronLeftIcon', ChartSquareIcon = 'ChartSquareIcon', ChartRoundIcon = 'ChartRoundIcon', ChartIcon = 'ChartIcon', CardTickIcon = 'CardTickIcon', CardSendIcon = 'CardSendIcon', CardPosIcon = 'CardPosIcon', CardIcon = 'CardIcon', CalendarTickIcon = 'CalendarTickIcon', CalendarIcon = 'CalendarIcon', CalendarCircleIcon = 'CalendarCircleIcon', BurgerIcon = 'BurgerIcon', BuildingIcon = 'BuildingIcon', BriefcaseIcon = 'BriefcaseIcon', BelarusianFlag = 'BelarusianFlag', BankIcon = 'BankIcon', AtmIcon = 'AtmIcon', ArrowUpSolidIcon = 'ArrowUpSolidIcon', ArrowUpIcon = 'ArrowUpIcon', ArrowTopRightIcon = 'ArrowTopRightIcon', ArrowRightIcon = 'ArrowRightIcon', ArrowLeftIcon = 'ArrowLeftIcon', ArrowDownSolidIcon = 'ArrowDownSolidIcon', ArrowDownIcon = 'ArrowDownIcon', AppleIcon = 'AppleIcon', AlarmIcon = 'AlarmIcon', ActualBalanceIcon = 'ActualBalanceIcon', AchievementIcon = 'AchievementIcon'
|
|
11
11
|
}
|
|
12
12
|
|
|
13
13
|
export enum IconTitleMap {
|
|
14
|
-
|
|
14
|
+
YoutubeIcon = 'Лого «Youtube»', WalletWithMoneyIcon = 'Кошелёк с деньгами', WalletIcon = 'Кошелёк', WalletAddIcon = 'Кошелёк с плюсом', VKIcon = 'Лого «VK»', UserTickIcon = 'Пользователь', UserSquareIcon = 'Пользователь в рамке', UserGeoLocationIcon = 'Самолётик', TelegramIcon = 'Лого «Telegram»', StarIcon = 'Звезда', SoundIcon = 'Кольцо', SmallClockIcon = 'Маленькие часы', SignDocsIcon = 'Подписанные документы', ShieldTickIcon = 'Безопасность', SecurityСardIcon = 'Безопасность', SafeIcon = 'Сейф', RutubeIcon = 'Лого «Rutube»', RustoreIcon = 'Лого «Rustore»', RoundRubleIcon = 'Рубль (круг.)', ResponseOKIcon = 'Ок', ResponseFailIcon = 'Ошибка', RefreshIcon = 'RefreshIcon', ProfileIcon = 'Профиль', Profile2UserIcon = 'Профиль, 2 персоны', PlusIcon = 'Плюс', PlusCircleIcon = 'Плюс в круге', PlayMarketIcon = 'Лого «PlayMarket»', PhoneIcon = 'Телефон', PhoneCallingIcon = 'Звонящий телефон', PersonalCardIcon = 'Персональная карта', PercentageRoundIcon = 'Проценты (круг.)', PercentIcon = 'PercentIcon', PassSendIcon = 'Бизнес', PackA4Icon = 'Пачка бумаги А4', OkIcon = 'Лого «Одноклассники»', NotificationBingIcon = 'Колокольчик нотификаций', NewDocIcon = 'Новый документ', MonitorMobileIcon = 'Монитор и мобильный', MoneyInsuranceIcon = 'Денежное страхование', MoneyIcon = 'Деньги', MinusIcon = 'Минус', MapOpenedIcon = 'Иконка Развёрнутая карта', MapMarkerSingleIcon = 'Маркер карты РСХБ', MapMarkerClusterYellowIcon = 'Маркер карты (желтый)', MapMarkerClusterIcon = 'Маркер карты', MailIcon = 'E-mail', MagnifierIcon = 'MagnifierIcon', LoupeIcon = 'Лупа', LogoIcon = 'Логотип', LockIcon = 'Замок', InfoCircleIcon = 'InfoCircleIcon', HuaweiIcon = 'Лого «Huawei»', HouseIcon = 'Ипотека', HeartTickIcon = 'Сердцебеение', HeartIcon = 'Сердце', HeadphonesIcon = 'HeadphonesIcon', GridIcon = 'Сетка (белая)', GpsIcon = 'Gps', GosUslugiIcon = 'ГосУслуги', GlobalIcon = 'Глобус', GeolocationIcon = 'Геолокация', FullScreenIcon = 'FullScreenIcon', FaxIcon = 'Факс', EuroIcon = 'Евро', EmptyWalletIcon = 'Пустой кошелёк', EmptyWalletChangeIcon = 'Пустой кошелёк с возвратом', DzenIcon = 'Лого «Дзен»', DoneSimpleIcon = 'Зелёная \'галочка\'', DoneIcon = 'Зелёная \'галочка\' в круге', DollarIcon = 'Доллар', DocIcon = 'Документ', DocDownloadIcon = 'Скачать документ', DiscountShapeIcon = 'Скидка', DevIcon = 'Разработка', CupIcon = 'Кубок', CourtHouseIcon = 'Здание суда', CopyIcon = 'Копирование', ConvertCardIcon = 'Конвертирование', CoinIcon = 'Монеты', CloseIcon = 'Крестик', ClientIcon = 'Клиент', ChineseYuanRenminbiIcon = 'Китайский юань', ChevronLeftIcon = 'Стрелка \'Влево\'', ChartSquareIcon = 'Деньги внутри кошелька', ChartRoundIcon = 'Диаграмма (в круге)', ChartIcon = 'Инвестиции', CardTickIcon = 'Кред. карта с галочкой', CardSendIcon = 'Карта', CardPosIcon = 'Кред. карта под наклоном', CardIcon = 'Кред. карта', CalendarTickIcon = 'Календарь с галочкой', CalendarIcon = 'Календарь', CalendarCircleIcon = 'Скруглённый календарь', BurgerIcon = 'Бургер', BuildingIcon = 'Здание с деревом', BriefcaseIcon = 'Портфель', BelarusianFlag = 'Белорусский флаг', BankIcon = 'Банк', AtmIcon = 'Банкомат', ArrowUpSolidIcon = 'Стрелка сплошная \'Вверх\'', ArrowUpIcon = 'Стрелка \'Вверх\'', ArrowTopRightIcon = 'Стрелка \'Вверх-право\'', ArrowRightIcon = 'Стрелка \'Вправо\'', ArrowLeftIcon = 'Стрелка \'Влево\'', ArrowDownSolidIcon = 'Стрелка сплошная \'Вниз\'', ArrowDownIcon = 'Стрелка \'Вниз\'', AppleIcon = 'Лого «Apple»', AlarmIcon = 'Предупреждение', ActualBalanceIcon = 'Деньги', AchievementIcon = 'Достижение'
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
/**
|
|
@@ -19,7 +19,7 @@ export enum IconTitleMap {
|
|
|
19
19
|
* @title Иконка
|
|
20
20
|
* @enumNames [
|
|
21
21
|
* "",
|
|
22
|
-
* '
|
|
22
|
+
* 'Лого «Youtube»', 'Кошелёк с деньгами', 'Кошелёк', 'Кошелёк с плюсом', 'Лого «VK»', 'Пользователь', 'Пользователь в рамке', 'Самолётик', 'Лого «Telegram»', 'Звезда', 'Кольцо', 'Маленькие часы', 'Подписанные документы', 'Безопасность', 'Безопасность', 'Сейф', 'Лого «Rutube»', 'Лого «Rustore»', 'Рубль (круг.)', 'Ок', 'Ошибка', 'RefreshIcon', 'Профиль', 'Профиль, 2 персоны', 'Плюс', 'Плюс в круге', 'Лого «PlayMarket»', 'Телефон', 'Звонящий телефон', 'Персональная карта', 'Проценты (круг.)', 'PercentIcon', 'Бизнес', 'Пачка бумаги А4', 'Лого «Одноклассники»', 'Колокольчик нотификаций', 'Новый документ', 'Монитор и мобильный', 'Денежное страхование', 'Деньги', 'Минус', 'Иконка Развёрнутая карта', 'Маркер карты РСХБ', 'Маркер карты (желтый)', 'Маркер карты', 'E-mail', 'MagnifierIcon', 'Лупа', 'Логотип', 'Замок', 'InfoCircleIcon', 'Лого «Huawei»', 'Ипотека', 'Сердцебеение', 'Сердце', 'HeadphonesIcon', 'Сетка (белая)', 'Gps', 'ГосУслуги', 'Глобус', 'Геолокация', 'FullScreenIcon', 'Факс', 'Евро', 'Пустой кошелёк', 'Пустой кошелёк с возвратом', 'Лого «Дзен»', 'Зелёная \'галочка\'', 'Зелёная \'галочка\' в круге', 'Доллар', 'Документ', 'Скачать документ', 'Скидка', 'Разработка', 'Кубок', 'Здание суда', 'Копирование', 'Конвертирование', 'Монеты', 'Крестик', 'Клиент', 'Китайский юань', 'Стрелка \'Влево\'', 'Деньги внутри кошелька', 'Диаграмма (в круге)', 'Инвестиции', 'Кред. карта с галочкой', 'Карта', 'Кред. карта под наклоном', 'Кред. карта', 'Календарь с галочкой', 'Календарь', 'Скруглённый календарь', 'Бургер', 'Здание с деревом', 'Портфель', 'Белорусский флаг', 'Банк', 'Банкомат', 'Стрелка сплошная \'Вверх\'', 'Стрелка \'Вверх\'', 'Стрелка \'Вверх-право\'', 'Стрелка \'Вправо\'', 'Стрелка \'Влево\'', 'Стрелка сплошная \'Вниз\'', 'Стрелка \'Вниз\'', 'Лого «Apple»', 'Предупреждение', 'Деньги', 'Достижение'
|
|
23
23
|
* ]
|
|
24
24
|
*/
|
|
25
|
-
export type IconName = '' | '
|
|
25
|
+
export type IconName = '' | 'YoutubeIcon' | 'WalletWithMoneyIcon' | 'WalletIcon' | 'WalletAddIcon' | 'VKIcon' | 'UserTickIcon' | 'UserSquareIcon' | 'UserGeoLocationIcon' | 'TelegramIcon' | 'StarIcon' | 'SoundIcon' | 'SmallClockIcon' | 'SignDocsIcon' | 'ShieldTickIcon' | 'SecurityСardIcon' | 'SafeIcon' | 'RutubeIcon' | 'RustoreIcon' | 'RoundRubleIcon' | 'ResponseOKIcon' | 'ResponseFailIcon' | 'RefreshIcon' | 'ProfileIcon' | 'Profile2UserIcon' | 'PlusIcon' | 'PlusCircleIcon' | 'PlayMarketIcon' | 'PhoneIcon' | 'PhoneCallingIcon' | 'PersonalCardIcon' | 'PercentageRoundIcon' | 'PercentIcon' | 'PassSendIcon' | 'PackA4Icon' | 'OkIcon' | 'NotificationBingIcon' | 'NewDocIcon' | 'MonitorMobileIcon' | 'MoneyInsuranceIcon' | 'MoneyIcon' | 'MinusIcon' | 'MapOpenedIcon' | 'MapMarkerSingleIcon' | 'MapMarkerClusterYellowIcon' | 'MapMarkerClusterIcon' | 'MailIcon' | 'MagnifierIcon' | 'LoupeIcon' | 'LogoIcon' | 'LockIcon' | 'InfoCircleIcon' | 'HuaweiIcon' | 'HouseIcon' | 'HeartTickIcon' | 'HeartIcon' | 'HeadphonesIcon' | 'GridIcon' | 'GpsIcon' | 'GosUslugiIcon' | 'GlobalIcon' | 'GeolocationIcon' | 'FullScreenIcon' | 'FaxIcon' | 'EuroIcon' | 'EmptyWalletIcon' | 'EmptyWalletChangeIcon' | 'DzenIcon' | 'DoneSimpleIcon' | 'DoneIcon' | 'DollarIcon' | 'DocIcon' | 'DocDownloadIcon' | 'DiscountShapeIcon' | 'DevIcon' | 'CupIcon' | 'CourtHouseIcon' | 'CopyIcon' | 'ConvertCardIcon' | 'CoinIcon' | 'CloseIcon' | 'ClientIcon' | 'ChineseYuanRenminbiIcon' | 'ChevronLeftIcon' | 'ChartSquareIcon' | 'ChartRoundIcon' | 'ChartIcon' | 'CardTickIcon' | 'CardSendIcon' | 'CardPosIcon' | 'CardIcon' | 'CalendarTickIcon' | 'CalendarIcon' | 'CalendarCircleIcon' | 'BurgerIcon' | 'BuildingIcon' | 'BriefcaseIcon' | 'BelarusianFlag' | 'BankIcon' | 'AtmIcon' | 'ArrowUpSolidIcon' | 'ArrowUpIcon' | 'ArrowTopRightIcon' | 'ArrowRightIcon' | 'ArrowLeftIcon' | 'ArrowDownSolidIcon' | 'ArrowDownIcon' | 'AppleIcon' | 'AlarmIcon' | 'ActualBalanceIcon' | 'AchievementIcon';
|
|
@@ -5,10 +5,10 @@ import { type TextProps } from './HeadlineType';
|
|
|
5
5
|
* @title Таргет (target)
|
|
6
6
|
* @enumNames [
|
|
7
7
|
* "",
|
|
8
|
-
* "self (
|
|
9
|
-
* "blank (
|
|
8
|
+
* "self (текущая вкладка или фрейм)",
|
|
9
|
+
* "blank (новая вкладка)",
|
|
10
10
|
* "parent (фрейм-родитель)",
|
|
11
|
-
* "top (
|
|
11
|
+
* "top (текущая вкладка)"
|
|
12
12
|
* ]
|
|
13
13
|
*/
|
|
14
14
|
export type Target = '' | '_self' | '_blank' | '_parent' | '_top';
|
|
@@ -12,11 +12,7 @@ export interface DialogProps {
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const Dialog = JSX<DialogProps>(({ className, head, children, onClose, onClick }) => (
|
|
15
|
-
<div
|
|
16
|
-
className={style('relative min-h-full bg-white pt-0 p-lg', className)}
|
|
17
|
-
role="dialog"
|
|
18
|
-
onClick={onClick}
|
|
19
|
-
>
|
|
15
|
+
<div className={style('relative bg-white pt-0 p-lg', className)} role="dialog" onClick={onClick}>
|
|
20
16
|
<div className="sticky py-xl top-0 bg-white z-10">
|
|
21
17
|
<CloseButton className="absolute top-0 right-0" onClose={onClose} />
|
|
22
18
|
<div className="container">{head}</div>
|
|
@@ -39,8 +39,21 @@ export const AddressFactField = JSX<CustomFieldProps>(({ field, input }) => {
|
|
|
39
39
|
|
|
40
40
|
const onChange = useCallback((val: string) => {
|
|
41
41
|
field?.(fieldName)?.onChange?.({
|
|
42
|
-
|
|
42
|
+
apartment: '',
|
|
43
|
+
city: '',
|
|
44
|
+
district: '',
|
|
43
45
|
fullAddress: val,
|
|
46
|
+
fiasCode: '',
|
|
47
|
+
house: '',
|
|
48
|
+
locality: '',
|
|
49
|
+
okatoRegionCode: '',
|
|
50
|
+
postcode: '',
|
|
51
|
+
region: '',
|
|
52
|
+
regionCode: '',
|
|
53
|
+
street: '',
|
|
54
|
+
qc: '',
|
|
55
|
+
qcComplete: '',
|
|
56
|
+
qcHouse: '',
|
|
44
57
|
});
|
|
45
58
|
}, []);
|
|
46
59
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@redneckz/wildless-cms-uni-blocks",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.697",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ЦК",
|
|
@@ -140,9 +140,9 @@
|
|
|
140
140
|
"@redneckz/json-op": "^0.0.12",
|
|
141
141
|
"@redneckz/json-ref": "^0.0.14",
|
|
142
142
|
"@redneckz/uni-jsx": "^2.6.4",
|
|
143
|
-
"@tailwindcss/container-queries": "^0.1.
|
|
143
|
+
"@tailwindcss/container-queries": "^0.1.1",
|
|
144
144
|
"@types/json-schema": "^7.0.11",
|
|
145
|
-
"glob": "^
|
|
145
|
+
"glob": "^11.0.0",
|
|
146
146
|
"rehype-parse": "^8.0.4",
|
|
147
147
|
"rehype-sanitize": "^5.0.1",
|
|
148
148
|
"rehype-stringify": "^9.0.3",
|
|
@@ -162,7 +162,6 @@
|
|
|
162
162
|
"@testing-library/react": "^16.0.0",
|
|
163
163
|
"@types/glob": "^8.0.0",
|
|
164
164
|
"@types/jest": "^29.5.12",
|
|
165
|
-
"@types/sharp": "^0.32.0",
|
|
166
165
|
"@types/yandex-maps": "^2.1.27",
|
|
167
166
|
"@typescript-eslint/eslint-plugin": "^5.59.6",
|
|
168
167
|
"@typescript-eslint/experimental-utils": "^5.59.6",
|
|
@@ -192,13 +191,13 @@
|
|
|
192
191
|
"react-cosmos": "^6.1.1",
|
|
193
192
|
"react-cosmos-plugin-webpack": "^6.1.1",
|
|
194
193
|
"replace-in-file": "^6.3.5",
|
|
195
|
-
"rimraf": "^
|
|
194
|
+
"rimraf": "^6.0.1",
|
|
196
195
|
"rollup": "^2.75.6",
|
|
197
196
|
"rollup-plugin-terser": "^7.0.2",
|
|
198
197
|
"size-limit": "^7.0.8",
|
|
199
198
|
"style-loader": "^3.3.1",
|
|
200
199
|
"svgo": "^2.8.0",
|
|
201
|
-
"tailwindcss": "^3.
|
|
200
|
+
"tailwindcss": "^3.4.4",
|
|
202
201
|
"ts-jest": "^29.1.5",
|
|
203
202
|
"ts-json-schema-generator": "^1.1.2",
|
|
204
203
|
"ts-loader": "^9.3.0",
|
|
@@ -24,6 +24,7 @@ export const useCreditCardFormAPI = ({
|
|
|
24
24
|
saveStep,
|
|
25
25
|
finishForm,
|
|
26
26
|
}: CreditCardFormApiProps) => {
|
|
27
|
+
const isFinalStep = step === 5;
|
|
27
28
|
const [taskId] = useLocalStorage<number>('taskId');
|
|
28
29
|
const [profileId] = useLocalStorage<number>('profileId');
|
|
29
30
|
const [participantId] = useLocalStorage<number>('participantId');
|
|
@@ -41,7 +42,7 @@ export const useCreditCardFormAPI = ({
|
|
|
41
42
|
|
|
42
43
|
try {
|
|
43
44
|
if (taskId && profileId && participantId) {
|
|
44
|
-
await updateUserTask(
|
|
45
|
+
const response = await updateUserTask(
|
|
45
46
|
getCreditCardFormTaskData({
|
|
46
47
|
participantId,
|
|
47
48
|
taskId,
|
|
@@ -50,6 +51,7 @@ export const useCreditCardFormAPI = ({
|
|
|
50
51
|
formData: formData as any,
|
|
51
52
|
}),
|
|
52
53
|
);
|
|
54
|
+
resetForm(isFinalStep, response);
|
|
53
55
|
}
|
|
54
56
|
} catch (ex) {
|
|
55
57
|
return 'Fail';
|
|
@@ -57,7 +59,7 @@ export const useCreditCardFormAPI = ({
|
|
|
57
59
|
|
|
58
60
|
onNextStep();
|
|
59
61
|
|
|
60
|
-
if (
|
|
62
|
+
if (isFinalStep) {
|
|
61
63
|
finishForm?.(true);
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -69,6 +71,12 @@ export const useCreditCardFormAPI = ({
|
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
|
|
74
|
+
const resetForm = (isFinalStep: boolean, response: Response) => {
|
|
75
|
+
if (isFinalStep && response.ok) {
|
|
76
|
+
globalThis.localStorage.removeItem('leadForm');
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
72
80
|
const getValue =
|
|
73
81
|
(formData: FormState): GetValue =>
|
|
74
82
|
(name) =>
|
|
@@ -24,6 +24,7 @@ export const useCreditFormAPI = ({
|
|
|
24
24
|
saveStep,
|
|
25
25
|
finishForm,
|
|
26
26
|
}: CreditFormApiProps) => {
|
|
27
|
+
const isFinalStep = step === 5;
|
|
27
28
|
const [taskId] = useLocalStorage<number>('taskId');
|
|
28
29
|
const [profileId] = useLocalStorage<number>('profileId');
|
|
29
30
|
const [participantId] = useLocalStorage<number>('participantId');
|
|
@@ -41,7 +42,7 @@ export const useCreditFormAPI = ({
|
|
|
41
42
|
|
|
42
43
|
try {
|
|
43
44
|
if (taskId && profileId && participantId) {
|
|
44
|
-
await updateUserTask(
|
|
45
|
+
const response = await updateUserTask(
|
|
45
46
|
getCreditFormTaskData({
|
|
46
47
|
participantId,
|
|
47
48
|
taskId,
|
|
@@ -50,6 +51,7 @@ export const useCreditFormAPI = ({
|
|
|
50
51
|
formData: formData as any,
|
|
51
52
|
}),
|
|
52
53
|
);
|
|
54
|
+
resetForm(isFinalStep, response);
|
|
53
55
|
}
|
|
54
56
|
} catch (ex) {
|
|
55
57
|
return 'Fail';
|
|
@@ -57,7 +59,7 @@ export const useCreditFormAPI = ({
|
|
|
57
59
|
|
|
58
60
|
onNextStep();
|
|
59
61
|
|
|
60
|
-
if (
|
|
62
|
+
if (isFinalStep) {
|
|
61
63
|
finishForm?.(true);
|
|
62
64
|
}
|
|
63
65
|
|
|
@@ -69,6 +71,12 @@ export const useCreditFormAPI = ({
|
|
|
69
71
|
};
|
|
70
72
|
};
|
|
71
73
|
|
|
74
|
+
const resetForm = (isFinalStep: boolean, response: Response) => {
|
|
75
|
+
if (isFinalStep && response.ok) {
|
|
76
|
+
globalThis.localStorage.removeItem('leadForm');
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
|
|
72
80
|
const getValue =
|
|
73
81
|
(formData: FormState): GetValue =>
|
|
74
82
|
(name) =>
|
|
@@ -40,11 +40,7 @@ export const renderStep =
|
|
|
40
40
|
</div>
|
|
41
41
|
</div>
|
|
42
42
|
{button?.text ? (
|
|
43
|
-
<LinkButton
|
|
44
|
-
className="box-border py-s w-full max-w-60 mt-auto"
|
|
45
|
-
version={version}
|
|
46
|
-
{...button}
|
|
47
|
-
>
|
|
43
|
+
<LinkButton className="box-border py-s w-full mt-auto" version={version} {...button}>
|
|
48
44
|
{button?.text}
|
|
49
45
|
</LinkButton>
|
|
50
46
|
) : null}
|
|
@@ -31,11 +31,7 @@ export const renderStepMobile =
|
|
|
31
31
|
>
|
|
32
32
|
{renderText(step)}
|
|
33
33
|
{button?.text ? (
|
|
34
|
-
<LinkButton
|
|
35
|
-
className="box-border py-s w-full max-w-60 mt-lg"
|
|
36
|
-
version={version}
|
|
37
|
-
{...button}
|
|
38
|
-
>
|
|
34
|
+
<LinkButton className="box-border py-s w-full mt-lg" version={version} {...button}>
|
|
39
35
|
{button?.text}
|
|
40
36
|
</LinkButton>
|
|
41
37
|
) : null}
|
|
@@ -15,7 +15,7 @@ export const StickyBottomMenuDialog = JSX<StickyBottomMenuDialogProps>(
|
|
|
15
15
|
({ className, head, children, onClose, onClick }) => (
|
|
16
16
|
<div
|
|
17
17
|
onClick={onClick}
|
|
18
|
-
className={style('relative
|
|
18
|
+
className={style('relative bg-white p-0 rounded-xl top-32', className)}
|
|
19
19
|
role="dialog"
|
|
20
20
|
>
|
|
21
21
|
<div className="sticky py-xl top-0 rounded-xl bg-white z-10">
|
|
@@ -12,10 +12,7 @@ export interface TextBlockProps extends TextBlockContent, UniBlockProps {}
|
|
|
12
12
|
export const TextBlock = JSX<TextBlockProps>(
|
|
13
13
|
({ className = '', title, description, iconVersion, __html, richVersion, ...rest }) => (
|
|
14
14
|
<BlockWrapper
|
|
15
|
-
className={style(
|
|
16
|
-
'flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10',
|
|
17
|
-
className,
|
|
18
|
-
)}
|
|
15
|
+
className={style('flex gap-s sm:gap-m group-data-secondary:bg-primary-main/10', className)}
|
|
19
16
|
{...rest}
|
|
20
17
|
>
|
|
21
18
|
{iconVersion === 'small' ? renderIcon() : null}
|
|
@@ -37,9 +34,7 @@ export const TextBlock = JSX<TextBlockProps>(
|
|
|
37
34
|
);
|
|
38
35
|
|
|
39
36
|
const renderIcon = () => (
|
|
40
|
-
<div
|
|
41
|
-
className={`rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main`}
|
|
42
|
-
>
|
|
37
|
+
<div className="rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main">
|
|
43
38
|
i
|
|
44
39
|
</div>
|
|
45
40
|
);
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
|
-
import glob from 'glob';
|
|
2
|
+
import { glob } from 'glob';
|
|
3
3
|
import util from 'util';
|
|
4
4
|
import { type ContentPageDef } from '../model/ContentPageDef';
|
|
5
5
|
import { type TransformationOptions } from './TransformationOptions';
|
|
6
6
|
import { generatedPagePath, transformContentPage } from './transformContentPage';
|
|
7
7
|
|
|
8
|
-
const find = util.promisify(glob);
|
|
9
8
|
const readFile = util.promisify(fs.readFile);
|
|
10
9
|
|
|
11
10
|
export class ContentPageRepository {
|
|
@@ -19,7 +18,7 @@ export class ContentPageRepository {
|
|
|
19
18
|
) {}
|
|
20
19
|
|
|
21
20
|
listAllContentPages(): Promise<string[]> {
|
|
22
|
-
return
|
|
21
|
+
return glob(`${this.options.contentDir}/**/*.page.json`);
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
async readPage(filePath: string): Promise<ContentPageDef> {
|