authscape 1.0.570 → 1.0.573

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.570",
3
+ "version": "1.0.573",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -29,8 +29,6 @@
29
29
  "@emotion/styled": "^11.11.0",
30
30
  "@microsoft/signalr": "^8.0.0",
31
31
  "@monaco-editor/react": "^4.5.1",
32
- "@mui/icons-material": "^5.15.10",
33
- "@mui/material": "^5.15.10",
34
32
  "@mui/x-data-grid": "^5.17.26",
35
33
  "@mui/x-date-pickers": "^6.18.3",
36
34
  "@stripe/react-stripe-js": "^1.9.0",
@@ -343,7 +343,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
343
343
 
344
344
  if (_signedInUser != null)
345
345
  {
346
- _signedInUser.HasRole = function(name) {
346
+ _signedInUser.hasRole = function(name) {
347
347
 
348
348
  if (_signedInUser.roles != null)
349
349
  {
@@ -358,7 +358,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
358
358
  }
359
359
  };
360
360
 
361
- _signedInUser.HasPermission = function(name) {
361
+ _signedInUser.hasPermission = function(name) {
362
362
 
363
363
  if (_signedInUser.permissions != null)
364
364
  {
@@ -212,7 +212,7 @@ import { Select, Grid, MenuItem, Box, Button, Tab, Tabs, TextField } from '@mui/
212
212
  )
213
213
  };
214
214
 
215
- export default function StripePayment({loadedUser, amount = null, priceId = null, stripeCustomerId = null, logOffUserName, invoiceId = null, logOffEmail, paymentMethodType = 3, currentUser, onResponse, payButtonText = null}) {
215
+ export default function StripePayment({amount = null, priceId = null, stripeCustomerId = null, logOffUserName, invoiceId = null, logOffEmail, paymentMethodType = 3, currentUser, onResponse, payButtonText = null}) {
216
216
 
217
217
  const stripePromise = loadStripe(process.env.stripePublicKey);
218
218
  const [options, setOptions] = useState(null);
@@ -269,12 +269,9 @@ import { Select, Grid, MenuItem, Box, Button, Tab, Tabs, TextField } from '@mui/
269
269
 
270
270
  useEffect(() => {
271
271
 
272
- if (loadedUser)
273
- {
274
- paymentMethodOpened();
275
- }
272
+ paymentMethodOpened();
276
273
 
277
- }, [loadedUser]);
274
+ }, []);
278
275
 
279
276
  const handleChange = (event, newValue) => {
280
277
  setValue(newValue);
@@ -1,25 +0,0 @@
1
- import React, {forwardRef, CSSProperties} from 'react';
2
- // import classNames from 'classnames';
3
-
4
- export const Action = forwardRef(
5
- ({active, className, cursor, icon, style, ...props}, ref) => {
6
- return (
7
- <button
8
- ref={ref}
9
- {...props}
10
- className={"Action"}
11
- tabIndex={0}
12
- style={
13
- {
14
- ...style,
15
- cursor,
16
- '--fill': active?.fill,
17
- '--background': active?.background,
18
- }
19
- }
20
- >
21
- {icon()}
22
- </button>
23
- );
24
- }
25
- );
@@ -1,77 +0,0 @@
1
- import React, {forwardRef} from 'react';
2
- import classNames from 'classnames';
3
-
4
- /// use in testing
5
- // import { Handle } from './Handle';
6
- // import { Remove } from './Remove';
7
-
8
-
9
- export const Container = forwardRef(
10
- (
11
- {
12
- children,
13
- columns = 1,
14
- handleProps,
15
- horizontal,
16
- hover,
17
- onClick,
18
- containerStyles,
19
- onRemove,
20
- label,
21
- placeholder,
22
- style,
23
- scrollable,
24
- shadow,
25
- disableHandle = false,
26
- disableDelete = false,
27
- unstyled,
28
- ...props
29
- },
30
- ref
31
- ) => {
32
- const Component = onClick ? 'button' : 'div';
33
-
34
- return (
35
- <Component
36
- {...props}
37
- ref={ref}
38
- style={
39
- {
40
- ...style,
41
- '--columns': columns,
42
- }
43
- }
44
- className={classNames(
45
- containerStyles.Container,
46
- unstyled && containerStyles.unstyled,
47
- horizontal && containerStyles.horizontal,
48
- hover && containerStyles.hover,
49
- placeholder && containerStyles.placeholder,
50
- scrollable && containerStyles.scrollable,
51
- shadow && containerStyles.shadow
52
- )}
53
- onClick={onClick}
54
- tabIndex={onClick ? 0 : undefined}
55
- >
56
- {label ? (
57
- <div className={"Header"}>
58
- {label}
59
- <div className={"Actions"}>
60
-
61
- {!disableDelete &&
62
- <>
63
- {onRemove ? <Remove onClick={onRemove} /> : undefined}
64
- </>
65
- }
66
-
67
- {!disableHandle &&
68
- <Handle {...handleProps} />
69
- }
70
- </div>
71
- </div>
72
- ) : null}
73
- {placeholder ? children : <ul style={{paddingLeft:"10px", paddingRight:"10px", marginTop:"5px"}}>{children}</ul>}
74
- </Component>
75
- );
76
- }
77
- );
@@ -1,24 +0,0 @@
1
- import React, {forwardRef} from 'react';
2
- import DragIndicatorRoundedIcon from '@mui/icons-material/DragIndicatorRounded';
3
-
4
- /// use in testing
5
- // import {Action} from './Action';
6
-
7
- const dragIcon = () => {
8
- return <DragIndicatorRoundedIcon/>
9
- }
10
-
11
- export const Handle = forwardRef(
12
- (props, ref) => {
13
- return (
14
- <Action
15
- icon={dragIcon}
16
- ref={ref}
17
- cursor="grab"
18
- data-cypress="draggable-handle"
19
- {...props}
20
- >
21
- </Action>
22
- );
23
- }
24
- );
@@ -1,149 +0,0 @@
1
- import React, {useEffect} from 'react';
2
- import classNames from 'classnames';
3
-
4
- /// use in testing
5
- // import { Handle } from './Handle';
6
- // import { Remove } from './Remove';
7
-
8
- // import styles from './dist/Item.module.css';
9
- import { Box } from '@mui/material';
10
-
11
- export const Item = React.memo(
12
- React.forwardRef(
13
- (
14
- {
15
- color,
16
- dragOverlay,
17
- dragging,
18
- disabled,
19
- fadeIn,
20
- name,
21
- handle,
22
- handleProps,
23
- height,
24
- itemStyles,
25
- cardDetail,
26
- CardTemplate,
27
- index,
28
- listeners,
29
- onRemove,
30
- onCardClicked,
31
- renderItem,
32
- sorting,
33
- style,
34
- transition,
35
- transform,
36
- value,
37
- handleMoreClick,
38
- handleMoreClose,
39
- wrapperStyle,
40
- ...props
41
- },
42
- ref
43
- ) => {
44
- useEffect(() => {
45
- if (!dragOverlay) {
46
- return;
47
- }
48
-
49
- document.body.style.cursor = 'grabbing';
50
-
51
- return () => {
52
- document.body.style.cursor = '';
53
- };
54
- }, [dragOverlay]);
55
-
56
- cardDetail.moreClicked = handleMoreClick;
57
-
58
- return renderItem ? (
59
- renderItem({
60
- dragOverlay: Boolean(dragOverlay),
61
- dragging: Boolean(dragging),
62
- sorting: Boolean(sorting),
63
- index,
64
- fadeIn: Boolean(fadeIn),
65
- listeners,
66
- ref,
67
- style,
68
- transform,
69
- transition,
70
- value,
71
- })
72
- ) : (
73
- <li
74
- className={classNames(
75
- itemStyles.Wrapper,
76
- fadeIn && itemStyles.fadeIn,
77
- sorting && itemStyles.sorting,
78
- dragOverlay && itemStyles.dragOverlay
79
- )}
80
- style={
81
- {
82
- ...wrapperStyle,
83
- transition: [transition, wrapperStyle?.transition]
84
- .filter(Boolean)
85
- .join(', '),
86
- '--translate-x': transform
87
- ? `${Math.round(transform.x)}px`
88
- : undefined,
89
- '--translate-y': transform
90
- ? `${Math.round(transform.y)}px`
91
- : undefined,
92
- '--scale-x': transform?.scaleX
93
- ? `${transform.scaleX}`
94
- : undefined,
95
- '--scale-y': transform?.scaleY
96
- ? `${transform.scaleY}`
97
- : undefined,
98
- '--index': index,
99
- '--color': color,
100
- paddingTop:"10px"
101
- }
102
- }
103
- ref={ref}
104
- >
105
- <Box
106
- className={classNames(
107
- itemStyles.Item,
108
- dragging && itemStyles.dragging,
109
- handle && itemStyles.withHandle,
110
- dragOverlay && itemStyles.dragOverlay,
111
- disabled && itemStyles.disabled,
112
- color && itemStyles.color
113
- )}
114
- onClick={(e) => {
115
- if (onCardClicked != null)
116
- {
117
- e.stopPropagation();
118
- onCardClicked(value);
119
- }
120
- }}
121
- style={style}
122
- data-cypress="draggable-item"
123
- {...(!handle ? listeners : undefined)}
124
- {...props}
125
- tabIndex={!handle ? 0 : undefined}>
126
-
127
-
128
- {CardTemplate != null &&
129
- <CardTemplate props={cardDetail} />
130
- }
131
-
132
- {CardTemplate == null &&
133
- <Box>
134
- {name}
135
- </Box>
136
- }
137
-
138
- <span className={"Actions"}>
139
- {onRemove ? (
140
- <Remove className={"Remove"} onClick={onRemove} />
141
- ) : null}
142
- {handle ? <Handle {...handleProps} {...listeners} /> : null}
143
- </span>
144
- </Box>
145
- </li>
146
- );
147
- }
148
- )
149
- );