@redneckz/wildless-cms-uni-blocks 0.14.872 → 0.14.874

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/bundle/bundle.umd.js +31 -2
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +6 -0
  4. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +14 -1
  5. package/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  6. package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
  7. package/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  8. package/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +6 -0
  9. package/dist/retail/components/NoConsentDialog/NoConsentDialog.js +27 -0
  10. package/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -0
  11. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +14 -1
  12. package/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  13. package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
  14. package/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  15. package/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +6 -0
  16. package/lib/retail/components/NoConsentDialog/NoConsentDialog.fixture.d.ts +5 -0
  17. package/lib/retail/components/NoConsentDialog/NoConsentDialog.js +25 -0
  18. package/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -0
  19. package/mobile/bundle/bundle.umd.js +32 -3
  20. package/mobile/bundle/bundle.umd.min.js +1 -1
  21. package/mobile/bundle/retail/components/NoConsentDialog/NoConsentDialog.d.ts +6 -0
  22. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js +14 -1
  23. package/mobile/dist/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  24. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
  25. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  26. package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.d.ts +6 -0
  27. package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js +27 -0
  28. package/mobile/dist/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -0
  29. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js +14 -1
  30. package/mobile/lib/components/ApplicationLeadForm/ApplicationLeadForm.js.map +1 -1
  31. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js +1 -1
  32. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenuDialog.js.map +1 -1
  33. package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.d.ts +6 -0
  34. package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js +25 -0
  35. package/mobile/lib/retail/components/NoConsentDialog/NoConsentDialog.js.map +1 -0
  36. package/mobile/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +16 -1
  37. package/mobile/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +1 -1
  38. package/mobile/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +55 -0
  39. package/package.json +1 -1
  40. package/src/components/ApplicationLeadForm/ApplicationLeadForm.tsx +16 -1
  41. package/src/components/StickyBottomMenu/StickyBottomMenuDialog.tsx +1 -1
  42. package/src/icons/IconName.ts +4 -4
  43. package/src/retail/components/NoConsentDialog/NoConsentDialog.fixture.tsx +7 -0
  44. package/src/retail/components/NoConsentDialog/NoConsentDialog.tsx +55 -0
@@ -0,0 +1,55 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
3
+ import type { OnCloseProps } from '../../../model/OnCloseProps';
4
+
5
+ import { locationNavigator } from '../../../external/locationNavigator';
6
+ import { Button } from '../../../ui-kit/Button/Button';
7
+ import { Dialog } from '../../../ui-kit/DialogManager/Dialog';
8
+ import { Paragraph } from '../../../ui-kit/Paragraph/Paragraph';
9
+ import { noop } from '../../../utils/noop';
10
+
11
+ export interface NoConsentDialogProps extends OnCloseProps {
12
+ attempts: number;
13
+ onSubmit?: (confirmStatus: string) => void;
14
+ }
15
+
16
+ export const NoConsentDialog = JSX<NoConsentDialogProps>(({ attempts, onClose = noop }) => {
17
+ const navigator = locationNavigator();
18
+ const isMaxAttempts = attempts > 1;
19
+
20
+ const returnToMainPage = useCallback(() => {
21
+ navigator.assign('/natural');
22
+ }, []);
23
+
24
+ const handleClose = useCallback(() => {
25
+ if (isMaxAttempts) {
26
+ returnToMainPage();
27
+ } else {
28
+ onClose();
29
+ }
30
+ }, [isMaxAttempts]);
31
+
32
+ return (
33
+ <Dialog
34
+ className="my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg px-5xl"
35
+ onClose={handleClose}
36
+ >
37
+ <div className="flex flex-col gap-xl items-center">
38
+ <Paragraph align="text-center">Уважаемый клиент!</Paragraph>
39
+ <Paragraph align="text-center">
40
+ Для получения кредита Вам необходимо обратиться в офис Банка
41
+ </Paragraph>
42
+ <div className="flex flex-col sm:flex-row gap-xl items-center">
43
+ <Button type="button" version="secondary" onClick={returnToMainPage}>
44
+ Завершить
45
+ </Button>
46
+ {isMaxAttempts ? null : (
47
+ <Button type="button" onClick={onClose}>
48
+ Продолжить
49
+ </Button>
50
+ )}
51
+ </div>
52
+ </div>
53
+ </Dialog>
54
+ );
55
+ });