@stokr/components-library 3.0.39 → 3.0.40

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 (29) hide show
  1. package/dist/components/2FA/login-with-otp-flow.js +2 -1
  2. package/dist/components/Layout/Layout.js +7 -3
  3. package/dist/components/StepsProgress/StepsProgress.js +3 -3
  4. package/dist/components/icons/LinkIcon.js +2 -2
  5. package/dist/context/Auth.js +8 -4
  6. package/dist/runtime-config.js +1 -1
  7. package/dist/static/country-list.json +251 -251
  8. package/dist/static/fonts/Ionicons/ionicons.min.css +2810 -2810
  9. package/dist/static/fonts/Ionicons/ionicons.min.css.js +1 -1
  10. package/dist/static/fonts/icomoon/selection.json +910 -910
  11. package/dist/static/fonts/icomoon/style.css +139 -139
  12. package/dist/static/images/copy_icon.svg +4 -4
  13. package/dist/static/images/download_icon.svg +3 -3
  14. package/dist/static/images/face-scan-icon.svg +7 -7
  15. package/dist/static/images/numbers/number_eight.svg +3 -3
  16. package/dist/static/images/numbers/number_five.svg +4 -4
  17. package/dist/static/images/numbers/number_four.svg +3 -3
  18. package/dist/static/images/numbers/number_nine.svg +4 -4
  19. package/dist/static/images/numbers/number_one.svg +4 -4
  20. package/dist/static/images/numbers/number_seven.svg +4 -4
  21. package/dist/static/images/numbers/number_six.svg +4 -4
  22. package/dist/static/images/numbers/number_three.svg +3 -3
  23. package/dist/static/images/numbers/number_two.svg +4 -4
  24. package/dist/static/images/numbers/number_zero.svg +3 -3
  25. package/dist/static/images/plus-icon.svg +4 -4
  26. package/dist/static/images/search-icon.svg +3 -3
  27. package/dist/static/images/transfer-icon.svg +10 -10
  28. package/dist/static/images/warning-filled.svg +3 -3
  29. package/package.json +153 -153
@@ -13,7 +13,7 @@ import { getConfig, getPlatformURL } from "../../runtime-config.js";
13
13
  import { navigateToHref } from "../../routing/navigate-app.js";
14
14
  const LoginWithOTP = ({ withBackground, useRelativePathForMenu = false }) => {
15
15
  const navigate = useNavigate();
16
- const { loginUser, waitingFor2fa, firebaseError, loginUserWithTotp, reset2faFlow } = useContext(AuthContext);
16
+ const { loginUser, waitingFor2fa, firebaseError, loginUserWithTotp, reset2faFlow, logoutUser } = useContext(AuthContext);
17
17
  const [isModalOpen, setIsModalOpen] = useState({
18
18
  login: true,
19
19
  enter2fa: false,
@@ -79,6 +79,7 @@ const LoginWithOTP = ({ withBackground, useRelativePathForMenu = false }) => {
79
79
  clearPopupError();
80
80
  setIsActionLoading(void 0);
81
81
  },
82
+ logoutUser,
82
83
  onFormSend: async ({ email, password }) => {
83
84
  clearPopupError();
84
85
  setIsActionLoading("login");
@@ -27,7 +27,9 @@ class Layout extends React__default.PureComponent {
27
27
  noFooter,
28
28
  noHeader,
29
29
  noLogout,
30
- useRelativePathForMenu = false
30
+ useRelativePathForMenu = false,
31
+ logoutUser = () => {
32
+ }
31
33
  } = this.props;
32
34
  return /* @__PURE__ */ jsx(ThemeProvider, { theme: { ...theme }, children: /* @__PURE__ */ jsxs(PageWrapper, { children: [
33
35
  /* @__PURE__ */ jsx(GlobalStyle, {}),
@@ -40,7 +42,8 @@ class Layout extends React__default.PureComponent {
40
42
  signupHandler,
41
43
  siteTitle: title,
42
44
  noLogout,
43
- useRelativePathForMenu
45
+ useRelativePathForMenu,
46
+ logoutUser
44
47
  }
45
48
  ),
46
49
  /* @__PURE__ */ jsx(
@@ -64,7 +67,8 @@ Layout.propTypes = {
64
67
  progress: PropTypes.bool,
65
68
  footerColor: PropTypes.string,
66
69
  children: PropTypes.node.isRequired,
67
- useRelativePathForMenu: PropTypes.bool
70
+ useRelativePathForMenu: PropTypes.bool,
71
+ logoutUser: PropTypes.func
68
72
  };
69
73
  ProgressStatusContext.Consumer;
70
74
  export {
@@ -24,10 +24,10 @@ const StepsProgressSignup = (props) => {
24
24
  isActive: isActiveStep("/verify-identity")
25
25
  },
26
26
  {
27
- id: "taxId",
28
- handleClick: () => navigate("/taxid"),
27
+ id: "self-certification",
28
+ handleClick: () => navigate("/self-certification"),
29
29
  isDone: !!taxId,
30
- isActive: isActiveStep("/taxid")
30
+ isActive: isActiveStep("/self-certification")
31
31
  },
32
32
  {
33
33
  id: "ampID",
@@ -17,13 +17,13 @@ const LinkIcon = () => /* @__PURE__ */ jsxs(
17
17
  /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx(
18
18
  "path",
19
19
  {
20
- d: "M312.453,199.601c-6.066-6.102-12.792-11.511-20.053-16.128c-19.232-12.315-41.59-18.859-64.427-18.859\r\n c-31.697-0.059-62.106,12.535-84.48,34.987L34.949,308.23c-22.336,22.379-34.89,52.7-34.91,84.318\r\n c-0.042,65.98,53.41,119.501,119.39,119.543c31.648,0.11,62.029-12.424,84.395-34.816l89.6-89.6\r\n c1.628-1.614,2.537-3.816,2.524-6.108c-0.027-4.713-3.87-8.511-8.583-8.484h-3.413c-18.72,0.066-37.273-3.529-54.613-10.581\r\n c-3.195-1.315-6.867-0.573-9.301,1.877l-64.427,64.512c-20.006,20.006-52.442,20.006-72.448,0\r\n c-20.006-20.006-20.006-52.442,0-72.448l108.971-108.885c19.99-19.965,52.373-19.965,72.363,0\r\n c13.472,12.679,34.486,12.679,47.957,0c5.796-5.801,9.31-13.495,9.899-21.675C322.976,216.108,319.371,206.535,312.453,199.601z"
20
+ d: "M312.453,199.601c-6.066-6.102-12.792-11.511-20.053-16.128c-19.232-12.315-41.59-18.859-64.427-18.859\n c-31.697-0.059-62.106,12.535-84.48,34.987L34.949,308.23c-22.336,22.379-34.89,52.7-34.91,84.318\n c-0.042,65.98,53.41,119.501,119.39,119.543c31.648,0.11,62.029-12.424,84.395-34.816l89.6-89.6\n c1.628-1.614,2.537-3.816,2.524-6.108c-0.027-4.713-3.87-8.511-8.583-8.484h-3.413c-18.72,0.066-37.273-3.529-54.613-10.581\n c-3.195-1.315-6.867-0.573-9.301,1.877l-64.427,64.512c-20.006,20.006-52.442,20.006-72.448,0\n c-20.006-20.006-20.006-52.442,0-72.448l108.971-108.885c19.99-19.965,52.373-19.965,72.363,0\n c13.472,12.679,34.486,12.679,47.957,0c5.796-5.801,9.31-13.495,9.899-21.675C322.976,216.108,319.371,206.535,312.453,199.601z"
21
21
  }
22
22
  ) }) }),
23
23
  /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx("g", { children: /* @__PURE__ */ jsx(
24
24
  "path",
25
25
  {
26
- d: "M477.061,34.993c-46.657-46.657-122.303-46.657-168.96,0l-89.515,89.429c-2.458,2.47-3.167,6.185-1.792,9.387\r\n c1.359,3.211,4.535,5.272,8.021,5.205h3.157c18.698-0.034,37.221,3.589,54.528,10.667c3.195,1.315,6.867,0.573,9.301-1.877\r\n l64.256-64.171c20.006-20.006,52.442-20.006,72.448,0c20.006,20.006,20.006,52.442,0,72.448l-80.043,79.957l-0.683,0.768\r\n l-27.989,27.819c-19.99,19.965-52.373,19.965-72.363,0c-13.472-12.679-34.486-12.679-47.957,0\r\n c-5.833,5.845-9.35,13.606-9.899,21.845c-0.624,9.775,2.981,19.348,9.899,26.283c9.877,9.919,21.433,18.008,34.133,23.893\r\n c1.792,0.853,3.584,1.536,5.376,2.304c1.792,0.768,3.669,1.365,5.461,2.048c1.792,0.683,3.669,1.28,5.461,1.792l5.035,1.365\r\n c3.413,0.853,6.827,1.536,10.325,2.133c4.214,0.626,8.458,1.025,12.715,1.195h5.973h0.512l5.12-0.597\r\n c1.877-0.085,3.84-0.512,6.059-0.512h2.901l5.888-0.853l2.731-0.512l4.949-1.024h0.939c20.961-5.265,40.101-16.118,55.381-31.403\r\n l108.629-108.629C523.718,157.296,523.718,81.65,477.061,34.993z"
26
+ d: "M477.061,34.993c-46.657-46.657-122.303-46.657-168.96,0l-89.515,89.429c-2.458,2.47-3.167,6.185-1.792,9.387\n c1.359,3.211,4.535,5.272,8.021,5.205h3.157c18.698-0.034,37.221,3.589,54.528,10.667c3.195,1.315,6.867,0.573,9.301-1.877\n l64.256-64.171c20.006-20.006,52.442-20.006,72.448,0c20.006,20.006,20.006,52.442,0,72.448l-80.043,79.957l-0.683,0.768\n l-27.989,27.819c-19.99,19.965-52.373,19.965-72.363,0c-13.472-12.679-34.486-12.679-47.957,0\n c-5.833,5.845-9.35,13.606-9.899,21.845c-0.624,9.775,2.981,19.348,9.899,26.283c9.877,9.919,21.433,18.008,34.133,23.893\n c1.792,0.853,3.584,1.536,5.376,2.304c1.792,0.768,3.669,1.365,5.461,2.048c1.792,0.683,3.669,1.28,5.461,1.792l5.035,1.365\n c3.413,0.853,6.827,1.536,10.325,2.133c4.214,0.626,8.458,1.025,12.715,1.195h5.973h0.512l5.12-0.597\n c1.877-0.085,3.84-0.512,6.059-0.512h2.901l5.888-0.853l2.731-0.512l4.949-1.024h0.939c20.961-5.265,40.101-16.118,55.381-31.403\n l108.629-108.629C523.718,157.296,523.718,81.65,477.061,34.993z"
27
27
  }
28
28
  ) }) }),
29
29
  /* @__PURE__ */ jsx("g", {}),
@@ -35,14 +35,14 @@ class Auth {
35
35
  */
36
36
  static setAccessToken(token, options = {}) {
37
37
  this.logout();
38
- const cookieDomain = getCookieDomain();
38
+ const cookieOptions = getCookieDomain();
39
39
  const raw = options?.expiresInMs;
40
40
  const expiresInMs = typeof raw === "number" && Number.isFinite(raw) && raw > 0 ? raw : Number(DEFAULT_TOKEN_EXPIRY_MS) || 60 * 60 * 1e3;
41
41
  const expiresAtMs = Date.now() + expiresInMs;
42
42
  const expiresInDays = expiresInMs / (24 * 60 * 60 * 1e3);
43
- cookieDomain.expires = expiresInDays;
44
- Cookies.set("STOKR_ACCESS_TOKEN", token, cookieDomain);
45
- Cookies.set("STOKR_ACCESS_TOKEN_EXPIRES", String(expiresAtMs), cookieDomain);
43
+ const finalOptions = { ...cookieOptions, expires: expiresInDays };
44
+ Cookies.set("STOKR_ACCESS_TOKEN", token, finalOptions);
45
+ Cookies.set("STOKR_ACCESS_TOKEN_EXPIRES", String(expiresAtMs), finalOptions);
46
46
  }
47
47
  static getAccessToken() {
48
48
  return Cookies.get("STOKR_ACCESS_TOKEN");
@@ -58,6 +58,10 @@ class Auth {
58
58
  const cookieDomain = getCookieDomain();
59
59
  Cookies.remove("STOKR_ACCESS_TOKEN", cookieDomain);
60
60
  Cookies.remove("STOKR_ACCESS_TOKEN_EXPIRES", cookieDomain);
61
+ if (cookieDomain.domain) {
62
+ Cookies.remove("STOKR_ACCESS_TOKEN");
63
+ Cookies.remove("STOKR_ACCESS_TOKEN_EXPIRES");
64
+ }
61
65
  }
62
66
  static async login(email, password) {
63
67
  const auth = getFirebaseAuth();
@@ -1,4 +1,4 @@
1
- const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false };
1
+ const __vite_import_meta_env__ = { "BASE_URL": "/", "DEV": false, "MODE": "production", "PROD": true, "SSR": false, "VITE_ADMIN_URL": "https://admin.stokr.info", "VITE_API_URL": "https://platform-api.stokr.info/api/v1", "VITE_BASE_URL_PUBLIC": "https://platform-api-no-auth.stokr.info/api/v1", "VITE_COOKIE_DOMAIN": "localhost", "VITE_DASHBOARD_URL": "https://dashboard.stokr.info", "VITE_FIREBASE_API_KEY": "AIzaSyBBp_3Romnfv--YpUuV0mJgDymvSp3oq0c", "VITE_FIREBASE_APP_ID": "1:568229412804:web:2391857e3e2a0b02346e91", "VITE_FIREBASE_AUTH_DOMAIN": "stokr-development-env.firebaseapp.com", "VITE_FIREBASE_MEASUREMENT_ID": "G-CP53SZVSMN", "VITE_FIREBASE_MESSAGING_SENDER_ID": "568229412804", "VITE_FIREBASE_PROJECT_ID": "stokr-development-env", "VITE_FIREBASE_STORAGE_BUCKET": "stokr-development-env.appspot.com", "VITE_MIXPANEL_TOKEN": "a7bb1e881f9b2600762fded84d8ce0ea", "VITE_ONBOARDING_URL": "https://signup.stokr.info", "VITE_PHOTO_API_URL": "https://platform-api.stokr.info/api/v1", "VITE_REGISTER_URL": "https://stokr.info/signup", "VITE_WEBSITE_DOMAIN": "stokr.info" };
2
2
  const _overrides = {};
3
3
  const ENV_KEY_BY_CONFIG = {
4
4
  apiUrl: "VITE_API_URL",