pcm-shared-components 0.0.55 → 0.0.56

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.
Files changed (21) hide show
  1. package/dist/components/Buttons/CustomFab/index.js +4 -3
  2. package/dist/components/Buttons/HelpButton/index.js +1 -4
  3. package/dist/components/Buttons/{TestButton → TestTailwinButton}/index.js +0 -0
  4. package/dist/components/{Buttons → Dialogs}/GenericDialogWindow/components/InnerDialogComponent.js +10 -5
  5. package/dist/components/{Buttons → Dialogs}/GenericDialogWindow/components/OpenDialog.js +1 -1
  6. package/dist/components/{Buttons → Dialogs}/GenericDialogWindow/index.js +54 -9
  7. package/dist/components/{Buttons → Drawing}/CanvasPaint/index.js +0 -0
  8. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/components/Controls.js +1 -1
  9. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/constants/index.js +0 -0
  10. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/constants/types.js +0 -0
  11. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/index.js +9 -4
  12. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/service/image_tools.js +0 -0
  13. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/service/local_storage.js +0 -0
  14. package/dist/components/{Buttons → Drawing}/ImageCanvasDraw/storybook/testMap.test.js +0 -0
  15. package/dist/components/Loaders/LoadingBackdrop/index.js +55 -0
  16. package/dist/components/PcSharedComponentThemeInheritor/index.js +6 -0
  17. package/dist/components/Tools/CodeHighlight/{CodeHighlight.js → index.js} +0 -0
  18. package/dist/index.js +2 -2
  19. package/dist/styles/tailwind.css +1 -1
  20. package/package.json +2 -1
  21. package/dist/components/Buttons/HelpButton/service/local_storage.js +0 -11
@@ -6,7 +6,7 @@ import Tooltip from '@mui/material/Tooltip';
6
6
  import clsx from 'clsx';
7
7
  import MoreVertIcon from '@mui/icons-material/MoreVert';
8
8
  import { ThemeProvider } from '@mui/system';
9
- import { createTheme } from '@mui/material/styles';
9
+ import { createTheme, useTheme } from '@mui/material/styles';
10
10
  const useStyles = makeStyles(() => ({
11
11
  rootFabElement: {
12
12
  margin: 2,
@@ -62,7 +62,8 @@ const CustomFab = props => {
62
62
  iconLocation,
63
63
  theme
64
64
  } = props;
65
- const defaultTheme = createTheme(theme);
65
+ const compTheme = theme ? theme : useTheme();
66
+ const defaultTheme = createTheme(compTheme);
66
67
  const classes = useStyles(props);
67
68
  return /*#__PURE__*/React.createElement(ThemeProvider, {
68
69
  theme: defaultTheme
@@ -158,6 +159,6 @@ CustomFab.propTypes = {
158
159
  /** Theme colors if not using backgroundColor ['primary','secondary'] */
159
160
  color: PropTypes.oneOf(['primary', 'secondary']),
160
161
 
161
- /** Theme object to use on this component*/
162
+ /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
162
163
  theme: PropTypes.object
163
164
  };
@@ -4,7 +4,6 @@ import HelpOutlineIcon from '@mui/icons-material/HelpOutline';
4
4
  import PropTypes from 'prop-types';
5
5
  import { ThemeProvider } from '@mui/system';
6
6
  import { createTheme, useTheme } from '@mui/material/styles';
7
- import { setStorage } from './service/local_storage';
8
7
  export const HelpButton = props => {
9
8
  const {
10
9
  onClickLink,
@@ -16,8 +15,6 @@ export const HelpButton = props => {
16
15
  theme
17
16
  } = props;
18
17
  const compTheme = theme ? theme : useTheme();
19
- setStorage(compTheme);
20
- console.log('debug theme,', compTheme);
21
18
  const defaultTheme = createTheme(compTheme);
22
19
  return /*#__PURE__*/React.createElement(ThemeProvider, {
23
20
  theme: defaultTheme
@@ -64,6 +61,6 @@ HelpButton.propTypes = {
64
61
  /** The size of the button ['small','medium','large'] */
65
62
  size: PropTypes.oneOf(['small', 'medium', 'large']),
66
63
 
67
- /** Theme object to use on this component*/
64
+ /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
68
65
  theme: PropTypes.object
69
66
  };
@@ -1,6 +1,6 @@
1
1
  import React, { useState, forwardRef, useImperativeHandle } from 'react';
2
- import ImageCanvasDraw from '../../ImageCanvasDraw';
3
- import { cedarShade } from '../../ImageCanvasDraw/storybook/testMap.test'; //!forwardRef needed to allow the parent component to access the child functions
2
+ import ImageCanvasDraw from '../../../Drawing/ImageCanvasDraw';
3
+ import { cedarShade } from '../../../Drawing/ImageCanvasDraw/storybook/testMap.test'; //!forwardRef needed to allow the parent component to access the child functions
4
4
 
5
5
  const InnerDialogComponent = /*#__PURE__*/forwardRef((props, ref) => {
6
6
  // Filter out the parentProps object from the props,
@@ -26,7 +26,8 @@ const InnerDialogComponent = /*#__PURE__*/forwardRef((props, ref) => {
26
26
  }));
27
27
 
28
28
  const childRefSave = () => {
29
- setIsLoading(true); //Simulate a save
29
+ setIsLoading(true);
30
+ setCanSave(false); //Simulate a save
30
31
 
31
32
  setTimeout(() => {
32
33
  setIsLoading(false);
@@ -34,11 +35,15 @@ const InnerDialogComponent = /*#__PURE__*/forwardRef((props, ref) => {
34
35
  }, 2000);
35
36
  };
36
37
 
37
- return /*#__PURE__*/React.createElement("div", null, "something here to show...", /*#__PURE__*/React.createElement("button", {
38
+ return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
39
+ className: "m-12"
40
+ }, /*#__PURE__*/React.createElement("span", {
41
+ className: "mr-12"
42
+ }, "This is to simulate a ready to save state..."), /*#__PURE__*/React.createElement("button", {
38
43
  onClick: () => {
39
44
  setCanSave(true);
40
45
  }
41
- }, "Click here to signal to the dialog that we are ready to save."), /*#__PURE__*/React.createElement(ImageCanvasDraw, {
46
+ }, "Click here to signal to the dialog that we are ready to save.")), /*#__PURE__*/React.createElement(ImageCanvasDraw, {
42
47
  outputFormat: 'blob',
43
48
  showDownloadButton: true,
44
49
  onSave: data => {
@@ -1,5 +1,5 @@
1
1
  import React, { useState } from 'react';
2
- import CustomFab from '../../CustomFab';
2
+ import CustomFab from '../../../Buttons/CustomFab';
3
3
  import InnerDialogComponent from './InnerDialogComponent';
4
4
  import GenericDialogWindow from '../index';
5
5
  export const OpenDialog = () => {
@@ -1,7 +1,11 @@
1
1
  import React, { useState, useRef } from 'react';
2
2
  import { Button, Dialog, DialogActions, DialogContent, IconButton, Typography, Toolbar, AppBar } from '@mui/material';
3
- import ArrowBackIcon from '@mui/icons-material/ArrowBack'; // import GridLoading from 'app/main/components/loading/loading';
3
+ import ArrowBackIcon from '@mui/icons-material/ArrowBack';
4
+ import { ThemeProvider } from '@mui/system';
5
+ import { createTheme, useTheme } from '@mui/material/styles';
6
+ import LoadingBackdrop from '../../Loaders/LoadingBackdrop'; // import GridLoading from 'app/main/components/loading/loading';
4
7
 
8
+ import PropTypes from 'prop-types';
5
9
  let debounce;
6
10
  export const GenericDialogWindow = props => {
7
11
  const {
@@ -13,8 +17,11 @@ export const GenericDialogWindow = props => {
13
17
  i18nextStrings = {
14
18
  saveButtonLabel: 'save',
15
19
  backButtonLabel: 'back'
16
- }
17
- } = props; //---------------------------------------------------
20
+ },
21
+ theme
22
+ } = props;
23
+ const compTheme = theme ? theme : useTheme();
24
+ const defaultTheme = createTheme(compTheme); //---------------------------------------------------
18
25
  // Hooks
19
26
  //---------------------------------------------------
20
27
 
@@ -35,11 +42,13 @@ export const GenericDialogWindow = props => {
35
42
  onClose();
36
43
  };
37
44
 
38
- return /*#__PURE__*/React.createElement(Dialog, {
45
+ return /*#__PURE__*/React.createElement(ThemeProvider, {
46
+ theme: defaultTheme
47
+ }, /*#__PURE__*/React.createElement(Dialog, {
39
48
  open: open,
40
49
  onClose: closeDialog,
41
50
  fullScreen: true,
42
- className: "print:hide-me"
51
+ className: ""
43
52
  }, /*#__PURE__*/React.createElement(AppBar, {
44
53
  position: 'relative'
45
54
  }, /*#__PURE__*/React.createElement(Toolbar, {
@@ -64,9 +73,9 @@ export const GenericDialogWindow = props => {
64
73
  color: "inherit",
65
74
  onClick: onSave
66
75
  }, save_button_label)))), /*#__PURE__*/React.createElement(DialogContent, {
67
- className: "pt-4 pl-0 pr-0"
76
+ className: "pt-4 pl-0 pr-0 "
68
77
  }, /*#__PURE__*/React.createElement("div", {
69
- className: "w-full h-full"
78
+ className: "w-full h-full "
70
79
  }, component ? /*#__PURE__*/React.cloneElement(component, {
71
80
  parentProps: {
72
81
  setCanSave,
@@ -83,6 +92,42 @@ export const GenericDialogWindow = props => {
83
92
  color: "primary",
84
93
  onClick: onSave,
85
94
  disabled: !can_save
86
- }, save_button_label)), is_loading && /*#__PURE__*/React.createElement(React.Fragment, null, "Loading..."));
95
+ }, save_button_label)), /*#__PURE__*/React.createElement(LoadingBackdrop, {
96
+ isLoading: is_loading
97
+ })));
98
+ };
99
+ export default GenericDialogWindow;
100
+ GenericDialogWindow.defaultProps = {
101
+ open: false,
102
+ component: undefined,
103
+ data: undefined,
104
+ onClose: () => {},
105
+ showSaveButton: true,
106
+ i18nextStrings: {
107
+ saveButtonLabel: 'save',
108
+ backButtonLabel: 'back'
109
+ },
110
+ theme: undefined
87
111
  };
88
- export default GenericDialogWindow;
112
+ GenericDialogWindow.propTypes = {
113
+ /** Controls weather to open or close the dialog */
114
+ open: PropTypes.bool,
115
+
116
+ /** Any React component to be displayed inside of the dialog body */
117
+ component: PropTypes.element,
118
+
119
+ /** Any data needing to be passed down to the child component */
120
+ data: PropTypes.any,
121
+
122
+ /** the onClose function allows us to have full control over the close process */
123
+ onClose: PropTypes.func,
124
+
125
+ /** To display or hide the save button on the dialog */
126
+ showSaveButton: PropTypes.bool,
127
+
128
+ /** i18next string object */
129
+ i18nextStrings: PropTypes.object,
130
+
131
+ /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
132
+ theme: PropTypes.object
133
+ };
@@ -5,7 +5,7 @@ import { combineDrawing } from '../service/image_tools';
5
5
  import imageCompression from 'browser-image-compression';
6
6
  import { ChromePicker } from 'react-color';
7
7
  import Button from '@mui/material/Button';
8
- import { OUTPUT_TYPES } from '.././constants';
8
+ import { OUTPUT_TYPES } from '../constants';
9
9
  const imageScaleMarks = [{
10
10
  value: 1.5,
11
11
  label: 'Full'
@@ -7,7 +7,7 @@ import Button from '@mui/material/Button';
7
7
  import { getStorage, setStorage } from './service/local_storage';
8
8
  import PropTypes from 'prop-types';
9
9
  import { ThemeProvider } from '@mui/system';
10
- import { createTheme } from '@mui/material/styles';
10
+ import { createTheme, useTheme } from '@mui/material/styles';
11
11
  /**
12
12
  * Displays an image that can is used to draw on to generate maps with highlighted routes.
13
13
  *
@@ -31,7 +31,8 @@ const ImageCanvasDraw = props => {
31
31
  b64DataUrl,
32
32
  theme
33
33
  } = props;
34
- const defaultTheme = createTheme(theme);
34
+ const compTheme = theme ? theme : useTheme();
35
+ const defaultTheme = createTheme(compTheme);
35
36
  const [state, setState] = useState({
36
37
  drawerOpen: true,
37
38
  color: "darkorange",
@@ -159,7 +160,8 @@ ImageCanvasDraw.defaultProps = {
159
160
  onSave: undefined,
160
161
  outputFormat: 'blob',
161
162
  showDownloadButton: undefined,
162
- b64DataUrl: undefined
163
+ b64DataUrl: undefined,
164
+ theme: undefined
163
165
  };
164
166
  ImageCanvasDraw.propTypes = {
165
167
  /** On save function to execute returns either base64 or blob format based on the output format specified
@@ -181,5 +183,8 @@ ImageCanvasDraw.propTypes = {
181
183
  showDownloadButton: PropTypes.bool,
182
184
 
183
185
  /** This is the image in a base 64 url format to use as the base image to draw on */
184
- b64DataUrl: PropTypes.string.isRequired
186
+ b64DataUrl: PropTypes.string.isRequired,
187
+
188
+ /** Theme object to use on this component, if none provided then the MUI5 theme provider theme is used*/
189
+ theme: PropTypes.object
185
190
  };
@@ -0,0 +1,55 @@
1
+ import React from "react";
2
+ import "./styles.css";
3
+ import PropTypes from 'prop-types';
4
+ /**
5
+ * A backdrop loading panel that covers the entire screen and displays a loading spinner with the logo of your choice
6
+ *
7
+ */
8
+
9
+ export const LoadingBackdrop = ({
10
+ isLoading = false
11
+ }) => {
12
+ return /*#__PURE__*/React.createElement("div", {
13
+ style: {
14
+ zIndex: 1000000
15
+ }
16
+ }, isLoading ? /*#__PURE__*/React.createElement("div", {
17
+ id: "loading-wrapper"
18
+ }, /*#__PURE__*/React.createElement("div", {
19
+ id: "fuse-splash-screen"
20
+ }, /*#__PURE__*/React.createElement("div", {
21
+ className: "center"
22
+ }, /*#__PURE__*/React.createElement("div", {
23
+ className: "logo"
24
+ }, /*#__PURE__*/React.createElement("img", {
25
+ width: "120",
26
+ src: '/assets/images/logos/logo2.svg',
27
+ alt: "logo"
28
+ })), /*#__PURE__*/React.createElement("div", {
29
+ className: "spinner-wrapper"
30
+ }, /*#__PURE__*/React.createElement("div", {
31
+ className: "spinner"
32
+ }, /*#__PURE__*/React.createElement("div", {
33
+ className: "inner"
34
+ }, /*#__PURE__*/React.createElement("div", {
35
+ className: "gap"
36
+ }), /*#__PURE__*/React.createElement("div", {
37
+ className: "left"
38
+ }, /*#__PURE__*/React.createElement("div", {
39
+ className: "half-circle"
40
+ })), /*#__PURE__*/React.createElement("div", {
41
+ className: "right"
42
+ }, /*#__PURE__*/React.createElement("div", {
43
+ className: "half-circle"
44
+ })))))))) : /*#__PURE__*/React.createElement("div", null));
45
+ };
46
+ export default LoadingBackdrop; // Specifies the default values for the props:
47
+
48
+ LoadingBackdrop.defaultProps = {
49
+ isLoading: false
50
+ }; // Type of
51
+
52
+ LoadingBackdrop.propTypes = {
53
+ /** Controls if the backdrop is to be displayed */
54
+ isLoading: PropTypes.bool
55
+ };
@@ -1,5 +1,11 @@
1
1
  import React from "react";
2
2
  import { createTheme, useTheme, ThemeProvider } from "@mui/material/styles";
3
+ /**
4
+ * Used to bridge the gab between MUI4 currently used in the app and MUI5 used in this library.
5
+ * By wrapping the app with this function allows the MUI5 theme provider to properly receive the theme eliminating the need to pass in the theme manually as a props to each component.
6
+ *
7
+ */
8
+
3
9
  export const PcSharedComponentThemeInheritor = props => {
4
10
  const {
5
11
  theme,
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import './styles/tailwind.css';
2
- import TestButton from './components/Buttons/TestButton';
3
- import CodeHighlight from './components/Tools/CodeHighlight/CodeHighlight';
2
+ import TestButton from './components/Buttons/TestTailwinButton';
3
+ import CodeHighlight from './components/Tools/CodeHighlight';
4
4
  import CustomFab from './components/Buttons/CustomFab';
5
5
  import HelpButton from './components/Buttons/HelpButton';
6
6
  import PcSharedComponentThemeInheritor from './components/PcSharedComponentThemeInheritor';
@@ -1 +1 @@
1
- *,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2196f380;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative}.m-auto{margin:auto}.mx-6{margin-left:.6rem;margin-right:.6rem}.my-auto{margin-top:auto;margin-bottom:auto}.my-12{margin-top:1.2rem;margin-bottom:1.2rem}.my-6{margin-top:.6rem;margin-bottom:.6rem}.mx-8{margin-left:.8rem;margin-right:.8rem}.mt-6{margin-top:.6rem}.mb-6{margin-bottom:.6rem}.mb-2{margin-bottom:.2rem}.ml-6{margin-left:.6rem}.mt-12{margin-top:1.2rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-full{height:100%}.w-full{width:100%}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.rounded-md{border-radius:.6rem}.border{border-width:1px}.border-transparent{border-color:#0000}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(67 160 71/var(--tw-bg-opacity))}.px-4{padding-left:.4rem;padding-right:.4rem}.py-2{padding-top:.2rem;padding-bottom:.2rem}.px-2{padding-left:.2rem;padding-right:.2rem}.pt-4{padding-top:.4rem}.pl-0{padding-left:0}.pr-0{padding-right:0}.pl-16{padding-left:1.6rem}.text-sm{font-size:1.4rem;line-height:2rem}.text-2xl{font-size:2.4rem;line-height:3.2rem}.text-xl{font-size:2rem;line-height:2.8rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.drop-shadow-none{--tw-drop-shadow:drop-shadow(0 0 #0000)}.drop-shadow-none,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(56 142 60/var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f5f5f5bf}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}
1
+ *,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:#2196f380;--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.relative{position:relative}.m-12{margin:1.2rem}.m-auto{margin:auto}.mx-6{margin-left:.6rem;margin-right:.6rem}.my-auto{margin-top:auto;margin-bottom:auto}.my-12{margin-top:1.2rem;margin-bottom:1.2rem}.my-6{margin-top:.6rem;margin-bottom:.6rem}.mx-8{margin-left:.8rem;margin-right:.8rem}.mt-6{margin-top:.6rem}.mb-2{margin-bottom:.2rem}.mr-12{margin-right:1.2rem}.mt-12{margin-top:1.2rem}.mb-6{margin-bottom:.6rem}.ml-6{margin-left:.6rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-full{height:100%}.w-full{width:100%}.flex-row{flex-direction:row}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.rounded-md{border-radius:.6rem}.border{border-width:1px}.border-transparent{border-color:#0000}.bg-green-600{--tw-bg-opacity:1;background-color:rgb(67 160 71/var(--tw-bg-opacity))}.px-4{padding-left:.4rem;padding-right:.4rem}.py-2{padding-top:.2rem;padding-bottom:.2rem}.px-2{padding-left:.2rem;padding-right:.2rem}.pt-4{padding-top:.4rem}.pl-0{padding-left:0}.pr-0{padding-right:0}.pl-16{padding-left:1.6rem}.text-sm{font-size:1.4rem;line-height:2rem}.text-xl{font-size:2rem;line-height:2.8rem}.text-2xl{font-size:2.4rem;line-height:3.2rem}.font-medium{font-weight:500}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-opacity))}.shadow{--tw-shadow:0 1px 3px 0 #0000001a,0 1px 2px 0 #0000000f;--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px 0 var(--tw-shadow-color)}.shadow,.shadow-sm{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow:0 1px 2px 0 #0000000d;--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color)}.drop-shadow-none{--tw-drop-shadow:drop-shadow(0 0 #0000)}.drop-shadow-none,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.hover\:bg-green-700:hover{--tw-bg-opacity:1;background-color:rgb(56 142 60/var(--tw-bg-opacity))}.hover\:bg-gray-100\/75:hover{background-color:#f5f5f5bf}.focus\:outline-none:focus{outline:2px solid #0000;outline-offset:2px}.focus\:ring-2:focus{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.focus\:ring-green-500:focus{--tw-ring-opacity:1;--tw-ring-color:rgb(76 175 80/var(--tw-ring-opacity))}.focus\:ring-offset-2:focus{--tw-ring-offset-width:2px}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pcm-shared-components",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "babel": {
@@ -64,6 +64,7 @@
64
64
  "prismjs": "^1.27.0",
65
65
  "react-canvas-draw": "^1.2.1",
66
66
  "react-color": "^2.19.3",
67
+ "react-markdown": "^8.0.0",
67
68
  "tinycolor2": "^1.4.2"
68
69
  }
69
70
  }
@@ -1,11 +0,0 @@
1
- const STORAGE_NAME = 'PC_TEST_THEME';
2
- export const setStorage = value => {
3
- try {
4
- //Need to filter out the b64DataUrl object from the state or else it might slow down the browser...
5
- let new_value = Object.fromEntries(Object.entries(value).filter(([key, value]) => key !== 'b64DataUrl'));
6
- localStorage.setItem(STORAGE_NAME, JSON.stringify(new_value));
7
- } catch (error) {
8
- console.error('Error in setting storage for IMAGE Draw:', error);
9
- setStorage('');
10
- }
11
- };