@tapni/auth 1.0.43 → 1.0.45

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.
package/dist/style.css CHANGED
@@ -1 +1 @@
1
- .app-store-icon[data-v-cb61958b]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-7d5cdeb9],#emailInput[data-v-7d5cdeb9]{text-align:center;padding-right:15%;font-size:17px}.firstRow img[data-v-6037b00e]{width:25px;height:25px;position:absolute;top:50%;right:0;transform:translate(-50%,-50%)}#emailInput[data-v-707a4b16]{text-align:center;padding-right:15%;font-size:17px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}@media (max-width: 768px){#bodyId{margin-top:0;border-radius:0;height:100%!important}.header-logo{margin-top:15px}}.withBackground[data-v-2f7f5584],.withBackground[data-v-4d3e1bec],.withBackground[data-v-36b27d1f]{height:50px}[data-v-9dc93691] .vue-select{padding:5px 0}[data-v-9dc93691] .vue-select .dropdown-icon{color:#1d1d1d;width:25px!important;height:25px!important}[data-v-9dc93691] .vue-select .menu-option:hover{background-color:#d9d9d9}[data-v-9dc93691] .vue-select .menu-option.focused{background-color:#f4f4f4}[data-v-9dc93691] .vue-select .menu-option{border-bottom:1px solid #D9D9D9;font-size:15px;color:#151515}[data-v-9dc93691] .vue-select .menu-option:last-child{border-bottom:none}[data-v-9dc93691] .vue-select .menu{border-radius:10px;border:none}[data-v-9dc93691] .vue-select .control.focused{border:none;box-shadow:none}[data-v-9dc93691] .vue-select .control{min-height:54px!important;background-color:#f4f4f4;border:none;border-radius:10px}[data-v-9dc93691] .vue-select .menu-option.selected{background-color:#e4e4e4}[data-v-9dc93691] .vue-select .indicators-container{padding:5px 15px!important}[data-v-9dc93691] .vue-select .value-container{padding:5px 15px}[data-v-9dc93691] .vue-select .menu-option{background-color:#f4f4f4}
1
+ .app-store-icon[data-v-cb61958b]{box-shadow:0 4px 10px #00000017;border-radius:12px}#codeInput[data-v-7d5cdeb9],#emailInput[data-v-7d5cdeb9]{text-align:center;padding-right:15%;font-size:17px}.firstRow img[data-v-6037b00e]{width:25px;height:25px;position:absolute;top:50%;right:0;transform:translate(-50%,-50%)}[data-v-9dc93691] .vue-select{padding:5px 0}[data-v-9dc93691] .vue-select .dropdown-icon{color:#1d1d1d;width:25px!important;height:25px!important}[data-v-9dc93691] .vue-select .menu-option:hover{background-color:#d9d9d9}[data-v-9dc93691] .vue-select .menu-option.focused{background-color:#f4f4f4}[data-v-9dc93691] .vue-select .menu-option{border-bottom:1px solid #D9D9D9;font-size:15px;color:#151515}[data-v-9dc93691] .vue-select .menu-option:last-child{border-bottom:none}[data-v-9dc93691] .vue-select .menu{border-radius:10px;border:none}[data-v-9dc93691] .vue-select .control.focused{border:none;box-shadow:none}[data-v-9dc93691] .vue-select .control{min-height:54px!important;background-color:#f4f4f4;border:none;border-radius:10px}[data-v-9dc93691] .vue-select .menu-option.selected{background-color:#e4e4e4}[data-v-9dc93691] .vue-select .indicators-container{padding:5px 15px!important}[data-v-9dc93691] .vue-select .value-container{padding:5px 15px}[data-v-9dc93691] .vue-select .menu-option{background-color:#f4f4f4}#emailInput[data-v-707a4b16]{text-align:center;padding-right:15%;font-size:17px}html *{font-family:Inter,sans-serif}#bodyId{padding-top:3%;max-width:667px!important;margin:1.5% auto auto;height:95%!important;border-radius:20px}.action-block-top .default-text,.action-block-top .default-text:after{border-radius:50%;width:10em!important;height:10em!important}.action-block-top .default-text{margin:10px auto;font-size:3px;position:relative;text-indent:-9999em;border-left:.5em solid #000000;border-top:.5em solid rgba(0,0,0,.2);border-right:.5em solid rgba(0,0,0,.2);border-bottom:.5em solid rgba(0,0,0,.2);-webkit-transform:translateZ(0);-ms-transform:translateZ(0);transform:translateZ(0);-webkit-animation:load8 1.1s infinite linear;animation:load8 1.1s infinite linear}@-webkit-keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes load8{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.smartbanner-ios{background:linear-gradient(to bottom,#f4f4f4,#f4f4f4);box-shadow:0 0 #fff;border-bottom:1px solid #dddddd}.smartbanner-icon{border-radius:16px}.smartbanner-ios .smartbanner-button{font-size:13px;padding:9px 0;height:40px;border-radius:13px;background:#f4f4f4;color:#0a99d2;border:none;box-shadow:none;text-transform:uppercase}.snack-body{display:none;border-radius:40px;font-size:15px!important}#errorSnack{background-color:#fee3e3!important;border:2px solid #edd9d9!important;color:#000}#successSnack{background-color:#eff5eb!important;border:2px solid #e3ecd7!important;color:#000}.grecaptcha-badge{visibility:hidden}.header-logo{position:absolute;left:50%;transform:translate(-50%,-50%);margin-top:0;z-index:2}.header-logo-img{height:40px;margin-top:10px}@media (max-width: 768px){#bodyId{margin-top:0;border-radius:0;height:100%!important}.header-logo{margin-top:15px}}.withBackground[data-v-2f7f5584],.withBackground[data-v-4d3e1bec],.withBackground[data-v-36b27d1f]{height:50px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tapni/auth",
3
- "version": "1.0.43",
3
+ "version": "1.0.45",
4
4
  "type": "module",
5
5
  "main": "./dist/TapniAuth.umd.js",
6
6
  "module": "./dist/TapniAuth.es.js",
package/src/App.vue CHANGED
@@ -14,13 +14,10 @@ document.addEventListener('DOMContentLoaded', function() {
14
14
  <template>
15
15
  <div id="ssoapp">
16
16
  <a v-if="display === 'redirect' || renderView.includes('Auth')" href="/" class="header-logo"><img src="https://cdn.tapni.co/images/logo-dark.png"class="header-logo-img"></a>
17
- <ModalOverlay />
18
- <Language v-if="!isModal" />
19
- <SSO v-if="!isModal" />
20
- <SSOPick v-if="!isModal" />
21
17
 
22
18
  <AuthWelcome v-if="initialized && renderView === 'AuthWelcome'" />
23
19
  <AuthLogin v-else-if="initialized && renderView === 'AuthLogin'" :isModal="isModal" />
20
+ <AuthGeneral v-else-if="initialized && renderView === 'AuthGeneral'" :isModal="isModal" />
24
21
  <AuthAccount v-else-if="initialized && renderView === 'AuthAccount'" :isModal="isModal" />
25
22
  <AuthRegister v-else-if="initialized && renderView === 'AuthRegister'" :isModal="isModal" />
26
23
  <AuthVerify v-else-if="initialized && renderView === 'AuthVerify'" :isModal="isModal" />
@@ -77,6 +74,7 @@ import AuthAccount from "@/views/Account.vue";
77
74
  import AuthRegister from "@/views/Register.vue";
78
75
  import AuthVerify from "@/views/Verify.vue";
79
76
  import AuthSecurity from "@/views/Security.vue";
77
+ import AuthGeneral from "@/views/General.vue";
80
78
  import AuthReset from "@/views/Reset.vue";
81
79
  import AuthCallback from "@/views/Callback.vue";
82
80
  import {EventBus} from "./store/event-bus.js";
@@ -96,7 +94,7 @@ export default {
96
94
  }
97
95
  },
98
96
  components: {
99
- AuthCallback, AuthReset, AuthVerify, AuthSecurity, AuthRegister, AuthLogin, AuthAccount, AuthWelcome
97
+ AuthCallback, AuthReset, AuthVerify, AuthSecurity, AuthRegister, AuthLogin, AuthAccount, AuthWelcome, AuthGeneral
100
98
  },
101
99
  props: {
102
100
  viewProp: {
package/src/store/auth.js CHANGED
@@ -69,6 +69,8 @@ export default {
69
69
  "https://localhost:8085",
70
70
  "http://localhost:8085",
71
71
  "capacitor://localhost",
72
+ "http://localhost",
73
+ "https://localhost",
72
74
  ],
73
75
  },
74
76
  mutations: {
@@ -79,7 +79,19 @@
79
79
  </div>
80
80
  </div>
81
81
 
82
- <router-link to="/general" class="settingRow">
82
+ <div v-if="isModal" class="settingRow" @click="$emit('update:viewProp', 'AuthGeneral')">
83
+ <div class="firstRow">
84
+ <img
85
+ :src="getIcon('user-black.svg')"
86
+ class="withBackground"
87
+ />
88
+ <h4>{{ssoLang[appLanguage].general }}</h4>
89
+
90
+ <img :src="getIcon('arrow-gray-right.svg')" />
91
+ </div>
92
+ </div>
93
+
94
+ <router-link v-else to="/general" class="settingRow">
83
95
  <div class="firstRow">
84
96
  <img
85
97
  :src="getIcon('user-black.svg')"
@@ -91,7 +103,19 @@
91
103
  </div>
92
104
  </router-link>
93
105
 
94
- <router-link to="/security" class="settingRow">
106
+ <div v-if="isModal" class="settingRow" @click="$emit('update:viewProp', 'AuthSecurity')">
107
+ <div class="firstRow">
108
+ <img
109
+ :src="getIcon('shield-black.svg')"
110
+ class="withBackground"
111
+ />
112
+ <h4>{{ssoLang[appLanguage].security }}</h4>
113
+
114
+ <img :src="getIcon('arrow-gray-right.svg')" />
115
+ </div>
116
+ </div>
117
+
118
+ <router-link v-else to="/security" class="settingRow">
95
119
  <div class="firstRow">
96
120
  <img
97
121
  :src="getIcon('shield-black.svg')"
@@ -159,6 +183,12 @@ import { EventBus } from "../store/event-bus.js";
159
183
  import CONSTANTS from "../store/constants.js";
160
184
  export default {
161
185
  mixins: [AuthMixin],
186
+ props: {
187
+ isModal: {
188
+ type: Boolean,
189
+ default: false
190
+ }
191
+ },
162
192
  data () {
163
193
  return {
164
194
  expanded: false,
@@ -1,502 +0,0 @@
1
- import { _ as ae, A as te, E as le } from "./install-U2lp1-aZ.js";
2
- import "await-to-js";
3
- import { defineComponent as Z, mergeModels as K, useModel as oe, ref as S, computed as P, watch as J, onMounted as ne, onBeforeUnmount as ie, openBlock as d, createElementBlock as g, normalizeClass as V, createElementVNode as i, renderSlot as M, createTextVNode as O, toDisplayString as L, createCommentVNode as x, Fragment as E, renderList as I, createVNode as $, withDirectives as T, vModelText as F, createBlock as B, Teleport as se, normalizeStyle as re, withCtx as X, withKeys as de, resolveComponent as H, withModifiers as ue } from "vue";
4
- (function() {
5
- try {
6
- if (typeof document < "u") {
7
- var a = document.createElement("style");
8
- a.appendChild(document.createTextNode('@keyframes spinner-circle-animation-ed866313{0%,39%,to{opacity:0}40%{opacity:1}}.spinner[data-v-ed866313]{position:relative;width:var(--vs-spinner-size);height:var(--vs-spinner-size);margin:0;padding:0}.spinner-circle[data-v-ed866313]{width:100%;height:100%;position:absolute;left:0;top:0}.spinner-circle[data-v-ed866313]:before{content:"";display:block;margin:0 auto;width:15%;height:15%;background-color:var(--vs-spinner-color);border-radius:100%;-webkit-animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both;animation:spinner-circle-animation-ed866313 1.2s infinite ease-in-out both}.spinner-circle[data-v-ed866313]:nth-child(2){transform:rotate(30deg)}.spinner-circle[data-v-ed866313]:nth-child(3){transform:rotate(60deg)}.spinner-circle[data-v-ed866313]:nth-child(4){transform:rotate(90deg)}.spinner-circle[data-v-ed866313]:nth-child(5){transform:rotate(120deg)}.spinner-circle[data-v-ed866313]:nth-child(6){transform:rotate(150deg)}.spinner-circle[data-v-ed866313]:nth-child(7){transform:rotate(180deg)}.spinner-circle[data-v-ed866313]:nth-child(8){transform:rotate(210deg)}.spinner-circle[data-v-ed866313]:nth-child(9){transform:rotate(240deg)}.spinner-circle[data-v-ed866313]:nth-child(10){transform:rotate(270deg)}.spinner-circle[data-v-ed866313]:nth-child(11){transform:rotate(300deg)}.spinner-circle[data-v-ed866313]:nth-child(12){transform:rotate(330deg)}.spinner-circle[data-v-ed866313]:nth-child(2):before{animation-delay:-1.1s}.spinner-circle[data-v-ed866313]:nth-child(3):before{animation-delay:-1s}.spinner-circle[data-v-ed866313]:nth-child(4):before{animation-delay:-.9s}.spinner-circle[data-v-ed866313]:nth-child(5):before{animation-delay:-.8s}.spinner-circle[data-v-ed866313]:nth-child(6):before{animation-delay:-.7s}.spinner-circle[data-v-ed866313]:nth-child(7):before{animation-delay:-.6s}.spinner-circle[data-v-ed866313]:nth-child(8):before{animation-delay:-.5s}.spinner-circle[data-v-ed866313]:nth-child(9):before{animation-delay:-.4s}.spinner-circle[data-v-ed866313]:nth-child(10):before{animation-delay:-.3s}.spinner-circle[data-v-ed866313]:nth-child(11):before{animation-delay:-.2s}.spinner-circle[data-v-ed866313]:nth-child(12):before{animation-delay:-.1s}:root{--vs-input-bg: #fff;--vs-input-outline: #3b82f6;--vs-input-placeholder-color: #52525b;--vs-padding: .25rem .5rem;--vs-border: 1px solid #e4e4e7;--vs-border-radius: 4px;--vs-font-size: 16px;--vs-font-weight: 400;--vs-font-family: inherit;--vs-text-color: #18181b;--vs-line-height: 1.5;--vs-menu-offset-top: 8px;--vs-menu-height: 200px;--vs-menu-padding: 0;--vs-menu-border: 1px solid #e4e4e7;--vs-menu-bg: #fff;--vs-menu-box-shadow: none;--vs-menu-z-index: 2;--vs-option-padding: 8px 12px;--vs-option-font-size: var(--vs-font-size);--vs-option-font-weight: var(--vs-font-weight);--vs-option-text-color: var(--vs-text-color);--vs-option-bg: var(--vs-menu-bg);--vs-option-hover-color: #dbeafe;--vs-option-focused-color: var(--vs-option-hover-color);--vs-option-selected-color: #93c5fd;--vs-option-disabled-color: #f4f4f5;--vs-option-disabled-text-color: #52525b;--vs-multi-value-gap: 0px;--vs-multi-value-padding: 4px;--vs-multi-value-margin: 4px 0px 4px 6px;--vs-multi-value-font-size: 14px;--vs-multi-value-font-weight: 400;--vs-multi-value-line-height: 1;--vs-multi-value-text-color: #3f3f46;--vs-multi-value-bg: #f4f4f5;--vs-multi-value-xmark-size: 16px;--vs-multi-value-xmark-color: var(--vs-multi-value-text-color);--vs-indicators-gap: 4px;--vs-icon-size: 20px;--vs-icon-color: var(--vs-text-color);--vs-spinner-color: var(--vs-text-color);--vs-spinner-size: 20px;--vs-dropdown-transition: transform .25s ease-out}.vue-select[data-v-7f19f42a]{position:relative;box-sizing:border-box;width:100%}.vue-select[data-v-7f19f42a] *{box-sizing:border-box}.vue-select.open .single-value[data-v-7f19f42a]{position:absolute;opacity:.4}.vue-select.open .dropdown-icon[data-v-7f19f42a]{transform:rotate(180deg)}.vue-select.typing .single-value[data-v-7f19f42a]{opacity:0}.control[data-v-7f19f42a]{display:flex;min-height:32px;border:var(--vs-border);border-radius:var(--vs-border-radius);background-color:var(--vs-input-bg)}.control.focused[data-v-7f19f42a]{box-shadow:0 0 0 1px var(--vs-input-outline);border-color:var(--vs-input-outline)}.value-container[data-v-7f19f42a]{position:relative;display:flex;flex-wrap:wrap;align-items:center;flex-basis:100%;flex-grow:1}.value-container.multi[data-v-7f19f42a]{gap:var(--vs-multi-value-gap)}.single-value[data-v-7f19f42a]{display:flex;align-items:center;padding:var(--vs-padding);font-size:var(--vs-font-size);font-weight:var(--vs-font-weight);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);z-index:0}.multi-value[data-v-7f19f42a]{appearance:none;display:flex;align-items:center;gap:var(--vs-multi-value-gap);padding:var(--vs-multi-value-padding);margin:var(--vs-multi-value-margin);border:0;font-size:var(--vs-multi-value-font-size);font-weight:var(--vs-multi-value-font-weight);color:var(--vs-multi-value-text-color);line-height:var(--vs-multi-value-line-height);background:var(--vs-multi-value-bg);outline:none;cursor:pointer}.multi-value svg[data-v-7f19f42a]{width:var(--vs-multi-value-xmark-size);height:var(--vs-multi-value-xmark-size);fill:var(--vs-multi-value-xmark-color)}.search-input[data-v-7f19f42a]{appearance:none;display:inline-block;max-width:100%;flex-grow:1;width:0;margin:0;padding:0;border:0;background:none;padding:var(--vs-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);line-height:var(--vs-line-height);color:var(--vs-text-color);outline:none;z-index:1}.search-input[data-v-7f19f42a]::placeholder{color:var(--vs-input-placeholder-color)}.indicators-container[data-v-7f19f42a]{display:flex;align-items:center;flex-shrink:0;gap:var(--vs-indicators-gap);padding:var(--vs-padding)}.clear-button[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer}.dropdown-icon[data-v-7f19f42a]{appearance:none;display:inline-block;padding:0;margin:0;border:0;width:var(--vs-icon-size);height:var(--vs-icon-size);color:var(--vs-icon-color);background:none;outline:none;cursor:pointer;transition:var(--vs-dropdown-transition)}.menu[data-v-7f19f42a]{position:absolute;left:0;right:0;padding:var(--vs-menu-padding);margin-top:var(--vs-menu-offset-top);max-height:var(--vs-menu-height);overflow-y:auto;border:var(--vs-menu-border);border-radius:var(--vs-border-radius);box-shadow:var(--vs-menu-box-shadow);background-color:var(--vs-menu-bg);z-index:var(--vs-menu-z-index)}.menu-option[data-v-7f19f42a]{display:flex;width:100%;border:0;margin:0;padding:var(--vs-option-padding);font-size:var(--vs-option-font-size);font-weight:var(--vs-option-font-weight);font-family:var(--vs-font-family);color:var(--vs-option-text-color);background-color:var(--vs-option-bg);text-align:-webkit-auto;cursor:pointer}.menu-option[data-v-7f19f42a]:hover{background-color:var(--vs-option-hover-color)}.menu-option.focused[data-v-7f19f42a]{background-color:var(--vs-option-focused-color)}.menu-option.selected[data-v-7f19f42a]{background-color:var(--vs-option-selected-color)}.menu-option.disabled[data-v-7f19f42a]{background-color:var(--vs-option-disabled-color);color:var(--vs-option-disabled-text-color)}.no-results[data-v-7f19f42a]{padding:var(--vs-option-padding);font-size:var(--vs-font-size);font-family:var(--vs-font-family);color:var(--vs-text-color)}')), document.head.appendChild(a);
9
- }
10
- } catch (l) {
11
- console.error("vite-plugin-css-injected-by-js", l);
12
- }
13
- })();
14
- const A = (a, l) => {
15
- const t = a.__vccOpts || a;
16
- for (const [b, o] of l)
17
- t[b] = o;
18
- return t;
19
- }, ve = {}, ce = {
20
- xmlns: "http://www.w3.org/2000/svg",
21
- viewBox: "0 0 20 20",
22
- fill: "currentColor"
23
- };
24
- function pe(a, l) {
25
- return d(), g("svg", ce, l[0] || (l[0] = [
26
- i("path", {
27
- "fill-rule": "evenodd",
28
- d: "M5.22 8.22a.75.75 0 0 1 1.06 0L10 11.94l3.72-3.72a.75.75 0 1 1 1.06 1.06l-4.25 4.25a.75.75 0 0 1-1.06 0L5.22 9.28a.75.75 0 0 1 0-1.06Z",
29
- "clip-rule": "evenodd"
30
- }, null, -1)
31
- ]));
32
- }
33
- const fe = /* @__PURE__ */ A(ve, [["render", pe]]), ge = {}, be = {
34
- xmlns: "http://www.w3.org/2000/svg",
35
- viewBox: "0 0 20 20",
36
- fill: "currentColor"
37
- };
38
- function me(a, l) {
39
- return d(), g("svg", be, l[0] || (l[0] = [
40
- i("path", { d: "M6.28 5.22a.75.75 0 0 0-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 1 0 1.06 1.06L10 11.06l3.72 3.72a.75.75 0 1 0 1.06-1.06L11.06 10l3.72-3.72a.75.75 0 0 0-1.06-1.06L10 8.94 6.28 5.22Z" }, null, -1)
41
- ]));
42
- }
43
- const R = /* @__PURE__ */ A(ge, [["render", me]]), he = ["aria-disabled", "aria-selected"], ye = /* @__PURE__ */ Z({
44
- __name: "MenuOption",
45
- props: {
46
- menu: {},
47
- index: {},
48
- isFocused: { type: Boolean },
49
- isSelected: { type: Boolean },
50
- isDisabled: { type: Boolean }
51
- },
52
- emits: ["select"],
53
- setup(a, { emit: l }) {
54
- const t = a, b = l, o = S(null);
55
- return J(
56
- () => t.isFocused,
57
- () => {
58
- if (t.isFocused && t.menu) {
59
- const u = t.menu.children[t.index], p = u.offsetTop, h = p + u.clientHeight, s = t.menu.scrollTop, v = t.menu.clientHeight;
60
- p < s ? t.menu.scrollTop = p : h > s + v && (t.menu.scrollTop = h - v);
61
- }
62
- }
63
- ), (u, p) => (d(), g("div", {
64
- ref_key: "option",
65
- ref: o,
66
- tabindex: "-1",
67
- role: "option",
68
- class: V({ focused: u.isFocused, selected: u.isSelected, disabled: u.isDisabled }),
69
- "aria-disabled": u.isDisabled,
70
- "aria-selected": u.isSelected,
71
- onClick: p[0] || (p[0] = (h) => b("select")),
72
- onKeydown: p[1] || (p[1] = de((h) => b("select"), ["enter"]))
73
- }, [
74
- M(u.$slots, "default")
75
- ], 42, he));
76
- }
77
- }), we = {}, ke = { className: "spinner" };
78
- function Le(a, l) {
79
- return d(), g("div", ke, [
80
- (d(), g(E, null, I(12, (t) => i("div", {
81
- key: t,
82
- class: "spinner-circle"
83
- })), 64))
84
- ]);
85
- }
86
- const xe = /* @__PURE__ */ A(we, [["render", Le], ["__scopeId", "data-v-ed866313"]]), Me = ["aria-expanded", "aria-describedby", "aria-description", "aria-labelledby", "aria-label", "aria-required"], ze = ["onClick"], Ce = ["id", "disabled", "placeholder"], Se = { class: "indicators-container" }, De = ["disabled"], Ve = ["disabled"], Be = ["aria-label", "aria-multiselectable"], Oe = {
87
- key: 0,
88
- class: "no-results"
89
- }, $e = /* @__PURE__ */ Z({
90
- __name: "Select",
91
- props: /* @__PURE__ */ K({
92
- options: {},
93
- displayedOptions: {},
94
- placeholder: { default: "Select an option" },
95
- isClearable: { type: Boolean, default: !0 },
96
- isDisabled: { type: Boolean, default: !1 },
97
- isSearchable: { type: Boolean, default: !0 },
98
- isMulti: { type: Boolean, default: !1 },
99
- isLoading: { type: Boolean, default: !1 },
100
- shouldAutofocusOption: { type: Boolean, default: !0 },
101
- closeOnSelect: { type: Boolean, default: !0 },
102
- teleport: { default: void 0 },
103
- inputId: { default: void 0 },
104
- aria: { default: void 0 },
105
- filterBy: { type: Function, default: (a, l, t) => l.toLowerCase().includes(t.toLowerCase()) },
106
- getOptionLabel: { type: Function, default: (a) => a.label },
107
- getMultiValueLabel: { type: Function, default: (a) => a.label }
108
- }, {
109
- modelValue: {
110
- required: !0,
111
- validator: (a, l) => l.isMulti ? Array.isArray(a) : !Array.isArray(a)
112
- },
113
- modelModifiers: {}
114
- }),
115
- emits: /* @__PURE__ */ K(["optionSelected", "optionDeselected", "search"], ["update:modelValue"]),
116
- setup(a, { emit: l }) {
117
- const t = a, b = l, o = oe(a, "modelValue"), u = S(null), p = S(null), h = S(null), s = S(""), v = S(!1), f = S(-1), z = P(() => {
118
- const e = t.displayedOptions || t.options, n = (m) => m.filter(
119
- (c) => !o.value.includes(c.value)
120
- );
121
- if (t.isSearchable && s.value) {
122
- const m = e.filter((c) => {
123
- const C = t.isMulti ? t.getMultiValueLabel(c) : t.getOptionLabel(c);
124
- return t.filterBy(c, C, s.value);
125
- });
126
- return t.isMulti ? n(m) : m;
127
- }
128
- return t.isMulti ? n(e) : e;
129
- }), y = P(() => {
130
- if (t.isMulti && Array.isArray(o.value))
131
- return o.value.map(
132
- (n) => t.options.find((m) => m.value === n)
133
- );
134
- t.isMulti && !Array.isArray(o.value) && console.warn(`[vue3-select-component warn]: The v-model provided should be an array when using \`isMulti\` prop, instead it was: ${o.value}`);
135
- const e = t.options.find((n) => n.value === o.value);
136
- return e ? [e] : [];
137
- }), D = (e) => {
138
- v.value = !0, t.shouldAutofocusOption && (f.value = t.options.findIndex((n) => !n.disabled)), e != null && e.focusInput && p.value && p.value.focus();
139
- }, N = () => {
140
- v.value = !1, s.value = "";
141
- }, Q = () => {
142
- v.value ? N() : D();
143
- }, U = (e) => {
144
- e.disabled || (t.isMulti ? o.value.push(e.value) : o.value = e.value, b("optionSelected", e), s.value = "", t.closeOnSelect && (v.value = !1), p.value && p.value.blur());
145
- }, q = (e) => {
146
- t.isMulti && !t.isDisabled && (o.value = o.value.filter((n) => n !== e.value), b("optionDeselected", e));
147
- }, W = () => {
148
- t.isMulti ? (o.value = [], b("optionDeselected", null)) : (o.value = void 0, b("optionDeselected", y.value[0])), v.value = !1, s.value = "", p.value && p.value.blur();
149
- }, _ = (e) => {
150
- if (v.value) {
151
- const n = f.value;
152
- if (e.key === "ArrowDown") {
153
- e.preventDefault();
154
- const c = z.value.findIndex((w, r) => !w.disabled && r > n), C = z.value.findIndex((w) => !w.disabled);
155
- f.value = c === -1 ? C : c;
156
- }
157
- if (e.key === "ArrowUp") {
158
- e.preventDefault();
159
- const c = z.value.reduce(
160
- (w, r, k) => !r.disabled && k < n ? k : w,
161
- -1
162
- ), C = z.value.reduce(
163
- (w, r, k) => r.disabled ? w : k,
164
- -1
165
- );
166
- f.value = c === -1 ? C : c;
167
- }
168
- if (e.key === "Enter") {
169
- const c = z.value[n];
170
- e.preventDefault(), c && U(c);
171
- }
172
- if (e.code === "Space" && s.value.length === 0) {
173
- const c = z.value[n];
174
- e.preventDefault(), c && U(c);
175
- }
176
- e.key === "Escape" && (e.preventDefault(), v.value = !1, s.value = "");
177
- const m = t.isMulti ? o.value.length > 0 : !!o.value;
178
- e.key === "Backspace" && s.value.length === 0 && m && (e.preventDefault(), t.isMulti ? o.value = o.value.slice(0, -1) : o.value = void 0);
179
- }
180
- }, Y = (e) => {
181
- !v.value && s.value.length === 0 && (e.preventDefault(), e.stopImmediatePropagation(), D());
182
- }, ee = (e) => {
183
- e.key === "Tab" ? N() : e.key === "Space" && Y(e);
184
- }, G = (e) => {
185
- u.value && !u.value.contains(e.target) && (v.value = !1, s.value = "");
186
- }, j = () => {
187
- if (u.value) {
188
- const e = u.value.getBoundingClientRect();
189
- return {
190
- left: `${e.x}px`,
191
- top: `${e.y + e.height}px`
192
- };
193
- }
194
- return console.warn("Unable to calculate dynamic menu position because of missing internal DOM reference."), { top: "0px", left: "0px" };
195
- };
196
- return J(
197
- () => s.value,
198
- () => {
199
- b("search", s.value), s.value && !v.value && D();
200
- }
201
- ), ne(() => {
202
- document.addEventListener("click", G), document.addEventListener("keydown", _);
203
- }), ie(() => {
204
- document.removeEventListener("click", G), document.removeEventListener("keydown", _);
205
- }), (e, n) => {
206
- var m, c, C, w;
207
- return d(), g("div", {
208
- ref_key: "container",
209
- ref: u,
210
- dir: "auto",
211
- class: V(["vue-select", { open: v.value, typing: v.value && s.value.length > 0, disabled: e.isDisabled }])
212
- }, [
213
- i("div", {
214
- class: V(["control", { focused: v.value }])
215
- }, [
216
- i("div", {
217
- class: V(["value-container", { multi: e.isMulti }]),
218
- role: "combobox",
219
- "aria-expanded": v.value,
220
- "aria-describedby": e.placeholder,
221
- "aria-description": e.placeholder,
222
- "aria-labelledby": (m = e.aria) == null ? void 0 : m.labelledby,
223
- "aria-label": y.value.length ? y.value.map(e.isMulti ? e.getMultiValueLabel : e.getOptionLabel).join(", ") : "",
224
- "aria-required": (c = e.aria) == null ? void 0 : c.required
225
- }, [
226
- !t.isMulti && y.value[0] ? (d(), g("div", {
227
- key: 0,
228
- class: "single-value",
229
- onClick: n[0] || (n[0] = (r) => t.isDisabled ? null : D({ focusInput: !0 }))
230
- }, [
231
- M(e.$slots, "value", {
232
- option: y.value[0]
233
- }, () => [
234
- O(L(e.getOptionLabel(y.value[0])), 1)
235
- ], !0)
236
- ])) : x("", !0),
237
- t.isMulti && y.value.length ? (d(!0), g(E, { key: 1 }, I(y.value, (r) => M(e.$slots, "tag", {
238
- key: r.value,
239
- option: r,
240
- removeOption: () => q(r)
241
- }, () => [
242
- i("button", {
243
- type: "button",
244
- class: "multi-value",
245
- onClick: (k) => q(r)
246
- }, [
247
- O(L(e.getMultiValueLabel(r)), 1),
248
- $(R)
249
- ], 8, ze)
250
- ], !0)), 128)) : x("", !0),
251
- T(i("input", {
252
- id: e.inputId,
253
- ref_key: "input",
254
- ref: p,
255
- "onUpdate:modelValue": n[1] || (n[1] = (r) => s.value = r),
256
- class: "search-input",
257
- type: "text",
258
- "aria-autocomplete": "list",
259
- autocapitalize: "none",
260
- autocomplete: "off",
261
- autocorrect: "off",
262
- spellcheck: "false",
263
- tabindex: "0",
264
- disabled: e.isDisabled,
265
- placeholder: y.value.length === 0 ? e.placeholder : "",
266
- onMousedown: n[2] || (n[2] = (r) => D()),
267
- onKeydown: ee
268
- }, null, 40, Ce), [
269
- [F, s.value]
270
- ])
271
- ], 10, Me),
272
- i("div", Se, [
273
- y.value.length > 0 && e.isClearable && !e.isLoading ? (d(), g("button", {
274
- key: 0,
275
- type: "button",
276
- class: "clear-button",
277
- tabindex: "-1",
278
- disabled: e.isDisabled,
279
- onClick: W
280
- }, [
281
- M(e.$slots, "clear", {}, () => [
282
- $(R)
283
- ], !0)
284
- ], 8, De)) : x("", !0),
285
- e.isLoading ? x("", !0) : (d(), g("button", {
286
- key: 1,
287
- type: "button",
288
- class: "dropdown-icon",
289
- tabindex: "-1",
290
- disabled: e.isDisabled,
291
- onClick: Q
292
- }, [
293
- M(e.$slots, "dropdown", {}, () => [
294
- $(fe)
295
- ], !0)
296
- ], 8, Ve)),
297
- M(e.$slots, "loading", {}, () => [
298
- e.isLoading ? (d(), B(xe, { key: 0 })) : x("", !0)
299
- ], !0)
300
- ])
301
- ], 2),
302
- (d(), B(se, {
303
- to: e.teleport,
304
- disabled: !e.teleport,
305
- defer: !0
306
- }, [
307
- v.value ? (d(), g("div", {
308
- key: 0,
309
- ref_key: "menu",
310
- ref: h,
311
- class: "menu",
312
- role: "listbox",
313
- "aria-label": (C = e.aria) == null ? void 0 : C.labelledby,
314
- "aria-multiselectable": e.isMulti,
315
- style: re({
316
- width: t.teleport ? `${(w = u.value) == null ? void 0 : w.getBoundingClientRect().width}px` : "100%",
317
- top: t.teleport ? j().top : "unset",
318
- left: t.teleport ? j().left : "unset"
319
- })
320
- }, [
321
- M(e.$slots, "menu-header", {}, void 0, !0),
322
- (d(!0), g(E, null, I(z.value, (r, k) => (d(), B(ye, {
323
- key: k,
324
- type: "button",
325
- class: V(["menu-option", { focused: f.value === k, selected: r.value === o.value }]),
326
- menu: h.value,
327
- index: k,
328
- "is-focused": f.value === k,
329
- "is-selected": r.value === o.value,
330
- "is-disabled": r.disabled || !1,
331
- onSelect: (Xe) => U(r)
332
- }, {
333
- default: X(() => [
334
- M(e.$slots, "option", { option: r }, () => [
335
- O(L(e.getOptionLabel(r)), 1)
336
- ], !0)
337
- ]),
338
- _: 2
339
- }, 1032, ["class", "menu", "index", "is-focused", "is-selected", "is-disabled", "onSelect"]))), 128)),
340
- z.value.length === 0 ? (d(), g("div", Oe, [
341
- M(e.$slots, "no-options", {}, () => [
342
- n[3] || (n[3] = O(" No results found "))
343
- ], !0)
344
- ])) : x("", !0)
345
- ], 12, Be)) : x("", !0)
346
- ], 8, ["to", "disabled"]))
347
- ], 2);
348
- };
349
- }
350
- }), Ae = /* @__PURE__ */ A($e, [["__scopeId", "data-v-7f19f42a"]]), Ue = {
351
- name: "AuthGeneral",
352
- mixins: [te],
353
- components: {
354
- VueSelect: Ae
355
- },
356
- props: {
357
- payload: {
358
- type: Object,
359
- default: {}
360
- }
361
- },
362
- data() {
363
- return {
364
- loading: !1
365
- };
366
- },
367
- async mounted() {
368
- this.isLoggedIn || this.$router.push("/login"), this.isEmpty(this.account) && this.$router.push("/account");
369
- },
370
- methods: {
371
- close() {
372
- le.$emit("ssoEvent", { name: "toggleAuthModal", data: !0 });
373
- },
374
- async submitGeneralUpdate() {
375
- if (this.password.length < 8) return this.errorSnack(this.ssoLang[this.appLanguage].password_8_chars);
376
- this.loading = !0, await this.newPassword({}) === !0 && (this.successSnack(this.ssoLang[this.appLanguage].password_change_success), this.changePassword = !1), this.loading = !1;
377
- }
378
- }
379
- }, Ee = { class: "page-login content-boxed content-boxed-padding" }, Ie = { class: "subheaderContainer full-top" }, Te = ["src"], Fe = {
380
- class: "center-text",
381
- style: { "flex-grow": "1", "text-align": "center", margin: "0", "font-weight": "600" }
382
- }, Ne = { class: "container left-text" }, qe = { class: "center-text" }, _e = { class: "full-top bold small-bottom" }, Ge = ["placeholder"], je = ["placeholder"], Ke = { class: "full-top bold" }, Pe = { class: "full-top bold" }, He = {
383
- type: "submit",
384
- class: "button black-button button-full google-button bg-tapni-grey button-90 button-center uppercase bold full-top pointer"
385
- }, Re = { key: 0 }, Ze = {
386
- key: 1,
387
- class: "button--loading button__loader"
388
- };
389
- function Je(a, l, t, b, o, u) {
390
- var s, v;
391
- const p = H("router-link"), h = H("VueSelect");
392
- return d(), g("div", Ee, [
393
- a.isModal ? (d(), g("a", {
394
- key: 0,
395
- onClick: l[0] || (l[0] = (...f) => u.close && u.close(...f)),
396
- class: "color-black pull-right pointer",
397
- style: { "margin-top": "0px", position: "absolute", right: "-20px", "text-align": "right" }
398
- }, l[6] || (l[6] = [
399
- i("i", { class: "font-17 color-black" }, [
400
- i("img", {
401
- src: "https://cdn.tapni.co/icons/down-arrow.png",
402
- class: "responsive-image",
403
- style: { width: "35%" }
404
- })
405
- ], -1)
406
- ]))) : x("", !0),
407
- i("div", Ie, [
408
- a.isModal ? x("", !0) : (d(), B(p, {
409
- key: 0,
410
- to: "/account",
411
- class: "button gray-button pointer left-button"
412
- }, {
413
- default: X(() => [
414
- i("img", {
415
- src: a.getIcon("arrow-gray-right.svg"),
416
- height: "20",
417
- width: "20",
418
- class: "btn-icon",
419
- style: { rotate: "180deg" }
420
- }, null, 8, Te)
421
- ]),
422
- _: 1
423
- })),
424
- i("h2", Fe, L(a.ssoLang[a.appLanguage].general), 1)
425
- ]),
426
- i("div", Ne, [
427
- i("p", qe, L(a.ssoLang[a.appLanguage].general_p), 1),
428
- i("form", {
429
- class: "full-top",
430
- onSubmit: l[5] || (l[5] = ue((...f) => u.submitGeneralUpdate && u.submitGeneralUpdate(...f), ["prevent"]))
431
- }, [
432
- i("h3", _e, L(a.ssoLang[a.appLanguage].personal_details), 1),
433
- T(i("input", {
434
- type: "text",
435
- "onUpdate:modelValue": l[1] || (l[1] = (f) => a.account.name = f),
436
- placeholder: a.ssoLang[a.appLanguage].name,
437
- class: "edit-input h-40 lh-40 small-bottom",
438
- required: "",
439
- style: { width: "100%" }
440
- }, null, 8, Ge), [
441
- [F, a.account.name]
442
- ]),
443
- T(i("input", {
444
- disabled: "",
445
- type: "email",
446
- "onUpdate:modelValue": l[2] || (l[2] = (f) => a.account.email = f),
447
- placeholder: a.ssoLang[a.appLanguage].email,
448
- class: "bg-white edit-input h-40 lh-40 small-bottom",
449
- required: "",
450
- style: { width: "100%" }
451
- }, null, 8, je), [
452
- [F, a.account.email]
453
- ]),
454
- i("h3", Ke, L(a.ssoLang[a.appLanguage].app_region), 1),
455
- a.account.billing ? (d(), B(h, {
456
- key: 0,
457
- modelValue: a.account.billing.region,
458
- "onUpdate:modelValue": l[3] || (l[3] = (f) => a.account.billing.region = f),
459
- options: [
460
- { label: "United States", value: "us" },
461
- { label: "United Kingdom", value: "uk" },
462
- { label: "European Union", value: "eu" },
463
- { label: "Mexico", value: "mx" },
464
- { label: "Mauritius", value: "mu" },
465
- { label: "Colombia", value: "co" },
466
- { label: "Serbia", value: "sr" },
467
- { label: "China", value: "cn" }
468
- ],
469
- isClearable: !1,
470
- placeholder: "Select region"
471
- }, null, 8, ["modelValue"])) : x("", !0),
472
- i("p", null, "Default currency for this region is " + L((v = (s = a.account.billing) == null ? void 0 : s.currency) == null ? void 0 : v.toUpperCase()), 1),
473
- i("h3", Pe, L(a.ssoLang[a.appLanguage].app_language), 1),
474
- $(h, {
475
- modelValue: a.account.lang,
476
- "onUpdate:modelValue": l[4] || (l[4] = (f) => a.account.lang = f),
477
- options: [
478
- { label: a.ssoLang[a.appLanguage].english, value: "en" },
479
- { label: a.ssoLang[a.appLanguage].german, value: "de" },
480
- { label: a.ssoLang[a.appLanguage].spanish, value: "es" },
481
- { label: a.ssoLang[a.appLanguage].italian, value: "it" },
482
- { label: a.ssoLang[a.appLanguage].french, value: "fr" },
483
- { label: a.ssoLang[a.appLanguage].turkish, value: "tr" },
484
- { label: a.ssoLang[a.appLanguage].serbian, value: "sr" },
485
- { label: a.ssoLang[a.appLanguage].korean, value: "kr" },
486
- { label: a.ssoLang[a.appLanguage].chinese, value: "cn" }
487
- ],
488
- isClearable: !1,
489
- placeholder: "Select language"
490
- }, null, 8, ["modelValue", "options"]),
491
- l[7] || (l[7] = i("p", null, "Translate the app on your preferred language.", -1)),
492
- i("button", He, [
493
- o.loading ? (d(), g("span", Ze)) : (d(), g("span", Re, L(a.ssoLang[a.appLanguage].save), 1))
494
- ])
495
- ], 32)
496
- ])
497
- ]);
498
- }
499
- const ea = /* @__PURE__ */ ae(Ue, [["render", Je], ["__scopeId", "data-v-9dc93691"]]);
500
- export {
501
- ea as default
502
- };