@konnectio/core 4.11.3 → 4.11.5

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 (101) hide show
  1. package/dist/{ActionField-dg0RS8gf.js → ActionField-DBxduvRT.js} +1 -1
  2. package/dist/ActionField-DBxduvRT.js.br +0 -0
  3. package/dist/ActionField-DBxduvRT.js.gz +0 -0
  4. package/dist/{AvailabilitySkeleton-uoeeP_5d.js → AvailabilitySkeleton-DoVzHCoF.js} +2 -2
  5. package/dist/AvailabilitySkeleton-DoVzHCoF.js.br +0 -0
  6. package/dist/AvailabilitySkeleton-DoVzHCoF.js.gz +0 -0
  7. package/dist/{CheckoutWindow-DXRVoh-J.js → CheckoutWindow-CJq8smYV.js} +4 -4
  8. package/dist/CheckoutWindow-CJq8smYV.js.br +0 -0
  9. package/dist/CheckoutWindow-CJq8smYV.js.gz +0 -0
  10. package/dist/{ErrorMessage-OQ4r9QGR.js → ErrorMessage-voedvcXr.js} +1 -1
  11. package/dist/ErrorMessage-voedvcXr.js.br +0 -0
  12. package/dist/ErrorMessage-voedvcXr.js.gz +0 -0
  13. package/dist/{EventAvailabilityForm-B4pOCkcm.js → EventAvailabilityForm-BjLCcN_W.js} +2 -2
  14. package/dist/EventAvailabilityForm-BjLCcN_W.js.br +0 -0
  15. package/dist/EventAvailabilityForm-BjLCcN_W.js.gz +0 -0
  16. package/dist/{Field-DpRx5gtJ.js → Field-2Hbk9ahl.js} +1 -1
  17. package/dist/Field-2Hbk9ahl.js.br +0 -0
  18. package/dist/Field-2Hbk9ahl.js.gz +0 -0
  19. package/dist/{HotelAvailabilityForm-BSM-KcqG.js → HotelAvailabilityForm-v-z9AFWI.js} +2 -2
  20. package/dist/HotelAvailabilityForm-v-z9AFWI.js.br +0 -0
  21. package/dist/HotelAvailabilityForm-v-z9AFWI.js.gz +0 -0
  22. package/dist/{SelectField-CEEffgaQ.js → SelectField-w9Labj2W.js} +2913 -2907
  23. package/dist/SelectField-w9Labj2W.js.br +0 -0
  24. package/dist/SelectField-w9Labj2W.js.gz +0 -0
  25. package/dist/{TermsOfService-C4YZ5zhE.js → TermsOfService-D8q2gi5I.js} +2 -2
  26. package/dist/TermsOfService-D8q2gi5I.js.br +0 -0
  27. package/dist/TermsOfService-D8q2gi5I.js.gz +4 -0
  28. package/dist/{_-DM-h5BQz.js → _-Cpgd04rM.js} +1 -1
  29. package/dist/_-Cpgd04rM.js.br +0 -0
  30. package/dist/_-Cpgd04rM.js.gz +0 -0
  31. package/dist/availability.js +7 -7
  32. package/dist/availability.js.br +0 -0
  33. package/dist/availability.js.gz +0 -0
  34. package/dist/cancel-reservation.js +4 -4
  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/{dist-BQy2-bMP.js → dist-0CoL4k9r.js} +4 -4
  41. package/dist/dist-0CoL4k9r.js.br +0 -0
  42. package/dist/dist-0CoL4k9r.js.gz +0 -0
  43. package/dist/{dist-Q9kXoafy.js → dist-Drv0vus3.js} +2 -2
  44. package/dist/dist-Drv0vus3.js.br +0 -0
  45. package/dist/dist-Drv0vus3.js.gz +0 -0
  46. package/dist/event.js +10 -10
  47. package/dist/event.js.br +0 -0
  48. package/dist/event.js.gz +0 -0
  49. package/dist/gift-card-validation.js +7 -7
  50. package/dist/gift-card-validation.js.br +0 -0
  51. package/dist/gift-card-validation.js.gz +0 -0
  52. package/dist/gift-card.js +182 -83
  53. package/dist/gift-card.js.br +0 -0
  54. package/dist/gift-card.js.gz +0 -0
  55. package/dist/giftCard-6oDMPMDe.js +134 -0
  56. package/dist/giftCard-6oDMPMDe.js.br +0 -0
  57. package/dist/giftCard-6oDMPMDe.js.gz +0 -0
  58. package/dist/hotel.js +145 -145
  59. package/dist/hotel.js.br +0 -0
  60. package/dist/hotel.js.gz +0 -0
  61. package/dist/polyfill.js +1 -1
  62. package/dist/polyfill.js.br +0 -0
  63. package/dist/polyfill.js.gz +0 -0
  64. package/dist/{style-xK2dve9W.js → style-BJBxZSi0.js} +1 -1
  65. package/dist/style-BJBxZSi0.js.br +0 -0
  66. package/dist/style-BJBxZSi0.js.gz +0 -0
  67. package/dist-wix/availability.js +2 -2
  68. package/dist-wix/event.js +2 -2
  69. package/dist-wix/gift-card-validation.js +23 -23
  70. package/dist-wix/gift-card.js +37 -37
  71. package/dist-wix/hotel.js +4 -4
  72. package/package.json +1 -1
  73. package/dist/ActionField-dg0RS8gf.js.br +0 -0
  74. package/dist/ActionField-dg0RS8gf.js.gz +0 -0
  75. package/dist/AvailabilitySkeleton-uoeeP_5d.js.br +0 -0
  76. package/dist/AvailabilitySkeleton-uoeeP_5d.js.gz +0 -0
  77. package/dist/CheckoutWindow-DXRVoh-J.js.br +0 -0
  78. package/dist/CheckoutWindow-DXRVoh-J.js.gz +0 -0
  79. package/dist/ErrorMessage-OQ4r9QGR.js.br +0 -0
  80. package/dist/ErrorMessage-OQ4r9QGR.js.gz +0 -0
  81. package/dist/EventAvailabilityForm-B4pOCkcm.js.br +0 -0
  82. package/dist/EventAvailabilityForm-B4pOCkcm.js.gz +0 -0
  83. package/dist/Field-DpRx5gtJ.js.br +0 -0
  84. package/dist/Field-DpRx5gtJ.js.gz +0 -0
  85. package/dist/HotelAvailabilityForm-BSM-KcqG.js.br +0 -0
  86. package/dist/HotelAvailabilityForm-BSM-KcqG.js.gz +0 -0
  87. package/dist/SelectField-CEEffgaQ.js.br +0 -0
  88. package/dist/SelectField-CEEffgaQ.js.gz +0 -0
  89. package/dist/TermsOfService-C4YZ5zhE.js.br +0 -0
  90. package/dist/TermsOfService-C4YZ5zhE.js.gz +0 -0
  91. package/dist/_-DM-h5BQz.js.br +0 -0
  92. package/dist/_-DM-h5BQz.js.gz +0 -0
  93. package/dist/dist-BQy2-bMP.js.br +0 -0
  94. package/dist/dist-BQy2-bMP.js.gz +0 -0
  95. package/dist/dist-Q9kXoafy.js.br +0 -0
  96. package/dist/dist-Q9kXoafy.js.gz +0 -0
  97. package/dist/giftCard-DO4ELDIx.js +0 -113
  98. package/dist/giftCard-DO4ELDIx.js.br +0 -0
  99. package/dist/giftCard-DO4ELDIx.js.gz +0 -0
  100. package/dist/style-xK2dve9W.js.br +0 -0
  101. package/dist/style-xK2dve9W.js.gz +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@konnectio/core",
3
- "version": "4.11.3",
3
+ "version": "4.11.5",
4
4
  "author": "Konnectio <info@konnectio.com> (https://konnectio.com)",
5
5
  "homepage": "https://konnectio.com",
6
6
  "repository": {
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -1,113 +0,0 @@
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
- var m = r("giftCard", () => {
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
- base64: "",
7
- type: "",
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 ?? ""), 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
- let e = {
11
- 1: {
12
- label: a.t("giftCard.hotelType"),
13
- data: []
14
- },
15
- 2: {
16
- label: a.t("giftCard.restaurantType"),
17
- data: []
18
- }
19
- }, t = h.value.hotels?.[0]?.places;
20
- return t && t.forEach((t) => {
21
- e[t.placeType].data.push(t);
22
- }), Object.fromEntries(Object.entries(e).filter(([, e]) => e.data.length > 0));
23
- }), R = e(() => j.value !== 0), z = e(() => {
24
- let e;
25
- if (R.value) e = L.value[j.value]?.data[0];
26
- else if (k.value !== 0) {
27
- let t = O.value, n = L.value[k.value]?.data ?? [];
28
- n.length === 1 ? e = n[0] : t !== void 0 && n.forEach((n) => {
29
- String(n.id) === String(t) && (e = n);
30
- });
31
- }
32
- return e;
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
- async function U() {
35
- try {
36
- let e = (await s().get("/gift-card/metadata", { params: { language: c() } })).data;
37
- e.success === void 0 ? _.value = !1 : _.value = !e.success, h.value = e;
38
- } catch {
39
- m({
40
- message: a.t("alert.error.couldntFetchMetadata"),
41
- type: "warning"
42
- });
43
- }
44
- }
45
- function W() {
46
- return {
47
- termsOfserviceURL: window.location.origin,
48
- checkoutUrl: window.location.origin,
49
- currencyID: g.value,
50
- language: c(),
51
- amount: C.value,
52
- quantity: w.value,
53
- freeText: E.value,
54
- showPrice: T.value,
55
- contactName: b.value,
56
- contactEmail: x.value,
57
- contactPhone: S.value,
58
- imageBase64: l(D.value.base64),
59
- imageName: D.value.name,
60
- imageFormat: D.value.type,
61
- placeType: z.value ? z.value.placeType : void 0,
62
- placeID: z.value ? z.value.id : void 0
63
- };
64
- }
65
- async function G() {
66
- y.value = u.WaitingForResponse, A.value = !0;
67
- try {
68
- let e = await s().post("/gift-card/create", W());
69
- y.value = u.ReadyToPay, A.value = !1, r({
70
- callback: (e) => {
71
- e === 2 && (y.value = u.PaymentSuccess);
72
- },
73
- response: e.data,
74
- enableHostedRedirect: !0
75
- });
76
- return;
77
- } catch (e) {
78
- if (A.value = !1, y.value = u.InitialState, e?.response?.status === 422) return e.response.data.errors;
79
- throw e;
80
- }
81
- }
82
- function K(e) {
83
- e && (j.value = e);
84
- }
85
- return {
86
- selectedPlace: z,
87
- moduleState: y,
88
- name: b,
89
- email: x,
90
- phone: S,
91
- value: C,
92
- remark: E,
93
- showValue: T,
94
- quantity: w,
95
- media: D,
96
- placeId: O,
97
- placeType: k,
98
- showFormPage: P,
99
- showPaymentPage: F,
100
- showConfirmationPage: I,
101
- places: L,
102
- hasFilledForm: B,
103
- hasForcedPlaceType: R,
104
- isWaitingForResponse: H,
105
- isMetadataAvailable: V,
106
- termsOfService: N,
107
- fetchMetadata: U,
108
- giftCardPayload: W,
109
- orderGiftCard: G,
110
- initialize: K
111
- };
112
- });
113
- export { m as t };
Binary file
Binary file
Binary file
Binary file