ire-preview 2.0.0 → 2.0.1

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 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, c, a, i, l, m, d, u, g, h, b, s, f, k, _, v, y, w;
222
+ var r, n, p, c, l, i, a, m, d, u, g, h, 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, [
@@ -229,8 +229,8 @@ const _hoisted_1$f = {
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
  (c = e.hoveredData) != null && c.conf ? (openBlock(), createElementBlock("div", _hoisted_6$1, toDisplayString(e.hoveredData.conf), 1)) : (openBlock(), createElementBlock("div", _hoisted_7$1, [
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(((m = (l = e.hoveredData) == null ? void 0 : l.counts) == null ? void 0 : m.available) || 0), 1),
232
+ (i = (l = e.hoveredData) == null ? void 0 : l.counts) != null && i.available ? (openBlock(), createElementBlock("div", _hoisted_8$1, [
233
+ createElementVNode("p", _hoisted_9$1, toDisplayString(((m = (a = e.hoveredData) == null ? void 0 : a.counts) == null ? void 0 : m.available) || 0), 1),
234
234
  t[1] || (t[1] = createElementVNode("p", { class: "!ire-text-sm ire-uppercase" }, "Available", -1))
235
235
  ])) : createCommentVNode("", !0),
236
236
  (u = (d = e.hoveredData) == null ? void 0 : d.counts) != null && u.reserved ? (openBlock(), createElementBlock("div", _hoisted_10$1, [
@@ -319,7 +319,7 @@ 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(), c = ref(null), a = computed(() => {
322
+ const t = e, r = o, n = ref(), p = ref(), c = ref(null), l = computed(() => {
323
323
  if (r.project)
324
324
  return r.project.svg;
325
325
  }), i = computed(() => {
@@ -328,7 +328,7 @@ const _hoisted_1$f = {
328
328
  (h) => h.meta_key === "project_img_contain"
329
329
  )) == null ? void 0 : g.meta_value;
330
330
  return JSON.parse((d == null ? void 0 : d.toString()) || "false");
331
- }), l = (d) => {
331
+ }), a = (d) => {
332
332
  const u = d.target;
333
333
  u && (n.value = u);
334
334
  }, m = (d) => {
@@ -401,9 +401,9 @@ const _hoisted_1$f = {
401
401
  "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((f = p.value) != null && f.conf)
402
402
  }
403
403
  ]]),
404
- innerHTML: unref(a),
405
- key: unref(a),
406
- onMouseover: l,
404
+ innerHTML: unref(l),
405
+ key: unref(l),
406
+ onMouseover: a,
407
407
  onClick: m
408
408
  }, null, 42, _hoisted_3$5))
409
409
  ])
@@ -497,7 +497,7 @@ 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(), c = ref(), a = ref(), i = ref(), l = ref(), m = computed$1(() => {
500
+ const t = e, r = o, n = ref(), p = ref(), c = ref(), l = ref(), i = ref(), a = ref(), m = computed$1(() => {
501
501
  var s;
502
502
  if ((s = r.floor) != null && s.svg)
503
503
  return r.floor.svg;
@@ -524,7 +524,7 @@ 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 = c.value) == null ? void 0 : v.type) || "", a.value));
527
+ s.target.nodeName === "path" && (((k = l.value) == null ? void 0 : k.conf) === "sold" || ((_ = l.value) == null ? void 0 : _.conf) === "reserved" || t("changeComponent", ((v = c.value) == null ? void 0 : v.type) || "", l.value));
528
528
  }, h = () => {
529
529
  n.value && n.value.querySelectorAll("g").forEach((f) => {
530
530
  var v, y, w;
@@ -542,7 +542,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
542
542
  }
543
543
  });
544
544
  }, b = () => {
545
- r.floor.block_id ? t("changeComponent", "block", l.value) : t("changeComponent", "project", null);
545
+ r.floor.block_id ? t("changeComponent", "block", a.value) : t("changeComponent", "project", null);
546
546
  };
547
547
  return watch(
548
548
  () => p.value,
@@ -560,7 +560,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
560
560
  return ($ == null ? void 0 : $.id) === ((C = c.value) == null ? void 0 : C.id);
561
561
  }
562
562
  );
563
- a.value = w;
563
+ l.value = w;
564
564
  }
565
565
  } else
566
566
  c.value = null;
@@ -577,7 +577,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
577
577
  }
578
578
  ), onMounted(() => {
579
579
  var s, f, k;
580
- l.value = (s = r.blocks) == null ? void 0 : s.find(
580
+ a.value = (s = r.blocks) == null ? void 0 : s.find(
581
581
  (_) => {
582
582
  var v;
583
583
  return _.id === ((v = r.floor.block_id) == null ? void 0 : v.toString());
@@ -591,7 +591,7 @@ const ArrowRight = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["render", _sfc_ren
591
591
  }), (s, f) => {
592
592
  var k;
593
593
  return openBlock(), createBlock(_sfc_main$f, {
594
- hoverdData: a.value,
594
+ hoverdData: l.value,
595
595
  type: (k = c.value) == null ? void 0 : k.type
596
596
  }, {
597
597
  header: withCtx(() => [
@@ -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 = { class: "ire-flex ire-w-fit ire-flex-col ire-items-center ire-border-b ire-border-b-gray-200 ire-py-4" }, _hoisted_21 = {
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,
@@ -700,12 +700,12 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
700
700
  emits: ["changeComponent"],
701
701
  setup(o, { emit: e }) {
702
702
  const t = e, r = o, n = ref(!0), p = ref(0), c = computed$1(() => {
703
- var l, m, d, u, g, h;
704
- const i = n.value ? (d = (m = (l = r.flat) == null ? void 0 : l.type) == null ? void 0 : m.image_2d) == null ? void 0 : d.length : (h = (g = (u = r.flat) == null ? void 0 : u.type) == null ? void 0 : g.image_3d) == null ? void 0 : h.length;
703
+ var a, m, d, u, g, h;
704
+ const i = n.value ? (d = (m = (a = r.flat) == null ? void 0 : a.type) == null ? void 0 : m.image_2d) == null ? void 0 : d.length : (h = (g = (u = r.flat) == null ? void 0 : u.type) == null ? void 0 : g.image_3d) == null ? void 0 : h.length;
705
705
  return ["I", "II", "III"].slice(0, i);
706
- }), a = () => {
707
- var l;
708
- const i = (l = r.floors) == null ? void 0 : l.find(
706
+ }), l = () => {
707
+ var a;
708
+ const i = (a = r.floors) == null ? void 0 : a.find(
709
709
  (m) => {
710
710
  var d, u, g, h;
711
711
  return ((d = m.floor_number) == null ? void 0 : d.toString()) === ((g = (u = r.flat) == null ? void 0 : u.floor_number) == null ? void 0 : g.toString()) && (r.flat.block_id ? ((h = m == null ? void 0 : m.block_id) == null ? void 0 : h.toString()) === r.flat.block_id : !m.block_id);
@@ -719,12 +719,12 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
719
719
  p.value = 0;
720
720
  }
721
721
  ), onMounted(() => {
722
- var i, l;
723
- (l = (i = r.flat) == null ? void 0 : i.type) != null && l.image_2d || (n.value = !1);
724
- }), (i, l) => (openBlock(), createElementBlock("div", null, [
722
+ var i, a;
723
+ (a = (i = r.flat) == null ? void 0 : i.type) != null && a.image_2d || (n.value = !1);
724
+ }), (i, a) => (openBlock(), createElementBlock("div", null, [
725
725
  createVNode(_sfc_main$f, { "hoverd-data": null }, {
726
726
  header: withCtx(() => [
727
- createVNode(_sfc_main$b, { onClick: a })
727
+ createVNode(_sfc_main$b, { onClick: l })
728
728
  ]),
729
729
  default: withCtx(() => {
730
730
  var m, d, u, g, h, b, s, f, k, _, v, y, w, $, C, D, x, B, S, M, j, L, T;
@@ -756,24 +756,24 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
756
756
  (g = (u = (d = (m = i.flat) == null ? void 0 : m.type) == null ? void 0 : d.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
- onClick: l[0] || (l[0] = (E) => n.value = !0)
759
+ onClick: a[0] || (a[0] = (E) => n.value = !0)
760
760
  }, [
761
761
  createVNode(FlatIcon, {
762
762
  class: normalizeClass(["[&_path]:ire-stroke-black group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": n.value }])
763
763
  }, null, 8, ["class"]),
764
- l[2] || (l[2] = createElementVNode("p", null, "2D plan", -1))
764
+ a[2] || (a[2] = createElementVNode("p", null, "2D plan", -1))
765
765
  ], 2)) : createCommentVNode("", !0),
766
766
  (f = (s = (b = (h = i.flat) == null ? void 0 : h.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
- onClick: l[1] || (l[1] = (E) => n.value = !1)
769
+ onClick: a[1] || (a[1] = (E) => n.value = !1)
770
770
  }, [
771
771
  createElementVNode("div", null, [
772
772
  createVNode(Cube, {
773
773
  class: normalizeClass(["group-hover:[&_path]:ire-stroke-white", { "[&_path]:!ire-stroke-white": !n.value }])
774
774
  }, null, 8, ["class"])
775
775
  ]),
776
- l[3] || (l[3] = createElementVNode("p", null, "3D plan", -1))
776
+ a[3] || (a[3] = createElementVNode("p", null, "3D plan", -1))
777
777
  ], 2)) : createCommentVNode("", !0)
778
778
  ]),
779
779
  ((k = c.value) == null ? void 0 : k.length) > 1 ? (openBlock(), createElementBlock("div", _hoisted_7, [
@@ -790,7 +790,7 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
790
790
  createElementVNode("div", _hoisted_9, [
791
791
  createElementVNode("div", _hoisted_10, [
792
792
  createElementVNode("p", _hoisted_11, toDisplayString((_ = i.flat) == null ? void 0 : _.flat_number), 1),
793
- l[4] || (l[4] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
793
+ a[4] || (a[4] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Apartment", -1))
794
794
  ]),
795
795
  createElementVNode("div", _hoisted_12, [
796
796
  createElementVNode("p", _hoisted_13, toDisplayString((y = (v = i.flat) == null ? void 0 : v.type) == null ? void 0 : y.title), 1),
@@ -799,37 +799,37 @@ const Cube = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["render", _sfc_render$1]
799
799
  createElementVNode("div", _hoisted_15, [
800
800
  (C = i.flat) != null && C.floor_number ? (openBlock(), createElementBlock("div", _hoisted_16, [
801
801
  createElementVNode("p", _hoisted_17, toDisplayString(i.flat.floor_number), 1),
802
- l[5] || (l[5] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
802
+ a[5] || (a[5] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Floor", -1))
803
803
  ])) : createCommentVNode("", !0),
804
804
  (x = (D = i.flat) == null ? void 0 : D.type) != null && x.rooms_count ? (openBlock(), createElementBlock("div", _hoisted_18, [
805
805
  createElementVNode("p", _hoisted_19, toDisplayString(i.flat.type.rooms_count), 1),
806
- l[6] || (l[6] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
806
+ a[6] || (a[6] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Room", -1))
807
807
  ])) : createCommentVNode("", !0)
808
808
  ]),
809
- createElementVNode("div", _hoisted_20, [
810
- (S = (B = i.flat) == null ? void 0 : B.type) != null && S.area_m2 ? (openBlock(), createElementBlock("p", _hoisted_21, [
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
- l[7] || (l[7] = createElementVNode("span", { class: "ire-font-light" }, [
812
+ a[7] || (a[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
- ])) : createCommentVNode("", !0),
817
- l[8] || (l[8] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
818
- ]),
816
+ ]),
817
+ a[8] || (a[8] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Area", -1))
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, [
822
822
  createElementVNode("p", _hoisted_25, toDisplayString(Number((L = i.flat) == null ? void 0 : L.price).toLocaleString()), 1),
823
823
  createElementVNode("p", _hoisted_26, [
824
824
  createTextVNode(toDisplayString(Number((T = i.flat) == null ? void 0 : T.offer_price).toLocaleString()), 1),
825
- l[10] || (l[10] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
825
+ a[10] || (a[10] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
826
826
  ])
827
827
  ])) : (openBlock(), createElementBlock("p", _hoisted_23, [
828
828
  createTextVNode(toDisplayString(Number(i.flat.price).toLocaleString()), 1),
829
- l[9] || (l[9] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
829
+ a[9] || (a[9] = createElementVNode("sup", { class: "!ire-text-sm" }, "$", -1))
830
830
  ]))
831
831
  ]),
832
- l[11] || (l[11] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Price", -1))
832
+ a[11] || (a[11] = createElementVNode("p", { class: "!ire-text-xs ire-text-gray-600" }, "Price", -1))
833
833
  ])) : createCommentVNode("", !0)
834
834
  ])
835
835
  ])
@@ -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, c, a, i, l, m;
897
+ var r, n, p, c, l, i, a, m;
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
901
  editor: (c = (p = e.modalData) == null ? void 0 : p.modalObject) == null ? void 0 : c.description
902
902
  }, null, 8, ["editor"]),
903
- (i = (a = e.modalData.modalObject.modalImage) == null ? void 0 : a[0]) != null && i.url ? (openBlock(), createElementBlock("img", {
903
+ (i = (l = e.modalData.modalObject.modalImage) == null ? void 0 : l[0]) != null && i.url ? (openBlock(), createElementBlock("img", {
904
904
  key: 0,
905
- src: (m = (l = e.modalData.modalObject.modalImage) == null ? void 0 : l[0]) == null ? void 0 : m.url,
905
+ src: (m = (a = e.modalData.modalObject.modalImage) == null ? void 0 : a[0]) == null ? void 0 : m.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,19 +918,19 @@ 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(), c = ref(), a = ref(), i = computed$1(() => {
921
+ const t = e, r = o, n = ref(), p = ref(), c = ref(), l = ref(), i = computed$1(() => {
922
922
  var d, u;
923
923
  if ((d = r.block) != null && d.svg)
924
924
  return (u = r.block) == null ? void 0 : u.svg;
925
- }), l = (d) => {
925
+ }), a = (d) => {
926
926
  const u = d.target;
927
927
  u && (p.value = u);
928
928
  }, m = (d) => {
929
929
  var g, h, b;
930
- d.target.nodeName === "path" && (((g = a.value) == null ? void 0 : g.conf) === "sold" || ((h = a.value) == null ? void 0 : h.conf) === "reserved" || t(
930
+ d.target.nodeName === "path" && (((g = l.value) == null ? void 0 : g.conf) === "sold" || ((h = l.value) == null ? void 0 : h.conf) === "reserved" || t(
931
931
  "changeComponent",
932
932
  ((b = c.value) == null ? void 0 : b.type) || "",
933
- a.value
933
+ l.value
934
934
  ));
935
935
  };
936
936
  return watch(
@@ -949,7 +949,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
949
949
  return (v == null ? void 0 : v.id) === ((y = c.value) == null ? void 0 : y.id);
950
950
  }
951
951
  );
952
- a.value = _;
952
+ l.value = _;
953
953
  } else if (((s = c.value) == null ? void 0 : s.type) === "flat") {
954
954
  const _ = (f = r.flats) == null ? void 0 : f.find(
955
955
  (v) => {
@@ -957,16 +957,16 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
957
957
  return (v == null ? void 0 : v.id) === ((y = c.value) == null ? void 0 : y.id);
958
958
  }
959
959
  );
960
- a.value = _;
960
+ l.value = _;
961
961
  } else
962
- a.value = null;
962
+ l.value = null;
963
963
  } else
964
- c.value = null, a.value = null;
964
+ c.value = null, l.value = null;
965
965
  }
966
966
  ), (d, u) => {
967
967
  var g;
968
968
  return openBlock(), createBlock(_sfc_main$f, {
969
- hoverdData: a.value,
969
+ hoverdData: l.value,
970
970
  type: (g = c.value) == null ? void 0 : g.type
971
971
  }, {
972
972
  header: withCtx(() => {
@@ -995,14 +995,14 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
995
995
  ref: n,
996
996
  class: normalizeClass(["canvas ire-absolute ire-left-0 ire-top-0 ire-h-full ire-w-full [&_path]:ire-cursor-pointer [&_path]:ire-fill-[var(--path-color)] [&_path]:ire-transition-all", [
997
997
  {
998
- "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((f = a.value) == null ? void 0 : f.conf) === "reserved",
999
- "hover:[&_path]:ire-fill-[var(--sold-color)]": ((k = a.value) == null ? void 0 : k.conf) === "sold",
1000
- "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((_ = a.value) != null && _.conf)
998
+ "hover:[&_path]:ire-fill-[var(--reserved-color)]": ((f = l.value) == null ? void 0 : f.conf) === "reserved",
999
+ "hover:[&_path]:ire-fill-[var(--sold-color)]": ((k = l.value) == null ? void 0 : k.conf) === "sold",
1000
+ "hover:[&_path]:ire-fill-[var(--path-hover-color)]": !((_ = l.value) != null && _.conf)
1001
1001
  }
1002
1002
  ]]),
1003
1003
  innerHTML: i.value,
1004
1004
  key: i.value,
1005
- onMouseover: l,
1005
+ onMouseover: a,
1006
1006
  onClick: m
1007
1007
  }, null, 42, _hoisted_4))
1008
1008
  ])
@@ -1020,7 +1020,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1020
1020
  setup(__props) {
1021
1021
  var o, e, t, r, n, p;
1022
1022
  const props = __props, getMeta = (c) => props.shortcodeDataProps.meta.find(
1023
- (a) => a.meta_key === c
1023
+ (l) => l.meta_key === c
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)",
@@ -1050,15 +1050,15 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1050
1050
  }), floors = computed$1(() => {
1051
1051
  var c;
1052
1052
  if (shortcodeData.value)
1053
- return (c = shortcodeData.value.floors) == null || c.forEach((a) => {
1054
- const i = shortcodeData.value.flats.filter((m) => m.floor_number !== a.floor_number.toString() ? !1 : Object.values(a.polygon_data).some(
1055
- (u) => u.type && u.type === "flat" && u.id === m.id ? a.block_id ? m.block_id === a.block_id.toString() : !m.block_id : !1
1053
+ return (c = shortcodeData.value.floors) == null || c.forEach((l) => {
1054
+ const i = shortcodeData.value.flats.filter((m) => m.floor_number !== l.floor_number.toString() ? !1 : Object.values(l.polygon_data).some(
1055
+ (u) => u.type && u.type === "flat" && u.id === m.id ? l.block_id ? m.block_id === l.block_id.toString() : !m.block_id : !1
1056
1056
  ));
1057
- a.flats = i;
1058
- const { conf: l } = a || {};
1059
- if (i != null && i.length && !l) {
1057
+ l.flats = i;
1058
+ const { conf: a } = l || {};
1059
+ if (i != null && i.length && !a) {
1060
1060
  const m = i.every((u) => u.conf === "reserved"), d = i.every((u) => u.conf === "sold");
1061
- m ? a.conf = "reserved" : d && (a.conf = "sold");
1061
+ m ? l.conf = "reserved" : d && (l.conf = "sold");
1062
1062
  }
1063
1063
  }), shortcodeData.value.floors;
1064
1064
  }), blocks = computed$1(() => {
@@ -1070,10 +1070,13 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1070
1070
  }), flats = computed$1(() => {
1071
1071
  var c;
1072
1072
  if (shortcodeData.value)
1073
- return (c = shortcodeData.value) == null ? void 0 : c.flats.map((a) => {
1074
- var l;
1075
- const i = (l = types.value) == null ? void 0 : l.find((m) => m.id === a.type_id);
1076
- return i && (a.type = i), a;
1073
+ return (c = shortcodeData.value) == null ? void 0 : c.flats.map((l) => {
1074
+ var i;
1075
+ if (l != null && l.use_type || !(l != null && l.type)) {
1076
+ const a = (i = types.value) == null ? void 0 : i.find((m) => m.id === l.type_id);
1077
+ a && (l.type = a);
1078
+ }
1079
+ return l;
1077
1080
  });
1078
1081
  }), actions = computed$1(() => {
1079
1082
  if (shortcodeData.value)
@@ -1082,8 +1085,8 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1082
1085
  if (shortcodeData.value)
1083
1086
  return shortcodeData.value.meta;
1084
1087
  }), getColorMeta = (c) => {
1085
- var a, i;
1086
- return (i = (a = projectMeta.value) == null ? void 0 : a.find((l) => l.meta_key === c)) == null ? void 0 : i.meta_value;
1088
+ var l, i;
1089
+ return (i = (l = projectMeta.value) == null ? void 0 : l.find((a) => a.meta_key === c)) == null ? void 0 : i.meta_value;
1087
1090
  }, changeRoute = (flowType, polygonItem) => {
1088
1091
  switch (flowType) {
1089
1092
  case "project":
@@ -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 c = getColorMeta("path_color"), a = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), l = getColorMeta("sold_color"), m = getColorMeta("stroke_color"), d = getColorMeta("stroke_width");
1123
- c && (colors.path = c.toString()), a && (colors.path_hover = a.toString()), i && (colors.reserved = i.toString()), l && (colors.sold = l.toString()), m && (colors.stroke_color = m.toString()), d && (colors.stroke_width = Number(d));
1125
+ const c = getColorMeta("path_color"), l = getColorMeta("path_hover_color"), i = getColorMeta("reserved_color"), a = getColorMeta("sold_color"), m = getColorMeta("stroke_color"), d = getColorMeta("stroke_width");
1126
+ c && (colors.path = c.toString()), l && (colors.path_hover = l.toString()), i && (colors.reserved = i.toString()), a && (colors.sold = a.toString()), m && (colors.stroke_color = m.toString()), d && (colors.stroke_width = Number(d));
1124
1127
  }
1125
- ), (c, a) => (openBlock(), createElementBlock("div", _hoisted_1, [
1128
+ ), (c, l) => (openBlock(), createElementBlock("div", _hoisted_1, [
1126
1129
  createVNode(Transition, {
1127
1130
  name: "ire-fade-in-out",
1128
1131
  mode: "out-in",
@@ -1138,25 +1141,25 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1138
1141
  projectMeta: projectMeta.value,
1139
1142
  blocks: blocks.value,
1140
1143
  actions: actions.value,
1141
- onChangeComponent: a[0] || (a[0] = (i, l) => changeRoute(i, l))
1144
+ onChangeComponent: l[0] || (l[0] = (i, a) => changeRoute(i, a))
1142
1145
  }, null, 8, ["project", "floors", "flats", "projectMeta", "blocks", "actions"])) : flow.value === "blockFlow" && flats.value && floors.value && blocks.value ? (openBlock(), createBlock(_sfc_main$2, {
1143
1146
  key: 1,
1144
1147
  block: hoveredData.value,
1145
1148
  flats: flats.value,
1146
1149
  floors: floors.value,
1147
- onChangeComponent: a[1] || (a[1] = (i, l) => changeRoute(i, l))
1150
+ onChangeComponent: l[1] || (l[1] = (i, a) => changeRoute(i, a))
1148
1151
  }, null, 8, ["block", "flats", "floors"])) : flow.value === "floorFlow" && floors.value ? (openBlock(), createBlock(_sfc_main$a, {
1149
1152
  key: 2,
1150
1153
  flats: flats.value,
1151
1154
  floor: hoveredData.value,
1152
1155
  floors: floors.value,
1153
1156
  blocks: blocks.value,
1154
- onChangeComponent: a[2] || (a[2] = (i, l) => changeRoute(i, l))
1157
+ onChangeComponent: l[2] || (l[2] = (i, a) => changeRoute(i, a))
1155
1158
  }, null, 8, ["flats", "floor", "floors", "blocks"])) : flow.value === "flatFlow" ? (openBlock(), createBlock(_sfc_main$7, {
1156
1159
  key: 3,
1157
1160
  flat: hoveredData.value,
1158
1161
  floors: floors.value,
1159
- onChangeComponent: a[3] || (a[3] = (i, l) => changeRoute(i, l))
1162
+ onChangeComponent: l[3] || (l[3] = (i, a) => changeRoute(i, a))
1160
1163
  }, null, 8, ["flat", "floors"])) : createCommentVNode("", !0)
1161
1164
  ])) : createCommentVNode("", !0)
1162
1165
  ]),
@@ -1170,7 +1173,7 @@ const Close = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["render", _sfc_render]]
1170
1173
  default: withCtx(() => [
1171
1174
  showModal.value ? (openBlock(), createBlock(_sfc_main$5, {
1172
1175
  key: 0,
1173
- onClose: a[4] || (a[4] = (i) => showModal.value = !1)
1176
+ onClose: l[4] || (l[4] = (i) => showModal.value = !1)
1174
1177
  }, {
1175
1178
  default: withCtx(() => [
1176
1179
  createVNode(_sfc_main$3, { modalData: hoveredData.value }, null, 8, ["modalData"])
@@ -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: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
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: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
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: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
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: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
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: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any;
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: "" | "flat" | "floor" | "block" | "project", hoveredData: any) => any) | undefined;
15
+ onChangeComponent?: ((flow: "" | "project" | "flat" | "floor" | "block", hoveredData: any) => any) | undefined;
16
16
  }>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
17
17
  export default _default;
@@ -158,6 +158,7 @@ export interface FlatItem {
158
158
  offer_price: string;
159
159
  block_id?: string | null;
160
160
  type?: TypeItem;
161
+ use_type?: boolean;
161
162
  created_at: string;
162
163
  updated_at: string;
163
164
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ire-preview",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "emitDeclarationOnly": true,
6
6
  "declaration": true,