@naturalcycles/js-lib 14.277.0 → 15.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cfg/frontend/tsconfig.json +3 -3
- package/dist/abort.js +1 -4
- package/dist/array/array.util.d.ts +1 -1
- package/dist/array/array.util.js +47 -88
- package/dist/array/range.d.ts +2 -2
- package/dist/array/range.js +7 -12
- package/dist/bot.js +6 -10
- package/dist/browser/adminService.d.ts +1 -1
- package/dist/browser/adminService.js +10 -14
- package/dist/browser/analytics.util.js +10 -15
- package/dist/browser/i18n/fetchTranslationLoader.d.ts +3 -3
- package/dist/browser/i18n/fetchTranslationLoader.js +1 -5
- package/dist/browser/i18n/translation.service.d.ts +1 -1
- package/dist/browser/i18n/translation.service.js +5 -10
- package/dist/browser/imageFitter.js +1 -5
- package/dist/browser/script.util.js +8 -12
- package/dist/browser/topbar.js +7 -10
- package/dist/datetime/dateInterval.d.ts +2 -2
- package/dist/datetime/dateInterval.js +7 -11
- package/dist/datetime/localDate.d.ts +3 -3
- package/dist/datetime/localDate.js +40 -44
- package/dist/datetime/localTime.d.ts +3 -3
- package/dist/datetime/localTime.js +36 -40
- package/dist/datetime/timeInterval.d.ts +2 -2
- package/dist/datetime/timeInterval.js +6 -10
- package/dist/datetime/wallTime.d.ts +3 -3
- package/dist/datetime/wallTime.js +5 -9
- package/dist/decorators/asyncMemo.decorator.d.ts +3 -3
- package/dist/decorators/asyncMemo.decorator.js +12 -17
- package/dist/decorators/createPromiseDecorator.js +3 -6
- package/dist/decorators/debounce.d.ts +1 -1
- package/dist/decorators/debounce.decorator.d.ts +1 -1
- package/dist/decorators/debounce.decorator.js +5 -9
- package/dist/decorators/debounce.js +2 -6
- package/dist/decorators/decorator.util.d.ts +1 -1
- package/dist/decorators/decorator.util.js +3 -8
- package/dist/decorators/logMethod.decorator.d.ts +1 -1
- package/dist/decorators/logMethod.decorator.js +11 -14
- package/dist/decorators/memo.decorator.d.ts +3 -3
- package/dist/decorators/memo.decorator.js +11 -16
- package/dist/decorators/memo.util.d.ts +2 -2
- package/dist/decorators/memo.util.js +11 -17
- package/dist/decorators/memoFn.d.ts +3 -3
- package/dist/decorators/memoFn.js +3 -6
- package/dist/decorators/memoFnAsync.d.ts +3 -3
- package/dist/decorators/memoFnAsync.js +5 -8
- package/dist/decorators/memoSimple.decorator.d.ts +1 -1
- package/dist/decorators/memoSimple.decorator.js +6 -10
- package/dist/decorators/retry.decorator.d.ts +1 -1
- package/dist/decorators/retry.decorator.js +3 -6
- package/dist/decorators/swarmSafe.decorator.js +3 -7
- package/dist/decorators/timeout.decorator.d.ts +1 -1
- package/dist/decorators/timeout.decorator.js +7 -10
- package/dist/define.d.ts +1 -1
- package/dist/define.js +11 -19
- package/dist/deviceIdService.js +7 -11
- package/dist/enum.util.d.ts +1 -1
- package/dist/enum.util.js +20 -42
- package/dist/env/buildInfo.d.ts +1 -1
- package/dist/env/buildInfo.js +3 -6
- package/dist/env.js +2 -6
- package/dist/error/assert.d.ts +3 -3
- package/dist/error/assert.js +30 -44
- package/dist/error/error.model.d.ts +2 -2
- package/dist/error/error.model.js +1 -2
- package/dist/error/error.util.d.ts +1 -1
- package/dist/error/error.util.js +25 -44
- package/dist/error/errorMode.js +2 -5
- package/dist/error/try.d.ts +2 -2
- package/dist/error/try.js +15 -23
- package/dist/error/tryCatch.d.ts +2 -2
- package/dist/error/tryCatch.js +6 -11
- package/dist/form.util.d.ts +1 -1
- package/dist/form.util.js +2 -6
- package/dist/http/fetcher.d.ts +3 -3
- package/dist/http/fetcher.js +48 -53
- package/dist/http/fetcher.model.d.ts +5 -5
- package/dist/http/fetcher.model.js +1 -2
- package/dist/http/http.model.js +1 -4
- package/dist/index.d.ts +96 -96
- package/dist/index.js +96 -99
- package/dist/is.util.d.ts +2 -2
- package/dist/is.util.js +12 -27
- package/dist/iter/asyncIterable2.d.ts +3 -3
- package/dist/iter/asyncIterable2.js +8 -12
- package/dist/iter/iterable2.d.ts +2 -2
- package/dist/iter/iterable2.js +8 -12
- package/dist/json-schema/from-data/generateJsonSchemaFromData.d.ts +1 -1
- package/dist/json-schema/from-data/generateJsonSchemaFromData.js +5 -8
- package/dist/json-schema/jsonSchema.cnst.d.ts +1 -1
- package/dist/json-schema/jsonSchema.cnst.js +1 -4
- package/dist/json-schema/jsonSchema.model.d.ts +1 -1
- package/dist/json-schema/jsonSchema.model.js +1 -2
- package/dist/json-schema/jsonSchema.util.d.ts +2 -2
- package/dist/json-schema/jsonSchema.util.js +5 -8
- package/dist/json-schema/jsonSchemaBuilder.d.ts +2 -2
- package/dist/json-schema/jsonSchemaBuilder.js +16 -25
- package/dist/json-schema/jsonSchemas.d.ts +2 -2
- package/dist/json-schema/jsonSchemas.js +5 -8
- package/dist/log/commonLogger.js +14 -21
- package/dist/math/accumulatingAverage.js +1 -5
- package/dist/math/math.util.js +11 -19
- package/dist/math/sma.js +1 -5
- package/dist/math/stack.util.js +11 -16
- package/dist/nanoid.js +2 -6
- package/dist/number/createDeterministicRandom.js +1 -4
- package/dist/number/number.util.d.ts +1 -1
- package/dist/number/number.util.js +9 -20
- package/dist/object/deepEquals.js +3 -8
- package/dist/object/map2.js +1 -5
- package/dist/object/object.util.d.ts +2 -2
- package/dist/object/object.util.js +40 -70
- package/dist/object/set2.js +1 -5
- package/dist/object/sortObject.d.ts +1 -1
- package/dist/object/sortObject.js +1 -4
- package/dist/object/sortObjectDeep.js +1 -4
- package/dist/polyfill.js +1 -4
- package/dist/promise/abortable.d.ts +1 -1
- package/dist/promise/abortable.js +2 -7
- package/dist/promise/pDefer.js +1 -4
- package/dist/promise/pDelay.d.ts +2 -2
- package/dist/promise/pDelay.js +4 -8
- package/dist/promise/pFilter.d.ts +1 -1
- package/dist/promise/pFilter.js +1 -4
- package/dist/promise/pHang.js +1 -4
- package/dist/promise/pMap.d.ts +2 -2
- package/dist/promise/pMap.js +17 -20
- package/dist/promise/pProps.js +1 -4
- package/dist/promise/pQueue.d.ts +2 -2
- package/dist/promise/pQueue.js +7 -11
- package/dist/promise/pRetry.d.ts +1 -1
- package/dist/promise/pRetry.js +8 -12
- package/dist/promise/pState.js +1 -4
- package/dist/promise/pTimeout.d.ts +3 -3
- package/dist/promise/pTimeout.js +7 -11
- package/dist/semver.d.ts +1 -1
- package/dist/semver.js +13 -18
- package/dist/string/case.js +9 -14
- package/dist/string/escape.js +2 -6
- package/dist/string/hash.util.d.ts +1 -1
- package/dist/string/hash.util.js +4 -10
- package/dist/string/json.util.d.ts +1 -1
- package/dist/string/json.util.js +5 -10
- package/dist/string/leven.js +1 -4
- package/dist/string/lodash/unicodeWords.js +1 -4
- package/dist/string/lodash/words.js +3 -6
- package/dist/string/pupa.d.ts +1 -1
- package/dist/string/pupa.js +4 -9
- package/dist/string/readingTime.d.ts +1 -1
- package/dist/string/readingTime.js +1 -4
- package/dist/string/regex.js +1 -4
- package/dist/string/safeJsonStringify.d.ts +1 -1
- package/dist/string/safeJsonStringify.js +1 -4
- package/dist/string/slugify.js +1 -4
- package/dist/string/string.util.js +15 -32
- package/dist/string/stringify.d.ts +1 -1
- package/dist/string/stringify.js +10 -14
- package/dist/string/url.util.d.ts +1 -1
- package/dist/string/url.util.js +2 -6
- package/dist/time/time.util.d.ts +1 -1
- package/dist/time/time.util.js +3 -8
- package/dist/typeFest.js +1 -2
- package/dist/types.d.ts +1 -1
- package/dist/types.js +17 -27
- package/dist/unit/size.util.js +5 -12
- package/dist/web.d.ts +1 -1
- package/dist/web.js +1 -5
- package/dist/zod/index.d.ts +2 -2
- package/dist/zod/index.js +4 -10
- package/dist/zod/zod.shared.schemas.js +36 -39
- package/dist/zod/zod.util.js +7 -14
- package/package.json +18 -30
- package/src/array/array.util.ts +3 -3
- package/src/array/range.ts +2 -2
- package/src/bot.ts +1 -1
- package/src/browser/adminService.ts +4 -4
- package/src/browser/analytics.util.ts +2 -2
- package/src/browser/i18n/fetchTranslationLoader.ts +3 -3
- package/src/browser/i18n/translation.service.ts +2 -2
- package/src/browser/script.util.ts +2 -2
- package/src/datetime/dateInterval.ts +3 -3
- package/src/datetime/localDate.ts +5 -5
- package/src/datetime/localTime.ts +6 -6
- package/src/datetime/timeInterval.ts +3 -3
- package/src/datetime/wallTime.ts +4 -4
- package/src/decorators/asyncMemo.decorator.ts +7 -7
- package/src/decorators/createPromiseDecorator.ts +1 -1
- package/src/decorators/debounce.decorator.ts +2 -2
- package/src/decorators/debounce.ts +1 -1
- package/src/decorators/decorator.util.ts +1 -1
- package/src/decorators/logMethod.decorator.ts +4 -4
- package/src/decorators/memo.decorator.ts +7 -7
- package/src/decorators/memo.util.ts +4 -4
- package/src/decorators/memoFn.ts +4 -4
- package/src/decorators/memoFnAsync.ts +5 -5
- package/src/decorators/memoSimple.decorator.ts +4 -4
- package/src/decorators/retry.decorator.ts +2 -2
- package/src/decorators/swarmSafe.decorator.ts +2 -2
- package/src/decorators/timeout.decorator.ts +4 -4
- package/src/define.ts +3 -3
- package/src/deviceIdService.ts +3 -3
- package/src/enum.util.ts +1 -1
- package/src/env/buildInfo.ts +2 -2
- package/src/error/assert.ts +7 -7
- package/src/error/error.model.ts +2 -2
- package/src/error/error.util.ts +5 -5
- package/src/error/try.ts +5 -5
- package/src/error/tryCatch.ts +3 -3
- package/src/form.util.ts +1 -1
- package/src/http/fetcher.model.ts +5 -5
- package/src/http/fetcher.ts +20 -15
- package/src/index.ts +96 -96
- package/src/is.util.ts +2 -2
- package/src/iter/asyncIterable2.ts +3 -3
- package/src/iter/iterable2.ts +2 -2
- package/src/json-schema/from-data/generateJsonSchemaFromData.ts +3 -3
- package/src/json-schema/jsonSchema.cnst.ts +1 -1
- package/src/json-schema/jsonSchema.model.ts +1 -1
- package/src/json-schema/jsonSchema.util.ts +4 -4
- package/src/json-schema/jsonSchemaBuilder.ts +5 -5
- package/src/json-schema/jsonSchemas.ts +2 -2
- package/src/math/math.util.ts +2 -2
- package/src/math/stack.util.ts +1 -1
- package/src/number/number.util.ts +1 -1
- package/src/object/object.util.ts +3 -3
- package/src/object/sortObject.ts +1 -1
- package/src/promise/abortable.ts +1 -1
- package/src/promise/pDelay.ts +3 -3
- package/src/promise/pFilter.ts +1 -1
- package/src/promise/pMap.ts +2 -2
- package/src/promise/pQueue.ts +4 -4
- package/src/promise/pRetry.ts +2 -2
- package/src/promise/pTimeout.ts +4 -4
- package/src/semver.ts +3 -3
- package/src/string/case.ts +2 -2
- package/src/string/hash.util.ts +1 -1
- package/src/string/json.util.ts +2 -2
- package/src/string/lodash/words.ts +1 -1
- package/src/string/pupa.ts +2 -2
- package/src/string/readingTime.ts +1 -1
- package/src/string/safeJsonStringify.ts +1 -1
- package/src/string/stringify.ts +4 -4
- package/src/string/url.util.ts +1 -1
- package/src/time/time.util.ts +1 -1
- package/src/types.ts +2 -2
- package/src/web.ts +1 -1
- package/src/zod/index.ts +2 -2
- package/src/zod/zod.util.ts +1 -1
- package/dist-esm/abort.js +0 -12
- package/dist-esm/array/array.util.js +0 -458
- package/dist-esm/array/range.js +0 -34
- package/dist-esm/bot.js +0 -130
- package/dist-esm/browser/adminService.js +0 -94
- package/dist-esm/browser/analytics.util.js +0 -54
- package/dist-esm/browser/i18n/fetchTranslationLoader.js +0 -13
- package/dist-esm/browser/i18n/translation.service.js +0 -56
- package/dist-esm/browser/imageFitter.js +0 -65
- package/dist-esm/browser/script.util.js +0 -46
- package/dist-esm/browser/topbar.js +0 -135
- package/dist-esm/datetime/dateInterval.js +0 -80
- package/dist-esm/datetime/localDate.js +0 -719
- package/dist-esm/datetime/localTime.js +0 -996
- package/dist-esm/datetime/timeInterval.js +0 -88
- package/dist-esm/datetime/wallTime.js +0 -70
- package/dist-esm/decorators/asyncMemo.decorator.js +0 -111
- package/dist-esm/decorators/createPromiseDecorator.js +0 -82
- package/dist-esm/decorators/debounce.decorator.js +0 -17
- package/dist-esm/decorators/debounce.js +0 -114
- package/dist-esm/decorators/decorator.util.js +0 -31
- package/dist-esm/decorators/logMethod.decorator.js +0 -85
- package/dist-esm/decorators/memo.decorator.js +0 -80
- package/dist-esm/decorators/memo.util.js +0 -97
- package/dist-esm/decorators/memoFn.js +0 -29
- package/dist-esm/decorators/memoFnAsync.js +0 -35
- package/dist-esm/decorators/memoSimple.decorator.js +0 -55
- package/dist-esm/decorators/retry.decorator.js +0 -9
- package/dist-esm/decorators/swarmSafe.decorator.js +0 -38
- package/dist-esm/decorators/timeout.decorator.js +0 -19
- package/dist-esm/define.js +0 -109
- package/dist-esm/deviceIdService.js +0 -105
- package/dist-esm/enum.util.js +0 -157
- package/dist-esm/env/buildInfo.js +0 -19
- package/dist-esm/env.js +0 -19
- package/dist-esm/error/assert.js +0 -122
- package/dist-esm/error/error.model.js +0 -1
- package/dist-esm/error/error.util.js +0 -337
- package/dist-esm/error/errorMode.js +0 -20
- package/dist-esm/error/try.js +0 -105
- package/dist-esm/error/tryCatch.js +0 -41
- package/dist-esm/form.util.js +0 -16
- package/dist-esm/http/fetcher.js +0 -704
- package/dist-esm/http/fetcher.model.js +0 -3
- package/dist-esm/http/http.model.js +0 -1
- package/dist-esm/index.js +0 -96
- package/dist-esm/is.util.js +0 -70
- package/dist-esm/iter/asyncIterable2.js +0 -103
- package/dist-esm/iter/iterable2.js +0 -87
- package/dist-esm/json-schema/from-data/generateJsonSchemaFromData.js +0 -86
- package/dist-esm/json-schema/jsonSchema.cnst.js +0 -38
- package/dist-esm/json-schema/jsonSchema.model.js +0 -1
- package/dist-esm/json-schema/jsonSchema.util.js +0 -27
- package/dist-esm/json-schema/jsonSchemaBuilder.js +0 -352
- package/dist-esm/json-schema/jsonSchemas.js +0 -6
- package/dist-esm/log/commonLogger.js +0 -78
- package/dist-esm/math/accumulatingAverage.js +0 -32
- package/dist-esm/math/math.util.js +0 -85
- package/dist-esm/math/sma.js +0 -43
- package/dist-esm/math/stack.util.js +0 -82
- package/dist-esm/nanoid.js +0 -57
- package/dist-esm/number/createDeterministicRandom.js +0 -18
- package/dist-esm/number/number.util.js +0 -109
- package/dist-esm/object/deepEquals.js +0 -170
- package/dist-esm/object/map2.js +0 -21
- package/dist-esm/object/object.util.js +0 -435
- package/dist-esm/object/set2.js +0 -15
- package/dist-esm/object/sortObject.js +0 -21
- package/dist-esm/object/sortObjectDeep.js +0 -17
- package/dist-esm/polyfill.js +0 -6
- package/dist-esm/promise/abortable.js +0 -31
- package/dist-esm/promise/pDefer.js +0 -17
- package/dist-esm/promise/pDelay.js +0 -37
- package/dist-esm/promise/pFilter.js +0 -5
- package/dist-esm/promise/pHang.js +0 -6
- package/dist-esm/promise/pMap.js +0 -174
- package/dist-esm/promise/pProps.js +0 -20
- package/dist-esm/promise/pQueue.js +0 -101
- package/dist-esm/promise/pRetry.js +0 -64
- package/dist-esm/promise/pState.js +0 -14
- package/dist-esm/promise/pTimeout.js +0 -64
- package/dist-esm/semver.js +0 -149
- package/dist-esm/string/case.js +0 -24
- package/dist-esm/string/escape.js +0 -49
- package/dist-esm/string/hash.util.js +0 -67
- package/dist-esm/string/json.util.js +0 -46
- package/dist-esm/string/leven.js +0 -77
- package/dist-esm/string/lodash/unicodeWords.js +0 -68
- package/dist-esm/string/lodash/words.js +0 -31
- package/dist-esm/string/pupa.js +0 -54
- package/dist-esm/string/readingTime.js +0 -102
- package/dist-esm/string/regex.js +0 -6
- package/dist-esm/string/safeJsonStringify.js +0 -39
- package/dist-esm/string/slugify.js +0 -66
- package/dist-esm/string/string.util.js +0 -99
- package/dist-esm/string/stringify.js +0 -133
- package/dist-esm/string/url.util.js +0 -42
- package/dist-esm/time/time.util.js +0 -61
- package/dist-esm/typeFest.js +0 -2
- package/dist-esm/types.js +0 -66
- package/dist-esm/unit/size.util.js +0 -43
- package/dist-esm/web.js +0 -40
- package/dist-esm/zod/index.js +0 -4
- package/dist-esm/zod/zod.shared.schemas.js +0 -92
- package/dist-esm/zod/zod.util.js +0 -52
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.TranslationService = exports.defaultMissingTranslationHandler = void 0;
|
|
4
|
-
const pMap_1 = require("../../promise/pMap");
|
|
5
|
-
const defaultMissingTranslationHandler = key => {
|
|
1
|
+
import { pMap } from '../../promise/pMap.js';
|
|
2
|
+
export const defaultMissingTranslationHandler = key => {
|
|
6
3
|
console.warn(`[tr] missing: ${key}`);
|
|
7
4
|
return `[${key}]`;
|
|
8
5
|
};
|
|
9
|
-
|
|
10
|
-
class TranslationService {
|
|
6
|
+
export class TranslationService {
|
|
11
7
|
constructor(cfg, preloadedLocales = {}) {
|
|
12
8
|
this.cfg = {
|
|
13
9
|
...cfg,
|
|
14
|
-
missingTranslationHandler:
|
|
10
|
+
missingTranslationHandler: defaultMissingTranslationHandler,
|
|
15
11
|
};
|
|
16
12
|
this.locales = {
|
|
17
13
|
...preloadedLocales,
|
|
@@ -39,7 +35,7 @@ class TranslationService {
|
|
|
39
35
|
*/
|
|
40
36
|
async loadLocale(locale) {
|
|
41
37
|
const locales = Array.isArray(locale) ? locale : [locale];
|
|
42
|
-
await
|
|
38
|
+
await pMap(locales, async (locale) => {
|
|
43
39
|
if (this.locales[locale])
|
|
44
40
|
return; // already loaded
|
|
45
41
|
this.locales[locale] = await this.cfg.translationLoader.load(locale);
|
|
@@ -64,4 +60,3 @@ class TranslationService {
|
|
|
64
60
|
return this.locales[this.currentLocale]?.[key] || this.locales[this.cfg.defaultLocale]?.[key];
|
|
65
61
|
}
|
|
66
62
|
}
|
|
67
|
-
exports.TranslationService = TranslationService;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ImageFitter = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Calculates the width/height of the images to fit in the layout.
|
|
6
3
|
*
|
|
@@ -8,7 +5,7 @@ exports.ImageFitter = void 0;
|
|
|
8
5
|
*
|
|
9
6
|
* @experimental
|
|
10
7
|
*/
|
|
11
|
-
class ImageFitter {
|
|
8
|
+
export class ImageFitter {
|
|
12
9
|
constructor(cfg) {
|
|
13
10
|
this.cfg = {
|
|
14
11
|
maxHeight: 300,
|
|
@@ -68,4 +65,3 @@ class ImageFitter {
|
|
|
68
65
|
});
|
|
69
66
|
}
|
|
70
67
|
}
|
|
71
|
-
exports.ImageFitter = ImageFitter;
|
|
@@ -1,18 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.loadScript = loadScript;
|
|
4
|
-
exports.loadCSS = loadCSS;
|
|
5
|
-
const env_1 = require("../env");
|
|
6
|
-
const types_1 = require("../types");
|
|
1
|
+
import { isServerSide } from '../env.js';
|
|
2
|
+
import { _objectAssign } from '../types.js';
|
|
7
3
|
/**
|
|
8
4
|
* opt.async defaults to `true`.
|
|
9
5
|
* No other options are set by default.
|
|
10
6
|
*/
|
|
11
|
-
async function loadScript(src, opt) {
|
|
12
|
-
if (
|
|
7
|
+
export async function loadScript(src, opt) {
|
|
8
|
+
if (isServerSide())
|
|
13
9
|
return;
|
|
14
10
|
return await new Promise((resolve, reject) => {
|
|
15
|
-
const s =
|
|
11
|
+
const s = _objectAssign(document.createElement('script'), {
|
|
16
12
|
src,
|
|
17
13
|
async: true,
|
|
18
14
|
...opt,
|
|
@@ -30,11 +26,11 @@ async function loadScript(src, opt) {
|
|
|
30
26
|
*
|
|
31
27
|
* No other options are set by default.
|
|
32
28
|
*/
|
|
33
|
-
async function loadCSS(href, opt) {
|
|
34
|
-
if (
|
|
29
|
+
export async function loadCSS(href, opt) {
|
|
30
|
+
if (isServerSide())
|
|
35
31
|
return;
|
|
36
32
|
return await new Promise((resolve, reject) => {
|
|
37
|
-
const link =
|
|
33
|
+
const link = _objectAssign(document.createElement('link'), {
|
|
38
34
|
href,
|
|
39
35
|
rel: 'stylesheet',
|
|
40
36
|
// type seems to be unnecessary: https://stackoverflow.com/a/5409146/4919972
|
package/dist/browser/topbar.js
CHANGED
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// Modified version of topbar:
|
|
3
2
|
// http://buunguyen.github.io/topbar
|
|
4
3
|
/* eslint-disable */
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.topbar = void 0;
|
|
7
4
|
const browser = typeof window !== 'undefined';
|
|
8
5
|
let canvas;
|
|
9
6
|
let progressTimerId;
|
|
@@ -60,7 +57,7 @@ const createCanvas = () => {
|
|
|
60
57
|
document.body.appendChild(canvas);
|
|
61
58
|
addEvent(window, 'resize', repaint);
|
|
62
59
|
};
|
|
63
|
-
|
|
60
|
+
export const topbar = {
|
|
64
61
|
config(opts) {
|
|
65
62
|
for (const key in opts) {
|
|
66
63
|
if (options.hasOwnProperty(key)) {
|
|
@@ -71,17 +68,17 @@ exports.topbar = {
|
|
|
71
68
|
},
|
|
72
69
|
set(show, opts) {
|
|
73
70
|
if (show) {
|
|
74
|
-
|
|
71
|
+
topbar.show(opts);
|
|
75
72
|
}
|
|
76
73
|
else {
|
|
77
|
-
|
|
74
|
+
topbar.hide();
|
|
78
75
|
}
|
|
79
76
|
},
|
|
80
77
|
show(opts) {
|
|
81
78
|
if (!browser)
|
|
82
79
|
return; // ssr protection
|
|
83
80
|
if (opts)
|
|
84
|
-
|
|
81
|
+
topbar.config(opts);
|
|
85
82
|
if (showing)
|
|
86
83
|
return;
|
|
87
84
|
showing = true;
|
|
@@ -92,12 +89,12 @@ exports.topbar = {
|
|
|
92
89
|
createCanvas();
|
|
93
90
|
canvas.style.opacity = 1;
|
|
94
91
|
canvas.style.display = 'block';
|
|
95
|
-
|
|
92
|
+
topbar.progress(0);
|
|
96
93
|
if (options.autoRun) {
|
|
97
94
|
;
|
|
98
95
|
(function loop() {
|
|
99
96
|
progressTimerId = window.requestAnimationFrame(loop);
|
|
100
|
-
|
|
97
|
+
topbar.progress('+' + 0.05 * (1 - Math.sqrt(currentProgress)) ** 2);
|
|
101
98
|
})();
|
|
102
99
|
}
|
|
103
100
|
},
|
|
@@ -124,7 +121,7 @@ exports.topbar = {
|
|
|
124
121
|
}
|
|
125
122
|
;
|
|
126
123
|
(function loop() {
|
|
127
|
-
if (
|
|
124
|
+
if (topbar.progress('+.1') >= 1) {
|
|
128
125
|
canvas.style.opacity -= 0.05;
|
|
129
126
|
if (canvas.style.opacity <= 0.05) {
|
|
130
127
|
canvas.style.display = 'none';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Inclusiveness } from '../types';
|
|
2
|
-
import type { LocalDate, LocalDateInput, LocalDateUnit } from './localDate';
|
|
1
|
+
import type { Inclusiveness } from '../types.js';
|
|
2
|
+
import type { LocalDate, LocalDateInput, LocalDateUnit } from './localDate.js';
|
|
3
3
|
export type DateIntervalConfig = DateInterval | DateIntervalString;
|
|
4
4
|
export type DateIntervalString = string;
|
|
5
5
|
/**
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DateInterval = void 0;
|
|
4
|
-
const localDate_1 = require("./localDate");
|
|
1
|
+
import { localDate } from './localDate.js';
|
|
5
2
|
/**
|
|
6
3
|
* Class that supports ISO8601 "Time interval" standard that looks like `2022-02-24/2022-03-30`.
|
|
7
4
|
*
|
|
8
5
|
* @experimental
|
|
9
6
|
*/
|
|
10
|
-
class DateInterval {
|
|
7
|
+
export class DateInterval {
|
|
11
8
|
start;
|
|
12
9
|
end;
|
|
13
10
|
constructor(start, end) {
|
|
@@ -15,7 +12,7 @@ class DateInterval {
|
|
|
15
12
|
this.end = end;
|
|
16
13
|
}
|
|
17
14
|
static of(start, end) {
|
|
18
|
-
return new DateInterval(
|
|
15
|
+
return new DateInterval(localDate(start), localDate(end));
|
|
19
16
|
}
|
|
20
17
|
/**
|
|
21
18
|
* Parses string like `2022-02-24/2023-03-30` into a DateInterval.
|
|
@@ -27,7 +24,7 @@ class DateInterval {
|
|
|
27
24
|
if (!end || !start) {
|
|
28
25
|
throw new Error(`Cannot parse "${d}" into DateInterval`);
|
|
29
26
|
}
|
|
30
|
-
return new DateInterval(
|
|
27
|
+
return new DateInterval(localDate(start), localDate(end));
|
|
31
28
|
}
|
|
32
29
|
isSame(d) {
|
|
33
30
|
return this.cmp(d) === 0;
|
|
@@ -50,7 +47,7 @@ class DateInterval {
|
|
|
50
47
|
* Ranges of DateInterval (start, end) are INCLUSIVE.
|
|
51
48
|
*/
|
|
52
49
|
includes(d, incl = '[]') {
|
|
53
|
-
d =
|
|
50
|
+
d = localDate(d);
|
|
54
51
|
// eslint-disable-next-line @typescript-eslint/prefer-string-starts-ends-with
|
|
55
52
|
return d.isAfter(this.start, incl[0] === '[') && d.isBefore(this.end, incl[1] === ']');
|
|
56
53
|
}
|
|
@@ -68,13 +65,13 @@ class DateInterval {
|
|
|
68
65
|
return this.start.compare(d.start) || this.end.compare(d.end);
|
|
69
66
|
}
|
|
70
67
|
getDays(incl = '[]') {
|
|
71
|
-
return
|
|
68
|
+
return localDate.range(this.start, this.end, incl, 1, 'day');
|
|
72
69
|
}
|
|
73
70
|
/**
|
|
74
71
|
* Returns an array of LocalDates that are included in the interval.
|
|
75
72
|
*/
|
|
76
73
|
range(incl = '[]', step = 1, stepUnit = 'day') {
|
|
77
|
-
return
|
|
74
|
+
return localDate.range(this.start, this.end, incl, step, stepUnit);
|
|
78
75
|
}
|
|
79
76
|
toString() {
|
|
80
77
|
return [this.start, this.end].join('/');
|
|
@@ -83,4 +80,3 @@ class DateInterval {
|
|
|
83
80
|
return this.toString();
|
|
84
81
|
}
|
|
85
82
|
}
|
|
86
|
-
exports.DateInterval = DateInterval;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Iterable2 } from '../iter/iterable2';
|
|
2
|
-
import type { Inclusiveness, IsoDate, IsoDateTime, MonthId, SortDirection, UnixTimestamp, UnixTimestampMillis } from '../types';
|
|
3
|
-
import type { DateObject, ISODayOfWeek, LocalTime } from './localTime';
|
|
1
|
+
import { Iterable2 } from '../iter/iterable2.js';
|
|
2
|
+
import type { Inclusiveness, IsoDate, IsoDateTime, MonthId, SortDirection, UnixTimestamp, UnixTimestampMillis } from '../types.js';
|
|
3
|
+
import type { DateObject, ISODayOfWeek, LocalTime } from './localTime.js';
|
|
4
4
|
export type LocalDateUnit = LocalDateUnitStrict | 'week';
|
|
5
5
|
export type LocalDateUnitStrict = 'year' | 'month' | 'day';
|
|
6
6
|
export type LocalDateInput = LocalDate | Date | IsoDate;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
const assert_1 = require("../error/assert");
|
|
5
|
-
const iterable2_1 = require("../iter/iterable2");
|
|
6
|
-
const localTime_1 = require("./localTime");
|
|
1
|
+
import { _assert } from '../error/assert.js';
|
|
2
|
+
import { Iterable2 } from '../iter/iterable2.js';
|
|
3
|
+
import { localTime, VALID_DAYS_OF_WEEK } from './localTime.js';
|
|
7
4
|
const MDAYS = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
8
5
|
/**
|
|
9
6
|
* Regex is open-ended (no $ at the end) to support e.g Date+Time string to be parsed (time part will be dropped)
|
|
@@ -14,7 +11,7 @@ const COMPACT_DATE_REGEX = /^(\d\d\d\d)(\d\d)(\d\d)$/;
|
|
|
14
11
|
* LocalDate represents a date without time.
|
|
15
12
|
* It is timezone-independent.
|
|
16
13
|
*/
|
|
17
|
-
class LocalDate {
|
|
14
|
+
export class LocalDate {
|
|
18
15
|
year;
|
|
19
16
|
month;
|
|
20
17
|
day;
|
|
@@ -57,7 +54,7 @@ class LocalDate {
|
|
|
57
54
|
* relation to `this`.
|
|
58
55
|
*/
|
|
59
56
|
setDayOfWeek(dow) {
|
|
60
|
-
|
|
57
|
+
_assert(VALID_DAYS_OF_WEEK.has(dow), `Invalid dayOfWeek: ${dow}`);
|
|
61
58
|
const delta = dow - this.dayOfWeek;
|
|
62
59
|
return this.plus(delta, 'day');
|
|
63
60
|
}
|
|
@@ -67,14 +64,14 @@ class LocalDate {
|
|
|
67
64
|
* If this LocalDate is Monday, and desired DoW is also Monday - `this` is returned.
|
|
68
65
|
*/
|
|
69
66
|
setNextDayOfWeek(dow) {
|
|
70
|
-
|
|
67
|
+
_assert(VALID_DAYS_OF_WEEK.has(dow), `Invalid dayOfWeek: ${dow}`);
|
|
71
68
|
let delta = dow - this.dayOfWeek;
|
|
72
69
|
if (delta < 0)
|
|
73
70
|
delta += 7;
|
|
74
71
|
return this.plus(delta, 'day');
|
|
75
72
|
}
|
|
76
73
|
isSame(d) {
|
|
77
|
-
d =
|
|
74
|
+
d = localDate.fromInput(d);
|
|
78
75
|
return this.day === d.day && this.month === d.month && this.year === d.year;
|
|
79
76
|
}
|
|
80
77
|
isBefore(d, inclusive = false) {
|
|
@@ -111,13 +108,13 @@ class LocalDate {
|
|
|
111
108
|
* Third argument allows to override "today".
|
|
112
109
|
*/
|
|
113
110
|
isOlderThan(n, unit, today) {
|
|
114
|
-
return this.isBefore(
|
|
111
|
+
return this.isBefore(localDate.fromInput(today || new Date()).plus(-n, unit));
|
|
115
112
|
}
|
|
116
113
|
/**
|
|
117
114
|
* Checks if this localDate is same or older (<=) than "today" by X units.
|
|
118
115
|
*/
|
|
119
116
|
isSameOrOlderThan(n, unit, today) {
|
|
120
|
-
return this.isSameOrBefore(
|
|
117
|
+
return this.isSameOrBefore(localDate.fromInput(today || new Date()).plus(-n, unit));
|
|
121
118
|
}
|
|
122
119
|
/**
|
|
123
120
|
* Checks if this localDate is younger (>) than "today" by X units.
|
|
@@ -129,28 +126,28 @@ class LocalDate {
|
|
|
129
126
|
* Third argument allows to override "today".
|
|
130
127
|
*/
|
|
131
128
|
isYoungerThan(n, unit, today) {
|
|
132
|
-
return this.isAfter(
|
|
129
|
+
return this.isAfter(localDate.fromInput(today || new Date()).plus(-n, unit));
|
|
133
130
|
}
|
|
134
131
|
/**
|
|
135
132
|
* Checks if this localDate is same or younger (>=) than "today" by X units.
|
|
136
133
|
*/
|
|
137
134
|
isSameOrYoungerThan(n, unit, today) {
|
|
138
|
-
return this.isSameOrAfter(
|
|
135
|
+
return this.isSameOrAfter(localDate.fromInput(today || new Date()).plus(-n, unit));
|
|
139
136
|
}
|
|
140
137
|
isToday() {
|
|
141
|
-
return this.isSame(
|
|
138
|
+
return this.isSame(localDate.today());
|
|
142
139
|
}
|
|
143
140
|
isAfterToday() {
|
|
144
|
-
return this.isAfter(
|
|
141
|
+
return this.isAfter(localDate.today());
|
|
145
142
|
}
|
|
146
143
|
isSameOrAfterToday() {
|
|
147
|
-
return this.isSameOrAfter(
|
|
144
|
+
return this.isSameOrAfter(localDate.today());
|
|
148
145
|
}
|
|
149
146
|
isBeforeToday() {
|
|
150
|
-
return this.isBefore(
|
|
147
|
+
return this.isBefore(localDate.today());
|
|
151
148
|
}
|
|
152
149
|
isSameOrBeforeToday() {
|
|
153
|
-
return this.isSameOrBefore(
|
|
150
|
+
return this.isSameOrBefore(localDate.today());
|
|
154
151
|
}
|
|
155
152
|
getAgeInYears(today) {
|
|
156
153
|
return this.getAgeIn('year', today);
|
|
@@ -162,7 +159,7 @@ class LocalDate {
|
|
|
162
159
|
return this.getAgeIn('day', today);
|
|
163
160
|
}
|
|
164
161
|
getAgeIn(unit, today) {
|
|
165
|
-
return
|
|
162
|
+
return localDate.fromInput(today || new Date()).diff(this, unit);
|
|
166
163
|
}
|
|
167
164
|
/**
|
|
168
165
|
* Returns 1 if this > d
|
|
@@ -170,7 +167,7 @@ class LocalDate {
|
|
|
170
167
|
* returns -1 if this < d
|
|
171
168
|
*/
|
|
172
169
|
compare(d) {
|
|
173
|
-
d =
|
|
170
|
+
d = localDate.fromInput(d);
|
|
174
171
|
if (this.year < d.year)
|
|
175
172
|
return -1;
|
|
176
173
|
if (this.year > d.year)
|
|
@@ -197,7 +194,7 @@ class LocalDate {
|
|
|
197
194
|
* a.diff(b) means "a minus b"
|
|
198
195
|
*/
|
|
199
196
|
diff(d, unit) {
|
|
200
|
-
d =
|
|
197
|
+
d = localDate.fromInput(d);
|
|
201
198
|
const sign = this.compare(d);
|
|
202
199
|
if (!sign)
|
|
203
200
|
return 0;
|
|
@@ -208,8 +205,8 @@ class LocalDate {
|
|
|
208
205
|
if (big.month < small.month ||
|
|
209
206
|
(big.month === small.month &&
|
|
210
207
|
big.day < small.day &&
|
|
211
|
-
!(big.day ===
|
|
212
|
-
small.day ===
|
|
208
|
+
!(big.day === localDate.getMonthLength(big.year, big.month) &&
|
|
209
|
+
small.day === localDate.getMonthLength(small.year, small.month)))) {
|
|
213
210
|
years--;
|
|
214
211
|
}
|
|
215
212
|
return years * sign || 0;
|
|
@@ -217,7 +214,7 @@ class LocalDate {
|
|
|
217
214
|
if (unit === 'month') {
|
|
218
215
|
let months = (big.year - small.year) * 12 + (big.month - small.month);
|
|
219
216
|
if (big.day < small.day) {
|
|
220
|
-
const bigMonthLen =
|
|
217
|
+
const bigMonthLen = localDate.getMonthLength(big.year, big.month);
|
|
221
218
|
if (big.day !== bigMonthLen || small.day < bigMonthLen) {
|
|
222
219
|
months--;
|
|
223
220
|
}
|
|
@@ -229,16 +226,16 @@ class LocalDate {
|
|
|
229
226
|
// If small date is after 1st of March - next year's "leapness" should be used
|
|
230
227
|
const offsetYear = small.month >= 3 ? 1 : 0;
|
|
231
228
|
for (let year = small.year; year < big.year; year++) {
|
|
232
|
-
days +=
|
|
229
|
+
days += localDate.getYearLength(year + offsetYear);
|
|
233
230
|
}
|
|
234
231
|
if (small.month < big.month) {
|
|
235
232
|
for (let month = small.month; month < big.month; month++) {
|
|
236
|
-
days +=
|
|
233
|
+
days += localDate.getMonthLength(big.year, month);
|
|
237
234
|
}
|
|
238
235
|
}
|
|
239
236
|
else if (big.month < small.month) {
|
|
240
237
|
for (let month = big.month; month < small.month; month++) {
|
|
241
|
-
days -=
|
|
238
|
+
days -= localDate.getMonthLength(big.year, month);
|
|
242
239
|
}
|
|
243
240
|
}
|
|
244
241
|
if (unit === 'week') {
|
|
@@ -304,11 +301,11 @@ class LocalDate {
|
|
|
304
301
|
year -= 1;
|
|
305
302
|
month += 12;
|
|
306
303
|
}
|
|
307
|
-
day +=
|
|
304
|
+
day += localDate.getMonthLength(year, month);
|
|
308
305
|
}
|
|
309
306
|
}
|
|
310
307
|
else {
|
|
311
|
-
let monLen =
|
|
308
|
+
let monLen = localDate.getMonthLength(year, month);
|
|
312
309
|
if (unit !== 'day') {
|
|
313
310
|
if (day > monLen) {
|
|
314
311
|
// Case of 2022-05-31 plus 1 month should be 2022-06-30, not 31
|
|
@@ -323,7 +320,7 @@ class LocalDate {
|
|
|
323
320
|
year += 1;
|
|
324
321
|
month -= 12;
|
|
325
322
|
}
|
|
326
|
-
monLen =
|
|
323
|
+
monLen = localDate.getMonthLength(year, month);
|
|
327
324
|
}
|
|
328
325
|
}
|
|
329
326
|
}
|
|
@@ -350,7 +347,7 @@ class LocalDate {
|
|
|
350
347
|
if (unit === 'day')
|
|
351
348
|
return this;
|
|
352
349
|
if (unit === 'month') {
|
|
353
|
-
return new LocalDate(this.year, this.month,
|
|
350
|
+
return new LocalDate(this.year, this.month, localDate.getMonthLength(this.year, this.month));
|
|
354
351
|
}
|
|
355
352
|
// year
|
|
356
353
|
return new LocalDate(this.year, 12, 31);
|
|
@@ -360,7 +357,7 @@ class LocalDate {
|
|
|
360
357
|
* E.g 31 for January.
|
|
361
358
|
*/
|
|
362
359
|
get daysInMonth() {
|
|
363
|
-
return
|
|
360
|
+
return localDate.getMonthLength(this.year, this.month);
|
|
364
361
|
}
|
|
365
362
|
clone() {
|
|
366
363
|
return new LocalDate(this.year, this.month, this.day);
|
|
@@ -393,7 +390,7 @@ class LocalDate {
|
|
|
393
390
|
* LocalTime's Date will be in local timezone.
|
|
394
391
|
*/
|
|
395
392
|
toLocalTime() {
|
|
396
|
-
return
|
|
393
|
+
return localTime.fromDate(this.toDate());
|
|
397
394
|
}
|
|
398
395
|
/**
|
|
399
396
|
* Returns e.g: `1984-06-21`
|
|
@@ -460,7 +457,6 @@ class LocalDate {
|
|
|
460
457
|
return fmt(this);
|
|
461
458
|
}
|
|
462
459
|
}
|
|
463
|
-
exports.LocalDate = LocalDate;
|
|
464
460
|
class LocalDateFactory {
|
|
465
461
|
/**
|
|
466
462
|
* Creates a LocalDate from the input, unless it's falsy - then returns undefined.
|
|
@@ -566,7 +562,7 @@ class LocalDateFactory {
|
|
|
566
562
|
*/
|
|
567
563
|
parseToLocalDate(regex, s) {
|
|
568
564
|
const ld = this.parseToLocalDateOrUndefined(regex, s);
|
|
569
|
-
|
|
565
|
+
_assert(ld, `Cannot parse "${s}" into LocalDate`);
|
|
570
566
|
return ld;
|
|
571
567
|
}
|
|
572
568
|
/**
|
|
@@ -589,7 +585,7 @@ class LocalDateFactory {
|
|
|
589
585
|
* Throws on invalid value.
|
|
590
586
|
*/
|
|
591
587
|
validateDateObject(o) {
|
|
592
|
-
|
|
588
|
+
_assert(this.isDateObjectValid(o), `Cannot construct LocalDate from: ${o.year}-${o.month}-${o.day}`);
|
|
593
589
|
}
|
|
594
590
|
isDateObjectValid({ year, month, day }) {
|
|
595
591
|
return (!!year && month >= 1 && month <= 12 && day >= 1 && day <= this.getMonthLength(year, month));
|
|
@@ -599,7 +595,7 @@ class LocalDateFactory {
|
|
|
599
595
|
* Takes Date as-is, in its timezone - local or UTC.
|
|
600
596
|
*/
|
|
601
597
|
fromDate(d) {
|
|
602
|
-
|
|
598
|
+
_assert(!Number.isNaN(d.getDate()), 'localDate.fromDate is called on Date object that is invalid');
|
|
603
599
|
return new LocalDate(d.getFullYear(), d.getMonth() + 1, d.getDate());
|
|
604
600
|
}
|
|
605
601
|
/**
|
|
@@ -607,7 +603,7 @@ class LocalDateFactory {
|
|
|
607
603
|
* Takes Date's year/month/day components in UTC, using getUTCFullYear, getUTCMonth, getUTCDate.
|
|
608
604
|
*/
|
|
609
605
|
fromDateInUTC(d) {
|
|
610
|
-
|
|
606
|
+
_assert(!Number.isNaN(d.getDate()), 'localDate.fromDateInUTC is called on Date object that is invalid');
|
|
611
607
|
return new LocalDate(d.getUTCFullYear(), d.getUTCMonth() + 1, d.getUTCDate());
|
|
612
608
|
}
|
|
613
609
|
fromDateObject(o) {
|
|
@@ -642,7 +638,7 @@ class LocalDateFactory {
|
|
|
642
638
|
*/
|
|
643
639
|
min(items) {
|
|
644
640
|
const min = this.minOrUndefined(items);
|
|
645
|
-
|
|
641
|
+
_assert(min, 'localDate.min called on empty array');
|
|
646
642
|
return min;
|
|
647
643
|
}
|
|
648
644
|
/**
|
|
@@ -666,7 +662,7 @@ class LocalDateFactory {
|
|
|
666
662
|
*/
|
|
667
663
|
max(items) {
|
|
668
664
|
const max = this.maxOrUndefined(items);
|
|
669
|
-
|
|
665
|
+
_assert(max, 'localDate.max called on empty array');
|
|
670
666
|
return max;
|
|
671
667
|
}
|
|
672
668
|
/**
|
|
@@ -696,7 +692,7 @@ class LocalDateFactory {
|
|
|
696
692
|
value.plus(1, stepUnit, true);
|
|
697
693
|
}
|
|
698
694
|
const rightInclusive = incl[1] === ']';
|
|
699
|
-
return
|
|
695
|
+
return Iterable2.of({
|
|
700
696
|
*[Symbol.iterator]() {
|
|
701
697
|
while (value.isBefore($max, rightInclusive)) {
|
|
702
698
|
yield value;
|
|
@@ -720,7 +716,7 @@ class LocalDateFactory {
|
|
|
720
716
|
}
|
|
721
717
|
}
|
|
722
718
|
const localDateFactory = new LocalDateFactory();
|
|
723
|
-
|
|
719
|
+
export const localDate = localDateFactory.fromInput.bind(localDateFactory);
|
|
724
720
|
// The line below is the blackest of black magic I have ever written in 2024.
|
|
725
721
|
// And probably 2023 as well.
|
|
726
|
-
Object.setPrototypeOf(
|
|
722
|
+
Object.setPrototypeOf(localDate, localDateFactory);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { IANATimezone, Inclusiveness, IsoDate, IsoDateTime, MonthId, NumberOfHours, NumberOfMinutes, SortDirection, UnixTimestamp, UnixTimestampMillis } from '../types';
|
|
2
|
-
import type { LocalDate } from './localDate';
|
|
3
|
-
import { WallTime } from './wallTime';
|
|
1
|
+
import type { IANATimezone, Inclusiveness, IsoDate, IsoDateTime, MonthId, NumberOfHours, NumberOfMinutes, SortDirection, UnixTimestamp, UnixTimestampMillis } from '../types.js';
|
|
2
|
+
import type { LocalDate } from './localDate.js';
|
|
3
|
+
import { WallTime } from './wallTime.js';
|
|
4
4
|
export type LocalTimeUnit = 'year' | 'month' | 'week' | 'day' | 'hour' | 'minute' | 'second';
|
|
5
5
|
export declare enum ISODayOfWeek {
|
|
6
6
|
MONDAY = 1,
|