@scbt-ecom/ui 0.76.0 → 0.76.2
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
export { Benefit, type BenefitProps } from './Benefit
|
|
1
|
+
export { Benefit, type BenefitProps } from './Benefit';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { AllowedWidgets } from './types';
|
|
2
2
|
export declare const WIDGET_LIST_MAP: {
|
|
3
3
|
readonly header: <Type extends import('../header/model/types').HeaderVariantType>(props: import('../header/model/types').HeaderProps<Type>) => import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
readonly footer: <Enabled extends boolean>({ socialsLinks, phones, ligal, copyright, classes, details, siteMap }: import('..').FooterProps<Enabled>) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
readonly interLinking: ({ variant, details, headline, mobileAccordionProps, rootAccordionProps, classes, defaultOpen }: import('..').InterLinkingProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
readonly stepper: ({ headline, details, variant, classes }: import('..').StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
readonly usefulInfo: ({ headline, tabs, classes, accordionsConfig }: import('..').UsefulInfoProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
8
|
-
readonly longBanner: <Enabled extends boolean>({ headline, buttonConfig, intent, details, image, classes }: import('..').LongBannerProps<Enabled>) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
readonly banner: ({ variant, ...props }: import('..').BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
readonly benefit: ({ headline, details, variant, classes }: import('..').BenefitProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
readonly form: <AType extends import('../dynamicForm/model').ApprovementType, CType extends import('../dynamicForm/model').ChipsType, PType extends import('../dynamicForm/model').ProgressType>({ fields, title, progress, approvement, chips, submitProps, classes }: import('..').DynamicFormProps<AType, CType, PType>) => import("react/jsx-runtime").JSX.Element;
|
|
12
4
|
readonly seoHeader: ({ categories, helpers, phone }: import('..').SeoHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
readonly banner: ({ variant, ...props }: import('..').BannerProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
6
|
readonly calculator: ({ calculators, headline }: import('..').CalculatorProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
readonly form: <AType extends import('../dynamicForm/model').ApprovementType, CType extends import('../dynamicForm/model').ChipsType, PType extends import('../dynamicForm/model').ProgressType>({ fields, title, progress, approvement, chips, submitProps, classes }: import('..').DynamicFormProps<AType, CType, PType>) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
readonly stepper: ({ headline, details, variant, classes }: import('..').StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
readonly benefit: ({ headline, details, variant, classes }: import('..').BenefitProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
readonly longBanner: <Enabled extends boolean>({ headline, buttonConfig, intent, details, image, classes }: import('..').LongBannerProps<Enabled>) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
readonly usefulInfo: ({ headline, tabs, classes, accordionsConfig }: import('..').UsefulInfoProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
12
|
+
readonly interLinking: ({ variant, details, headline, mobileAccordionProps, rootAccordionProps, classes, defaultOpen }: import('..').InterLinkingProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
readonly footer: <Enabled extends boolean>({ socialsLinks, phones, ligal, copyright, classes, details, siteMap }: import('..').FooterProps<Enabled>) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
};
|
|
15
15
|
export declare const KEYS_OF_WIDGET_LIST: readonly AllowedWidgets[];
|
|
16
|
-
export declare const widgetIds: Record<"form" | "header" | "
|
|
16
|
+
export declare const widgetIds: Record<"form" | "header" | "seoHeader" | "banner" | "calculator" | "stepper" | "benefit" | "longBanner" | "usefulInfo" | "interLinking" | "footer", "form" | "header" | "seoHeader" | "banner" | "calculator" | "stepper" | "benefit" | "longBanner" | "usefulInfo" | "interLinking" | "footer">;
|
package/dist/widget.js
CHANGED
|
@@ -14,7 +14,7 @@ var pe = (t, e, r, o) => ({
|
|
|
14
14
|
}
|
|
15
15
|
});
|
|
16
16
|
import { S as Je, x as Ge, Q as wt, y as E, z as Re, E as Nt, F as vt, G as He, J as z, T as Ct, W as It, X as Tt, Y as Mt, Z as De, _ as Pe, $ as Et, a0 as Le, a1 as ze, a2 as Ot, j as n, R as S, H as P, q as Te, i as f, B as Me, M as Ft, v as et, U as Ee, a3 as St, r as Bt, n as tt, t as je, s as _t, A as oe, c as O, a4 as Oe, a5 as Rt, L as Ht, o as Fe } from "./index-F-RYAmDP.js";
|
|
17
|
-
import { T as
|
|
17
|
+
import { T as g, c as d } from "./typeGuards-CSiImkUY.js";
|
|
18
18
|
import { u as G, g as se, b as rt, F as Dt, a as Pt } from "./useDebounce-BH0d8exl.js";
|
|
19
19
|
import * as le from "react";
|
|
20
20
|
import { useCallback as nt, useState as L, useEffect as be, createElement as ot, memo as Se, useMemo as ye, Fragment as Lt, useRef as Be, useReducer as zt, forwardRef as Qt } from "react";
|
|
@@ -134,7 +134,7 @@ var R, $e, Wt = ($e = class extends Je {
|
|
|
134
134
|
this.execute(this.state.variables);
|
|
135
135
|
}
|
|
136
136
|
async execute(e) {
|
|
137
|
-
var a, l, u, m, x, p, c, b,
|
|
137
|
+
var a, l, u, m, x, p, c, b, j, k, w, B, _, V, C, M, A, X, xe, ie;
|
|
138
138
|
const r = () => {
|
|
139
139
|
q(this, D, U).call(this, { type: "continue" });
|
|
140
140
|
};
|
|
@@ -177,8 +177,8 @@ var R, $e, Wt = ($e = class extends Je {
|
|
|
177
177
|
e,
|
|
178
178
|
this.state.context,
|
|
179
179
|
this
|
|
180
|
-
)), await ((b = (c = this.options).onSuccess) == null ? void 0 : b.call(c, v, e, this.state.context)), await ((k = (
|
|
181
|
-
|
|
180
|
+
)), await ((b = (c = this.options).onSuccess) == null ? void 0 : b.call(c, v, e, this.state.context)), await ((k = (j = h(this, T).config).onSettled) == null ? void 0 : k.call(
|
|
181
|
+
j,
|
|
182
182
|
v,
|
|
183
183
|
null,
|
|
184
184
|
this.state.variables,
|
|
@@ -397,8 +397,8 @@ function ce(t) {
|
|
|
397
397
|
function Ve(t) {
|
|
398
398
|
return {
|
|
399
399
|
onFetch: (e, r) => {
|
|
400
|
-
var p, c, b,
|
|
401
|
-
const o = e.options, i = (b = (c = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : b.direction, a = ((
|
|
400
|
+
var p, c, b, j, k;
|
|
401
|
+
const o = e.options, i = (b = (c = (p = e.fetchOptions) == null ? void 0 : p.meta) == null ? void 0 : c.fetchMore) == null ? void 0 : b.direction, a = ((j = e.state.data) == null ? void 0 : j.pages) || [], l = ((k = e.state.data) == null ? void 0 : k.pageParams) || [];
|
|
402
402
|
let u = { pages: [], pageParams: [] }, m = 0;
|
|
403
403
|
const x = async () => {
|
|
404
404
|
let w = !1;
|
|
@@ -695,7 +695,7 @@ const Jt = ({
|
|
|
695
695
|
color: u
|
|
696
696
|
}) => {
|
|
697
697
|
var w;
|
|
698
|
-
const { isDesktop: m, isMobile: x } = G(), { primary: p, secondary: c } = r || {}, b = a && "url" in a &&
|
|
698
|
+
const { isDesktop: m, isMobile: x } = G(), { primary: p, secondary: c } = r || {}, b = a && "url" in a && g.isObject(a) ? /* @__PURE__ */ n.jsx("img", { className: "h-full w-full object-cover object-center", alt: "Картинка баннера", src: a.url }) : a, j = l && "url" in l && g.isObject(l) ? /* @__PURE__ */ n.jsx("img", { className: "h-full w-full object-cover object-center", alt: "Картинка баннера", src: l.url }) : l, k = /* @__PURE__ */ n.jsx(
|
|
699
699
|
"div",
|
|
700
700
|
{
|
|
701
701
|
className: d(
|
|
@@ -714,7 +714,7 @@ const Jt = ({
|
|
|
714
714
|
style: { backgroundColor: u ?? "#d9edff" },
|
|
715
715
|
className: d("relative h-[552px] desktop:h-[456px]", i == null ? void 0 : i.root),
|
|
716
716
|
children: [
|
|
717
|
-
/* @__PURE__ */ n.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 mx-auto h-full max-w-[1920px] desktop:h-[456px]", children: x ? b :
|
|
717
|
+
/* @__PURE__ */ n.jsx("div", { className: "absolute bottom-0 left-0 right-0 top-0 mx-auto h-full max-w-[1920px] desktop:h-[456px]", children: x ? b : j }),
|
|
718
718
|
/* @__PURE__ */ n.jsxs(S, { className: d("h-full", i == null ? void 0 : i.container), children: [
|
|
719
719
|
/* @__PURE__ */ n.jsx("div", { className: d("flex h-full", i == null ? void 0 : i.wrapper), children: /* @__PURE__ */ n.jsxs("div", { className: d("flex w-[328px] flex-col gap-10 pt-6 desktop:w-full desktop:pt-20", i == null ? void 0 : i.textBlock), children: [
|
|
720
720
|
/* @__PURE__ */ n.jsxs("div", { className: "z-10 flex flex-col gap-4", children: [
|
|
@@ -780,8 +780,8 @@ const Jt = ({
|
|
|
780
780
|
imgDesktop: l,
|
|
781
781
|
color: u
|
|
782
782
|
}) => {
|
|
783
|
-
var
|
|
784
|
-
const { isMobile: m } = G(), { primary: x, secondary: p } = r || {}, c = a && "url" in a &&
|
|
783
|
+
var j, k;
|
|
784
|
+
const { isMobile: m } = G(), { primary: x, secondary: p } = r || {}, c = a && "url" in a && g.isObject(a) ? /* @__PURE__ */ n.jsx("img", { className: "w-full object-contain", alt: a.alt, src: a.url }) : a, b = l && "url" in l && g.isObject(l) ? /* @__PURE__ */ n.jsx("img", { className: "w-full object-contain", alt: l.alt, src: l.url }) : l;
|
|
785
785
|
return /* @__PURE__ */ n.jsxs(n.Fragment, { children: [
|
|
786
786
|
/* @__PURE__ */ n.jsx(
|
|
787
787
|
"section",
|
|
@@ -857,7 +857,7 @@ const Jt = ({
|
|
|
857
857
|
"items-center justify-center rounded-md bg-color-blue-grey-100 p-4 pb-8 mobile:hidden desktop:absolute desktop:bottom-[-50px] desktop:right-1/2 desktop:flex desktop:translate-x-1/2 desktop:p-0",
|
|
858
858
|
i == null ? void 0 : i.advantageContainer
|
|
859
859
|
),
|
|
860
|
-
children: (o == null ? void 0 : o.details) && ((
|
|
860
|
+
children: (o == null ? void 0 : o.details) && ((j = o == null ? void 0 : o.details) == null ? void 0 : j.items.length) > 0 && /* @__PURE__ */ n.jsx(Ie, { ...o })
|
|
861
861
|
}
|
|
862
862
|
)
|
|
863
863
|
] })
|
|
@@ -885,9 +885,9 @@ const Jt = ({
|
|
|
885
885
|
}
|
|
886
886
|
}, er = ["getFioSchema"], mt = (t, e, r) => {
|
|
887
887
|
const o = t[e];
|
|
888
|
-
if (
|
|
888
|
+
if (g.isNil(o))
|
|
889
889
|
throw new Error(`validation for type ${String(e)} not found`);
|
|
890
|
-
if (!
|
|
890
|
+
if (!g.isFunction(o))
|
|
891
891
|
throw new Error(`Cannot generate ${String(e)} because is not a function`);
|
|
892
892
|
return o(r);
|
|
893
893
|
}, tr = (t, e) => mt(at.base, t, e), rr = (t, e) => mt(at.dadata, t, e), xt = (t) => {
|
|
@@ -926,7 +926,7 @@ const Jt = ({
|
|
|
926
926
|
return pt(t, Number(e));
|
|
927
927
|
}
|
|
928
928
|
}, or = (t) => Object.values(t).reduce((r, o) => r.merge(xt(o.fields)), lt({})), ir = (t, e) => (t.match(/[a-zA-Z_$][a-zA-Z0-9_$]*/g) || []).filter((i) => !(i in e)).length > 0 ? "" : t, ct = (t, e) => {
|
|
929
|
-
const r = Object.entries(e).map(([m, x]) => [m, x
|
|
929
|
+
const r = Object.entries(e).map(([m, x]) => [m, g.isNil(x) ? "1" : x]), o = r.map(([m]) => m), i = r.map(([, m]) => m), a = ir(t, Object.fromEntries(r)), u = new Function(...o, `return ${a};`)(...i.map(Number));
|
|
930
930
|
return Number.isNaN(Number(u)) ? "0" : u.toString();
|
|
931
931
|
}, ar = (t, e) => t.map((r) => ({
|
|
932
932
|
...r,
|
|
@@ -1007,9 +1007,9 @@ const Jt = ({
|
|
|
1007
1007
|
slidersGroupConfig: t,
|
|
1008
1008
|
additionalSliderGroupConfig: e
|
|
1009
1009
|
}) => {
|
|
1010
|
-
const [r, o] = L(!1), { watch: i, setValue: a } = se(), l = t == null ? void 0 : t.fields.find(({ args: _ }) => _.name === "sum"), { args: u } = l || {}, { max: m, name: x, defaultValue: p } = u || {}, c = i(x), { min: b, name:
|
|
1010
|
+
const [r, o] = L(!1), { watch: i, setValue: a } = se(), l = t == null ? void 0 : t.fields.find(({ args: _ }) => _.name === "sum"), { args: u } = l || {}, { max: m, name: x, defaultValue: p } = u || {}, c = i(x), { min: b, name: j } = (e == null ? void 0 : e.args) ?? {}, k = i(j), w = Number(m ?? 0) - (c ?? p);
|
|
1011
1011
|
return be(() => {
|
|
1012
|
-
k > w && a(
|
|
1012
|
+
k > w && a(j, w);
|
|
1013
1013
|
}, [w, k, a, c]), be(() => {
|
|
1014
1014
|
Number(m) === c && o(!1);
|
|
1015
1015
|
}, [o, m, c]), {
|
|
@@ -1021,9 +1021,9 @@ const Jt = ({
|
|
|
1021
1021
|
sumValue: c,
|
|
1022
1022
|
additionalSliderMax: w,
|
|
1023
1023
|
onCheckedChange: () => {
|
|
1024
|
-
o((_) => !_), k <= 0 && a(
|
|
1024
|
+
o((_) => !_), k <= 0 && a(j, b), Number(m) === c && (a(x ?? "", c - fr), a(j, b));
|
|
1025
1025
|
},
|
|
1026
|
-
sliderSumExist: !
|
|
1026
|
+
sliderSumExist: !g.isObjectEmpty(l == null ? void 0 : l.args),
|
|
1027
1027
|
sliderSumCorrectType: (l == null ? void 0 : l.args.componentType) === "algorithmic" || (l == null ? void 0 : l.args.componentType) === "step"
|
|
1028
1028
|
};
|
|
1029
1029
|
}, br = (t) => {
|
|
@@ -1061,7 +1061,7 @@ const Jt = ({
|
|
|
1061
1061
|
slidersGroupConfig: t,
|
|
1062
1062
|
additionalSliderGroupConfig: e
|
|
1063
1063
|
});
|
|
1064
|
-
return
|
|
1064
|
+
return g.isNil(e == null ? void 0 : e.args) || !(e != null && e.args) ? null : /* @__PURE__ */ n.jsxs("div", { className: "flex flex-col gap-4", children: [
|
|
1065
1065
|
/* @__PURE__ */ n.jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
1066
1066
|
/* @__PURE__ */ n.jsx(Ee.SwitchBase, { checked: o, onCheckedChange: a }),
|
|
1067
1067
|
/* @__PURE__ */ n.jsx("p", { className: "desk-body-regular-l", children: "Хочу получить деньги дополнительно" })
|
|
@@ -1262,8 +1262,8 @@ class Ce {
|
|
|
1262
1262
|
l.value.split(";").forEach((p) => {
|
|
1263
1263
|
const [c, b] = p.split(":");
|
|
1264
1264
|
if (c && b) {
|
|
1265
|
-
const
|
|
1266
|
-
x[
|
|
1265
|
+
const j = c.trim().replace(/-([a-z])/g, (k, w) => w.toUpperCase());
|
|
1266
|
+
x[j] = b.trim();
|
|
1267
1267
|
}
|
|
1268
1268
|
}), m = x;
|
|
1269
1269
|
break;
|
|
@@ -1328,11 +1328,11 @@ const Ir = ({ promises: t }) => {
|
|
|
1328
1328
|
classes: l
|
|
1329
1329
|
}) => {
|
|
1330
1330
|
var V, C;
|
|
1331
|
-
const { submitCallback: u, ...m } = a || {}, [x, p] = L(!1), c = xt(t), b = dt.getZodDefaults(c), { control:
|
|
1331
|
+
const { submitCallback: u, ...m } = a || {}, [x, p] = L(!1), c = xt(t), b = dt.getZodDefaults(c), { control: j, handleSubmit: k } = rt({
|
|
1332
1332
|
schema: c,
|
|
1333
1333
|
defaultValues: b,
|
|
1334
1334
|
mode: "onBlur"
|
|
1335
|
-
}), w = Tr(r, t), B = Ut({ control:
|
|
1335
|
+
}), w = Tr(r, t), B = Ut({ control: j, fields: w || [], schema: c }), _ = (M) => {
|
|
1336
1336
|
u && u({ ...M, agree: x }), console.warn(M);
|
|
1337
1337
|
};
|
|
1338
1338
|
return /* @__PURE__ */ n.jsx(Er, { children: /* @__PURE__ */ n.jsxs(
|
|
@@ -1378,7 +1378,7 @@ const Ir = ({ promises: t }) => {
|
|
|
1378
1378
|
classes: l == null ? void 0 : l.progressBar
|
|
1379
1379
|
}
|
|
1380
1380
|
),
|
|
1381
|
-
/* @__PURE__ */ n.jsx(bt, { control:
|
|
1381
|
+
/* @__PURE__ */ n.jsx(bt, { control: j, fields: t }),
|
|
1382
1382
|
/* @__PURE__ */ n.jsxs("div", { className: "mob-body-regular-m flex flex-col items-center justify-center gap-4 desktop:flex-row desktop:justify-between", children: [
|
|
1383
1383
|
Or(o, x, p, l == null ? void 0 : l.approvement),
|
|
1384
1384
|
/* @__PURE__ */ n.jsx(
|
|
@@ -1539,7 +1539,7 @@ const Ir = ({ promises: t }) => {
|
|
|
1539
1539
|
]
|
|
1540
1540
|
}
|
|
1541
1541
|
),
|
|
1542
|
-
!
|
|
1542
|
+
!g.isArrayEmpty(a) && /* @__PURE__ */ n.jsx(_r, { details: a, classes: i == null ? void 0 : i.navLinks }),
|
|
1543
1543
|
r.enabled && /* @__PURE__ */ n.jsx(Pr, { text: r.text }),
|
|
1544
1544
|
/* @__PURE__ */ n.jsxs(
|
|
1545
1545
|
"div",
|
|
@@ -1782,7 +1782,7 @@ const Ir = ({ promises: t }) => {
|
|
|
1782
1782
|
image: i,
|
|
1783
1783
|
classes: a
|
|
1784
1784
|
}) => {
|
|
1785
|
-
const l = r === "fourItems", u = r === "twoItems", m = i && "url" in i &&
|
|
1785
|
+
const l = r === "fourItems", u = r === "twoItems", m = i && "url" in i && g.isObject(i) ? /* @__PURE__ */ n.jsx("img", { className: "w-full object-contain", alt: i.alt, src: i.url }) : i;
|
|
1786
1786
|
return /* @__PURE__ */ n.jsx("section", { id: s.longBanner, "data-test-id": s.longBanner, className: d(a == null ? void 0 : a.root), children: /* @__PURE__ */ n.jsxs(S, { className: d(a == null ? void 0 : a.container), children: [
|
|
1787
1787
|
u && /* @__PURE__ */ n.jsx(Ne, { intent: r, headline: t }),
|
|
1788
1788
|
/* @__PURE__ */ n.jsxs(
|
|
@@ -1823,8 +1823,8 @@ const Ir = ({ promises: t }) => {
|
|
|
1823
1823
|
return be(() => {
|
|
1824
1824
|
if (!it)
|
|
1825
1825
|
return;
|
|
1826
|
-
let u = window.location.pathname.split("/").filter((p) => !
|
|
1827
|
-
|
|
1826
|
+
let u = window.location.pathname.split("/").filter((p) => !g.isStringEmpty(p));
|
|
1827
|
+
g.isUndefined(t) || (g.isString(t) ? u = u.slice(u.findIndex((p) => p === t)) : u = u.slice(t)), g.isUndefined(e) || (g.isString(e) ? u = u.slice(0, u.findIndex((p) => p === e) + 1) : u = u.slice(0, e + 1));
|
|
1828
1828
|
let m = [], x = "";
|
|
1829
1829
|
if (i) {
|
|
1830
1830
|
const p = {
|
|
@@ -1869,8 +1869,8 @@ const Ir = ({ promises: t }) => {
|
|
|
1869
1869
|
const [i, a] = L(!1), l = Be(null);
|
|
1870
1870
|
Pt(l, () => a(!1));
|
|
1871
1871
|
const u = Gr(o), { first: m, middle: x, last: p } = ye(() => {
|
|
1872
|
-
let b = [],
|
|
1873
|
-
return e && (b = u.slice(0, e),
|
|
1872
|
+
let b = [], j = [], k = [];
|
|
1873
|
+
return e && (b = u.slice(0, e), j = u.slice(e, u.length - e), k = u.slice(u.length - e)), { first: b, middle: j, last: k };
|
|
1874
1874
|
}, [u, e]), c = t ?? /* @__PURE__ */ n.jsx(f, { name: "arrows/arrowRight", className: d("size-4", r == null ? void 0 : r.separator) });
|
|
1875
1875
|
return /* @__PURE__ */ n.jsx(
|
|
1876
1876
|
"div",
|
|
@@ -2000,7 +2000,7 @@ const tn = (t, e) => {
|
|
|
2000
2000
|
);
|
|
2001
2001
|
}, dn = Qt(({ category: t, active: e, onActiveTabChange: r }, o) => {
|
|
2002
2002
|
var m, x;
|
|
2003
|
-
const i = o && "current" in o ? o : null, a = (m = i == null ? void 0 : i.current) == null ? void 0 : m.getBoundingClientRect(), l = e && !
|
|
2003
|
+
const i = o && "current" in o ? o : null, a = (m = i == null ? void 0 : i.current) == null ? void 0 : m.getBoundingClientRect(), l = e && !g.isArrayEmpty(t.children), u = g.isArrayEmpty(t.children) ? "a" : "span";
|
|
2004
2004
|
return /* @__PURE__ */ n.jsxs(
|
|
2005
2005
|
Oe.div,
|
|
2006
2006
|
{
|
|
@@ -2195,10 +2195,10 @@ const tn = (t, e) => {
|
|
|
2195
2195
|
label: e.title ?? ""
|
|
2196
2196
|
})), fn = ({ categories: t, helpers: e, phone: r, ...o }) => {
|
|
2197
2197
|
const i = cn(t), [a, l] = L(i[0]), u = (x) => {
|
|
2198
|
-
|
|
2198
|
+
g.isUndefined(x) || g.isArray(x) || l(x);
|
|
2199
2199
|
}, m = ye(() => {
|
|
2200
2200
|
var x;
|
|
2201
|
-
return
|
|
2201
|
+
return g.isUndefined(a) || g.isArray(a) ? [] : ((x = t.find((p) => p.title === a.value)) == null ? void 0 : x.children) ?? [];
|
|
2202
2202
|
}, [a, t]);
|
|
2203
2203
|
return /* @__PURE__ */ n.jsxs(
|
|
2204
2204
|
Oe.div,
|
|
@@ -2216,7 +2216,7 @@ const tn = (t, e) => {
|
|
|
2216
2216
|
/* @__PURE__ */ n.jsx(Ee.SelectBase, { label: "Категория", options: i, value: a, onChange: u }),
|
|
2217
2217
|
/* @__PURE__ */ n.jsx("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: m.map((x) => {
|
|
2218
2218
|
var p;
|
|
2219
|
-
return
|
|
2219
|
+
return g.isArrayEmpty(x.children) ? /* @__PURE__ */ n.jsx("div", { className: "w-full px-4 py-2.5", children: /* @__PURE__ */ n.jsx("a", { href: (p = x.link) == null ? void 0 : p.href, className: "desk-body-regular-m inline-block w-full", children: x.title }) }, x.title) : /* @__PURE__ */ n.jsx(pn, { category: x }, x.title);
|
|
2220
2220
|
}) }),
|
|
2221
2221
|
/* @__PURE__ */ n.jsx("div", { className: "h-[1px] w-full bg-color-blue-grey-200" }),
|
|
2222
2222
|
/* @__PURE__ */ n.jsxs("div", { className: "flex w-full flex-col items-center justify-center gap-y-1", children: [
|
|
@@ -2541,16 +2541,16 @@ const tn = (t, e) => {
|
|
|
2541
2541
|
] }) });
|
|
2542
2542
|
}, Vn = {
|
|
2543
2543
|
header: Qr,
|
|
2544
|
-
|
|
2545
|
-
interLinking: Ur,
|
|
2546
|
-
stepper: sn,
|
|
2547
|
-
usefulInfo: Qn,
|
|
2548
|
-
longBanner: Jr,
|
|
2544
|
+
seoHeader: gn,
|
|
2549
2545
|
banner: Gt,
|
|
2550
|
-
|
|
2546
|
+
calculator: wr,
|
|
2551
2547
|
form: Fr,
|
|
2552
|
-
|
|
2553
|
-
|
|
2548
|
+
stepper: sn,
|
|
2549
|
+
benefit: Kn,
|
|
2550
|
+
longBanner: Jr,
|
|
2551
|
+
usefulInfo: Qn,
|
|
2552
|
+
interLinking: Ur,
|
|
2553
|
+
footer: Lr
|
|
2554
2554
|
}, An = Object.keys(Vn), s = An.reduce(
|
|
2555
2555
|
(t, e) => (t[e] = e, t),
|
|
2556
2556
|
{}
|
|
@@ -2596,7 +2596,7 @@ const tn = (t, e) => {
|
|
|
2596
2596
|
] }),
|
|
2597
2597
|
a && x && (l == null ? void 0 : l.handlerOptions) && /* @__PURE__ */ n.jsx(Z, { intent: "primary", className: d("desktop:w-[200px]", i == null ? void 0 : i.button), size: "lg", ...l })
|
|
2598
2598
|
] }),
|
|
2599
|
-
(o || x) && r && /* @__PURE__ */ n.jsx("div", { className: d("flex w-full justify-end", i == null ? void 0 : i.imgContainer), children: r && "url" in r &&
|
|
2599
|
+
(o || x) && r && /* @__PURE__ */ n.jsx("div", { className: d("flex w-full justify-end", i == null ? void 0 : i.imgContainer), children: r && "url" in r && g.isObject(r) ? /* @__PURE__ */ n.jsx("img", { className: d("h-[246px] object-cover", i == null ? void 0 : i.img), src: r.url, alt: r.alt }) : r })
|
|
2600
2600
|
]
|
|
2601
2601
|
},
|
|
2602
2602
|
e
|