react-moment 0.7.5 → 0.7.9
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/.idea/inspectionProfiles/Project_Default.xml +0 -1
- package/.idea/typescript-compiler.xml +6 -0
- package/.idea/workspace.xml +151 -102
- package/README.md +2 -1
- package/coverage/clover.xml +95 -94
- package/coverage/coverage-final.json +2 -2
- package/coverage/lcov-report/index.html +14 -14
- package/coverage/lcov-report/index.jsx.html +85 -79
- package/coverage/lcov-report/objects.js.html +7 -7
- package/coverage/lcov.info +203 -196
- package/dist/index.d.ts +62 -24
- package/dist/index.js +2 -2
- package/package.json +1 -1
- package/src/index.jsx +2 -2
- package/tests/index.jsx +18 -0
package/coverage/lcov.info
CHANGED
|
@@ -1,233 +1,240 @@
|
|
|
1
1
|
TN:
|
|
2
|
-
SF:/media/sean/
|
|
3
|
-
FN:
|
|
4
|
-
FN:
|
|
5
|
-
FN:
|
|
6
|
-
FN:
|
|
7
|
-
FN:
|
|
8
|
-
FN:
|
|
9
|
-
FN:
|
|
10
|
-
FN:
|
|
11
|
-
FN:
|
|
12
|
-
FN:
|
|
13
|
-
FN:
|
|
14
|
-
FN:
|
|
15
|
-
FN:
|
|
16
|
-
FN:
|
|
17
|
-
FN:
|
|
18
|
-
FN:
|
|
19
|
-
FN:
|
|
20
|
-
FN:
|
|
21
|
-
FN:
|
|
22
|
-
FN:
|
|
23
|
-
FN:
|
|
2
|
+
SF:/media/sean/work2/www/react-moment/src/index.jsx
|
|
3
|
+
FN:61,(anonymous_0)
|
|
4
|
+
FN:62,(anonymous_1)
|
|
5
|
+
FN:80,(anonymous_2)
|
|
6
|
+
FN:82,(anonymous_3)
|
|
7
|
+
FN:83,(anonymous_4)
|
|
8
|
+
FN:94,(anonymous_5)
|
|
9
|
+
FN:107,(anonymous_6)
|
|
10
|
+
FN:122,(anonymous_7)
|
|
11
|
+
FN:135,(anonymous_8)
|
|
12
|
+
FN:171,(anonymous_9)
|
|
13
|
+
FN:185,(anonymous_10)
|
|
14
|
+
FN:192,(anonymous_11)
|
|
15
|
+
FN:204,(anonymous_12)
|
|
16
|
+
FN:213,(anonymous_13)
|
|
17
|
+
FN:222,(anonymous_14)
|
|
18
|
+
FN:229,(anonymous_15)
|
|
19
|
+
FN:233,(anonymous_16)
|
|
20
|
+
FN:242,(anonymous_17)
|
|
21
|
+
FN:255,(anonymous_18)
|
|
22
|
+
FN:296,(anonymous_19)
|
|
23
|
+
FN:301,(anonymous_20)
|
|
24
24
|
FNF:21
|
|
25
25
|
FNH:18
|
|
26
|
-
FNDA:
|
|
27
|
-
FNDA:
|
|
26
|
+
FNDA:37,(anonymous_0)
|
|
27
|
+
FNDA:38,(anonymous_1)
|
|
28
28
|
FNDA:1,(anonymous_2)
|
|
29
29
|
FNDA:0,(anonymous_3)
|
|
30
30
|
FNDA:0,(anonymous_4)
|
|
31
31
|
FNDA:1,(anonymous_5)
|
|
32
32
|
FNDA:3,(anonymous_6)
|
|
33
33
|
FNDA:4,(anonymous_7)
|
|
34
|
-
FNDA:
|
|
35
|
-
FNDA:
|
|
36
|
-
FNDA:
|
|
37
|
-
FNDA:
|
|
34
|
+
FNDA:76,(anonymous_8)
|
|
35
|
+
FNDA:37,(anonymous_9)
|
|
36
|
+
FNDA:37,(anonymous_10)
|
|
37
|
+
FNDA:37,(anonymous_11)
|
|
38
38
|
FNDA:1,(anonymous_12)
|
|
39
39
|
FNDA:1,(anonymous_13)
|
|
40
40
|
FNDA:1,(anonymous_14)
|
|
41
|
-
FNDA:
|
|
41
|
+
FNDA:37,(anonymous_15)
|
|
42
42
|
FNDA:0,(anonymous_16)
|
|
43
|
-
FNDA:
|
|
44
|
-
FNDA:
|
|
45
|
-
FNDA:
|
|
46
|
-
FNDA:
|
|
43
|
+
FNDA:38,(anonymous_17)
|
|
44
|
+
FNDA:38,(anonymous_18)
|
|
45
|
+
FNDA:38,(anonymous_19)
|
|
46
|
+
FNDA:38,(anonymous_20)
|
|
47
47
|
DA:6,1
|
|
48
48
|
DA:13,1
|
|
49
49
|
DA:18,1
|
|
50
|
-
DA:
|
|
51
|
-
DA:80,1
|
|
50
|
+
DA:61,37
|
|
52
51
|
DA:81,1
|
|
53
|
-
DA:82,
|
|
52
|
+
DA:82,1
|
|
54
53
|
DA:83,0
|
|
55
54
|
DA:84,0
|
|
56
|
-
DA:
|
|
57
|
-
DA:95,
|
|
55
|
+
DA:85,0
|
|
56
|
+
DA:95,1
|
|
58
57
|
DA:96,0
|
|
59
58
|
DA:97,0
|
|
60
|
-
DA:
|
|
61
|
-
DA:108,
|
|
59
|
+
DA:98,0
|
|
60
|
+
DA:108,3
|
|
62
61
|
DA:109,0
|
|
63
|
-
DA:
|
|
62
|
+
DA:110,0
|
|
64
63
|
DA:112,3
|
|
65
|
-
DA:
|
|
64
|
+
DA:113,3
|
|
66
65
|
DA:123,4
|
|
67
|
-
DA:124,
|
|
68
|
-
DA:
|
|
69
|
-
DA:136,
|
|
70
|
-
DA:
|
|
71
|
-
DA:139,
|
|
72
|
-
DA:140,
|
|
73
|
-
DA:141,
|
|
74
|
-
DA:142,
|
|
75
|
-
DA:
|
|
76
|
-
DA:
|
|
77
|
-
DA:148,
|
|
78
|
-
DA:149,
|
|
79
|
-
DA:150,
|
|
80
|
-
DA:
|
|
81
|
-
DA:
|
|
82
|
-
DA:
|
|
83
|
-
DA:159,
|
|
84
|
-
DA:
|
|
85
|
-
DA:
|
|
86
|
-
DA:172,
|
|
87
|
-
DA:173,
|
|
88
|
-
DA:
|
|
89
|
-
DA:
|
|
90
|
-
DA:
|
|
91
|
-
DA:
|
|
92
|
-
DA:193,
|
|
93
|
-
DA:194,
|
|
94
|
-
DA:
|
|
95
|
-
DA:
|
|
96
|
-
DA:214,
|
|
97
|
-
DA:
|
|
98
|
-
DA:
|
|
99
|
-
DA:230,
|
|
100
|
-
DA:231,
|
|
101
|
-
DA:232,
|
|
102
|
-
DA:233,
|
|
103
|
-
DA:
|
|
104
|
-
DA:243,
|
|
66
|
+
DA:124,4
|
|
67
|
+
DA:125,1
|
|
68
|
+
DA:136,76
|
|
69
|
+
DA:137,76
|
|
70
|
+
DA:139,76
|
|
71
|
+
DA:140,76
|
|
72
|
+
DA:141,76
|
|
73
|
+
DA:142,76
|
|
74
|
+
DA:143,4
|
|
75
|
+
DA:145,72
|
|
76
|
+
DA:148,76
|
|
77
|
+
DA:149,76
|
|
78
|
+
DA:150,2
|
|
79
|
+
DA:151,74
|
|
80
|
+
DA:155,6
|
|
81
|
+
DA:157,68
|
|
82
|
+
DA:159,76
|
|
83
|
+
DA:160,4
|
|
84
|
+
DA:163,76
|
|
85
|
+
DA:172,37
|
|
86
|
+
DA:173,37
|
|
87
|
+
DA:174,1
|
|
88
|
+
DA:176,37
|
|
89
|
+
DA:179,37
|
|
90
|
+
DA:186,37
|
|
91
|
+
DA:193,37
|
|
92
|
+
DA:194,37
|
|
93
|
+
DA:195,3
|
|
94
|
+
DA:205,1
|
|
95
|
+
DA:214,1
|
|
96
|
+
DA:215,0
|
|
97
|
+
DA:223,1
|
|
98
|
+
DA:230,37
|
|
99
|
+
DA:231,37
|
|
100
|
+
DA:232,37
|
|
101
|
+
DA:233,34
|
|
102
|
+
DA:234,0
|
|
103
|
+
DA:243,38
|
|
105
104
|
DA:244,0
|
|
106
|
-
DA:
|
|
107
|
-
DA:247,
|
|
108
|
-
DA:
|
|
109
|
-
DA:
|
|
110
|
-
DA:
|
|
111
|
-
DA:
|
|
112
|
-
DA:264,
|
|
113
|
-
DA:265,
|
|
114
|
-
DA:266,
|
|
115
|
-
DA:
|
|
116
|
-
DA:269,
|
|
117
|
-
DA:
|
|
118
|
-
DA:273,
|
|
119
|
-
DA:274,
|
|
120
|
-
DA:275,
|
|
121
|
-
DA:276,
|
|
122
|
-
DA:277,
|
|
123
|
-
DA:278,
|
|
124
|
-
DA:279,
|
|
125
|
-
DA:280,
|
|
126
|
-
DA:281,
|
|
105
|
+
DA:245,0
|
|
106
|
+
DA:247,38
|
|
107
|
+
DA:248,4
|
|
108
|
+
DA:256,38
|
|
109
|
+
DA:260,38
|
|
110
|
+
DA:262,38
|
|
111
|
+
DA:264,38
|
|
112
|
+
DA:265,38
|
|
113
|
+
DA:266,38
|
|
114
|
+
DA:267,1
|
|
115
|
+
DA:269,38
|
|
116
|
+
DA:270,1
|
|
117
|
+
DA:273,38
|
|
118
|
+
DA:274,38
|
|
119
|
+
DA:275,38
|
|
120
|
+
DA:276,4
|
|
121
|
+
DA:277,34
|
|
122
|
+
DA:278,2
|
|
123
|
+
DA:279,32
|
|
124
|
+
DA:280,5
|
|
125
|
+
DA:281,27
|
|
127
126
|
DA:282,2
|
|
128
|
-
DA:283,
|
|
127
|
+
DA:283,25
|
|
129
128
|
DA:284,2
|
|
130
|
-
DA:285,
|
|
131
|
-
DA:286,
|
|
132
|
-
DA:
|
|
133
|
-
DA:
|
|
134
|
-
DA:
|
|
135
|
-
DA:
|
|
136
|
-
DA:
|
|
137
|
-
DA:
|
|
138
|
-
DA:
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
BRDA:
|
|
144
|
-
BRDA:
|
|
145
|
-
BRDA:
|
|
146
|
-
BRDA:
|
|
147
|
-
BRDA:
|
|
148
|
-
BRDA:
|
|
149
|
-
BRDA:
|
|
150
|
-
BRDA:
|
|
151
|
-
BRDA:
|
|
152
|
-
BRDA:
|
|
153
|
-
BRDA:
|
|
154
|
-
BRDA:139,
|
|
155
|
-
BRDA:139,
|
|
156
|
-
BRDA:140,
|
|
157
|
-
BRDA:140,
|
|
158
|
-
BRDA:141,
|
|
159
|
-
BRDA:141,
|
|
160
|
-
BRDA:
|
|
161
|
-
BRDA:
|
|
162
|
-
BRDA:
|
|
163
|
-
BRDA:
|
|
164
|
-
BRDA:
|
|
165
|
-
BRDA:
|
|
166
|
-
BRDA:
|
|
167
|
-
BRDA:
|
|
168
|
-
BRDA:
|
|
169
|
-
BRDA:
|
|
170
|
-
BRDA:
|
|
171
|
-
BRDA:
|
|
172
|
-
BRDA:
|
|
173
|
-
BRDA:
|
|
174
|
-
BRDA:
|
|
175
|
-
BRDA:
|
|
176
|
-
BRDA:
|
|
177
|
-
BRDA:
|
|
178
|
-
BRDA:
|
|
179
|
-
BRDA:
|
|
180
|
-
BRDA:
|
|
181
|
-
BRDA:
|
|
182
|
-
BRDA:
|
|
183
|
-
BRDA:
|
|
184
|
-
BRDA:
|
|
185
|
-
BRDA:
|
|
186
|
-
BRDA:
|
|
187
|
-
BRDA:
|
|
188
|
-
BRDA:
|
|
189
|
-
BRDA:
|
|
190
|
-
BRDA:
|
|
191
|
-
BRDA:
|
|
192
|
-
BRDA:
|
|
193
|
-
BRDA:
|
|
194
|
-
BRDA:
|
|
195
|
-
BRDA:
|
|
196
|
-
BRDA:
|
|
197
|
-
BRDA:
|
|
198
|
-
BRDA:
|
|
199
|
-
BRDA:
|
|
200
|
-
BRDA:
|
|
201
|
-
BRDA:
|
|
202
|
-
BRDA:
|
|
203
|
-
BRDA:
|
|
204
|
-
BRDA:
|
|
205
|
-
BRDA:
|
|
206
|
-
BRDA:
|
|
207
|
-
BRDA:
|
|
208
|
-
BRDA:
|
|
209
|
-
BRDA:
|
|
210
|
-
BRDA:
|
|
211
|
-
BRDA:
|
|
212
|
-
|
|
213
|
-
|
|
129
|
+
DA:285,23
|
|
130
|
+
DA:286,2
|
|
131
|
+
DA:287,21
|
|
132
|
+
DA:288,4
|
|
133
|
+
DA:290,17
|
|
134
|
+
DA:293,38
|
|
135
|
+
DA:294,38
|
|
136
|
+
DA:296,38
|
|
137
|
+
DA:297,38
|
|
138
|
+
DA:302,38
|
|
139
|
+
DA:303,38
|
|
140
|
+
LF:93
|
|
141
|
+
LH:81
|
|
142
|
+
BRDA:80,0,0,0
|
|
143
|
+
BRDA:84,1,0,0
|
|
144
|
+
BRDA:84,1,1,0
|
|
145
|
+
BRDA:95,2,0,0
|
|
146
|
+
BRDA:95,2,1,1
|
|
147
|
+
BRDA:108,3,0,0
|
|
148
|
+
BRDA:108,3,1,3
|
|
149
|
+
BRDA:112,4,0,3
|
|
150
|
+
BRDA:112,4,1,0
|
|
151
|
+
BRDA:124,5,0,1
|
|
152
|
+
BRDA:124,5,1,3
|
|
153
|
+
BRDA:139,6,0,76
|
|
154
|
+
BRDA:139,6,1,68
|
|
155
|
+
BRDA:140,7,0,76
|
|
156
|
+
BRDA:140,7,1,70
|
|
157
|
+
BRDA:141,8,0,76
|
|
158
|
+
BRDA:141,8,1,74
|
|
159
|
+
BRDA:142,9,0,4
|
|
160
|
+
BRDA:142,9,1,72
|
|
161
|
+
BRDA:145,10,0,72
|
|
162
|
+
BRDA:145,10,1,72
|
|
163
|
+
BRDA:149,11,0,2
|
|
164
|
+
BRDA:149,11,1,74
|
|
165
|
+
BRDA:151,12,0,6
|
|
166
|
+
BRDA:151,12,1,68
|
|
167
|
+
BRDA:159,13,0,4
|
|
168
|
+
BRDA:159,13,1,72
|
|
169
|
+
BRDA:173,14,0,1
|
|
170
|
+
BRDA:173,14,1,36
|
|
171
|
+
BRDA:194,15,0,3
|
|
172
|
+
BRDA:194,15,1,34
|
|
173
|
+
BRDA:214,16,0,0
|
|
174
|
+
BRDA:214,16,1,1
|
|
175
|
+
BRDA:232,17,0,34
|
|
176
|
+
BRDA:232,17,1,3
|
|
177
|
+
BRDA:232,18,0,37
|
|
178
|
+
BRDA:232,18,1,34
|
|
179
|
+
BRDA:243,19,0,0
|
|
180
|
+
BRDA:243,19,1,38
|
|
181
|
+
BRDA:243,20,0,38
|
|
182
|
+
BRDA:243,20,1,34
|
|
183
|
+
BRDA:247,21,0,4
|
|
184
|
+
BRDA:247,21,1,34
|
|
185
|
+
BRDA:247,22,0,38
|
|
186
|
+
BRDA:247,22,1,4
|
|
187
|
+
BRDA:256,23,0,38
|
|
188
|
+
BRDA:256,23,1,0
|
|
189
|
+
BRDA:264,24,0,38
|
|
190
|
+
BRDA:264,24,1,33
|
|
191
|
+
BRDA:266,25,0,1
|
|
192
|
+
BRDA:266,25,1,37
|
|
193
|
+
BRDA:269,26,0,1
|
|
194
|
+
BRDA:269,26,1,37
|
|
195
|
+
BRDA:273,27,0,38
|
|
196
|
+
BRDA:273,27,1,2
|
|
197
|
+
BRDA:275,28,0,4
|
|
198
|
+
BRDA:275,28,1,34
|
|
199
|
+
BRDA:275,29,0,38
|
|
200
|
+
BRDA:275,29,1,5
|
|
201
|
+
BRDA:277,30,0,2
|
|
202
|
+
BRDA:277,30,1,32
|
|
203
|
+
BRDA:279,31,0,5
|
|
204
|
+
BRDA:279,31,1,27
|
|
205
|
+
BRDA:279,32,0,32
|
|
206
|
+
BRDA:279,32,1,28
|
|
207
|
+
BRDA:281,33,0,2
|
|
208
|
+
BRDA:281,33,1,25
|
|
209
|
+
BRDA:283,34,0,2
|
|
210
|
+
BRDA:283,34,1,23
|
|
211
|
+
BRDA:285,35,0,2
|
|
212
|
+
BRDA:285,35,1,21
|
|
213
|
+
BRDA:287,36,0,4
|
|
214
|
+
BRDA:287,36,1,17
|
|
215
|
+
BRDA:293,37,0,38
|
|
216
|
+
BRDA:293,37,1,38
|
|
217
|
+
BRDA:303,38,0,38
|
|
218
|
+
BRDA:303,38,1,38
|
|
219
|
+
BRF:77
|
|
220
|
+
BRH:68
|
|
214
221
|
end_of_record
|
|
215
222
|
TN:
|
|
216
|
-
SF:/media/sean/
|
|
223
|
+
SF:/media/sean/work2/www/react-moment/src/objects.js
|
|
217
224
|
FN:26,objectKeyFilter
|
|
218
225
|
FN:30,(anonymous_1)
|
|
219
226
|
FN:31,(anonymous_2)
|
|
220
227
|
FNF:3
|
|
221
228
|
FNH:3
|
|
222
|
-
FNDA:
|
|
223
|
-
FNDA:
|
|
224
|
-
FNDA:
|
|
225
|
-
DA:27,
|
|
226
|
-
DA:28,
|
|
227
|
-
DA:29,
|
|
228
|
-
DA:30,
|
|
229
|
-
DA:31,
|
|
230
|
-
DA:33,
|
|
229
|
+
FNDA:39,objectKeyFilter
|
|
230
|
+
FNDA:516,(anonymous_1)
|
|
231
|
+
FNDA:482,(anonymous_2)
|
|
232
|
+
DA:27,39
|
|
233
|
+
DA:28,39
|
|
234
|
+
DA:29,39
|
|
235
|
+
DA:30,516
|
|
236
|
+
DA:31,482
|
|
237
|
+
DA:33,39
|
|
231
238
|
LF:6
|
|
232
239
|
LH:6
|
|
233
240
|
BRF:0
|
package/dist/index.d.ts
CHANGED
|
@@ -1,31 +1,69 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { Component, ComponentClass, SFC, CSSProperties } from 'react';
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
3
|
+
type elementTypes = string | SFC<any> | ComponentClass<any>;
|
|
4
|
+
type subtractOrAddTypes = {
|
|
5
|
+
years?: number,
|
|
6
|
+
y?: number,
|
|
7
|
+
quarters?: number,
|
|
8
|
+
Q?: number,
|
|
9
|
+
months?: number,
|
|
10
|
+
M?: number,
|
|
11
|
+
weeks?: number,
|
|
12
|
+
w?: number,
|
|
13
|
+
days?: number,
|
|
14
|
+
d?: number,
|
|
15
|
+
hours?: number,
|
|
16
|
+
h?: number,
|
|
17
|
+
minutes?: number,
|
|
18
|
+
m?: number,
|
|
19
|
+
seconds?: number,
|
|
20
|
+
s?: number,
|
|
21
|
+
milliseconds?: number,
|
|
22
|
+
ms?: number
|
|
23
|
+
};
|
|
24
|
+
type dateTypes = string|number|Array<string|number|object>|object;
|
|
25
|
+
type calendarTypes = boolean|object;
|
|
23
26
|
|
|
24
|
-
|
|
27
|
+
export interface MomentProps {
|
|
28
|
+
element?: elementTypes,
|
|
29
|
+
date?: dateTypes,
|
|
30
|
+
parse?: string | Array<any>,
|
|
31
|
+
format?: string,
|
|
32
|
+
ago?: boolean,
|
|
33
|
+
fromNow?: boolean,
|
|
34
|
+
fromNowDuring?: number,
|
|
35
|
+
from?: dateTypes,
|
|
36
|
+
toNow?: boolean,
|
|
37
|
+
to?: dateTypes,
|
|
38
|
+
calendar?: calendarTypes,
|
|
39
|
+
diff?: dateTypes,
|
|
40
|
+
unit?: string,
|
|
41
|
+
decimal?: boolean,
|
|
42
|
+
unix?: boolean,
|
|
43
|
+
utc?: boolean,
|
|
44
|
+
tz?: string,
|
|
45
|
+
locale?: string,
|
|
46
|
+
interval?: number,
|
|
47
|
+
subtract?: subtractOrAddTypes,
|
|
48
|
+
add?: subtractOrAddTypes,
|
|
49
|
+
children?: string | number,
|
|
50
|
+
style?: CSSProperties,
|
|
51
|
+
filter?: (date: string) => string,
|
|
52
|
+
onChange?: (content:any) => any
|
|
25
53
|
}
|
|
26
54
|
|
|
27
|
-
declare class Moment extends
|
|
28
|
-
|
|
55
|
+
declare class Moment extends Component<MomentProps, any> {
|
|
56
|
+
constructor(props:MomentProps);
|
|
57
|
+
public static globalMoment: Function;
|
|
58
|
+
public static globalLocale: string;
|
|
59
|
+
public static globalFormat: string;
|
|
60
|
+
public static globalParse: string;
|
|
61
|
+
public static globalTimezone: string;
|
|
62
|
+
public static globalElement: any;
|
|
63
|
+
public static globalFilter: Function;
|
|
64
|
+
public static startPooledTimer(interval?: number): void;
|
|
65
|
+
public static clearPooledTimer(): void;
|
|
66
|
+
public static getDatetime(props: MomentProps): any;
|
|
29
67
|
}
|
|
30
68
|
|
|
31
69
|
export default Moment;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("react")):"function"==typeof define&&define.amd?define(["moment","react"],t):"object"==typeof exports?exports["react-moment"]=t(require("moment"),require("react")):e["react-moment"]=t(e.moment,e.react)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(13),f=r(c),s=n(11),p=r(s),d=n(12),
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("moment"),require("react")):"function"==typeof define&&define.amd?define(["moment","react"],t):"object"==typeof exports?exports["react-moment"]=t(require("moment"),require("react")):e["react-moment"]=t(e.moment,e.react)}(this,function(e,t){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return e[r].call(o.exports,o,o.exports,t),o.loaded=!0,o.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,n,r){return n&&e(t.prototype,n),r&&e(t,r),t}}(),c=n(13),f=r(c),s=n(11),p=r(s),d=n(12),m=r(d),y=n(6),v=[p.default.string,p.default.number,p.default.array,p.default.object],b=[p.default.string,p.default.array],h=[p.default.object,p.default.bool],g=function(e){function t(e){o(this,t);var n=i(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.setTimer=function(){n.clearTimer();var e=n.props.interval;t.pooledTimer||0===e||(n.timer=setInterval(function(){n.update(n.props)},e))},n.clearTimer=function(){!t.pooledTimer&&n.timer&&(clearInterval(n.timer),n.timer=null),t.pooledTimer&&!n.timer&&t.removePooledElement(n)},t.globalMoment||(t.globalMoment=m.default),n.state={content:""},n.timer=null,n}return a(t,e),l(t,null,[{key:"startPooledTimer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6e4;t.clearPooledTimer(),t.pooledTimer=setInterval(function(){t.pooledElements.forEach(function(e){0!==e.props.interval&&e.update()})},e)}},{key:"clearPooledTimer",value:function(){t.pooledTimer&&(clearInterval(t.pooledTimer),t.pooledTimer=null,t.pooledElements=[])}},{key:"pushPooledElement",value:function(e){return e instanceof t?void(t.pooledElements.indexOf(e)===-1&&t.pooledElements.push(e)):void console.error("Element not an instance of Moment.")}},{key:"removePooledElement",value:function(e){var n=t.pooledElements.indexOf(e);n!==-1&&t.pooledElements.splice(n,1)}},{key:"getDatetime",value:function(e){var n=e.utc,r=e.unix,o=e.date,i=e.locale,a=e.parse,u=e.tz;o=o||e.children,a=a||t.globalParse,u=u||t.globalTimezone,i=t.globalLocale?t.globalLocale:i||t.globalMoment.locale();var l=null;return l=n?t.globalMoment.utc(o,a,i):r?t.globalMoment(1e3*o,a,i):t.globalMoment(o,a,i),u&&(l=l.tz(u)),l}}]),l(t,[{key:"componentWillMount",value:function(){this.update(this.props)}},{key:"componentDidMount",value:function(){this.setTimer(),t.pooledTimer&&t.pushPooledElement(this)}},{key:"componentWillReceiveProps",value:function(e){this.update(e)}},{key:"componentDidUpdate",value:function(e){e.interval!==this.props.interval&&this.setTimer()}},{key:"componentWillUnmount",value:function(){this.clearTimer()}},{key:"update",value:function(e){var n=this;e=e||this.props;var r=e,o=r.fromNow,i=r.fromNowDuring,a=r.from,u=r.add,l=r.subtract,c=r.toNow,f=r.to,s=r.ago,p=r.calendar,d=r.diff,y=r.unit,v=r.decimal,b=e,h=b.format;h=h||t.globalFormat;var g=t.getDatetime(e);u&&g.add(u),l&&g.subtract(l);var O=Boolean(i)&&-g.diff((0,m.default)())<i,T="";T=h&&!O?g.format(h):a?g.from(a,s):o||O?g.fromNow(s):f?g.to(f,s):c?g.toNow(s):p?g.calendar(null,p):d?g.diff(d,y,v):g.toString();var w=t.globalFilter||this.props.filter;T=w(T),this.setState({content:T},function(){n.props.onChange(T)})}},{key:"render",value:function(){var e=(0,y.objectKeyFilter)(this.props,t.propTypes);return f.default.createElement(t.globalElement||this.props.element,u({dateTime:t.getDatetime(this.props)},e),this.state.content)}}]),t}(f.default.Component);g.propTypes={element:p.default.any,date:p.default.oneOfType(v),parse:p.default.oneOfType(b),format:p.default.string,add:p.default.object,subtract:p.default.object,ago:p.default.bool,fromNow:p.default.bool,fromNowDuring:p.default.number,from:p.default.oneOfType(v),toNow:p.default.bool,to:p.default.oneOfType(v),calendar:p.default.oneOfType(h),unix:p.default.bool,utc:p.default.bool,tz:p.default.string,locale:p.default.string,interval:p.default.number,diff:p.default.oneOfType(v),unit:p.default.string,decimal:p.default.bool,filter:p.default.func,onChange:p.default.func},g.defaultProps={element:"time",fromNow:!1,toNow:!1,calendar:!1,ago:!1,unix:!1,utc:!1,unit:null,decimal:!1,interval:6e4,filter:function(e){return e},onChange:function(){}},g.globalMoment=null,g.globalLocale=null,g.globalFormat=null,g.globalParse=null,g.globalFilter=null,g.globalElement=null,g.globalTimezone=null,g.pooledElements=[],g.pooledTimer=null,t.default=g},function(e,t){function n(){throw new Error("setTimeout has not been defined")}function r(){throw new Error("clearTimeout has not been defined")}function o(e){if(f===setTimeout)return setTimeout(e,0);if((f===n||!f)&&setTimeout)return f=setTimeout,setTimeout(e,0);try{return f(e,0)}catch(t){try{return f.call(null,e,0)}catch(t){return f.call(this,e,0)}}}function i(e){if(s===clearTimeout)return clearTimeout(e);if((s===r||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(e);try{return s(e)}catch(t){try{return s.call(null,e)}catch(t){return s.call(this,e)}}}function a(){y&&d&&(y=!1,d.length?m=d.concat(m):v=-1,m.length&&u())}function u(){if(!y){var e=o(a);y=!0;for(var t=m.length;t;){for(d=m,m=[];++v<t;)d&&d[v].run();v=-1,t=m.length}d=null,y=!1,i(e)}}function l(e,t){this.fun=e,this.array=t}function c(){}var f,s,p=e.exports={};!function(){try{f="function"==typeof setTimeout?setTimeout:n}catch(e){f=n}try{s="function"==typeof clearTimeout?clearTimeout:r}catch(e){s=r}}();var d,m=[],y=!1,v=-1;p.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];m.push(new l(e,t)),1!==m.length||y||o(u)},l.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=c,p.addListener=c,p.once=c,p.off=c,p.removeListener=c,p.removeAllListeners=c,p.emit=c,p.prependListener=c,p.prependOnceListener=c,p.listeners=function(e){return[]},p.binding=function(e){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(e){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(e,t){"use strict";function n(e){return function(){return e}}var r=function(){};r.thatReturns=n,r.thatReturnsFalse=n(!1),r.thatReturnsTrue=n(!0),r.thatReturnsNull=n(null),r.thatReturnsThis=function(){return this},r.thatReturnsArgument=function(e){return e},e.exports=r},function(e,t,n){(function(t){"use strict";function n(e,t,n,o,i,a,u,l){if(r(t),!e){var c;if(void 0===t)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var f=[n,o,i,a,u,l],s=0;c=new Error(t.replace(/%s/g,function(){return f[s++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}}var r=function(e){};"production"!==t.env.NODE_ENV&&(r=function(e){if(void 0===e)throw new Error("invariant requires an error message argument")}),e.exports=n}).call(t,n(1))},function(e,t){"use strict";var n="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";e.exports=n},function(e,t,n){(function(t){"use strict";var r=n(2),o=r;if("production"!==t.env.NODE_ENV){var i=function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=0,i="Warning: "+e.replace(/%s/g,function(){return n[o++]});"undefined"!=typeof console&&console.error(i);try{throw new Error(i)}catch(e){}};o=function(e,t){if(void 0===t)throw new Error("`warning(condition, format, ...args)` requires a warning message argument");if(0!==t.indexOf("Failed Composite propType: ")&&!e){for(var n=arguments.length,r=Array(n>2?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];i.apply(void 0,[t].concat(r))}}}e.exports=o}).call(t,n(1))},function(e,t){"use strict";function n(e,t){var n=Object.keys(t),r=Object.assign({},e);return Object.keys(r).filter(function(e){return n.indexOf(e)!==-1}).forEach(function(e){return delete r[e]}),r}Object.defineProperty(t,"__esModule",{value:!0}),t.objectKeyFilter=n},function(e,t){/*
|
|
2
2
|
object-assign
|
|
3
3
|
(c) Sindre Sorhus
|
|
4
4
|
@license MIT
|
|
5
5
|
*/
|
|
6
|
-
"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,u,l=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(l[f]=r[f]);if(o){u=o(r);for(var s=0;s<u.length;s++)a.call(r,u[s])&&(l[u[s]]=r[u[s]])}}return l}},function(e,t,n){(function(t){"use strict";function r(e,n,r,l,c){if("production"!==t.env.NODE_ENV)for(var f in e)if(e.hasOwnProperty(f)){var s;try{o("function"==typeof e[f],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",l||"React class",r,f,typeof e[f]),s=e[f](n,f,l,r,null,a)}catch(e){s=e}if(i(!s||s instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",r,f,typeof s),s instanceof Error&&!(s.message in u)){u[s.message]=!0;var p=c?c():"";i(!1,"Failed %s type: %s%s",r,s.message,null!=p?p:"")}}}if("production"!==t.env.NODE_ENV)var o=n(3),i=n(5),a=n(4),u={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(2),o=n(3),i=n(5),a=n(7),u=n(4),l=n(8);e.exports=function(e,n){function c(e){var t=e&&(R&&e[R]||e[I]);if("function"==typeof t)return t}function f(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function s(e){this.message=e,this.stack=""}function p(e){function r(r,c,f,p,d,y
|
|
6
|
+
"use strict";function n(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function r(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;var r=Object.getOwnPropertyNames(t).map(function(e){return t[e]});if("0123456789"!==r.join(""))return!1;var o={};return"abcdefghijklmnopqrst".split("").forEach(function(e){o[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},o)).join("")}catch(e){return!1}}var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=r()?Object.assign:function(e,t){for(var r,u,l=n(e),c=1;c<arguments.length;c++){r=Object(arguments[c]);for(var f in r)i.call(r,f)&&(l[f]=r[f]);if(o){u=o(r);for(var s=0;s<u.length;s++)a.call(r,u[s])&&(l[u[s]]=r[u[s]])}}return l}},function(e,t,n){(function(t){"use strict";function r(e,n,r,l,c){if("production"!==t.env.NODE_ENV)for(var f in e)if(e.hasOwnProperty(f)){var s;try{o("function"==typeof e[f],"%s: %s type `%s` is invalid; it must be a function, usually from the `prop-types` package, but received `%s`.",l||"React class",r,f,typeof e[f]),s=e[f](n,f,l,r,null,a)}catch(e){s=e}if(i(!s||s instanceof Error,"%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",l||"React class",r,f,typeof s),s instanceof Error&&!(s.message in u)){u[s.message]=!0;var p=c?c():"";i(!1,"Failed %s type: %s%s",r,s.message,null!=p?p:"")}}}if("production"!==t.env.NODE_ENV)var o=n(3),i=n(5),a=n(4),u={};e.exports=r}).call(t,n(1))},function(e,t,n){"use strict";var r=n(2),o=n(3),i=n(4);e.exports=function(){function e(e,t,n,r,a,u){u!==i&&o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types")}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t};return n.checkPropTypes=r,n.PropTypes=n,n}},function(e,t,n){(function(t){"use strict";var r=n(2),o=n(3),i=n(5),a=n(7),u=n(4),l=n(8);e.exports=function(e,n){function c(e){var t=e&&(R&&e[R]||e[I]);if("function"==typeof t)return t}function f(e,t){return e===t?0!==e||1/e===1/t:e!==e&&t!==t}function s(e){this.message=e,this.stack=""}function p(e){function r(r,c,f,p,d,m,y){if(p=p||S,m=m||f,y!==u)if(n)o(!1,"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types");else if("production"!==t.env.NODE_ENV&&"undefined"!=typeof console){var v=p+":"+f;!a[v]&&l<3&&(i(!1,"You are manually calling a React.PropTypes validation function for the `%s` prop on `%s`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details.",m,p),a[v]=!0,l++)}return null==c[f]?r?new s(null===c[f]?"The "+d+" `"+m+"` is marked as required "+("in `"+p+"`, but its value is `null`."):"The "+d+" `"+m+"` is marked as required in "+("`"+p+"`, but its value is `undefined`.")):null:e(c,f,p,d,m)}if("production"!==t.env.NODE_ENV)var a={},l=0;var c=r.bind(null,!1);return c.isRequired=r.bind(null,!0),c}function d(e){function t(t,n,r,o,i,a){var u=t[n],l=P(u);if(l!==e){var c=N(u);return new s("Invalid "+o+" `"+i+"` of type "+("`"+c+"` supplied to `"+r+"`, expected ")+("`"+e+"`."))}return null}return p(t)}function m(){return p(r.thatReturnsNull)}function y(e){function t(t,n,r,o,i){if("function"!=typeof e)return new s("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside arrayOf.");var a=t[n];if(!Array.isArray(a)){var l=P(a);return new s("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an array."))}for(var c=0;c<a.length;c++){var f=e(a,c,r,o,i+"["+c+"]",u);if(f instanceof Error)return f}return null}return p(t)}function v(){function t(t,n,r,o,i){var a=t[n];if(!e(a)){var u=P(a);return new s("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected a single ReactElement."))}return null}return p(t)}function b(e){function t(t,n,r,o,i){if(!(t[n]instanceof e)){var a=e.name||S,u=_(t[n]);return new s("Invalid "+o+" `"+i+"` of type "+("`"+u+"` supplied to `"+r+"`, expected ")+("instance of `"+a+"`."))}return null}return p(t)}function h(e){function n(t,n,r,o,i){for(var a=t[n],u=0;u<e.length;u++)if(f(a,e[u]))return null;var l=JSON.stringify(e);return new s("Invalid "+o+" `"+i+"` of value `"+a+"` "+("supplied to `"+r+"`, expected one of "+l+"."))}return Array.isArray(e)?p(n):("production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOf, expected an instance of array."):void 0,r.thatReturnsNull)}function g(e){function t(t,n,r,o,i){if("function"!=typeof e)return new s("Property `"+i+"` of component `"+r+"` has invalid PropType notation inside objectOf.");var a=t[n],l=P(a);if("object"!==l)return new s("Invalid "+o+" `"+i+"` of type "+("`"+l+"` supplied to `"+r+"`, expected an object."));for(var c in a)if(a.hasOwnProperty(c)){var f=e(a,c,r,o,i+"."+c,u);if(f instanceof Error)return f}return null}return p(t)}function O(e){function n(t,n,r,o,i){for(var a=0;a<e.length;a++){var l=e[a];if(null==l(t,n,r,o,i,u))return null}return new s("Invalid "+o+" `"+i+"` supplied to "+("`"+r+"`."))}if(!Array.isArray(e))return"production"!==t.env.NODE_ENV?i(!1,"Invalid argument supplied to oneOfType, expected an instance of array."):void 0,r.thatReturnsNull;for(var o=0;o<e.length;o++){var a=e[o];if("function"!=typeof a)return i(!1,"Invalid argument supplied to oneOfType. Expected an array of check functions, but received %s at index %s.",k(a),o),r.thatReturnsNull}return p(n)}function T(){function e(e,t,n,r,o){return j(e[t])?null:new s("Invalid "+r+" `"+o+"` supplied to "+("`"+n+"`, expected a ReactNode."))}return p(e)}function w(e){function t(t,n,r,o,i){var a=t[n],l=P(a);if("object"!==l)return new s("Invalid "+o+" `"+i+"` of type `"+l+"` "+("supplied to `"+r+"`, expected `object`."));for(var c in e){var f=e[c];if(f){var p=f(a,c,r,o,i+"."+c,u);if(p)return p}}return null}return p(t)}function E(e){function t(t,n,r,o,i){var l=t[n],c=P(l);if("object"!==c)return new s("Invalid "+o+" `"+i+"` of type `"+c+"` "+("supplied to `"+r+"`, expected `object`."));var f=a({},t[n],e);for(var p in f){var d=e[p];if(!d)return new s("Invalid "+o+" `"+i+"` key `"+p+"` supplied to `"+r+"`.\nBad object: "+JSON.stringify(t[n],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(e),null," "));var m=d(l,p,r,o,i+"."+p,u);if(m)return m}return null}return p(t)}function j(t){switch(typeof t){case"number":case"string":case"undefined":return!0;case"boolean":return!t;case"object":if(Array.isArray(t))return t.every(j);if(null===t||e(t))return!0;var n=c(t);if(!n)return!1;var r,o=n.call(t);if(n!==t.entries){for(;!(r=o.next()).done;)if(!j(r.value))return!1}else for(;!(r=o.next()).done;){var i=r.value;if(i&&!j(i[1]))return!1}return!0;default:return!1}}function x(e,t){return"symbol"===e||("Symbol"===t["@@toStringTag"]||"function"==typeof Symbol&&t instanceof Symbol)}function P(e){var t=typeof e;return Array.isArray(e)?"array":e instanceof RegExp?"object":x(t,e)?"symbol":t}function N(e){if("undefined"==typeof e||null===e)return""+e;var t=P(e);if("object"===t){if(e instanceof Date)return"date";if(e instanceof RegExp)return"regexp"}return t}function k(e){var t=N(e);switch(t){case"array":case"object":return"an "+t;case"boolean":case"date":case"regexp":return"a "+t;default:return t}}function _(e){return e.constructor&&e.constructor.name?e.constructor.name:S}var R="function"==typeof Symbol&&Symbol.iterator,I="@@iterator",S="<<anonymous>>",D={array:d("array"),bool:d("boolean"),func:d("function"),number:d("number"),object:d("object"),string:d("string"),symbol:d("symbol"),any:m(),arrayOf:y,element:v(),instanceOf:b,node:T(),objectOf:g,oneOf:h,oneOfType:O,shape:w,exact:E};return s.prototype=Error.prototype,D.checkPropTypes=l,D.PropTypes=D,D}}).call(t,n(1))},function(e,t,n){(function(t){if("production"!==t.env.NODE_ENV){var r="function"==typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,o=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===r},i=!0;e.exports=n(10)(o,i)}else e.exports=n(9)()}).call(t,n(1))},function(t,n){t.exports=e},function(e,n){e.exports=t}])});
|
package/package.json
CHANGED
package/src/index.jsx
CHANGED
|
@@ -270,9 +270,9 @@ export default class Moment extends React.Component {
|
|
|
270
270
|
datetime.subtract(subtract);
|
|
271
271
|
}
|
|
272
272
|
|
|
273
|
-
const fromNowPeriod = Boolean(fromNowDuring) && -
|
|
273
|
+
const fromNowPeriod = Boolean(fromNowDuring) && -datetime.diff(moment()) < fromNowDuring;
|
|
274
274
|
let content = '';
|
|
275
|
-
if (format && !fromNowPeriod
|
|
275
|
+
if (format && !fromNowPeriod) {
|
|
276
276
|
content = datetime.format(format);
|
|
277
277
|
} else if (from) {
|
|
278
278
|
content = datetime.from(from, ago);
|