@yelon/util 12.0.16 → 13.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/{date-time/yelon-util-date-time.d.ts → array/array.d.ts} +1 -0
- package/array/array.service.d.ts +3 -0
- package/array/package.json +6 -7
- package/browser/browser.d.ts +1 -0
- package/browser/cookie.service.d.ts +3 -0
- package/browser/copy.d.ts +1 -1
- package/browser/package.json +5 -6
- package/browser/scroll.service.d.ts +3 -0
- package/config/abc/pdf.type.d.ts +1 -1
- package/config/abc/qr.type.d.ts +1 -1
- package/config/config.d.ts +5 -0
- package/config/config.service.d.ts +3 -0
- package/config/package.json +6 -7
- package/date-time/date-time.d.ts +5 -0
- package/date-time/package.json +6 -7
- package/decorator/decorator.d.ts +5 -0
- package/decorator/package.json +6 -7
- package/{esm2015/array/array-type.service.js → esm2020/array/array-type.service.mjs} +0 -0
- package/esm2020/array/array.mjs +5 -0
- package/esm2020/array/array.service.mjs +278 -0
- package/{esm2015/array/index.js → esm2020/array/index.mjs} +0 -0
- package/{esm2015/browser/browser.js → esm2020/browser/browser.mjs} +0 -0
- package/esm2020/browser/cookie.service.mjs +103 -0
- package/esm2020/browser/copy.mjs +9 -0
- package/{esm2015/browser/index.js → esm2020/browser/index.mjs} +0 -0
- package/{esm2015/browser/is-empty.js → esm2020/browser/is-empty.mjs} +0 -0
- package/esm2020/browser/scroll.service.mjs +88 -0
- package/{esm2015/browser/style.js → esm2020/browser/style.mjs} +2 -2
- package/{esm2015/config/abc/date-picker.type.js → esm2020/config/abc/date-picker.type.mjs} +0 -0
- package/{esm2015/config/abc/error-collect.type.js → esm2020/config/abc/error-collect.type.mjs} +0 -0
- package/{esm2015/config/abc/image.type.js → esm2020/config/abc/image.type.mjs} +0 -0
- package/{esm2015/config/abc/index.js → esm2020/config/abc/index.mjs} +0 -0
- package/{esm2015/config/abc/loading.type.js → esm2020/config/abc/loading.type.mjs} +0 -0
- package/{esm2015/config/abc/lodop.type.js → esm2020/config/abc/lodop.type.mjs} +0 -0
- package/{esm2015/config/abc/media.type.js → esm2020/config/abc/media.type.mjs} +0 -0
- package/{esm2015/config/abc/onboarding.type.js → esm2020/config/abc/onboarding.type.mjs} +0 -0
- package/{esm2015/config/abc/page-header.type.js → esm2020/config/abc/page-header.type.mjs} +0 -0
- package/esm2020/config/abc/pdf.type.mjs +2 -0
- package/esm2020/config/abc/qr.type.mjs +2 -0
- package/{esm2015/config/abc/se.type.js → esm2020/config/abc/se.type.mjs} +0 -0
- package/{esm2015/config/abc/sg.type.js → esm2020/config/abc/sg.type.mjs} +0 -0
- package/{esm2015/config/abc/st.type.js → esm2020/config/abc/st.type.mjs} +0 -0
- package/{esm2015/config/abc/sv.type.js → esm2020/config/abc/sv.type.mjs} +0 -0
- package/{esm2015/config/abc/xlsx.type.js → esm2020/config/abc/xlsx.type.mjs} +0 -0
- package/{esm2015/config/abc/zip.type.js → esm2020/config/abc/zip.type.mjs} +0 -0
- package/{esm2015/config/acl/acl.type.js → esm2020/config/acl/acl.type.mjs} +0 -0
- package/{esm2015/config/auth/auth.type.js → esm2020/config/auth/auth.type.mjs} +0 -0
- package/{esm2015/config/bis/bis.type.js → esm2020/config/bis/bis.type.mjs} +0 -0
- package/{esm2015/config/cache/cache.type.js → esm2020/config/cache/cache.type.mjs} +0 -0
- package/{esm2015/config/chart/chart.type.js → esm2020/config/chart/chart.type.mjs} +0 -0
- package/esm2020/config/config.mjs +5 -0
- package/esm2020/config/config.service.mjs +37 -0
- package/{esm2015/config/config.types.js → esm2020/config/config.types.mjs} +0 -0
- package/{esm2015/config/index.js → esm2020/config/index.mjs} +0 -0
- package/{esm2015/config/mock/mock.type.js → esm2020/config/mock/mock.type.mjs} +0 -0
- package/{esm2015/config/sf/sf.type.js → esm2020/config/sf/sf.type.mjs} +0 -0
- package/{esm2015/config/stomp/stomp.type.js → esm2020/config/stomp/stomp.type.mjs} +0 -0
- package/{esm2015/config/theme/http.type.js → esm2020/config/theme/http.type.mjs} +0 -0
- package/{esm2015/config/theme/i18n.type.js → esm2020/config/theme/i18n.type.mjs} +0 -0
- package/{esm2015/config/theme/index.js → esm2020/config/theme/index.mjs} +0 -0
- package/{esm2015/config/theme/responsive.type.js → esm2020/config/theme/responsive.type.mjs} +0 -0
- package/{esm2015/config/util/array.type.js → esm2020/config/util/array.type.mjs} +0 -0
- package/{esm2015/config/util/currency.type.js → esm2020/config/util/currency.type.mjs} +0 -0
- package/esm2020/date-time/date-time.mjs +5 -0
- package/{esm2015/date-time/index.js → esm2020/date-time/index.mjs} +0 -0
- package/esm2020/date-time/picker.mjs +116 -0
- package/{esm2015/date-time/time.js → esm2020/date-time/time.mjs} +6 -2
- package/esm2020/decorator/convert.mjs +58 -0
- package/esm2020/decorator/decorator.mjs +5 -0
- package/{esm2015/decorator/index.js → esm2020/decorator/index.mjs} +0 -0
- package/esm2020/decorator/zone-outside.mjs +57 -0
- package/esm2020/form/form.mjs +5 -0
- package/{esm2015/form/index.js → esm2020/form/index.mjs} +0 -0
- package/{esm2015/form/match-control.js → esm2020/form/match-control.mjs} +0 -0
- package/{esm2015/form/validators.js → esm2020/form/validators.mjs} +0 -0
- package/esm2020/format/currency.service.mjs +238 -0
- package/{esm2015/format/currency.types.js → esm2020/format/currency.types.mjs} +0 -0
- package/esm2020/format/format.mjs +5 -0
- package/{esm2015/format/index.js → esm2020/format/index.mjs} +0 -0
- package/esm2020/format/string.mjs +85 -0
- package/{esm2015/format/validate.js → esm2020/format/validate.mjs} +0 -0
- package/{esm2015/index.js → esm2020/index.mjs} +0 -0
- package/{esm2015/math/in-range.js → esm2020/math/in-range.mjs} +0 -0
- package/{esm2015/math/index.js → esm2020/math/index.mjs} +0 -0
- package/esm2020/math/math.mjs +5 -0
- package/{esm2015/math/round.js → esm2020/math/round.mjs} +0 -0
- package/{esm2015/other/assert.js → esm2020/other/assert.mjs} +0 -0
- package/{esm2015/other/deep.js → esm2020/other/deep.mjs} +0 -0
- package/{esm2015/other/index.js → esm2020/other/index.mjs} +3 -1
- package/esm2020/other/lazy.service.mjs +119 -0
- package/{esm2015/other/logger.js → esm2020/other/logger.mjs} +0 -0
- package/esm2020/other/other.mjs +5 -0
- package/esm2020/other/resize.mjs +4 -0
- package/esm2020/other/url.mjs +13 -0
- package/esm2020/pipes/currency/cny.pipe.mjs +23 -0
- package/{esm2015/pipes/currency/index.js → esm2020/pipes/currency/index.mjs} +2 -1
- package/esm2020/pipes/currency/mega.pipe.mjs +29 -0
- package/esm2020/pipes/currency/module.mjs +19 -0
- package/esm2020/pipes/currency/pipe-currency.mjs +5 -0
- package/esm2020/pipes/currency/price.pipe.mjs +27 -0
- package/esm2020/pipes/filter/filter.pipe.mjs +19 -0
- package/{esm2015/pipes/filter/index.js → esm2020/pipes/filter/index.mjs} +0 -0
- package/esm2020/pipes/filter/module.mjs +17 -0
- package/{esm2015/other/yelon-util-other.js → esm2020/pipes/filter/pipe-filter.mjs} +1 -1
- package/{esm2015/pipes/format/index.js → esm2020/pipes/format/index.mjs} +0 -0
- package/esm2020/pipes/format/mask.pipe.mjs +34 -0
- package/esm2020/pipes/format/module.mjs +17 -0
- package/{esm2015/array/yelon-util-array.js → esm2020/pipes/format/pipe-format.mjs} +1 -1
- package/{esm2015/pipes/index.js → esm2020/pipes/index.mjs} +0 -0
- package/esm2020/pipes/pipes.mjs +5 -0
- package/{esm2015/token/index.js → esm2020/token/index.mjs} +0 -0
- package/{esm2015/token/page-visibility.js → esm2020/token/page-visibility.mjs} +0 -0
- package/esm2020/token/token.mjs +5 -0
- package/{esm2015/token/window.js → esm2020/token/window.mjs} +0 -0
- package/{esm2015/yelon-util.js → esm2020/yelon-util.mjs} +0 -0
- package/fesm2015/{yelon-util-array.js → array.mjs} +8 -10
- package/fesm2015/array.mjs.map +1 -0
- package/fesm2015/{browser.js → browser.mjs} +28 -42
- package/fesm2015/browser.mjs.map +1 -0
- package/fesm2015/{yelon-util-config.js → config.mjs} +14 -8
- package/fesm2015/config.mjs.map +1 -0
- package/fesm2015/{yelon-util-date-time.js → date-time.mjs} +1 -1
- package/fesm2015/date-time.mjs.map +1 -0
- package/fesm2015/{yelon-util-decorator.js → decorator.mjs} +8 -4
- package/fesm2015/decorator.mjs.map +1 -0
- package/fesm2015/{yelon-util-form.js → form.mjs} +1 -1
- package/fesm2015/form.mjs.map +1 -0
- package/fesm2015/{yelon-util-format.js → format.mjs} +18 -14
- package/fesm2015/format.mjs.map +1 -0
- package/fesm2015/{yelon-util-math.js → math.mjs} +1 -1
- package/fesm2015/math.mjs.map +1 -0
- package/fesm2015/{yelon-util-other.js → other.mjs} +30 -10
- package/fesm2015/other.mjs.map +1 -0
- package/fesm2015/pipe-currency.mjs +96 -0
- package/fesm2015/pipe-currency.mjs.map +1 -0
- package/fesm2015/pipe-filter.mjs +40 -0
- package/fesm2015/pipe-filter.mjs.map +1 -0
- package/fesm2015/pipe-format.mjs +55 -0
- package/fesm2015/pipe-format.mjs.map +1 -0
- package/fesm2015/{yelon-util-pipes.js → pipes.mjs} +1 -1
- package/fesm2015/pipes.mjs.map +1 -0
- package/fesm2015/{yelon-util-token.js → token.mjs} +1 -1
- package/fesm2015/token.mjs.map +1 -0
- package/fesm2015/{yelon-util.js → yelon-util.mjs} +1 -1
- package/fesm2015/yelon-util.mjs.map +1 -0
- package/fesm2020/array.mjs +285 -0
- package/fesm2020/array.mjs.map +1 -0
- package/fesm2020/browser.mjs +260 -0
- package/fesm2020/browser.mjs.map +1 -0
- package/fesm2020/config.mjs +54 -0
- package/fesm2020/config.mjs.map +1 -0
- package/fesm2020/date-time.mjs +210 -0
- package/fesm2020/date-time.mjs.map +1 -0
- package/fesm2020/decorator.mjs +121 -0
- package/fesm2020/decorator.mjs.map +1 -0
- package/fesm2020/form.mjs +118 -0
- package/fesm2020/form.mjs.map +1 -0
- package/fesm2020/format.mjs +431 -0
- package/fesm2020/format.mjs.map +1 -0
- package/fesm2020/math.mjs +85 -0
- package/fesm2020/math.mjs.map +1 -0
- package/fesm2020/other.mjs +318 -0
- package/{fesm2015/yelon-util-other.js.map → fesm2020/other.mjs.map} +1 -1
- package/fesm2020/pipe-currency.mjs +94 -0
- package/fesm2020/pipe-currency.mjs.map +1 -0
- package/fesm2020/pipe-filter.mjs +40 -0
- package/fesm2020/pipe-filter.mjs.map +1 -0
- package/fesm2020/pipe-format.mjs +55 -0
- package/fesm2020/pipe-format.mjs.map +1 -0
- package/fesm2020/pipes.mjs +8 -0
- package/fesm2020/pipes.mjs.map +1 -0
- package/fesm2020/token.mjs +38 -0
- package/fesm2020/token.mjs.map +1 -0
- package/fesm2020/yelon-util.mjs +16 -0
- package/fesm2020/yelon-util.mjs.map +1 -0
- package/{array/yelon-util-array.d.ts → form/form.d.ts} +1 -0
- package/form/package.json +6 -7
- package/format/currency.service.d.ts +3 -0
- package/format/format.d.ts +5 -0
- package/format/package.json +6 -7
- package/{config/yelon-util-config.d.ts → math/math.d.ts} +1 -0
- package/math/package.json +6 -7
- package/other/index.d.ts +2 -0
- package/other/lazy.service.d.ts +3 -0
- package/{decorator/yelon-util-decorator.d.ts → other/other.d.ts} +1 -0
- package/other/package.json +6 -7
- package/other/resize.d.ts +1 -0
- package/other/url.d.ts +2 -0
- package/package.json +132 -8
- package/pipes/currency/cny.pipe.d.ts +3 -0
- package/pipes/currency/index.d.ts +1 -0
- package/pipes/currency/mega.pipe.d.ts +3 -0
- package/pipes/currency/module.d.ts +7 -0
- package/pipes/currency/package.json +6 -7
- package/pipes/currency/pipe-currency.d.ts +5 -0
- package/pipes/currency/price.pipe.d.ts +3 -0
- package/pipes/filter/filter.pipe.d.ts +3 -0
- package/pipes/filter/module.d.ts +5 -0
- package/pipes/filter/package.json +6 -7
- package/pipes/filter/pipe-filter.d.ts +5 -0
- package/pipes/format/mask.pipe.d.ts +3 -0
- package/pipes/format/module.d.ts +5 -0
- package/pipes/format/package.json +6 -7
- package/pipes/format/pipe-format.d.ts +5 -0
- package/pipes/package.json +6 -7
- package/pipes/pipes.d.ts +5 -0
- package/token/package.json +6 -7
- package/token/token.d.ts +5 -0
- package/yelon-util.d.ts +1 -0
- package/array/yelon-util-array.metadata.json +0 -1
- package/browser/browser.metadata.json +0 -1
- package/bundles/browser.umd.js +0 -325
- package/bundles/browser.umd.js.map +0 -1
- package/bundles/yelon-util-array.umd.js +0 -641
- package/bundles/yelon-util-array.umd.js.map +0 -1
- package/bundles/yelon-util-config.umd.js +0 -411
- package/bundles/yelon-util-config.umd.js.map +0 -1
- package/bundles/yelon-util-date-time.umd.js +0 -238
- package/bundles/yelon-util-date-time.umd.js.map +0 -1
- package/bundles/yelon-util-decorator.umd.js +0 -462
- package/bundles/yelon-util-decorator.umd.js.map +0 -1
- package/bundles/yelon-util-form.umd.js +0 -135
- package/bundles/yelon-util-form.umd.js.map +0 -1
- package/bundles/yelon-util-format.umd.js +0 -785
- package/bundles/yelon-util-format.umd.js.map +0 -1
- package/bundles/yelon-util-math.umd.js +0 -104
- package/bundles/yelon-util-math.umd.js.map +0 -1
- package/bundles/yelon-util-other.umd.js +0 -714
- package/bundles/yelon-util-other.umd.js.map +0 -1
- package/bundles/yelon-util-pipes-currency.umd.js +0 -108
- package/bundles/yelon-util-pipes-currency.umd.js.map +0 -1
- package/bundles/yelon-util-pipes-filter.umd.js +0 -374
- package/bundles/yelon-util-pipes-filter.umd.js.map +0 -1
- package/bundles/yelon-util-pipes-format.umd.js +0 -66
- package/bundles/yelon-util-pipes-format.umd.js.map +0 -1
- package/bundles/yelon-util-pipes.umd.js +0 -38
- package/bundles/yelon-util-pipes.umd.js.map +0 -1
- package/bundles/yelon-util-token.umd.js +0 -49
- package/bundles/yelon-util-token.umd.js.map +0 -1
- package/bundles/yelon-util.umd.js +0 -86
- package/bundles/yelon-util.umd.js.map +0 -1
- package/config/yelon-util-config.metadata.json +0 -1
- package/date-time/yelon-util-date-time.metadata.json +0 -1
- package/decorator/yelon-util-decorator.metadata.json +0 -1
- package/esm2015/array/array.service.js +0 -250
- package/esm2015/browser/cookie.service.js +0 -104
- package/esm2015/browser/copy.js +0 -27
- package/esm2015/browser/scroll.service.js +0 -89
- package/esm2015/config/abc/pdf.type.js +0 -2
- package/esm2015/config/abc/qr.type.js +0 -2
- package/esm2015/config/config.service.js +0 -34
- package/esm2015/config/yelon-util-config.js +0 -5
- package/esm2015/date-time/picker.js +0 -116
- package/esm2015/date-time/yelon-util-date-time.js +0 -5
- package/esm2015/decorator/convert.js +0 -56
- package/esm2015/decorator/yelon-util-decorator.js +0 -5
- package/esm2015/decorator/zone-outside.js +0 -55
- package/esm2015/form/yelon-util-form.js +0 -5
- package/esm2015/format/currency.service.js +0 -225
- package/esm2015/format/string.js +0 -76
- package/esm2015/format/yelon-util-format.js +0 -5
- package/esm2015/math/yelon-util-math.js +0 -5
- package/esm2015/other/lazy.service.js +0 -118
- package/esm2015/pipes/currency/cny.pipe.js +0 -22
- package/esm2015/pipes/currency/mega.pipe.js +0 -26
- package/esm2015/pipes/currency/module.js +0 -14
- package/esm2015/pipes/currency/price.pipe.js +0 -26
- package/esm2015/pipes/currency/yelon-util-pipes-currency.js +0 -6
- package/esm2015/pipes/filter/filter.pipe.js +0 -15
- package/esm2015/pipes/filter/module.js +0 -12
- package/esm2015/pipes/filter/yelon-util-pipes-filter.js +0 -5
- package/esm2015/pipes/format/mask.pipe.js +0 -30
- package/esm2015/pipes/format/module.js +0 -12
- package/esm2015/pipes/format/yelon-util-pipes-format.js +0 -5
- package/esm2015/pipes/yelon-util-pipes.js +0 -5
- package/esm2015/token/yelon-util-token.js +0 -5
- package/fesm2015/browser.js.map +0 -1
- package/fesm2015/yelon-util-array.js.map +0 -1
- package/fesm2015/yelon-util-config.js.map +0 -1
- package/fesm2015/yelon-util-date-time.js.map +0 -1
- package/fesm2015/yelon-util-decorator.js.map +0 -1
- package/fesm2015/yelon-util-form.js.map +0 -1
- package/fesm2015/yelon-util-format.js.map +0 -1
- package/fesm2015/yelon-util-math.js.map +0 -1
- package/fesm2015/yelon-util-pipes-currency.js +0 -87
- package/fesm2015/yelon-util-pipes-currency.js.map +0 -1
- package/fesm2015/yelon-util-pipes-filter.js +0 -32
- package/fesm2015/yelon-util-pipes-filter.js.map +0 -1
- package/fesm2015/yelon-util-pipes-format.js +0 -47
- package/fesm2015/yelon-util-pipes-format.js.map +0 -1
- package/fesm2015/yelon-util-pipes.js.map +0 -1
- package/fesm2015/yelon-util-token.js.map +0 -1
- package/fesm2015/yelon-util.js.map +0 -1
- package/form/yelon-util-form.d.ts +0 -4
- package/form/yelon-util-form.metadata.json +0 -1
- package/format/yelon-util-format.d.ts +0 -4
- package/format/yelon-util-format.metadata.json +0 -1
- package/math/yelon-util-math.d.ts +0 -4
- package/math/yelon-util-math.metadata.json +0 -1
- package/other/yelon-util-other.d.ts +0 -4
- package/other/yelon-util-other.metadata.json +0 -1
- package/pipes/currency/yelon-util-pipes-currency.d.ts +0 -5
- package/pipes/currency/yelon-util-pipes-currency.metadata.json +0 -1
- package/pipes/filter/yelon-util-pipes-filter.d.ts +0 -4
- package/pipes/filter/yelon-util-pipes-filter.metadata.json +0 -1
- package/pipes/format/yelon-util-pipes-format.d.ts +0 -4
- package/pipes/format/yelon-util-pipes-format.metadata.json +0 -1
- package/pipes/yelon-util-pipes.d.ts +0 -4
- package/pipes/yelon-util-pipes.metadata.json +0 -1
- package/token/yelon-util-token.d.ts +0 -4
- package/token/yelon-util-token.metadata.json +0 -1
- package/yelon-util.metadata.json +0 -1
@@ -1,238 +0,0 @@
|
|
1
|
-
/**
|
2
|
-
* @license ng-yunzai(devcui@outlook.com) v12.0.16
|
3
|
-
* (c) 2020 devcui https://github.com/hbyunzai/yelon/
|
4
|
-
* License: MIT
|
5
|
-
*/
|
6
|
-
(function (global, factory) {
|
7
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('date-fns')) :
|
8
|
-
typeof define === 'function' && define.amd ? define('@yelon/util/date-time', ['exports', 'date-fns'], factory) :
|
9
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.yelon = global.yelon || {}, global.yelon.util = global.yelon.util || {}, global.yelon.util["date-time"] = {}), global.dateFns));
|
10
|
-
})(this, (function (exports, dateFns) { 'use strict';
|
11
|
-
|
12
|
-
/**
|
13
|
-
* Get the time range, return `[ Date, Date]` for the start and end dates
|
14
|
-
*
|
15
|
-
* 获取时间范围
|
16
|
-
*
|
17
|
-
* @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数
|
18
|
-
* @param time 开始时间
|
19
|
-
*/
|
20
|
-
function getTimeDistance(type, time) {
|
21
|
-
time = time
|
22
|
-
? typeof time === 'string'
|
23
|
-
? dateFns.parse(time, 'yyyy-MM-dd HH:mm:ss', new Date())
|
24
|
-
: new Date(time)
|
25
|
-
: new Date();
|
26
|
-
var options = { weekStartsOn: 1 };
|
27
|
-
var res;
|
28
|
-
switch (type) {
|
29
|
-
case 'today':
|
30
|
-
res = [time, time];
|
31
|
-
break;
|
32
|
-
case '-today':
|
33
|
-
res = [dateFns.addDays(time, -1), time];
|
34
|
-
break;
|
35
|
-
case 'yesterday':
|
36
|
-
res = [dateFns.addDays(time, -1), dateFns.addDays(time, -1)];
|
37
|
-
break;
|
38
|
-
case 'week':
|
39
|
-
res = [dateFns.startOfWeek(time, options), dateFns.endOfWeek(time, options)];
|
40
|
-
break;
|
41
|
-
case '-week':
|
42
|
-
res = [dateFns.startOfWeek(dateFns.subWeeks(time, 1), options), dateFns.endOfWeek(dateFns.subWeeks(time, 1), options)];
|
43
|
-
break;
|
44
|
-
case 'month':
|
45
|
-
res = [dateFns.startOfMonth(time), dateFns.endOfMonth(time)];
|
46
|
-
break;
|
47
|
-
case '-month':
|
48
|
-
res = [dateFns.startOfMonth(dateFns.subMonths(time, 1)), dateFns.endOfMonth(dateFns.subMonths(time, 1))];
|
49
|
-
break;
|
50
|
-
case 'year':
|
51
|
-
res = [dateFns.startOfYear(time), dateFns.endOfYear(time)];
|
52
|
-
break;
|
53
|
-
case '-year':
|
54
|
-
res = [dateFns.startOfYear(dateFns.subYears(time, 1)), dateFns.endOfYear(dateFns.subYears(time, 1))];
|
55
|
-
break;
|
56
|
-
default:
|
57
|
-
res = type > 0 ? [time, dateFns.addDays(time, type)] : [dateFns.addDays(time, type), time];
|
58
|
-
break;
|
59
|
-
}
|
60
|
-
return fixEndTimeOfRange(res);
|
61
|
-
}
|
62
|
-
/**
|
63
|
-
* fix time is the most, big value
|
64
|
-
*/
|
65
|
-
function fixEndTimeOfRange(dates) {
|
66
|
-
return [dateFns.startOfDay(dates[0]), dateFns.endOfDay(dates[1])];
|
67
|
-
}
|
68
|
-
/**
|
69
|
-
* Return the date parsed from string using the given format string
|
70
|
-
* - If the argument is a number, it is treated as a timestamp.
|
71
|
-
*
|
72
|
-
* @param formatString If parsing fails try to parse the date by pressing `formatString`
|
73
|
-
* @param defaultValue If parsing fails returned default value, default: `new Date(NaN)`
|
74
|
-
*/
|
75
|
-
function toDate(value, options) {
|
76
|
-
if (typeof options === 'string')
|
77
|
-
options = { formatString: options };
|
78
|
-
var _a = Object.assign({ formatString: 'yyyy-MM-dd HH:mm:ss', defaultValue: new Date(NaN) }, options), formatString = _a.formatString, defaultValue = _a.defaultValue;
|
79
|
-
if (value == null) {
|
80
|
-
return defaultValue;
|
81
|
-
}
|
82
|
-
if (value instanceof Date) {
|
83
|
-
return value;
|
84
|
-
}
|
85
|
-
if (typeof value === 'number' || (typeof value === 'string' && /[0-9]{10,13}/.test(value))) {
|
86
|
-
return new Date(+value);
|
87
|
-
}
|
88
|
-
var tryDate = dateFns.parseISO(value);
|
89
|
-
if (isNaN(tryDate)) {
|
90
|
-
tryDate = dateFns.parse(value, formatString, new Date());
|
91
|
-
}
|
92
|
-
return isNaN(tryDate) ? defaultValue : tryDate;
|
93
|
-
}
|
94
|
-
|
95
|
-
// TODO: timezone process
|
96
|
-
var DateTimePickerUtil = /** @class */ (function () {
|
97
|
-
function DateTimePickerUtil() {
|
98
|
-
}
|
99
|
-
Object.defineProperty(DateTimePickerUtil.prototype, "now", {
|
100
|
-
/**
|
101
|
-
* Current local time
|
102
|
-
*
|
103
|
-
* 当前本地时间
|
104
|
-
*/
|
105
|
-
get: function () {
|
106
|
-
return new Date();
|
107
|
-
},
|
108
|
-
enumerable: false,
|
109
|
-
configurable: true
|
110
|
-
});
|
111
|
-
Object.defineProperty(DateTimePickerUtil.prototype, "date", {
|
112
|
-
/**
|
113
|
-
* Current local date (not including time part)
|
114
|
-
*
|
115
|
-
* 当前本地日期(不包含时间部分)
|
116
|
-
*/
|
117
|
-
get: function () {
|
118
|
-
return this.removeTime(this.now);
|
119
|
-
},
|
120
|
-
enumerable: false,
|
121
|
-
configurable: true
|
122
|
-
});
|
123
|
-
/**
|
124
|
-
* Remove the time part of the date
|
125
|
-
*
|
126
|
-
* 移除日期的时间部分
|
127
|
-
*/
|
128
|
-
DateTimePickerUtil.prototype.removeTime = function (d) {
|
129
|
-
return new Date(d.toDateString());
|
130
|
-
};
|
131
|
-
/**
|
132
|
-
* Format date-time
|
133
|
-
*
|
134
|
-
* 格式化日期
|
135
|
-
*/
|
136
|
-
DateTimePickerUtil.prototype.format = function (d, formatString) {
|
137
|
-
if (formatString === void 0) { formatString = 'yyyy-MM-dd HH:mm:ss'; }
|
138
|
-
return dateFns.format(d, formatString);
|
139
|
-
};
|
140
|
-
DateTimePickerUtil.prototype.genTick = function (count) {
|
141
|
-
return new Array(count).fill(0).map(function (_, idx) { return idx; });
|
142
|
-
};
|
143
|
-
/**
|
144
|
-
* Calculate the number of days between two dates, `0` means the same day
|
145
|
-
*
|
146
|
-
* 计算两个日期相差天数,`0` 表示同一天
|
147
|
-
*/
|
148
|
-
DateTimePickerUtil.prototype.getDiffDays = function (dateLeft, dateRight) {
|
149
|
-
return dateFns.differenceInCalendarDays(dateLeft, typeof dateRight === 'number' ? dateFns.addDays(this.date, dateRight) : dateRight || this.date);
|
150
|
-
};
|
151
|
-
/**
|
152
|
-
* Disabled Before date (Default: today), Generally serves `nzDisabledDate`
|
153
|
-
*
|
154
|
-
* 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`
|
155
|
-
*/
|
156
|
-
DateTimePickerUtil.prototype.disabledBeforeDate = function (options) {
|
157
|
-
var _this = this;
|
158
|
-
return function (d) { return _this.getDiffDays(d, options === null || options === void 0 ? void 0 : options.offsetDays) < 0; };
|
159
|
-
};
|
160
|
-
/**
|
161
|
-
* Disabled After date (Default: today), Generally serves `nzDisabledDate`
|
162
|
-
*
|
163
|
-
* 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`
|
164
|
-
*/
|
165
|
-
DateTimePickerUtil.prototype.disabledAfterDate = function (options) {
|
166
|
-
var _this = this;
|
167
|
-
return function (d) { return _this.getDiffDays(d, options === null || options === void 0 ? void 0 : options.offsetDays) > 0; };
|
168
|
-
};
|
169
|
-
DateTimePickerUtil.prototype.baseDisabledTime = function (type, offsetSeconds) {
|
170
|
-
var _this = this;
|
171
|
-
var tick24 = this.genTick(24);
|
172
|
-
var tick60 = this.genTick(60);
|
173
|
-
return function (current) {
|
174
|
-
var cur = current;
|
175
|
-
if (cur == null) {
|
176
|
-
return {};
|
177
|
-
}
|
178
|
-
var now = dateFns.addSeconds(_this.now, offsetSeconds || 0);
|
179
|
-
var nowHours = now.getHours();
|
180
|
-
var nowMinutes = now.getMinutes();
|
181
|
-
var curHours = cur.getHours();
|
182
|
-
var isToday = _this.getDiffDays(_this.removeTime(cur)) === 0;
|
183
|
-
return {
|
184
|
-
nzDisabledHours: function () {
|
185
|
-
if (!isToday)
|
186
|
-
return [];
|
187
|
-
return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);
|
188
|
-
},
|
189
|
-
nzDisabledMinutes: function () {
|
190
|
-
if (isToday && curHours === nowHours) {
|
191
|
-
return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);
|
192
|
-
}
|
193
|
-
return [];
|
194
|
-
},
|
195
|
-
nzDisabledSeconds: function () {
|
196
|
-
if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {
|
197
|
-
var nowSeconds = now.getSeconds();
|
198
|
-
return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);
|
199
|
-
}
|
200
|
-
return [];
|
201
|
-
}
|
202
|
-
};
|
203
|
-
};
|
204
|
-
};
|
205
|
-
/**
|
206
|
-
* Disabled Before time (Default: now), Generally serves `nzDisabledTime`
|
207
|
-
*
|
208
|
-
* 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`
|
209
|
-
*/
|
210
|
-
DateTimePickerUtil.prototype.disabledBeforeTime = function (options) {
|
211
|
-
return this.baseDisabledTime('before', options === null || options === void 0 ? void 0 : options.offsetSeconds);
|
212
|
-
};
|
213
|
-
/**
|
214
|
-
* Disabled After time (Default: now), Generally serves `nzDisabledTime`
|
215
|
-
*
|
216
|
-
* 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`
|
217
|
-
*/
|
218
|
-
DateTimePickerUtil.prototype.disabledAfterTime = function (options) {
|
219
|
-
return this.baseDisabledTime('after', options === null || options === void 0 ? void 0 : options.offsetSeconds);
|
220
|
-
};
|
221
|
-
return DateTimePickerUtil;
|
222
|
-
}());
|
223
|
-
var dateTimePickerUtil = new DateTimePickerUtil();
|
224
|
-
|
225
|
-
/**
|
226
|
-
* Generated bundle index. Do not edit.
|
227
|
-
*/
|
228
|
-
|
229
|
-
exports.DateTimePickerUtil = DateTimePickerUtil;
|
230
|
-
exports.dateTimePickerUtil = dateTimePickerUtil;
|
231
|
-
exports.fixEndTimeOfRange = fixEndTimeOfRange;
|
232
|
-
exports.getTimeDistance = getTimeDistance;
|
233
|
-
exports.toDate = toDate;
|
234
|
-
|
235
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
236
|
-
|
237
|
-
}));
|
238
|
-
//# sourceMappingURL=yelon-util-date-time.umd.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"yelon-util-date-time.umd.js","sources":["../../../../packages/util/date-time/time.ts","../../../../packages/util/date-time/picker.ts","../../../../packages/util/date-time/yelon-util-date-time.ts"],"sourcesContent":["import {\n addDays,\n endOfDay,\n endOfMonth,\n endOfWeek,\n endOfYear,\n parse,\n parseISO,\n startOfDay,\n startOfMonth,\n startOfWeek,\n startOfYear,\n subMonths,\n subWeeks,\n subYears\n} from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\n\n/**\n * Get the time range, return `[ Date, Date]` for the start and end dates\n *\n * 获取时间范围\n *\n * @param type 类型,带 `-` 表示过去一个时间,若指定 `number` 表示天数\n * @param time 开始时间\n */\nexport function getTimeDistance(\n type: 'today' | '-today' | 'yesterday' | 'week' | '-week' | 'month' | '-month' | 'year' | '-year' | number,\n time?: Date | string | number\n): [Date, Date] {\n time = time\n ? typeof time === 'string'\n ? parse(time, 'yyyy-MM-dd HH:mm:ss', new Date())\n : new Date(time)\n : new Date();\n const options: { weekStartsOn: 1 } = { weekStartsOn: 1 };\n\n let res: [Date, Date];\n switch (type) {\n case 'today':\n res = [time, time];\n break;\n case '-today':\n res = [addDays(time, -1), time];\n break;\n case 'yesterday':\n res = [addDays(time, -1), addDays(time, -1)];\n break;\n case 'week':\n res = [startOfWeek(time, options), endOfWeek(time, options)];\n break;\n case '-week':\n res = [startOfWeek(subWeeks(time, 1), options), endOfWeek(subWeeks(time, 1), options)];\n break;\n case 'month':\n res = [startOfMonth(time), endOfMonth(time)];\n break;\n case '-month':\n res = [startOfMonth(subMonths(time, 1)), endOfMonth(subMonths(time, 1))];\n break;\n case 'year':\n res = [startOfYear(time), endOfYear(time)];\n break;\n case '-year':\n res = [startOfYear(subYears(time, 1)), endOfYear(subYears(time, 1))];\n break;\n default:\n res = type > 0 ? [time, addDays(time, type)] : [addDays(time, type), time];\n break;\n }\n return fixEndTimeOfRange(res);\n}\n\n/**\n * fix time is the most, big value\n */\nexport function fixEndTimeOfRange(dates: [Date, Date]): [Date, Date] {\n return [startOfDay(dates[0]), endOfDay(dates[1])];\n}\n\nexport type ToDateOptions = string | { formatString?: string; defaultValue?: NzSafeAny };\n\n/**\n * Return the date parsed from string using the given format string\n * - If the argument is a number, it is treated as a timestamp.\n *\n * @param formatString If parsing fails try to parse the date by pressing `formatString`\n * @param defaultValue If parsing fails returned default value, default: `new Date(NaN)`\n */\nexport function toDate(value: Date | string | number, options?: ToDateOptions): Date {\n if (typeof options === 'string') options = { formatString: options };\n const { formatString, defaultValue } = {\n formatString: 'yyyy-MM-dd HH:mm:ss',\n defaultValue: new Date(NaN),\n ...options\n };\n if (value == null) {\n return defaultValue;\n }\n if (value instanceof Date) {\n return value;\n }\n if (typeof value === 'number' || (typeof value === 'string' && /[0-9]{10,13}/.test(value))) {\n return new Date(+value);\n }\n let tryDate = parseISO(value);\n if (isNaN(tryDate as NzSafeAny)) {\n tryDate = parse(value, formatString!, new Date());\n }\n\n return isNaN(tryDate as NzSafeAny) ? defaultValue : tryDate;\n}\n","import { addDays, addSeconds, differenceInCalendarDays, format } from 'date-fns';\n\nimport type { NzSafeAny } from 'ng-zorro-antd/core/types';\nimport { DisabledDateFn, DisabledTimeConfig, DisabledTimeFn } from 'ng-zorro-antd/date-picker';\n\n// TODO: timezone process\nexport class DateTimePickerUtil {\n /**\n * Current local time\n *\n * 当前本地时间\n */\n get now(): Date {\n return new Date();\n }\n /**\n * Current local date (not including time part)\n *\n * 当前本地日期(不包含时间部分)\n */\n get date(): Date {\n return this.removeTime(this.now);\n }\n /**\n * Remove the time part of the date\n *\n * 移除日期的时间部分\n */\n removeTime(d: Date): Date {\n return new Date(d.toDateString());\n }\n /**\n * Format date-time\n *\n * 格式化日期\n */\n format(d: number | Date, formatString: string = 'yyyy-MM-dd HH:mm:ss'): string {\n return format(d, formatString);\n }\n private genTick(count: number): number[] {\n return new Array(count).fill(0).map((_, idx) => idx);\n }\n /**\n * Calculate the number of days between two dates, `0` means the same day\n *\n * 计算两个日期相差天数,`0` 表示同一天\n */\n getDiffDays(dateLeft: Date | number, dateRight?: Date | number): number {\n return differenceInCalendarDays(\n dateLeft,\n typeof dateRight === 'number' ? addDays(this.date, dateRight) : dateRight || this.date\n );\n }\n /**\n * Disabled Before date (Default: today), Generally serves `nzDisabledDate`\n *\n * 禁用之前日期(默认:今天),一般服务于 `nzDisabledDate`\n */\n disabledBeforeDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n return (d): boolean => this.getDiffDays(d, options?.offsetDays) < 0;\n }\n /**\n * Disabled After date (Default: today), Generally serves `nzDisabledDate`\n *\n * 禁用之后日期(默认:今天),一般服务于 `nzDisabledDate`\n */\n disabledAfterDate(options?: { offsetDays?: Date | number }): DisabledDateFn {\n return (d): boolean => this.getDiffDays(d, options?.offsetDays) > 0;\n }\n private baseDisabledTime(type: 'before' | 'after', offsetSeconds?: number): DisabledTimeFn {\n const tick24 = this.genTick(24);\n const tick60 = this.genTick(60);\n return (current): DisabledTimeConfig => {\n const cur = current as Date;\n if (cur == null) {\n return {} as NzSafeAny;\n }\n const now = addSeconds(this.now, offsetSeconds || 0);\n const nowHours = now.getHours();\n const nowMinutes = now.getMinutes();\n const curHours = cur.getHours();\n const isToday = this.getDiffDays(this.removeTime(cur)) === 0;\n return {\n nzDisabledHours: () => {\n if (!isToday) return [];\n return type === 'before' ? tick24.slice(0, nowHours) : tick24.slice(nowHours + 1);\n },\n nzDisabledMinutes: () => {\n if (isToday && curHours === nowHours) {\n return type === 'before' ? tick60.slice(0, nowMinutes) : tick60.slice(nowMinutes + 1);\n }\n return [];\n },\n nzDisabledSeconds: () => {\n if (isToday && curHours === nowHours && cur.getMinutes() === nowMinutes) {\n const nowSeconds = now.getSeconds();\n return type === 'before' ? tick60.slice(0, nowSeconds) : tick60.slice(nowSeconds + 1);\n }\n return [];\n }\n };\n };\n }\n /**\n * Disabled Before time (Default: now), Generally serves `nzDisabledTime`\n *\n * 禁用之前时间(默认:现在),一般服务于 `nzDisabledTime`\n */\n disabledBeforeTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n return this.baseDisabledTime('before', options?.offsetSeconds);\n }\n /**\n * Disabled After time (Default: now), Generally serves `nzDisabledTime`\n *\n * 禁用之后时间(默认:现在),一般服务于 `nzDisabledTime`\n */\n disabledAfterTime(options?: { offsetSeconds?: number }): DisabledTimeFn {\n return this.baseDisabledTime('after', options?.offsetSeconds);\n }\n}\n\nexport const dateTimePickerUtil = new DateTimePickerUtil();\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["parse","addDays","startOfWeek","endOfWeek","subWeeks","startOfMonth","endOfMonth","subMonths","startOfYear","endOfYear","subYears","startOfDay","endOfDay","parseISO","format","differenceInCalendarDays","addSeconds"],"mappings":";;;;;;IAmBA;;;;;;;;aAQgB,eAAe,CAC7B,IAA0G,EAC1G,IAA6B;QAE7B,IAAI,GAAG,IAAI;cACP,OAAO,IAAI,KAAK,QAAQ;kBACtBA,aAAK,CAAC,IAAI,EAAE,qBAAqB,EAAE,IAAI,IAAI,EAAE,CAAC;kBAC9C,IAAI,IAAI,CAAC,IAAI,CAAC;cAChB,IAAI,IAAI,EAAE,CAAC;QACf,IAAM,OAAO,GAAwB,EAAE,YAAY,EAAE,CAAC,EAAE,CAAC;QAEzD,IAAI,GAAiB,CAAC;QACtB,QAAQ,IAAI;YACV,KAAK,OAAO;gBACV,GAAG,GAAG,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;gBACnB,MAAM;YACR,KAAK,QAAQ;gBACX,GAAG,GAAG,CAACC,eAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,CAAC;gBAChC,MAAM;YACR,KAAK,WAAW;gBACd,GAAG,GAAG,CAACA,eAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAEA,eAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC7C,MAAM;YACR,KAAK,MAAM;gBACT,GAAG,GAAG,CAACC,mBAAW,CAAC,IAAI,EAAE,OAAO,CAAC,EAAEC,iBAAS,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC;gBAC7D,MAAM;YACR,KAAK,OAAO;gBACV,GAAG,GAAG,C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