react-easy-wall 2.0.11 → 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/index10.cjs +2 -2
- package/dist/cjs/_virtual/index11.cjs +2 -2
- package/dist/cjs/_virtual/index2.cjs +2 -8
- package/dist/cjs/_virtual/index2.cjs.map +1 -1
- package/dist/cjs/_virtual/index3.cjs +2 -2
- package/dist/cjs/_virtual/index4.cjs +2 -8
- package/dist/cjs/_virtual/index4.cjs.map +1 -1
- package/dist/cjs/_virtual/index5.cjs +2 -8
- package/dist/cjs/_virtual/index5.cjs.map +1 -1
- package/dist/cjs/_virtual/index6.cjs +2 -2
- package/dist/cjs/_virtual/index7.cjs +2 -4
- package/dist/cjs/_virtual/index7.cjs.map +1 -1
- package/dist/cjs/_virtual/index8.cjs +2 -2
- package/dist/cjs/_virtual/index9.cjs +2 -2
- package/dist/cjs/components/comment/CommentProvider.cjs +3 -3
- package/dist/cjs/components/comment/Comments.cjs +7 -8
- 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 +3 -1
- package/dist/cjs/components/comment/comment.utils.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddComment.cjs +6 -9
- package/dist/cjs/components/comment/components/AddComment.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddCommentContainer.cjs +4 -8
- package/dist/cjs/components/comment/components/AddCommentContainer.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddReplyComment.cjs +8 -11
- package/dist/cjs/components/comment/components/AddReplyComment.cjs.map +1 -1
- package/dist/cjs/components/comment/components/AddReplyCommentContainer.cjs +4 -7
- package/dist/cjs/components/comment/components/AddReplyCommentContainer.cjs.map +1 -1
- package/dist/cjs/components/comment/components/CommentContainer.cjs +4 -6
- package/dist/cjs/components/comment/components/CommentContainer.cjs.map +1 -1
- package/dist/cjs/components/comment/components/CommentItem.cjs +5 -10
- package/dist/cjs/components/comment/components/CommentItem.cjs.map +1 -1
- package/dist/cjs/components/comment/components/CommentSubscriptionDialog.cjs +5 -6
- package/dist/cjs/components/comment/components/CommentSubscriptionDialog.cjs.map +1 -1
- package/dist/cjs/components/comment/components/ReplyComments.cjs +2 -2
- package/dist/cjs/components/comment/components/ReplyComments.cjs.map +1 -1
- package/dist/cjs/components/comment/components/ShowMoreComments.cjs +6 -8
- package/dist/cjs/components/comment/components/ShowMoreComments.cjs.map +1 -1
- package/dist/cjs/components/panel/Panel.cjs +4 -5
- package/dist/cjs/components/panel/Panel.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelAvatar.cjs +2 -5
- package/dist/cjs/components/panel/PanelAvatar.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelButton.cjs +7 -7
- package/dist/cjs/components/panel/PanelButton.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelDivider.cjs +2 -2
- package/dist/cjs/components/panel/PanelDivider.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelFooter.cjs +3 -4
- package/dist/cjs/components/panel/PanelFooter.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelHeader.cjs +2 -2
- package/dist/cjs/components/panel/PanelHeader.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelItem.cjs +2 -5
- package/dist/cjs/components/panel/PanelItem.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelListItems.cjs +2 -4
- package/dist/cjs/components/panel/PanelListItems.cjs.map +1 -1
- package/dist/cjs/components/panel/PanelSubscriptionIcon.cjs +2 -2
- package/dist/cjs/components/panel/PanelSubscriptionIcon.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/paywall/PaywallRegister.cjs +6 -8
- package/dist/cjs/components/paywall/PaywallRegister.cjs.map +1 -1
- package/dist/cjs/components/paywall/PaywallSubscription.cjs +6 -8
- package/dist/cjs/components/paywall/PaywallSubscription.cjs.map +1 -1
- 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 +9 -10
- package/dist/cjs/components/session/session.actions.cjs.map +1 -1
- package/dist/cjs/components/session/session.constants.cjs +2 -2
- package/dist/cjs/components/session/session.constants.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/caches.cjs +0 -31
- package/dist/cjs/node_modules/@apollo/client/utilities/internal/caches.cjs.map +1 -1
- 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/@cobuildlab/react-simple-state/lib/index.cjs +1 -1
- package/dist/cjs/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.cjs +446 -0
- package/dist/cjs/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.cjs +130 -0
- package/dist/cjs/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/@emotion/react/dist/emotion-react.browser.esm.cjs +127 -0
- package/dist/cjs/node_modules/@emotion/react/dist/emotion-react.browser.esm.cjs.map +1 -0
- 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/@emotion/styled/base/dist/emotion-styled-base.browser.esm.cjs +190 -0
- package/dist/cjs/node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.cjs +18 -0
- package/dist/cjs/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.cjs +34 -0
- package/dist/cjs/node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.cjs +50 -0
- package/dist/cjs/node_modules/@emotion/utils/dist/emotion-utils.browser.esm.cjs.map +1 -0
- package/dist/cjs/node_modules/@mui/material/esm/zero-styled/index.cjs +0 -7
- package/dist/cjs/node_modules/@mui/material/esm/zero-styled/index.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/styles/node_modules/@mui/utils/esm/deepmerge/deepmerge.cjs +1 -1
- package/dist/cjs/node_modules/@mui/system/esm/RtlProvider/index.cjs +0 -5
- package/dist/cjs/node_modules/@mui/system/esm/RtlProvider/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/@mui/utils/esm/useId/useId.cjs +1 -1
- package/dist/cjs/node_modules/@mui/utils/esm/useId/useId.cjs.map +1 -1
- package/dist/cjs/node_modules/graphql/language/ast.cjs +0 -104
- package/dist/cjs/node_modules/graphql/language/ast.cjs.map +1 -1
- package/dist/cjs/node_modules/hoist-non-react-statics/node_modules/react-is/index.cjs +1 -1
- package/dist/cjs/node_modules/next/dist/client/script.cjs +2 -2
- package/dist/cjs/node_modules/next/dist/client/script.cjs.map +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 +5 -5
- package/dist/cjs/node_modules/next/dist/compiled/gzip-size/index.cjs.map +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/prop-types/index.cjs +1 -1
- package/dist/cjs/node_modules/react-giphy-searchbox/es/index.cjs +1 -1
- package/dist/cjs/node_modules/react-is/index.cjs +1 -1
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Subscription.cjs +1 -2
- package/dist/cjs/node_modules/rxjs/dist/esm5/internal/Subscription.cjs.map +1 -1
- package/dist/cjs/node_modules/tslib/tslib.es6.cjs +0 -79
- package/dist/cjs/node_modules/tslib/tslib.es6.cjs.map +1 -1
- package/dist/cjs/shared/apollo/apollo.client.cjs +4 -6
- package/dist/cjs/shared/apollo/apollo.client.cjs.map +1 -1
- package/dist/cjs/shared/components/buttons/ButtonDefault.cjs +3 -5
- package/dist/cjs/shared/components/buttons/ButtonDefault.cjs.map +1 -1
- package/dist/cjs/shared/components/dialog/DialogDefault.cjs +4 -8
- package/dist/cjs/shared/components/dialog/DialogDefault.cjs.map +1 -1
- package/dist/cjs/shared/components/react-editor/BtnEmoji.cjs +5 -6
- package/dist/cjs/shared/components/react-editor/BtnEmoji.cjs.map +1 -1
- package/dist/cjs/shared/components/react-editor/BtnGif.cjs +6 -8
- package/dist/cjs/shared/components/react-editor/BtnGif.cjs.map +1 -1
- package/dist/cjs/shared/components/react-editor/ReactSimpleWysiwyg.cjs +6 -6
- package/dist/cjs/shared/components/react-editor/ReactSimpleWysiwyg.cjs.map +1 -1
- package/dist/cjs/shared/cookies/cookies.utils.cjs +2 -2
- package/dist/cjs/shared/cookies/cookies.utils.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/cjs/shared/types/generated.cjs +7 -7
- package/dist/cjs/shared/types/generated.cjs.map +1 -1
- package/dist/esm/_virtual/index.js +3 -3
- package/dist/esm/_virtual/index10.js +2 -2
- package/dist/esm/_virtual/index11.js +2 -2
- package/dist/esm/_virtual/index2.js +2 -6
- package/dist/esm/_virtual/index2.js.map +1 -1
- package/dist/esm/_virtual/index3.js +2 -2
- package/dist/esm/_virtual/index4.js +2 -6
- package/dist/esm/_virtual/index4.js.map +1 -1
- package/dist/esm/_virtual/index5.js +2 -6
- package/dist/esm/_virtual/index5.js.map +1 -1
- package/dist/esm/_virtual/index6.js +2 -2
- package/dist/esm/_virtual/index7.js +2 -4
- package/dist/esm/_virtual/index7.js.map +1 -1
- package/dist/esm/_virtual/index8.js +2 -2
- package/dist/esm/_virtual/index9.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 +4 -5
- 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 +3 -1
- package/dist/esm/components/comment/comment.utils.js.map +1 -1
- package/dist/esm/components/comment/components/AddComment.js +4 -7
- package/dist/esm/components/comment/components/AddComment.js.map +1 -1
- package/dist/esm/components/comment/components/AddCommentContainer.js +2 -6
- package/dist/esm/components/comment/components/AddCommentContainer.js.map +1 -1
- package/dist/esm/components/comment/components/AddReplyComment.js +6 -9
- package/dist/esm/components/comment/components/AddReplyComment.js.map +1 -1
- package/dist/esm/components/comment/components/AddReplyCommentContainer.js +2 -5
- package/dist/esm/components/comment/components/AddReplyCommentContainer.js.map +1 -1
- package/dist/esm/components/comment/components/CommentContainer.js +3 -5
- package/dist/esm/components/comment/components/CommentContainer.js.map +1 -1
- package/dist/esm/components/comment/components/CommentItem.js +2 -7
- package/dist/esm/components/comment/components/CommentItem.js.map +1 -1
- package/dist/esm/components/comment/components/CommentSubscriptionDialog.js +3 -4
- package/dist/esm/components/comment/components/CommentSubscriptionDialog.js.map +1 -1
- package/dist/esm/components/comment/components/ReplyComments.js +1 -1
- package/dist/esm/components/comment/components/ShowMoreComments.js +4 -6
- package/dist/esm/components/comment/components/ShowMoreComments.js.map +1 -1
- package/dist/esm/components/panel/Panel.js +3 -4
- package/dist/esm/components/panel/Panel.js.map +1 -1
- package/dist/esm/components/panel/PanelAvatar.js +1 -4
- package/dist/esm/components/panel/PanelAvatar.js.map +1 -1
- package/dist/esm/components/panel/PanelButton.js +3 -3
- package/dist/esm/components/panel/PanelButton.js.map +1 -1
- package/dist/esm/components/panel/PanelDivider.js +1 -1
- package/dist/esm/components/panel/PanelFooter.js +1 -2
- package/dist/esm/components/panel/PanelFooter.js.map +1 -1
- package/dist/esm/components/panel/PanelHeader.js +1 -1
- package/dist/esm/components/panel/PanelItem.js +1 -4
- package/dist/esm/components/panel/PanelItem.js.map +1 -1
- package/dist/esm/components/panel/PanelListItems.js +1 -3
- package/dist/esm/components/panel/PanelListItems.js.map +1 -1
- package/dist/esm/components/panel/PanelSubscriptionIcon.js +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/paywall/PaywallRegister.js +1 -3
- package/dist/esm/components/paywall/PaywallRegister.js.map +1 -1
- package/dist/esm/components/paywall/PaywallSubscription.js +1 -3
- package/dist/esm/components/paywall/PaywallSubscription.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 +6 -7
- package/dist/esm/components/session/session.actions.js.map +1 -1
- package/dist/esm/components/session/session.constants.js +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/caches.js +1 -31
- package/dist/esm/node_modules/@apollo/client/utilities/internal/caches.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/@cobuildlab/react-simple-state/lib/index.js +1 -1
- package/dist/esm/node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js +4 -4
- package/dist/esm/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js +2 -2
- package/dist/esm/node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js.map +1 -1
- package/dist/esm/node_modules/@emotion/react/dist/emotion-react.browser.esm.js +1 -24
- package/dist/esm/node_modules/@emotion/react/dist/emotion-react.browser.esm.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/@emotion/styled/dist/emotion-styled.browser.esm.js +0 -1
- package/dist/esm/node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js.map +1 -1
- package/dist/esm/node_modules/@mui/material/esm/zero-styled/index.js +1 -7
- package/dist/esm/node_modules/@mui/material/esm/zero-styled/index.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/styles/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +1 -1
- package/dist/esm/node_modules/@mui/system/esm/RtlProvider/index.js +1 -5
- package/dist/esm/node_modules/@mui/system/esm/RtlProvider/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/@mui/utils/esm/useId/useId.js +1 -1
- package/dist/esm/node_modules/@mui/utils/esm/useId/useId.js.map +1 -1
- package/dist/esm/node_modules/graphql/language/ast.js +1 -103
- package/dist/esm/node_modules/graphql/language/ast.js.map +1 -1
- package/dist/esm/node_modules/hoist-non-react-statics/node_modules/react-is/index.js +1 -1
- package/dist/esm/node_modules/next/dist/client/script.js +2 -2
- package/dist/esm/node_modules/next/dist/client/script.js.map +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 +5 -5
- package/dist/esm/node_modules/next/dist/compiled/gzip-size/index.js.map +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/prop-types/index.js +1 -1
- package/dist/esm/node_modules/react-giphy-searchbox/es/index.js +1 -1
- package/dist/esm/node_modules/react-is/index.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscriber.js +1 -1
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscription.js +2 -2
- package/dist/esm/node_modules/rxjs/dist/esm5/internal/Subscription.js.map +1 -1
- package/dist/esm/node_modules/stylis/src/Parser.js +1 -1
- package/dist/esm/node_modules/stylis/src/Tokenizer.js +1 -1
- package/dist/esm/node_modules/tslib/tslib.es6.js +1 -75
- package/dist/esm/node_modules/tslib/tslib.es6.js.map +1 -1
- package/dist/esm/shared/apollo/apollo.client.js +1 -3
- package/dist/esm/shared/apollo/apollo.client.js.map +1 -1
- package/dist/esm/shared/components/buttons/ButtonDefault.js +1 -3
- package/dist/esm/shared/components/buttons/ButtonDefault.js.map +1 -1
- package/dist/esm/shared/components/dialog/DialogDefault.js +2 -6
- package/dist/esm/shared/components/dialog/DialogDefault.js.map +1 -1
- package/dist/esm/shared/components/react-editor/BtnEmoji.js +4 -5
- package/dist/esm/shared/components/react-editor/BtnEmoji.js.map +1 -1
- package/dist/esm/shared/components/react-editor/BtnGif.js +3 -5
- package/dist/esm/shared/components/react-editor/BtnGif.js.map +1 -1
- package/dist/esm/shared/components/react-editor/ReactSimpleWysiwyg.js +3 -3
- package/dist/esm/shared/cookies/cookies.utils.js +1 -1
- package/dist/esm/shared/cookies/index.js +1 -1
- package/dist/esm/shared/types/generated.js +1 -1
- package/package.json +1 -1
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { Grid, Paper, Box } from '@mui/material';
|
|
3
|
+
import { useStore } from '@cobuildlab/react-simple-state';
|
|
3
4
|
import { fetchCommentsStore } from '../comment.store.js';
|
|
5
|
+
import { makeStyles } from '@mui/styles';
|
|
4
6
|
import { useComment } from '../comment.hooks.js';
|
|
5
|
-
import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
|
|
6
|
-
import Grid from '../../../node_modules/@mui/material/esm/Grid/Grid.js';
|
|
7
|
-
import Paper from '../../../node_modules/@mui/material/esm/Paper/Paper.js';
|
|
8
|
-
import Box from '../../../node_modules/@mui/material/esm/Box/Box.js';
|
|
9
7
|
|
|
10
8
|
const useStyles = makeStyles({
|
|
11
9
|
root: {
|
|
@@ -13,7 +11,7 @@ const useStyles = makeStyles({
|
|
|
13
11
|
},
|
|
14
12
|
});
|
|
15
13
|
const ShowMoreComments = () => {
|
|
16
|
-
const { comments, count } =
|
|
14
|
+
const { comments, count } = useStore(fetchCommentsStore);
|
|
17
15
|
const classes = useStyles();
|
|
18
16
|
const { loading, loadMoreComments } = useComment();
|
|
19
17
|
return count > comments.length ? (jsx(Grid, { size: 12, children: jsx(Paper, { elevation: 1, className: classes.root, onClick: () => loadMoreComments(), children: jsx(Box, { p: 1, textAlign: "center", children: loading ? 'Cargando...' : 'Ver más comentarios' }) }) })) : null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShowMoreComments.js","sources":["../../../../../src/components/comment/components/ShowMoreComments.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { Box, Grid, Paper } from '@mui/material';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { fetchCommentsStore } from '../comment.store';\nimport { makeStyles } from '@mui/styles';\nimport { useComment } from '../comment.hooks';\n\nconst useStyles = makeStyles({\n root: {\n cursor: 'pointer',\n },\n});\n\nexport const ShowMoreComments: React.FC = () => {\n const { comments, count } = useStore(fetchCommentsStore);\n const classes = useStyles();\n\n const { loading, loadMoreComments } = useComment();\n\n return count > comments.length ? (\n <Grid size={12}>\n <Paper\n elevation={1}\n className={classes.root}\n onClick={() => loadMoreComments()}\n >\n <Box p={1} textAlign=\"center\">\n {loading ? 'Cargando...' : 'Ver más comentarios'}\n </Box>\n </Paper>\n </Grid>\n ) : null;\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"ShowMoreComments.js","sources":["../../../../../src/components/comment/components/ShowMoreComments.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { Box, Grid, Paper } from '@mui/material';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { fetchCommentsStore } from '../comment.store';\nimport { makeStyles } from '@mui/styles';\nimport { useComment } from '../comment.hooks';\n\nconst useStyles = makeStyles({\n root: {\n cursor: 'pointer',\n },\n});\n\nexport const ShowMoreComments: React.FC = () => {\n const { comments, count } = useStore(fetchCommentsStore);\n const classes = useStyles();\n\n const { loading, loadMoreComments } = useComment();\n\n return count > comments.length ? (\n <Grid size={12}>\n <Paper\n elevation={1}\n className={classes.root}\n onClick={() => loadMoreComments()}\n >\n <Box p={1} textAlign=\"center\">\n {loading ? 'Cargando...' : 'Ver más comentarios'}\n </Box>\n </Paper>\n </Grid>\n ) : null;\n};\n"],"names":["_jsx"],"mappings":";;;;;;;AASA,MAAM,SAAS,GAAG,UAAU,CAAC;AAC3B,IAAA,IAAI,EAAE;AACJ,QAAA,MAAM,EAAE,SAAS;AAClB,KAAA;AACF,CAAA,CAAC;AAEK,MAAM,gBAAgB,GAAa,MAAK;IAC7C,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,kBAAkB,CAAC;AACxD,IAAA,MAAM,OAAO,GAAG,SAAS,EAAE;IAE3B,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,GAAG,UAAU,EAAE;AAElD,IAAA,OAAO,KAAK,GAAG,QAAQ,CAAC,MAAM,IAC5BA,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,EAAE,EAAA,QAAA,EACZA,GAAA,CAAC,KAAK,EAAA,EACJ,SAAS,EAAE,CAAC,EACZ,SAAS,EAAE,OAAO,CAAC,IAAI,EACvB,OAAO,EAAE,MAAM,gBAAgB,EAAE,EAAA,QAAA,EAEjCA,GAAA,CAAC,GAAG,EAAA,EAAC,CAAC,EAAE,CAAC,EAAE,SAAS,EAAC,QAAQ,EAAA,QAAA,EAC1B,OAAO,GAAG,aAAa,GAAG,qBAAqB,EAAA,CAC5C,EAAA,CACA,EAAA,CACH,IACL,IAAI;AACV;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { Drawer, Box } from '@mui/material';
|
|
3
|
+
import { useStore } from '@cobuildlab/react-simple-state';
|
|
3
4
|
import { panelStore } from './panel.store.js';
|
|
4
5
|
import { handlePanelClick } from './panel.actions.js';
|
|
5
|
-
import Drawer from '../../node_modules/@mui/material/esm/Drawer/Drawer.js';
|
|
6
|
-
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
7
6
|
|
|
8
7
|
const Panel = ({ children, footer, size = 300, ...rest }) => {
|
|
9
|
-
const { isOpen } =
|
|
8
|
+
const { isOpen } = useStore(panelStore);
|
|
10
9
|
return (jsx(Drawer, { open: isOpen, onClose: () => handlePanelClick(false), ...rest, children: jsxs(Box, { sx: { width: size }, display: "flex", flexDirection: "column", justifyContent: "space-between", height: "100%", children: [jsx(Box, { children: children }), jsx(Box, { children: footer })] }) }));
|
|
11
10
|
};
|
|
12
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Panel.js","sources":["../../../../src/components/panel/Panel.tsx"],"sourcesContent":["\nimport { Box, Drawer, DrawerProps } from '@mui/material';\nimport React from 'react';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { handlePanelClick } from './panel.actions';\n\nexport interface PanelProps extends DrawerProps {\n children?: React.ReactNode;\n footer?: React.ReactNode;\n size?: number;\n}\n\nexport const Panel: React.FC<PanelProps> = ({ children, footer, size = 300, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return (\n <Drawer open={isOpen} onClose={() => handlePanelClick(false)} {...rest}>\n <Box\n sx={{ width: size }}\n display=\"flex\"\n flexDirection=\"column\"\n justifyContent=\"space-between\"\n height=\"100%\">\n <Box>{children}</Box>\n <Box>{footer}</Box>\n </Box>\n </Drawer>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Panel.js","sources":["../../../../src/components/panel/Panel.tsx"],"sourcesContent":["\nimport { Box, Drawer, DrawerProps } from '@mui/material';\nimport React from 'react';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { handlePanelClick } from './panel.actions';\n\nexport interface PanelProps extends DrawerProps {\n children?: React.ReactNode;\n footer?: React.ReactNode;\n size?: number;\n}\n\nexport const Panel: React.FC<PanelProps> = ({ children, footer, size = 300, ...rest }) => {\n const { isOpen } = useStore(panelStore);\n\n return (\n <Drawer open={isOpen} onClose={() => handlePanelClick(false)} {...rest}>\n <Box\n sx={{ width: size }}\n display=\"flex\"\n flexDirection=\"column\"\n justifyContent=\"space-between\"\n height=\"100%\">\n <Box>{children}</Box>\n <Box>{footer}</Box>\n </Box>\n </Drawer>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAaO,MAAM,KAAK,GAAyB,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,GAAG,GAAG,EAAE,GAAG,IAAI,EAAE,KAAI;IACvF,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC;AAEvC,IAAA,QACEA,GAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC,KAAK,CAAC,EAAA,GAAM,IAAI,EAAA,QAAA,EACpEC,IAAA,CAAC,GAAG,EAAA,EACF,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EACnB,OAAO,EAAC,MAAM,EACd,aAAa,EAAC,QAAQ,EACtB,cAAc,EAAC,eAAe,EAC9B,MAAM,EAAC,MAAM,EAAA,QAAA,EAAA,CACbD,GAAA,CAAC,GAAG,EAAA,EAAA,QAAA,EAAE,QAAQ,EAAA,CAAO,EACrBA,GAAA,CAAC,GAAG,EAAA,EAAA,QAAA,EAAE,MAAM,EAAA,CAAO,CAAA,EAAA,CACf,EAAA,CACC;AAEb;;;;"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Box, Avatar, Link, Typography } from '@mui/material';
|
|
2
3
|
import { useSession } from '../session/session.hooks.js';
|
|
3
|
-
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
4
|
-
import Avatar from '../../node_modules/@mui/material/esm/Avatar/Avatar.js';
|
|
5
|
-
import Link from '../../node_modules/@mui/material/esm/Link/Link.js';
|
|
6
|
-
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
7
4
|
|
|
8
5
|
const PanelAvatar = ({ avatarProps = {}, textProps = {}, textLink = 'Administrar Cuenta', SubscriptionImageComponent = null, }) => {
|
|
9
6
|
const { user, config } = useSession();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, Typography, TypographyProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textProps?: TypographyProps;\n textLink?: string;\n SubscriptionImageComponent?: React.ReactNode | null;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps = {},\n textProps = {},\n textLink = 'Administrar Cuenta',\n SubscriptionImageComponent = null,\n}) => {\n const { user, config } = useSession();\n const { sx: sxTextProps, ...textRestProps } = textProps;\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {SubscriptionImageComponent}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal} sx={{ textDecoration: 'none' }}>\n <Typography\n sx={{\n color: 'black',\n fontSize: '12px',\n ...sxTextProps,\n }}\n {...textRestProps}>\n {textLink}\n </Typography>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelAvatar.js","sources":["../../../../src/components/panel/PanelAvatar.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Box, Avatar, Link, AvatarProps, Typography, TypographyProps } from '@mui/material';\nimport { useSession } from '../session/session.hooks';\n\nexport interface PanelAvatarProps {\n avatarProps?: AvatarProps;\n textProps?: TypographyProps;\n textLink?: string;\n SubscriptionImageComponent?: React.ReactNode | null;\n}\n\nexport const PanelAvatar: React.FC<PanelAvatarProps> = ({\n avatarProps = {},\n textProps = {},\n textLink = 'Administrar Cuenta',\n SubscriptionImageComponent = null,\n}) => {\n const { user, config } = useSession();\n const { sx: sxTextProps, ...textRestProps } = textProps;\n return (\n <Box px={1.5} py={1} display=\"flex\" alignItems=\"center\">\n <Box mr={1} position=\"relative\">\n <Avatar\n sx={{ width: 40, height: 40, ...avatarProps?.sx }}\n src={user?.avatar as string}\n {...avatarProps}\n />\n {SubscriptionImageComponent}\n </Box>\n <Box>\n <Box mb={0}>{decodeURIComponent(user?.name as string)}</Box>\n <Link href={config?.urlPortal} sx={{ textDecoration: 'none' }}>\n <Typography\n sx={{\n color: 'black',\n fontSize: '12px',\n ...sxTextProps,\n }}\n {...textRestProps}>\n {textLink}\n </Typography>\n </Link>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";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;AAEV;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Button } from '@mui/material';
|
|
2
3
|
import { handlePanelClick } from './panel.actions.js';
|
|
3
|
-
import {
|
|
4
|
+
import { useStore } from '@cobuildlab/react-simple-state';
|
|
4
5
|
import { panelStore } from './panel.store.js';
|
|
5
6
|
import { useSession } from '../session/session.hooks.js';
|
|
6
7
|
import { URL_PORTAL } from '../../shared/constants/index.js';
|
|
7
|
-
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
8
8
|
|
|
9
9
|
const PanelButton = ({ loginButtonText = 'CUENTA', registerButtonText = 'INGRESAR', registerButtonProps, loginButtonProps, params = {}, }) => {
|
|
10
|
-
const { isOpen } =
|
|
10
|
+
const { isOpen } = useStore(panelStore);
|
|
11
11
|
const { user } = useSession();
|
|
12
12
|
const handleClick = () => {
|
|
13
13
|
if (user)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["\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":["
|
|
1
|
+
{"version":3,"file":"PanelButton.js","sources":["../../../../src/components/panel/PanelButton.tsx"],"sourcesContent":["\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":["_jsx"],"mappings":";;;;;;;;MAiBa,WAAW,GAAyB,CAAC,EAChD,eAAe,GAAG,QAAQ,EAC1B,kBAAkB,GAAG,UAAU,EAC/B,mBAAmB,EACnB,gBAAgB,EAChB,MAAM,GAAG,EAAE,GACZ,KAAI;IACH,MAAM,EAAE,MAAM,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC;AACvC,IAAA,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,EAAE;IAE7B,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,IAAI,IAAI;AAAE,YAAA,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC;AAE1C,QAAA,IAAI,GAAG,GAAG,CAAA,EAAG,UAAU,gBAAgB;AAEvC,QAAA,MAAM,WAAW,GAAG;AAClB,YAAA,YAAY,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;AAClC,YAAA,GAAG,MAAM;SACV;QAED,MAAM,WAAW,GAAG,IAAI,eAAe,CAAC,WAAW,CAAC,CAAC,QAAQ,EAAE;AAE/D,QAAA,QAAQ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,WAAW,CAAA,CAAE;AACxD,IAAA,CAAC;IAED,IAAI,IAAI,EAAE;AACR,QAAA,QACEA,GAAA,CAAC,MAAM,EAAA,EAAC,OAAO,EAAE,WAAW,EAAA,GAAM,gBAAgB,EAAA,QAAA,EAC/C,eAAe,EAAA,CACT;IAEb;AAEA,IAAA,QACEA,GAAA,CAAC,MAAM,EAAA,EAAC,OAAO,EAAE,WAAW,EAAA,GAAM,mBAAmB,EAAA,QAAA,EAClD,kBAAkB,EAAA,CACZ;AAEb;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { List, ListItemIcon } from '@mui/material';
|
|
2
3
|
import { PanelDivider } from './PanelDivider.js';
|
|
3
4
|
import { PanelItem } from './PanelItem.js';
|
|
4
5
|
import { theme } from '../../shared/mui/theme.js';
|
|
5
6
|
import PowerSettingsNewIcon from '../../node_modules/@mui/icons-material/esm/PowerSettingsNew.js';
|
|
6
7
|
import { handleLogout } from './panel.actions.js';
|
|
7
8
|
import { useSession } from '../session/session.hooks.js';
|
|
8
|
-
import List from '../../node_modules/@mui/material/esm/List/List.js';
|
|
9
|
-
import ListItemIcon from '../../node_modules/@mui/material/esm/ListItemIcon/ListItemIcon.js';
|
|
10
9
|
|
|
11
10
|
const PanelFooter = ({ dividerProps, listProps, listItemProps, listItemTextProps, }) => {
|
|
12
11
|
const { config } = useSession();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelFooter.js","sources":["../../../../src/components/panel/PanelFooter.tsx"],"sourcesContent":["\nimport {\n DividerProps,\n List,\n ListItemIcon,\n ListItemProps,\n ListItemTextProps,\n ListProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { PanelItem } from './PanelItem';\nimport { theme } from '../../shared/mui/theme';\nimport PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';\nimport { handleLogout } from './panel.actions';\nimport { useSession } from '../session/session.hooks';\nimport React from 'react';\n\nexport interface PanelFooterProps {\n dividerProps?: DividerProps;\n listProps?: ListProps;\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelFooter: React.FC<PanelFooterProps> = ({\n dividerProps,\n listProps,\n listItemProps,\n listItemTextProps,\n}) => {\n const { config } = useSession();\n return (\n <List disablePadding {...listProps}>\n <PanelDivider {...dividerProps} />\n <PanelItem\n listItemProps={{\n onClick: () => handleLogout(config),\n secondaryAction: (\n <ListItemIcon sx={{ marginRight: theme.spacing(1.5), minWidth: 0 }}>\n <PowerSettingsNewIcon />\n </ListItemIcon>\n ),\n component: 'div',\n ...listItemProps,\n }}\n listItemTextProps={{\n primary: 'Cerrar sesión',\n primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },\n ...listItemTextProps,\n }}\n />\n </List>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelFooter.js","sources":["../../../../src/components/panel/PanelFooter.tsx"],"sourcesContent":["\nimport {\n DividerProps,\n List,\n ListItemIcon,\n ListItemProps,\n ListItemTextProps,\n ListProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { PanelItem } from './PanelItem';\nimport { theme } from '../../shared/mui/theme';\nimport PowerSettingsNewIcon from '@mui/icons-material/PowerSettingsNew';\nimport { handleLogout } from './panel.actions';\nimport { useSession } from '../session/session.hooks';\nimport React from 'react';\n\nexport interface PanelFooterProps {\n dividerProps?: DividerProps;\n listProps?: ListProps;\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelFooter: React.FC<PanelFooterProps> = ({\n dividerProps,\n listProps,\n listItemProps,\n listItemTextProps,\n}) => {\n const { config } = useSession();\n return (\n <List disablePadding {...listProps}>\n <PanelDivider {...dividerProps} />\n <PanelItem\n listItemProps={{\n onClick: () => handleLogout(config),\n secondaryAction: (\n <ListItemIcon sx={{ marginRight: theme.spacing(1.5), minWidth: 0 }}>\n <PowerSettingsNewIcon />\n </ListItemIcon>\n ),\n component: 'div',\n ...listItemProps,\n }}\n listItemTextProps={{\n primary: 'Cerrar sesión',\n primaryTypographyProps: { sx: { fontWeight: 'bold', fontSize: 18 } },\n ...listItemTextProps,\n }}\n />\n </List>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;AAwBO,MAAM,WAAW,GAA+B,CAAC,EACtD,YAAY,EACZ,SAAS,EACT,aAAa,EACb,iBAAiB,GAClB,KAAI;AACH,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,UAAU,EAAE;AAC/B,IAAA,QACEA,IAAA,CAAC,IAAI,IAAC,cAAc,EAAA,IAAA,EAAA,GAAK,SAAS,EAAA,QAAA,EAAA,CAChCC,GAAA,CAAC,YAAY,EAAA,EAAA,GAAK,YAAY,EAAA,CAAI,EAClCA,IAAC,SAAS,EAAA,EACR,aAAa,EAAE;AACb,oBAAA,OAAO,EAAE,MAAM,YAAY,CAAC,MAAM,CAAC;oBACnC,eAAe,GACbA,GAAA,CAAC,YAAY,EAAA,EAAC,EAAE,EAAE,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,EAAA,QAAA,EAChEA,GAAA,CAAC,oBAAoB,EAAA,EAAA,CAAG,EAAA,CACX,CAChB;AACD,oBAAA,SAAS,EAAE,KAAK;AAChB,oBAAA,GAAG,aAAa;AACjB,iBAAA,EACD,iBAAiB,EAAE;AACjB,oBAAA,OAAO,EAAE,eAAe;AACxB,oBAAA,sBAAsB,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE;AACpE,oBAAA,GAAG,iBAAiB;iBACrB,EAAA,CACD,CAAA,EAAA,CACG;AAEX;;;;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import Box from '
|
|
2
|
+
import { Box } from '@mui/material';
|
|
3
3
|
|
|
4
4
|
const PanelHeader = ({ imageProps = {}, containerProps = {}, }) => {
|
|
5
5
|
return (jsx(Box, { ...containerProps, children: jsx("img", { ...imageProps, alt: imageProps?.alt }) }));
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { ListItem, ListItemButton, ListItemText, IconButton } from '@mui/material';
|
|
2
3
|
import ArrowForwardIosIcon from '../../node_modules/@mui/icons-material/esm/ArrowForwardIos.js';
|
|
3
4
|
import { theme } from '../../shared/mui/theme.js';
|
|
4
|
-
import ListItem from '../../node_modules/@mui/material/esm/ListItem/ListItem.js';
|
|
5
|
-
import ListItemButton from '../../node_modules/@mui/material/esm/ListItemButton/ListItemButton.js';
|
|
6
|
-
import ListItemText from '../../node_modules/@mui/material/esm/ListItemText/ListItemText.js';
|
|
7
|
-
import IconButton from '../../node_modules/@mui/material/esm/IconButton/IconButton.js';
|
|
8
5
|
|
|
9
6
|
const PanelItem = ({ listItemProps, listItemTextProps }) => {
|
|
10
7
|
return (jsx(ListItem, { disablePadding: true, component: "a", secondaryAction: jsx(IconButton, { children: jsx(ArrowForwardIosIcon, { fontSize: "small" }) }), ...listItemProps, children: jsx(ListItemButton, { sx: { alignItems: 'center', paddingLeft: theme.spacing(1.5) }, children: jsx(ListItemText, { ...listItemTextProps }) }) }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelItem.js","sources":["../../../../src/components/panel/PanelItem.tsx"],"sourcesContent":["\nimport React from 'react';\nimport {\n ListItem,\n ListItemButton,\n ListItemText,\n IconButton,\n ListItemProps,\n ListItemTextProps,\n} from '@mui/material';\nimport ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';\nimport { theme } from '../../shared/mui/theme';\n\nexport interface PanelItemProps {\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelItem: React.FC<PanelItemProps> = ({ listItemProps, listItemTextProps }) => {\n return (\n <ListItem\n disablePadding\n component=\"a\"\n secondaryAction={\n <IconButton>\n <ArrowForwardIosIcon fontSize=\"small\" />\n </IconButton>\n }\n {...listItemProps}>\n <ListItemButton sx={{ alignItems: 'center', paddingLeft: theme.spacing(1.5) }}>\n <ListItemText {...listItemTextProps} />\n </ListItemButton>\n </ListItem>\n );\n};\n"],"names":["_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelItem.js","sources":["../../../../src/components/panel/PanelItem.tsx"],"sourcesContent":["\nimport React from 'react';\nimport {\n ListItem,\n ListItemButton,\n ListItemText,\n IconButton,\n ListItemProps,\n ListItemTextProps,\n} from '@mui/material';\nimport ArrowForwardIosIcon from '@mui/icons-material/ArrowForwardIos';\nimport { theme } from '../../shared/mui/theme';\n\nexport interface PanelItemProps {\n listItemProps?: ListItemProps & { href?: string };\n listItemTextProps?: ListItemTextProps;\n}\n\nexport const PanelItem: React.FC<PanelItemProps> = ({ listItemProps, listItemTextProps }) => {\n return (\n <ListItem\n disablePadding\n component=\"a\"\n secondaryAction={\n <IconButton>\n <ArrowForwardIosIcon fontSize=\"small\" />\n </IconButton>\n }\n {...listItemProps}>\n <ListItemButton sx={{ alignItems: 'center', paddingLeft: theme.spacing(1.5) }}>\n <ListItemText {...listItemTextProps} />\n </ListItemButton>\n </ListItem>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;AAkBO,MAAM,SAAS,GAA6B,CAAC,EAAE,aAAa,EAAE,iBAAiB,EAAE,KAAI;IAC1F,QACEA,GAAA,CAAC,QAAQ,EAAA,EACP,cAAc,QACd,SAAS,EAAC,GAAG,EACb,eAAe,EACbA,IAAC,UAAU,EAAA,EAAA,QAAA,EACTA,GAAA,CAAC,mBAAmB,EAAA,EAAC,QAAQ,EAAC,OAAO,EAAA,CAAG,EAAA,CAC7B,EAAA,GAEX,aAAa,EAAA,QAAA,EACjBA,GAAA,CAAC,cAAc,EAAA,EAAC,EAAE,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,EAAA,QAAA,EAC3EA,GAAA,CAAC,YAAY,EAAA,EAAA,GAAK,iBAAiB,EAAA,CAAI,EAAA,CACxB,EAAA,CACR;AAEf;;;;"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Box, Typography, List } from '@mui/material';
|
|
2
3
|
import { PanelDivider } from './PanelDivider.js';
|
|
3
4
|
import { theme } from '../../shared/mui/theme.js';
|
|
4
5
|
import { PanelItem } from './PanelItem.js';
|
|
5
|
-
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
6
|
-
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
7
|
-
import List from '../../node_modules/@mui/material/esm/List/List.js';
|
|
8
6
|
|
|
9
7
|
const PanelListItems = ({ dividerProps, containerProps, listProps, titleProps, routes = [], title = 'Title', }) => {
|
|
10
8
|
return (jsxs(Box, { ...containerProps, children: [title ? (jsxs(Fragment, { children: [jsx(Typography, { px: 1.5, mb: 1, lineHeight: 1.2, fontWeight: "bold", fontSize: 16, ...titleProps, children: title }), jsx(PanelDivider, { ...dividerProps })] })) : null, jsx(List, { disablePadding: true, sx: { marginBottom: theme.spacing(1) }, ...listProps, children: routes.map((route, index) => (jsx(PanelItem, { listItemProps: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelListItems.js","sources":["../../../../src/components/panel/PanelListItems.tsx"],"sourcesContent":["\nimport React from 'react';\nimport {\n ListProps,\n Box,\n Typography,\n DividerProps,\n BoxProps,\n List,\n TypographyProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { theme } from '../../shared/mui/theme';\nimport { PanelListRoute } from './panel.types';\nimport { PanelItem } from './PanelItem';\n\nexport interface PanelListItems {\n dividerProps?: DividerProps;\n containerProps?: BoxProps;\n listProps?: ListProps;\n routes?: PanelListRoute[];\n titleProps?: TypographyProps;\n title?: string;\n}\n\nexport const PanelListItems: React.FC<PanelListItems> = ({\n dividerProps,\n containerProps,\n listProps,\n titleProps,\n routes = [],\n title = 'Title',\n}) => {\n return (\n <Box {...containerProps}>\n {title ? (\n <>\n <Typography\n px={1.5}\n mb={1}\n lineHeight={1.2}\n fontWeight=\"bold\"\n fontSize={16}\n {...titleProps}>\n {title}\n </Typography>\n <PanelDivider {...dividerProps} />\n </>\n ) : null}\n\n <List disablePadding sx={{ marginBottom: theme.spacing(1) }} {...listProps}>\n {routes.map((route, index) => (\n <PanelItem\n key={index}\n listItemProps={{\n href: route.path,\n }}\n listItemTextProps={{\n primary: route.name,\n primaryTypographyProps: { sx: { fontWeight: 400, fontSize: 16 } },\n }}\n />\n ))}\n </List>\n </Box>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelListItems.js","sources":["../../../../src/components/panel/PanelListItems.tsx"],"sourcesContent":["\nimport React from 'react';\nimport {\n ListProps,\n Box,\n Typography,\n DividerProps,\n BoxProps,\n List,\n TypographyProps,\n} from '@mui/material';\nimport { PanelDivider } from './PanelDivider';\nimport { theme } from '../../shared/mui/theme';\nimport { PanelListRoute } from './panel.types';\nimport { PanelItem } from './PanelItem';\n\nexport interface PanelListItems {\n dividerProps?: DividerProps;\n containerProps?: BoxProps;\n listProps?: ListProps;\n routes?: PanelListRoute[];\n titleProps?: TypographyProps;\n title?: string;\n}\n\nexport const PanelListItems: React.FC<PanelListItems> = ({\n dividerProps,\n containerProps,\n listProps,\n titleProps,\n routes = [],\n title = 'Title',\n}) => {\n return (\n <Box {...containerProps}>\n {title ? (\n <>\n <Typography\n px={1.5}\n mb={1}\n lineHeight={1.2}\n fontWeight=\"bold\"\n fontSize={16}\n {...titleProps}>\n {title}\n </Typography>\n <PanelDivider {...dividerProps} />\n </>\n ) : null}\n\n <List disablePadding sx={{ marginBottom: theme.spacing(1) }} {...listProps}>\n {routes.map((route, index) => (\n <PanelItem\n key={index}\n listItemProps={{\n href: route.path,\n }}\n listItemTextProps={{\n primary: route.name,\n primaryTypographyProps: { sx: { fontWeight: 400, fontSize: 16 } },\n }}\n />\n ))}\n </List>\n </Box>\n );\n};\n"],"names":["_jsxs","_Fragment","_jsx"],"mappings":";;;;;;MAyBa,cAAc,GAA6B,CAAC,EACvD,YAAY,EACZ,cAAc,EACd,SAAS,EACT,UAAU,EACV,MAAM,GAAG,EAAE,EACX,KAAK,GAAG,OAAO,GAChB,KAAI;AACH,IAAA,QACEA,IAAA,CAAC,GAAG,OAAK,cAAc,EAAA,QAAA,EAAA,CACpB,KAAK,IACJA,IAAA,CAAAC,QAAA,EAAA,EAAA,QAAA,EAAA,CACEC,IAAC,UAAU,EAAA,EACT,EAAE,EAAE,GAAG,EACP,EAAE,EAAE,CAAC,EACL,UAAU,EAAE,GAAG,EACf,UAAU,EAAC,MAAM,EACjB,QAAQ,EAAE,EAAE,EAAA,GACR,UAAU,EAAA,QAAA,EACb,KAAK,GACK,EACbA,GAAA,CAAC,YAAY,EAAA,EAAA,GAAK,YAAY,EAAA,CAAI,CAAA,EAAA,CACjC,IACD,IAAI,EAERA,IAAC,IAAI,EAAA,EAAC,cAAc,EAAA,IAAA,EAAC,EAAE,EAAE,EAAE,YAAY,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAM,SAAS,EAAA,QAAA,EACvE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MACvBA,IAAC,SAAS,EAAA,EAER,aAAa,EAAE;wBACb,IAAI,EAAE,KAAK,CAAC,IAAI;AACjB,qBAAA,EACD,iBAAiB,EAAE;wBACjB,OAAO,EAAE,KAAK,CAAC,IAAI;AACnB,wBAAA,sBAAsB,EAAE,EAAE,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE,EAAE,EAAE;AAClE,qBAAA,EAAA,EAPI,KAAK,CAQV,CACH,CAAC,EAAA,CACG,CAAA,EAAA,CACH;AAEV;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useSession } from '../session/session.hooks.js';
|
|
3
|
-
import Box from '
|
|
3
|
+
import { Box } from '@mui/material';
|
|
4
4
|
|
|
5
5
|
const PanelSubscriptionIcon = ({ children, subscriptionImageContainerProps = {}, }) => {
|
|
6
6
|
const { subscription } = useSession();
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createStoreAction } from '@cobuildlab/react-simple-state';
|
|
2
2
|
import { panelStore } from './panel.store.js';
|
|
3
3
|
import { universalCookies } from '../../shared/cookies/index.js';
|
|
4
4
|
import { getCookieOptions } from '../../shared/cookies/cookies.utils.js';
|
|
5
5
|
|
|
6
|
-
const panelStoreAction =
|
|
6
|
+
const panelStoreAction = createStoreAction(panelStore, (prev, data) => ({
|
|
7
7
|
...prev,
|
|
8
8
|
...data,
|
|
9
9
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.actions.js","sources":["../../../../src/components/panel/panel.actions.ts"],"sourcesContent":["import { createStoreAction } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { PanelStoreAction } from './panel.types';\nimport { universalCookies } from '../../shared/cookies';\nimport { Config } from '../../config/config.types';\nimport { getCookieOptions } from '../../shared/cookies/cookies.utils';\n\nexport const panelStoreAction = createStoreAction(panelStore, (prev, data: PanelStoreAction) => ({\n ...prev,\n ...data,\n}));\n\nexport const handlePanelClick = (isOpen: boolean) => {\n return panelStoreAction({ isOpen });\n};\n\nexport const handleLogout = (config: Config | undefined) => {\n const options = getCookieOptions(config);\n universalCookies.remove(config?.cookieTokenName as string, options);\n window.location.reload();\n};\n"],"names":[
|
|
1
|
+
{"version":3,"file":"panel.actions.js","sources":["../../../../src/components/panel/panel.actions.ts"],"sourcesContent":["import { createStoreAction } from '@cobuildlab/react-simple-state';\nimport { panelStore } from './panel.store';\nimport { PanelStoreAction } from './panel.types';\nimport { universalCookies } from '../../shared/cookies';\nimport { Config } from '../../config/config.types';\nimport { getCookieOptions } from '../../shared/cookies/cookies.utils';\n\nexport const panelStoreAction = createStoreAction(panelStore, (prev, data: PanelStoreAction) => ({\n ...prev,\n ...data,\n}));\n\nexport const handlePanelClick = (isOpen: boolean) => {\n return panelStoreAction({ isOpen });\n};\n\nexport const handleLogout = (config: Config | undefined) => {\n const options = getCookieOptions(config);\n universalCookies.remove(config?.cookieTokenName as string, options);\n window.location.reload();\n};\n"],"names":[],"mappings":";;;;;AAOO,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,IAAsB,MAAM;AAC/F,IAAA,GAAG,IAAI;AACP,IAAA,GAAG,IAAI;AACR,CAAA,CAAC;AAEK,MAAM,gBAAgB,GAAG,CAAC,MAAe,KAAI;AAClD,IAAA,OAAO,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAC;AACrC;AAEO,MAAM,YAAY,GAAG,CAAC,MAA0B,KAAI;AACzD,IAAA,MAAM,OAAO,GAAG,gBAAgB,CAAC,MAAM,CAAC;IACxC,gBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,eAAyB,EAAE,OAAO,CAAC;AACnE,IAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC1B;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.store.js","sources":["../../../../src/components/panel/panel.store.ts"],"sourcesContent":["import {createStore} from \"@cobuildlab/react-simple-state\";\n\nexport const panelStore = createStore({\n initialValue: {\n isOpen: false,\n },\n});"],"names":[
|
|
1
|
+
{"version":3,"file":"panel.store.js","sources":["../../../../src/components/panel/panel.store.ts"],"sourcesContent":["import {createStore} from \"@cobuildlab/react-simple-state\";\n\nexport const panelStore = createStore({\n initialValue: {\n isOpen: false,\n },\n});"],"names":[],"mappings":";;AAEO,MAAM,UAAU,GAAG,WAAW,CAAC;AAClC,IAAA,YAAY,EAAE;AACV,QAAA,MAAM,EAAE,KAAK;AAChB,KAAA;AACJ,CAAA;;;;"}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Box, Typography, Button } from '@mui/material';
|
|
2
3
|
import { URL_PORTAL } from '../../shared/constants/index.js';
|
|
3
|
-
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
4
|
-
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
5
|
-
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
6
4
|
|
|
7
5
|
const PaywallRegister = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = 'Ya estoy registrado', secondaryButtonProps = {}, title = 'Este artículo es exclusivo para usuarios registrados', subtitle = 'Regístrate para obtener beneficios exclusivos.', buttonText = '¡Regístrate gratis!', }) => {
|
|
8
6
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallRegister.js","sources":["../../../../src/components/paywall/PaywallRegister.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport {URL_PORTAL} from \"@/shared/constants\";\n\n\n\n\nexport interface PaywallRegisterProps {\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 PaywallRegister: React.FC<PaywallRegisterProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = 'Ya estoy registrado',\n secondaryButtonProps = {},\n title = 'Este artículo es exclusivo para usuarios registrados',\n subtitle = 'Regístrate para obtener beneficios exclusivos.',\n buttonText = '¡Regístrate gratis!',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n const url = URL_PORTAL;\n\n const handleButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_REGISTER?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n textTransform: 'none',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaywallRegister.js","sources":["../../../../src/components/paywall/PaywallRegister.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport {URL_PORTAL} from \"@/shared/constants\";\n\n\n\n\nexport interface PaywallRegisterProps {\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 PaywallRegister: React.FC<PaywallRegisterProps> = ({\n containerProps = {},\n subtitleProps = {},\n buttonProps = {},\n titleProps = {},\n secondaryButtonText = 'Ya estoy registrado',\n secondaryButtonProps = {},\n title = 'Este artículo es exclusivo para usuarios registrados',\n subtitle = 'Regístrate para obtener beneficios exclusivos.',\n buttonText = '¡Regístrate gratis!',\n}) => {\n const { sx: sxContainerProps, ...containerPropRest } = containerProps;\n const { sx: sxSubtitleProps, ...subtitlePropRest } = subtitleProps;\n const { sx: sxTitleProps, ...titlePropRest } = titleProps;\n const { sx: sxButtonProps, ...buttonPropsRest } = buttonProps;\n const { sx: sxSecondaryButtonProps, ...secondaryButtonPropsRest } = secondaryButtonProps;\n const url = URL_PORTAL;\n\n const handleButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_REGISTER?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n textTransform: 'none',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;AAsBO,MAAM,eAAe,GAAmC,CAAC,EAC9D,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UAAU,GAAG,EAAE,EACf,mBAAmB,GAAG,qBA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8 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
+
import { Box, Typography, Button } from '@mui/material';
|
|
2
3
|
import { URL_PORTAL } from '../../shared/constants/index.js';
|
|
3
|
-
import Box from '../../node_modules/@mui/material/esm/Box/Box.js';
|
|
4
|
-
import Typography from '../../node_modules/@mui/material/esm/Typography/Typography.js';
|
|
5
|
-
import Button from '../../node_modules/@mui/material/esm/Button/Button.js';
|
|
6
4
|
|
|
7
5
|
const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonProps = {}, titleProps = {}, secondaryButtonText = 'Ya soy suscriptor', secondaryButtonProps = {}, withCaption = false, title = 'Este artículo es exclusivo para suscriptores', subtitle = 'Tu contribución nos ayuda a cubrir costos de investigación, tecnología y ofrecerte servicios de valor agregado.', post, buttonText = 'Suscríbete', }) => {
|
|
8
6
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport {URL_PORTAL} from \"@/shared/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 const url = URL_PORTAL;\n const handleButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n textTransform: 'none',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.js","sources":["../../../../src/components/paywall/PaywallSubscription.tsx"],"sourcesContent":["\nimport React from 'react';\nimport { Box, BoxProps, Typography, TypographyProps, ButtonProps, Button } from '@mui/material';\nimport {URL_PORTAL} from \"@/shared/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 const url = URL_PORTAL;\n const handleButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/planes?post_url=${window.location.href}`);\n };\n\n const handleSecondaryButton = () => {\n if (!url) {\n console.error('NEXT_PUBLIC_URL_PORTAL is required!');\n return null;\n }\n\n return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);\n };\n\n return (\n <Box\n sx={{\n display: 'flex',\n width: '100%',\n border: '1px solid #707070',\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n background: 'white',\n paddingTop: '80px',\n paddingBottom: '80px',\n borderRadius: '20px',\n boxShadow: '0px 0px 32px #00000029',\n ...sxContainerProps,\n }}\n {...containerPropRest}>\n <Box\n sx={{\n width: {\n xs: 360,\n md: 460,\n },\n justifyContent: 'center',\n alignItems: 'center',\n flexDirection: 'column',\n display: 'flex',\n }}>\n <Typography\n sx={{\n fontWeight: 700,\n lineHeight: '34px',\n fontSize: '34px',\n textAlign: 'center',\n marginBottom: '1.5rem',\n ...sxTitleProps,\n }}\n {...titlePropRest}>\n {title}\n </Typography>\n <Typography\n sx={{ textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }}\n {...subtitlePropRest}>\n {subtitle}\n </Typography>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n background: '#f75957',\n '&:hover': {\n backgroundColor: '#f75957',\n },\n fontWeight: 700,\n textTransform: 'uppercase',\n marginBottom: '.5rem',\n color: 'white',\n fontSize: '18px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n borderRadius: '0.25rem',\n ...sxButtonProps,\n }}\n onClick={() => handleButton()}\n {...buttonPropsRest}>\n {buttonText}\n </Button>\n <Button\n disableElevation\n disableRipple\n disableTouchRipple\n disableFocusRipple\n sx={{\n textDecoration: 'underline',\n background: 'transparent',\n textTransform: 'none',\n fontWeight: 700,\n textAlign: 'center',\n fontSize: '16px',\n paddingTop: '.5rem',\n paddingBottom: '.5rem',\n paddingLeft: '.75rem',\n paddingRight: '.75rem',\n color: 'black',\n ...sxSecondaryButtonProps,\n }}\n onClick={() => handleSecondaryButton()}\n {...secondaryButtonPropsRest}>\n {secondaryButtonText}\n </Button>\n </Box>\n </Box>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;MAmBa,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,EAAE,sBAAsB,EAAE,GAAG,wBAAwB,EAAE,GAAG,oBAAoB;IACxF,MAAM,GAAG,GAAG,UAAU;IACtB,MAAM,YAAY,GAAG,MAAK;QACxB,IAAI,CAAC,GAAG,EAAE;AACR,YAAA,OAAO,CAAC,KAAK,CAAC,qCAAqC,CAAC;AACpD,YAAA,OAAO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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,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { GoogleOAuthProvider } from '
|
|
2
|
+
import { GoogleOAuthProvider } from '@react-oauth/google';
|
|
3
3
|
import { useEffect } from 'react';
|
|
4
4
|
import { SessionUserClientProvider } from './SessionUserClientProvider.js';
|
|
5
5
|
import { sessionConfigStore } from './session.stores.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
2
|
import { useState, useEffect } from 'react';
|
|
3
3
|
import { Provider } from './SessionUserContext.js';
|
|
4
|
-
import { useGoogleOneTapLogin } from '
|
|
4
|
+
import { useGoogleOneTapLogin } from '@react-oauth/google';
|
|
5
5
|
import { theme } from '../../shared/mui/theme.js';
|
|
6
6
|
import { getSubscriptionActive } from './session.utils.js';
|
|
7
7
|
import { COOKIES_OPTIONS } from './session.constants.js';
|
|
8
|
-
import {
|
|
8
|
+
import { useEvent, useCallAction } from '@cobuildlab/react-simple-state';
|
|
9
9
|
import { googleOneTapAction, currentUserAction } from './session.actions.js';
|
|
10
10
|
import { universalCookies } from '../../shared/cookies/index.js';
|
|
11
11
|
import { COOKIE_NAME } from '../../shared/constants/index.js';
|
|
@@ -15,9 +15,9 @@ import CssBaseline from '../../node_modules/@mui/material/esm/CssBaseline/CssBas
|
|
|
15
15
|
|
|
16
16
|
const SessionUserClientProvider = ({ children, config, }) => {
|
|
17
17
|
const [user, setUser] = useState(null);
|
|
18
|
-
const { token } =
|
|
18
|
+
const { token } = useEvent(tokenEvent);
|
|
19
19
|
const [savedPosts, setSavedPosts] = useState([]);
|
|
20
|
-
const [callGoogleOneTap] =
|
|
20
|
+
const [callGoogleOneTap] = useCallAction(googleOneTapAction, {
|
|
21
21
|
onCompleted: (data) => {
|
|
22
22
|
universalCookies.set(COOKIE_NAME, data.token, COOKIES_OPTIONS);
|
|
23
23
|
window.location.reload();
|
|
@@ -37,7 +37,7 @@ const SessionUserClientProvider = ({ children, config, }) => {
|
|
|
37
37
|
// }
|
|
38
38
|
},
|
|
39
39
|
});
|
|
40
|
-
const [callCurrentUserAction, loading] =
|
|
40
|
+
const [callCurrentUserAction, loading] = useCallAction(currentUserAction, {
|
|
41
41
|
onCompleted: (data) => {
|
|
42
42
|
setUser(data.currentUser);
|
|
43
43
|
setSavedPosts(data.currentUser?.post_saved);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionUserClientProvider.js","sources":["../../../../src/components/session/SessionUserClientProvider.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { User, UserSavedPost } from '@/shared/types/generated';\nimport { Provider } from './SessionUserContext';\nimport { SessionContextDefaultValues } from './session.types';\nimport { useGoogleOneTapLogin } from '@react-oauth/google';\n\nimport { ThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { theme } from '@/shared/mui/theme';\nimport { getSubscriptionActive } from './session.utils';\nimport { COOKIES_OPTIONS } from './session.constants';\nimport { useCallAction, useEvent } from '@cobuildlab/react-simple-state';\nimport { currentUserAction, googleOneTapAction } from './session.actions';\nimport { universalCookies } from '@/shared/cookies';\nimport { COOKIE_NAME } from '@/shared/constants';\nimport { tokenEvent } from './session.events';\nimport { Config } from '@/config/config.types';\n\ntype SessionUserClientProviderProps = {\n children: React.ReactNode;\n config: Config;\n};\n\nexport const SessionUserClientProvider: React.FC<SessionUserClientProviderProps> = ({\n children,\n config,\n}) => {\n const [user, setUser] = useState<User | null | undefined>(null);\n const { token } = useEvent(tokenEvent);\n const [savedPosts, setSavedPosts] = useState<UserSavedPost[]>([]);\n\n const [callGoogleOneTap] = useCallAction(googleOneTapAction, {\n onCompleted: (data) => {\n universalCookies.set(COOKIE_NAME, data.token, COOKIES_OPTIONS);\n window.location.reload();\n },\n });\n\n useGoogleOneTapLogin({\n onSuccess: (credentialResponse) => {\n callGoogleOneTap(credentialResponse.credential);\n },\n onError: () => {\n console.log('Login Failed');\n },\n disabled: !!token,\n promptMomentNotification: (data) => {\n // if (data.isSkippedMoment()) {\n // createAction(EasyDataName.skipSwg);\n // }\n },\n });\n\n const [callCurrentUserAction, loading] = useCallAction(currentUserAction, {\n onCompleted: (data) => {\n setUser(data.currentUser);\n setSavedPosts(data.currentUser?.post_saved as UserSavedPost[]);\n console.log({ data });\n },\n onError: (error) => {\n universalCookies.remove(COOKIE_NAME, COOKIES_OPTIONS);\n console.log({ message: error.message });\n },\n });\n\n useEffect(() => {\n if (token && config) {\n callCurrentUserAction();\n }\n }, [callCurrentUserAction, token, config]);\n\n const values: SessionContextDefaultValues = {\n user,\n config,\n subscription: getSubscriptionActive(user),\n loading,\n savedPosts,\n isAuthenticated: !!token,\n };\n\n return (\n <Provider value={values}>\n <ThemeProvider theme={theme}>\n <CssBaseline />\n {children}\n </ThemeProvider>\n </Provider>\n );\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"SessionUserClientProvider.js","sources":["../../../../src/components/session/SessionUserClientProvider.tsx"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport { User, UserSavedPost } from '@/shared/types/generated';\nimport { Provider } from './SessionUserContext';\nimport { SessionContextDefaultValues } from './session.types';\nimport { useGoogleOneTapLogin } from '@react-oauth/google';\n\nimport { ThemeProvider } from '@mui/material/styles';\nimport CssBaseline from '@mui/material/CssBaseline';\nimport { theme } from '@/shared/mui/theme';\nimport { getSubscriptionActive } from './session.utils';\nimport { COOKIES_OPTIONS } from './session.constants';\nimport { useCallAction, useEvent } from '@cobuildlab/react-simple-state';\nimport { currentUserAction, googleOneTapAction } from './session.actions';\nimport { universalCookies } from '@/shared/cookies';\nimport { COOKIE_NAME } from '@/shared/constants';\nimport { tokenEvent } from './session.events';\nimport { Config } from '@/config/config.types';\n\ntype SessionUserClientProviderProps = {\n children: React.ReactNode;\n config: Config;\n};\n\nexport const SessionUserClientProvider: React.FC<SessionUserClientProviderProps> = ({\n children,\n config,\n}) => {\n const [user, setUser] = useState<User | null | undefined>(null);\n const { token } = useEvent(tokenEvent);\n const [savedPosts, setSavedPosts] = useState<UserSavedPost[]>([]);\n\n const [callGoogleOneTap] = useCallAction(googleOneTapAction, {\n onCompleted: (data) => {\n universalCookies.set(COOKIE_NAME, data.token, COOKIES_OPTIONS);\n window.location.reload();\n },\n });\n\n useGoogleOneTapLogin({\n onSuccess: (credentialResponse) => {\n callGoogleOneTap(credentialResponse.credential);\n },\n onError: () => {\n console.log('Login Failed');\n },\n disabled: !!token,\n promptMomentNotification: (data) => {\n // if (data.isSkippedMoment()) {\n // createAction(EasyDataName.skipSwg);\n // }\n },\n });\n\n const [callCurrentUserAction, loading] = useCallAction(currentUserAction, {\n onCompleted: (data) => {\n setUser(data.currentUser);\n setSavedPosts(data.currentUser?.post_saved as UserSavedPost[]);\n console.log({ data });\n },\n onError: (error) => {\n universalCookies.remove(COOKIE_NAME, COOKIES_OPTIONS);\n console.log({ message: error.message });\n },\n });\n\n useEffect(() => {\n if (token && config) {\n callCurrentUserAction();\n }\n }, [callCurrentUserAction, token, config]);\n\n const values: SessionContextDefaultValues = {\n user,\n config,\n subscription: getSubscriptionActive(user),\n loading,\n savedPosts,\n isAuthenticated: !!token,\n };\n\n return (\n <Provider value={values}>\n <ThemeProvider theme={theme}>\n <CssBaseline />\n {children}\n </ThemeProvider>\n </Provider>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;;;;;AAuBO,MAAM,yBAAyB,GAA6C,CAAC,EAClF,QAAQ,EACR,MAAM,GACP,KAAI;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAA0B,IAAI,CAAC;IAC/D,MAAM,EAAE,KAAK,EAAE,GAAG,QAAQ,CAAC,UAAU,CAAC;IACtC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAkB,EAAE,CAAC;AAEjE,IAAA,MAAM,CAAC,gBAAgB,CAAC,GAAG,aAAa,CAAC,kBAAkB,EAAE;AAC3D,QAAA,WAAW,EAAE,CAAC,IAAI,KAAI;YACpB,gBAAgB,CAAC,GAAG,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,EAAE,eAAe,CAAC;AAC9D,YAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;QAC1B,CAAC;AACF,KAAA,CAAC;AAEF,IAAA,oBAAoB,CAAC;AACnB,QAAA,SAAS,EAAE,CAAC,kBAAkB,KAAI;AAChC,YAAA,gBAAgB,CAAC,kBAAkB,CAAC,UAAU,CAAC;QACjD,CAAC;QACD,OAAO,EAAE,MAAK;AACZ,YAAA,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;QAC7B,CAAC;QACD,QAAQ,EAAE,CAAC,CAAC,KAAK;AACjB,QAAA,wBAAwB,EAAE,CAAC,IAAI,KAAI;;;;QAInC,CAAC;AACF,KAAA,CAAC;IAEF,MAAM,CAAC,qBAAqB,EAAE,OAAO,CAAC,GAAG,aAAa,CAAC,iBAAiB,EAAE;AACxE,QAAA,WAAW,EAAE,CAAC,IAAI,KAAI;AACpB,YAAA,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC;AACzB,YAAA,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,UAA6B,CAAC;AAC9D,YAAA,OAAO,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;QACvB,CAAC;AACD,QAAA,OAAO,EAAE,CAAC,KAAK,KAAI;AACjB,YAAA,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,eAAe,CAAC;YACrD,OAAO,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC;QACzC,CAAC;AACF,KAAA,CAAC;IAEF,SAAS,CAAC,MAAK;AACb,QAAA,IAAI,KAAK,IAAI,MAAM,EAAE;AACnB,YAAA,qBAAqB,EAAE;QACzB;IACF,CAAC,EAAE,CAAC,qBAAqB,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;AAE1C,IAAA,MAAM,MAAM,GAAgC;QAC1C,IAAI;QACJ,MAAM;AACN,QAAA,YAAY,EAAE,qBAAqB,CAAC,IAAI,CAAC;QACzC,OAAO;QACP,UAAU;QACV,eAAe,EAAE,CAAC,CAAC,KAAK;KACzB;IAED,QACEA,IAAC,QAAQ,EAAA,EAAC,KAAK,EAAE,MAAM,EAAA,QAAA,EACrBC,IAAA,CAAC,aAAa,EAAA,EAAC,KAAK,EAAE,KAAK,EAAA,QAAA,EAAA,CACzBD,GAAA,CAAC,WAAW,EAAA,EAAA,CAAG,EACd,QAAQ,CAAA,EAAA,CACK,EAAA,CACP;AAEf;;;;"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createAction } from '@cobuildlab/react-simple-state';
|
|
2
2
|
import { googleOneTapEvent, googleOneTapErrorEvent, currentUserEvent, currentUserErrorEvent, createUserSavedPostEvent, createUserSavedPostErrorEvent, deleteUserSavedPostEvent, deleteUserSavedPostErrorEvent } from './session.events.js';
|
|
3
3
|
import { URI } from '../../shared/constants/index.js';
|
|
4
|
-
import '
|
|
4
|
+
import axios from 'axios';
|
|
5
5
|
import { apolloClient } from '../../shared/apollo/apollo.client.js';
|
|
6
6
|
import { CurrentUserDocument, CreateUserSavedPostDocument, DeleteUserSavedPostDocument } from '../../shared/types/generated.js';
|
|
7
|
-
import axios from '../../node_modules/axios/lib/axios.js';
|
|
8
7
|
|
|
9
|
-
const googleOneTapAction =
|
|
8
|
+
const googleOneTapAction = createAction(googleOneTapEvent, googleOneTapErrorEvent, async (idToken) => {
|
|
10
9
|
let token = undefined;
|
|
11
10
|
if (!URI) {
|
|
12
11
|
console.error('URI is missing');
|
|
@@ -21,7 +20,7 @@ const googleOneTapAction = libExports.createAction(googleOneTapEvent, googleOneT
|
|
|
21
20
|
token,
|
|
22
21
|
};
|
|
23
22
|
});
|
|
24
|
-
const currentUserAction =
|
|
23
|
+
const currentUserAction = createAction(currentUserEvent, currentUserErrorEvent, async () => {
|
|
25
24
|
const response = await apolloClient().query({
|
|
26
25
|
query: CurrentUserDocument,
|
|
27
26
|
fetchPolicy: 'network-only',
|
|
@@ -30,7 +29,7 @@ const currentUserAction = libExports.createAction(currentUserEvent, currentUserE
|
|
|
30
29
|
currentUser: response.data?.currentUser,
|
|
31
30
|
};
|
|
32
31
|
});
|
|
33
|
-
|
|
32
|
+
createAction(createUserSavedPostEvent, createUserSavedPostErrorEvent, async (variables) => {
|
|
34
33
|
const response = await apolloClient().mutate({
|
|
35
34
|
mutation: CreateUserSavedPostDocument,
|
|
36
35
|
variables,
|
|
@@ -41,7 +40,7 @@ libExports.createAction(createUserSavedPostEvent, createUserSavedPostErrorEvent,
|
|
|
41
40
|
createUserSavedPost: response.data?.createUserSavedPost,
|
|
42
41
|
};
|
|
43
42
|
});
|
|
44
|
-
|
|
43
|
+
createAction(deleteUserSavedPostEvent, deleteUserSavedPostErrorEvent, async (variables) => {
|
|
45
44
|
const response = await apolloClient().mutate({
|
|
46
45
|
mutation: DeleteUserSavedPostDocument,
|
|
47
46
|
variables,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.actions.js","sources":["../../../../src/components/session/session.actions.ts"],"sourcesContent":["import { createAction } from '@cobuildlab/react-simple-state';\nimport {\n createUserSavedPostErrorEvent,\n createUserSavedPostEvent,\n currentUserErrorEvent,\n currentUserEvent,\n deleteUserSavedPostErrorEvent,\n deleteUserSavedPostEvent,\n googleOneTapErrorEvent,\n googleOneTapEvent,\n} from './session.events';\nimport { URI } from '@/shared/constants';\nimport axios from 'axios';\nimport { apolloClient } from '@/shared/apollo/apollo.client';\nimport {\n CreateUserSavedPostDocument,\n CreateUserSavedPostMutation,\n CreateUserSavedPostMutationVariables,\n CurrentUserDocument,\n CurrentUserQuery,\n CurrentUserQueryVariables,\n DeleteUserSavedPostDocument,\n DeleteUserSavedPostMutation,\n DeleteUserSavedPostMutationVariables,\n} from '@/shared/types/generated';\n\nexport const googleOneTapAction = createAction(\n googleOneTapEvent,\n googleOneTapErrorEvent,\n async (idToken?: string) => {\n let token = undefined;\n if (!URI) {\n console.error('URI is missing');\n return { token };\n }\n\n const response = await axios.post<{ token: string }>(`${URI}/google/sign-up`, {\n idToken,\n url: window.location.href,\n });\n\n token = response.data.token;\n\n return {\n token,\n };\n },\n);\n\nexport const currentUserAction = createAction(currentUserEvent, currentUserErrorEvent, async () => {\n const response = await apolloClient().query<CurrentUserQuery, CurrentUserQueryVariables>({\n query: CurrentUserDocument,\n fetchPolicy: 'network-only',\n });\n\n return {\n currentUser: response.data?.currentUser,\n };\n});\n\nexport const easyWallCreateUserSavedPost = createAction(\n createUserSavedPostEvent,\n createUserSavedPostErrorEvent,\n async (variables: CreateUserSavedPostMutationVariables) => {\n const response = await apolloClient().mutate<\n CreateUserSavedPostMutation,\n CreateUserSavedPostMutationVariables\n >({\n mutation: CreateUserSavedPostDocument,\n variables,\n awaitRefetchQueries: true,\n refetchQueries: [{ query: CurrentUserDocument }],\n });\n\n return {\n createUserSavedPost: response.data?.createUserSavedPost,\n };\n },\n);\n\nexport const deleteUserSavedPostAction = createAction(\n deleteUserSavedPostEvent,\n deleteUserSavedPostErrorEvent,\n async (variables: DeleteUserSavedPostMutationVariables) => {\n const response = await apolloClient().mutate<\n DeleteUserSavedPostMutation,\n DeleteUserSavedPostMutationVariables\n >({\n mutation: DeleteUserSavedPostDocument,\n variables,\n awaitRefetchQueries: true,\n refetchQueries: [{ query: CurrentUserDocument }],\n });\n\n return {\n deleteUserSavedPost: response.data?.deleteUserSavedPost,\n };\n },\n);\n"],"names":[
|
|
1
|
+
{"version":3,"file":"session.actions.js","sources":["../../../../src/components/session/session.actions.ts"],"sourcesContent":["import { createAction } from '@cobuildlab/react-simple-state';\nimport {\n createUserSavedPostErrorEvent,\n createUserSavedPostEvent,\n currentUserErrorEvent,\n currentUserEvent,\n deleteUserSavedPostErrorEvent,\n deleteUserSavedPostEvent,\n googleOneTapErrorEvent,\n googleOneTapEvent,\n} from './session.events';\nimport { URI } from '@/shared/constants';\nimport axios from 'axios';\nimport { apolloClient } from '@/shared/apollo/apollo.client';\nimport {\n CreateUserSavedPostDocument,\n CreateUserSavedPostMutation,\n CreateUserSavedPostMutationVariables,\n CurrentUserDocument,\n CurrentUserQuery,\n CurrentUserQueryVariables,\n DeleteUserSavedPostDocument,\n DeleteUserSavedPostMutation,\n DeleteUserSavedPostMutationVariables,\n} from '@/shared/types/generated';\n\nexport const googleOneTapAction = createAction(\n googleOneTapEvent,\n googleOneTapErrorEvent,\n async (idToken?: string) => {\n let token = undefined;\n if (!URI) {\n console.error('URI is missing');\n return { token };\n }\n\n const response = await axios.post<{ token: string }>(`${URI}/google/sign-up`, {\n idToken,\n url: window.location.href,\n });\n\n token = response.data.token;\n\n return {\n token,\n };\n },\n);\n\nexport const currentUserAction = createAction(currentUserEvent, currentUserErrorEvent, async () => {\n const response = await apolloClient().query<CurrentUserQuery, CurrentUserQueryVariables>({\n query: CurrentUserDocument,\n fetchPolicy: 'network-only',\n });\n\n return {\n currentUser: response.data?.currentUser,\n };\n});\n\nexport const easyWallCreateUserSavedPost = createAction(\n createUserSavedPostEvent,\n createUserSavedPostErrorEvent,\n async (variables: CreateUserSavedPostMutationVariables) => {\n const response = await apolloClient().mutate<\n CreateUserSavedPostMutation,\n CreateUserSavedPostMutationVariables\n >({\n mutation: CreateUserSavedPostDocument,\n variables,\n awaitRefetchQueries: true,\n refetchQueries: [{ query: CurrentUserDocument }],\n });\n\n return {\n createUserSavedPost: response.data?.createUserSavedPost,\n };\n },\n);\n\nexport const deleteUserSavedPostAction = createAction(\n deleteUserSavedPostEvent,\n deleteUserSavedPostErrorEvent,\n async (variables: DeleteUserSavedPostMutationVariables) => {\n const response = await apolloClient().mutate<\n DeleteUserSavedPostMutation,\n DeleteUserSavedPostMutationVariables\n >({\n mutation: DeleteUserSavedPostDocument,\n variables,\n awaitRefetchQueries: true,\n refetchQueries: [{ query: CurrentUserDocument }],\n });\n\n return {\n deleteUserSavedPost: response.data?.deleteUserSavedPost,\n };\n },\n);\n"],"names":[],"mappings":";;;;;;;AA0BO,MAAM,kBAAkB,GAAG,YAAY,CAC5C,iBAAiB,EACjB,sBAAsB,EACtB,OAAO,OAAgB,KAAI;IACzB,IAAI,KAAK,GAAG,SAAS;IACrB,IAAI,CAAC,GAAG,EAAE;AACR,QAAA,OAAO,CAAC,KAAK,CAAC,gBAAgB,CAAC;QAC/B,OAAO,EAAE,KAAK,EAAE;IAClB;IAEA,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,IAAI,CAAoB,CAAA,EAAG,GAAG,CAAA,eAAA,CAAiB,EAAE;QAC5E,OAAO;AACP,QAAA,GAAG,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI;AAC1B,KAAA,CAAC;AAEF,IAAA,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,KAAK;IAE3B,OAAO;QACL,KAAK;KACN;AACH,CAAC;AAGI,MAAM,iBAAiB,GAAG,YAAY,CAAC,gBAAgB,EAAE,qBAAqB,EAAE,YAAW;AAChG,IAAA,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC,KAAK,CAA8C;AACvF,QAAA,KAAK,EAAE,mBAAmB;AAC1B,QAAA,WAAW,EAAE,cAAc;AAC5B,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,WAAW,EAAE,QAAQ,CAAC,IAAI,EAAE,WAAW;KACxC;AACH,CAAC;AAE0C,YAAY,CACrD,wBAAwB,EACxB,6BAA6B,EAC7B,OAAO,SAA+C,KAAI;AACxD,IAAA,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC,MAAM,CAG1C;AACA,QAAA,QAAQ,EAAE,2BAA2B;QACrC,SAAS;AACT,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC;AACjD,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,mBAAmB,EAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB;KACxD;AACH,CAAC;AAGsC,YAAY,CACnD,wBAAwB,EACxB,6BAA6B,EAC7B,OAAO,SAA+C,KAAI;AACxD,IAAA,MAAM,QAAQ,GAAG,MAAM,YAAY,EAAE,CAAC,MAAM,CAG1C;AACA,QAAA,QAAQ,EAAE,2BAA2B;QACrC,SAAS;AACT,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,cAAc,EAAE,CAAC,EAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC;AACjD,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,mBAAmB,EAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB;KACxD;AACH,CAAC;;;;"}
|
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { createEvent } from '@cobuildlab/react-simple-state';
|
|
2
2
|
import { universalCookies } from '../../shared/cookies/index.js';
|
|
3
3
|
import { COOKIE_NAME } from '../../shared/constants/index.js';
|
|
4
4
|
|
|
5
|
-
const tokenEvent =
|
|
5
|
+
const tokenEvent = createEvent({
|
|
6
6
|
initialValue: {
|
|
7
7
|
token: universalCookies.get(COOKIE_NAME) || '',
|
|
8
8
|
},
|
|
9
9
|
});
|
|
10
|
-
const googleOneTapEvent =
|
|
10
|
+
const googleOneTapEvent = createEvent({
|
|
11
11
|
initialValue: {
|
|
12
12
|
token: undefined,
|
|
13
13
|
},
|
|
14
14
|
});
|
|
15
|
-
const googleOneTapErrorEvent =
|
|
16
|
-
const currentUserEvent =
|
|
15
|
+
const googleOneTapErrorEvent = createEvent();
|
|
16
|
+
const currentUserEvent = createEvent({
|
|
17
17
|
initialValue: {
|
|
18
18
|
currentUser: undefined,
|
|
19
19
|
},
|
|
20
20
|
});
|
|
21
|
-
const currentUserErrorEvent =
|
|
22
|
-
const createUserSavedPostEvent =
|
|
21
|
+
const currentUserErrorEvent = createEvent();
|
|
22
|
+
const createUserSavedPostEvent = createEvent({
|
|
23
23
|
initialValue: {
|
|
24
24
|
createUserSavedPost: undefined,
|
|
25
25
|
},
|
|
26
26
|
});
|
|
27
|
-
const createUserSavedPostErrorEvent =
|
|
28
|
-
const deleteUserSavedPostEvent =
|
|
27
|
+
const createUserSavedPostErrorEvent = createEvent();
|
|
28
|
+
const deleteUserSavedPostEvent = createEvent({
|
|
29
29
|
initialValue: {
|
|
30
30
|
deleteUserSavedPost: undefined,
|
|
31
31
|
},
|
|
32
32
|
});
|
|
33
|
-
const deleteUserSavedPostErrorEvent =
|
|
33
|
+
const deleteUserSavedPostErrorEvent = createEvent();
|
|
34
34
|
|
|
35
35
|
export { createUserSavedPostErrorEvent, createUserSavedPostEvent, currentUserErrorEvent, currentUserEvent, deleteUserSavedPostErrorEvent, deleteUserSavedPostEvent, googleOneTapErrorEvent, googleOneTapEvent, tokenEvent };
|
|
36
36
|
//# sourceMappingURL=session.events.js.map
|