react-easy-wall 1.1.13 → 1.1.15

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.
@@ -1,18 +1,16 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var jsxRuntime = require('react/jsx-runtime');
5
4
  var session_hooks = require('../session/session.hooks.js');
6
- var PaywallSubscription = require('./PaywallSubscription.js');
7
5
 
8
- const Paywall = ({ children, post, postTypeField, postType }) => {
6
+ const Paywall = ({ children, post, postTypeField, postType, PaywallSubscriptionComponent, PaywallRegisterComponent, }) => {
9
7
  const { user, subscription } = session_hooks.useSession();
10
8
  const postTypeValue = post[postTypeField];
11
9
  if (!subscription && post && postTypeValue && postTypeValue === postType) {
12
- return jsxRuntime.jsx(PaywallSubscription.PaywallSubscription, { post: post });
10
+ return PaywallSubscriptionComponent;
13
11
  }
14
12
  if (!user && post && postTypeValue && postTypeValue === postType) {
15
- return null;
13
+ return PaywallRegisterComponent;
16
14
  }
17
15
  return children;
18
16
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Paywall.js","sources":["../../../../src/components/paywall/Paywall.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\nimport { PaywallSubscription } from './PaywallSubscription';\n\nexport interface PaywallProps {\n children?: React.ReactNode;\n post?: any;\n postTypeField?: string;\n postType?: string;\n}\n\nexport const Paywall: React.FC<PaywallProps> = ({ children, post, postTypeField, postType }) => {\n const { user, subscription } = useSession();\n const postTypeValue = post[postTypeField as string];\n if (!subscription && post && postTypeValue && postTypeValue === postType) {\n return <PaywallSubscription post={post} />;\n }\n\n if (!user && post && postTypeValue && postTypeValue === postType) {\n return null;\n }\n\n return children;\n};\n"],"names":[],"mappings":";;;;;;;AAaO;;AAEL;;AAEE;;;AAIA;;AAGF;AACF;;"}
1
+ {"version":3,"file":"Paywall.js","sources":["../../../../src/components/paywall/Paywall.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { PaywallSubscription } from './PaywallSubscription';\n\nexport interface PaywallProps {\n children?: React.ReactNode;\n PaywallSubscriptionComponent?: React.ReactNode;\n PaywallRegisterComponent?: React.ReactNode;\n post?: any;\n postTypeField?: string;\n postType?: string;\n}\n\nexport const Paywall: React.FC<PaywallProps> = ({\n children,\n post,\n postTypeField,\n postType,\n PaywallSubscriptionComponent,\n PaywallRegisterComponent,\n}) => {\n const { user, subscription } = useSession();\n const postTypeValue = post[postTypeField as string];\n if (!subscription && post && postTypeValue && postTypeValue === postType) {\n return PaywallSubscriptionComponent;\n }\n\n if (!user && post && postTypeValue && postTypeValue === postType) {\n return PaywallRegisterComponent;\n }\n\n return children;\n};\n"],"names":[],"mappings":";;;;;AAcO;;AASL;;AAEE;;;AAIA;;AAGF;AACF;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  'use strict';
2
3
 
3
4
  var jsxRuntime = require('react/jsx-runtime');
@@ -1 +1 @@
1
- {"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\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\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/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":["PAYWALL_AUTH_ENDPOINT","_jsx","Box","_jsxs","Typography","Button"],"mappings":";;;;;;;;MAkBa,mBAAmB,GAAuC,CAAC,EACtE,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAAG,mBAAmB,EACzC,oBAAoB,GAAG,EAAE,EACzB,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,8CAA8C,EACtD,QAAQ,GAAG,iHAAiH,EAC5H,IAAI,EACJ,UAAU,GAAG,YAAY,GAC1B,KAAI;IACH,MAAM,EAAE,EAAE,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,EAAE,GAAG,cAAc;IACrE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAE,GAAG,aAAa;IAClE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,aAAa,EAAE,GAAG,UAAU;IACzD,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,GAAG,eAAe,EAAE,GAAG,W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AAS;AACvB,wBAAA,GAAG,aAAa;qBACjB,EACD,OAAO,EAAE,MAAM,YAAY,EAAE,EAAA,GACzB,eAAe,EAAA,QAAA,EAClB,UAAU,EAAA,CACJ,EACTJ,cAAA,CAACI,cAAM,EAAA,EACL,gBAAgB,EAAA,IAAA,EAChB,aAAa,EAAA,IAAA,EACb,kBAAkB,EAAA,IAAA,EAClB,kBAAkB,EAAA,IAAA,EAClB,EAAE,EAAE;AACF,wBAAA,cAAc,EAAE,WAAW;AAC3B,wBAAA,UAAU,EAAE,aAAa;AACzB,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,UAAU,EAAE,GAAG;AACf,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,QAAQ,EAAE,MAAM;AAChB,wBAAA,UAAU,EAAE,OAAO;AACnB,wBAAA,aAAa,EAAE,OAAO;AACtB,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,YAAY,EAAE,QAAQ;AACtB,wBAAA,KAAK,EAAE,OAAO;AACd,wBAAA,GAAG,sBAAsB;AAC1B,qBAAA,EACD,OAAO,EAAE,MAAM,qBAAqB,EAAE,EAAA,GAClC,wBAAwB,YAC3B,mBAAmB,EAAA,CACb,CAAA,EAAA,CACL,EAAA,CACF;AAEV;;;;"}
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';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\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\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/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":";;;;;;;;;;;;;;;;;AAwCM;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;;"}
@@ -5,9 +5,14 @@ var SessionUserProvider = require('./SessionUserProvider.js');
5
5
  var session_server_actions = require('./session.server.actions.js');
6
6
  var appRouterV13 = require('../../node_modules/@mui/material-nextjs/esm/v13-appRouter/appRouterV13.js');
7
7
 
8
- const SessionProvider = async ({ children, config }) => {
8
+ const SessionProvider = async ({ children }) => {
9
+ const config = {
10
+ uri: process.env.NEXT_PUBLIC_URI || '',
11
+ urlPortal: process.env.NEXT_PUBLIC_URL_PORTAL || '',
12
+ cookieTokenName: process.env.NEXT_PUBLIC_COOKIE_TOKEN_NAME || '',
13
+ cookieDomain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN || '',
14
+ };
9
15
  const user = await session_server_actions.getUserServer(config);
10
- console.log({ user });
11
16
  return (jsxRuntime.jsx(appRouterV13.default, { children: jsxRuntime.jsx(SessionUserProvider.SessionUserProvider, { initial: user, config: config, children: children }) }));
12
17
  };
13
18
 
@@ -1 +1 @@
1
- {"version":3,"file":"SessionProvider.js","sources":["../../../../src/components/session/SessionProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { Config } from '../../config/config.types';\nimport { SessionUserProvider } from './SessionUserProvider';\nimport { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';\nimport { getUserServer } from './session.server.actions';\n\ntype SessionProviderProps = {\n children: React.ReactNode;\n config: Config;\n};\n\nexport const SessionProvider: React.FC<SessionProviderProps> = async ({ children, config }) => {\n const user = await getUserServer(config);\n console.log({ user });\n return (\n <AppRouterCacheProvider>\n <SessionUserProvider initial={user} config={config}>\n {children}\n </SessionUserProvider>\n </AppRouterCacheProvider>\n );\n};\n"],"names":["getUserServer","_jsx","AppRouterCacheProvider","SessionUserProvider"],"mappings":";;;;;;;AAWO,MAAM,eAAe,GAAmC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAI;AAC5F,IAAA,MAAM,IAAI,GAAG,MAAMA,oCAAa,CAAC,MAAM,CAAC;AACxC,IAAA,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;AACrB,IAAA,QACEC,cAAA,CAACC,oBAAsB,cACrBD,cAAA,CAACE,uCAAmB,IAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAA,QAAA,EAC/C,QAAQ,EAAA,CACW,EAAA,CACC;AAE7B;;;;"}
1
+ {"version":3,"file":"SessionProvider.js","sources":["../../../../src/components/session/SessionProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { Config } from '../../config/config.types';\nimport { SessionUserProvider } from './SessionUserProvider';\nimport { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';\nimport { getUserServer } from './session.server.actions';\n\ntype SessionProviderProps = {\n children: React.ReactNode;\n};\n\nexport const SessionProvider: React.FC<SessionProviderProps> = async ({ children }) => {\n const config: Config = {\n uri: process.env.NEXT_PUBLIC_URI || '',\n urlPortal: process.env.NEXT_PUBLIC_URL_PORTAL || '',\n cookieTokenName: process.env.NEXT_PUBLIC_COOKIE_TOKEN_NAME || '',\n cookieDomain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN || '',\n };\n const user = await getUserServer(config);\n\n return (\n <AppRouterCacheProvider>\n <SessionUserProvider initial={user} config={config}>\n {children}\n </SessionUserProvider>\n </AppRouterCacheProvider>\n );\n};\n"],"names":["getUserServer","_jsx","AppRouterCacheProvider","SessionUserProvider"],"mappings":";;;;;;;AAUO,MAAM,eAAe,GAAmC,OAAO,EAAE,QAAQ,EAAE,KAAI;AACpF,IAAA,MAAM,MAAM,GAAW;AACrB,QAAA,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE;AACtC,QAAA,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE;AACnD,QAAA,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,EAAE;AAChE,QAAA,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE;KAC1D;AACD,IAAA,MAAM,IAAI,GAAG,MAAMA,oCAAa,CAAC,MAAM,CAAC;AAExC,IAAA,QACEC,cAAA,CAACC,oBAAsB,cACrBD,cAAA,CAACE,uCAAmB,IAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAA,QAAA,EAC/C,QAAQ,EAAA,CACW,EAAA,CACC;AAE7B;;;;"}
@@ -1,16 +1,14 @@
1
1
  "use client";
2
- import { jsx } from 'react/jsx-runtime';
3
2
  import { useSession } from '../session/session.hooks.js';
4
- import { PaywallSubscription } from './PaywallSubscription.js';
5
3
 
6
- const Paywall = ({ children, post, postTypeField, postType }) => {
4
+ const Paywall = ({ children, post, postTypeField, postType, PaywallSubscriptionComponent, PaywallRegisterComponent, }) => {
7
5
  const { user, subscription } = useSession();
8
6
  const postTypeValue = post[postTypeField];
9
7
  if (!subscription && post && postTypeValue && postTypeValue === postType) {
10
- return jsx(PaywallSubscription, { post: post });
8
+ return PaywallSubscriptionComponent;
11
9
  }
12
10
  if (!user && post && postTypeValue && postTypeValue === postType) {
13
- return null;
11
+ return PaywallRegisterComponent;
14
12
  }
15
13
  return children;
16
14
  };
@@ -1 +1 @@
1
- {"version":3,"file":"Paywall.js","sources":["../../../../src/components/paywall/Paywall.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { Box } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\nimport { PaywallSubscription } from './PaywallSubscription';\n\nexport interface PaywallProps {\n children?: React.ReactNode;\n post?: any;\n postTypeField?: string;\n postType?: string;\n}\n\nexport const Paywall: React.FC<PaywallProps> = ({ children, post, postTypeField, postType }) => {\n const { user, subscription } = useSession();\n const postTypeValue = post[postTypeField as string];\n if (!subscription && post && postTypeValue && postTypeValue === postType) {\n return <PaywallSubscription post={post} />;\n }\n\n if (!user && post && postTypeValue && postTypeValue === postType) {\n return null;\n }\n\n return children;\n};\n"],"names":[],"mappings":";;;;;AAaO;;AAEL;;AAEE;;;AAIA;;AAGF;AACF;;"}
1
+ {"version":3,"file":"Paywall.js","sources":["../../../../src/components/paywall/Paywall.tsx"],"sourcesContent":["'use client';\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { PaywallSubscription } from './PaywallSubscription';\n\nexport interface PaywallProps {\n children?: React.ReactNode;\n PaywallSubscriptionComponent?: React.ReactNode;\n PaywallRegisterComponent?: React.ReactNode;\n post?: any;\n postTypeField?: string;\n postType?: string;\n}\n\nexport const Paywall: React.FC<PaywallProps> = ({\n children,\n post,\n postTypeField,\n postType,\n PaywallSubscriptionComponent,\n PaywallRegisterComponent,\n}) => {\n const { user, subscription } = useSession();\n const postTypeValue = post[postTypeField as string];\n if (!subscription && post && postTypeValue && postTypeValue === postType) {\n return PaywallSubscriptionComponent;\n }\n\n if (!user && post && postTypeValue && postTypeValue === postType) {\n return PaywallRegisterComponent;\n }\n\n return children;\n};\n"],"names":[],"mappings":";;;AAcO;;AASL;;AAEE;;;AAIA;;AAGF;AACF;;"}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { jsx, jsxs } from 'react/jsx-runtime';
2
3
  import { PAYWALL_AUTH_ENDPOINT } from './paywall.constants.js';
3
4
  import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
@@ -1 +1 @@
1
- {"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["import React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\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\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/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":["_jsx","_jsxs"],"mappings":";;;;;;MAkBa,mBAAmB,GAAuC,CAAC,EACtE,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAAG,mBAAmB,EACzC,oBAAoB,GAAG,EAAE,EACzB,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,8CAA8C,EACtD,QAAQ,GAAG,iHAAiH,EAC5H,IAAI,EACJ,UAAU,GAAG,YAAY,GAC1B,KAAI;IACH,MAAM,EAAE,EAAE,EAAE,gBAAgB,EAAE,GAAG,iBAAiB,EAAE,GAAG,cAAc;IACrE,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,GAAG,gBAAgB,EAAE,GAAG,aAAa;IAClE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,GAAG,aAAa,EAAE,GAAG,UAAU;IACzD,MAAM,EAAE,EAAE,EAAE,aAAa,EAAE,GAAG,eAAe,EAAE,GAAG,WAAW;IAC7D,MAAM,EAAE,EAAE,EA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EACD,OAAO,EAAE,MAAM,YAAY,EAAE,EAAA,GACzB,eAAe,EAAA,QAAA,EAClB,UAAU,EAAA,CACJ,EACTA,GAAA,CAAC,MAAM,EAAA,EACL,gBAAgB,EAAA,IAAA,EAChB,aAAa,EAAA,IAAA,EACb,kBAAkB,EAAA,IAAA,EAClB,kBAAkB,EAAA,IAAA,EAClB,EAAE,EAAE;AACF,wBAAA,cAAc,EAAE,WAAW;AAC3B,wBAAA,UAAU,EAAE,aAAa;AACzB,wBAAA,aAAa,EAAE,MAAM;AACrB,wBAAA,UAAU,EAAE,GAAG;AACf,wBAAA,SAAS,EAAE,QAAQ;AACnB,wBAAA,QAAQ,EAAE,MAAM;AAChB,wBAAA,UAAU,EAAE,OAAO;AACnB,wBAAA,aAAa,EAAE,OAAO;AACtB,wBAAA,WAAW,EAAE,QAAQ;AACrB,wBAAA,YAAY,EAAE,QAAQ;AACtB,wBAAA,KAAK,EAAE,OAAO;AACd,wBAAA,GAAG,sBAAsB;AAC1B,qBAAA,EACD,OAAO,EAAE,MAAM,qBAAqB,EAAE,EAAA,GAClC,wBAAwB,YAC3B,mBAAmB,EAAA,CACb,CAAA,EAAA,CACL,EAAA,CACF;AAEV;;;;"}
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';\nimport { PAYWALL_AUTH_ENDPOINT } from './paywall.constants';\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\n const handleButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!PAYWALL_AUTH_ENDPOINT) {\n console.error('PAYWALL_AUTH_ENDPOINT is required!');\n return null;\n }\n\n return (window.location.href = `${PAYWALL_AUTH_ENDPOINT}/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":";;;;;;;;;;;;;;;AAwCM;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;;"}
@@ -3,9 +3,14 @@ import { SessionUserProvider } from './SessionUserProvider.js';
3
3
  import { getUserServer } from './session.server.actions.js';
4
4
  import AppRouterCacheProvider from '../../node_modules/@mui/material-nextjs/esm/v13-appRouter/appRouterV13.js';
5
5
 
6
- const SessionProvider = async ({ children, config }) => {
6
+ const SessionProvider = async ({ children }) => {
7
+ const config = {
8
+ uri: process.env.NEXT_PUBLIC_URI || '',
9
+ urlPortal: process.env.NEXT_PUBLIC_URL_PORTAL || '',
10
+ cookieTokenName: process.env.NEXT_PUBLIC_COOKIE_TOKEN_NAME || '',
11
+ cookieDomain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN || '',
12
+ };
7
13
  const user = await getUserServer(config);
8
- console.log({ user });
9
14
  return (jsx(AppRouterCacheProvider, { children: jsx(SessionUserProvider, { initial: user, config: config, children: children }) }));
10
15
  };
11
16
 
@@ -1 +1 @@
1
- {"version":3,"file":"SessionProvider.js","sources":["../../../../src/components/session/SessionProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { Config } from '../../config/config.types';\nimport { SessionUserProvider } from './SessionUserProvider';\nimport { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';\nimport { getUserServer } from './session.server.actions';\n\ntype SessionProviderProps = {\n children: React.ReactNode;\n config: Config;\n};\n\nexport const SessionProvider: React.FC<SessionProviderProps> = async ({ children, config }) => {\n const user = await getUserServer(config);\n console.log({ user });\n return (\n <AppRouterCacheProvider>\n <SessionUserProvider initial={user} config={config}>\n {children}\n </SessionUserProvider>\n </AppRouterCacheProvider>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;AAWO,MAAM,eAAe,GAAmC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAI;AAC5F,IAAA,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC;AACxC,IAAA,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;AACrB,IAAA,QACEA,GAAA,CAAC,sBAAsB,cACrBA,GAAA,CAAC,mBAAmB,IAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAA,QAAA,EAC/C,QAAQ,EAAA,CACW,EAAA,CACC;AAE7B;;;;"}
1
+ {"version":3,"file":"SessionProvider.js","sources":["../../../../src/components/session/SessionProvider.tsx"],"sourcesContent":["import React from 'react';\nimport { Config } from '../../config/config.types';\nimport { SessionUserProvider } from './SessionUserProvider';\nimport { AppRouterCacheProvider } from '@mui/material-nextjs/v15-appRouter';\nimport { getUserServer } from './session.server.actions';\n\ntype SessionProviderProps = {\n children: React.ReactNode;\n};\n\nexport const SessionProvider: React.FC<SessionProviderProps> = async ({ children }) => {\n const config: Config = {\n uri: process.env.NEXT_PUBLIC_URI || '',\n urlPortal: process.env.NEXT_PUBLIC_URL_PORTAL || '',\n cookieTokenName: process.env.NEXT_PUBLIC_COOKIE_TOKEN_NAME || '',\n cookieDomain: process.env.NEXT_PUBLIC_COOKIE_DOMAIN || '',\n };\n const user = await getUserServer(config);\n\n return (\n <AppRouterCacheProvider>\n <SessionUserProvider initial={user} config={config}>\n {children}\n </SessionUserProvider>\n </AppRouterCacheProvider>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;AAUO,MAAM,eAAe,GAAmC,OAAO,EAAE,QAAQ,EAAE,KAAI;AACpF,IAAA,MAAM,MAAM,GAAW;AACrB,QAAA,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,EAAE;AACtC,QAAA,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,EAAE;AACnD,QAAA,eAAe,EAAE,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,EAAE;AAChE,QAAA,YAAY,EAAE,OAAO,CAAC,GAAG,CAAC,yBAAyB,IAAI,EAAE;KAC1D;AACD,IAAA,MAAM,IAAI,GAAG,MAAM,aAAa,CAAC,MAAM,CAAC;AAExC,IAAA,QACEA,GAAA,CAAC,sBAAsB,cACrBA,GAAA,CAAC,mBAAmB,IAAC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAA,QAAA,EAC/C,QAAQ,EAAA,CACW,EAAA,CACC;AAE7B;;;;"}
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
2
  export interface PaywallProps {
3
3
  children?: React.ReactNode;
4
+ PaywallSubscriptionComponent?: React.ReactNode;
5
+ PaywallRegisterComponent?: React.ReactNode;
4
6
  post?: any;
5
7
  postTypeField?: string;
6
8
  postType?: string;
@@ -0,0 +1,16 @@
1
+ import React from 'react';
2
+ import { BoxProps, TypographyProps, ButtonProps } from '@mui/material';
3
+ export interface PaywallRegisterProps {
4
+ post?: any;
5
+ containerProps?: BoxProps;
6
+ titleProps?: TypographyProps;
7
+ subtitleProps?: TypographyProps;
8
+ buttonProps?: ButtonProps;
9
+ buttonText?: string;
10
+ secondaryButtonProps?: ButtonProps;
11
+ secondaryButtonText?: string;
12
+ title?: string;
13
+ subtitle?: string;
14
+ withCaption?: boolean;
15
+ }
16
+ export declare const PaywallRegister: React.FC<PaywallRegisterProps>;
@@ -1,8 +1,6 @@
1
1
  import React from 'react';
2
- import { Config } from '../../config/config.types';
3
2
  type SessionProviderProps = {
4
3
  children: React.ReactNode;
5
- config: Config;
6
4
  };
7
5
  export declare const SessionProvider: React.FC<SessionProviderProps>;
8
6
  export {};
package/dist/index.d.ts CHANGED
@@ -92,7 +92,6 @@ declare const handleLogout: (config: Config | undefined) => void;
92
92
 
93
93
  type SessionProviderProps = {
94
94
  children: React.ReactNode;
95
- config: Config;
96
95
  };
97
96
  declare const SessionProvider: React.FC<SessionProviderProps>;
98
97
 
@@ -115,6 +114,8 @@ declare const PAYWALL_AUTH_ENDPOINT: string;
115
114
 
116
115
  interface PaywallProps {
117
116
  children?: React.ReactNode;
117
+ PaywallSubscriptionComponent?: React.ReactNode;
118
+ PaywallRegisterComponent?: React.ReactNode;
118
119
  post?: any;
119
120
  postTypeField?: string;
120
121
  postType?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-easy-wall",
3
- "version": "1.1.13",
3
+ "version": "1.1.15",
4
4
  "main": "./dist/cjs/index.js",
5
5
  "module": "./dist/esm/index.js",
6
6
  "types": "./dist/index.d.ts",