authscape 1.0.580 → 1.0.584

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
@@ -364,6 +364,17 @@ function AuthScapeApp(_ref) {
364
364
  }
365
365
  }
366
366
  };
367
+ _signedInUser.hasRoleId = function (id) {
368
+ if (_signedInUser.roles != null) {
369
+ if (_signedInUser.roles.find(function (r) {
370
+ return r.id === id;
371
+ }) != null) {
372
+ return true;
373
+ } else {
374
+ return false;
375
+ }
376
+ }
377
+ };
367
378
  _signedInUser.hasPermission = function (name) {
368
379
  if (_signedInUser.permissions != null) {
369
380
  if (_signedInUser.permissions.find(function (r) {
@@ -5382,7 +5393,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
5382
5393
  Object.defineProperty(exports, "__esModule", {
5383
5394
  value: true
5384
5395
  });
5385
- exports["default"] = Pricing;
5396
+ exports.Pricing = Pricing;
5386
5397
  var _react = _interopRequireWildcard(require("react"));
5387
5398
  var _system = require("@mui/system");
5388
5399
  var _material = require("@mui/material");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.580",
3
+ "version": "1.0.584",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -358,6 +358,21 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
358
358
  }
359
359
  };
360
360
 
361
+ _signedInUser.hasRoleId = function(id) {
362
+
363
+ if (_signedInUser.roles != null)
364
+ {
365
+ if (_signedInUser.roles.find(r => r.id === id) != null)
366
+ {
367
+ return true;
368
+ }
369
+ else
370
+ {
371
+ return false;
372
+ }
373
+ }
374
+ };
375
+
361
376
  _signedInUser.hasPermission = function(name) {
362
377
 
363
378
  if (_signedInUser.permissions != null)
@@ -8,7 +8,7 @@ import FormControl from '@mui/material/FormControl';
8
8
  import Select from '@mui/material/Select';
9
9
  import { useForm, Controller } from 'react-hook-form';
10
10
 
11
- export default function Pricing({title = null, tiers = [], features = null, onButtonClicked = null}) {
11
+ export function Pricing({title = null, tiers = [], features = null, onButtonClicked = null}) {
12
12
 
13
13
  const {control, register, handleSubmit, formState: { errors }, watch, setValue } = useForm();
14
14