authscape 1.0.592 → 1.0.596

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
@@ -188,7 +188,7 @@ function AuthScapeApp(_ref) {
188
188
  return _initGA.apply(this, arguments);
189
189
  }
190
190
  var logEvent = function logEvent(category, action, label) {
191
- if (ga4React != null) {
191
+ if (ga4React != null && ga4React.current != null && ga4React != "") {
192
192
  ga4React.current.event(action, label, category);
193
193
  }
194
194
  if (process.env.enableDatabaseAnalytics == "true") {
@@ -251,7 +251,7 @@ function AuthScapeApp(_ref) {
251
251
  }
252
252
  databaseDrivenPageView(window.location.pathname);
253
253
  _router["default"].events.on('routeChangeComplete', function () {
254
- if (ga4React != null) {
254
+ if (ga4React != null && ga4React != "") {
255
255
  try {
256
256
  ga4React.current.pageview(window.location.pathname);
257
257
  } catch (exp) {}
@@ -308,7 +308,7 @@ function AuthScapeApp(_ref) {
308
308
  setIsLoadingShow(isLoading);
309
309
  };
310
310
  var logPurchase = function logPurchase(transactionId, amount, tax, items) {
311
- if (ga4React != null) {
311
+ if (ga4React != null && ga4React != "") {
312
312
  ga4React.current.gtag("event", "purchase", {
313
313
  transaction_id: transactionId,
314
314
  value: amount,
@@ -1504,6 +1504,7 @@ Object.defineProperty(exports, "__esModule", {
1504
1504
  value: true
1505
1505
  });
1506
1506
  exports.Dropzone = void 0;
1507
+ var _iconsMaterial = require("@mui/icons-material");
1507
1508
  var _material = require("@mui/material");
1508
1509
  var _react = _interopRequireWildcard(require("react"));
1509
1510
  var _reactDropzone = require("react-dropzone");
@@ -1544,6 +1545,8 @@ var rejectStyle = {
1544
1545
  var Dropzone = function Dropzone(_ref) {
1545
1546
  var _ref$text = _ref.text,
1546
1547
  text = _ref$text === void 0 ? "Drag 'n' drop some files here, or click to select files" : _ref$text,
1548
+ _ref$image = _ref.image,
1549
+ image = _ref$image === void 0 ? null : _ref$image,
1547
1550
  _ref$styleOverride = _ref.styleOverride,
1548
1551
  styleOverride = _ref$styleOverride === void 0 ? null : _ref$styleOverride,
1549
1552
  _ref$onDrop = _ref.onDrop,
@@ -1587,7 +1590,18 @@ var Dropzone = function Dropzone(_ref) {
1587
1590
  }
1588
1591
  }, /*#__PURE__*/_react["default"].createElement(_material.Box, getRootProps({
1589
1592
  style: style
1590
- }), /*#__PURE__*/_react["default"].createElement("input", getInputProps()), /*#__PURE__*/_react["default"].createElement(_material.Box, null, text)));
1593
+ }), /*#__PURE__*/_react["default"].createElement("input", getInputProps()), /*#__PURE__*/_react["default"].createElement(_material.Box, {
1594
+ sx: {
1595
+ paddingBottom: 1
1596
+ }
1597
+ }, image != null && /*#__PURE__*/_react["default"].createElement("img", {
1598
+ src: image,
1599
+ width: 200,
1600
+ height: 200,
1601
+ style: {
1602
+ objectFit: "contain"
1603
+ }
1604
+ })), /*#__PURE__*/_react["default"].createElement(_material.Box, null, text)));
1591
1605
  };
1592
1606
  exports.Dropzone = Dropzone;
1593
1607
  "use strict";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "authscape",
3
- "version": "1.0.592",
3
+ "version": "1.0.596",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -128,7 +128,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
128
128
 
129
129
  const logEvent = (category, action, label) => {
130
130
 
131
- if (ga4React != null)
131
+ if (ga4React != null && ga4React.current != null && ga4React != "")
132
132
  {
133
133
  ga4React.current.event(action, label, category);
134
134
  }
@@ -216,7 +216,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
216
216
  databaseDrivenPageView(window.location.pathname);
217
217
  Router.events.on('routeChangeComplete', () => {
218
218
 
219
- if (ga4React != null)
219
+ if (ga4React != null && ga4React != "")
220
220
  {
221
221
  try
222
222
  {
@@ -277,7 +277,7 @@ export function AuthScapeApp ({Component, layout, loadingLayout, pageProps, muiT
277
277
 
278
278
  const logPurchase = (transactionId, amount, tax, items) => {
279
279
 
280
- if (ga4React != null)
280
+ if (ga4React != null && ga4React != "")
281
281
  {
282
282
  ga4React.current.gtag("event", "purchase", {
283
283
  transaction_id: transactionId,
@@ -1,3 +1,4 @@
1
+ import { AspectRatio } from '@mui/icons-material';
1
2
  import { Box } from '@mui/material';
2
3
  import React, {useMemo} from 'react';
3
4
  import {useDropzone} from 'react-dropzone';
@@ -32,7 +33,7 @@ const rejectStyle = {
32
33
  borderColor: '#ff1744'
33
34
  };
34
35
 
35
- export const Dropzone = ({text = "Drag 'n' drop some files here, or click to select files", styleOverride = null, onDrop = null, maxFiles = 1, multiple = false, accept = {
36
+ export const Dropzone = ({text = "Drag 'n' drop some files here, or click to select files", image = null, styleOverride = null, onDrop = null, maxFiles = 1, multiple = false, accept = {
36
37
  'image/*': []
37
38
  }}) => {
38
39
 
@@ -82,6 +83,11 @@ export const Dropzone = ({text = "Drag 'n' drop some files here, or click to sel
82
83
  <Box className="container" sx={{cursor:"pointer"}}>
83
84
  <Box {...getRootProps({style})}>
84
85
  <input {...getInputProps()} />
86
+ <Box sx={{paddingBottom:1}}>
87
+ {image != null &&
88
+ <img src={image} width={200} height={200} style={{objectFit: "contain"}} />
89
+ }
90
+ </Box>
85
91
  <Box>{text}</Box>
86
92
  </Box>
87
93
  </Box>