@sendbird/uikit-react 3.4.6 → 3.4.7-0
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 +177 -172
- package/App.js.map +1 -1
- package/Channel/components/ChannelHeader.js +44 -39
- package/Channel/components/ChannelHeader.js.map +1 -1
- package/Channel/components/ChannelUI.js +63 -61
- package/Channel/components/ChannelUI.js.map +1 -1
- package/Channel/components/FileViewer.js +52 -46
- package/Channel/components/FileViewer.js.map +1 -1
- package/Channel/components/FrozenNotification.js +12 -9
- package/Channel/components/FrozenNotification.js.map +1 -1
- package/Channel/components/Message.js +165 -183
- package/Channel/components/Message.js.map +1 -1
- package/Channel/components/MessageInput.js +106 -113
- package/Channel/components/MessageInput.js.map +1 -1
- package/Channel/components/MessageList.js +128 -130
- package/Channel/components/MessageList.js.map +1 -1
- package/Channel/components/RemoveMessageModal.js +32 -28
- package/Channel/components/RemoveMessageModal.js.map +1 -1
- package/Channel/components/SuggestedMentionList.js +134 -153
- package/Channel/components/SuggestedMentionList.js.map +1 -1
- package/Channel/components/TypingIndicator.js +43 -42
- package/Channel/components/TypingIndicator.js.map +1 -1
- package/Channel/components/UnreadCount.js +18 -16
- package/Channel/components/UnreadCount.js.map +1 -1
- package/Channel/context.js +13 -14
- package/Channel/context.js.map +1 -1
- package/Channel.js +39 -40
- package/Channel.js.map +1 -1
- package/ChannelList/components/AddChannel.js +27 -29
- package/ChannelList/components/AddChannel.js.map +1 -1
- package/ChannelList/components/ChannelListHeader.js +30 -21
- package/ChannelList/components/ChannelListHeader.js.map +1 -1
- package/ChannelList/components/ChannelListUI.js +91 -98
- package/ChannelList/components/ChannelListUI.js.map +1 -1
- package/ChannelList/components/ChannelPreview.js +70 -73
- package/ChannelList/components/ChannelPreview.js.map +1 -1
- package/ChannelList/components/ChannelPreviewAction.js +30 -30
- package/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/ChannelList/context.js +7 -8
- package/ChannelList/context.js.map +1 -1
- package/ChannelList.js +30 -31
- package/ChannelList.js.map +1 -1
- package/{ChannelListProvider-a2f2ee4a.js → ChannelListProvider-c1d2f942.js} +160 -156
- package/ChannelListProvider-c1d2f942.js.map +1 -0
- package/{ChannelProvider-bb459e82.js → ChannelProvider-4ab3a851.js} +429 -412
- package/ChannelProvider-4ab3a851.js.map +1 -0
- package/ChannelSettings/components/ChannelProfile.js +33 -37
- package/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/ChannelSettings/components/ChannelSettingsUI.js +45 -40
- package/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/ChannelSettings/components/EditDetailsModal.js +47 -48
- package/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/ChannelSettings/components/LeaveChannel.js +38 -35
- package/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/ChannelSettings/components/ModerationPanel.js +511 -556
- package/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/ChannelSettings/components/UserListItem.js +69 -69
- package/ChannelSettings/components/UserListItem.js.map +1 -1
- package/ChannelSettings/components/UserPanel.js +25 -27
- package/ChannelSettings/components/UserPanel.js.map +1 -1
- package/ChannelSettings/context.js +53 -49
- package/ChannelSettings/context.js.map +1 -1
- package/ChannelSettings.js +19 -18
- package/ChannelSettings.js.map +1 -1
- package/CreateChannel/components/CreateChannelUI.js +24 -21
- package/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/CreateChannel/components/InviteUsers.js +92 -93
- package/CreateChannel/components/InviteUsers.js.map +1 -1
- package/CreateChannel/components/SelectChannelType.js +41 -35
- package/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/CreateChannel/context.js +4 -4
- package/CreateChannel.js +22 -20
- package/CreateChannel.js.map +1 -1
- package/CreateChannelProvider-d2188082.js +44 -0
- package/CreateChannelProvider-d2188082.js.map +1 -0
- package/CreateOpenChannel/components/CreateOpenChannelUI.js +33 -34
- package/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
- package/CreateOpenChannel/context.js +33 -28
- package/CreateOpenChannel/context.js.map +1 -1
- package/CreateOpenChannel.js +18 -16
- package/CreateOpenChannel.js.map +1 -1
- package/EditUserProfile/components/EditUserProfileUI.js +12 -12
- package/EditUserProfile/context.js.map +1 -1
- package/EditUserProfile.js +18 -16
- package/EditUserProfile.js.map +1 -1
- package/LocalizationContext-9c54e783.js +20 -0
- package/{LocalizationContext-3d8c0b24.js.map → LocalizationContext-9c54e783.js.map} +1 -1
- package/MediaQueryContext-1988a4bc.js +82 -0
- package/MediaQueryContext-1988a4bc.js.map +1 -0
- package/MemberList-80ea8604.js +395 -0
- package/MemberList-80ea8604.js.map +1 -0
- package/Message/context.js +11 -10
- package/Message/context.js.map +1 -1
- package/MessageSearch/components/MessageSearchUI.js +59 -54
- package/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/MessageSearch/context.js +176 -165
- package/MessageSearch/context.js.map +1 -1
- package/MessageSearch.js +45 -47
- package/MessageSearch.js.map +1 -1
- package/OpenChannel/components/FrozenChannelNotification.js +8 -6
- package/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
- package/OpenChannel/components/OpenChannelHeader.js +27 -22
- package/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/OpenChannel/components/OpenChannelInput.js +32 -28
- package/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessage.js +171 -172
- package/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/OpenChannel/components/OpenChannelMessageList.js +60 -65
- package/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/OpenChannel/components/OpenChannelUI.js +50 -48
- package/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/OpenChannel/context.js +8 -8
- package/OpenChannel.js +32 -33
- package/OpenChannel.js.map +1 -1
- package/OpenChannelList/components/OpenChannelListUI.js +58 -59
- package/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
- package/OpenChannelList/components/OpenChannelPreview.js +21 -22
- package/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
- package/OpenChannelList/context.js +3 -3
- package/OpenChannelList.js +24 -23
- package/OpenChannelList.js.map +1 -1
- package/{OpenChannelListProvider-f9ec8658.js → OpenChannelListProvider-c76663eb.js} +177 -155
- package/OpenChannelListProvider-c76663eb.js.map +1 -0
- package/OpenChannelProvider-fe3326aa.js +1883 -0
- package/{cjs/OpenChannelProvider-850b9cd0.js.map → OpenChannelProvider-fe3326aa.js.map} +1 -1
- package/OpenChannelSettings/components/EditDetailsModal.js +46 -46
- package/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelProfile.js +26 -26
- package/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js +45 -36
- package/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/OpenChannelSettings/components/OperatorUI.js +508 -533
- package/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/OpenChannelSettings/components/ParticipantUI.js +15 -15
- package/OpenChannelSettings/context.js +54 -56
- package/OpenChannelSettings/context.js.map +1 -1
- package/OpenChannelSettings.js +19 -19
- package/OpenChannelSettings.js.map +1 -1
- package/RemoveMessageModal-99b5bab4.js +36 -0
- package/RemoveMessageModal-99b5bab4.js.map +1 -0
- package/SendbirdProvider.js +546 -405
- package/SendbirdProvider.js.map +1 -1
- package/Thread/components/ParentMessageInfo.js +157 -170
- package/Thread/components/ParentMessageInfo.js.map +1 -1
- package/Thread/components/ParentMessageInfoItem.js +68 -62
- package/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/Thread/components/ThreadHeader.js +22 -22
- package/Thread/components/ThreadHeader.js.map +1 -1
- package/Thread/components/ThreadList.js +82 -77
- package/Thread/components/ThreadList.js.map +1 -1
- package/Thread/components/ThreadListItem.js +208 -219
- package/Thread/components/ThreadListItem.js.map +1 -1
- package/Thread/components/ThreadMessageInput.js +103 -105
- package/Thread/components/ThreadMessageInput.js.map +1 -1
- package/Thread/components/ThreadUI.js +130 -116
- package/Thread/components/ThreadUI.js.map +1 -1
- package/Thread/context/types.js +9 -9
- package/Thread/context/types.js.map +1 -1
- package/Thread/context.js +8 -8
- package/Thread.js +55 -55
- package/Thread.js.map +1 -1
- package/ThreadProvider-0a3c5f37.js +1692 -0
- package/ThreadProvider-0a3c5f37.js.map +1 -0
- package/{UserProfileContext-41938ddc.js → UserProfileContext-a8aa4c0f.js} +1 -1
- package/{UserProfileContext-41938ddc.js.map → UserProfileContext-a8aa4c0f.js.map} +1 -1
- package/{VoiceMessageInputWrapper-0cd90994.js → VoiceMessageInputWrapper-ff160b51.js} +60 -59
- package/VoiceMessageInputWrapper-ff160b51.js.map +1 -0
- package/VoicePlayer/context.js +3 -3
- package/VoicePlayer/useVoicePlayer.js +38 -43
- package/VoicePlayer/useVoicePlayer.js.map +1 -1
- package/VoiceRecorder/context.js +46 -45
- package/VoiceRecorder/context.js.map +1 -1
- package/VoiceRecorder/useVoiceRecorder.js +43 -40
- package/VoiceRecorder/useVoiceRecorder.js.map +1 -1
- package/{WebAudioUtils-682aa6c0.js → WebAudioUtils-5f08f354.js} +37 -37
- package/{WebAudioUtils-682aa6c0.js.map → WebAudioUtils-5f08f354.js.map} +1 -1
- package/{_rollupPluginBabelHelpers-79f64283.js → _rollupPluginBabelHelpers-b2d9bfc5.js} +2 -2
- package/_rollupPluginBabelHelpers-b2d9bfc5.js.map +1 -0
- package/{actionTypes-52102db0.js → actionTypes-e436fe6c.js} +2 -2
- package/{actionTypes-52102db0.js.map → actionTypes-e436fe6c.js.map} +1 -1
- package/cjs/App.js +177 -172
- package/cjs/App.js.map +1 -1
- package/cjs/Channel/components/ChannelHeader.js +44 -39
- package/cjs/Channel/components/ChannelHeader.js.map +1 -1
- package/cjs/Channel/components/ChannelUI.js +63 -61
- package/cjs/Channel/components/ChannelUI.js.map +1 -1
- package/cjs/Channel/components/FileViewer.js +52 -46
- package/cjs/Channel/components/FileViewer.js.map +1 -1
- package/cjs/Channel/components/FrozenNotification.js +12 -9
- package/cjs/Channel/components/FrozenNotification.js.map +1 -1
- package/cjs/Channel/components/Message.js +165 -183
- package/cjs/Channel/components/Message.js.map +1 -1
- package/cjs/Channel/components/MessageInput.js +106 -113
- package/cjs/Channel/components/MessageInput.js.map +1 -1
- package/cjs/Channel/components/MessageList.js +128 -130
- package/cjs/Channel/components/MessageList.js.map +1 -1
- package/cjs/Channel/components/RemoveMessageModal.js +32 -28
- package/cjs/Channel/components/RemoveMessageModal.js.map +1 -1
- package/cjs/Channel/components/SuggestedMentionList.js +134 -153
- package/cjs/Channel/components/SuggestedMentionList.js.map +1 -1
- package/cjs/Channel/components/TypingIndicator.js +43 -42
- package/cjs/Channel/components/TypingIndicator.js.map +1 -1
- package/cjs/Channel/components/UnreadCount.js +18 -16
- package/cjs/Channel/components/UnreadCount.js.map +1 -1
- package/cjs/Channel/context.js +14 -18
- package/cjs/Channel/context.js.map +1 -1
- package/cjs/Channel.js +39 -40
- package/cjs/Channel.js.map +1 -1
- package/cjs/ChannelList/components/AddChannel.js +27 -29
- package/cjs/ChannelList/components/AddChannel.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListHeader.js +30 -21
- package/cjs/ChannelList/components/ChannelListHeader.js.map +1 -1
- package/cjs/ChannelList/components/ChannelListUI.js +91 -98
- package/cjs/ChannelList/components/ChannelListUI.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreview.js +70 -73
- package/cjs/ChannelList/components/ChannelPreview.js.map +1 -1
- package/cjs/ChannelList/components/ChannelPreviewAction.js +30 -30
- package/cjs/ChannelList/components/ChannelPreviewAction.js.map +1 -1
- package/cjs/ChannelList/context.js +7 -8
- package/cjs/ChannelList/context.js.map +1 -1
- package/cjs/ChannelList.js +30 -31
- package/cjs/ChannelList.js.map +1 -1
- package/cjs/{ChannelListProvider-b0a363e0.js → ChannelListProvider-61d644da.js} +160 -156
- package/cjs/ChannelListProvider-61d644da.js.map +1 -0
- package/cjs/{ChannelProvider-cf5867c2.js → ChannelProvider-620bb354.js} +430 -412
- package/cjs/ChannelProvider-620bb354.js.map +1 -0
- package/cjs/ChannelSettings/components/ChannelProfile.js +33 -37
- package/cjs/ChannelSettings/components/ChannelProfile.js.map +1 -1
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js +45 -40
- package/cjs/ChannelSettings/components/ChannelSettingsUI.js.map +1 -1
- package/cjs/ChannelSettings/components/EditDetailsModal.js +47 -48
- package/cjs/ChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/ChannelSettings/components/LeaveChannel.js +38 -35
- package/cjs/ChannelSettings/components/LeaveChannel.js.map +1 -1
- package/cjs/ChannelSettings/components/ModerationPanel.js +511 -556
- package/cjs/ChannelSettings/components/ModerationPanel.js.map +1 -1
- package/cjs/ChannelSettings/components/UserListItem.js +69 -69
- package/cjs/ChannelSettings/components/UserListItem.js.map +1 -1
- package/cjs/ChannelSettings/components/UserPanel.js +25 -27
- package/cjs/ChannelSettings/components/UserPanel.js.map +1 -1
- package/cjs/ChannelSettings/context.js +53 -49
- package/cjs/ChannelSettings/context.js.map +1 -1
- package/cjs/ChannelSettings.js +19 -18
- package/cjs/ChannelSettings.js.map +1 -1
- package/cjs/CreateChannel/components/CreateChannelUI.js +24 -21
- package/cjs/CreateChannel/components/CreateChannelUI.js.map +1 -1
- package/cjs/CreateChannel/components/InviteUsers.js +92 -93
- package/cjs/CreateChannel/components/InviteUsers.js.map +1 -1
- package/cjs/CreateChannel/components/SelectChannelType.js +41 -35
- package/cjs/CreateChannel/components/SelectChannelType.js.map +1 -1
- package/cjs/CreateChannel/context.js +4 -4
- package/cjs/CreateChannel.js +22 -20
- package/cjs/CreateChannel.js.map +1 -1
- package/cjs/CreateChannelProvider-88b316a6.js +52 -0
- package/cjs/CreateChannelProvider-88b316a6.js.map +1 -0
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js +33 -34
- package/cjs/CreateOpenChannel/components/CreateOpenChannelUI.js.map +1 -1
- package/cjs/CreateOpenChannel/context.js +33 -28
- package/cjs/CreateOpenChannel/context.js.map +1 -1
- package/cjs/CreateOpenChannel.js +18 -16
- 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 +18 -16
- package/cjs/EditUserProfile.js.map +1 -1
- package/cjs/{LocalizationContext-498cb747.js → LocalizationContext-af96cf5f.js} +9 -9
- package/cjs/{LocalizationContext-498cb747.js.map → LocalizationContext-af96cf5f.js.map} +1 -1
- package/cjs/MediaQueryContext-8ec3f647.js +89 -0
- package/cjs/MediaQueryContext-8ec3f647.js.map +1 -0
- package/cjs/MemberList-7513f386.js +401 -0
- package/cjs/MemberList-7513f386.js.map +1 -0
- package/cjs/Message/context.js +11 -10
- package/cjs/Message/context.js.map +1 -1
- package/cjs/MessageSearch/components/MessageSearchUI.js +59 -54
- package/cjs/MessageSearch/components/MessageSearchUI.js.map +1 -1
- package/cjs/MessageSearch/context.js +176 -165
- package/cjs/MessageSearch/context.js.map +1 -1
- package/cjs/MessageSearch.js +45 -47
- package/cjs/MessageSearch.js.map +1 -1
- package/cjs/OpenChannel/components/FrozenChannelNotification.js +8 -6
- package/cjs/OpenChannel/components/FrozenChannelNotification.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelHeader.js +27 -22
- package/cjs/OpenChannel/components/OpenChannelHeader.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelInput.js +32 -28
- package/cjs/OpenChannel/components/OpenChannelInput.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessage.js +171 -172
- package/cjs/OpenChannel/components/OpenChannelMessage.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelMessageList.js +60 -65
- package/cjs/OpenChannel/components/OpenChannelMessageList.js.map +1 -1
- package/cjs/OpenChannel/components/OpenChannelUI.js +50 -48
- package/cjs/OpenChannel/components/OpenChannelUI.js.map +1 -1
- package/cjs/OpenChannel/context.js +8 -8
- package/cjs/OpenChannel.js +32 -33
- package/cjs/OpenChannel.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelListUI.js +58 -59
- package/cjs/OpenChannelList/components/OpenChannelListUI.js.map +1 -1
- package/cjs/OpenChannelList/components/OpenChannelPreview.js +21 -22
- package/cjs/OpenChannelList/components/OpenChannelPreview.js.map +1 -1
- package/cjs/OpenChannelList/context.js +3 -3
- package/cjs/OpenChannelList.js +24 -23
- package/cjs/OpenChannelList.js.map +1 -1
- package/cjs/OpenChannelListProvider-e78bf867.js +439 -0
- package/cjs/OpenChannelListProvider-e78bf867.js.map +1 -0
- package/cjs/OpenChannelProvider-ea1d7b37.js +1892 -0
- package/cjs/OpenChannelProvider-ea1d7b37.js.map +1 -0
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js +46 -46
- package/cjs/OpenChannelSettings/components/EditDetailsModal.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js +26 -26
- package/cjs/OpenChannelSettings/components/OpenChannelProfile.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js +45 -36
- package/cjs/OpenChannelSettings/components/OpenChannelSettingsUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/OperatorUI.js +508 -533
- package/cjs/OpenChannelSettings/components/OperatorUI.js.map +1 -1
- package/cjs/OpenChannelSettings/components/ParticipantUI.js +15 -15
- package/cjs/OpenChannelSettings/context.js +54 -56
- package/cjs/OpenChannelSettings/context.js.map +1 -1
- package/cjs/OpenChannelSettings.js +19 -19
- package/cjs/OpenChannelSettings.js.map +1 -1
- package/cjs/{RemoveMessageModal-457b1535.js → RemoveMessageModal-15d1dcbd.js} +19 -13
- package/cjs/RemoveMessageModal-15d1dcbd.js.map +1 -0
- package/cjs/SendbirdProvider.js +546 -405
- package/cjs/SendbirdProvider.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfo.js +157 -170
- package/cjs/Thread/components/ParentMessageInfo.js.map +1 -1
- package/cjs/Thread/components/ParentMessageInfoItem.js +68 -62
- package/cjs/Thread/components/ParentMessageInfoItem.js.map +1 -1
- package/cjs/Thread/components/ThreadHeader.js +22 -22
- package/cjs/Thread/components/ThreadHeader.js.map +1 -1
- package/cjs/Thread/components/ThreadList.js +82 -77
- package/cjs/Thread/components/ThreadList.js.map +1 -1
- package/cjs/Thread/components/ThreadListItem.js +208 -219
- package/cjs/Thread/components/ThreadListItem.js.map +1 -1
- package/cjs/Thread/components/ThreadMessageInput.js +103 -105
- package/cjs/Thread/components/ThreadMessageInput.js.map +1 -1
- package/cjs/Thread/components/ThreadUI.js +130 -116
- package/cjs/Thread/components/ThreadUI.js.map +1 -1
- package/cjs/Thread/context/types.js +13 -9
- package/cjs/Thread/context/types.js.map +1 -1
- package/cjs/Thread/context.js +8 -8
- package/cjs/Thread.js +55 -55
- package/cjs/Thread.js.map +1 -1
- package/cjs/ThreadProvider-572574d7.js +1701 -0
- package/cjs/ThreadProvider-572574d7.js.map +1 -0
- package/cjs/{UserProfileContext-617420c9.js → UserProfileContext-f068b0ba.js} +1 -1
- package/cjs/{UserProfileContext-617420c9.js.map → UserProfileContext-f068b0ba.js.map} +1 -1
- package/cjs/{VoiceMessageInputWrapper-43c29f38.js → VoiceMessageInputWrapper-db7f2b72.js} +60 -59
- package/cjs/VoiceMessageInputWrapper-db7f2b72.js.map +1 -0
- package/cjs/VoicePlayer/context.js +3 -3
- package/cjs/VoicePlayer/useVoicePlayer.js +38 -43
- package/cjs/VoicePlayer/useVoicePlayer.js.map +1 -1
- package/cjs/VoiceRecorder/context.js +46 -45
- package/cjs/VoiceRecorder/context.js.map +1 -1
- package/cjs/VoiceRecorder/useVoiceRecorder.js +43 -40
- package/cjs/VoiceRecorder/useVoiceRecorder.js.map +1 -1
- package/cjs/{WebAudioUtils-2b845cd2.js → WebAudioUtils-043bdeca.js} +37 -37
- package/cjs/{WebAudioUtils-2b845cd2.js.map → WebAudioUtils-043bdeca.js.map} +1 -1
- package/cjs/{_rollupPluginBabelHelpers-c2313dcd.js → _rollupPluginBabelHelpers-c5955c81.js} +2 -1
- package/cjs/_rollupPluginBabelHelpers-c5955c81.js.map +1 -0
- package/cjs/{actionTypes-0e0d2d59.js → actionTypes-f2efbb7c.js} +2 -2
- package/cjs/{actionTypes-0e0d2d59.js.map → actionTypes-f2efbb7c.js.map} +1 -1
- package/cjs/{color-7f7508e6.js → color-afeb8dc2.js} +13 -12
- package/cjs/color-afeb8dc2.js.map +1 -0
- package/cjs/{compareIds-27f7912f.js → compareIds-18b3b1d6.js} +1 -1
- package/cjs/{compareIds-27f7912f.js.map → compareIds-18b3b1d6.js.map} +1 -1
- package/cjs/const-6691e574.js +20 -0
- package/cjs/const-6691e574.js.map +1 -0
- package/cjs/{const-61fc7be6.js → const-ab0f6056.js} +4 -4
- package/cjs/{const-61fc7be6.js.map → const-ab0f6056.js.map} +1 -1
- package/cjs/consts-6ec77e9a.js +6 -0
- package/cjs/consts-6ec77e9a.js.map +1 -0
- package/cjs/consts-a422c2f9.js +6 -0
- package/cjs/{consts-46fa3a3a.js.map → consts-a422c2f9.js.map} +1 -1
- package/cjs/{consts-8605e767.js → consts-a5382bc1.js} +18 -14
- package/cjs/{consts-8605e767.js.map → consts-a5382bc1.js.map} +1 -1
- package/cjs/consts-bc27beff.js +6 -0
- package/cjs/{consts-ad849467.js.map → consts-bc27beff.js.map} +1 -1
- package/cjs/{context-a4af6955.js → context-60c4d3b7.js} +6 -5
- package/cjs/{context-a4af6955.js.map → context-60c4d3b7.js.map} +1 -1
- package/cjs/dist/index.css +197 -93
- package/cjs/dist/index.css.map +1 -1
- package/cjs/handlers/OpenChannelHandler.js.map +1 -1
- package/cjs/handlers/SessionHandler.js.map +1 -1
- package/cjs/index-0b344bd7.js +57 -0
- package/cjs/index-0b344bd7.js.map +1 -0
- package/cjs/{index-ac1b0ab9.js → index-4ee95667.js} +2 -4
- package/cjs/index-4ee95667.js.map +1 -0
- package/cjs/{index-67f813a3.js → index-68c57136.js} +1 -1
- package/cjs/{index-67f813a3.js.map → index-68c57136.js.map} +1 -1
- package/cjs/{index-a4887600.js → index-6cb4a530.js} +3 -12
- package/cjs/index-6cb4a530.js.map +1 -0
- package/cjs/{index-b8a20afd.js → index-73643285.js} +2 -2
- package/cjs/{index-b8a20afd.js.map → index-73643285.js.map} +1 -1
- package/cjs/index-76afc309.js +197 -0
- package/cjs/index-76afc309.js.map +1 -0
- package/cjs/{index-3626dfeb.js → index-8049c2a3.js} +22 -15
- package/cjs/index-8049c2a3.js.map +1 -0
- package/cjs/{index-8b6bb1ee.js → index-83d1d15e.js} +10 -30
- package/cjs/index-83d1d15e.js.map +1 -0
- package/cjs/{index-0dff9958.js → index-900dd19f.js} +37 -27
- package/cjs/index-900dd19f.js.map +1 -0
- package/cjs/index-9d518988.js +292 -0
- package/cjs/{index-cd680348.js.map → index-9d518988.js.map} +1 -1
- package/cjs/{index-8b5a13fe.js → index-a50b2339.js} +50 -50
- package/cjs/index-a50b2339.js.map +1 -0
- package/cjs/{index-ead97d9a.js → index-c1de8d8f.js} +37 -39
- package/cjs/{index-ead97d9a.js.map → index-c1de8d8f.js.map} +1 -1
- package/cjs/index-ec8b6978.js +361 -0
- package/cjs/index-ec8b6978.js.map +1 -0
- package/cjs/index-f2146bae.js +563 -0
- package/cjs/index-f2146bae.js.map +1 -0
- package/cjs/{index-71173fef.js → index-f65677b1.js} +56 -193
- package/cjs/index-f65677b1.js.map +1 -0
- package/cjs/{index-983f9d7a.js → index-ff8ea47f.js} +17 -17
- package/cjs/{index-983f9d7a.js.map → index-ff8ea47f.js.map} +1 -1
- package/cjs/index.js +51 -51
- package/cjs/{index.module-cf39e3b9.js → index.module-9f5edc7b.js} +1 -1
- package/cjs/{index.module-cf39e3b9.js.map → index.module-9f5edc7b.js.map} +1 -1
- package/cjs/lame.all.js.map +1 -1
- package/cjs/sendbirdSelectors.js +319 -371
- package/cjs/sendbirdSelectors.js.map +1 -1
- package/cjs/{stringSet-061fe0c1.js → stringSet-68748705.js} +2 -2
- package/cjs/stringSet-68748705.js.map +1 -0
- package/cjs/tokenize-d86ab0c7.js +140 -0
- package/cjs/tokenize-d86ab0c7.js.map +1 -0
- package/cjs/{topics-c8adbede.js → topics-825e5d42.js} +2 -2
- package/cjs/{topics-c8adbede.js.map → topics-825e5d42.js.map} +1 -1
- package/cjs/types-24accb8d.js +17 -0
- package/cjs/{types-beecfca4.js.map → types-24accb8d.js.map} +1 -1
- package/cjs/ui/Accordion.js +19 -18
- package/cjs/ui/Accordion.js.map +1 -1
- package/cjs/ui/AccordionGroup.js +10 -11
- package/cjs/ui/AccordionGroup.js.map +1 -1
- package/cjs/ui/AdminMessage.js +10 -10
- package/cjs/ui/AdminMessage.js.map +1 -1
- package/cjs/ui/Avatar.js +55 -59
- package/cjs/ui/Avatar.js.map +1 -1
- package/cjs/ui/Badge.js +16 -15
- package/cjs/ui/Badge.js.map +1 -1
- package/cjs/ui/BottomSheet.js +14 -10
- package/cjs/ui/BottomSheet.js.map +1 -1
- package/cjs/ui/Button.js +20 -24
- package/cjs/ui/Button.js.map +1 -1
- package/cjs/ui/ChannelAvatar.js +38 -41
- package/cjs/ui/ChannelAvatar.js.map +1 -1
- package/cjs/ui/Checkbox.js +9 -10
- package/cjs/ui/Checkbox.js.map +1 -1
- package/cjs/ui/ConnectionStatus.js +7 -5
- package/cjs/ui/ConnectionStatus.js.map +1 -1
- package/cjs/ui/ContextMenu.js +139 -135
- package/cjs/ui/ContextMenu.js.map +1 -1
- package/cjs/ui/DateSeparator.js +12 -14
- package/cjs/ui/DateSeparator.js.map +1 -1
- package/cjs/ui/EmojiReactions.js +78 -86
- package/cjs/ui/EmojiReactions.js.map +1 -1
- package/cjs/ui/FileMessageItemBody.js +22 -22
- package/cjs/ui/FileMessageItemBody.js.map +1 -1
- package/cjs/ui/FileViewer.js +36 -35
- package/cjs/ui/FileViewer.js.map +1 -1
- package/cjs/ui/Icon.js +16 -16
- package/cjs/ui/Icon.js.map +1 -1
- package/cjs/ui/IconButton.js +20 -28
- package/cjs/ui/IconButton.js.map +1 -1
- package/cjs/ui/ImageRenderer.js +33 -39
- package/cjs/ui/ImageRenderer.js.map +1 -1
- package/cjs/ui/Input.js +16 -14
- 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 +10 -12
- package/cjs/ui/Loader.js.map +1 -1
- package/cjs/ui/MentionLabel.js +58 -61
- package/cjs/ui/MentionLabel.js.map +1 -1
- package/cjs/ui/MentionUserLabel.js +10 -10
- package/cjs/ui/MentionUserLabel.js.map +1 -1
- package/cjs/ui/MessageContent.js +273 -270
- package/cjs/ui/MessageContent.js.map +1 -1
- package/cjs/ui/MessageInput.js +87 -79
- package/cjs/ui/MessageInput.js.map +1 -1
- package/cjs/ui/MessageItemMenu.js +70 -72
- package/cjs/ui/MessageItemMenu.js.map +1 -1
- package/cjs/ui/MessageItemReactionMenu.js +50 -57
- package/cjs/ui/MessageItemReactionMenu.js.map +1 -1
- package/cjs/ui/MessageSearchFileItem.js +49 -38
- package/cjs/ui/MessageSearchFileItem.js.map +1 -1
- package/cjs/ui/MessageSearchItem.js +40 -32
- package/cjs/ui/MessageSearchItem.js.map +1 -1
- package/cjs/ui/MessageStatus.js +10 -10
- package/cjs/ui/Modal.js +52 -45
- package/cjs/ui/Modal.js.map +1 -1
- package/cjs/ui/MutedAvatarOverlay.js +10 -10
- package/cjs/ui/MutedAvatarOverlay.js.map +1 -1
- package/cjs/ui/OGMessageItemBody.js +48 -44
- package/cjs/ui/OGMessageItemBody.js.map +1 -1
- package/cjs/ui/OpenChannelAdminMessage.js +8 -7
- package/cjs/ui/OpenChannelAdminMessage.js.map +1 -1
- package/cjs/ui/OpenChannelAvatar.js +18 -17
- package/cjs/ui/OpenChannelAvatar.js.map +1 -1
- package/cjs/ui/OpenchannelConversationHeader.js +17 -13
- package/cjs/ui/OpenchannelConversationHeader.js.map +1 -1
- package/cjs/ui/OpenchannelFileMessage.js +134 -140
- package/cjs/ui/OpenchannelFileMessage.js.map +1 -1
- package/cjs/ui/OpenchannelOGMessage.js +177 -176
- package/cjs/ui/OpenchannelOGMessage.js.map +1 -1
- package/cjs/ui/OpenchannelThumbnailMessage.js +209 -214
- package/cjs/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/cjs/ui/OpenchannelUserMessage.js +159 -164
- package/cjs/ui/OpenchannelUserMessage.js.map +1 -1
- package/cjs/ui/PlaceHolder.js +5 -6
- package/cjs/ui/PlaceHolder.js.map +1 -1
- package/cjs/ui/PlaybackTime.js +15 -16
- package/cjs/ui/PlaybackTime.js.map +1 -1
- package/cjs/ui/ProgressBar.js +13 -15
- package/cjs/ui/ProgressBar.js.map +1 -1
- package/cjs/ui/QuoteMessage.js +42 -38
- package/cjs/ui/QuoteMessage.js.map +1 -1
- package/cjs/ui/QuoteMessageInput.js +27 -23
- package/cjs/ui/QuoteMessageInput.js.map +1 -1
- package/cjs/ui/ReactionBadge.js +13 -17
- package/cjs/ui/ReactionBadge.js.map +1 -1
- package/cjs/ui/ReactionButton.js +15 -18
- package/cjs/ui/ReactionButton.js.map +1 -1
- package/cjs/ui/SortByRow.js +14 -14
- package/cjs/ui/SortByRow.js.map +1 -1
- package/cjs/ui/TextButton.js +13 -21
- package/cjs/ui/TextButton.js.map +1 -1
- package/cjs/ui/TextMessageItemBody.js +31 -31
- package/cjs/ui/TextMessageItemBody.js.map +1 -1
- package/cjs/ui/ThreadReplies.js +25 -21
- package/cjs/ui/ThreadReplies.js.map +1 -1
- package/cjs/ui/ThumbnailMessageItemBody.js +32 -37
- package/cjs/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/cjs/ui/Toggle.js +202 -0
- package/cjs/ui/Toggle.js.map +1 -0
- package/cjs/ui/Tooltip.js +8 -9
- package/cjs/ui/Tooltip.js.map +1 -1
- package/cjs/ui/TooltipWrapper.js +17 -18
- package/cjs/ui/TooltipWrapper.js.map +1 -1
- package/cjs/ui/UnknownMessageItemBody.js +19 -18
- package/cjs/ui/UnknownMessageItemBody.js.map +1 -1
- package/cjs/ui/UserListItem.js +72 -73
- package/cjs/ui/UserListItem.js.map +1 -1
- package/cjs/ui/UserProfile.js +30 -25
- package/cjs/ui/UserProfile.js.map +1 -1
- package/cjs/ui/VoiceMessageItemBody.js +37 -42
- package/cjs/ui/VoiceMessageItemBody.js.map +1 -1
- package/cjs/ui/VoiceMessgeInput.js +7 -8
- package/cjs/ui/VoiceMessgeInput.js.map +1 -1
- package/cjs/ui/Word.js +26 -27
- package/cjs/ui/Word.js.map +1 -1
- package/cjs/useLongPress-d9deb354.js +83 -0
- package/cjs/{useLongPress-f3ee01a0.js.map → useLongPress-d9deb354.js.map} +1 -1
- package/cjs/useSendbirdStateContext.js +2 -2
- package/cjs/useSendbirdStateContext.js.map +1 -1
- package/cjs/utils/message/getOutgoingMessageState.js +16 -14
- package/cjs/utils/message/getOutgoingMessageState.js.map +1 -1
- package/cjs/utils/message/isVoiceMessage.js +3 -3
- package/cjs/utils/message/isVoiceMessage.js.map +1 -1
- package/cjs/{utils-98ac09d1.js → utils-21326993.js} +3 -3
- package/cjs/{utils-98ac09d1.js.map → utils-21326993.js.map} +1 -1
- package/cjs/utils-4b74ea64.js +31 -0
- package/cjs/utils-4b74ea64.js.map +1 -0
- package/cjs/utils-7f75ad97.js +35 -0
- package/cjs/utils-7f75ad97.js.map +1 -0
- package/cjs/{utils-1038446c.js → utils-d5176360.js} +1 -1
- package/cjs/{utils-1038446c.js.map → utils-d5176360.js.map} +1 -1
- package/cjs/uuid-0b4ed44c.js +15 -0
- package/cjs/{uuid-1ffa3b79.js.map → uuid-0b4ed44c.js.map} +1 -1
- package/cjs/withSendbird.js +15 -16
- package/cjs/withSendbird.js.map +1 -1
- package/{color-73049158.js → color-3bac434a.js} +5 -5
- package/{color-73049158.js.map → color-3bac434a.js.map} +1 -1
- package/{compareIds-88bffa50.js → compareIds-1e0e668f.js} +1 -1
- package/{compareIds-88bffa50.js.map → compareIds-1e0e668f.js.map} +1 -1
- package/const-5f722b91.js +13 -0
- package/const-5f722b91.js.map +1 -0
- package/{const-2919bc87.js → const-6a07b718.js} +4 -4
- package/{const-2919bc87.js.map → const-6a07b718.js.map} +1 -1
- package/consts-790ae3a9.js +4 -0
- package/{consts-0ea80430.js.map → consts-790ae3a9.js.map} +1 -1
- package/consts-aadaccca.js +4 -0
- package/consts-aadaccca.js.map +1 -0
- package/consts-c9746f2b.js +27 -0
- package/{consts-966c9540.js.map → consts-c9746f2b.js.map} +1 -1
- package/consts-d4c78cc0.js +4 -0
- package/consts-d4c78cc0.js.map +1 -0
- package/context-fcbabe23.js +13 -0
- package/{context-9baa8d25.js.map → context-fcbabe23.js.map} +1 -1
- package/dist/index.css +197 -93
- package/dist/index.css.map +1 -1
- package/handlers/OpenChannelHandler.js.map +1 -1
- package/handlers/SessionHandler.js.map +1 -1
- package/{index-d37f34a3.js → index-1a3c0d72.js} +2 -4
- package/index-1a3c0d72.js.map +1 -0
- package/{index-ad125f51.js → index-2a938266.js} +1 -1
- package/{index-ad125f51.js.map → index-2a938266.js.map} +1 -1
- package/{index-ac5ad4f9.js → index-3062a861.js} +3 -12
- package/index-3062a861.js.map +1 -0
- package/index-38a78d99.js +283 -0
- package/{index-fd4fc9f0.js.map → index-38a78d99.js.map} +1 -1
- package/{index-cce0e324.js → index-4111594a.js} +2 -2
- package/{index-cce0e324.js.map → index-4111594a.js.map} +1 -1
- package/{index-61a102d7.js → index-51bd074f.js} +37 -27
- package/index-51bd074f.js.map +1 -0
- package/{index-fa96d1c0.js → index-59bd3da1.js} +50 -50
- package/index-59bd3da1.js.map +1 -0
- package/{index-91355132.js → index-77f3d9b0.js} +17 -17
- package/{index-91355132.js.map → index-77f3d9b0.js.map} +1 -1
- package/{index-a9183365.js → index-83600696.js} +37 -39
- package/{index-a9183365.js.map → index-83600696.js.map} +1 -1
- package/index-8df6bff0.js +51 -0
- package/index-8df6bff0.js.map +1 -0
- package/{index-aaa9b9f8.js → index-a9ddd0f5.js} +10 -30
- package/index-a9ddd0f5.js.map +1 -0
- package/index-c7cc73db.js +182 -0
- package/index-c7cc73db.js.map +1 -0
- package/{index-9cead71b.js → index-cfd0e4c4.js} +22 -15
- package/index-cfd0e4c4.js.map +1 -0
- package/index-dbe0e004.js +520 -0
- package/index-dbe0e004.js.map +1 -0
- package/index-ef0bd198.js +354 -0
- package/index-ef0bd198.js.map +1 -0
- package/{index-95b46112.js → index-f48cfdf7.js} +56 -193
- package/index-f48cfdf7.js.map +1 -0
- package/index.d.ts +38 -8
- package/index.js +51 -51
- package/{index.module-e6530c0d.js → index.module-ab8289c1.js} +1 -1
- package/{index.module-e6530c0d.js.map → index.module-ab8289c1.js.map} +1 -1
- package/lame.all.js.map +1 -1
- package/package.json +21 -3
- package/sendbirdSelectors.js +319 -371
- package/sendbirdSelectors.js.map +1 -1
- package/{stringSet-9d579825.js → stringSet-1f18348a.js} +2 -2
- package/stringSet-1f18348a.js.map +1 -0
- package/tokenize-63d895d3.js +135 -0
- package/tokenize-63d895d3.js.map +1 -0
- package/{topics-f9301447.js → topics-d8d10f83.js} +2 -2
- package/{topics-f9301447.js.map → topics-d8d10f83.js.map} +1 -1
- package/types-a85de720.js +15 -0
- package/{types-d0a9adf8.js.map → types-a85de720.js.map} +1 -1
- package/ui/Accordion.js +19 -18
- package/ui/Accordion.js.map +1 -1
- package/ui/AccordionGroup.js +10 -11
- package/ui/AccordionGroup.js.map +1 -1
- package/ui/AdminMessage.js +10 -10
- package/ui/AdminMessage.js.map +1 -1
- package/ui/Avatar.js +55 -59
- package/ui/Avatar.js.map +1 -1
- package/ui/Badge.js +16 -15
- package/ui/Badge.js.map +1 -1
- package/ui/BottomSheet.js +14 -10
- package/ui/BottomSheet.js.map +1 -1
- package/ui/Button.js +20 -24
- package/ui/Button.js.map +1 -1
- package/ui/ChannelAvatar.js +38 -41
- package/ui/ChannelAvatar.js.map +1 -1
- package/ui/Checkbox.js +9 -10
- package/ui/Checkbox.js.map +1 -1
- package/ui/ConnectionStatus.js +7 -5
- package/ui/ConnectionStatus.js.map +1 -1
- package/ui/ContextMenu.js +139 -135
- package/ui/ContextMenu.js.map +1 -1
- package/ui/DateSeparator.js +12 -14
- package/ui/DateSeparator.js.map +1 -1
- package/ui/EmojiReactions.js +78 -86
- package/ui/EmojiReactions.js.map +1 -1
- package/ui/FileMessageItemBody.js +22 -22
- package/ui/FileMessageItemBody.js.map +1 -1
- package/ui/FileViewer.js +36 -35
- package/ui/FileViewer.js.map +1 -1
- package/ui/Icon.js +2 -2
- package/ui/Icon.js.map +1 -1
- package/ui/IconButton.js +20 -28
- package/ui/IconButton.js.map +1 -1
- package/ui/ImageRenderer.js +33 -39
- package/ui/ImageRenderer.js.map +1 -1
- package/ui/Input.js +16 -14
- 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 +10 -12
- package/ui/Loader.js.map +1 -1
- package/ui/MentionLabel.js +58 -61
- package/ui/MentionLabel.js.map +1 -1
- package/ui/MentionUserLabel.js +10 -10
- package/ui/MentionUserLabel.js.map +1 -1
- package/ui/MessageContent.js +273 -270
- package/ui/MessageContent.js.map +1 -1
- package/ui/MessageInput.js +87 -79
- package/ui/MessageInput.js.map +1 -1
- package/ui/MessageItemMenu.js +70 -72
- package/ui/MessageItemMenu.js.map +1 -1
- package/ui/MessageItemReactionMenu.js +50 -57
- package/ui/MessageItemReactionMenu.js.map +1 -1
- package/ui/MessageSearchFileItem.js +49 -38
- package/ui/MessageSearchFileItem.js.map +1 -1
- package/ui/MessageSearchItem.js +40 -32
- package/ui/MessageSearchItem.js.map +1 -1
- package/ui/MessageStatus.js +10 -10
- package/ui/Modal.js +52 -45
- package/ui/Modal.js.map +1 -1
- package/ui/MutedAvatarOverlay.js +10 -10
- package/ui/MutedAvatarOverlay.js.map +1 -1
- package/ui/OGMessageItemBody.js +48 -44
- package/ui/OGMessageItemBody.js.map +1 -1
- package/ui/OpenChannelAdminMessage.js +8 -7
- package/ui/OpenChannelAdminMessage.js.map +1 -1
- package/ui/OpenChannelAvatar.js +18 -17
- package/ui/OpenChannelAvatar.js.map +1 -1
- package/ui/OpenchannelConversationHeader.js +17 -13
- package/ui/OpenchannelConversationHeader.js.map +1 -1
- package/ui/OpenchannelFileMessage.js +134 -140
- package/ui/OpenchannelFileMessage.js.map +1 -1
- package/ui/OpenchannelOGMessage.js +177 -176
- package/ui/OpenchannelOGMessage.js.map +1 -1
- package/ui/OpenchannelThumbnailMessage.js +209 -214
- package/ui/OpenchannelThumbnailMessage.js.map +1 -1
- package/ui/OpenchannelUserMessage.js +159 -164
- package/ui/OpenchannelUserMessage.js.map +1 -1
- package/ui/PlaceHolder.js +5 -6
- package/ui/PlaceHolder.js.map +1 -1
- package/ui/PlaybackTime.js +15 -16
- package/ui/PlaybackTime.js.map +1 -1
- package/ui/ProgressBar.js +13 -15
- package/ui/ProgressBar.js.map +1 -1
- package/ui/QuoteMessage.js +42 -38
- package/ui/QuoteMessage.js.map +1 -1
- package/ui/QuoteMessageInput.js +27 -23
- package/ui/QuoteMessageInput.js.map +1 -1
- package/ui/ReactionBadge.js +13 -17
- package/ui/ReactionBadge.js.map +1 -1
- package/ui/ReactionButton.js +15 -18
- package/ui/ReactionButton.js.map +1 -1
- package/ui/SortByRow.js +14 -14
- package/ui/SortByRow.js.map +1 -1
- package/ui/TextButton.js +13 -21
- package/ui/TextButton.js.map +1 -1
- package/ui/TextMessageItemBody.js +31 -31
- package/ui/TextMessageItemBody.js.map +1 -1
- package/ui/ThreadReplies.js +25 -21
- package/ui/ThreadReplies.js.map +1 -1
- package/ui/ThumbnailMessageItemBody.js +32 -37
- package/ui/ThumbnailMessageItemBody.js.map +1 -1
- package/ui/Toggle.js +191 -0
- package/ui/Toggle.js.map +1 -0
- package/ui/Tooltip.js +8 -9
- package/ui/Tooltip.js.map +1 -1
- package/ui/TooltipWrapper.js +17 -18
- package/ui/TooltipWrapper.js.map +1 -1
- package/ui/UnknownMessageItemBody.js +19 -18
- package/ui/UnknownMessageItemBody.js.map +1 -1
- package/ui/UserListItem.js +72 -73
- package/ui/UserListItem.js.map +1 -1
- package/ui/UserProfile.js +30 -25
- package/ui/UserProfile.js.map +1 -1
- package/ui/VoiceMessageItemBody.js +37 -42
- package/ui/VoiceMessageItemBody.js.map +1 -1
- package/ui/VoiceMessgeInput.js +7 -8
- package/ui/VoiceMessgeInput.js.map +1 -1
- package/ui/Word.js +26 -27
- package/ui/Word.js.map +1 -1
- package/useLongPress-8acf717c.js +81 -0
- package/{useLongPress-f119ff35.js.map → useLongPress-8acf717c.js.map} +1 -1
- package/useSendbirdStateContext.js +2 -2
- package/useSendbirdStateContext.js.map +1 -1
- package/utils/message/getOutgoingMessageState.js +9 -8
- package/utils/message/getOutgoingMessageState.js.map +1 -1
- package/utils/message/isVoiceMessage.js +3 -3
- package/utils/message/isVoiceMessage.js.map +1 -1
- package/{utils-86d65b96.js → utils-0c09801e.js} +1 -1
- package/{utils-86d65b96.js.map → utils-0c09801e.js.map} +1 -1
- package/utils-447a922e.js +31 -0
- package/utils-447a922e.js.map +1 -0
- package/{utils-e53018f1.js → utils-83bbfb63.js} +3 -3
- package/{utils-e53018f1.js.map → utils-83bbfb63.js.map} +1 -1
- package/utils-b57bff14.js +29 -0
- package/utils-b57bff14.js.map +1 -0
- package/uuid-48baadaf.js +13 -0
- package/{uuid-86cb48e0.js.map → uuid-48baadaf.js.map} +1 -1
- package/withSendbird.js +15 -16
- package/withSendbird.js.map +1 -1
- package/ChannelListProvider-a2f2ee4a.js.map +0 -1
- package/ChannelProvider-bb459e82.js.map +0 -1
- package/CreateChannelProvider-a935d833.js +0 -48
- package/CreateChannelProvider-a935d833.js.map +0 -1
- package/LocalizationContext-3d8c0b24.js +0 -20
- package/MediaQueryContext-1348e37b.js +0 -80
- package/MediaQueryContext-1348e37b.js.map +0 -1
- package/MemberList-d8124d7e.js +0 -412
- package/MemberList-d8124d7e.js.map +0 -1
- package/OpenChannelListProvider-f9ec8658.js.map +0 -1
- package/OpenChannelProvider-36d0dd05.js +0 -1844
- package/OpenChannelProvider-36d0dd05.js.map +0 -1
- package/RemoveMessageModal-7852c71d.js +0 -30
- package/RemoveMessageModal-7852c71d.js.map +0 -1
- package/ThreadProvider-43c384e9.js +0 -1623
- package/ThreadProvider-43c384e9.js.map +0 -1
- package/VoiceMessageInputWrapper-0cd90994.js.map +0 -1
- package/_rollupPluginBabelHelpers-79f64283.js.map +0 -1
- package/cjs/ChannelListProvider-b0a363e0.js.map +0 -1
- package/cjs/ChannelProvider-cf5867c2.js.map +0 -1
- package/cjs/CreateChannelProvider-f82d812f.js +0 -55
- package/cjs/CreateChannelProvider-f82d812f.js.map +0 -1
- package/cjs/MediaQueryContext-b9c2ec1f.js +0 -87
- package/cjs/MediaQueryContext-b9c2ec1f.js.map +0 -1
- package/cjs/MemberList-13ba769f.js +0 -418
- package/cjs/MemberList-13ba769f.js.map +0 -1
- package/cjs/OpenChannelListProvider-02d6d44b.js +0 -416
- package/cjs/OpenChannelListProvider-02d6d44b.js.map +0 -1
- package/cjs/OpenChannelProvider-850b9cd0.js +0 -1853
- package/cjs/RemoveMessageModal-457b1535.js.map +0 -1
- package/cjs/ThreadProvider-37f2f0a3.js +0 -1632
- package/cjs/ThreadProvider-37f2f0a3.js.map +0 -1
- package/cjs/VoiceMessageInputWrapper-43c29f38.js.map +0 -1
- package/cjs/_rollupPluginBabelHelpers-c2313dcd.js.map +0 -1
- package/cjs/color-7f7508e6.js.map +0 -1
- package/cjs/const-e22c9d25.js +0 -19
- package/cjs/const-e22c9d25.js.map +0 -1
- package/cjs/consts-3764bd68.js +0 -6
- package/cjs/consts-3764bd68.js.map +0 -1
- package/cjs/consts-46fa3a3a.js +0 -6
- package/cjs/consts-ad849467.js +0 -6
- package/cjs/index-0b9ad941.js +0 -346
- package/cjs/index-0b9ad941.js.map +0 -1
- package/cjs/index-0dff9958.js.map +0 -1
- package/cjs/index-2ac1f908.js +0 -649
- package/cjs/index-2ac1f908.js.map +0 -1
- package/cjs/index-3626dfeb.js.map +0 -1
- package/cjs/index-71173fef.js.map +0 -1
- package/cjs/index-8b5a13fe.js.map +0 -1
- package/cjs/index-8b6bb1ee.js.map +0 -1
- package/cjs/index-a415176f.js +0 -192
- package/cjs/index-a415176f.js.map +0 -1
- package/cjs/index-a4887600.js.map +0 -1
- package/cjs/index-ac1b0ab9.js.map +0 -1
- package/cjs/index-cd680348.js +0 -271
- package/cjs/index-ddcf90b1.js +0 -59
- package/cjs/index-ddcf90b1.js.map +0 -1
- package/cjs/stringSet-061fe0c1.js.map +0 -1
- package/cjs/tokenize-7e34a56e.js +0 -141
- package/cjs/tokenize-7e34a56e.js.map +0 -1
- package/cjs/tslib.es6-8f4b0cfe.js +0 -97
- package/cjs/tslib.es6-8f4b0cfe.js.map +0 -1
- package/cjs/types-beecfca4.js +0 -11
- package/cjs/useLongPress-f3ee01a0.js +0 -100
- package/cjs/utils-3f3c2287.js +0 -27
- package/cjs/utils-3f3c2287.js.map +0 -1
- package/cjs/utils-6a97ff3a.js +0 -35
- package/cjs/utils-6a97ff3a.js.map +0 -1
- package/cjs/uuid-1ffa3b79.js +0 -17
- package/const-df1daff9.js +0 -13
- package/const-df1daff9.js.map +0 -1
- package/consts-0ea80430.js +0 -4
- package/consts-1861f891.js +0 -4
- package/consts-1861f891.js.map +0 -1
- package/consts-966c9540.js +0 -23
- package/consts-f4362414.js +0 -4
- package/consts-f4362414.js.map +0 -1
- package/context-9baa8d25.js +0 -12
- package/index-179bed8d.js +0 -177
- package/index-179bed8d.js.map +0 -1
- package/index-61a102d7.js.map +0 -1
- package/index-95b46112.js.map +0 -1
- package/index-9cead71b.js.map +0 -1
- package/index-aaa9b9f8.js.map +0 -1
- package/index-ac5ad4f9.js.map +0 -1
- package/index-c70af435.js +0 -53
- package/index-c70af435.js.map +0 -1
- package/index-d37f34a3.js.map +0 -1
- package/index-e378ca4e.js +0 -607
- package/index-e378ca4e.js.map +0 -1
- package/index-f0f9692b.js +0 -339
- package/index-f0f9692b.js.map +0 -1
- package/index-fa96d1c0.js.map +0 -1
- package/index-fd4fc9f0.js +0 -262
- package/stringSet-9d579825.js.map +0 -1
- package/tokenize-bd8e35b2.js +0 -136
- package/tokenize-bd8e35b2.js.map +0 -1
- package/tslib.es6-d6e50ec3.js +0 -92
- package/tslib.es6-d6e50ec3.js.map +0 -1
- package/types-d0a9adf8.js +0 -9
- package/useLongPress-f119ff35.js +0 -98
- package/utils-0c8334fa.js +0 -25
- package/utils-0c8334fa.js.map +0 -1
- package/utils-e659e765.js +0 -31
- package/utils-e659e765.js.map +0 -1
- package/uuid-86cb48e0.js +0 -15
|
@@ -1,4 +1,14 @@
|
|
|
1
|
-
import { d as defaultLocale } from './index-
|
|
1
|
+
import { d as defaultLocale } from './index-a9ddd0f5.js';
|
|
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
|
+
}
|
|
2
12
|
|
|
3
13
|
function requiredArgs(required, args) {
|
|
4
14
|
if (args.length < required) {
|
|
@@ -6,7 +16,6 @@ function requiredArgs(required, args) {
|
|
|
6
16
|
}
|
|
7
17
|
}
|
|
8
18
|
|
|
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); }
|
|
10
19
|
/**
|
|
11
20
|
* @name toDate
|
|
12
21
|
* @category Common Helpers
|
|
@@ -37,12 +46,12 @@ function _typeof$1(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "func
|
|
|
37
46
|
* const result = toDate(1392098430000)
|
|
38
47
|
* //=> Tue Feb 11 2014 11:30:30
|
|
39
48
|
*/
|
|
40
|
-
|
|
41
49
|
function toDate(argument) {
|
|
42
50
|
requiredArgs(1, arguments);
|
|
43
|
-
var argStr = Object.prototype.toString.call(argument);
|
|
51
|
+
var argStr = Object.prototype.toString.call(argument);
|
|
44
52
|
|
|
45
|
-
|
|
53
|
+
// Clone the date
|
|
54
|
+
if (argument instanceof Date || _typeof(argument) === 'object' && argStr === '[object Date]') {
|
|
46
55
|
// Prevent the date to lose the milliseconds when passed to new Date() in IE10
|
|
47
56
|
return new Date(argument.getTime());
|
|
48
57
|
} else if (typeof argument === 'number' || argStr === '[object Number]') {
|
|
@@ -50,16 +59,14 @@ function toDate(argument) {
|
|
|
50
59
|
} else {
|
|
51
60
|
if ((typeof argument === 'string' || argStr === '[object String]') && typeof console !== 'undefined') {
|
|
52
61
|
// eslint-disable-next-line no-console
|
|
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");
|
|
54
|
-
|
|
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
|
+
// eslint-disable-next-line no-console
|
|
55
64
|
console.warn(new Error().stack);
|
|
56
65
|
}
|
|
57
|
-
|
|
58
66
|
return new Date(NaN);
|
|
59
67
|
}
|
|
60
68
|
}
|
|
61
69
|
|
|
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); }
|
|
63
70
|
/**
|
|
64
71
|
* @name isDate
|
|
65
72
|
* @category Common Helpers
|
|
@@ -92,7 +99,6 @@ function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "functi
|
|
|
92
99
|
* const result = isDate({})
|
|
93
100
|
* //=> false
|
|
94
101
|
*/
|
|
95
|
-
|
|
96
102
|
function isDate(value) {
|
|
97
103
|
requiredArgs(1, arguments);
|
|
98
104
|
return value instanceof Date || _typeof(value) === 'object' && Object.prototype.toString.call(value) === '[object Date]';
|
|
@@ -129,14 +135,11 @@ function isDate(value) {
|
|
|
129
135
|
* const result = isValid(new Date(''))
|
|
130
136
|
* //=> false
|
|
131
137
|
*/
|
|
132
|
-
|
|
133
138
|
function isValid(dirtyDate) {
|
|
134
139
|
requiredArgs(1, arguments);
|
|
135
|
-
|
|
136
140
|
if (!isDate(dirtyDate) && typeof dirtyDate !== 'number') {
|
|
137
141
|
return false;
|
|
138
142
|
}
|
|
139
|
-
|
|
140
143
|
var date = toDate(dirtyDate);
|
|
141
144
|
return !isNaN(Number(date));
|
|
142
145
|
}
|
|
@@ -145,13 +148,10 @@ function toInteger(dirtyNumber) {
|
|
|
145
148
|
if (dirtyNumber === null || dirtyNumber === true || dirtyNumber === false) {
|
|
146
149
|
return NaN;
|
|
147
150
|
}
|
|
148
|
-
|
|
149
151
|
var number = Number(dirtyNumber);
|
|
150
|
-
|
|
151
152
|
if (isNaN(number)) {
|
|
152
153
|
return number;
|
|
153
154
|
}
|
|
154
|
-
|
|
155
155
|
return number < 0 ? Math.ceil(number) : Math.floor(number);
|
|
156
156
|
}
|
|
157
157
|
|
|
@@ -173,7 +173,6 @@ 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
|
-
|
|
177
176
|
function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
178
177
|
requiredArgs(2, arguments);
|
|
179
178
|
var timestamp = toDate(dirtyDate).getTime();
|
|
@@ -199,7 +198,6 @@ function addMilliseconds(dirtyDate, dirtyAmount) {
|
|
|
199
198
|
* const result = subMilliseconds(new Date(2014, 6, 10, 12, 45, 30, 0), 750)
|
|
200
199
|
* //=> Thu Jul 10 2014 12:45:29.250
|
|
201
200
|
*/
|
|
202
|
-
|
|
203
201
|
function subMilliseconds(dirtyDate, dirtyAmount) {
|
|
204
202
|
requiredArgs(2, arguments);
|
|
205
203
|
var amount = toInteger(dirtyAmount);
|
|
@@ -241,7 +239,6 @@ function getUTCISOWeekYear(dirtyDate) {
|
|
|
241
239
|
fourthOfJanuaryOfThisYear.setUTCFullYear(year, 0, 4);
|
|
242
240
|
fourthOfJanuaryOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
243
241
|
var startOfThisYear = startOfUTCISOWeek(fourthOfJanuaryOfThisYear);
|
|
244
|
-
|
|
245
242
|
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
246
243
|
return year + 1;
|
|
247
244
|
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
@@ -265,10 +262,11 @@ var MILLISECONDS_IN_WEEK$1 = 604800000;
|
|
|
265
262
|
function getUTCISOWeek(dirtyDate) {
|
|
266
263
|
requiredArgs(1, arguments);
|
|
267
264
|
var date = toDate(dirtyDate);
|
|
268
|
-
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
265
|
+
var diff = startOfUTCISOWeek(date).getTime() - startOfUTCISOWeekYear(date).getTime();
|
|
266
|
+
|
|
267
|
+
// Round the number of days to the nearest integer
|
|
269
268
|
// because the number of milliseconds in a week is not constant
|
|
270
269
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
271
|
-
|
|
272
270
|
return Math.round(diff / MILLISECONDS_IN_WEEK$1) + 1;
|
|
273
271
|
}
|
|
274
272
|
|
|
@@ -279,15 +277,14 @@ function getDefaultOptions() {
|
|
|
279
277
|
|
|
280
278
|
function startOfUTCWeek(dirtyDate, options) {
|
|
281
279
|
var _ref, _ref2, _ref3, _options$weekStartsOn, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
282
|
-
|
|
283
280
|
requiredArgs(1, arguments);
|
|
284
281
|
var defaultOptions = getDefaultOptions();
|
|
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);
|
|
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);
|
|
286
283
|
|
|
284
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
287
285
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
288
286
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
289
287
|
}
|
|
290
|
-
|
|
291
288
|
var date = toDate(dirtyDate);
|
|
292
289
|
var day = date.getUTCDay();
|
|
293
290
|
var diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
@@ -298,17 +295,16 @@ function startOfUTCWeek(dirtyDate, options) {
|
|
|
298
295
|
|
|
299
296
|
function getUTCWeekYear(dirtyDate, options) {
|
|
300
297
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
301
|
-
|
|
302
298
|
requiredArgs(1, arguments);
|
|
303
299
|
var date = toDate(dirtyDate);
|
|
304
300
|
var year = date.getUTCFullYear();
|
|
305
301
|
var defaultOptions = getDefaultOptions();
|
|
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);
|
|
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);
|
|
307
303
|
|
|
304
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
308
305
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
309
306
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
310
307
|
}
|
|
311
|
-
|
|
312
308
|
var firstWeekOfNextYear = new Date(0);
|
|
313
309
|
firstWeekOfNextYear.setUTCFullYear(year + 1, 0, firstWeekContainsDate);
|
|
314
310
|
firstWeekOfNextYear.setUTCHours(0, 0, 0, 0);
|
|
@@ -317,7 +313,6 @@ function getUTCWeekYear(dirtyDate, options) {
|
|
|
317
313
|
firstWeekOfThisYear.setUTCFullYear(year, 0, firstWeekContainsDate);
|
|
318
314
|
firstWeekOfThisYear.setUTCHours(0, 0, 0, 0);
|
|
319
315
|
var startOfThisYear = startOfUTCWeek(firstWeekOfThisYear, options);
|
|
320
|
-
|
|
321
316
|
if (date.getTime() >= startOfNextYear.getTime()) {
|
|
322
317
|
return year + 1;
|
|
323
318
|
} else if (date.getTime() >= startOfThisYear.getTime()) {
|
|
@@ -329,7 +324,6 @@ function getUTCWeekYear(dirtyDate, options) {
|
|
|
329
324
|
|
|
330
325
|
function startOfUTCWeekYear(dirtyDate, options) {
|
|
331
326
|
var _ref, _ref2, _ref3, _options$firstWeekCon, _options$locale, _options$locale$optio, _defaultOptions$local, _defaultOptions$local2;
|
|
332
|
-
|
|
333
327
|
requiredArgs(1, arguments);
|
|
334
328
|
var defaultOptions = getDefaultOptions();
|
|
335
329
|
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);
|
|
@@ -345,21 +339,20 @@ var MILLISECONDS_IN_WEEK = 604800000;
|
|
|
345
339
|
function getUTCWeek(dirtyDate, options) {
|
|
346
340
|
requiredArgs(1, arguments);
|
|
347
341
|
var date = toDate(dirtyDate);
|
|
348
|
-
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
342
|
+
var diff = startOfUTCWeek(date, options).getTime() - startOfUTCWeekYear(date, options).getTime();
|
|
343
|
+
|
|
344
|
+
// Round the number of days to the nearest integer
|
|
349
345
|
// because the number of milliseconds in a week is not constant
|
|
350
346
|
// (e.g. it's different in the week of the daylight saving time clock shift)
|
|
351
|
-
|
|
352
347
|
return Math.round(diff / MILLISECONDS_IN_WEEK) + 1;
|
|
353
348
|
}
|
|
354
349
|
|
|
355
350
|
function addLeadingZeros(number, targetLength) {
|
|
356
351
|
var sign = number < 0 ? '-' : '';
|
|
357
352
|
var output = Math.abs(number).toString();
|
|
358
|
-
|
|
359
353
|
while (output.length < targetLength) {
|
|
360
354
|
output = '0' + output;
|
|
361
355
|
}
|
|
362
|
-
|
|
363
356
|
return sign + output;
|
|
364
357
|
}
|
|
365
358
|
|
|
@@ -375,7 +368,6 @@ function addLeadingZeros(number, targetLength) {
|
|
|
375
368
|
*
|
|
376
369
|
* Letters marked by * are not implemented but reserved by Unicode standard.
|
|
377
370
|
*/
|
|
378
|
-
|
|
379
371
|
var formatters$2 = {
|
|
380
372
|
// Year
|
|
381
373
|
y: function y(date, token) {
|
|
@@ -387,8 +379,9 @@ var formatters$2 = {
|
|
|
387
379
|
// | AD 123 | 123 | 23 | 123 | 0123 | 00123 |
|
|
388
380
|
// | AD 1234 | 1234 | 34 | 1234 | 1234 | 01234 |
|
|
389
381
|
// | AD 12345 | 12345 | 45 | 12345 | 12345 | 12345 |
|
|
390
|
-
var signedYear = date.getUTCFullYear(); // Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
391
382
|
|
|
383
|
+
var signedYear = date.getUTCFullYear();
|
|
384
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
392
385
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
393
386
|
return addLeadingZeros(token === 'yy' ? year % 100 : year, token.length);
|
|
394
387
|
},
|
|
@@ -404,18 +397,14 @@ var formatters$2 = {
|
|
|
404
397
|
// AM or PM
|
|
405
398
|
a: function a(date, token) {
|
|
406
399
|
var dayPeriodEnumValue = date.getUTCHours() / 12 >= 1 ? 'pm' : 'am';
|
|
407
|
-
|
|
408
400
|
switch (token) {
|
|
409
401
|
case 'a':
|
|
410
402
|
case 'aa':
|
|
411
403
|
return dayPeriodEnumValue.toUpperCase();
|
|
412
|
-
|
|
413
404
|
case 'aaa':
|
|
414
405
|
return dayPeriodEnumValue;
|
|
415
|
-
|
|
416
406
|
case 'aaaaa':
|
|
417
407
|
return dayPeriodEnumValue[0];
|
|
418
|
-
|
|
419
408
|
case 'aaaa':
|
|
420
409
|
default:
|
|
421
410
|
return dayPeriodEnumValue === 'am' ? 'a.m.' : 'p.m.';
|
|
@@ -456,7 +445,6 @@ var dayPeriodEnum = {
|
|
|
456
445
|
evening: 'evening',
|
|
457
446
|
night: 'night'
|
|
458
447
|
};
|
|
459
|
-
|
|
460
448
|
/*
|
|
461
449
|
* | | Unit | | Unit |
|
|
462
450
|
* |-----|--------------------------------|-----|--------------------------------|
|
|
@@ -502,11 +490,11 @@ var dayPeriodEnum = {
|
|
|
502
490
|
* - `P` is long localized date format
|
|
503
491
|
* - `p` is long localized time format
|
|
504
492
|
*/
|
|
493
|
+
|
|
505
494
|
var formatters = {
|
|
506
495
|
// Era
|
|
507
496
|
G: function G(date, token, localize) {
|
|
508
497
|
var era = date.getUTCFullYear() > 0 ? 1 : 0;
|
|
509
|
-
|
|
510
498
|
switch (token) {
|
|
511
499
|
// AD, BC
|
|
512
500
|
case 'G':
|
|
@@ -516,13 +504,11 @@ var formatters = {
|
|
|
516
504
|
width: 'abbreviated'
|
|
517
505
|
});
|
|
518
506
|
// A, B
|
|
519
|
-
|
|
520
507
|
case 'GGGGG':
|
|
521
508
|
return localize.era(era, {
|
|
522
509
|
width: 'narrow'
|
|
523
510
|
});
|
|
524
511
|
// Anno Domini, Before Christ
|
|
525
|
-
|
|
526
512
|
case 'GGGG':
|
|
527
513
|
default:
|
|
528
514
|
return localize.era(era, {
|
|
@@ -534,41 +520,42 @@ var formatters = {
|
|
|
534
520
|
y: function y(date, token, localize) {
|
|
535
521
|
// Ordinal number
|
|
536
522
|
if (token === 'yo') {
|
|
537
|
-
var signedYear = date.getUTCFullYear();
|
|
538
|
-
|
|
523
|
+
var signedYear = date.getUTCFullYear();
|
|
524
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
539
525
|
var year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
540
526
|
return localize.ordinalNumber(year, {
|
|
541
527
|
unit: 'year'
|
|
542
528
|
});
|
|
543
529
|
}
|
|
544
|
-
|
|
545
530
|
return formatters$2.y(date, token);
|
|
546
531
|
},
|
|
547
532
|
// Local week-numbering year
|
|
548
533
|
Y: function Y(date, token, localize, options) {
|
|
549
|
-
var signedWeekYear = getUTCWeekYear(date, options);
|
|
550
|
-
|
|
551
|
-
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
534
|
+
var signedWeekYear = getUTCWeekYear(date, options);
|
|
535
|
+
// Returns 1 for 1 BC (which is year 0 in JavaScript)
|
|
536
|
+
var weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
552
537
|
|
|
538
|
+
// Two digit year
|
|
553
539
|
if (token === 'YY') {
|
|
554
540
|
var twoDigitYear = weekYear % 100;
|
|
555
541
|
return addLeadingZeros(twoDigitYear, 2);
|
|
556
|
-
}
|
|
557
|
-
|
|
542
|
+
}
|
|
558
543
|
|
|
544
|
+
// Ordinal number
|
|
559
545
|
if (token === 'Yo') {
|
|
560
546
|
return localize.ordinalNumber(weekYear, {
|
|
561
547
|
unit: 'year'
|
|
562
548
|
});
|
|
563
|
-
}
|
|
564
|
-
|
|
549
|
+
}
|
|
565
550
|
|
|
551
|
+
// Padding
|
|
566
552
|
return addLeadingZeros(weekYear, token.length);
|
|
567
553
|
},
|
|
568
554
|
// ISO week-numbering year
|
|
569
555
|
R: function R(date, token) {
|
|
570
|
-
var isoWeekYear = getUTCISOWeekYear(date);
|
|
556
|
+
var isoWeekYear = getUTCISOWeekYear(date);
|
|
571
557
|
|
|
558
|
+
// Padding
|
|
572
559
|
return addLeadingZeros(isoWeekYear, token.length);
|
|
573
560
|
},
|
|
574
561
|
// Extended year. This is a single number designating the year of this calendar system.
|
|
@@ -587,37 +574,31 @@ var formatters = {
|
|
|
587
574
|
// Quarter
|
|
588
575
|
Q: function Q(date, token, localize) {
|
|
589
576
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
590
|
-
|
|
591
577
|
switch (token) {
|
|
592
578
|
// 1, 2, 3, 4
|
|
593
579
|
case 'Q':
|
|
594
580
|
return String(quarter);
|
|
595
581
|
// 01, 02, 03, 04
|
|
596
|
-
|
|
597
582
|
case 'QQ':
|
|
598
583
|
return addLeadingZeros(quarter, 2);
|
|
599
584
|
// 1st, 2nd, 3rd, 4th
|
|
600
|
-
|
|
601
585
|
case 'Qo':
|
|
602
586
|
return localize.ordinalNumber(quarter, {
|
|
603
587
|
unit: 'quarter'
|
|
604
588
|
});
|
|
605
589
|
// Q1, Q2, Q3, Q4
|
|
606
|
-
|
|
607
590
|
case 'QQQ':
|
|
608
591
|
return localize.quarter(quarter, {
|
|
609
592
|
width: 'abbreviated',
|
|
610
593
|
context: 'formatting'
|
|
611
594
|
});
|
|
612
595
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
613
|
-
|
|
614
596
|
case 'QQQQQ':
|
|
615
597
|
return localize.quarter(quarter, {
|
|
616
598
|
width: 'narrow',
|
|
617
599
|
context: 'formatting'
|
|
618
600
|
});
|
|
619
601
|
// 1st quarter, 2nd quarter, ...
|
|
620
|
-
|
|
621
602
|
case 'QQQQ':
|
|
622
603
|
default:
|
|
623
604
|
return localize.quarter(quarter, {
|
|
@@ -629,37 +610,31 @@ var formatters = {
|
|
|
629
610
|
// Stand-alone quarter
|
|
630
611
|
q: function q(date, token, localize) {
|
|
631
612
|
var quarter = Math.ceil((date.getUTCMonth() + 1) / 3);
|
|
632
|
-
|
|
633
613
|
switch (token) {
|
|
634
614
|
// 1, 2, 3, 4
|
|
635
615
|
case 'q':
|
|
636
616
|
return String(quarter);
|
|
637
617
|
// 01, 02, 03, 04
|
|
638
|
-
|
|
639
618
|
case 'qq':
|
|
640
619
|
return addLeadingZeros(quarter, 2);
|
|
641
620
|
// 1st, 2nd, 3rd, 4th
|
|
642
|
-
|
|
643
621
|
case 'qo':
|
|
644
622
|
return localize.ordinalNumber(quarter, {
|
|
645
623
|
unit: 'quarter'
|
|
646
624
|
});
|
|
647
625
|
// Q1, Q2, Q3, Q4
|
|
648
|
-
|
|
649
626
|
case 'qqq':
|
|
650
627
|
return localize.quarter(quarter, {
|
|
651
628
|
width: 'abbreviated',
|
|
652
629
|
context: 'standalone'
|
|
653
630
|
});
|
|
654
631
|
// 1, 2, 3, 4 (narrow quarter; could be not numerical)
|
|
655
|
-
|
|
656
632
|
case 'qqqqq':
|
|
657
633
|
return localize.quarter(quarter, {
|
|
658
634
|
width: 'narrow',
|
|
659
635
|
context: 'standalone'
|
|
660
636
|
});
|
|
661
637
|
// 1st quarter, 2nd quarter, ...
|
|
662
|
-
|
|
663
638
|
case 'qqqq':
|
|
664
639
|
default:
|
|
665
640
|
return localize.quarter(quarter, {
|
|
@@ -671,33 +646,28 @@ var formatters = {
|
|
|
671
646
|
// Month
|
|
672
647
|
M: function M(date, token, localize) {
|
|
673
648
|
var month = date.getUTCMonth();
|
|
674
|
-
|
|
675
649
|
switch (token) {
|
|
676
650
|
case 'M':
|
|
677
651
|
case 'MM':
|
|
678
652
|
return formatters$2.M(date, token);
|
|
679
653
|
// 1st, 2nd, ..., 12th
|
|
680
|
-
|
|
681
654
|
case 'Mo':
|
|
682
655
|
return localize.ordinalNumber(month + 1, {
|
|
683
656
|
unit: 'month'
|
|
684
657
|
});
|
|
685
658
|
// Jan, Feb, ..., Dec
|
|
686
|
-
|
|
687
659
|
case 'MMM':
|
|
688
660
|
return localize.month(month, {
|
|
689
661
|
width: 'abbreviated',
|
|
690
662
|
context: 'formatting'
|
|
691
663
|
});
|
|
692
664
|
// J, F, ..., D
|
|
693
|
-
|
|
694
665
|
case 'MMMMM':
|
|
695
666
|
return localize.month(month, {
|
|
696
667
|
width: 'narrow',
|
|
697
668
|
context: 'formatting'
|
|
698
669
|
});
|
|
699
670
|
// January, February, ..., December
|
|
700
|
-
|
|
701
671
|
case 'MMMM':
|
|
702
672
|
default:
|
|
703
673
|
return localize.month(month, {
|
|
@@ -709,37 +679,31 @@ var formatters = {
|
|
|
709
679
|
// Stand-alone month
|
|
710
680
|
L: function L(date, token, localize) {
|
|
711
681
|
var month = date.getUTCMonth();
|
|
712
|
-
|
|
713
682
|
switch (token) {
|
|
714
683
|
// 1, 2, ..., 12
|
|
715
684
|
case 'L':
|
|
716
685
|
return String(month + 1);
|
|
717
686
|
// 01, 02, ..., 12
|
|
718
|
-
|
|
719
687
|
case 'LL':
|
|
720
688
|
return addLeadingZeros(month + 1, 2);
|
|
721
689
|
// 1st, 2nd, ..., 12th
|
|
722
|
-
|
|
723
690
|
case 'Lo':
|
|
724
691
|
return localize.ordinalNumber(month + 1, {
|
|
725
692
|
unit: 'month'
|
|
726
693
|
});
|
|
727
694
|
// Jan, Feb, ..., Dec
|
|
728
|
-
|
|
729
695
|
case 'LLL':
|
|
730
696
|
return localize.month(month, {
|
|
731
697
|
width: 'abbreviated',
|
|
732
698
|
context: 'standalone'
|
|
733
699
|
});
|
|
734
700
|
// J, F, ..., D
|
|
735
|
-
|
|
736
701
|
case 'LLLLL':
|
|
737
702
|
return localize.month(month, {
|
|
738
703
|
width: 'narrow',
|
|
739
704
|
context: 'standalone'
|
|
740
705
|
});
|
|
741
706
|
// January, February, ..., December
|
|
742
|
-
|
|
743
707
|
case 'LLLL':
|
|
744
708
|
default:
|
|
745
709
|
return localize.month(month, {
|
|
@@ -751,25 +715,21 @@ var formatters = {
|
|
|
751
715
|
// Local week of year
|
|
752
716
|
w: function w(date, token, localize, options) {
|
|
753
717
|
var week = getUTCWeek(date, options);
|
|
754
|
-
|
|
755
718
|
if (token === 'wo') {
|
|
756
719
|
return localize.ordinalNumber(week, {
|
|
757
720
|
unit: 'week'
|
|
758
721
|
});
|
|
759
722
|
}
|
|
760
|
-
|
|
761
723
|
return addLeadingZeros(week, token.length);
|
|
762
724
|
},
|
|
763
725
|
// ISO week of year
|
|
764
726
|
I: function I(date, token, localize) {
|
|
765
727
|
var isoWeek = getUTCISOWeek(date);
|
|
766
|
-
|
|
767
728
|
if (token === 'Io') {
|
|
768
729
|
return localize.ordinalNumber(isoWeek, {
|
|
769
730
|
unit: 'week'
|
|
770
731
|
});
|
|
771
732
|
}
|
|
772
|
-
|
|
773
733
|
return addLeadingZeros(isoWeek, token.length);
|
|
774
734
|
},
|
|
775
735
|
// Day of the month
|
|
@@ -779,25 +739,21 @@ var formatters = {
|
|
|
779
739
|
unit: 'date'
|
|
780
740
|
});
|
|
781
741
|
}
|
|
782
|
-
|
|
783
742
|
return formatters$2.d(date, token);
|
|
784
743
|
},
|
|
785
744
|
// Day of year
|
|
786
745
|
D: function D(date, token, localize) {
|
|
787
746
|
var dayOfYear = getUTCDayOfYear(date);
|
|
788
|
-
|
|
789
747
|
if (token === 'Do') {
|
|
790
748
|
return localize.ordinalNumber(dayOfYear, {
|
|
791
749
|
unit: 'dayOfYear'
|
|
792
750
|
});
|
|
793
751
|
}
|
|
794
|
-
|
|
795
752
|
return addLeadingZeros(dayOfYear, token.length);
|
|
796
753
|
},
|
|
797
754
|
// Day of week
|
|
798
755
|
E: function E(date, token, localize) {
|
|
799
756
|
var dayOfWeek = date.getUTCDay();
|
|
800
|
-
|
|
801
757
|
switch (token) {
|
|
802
758
|
// Tue
|
|
803
759
|
case 'E':
|
|
@@ -808,21 +764,18 @@ var formatters = {
|
|
|
808
764
|
context: 'formatting'
|
|
809
765
|
});
|
|
810
766
|
// T
|
|
811
|
-
|
|
812
767
|
case 'EEEEE':
|
|
813
768
|
return localize.day(dayOfWeek, {
|
|
814
769
|
width: 'narrow',
|
|
815
770
|
context: 'formatting'
|
|
816
771
|
});
|
|
817
772
|
// Tu
|
|
818
|
-
|
|
819
773
|
case 'EEEEEE':
|
|
820
774
|
return localize.day(dayOfWeek, {
|
|
821
775
|
width: 'short',
|
|
822
776
|
context: 'formatting'
|
|
823
777
|
});
|
|
824
778
|
// Tuesday
|
|
825
|
-
|
|
826
779
|
case 'EEEE':
|
|
827
780
|
default:
|
|
828
781
|
return localize.day(dayOfWeek, {
|
|
@@ -835,43 +788,36 @@ var formatters = {
|
|
|
835
788
|
e: function e(date, token, localize, options) {
|
|
836
789
|
var dayOfWeek = date.getUTCDay();
|
|
837
790
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
838
|
-
|
|
839
791
|
switch (token) {
|
|
840
792
|
// Numerical value (Nth day of week with current locale or weekStartsOn)
|
|
841
793
|
case 'e':
|
|
842
794
|
return String(localDayOfWeek);
|
|
843
795
|
// Padded numerical value
|
|
844
|
-
|
|
845
796
|
case 'ee':
|
|
846
797
|
return addLeadingZeros(localDayOfWeek, 2);
|
|
847
798
|
// 1st, 2nd, ..., 7th
|
|
848
|
-
|
|
849
799
|
case 'eo':
|
|
850
800
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
851
801
|
unit: 'day'
|
|
852
802
|
});
|
|
853
|
-
|
|
854
803
|
case 'eee':
|
|
855
804
|
return localize.day(dayOfWeek, {
|
|
856
805
|
width: 'abbreviated',
|
|
857
806
|
context: 'formatting'
|
|
858
807
|
});
|
|
859
808
|
// T
|
|
860
|
-
|
|
861
809
|
case 'eeeee':
|
|
862
810
|
return localize.day(dayOfWeek, {
|
|
863
811
|
width: 'narrow',
|
|
864
812
|
context: 'formatting'
|
|
865
813
|
});
|
|
866
814
|
// Tu
|
|
867
|
-
|
|
868
815
|
case 'eeeeee':
|
|
869
816
|
return localize.day(dayOfWeek, {
|
|
870
817
|
width: 'short',
|
|
871
818
|
context: 'formatting'
|
|
872
819
|
});
|
|
873
820
|
// Tuesday
|
|
874
|
-
|
|
875
821
|
case 'eeee':
|
|
876
822
|
default:
|
|
877
823
|
return localize.day(dayOfWeek, {
|
|
@@ -884,43 +830,36 @@ var formatters = {
|
|
|
884
830
|
c: function c(date, token, localize, options) {
|
|
885
831
|
var dayOfWeek = date.getUTCDay();
|
|
886
832
|
var localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
887
|
-
|
|
888
833
|
switch (token) {
|
|
889
834
|
// Numerical value (same as in `e`)
|
|
890
835
|
case 'c':
|
|
891
836
|
return String(localDayOfWeek);
|
|
892
837
|
// Padded numerical value
|
|
893
|
-
|
|
894
838
|
case 'cc':
|
|
895
839
|
return addLeadingZeros(localDayOfWeek, token.length);
|
|
896
840
|
// 1st, 2nd, ..., 7th
|
|
897
|
-
|
|
898
841
|
case 'co':
|
|
899
842
|
return localize.ordinalNumber(localDayOfWeek, {
|
|
900
843
|
unit: 'day'
|
|
901
844
|
});
|
|
902
|
-
|
|
903
845
|
case 'ccc':
|
|
904
846
|
return localize.day(dayOfWeek, {
|
|
905
847
|
width: 'abbreviated',
|
|
906
848
|
context: 'standalone'
|
|
907
849
|
});
|
|
908
850
|
// T
|
|
909
|
-
|
|
910
851
|
case 'ccccc':
|
|
911
852
|
return localize.day(dayOfWeek, {
|
|
912
853
|
width: 'narrow',
|
|
913
854
|
context: 'standalone'
|
|
914
855
|
});
|
|
915
856
|
// Tu
|
|
916
|
-
|
|
917
857
|
case 'cccccc':
|
|
918
858
|
return localize.day(dayOfWeek, {
|
|
919
859
|
width: 'short',
|
|
920
860
|
context: 'standalone'
|
|
921
861
|
});
|
|
922
862
|
// Tuesday
|
|
923
|
-
|
|
924
863
|
case 'cccc':
|
|
925
864
|
default:
|
|
926
865
|
return localize.day(dayOfWeek, {
|
|
@@ -933,44 +872,37 @@ var formatters = {
|
|
|
933
872
|
i: function i(date, token, localize) {
|
|
934
873
|
var dayOfWeek = date.getUTCDay();
|
|
935
874
|
var isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
936
|
-
|
|
937
875
|
switch (token) {
|
|
938
876
|
// 2
|
|
939
877
|
case 'i':
|
|
940
878
|
return String(isoDayOfWeek);
|
|
941
879
|
// 02
|
|
942
|
-
|
|
943
880
|
case 'ii':
|
|
944
881
|
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
945
882
|
// 2nd
|
|
946
|
-
|
|
947
883
|
case 'io':
|
|
948
884
|
return localize.ordinalNumber(isoDayOfWeek, {
|
|
949
885
|
unit: 'day'
|
|
950
886
|
});
|
|
951
887
|
// Tue
|
|
952
|
-
|
|
953
888
|
case 'iii':
|
|
954
889
|
return localize.day(dayOfWeek, {
|
|
955
890
|
width: 'abbreviated',
|
|
956
891
|
context: 'formatting'
|
|
957
892
|
});
|
|
958
893
|
// T
|
|
959
|
-
|
|
960
894
|
case 'iiiii':
|
|
961
895
|
return localize.day(dayOfWeek, {
|
|
962
896
|
width: 'narrow',
|
|
963
897
|
context: 'formatting'
|
|
964
898
|
});
|
|
965
899
|
// Tu
|
|
966
|
-
|
|
967
900
|
case 'iiiiii':
|
|
968
901
|
return localize.day(dayOfWeek, {
|
|
969
902
|
width: 'short',
|
|
970
903
|
context: 'formatting'
|
|
971
904
|
});
|
|
972
905
|
// Tuesday
|
|
973
|
-
|
|
974
906
|
case 'iiii':
|
|
975
907
|
default:
|
|
976
908
|
return localize.day(dayOfWeek, {
|
|
@@ -983,7 +915,6 @@ var formatters = {
|
|
|
983
915
|
a: function a(date, token, localize) {
|
|
984
916
|
var hours = date.getUTCHours();
|
|
985
917
|
var dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
986
|
-
|
|
987
918
|
switch (token) {
|
|
988
919
|
case 'a':
|
|
989
920
|
case 'aa':
|
|
@@ -991,19 +922,16 @@ var formatters = {
|
|
|
991
922
|
width: 'abbreviated',
|
|
992
923
|
context: 'formatting'
|
|
993
924
|
});
|
|
994
|
-
|
|
995
925
|
case 'aaa':
|
|
996
926
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
997
927
|
width: 'abbreviated',
|
|
998
928
|
context: 'formatting'
|
|
999
929
|
}).toLowerCase();
|
|
1000
|
-
|
|
1001
930
|
case 'aaaaa':
|
|
1002
931
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
1003
932
|
width: 'narrow',
|
|
1004
933
|
context: 'formatting'
|
|
1005
934
|
});
|
|
1006
|
-
|
|
1007
935
|
case 'aaaa':
|
|
1008
936
|
default:
|
|
1009
937
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
@@ -1016,7 +944,6 @@ var formatters = {
|
|
|
1016
944
|
b: function b(date, token, localize) {
|
|
1017
945
|
var hours = date.getUTCHours();
|
|
1018
946
|
var dayPeriodEnumValue;
|
|
1019
|
-
|
|
1020
947
|
if (hours === 12) {
|
|
1021
948
|
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
1022
949
|
} else if (hours === 0) {
|
|
@@ -1024,7 +951,6 @@ var formatters = {
|
|
|
1024
951
|
} else {
|
|
1025
952
|
dayPeriodEnumValue = hours / 12 >= 1 ? 'pm' : 'am';
|
|
1026
953
|
}
|
|
1027
|
-
|
|
1028
954
|
switch (token) {
|
|
1029
955
|
case 'b':
|
|
1030
956
|
case 'bb':
|
|
@@ -1032,19 +958,16 @@ var formatters = {
|
|
|
1032
958
|
width: 'abbreviated',
|
|
1033
959
|
context: 'formatting'
|
|
1034
960
|
});
|
|
1035
|
-
|
|
1036
961
|
case 'bbb':
|
|
1037
962
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
1038
963
|
width: 'abbreviated',
|
|
1039
964
|
context: 'formatting'
|
|
1040
965
|
}).toLowerCase();
|
|
1041
|
-
|
|
1042
966
|
case 'bbbbb':
|
|
1043
967
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
1044
968
|
width: 'narrow',
|
|
1045
969
|
context: 'formatting'
|
|
1046
970
|
});
|
|
1047
|
-
|
|
1048
971
|
case 'bbbb':
|
|
1049
972
|
default:
|
|
1050
973
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
@@ -1057,7 +980,6 @@ var formatters = {
|
|
|
1057
980
|
B: function B(date, token, localize) {
|
|
1058
981
|
var hours = date.getUTCHours();
|
|
1059
982
|
var dayPeriodEnumValue;
|
|
1060
|
-
|
|
1061
983
|
if (hours >= 17) {
|
|
1062
984
|
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
1063
985
|
} else if (hours >= 12) {
|
|
@@ -1067,7 +989,6 @@ var formatters = {
|
|
|
1067
989
|
} else {
|
|
1068
990
|
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
1069
991
|
}
|
|
1070
|
-
|
|
1071
992
|
switch (token) {
|
|
1072
993
|
case 'B':
|
|
1073
994
|
case 'BB':
|
|
@@ -1076,13 +997,11 @@ var formatters = {
|
|
|
1076
997
|
width: 'abbreviated',
|
|
1077
998
|
context: 'formatting'
|
|
1078
999
|
});
|
|
1079
|
-
|
|
1080
1000
|
case 'BBBBB':
|
|
1081
1001
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
1082
1002
|
width: 'narrow',
|
|
1083
1003
|
context: 'formatting'
|
|
1084
1004
|
});
|
|
1085
|
-
|
|
1086
1005
|
case 'BBBB':
|
|
1087
1006
|
default:
|
|
1088
1007
|
return localize.dayPeriod(dayPeriodEnumValue, {
|
|
@@ -1100,7 +1019,6 @@ var formatters = {
|
|
|
1100
1019
|
unit: 'hour'
|
|
1101
1020
|
});
|
|
1102
1021
|
}
|
|
1103
|
-
|
|
1104
1022
|
return formatters$2.h(date, token);
|
|
1105
1023
|
},
|
|
1106
1024
|
// Hour [0-23]
|
|
@@ -1110,32 +1028,27 @@ var formatters = {
|
|
|
1110
1028
|
unit: 'hour'
|
|
1111
1029
|
});
|
|
1112
1030
|
}
|
|
1113
|
-
|
|
1114
1031
|
return formatters$2.H(date, token);
|
|
1115
1032
|
},
|
|
1116
1033
|
// Hour [0-11]
|
|
1117
1034
|
K: function K(date, token, localize) {
|
|
1118
1035
|
var hours = date.getUTCHours() % 12;
|
|
1119
|
-
|
|
1120
1036
|
if (token === 'Ko') {
|
|
1121
1037
|
return localize.ordinalNumber(hours, {
|
|
1122
1038
|
unit: 'hour'
|
|
1123
1039
|
});
|
|
1124
1040
|
}
|
|
1125
|
-
|
|
1126
1041
|
return addLeadingZeros(hours, token.length);
|
|
1127
1042
|
},
|
|
1128
1043
|
// Hour [1-24]
|
|
1129
1044
|
k: function k(date, token, localize) {
|
|
1130
1045
|
var hours = date.getUTCHours();
|
|
1131
1046
|
if (hours === 0) hours = 24;
|
|
1132
|
-
|
|
1133
1047
|
if (token === 'ko') {
|
|
1134
1048
|
return localize.ordinalNumber(hours, {
|
|
1135
1049
|
unit: 'hour'
|
|
1136
1050
|
});
|
|
1137
1051
|
}
|
|
1138
|
-
|
|
1139
1052
|
return addLeadingZeros(hours, token.length);
|
|
1140
1053
|
},
|
|
1141
1054
|
// Minute
|
|
@@ -1145,7 +1058,6 @@ var formatters = {
|
|
|
1145
1058
|
unit: 'minute'
|
|
1146
1059
|
});
|
|
1147
1060
|
}
|
|
1148
|
-
|
|
1149
1061
|
return formatters$2.m(date, token);
|
|
1150
1062
|
},
|
|
1151
1063
|
// Second
|
|
@@ -1155,7 +1067,6 @@ var formatters = {
|
|
|
1155
1067
|
unit: 'second'
|
|
1156
1068
|
});
|
|
1157
1069
|
}
|
|
1158
|
-
|
|
1159
1070
|
return formatters$2.s(date, token);
|
|
1160
1071
|
},
|
|
1161
1072
|
// Fraction of second
|
|
@@ -1166,30 +1077,27 @@ var formatters = {
|
|
|
1166
1077
|
X: function X(date, token, _localize, options) {
|
|
1167
1078
|
var originalDate = options._originalDate || date;
|
|
1168
1079
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1169
|
-
|
|
1170
1080
|
if (timezoneOffset === 0) {
|
|
1171
1081
|
return 'Z';
|
|
1172
1082
|
}
|
|
1173
|
-
|
|
1174
1083
|
switch (token) {
|
|
1175
1084
|
// Hours and optional minutes
|
|
1176
1085
|
case 'X':
|
|
1177
1086
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1087
|
+
|
|
1178
1088
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1179
1089
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1180
1090
|
// so this token always has the same output as `XX`
|
|
1181
|
-
|
|
1182
1091
|
case 'XXXX':
|
|
1183
1092
|
case 'XX':
|
|
1184
1093
|
// Hours and minutes without `:` delimiter
|
|
1185
1094
|
return formatTimezone(timezoneOffset);
|
|
1095
|
+
|
|
1186
1096
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1187
1097
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1188
1098
|
// so this token always has the same output as `XXX`
|
|
1189
|
-
|
|
1190
1099
|
case 'XXXXX':
|
|
1191
1100
|
case 'XXX': // Hours and minutes with `:` delimiter
|
|
1192
|
-
|
|
1193
1101
|
default:
|
|
1194
1102
|
return formatTimezone(timezoneOffset, ':');
|
|
1195
1103
|
}
|
|
@@ -1198,26 +1106,24 @@ var formatters = {
|
|
|
1198
1106
|
x: function x(date, token, _localize, options) {
|
|
1199
1107
|
var originalDate = options._originalDate || date;
|
|
1200
1108
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1201
|
-
|
|
1202
1109
|
switch (token) {
|
|
1203
1110
|
// Hours and optional minutes
|
|
1204
1111
|
case 'x':
|
|
1205
1112
|
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
1113
|
+
|
|
1206
1114
|
// Hours, minutes and optional seconds without `:` delimiter
|
|
1207
1115
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1208
1116
|
// so this token always has the same output as `xx`
|
|
1209
|
-
|
|
1210
1117
|
case 'xxxx':
|
|
1211
1118
|
case 'xx':
|
|
1212
1119
|
// Hours and minutes without `:` delimiter
|
|
1213
1120
|
return formatTimezone(timezoneOffset);
|
|
1121
|
+
|
|
1214
1122
|
// Hours, minutes and optional seconds with `:` delimiter
|
|
1215
1123
|
// Note: neither ISO-8601 nor JavaScript supports seconds in timezone offsets
|
|
1216
1124
|
// so this token always has the same output as `xxx`
|
|
1217
|
-
|
|
1218
1125
|
case 'xxxxx':
|
|
1219
1126
|
case 'xxx': // Hours and minutes with `:` delimiter
|
|
1220
|
-
|
|
1221
1127
|
default:
|
|
1222
1128
|
return formatTimezone(timezoneOffset, ':');
|
|
1223
1129
|
}
|
|
@@ -1226,7 +1132,6 @@ var formatters = {
|
|
|
1226
1132
|
O: function O(date, token, _localize, options) {
|
|
1227
1133
|
var originalDate = options._originalDate || date;
|
|
1228
1134
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1229
|
-
|
|
1230
1135
|
switch (token) {
|
|
1231
1136
|
// Short
|
|
1232
1137
|
case 'O':
|
|
@@ -1234,7 +1139,6 @@ var formatters = {
|
|
|
1234
1139
|
case 'OOO':
|
|
1235
1140
|
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
1236
1141
|
// Long
|
|
1237
|
-
|
|
1238
1142
|
case 'OOOO':
|
|
1239
1143
|
default:
|
|
1240
1144
|
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
@@ -1244,7 +1148,6 @@ var formatters = {
|
|
|
1244
1148
|
z: function z(date, token, _localize, options) {
|
|
1245
1149
|
var originalDate = options._originalDate || date;
|
|
1246
1150
|
var timezoneOffset = originalDate.getTimezoneOffset();
|
|
1247
|
-
|
|
1248
1151
|
switch (token) {
|
|
1249
1152
|
// Short
|
|
1250
1153
|
case 'z':
|
|
@@ -1252,7 +1155,6 @@ var formatters = {
|
|
|
1252
1155
|
case 'zzz':
|
|
1253
1156
|
return 'GMT' + formatTimezoneShort(timezoneOffset, ':');
|
|
1254
1157
|
// Long
|
|
1255
|
-
|
|
1256
1158
|
case 'zzzz':
|
|
1257
1159
|
default:
|
|
1258
1160
|
return 'GMT' + formatTimezone(timezoneOffset, ':');
|
|
@@ -1271,30 +1173,24 @@ var formatters = {
|
|
|
1271
1173
|
return addLeadingZeros(timestamp, token.length);
|
|
1272
1174
|
}
|
|
1273
1175
|
};
|
|
1274
|
-
|
|
1275
1176
|
function formatTimezoneShort(offset, dirtyDelimiter) {
|
|
1276
1177
|
var sign = offset > 0 ? '-' : '+';
|
|
1277
1178
|
var absOffset = Math.abs(offset);
|
|
1278
1179
|
var hours = Math.floor(absOffset / 60);
|
|
1279
1180
|
var minutes = absOffset % 60;
|
|
1280
|
-
|
|
1281
1181
|
if (minutes === 0) {
|
|
1282
1182
|
return sign + String(hours);
|
|
1283
1183
|
}
|
|
1284
|
-
|
|
1285
1184
|
var delimiter = dirtyDelimiter || '';
|
|
1286
1185
|
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
1287
1186
|
}
|
|
1288
|
-
|
|
1289
1187
|
function formatTimezoneWithOptionalMinutes(offset, dirtyDelimiter) {
|
|
1290
1188
|
if (offset % 60 === 0) {
|
|
1291
1189
|
var sign = offset > 0 ? '-' : '+';
|
|
1292
1190
|
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
1293
1191
|
}
|
|
1294
|
-
|
|
1295
1192
|
return formatTimezone(offset, dirtyDelimiter);
|
|
1296
1193
|
}
|
|
1297
|
-
|
|
1298
1194
|
function formatTimezone(offset, dirtyDelimiter) {
|
|
1299
1195
|
var delimiter = dirtyDelimiter || '';
|
|
1300
1196
|
var sign = offset > 0 ? '-' : '+';
|
|
@@ -1303,7 +1199,6 @@ function formatTimezone(offset, dirtyDelimiter) {
|
|
|
1303
1199
|
var minutes = addLeadingZeros(absOffset % 60, 2);
|
|
1304
1200
|
return sign + hours + delimiter + minutes;
|
|
1305
1201
|
}
|
|
1306
|
-
|
|
1307
1202
|
var formatters$1 = formatters;
|
|
1308
1203
|
|
|
1309
1204
|
var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
@@ -1312,17 +1207,14 @@ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
|
1312
1207
|
return formatLong.date({
|
|
1313
1208
|
width: 'short'
|
|
1314
1209
|
});
|
|
1315
|
-
|
|
1316
1210
|
case 'PP':
|
|
1317
1211
|
return formatLong.date({
|
|
1318
1212
|
width: 'medium'
|
|
1319
1213
|
});
|
|
1320
|
-
|
|
1321
1214
|
case 'PPP':
|
|
1322
1215
|
return formatLong.date({
|
|
1323
1216
|
width: 'long'
|
|
1324
1217
|
});
|
|
1325
|
-
|
|
1326
1218
|
case 'PPPP':
|
|
1327
1219
|
default:
|
|
1328
1220
|
return formatLong.date({
|
|
@@ -1330,24 +1222,20 @@ var dateLongFormatter = function dateLongFormatter(pattern, formatLong) {
|
|
|
1330
1222
|
});
|
|
1331
1223
|
}
|
|
1332
1224
|
};
|
|
1333
|
-
|
|
1334
1225
|
var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
1335
1226
|
switch (pattern) {
|
|
1336
1227
|
case 'p':
|
|
1337
1228
|
return formatLong.time({
|
|
1338
1229
|
width: 'short'
|
|
1339
1230
|
});
|
|
1340
|
-
|
|
1341
1231
|
case 'pp':
|
|
1342
1232
|
return formatLong.time({
|
|
1343
1233
|
width: 'medium'
|
|
1344
1234
|
});
|
|
1345
|
-
|
|
1346
1235
|
case 'ppp':
|
|
1347
1236
|
return formatLong.time({
|
|
1348
1237
|
width: 'long'
|
|
1349
1238
|
});
|
|
1350
|
-
|
|
1351
1239
|
case 'pppp':
|
|
1352
1240
|
default:
|
|
1353
1241
|
return formatLong.time({
|
|
@@ -1355,37 +1243,30 @@ var timeLongFormatter = function timeLongFormatter(pattern, formatLong) {
|
|
|
1355
1243
|
});
|
|
1356
1244
|
}
|
|
1357
1245
|
};
|
|
1358
|
-
|
|
1359
1246
|
var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong) {
|
|
1360
1247
|
var matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
1361
1248
|
var datePattern = matchResult[1];
|
|
1362
1249
|
var timePattern = matchResult[2];
|
|
1363
|
-
|
|
1364
1250
|
if (!timePattern) {
|
|
1365
1251
|
return dateLongFormatter(pattern, formatLong);
|
|
1366
1252
|
}
|
|
1367
|
-
|
|
1368
1253
|
var dateTimeFormat;
|
|
1369
|
-
|
|
1370
1254
|
switch (datePattern) {
|
|
1371
1255
|
case 'P':
|
|
1372
1256
|
dateTimeFormat = formatLong.dateTime({
|
|
1373
1257
|
width: 'short'
|
|
1374
1258
|
});
|
|
1375
1259
|
break;
|
|
1376
|
-
|
|
1377
1260
|
case 'PP':
|
|
1378
1261
|
dateTimeFormat = formatLong.dateTime({
|
|
1379
1262
|
width: 'medium'
|
|
1380
1263
|
});
|
|
1381
1264
|
break;
|
|
1382
|
-
|
|
1383
1265
|
case 'PPP':
|
|
1384
1266
|
dateTimeFormat = formatLong.dateTime({
|
|
1385
1267
|
width: 'long'
|
|
1386
1268
|
});
|
|
1387
1269
|
break;
|
|
1388
|
-
|
|
1389
1270
|
case 'PPPP':
|
|
1390
1271
|
default:
|
|
1391
1272
|
dateTimeFormat = formatLong.dateTime({
|
|
@@ -1393,10 +1274,8 @@ var dateTimeLongFormatter = function dateTimeLongFormatter(pattern, formatLong)
|
|
|
1393
1274
|
});
|
|
1394
1275
|
break;
|
|
1395
1276
|
}
|
|
1396
|
-
|
|
1397
1277
|
return dateTimeFormat.replace('{{date}}', dateLongFormatter(datePattern, formatLong)).replace('{{time}}', timeLongFormatter(timePattern, formatLong));
|
|
1398
1278
|
};
|
|
1399
|
-
|
|
1400
1279
|
var longFormatters = {
|
|
1401
1280
|
p: timeLongFormatter,
|
|
1402
1281
|
P: dateTimeLongFormatter
|
|
@@ -1450,14 +1329,15 @@ function throwProtectedError(token, format, input) {
|
|
|
1450
1329
|
// If there is no matching single quote
|
|
1451
1330
|
// then the sequence will continue until the end of the string.
|
|
1452
1331
|
// - . matches any single character unmatched by previous parts of the RegExps
|
|
1332
|
+
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
1453
1333
|
|
|
1454
|
-
|
|
1334
|
+
// This RegExp catches symbols escaped by quotes, and also
|
|
1455
1335
|
// sequences of symbols P, p, and the combinations like `PPPPPPPppppp`
|
|
1456
|
-
|
|
1457
1336
|
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
1458
1337
|
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
1459
1338
|
var doubleQuoteRegExp = /''/g;
|
|
1460
1339
|
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
1340
|
+
|
|
1461
1341
|
/**
|
|
1462
1342
|
* @name format
|
|
1463
1343
|
* @category Common Helpers
|
|
@@ -1752,40 +1632,36 @@ var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
|
1752
1632
|
|
|
1753
1633
|
function format(dirtyDate, dirtyFormatStr, options) {
|
|
1754
1634
|
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
|
-
|
|
1756
1635
|
requiredArgs(2, arguments);
|
|
1757
1636
|
var formatStr = String(dirtyFormatStr);
|
|
1758
1637
|
var defaultOptions = getDefaultOptions();
|
|
1759
1638
|
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;
|
|
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);
|
|
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);
|
|
1761
1640
|
|
|
1641
|
+
// Test if weekStartsOn is between 1 and 7 _and_ is not NaN
|
|
1762
1642
|
if (!(firstWeekContainsDate >= 1 && firstWeekContainsDate <= 7)) {
|
|
1763
1643
|
throw new RangeError('firstWeekContainsDate must be between 1 and 7 inclusively');
|
|
1764
1644
|
}
|
|
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);
|
|
1765
1646
|
|
|
1766
|
-
|
|
1767
|
-
|
|
1647
|
+
// Test if weekStartsOn is between 0 and 6 _and_ is not NaN
|
|
1768
1648
|
if (!(weekStartsOn >= 0 && weekStartsOn <= 6)) {
|
|
1769
1649
|
throw new RangeError('weekStartsOn must be between 0 and 6 inclusively');
|
|
1770
1650
|
}
|
|
1771
|
-
|
|
1772
1651
|
if (!locale.localize) {
|
|
1773
1652
|
throw new RangeError('locale must contain localize property');
|
|
1774
1653
|
}
|
|
1775
|
-
|
|
1776
1654
|
if (!locale.formatLong) {
|
|
1777
1655
|
throw new RangeError('locale must contain formatLong property');
|
|
1778
1656
|
}
|
|
1779
|
-
|
|
1780
1657
|
var originalDate = toDate(dirtyDate);
|
|
1781
|
-
|
|
1782
1658
|
if (!isValid(originalDate)) {
|
|
1783
1659
|
throw new RangeError('Invalid time value');
|
|
1784
|
-
}
|
|
1660
|
+
}
|
|
1661
|
+
|
|
1662
|
+
// Convert the date in system timezone to the same date in UTC+00:00 timezone.
|
|
1785
1663
|
// This ensures that when UTC functions will be implemented, locales will be compatible with them.
|
|
1786
1664
|
// See an issue about UTC functions: https://github.com/date-fns/date-fns/issues/376
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
1665
|
var timezoneOffset = getTimezoneOffsetInMilliseconds(originalDate);
|
|
1790
1666
|
var utcDate = subMilliseconds(originalDate, timezoneOffset);
|
|
1791
1667
|
var formatterOptions = {
|
|
@@ -1796,57 +1672,44 @@ function format(dirtyDate, dirtyFormatStr, options) {
|
|
|
1796
1672
|
};
|
|
1797
1673
|
var result = formatStr.match(longFormattingTokensRegExp).map(function (substring) {
|
|
1798
1674
|
var firstCharacter = substring[0];
|
|
1799
|
-
|
|
1800
1675
|
if (firstCharacter === 'p' || firstCharacter === 'P') {
|
|
1801
1676
|
var longFormatter = longFormatters$1[firstCharacter];
|
|
1802
1677
|
return longFormatter(substring, locale.formatLong);
|
|
1803
1678
|
}
|
|
1804
|
-
|
|
1805
1679
|
return substring;
|
|
1806
1680
|
}).join('').match(formattingTokensRegExp).map(function (substring) {
|
|
1807
1681
|
// Replace two single quote characters with one single quote character
|
|
1808
1682
|
if (substring === "''") {
|
|
1809
1683
|
return "'";
|
|
1810
1684
|
}
|
|
1811
|
-
|
|
1812
1685
|
var firstCharacter = substring[0];
|
|
1813
|
-
|
|
1814
1686
|
if (firstCharacter === "'") {
|
|
1815
1687
|
return cleanEscapedString(substring);
|
|
1816
1688
|
}
|
|
1817
|
-
|
|
1818
1689
|
var formatter = formatters$1[firstCharacter];
|
|
1819
|
-
|
|
1820
1690
|
if (formatter) {
|
|
1821
1691
|
if (!(options !== null && options !== void 0 && options.useAdditionalWeekYearTokens) && isProtectedWeekYearToken(substring)) {
|
|
1822
1692
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
1823
1693
|
}
|
|
1824
|
-
|
|
1825
1694
|
if (!(options !== null && options !== void 0 && options.useAdditionalDayOfYearTokens) && isProtectedDayOfYearToken(substring)) {
|
|
1826
1695
|
throwProtectedError(substring, dirtyFormatStr, String(dirtyDate));
|
|
1827
1696
|
}
|
|
1828
|
-
|
|
1829
1697
|
return formatter(utcDate, substring, locale.localize, formatterOptions);
|
|
1830
1698
|
}
|
|
1831
|
-
|
|
1832
1699
|
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
1833
1700
|
throw new RangeError('Format string contains an unescaped latin alphabet character `' + firstCharacter + '`');
|
|
1834
1701
|
}
|
|
1835
|
-
|
|
1836
1702
|
return substring;
|
|
1837
1703
|
}).join('');
|
|
1838
1704
|
return result;
|
|
1839
1705
|
}
|
|
1840
|
-
|
|
1841
1706
|
function cleanEscapedString(input) {
|
|
1842
1707
|
var matched = input.match(escapedStringRegExp);
|
|
1843
|
-
|
|
1844
1708
|
if (!matched) {
|
|
1845
1709
|
return input;
|
|
1846
1710
|
}
|
|
1847
|
-
|
|
1848
1711
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
1849
1712
|
}
|
|
1850
1713
|
|
|
1851
1714
|
export { toInteger as a, format as f, requiredArgs as r, toDate as t };
|
|
1852
|
-
//# sourceMappingURL=index-
|
|
1715
|
+
//# sourceMappingURL=index-f48cfdf7.js.map
|