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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelListItems.cjs","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","Box","_Fragment","_jsx","Typography","PanelDivider","List","theme","PanelItem"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PanelListItems.cjs","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","Box","_Fragment","_jsx","Typography","PanelDivider","List","theme","PanelItem"],"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,eAAA,CAACC,YAAG,OAAK,cAAc,EAAA,QAAA,EAAA,CACpB,KAAK,IACJD,eAAA,CAAAE,mBAAA,EAAA,EAAA,QAAA,EAAA,CACEC,eAACC,mBAAU,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,EACbD,cAAA,CAACE,yBAAY,EAAA,EAAA,GAAK,YAAY,EAAA,CAAI,CAAA,EAAA,CACjC,IACD,IAAI,EAERF,eAACG,aAAI,EAAA,EAAC,cAAc,EAAA,IAAA,EAAC,EAAE,EAAE,EAAE,YAAY,EAAEC,WAAK,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAM,SAAS,EAAA,QAAA,EACvE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,MACvBJ,eAACK,mBAAS,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;;;;"}
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
4
|
var session_hooks = require('../session/session.hooks.cjs');
|
|
5
|
-
var
|
|
5
|
+
var material = require('@mui/material');
|
|
6
6
|
|
|
7
7
|
const PanelSubscriptionIcon = ({ children, subscriptionImageContainerProps = {}, }) => {
|
|
8
8
|
const { subscription } = session_hooks.useSession();
|
|
9
9
|
if (!subscription)
|
|
10
10
|
return null;
|
|
11
|
-
return (require$$2.jsx(Box
|
|
11
|
+
return (require$$2.jsx(material.Box, { sx: {
|
|
12
12
|
borderRadius: '50%',
|
|
13
13
|
position: 'absolute',
|
|
14
14
|
top: -7,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PanelSubscriptionIcon.cjs","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box, BoxProps } from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return (\n <Box\n sx={{\n borderRadius: '50%',\n position: 'absolute',\n top: -7,\n right: -7,\n }}\n {...subscriptionImageContainerProps}>\n {children}\n </Box>\n );\n};\n"],"names":["useSession","_jsx","Box"],"mappings":";;;;;;AAWO,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,QAAQ,EACR,+BAA+B,GAAG,EAAE,GACrC,KAAI;AACH,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGA,wBAAU,EAAE;AAErC,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,IAAI;AAE9B,IAAA,QACEC,cAAA,CAACC,
|
|
1
|
+
{"version":3,"file":"PanelSubscriptionIcon.cjs","sources":["../../../../src/components/panel/PanelSubscriptionIcon.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { useSession } from '../session/session.hooks';\nimport { Box, BoxProps } from '@mui/material';\n\nexport interface PanelSubscriptionIconProps {\n children?: React.ReactNode;\n subscriptionImageContainerProps?: BoxProps;\n}\n\nexport const PanelSubscriptionIcon: React.FC<PanelSubscriptionIconProps> = ({\n children,\n subscriptionImageContainerProps = {},\n}) => {\n const { subscription } = useSession();\n\n if (!subscription) return null;\n\n return (\n <Box\n sx={{\n borderRadius: '50%',\n position: 'absolute',\n top: -7,\n right: -7,\n }}\n {...subscriptionImageContainerProps}>\n {children}\n </Box>\n );\n};\n"],"names":["useSession","_jsx","Box"],"mappings":";;;;;;AAWO,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,QAAQ,EACR,+BAA+B,GAAG,EAAE,GACrC,KAAI;AACH,IAAA,MAAM,EAAE,YAAY,EAAE,GAAGA,wBAAU,EAAE;AAErC,IAAA,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,IAAI;AAE9B,IAAA,QACEC,cAAA,CAACC,YAAG,EAAA,EACF,EAAE,EAAE;AACF,YAAA,YAAY,EAAE,KAAK;AACnB,YAAA,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,EAAE;YACP,KAAK,EAAE,EAAE;AACV,SAAA,EAAA,GACG,+BAA+B,EAAA,QAAA,EAClC,QAAQ,EAAA,CACL;AAEV;;;;"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var reactSimpleState = require('@cobuildlab/react-simple-state');
|
|
4
4
|
var panel_store = require('./panel.store.cjs');
|
|
5
|
-
var index
|
|
5
|
+
var index = require('../../shared/cookies/index.cjs');
|
|
6
6
|
var cookies_utils = require('../../shared/cookies/cookies.utils.cjs');
|
|
7
7
|
|
|
8
|
-
const panelStoreAction =
|
|
8
|
+
const panelStoreAction = reactSimpleState.createStoreAction(panel_store.panelStore, (prev, data) => ({
|
|
9
9
|
...prev,
|
|
10
10
|
...data,
|
|
11
11
|
}));
|
|
@@ -14,7 +14,7 @@ const handlePanelClick = (isOpen) => {
|
|
|
14
14
|
};
|
|
15
15
|
const handleLogout = (config) => {
|
|
16
16
|
const options = cookies_utils.getCookieOptions(config);
|
|
17
|
-
index
|
|
17
|
+
index.universalCookies.remove(config?.cookieTokenName, options);
|
|
18
18
|
window.location.reload();
|
|
19
19
|
};
|
|
20
20
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panel.actions.cjs","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":["createStoreAction","panelStore","getCookieOptions","universalCookies"],"mappings":";;;;;;;AAOO,MAAM,gBAAgB,GAAGA,kCAAiB,CAACC,sBAAU,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,GAAGC,8BAAgB,CAAC,MAAM,CAAC;IACxCC,
|
|
1
|
+
{"version":3,"file":"panel.actions.cjs","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":["createStoreAction","panelStore","getCookieOptions","universalCookies"],"mappings":";;;;;;;AAOO,MAAM,gBAAgB,GAAGA,kCAAiB,CAACC,sBAAU,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,GAAGC,8BAAgB,CAAC,MAAM,CAAC;IACxCC,sBAAgB,CAAC,MAAM,CAAC,MAAM,EAAE,eAAyB,EAAE,OAAO,CAAC;AACnE,IAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;AAC1B;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var reactSimpleState = require('@cobuildlab/react-simple-state');
|
|
4
4
|
|
|
5
|
-
const panelStore =
|
|
5
|
+
const panelStore = reactSimpleState.createStore({
|
|
6
6
|
initialValue: {
|
|
7
7
|
isOpen: false,
|
|
8
8
|
},
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
|
+
var material = require('@mui/material');
|
|
4
5
|
var index = require('../../shared/constants/index.cjs');
|
|
5
|
-
var Box = require('../../node_modules/@mui/material/esm/Box/Box.cjs');
|
|
6
|
-
var Typography = require('../../node_modules/@mui/material/esm/Typography/Typography.cjs');
|
|
7
|
-
var Button = require('../../node_modules/@mui/material/esm/Button/Button.cjs');
|
|
8
6
|
|
|
9
7
|
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!', }) => {
|
|
10
8
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
@@ -27,7 +25,7 @@ const PaywallRegister = ({ containerProps = {}, subtitleProps = {}, buttonProps
|
|
|
27
25
|
}
|
|
28
26
|
return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);
|
|
29
27
|
};
|
|
30
|
-
return (require$$2.jsx(Box
|
|
28
|
+
return (require$$2.jsx(material.Box, { sx: {
|
|
31
29
|
display: 'flex',
|
|
32
30
|
width: '100%',
|
|
33
31
|
border: '1px solid #707070',
|
|
@@ -40,7 +38,7 @@ const PaywallRegister = ({ containerProps = {}, subtitleProps = {}, buttonProps
|
|
|
40
38
|
borderRadius: '20px',
|
|
41
39
|
boxShadow: '0px 0px 32px #00000029',
|
|
42
40
|
...sxContainerProps,
|
|
43
|
-
}, ...containerPropRest, children: require$$2.jsxs(Box
|
|
41
|
+
}, ...containerPropRest, children: require$$2.jsxs(material.Box, { sx: {
|
|
44
42
|
width: {
|
|
45
43
|
xs: 360,
|
|
46
44
|
md: 460,
|
|
@@ -49,14 +47,14 @@ const PaywallRegister = ({ containerProps = {}, subtitleProps = {}, buttonProps
|
|
|
49
47
|
alignItems: 'center',
|
|
50
48
|
flexDirection: 'column',
|
|
51
49
|
display: 'flex',
|
|
52
|
-
}, children: [require$$2.jsx(Typography
|
|
50
|
+
}, children: [require$$2.jsx(material.Typography, { sx: {
|
|
53
51
|
fontWeight: 700,
|
|
54
52
|
lineHeight: '34px',
|
|
55
53
|
fontSize: '34px',
|
|
56
54
|
textAlign: 'center',
|
|
57
55
|
marginBottom: '1.5rem',
|
|
58
56
|
...sxTitleProps,
|
|
59
|
-
}, ...titlePropRest, children: title }), require$$2.jsx(Typography
|
|
57
|
+
}, ...titlePropRest, children: title }), require$$2.jsx(material.Typography, { sx: { textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }, ...subtitlePropRest, children: subtitle }), require$$2.jsx(material.Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
60
58
|
background: '#f75957',
|
|
61
59
|
'&:hover': {
|
|
62
60
|
backgroundColor: '#f75957',
|
|
@@ -72,7 +70,7 @@ const PaywallRegister = ({ containerProps = {}, subtitleProps = {}, buttonProps
|
|
|
72
70
|
paddingRight: '.75rem',
|
|
73
71
|
borderRadius: '0.25rem',
|
|
74
72
|
...sxButtonProps,
|
|
75
|
-
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), require$$2.jsx(Button
|
|
73
|
+
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), require$$2.jsx(material.Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
76
74
|
textDecoration: 'underline',
|
|
77
75
|
background: 'transparent',
|
|
78
76
|
textTransform: 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallRegister.cjs","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":["URL_PORTAL","_jsx","Box","_jsxs","Typography","Button"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaywallRegister.cjs","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":["URL_PORTAL","_jsx","Box","_js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,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,10 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
|
+
var material = require('@mui/material');
|
|
4
5
|
var index = require('../../shared/constants/index.cjs');
|
|
5
|
-
var Box = require('../../node_modules/@mui/material/esm/Box/Box.cjs');
|
|
6
|
-
var Typography = require('../../node_modules/@mui/material/esm/Typography/Typography.cjs');
|
|
7
|
-
var Button = require('../../node_modules/@mui/material/esm/Button/Button.cjs');
|
|
8
6
|
|
|
9
7
|
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', }) => {
|
|
10
8
|
const { sx: sxContainerProps, ...containerPropRest } = containerProps;
|
|
@@ -27,7 +25,7 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
27
25
|
}
|
|
28
26
|
return (window.location.href = `${url}/autenticacion?action=AUTH_LOGIN?post_url=${window.location.href}`);
|
|
29
27
|
};
|
|
30
|
-
return (require$$2.jsx(Box
|
|
28
|
+
return (require$$2.jsx(material.Box, { sx: {
|
|
31
29
|
display: 'flex',
|
|
32
30
|
width: '100%',
|
|
33
31
|
border: '1px solid #707070',
|
|
@@ -40,7 +38,7 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
40
38
|
borderRadius: '20px',
|
|
41
39
|
boxShadow: '0px 0px 32px #00000029',
|
|
42
40
|
...sxContainerProps,
|
|
43
|
-
}, ...containerPropRest, children: require$$2.jsxs(Box
|
|
41
|
+
}, ...containerPropRest, children: require$$2.jsxs(material.Box, { sx: {
|
|
44
42
|
width: {
|
|
45
43
|
xs: 360,
|
|
46
44
|
md: 460,
|
|
@@ -49,14 +47,14 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
49
47
|
alignItems: 'center',
|
|
50
48
|
flexDirection: 'column',
|
|
51
49
|
display: 'flex',
|
|
52
|
-
}, children: [require$$2.jsx(Typography
|
|
50
|
+
}, children: [require$$2.jsx(material.Typography, { sx: {
|
|
53
51
|
fontWeight: 700,
|
|
54
52
|
lineHeight: '34px',
|
|
55
53
|
fontSize: '34px',
|
|
56
54
|
textAlign: 'center',
|
|
57
55
|
marginBottom: '1.5rem',
|
|
58
56
|
...sxTitleProps,
|
|
59
|
-
}, ...titlePropRest, children: title }), require$$2.jsx(Typography
|
|
57
|
+
}, ...titlePropRest, children: title }), require$$2.jsx(material.Typography, { sx: { textAlign: 'center', marginBottom: '1.5rem', ...sxSubtitleProps }, ...subtitlePropRest, children: subtitle }), require$$2.jsx(material.Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
60
58
|
background: '#f75957',
|
|
61
59
|
'&:hover': {
|
|
62
60
|
backgroundColor: '#f75957',
|
|
@@ -72,7 +70,7 @@ const PaywallSubscription = ({ containerProps = {}, subtitleProps = {}, buttonPr
|
|
|
72
70
|
paddingRight: '.75rem',
|
|
73
71
|
borderRadius: '0.25rem',
|
|
74
72
|
...sxButtonProps,
|
|
75
|
-
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), require$$2.jsx(Button
|
|
73
|
+
}, onClick: () => handleButton(), ...buttonPropsRest, children: buttonText }), require$$2.jsx(material.Button, { disableElevation: true, disableRipple: true, disableTouchRipple: true, disableFocusRipple: true, sx: {
|
|
76
74
|
textDecoration: 'underline',
|
|
77
75
|
background: 'transparent',
|
|
78
76
|
textTransform: 'none',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PaywallSubscription.cjs","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":["URL_PORTAL","_jsx","Box","_jsxs","Typography","Button"],"mappings":"
|
|
1
|
+
{"version":3,"file":"PaywallSubscription.cjs","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":["URL_PORTAL","_jsx","Box","_jsxs","Typography","Button"],"mappings":";;;;;;MAmBa,mBAAmB,GAAuC,CAAC,EACtE,cAAc,GAAG,EAAE,EACnB,aAAa,GAAG,EAAE,EAClB,WAAW,GAAG,EAAE,EAChB,UA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B,mBAAmB,EAAA,CACb,CAAA,EAAA,CACL,EAAA,CACF;AAEV;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
|
-
var
|
|
4
|
+
var google = require('@react-oauth/google');
|
|
5
5
|
var React = require('react');
|
|
6
6
|
var SessionUserClientProvider = require('./SessionUserClientProvider.cjs');
|
|
7
7
|
var session_stores = require('./session.stores.cjs');
|
|
@@ -10,7 +10,7 @@ const SessionClientProvider = ({ children, config, }) => {
|
|
|
10
10
|
React.useEffect(() => {
|
|
11
11
|
session_stores.sessionConfigStore.dispatch(config);
|
|
12
12
|
}, [config]);
|
|
13
|
-
return (require$$2.jsx(
|
|
13
|
+
return (require$$2.jsx(google.GoogleOAuthProvider, { clientId: config.googleClient, children: require$$2.jsx(SessionUserClientProvider.SessionUserClientProvider, { config: config, children: children }) }));
|
|
14
14
|
};
|
|
15
15
|
|
|
16
16
|
exports.SessionClientProvider = SessionClientProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionClientProvider.cjs","sources":["../../../../src/components/session/SessionClientProvider.tsx"],"sourcesContent":["import { GoogleOAuthProvider } from '@react-oauth/google';\nimport React, { ReactNode, useEffect } from 'react';\nimport { GOOGLE_AUTH_CLIENT } from '../../shared/constants';\nimport { SessionUserClientProvider } from './SessionUserClientProvider';\nimport { Config } from '@/config/config.types';\nimport { sessionConfigStore } from '@/components/session/session.stores';\n\ntype SessionClientProviderProps = {\n children: ReactNode;\n config: Config;\n};\n\nexport const SessionClientProvider: React.FC<SessionClientProviderProps> = ({\n children,\n config,\n}) => {\n useEffect(() => {\n sessionConfigStore.dispatch(config);\n }, [config]);\n\n return (\n <GoogleOAuthProvider clientId={config.googleClient}>\n <SessionUserClientProvider config={config}>{children}</SessionUserClientProvider>\n </GoogleOAuthProvider>\n );\n};\n"],"names":["useEffect","sessionConfigStore","_jsx","GoogleOAuthProvider","SessionUserClientProvider"],"mappings":";;;;;;;;AAYO,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,QAAQ,EACR,MAAM,GACP,KAAI;IACHA,eAAS,CAAC,MAAK;AACb,QAAAC,iCAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC;AACrC,IAAA,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAEZ,QACEC,eAACC,
|
|
1
|
+
{"version":3,"file":"SessionClientProvider.cjs","sources":["../../../../src/components/session/SessionClientProvider.tsx"],"sourcesContent":["import { GoogleOAuthProvider } from '@react-oauth/google';\nimport React, { ReactNode, useEffect } from 'react';\nimport { GOOGLE_AUTH_CLIENT } from '../../shared/constants';\nimport { SessionUserClientProvider } from './SessionUserClientProvider';\nimport { Config } from '@/config/config.types';\nimport { sessionConfigStore } from '@/components/session/session.stores';\n\ntype SessionClientProviderProps = {\n children: ReactNode;\n config: Config;\n};\n\nexport const SessionClientProvider: React.FC<SessionClientProviderProps> = ({\n children,\n config,\n}) => {\n useEffect(() => {\n sessionConfigStore.dispatch(config);\n }, [config]);\n\n return (\n <GoogleOAuthProvider clientId={config.googleClient}>\n <SessionUserClientProvider config={config}>{children}</SessionUserClientProvider>\n </GoogleOAuthProvider>\n );\n};\n"],"names":["useEffect","sessionConfigStore","_jsx","GoogleOAuthProvider","SessionUserClientProvider"],"mappings":";;;;;;;;AAYO,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,QAAQ,EACR,MAAM,GACP,KAAI;IACHA,eAAS,CAAC,MAAK;AACb,QAAAC,iCAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC;AACrC,IAAA,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;IAEZ,QACEC,eAACC,0BAAmB,EAAA,EAAC,QAAQ,EAAE,MAAM,CAAC,YAAY,EAAA,QAAA,EAChDD,eAACE,mDAAyB,EAAA,EAAC,MAAM,EAAE,MAAM,YAAG,QAAQ,EAAA,CAA6B,EAAA,CAC7D;AAE1B;;;;"}
|
|
@@ -3,29 +3,29 @@
|
|
|
3
3
|
var require$$2 = require('react/jsx-runtime');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
var SessionUserContext = require('./SessionUserContext.cjs');
|
|
6
|
-
var
|
|
6
|
+
var google = require('@react-oauth/google');
|
|
7
7
|
var theme = require('../../shared/mui/theme.cjs');
|
|
8
8
|
var session_utils = require('./session.utils.cjs');
|
|
9
9
|
var session_constants = require('./session.constants.cjs');
|
|
10
|
-
var
|
|
10
|
+
var reactSimpleState = require('@cobuildlab/react-simple-state');
|
|
11
11
|
var session_actions = require('./session.actions.cjs');
|
|
12
|
-
var index
|
|
13
|
-
var index$
|
|
12
|
+
var index = require('../../shared/cookies/index.cjs');
|
|
13
|
+
var index$1 = require('../../shared/constants/index.cjs');
|
|
14
14
|
var session_events = require('./session.events.cjs');
|
|
15
15
|
var ThemeProvider = require('../../node_modules/@mui/material/esm/styles/ThemeProvider.cjs');
|
|
16
16
|
var CssBaseline = require('../../node_modules/@mui/material/esm/CssBaseline/CssBaseline.cjs');
|
|
17
17
|
|
|
18
18
|
const SessionUserClientProvider = ({ children, config, }) => {
|
|
19
19
|
const [user, setUser] = React.useState(null);
|
|
20
|
-
const { token } =
|
|
20
|
+
const { token } = reactSimpleState.useEvent(session_events.tokenEvent);
|
|
21
21
|
const [savedPosts, setSavedPosts] = React.useState([]);
|
|
22
|
-
const [callGoogleOneTap] =
|
|
22
|
+
const [callGoogleOneTap] = reactSimpleState.useCallAction(session_actions.googleOneTapAction, {
|
|
23
23
|
onCompleted: (data) => {
|
|
24
|
-
index
|
|
24
|
+
index.universalCookies.set(index$1.COOKIE_NAME, data.token, session_constants.COOKIES_OPTIONS);
|
|
25
25
|
window.location.reload();
|
|
26
26
|
},
|
|
27
27
|
});
|
|
28
|
-
|
|
28
|
+
google.useGoogleOneTapLogin({
|
|
29
29
|
onSuccess: (credentialResponse) => {
|
|
30
30
|
callGoogleOneTap(credentialResponse.credential);
|
|
31
31
|
},
|
|
@@ -39,14 +39,14 @@ const SessionUserClientProvider = ({ children, config, }) => {
|
|
|
39
39
|
// }
|
|
40
40
|
},
|
|
41
41
|
});
|
|
42
|
-
const [callCurrentUserAction, loading] =
|
|
42
|
+
const [callCurrentUserAction, loading] = reactSimpleState.useCallAction(session_actions.currentUserAction, {
|
|
43
43
|
onCompleted: (data) => {
|
|
44
44
|
setUser(data.currentUser);
|
|
45
45
|
setSavedPosts(data.currentUser?.post_saved);
|
|
46
46
|
console.log({ data });
|
|
47
47
|
},
|
|
48
48
|
onError: (error) => {
|
|
49
|
-
index
|
|
49
|
+
index.universalCookies.remove(index$1.COOKIE_NAME, session_constants.COOKIES_OPTIONS);
|
|
50
50
|
console.log({ message: error.message });
|
|
51
51
|
},
|
|
52
52
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SessionUserClientProvider.cjs","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":["useState","useEvent","tokenEvent","useCallAction","googleOneTapAction","universalCookies","COOKIE_NAME","COOKIES_OPTIONS","useGoogleOneTapLogin","currentUserAction","useEffect","getSubscriptionActive","_jsx","Provider","_jsxs","ThemeProvider","theme","CssBaseline"],"mappings":";;;;;;;;;;;;;;;;;AAuBO,MAAM,yBAAyB,GAA6C,CAAC,EAClF,QAAQ,EACR,MAAM,GACP,KAAI;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAGA,cAAQ,CAA0B,IAAI,CAAC;IAC/D,MAAM,EAAE,KAAK,EAAE,GAAGC,yBAAQ,CAACC,yBAAU,CAAC;IACtC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAGF,cAAQ,CAAkB,EAAE,CAAC;AAEjE,IAAA,MAAM,CAAC,gBAAgB,CAAC,GAAGG,8BAAa,CAACC,kCAAkB,EAAE;AAC3D,QAAA,WAAW,EAAE,CAAC,IAAI,KAAI;YACpBC,
|
|
1
|
+
{"version":3,"file":"SessionUserClientProvider.cjs","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":["useState","useEvent","tokenEvent","useCallAction","googleOneTapAction","universalCookies","COOKIE_NAME","COOKIES_OPTIONS","useGoogleOneTapLogin","currentUserAction","useEffect","getSubscriptionActive","_jsx","Provider","_jsxs","ThemeProvider","theme","CssBaseline"],"mappings":";;;;;;;;;;;;;;;;;AAuBO,MAAM,yBAAyB,GAA6C,CAAC,EAClF,QAAQ,EACR,MAAM,GACP,KAAI;IACH,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAGA,cAAQ,CAA0B,IAAI,CAAC;IAC/D,MAAM,EAAE,KAAK,EAAE,GAAGC,yBAAQ,CAACC,yBAAU,CAAC;IACtC,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAGF,cAAQ,CAAkB,EAAE,CAAC;AAEjE,IAAA,MAAM,CAAC,gBAAgB,CAAC,GAAGG,8BAAa,CAACC,kCAAkB,EAAE;AAC3D,QAAA,WAAW,EAAE,CAAC,IAAI,KAAI;YACpBC,sBAAgB,CAAC,GAAG,CAACC,mBAAW,EAAE,IAAI,CAAC,KAAK,EAAEC,iCAAe,CAAC;AAC9D,YAAA,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE;QAC1B,CAAC;AACF,KAAA,CAAC;AAEF,IAAAC,2BAAoB,CAAC;AACnB,QAAA,SAAS,EAAE,CAA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EAAA,EAAC,KAAK,EAAEC,WAAK,EAAA,QAAA,EAAA,CACzBJ,cAAA,CAACK,mBAAW,EAAA,EAAA,CAAG,EACd,QAAQ,CAAA,EAAA,CACK,EAAA,CACP;AAEf;;;;"}
|
|
@@ -1,20 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var reactSimpleState = require('@cobuildlab/react-simple-state');
|
|
4
4
|
var session_events = require('./session.events.cjs');
|
|
5
|
-
var index
|
|
6
|
-
require('
|
|
5
|
+
var index = require('../../shared/constants/index.cjs');
|
|
6
|
+
var axios = require('axios');
|
|
7
7
|
var apollo_client = require('../../shared/apollo/apollo.client.cjs');
|
|
8
8
|
var generated = require('../../shared/types/generated.cjs');
|
|
9
|
-
var axios = require('../../node_modules/axios/lib/axios.cjs');
|
|
10
9
|
|
|
11
|
-
const googleOneTapAction =
|
|
10
|
+
const googleOneTapAction = reactSimpleState.createAction(session_events.googleOneTapEvent, session_events.googleOneTapErrorEvent, async (idToken) => {
|
|
12
11
|
let token = undefined;
|
|
13
|
-
if (!index
|
|
12
|
+
if (!index.URI) {
|
|
14
13
|
console.error('URI is missing');
|
|
15
14
|
return { token };
|
|
16
15
|
}
|
|
17
|
-
const response = await axios.
|
|
16
|
+
const response = await axios.post(`${index.URI}/google/sign-up`, {
|
|
18
17
|
idToken,
|
|
19
18
|
url: window.location.href,
|
|
20
19
|
});
|
|
@@ -23,7 +22,7 @@ const googleOneTapAction = index.libExports.createAction(session_events.googleOn
|
|
|
23
22
|
token,
|
|
24
23
|
};
|
|
25
24
|
});
|
|
26
|
-
const currentUserAction =
|
|
25
|
+
const currentUserAction = reactSimpleState.createAction(session_events.currentUserEvent, session_events.currentUserErrorEvent, async () => {
|
|
27
26
|
const response = await apollo_client.apolloClient().query({
|
|
28
27
|
query: generated.CurrentUserDocument,
|
|
29
28
|
fetchPolicy: 'network-only',
|
|
@@ -32,7 +31,7 @@ const currentUserAction = index.libExports.createAction(session_events.currentUs
|
|
|
32
31
|
currentUser: response.data?.currentUser,
|
|
33
32
|
};
|
|
34
33
|
});
|
|
35
|
-
|
|
34
|
+
reactSimpleState.createAction(session_events.createUserSavedPostEvent, session_events.createUserSavedPostErrorEvent, async (variables) => {
|
|
36
35
|
const response = await apollo_client.apolloClient().mutate({
|
|
37
36
|
mutation: generated.CreateUserSavedPostDocument,
|
|
38
37
|
variables,
|
|
@@ -43,7 +42,7 @@ index.libExports.createAction(session_events.createUserSavedPostEvent, session_e
|
|
|
43
42
|
createUserSavedPost: response.data?.createUserSavedPost,
|
|
44
43
|
};
|
|
45
44
|
});
|
|
46
|
-
|
|
45
|
+
reactSimpleState.createAction(session_events.deleteUserSavedPostEvent, session_events.deleteUserSavedPostErrorEvent, async (variables) => {
|
|
47
46
|
const response = await apollo_client.apolloClient().mutate({
|
|
48
47
|
mutation: generated.DeleteUserSavedPostDocument,
|
|
49
48
|
variables,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.actions.cjs","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":["createAction","googleOneTapEvent","googleOneTapErrorEvent","URI","
|
|
1
|
+
{"version":3,"file":"session.actions.cjs","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":["createAction","googleOneTapEvent","googleOneTapErrorEvent","URI","currentUserEvent","currentUserErrorEvent","apolloClient","CurrentUserDocument","createUserSavedPostEvent","createUserSavedPostErrorEvent","CreateUserSavedPostDocument","deleteUserSavedPostEvent","deleteUserSavedPostErrorEvent","DeleteUserSavedPostDocument"],"mappings":";;;;;;;;;AA0BO,MAAM,kBAAkB,GAAGA,6BAAY,CAC5CC,gCAAiB,EACjBC,qCAAsB,EACtB,OAAO,OAAgB,KAAI;IACzB,IAAI,KAAK,GAAG,SAAS;IACrB,IAAI,CAACC,SAAG,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,EAAGA,SAAG,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,GAAGH,6BAAY,CAACI,+BAAgB,EAAEC,oCAAqB,EAAE,YAAW;AAChG,IAAA,MAAM,QAAQ,GAAG,MAAMC,0BAAY,EAAE,CAAC,KAAK,CAA8C;AACvF,QAAA,KAAK,EAAEC,6BAAmB;AAC1B,QAAA,WAAW,EAAE,cAAc;AAC5B,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,WAAW,EAAE,QAAQ,CAAC,IAAI,EAAE,WAAW;KACxC;AACH,CAAC;AAE0CP,6BAAY,CACrDQ,uCAAwB,EACxBC,4CAA6B,EAC7B,OAAO,SAA+C,KAAI;AACxD,IAAA,MAAM,QAAQ,GAAG,MAAMH,0BAAY,EAAE,CAAC,MAAM,CAG1C;AACA,QAAA,QAAQ,EAAEI,qCAA2B;QACrC,SAAS;AACT,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,cAAc,EAAE,CAAC,EAAE,KAAK,EAAEH,6BAAmB,EAAE,CAAC;AACjD,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,mBAAmB,EAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB;KACxD;AACH,CAAC;AAGsCP,6BAAY,CACnDW,uCAAwB,EACxBC,4CAA6B,EAC7B,OAAO,SAA+C,KAAI;AACxD,IAAA,MAAM,QAAQ,GAAG,MAAMN,0BAAY,EAAE,CAAC,MAAM,CAG1C;AACA,QAAA,QAAQ,EAAEO,qCAA2B;QACrC,SAAS;AACT,QAAA,mBAAmB,EAAE,IAAI;AACzB,QAAA,cAAc,EAAE,CAAC,EAAE,KAAK,EAAEN,6BAAmB,EAAE,CAAC;AACjD,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,mBAAmB,EAAE,QAAQ,CAAC,IAAI,EAAE,mBAAmB;KACxD;AACH,CAAC;;;;;"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var moment = require('
|
|
3
|
+
var moment = require('moment');
|
|
4
4
|
var index = require('../../shared/constants/index.cjs');
|
|
5
5
|
|
|
6
6
|
const DEFAULT_USER_CONTEXT = {
|
|
7
7
|
user: undefined,
|
|
8
8
|
};
|
|
9
9
|
const COOKIES_OPTIONS = {
|
|
10
|
-
expires: moment
|
|
10
|
+
expires: moment().add(1, 'year').toDate(),
|
|
11
11
|
path: '/',
|
|
12
12
|
domain: index.COOKIE_DOMAIN,
|
|
13
13
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.constants.cjs","sources":["../../../../src/components/session/session.constants.ts"],"sourcesContent":["import moment from 'moment';\nimport { COOKIE_DOMAIN } from '@/shared/constants';\n\nexport const DEFAULT_USER_CONTEXT = {\n user: undefined,\n};\n\nexport const COOKIES_OPTIONS = {\n expires: moment().add(1, 'year').toDate(),\n path: '/',\n domain: COOKIE_DOMAIN,\n};\n"],"names":["
|
|
1
|
+
{"version":3,"file":"session.constants.cjs","sources":["../../../../src/components/session/session.constants.ts"],"sourcesContent":["import moment from 'moment';\nimport { COOKIE_DOMAIN } from '@/shared/constants';\n\nexport const DEFAULT_USER_CONTEXT = {\n user: undefined,\n};\n\nexport const COOKIES_OPTIONS = {\n expires: moment().add(1, 'year').toDate(),\n path: '/',\n domain: COOKIE_DOMAIN,\n};\n"],"names":["COOKIE_DOMAIN"],"mappings":";;;;;AAGO,MAAM,oBAAoB,GAAG;AAClC,IAAA,IAAI,EAAE,SAAS;;AAGV,MAAM,eAAe,GAAG;AAC7B,IAAA,OAAO,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,MAAM,EAAE;AACzC,IAAA,IAAI,EAAE,GAAG;AACT,IAAA,MAAM,EAAEA,mBAAa;;;;;;"}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var index
|
|
5
|
-
var index$
|
|
3
|
+
var reactSimpleState = require('@cobuildlab/react-simple-state');
|
|
4
|
+
var index = require('../../shared/cookies/index.cjs');
|
|
5
|
+
var index$1 = require('../../shared/constants/index.cjs');
|
|
6
6
|
|
|
7
|
-
const tokenEvent =
|
|
7
|
+
const tokenEvent = reactSimpleState.createEvent({
|
|
8
8
|
initialValue: {
|
|
9
|
-
token: index
|
|
9
|
+
token: index.universalCookies.get(index$1.COOKIE_NAME) || '',
|
|
10
10
|
},
|
|
11
11
|
});
|
|
12
|
-
const googleOneTapEvent =
|
|
12
|
+
const googleOneTapEvent = reactSimpleState.createEvent({
|
|
13
13
|
initialValue: {
|
|
14
14
|
token: undefined,
|
|
15
15
|
},
|
|
16
16
|
});
|
|
17
|
-
const googleOneTapErrorEvent =
|
|
18
|
-
const currentUserEvent =
|
|
17
|
+
const googleOneTapErrorEvent = reactSimpleState.createEvent();
|
|
18
|
+
const currentUserEvent = reactSimpleState.createEvent({
|
|
19
19
|
initialValue: {
|
|
20
20
|
currentUser: undefined,
|
|
21
21
|
},
|
|
22
22
|
});
|
|
23
|
-
const currentUserErrorEvent =
|
|
24
|
-
const createUserSavedPostEvent =
|
|
23
|
+
const currentUserErrorEvent = reactSimpleState.createEvent();
|
|
24
|
+
const createUserSavedPostEvent = reactSimpleState.createEvent({
|
|
25
25
|
initialValue: {
|
|
26
26
|
createUserSavedPost: undefined,
|
|
27
27
|
},
|
|
28
28
|
});
|
|
29
|
-
const createUserSavedPostErrorEvent =
|
|
30
|
-
const deleteUserSavedPostEvent =
|
|
29
|
+
const createUserSavedPostErrorEvent = reactSimpleState.createEvent();
|
|
30
|
+
const deleteUserSavedPostEvent = reactSimpleState.createEvent({
|
|
31
31
|
initialValue: {
|
|
32
32
|
deleteUserSavedPost: undefined,
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
-
const deleteUserSavedPostErrorEvent =
|
|
35
|
+
const deleteUserSavedPostErrorEvent = reactSimpleState.createEvent();
|
|
36
36
|
|
|
37
37
|
exports.createUserSavedPostErrorEvent = createUserSavedPostErrorEvent;
|
|
38
38
|
exports.createUserSavedPostEvent = createUserSavedPostEvent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.events.cjs","sources":["../../../../src/components/session/session.events.ts"],"sourcesContent":["import { createEvent } from '@cobuildlab/react-simple-state';\nimport { User, UserSavedPost } from '../../shared/types/generated';\nimport { Token } from './session.types';\nimport { universalCookies } from '../../shared/cookies';\nimport { COOKIE_NAME } from '../../shared/constants';\n\nexport const tokenEvent = createEvent<Token>({\n initialValue: {\n token: universalCookies.get(COOKIE_NAME) || '',\n },\n});\n\nexport const googleOneTapEvent = createEvent<{\n token: string | undefined;\n}>({\n initialValue: {\n token: undefined,\n },\n});\n\nexport const googleOneTapErrorEvent = createEvent();\n\nexport const currentUserEvent = createEvent<{\n currentUser: User | undefined | null;\n}>({\n initialValue: {\n currentUser: undefined,\n },\n});\nexport const currentUserErrorEvent = createEvent<Error>();\n\nexport const createUserSavedPostEvent = createEvent<{\n createUserSavedPost: undefined | null | UserSavedPost;\n}>({\n initialValue: {\n createUserSavedPost: undefined,\n },\n});\nexport const createUserSavedPostErrorEvent = createEvent<Error>();\n\nexport const deleteUserSavedPostEvent = createEvent<{\n deleteUserSavedPost: undefined | null | UserSavedPost;\n}>({\n initialValue: {\n deleteUserSavedPost: undefined,\n },\n});\nexport const deleteUserSavedPostErrorEvent = createEvent<Error>();\n"],"names":["createEvent","universalCookies","COOKIE_NAME"],"mappings":";;;;;;AAMO,MAAM,UAAU,GAAGA,4BAAW,CAAQ;AAC3C,IAAA,YAAY,EAAE;QACZ,KAAK,EAAEC,
|
|
1
|
+
{"version":3,"file":"session.events.cjs","sources":["../../../../src/components/session/session.events.ts"],"sourcesContent":["import { createEvent } from '@cobuildlab/react-simple-state';\nimport { User, UserSavedPost } from '../../shared/types/generated';\nimport { Token } from './session.types';\nimport { universalCookies } from '../../shared/cookies';\nimport { COOKIE_NAME } from '../../shared/constants';\n\nexport const tokenEvent = createEvent<Token>({\n initialValue: {\n token: universalCookies.get(COOKIE_NAME) || '',\n },\n});\n\nexport const googleOneTapEvent = createEvent<{\n token: string | undefined;\n}>({\n initialValue: {\n token: undefined,\n },\n});\n\nexport const googleOneTapErrorEvent = createEvent();\n\nexport const currentUserEvent = createEvent<{\n currentUser: User | undefined | null;\n}>({\n initialValue: {\n currentUser: undefined,\n },\n});\nexport const currentUserErrorEvent = createEvent<Error>();\n\nexport const createUserSavedPostEvent = createEvent<{\n createUserSavedPost: undefined | null | UserSavedPost;\n}>({\n initialValue: {\n createUserSavedPost: undefined,\n },\n});\nexport const createUserSavedPostErrorEvent = createEvent<Error>();\n\nexport const deleteUserSavedPostEvent = createEvent<{\n deleteUserSavedPost: undefined | null | UserSavedPost;\n}>({\n initialValue: {\n deleteUserSavedPost: undefined,\n },\n});\nexport const deleteUserSavedPostErrorEvent = createEvent<Error>();\n"],"names":["createEvent","universalCookies","COOKIE_NAME"],"mappings":";;;;;;AAMO,MAAM,UAAU,GAAGA,4BAAW,CAAQ;AAC3C,IAAA,YAAY,EAAE;QACZ,KAAK,EAAEC,sBAAgB,CAAC,GAAG,CAACC,mBAAW,CAAC,IAAI,EAAE;AAC/C,KAAA;AACF,CAAA;AAEM,MAAM,iBAAiB,GAAGF,4BAAW,CAEzC;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,KAAK,EAAE,SAAS;AACjB,KAAA;AACF,CAAA;AAEM,MAAM,sBAAsB,GAAGA,4BAAW;AAE1C,MAAM,gBAAgB,GAAGA,4BAAW,CAExC;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,WAAW,EAAE,SAAS;AACvB,KAAA;AACF,CAAA;AACM,MAAM,qBAAqB,GAAGA,4BAAW;AAEzC,MAAM,wBAAwB,GAAGA,4BAAW,CAEhD;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,mBAAmB,EAAE,SAAS;AAC/B,KAAA;AACF,CAAA;AACM,MAAM,6BAA6B,GAAGA,4BAAW;AAEjD,MAAM,wBAAwB,GAAGA,4BAAW,CAEhD;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,mBAAmB,EAAE,SAAS;AAC/B,KAAA;AACF,CAAA;AACM,MAAM,6BAA6B,GAAGA,4BAAW;;;;;;;;;;;;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var reactSimpleState = require('@cobuildlab/react-simple-state');
|
|
4
4
|
|
|
5
|
-
const sessionConfigStore =
|
|
5
|
+
const sessionConfigStore = reactSimpleState.createStore({
|
|
6
6
|
initialValue: undefined,
|
|
7
7
|
});
|
|
8
8
|
|