ire-preview 2.0.0 → 2.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/lib.es.js +116 -113
- package/dist/src/components/demo/preview/BlockPreview.vue.d.ts +2 -2
- package/dist/src/components/demo/preview/FlatPreview.vue.d.ts +2 -2
- package/dist/src/components/demo/preview/FloorPreview.vue.d.ts +2 -2
- package/dist/src/types/DemoTypes.d.ts +1 -0
- package/package.json +1 -1
package/dist/lib.es.js
CHANGED
|
@@ -219,7 +219,7 @@ const _hoisted_1$f = {
|
|
|
219
219
|
return (e, t) => (openBlock(), createElementBlock("div", null, [
|
|
220
220
|
createVNode(Transition, { name: "ire-fade-in-out" }, {
|
|
221
221
|
default: withCtx(() => {
|
|
222
|
-
var r, n, p,
|
|
222
|
+
var r, n, p, d, a, i, l, h, c, u, g, m, b, s, f, k, _, v, y, w;
|
|
223
223
|
return [
|
|
224
224
|
e.type && e.hoveredData && e.type !== "tooltip" ? (openBlock(), createElementBlock("div", _hoisted_1$f, [
|
|
225
225
|
e.type === "floor" ? (openBlock(), createElementBlock("div", _hoisted_2$8, [
|
|
@@ -228,16 +228,16 @@ const _hoisted_1$f = {
|
|
|
228
228
|
t[0] || (t[0] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Floor", -1))
|
|
229
229
|
]),
|
|
230
230
|
(r = e.hoveredData) != null && r.conf || (p = (n = e.hoveredData) == null ? void 0 : n.flats) != null && p.length ? (openBlock(), createElementBlock("div", _hoisted_5$1, [
|
|
231
|
-
(
|
|
231
|
+
(d = e.hoveredData) != null && d.conf ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString(e.hoveredData.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
|
|
232
232
|
(i = (a = e.hoveredData) == null ? void 0 : a.counts) != null && i.available ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
|
|
233
|
-
createElementVNode("p", _hoisted_9$1, toDisplayString(((
|
|
233
|
+
createElementVNode("p", _hoisted_9$1, toDisplayString(((h = (l = e.hoveredData) == null ? void 0 : l.counts) == null ? void 0 : h.available) || 0), 1),
|
|
234
234
|
t[1] || (t[1] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Available", -1))
|
|
235
235
|
])) : createCommentVNode("", !0),
|
|
236
|
-
(u = (
|
|
236
|
+
(u = (c = e.hoveredData) == null ? void 0 : c.counts) != null && u.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
|
|
237
237
|
createElementVNode("p", _hoisted_11$1, toDisplayString(e.hoveredData.counts.reserved), 1),
|
|
238
238
|
t[2] || (t[2] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Reserved", -1))
|
|
239
239
|
])) : createCommentVNode("", !0),
|
|
240
|
-
(
|
|
240
|
+
(m = (g = e.hoveredData) == null ? void 0 : g.counts) != null && m.sold ? (openBlock(), createElementBlock("div", _hoisted_12$1, [
|
|
241
241
|
createElementVNode("p", _hoisted_13$1, toDisplayString(e.hoveredData.counts.sold), 1),
|
|
242
242
|
t[3] || (t[3] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Sold", -1))
|
|
243
243
|
])) : createCommentVNode("", !0)
|
|
@@ -319,33 +319,33 @@ const _hoisted_1$f = {
|
|
|
319
319
|
},
|
|
320
320
|
emits: ["changeComponent"],
|
|
321
321
|
setup(o, { emit: e }) {
|
|
322
|
-
const t = e, r = o, n = ref(), p = ref(),
|
|
322
|
+
const t = e, r = o, n = ref(), p = ref(), d = ref(null), a = computed(() => {
|
|
323
323
|
if (r.project)
|
|
324
324
|
return r.project.svg;
|
|
325
325
|
}), i = computed(() => {
|
|
326
326
|
var u, g;
|
|
327
|
-
const
|
|
328
|
-
(
|
|
327
|
+
const c = (g = (u = r.projectMeta) == null ? void 0 : u.find(
|
|
328
|
+
(m) => m.meta_key === "project_img_contain"
|
|
329
329
|
)) == null ? void 0 : g.meta_value;
|
|
330
|
-
return JSON.parse((
|
|
331
|
-
}), l = (
|
|
332
|
-
const u =
|
|
330
|
+
return JSON.parse((c == null ? void 0 : c.toString()) || "false");
|
|
331
|
+
}), l = (c) => {
|
|
332
|
+
const u = c.target;
|
|
333
333
|
u && (n.value = u);
|
|
334
|
-
},
|
|
335
|
-
var g,
|
|
336
|
-
|
|
334
|
+
}, h = (c) => {
|
|
335
|
+
var g, m, b;
|
|
336
|
+
c.target.nodeName === "path" && (((g = p.value) == null ? void 0 : g.conf) === "sold" || ((m = p.value) == null ? void 0 : m.conf) === "reserved" || t("changeComponent", ((b = d.value) == null ? void 0 : b.type) || "", p.value));
|
|
337
337
|
};
|
|
338
338
|
return watch(
|
|
339
339
|
() => n.value,
|
|
340
|
-
(
|
|
341
|
-
var g,
|
|
342
|
-
if (!
|
|
343
|
-
const u =
|
|
340
|
+
(c) => {
|
|
341
|
+
var g, m, b, s, f, k, _;
|
|
342
|
+
if (!c) return;
|
|
343
|
+
const u = c.parentElement;
|
|
344
344
|
if (u && u.nodeName === "g") {
|
|
345
345
|
const v = u.getAttribute("id");
|
|
346
|
-
if (!v || (
|
|
347
|
-
const y = (
|
|
348
|
-
switch ((b =
|
|
346
|
+
if (!v || (d.value = ((g = r.project) == null ? void 0 : g.polygon_data.find((w) => w.key === v)) || null, !d.value)) return;
|
|
347
|
+
const y = (m = d.value) == null ? void 0 : m.id;
|
|
348
|
+
switch ((b = d.value) == null ? void 0 : b.type) {
|
|
349
349
|
case "floor":
|
|
350
350
|
const w = (s = r.floors) == null ? void 0 : s.find(
|
|
351
351
|
(x) => x.id === y
|
|
@@ -373,20 +373,20 @@ const _hoisted_1$f = {
|
|
|
373
373
|
break;
|
|
374
374
|
}
|
|
375
375
|
} else
|
|
376
|
-
|
|
376
|
+
d.value = null, p.value = null;
|
|
377
377
|
}
|
|
378
|
-
), (
|
|
378
|
+
), (c, u) => {
|
|
379
379
|
var g;
|
|
380
380
|
return openBlock(), createBlock(_sfc_main$f, {
|
|
381
381
|
hoverdData: p.value,
|
|
382
|
-
type: (g =
|
|
382
|
+
type: (g = d.value) == null ? void 0 : g.type
|
|
383
383
|
}, {
|
|
384
384
|
default: withCtx(() => {
|
|
385
|
-
var
|
|
385
|
+
var m, b, s, f;
|
|
386
386
|
return [
|
|
387
387
|
createElementVNode("div", _hoisted_1$d, [
|
|
388
388
|
createElementVNode("img", {
|
|
389
|
-
src: (
|
|
389
|
+
src: (m = c.project) == null ? void 0 : m.project_image[0].url,
|
|
390
390
|
alt: "",
|
|
391
391
|
class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
|
|
392
392
|
"ire-object-contain": unref(i),
|
|
@@ -404,7 +404,7 @@ const _hoisted_1$f = {
|
|
|
404
404
|
innerHTML: unref(a),
|
|
405
405
|
key: unref(a),
|
|
406
406
|
onMouseover: l,
|
|
407
|
-
onClick:
|
|
407
|
+
onClick: h
|
|
408
408
|
}, null, 42, _hoisted_3$5))
|
|
409
409
|
])
|
|
410
410
|
];
|
|
@@ -497,11 +497,11 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
497
497
|
},
|
|
498
498
|
emits: ["changeComponent"],
|
|
499
499
|
setup(o, { emit: e }) {
|
|
500
|
-
const t = e, r = o, n = ref(), p = ref(),
|
|
500
|
+
const t = e, r = o, n = ref(), p = ref(), d = ref(), a = ref(), i = ref(), l = ref(), h = computed$1(() => {
|
|
501
501
|
var s;
|
|
502
502
|
if ((s = r.floor) != null && s.svg)
|
|
503
503
|
return r.floor.svg;
|
|
504
|
-
}),
|
|
504
|
+
}), c = computed$1(() => r.floors.filter(
|
|
505
505
|
(s) => (
|
|
506
506
|
// floorItem.conf !== "reserved" &&
|
|
507
507
|
// floorItem.conf !== "sold" &&
|
|
@@ -524,8 +524,8 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
524
524
|
f && (p.value = f);
|
|
525
525
|
}, g = (s) => {
|
|
526
526
|
var k, _, v;
|
|
527
|
-
s.target.nodeName === "path" && (((k = a.value) == null ? void 0 : k.conf) === "sold" || ((_ = a.value) == null ? void 0 : _.conf) === "reserved" || t("changeComponent", ((v =
|
|
528
|
-
},
|
|
527
|
+
s.target.nodeName === "path" && (((k = a.value) == null ? void 0 : k.conf) === "sold" || ((_ = a.value) == null ? void 0 : _.conf) === "reserved" || t("changeComponent", ((v = d.value) == null ? void 0 : v.type) || "", a.value));
|
|
528
|
+
}, m = () => {
|
|
529
529
|
n.value && n.value.querySelectorAll("g").forEach((f) => {
|
|
530
530
|
var v, y, w;
|
|
531
531
|
const k = f.getAttribute("id"), _ = r.floor.polygon_data.find(
|
|
@@ -552,18 +552,18 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
552
552
|
const f = s.parentElement;
|
|
553
553
|
if (f && f.nodeName === "g") {
|
|
554
554
|
const y = f.getAttribute("id");
|
|
555
|
-
if (!y || (
|
|
556
|
-
if (((_ =
|
|
555
|
+
if (!y || (d.value = ((k = r.floor) == null ? void 0 : k.polygon_data.find((w) => w.key === y)) || null, !d.value)) return;
|
|
556
|
+
if (((_ = d.value) == null ? void 0 : _.type) === "flat") {
|
|
557
557
|
const w = (v = r.flats) == null ? void 0 : v.find(
|
|
558
558
|
($) => {
|
|
559
559
|
var C;
|
|
560
|
-
return ($ == null ? void 0 : $.id) === ((C =
|
|
560
|
+
return ($ == null ? void 0 : $.id) === ((C = d.value) == null ? void 0 : C.id);
|
|
561
561
|
}
|
|
562
562
|
);
|
|
563
563
|
a.value = w;
|
|
564
564
|
}
|
|
565
565
|
} else
|
|
566
|
-
|
|
566
|
+
d.value = null;
|
|
567
567
|
}
|
|
568
568
|
), watch(
|
|
569
569
|
() => i.value,
|
|
@@ -572,7 +572,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
572
572
|
(f) => f.id === i.value
|
|
573
573
|
);
|
|
574
574
|
s != null && s.conf || (s && t("changeComponent", "floor", s), setTimeout(() => {
|
|
575
|
-
|
|
575
|
+
m();
|
|
576
576
|
}, 0));
|
|
577
577
|
}
|
|
578
578
|
), onMounted(() => {
|
|
@@ -582,17 +582,17 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
582
582
|
var v;
|
|
583
583
|
return _.id === ((v = r.floor.block_id) == null ? void 0 : v.toString());
|
|
584
584
|
}
|
|
585
|
-
), i.value = (k = (f =
|
|
585
|
+
), i.value = (k = (f = c.value) == null ? void 0 : f.find(
|
|
586
586
|
(_) => {
|
|
587
587
|
var v;
|
|
588
588
|
return (_ == null ? void 0 : _.value) == ((v = r.floor) == null ? void 0 : v.id);
|
|
589
589
|
}
|
|
590
|
-
)) == null ? void 0 : k.value,
|
|
590
|
+
)) == null ? void 0 : k.value, m();
|
|
591
591
|
}), (s, f) => {
|
|
592
592
|
var k;
|
|
593
593
|
return openBlock(), createBlock(_sfc_main$f, {
|
|
594
594
|
hoverdData: a.value,
|
|
595
|
-
type: (k =
|
|
595
|
+
type: (k = d.value) == null ? void 0 : k.type
|
|
596
596
|
}, {
|
|
597
597
|
header: withCtx(() => [
|
|
598
598
|
createVNode(_sfc_main$b, { onClick: b }),
|
|
@@ -600,7 +600,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
600
600
|
createVNode(_sfc_main$d, {
|
|
601
601
|
modelValue: i.value,
|
|
602
602
|
"onUpdate:modelValue": f[0] || (f[0] = (_) => i.value = _),
|
|
603
|
-
data:
|
|
603
|
+
data: c.value
|
|
604
604
|
}, null, 8, ["modelValue", "data"])
|
|
605
605
|
])
|
|
606
606
|
]),
|
|
@@ -620,8 +620,8 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
|
|
|
620
620
|
ref_key: "svgRef",
|
|
621
621
|
ref: n,
|
|
622
622
|
class: "canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_g[conf=reserved]_path]:ire-fill-[var(--reserved-color)] [&_g[conf=sold]_path]:ire-fill-[var(--sold-color)] [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:!ire-transition-all hover:[&_path]:ire-fill-[var(--path-hover-color)]",
|
|
623
|
-
innerHTML:
|
|
624
|
-
key:
|
|
623
|
+
innerHTML: h.value,
|
|
624
|
+
key: h.value,
|
|
625
625
|
onMouseover: u,
|
|
626
626
|
onClick: g
|
|
627
627
|
}, null, 40, _hoisted_4$3))
|
|
@@ -682,11 +682,11 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
682
682
|
}, _hoisted_17 = { class: "!ire-text-2xl" }, _hoisted_18 = {
|
|
683
683
|
key: 1,
|
|
684
684
|
class: "ire-flex ire-w-fit ire-flex-col ire-items-center ire-border-b ire-border-b-gray-200 ire-py-4"
|
|
685
|
-
}, _hoisted_19 = { class: "!ire-text-2xl" }, _hoisted_20 = {
|
|
686
|
-
key: 0,
|
|
687
|
-
class: "!ire-text-2xl"
|
|
688
|
-
}, _hoisted_22 = {
|
|
685
|
+
}, _hoisted_19 = { class: "!ire-text-2xl" }, _hoisted_20 = {
|
|
689
686
|
key: 0,
|
|
687
|
+
class: "ire-flex ire-w-fit ire-flex-col ire-items-center ire-border-b ire-border-b-gray-200 ire-py-4"
|
|
688
|
+
}, _hoisted_21 = { class: "!ire-text-2xl" }, _hoisted_22 = {
|
|
689
|
+
key: 1,
|
|
690
690
|
class: "border-b ire-flex ire-w-fit ire-flex-col ire-items-center ire-border-b-gray-200 ire-py-4"
|
|
691
691
|
}, _hoisted_23 = {
|
|
692
692
|
key: 0,
|
|
@@ -699,16 +699,16 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
699
699
|
},
|
|
700
700
|
emits: ["changeComponent"],
|
|
701
701
|
setup(o, { emit: e }) {
|
|
702
|
-
const t = e, r = o, n = ref(!0), p = ref(0),
|
|
703
|
-
var l,
|
|
704
|
-
const i = n.value ? (
|
|
702
|
+
const t = e, r = o, n = ref(!0), p = ref(0), d = computed$1(() => {
|
|
703
|
+
var l, h, c, u, g, m;
|
|
704
|
+
const i = n.value ? (c = (h = (l = r.flat) == null ? void 0 : l.type) == null ? void 0 : h.image_2d) == null ? void 0 : c.length : (m = (g = (u = r.flat) == null ? void 0 : u.type) == null ? void 0 : g.image_3d) == null ? void 0 : m.length;
|
|
705
705
|
return ["I", "II", "III"].slice(0, i);
|
|
706
706
|
}), a = () => {
|
|
707
707
|
var l;
|
|
708
708
|
const i = (l = r.floors) == null ? void 0 : l.find(
|
|
709
|
-
(
|
|
710
|
-
var
|
|
711
|
-
return ((
|
|
709
|
+
(h) => {
|
|
710
|
+
var c, u, g, m;
|
|
711
|
+
return ((c = h.floor_number) == null ? void 0 : c.toString()) === ((g = (u = r.flat) == null ? void 0 : u.floor_number) == null ? void 0 : g.toString()) && (r.flat.block_id ? ((m = h == null ? void 0 : h.block_id) == null ? void 0 : m.toString()) === r.flat.block_id : !h.block_id);
|
|
712
712
|
}
|
|
713
713
|
);
|
|
714
714
|
i ? t("changeComponent", "floor", i) : t("changeComponent", "project", null);
|
|
@@ -727,7 +727,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
727
727
|
createVNode(_sfc_main$b, { onClick: a })
|
|
728
728
|
]),
|
|
729
729
|
default: withCtx(() => {
|
|
730
|
-
var
|
|
730
|
+
var h, c, u, g, m, b, s, f, k, _, v, y, w, $, C, D, x, B, S, M, j, L, T;
|
|
731
731
|
return [
|
|
732
732
|
createElementVNode("div", _hoisted_1$6, [
|
|
733
733
|
createElementVNode("div", _hoisted_2$3, [
|
|
@@ -753,7 +753,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
753
753
|
}),
|
|
754
754
|
createElementVNode("div", _hoisted_5, [
|
|
755
755
|
createElementVNode("div", _hoisted_6, [
|
|
756
|
-
(g = (u = (
|
|
756
|
+
(g = (u = (c = (h = i.flat) == null ? void 0 : h.type) == null ? void 0 : c.image_2d) == null ? void 0 : u[0]) != null && g.url ? (openBlock(), createElementBlock("div", {
|
|
757
757
|
key: 0,
|
|
758
758
|
class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary hover:ire-text-white", { "ire-bg-primary ire-text-white": n.value }]),
|
|
759
759
|
onClick: l[0] || (l[0] = (E) => n.value = !0)
|
|
@@ -763,7 +763,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
763
763
|
}, null, 8, ["class"]),
|
|
764
764
|
l[2] || (l[2] = createElementVNode("p", null, "2D plan", -1))
|
|
765
765
|
], 2)) : createCommentVNode("", !0),
|
|
766
|
-
(f = (s = (b = (
|
|
766
|
+
(f = (s = (b = (m = i.flat) == null ? void 0 : m.type) == null ? void 0 : b.image_3d) == null ? void 0 : s[0]) != null && f.url ? (openBlock(), createElementBlock("div", {
|
|
767
767
|
key: 1,
|
|
768
768
|
class: normalizeClass(["ire-group ire-flex ire-cursor-pointer ire-items-center ire-gap-2 ire-rounded-lg ire-p-3 !ire-text-xs ire-transition-all hover:ire-bg-primary hover:ire-text-white", { "ire-bg-primary ire-text-white": !n.value }]),
|
|
769
769
|
onClick: l[1] || (l[1] = (E) => n.value = !1)
|
|
@@ -776,8 +776,8 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
776
776
|
l[3] || (l[3] = createElementVNode("p", null, "3D plan", -1))
|
|
777
777
|
], 2)) : createCommentVNode("", !0)
|
|
778
778
|
]),
|
|
779
|
-
((k =
|
|
780
|
-
(openBlock(!0), createElementBlock(Fragment, null, renderList(
|
|
779
|
+
((k = d.value) == null ? void 0 : k.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
|
|
780
|
+
(openBlock(!0), createElementBlock(Fragment, null, renderList(d.value, (E, V) => (openBlock(), createElementBlock("div", {
|
|
781
781
|
key: E,
|
|
782
782
|
class: normalizeClass(["ire-flex ire-h-10 ire-w-10 ire-cursor-pointer ire-items-center ire-justify-center ire-rounded-lg ire-p-2 ire-transition-all hover:ire-bg-black hover:ire-text-white", {
|
|
783
783
|
"ire-bg-black ire-text-white": p.value === V
|
|
@@ -806,16 +806,16 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
|
|
|
806
806
|
l[6] || (l[6] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
|
|
807
807
|
])) : createCommentVNode("", !0)
|
|
808
808
|
]),
|
|
809
|
-
|
|
810
|
-
(
|
|
809
|
+
(S = (B = i.flat) == null ? void 0 : B.type) != null && S.area_m2 ? (openBlock(), createElementBlock("div", _hoisted_20, [
|
|
810
|
+
createElementVNode("p", _hoisted_21, [
|
|
811
811
|
createTextVNode(toDisplayString(i.flat.type.area_m2) + " ", 1),
|
|
812
812
|
l[7] || (l[7] = createElementVNode("span", { class: "ire-font-light" }, [
|
|
813
813
|
createTextVNode(" M "),
|
|
814
|
-
createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, "2")
|
|
814
|
+
createElementVNode("sup", { class: "ire-inline-block -ire-translate-x-1 !ire-text-sm" }, " 2 ")
|
|
815
815
|
], -1))
|
|
816
|
-
])
|
|
816
|
+
]),
|
|
817
817
|
l[8] || (l[8] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
|
|
818
|
-
]),
|
|
818
|
+
])) : createCommentVNode("", !0),
|
|
819
819
|
(M = i.flat) != null && M.price ? (openBlock(), createElementBlock("div", _hoisted_22, [
|
|
820
820
|
createElementVNode("div", null, [
|
|
821
821
|
(j = i.flat) != null && j.offer_price ? (openBlock(), createElementBlock("div", _hoisted_24, [
|
|
@@ -894,15 +894,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
894
894
|
},
|
|
895
895
|
setup(o) {
|
|
896
896
|
return (e, t) => {
|
|
897
|
-
var r, n, p,
|
|
897
|
+
var r, n, p, d, a, i, l, h;
|
|
898
898
|
return openBlock(), createElementBlock("div", null, [
|
|
899
899
|
createElementVNode("p", _hoisted_1$2, toDisplayString((n = (r = e.modalData) == null ? void 0 : r.modalObject) == null ? void 0 : n.title), 1),
|
|
900
900
|
createVNode(_sfc_main$4, {
|
|
901
|
-
editor: (
|
|
901
|
+
editor: (d = (p = e.modalData) == null ? void 0 : p.modalObject) == null ? void 0 : d.description
|
|
902
902
|
}, null, 8, ["editor"]),
|
|
903
903
|
(i = (a = e.modalData.modalObject.modalImage) == null ? void 0 : a[0]) != null && i.url ? (openBlock(), createElementBlock("img", {
|
|
904
904
|
key: 0,
|
|
905
|
-
src: (
|
|
905
|
+
src: (h = (l = e.modalData.modalObject.modalImage) == null ? void 0 : l[0]) == null ? void 0 : h.url,
|
|
906
906
|
alt: "",
|
|
907
907
|
class: "ire-mt-5 ire-h-[400px] ire-w-full ire-object-contain"
|
|
908
908
|
}, null, 8, _hoisted_2$1)) : createCommentVNode("", !0)
|
|
@@ -918,76 +918,76 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
918
918
|
},
|
|
919
919
|
emits: ["changeComponent"],
|
|
920
920
|
setup(o, { emit: e }) {
|
|
921
|
-
const t = e, r = o, n = ref(), p = ref(),
|
|
922
|
-
var
|
|
923
|
-
if ((
|
|
921
|
+
const t = e, r = o, n = ref(), p = ref(), d = ref(), a = ref(), i = computed$1(() => {
|
|
922
|
+
var c, u;
|
|
923
|
+
if ((c = r.block) != null && c.svg)
|
|
924
924
|
return (u = r.block) == null ? void 0 : u.svg;
|
|
925
|
-
}), l = (
|
|
926
|
-
const u =
|
|
925
|
+
}), l = (c) => {
|
|
926
|
+
const u = c.target;
|
|
927
927
|
u && (p.value = u);
|
|
928
|
-
},
|
|
929
|
-
var g,
|
|
930
|
-
|
|
928
|
+
}, h = (c) => {
|
|
929
|
+
var g, m, b;
|
|
930
|
+
c.target.nodeName === "path" && (((g = a.value) == null ? void 0 : g.conf) === "sold" || ((m = a.value) == null ? void 0 : m.conf) === "reserved" || t(
|
|
931
931
|
"changeComponent",
|
|
932
|
-
((b =
|
|
932
|
+
((b = d.value) == null ? void 0 : b.type) || "",
|
|
933
933
|
a.value
|
|
934
934
|
));
|
|
935
935
|
};
|
|
936
936
|
return watch(
|
|
937
937
|
() => p.value,
|
|
938
|
-
(
|
|
939
|
-
var g,
|
|
940
|
-
if (!
|
|
941
|
-
const u =
|
|
938
|
+
(c) => {
|
|
939
|
+
var g, m, b, s, f;
|
|
940
|
+
if (!c) return;
|
|
941
|
+
const u = c.parentElement;
|
|
942
942
|
if (u && u.nodeName === "g") {
|
|
943
943
|
const k = u.getAttribute("id");
|
|
944
|
-
if (!k || (
|
|
945
|
-
if (((
|
|
944
|
+
if (!k || (d.value = ((g = r.block) == null ? void 0 : g.polygon_data.find((_) => _.key === k)) || null, !d.value)) return;
|
|
945
|
+
if (((m = d.value) == null ? void 0 : m.type) === "floor") {
|
|
946
946
|
const _ = (b = r.floors) == null ? void 0 : b.find(
|
|
947
947
|
(v) => {
|
|
948
948
|
var y;
|
|
949
|
-
return (v == null ? void 0 : v.id) === ((y =
|
|
949
|
+
return (v == null ? void 0 : v.id) === ((y = d.value) == null ? void 0 : y.id);
|
|
950
950
|
}
|
|
951
951
|
);
|
|
952
952
|
a.value = _;
|
|
953
|
-
} else if (((s =
|
|
953
|
+
} else if (((s = d.value) == null ? void 0 : s.type) === "flat") {
|
|
954
954
|
const _ = (f = r.flats) == null ? void 0 : f.find(
|
|
955
955
|
(v) => {
|
|
956
956
|
var y;
|
|
957
|
-
return (v == null ? void 0 : v.id) === ((y =
|
|
957
|
+
return (v == null ? void 0 : v.id) === ((y = d.value) == null ? void 0 : y.id);
|
|
958
958
|
}
|
|
959
959
|
);
|
|
960
960
|
a.value = _;
|
|
961
961
|
} else
|
|
962
962
|
a.value = null;
|
|
963
963
|
} else
|
|
964
|
-
|
|
964
|
+
d.value = null, a.value = null;
|
|
965
965
|
}
|
|
966
|
-
), (
|
|
966
|
+
), (c, u) => {
|
|
967
967
|
var g;
|
|
968
968
|
return openBlock(), createBlock(_sfc_main$f, {
|
|
969
969
|
hoverdData: a.value,
|
|
970
|
-
type: (g =
|
|
970
|
+
type: (g = d.value) == null ? void 0 : g.type
|
|
971
971
|
}, {
|
|
972
972
|
header: withCtx(() => {
|
|
973
|
-
var
|
|
973
|
+
var m;
|
|
974
974
|
return [
|
|
975
975
|
createVNode(_sfc_main$b, {
|
|
976
|
-
onClick: u[0] || (u[0] = (b) =>
|
|
976
|
+
onClick: u[0] || (u[0] = (b) => c.$emit("changeComponent", "project", null))
|
|
977
977
|
}),
|
|
978
|
-
createElementVNode("p", _hoisted_1$1, toDisplayString((
|
|
978
|
+
createElementVNode("p", _hoisted_1$1, toDisplayString((m = c.block) == null ? void 0 : m.title), 1)
|
|
979
979
|
];
|
|
980
980
|
}),
|
|
981
981
|
default: withCtx(() => {
|
|
982
|
-
var
|
|
982
|
+
var m, b, s, f, k, _;
|
|
983
983
|
return [
|
|
984
984
|
createElementVNode("div", _hoisted_2, [
|
|
985
985
|
createElementVNode("img", {
|
|
986
|
-
src: ((s = (b = (
|
|
986
|
+
src: ((s = (b = (m = c.block) == null ? void 0 : m.block_image) == null ? void 0 : b[0]) == null ? void 0 : s.url) || "",
|
|
987
987
|
alt: "",
|
|
988
988
|
class: normalizeClass(["ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full", {
|
|
989
|
-
"ire-object-contain":
|
|
990
|
-
"ire-object-cover": !
|
|
989
|
+
"ire-object-contain": c.block.img_contain,
|
|
990
|
+
"ire-object-cover": !c.block.img_contain
|
|
991
991
|
}])
|
|
992
992
|
}, null, 10, _hoisted_3),
|
|
993
993
|
(openBlock(), createElementBlock("div", {
|
|
@@ -1003,7 +1003,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1003
1003
|
innerHTML: i.value,
|
|
1004
1004
|
key: i.value,
|
|
1005
1005
|
onMouseover: l,
|
|
1006
|
-
onClick:
|
|
1006
|
+
onClick: h
|
|
1007
1007
|
}, null, 42, _hoisted_4))
|
|
1008
1008
|
])
|
|
1009
1009
|
];
|
|
@@ -1019,8 +1019,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1019
1019
|
},
|
|
1020
1020
|
setup(__props) {
|
|
1021
1021
|
var o, e, t, r, n, p;
|
|
1022
|
-
const props = __props, getMeta = (
|
|
1023
|
-
(a) => a.meta_key ===
|
|
1022
|
+
const props = __props, getMeta = (d) => props.shortcodeDataProps.meta.find(
|
|
1023
|
+
(a) => a.meta_key === d
|
|
1024
1024
|
), constants = ref({
|
|
1025
1025
|
PREVIEW_PATH_COLOR: getMeta("path_color").meta_value || "rgba(255, 255, 255, 0.3)",
|
|
1026
1026
|
PREVIEW_PATH_HOVER_COLOR: getMeta("path_hover_color").meta_value || "rgba(250, 250, 250, 0.54)",
|
|
@@ -1048,17 +1048,17 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1048
1048
|
if (shortcodeData.value)
|
|
1049
1049
|
return shortcodeData.value.project;
|
|
1050
1050
|
}), floors = computed$1(() => {
|
|
1051
|
-
var
|
|
1051
|
+
var d;
|
|
1052
1052
|
if (shortcodeData.value)
|
|
1053
|
-
return (
|
|
1054
|
-
const i = shortcodeData.value.flats.filter((
|
|
1055
|
-
(u) => u.type && u.type === "flat" && u.id ===
|
|
1053
|
+
return (d = shortcodeData.value.floors) == null || d.forEach((a) => {
|
|
1054
|
+
const i = shortcodeData.value.flats.filter((h) => h.floor_number !== a.floor_number.toString() ? !1 : Object.values(a.polygon_data).some(
|
|
1055
|
+
(u) => u.type && u.type === "flat" && u.id === h.id ? a.block_id ? h.block_id === a.block_id.toString() : !h.block_id : !1
|
|
1056
1056
|
));
|
|
1057
1057
|
a.flats = i;
|
|
1058
1058
|
const { conf: l } = a || {};
|
|
1059
1059
|
if (i != null && i.length && !l) {
|
|
1060
|
-
const
|
|
1061
|
-
|
|
1060
|
+
const h = i.every((u) => u.conf === "reserved"), c = i.every((u) => u.conf === "sold");
|
|
1061
|
+
h ? a.conf = "reserved" : c && (a.conf = "sold");
|
|
1062
1062
|
}
|
|
1063
1063
|
}), shortcodeData.value.floors;
|
|
1064
1064
|
}), blocks = computed$1(() => {
|
|
@@ -1068,12 +1068,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1068
1068
|
if (shortcodeData.value)
|
|
1069
1069
|
return shortcodeData.value.types;
|
|
1070
1070
|
}), flats = computed$1(() => {
|
|
1071
|
-
var
|
|
1071
|
+
var d, a;
|
|
1072
1072
|
if (shortcodeData.value)
|
|
1073
|
-
return (
|
|
1073
|
+
return (a = (d = shortcodeData.value) == null ? void 0 : d.flats) == null ? void 0 : a.map((i) => {
|
|
1074
1074
|
var l;
|
|
1075
|
-
|
|
1076
|
-
|
|
1075
|
+
if (i != null && i.use_type || !(i != null && i.type)) {
|
|
1076
|
+
const h = (l = types.value) == null ? void 0 : l.find((c) => c.id === i.type_id);
|
|
1077
|
+
h && (i.type = h);
|
|
1078
|
+
}
|
|
1079
|
+
return i;
|
|
1077
1080
|
});
|
|
1078
1081
|
}), actions = computed$1(() => {
|
|
1079
1082
|
if (shortcodeData.value)
|
|
@@ -1081,9 +1084,9 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1081
1084
|
}), projectMeta = computed$1(() => {
|
|
1082
1085
|
if (shortcodeData.value)
|
|
1083
1086
|
return shortcodeData.value.meta;
|
|
1084
|
-
}), getColorMeta = (
|
|
1087
|
+
}), getColorMeta = (d) => {
|
|
1085
1088
|
var a, i;
|
|
1086
|
-
return (i = (a = projectMeta.value) == null ? void 0 : a.find((l) => l.meta_key ===
|
|
1089
|
+
return (i = (a = projectMeta.value) == null ? void 0 : a.find((l) => l.meta_key === d)) == null ? void 0 : i.meta_value;
|
|
1087
1090
|
}, changeRoute = (flowType, polygonItem) => {
|
|
1088
1091
|
switch (flowType) {
|
|
1089
1092
|
case "project":
|
|
@@ -1110,8 +1113,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1110
1113
|
else if (actionData.actionType === "script")
|
|
1111
1114
|
try {
|
|
1112
1115
|
eval(actionData == null ? void 0 : actionData.script);
|
|
1113
|
-
} catch (
|
|
1114
|
-
console.error("Error executing script:",
|
|
1116
|
+
} catch (d) {
|
|
1117
|
+
console.error("Error executing script:", d);
|
|
1115
1118
|
}
|
|
1116
1119
|
break;
|
|
1117
1120
|
}
|
|
@@ -1119,10 +1122,10 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
|
|
|
1119
1122
|
return watch(
|
|
1120
1123
|
() => projectMeta.value,
|
|
1121
1124
|
() => {
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1125
|
+
const d = getColorMeta("path_color"), a = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), l = getColorMeta("sold_color"), h = getColorMeta("stroke_color"), c = getColorMeta("stroke_width");
|
|
1126
|
+
d && (colors.path = d.toString()), a && (colors.path_hover = a.toString()), i && (colors.reserved = i.toString()), l && (colors.sold = l.toString()), h && (colors.stroke_color = h.toString()), c && (colors.stroke_width = Number(c));
|
|
1124
1127
|
}
|
|
1125
|
-
), (
|
|
1128
|
+
), (d, a) => (openBlock(), createElementBlock("div", _hoisted_1, [
|
|
1126
1129
|
createVNode(Transition, {
|
|
1127
1130
|
name: "ire-fade-in-out",
|
|
1128
1131
|
mode: "out-in",
|
|
@@ -4,12 +4,12 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
4
4
|
flats: FlatItem[];
|
|
5
5
|
floors: FloorItem[];
|
|
6
6
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
7
|
-
changeComponent: (flow: "" | "
|
|
7
|
+
changeComponent: (flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any;
|
|
8
8
|
}, string, import('vue').PublicProps, Readonly<{
|
|
9
9
|
block: BlockItem;
|
|
10
10
|
flats: FlatItem[];
|
|
11
11
|
floors: FloorItem[];
|
|
12
12
|
}> & Readonly<{
|
|
13
|
-
onChangeComponent?: ((flow: "" | "
|
|
13
|
+
onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
|
|
14
14
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
15
15
|
export default _default;
|
|
@@ -3,11 +3,11 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
3
3
|
flat: FlatItem | undefined;
|
|
4
4
|
floors: FloorItem[] | undefined;
|
|
5
5
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
6
|
-
changeComponent: (flow: "" | "
|
|
6
|
+
changeComponent: (flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any;
|
|
7
7
|
}, string, import('vue').PublicProps, Readonly<{
|
|
8
8
|
flat: FlatItem | undefined;
|
|
9
9
|
floors: FloorItem[] | undefined;
|
|
10
10
|
}> & Readonly<{
|
|
11
|
-
onChangeComponent?: ((flow: "" | "
|
|
11
|
+
onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
|
|
12
12
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
13
13
|
export default _default;
|
|
@@ -5,13 +5,13 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
5
5
|
floors: FloorItem[];
|
|
6
6
|
blocks?: BlockItem[];
|
|
7
7
|
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
8
|
-
changeComponent: (flow: "" | "
|
|
8
|
+
changeComponent: (flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any;
|
|
9
9
|
}, string, import('vue').PublicProps, Readonly<{
|
|
10
10
|
flats: FlatItem[] | undefined;
|
|
11
11
|
floor: FloorItem;
|
|
12
12
|
floors: FloorItem[];
|
|
13
13
|
blocks?: BlockItem[];
|
|
14
14
|
}> & Readonly<{
|
|
15
|
-
onChangeComponent?: ((flow: "" | "
|
|
15
|
+
onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
|
|
16
16
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
17
17
|
export default _default;
|