@redneckz/wildless-cms-uni-blocks 0.14.2 → 0.14.4

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 (226) hide show
  1. package/bin/migration-scripts/0.14.4.js +37 -0
  2. package/bundle/blocks.schema.json +1 -1
  3. package/bundle/bundle.umd.js +55 -42
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/bundle/components/Calculator/CalculatorContent.d.ts +27 -1
  6. package/bundle/components/Calculator/useBonusCalculatorParams.d.ts +1 -1
  7. package/bundle/model/EmptyOptionType.d.ts +1 -1
  8. package/bundle/ui-kit/ClientOnly.d.ts +1 -0
  9. package/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -0
  10. package/bundle/ui-kit/SwipeListControl/isShowDots.d.ts +1 -0
  11. package/bundle/ui-kit/SwipeListControl/isShowDots.mobile.d.ts +1 -0
  12. package/dist/components/Calculator/BonusCalculatorForm.js +1 -1
  13. package/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  14. package/dist/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
  15. package/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  16. package/dist/components/Calculator/Calculator.js +16 -4
  17. package/dist/components/Calculator/Calculator.js.map +1 -1
  18. package/dist/components/Calculator/CalculatorContent.d.ts +27 -1
  19. package/dist/components/Calculator/CreditCalculatorForm.js +6 -6
  20. package/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  21. package/dist/components/Calculator/DepositCalculatorForm.js +8 -8
  22. package/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  23. package/dist/components/Calculator/useBonusCalculatorParams.d.ts +1 -1
  24. package/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  25. package/dist/components/Carousel/Carousel.js +1 -1
  26. package/dist/components/Carousel/Carousel.js.map +1 -1
  27. package/dist/components/ContentPage/ContentPage.js +1 -1
  28. package/dist/components/ContentPage/ContentPage.js.map +1 -1
  29. package/dist/components/Footer/Contacts.js +1 -1
  30. package/dist/components/OfficesAtmsMap/OfficesAtmsMap.js +4 -9
  31. package/dist/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
  32. package/dist/components/StickyBottomMenu/RenderMenuItems.js +1 -2
  33. package/dist/components/StickyBottomMenu/RenderMenuItems.js.map +1 -1
  34. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js +2 -2
  35. package/dist/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  36. package/dist/content-page-repository/transformHTML.js +32 -2
  37. package/dist/content-page-repository/transformHTML.js.map +1 -1
  38. package/dist/model/EmptyOptionType.d.ts +1 -1
  39. package/dist/ui-kit/ClientOnly.d.ts +1 -0
  40. package/dist/ui-kit/ClientOnly.js +7 -0
  41. package/dist/ui-kit/ClientOnly.js.map +1 -0
  42. package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -1
  43. package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  44. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -0
  45. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -2
  46. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  47. package/dist/ui-kit/SwipeListControl/isShowDots.d.ts +1 -0
  48. package/dist/ui-kit/SwipeListControl/isShowDots.js +4 -0
  49. package/dist/ui-kit/SwipeListControl/isShowDots.js.map +1 -0
  50. package/dist/ui-kit/SwipeListControl/isShowDots.mobile.d.ts +1 -0
  51. package/dist/ui-kit/SwipeListControl/isShowDots.mobile.js +4 -0
  52. package/dist/ui-kit/SwipeListControl/isShowDots.mobile.js.map +1 -0
  53. package/lib/components/Calculator/BonusCalculatorForm.js +1 -1
  54. package/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  55. package/lib/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
  56. package/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  57. package/lib/components/Calculator/Calculator.js +16 -4
  58. package/lib/components/Calculator/Calculator.js.map +1 -1
  59. package/lib/components/Calculator/CalculatorContent.d.ts +27 -1
  60. package/lib/components/Calculator/CreditCalculatorForm.js +6 -6
  61. package/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  62. package/lib/components/Calculator/DepositCalculatorForm.js +8 -8
  63. package/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  64. package/lib/components/Calculator/useBonusCalculatorParams.d.ts +1 -1
  65. package/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  66. package/lib/components/Carousel/Carousel.js +1 -1
  67. package/lib/components/Carousel/Carousel.js.map +1 -1
  68. package/lib/components/ContentPage/ContentPage.js +1 -1
  69. package/lib/components/ContentPage/ContentPage.js.map +1 -1
  70. package/lib/components/Footer/Contacts.js +1 -1
  71. package/lib/components/OfficesAtmsMap/OfficesAtmsMap.js +4 -9
  72. package/lib/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
  73. package/lib/components/StickyBottomMenu/RenderMenuItems.js +1 -2
  74. package/lib/components/StickyBottomMenu/RenderMenuItems.js.map +1 -1
  75. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js +3 -3
  76. package/lib/components/StickyBottomMenu/StickyBottomMenu.mobile.js.map +1 -1
  77. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.fixture.d.ts +1 -0
  78. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.fixture.mobile.d.ts +8 -0
  79. package/lib/content-page-repository/transformHTML.js +9 -2
  80. package/lib/content-page-repository/transformHTML.js.map +1 -1
  81. package/lib/model/EmptyOptionType.d.ts +1 -1
  82. package/lib/ui-kit/ClientOnly.d.ts +1 -0
  83. package/lib/ui-kit/ClientOnly.js +5 -0
  84. package/lib/ui-kit/ClientOnly.js.map +1 -0
  85. package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -1
  86. package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  87. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -0
  88. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -2
  89. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  90. package/lib/ui-kit/SwipeListControl/isShowDots.d.ts +1 -0
  91. package/lib/ui-kit/SwipeListControl/isShowDots.js +2 -0
  92. package/lib/ui-kit/SwipeListControl/isShowDots.js.map +1 -0
  93. package/lib/ui-kit/SwipeListControl/isShowDots.mobile.d.ts +1 -0
  94. package/lib/ui-kit/SwipeListControl/isShowDots.mobile.js +2 -0
  95. package/lib/ui-kit/SwipeListControl/isShowDots.mobile.js.map +1 -0
  96. package/mobile/bundle/bundle.umd.js +52 -50
  97. package/mobile/bundle/bundle.umd.min.js +1 -1
  98. package/mobile/bundle/components/Calculator/CalculatorContent.d.ts +27 -1
  99. package/mobile/bundle/components/Calculator/useBonusCalculatorParams.d.ts +1 -1
  100. package/mobile/bundle/model/EmptyOptionType.d.ts +1 -1
  101. package/mobile/bundle/ui-kit/ClientOnly.d.ts +1 -0
  102. package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -0
  103. package/mobile/bundle/ui-kit/SwipeListControl/isShowDots.d.ts +1 -0
  104. package/mobile/dist/components/Calculator/BonusCalculatorForm.js +1 -1
  105. package/mobile/dist/components/Calculator/BonusCalculatorForm.js.map +1 -1
  106. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
  107. package/mobile/dist/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  108. package/mobile/dist/components/Calculator/CalculatorContent.d.ts +27 -1
  109. package/mobile/dist/components/Calculator/CreditCalculatorForm.js +6 -6
  110. package/mobile/dist/components/Calculator/CreditCalculatorForm.js.map +1 -1
  111. package/mobile/dist/components/Calculator/DepositCalculatorForm.js +8 -8
  112. package/mobile/dist/components/Calculator/DepositCalculatorForm.js.map +1 -1
  113. package/mobile/dist/components/Calculator/useBonusCalculatorParams.d.ts +1 -1
  114. package/mobile/dist/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  115. package/mobile/dist/components/Carousel/Carousel.js +1 -1
  116. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  117. package/mobile/dist/components/ContentPage/ContentPage.js +1 -1
  118. package/mobile/dist/components/ContentPage/ContentPage.js.map +1 -1
  119. package/mobile/dist/components/Footer/Contacts.js +1 -1
  120. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMap.js +4 -9
  121. package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
  122. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js +1 -2
  123. package/mobile/dist/components/StickyBottomMenu/RenderMenuItems.js.map +1 -1
  124. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js +2 -2
  125. package/mobile/dist/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  126. package/mobile/dist/content-page-repository/transformHTML.js +32 -2
  127. package/mobile/dist/content-page-repository/transformHTML.js.map +1 -1
  128. package/mobile/dist/model/EmptyOptionType.d.ts +1 -1
  129. package/mobile/dist/ui-kit/ClientOnly.d.ts +1 -0
  130. package/mobile/dist/ui-kit/ClientOnly.js +7 -0
  131. package/mobile/dist/ui-kit/ClientOnly.js.map +1 -0
  132. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -1
  133. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  134. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -0
  135. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -2
  136. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  137. package/mobile/dist/ui-kit/SwipeListControl/isShowDots.d.ts +1 -0
  138. package/mobile/dist/ui-kit/SwipeListControl/isShowDots.js +4 -0
  139. package/mobile/dist/ui-kit/SwipeListControl/isShowDots.js.map +1 -0
  140. package/mobile/lib/components/Calculator/BonusCalculatorForm.js +1 -1
  141. package/mobile/lib/components/Calculator/BonusCalculatorForm.js.map +1 -1
  142. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js +2 -2
  143. package/mobile/lib/components/Calculator/BusinessDepositCalculatorForm.js.map +1 -1
  144. package/mobile/lib/components/Calculator/CalculatorContent.d.ts +27 -1
  145. package/mobile/lib/components/Calculator/CreditCalculatorForm.js +6 -6
  146. package/mobile/lib/components/Calculator/CreditCalculatorForm.js.map +1 -1
  147. package/mobile/lib/components/Calculator/DepositCalculatorForm.js +8 -8
  148. package/mobile/lib/components/Calculator/DepositCalculatorForm.js.map +1 -1
  149. package/mobile/lib/components/Calculator/useBonusCalculatorParams.d.ts +1 -1
  150. package/mobile/lib/components/Calculator/useBonusCalculatorParams.js.map +1 -1
  151. package/mobile/lib/components/Carousel/Carousel.js +1 -1
  152. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  153. package/mobile/lib/components/ContentPage/ContentPage.js +1 -1
  154. package/mobile/lib/components/ContentPage/ContentPage.js.map +1 -1
  155. package/mobile/lib/components/Footer/Contacts.js +1 -1
  156. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMap.js +4 -9
  157. package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMap.js.map +1 -1
  158. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js +1 -2
  159. package/mobile/lib/components/StickyBottomMenu/RenderMenuItems.js.map +1 -1
  160. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js +3 -3
  161. package/mobile/lib/components/StickyBottomMenu/StickyBottomMenu.js.map +1 -1
  162. package/mobile/lib/content-page-repository/transformHTML.js +9 -2
  163. package/mobile/lib/content-page-repository/transformHTML.js.map +1 -1
  164. package/mobile/lib/model/EmptyOptionType.d.ts +1 -1
  165. package/mobile/lib/ui-kit/ClientOnly.d.ts +1 -0
  166. package/mobile/lib/ui-kit/ClientOnly.js +5 -0
  167. package/mobile/lib/ui-kit/ClientOnly.js.map +1 -0
  168. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -1
  169. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
  170. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -0
  171. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +2 -2
  172. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  173. package/mobile/lib/ui-kit/SwipeListControl/isShowDots.d.ts +1 -0
  174. package/mobile/lib/ui-kit/SwipeListControl/isShowDots.js +2 -0
  175. package/mobile/lib/ui-kit/SwipeListControl/isShowDots.js.map +1 -0
  176. package/mobile/src/components/Calculator/BonusCalculatorForm.tsx +1 -1
  177. package/mobile/src/components/Calculator/BusinessDepositCalculatorForm.tsx +5 -2
  178. package/mobile/src/components/Calculator/Calculator.example.json +1 -0
  179. package/mobile/src/components/Calculator/Calculator.ui.json +8 -0
  180. package/mobile/src/components/Calculator/CalculatorContent.ts +31 -1
  181. package/mobile/src/components/Calculator/CreditCalculatorForm.tsx +6 -6
  182. package/mobile/src/components/Calculator/DepositCalculatorForm.tsx +8 -8
  183. package/mobile/src/components/Calculator/useBonusCalculatorParams.ts +1 -1
  184. package/mobile/src/components/Carousel/Carousel.tsx +1 -0
  185. package/mobile/src/components/ContentPage/ContentPage.tsx +2 -2
  186. package/mobile/src/components/Footer/Contacts.tsx +1 -1
  187. package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMap.tsx +8 -14
  188. package/mobile/src/components/StickyBottomMenu/RenderMenuItems.tsx +5 -11
  189. package/mobile/src/components/StickyBottomMenu/StickyBottomMenu.tsx +6 -4
  190. package/mobile/src/content-page-repository/transformHTML.ts +10 -2
  191. package/mobile/src/model/EmptyOptionType.ts +1 -1
  192. package/mobile/src/ui-kit/ClientOnly.tsx +6 -0
  193. package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +2 -1
  194. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +11 -2
  195. package/mobile/src/ui-kit/SwipeListControl/isShowDots.tsx +1 -0
  196. package/package.json +1 -1
  197. package/src/components/Calculator/BonusCalculatorForm.tsx +1 -1
  198. package/src/components/Calculator/BusinessDepositCalculatorForm.tsx +5 -2
  199. package/src/components/Calculator/Calculator.example.json +1 -0
  200. package/src/components/Calculator/Calculator.tsx +19 -4
  201. package/src/components/Calculator/Calculator.ui.json +8 -0
  202. package/src/components/Calculator/CalculatorContent.ts +31 -1
  203. package/src/components/Calculator/CreditCalculatorForm.tsx +6 -6
  204. package/src/components/Calculator/DepositCalculatorForm.tsx +8 -8
  205. package/src/components/Calculator/useBonusCalculatorParams.ts +1 -1
  206. package/src/components/Carousel/Carousel.tsx +1 -0
  207. package/src/components/ContentPage/ContentPage.tsx +2 -2
  208. package/src/components/Footer/Contacts.tsx +1 -1
  209. package/src/components/OfficesAtmsMap/OfficesAtmsMap.tsx +8 -14
  210. package/src/components/StepsBlock/StepsBlock.fixture.mobile.tsx +1 -1
  211. package/src/components/StepsBlock/StepsBlock.fixture.tsx +1 -1
  212. package/src/components/StickyBottomMenu/RenderMenuItems.tsx +5 -11
  213. package/src/components/StickyBottomMenu/StickyBottomMenu.mobile.tsx +6 -4
  214. package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.mobile.tsx +66 -0
  215. package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +19 -0
  216. package/src/content-page-repository/transformHTML.ts +10 -2
  217. package/src/model/EmptyOptionType.ts +1 -1
  218. package/src/ui-kit/Button/Button.fixture.tsx +22 -22
  219. package/src/ui-kit/ClientOnly.tsx +6 -0
  220. package/src/ui-kit/HeaderItem/HeaderItem.fixture.tsx +2 -2
  221. package/src/ui-kit/Logo/Logo.fixture.tsx +1 -1
  222. package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +2 -1
  223. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +11 -2
  224. package/src/ui-kit/SwipeListControl/isShowDots.mobile.tsx +1 -0
  225. package/src/ui-kit/SwipeListControl/isShowDots.tsx +1 -0
  226. package/src/ui-kit/TopItem/TopItem.fixture.tsx +2 -2
@@ -1,21 +1,21 @@
1
1
  /* eslint-disable max-lines, max-lines-per-function */
2
2
  import { JSX } from '@redneckz/uni-jsx';
3
+ import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
3
4
  import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
5
+ import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
4
6
  import { style } from '../../utils/style';
5
7
  import type {
6
8
  CreditCalculatorParamsViewSettings,
7
9
  CreditCalculatorProps,
8
10
  } from './CalculatorContent';
11
+ import { CalculatorValueBlock } from './CalculatorValueBlock';
12
+ import { CREDIT_DEFAULT_SUM, DEFAULT_MONTHS } from './constants';
9
13
  import { renderFootnote } from './renderFootnote';
10
- import { renderWantedSumInput } from './renderWantedSumInput';
11
14
  import { renderMonthsInput } from './renderMonthsInput';
12
- import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
13
- import { CREDIT_DEFAULT_SUM, DEFAULT_MONTHS } from './constants';
14
- import { CreditCalculatorParams, useCreditCalculatorParams } from './useCreditCalculatorParams';
15
15
  import { renderPaymentType } from './renderPaymentType';
16
- import { CalculatorValueBlock } from './CalculatorValueBlock';
17
16
  import { renderRate } from './renderRate';
18
- import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
17
+ import { renderWantedSumInput } from './renderWantedSumInput';
18
+ import { CreditCalculatorParams, useCreditCalculatorParams } from './useCreditCalculatorParams';
19
19
 
20
20
  export interface CreditCalculatorProp extends CreditCalculatorProps {
21
21
  className?: string;
@@ -1,21 +1,21 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
+ import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
3
+ import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
2
4
  import { renderButtonsSection } from '../../ui-kit/Button/renderButtonsSection';
3
5
  import { style } from '../../utils/style';
4
6
  import type {
5
7
  DepositCalculatorParamsViewSettings,
6
8
  DepositCalculatorProps,
7
9
  } from './CalculatorContent';
8
- import { renderFootnote } from './renderFootnote';
9
- import { renderWantedSumInput } from './renderWantedSumInput';
10
- import { renderMonthsInput } from './renderMonthsInput';
11
- import { FormFieldRegisterer, useForm } from '../../hooks/useForm';
12
- import { DEPOSIT_DEFAULT_SUM } from './constants';
13
- import { DepositCalculatorParams, useDepositCalculatorParams } from './useDepositCalculatorParams';
14
- import { useEffect } from '@redneckz/uni-jsx/lib/hooks';
15
10
  import { CalculatorValueBlock } from './CalculatorValueBlock';
11
+ import { DEPOSIT_DEFAULT_SUM } from './constants';
12
+ import { renderFootnote } from './renderFootnote';
16
13
  import { renderInterestPayment } from './renderInterestPayment';
17
- import { renderRegistrationType } from './renderRegistrationType';
14
+ import { renderMonthsInput } from './renderMonthsInput';
18
15
  import { renderRate } from './renderRate';
16
+ import { renderRegistrationType } from './renderRegistrationType';
17
+ import { renderWantedSumInput } from './renderWantedSumInput';
18
+ import { DepositCalculatorParams, useDepositCalculatorParams } from './useDepositCalculatorParams';
19
19
 
20
20
  export interface DepositCalculatorProp extends DepositCalculatorProps {
21
21
  className?: string;
@@ -29,7 +29,7 @@ export interface BonusCalculatorParams
29
29
 
30
30
  export const useBonusCalculatorParams = (
31
31
  userInputParams: BonusCalculatorUserInputParams,
32
- sourceBookDir: string,
32
+ sourceBookDir?: string,
33
33
  ) => {
34
34
  const { travelExpenseValue, restExpenseValue } = userInputParams;
35
35
  const bonusCalculatorSourceBookParams =
@@ -68,6 +68,7 @@ export const Carousel: JSXBlock<CarouselProps> = JSX<CarouselProps>(
68
68
  />
69
69
  </div>
70
70
  <SwipeListControlDots
71
+ className="@lg:hidden"
71
72
  containerRef={containerRef}
72
73
  activeIndex={dotsActiveIndex}
73
74
  dotCount={count}
@@ -35,8 +35,8 @@ export const ContentPage: JSXBlock<ContentPageProps> = JSX<ContentPageProps>(
35
35
  useBlockRouterProvider();
36
36
 
37
37
  return (
38
- <div data-theme={colorPalette}>
39
- <section className={style('relative @container', pageStyle, className)}>
38
+ <div className="@container" data-theme={colorPalette}>
39
+ <section className={style('relative', pageStyle, className)}>
40
40
  {slots?.header ? (
41
41
  <div className="relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]">
42
42
  {renderBlocksList(slots?.header, { ...options, slotName: 'header' })}
@@ -14,7 +14,7 @@ export const Contacts = JSX<ContactsProps>(({ className = '', items }) => (
14
14
  <Button
15
15
  version="primary"
16
16
  className="w-full"
17
- href="https://www.rshb.ru/feedback/question/"
17
+ href="https://old.rshb.ru/feedback/question/"
18
18
  target="_blank"
19
19
  ariaLabel="Обратная связь"
20
20
  text="Обратная связь"
@@ -6,6 +6,7 @@ import type { UniBlockProps } from '../../model/JSXBlock';
6
6
  import { BlockWrapper } from '../../ui-kit/BlockWrapper';
7
7
  import { Button } from '../../ui-kit/Button/Button';
8
8
  import { Checkbox } from '../../ui-kit/Checkbox/Checkbox';
9
+ import { ClientOnly } from '../../ui-kit/ClientOnly';
9
10
  import { Heading } from '../../ui-kit/Heading/Heading';
10
11
  import { Icon } from '../../ui-kit/Icon/Icon';
11
12
  import { Img } from '../../ui-kit/Img/Img';
@@ -39,12 +40,9 @@ const FILTRATION_LABELS = {
39
40
  billAcceptorEnable: 'Прием наличных',
40
41
  };
41
42
 
42
- const FILTRATION_BRANCHES_PREDICATES = {
43
+ const FILTRATION_PREDICATES = {
43
44
  safeBoxCaseVolumes: (item: Branch) => Boolean(item.safeBoxCaseVolumes),
44
45
  workingSaturday: (item: Branch) => Boolean(item.workSchedule?.workingSaturday),
45
- };
46
-
47
- const FILTRATION_ATMS_PREDICATES = {
48
46
  terminalTypeAtms: (item: Atm) => item.terminalType?.toLowerCase() === 'банкомат',
49
47
  terminalTypeTerm: (item: Atm) => item.terminalType?.toLowerCase() === 'терминал',
50
48
  workAllTime: (item: Atm) => item.workTime?.toLowerCase() === 'круглосуточно',
@@ -95,7 +93,9 @@ export const OfficesAtmsMap = JSX<OfficesAtmsMapProps>(({ data, className = '',
95
93
  {renderFiltrationForm(Object.keys(initialState), { field, reset })}
96
94
  </div>
97
95
  <div className="h-[600px]">
98
- <YandexMap points={points} className="h-full" />
96
+ <ClientOnly>
97
+ <YandexMap points={points} className="h-full" />
98
+ </ClientOnly>
99
99
  </div>
100
100
  </div>
101
101
  {filteredOfficesAtmsData.map(dataType === 'offices' ? renderOfficeCard : renderAtmCard)}
@@ -106,17 +106,11 @@ export const OfficesAtmsMap = JSX<OfficesAtmsMapProps>(({ data, className = '',
106
106
  const filterOfficesAtms = (data: Branch[] | Atm[], filtrationState: Record<string, boolean>) => {
107
107
  const truthyFilters = Object.keys(filtrationState).filter((key) => filtrationState[key]);
108
108
 
109
- return 'name' in data
110
- ? (data as Branch[]).filter(filterOffices(truthyFilters))
111
- : (data as Atm[]).filter(filterAtms(truthyFilters));
109
+ return (data as Array<Branch | Atm>).filter((item) =>
110
+ truthyFilters.every((filterName) => FILTRATION_PREDICATES[filterName](item)),
111
+ );
112
112
  };
113
113
 
114
- const filterOffices = (filters: string[]) => (item: Branch) =>
115
- filters.every((filterName) => FILTRATION_BRANCHES_PREDICATES[filterName](item));
116
-
117
- const filterAtms = (filters: string[]) => (item: Atm) =>
118
- filters.every((filterName) => FILTRATION_ATMS_PREDICATES[filterName](item));
119
-
120
114
  const getTitle = (name = '', dataType = 'offices') =>
121
115
  dataType === 'offices' ? `Офисы филиала ${name}` : `Банкоматы филиала ${name}`;
122
116
 
@@ -33,7 +33,7 @@ export default {
33
33
  buttons={[
34
34
  {
35
35
  text: 'Отправить заявку',
36
- href: 'https://www.rshb.ru/',
36
+ href: 'https://old.rshb.ru/',
37
37
  target: '_blank',
38
38
  version: 'primary',
39
39
  },
@@ -115,7 +115,7 @@ export default {
115
115
  buttons={[
116
116
  {
117
117
  text: 'Отправить заявку',
118
- href: 'https://www.rshb.ru/',
118
+ href: 'https://old.rshb.ru/',
119
119
  target: '_blank',
120
120
  icon: { icon: 'ComfortableCompIcon' },
121
121
  iconRight: { icon: 'ComfortableCompIcon' },
@@ -1,6 +1,5 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import type { MenuItemProps } from './StickyBottomMenuProps';
3
- import { BlockWrapper } from '../../ui-kit/BlockWrapper';
4
3
  import { RenderItem } from './RenderItem';
5
4
  import { useActiveRoute } from '../../hooks/useActiveRoute';
6
5
 
@@ -13,15 +12,10 @@ export const RenderMenuItems = JSX<RenderMenuItems>(({ menuItems, onClick }) =>
13
12
  const [activeIndex] = useActiveRoute(menuItems);
14
13
 
15
14
  return (
16
- <BlockWrapper
17
- className="fixed bottom-0 left-0 right-0 my-0 mx-auto w-full bg-transparent z-[100]"
18
- padding="p-0"
19
- >
20
- <div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
21
- {menuItems.map((_, i) => (
22
- <RenderItem key={String(i)} isActive={i === activeIndex} item={_} onClick={onClick} />
23
- ))}
24
- </div>
25
- </BlockWrapper>
15
+ <div className="ml-auto container bg-white flex justify-center shadow-blue-gray">
16
+ {menuItems.map((_, i) => (
17
+ <RenderItem key={String(i)} isActive={i === activeIndex} item={_} onClick={onClick} />
18
+ ))}
19
+ </div>
26
20
  );
27
21
  });
@@ -2,10 +2,10 @@ import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
3
3
  import { projectSettings } from '../../ProjectSettings';
4
4
  import { useSWRResource } from '../../hooks/useSWRResource';
5
- import { BurgerMenuDialog } from './BurgerMenuDialog';
6
5
  import type { MenuItemProps, StickyBottomMenuProps } from './StickyBottomMenuProps';
7
6
  import { RenderMenuItems } from './RenderMenuItems';
8
7
  import { useBurgerMenuDialog } from './useBurgerMenuDialog';
8
+ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
9
9
 
10
10
  export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
11
11
  const { menuItems = [] } = useSWRResource<StickyBottomMenuProps>(
@@ -35,9 +35,11 @@ export const StickyBottomMenu = JSX<StickyBottomMenuProps>(({ ...rest }) => {
35
35
  );
36
36
 
37
37
  return (
38
- <div className="contents">
38
+ <BlockWrapper
39
+ className="fixed bottom-0 left-0 right-0 my-0 mx-auto w-full bg-transparent z-[100]"
40
+ padding="p-0"
41
+ >
39
42
  {<RenderMenuItems menuItems={menuItemsWithButton} onClick={toggle} />}
40
- {isBurgerMenuDialogOpen ? <BurgerMenuDialog /> : null}
41
- </div>
43
+ </BlockWrapper>
42
44
  );
43
45
  });
@@ -0,0 +1,66 @@
1
+ import '../../setup-fixture';
2
+
3
+ import type { BlockRendererOptions } from '../../BlockRenderer/BlockRendererOptions';
4
+ import { Blocks } from '../Blocks';
5
+ import { PRODUCT_TILE } from '../ProductTile/ProductTile.fixture';
6
+ import { SwipeListControlBlock } from './SwipeListControlBlock';
7
+
8
+ const options = {
9
+ blocksRegistry: Blocks,
10
+ } as BlockRendererOptions;
11
+
12
+ export default {
13
+ default: (
14
+ <div className="container grid grid-cols-12">
15
+ <SwipeListControlBlock
16
+ className="col-span-12"
17
+ block={{
18
+ type: 'SwipeListControlBlock',
19
+ blocks: [
20
+ { type: 'ProductTile', content: PRODUCT_TILE },
21
+ { type: 'ProductTile', content: PRODUCT_TILE },
22
+ { type: 'ProductTile', content: PRODUCT_TILE },
23
+ { type: 'ProductTile', content: PRODUCT_TILE },
24
+ ],
25
+ }}
26
+ showDots={true}
27
+ listType="vertical-list"
28
+ options={options}
29
+ />
30
+ </div>
31
+ ),
32
+ secondary: (
33
+ <div className="container grid grid-cols-12">
34
+ <SwipeListControlBlock
35
+ className="col-span-12"
36
+ block={{
37
+ type: 'SwipeListControlBlock',
38
+ blocks: [
39
+ { type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
40
+ { type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
41
+ ],
42
+ }}
43
+ listType="vertical-list"
44
+ options={options}
45
+ version="secondary"
46
+ />
47
+ </div>
48
+ ),
49
+ transparent: (
50
+ <div className="container grid grid-cols-12">
51
+ <SwipeListControlBlock
52
+ className="col-span-12"
53
+ block={{
54
+ type: 'SwipeListControlBlock',
55
+ blocks: [
56
+ { type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
57
+ { type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
58
+ ],
59
+ }}
60
+ listType="vertical-list"
61
+ options={options}
62
+ version="transparent"
63
+ />
64
+ </div>
65
+ ),
66
+ };
@@ -60,4 +60,23 @@ export default {
60
60
  />
61
61
  </div>
62
62
  ),
63
+ showDots: (
64
+ <div className="container grid grid-cols-12">
65
+ <SwipeListControlBlock
66
+ className="col-span-12"
67
+ showDots={true}
68
+ block={{
69
+ type: 'SwipeListControlBlock',
70
+ blocks: [
71
+ { type: 'ProductTile', content: PRODUCT_TILE },
72
+ { type: 'ProductTile', content: PRODUCT_TILE },
73
+ { type: 'ProductTile', content: PRODUCT_TILE },
74
+ { type: 'ProductTile', content: PRODUCT_TILE },
75
+ ],
76
+ }}
77
+ listType="vertical-list"
78
+ options={options}
79
+ />
80
+ </div>
81
+ ),
63
82
  };
@@ -1,5 +1,5 @@
1
1
  import rehypeParse from 'rehype-parse';
2
- import rehypeSanitize from 'rehype-sanitize';
2
+ import rehypeSanitize, { defaultSchema } from 'rehype-sanitize';
3
3
  import rehypeStringify from 'rehype-stringify';
4
4
  import { unified } from 'unified';
5
5
  import { replaceHeadingTags } from './replaceHeadingTags';
@@ -9,9 +9,17 @@ export async function transformHTML(html: string | null | undefined): Promise<st
9
9
  return '';
10
10
  }
11
11
 
12
+ const extendedSchema = {
13
+ ...defaultSchema,
14
+ protocols: {
15
+ ...defaultSchema.protocols,
16
+ href: [...(defaultSchema?.protocols?.href || []), 'tel'],
17
+ },
18
+ };
19
+
12
20
  const result = await unified()
13
21
  .use(rehypeParse)
14
- .use(rehypeSanitize)
22
+ .use(rehypeSanitize, extendedSchema)
15
23
  .use(rehypeStringify)
16
24
  .process(html);
17
25
 
@@ -1,4 +1,4 @@
1
1
  /**
2
- * @title Выберите блок
2
+ * @title Не выбрано
3
3
  */
4
4
  export type EmptyOption = null;
@@ -9,17 +9,17 @@ export default {
9
9
  <div>
10
10
  <p>Private clients</p>
11
11
  <div className="flex gap-xl" data-theme="pc">
12
- <Button href="https://www.rshb.ru/" target="_blank" text="Primary" version="primary" />
13
- <Button href="https://www.rshb.ru/" target="_blank" text="Link" version="secondary" />
14
- <Button href="https://www.rshb.ru/" target="_blank" text="Secondary" version="link" />
12
+ <Button href="https://old.rshb.ru/" target="_blank" text="Primary" version="primary" />
13
+ <Button href="https://old.rshb.ru/" target="_blank" text="Link" version="secondary" />
14
+ <Button href="https://old.rshb.ru/" target="_blank" text="Secondary" version="link" />
15
15
  </div>
16
16
  </div>
17
17
  <div>
18
18
  <p>Business clients</p>
19
19
  <div className="flex gap-xl" data-theme="bc">
20
- <Button href="https://www.rshb.ru/" target="_blank" text="Primary" version="primary" />
20
+ <Button href="https://old.rshb.ru/" target="_blank" text="Primary" version="primary" />
21
21
  <Button
22
- href="https://www.rshb.ru/"
22
+ href="https://old.rshb.ru/"
23
23
  target="_blank"
24
24
  text="Secondary"
25
25
  version="secondary"
@@ -29,9 +29,9 @@ export default {
29
29
  <div>
30
30
  <p>Ecosystem own</p>
31
31
  <div className="flex gap-xl" data-theme="eo">
32
- <Button href="https://www.rshb.ru/" target="_blank" text="Primary" version="primary" />
32
+ <Button href="https://old.rshb.ru/" target="_blank" text="Primary" version="primary" />
33
33
  <Button
34
- href="https://www.rshb.ru/"
34
+ href="https://old.rshb.ru/"
35
35
  target="_blank"
36
36
  text="Secondary"
37
37
  version="secondary"
@@ -42,14 +42,14 @@ export default {
42
42
  <p>Disabled</p>
43
43
  <div className="flex gap-xl">
44
44
  <Button
45
- href="https://www.rshb.ru/"
45
+ href="https://old.rshb.ru/"
46
46
  target="_blank"
47
47
  text="Primary"
48
48
  version="primary"
49
49
  disabled
50
50
  />
51
51
  <Button
52
- href="https://www.rshb.ru/"
52
+ href="https://old.rshb.ru/"
53
53
  target="_blank"
54
54
  text="Secondary"
55
55
  version="secondary"
@@ -61,7 +61,7 @@ export default {
61
61
  <p>With Icon</p>
62
62
  <div className="flex gap-xl" data-theme="pc">
63
63
  <Button
64
- href="https://www.rshb.ru/"
64
+ href="https://old.rshb.ru/"
65
65
  target="_blank"
66
66
  aboveText="Доступно в"
67
67
  appendLeft={
@@ -74,7 +74,7 @@ export default {
74
74
  version="secondary"
75
75
  />
76
76
  <Button
77
- href="https://www.rshb.ru/"
77
+ href="https://old.rshb.ru/"
78
78
  target="_blank"
79
79
  aboveText="Загрузите в"
80
80
  appendLeft={
@@ -87,7 +87,7 @@ export default {
87
87
  />
88
88
 
89
89
  <Button
90
- href="https://www.rshb.ru/"
90
+ href="https://old.rshb.ru/"
91
91
  target="_blank"
92
92
  appendRight={
93
93
  <div>
@@ -104,14 +104,14 @@ export default {
104
104
  <div className="flex gap-xl" data-theme="pc">
105
105
  <Button
106
106
  rounded
107
- href="https://www.rshb.ru/"
107
+ href="https://old.rshb.ru/"
108
108
  target="_blank"
109
109
  version="secondary"
110
110
  appendLeft={<Img image={{ icon: 'PlayMarketIcon' }} width="20" height="21" />}
111
111
  />
112
112
  <Button
113
113
  rounded
114
- href="https://www.rshb.ru/"
114
+ href="https://old.rshb.ru/"
115
115
  target="_blank"
116
116
  version="secondary"
117
117
  appendLeft={<Img image={{ icon: 'AppleIcon' }} width="18" height="20" />}
@@ -123,7 +123,7 @@ export default {
123
123
  'primary (Private clients)': (
124
124
  <div data-theme="pc">
125
125
  <Button
126
- href="https://www.rshb.ru/"
126
+ href="https://old.rshb.ru/"
127
127
  target="_blank"
128
128
  text="Оформить кредит"
129
129
  version="primary"
@@ -133,7 +133,7 @@ export default {
133
133
  'secondary (Private clients)': (
134
134
  <div data-theme="pc">
135
135
  <Button
136
- href="https://www.rshb.ru/"
136
+ href="https://old.rshb.ru/"
137
137
  target="_blank"
138
138
  text="Оформить кредит"
139
139
  version="secondary"
@@ -143,7 +143,7 @@ export default {
143
143
  'primary (Business clients)': (
144
144
  <div data-theme="bc">
145
145
  <Button
146
- href="https://www.rshb.ru/"
146
+ href="https://old.rshb.ru/"
147
147
  target="_blank"
148
148
  text="Оформить кредит"
149
149
  version="primary"
@@ -153,7 +153,7 @@ export default {
153
153
  'secondary (Business clients)': (
154
154
  <div data-theme="bc">
155
155
  <Button
156
- href="https://www.rshb.ru/"
156
+ href="https://old.rshb.ru/"
157
157
  target="_blank"
158
158
  text="Оформить кредит"
159
159
  version="secondary"
@@ -163,7 +163,7 @@ export default {
163
163
  'primary (Ecosystem own)': (
164
164
  <div data-theme="eo">
165
165
  <Button
166
- href="https://www.rshb.ru/"
166
+ href="https://old.rshb.ru/"
167
167
  target="_blank"
168
168
  text="Оформить кредит"
169
169
  version="primary"
@@ -173,7 +173,7 @@ export default {
173
173
  'secondary (Ecosystem own)': (
174
174
  <div data-theme="eo">
175
175
  <Button
176
- href="https://www.rshb.ru/"
176
+ href="https://old.rshb.ru/"
177
177
  target="_blank"
178
178
  text="Оформить кредит"
179
179
  version="secondary"
@@ -182,7 +182,7 @@ export default {
182
182
  ),
183
183
  'primary (disabled)': (
184
184
  <Button
185
- href="https://www.rshb.ru/"
185
+ href="https://old.rshb.ru/"
186
186
  target="_blank"
187
187
  text="Оформить кредит"
188
188
  version="primary"
@@ -191,7 +191,7 @@ export default {
191
191
  ),
192
192
  'secondary (disabled)': (
193
193
  <Button
194
- href="https://www.rshb.ru/"
194
+ href="https://old.rshb.ru/"
195
195
  target="_blank"
196
196
  text="Оформить кредит"
197
197
  version="secondary"
@@ -0,0 +1,6 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { isSSR } from '@redneckz/uni-jsx/lib/hooks/vue/isSSR';
3
+
4
+ const isClient = !isSSR();
5
+
6
+ export const ClientOnly = JSX(({ children }) => (isClient ? children : null));
@@ -3,6 +3,6 @@ import '../../setup-fixture';
3
3
  import { HeaderItem } from './HeaderItem';
4
4
 
5
5
  export default {
6
- default: <HeaderItem href="https://www.rshb.ru/" target="_blank" text="Россельхозбанк" />,
7
- active: <HeaderItem href="https://www.rshb.ru/" target="_blank" text="Россельхозбанк" active />,
6
+ default: <HeaderItem href="https://old.rshb.ru/" target="_blank" text="Россельхозбанк" />,
7
+ active: <HeaderItem href="https://old.rshb.ru/" target="_blank" text="Россельхозбанк" active />,
8
8
  };
@@ -2,4 +2,4 @@ import '../../setup-fixture';
2
2
 
3
3
  import { Logo } from './Logo';
4
4
 
5
- export default <Logo href="https://www.rshb.ru/" />;
5
+ export default <Logo href="https://old.rshb.ru/" />;
@@ -5,6 +5,7 @@ import { SwipeListContainer } from './SwipeListContainer';
5
5
  import type { SwipeListControlContent } from './SwipeListControlContent';
6
6
  import { SwipeListControlDots } from './SwipeListControlDots';
7
7
  import { useSwipeListScroll } from './useSwipeListScroll';
8
+ import { isShowDots } from './isShowDots';
8
9
 
9
10
  const DEFAULT_GAP = 14;
10
11
 
@@ -29,7 +30,7 @@ export const SwipeListControl = JSX<SwipeListControlProps>(
29
30
  version,
30
31
  gap = DEFAULT_GAP,
31
32
  padding = DEFAULT_PADDING,
32
- showDots = true,
33
+ showDots = isShowDots,
33
34
  minHeight,
34
35
  children,
35
36
  onVisibleIndicesChange,
@@ -19,6 +19,7 @@ const dotStyle =
19
19
  const inactiveDotStyle = 'w-2 h-2 opacity-30';
20
20
 
21
21
  export interface SwipeListControlDotsProps {
22
+ className?: string;
22
23
  containerRef?: { current: HTMLDivElement | null };
23
24
  activeIndex?: number;
24
25
  dotCount?: number;
@@ -27,7 +28,14 @@ export interface SwipeListControlDotsProps {
27
28
  }
28
29
 
29
30
  export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
30
- ({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list', version }) => {
31
+ ({
32
+ className = '',
33
+ containerRef,
34
+ activeIndex,
35
+ dotCount = 0,
36
+ listType = 'horizontal-list',
37
+ version,
38
+ }) => {
31
39
  const handleClick = (idx: number) => {
32
40
  if (idx !== activeIndex && containerRef?.current) {
33
41
  containerRef.current.children[idx]?.scrollIntoView({
@@ -40,9 +48,10 @@ export const SwipeListControlDots = JSX<SwipeListControlDotsProps>(
40
48
  return dotCount ? (
41
49
  <div
42
50
  className={style(
43
- 'flex gap-xs @lg:hidden',
51
+ 'flex gap-xs',
44
52
  containerStyles[listType],
45
53
  version ? 'group' : '',
54
+ className,
46
55
  )}
47
56
  {...(version ? { 'data-ver': version } : {})}
48
57
  >
@@ -0,0 +1 @@
1
+ export const isShowDots = true;
@@ -0,0 +1 @@
1
+ export const isShowDots = false;
@@ -3,6 +3,6 @@ import '../../setup-fixture';
3
3
  import { TopItem } from './TopItem';
4
4
 
5
5
  export default {
6
- default: <TopItem href="https://www.rshb.ru/" target="_blank" text="Экосистема Своё" />,
7
- active: <TopItem href="https://www.rshb.ru/" target="_blank" text="Экосистема Своё" active />,
6
+ default: <TopItem href="https://old.rshb.ru/" target="_blank" text="Экосистема Своё" />,
7
+ active: <TopItem href="https://old.rshb.ru/" target="_blank" text="Экосистема Своё" active />,
8
8
  };