gather-vue 8.6.0

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 (178) hide show
  1. package/README.md +64 -0
  2. package/dist/.htaccess +1 -0
  3. package/dist/App-B7KWoHRH.js +160 -0
  4. package/dist/App-B7KWoHRH.js.gz +0 -0
  5. package/dist/App-C03tW0-W.js +405 -0
  6. package/dist/App-C03tW0-W.js.gz +0 -0
  7. package/dist/BannerExample-CRj1iMwh.js +77 -0
  8. package/dist/BannerExample-CRj1iMwh.js.gz +0 -0
  9. package/dist/BannerExample-DLN6d9M0.js +84 -0
  10. package/dist/BannerExample-DLN6d9M0.js.gz +0 -0
  11. package/dist/CallToAction-BbJ-zDFa.js +3493 -0
  12. package/dist/CallToAction-BbJ-zDFa.js.gz +0 -0
  13. package/dist/CallToAction-jAi8aaI-.js +35 -0
  14. package/dist/CallToAction-jAi8aaI-.js.gz +0 -0
  15. package/dist/Card-B1Pdd5BL.js +202 -0
  16. package/dist/Card-B1Pdd5BL.js.gz +0 -0
  17. package/dist/Card-qMo1jrfb.js +699 -0
  18. package/dist/Card-qMo1jrfb.js.gz +0 -0
  19. package/dist/CloseCardButton-CL_3xkAF.js +71 -0
  20. package/dist/CloseCardButton-CL_3xkAF.js.gz +0 -0
  21. package/dist/Editor-DXSZFkEM.js +149 -0
  22. package/dist/Editor-DXSZFkEM.js.gz +0 -0
  23. package/dist/EmailExistsView-CX1ijN0R.js +72 -0
  24. package/dist/EmailExistsView-CX1ijN0R.js.gz +0 -0
  25. package/dist/EmailInvitation-BVFicmrK.js +22 -0
  26. package/dist/EmailView-DdaSnKFq.js +84 -0
  27. package/dist/EmailView-DdaSnKFq.js.gz +0 -0
  28. package/dist/FriendBannerExample-C8QmPZyP.js +76 -0
  29. package/dist/FriendBannerExample-C8QmPZyP.js.gz +0 -0
  30. package/dist/FriendConfirmation-B-RemAoP.js +22 -0
  31. package/dist/FriendForm-CunLFX_H.js +255 -0
  32. package/dist/FriendForm-CunLFX_H.js.gz +0 -0
  33. package/dist/FriendOptIn-bp4udUYv.js +27 -0
  34. package/dist/FriendPending-cFjgyL8g.js +22 -0
  35. package/dist/FriendPitch-BhSs2eLR.js +19 -0
  36. package/dist/FriendPitch-CAS1c3Co.js +33 -0
  37. package/dist/FriendSuccess-uxEdomAY.js +22 -0
  38. package/dist/Invitations-hprUCIvW.js +27 -0
  39. package/dist/InviteRoot-Dima8d2G.js +252 -0
  40. package/dist/InviteRoot-Dima8d2G.js.gz +0 -0
  41. package/dist/LaunchButton-BQw42WVn.js +18 -0
  42. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js +103 -0
  43. package/dist/MazBtn.1qp5aQ4N-DU0ii1Xr.js.gz +0 -0
  44. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js +149 -0
  45. package/dist/MazCheckbox.UAnkvAoS-pse3PCQf.js.gz +0 -0
  46. package/dist/MazIcon.B5hPzeLk-C20gse35.js +103 -0
  47. package/dist/MazIcon.B5hPzeLk-C20gse35.js.gz +0 -0
  48. package/dist/MazPhoneNumberInput-Cz50Ts4U.js +4751 -0
  49. package/dist/MazPhoneNumberInput-Cz50Ts4U.js.gz +0 -0
  50. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js +34 -0
  51. package/dist/MazSpinner.DZT5jj-c-y1IYJMcd.js.gz +0 -0
  52. package/dist/Menu-BsKr40BO.js +21377 -0
  53. package/dist/Menu-BsKr40BO.js.gz +0 -0
  54. package/dist/Message-D4PAgcHO.js +22 -0
  55. package/dist/MessageCard-CC74qCir.js +74 -0
  56. package/dist/MessageCard-CC74qCir.js.gz +0 -0
  57. package/dist/MessageView-BKAIrwj7.js +88 -0
  58. package/dist/MessageView-BKAIrwj7.js.gz +0 -0
  59. package/dist/PendingApprovalCard-Dzs0UxBO.js +48 -0
  60. package/dist/PendingApprovalCard-Dzs0UxBO.js.gz +0 -0
  61. package/dist/PendingApprovalView-V-OUYSnK.js +33 -0
  62. package/dist/ReferralButton-CEue5qud.js +18 -0
  63. package/dist/ReferralFailedView-3Ua13t4V.js +74 -0
  64. package/dist/ReferralFailedView-3Ua13t4V.js.gz +0 -0
  65. package/dist/ReferredConfirmCard-iwgkcZCm.js +48 -0
  66. package/dist/ReferredConfirmCard-iwgkcZCm.js.gz +0 -0
  67. package/dist/ReferredConfirmView-DS1RNBwP.js +33 -0
  68. package/dist/ReferredSuccessCard-Dg-a4FYr.js +209 -0
  69. package/dist/ReferredSuccessCard-Dg-a4FYr.js.gz +0 -0
  70. package/dist/ReferredSuccessView-ChVztlUr.js +33 -0
  71. package/dist/ReferredView-7HezoVIA.js +98 -0
  72. package/dist/ReferredView-7HezoVIA.js.gz +0 -0
  73. package/dist/RewardCard-CwU2X2Yo.js +197 -0
  74. package/dist/RewardCard-CwU2X2Yo.js.gz +0 -0
  75. package/dist/Rewards-DdyEwCyy.js +27 -0
  76. package/dist/RewardsRoot-CnQfyjC6.js +198 -0
  77. package/dist/RewardsRoot-CnQfyjC6.js.gz +0 -0
  78. package/dist/Root-bUfnZpPP.js +17 -0
  79. package/dist/ShareInvitation-SAgC-8YA.js +22 -0
  80. package/dist/SignIn-CroW3mY6.js +36 -0
  81. package/dist/SignIn-CroW3mY6.js.gz +0 -0
  82. package/dist/SignIn-g32Hg2or.js +17 -0
  83. package/dist/SignInTextArea-DBRk6x09.js +17 -0
  84. package/dist/SignUpFormCard-Cail4V4M.js +287 -0
  85. package/dist/SignUpFormCard-Cail4V4M.js.gz +0 -0
  86. package/dist/SignUpView-a7LPgEeX.js +368 -0
  87. package/dist/SignUpView-a7LPgEeX.js.gz +0 -0
  88. package/dist/SignUpView-uujOX5hN.js +103 -0
  89. package/dist/SignUpView-uujOX5hN.js.gz +0 -0
  90. package/dist/SocialView-CbBZTB7Z.js +87 -0
  91. package/dist/SocialView-CbBZTB7Z.js.gz +0 -0
  92. package/dist/Stats-DtS-GXsI.js +22 -0
  93. package/dist/StatsView-fX-VznRc.js +90 -0
  94. package/dist/StatsView-fX-VznRc.js.gz +0 -0
  95. package/dist/Success-k06CZz0K.js +40 -0
  96. package/dist/Success-k06CZz0K.js.gz +0 -0
  97. package/dist/SuccessCard-C1iF1j2W.js +219 -0
  98. package/dist/SuccessCard-C1iF1j2W.js.gz +0 -0
  99. package/dist/SuccessView-CDUVkpSQ.js +77 -0
  100. package/dist/SuccessView-CDUVkpSQ.js.gz +0 -0
  101. package/dist/TextArea-DFfa9A93.js +17 -0
  102. package/dist/TextAreaCard-D_VfEHME.js +34 -0
  103. package/dist/TextAreaCard-D_VfEHME.js.gz +0 -0
  104. package/dist/UserView-DnD929IT.js +96 -0
  105. package/dist/UserView-DnD929IT.js.gz +0 -0
  106. package/dist/WhatsAppShare-B40Ouvds.js +59 -0
  107. package/dist/WhatsAppShare-B40Ouvds.js.gz +0 -0
  108. package/dist/agent-session-Xh6dZlhc.js +298 -0
  109. package/dist/agent-session-Xh6dZlhc.js.gz +0 -0
  110. package/dist/aggregate-base-C6N8Ymd5.js +830 -0
  111. package/dist/aggregate-base-C6N8Ymd5.js.gz +0 -0
  112. package/dist/bel-serializer-DMbFBZ6U.js +51 -0
  113. package/dist/bel-serializer-DMbFBZ6U.js.gz +0 -0
  114. package/dist/browser-q7cvfJ-2.js +366 -0
  115. package/dist/browser-q7cvfJ-2.js.gz +0 -0
  116. package/dist/cart.js +5 -0
  117. package/dist/cart.js.gz +0 -0
  118. package/dist/check.C9Q_W85g-DmgtOx7Q.js +30 -0
  119. package/dist/chevron-down.BkvtON3b-RNrTKYcy.js +30 -0
  120. package/dist/content-5VAQ1vQ0.js +4 -0
  121. package/dist/event-origin-BSW5uum9.js +13 -0
  122. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js +4 -0
  123. package/dist/examples.mobile.json.tW3aL0qI-tW3aL0qI.js.gz +0 -0
  124. package/dist/eye-slash.BoO00xzs-CULY_lvM.js +30 -0
  125. package/dist/eye.f8zAUc30-Yr89kafZ.js +43 -0
  126. package/dist/eye.f8zAUc30-Yr89kafZ.js.gz +0 -0
  127. package/dist/favicon.ico +0 -0
  128. package/dist/first-paint-B61SrVKm.js +453 -0
  129. package/dist/first-paint-B61SrVKm.js.gz +0 -0
  130. package/dist/gather-vue.css +5 -0
  131. package/dist/gather-vue.css.gz +0 -0
  132. package/dist/gather-widget.es.js +5 -0
  133. package/dist/gather-widget.umd.js +263 -0
  134. package/dist/gather-widget.umd.js.gz +0 -0
  135. package/dist/gather_widget.css +58 -0
  136. package/dist/gather_widget.css.gz +0 -0
  137. package/dist/gather_widget.js +72 -0
  138. package/dist/gather_widget.js.gz +0 -0
  139. package/dist/iframe-BELrOJ1p.js +6 -0
  140. package/dist/index-3lvNtPTE.js +327 -0
  141. package/dist/index-3lvNtPTE.js.gz +0 -0
  142. package/dist/index-BDyGxL1x.js +255 -0
  143. package/dist/index-BDyGxL1x.js.gz +0 -0
  144. package/dist/index-BF9haAFD.js +343 -0
  145. package/dist/index-BF9haAFD.js.gz +0 -0
  146. package/dist/index-BMIST_QA.js +128 -0
  147. package/dist/index-BMIST_QA.js.gz +0 -0
  148. package/dist/index-BdWnMhAc.js +235 -0
  149. package/dist/index-BdWnMhAc.js.gz +0 -0
  150. package/dist/index-BioZsJbf.js +190 -0
  151. package/dist/index-BioZsJbf.js.gz +0 -0
  152. package/dist/index-BzOcD8v-.js +166 -0
  153. package/dist/index-BzOcD8v-.js.gz +0 -0
  154. package/dist/index-C8pB9mUQ.js +147 -0
  155. package/dist/index-C8pB9mUQ.js.gz +0 -0
  156. package/dist/index-C_ougoWd.js +426 -0
  157. package/dist/index-C_ougoWd.js.gz +0 -0
  158. package/dist/index-CoRlIGDo.js +513 -0
  159. package/dist/index-CoRlIGDo.js.gz +0 -0
  160. package/dist/index-CyWBxUBS.js +291 -0
  161. package/dist/index-CyWBxUBS.js.gz +0 -0
  162. package/dist/index-DijQHge7.js +325 -0
  163. package/dist/index-DijQHge7.js.gz +0 -0
  164. package/dist/magnifying-glass.-nBiyXot-CuA_mltt.js +30 -0
  165. package/dist/main-DPldah1M.js +40243 -0
  166. package/dist/main-DPldah1M.js.gz +0 -0
  167. package/dist/nav-timing-B-TNQpyK.js +31 -0
  168. package/dist/nav-timing-B-TNQpyK.js.gz +0 -0
  169. package/dist/no-photography.BJX8HSus-BJX8HSus.js +4 -0
  170. package/dist/no-symbol.CIgKzsrB-3PuxVsDY.js +30 -0
  171. package/dist/recorder-PHZWRV-S.js +8271 -0
  172. package/dist/recorder-PHZWRV-S.js.gz +0 -0
  173. package/dist/stylesheet-evaluator-B4P289vW.js +86 -0
  174. package/dist/stylesheet-evaluator-B4P289vW.js.gz +0 -0
  175. package/dist/time-to-first-byte-kiwh1xjs.js +29 -0
  176. package/dist/traverse-Bw4y1x4D.js +8 -0
  177. package/dist/type-check-Bp684oBR.js +6 -0
  178. package/package.json +89 -0
@@ -0,0 +1,287 @@
1
+ import { defineComponent as Y, resolveComponent as m, createElementBlock as d, openBlock as s, withModifiers as x, createCommentVNode as p, createBlock as h, createVNode as c, toDisplayString as $, normalizeClass as C, Fragment as Q, renderList as R, withCtx as v, createTextVNode as W } from "vue";
2
+ import { a as l, a1 as ee, a4 as X, a2 as ne, a3 as oe, aD as te, _ as Z, C as re } from "./main-DPldah1M.js";
3
+ import { u as ie } from "./index-CoRlIGDo.js";
4
+ import { C as se } from "./CloseCardButton-CL_3xkAF.js";
5
+ const ae = Y({
6
+ name: "SignUpForm",
7
+ data: () => ({
8
+ form: {
9
+ name: "",
10
+ email: "",
11
+ phone: "",
12
+ formattedNumber: "",
13
+ validNumber: !0,
14
+ select: void 0
15
+ },
16
+ phoneFocused: !1,
17
+ sending: !1
18
+ }),
19
+ setup() {
20
+ return {
21
+ v$: ie()
22
+ };
23
+ },
24
+ mounted() {
25
+ this.$nextTick(() => {
26
+ var e, n, o;
27
+ if (!((e = this.content) != null && e.form.email.enabled)) {
28
+ const t = `anonymous_${te().replace(/-/g, "").substring(0, 10)}@gathercustomers.com`;
29
+ this.form.email = t;
30
+ }
31
+ if (this.preFilled && (!this.form.name || !this.form.email)) {
32
+ const t = l();
33
+ this.form.name = ((n = t.preFilled) == null ? void 0 : n.name) || "", this.form.email = ((o = t.preFilled) == null ? void 0 : o.email) || this.form.email || "";
34
+ }
35
+ });
36
+ },
37
+ computed: {
38
+ content() {
39
+ var n, o, t;
40
+ return (t = (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.pop_up) == null ? void 0 : t.sign_up;
41
+ },
42
+ theme() {
43
+ var n, o;
44
+ return (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.theme;
45
+ },
46
+ errors() {
47
+ return l().errors;
48
+ },
49
+ preFilled() {
50
+ return l().preFilled;
51
+ },
52
+ nameErrors() {
53
+ return this.v$.form.name.$dirty ? this.v$.form.name.required.$invalid ? ["The name is required"] : [] : [];
54
+ },
55
+ emailErrors() {
56
+ return this.v$.form.email.$dirty ? this.v$.form.email.required.$invalid ? ["The email is required"] : this.v$.form.email.email.$invalid ? ["Invalid email"] : [] : [];
57
+ },
58
+ phoneErrors() {
59
+ var n, o, t, i, u, a;
60
+ return (a = (u = (i = (t = (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.pop_up) == null ? void 0 : t.sign_up) == null ? void 0 : i.form) == null ? void 0 : u.phone) != null && a.enabled ? this.v$.form.phone.$dirty ? this.v$.form.phone.required.$invalid ? ["The phone is required"] : this.v$.form.phone.$model && this.v$.form.phone.validPhoneNumber.$invalid ? ["The phone number is invalid"] : [] : [] : [];
61
+ },
62
+ selectErrors() {
63
+ var n, o, t, i, u;
64
+ return (u = (i = (t = (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.pop_up) == null ? void 0 : t.sign_up) == null ? void 0 : i.form) != null && u.select.enabled ? this.v$.form.select.$dirty ? this.v$.form.select.required.$invalid ? ["The value is required"] : [] : [] : [];
65
+ }
66
+ },
67
+ validations() {
68
+ var e, n, o, t, i, u, a, f, g, b, _, F, U, k, N, y;
69
+ return {
70
+ form: {
71
+ email: {
72
+ required: X,
73
+ email: oe
74
+ },
75
+ phone: ne((i = (t = (o = (n = (e = l().campaign) == null ? void 0 : e.config) == null ? void 0 : n.pop_up) == null ? void 0 : o.sign_up) == null ? void 0 : t.form) == null ? void 0 : i.phone),
76
+ name: (_ = (b = (g = (f = (a = (u = l().campaign) == null ? void 0 : u.config) == null ? void 0 : a.pop_up) == null ? void 0 : f.sign_up) == null ? void 0 : g.form) == null ? void 0 : b.name) != null && _.enabled ? { required: X } : {},
77
+ select: ee((y = (N = (k = (U = (F = l().campaign) == null ? void 0 : F.config) == null ? void 0 : U.pop_up) == null ? void 0 : k.sign_up) == null ? void 0 : N.form) == null ? void 0 : y.select)
78
+ }
79
+ };
80
+ },
81
+ methods: {
82
+ phoneNumberFocused() {
83
+ this.phoneFocused = !0;
84
+ },
85
+ phoneNumberBlur() {
86
+ this.phoneFocused = !1;
87
+ },
88
+ updateFormattedNumber(e) {
89
+ this.form.validNumber = e.isValid, this.form.formattedNumber = e.e164;
90
+ },
91
+ async validateUser() {
92
+ this.phoneFocused && !this.form.validNumber || (this.v$.$reset(), this.v$.$touch(), this.v$.$invalid || await this.saveUser());
93
+ },
94
+ async saveUser() {
95
+ var e, n, o, t, i, u;
96
+ this.sending = !0;
97
+ try {
98
+ const a = l();
99
+ await a.submitOptIn({
100
+ name: this.form.name,
101
+ email: this.form.email,
102
+ phone: this.form.formattedNumber,
103
+ select: this.form.select,
104
+ selectKey: (u = (i = (t = (o = (n = (e = a.campaign) == null ? void 0 : e.config) == null ? void 0 : n.pop_up) == null ? void 0 : o.sign_up) == null ? void 0 : t.form) == null ? void 0 : i.select) == null ? void 0 : u.key
105
+ }), a.errors.length > 0 && (this.sending = !1);
106
+ } catch (a) {
107
+ console.error(a), this.sending = !1;
108
+ }
109
+ }
110
+ }
111
+ }), le = {
112
+ key: 0,
113
+ class: "text-h5 text-center"
114
+ }, me = {
115
+ key: 1,
116
+ class: "text-subtitle-2 text-center"
117
+ }, ue = {
118
+ key: 6,
119
+ id: "vue-phone-number-input-error"
120
+ }, de = { key: 0 }, pe = { key: 1 };
121
+ function ce(e, n, o, t, i, u) {
122
+ var y, V, S, E, T, q, B, w, M, P, I, z, L, D, H, K, O, j, A, G;
123
+ const a = m("v-card-text"), f = m("v-text-field"), g = m("MazPhoneNumberInput"), b = m("v-select"), _ = m("v-alert"), F = m("v-icon"), U = m("v-btn"), k = m("v-row"), N = m("v-container");
124
+ return s(), d("form", {
125
+ novalidate: "",
126
+ id: "submission-form",
127
+ onSubmit: n[4] || (n[4] = x((...r) => e.validateUser && e.validateUser(...r), ["prevent"]))
128
+ }, [
129
+ (y = e.content) != null && y.custom_text_header.enabled ? p("", !0) : (s(), d("div", le, $((V = e.content) == null ? void 0 : V.title), 1)),
130
+ (S = e.content) != null && S.custom_text_header.enabled ? p("", !0) : (s(), d("div", me, $((E = e.content) == null ? void 0 : E.subtitle), 1)),
131
+ (T = e.content) != null && T.custom_text_header.enabled ? (s(), h(a, {
132
+ key: 2,
133
+ class: "quill-styling",
134
+ innerHTML: (q = e.content) == null ? void 0 : q.custom_text_header.text
135
+ }, null, 8, ["innerHTML"])) : p("", !0),
136
+ (B = e.content) != null && B.form.name.enabled ? (s(), h(f, {
137
+ key: 3,
138
+ id: "name-field",
139
+ class: C(((w = e.theme) == null ? void 0 : w.form_input_style) !== "underlined" ? "mt-5" : ""),
140
+ variant: ((M = e.theme) == null ? void 0 : M.form_input_style) || "underlined",
141
+ label: (P = e.content) == null ? void 0 : P.form.name.field_label,
142
+ modelValue: e.form.name,
143
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => e.form.name = r),
144
+ disabled: e.sending,
145
+ "error-messages": e.nameErrors,
146
+ hint: (I = e.content) == null ? void 0 : I.form.name.helper_text,
147
+ "append-icon": "mdi-emoticon-outline"
148
+ }, null, 8, ["class", "variant", "label", "modelValue", "disabled", "error-messages", "hint"])) : p("", !0),
149
+ (z = e.content) != null && z.form.email.enabled ? (s(), h(f, {
150
+ key: 4,
151
+ id: "email-field",
152
+ type: "email",
153
+ class: C(((L = e.theme) == null ? void 0 : L.form_input_style) !== "underlined" ? "mt-5" : ""),
154
+ variant: ((D = e.theme) == null ? void 0 : D.form_input_style) || "underlined",
155
+ modelValue: e.form.email,
156
+ "onUpdate:modelValue": n[1] || (n[1] = (r) => e.form.email = r),
157
+ label: (H = e.content) == null ? void 0 : H.form.email.field_label,
158
+ disabled: e.sending,
159
+ "error-messages": e.emailErrors,
160
+ hint: (K = e.content) == null ? void 0 : K.form.email.helper_text,
161
+ "append-icon": "mdi-email-outline"
162
+ }, null, 8, ["class", "variant", "modelValue", "label", "disabled", "error-messages", "hint"])) : p("", !0),
163
+ (O = e.content) != null && O.form.phone.enabled ? (s(), h(g, {
164
+ key: 5,
165
+ class: "phone-field",
166
+ modelValue: e.form.phone,
167
+ "onUpdate:modelValue": n[2] || (n[2] = (r) => e.form.phone = r),
168
+ block: !0,
169
+ error: e.v$.form.phone.$dirty && e.phoneErrors.length > 0,
170
+ "default-country-code": e.content.form.phone.default_country_code ? e.content.form.phone.default_country_code : void 0,
171
+ hint: e.phoneFocused ? e.content.form.phone.helper_text : e.content.form.phone.field_label,
172
+ "no-radius": !0,
173
+ "no-border": !0,
174
+ success: e.form.formattedNumber ? e.form.validNumber : !0,
175
+ onUpdate: e.updateFormattedNumber,
176
+ onFocus: e.phoneNumberFocused,
177
+ onBlur: e.phoneNumberBlur
178
+ }, null, 8, ["modelValue", "error", "default-country-code", "hint", "success", "onUpdate", "onFocus", "onBlur"])) : p("", !0),
179
+ e.phoneErrors.length > 0 ? (s(), d("div", ue, [
180
+ (s(!0), d(Q, null, R(e.phoneErrors, (r) => (s(), d("div", {
181
+ key: `phone-${r}`,
182
+ class: "caption red--text"
183
+ }, $(r), 1))), 128))
184
+ ])) : p("", !0),
185
+ (j = e.content) != null && j.form.select.enabled ? (s(), h(b, {
186
+ key: 7,
187
+ modelValue: e.form.select,
188
+ "onUpdate:modelValue": n[3] || (n[3] = (r) => e.form.select = r),
189
+ class: C(((A = e.theme) == null ? void 0 : A.form_input_style) !== "underlined" ? "mt-5" : ""),
190
+ variant: ((G = e.theme) == null ? void 0 : G.form_input_style) || "underlined",
191
+ label: e.content.form.select.field_label,
192
+ hint: e.content.form.select.helper_text,
193
+ items: e.content.form.select.options.split(","),
194
+ multiple: e.content.form.select.condition === "multiple",
195
+ "persistent-hint": "",
196
+ "error-messages": e.selectErrors
197
+ }, null, 8, ["modelValue", "class", "variant", "label", "hint", "items", "multiple", "error-messages"])) : p("", !0),
198
+ (s(!0), d(Q, null, R(e.errors, (r) => (s(), h(_, {
199
+ border: "end",
200
+ dense: "",
201
+ "colored-border": "",
202
+ type: "error",
203
+ elevation: "2",
204
+ key: r
205
+ }, {
206
+ default: v(() => [
207
+ W($(r), 1)
208
+ ]),
209
+ _: 2
210
+ }, 1024))), 128)),
211
+ c(N, { class: "align-center" }, {
212
+ default: v(() => [
213
+ c(k, null, {
214
+ default: v(() => [
215
+ c(U, {
216
+ type: "submit",
217
+ class: "text-center mx-auto",
218
+ disabled: e.sending
219
+ }, {
220
+ default: v(() => {
221
+ var r, J;
222
+ return [
223
+ c(F, { class: "me-2" }, {
224
+ default: v(() => n[5] || (n[5] = [
225
+ W("mdi-check-bold")
226
+ ])),
227
+ _: 1
228
+ }),
229
+ e.sending ? (s(), d("span", de, $((r = e.content) == null ? void 0 : r.form.button.active_title), 1)) : (s(), d("span", pe, $((J = e.content) == null ? void 0 : J.form.button.title), 1))
230
+ ];
231
+ }),
232
+ _: 1
233
+ }, 8, ["disabled"])
234
+ ]),
235
+ _: 1
236
+ })
237
+ ]),
238
+ _: 1
239
+ })
240
+ ], 32);
241
+ }
242
+ const fe = /* @__PURE__ */ Z(ae, [["render", ce], ["__file", "/Users/dominic/Code/gather-vue/src/components/pop_up/signup/SignUpForm.vue"]]), he = Y({
243
+ name: "PopUpSignUpFormCard",
244
+ components: {
245
+ SignUpForm: fe,
246
+ CloseCardButton: se,
247
+ CustomTheme: re
248
+ },
249
+ computed: {
250
+ closeButtonConfig() {
251
+ var n, o, t;
252
+ return (t = (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.pop_up) == null ? void 0 : t.sign_up;
253
+ },
254
+ showSignUp() {
255
+ var n, o, t, i;
256
+ return (i = (t = (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.pop_up) == null ? void 0 : t.sign_up) == null ? void 0 : i.enabled;
257
+ },
258
+ cardElevation() {
259
+ var n, o, t;
260
+ return (t = (o = (n = l().campaign) == null ? void 0 : n.config) == null ? void 0 : o.theme) == null ? void 0 : t.card_elevation;
261
+ }
262
+ }
263
+ });
264
+ function ve(e, n, o, t, i, u) {
265
+ const a = m("CustomTheme"), f = m("close-card-button"), g = m("SignUpForm"), b = m("v-card-text"), _ = m("v-card");
266
+ return e.showSignUp ? (s(), h(_, {
267
+ key: 0,
268
+ id: "top-card",
269
+ elevation: e.cardElevation
270
+ }, {
271
+ default: v(() => [
272
+ c(a),
273
+ c(f, { config: e.closeButtonConfig }, null, 8, ["config"]),
274
+ c(b, null, {
275
+ default: v(() => [
276
+ c(g)
277
+ ]),
278
+ _: 1
279
+ })
280
+ ]),
281
+ _: 1
282
+ }, 8, ["elevation"])) : p("", !0);
283
+ }
284
+ const ye = /* @__PURE__ */ Z(he, [["render", ve], ["__file", "/Users/dominic/Code/gather-vue/src/components/pop_up/signup/SignUpFormCard.vue"]]);
285
+ export {
286
+ ye as S
287
+ };
@@ -0,0 +1,368 @@
1
+ import { defineComponent as y, resolveComponent as i, createElementBlock as u, openBlock as s, withModifiers as Q, createElementVNode as G, createVNode as l, createBlock as h, createCommentVNode as v, toDisplayString as g, normalizeClass as $, Fragment as W, renderList as X, withCtx as c, createTextVNode as Y, resolveDirective as Z, withDirectives as x } from "vue";
2
+ import { a1 as ee, a2 as re, a3 as ne, a4 as K, a5 as te, u as a, _ as S, C as oe, c as C, b as ie } from "./main-DPldah1M.js";
3
+ import { u as se } from "./index-CoRlIGDo.js";
4
+ const ae = y({
5
+ name: "SignUpForm",
6
+ data: () => ({
7
+ form: {
8
+ name: "",
9
+ email: "",
10
+ phone: "",
11
+ formattedNumber: "",
12
+ select: [],
13
+ validNumber: !0
14
+ },
15
+ phoneFocused: !1,
16
+ sending: !1
17
+ }),
18
+ setup: () => ({ v$: se() }),
19
+ computed: {
20
+ customCampaign() {
21
+ var r, n;
22
+ return ((n = (r = a().referralCampaign) == null ? void 0 : r.campaign) == null ? void 0 : n.id) === "2342";
23
+ },
24
+ customContent() {
25
+ var r, n;
26
+ if (((n = (r = a().referralCampaign) == null ? void 0 : r.campaign) == null ? void 0 : n.id) === "2342")
27
+ return "for a chance to win a $1,000 Aussie Made Shopping Spree!<br/>Share this with your mates for even more chances of winning 😊";
28
+ },
29
+ content() {
30
+ var r, n;
31
+ return (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.sign_up;
32
+ },
33
+ theme() {
34
+ var r, n;
35
+ return (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.theme;
36
+ },
37
+ nameErrors() {
38
+ return this.v$.form.name.$dirty ? this.v$.form.name.required.$invalid ? ["The name is required"] : this.v$.form.name.minLength.$invalid ? ["Invalid name"] : [] : [];
39
+ },
40
+ emailErrors() {
41
+ return this.v$.form.email.$dirty ? this.v$.form.email.required.$invalid ? ["The email is required"] : this.v$.form.email.email.$invalid ? ["Invalid email"] : [] : [];
42
+ },
43
+ phoneErrors() {
44
+ var r;
45
+ return (r = a().referralCampaign) != null && r.config.sign_up.form.phone.enabled ? this.v$.form.phone.$dirty ? this.v$.form.phone.required.$invalid ? ["The phone is required"] : this.v$.form.phone.$model && this.v$.form.phone.validPhoneNumber.$invalid ? ["The phone number is invalid"] : [] : [] : [];
46
+ },
47
+ selectErrors() {
48
+ var r;
49
+ return (r = a().referralCampaign) != null && r.config.sign_up.form.select.enabled ? this.v$.form.select.$dirty ? this.v$.form.select.required.$invalid ? ["The value is required"] : [] : [] : [];
50
+ }
51
+ },
52
+ validations: () => {
53
+ var e, r;
54
+ return {
55
+ form: {
56
+ name: {
57
+ required: K,
58
+ minLength: te(3)
59
+ },
60
+ email: {
61
+ required: K,
62
+ email: ne
63
+ },
64
+ phone: re((e = a().referralCampaign) == null ? void 0 : e.config.sign_up.form.phone),
65
+ select: ee((r = a().referralCampaign) == null ? void 0 : r.config.sign_up.form.select)
66
+ }
67
+ };
68
+ },
69
+ methods: {
70
+ updateFormattedNumber(e) {
71
+ this.form.validNumber = e.isValid, this.form.formattedNumber = e.e164;
72
+ },
73
+ phoneNumberFocused() {
74
+ this.phoneFocused = !0;
75
+ },
76
+ phoneNumberBlur() {
77
+ this.phoneFocused = !1;
78
+ },
79
+ async validateUser() {
80
+ this.phoneFocused && !this.form.validNumber || (this.v$.$reset(), this.v$.$touch(), this.v$.$invalid || await this.saveUser());
81
+ },
82
+ async saveUser() {
83
+ var e, r, n, t, o;
84
+ this.sending = !0;
85
+ try {
86
+ const p = a();
87
+ await p.submitReferral({
88
+ name: this.form.name,
89
+ email: this.form.email,
90
+ phone: this.form.formattedNumber,
91
+ select: this.form.select,
92
+ selectKey: (o = (t = (n = (r = (e = p.referralCampaign) == null ? void 0 : e.config) == null ? void 0 : r.sign_up) == null ? void 0 : n.form) == null ? void 0 : t.select) == null ? void 0 : o.key
93
+ });
94
+ } catch (p) {
95
+ console.error(p), this.sending = !1;
96
+ }
97
+ }
98
+ }
99
+ }), de = { class: "text-h5 text-center" }, le = ["innerHTML"], me = {
100
+ key: 1,
101
+ class: "text-subtitle-2 text-center"
102
+ }, ue = {
103
+ key: 3,
104
+ id: "vue-phone-number-input-error"
105
+ }, ce = { key: 0 }, pe = { key: 1 };
106
+ function fe(e, r, n, t, o, p) {
107
+ var T, w, V, N, F, H, R, B, E, q, L, M, I, O, D, z, A, P;
108
+ const m = i("v-text-field"), f = i("MazPhoneNumberInput"), _ = i("v-select"), b = i("v-icon"), U = i("v-btn"), k = i("v-row"), J = i("v-container");
109
+ return s(), u("form", {
110
+ novalidate: "",
111
+ id: "submission-form",
112
+ onSubmit: r[4] || (r[4] = Q((...d) => e.validateUser && e.validateUser(...d), ["prevent"]))
113
+ }, [
114
+ G("div", de, g((T = e.content) == null ? void 0 : T.title), 1),
115
+ e.customCampaign ? (s(), u("div", {
116
+ key: 0,
117
+ class: "text-subtitle-2 text-center",
118
+ innerHTML: e.customContent
119
+ }, null, 8, le)) : (s(), u("div", me, g((w = e.content) == null ? void 0 : w.subtitle), 1)),
120
+ l(m, {
121
+ id: "name-field",
122
+ label: (V = e.content) == null ? void 0 : V.form.name.field_label,
123
+ class: $(((N = e.theme) == null ? void 0 : N.form_input_style) !== "underlined" ? "mt-5" : ""),
124
+ variant: ((F = e.theme) == null ? void 0 : F.form_input_style) || "underlined",
125
+ modelValue: e.form.name,
126
+ "onUpdate:modelValue": r[0] || (r[0] = (d) => e.form.name = d),
127
+ disabled: e.sending,
128
+ "error-messages": e.nameErrors,
129
+ hint: (H = e.content) == null ? void 0 : H.form.name.helper_text,
130
+ "append-icon": "mdi-emoticon-outline"
131
+ }, null, 8, ["label", "class", "variant", "modelValue", "disabled", "error-messages", "hint"]),
132
+ l(m, {
133
+ id: "email-field",
134
+ type: "email",
135
+ modelValue: e.form.email,
136
+ "onUpdate:modelValue": r[1] || (r[1] = (d) => e.form.email = d),
137
+ class: $(((R = e.theme) == null ? void 0 : R.form_input_style) !== "underlined" ? "mt-5" : ""),
138
+ variant: ((B = e.theme) == null ? void 0 : B.form_input_style) || "underlined",
139
+ "append-icon": "mdi-email-outline",
140
+ label: (E = e.content) == null ? void 0 : E.form.email.field_label,
141
+ disabled: e.sending,
142
+ "error-messages": e.emailErrors,
143
+ hint: (q = e.content) == null ? void 0 : q.form.email.helper_text
144
+ }, null, 8, ["modelValue", "class", "variant", "label", "disabled", "error-messages", "hint"]),
145
+ (L = e.content) != null && L.form.phone.enabled ? (s(), h(f, {
146
+ key: 2,
147
+ class: "phone-field",
148
+ modelValue: e.form.phone,
149
+ "onUpdate:modelValue": r[2] || (r[2] = (d) => e.form.phone = d),
150
+ block: !0,
151
+ error: e.v$.form.phone.$dirty && e.phoneErrors.length > 0,
152
+ "default-country-code": e.content.form.phone.default_country_code ? e.content.form.phone.default_country_code : void 0,
153
+ hint: e.phoneFocused ? e.content.form.phone.helper_text : e.content.form.phone.field_label,
154
+ "no-radius": !0,
155
+ "no-border": !0,
156
+ success: e.form.formattedNumber ? e.form.validNumber : !0,
157
+ onUpdate: e.updateFormattedNumber,
158
+ onFocus: e.phoneNumberFocused,
159
+ onBlur: e.phoneNumberBlur
160
+ }, null, 8, ["modelValue", "error", "default-country-code", "hint", "success", "onUpdate", "onFocus", "onBlur"])) : v("", !0),
161
+ e.phoneErrors.length > 0 ? (s(), u("div", ue, [
162
+ (s(!0), u(W, null, X(e.phoneErrors, (d) => (s(), u("div", {
163
+ key: d,
164
+ class: "caption red--text"
165
+ }, g(d), 1))), 128))
166
+ ])) : v("", !0),
167
+ (M = e.content) != null && M.form.select.enabled ? (s(), h(_, {
168
+ key: 4,
169
+ modelValue: e.form.select,
170
+ "onUpdate:modelValue": r[3] || (r[3] = (d) => e.form.select = d),
171
+ class: $(((I = e.theme) == null ? void 0 : I.form_input_style) !== "underlined" ? "mt-5" : ""),
172
+ variant: ((O = e.theme) == null ? void 0 : O.form_input_style) || "underlined",
173
+ label: (D = e.content) == null ? void 0 : D.form.select.field_label,
174
+ hint: (z = e.content) == null ? void 0 : z.form.select.helper_text,
175
+ items: (A = e.content) == null ? void 0 : A.form.select.options.split(","),
176
+ multiple: ((P = e.content) == null ? void 0 : P.form.select.condition) === "multiple",
177
+ "persistent-hint": "",
178
+ "error-messages": e.selectErrors
179
+ }, null, 8, ["modelValue", "class", "variant", "label", "hint", "items", "multiple", "error-messages"])) : v("", !0),
180
+ l(J, { class: "align-center" }, {
181
+ default: c(() => [
182
+ l(k, null, {
183
+ default: c(() => [
184
+ l(U, {
185
+ type: "submit",
186
+ class: "mx-auto",
187
+ disabled: e.sending
188
+ }, {
189
+ default: c(() => {
190
+ var d, j;
191
+ return [
192
+ l(b, { class: "me-2" }, {
193
+ default: c(() => r[5] || (r[5] = [
194
+ Y("mdi-check-bold")
195
+ ])),
196
+ _: 1
197
+ }),
198
+ e.sending ? (s(), u("span", ce, g((d = e.content) == null ? void 0 : d.form.button.active_title), 1)) : (s(), u("span", pe, g((j = e.content) == null ? void 0 : j.form.button.title), 1))
199
+ ];
200
+ }),
201
+ _: 1
202
+ }, 8, ["disabled"])
203
+ ]),
204
+ _: 1
205
+ })
206
+ ]),
207
+ _: 1
208
+ })
209
+ ], 32);
210
+ }
211
+ const he = /* @__PURE__ */ S(ae, [["render", fe], ["__file", "/Users/dominic/Code/gather-vue/src/components/referral_campaign/signup/SignUpForm.vue"]]), ge = y({
212
+ name: "SignUpCard",
213
+ props: {
214
+ isHeader: Boolean
215
+ },
216
+ components: {
217
+ SignUpForm: he,
218
+ CustomTheme: oe
219
+ },
220
+ computed: {
221
+ isSigningIn() {
222
+ return C().signingIn;
223
+ },
224
+ loadingText() {
225
+ var e;
226
+ return (e = C().activeCampaign) == null ? void 0 : e.config.sign_up.loading_text;
227
+ }
228
+ }
229
+ }), ve = { key: 0 }, _e = { class: "text-center mt-4" };
230
+ function be(e, r, n, t, o, p) {
231
+ const m = i("CustomTheme"), f = i("v-progress-circular"), _ = i("v-layout"), b = i("SignUpForm"), U = i("v-card-text"), k = i("v-card");
232
+ return e.isSigningIn ? (s(), u("div", ve, [
233
+ l(m),
234
+ l(_, { "justify-center": "" }, {
235
+ default: c(() => [
236
+ l(f, {
237
+ indeterminate: "",
238
+ color: "black"
239
+ })
240
+ ]),
241
+ _: 1
242
+ }),
243
+ G("div", _e, g(e.loadingText), 1)
244
+ ])) : (s(), h(k, {
245
+ key: 1,
246
+ id: e.isHeader ? "top-card" : ""
247
+ }, {
248
+ default: c(() => [
249
+ l(m),
250
+ l(U, null, {
251
+ default: c(() => [
252
+ l(b)
253
+ ]),
254
+ _: 1
255
+ })
256
+ ]),
257
+ _: 1
258
+ }, 8, ["id"]));
259
+ }
260
+ const $e = /* @__PURE__ */ S(ge, [["render", be], ["__file", "/Users/dominic/Code/gather-vue/src/components/referral_campaign/signup/SignUpCard.vue"]]), Ce = y({
261
+ name: "TextCard",
262
+ props: {
263
+ isHeader: Boolean,
264
+ text: String
265
+ }
266
+ });
267
+ function ye(e, r, n, t, o, p) {
268
+ const m = i("v-card-text"), f = i("v-card");
269
+ return s(), h(f, {
270
+ class: $(e.isHeader ? "mb-5" : "my-5"),
271
+ id: e.isHeader ? "top-card" : ""
272
+ }, {
273
+ default: c(() => [
274
+ l(m, {
275
+ class: "quill-styling",
276
+ innerHTML: e.text
277
+ }, null, 8, ["innerHTML"])
278
+ ]),
279
+ _: 1
280
+ }, 8, ["class", "id"]);
281
+ }
282
+ const Se = /* @__PURE__ */ S(Ce, [["render", ye], ["__file", "/Users/dominic/Code/gather-vue/src/components/atomic/atoms/TextCard.vue"]]), Ue = y({
283
+ name: "SignUpView",
284
+ components: {
285
+ SignUpCard: $e,
286
+ TextCard: Se
287
+ },
288
+ props: {
289
+ hideBanner: { type: Boolean }
290
+ },
291
+ methods: {
292
+ clickedOutside() {
293
+ const e = ie();
294
+ this.closeOnClickOutside && (e.started || C().toggleVisible());
295
+ }
296
+ },
297
+ mounted() {
298
+ this.$nextTick(() => {
299
+ C().fetchDataLayerAttributes();
300
+ });
301
+ },
302
+ computed: {
303
+ closeOnClickOutside() {
304
+ var r, n, t;
305
+ return (t = (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.sign_up) == null ? void 0 : t.click_outside_to_exit;
306
+ },
307
+ showBanner() {
308
+ var r, n, t;
309
+ return ((t = (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.theme) == null ? void 0 : t.show_banner) && this.banner && !this.hideBanner;
310
+ },
311
+ showHeaderCard() {
312
+ var r, n, t, o;
313
+ return (o = (t = (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.sign_up) == null ? void 0 : t.header) == null ? void 0 : o.shown;
314
+ },
315
+ showFooterCard() {
316
+ var r, n, t, o;
317
+ return (o = (t = (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.sign_up) == null ? void 0 : t.footer) == null ? void 0 : o.shown;
318
+ },
319
+ headerText() {
320
+ var r, n, t, o;
321
+ return (o = (t = (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.sign_up) == null ? void 0 : t.header) == null ? void 0 : o.text;
322
+ },
323
+ footerText() {
324
+ var r, n, t, o;
325
+ return (o = (t = (n = (r = a().referralCampaign) == null ? void 0 : r.config) == null ? void 0 : n.sign_up) == null ? void 0 : t.footer) == null ? void 0 : o.text;
326
+ },
327
+ banner() {
328
+ var r;
329
+ return (r = a().referralCampaign) == null ? void 0 : r.bannerUrl;
330
+ }
331
+ }
332
+ }), ke = ["src"];
333
+ function Te(e, r, n, t, o, p) {
334
+ const m = i("TextCard"), f = i("SignUpCard"), _ = i("v-container"), b = Z("click-outside-card");
335
+ return x((s(), h(_, {
336
+ id: "gc-sign-up-1",
337
+ class: "pa-5"
338
+ }, {
339
+ default: c(() => [
340
+ e.showBanner ? (s(), u("img", {
341
+ key: 0,
342
+ id: "banner-image",
343
+ class: "banner-signup-referrer",
344
+ src: e.banner
345
+ }, null, 8, ke)) : v("", !0),
346
+ e.showHeaderCard ? (s(), h(m, {
347
+ key: 1,
348
+ text: e.headerText,
349
+ isHeader: e.showHeaderCard
350
+ }, null, 8, ["text", "isHeader"])) : v("", !0),
351
+ l(f, {
352
+ isHeader: !e.showHeaderCard
353
+ }, null, 8, ["isHeader"]),
354
+ e.showFooterCard ? (s(), h(m, {
355
+ key: 2,
356
+ text: e.footerText,
357
+ isHeader: !1
358
+ }, null, 8, ["text"])) : v("", !0)
359
+ ]),
360
+ _: 1
361
+ })), [
362
+ [b, e.clickedOutside]
363
+ ]);
364
+ }
365
+ const Fe = /* @__PURE__ */ S(Ue, [["render", Te], ["__file", "/Users/dominic/Code/gather-vue/src/components/referral_campaign/signup/SignUpView.vue"]]);
366
+ export {
367
+ Fe as default
368
+ };
Binary file