@sendbird/uikit-react 3.4.7 → 3.4.8-rc.1
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/App.js +46 -46
- package/App.js.map +1 -1
- package/CHANGELOG.md +26 -0
- package/Channel/components/ChannelHeader.js +18 -22
- package/Channel/components/ChannelHeader.js.map +1 -1
- package/Channel/components/ChannelUI.js +43 -43
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +14 -17
- package/Channel/components/FileViewer.js.map +1 -1
- package/Channel/components/FrozenNotification.js +4 -4
- package/Channel/components/FrozenNotification.js.map +1 -1
- package/Channel/components/Message.js +38 -38
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageInput.js +30 -33
- package/Channel/components/MessageInput.js.map +1 -1
- package/Channel/components/MessageList.js +51 -44
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +16 -20
- package/Channel/components/RemoveMessageModal.js.map +1 -1
- package/Channel/components/SuggestedMentionList.js +18 -24
- package/Channel/components/SuggestedMentionList.js.map +1 -1
- package/Channel/components/TypingIndicator.js +14 -20
- package/Channel/components/TypingIndicator.js.map +1 -1
- package/Channel/components/UnreadCount.js +4 -4
- package/Channel/components/UnreadCount.js.map +1 -1
- package/Channel/context.js +11 -19
- package/Channel/context.js.map +1 -1
- package/Channel.js +43 -43
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +14 -14
- package/ChannelList/components/AddChannel.js.map +1 -1
- package/ChannelList/components/ChannelListHeader.js +8 -8
- package/ChannelList/components/ChannelListHeader.js.map +1 -1
- package/ChannelList/components/ChannelListUI.js +29 -30
- package/ChannelList/components/ChannelListUI.js.map +1 -1
- package/ChannelList/components/ChannelPreview.js +25 -28
- package/ChannelList/components/ChannelPreview.js.map +1 -1
- package/ChannelList/components/ChannelPreviewAction.js +17 -15
- package/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/ChannelList/context.js +7 -7
- package/ChannelList.js +29 -30
- package/ChannelList.js.map +1 -1
- package/{ChannelListProvider-8be91a05.js → ChannelListProvider-e8ad86b6.js} +15 -19
- package/ChannelListProvider-e8ad86b6.js.map +1 -0
- package/{ChannelProvider-d643e6d9.js → ChannelProvider-6de56b36.js} +13 -97
- package/ChannelProvider-6de56b36.js.map +1 -0
- package/ChannelSettings/components/ChannelProfile.js +11 -11
- package/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/ChannelSettings/components/ChannelSettingsUI.js +17 -17
- package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/ChannelSettings/components/EditDetailsModal.js +11 -11
- package/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/ChannelSettings/components/LeaveChannel.js +11 -11
- package/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/ChannelSettings/components/ModerationPanel.js +14 -14
- package/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/ChannelSettings/components/UserListItem.js +10 -10
- package/ChannelSettings/components/UserListItem.js.map +1 -1
- package/ChannelSettings/components/UserPanel.js +13 -13
- package/ChannelSettings/components/UserPanel.js.map +1 -1
- package/ChannelSettings/context.js +3 -3
- package/ChannelSettings/context.js.map +1 -1
- package/ChannelSettings.js +18 -18
- package/ChannelSettings.js.map +1 -1
- package/CreateChannel/components/CreateChannelUI.js +13 -13
- package/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/CreateChannel/components/InviteUsers.js +14 -14
- package/CreateChannel/components/InviteUsers.js.map +1 -1
- package/CreateChannel/components/SelectChannelType.js +10 -10
- package/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/CreateChannel/context.js +4 -4
- package/CreateChannel.js +13 -13
- package/CreateChannel.js.map +1 -1
- package/{CreateChannelProvider-5674e81b.js → CreateChannelProvider-64578d2a.js} +1 -1
- package/{CreateChannelProvider-5674e81b.js.map → CreateChannelProvider-64578d2a.js.map} +1 -1
- package/CreateOpenChannel/components/CreateOpenChannelUI.js +9 -9
- package/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
- package/CreateOpenChannel/context.js +1 -1
- package/CreateOpenChannel/context.js.map +1 -1
- package/CreateOpenChannel.js +9 -9
- package/CreateOpenChannel.js.map +1 -1
- package/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/EditUserProfile/context.js.map +1 -1
- package/EditUserProfile.js +12 -12
- package/EditUserProfile.js.map +1 -1
- package/{LocalizationContext-ad70364c.js → LocalizationContext-7ae12588.js} +3 -3
- package/{LocalizationContext-ad70364c.js.map → LocalizationContext-7ae12588.js.map} +1 -1
- package/{MediaQueryContext-4e555ef5.js → MediaQueryContext-05d4db73.js} +1 -1
- package/MediaQueryContext-05d4db73.js.map +1 -0
- package/{MemberList-24b818f8.js → MemberList-9634fee8.js} +5 -5
- package/MemberList-9634fee8.js.map +1 -0
- package/Message/context.js.map +1 -1
- package/MessageSearch/components/MessageSearchUI.js +11 -11
- package/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/MessageSearch/context.js +1 -1
- package/MessageSearch/context.js.map +1 -1
- package/MessageSearch.js +11 -11
- package/MessageSearch.js.map +1 -1
- package/OpenChannel/components/FrozenChannelNotification.js +4 -4
- package/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
- package/OpenChannel/components/OpenChannelHeader.js +12 -12
- package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/OpenChannel/components/OpenChannelInput.js +18 -18
- package/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessage.js +27 -32
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +31 -31
- package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/OpenChannel/components/OpenChannelUI.js +31 -31
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +8 -8
- package/OpenChannel.js +31 -31
- package/OpenChannel.js.map +1 -1
- package/OpenChannelList/components/OpenChannelListUI.js +13 -13
- package/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
- package/OpenChannelList/components/OpenChannelPreview.js +3 -3
- package/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
- package/OpenChannelList/context.js +3 -3
- package/OpenChannelList.js +13 -13
- package/OpenChannelList.js.map +1 -1
- package/{OpenChannelListProvider-27822936.js → OpenChannelListProvider-f6a88782.js} +3 -3
- package/{OpenChannelListProvider-27822936.js.map → OpenChannelListProvider-f6a88782.js.map} +1 -1
- package/{OpenChannelProvider-5148963b.js → OpenChannelProvider-f1a4b4fa.js} +9 -7
- package/OpenChannelProvider-f1a4b4fa.js.map +1 -0
- package/OpenChannelSettings/components/EditDetailsModal.js +13 -13
- package/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelProfile.js +12 -12
- package/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +17 -17
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/OpenChannelSettings/components/OperatorUI.js +16 -16
- package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/OpenChannelSettings/components/ParticipantUI.js +14 -14
- package/OpenChannelSettings/context.js +3 -3
- package/OpenChannelSettings/context.js.map +1 -1
- package/OpenChannelSettings.js +17 -17
- package/OpenChannelSettings.js.map +1 -1
- package/README.md +28 -8
- package/{RemoveMessageModal-54d1b0a4.js → RemoveMessageModal-2b9bdeed.js} +3 -3
- package/{RemoveMessageModal-54d1b0a4.js.map → RemoveMessageModal-2b9bdeed.js.map} +1 -1
- package/SendbirdProvider.js +13 -13
- package/SendbirdProvider.js.map +1 -1
- package/Thread/components/ParentMessageInfo.js +32 -32
- package/Thread/components/ParentMessageInfo.js.map +1 -1
- package/Thread/components/ParentMessageInfoItem.js +18 -18
- package/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/Thread/components/ThreadHeader.js +6 -6
- package/Thread/components/ThreadHeader.js.map +1 -1
- package/Thread/components/ThreadList.js +35 -35
- package/Thread/components/ThreadList.js.map +1 -1
- package/Thread/components/ThreadListItem.js +34 -34
- package/Thread/components/ThreadListItem.js.map +1 -1
- package/Thread/components/ThreadMessageInput.js +28 -31
- package/Thread/components/ThreadMessageInput.js.map +1 -1
- package/Thread/components/ThreadUI.js +36 -36
- package/Thread/components/ThreadUI.js.map +1 -1
- package/Thread/context.js +8 -8
- package/Thread.js +36 -36
- package/Thread.js.map +1 -1
- package/{ThreadProvider-96a5e77e.js → ThreadProvider-5a216f9d.js} +7 -7
- package/ThreadProvider-5a216f9d.js.map +1 -0
- package/{UserProfileContext-b68f33fc.js → UserProfileContext-e8124c47.js} +1 -1
- package/{UserProfileContext-b68f33fc.js.map → UserProfileContext-e8124c47.js.map} +1 -1
- package/{VoiceMessageInputWrapper-07631f8d.js → VoiceMessageInputWrapper-ce56172a.js} +8 -8
- package/VoiceMessageInputWrapper-ce56172a.js.map +1 -0
- package/VoicePlayer/context.js +3 -3
- package/VoicePlayer/useVoicePlayer.js +6 -6
- package/VoicePlayer/useVoicePlayer.js.map +1 -1
- package/VoiceRecorder/context.js +6 -6
- package/VoiceRecorder/context.js.map +1 -1
- package/VoiceRecorder/useVoiceRecorder.js +3 -2
- package/VoiceRecorder/useVoiceRecorder.js.map +1 -1
- package/{WebAudioUtils-3fb13b51.js → WebAudioUtils-6229e96a.js} +1 -1
- package/{WebAudioUtils-3fb13b51.js.map → WebAudioUtils-6229e96a.js.map} +1 -1
- package/{_rollupPluginBabelHelpers-5d0c716a.js → _rollupPluginBabelHelpers-96062e23.js} +1 -1
- package/_rollupPluginBabelHelpers-96062e23.js.map +1 -0
- package/{actionTypes-b270327e.js → actionTypes-423a1fac.js} +1 -1
- package/{actionTypes-b270327e.js.map → actionTypes-423a1fac.js.map} +1 -1
- package/cjs/App.js +46 -46
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +18 -22
- package/cjs/Channel/components/ChannelHeader.js.map +1 -1
- package/cjs/Channel/components/ChannelUI.js +43 -43
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +14 -17
- package/cjs/Channel/components/FileViewer.js.map +1 -1
- package/cjs/Channel/components/FrozenNotification.js +4 -4
- package/cjs/Channel/components/FrozenNotification.js.map +1 -1
- package/cjs/Channel/components/Message.js +38 -38
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageInput.js +30 -33
- package/cjs/Channel/components/MessageInput.js.map +1 -1
- package/cjs/Channel/components/MessageList.js +51 -44
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +16 -20
- package/cjs/Channel/components/RemoveMessageModal.js.map +1 -1
- package/cjs/Channel/components/SuggestedMentionList.js +18 -24
- package/cjs/Channel/components/SuggestedMentionList.js.map +1 -1
- package/cjs/Channel/components/TypingIndicator.js +14 -20
- package/cjs/Channel/components/TypingIndicator.js.map +1 -1
- package/cjs/Channel/components/UnreadCount.js +4 -4
- package/cjs/Channel/components/UnreadCount.js.map +1 -1
- package/cjs/Channel/context.js +11 -19
- package/cjs/Channel/context.js.map +1 -1
- package/cjs/Channel.js +43 -43
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +14 -14
- package/cjs/ChannelList/components/AddChannel.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListHeader.js +8 -8
- package/cjs/ChannelList/components/ChannelListHeader.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListUI.js +29 -30
- package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreview.js +25 -28
- package/cjs/ChannelList/components/ChannelPreview.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreviewAction.js +17 -15
- package/cjs/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/cjs/ChannelList/context.js +7 -7
- package/cjs/ChannelList.js +29 -30
- package/cjs/ChannelList.js.map +1 -1
- package/cjs/{ChannelListProvider-6b61a484.js → ChannelListProvider-2bcdc671.js} +15 -19
- package/cjs/ChannelListProvider-2bcdc671.js.map +1 -0
- package/cjs/{ChannelProvider-12a12f31.js → ChannelProvider-2a01302b.js} +12 -96
- package/cjs/ChannelProvider-2a01302b.js.map +1 -0
- package/cjs/ChannelSettings/components/ChannelProfile.js +11 -11
- package/cjs/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +17 -17
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/cjs/ChannelSettings/components/EditDetailsModal.js +11 -11
- package/cjs/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/ChannelSettings/components/LeaveChannel.js +11 -11
- package/cjs/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/cjs/ChannelSettings/components/ModerationPanel.js +14 -14
- package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/cjs/ChannelSettings/components/UserListItem.js +10 -10
- package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
- package/cjs/ChannelSettings/components/UserPanel.js +13 -13
- package/cjs/ChannelSettings/components/UserPanel.js.map +1 -1
- package/cjs/ChannelSettings/context.js +3 -3
- package/cjs/ChannelSettings/context.js.map +1 -1
- package/cjs/ChannelSettings.js +18 -18
- package/cjs/ChannelSettings.js.map +1 -1
- package/cjs/CreateChannel/components/CreateChannelUI.js +13 -13
- package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/cjs/CreateChannel/components/InviteUsers.js +14 -14
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
- package/cjs/CreateChannel/components/SelectChannelType.js +10 -10
- package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/cjs/CreateChannel/context.js +4 -4
- package/cjs/CreateChannel.js +13 -13
- package/cjs/CreateChannel.js.map +1 -1
- package/cjs/{CreateChannelProvider-2beb2415.js → CreateChannelProvider-8f7d9505.js} +1 -1
- package/cjs/{CreateChannelProvider-2beb2415.js.map → CreateChannelProvider-8f7d9505.js.map} +1 -1
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +9 -9
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
- package/cjs/CreateOpenChannel/context.js +1 -1
- package/cjs/CreateOpenChannel/context.js.map +1 -1
- package/cjs/CreateOpenChannel.js +9 -9
- package/cjs/CreateOpenChannel.js.map +1 -1
- package/cjs/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/cjs/EditUserProfile/context.js.map +1 -1
- package/cjs/EditUserProfile.js +12 -12
- package/cjs/EditUserProfile.js.map +1 -1
- package/cjs/{LocalizationContext-30772f4a.js → LocalizationContext-975ffc10.js} +3 -3
- package/cjs/{LocalizationContext-30772f4a.js.map → LocalizationContext-975ffc10.js.map} +1 -1
- package/cjs/{MediaQueryContext-3b09499c.js → MediaQueryContext-302f1c4f.js} +1 -1
- package/cjs/MediaQueryContext-302f1c4f.js.map +1 -0
- package/cjs/{MemberList-f0c4e234.js → MemberList-0c0c303c.js} +5 -5
- package/cjs/MemberList-0c0c303c.js.map +1 -0
- package/cjs/Message/context.js.map +1 -1
- package/cjs/MessageSearch/components/MessageSearchUI.js +11 -11
- package/cjs/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/cjs/MessageSearch/context.js +1 -1
- package/cjs/MessageSearch/context.js.map +1 -1
- package/cjs/MessageSearch.js +11 -11
- package/cjs/MessageSearch.js.map +1 -1
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +4 -4
- package/cjs/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelHeader.js +12 -12
- package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelInput.js +18 -18
- package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessage.js +27 -32
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +31 -31
- package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelUI.js +31 -31
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +8 -8
- package/cjs/OpenChannel.js +31 -31
- package/cjs/OpenChannel.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +13 -13
- package/cjs/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +3 -3
- package/cjs/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
- package/cjs/OpenChannelList/context.js +3 -3
- package/cjs/OpenChannelList.js +13 -13
- package/cjs/OpenChannelList.js.map +1 -1
- package/cjs/{OpenChannelListProvider-d48bd733.js → OpenChannelListProvider-ef3655ce.js} +3 -3
- package/cjs/{OpenChannelListProvider-d48bd733.js.map → OpenChannelListProvider-ef3655ce.js.map} +1 -1
- package/cjs/{OpenChannelProvider-56846c0c.js → OpenChannelProvider-c500275a.js} +9 -7
- package/cjs/OpenChannelProvider-c500275a.js.map +1 -0
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +13 -13
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +12 -12
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +17 -17
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OperatorUI.js +16 -16
- package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +14 -14
- package/cjs/OpenChannelSettings/context.js +3 -3
- package/cjs/OpenChannelSettings/context.js.map +1 -1
- package/cjs/OpenChannelSettings.js +17 -17
- package/cjs/OpenChannelSettings.js.map +1 -1
- package/cjs/{RemoveMessageModal-e0480b7c.js → RemoveMessageModal-f8277edf.js} +3 -3
- package/cjs/{RemoveMessageModal-e0480b7c.js.map → RemoveMessageModal-f8277edf.js.map} +1 -1
- package/cjs/SendbirdProvider.js +13 -13
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfo.js +32 -32
- package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfoItem.js +18 -18
- package/cjs/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/cjs/Thread/components/ThreadHeader.js +6 -6
- package/cjs/Thread/components/ThreadHeader.js.map +1 -1
- package/cjs/Thread/components/ThreadList.js +35 -35
- package/cjs/Thread/components/ThreadList.js.map +1 -1
- package/cjs/Thread/components/ThreadListItem.js +34 -34
- package/cjs/Thread/components/ThreadListItem.js.map +1 -1
- package/cjs/Thread/components/ThreadMessageInput.js +28 -31
- package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
- package/cjs/Thread/components/ThreadUI.js +36 -36
- package/cjs/Thread/components/ThreadUI.js.map +1 -1
- package/cjs/Thread/context.js +8 -8
- package/cjs/Thread.js +36 -36
- package/cjs/Thread.js.map +1 -1
- package/cjs/{ThreadProvider-1ebd5bc0.js → ThreadProvider-e8f49239.js} +7 -7
- package/cjs/ThreadProvider-e8f49239.js.map +1 -0
- package/cjs/{UserProfileContext-eb5a10d6.js → UserProfileContext-8b19c6c3.js} +1 -1
- package/cjs/{UserProfileContext-eb5a10d6.js.map → UserProfileContext-8b19c6c3.js.map} +1 -1
- package/cjs/{VoiceMessageInputWrapper-044427b2.js → VoiceMessageInputWrapper-5dfaba8f.js} +8 -8
- package/cjs/VoiceMessageInputWrapper-5dfaba8f.js.map +1 -0
- package/cjs/VoicePlayer/context.js +3 -3
- package/cjs/VoicePlayer/useVoicePlayer.js +6 -6
- package/cjs/VoicePlayer/useVoicePlayer.js.map +1 -1
- package/cjs/VoiceRecorder/context.js +6 -6
- package/cjs/VoiceRecorder/context.js.map +1 -1
- package/cjs/VoiceRecorder/useVoiceRecorder.js +3 -2
- package/cjs/VoiceRecorder/useVoiceRecorder.js.map +1 -1
- package/cjs/{WebAudioUtils-57d7e366.js → WebAudioUtils-2bd92ed1.js} +1 -1
- package/cjs/{WebAudioUtils-57d7e366.js.map → WebAudioUtils-2bd92ed1.js.map} +1 -1
- package/cjs/{_rollupPluginBabelHelpers-4b6406c2.js → _rollupPluginBabelHelpers-596e2aef.js} +1 -1
- package/cjs/_rollupPluginBabelHelpers-596e2aef.js.map +1 -0
- package/cjs/{actionTypes-f66e00c2.js → actionTypes-29997777.js} +1 -1
- package/cjs/{actionTypes-f66e00c2.js.map → actionTypes-29997777.js.map} +1 -1
- package/cjs/{color-4904d01e.js → color-ac868fc0.js} +1 -1
- package/cjs/{color-4904d01e.js.map → color-ac868fc0.js.map} +1 -1
- package/cjs/{compareIds-de8d3b96.js → compareIds-3c9472b4.js} +2 -2
- package/cjs/compareIds-3c9472b4.js.map +1 -0
- package/cjs/{const-97ad0ae2.js → const-7b049118.js} +1 -1
- package/cjs/{const-97ad0ae2.js.map → const-7b049118.js.map} +1 -1
- package/cjs/{const-bba9510b.js → const-7d011d30.js} +1 -1
- package/cjs/{const-bba9510b.js.map → const-7d011d30.js.map} +1 -1
- package/cjs/{consts-6acebb51.js → consts-6cf0ec85.js} +1 -1
- package/cjs/{consts-6acebb51.js.map → consts-6cf0ec85.js.map} +1 -1
- package/cjs/{consts-cafff484.js → consts-9cbf147c.js} +1 -1
- package/cjs/{consts-cafff484.js.map → consts-9cbf147c.js.map} +1 -1
- package/cjs/{consts-a235ce0a.js → consts-d9ff7fec.js} +1 -1
- package/cjs/{consts-a235ce0a.js.map → consts-d9ff7fec.js.map} +1 -1
- package/cjs/{consts-cb169c09.js → consts-df222988.js} +1 -1
- package/cjs/{consts-cb169c09.js.map → consts-df222988.js.map} +1 -1
- package/cjs/{context-e6181d31.js → context-1d31dbec.js} +2 -2
- package/cjs/{context-e6181d31.js.map → context-1d31dbec.js.map} +1 -1
- package/cjs/dist/index.css +164 -163
- package/cjs/dist/index.css.map +1 -1
- package/cjs/{index-df637378.js → index-0b24e87b.js} +5 -5
- package/cjs/index-0b24e87b.js.map +1 -0
- package/cjs/{index-0514e373.js → index-0d2fba98.js} +7 -6
- package/cjs/index-0d2fba98.js.map +1 -0
- package/cjs/{index-43612435.js → index-1a324d07.js} +4 -4
- package/cjs/{index-43612435.js.map → index-1a324d07.js.map} +1 -1
- package/cjs/{index-34cc612a.js → index-263d9317.js} +5 -4
- package/cjs/index-263d9317.js.map +1 -0
- package/cjs/{index-d2bd7dc5.js → index-334b239a.js} +2 -2
- package/cjs/index-334b239a.js.map +1 -0
- package/cjs/{index-2a770f35.js → index-46b412dc.js} +37 -7
- package/cjs/index-46b412dc.js.map +1 -0
- package/cjs/{index-9f6f371b.js → index-50655872.js} +6 -6
- package/cjs/index-50655872.js.map +1 -0
- package/cjs/{index-4de6caed.js → index-551be60f.js} +16 -8
- package/cjs/index-551be60f.js.map +1 -0
- package/cjs/{index-986b886d.js → index-7ffe6f27.js} +12 -3
- package/cjs/index-7ffe6f27.js.map +1 -0
- package/cjs/{index-223d453c.js → index-8d2c0bda.js} +4 -2
- package/cjs/index-8d2c0bda.js.map +1 -0
- package/cjs/{index-b2886b93.js → index-8fc4c8ed.js} +12 -12
- package/cjs/index-8fc4c8ed.js.map +1 -0
- package/cjs/{index-ca85a10a.js → index-9dd778ed.js} +193 -56
- package/cjs/index-9dd778ed.js.map +1 -0
- package/cjs/{index-80b17a7f.js → index-bb91f996.js} +2 -2
- package/cjs/{index-80b17a7f.js.map → index-bb91f996.js.map} +1 -1
- package/cjs/{index-5fd03280.js → index-e36db682.js} +1 -1
- package/cjs/index-e36db682.js.map +1 -0
- package/cjs/{index-6d3fe482.js → index-f0938824.js} +30 -10
- package/cjs/index-f0938824.js.map +1 -0
- package/cjs/{index-2c8ca1d6.js → index-f4cf9eb5.js} +3 -3
- package/cjs/{index-2c8ca1d6.js.map → index-f4cf9eb5.js.map} +1 -1
- package/cjs/index.js +49 -49
- package/cjs/{index.module-f4ff21b1.js → index.module-2d344ee2.js} +1 -1
- package/cjs/{index.module-f4ff21b1.js.map → index.module-2d344ee2.js.map} +1 -1
- package/cjs/lame.all.js.map +1 -1
- package/cjs/sendbirdSelectors.js +3 -3
- package/cjs/sendbirdSelectors.js.map +1 -1
- package/cjs/{stringSet-2b481a03.js → stringSet-ac04b7c1.js} +1 -1
- package/cjs/{stringSet-2b481a03.js.map → stringSet-ac04b7c1.js.map} +1 -1
- package/cjs/{tokenize-07747f4c.js → tokenize-10b9c2ca.js} +27 -7
- package/cjs/tokenize-10b9c2ca.js.map +1 -0
- package/cjs/{topics-f9cf559a.js → topics-89c25bd7.js} +1 -1
- package/cjs/{topics-f9cf559a.js.map → topics-89c25bd7.js.map} +1 -1
- package/cjs/{types-3dcd9651.js → types-53455550.js} +1 -1
- package/cjs/types-53455550.js.map +1 -0
- package/cjs/ui/Accordion.js +2 -2
- package/cjs/ui/Accordion.js.map +1 -1
- package/cjs/ui/AccordionGroup.js +2 -2
- package/cjs/ui/AccordionGroup.js.map +1 -1
- package/cjs/ui/AdminMessage.js +2 -2
- package/cjs/ui/AdminMessage.js.map +1 -1
- package/cjs/ui/Avatar.js +1 -1
- package/cjs/ui/Avatar.js.map +1 -1
- package/cjs/ui/Badge.js +4 -4
- package/cjs/ui/Badge.js.map +1 -1
- package/cjs/ui/BottomSheet.js +1 -1
- package/cjs/ui/BottomSheet.js.map +1 -1
- package/cjs/ui/Button.js +2 -2
- package/cjs/ui/Button.js.map +1 -1
- package/cjs/ui/ChannelAvatar.js +2 -2
- package/cjs/ui/ChannelAvatar.js.map +1 -1
- package/cjs/ui/Checkbox.js.map +1 -1
- package/cjs/ui/ConnectionStatus.js +4 -4
- package/cjs/ui/ConnectionStatus.js.map +1 -1
- package/cjs/ui/ContextMenu.js +5 -5
- package/cjs/ui/ContextMenu.js.map +1 -1
- package/cjs/ui/DateSeparator.js +3 -3
- package/cjs/ui/DateSeparator.js.map +1 -1
- package/cjs/ui/EmojiReactions.js +7 -7
- package/cjs/ui/EmojiReactions.js.map +1 -1
- package/cjs/ui/FileMessageItemBody.js +6 -6
- package/cjs/ui/FileMessageItemBody.js.map +1 -1
- package/cjs/ui/FileViewer.js +8 -8
- package/cjs/ui/FileViewer.js.map +1 -1
- package/cjs/ui/Icon.js +2 -0
- package/cjs/ui/Icon.js.map +1 -1
- package/cjs/ui/IconButton.js +1 -1
- package/cjs/ui/IconButton.js.map +1 -1
- package/cjs/ui/ImageRenderer.js.map +1 -1
- package/cjs/ui/Input.js +2 -2
- package/cjs/ui/Input.js.map +1 -1
- package/cjs/ui/Label.js +2 -2
- package/cjs/ui/LinkLabel.js +2 -2
- package/cjs/ui/LinkLabel.js.map +1 -1
- package/cjs/ui/Loader.js.map +1 -1
- package/cjs/ui/MentionLabel.js +10 -10
- package/cjs/ui/MentionLabel.js.map +1 -1
- package/cjs/ui/MentionUserLabel.js +1 -1
- package/cjs/ui/MentionUserLabel.js.map +1 -1
- package/cjs/ui/MessageContent.js +34 -34
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageInput.js +63 -37
- package/cjs/ui/MessageInput.js.map +1 -1
- package/cjs/ui/MessageItemMenu.js +8 -8
- package/cjs/ui/MessageItemMenu.js.map +1 -1
- package/cjs/ui/MessageItemReactionMenu.js +5 -5
- package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
- package/cjs/ui/MessageSearchFileItem.js +10 -10
- package/cjs/ui/MessageSearchFileItem.js.map +1 -1
- package/cjs/ui/MessageSearchItem.js +8 -8
- package/cjs/ui/MessageSearchItem.js.map +1 -1
- package/cjs/ui/MessageStatus.js +10 -10
- package/cjs/ui/Modal.js +7 -7
- package/cjs/ui/Modal.js.map +1 -1
- package/cjs/ui/MutedAvatarOverlay.js.map +1 -1
- package/cjs/ui/OGMessageItemBody.js +14 -14
- package/cjs/ui/OGMessageItemBody.js.map +1 -1
- package/cjs/ui/OpenChannelAdminMessage.js +2 -2
- package/cjs/ui/OpenChannelAdminMessage.js.map +1 -1
- package/cjs/ui/OpenChannelAvatar.js +5 -5
- package/cjs/ui/OpenChannelAvatar.js.map +1 -1
- package/cjs/ui/OpenchannelConversationHeader.js +6 -6
- package/cjs/ui/OpenchannelConversationHeader.js.map +1 -1
- package/cjs/ui/OpenchannelFileMessage.js +15 -15
- package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
- package/cjs/ui/OpenchannelOGMessage.js +18 -18
- package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
- package/cjs/ui/OpenchannelThumbnailMessage.js +16 -16
- package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/cjs/ui/OpenchannelUserMessage.js +15 -15
- package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
- package/cjs/ui/PlaceHolder.js +5 -5
- package/cjs/ui/PlaybackTime.js +2 -2
- package/cjs/ui/PlaybackTime.js.map +1 -1
- package/cjs/ui/ProgressBar.js +1 -0
- package/cjs/ui/ProgressBar.js.map +1 -1
- package/cjs/ui/QuoteMessage.js +6 -6
- package/cjs/ui/QuoteMessage.js.map +1 -1
- package/cjs/ui/QuoteMessageInput.js +6 -6
- package/cjs/ui/QuoteMessageInput.js.map +1 -1
- package/cjs/ui/ReactionBadge.js +2 -2
- package/cjs/ui/ReactionBadge.js.map +1 -1
- package/cjs/ui/ReactionButton.js.map +1 -1
- package/cjs/ui/SortByRow.js +1 -1
- package/cjs/ui/SortByRow.js.map +1 -1
- package/cjs/ui/TextButton.js +1 -1
- package/cjs/ui/TextButton.js.map +1 -1
- package/cjs/ui/TextMessageItemBody.js +15 -15
- package/cjs/ui/TextMessageItemBody.js.map +1 -1
- package/cjs/ui/ThreadReplies.js +5 -5
- package/cjs/ui/ThreadReplies.js.map +1 -1
- package/cjs/ui/ThumbnailMessageItemBody.js +2 -2
- package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/cjs/ui/Toggle.js +1 -1
- package/cjs/ui/Toggle.js.map +1 -1
- package/cjs/ui/Tooltip.js +2 -2
- package/cjs/ui/Tooltip.js.map +1 -1
- package/cjs/ui/TooltipWrapper.js.map +1 -1
- package/cjs/ui/UnknownMessageItemBody.js +6 -6
- package/cjs/ui/UnknownMessageItemBody.js.map +1 -1
- package/cjs/ui/UserListItem.js +10 -10
- package/cjs/ui/UserListItem.js.map +1 -1
- package/cjs/ui/UserProfile.js +9 -9
- package/cjs/ui/UserProfile.js.map +1 -1
- package/cjs/ui/VoiceMessageItemBody.js +9 -9
- package/cjs/ui/VoiceMessageItemBody.js.map +1 -1
- package/cjs/ui/VoiceMessgeInput.js +7 -7
- package/cjs/ui/Word.js +13 -13
- package/cjs/ui/Word.js.map +1 -1
- package/cjs/{useLongPress-ab63a990.js → useLongPress-472493f7.js} +3 -3
- package/cjs/useLongPress-472493f7.js.map +1 -0
- package/cjs/useSendbirdStateContext.js +1 -1
- package/cjs/utils/message/getOutgoingMessageState.js.map +1 -1
- package/cjs/utils/message/isVoiceMessage.js +2 -2
- package/cjs/{utils-1fd1fe8c.js → utils-40b8c201.js} +1 -1
- package/cjs/utils-40b8c201.js.map +1 -0
- package/cjs/{utils-7e52a10a.js → utils-76562fb5.js} +2 -2
- package/cjs/{utils-7e52a10a.js.map → utils-76562fb5.js.map} +1 -1
- package/cjs/{utils-f6f55335.js → utils-eadc245c.js} +1 -1
- package/cjs/{utils-f6f55335.js.map → utils-eadc245c.js.map} +1 -1
- package/cjs/{utils-f6c4e216.js → utils-fdce7855.js} +1 -1
- package/cjs/{utils-f6c4e216.js.map → utils-fdce7855.js.map} +1 -1
- package/cjs/{uuid-d0dd45eb.js → uuid-d5eb7040.js} +1 -1
- package/cjs/{uuid-d0dd45eb.js.map → uuid-d5eb7040.js.map} +1 -1
- package/cjs/withSendbird.js +1 -1
- package/cjs/withSendbird.js.map +1 -1
- package/{color-c30f00bf.js → color-d6b38e25.js} +1 -1
- package/{color-c30f00bf.js.map → color-d6b38e25.js.map} +1 -1
- package/{compareIds-90440dc5.js → compareIds-f38c2ef0.js} +2 -2
- package/compareIds-f38c2ef0.js.map +1 -0
- package/{const-5e916a50.js → const-051188d1.js} +1 -1
- package/{const-5e916a50.js.map → const-051188d1.js.map} +1 -1
- package/{const-582ca435.js → const-f6d56818.js} +1 -1
- package/{const-582ca435.js.map → const-f6d56818.js.map} +1 -1
- package/{consts-ee90b622.js → consts-04eece0c.js} +1 -1
- package/{consts-ee90b622.js.map → consts-04eece0c.js.map} +1 -1
- package/{consts-6e63357c.js → consts-a6286ca6.js} +1 -1
- package/{consts-6e63357c.js.map → consts-a6286ca6.js.map} +1 -1
- package/{consts-35dda142.js → consts-da8a20c9.js} +1 -1
- package/{consts-35dda142.js.map → consts-da8a20c9.js.map} +1 -1
- package/{consts-a7fe5f4a.js → consts-dd1513d3.js} +1 -1
- package/{consts-a7fe5f4a.js.map → consts-dd1513d3.js.map} +1 -1
- package/{context-8a77d287.js → context-0e43d2e6.js} +2 -2
- package/{context-8a77d287.js.map → context-0e43d2e6.js.map} +1 -1
- package/dist/index.css +164 -163
- package/dist/index.css.map +1 -1
- package/{index-2bcc4298.js → index-01ac0ba4.js} +7 -6
- package/index-01ac0ba4.js.map +1 -0
- package/{index-8f5c7f74.js → index-0533e5e9.js} +2 -2
- package/index-0533e5e9.js.map +1 -0
- package/{index-1e1cb669.js → index-06784b87.js} +1 -1
- package/index-06784b87.js.map +1 -0
- package/{index-8e3a9e8c.js → index-2857db82.js} +12 -12
- package/index-2857db82.js.map +1 -0
- package/{index-062a4eeb.js → index-3f4521c1.js} +2 -2
- package/{index-062a4eeb.js.map → index-3f4521c1.js.map} +1 -1
- package/{index-4d66cb77.js → index-46f6d854.js} +38 -8
- package/index-46f6d854.js.map +1 -0
- package/{index-303eca35.js → index-5807e969.js} +16 -8
- package/index-5807e969.js.map +1 -0
- package/{index-c50c6fa2.js → index-63631dc4.js} +5 -4
- package/index-63631dc4.js.map +1 -0
- package/{index-052724d9.js → index-64473ea3.js} +12 -3
- package/index-64473ea3.js.map +1 -0
- package/{index-4668028f.js → index-74a99dc5.js} +4 -2
- package/index-74a99dc5.js.map +1 -0
- package/{index-eebbce1c.js → index-7f172012.js} +5 -5
- package/index-7f172012.js.map +1 -0
- package/{index-794e37e5.js → index-82009149.js} +30 -10
- package/index-82009149.js.map +1 -0
- package/{index-8fea9d09.js → index-8abe5fb2.js} +3 -3
- package/{index-8fea9d09.js.map → index-8abe5fb2.js.map} +1 -1
- package/{index-365a1d88.js → index-f23e2550.js} +4 -4
- package/{index-365a1d88.js.map → index-f23e2550.js.map} +1 -1
- package/{index-0cc2c241.js → index-f78cd01e.js} +6 -6
- package/index-f78cd01e.js.map +1 -0
- package/{index-6908bdd4.js → index-feffd01d.js} +193 -56
- package/index-feffd01d.js.map +1 -0
- package/index.d.ts +15 -5
- package/index.js +49 -49
- package/{index.module-3d14ef05.js → index.module-6a96cbff.js} +1 -1
- package/{index.module-3d14ef05.js.map → index.module-6a96cbff.js.map} +1 -1
- package/lame.all.js.map +1 -1
- package/package.json +15 -13
- package/sendbirdSelectors.js +3 -3
- package/sendbirdSelectors.js.map +1 -1
- package/{stringSet-da68ecef.js → stringSet-6c589018.js} +1 -1
- package/{stringSet-da68ecef.js.map → stringSet-6c589018.js.map} +1 -1
- package/{tokenize-eeb42e72.js → tokenize-b7be6252.js} +27 -7
- package/tokenize-b7be6252.js.map +1 -0
- package/{topics-0354b385.js → topics-969deff5.js} +1 -1
- package/{topics-0354b385.js.map → topics-969deff5.js.map} +1 -1
- package/{types-12d853e9.js → types-230dc5c2.js} +1 -1
- package/types-230dc5c2.js.map +1 -0
- package/ui/Accordion.js +2 -2
- package/ui/Accordion.js.map +1 -1
- package/ui/AccordionGroup.js +2 -2
- package/ui/AccordionGroup.js.map +1 -1
- package/ui/AdminMessage.js +2 -2
- package/ui/AdminMessage.js.map +1 -1
- package/ui/Avatar.js +1 -1
- package/ui/Avatar.js.map +1 -1
- package/ui/Badge.js +4 -4
- package/ui/Badge.js.map +1 -1
- package/ui/BottomSheet.js +1 -1
- package/ui/BottomSheet.js.map +1 -1
- package/ui/Button.js +2 -2
- package/ui/Button.js.map +1 -1
- package/ui/ChannelAvatar.js +2 -2
- package/ui/ChannelAvatar.js.map +1 -1
- package/ui/Checkbox.js.map +1 -1
- package/ui/ConnectionStatus.js +4 -4
- package/ui/ConnectionStatus.js.map +1 -1
- package/ui/ContextMenu.js +5 -5
- package/ui/ContextMenu.js.map +1 -1
- package/ui/DateSeparator.js +3 -3
- package/ui/DateSeparator.js.map +1 -1
- package/ui/EmojiReactions.js +7 -7
- package/ui/EmojiReactions.js.map +1 -1
- package/ui/FileMessageItemBody.js +6 -6
- package/ui/FileMessageItemBody.js.map +1 -1
- package/ui/FileViewer.js +8 -8
- package/ui/FileViewer.js.map +1 -1
- package/ui/Icon.js +2 -0
- package/ui/Icon.js.map +1 -1
- package/ui/IconButton.js +1 -1
- package/ui/IconButton.js.map +1 -1
- package/ui/ImageRenderer.js.map +1 -1
- package/ui/Input.js +2 -2
- package/ui/Input.js.map +1 -1
- package/ui/Label.js +2 -2
- package/ui/LinkLabel.js +2 -2
- package/ui/LinkLabel.js.map +1 -1
- package/ui/Loader.js.map +1 -1
- package/ui/MentionLabel.js +10 -10
- package/ui/MentionLabel.js.map +1 -1
- package/ui/MentionUserLabel.js +1 -1
- package/ui/MentionUserLabel.js.map +1 -1
- package/ui/MessageContent.js +34 -34
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageInput.js +63 -37
- package/ui/MessageInput.js.map +1 -1
- package/ui/MessageItemMenu.js +8 -8
- package/ui/MessageItemMenu.js.map +1 -1
- package/ui/MessageItemReactionMenu.js +5 -5
- package/ui/MessageItemReactionMenu.js.map +1 -1
- package/ui/MessageSearchFileItem.js +10 -10
- package/ui/MessageSearchFileItem.js.map +1 -1
- package/ui/MessageSearchItem.js +8 -8
- package/ui/MessageSearchItem.js.map +1 -1
- package/ui/MessageStatus.js +10 -10
- package/ui/Modal.js +7 -7
- package/ui/Modal.js.map +1 -1
- package/ui/MutedAvatarOverlay.js.map +1 -1
- package/ui/OGMessageItemBody.js +14 -14
- package/ui/OGMessageItemBody.js.map +1 -1
- package/ui/OpenChannelAdminMessage.js +2 -2
- package/ui/OpenChannelAdminMessage.js.map +1 -1
- package/ui/OpenChannelAvatar.js +5 -5
- package/ui/OpenChannelAvatar.js.map +1 -1
- package/ui/OpenchannelConversationHeader.js +6 -6
- package/ui/OpenchannelConversationHeader.js.map +1 -1
- package/ui/OpenchannelFileMessage.js +15 -15
- package/ui/OpenchannelFileMessage.js.map +1 -1
- package/ui/OpenchannelOGMessage.js +18 -18
- package/ui/OpenchannelOGMessage.js.map +1 -1
- package/ui/OpenchannelThumbnailMessage.js +16 -16
- package/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/ui/OpenchannelUserMessage.js +15 -15
- package/ui/OpenchannelUserMessage.js.map +1 -1
- package/ui/PlaceHolder.js +5 -5
- package/ui/PlaybackTime.js +2 -2
- package/ui/PlaybackTime.js.map +1 -1
- package/ui/ProgressBar.js +1 -0
- package/ui/ProgressBar.js.map +1 -1
- package/ui/QuoteMessage.js +6 -6
- package/ui/QuoteMessage.js.map +1 -1
- package/ui/QuoteMessageInput.js +6 -6
- package/ui/QuoteMessageInput.js.map +1 -1
- package/ui/ReactionBadge.js +2 -2
- package/ui/ReactionBadge.js.map +1 -1
- package/ui/ReactionButton.js.map +1 -1
- package/ui/SortByRow.js +1 -1
- package/ui/SortByRow.js.map +1 -1
- package/ui/TextButton.js +1 -1
- package/ui/TextButton.js.map +1 -1
- package/ui/TextMessageItemBody.js +15 -15
- package/ui/TextMessageItemBody.js.map +1 -1
- package/ui/ThreadReplies.js +5 -5
- package/ui/ThreadReplies.js.map +1 -1
- package/ui/ThumbnailMessageItemBody.js +2 -2
- package/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/ui/Toggle.js +1 -1
- package/ui/Toggle.js.map +1 -1
- package/ui/Tooltip.js +2 -2
- package/ui/Tooltip.js.map +1 -1
- package/ui/TooltipWrapper.js.map +1 -1
- package/ui/UnknownMessageItemBody.js +6 -6
- package/ui/UnknownMessageItemBody.js.map +1 -1
- package/ui/UserListItem.js +10 -10
- package/ui/UserListItem.js.map +1 -1
- package/ui/UserProfile.js +9 -9
- package/ui/UserProfile.js.map +1 -1
- package/ui/VoiceMessageItemBody.js +9 -9
- package/ui/VoiceMessageItemBody.js.map +1 -1
- package/ui/VoiceMessgeInput.js +7 -7
- package/ui/Word.js +13 -13
- package/ui/Word.js.map +1 -1
- package/{useLongPress-a8d92cab.js → useLongPress-b678c2b7.js} +3 -3
- package/useLongPress-b678c2b7.js.map +1 -0
- package/useSendbirdStateContext.js +1 -1
- package/utils/message/getOutgoingMessageState.js.map +1 -1
- package/utils/message/isVoiceMessage.js +2 -2
- package/{utils-670974e1.js → utils-3245985d.js} +1 -1
- package/utils-3245985d.js.map +1 -0
- package/{utils-63790b1a.js → utils-c29e587a.js} +2 -2
- package/{utils-63790b1a.js.map → utils-c29e587a.js.map} +1 -1
- package/{utils-c9c2364c.js → utils-d8dfc953.js} +1 -1
- package/{utils-c9c2364c.js.map → utils-d8dfc953.js.map} +1 -1
- package/{utils-2b05a56b.js → utils-f57a5756.js} +1 -1
- package/{utils-2b05a56b.js.map → utils-f57a5756.js.map} +1 -1
- package/{uuid-5c7f30bd.js → uuid-abddae2d.js} +1 -1
- package/{uuid-5c7f30bd.js.map → uuid-abddae2d.js.map} +1 -1
- package/withSendbird.js +1 -1
- package/withSendbird.js.map +1 -1
- package/ChannelListProvider-8be91a05.js.map +0 -1
- package/ChannelProvider-d643e6d9.js.map +0 -1
- package/MediaQueryContext-4e555ef5.js.map +0 -1
- package/MemberList-24b818f8.js.map +0 -1
- package/OpenChannelProvider-5148963b.js.map +0 -1
- package/ThreadProvider-96a5e77e.js.map +0 -1
- package/VoiceMessageInputWrapper-07631f8d.js.map +0 -1
- package/_rollupPluginBabelHelpers-5d0c716a.js.map +0 -1
- package/cjs/ChannelListProvider-6b61a484.js.map +0 -1
- package/cjs/ChannelProvider-12a12f31.js.map +0 -1
- package/cjs/MediaQueryContext-3b09499c.js.map +0 -1
- package/cjs/MemberList-f0c4e234.js.map +0 -1
- package/cjs/OpenChannelProvider-56846c0c.js.map +0 -1
- package/cjs/ThreadProvider-1ebd5bc0.js.map +0 -1
- package/cjs/VoiceMessageInputWrapper-044427b2.js.map +0 -1
- package/cjs/_rollupPluginBabelHelpers-4b6406c2.js.map +0 -1
- package/cjs/compareIds-de8d3b96.js.map +0 -1
- package/cjs/index-0514e373.js.map +0 -1
- package/cjs/index-223d453c.js.map +0 -1
- package/cjs/index-2a770f35.js.map +0 -1
- package/cjs/index-34cc612a.js.map +0 -1
- package/cjs/index-4de6caed.js.map +0 -1
- package/cjs/index-5fd03280.js.map +0 -1
- package/cjs/index-6d3fe482.js.map +0 -1
- package/cjs/index-986b886d.js.map +0 -1
- package/cjs/index-9f6f371b.js.map +0 -1
- package/cjs/index-b2886b93.js.map +0 -1
- package/cjs/index-ca85a10a.js.map +0 -1
- package/cjs/index-d2bd7dc5.js.map +0 -1
- package/cjs/index-df637378.js.map +0 -1
- package/cjs/tokenize-07747f4c.js.map +0 -1
- package/cjs/types-3dcd9651.js.map +0 -1
- package/cjs/useLongPress-ab63a990.js.map +0 -1
- package/cjs/utils-1fd1fe8c.js.map +0 -1
- package/compareIds-90440dc5.js.map +0 -1
- package/index-052724d9.js.map +0 -1
- package/index-0cc2c241.js.map +0 -1
- package/index-1e1cb669.js.map +0 -1
- package/index-2bcc4298.js.map +0 -1
- package/index-303eca35.js.map +0 -1
- package/index-4668028f.js.map +0 -1
- package/index-4d66cb77.js.map +0 -1
- package/index-6908bdd4.js.map +0 -1
- package/index-794e37e5.js.map +0 -1
- package/index-8e3a9e8c.js.map +0 -1
- package/index-8f5c7f74.js.map +0 -1
- package/index-c50c6fa2.js.map +0 -1
- package/index-eebbce1c.js.map +0 -1
- package/tokenize-eeb42e72.js.map +0 -1
- package/types-12d853e9.js.map +0 -1
- package/useLongPress-a8d92cab.js.map +0 -1
- package/utils-670974e1.js.map +0 -1
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
import { d as defaultLocale } from './index-
|
|
2
|
-
|
|
3
|
-
function _typeof(obj) {
|
|
4
|
-
"@babel/helpers - typeof";
|
|
5
|
-
|
|
6
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
7
|
-
return typeof obj;
|
|
8
|
-
} : function (obj) {
|
|
9
|
-
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
10
|
-
}, _typeof(obj);
|
|
11
|
-
}
|
|
1
|
+
import { d as defaultLocale } from './index-82009149.js';
|
|
12
2
|
|
|
13
3
|
function requiredArgs(required, args) {
|
|
14
4
|
if (args.length < required) {
|
|
@@ -16,6 +6,7 @@ function requiredArgs(required, args) {
|
|
|
16
6
|
}
|
|
17
7
|
}
|
|
18
8
|
|
|
9
|
+
function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof$1 = function _typeof(obj) { return typeof obj; }; } else { _typeof$1 = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof$1(obj); }
|
|
19
10
|
/**
|
|
20
11
|
* @name toDate
|
|
21
12
|
* @category Common Helpers
|
|
@@ -46,12 +37,12 @@ function requiredArgs(required, args) {
|
|
|
46
37
|
* const result = toDate(1392098430000)
|
|
47
38
|
* //=> Tue Feb 11 2014 11:30:30
|
|
48
39
|
*/
|
|
40
|
+
|
|
49
41
|
function toDate(argument) {
|
|
50
42
|
requiredArgs(1, arguments);
|
|
51
|
-
var argStr = Object.prototype.toString.call(argument);
|
|
43
|
+
var argStr = Object.prototype.toString.call(argument); // Clone the date
|
|
52
44
|
|
|
53
|
-
|
|
54
|
-
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
45
|
+
if (argument instanceof Date || _typeof$1(argument) === 'object' && argStr === '[object Date]') {
|
|
55
46
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
56
47
|
return new Date(argument.getTime());
|
|
57
48
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -59,14 +50,16 @@ function toDate(argument) {
|
|
|
59
50
|
} else {
|
|
60
51
|
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
61
52
|
// eslint-disable-next-line no-console
|
|
62
|
-
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments");
|
|
63
|
-
|
|
53
|
+
console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"); // eslint-disable-next-line no-console
|
|
54
|
+
|
|
64
55
|
console.warn(new Error().stack);
|
|
65
56
|
}
|
|
57
|
+
|
|
66
58
|
return new Date(NaN);
|
|
67
59
|
}
|
|
68
60
|
}
|
|
69
61
|
|
|
62
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
70
63
|
/**
|
|
71
64
|
* @name isDate
|
|
72
65
|
* @category Common Helpers
|
|
@@ -99,6 +92,7 @@ function toDate(argument) {
|
|
|
99
92
|
* const result = isDate({})
|
|
100
93
|
* //=> false
|
|
101
94
|
*/
|
|
95
|
+
|
|
102
96
|
function isDate(value) {
|
|
103
97
|
requiredArgs(1, arguments);
|
|
104
98
|
return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
@@ -135,11 +129,14 @@ function isDate(value) {
|
|
|
135
129
|
* const result = isValid(new Date(''))
|
|
136
130
|
* //=> false
|
|
137
131
|
*/
|
|
132
|
+
|
|
138
133
|
function isValid(dirtyDate) {
|
|
139
134
|
requiredArgs(1, arguments);
|
|
135
|
+
|
|
140
136
|
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
141
137
|
return false;
|
|
142
138
|
}
|
|
139
|
+
|
|
143
140
|
var date = toDate(dirtyDate);
|
|
144
141
|
return !isNaN(Number(date));
|
|
145
142
|
}
|
|
@@ -148,10 +145,13 @@ function toInteger(dirtyNumber) {
|
|
|
148
145
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
149
146
|
return NaN;
|
|
150
147
|
}
|
|
148
|
+
|
|
151
149
|
var number = Number(dirtyNumber);
|
|
150
|
+
|
|
152
151
|
if (isNaN(number)) {
|
|
153
152
|
return number;
|
|
154
153
|
}
|
|
154
|
+
|
|
155
155
|
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -173,6 +173,7 @@ function toInteger(dirtyNumber) {
|
|
|
173
173
|
* const result = addMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
174
174
|
* //=> Thu Jul 10 2014 12:45:30.750
|
|
175
175
|
*/
|
|
176
|
+
|
|
176
177
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
177
178
|
requiredArgs(2, arguments);
|
|
178
179
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -198,6 +199,7 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
198
199
|
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
199
200
|
* //=> Thu Jul 10 2014 12:45:29.250
|
|
200
201
|
*/
|
|
202
|
+
|
|
201
203
|
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
202
204
|
requiredArgs(2, arguments);
|
|
203
205
|
var amount = toInteger(dirtyAmount);
|
|
@@ -239,6 +241,7 @@ function getUTCISOWeekYear(dirtyDate) {
|
|
|
239
241
|
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
240
242
|
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
241
243
|
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
244
|
+
|
|
242
245
|
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
243
246
|
return year + 1;
|
|
244
247
|
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
@@ -262,11 +265,10 @@ var MILLISECONDS_IN_WEEK$1 = 604800000;
|
|
|
262
265
|
function getUTCISOWeek(dirtyDate) {
|
|
263
266
|
requiredArgs(1, arguments);
|
|
264
267
|
var date = toDate(dirtyDate);
|
|
265
|
-
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
266
|
-
|
|
267
|
-
// Round the number of days to the nearest integer
|
|
268
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime(); // Round the number of days to the nearest integer
|
|
268
269
|
// because the number of milliseconds in a week is not constant
|
|
269
270
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
271
|
+
|
|
270
272
|
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
271
273
|
}
|
|
272
274
|
|
|
@@ -277,14 +279,15 @@ function getDefaultOptions() {
|
|
|
277
279
|
|
|
278
280
|
function startOfUTCWeek(dirtyDate, options) {
|
|
279
281
|
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
282
|
+
|
|
280
283
|
requiredArgs(1, arguments);
|
|
281
284
|
var defaultOptions = getDefaultOptions();
|
|
282
|
-
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0);
|
|
285
|
+
var weekStartsOn = toInteger((_ref = (_ref2 = (_ref3 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.weekStartsOn) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.weekStartsOn) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.weekStartsOn) !== null && _ref !== void 0 ? _ref : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
283
286
|
|
|
284
|
-
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
285
287
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
286
288
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
287
289
|
}
|
|
290
|
+
|
|
288
291
|
var date = toDate(dirtyDate);
|
|
289
292
|
var day = date.getUTCDay();
|
|
290
293
|
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
@@ -295,16 +298,17 @@ function startOfUTCWeek(dirtyDate, options) {
|
|
|
295
298
|
|
|
296
299
|
function getUTCWeekYear(dirtyDate, options) {
|
|
297
300
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
301
|
+
|
|
298
302
|
requiredArgs(1, arguments);
|
|
299
303
|
var date = toDate(dirtyDate);
|
|
300
304
|
var year = date.getUTCFullYear();
|
|
301
305
|
var defaultOptions = getDefaultOptions();
|
|
302
|
-
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
306
|
+
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
303
307
|
|
|
304
|
-
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
305
308
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
306
309
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
307
310
|
}
|
|
311
|
+
|
|
308
312
|
var firstWeekOfNextYear = new Date(0);
|
|
309
313
|
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
310
314
|
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
@@ -313,6 +317,7 @@ function getUTCWeekYear(dirtyDate, options) {
|
|
|
313
317
|
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
314
318
|
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
315
319
|
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
320
|
+
|
|
316
321
|
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
317
322
|
return year + 1;
|
|
318
323
|
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
@@ -324,6 +329,7 @@ function getUTCWeekYear(dirtyDate, options) {
|
|
|
324
329
|
|
|
325
330
|
function startOfUTCWeekYear(dirtyDate, options) {
|
|
326
331
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
332
|
+
|
|
327
333
|
requiredArgs(1, arguments);
|
|
328
334
|
var defaultOptions = getDefaultOptions();
|
|
329
335
|
var firstWeekContainsDate = toInteger((_ref = (_ref2 = (_ref3 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale = options.locale) === null || _options$locale === void 0 ? void 0 : (_options$locale$optio = _options$locale.options) === null || _options$locale$optio === void 0 ? void 0 : _options$locale$optio.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : defaultOptions.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref !== void 0 ? _ref : 1);
|
|
@@ -339,20 +345,21 @@ var MILLISECONDS_IN_WEEK = 604800000;
|
|
|
339
345
|
function getUTCWeek(dirtyDate, options) {
|
|
340
346
|
requiredArgs(1, arguments);
|
|
341
347
|
var date = toDate(dirtyDate);
|
|
342
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
343
|
-
|
|
344
|
-
// Round the number of days to the nearest integer
|
|
348
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime(); // Round the number of days to the nearest integer
|
|
345
349
|
// because the number of milliseconds in a week is not constant
|
|
346
350
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
351
|
+
|
|
347
352
|
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
348
353
|
}
|
|
349
354
|
|
|
350
355
|
function addLeadingZeros(number, targetLength) {
|
|
351
356
|
var sign = number < 0 ? '-' : '';
|
|
352
357
|
var output = Math.abs(number).toString();
|
|
358
|
+
|
|
353
359
|
while (output.length < targetLength) {
|
|
354
360
|
output = '0' + output;
|
|
355
361
|
}
|
|
362
|
+
|
|
356
363
|
return sign + output;
|
|
357
364
|
}
|
|
358
365
|
|
|
@@ -368,6 +375,7 @@ function addLeadingZeros(number, targetLength) {
|
|
|
368
375
|
*
|
|
369
376
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
370
377
|
*/
|
|
378
|
+
|
|
371
379
|
var formatters$2 = {
|
|
372
380
|
// Year
|
|
373
381
|
y: function y(date, token) {
|
|
@@ -379,9 +387,8 @@ var formatters$2 = {
|
|
|
379
387
|
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
380
388
|
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
381
389
|
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
390
|
+
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
382
391
|
|
|
383
|
-
var signedYear = date.getUTCFullYear();
|
|
384
|
-
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
385
392
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
386
393
|
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
387
394
|
},
|
|
@@ -397,14 +404,18 @@ var formatters$2 = {
|
|
|
397
404
|
// AM or PM
|
|
398
405
|
a: function a(date, token) {
|
|
399
406
|
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
407
|
+
|
|
400
408
|
switch (token) {
|
|
401
409
|
case 'a':
|
|
402
410
|
case 'aa':
|
|
403
411
|
return dayPeriodEnumValue.toUpperCase();
|
|
412
|
+
|
|
404
413
|
case 'aaa':
|
|
405
414
|
return dayPeriodEnumValue;
|
|
415
|
+
|
|
406
416
|
case 'aaaaa':
|
|
407
417
|
return dayPeriodEnumValue[0];
|
|
418
|
+
|
|
408
419
|
case 'aaaa':
|
|
409
420
|
default:
|
|
410
421
|
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
@@ -445,6 +456,7 @@ var dayPeriodEnum = {
|
|
|
445
456
|
evening: 'evening',
|
|
446
457
|
night: 'night'
|
|
447
458
|
};
|
|
459
|
+
|
|
448
460
|
/*
|
|
449
461
|
* | | Unit | | Unit |
|
|
450
462
|
* |-----|--------------------------------|-----|--------------------------------|
|
|
@@ -490,11 +502,11 @@ var dayPeriodEnum = {
|
|
|
490
502
|
* - `P` is long localized date format
|
|
491
503
|
* - `p` is long localized time format
|
|
492
504
|
*/
|
|
493
|
-
|
|
494
505
|
var formatters = {
|
|
495
506
|
// Era
|
|
496
507
|
G: function G(date, token, localize) {
|
|
497
508
|
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
509
|
+
|
|
498
510
|
switch (token) {
|
|
499
511
|
// AD, BC
|
|
500
512
|
case 'G':
|
|
@@ -504,11 +516,13 @@ var formatters = {
|
|
|
504
516
|
width: 'abbreviated'
|
|
505
517
|
});
|
|
506
518
|
// A, B
|
|
519
|
+
|
|
507
520
|
case 'GGGGG':
|
|
508
521
|
return localize.era(era, {
|
|
509
522
|
width: 'narrow'
|
|
510
523
|
});
|
|
511
524
|
// Anno Domini, Before Christ
|
|
525
|
+
|
|
512
526
|
case 'GGGG':
|
|
513
527
|
default:
|
|
514
528
|
return localize.era(era, {
|
|
@@ -520,42 +534,41 @@ var formatters = {
|
|
|
520
534
|
y: function y(date, token, localize) {
|
|
521
535
|
// Ordinal number
|
|
522
536
|
if (token === 'yo') {
|
|
523
|
-
var signedYear = date.getUTCFullYear();
|
|
524
|
-
|
|
537
|
+
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
538
|
+
|
|
525
539
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
526
540
|
return localize.ordinalNumber(year, {
|
|
527
541
|
unit: 'year'
|
|
528
542
|
});
|
|
529
543
|
}
|
|
544
|
+
|
|
530
545
|
return formatters$2.y(date, token);
|
|
531
546
|
},
|
|
532
547
|
// Local week-numbering year
|
|
533
548
|
Y: function Y(date, token, localize, options) {
|
|
534
|
-
var signedWeekYear = getUTCWeekYear(date, options);
|
|
535
|
-
|
|
536
|
-
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
549
|
+
var signedWeekYear = getUTCWeekYear(date, options); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
550
|
+
|
|
551
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear; // Two digit year
|
|
537
552
|
|
|
538
|
-
// Two digit year
|
|
539
553
|
if (token === 'YY') {
|
|
540
554
|
var twoDigitYear = weekYear % 100;
|
|
541
555
|
return addLeadingZeros(twoDigitYear, 2);
|
|
542
|
-
}
|
|
556
|
+
} // Ordinal number
|
|
557
|
+
|
|
543
558
|
|
|
544
|
-
// Ordinal number
|
|
545
559
|
if (token === 'Yo') {
|
|
546
560
|
return localize.ordinalNumber(weekYear, {
|
|
547
561
|
unit: 'year'
|
|
548
562
|
});
|
|
549
|
-
}
|
|
563
|
+
} // Padding
|
|
564
|
+
|
|
550
565
|
|
|
551
|
-
// Padding
|
|
552
566
|
return addLeadingZeros(weekYear, token.length);
|
|
553
567
|
},
|
|
554
568
|
// ISO week-numbering year
|
|
555
569
|
R: function R(date, token) {
|
|
556
|
-
var isoWeekYear = getUTCISOWeekYear(date);
|
|
570
|
+
var isoWeekYear = getUTCISOWeekYear(date); // Padding
|
|
557
571
|
|
|
558
|
-
// Padding
|
|
559
572
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
560
573
|
},
|
|
561
574
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -574,31 +587,37 @@ var formatters = {
|
|
|
574
587
|
// Quarter
|
|
575
588
|
Q: function Q(date, token, localize) {
|
|
576
589
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
590
|
+
|
|
577
591
|
switch (token) {
|
|
578
592
|
// 1, 2, 3, 4
|
|
579
593
|
case 'Q':
|
|
580
594
|
return String(quarter);
|
|
581
595
|
// 01, 02, 03, 04
|
|
596
|
+
|
|
582
597
|
case 'QQ':
|
|
583
598
|
return addLeadingZeros(quarter, 2);
|
|
584
599
|
// 1st, 2nd, 3rd, 4th
|
|
600
|
+
|
|
585
601
|
case 'Qo':
|
|
586
602
|
return localize.ordinalNumber(quarter, {
|
|
587
603
|
unit: 'quarter'
|
|
588
604
|
});
|
|
589
605
|
// Q1, Q2, Q3, Q4
|
|
606
|
+
|
|
590
607
|
case 'QQQ':
|
|
591
608
|
return localize.quarter(quarter, {
|
|
592
609
|
width: 'abbreviated',
|
|
593
610
|
context: 'formatting'
|
|
594
611
|
});
|
|
595
612
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
613
|
+
|
|
596
614
|
case 'QQQQQ':
|
|
597
615
|
return localize.quarter(quarter, {
|
|
598
616
|
width: 'narrow',
|
|
599
617
|
context: 'formatting'
|
|
600
618
|
});
|
|
601
619
|
// 1st quarter, 2nd quarter, ...
|
|
620
|
+
|
|
602
621
|
case 'QQQQ':
|
|
603
622
|
default:
|
|
604
623
|
return localize.quarter(quarter, {
|
|
@@ -610,31 +629,37 @@ var formatters = {
|
|
|
610
629
|
// Stand-alone quarter
|
|
611
630
|
q: function q(date, token, localize) {
|
|
612
631
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
632
|
+
|
|
613
633
|
switch (token) {
|
|
614
634
|
// 1, 2, 3, 4
|
|
615
635
|
case 'q':
|
|
616
636
|
return String(quarter);
|
|
617
637
|
// 01, 02, 03, 04
|
|
638
|
+
|
|
618
639
|
case 'qq':
|
|
619
640
|
return addLeadingZeros(quarter, 2);
|
|
620
641
|
// 1st, 2nd, 3rd, 4th
|
|
642
|
+
|
|
621
643
|
case 'qo':
|
|
622
644
|
return localize.ordinalNumber(quarter, {
|
|
623
645
|
unit: 'quarter'
|
|
624
646
|
});
|
|
625
647
|
// Q1, Q2, Q3, Q4
|
|
648
|
+
|
|
626
649
|
case 'qqq':
|
|
627
650
|
return localize.quarter(quarter, {
|
|
628
651
|
width: 'abbreviated',
|
|
629
652
|
context: 'standalone'
|
|
630
653
|
});
|
|
631
654
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
655
|
+
|
|
632
656
|
case 'qqqqq':
|
|
633
657
|
return localize.quarter(quarter, {
|
|
634
658
|
width: 'narrow',
|
|
635
659
|
context: 'standalone'
|
|
636
660
|
});
|
|
637
661
|
// 1st quarter, 2nd quarter, ...
|
|
662
|
+
|
|
638
663
|
case 'qqqq':
|
|
639
664
|
default:
|
|
640
665
|
return localize.quarter(quarter, {
|
|
@@ -646,28 +671,33 @@ var formatters = {
|
|
|
646
671
|
// Month
|
|
647
672
|
M: function M(date, token, localize) {
|
|
648
673
|
var month = date.getUTCMonth();
|
|
674
|
+
|
|
649
675
|
switch (token) {
|
|
650
676
|
case 'M':
|
|
651
677
|
case 'MM':
|
|
652
678
|
return formatters$2.M(date, token);
|
|
653
679
|
// 1st, 2nd, ..., 12th
|
|
680
|
+
|
|
654
681
|
case 'Mo':
|
|
655
682
|
return localize.ordinalNumber(month + 1, {
|
|
656
683
|
unit: 'month'
|
|
657
684
|
});
|
|
658
685
|
// Jan, Feb, ..., Dec
|
|
686
|
+
|
|
659
687
|
case 'MMM':
|
|
660
688
|
return localize.month(month, {
|
|
661
689
|
width: 'abbreviated',
|
|
662
690
|
context: 'formatting'
|
|
663
691
|
});
|
|
664
692
|
// J, F, ..., D
|
|
693
|
+
|
|
665
694
|
case 'MMMMM':
|
|
666
695
|
return localize.month(month, {
|
|
667
696
|
width: 'narrow',
|
|
668
697
|
context: 'formatting'
|
|
669
698
|
});
|
|
670
699
|
// January, February, ..., December
|
|
700
|
+
|
|
671
701
|
case 'MMMM':
|
|
672
702
|
default:
|
|
673
703
|
return localize.month(month, {
|
|
@@ -679,31 +709,37 @@ var formatters = {
|
|
|
679
709
|
// Stand-alone month
|
|
680
710
|
L: function L(date, token, localize) {
|
|
681
711
|
var month = date.getUTCMonth();
|
|
712
|
+
|
|
682
713
|
switch (token) {
|
|
683
714
|
// 1, 2, ..., 12
|
|
684
715
|
case 'L':
|
|
685
716
|
return String(month + 1);
|
|
686
717
|
// 01, 02, ..., 12
|
|
718
|
+
|
|
687
719
|
case 'LL':
|
|
688
720
|
return addLeadingZeros(month + 1, 2);
|
|
689
721
|
// 1st, 2nd, ..., 12th
|
|
722
|
+
|
|
690
723
|
case 'Lo':
|
|
691
724
|
return localize.ordinalNumber(month + 1, {
|
|
692
725
|
unit: 'month'
|
|
693
726
|
});
|
|
694
727
|
// Jan, Feb, ..., Dec
|
|
728
|
+
|
|
695
729
|
case 'LLL':
|
|
696
730
|
return localize.month(month, {
|
|
697
731
|
width: 'abbreviated',
|
|
698
732
|
context: 'standalone'
|
|
699
733
|
});
|
|
700
734
|
// J, F, ..., D
|
|
735
|
+
|
|
701
736
|
case 'LLLLL':
|
|
702
737
|
return localize.month(month, {
|
|
703
738
|
width: 'narrow',
|
|
704
739
|
context: 'standalone'
|
|
705
740
|
});
|
|
706
741
|
// January, February, ..., December
|
|
742
|
+
|
|
707
743
|
case 'LLLL':
|
|
708
744
|
default:
|
|
709
745
|
return localize.month(month, {
|
|
@@ -715,21 +751,25 @@ var formatters = {
|
|
|
715
751
|
// Local week of year
|
|
716
752
|
w: function w(date, token, localize, options) {
|
|
717
753
|
var week = getUTCWeek(date, options);
|
|
754
|
+
|
|
718
755
|
if (token === 'wo') {
|
|
719
756
|
return localize.ordinalNumber(week, {
|
|
720
757
|
unit: 'week'
|
|
721
758
|
});
|
|
722
759
|
}
|
|
760
|
+
|
|
723
761
|
return addLeadingZeros(week, token.length);
|
|
724
762
|
},
|
|
725
763
|
// ISO week of year
|
|
726
764
|
I: function I(date, token, localize) {
|
|
727
765
|
var isoWeek = getUTCISOWeek(date);
|
|
766
|
+
|
|
728
767
|
if (token === 'Io') {
|
|
729
768
|
return localize.ordinalNumber(isoWeek, {
|
|
730
769
|
unit: 'week'
|
|
731
770
|
});
|
|
732
771
|
}
|
|
772
|
+
|
|
733
773
|
return addLeadingZeros(isoWeek, token.length);
|
|
734
774
|
},
|
|
735
775
|
// Day of the month
|
|
@@ -739,21 +779,25 @@ var formatters = {
|
|
|
739
779
|
unit: 'date'
|
|
740
780
|
});
|
|
741
781
|
}
|
|
782
|
+
|
|
742
783
|
return formatters$2.d(date, token);
|
|
743
784
|
},
|
|
744
785
|
// Day of year
|
|
745
786
|
D: function D(date, token, localize) {
|
|
746
787
|
var dayOfYear = getUTCDayOfYear(date);
|
|
788
|
+
|
|
747
789
|
if (token === 'Do') {
|
|
748
790
|
return localize.ordinalNumber(dayOfYear, {
|
|
749
791
|
unit: 'dayOfYear'
|
|
750
792
|
});
|
|
751
793
|
}
|
|
794
|
+
|
|
752
795
|
return addLeadingZeros(dayOfYear, token.length);
|
|
753
796
|
},
|
|
754
797
|
// Day of week
|
|
755
798
|
E: function E(date, token, localize) {
|
|
756
799
|
var dayOfWeek = date.getUTCDay();
|
|
800
|
+
|
|
757
801
|
switch (token) {
|
|
758
802
|
// Tue
|
|
759
803
|
case 'E':
|
|
@@ -764,18 +808,21 @@ var formatters = {
|
|
|
764
808
|
context: 'formatting'
|
|
765
809
|
});
|
|
766
810
|
// T
|
|
811
|
+
|
|
767
812
|
case 'EEEEE':
|
|
768
813
|
return localize.day(dayOfWeek, {
|
|
769
814
|
width: 'narrow',
|
|
770
815
|
context: 'formatting'
|
|
771
816
|
});
|
|
772
817
|
// Tu
|
|
818
|
+
|
|
773
819
|
case 'EEEEEE':
|
|
774
820
|
return localize.day(dayOfWeek, {
|
|
775
821
|
width: 'short',
|
|
776
822
|
context: 'formatting'
|
|
777
823
|
});
|
|
778
824
|
// Tuesday
|
|
825
|
+
|
|
779
826
|
case 'EEEE':
|
|
780
827
|
default:
|
|
781
828
|
return localize.day(dayOfWeek, {
|
|
@@ -788,36 +835,43 @@ var formatters = {
|
|
|
788
835
|
e: function e(date, token, localize, options) {
|
|
789
836
|
var dayOfWeek = date.getUTCDay();
|
|
790
837
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
838
|
+
|
|
791
839
|
switch (token) {
|
|
792
840
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
793
841
|
case 'e':
|
|
794
842
|
return String(localDayOfWeek);
|
|
795
843
|
// Padded numerical value
|
|
844
|
+
|
|
796
845
|
case 'ee':
|
|
797
846
|
return addLeadingZeros(localDayOfWeek, 2);
|
|
798
847
|
// 1st, 2nd, ..., 7th
|
|
848
|
+
|
|
799
849
|
case 'eo':
|
|
800
850
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
801
851
|
unit: 'day'
|
|
802
852
|
});
|
|
853
|
+
|
|
803
854
|
case 'eee':
|
|
804
855
|
return localize.day(dayOfWeek, {
|
|
805
856
|
width: 'abbreviated',
|
|
806
857
|
context: 'formatting'
|
|
807
858
|
});
|
|
808
859
|
// T
|
|
860
|
+
|
|
809
861
|
case 'eeeee':
|
|
810
862
|
return localize.day(dayOfWeek, {
|
|
811
863
|
width: 'narrow',
|
|
812
864
|
context: 'formatting'
|
|
813
865
|
});
|
|
814
866
|
// Tu
|
|
867
|
+
|
|
815
868
|
case 'eeeeee':
|
|
816
869
|
return localize.day(dayOfWeek, {
|
|
817
870
|
width: 'short',
|
|
818
871
|
context: 'formatting'
|
|
819
872
|
});
|
|
820
873
|
// Tuesday
|
|
874
|
+
|
|
821
875
|
case 'eeee':
|
|
822
876
|
default:
|
|
823
877
|
return localize.day(dayOfWeek, {
|
|
@@ -830,36 +884,43 @@ var formatters = {
|
|
|
830
884
|
c: function c(date, token, localize, options) {
|
|
831
885
|
var dayOfWeek = date.getUTCDay();
|
|
832
886
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
887
|
+
|
|
833
888
|
switch (token) {
|
|
834
889
|
// Numerical value (same as in `e`)
|
|
835
890
|
case 'c':
|
|
836
891
|
return String(localDayOfWeek);
|
|
837
892
|
// Padded numerical value
|
|
893
|
+
|
|
838
894
|
case 'cc':
|
|
839
895
|
return addLeadingZeros(localDayOfWeek, token.length);
|
|
840
896
|
// 1st, 2nd, ..., 7th
|
|
897
|
+
|
|
841
898
|
case 'co':
|
|
842
899
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
843
900
|
unit: 'day'
|
|
844
901
|
});
|
|
902
|
+
|
|
845
903
|
case 'ccc':
|
|
846
904
|
return localize.day(dayOfWeek, {
|
|
847
905
|
width: 'abbreviated',
|
|
848
906
|
context: 'standalone'
|
|
849
907
|
});
|
|
850
908
|
// T
|
|
909
|
+
|
|
851
910
|
case 'ccccc':
|
|
852
911
|
return localize.day(dayOfWeek, {
|
|
853
912
|
width: 'narrow',
|
|
854
913
|
context: 'standalone'
|
|
855
914
|
});
|
|
856
915
|
// Tu
|
|
916
|
+
|
|
857
917
|
case 'cccccc':
|
|
858
918
|
return localize.day(dayOfWeek, {
|
|
859
919
|
width: 'short',
|
|
860
920
|
context: 'standalone'
|
|
861
921
|
});
|
|
862
922
|
// Tuesday
|
|
923
|
+
|
|
863
924
|
case 'cccc':
|
|
864
925
|
default:
|
|
865
926
|
return localize.day(dayOfWeek, {
|
|
@@ -872,37 +933,44 @@ var formatters = {
|
|
|
872
933
|
i: function i(date, token, localize) {
|
|
873
934
|
var dayOfWeek = date.getUTCDay();
|
|
874
935
|
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
936
|
+
|
|
875
937
|
switch (token) {
|
|
876
938
|
// 2
|
|
877
939
|
case 'i':
|
|
878
940
|
return String(isoDayOfWeek);
|
|
879
941
|
// 02
|
|
942
|
+
|
|
880
943
|
case 'ii':
|
|
881
944
|
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
882
945
|
// 2nd
|
|
946
|
+
|
|
883
947
|
case 'io':
|
|
884
948
|
return localize.ordinalNumber(isoDayOfWeek, {
|
|
885
949
|
unit: 'day'
|
|
886
950
|
});
|
|
887
951
|
// Tue
|
|
952
|
+
|
|
888
953
|
case 'iii':
|
|
889
954
|
return localize.day(dayOfWeek, {
|
|
890
955
|
width: 'abbreviated',
|
|
891
956
|
context: 'formatting'
|
|
892
957
|
});
|
|
893
958
|
// T
|
|
959
|
+
|
|
894
960
|
case 'iiiii':
|
|
895
961
|
return localize.day(dayOfWeek, {
|
|
896
962
|
width: 'narrow',
|
|
897
963
|
context: 'formatting'
|
|
898
964
|
});
|
|
899
965
|
// Tu
|
|
966
|
+
|
|
900
967
|
case 'iiiiii':
|
|
901
968
|
return localize.day(dayOfWeek, {
|
|
902
969
|
width: 'short',
|
|
903
970
|
context: 'formatting'
|
|
904
971
|
});
|
|
905
972
|
// Tuesday
|
|
973
|
+
|
|
906
974
|
case 'iiii':
|
|
907
975
|
default:
|
|
908
976
|
return localize.day(dayOfWeek, {
|
|
@@ -915,6 +983,7 @@ var formatters = {
|
|
|
915
983
|
a: function a(date, token, localize) {
|
|
916
984
|
var hours = date.getUTCHours();
|
|
917
985
|
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
986
|
+
|
|
918
987
|
switch (token) {
|
|
919
988
|
case 'a':
|
|
920
989
|
case 'aa':
|
|
@@ -922,16 +991,19 @@ var formatters = {
|
|
|
922
991
|
width: 'abbreviated',
|
|
923
992
|
context: 'formatting'
|
|
924
993
|
});
|
|
994
|
+
|
|
925
995
|
case 'aaa':
|
|
926
996
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
927
997
|
width: 'abbreviated',
|
|
928
998
|
context: 'formatting'
|
|
929
999
|
}).toLowerCase();
|
|
1000
|
+
|
|
930
1001
|
case 'aaaaa':
|
|
931
1002
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
932
1003
|
width: 'narrow',
|
|
933
1004
|
context: 'formatting'
|
|
934
1005
|
});
|
|
1006
|
+
|
|
935
1007
|
case 'aaaa':
|
|
936
1008
|
default:
|
|
937
1009
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
@@ -944,6 +1016,7 @@ var formatters = {
|
|
|
944
1016
|
b: function b(date, token, localize) {
|
|
945
1017
|
var hours = date.getUTCHours();
|
|
946
1018
|
var dayPeriodEnumValue;
|
|
1019
|
+
|
|
947
1020
|
if (hours === 12) {
|
|
948
1021
|
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
949
1022
|
} else if (hours === 0) {
|
|
@@ -951,6 +1024,7 @@ var formatters = {
|
|
|
951
1024
|
} else {
|
|
952
1025
|
dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
953
1026
|
}
|
|
1027
|
+
|
|
954
1028
|
switch (token) {
|
|
955
1029
|
case 'b':
|
|
956
1030
|
case 'bb':
|
|
@@ -958,16 +1032,19 @@ var formatters = {
|
|
|
958
1032
|
width: 'abbreviated',
|
|
959
1033
|
context: 'formatting'
|
|
960
1034
|
});
|
|
1035
|
+
|
|
961
1036
|
case 'bbb':
|
|
962
1037
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
963
1038
|
width: 'abbreviated',
|
|
964
1039
|
context: 'formatting'
|
|
965
1040
|
}).toLowerCase();
|
|
1041
|
+
|
|
966
1042
|
case 'bbbbb':
|
|
967
1043
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
968
1044
|
width: 'narrow',
|
|
969
1045
|
context: 'formatting'
|
|
970
1046
|
});
|
|
1047
|
+
|
|
971
1048
|
case 'bbbb':
|
|
972
1049
|
default:
|
|
973
1050
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
@@ -980,6 +1057,7 @@ var formatters = {
|
|
|
980
1057
|
B: function B(date, token, localize) {
|
|
981
1058
|
var hours = date.getUTCHours();
|
|
982
1059
|
var dayPeriodEnumValue;
|
|
1060
|
+
|
|
983
1061
|
if (hours >= 17) {
|
|
984
1062
|
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
985
1063
|
} else if (hours >= 12) {
|
|
@@ -989,6 +1067,7 @@ var formatters = {
|
|
|
989
1067
|
} else {
|
|
990
1068
|
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
991
1069
|
}
|
|
1070
|
+
|
|
992
1071
|
switch (token) {
|
|
993
1072
|
case 'B':
|
|
994
1073
|
case 'BB':
|
|
@@ -997,11 +1076,13 @@ var formatters = {
|
|
|
997
1076
|
width: 'abbreviated',
|
|
998
1077
|
context: 'formatting'
|
|
999
1078
|
});
|
|
1079
|
+
|
|
1000
1080
|
case 'BBBBB':
|
|
1001
1081
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
1002
1082
|
width: 'narrow',
|
|
1003
1083
|
context: 'formatting'
|
|
1004
1084
|
});
|
|
1085
|
+
|
|
1005
1086
|
case 'BBBB':
|
|
1006
1087
|
default:
|
|
1007
1088
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
@@ -1019,6 +1100,7 @@ var formatters = {
|
|
|
1019
1100
|
unit: 'hour'
|
|
1020
1101
|
});
|
|
1021
1102
|
}
|
|
1103
|
+
|
|
1022
1104
|
return formatters$2.h(date, token);
|
|
1023
1105
|
},
|
|
1024
1106
|
// Hour [0-23]
|
|
@@ -1028,27 +1110,32 @@ var formatters = {
|
|
|
1028
1110
|
unit: 'hour'
|
|
1029
1111
|
});
|
|
1030
1112
|
}
|
|
1113
|
+
|
|
1031
1114
|
return formatters$2.H(date, token);
|
|
1032
1115
|
},
|
|
1033
1116
|
// Hour [0-11]
|
|
1034
1117
|
K: function K(date, token, localize) {
|
|
1035
1118
|
var hours = date.getUTCHours() % 12;
|
|
1119
|
+
|
|
1036
1120
|
if (token === 'Ko') {
|
|
1037
1121
|
return localize.ordinalNumber(hours, {
|
|
1038
1122
|
unit: 'hour'
|
|
1039
1123
|
});
|
|
1040
1124
|
}
|
|
1125
|
+
|
|
1041
1126
|
return addLeadingZeros(hours, token.length);
|
|
1042
1127
|
},
|
|
1043
1128
|
// Hour [1-24]
|
|
1044
1129
|
k: function k(date, token, localize) {
|
|
1045
1130
|
var hours = date.getUTCHours();
|
|
1046
1131
|
if (hours === 0) hours = 24;
|
|
1132
|
+
|
|
1047
1133
|
if (token === 'ko') {
|
|
1048
1134
|
return localize.ordinalNumber(hours, {
|
|
1049
1135
|
unit: 'hour'
|
|
1050
1136
|
});
|
|
1051
1137
|
}
|
|
1138
|
+
|
|
1052
1139
|
return addLeadingZeros(hours, token.length);
|
|
1053
1140
|
},
|
|
1054
1141
|
// Minute
|
|
@@ -1058,6 +1145,7 @@ var formatters = {
|
|
|
1058
1145
|
unit: 'minute'
|
|
1059
1146
|
});
|
|
1060
1147
|
}
|
|
1148
|
+
|
|
1061
1149
|
return formatters$2.m(date, token);
|
|
1062
1150
|
},
|
|
1063
1151
|
// Second
|
|
@@ -1067,6 +1155,7 @@ var formatters = {
|
|
|
1067
1155
|
unit: 'second'
|
|
1068
1156
|
});
|
|
1069
1157
|
}
|
|
1158
|
+
|
|
1070
1159
|
return formatters$2.s(date, token);
|
|
1071
1160
|
},
|
|
1072
1161
|
// Fraction of second
|
|
@@ -1077,27 +1166,30 @@ var formatters = {
|
|
|
1077
1166
|
X: function X(date, token, _localize, options) {
|
|
1078
1167
|
var originalDate = options._originalDate || date;
|
|
1079
1168
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1169
|
+
|
|
1080
1170
|
if (timezoneOffset === 0) {
|
|
1081
1171
|
return 'Z';
|
|
1082
1172
|
}
|
|
1173
|
+
|
|
1083
1174
|
switch (token) {
|
|
1084
1175
|
// Hours and optional minutes
|
|
1085
1176
|
case 'X':
|
|
1086
1177
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1087
|
-
|
|
1088
1178
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1089
1179
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1090
1180
|
// so this token always has the same output as `XX`
|
|
1181
|
+
|
|
1091
1182
|
case 'XXXX':
|
|
1092
1183
|
case 'XX':
|
|
1093
1184
|
// Hours and minutes without `:` delimiter
|
|
1094
1185
|
return formatTimezone(timezoneOffset);
|
|
1095
|
-
|
|
1096
1186
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1097
1187
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1098
1188
|
// so this token always has the same output as `XXX`
|
|
1189
|
+
|
|
1099
1190
|
case 'XXXXX':
|
|
1100
1191
|
case 'XXX': // Hours and minutes with `:` delimiter
|
|
1192
|
+
|
|
1101
1193
|
default:
|
|
1102
1194
|
return formatTimezone(timezoneOffset, ':');
|
|
1103
1195
|
}
|
|
@@ -1106,24 +1198,26 @@ var formatters = {
|
|
|
1106
1198
|
x: function x(date, token, _localize, options) {
|
|
1107
1199
|
var originalDate = options._originalDate || date;
|
|
1108
1200
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1201
|
+
|
|
1109
1202
|
switch (token) {
|
|
1110
1203
|
// Hours and optional minutes
|
|
1111
1204
|
case 'x':
|
|
1112
1205
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1113
|
-
|
|
1114
1206
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1115
1207
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1116
1208
|
// so this token always has the same output as `xx`
|
|
1209
|
+
|
|
1117
1210
|
case 'xxxx':
|
|
1118
1211
|
case 'xx':
|
|
1119
1212
|
// Hours and minutes without `:` delimiter
|
|
1120
1213
|
return formatTimezone(timezoneOffset);
|
|
1121
|
-
|
|
1122
1214
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1123
1215
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1124
1216
|
// so this token always has the same output as `xxx`
|
|
1217
|
+
|
|
1125
1218
|
case 'xxxxx':
|
|
1126
1219
|
case 'xxx': // Hours and minutes with `:` delimiter
|
|
1220
|
+
|
|
1127
1221
|
default:
|
|
1128
1222
|
return formatTimezone(timezoneOffset, ':');
|
|
1129
1223
|
}
|
|
@@ -1132,6 +1226,7 @@ var formatters = {
|
|
|
1132
1226
|
O: function O(date, token, _localize, options) {
|
|
1133
1227
|
var originalDate = options._originalDate || date;
|
|
1134
1228
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1229
|
+
|
|
1135
1230
|
switch (token) {
|
|
1136
1231
|
// Short
|
|
1137
1232
|
case 'O':
|
|
@@ -1139,6 +1234,7 @@ var formatters = {
|
|
|
1139
1234
|
case 'OOO':
|
|
1140
1235
|
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
1141
1236
|
// Long
|
|
1237
|
+
|
|
1142
1238
|
case 'OOOO':
|
|
1143
1239
|
default:
|
|
1144
1240
|
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
@@ -1148,6 +1244,7 @@ var formatters = {
|
|
|
1148
1244
|
z: function z(date, token, _localize, options) {
|
|
1149
1245
|
var originalDate = options._originalDate || date;
|
|
1150
1246
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1247
|
+
|
|
1151
1248
|
switch (token) {
|
|
1152
1249
|
// Short
|
|
1153
1250
|
case 'z':
|
|
@@ -1155,6 +1252,7 @@ var formatters = {
|
|
|
1155
1252
|
case 'zzz':
|
|
1156
1253
|
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
1157
1254
|
// Long
|
|
1255
|
+
|
|
1158
1256
|
case 'zzzz':
|
|
1159
1257
|
default:
|
|
1160
1258
|
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
@@ -1173,24 +1271,30 @@ var formatters = {
|
|
|
1173
1271
|
return addLeadingZeros(timestamp, token.length);
|
|
1174
1272
|
}
|
|
1175
1273
|
};
|
|
1274
|
+
|
|
1176
1275
|
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
1177
1276
|
var sign = offset > 0 ? '-' : '+';
|
|
1178
1277
|
var absOffset = Math.abs(offset);
|
|
1179
1278
|
var hours = Math.floor(absOffset / 60);
|
|
1180
1279
|
var minutes = absOffset % 60;
|
|
1280
|
+
|
|
1181
1281
|
if (minutes === 0) {
|
|
1182
1282
|
return sign + String(hours);
|
|
1183
1283
|
}
|
|
1284
|
+
|
|
1184
1285
|
var delimiter = dirtyDelimiter || '';
|
|
1185
1286
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
1186
1287
|
}
|
|
1288
|
+
|
|
1187
1289
|
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
1188
1290
|
if (offset % 60 === 0) {
|
|
1189
1291
|
var sign = offset > 0 ? '-' : '+';
|
|
1190
1292
|
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
1191
1293
|
}
|
|
1294
|
+
|
|
1192
1295
|
return formatTimezone(offset, dirtyDelimiter);
|
|
1193
1296
|
}
|
|
1297
|
+
|
|
1194
1298
|
function formatTimezone(offset, dirtyDelimiter) {
|
|
1195
1299
|
var delimiter = dirtyDelimiter || '';
|
|
1196
1300
|
var sign = offset > 0 ? '-' : '+';
|
|
@@ -1199,6 +1303,7 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1199
1303
|
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1200
1304
|
return sign + hours + delimiter + minutes;
|
|
1201
1305
|
}
|
|
1306
|
+
|
|
1202
1307
|
var formatters$1 = formatters;
|
|
1203
1308
|
|
|
1204
1309
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
@@ -1207,14 +1312,17 @@ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
|
1207
1312
|
return formatLong.date({
|
|
1208
1313
|
width: 'short'
|
|
1209
1314
|
});
|
|
1315
|
+
|
|
1210
1316
|
case 'PP':
|
|
1211
1317
|
return formatLong.date({
|
|
1212
1318
|
width: 'medium'
|
|
1213
1319
|
});
|
|
1320
|
+
|
|
1214
1321
|
case 'PPP':
|
|
1215
1322
|
return formatLong.date({
|
|
1216
1323
|
width: 'long'
|
|
1217
1324
|
});
|
|
1325
|
+
|
|
1218
1326
|
case 'PPPP':
|
|
1219
1327
|
default:
|
|
1220
1328
|
return formatLong.date({
|
|
@@ -1222,20 +1330,24 @@ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
|
1222
1330
|
});
|
|
1223
1331
|
}
|
|
1224
1332
|
};
|
|
1333
|
+
|
|
1225
1334
|
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
1226
1335
|
switch (pattern) {
|
|
1227
1336
|
case 'p':
|
|
1228
1337
|
return formatLong.time({
|
|
1229
1338
|
width: 'short'
|
|
1230
1339
|
});
|
|
1340
|
+
|
|
1231
1341
|
case 'pp':
|
|
1232
1342
|
return formatLong.time({
|
|
1233
1343
|
width: 'medium'
|
|
1234
1344
|
});
|
|
1345
|
+
|
|
1235
1346
|
case 'ppp':
|
|
1236
1347
|
return formatLong.time({
|
|
1237
1348
|
width: 'long'
|
|
1238
1349
|
});
|
|
1350
|
+
|
|
1239
1351
|
case 'pppp':
|
|
1240
1352
|
default:
|
|
1241
1353
|
return formatLong.time({
|
|
@@ -1243,30 +1355,37 @@ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
|
1243
1355
|
});
|
|
1244
1356
|
}
|
|
1245
1357
|
};
|
|
1358
|
+
|
|
1246
1359
|
var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
|
|
1247
1360
|
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
1248
1361
|
var datePattern = matchResult[1];
|
|
1249
1362
|
var timePattern = matchResult[2];
|
|
1363
|
+
|
|
1250
1364
|
if (!timePattern) {
|
|
1251
1365
|
return dateLongFormatter(pattern, formatLong);
|
|
1252
1366
|
}
|
|
1367
|
+
|
|
1253
1368
|
var dateTimeFormat;
|
|
1369
|
+
|
|
1254
1370
|
switch (datePattern) {
|
|
1255
1371
|
case 'P':
|
|
1256
1372
|
dateTimeFormat = formatLong.dateTime({
|
|
1257
1373
|
width: 'short'
|
|
1258
1374
|
});
|
|
1259
1375
|
break;
|
|
1376
|
+
|
|
1260
1377
|
case 'PP':
|
|
1261
1378
|
dateTimeFormat = formatLong.dateTime({
|
|
1262
1379
|
width: 'medium'
|
|
1263
1380
|
});
|
|
1264
1381
|
break;
|
|
1382
|
+
|
|
1265
1383
|
case 'PPP':
|
|
1266
1384
|
dateTimeFormat = formatLong.dateTime({
|
|
1267
1385
|
width: 'long'
|
|
1268
1386
|
});
|
|
1269
1387
|
break;
|
|
1388
|
+
|
|
1270
1389
|
case 'PPPP':
|
|
1271
1390
|
default:
|
|
1272
1391
|
dateTimeFormat = formatLong.dateTime({
|
|
@@ -1274,8 +1393,10 @@ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong)
|
|
|
1274
1393
|
});
|
|
1275
1394
|
break;
|
|
1276
1395
|
}
|
|
1396
|
+
|
|
1277
1397
|
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
1278
1398
|
};
|
|
1399
|
+
|
|
1279
1400
|
var longFormatters = {
|
|
1280
1401
|
p: timeLongFormatter,
|
|
1281
1402
|
P: dateTimeLongFormatter
|
|
@@ -1329,15 +1450,14 @@ function throwProtectedError(token, format, input) {
|
|
|
1329
1450
|
// If there is no matching single quote
|
|
1330
1451
|
// then the sequence will continue until the end of the string.
|
|
1331
1452
|
// - . matches any single character unmatched by previous parts of the RegExps
|
|
1332
|
-
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1333
1453
|
|
|
1334
|
-
// This RegExp catches symbols escaped by quotes, and also
|
|
1454
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g; // This RegExp catches symbols escaped by quotes, and also
|
|
1335
1455
|
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
1456
|
+
|
|
1336
1457
|
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1337
1458
|
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
1338
1459
|
var doubleQuoteRegExp = /''/g;
|
|
1339
1460
|
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
1340
|
-
|
|
1341
1461
|
/**
|
|
1342
1462
|
* @name format
|
|
1343
1463
|
* @category Common Helpers
|
|
@@ -1632,36 +1752,40 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
1632
1752
|
|
|
1633
1753
|
function format(dirtyDate, dirtyFormatStr, options) {
|
|
1634
1754
|
var _ref, _options$locale, _ref2, _ref3, _ref4, _options$firstWeekCon, _options$locale2, _options$locale2$opti, _defaultOptions$local, _defaultOptions$local2, _ref5, _ref6, _ref7, _options$weekStartsOn, _options$locale3, _options$locale3$opti, _defaultOptions$local3, _defaultOptions$local4;
|
|
1755
|
+
|
|
1635
1756
|
requiredArgs(2, arguments);
|
|
1636
1757
|
var formatStr = String(dirtyFormatStr);
|
|
1637
1758
|
var defaultOptions = getDefaultOptions();
|
|
1638
1759
|
var locale = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : defaultLocale;
|
|
1639
|
-
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1);
|
|
1760
|
+
var firstWeekContainsDate = toInteger((_ref2 = (_ref3 = (_ref4 = (_options$firstWeekCon = options === null || options === void 0 ? void 0 : options.firstWeekContainsDate) !== null && _options$firstWeekCon !== void 0 ? _options$firstWeekCon : options === null || options === void 0 ? void 0 : (_options$locale2 = options.locale) === null || _options$locale2 === void 0 ? void 0 : (_options$locale2$opti = _options$locale2.options) === null || _options$locale2$opti === void 0 ? void 0 : _options$locale2$opti.firstWeekContainsDate) !== null && _ref4 !== void 0 ? _ref4 : defaultOptions.firstWeekContainsDate) !== null && _ref3 !== void 0 ? _ref3 : (_defaultOptions$local = defaultOptions.locale) === null || _defaultOptions$local === void 0 ? void 0 : (_defaultOptions$local2 = _defaultOptions$local.options) === null || _defaultOptions$local2 === void 0 ? void 0 : _defaultOptions$local2.firstWeekContainsDate) !== null && _ref2 !== void 0 ? _ref2 : 1); // Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
1640
1761
|
|
|
1641
|
-
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
1642
1762
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
1643
1763
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
1644
1764
|
}
|
|
1645
|
-
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0);
|
|
1646
1765
|
|
|
1647
|
-
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
1766
|
+
var weekStartsOn = toInteger((_ref5 = (_ref6 = (_ref7 = (_options$weekStartsOn = options === null || options === void 0 ? void 0 : options.weekStartsOn) !== null && _options$weekStartsOn !== void 0 ? _options$weekStartsOn : options === null || options === void 0 ? void 0 : (_options$locale3 = options.locale) === null || _options$locale3 === void 0 ? void 0 : (_options$locale3$opti = _options$locale3.options) === null || _options$locale3$opti === void 0 ? void 0 : _options$locale3$opti.weekStartsOn) !== null && _ref7 !== void 0 ? _ref7 : defaultOptions.weekStartsOn) !== null && _ref6 !== void 0 ? _ref6 : (_defaultOptions$local3 = defaultOptions.locale) === null || _defaultOptions$local3 === void 0 ? void 0 : (_defaultOptions$local4 = _defaultOptions$local3.options) === null || _defaultOptions$local4 === void 0 ? void 0 : _defaultOptions$local4.weekStartsOn) !== null && _ref5 !== void 0 ? _ref5 : 0); // Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
1767
|
+
|
|
1648
1768
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
1649
1769
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
1650
1770
|
}
|
|
1771
|
+
|
|
1651
1772
|
if (!locale.localize) {
|
|
1652
1773
|
throw new RangeError('locale must contain localize property');
|
|
1653
1774
|
}
|
|
1775
|
+
|
|
1654
1776
|
if (!locale.formatLong) {
|
|
1655
1777
|
throw new RangeError('locale must contain formatLong property');
|
|
1656
1778
|
}
|
|
1779
|
+
|
|
1657
1780
|
var originalDate = toDate(dirtyDate);
|
|
1781
|
+
|
|
1658
1782
|
if (!isValid(originalDate)) {
|
|
1659
1783
|
throw new RangeError('Invalid time value');
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
// Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
1784
|
+
} // Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
1663
1785
|
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
1664
1786
|
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
1787
|
+
|
|
1788
|
+
|
|
1665
1789
|
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
1666
1790
|
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
1667
1791
|
var formatterOptions = {
|
|
@@ -1672,44 +1796,57 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
1672
1796
|
};
|
|
1673
1797
|
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
1674
1798
|
var firstCharacter = substring[0];
|
|
1799
|
+
|
|
1675
1800
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
1676
1801
|
var longFormatter = longFormatters$1[firstCharacter];
|
|
1677
1802
|
return longFormatter(substring, locale.formatLong);
|
|
1678
1803
|
}
|
|
1804
|
+
|
|
1679
1805
|
return substring;
|
|
1680
1806
|
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
1681
1807
|
// Replace two single quote characters with one single quote character
|
|
1682
1808
|
if (substring === "''") {
|
|
1683
1809
|
return "'";
|
|
1684
1810
|
}
|
|
1811
|
+
|
|
1685
1812
|
var firstCharacter = substring[0];
|
|
1813
|
+
|
|
1686
1814
|
if (firstCharacter === "'") {
|
|
1687
1815
|
return cleanEscapedString(substring);
|
|
1688
1816
|
}
|
|
1817
|
+
|
|
1689
1818
|
var formatter = formatters$1[firstCharacter];
|
|
1819
|
+
|
|
1690
1820
|
if (formatter) {
|
|
1691
1821
|
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
1692
1822
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
1693
1823
|
}
|
|
1824
|
+
|
|
1694
1825
|
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
1695
1826
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
1696
1827
|
}
|
|
1828
|
+
|
|
1697
1829
|
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
1698
1830
|
}
|
|
1831
|
+
|
|
1699
1832
|
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
1700
1833
|
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
1701
1834
|
}
|
|
1835
|
+
|
|
1702
1836
|
return substring;
|
|
1703
1837
|
}).join('');
|
|
1704
1838
|
return result;
|
|
1705
1839
|
}
|
|
1840
|
+
|
|
1706
1841
|
function cleanEscapedString(input) {
|
|
1707
1842
|
var matched = input.match(escapedStringRegExp);
|
|
1843
|
+
|
|
1708
1844
|
if (!matched) {
|
|
1709
1845
|
return input;
|
|
1710
1846
|
}
|
|
1847
|
+
|
|
1711
1848
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
1712
1849
|
}
|
|
1713
1850
|
|
|
1714
1851
|
export { toInteger as a, format as f, requiredArgs as r, toDate as t };
|
|
1715
|
-
//# sourceMappingURL=index-
|
|
1852
|
+
//# sourceMappingURL=index-feffd01d.js.map
|