authscape 1.0.462 → 1.0.464

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
@@ -6409,7 +6409,6 @@ var _DeleteRounded = _interopRequireDefault(require("@mui/icons-material/DeleteR
6409
6409
  var _Typography = _interopRequireDefault(require("@mui/material/Typography"));
6410
6410
  var _AppBar = _interopRequireDefault(require("@mui/material/AppBar"));
6411
6411
  var _Toolbar = _interopRequireDefault(require("@mui/material/Toolbar"));
6412
- var _yesNoDialog = _interopRequireDefault(require("../../components/yesNoDialog"));
6413
6412
  var _VisibilityRounded = _interopRequireDefault(require("@mui/icons-material/VisibilityRounded"));
6414
6413
  var _AddRounded = _interopRequireDefault(require("@mui/icons-material/AddRounded"));
6415
6414
  var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
@@ -6430,6 +6429,7 @@ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o =
6430
6429
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
6431
6430
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
6432
6431
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } // import {apiService, authService} from 'authscape';
6432
+ // import YesNoDialog from '../../components/yesNoDialog';
6433
6433
  // import TicketDetail from './TicketDetail';
6434
6434
  function Tickets(_ref) {
6435
6435
  var loadedUser = _ref.loadedUser,
@@ -6712,7 +6712,7 @@ function Tickets(_ref) {
6712
6712
  },
6713
6713
  pageSize: totalTickets,
6714
6714
  rowsPerPageOptions: [20]
6715
- })), /*#__PURE__*/_react["default"].createElement(_yesNoDialog["default"], {
6715
+ })), /*#__PURE__*/_react["default"].createElement(YesNoDialog, {
6716
6716
  open: archiveTicketId != null ? true : false,
6717
6717
  title: "Remove Ticket",
6718
6718
  message: "Are you sure you want to archive this ticket?",
@@ -6740,6 +6740,52 @@ function Tickets(_ref) {
6740
6740
  }
6741
6741
  "use strict";
6742
6742
 
6743
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
6744
+ Object.defineProperty(exports, "__esModule", {
6745
+ value: true
6746
+ });
6747
+ exports["default"] = YesNoDialog;
6748
+ var _react = _interopRequireWildcard(require("react"));
6749
+ var _Button = _interopRequireDefault(require("@mui/material/Button"));
6750
+ var _Dialog = _interopRequireDefault(require("@mui/material/Dialog"));
6751
+ var _DialogActions = _interopRequireDefault(require("@mui/material/DialogActions"));
6752
+ var _DialogContent = _interopRequireDefault(require("@mui/material/DialogContent"));
6753
+ var _DialogContentText = _interopRequireDefault(require("@mui/material/DialogContentText"));
6754
+ var _DialogTitle = _interopRequireDefault(require("@mui/material/DialogTitle"));
6755
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
6756
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
6757
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
6758
+ function YesNoDialog(_ref) {
6759
+ var open = _ref.open,
6760
+ title = _ref.title,
6761
+ message = _ref.message,
6762
+ _ref$yesText = _ref.yesText,
6763
+ yesText = _ref$yesText === void 0 ? "Yes" : _ref$yesText,
6764
+ _ref$noText = _ref.noText,
6765
+ noText = _ref$noText === void 0 ? "No" : _ref$noText,
6766
+ YesAction = _ref.YesAction,
6767
+ NoAction = _ref.NoAction;
6768
+ // Declare a new state variable, which we'll call "count"
6769
+ //const [count, setCount] = useState(0);
6770
+
6771
+ return /*#__PURE__*/_react["default"].createElement(_Dialog["default"], {
6772
+ open: open,
6773
+ onClose: NoAction,
6774
+ "aria-labelledby": "alert-dialog-title",
6775
+ "aria-describedby": "alert-dialog-description"
6776
+ }, /*#__PURE__*/_react["default"].createElement(_DialogTitle["default"], {
6777
+ id: "alert-dialog-title"
6778
+ }, title), /*#__PURE__*/_react["default"].createElement(_DialogContent["default"], null, /*#__PURE__*/_react["default"].createElement(_DialogContentText["default"], {
6779
+ id: "alert-dialog-description"
6780
+ }, message)), /*#__PURE__*/_react["default"].createElement(_DialogActions["default"], null, /*#__PURE__*/_react["default"].createElement(_Button["default"], {
6781
+ onClick: NoAction
6782
+ }, noText), /*#__PURE__*/_react["default"].createElement(_Button["default"], {
6783
+ onClick: YesAction,
6784
+ autoFocus: true
6785
+ }, yesText)));
6786
+ }
6787
+ "use strict";
6788
+
6743
6789
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
6744
6790
  Object.defineProperty(exports, "__esModule", {
6745
6791
  value: true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.462",
3
+ "version": "1.0.464",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -0,0 +1,37 @@
1
+ import React, { useState } from 'react';
2
+ import Button from '@mui/material/Button';
3
+ import Dialog from '@mui/material/Dialog';
4
+ import DialogActions from '@mui/material/DialogActions';
5
+ import DialogContent from '@mui/material/DialogContent';
6
+ import DialogContentText from '@mui/material/DialogContentText';
7
+ import DialogTitle from '@mui/material/DialogTitle';
8
+
9
+ export default function YesNoDialog({open, title, message, yesText = "Yes", noText = "No", YesAction, NoAction}) {
10
+ // Declare a new state variable, which we'll call "count"
11
+ //const [count, setCount] = useState(0);
12
+
13
+ return (
14
+ <Dialog
15
+ open={open}
16
+ onClose={NoAction}
17
+ aria-labelledby="alert-dialog-title"
18
+ aria-describedby="alert-dialog-description">
19
+ <DialogTitle id="alert-dialog-title">
20
+ {title}
21
+ </DialogTitle>
22
+ <DialogContent>
23
+ <DialogContentText id="alert-dialog-description">
24
+ {message}
25
+ </DialogContentText>
26
+ </DialogContent>
27
+ <DialogActions>
28
+ <Button onClick={NoAction}>{noText}</Button>
29
+ <Button onClick={YesAction} autoFocus>
30
+ {yesText}
31
+ </Button>
32
+ </DialogActions>
33
+ </Dialog>
34
+ );
35
+ }
36
+
37
+
@@ -10,7 +10,7 @@ import DeleteRoundedIcon from "@mui/icons-material/DeleteRounded";
10
10
  import Typography from '@mui/material/Typography';
11
11
  import AppBar from '@mui/material/AppBar';
12
12
  import Toolbar from '@mui/material/Toolbar';
13
- import YesNoDialog from '../../components/yesNoDialog';
13
+ // import YesNoDialog from '../../components/yesNoDialog';
14
14
  import VisibilityRoundedIcon from '@mui/icons-material/VisibilityRounded';
15
15
  import AddRoundedIcon from '@mui/icons-material/AddRounded';
16
16
  import InputLabel from '@mui/material/InputLabel';