@xosen/site-sdk 0.0.1 → 0.0.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.
- package/dist/index.js +391 -350
- package/package.json +1 -1
- package/src/components/layout/XSiteFooter.vue +2 -2
- package/src/components/layout/XSiteNav.vue +21 -12
package/dist/index.js
CHANGED
|
@@ -1,142 +1,172 @@
|
|
|
1
|
-
import { onMounted as
|
|
2
|
-
import { useI18n as
|
|
3
|
-
function
|
|
4
|
-
function
|
|
1
|
+
import { onMounted as X, computed as p, defineComponent as g, openBlock as o, createElementBlock as a, Fragment as h, renderList as x, normalizeClass as $, toDisplayString as _, ref as T, onUnmounted as D, resolveComponent as N, createElementVNode as d, createVNode as O, withCtx as j, createBlock as C, createTextVNode as L, createCommentVNode as u, renderSlot as H, normalizeStyle as A, resolveDynamicComponent as E, watch as I, mergeProps as M } from "vue";
|
|
2
|
+
import { useI18n as U } from "vue-i18n";
|
|
3
|
+
function z(c) {
|
|
4
|
+
function n(e) {
|
|
5
5
|
const t = document.documentElement;
|
|
6
6
|
if (e.colors)
|
|
7
|
-
for (const [r,
|
|
8
|
-
|
|
7
|
+
for (const [r, l] of Object.entries(e.colors))
|
|
8
|
+
l && t.style.setProperty(`--x-color-${G(r)}`, l);
|
|
9
9
|
e.typography?.fontFamily && t.style.setProperty("--x-font-family", e.typography.fontFamily), e.typography?.headingFont && t.style.setProperty("--x-font-heading", e.typography.headingFont), e.typography?.baseFontSize && t.style.setProperty("--x-font-size", e.typography.baseFontSize), e.shape?.borderRadius && t.style.setProperty("--x-border-radius", e.shape.borderRadius), e.shape?.maxWidth && t.style.setProperty("--x-max-width", e.shape.maxWidth);
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
X(() => {
|
|
12
12
|
if (c) {
|
|
13
|
-
|
|
13
|
+
n(c);
|
|
14
14
|
return;
|
|
15
15
|
}
|
|
16
16
|
const t = window.__SITE_DATA__?.skin;
|
|
17
|
-
t && (t.colors || t.typography || t.shape) &&
|
|
17
|
+
t && (t.colors || t.typography || t.shape) && n({
|
|
18
18
|
colors: t.colors || {},
|
|
19
19
|
typography: t.typography || {},
|
|
20
20
|
shape: t.shape || {}
|
|
21
21
|
});
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function G(c) {
|
|
25
25
|
return c.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
const c = window.__SITE_DATA__,
|
|
27
|
+
function R() {
|
|
28
|
+
const c = window.__SITE_DATA__, n = p(() => c?.config || null), e = p(() => n.value?.navigation || []), t = p(() => n.value?.locales || []), r = p(() => n.value?.defaultLocale || "en"), l = p(() => n.value?.branding || {}), s = p(() => n.value?.footer || {}), i = p(() => n.value?.features || {});
|
|
29
29
|
function f(b) {
|
|
30
|
-
const m =
|
|
30
|
+
const m = i.value[b];
|
|
31
31
|
return typeof m == "boolean" ? m : typeof m == "object";
|
|
32
32
|
}
|
|
33
33
|
return {
|
|
34
|
-
config:
|
|
34
|
+
config: n,
|
|
35
35
|
navigation: e,
|
|
36
36
|
locales: t,
|
|
37
37
|
defaultLocale: r,
|
|
38
|
-
branding:
|
|
38
|
+
branding: l,
|
|
39
39
|
footer: s,
|
|
40
|
-
features:
|
|
40
|
+
features: i,
|
|
41
41
|
hasFeature: f
|
|
42
42
|
};
|
|
43
43
|
}
|
|
44
|
-
const
|
|
44
|
+
const K = /* @__PURE__ */ g({
|
|
45
45
|
__name: "XLocaleSwitcher",
|
|
46
46
|
props: {
|
|
47
47
|
locales: { type: Array, required: !0 }
|
|
48
48
|
},
|
|
49
|
-
setup(c, { expose:
|
|
50
|
-
|
|
51
|
-
const { locale: e } =
|
|
52
|
-
function t(
|
|
53
|
-
e.value =
|
|
49
|
+
setup(c, { expose: n }) {
|
|
50
|
+
n();
|
|
51
|
+
const { locale: e } = U();
|
|
52
|
+
function t(l) {
|
|
53
|
+
e.value = l, localStorage.setItem("site-locale", l);
|
|
54
54
|
}
|
|
55
55
|
const r = { locale: e, switchLocale: t };
|
|
56
56
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
57
57
|
}
|
|
58
|
-
}), k = (c,
|
|
58
|
+
}), k = (c, n) => {
|
|
59
59
|
const e = c.__vccOpts || c;
|
|
60
|
-
for (const [t, r] of
|
|
60
|
+
for (const [t, r] of n)
|
|
61
61
|
e[t] = r;
|
|
62
62
|
return e;
|
|
63
|
-
},
|
|
64
|
-
function
|
|
65
|
-
return
|
|
66
|
-
(
|
|
67
|
-
|
|
63
|
+
}, V = { class: "x-locale-switcher" }, W = ["onClick"];
|
|
64
|
+
function J(c, n, e, t, r, l) {
|
|
65
|
+
return o(), a("div", V, [
|
|
66
|
+
(o(!0), a(
|
|
67
|
+
h,
|
|
68
68
|
null,
|
|
69
|
-
x(e.locales, (s) => (
|
|
69
|
+
x(e.locales, (s) => (o(), a("button", {
|
|
70
70
|
key: s,
|
|
71
71
|
class: $(["x-locale-switcher__btn", { "x-locale-switcher__btn--active": t.locale === s }]),
|
|
72
|
-
onClick: (
|
|
73
|
-
}, _(s.toUpperCase()), 11,
|
|
72
|
+
onClick: (i) => t.switchLocale(s)
|
|
73
|
+
}, _(s.toUpperCase()), 11, W))),
|
|
74
74
|
128
|
|
75
75
|
/* KEYED_FRAGMENT */
|
|
76
76
|
))
|
|
77
77
|
]);
|
|
78
78
|
}
|
|
79
|
-
const
|
|
79
|
+
const Y = /* @__PURE__ */ k(K, [["render", J], ["__scopeId", "data-v-675f0bbd"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/common/XLocaleSwitcher.vue"]]), Z = /* @__PURE__ */ g({
|
|
80
80
|
__name: "XSiteNav",
|
|
81
|
-
setup(c, { expose:
|
|
82
|
-
|
|
83
|
-
const { navigation: e, branding: t, locales: r } =
|
|
84
|
-
function
|
|
85
|
-
|
|
81
|
+
setup(c, { expose: n }) {
|
|
82
|
+
n();
|
|
83
|
+
const { navigation: e, branding: t, locales: r } = R(), l = T(!1), s = T(!1);
|
|
84
|
+
function i() {
|
|
85
|
+
l.value = window.scrollY > 20;
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
const f = { navigation: e, branding: t, locales: r, scrolled:
|
|
87
|
+
X(() => window.addEventListener("scroll", i)), D(() => window.removeEventListener("scroll", i));
|
|
88
|
+
const f = { navigation: e, branding: t, locales: r, scrolled: l, menuOpen: s, onScroll: i, XLocaleSwitcher: Y };
|
|
89
89
|
return Object.defineProperty(f, "__isScriptSetup", { enumerable: !1, value: !0 }), f;
|
|
90
90
|
}
|
|
91
|
-
}),
|
|
92
|
-
href: "/",
|
|
93
|
-
class: "x-nav__logo"
|
|
94
|
-
}, ee = ["src", "alt"], te = {
|
|
91
|
+
}), Q = { class: "x-nav__container" }, ee = ["src", "alt"], te = {
|
|
95
92
|
key: 1,
|
|
96
93
|
class: "x-nav__logo-text"
|
|
97
|
-
}, se = ["href"
|
|
98
|
-
function
|
|
99
|
-
|
|
94
|
+
}, se = ["href"];
|
|
95
|
+
function ne(c, n, e, t, r, l) {
|
|
96
|
+
const s = N("router-link");
|
|
97
|
+
return o(), a(
|
|
100
98
|
"nav",
|
|
101
99
|
{
|
|
102
100
|
class: $(["x-nav", { "x-nav--scrolled": t.scrolled }])
|
|
103
101
|
},
|
|
104
102
|
[
|
|
105
|
-
d("div",
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
103
|
+
d("div", Q, [
|
|
104
|
+
O(s, {
|
|
105
|
+
to: "/",
|
|
106
|
+
class: "x-nav__logo"
|
|
107
|
+
}, {
|
|
108
|
+
default: j(() => [
|
|
109
|
+
t.branding.logo ? (o(), a("img", {
|
|
110
|
+
key: 0,
|
|
111
|
+
src: t.branding.logo,
|
|
112
|
+
alt: t.branding.siteName || "",
|
|
113
|
+
class: "x-nav__logo-img"
|
|
114
|
+
}, null, 8, ee)) : (o(), a(
|
|
115
|
+
"span",
|
|
116
|
+
te,
|
|
117
|
+
_(t.branding.siteName || ""),
|
|
118
|
+
1
|
|
119
|
+
/* TEXT */
|
|
120
|
+
))
|
|
121
|
+
]),
|
|
122
|
+
_: 1
|
|
123
|
+
/* STABLE */
|
|
124
|
+
}),
|
|
120
125
|
d(
|
|
121
126
|
"div",
|
|
122
127
|
{
|
|
123
128
|
class: $(["x-nav__links", { "x-nav__links--open": t.menuOpen }])
|
|
124
129
|
},
|
|
125
130
|
[
|
|
126
|
-
(
|
|
127
|
-
|
|
131
|
+
(o(!0), a(
|
|
132
|
+
h,
|
|
128
133
|
null,
|
|
129
|
-
x(t.navigation, (
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
x(t.navigation, (i) => (o(), a(
|
|
135
|
+
h,
|
|
136
|
+
{
|
|
137
|
+
key: i.url
|
|
138
|
+
},
|
|
139
|
+
[
|
|
140
|
+
i.external ? (o(), a("a", {
|
|
141
|
+
key: 0,
|
|
142
|
+
href: i.url,
|
|
143
|
+
class: "x-nav__link",
|
|
144
|
+
target: "_blank",
|
|
145
|
+
onClick: n[0] || (n[0] = (f) => t.menuOpen = !1)
|
|
146
|
+
}, _(i.text), 9, se)) : (o(), C(s, {
|
|
147
|
+
key: 1,
|
|
148
|
+
to: i.url,
|
|
149
|
+
class: "x-nav__link",
|
|
150
|
+
onClick: n[1] || (n[1] = (f) => t.menuOpen = !1)
|
|
151
|
+
}, {
|
|
152
|
+
default: j(() => [
|
|
153
|
+
L(
|
|
154
|
+
_(i.text),
|
|
155
|
+
1
|
|
156
|
+
/* TEXT */
|
|
157
|
+
)
|
|
158
|
+
]),
|
|
159
|
+
_: 2
|
|
160
|
+
/* DYNAMIC */
|
|
161
|
+
}, 1032, ["to"]))
|
|
162
|
+
],
|
|
163
|
+
64
|
|
164
|
+
/* STABLE_FRAGMENT */
|
|
165
|
+
))),
|
|
136
166
|
128
|
|
137
167
|
/* KEYED_FRAGMENT */
|
|
138
168
|
)),
|
|
139
|
-
t.locales.length > 1 ? (
|
|
169
|
+
t.locales.length > 1 ? (o(), C(t.XLocaleSwitcher, {
|
|
140
170
|
key: 0,
|
|
141
171
|
locales: t.locales
|
|
142
172
|
}, null, 8, ["locales"])) : u("v-if", !0)
|
|
@@ -146,8 +176,8 @@ function oe(c, o, e, t, r, i) {
|
|
|
146
176
|
),
|
|
147
177
|
d("button", {
|
|
148
178
|
class: "x-nav__hamburger",
|
|
149
|
-
onClick:
|
|
150
|
-
}, [...
|
|
179
|
+
onClick: n[2] || (n[2] = (i) => t.menuOpen = !t.menuOpen)
|
|
180
|
+
}, [...n[3] || (n[3] = [
|
|
151
181
|
d(
|
|
152
182
|
"span",
|
|
153
183
|
null,
|
|
@@ -176,39 +206,50 @@ function oe(c, o, e, t, r, i) {
|
|
|
176
206
|
/* CLASS */
|
|
177
207
|
);
|
|
178
208
|
}
|
|
179
|
-
const
|
|
209
|
+
const oe = /* @__PURE__ */ k(Z, [["render", ne], ["__scopeId", "data-v-07c4b748"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteNav.vue"]]), ae = /* @__PURE__ */ g({
|
|
180
210
|
__name: "XSiteFooter",
|
|
181
|
-
setup(c, { expose:
|
|
182
|
-
|
|
183
|
-
const { footer: e, branding: t } =
|
|
184
|
-
return Object.defineProperty(
|
|
211
|
+
setup(c, { expose: n }) {
|
|
212
|
+
n();
|
|
213
|
+
const { footer: e, branding: t } = R(), r = p(() => e.value.copyright ? e.value.copyright : `© ${(/* @__PURE__ */ new Date()).getFullYear()} ${t.value.siteName || ""}`), l = { footerConfig: e, branding: t, copyright: r };
|
|
214
|
+
return Object.defineProperty(l, "__isScriptSetup", { enumerable: !1, value: !0 }), l;
|
|
185
215
|
}
|
|
186
216
|
}), re = { class: "x-footer" }, ce = { class: "x-footer__container" }, ie = {
|
|
187
217
|
key: 0,
|
|
188
218
|
class: "x-footer__links"
|
|
189
|
-
}, le =
|
|
219
|
+
}, le = {
|
|
190
220
|
key: 1,
|
|
191
221
|
class: "x-footer__copyright"
|
|
192
222
|
};
|
|
193
|
-
function
|
|
194
|
-
|
|
223
|
+
function _e(c, n, e, t, r, l) {
|
|
224
|
+
const s = N("router-link");
|
|
225
|
+
return o(), a("footer", re, [
|
|
195
226
|
d("div", ce, [
|
|
196
|
-
t.footerConfig.links?.length ? (
|
|
197
|
-
(
|
|
198
|
-
|
|
227
|
+
t.footerConfig.links?.length ? (o(), a("div", ie, [
|
|
228
|
+
(o(!0), a(
|
|
229
|
+
h,
|
|
199
230
|
null,
|
|
200
|
-
x(t.footerConfig.links, (
|
|
201
|
-
key:
|
|
202
|
-
|
|
231
|
+
x(t.footerConfig.links, (i) => (o(), C(s, {
|
|
232
|
+
key: i.url,
|
|
233
|
+
to: i.url,
|
|
203
234
|
class: "x-footer__link"
|
|
204
|
-
},
|
|
235
|
+
}, {
|
|
236
|
+
default: j(() => [
|
|
237
|
+
L(
|
|
238
|
+
_(i.text),
|
|
239
|
+
1
|
|
240
|
+
/* TEXT */
|
|
241
|
+
)
|
|
242
|
+
]),
|
|
243
|
+
_: 2
|
|
244
|
+
/* DYNAMIC */
|
|
245
|
+
}, 1032, ["to"]))),
|
|
205
246
|
128
|
|
206
247
|
/* KEYED_FRAGMENT */
|
|
207
248
|
))
|
|
208
249
|
])) : u("v-if", !0),
|
|
209
|
-
t.copyright ? (
|
|
250
|
+
t.copyright ? (o(), a(
|
|
210
251
|
"p",
|
|
211
|
-
|
|
252
|
+
le,
|
|
212
253
|
_(t.copyright),
|
|
213
254
|
1
|
|
214
255
|
/* TEXT */
|
|
@@ -216,105 +257,105 @@ function ue(c, o, e, t, r, i) {
|
|
|
216
257
|
])
|
|
217
258
|
]);
|
|
218
259
|
}
|
|
219
|
-
const
|
|
260
|
+
const ue = /* @__PURE__ */ k(ae, [["render", _e], ["__scopeId", "data-v-f9b38381"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteFooter.vue"]]), de = /* @__PURE__ */ g({
|
|
220
261
|
__name: "XSiteLayout",
|
|
221
|
-
setup(c, { expose:
|
|
222
|
-
|
|
223
|
-
const e = { XSiteNav:
|
|
262
|
+
setup(c, { expose: n }) {
|
|
263
|
+
n(), z();
|
|
264
|
+
const e = { XSiteNav: oe, XSiteFooter: ue };
|
|
224
265
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
225
266
|
}
|
|
226
|
-
}),
|
|
227
|
-
function
|
|
228
|
-
return
|
|
267
|
+
}), fe = { class: "x-site-layout" }, pe = { class: "x-site-layout__main" };
|
|
268
|
+
function me(c, n, e, t, r, l) {
|
|
269
|
+
return o(), a("div", fe, [
|
|
229
270
|
O(t.XSiteNav),
|
|
230
|
-
d("main",
|
|
231
|
-
|
|
271
|
+
d("main", pe, [
|
|
272
|
+
H(c.$slots, "default", {}, void 0, !0)
|
|
232
273
|
]),
|
|
233
274
|
O(t.XSiteFooter)
|
|
234
275
|
]);
|
|
235
276
|
}
|
|
236
|
-
const
|
|
277
|
+
const Ft = /* @__PURE__ */ k(de, [["render", me], ["__scopeId", "data-v-41b0f2a9"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/layout/XSiteLayout.vue"]]), ve = /* @__PURE__ */ g({
|
|
237
278
|
__name: "XHeroBlock",
|
|
238
279
|
props: {
|
|
239
280
|
data: { type: Object, required: !0 },
|
|
240
281
|
variant: { type: String, required: !1, default: "fullscreen" }
|
|
241
282
|
},
|
|
242
|
-
setup(c, { expose:
|
|
243
|
-
|
|
283
|
+
setup(c, { expose: n }) {
|
|
284
|
+
n();
|
|
244
285
|
const e = c, t = p(() => e.data.image ? { backgroundImage: `url(${e.data.image})` } : {}), r = { props: e, bgStyle: t };
|
|
245
286
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
246
287
|
}
|
|
247
|
-
}),
|
|
288
|
+
}), he = {
|
|
248
289
|
key: 0,
|
|
249
290
|
class: "x-hero__overlay"
|
|
250
|
-
},
|
|
291
|
+
}, xe = { class: "x-hero__content" }, ye = {
|
|
251
292
|
key: 0,
|
|
252
293
|
class: "x-hero__title"
|
|
253
|
-
},
|
|
294
|
+
}, ge = {
|
|
254
295
|
key: 1,
|
|
255
296
|
class: "x-hero__subtitle"
|
|
256
|
-
},
|
|
297
|
+
}, ke = {
|
|
257
298
|
key: 2,
|
|
258
299
|
class: "x-hero__buttons"
|
|
259
|
-
},
|
|
300
|
+
}, be = ["href"], $e = {
|
|
260
301
|
key: 3,
|
|
261
302
|
class: "x-hero__stats"
|
|
262
|
-
},
|
|
263
|
-
function
|
|
264
|
-
return
|
|
303
|
+
}, Se = { class: "x-hero__stat-value" }, we = { class: "x-hero__stat-label" };
|
|
304
|
+
function Te(c, n, e, t, r, l) {
|
|
305
|
+
return o(), a(
|
|
265
306
|
"section",
|
|
266
307
|
{
|
|
267
308
|
class: $(["x-hero", { "x-hero--fullscreen": e.variant === "fullscreen" }]),
|
|
268
|
-
style:
|
|
309
|
+
style: A(t.bgStyle)
|
|
269
310
|
},
|
|
270
311
|
[
|
|
271
|
-
e.data.image && e.data.overlay !== !1 ? (
|
|
272
|
-
d("div",
|
|
273
|
-
e.data.title ? (
|
|
312
|
+
e.data.image && e.data.overlay !== !1 ? (o(), a("div", he)) : u("v-if", !0),
|
|
313
|
+
d("div", xe, [
|
|
314
|
+
e.data.title ? (o(), a(
|
|
274
315
|
"h1",
|
|
275
|
-
|
|
316
|
+
ye,
|
|
276
317
|
_(e.data.title),
|
|
277
318
|
1
|
|
278
319
|
/* TEXT */
|
|
279
320
|
)) : u("v-if", !0),
|
|
280
|
-
e.data.subtitle ? (
|
|
321
|
+
e.data.subtitle ? (o(), a(
|
|
281
322
|
"p",
|
|
282
|
-
|
|
323
|
+
ge,
|
|
283
324
|
_(e.data.subtitle),
|
|
284
325
|
1
|
|
285
326
|
/* TEXT */
|
|
286
327
|
)) : u("v-if", !0),
|
|
287
|
-
e.data.buttons?.length ? (
|
|
288
|
-
(
|
|
289
|
-
|
|
328
|
+
e.data.buttons?.length ? (o(), a("div", ke, [
|
|
329
|
+
(o(!0), a(
|
|
330
|
+
h,
|
|
290
331
|
null,
|
|
291
|
-
x(e.data.buttons, (s,
|
|
292
|
-
key:
|
|
332
|
+
x(e.data.buttons, (s, i) => (o(), a("a", {
|
|
333
|
+
key: i,
|
|
293
334
|
href: s.url,
|
|
294
335
|
class: $(["x-btn", `x-btn--${s.variant || "primary"}`])
|
|
295
|
-
}, _(s.text), 11,
|
|
336
|
+
}, _(s.text), 11, be))),
|
|
296
337
|
128
|
|
297
338
|
/* KEYED_FRAGMENT */
|
|
298
339
|
))
|
|
299
340
|
])) : u("v-if", !0),
|
|
300
|
-
e.data.stats?.length ? (
|
|
301
|
-
(
|
|
302
|
-
|
|
341
|
+
e.data.stats?.length ? (o(), a("div", $e, [
|
|
342
|
+
(o(!0), a(
|
|
343
|
+
h,
|
|
303
344
|
null,
|
|
304
|
-
x(e.data.stats, (s,
|
|
305
|
-
key:
|
|
345
|
+
x(e.data.stats, (s, i) => (o(), a("div", {
|
|
346
|
+
key: i,
|
|
306
347
|
class: "x-hero__stat"
|
|
307
348
|
}, [
|
|
308
349
|
d(
|
|
309
350
|
"span",
|
|
310
|
-
|
|
351
|
+
Se,
|
|
311
352
|
_(s.value),
|
|
312
353
|
1
|
|
313
354
|
/* TEXT */
|
|
314
355
|
),
|
|
315
356
|
d(
|
|
316
357
|
"span",
|
|
317
|
-
|
|
358
|
+
we,
|
|
318
359
|
_(s.label),
|
|
319
360
|
1
|
|
320
361
|
/* TEXT */
|
|
@@ -330,35 +371,35 @@ function je(c, o, e, t, r, i) {
|
|
|
330
371
|
/* CLASS, STYLE */
|
|
331
372
|
);
|
|
332
373
|
}
|
|
333
|
-
const Ce = /* @__PURE__ */ k(ve, [["render",
|
|
374
|
+
const Ce = /* @__PURE__ */ k(ve, [["render", Te], ["__scopeId", "data-v-d8cfe56f"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHeroBlock.vue"]]), je = /* @__PURE__ */ g({
|
|
334
375
|
__name: "XHtmlBlock",
|
|
335
376
|
props: {
|
|
336
377
|
data: { type: Object, required: !0 }
|
|
337
378
|
},
|
|
338
|
-
setup(c, { expose:
|
|
339
|
-
|
|
379
|
+
setup(c, { expose: n }) {
|
|
380
|
+
n();
|
|
340
381
|
const e = {};
|
|
341
382
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
342
383
|
}
|
|
343
|
-
}),
|
|
344
|
-
function
|
|
345
|
-
return
|
|
384
|
+
}), Xe = { class: "x-html-block" }, Be = ["innerHTML"];
|
|
385
|
+
function Pe(c, n, e, t, r, l) {
|
|
386
|
+
return o(), a("section", Xe, [
|
|
346
387
|
d("div", {
|
|
347
388
|
class: "x-html-block__content",
|
|
348
389
|
innerHTML: e.data.content
|
|
349
|
-
}, null, 8,
|
|
390
|
+
}, null, 8, Be)
|
|
350
391
|
]);
|
|
351
392
|
}
|
|
352
|
-
const
|
|
393
|
+
const Oe = /* @__PURE__ */ k(je, [["render", Pe], ["__scopeId", "data-v-abfd69e8"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XHtmlBlock.vue"]]), Ie = /* @__PURE__ */ g({
|
|
353
394
|
__name: "XCardsBlock",
|
|
354
395
|
props: {
|
|
355
396
|
data: { type: Object, required: !0 },
|
|
356
397
|
variant: { type: String, required: !1, default: "default" },
|
|
357
398
|
columns: { type: Number, required: !1, default: void 0 }
|
|
358
399
|
},
|
|
359
|
-
setup(c, { expose:
|
|
360
|
-
|
|
361
|
-
const e = c, t = p(() => ({ "--columns": e.columns || Math.min(e.data.cards.length, 4) })), r = { color: "var(--x-color-primary, #1e73be)" },
|
|
400
|
+
setup(c, { expose: n }) {
|
|
401
|
+
n();
|
|
402
|
+
const e = c, t = p(() => ({ "--columns": e.columns || Math.min(e.data.cards.length, 4) })), r = { color: "var(--x-color-primary, #1e73be)" }, l = {
|
|
362
403
|
"mdi-lightbulb": "💡",
|
|
363
404
|
"mdi-code-braces": "⚙️",
|
|
364
405
|
"mdi-headset": "🎧",
|
|
@@ -377,36 +418,36 @@ const Ie = /* @__PURE__ */ k(Xe, [["render", Oe], ["__scopeId", "data-v-abfd69e8
|
|
|
377
418
|
"mdi-team": "👥"
|
|
378
419
|
};
|
|
379
420
|
function s(f) {
|
|
380
|
-
return
|
|
421
|
+
return l[f] || f;
|
|
381
422
|
}
|
|
382
|
-
const
|
|
383
|
-
return Object.defineProperty(
|
|
423
|
+
const i = { props: e, gridStyle: t, iconStyle: r, iconMap: l, iconDisplay: s };
|
|
424
|
+
return Object.defineProperty(i, "__isScriptSetup", { enumerable: !1, value: !0 }), i;
|
|
384
425
|
}
|
|
385
|
-
}),
|
|
426
|
+
}), Le = { class: "x-cards-block__container" }, Ne = {
|
|
386
427
|
key: 0,
|
|
387
428
|
class: "x-cards-block__title"
|
|
388
|
-
},
|
|
429
|
+
}, Ae = {
|
|
389
430
|
key: 1,
|
|
390
431
|
class: "x-cards-block__subtitle"
|
|
391
|
-
},
|
|
392
|
-
function
|
|
393
|
-
return
|
|
432
|
+
}, Ee = ["src", "alt"], Ue = { class: "x-card__title" }, Re = { class: "x-card__desc" };
|
|
433
|
+
function Fe(c, n, e, t, r, l) {
|
|
434
|
+
return o(), a(
|
|
394
435
|
"section",
|
|
395
436
|
{
|
|
396
437
|
class: $(["x-cards-block", `x-cards-block--${e.variant}`])
|
|
397
438
|
},
|
|
398
439
|
[
|
|
399
|
-
d("div",
|
|
400
|
-
e.data.title ? (
|
|
440
|
+
d("div", Le, [
|
|
441
|
+
e.data.title ? (o(), a(
|
|
401
442
|
"h2",
|
|
402
|
-
|
|
443
|
+
Ne,
|
|
403
444
|
_(e.data.title),
|
|
404
445
|
1
|
|
405
446
|
/* TEXT */
|
|
406
447
|
)) : u("v-if", !0),
|
|
407
|
-
e.data.subtitle ? (
|
|
448
|
+
e.data.subtitle ? (o(), a(
|
|
408
449
|
"p",
|
|
409
|
-
|
|
450
|
+
Ae,
|
|
410
451
|
_(e.data.subtitle),
|
|
411
452
|
1
|
|
412
453
|
/* TEXT */
|
|
@@ -415,25 +456,25 @@ function qe(c, o, e, t, r, i) {
|
|
|
415
456
|
"div",
|
|
416
457
|
{
|
|
417
458
|
class: "x-cards-block__grid",
|
|
418
|
-
style:
|
|
459
|
+
style: A(t.gridStyle)
|
|
419
460
|
},
|
|
420
461
|
[
|
|
421
|
-
(
|
|
422
|
-
|
|
462
|
+
(o(!0), a(
|
|
463
|
+
h,
|
|
423
464
|
null,
|
|
424
|
-
x(e.data.cards, (s,
|
|
425
|
-
key:
|
|
465
|
+
x(e.data.cards, (s, i) => (o(), C(E(s.link ? "a" : "div"), {
|
|
466
|
+
key: i,
|
|
426
467
|
class: "x-card",
|
|
427
468
|
href: s.link
|
|
428
469
|
}, {
|
|
429
|
-
default:
|
|
430
|
-
s.image && e.variant === "image-cards" ? (
|
|
470
|
+
default: j(() => [
|
|
471
|
+
s.image && e.variant === "image-cards" ? (o(), a("img", {
|
|
431
472
|
key: 0,
|
|
432
473
|
src: s.image,
|
|
433
474
|
alt: s.title,
|
|
434
475
|
class: "x-card__image"
|
|
435
|
-
}, null, 8,
|
|
436
|
-
s.icon && e.variant !== "image-cards" ? (
|
|
476
|
+
}, null, 8, Ee)) : u("v-if", !0),
|
|
477
|
+
s.icon && e.variant !== "image-cards" ? (o(), a(
|
|
437
478
|
"div",
|
|
438
479
|
{
|
|
439
480
|
key: 1,
|
|
@@ -446,14 +487,14 @@ function qe(c, o, e, t, r, i) {
|
|
|
446
487
|
)) : u("v-if", !0),
|
|
447
488
|
d(
|
|
448
489
|
"h3",
|
|
449
|
-
|
|
490
|
+
Ue,
|
|
450
491
|
_(s.title),
|
|
451
492
|
1
|
|
452
493
|
/* TEXT */
|
|
453
494
|
),
|
|
454
495
|
d(
|
|
455
496
|
"p",
|
|
456
|
-
|
|
497
|
+
Re,
|
|
457
498
|
_(s.desc),
|
|
458
499
|
1
|
|
459
500
|
/* TEXT */
|
|
@@ -475,61 +516,61 @@ function qe(c, o, e, t, r, i) {
|
|
|
475
516
|
/* CLASS */
|
|
476
517
|
);
|
|
477
518
|
}
|
|
478
|
-
const
|
|
519
|
+
const qe = /* @__PURE__ */ k(Ie, [["render", Fe], ["__scopeId", "data-v-a1505674"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XCardsBlock.vue"]]), De = /* @__PURE__ */ g({
|
|
479
520
|
__name: "XImageTextBlock",
|
|
480
521
|
props: {
|
|
481
522
|
data: { type: Object, required: !0 },
|
|
482
523
|
reverse: { type: Boolean, required: !1, default: !1 }
|
|
483
524
|
},
|
|
484
|
-
setup(c, { expose:
|
|
485
|
-
|
|
525
|
+
setup(c, { expose: n }) {
|
|
526
|
+
n();
|
|
486
527
|
const e = {};
|
|
487
528
|
return Object.defineProperty(e, "__isScriptSetup", { enumerable: !1, value: !0 }), e;
|
|
488
529
|
}
|
|
489
|
-
}),
|
|
530
|
+
}), He = { class: "x-image-text__container" }, Me = { class: "x-image-text__text" }, ze = {
|
|
490
531
|
key: 0,
|
|
491
532
|
class: "x-image-text__title"
|
|
492
|
-
},
|
|
533
|
+
}, Ge = ["innerHTML"], Ke = {
|
|
493
534
|
key: 2,
|
|
494
535
|
class: "x-image-text__checklist"
|
|
495
|
-
},
|
|
536
|
+
}, Ve = { class: "x-image-text__check-icon" }, We = {
|
|
496
537
|
key: 0,
|
|
497
538
|
class: "x-image-text__image-wrap"
|
|
498
|
-
},
|
|
499
|
-
function
|
|
500
|
-
return
|
|
539
|
+
}, Je = ["src", "alt"];
|
|
540
|
+
function Ye(c, n, e, t, r, l) {
|
|
541
|
+
return o(), a(
|
|
501
542
|
"section",
|
|
502
543
|
{
|
|
503
544
|
class: $(["x-image-text", { "x-image-text--reverse": e.reverse }])
|
|
504
545
|
},
|
|
505
546
|
[
|
|
506
|
-
d("div",
|
|
507
|
-
d("div",
|
|
508
|
-
e.data.title ? (
|
|
547
|
+
d("div", He, [
|
|
548
|
+
d("div", Me, [
|
|
549
|
+
e.data.title ? (o(), a(
|
|
509
550
|
"h2",
|
|
510
|
-
|
|
551
|
+
ze,
|
|
511
552
|
_(e.data.title),
|
|
512
553
|
1
|
|
513
554
|
/* TEXT */
|
|
514
555
|
)) : u("v-if", !0),
|
|
515
|
-
e.data.content ? (
|
|
556
|
+
e.data.content ? (o(), a("div", {
|
|
516
557
|
key: 1,
|
|
517
558
|
class: "x-image-text__content",
|
|
518
559
|
innerHTML: e.data.content
|
|
519
|
-
}, null, 8,
|
|
520
|
-
e.data.items?.length ? (
|
|
521
|
-
(
|
|
522
|
-
|
|
560
|
+
}, null, 8, Ge)) : u("v-if", !0),
|
|
561
|
+
e.data.items?.length ? (o(), a("ul", Ke, [
|
|
562
|
+
(o(!0), a(
|
|
563
|
+
h,
|
|
523
564
|
null,
|
|
524
|
-
x(e.data.items, (s,
|
|
565
|
+
x(e.data.items, (s, i) => (o(), a("li", { key: i }, [
|
|
525
566
|
d(
|
|
526
567
|
"span",
|
|
527
|
-
|
|
568
|
+
Ve,
|
|
528
569
|
_(s.icon || "✓"),
|
|
529
570
|
1
|
|
530
571
|
/* TEXT */
|
|
531
572
|
),
|
|
532
|
-
|
|
573
|
+
L(
|
|
533
574
|
" " + _(s.text),
|
|
534
575
|
1
|
|
535
576
|
/* TEXT */
|
|
@@ -540,12 +581,12 @@ function Ze(c, o, e, t, r, i) {
|
|
|
540
581
|
))
|
|
541
582
|
])) : u("v-if", !0)
|
|
542
583
|
]),
|
|
543
|
-
e.data.image ? (
|
|
584
|
+
e.data.image ? (o(), a("div", We, [
|
|
544
585
|
d("img", {
|
|
545
586
|
src: e.data.image,
|
|
546
587
|
alt: e.data.title || "",
|
|
547
588
|
class: "x-image-text__image"
|
|
548
|
-
}, null, 8,
|
|
589
|
+
}, null, 8, Je)
|
|
549
590
|
])) : u("v-if", !0)
|
|
550
591
|
])
|
|
551
592
|
],
|
|
@@ -553,29 +594,29 @@ function Ze(c, o, e, t, r, i) {
|
|
|
553
594
|
/* CLASS */
|
|
554
595
|
);
|
|
555
596
|
}
|
|
556
|
-
const
|
|
557
|
-
function
|
|
558
|
-
const e = T(null), { locale: t } =
|
|
559
|
-
function
|
|
560
|
-
return r && r[c] && t.value ===
|
|
597
|
+
const Ze = /* @__PURE__ */ k(De, [["render", Ye], ["__scopeId", "data-v-5ca1e218"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XImageTextBlock.vue"]]);
|
|
598
|
+
function F(c, n) {
|
|
599
|
+
const e = T(null), { locale: t } = U(), r = window.__SITE_DATA__, l = r?.locale, s = r?.config?.tenantPrefix || "tenant";
|
|
600
|
+
function i() {
|
|
601
|
+
return r && r[c] && t.value === l ? (e.value = r[c], !0) : !1;
|
|
561
602
|
}
|
|
562
603
|
async function f() {
|
|
563
604
|
try {
|
|
564
|
-
const b = `${s}:${
|
|
605
|
+
const b = `${s}:${n}:${t.value}`, m = await fetch(`/api/content/${b}`);
|
|
565
606
|
m.ok && (e.value = await m.json());
|
|
566
607
|
} catch {
|
|
567
608
|
}
|
|
568
609
|
}
|
|
569
|
-
return
|
|
570
|
-
|
|
571
|
-
}),
|
|
610
|
+
return X(() => {
|
|
611
|
+
i() || f();
|
|
612
|
+
}), I(t, () => {
|
|
572
613
|
f();
|
|
573
614
|
}), e;
|
|
574
615
|
}
|
|
575
|
-
function
|
|
576
|
-
const
|
|
577
|
-
async function e(
|
|
578
|
-
const s = await fetch(`${
|
|
616
|
+
function Qe() {
|
|
617
|
+
const n = window.__SITE_DATA__?.apiBase || "";
|
|
618
|
+
async function e(l) {
|
|
619
|
+
const s = await fetch(`${n}${l}`);
|
|
579
620
|
if (!s.ok)
|
|
580
621
|
throw new Error(`API error: ${s.status}`);
|
|
581
622
|
return s.json();
|
|
@@ -592,139 +633,139 @@ function et() {
|
|
|
592
633
|
getProducts: r
|
|
593
634
|
};
|
|
594
635
|
}
|
|
595
|
-
const
|
|
636
|
+
const et = /* @__PURE__ */ g({
|
|
596
637
|
__name: "XPricingBlock",
|
|
597
638
|
props: {
|
|
598
639
|
data: { type: Object, required: !1 },
|
|
599
640
|
source: { type: String, required: !1, default: "kv" },
|
|
600
641
|
featuredIndex: { type: Number, required: !1, default: 1 }
|
|
601
642
|
},
|
|
602
|
-
setup(c, { expose:
|
|
603
|
-
|
|
604
|
-
const e = c, t = p(() => e.data?.title), r = p(() => e.data?.subtitle),
|
|
605
|
-
|
|
643
|
+
setup(c, { expose: n }) {
|
|
644
|
+
n();
|
|
645
|
+
const e = c, t = p(() => e.data?.title), r = p(() => e.data?.subtitle), l = T([]), s = T(""), i = F("tariffs", "tariffs"), f = Qe();
|
|
646
|
+
X(async () => {
|
|
606
647
|
if (e.source === "api")
|
|
607
648
|
try {
|
|
608
|
-
|
|
649
|
+
l.value = await f.getTariffs();
|
|
609
650
|
} catch {
|
|
610
651
|
}
|
|
611
|
-
}),
|
|
612
|
-
|
|
613
|
-
(
|
|
614
|
-
|
|
652
|
+
}), I(
|
|
653
|
+
i,
|
|
654
|
+
(v) => {
|
|
655
|
+
v && e.source === "kv" && (l.value = v);
|
|
615
656
|
},
|
|
616
657
|
{ immediate: !0 }
|
|
617
658
|
);
|
|
618
659
|
const b = p(() => {
|
|
619
|
-
const
|
|
620
|
-
return Array.from(
|
|
660
|
+
const v = new Set(l.value.map((B) => B.tariffGroupName).filter(Boolean));
|
|
661
|
+
return Array.from(v);
|
|
621
662
|
});
|
|
622
|
-
|
|
663
|
+
I(
|
|
623
664
|
b,
|
|
624
|
-
(
|
|
625
|
-
|
|
665
|
+
(v) => {
|
|
666
|
+
v.length > 0 && !s.value && (s.value = v[0]);
|
|
626
667
|
},
|
|
627
668
|
{ immediate: !0 }
|
|
628
669
|
);
|
|
629
|
-
const m = p(() => !s.value || b.value.length <= 1 ?
|
|
670
|
+
const m = p(() => !s.value || b.value.length <= 1 ? l.value : l.value.filter((v) => v.tariffGroupName === s.value)), w = { props: e, title: t, subtitle: r, plans: l, activeGroup: s, kvTariffs: i, api: f, groups: b, activePlans: m };
|
|
630
671
|
return Object.defineProperty(w, "__isScriptSetup", { enumerable: !1, value: !0 }), w;
|
|
631
672
|
}
|
|
632
|
-
}),
|
|
673
|
+
}), tt = { class: "x-pricing" }, st = { class: "x-pricing__container" }, nt = {
|
|
633
674
|
key: 0,
|
|
634
675
|
class: "x-pricing__title"
|
|
635
|
-
},
|
|
676
|
+
}, ot = {
|
|
636
677
|
key: 1,
|
|
637
678
|
class: "x-pricing__subtitle"
|
|
638
|
-
},
|
|
679
|
+
}, at = {
|
|
639
680
|
key: 2,
|
|
640
681
|
class: "x-pricing__tabs"
|
|
641
|
-
},
|
|
682
|
+
}, rt = ["onClick"], ct = { class: "x-pricing__grid" }, it = { class: "x-pricing-card__name" }, lt = {
|
|
642
683
|
key: 0,
|
|
643
684
|
class: "x-pricing-card__desc"
|
|
644
|
-
},
|
|
685
|
+
}, _t = { class: "x-pricing-card__price" }, ut = { class: "x-pricing-card__amount" }, dt = {
|
|
645
686
|
key: 0,
|
|
646
687
|
class: "x-pricing-card__period"
|
|
647
|
-
},
|
|
688
|
+
}, ft = {
|
|
648
689
|
key: 1,
|
|
649
690
|
class: "x-pricing-card__features"
|
|
650
|
-
},
|
|
651
|
-
function
|
|
652
|
-
return
|
|
653
|
-
d("div",
|
|
654
|
-
t.title ? (
|
|
691
|
+
}, pt = ["href"];
|
|
692
|
+
function mt(c, n, e, t, r, l) {
|
|
693
|
+
return o(), a("section", tt, [
|
|
694
|
+
d("div", st, [
|
|
695
|
+
t.title ? (o(), a(
|
|
655
696
|
"h2",
|
|
656
697
|
nt,
|
|
657
698
|
_(t.title),
|
|
658
699
|
1
|
|
659
700
|
/* TEXT */
|
|
660
701
|
)) : u("v-if", !0),
|
|
661
|
-
t.subtitle ? (
|
|
702
|
+
t.subtitle ? (o(), a(
|
|
662
703
|
"p",
|
|
663
|
-
|
|
704
|
+
ot,
|
|
664
705
|
_(t.subtitle),
|
|
665
706
|
1
|
|
666
707
|
/* TEXT */
|
|
667
708
|
)) : u("v-if", !0),
|
|
668
709
|
u(" Tabs for tariff groups "),
|
|
669
|
-
t.groups.length > 1 ? (
|
|
670
|
-
(
|
|
671
|
-
|
|
710
|
+
t.groups.length > 1 ? (o(), a("div", at, [
|
|
711
|
+
(o(!0), a(
|
|
712
|
+
h,
|
|
672
713
|
null,
|
|
673
|
-
x(t.groups, (s) => (
|
|
714
|
+
x(t.groups, (s) => (o(), a("button", {
|
|
674
715
|
key: s,
|
|
675
716
|
class: $(["x-pricing__tab", { "x-pricing__tab--active": t.activeGroup === s }]),
|
|
676
|
-
onClick: (
|
|
677
|
-
}, _(s), 11,
|
|
717
|
+
onClick: (i) => t.activeGroup = s
|
|
718
|
+
}, _(s), 11, rt))),
|
|
678
719
|
128
|
|
679
720
|
/* KEYED_FRAGMENT */
|
|
680
721
|
))
|
|
681
722
|
])) : u("v-if", !0),
|
|
682
|
-
d("div",
|
|
683
|
-
(
|
|
684
|
-
|
|
723
|
+
d("div", ct, [
|
|
724
|
+
(o(!0), a(
|
|
725
|
+
h,
|
|
685
726
|
null,
|
|
686
|
-
x(t.activePlans, (s,
|
|
727
|
+
x(t.activePlans, (s, i) => (o(), a(
|
|
687
728
|
"div",
|
|
688
729
|
{
|
|
689
|
-
key: s.id ||
|
|
690
|
-
class: $(["x-pricing-card", { "x-pricing-card--featured":
|
|
730
|
+
key: s.id || i,
|
|
731
|
+
class: $(["x-pricing-card", { "x-pricing-card--featured": i === e.featuredIndex }])
|
|
691
732
|
},
|
|
692
733
|
[
|
|
693
734
|
d(
|
|
694
735
|
"h3",
|
|
695
|
-
|
|
736
|
+
it,
|
|
696
737
|
_(s.name),
|
|
697
738
|
1
|
|
698
739
|
/* TEXT */
|
|
699
740
|
),
|
|
700
|
-
s.description ? (
|
|
741
|
+
s.description ? (o(), a(
|
|
701
742
|
"p",
|
|
702
|
-
|
|
743
|
+
lt,
|
|
703
744
|
_(s.description),
|
|
704
745
|
1
|
|
705
746
|
/* TEXT */
|
|
706
747
|
)) : u("v-if", !0),
|
|
707
|
-
d("div",
|
|
748
|
+
d("div", _t, [
|
|
708
749
|
d(
|
|
709
750
|
"span",
|
|
710
|
-
|
|
751
|
+
ut,
|
|
711
752
|
_(s.price),
|
|
712
753
|
1
|
|
713
754
|
/* TEXT */
|
|
714
755
|
),
|
|
715
|
-
s.period ? (
|
|
756
|
+
s.period ? (o(), a(
|
|
716
757
|
"span",
|
|
717
|
-
|
|
758
|
+
dt,
|
|
718
759
|
"/" + _(s.period),
|
|
719
760
|
1
|
|
720
761
|
/* TEXT */
|
|
721
762
|
)) : u("v-if", !0)
|
|
722
763
|
]),
|
|
723
|
-
s.features?.length ? (
|
|
724
|
-
(
|
|
725
|
-
|
|
764
|
+
s.features?.length ? (o(), a("ul", ft, [
|
|
765
|
+
(o(!0), a(
|
|
766
|
+
h,
|
|
726
767
|
null,
|
|
727
|
-
x(s.features, (f, b) => (
|
|
768
|
+
x(s.features, (f, b) => (o(), a(
|
|
728
769
|
"li",
|
|
729
770
|
{ key: b },
|
|
730
771
|
_(f),
|
|
@@ -735,11 +776,11 @@ function ht(c, o, e, t, r, i) {
|
|
|
735
776
|
/* KEYED_FRAGMENT */
|
|
736
777
|
))
|
|
737
778
|
])) : u("v-if", !0),
|
|
738
|
-
s.actionUrl ? (
|
|
779
|
+
s.actionUrl ? (o(), a("a", {
|
|
739
780
|
key: 2,
|
|
740
781
|
href: s.actionUrl,
|
|
741
782
|
class: "x-btn x-btn--primary x-pricing-card__action"
|
|
742
|
-
}, _(s.actionText || "Choose"), 9,
|
|
783
|
+
}, _(s.actionText || "Choose"), 9, pt)) : u("v-if", !0)
|
|
743
784
|
],
|
|
744
785
|
2
|
|
745
786
|
/* CLASS */
|
|
@@ -751,83 +792,83 @@ function ht(c, o, e, t, r, i) {
|
|
|
751
792
|
])
|
|
752
793
|
]);
|
|
753
794
|
}
|
|
754
|
-
const vt = /* @__PURE__ */ k(
|
|
795
|
+
const vt = /* @__PURE__ */ k(et, [["render", mt], ["__scopeId", "data-v-bd1e5d79"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XPricingBlock.vue"]]), ht = /* @__PURE__ */ g({
|
|
755
796
|
__name: "XContactsBlock",
|
|
756
797
|
props: {
|
|
757
798
|
data: { type: Object, required: !1 }
|
|
758
799
|
},
|
|
759
|
-
setup(c, { expose:
|
|
760
|
-
|
|
761
|
-
const e =
|
|
800
|
+
setup(c, { expose: n }) {
|
|
801
|
+
n();
|
|
802
|
+
const e = F("contacts:offices", "contacts:offices"), t = p(() => e.value || []), r = { kvOffices: e, offices: t };
|
|
762
803
|
return Object.defineProperty(r, "__isScriptSetup", { enumerable: !1, value: !0 }), r;
|
|
763
804
|
}
|
|
764
|
-
}),
|
|
805
|
+
}), xt = { class: "x-contacts" }, yt = { class: "x-contacts__container" }, gt = {
|
|
765
806
|
key: 0,
|
|
766
807
|
class: "x-contacts__title"
|
|
767
|
-
},
|
|
808
|
+
}, kt = {
|
|
768
809
|
key: 1,
|
|
769
810
|
class: "x-contacts__grid"
|
|
770
|
-
},
|
|
811
|
+
}, bt = { class: "x-contacts__name" }, $t = {
|
|
771
812
|
key: 0,
|
|
772
813
|
class: "x-contacts__info"
|
|
773
|
-
},
|
|
814
|
+
}, St = {
|
|
774
815
|
key: 1,
|
|
775
816
|
class: "x-contacts__info"
|
|
776
|
-
},
|
|
817
|
+
}, wt = ["href"], Tt = {
|
|
777
818
|
key: 2,
|
|
778
819
|
class: "x-contacts__info"
|
|
779
|
-
}, Ct = ["href"],
|
|
820
|
+
}, Ct = ["href"], jt = {
|
|
780
821
|
key: 3,
|
|
781
822
|
class: "x-contacts__hours"
|
|
782
823
|
};
|
|
783
|
-
function
|
|
784
|
-
return
|
|
785
|
-
d("div",
|
|
786
|
-
e.data?.title ? (
|
|
824
|
+
function Xt(c, n, e, t, r, l) {
|
|
825
|
+
return o(), a("section", xt, [
|
|
826
|
+
d("div", yt, [
|
|
827
|
+
e.data?.title ? (o(), a(
|
|
787
828
|
"h2",
|
|
788
|
-
|
|
829
|
+
gt,
|
|
789
830
|
_(e.data.title),
|
|
790
831
|
1
|
|
791
832
|
/* TEXT */
|
|
792
833
|
)) : u("v-if", !0),
|
|
793
|
-
t.offices ? (
|
|
794
|
-
(
|
|
795
|
-
|
|
834
|
+
t.offices ? (o(), a("div", kt, [
|
|
835
|
+
(o(!0), a(
|
|
836
|
+
h,
|
|
796
837
|
null,
|
|
797
|
-
x(t.offices, (s,
|
|
838
|
+
x(t.offices, (s, i) => (o(), a(
|
|
798
839
|
"div",
|
|
799
840
|
{
|
|
800
|
-
key:
|
|
841
|
+
key: i,
|
|
801
842
|
class: $(["x-contacts__card", { "x-contacts__card--main": s.isMain }])
|
|
802
843
|
},
|
|
803
844
|
[
|
|
804
845
|
d(
|
|
805
846
|
"h3",
|
|
806
|
-
|
|
847
|
+
bt,
|
|
807
848
|
_(s.name),
|
|
808
849
|
1
|
|
809
850
|
/* TEXT */
|
|
810
851
|
),
|
|
811
|
-
s.address ? (
|
|
852
|
+
s.address ? (o(), a(
|
|
812
853
|
"p",
|
|
813
|
-
|
|
854
|
+
$t,
|
|
814
855
|
_(s.address),
|
|
815
856
|
1
|
|
816
857
|
/* TEXT */
|
|
817
858
|
)) : u("v-if", !0),
|
|
818
|
-
s.phone ? (
|
|
859
|
+
s.phone ? (o(), a("p", St, [
|
|
819
860
|
d("a", {
|
|
820
861
|
href: `tel:${s.phone}`
|
|
821
|
-
}, _(s.phone), 9,
|
|
862
|
+
}, _(s.phone), 9, wt)
|
|
822
863
|
])) : u("v-if", !0),
|
|
823
|
-
s.email ? (
|
|
864
|
+
s.email ? (o(), a("p", Tt, [
|
|
824
865
|
d("a", {
|
|
825
866
|
href: `mailto:${s.email}`
|
|
826
867
|
}, _(s.email), 9, Ct)
|
|
827
868
|
])) : u("v-if", !0),
|
|
828
|
-
s.hours ? (
|
|
869
|
+
s.hours ? (o(), a(
|
|
829
870
|
"p",
|
|
830
|
-
|
|
871
|
+
jt,
|
|
831
872
|
_(s.hours),
|
|
832
873
|
1
|
|
833
874
|
/* TEXT */
|
|
@@ -843,38 +884,38 @@ function Bt(c, o, e, t, r, i) {
|
|
|
843
884
|
])
|
|
844
885
|
]);
|
|
845
886
|
}
|
|
846
|
-
const
|
|
887
|
+
const Bt = /* @__PURE__ */ k(ht, [["render", Xt], ["__scopeId", "data-v-e873ba26"], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XContactsBlock.vue"]]), Pt = /* @__PURE__ */ g({
|
|
847
888
|
__name: "XBlockRenderer",
|
|
848
889
|
props: {
|
|
849
890
|
blocks: { type: Array, required: !0 }
|
|
850
891
|
},
|
|
851
|
-
setup(c, { expose:
|
|
852
|
-
|
|
892
|
+
setup(c, { expose: n }) {
|
|
893
|
+
n();
|
|
853
894
|
const e = c, t = {
|
|
854
895
|
hero: Ce,
|
|
855
|
-
html:
|
|
856
|
-
cards:
|
|
857
|
-
"image-text":
|
|
896
|
+
html: Oe,
|
|
897
|
+
cards: qe,
|
|
898
|
+
"image-text": Ze,
|
|
858
899
|
pricing: vt,
|
|
859
|
-
contacts:
|
|
900
|
+
contacts: Bt
|
|
860
901
|
};
|
|
861
|
-
function r(
|
|
862
|
-
return t[
|
|
902
|
+
function r(i) {
|
|
903
|
+
return t[i];
|
|
863
904
|
}
|
|
864
|
-
const
|
|
905
|
+
const l = p(() => e.blocks.filter((i) => i.settings?.visible !== !1)), s = { props: e, blockRegistry: t, getBlockComponent: r, visibleBlocks: l };
|
|
865
906
|
return Object.defineProperty(s, "__isScriptSetup", { enumerable: !1, value: !0 }), s;
|
|
866
907
|
}
|
|
867
|
-
}),
|
|
868
|
-
function
|
|
869
|
-
return
|
|
870
|
-
(
|
|
871
|
-
|
|
908
|
+
}), Ot = { class: "x-block-renderer" };
|
|
909
|
+
function It(c, n, e, t, r, l) {
|
|
910
|
+
return o(), a("div", Ot, [
|
|
911
|
+
(o(!0), a(
|
|
912
|
+
h,
|
|
872
913
|
null,
|
|
873
|
-
x(t.visibleBlocks, (s,
|
|
874
|
-
|
|
875
|
-
{ key:
|
|
914
|
+
x(t.visibleBlocks, (s, i) => (o(), a(
|
|
915
|
+
h,
|
|
916
|
+
{ key: i },
|
|
876
917
|
[
|
|
877
|
-
t.getBlockComponent(s.type) ? (
|
|
918
|
+
t.getBlockComponent(s.type) ? (o(), C(E(t.getBlockComponent(s.type)), M({
|
|
878
919
|
key: 0,
|
|
879
920
|
data: s.data || s.props
|
|
880
921
|
}, { ref_for: !0 }, s.settings, {
|
|
@@ -889,22 +930,22 @@ function Lt(c, o, e, t, r, i) {
|
|
|
889
930
|
))
|
|
890
931
|
]);
|
|
891
932
|
}
|
|
892
|
-
const
|
|
893
|
-
function
|
|
933
|
+
const qt = /* @__PURE__ */ k(Pt, [["render", It], ["__file", "/Users/yariksav/projects/xosen/xosen-monorepo/packages/site-sdk/src/components/blocks/XBlockRenderer.vue"]]), Lt = /\.(js|css|png|jpg|jpeg|gif|svg|ico|woff2?|ttf|eot|webp|avif|map|json|txt|xml|webmanifest)$/;
|
|
934
|
+
function Nt(c, n) {
|
|
894
935
|
const t = new URL(c.url).searchParams.get("lang");
|
|
895
|
-
if (t &&
|
|
896
|
-
if (
|
|
936
|
+
if (t && n.supportedLocales?.includes(t)) return t;
|
|
937
|
+
if (n.supportedLocales?.length) {
|
|
897
938
|
const r = c.headers.get("Accept-Language") || "";
|
|
898
|
-
for (const
|
|
899
|
-
if (r.includes(
|
|
939
|
+
for (const l of n.supportedLocales)
|
|
940
|
+
if (r.includes(l)) return l;
|
|
900
941
|
}
|
|
901
|
-
return
|
|
942
|
+
return n.defaultLocale;
|
|
902
943
|
}
|
|
903
|
-
function
|
|
944
|
+
function At(c, n) {
|
|
904
945
|
if (!c.pathname.startsWith("/api/content/")) return null;
|
|
905
946
|
const e = decodeURIComponent(c.pathname.replace("/api/content/", ""));
|
|
906
947
|
return e ? (async () => {
|
|
907
|
-
const t = await
|
|
948
|
+
const t = await n.SITE_CONTENT.get(e);
|
|
908
949
|
return t ? new Response(t, {
|
|
909
950
|
headers: {
|
|
910
951
|
"Content-Type": "application/json",
|
|
@@ -914,49 +955,49 @@ function Et(c, o) {
|
|
|
914
955
|
}) : Response.json({ error: "Not found" }, { status: 404 });
|
|
915
956
|
})() : Promise.resolve(Response.json({ error: "Key is required" }, { status: 400 }));
|
|
916
957
|
}
|
|
917
|
-
function
|
|
958
|
+
function Et(c, n, e) {
|
|
918
959
|
let t = c;
|
|
919
|
-
if (
|
|
960
|
+
if (n.title) {
|
|
920
961
|
const r = e ? ` — ${e}` : "";
|
|
921
|
-
t = t.replace(/<title>[^<]*<\/title>/, `<title>${
|
|
962
|
+
t = t.replace(/<title>[^<]*<\/title>/, `<title>${n.title}${r}</title>`);
|
|
922
963
|
}
|
|
923
|
-
return
|
|
964
|
+
return n.meta?.description && (t = t.replace(/(<meta\s+name="description"\s+content=")[^"]*(")/, `$1${n.meta.description}$2`)), n.meta?.ogTitle && (t = t.replace(/(<meta\s+property="og:title"\s+content=")[^"]*(")/, `$1${n.meta.ogTitle}$2`)), n.html && (t = t.replace('<div id="app"></div>', `<div id="app">${n.html}</div>`)), t;
|
|
924
965
|
}
|
|
925
|
-
function
|
|
926
|
-
const { tenantPrefix:
|
|
966
|
+
function Dt(c) {
|
|
967
|
+
const { tenantPrefix: n, globalKeys: e = [] } = c;
|
|
927
968
|
return {
|
|
928
969
|
async fetch(t, r) {
|
|
929
|
-
const
|
|
970
|
+
const l = new URL(t.url), s = At(l, r);
|
|
930
971
|
if (s) return s;
|
|
931
|
-
if (
|
|
972
|
+
if (Lt.test(l.pathname))
|
|
932
973
|
return r.ASSETS.fetch(t);
|
|
933
|
-
const
|
|
974
|
+
const i = Nt(t, c), f = new URL("/index.html", t.url);
|
|
934
975
|
let m = await (await r.ASSETS.fetch(new Request(f))).text();
|
|
935
976
|
const w = e.map(async (S) => {
|
|
936
|
-
const y = await r.SITE_CONTENT.get(`${
|
|
977
|
+
const y = await r.SITE_CONTENT.get(`${n}:${S}:${i}`);
|
|
937
978
|
return [S, y ? JSON.parse(y) : null];
|
|
938
|
-
}),
|
|
939
|
-
if (
|
|
940
|
-
const S =
|
|
979
|
+
}), v = l.pathname.match(/^\/p\/(.+)$/);
|
|
980
|
+
if (v) {
|
|
981
|
+
const S = v[1];
|
|
941
982
|
w.push(
|
|
942
983
|
(async () => {
|
|
943
|
-
const y = await r.SITE_CONTENT.get(`${
|
|
984
|
+
const y = await r.SITE_CONTENT.get(`${n}:page:${S}:${i}`);
|
|
944
985
|
return [`page:${S}`, y ? JSON.parse(y) : null];
|
|
945
986
|
})()
|
|
946
987
|
);
|
|
947
988
|
}
|
|
948
|
-
const
|
|
949
|
-
locale:
|
|
950
|
-
config: { tenantPrefix:
|
|
989
|
+
const B = await Promise.all(w), P = {
|
|
990
|
+
locale: i,
|
|
991
|
+
config: { tenantPrefix: n }
|
|
951
992
|
};
|
|
952
|
-
for (const [S, y] of
|
|
953
|
-
y !== null && (
|
|
954
|
-
if (
|
|
955
|
-
const S =
|
|
956
|
-
y && (m =
|
|
993
|
+
for (const [S, y] of B)
|
|
994
|
+
y !== null && (P[S] = y);
|
|
995
|
+
if (v) {
|
|
996
|
+
const S = v[1], y = P[`page:${S}`];
|
|
997
|
+
y && (m = Et(m, y, c.siteName));
|
|
957
998
|
}
|
|
958
|
-
const
|
|
959
|
-
return m = m.replace("</head>", `${
|
|
999
|
+
const q = `<script>window.__SITE_DATA__ = ${JSON.stringify(P)};<\/script>`;
|
|
1000
|
+
return m = m.replace("</head>", `${q}
|
|
960
1001
|
</head>`), new Response(m, {
|
|
961
1002
|
headers: {
|
|
962
1003
|
"Content-Type": "text/html;charset=utf-8",
|
|
@@ -967,20 +1008,20 @@ function Ht(c) {
|
|
|
967
1008
|
};
|
|
968
1009
|
}
|
|
969
1010
|
export {
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
1011
|
+
qt as XBlockRenderer,
|
|
1012
|
+
qe as XCardsBlock,
|
|
1013
|
+
Bt as XContactsBlock,
|
|
973
1014
|
Ce as XHeroBlock,
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
1015
|
+
Oe as XHtmlBlock,
|
|
1016
|
+
Ze as XImageTextBlock,
|
|
1017
|
+
Y as XLocaleSwitcher,
|
|
977
1018
|
vt as XPricingBlock,
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
1019
|
+
ue as XSiteFooter,
|
|
1020
|
+
Ft as XSiteLayout,
|
|
1021
|
+
oe as XSiteNav,
|
|
1022
|
+
Dt as createSiteWorker,
|
|
1023
|
+
Qe as useSiteApi,
|
|
1024
|
+
R as useSiteConfig,
|
|
1025
|
+
F as useSiteData,
|
|
1026
|
+
z as useSkin
|
|
986
1027
|
};
|