react-easy-wall 2.0.12 → 2.0.14

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.
Files changed (147) hide show
  1. package/dist/cjs/_virtual/index.cjs +3 -3
  2. package/dist/cjs/_virtual/index2.cjs +2 -2
  3. package/dist/cjs/_virtual/index3.cjs +2 -8
  4. package/dist/cjs/_virtual/index3.cjs.map +1 -1
  5. package/dist/cjs/_virtual/index4.cjs +2 -2
  6. package/dist/cjs/_virtual/index5.cjs +2 -4
  7. package/dist/cjs/_virtual/index5.cjs.map +1 -1
  8. package/dist/cjs/_virtual/index6.cjs +2 -2
  9. package/dist/cjs/components/comment/CommentProvider.cjs +3 -3
  10. package/dist/cjs/components/comment/Comments.cjs +4 -4
  11. package/dist/cjs/components/comment/Comments.cjs.map +1 -1
  12. package/dist/cjs/components/comment/comment.actions.cjs +8 -8
  13. package/dist/cjs/components/comment/comment.events.cjs +7 -7
  14. package/dist/cjs/components/comment/comment.store.cjs +5 -5
  15. package/dist/cjs/components/comment/comment.utils.cjs +2 -1
  16. package/dist/cjs/components/comment/comment.utils.cjs.map +1 -1
  17. package/dist/cjs/components/comment/components/AddComment.cjs +4 -5
  18. package/dist/cjs/components/comment/components/AddComment.cjs.map +1 -1
  19. package/dist/cjs/components/comment/components/AddCommentContainer.cjs +2 -2
  20. package/dist/cjs/components/comment/components/AddCommentContainer.cjs.map +1 -1
  21. package/dist/cjs/components/comment/components/AddReplyComment.cjs +7 -7
  22. package/dist/cjs/components/comment/components/AddReplyComment.cjs.map +1 -1
  23. package/dist/cjs/components/comment/components/AddReplyCommentContainer.cjs +2 -2
  24. package/dist/cjs/components/comment/components/AddReplyCommentContainer.cjs.map +1 -1
  25. package/dist/cjs/components/comment/components/CommentContainer.cjs +2 -2
  26. package/dist/cjs/components/comment/components/CommentItem.cjs +2 -2
  27. package/dist/cjs/components/comment/components/CommentItem.cjs.map +1 -1
  28. package/dist/cjs/components/comment/components/CommentSubscriptionDialog.cjs +4 -4
  29. package/dist/cjs/components/comment/components/CommentSubscriptionDialog.cjs.map +1 -1
  30. package/dist/cjs/components/comment/components/ShowMoreComments.cjs +4 -4
  31. package/dist/cjs/components/comment/components/ShowMoreComments.cjs.map +1 -1
  32. package/dist/cjs/components/panel/Panel.cjs +2 -2
  33. package/dist/cjs/components/panel/PanelButton.cjs +4 -4
  34. package/dist/cjs/components/panel/PanelButton.cjs.map +1 -1
  35. package/dist/cjs/components/panel/panel.actions.cjs +4 -4
  36. package/dist/cjs/components/panel/panel.actions.cjs.map +1 -1
  37. package/dist/cjs/components/panel/panel.store.cjs +2 -2
  38. package/dist/cjs/components/session/SessionClientProvider.cjs +2 -2
  39. package/dist/cjs/components/session/SessionClientProvider.cjs.map +1 -1
  40. package/dist/cjs/components/session/SessionUserClientProvider.cjs +10 -10
  41. package/dist/cjs/components/session/SessionUserClientProvider.cjs.map +1 -1
  42. package/dist/cjs/components/session/session.actions.cjs +8 -8
  43. package/dist/cjs/components/session/session.actions.cjs.map +1 -1
  44. package/dist/cjs/components/session/session.events.cjs +13 -13
  45. package/dist/cjs/components/session/session.events.cjs.map +1 -1
  46. package/dist/cjs/components/session/session.stores.cjs +2 -2
  47. package/dist/cjs/node_modules/@apollo/client/utilities/internal/checkDocument.cjs +3 -4
  48. package/dist/cjs/node_modules/@apollo/client/utilities/internal/checkDocument.cjs.map +1 -1
  49. package/dist/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.cjs +3 -20
  50. package/dist/cjs/node_modules/@emotion/serialize/dist/emotion-serialize.esm.cjs.map +1 -1
  51. package/dist/cjs/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.cjs +2 -2
  52. package/dist/cjs/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.cjs.map +1 -1
  53. package/dist/cjs/node_modules/@mui/styled-engine/esm/index.cjs +15 -2
  54. package/dist/cjs/node_modules/@mui/styled-engine/esm/index.cjs.map +1 -1
  55. package/dist/cjs/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.cjs +2 -2
  56. package/dist/cjs/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.cjs.map +1 -1
  57. package/dist/cjs/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.cjs +2 -2
  58. package/dist/cjs/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.cjs.map +1 -1
  59. package/dist/cjs/node_modules/@mui/utils/esm/deepmerge/deepmerge.cjs +1 -1
  60. package/dist/cjs/node_modules/next/dist/compiled/cookie/index.cjs +1 -1
  61. package/dist/cjs/node_modules/next/dist/compiled/gzip-size/index.cjs +1 -1
  62. package/dist/cjs/node_modules/next/dist/compiled/path-to-regexp/index.cjs +1 -1
  63. package/dist/cjs/node_modules/next/dist/shared/lib/router/utils/index.cjs +1 -1
  64. package/dist/cjs/node_modules/react-is/index.cjs +1 -1
  65. package/dist/cjs/shared/components/dialog/DialogDefault.cjs +2 -3
  66. package/dist/cjs/shared/components/dialog/DialogDefault.cjs.map +1 -1
  67. package/dist/cjs/shared/components/react-editor/BtnEmoji.cjs +3 -3
  68. package/dist/cjs/shared/components/react-editor/BtnEmoji.cjs.map +1 -1
  69. package/dist/cjs/shared/components/react-editor/BtnGif.cjs +4 -4
  70. package/dist/cjs/shared/components/react-editor/BtnGif.cjs.map +1 -1
  71. package/dist/cjs/shared/components/react-editor/ReactSimpleWysiwyg.cjs +5 -5
  72. package/dist/cjs/shared/components/react-editor/ReactSimpleWysiwyg.cjs.map +1 -1
  73. package/dist/cjs/shared/cookies/index.cjs +2 -2
  74. package/dist/cjs/shared/cookies/index.cjs.map +1 -1
  75. package/dist/esm/_virtual/index.js +3 -3
  76. package/dist/esm/_virtual/index2.js +2 -2
  77. package/dist/esm/_virtual/index3.js +2 -6
  78. package/dist/esm/_virtual/index3.js.map +1 -1
  79. package/dist/esm/_virtual/index4.js +2 -2
  80. package/dist/esm/_virtual/index5.js +2 -4
  81. package/dist/esm/_virtual/index5.js.map +1 -1
  82. package/dist/esm/_virtual/index6.js +2 -2
  83. package/dist/esm/components/comment/CommentProvider.js +3 -3
  84. package/dist/esm/components/comment/CommentProvider.js.map +1 -1
  85. package/dist/esm/components/comment/Comments.js +3 -3
  86. package/dist/esm/components/comment/Comments.js.map +1 -1
  87. package/dist/esm/components/comment/comment.actions.js +8 -8
  88. package/dist/esm/components/comment/comment.actions.js.map +1 -1
  89. package/dist/esm/components/comment/comment.events.js +7 -7
  90. package/dist/esm/components/comment/comment.events.js.map +1 -1
  91. package/dist/esm/components/comment/comment.store.js +5 -5
  92. package/dist/esm/components/comment/comment.store.js.map +1 -1
  93. package/dist/esm/components/comment/comment.utils.js +2 -1
  94. package/dist/esm/components/comment/comment.utils.js.map +1 -1
  95. package/dist/esm/components/comment/components/AddComment.js +3 -4
  96. package/dist/esm/components/comment/components/AddComment.js.map +1 -1
  97. package/dist/esm/components/comment/components/AddCommentContainer.js +1 -1
  98. package/dist/esm/components/comment/components/AddReplyComment.js +5 -5
  99. package/dist/esm/components/comment/components/AddReplyComment.js.map +1 -1
  100. package/dist/esm/components/comment/components/AddReplyCommentContainer.js +1 -1
  101. package/dist/esm/components/comment/components/CommentContainer.js +2 -2
  102. package/dist/esm/components/comment/components/CommentContainer.js.map +1 -1
  103. package/dist/esm/components/comment/components/CommentItem.js +1 -1
  104. package/dist/esm/components/comment/components/CommentSubscriptionDialog.js +2 -2
  105. package/dist/esm/components/comment/components/CommentSubscriptionDialog.js.map +1 -1
  106. package/dist/esm/components/comment/components/ShowMoreComments.js +3 -3
  107. package/dist/esm/components/comment/components/ShowMoreComments.js.map +1 -1
  108. package/dist/esm/components/panel/Panel.js +2 -2
  109. package/dist/esm/components/panel/Panel.js.map +1 -1
  110. package/dist/esm/components/panel/PanelButton.js +2 -2
  111. package/dist/esm/components/panel/PanelButton.js.map +1 -1
  112. package/dist/esm/components/panel/panel.actions.js +2 -2
  113. package/dist/esm/components/panel/panel.actions.js.map +1 -1
  114. package/dist/esm/components/panel/panel.store.js +2 -2
  115. package/dist/esm/components/panel/panel.store.js.map +1 -1
  116. package/dist/esm/components/session/SessionClientProvider.js +1 -1
  117. package/dist/esm/components/session/SessionUserClientProvider.js +5 -5
  118. package/dist/esm/components/session/SessionUserClientProvider.js.map +1 -1
  119. package/dist/esm/components/session/session.actions.js +5 -5
  120. package/dist/esm/components/session/session.actions.js.map +1 -1
  121. package/dist/esm/components/session/session.events.js +10 -10
  122. package/dist/esm/components/session/session.events.js.map +1 -1
  123. package/dist/esm/components/session/session.stores.js +2 -2
  124. package/dist/esm/components/session/session.stores.js.map +1 -1
  125. package/dist/esm/node_modules/@apollo/client/utilities/internal/checkDocument.js +1 -2
  126. package/dist/esm/node_modules/@apollo/client/utilities/internal/checkDocument.js.map +1 -1
  127. package/dist/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js +3 -20
  128. package/dist/esm/node_modules/@emotion/serialize/dist/emotion-serialize.esm.js.map +1 -1
  129. package/dist/esm/node_modules/@mui/styled-engine/esm/GlobalStyles/GlobalStyles.js +1 -1
  130. package/dist/esm/node_modules/@mui/styled-engine/esm/index.js +3 -2
  131. package/dist/esm/node_modules/@mui/styled-engine/esm/index.js.map +1 -1
  132. package/dist/esm/node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js +1 -1
  133. package/dist/esm/node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js +1 -1
  134. package/dist/esm/node_modules/@mui/utils/esm/deepmerge/deepmerge.js +1 -1
  135. package/dist/esm/node_modules/next/dist/compiled/cookie/index.js +1 -1
  136. package/dist/esm/node_modules/next/dist/compiled/gzip-size/index.js +1 -1
  137. package/dist/esm/node_modules/next/dist/compiled/path-to-regexp/index.js +1 -1
  138. package/dist/esm/node_modules/next/dist/shared/lib/router/utils/index.js +1 -1
  139. package/dist/esm/node_modules/react-is/index.js +1 -1
  140. package/dist/esm/shared/components/dialog/DialogDefault.js +1 -2
  141. package/dist/esm/shared/components/dialog/DialogDefault.js.map +1 -1
  142. package/dist/esm/shared/components/react-editor/BtnEmoji.js +3 -3
  143. package/dist/esm/shared/components/react-editor/BtnEmoji.js.map +1 -1
  144. package/dist/esm/shared/components/react-editor/BtnGif.js +2 -2
  145. package/dist/esm/shared/components/react-editor/ReactSimpleWysiwyg.js +2 -2
  146. package/dist/esm/shared/cookies/index.js +1 -1
  147. package/package.json +1 -1
@@ -1,25 +1,25 @@
1
- import { l as libExports } from '../../_virtual/index.js';
1
+ import { createStoreAction, createAction } from '@cobuildlab/react-simple-state';
2
2
  import { fetchCommentsStore, postStore, replyCommentStore, openSubscriptionCommentsStore } from './comment.store.js';
3
3
  import { CommentsDocument, CreateCommentDocument, CreateReplyCommentDocument } from '../../shared/types/generated.js';
4
4
  import { fetchCommentsEvent, fetchCommentErrorEvent, createCommentEvent, createCommentErrorEvent, createReplyCommentEvent, createReplyCommentErrorEvent } from './comment.events.js';
5
5
  import { apolloClient } from '../../shared/apollo/apollo.client.js';
6
6
 
7
7
  const client = apolloClient();
8
- const fetchCommentsStoreAction = libExports.createStoreAction(fetchCommentsStore, (prev, comments, count) => ({
8
+ const fetchCommentsStoreAction = createStoreAction(fetchCommentsStore, (prev, comments, count) => ({
9
9
  ...prev,
10
10
  comments,
11
11
  count,
12
12
  }));
13
- libExports.createStoreAction(postStore, (prev, id) => ({
13
+ createStoreAction(postStore, (prev, id) => ({
14
14
  ...prev,
15
15
  id,
16
16
  }));
17
- const replyCommentStoreAction = libExports.createStoreAction(replyCommentStore, (prev, message, commentId) => ({
17
+ const replyCommentStoreAction = createStoreAction(replyCommentStore, (prev, message, commentId) => ({
18
18
  ...prev,
19
19
  message,
20
20
  commentId,
21
21
  }));
22
- const fetchComments = libExports.createAction(fetchCommentsEvent, fetchCommentErrorEvent, async (variables) => {
22
+ const fetchComments = createAction(fetchCommentsEvent, fetchCommentErrorEvent, async (variables) => {
23
23
  const response = await client.query({
24
24
  query: CommentsDocument,
25
25
  variables,
@@ -30,7 +30,7 @@ const fetchComments = libExports.createAction(fetchCommentsEvent, fetchCommentEr
30
30
  count: response.data?.comments?.count,
31
31
  };
32
32
  });
33
- const createComment = libExports.createAction(createCommentEvent, createCommentErrorEvent, async (variables) => {
33
+ const createComment = createAction(createCommentEvent, createCommentErrorEvent, async (variables) => {
34
34
  const response = await client.mutate({
35
35
  mutation: CreateCommentDocument,
36
36
  variables,
@@ -39,7 +39,7 @@ const createComment = libExports.createAction(createCommentEvent, createCommentE
39
39
  comment: response.data?.createComment,
40
40
  };
41
41
  });
42
- const createReplyComment = libExports.createAction(createReplyCommentEvent, createReplyCommentErrorEvent, async (variables) => {
42
+ const createReplyComment = createAction(createReplyCommentEvent, createReplyCommentErrorEvent, async (variables) => {
43
43
  const response = await client.mutate({
44
44
  mutation: CreateReplyCommentDocument,
45
45
  variables,
@@ -48,7 +48,7 @@ const createReplyComment = libExports.createAction(createReplyCommentEvent, crea
48
48
  comment: response.data?.createReplyComment,
49
49
  };
50
50
  });
51
- const openSubscriptionCommentsStoreAction = libExports.createStoreAction(openSubscriptionCommentsStore, (prev, open) => ({
51
+ const openSubscriptionCommentsStoreAction = createStoreAction(openSubscriptionCommentsStore, (prev, open) => ({
52
52
  ...prev,
53
53
  open,
54
54
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"comment.actions.js","sources":["../../../../src/components/comment/comment.actions.ts"],"sourcesContent":["import { createAction, createStoreAction } from '@cobuildlab/react-simple-state';\nimport {\n postStore,\n fetchCommentsStore,\n openSubscriptionCommentsStore,\n replyCommentStore,\n} from './comment.store';\nimport {\n Comment,\n CommentsDocument,\n CommentsQuery,\n CommentsQueryVariables,\n CreateCommentDocument,\n CreateCommentMutation,\n CreateCommentMutationVariables,\n CreateReplyCommentDocument,\n CreateReplyCommentMutation,\n CreateReplyCommentMutationVariables,\n} from '../../shared/types/generated';\nimport {\n createCommentErrorEvent,\n createCommentEvent,\n createReplyCommentErrorEvent,\n createReplyCommentEvent,\n fetchCommentErrorEvent,\n fetchCommentsEvent,\n} from './comment.events';\nimport { apolloClient } from '../../shared/apollo/apollo.client';\n\nconst client = apolloClient();\n\nexport const fetchCommentsStoreAction = createStoreAction(\n fetchCommentsStore,\n (prev, comments: Comment[], count: number) => ({\n ...prev,\n comments,\n count,\n }),\n);\n\nexport const postStoreAction = createStoreAction(postStore, (prev, id: number) => ({\n ...prev,\n id,\n}));\n\nexport const replyCommentStoreAction = createStoreAction(\n replyCommentStore,\n (prev, message: string, commentId: number) => ({\n ...prev,\n message,\n commentId,\n }),\n);\n\nexport const fetchComments = createAction(\n fetchCommentsEvent,\n fetchCommentErrorEvent,\n async (variables: CommentsQueryVariables) => {\n const response = await client.query<CommentsQuery, CommentsQueryVariables>({\n query: CommentsDocument,\n variables,\n fetchPolicy: 'network-only',\n });\n\n return {\n comments: response.data?.comments?.items as Comment[],\n count: response.data?.comments?.count as number,\n };\n },\n);\n\nexport const createComment = createAction(\n createCommentEvent,\n createCommentErrorEvent,\n async (variables: CreateCommentMutationVariables) => {\n const response = await client.mutate<CreateCommentMutation, CreateCommentMutationVariables>({\n mutation: CreateCommentDocument,\n variables,\n });\n\n return {\n comment: response.data?.createComment as Comment,\n };\n },\n);\n\nexport const createReplyComment = createAction(\n createReplyCommentEvent,\n createReplyCommentErrorEvent,\n async (variables: CreateReplyCommentMutationVariables) => {\n const response = await client.mutate<\n CreateReplyCommentMutation,\n CreateReplyCommentMutationVariables\n >({\n mutation: CreateReplyCommentDocument,\n variables,\n });\n\n return {\n comment: response.data?.createReplyComment,\n };\n },\n);\n\nexport const openSubscriptionCommentsStoreAction = createStoreAction(\n openSubscriptionCommentsStore,\n (prev, open: boolean) => ({\n ...prev,\n open,\n }),\n);\n"],"names":["createStoreAction","createAction"],"mappings":";;;;;;AA6BA,MAAM,MAAM,GAAG,YAAY,EAAE;AAEtB,MAAM,wBAAwB,GAAGA,4BAAiB,CACvD,kBAAkB,EAClB,CAAC,IAAI,EAAE,QAAmB,EAAE,KAAa,MAAM;AAC7C,IAAA,GAAG,IAAI;IAC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AA,CAAC;IAEF,OAAO;AACL,QAAA,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB;KAC3C;AACH,CAAC;AAGI,MAAM,mCAAmC,GAAGD,4BAAiB,CAClE,6BAA6B,EAC7B,CAAC,IAAI,EAAE,IAAa,MAAM;AACxB,IAAA,GAAG,IAAI;IACP,IAAI;AACL,CAAA,CAAC;;;;"}
1
+ {"version":3,"file":"comment.actions.js","sources":["../../../../src/components/comment/comment.actions.ts"],"sourcesContent":["import { createAction, createStoreAction } from '@cobuildlab/react-simple-state';\nimport {\n postStore,\n fetchCommentsStore,\n openSubscriptionCommentsStore,\n replyCommentStore,\n} from './comment.store';\nimport {\n Comment,\n CommentsDocument,\n CommentsQuery,\n CommentsQueryVariables,\n CreateCommentDocument,\n CreateCommentMutation,\n CreateCommentMutationVariables,\n CreateReplyCommentDocument,\n CreateReplyCommentMutation,\n CreateReplyCommentMutationVariables,\n} from '../../shared/types/generated';\nimport {\n createCommentErrorEvent,\n createCommentEvent,\n createReplyCommentErrorEvent,\n createReplyCommentEvent,\n fetchCommentErrorEvent,\n fetchCommentsEvent,\n} from './comment.events';\nimport { apolloClient } from '../../shared/apollo/apollo.client';\n\nconst client = apolloClient();\n\nexport const fetchCommentsStoreAction = createStoreAction(\n fetchCommentsStore,\n (prev, comments: Comment[], count: number) => ({\n ...prev,\n comments,\n count,\n }),\n);\n\nexport const postStoreAction = createStoreAction(postStore, (prev, id: number) => ({\n ...prev,\n id,\n}));\n\nexport const replyCommentStoreAction = createStoreAction(\n replyCommentStore,\n (prev, message: string, commentId: number) => ({\n ...prev,\n message,\n commentId,\n }),\n);\n\nexport const fetchComments = createAction(\n fetchCommentsEvent,\n fetchCommentErrorEvent,\n async (variables: CommentsQueryVariables) => {\n const response = await client.query<CommentsQuery, CommentsQueryVariables>({\n query: CommentsDocument,\n variables,\n fetchPolicy: 'network-only',\n });\n\n return {\n comments: response.data?.comments?.items as Comment[],\n count: response.data?.comments?.count as number,\n };\n },\n);\n\nexport const createComment = createAction(\n createCommentEvent,\n createCommentErrorEvent,\n async (variables: CreateCommentMutationVariables) => {\n const response = await client.mutate<CreateCommentMutation, CreateCommentMutationVariables>({\n mutation: CreateCommentDocument,\n variables,\n });\n\n return {\n comment: response.data?.createComment as Comment,\n };\n },\n);\n\nexport const createReplyComment = createAction(\n createReplyCommentEvent,\n createReplyCommentErrorEvent,\n async (variables: CreateReplyCommentMutationVariables) => {\n const response = await client.mutate<\n CreateReplyCommentMutation,\n CreateReplyCommentMutationVariables\n >({\n mutation: CreateReplyCommentDocument,\n variables,\n });\n\n return {\n comment: response.data?.createReplyComment,\n };\n },\n);\n\nexport const openSubscriptionCommentsStoreAction = createStoreAction(\n openSubscriptionCommentsStore,\n (prev, open: boolean) => ({\n ...prev,\n open,\n }),\n);\n"],"names":[],"mappings":";;;;;;AA6BA,MAAM,MAAM,GAAG,YAAY,EAAE;AAEtB,MAAM,wBAAwB,GAAG,iBAAiB,CACvD,kBAAkB,EAClB,CAAC,IAAI,EAAE,QAAmB,EAAE,KAAa,MAAM;AAC7C,IAAA,GAAG,IAAI;IACP,QAAQ;IACR,KAAK;AACN,CAAA,CAAC;AAG2B,iBAAiB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,EAAU,MAAM;AACjF,IAAA,GAAG,IAAI;IACP,EAAE;AACH,CAAA,CAAC;AAEK,MAAM,uBAAuB,GAAG,iBAAiB,CACtD,iBAAiB,EACjB,CAAC,IAAI,EAAE,OAAe,EAAE,SAAiB,MAAM;AAC7C,IAAA,GAAG,IAAI;IACP,OAAO;IACP,SAAS;AACV,CAAA,CAAC;AAGG,MAAM,aAAa,GAAG,YAAY,CACvC,kBAAkB,EAClB,sBAAsB,EACtB,OAAO,SAAiC,KAAI;AAC1C,IAAA,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,KAAK,CAAwC;AACzE,QAAA,KAAK,EAAE,gBAAgB;QACvB,SAAS;AACT,QAAA,WAAW,EAAE,cAAc;AAC5B,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,QAAQ,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAkB;AACrD,QAAA,KAAK,EAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,EAAE,KAAe;KAChD;AACH,CAAC;AAGI,MAAM,aAAa,GAAG,YAAY,CACvC,kBAAkB,EAClB,uBAAuB,EACvB,OAAO,SAAyC,KAAI;AAClD,IAAA,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAAwD;AAC1F,QAAA,QAAQ,EAAE,qBAAqB;QAC/B,SAAS;AACV,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,aAAwB;KACjD;AACH,CAAC;AAGI,MAAM,kBAAkB,GAAG,YAAY,CAC5C,uBAAuB,EACvB,4BAA4B,EAC5B,OAAO,SAA8C,KAAI;AACvD,IAAA,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,MAAM,CAGlC;AACA,QAAA,QAAQ,EAAE,0BAA0B;QACpC,SAAS;AACV,KAAA,CAAC;IAEF,OAAO;AACL,QAAA,OAAO,EAAE,QAAQ,CAAC,IAAI,EAAE,kBAAkB;KAC3C;AACH,CAAC;AAGI,MAAM,mCAAmC,GAAG,iBAAiB,CAClE,6BAA6B,EAC7B,CAAC,IAAI,EAAE,IAAa,MAAM;AACxB,IAAA,GAAG,IAAI;IACP,IAAI;AACL,CAAA,CAAC;;;;"}
@@ -1,24 +1,24 @@
1
- import { l as libExports } from '../../_virtual/index.js';
1
+ import { createEvent } from '@cobuildlab/react-simple-state';
2
2
 
3
- const fetchCommentsEvent = libExports.createEvent({
3
+ const fetchCommentsEvent = createEvent({
4
4
  initialValue: {
5
5
  comments: [],
6
6
  count: 0,
7
7
  },
8
8
  });
9
- const fetchCommentErrorEvent = libExports.createEvent();
10
- const createCommentEvent = libExports.createEvent({
9
+ const fetchCommentErrorEvent = createEvent();
10
+ const createCommentEvent = createEvent({
11
11
  initialValue: {
12
12
  comment: undefined,
13
13
  },
14
14
  });
15
- const createCommentErrorEvent = libExports.createEvent();
16
- const createReplyCommentEvent = libExports.createEvent({
15
+ const createCommentErrorEvent = createEvent();
16
+ const createReplyCommentEvent = createEvent({
17
17
  initialValue: {
18
18
  comment: undefined,
19
19
  },
20
20
  });
21
- const createReplyCommentErrorEvent = libExports.createEvent();
21
+ const createReplyCommentErrorEvent = createEvent();
22
22
 
23
23
  export { createCommentErrorEvent, createCommentEvent, createReplyCommentErrorEvent, createReplyCommentEvent, fetchCommentErrorEvent, fetchCommentsEvent };
24
24
  //# sourceMappingURL=comment.events.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"comment.events.js","sources":["../../../../src/components/comment/comment.events.ts"],"sourcesContent":["import { createEvent } from '@cobuildlab/react-simple-state';\nimport { Comment, ReplyComment } from '../../shared/types/generated';\n\nexport const fetchCommentsEvent = createEvent<{\n comments: Comment[];\n count: number;\n}>({\n initialValue: {\n comments: [],\n count: 0,\n },\n});\n\nexport const fetchCommentErrorEvent = createEvent();\n\nexport const createCommentEvent = createEvent<{ comment: Comment | undefined }>({\n initialValue: {\n comment: undefined,\n },\n});\nexport const createCommentErrorEvent = createEvent();\n\nexport const createReplyCommentEvent = createEvent<{\n comment: ReplyComment | undefined;\n}>({\n initialValue: {\n comment: undefined,\n },\n});\nexport const createReplyCommentErrorEvent = createEvent();\n"],"names":["createEvent"],"mappings":";;AAGO,MAAM,kBAAkB,GAAGA,sBAAW,CAG1C;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACF,CAAA;AAEM,MAAM,sBAAsB,GAAGA,sBAAW;AAE1C,MAAM,kBAAkB,GAAGA,sBAAW,CAAmC;AAC9E,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AACM,MAAM,uBAAuB,GAAGA,sBAAW;AAE3C,MAAM,uBAAuB,GAAGA,sBAAW,CAE/C;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AACM,MAAM,4BAA4B,GAAGA,sBAAW;;;;"}
1
+ {"version":3,"file":"comment.events.js","sources":["../../../../src/components/comment/comment.events.ts"],"sourcesContent":["import { createEvent } from '@cobuildlab/react-simple-state';\nimport { Comment, ReplyComment } from '../../shared/types/generated';\n\nexport const fetchCommentsEvent = createEvent<{\n comments: Comment[];\n count: number;\n}>({\n initialValue: {\n comments: [],\n count: 0,\n },\n});\n\nexport const fetchCommentErrorEvent = createEvent();\n\nexport const createCommentEvent = createEvent<{ comment: Comment | undefined }>({\n initialValue: {\n comment: undefined,\n },\n});\nexport const createCommentErrorEvent = createEvent();\n\nexport const createReplyCommentEvent = createEvent<{\n comment: ReplyComment | undefined;\n}>({\n initialValue: {\n comment: undefined,\n },\n});\nexport const createReplyCommentErrorEvent = createEvent();\n"],"names":[],"mappings":";;AAGO,MAAM,kBAAkB,GAAG,WAAW,CAG1C;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACF,CAAA;AAEM,MAAM,sBAAsB,GAAG,WAAW;AAE1C,MAAM,kBAAkB,GAAG,WAAW,CAAmC;AAC9E,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AACM,MAAM,uBAAuB,GAAG,WAAW;AAE3C,MAAM,uBAAuB,GAAG,WAAW,CAE/C;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,SAAS;AACnB,KAAA;AACF,CAAA;AACM,MAAM,4BAA4B,GAAG,WAAW;;;;"}
@@ -1,23 +1,23 @@
1
- import { l as libExports } from '../../_virtual/index.js';
1
+ import { createStore } from '@cobuildlab/react-simple-state';
2
2
 
3
- const fetchCommentsStore = libExports.createStore({
3
+ const fetchCommentsStore = createStore({
4
4
  initialValue: {
5
5
  comments: [],
6
6
  count: 0,
7
7
  },
8
8
  });
9
- const postStore = libExports.createStore({
9
+ const postStore = createStore({
10
10
  initialValue: {
11
11
  id: 0,
12
12
  },
13
13
  });
14
- const replyCommentStore = libExports.createStore({
14
+ const replyCommentStore = createStore({
15
15
  initialValue: {
16
16
  message: '',
17
17
  commentId: 0,
18
18
  },
19
19
  });
20
- const openSubscriptionCommentsStore = libExports.createStore({
20
+ const openSubscriptionCommentsStore = createStore({
21
21
  initialValue: {
22
22
  open: false,
23
23
  },
@@ -1 +1 @@
1
- {"version":3,"file":"comment.store.js","sources":["../../../../src/components/comment/comment.store.ts"],"sourcesContent":["import { createStore } from '@cobuildlab/react-simple-state';\nimport { Comment } from '../../shared/types/generated';\nimport { ReplyCommentStore } from './comment.types';\n\nexport const fetchCommentsStore = createStore<{\n comments: Comment[];\n count: number;\n}>({\n initialValue: {\n comments: [],\n count: 0,\n },\n});\n\nexport const postStore = createStore<{ id: number }>({\n initialValue: {\n id: 0,\n },\n});\n\nexport const replyCommentStore = createStore<ReplyCommentStore>({\n initialValue: {\n message: '',\n commentId: 0,\n },\n});\n\nexport const openSubscriptionCommentsStore = createStore<{ open: boolean }>({\n initialValue: {\n open: false,\n },\n});\n"],"names":["createStore"],"mappings":";;AAIO,MAAM,kBAAkB,GAAGA,sBAAW,CAG1C;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACF,CAAA;AAEM,MAAM,SAAS,GAAGA,sBAAW,CAAiB;AACnD,IAAA,YAAY,EAAE;AACZ,QAAA,EAAE,EAAE,CAAC;AACN,KAAA;AACF,CAAA;AAEM,MAAM,iBAAiB,GAAGA,sBAAW,CAAoB;AAC9D,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,SAAS,EAAE,CAAC;AACb,KAAA;AACF,CAAA;AAEM,MAAM,6BAA6B,GAAGA,sBAAW,CAAoB;AAC1E,IAAA,YAAY,EAAE;AACZ,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA;;;;"}
1
+ {"version":3,"file":"comment.store.js","sources":["../../../../src/components/comment/comment.store.ts"],"sourcesContent":["import { createStore } from '@cobuildlab/react-simple-state';\nimport { Comment } from '../../shared/types/generated';\nimport { ReplyCommentStore } from './comment.types';\n\nexport const fetchCommentsStore = createStore<{\n comments: Comment[];\n count: number;\n}>({\n initialValue: {\n comments: [],\n count: 0,\n },\n});\n\nexport const postStore = createStore<{ id: number }>({\n initialValue: {\n id: 0,\n },\n});\n\nexport const replyCommentStore = createStore<ReplyCommentStore>({\n initialValue: {\n message: '',\n commentId: 0,\n },\n});\n\nexport const openSubscriptionCommentsStore = createStore<{ open: boolean }>({\n initialValue: {\n open: false,\n },\n});\n"],"names":[],"mappings":";;AAIO,MAAM,kBAAkB,GAAG,WAAW,CAG1C;AACD,IAAA,YAAY,EAAE;AACZ,QAAA,QAAQ,EAAE,EAAE;AACZ,QAAA,KAAK,EAAE,CAAC;AACT,KAAA;AACF,CAAA;AAEM,MAAM,SAAS,GAAG,WAAW,CAAiB;AACnD,IAAA,YAAY,EAAE;AACZ,QAAA,EAAE,EAAE,CAAC;AACN,KAAA;AACF,CAAA;AAEM,MAAM,iBAAiB,GAAG,WAAW,CAAoB;AAC9D,IAAA,YAAY,EAAE;AACZ,QAAA,OAAO,EAAE,EAAE;AACX,QAAA,SAAS,EAAE,CAAC;AACb,KAAA;AACF,CAAA;AAEM,MAAM,6BAA6B,GAAG,WAAW,CAAoB;AAC1E,IAAA,YAAY,EAAE;AACZ,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA;;;;"}
@@ -1,7 +1,8 @@
1
1
  import 'react/jsx-runtime';
2
2
  import 'react';
3
3
  import '@mui/material';
4
- import '../../node_modules/emoji-mart/dist/module.js';
4
+ import '@emoji-mart/data';
5
+ import '@emoji-mart/react';
5
6
 
6
7
  const getCommentPlaceholder = (isAllowed) => {
7
8
  if (isAllowed)
@@ -1 +1 @@
1
- {"version":3,"file":"comment.utils.js","sources":["../../../../src/components/comment/comment.utils.ts"],"sourcesContent":["import { BtnEmoji } from '../../shared/components/react-editor/BtnEmoji';\n\nexport const getCommentPlaceholder = (isAllowed: boolean) => {\n if (isAllowed) return '';\n\n return 'Suscribete para comentar...';\n};\n\nexport const editorToolbar = {\n options: ['inline', 'emoji'],\n inline: {\n inDropdown: false,\n options: ['bold', 'italic'],\n },\n emoji: {\n className: undefined,\n component: BtnEmoji,\n popupClassName: undefined,\n },\n};\n"],"names":[],"mappings":";;;;;AAEO,MAAM,qBAAqB,GAAG,CAAC,SAAkB,KAAI;AAC1D,IAAA,IAAI,SAAS;AAAE,QAAA,OAAO,EAAE;AAExB,IAAA,OAAO,6BAA6B;AACtC;;;;"}
1
+ {"version":3,"file":"comment.utils.js","sources":["../../../../src/components/comment/comment.utils.ts"],"sourcesContent":["import { BtnEmoji } from '../../shared/components/react-editor/BtnEmoji';\n\nexport const getCommentPlaceholder = (isAllowed: boolean) => {\n if (isAllowed) return '';\n\n return 'Suscribete para comentar...';\n};\n\nexport const editorToolbar = {\n options: ['inline', 'emoji'],\n inline: {\n inDropdown: false,\n options: ['bold', 'italic'],\n },\n emoji: {\n className: undefined,\n component: BtnEmoji,\n popupClassName: undefined,\n },\n};\n"],"names":[],"mappings":";;;;;;AAEO,MAAM,qBAAqB,GAAG,CAAC,SAAkB,KAAI;AAC1D,IAAA,IAAI,SAAS;AAAE,QAAA,OAAO,EAAE;AAExB,IAAA,OAAO,6BAA6B;AACtC;;;;"}
@@ -2,13 +2,12 @@ import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Card, Box, Avatar } from '@mui/material';
4
4
  import { ButtonDefault } from '../../../shared/components/buttons/ButtonDefault.js';
5
+ import { makeStyles, createStyles } from '@mui/styles';
5
6
  import { useComment } from '../comment.hooks.js';
6
7
  import { ReactSimpleWysiwyg } from '../../../shared/components/react-editor/ReactSimpleWysiwyg.js';
7
8
  import { useSession } from '../../session/session.hooks.js';
8
- import { l as libExports } from '../../../_virtual/index.js';
9
+ import { useCallAction } from '@cobuildlab/react-simple-state';
9
10
  import { createComment, openSubscriptionCommentsStoreAction } from '../comment.actions.js';
10
- import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
11
- import createStyles from '../../../node_modules/@mui/styles/createStyles/createStyles.js';
12
11
 
13
12
  const useStyles = makeStyles((theme) => createStyles({
14
13
  cardHeader: {
@@ -60,7 +59,7 @@ const AddComment = () => {
60
59
  const { user, subscription } = useSession();
61
60
  const [html, setHtml] = useState('');
62
61
  const { callAction, postId } = useComment();
63
- const [callCreateComment, loading] = libExports.useCallAction(createComment, {
62
+ const [callCreateComment, loading] = useCallAction(createComment, {
64
63
  onCompleted: () => {
65
64
  setHtml('');
66
65
  callAction();
@@ -1 +1 @@
1
- {"version":3,"file":"AddComment.js","sources":["../../../../../src/components/comment/components/AddComment.tsx"],"sourcesContent":["\nimport React, { useState } from 'react';\nimport { Avatar, Box, Card } from '@mui/material';\nimport { ButtonDefault } from '../../../shared/components/buttons/ButtonDefault';\nimport { createStyles, makeStyles } from '@mui/styles';\nimport { useComment } from '../comment.hooks';\n\nimport { ReactSimpleWysiwyg } from '../../../shared/components/react-editor/ReactSimpleWysiwyg';\nimport { useSession } from '../../session/session.hooks';\nimport { useCallAction } from '@cobuildlab/react-simple-state';\nimport { createComment, openSubscriptionCommentsStoreAction } from '../comment.actions';\nimport { Theme } from '@mui/material';\n\nconst useStyles = makeStyles<Theme>((theme: Theme) =>\n createStyles({\n cardHeader: {\n '& > .MuiCardHeader-action': {\n marginTop: 0,\n marginRight: 0,\n },\n '& > .MuiCardHeader-avatar': {\n outline: '1px solid #eaecf1',\n borderRadius: '50%',\n },\n },\n button: {\n minWidth: 130,\n '&:disabled': {\n backgroundColor: '#8B8B8B !important',\n },\n },\n addcommentStyles: {\n display: 'flex',\n [theme.breakpoints.down('md')]: {\n display: 'block',\n },\n },\n buttoncommentStyles: {\n marginLeft: 10,\n [theme.breakpoints.down('md')]: {\n marginLeft: 0,\n marginTop: 10,\n },\n },\n avatarStyles: {\n marginRight: 10,\n\n [theme.breakpoints.down('md')]: {\n marginRight: 0,\n marginBottom: 10,\n display: 'flex',\n alignItems: 'center',\n alignContent: 'center',\n },\n },\n name: {\n fontSize: 14,\n fontWeight: 700,\n },\n }),\n);\n\nexport const AddComment: React.FC = () => {\n const classes = useStyles();\n const { user, subscription } = useSession();\n const [html, setHtml] = useState<string>('');\n const { callAction, postId } = useComment();\n\n const [callCreateComment, loading] = useCallAction(createComment, {\n onCompleted: () => {\n setHtml('');\n callAction();\n },\n });\n\n return (\n <Card elevation={0}>\n <Box className={classes.addcommentStyles}>\n {user ? (\n <Box className={classes.avatarStyles}>\n <Avatar sx={{ width: 40, height: 40, marginRight: 1 }} src={user?.avatar as string} />\n <Box sx={{ display: { xs: 'block', md: 'none' } }}>\n <Box className={classes.name} mb={1}>\n {user?.name}\n </Box>\n </Box>\n </Box>\n ) : null}\n {\n <Box component={'div'} style={{ width: '100%' }}>\n <ReactSimpleWysiwyg value={html} onChange={(value) => setHtml(value)} />\n </Box>\n }\n {\n <Box className={classes.buttoncommentStyles}>\n <ButtonDefault\n disabled={!(html && user)}\n onClick={() => {\n if (!subscription) return openSubscriptionCommentsStoreAction(true);\n\n callCreateComment({\n data: {\n message: html,\n post_id: postId,\n },\n });\n }}\n color={!subscription ? 'primary' : 'inherit'}\n isLoading={loading}\n className={classes.button}>\n Comentar\n </ButtonDefault>\n </Box>\n }\n </Box>\n </Card>\n );\n};\n"],"names":["useCallAction","_jsx","_jsxs"],"mappings":";;;;;;;;;;;;AAaA,MAAM,SAAS,GAAG,UAAU,CAAQ,CAAC,KAAY,KAC/C,YAAY,CAAC;AACX,IAAA,UAAU,EAAE;AACV,QAAA,2BAA2B,EAAE;AAC3B,YAAA,SAAS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,KAAK,CAAC,EAAA,CAAI,EAAA,CACpE,EAGNA,GAAA,CAAC,GAAG,IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,EAAA,QAAA,EACzCA,GAAA,CAAC,aAAa,EAAA,EACZ,QAAQ,EAAE,EAAE,IAAI,IAAI,IAAI,CAAC,EACzB,OAAO,EAAE,MAAK;AACZ,4BAAA,IAAI,CAAC,YAAY;AAAE,gCAAA,OAAO,mCAAmC,CAAC,IAAI,CAAC;AAEnE,4BAAA,iBAAiB,CAAC;AAChB,gCAAA,IAAI,EAAE;AACJ,oCAAA,OAAO,EAAE,IAAI;AACb,oCAAA,OAAO,EAAE,MAAM;AAChB,iCAAA;AACF,6BAAA,CAAC;AACJ,wBAAA,CAAC,EACD,KAAK,EAAE,CAAC,YAAY,GAAG,SAAS,GAAG,SAAS,EAC5C,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAA,QAAA,EAAA,UAAA,EAAA,CAEX,EAAA,CACZ,CAAA,EAAA,CAEJ,EAAA,CACD;AAEX;;;;"}
1
+ {"version":3,"file":"AddComment.js","sources":["../../../../../src/components/comment/components/AddComment.tsx"],"sourcesContent":["\nimport React, { useState } from 'react';\nimport { Avatar, Box, Card } from '@mui/material';\nimport { ButtonDefault } from '../../../shared/components/buttons/ButtonDefault';\nimport { createStyles, makeStyles } from '@mui/styles';\nimport { useComment } from '../comment.hooks';\n\nimport { ReactSimpleWysiwyg } from '../../../shared/components/react-editor/ReactSimpleWysiwyg';\nimport { useSession } from '../../session/session.hooks';\nimport { useCallAction } from '@cobuildlab/react-simple-state';\nimport { createComment, openSubscriptionCommentsStoreAction } from '../comment.actions';\nimport { Theme } from '@mui/material';\n\nconst useStyles = makeStyles<Theme>((theme: Theme) =>\n createStyles({\n cardHeader: {\n '& > .MuiCardHeader-action': {\n marginTop: 0,\n marginRight: 0,\n },\n '& > .MuiCardHeader-avatar': {\n outline: '1px solid #eaecf1',\n borderRadius: '50%',\n },\n },\n button: {\n minWidth: 130,\n '&:disabled': {\n backgroundColor: '#8B8B8B !important',\n },\n },\n addcommentStyles: {\n display: 'flex',\n [theme.breakpoints.down('md')]: {\n display: 'block',\n },\n },\n buttoncommentStyles: {\n marginLeft: 10,\n [theme.breakpoints.down('md')]: {\n marginLeft: 0,\n marginTop: 10,\n },\n },\n avatarStyles: {\n marginRight: 10,\n\n [theme.breakpoints.down('md')]: {\n marginRight: 0,\n marginBottom: 10,\n display: 'flex',\n alignItems: 'center',\n alignContent: 'center',\n },\n },\n name: {\n fontSize: 14,\n fontWeight: 700,\n },\n }),\n);\n\nexport const AddComment: React.FC = () => {\n const classes = useStyles();\n const { user, subscription } = useSession();\n const [html, setHtml] = useState<string>('');\n const { callAction, postId } = useComment();\n\n const [callCreateComment, loading] = useCallAction(createComment, {\n onCompleted: () => {\n setHtml('');\n callAction();\n },\n });\n\n return (\n <Card elevation={0}>\n <Box className={classes.addcommentStyles}>\n {user ? (\n <Box className={classes.avatarStyles}>\n <Avatar sx={{ width: 40, height: 40, marginRight: 1 }} src={user?.avatar as string} />\n <Box sx={{ display: { xs: 'block', md: 'none' } }}>\n <Box className={classes.name} mb={1}>\n {user?.name}\n </Box>\n </Box>\n </Box>\n ) : null}\n {\n <Box component={'div'} style={{ width: '100%' }}>\n <ReactSimpleWysiwyg value={html} onChange={(value) => setHtml(value)} />\n </Box>\n }\n {\n <Box className={classes.buttoncommentStyles}>\n <ButtonDefault\n disabled={!(html && user)}\n onClick={() => {\n if (!subscription) return openSubscriptionCommentsStoreAction(true);\n\n callCreateComment({\n data: {\n message: html,\n post_id: postId,\n },\n });\n }}\n color={!subscription ? 'primary' : 'inherit'}\n isLoading={loading}\n className={classes.button}>\n Comentar\n </ButtonDefault>\n </Box>\n }\n </Box>\n </Card>\n );\n};\n"],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;;;AAaA,MAAM,SAAS,GAAG,UAAU,CAAQ,CAAC,KAAY,KAC/C,YAAY,CAAC;AACX,IAAA,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AAI,EAAE,QAAQ,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,EAAA,CAAI,EAAA,CACpE,EAGNA,GAAA,CAAC,GAAG,IAAC,SAAS,EAAE,OAAO,CAAC,mBAAmB,EAAA,QAAA,EACzCA,GAAA,CAAC,aAAa,EAAA,EACZ,QAAQ,EAAE,EAAE,IAAI,IAAI,IAAI,CAAC,EACzB,OAAO,EAAE,MAAK;AACZ,4BAAA,IAAI,CAAC,YAAY;AAAE,gCAAA,OAAO,mCAAmC,CAAC,IAAI,CAAC;AAEnE,4BAAA,iBAAiB,CAAC;AAChB,gCAAA,IAAI,EAAE;AACJ,oCAAA,OAAO,EAAE,IAAI;AACb,oCAAA,OAAO,EAAE,MAAM;AAChB,iCAAA;AACF,6BAAA,CAAC;AACJ,wBAAA,CAAC,EACD,KAAK,EAAE,CAAC,YAAY,GAAG,SAAS,GAAG,SAAS,EAC5C,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAA,QAAA,EAAA,UAAA,EAAA,CAEX,EAAA,CACZ,CAAA,EAAA,CAEJ,EAAA,CACD;AAEX;;;;"}
@@ -1,11 +1,11 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
2
  import { Card, CardHeader, Box, Divider, CardContent } from '@mui/material';
3
3
  import { AddComment } from './AddComment.js';
4
+ import { makeStyles } from '@mui/styles';
4
5
  import { r as routerExports } from '../../../_virtual/router.js';
5
6
  import { theme } from '../../../shared/mui/theme.js';
6
7
  import { URL_PORTAL } from '../../../shared/constants/index.js';
7
8
  import { useSession } from '../../session/session.hooks.js';
8
- import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
9
9
 
10
10
  const useStyles = makeStyles({
11
11
  text: {
@@ -1,15 +1,15 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
3
  import { Card, CardHeader, Box, Avatar } from '@mui/material';
4
- import { EditorProvider } from '../../../node_modules/react-simple-wysiwyg/lib/index.es.js';
4
+ import { EditorProvider } from 'react-simple-wysiwyg';
5
5
  import { ButtonDefault } from '../../../shared/components/buttons/ButtonDefault.js';
6
+ import { makeStyles } from '@mui/styles';
6
7
  import { useComment } from '../comment.hooks.js';
7
8
  import { ReactSimpleWysiwyg } from '../../../shared/components/react-editor/ReactSimpleWysiwyg.js';
8
- import { l as libExports } from '../../../_virtual/index.js';
9
+ import { useStore, useCallAction } from '@cobuildlab/react-simple-state';
9
10
  import { replyCommentStore } from '../comment.store.js';
10
11
  import { createReplyComment, replyCommentStoreAction, openSubscriptionCommentsStoreAction } from '../comment.actions.js';
11
12
  import { useSession } from '../../session/session.hooks.js';
12
- import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
13
13
 
14
14
  const useStyles = makeStyles({
15
15
  cardHeader: {
@@ -29,10 +29,10 @@ const useStyles = makeStyles({
29
29
  const AddReplyComment = () => {
30
30
  const classes = useStyles();
31
31
  const { user, subscription } = useSession();
32
- const { message, commentId } = libExports.useStore(replyCommentStore);
32
+ const { message, commentId } = useStore(replyCommentStore);
33
33
  const [html, setHtml] = useState(message);
34
34
  const { callAction, postId } = useComment();
35
- const [callCreateComment, loading] = libExports.useCallAction(createReplyComment, {
35
+ const [callCreateComment, loading] = useCallAction(createReplyComment, {
36
36
  onCompleted: () => {
37
37
  callAction();
38
38
  replyCommentStoreAction('', 0);
@@ -1 +1 @@
1
- {"version":3,"file":"AddReplyComment.js","sources":["../../../../../src/components/comment/components/AddReplyComment.tsx"],"sourcesContent":["\n\nimport React, { useState } from 'react';\nimport { Avatar, Box, Card, CardHeader } from '@mui/material';\nimport { EditorProvider } from 'react-simple-wysiwyg';\nimport { ButtonDefault } from '../../../shared/components/buttons/ButtonDefault';\nimport { makeStyles } from '@mui/styles';\nimport { useComment } from '../comment.hooks';\nimport { ReactSimpleWysiwyg } from '../../../shared/components/react-editor/ReactSimpleWysiwyg';\nimport { useCallAction, useStore } from '@cobuildlab/react-simple-state';\nimport { replyCommentStore } from '../comment.store';\nimport {\n createReplyComment,\n openSubscriptionCommentsStoreAction,\n replyCommentStoreAction,\n} from '../comment.actions';\nimport { useSession } from '../../session/session.hooks';\n\nconst useStyles = makeStyles({\n cardHeader: {\n '& > .MuiCardHeader-action': {\n marginTop: 0,\n marginRight: 0,\n },\n '& > .MuiCardHeader-avatar': {\n outline: '1px solid #eaecf1',\n borderRadius: '50%',\n },\n },\n button: {\n minWidth: 130,\n },\n});\n\nexport const AddReplyComment: React.FC = () => {\n const classes = useStyles();\n const { user, subscription } = useSession();\n const { message, commentId } = useStore(replyCommentStore);\n const [html, setHtml] = useState<string>(message);\n const { callAction, postId } = useComment();\n\n const [callCreateComment, loading] = useCallAction(createReplyComment, {\n onCompleted: () => {\n callAction();\n replyCommentStoreAction('', 0);\n },\n });\n\n console.log({ html });\n\n return (\n <EditorProvider>\n <Card elevation={0}>\n <CardHeader\n sx={{ p: 0 }}\n className={classes.cardHeader}\n avatar={\n user ? (\n <Avatar\n sx={{ width: 40, height: 40 }}\n src={user?.avatar as string}\n />\n ) : null\n }\n title={\n <ReactSimpleWysiwyg\n value={html}\n onChange={(value) => setHtml(value)}\n />\n }\n action={\n <Box ml={2}>\n <ButtonDefault\n disabled={!(html && user)}\n onClick={() => {\n if (!subscription)\n return openSubscriptionCommentsStoreAction(true);\n\n callCreateComment({\n data: {\n message: html,\n post_id: postId,\n comment_id: commentId,\n },\n });\n }}\n color=\"primary\"\n isLoading={loading}\n className={classes.button}\n >\n Comentar\n </ButtonDefault>\n </Box>\n }\n />\n </Card>\n </EditorProvider>\n );\n};\n"],"names":["useStore","useCallAction","_jsx"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,SAAS,GAAG,UAAU,CAAC;AAC3B,IAAA,UAAU,EAAE;AACV,QAAA,2BAA2B,EAAE;AAC3B,YAAA,SAAS,EAAE,CAAC;AACZ,YAAA,WAAW,EAAE,CAAC;AACf,SAAA;AACD,QAAA,2BAA2B,EA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AAC,kBAAkB,EAAA,EACjB,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CAAC,KAAK,KAAK,OAAO,CAAC,KAAK,CAAC,GACnC,EAEJ,MAAM,EACJA,GAAA,CAAC,GAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAA,QAAA,EACRA,GAAA,CAAC,aAAa,EAAA,EACZ,QAAQ,EAAE,EAAE,IAAI,IAAI,IAAI,CAAC,EACzB,OAAO,EAAE,MAAK;AACZ,4BAAA,IAAI,CAAC,YAAY;AACf,gCAAA,OAAO,mCAAmC,CAAC,IAAI,CAAC;AAElD,4BAAA,iBAAiB,CAAC;AAChB,gCAAA,IAAI,EAAE;AACJ,oCAAA,OAAO,EAAE,IAAI;AACb,oCAAA,OAAO,EAAE,MAAM;AACf,oCAAA,UAAU,EAAE,SAAS;AACtB,iCAAA;AACF,6BAAA,CAAC;wBACJ,CAAC,EACD,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAA,QAAA,EAAA,UAAA,EAAA,CAGX,EAAA,CACZ,GAER,EAAA,CACG,EAAA,CACQ;AAErB;;;;"}
1
+ {"version":3,"file":"AddReplyComment.js","sources":["../../../../../src/components/comment/components/AddReplyComment.tsx"],"sourcesContent":["\n\nimport React, { useState } from 'react';\nimport { Avatar, Box, Card, CardHeader } from '@mui/material';\nimport { EditorProvider } from 'react-simple-wysiwyg';\nimport { ButtonDefault } from '../../../shared/components/buttons/ButtonDefault';\nimport { makeStyles } from '@mui/styles';\nimport { useComment } from '../comment.hooks';\nimport { ReactSimpleWysiwyg } from '../../../shared/components/react-editor/ReactSimpleWysiwyg';\nimport { useCallAction, useStore } from '@cobuildlab/react-simple-state';\nimport { replyCommentStore } from '../comment.store';\nimport {\n createReplyComment,\n openSubscriptionCommentsStoreAction,\n replyCommentStoreAction,\n} from '../comment.actions';\nimport { useSession } from '../../session/session.hooks';\n\nconst useStyles = makeStyles({\n cardHeader: {\n '& > .MuiCardHeader-action': {\n marginTop: 0,\n marginRight: 0,\n },\n '& > .MuiCardHeader-avatar': {\n outline: '1px solid #eaecf1',\n borderRadius: '50%',\n },\n },\n button: {\n minWidth: 130,\n },\n});\n\nexport const AddReplyComment: React.FC = () => {\n const classes = useStyles();\n const { user, subscription } = useSession();\n const { message, commentId } = useStore(replyCommentStore);\n const [html, setHtml] = useState<string>(message);\n const { callAction, postId } = useComment();\n\n const [callCreateComment, loading] = useCallAction(createReplyComment, {\n onCompleted: () => {\n callAction();\n replyCommentStoreAction('', 0);\n },\n });\n\n console.log({ html });\n\n return (\n <EditorProvider>\n <Card elevation={0}>\n <CardHeader\n sx={{ p: 0 }}\n className={classes.cardHeader}\n avatar={\n user ? (\n <Avatar\n sx={{ width: 40, height: 40 }}\n src={user?.avatar as string}\n />\n ) : null\n }\n title={\n <ReactSimpleWysiwyg\n value={html}\n onChange={(value) => setHtml(value)}\n />\n }\n action={\n <Box ml={2}>\n <ButtonDefault\n disabled={!(html && user)}\n onClick={() => {\n if (!subscription)\n return openSubscriptionCommentsStoreAction(true);\n\n callCreateComment({\n data: {\n message: html,\n post_id: postId,\n comment_id: commentId,\n },\n });\n }}\n color=\"primary\"\n isLoading={loading}\n className={classes.button}\n >\n Comentar\n </ButtonDefault>\n </Box>\n }\n />\n </Card>\n </EditorProvider>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;;;;;;;;AAkBA,MAAM,SAAS,GAAG,UAAU,CAAC;AAC3B,IAAA,UAAU,EAAE;AACV,QAAA,2BAA2B,EAAE;AAC3B,YAAA,SAAS,EAAE,CAAC;AACZ,YAAA,WAAW,EAAE,CAAC;AACf,SAAA;AACD,QAAA,2BAA2B,EAAE;AAC3B,YAAA,OAAO,EAAE,mBAAmB;AAC5B,YAAA,YAAY,EAAE,KAAK;AACpB,SAAA;AACF,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,QAAQ,EAAE,GAAG;AACd,KAAA;AACF,CAAA,CAAC;AAE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A,QAAA,EACRA,GAAA,CAAC,aAAa,EAAA,EACZ,QAAQ,EAAE,EAAE,IAAI,IAAI,IAAI,CAAC,EACzB,OAAO,EAAE,MAAK;AACZ,4BAAA,IAAI,CAAC,YAAY;AACf,gCAAA,OAAO,mCAAmC,CAAC,IAAI,CAAC;AAElD,4BAAA,iBAAiB,CAAC;AAChB,gCAAA,IAAI,EAAE;AACJ,oCAAA,OAAO,EAAE,IAAI;AACb,oCAAA,OAAO,EAAE,MAAM;AACf,oCAAA,UAAU,EAAE,SAAS;AACtB,iCAAA;AACF,6BAAA,CAAC;wBACJ,CAAC,EACD,KAAK,EAAC,SAAS,EACf,SAAS,EAAE,OAAO,EAClB,SAAS,EAAE,OAAO,CAAC,MAAM,EAAA,QAAA,EAAA,UAAA,EAAA,CAGX,EAAA,CACZ,GAER,EAAA,CACG,EAAA,CACQ;AAErB;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Card, CardHeader, Box, CardContent } from '@mui/material';
3
+ import { makeStyles } from '@mui/styles';
3
4
  import { AddReplyComment } from './AddReplyComment.js';
4
5
  import { useSession } from '../../session/session.hooks.js';
5
6
  import { theme } from '../../../shared/mui/theme.js';
6
- import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
7
7
 
8
8
  const useStyles = makeStyles({
9
9
  name: {
@@ -2,14 +2,14 @@ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Grid, Box, Divider } from '@mui/material';
3
3
  import { ReplyComments } from './ReplyComments.js';
4
4
  import { CommentItem } from './CommentItem.js';
5
- import { l as libExports } from '../../../_virtual/index.js';
5
+ import { useStore } from '@cobuildlab/react-simple-state';
6
6
  import { replyCommentStore } from '../comment.store.js';
7
7
  import { AddReplyCommentContainer } from './AddReplyCommentContainer.js';
8
8
  import { replyCommentStoreAction } from '../comment.actions.js';
9
9
  import { PRIMARY_COLOR } from '../../../shared/mui/theme.js';
10
10
 
11
11
  const CommentContainer = ({ comment }) => {
12
- const { commentId } = libExports.useStore(replyCommentStore);
12
+ const { commentId } = useStore(replyCommentStore);
13
13
  const onReply = (r) => {
14
14
  console.log({ r });
15
15
  if (comment.id === commentId) {
@@ -1 +1 @@
1
- {"version":3,"file":"CommentContainer.js","sources":["../../../../../src/components/comment/components/CommentContainer.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { Comment, ReplyComment } from '../../../shared/types/generated';\nimport { Box, Divider, Grid } from '@mui/material';\nimport { ReplyComments } from './ReplyComments';\nimport { CommentItem } from './CommentItem';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { replyCommentStore } from '../comment.store';\nimport { AddReplyCommentContainer } from './AddReplyCommentContainer';\nimport { replyCommentStoreAction } from '../comment.actions';\nimport { PRIMARY_COLOR } from '../../../shared/mui/theme';\n\ntype CommentContainerProps = {\n comment: Comment;\n};\nexport const CommentContainer: React.FC<CommentContainerProps> = ({ comment }) => {\n const { commentId } = useStore(replyCommentStore);\n\n const onReply = (r: Comment | ReplyComment) => {\n console.log({ r });\n if (comment.id === commentId) {\n replyCommentStoreAction('', 0);\n } else {\n replyCommentStoreAction(\n `<b style=\"color:${PRIMARY_COLOR}\">@${r.user?.name}</b>&nbsp;`,\n comment.id as number,\n );\n }\n };\n\n const selectedComment = commentId === comment.id;\n const haveReplyComments = comment.replies?.length;\n\n return (\n <Grid container>\n <Grid size={12} mb={2}>\n <CommentItem comment={comment} onReply={onReply} />\n </Grid>\n {selectedComment || haveReplyComments ? (\n <Grid size={12} mb={2}>\n <Grid container>\n <Grid size={1}>\n <Box display=\"flex\" height=\"100%\" justifyContent=\"center\">\n <Divider orientation=\"vertical\" flexItem />\n </Box>\n </Grid>\n <Grid size={11}>\n <Grid container spacing={2}>\n {haveReplyComments ? (\n <Grid size={12}>\n <ReplyComments\n replyComments={(comment.replies || []) as ReplyComment[]}\n onReply={onReply}\n />\n </Grid>\n ) : null}\n {selectedComment ? (\n <Grid size={12}>\n <AddReplyCommentCont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,EAAA,QAAA,EACXA,IAAC,GAAG,EAAA,EAAC,OAAO,EAAC,MAAM,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,QAAQ,EAAA,QAAA,EACvDA,GAAA,CAAC,OAAO,EAAA,EAAC,WAAW,EAAC,UAAU,EAAC,QAAQ,EAAA,IAAA,EAAA,CAAG,EAAA,CACvC,EAAA,CACD,EACPA,IAAC,IAAI,EAAA,EAAC,IAAI,EAAE,EAAE,YACZD,IAAA,CAAC,IAAI,EAAA,EAAC,SAAS,QAAC,OAAO,EAAE,CAAC,EAAA,QAAA,EAAA,CACvB,iBAAiB,IAChBC,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,EAAE,EAAA,QAAA,EACZA,IAAC,aAAa,EAAA,EACZ,aAAa,GAAG,OAAO,CAAC,OAAO,IAAI,EAAE,CAAmB,EACxD,OAAO,EAAE,OAAO,GAChB,EAAA,CACG,IACL,IAAI,EACP,eAAe,IACdA,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,EAAE,EAAA,QAAA,EACZA,GAAA,CAAC,wBAAwB,KAAG,EAAA,CACvB,IACL,IAAI,CAAA,EAAA,CACH,EAAA,CACF,CAAA,EAAA,CACF,EAAA,CACF,IACL,IAAI,CAAA,EAAA,CACH;AAEX;;;;"}
1
+ {"version":3,"file":"CommentContainer.js","sources":["../../../../../src/components/comment/components/CommentContainer.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { Comment, ReplyComment } from '../../../shared/types/generated';\nimport { Box, Divider, Grid } from '@mui/material';\nimport { ReplyComments } from './ReplyComments';\nimport { CommentItem } from './CommentItem';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { replyCommentStore } from '../comment.store';\nimport { AddReplyCommentContainer } from './AddReplyCommentContainer';\nimport { replyCommentStoreAction } from '../comment.actions';\nimport { PRIMARY_COLOR } from '../../../shared/mui/theme';\n\ntype CommentContainerProps = {\n comment: Comment;\n};\nexport const CommentContainer: React.FC<CommentContainerProps> = ({ comment }) => {\n const { commentId } = useStore(replyCommentStore);\n\n const onReply = (r: Comment | ReplyComment) => {\n console.log({ r });\n if (comment.id === commentId) {\n replyCommentStoreAction('', 0);\n } else {\n replyCommentStoreAction(\n `<b style=\"color:${PRIMARY_COLOR}\">@${r.user?.name}</b>&nbsp;`,\n comment.id as number,\n );\n }\n };\n\n const selectedComment = commentId === comment.id;\n const haveReplyComments = comment.replies?.length;\n\n return (\n <Grid container>\n <Grid size={12} mb={2}>\n <CommentItem comment={comment} onReply={onReply} />\n </Grid>\n {selectedComment || haveReplyComments ? (\n <Grid size={12} mb={2}>\n <Grid container>\n <Grid size={1}>\n <Box display=\"flex\" height=\"100%\" justifyContent=\"center\">\n <Divider orientation=\"vertical\" flexItem />\n </Box>\n </Grid>\n <Grid size={11}>\n <Grid container spacing={2}>\n {haveReplyComments ? (\n <Grid size={12}>\n <ReplyComments\n replyComments={(comment.replies || []) as ReplyComment[]}\n onReply={onReply}\n />\n </Grid>\n ) : null}\n {selectedComment ? (\n <Grid size={12}>\n <AddReplyCommentContainer />\n </Grid>\n ) : null}\n </Grid>\n </Grid>\n </Grid>\n </Grid>\n ) : null}\n </Grid>\n );\n};\n"],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;MAgBa,gBAAgB,GAAoC,CAAC,EAAE,OAAO,EAAE,KAAI;IAC/E,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC,iBAAiB,CAAC;AAEjD,IAAA,MAAM,OAAO,GAAG,CAAC,CAAyB,KAAI;AAC5C,QAAA,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,EAAE,CAAC;AAClB,QAAA,IAAI,OAAO,CAAC,EAAE,KAAK,SAAS,EAAE;AAC5B,YAAA,uBAAuB,CAAC,EAAE,EAAE,CAAC,CAAC;QAChC;aAAO;AACL,YAAA,uBAAuB,CACrB,CAAA,gBAAA,EAAmB,aAAa,CAAA,GAAA,EAAM,CAAC,CAAC,IAAI,EAAE,IAAI,YA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IAAI,EACP,eAAe,IACdA,GAAA,CAAC,IAAI,EAAA,EAAC,IAAI,EAAE,EAAE,EAAA,QAAA,EACZA,GAAA,CAAC,wBAAwB,KAAG,EAAA,CACvB,IACL,IAAI,CAAA,EAAA,CACH,EAAA,CACF,CAAA,EAAA,CACF,EAAA,CACF,IACL,IAAI,CAAA,EAAA,CACH;AAEX;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Card, CardHeader, Box, Typography, Avatar, CardContent } from '@mui/material';
3
+ import { makeStyles } from '@mui/styles';
3
4
  import moment from '../../../_virtual/moment.js';
4
5
  import ReplyIcon from '../../../node_modules/@mui/icons-material/esm/Reply.js';
5
6
  import '../../../_virtual/es.js';
6
- import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
7
7
 
8
8
  moment.locale('es');
9
9
  const useStyles = makeStyles({
@@ -1,13 +1,13 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { DialogDefault } from '../../../shared/components/dialog/DialogDefault.js';
3
- import { l as libExports } from '../../../_virtual/index.js';
3
+ import { useStore } from '@cobuildlab/react-simple-state';
4
4
  import { openSubscriptionCommentsStore } from '../comment.store.js';
5
5
  import { openSubscriptionCommentsStoreAction } from '../comment.actions.js';
6
6
  import { Box, Typography } from '@mui/material';
7
7
  import { URL_PORTAL } from '../../../shared/constants/index.js';
8
8
 
9
9
  const CommentSubscriptionDialog = () => {
10
- const { open } = libExports.useStore(openSubscriptionCommentsStore);
10
+ const { open } = useStore(openSubscriptionCommentsStore);
11
11
  return (jsx(DialogDefault, { isOpen: open, showActions: true, handleClose: () => openSubscriptionCommentsStoreAction(false), successText: "SUSCRIBIRTE", handleSuccess: () => (window.location.href = `${URL_PORTAL}/planes`), children: jsx(Box, { px: 2, textAlign: "center", children: jsx(Typography, { fontSize: 20, fontWeight: 700, children: "Debes tener una suscripci\u00F3n activa para poder realizar un comentario" }) }) }));
12
12
  };
13
13
 
@@ -1 +1 @@
1
- {"version":3,"file":"CommentSubscriptionDialog.js","sources":["../../../../../src/components/comment/components/CommentSubscriptionDialog.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { DialogDefault } from '../../../shared/components/dialog/DialogDefault';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { openSubscriptionCommentsStore } from '../comment.store';\nimport { openSubscriptionCommentsStoreAction } from '../comment.actions';\nimport { Typography, Box } from '@mui/material';\nimport {URL_PORTAL} from \"../../../shared/constants\";\n\nexport const CommentSubscriptionDialog: React.FC = () => {\n const { open } = useStore(openSubscriptionCommentsStore);\n return (\n <DialogDefault\n isOpen={open}\n showActions\n handleClose={() => openSubscriptionCommentsStoreAction(false)}\n successText=\"SUSCRIBIRTE\"\n handleSuccess={() =>\n (window.location.href = `${URL_PORTAL}/planes`)\n }\n >\n <Box px={2} textAlign=\"center\">\n <Typography fontSize={20} fontWeight={700}>\n Debes tener una suscripción activa para poder realizar un comentario\n </Typography>\n </Box>\n </DialogDefault>\n );\n};\n"],"names":["useStore","_jsx"],"mappings":";;;;;;;;AAUO,MAAM,yBAAyB,GAAa,MAAK;IACtD,MAAM,EAAE,IAAI,EAAE,GAAGA,mBAAQ,CAAC,6BAA6B,CAAC;AACxD,IAAA,QACEC,GAAA,CAAC,aAAa,EAAA,EACZ,MAAM,EAAE,IAAI,EACZ,WAAW,EAAA,IAAA,EACX,WAAW,EAAE,MAAM,mCAAmC,CAAC,KAAK,CAAC,EAC7D,WAAW,EAAC,aAAa,EACzB,aAAa,EAAE,OACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAA,EAAG,UAAU,CAAA,OAAA,CAAS,CAAC,EAAA,QAAA,EAGjDA,GAAA,CAAC,GAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,QAAQ,EAAA,QAAA,EAC5BA,GAAA,CAAC,UAAU,EAAA,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAA,QAAA,EAAA,2EAAA,EAAA,CAE5B,EAAA,CACT,EAAA,CACQ;AAEpB;;;;"}
1
+ {"version":3,"file":"CommentSubscriptionDialog.js","sources":["../../../../../src/components/comment/components/CommentSubscriptionDialog.tsx"],"sourcesContent":["\n\nimport React from 'react';\nimport { DialogDefault } from '../../../shared/components/dialog/DialogDefault';\nimport { useStore } from '@cobuildlab/react-simple-state';\nimport { openSubscriptionCommentsStore } from '../comment.store';\nimport { openSubscriptionCommentsStoreAction } from '../comment.actions';\nimport { Typography, Box } from '@mui/material';\nimport {URL_PORTAL} from \"../../../shared/constants\";\n\nexport const CommentSubscriptionDialog: React.FC = () => {\n const { open } = useStore(openSubscriptionCommentsStore);\n return (\n <DialogDefault\n isOpen={open}\n showActions\n handleClose={() => openSubscriptionCommentsStoreAction(false)}\n successText=\"SUSCRIBIRTE\"\n handleSuccess={() =>\n (window.location.href = `${URL_PORTAL}/planes`)\n }\n >\n <Box px={2} textAlign=\"center\">\n <Typography fontSize={20} fontWeight={700}>\n Debes tener una suscripción activa para poder realizar un comentario\n </Typography>\n </Box>\n </DialogDefault>\n );\n};\n"],"names":["_jsx"],"mappings":";;;;;;;;AAUO,MAAM,yBAAyB,GAAa,MAAK;IACtD,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC,6BAA6B,CAAC;AACxD,IAAA,QACEA,GAAA,CAAC,aAAa,EAAA,EACZ,MAAM,EAAE,IAAI,EACZ,WAAW,EAAA,IAAA,EACX,WAAW,EAAE,MAAM,mCAAmC,CAAC,KAAK,CAAC,EAC7D,WAAW,EAAC,aAAa,EACzB,aAAa,EAAE,OACZ,MAAM,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAA,EAAG,UAAU,CAAA,OAAA,CAAS,CAAC,EAAA,QAAA,EAGjDA,GAAA,CAAC,GAAG,EAAA,EAAC,EAAE,EAAE,CAAC,EAAE,SAAS,EAAC,QAAQ,EAAA,QAAA,EAC5BA,GAAA,CAAC,UAAU,EAAA,EAAC,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,GAAG,EAAA,QAAA,EAAA,2EAAA,EAAA,CAE5B,EAAA,CACT,EAAA,CACQ;AAEpB;;;;"}
@@ -1,9 +1,9 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Grid, Paper, Box } from '@mui/material';
3
- import { l as libExports } from '../../../_virtual/index.js';
3
+ import { useStore } from '@cobuildlab/react-simple-state';
4
4
  import { fetchCommentsStore } from '../comment.store.js';
5
+ import { makeStyles } from '@mui/styles';
5
6
  import { useComment } from '../comment.hooks.js';
6
- import makeStyles from '../../../node_modules/@mui/styles/makeStyles/makeStyles.js';
7
7
 
8
8
  const useStyles = makeStyles({
9
9
  root: {
@@ -11,7 +11,7 @@ const useStyles = makeStyles({
11
11
  },
12
12
  });
13
13
  const ShowMoreComments = () => {
14
- const { comments, count } = libExports.useStore(fetchCommentsStore);
14
+ const { comments, count } = useStore(fetchCommentsStore);
15
15
  const classes = useStyles();
16
16
  const { loading, loadMoreComments } = useComment();
17
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":["useStore","_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,GAAGA,mBAAQ,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,IAC5BC,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
+ {"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,11 +1,11 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Drawer, Box } from '@mui/material';
3
- import { l as libExports } from '../../_virtual/index.js';
3
+ import { useStore } from '@cobuildlab/react-simple-state';
4
4
  import { panelStore } from './panel.store.js';
5
5
  import { handlePanelClick } from './panel.actions.js';
6
6
 
7
7
  const Panel = ({ children, footer, size = 300, ...rest }) => {
8
- const { isOpen } = libExports.useStore(panelStore);
8
+ const { isOpen } = useStore(panelStore);
9
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 })] }) }));
10
10
  };
11
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":["useStore","_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,GAAGA,mBAAQ,CAAC,UAAU,CAAC;AAEvC,IAAA,QACEC,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
+ {"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,13 +1,13 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
2
  import { Button } from '@mui/material';
3
3
  import { handlePanelClick } from './panel.actions.js';
4
- import { l as libExports } from '../../_virtual/index.js';
4
+ import { useStore } from '@cobuildlab/react-simple-state';
5
5
  import { panelStore } from './panel.store.js';
6
6
  import { useSession } from '../session/session.hooks.js';
7
7
  import { URL_PORTAL } from '../../shared/constants/index.js';
8
8
 
9
9
  const PanelButton = ({ loginButtonText = 'CUENTA', registerButtonText = 'INGRESAR', registerButtonProps, loginButtonProps, params = {}, }) => {
10
- const { isOpen } = libExports.useStore(panelStore);
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":["useStore","_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,GAAGA,mBAAQ,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,QACEC,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
+ {"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,9 +1,9 @@
1
- import { l as libExports } from '../../_virtual/index.js';
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 = libExports.createStoreAction(panelStore, (prev, data) => ({
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":["createStoreAction"],"mappings":";;;;;AAOO,MAAM,gBAAgB,GAAGA,4BAAiB,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
+ {"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,6 +1,6 @@
1
- import { l as libExports } from '../../_virtual/index.js';
1
+ import { createStore } from '@cobuildlab/react-simple-state';
2
2
 
3
- const panelStore = libExports.createStore({
3
+ const panelStore = createStore({
4
4
  initialValue: {
5
5
  isOpen: false,
6
6
  },
@@ -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":["createStore"],"mappings":";;AAEO,MAAM,UAAU,GAAGA,sBAAW,CAAC;AAClC,IAAA,YAAY,EAAE;AACV,QAAA,MAAM,EAAE,KAAK;AAChB,KAAA;AACJ,CAAA;;;;"}
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,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { GoogleOAuthProvider } from '../../node_modules/@react-oauth/google/dist/index.esm.js';
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 '../../node_modules/@react-oauth/google/dist/index.esm.js';
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 { l as libExports } from '../../_virtual/index.js';
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 } = libExports.useEvent(tokenEvent);
18
+ const { token } = useEvent(tokenEvent);
19
19
  const [savedPosts, setSavedPosts] = useState([]);
20
- const [callGoogleOneTap] = libExports.useCallAction(googleOneTapAction, {
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] = libExports.useCallAction(currentUserAction, {
40
+ const [callCurrentUserAction, loading] = useCallAction(currentUserAction, {
41
41
  onCompleted: (data) => {
42
42
  setUser(data.currentUser);
43
43
  setSavedPosts(data.currentUser?.post_saved);