authscape 1.0.159 → 1.0.161

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/index.js CHANGED
@@ -1147,18 +1147,18 @@ var PageToPDF = function PageToPDF(_ref) {
1147
1147
  var onHideElements = function onHideElements() {
1148
1148
  for (var index = 0; index < showHideClassElements.length; index++) {
1149
1149
  var element = showHideClassElements[index];
1150
- var className = document.getElementsByClassName(element);
1151
- if (className != null) {
1152
- className.style.display = "none";
1150
+ var elements = document.getElementsByClassName(element);
1151
+ for (var i = 0; i < elements.length; i++) {
1152
+ elements[i].style.display = "none";
1153
1153
  }
1154
1154
  }
1155
1155
  };
1156
1156
  var onShowElements = function onShowElements() {
1157
1157
  for (var index = 0; index < showHideClassElements.length; index++) {
1158
1158
  var element = showHideClassElements[index];
1159
- var className = document.getElementsByClassName(element);
1160
- if (className != null) {
1161
- className.style.display = "block";
1159
+ var elements = document.getElementsByClassName(element);
1160
+ for (var i = 0; i < elements.length; i++) {
1161
+ elements[i].style.display = "block";
1162
1162
  }
1163
1163
  }
1164
1164
  };
@@ -2279,16 +2279,33 @@ var authService = function authService() {
2279
2279
  }
2280
2280
  window.location.href = url;
2281
2281
  },
2282
+ manageAccount: function () {
2283
+ var _manageAccount = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
2284
+ return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2285
+ while (1) switch (_context3.prev = _context3.next) {
2286
+ case 0:
2287
+ window.location.href = process.env.AUTHORITYURI + "/Identity/Account/Manage";
2288
+ case 1:
2289
+ case "end":
2290
+ return _context3.stop();
2291
+ }
2292
+ }, _callee3);
2293
+ }));
2294
+ function manageAccount() {
2295
+ return _manageAccount.apply(this, arguments);
2296
+ }
2297
+ return manageAccount;
2298
+ }(),
2282
2299
  logout: function () {
2283
- var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
2300
+ var _logout = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
2284
2301
  var redirectUri,
2285
2302
  AuthUri,
2286
2303
  cookieDomain,
2287
- _args3 = arguments;
2288
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
2289
- while (1) switch (_context3.prev = _context3.next) {
2304
+ _args4 = arguments;
2305
+ return _regeneratorRuntime().wrap(function _callee4$(_context4) {
2306
+ while (1) switch (_context4.prev = _context4.next) {
2290
2307
  case 0:
2291
- redirectUri = _args3.length > 0 && _args3[0] !== undefined ? _args3[0] : null;
2308
+ redirectUri = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : null;
2292
2309
  AuthUri = process.env.AUTHORITYURI;
2293
2310
  cookieDomain = process.env.cookieDomain;
2294
2311
  (0, _nookies.destroyCookie)({}, "access_token", {
@@ -2315,9 +2332,9 @@ var authService = function authService() {
2315
2332
  }, 500);
2316
2333
  case 7:
2317
2334
  case "end":
2318
- return _context3.stop();
2335
+ return _context4.stop();
2319
2336
  }
2320
- }, _callee3);
2337
+ }, _callee4);
2321
2338
  }));
2322
2339
  function logout() {
2323
2340
  return _logout.apply(this, arguments);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.159",
3
+ "version": "1.0.161",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -13,10 +13,9 @@ export const PageToPDF = ({buttonText = "Download", startIcon = <DownloadRounded
13
13
  for (let index = 0; index < showHideClassElements.length; index++) {
14
14
  const element = showHideClassElements[index];
15
15
 
16
- let className = document.getElementsByClassName(element);
17
- if (className != null)
18
- {
19
- className.style.display = "none";
16
+ let elements = document.getElementsByClassName(element);
17
+ for (var i = 0; i < elements.length; i++) {
18
+ elements[i].style.display = "none";
20
19
  }
21
20
  }
22
21
  }
@@ -25,11 +24,10 @@ export const PageToPDF = ({buttonText = "Download", startIcon = <DownloadRounded
25
24
 
26
25
  for (let index = 0; index < showHideClassElements.length; index++) {
27
26
  const element = showHideClassElements[index];
28
-
29
- let className = document.getElementsByClassName(element);
30
- if (className != null)
31
- {
32
- className.style.display = "block";
27
+
28
+ let elements = document.getElementsByClassName(element);
29
+ for (var i = 0; i < elements.length; i++) {
30
+ elements[i].style.display = "block";
33
31
  }
34
32
  }
35
33
  }
@@ -76,6 +76,11 @@ export const authService = () => {
76
76
 
77
77
  window.location.href = url;
78
78
  },
79
+ manageAccount: async () => {
80
+
81
+ window.location.href = process.env.AUTHORITYURI + "/Identity/Account/Manage";
82
+
83
+ },
79
84
  logout: async (redirectUri = null) => {
80
85
 
81
86
  let AuthUri = process.env.AUTHORITYURI;