md-components-mdigial-azamat 0.0.109 → 0.0.113

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 (166) hide show
  1. package/dist/ActionCardList/ActionCardList.js +32 -7
  2. package/dist/ActionCardList/index.js +1 -1
  3. package/dist/ActionCardList/info.js +1 -1
  4. package/dist/ActionCardSecondaryList/ActionCardSecondaryList.js +32 -0
  5. package/dist/ActionCardSecondaryList/index.js +6 -0
  6. package/dist/ActionCardSecondaryList/info.js +11 -0
  7. package/dist/ActionCardSecondaryList/schema.js +51 -0
  8. package/dist/ActionCardSecondaryList/types.js +4 -0
  9. package/dist/ActionIconList/ActionIconList.js +29 -4
  10. package/dist/AllComponents.js +35 -9
  11. package/dist/AllComponentsInfo.js +107 -89
  12. package/dist/AnimatedSwiper/index.js +40 -38
  13. package/dist/ButtonsList/ButtonsList.js +25 -19
  14. package/dist/CardImageList/CardImageList.js +130 -73
  15. package/dist/CardImageList/info.js +1 -1
  16. package/dist/CardImageList/schema.js +62 -0
  17. package/dist/Cards/ActionSecondaryCard/ActionSecondaryCard.js +77 -0
  18. package/dist/Cards/ActionSecondaryCard/index.js +6 -0
  19. package/dist/Cards/ActionSecondaryCard/info.js +11 -0
  20. package/dist/Cards/ActionSecondaryCard/types.js +4 -0
  21. package/dist/Cards/CardImage/CardImage.js +100 -55
  22. package/dist/Cards/CardImage/index.js +6 -1
  23. package/dist/Cards/CardImage/info.js +1 -1
  24. package/dist/Cards/CardImage/schema.js +32 -0
  25. package/dist/Cards/CardImage/types.js +3 -2
  26. package/dist/Cards/InfoCard/InfoCard.js +114 -0
  27. package/dist/Cards/InfoCard/index.js +9 -0
  28. package/dist/Cards/InfoCard/info.js +11 -0
  29. package/dist/Cards/InfoCard/schema.js +60 -0
  30. package/dist/Cards/InfoCard/types.js +4 -0
  31. package/dist/Cards/PostCard/PostCard.js +60 -0
  32. package/dist/Cards/PostCard/index.js +6 -0
  33. package/dist/Cards/PostCard/info.js +11 -0
  34. package/dist/Cards/PostCard/types.js +4 -0
  35. package/dist/Cards/WarningCard/WarningCard.js +31 -6
  36. package/dist/Cards/WarningCard/index.js +1 -1
  37. package/dist/Cards/WarningCard/info.js +1 -1
  38. package/dist/Cards/WarningCard/model.js +1 -1
  39. package/dist/CurrencyRates/CurrencyRates.js +78 -0
  40. package/dist/CurrencyRates/components/Calculator.js +101 -0
  41. package/dist/CurrencyRates/components/RateCell.js +15 -0
  42. package/dist/CurrencyRates/components/RatesTable.js +134 -0
  43. package/dist/CurrencyRates/components/index.js +6 -0
  44. package/dist/CurrencyRates/index.js +8 -0
  45. package/dist/CurrencyRates/info.js +11 -0
  46. package/dist/CurrencyRates/schema.js +63 -0
  47. package/dist/CurrencyRates/types.js +4 -0
  48. package/dist/DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js +1 -1
  49. package/dist/DownloadFile/components/DownloadFileFull/DownloadFileFull.js +1 -1
  50. package/dist/DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js +1 -1
  51. package/dist/DownloadFile/components/DownloadFileMini/DownloadFileMini.js +1 -1
  52. package/dist/DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js +1 -1
  53. package/dist/Faq/Faq.js +1 -1
  54. package/dist/Faq/components/FeedbackForm/FeedbackForm.js +55 -6
  55. package/dist/Faq/components/FeedbackForm/index.js +1 -1
  56. package/dist/FieldInput-ef2a18d4.js +2743 -0
  57. package/dist/Flex-86aee720.js +78 -0
  58. package/dist/Footer/Footer.js +5 -5
  59. package/dist/Forms/FormDefault/FormDefault.js +12 -0
  60. package/dist/Forms/FormDefault/components/FieldCustom.js +11 -0
  61. package/dist/Forms/FormDefault/components/FieldInput.js +11 -0
  62. package/dist/Forms/FormDefault/components/FieldSection.js +10 -0
  63. package/dist/Forms/FormDefault/components/FormContent.js +10 -0
  64. package/dist/Forms/FormDefault/components/FormFields.js +7 -0
  65. package/dist/Forms/FormDefault/components/FormSuccessMessage.js +49 -0
  66. package/dist/Forms/FormDefault/components/index.js +6 -0
  67. package/dist/Forms/FormDefault/hooks/index.js +10 -0
  68. package/dist/Forms/FormDefault/hooks/useFieldOptions.js +32 -0
  69. package/dist/Forms/FormDefault/hooks/useFieldValidation.js +33 -0
  70. package/dist/Forms/FormDefault/hooks/useFieldVisibility.js +24 -0
  71. package/dist/Forms/FormDefault/hooks/useFormSubmission.js +64 -0
  72. package/dist/Forms/FormDefault/index.js +6 -12
  73. package/dist/Forms/FormDefault/info.js +3 -113
  74. package/dist/Forms/FormDefault/model/componentRegistry.js +134 -0
  75. package/dist/Forms/FormDefault/model/fieldTypes.js +18 -0
  76. package/dist/Forms/FormDefault/model/formElementTypes.js +18 -0
  77. package/dist/Forms/FormDefault/model/index.js +13 -0
  78. package/dist/Forms/FormDefault/model/requestForm.js +4 -0
  79. package/dist/Forms/{model/components.js → FormDefault/schema.js} +36 -7
  80. package/dist/Forms/FormDefault/utils.js +20 -0
  81. package/dist/Grid-331af266.js +80 -0
  82. package/dist/Header/Header.js +54 -42
  83. package/dist/Header/components/HeaderMainMobile/HeaderMainMobile.js +26 -24
  84. package/dist/Header/components/HeaderMobile/HeaderMobile.js +67 -52
  85. package/dist/Header/components/HeaderSearch/HeaderSearch.js +1 -1
  86. package/dist/Header/components/HeaderTab/HeaderTab.js +17 -15
  87. package/dist/Header/components/HeaderTabsMobile/HeaderTabsMobile.js +10 -9
  88. package/dist/Header/components/HeaderWeb/HeaderWeb.js +134 -114
  89. package/dist/Header/components/TabsOutlined/TabsOutlined.js +8 -7
  90. package/dist/HeroIconsBanner/HeroIconsBanner.js +71 -54
  91. package/dist/IconList/IconList.js +59 -33
  92. package/dist/InfoCardList/InfoCardList.js +100 -0
  93. package/dist/InfoCardList/index.js +6 -0
  94. package/dist/InfoCardList/info.js +11 -0
  95. package/dist/InfoCardList/schema.js +39 -0
  96. package/dist/InfoCardList/types.js +1 -0
  97. package/dist/ModalBody/index.js +1 -1
  98. package/dist/PageViewer/renderComponents.js +1 -1
  99. package/dist/PostsList/PostsList.js +78 -0
  100. package/dist/PostsList/index.js +4 -0
  101. package/dist/PostsList/info.js +11 -0
  102. package/dist/PostsList/schema.js +49 -0
  103. package/dist/PostsList/types.js +1 -0
  104. package/dist/PostsSlider/PostsSlider.js +78 -0
  105. package/dist/PostsSlider/index.js +4 -0
  106. package/dist/PostsSlider/info.js +11 -0
  107. package/dist/PostsSlider/schema.js +49 -0
  108. package/dist/PostsSlider/types.js +1 -0
  109. package/dist/PreviewList/PreviewList.js +19 -19
  110. package/dist/PreviewList/components/PreviewCard/PreviewCard.js +29 -29
  111. package/dist/RenderAllComponents/RenderAllComponents.js +1 -1
  112. package/dist/RenderAllComponents/const.js +1 -1
  113. package/dist/SearchBlock/SearchBlock.js +101 -0
  114. package/dist/SearchBlock/index.js +4 -0
  115. package/dist/SearchBlock/info.js +11 -0
  116. package/dist/SearchBlock/schema.js +36 -0
  117. package/dist/SegmentedContent/SegmentedContent.js +160 -0
  118. package/dist/SegmentedContent/components/ContentCard.js +50 -0
  119. package/dist/SegmentedContent/components/index.js +4 -0
  120. package/dist/SegmentedContent/index.js +8 -0
  121. package/dist/SegmentedContent/info.js +12 -0
  122. package/dist/SegmentedContent/schema.js +108 -0
  123. package/dist/SegmentedContent/types.js +1 -0
  124. package/dist/Segments/Segments.js +36 -28
  125. package/dist/Segments/index.js +8 -2
  126. package/dist/Segments/info.js +1 -1
  127. package/dist/Segments/schema.js +21 -0
  128. package/dist/Segments/types.js +4 -1
  129. package/dist/SegmentsIcons/SegmentsIcons.js +92 -0
  130. package/dist/SegmentsIcons/index.js +8 -0
  131. package/dist/SegmentsIcons/info.js +11 -0
  132. package/dist/SegmentsIcons/schema.js +14 -0
  133. package/dist/SegmentsIcons/types.js +1 -0
  134. package/dist/SwiperList/SwiperList.js +13 -11
  135. package/dist/assets/index.css +1 -1
  136. package/dist/{clientApi-642fea4b.js → clientApi-ccb08ba6.js} +7 -7
  137. package/dist/{componentsMap-855b1df7.js → componentsMap-29ccdfcc.js} +6 -3
  138. package/dist/{data.mock-182979d1.js → data.mock-bb32e8ee.js} +485 -133
  139. package/dist/index-0791c17f.js +56 -0
  140. package/dist/index-2ec92a04.js +32 -0
  141. package/dist/{index-497f59a8.js → index-b795390d.js} +23 -20
  142. package/dist/index.esm-0558519f.js +1171 -0
  143. package/dist/{index.module-c8833286.js → index.module-8835bf96.js} +1 -1
  144. package/dist/info-72904479.js +791 -0
  145. package/dist/main.js +151 -116
  146. package/dist/{mousewheel-865ae601.js → mousewheel-afbc6d42.js} +1 -1
  147. package/dist/navigation-266856e7.js +136 -0
  148. package/dist/navigation-cd786a0d.js +133 -0
  149. package/dist/{palette-c2fe86ec.js → palette-256cf77a.js} +3 -1
  150. package/dist/{swiper-react-90953710.js → swiper-react-3c2710e8.js} +695 -825
  151. package/dist/trash/HeroLargeCards/index.js +7 -6
  152. package/dist/types-c3843cc0.js +4 -0
  153. package/dist/useDraggableScroll-440da9b7.js +29 -0
  154. package/dist/useTranslation-d7a3ca6f.js +298 -0
  155. package/package.json +1 -1
  156. package/dist/FileLoader/fileLoader.js +0 -22
  157. package/dist/FileLoader/index.js +0 -8
  158. package/dist/Forms/FormDefault/componentTypes.js +0 -31
  159. package/dist/Forms/FormDefault/fieldTypesList.js +0 -45
  160. package/dist/Forms/helpers/renderFormFields.js +0 -7
  161. package/dist/Forms/model/requestForm.js +0 -4
  162. package/dist/index-6686852d.js +0 -1794
  163. package/dist/index-a0ed2e4a.js +0 -1221
  164. package/dist/info-34fbb2a8.js +0 -1534
  165. package/dist/navigation-b894d0cd.js +0 -183
  166. /package/dist/Forms/{types/formItems.js → FormDefault/model/types.js} +0 -0
@@ -0,0 +1,78 @@
1
+ import { jsx as b } from "react/jsx-runtime";
2
+ import { forwardRef as h } from "react";
3
+ import { c as g } from "./cn-6a4bf187.js";
4
+ const F = {
5
+ start: "justify-start",
6
+ end: "justify-end",
7
+ center: "justify-center",
8
+ between: "justify-between",
9
+ around: "justify-around",
10
+ evenly: "justify-evenly"
11
+ }, N = {
12
+ start: "items-start",
13
+ end: "items-end",
14
+ center: "items-center",
15
+ baseline: "items-baseline",
16
+ stretch: "items-stretch"
17
+ }, P = {
18
+ start: "content-start",
19
+ end: "content-end",
20
+ center: "content-center",
21
+ between: "content-between",
22
+ around: "content-around",
23
+ evenly: "content-evenly",
24
+ stretch: "content-stretch"
25
+ }, R = {
26
+ row: "flex-row",
27
+ column: "flex-col",
28
+ "row-reverse": "flex-row-reverse",
29
+ "column-reverse": "flex-col-reverse"
30
+ }, k = {
31
+ nowrap: "flex-nowrap",
32
+ wrap: "flex-wrap",
33
+ "wrap-reverse": "flex-wrap-reverse"
34
+ }, q = h((r, s) => {
35
+ const {
36
+ children: o,
37
+ className: a,
38
+ justify: c = "start",
39
+ align: l = "start",
40
+ alignContent: n,
41
+ direction: i,
42
+ wrap: e = "nowrap",
43
+ gap: p,
44
+ as: f,
45
+ component: w,
46
+ max: m,
47
+ vertical: d,
48
+ flex: u,
49
+ style: y,
50
+ ...x
51
+ } = r, v = w || f || "div", j = d ? "column" : i || "row";
52
+ let t = "nowrap";
53
+ typeof e == "boolean" ? t = e ? "wrap" : "nowrap" : t = e;
54
+ const C = [
55
+ "flex",
56
+ F[c],
57
+ N[l],
58
+ n && P[n],
59
+ R[j],
60
+ k[t],
61
+ m && "w-full",
62
+ a
63
+ ];
64
+ return /* @__PURE__ */ b(
65
+ v,
66
+ {
67
+ ref: s,
68
+ className: g(...C),
69
+ style: { gap: p, flex: u, ...y },
70
+ ...x,
71
+ children: o
72
+ }
73
+ );
74
+ });
75
+ q.displayName = "Flex";
76
+ export {
77
+ q as F
78
+ };
@@ -1,7 +1,7 @@
1
1
  import { jsxs as j, jsx as M } from "react/jsx-runtime";
2
- import { useState as p, useEffect as v } from "react";
2
+ import { useState as b, useEffect as v } from "react";
3
3
  import { L } from "../languages-list-87ab3324.js";
4
- import { c as e } from "../clientApi-642fea4b.js";
4
+ import { c as e } from "../clientApi-ccb08ba6.js";
5
5
  import { R as i } from "../routes-76228734.js";
6
6
  import { I as f } from "../index-9384c6d6.js";
7
7
  import { c as z } from "../cn-6a4bf187.js";
@@ -252,11 +252,11 @@ function MM(D) {
252
252
  return D ? D.replace(/[^\d]/g, "") : "";
253
253
  }
254
254
  const NM = "app_language", DM = () => localStorage.getItem(NM) || L.RU, jM = "https://api.whatsapp.com/send?phone=", IM = "https://t.me/", zM = "tel:", a = "mailto:", lM = ({ footerTheme: D = "grey" }) => {
255
- const [N, T] = p(void 0);
255
+ const [N, T] = b(void 0);
256
256
  if (v(() => {
257
257
  const A = async () => {
258
258
  try {
259
- const y = DM(), g = window.location.pathname, r = g.startsWith(i.LEGAL), s = g.startsWith(i.MKASSA), o = g.startsWith(i.MBUSINESS), d = g.startsWith(i.MPLUS_PARTNERS), m = g.startsWith(i.ISLAM), h = g.startsWith(i.MISLAMIC_NEW), b = r || o || s || d ? "legal" : m || h ? "islam" : void 0, { data: O } = await q.getHeaderFooter(y, b);
259
+ const y = DM(), g = window.location.pathname, r = g.startsWith(i.LEGAL), s = g.startsWith(i.MKASSA), o = g.startsWith(i.MBUSINESS), d = g.startsWith(i.MPLUS_PARTNERS), m = g.startsWith(i.ISLAM), h = g.startsWith(i.MISLAMIC_NEW), p = r || o || s || d ? "legal" : m || h ? "islam" : void 0, { data: O } = await q.getHeaderFooter(y, p);
260
260
  O && T(O);
261
261
  } catch (y) {
262
262
  console.error("Error fetching footer data:", y);
@@ -275,7 +275,7 @@ const NM = "app_language", DM = () => localStorage.getItem(NM) || L.RU, jM = "ht
275
275
  };
276
276
  }, []), !N)
277
277
  return null;
278
- const Q = window.location.pathname === "/yuridichecskiye-litsa", u = [
278
+ const Q = typeof window < "u" ? window.location.pathname === "/yuridichecskiye-litsa" : !1, u = [
279
279
  { link: N.instagram_link, icon: /* @__PURE__ */ M(P, {}) },
280
280
  { link: N.fb_link, icon: /* @__PURE__ */ M(G, {}) },
281
281
  { link: N.ok_link, icon: /* @__PURE__ */ M(R, {}) },
@@ -0,0 +1,12 @@
1
+ import "react/jsx-runtime";
2
+ import "../../index.esm-0558519f.js";
3
+ import "../../ComponentContainer-dca711c6.js";
4
+ import "../../Flex-86aee720.js";
5
+ import { F as l } from "../../info-72904479.js";
6
+ import "./components/FormSuccessMessage.js";
7
+ import "./hooks/useFormSubmission.js";
8
+ import "react";
9
+ import "../../useTranslation-d7a3ca6f.js";
10
+ export {
11
+ l as FormDefault
12
+ };
@@ -0,0 +1,11 @@
1
+ import "react/jsx-runtime";
2
+ import "../../../index.esm-0558519f.js";
3
+ import "react";
4
+ import "../hooks/useFieldVisibility.js";
5
+ import { i as d } from "../../../info-72904479.js";
6
+ import "../model/fieldTypes.js";
7
+ import "../model/formElementTypes.js";
8
+ import "../../../requestForm-23442a57.js";
9
+ export {
10
+ d as FieldCustom
11
+ };
@@ -0,0 +1,11 @@
1
+ import "react/jsx-runtime";
2
+ import "../../../index.esm-0558519f.js";
3
+ import { F as d } from "../../../FieldInput-ef2a18d4.js";
4
+ import "react";
5
+ import "../hooks/useFieldVisibility.js";
6
+ import "../hooks/useFieldOptions.js";
7
+ import "../hooks/useFieldValidation.js";
8
+ import "../../../useTranslation-d7a3ca6f.js";
9
+ export {
10
+ d as FieldInput
11
+ };
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import "../../../index.esm-0558519f.js";
3
+ import "../../../Flex-86aee720.js";
4
+ import "react";
5
+ import "../hooks/useFieldVisibility.js";
6
+ import { j as c } from "../../../info-72904479.js";
7
+ import "../../../useTranslation-d7a3ca6f.js";
8
+ export {
9
+ c as FieldSection
10
+ };
@@ -0,0 +1,10 @@
1
+ import "react/jsx-runtime";
2
+ import "../../../index-875e92ce.js";
3
+ import "../../../const-53dff524.js";
4
+ import "../../../FieldInput-ef2a18d4.js";
5
+ import "../../../useScreenSize-c1b64c02.js";
6
+ import { l as a } from "../../../info-72904479.js";
7
+ import "../../../useTranslation-d7a3ca6f.js";
8
+ export {
9
+ a as FormContent
10
+ };
@@ -0,0 +1,7 @@
1
+ import "react/jsx-runtime";
2
+ import "react";
3
+ import { k as t } from "../../../info-72904479.js";
4
+ import "../../../FieldInput-ef2a18d4.js";
5
+ export {
6
+ t as FormFields
7
+ };
@@ -0,0 +1,49 @@
1
+ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
+ import { B as i } from "../../../index-875e92ce.js";
3
+ import { F as r } from "../../../Flex-86aee720.js";
4
+ import { C as n } from "../../../index-2ec92a04.js";
5
+ import { u as a } from "../../../useTranslation-d7a3ca6f.js";
6
+ const f = ({ onClose: o }) => {
7
+ const { t } = a();
8
+ return /* @__PURE__ */ s(
9
+ r,
10
+ {
11
+ vertical: !0,
12
+ align: "center",
13
+ className: "animate-in fade-in duration-500",
14
+ children: [
15
+ /* @__PURE__ */ e(
16
+ r,
17
+ {
18
+ align: "center",
19
+ justify: "center",
20
+ className: "w-20 h-20 rounded-full bg-gradient-to-br from-greenLight to-green mx-auto mb-6 shadow-lg animate-in zoom-in duration-500",
21
+ children: /* @__PURE__ */ e(
22
+ n,
23
+ {
24
+ size: 40,
25
+ color: "white"
26
+ }
27
+ )
28
+ }
29
+ ),
30
+ /* @__PURE__ */ e("div", { className: "font-semibold text-2xl text-center text-blackBG mb-3", children: t("form.success_title", "Заявка успешно отправлена") }),
31
+ /* @__PURE__ */ e("div", { className: "text-lg text-center text-graySoft", children: t(
32
+ "form.success_description",
33
+ "С Вами свяжется наш специалист и поможет с подключением сервиса"
34
+ ) }),
35
+ /* @__PURE__ */ e(
36
+ i,
37
+ {
38
+ className: "justify-center m-auto mt-6",
39
+ title: t("form.close", "Закрыть"),
40
+ onClick: o
41
+ }
42
+ )
43
+ ]
44
+ }
45
+ );
46
+ };
47
+ export {
48
+ f as FormSuccessMessage
49
+ };
@@ -0,0 +1,6 @@
1
+ import { l as r } from "../../../info-72904479.js";
2
+ import { FormSuccessMessage as m } from "./FormSuccessMessage.js";
3
+ export {
4
+ r as FormContent,
5
+ m as FormSuccessMessage
6
+ };
@@ -0,0 +1,10 @@
1
+ import { useFormSubmission as e } from "./useFormSubmission.js";
2
+ import { useFieldVisibility as s } from "./useFieldVisibility.js";
3
+ import { useFieldOptions as m } from "./useFieldOptions.js";
4
+ import { useFieldValidation as p } from "./useFieldValidation.js";
5
+ export {
6
+ m as useFieldOptions,
7
+ p as useFieldValidation,
8
+ s as useFieldVisibility,
9
+ e as useFormSubmission
10
+ };
@@ -0,0 +1,32 @@
1
+ import { useState as m, useEffect as b } from "react";
2
+ import { b as v } from "../../../index.esm-0558519f.js";
3
+ const U = (e) => {
4
+ var c, i, u;
5
+ const [d, l] = m([]), { watch: _ } = v(), a = (((i = (c = e.field_props) == null ? void 0 : c.optionsUrl) == null ? void 0 : i.match(/{([^}]+)}/g)) || []).map(
6
+ (t) => t.replace(/[{}]/g, "")
7
+ ), n = _(a);
8
+ return b(() => {
9
+ var t;
10
+ if (e.type === "select" && ((t = e.field_props) != null && t.optionsUrl)) {
11
+ let p = e.field_props.optionsUrl, f = !0;
12
+ a.forEach((s, r) => {
13
+ const o = n[r];
14
+ o || (f = !1), p = p.replace(`{${s}}`, String(o));
15
+ }), f ? fetch(p).then((s) => s.json()).then((s) => {
16
+ if (Array.isArray(s)) {
17
+ const r = s.map((o) => {
18
+ var h, y;
19
+ return {
20
+ label: (h = e.field_props) != null && h.labelKey ? o[e.field_props.labelKey] : o.title || o.label,
21
+ value: (y = e.field_props) != null && y.valueKey ? o[e.field_props.valueKey] : o.id || o.value
22
+ };
23
+ });
24
+ l(r);
25
+ }
26
+ }).catch((s) => console.error("Failed to fetch options", s)) : l([]);
27
+ }
28
+ }, [(u = e.field_props) == null ? void 0 : u.optionsUrl, e.type, ...n]), d;
29
+ };
30
+ export {
31
+ U as useFieldOptions
32
+ };
@@ -0,0 +1,33 @@
1
+ const p = (i, t) => {
2
+ var m, s, o;
3
+ const e = ((m = i.field_props) == null ? void 0 : m.validation) || {}, r = i.rules || {};
4
+ if (e.required && !r.required)
5
+ if (i.type === "radio") {
6
+ const a = e.required === !0 ? t("form.required_field", "Обязательное поле") : e.required;
7
+ r.validate = {
8
+ required: (n) => n != null && n !== "" || a
9
+ };
10
+ } else if (["checkbox", "file"].includes(i.type)) {
11
+ const a = e.required === !0 ? t("form.required_field", "Обязательное поле") : e.required;
12
+ r.validate = {
13
+ required: (n) => Array.isArray(n) && n.length > 0 || a
14
+ };
15
+ } else
16
+ r.required = e.required === !0 ? t("form.required_field", "Обязательное поле") : e.required;
17
+ return e.min && (r.min = e.min), e.max && (r.max = e.max), e.minLength && (r.minLength = e.minLength), e.maxLength && (r.maxLength = e.maxLength), e.pattern && (typeof e.pattern == "string" ? r.pattern = {
18
+ value: new RegExp(e.pattern),
19
+ message: t("form.invalid_format", "Неверный формат")
20
+ } : typeof e.pattern == "object" && e.pattern.value && (r.pattern = {
21
+ value: new RegExp(e.pattern.value),
22
+ message: e.pattern.message
23
+ })), (s = i.field_props) != null && s.maxLength && !r.maxLength && (r.maxLength = i.field_props.maxLength), (o = i.field_props) != null && o.minLength && !r.minLength && (r.minLength = {
24
+ value: i.field_props.minLength,
25
+ message: t(
26
+ "form.min_length",
27
+ `Минимальная длина ${i.field_props.minLength} символов`
28
+ )
29
+ }), r;
30
+ };
31
+ export {
32
+ p as useFieldValidation
33
+ };
@@ -0,0 +1,24 @@
1
+ import { a as s } from "../../../index.esm-0558519f.js";
2
+ const u = (r, i) => {
3
+ const n = s({ control: i });
4
+ return !r || r.length === 0 ? !0 : r.every((t) => {
5
+ const e = n == null ? void 0 : n[t.name];
6
+ switch (t.operator) {
7
+ case "eq":
8
+ return String(e) === String(t.value);
9
+ case "neq":
10
+ return String(e) !== String(t.value);
11
+ case "exists":
12
+ return e != null && e !== "";
13
+ case "not_exists":
14
+ return e == null || e === "";
15
+ case "includes":
16
+ return Array.isArray(e) && e.includes(t.value);
17
+ default:
18
+ return !0;
19
+ }
20
+ });
21
+ };
22
+ export {
23
+ u as useFieldVisibility
24
+ };
@@ -0,0 +1,64 @@
1
+ import { useState as r } from "react";
2
+ import { u as y } from "../../../index.esm-0558519f.js";
3
+ import { u as E } from "../../../useTranslation-d7a3ca6f.js";
4
+ const O = ({
5
+ requestForm: t,
6
+ object_data: c
7
+ }) => {
8
+ const { t: d } = E(), [S, i] = r(!1), [b, a] = r(!1), [h, l] = r(null), u = y({
9
+ defaultValues: {
10
+ agreement: !1
11
+ }
12
+ }), { reset: f } = u;
13
+ return {
14
+ form: u,
15
+ successSent: S,
16
+ isLoading: b,
17
+ submitError: h,
18
+ onSubmit: async (p) => {
19
+ if (!(t != null && t.api_url)) {
20
+ console.warn("API URL is not defined in requestForm props");
21
+ return;
22
+ }
23
+ console.log("Submit: ", p), a(!0), l(null);
24
+ try {
25
+ const s = new FormData();
26
+ Object.entries(p).forEach(([e, o]) => {
27
+ o != null && (Array.isArray(o) ? o.forEach((g) => {
28
+ s.append(e, g);
29
+ }) : s.append(e, o));
30
+ }), c && Object.entries(c).forEach(([e, o]) => {
31
+ s == null || s.append(e, o);
32
+ });
33
+ const n = await fetch(t.api_url, {
34
+ method: "POST",
35
+ // При отправке FormData заголовок Content-Type устанавливать НЕ НУЖНО
36
+ body: s
37
+ });
38
+ if (!n.ok)
39
+ throw new Error(`HTTP error! status: ${n.status}`);
40
+ const m = n.headers.get("content-type");
41
+ if (m && m.includes("application/json")) {
42
+ const e = await n.json();
43
+ console.log("Success:", e);
44
+ }
45
+ i(!0), f();
46
+ } catch (s) {
47
+ console.error("Error submitting form:", s), l(
48
+ d(
49
+ "form.submit_error",
50
+ "Произошла ошибка при отправке. Пожалуйста, попробуйте позже."
51
+ )
52
+ );
53
+ } finally {
54
+ a(!1);
55
+ }
56
+ },
57
+ handleCloseSuccess: () => {
58
+ i(!1), f();
59
+ }
60
+ };
61
+ };
62
+ export {
63
+ O as useFormSubmission
64
+ };
@@ -1,14 +1,8 @@
1
- import "react/jsx-runtime";
2
- import "react";
3
- import "../../index-a0ed2e4a.js";
4
- import "../../index-875e92ce.js";
5
- import "../../const-53dff524.js";
6
- import { F, l as d } from "../../info-34fbb2a8.js";
7
- import "../../ComponentContainer-dca711c6.js";
8
- import "../../useScreenSize-c1b64c02.js";
9
- import "../../requestForm-23442a57.js";
10
- import "../../index-6686852d.js";
1
+ import { F as s, m as a, f, o as m, n as e } from "../../info-72904479.js";
11
2
  export {
12
- F as FormDefault,
13
- d as propsToEdit
3
+ s as FormDefault,
4
+ a as FormFieldsProps,
5
+ f as formDefaultInfo,
6
+ m as formDefaultProps,
7
+ e as propsToEdit
14
8
  };
@@ -1,116 +1,6 @@
1
- import "../../Types/FiledTypes.js";
2
- import "../../ConfigProvider/index.js";
3
- import "../../Banner/Banner.js";
4
- import "../../BannerAndText/index.js";
5
- import "react/jsx-runtime";
6
- import "react";
7
- import "../../Faq/components/Collapse/Collapse.js";
8
- import "../../Header/components/HeaderTabsMobile/HeaderTabsMobile.js";
9
- import "../../HtmlContent/HtmlContent.js";
10
- import "../../Header/components/TabsOutlined/TabsOutlined.js";
11
- import "../../index-875e92ce.js";
12
- import "../../const-53dff524.js";
13
- import "../../Stepper/Stepper.js";
14
- import "../../Segments/Segments.js";
15
- import "../../Video/VideoFull/VideoFull.js";
16
- import "../../Video/VideoList/VideoList.js";
17
- import "../../Video/VideoListMini/VideoListMini.js";
18
- import "../../ContentCardList/ContentCardList.js";
19
- import "../../CardIconList/CardIconList.js";
20
- import "../../MultiCards/index.js";
21
- import "../../Partners/Partners.js";
22
- import "../../CardImageList/CardImageList.js";
23
- import "../../MainBanner/MainBanner.js";
24
- import "../../Faq/Faq.js";
25
- import "../../InstructionList/InstructionList.js";
26
- import "../../HeroPossibilityBanner/index.js";
27
- import "../../PartnersColors/PartnersColors.js";
28
- import "../../PreviewList/PreviewList.js";
29
- import "../../Cards/CardImage/CardImage.js";
30
- import "../../Cards/ContentCard/ContentCard.js";
31
- import { k as pr, f as tr, j as fr, i as sr } from "../../info-34fbb2a8.js";
32
- import "../../Cards/ColoredCard/index.js";
33
- import "../../Cards/FeaturesCard/index.js";
34
- import "../../DownloadFile/components/DownloadFileBanner/DownloadFileBanner.js";
35
- import "../../DownloadFile/components/DownloadFileFull/DownloadFileFull.js";
36
- import "../../DownloadFile/components/DownloadFileHalf/DownloadFileHalf.js";
37
- import "../../DownloadFile/components/DownloadFileMini/DownloadFileMini.js";
38
- import "../../InstructionList/components/InstructionCard/InstructionCard.js";
39
- import "../../PreviewList/components/PreviewCard/PreviewCard.js";
40
- import "../../AnimatedSwiper/index.js";
41
- import "../../CardImageSecondary/CardImageSecondary.js";
42
- import "../../CardImageSecondaryList/CardImageSecondaryList.js";
43
- import "../../CardInfoTable/index.js";
44
- import "../../DownloadFile/components/DownloadFileBright/index.js";
45
- import "../../DownloadFile/components/FileBannerSecondary/FileBannerSecondary.js";
46
- import "../../InfoBanner/index.js";
47
- import "../../InfoBannerList/InfoBannerList.js";
48
- import "../../IntroBanner/IntroBanner.js";
49
- import "../../PromoPoster/PromoPoster.js";
50
- import "../../Space/Space.js";
51
- import "../../StandartTable/index.js";
52
- import "../../SwiperList/SwiperList.js";
53
- import "../../TasksBanner/TasksBanner.js";
54
- import "../../TasksBannerList/TasksBannerList.js";
55
- import "../../TitleBlock/TitleBlock.js";
56
- import "../../VideoMainBanner/VideoMainBanner.js";
57
- import "react-dom";
58
- import "../../AnimatedSwiper/info.js";
59
- import "../../Banner/info.js";
60
- import "../../BannerAndText/info.js";
61
- import "../../HeroIconsBanner/info.js";
62
- import "../../ButtonsList/info.js";
63
- import "../../CardIconList/info.js";
64
- import "../../CardImageList/info.js";
65
- import "../../CardImageSecondary/info.js";
66
- import "../../CardImageSecondaryList/info.js";
67
- import "../../CardInfoTable/info.js";
68
- import "../../Cards/CardImage/info.js";
69
- import "../../Cards/ColoredCard/info.js";
70
- import "../../Cards/ContentCard/info.js";
71
- import "../../Cards/FeaturesCard/info.js";
72
- import "../../ContentCardList/info.js";
73
- import "../../DownloadFile/components/DownloadFileBanner/info.js";
74
- import "../../DownloadFile/components/DownloadFileBright/info.js";
75
- import "../../DownloadFile/components/DownloadFileFull/info.js";
76
- import "../../DownloadFile/components/DownloadFileHalf/info.js";
77
- import "../../DownloadFile/components/DownloadFileMini/info.js";
78
- import "../../Faq/info.js";
79
- import "../../Footer/info.js";
80
- import "../../Header/info.js";
81
- import "../../HeroPossibilityBanner/info.js";
82
- import "../../IconList/info.js";
83
- import "../../InfoBanner/info.js";
84
- import "../../InfoBannerList/info.js";
85
- import "../../InstructionList/info.js";
86
- import "../../IntroBanner/info.js";
87
- import "../../MainBanner/info.js";
88
- import "../../MultiCards/info.js";
89
- import "../../Partners/info.js";
90
- import "../../PartnersColors/info.js";
91
- import "../../PreviewList/info.js";
92
- import "../../PromoPoster/info.js";
93
- import "../../Segments/info.js";
94
- import "../../Space/info.js";
95
- import "../../StandartTable/info.js";
96
- import "../../Stepper/info.js";
97
- import "../../SwiperList/info.js";
98
- import "../../TasksBanner/info.js";
99
- import "../../TasksBannerList/info.js";
100
- import "../../Video/VideoFull/info.js";
101
- import "../../Video/VideoList/info.js";
102
- import "../../Video/VideoListMini/info.js";
103
- import "../../VideoMainBanner/info.js";
104
- import "../../Actions/types.js";
105
- import "../../Actions/projectActions.js";
106
- import "../../HeroIconsBanner/HeroIconsBanner.js";
107
- import "../../requestForm-23442a57.js";
108
1
  import "../../index-0a5f313c.js";
109
- import "./componentTypes.js";
110
- import "./fieldTypesList.js";
2
+ import { f as a, o as m } from "../../info-72904479.js";
111
3
  export {
112
- pr as FormFieldsProps,
113
- tr as formDefaultInfo,
114
- fr as formDefaultProps,
115
- sr as info
4
+ a as formDefaultInfo,
5
+ m as formDefaultProps
116
6
  };