@acorex/core 16.0.2 → 17.0.1
Sign up to get free protection for your applications and to get access to all the features.
- package/common/README.md +3 -0
- package/common/countries/countries.data.d.ts +2 -0
- package/common/countries/country.d.ts +13 -0
- package/common/index.d.ts +2 -0
- package/config/README.md +3 -0
- package/config/index.d.ts +2 -0
- package/config/lib/configs.d.ts +6 -0
- package/config/lib/configs.service.d.ts +12 -0
- package/date-time/README.md +3 -0
- package/date-time/index.d.ts +10 -0
- package/date-time/lib/calendar.service.d.ts +27 -0
- package/date-time/lib/dateTime.config.d.ts +12 -0
- package/date-time/lib/datetime.class.d.ts +138 -0
- package/date-time/lib/datetime.module.d.ts +8 -0
- package/date-time/lib/datetime.pipe.d.ts +12 -0
- package/date-time/lib/formatters/datetime-formatter.d.ts +19 -0
- package/date-time/lib/formatters/timeleft-formatter.d.ts +16 -0
- package/date-time/lib/georgian.calendar.d.ts +21 -0
- package/date-time/lib/holidays.loader.d.ts +21 -0
- package/date-time/lib/jalali.calendar.d.ts +40 -0
- package/esm2022/common/acorex-core-common.mjs +5 -0
- package/esm2022/common/countries/countries.data.mjs +2625 -0
- package/esm2022/common/countries/country.mjs +2 -0
- package/esm2022/common/index.mjs +3 -0
- package/esm2022/config/acorex-core-config.mjs +5 -0
- package/esm2022/config/index.mjs +3 -0
- package/esm2022/config/lib/configs.mjs +7 -0
- package/esm2022/config/lib/configs.service.mjs +27 -0
- package/esm2022/date-time/acorex-core-date-time.mjs +5 -0
- package/esm2022/date-time/index.mjs +11 -0
- package/esm2022/date-time/lib/calendar.service.mjs +100 -0
- package/esm2022/date-time/lib/dateTime.config.mjs +50 -0
- package/esm2022/date-time/lib/datetime.class.mjs +337 -0
- package/esm2022/date-time/lib/datetime.module.mjs +27 -0
- package/esm2022/date-time/lib/datetime.pipe.mjs +29 -0
- package/esm2022/date-time/lib/formatters/datetime-formatter.mjs +32 -0
- package/esm2022/date-time/lib/formatters/timeleft-formatter.mjs +91 -0
- package/esm2022/date-time/lib/georgian.calendar.mjs +203 -0
- package/esm2022/date-time/lib/holidays.loader.mjs +13 -0
- package/esm2022/date-time/lib/jalali.calendar.mjs +440 -0
- package/esm2022/events/acorex-core-events.mjs +5 -0
- package/esm2022/events/index.mjs +3 -0
- package/esm2022/events/lib/event.service.mjs +43 -0
- package/esm2022/events/lib/event.type.mjs +6 -0
- package/esm2022/file/acorex-core-file.mjs +5 -0
- package/esm2022/file/index.mjs +7 -0
- package/esm2022/file/lib/file-download-ref.class.mjs +12 -0
- package/esm2022/file/lib/file-download-result.class.mjs +45 -0
- package/esm2022/file/lib/file-size-formatter.mjs +24 -0
- package/esm2022/file/lib/file-upload-ref.class.mjs +12 -0
- package/esm2022/file/lib/file.module.mjs +20 -0
- package/esm2022/file/lib/file.service.mjs +103 -0
- package/esm2022/format/acorex-core-format.mjs +5 -0
- package/esm2022/format/index.mjs +8 -0
- package/esm2022/format/lib/format.config.mjs +3 -0
- package/esm2022/format/lib/format.module.mjs +64 -0
- package/esm2022/format/lib/format.pipe.mjs +37 -0
- package/esm2022/format/lib/format.service.mjs +95 -0
- package/esm2022/format/lib/format.types.mjs +2 -0
- package/esm2022/format/lib/formatters/number-formatter.mjs +74 -0
- package/esm2022/format/lib/formatters/string-formatter.mjs +15 -0
- package/esm2022/image/acorex-core-image.mjs +5 -0
- package/esm2022/image/index.mjs +2 -0
- package/esm2022/image/lib/image.service.mjs +43 -0
- package/esm2022/index.mjs +2 -44
- package/esm2022/memorize/acorex-core-memorize.mjs +5 -0
- package/esm2022/memorize/index.mjs +2 -0
- package/esm2022/memorize/lib/memorize.decorator.mjs +19 -0
- package/esm2022/pipes/acorex-core-pipes.mjs +5 -0
- package/esm2022/pipes/index.mjs +2 -0
- package/esm2022/pipes/lib/safe/safe.pipe.mjs +38 -0
- package/esm2022/platform/acorex-core-platform.mjs +5 -0
- package/esm2022/platform/index.mjs +2 -0
- package/esm2022/platform/lib/platform.service.mjs +225 -0
- package/esm2022/storage/acorex-core-storage.mjs +5 -0
- package/esm2022/storage/cookie-storage.service.mjs +202 -0
- package/esm2022/storage/index.mjs +5 -0
- package/esm2022/storage/local-storage.service.mjs +58 -0
- package/esm2022/storage/session-storage.service.mjs +22 -0
- package/esm2022/storage/storage.interface.mjs +2 -0
- package/esm2022/translation/acorex-core-translation.mjs +5 -0
- package/esm2022/translation/index.mjs +9 -0
- package/esm2022/translation/lib/translation-scope.resolver.mjs +11 -0
- package/esm2022/translation/lib/translation.config.mjs +20 -0
- package/esm2022/translation/lib/translation.loader.mjs +14 -0
- package/esm2022/translation/lib/translation.module.mjs +40 -0
- package/esm2022/translation/lib/translation.service.mjs +173 -0
- package/esm2022/translation/lib/translation.types.mjs +2 -0
- package/esm2022/translation/lib/translator.directive.mjs +28 -0
- package/esm2022/translation/lib/translator.pipe.mjs +23 -0
- package/esm2022/types/acorex-core-types.mjs +5 -0
- package/esm2022/types/index.mjs +2 -0
- package/esm2022/utils/acorex-core-utils.mjs +5 -0
- package/esm2022/utils/index.mjs +6 -0
- package/esm2022/utils/lib/auto-unsubscribe.mjs +36 -0
- package/esm2022/utils/lib/color-util.mjs +111 -0
- package/esm2022/utils/lib/drawing-util.mjs +35 -0
- package/esm2022/utils/lib/html-util.mjs +39 -0
- package/esm2022/utils/lib/string-util.mjs +19 -0
- package/esm2022/validation/acorex-core-validation.mjs +5 -0
- package/esm2022/validation/index.mjs +18 -0
- package/esm2022/validation/lib/rules/between-rule.mjs +31 -0
- package/esm2022/validation/lib/rules/callback-rule.mjs +29 -0
- package/esm2022/validation/lib/rules/equal-rule.mjs +26 -0
- package/esm2022/validation/lib/rules/greater-than.mjs +29 -0
- package/esm2022/validation/lib/rules/length-rule.mjs +26 -0
- package/esm2022/validation/lib/rules/less-than-rule.mjs +29 -0
- package/esm2022/validation/lib/rules/maxlength-rule.mjs +27 -0
- package/esm2022/validation/lib/rules/minlength-rule.mjs +26 -0
- package/esm2022/validation/lib/rules/regex-rule.mjs +49 -0
- package/esm2022/validation/lib/rules/required-rule.mjs +36 -0
- package/esm2022/validation/lib/validation.config.mjs +33 -0
- package/esm2022/validation/lib/validation.module.mjs +84 -0
- package/esm2022/validation/lib/validation.service.mjs +98 -0
- package/esm2022/validation/lib/validation.types.mjs +3 -0
- package/events/README.md +3 -0
- package/events/index.d.ts +2 -0
- package/{lib/services → events/lib}/event.service.d.ts +8 -0
- package/events/lib/event.type.d.ts +5 -0
- package/fesm2022/acorex-core-common.mjs +2631 -0
- package/fesm2022/acorex-core-common.mjs.map +1 -0
- package/fesm2022/acorex-core-config.mjs +39 -0
- package/fesm2022/acorex-core-config.mjs.map +1 -0
- package/fesm2022/acorex-core-date-time.mjs +1305 -0
- package/fesm2022/acorex-core-date-time.mjs.map +1 -0
- package/fesm2022/acorex-core-events.mjs +56 -0
- package/fesm2022/acorex-core-events.mjs.map +1 -0
- package/fesm2022/acorex-core-file.mjs +214 -0
- package/fesm2022/acorex-core-file.mjs.map +1 -0
- package/fesm2022/acorex-core-format.mjs +282 -0
- package/fesm2022/acorex-core-format.mjs.map +1 -0
- package/fesm2022/acorex-core-image.mjs +50 -0
- package/fesm2022/acorex-core-image.mjs.map +1 -0
- package/fesm2022/acorex-core-memorize.mjs +26 -0
- package/fesm2022/acorex-core-memorize.mjs.map +1 -0
- package/fesm2022/acorex-core-pipes.mjs +44 -0
- package/fesm2022/acorex-core-pipes.mjs.map +1 -0
- package/fesm2022/acorex-core-platform.mjs +232 -0
- package/fesm2022/acorex-core-platform.mjs.map +1 -0
- package/fesm2022/acorex-core-storage.mjs +285 -0
- package/fesm2022/acorex-core-storage.mjs.map +1 -0
- package/fesm2022/acorex-core-translation.mjs +293 -0
- package/fesm2022/acorex-core-translation.mjs.map +1 -0
- package/fesm2022/acorex-core-types.mjs +6 -0
- package/fesm2022/acorex-core-types.mjs.map +1 -0
- package/fesm2022/acorex-core-utils.mjs +247 -0
- package/fesm2022/acorex-core-utils.mjs.map +1 -0
- package/fesm2022/acorex-core-validation.mjs +488 -0
- package/fesm2022/acorex-core-validation.mjs.map +1 -0
- package/fesm2022/acorex-core.mjs +2 -2309
- package/fesm2022/acorex-core.mjs.map +1 -1
- package/file/README.md +3 -0
- package/file/index.d.ts +6 -0
- package/file/lib/file-download-ref.class.d.ts +6 -0
- package/file/lib/file-download-result.class.d.ts +8 -0
- package/file/lib/file-size-formatter.d.ts +16 -0
- package/file/lib/file-upload-ref.class.d.ts +5 -0
- package/file/lib/file.module.d.ts +7 -0
- package/file/lib/file.service.d.ts +18 -0
- package/format/README.md +3 -0
- package/format/index.d.ts +7 -0
- package/format/lib/format.config.d.ts +5 -0
- package/format/lib/format.module.d.ts +18 -0
- package/format/lib/format.pipe.d.ts +12 -0
- package/format/lib/format.service.d.ts +43 -0
- package/format/lib/format.types.d.ts +4 -0
- package/format/lib/formatters/number-formatter.d.ts +23 -0
- package/format/lib/formatters/string-formatter.d.ts +14 -0
- package/image/README.md +3 -0
- package/image/index.d.ts +1 -0
- package/image/lib/image.service.d.ts +11 -0
- package/index.d.ts +1 -43
- package/memorize/README.md +3 -0
- package/memorize/index.d.ts +1 -0
- package/memorize/lib/memorize.decorator.d.ts +1 -0
- package/package.json +98 -5
- package/pipes/README.md +3 -0
- package/pipes/index.d.ts +1 -0
- package/pipes/lib/safe/safe.pipe.d.ts +10 -0
- package/platform/README.md +3 -0
- package/platform/index.d.ts +1 -0
- package/{lib/platform → platform/lib}/platform.service.d.ts +14 -6
- package/storage/README.md +3 -0
- package/storage/cookie-storage.service.d.ts +104 -0
- package/storage/index.d.ts +4 -0
- package/storage/local-storage.service.d.ts +16 -0
- package/storage/session-storage.service.d.ts +10 -0
- package/storage/storage.interface.d.ts +14 -0
- package/translation/README.md +3 -0
- package/translation/index.d.ts +8 -0
- package/translation/lib/translation-scope.resolver.d.ts +2 -0
- package/translation/lib/translation.config.d.ts +14 -0
- package/translation/lib/translation.loader.d.ts +14 -0
- package/translation/lib/translation.module.d.ts +8 -0
- package/translation/lib/translation.service.d.ts +31 -0
- package/translation/lib/translation.types.d.ts +10 -0
- package/translation/lib/translator.directive.d.ts +12 -0
- package/translation/lib/translator.pipe.d.ts +12 -0
- package/types/README.md +3 -0
- package/types/index.d.ts +2 -0
- package/utils/README.md +3 -0
- package/utils/index.d.ts +5 -0
- package/utils/lib/auto-unsubscribe.d.ts +12 -0
- package/utils/lib/color-util.d.ts +24 -0
- package/utils/lib/drawing-util.d.ts +18 -0
- package/utils/lib/html-util.d.ts +5 -0
- package/utils/lib/string-util.d.ts +6 -0
- package/validation/README.md +3 -0
- package/validation/index.d.ts +14 -0
- package/validation/lib/rules/between-rule.d.ts +18 -0
- package/validation/lib/rules/callback-rule.d.ts +23 -0
- package/validation/lib/rules/equal-rule.d.ts +17 -0
- package/validation/lib/rules/greater-than.d.ts +17 -0
- package/validation/lib/rules/length-rule.d.ts +17 -0
- package/validation/lib/rules/less-than-rule.d.ts +17 -0
- package/validation/lib/rules/maxlength-rule.d.ts +16 -0
- package/validation/lib/rules/minlength-rule.d.ts +16 -0
- package/validation/lib/rules/regex-rule.d.ts +17 -0
- package/validation/lib/rules/required-rule.d.ts +16 -0
- package/validation/lib/validation.config.d.ts +15 -0
- package/validation/lib/validation.module.d.ts +17 -0
- package/validation/lib/validation.service.d.ts +35 -0
- package/validation/lib/validation.types.d.ts +21 -0
- package/esm2022/lib/classes/base-page.class.mjs +0 -26
- package/esm2022/lib/classes/color.class.mjs +0 -49
- package/esm2022/lib/classes/datetime.class.mjs +0 -323
- package/esm2022/lib/classes/menu.class.mjs +0 -35
- package/esm2022/lib/classes/navigator.class.mjs +0 -2
- package/esm2022/lib/classes/popup.class.mjs +0 -2
- package/esm2022/lib/classes/promise.class.mjs +0 -21
- package/esm2022/lib/classes/sectionlist.class.mjs +0 -2
- package/esm2022/lib/classes/select.class.mjs +0 -8
- package/esm2022/lib/core.module.mjs +0 -27
- package/esm2022/lib/error/error.class.mjs +0 -2
- package/esm2022/lib/error/error.module.mjs +0 -19
- package/esm2022/lib/error/error.service.mjs +0 -22
- package/esm2022/lib/events/keyboard.mjs +0 -2
- package/esm2022/lib/http/http-error.class.mjs +0 -2
- package/esm2022/lib/http/http-events.interceptor.mjs +0 -3
- package/esm2022/lib/http/http-request.class.mjs +0 -2
- package/esm2022/lib/http/http-result.class.mjs +0 -25
- package/esm2022/lib/http/http.module.mjs +0 -35
- package/esm2022/lib/http/http.service.mjs +0 -148
- package/esm2022/lib/locale/en.json +0 -255
- package/esm2022/lib/locale/fa.json +0 -245
- package/esm2022/lib/pipe/datetime.pipe.mjs +0 -25
- package/esm2022/lib/pipe/htmlToText.pipe.mjs +0 -25
- package/esm2022/lib/platform/index.mjs +0 -2
- package/esm2022/lib/platform/platform.service.mjs +0 -152
- package/esm2022/lib/services/config.mjs +0 -29
- package/esm2022/lib/services/event.service.mjs +0 -34
- package/esm2022/lib/services/navigator.service.mjs +0 -10
- package/esm2022/lib/services/storage.service.mjs +0 -16
- package/esm2022/lib/translator/translator.mjs +0 -26
- package/esm2022/lib/translator/translator.module.mjs +0 -25
- package/esm2022/lib/translator/translator.pipe.mjs +0 -24
- package/esm2022/lib/translator/translator.service.mjs +0 -21
- package/esm2022/lib/utils/array/array-util.mjs +0 -133
- package/esm2022/lib/utils/html/html-util.mjs +0 -200
- package/esm2022/lib/utils/html/html.module.mjs +0 -19
- package/esm2022/lib/utils/math/math-util.mjs +0 -6
- package/esm2022/lib/utils/object/object-util.mjs +0 -83
- package/esm2022/lib/utils/render/on-demand-preload-strategy.service.mjs +0 -21
- package/esm2022/lib/utils/render/render.service.mjs +0 -109
- package/esm2022/lib/utils/render/rendering.module.mjs +0 -35
- package/esm2022/lib/utils/scroll/scroll.directive.mjs +0 -56
- package/esm2022/lib/utils/scroll/scroll.module.mjs +0 -19
- package/esm2022/lib/utils/separator/separator.module.mjs +0 -19
- package/esm2022/lib/utils/separator/separator.pipe.mjs +0 -33
- package/lib/classes/base-page.class.d.ts +0 -13
- package/lib/classes/color.class.d.ts +0 -17
- package/lib/classes/datetime.class.d.ts +0 -63
- package/lib/classes/menu.class.d.ts +0 -34
- package/lib/classes/navigator.class.d.ts +0 -5
- package/lib/classes/popup.class.d.ts +0 -12
- package/lib/classes/promise.class.d.ts +0 -7
- package/lib/classes/sectionlist.class.d.ts +0 -8
- package/lib/classes/select.class.d.ts +0 -7
- package/lib/core.module.d.ts +0 -9
- package/lib/error/error.class.d.ts +0 -4
- package/lib/error/error.module.d.ts +0 -7
- package/lib/error/error.service.d.ts +0 -13
- package/lib/events/keyboard.d.ts +0 -2
- package/lib/http/http-error.class.d.ts +0 -7
- package/lib/http/http-events.interceptor.d.ts +0 -10
- package/lib/http/http-request.class.d.ts +0 -14
- package/lib/http/http-result.class.d.ts +0 -11
- package/lib/http/http.module.d.ts +0 -10
- package/lib/http/http.service.d.ts +0 -23
- package/lib/pipe/datetime.pipe.d.ts +0 -8
- package/lib/pipe/htmlToText.pipe.d.ts +0 -7
- package/lib/platform/index.d.ts +0 -1
- package/lib/services/config.d.ts +0 -9
- package/lib/services/navigator.service.d.ts +0 -8
- package/lib/services/storage.service.d.ts +0 -7
- package/lib/translator/translator.d.ts +0 -9
- package/lib/translator/translator.module.d.ts +0 -8
- package/lib/translator/translator.pipe.d.ts +0 -8
- package/lib/translator/translator.service.d.ts +0 -8
- package/lib/utils/array/array-util.d.ts +0 -6
- package/lib/utils/html/html-util.d.ts +0 -62
- package/lib/utils/html/html.module.d.ts +0 -8
- package/lib/utils/math/math-util.d.ts +0 -3
- package/lib/utils/object/object-util.d.ts +0 -7
- package/lib/utils/render/on-demand-preload-strategy.service.d.ts +0 -10
- package/lib/utils/render/render.service.d.ts +0 -18
- package/lib/utils/render/rendering.module.d.ts +0 -8
- package/lib/utils/scroll/scroll.directive.d.ts +0 -18
- package/lib/utils/scroll/scroll.module.d.ts +0 -8
- package/lib/utils/separator/separator.module.d.ts +0 -8
- package/lib/utils/separator/separator.pipe.d.ts +0 -8
package/common/README.md
ADDED
package/config/README.md
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Injector } from '@angular/core';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class AXConfigService {
|
4
|
+
private injector;
|
5
|
+
/**
|
6
|
+
* @ignore
|
7
|
+
*/
|
8
|
+
constructor(injector: Injector);
|
9
|
+
get<T = string>(key: string, defaultValue?: T): T;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXConfigService, never>;
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXConfigService>;
|
12
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export * from './lib/formatters/datetime-formatter';
|
2
|
+
export * from './lib/formatters/timeleft-formatter';
|
3
|
+
export * from './lib/calendar.service';
|
4
|
+
export * from './lib/dateTime.config';
|
5
|
+
export * from './lib/datetime.class';
|
6
|
+
export * from './lib/datetime.module';
|
7
|
+
export * from './lib/datetime.pipe';
|
8
|
+
export * from './lib/georgian.calendar';
|
9
|
+
export * from './lib/holidays.loader';
|
10
|
+
export * from './lib/jalali.calendar';
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import { Subject } from 'rxjs';
|
2
|
+
import { AXCalendar, AXDateTime, AXDateValue } from './datetime.class';
|
3
|
+
import { AXHolidayDate, AXHolidaysLoaderOptions } from './holidays.loader';
|
4
|
+
import * as i0 from "@angular/core";
|
5
|
+
export declare class AXCalendarService {
|
6
|
+
private config;
|
7
|
+
private _holidaysLoader;
|
8
|
+
private eventService;
|
9
|
+
get calendar(): AXCalendar;
|
10
|
+
private activeCalendar;
|
11
|
+
calendarChanges$: import("rxjs").Observable<AXCalendar>;
|
12
|
+
getDefaultCalendar(): AXCalendar;
|
13
|
+
getActiveCalendar(): AXCalendar;
|
14
|
+
setActiveCalendar(name: string): void;
|
15
|
+
onHolidaysChanged: Subject<AXHolidayDate[]>;
|
16
|
+
private _holidays;
|
17
|
+
get holidays(): AXHolidayDate[];
|
18
|
+
constructor();
|
19
|
+
loadHolidays(options?: AXHolidaysLoaderOptions): Promise<void>;
|
20
|
+
create(value: AXDateValue, calendarName?: string): AXDateTime;
|
21
|
+
create(value: Date, calendarName?: string): AXDateTime;
|
22
|
+
now(calendarName?: string): AXDateTime;
|
23
|
+
resolveCalendar(name: string): AXCalendar;
|
24
|
+
convert(value: Date | AXDateTime | string, calendarName?: string): AXDateTime;
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarService, never>;
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXCalendarService>;
|
27
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
import { AXCalendar } from './datetime.class';
|
3
|
+
export interface AXDateTimeConfig {
|
4
|
+
calendar: string;
|
5
|
+
calendars: {
|
6
|
+
[key: string]: AXCalendar;
|
7
|
+
};
|
8
|
+
}
|
9
|
+
export declare const AX_DATETIME_CONFIG: InjectionToken<AXDateTimeConfig>;
|
10
|
+
export declare const AXDateTimeDefaultConfig: AXDateTimeConfig;
|
11
|
+
export type PartialDateTimeConfig = Partial<AXDateTimeConfig>;
|
12
|
+
export declare function dateTimeConfig(config?: PartialDateTimeConfig): AXDateTimeConfig;
|
@@ -0,0 +1,138 @@
|
|
1
|
+
export type TimeUnit = 'ms' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'week';
|
2
|
+
export interface AXDateValue {
|
3
|
+
year: number;
|
4
|
+
month: number;
|
5
|
+
date: number;
|
6
|
+
hours?: number;
|
7
|
+
minutes?: number;
|
8
|
+
seconds?: number;
|
9
|
+
ms?: number;
|
10
|
+
}
|
11
|
+
export interface AXDateTimeDisplayFormats {
|
12
|
+
dateInput: string;
|
13
|
+
timeInput: string;
|
14
|
+
dateTimeInput: string;
|
15
|
+
dateDisplay: string;
|
16
|
+
timeDisplay: string;
|
17
|
+
dateTimeDisplay: string;
|
18
|
+
}
|
19
|
+
export type AXDateTimeUnitNames = {
|
20
|
+
long: string;
|
21
|
+
short: string;
|
22
|
+
letter: string;
|
23
|
+
}[];
|
24
|
+
export type AXDateTimePart = {
|
25
|
+
key: string;
|
26
|
+
placeholder: string;
|
27
|
+
placeholders: string[];
|
28
|
+
typedValue?: string | null;
|
29
|
+
default: number;
|
30
|
+
enabled: boolean;
|
31
|
+
realValue: () => string;
|
32
|
+
};
|
33
|
+
export type AXDateTimeParts = {
|
34
|
+
year: AXDateTimePart;
|
35
|
+
month: AXDateTimePart;
|
36
|
+
day: AXDateTimePart;
|
37
|
+
hour: AXDateTimePart;
|
38
|
+
minute: AXDateTimePart;
|
39
|
+
second: AXDateTimePart;
|
40
|
+
};
|
41
|
+
export interface AXCalendarConfig {
|
42
|
+
weekdays: number[];
|
43
|
+
weekend: number[];
|
44
|
+
formats: AXDateTimeDisplayFormats;
|
45
|
+
}
|
46
|
+
export declare abstract class AXCalendar {
|
47
|
+
private _config;
|
48
|
+
/**
|
49
|
+
* @ignore
|
50
|
+
*/
|
51
|
+
constructor(config: AXCalendarConfig);
|
52
|
+
get weekend(): number[];
|
53
|
+
get formats(): AXDateTimeDisplayFormats;
|
54
|
+
get weekdays(): number[];
|
55
|
+
abstract name(): string;
|
56
|
+
abstract dayOfMonth(date: Date): number;
|
57
|
+
abstract dayOfYear(date: Date): number;
|
58
|
+
abstract dayOfWeek(date: Date): number;
|
59
|
+
abstract monthOfYear(date: Date): number;
|
60
|
+
abstract weekOfYear(date: Date): number;
|
61
|
+
abstract year(date: Date): number;
|
62
|
+
abstract add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
|
63
|
+
abstract set(date: Date, unit: TimeUnit, value: number): AXDateTime;
|
64
|
+
abstract startOf(date: Date, unit: TimeUnit): AXDateTime;
|
65
|
+
abstract endOf(date: Date, unit: TimeUnit): AXDateTime;
|
66
|
+
abstract create(value: AXDateValue): AXDateTime;
|
67
|
+
abstract parse(value: string): AXDateTime;
|
68
|
+
}
|
69
|
+
export declare class AXDateTime {
|
70
|
+
private _date;
|
71
|
+
get date(): Date;
|
72
|
+
private _calendar;
|
73
|
+
get calendar(): AXCalendar;
|
74
|
+
constructor(value: Date, calendar: AXCalendar);
|
75
|
+
clone(): AXDateTime;
|
76
|
+
get dayOfMonth(): number;
|
77
|
+
get dayOfYear(): number;
|
78
|
+
get dayOfWeek(): number;
|
79
|
+
get hour(): number;
|
80
|
+
get minute(): number;
|
81
|
+
get second(): number;
|
82
|
+
get year(): number;
|
83
|
+
get monthOfYear(): number;
|
84
|
+
get weekOfYear(): number;
|
85
|
+
get month(): AXCalendarMonth;
|
86
|
+
add(unit: TimeUnit, amount: number): AXDateTime;
|
87
|
+
set(unit: TimeUnit, value: number): AXDateTime;
|
88
|
+
duration(end: Date | AXDateTime): AXTimeSpan;
|
89
|
+
startOf(unit?: TimeUnit): AXDateTime;
|
90
|
+
endOf(unit?: TimeUnit): AXDateTime;
|
91
|
+
private _formatKeys;
|
92
|
+
protected _language: () => string;
|
93
|
+
format(format?: string, options?: {
|
94
|
+
locale?: string;
|
95
|
+
}): string;
|
96
|
+
getDateTimeFormatByLocale(locale: string, style: 'shortDate' | 'longDate' | 'shortTime' | 'longTime'): string;
|
97
|
+
private pad;
|
98
|
+
equal(value: Date | AXDateTime, unit?: TimeUnit): boolean;
|
99
|
+
compare(value: Date | AXDateTime, unit?: TimeUnit): number;
|
100
|
+
}
|
101
|
+
export declare class AXCalendarMonth {
|
102
|
+
private _range;
|
103
|
+
get range(): AXDateTimeRange;
|
104
|
+
set range(v: AXDateTimeRange);
|
105
|
+
get totalDays(): number;
|
106
|
+
constructor(date: AXDateTime);
|
107
|
+
private readonly index;
|
108
|
+
private readonly name;
|
109
|
+
}
|
110
|
+
export interface AXTimeSpanTotal {
|
111
|
+
miliseconds: number;
|
112
|
+
seconds: number;
|
113
|
+
minutes: number;
|
114
|
+
hours: number;
|
115
|
+
days: number;
|
116
|
+
weeks: number;
|
117
|
+
months: number;
|
118
|
+
years: number;
|
119
|
+
}
|
120
|
+
export interface AXTimeSpan {
|
121
|
+
miliseconds: number;
|
122
|
+
seconds: number;
|
123
|
+
minutes: number;
|
124
|
+
hours: number;
|
125
|
+
days: number;
|
126
|
+
months: number;
|
127
|
+
years: number;
|
128
|
+
total: AXTimeSpanTotal;
|
129
|
+
}
|
130
|
+
export declare class AXDateTimeRange {
|
131
|
+
private _startTime;
|
132
|
+
private _endTime;
|
133
|
+
get startTime(): AXDateTime;
|
134
|
+
get endTime(): AXDateTime;
|
135
|
+
constructor(startTime: AXDateTime, endTime: AXDateTime);
|
136
|
+
duration(): AXTimeSpan;
|
137
|
+
enumurate(unit?: TimeUnit, amount?: number): AXDateTime[];
|
138
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./datetime.pipe";
|
3
|
+
import * as i2 from "@acorex/core/format";
|
4
|
+
export declare class AXDateTimeModule {
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimeModule, never>;
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXDateTimeModule, [typeof i1.AXDateTimePipe], [typeof i2.AXFormatModule], [typeof i1.AXDateTimePipe]>;
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXDateTimeModule>;
|
8
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import { AXDateTime } from './datetime.class';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
/**
|
5
|
+
* @deprecated The pipe should not be used, use format instead
|
6
|
+
*/
|
7
|
+
export declare class AXDateTimePipe implements PipeTransform {
|
8
|
+
private _calendarService;
|
9
|
+
transform(value: Date | AXDateTime | string, format?: string, calendarName?: string): string;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimePipe, never>;
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXDateTimePipe, "axDate", false>;
|
12
|
+
}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export interface AXDateTimeFormatterOptions extends AXFormatOptions {
|
4
|
+
format?: string;
|
5
|
+
calendar?: string;
|
6
|
+
locale?: string;
|
7
|
+
}
|
8
|
+
declare module '@acorex/core/format' {
|
9
|
+
interface AXFormatOptionsMap {
|
10
|
+
datetime: AXDateTimeFormatterOptions;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
export declare class AXDateTimeFormatter implements AXFormatter {
|
14
|
+
private calendarService;
|
15
|
+
get name(): string;
|
16
|
+
format(value: unknown, options?: AXDateTimeFormatterOptions | string): string;
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimeFormatter, never>;
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXDateTimeFormatter>;
|
19
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export interface AXTimeLeftFormatterOptions extends AXFormatOptions {
|
4
|
+
format: string;
|
5
|
+
}
|
6
|
+
declare module '@acorex/core/format' {
|
7
|
+
interface AXFormatOptionsMap {
|
8
|
+
timeleft: AXTimeLeftFormatterOptions;
|
9
|
+
}
|
10
|
+
}
|
11
|
+
export declare class AXTimeLeftFormatter implements AXFormatter {
|
12
|
+
get name(): string;
|
13
|
+
format(value: number | string, options?: AXTimeLeftFormatterOptions): string;
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLeftFormatter, never>;
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXTimeLeftFormatter>;
|
16
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';
|
2
|
+
export declare class GeorgianCalendar extends AXCalendar {
|
3
|
+
/**
|
4
|
+
* @ignore
|
5
|
+
*/
|
6
|
+
constructor(config: AXCalendarConfig);
|
7
|
+
create(value: AXDateValue): AXDateTime;
|
8
|
+
name(): string;
|
9
|
+
dayOfMonth(date: Date): number;
|
10
|
+
dayOfYear(date: Date): number;
|
11
|
+
dayOfWeek(date: Date): number;
|
12
|
+
weekOfYear(date: Date): number;
|
13
|
+
year(date: Date): number;
|
14
|
+
monthOfYear(date: Date): number;
|
15
|
+
add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
|
16
|
+
set(date: Date, unit: TimeUnit, value: number): AXDateTime;
|
17
|
+
startOf(date: Date, unit: TimeUnit): AXDateTime;
|
18
|
+
endOf(date: Date, unit: TimeUnit): AXDateTime;
|
19
|
+
isLeap(date: Date): boolean;
|
20
|
+
parse(value: string): AXDateTime;
|
21
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
export interface AXHolidayDate {
|
3
|
+
date: Date;
|
4
|
+
title: string;
|
5
|
+
description?: string;
|
6
|
+
[key: string]: unknown;
|
7
|
+
}
|
8
|
+
export interface AXHolidaysLoaderOptions {
|
9
|
+
calendar?: string;
|
10
|
+
range?: {
|
11
|
+
start: Date;
|
12
|
+
end: Date;
|
13
|
+
};
|
14
|
+
}
|
15
|
+
export interface AXHolidaysLoader {
|
16
|
+
getHolidays(options?: AXHolidaysLoaderOptions): Promise<AXHolidayDate[]>;
|
17
|
+
}
|
18
|
+
export declare class AXHolidaysLoaderDefault implements AXHolidaysLoader {
|
19
|
+
getHolidays(options?: AXHolidaysLoaderOptions | undefined): Promise<AXHolidayDate[]>;
|
20
|
+
}
|
21
|
+
export declare const AX_DATETIME_HOLIDAYS_LOADER: InjectionToken<AXHolidaysLoader>;
|
@@ -0,0 +1,40 @@
|
|
1
|
+
import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';
|
2
|
+
export declare class JalaliCalendar extends AXCalendar {
|
3
|
+
/**
|
4
|
+
* @ignore
|
5
|
+
*/
|
6
|
+
constructor(config: AXCalendarConfig);
|
7
|
+
private breaks;
|
8
|
+
create(value: AXDateValue): AXDateTime;
|
9
|
+
name(): string;
|
10
|
+
dayOfMonth(date: Date): number;
|
11
|
+
dayOfYear(date: Date): number;
|
12
|
+
dayOfWeek(date: Date): number;
|
13
|
+
weekOfYear(date: Date): number;
|
14
|
+
year(date: Date): number;
|
15
|
+
monthOfYear(date: Date): number;
|
16
|
+
add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
|
17
|
+
set(date: Date, unit: TimeUnit, value: number): AXDateTime;
|
18
|
+
startOf(date: Date, unit: TimeUnit): AXDateTime;
|
19
|
+
endOf(date: Date, unit: TimeUnit): AXDateTime;
|
20
|
+
parse(value: string): AXDateTime;
|
21
|
+
toJalaali(date: Date): {
|
22
|
+
year: number;
|
23
|
+
month: number;
|
24
|
+
day: number;
|
25
|
+
};
|
26
|
+
toGregorian(jy: any, jm: any, jd: any): Date;
|
27
|
+
isValidJalaaliDate(jy: any, jm: any, jd: any): boolean;
|
28
|
+
isLeapJalaaliYear(jy: any): boolean;
|
29
|
+
jalaaliMonthLength(jy: any, jm: any): 31 | 30 | 29;
|
30
|
+
private jalCalLeap;
|
31
|
+
private jalCal;
|
32
|
+
private j2d;
|
33
|
+
private d2j;
|
34
|
+
private g2d;
|
35
|
+
private d2g;
|
36
|
+
private jalaaliWeek;
|
37
|
+
private jalaaliToDateObject;
|
38
|
+
private div;
|
39
|
+
private mod;
|
40
|
+
}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/**
|
2
|
+
* Generated bundle index. Do not edit.
|
3
|
+
*/
|
4
|
+
export * from './index';
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2NvbW1vbi9zcmMvYWNvcmV4LWNvcmUtY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
|