@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
Binary file
Binary file
@@ -0,0 +1,17 @@
1
+ import { D as e, E as t, Et as n, P as r, Y as i, dt as a, o } from "./mitt-DrOLO7f9.js";
2
+ import { I as s, S as c } from "./SelectField-BYcZ8xUa.js";
3
+ import { a as l } from "./CheckoutWindow-xnLaHTT5.js";
4
+ //#region src/components/side-panels/TermsOfService.vue?vue&type=script&setup=true&lang.ts
5
+ var u = { class: "konnectio-terms-side-panel" }, d = ["innerHTML"], f = /* @__PURE__ */ c(/* @__PURE__ */ r({
6
+ __name: "TermsOfService",
7
+ props: { description: {} },
8
+ setup(r) {
9
+ let { t: c } = o();
10
+ return (o, f) => (i(), e(l, { title: n(c)("general.termsAndConditions") }, {
11
+ default: a(() => [t("div", u, [t("p", { innerHTML: n(s)(r.description) }, null, 8, d)])]),
12
+ _: 1
13
+ }, 8, ["title"]));
14
+ }
15
+ }), [["__scopeId", "data-v-486f73de"]]);
16
+ //#endregion
17
+ export { f as t };
@@ -0,0 +1,22 @@
1
+ import { n as e } from "./chunk-BPfpcrXh.js";
2
+ import { P as t, Y as n, et as r, k as i, ut as a } from "./mitt-DrOLO7f9.js";
3
+ import { E as o } from "./SelectField-BYcZ8xUa.js";
4
+ //#region src/layouts/_.vue?vue&type=script&setup=true&lang.ts
5
+ var s = {
6
+ class: "konnectio-app",
7
+ ref: "base"
8
+ }, c = /* @__PURE__ */ t({
9
+ name: "BaseLayout",
10
+ __name: "_",
11
+ props: {
12
+ accessToken: {},
13
+ type: { default: "none" },
14
+ callback: {}
15
+ },
16
+ async setup(e) {
17
+ let t, c, l = e, { setAccessToken: u, fetchUtilities: d } = o();
18
+ return [t, c] = a(() => u(l.accessToken)), await t, c(), [t, c] = a(() => d()), await t, c(), l.callback && ([t, c] = a(() => l.callback()), await t, c()), (e, t) => (n(), i("div", s, [r(e.$slots, "default")], 512));
19
+ }
20
+ }), l = /* @__PURE__ */ e({ default: () => u }), u = c;
21
+ //#endregion
22
+ export { l as n, u as t };
Binary file
@@ -0,0 +1,5 @@
1
+ x�eRkk�0�l���6�\�
2
+ ��V��q ���a��]�_�_~|!w����'R�&���^�?�rǩ�W��tgᝪ�|�b�U[n"}�D���������S�}\����� >�H��<SFz_��:kI�Me�3�g��5ح���A@�Au�/m{9�qֶ8��6Ϭ\S
3
+ �P��Q�PHߠ ��6���K
4
+ �~��A�����/fy�9
5
+ �Y\'�4��h>!rS�\�A�]=^�cƂ�L�<&�#�����$F�IMs��&����7]�l�BV��{�H�
@@ -1,130 +1,100 @@
1
- import { d as T, u as x, o as H, r as S, c as o, a as l, w as s, b as c, S as B, e, f as v, g as d, h as D, i as f, F as M, j as y, n as L, t as A, T as N, k as P, l as F, m as V, _, p as $ } from "./mitt-Cj---5fy.js";
2
- import { f as z } from "./index-BEOLg3OJ.js";
3
- import { u as I, C as j, _ as K } from "./SelectField.vue_vue_type_style_index_0_lang-DH_el7cy.js";
4
- import { _ as U } from "./_.vue_vue_type_style_index_0_lang-BdANnGTG.js";
5
- import { A as q, H as G } from "./AvailabilitySkeleton-GcNIEr0O.js";
6
- import { E as J } from "./EventAvailabilityForm-4m-RW0Lx.js";
7
- import { E as O } from "./ErrorMessage-uA3IcjN_.js";
8
- const Q = { class: "konnectio-availability-module" }, R = { class: "konnectio-availability-navigation" }, W = { class: "konnectio-availability-search-form" }, X = /* @__PURE__ */ T({
9
- name: "AvailabilityLayout",
10
- __name: "Availability",
11
- props: {
12
- accessToken: {},
13
- eventLink: {},
14
- eventLocation: {},
15
- hideEventLocations: { default: "no" },
16
- hotelLink: {},
17
- hotelLocation: {},
18
- hideHotelLocations: { default: "no" },
19
- hotelDisableDefaultLocation: { default: "no" },
20
- styling: {}
21
- },
22
- setup(t) {
23
- const { t: u } = x(), { fetchMetadata: r } = I(), a = t, i = S(), E = c(() => !!a.hotelLink || !!a.eventLink), m = c(() => !!a.hotelLink && !!a.eventLink), p = c(() => i.value === "hotel"), k = c(() => i.value === "event"), h = (b) => i.value = b, g = c(() => ({
24
- fontSize: "13px",
25
- ...a.styling
26
- }));
27
- return H(() => {
28
- !a.hotelLink && a.eventLink ? i.value = "event" : i.value = "hotel";
29
- }), (b, n) => (l(), o(j, { styling: g.value }, {
30
- default: s(() => [
31
- E.value ? (l(), o(B, { key: 0 }, {
32
- default: s(() => [
33
- e("div", null, [
34
- v(U, {
35
- "access-token": t.accessToken,
36
- callback: d(r)
37
- }, {
38
- default: s(() => [
39
- e("div", Q, [
40
- m.value ? (l(), D(M, { key: 0 }, [
41
- e("nav", R, [
42
- e("ul", null, [
43
- e("li", null, [
44
- e("button", {
45
- class: L({ active: p.value }),
46
- onClick: n[0] || (n[0] = y((w) => h("hotel"), ["prevent"]))
47
- }, [
48
- e("span", null, A(d(u)("availability.hotel")), 1)
49
- ], 2)
50
- ]),
51
- e("li", null, [
52
- e("button", {
53
- class: L({ active: k.value }),
54
- onClick: n[1] || (n[1] = y((w) => h("event"), ["prevent"]))
55
- }, [
56
- e("span", null, A(d(u)("availability.events")), 1)
57
- ], 2)
58
- ])
59
- ])
60
- ]),
61
- n[2] || (n[2] = e("div", { class: "konnectio-availability-divider" }, null, -1))
62
- ], 64)) : f("", !0),
63
- e("div", W, [
64
- v(N, {
65
- name: "fade",
66
- mode: "out-in",
67
- appear: ""
68
- }, {
69
- default: s(() => [
70
- p.value ? (l(), o(G, {
71
- key: 0,
72
- link: t.hotelLink,
73
- "selected-location": Number(t.hotelLocation),
74
- "disable-default-location": t.hotelDisableDefaultLocation === "yes",
75
- "hide-locations": t.hideHotelLocations === "yes"
76
- }, null, 8, ["link", "selected-location", "disable-default-location", "hide-locations"])) : k.value ? (l(), o(J, {
77
- key: 1,
78
- link: t.eventLink,
79
- "selected-location": Number(t.eventLocation),
80
- "hide-locations": t.hideEventLocations === "yes"
81
- }, null, 8, ["link", "selected-location", "hide-locations"])) : f("", !0)
82
- ]),
83
- _: 1
84
- })
85
- ])
86
- ])
87
- ]),
88
- _: 1
89
- }, 8, ["access-token", "callback"])
90
- ])
91
- ]),
92
- fallback: s(() => [
93
- e("div", null, [
94
- v(q, {
95
- view: m.value ? "both" : i.value
96
- }, null, 8, ["view"])
97
- ])
98
- ]),
99
- _: 1
100
- })) : (l(), o(O, {
101
- key: 1,
102
- title: "Unable to render Availability module",
103
- description: `The 'hotel-link' and/or 'event-link' properties are missing.<br>
104
- The Konnectio Availability module can't be rendered without at least one link property set.`
105
- }))
106
- ]),
107
- _: 1
108
- }, 8, ["styling"]));
109
- }
110
- }), C = /* @__PURE__ */ K(X, [["__scopeId", "data-v-d4cca1d0"]]), Y = P(), Z = _, ee = Z();
111
- class te extends HTMLElement {
112
- vueApp;
113
- constructor() {
114
- super();
115
- }
116
- disconnectedCallback() {
117
- this.vueApp.unmount();
118
- }
119
- connectedCallback() {
120
- const u = F(C, this.attributes);
121
- this.vueApp = V(C, u), this.vueApp.provide("emitter", ee), this.vueApp.use(z), this.vueApp.use($), this.vueApp.use(Y);
122
- const r = document.createElement("div");
123
- this.vueApp.mount(r), this.appendChild(r.children[0]);
124
- }
125
- }
126
- window.customElements.define("konnectio-availability", te);
127
- export {
128
- te as default
1
+ import { At as e, D as t, Dt as n, E as r, Et as i, M as a, O as o, P as s, S as c, T as l, Y as u, bt as d, c as f, d as p, dt as m, k as h, o as g, p as _, q as v, r as y, s as b, t as x, x as S, y as C } from "./mitt-DrOLO7f9.js";
2
+ import { t as w } from "./dist-oox8Oy7m.js";
3
+ import { C as T, S as E, b as D } from "./SelectField-BYcZ8xUa.js";
4
+ import { t as O } from "./_-BZTN6PmS.js";
5
+ import { t as k } from "./AvailabilitySkeleton-IQbxzq3Q.js";
6
+ import { t as A } from "./HotelAvailabilityForm-D_mVPzOx.js";
7
+ import { t as j } from "./EventAvailabilityForm-Dq4WxMuL.js";
8
+ import { t as M } from "./ErrorMessage-6_ULtG_D.js";
9
+ //#region src/layouts/Availability.vue?vue&type=script&setup=true&lang.ts
10
+ var N = { class: "konnectio-availability-module" }, P = { class: "konnectio-availability-navigation" }, F = { class: "konnectio-availability-search-form" }, I = /* @__PURE__ */ E(/* @__PURE__ */ s({
11
+ name: "AvailabilityLayout",
12
+ __name: "Availability",
13
+ props: {
14
+ accessToken: {},
15
+ eventLink: {},
16
+ eventLocation: {},
17
+ hideEventLocations: { default: "no" },
18
+ hotelLink: {},
19
+ hotelLocation: {},
20
+ hideHotelLocations: { default: "no" },
21
+ hotelDisableDefaultLocation: { default: "no" },
22
+ styling: {}
23
+ },
24
+ setup(s) {
25
+ let { t: f } = g(), { fetchMetadata: _ } = T(), y = s, b = d(), x = l(() => !!y.hotelLink || !!y.eventLink), w = l(() => !!y.hotelLink && !!y.eventLink), E = l(() => b.value === "hotel"), I = l(() => b.value === "event"), L = (e) => b.value = e, R = l(() => ({
26
+ fontSize: "13px",
27
+ ...y.styling
28
+ }));
29
+ return v(() => {
30
+ !y.hotelLink && y.eventLink ? b.value = "event" : b.value = "hotel";
31
+ }), (l, d) => (u(), t(D, { styling: R.value }, {
32
+ default: m(() => [x.value ? (u(), t(c, { key: 0 }, {
33
+ default: m(() => [r("div", null, [a(O, {
34
+ "access-token": s.accessToken,
35
+ callback: i(_)
36
+ }, {
37
+ default: m(() => [r("div", N, [w.value ? (u(), h(S, { key: 0 }, [r("nav", P, [r("ul", null, [r("li", null, [r("button", {
38
+ class: n({ active: E.value }),
39
+ onClick: d[0] ||= C((e) => L("hotel"), ["prevent"])
40
+ }, [r("span", null, e(i(f)("availability.hotel")), 1)], 2)]), r("li", null, [r("button", {
41
+ class: n({ active: I.value }),
42
+ onClick: d[1] ||= C((e) => L("event"), ["prevent"])
43
+ }, [r("span", null, e(i(f)("availability.events")), 1)], 2)])])]), d[2] ||= r("div", { class: "konnectio-availability-divider" }, null, -1)], 64)) : o("", !0), r("div", F, [a(p, {
44
+ name: "fade",
45
+ mode: "out-in",
46
+ appear: ""
47
+ }, {
48
+ default: m(() => [E.value ? (u(), t(A, {
49
+ key: 0,
50
+ link: s.hotelLink,
51
+ "selected-location": Number(s.hotelLocation),
52
+ "disable-default-location": s.hotelDisableDefaultLocation === "yes",
53
+ "hide-locations": s.hideHotelLocations === "yes"
54
+ }, null, 8, [
55
+ "link",
56
+ "selected-location",
57
+ "disable-default-location",
58
+ "hide-locations"
59
+ ])) : I.value ? (u(), t(j, {
60
+ key: 1,
61
+ link: s.eventLink,
62
+ "selected-location": Number(s.eventLocation),
63
+ "hide-locations": s.hideEventLocations === "yes"
64
+ }, null, 8, [
65
+ "link",
66
+ "selected-location",
67
+ "hide-locations"
68
+ ])) : o("", !0)]),
69
+ _: 1
70
+ })])])]),
71
+ _: 1
72
+ }, 8, ["access-token", "callback"])])]),
73
+ fallback: m(() => [r("div", null, [a(k, { view: w.value ? "both" : b.value }, null, 8, ["view"])])]),
74
+ _: 1
75
+ })) : (u(), t(M, {
76
+ key: 1,
77
+ title: "Unable to render Availability module",
78
+ description: "The 'hotel-link' and/or 'event-link' properties are missing.<br>\r\n The Konnectio Availability module can't be rendered without at least one link property set."
79
+ }))]),
80
+ _: 1
81
+ }, 8, ["styling"]));
82
+ }
83
+ }), [["__scopeId", "data-v-a8e928a0"]]), L = f(), R = x(), z = class extends HTMLElement {
84
+ vueApp;
85
+ constructor() {
86
+ super();
87
+ }
88
+ disconnectedCallback() {
89
+ this.vueApp.unmount();
90
+ }
91
+ connectedCallback() {
92
+ let e = b(I, this.attributes);
93
+ this.vueApp = _(I, e), this.vueApp.provide("emitter", R), this.vueApp.use(w), this.vueApp.use(y), this.vueApp.use(L);
94
+ let t = document.createElement("div");
95
+ this.vueApp.mount(t), this.appendChild(t.children[0]);
96
+ }
129
97
  };
130
- //# sourceMappingURL=availability.js.map
98
+ window.customElements.define("konnectio-availability", z);
99
+ //#endregion
100
+ export { z as default };
Binary file
Binary file
@@ -1,159 +1,156 @@
1
- import { d as C, u as y, h as _, a as r, c as b, r as i, g as n, F as x, f as u, b as A, w as p, S as I, e as t, t as T, k as E, _ as S, l as w, m as F, p as M } from "./mitt-Cj---5fy.js";
2
- import { G as P } from "./style-n4UQjvXd.js";
3
- import { a as U, b as H, c as $, T as N, d as W, e as c, _ as L, C as G } from "./SelectField.vue_vue_type_style_index_0_lang-DH_el7cy.js";
4
- import { _ as O } from "./_.vue_vue_type_style_index_0_lang-BdANnGTG.js";
5
- import { A as D } from "./ActionField-CjB94ywQ.js";
6
- const j = { class: "konnectio-cancel-reservation-form" }, q = /* @__PURE__ */ C({
7
- __name: "CancelReservationForm",
8
- setup(d) {
9
- const { t: e } = y(), { display: s } = U(), { cancelReservation: m } = H(), h = A(() => [
10
- {
11
- label: e("cancelReservation.cancellationReasonRegret"),
12
- value: c.Regret
13
- },
14
- {
15
- label: e("cancelReservation.cancellationReasonMistake"),
16
- value: c.BookingMistake
17
- },
18
- {
19
- label: e("cancelReservation.cancellationReasonSickness"),
20
- value: c.Sickness
21
- },
22
- {
23
- label: e("cancelReservation.cancellationReasonTestBooking"),
24
- value: c.TestBooking
25
- },
26
- {
27
- label: e("cancelReservation.cancellationReasonBadWeather"),
28
- value: c.BadWeather
29
- },
30
- {
31
- label: e("cancelReservation.cancellationReasonOther"),
32
- value: c.Other
33
- }
34
- ]), o = i(""), R = i(void 0), f = i(""), v = i(!1), k = i(!1);
35
- function B() {
36
- if (o.value === "") {
37
- s({
38
- message: e("alert.error.reservationIdEmpty"),
39
- type: "error"
40
- });
41
- return;
42
- }
43
- k.value = !0;
44
- }
45
- function V() {
46
- m({
47
- id: o.value,
48
- reason: R.value,
49
- remark: f.value
50
- }), k.value = !1;
51
- }
52
- return (le, a) => (r(), _("form", j, [
53
- k.value ? (r(), _(x, { key: 1 }, [
54
- u($, {
55
- modelValue: R.value,
56
- "onUpdate:modelValue": a[2] || (a[2] = (l) => R.value = l),
57
- label: n(e)("cancelReservation.reasonLabel"),
58
- placeholder: n(e)("cancelReservation.reasonPlaceholder"),
59
- options: h.value,
60
- searchable: !1,
61
- icon: "ban"
62
- }, null, 8, ["modelValue", "label", "placeholder", "options"]),
63
- u(N, {
64
- modelValue: f.value,
65
- "onUpdate:modelValue": a[3] || (a[3] = (l) => f.value = l),
66
- type: "textarea",
67
- name: "remark",
68
- label: n(e)("cancelReservation.remarkLabel"),
69
- icon: "info-circle",
70
- placeholder: n(e)("cancelReservation.remarkPlaceholder")
71
- }, null, 8, ["modelValue", "label", "placeholder"]),
72
- u(W, {
73
- label: n(e)("cancelReservation.confirmCancellationButton"),
74
- "full-width": !0,
75
- disabled: !1,
76
- "is-loading": v.value,
77
- "onUpdate:isLoading": a[4] || (a[4] = (l) => v.value = l),
78
- onClickEvent: V
79
- }, null, 8, ["label", "is-loading"])
80
- ], 64)) : (r(), b(D, {
81
- key: 0,
82
- modelValue: o.value,
83
- "onUpdate:modelValue": a[0] || (a[0] = (l) => o.value = l),
84
- icon: "octagon-check",
85
- label: n(e)("cancelReservation.reservationIdLabel"),
86
- buttonLabel: n(e)("cancelReservation.checkReservationIdButton"),
87
- placeholder: n(e)("cancelReservation.reservationIdPlaceholder"),
88
- "is-loading": v.value,
89
- "onUpdate:isLoading": a[1] || (a[1] = (l) => v.value = l),
90
- onAction: B
91
- }, null, 8, ["modelValue", "label", "buttonLabel", "placeholder", "is-loading"]))
92
- ]));
93
- }
94
- }), z = /* @__PURE__ */ L(q, [["__scopeId", "data-v-042c89f5"]]), J = { class: "konnectio-cancel-reservation-module" }, K = { class: "konnectio-cancel-reservation-title" }, Q = ["innerHTML"], X = { class: "konnectio-cancel-reservation-main" }, Y = /* @__PURE__ */ C({
95
- name: "CancelReservationLayout",
96
- __name: "CancelReservation",
97
- props: {
98
- accessToken: {},
99
- styling: {}
100
- },
101
- setup(d) {
102
- const { t: e } = y(), s = d, m = A(() => ({
103
- panelMaxWidth: "800px",
104
- ...s.styling
105
- }));
106
- return (h, o) => (r(), b(G, { styling: m.value }, {
107
- default: p(() => [
108
- (r(), b(I, null, {
109
- default: p(() => [
110
- t("div", null, [
111
- u(O, { "access-token": d.accessToken }, {
112
- default: p(() => [
113
- t("div", J, [
114
- t("h2", K, [
115
- t("span", null, T(n(e)("cancelReservation.title")), 1)
116
- ]),
117
- t("div", {
118
- innerHTML: n(e)("cancelReservation.cancellationNotice"),
119
- class: "konnectio-cancel-reservation-description"
120
- }, null, 8, Q),
121
- t("div", X, [
122
- u(z)
123
- ])
124
- ])
125
- ]),
126
- _: 1
127
- }, 8, ["access-token"])
128
- ])
129
- ]),
130
- fallback: p(() => [...o[0] || (o[0] = [
131
- t("div", null, null, -1)
132
- ])]),
133
- _: 1
134
- }))
135
- ]),
136
- _: 1
137
- }, 8, ["styling"]));
138
- }
139
- }), g = /* @__PURE__ */ L(Y, [["__scopeId", "data-v-8f3d2709"]]), Z = E(), ee = S, ae = ee();
140
- class ne extends HTMLElement {
141
- vueApp;
142
- constructor() {
143
- super();
144
- }
145
- disconnectedCallback() {
146
- this.vueApp.unmount();
147
- }
148
- connectedCallback() {
149
- const e = w(g, this.attributes);
150
- this.vueApp = F(g, e), this.vueApp.provide("emitter", ae), this.vueApp.use(M), this.vueApp.use(Z), this.vueApp.use(P);
151
- const s = document.createElement("div");
152
- this.vueApp.mount(s), this.appendChild(s.children[0]);
153
- }
154
- }
155
- window.customElements.define("konnectio-cancel-reservation", ne);
156
- export {
157
- ne as default
1
+ import { At as e, D as t, E as n, Et as r, M as i, P as a, S as o, T as s, Y as c, bt as l, c as u, dt as d, k as f, o as p, p as m, r as h, s as g, t as _, x as v } from "./mitt-DrOLO7f9.js";
2
+ import { $ as y, M as b, O as x, S, b as C, n as w, t as T, v as E } from "./SelectField-BYcZ8xUa.js";
3
+ import { t as D } from "./_-BZTN6PmS.js";
4
+ import { t as O } from "./style-CCnDB_V1.js";
5
+ import { t as k } from "./ActionField-CCjWElNQ.js";
6
+ //#region src/components/forms/CancelReservationForm.vue?vue&type=script&setup=true&lang.ts
7
+ var A = { class: "konnectio-cancel-reservation-form" }, j = /* @__PURE__ */ S(/* @__PURE__ */ a({
8
+ __name: "CancelReservationForm",
9
+ setup(e) {
10
+ let { t: n } = p(), { display: a } = b(), { cancelReservation: o } = x(), u = s(() => [
11
+ {
12
+ label: n("cancelReservation.cancellationReasonRegret"),
13
+ value: y.Regret
14
+ },
15
+ {
16
+ label: n("cancelReservation.cancellationReasonMistake"),
17
+ value: y.BookingMistake
18
+ },
19
+ {
20
+ label: n("cancelReservation.cancellationReasonSickness"),
21
+ value: y.Sickness
22
+ },
23
+ {
24
+ label: n("cancelReservation.cancellationReasonTestBooking"),
25
+ value: y.TestBooking
26
+ },
27
+ {
28
+ label: n("cancelReservation.cancellationReasonBadWeather"),
29
+ value: y.BadWeather
30
+ },
31
+ {
32
+ label: n("cancelReservation.cancellationReasonOther"),
33
+ value: y.Other
34
+ }
35
+ ]), d = l(""), m = l(void 0), h = l(""), g = l(!1), _ = l(!1);
36
+ function S() {
37
+ if (d.value === "") {
38
+ a({
39
+ message: n("alert.error.reservationIdEmpty"),
40
+ type: "error"
41
+ });
42
+ return;
43
+ }
44
+ _.value = !0;
45
+ }
46
+ function C() {
47
+ o({
48
+ id: d.value,
49
+ reason: m.value,
50
+ remark: h.value
51
+ }), _.value = !1;
52
+ }
53
+ return (e, a) => (c(), f("form", A, [_.value ? (c(), f(v, { key: 1 }, [
54
+ i(T, {
55
+ modelValue: m.value,
56
+ "onUpdate:modelValue": a[2] ||= (e) => m.value = e,
57
+ label: r(n)("cancelReservation.reasonLabel"),
58
+ placeholder: r(n)("cancelReservation.reasonPlaceholder"),
59
+ options: u.value,
60
+ searchable: !1,
61
+ icon: "ban"
62
+ }, null, 8, [
63
+ "modelValue",
64
+ "label",
65
+ "placeholder",
66
+ "options"
67
+ ]),
68
+ i(w, {
69
+ modelValue: h.value,
70
+ "onUpdate:modelValue": a[3] ||= (e) => h.value = e,
71
+ type: "textarea",
72
+ name: "remark",
73
+ label: r(n)("cancelReservation.remarkLabel"),
74
+ icon: "info-circle",
75
+ placeholder: r(n)("cancelReservation.remarkPlaceholder")
76
+ }, null, 8, [
77
+ "modelValue",
78
+ "label",
79
+ "placeholder"
80
+ ]),
81
+ i(E, {
82
+ label: r(n)("cancelReservation.confirmCancellationButton"),
83
+ "full-width": !0,
84
+ disabled: !1,
85
+ "is-loading": g.value,
86
+ "onUpdate:isLoading": a[4] ||= (e) => g.value = e,
87
+ onClickEvent: C
88
+ }, null, 8, ["label", "is-loading"])
89
+ ], 64)) : (c(), t(k, {
90
+ key: 0,
91
+ modelValue: d.value,
92
+ "onUpdate:modelValue": a[0] ||= (e) => d.value = e,
93
+ icon: "octagon-check",
94
+ label: r(n)("cancelReservation.reservationIdLabel"),
95
+ buttonLabel: r(n)("cancelReservation.checkReservationIdButton"),
96
+ placeholder: r(n)("cancelReservation.reservationIdPlaceholder"),
97
+ "is-loading": g.value,
98
+ "onUpdate:isLoading": a[1] ||= (e) => g.value = e,
99
+ onAction: S
100
+ }, null, 8, [
101
+ "modelValue",
102
+ "label",
103
+ "buttonLabel",
104
+ "placeholder",
105
+ "is-loading"
106
+ ]))]));
107
+ }
108
+ }), [["__scopeId", "data-v-8e11fd35"]]), M = { class: "konnectio-cancel-reservation-module" }, N = { class: "konnectio-cancel-reservation-title" }, P = ["innerHTML"], F = { class: "konnectio-cancel-reservation-main" }, I = /* @__PURE__ */ S(/* @__PURE__ */ a({
109
+ name: "CancelReservationLayout",
110
+ __name: "CancelReservation",
111
+ props: {
112
+ accessToken: {},
113
+ styling: {}
114
+ },
115
+ setup(a) {
116
+ let { t: l } = p(), u = a, f = s(() => ({
117
+ panelMaxWidth: "800px",
118
+ ...u.styling
119
+ }));
120
+ return (s, u) => (c(), t(C, { styling: f.value }, {
121
+ default: d(() => [(c(), t(o, null, {
122
+ default: d(() => [n("div", null, [i(D, { "access-token": a.accessToken }, {
123
+ default: d(() => [n("div", M, [
124
+ n("h2", N, [n("span", null, e(r(l)("cancelReservation.title")), 1)]),
125
+ n("div", {
126
+ innerHTML: r(l)("cancelReservation.cancellationNotice"),
127
+ class: "konnectio-cancel-reservation-description"
128
+ }, null, 8, P),
129
+ n("div", F, [i(j)])
130
+ ])]),
131
+ _: 1
132
+ }, 8, ["access-token"])])]),
133
+ fallback: d(() => [...u[0] ||= [n("div", null, null, -1)]]),
134
+ _: 1
135
+ }))]),
136
+ _: 1
137
+ }, 8, ["styling"]));
138
+ }
139
+ }), [["__scopeId", "data-v-6270ad61"]]), L = u(), R = _(), z = class extends HTMLElement {
140
+ vueApp;
141
+ constructor() {
142
+ super();
143
+ }
144
+ disconnectedCallback() {
145
+ this.vueApp.unmount();
146
+ }
147
+ connectedCallback() {
148
+ let e = g(I, this.attributes);
149
+ this.vueApp = m(I, e), this.vueApp.provide("emitter", R), this.vueApp.use(h), this.vueApp.use(L), this.vueApp.use(O);
150
+ let t = document.createElement("div");
151
+ this.vueApp.mount(t), this.appendChild(t.children[0]);
152
+ }
158
153
  };
159
- //# sourceMappingURL=cancel-reservation.js.map
154
+ window.customElements.define("konnectio-cancel-reservation", z);
155
+ //#endregion
156
+ export { z as default };
Binary file
Binary file