react-easy-wall 1.1.15 → 1.1.16
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/dist/cjs/components/paywall/PaywallSubscription.js +7 -7
- package/dist/cjs/components/paywall/PaywallSubscription.js.map +1 -1
- package/dist/cjs/index.js +0 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/components/paywall/PaywallSubscription.js +7 -7
- package/dist/esm/components/paywall/PaywallSubscription.js.map +1 -1
- package/dist/esm/index.js +0 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/paywall/index.d.ts +0 -1
- package/dist/index.d.ts +1 -3
- package/package.json +1 -1
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
5
|
-
var paywall_constants = require('./paywall.constants.js');
|
|
6
5
|
var Box = require('../../node_modules/@mui/material/esm/Box/Box.js');
|
|
7
6
|
var Typography = require('../../node_modules/@mui/material/esm/Typography/Typography.js');
|
|
8
7
|
var Button = require('../../node_modules/@mui/material/esm/Button/Button.js');
|
|
@@ -13,19 +12,20 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
13
12
|
const { sx: sxTitleProps, ...titlePropRest } = titleProps;
|
|
14
13
|
const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;
|
|
15
14
|
const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;
|
|
15
|
+
const url = process.env.NEXT_PUBLIC_URL_PORTAL || '';
|
|
16
16
|
const handleButton = () => {
|
|
17
|
-
if (!
|
|
18
|
-
console.error('
|
|
17
|
+
if (!url) {
|
|
18
|
+
console.error('NEXT_PUBLIC_URL_PORTAL is required!');
|
|
19
19
|
return null;
|
|
20
20
|
}
|
|
21
|
-
return (window.location.href = `${
|
|
21
|
+
return (window.location.href = `${url}/planes?post_url=${window.location.href}`);
|
|
22
22
|
};
|
|
23
23
|
const handleSecondaryButton = () => {
|
|
24
|
-
if (!
|
|
25
|
-
console.error('
|
|
24
|
+
if (!url) {
|
|
25
|
+
console.error('NEXT_PUBLIC_URL_PORTAL is required!');
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
return (window.location.href = `${
|
|
28
|
+
return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);
|
|
29
29
|
};
|
|
30
30
|
return (jsxRuntime.jsx(Box.default, { sx: {
|
|
31
31
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["'use client'
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = 'Ya soy suscriptor',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n const url = process.env.NEXT_PUBLIC_URL_PORTAL || '';\n const handleButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n textTransform: 'none',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAuCM;AACA;;AAGF;AACF;;;AAII;AACA;;AAGF;AACF;AAEA;AAGM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAIG;AACE;AACA;AACD;AACD;AACA;AACA;AACA;AACD;AAGG;AACA;AACA;AACA;AACA;AACA;AACD;AAeC;AACA;AACE;AACD;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAQX;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -13,7 +13,6 @@ var panel_store = require('./components/panel/panel.store.js');
|
|
|
13
13
|
var panel_actions = require('./components/panel/panel.actions.js');
|
|
14
14
|
var SessionProvider = require('./components/session/SessionProvider.js');
|
|
15
15
|
var PaywallSubscription = require('./components/paywall/PaywallSubscription.js');
|
|
16
|
-
var paywall_constants = require('./components/paywall/paywall.constants.js');
|
|
17
16
|
var Paywall = require('./components/paywall/Paywall.js');
|
|
18
17
|
|
|
19
18
|
|
|
@@ -33,6 +32,5 @@ exports.handlePanelClick = panel_actions.handlePanelClick;
|
|
|
33
32
|
exports.panelStoreAction = panel_actions.panelStoreAction;
|
|
34
33
|
exports.SessionProvider = SessionProvider.SessionProvider;
|
|
35
34
|
exports.PaywallSubscription = PaywallSubscription.PaywallSubscription;
|
|
36
|
-
exports.PAYWALL_AUTH_ENDPOINT = paywall_constants.PAYWALL_AUTH_ENDPOINT;
|
|
37
35
|
exports.Paywall = Paywall.Paywall;
|
|
38
36
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { PAYWALL_AUTH_ENDPOINT } from './paywall.constants.js';
|
|
4
3
|
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
5
4
|
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
6
5
|
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
@@ -11,19 +10,20 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
11
10
|
const { sx: sxTitleProps, ...titlePropRest } = titleProps;
|
|
12
11
|
const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;
|
|
13
12
|
const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;
|
|
13
|
+
const url = process.env.NEXT_PUBLIC_URL_PORTAL || '';
|
|
14
14
|
const handleButton = () => {
|
|
15
|
-
if (!
|
|
16
|
-
console.error('
|
|
15
|
+
if (!url) {
|
|
16
|
+
console.error('NEXT_PUBLIC_URL_PORTAL is required!');
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
|
-
return (window.location.href = `${
|
|
19
|
+
return (window.location.href = `${url}/planes?post_url=${window.location.href}`);
|
|
20
20
|
};
|
|
21
21
|
const handleSecondaryButton = () => {
|
|
22
|
-
if (!
|
|
23
|
-
console.error('
|
|
22
|
+
if (!url) {
|
|
23
|
+
console.error('NEXT_PUBLIC_URL_PORTAL is required!');
|
|
24
24
|
return null;
|
|
25
25
|
}
|
|
26
|
-
return (window.location.href = `${
|
|
26
|
+
return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);
|
|
27
27
|
};
|
|
28
28
|
return (jsx(Box, { sx: {
|
|
29
29
|
display: 'flex',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["'use client'
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\n\nexport interface PaywallSubscriptionProps {\n post?: any;\n containerProps?: BoxProps;\n titleProps?: TypographyProps;\n subtitleProps?: TypographyProps;\n buttonProps?: ButtonProps;\n buttonText?: string;\n secondaryButtonProps?: ButtonProps;\n secondaryButtonText?: string;\n title?: string;\n subtitle?: string;\n withCaption?: boolean;\n}\n\nexport const PaywallSubscription: React.FC<PaywallSubscriptionProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = 'Ya soy suscriptor',\n secondaryButtonProps = {},\n withCaption = false,\n title = 'Este artículo es exclusivo para suscriptores',\n subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.',\n post,\n buttonText = 'Suscríbete',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n const url = process.env.NEXT_PUBLIC_URL_PORTAL || '';\n const handleButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n textTransform: 'none',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAuCM;AACA;;AAGF;AACF;;;AAII;AACA;;AAGF;AACF;AAEA;AAGM;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAIG;AACE;AACA;AACD;AACD;AACA;AACA;AACA;AACD;AAGG;AACA;AACA;AACA;AACA;AACA;AACD;AAeC;AACA;AACE;AACD;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACD;AAQX;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -11,6 +11,5 @@ export { panelStore } from './components/panel/panel.store.js';
|
|
|
11
11
|
export { handleLogout, handlePanelClick, panelStoreAction } from './components/panel/panel.actions.js';
|
|
12
12
|
export { SessionProvider } from './components/session/SessionProvider.js';
|
|
13
13
|
export { PaywallSubscription } from './components/paywall/PaywallSubscription.js';
|
|
14
|
-
export { PAYWALL_AUTH_ENDPOINT } from './components/paywall/paywall.constants.js';
|
|
15
14
|
export { Paywall } from './components/paywall/Paywall.js';
|
|
16
15
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -110,8 +110,6 @@ interface PaywallSubscriptionProps {
|
|
|
110
110
|
}
|
|
111
111
|
declare const PaywallSubscription: React.FC<PaywallSubscriptionProps>;
|
|
112
112
|
|
|
113
|
-
declare const PAYWALL_AUTH_ENDPOINT: string;
|
|
114
|
-
|
|
115
113
|
interface PaywallProps {
|
|
116
114
|
children?: React.ReactNode;
|
|
117
115
|
PaywallSubscriptionComponent?: React.ReactNode;
|
|
@@ -122,5 +120,5 @@ interface PaywallProps {
|
|
|
122
120
|
}
|
|
123
121
|
declare const Paywall: React.FC<PaywallProps>;
|
|
124
122
|
|
|
125
|
-
export {
|
|
123
|
+
export { Panel, PanelAvatar, PanelButton, PanelDivider, PanelFooter, PanelHeader, PanelItem, PanelListItems, PanelSubscriptionIcon, Paywall, PaywallSubscription, SessionProvider, handleLogout, handlePanelClick, panelStore, panelStoreAction };
|
|
126
124
|
export type { PanelAvatarProps, PanelButtonProps, PanelDividerProps, PanelFooterProps, PanelHeaderProps, PanelItemProps, PanelListRoute, PanelProps, PanelStoreAction, PanelSubscriptionIconProps, PaywallProps, PaywallSubscriptionProps };
|