@redneckz/wildless-cms-uni-blocks 0.14.99 → 0.14.101

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 (155) hide show
  1. package/bin/migration-scripts/0.6.32.js +1 -1
  2. package/bundle/bundle.umd.js +11 -12
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Header/isHrefActive.d.ts +4 -2
  5. package/bundle/services/sitemap/SitemapData.d.ts +2 -2
  6. package/bundle/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
  7. package/bundle/ui-kit/SVG.d.ts +4 -2
  8. package/dist/api/LeadServiceAPI.js +1 -1
  9. package/dist/api/LeadServiceAPI.js.map +1 -1
  10. package/dist/components/Carousel/Carousel.js +0 -3
  11. package/dist/components/Carousel/Carousel.js.map +1 -1
  12. package/dist/components/Header/DropdownMenu.js +1 -1
  13. package/dist/components/Header/DropdownMenu.js.map +1 -1
  14. package/dist/components/Header/isHrefActive.d.ts +4 -2
  15. package/dist/components/Header/isHrefActive.js +2 -3
  16. package/dist/components/Header/isHrefActive.js.map +1 -1
  17. package/dist/components/RollupItem/getIconName.js +1 -1
  18. package/dist/components/RollupItem/getIconName.js.map +1 -1
  19. package/dist/components/RollupItem/getIconName.mobile.js +1 -1
  20. package/dist/components/RollupItem/getIconName.mobile.js.map +1 -1
  21. package/dist/services/sitemap/SitemapData.d.ts +2 -2
  22. package/dist/ui-kit/LinkButton/renderArrows.js +5 -1
  23. package/dist/ui-kit/LinkButton/renderArrows.js.map +1 -1
  24. package/dist/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
  25. package/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
  26. package/dist/ui-kit/SVG.d.ts +4 -2
  27. package/dist/ui-kit/SVG.js.map +1 -1
  28. package/dist/utils/getBorderStyle.js +1 -1
  29. package/dist/utils/getBorderStyle.js.map +1 -1
  30. package/lib/api/LeadServiceAPI.js +1 -1
  31. package/lib/api/LeadServiceAPI.js.map +1 -1
  32. package/lib/common.css +1 -1
  33. package/lib/components/Carousel/Carousel.js +0 -3
  34. package/lib/components/Carousel/Carousel.js.map +1 -1
  35. package/lib/components/Header/DropdownMenu.js +1 -1
  36. package/lib/components/Header/DropdownMenu.js.map +1 -1
  37. package/lib/components/Header/isHrefActive.d.ts +4 -2
  38. package/lib/components/Header/isHrefActive.js +2 -3
  39. package/lib/components/Header/isHrefActive.js.map +1 -1
  40. package/lib/components/RollupItem/getIconName.js +1 -1
  41. package/lib/components/RollupItem/getIconName.js.map +1 -1
  42. package/lib/components/RollupItem/getIconName.mobile.js +1 -1
  43. package/lib/components/RollupItem/getIconName.mobile.js.map +1 -1
  44. package/lib/services/sitemap/SitemapData.d.ts +2 -2
  45. package/lib/ui-kit/LinkButton/renderArrows.js +5 -1
  46. package/lib/ui-kit/LinkButton/renderArrows.js.map +1 -1
  47. package/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
  48. package/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
  49. package/lib/ui-kit/SVG.d.ts +4 -2
  50. package/lib/ui-kit/SVG.js.map +1 -1
  51. package/lib/utils/getBorderStyle.js +1 -1
  52. package/lib/utils/getBorderStyle.js.map +1 -1
  53. package/mobile/bundle/bundle.umd.js +10 -11
  54. package/mobile/bundle/bundle.umd.min.js +1 -1
  55. package/mobile/bundle/components/Header/isHrefActive.d.ts +4 -2
  56. package/mobile/bundle/services/sitemap/SitemapData.d.ts +2 -2
  57. package/mobile/bundle/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
  58. package/mobile/bundle/ui-kit/SVG.d.ts +4 -2
  59. package/mobile/dist/api/LeadServiceAPI.js +1 -1
  60. package/mobile/dist/api/LeadServiceAPI.js.map +1 -1
  61. package/mobile/dist/components/Carousel/Carousel.js +0 -3
  62. package/mobile/dist/components/Carousel/Carousel.js.map +1 -1
  63. package/mobile/dist/components/Header/DropdownMenu.js +1 -1
  64. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  65. package/mobile/dist/components/Header/isHrefActive.d.ts +4 -2
  66. package/mobile/dist/components/Header/isHrefActive.js +2 -3
  67. package/mobile/dist/components/Header/isHrefActive.js.map +1 -1
  68. package/mobile/dist/components/RollupItem/getIconName.js +1 -1
  69. package/mobile/dist/components/RollupItem/getIconName.js.map +1 -1
  70. package/mobile/dist/services/sitemap/SitemapData.d.ts +2 -2
  71. package/mobile/dist/ui-kit/LinkButton/renderArrows.js +5 -1
  72. package/mobile/dist/ui-kit/LinkButton/renderArrows.js.map +1 -1
  73. package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
  74. package/mobile/dist/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
  75. package/mobile/dist/ui-kit/SVG.d.ts +4 -2
  76. package/mobile/dist/ui-kit/SVG.js.map +1 -1
  77. package/mobile/dist/utils/getBorderStyle.js +1 -1
  78. package/mobile/dist/utils/getBorderStyle.js.map +1 -1
  79. package/mobile/lib/api/LeadServiceAPI.js +1 -1
  80. package/mobile/lib/api/LeadServiceAPI.js.map +1 -1
  81. package/mobile/lib/common.css +1 -1
  82. package/mobile/lib/components/Carousel/Carousel.js +0 -3
  83. package/mobile/lib/components/Carousel/Carousel.js.map +1 -1
  84. package/mobile/lib/components/Header/DropdownMenu.js +1 -1
  85. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  86. package/mobile/lib/components/Header/isHrefActive.d.ts +4 -2
  87. package/mobile/lib/components/Header/isHrefActive.js +2 -3
  88. package/mobile/lib/components/Header/isHrefActive.js.map +1 -1
  89. package/mobile/lib/components/RollupItem/getIconName.js +1 -1
  90. package/mobile/lib/components/RollupItem/getIconName.js.map +1 -1
  91. package/mobile/lib/services/sitemap/SitemapData.d.ts +2 -2
  92. package/mobile/lib/ui-kit/LinkButton/renderArrows.js +5 -1
  93. package/mobile/lib/ui-kit/LinkButton/renderArrows.js.map +1 -1
  94. package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.d.ts +2 -4
  95. package/mobile/lib/ui-kit/LocationDialog/renderForeignOffices.js.map +1 -1
  96. package/mobile/lib/ui-kit/SVG.d.ts +4 -2
  97. package/mobile/lib/ui-kit/SVG.js.map +1 -1
  98. package/mobile/lib/utils/getBorderStyle.js +1 -1
  99. package/mobile/lib/utils/getBorderStyle.js.map +1 -1
  100. package/mobile/src/api/LeadServiceAPI.ts +1 -1
  101. package/mobile/src/components/Carousel/Carousel.tsx +0 -3
  102. package/mobile/src/components/Header/DropdownMenu.tsx +1 -1
  103. package/mobile/src/components/Header/isHrefActive.ts +7 -4
  104. package/mobile/src/components/RollupItem/getIconName.tsx +1 -1
  105. package/mobile/src/services/sitemap/SitemapData.ts +2 -2
  106. package/mobile/src/ui-kit/LinkButton/renderArrows.tsx +9 -4
  107. package/mobile/src/ui-kit/LocationDialog/renderForeignOffices.tsx +3 -3
  108. package/mobile/src/ui-kit/SVG.tsx +5 -2
  109. package/mobile/src/utils/getBorderStyle.ts +1 -1
  110. package/package.json +1 -1
  111. package/src/api/LeadServiceAPI.ts +1 -1
  112. package/src/components/Carousel/Carousel.tsx +0 -3
  113. package/src/components/Header/DropdownMenu.tsx +1 -1
  114. package/src/components/Header/isHrefActive.ts +7 -4
  115. package/src/components/RollupItem/getIconName.mobile.tsx +1 -1
  116. package/src/components/RollupItem/getIconName.tsx +1 -1
  117. package/src/services/sitemap/SitemapData.ts +2 -2
  118. package/src/ui-kit/LinkButton/renderArrows.tsx +9 -4
  119. package/src/ui-kit/LocationDialog/renderForeignOffices.tsx +3 -3
  120. package/src/ui-kit/SVG.tsx +5 -2
  121. package/src/utils/getBorderStyle.ts +1 -1
  122. package/bin/migration-scripts/0.11.0.js +0 -29
  123. package/bin/migration-scripts/0.12.9.js +0 -30
  124. package/bin/migration-scripts/0.13.5.js +0 -36
  125. package/bin/migration-scripts/0.13.6.js +0 -33
  126. package/bin/migration-scripts/0.14.26.js +0 -55
  127. package/bin/migration-scripts/0.14.28.js +0 -28
  128. package/bin/migration-scripts/0.14.29.js +0 -75
  129. package/bin/migration-scripts/0.14.30.js +0 -54
  130. package/bin/migration-scripts/0.14.44.js +0 -103
  131. package/bin/migration-scripts/0.5.14.js +0 -33
  132. package/bin/migration-scripts/0.6.43.js +0 -32
  133. package/bin/migration-scripts/0.7.8.js +0 -32
  134. package/bin/migration-scripts/0.8.10.js +0 -31
  135. package/bin/migration-scripts/0.8.29.js +0 -42
  136. package/bin/migration-scripts/0.8.8.js +0 -124
  137. package/bin/migration-scripts/0.9.1.js +0 -71
  138. package/bin/migration-scripts/0.9.10.js +0 -30
  139. package/bin/migration-scripts/0.9.9.js +0 -111
  140. package/bundle/components/SafeDepositRental/renderClusterer.d.ts +0 -2
  141. package/dist/components/SafeDepositRental/renderClusterer.d.ts +0 -2
  142. package/dist/components/SafeDepositRental/renderClusterer.js +0 -35
  143. package/dist/components/SafeDepositRental/renderClusterer.js.map +0 -1
  144. package/lib/components/SafeDepositRental/renderClusterer.d.ts +0 -2
  145. package/lib/components/SafeDepositRental/renderClusterer.js +0 -32
  146. package/lib/components/SafeDepositRental/renderClusterer.js.map +0 -1
  147. package/mobile/bundle/components/SafeDepositRental/renderClusterer.d.ts +0 -2
  148. package/mobile/dist/components/SafeDepositRental/renderClusterer.d.ts +0 -2
  149. package/mobile/dist/components/SafeDepositRental/renderClusterer.js +0 -35
  150. package/mobile/dist/components/SafeDepositRental/renderClusterer.js.map +0 -1
  151. package/mobile/lib/components/SafeDepositRental/renderClusterer.d.ts +0 -2
  152. package/mobile/lib/components/SafeDepositRental/renderClusterer.js +0 -32
  153. package/mobile/lib/components/SafeDepositRental/renderClusterer.js.map +0 -1
  154. package/mobile/src/components/SafeDepositRental/renderClusterer.ts +0 -51
  155. package/src/components/SafeDepositRental/renderClusterer.ts +0 -51
@@ -24,12 +24,12 @@ export interface DispositionItem extends LinkProps {
24
24
  * @title Представительства за рубежом
25
25
  * @required ["text", "href"]
26
26
  */
27
- export declare type ForeignOffice = LinkProps & IconProps;
27
+ export declare type ForeignOfficeProps = LinkProps & IconProps;
28
28
  export interface SitemapData {
29
29
  topItems?: TopMenuItemProps[];
30
30
  dispositions?: DispositionItem[];
31
31
  logo?: LogoType;
32
- foreignOffices?: ForeignOffice[];
32
+ foreignOffices?: ForeignOfficeProps[];
33
33
  defaultLocation?: string;
34
34
  officesLink?: string;
35
35
  internetBankUrl?: string;
@@ -1,8 +1,12 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
+ import { style } from '../../utils/style.js';
2
3
  import { ArrowButton } from './ArrowButton.js';
3
4
  /** @deprecated */
4
5
  export function renderArrows({ dec, inc, canDec, canInc, btnClass, className = '', }) {
5
6
  const isVisible = canDec || canInc;
6
- return isVisible ? (_jsxs("div", { children: [canDec ? (_jsx(ArrowButton, { className: `absolute z-40 ${btnClass[0]} ${className}`, onClick: dec, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !canDec })) : null, canInc ? (_jsx(ArrowButton, { className: `absolute z-40 rotate-180 ${btnClass[1]} ${className}`, onClick: inc, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !canInc })) : null] })) : null;
7
+ if (!isVisible) {
8
+ return null;
9
+ }
10
+ return (_jsxs("div", { children: [canDec ? (_jsx(ArrowButton, { className: style('absolute z-40', btnClass[0], className), onClick: dec, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043B\u0435\u0432\u043E", "data-block-control": "scroll-left", disabled: !canDec })) : null, canInc ? (_jsx(ArrowButton, { className: style('absolute z-40 rotate-180', btnClass[1], className), onClick: inc, ariaLabel: "\u041F\u0440\u043E\u043B\u0438\u0441\u0442\u0430\u0442\u044C \u0432\u043F\u0440\u0430\u0432\u043E", "data-block-control": "scroll-right", disabled: !canInc })) : null] }));
7
11
  }
8
12
  //# sourceMappingURL=renderArrows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"renderArrows.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkButton/renderArrows.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,kBAAkB;AAClB,MAAM,UAAU,YAAY,CAAC,EAC3B,GAAG,EACH,GAAG,EACH,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,GAAG,EAAE,GACI;IAClB,MAAM,SAAS,GAAG,MAAM,IAAI,MAAM,CAAC;IAEnC,OAAO,SAAS,CAAC,CAAC,CAAC,CACjB,0BACG,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,WAAW,IACV,SAAS,EAAE,iBAAiB,QAAQ,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,EACtD,OAAO,EAAE,GAAG,EACZ,SAAS,EAAC,6FAAkB,wBACT,aAAa,EAChC,QAAQ,EAAE,CAAC,MAAM,GACjB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,WAAW,IACV,SAAS,EAAE,4BAA4B,QAAQ,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,EACjE,OAAO,EAAE,GAAG,EACZ,SAAS,EAAC,mGAAmB,wBACV,cAAc,EACjC,QAAQ,EAAE,CAAC,MAAM,GACjB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC"}
1
+ {"version":3,"file":"renderArrows.js","sourceRoot":"","sources":["../../../src/ui-kit/LinkButton/renderArrows.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAa5C,kBAAkB;AAClB,MAAM,UAAU,YAAY,CAAC,EAC3B,GAAG,EACH,GAAG,EACH,MAAM,EACN,MAAM,EACN,QAAQ,EACR,SAAS,GAAG,EAAE,GACI;IAClB,MAAM,SAAS,GAAG,MAAM,IAAI,MAAM,CAAC;IAEnC,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,IAAI,CAAC;KACb;IAED,OAAO,CACL,0BACG,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,WAAW,IACV,SAAS,EAAE,KAAK,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EACzD,OAAO,EAAE,GAAG,EACZ,SAAS,EAAC,6FAAkB,wBACT,aAAa,EAChC,QAAQ,EAAE,CAAC,MAAM,GACjB,CACH,CAAC,CAAC,CAAC,IAAI,EACP,MAAM,CAAC,CAAC,CAAC,CACR,KAAC,WAAW,IACV,SAAS,EAAE,KAAK,CAAC,0BAA0B,EAAE,QAAQ,CAAC,CAAC,CAAC,EAAE,SAAS,CAAC,EACpE,OAAO,EAAE,GAAG,EACZ,SAAS,EAAC,mGAAmB,wBACV,cAAc,EACjC,QAAQ,EAAE,CAAC,MAAM,GACjB,CACH,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
@@ -1,5 +1,3 @@
1
1
  /// <reference types="react" />
2
- import { ForeignOffice } from '../../services/sitemap/SitemapData';
3
- export declare const renderForeignOffices: (foreignOffices: ForeignOffice[] | undefined) => JSX.Element | null;
4
- declare const ForeignOffice: import("@redneckz/uni-jsx").UNIComponent<ForeignOffice, any, any>;
5
- export {};
2
+ import { type ForeignOfficeProps } from '../../services/sitemap/SitemapData';
3
+ export declare const renderForeignOffices: (foreignOffices: ForeignOfficeProps[] | undefined) => JSX.Element | null;
@@ -1 +1 @@
1
- {"version":3,"file":"renderForeignOffices.js","sourceRoot":"","sources":["../../../src/ui-kit/LocationDialog/renderForeignOffices.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mB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S,EAAC,yBAAyB,aACrC,IAAI,CAAC,CAAC,CAAC,KAAC,GAAG,IAAC,UAAU,EAAC,kBAAkB,EAAC,KAAK,EAAE,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,EAChE,IAAI,CAAC,CAAC,CAAC,CACN,YAAG,SAAS,EAAC,0BAA0B,EAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,YAClF,KAAC,IAAI,IAAC,IAAI,EAAC,QAAQ,EAAC,IAAI,EAAC,YAAY,EAAC,KAAK,EAAC,mBAAmB,YAC5D,IAAI,GACA,GACL,CACL,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
@@ -1,8 +1,10 @@
1
+ export declare type StrokeLinecap = 'inherit' | 'butt' | 'round' | 'square';
2
+ export declare type StrokeLinejoin = 'inherit' | 'round' | 'miter' | 'bevel';
1
3
  export interface SVGPathOptions {
2
4
  fill?: string;
3
5
  stroke?: string;
4
- strokeLinecap?: 'inherit' | 'butt' | 'round' | 'square';
5
- strokeLinejoin?: 'inherit' | 'round' | 'miter' | 'bevel';
6
+ strokeLinecap?: StrokeLinecap;
7
+ strokeLinejoin?: StrokeLinejoin;
6
8
  strokeWidth?: string;
7
9
  strokeMiterlimit?: string;
8
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SVG.js","sourceRoot":"","sources":["../../src/ui-kit/SVG.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAuBxC,MAAM,CAAC,MAAM,GAAG,GAAG,GAAG,CACpB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,aAAa,EAAE,EAAE,EAAE;IAChF,OAAO,CACL,cACE,KAAK,EAAC,4BAA4B,EAClC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OA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AG,EAAE,GAAG,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;YAEvD,OAAO,CACL,eAEE,CAAC,EAAE,CAAC,EACJ,IAAI,EAAE,QAAQ,IAAI,cAAc,EAChC,MAAM,EAAE,aAAa,CAAC,MAAM,EAC5B,aAAa,EAAE,aAAa,CAAC,aAAa,EAC1C,cAAc,EAAE,aAAa,CAAC,cAAc,EAC5C,WAAW,EAAE,aAAa,CAAC,WAAW,EACtC,gBAAgB,EAAE,aAAa,CAAC,gBAAgB,IAP3C,CAAC,CAQN,CACH,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC,CACF,CAAC"}
@@ -1,4 +1,4 @@
1
- export const getBorderStyle = (showBorder) => showBorder
1
+ export const getBorderStyle = (showBorder = false) => showBorder
2
2
  ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
3
3
  : '';
4
4
  //# sourceMappingURL=getBorderStyle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"getBorderStyle.js","sourceRoot":"","sources":["../../src/utils/getBorderStyle.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAoB,EAAE,EAAE,CACrD,UAAU;IACR,CAAC,CAAC,0GAA0G;IAC5G,CAAC,CAAC,EAAE,CAAC"}
1
+ {"version":3,"file":"getBorderStyle.js","sourceRoot":"","sources":["../../src/utils/getBorderStyle.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,UAAU,GAAG,KAAK,EAAE,EAAE,CACnD,UAAU;IACR,CAAC,CAAC,0GAA0G;IAC5G,CAAC,CAAC,EAAE,CAAC"}
@@ -13,7 +13,7 @@ export interface DaDataResult {
13
13
  }
14
14
 
15
15
  export function LeadServiceAPI() {
16
- async function send(body: Record<string, string>, isIndividualType?: boolean) {
16
+ async function send(body: Record<string, string>, isIndividualType = false) {
17
17
  const url = isIndividualType ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
18
18
 
19
19
  try {
@@ -84,11 +84,8 @@ Carousel.childrenTypes = [
84
84
  'CarouselBankHistoryCard',
85
85
  'CarouselCatalogCard',
86
86
  'CarouselInvestmentCard',
87
- 'CarouselProductCard',
88
- 'CarouselProgramsCard',
89
87
  'CarouselRecommendationCard',
90
88
  'CarouselTariffsCard',
91
- 'CarouselInvestmentCard',
92
89
  'RichTextBlock',
93
90
  'ProductBlock',
94
91
  ];
@@ -41,7 +41,7 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
41
41
  </button>
42
42
  <div
43
43
  className={style(
44
- 'absolute flex flex-col rounded-md bg-white p-xl pb-xs',
44
+ 'absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56',
45
45
  visible ? '' : 'hidden',
46
46
  )}
47
47
  aria-hidden={!visible}
@@ -1,8 +1,11 @@
1
1
  import { isURL, withoutQuery } from '../../utils/url';
2
2
 
3
+ type Router = { href?: string; pathname: string };
4
+
3
5
  export const isHrefActive =
4
- (router: { href?: string; pathname: string }) =>
6
+ (router: Router) =>
5
7
  ({ href }: { href?: string }): boolean =>
6
- !href
7
- ? false
8
- : withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
8
+ !href ? false : withoutQuery(getRouterHref(href, router)).startsWith(withoutQuery(href));
9
+
10
+ const getRouterHref = (href: string, router: Router) =>
11
+ isURL(href) ? router.href : router.pathname;
@@ -1,2 +1,2 @@
1
- export const getIconName = (isUnfolded?: boolean) =>
1
+ export const getIconName = (isUnfolded = false) =>
2
2
  isUnfolded ? 'ArrowUpSolidIcon' : 'ArrowDownSolidIcon';
@@ -28,13 +28,13 @@ export interface DispositionItem extends LinkProps {
28
28
  * @title Представительства за рубежом
29
29
  * @required ["text", "href"]
30
30
  */
31
- export type ForeignOffice = LinkProps & IconProps;
31
+ export type ForeignOfficeProps = LinkProps & IconProps;
32
32
 
33
33
  export interface SitemapData {
34
34
  topItems?: TopMenuItemProps[];
35
35
  dispositions?: DispositionItem[];
36
36
  logo?: LogoType;
37
- foreignOffices?: ForeignOffice[];
37
+ foreignOffices?: ForeignOfficeProps[];
38
38
  defaultLocation?: string;
39
39
  officesLink?: string;
40
40
  internetBankUrl?: string;
@@ -1,3 +1,4 @@
1
+ import { style } from '../../utils/style';
1
2
  import { ArrowButton } from './ArrowButton';
2
3
 
3
4
  /** @deprecated */
@@ -22,11 +23,15 @@ export function renderArrows({
22
23
  }: RenderArrowsProps) {
23
24
  const isVisible = canDec || canInc;
24
25
 
25
- return isVisible ? (
26
+ if (!isVisible) {
27
+ return null;
28
+ }
29
+
30
+ return (
26
31
  <div>
27
32
  {canDec ? (
28
33
  <ArrowButton
29
- className={`absolute z-40 ${btnClass[0]} ${className}`}
34
+ className={style('absolute z-40', btnClass[0], className)}
30
35
  onClick={dec}
31
36
  ariaLabel="Пролистать влево"
32
37
  data-block-control="scroll-left"
@@ -35,7 +40,7 @@ export function renderArrows({
35
40
  ) : null}
36
41
  {canInc ? (
37
42
  <ArrowButton
38
- className={`absolute z-40 rotate-180 ${btnClass[1]} ${className}`}
43
+ className={style('absolute z-40 rotate-180', btnClass[1], className)}
39
44
  onClick={inc}
40
45
  ariaLabel="Пролистать вправо"
41
46
  data-block-control="scroll-right"
@@ -43,5 +48,5 @@ export function renderArrows({
43
48
  />
44
49
  ) : null}
45
50
  </div>
46
- ) : null;
51
+ );
47
52
  }
@@ -1,10 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useLink } from '../../hooks/useLink';
3
- import { ForeignOffice } from '../../services/sitemap/SitemapData';
3
+ import { type ForeignOfficeProps } from '../../services/sitemap/SitemapData';
4
4
  import { Img } from '../Img/Img';
5
5
  import { Text } from '../Text/Text';
6
6
 
7
- export const renderForeignOffices = (foreignOffices: ForeignOffice[] | undefined) =>
7
+ export const renderForeignOffices = (foreignOffices: ForeignOfficeProps[] | undefined) =>
8
8
  foreignOffices?.length ? (
9
9
  <div className="sm:border-t sm:border-main-divider mt-2xs pt-2xs">
10
10
  <div className="mb-m">
@@ -20,7 +20,7 @@ export const renderForeignOffices = (foreignOffices: ForeignOffice[] | undefined
20
20
  </div>
21
21
  ) : null;
22
22
 
23
- const ForeignOffice = JSX<ForeignOffice>(({ icon, ...rest }) => {
23
+ const ForeignOffice = JSX<ForeignOfficeProps>(({ icon, ...rest }) => {
24
24
  const link = useLink();
25
25
  const { text, target, href, onClick } = link(rest);
26
26
 
@@ -1,10 +1,13 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
 
3
+ export type StrokeLinecap = 'inherit' | 'butt' | 'round' | 'square';
4
+ export type StrokeLinejoin = 'inherit' | 'round' | 'miter' | 'bevel';
5
+
3
6
  export interface SVGPathOptions {
4
7
  fill?: string;
5
8
  stroke?: string;
6
- strokeLinecap?: 'inherit' | 'butt' | 'round' | 'square';
7
- strokeLinejoin?: 'inherit' | 'round' | 'miter' | 'bevel';
9
+ strokeLinecap?: StrokeLinecap;
10
+ strokeLinejoin?: StrokeLinejoin;
8
11
  strokeWidth?: string;
9
12
  strokeMiterlimit?: string;
10
13
  }
@@ -1,4 +1,4 @@
1
- export const getBorderStyle = (showBorder?: boolean) =>
1
+ export const getBorderStyle = (showBorder = false) =>
2
2
  showBorder
3
3
  ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
4
4
  : '';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.14.99",
3
+ "version": "0.14.101",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -13,7 +13,7 @@ export interface DaDataResult {
13
13
  }
14
14
 
15
15
  export function LeadServiceAPI() {
16
- async function send(body: Record<string, string>, isIndividualType?: boolean) {
16
+ async function send(body: Record<string, string>, isIndividualType = false) {
17
17
  const url = isIndividualType ? '/api/v1/lead' : '/api/v1/sendcorporatelead';
18
18
 
19
19
  try {
@@ -84,11 +84,8 @@ Carousel.childrenTypes = [
84
84
  'CarouselBankHistoryCard',
85
85
  'CarouselCatalogCard',
86
86
  'CarouselInvestmentCard',
87
- 'CarouselProductCard',
88
- 'CarouselProgramsCard',
89
87
  'CarouselRecommendationCard',
90
88
  'CarouselTariffsCard',
91
- 'CarouselInvestmentCard',
92
89
  'RichTextBlock',
93
90
  'ProductBlock',
94
91
  ];
@@ -41,7 +41,7 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
41
41
  </button>
42
42
  <div
43
43
  className={style(
44
- 'absolute flex flex-col rounded-md bg-white p-xl pb-xs',
44
+ 'absolute flex flex-col rounded-md bg-white p-xl pb-xs w-56',
45
45
  visible ? '' : 'hidden',
46
46
  )}
47
47
  aria-hidden={!visible}
@@ -1,8 +1,11 @@
1
1
  import { isURL, withoutQuery } from '../../utils/url';
2
2
 
3
+ type Router = { href?: string; pathname: string };
4
+
3
5
  export const isHrefActive =
4
- (router: { href?: string; pathname: string }) =>
6
+ (router: Router) =>
5
7
  ({ href }: { href?: string }): boolean =>
6
- !href
7
- ? false
8
- : withoutQuery(isURL(href) ? router.href : router.pathname).startsWith(withoutQuery(href));
8
+ !href ? false : withoutQuery(getRouterHref(href, router)).startsWith(withoutQuery(href));
9
+
10
+ const getRouterHref = (href: string, router: Router) =>
11
+ isURL(href) ? router.href : router.pathname;
@@ -1,2 +1,2 @@
1
- export const getIconName = (isUnfolded?: boolean) =>
1
+ export const getIconName = (isUnfolded = false) =>
2
2
  isUnfolded ? 'ArrowUpSolidIcon' : 'ArrowDownSolidIcon';
@@ -1 +1 @@
1
- export const getIconName = (isUnfolded?: boolean) => (isUnfolded ? 'MinusIcon' : 'PlusIcon');
1
+ export const getIconName = (isUnfolded = false) => (isUnfolded ? 'MinusIcon' : 'PlusIcon');
@@ -28,13 +28,13 @@ export interface DispositionItem extends LinkProps {
28
28
  * @title Представительства за рубежом
29
29
  * @required ["text", "href"]
30
30
  */
31
- export type ForeignOffice = LinkProps & IconProps;
31
+ export type ForeignOfficeProps = LinkProps & IconProps;
32
32
 
33
33
  export interface SitemapData {
34
34
  topItems?: TopMenuItemProps[];
35
35
  dispositions?: DispositionItem[];
36
36
  logo?: LogoType;
37
- foreignOffices?: ForeignOffice[];
37
+ foreignOffices?: ForeignOfficeProps[];
38
38
  defaultLocation?: string;
39
39
  officesLink?: string;
40
40
  internetBankUrl?: string;
@@ -1,3 +1,4 @@
1
+ import { style } from '../../utils/style';
1
2
  import { ArrowButton } from './ArrowButton';
2
3
 
3
4
  /** @deprecated */
@@ -22,11 +23,15 @@ export function renderArrows({
22
23
  }: RenderArrowsProps) {
23
24
  const isVisible = canDec || canInc;
24
25
 
25
- return isVisible ? (
26
+ if (!isVisible) {
27
+ return null;
28
+ }
29
+
30
+ return (
26
31
  <div>
27
32
  {canDec ? (
28
33
  <ArrowButton
29
- className={`absolute z-40 ${btnClass[0]} ${className}`}
34
+ className={style('absolute z-40', btnClass[0], className)}
30
35
  onClick={dec}
31
36
  ariaLabel="Пролистать влево"
32
37
  data-block-control="scroll-left"
@@ -35,7 +40,7 @@ export function renderArrows({
35
40
  ) : null}
36
41
  {canInc ? (
37
42
  <ArrowButton
38
- className={`absolute z-40 rotate-180 ${btnClass[1]} ${className}`}
43
+ className={style('absolute z-40 rotate-180', btnClass[1], className)}
39
44
  onClick={inc}
40
45
  ariaLabel="Пролистать вправо"
41
46
  data-block-control="scroll-right"
@@ -43,5 +48,5 @@ export function renderArrows({
43
48
  />
44
49
  ) : null}
45
50
  </div>
46
- ) : null;
51
+ );
47
52
  }
@@ -1,10 +1,10 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
  import { useLink } from '../../hooks/useLink';
3
- import { ForeignOffice } from '../../services/sitemap/SitemapData';
3
+ import { type ForeignOfficeProps } from '../../services/sitemap/SitemapData';
4
4
  import { Img } from '../Img/Img';
5
5
  import { Text } from '../Text/Text';
6
6
 
7
- export const renderForeignOffices = (foreignOffices: ForeignOffice[] | undefined) =>
7
+ export const renderForeignOffices = (foreignOffices: ForeignOfficeProps[] | undefined) =>
8
8
  foreignOffices?.length ? (
9
9
  <div className="sm:border-t sm:border-main-divider mt-2xs pt-2xs">
10
10
  <div className="mb-m">
@@ -20,7 +20,7 @@ export const renderForeignOffices = (foreignOffices: ForeignOffice[] | undefined
20
20
  </div>
21
21
  ) : null;
22
22
 
23
- const ForeignOffice = JSX<ForeignOffice>(({ icon, ...rest }) => {
23
+ const ForeignOffice = JSX<ForeignOfficeProps>(({ icon, ...rest }) => {
24
24
  const link = useLink();
25
25
  const { text, target, href, onClick } = link(rest);
26
26
 
@@ -1,10 +1,13 @@
1
1
  import { JSX } from '@redneckz/uni-jsx';
2
2
 
3
+ export type StrokeLinecap = 'inherit' | 'butt' | 'round' | 'square';
4
+ export type StrokeLinejoin = 'inherit' | 'round' | 'miter' | 'bevel';
5
+
3
6
  export interface SVGPathOptions {
4
7
  fill?: string;
5
8
  stroke?: string;
6
- strokeLinecap?: 'inherit' | 'butt' | 'round' | 'square';
7
- strokeLinejoin?: 'inherit' | 'round' | 'miter' | 'bevel';
9
+ strokeLinecap?: StrokeLinecap;
10
+ strokeLinejoin?: StrokeLinejoin;
8
11
  strokeWidth?: string;
9
12
  strokeMiterlimit?: string;
10
13
  }
@@ -1,4 +1,4 @@
1
- export const getBorderStyle = (showBorder?: boolean) =>
1
+ export const getBorderStyle = (showBorder = false) =>
2
2
  showBorder
3
3
  ? 'border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider'
4
4
  : '';
@@ -1,29 +0,0 @@
1
- export const description = 'v0.11.0';
2
-
3
- export default (uniPath, content) => {
4
- if (!content?.blocks) {
5
- return content;
6
- }
7
-
8
- for (const block of content.blocks) {
9
- adjustFiltration(block);
10
- }
11
-
12
- return { ...content };
13
- };
14
-
15
- function adjustFiltration(block) {
16
- if (block.blocks) {
17
- for (const childBlock of block.blocks) {
18
- adjustFiltration(childBlock);
19
- }
20
- }
21
-
22
- if (block.type !== 'Filtration') {
23
- return;
24
- }
25
-
26
- if (block.type) {
27
- block.type = 'MortgageFiltration';
28
- }
29
- }
@@ -1,30 +0,0 @@
1
- import { renameProp } from '../utils.js';
2
-
3
- export const description = 'v0.12.9';
4
-
5
- export default (uniPath, content) => {
6
- if (!content?.blocks) {
7
- return content;
8
- }
9
-
10
- for (const block of content.blocks) {
11
- adjustCarouselProductCard(block);
12
- }
13
-
14
- return { ...content };
15
- };
16
-
17
- function adjustCarouselProductCard(block) {
18
- if (block.blocks) {
19
- for (const childBlock of block.blocks) {
20
- adjustCarouselProductCard(childBlock);
21
- }
22
- }
23
-
24
- if (block.type === 'CarouselProductCard') {
25
- const blockContent = block?.content;
26
- if (blockContent?.isFullWidth) {
27
- renameProp(blockContent, 'isFullWidth', 'isButtonFullWidth');
28
- }
29
- }
30
- }
@@ -1,36 +0,0 @@
1
- import { renameProp } from '../utils.js';
2
-
3
- export const description = 'v0.13.5';
4
-
5
- export default (uniPath, content) => {
6
- if (!content?.blocks) {
7
- return content;
8
- }
9
-
10
- for (const block of content.blocks) {
11
- adjustBlocks(block);
12
- }
13
-
14
- return { ...content };
15
- };
16
-
17
- function adjustBlocks(block) {
18
- if (block?.blocks) {
19
- for (const childBlock of block.blocks) {
20
- adjustBlocks(childBlock);
21
- }
22
- }
23
-
24
- if (block?.type === 'CarouselEventCard') {
25
- block.type = 'CarouselProductCard';
26
-
27
- const blockContent = block?.content;
28
- blockContent.isTopPosition = true;
29
- blockContent.isImageFullWidth = true;
30
- blockContent.isDotted = false;
31
-
32
- if (blockContent?.description) {
33
- renameProp(blockContent, 'description', 'additionalDescription');
34
- }
35
- }
36
- }
@@ -1,33 +0,0 @@
1
- export const description = 'v0.13.6';
2
-
3
- export default (uniPath, content) => {
4
- if (!content?.blocks) {
5
- return content;
6
- }
7
-
8
- adjustCarousel(content.blocks);
9
-
10
- return content;
11
- };
12
-
13
- function adjustCarousel(blocks) {
14
- for (const block of blocks) {
15
- if (block?.blocks && block?.content && block?.type === 'HorizontalLayout') {
16
- updateCardBorder(block);
17
- } else if (block?.blocks) {
18
- adjustCarousel(block.blocks);
19
- }
20
- }
21
- }
22
-
23
- function updateCardBorder(block) {
24
- for (const subBlock of block.blocks) {
25
- if (
26
- subBlock.type &&
27
- (subBlock.type === 'CarouselProductCard' || subBlock.type === 'CarouselProgramsCard ')
28
- ) {
29
- block.content.isCardBorder = true;
30
- break;
31
- }
32
- }
33
- }
@@ -1,55 +0,0 @@
1
- export const description = 'v0.14.26';
2
-
3
- export default (uniPath, content) => {
4
- if (!content?.blocks) {
5
- return content;
6
- }
7
-
8
- for (const block of content.blocks) {
9
- adjustCarouselRecommendationCardBlock(block);
10
- adjustCarouselProgramsCardBlock(block);
11
- }
12
-
13
- return { ...content };
14
- };
15
-
16
- function adjustCarouselProgramsCardBlock(block) {
17
- if (block.blocks) {
18
- for (const childBlock of block.blocks) {
19
- adjustCarouselProgramsCardBlock(childBlock);
20
- }
21
- }
22
-
23
- const content = block?.content;
24
- if (!content?.list?.length) {
25
- Reflect.deleteProperty(content, 'list');
26
- }
27
-
28
- if (block.type === 'CarouselProgramsCard' && content && content?.list) {
29
- content.benefits = content?.list.map((_) => ({
30
- type: 'default',
31
- label: _?.title,
32
- description: _?.description,
33
- }));
34
- Reflect.deleteProperty(content, 'list');
35
- }
36
- if (block.type === 'CarouselProgramsCard') {
37
- block.type = 'CarouselRecommendationCard';
38
- }
39
- }
40
-
41
- function adjustCarouselRecommendationCardBlock(block) {
42
- if (block.blocks) {
43
- for (const childBlock of block.blocks) {
44
- adjustCarouselRecommendationCardBlock(childBlock);
45
- }
46
- }
47
-
48
- const content = block?.content;
49
- if (block.type === 'CarouselRecommendationCard' && content && 'isImageAlwaysOnRight' in content) {
50
- content.imageOptions = {
51
- isImageAlwaysOnRight: content?.isImageAlwaysOnRight,
52
- };
53
- Reflect.deleteProperty(content, 'isImageAlwaysOnRight');
54
- }
55
- }
@@ -1,28 +0,0 @@
1
- export const description = 'v0.14.28';
2
-
3
- export default (uniPath, content) => {
4
- if (!content?.blocks) {
5
- return content;
6
- }
7
-
8
- for (const block of content.blocks) {
9
- adjustCarouselRichTextCardBlock(block);
10
- }
11
-
12
- return { ...content };
13
- };
14
-
15
- function adjustCarouselRichTextCardBlock(block) {
16
- if (block.blocks) {
17
- for (const childBlock of block.blocks) {
18
- adjustCarouselRichTextCardBlock(childBlock);
19
- }
20
- }
21
- if (block.type === 'CarouselRichTextCard' && block?.content) {
22
- block.content.richVersion = 'striped';
23
- block.content.padding = 'p-xl';
24
- }
25
- if (block.type === 'CarouselRichTextCard') {
26
- block.type = 'RichTextBlock';
27
- }
28
- }