react-easy-wall 2.0.12 → 2.0.13
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/_virtual/index.cjs +3 -3
- package/dist/cjs/_virtual/index2.cjs +2 -2
- package/dist/cjs/_virtual/index3.cjs +2 -8
- package/dist/cjs/_virtual/index3.cjs.map +1 -1
- package/dist/cjs/_virtual/index4.cjs +2 -2
- package/dist/cjs/_virtual/index5.cjs +2 -4
- package/dist/cjs/_virtual/index5.cjs.map +1 -1
- package/dist/cjs/_virtual/index6.cjs +2 -2
- package/dist/cjs/components/comment/CommentProvider.cjs +3 -3
- package/dist/cjs/components/comment/Comments.cjs +4 -4
- package/dist/cjs/components/comment/Comments.cjs.map +1 -1
- package/dist/cjs/components/comment/comment.actions.cjs +8 -8
- package/dist/cjs/components/comment/comment.events.cjs +7 -7
- package/dist/cjs/components/comment/comment.store.cjs +5 -5
- package/dist/cjs/components/comment/comment.utils.cjs +2 -1
- package/dist/cjs/components/comment/comment.utils.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddComment.cjs +4 -5
- package/dist/cjs/components/comment/components/AddComment.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddCommentContainer.cjs +2 -2
- package/dist/cjs/components/comment/components/AddCommentContainer.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddReplyComment.cjs +7 -7
- package/dist/cjs/components/comment/components/AddReplyComment.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddReplyCommentContainer.cjs +2 -2
- package/dist/cjs/components/comment/components/AddReplyCommentContainer.cjs.map +1 -1
- package/dist/cjs/components/comment/components/CommentContainer.cjs +2 -2
- package/dist/cjs/components/comment/components/CommentItem.cjs +2 -2
- package/dist/cjs/components/comment/components/CommentItem.cjs.map +1 -1
- package/dist/cjs/components/comment/components/CommentSubscriptionDialog.cjs +4 -4
- package/dist/cjs/components/comment/components/CommentSubscriptionDialog.cjs.map +1 -1
- package/dist/cjs/components/comment/components/ShowMoreComments.cjs +4 -4
- package/dist/cjs/components/comment/components/ShowMoreComments.cjs.map +1 -1
- package/dist/cjs/components/panel/Panel.cjs +2 -2
- package/dist/cjs/components/panel/PanelButton.cjs +4 -4
- package/dist/cjs/components/panel/PanelButton.cjs.map +1 -1
- package/dist/cjs/components/panel/panel.actions.cjs +4 -4
- package/dist/cjs/components/panel/panel.actions.cjs.map +1 -1
- package/dist/cjs/components/panel/panel.store.cjs +2 -2
- package/dist/cjs/components/session/SessionClientProvider.cjs +2 -2
- package/dist/cjs/components/session/SessionClientProvider.cjs.map +1 -1
- package/dist/cjs/components/session/SessionUserClientProvider.cjs +10 -10
- package/dist/cjs/components/session/SessionUserClientProvider.cjs.map +1 -1
- package/dist/cjs/components/session/session.actions.cjs +8 -8
- package/dist/cjs/components/session/session.actions.cjs.map +1 -1
- package/dist/cjs/components/session/session.events.cjs +13 -13
- package/dist/cjs/components/session/session.events.cjs.map +1 -1
- package/dist/cjs/components/session/session.stores.cjs +2 -2
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/checkDocument.cjs +3 -4
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/checkDocument.cjs.map +1 -1
- package/dist/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.cjs +3 -20
- package/dist/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.cjs.map +1 -1
- package/dist/cjs/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.cjs +2 -2
- package/dist/cjs/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.cjs.map +1 -1
- package/dist/cjs/node_modules/@mui/styled-engine/esm/index.cjs +15 -2
- package/dist/cjs/node_modules/@mui/styled-engine/esm/index.cjs.map +1 -1
- package/dist/cjs/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.cjs +2 -2
- package/dist/cjs/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.cjs.map +1 -1
- package/dist/cjs/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.cjs +2 -2
- package/dist/cjs/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.cjs.map +1 -1
- package/dist/cjs/node_modules/@mui/utils/esm/deepmerge/deepmerge.cjs +1 -1
- package/dist/cjs/node_modules/next/dist/compiled/cookie/index.cjs +1 -1
- package/dist/cjs/node_modules/next/dist/compiled/gzip-size/index.cjs +1 -1
- package/dist/cjs/node_modules/next/dist/compiled/path-to-regexp/index.cjs +1 -1
- package/dist/cjs/node_modules/next/dist/shared/lib/router/utils/index.cjs +1 -1
- package/dist/cjs/node_modules/react-is/index.cjs +1 -1
- package/dist/cjs/shared/components/dialog/DialogDefault.cjs +2 -3
- package/dist/cjs/shared/components/dialog/DialogDefault.cjs.map +1 -1
- package/dist/cjs/shared/components/react-editor/BtnEmoji.cjs +3 -3
- package/dist/cjs/shared/components/react-editor/BtnEmoji.cjs.map +1 -1
- package/dist/cjs/shared/components/react-editor/BtnGif.cjs +4 -4
- package/dist/cjs/shared/components/react-editor/BtnGif.cjs.map +1 -1
- package/dist/cjs/shared/components/react-editor/ReactSimpleWysiwyg.cjs +5 -5
- package/dist/cjs/shared/components/react-editor/ReactSimpleWysiwyg.cjs.map +1 -1
- package/dist/cjs/shared/cookies/index.cjs +2 -2
- package/dist/cjs/shared/cookies/index.cjs.map +1 -1
- package/dist/esm/_virtual/index.js +3 -3
- package/dist/esm/_virtual/index2.js +2 -2
- package/dist/esm/_virtual/index3.js +2 -6
- package/dist/esm/_virtual/index3.js.map +1 -1
- package/dist/esm/_virtual/index4.js +2 -2
- package/dist/esm/_virtual/index5.js +2 -4
- package/dist/esm/_virtual/index5.js.map +1 -1
- package/dist/esm/_virtual/index6.js +2 -2
- package/dist/esm/components/comment/CommentProvider.js +3 -3
- package/dist/esm/components/comment/CommentProvider.js.map +1 -1
- package/dist/esm/components/comment/Comments.js +3 -3
- package/dist/esm/components/comment/Comments.js.map +1 -1
- package/dist/esm/components/comment/comment.actions.js +8 -8
- package/dist/esm/components/comment/comment.actions.js.map +1 -1
- package/dist/esm/components/comment/comment.events.js +7 -7
- package/dist/esm/components/comment/comment.events.js.map +1 -1
- package/dist/esm/components/comment/comment.store.js +5 -5
- package/dist/esm/components/comment/comment.store.js.map +1 -1
- package/dist/esm/components/comment/comment.utils.js +2 -1
- package/dist/esm/components/comment/comment.utils.js.map +1 -1
- package/dist/esm/components/comment/components/AddComment.js +3 -4
- package/dist/esm/components/comment/components/AddComment.js.map +1 -1
- package/dist/esm/components/comment/components/AddCommentContainer.js +1 -1
- package/dist/esm/components/comment/components/AddReplyComment.js +5 -5
- package/dist/esm/components/comment/components/AddReplyComment.js.map +1 -1
- package/dist/esm/components/comment/components/AddReplyCommentContainer.js +1 -1
- package/dist/esm/components/comment/components/CommentContainer.js +2 -2
- package/dist/esm/components/comment/components/CommentContainer.js.map +1 -1
- package/dist/esm/components/comment/components/CommentItem.js +1 -1
- package/dist/esm/components/comment/components/CommentSubscriptionDialog.js +2 -2
- package/dist/esm/components/comment/components/CommentSubscriptionDialog.js.map +1 -1
- package/dist/esm/components/comment/components/ShowMoreComments.js +3 -3
- package/dist/esm/components/comment/components/ShowMoreComments.js.map +1 -1
- package/dist/esm/components/panel/Panel.js +2 -2
- package/dist/esm/components/panel/Panel.js.map +1 -1
- package/dist/esm/components/panel/PanelButton.js +2 -2
- package/dist/esm/components/panel/PanelButton.js.map +1 -1
- package/dist/esm/components/panel/panel.actions.js +2 -2
- package/dist/esm/components/panel/panel.actions.js.map +1 -1
- package/dist/esm/components/panel/panel.store.js +2 -2
- package/dist/esm/components/panel/panel.store.js.map +1 -1
- package/dist/esm/components/session/SessionClientProvider.js +1 -1
- package/dist/esm/components/session/SessionUserClientProvider.js +5 -5
- package/dist/esm/components/session/SessionUserClientProvider.js.map +1 -1
- package/dist/esm/components/session/session.actions.js +5 -5
- package/dist/esm/components/session/session.actions.js.map +1 -1
- package/dist/esm/components/session/session.events.js +10 -10
- package/dist/esm/components/session/session.events.js.map +1 -1
- package/dist/esm/components/session/session.stores.js +2 -2
- package/dist/esm/components/session/session.stores.js.map +1 -1
- package/dist/esm/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
- package/dist/esm/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
- package/dist/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +3 -20
- package/dist/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js.map +1 -1
- package/dist/esm/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js +1 -1
- package/dist/esm/node_modules/@mui/styled-engine/esm/index.js +3 -2
- package/dist/esm/node_modules/@mui/styled-engine/esm/index.js.map +1 -1
- package/dist/esm/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +1 -1
- package/dist/esm/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js +1 -1
- package/dist/esm/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +1 -1
- package/dist/esm/node_modules/next/dist/compiled/cookie/index.js +1 -1
- package/dist/esm/node_modules/next/dist/compiled/gzip-size/index.js +1 -1
- package/dist/esm/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -1
- package/dist/esm/node_modules/next/dist/shared/lib/router/utils/index.js +1 -1
- package/dist/esm/node_modules/react-is/index.js +1 -1
- package/dist/esm/shared/components/dialog/DialogDefault.js +1 -2
- package/dist/esm/shared/components/dialog/DialogDefault.js.map +1 -1
- package/dist/esm/shared/components/react-editor/BtnEmoji.js +3 -3
- package/dist/esm/shared/components/react-editor/BtnEmoji.js.map +1 -1
- package/dist/esm/shared/components/react-editor/BtnGif.js +2 -2
- package/dist/esm/shared/components/react-editor/ReactSimpleWysiwyg.js +2 -2
- package/dist/esm/shared/cookies/index.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var react = require('@emotion/react');
|
|
6
6
|
var require$$2 = require('react/jsx-runtime');
|
|
7
7
|
|
|
8
8
|
function isEmpty(obj) {
|
|
@@ -14,7 +14,7 @@ function GlobalStyles(props) {
|
|
|
14
14
|
defaultTheme = {}
|
|
15
15
|
} = props;
|
|
16
16
|
const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;
|
|
17
|
-
return /*#__PURE__*/require$$2.jsx(
|
|
17
|
+
return /*#__PURE__*/require$$2.jsx(react.Global, {
|
|
18
18
|
styles: globalStyles
|
|
19
19
|
});
|
|
20
20
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GlobalStyles.cjs","sources":["../../../../../../../node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js"],"sourcesContent":["'use client';\n\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;"],"names":["_jsx","Global"],"mappings":";;;;;;;AAKA,SAAS,OAAO,CAAC,GAAG,EAAE;AACtB,EAAE,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC;AAC3E;AACe,SAAS,YAAY,CAAC,KAAK,EAAE;AAC5C,EAAE,MAAM;AACR,IAAI,MAAM;AACV,IAAI,YAAY,GAAG;AACnB,GAAG,GAAG,KAAK;AACX,EAAE,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,YAAY,GAAG,UAAU,CAAC,GAAG,MAAM;AACpI,EAAE,oBAAoBA,cAAI,CAACC
|
|
1
|
+
{"version":3,"file":"GlobalStyles.cjs","sources":["../../../../../../../node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js"],"sourcesContent":["'use client';\n\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;"],"names":["_jsx","Global"],"mappings":";;;;;;;AAKA,SAAS,OAAO,CAAC,GAAG,EAAE;AACtB,EAAE,OAAO,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC;AAC3E;AACe,SAAS,YAAY,CAAC,KAAK,EAAE;AAC5C,EAAE,MAAM;AACR,IAAI,MAAM;AACV,IAAI,YAAY,GAAG;AACnB,GAAG,GAAG,KAAK;AACX,EAAE,MAAM,YAAY,GAAG,OAAO,MAAM,KAAK,UAAU,GAAG,UAAU,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,GAAG,YAAY,GAAG,UAAU,CAAC,GAAG,MAAM;AACpI,EAAE,oBAAoBA,cAAI,CAACC,YAAM,EAAE;AACnC,IAAI,MAAM,EAAE;AACZ,GAAG,CAAC;AACJ;;;;","x_google_ignoreList":[0]}
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var emStyled = require('@emotion/styled');
|
|
6
6
|
var emotionSerialize_esm = require('../../../@emotion/serialize/dist/emotion-serialize.esm.cjs');
|
|
7
|
+
var react = require('@emotion/react');
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* @mui/styled-engine v7.3.8
|
|
@@ -13,7 +14,7 @@ var emotionSerialize_esm = require('../../../@emotion/serialize/dist/emotion-ser
|
|
|
13
14
|
* LICENSE file in the root directory of this source tree.
|
|
14
15
|
*/
|
|
15
16
|
function styled(tag, options) {
|
|
16
|
-
const stylesFactory =
|
|
17
|
+
const stylesFactory = emStyled(tag, options);
|
|
17
18
|
return stylesFactory;
|
|
18
19
|
}
|
|
19
20
|
|
|
@@ -34,6 +35,18 @@ function internal_serializeStyles(styles) {
|
|
|
34
35
|
return emotionSerialize_esm.serializeStyles(wrapper);
|
|
35
36
|
}
|
|
36
37
|
|
|
38
|
+
Object.defineProperty(exports, "ThemeContext", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function () { return react.ThemeContext; }
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(exports, "css", {
|
|
43
|
+
enumerable: true,
|
|
44
|
+
get: function () { return react.css; }
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "keyframes", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () { return react.keyframes; }
|
|
49
|
+
});
|
|
37
50
|
exports.default = styled;
|
|
38
51
|
exports.internal_mutateStyles = internal_mutateStyles;
|
|
39
52
|
exports.internal_serializeStyles = internal_serializeStyles;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@mui/styled-engine/esm/index.js"],"sourcesContent":["/**\n * @mui/styled-engine v7.3.8\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use client';\n\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nimport { serializeStyles as emSerializeStyles } from '@emotion/serialize';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_mutateStyles(tag, processor) {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n}\n\n// Emotion only accepts an array, but we want to avoid allocations\nconst wrapper = [];\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_serializeStyles(styles) {\n wrapper[0] = styles;\n return emSerializeStyles(wrapper);\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";"],"names":["
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../../../node_modules/@mui/styled-engine/esm/index.js"],"sourcesContent":["/**\n * @mui/styled-engine v7.3.8\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use client';\n\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nimport { serializeStyles as emSerializeStyles } from '@emotion/serialize';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_mutateStyles(tag, processor) {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n}\n\n// Emotion only accepts an array, but we want to avoid allocations\nconst wrapper = [];\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_serializeStyles(styles) {\n wrapper[0] = styles;\n return emSerializeStyles(wrapper);\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";"],"names":["emSerializeStyles"],"mappings":";;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AAMe,SAAS,MAAM,CAAC,GAAG,EAAE,OAAO,EAAE;AAC7C,EAAE,MAAM,aAAa,GAAG,QAAQ,CAAC,GAAG,EAAE,OAAO,CAAC;AAY9C,EAAE,OAAO,aAAa;AACtB;;AAEA;AACO,SAAS,qBAAqB,CAAC,GAAG,EAAE,SAAS,EAAE;AACtD;AACA;AACA,EAAE,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE;AAC3C,IAAI,GAAG,CAAC,gBAAgB,GAAG,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC;AAC1D,EAAE;AACF;;AAEA;AACA,MAAM,OAAO,GAAG,EAAE;AAClB;AACO,SAAS,wBAAwB,CAAC,MAAM,EAAE;AACjD,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM;AACrB,EAAE,OAAOA,oCAAiB,CAAC,OAAO,CAAC;AACnC;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -9,8 +9,8 @@ var require$$2 = require('react/jsx-runtime');
|
|
|
9
9
|
var useThemeWithoutDefault = require('../useThemeWithoutDefault/useThemeWithoutDefault.cjs');
|
|
10
10
|
var useTheme = require('../../../private-theming/esm/useTheme/useTheme.cjs');
|
|
11
11
|
var ThemeProvider$1 = require('../../../private-theming/esm/ThemeProvider/ThemeProvider.cjs');
|
|
12
|
-
var emotionElementF0de968e_browser_esm = require('../../../../@emotion/react/dist/emotion-element-f0de968e.browser.esm.cjs');
|
|
13
12
|
var DefaultPropsProvider = require('../DefaultPropsProvider/DefaultPropsProvider.cjs');
|
|
13
|
+
var react = require('@emotion/react');
|
|
14
14
|
|
|
15
15
|
function _interopNamespaceDefault(e) {
|
|
16
16
|
var n = Object.create(null);
|
|
@@ -79,7 +79,7 @@ function ThemeProvider(props) {
|
|
|
79
79
|
const layerOrder = useLayerOrder.default(engineTheme);
|
|
80
80
|
return /*#__PURE__*/require$$2.jsx(ThemeProvider$1.default, {
|
|
81
81
|
theme: privateTheme,
|
|
82
|
-
children: /*#__PURE__*/require$$2.jsx(
|
|
82
|
+
children: /*#__PURE__*/require$$2.jsx(react.ThemeContext.Provider, {
|
|
83
83
|
value: engineTheme,
|
|
84
84
|
children: /*#__PURE__*/require$$2.jsx(index.default, {
|
|
85
85
|
value: rtlValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ThemeProvider.cjs","sources":["../../../../../../../node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport exactProp from '@mui/utils/exactProp';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nimport RtlProvider from \"../RtlProvider/index.js\";\nimport DefaultPropsProvider from \"../DefaultPropsProvider/index.js\";\nimport useLayerOrder from \"./useLayerOrder.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? {\n ...upperTheme,\n [themeId]: mergedTheme\n } : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? {\n ...upperTheme,\n [themeId]: localTheme\n } : {\n ...upperTheme,\n ...localTheme\n };\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * <ThemeProvider theme={theme}> // existing use case\n * <ThemeProvider theme={{ id: theme }}> // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === 'rtl';\n const layerOrder = useLayerOrder(engineTheme);\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/_jsx(RtlProvider, {\n value: rtlValue,\n children: /*#__PURE__*/_jsxs(DefaultPropsProvider, {\n value: themeId ? engineTheme[themeId].components : engineTheme.components,\n children: [layerOrder, children]\n })\n })\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;"],"names":["React","useThemeWithoutDefault","usePrivateTheme","useLayerOrder","_jsx","MuiThemeProvider","StyledEngineThemeContext","RtlProvider","_jsxs","DefaultPropsProvider"],"mappings":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UAAU,EAAE,UAAU,CAAC;AACtE,EAAE,MAAM,YAAY,GAAG,eAAe,CAAC,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,CAAC;AACpF,EAAE,MAAM,QAAQ,GAAG,CAAC,OAAO,GAAG,WAAW,CAAC,OAAO,CAAC,GAAG,WAAW,EAAE,SAAS,KAAK,KAAK;AACrF,EAAE,MAAM,UAAU,GAAGC,qBAAa,CAAC,WAAW,CAAC;AAC/C,EAAE,oBAAoBC,cAAI,CAACC,uBAAgB,EAAE;AAC7C,IAAI,KAAK,EAAE,YAAY;AACvB,IAAI,QAAQ,eAAeD,cAAI,CAACE,
|
|
1
|
+
{"version":3,"file":"ThemeProvider.cjs","sources":["../../../../../../../node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport exactProp from '@mui/utils/exactProp';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nimport RtlProvider from \"../RtlProvider/index.js\";\nimport DefaultPropsProvider from \"../DefaultPropsProvider/index.js\";\nimport useLayerOrder from \"./useLayerOrder.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? {\n ...upperTheme,\n [themeId]: mergedTheme\n } : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? {\n ...upperTheme,\n [themeId]: localTheme\n } : {\n ...upperTheme,\n ...localTheme\n };\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * <ThemeProvider theme={theme}> // existing use case\n * <ThemeProvider theme={{ id: theme }}> // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', '<ThemeProvider theme={outerTheme => outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === 'rtl';\n const layerOrder = useLayerOrder(engineTheme);\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/_jsx(RtlProvider, {\n value: rtlValue,\n children: /*#__PURE__*/_jsxs(DefaultPropsProvider, {\n value: themeId ? engineTheme[themeId].components : engineTheme.components,\n children: [layerOrder, children]\n })\n })\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;"],"names":["React","useThemeWithoutDefault","usePrivateTheme","useLayerOrder","_jsx","MuiThemeProvider","StyledEngineThemeContext","RtlProvider","_jsxs","DefaultPropsProvider"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAM,WAAW,GAAG,EAAE;AACtB,SAAS,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,GAAG,KAAK,EAAE;AAC7E,EAAE,OAAOA,gBAAK,CAAC,OAAO,CAAC,MAAM;AAC7B,IAAI,MAAM,aAAa,GAAG,OAAO,GAAG,UAAU,CAAC,OAAO,CAAC,IAAI,UAAU,GAAG,UAAU;AAClF,IAAI,IAAI,OAAO,UAAU,KAAK,UAAU,EAAE;AAC1C,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,aAAa,CAAC;AACnD,MAAM,MAAM,MAAM,GAAG,OAAO,GAAG;AAC/B,QAAQ,GAAG,UAAU;AACrB,QAAQ,CAAC,OAAO,GAAG;AACnB,OAAO,GAAG,WAAW;AACrB;AACA;AACA,MAAM,IAAI,SAAS,EAAE;AACrB,QAAQ,OAAO,MAAM,MAAM;AAC3B,MAAM;AACN,MAAM,OAAO,MAAM;AACnB,IAAI;AACJ,IAAI,OAAO,OAAO,GAAG;AACrB,MAAM,GAAG,UAAU;AACnB,MAAM,CAAC,OAAO,GAAG;AACjB,KAAK,GAAG;AACR,MAAM,GAAG,UAAU;AACnB,MAAM,GAAG;AACT,KAAK;AACL,EAAE,CAAC,EAAE,CAAC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,SA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Default/useThemeWithoutDefault.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var
|
|
6
|
+
var react = require('@emotion/react');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -28,7 +28,7 @@ function isObjectEmpty(obj) {
|
|
|
28
28
|
return Object.keys(obj).length === 0;
|
|
29
29
|
}
|
|
30
30
|
function useTheme(defaultTheme = null) {
|
|
31
|
-
const contextTheme = React__namespace.useContext(
|
|
31
|
+
const contextTheme = React__namespace.useContext(react.ThemeContext);
|
|
32
32
|
return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;
|
|
33
33
|
}
|
|
34
34
|
|
package/dist/cjs/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useThemeWithoutDefault.cjs","sources":["../../../../../../../node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;"],"names":["React","ThemeContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC;AACtC;AACA,SAAS,QAAQ,CAAC,YAAY,GAAG,IAAI,EAAE;AACvC,EAAE,MAAM,YAAY,GAAGA,gBAAK,CAAC,UAAU,CAACC,
|
|
1
|
+
{"version":3,"file":"useThemeWithoutDefault.cjs","sources":["../../../../../../../node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;"],"names":["React","ThemeContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAAS,aAAa,CAAC,GAAG,EAAE;AAC5B,EAAE,OAAO,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC;AACtC;AACA,SAAS,QAAQ,CAAC,YAAY,GAAG,IAAI,EAAE;AACvC,EAAE,MAAM,YAAY,GAAGA,gBAAK,CAAC,UAAU,CAACC,kBAAY,CAAC;AACrD,EAAE,OAAO,CAAC,YAAY,IAAI,aAAa,CAAC,YAAY,CAAC,GAAG,YAAY,GAAG,YAAY;AACnF;;;;","x_google_ignoreList":[0]}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var React = require('react');
|
|
6
|
-
var index = require('../../../../../_virtual/
|
|
6
|
+
var index = require('../../../../../_virtual/index.cjs');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
9
9
|
var n = Object.create(null);
|
|
@@ -3,10 +3,9 @@
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
4
|
var material = require('@mui/material');
|
|
5
5
|
var ButtonDefault = require('../buttons/ButtonDefault.cjs');
|
|
6
|
-
var
|
|
7
|
-
var createStyles = require('../../../node_modules/@mui/styles/createStyles/createStyles.cjs');
|
|
6
|
+
var styles = require('@mui/styles');
|
|
8
7
|
|
|
9
|
-
const useStyles = makeStyles
|
|
8
|
+
const useStyles = styles.makeStyles(() => styles.createStyles({
|
|
10
9
|
cancelButton: {
|
|
11
10
|
minWidth: '140px!important',
|
|
12
11
|
height: '42px!important',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DialogDefault.cjs","sources":["../../../../../src/shared/components/dialog/DialogDefault.tsx"],"sourcesContent":["\n\nimport React, { ReactNode } from 'react';\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n Theme,\n} from '@mui/material';\n\nimport { ButtonDefault } from '../buttons/ButtonDefault';\nimport { createStyles, makeStyles } from '@mui/styles';\n\nconst useStyles = makeStyles<Theme>(() =>\n createStyles({\n cancelButton: {\n minWidth: '140px!important',\n height: '42px!important',\n },\n button: {\n minWidth: '140px!important',\n height: '42px!important',\n },\n dialog: {\n '& > .MuiBackdrop-root': {\n backgroundColor: '#ffffff66',\n },\n },\n }),\n);\n\ntype DialogDefaultProps = {\n children: ReactNode;\n handleSuccess?: () => void;\n isOpen: boolean;\n handleClose?: () => void;\n isLoading?: boolean;\n showActions?: boolean;\n showSuccessButton?: boolean;\n successText?: string;\n};\n\nexport const DialogDefault: React.FC<DialogDefaultProps> = ({\n children,\n handleSuccess,\n handleClose,\n isOpen,\n isLoading = false,\n showActions = false,\n showSuccessButton = true,\n successText = 'Confirmar',\n}) => {\n const classes = useStyles();\n return (\n <Dialog\n open={isOpen}\n onClose={() => handleClose && handleClose()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n maxWidth=\"sm\"\n className={classes.dialog}\n >\n <DialogContent>{children}</DialogContent>\n {showActions && (\n <DialogActions>\n <Button\n variant=\"outlined\"\n onClick={() => handleClose && handleClose()}\n className={classes.cancelButton}\n >\n Cancelar\n </Button>\n {showSuccessButton && (\n <ButtonDefault\n onClick={() => handleSuccess && handleSuccess()}\n isLoading={isLoading}\n className={classes.button}\n >\n {successText}\n </ButtonDefault>\n )}\n </DialogActions>\n )}\n </Dialog>\n );\n};\n"],"names":["makeStyles","createStyles","_jsxs","Dialog","_jsx","DialogContent","DialogActions","Button","ButtonDefault"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DialogDefault.cjs","sources":["../../../../../src/shared/components/dialog/DialogDefault.tsx"],"sourcesContent":["\n\nimport React, { ReactNode } from 'react';\nimport {\n Button,\n Dialog,\n DialogActions,\n DialogContent,\n Theme,\n} from '@mui/material';\n\nimport { ButtonDefault } from '../buttons/ButtonDefault';\nimport { createStyles, makeStyles } from '@mui/styles';\n\nconst useStyles = makeStyles<Theme>(() =>\n createStyles({\n cancelButton: {\n minWidth: '140px!important',\n height: '42px!important',\n },\n button: {\n minWidth: '140px!important',\n height: '42px!important',\n },\n dialog: {\n '& > .MuiBackdrop-root': {\n backgroundColor: '#ffffff66',\n },\n },\n }),\n);\n\ntype DialogDefaultProps = {\n children: ReactNode;\n handleSuccess?: () => void;\n isOpen: boolean;\n handleClose?: () => void;\n isLoading?: boolean;\n showActions?: boolean;\n showSuccessButton?: boolean;\n successText?: string;\n};\n\nexport const DialogDefault: React.FC<DialogDefaultProps> = ({\n children,\n handleSuccess,\n handleClose,\n isOpen,\n isLoading = false,\n showActions = false,\n showSuccessButton = true,\n successText = 'Confirmar',\n}) => {\n const classes = useStyles();\n return (\n <Dialog\n open={isOpen}\n onClose={() => handleClose && handleClose()}\n aria-labelledby=\"alert-dialog-title\"\n aria-describedby=\"alert-dialog-description\"\n maxWidth=\"sm\"\n className={classes.dialog}\n >\n <DialogContent>{children}</DialogContent>\n {showActions && (\n <DialogActions>\n <Button\n variant=\"outlined\"\n onClick={() => handleClose && handleClose()}\n className={classes.cancelButton}\n >\n Cancelar\n </Button>\n {showSuccessButton && (\n <ButtonDefault\n onClick={() => handleSuccess && handleSuccess()}\n isLoading={isLoading}\n className={classes.button}\n >\n {successText}\n </ButtonDefault>\n )}\n </DialogActions>\n )}\n </Dialog>\n );\n};\n"],"names":["makeStyles","createStyles","_jsxs","Dialog","_jsx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,EAAE,EAC/C,SAAS,EAAE,SAAS,EACpB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAA,QAAA,EAExB,WAAW,EAAA,CACE,CACjB,CAAA,EAAA,CACa,CACjB,CAAA,EAAA,CACM;AAEb;;;;"}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var material = require('@mui/material');
|
|
6
|
-
var
|
|
7
|
-
var
|
|
6
|
+
var data = require('@emoji-mart/data');
|
|
7
|
+
var Picker = require('@emoji-mart/react');
|
|
8
8
|
var SentimentSatisfiedOutlined = require('../../../node_modules/@mui/icons-material/esm/SentimentSatisfiedOutlined.cjs');
|
|
9
9
|
|
|
10
10
|
const BtnEmoji = ({ onClick }) => {
|
|
@@ -21,7 +21,7 @@ const BtnEmoji = ({ onClick }) => {
|
|
|
21
21
|
}, transformOrigin: {
|
|
22
22
|
vertical: 'top',
|
|
23
23
|
horizontal: 'center',
|
|
24
|
-
}, children: require$$2.jsx(
|
|
24
|
+
}, children: require$$2.jsx(Picker, { data: data, onEmojiSelect: (emoji) => {
|
|
25
25
|
onClick(emoji);
|
|
26
26
|
handleClose();
|
|
27
27
|
} }) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BtnEmoji.cjs","sources":["../../../../../src/shared/components/react-editor/BtnEmoji.tsx"],"sourcesContent":["\n\nimport React, { useState } from 'react';\nimport { Box, Popover } from '@mui/material';\nimport data from '@emoji-mart/data';\nimport Picker from '@emoji-mart/react';\nimport SentimentSatisfiedOutlinedIcon from '@mui/icons-material/SentimentSatisfiedOutlined';\n\ntype Emoji = { native: string };\n\ntype BtnEmojiProps = {\n onClick: (emoji: Emoji) => void;\n};\nexport const BtnEmoji: React.FC<BtnEmojiProps> = ({ onClick }) => {\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);\n\n const handleClose = (): void => {\n setAnchorEl(null);\n };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n return (\n <>\n <Box\n onClick={handleClick}\n component=\"button\"\n className=\"rsw-btn\"\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <SentimentSatisfiedOutlinedIcon />\n </Box>\n <Popover\n id=\"simple-popover\"\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={handleClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n >\n <Picker\n data={data}\n onEmojiSelect={(emoji: Emoji) => {\n onClick(emoji);\n handleClose();\n }}\n />\n </Popover>\n </>\n );\n};\n"],"names":["useState","_jsxs","_Fragment","_jsx","Box","SentimentSatisfiedOutlinedIcon","Popover"
|
|
1
|
+
{"version":3,"file":"BtnEmoji.cjs","sources":["../../../../../src/shared/components/react-editor/BtnEmoji.tsx"],"sourcesContent":["\n\nimport React, { useState } from 'react';\nimport { Box, Popover } from '@mui/material';\nimport data from '@emoji-mart/data';\nimport Picker from '@emoji-mart/react';\nimport SentimentSatisfiedOutlinedIcon from '@mui/icons-material/SentimentSatisfiedOutlined';\n\ntype Emoji = { native: string };\n\ntype BtnEmojiProps = {\n onClick: (emoji: Emoji) => void;\n};\nexport const BtnEmoji: React.FC<BtnEmojiProps> = ({ onClick }) => {\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);\n\n const handleClose = (): void => {\n setAnchorEl(null);\n };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n return (\n <>\n <Box\n onClick={handleClick}\n component=\"button\"\n className=\"rsw-btn\"\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <SentimentSatisfiedOutlinedIcon />\n </Box>\n <Popover\n id=\"simple-popover\"\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={handleClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n >\n <Picker\n data={data}\n onEmojiSelect={(emoji: Emoji) => {\n onClick(emoji);\n handleClose();\n }}\n />\n </Popover>\n </>\n );\n};\n"],"names":["useState","_jsxs","_Fragment","_jsx","Box","SentimentSatisfiedOutlinedIcon","Popover"],"mappings":";;;;;;;;;MAaa,QAAQ,GAA4B,CAAC,EAAE,OAAO,EAAE,KAAI;IAC/D,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAGA,cAAQ,CAA2B,IAAI,CAAC;IAExE,MAAM,WAAW,GAAG,MAAW;QAC7B,WAAW,CAAC,IAAI,CAAC;AACnB,IAAA,CAAC;AAED,IAAA,MAAM,WAAW,GAAG,CAAC,KAA0C,KAAU;AACvE,QAAA,WAAW,CAAC,KAAK,CAAC,aAAa,CAAC;AAClC,IAAA,CAAC;IAED,QACEC,eAAA,CAAAC,mBAAA,EAAA,EAAA,QAAA,EAAA,CACEC,cAAA,CAACC,YAAG,EAAA,EACF,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,QAAQ,EAClB,SAAS,EAAC,SAAS,EACnB,OAAO,EAAC,MAAM,EACd,cAAc,EAAC,QAAQ,EACvB,UAAU,EAAC,QAAQ,YAEnBD,cAAA,CAACE,kCAA8B,EAAA,EAAA,CAAG,EAAA,CAC9B,EACNF,cAAA,CAACG,gBAAO,EAAA,EACN,EAAE,EAAC,gBAAgB,EACnB,IAAI,EAAE,OAAO,CAAC,QAAQ,CAAC,EACvB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,WAAW,EACpB,YAAY,EAAE;AACZ,oBAAA,QAAQ,EAAE,QAAQ;AAClB,oBAAA,UAAU,EAAE,QAAQ;AACrB,iBAAA,EACD,eAAe,EAAE;AACf,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,UAAU,EAAE,QAAQ;AACrB,iBAAA,EAAA,QAAA,EAEDH,cAAA,CAAC,MAAM,EAAA,EACL,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,CAAC,KAAY,KAAI;wBAC9B,OAAO,CAAC,KAAK,CAAC;AACd,wBAAA,WAAW,EAAE;AACf,oBAAA,CAAC,EAAA,CACD,EAAA,CACM,CAAA,EAAA,CACT;AAEP;;;;"}
|
|
@@ -4,11 +4,11 @@ var require$$2 = require('react/jsx-runtime');
|
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var GifOutlined = require('../../../node_modules/@mui/icons-material/esm/GifOutlined.cjs');
|
|
6
6
|
var material = require('@mui/material');
|
|
7
|
-
var
|
|
7
|
+
var ReactGiphySearchBox = require('react-giphy-searchbox');
|
|
8
|
+
var styles = require('@mui/styles');
|
|
8
9
|
var theme = require('../../mui/theme.cjs');
|
|
9
|
-
var makeStyles = require('../../../node_modules/@mui/styles/makeStyles/makeStyles.cjs');
|
|
10
10
|
|
|
11
|
-
const useStyles = makeStyles
|
|
11
|
+
const useStyles = styles.makeStyles({
|
|
12
12
|
root: {
|
|
13
13
|
'& > .reactGiphySearchbox-componentWrapper': {
|
|
14
14
|
width: 'auto!important',
|
|
@@ -32,7 +32,7 @@ const BtnGif = ({ onClick }) => {
|
|
|
32
32
|
}, transformOrigin: {
|
|
33
33
|
vertical: 'top',
|
|
34
34
|
horizontal: 'center',
|
|
35
|
-
}, children: require$$2.jsx(material.Paper, { className: classes.root, children: require$$2.jsx(
|
|
35
|
+
}, children: require$$2.jsx(material.Paper, { className: classes.root, children: require$$2.jsx(ReactGiphySearchBox, { apiKey: "8QgSXTgUqMUnFkbeiW4Qq1DtZgb0B8cL" // Required: get your on https://developers.giphy.com
|
|
36
36
|
, onSelect: (gif) => {
|
|
37
37
|
onClick(gif);
|
|
38
38
|
handleClose();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BtnGif.cjs","sources":["../../../../../src/shared/components/react-editor/BtnGif.tsx"],"sourcesContent":["\nimport React, { useState } from 'react';\nimport GifOutlinedIcon from '@mui/icons-material/GifOutlined';\nimport { Box, Popover, Paper } from '@mui/material';\n// @ts-ignore\nimport ReactGiphySearchBox from 'react-giphy-searchbox';\nimport { makeStyles } from '@mui/styles';\nimport {theme} from \"../../mui/theme\";\n\nconst useStyles = makeStyles({\n root: {\n '& > .reactGiphySearchbox-componentWrapper': {\n width: 'auto!important',\n padding: theme.spacing(2),\n '& > .reactGiphySearchbox-searchForm-form': {},\n },\n },\n});\n\ntype GifImage = {\n url: string;\n};\ntype Gif = {\n embed_url: string;\n source: string;\n url: string;\n title: string;\n images: {\n original: GifImage;\n fixed_width_still: GifImage;\n };\n};\n\ntype BtnGifProps = {\n onClick: (gif: Gif) => void;\n};\nexport const BtnGif: React.FC<BtnGifProps> = ({ onClick }) => {\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);\n const classes = useStyles();\n\n const handleClose = (): void => {\n setAnchorEl(null);\n };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n return (\n <>\n <Box\n onClick={handleClick}\n component=\"button\"\n className=\"rsw-btn\"\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <GifOutlinedIcon />\n </Box>\n <Popover\n id=\"simple-popover\"\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={handleClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n >\n <Paper className={classes.root}>\n <ReactGiphySearchBox\n apiKey=\"8QgSXTgUqMUnFkbeiW4Qq1DtZgb0B8cL\" // Required: get your on https://developers.giphy.com\n onSelect={(gif: Gif) => {\n onClick(gif);\n handleClose();\n }}\n searchPlaceholder=\"Buscar\"\n />\n </Paper>\n </Popover>\n </>\n );\n};\n"],"names":["makeStyles","theme","useState","_jsxs","_Fragment","_jsx","Box","GifOutlinedIcon","Popover","Paper"
|
|
1
|
+
{"version":3,"file":"BtnGif.cjs","sources":["../../../../../src/shared/components/react-editor/BtnGif.tsx"],"sourcesContent":["\nimport React, { useState } from 'react';\nimport GifOutlinedIcon from '@mui/icons-material/GifOutlined';\nimport { Box, Popover, Paper } from '@mui/material';\n// @ts-ignore\nimport ReactGiphySearchBox from 'react-giphy-searchbox';\nimport { makeStyles } from '@mui/styles';\nimport {theme} from \"../../mui/theme\";\n\nconst useStyles = makeStyles({\n root: {\n '& > .reactGiphySearchbox-componentWrapper': {\n width: 'auto!important',\n padding: theme.spacing(2),\n '& > .reactGiphySearchbox-searchForm-form': {},\n },\n },\n});\n\ntype GifImage = {\n url: string;\n};\ntype Gif = {\n embed_url: string;\n source: string;\n url: string;\n title: string;\n images: {\n original: GifImage;\n fixed_width_still: GifImage;\n };\n};\n\ntype BtnGifProps = {\n onClick: (gif: Gif) => void;\n};\nexport const BtnGif: React.FC<BtnGifProps> = ({ onClick }) => {\n const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);\n const classes = useStyles();\n\n const handleClose = (): void => {\n setAnchorEl(null);\n };\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>): void => {\n setAnchorEl(event.currentTarget);\n };\n\n return (\n <>\n <Box\n onClick={handleClick}\n component=\"button\"\n className=\"rsw-btn\"\n display=\"flex\"\n justifyContent=\"center\"\n alignItems=\"center\"\n >\n <GifOutlinedIcon />\n </Box>\n <Popover\n id=\"simple-popover\"\n open={Boolean(anchorEl)}\n anchorEl={anchorEl}\n onClose={handleClose}\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'center',\n }}\n transformOrigin={{\n vertical: 'top',\n horizontal: 'center',\n }}\n >\n <Paper className={classes.root}>\n <ReactGiphySearchBox\n apiKey=\"8QgSXTgUqMUnFkbeiW4Qq1DtZgb0B8cL\" // Required: get your on https://developers.giphy.com\n onSelect={(gif: Gif) => {\n onClick(gif);\n handleClose();\n }}\n searchPlaceholder=\"Buscar\"\n />\n </Paper>\n </Popover>\n </>\n );\n};\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;AACrB,iBAAA,EACD,eAAe,EAAE;AACf,oBAAA,QAAQ,EAAE,KAAK;AACf,oBAAA,UAAU,EAAE,QAAQ;AACrB,iBAAA,EAAA,QAAA,EAEDH,eAACI,cAAK,EAAA,EAAC,SAAS,EAAE,OAAO,CAAC,IAAI,EAAA,QAAA,EAC5BJ,cAAA,CAAC,mBAAmB,EAAA,EAClB,MAAM,EAAC,kCAAkC;AACzC,0BAAA,QAAQ,EAAE,CAAC,GAAQ,KAAI;4BACrB,OAAO,CAAC,GAAG,CAAC;AACZ,4BAAA,WAAW,EAAE;wBACf,CAAC,EACD,iBAAiB,EAAC,QAAQ,GAC1B,EAAA,CACI,EAAA,CACA,CAAA,EAAA,CACT;AAEP;;;;"}
|
|
@@ -4,13 +4,13 @@ var require$$2 = require('react/jsx-runtime');
|
|
|
4
4
|
var material = require('@mui/material');
|
|
5
5
|
var comment_utils = require('../../../components/comment/comment.utils.cjs');
|
|
6
6
|
var BtnEmoji = require('./BtnEmoji.cjs');
|
|
7
|
-
var
|
|
7
|
+
var styles = require('@mui/styles');
|
|
8
|
+
var reactSimpleWysiwyg = require('react-simple-wysiwyg');
|
|
8
9
|
var BtnGif = require('./BtnGif.cjs');
|
|
9
10
|
var session_hooks = require('../../../components/session/session.hooks.cjs');
|
|
10
11
|
var theme = require('../../mui/theme.cjs');
|
|
11
|
-
var makeStyles = require('../../../node_modules/@mui/styles/makeStyles/makeStyles.cjs');
|
|
12
12
|
|
|
13
|
-
const useStyles = makeStyles
|
|
13
|
+
const useStyles = styles.makeStyles({
|
|
14
14
|
root: {
|
|
15
15
|
outline: '1px solid #eaecf1',
|
|
16
16
|
backgroundColor: '#f0f2f5',
|
|
@@ -37,9 +37,9 @@ const useStyles = makeStyles.default({
|
|
|
37
37
|
const ReactSimpleWysiwyg = ({ value, onChange, }) => {
|
|
38
38
|
const classes = useStyles();
|
|
39
39
|
const { subscription } = session_hooks.useSession();
|
|
40
|
-
return (require$$2.jsx(
|
|
40
|
+
return (require$$2.jsx(reactSimpleWysiwyg.EditorProvider, { children: require$$2.jsxs(material.Box, { className: classes.root, p: 1, children: [!value ? (require$$2.jsx(material.Box, { className: classes.placeholder, children: comment_utils.getCommentPlaceholder(!!subscription) })) : null, require$$2.jsx(material.Box, { className: classes.content, children: require$$2.jsx(reactSimpleWysiwyg.ContentEditable, { disabled: !subscription, onChange: (e) => {
|
|
41
41
|
onChange(e.target.value);
|
|
42
|
-
}, value: value }) }), subscription ? (require$$2.jsxs(
|
|
42
|
+
}, value: value }) }), subscription ? (require$$2.jsxs(reactSimpleWysiwyg.Toolbar, { children: [require$$2.jsx(reactSimpleWysiwyg.BtnBold, {}), require$$2.jsx(reactSimpleWysiwyg.BtnItalic, {}), require$$2.jsx(BtnEmoji.BtnEmoji, { onClick: (emoji) => {
|
|
43
43
|
onChange(`${value}${emoji.native}`);
|
|
44
44
|
} }), require$$2.jsx(BtnGif.BtnGif, { onClick: (gif) => {
|
|
45
45
|
console.log({ gif });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ReactSimpleWysiwyg.cjs","sources":["../../../../../src/shared/components/react-editor/ReactSimpleWysiwyg.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { Box } from '@mui/material';\nimport { getCommentPlaceholder } from '../../../components/comment/comment.utils';\nimport { BtnEmoji } from './BtnEmoji';\nimport { makeStyles } from '@mui/styles';\nimport {\n BtnBold,\n BtnItalic,\n ContentEditable,\n EditorProvider,\n Toolbar,\n} from 'react-simple-wysiwyg';\n\nimport { BtnGif } from './BtnGif';\nimport { useSession } from '../../../components/session/session.hooks';\nimport {theme} from \"../../mui/theme\";\n\nconst useStyles = makeStyles({\n root: {\n outline: '1px solid #eaecf1',\n backgroundColor: '#f0f2f5',\n borderRadius: theme.spacing(1),\n fontSize: theme.spacing(2),\n '& > .rsw-toolbar': {\n backgroundColor: 'transparent',\n border: 'none',\n },\n },\n content: {\n position: 'relative',\n '& > div': {\n outline: 'none',\n overflow: 'auto',\n minHeight: 75,\n },\n },\n placeholder: {\n //position: 'absolute',\n fontSize: '20px',\n },\n});\n\ntype ReactSimpleWysiwygProps = {\n value?: string;\n onChange: (value: string) => void;\n};\n\nexport const ReactSimpleWysiwyg: React.FC<ReactSimpleWysiwygProps> = ({\n value,\n onChange,\n}) => {\n const classes = useStyles();\n const { subscription } = useSession();\n\n return (\n <EditorProvider>\n <Box className={classes.root} p={1}>\n {!value ? (\n <Box className={classes.placeholder}>\n {getCommentPlaceholder(!!subscription)}\n </Box>\n ) : null}\n <Box className={classes.content}>\n <ContentEditable\n disabled={!subscription}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n value={value}\n />\n </Box>\n {subscription ? (\n <Toolbar>\n <BtnBold />\n <BtnItalic />\n <BtnEmoji\n onClick={(emoji) => {\n onChange(`${value}${emoji.native}`);\n }}\n />\n <BtnGif\n onClick={(gif) => {\n console.log({ gif });\n onChange(\n `${value}<br/><img src='${gif.images.original.url}' alt='${gif.title}' width='200'/>`,\n );\n }}\n />\n </Toolbar>\n ) : null}\n </Box>\n </EditorProvider>\n );\n};\n"],"names":["makeStyles","theme","useSession","_jsx","EditorProvider","_jsxs","Box","getCommentPlaceholder","ContentEditable","Toolbar","BtnBold","BtnItalic","BtnEmoji","BtnGif"],"mappings":";;;;;;;;;;;;AAmBA,MAAM,SAAS,GAAGA,
|
|
1
|
+
{"version":3,"file":"ReactSimpleWysiwyg.cjs","sources":["../../../../../src/shared/components/react-editor/ReactSimpleWysiwyg.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { Box } from '@mui/material';\nimport { getCommentPlaceholder } from '../../../components/comment/comment.utils';\nimport { BtnEmoji } from './BtnEmoji';\nimport { makeStyles } from '@mui/styles';\nimport {\n BtnBold,\n BtnItalic,\n ContentEditable,\n EditorProvider,\n Toolbar,\n} from 'react-simple-wysiwyg';\n\nimport { BtnGif } from './BtnGif';\nimport { useSession } from '../../../components/session/session.hooks';\nimport {theme} from \"../../mui/theme\";\n\nconst useStyles = makeStyles({\n root: {\n outline: '1px solid #eaecf1',\n backgroundColor: '#f0f2f5',\n borderRadius: theme.spacing(1),\n fontSize: theme.spacing(2),\n '& > .rsw-toolbar': {\n backgroundColor: 'transparent',\n border: 'none',\n },\n },\n content: {\n position: 'relative',\n '& > div': {\n outline: 'none',\n overflow: 'auto',\n minHeight: 75,\n },\n },\n placeholder: {\n //position: 'absolute',\n fontSize: '20px',\n },\n});\n\ntype ReactSimpleWysiwygProps = {\n value?: string;\n onChange: (value: string) => void;\n};\n\nexport const ReactSimpleWysiwyg: React.FC<ReactSimpleWysiwygProps> = ({\n value,\n onChange,\n}) => {\n const classes = useStyles();\n const { subscription } = useSession();\n\n return (\n <EditorProvider>\n <Box className={classes.root} p={1}>\n {!value ? (\n <Box className={classes.placeholder}>\n {getCommentPlaceholder(!!subscription)}\n </Box>\n ) : null}\n <Box className={classes.content}>\n <ContentEditable\n disabled={!subscription}\n onChange={(e) => {\n onChange(e.target.value);\n }}\n value={value}\n />\n </Box>\n {subscription ? (\n <Toolbar>\n <BtnBold />\n <BtnItalic />\n <BtnEmoji\n onClick={(emoji) => {\n onChange(`${value}${emoji.native}`);\n }}\n />\n <BtnGif\n onClick={(gif) => {\n console.log({ gif });\n onChange(\n `${value}<br/><img src='${gif.images.original.url}' alt='${gif.title}' width='200'/>`,\n );\n }}\n />\n </Toolbar>\n ) : null}\n </Box>\n </EditorProvider>\n );\n};\n"],"names":["makeStyles","theme","useSession","_jsx","EditorProvider","_jsxs","Box","getCommentPlaceholder","ContentEditable","Toolbar","BtnBold","BtnItalic","BtnEmoji","BtnGif"],"mappings":";;;;;;;;;;;;AAmBA,MAAM,SAAS,GAAGA,iBAAU,CAAC;AAC3B,IAAA,IAAI,EAAE;AACJ,QAAA,OAAO,EAAE,mBAAmB;AAC5B,QAAA,eAAe,EAAE,SAAS;AAC1B,QAAA,YAAY,EAAEC,WAAK,CAAC,OAAO,CAAC,CAAC,CAAC;AAC9B,QAAA,QAAQ,EAAEA,WAAK,CAA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gBAACI,0BAAO,EAAA,EAAA,QAAA,EAAA,CACNN,cAAA,CAACO,0BAAO,EAAA,EAAA,CAAG,EACXP,cAAA,CAACQ,4BAAS,KAAG,EACbR,cAAA,CAACS,iBAAQ,EAAA,EACP,OAAO,EAAE,CAAC,KAAK,KAAI;gCACjB,QAAQ,CAAC,GAAG,KAAK,CAAA,EAAG,KAAK,CAAC,MAAM,CAAA,CAAE,CAAC;4BACrC,CAAC,EAAA,CACD,EACFT,cAAA,CAACU,aAAM,EAAA,EACL,OAAO,EAAE,CAAC,GAAG,KAAI;AACf,gCAAA,OAAO,CAAC,GAAG,CAAC,EAAE,GAAG,EAAE,CAAC;AACpB,gCAAA,QAAQ,CACN,CAAA,EAAG,KAAK,CAAA,eAAA,EAAkB,GAAG,CAAC,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAA,OAAA,EAAU,GAAG,CAAC,KAAK,CAAA,eAAA,CAAiB,CACtF;4BACH,CAAC,EAAA,CACD,CAAA,EAAA,CACM,IACR,IAAI,CAAA,EAAA,CACJ,EAAA,CACS;AAErB;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var Cookies = require('universal-cookie');
|
|
4
4
|
|
|
5
|
-
const universalCookies = new
|
|
5
|
+
const universalCookies = new Cookies();
|
|
6
6
|
|
|
7
7
|
exports.universalCookies = universalCookies;
|
|
8
8
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/shared/cookies/index.ts"],"sourcesContent":["import Cookies from 'universal-cookie';\nexport const universalCookies = new Cookies();\n\n\n"],"names":[
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/shared/cookies/index.ts"],"sourcesContent":["import Cookies from 'universal-cookie';\nexport const universalCookies = new Cookies();\n\n\n"],"names":[],"mappings":";;;;AACO,MAAM,gBAAgB,GAAG,IAAI,OAAO;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { __require as
|
|
1
|
+
import { __require as requireReactIs } from '../node_modules/react-is/index.js';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var reactIsExports = /*@__PURE__*/ requireReactIs();
|
|
4
4
|
|
|
5
|
-
export {
|
|
5
|
+
export { reactIsExports as r };
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { __require as requireReactInfiniteScroller } from '../node_modules/react-giphy-searchbox/node_modules/react-infinite-scroller/index.js';
|
|
1
|
+
var utils = {};
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
var InfiniteScroll = /*@__PURE__*/getDefaultExportFromCjs(reactInfiniteScrollerExports);
|
|
6
|
-
|
|
7
|
-
export { InfiniteScroll as default };
|
|
3
|
+
export { utils as __exports };
|
|
8
4
|
//# sourceMappingURL=index3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index3.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var pathToRegexp = {exports: {}};
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export { reactIsExports as r };
|
|
3
|
+
export { pathToRegexp as __module };
|
|
6
4
|
//# sourceMappingURL=index5.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index5.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
|
|
@@ -2,16 +2,16 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { Provider } from './CommentContext.js';
|
|
4
4
|
import { fetchComments, fetchCommentsStoreAction } from './comment.actions.js';
|
|
5
|
-
import {
|
|
5
|
+
import { useStore, useCallAction } from '@cobuildlab/react-simple-state';
|
|
6
6
|
import { postStore } from './comment.store.js';
|
|
7
7
|
|
|
8
8
|
const CommentProvider = ({ children }) => {
|
|
9
|
-
const { id } =
|
|
9
|
+
const { id } = useStore(postStore);
|
|
10
10
|
const [{ pageSize, page }, setPaginate] = useState({
|
|
11
11
|
pageSize: 5,
|
|
12
12
|
page: 0,
|
|
13
13
|
});
|
|
14
|
-
const [callCommentsAction, loading] =
|
|
14
|
+
const [callCommentsAction, loading] = useCallAction(fetchComments, {
|
|
15
15
|
onCompleted: (res) => {
|
|
16
16
|
fetchCommentsStoreAction(res.comments, res.count);
|
|
17
17
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CommentProvider.js","sources":["../../../../src/components/comment/CommentProvider.tsx"],"sourcesContent":["\n\nimport React, { ReactNode, useEffect, useState } from 'react';\nimport { Provider } from './CommentContext';\nimport { Comment } from '../../shared/types/generated';\nimport { fetchComments, fetchCommentsStoreAction } from './comment.actions';\nimport { useCallAction, useStore } from '@cobuildlab/react-simple-state';\nimport { postStore } from './comment.store';\nimport {CommentContextType} from \"./comment.types\";\n\ntype CommentProviderProps = {\n children: ReactNode;\n};\nexport const CommentProvider: React.FC<CommentProviderProps> = ({ children }) => {\n const { id } = useStore(postStore);\n\n const [{ pageSize, page }, setPaginate] = useState({\n pageSize: 5,\n page: 0,\n });\n\n const [callCommentsAction, loading] = useCallAction(fetchComments, {\n onCompleted: (res) => {\n fetchCommentsStoreAction(res.comments as Comment[], res.count as number);\n },\n });\n\n useEffect(() => {\n callCommentsAction({\n where: {\n post_id: id,\n },\n page,\n pageSize,\n });\n }, [callCommentsAction, id, page, pageSize]);\n\n const loadMoreComments = () => {\n setPaginate({\n page,\n pageSize: pageSize + 5,\n });\n };\n const callAction = () => {\n callCommentsAction({\n where: {\n post_id: id,\n },\n page,\n pageSize,\n });\n };\n\n const values: CommentContextType = {\n postId: id,\n loadMoreComments,\n callAction,\n loading,\n };\n\n return <Provider value={values}>{children}</Provider>;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"CommentProvider.js","sources":["../../../../src/components/comment/CommentProvider.tsx"],"sourcesContent":["\n\nimport React, { ReactNode, useEffect, useState } from 'react';\nimport { Provider } from './CommentContext';\nimport { Comment } from '../../shared/types/generated';\nimport { fetchComments, fetchCommentsStoreAction } from './comment.actions';\nimport { useCallAction, useStore } from '@cobuildlab/react-simple-state';\nimport { postStore } from './comment.store';\nimport {CommentContextType} from \"./comment.types\";\n\ntype CommentProviderProps = {\n children: ReactNode;\n};\nexport const CommentProvider: React.FC<CommentProviderProps> = ({ children }) => {\n const { id } = useStore(postStore);\n\n const [{ pageSize, page }, setPaginate] = useState({\n pageSize: 5,\n page: 0,\n });\n\n const [callCommentsAction, loading] = useCallAction(fetchComments, {\n onCompleted: (res) => {\n fetchCommentsStoreAction(res.comments as Comment[], res.count as number);\n },\n });\n\n useEffect(() => {\n callCommentsAction({\n where: {\n post_id: id,\n },\n page,\n pageSize,\n });\n }, [callCommentsAction, id, page, pageSize]);\n\n const loadMoreComments = () => {\n setPaginate({\n page,\n pageSize: pageSize + 5,\n });\n };\n const callAction = () => {\n callCommentsAction({\n where: {\n post_id: id,\n },\n page,\n pageSize,\n });\n };\n\n const values: CommentContextType = {\n postId: id,\n loadMoreComments,\n callAction,\n loading,\n };\n\n return <Provider value={values}>{children}</Provider>;\n};\n"],"names":["_jsx"],"mappings":";;;;;;;MAaa,eAAe,GAAmC,CAAC,EAAE,QAAQ,EAAE,KAAI;IAC9E,MAAM,EAAE,EAAE,EAAE,GAAG,QAAQ,CAAC,SAAS,CAAC;IAElC,MAAM,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC;AACjD,QAAA,QAAQ,EAAE,CAAC;AACX,QAAA,IAAI,EAAE,CAAC;AACR,KAAA,CAAC;IAEF,MAAM,CAAC,kBAAkB,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,aAAa,EAAE;AACjE,QAAA,WAAW,EAAE,CAAC,GAAG,KAAI;YACnB,wBAAwB,CAAC,GAAG,CAAC,QAAqB,EAAE,GAAG,CAAC,KAAe,CAAC;QAC1E,CAAC;AACF,KAAA,CAAC;IAEF,SAAS,CAAC,MAAK;AACb,QAAA,kBAAkB,CAAC;AACjB,YAAA,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,EAAE;AACZ,aAAA;YACD,IAAI;YACJ,QAAQ;AACT,SAAA,CAAC;IACJ,CAAC,EAAE,CAAC,kBAAkB,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,CAAC,CAAC;IAE5C,MAAM,gBAAgB,GAAG,MAAK;AAC5B,QAAA,WAAW,CAAC;YACV,IAAI;YACJ,QAAQ,EAAE,QAAQ,GAAG,CAAC;AACvB,SAAA,CAAC;AACJ,IAAA,CAAC;IACD,MAAM,UAAU,GAAG,MAAK;AACtB,QAAA,kBAAkB,CAAC;AACjB,YAAA,KAAK,EAAE;AACL,gBAAA,OAAO,EAAE,EAAE;AACZ,aAAA;YACD,IAAI;YACJ,QAAQ;AACT,SAAA,CAAC;AACJ,IAAA,CAAC;AAED,IAAA,MAAM,MAAM,GAAwB;AAClC,QAAA,MAAM,EAAE,EAAE;QACV,gBAAgB;QAChB,UAAU;QACV,OAAO;KACR;IAED,OAAOA,GAAA,CAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,MAAM,EAAA,QAAA,EAAG,QAAQ,EAAA,CAAY;AACvD;;;;"}
|
|
@@ -3,14 +3,14 @@ import { useState } from 'react';
|
|
|
3
3
|
import { AddCommentContainer } from './components/AddCommentContainer.js';
|
|
4
4
|
import { useSession } from '../session/session.hooks.js';
|
|
5
5
|
import { Box, Grid } from '@mui/material';
|
|
6
|
-
import {
|
|
6
|
+
import { useStore } from '@cobuildlab/react-simple-state';
|
|
7
7
|
import { fetchCommentsStore } from './comment.store.js';
|
|
8
8
|
import { useComment } from './comment.hooks.js';
|
|
9
9
|
import { ShowMoreComments } from './components/ShowMoreComments.js';
|
|
10
10
|
import { CommentContainer } from './components/CommentContainer.js';
|
|
11
11
|
import { ButtonDefault } from '../../shared/components/buttons/ButtonDefault.js';
|
|
12
|
+
import { makeStyles } from '@mui/styles';
|
|
12
13
|
import { CommentSubscriptionDialog } from './components/CommentSubscriptionDialog.js';
|
|
13
|
-
import makeStyles from '../../node_modules/@mui/styles/makeStyles/makeStyles.js';
|
|
14
14
|
|
|
15
15
|
const useStyles = makeStyles({
|
|
16
16
|
button: {
|
|
@@ -23,7 +23,7 @@ const useStyles = makeStyles({
|
|
|
23
23
|
});
|
|
24
24
|
const Comments = () => {
|
|
25
25
|
const { user } = useSession();
|
|
26
|
-
const { comments } =
|
|
26
|
+
const { comments } = useStore(fetchCommentsStore);
|
|
27
27
|
const classes = useStyles();
|
|
28
28
|
const [showComments, setShowComments] = useState(true);
|
|
29
29
|
const commentsAll = useComment();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Comments.js","sources":["../../../../src/components/comment/Comments.tsx"],"sourcesContent":["\n\n\nimport React, { useState } from 'react';\nimport { AddCommentContainer } from './components/AddCommentContainer';\nimport { useSession } from '../session/session.hooks';\nimport { Grid, Box } from '@mui/material';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { fetchCommentsStore } from './comment.store';\nimport { useComment } from './comment.hooks';\nimport { ShowMoreComments } from './components/ShowMoreComments';\nimport { CommentContainer } from './components/CommentContainer';\nimport { ButtonDefault } from '../../shared/components/buttons/ButtonDefault';\nimport { makeStyles } from '@mui/styles';\nimport { CommentSubscriptionDialog } from './components/CommentSubscriptionDialog';\n\nconst useStyles = makeStyles({\n button: {\n borderRadius: 8,\n width: 280,\n height: 50,\n fontSize: 16,\n fontWeight: 700,\n },\n});\nexport const Comments: React.FC = () => {\n const { user } = useSession();\n const { comments } = useStore(fetchCommentsStore);\n const classes = useStyles();\n const [showComments, setShowComments] = useState(true);\n\n const commentsAll = useComment();\n\n if (!user && commentsAll.loading) return <div>Loading...</div>;\n return (\n <Box mt={2}>\n <Grid container>\n <Grid size={12} display=\"flex\" justifyContent=\"center\">\n <ButtonDefault\n className={classes.button}\n onClick={() => {\n return setShowComments(!showComments);\n }}>\n {showComments ? 'Ocultar comentarios' : 'Comentarios'}\n </ButtonDefault>\n </Grid>\n {showComments ? (\n <Grid size={12}>\n <Grid container>\n <Grid size={12} mb={2}>\n <AddCommentContainer />\n </Grid>\n {comments.map((comment, key) => (\n <Grid size={12} key={key}>\n <CommentContainer comment={comment} />\n </Grid>\n ))}\n <ShowMoreComments />\n </Grid>\n </Grid>\n ) : null}\n </Grid>\n <CommentSubscriptionDialog />\n </Box>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Comments.js","sources":["../../../../src/components/comment/Comments.tsx"],"sourcesContent":["\n\n\nimport React, { useState } from 'react';\nimport { AddCommentContainer } from './components/AddCommentContainer';\nimport { useSession } from '../session/session.hooks';\nimport { Grid, Box } from '@mui/material';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { fetchCommentsStore } from './comment.store';\nimport { useComment } from './comment.hooks';\nimport { ShowMoreComments } from './components/ShowMoreComments';\nimport { CommentContainer } from './components/CommentContainer';\nimport { ButtonDefault } from '../../shared/components/buttons/ButtonDefault';\nimport { makeStyles } from '@mui/styles';\nimport { CommentSubscriptionDialog } from './components/CommentSubscriptionDialog';\n\nconst useStyles = makeStyles({\n button: {\n borderRadius: 8,\n width: 280,\n height: 50,\n fontSize: 16,\n fontWeight: 700,\n },\n});\nexport const Comments: React.FC = () => {\n const { user } = useSession();\n const { comments } = useStore(fetchCommentsStore);\n const classes = useStyles();\n const [showComments, setShowComments] = useState(true);\n\n const commentsAll = useComment();\n\n if (!user && commentsAll.loading) return <div>Loading...</div>;\n return (\n <Box mt={2}>\n <Grid container>\n <Grid size={12} display=\"flex\" justifyContent=\"center\">\n <ButtonDefault\n className={classes.button}\n onClick={() => {\n return setShowComments(!showComments);\n }}>\n {showComments ? 'Ocultar comentarios' : 'Comentarios'}\n </ButtonDefault>\n </Grid>\n {showComments ? (\n <Grid size={12}>\n <Grid container>\n <Grid size={12} mb={2}>\n <AddCommentContainer />\n </Grid>\n {comments.map((comment, key) => (\n <Grid size={12} key={key}>\n <CommentContainer comment={comment} />\n </Grid>\n ))}\n <ShowMoreComments />\n </Grid>\n </Grid>\n ) : null}\n </Grid>\n <CommentSubscriptionDialog />\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAM,SAAS,GAAG,UAAU,CAAC;AAC3B,IAAA,MAAM,EAAE;AACN,QAAA,YAAY,EAAE,CAAC;AACf,QAAA,KAAK,EAAE,GAAG;AACV,QAAA,MAAM,EAAE,EAAE;AACV,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,UAAU,EAAE,GAAG;AAChB,KAAA;AACF,CAAA,CAAC;AACK,MAAM,QAAQ,GAAa,MAAK;AACrC,IAAA,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE;IAC7B,MAAM,EAAE,QAAQ,EAAE,GAAG,QAAQ,CAAC,kBAAkB,CAAC;AACjD,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAC3B,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAC,IAAI,CAAC;AAEtD,IAAA,MAAM,WAAW,GAAG,UAAU,EAAE;AAEhC,IAAA,IAAI,CAAC,IAAI,IAAI,WAAW,CAAC,OAAO;AAAE,QAAA,OAAOA,sCAAqB;AAC9D,IAAA,QACEC,IAAA,CAAC,GAAG,IAAC,EAAE,EAAE,CAAC,EAAA,QAAA,EAAA,CACRA,IAAA,CAAC,IAAI,EAAA,EAAC,SAAS,EAAA,IAAA,EAAA,QAAA,EAAA,CACbD,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,EAAE,EAAE,OAAO,EAAC,MA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