@konnectio/core 4.4.9 → 4.5.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.
Files changed (131) hide show
  1. package/README.md +274 -274
  2. package/dist/ActionField-CCjWElNQ.js +148 -0
  3. package/dist/ActionField-CCjWElNQ.js.br +0 -0
  4. package/dist/ActionField-CCjWElNQ.js.gz +0 -0
  5. package/dist/AvailabilitySkeleton-IQbxzq3Q.js +10129 -0
  6. package/dist/AvailabilitySkeleton-IQbxzq3Q.js.br +0 -0
  7. package/dist/AvailabilitySkeleton-IQbxzq3Q.js.gz +0 -0
  8. package/dist/CheckoutWindow-xnLaHTT5.js +701 -0
  9. package/dist/CheckoutWindow-xnLaHTT5.js.br +0 -0
  10. package/dist/CheckoutWindow-xnLaHTT5.js.gz +0 -0
  11. package/dist/ErrorMessage-6_ULtG_D.js +31 -0
  12. package/dist/ErrorMessage-6_ULtG_D.js.br +0 -0
  13. package/dist/ErrorMessage-6_ULtG_D.js.gz +0 -0
  14. package/dist/EventAvailabilityForm-Dq4WxMuL.js +114 -0
  15. package/dist/EventAvailabilityForm-Dq4WxMuL.js.br +0 -0
  16. package/dist/EventAvailabilityForm-Dq4WxMuL.js.gz +0 -0
  17. package/dist/Field-00JXggoS.js +57 -0
  18. package/dist/Field-00JXggoS.js.br +0 -0
  19. package/dist/Field-00JXggoS.js.gz +0 -0
  20. package/dist/HotelAvailabilityForm-D_mVPzOx.js +317 -0
  21. package/dist/HotelAvailabilityForm-D_mVPzOx.js.br +0 -0
  22. package/dist/HotelAvailabilityForm-D_mVPzOx.js.gz +0 -0
  23. package/dist/SelectField-BYcZ8xUa.js +11161 -0
  24. package/dist/SelectField-BYcZ8xUa.js.br +0 -0
  25. package/dist/SelectField-BYcZ8xUa.js.gz +0 -0
  26. package/dist/TermsOfService-tFJBZdRe.js +17 -0
  27. package/dist/TermsOfService-tFJBZdRe.js.br +0 -0
  28. package/dist/TermsOfService-tFJBZdRe.js.gz +0 -0
  29. package/dist/_-BZTN6PmS.js +22 -0
  30. package/dist/_-BZTN6PmS.js.br +0 -0
  31. package/dist/_-BZTN6PmS.js.gz +5 -0
  32. package/dist/availability.js +99 -129
  33. package/dist/availability.js.br +0 -0
  34. package/dist/availability.js.gz +0 -0
  35. package/dist/cancel-reservation.js +155 -158
  36. package/dist/cancel-reservation.js.br +0 -0
  37. package/dist/cancel-reservation.js.gz +0 -0
  38. package/dist/chunk-BPfpcrXh.js +20 -0
  39. package/dist/chunk-BPfpcrXh.js.br +0 -0
  40. package/dist/chunk-BPfpcrXh.js.gz +2 -0
  41. package/dist/core.css +2 -1
  42. package/dist/core.css.br +0 -0
  43. package/dist/core.css.gz +0 -0
  44. package/dist/deep-link.js +43 -47
  45. package/dist/deep-link.js.br +0 -0
  46. package/dist/deep-link.js.gz +0 -0
  47. package/dist/dist-oox8Oy7m.js +944 -0
  48. package/dist/dist-oox8Oy7m.js.br +0 -0
  49. package/dist/dist-oox8Oy7m.js.gz +0 -0
  50. package/dist/event.js +1069 -1192
  51. package/dist/event.js.br +0 -0
  52. package/dist/event.js.gz +0 -0
  53. package/dist/gift-card-validation.js +114 -161
  54. package/dist/gift-card-validation.js.br +0 -0
  55. package/dist/gift-card-validation.js.gz +0 -0
  56. package/dist/gift-card.js +452 -451
  57. package/dist/gift-card.js.br +0 -0
  58. package/dist/gift-card.js.gz +0 -0
  59. package/dist/giftCard-Dlw7i36H.js +101 -0
  60. package/dist/giftCard-Dlw7i36H.js.br +0 -0
  61. package/dist/giftCard-Dlw7i36H.js.gz +0 -0
  62. package/dist/hotel.js +8169 -10403
  63. package/dist/hotel.js.br +0 -0
  64. package/dist/hotel.js.gz +0 -0
  65. package/dist/masonry.plugin-qpD7rOEC.js +8747 -0
  66. package/dist/masonry.plugin-qpD7rOEC.js.br +0 -0
  67. package/dist/masonry.plugin-qpD7rOEC.js.gz +0 -0
  68. package/dist/mitt-DrOLO7f9.js +9694 -0
  69. package/dist/mitt-DrOLO7f9.js.br +0 -0
  70. package/dist/mitt-DrOLO7f9.js.gz +0 -0
  71. package/dist/polyfill.js +9298 -11610
  72. package/dist/polyfill.js.br +0 -0
  73. package/dist/polyfill.js.gz +0 -0
  74. package/dist/style-CCnDB_V1.js +1709 -0
  75. package/dist/style-CCnDB_V1.js.br +0 -0
  76. package/dist/style-CCnDB_V1.js.gz +0 -0
  77. package/package.json +115 -118
  78. package/dist/ActionField-CjB94ywQ.js +0 -103
  79. package/dist/ActionField-CjB94ywQ.js.br +0 -0
  80. package/dist/ActionField-CjB94ywQ.js.gz +0 -0
  81. package/dist/AvailabilitySkeleton-GcNIEr0O.js +0 -346
  82. package/dist/AvailabilitySkeleton-GcNIEr0O.js.br +0 -0
  83. package/dist/AvailabilitySkeleton-GcNIEr0O.js.gz +0 -0
  84. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_bcdabbb5_lang-r3OqaSe-.js +0 -10311
  85. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_bcdabbb5_lang-r3OqaSe-.js.br +0 -0
  86. package/dist/AvailabilitySkeleton.vue_vue_type_style_index_0_scoped_bcdabbb5_lang-r3OqaSe-.js.gz +0 -0
  87. package/dist/CheckoutWindow-jLe1mUEB.js +0 -668
  88. package/dist/CheckoutWindow-jLe1mUEB.js.br +0 -0
  89. package/dist/CheckoutWindow-jLe1mUEB.js.gz +0 -0
  90. package/dist/ErrorMessage-uA3IcjN_.js +0 -39
  91. package/dist/ErrorMessage-uA3IcjN_.js.br +0 -0
  92. package/dist/ErrorMessage-uA3IcjN_.js.gz +0 -0
  93. package/dist/EventAvailabilityForm-4m-RW0Lx.js +0 -119
  94. package/dist/EventAvailabilityForm-4m-RW0Lx.js.br +0 -0
  95. package/dist/EventAvailabilityForm-4m-RW0Lx.js.gz +0 -0
  96. package/dist/Field-D9fOd9ca.js +0 -44
  97. package/dist/Field-D9fOd9ca.js.br +0 -0
  98. package/dist/Field-D9fOd9ca.js.gz +0 -0
  99. package/dist/Field.vue_vue_type_style_index_0_scoped_c072a208_lang-B1tIG39F.js +0 -21
  100. package/dist/Field.vue_vue_type_style_index_0_scoped_c072a208_lang-B1tIG39F.js.br +0 -5
  101. package/dist/Field.vue_vue_type_style_index_0_scoped_c072a208_lang-B1tIG39F.js.gz +0 -0
  102. package/dist/SelectField.vue_vue_type_style_index_0_lang-DH_el7cy.js +0 -11918
  103. package/dist/SelectField.vue_vue_type_style_index_0_lang-DH_el7cy.js.br +0 -0
  104. package/dist/SelectField.vue_vue_type_style_index_0_lang-DH_el7cy.js.gz +0 -0
  105. package/dist/TermsOfService-CD3_lM8u.js +0 -28
  106. package/dist/TermsOfService-CD3_lM8u.js.br +0 -0
  107. package/dist/TermsOfService-CD3_lM8u.js.gz +0 -0
  108. package/dist/_-DeLqDsjZ.js +0 -5
  109. package/dist/_-DeLqDsjZ.js.br +0 -0
  110. package/dist/_-DeLqDsjZ.js.gz +0 -2
  111. package/dist/_.vue_vue_type_style_index_0_lang-BdANnGTG.js +0 -25
  112. package/dist/_.vue_vue_type_style_index_0_lang-BdANnGTG.js.br +0 -0
  113. package/dist/_.vue_vue_type_style_index_0_lang-BdANnGTG.js.gz +0 -0
  114. package/dist/_commonjsHelpers-DaMA6jEr.js +0 -9
  115. package/dist/_commonjsHelpers-DaMA6jEr.js.br +0 -0
  116. package/dist/_commonjsHelpers-DaMA6jEr.js.gz +0 -0
  117. package/dist/giftCard-G-zvnJVj.js +0 -109
  118. package/dist/giftCard-G-zvnJVj.js.br +0 -0
  119. package/dist/giftCard-G-zvnJVj.js.gz +0 -0
  120. package/dist/index-BEOLg3OJ.js +0 -639
  121. package/dist/index-BEOLg3OJ.js.br +0 -0
  122. package/dist/index-BEOLg3OJ.js.gz +0 -0
  123. package/dist/masonry.plugin-gbufcPfU.js +0 -10816
  124. package/dist/masonry.plugin-gbufcPfU.js.br +0 -0
  125. package/dist/masonry.plugin-gbufcPfU.js.gz +0 -0
  126. package/dist/mitt-Cj---5fy.js +0 -13346
  127. package/dist/mitt-Cj---5fy.js.br +0 -0
  128. package/dist/mitt-Cj---5fy.js.gz +0 -0
  129. package/dist/style-n4UQjvXd.js +0 -1750
  130. package/dist/style-n4UQjvXd.js.br +0 -0
  131. package/dist/style-n4UQjvXd.js.gz +0 -0
package/dist/gift-card.js CHANGED
@@ -1,454 +1,455 @@
1
- import { d as U, u as M, c as _, a as s, w as C, e as l, r as O, h as p, i as f, b as Y, f as t, g as e, n as J, t as A, j as ae, C as oe, s as z, D as ne, o as ie, S as se, E as T, G, F as de, v as re, z as b, k as ue, _ as ce, l as pe, m as me, p as fe } from "./mitt-Cj---5fy.js";
2
- import { G as ve } from "./style-n4UQjvXd.js";
3
- import { u as B } from "./giftCard-G-zvnJVj.js";
4
- import { a as be, d as P, x as he, _ as R, f as ke, c as ge, L as ye, T as S, i as _e, C as Ce } from "./SelectField.vue_vue_type_style_index_0_lang-DH_el7cy.js";
5
- import { _ as Ve } from "./_.vue_vue_type_style_index_0_lang-BdANnGTG.js";
6
- import { C as $e, a as we, P as Fe, _ as xe } from "./CheckoutWindow-jLe1mUEB.js";
7
- import { E as Ee } from "./Field.vue_vue_type_style_index_0_scoped_c072a208_lang-B1tIG39F.js";
8
- import { F as E } from "./Field-D9fOd9ca.js";
9
- import { E as Pe } from "./ErrorMessage-uA3IcjN_.js";
10
- import { S as Ue } from "./TermsOfService-CD3_lM8u.js";
11
- import { f as Te } from "./index-BEOLg3OJ.js";
12
- const Ge = { class: "media-selector" }, Se = ["accept"], Ae = { class: "media-selector-wrapper" }, Me = { class: "media-selector-tools" }, Le = { key: 0 }, qe = { key: 1 }, Be = { key: 2 }, Re = ["src"], Ie = /* @__PURE__ */ U({
13
- __name: "MediaSelector",
14
- props: {
15
- modelValue: {},
16
- validation: { default: "image/*" },
17
- iconColor: { default: "#000" },
18
- label: {},
19
- required: { type: Boolean, default: !1 }
20
- },
21
- emits: ["update:modelValue"],
22
- setup(a, { emit: r }) {
23
- const m = r, o = a, { t: c } = M(), { display: h } = be(), v = O(), k = Y(() => o.modelValue.base64 !== "");
24
- function V(d) {
25
- m("update:modelValue", d);
26
- }
27
- function I() {
28
- V({
29
- base64: "",
30
- name: "",
31
- type: ""
32
- }), v.value && (v.value.value = "");
33
- }
34
- function $() {
35
- v.value && v.value.click();
36
- }
37
- function D(d, u) {
38
- const [y, L] = [d.name, d.type], g = new FileReader();
39
- g.onload = function(x) {
40
- if (x.target) {
41
- const q = x.target.result;
42
- u({ base64: q, name: y, type: L });
43
- } else
44
- h({
45
- message: c("imageUploadError"),
46
- type: "error"
47
- });
48
- }, g.readAsDataURL(d);
49
- }
50
- async function w() {
51
- let d;
52
- (d = v.value.files) instanceof FileList && D(d[0], V);
53
- }
54
- return (d, u) => (s(), _(he, {
55
- label: a.label,
56
- required: a.required,
57
- type: "media"
58
- }, {
59
- default: C(() => [
60
- l("div", Ge, [
61
- l("input", {
62
- ref_key: "fileInput",
63
- ref: v,
64
- type: "file",
65
- class: "hidden",
66
- accept: a.validation,
67
- single: "",
68
- onChange: u[0] || (u[0] = (y) => w())
69
- }, null, 40, Se),
70
- l("div", Ae, [
71
- l("ul", Me, [
72
- k.value ? f("", !0) : (s(), p("li", Le, [
73
- t(P, {
74
- label: e(c)("uploadFile"),
75
- type: "button",
76
- icon: "upload",
77
- "icon-color": a.iconColor,
78
- onClickEvent: u[1] || (u[1] = (y) => $())
79
- }, null, 8, ["label", "icon-color"])
80
- ])),
81
- k.value ? (s(), p("li", qe, [
82
- t(P, {
83
- label: e(c)("replaceFile"),
84
- type: "button",
85
- icon: "repeat-alt",
86
- "icon-color": a.iconColor,
87
- onClickEvent: u[2] || (u[2] = (y) => $())
88
- }, null, 8, ["label", "icon-color"])
89
- ])) : f("", !0),
90
- k.value ? (s(), p("li", Be, [
91
- t(P, {
92
- label: e(c)("removeFile"),
93
- type: "button",
94
- icon: "trash-alt",
95
- "icon-color": a.iconColor,
96
- onClickEvent: u[3] || (u[3] = (y) => I())
97
- }, null, 8, ["label", "icon-color"])
98
- ])) : f("", !0)
99
- ]),
100
- l("div", {
101
- class: J([
102
- "media-selector-previewer",
103
- { opened: k.value }
104
- ])
105
- }, [
106
- a.modelValue ? (s(), p("img", {
107
- key: 0,
108
- src: a.modelValue.base64
109
- }, null, 8, Re)) : f("", !0)
110
- ], 2)
111
- ])
112
- ])
113
- ]),
114
- _: 1
115
- }, 8, ["label", "required"]));
116
- }
1
+ import { $ as e, At as t, D as n, Dt as r, E as i, Et as a, M as o, O as s, P as c, S as l, T as u, Y as d, _ as f, a as p, bt as m, c as h, dt as g, ft as _, gt as v, k as y, lt as b, o as x, p as S, q as C, r as w, s as T, t as E, u as D, x as O, y as ee } from "./mitt-DrOLO7f9.js";
2
+ import { t as k } from "./dist-oox8Oy7m.js";
3
+ import { E as A, M as te, S as j, _ as M, b as N, n as P, r as ne, t as re, v as F, y as ie } from "./SelectField-BYcZ8xUa.js";
4
+ import { t as ae } from "./_-BZTN6PmS.js";
5
+ import { t as oe } from "./ErrorMessage-6_ULtG_D.js";
6
+ import { n as I, t as L } from "./Field-00JXggoS.js";
7
+ import { t as R } from "./style-CCnDB_V1.js";
8
+ import { i as se, n as ce, r as le, t as ue } from "./CheckoutWindow-xnLaHTT5.js";
9
+ import { t as z } from "./giftCard-Dlw7i36H.js";
10
+ import { t as B } from "./TermsOfService-tFJBZdRe.js";
11
+ //#region src/components/inputs/MediaSelector.vue?vue&type=script&setup=true&lang.ts
12
+ var V = { class: "media-selector" }, H = ["accept"], U = { class: "media-selector-wrapper" }, W = { class: "media-selector-tools" }, G = { key: 0 }, K = { key: 1 }, q = { key: 2 }, J = ["src"], Y = /* @__PURE__ */ c({
13
+ __name: "MediaSelector",
14
+ props: {
15
+ modelValue: {},
16
+ validation: { default: "image/*" },
17
+ iconColor: { default: "#000" },
18
+ label: {},
19
+ required: {
20
+ type: Boolean,
21
+ default: !1
22
+ }
23
+ },
24
+ emits: ["update:modelValue"],
25
+ setup(e, { emit: t }) {
26
+ let c = t, l = e, { t: f } = x(), { display: p } = te(), h = m(), _ = u(() => l.modelValue.base64 !== "");
27
+ function v(e) {
28
+ c("update:modelValue", e);
29
+ }
30
+ function b() {
31
+ v({
32
+ base64: "",
33
+ name: "",
34
+ type: ""
35
+ }), h.value && (h.value.value = "");
36
+ }
37
+ function S() {
38
+ h.value && h.value.click();
39
+ }
40
+ function C(e, t) {
41
+ let [n, r] = [e.name, e.type], i = new FileReader();
42
+ i.onload = function(e) {
43
+ if (e.target) {
44
+ let i = e.target.result;
45
+ t({
46
+ base64: i,
47
+ name: n,
48
+ type: r
49
+ });
50
+ } else p({
51
+ message: f("imageUploadError"),
52
+ type: "error"
53
+ });
54
+ }, i.readAsDataURL(e);
55
+ }
56
+ async function w() {
57
+ let e;
58
+ (e = h.value.files) instanceof FileList && C(e[0], v);
59
+ }
60
+ return (t, c) => (d(), n(M, {
61
+ label: e.label,
62
+ required: e.required,
63
+ type: "media"
64
+ }, {
65
+ default: g(() => [i("div", V, [i("input", {
66
+ ref_key: "fileInput",
67
+ ref: h,
68
+ type: "file",
69
+ class: "hidden",
70
+ accept: e.validation,
71
+ single: "",
72
+ onChange: c[0] ||= (e) => w()
73
+ }, null, 40, H), i("div", U, [i("ul", W, [
74
+ _.value ? s("", !0) : (d(), y("li", G, [o(F, {
75
+ label: a(f)("uploadFile"),
76
+ type: "button",
77
+ icon: "upload",
78
+ "icon-color": e.iconColor,
79
+ onClickEvent: c[1] ||= (e) => S()
80
+ }, null, 8, ["label", "icon-color"])])),
81
+ _.value ? (d(), y("li", K, [o(F, {
82
+ label: a(f)("replaceFile"),
83
+ type: "button",
84
+ icon: "repeat-alt",
85
+ "icon-color": e.iconColor,
86
+ onClickEvent: c[2] ||= (e) => S()
87
+ }, null, 8, ["label", "icon-color"])])) : s("", !0),
88
+ _.value ? (d(), y("li", q, [o(F, {
89
+ label: a(f)("removeFile"),
90
+ type: "button",
91
+ icon: "trash-alt",
92
+ "icon-color": e.iconColor,
93
+ onClickEvent: c[3] ||= (e) => b()
94
+ }, null, 8, ["label", "icon-color"])])) : s("", !0)
95
+ ]), i("div", { class: r(["media-selector-previewer", { opened: _.value }]) }, [e.modelValue ? (d(), y("img", {
96
+ key: 0,
97
+ src: e.modelValue.base64
98
+ }, null, 8, J)) : s("", !0)], 2)])])]),
99
+ _: 1
100
+ }, 8, ["label", "required"]));
101
+ }
117
102
  });
118
- function W(a) {
119
- const r = a;
120
- r.__i18n = r.__i18n || [], r.__i18n.push({
121
- locale: "",
122
- resource: {
123
- da: {
124
- uploadFile: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Upload billede" } },
125
- removeFile: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Fjern billede" } },
126
- replaceFile: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Ersat billede" } },
127
- imageUploadError: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Der skete en fejl under billede upload!" } }
128
- },
129
- en: {
130
- uploadFile: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Upload image" } },
131
- removeFile: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Remove image" } },
132
- replaceFile: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "Replace image" } },
133
- imageUploadError: { t: 0, b: { t: 2, i: [{ t: 3 }], s: "An error occurred under image upload!" } }
134
- }
135
- }
136
- });
103
+ //#endregion
104
+ //#region src/components/inputs/MediaSelector.vue?vue&type=i18n&index=0&lang.yaml
105
+ function X(e) {
106
+ let t = e;
107
+ t.__i18n = t.__i18n || [], t.__i18n.push({
108
+ locale: "",
109
+ resource: {
110
+ da: {
111
+ uploadFile: {
112
+ t: 0,
113
+ b: {
114
+ t: 2,
115
+ i: [{ t: 3 }],
116
+ s: "Upload billede"
117
+ }
118
+ },
119
+ removeFile: {
120
+ t: 0,
121
+ b: {
122
+ t: 2,
123
+ i: [{ t: 3 }],
124
+ s: "Fjern billede"
125
+ }
126
+ },
127
+ replaceFile: {
128
+ t: 0,
129
+ b: {
130
+ t: 2,
131
+ i: [{ t: 3 }],
132
+ s: "Ersat billede"
133
+ }
134
+ },
135
+ imageUploadError: {
136
+ t: 0,
137
+ b: {
138
+ t: 2,
139
+ i: [{ t: 3 }],
140
+ s: "Der skete en fejl under billede upload!"
141
+ }
142
+ }
143
+ },
144
+ en: {
145
+ uploadFile: {
146
+ t: 0,
147
+ b: {
148
+ t: 2,
149
+ i: [{ t: 3 }],
150
+ s: "Upload image"
151
+ }
152
+ },
153
+ removeFile: {
154
+ t: 0,
155
+ b: {
156
+ t: 2,
157
+ i: [{ t: 3 }],
158
+ s: "Remove image"
159
+ }
160
+ },
161
+ replaceFile: {
162
+ t: 0,
163
+ b: {
164
+ t: 2,
165
+ i: [{ t: 3 }],
166
+ s: "Replace image"
167
+ }
168
+ },
169
+ imageUploadError: {
170
+ t: 0,
171
+ b: {
172
+ t: 2,
173
+ i: [{ t: 3 }],
174
+ s: "An error occurred under image upload!"
175
+ }
176
+ }
177
+ }
178
+ }
179
+ });
137
180
  }
138
- typeof W == "function" && W(Ie);
139
- const De = { class: "gift-card-skeleton" }, He = { class: "gift-card-skeleton-form" }, Ne = /* @__PURE__ */ U({
140
- __name: "GiftCardSkeleton",
141
- setup(a) {
142
- return (r, m) => (s(), p("div", De, [
143
- l("div", He, [
144
- t(E),
145
- t(E),
146
- t(E),
147
- t(E),
148
- t(E, { "is-text-area": "" }),
149
- t(Ee, { height: "44px" })
150
- ])
151
- ]));
152
- }
153
- }), je = /* @__PURE__ */ R(Ne, [["__scopeId", "data-v-952c68dd"]]), ze = { class: "konnectio-accept-terms" }, We = /* @__PURE__ */ U({
154
- __name: "_",
155
- props: {
156
- content: {},
157
- buttonLabel: {}
158
- },
159
- setup(a) {
160
- const { t: r } = M(), m = O(!1);
161
- return (o, c) => (s(), p("div", ze, [
162
- t(e(oe), {
163
- keypath: "general.termsAndConditionsNotice",
164
- tag: "span",
165
- scope: "global"
166
- }, {
167
- button: C(() => [
168
- l("i", null, '"' + A(a.buttonLabel) + '"', 1)
169
- ]),
170
- terms: C(() => [
171
- l("a", {
172
- class: "konnectio-accept-terms-link",
173
- target: "_blank",
174
- onClick: c[0] || (c[0] = ae((h) => m.value = !0, ["prevent"]))
175
- }, [
176
- l("span", null, A(e(r)("general.termsAndConditions")), 1)
177
- ])
178
- ]),
179
- _: 1
180
- }),
181
- t(Ue, {
182
- modelValue: m.value,
183
- "onUpdate:modelValue": c[1] || (c[1] = (h) => m.value = h),
184
- description: a.content
185
- }, null, 8, ["modelValue", "description"])
186
- ]));
187
- }
188
- }), Ke = /* @__PURE__ */ R(We, [["__scopeId", "data-v-93ef3159"]]), Oe = /* @__PURE__ */ U({
189
- __name: "GiftCard",
190
- setup(a) {
191
- const { t: r } = M(), m = B();
192
- return (o, c) => (s(), _(Ke, {
193
- content: e(m).termsOfService,
194
- "button-label": e(r)("giftCard.orderGiftCard")
195
- }, null, 8, ["content", "button-label"]));
196
- }
197
- }), Ye = ["data-layout"], Je = { id: "konnectio-gift-card-wrapper" }, Qe = { id: "konnectio-gift-card-title" }, Xe = { id: "konnectio-gift-card-content" }, Ze = { id: "konnectio-gift-card-payment" }, el = ["innerHTML"], ll = { key: 0 }, tl = {
198
- key: 0,
199
- id: "konnectio-select-place-type"
200
- }, al = {
201
- class: /* @__PURE__ */ J(["konnectio-label", "required"])
202
- }, ol = { id: "konnectio-select-place-type-input" }, nl = ["innerHTML"], il = {
203
- key: 0,
204
- id: "konnectio-gift-card-order"
205
- }, sl = { class: "konnectio-panel" }, dl = {
206
- key: 1,
207
- id: "konnectio-gift-card-remarks"
208
- }, rl = {
209
- key: 2,
210
- id: "konnectio-gift-card-order-minimal"
211
- }, ul = { id: "konnectio-gift-card-recaptcha" }, cl = /* @__PURE__ */ U({
212
- name: "GiftCardLayout",
213
- __name: "GiftCard",
214
- props: {
215
- accessToken: {},
216
- layout: { default: "minimal" },
217
- placeType: {},
218
- styling: {}
219
- },
220
- setup(a) {
221
- const r = a, m = Y(() => ({
222
- panelMaxWidth: "800px",
223
- ...r.styling
224
- })), { t: o } = M(), {
225
- name: c,
226
- email: h,
227
- phone: v,
228
- value: k,
229
- remark: V,
230
- showValue: I,
231
- quantity: $,
232
- media: D,
233
- placeId: w,
234
- placeType: d,
235
- showFormPage: u,
236
- showPaymentPage: y,
237
- showConfirmationPage: L,
238
- places: g,
239
- hasFilledForm: x,
240
- hasForcedPlaceType: q,
241
- isWaitingForResponse: F
242
- } = z(B()), { initialize: Q, orderGiftCard: H, fetchMetadata: X } = B(), { isRecaptchaEnabled: Z, currency: ee, hasError: le } = z(ke());
243
- return ne(d, () => {
244
- w.value = void 0;
245
- }), ie(() => {
246
- const N = r.placeType ? parseInt(r.placeType) : void 0;
247
- Q(N);
248
- }), (N, n) => (s(), _(Ce, { styling: m.value }, {
249
- default: C(() => [
250
- (s(), _(se, null, {
251
- default: C(() => [
252
- t(Ve, {
253
- "access-token": a.accessToken,
254
- "data-layout": a.layout,
255
- callback: e(X)
256
- }, {
257
- default: C(() => [
258
- e(le) ? (s(), _(Pe, {
259
- key: 1,
260
- title: "Unable to render Gift card module",
261
- description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
262
- })) : (s(), p("div", {
263
- key: 0,
264
- id: "konnectio-gift-card-module",
265
- "data-layout": a.layout
266
- }, [
267
- l("div", Je, [
268
- l("h2", Qe, [
269
- l("span", null, A(e(o)("giftCard.title")), 1)
270
- ]),
271
- l("div", Xe, [
272
- T(l("div", Ze, [
273
- t($e)
274
- ], 512), [
275
- [G, e(y)]
276
- ]),
277
- T(l("div", null, [
278
- l("p", {
279
- id: "konnectio-gift-card-description",
280
- innerHTML: e(o)("giftCard.description")
281
- }, null, 8, el),
282
- l("form", null, [
283
- e(q) ? f("", !0) : (s(), p("div", ll, [
284
- e(g) ? (s(), p("div", tl, [
285
- l("label", al, [
286
- l("span", null, A(e(o)("giftCard.selectType")), 1)
287
- ]),
288
- l("div", ol, [
289
- l("ul", null, [
290
- (s(!0), p(de, null, re(e(g), (i, j) => (s(), p("li", { key: j }, [
291
- t(we, {
292
- modelValue: e(d),
293
- "onUpdate:modelValue": n[0] || (n[0] = (te) => b(d) ? d.value = te : null),
294
- type: "radio",
295
- name: "placeType",
296
- val: j,
297
- label: i.label
298
- }, null, 8, ["modelValue", "val", "label"])
299
- ]))), 128))
300
- ]),
301
- e(g)[e(d)] && e(g)[e(d)].data.length > 1 ? (s(), _(ge, {
302
- key: 0,
303
- modelValue: e(w),
304
- "onUpdate:modelValue": n[1] || (n[1] = (i) => b(w) ? w.value = i : null),
305
- placeholder: e(o)("giftCard.selectPlacePlaceholder"),
306
- options: e(g)[e(d)].data,
307
- labelKey: "name",
308
- valueKey: "id",
309
- required: ""
310
- }, null, 8, ["modelValue", "placeholder", "options"])) : f("", !0)
311
- ])
312
- ])) : (s(), _(ye, { key: 1 }))
313
- ])),
314
- t(S, {
315
- modelValue: e(c),
316
- "onUpdate:modelValue": n[2] || (n[2] = (i) => b(c) ? c.value = i : null),
317
- type: "text",
318
- name: "name",
319
- autocomplete: "name",
320
- label: e(o)("giftCard.name"),
321
- icon: "user-alt",
322
- placeholder: e(o)("giftCard.namePlaceholder"),
323
- required: ""
324
- }, null, 8, ["modelValue", "label", "placeholder"]),
325
- t(S, {
326
- modelValue: e(h),
327
- "onUpdate:modelValue": n[3] || (n[3] = (i) => b(h) ? h.value = i : null),
328
- type: "email",
329
- name: "email",
330
- autocomplete: "email",
331
- label: e(o)("giftCard.email"),
332
- icon: "at",
333
- placeholder: e(o)("giftCard.emailPlaceholder"),
334
- required: ""
335
- }, null, 8, ["modelValue", "label", "placeholder"]),
336
- t(Fe, {
337
- modelValue: e(v),
338
- "onUpdate:modelValue": n[4] || (n[4] = (i) => b(v) ? v.value = i : null),
339
- icon: "phone-office",
340
- label: e(o)("giftCard.phone"),
341
- placeholder: e(o)("giftCard.phonePlaceholder"),
342
- required: ""
343
- }, null, 8, ["modelValue", "label", "placeholder"]),
344
- t(S, {
345
- modelValue: e(k),
346
- "onUpdate:modelValue": n[5] || (n[5] = (i) => b(k) ? k.value = i : null),
347
- type: "number",
348
- name: "value",
349
- label: e(o)("giftCard.value"),
350
- icon: "money-bill",
351
- placeholder: e(o)("giftCard.valuePlaceholder"),
352
- suffix: e(ee),
353
- required: ""
354
- }, null, 8, ["modelValue", "label", "placeholder", "suffix"]),
355
- f("", !0),
356
- f("", !0),
357
- t(_e, {
358
- modelValue: e($),
359
- "onUpdate:modelValue": n[8] || (n[8] = (i) => b($) ? $.value = i : null),
360
- label: e(o)("giftCard.quantity"),
361
- icon: "gift-card",
362
- required: ""
363
- }, null, 8, ["modelValue", "label"])
364
- ])
365
- ], 512), [
366
- [G, e(u)]
367
- ]),
368
- T(l("div", null, [
369
- l("div", {
370
- innerHTML: e(o)("giftCard.thankYou")
371
- }, null, 8, nl)
372
- ], 512), [
373
- [G, e(L)]
374
- ])
375
- ]),
376
- a.layout !== "minimal" && e(u) ? (s(), p("div", il, [
377
- l("div", sl, [
378
- t(P, {
379
- label: e(o)("giftCard.orderGiftCard"),
380
- "full-width": !0,
381
- disabled: !e(x),
382
- "is-loading": e(F),
383
- "onUpdate:isLoading": n[9] || (n[9] = (i) => b(F) ? F.value = i : null),
384
- onClickEvent: e(H)
385
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"])
386
- ])
387
- ])) : f("", !0),
388
- e(u) ? (s(), p("div", dl, [
389
- t(S, {
390
- modelValue: e(V),
391
- "onUpdate:modelValue": n[10] || (n[10] = (i) => b(V) ? V.value = i : null),
392
- type: "textarea",
393
- name: "remark",
394
- label: e(o)("giftCard.remark"),
395
- icon: "info-circle",
396
- placeholder: e(o)("giftCard.remarkPlaceholder")
397
- }, null, 8, ["modelValue", "label", "placeholder"])
398
- ])) : f("", !0),
399
- e(u) ? (s(), p("div", rl, [
400
- t(P, {
401
- label: e(o)("giftCard.orderGiftCard"),
402
- "full-width": !0,
403
- disabled: !e(x),
404
- "data-test": "orderGiftCard",
405
- "is-loading": e(F),
406
- "onUpdate:isLoading": n[11] || (n[11] = (i) => b(F) ? F.value = i : null),
407
- onClickEvent: e(H)
408
- }, null, 8, ["label", "disabled", "is-loading", "onClickEvent"]),
409
- l("div", null, [
410
- n[12] || (n[12] = l("div", { class: "konnectio-divider" }, null, -1)),
411
- t(Oe)
412
- ]),
413
- T(l("div", ul, [
414
- t(xe)
415
- ], 512), [
416
- [G, e(Z)]
417
- ])
418
- ])) : f("", !0)
419
- ])
420
- ], 8, Ye))
421
- ]),
422
- _: 1
423
- }, 8, ["access-token", "data-layout", "callback"])
424
- ]),
425
- fallback: C(() => [
426
- t(je)
427
- ]),
428
- _: 1
429
- }))
430
- ]),
431
- _: 1
432
- }, 8, ["styling"]));
433
- }
434
- }), K = /* @__PURE__ */ R(cl, [["__scopeId", "data-v-5baf85ce"]]), pl = ue(), ml = ce, fl = ml();
435
- class vl extends HTMLElement {
436
- vueApp;
437
- constructor() {
438
- super();
439
- }
440
- disconnectedCallback() {
441
- this.vueApp.unmount();
442
- }
443
- connectedCallback() {
444
- const r = pe(K, this.attributes);
445
- this.vueApp = me(K, r), this.vueApp.provide("emitter", fl), this.vueApp.use(Te), this.vueApp.use(pl), this.vueApp.use(fe), this.vueApp.use(ve);
446
- const m = document.createElement("div");
447
- this.vueApp.mount(m), this.appendChild(m.children[0]);
448
- }
449
- }
450
- window.customElements.define("konnectio-gift-card", vl);
451
- export {
452
- vl as default
181
+ //#endregion
182
+ //#region src/components/inputs/MediaSelector.vue
183
+ typeof X == "function" && X(Y);
184
+ //#endregion
185
+ //#region src/components/skeletons/GiftCardSkeleton.vue?vue&type=script&setup=true&lang.ts
186
+ var de = { class: "gift-card-skeleton" }, fe = { class: "gift-card-skeleton-form" }, pe = /* @__PURE__ */ j(/* @__PURE__ */ c({
187
+ __name: "GiftCardSkeleton",
188
+ setup(e) {
189
+ return (e, t) => (d(), y("div", de, [i("div", fe, [
190
+ o(L),
191
+ o(L),
192
+ o(L),
193
+ o(L),
194
+ o(L, { "is-text-area": "" }),
195
+ o(I, { height: "44px" })
196
+ ])]));
197
+ }
198
+ }), [["__scopeId", "data-v-ba3efaa1"]]), me = { class: "konnectio-accept-terms" }, he = /* @__PURE__ */ j(/* @__PURE__ */ c({
199
+ __name: "_",
200
+ props: {
201
+ content: {},
202
+ buttonLabel: {}
203
+ },
204
+ setup(e) {
205
+ let { t: n } = x(), r = m(!1);
206
+ return (s, c) => (d(), y("div", me, [o(a(p), {
207
+ keypath: "general.termsAndConditionsNotice",
208
+ tag: "span",
209
+ scope: "global"
210
+ }, {
211
+ button: g(() => [i("i", null, "\"" + t(e.buttonLabel) + "\"", 1)]),
212
+ terms: g(() => [i("a", {
213
+ class: "konnectio-accept-terms-link",
214
+ target: "_blank",
215
+ onClick: c[0] ||= ee((e) => r.value = !0, ["prevent"])
216
+ }, [i("span", null, t(a(n)("general.termsAndConditions")), 1)])]),
217
+ _: 1
218
+ }), o(B, {
219
+ modelValue: r.value,
220
+ "onUpdate:modelValue": c[1] ||= (e) => r.value = e,
221
+ description: e.content
222
+ }, null, 8, ["modelValue", "description"])]));
223
+ }
224
+ }), [["__scopeId", "data-v-689c045a"]]), ge = /* @__PURE__ */ c({
225
+ __name: "GiftCard",
226
+ setup(e) {
227
+ let { t } = x(), r = z();
228
+ return (e, i) => (d(), n(he, {
229
+ content: a(r).termsOfService,
230
+ "button-label": a(t)("giftCard.orderGiftCard")
231
+ }, null, 8, ["content", "button-label"]));
232
+ }
233
+ }), _e = ["data-layout"], ve = { id: "konnectio-gift-card-wrapper" }, ye = { id: "konnectio-gift-card-title" }, be = { id: "konnectio-gift-card-content" }, xe = { id: "konnectio-gift-card-payment" }, Se = ["innerHTML"], Ce = { key: 0 }, we = {
234
+ key: 0,
235
+ id: "konnectio-select-place-type"
236
+ }, Te = { class: /* @__PURE__ */ r(["konnectio-label", "required"]) }, Ee = { id: "konnectio-select-place-type-input" }, De = ["innerHTML"], Z = {
237
+ key: 0,
238
+ id: "konnectio-gift-card-order"
239
+ }, Oe = { class: "konnectio-panel" }, ke = {
240
+ key: 1,
241
+ id: "konnectio-gift-card-remarks"
242
+ }, Ae = {
243
+ key: 2,
244
+ id: "konnectio-gift-card-order-minimal"
245
+ }, je = { id: "konnectio-gift-card-recaptcha" }, Q = /* @__PURE__ */ j(/* @__PURE__ */ c({
246
+ name: "GiftCardLayout",
247
+ __name: "GiftCard",
248
+ props: {
249
+ accessToken: {},
250
+ layout: { default: "minimal" },
251
+ placeType: {},
252
+ styling: {}
253
+ },
254
+ setup(r) {
255
+ let c = r, p = u(() => ({
256
+ panelMaxWidth: "800px",
257
+ ...c.styling
258
+ })), { t: m } = x(), { name: h, email: S, phone: w, value: T, remark: E, showValue: ee, quantity: k, media: te, placeId: j, placeType: M, showFormPage: I, showPaymentPage: L, showConfirmationPage: R, places: B, hasFilledForm: V, hasForcedPlaceType: H, isWaitingForResponse: U } = D(z()), { initialize: W, orderGiftCard: G, fetchMetadata: K } = z(), { isRecaptchaEnabled: q, currency: J, hasError: Y } = D(A());
259
+ return b(M, () => {
260
+ j.value = void 0;
261
+ }), C(() => {
262
+ W(c.placeType ? parseInt(c.placeType) : void 0);
263
+ }), (c, u) => (d(), n(N, { styling: p.value }, {
264
+ default: g(() => [(d(), n(l, null, {
265
+ default: g(() => [o(ae, {
266
+ "access-token": r.accessToken,
267
+ "data-layout": r.layout,
268
+ callback: a(K)
269
+ }, {
270
+ default: g(() => [a(Y) ? (d(), n(oe, {
271
+ key: 1,
272
+ title: "Unable to render Gift card module",
273
+ description: "Gift card functionality hasn't been setup for this account. Please contact Octopus PMS for support."
274
+ })) : (d(), y("div", {
275
+ key: 0,
276
+ id: "konnectio-gift-card-module",
277
+ "data-layout": r.layout
278
+ }, [i("div", ve, [
279
+ i("h2", ye, [i("span", null, t(a(m)("giftCard.title")), 1)]),
280
+ i("div", be, [
281
+ _(i("div", xe, [o(ue)], 512), [[f, a(L)]]),
282
+ _(i("div", null, [i("p", {
283
+ id: "konnectio-gift-card-description",
284
+ innerHTML: a(m)("giftCard.description")
285
+ }, null, 8, Se), i("form", null, [
286
+ a(H) ? s("", !0) : (d(), y("div", Ce, [a(B) ? (d(), y("div", we, [i("label", Te, [i("span", null, t(a(m)("giftCard.selectType")), 1)]), i("div", Ee, [i("ul", null, [(d(!0), y(O, null, e(a(B), (e, t) => (d(), y("li", { key: t }, [o(le, {
287
+ modelValue: a(M),
288
+ "onUpdate:modelValue": u[0] ||= (e) => v(M) ? M.value = e : null,
289
+ type: "radio",
290
+ name: "placeType",
291
+ val: t,
292
+ label: e.label
293
+ }, null, 8, [
294
+ "modelValue",
295
+ "val",
296
+ "label"
297
+ ])]))), 128))]), a(B)[a(M)] && a(B)[a(M)].data.length > 1 ? (d(), n(re, {
298
+ key: 0,
299
+ modelValue: a(j),
300
+ "onUpdate:modelValue": u[1] ||= (e) => v(j) ? j.value = e : null,
301
+ placeholder: a(m)("giftCard.selectPlacePlaceholder"),
302
+ options: a(B)[a(M)].data,
303
+ labelKey: "name",
304
+ valueKey: "id",
305
+ required: ""
306
+ }, null, 8, [
307
+ "modelValue",
308
+ "placeholder",
309
+ "options"
310
+ ])) : s("", !0)])])) : (d(), n(ie, { key: 1 }))])),
311
+ o(P, {
312
+ modelValue: a(h),
313
+ "onUpdate:modelValue": u[2] ||= (e) => v(h) ? h.value = e : null,
314
+ type: "text",
315
+ name: "name",
316
+ autocomplete: "name",
317
+ label: a(m)("giftCard.name"),
318
+ icon: "user-alt",
319
+ placeholder: a(m)("giftCard.namePlaceholder"),
320
+ required: ""
321
+ }, null, 8, [
322
+ "modelValue",
323
+ "label",
324
+ "placeholder"
325
+ ]),
326
+ o(P, {
327
+ modelValue: a(S),
328
+ "onUpdate:modelValue": u[3] ||= (e) => v(S) ? S.value = e : null,
329
+ type: "email",
330
+ name: "email",
331
+ autocomplete: "email",
332
+ label: a(m)("giftCard.email"),
333
+ icon: "at",
334
+ placeholder: a(m)("giftCard.emailPlaceholder"),
335
+ required: ""
336
+ }, null, 8, [
337
+ "modelValue",
338
+ "label",
339
+ "placeholder"
340
+ ]),
341
+ o(se, {
342
+ modelValue: a(w),
343
+ "onUpdate:modelValue": u[4] ||= (e) => v(w) ? w.value = e : null,
344
+ icon: "phone-office",
345
+ label: a(m)("giftCard.phone"),
346
+ placeholder: a(m)("giftCard.phonePlaceholder"),
347
+ required: ""
348
+ }, null, 8, [
349
+ "modelValue",
350
+ "label",
351
+ "placeholder"
352
+ ]),
353
+ o(P, {
354
+ modelValue: a(T),
355
+ "onUpdate:modelValue": u[5] ||= (e) => v(T) ? T.value = e : null,
356
+ type: "number",
357
+ name: "value",
358
+ label: a(m)("giftCard.value"),
359
+ icon: "money-bill",
360
+ placeholder: a(m)("giftCard.valuePlaceholder"),
361
+ suffix: a(J),
362
+ required: ""
363
+ }, null, 8, [
364
+ "modelValue",
365
+ "label",
366
+ "placeholder",
367
+ "suffix"
368
+ ]),
369
+ s("", !0),
370
+ s("", !0),
371
+ o(ne, {
372
+ modelValue: a(k),
373
+ "onUpdate:modelValue": u[8] ||= (e) => v(k) ? k.value = e : null,
374
+ label: a(m)("giftCard.quantity"),
375
+ icon: "gift-card",
376
+ required: ""
377
+ }, null, 8, ["modelValue", "label"])
378
+ ])], 512), [[f, a(I)]]),
379
+ _(i("div", null, [i("div", { innerHTML: a(m)("giftCard.thankYou") }, null, 8, De)], 512), [[f, a(R)]])
380
+ ]),
381
+ r.layout !== "minimal" && a(I) ? (d(), y("div", Z, [i("div", Oe, [o(F, {
382
+ label: a(m)("giftCard.orderGiftCard"),
383
+ "full-width": !0,
384
+ disabled: !a(V),
385
+ "is-loading": a(U),
386
+ "onUpdate:isLoading": u[9] ||= (e) => v(U) ? U.value = e : null,
387
+ onClickEvent: a(G)
388
+ }, null, 8, [
389
+ "label",
390
+ "disabled",
391
+ "is-loading",
392
+ "onClickEvent"
393
+ ])])])) : s("", !0),
394
+ a(I) ? (d(), y("div", ke, [o(P, {
395
+ modelValue: a(E),
396
+ "onUpdate:modelValue": u[10] ||= (e) => v(E) ? E.value = e : null,
397
+ type: "textarea",
398
+ name: "remark",
399
+ label: a(m)("giftCard.remark"),
400
+ icon: "info-circle",
401
+ placeholder: a(m)("giftCard.remarkPlaceholder")
402
+ }, null, 8, [
403
+ "modelValue",
404
+ "label",
405
+ "placeholder"
406
+ ])])) : s("", !0),
407
+ a(I) ? (d(), y("div", Ae, [
408
+ o(F, {
409
+ label: a(m)("giftCard.orderGiftCard"),
410
+ "full-width": !0,
411
+ disabled: !a(V),
412
+ "data-test": "orderGiftCard",
413
+ "is-loading": a(U),
414
+ "onUpdate:isLoading": u[11] ||= (e) => v(U) ? U.value = e : null,
415
+ onClickEvent: a(G)
416
+ }, null, 8, [
417
+ "label",
418
+ "disabled",
419
+ "is-loading",
420
+ "onClickEvent"
421
+ ]),
422
+ i("div", null, [u[12] ||= i("div", { class: "konnectio-divider" }, null, -1), o(ge)]),
423
+ _(i("div", je, [o(ce)], 512), [[f, a(q)]])
424
+ ])) : s("", !0)
425
+ ])], 8, _e))]),
426
+ _: 1
427
+ }, 8, [
428
+ "access-token",
429
+ "data-layout",
430
+ "callback"
431
+ ])]),
432
+ fallback: g(() => [o(pe)]),
433
+ _: 1
434
+ }))]),
435
+ _: 1
436
+ }, 8, ["styling"]));
437
+ }
438
+ }), [["__scopeId", "data-v-06fd20aa"]]), Me = h(), Ne = E(), $ = class extends HTMLElement {
439
+ vueApp;
440
+ constructor() {
441
+ super();
442
+ }
443
+ disconnectedCallback() {
444
+ this.vueApp.unmount();
445
+ }
446
+ connectedCallback() {
447
+ let e = T(Q, this.attributes);
448
+ this.vueApp = S(Q, e), this.vueApp.provide("emitter", Ne), this.vueApp.use(k), this.vueApp.use(Me), this.vueApp.use(w), this.vueApp.use(R);
449
+ let t = document.createElement("div");
450
+ this.vueApp.mount(t), this.appendChild(t.children[0]);
451
+ }
453
452
  };
454
- //# sourceMappingURL=gift-card.js.map
453
+ window.customElements.define("konnectio-gift-card", $);
454
+ //#endregion
455
+ export { $ as default };