@crystaldesign/diva-core 24.11.0-beta.4 → 24.11.0-beta.41

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.
@@ -1,4 +1,4 @@
1
- import { i as styleInject, u as useDivaCoreContext } from './index-c3023714.js';
1
+ import { i as styleInject, u as useDivaCoreContext } from './index-db2dd092.js';
2
2
  import { useState, useEffect, useCallback } from 'react';
3
3
  import { observer } from 'mobx-react-lite';
4
4
  import Button from '@material-ui/core/Button';
@@ -1,4 +1,4 @@
1
- import { u as useDivaCoreContext, B as Button, s as socialButton, g as google, m as microsoft, a as getLogger, e as error, b as separator, I as Input, r as resetInput, l as link, c as success, d as auth, f as loginBox, h as logoContainer } from './index-c3023714.js';
1
+ import { u as useDivaCoreContext, B as Button, s as socialButton, g as google, m as microsoft, a as getLogger, e as error, b as separator, I as Input, r as resetInput, l as link, c as success, d as auth, f as loginBox, h as logoContainer } from './index-db2dd092.js';
2
2
  import { useState, useRef, useEffect, useMemo } from 'react';
3
3
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
4
4
  import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
@@ -122,7 +122,7 @@ function Login() {
122
122
  var _useTranslation = useTranslation(),
123
123
  t = _useTranslation.t;
124
124
  var onContinue = /*#__PURE__*/function () {
125
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
125
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
126
126
  var checkInvitation, response;
127
127
  return _regeneratorRuntime.wrap(function _callee$(_context) {
128
128
  while (1) switch (_context.prev = _context.next) {
@@ -154,7 +154,7 @@ function Login() {
154
154
  if (response.provider == 'standard') {
155
155
  setStep('login');
156
156
  } else {
157
- authorizationStore.openOAuthLogin(response.provider, authorizationStore.state.organizationId);
157
+ authorizationStore.openOAuthLogin(response.provider, authorizationStore.state.organizationId, authorizationStore.state.invitationId);
158
158
  }
159
159
  _context.next = 16;
160
160
  break;
@@ -176,7 +176,7 @@ function Login() {
176
176
  };
177
177
  }();
178
178
  var onLogin = /*#__PURE__*/function () {
179
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
179
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
180
180
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
181
181
  while (1) switch (_context2.prev = _context2.next) {
182
182
  case 0:
@@ -213,7 +213,7 @@ function Login() {
213
213
  setError(undefined);
214
214
  };
215
215
  var resetPassword = /*#__PURE__*/function () {
216
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
216
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
217
217
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
218
218
  while (1) switch (_context3.prev = _context3.next) {
219
219
  case 0:
@@ -348,7 +348,7 @@ function RequestNewPassword (_ref) {
348
348
  var _useTranslation = useTranslation(),
349
349
  t = _useTranslation.t;
350
350
  var resetPassword = /*#__PURE__*/function () {
351
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
351
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
352
352
  return _regeneratorRuntime.wrap(function _callee$(_context) {
353
353
  while (1) switch (_context.prev = _context.next) {
354
354
  case 0:
@@ -481,7 +481,7 @@ function ChangePassword (_ref) {
481
481
  }
482
482
  }, [password1, password2]);
483
483
  var resetPassword = /*#__PURE__*/function () {
484
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
484
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
485
485
  return _regeneratorRuntime.wrap(function _callee$(_context) {
486
486
  while (1) switch (_context.prev = _context.next) {
487
487
  case 0:
@@ -610,7 +610,8 @@ var divaLogo = "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2
610
610
 
611
611
  function WelcomeScreen (_ref) {
612
612
  var isNewUser = _ref.isNewUser,
613
- invitationId = _ref.invitationId;
613
+ invitationId = _ref.invitationId,
614
+ invitationOrgId = _ref.invitationOrgId;
614
615
  var _useDivaCoreContext = useDivaCoreContext(),
615
616
  authorizationStore = _useDivaCoreContext.authorizationStore,
616
617
  authorizationHandler = _useDivaCoreContext.authorizationHandler;
@@ -621,7 +622,7 @@ function WelcomeScreen (_ref) {
621
622
  var _useTranslation = useTranslation(),
622
623
  t = _useTranslation.t;
623
624
  var toLogin = /*#__PURE__*/function () {
624
- var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
625
+ var _ref2 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
625
626
  var invitationMail;
626
627
  return _regeneratorRuntime.wrap(function _callee$(_context) {
627
628
  while (1) switch (_context.prev = _context.next) {
@@ -632,7 +633,7 @@ function WelcomeScreen (_ref) {
632
633
  invitationMail = _context.sent;
633
634
  if (invitationMail) {
634
635
  authorizationStore.close();
635
- authorizationStore.showLogin(undefined, undefined, undefined, invitationId, invitationMail);
636
+ authorizationStore.showLogin(undefined, undefined, invitationOrgId, invitationId, invitationMail);
636
637
  }
637
638
  case 4:
638
639
  case "end":
@@ -645,7 +646,7 @@ function WelcomeScreen (_ref) {
645
646
  };
646
647
  }();
647
648
  var toRegister = /*#__PURE__*/function () {
648
- var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
649
+ var _ref3 = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
649
650
  var invitationMail;
650
651
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
651
652
  while (1) switch (_context2.prev = _context2.next) {
@@ -672,7 +673,7 @@ function WelcomeScreen (_ref) {
672
673
  return _checkInvitation.apply(this, arguments);
673
674
  }
674
675
  function _checkInvitation() {
675
- _checkInvitation = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
676
+ _checkInvitation = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee3() {
676
677
  var _authorizationStore$s;
677
678
  var invitationId, invitation;
678
679
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
@@ -760,7 +761,7 @@ function Register() {
760
761
  agbAccepted = _useState16[0],
761
762
  setAgbAccepted = _useState16[1];
762
763
  var onRegister = /*#__PURE__*/function () {
763
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
764
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
764
765
  var _authorizationStore$s2;
765
766
  return _regeneratorRuntime.wrap(function _callee$(_context) {
766
767
  while (1) switch (_context.prev = _context.next) {
@@ -974,7 +975,8 @@ var AuthElements = observer(function () {
974
975
  case 'WELCOME':
975
976
  return /*#__PURE__*/jsx(WelcomeScreen, {
976
977
  isNewUser: authorizationStore.state.isNewUser,
977
- invitationId: authorizationStore.state.invitationId
978
+ invitationId: authorizationStore.state.invitationId,
979
+ invitationOrgId: authorizationStore.state.invitationOrgId
978
980
  });
979
981
  case 'REGISTER':
980
982
  return /*#__PURE__*/jsx(Register$1, {});