react-easy-wall 1.2.6 → 1.2.8
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/panel/PanelButton.js +7 -5
- package/dist/cjs/components/panel/PanelButton.js.map +1 -1
- package/dist/cjs/shared/mui/theme.js +0 -11
- package/dist/cjs/shared/mui/theme.js.map +1 -1
- package/dist/esm/components/panel/PanelButton.js +7 -5
- package/dist/esm/components/panel/PanelButton.js.map +1 -1
- package/dist/esm/shared/mui/theme.js +1 -11
- package/dist/esm/shared/mui/theme.js.map +1 -1
- package/dist/esm/types/components/panel/PanelButton.d.ts +3 -2
- package/dist/index.d.ts +3 -2
- package/package.json +1 -1
|
@@ -9,17 +9,19 @@ var session_hooks = require('../session/session.hooks.js');
|
|
|
9
9
|
var index$1 = require('../../shared/constants/index.js');
|
|
10
10
|
var Button = require('../../node_modules/@mui/material/esm/Button/Button.js');
|
|
11
11
|
|
|
12
|
-
const PanelButton = ({
|
|
12
|
+
const PanelButton = ({ loginButtonText = 'CUENTA', registerButtonText = 'INGRESAR', registerButtonProps, loginButtonProps, params = {}, }) => {
|
|
13
13
|
const { isOpen } = index.libExports.useStore(panel_store.panelStore);
|
|
14
14
|
const { user } = session_hooks.useSession();
|
|
15
15
|
const handleClick = () => {
|
|
16
16
|
if (user)
|
|
17
17
|
return panel_actions.handlePanelClick(!isOpen);
|
|
18
18
|
let url = `${index$1.URL_PORTAL}/autenticacion`;
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
19
|
+
const queryParams = {
|
|
20
|
+
redirect_url: window.location.href,
|
|
21
|
+
...params,
|
|
22
|
+
};
|
|
23
|
+
const queryString = new URLSearchParams(queryParams).toString();
|
|
24
|
+
return (window.location.href = `${url}?${queryString}`);
|
|
23
25
|
};
|
|
24
26
|
if (user) {
|
|
25
27
|
return (jsxRuntime.jsx(Button.default, { onClick: handleClick, ...loginButtonProps, children: loginButtonText }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client';\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { useSession } from '../session/session.hooks';\nimport { URL_PORTAL } from '../../shared/constants';\n\nexport interface PanelButtonProps {\n
|
|
1
|
+
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client';\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { useSession } from '../session/session.hooks';\nimport { URL_PORTAL } from '../../shared/constants';\n\nexport interface PanelButtonProps {\n params?: { [key: string]: string };\n loginButtonText?: string | React.ReactNode;\n registerButtonText?: string | React.ReactNode;\n registerButtonProps?: ButtonProps;\n loginButtonProps?: ButtonProps;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({\n loginButtonText = 'CUENTA',\n registerButtonText = 'INGRESAR',\n registerButtonProps,\n loginButtonProps,\n params = {},\n}) => {\n const { isOpen } = useStore(panelStore);\n const { user } = useSession();\n\n const handleClick = () => {\n if (user) return handlePanelClick(!isOpen);\n\n let url = `${URL_PORTAL}/autenticacion`;\n\n const queryParams = {\n redirect_url: window.location.href,\n ...params,\n };\n\n const queryString = new URLSearchParams(queryParams).toString();\n\n return (window.location.href = `${url}?${queryString}`);\n };\n\n if (user) {\n return (\n <Button onClick={handleClick} {...loginButtonProps}>\n {loginButtonText}\n </Button>\n );\n }\n\n return (\n <Button onClick={handleClick} {...registerButtonProps}>\n {registerButtonText}\n </Button>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;AAyBE;;AAGE;AAAU;AAEV;AAEA;AACE;AACA;;;AAKF;AACF;;AAGE;;AAOF;AAKF;;"}
|
|
@@ -3,17 +3,7 @@
|
|
|
3
3
|
var createTheme = require('../../node_modules/@mui/material/esm/styles/createTheme.js');
|
|
4
4
|
|
|
5
5
|
const PRIMARY_COLOR = '#E8600B';
|
|
6
|
-
const SECONDARY_COLOR = '#c7500a70';
|
|
7
6
|
const theme = createTheme.default({
|
|
8
|
-
palette: {
|
|
9
|
-
primary: {
|
|
10
|
-
main: PRIMARY_COLOR,
|
|
11
|
-
},
|
|
12
|
-
secondary: {
|
|
13
|
-
main: SECONDARY_COLOR,
|
|
14
|
-
},
|
|
15
|
-
},
|
|
16
|
-
//"PT Sans",helvetica,arial,sans-serif
|
|
17
7
|
typography: {
|
|
18
8
|
fontFamily: [
|
|
19
9
|
'Barlow',
|
|
@@ -26,6 +16,5 @@ const theme = createTheme.default({
|
|
|
26
16
|
});
|
|
27
17
|
|
|
28
18
|
exports.PRIMARY_COLOR = PRIMARY_COLOR;
|
|
29
|
-
exports.SECONDARY_COLOR = SECONDARY_COLOR;
|
|
30
19
|
exports.theme = theme;
|
|
31
20
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sources":["../../../../src/shared/mui/theme.ts"],"sourcesContent":["import { createTheme } from '@mui/material/styles';\nexport const PRIMARY_COLOR = '#E8600B';\nexport const SECONDARY_COLOR = '#c7500a70';\nexport const theme = createTheme({\n
|
|
1
|
+
{"version":3,"file":"theme.js","sources":["../../../../src/shared/mui/theme.ts"],"sourcesContent":["import { createTheme } from '@mui/material/styles';\nexport const PRIMARY_COLOR = '#E8600B';\nexport const SECONDARY_COLOR = '#c7500a70';\nexport const theme = createTheme({\n typography: {\n fontFamily: [\n 'Barlow',\n '\"PT Sans\"',\n 'helvetica',\n 'arial',\n 'sans-serif',\n ].join(','),\n },\n\n});\n"],"names":["createTheme"],"mappings":";;;;AACO,MAAM,aAAa,GAAG;AAEtB,MAAM,KAAK,GAAGA,mBAAW,CAAC;AAC7B,IAAA,UAAU,EAAE;AACR,QAAA,UAAU,EAAE;YACR,QAAQ;YACR,WAAW;YACX,WAAW;YACX,OAAO;YACP,YAAY;SACf,CAAC,IAAI,CAAC,GAAG,CAAC;AACd,KAAA;AAEJ,CAAA;;;;;"}
|
|
@@ -7,17 +7,19 @@ import { useSession } from '../session/session.hooks.js';
|
|
|
7
7
|
import { URL_PORTAL } from '../../shared/constants/index.js';
|
|
8
8
|
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
9
9
|
|
|
10
|
-
const PanelButton = ({
|
|
10
|
+
const PanelButton = ({ loginButtonText = 'CUENTA', registerButtonText = 'INGRESAR', registerButtonProps, loginButtonProps, params = {}, }) => {
|
|
11
11
|
const { isOpen } = libExports.useStore(panelStore);
|
|
12
12
|
const { user } = useSession();
|
|
13
13
|
const handleClick = () => {
|
|
14
14
|
if (user)
|
|
15
15
|
return handlePanelClick(!isOpen);
|
|
16
16
|
let url = `${URL_PORTAL}/autenticacion`;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
17
|
+
const queryParams = {
|
|
18
|
+
redirect_url: window.location.href,
|
|
19
|
+
...params,
|
|
20
|
+
};
|
|
21
|
+
const queryString = new URLSearchParams(queryParams).toString();
|
|
22
|
+
return (window.location.href = `${url}?${queryString}`);
|
|
21
23
|
};
|
|
22
24
|
if (user) {
|
|
23
25
|
return (jsx(Button, { onClick: handleClick, ...loginButtonProps, children: loginButtonText }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client';\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { useSession } from '../session/session.hooks';\nimport { URL_PORTAL } from '../../shared/constants';\n\nexport interface PanelButtonProps {\n
|
|
1
|
+
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["'use client';\nimport React, { FC } from 'react';\nimport { Button, ButtonProps } from '@mui/material';\nimport { handlePanelClick } from './panel.actions';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { useSession } from '../session/session.hooks';\nimport { URL_PORTAL } from '../../shared/constants';\n\nexport interface PanelButtonProps {\n params?: { [key: string]: string };\n loginButtonText?: string | React.ReactNode;\n registerButtonText?: string | React.ReactNode;\n registerButtonProps?: ButtonProps;\n loginButtonProps?: ButtonProps;\n}\n\nexport const PanelButton: FC<PanelButtonProps> = ({\n loginButtonText = 'CUENTA',\n registerButtonText = 'INGRESAR',\n registerButtonProps,\n loginButtonProps,\n params = {},\n}) => {\n const { isOpen } = useStore(panelStore);\n const { user } = useSession();\n\n const handleClick = () => {\n if (user) return handlePanelClick(!isOpen);\n\n let url = `${URL_PORTAL}/autenticacion`;\n\n const queryParams = {\n redirect_url: window.location.href,\n ...params,\n };\n\n const queryString = new URLSearchParams(queryParams).toString();\n\n return (window.location.href = `${url}?${queryString}`);\n };\n\n if (user) {\n return (\n <Button onClick={handleClick} {...loginButtonProps}>\n {loginButtonText}\n </Button>\n );\n }\n\n return (\n <Button onClick={handleClick} {...registerButtonProps}>\n {registerButtonText}\n </Button>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;;;AAyBE;;AAGE;AAAU;AAEV;AAEA;AACE;AACA;;;AAKF;AACF;;AAGE;;AAOF;AAKF;;"}
|
|
@@ -1,17 +1,7 @@
|
|
|
1
1
|
import createTheme from '../../node_modules/@mui/material/esm/styles/createTheme.js';
|
|
2
2
|
|
|
3
3
|
const PRIMARY_COLOR = '#E8600B';
|
|
4
|
-
const SECONDARY_COLOR = '#c7500a70';
|
|
5
4
|
const theme = createTheme({
|
|
6
|
-
palette: {
|
|
7
|
-
primary: {
|
|
8
|
-
main: PRIMARY_COLOR,
|
|
9
|
-
},
|
|
10
|
-
secondary: {
|
|
11
|
-
main: SECONDARY_COLOR,
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
//"PT Sans",helvetica,arial,sans-serif
|
|
15
5
|
typography: {
|
|
16
6
|
fontFamily: [
|
|
17
7
|
'Barlow',
|
|
@@ -23,5 +13,5 @@ const theme = createTheme({
|
|
|
23
13
|
},
|
|
24
14
|
});
|
|
25
15
|
|
|
26
|
-
export { PRIMARY_COLOR,
|
|
16
|
+
export { PRIMARY_COLOR, theme };
|
|
27
17
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sources":["../../../../src/shared/mui/theme.ts"],"sourcesContent":["import { createTheme } from '@mui/material/styles';\nexport const PRIMARY_COLOR = '#E8600B';\nexport const SECONDARY_COLOR = '#c7500a70';\nexport const theme = createTheme({\n
|
|
1
|
+
{"version":3,"file":"theme.js","sources":["../../../../src/shared/mui/theme.ts"],"sourcesContent":["import { createTheme } from '@mui/material/styles';\nexport const PRIMARY_COLOR = '#E8600B';\nexport const SECONDARY_COLOR = '#c7500a70';\nexport const theme = createTheme({\n typography: {\n fontFamily: [\n 'Barlow',\n '\"PT Sans\"',\n 'helvetica',\n 'arial',\n 'sans-serif',\n ].join(','),\n },\n\n});\n"],"names":[],"mappings":";;AACO,MAAM,aAAa,GAAG;AAEtB,MAAM,KAAK,GAAG,WAAW,CAAC;AAC7B,IAAA,UAAU,EAAE;AACR,QAAA,UAAU,EAAE;YACR,QAAQ;YACR,WAAW;YACX,WAAW;YACX,OAAO;YACP,YAAY;SACf,CAAC,IAAI,CAAC,GAAG,CAAC;AACd,KAAA;AAEJ,CAAA;;;;"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { ButtonProps } from '@mui/material';
|
|
3
3
|
export interface PanelButtonProps {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
params?: {
|
|
5
|
+
[key: string]: string;
|
|
6
|
+
};
|
|
6
7
|
loginButtonText?: string | React.ReactNode;
|
|
7
8
|
registerButtonText?: string | React.ReactNode;
|
|
8
9
|
registerButtonProps?: ButtonProps;
|
package/dist/index.d.ts
CHANGED
|
@@ -29,8 +29,9 @@ interface PanelDividerProps extends DividerProps {
|
|
|
29
29
|
declare const PanelDivider: React__default.FC<PanelDividerProps>;
|
|
30
30
|
|
|
31
31
|
interface PanelButtonProps {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
params?: {
|
|
33
|
+
[key: string]: string;
|
|
34
|
+
};
|
|
34
35
|
loginButtonText?: string | React__default.ReactNode;
|
|
35
36
|
registerButtonText?: string | React__default.ReactNode;
|
|
36
37
|
registerButtonProps?: ButtonProps;
|