@konnectio/core 4.11.1 → 4.11.3

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.
Files changed (116) hide show
  1. package/dist/{ActionField-CD7A8umF.js → ActionField-dg0RS8gf.js} +16 -17
  2. package/dist/ActionField-dg0RS8gf.js.br +0 -0
  3. package/dist/ActionField-dg0RS8gf.js.gz +0 -0
  4. package/dist/{AvailabilitySkeleton-D_EldM2s.js → AvailabilitySkeleton-uoeeP_5d.js} +2374 -2900
  5. package/dist/AvailabilitySkeleton-uoeeP_5d.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-uoeeP_5d.js.gz +0 -0
  7. package/dist/{CheckoutWindow-BYvzbPyY.js → CheckoutWindow-DXRVoh-J.js} +579 -655
  8. package/dist/CheckoutWindow-DXRVoh-J.js.br +0 -0
  9. package/dist/CheckoutWindow-DXRVoh-J.js.gz +0 -0
  10. package/dist/{ErrorMessage-GCkS8yEW.js → ErrorMessage-OQ4r9QGR.js} +12 -14
  11. package/dist/ErrorMessage-OQ4r9QGR.js.br +0 -0
  12. package/dist/ErrorMessage-OQ4r9QGR.js.gz +0 -0
  13. package/dist/{EventAvailabilityForm-f-BUsWJ-.js → EventAvailabilityForm-B4pOCkcm.js} +29 -30
  14. package/dist/EventAvailabilityForm-B4pOCkcm.js.br +0 -0
  15. package/dist/EventAvailabilityForm-B4pOCkcm.js.gz +0 -0
  16. package/dist/{Field-TMCJPa0F.js → Field-DpRx5gtJ.js} +6 -7
  17. package/dist/Field-DpRx5gtJ.js.br +0 -0
  18. package/dist/Field-DpRx5gtJ.js.gz +0 -0
  19. package/dist/HotelAvailabilityForm-BSM-KcqG.js +312 -0
  20. package/dist/HotelAvailabilityForm-BSM-KcqG.js.br +0 -0
  21. package/dist/HotelAvailabilityForm-BSM-KcqG.js.gz +0 -0
  22. package/dist/{SelectField-DSkOZgE4.js → SelectField-CEEffgaQ.js} +3462 -2858
  23. package/dist/SelectField-CEEffgaQ.js.br +0 -0
  24. package/dist/SelectField-CEEffgaQ.js.gz +0 -0
  25. package/dist/{TermsOfService-D9W3pXOi.js → TermsOfService-C4YZ5zhE.js} +5 -6
  26. package/dist/TermsOfService-C4YZ5zhE.js.br +0 -0
  27. package/dist/TermsOfService-C4YZ5zhE.js.gz +0 -0
  28. package/dist/_-DM-h5BQz.js +24 -0
  29. package/dist/_-DM-h5BQz.js.br +0 -0
  30. package/dist/_-DM-h5BQz.js.gz +0 -0
  31. package/dist/availability.js +24 -25
  32. package/dist/availability.js.br +0 -0
  33. package/dist/availability.js.gz +0 -0
  34. package/dist/cancel-reservation.js +57 -62
  35. package/dist/cancel-reservation.js.br +0 -0
  36. package/dist/cancel-reservation.js.gz +0 -0
  37. package/dist/core.css +1 -1
  38. package/dist/core.css.br +0 -0
  39. package/dist/core.css.gz +0 -0
  40. package/dist/deep-link.js +15 -16
  41. package/dist/deep-link.js.br +0 -0
  42. package/dist/deep-link.js.gz +0 -0
  43. package/dist/{dist-Vu9z8BNS.js → dist-BQy2-bMP.js} +168 -139
  44. package/dist/dist-BQy2-bMP.js.br +0 -0
  45. package/dist/dist-BQy2-bMP.js.gz +0 -0
  46. package/dist/{dist-YUX9nmGu.js → dist-Q9kXoafy.js} +705 -756
  47. package/dist/dist-Q9kXoafy.js.br +0 -0
  48. package/dist/dist-Q9kXoafy.js.gz +0 -0
  49. package/dist/event.js +334 -344
  50. package/dist/event.js.br +0 -0
  51. package/dist/event.js.gz +0 -0
  52. package/dist/gift-card-validation.js +42 -43
  53. package/dist/gift-card-validation.js.br +0 -0
  54. package/dist/gift-card-validation.js.gz +0 -0
  55. package/dist/gift-card.js +157 -161
  56. package/dist/gift-card.js.br +0 -0
  57. package/dist/gift-card.js.gz +0 -0
  58. package/dist/{giftCard-DwGwHq7_.js → giftCard-DO4ELDIx.js} +14 -15
  59. package/dist/giftCard-DO4ELDIx.js.br +0 -0
  60. package/dist/giftCard-DO4ELDIx.js.gz +0 -0
  61. package/dist/hotel.js +983 -1145
  62. package/dist/hotel.js.br +0 -0
  63. package/dist/hotel.js.gz +0 -0
  64. package/dist/{i18n-BU9Enb5i.js → i18n-Dq3VKG7w.js} +4004 -3647
  65. package/dist/i18n-Dq3VKG7w.js.br +0 -0
  66. package/dist/i18n-Dq3VKG7w.js.gz +0 -0
  67. package/dist/polyfill.js +905 -818
  68. package/dist/polyfill.js.br +0 -0
  69. package/dist/polyfill.js.gz +0 -0
  70. package/dist/{rolldown-runtime-B0aSnxlc.js → rolldown-runtime-QGRDbDUS.js} +2 -3
  71. package/dist/rolldown-runtime-QGRDbDUS.js.br +0 -0
  72. package/dist/rolldown-runtime-QGRDbDUS.js.gz +0 -0
  73. package/dist/style-xK2dve9W.js +1284 -0
  74. package/dist/style-xK2dve9W.js.br +0 -0
  75. package/dist/style-xK2dve9W.js.gz +0 -0
  76. package/dist-wix/availability.js +42 -34
  77. package/dist-wix/event.js +54 -46
  78. package/dist-wix/gift-card-validation.js +39 -31
  79. package/dist-wix/gift-card.js +43 -35
  80. package/dist-wix/hotel.js +54 -46
  81. package/package.json +32 -32
  82. package/dist/ActionField-CD7A8umF.js.br +0 -0
  83. package/dist/ActionField-CD7A8umF.js.gz +0 -0
  84. package/dist/AvailabilitySkeleton-D_EldM2s.js.br +0 -0
  85. package/dist/AvailabilitySkeleton-D_EldM2s.js.gz +0 -0
  86. package/dist/CheckoutWindow-BYvzbPyY.js.br +0 -0
  87. package/dist/CheckoutWindow-BYvzbPyY.js.gz +0 -0
  88. package/dist/ErrorMessage-GCkS8yEW.js.br +0 -0
  89. package/dist/ErrorMessage-GCkS8yEW.js.gz +0 -0
  90. package/dist/EventAvailabilityForm-f-BUsWJ-.js.br +0 -0
  91. package/dist/EventAvailabilityForm-f-BUsWJ-.js.gz +0 -0
  92. package/dist/Field-TMCJPa0F.js.br +0 -0
  93. package/dist/Field-TMCJPa0F.js.gz +0 -0
  94. package/dist/HotelAvailabilityForm-BjaKmdM9.js +0 -322
  95. package/dist/HotelAvailabilityForm-BjaKmdM9.js.br +0 -0
  96. package/dist/HotelAvailabilityForm-BjaKmdM9.js.gz +0 -0
  97. package/dist/SelectField-DSkOZgE4.js.br +0 -0
  98. package/dist/SelectField-DSkOZgE4.js.gz +0 -0
  99. package/dist/TermsOfService-D9W3pXOi.js.br +0 -0
  100. package/dist/TermsOfService-D9W3pXOi.js.gz +0 -0
  101. package/dist/_-DY1GJjiW.js +0 -25
  102. package/dist/_-DY1GJjiW.js.br +0 -0
  103. package/dist/_-DY1GJjiW.js.gz +0 -0
  104. package/dist/dist-Vu9z8BNS.js.br +0 -0
  105. package/dist/dist-Vu9z8BNS.js.gz +0 -0
  106. package/dist/dist-YUX9nmGu.js.br +0 -0
  107. package/dist/dist-YUX9nmGu.js.gz +0 -0
  108. package/dist/giftCard-DwGwHq7_.js.br +0 -0
  109. package/dist/giftCard-DwGwHq7_.js.gz +0 -0
  110. package/dist/i18n-BU9Enb5i.js.br +0 -0
  111. package/dist/i18n-BU9Enb5i.js.gz +0 -0
  112. package/dist/rolldown-runtime-B0aSnxlc.js.br +0 -0
  113. package/dist/rolldown-runtime-B0aSnxlc.js.gz +0 -5
  114. package/dist/style-E-j_0DIE.js +0 -1711
  115. package/dist/style-E-j_0DIE.js.br +0 -0
  116. package/dist/style-E-j_0DIE.js.gz +0 -0
package/dist/gift-card.js CHANGED
@@ -1,15 +1,15 @@
1
- import { A as e, At as t, D as n, E as r, L as i, M as a, N as o, P as s, Pt as c, Q as l, S as u, _t as d, a as f, bt as p, et as m, gt as h, h as g, i as _, it as v, j as y, jt as b, mt as x, n as S, o as C, p as w, w as T, wt as E, z as D } from "./i18n-BU9Enb5i.js";
2
- import { t as O } from "./dist-YUX9nmGu.js";
3
- import { E as ee, N as te, S as k, T as ne, _ as re, b as ie, n as A, r as ae, t as oe, v as j, y as se } from "./SelectField-DSkOZgE4.js";
4
- import { a as ce, c as le, i as ue, l as de, r as fe, s as pe, t as me } from "./CheckoutWindow-BYvzbPyY.js";
5
- import { t as he } from "./_-DY1GJjiW.js";
6
- import { t as ge } from "./ErrorMessage-GCkS8yEW.js";
7
- import { n as M, t as N } from "./Field-TMCJPa0F.js";
8
- import { t as P } from "./style-E-j_0DIE.js";
9
- import { t as F } from "./giftCard-DwGwHq7_.js";
10
- import { t as I } from "./TermsOfService-D9W3pXOi.js";
11
- //#region src/components/inputs/MediaSelector.vue?vue&type=script&setup=true&lang.ts
12
- var L = { class: "media-selector" }, R = ["accept"], z = { class: "media-selector-wrapper" }, B = { class: "media-selector-tools" }, V = { key: 0 }, H = { key: 1 }, U = { key: 2 }, W = ["src"], G = /*@__PURE__*/ D({
1
+ import { A as e, D as t, Dt as n, E as r, L as i, M as a, N as o, Ot as s, P as c, Q as l, S as u, _t as d, a as f, et as p, ft as m, h, ht as g, i as _, j as v, jt as y, mt as b, n as x, nt as S, o as C, p as w, w as T, xt as E, z as D } from "./i18n-Dq3VKG7w.js";
2
+ import { t as O } from "./style-xK2dve9W.js";
3
+ import { t as k } from "./giftCard-DO4ELDIx.js";
4
+ import { C as ee, _ as te, b as A, g as j, h as M, j as ne, n as N, r as re, t as ie, v as ae, w as oe } from "./SelectField-CEEffgaQ.js";
5
+ import { a as se, c as ce, i as le, l as ue, r as de, s as fe, t as pe } from "./CheckoutWindow-DXRVoh-J.js";
6
+ import { t as me } from "./_-DM-h5BQz.js";
7
+ import { n as P, t as F } from "./Field-DpRx5gtJ.js";
8
+ import { t as he } from "./ErrorMessage-OQ4r9QGR.js";
9
+ import { t as I } from "./TermsOfService-C4YZ5zhE.js";
10
+ import { t as L } from "./dist-Q9kXoafy.js";
11
+ // src/components/inputs/MediaSelector.vue?vue&type=script&setup=true&lang.ts
12
+ var R = { class: "media-selector" }, z = ["accept"], B = { class: "media-selector-wrapper" }, V = { class: "media-selector-tools" }, H = { key: 0 }, U = { key: 1 }, W = { key: 2 }, G = ["src"], K = /*@__PURE__*/ D({
13
13
  __name: "MediaSelector",
14
14
  props: {
15
15
  modelValue: {},
@@ -22,20 +22,20 @@ var L = { class: "media-selector" }, R = ["accept"], z = { class: "media-selecto
22
22
  }
23
23
  },
24
24
  emits: ["update:modelValue"],
25
- setup(n, { emit: r }) {
26
- let c = r, l = n, { t: u } = f(), { display: d } = te(), p = E(), g = e(() => l.modelValue.base64 !== "");
25
+ setup(t, { emit: r }) {
26
+ let l = r, u = t, { t: d } = f(), { display: m } = ne(), h = E(), g = e(() => u.modelValue.base64 !== "");
27
27
  function _(e) {
28
- c("update:modelValue", e);
28
+ l("update:modelValue", e);
29
29
  }
30
- function v() {
30
+ function y() {
31
31
  _({
32
32
  base64: "",
33
33
  name: "",
34
34
  type: ""
35
- }), p.value && (p.value.value = "");
35
+ }), h.value && (h.value.value = "");
36
36
  }
37
37
  function x() {
38
- p.value && p.value.click();
38
+ h.value && h.value.click();
39
39
  }
40
40
  function S(e, t) {
41
41
  let [n, r] = [e.name, e.type], i = new FileReader();
@@ -47,62 +47,61 @@ var L = { class: "media-selector" }, R = ["accept"], z = { class: "media-selecto
47
47
  name: n,
48
48
  type: r
49
49
  });
50
- } else d({
51
- message: u("imageUploadError"),
50
+ } else m({
51
+ message: d("imageUploadError"),
52
52
  type: "error"
53
53
  });
54
54
  }, i.readAsDataURL(e);
55
55
  }
56
56
  async function C() {
57
57
  let e;
58
- (e = p.value.files) instanceof FileList && S(e[0], _);
58
+ (e = h.value.files) instanceof FileList && S(e[0], _);
59
59
  }
60
- return (e, r) => (m(), a(re, {
61
- label: n.label,
62
- required: n.required,
60
+ return (e, r) => (p(), a(M, {
61
+ label: t.label,
62
+ required: t.required,
63
63
  type: "media"
64
64
  }, {
65
- default: h(() => [y("div", L, [y("input", {
65
+ default: b(() => [v("div", R, [v("input", {
66
66
  ref_key: "fileInput",
67
- ref: p,
67
+ ref: h,
68
68
  type: "file",
69
69
  class: "hidden",
70
- accept: n.validation,
70
+ accept: t.validation,
71
71
  single: "",
72
72
  onChange: r[0] ||= (e) => C()
73
- }, null, 40, R), y("div", z, [y("ul", B, [
74
- g.value ? o("", !0) : (m(), s("li", V, [i(j, {
75
- label: t(u)("uploadFile"),
73
+ }, null, 40, z), v("div", B, [v("ul", V, [
74
+ g.value ? o("", !0) : (p(), c("li", H, [i(j, {
75
+ label: n(d)("uploadFile"),
76
76
  type: "button",
77
77
  icon: "upload",
78
- "icon-color": n.iconColor,
78
+ "icon-color": t.iconColor,
79
79
  onClickEvent: r[1] ||= (e) => x()
80
80
  }, null, 8, ["label", "icon-color"])])),
81
- g.value ? (m(), s("li", H, [i(j, {
82
- label: t(u)("replaceFile"),
81
+ g.value ? (p(), c("li", U, [i(j, {
82
+ label: n(d)("replaceFile"),
83
83
  type: "button",
84
84
  icon: "repeat-alt",
85
- "icon-color": n.iconColor,
85
+ "icon-color": t.iconColor,
86
86
  onClickEvent: r[2] ||= (e) => x()
87
87
  }, null, 8, ["label", "icon-color"])])) : o("", !0),
88
- g.value ? (m(), s("li", U, [i(j, {
89
- label: t(u)("removeFile"),
88
+ g.value ? (p(), c("li", W, [i(j, {
89
+ label: n(d)("removeFile"),
90
90
  type: "button",
91
91
  icon: "trash-alt",
92
- "icon-color": n.iconColor,
93
- onClickEvent: r[3] ||= (e) => v()
92
+ "icon-color": t.iconColor,
93
+ onClickEvent: r[3] ||= (e) => y()
94
94
  }, null, 8, ["label", "icon-color"])])) : o("", !0)
95
- ]), y("div", { class: b(["media-selector-previewer", { opened: g.value }]) }, [n.modelValue ? (m(), s("img", {
95
+ ]), v("div", { class: s(["media-selector-previewer", { opened: g.value }]) }, [t.modelValue ? (p(), c("img", {
96
96
  key: 0,
97
- src: n.modelValue.base64
98
- }, null, 8, W)) : o("", !0)], 2)])])]),
97
+ src: t.modelValue.base64
98
+ }, null, 8, G)) : o("", !0)], 2)])])]),
99
99
  _: 1
100
100
  }, 8, ["label", "required"]));
101
101
  }
102
102
  });
103
- //#endregion
104
- //#region src/components/inputs/MediaSelector.vue?vue&type=i18n&index=0&lang.yaml
105
- function K(e) {
103
+ // src/components/inputs/MediaSelector.vue?vue&type=i18n&index=0&lang.yaml
104
+ function q(e) {
106
105
  let t = e;
107
106
  t.__i18n = t.__i18n || [], t.__i18n.push({
108
107
  locale: "",
@@ -178,42 +177,40 @@ function K(e) {
178
177
  }
179
178
  });
180
179
  }
181
- //#endregion
182
- //#region src/components/inputs/MediaSelector.vue
183
- typeof K == "function" && K(G);
184
- //#endregion
185
- //#region src/components/skeletons/GiftCardSkeleton.vue?vue&type=script&setup=true&lang.ts
186
- var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form" }, _e = /*#__PURE__*/ k(/* @__PURE__ */ D({
180
+ // src/components/inputs/MediaSelector.vue
181
+ typeof q == "function" && q(K);
182
+ // src/components/skeletons/GiftCardSkeleton.vue?vue&type=script&setup=true&lang.ts
183
+ var J = { class: "gift-card-skeleton" }, Y = { class: "gift-card-skeleton-form" }, ge = /*#__PURE__*/ A(/* @__PURE__ */ D({
187
184
  __name: "GiftCardSkeleton",
188
185
  setup(e) {
189
- return (e, t) => (m(), s("div", q, [y("div", J, [
190
- i(N),
191
- i(N),
192
- i(N),
193
- i(N),
194
- i(N, { "is-text-area": "" }),
195
- i(M, { height: "44px" })
186
+ return (e, t) => (p(), c("div", J, [v("div", Y, [
187
+ i(F),
188
+ i(F),
189
+ i(F),
190
+ i(F),
191
+ i(F, { "is-text-area": "" }),
192
+ i(P, { height: "44px" })
196
193
  ])]));
197
194
  }
198
- }), [["__scopeId", "data-v-952c68dd"]]), Y = { class: "konnectio-accept-terms" }, X = /*#__PURE__*/ k(/* @__PURE__ */ D({
195
+ }), [["__scopeId", "data-v-952c68dd"]]), X = { class: "konnectio-accept-terms" }, Z = /*#__PURE__*/ A(/* @__PURE__ */ D({
199
196
  __name: "_",
200
197
  props: {
201
198
  content: {},
202
199
  buttonLabel: {}
203
200
  },
204
201
  setup(e) {
205
- let { t: n } = f(), r = E(!1);
206
- return (a, o) => (m(), s("div", Y, [i(t(_), {
202
+ let { t } = f(), r = E(!1);
203
+ return (a, o) => (p(), c("div", X, [i(n(_), {
207
204
  keypath: "general.termsAndConditionsNotice",
208
205
  tag: "span",
209
206
  scope: "global"
210
207
  }, {
211
- button: h(() => [y("i", null, "\"" + c(e.buttonLabel) + "\"", 1)]),
212
- terms: h(() => [y("a", {
208
+ button: b(() => [v("i", null, "\"" + y(e.buttonLabel) + "\"", 1)]),
209
+ terms: b(() => [v("a", {
213
210
  class: "konnectio-accept-terms-link",
214
211
  target: "_blank",
215
212
  onClick: o[0] ||= T((e) => r.value = !0, ["prevent"])
216
- }, [y("span", null, c(t(n)("general.termsAndConditions")), 1)])]),
213
+ }, [v("span", null, y(n(t)("general.termsAndConditions")), 1)])]),
217
214
  _: 1
218
215
  }), i(I, {
219
216
  modelValue: r.value,
@@ -221,19 +218,19 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
221
218
  description: e.content
222
219
  }, null, 8, ["modelValue", "description"])]));
223
220
  }
224
- }), [["__scopeId", "data-v-93ef3159"]]), ve = /* @__PURE__ */ D({
221
+ }), [["__scopeId", "data-v-93ef3159"]]), _e = /* @__PURE__ */ D({
225
222
  __name: "GiftCard",
226
223
  setup(e) {
227
- let { t: n } = f(), r = F();
228
- return (e, i) => (m(), a(X, {
229
- content: t(r).termsOfService,
230
- "button-label": t(n)("giftCard.orderGiftCard")
224
+ let { t } = f(), r = k();
225
+ return (e, i) => (p(), a(Z, {
226
+ content: n(r).termsOfService,
227
+ "button-label": n(t)("giftCard.orderGiftCard")
231
228
  }, null, 8, ["content", "button-label"]));
232
229
  }
233
- }), ye = ["data-layout"], be = { id: "konnectio-gift-card-wrapper" }, xe = { id: "konnectio-gift-card-title" }, Se = { id: "konnectio-gift-card-content" }, Ce = { id: "konnectio-gift-card-payment" }, we = ["innerHTML"], Te = { key: 0 }, Ee = {
230
+ }), ve = ["data-layout"], ye = { id: "konnectio-gift-card-wrapper" }, be = { id: "konnectio-gift-card-title" }, xe = { id: "konnectio-gift-card-content" }, Se = { id: "konnectio-gift-card-payment" }, Ce = ["innerHTML"], we = { key: 0 }, Te = {
234
231
  key: 0,
235
232
  id: "konnectio-select-place-type"
236
- }, De = { class: /*@__PURE__*/ b(["konnectio-label", "required"]) }, Oe = { id: "konnectio-select-place-type-input" }, ke = ["innerHTML"], Z = {
233
+ }, Ee = { class: /*@__PURE__*/ s(["konnectio-label", "required"]) }, De = { id: "konnectio-select-place-type-input" }, Oe = ["innerHTML"], ke = {
237
234
  key: 0,
238
235
  id: "konnectio-gift-card-order"
239
236
  }, Ae = { class: "konnectio-panel" }, je = {
@@ -242,7 +239,7 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
242
239
  }, Me = {
243
240
  key: 2,
244
241
  id: "konnectio-gift-card-order-minimal"
245
- }, Ne = { id: "konnectio-gift-card-recaptcha" }, Q = /*#__PURE__*/ k(/* @__PURE__ */ D({
242
+ }, Ne = { id: "konnectio-gift-card-recaptcha" }, Q = /*#__PURE__*/ A(/* @__PURE__ */ D({
246
243
  name: "GiftCardLayout",
247
244
  __name: "GiftCard",
248
245
  props: {
@@ -251,69 +248,69 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
251
248
  placeType: {},
252
249
  styling: {}
253
250
  },
254
- setup(_) {
255
- let b = _, S = e(() => ({
251
+ setup(s) {
252
+ let _ = s, x = e(() => ({
256
253
  panelMaxWidth: "800px",
257
- ...b.styling
258
- })), { t: C } = f(), { name: w, email: T, phone: E, value: D, remark: O, showValue: te, quantity: k, media: re, placeId: M, placeType: N, showFormPage: P, showPaymentPage: I, showConfirmationPage: L, places: R, hasFilledForm: z, hasForcedPlaceType: B, isWaitingForResponse: V } = g(F()), { initialize: H, orderGiftCard: U, fetchMetadata: W, giftCardPayload: G } = F(), { isRecaptchaEnabled: K, currency: q, hasError: J } = g(ee());
259
- de.useHttpClient(pe(ne()));
260
- let Y = le("post", "/gift-card/create", G());
261
- Y.setValidationTimeout(600);
262
- function X(e) {
263
- Y.setData(G()), Y.validate(e);
254
+ ..._.styling
255
+ })), { t: C } = f(), { name: w, email: T, phone: E, value: D, remark: O, showValue: A, quantity: M, media: ne, placeId: P, placeType: F, showFormPage: I, showPaymentPage: L, showConfirmationPage: R, places: z, hasFilledForm: B, hasForcedPlaceType: V, isWaitingForResponse: H } = h(k()), { initialize: U, orderGiftCard: W, fetchMetadata: G, giftCardPayload: K } = k(), { isRecaptchaEnabled: q, currency: J, hasError: Y } = h(oe());
256
+ ue.useHttpClient(ce(ee()));
257
+ let X = fe("post", "/gift-card/create", K());
258
+ X.setValidationTimeout(600);
259
+ function Z(e) {
260
+ X.setData(K()), X.validate(e);
264
261
  }
265
262
  function Q(e) {
266
- return Y.errors[e];
263
+ return X.errors[e];
267
264
  }
268
265
  async function $() {
269
- let e = await U();
270
- e && Y.setErrors(e);
266
+ let e = await W();
267
+ e && X.setErrors(e);
271
268
  }
272
- return x(w, () => X("contactName")), x(T, () => X("contactEmail")), x(E, () => X("contactPhone")), x(D, () => X("amount")), x(k, () => X("quantity")), x(N, () => {
273
- M.value = void 0;
269
+ return m(w, () => Z("contactName")), m(T, () => Z("contactEmail")), m(E, () => Z("contactPhone")), m(D, () => Z("amount")), m(M, () => Z("quantity")), m(F, () => {
270
+ P.value = void 0;
274
271
  }), l(() => {
275
- let e = b.placeType ? parseInt(b.placeType) : void 0;
276
- H(e);
277
- }), (e, l) => (m(), a(ie, { styling: S.value }, {
278
- default: h(() => [(m(), a(n, null, {
279
- default: h(() => [i(he, {
280
- "access-token": _.accessToken,
281
- "data-layout": _.layout,
282
- callback: t(W)
272
+ let e = _.placeType ? parseInt(_.placeType) : void 0;
273
+ U(e);
274
+ }), (e, l) => (p(), a(ae, { styling: x.value }, {
275
+ default: b(() => [(p(), a(t, null, {
276
+ default: b(() => [i(me, {
277
+ "access-token": s.accessToken,
278
+ "data-layout": s.layout,
279
+ callback: n(G)
283
280
  }, {
284
- default: h(() => [t(J) ? (m(), a(ge, {
281
+ default: b(() => [n(Y) ? (p(), a(he, {
285
282
  key: 1,
286
283
  title: "Unable to render Gift card module",
287
284
  description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
288
- })) : (m(), s("div", {
285
+ })) : (p(), c("div", {
289
286
  key: 0,
290
287
  id: "konnectio-gift-card-module",
291
- "data-layout": _.layout
292
- }, [y("div", be, [
293
- y("h2", xe, [y("span", null, c(t(C)("giftCard.title")), 1)]),
294
- y("div", Se, [
295
- d(y("div", Ce, [i(me)], 512), [[u, t(I)]]),
296
- d(y("div", null, [y("p", {
288
+ "data-layout": s.layout
289
+ }, [v("div", ye, [
290
+ v("h2", be, [v("span", null, y(n(C)("giftCard.title")), 1)]),
291
+ v("div", xe, [
292
+ g(v("div", Se, [i(pe)], 512), [[u, n(L)]]),
293
+ g(v("div", null, [v("p", {
297
294
  id: "konnectio-gift-card-description",
298
- innerHTML: t(C)("giftCard.description")
299
- }, null, 8, we), y("form", null, [
300
- t(B) ? o("", !0) : (m(), s("div", Te, [t(R) ? (m(), s("div", Ee, [y("label", De, [y("span", null, c(t(C)("giftCard.selectType")), 1)]), y("div", Oe, [y("ul", null, [(m(!0), s(r, null, v(t(R), (e, n) => (m(), s("li", { key: n }, [i(ue, {
301
- modelValue: t(N),
302
- "onUpdate:modelValue": l[0] ||= (e) => p(N) ? N.value = e : null,
295
+ innerHTML: n(C)("giftCard.description")
296
+ }, null, 8, Ce), v("form", null, [
297
+ n(V) ? o("", !0) : (p(), c("div", we, [n(z) ? (p(), c("div", Te, [v("label", Ee, [v("span", null, y(n(C)("giftCard.selectType")), 1)]), v("div", De, [v("ul", null, [(p(!0), c(r, null, S(n(z), (e, t) => (p(), c("li", { key: t }, [i(le, {
298
+ modelValue: n(F),
299
+ "onUpdate:modelValue": l[0] ||= (e) => d(F) ? F.value = e : null,
303
300
  type: "radio",
304
301
  name: "placeType",
305
- val: n,
302
+ val: t,
306
303
  label: e.label
307
304
  }, null, 8, [
308
305
  "modelValue",
309
306
  "val",
310
307
  "label"
311
- ])]))), 128))]), t(R)[t(N)] && t(R)[t(N)].data.length > 1 ? (m(), a(oe, {
308
+ ])]))), 128))]), n(z)[n(F)] && n(z)[n(F)].data.length > 1 ? (p(), a(ie, {
312
309
  key: 0,
313
- modelValue: t(M),
314
- "onUpdate:modelValue": l[1] ||= (e) => p(M) ? M.value = e : null,
315
- placeholder: t(C)("giftCard.selectPlacePlaceholder"),
316
- options: t(R)[t(N)].data,
310
+ modelValue: n(P),
311
+ "onUpdate:modelValue": l[1] ||= (e) => d(P) ? P.value = e : null,
312
+ placeholder: n(C)("giftCard.selectPlacePlaceholder"),
313
+ options: n(z)[n(F)].data,
317
314
  labelKey: "name",
318
315
  valueKey: "id",
319
316
  required: ""
@@ -321,16 +318,16 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
321
318
  "modelValue",
322
319
  "placeholder",
323
320
  "options"
324
- ])) : o("", !0)])])) : (m(), a(se, { key: 1 }))])),
325
- i(A, {
326
- modelValue: t(w),
327
- "onUpdate:modelValue": l[2] ||= (e) => p(w) ? w.value = e : null,
321
+ ])) : o("", !0)])])) : (p(), a(te, { key: 1 }))])),
322
+ i(N, {
323
+ modelValue: n(w),
324
+ "onUpdate:modelValue": l[2] ||= (e) => d(w) ? w.value = e : null,
328
325
  type: "text",
329
326
  name: "name",
330
327
  autocomplete: "name",
331
- label: t(C)("giftCard.name"),
328
+ label: n(C)("giftCard.name"),
332
329
  icon: "user-alt",
333
- placeholder: t(C)("giftCard.namePlaceholder"),
330
+ placeholder: n(C)("giftCard.namePlaceholder"),
334
331
  error: Q("contactName"),
335
332
  required: ""
336
333
  }, null, 8, [
@@ -339,15 +336,15 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
339
336
  "placeholder",
340
337
  "error"
341
338
  ]),
342
- i(A, {
343
- modelValue: t(T),
344
- "onUpdate:modelValue": l[3] ||= (e) => p(T) ? T.value = e : null,
339
+ i(N, {
340
+ modelValue: n(T),
341
+ "onUpdate:modelValue": l[3] ||= (e) => d(T) ? T.value = e : null,
345
342
  type: "email",
346
343
  name: "email",
347
344
  autocomplete: "email",
348
- label: t(C)("giftCard.email"),
345
+ label: n(C)("giftCard.email"),
349
346
  icon: "at",
350
- placeholder: t(C)("giftCard.emailPlaceholder"),
347
+ placeholder: n(C)("giftCard.emailPlaceholder"),
351
348
  error: Q("contactEmail"),
352
349
  required: ""
353
350
  }, null, 8, [
@@ -356,12 +353,12 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
356
353
  "placeholder",
357
354
  "error"
358
355
  ]),
359
- i(ce, {
360
- modelValue: t(E),
361
- "onUpdate:modelValue": l[4] ||= (e) => p(E) ? E.value = e : null,
356
+ i(se, {
357
+ modelValue: n(E),
358
+ "onUpdate:modelValue": l[4] ||= (e) => d(E) ? E.value = e : null,
362
359
  icon: "phone-office",
363
- label: t(C)("giftCard.phone"),
364
- placeholder: t(C)("giftCard.phonePlaceholder"),
360
+ label: n(C)("giftCard.phone"),
361
+ placeholder: n(C)("giftCard.phonePlaceholder"),
365
362
  error: Q("contactPhone"),
366
363
  required: ""
367
364
  }, null, 8, [
@@ -370,15 +367,15 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
370
367
  "placeholder",
371
368
  "error"
372
369
  ]),
373
- i(A, {
374
- modelValue: t(D),
375
- "onUpdate:modelValue": l[5] ||= (e) => p(D) ? D.value = e : null,
370
+ i(N, {
371
+ modelValue: n(D),
372
+ "onUpdate:modelValue": l[5] ||= (e) => d(D) ? D.value = e : null,
376
373
  type: "number",
377
374
  name: "value",
378
- label: t(C)("giftCard.value"),
375
+ label: n(C)("giftCard.value"),
379
376
  icon: "money-bill",
380
- placeholder: t(C)("giftCard.valuePlaceholder"),
381
- suffix: t(q),
377
+ placeholder: n(C)("giftCard.valuePlaceholder"),
378
+ suffix: n(J),
382
379
  error: Q("amount"),
383
380
  required: ""
384
381
  }, null, 8, [
@@ -390,10 +387,10 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
390
387
  ]),
391
388
  o("", !0),
392
389
  o("", !0),
393
- i(ae, {
394
- modelValue: t(k),
395
- "onUpdate:modelValue": l[8] ||= (e) => p(k) ? k.value = e : null,
396
- label: t(C)("giftCard.quantity"),
390
+ i(re, {
391
+ modelValue: n(M),
392
+ "onUpdate:modelValue": l[8] ||= (e) => d(M) ? M.value = e : null,
393
+ label: n(C)("giftCard.quantity"),
397
394
  icon: "gift-card",
398
395
  error: Q("quantity"),
399
396
  required: ""
@@ -402,66 +399,65 @@ var q = { class: "gift-card-skeleton" }, J = { class: "gift-card-skeleton-form"
402
399
  "label",
403
400
  "error"
404
401
  ])
405
- ])], 512), [[u, t(P)]]),
406
- d(y("div", null, [y("div", { innerHTML: t(C)("giftCard.thankYou") }, null, 8, ke)], 512), [[u, t(L)]])
402
+ ])], 512), [[u, n(I)]]),
403
+ g(v("div", null, [v("div", { innerHTML: n(C)("giftCard.thankYou") }, null, 8, Oe)], 512), [[u, n(R)]])
407
404
  ]),
408
- _.layout !== "minimal" && t(P) ? (m(), s("div", Z, [y("div", Ae, [i(j, {
409
- label: t(C)("giftCard.orderGiftCard"),
405
+ s.layout !== "minimal" && n(I) ? (p(), c("div", ke, [v("div", Ae, [i(j, {
406
+ label: n(C)("giftCard.orderGiftCard"),
410
407
  "full-width": !0,
411
- disabled: !t(z),
412
- "is-loading": t(V),
413
- "onUpdate:isLoading": l[9] ||= (e) => p(V) ? V.value = e : null,
408
+ disabled: !n(B),
409
+ "is-loading": n(H),
410
+ "onUpdate:isLoading": l[9] ||= (e) => d(H) ? H.value = e : null,
414
411
  onClickEvent: $
415
412
  }, null, 8, [
416
413
  "label",
417
414
  "disabled",
418
415
  "is-loading"
419
416
  ])])])) : o("", !0),
420
- t(P) ? (m(), s("div", je, [i(A, {
421
- modelValue: t(O),
422
- "onUpdate:modelValue": l[10] ||= (e) => p(O) ? O.value = e : null,
417
+ n(I) ? (p(), c("div", je, [i(N, {
418
+ modelValue: n(O),
419
+ "onUpdate:modelValue": l[10] ||= (e) => d(O) ? O.value = e : null,
423
420
  type: "textarea",
424
421
  name: "remark",
425
- label: t(C)("giftCard.remark"),
422
+ label: n(C)("giftCard.remark"),
426
423
  icon: "info-circle",
427
- placeholder: t(C)("giftCard.remarkPlaceholder")
424
+ placeholder: n(C)("giftCard.remarkPlaceholder")
428
425
  }, null, 8, [
429
426
  "modelValue",
430
427
  "label",
431
428
  "placeholder"
432
429
  ])])) : o("", !0),
433
- t(P) ? (m(), s("div", Me, [
430
+ n(I) ? (p(), c("div", Me, [
434
431
  i(j, {
435
- label: t(C)("giftCard.orderGiftCard"),
432
+ label: n(C)("giftCard.orderGiftCard"),
436
433
  "full-width": !0,
437
- disabled: !t(z),
434
+ disabled: !n(B),
438
435
  "data-test": "orderGiftCard",
439
- "is-loading": t(V),
440
- "onUpdate:isLoading": l[11] ||= (e) => p(V) ? V.value = e : null,
436
+ "is-loading": n(H),
437
+ "onUpdate:isLoading": l[11] ||= (e) => d(H) ? H.value = e : null,
441
438
  onClickEvent: $
442
439
  }, null, 8, [
443
440
  "label",
444
441
  "disabled",
445
442
  "is-loading"
446
443
  ]),
447
- y("div", null, [l[12] ||= y("div", { class: "konnectio-divider" }, null, -1), i(ve)]),
448
- d(y("div", Ne, [i(fe)], 512), [[u, t(K)]])
444
+ v("div", null, [l[12] ||= v("div", { class: "konnectio-divider" }, null, -1), i(_e)]),
445
+ g(v("div", Ne, [i(de)], 512), [[u, n(q)]])
449
446
  ])) : o("", !0)
450
- ])], 8, ye))]),
447
+ ])], 8, ve))]),
451
448
  _: 1
452
449
  }, 8, [
453
450
  "access-token",
454
451
  "data-layout",
455
452
  "callback"
456
453
  ])]),
457
- fallback: h(() => [i(_e)]),
454
+ fallback: b(() => [i(ge)]),
458
455
  _: 1
459
456
  }))]),
460
457
  _: 1
461
458
  }, 8, ["styling"]));
462
459
  }
463
460
  }), [["__scopeId", "data-v-779afb5c"]]), $ = w(), Pe = C("konnectio-gift-card", Q, (e) => {
464
- e.use(O), e.use($), e.use(S), e.use(P);
461
+ e.use(L), e.use($), e.use(x), e.use(O);
465
462
  });
466
- //#endregion
467
463
  export { Pe as default };
Binary file
Binary file
@@ -1,12 +1,12 @@
1
- import { A as e, d as t, h as n, m as r, s as i, t as a, wt as o } from "./i18n-BU9Enb5i.js";
2
- import { E as s, I as c, N as l, T as u, j as d, q as f, st as p } from "./SelectField-DSkOZgE4.js";
3
- //#region src/store/giftCard.ts
1
+ import { A as e, d as t, h as n, m as r, s as i, t as a, xt as o } from "./i18n-Dq3VKG7w.js";
2
+ import { C as s, G as c, P as l, at as u, j as d, k as f, w as p } from "./SelectField-CEEffgaQ.js";
3
+ // src/store/giftCard.ts
4
4
  var m = r("giftCard", () => {
5
- let { pay: r } = d(), { display: m } = l(), { metaData: h, currencyId: g, hasError: _ } = n(s()), v = s(), y = o(p.InitialState), b = t("konnectio_name", "", void 0, { serializer: i.string }), x = t("konnectio_email", "", void 0, { serializer: i.string }), S = t("konnectio_phone", "", void 0, { serializer: i.string }), C = o(""), w = o(1), T = o(!0), E = o(""), D = o({
5
+ let { pay: r } = f(), { display: m } = d(), { metaData: h, currencyId: g, hasError: _ } = n(p()), v = p(), y = o(u.InitialState), b = t("konnectio_name", "", void 0, { serializer: i.string }), x = t("konnectio_email", "", void 0, { serializer: i.string }), S = t("konnectio_phone", "", void 0, { serializer: i.string }), C = o(""), w = o(1), T = o(!0), E = o(""), D = o({
6
6
  base64: "",
7
7
  type: "",
8
8
  name: ""
9
- }), O = o(void 0), k = o(0), A = o(!1), j = o(0), M = e(() => v.metaData.hotels[0]), N = e(() => M.value.termsOfService ? M.value.termsOfService : ""), P = e(() => y.value === p.InitialState || y.value === p.WaitingForResponse), F = e(() => y.value === p.ReadyToPay), I = e(() => y.value === p.PaymentSuccess), L = e(() => {
9
+ }), O = o(void 0), k = o(0), A = o(!1), j = o(0), M = e(() => v.metaData.hotels?.[0]), N = e(() => M.value?.termsOfService ?? ""), P = e(() => y.value === u.InitialState || y.value === u.WaitingForResponse), F = e(() => y.value === u.ReadyToPay), I = e(() => y.value === u.PaymentSuccess), L = e(() => {
10
10
  let e = {
11
11
  1: {
12
12
  label: a.t("giftCard.hotelType"),
@@ -30,10 +30,10 @@ var m = r("giftCard", () => {
30
30
  });
31
31
  }
32
32
  return e;
33
- }), B = e(() => !(!b.value || !x.value || !(S.value.length >= 5) || !C.value || z.value === void 0)), V = e(() => !(y.value === p.InitialState && A.value)), H = e(() => !!(y.value === p.WaitingForResponse && A.value));
33
+ }), B = e(() => !(!b.value || !x.value || !(S.value.length >= 5) || !C.value || z.value === void 0)), V = e(() => !(y.value === u.InitialState && A.value)), H = e(() => !!(y.value === u.WaitingForResponse && A.value));
34
34
  async function U() {
35
35
  try {
36
- let e = (await u().get("/gift-card/metadata", { params: { language: f() } })).data;
36
+ let e = (await s().get("/gift-card/metadata", { params: { language: c() } })).data;
37
37
  e.success === void 0 ? _.value = !1 : _.value = !e.success, h.value = e;
38
38
  } catch {
39
39
  m({
@@ -47,7 +47,7 @@ var m = r("giftCard", () => {
47
47
  termsOfserviceURL: window.location.origin,
48
48
  checkoutUrl: window.location.origin,
49
49
  currencyID: g.value,
50
- language: f(),
50
+ language: c(),
51
51
  amount: C.value,
52
52
  quantity: w.value,
53
53
  freeText: E.value,
@@ -55,7 +55,7 @@ var m = r("giftCard", () => {
55
55
  contactName: b.value,
56
56
  contactEmail: x.value,
57
57
  contactPhone: S.value,
58
- imageBase64: c(D.value.base64),
58
+ imageBase64: l(D.value.base64),
59
59
  imageName: D.value.name,
60
60
  imageFormat: D.value.type,
61
61
  placeType: z.value ? z.value.placeType : void 0,
@@ -63,19 +63,19 @@ var m = r("giftCard", () => {
63
63
  };
64
64
  }
65
65
  async function G() {
66
- y.value = p.WaitingForResponse, A.value = !0;
66
+ y.value = u.WaitingForResponse, A.value = !0;
67
67
  try {
68
- let e = await u().post("/gift-card/create", W());
69
- y.value = p.ReadyToPay, A.value = !1, r({
68
+ let e = await s().post("/gift-card/create", W());
69
+ y.value = u.ReadyToPay, A.value = !1, r({
70
70
  callback: (e) => {
71
- e === 2 && (y.value = p.PaymentSuccess);
71
+ e === 2 && (y.value = u.PaymentSuccess);
72
72
  },
73
73
  response: e.data,
74
74
  enableHostedRedirect: !0
75
75
  });
76
76
  return;
77
77
  } catch (e) {
78
- if (A.value = !1, y.value = p.InitialState, e?.response?.status === 422) return e.response.data.errors;
78
+ if (A.value = !1, y.value = u.InitialState, e?.response?.status === 422) return e.response.data.errors;
79
79
  throw e;
80
80
  }
81
81
  }
@@ -110,5 +110,4 @@ var m = r("giftCard", () => {
110
110
  initialize: K
111
111
  };
112
112
  });
113
- //#endregion
114
113
  export { m as t };
Binary file
Binary file