@steedos/filters 2.2.54-beta.1 → 2.2.54-beta.4
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/dist/assets.json +11 -0
- package/dist/steedos-filters.umd.js +1286 -0
- package/dist/steedos-filters.umd.min.js +7 -0
- package/lib/date.formatter.js +7 -1
- package/lib/default_date_names.js +31 -14
- package/lib/filter.js +13 -10
- package/lib/format.js +39 -30
- package/lib/formula.js +7 -1
- package/lib/graphql.js +15 -11
- package/lib/index.js +68 -7
- package/lib/utils.js +62 -50
- package/package.json +12 -7
package/lib/utils.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports.isBetweenFilterOperation = exports.getQuarterStartMonth = exports.getNextQuarterFirstDay = exports.getMonthDays = exports.getLastQuarterFirstDay = exports.getLastMonthFirstDay = exports.getBetweenTimeBuiltinValueItem = exports.getBetweenBuiltinValueItem = void 0;
|
|
9
|
+
|
|
10
|
+
var _moment = _interopRequireDefault(require("moment"));
|
|
6
11
|
|
|
7
12
|
var t = function t(key) {
|
|
8
13
|
return key;
|
|
@@ -22,6 +27,8 @@ var getMonthDays = function getMonthDays(year, month) {
|
|
|
22
27
|
return days;
|
|
23
28
|
};
|
|
24
29
|
|
|
30
|
+
exports.getMonthDays = getMonthDays;
|
|
31
|
+
|
|
25
32
|
var getNextQuarterFirstDay = function getNextQuarterFirstDay(year, month) {
|
|
26
33
|
if (!year) {
|
|
27
34
|
year = new Date().getFullYear();
|
|
@@ -45,6 +52,8 @@ var getNextQuarterFirstDay = function getNextQuarterFirstDay(year, month) {
|
|
|
45
52
|
return new Date(year, month, 1);
|
|
46
53
|
};
|
|
47
54
|
|
|
55
|
+
exports.getNextQuarterFirstDay = getNextQuarterFirstDay;
|
|
56
|
+
|
|
48
57
|
var getLastMonthFirstDay = function getLastMonthFirstDay(year, month) {
|
|
49
58
|
if (!year) {
|
|
50
59
|
year = new Date().getFullYear();
|
|
@@ -66,6 +75,8 @@ var getLastMonthFirstDay = function getLastMonthFirstDay(year, month) {
|
|
|
66
75
|
return new Date(year, month, 1);
|
|
67
76
|
};
|
|
68
77
|
|
|
78
|
+
exports.getLastMonthFirstDay = getLastMonthFirstDay;
|
|
79
|
+
|
|
69
80
|
var getQuarterStartMonth = function getQuarterStartMonth(month) {
|
|
70
81
|
if (!month) {
|
|
71
82
|
month = new Date().getMonth();
|
|
@@ -82,6 +93,8 @@ var getQuarterStartMonth = function getQuarterStartMonth(month) {
|
|
|
82
93
|
return 9;
|
|
83
94
|
};
|
|
84
95
|
|
|
96
|
+
exports.getQuarterStartMonth = getQuarterStartMonth;
|
|
97
|
+
|
|
85
98
|
var getLastQuarterFirstDay = function getLastQuarterFirstDay(year, month) {
|
|
86
99
|
if (!year) {
|
|
87
100
|
year = new Date().getFullYear();
|
|
@@ -105,6 +118,8 @@ var getLastQuarterFirstDay = function getLastQuarterFirstDay(year, month) {
|
|
|
105
118
|
return new Date(year, month, 1);
|
|
106
119
|
};
|
|
107
120
|
|
|
121
|
+
exports.getLastQuarterFirstDay = getLastQuarterFirstDay;
|
|
122
|
+
|
|
108
123
|
var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key, utcOffset) {
|
|
109
124
|
// 过滤器between运算符,现算日期/日期时间类型字段的values值
|
|
110
125
|
var currentMonth, currentYear, endValue, firstDay, label, lastDay, lastMonday, lastMonthFinalDay, lastMonthFirstDay, lastQuarterEndDay, lastQuarterStartDay, lastSunday, last_120_days, last_30_days, last_60_days, last_7_days, last_90_days, millisecond, minusDay, monday, month, nextMonday, nextMonthFinalDay, nextMonthFirstDay, nextQuarterEndDay, nextQuarterStartDay, nextSunday, nextYear, next_120_days, next_30_days, next_60_days, next_7_days, next_90_days, now, previousYear, startValue, strEndDay, strFirstDay, strLastDay, strMonday, strStartDay, strSunday, strToday, strTomorrow, strYestday, sunday, thisQuarterEndDay, thisQuarterStartDay, tomorrow, values, week, year, yestday;
|
|
@@ -192,8 +207,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
192
207
|
|
|
193
208
|
case "last_quarter":
|
|
194
209
|
// 上季度
|
|
195
|
-
strFirstDay =
|
|
196
|
-
strLastDay =
|
|
210
|
+
strFirstDay = (0, _moment["default"])(lastQuarterStartDay).format("YYYY-MM-DD");
|
|
211
|
+
strLastDay = (0, _moment["default"])(lastQuarterEndDay).format("YYYY-MM-DD");
|
|
197
212
|
label = t("creator_filter_operation_between_last_quarter");
|
|
198
213
|
startValue = new Date(strFirstDay + "T00:00:00Z");
|
|
199
214
|
endValue = new Date(strLastDay + "T23:59:59Z");
|
|
@@ -201,8 +216,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
201
216
|
|
|
202
217
|
case "this_quarter":
|
|
203
218
|
// 本季度
|
|
204
|
-
strFirstDay =
|
|
205
|
-
strLastDay =
|
|
219
|
+
strFirstDay = (0, _moment["default"])(thisQuarterStartDay).format("YYYY-MM-DD");
|
|
220
|
+
strLastDay = (0, _moment["default"])(thisQuarterEndDay).format("YYYY-MM-DD");
|
|
206
221
|
label = t("creator_filter_operation_between_this_quarter");
|
|
207
222
|
startValue = new Date(strFirstDay + "T00:00:00Z");
|
|
208
223
|
endValue = new Date(strLastDay + "T23:59:59Z");
|
|
@@ -210,8 +225,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
210
225
|
|
|
211
226
|
case "next_quarter":
|
|
212
227
|
// 下季度
|
|
213
|
-
strFirstDay =
|
|
214
|
-
strLastDay =
|
|
228
|
+
strFirstDay = (0, _moment["default"])(nextQuarterStartDay).format("YYYY-MM-DD");
|
|
229
|
+
strLastDay = (0, _moment["default"])(nextQuarterEndDay).format("YYYY-MM-DD");
|
|
215
230
|
label = t("creator_filter_operation_between_next_quarter");
|
|
216
231
|
startValue = new Date(strFirstDay + "T00:00:00Z");
|
|
217
232
|
endValue = new Date(strLastDay + "T23:59:59Z");
|
|
@@ -219,8 +234,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
219
234
|
|
|
220
235
|
case "last_month":
|
|
221
236
|
// 上月
|
|
222
|
-
strFirstDay =
|
|
223
|
-
strLastDay =
|
|
237
|
+
strFirstDay = (0, _moment["default"])(lastMonthFirstDay).format("YYYY-MM-DD");
|
|
238
|
+
strLastDay = (0, _moment["default"])(lastMonthFinalDay).format("YYYY-MM-DD");
|
|
224
239
|
label = t("creator_filter_operation_between_last_month");
|
|
225
240
|
startValue = new Date(strFirstDay + "T00:00:00Z");
|
|
226
241
|
endValue = new Date(strLastDay + "T23:59:59Z");
|
|
@@ -228,8 +243,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
228
243
|
|
|
229
244
|
case "this_month":
|
|
230
245
|
// 本月
|
|
231
|
-
strFirstDay =
|
|
232
|
-
strLastDay =
|
|
246
|
+
strFirstDay = (0, _moment["default"])(firstDay).format("YYYY-MM-DD");
|
|
247
|
+
strLastDay = (0, _moment["default"])(lastDay).format("YYYY-MM-DD");
|
|
233
248
|
label = t("creator_filter_operation_between_this_month");
|
|
234
249
|
startValue = new Date(strFirstDay + "T00:00:00Z");
|
|
235
250
|
endValue = new Date(strLastDay + "T23:59:59Z");
|
|
@@ -237,8 +252,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
237
252
|
|
|
238
253
|
case "next_month":
|
|
239
254
|
// 下月
|
|
240
|
-
strFirstDay =
|
|
241
|
-
strLastDay =
|
|
255
|
+
strFirstDay = (0, _moment["default"])(nextMonthFirstDay).format("YYYY-MM-DD");
|
|
256
|
+
strLastDay = (0, _moment["default"])(nextMonthFinalDay).format("YYYY-MM-DD");
|
|
242
257
|
label = t("creator_filter_operation_between_next_month");
|
|
243
258
|
startValue = new Date(strFirstDay + "T00:00:00Z");
|
|
244
259
|
endValue = new Date(strLastDay + "T23:59:59Z");
|
|
@@ -246,8 +261,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
246
261
|
|
|
247
262
|
case "last_week":
|
|
248
263
|
// 上周
|
|
249
|
-
strMonday =
|
|
250
|
-
strSunday =
|
|
264
|
+
strMonday = (0, _moment["default"])(lastMonday).format("YYYY-MM-DD");
|
|
265
|
+
strSunday = (0, _moment["default"])(lastSunday).format("YYYY-MM-DD");
|
|
251
266
|
label = t("creator_filter_operation_between_last_week");
|
|
252
267
|
startValue = new Date(strMonday + "T00:00:00Z");
|
|
253
268
|
endValue = new Date(strSunday + "T23:59:59Z");
|
|
@@ -255,8 +270,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
255
270
|
|
|
256
271
|
case "this_week":
|
|
257
272
|
// 本周
|
|
258
|
-
strMonday =
|
|
259
|
-
strSunday =
|
|
273
|
+
strMonday = (0, _moment["default"])(monday).format("YYYY-MM-DD");
|
|
274
|
+
strSunday = (0, _moment["default"])(sunday).format("YYYY-MM-DD");
|
|
260
275
|
label = t("creator_filter_operation_between_this_week");
|
|
261
276
|
startValue = new Date(strMonday + "T00:00:00Z");
|
|
262
277
|
endValue = new Date(strSunday + "T23:59:59Z");
|
|
@@ -264,8 +279,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
264
279
|
|
|
265
280
|
case "next_week":
|
|
266
281
|
// 下周
|
|
267
|
-
strMonday =
|
|
268
|
-
strSunday =
|
|
282
|
+
strMonday = (0, _moment["default"])(nextMonday).format("YYYY-MM-DD");
|
|
283
|
+
strSunday = (0, _moment["default"])(nextSunday).format("YYYY-MM-DD");
|
|
269
284
|
label = t("creator_filter_operation_between_next_week");
|
|
270
285
|
startValue = new Date(strMonday + "T00:00:00Z");
|
|
271
286
|
endValue = new Date(strSunday + "T23:59:59Z");
|
|
@@ -273,7 +288,7 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
273
288
|
|
|
274
289
|
case "yestday":
|
|
275
290
|
// 昨天
|
|
276
|
-
strYestday =
|
|
291
|
+
strYestday = (0, _moment["default"])(yestday).format("YYYY-MM-DD");
|
|
277
292
|
label = t("creator_filter_operation_between_yestday");
|
|
278
293
|
startValue = new Date(strYestday + "T00:00:00Z");
|
|
279
294
|
endValue = new Date(strYestday + "T23:59:59Z");
|
|
@@ -281,7 +296,7 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
281
296
|
|
|
282
297
|
case "today":
|
|
283
298
|
// 今天
|
|
284
|
-
strToday =
|
|
299
|
+
strToday = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
285
300
|
label = t("creator_filter_operation_between_today");
|
|
286
301
|
startValue = new Date(strToday + "T00:00:00Z");
|
|
287
302
|
endValue = new Date(strToday + "T23:59:59Z");
|
|
@@ -289,7 +304,7 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
289
304
|
|
|
290
305
|
case "tomorrow":
|
|
291
306
|
// 明天
|
|
292
|
-
strTomorrow =
|
|
307
|
+
strTomorrow = (0, _moment["default"])(tomorrow).format("YYYY-MM-DD");
|
|
293
308
|
label = t("creator_filter_operation_between_tomorrow");
|
|
294
309
|
startValue = new Date(strTomorrow + "T00:00:00Z");
|
|
295
310
|
endValue = new Date(strTomorrow + "T23:59:59Z");
|
|
@@ -297,8 +312,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
297
312
|
|
|
298
313
|
case "last_7_days":
|
|
299
314
|
// 过去7天
|
|
300
|
-
strStartDay =
|
|
301
|
-
strEndDay =
|
|
315
|
+
strStartDay = (0, _moment["default"])(last_7_days).format("YYYY-MM-DD");
|
|
316
|
+
strEndDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
302
317
|
label = t("creator_filter_operation_between_last_7_days");
|
|
303
318
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
304
319
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -306,8 +321,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
306
321
|
|
|
307
322
|
case "last_30_days":
|
|
308
323
|
// 过去30天
|
|
309
|
-
strStartDay =
|
|
310
|
-
strEndDay =
|
|
324
|
+
strStartDay = (0, _moment["default"])(last_30_days).format("YYYY-MM-DD");
|
|
325
|
+
strEndDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
311
326
|
label = t("creator_filter_operation_between_last_30_days");
|
|
312
327
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
313
328
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -315,8 +330,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
315
330
|
|
|
316
331
|
case "last_60_days":
|
|
317
332
|
// 过去60天
|
|
318
|
-
strStartDay =
|
|
319
|
-
strEndDay =
|
|
333
|
+
strStartDay = (0, _moment["default"])(last_60_days).format("YYYY-MM-DD");
|
|
334
|
+
strEndDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
320
335
|
label = t("creator_filter_operation_between_last_60_days");
|
|
321
336
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
322
337
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -324,8 +339,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
324
339
|
|
|
325
340
|
case "last_90_days":
|
|
326
341
|
// 过去90天
|
|
327
|
-
strStartDay =
|
|
328
|
-
strEndDay =
|
|
342
|
+
strStartDay = (0, _moment["default"])(last_90_days).format("YYYY-MM-DD");
|
|
343
|
+
strEndDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
329
344
|
label = t("creator_filter_operation_between_last_90_days");
|
|
330
345
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
331
346
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -333,8 +348,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
333
348
|
|
|
334
349
|
case "last_120_days":
|
|
335
350
|
// 过去120天
|
|
336
|
-
strStartDay =
|
|
337
|
-
strEndDay =
|
|
351
|
+
strStartDay = (0, _moment["default"])(last_120_days).format("YYYY-MM-DD");
|
|
352
|
+
strEndDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
338
353
|
label = t("creator_filter_operation_between_last_120_days");
|
|
339
354
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
340
355
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -342,8 +357,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
342
357
|
|
|
343
358
|
case "next_7_days":
|
|
344
359
|
// 未来7天
|
|
345
|
-
strStartDay =
|
|
346
|
-
strEndDay =
|
|
360
|
+
strStartDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
361
|
+
strEndDay = (0, _moment["default"])(next_7_days).format("YYYY-MM-DD");
|
|
347
362
|
label = t("creator_filter_operation_between_next_7_days");
|
|
348
363
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
349
364
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -351,8 +366,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
351
366
|
|
|
352
367
|
case "next_30_days":
|
|
353
368
|
// 未来30天
|
|
354
|
-
strStartDay =
|
|
355
|
-
strEndDay =
|
|
369
|
+
strStartDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
370
|
+
strEndDay = (0, _moment["default"])(next_30_days).format("YYYY-MM-DD");
|
|
356
371
|
label = t("creator_filter_operation_between_next_30_days");
|
|
357
372
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
358
373
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -360,8 +375,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
360
375
|
|
|
361
376
|
case "next_60_days":
|
|
362
377
|
// 未来60天
|
|
363
|
-
strStartDay =
|
|
364
|
-
strEndDay =
|
|
378
|
+
strStartDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
379
|
+
strEndDay = (0, _moment["default"])(next_60_days).format("YYYY-MM-DD");
|
|
365
380
|
label = t("creator_filter_operation_between_next_60_days");
|
|
366
381
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
367
382
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -369,8 +384,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
369
384
|
|
|
370
385
|
case "next_90_days":
|
|
371
386
|
// 未来90天
|
|
372
|
-
strStartDay =
|
|
373
|
-
strEndDay =
|
|
387
|
+
strStartDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
388
|
+
strEndDay = (0, _moment["default"])(next_90_days).format("YYYY-MM-DD");
|
|
374
389
|
label = t("creator_filter_operation_between_next_90_days");
|
|
375
390
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
376
391
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -378,8 +393,8 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
378
393
|
|
|
379
394
|
case "next_120_days":
|
|
380
395
|
// 未来120天
|
|
381
|
-
strStartDay =
|
|
382
|
-
strEndDay =
|
|
396
|
+
strStartDay = (0, _moment["default"])(now).format("YYYY-MM-DD");
|
|
397
|
+
strEndDay = (0, _moment["default"])(next_120_days).format("YYYY-MM-DD");
|
|
383
398
|
label = t("creator_filter_operation_between_next_120_days");
|
|
384
399
|
startValue = new Date(strStartDay + "T00:00:00Z");
|
|
385
400
|
endValue = new Date(strEndDay + "T23:59:59Z");
|
|
@@ -413,19 +428,16 @@ var getBetweenTimeBuiltinValueItem = function getBetweenTimeBuiltinValueItem(key
|
|
|
413
428
|
};
|
|
414
429
|
};
|
|
415
430
|
|
|
431
|
+
exports.getBetweenTimeBuiltinValueItem = getBetweenTimeBuiltinValueItem;
|
|
432
|
+
|
|
416
433
|
var getBetweenBuiltinValueItem = function getBetweenBuiltinValueItem(key, utcOffset) {
|
|
417
434
|
return getBetweenTimeBuiltinValueItem(key, utcOffset);
|
|
418
435
|
};
|
|
419
436
|
|
|
437
|
+
exports.getBetweenBuiltinValueItem = getBetweenBuiltinValueItem;
|
|
438
|
+
|
|
420
439
|
var isBetweenFilterOperation = function isBetweenFilterOperation(operation) {
|
|
421
440
|
return operation === "between";
|
|
422
441
|
};
|
|
423
442
|
|
|
424
|
-
exports.getMonthDays = getMonthDays;
|
|
425
|
-
exports.getQuarterStartMonth = getQuarterStartMonth;
|
|
426
|
-
exports.getLastMonthFirstDay = getLastMonthFirstDay;
|
|
427
|
-
exports.getLastQuarterFirstDay = getLastQuarterFirstDay;
|
|
428
|
-
exports.getNextQuarterFirstDay = getNextQuarterFirstDay;
|
|
429
|
-
exports.getBetweenBuiltinValueItem = getBetweenBuiltinValueItem;
|
|
430
|
-
exports.getBetweenTimeBuiltinValueItem = getBetweenTimeBuiltinValueItem;
|
|
431
443
|
exports.isBetweenFilterOperation = isBetweenFilterOperation;
|
package/package.json
CHANGED
|
@@ -1,21 +1,26 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/filters",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "2.2.54-beta.
|
|
4
|
+
"version": "2.2.54-beta.4",
|
|
5
5
|
"description": "filters lib for steedos",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"files": [
|
|
8
|
-
"lib"
|
|
8
|
+
"lib",
|
|
9
|
+
"dist"
|
|
9
10
|
],
|
|
10
11
|
"license": "Apache",
|
|
11
12
|
"scripts": {
|
|
12
|
-
"test": "yarn build && mocha test/**/*.js",
|
|
13
|
-
"build": "babel -
|
|
13
|
+
"test": "yarn build-babel && mocha test/**/*.js",
|
|
14
|
+
"build": "yarn build-babel && yarn build-rollup && yarn build-uglifyjs && yarn build-assets",
|
|
15
|
+
"build-babel": "babel -d lib src/",
|
|
16
|
+
"build-rollup": "rollup -c rollup.config.js",
|
|
17
|
+
"build-uglifyjs": "yarn uglifyjs dist/steedos-filters.umd.js -o dist/steedos-filters.umd.min.js",
|
|
18
|
+
"build-assets": "cp src/assets.json dist"
|
|
14
19
|
},
|
|
15
20
|
"dependencies": {
|
|
16
21
|
"@babel/runtime": "7.12.18",
|
|
17
|
-
"
|
|
18
|
-
"
|
|
22
|
+
"lodash": "4.17.21",
|
|
23
|
+
"moment": "^2.24.0"
|
|
19
24
|
},
|
|
20
25
|
"devDependencies": {
|
|
21
26
|
"@babel/cli": "^7.8.4",
|
|
@@ -31,5 +36,5 @@
|
|
|
31
36
|
"publishConfig": {
|
|
32
37
|
"access": "public"
|
|
33
38
|
},
|
|
34
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "f68c327098f378d5e3d8dc5b12508e31ad368947"
|
|
35
40
|
}
|