@ashtuka/react-lib 1.0.39 → 1.0.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -2
- package/dist/chunks/LoadAbleImg-jaQDlIaY.mjs +75 -0
- package/dist/chunks/Service-uGKXRZVE.mjs +47 -0
- package/dist/chunks/breakpoints-BOwHOeQN.mjs +8 -0
- package/dist/chunks/file-C_N83pgK.mjs +5 -0
- package/dist/chunks/index-BDjvzGbZ.mjs +44 -0
- package/dist/chunks/spinner-By2573Fq.mjs +10 -0
- package/dist/components/LoadAbleImg/LoadAbleImg.d.ts +1 -1
- package/dist/constants/breakpoints.d.ts +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.es.js +7 -3
- package/dist/hooks/useBreakPoint-C-91njOc.mjs +13 -0
- package/dist/hooks/useBreakPoint.d.ts +24 -0
- package/dist/hooks/useOutsideClick-DPN2gHf5.mjs +15 -0
- package/dist/hooks/useOutsideClick.d.ts +22 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.es.js +18 -4
- package/dist/modules/AuthModule/AuthModule-wq1Xt6Op.mjs +1001 -0
- package/dist/modules/AuthModule/AuthModule.css +1 -0
- package/dist/modules/AuthModule/AuthModule.d.ts +3 -0
- package/dist/modules/AuthModule/AuthModule.types.d.ts +82 -0
- package/dist/modules/AuthModule/ButtonSpinner/ButtonSpinner.d.ts +2 -0
- package/dist/modules/AuthModule/EmailSent/EmailSent.d.ts +9 -0
- package/dist/modules/AuthModule/ErrorMessage/ErrorMessage.d.ts +11 -0
- package/dist/modules/AuthModule/InputItem/InputItem.d.ts +16 -0
- package/dist/modules/AuthModule/InputItem/PhoneInput.d.ts +13 -0
- package/dist/modules/AuthModule/LoginForm/LoginForm.d.ts +12 -0
- package/dist/modules/AuthModule/OtpInputItem/OtpInputItem.d.ts +17 -0
- package/dist/modules/AuthModule/PasswordRestoreForm/PasswordRestoreForm.d.ts +12 -0
- package/dist/modules/AuthModule/PrivacyPolicy/PrivacyPolicy.d.ts +6 -0
- package/dist/modules/AuthModule/RegistrationForm/RegistrationForm.d.ts +7 -0
- package/dist/modules/AuthModule/SocialBlock/SocialBlock.d.ts +10 -0
- package/dist/modules/AuthModule/Tabs/Tabs.d.ts +10 -0
- package/dist/modules/AuthModule/index.d.ts +2 -0
- package/dist/modules/AuthModule/index.es.js +4 -0
- package/dist/modules/AuthModule/localization.d.ts +96 -0
- package/dist/modules/AuthModule/translation.d.ts +98 -0
- package/dist/modules/AuthModule/utils/formValueCheck.d.ts +3 -0
- package/dist/modules/AuthModule/utils/getErrorDescriptionKey.d.ts +3 -0
- package/dist/modules/AuthModule/utils/getFormData.d.ts +4 -0
- package/dist/modules/AuthModule/utils/getProductDataExtraVarValue.d.ts +3 -0
- package/dist/modules/AuthModule/utils/getRegexPattern.d.ts +3 -0
- package/dist/modules/AuthModule/utils/handleKeyDown.d.ts +3 -0
- package/dist/modules/AuthModule/utils/inputClearError.d.ts +4 -0
- package/dist/modules/AuthModule/utils/inputValueCheck.d.ts +4 -0
- package/dist/modules/AuthModule/utils/isAppleDevice.d.ts +2 -0
- package/dist/modules/AuthModule/utils/isFormHasError.d.ts +3 -0
- package/dist/modules/AuthModule/utils/parseRequestError.d.ts +7 -0
- package/dist/modules/AuthModule/utils/phoneMaskHandler.d.ts +2 -0
- package/dist/modules/CrumbsModule/Crumb/Crumb.d.ts +8 -0
- package/dist/modules/CrumbsModule/Crumb/index.d.ts +1 -0
- package/dist/modules/CrumbsModule/CrumbsModule-BQIxJcqN.mjs +79 -0
- package/dist/modules/CrumbsModule/CrumbsModule.css +1 -0
- package/dist/modules/CrumbsModule/CrumbsModule.d.ts +2 -0
- package/dist/modules/CrumbsModule/CrumbsModule.types.d.ts +8 -0
- package/dist/modules/CrumbsModule/HiddenCrumbs/HiddenCrumbs.d.ts +6 -0
- package/dist/modules/CrumbsModule/HiddenCrumbs/index.d.ts +1 -0
- package/dist/modules/CrumbsModule/index.d.ts +2 -0
- package/dist/modules/CrumbsModule/index.es.js +4 -0
- package/dist/modules/DiyaModule/DesktopContent.d.ts +6 -0
- package/dist/modules/DiyaModule/DesktopTitle.d.ts +6 -0
- package/dist/modules/DiyaModule/DiyaLink.d.ts +7 -0
- package/dist/modules/DiyaModule/DiyaModule-CR7O-AA3.mjs +2159 -0
- package/dist/modules/DiyaModule/DiyaModule.css +1 -0
- package/dist/modules/DiyaModule/DiyaModule.d.ts +3 -0
- package/dist/modules/DiyaModule/DiyaModule.types.d.ts +16 -0
- package/dist/modules/DiyaModule/DownloadDiya.d.ts +6 -0
- package/dist/modules/DiyaModule/Loader.d.ts +6 -0
- package/dist/modules/DiyaModule/Qr.d.ts +8 -0
- package/dist/modules/DiyaModule/TimeOver.d.ts +6 -0
- package/dist/modules/DiyaModule/Timer.d.ts +8 -0
- package/dist/modules/DiyaModule/UpdateBtn.d.ts +7 -0
- package/dist/modules/DiyaModule/index.d.ts +2 -0
- package/dist/modules/DiyaModule/index.es.js +4 -0
- package/dist/modules/DiyaModule/utils/isMobDevice.d.ts +1 -0
- package/dist/modules/ErrorPaymentModule/ErrorPaymentModule-CyboRcvA.mjs +58 -0
- package/dist/modules/ErrorPaymentModule/ErrorPaymentModule.css +1 -0
- package/dist/modules/ErrorPaymentModule/ErrorPaymentModule.d.ts +3 -0
- package/dist/modules/ErrorPaymentModule/ErrorPaymentModule.types.d.ts +26 -0
- package/dist/modules/ErrorPaymentModule/Header/Header.d.ts +6 -0
- package/dist/modules/ErrorPaymentModule/Header/index.d.ts +2 -0
- package/dist/modules/ErrorPaymentModule/Nav/Nav.d.ts +6 -0
- package/dist/modules/ErrorPaymentModule/Nav/index.d.ts +2 -0
- package/dist/modules/ErrorPaymentModule/Picture/Picture.d.ts +5 -0
- package/dist/modules/ErrorPaymentModule/Picture/index.d.ts +2 -0
- package/dist/modules/ErrorPaymentModule/index.d.ts +2 -0
- package/dist/modules/ErrorPaymentModule/index.es.js +4 -0
- package/dist/modules/FooterV2Module/FooterV2Module-Bk6XRHqm.mjs +279 -0
- package/dist/modules/FooterV2Module/FooterV2Module.css +1 -1
- package/dist/modules/FooterV2Module/index.es.js +1 -1
- package/dist/modules/FooterV2Module/utils/index.d.ts +0 -1
- package/dist/modules/HeaderV5Module/Auth/Auth.d.ts +19 -0
- package/dist/modules/HeaderV5Module/Banner/Banner.d.ts +8 -0
- package/dist/modules/HeaderV5Module/HeaderV5Module-B9tK4bOZ.mjs +576 -0
- package/dist/modules/HeaderV5Module/HeaderV5Module.css +1 -0
- package/dist/modules/HeaderV5Module/HeaderV5Module.d.ts +2 -0
- package/dist/modules/HeaderV5Module/HeaderV5Module.types.d.ts +74 -0
- package/dist/modules/HeaderV5Module/Lang/Lang.d.ts +7 -0
- package/dist/modules/HeaderV5Module/Logo/Logo.d.ts +7 -0
- package/dist/modules/HeaderV5Module/Menu/Menu.d.ts +13 -0
- package/dist/modules/HeaderV5Module/Menu/MenuItemList/MenuItemList.d.ts +7 -0
- package/dist/modules/HeaderV5Module/Menu/MenuItemList/index.d.ts +2 -0
- package/dist/modules/HeaderV5Module/Menu/Tabs/Tabs.d.ts +20 -0
- package/dist/modules/HeaderV5Module/MenuBtn/MenuBtn.d.ts +10 -0
- package/dist/modules/HeaderV5Module/Phone/Phone.d.ts +1 -0
- package/dist/modules/HeaderV5Module/index.d.ts +2 -0
- package/dist/modules/HeaderV5Module/index.es.js +4 -0
- package/dist/modules/HeaderV5Module/useHeader.d.ts +10 -0
- package/dist/modules/HeaderV5Module/utils/bodyScrollHandler.d.ts +2 -0
- package/dist/modules/HeaderV5Module/utils/getParamFromCookie.d.ts +2 -0
- package/dist/modules/HeaderV5Module/utils/setCookieLocale.d.ts +3 -0
- package/dist/modules/HeaderV5Module/utils/setCookieParam.d.ts +2 -0
- package/dist/modules/LoadAbleImg/LoadAbleImg.css +1 -0
- package/dist/modules/OtpModule/ConditionsBlock/ConditionsBlock.d.ts +11 -0
- package/dist/modules/OtpModule/ConditionsBlock/index.d.ts +1 -0
- package/dist/modules/OtpModule/Item/Item.d.ts +11 -0
- package/dist/modules/OtpModule/Item/index.d.ts +1 -0
- package/dist/modules/OtpModule/Navigation/Navigation.d.ts +9 -0
- package/dist/modules/OtpModule/Navigation/index.d.ts +1 -0
- package/dist/modules/OtpModule/NotConfirmPopup/NotConfirmPopup.d.ts +9 -0
- package/dist/modules/OtpModule/NotConfirmPopup/index.d.ts +1 -0
- package/dist/modules/OtpModule/OtpModule-C_J1fNer.mjs +394 -0
- package/dist/modules/OtpModule/OtpModule.css +1 -0
- package/dist/modules/OtpModule/OtpModule.d.ts +2 -0
- package/dist/modules/OtpModule/OtpModule.types.d.ts +56 -0
- package/dist/modules/OtpModule/OtpPopup/OtpPopup.d.ts +9 -0
- package/dist/modules/OtpModule/OtpPopup/index.d.ts +1 -0
- package/dist/modules/OtpModule/index.d.ts +2 -0
- package/dist/modules/OtpModule/index.es.js +4 -0
- package/dist/modules/OtpModule/localization.d.ts +33 -0
- package/dist/modules/OtpModule/utils/setOtpStyleConfig.d.ts +3 -0
- package/dist/modules/PageLoaderModule/PageLoaderModule-qw6Twqhc.mjs +61 -0
- package/dist/modules/PageLoaderModule/index.es.js +1 -1
- package/dist/modules/SuccessPaymentModule/Header/Header.d.ts +6 -0
- package/dist/modules/SuccessPaymentModule/Header/index.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/InfoList/InfoList.d.ts +8 -0
- package/dist/modules/SuccessPaymentModule/InfoList/index.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/Nav/Nav.d.ts +6 -0
- package/dist/modules/SuccessPaymentModule/Nav/index.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/Picture/Picture.d.ts +5 -0
- package/dist/modules/SuccessPaymentModule/Picture/index.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/Referral/Referral.d.ts +6 -0
- package/dist/modules/SuccessPaymentModule/Referral/index.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/Referral/localization.d.ts +7 -0
- package/dist/modules/SuccessPaymentModule/SuccessPaymentModule-BizFQek6.mjs +126 -0
- package/dist/modules/SuccessPaymentModule/SuccessPaymentModule.css +1 -0
- package/dist/modules/SuccessPaymentModule/SuccessPaymentModule.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/SuccessPaymentModule.types.d.ts +36 -0
- package/dist/modules/SuccessPaymentModule/index.d.ts +2 -0
- package/dist/modules/SuccessPaymentModule/index.es.js +4 -0
- package/dist/services/AuthService.d.ts +16 -0
- package/dist/services/DesignerService.d.ts +7 -0
- package/dist/services/LayoutService.d.ts +1 -1
- package/dist/services/StrapiService.d.ts +7 -0
- package/dist/services/utils/getStrapiHost.d.ts +2 -0
- package/dist/types/Designer.d.ts +28 -0
- package/dist/types/index.d.ts +0 -1
- package/dist/utils/getAbsUrl-C3tTvhge.mjs +9 -0
- package/dist/utils/getAbsUrl.d.ts +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.es.js +4 -2
- package/package.json +16 -4
- package/dist/modules/FooterV2Module/FooterV2Module-Cd4z2v8y.mjs +0 -387
- package/dist/modules/FooterV2Module/utils/getAbsUrl.d.ts +0 -3
- package/dist/modules/PageLoaderModule/PageLoaderModule-D6yGXr6Z.mjs +0 -100
- package/dist/types/Header.d.ts +0 -34
|
@@ -1,387 +0,0 @@
|
|
|
1
|
-
var W = Object.defineProperty;
|
|
2
|
-
var R = (t, e, o) => e in t ? W(t, e, { enumerable: !0, configurable: !0, writable: !0, value: o }) : t[e] = o;
|
|
3
|
-
var w = (t, e, o) => R(t, typeof e != "symbol" ? e + "" : e, o);
|
|
4
|
-
import { jsx as r, jsxs as m } from "react/jsx-runtime";
|
|
5
|
-
import { useState as N, useRef as I, useEffect as M, useMemo as P } from "react";
|
|
6
|
-
import B from "react-localization";
|
|
7
|
-
import q from "axios";
|
|
8
|
-
import { a as G, u as x } from "../../hooks/useOnScreen-CpqVO1-u.mjs";
|
|
9
|
-
import { L as S } from "../../types/Locale-D0KYJGGt.mjs";
|
|
10
|
-
const K = () => ["localhost", "test.polis.ua", "polisua-dev.svc.cluster.local"].some((e) => window.location.hostname.includes(e)) ? "https://test.polis.ua" : "https://polis.ua";
|
|
11
|
-
class X {
|
|
12
|
-
constructor(e, o) {
|
|
13
|
-
w(this, "BASE_PATH");
|
|
14
|
-
w(this, "HOST");
|
|
15
|
-
this.BASE_PATH = o, this.HOST = e;
|
|
16
|
-
}
|
|
17
|
-
async request(e, o) {
|
|
18
|
-
let c = `${this.HOST}${this.BASE_PATH}${e}`;
|
|
19
|
-
const {
|
|
20
|
-
method: l = "GET",
|
|
21
|
-
data: u,
|
|
22
|
-
params: n,
|
|
23
|
-
headers: a
|
|
24
|
-
} = o;
|
|
25
|
-
if (n) {
|
|
26
|
-
const s = new URL(c), i = new URLSearchParams({ ...n });
|
|
27
|
-
s.search = i.toString(), c = s.toString();
|
|
28
|
-
}
|
|
29
|
-
const h = {
|
|
30
|
-
url: c.toString(),
|
|
31
|
-
method: l,
|
|
32
|
-
data: u,
|
|
33
|
-
headers: a
|
|
34
|
-
};
|
|
35
|
-
try {
|
|
36
|
-
return (await q.request(h)).data;
|
|
37
|
-
} catch (s) {
|
|
38
|
-
throw console.error(`API Error on ${l} ${e}:`, s), new Error(
|
|
39
|
-
JSON.stringify({
|
|
40
|
-
message: "Request failed",
|
|
41
|
-
endpoint: e,
|
|
42
|
-
method: l,
|
|
43
|
-
originalError: s instanceof Error ? s.message : String(s)
|
|
44
|
-
})
|
|
45
|
-
);
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const Y = K(), j = "/api";
|
|
50
|
-
class V extends X {
|
|
51
|
-
constructor() {
|
|
52
|
-
super(Y, j);
|
|
53
|
-
}
|
|
54
|
-
async fetchHeaderData() {
|
|
55
|
-
return this.request("/menu-v3/new/root", {});
|
|
56
|
-
}
|
|
57
|
-
async fetchFooterData() {
|
|
58
|
-
return this.request("/menu/footer/root", {});
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
const T = 768, L = 992, J = 1400, Q = "_container_z8lgs_1", Z = "_containerLoaded_z8lgs_30", ee = "_image_z8lgs_34", te = "_imageLoaded_z8lgs_42", g = {
|
|
62
|
-
container: Q,
|
|
63
|
-
containerLoaded: Z,
|
|
64
|
-
image: ee,
|
|
65
|
-
imageLoaded: te
|
|
66
|
-
};
|
|
67
|
-
function p(t) {
|
|
68
|
-
const { src: e, srcWebp: o = "", alt: c = "", onLoad: l = () => {
|
|
69
|
-
}, width: u = "100%", height: n = "100%" } = t, [a, h] = N(!1), s = I(null), i = I(null), _ = G(i);
|
|
70
|
-
M(() => {
|
|
71
|
-
!_ || a || s.current && (s.current.onload = () => {
|
|
72
|
-
h(!0), l();
|
|
73
|
-
});
|
|
74
|
-
}, [_, l, a]);
|
|
75
|
-
const d = o ? /* @__PURE__ */ m("picture", { children: [
|
|
76
|
-
/* @__PURE__ */ r(
|
|
77
|
-
"source",
|
|
78
|
-
{
|
|
79
|
-
style: { width: u, height: n },
|
|
80
|
-
className: a ? g.imageLoaded : g.image,
|
|
81
|
-
srcSet: o,
|
|
82
|
-
type: "image/webp"
|
|
83
|
-
}
|
|
84
|
-
),
|
|
85
|
-
/* @__PURE__ */ r(
|
|
86
|
-
"img",
|
|
87
|
-
{
|
|
88
|
-
style: { width: u, height: n },
|
|
89
|
-
ref: s,
|
|
90
|
-
className: a ? g.imageLoaded : g.image,
|
|
91
|
-
src: e,
|
|
92
|
-
alt: c,
|
|
93
|
-
referrerPolicy: "no-referrer"
|
|
94
|
-
}
|
|
95
|
-
)
|
|
96
|
-
] }) : /* @__PURE__ */ r(
|
|
97
|
-
"img",
|
|
98
|
-
{
|
|
99
|
-
style: { width: u, height: n },
|
|
100
|
-
ref: s,
|
|
101
|
-
className: a ? g.imageLoaded : g.image,
|
|
102
|
-
src: e,
|
|
103
|
-
alt: c,
|
|
104
|
-
referrerPolicy: "no-referrer"
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
return /* @__PURE__ */ r(
|
|
108
|
-
"div",
|
|
109
|
-
{
|
|
110
|
-
style: { width: u, height: n },
|
|
111
|
-
ref: i,
|
|
112
|
-
className: a ? g.containerLoaded : g.container,
|
|
113
|
-
children: (_ || a) && d
|
|
114
|
-
}
|
|
115
|
-
);
|
|
116
|
-
}
|
|
117
|
-
const re = "_phoneContainer_1n93l_1", oe = "_phone_1n93l_1", ce = "_phoneTitle_1n93l_19", k = {
|
|
118
|
-
phoneContainer: re,
|
|
119
|
-
phone: oe,
|
|
120
|
-
phoneTitle: ce
|
|
121
|
-
}, b = ({ phone: t, locale: e }) => {
|
|
122
|
-
const o = t ? `tel:${t}` : "tel:0800208824", c = new B({
|
|
123
|
-
uk: {
|
|
124
|
-
title: "(безкоштовно по Україні)"
|
|
125
|
-
},
|
|
126
|
-
ru: {
|
|
127
|
-
title: "(бесплатно по Украине)"
|
|
128
|
-
}
|
|
129
|
-
});
|
|
130
|
-
return c.setLanguage(e), /* @__PURE__ */ m("div", { className: k.phoneContainer, children: [
|
|
131
|
-
/* @__PURE__ */ r("a", { className: k.phone, href: o, children: t || "0 800 20 88 24" }),
|
|
132
|
-
!t && /* @__PURE__ */ r("p", { className: k.phoneTitle, children: c.title })
|
|
133
|
-
] });
|
|
134
|
-
}, ae = "_socialList_1agn2_1", le = {
|
|
135
|
-
socialList: ae
|
|
136
|
-
}, E = "https://polis.ua/static/img/react-modules/footerModule/social/facebook.svg", U = "https://polis.ua/static/img/react-modules/footerModule/social/youtube.svg", D = "https://polis.ua/static/img/react-modules/footerModule/social/telegram.svg", F = "https://polis.ua/static/img/react-modules/footerModule/social/tiktok.svg", z = "https://polis.ua/static/img/react-modules/footerModule/social/instagram.svg", se = [
|
|
137
|
-
{
|
|
138
|
-
id: 1,
|
|
139
|
-
iconSrc: E,
|
|
140
|
-
href: "https://www.facebook.com/polis.ua.insurance/"
|
|
141
|
-
},
|
|
142
|
-
{
|
|
143
|
-
id: 2,
|
|
144
|
-
iconSrc: U,
|
|
145
|
-
href: "https://www.youtube.com/channel/UC_OX5i3CYGk9_QdI3nUruaw"
|
|
146
|
-
},
|
|
147
|
-
{
|
|
148
|
-
id: 3,
|
|
149
|
-
iconSrc: D,
|
|
150
|
-
href: "https://t.me/polis4u"
|
|
151
|
-
},
|
|
152
|
-
{
|
|
153
|
-
id: 4,
|
|
154
|
-
iconSrc: F,
|
|
155
|
-
href: "https://www.tiktok.com/@polis.ua"
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
id: 5,
|
|
159
|
-
iconSrc: z,
|
|
160
|
-
href: "https://www.instagram.com/polis.ua/"
|
|
161
|
-
}
|
|
162
|
-
], A = ({ socialList: t, isAgent: e }) => {
|
|
163
|
-
if (e && !t) return null;
|
|
164
|
-
const o = [
|
|
165
|
-
(t == null ? void 0 : t.facebook) && {
|
|
166
|
-
id: 1,
|
|
167
|
-
iconSrc: E,
|
|
168
|
-
href: t.facebook
|
|
169
|
-
},
|
|
170
|
-
(t == null ? void 0 : t.youtube) && {
|
|
171
|
-
id: 2,
|
|
172
|
-
iconSrc: U,
|
|
173
|
-
href: t.youtube
|
|
174
|
-
},
|
|
175
|
-
(t == null ? void 0 : t.telegram) && {
|
|
176
|
-
id: 3,
|
|
177
|
-
iconSrc: D,
|
|
178
|
-
href: t.telegram
|
|
179
|
-
},
|
|
180
|
-
(t == null ? void 0 : t.tiktok) && {
|
|
181
|
-
id: 4,
|
|
182
|
-
iconSrc: F,
|
|
183
|
-
href: t.tiktok
|
|
184
|
-
},
|
|
185
|
-
(t == null ? void 0 : t.instagram) && {
|
|
186
|
-
id: 5,
|
|
187
|
-
iconSrc: z,
|
|
188
|
-
href: t.instagram
|
|
189
|
-
}
|
|
190
|
-
].filter(Boolean), c = e ? o : se;
|
|
191
|
-
return /* @__PURE__ */ r("ul", { className: le.socialList, children: c.map((l) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r("a", { href: l.href, rel: "nofollow noreferrer", target: "_blank", children: /* @__PURE__ */ r(p, { src: l.iconSrc, width: "24px", height: "24px" }) }) }, l.id)) });
|
|
192
|
-
}, ne = "_appsList_s60ek_1", ue = {
|
|
193
|
-
appsList: ne
|
|
194
|
-
}, ie = [
|
|
195
|
-
{
|
|
196
|
-
id: 1,
|
|
197
|
-
imgSrc: "https://polis.ua/static/img/react-modules/footerModule/store/apple.svg",
|
|
198
|
-
href: "https://apps.apple.com/ua/app/polis-ua/id1529609326?l=ru#?platform=iphone"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
id: 2,
|
|
202
|
-
imgSrc: "https://polis.ua/static/img/react-modules/footerModule/store/huawei.svg",
|
|
203
|
-
href: "https://appgallery.huawei.com/#/app/C103880333"
|
|
204
|
-
},
|
|
205
|
-
{
|
|
206
|
-
id: 3,
|
|
207
|
-
imgSrc: "https://polis.ua/static/img/react-modules/footerModule/store/google.svg",
|
|
208
|
-
href: "https://play.google.com/store/apps/details?id=com.polisua"
|
|
209
|
-
}
|
|
210
|
-
], C = () => /* @__PURE__ */ r("ul", { className: ue.appsList, children: ie.map((t) => /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(
|
|
211
|
-
"a",
|
|
212
|
-
{
|
|
213
|
-
href: t.href,
|
|
214
|
-
rel: "nofollow noreferrer",
|
|
215
|
-
target: "_blank",
|
|
216
|
-
children: /* @__PURE__ */ r(
|
|
217
|
-
p,
|
|
218
|
-
{
|
|
219
|
-
src: t.imgSrc,
|
|
220
|
-
width: "94px",
|
|
221
|
-
height: "32px"
|
|
222
|
-
}
|
|
223
|
-
)
|
|
224
|
-
}
|
|
225
|
-
) }, t.id)) }), O = (t, e) => {
|
|
226
|
-
let o = e;
|
|
227
|
-
const c = window.location.href;
|
|
228
|
-
return (c.includes("test") || c.includes("localhost")) && (o = o.replace("polis", "test.polis")), t === S.UK && (o = o.replace("ua/", "ua/uk")), o;
|
|
229
|
-
}, me = (t) => {
|
|
230
|
-
const e = document.querySelector(":root");
|
|
231
|
-
e && (t["--footer-bg"] && e.style.setProperty("--footer-bg", t["--footer-bg"]), t["--footer-color"] && e.style.setProperty("--footer-color", t["--footer-color"]), t["--footer-color-hover"] && e.style.setProperty("--footer-color-hover", t["--footer-color-hover"]));
|
|
232
|
-
}, he = "_header_matcm_1", de = "_logoBlock_matcm_14", ge = "_logoContainer_matcm_20", fe = "_logoText_matcm_25", _e = "_contactBlock_matcm_47", y = {
|
|
233
|
-
header: he,
|
|
234
|
-
logoBlock: de,
|
|
235
|
-
logoContainer: ge,
|
|
236
|
-
logoText: fe,
|
|
237
|
-
contactBlock: _e
|
|
238
|
-
}, ye = "https://polis.ua/static/img/react-modules/footerModule/logo/logoDesk.svg", pe = "https://polis.ua/static/img/react-modules/footerModule/logo/logoTab.svg", Se = "https://polis.ua/static/img/react-modules/footerModule/logo/logoMob.svg", we = ({ locale: t, options: e, isMob: o, isTab: c, isDesk: l, label: u }) => {
|
|
239
|
-
const { logo: n, logoWidth: a, logoHeight: h } = P(() => {
|
|
240
|
-
if (e != null && e.logoUrl) {
|
|
241
|
-
const s = e != null && e.logoWidthMob ? `${e.logoWidthMob}px` : "121px", i = e != null && e.logoWidthDesk ? `${e.logoWidthDesk}px` : "160px";
|
|
242
|
-
return {
|
|
243
|
-
logo: e.logoUrl,
|
|
244
|
-
logoWidth: (o || c) && s || l && i || "",
|
|
245
|
-
logoHeight: "auto"
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
return {
|
|
249
|
-
logo: o && Se || c && pe || l && ye || "",
|
|
250
|
-
logoWidth: o && "87px" || c && "121px" || l && "160px" || "",
|
|
251
|
-
logoHeight: o && "33px" || c && "47px" || l && "65px" || ""
|
|
252
|
-
};
|
|
253
|
-
}, [o, c, l, e]);
|
|
254
|
-
return /* @__PURE__ */ m("header", { className: y.header, children: [
|
|
255
|
-
/* @__PURE__ */ m("div", { className: y.logoBlock, children: [
|
|
256
|
-
/* @__PURE__ */ m("div", { className: y.logoContainer, children: [
|
|
257
|
-
/* @__PURE__ */ r("a", { href: (e == null ? void 0 : e.logoHref) || O(t, "https://polis.ua/"), children: /* @__PURE__ */ r(p, { src: n, width: a, height: h }) }),
|
|
258
|
-
o && /* @__PURE__ */ r(b, { phone: e == null ? void 0 : e.phone, locale: t })
|
|
259
|
-
] }),
|
|
260
|
-
/* @__PURE__ */ r("p", { className: y.logoText, children: u }),
|
|
261
|
-
o && /* @__PURE__ */ r(A, { socialList: e == null ? void 0 : e.socialNetwork, isAgent: !!e })
|
|
262
|
-
] }),
|
|
263
|
-
/* @__PURE__ */ m("div", { className: y.contactBlock, children: [
|
|
264
|
-
(c || l) && /* @__PURE__ */ r(b, { phone: e == null ? void 0 : e.phone, locale: t }),
|
|
265
|
-
(c || l) && /* @__PURE__ */ r(A, { socialList: e == null ? void 0 : e.socialNetwork, isAgent: !!e }),
|
|
266
|
-
c && !(e != null && e.hideAppStore) && /* @__PURE__ */ r(C, {})
|
|
267
|
-
] })
|
|
268
|
-
] });
|
|
269
|
-
}, xe = "_paymentSystem_naesr_1", ke = "_tas_naesr_24", $ = {
|
|
270
|
-
paymentSystem: xe,
|
|
271
|
-
tas: ke
|
|
272
|
-
}, ve = "https://polis.ua/static/img/react-modules/footerModule/visa.svg", Ne = "https://polis.ua/static/img/react-modules/footerModule/mastercard.svg", Me = ({ isMob: t }) => /* @__PURE__ */ m("div", { className: $.paymentSystem, children: [
|
|
273
|
-
/* @__PURE__ */ r(p, { src: Ne, width: t ? "32.5px" : "39px", height: t ? "20px" : "24px" }),
|
|
274
|
-
/* @__PURE__ */ r(p, { src: ve, width: t ? "66.6px" : "80px", height: t ? "20px" : "24px" }),
|
|
275
|
-
/* @__PURE__ */ r("a", { className: $.tas, href: "https://tas.ua/", rel: "nofollow noreferrer", target: "_blank", children: "TAS" })
|
|
276
|
-
] }), Ce = "_footer_gsvy8_1", Ie = "_copyrightContainer_gsvy8_22", Te = "_copyright_gsvy8_22", v = {
|
|
277
|
-
footer: Ce,
|
|
278
|
-
copyrightContainer: Ie,
|
|
279
|
-
copyright: Te
|
|
280
|
-
}, Le = ({
|
|
281
|
-
copyrightText: t,
|
|
282
|
-
isMob: e,
|
|
283
|
-
isPaymentSystem: o,
|
|
284
|
-
isAppStore: c
|
|
285
|
-
}) => /* @__PURE__ */ m("footer", { className: v.footer, children: [
|
|
286
|
-
/* @__PURE__ */ m("div", { className: v.copyrightContainer, children: [
|
|
287
|
-
/* @__PURE__ */ r("p", { className: v.copyright, children: t }),
|
|
288
|
-
o && /* @__PURE__ */ r(Me, { isMob: e })
|
|
289
|
-
] }),
|
|
290
|
-
c && /* @__PURE__ */ r(C, {})
|
|
291
|
-
] }), be = "_menuContainer_17z7x_1", Ae = "_menu_17z7x_1", $e = "_menuItemList_17z7x_52", He = "_menuItemListDouble_17z7x_69", Pe = "_menuTitle_17z7x_85", Be = "_menuItemContainer_17z7x_103", Ee = "_menuItem_17z7x_52", f = {
|
|
292
|
-
menuContainer: be,
|
|
293
|
-
menu: Ae,
|
|
294
|
-
menuItemList: $e,
|
|
295
|
-
menuItemListDouble: He,
|
|
296
|
-
menuTitle: Pe,
|
|
297
|
-
menuItemContainer: Be,
|
|
298
|
-
menuItem: Ee
|
|
299
|
-
}, Ue = ({
|
|
300
|
-
locale: t,
|
|
301
|
-
isAppList: e,
|
|
302
|
-
isMenu: o,
|
|
303
|
-
footerData: c,
|
|
304
|
-
isOption: l
|
|
305
|
-
}) => {
|
|
306
|
-
const u = P(() => c ? t === S.UK ? c.menuUk : c.menuRu : null, [c, t]), n = (a) => {
|
|
307
|
-
const h = a.items.length > 10, s = h ? Math.ceil(a.items.length / 2) : a.items.length, i = (_) => /* @__PURE__ */ r("ul", { children: _.map((d) => /* @__PURE__ */ r("li", { className: f.menuItem, children: /* @__PURE__ */ r("a", { href: O(t, d.link), children: d.name }) }, d.name)) });
|
|
308
|
-
return /* @__PURE__ */ m(
|
|
309
|
-
"li",
|
|
310
|
-
{
|
|
311
|
-
className: h || l ? f.menuItemListDouble : f.menuItemList,
|
|
312
|
-
children: [
|
|
313
|
-
/* @__PURE__ */ r("p", { className: f.menuTitle, children: a.title }),
|
|
314
|
-
/* @__PURE__ */ m("div", { className: h ? f.menuItemContainer : void 0, children: [
|
|
315
|
-
i(a.items.slice(0, s)),
|
|
316
|
-
h && i(a.items.slice(s))
|
|
317
|
-
] })
|
|
318
|
-
]
|
|
319
|
-
},
|
|
320
|
-
a.title
|
|
321
|
-
);
|
|
322
|
-
};
|
|
323
|
-
return /* @__PURE__ */ m("menu", { className: f.menuContainer, children: [
|
|
324
|
-
o && u && /* @__PURE__ */ r("ul", { className: f.menu, children: u.map(n) }),
|
|
325
|
-
e && /* @__PURE__ */ r(C, {})
|
|
326
|
-
] });
|
|
327
|
-
}, De = "_footerModuleContainer_1dtbf_7", Fe = "_footerModule_1dtbf_7", H = {
|
|
328
|
-
footerModuleContainer: De,
|
|
329
|
-
footerModule: Fe
|
|
330
|
-
}, Xe = ({ lang: t, options: e }) => {
|
|
331
|
-
const [o, c] = N(!1), [l, u] = N(null), n = (e == null ? void 0 : e.ukOnly) && S.UK || (e == null ? void 0 : e.ruOnly) && S.RU || t, a = x(0, T), h = x(T, L), s = x(L, J), i = new B({
|
|
332
|
-
uk: {
|
|
333
|
-
logoText: e != null && e.description ? e.description.uk : "Polis.ua - фінансовий онлайн-супермаркет. Загальнодержавний сервіс порівняння та оформлення кращих страхових та фінансових продуктів України. Свідомі фінансові рішення в декілька кліків.",
|
|
334
|
-
copyright: e != null && e.copyright ? e.copyright.uk : `© ТОВ «ПОЛІС.ЮА», ${(/* @__PURE__ */ new Date()).getFullYear()}. Всі права захищені.`
|
|
335
|
-
},
|
|
336
|
-
ru: {
|
|
337
|
-
logoText: e != null && e.description ? e.description.ru : "Polis.ua - финансовый онлайн-супермаркет. Общегосударственный сервис сравнения и оформления лучших страховых и финансовых продуктов Украины. Осознанные финансовые решения в несколько кликов.",
|
|
338
|
-
copyright: e != null && e.copyright ? e.copyright.ru : `© ООО «ПОЛИС.ЮА», ${(/* @__PURE__ */ new Date()).getFullYear()}. Все права защищены.`
|
|
339
|
-
}
|
|
340
|
-
});
|
|
341
|
-
return i.setLanguage(n), M(() => {
|
|
342
|
-
(async () => {
|
|
343
|
-
try {
|
|
344
|
-
const d = await new V().fetchFooterData();
|
|
345
|
-
u(d);
|
|
346
|
-
} catch (d) {
|
|
347
|
-
console.log(`An error occurred when trying fetch footer data => ${d}`), c(!0);
|
|
348
|
-
}
|
|
349
|
-
})();
|
|
350
|
-
}, []), M(() => {
|
|
351
|
-
e != null && e.stylesConfig && me(e == null ? void 0 : e.stylesConfig);
|
|
352
|
-
}, [e]), /* @__PURE__ */ r("section", { className: H.footerModuleContainer, children: /* @__PURE__ */ m("footer", { className: H.footerModule, children: [
|
|
353
|
-
/* @__PURE__ */ r(
|
|
354
|
-
we,
|
|
355
|
-
{
|
|
356
|
-
locale: n,
|
|
357
|
-
options: e,
|
|
358
|
-
isMob: a,
|
|
359
|
-
isTab: h,
|
|
360
|
-
isDesk: s,
|
|
361
|
-
label: i.logoText
|
|
362
|
-
}
|
|
363
|
-
),
|
|
364
|
-
/* @__PURE__ */ r(
|
|
365
|
-
Ue,
|
|
366
|
-
{
|
|
367
|
-
locale: n,
|
|
368
|
-
footerData: l,
|
|
369
|
-
isMenu: !o,
|
|
370
|
-
isAppList: a && !(e != null && e.hideAppStore),
|
|
371
|
-
isOption: !!e
|
|
372
|
-
}
|
|
373
|
-
),
|
|
374
|
-
/* @__PURE__ */ r(
|
|
375
|
-
Le,
|
|
376
|
-
{
|
|
377
|
-
isMob: a,
|
|
378
|
-
copyrightText: i.copyright,
|
|
379
|
-
isPaymentSystem: !e,
|
|
380
|
-
isAppStore: s && !(e != null && e.hideAppStore)
|
|
381
|
-
}
|
|
382
|
-
)
|
|
383
|
-
] }) });
|
|
384
|
-
};
|
|
385
|
-
export {
|
|
386
|
-
Xe as F
|
|
387
|
-
};
|
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
import { jsxs as c, jsx as s } from "react/jsx-runtime";
|
|
2
|
-
import { L as f } from "../../types/Locale-D0KYJGGt.mjs";
|
|
3
|
-
import _ from "react-localization";
|
|
4
|
-
function g(o) {
|
|
5
|
-
return o && o.__esModule && Object.prototype.hasOwnProperty.call(o, "default") ? o.default : o;
|
|
6
|
-
}
|
|
7
|
-
var m = { exports: {} };
|
|
8
|
-
/*!
|
|
9
|
-
Copyright (c) 2018 Jed Watson.
|
|
10
|
-
Licensed under the MIT License (MIT), see
|
|
11
|
-
http://jedwatson.github.io/classnames
|
|
12
|
-
*/
|
|
13
|
-
(function(o) {
|
|
14
|
-
(function() {
|
|
15
|
-
var d = {}.hasOwnProperty;
|
|
16
|
-
function r() {
|
|
17
|
-
for (var n = "", e = 0; e < arguments.length; e++) {
|
|
18
|
-
var a = arguments[e];
|
|
19
|
-
a && (n = i(n, l(a)));
|
|
20
|
-
}
|
|
21
|
-
return n;
|
|
22
|
-
}
|
|
23
|
-
function l(n) {
|
|
24
|
-
if (typeof n == "string" || typeof n == "number")
|
|
25
|
-
return n;
|
|
26
|
-
if (typeof n != "object")
|
|
27
|
-
return "";
|
|
28
|
-
if (Array.isArray(n))
|
|
29
|
-
return r.apply(null, n);
|
|
30
|
-
if (n.toString !== Object.prototype.toString && !n.toString.toString().includes("[native code]"))
|
|
31
|
-
return n.toString();
|
|
32
|
-
var e = "";
|
|
33
|
-
for (var a in n)
|
|
34
|
-
d.call(n, a) && n[a] && (e = i(e, a));
|
|
35
|
-
return e;
|
|
36
|
-
}
|
|
37
|
-
function i(n, e) {
|
|
38
|
-
return e ? n ? n + " " + e : n + e : n;
|
|
39
|
-
}
|
|
40
|
-
o.exports ? (r.default = r, o.exports = r) : window.classNames = r;
|
|
41
|
-
})();
|
|
42
|
-
})(m);
|
|
43
|
-
var h = m.exports;
|
|
44
|
-
const u = /* @__PURE__ */ g(h), p = new _({
|
|
45
|
-
uk: {
|
|
46
|
-
sloganRow1: "Класний пошукатор",
|
|
47
|
-
sloganRow2: "страхових"
|
|
48
|
-
},
|
|
49
|
-
ru: {
|
|
50
|
-
sloganRow1: "Классный пошукатор",
|
|
51
|
-
sloganRow2: "страховых"
|
|
52
|
-
}
|
|
53
|
-
}), w = "_container_1xrzw_1", v = "_fullScreen_1xrzw_10", x = "_loaderContainer_1xrzw_26", N = "_inner_1xrzw_34", z = "_item_1xrzw_41", S = "_logo_1xrzw_94", y = "_sloganWrap_1xrzw_99", j = "_slogan_1xrzw_99", C = "_title_1xrzw_113", t = {
|
|
54
|
-
container: w,
|
|
55
|
-
fullScreen: v,
|
|
56
|
-
loaderContainer: x,
|
|
57
|
-
inner: N,
|
|
58
|
-
item: z,
|
|
59
|
-
logo: S,
|
|
60
|
-
sloganWrap: y,
|
|
61
|
-
slogan: j,
|
|
62
|
-
title: C
|
|
63
|
-
}, W = ({
|
|
64
|
-
classes: o = "",
|
|
65
|
-
isFullScreen: d,
|
|
66
|
-
locale: r = f.UK,
|
|
67
|
-
title: l,
|
|
68
|
-
titleClasses: i = ""
|
|
69
|
-
}) => {
|
|
70
|
-
p.setLanguage(r);
|
|
71
|
-
const n = u(t.container, o, {
|
|
72
|
-
[t.fullScreen]: d
|
|
73
|
-
}), e = u(t.title, i);
|
|
74
|
-
return /* @__PURE__ */ c("div", { className: n, children: [
|
|
75
|
-
/* @__PURE__ */ c("div", { className: t.loaderContainer, children: [
|
|
76
|
-
/* @__PURE__ */ c("div", { className: t.inner, children: [
|
|
77
|
-
/* @__PURE__ */ s("div", { className: t.item, children: " " }),
|
|
78
|
-
/* @__PURE__ */ s("div", { className: t.item, children: " " }),
|
|
79
|
-
/* @__PURE__ */ s("div", { className: t.item, children: " " })
|
|
80
|
-
] }),
|
|
81
|
-
/* @__PURE__ */ s("div", { className: t.logo, children: /* @__PURE__ */ s(
|
|
82
|
-
"img",
|
|
83
|
-
{
|
|
84
|
-
width: "148px",
|
|
85
|
-
height: "40px",
|
|
86
|
-
src: "https://polis.ua/static/img/logo/logoWithFlagLine.svg",
|
|
87
|
-
alt: "Icon"
|
|
88
|
-
}
|
|
89
|
-
) }),
|
|
90
|
-
/* @__PURE__ */ c("div", { className: t.sloganWrap, children: [
|
|
91
|
-
/* @__PURE__ */ s("span", { className: t.slogan, children: p.sloganRow1 }),
|
|
92
|
-
/* @__PURE__ */ s("span", { className: t.slogan, children: p.sloganRow2 })
|
|
93
|
-
] })
|
|
94
|
-
] }),
|
|
95
|
-
l && /* @__PURE__ */ s("div", { className: e, children: l })
|
|
96
|
-
] });
|
|
97
|
-
};
|
|
98
|
-
export {
|
|
99
|
-
W as P
|
|
100
|
-
};
|
package/dist/types/Header.d.ts
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export interface MenuItem {
|
|
2
|
-
imgAddress: string;
|
|
3
|
-
label: string;
|
|
4
|
-
navigateTo: string;
|
|
5
|
-
new: boolean;
|
|
6
|
-
}
|
|
7
|
-
export interface Cabinet {
|
|
8
|
-
childs: MenuItem[];
|
|
9
|
-
link: string;
|
|
10
|
-
title: string;
|
|
11
|
-
}
|
|
12
|
-
export interface CategoryItem {
|
|
13
|
-
title: string;
|
|
14
|
-
id: string;
|
|
15
|
-
childList: MenuItem[];
|
|
16
|
-
}
|
|
17
|
-
export interface NavItem {
|
|
18
|
-
title: string;
|
|
19
|
-
_id: string;
|
|
20
|
-
imgAddress: string;
|
|
21
|
-
link?: string;
|
|
22
|
-
childs: MenuItem[];
|
|
23
|
-
categoryList: CategoryItem[];
|
|
24
|
-
}
|
|
25
|
-
export type HeaderData = {
|
|
26
|
-
uk: {
|
|
27
|
-
cabinet: Cabinet;
|
|
28
|
-
navItemNew: NavItem[];
|
|
29
|
-
};
|
|
30
|
-
ru: {
|
|
31
|
-
cabinet: Cabinet;
|
|
32
|
-
navItemNew: NavItem[];
|
|
33
|
-
};
|
|
34
|
-
};
|