@openpeepshq/rn-components 0.3.0 → 0.3.2
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/lib/commonjs/components/custom/common/participant-avatar.js +3 -6
- package/lib/commonjs/components/custom/common/participant-avatar.js.map +1 -1
- package/lib/commonjs/components/custom/common/profile-pieces.js +2 -1
- package/lib/commonjs/components/custom/common/profile-pieces.js.map +1 -1
- package/lib/commonjs/components/custom/conversations/conversation-preview-card.js +2 -1
- package/lib/commonjs/components/custom/conversations/conversation-preview-card.js.map +1 -1
- package/lib/commonjs/components/custom/groups/GroupAvatar.js +2 -1
- package/lib/commonjs/components/custom/groups/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/custom/groups/group-card.js +1 -1
- package/lib/commonjs/components/custom/groups/group-card.js.map +1 -1
- package/lib/commonjs/components/custom/groups/group-header.js +3 -1
- package/lib/commonjs/components/custom/groups/group-header.js.map +1 -1
- package/lib/commonjs/components/custom/groups/group-member-card.js +43 -44
- package/lib/commonjs/components/custom/groups/group-member-card.js.map +1 -1
- package/lib/commonjs/components/custom/groups/group-page-actions.js +9 -6
- package/lib/commonjs/components/custom/groups/group-page-actions.js.map +1 -1
- package/lib/commonjs/components/custom/headers/tab-screens-header.js +3 -2
- package/lib/commonjs/components/custom/headers/tab-screens-header.js.map +1 -1
- package/lib/commonjs/components/custom/jam/jam-actions-footer.js +9 -2
- package/lib/commonjs/components/custom/jam/jam-actions-footer.js.map +1 -1
- package/lib/commonjs/components/custom/jam/pieces/guest-data-form.js +8 -6
- package/lib/commonjs/components/custom/jam/pieces/guest-data-form.js.map +1 -1
- package/lib/commonjs/components/custom/jam/pieces/participant-view.js +3 -6
- package/lib/commonjs/components/custom/jam/pieces/participant-view.js.map +1 -1
- package/lib/commonjs/components/custom/markdown/OpenPeepsMarkdown.js +2 -1
- package/lib/commonjs/components/custom/markdown/OpenPeepsMarkdown.js.map +1 -1
- package/lib/commonjs/components/custom/markdown/extensions/mention.js +7 -4
- package/lib/commonjs/components/custom/markdown/extensions/mention.js.map +1 -1
- package/lib/commonjs/components/custom/modals/groups/group-selection-sheet.js +2 -1
- package/lib/commonjs/components/custom/modals/groups/group-selection-sheet.js.map +1 -1
- package/lib/commonjs/components/custom/modals/post/date-sheet.js +12 -5
- package/lib/commonjs/components/custom/modals/post/date-sheet.js.map +1 -1
- package/lib/commonjs/components/custom/navigation/side-menu.js +2 -1
- package/lib/commonjs/components/custom/navigation/side-menu.js.map +1 -1
- package/lib/commonjs/components/custom/notification/types/new-profile.js +1 -1
- package/lib/commonjs/components/custom/notification/types/new-profile.js.map +1 -1
- package/lib/commonjs/components/custom/post/pieces/PollContent.js +55 -47
- package/lib/commonjs/components/custom/post/pieces/PollContent.js.map +1 -1
- package/lib/commonjs/components/custom/post/post-form/EventForm.js +169 -23
- package/lib/commonjs/components/custom/post/post-form/EventForm.js.map +1 -1
- package/lib/commonjs/components/custom/post/post-form/PollForm.js +2 -0
- package/lib/commonjs/components/custom/post/post-form/PollForm.js.map +1 -1
- package/lib/commonjs/components/custom/post/types/event/CardEvent.js +19 -7
- package/lib/commonjs/components/custom/post/types/event/CardEvent.js.map +1 -1
- package/lib/commonjs/components/custom/post/types/event/FeedEvent.js +12 -2
- package/lib/commonjs/components/custom/post/types/event/FeedEvent.js.map +1 -1
- package/lib/commonjs/components/custom/post/types/event/FullEvent.js +99 -27
- package/lib/commonjs/components/custom/post/types/event/FullEvent.js.map +1 -1
- package/lib/commonjs/components/custom/profile/edit-profile-form.js +4 -2
- package/lib/commonjs/components/custom/profile/edit-profile-form.js.map +1 -1
- package/lib/commonjs/components/navigation/auth-wrapper.js +2 -2
- package/lib/commonjs/components/navigation/auth-wrapper.js.map +1 -1
- package/lib/commonjs/components/navigation/index.js +1 -1
- package/lib/commonjs/components/navigation/index.js.map +1 -1
- package/lib/commonjs/components/navigation/main-navigator.js +16 -5
- package/lib/commonjs/components/navigation/main-navigator.js.map +1 -1
- package/lib/commonjs/components/navigation/side-menu-drawer.js +1 -3
- package/lib/commonjs/components/navigation/side-menu-drawer.js.map +1 -1
- package/lib/commonjs/components/navigation/side-menu-wrapper.js +2 -4
- package/lib/commonjs/components/navigation/side-menu-wrapper.js.map +1 -1
- package/lib/commonjs/components/navigation/tab-navigator.js +3 -2
- package/lib/commonjs/components/navigation/tab-navigator.js.map +1 -1
- package/lib/commonjs/components/navigation/types/main.js.map +1 -1
- package/lib/commonjs/components/ui/button.js +1 -1
- package/lib/commonjs/components/ui/button.js.map +1 -1
- package/lib/commonjs/lib/push-notifications.js +38 -5
- package/lib/commonjs/lib/push-notifications.js.map +1 -1
- package/lib/commonjs/screens/(main)/event/edit/index.js +12 -3
- package/lib/commonjs/screens/(main)/event/edit/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/event/new/index.js +1 -0
- package/lib/commonjs/screens/(main)/event/new/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/groups/group/info/index.js +3 -6
- package/lib/commonjs/screens/(main)/groups/group/info/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/groups/group/members/index.js +21 -63
- package/lib/commonjs/screens/(main)/groups/group/members/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/jams/jam-session/in-jam-chat/index.js +23 -3
- package/lib/commonjs/screens/(main)/jams/jam-session/in-jam-chat/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/jams/jam-session/index.js +28 -6
- package/lib/commonjs/screens/(main)/jams/jam-session/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/jams/jam-session/jam-details/index.js +3 -6
- package/lib/commonjs/screens/(main)/jams/jam-session/jam-details/index.js.map +1 -1
- package/lib/commonjs/screens/(main)/post/index.js +10 -5
- package/lib/commonjs/screens/(main)/post/index.js.map +1 -1
- package/lib/module/components/custom/common/participant-avatar.js +3 -6
- package/lib/module/components/custom/common/participant-avatar.js.map +1 -1
- package/lib/module/components/custom/common/profile-pieces.js +2 -1
- package/lib/module/components/custom/common/profile-pieces.js.map +1 -1
- package/lib/module/components/custom/conversations/conversation-preview-card.js +2 -1
- package/lib/module/components/custom/conversations/conversation-preview-card.js.map +1 -1
- package/lib/module/components/custom/groups/GroupAvatar.js +2 -1
- package/lib/module/components/custom/groups/GroupAvatar.js.map +1 -1
- package/lib/module/components/custom/groups/group-card.js +2 -2
- package/lib/module/components/custom/groups/group-card.js.map +1 -1
- package/lib/module/components/custom/groups/group-header.js +3 -1
- package/lib/module/components/custom/groups/group-header.js.map +1 -1
- package/lib/module/components/custom/groups/group-member-card.js +45 -46
- package/lib/module/components/custom/groups/group-member-card.js.map +1 -1
- package/lib/module/components/custom/groups/group-page-actions.js +9 -6
- package/lib/module/components/custom/groups/group-page-actions.js.map +1 -1
- package/lib/module/components/custom/headers/tab-screens-header.js +3 -2
- package/lib/module/components/custom/headers/tab-screens-header.js.map +1 -1
- package/lib/module/components/custom/jam/jam-actions-footer.js +9 -2
- package/lib/module/components/custom/jam/jam-actions-footer.js.map +1 -1
- package/lib/module/components/custom/jam/pieces/guest-data-form.js +7 -5
- package/lib/module/components/custom/jam/pieces/guest-data-form.js.map +1 -1
- package/lib/module/components/custom/jam/pieces/participant-view.js +3 -6
- package/lib/module/components/custom/jam/pieces/participant-view.js.map +1 -1
- package/lib/module/components/custom/markdown/OpenPeepsMarkdown.js +2 -1
- package/lib/module/components/custom/markdown/OpenPeepsMarkdown.js.map +1 -1
- package/lib/module/components/custom/markdown/extensions/mention.js +7 -4
- package/lib/module/components/custom/markdown/extensions/mention.js.map +1 -1
- package/lib/module/components/custom/modals/groups/group-selection-sheet.js +2 -1
- package/lib/module/components/custom/modals/groups/group-selection-sheet.js.map +1 -1
- package/lib/module/components/custom/modals/post/date-sheet.js +12 -5
- package/lib/module/components/custom/modals/post/date-sheet.js.map +1 -1
- package/lib/module/components/custom/navigation/side-menu.js +2 -1
- package/lib/module/components/custom/navigation/side-menu.js.map +1 -1
- package/lib/module/components/custom/notification/types/new-profile.js +1 -1
- package/lib/module/components/custom/notification/types/new-profile.js.map +1 -1
- package/lib/module/components/custom/post/pieces/PollContent.js +55 -47
- package/lib/module/components/custom/post/pieces/PollContent.js.map +1 -1
- package/lib/module/components/custom/post/post-form/EventForm.js +170 -24
- package/lib/module/components/custom/post/post-form/EventForm.js.map +1 -1
- package/lib/module/components/custom/post/post-form/PollForm.js +2 -0
- package/lib/module/components/custom/post/post-form/PollForm.js.map +1 -1
- package/lib/module/components/custom/post/types/event/CardEvent.js +19 -7
- package/lib/module/components/custom/post/types/event/CardEvent.js.map +1 -1
- package/lib/module/components/custom/post/types/event/FeedEvent.js +12 -2
- package/lib/module/components/custom/post/types/event/FeedEvent.js.map +1 -1
- package/lib/module/components/custom/post/types/event/FullEvent.js +99 -27
- package/lib/module/components/custom/post/types/event/FullEvent.js.map +1 -1
- package/lib/module/components/custom/profile/edit-profile-form.js +4 -2
- package/lib/module/components/custom/profile/edit-profile-form.js.map +1 -1
- package/lib/module/components/navigation/auth-wrapper.js +2 -2
- package/lib/module/components/navigation/auth-wrapper.js.map +1 -1
- package/lib/module/components/navigation/index.js +1 -1
- package/lib/module/components/navigation/index.js.map +1 -1
- package/lib/module/components/navigation/main-navigator.js +16 -5
- package/lib/module/components/navigation/main-navigator.js.map +1 -1
- package/lib/module/components/navigation/side-menu-drawer.js +2 -4
- package/lib/module/components/navigation/side-menu-drawer.js.map +1 -1
- package/lib/module/components/navigation/side-menu-wrapper.js +3 -5
- package/lib/module/components/navigation/side-menu-wrapper.js.map +1 -1
- package/lib/module/components/navigation/tab-navigator.js +3 -2
- package/lib/module/components/navigation/tab-navigator.js.map +1 -1
- package/lib/module/components/navigation/types/main.js.map +1 -1
- package/lib/module/components/ui/button.js +1 -1
- package/lib/module/components/ui/button.js.map +1 -1
- package/lib/module/lib/push-notifications.js +36 -4
- package/lib/module/lib/push-notifications.js.map +1 -1
- package/lib/module/screens/(main)/event/edit/index.js +13 -4
- package/lib/module/screens/(main)/event/edit/index.js.map +1 -1
- package/lib/module/screens/(main)/event/new/index.js +1 -0
- package/lib/module/screens/(main)/event/new/index.js.map +1 -1
- package/lib/module/screens/(main)/groups/group/info/index.js +3 -6
- package/lib/module/screens/(main)/groups/group/info/index.js.map +1 -1
- package/lib/module/screens/(main)/groups/group/members/index.js +22 -64
- package/lib/module/screens/(main)/groups/group/members/index.js.map +1 -1
- package/lib/module/screens/(main)/jams/jam-session/in-jam-chat/index.js +24 -4
- package/lib/module/screens/(main)/jams/jam-session/in-jam-chat/index.js.map +1 -1
- package/lib/module/screens/(main)/jams/jam-session/index.js +29 -7
- package/lib/module/screens/(main)/jams/jam-session/index.js.map +1 -1
- package/lib/module/screens/(main)/jams/jam-session/jam-details/index.js +3 -6
- package/lib/module/screens/(main)/jams/jam-session/jam-details/index.js.map +1 -1
- package/lib/module/screens/(main)/post/index.js +10 -5
- package/lib/module/screens/(main)/post/index.js.map +1 -1
- package/lib/typescript/commonjs/components/custom/common/participant-avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/common/profile-pieces.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/conversations/conversation-preview-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/groups/GroupAvatar.d.ts +1 -1
- package/lib/typescript/commonjs/components/custom/groups/GroupAvatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/groups/group-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/groups/group-header.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/groups/group-member-card.d.ts +5 -5
- package/lib/typescript/commonjs/components/custom/groups/group-member-card.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/groups/group-page-actions.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/headers/tab-screens-header.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/jam/jam-actions-footer.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/jam/pieces/guest-data-form.d.ts +1 -1
- package/lib/typescript/commonjs/components/custom/jam/pieces/guest-data-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/jam/pieces/participant-view.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/markdown/OpenPeepsMarkdown.d.ts +2 -2
- package/lib/typescript/commonjs/components/custom/markdown/OpenPeepsMarkdown.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/markdown/extensions/mention.d.ts +3 -3
- package/lib/typescript/commonjs/components/custom/markdown/extensions/mention.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/modals/groups/group-selection-sheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/modals/post/date-sheet.d.ts +1 -0
- package/lib/typescript/commonjs/components/custom/modals/post/date-sheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/navigation/side-menu.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/post/pieces/PollContent.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/post/post-form/EventForm.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/post/post-form/PollForm.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/post/types/event/CardEvent.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/post/types/event/FeedEvent.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/post/types/event/FullEvent.d.ts +2 -0
- package/lib/typescript/commonjs/components/custom/post/types/event/FullEvent.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/custom/profile/edit-profile-form.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/auth-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/main-navigator.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/side-menu-drawer.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/side-menu-wrapper.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/tab-navigator.d.ts.map +1 -1
- package/lib/typescript/commonjs/components/navigation/types/main.d.ts +4 -0
- package/lib/typescript/commonjs/components/navigation/types/main.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/push-notifications.d.ts +2 -1
- package/lib/typescript/commonjs/lib/push-notifications.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/event/edit/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/event/new/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/groups/group/info/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/groups/group/members/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/jams/jam-session/in-jam-chat/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/jams/jam-session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/screens/(main)/post/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/types.d.ts +4 -3
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/common/participant-avatar.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/common/profile-pieces.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/conversations/conversation-preview-card.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/groups/GroupAvatar.d.ts +1 -1
- package/lib/typescript/module/components/custom/groups/GroupAvatar.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/groups/group-card.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/groups/group-header.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/groups/group-member-card.d.ts +5 -5
- package/lib/typescript/module/components/custom/groups/group-member-card.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/groups/group-page-actions.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/headers/tab-screens-header.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/jam/jam-actions-footer.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/jam/pieces/guest-data-form.d.ts +1 -1
- package/lib/typescript/module/components/custom/jam/pieces/guest-data-form.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/jam/pieces/participant-view.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/markdown/OpenPeepsMarkdown.d.ts +2 -2
- package/lib/typescript/module/components/custom/markdown/OpenPeepsMarkdown.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/markdown/extensions/mention.d.ts +3 -3
- package/lib/typescript/module/components/custom/markdown/extensions/mention.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/modals/groups/group-selection-sheet.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/modals/post/date-sheet.d.ts +1 -0
- package/lib/typescript/module/components/custom/modals/post/date-sheet.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/navigation/side-menu.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/post/pieces/PollContent.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/post/post-form/EventForm.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/post/post-form/PollForm.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/post/types/event/CardEvent.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/post/types/event/FeedEvent.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/post/types/event/FullEvent.d.ts +2 -0
- package/lib/typescript/module/components/custom/post/types/event/FullEvent.d.ts.map +1 -1
- package/lib/typescript/module/components/custom/profile/edit-profile-form.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/auth-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/index.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/main-navigator.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/side-menu-drawer.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/side-menu-wrapper.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/tab-navigator.d.ts.map +1 -1
- package/lib/typescript/module/components/navigation/types/main.d.ts +4 -0
- package/lib/typescript/module/components/navigation/types/main.d.ts.map +1 -1
- package/lib/typescript/module/lib/push-notifications.d.ts +2 -1
- package/lib/typescript/module/lib/push-notifications.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/event/edit/index.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/event/new/index.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/groups/group/info/index.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/groups/group/members/index.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/jams/jam-session/in-jam-chat/index.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/jams/jam-session/index.d.ts.map +1 -1
- package/lib/typescript/module/screens/(main)/post/index.d.ts.map +1 -1
- package/lib/typescript/module/types.d.ts +4 -3
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/src/components/custom/common/participant-avatar.tsx +8 -13
- package/src/components/custom/common/profile-pieces.tsx +4 -2
- package/src/components/custom/conversations/conversation-preview-card.tsx +2 -2
- package/src/components/custom/groups/GroupAvatar.tsx +4 -2
- package/src/components/custom/groups/group-card.tsx +2 -1
- package/src/components/custom/groups/group-header.tsx +5 -1
- package/src/components/custom/groups/group-member-card.tsx +67 -66
- package/src/components/custom/groups/group-page-actions.tsx +41 -25
- package/src/components/custom/headers/tab-screens-header.tsx +3 -2
- package/src/components/custom/jam/jam-actions-footer.tsx +14 -5
- package/src/components/custom/jam/pieces/guest-data-form.tsx +9 -6
- package/src/components/custom/jam/pieces/participant-view.tsx +8 -10
- package/src/components/custom/markdown/OpenPeepsMarkdown.tsx +8 -4
- package/src/components/custom/markdown/extensions/mention.tsx +40 -30
- package/src/components/custom/modals/groups/group-selection-sheet.tsx +4 -3
- package/src/components/custom/modals/post/date-sheet.tsx +27 -10
- package/src/components/custom/navigation/side-menu.tsx +2 -3
- package/src/components/custom/notification/types/new-profile.tsx +1 -1
- package/src/components/custom/post/pieces/PollContent.tsx +80 -71
- package/src/components/custom/post/post-form/EventForm.tsx +279 -39
- package/src/components/custom/post/post-form/PollForm.tsx +2 -1
- package/src/components/custom/post/types/event/CardEvent.tsx +31 -11
- package/src/components/custom/post/types/event/FeedEvent.tsx +14 -2
- package/src/components/custom/post/types/event/FullEvent.tsx +208 -86
- package/src/components/custom/profile/edit-profile-form.tsx +6 -2
- package/src/components/navigation/auth-wrapper.tsx +2 -7
- package/src/components/navigation/index.tsx +1 -3
- package/src/components/navigation/main-navigator.tsx +22 -9
- package/src/components/navigation/side-menu-drawer.tsx +4 -7
- package/src/components/navigation/side-menu-wrapper.tsx +5 -10
- package/src/components/navigation/tab-navigator.tsx +6 -2
- package/src/components/navigation/types/main.ts +4 -0
- package/src/components/ui/button.tsx +1 -1
- package/src/lib/push-notifications.ts +68 -22
- package/src/screens/(main)/event/edit/index.tsx +22 -9
- package/src/screens/(main)/event/new/index.tsx +1 -0
- package/src/screens/(main)/groups/group/info/index.tsx +9 -9
- package/src/screens/(main)/groups/group/members/index.tsx +69 -106
- package/src/screens/(main)/jams/jam-session/in-jam-chat/index.tsx +32 -4
- package/src/screens/(main)/jams/jam-session/index.tsx +34 -10
- package/src/screens/(main)/jams/jam-session/jam-details/index.tsx +11 -14
- package/src/screens/(main)/post/index.tsx +16 -5
|
@@ -12,8 +12,15 @@ import {
|
|
|
12
12
|
MediaAttachment,
|
|
13
13
|
PostCreationData,
|
|
14
14
|
PublicProfile,
|
|
15
|
+
RecurrenceFreq,
|
|
16
|
+
RecurrenceWeekday,
|
|
15
17
|
} from '@openpeepshq/common';
|
|
16
|
-
import {
|
|
18
|
+
import {
|
|
19
|
+
parseEventMaxAttendeesInput,
|
|
20
|
+
previewUpcomingOccurrences,
|
|
21
|
+
reinterpretIsoInTimeZone,
|
|
22
|
+
weekdayFromDate,
|
|
23
|
+
} from '@openpeepshq/common/lib';
|
|
17
24
|
import { UseFormReturn } from 'react-hook-form';
|
|
18
25
|
import { useEffect, useState } from 'react';
|
|
19
26
|
import { VisibilityInput } from './VisibilityInput';
|
|
@@ -96,17 +103,31 @@ export const EventForm = ({
|
|
|
96
103
|
control: form.control,
|
|
97
104
|
name: 'data.timeZone',
|
|
98
105
|
});
|
|
106
|
+
const recurrence = useWatch({
|
|
107
|
+
control: form.control,
|
|
108
|
+
name: 'data.recurrence',
|
|
109
|
+
});
|
|
110
|
+
const eventData = useWatch({
|
|
111
|
+
control: form.control,
|
|
112
|
+
name: 'data',
|
|
113
|
+
});
|
|
99
114
|
|
|
100
|
-
const handleHeaderImageSelect = useCallback(
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
115
|
+
const handleHeaderImageSelect = useCallback(
|
|
116
|
+
(image: MediaAttachment[]) => {
|
|
117
|
+
setHeaderImage(image[0].previewUrl || image[0].url);
|
|
118
|
+
form.setValue('data.image', image[0].previewUrl || image[0].url);
|
|
119
|
+
setIsBackgroundChanged(true);
|
|
120
|
+
},
|
|
121
|
+
[form]
|
|
122
|
+
);
|
|
105
123
|
|
|
106
124
|
const maybeSwitchEventFormat = (value: string) => {
|
|
107
125
|
if (eventFormat === value) {
|
|
108
126
|
return;
|
|
109
127
|
}
|
|
128
|
+
if (value === 'jam' && !serverInfo?.jams.livekit.enabled) {
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
110
131
|
setEventFormat(value);
|
|
111
132
|
if (eventFormat === 'jam') {
|
|
112
133
|
form.setValue('data.jam.type', 'video-call');
|
|
@@ -128,21 +149,25 @@ export const EventForm = ({
|
|
|
128
149
|
};
|
|
129
150
|
|
|
130
151
|
useEffect(() => {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
152
|
+
const jamOption = {
|
|
153
|
+
value: 'jam',
|
|
154
|
+
label: t('events.form.jamFormatLabel'),
|
|
155
|
+
};
|
|
156
|
+
const otherOptions = [
|
|
157
|
+
{ value: 'external', label: t('events.form.externalFormatLabel') },
|
|
158
|
+
{ value: 'in-person', label: t('events.form.inPersonFormatLabel') },
|
|
159
|
+
];
|
|
160
|
+
if (
|
|
161
|
+
serverInfo?.jams.livekit.enabled ||
|
|
162
|
+
(isEdit && form.getValues('data.jam'))
|
|
163
|
+
) {
|
|
164
|
+
setEventFormats([jamOption, ...otherOptions]);
|
|
137
165
|
} else {
|
|
138
|
-
setEventFormats(
|
|
139
|
-
{ value: 'external', label: t('events.form.externalFormatLabel') },
|
|
140
|
-
{ value: 'in-person', label: t('events.form.inPersonFormatLabel') },
|
|
141
|
-
]);
|
|
166
|
+
setEventFormats(otherOptions);
|
|
142
167
|
}
|
|
143
168
|
form.setValue(
|
|
144
169
|
'data.jam.moderators',
|
|
145
|
-
moderators.map(m => m.id)
|
|
170
|
+
moderators.map((m) => m.id)
|
|
146
171
|
);
|
|
147
172
|
if (form.getValues('data.end')) {
|
|
148
173
|
setShowEndDate(true);
|
|
@@ -150,12 +175,15 @@ export const EventForm = ({
|
|
|
150
175
|
|
|
151
176
|
if (form.getValues('data.physicalLocation')) {
|
|
152
177
|
setEventFormat('in-person');
|
|
153
|
-
} else if (
|
|
178
|
+
} else if (
|
|
179
|
+
form.getValues('data.jam') &&
|
|
180
|
+
(serverInfo?.jams.livekit.enabled || isEdit)
|
|
181
|
+
) {
|
|
154
182
|
setEventFormat('jam');
|
|
155
183
|
} else if (form.getValues('data.url')) {
|
|
156
184
|
setEventFormat('external');
|
|
157
185
|
}
|
|
158
|
-
}, [moderators, form, serverInfo, t]);
|
|
186
|
+
}, [moderators, form, serverInfo, t, isEdit]);
|
|
159
187
|
|
|
160
188
|
return (
|
|
161
189
|
<Form {...form}>
|
|
@@ -168,7 +196,8 @@ export const EventForm = ({
|
|
|
168
196
|
onPress={() => {
|
|
169
197
|
handleHeaderModalPress();
|
|
170
198
|
setIsBackgroundChanged(false);
|
|
171
|
-
}}
|
|
199
|
+
}}
|
|
200
|
+
>
|
|
172
201
|
<CameraIcon className="text-foreground" />
|
|
173
202
|
</Pressable>
|
|
174
203
|
<Pressable
|
|
@@ -176,7 +205,8 @@ export const EventForm = ({
|
|
|
176
205
|
setHeaderImage('');
|
|
177
206
|
setIsBackgroundChanged(false);
|
|
178
207
|
}}
|
|
179
|
-
className="bg-black/40 p-2 rounded-full"
|
|
208
|
+
className="bg-black/40 p-2 rounded-full"
|
|
209
|
+
>
|
|
180
210
|
<XIcon className="text-foreground" />
|
|
181
211
|
</Pressable>
|
|
182
212
|
</View>
|
|
@@ -187,7 +217,8 @@ export const EventForm = ({
|
|
|
187
217
|
onPress={() => {
|
|
188
218
|
handleHeaderModalPress();
|
|
189
219
|
setIsBackgroundChanged(false);
|
|
190
|
-
}}
|
|
220
|
+
}}
|
|
221
|
+
>
|
|
191
222
|
<CameraIcon className="text-foreground" />
|
|
192
223
|
</Pressable>
|
|
193
224
|
</View>
|
|
@@ -233,7 +264,8 @@ export const EventForm = ({
|
|
|
233
264
|
<ThemedText className="">Description</ThemedText>
|
|
234
265
|
<Pressable
|
|
235
266
|
onPress={handleDescriptionModalPress}
|
|
236
|
-
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md p-2"
|
|
267
|
+
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md p-2"
|
|
268
|
+
>
|
|
237
269
|
<ThemedText className="py-2">
|
|
238
270
|
{description
|
|
239
271
|
? truncateText(description, 60)
|
|
@@ -249,7 +281,8 @@ export const EventForm = ({
|
|
|
249
281
|
<ThemedText className="">{t('events.form.startDate')}</ThemedText>
|
|
250
282
|
<Pressable
|
|
251
283
|
onPress={handleStartDateModal}
|
|
252
|
-
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md py-4 px-2 flex-row gap-x-2 items-center"
|
|
284
|
+
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md py-4 px-2 flex-row gap-x-2 items-center"
|
|
285
|
+
>
|
|
253
286
|
<CalendarIcon className="text-muted-foreground" size={18} />
|
|
254
287
|
<ThemedText className="">
|
|
255
288
|
{start
|
|
@@ -272,7 +305,8 @@ export const EventForm = ({
|
|
|
272
305
|
<ThemedText className="">{t('events.form.endDate')}</ThemedText>
|
|
273
306
|
<Pressable
|
|
274
307
|
onPress={handleEnddDateModal}
|
|
275
|
-
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md py-4 px-2 flex-row gap-x-2 items-center"
|
|
308
|
+
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md py-4 px-2 flex-row gap-x-2 items-center"
|
|
309
|
+
>
|
|
276
310
|
<CalendarIcon className="text-muted-foreground" size={18} />
|
|
277
311
|
<ThemedText className="">
|
|
278
312
|
{end
|
|
@@ -286,15 +320,183 @@ export const EventForm = ({
|
|
|
286
320
|
<ThemedText className="">{t('events.form.timezone')}</ThemedText>
|
|
287
321
|
<Pressable
|
|
288
322
|
onPress={handleTimezoneModalPress}
|
|
289
|
-
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md py-4 px-2 flex-row justify-between items-center"
|
|
323
|
+
className="relative w-full mt-2 border border-muted-foreground/40 rounded-md py-4 px-2 flex-row justify-between items-center"
|
|
324
|
+
>
|
|
290
325
|
<ThemedText className="">
|
|
291
326
|
{timeZone
|
|
292
|
-
? timezones.find(tz => tz.tzCode === timeZone)?.label
|
|
327
|
+
? timezones.find((tz) => tz.tzCode === timeZone)?.label
|
|
293
328
|
: t('events.form.timezonePlaceholder')}
|
|
294
329
|
</ThemedText>
|
|
295
330
|
<ChevronDownIcon className="text-muted-foreground" size={18} />
|
|
296
331
|
</Pressable>
|
|
297
332
|
</ThemedView>
|
|
333
|
+
<ThemedView className="relative w-full mt-4">
|
|
334
|
+
<ThemedText>{t('events.form.repeat.title')}</ThemedText>
|
|
335
|
+
<RadioGroup
|
|
336
|
+
value={recurrence?.freq ?? 'none'}
|
|
337
|
+
onValueChange={(value: string) => {
|
|
338
|
+
if (value === 'none') {
|
|
339
|
+
form.setValue('data.recurrence', undefined);
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
const freq = value as RecurrenceFreq;
|
|
343
|
+
form.setValue('data.recurrence', {
|
|
344
|
+
freq,
|
|
345
|
+
interval: recurrence?.interval,
|
|
346
|
+
until: recurrence?.until,
|
|
347
|
+
count: recurrence?.count,
|
|
348
|
+
byDay:
|
|
349
|
+
freq === 'WEEKLY'
|
|
350
|
+
? recurrence?.byDay?.length
|
|
351
|
+
? recurrence.byDay
|
|
352
|
+
: start
|
|
353
|
+
? [weekdayFromDate(new Date(start))]
|
|
354
|
+
: (['MO'] as RecurrenceWeekday[])
|
|
355
|
+
: undefined,
|
|
356
|
+
});
|
|
357
|
+
}}
|
|
358
|
+
>
|
|
359
|
+
<View>
|
|
360
|
+
{(['none', 'DAILY', 'WEEKLY', 'MONTHLY'] as const).map((freq) => (
|
|
361
|
+
<View key={freq} className="flex-row items-center gap-x-2 mt-2">
|
|
362
|
+
<RadioGroupItem value={freq} id={`repeat-${freq}`} />
|
|
363
|
+
<ThemedText>
|
|
364
|
+
{t(
|
|
365
|
+
freq === 'none'
|
|
366
|
+
? 'events.form.repeat.none'
|
|
367
|
+
: `events.form.repeat.${freq.toLowerCase()}`
|
|
368
|
+
)}
|
|
369
|
+
</ThemedText>
|
|
370
|
+
</View>
|
|
371
|
+
))}
|
|
372
|
+
</View>
|
|
373
|
+
</RadioGroup>
|
|
374
|
+
</ThemedView>
|
|
375
|
+
{recurrence?.freq === 'WEEKLY' ? (
|
|
376
|
+
<ThemedView className="relative w-full mt-4">
|
|
377
|
+
<ThemedText>{t('events.form.repeat.weekdays')}</ThemedText>
|
|
378
|
+
<View className="flex-row flex-wrap gap-2 mt-2">
|
|
379
|
+
{(
|
|
380
|
+
['MO', 'TU', 'WE', 'TH', 'FR', 'SA', 'SU'] as RecurrenceWeekday[]
|
|
381
|
+
).map((day) => {
|
|
382
|
+
const selected = recurrence.byDay?.includes(day);
|
|
383
|
+
return (
|
|
384
|
+
<Pressable
|
|
385
|
+
key={day}
|
|
386
|
+
onPress={() => {
|
|
387
|
+
const current = recurrence.byDay ?? [];
|
|
388
|
+
const next = selected
|
|
389
|
+
? current.filter((value) => value !== day)
|
|
390
|
+
: [...current, day];
|
|
391
|
+
form.setValue('data.recurrence', {
|
|
392
|
+
...recurrence,
|
|
393
|
+
byDay:
|
|
394
|
+
next.length > 0
|
|
395
|
+
? next
|
|
396
|
+
: start
|
|
397
|
+
? [weekdayFromDate(new Date(start))]
|
|
398
|
+
: ['MO'],
|
|
399
|
+
});
|
|
400
|
+
}}
|
|
401
|
+
className={`rounded-md border px-2 py-1 ${
|
|
402
|
+
selected ? 'bg-primary' : 'bg-background'
|
|
403
|
+
}`}
|
|
404
|
+
>
|
|
405
|
+
<ThemedText
|
|
406
|
+
className={selected ? 'text-primary-foreground' : ''}
|
|
407
|
+
>
|
|
408
|
+
{t(`events.form.repeat.day.${day}`)}
|
|
409
|
+
</ThemedText>
|
|
410
|
+
</Pressable>
|
|
411
|
+
);
|
|
412
|
+
})}
|
|
413
|
+
</View>
|
|
414
|
+
</ThemedView>
|
|
415
|
+
) : null}
|
|
416
|
+
{recurrence ? (
|
|
417
|
+
<ThemedView className="relative w-full mt-4">
|
|
418
|
+
<ThemedText>{t('events.form.repeat.end')}</ThemedText>
|
|
419
|
+
<RadioGroup
|
|
420
|
+
value={
|
|
421
|
+
recurrence.until ? 'until' : recurrence.count ? 'count' : 'never'
|
|
422
|
+
}
|
|
423
|
+
onValueChange={(value: string) => {
|
|
424
|
+
if (value === 'never') {
|
|
425
|
+
form.setValue('data.recurrence', {
|
|
426
|
+
...recurrence,
|
|
427
|
+
until: undefined,
|
|
428
|
+
count: undefined,
|
|
429
|
+
});
|
|
430
|
+
} else if (value === 'until') {
|
|
431
|
+
form.setValue('data.recurrence', {
|
|
432
|
+
...recurrence,
|
|
433
|
+
count: undefined,
|
|
434
|
+
until:
|
|
435
|
+
recurrence.until ??
|
|
436
|
+
new Date(
|
|
437
|
+
Date.now() + 90 * 24 * 60 * 60 * 1000
|
|
438
|
+
).toISOString(),
|
|
439
|
+
});
|
|
440
|
+
} else {
|
|
441
|
+
form.setValue('data.recurrence', {
|
|
442
|
+
...recurrence,
|
|
443
|
+
until: undefined,
|
|
444
|
+
count: recurrence.count ?? 10,
|
|
445
|
+
});
|
|
446
|
+
}
|
|
447
|
+
}}
|
|
448
|
+
>
|
|
449
|
+
<View>
|
|
450
|
+
{(['never', 'until', 'count'] as const).map((mode) => (
|
|
451
|
+
<View key={mode} className="flex-row items-center gap-x-2 mt-2">
|
|
452
|
+
<RadioGroupItem value={mode} id={`repeat-end-${mode}`} />
|
|
453
|
+
<ThemedText>
|
|
454
|
+
{t(
|
|
455
|
+
mode === 'never'
|
|
456
|
+
? 'events.form.repeat.never'
|
|
457
|
+
: mode === 'until'
|
|
458
|
+
? 'events.form.repeat.onDate'
|
|
459
|
+
: 'events.form.repeat.after'
|
|
460
|
+
)}
|
|
461
|
+
</ThemedText>
|
|
462
|
+
</View>
|
|
463
|
+
))}
|
|
464
|
+
</View>
|
|
465
|
+
</RadioGroup>
|
|
466
|
+
{recurrence.count ? (
|
|
467
|
+
<FormField
|
|
468
|
+
control={form.control}
|
|
469
|
+
name="data.recurrence.count"
|
|
470
|
+
render={({ field }) => (
|
|
471
|
+
<FormInput
|
|
472
|
+
label={t('events.form.repeat.count')}
|
|
473
|
+
keyboardType="numeric"
|
|
474
|
+
value={String(field.value ?? 10)}
|
|
475
|
+
onChangeText={(text) =>
|
|
476
|
+
field.onChange(Math.max(1, Number(text) || 1))
|
|
477
|
+
}
|
|
478
|
+
className="rounded-md w-full mt-2"
|
|
479
|
+
/>
|
|
480
|
+
)}
|
|
481
|
+
/>
|
|
482
|
+
) : null}
|
|
483
|
+
{eventData?.type === 'event' && eventData.start ? (
|
|
484
|
+
<ThemedText className="mt-2 text-muted-foreground">
|
|
485
|
+
{t('events.form.repeat.preview', {
|
|
486
|
+
dates: previewUpcomingOccurrences(eventData, 3)
|
|
487
|
+
.map((item) =>
|
|
488
|
+
new Date(item.start).toLocaleDateString(undefined, {
|
|
489
|
+
weekday: 'short',
|
|
490
|
+
month: 'short',
|
|
491
|
+
day: 'numeric',
|
|
492
|
+
})
|
|
493
|
+
)
|
|
494
|
+
.join(', '),
|
|
495
|
+
})}
|
|
496
|
+
</ThemedText>
|
|
497
|
+
) : null}
|
|
498
|
+
</ThemedView>
|
|
499
|
+
) : null}
|
|
298
500
|
<View className="w-full h-[0.5px] bg-foreground/20 mt-6" />
|
|
299
501
|
<ThemedText className="mt-4 text-xl font-semibold tracking-wider">
|
|
300
502
|
{t('events.form.location')}
|
|
@@ -305,12 +507,14 @@ export const EventForm = ({
|
|
|
305
507
|
value={eventFormat}
|
|
306
508
|
onValueChange={(value: string) => {
|
|
307
509
|
maybeSwitchEventFormat(value);
|
|
308
|
-
}}
|
|
510
|
+
}}
|
|
511
|
+
>
|
|
309
512
|
<View className="">
|
|
310
|
-
{eventFormats.map(fmt => (
|
|
513
|
+
{eventFormats.map((fmt) => (
|
|
311
514
|
<View
|
|
312
515
|
key={fmt.value}
|
|
313
|
-
className="flex-row items-center gap-x-2 mt-2"
|
|
516
|
+
className="flex-row items-center gap-x-2 mt-2"
|
|
517
|
+
>
|
|
314
518
|
<RadioGroupItem value={fmt.value} id={fmt.value} />
|
|
315
519
|
<ThemedText>{fmt.label}</ThemedText>
|
|
316
520
|
</View>
|
|
@@ -318,8 +522,13 @@ export const EventForm = ({
|
|
|
318
522
|
</View>
|
|
319
523
|
</RadioGroup>
|
|
320
524
|
</ThemedView>
|
|
321
|
-
{
|
|
525
|
+
{eventFormat === 'jam' ? (
|
|
322
526
|
<>
|
|
527
|
+
{!serverInfo?.jams.livekit.enabled ? (
|
|
528
|
+
<ThemedText className="text-destructive mt-4">
|
|
529
|
+
{t('jams.unavailable.message')}
|
|
530
|
+
</ThemedText>
|
|
531
|
+
) : null}
|
|
323
532
|
<ThemedView className="relative w-full mt-4">
|
|
324
533
|
<ThemedText className="">
|
|
325
534
|
{t('events.form.jamWaitingRoom')}
|
|
@@ -333,9 +542,10 @@ export const EventForm = ({
|
|
|
333
542
|
label={t('events.form.jamWaitingRoomDescription')}
|
|
334
543
|
{...field}
|
|
335
544
|
checked={field.value ?? false}
|
|
545
|
+
disabled={!serverInfo?.jams.livekit.enabled}
|
|
336
546
|
className="rounded-md w-full mt-2"
|
|
337
547
|
onCheckedChange={field.onChange}
|
|
338
|
-
handleOnLabelPress={() => {
|
|
548
|
+
handleOnLabelPress={() => {}}
|
|
339
549
|
/>
|
|
340
550
|
)}
|
|
341
551
|
/>
|
|
@@ -395,7 +605,7 @@ export const EventForm = ({
|
|
|
395
605
|
disabled={isEdit}
|
|
396
606
|
audienceSetting={form.getValues()}
|
|
397
607
|
type="event"
|
|
398
|
-
onChange={audienceSetting => {
|
|
608
|
+
onChange={(audienceSetting) => {
|
|
399
609
|
form.setValue('visibility', audienceSetting.visibility);
|
|
400
610
|
form.setValue('groupId', audienceSetting.groupId);
|
|
401
611
|
form.setValue('audience', audienceSetting.audience);
|
|
@@ -429,7 +639,7 @@ export const EventForm = ({
|
|
|
429
639
|
checked={field.value ?? false}
|
|
430
640
|
className="rounded-md w-full"
|
|
431
641
|
onCheckedChange={field.onChange}
|
|
432
|
-
handleOnLabelPress={() => {
|
|
642
|
+
handleOnLabelPress={() => {}}
|
|
433
643
|
/>
|
|
434
644
|
)}
|
|
435
645
|
/>
|
|
@@ -457,7 +667,8 @@ export const EventForm = ({
|
|
|
457
667
|
<Pressable
|
|
458
668
|
accessibilityLabel={t('events.form.clearMaxAttendees')}
|
|
459
669
|
onPress={() => field.onChange(undefined)}
|
|
460
|
-
className="border-muted-foreground/40 mb-1 rounded-md border p-3"
|
|
670
|
+
className="border-muted-foreground/40 mb-1 rounded-md border p-3"
|
|
671
|
+
>
|
|
461
672
|
<XIcon className="text-foreground" size={18} />
|
|
462
673
|
</Pressable>
|
|
463
674
|
) : null}
|
|
@@ -469,7 +680,7 @@ export const EventForm = ({
|
|
|
469
680
|
<EventDescriptionSheet
|
|
470
681
|
initialDescription={form.getValues('data.content')}
|
|
471
682
|
ref={descriptionRef}
|
|
472
|
-
onDone={v => {
|
|
683
|
+
onDone={(v) => {
|
|
473
684
|
form.setValue('data.content', v);
|
|
474
685
|
}}
|
|
475
686
|
/>
|
|
@@ -480,7 +691,8 @@ export const EventForm = ({
|
|
|
480
691
|
<DateSheet
|
|
481
692
|
ref={startDateSheetModalRef}
|
|
482
693
|
value={form.getValues('data.start')}
|
|
483
|
-
|
|
694
|
+
timeZone={timeZone}
|
|
695
|
+
onChange={(v) => {
|
|
484
696
|
form.setValue('data.start', v);
|
|
485
697
|
}}
|
|
486
698
|
onClose={() => startDateSheetModalRef.current?.close()}
|
|
@@ -488,7 +700,8 @@ export const EventForm = ({
|
|
|
488
700
|
<DateSheet
|
|
489
701
|
ref={endDateSheetModalRef}
|
|
490
702
|
value={form.getValues('data.end')}
|
|
491
|
-
|
|
703
|
+
timeZone={timeZone}
|
|
704
|
+
onChange={(v) => {
|
|
492
705
|
form.setValue('data.end', v);
|
|
493
706
|
}}
|
|
494
707
|
onClose={() => endDateSheetModalRef.current?.close()}
|
|
@@ -496,7 +709,34 @@ export const EventForm = ({
|
|
|
496
709
|
<TimeZoneSelectorSheet
|
|
497
710
|
ref={timezoneSheetModalRef}
|
|
498
711
|
initialTimeZone={timeZone}
|
|
499
|
-
onDone={v => {
|
|
712
|
+
onDone={(v) => {
|
|
713
|
+
const previous =
|
|
714
|
+
timeZone ?? Intl.DateTimeFormat().resolvedOptions().timeZone;
|
|
715
|
+
const next = v ?? previous;
|
|
716
|
+
if (next && previous !== next) {
|
|
717
|
+
if (start) {
|
|
718
|
+
form.setValue(
|
|
719
|
+
'data.start',
|
|
720
|
+
reinterpretIsoInTimeZone(start, previous, next) ?? start
|
|
721
|
+
);
|
|
722
|
+
}
|
|
723
|
+
if (end) {
|
|
724
|
+
form.setValue(
|
|
725
|
+
'data.end',
|
|
726
|
+
reinterpretIsoInTimeZone(end, previous, next)
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
if (recurrence?.until) {
|
|
730
|
+
form.setValue('data.recurrence', {
|
|
731
|
+
...recurrence,
|
|
732
|
+
until: reinterpretIsoInTimeZone(
|
|
733
|
+
recurrence.until,
|
|
734
|
+
previous,
|
|
735
|
+
next
|
|
736
|
+
),
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
}
|
|
500
740
|
form.setValue('data.timeZone', v);
|
|
501
741
|
}}
|
|
502
742
|
/>
|
|
@@ -7,7 +7,7 @@ import { UseFormReturn } from 'react-hook-form';
|
|
|
7
7
|
import { PlusIcon, MinusIcon } from '~/components/icons';
|
|
8
8
|
import { formatDateTime } from '~/lib/utils';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
|
-
import { PostCreationData } from '@openpeepshq/common';
|
|
10
|
+
import { POLL_OPTION_MAX_LENGTH, PostCreationData } from '@openpeepshq/common';
|
|
11
11
|
import { DateSheet } from '../../modals/post/date-sheet';
|
|
12
12
|
import { BottomSheetModal } from '@gorhom/bottom-sheet';
|
|
13
13
|
|
|
@@ -41,6 +41,7 @@ export const PollForm: React.FC<PollFormProps> = ({
|
|
|
41
41
|
<FormInput
|
|
42
42
|
containerClassName="flex-grow"
|
|
43
43
|
className="px-4 py-2 w-full rounded-lg"
|
|
44
|
+
maxLength={POLL_OPTION_MAX_LENGTH}
|
|
44
45
|
placeholder={t('posts.form.poll.option', { number: index + 1 })}
|
|
45
46
|
{...field}
|
|
46
47
|
/>
|
|
@@ -3,6 +3,7 @@ import React, { useMemo } from 'react';
|
|
|
3
3
|
import { ThemedText } from '~/components/ui/themed-text';
|
|
4
4
|
import { Event, PublicPost, PublicRsvp } from '@openpeepshq/common';
|
|
5
5
|
import { truncateText } from '~/lib/utils';
|
|
6
|
+
import { formatEventRecurrence } from '@openpeepshq/common/lib';
|
|
6
7
|
import { useOpenpeeps } from '@openpeepshq/react';
|
|
7
8
|
import { useNavigation } from '@react-navigation/native';
|
|
8
9
|
import { NativeStackNavigationProp } from '@react-navigation/native-stack';
|
|
@@ -12,6 +13,7 @@ import { Timespan } from '~/components/custom/date';
|
|
|
12
13
|
import { EventLocation } from '~/components/custom/post/pieces/EventLocation';
|
|
13
14
|
import { ProfileEventRelationship } from '~/components/custom/post/pieces/ProfileEventRelationship';
|
|
14
15
|
import { ParticipantsCard } from '~/components/custom/common';
|
|
16
|
+
import { useTranslation } from 'react-i18next';
|
|
15
17
|
|
|
16
18
|
interface CardEventProps {
|
|
17
19
|
post: PublicPost;
|
|
@@ -19,24 +21,31 @@ interface CardEventProps {
|
|
|
19
21
|
|
|
20
22
|
export const CardEvent = ({ post }: CardEventProps) => {
|
|
21
23
|
const { openpeepsApi } = useOpenpeeps();
|
|
24
|
+
const { t } = useTranslation();
|
|
22
25
|
|
|
23
26
|
const event = post.data as Event;
|
|
24
27
|
const jam = event.jam;
|
|
25
|
-
const
|
|
28
|
+
const occurrenceId = post.occurrenceRecurrenceId;
|
|
29
|
+
const { data: jamState, isLoading } = openpeepsApi.useJamState(
|
|
30
|
+
post.id || '',
|
|
31
|
+
occurrenceId
|
|
32
|
+
);
|
|
26
33
|
const navigation =
|
|
27
34
|
useNavigation<NativeStackNavigationProp<MainStackParamList>>();
|
|
28
35
|
const rsvps = useMemo<PublicRsvp[]>(() => {
|
|
29
|
-
return calculateEffectiveRsvps(post) || [];
|
|
30
|
-
}, [post]);
|
|
36
|
+
return calculateEffectiveRsvps(post, occurrenceId) || [];
|
|
37
|
+
}, [post, occurrenceId]);
|
|
31
38
|
|
|
32
39
|
return (
|
|
33
40
|
<TouchableOpacity
|
|
34
41
|
onPress={() => {
|
|
35
42
|
navigation.navigate('Post', {
|
|
36
43
|
id: post.id,
|
|
44
|
+
occurrence: occurrenceId,
|
|
37
45
|
});
|
|
38
46
|
}}
|
|
39
|
-
className="flex mb-6 w-full border-[0.5px] border-gray-100/50 rounded-lg"
|
|
47
|
+
className="flex mb-6 w-full border-[0.5px] border-gray-100/50 rounded-lg"
|
|
48
|
+
>
|
|
40
49
|
<View className="w-full aspect-video overflow-hidden rounded-t-md">
|
|
41
50
|
<Image
|
|
42
51
|
source={
|
|
@@ -50,8 +59,17 @@ export const CardEvent = ({ post }: CardEventProps) => {
|
|
|
50
59
|
</View>
|
|
51
60
|
<View className="grid gap-y-5 p-4">
|
|
52
61
|
<View className="flex-row items-center gap-x-1">
|
|
53
|
-
<Timespan
|
|
62
|
+
<Timespan
|
|
63
|
+
start={post.occurrenceStart ?? event.start}
|
|
64
|
+
end={post.occurrenceEnd ?? event.end}
|
|
65
|
+
timeZone={event.timeZone}
|
|
66
|
+
/>
|
|
54
67
|
</View>
|
|
68
|
+
{event.recurrence ? (
|
|
69
|
+
<ThemedText className="text-muted-foreground text-sm">
|
|
70
|
+
{formatEventRecurrence(event.recurrence, t, event.start)}
|
|
71
|
+
</ThemedText>
|
|
72
|
+
) : null}
|
|
55
73
|
<ThemedText className="text-xl font-semibold">
|
|
56
74
|
{truncateText(event?.name, 100) || '-'}
|
|
57
75
|
</ThemedText>
|
|
@@ -64,10 +82,13 @@ export const CardEvent = ({ post }: CardEventProps) => {
|
|
|
64
82
|
{isLoading && <ActivityIndicator size={'small'} />}
|
|
65
83
|
{!isLoading && jamState && (
|
|
66
84
|
<View
|
|
67
|
-
className={`flex justify-start ${
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
85
|
+
className={`flex justify-start ${
|
|
86
|
+
jamState?.participants?.length || 0 > 1 ? 'gap-5' : 'gap-2'
|
|
87
|
+
}
|
|
88
|
+
text-muted-foreground text-xs ${
|
|
89
|
+
(jamState?.participants?.length ?? 0) > 0 ? '-mt-4' : ''
|
|
90
|
+
}`}
|
|
91
|
+
>
|
|
71
92
|
<View className="flex flex-row items-center gap-x-2">
|
|
72
93
|
{jamState?.participants?.length > 0 && (
|
|
73
94
|
<View className="-ml-5 w-12">
|
|
@@ -75,8 +96,7 @@ export const CardEvent = ({ post }: CardEventProps) => {
|
|
|
75
96
|
</View>
|
|
76
97
|
)}
|
|
77
98
|
<ThemedText>
|
|
78
|
-
{rsvps.length}{' '}
|
|
79
|
-
{rsvps?.length === 1 ? 'rsvp' : 'rsvps'}
|
|
99
|
+
{rsvps.length} {rsvps?.length === 1 ? 'rsvp' : 'rsvps'}
|
|
80
100
|
</ThemedText>
|
|
81
101
|
</View>
|
|
82
102
|
</View>
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Event, PublicPost } from '@openpeepshq/common';
|
|
3
|
+
import { formatEventRecurrence } from '@openpeepshq/common/lib';
|
|
3
4
|
import { View } from 'react-native';
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
4
6
|
import { CachedImage } from '~/components/custom/common';
|
|
5
7
|
import { ParticipantAvatar } from '~/components/custom/common/participant-avatar';
|
|
6
8
|
import { ThemedText } from '~/components/ui/themed-text';
|
|
7
9
|
import { formatEventDate } from '~/lib/utils';
|
|
8
10
|
|
|
9
11
|
export const FeedEvent = ({ post }: { post: PublicPost }) => {
|
|
12
|
+
const { t } = useTranslation();
|
|
10
13
|
const eventData = post.data as Event;
|
|
14
|
+
const start = post.occurrenceStart ?? eventData.start;
|
|
15
|
+
const end = post.occurrenceEnd ?? eventData.end;
|
|
16
|
+
|
|
11
17
|
return (
|
|
12
18
|
<>
|
|
13
19
|
{eventData.image && (
|
|
@@ -22,8 +28,8 @@ export const FeedEvent = ({ post }: { post: PublicPost }) => {
|
|
|
22
28
|
|
|
23
29
|
<View className="p-4">
|
|
24
30
|
<ThemedText className="text-muted-foreground text-sm mb-2">
|
|
25
|
-
{formatEventDate(
|
|
26
|
-
{
|
|
31
|
+
{formatEventDate(start)}
|
|
32
|
+
{end && ` - ${formatEventDate(end)}`}
|
|
27
33
|
{eventData.timeZone && ` (${eventData.timeZone})`}
|
|
28
34
|
</ThemedText>
|
|
29
35
|
|
|
@@ -31,6 +37,12 @@ export const FeedEvent = ({ post }: { post: PublicPost }) => {
|
|
|
31
37
|
{eventData.name}
|
|
32
38
|
</ThemedText>
|
|
33
39
|
|
|
40
|
+
{eventData.recurrence ? (
|
|
41
|
+
<ThemedText className="text-muted-foreground text-sm mb-3">
|
|
42
|
+
{formatEventRecurrence(eventData.recurrence, t, eventData.start)}
|
|
43
|
+
</ThemedText>
|
|
44
|
+
) : null}
|
|
45
|
+
|
|
34
46
|
{eventData.url && (
|
|
35
47
|
<ThemedText className="text-muted-foreground mb-3">
|
|
36
48
|
🔗 {eventData.url}
|