react-easy-wall 1.0.26 → 1.0.28

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.
@@ -7,9 +7,9 @@ var Box = require('../../node_modules/@mui/material/esm/Box/Box.js');
7
7
  var Avatar = require('../../node_modules/@mui/material/esm/Avatar/Avatar.js');
8
8
  var Link = require('../../node_modules/@mui/material/esm/Link/Link.js');
9
9
 
10
- const PanelAvatar = ({ avatarProps, textLink = 'Admin Account', subscriptionImage = null, subscriptionImageContainerProps = {}, }) => {
11
- const { user, config, subscription } = session_hooks.useSession();
12
- return (jsxRuntime.jsxs(Box.default, { px: 1.5, py: 1, display: "flex", alignItems: "center", children: [jsxRuntime.jsxs(Box.default, { mr: 1, position: "relative", children: [jsxRuntime.jsx(Avatar.default, { sx: { width: 40, height: 40, ...avatarProps?.sx }, src: user?.avatar, ...avatarProps }), subscription && subscriptionImage ? (jsxRuntime.jsx(Box.default, { ...subscriptionImageContainerProps, children: subscriptionImage })) : null] }), jsxRuntime.jsxs(Box.default, { children: [jsxRuntime.jsx(Box.default, { mb: 0, children: decodeURIComponent(user?.name) }), jsxRuntime.jsx(Link.default, { href: config?.urlPortal, children: jsxRuntime.jsx(Box.default, { fontSize: 12, children: textLink }) })] })] }));
10
+ const PanelAvatar = ({ avatarProps, textLink = 'Admin Account', SubscriptionImageComponent = null, }) => {
11
+ const { user, config } = session_hooks.useSession();
12
+ return (jsxRuntime.jsxs(Box.default, { px: 1.5, py: 1, display: "flex", alignItems: "center", children: [jsxRuntime.jsxs(Box.default, { mr: 1, position: "relative", children: [jsxRuntime.jsx(Avatar.default, { sx: { width: 40, height: 40, ...avatarProps?.sx }, src: user?.avatar, ...avatarProps }), SubscriptionImageComponent] }), jsxRuntime.jsxs(Box.default, { children: [jsxRuntime.jsx(Box.default, { mb: 0, children: decodeURIComponent(user?.name) }), jsxRuntime.jsx(Link.default, { href: config?.urlPortal, children: jsxRuntime.jsx(Box.default, { fontSize: 12, children: textLink }) })] })] }));
13
13
  };
14
14
 
15
15
  exports.PanelAvatar = PanelAvatar;
@@ -1 +1 @@
1
- {"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, BoxProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textLink?: string;\n subscriptionImage?: React.JSX.Element | null;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps,\n textLink = 'Admin Account',\n subscriptionImage = null,\n subscriptionImageContainerProps = {},\n}) => {\n const { user, config, subscription } = useSession();\n\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {subscription && subscriptionImage ? (\n <Box {...subscriptionImageContainerProps}>{subscriptionImage}</Box>\n ) : null}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal}>\n <Box fontSize={12}>{textLink}</Box>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;AAwCA;;"}
1
+ {"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, BoxProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textLink?: string;\n SubscriptionImageComponent?: React.ReactNode | null;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps,\n textLink = 'Admin Account',\n SubscriptionImageComponent = null,\n}) => {\n const { user, config } = useSession();\n\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {SubscriptionImageComponent}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal}>\n <Box fontSize={12}>{textLink}</Box>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAWO;;;AAyBP;;"}
@@ -0,0 +1,16 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var session_hooks = require('../session/session.hooks.js');
6
+ var Box = require('../../node_modules/@mui/material/esm/Box/Box.js');
7
+
8
+ const PanelSubscriptionIcon = ({ children, subscriptionImageContainerProps = {}, }) => {
9
+ const { subscription } = session_hooks.useSession();
10
+ if (!subscription)
11
+ return null;
12
+ return jsxRuntime.jsx(Box.default, { ...subscriptionImageContainerProps, children: children });
13
+ };
14
+
15
+ exports.PanelSubscriptionIcon = PanelSubscriptionIcon;
16
+ //# sourceMappingURL=PanelSubscriptionIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanelSubscriptionIcon.js","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box ,BoxProps} from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return <Box {...subscriptionImageContainerProps}>{children}</Box>;\n};\n"],"names":[],"mappings":";;;;;;;AAWO;AAIL;AAEA;AAAmB;AAEnB;AACF;;"}
package/dist/cjs/index.js CHANGED
@@ -6,6 +6,7 @@ var PanelHeader = require('./components/panel/PanelHeader.js');
6
6
  var PanelDivider = require('./components/panel/PanelDivider.js');
7
7
  var PanelButton = require('./components/panel/PanelButton.js');
8
8
  var PanelFooter = require('./components/panel/PanelFooter.js');
9
+ var PanelSubscriptionIcon = require('./components/panel/PanelSubscriptionIcon.js');
9
10
  var PanelItem = require('./components/panel/PanelItem.js');
10
11
  var PanelListItems = require('./components/panel/PanelListItems.js');
11
12
  var panel_store = require('./components/panel/panel.store.js');
@@ -20,6 +21,7 @@ exports.PanelHeader = PanelHeader.PanelHeader;
20
21
  exports.PanelDivider = PanelDivider.PanelDivider;
21
22
  exports.PanelButton = PanelButton.PanelButton;
22
23
  exports.PanelFooter = PanelFooter.PanelFooter;
24
+ exports.PanelSubscriptionIcon = PanelSubscriptionIcon.PanelSubscriptionIcon;
23
25
  exports.PanelItem = PanelItem.PanelItem;
24
26
  exports.PanelListItems = PanelListItems.PanelListItems;
25
27
  exports.panelStore = panel_store.panelStore;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -5,9 +5,9 @@ import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
5
5
  import Avatar from '../../node_modules/@mui/material/esm/Avatar/Avatar.js';
6
6
  import Link from '../../node_modules/@mui/material/esm/Link/Link.js';
7
7
 
8
- const PanelAvatar = ({ avatarProps, textLink = 'Admin Account', subscriptionImage = null, subscriptionImageContainerProps = {}, }) => {
9
- const { user, config, subscription } = useSession();
10
- return (jsxs(Box, { px: 1.5, py: 1, display: "flex", alignItems: "center", children: [jsxs(Box, { mr: 1, position: "relative", children: [jsx(Avatar, { sx: { width: 40, height: 40, ...avatarProps?.sx }, src: user?.avatar, ...avatarProps }), subscription && subscriptionImage ? (jsx(Box, { ...subscriptionImageContainerProps, children: subscriptionImage })) : null] }), jsxs(Box, { children: [jsx(Box, { mb: 0, children: decodeURIComponent(user?.name) }), jsx(Link, { href: config?.urlPortal, children: jsx(Box, { fontSize: 12, children: textLink }) })] })] }));
8
+ const PanelAvatar = ({ avatarProps, textLink = 'Admin Account', SubscriptionImageComponent = null, }) => {
9
+ const { user, config } = useSession();
10
+ return (jsxs(Box, { px: 1.5, py: 1, display: "flex", alignItems: "center", children: [jsxs(Box, { mr: 1, position: "relative", children: [jsx(Avatar, { sx: { width: 40, height: 40, ...avatarProps?.sx }, src: user?.avatar, ...avatarProps }), SubscriptionImageComponent] }), jsxs(Box, { children: [jsx(Box, { mb: 0, children: decodeURIComponent(user?.name) }), jsx(Link, { href: config?.urlPortal, children: jsx(Box, { fontSize: 12, children: textLink }) })] })] }));
11
11
  };
12
12
 
13
13
  export { PanelAvatar };
@@ -1 +1 @@
1
- {"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, BoxProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textLink?: string;\n subscriptionImage?: React.JSX.Element | null;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps,\n textLink = 'Admin Account',\n subscriptionImage = null,\n subscriptionImageContainerProps = {},\n}) => {\n const { user, config, subscription } = useSession();\n\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {subscription && subscriptionImage ? (\n <Box {...subscriptionImageContainerProps}>{subscriptionImage}</Box>\n ) : null}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal}>\n <Box fontSize={12}>{textLink}</Box>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;AAwCA;;"}
1
+ {"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, BoxProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textLink?: string;\n SubscriptionImageComponent?: React.ReactNode | null;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps,\n textLink = 'Admin Account',\n SubscriptionImageComponent = null,\n}) => {\n const { user, config } = useSession();\n\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {SubscriptionImageComponent}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal}>\n <Box fontSize={12}>{textLink}</Box>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;AAWO;;;AAyBP;;"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { useSession } from '../session/session.hooks.js';
4
+ import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
5
+
6
+ const PanelSubscriptionIcon = ({ children, subscriptionImageContainerProps = {}, }) => {
7
+ const { subscription } = useSession();
8
+ if (!subscription)
9
+ return null;
10
+ return jsx(Box, { ...subscriptionImageContainerProps, children: children });
11
+ };
12
+
13
+ export { PanelSubscriptionIcon };
14
+ //# sourceMappingURL=PanelSubscriptionIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PanelSubscriptionIcon.js","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box ,BoxProps} from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return <Box {...subscriptionImageContainerProps}>{children}</Box>;\n};\n"],"names":[],"mappings":";;;;;AAWO;AAIL;AAEA;AAAmB;AAEnB;AACF;;"}
package/dist/esm/index.js CHANGED
@@ -4,6 +4,7 @@ export { PanelHeader } from './components/panel/PanelHeader.js';
4
4
  export { PanelDivider } from './components/panel/PanelDivider.js';
5
5
  export { PanelButton } from './components/panel/PanelButton.js';
6
6
  export { PanelFooter } from './components/panel/PanelFooter.js';
7
+ export { PanelSubscriptionIcon } from './components/panel/PanelSubscriptionIcon.js';
7
8
  export { PanelItem } from './components/panel/PanelItem.js';
8
9
  export { PanelListItems } from './components/panel/PanelListItems.js';
9
10
  export { panelStore } from './components/panel/panel.store.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import { AvatarProps, BoxProps } from '@mui/material';
2
+ import { AvatarProps } from '@mui/material';
3
3
  export interface PanelAvatarProps {
4
4
  avatarProps?: AvatarProps;
5
5
  textLink?: string;
6
- subscriptionImage?: React.JSX.Element | null;
7
- subscriptionImageContainerProps?: BoxProps;
6
+ SubscriptionImageComponent?: React.ReactNode | null;
8
7
  }
9
8
  export declare const PanelAvatar: React.FC<PanelAvatarProps>;
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { BoxProps } from '@mui/material';
3
+ export interface PanelSubscriptionIconProps {
4
+ children?: React.ReactNode;
5
+ subscriptionImageContainerProps?: BoxProps;
6
+ }
7
+ export declare const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps>;
@@ -4,6 +4,7 @@ export * from './PanelHeader';
4
4
  export * from './PanelDivider';
5
5
  export * from './PanelButton';
6
6
  export * from './PanelFooter';
7
+ export * from './PanelSubscriptionIcon';
7
8
  export * from './PanelItem';
8
9
  export * from './PanelListItems';
9
10
  export * from './panel.store';
package/dist/index.d.ts CHANGED
@@ -12,8 +12,7 @@ declare const Panel: React.FC<PanelProps>;
12
12
  interface PanelAvatarProps {
13
13
  avatarProps?: AvatarProps;
14
14
  textLink?: string;
15
- subscriptionImage?: React.JSX.Element | null;
16
- subscriptionImageContainerProps?: BoxProps;
15
+ SubscriptionImageComponent?: React.ReactNode | null;
17
16
  }
18
17
  declare const PanelAvatar: React.FC<PanelAvatarProps>;
19
18
 
@@ -42,6 +41,12 @@ interface PanelFooterProps {
42
41
  }
43
42
  declare const PanelFooter: React.FC<PanelFooterProps>;
44
43
 
44
+ interface PanelSubscriptionIconProps {
45
+ children?: React.ReactNode;
46
+ subscriptionImageContainerProps?: BoxProps;
47
+ }
48
+ declare const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps>;
49
+
45
50
  interface PanelItemProps {
46
51
  listItemProps?: ListItemProps & {
47
52
  href?: string;
@@ -91,5 +96,5 @@ type SessionProviderProps = {
91
96
  };
92
97
  declare const SessionProvider: React.FC<SessionProviderProps>;
93
98
 
94
- export { Panel, PanelAvatar, PanelButton, PanelDivider, PanelFooter, PanelHeader, PanelItem, PanelListItems, SessionProvider, handleLogout, handlePanelClick, panelStore, panelStoreAction };
95
- export type { PanelAvatarProps, PanelButtonProps, PanelDividerProps, PanelFooterProps, PanelHeaderProps, PanelItemProps, PanelListRoute, PanelProps, PanelStoreAction };
99
+ export { Panel, PanelAvatar, PanelButton, PanelDivider, PanelFooter, PanelHeader, PanelItem, PanelListItems, PanelSubscriptionIcon, SessionProvider, handleLogout, handlePanelClick, panelStore, panelStoreAction };
100
+ export type { PanelAvatarProps, PanelButtonProps, PanelDividerProps, PanelFooterProps, PanelHeaderProps, PanelItemProps, PanelListRoute, PanelProps, PanelStoreAction, PanelSubscriptionIconProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-easy-wall",
3
- "version": "1.0.26",
3
+ "version": "1.0.28",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/index.d.ts",