@acorex/core 19.15.0-next.9 → 20.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.
Files changed (140) hide show
  1. package/components/index.d.ts +23 -2
  2. package/config/index.d.ts +18 -2
  3. package/constants/index.d.ts +19 -2
  4. package/date-time/index.d.ts +341 -11
  5. package/events/index.d.ts +21 -1
  6. package/fesm2022/acorex-core-components.mjs +3 -3
  7. package/fesm2022/acorex-core-components.mjs.map +1 -1
  8. package/fesm2022/acorex-core-config.mjs +7 -10
  9. package/fesm2022/acorex-core-config.mjs.map +1 -1
  10. package/fesm2022/acorex-core-constants.mjs.map +1 -1
  11. package/fesm2022/acorex-core-date-time.mjs +27 -27
  12. package/fesm2022/acorex-core-date-time.mjs.map +1 -1
  13. package/fesm2022/acorex-core-events.mjs +3 -3
  14. package/fesm2022/acorex-core-events.mjs.map +1 -1
  15. package/fesm2022/acorex-core-file.mjs +11 -12
  16. package/fesm2022/acorex-core-file.mjs.map +1 -1
  17. package/fesm2022/acorex-core-format.mjs +34 -36
  18. package/fesm2022/acorex-core-format.mjs.map +1 -1
  19. package/fesm2022/acorex-core-icon.mjs +51 -0
  20. package/fesm2022/acorex-core-icon.mjs.map +1 -0
  21. package/fesm2022/acorex-core-image.mjs +4 -5
  22. package/fesm2022/acorex-core-image.mjs.map +1 -1
  23. package/fesm2022/acorex-core-locale-en-AU.profile-DNjKIaZS.mjs.map +1 -1
  24. package/fesm2022/acorex-core-locale.mjs +10 -10
  25. package/fesm2022/acorex-core-locale.mjs.map +1 -1
  26. package/fesm2022/acorex-core-memoize.mjs.map +1 -1
  27. package/fesm2022/acorex-core-network.mjs +3 -3
  28. package/fesm2022/acorex-core-network.mjs.map +1 -1
  29. package/fesm2022/acorex-core-pipes.mjs +8 -8
  30. package/fesm2022/acorex-core-pipes.mjs.map +1 -1
  31. package/fesm2022/acorex-core-platform.mjs +24 -8
  32. package/fesm2022/acorex-core-platform.mjs.map +1 -1
  33. package/fesm2022/acorex-core-storage.mjs +14 -17
  34. package/fesm2022/acorex-core-storage.mjs.map +1 -1
  35. package/fesm2022/acorex-core-translation.mjs +22 -22
  36. package/fesm2022/acorex-core-translation.mjs.map +1 -1
  37. package/fesm2022/acorex-core-utils.mjs +3 -3
  38. package/fesm2022/acorex-core-utils.mjs.map +1 -1
  39. package/fesm2022/acorex-core-validation.mjs +55 -57
  40. package/fesm2022/acorex-core-validation.mjs.map +1 -1
  41. package/fesm2022/acorex-core.mjs.map +1 -1
  42. package/file/index.d.ts +42 -3
  43. package/format/index.d.ts +122 -8
  44. package/icon/README.md +3 -0
  45. package/icon/index.d.ts +20 -0
  46. package/image/index.d.ts +16 -1
  47. package/index.d.ts +3 -1
  48. package/locale/index.d.ts +135 -8
  49. package/memoize/index.d.ts +3 -1
  50. package/network/index.d.ts +69 -4
  51. package/package.json +22 -18
  52. package/pipes/index.d.ts +12 -1
  53. package/platform/index.d.ts +82 -1
  54. package/storage/index.d.ts +145 -4
  55. package/translation/index.d.ts +109 -8
  56. package/utils/index.d.ts +118 -6
  57. package/validation/index.d.ts +249 -14
  58. package/components/lib/component.service.d.ts +0 -11
  59. package/components/lib/component.types.d.ts +0 -9
  60. package/config/lib/configs.d.ts +0 -6
  61. package/config/lib/configs.service.d.ts +0 -12
  62. package/constants/countries/countries.data.d.ts +0 -3
  63. package/constants/countries/country.d.ts +0 -13
  64. package/date-time/lib/calendar.service.d.ts +0 -34
  65. package/date-time/lib/dateTime.config.d.ts +0 -12
  66. package/date-time/lib/datetime.module.d.ts +0 -8
  67. package/date-time/lib/datetime.pipe.d.ts +0 -13
  68. package/date-time/lib/datetime.types.d.ts +0 -138
  69. package/date-time/lib/formatters/date.formatter.d.ts +0 -12
  70. package/date-time/lib/formatters/datetime.formatter.d.ts +0 -21
  71. package/date-time/lib/formatters/time-duration.formatter.d.ts +0 -21
  72. package/date-time/lib/formatters/time.formatter.d.ts +0 -12
  73. package/date-time/lib/formatters/timeleft.formatter.d.ts +0 -16
  74. package/date-time/lib/gregorian.calendar.d.ts +0 -21
  75. package/date-time/lib/holidays.loader.d.ts +0 -21
  76. package/date-time/lib/solar-hijri.calendar.d.ts +0 -40
  77. package/events/lib/event.service.d.ts +0 -17
  78. package/file/lib/file-size-formatter.d.ts +0 -16
  79. package/file/lib/file.module.d.ts +0 -7
  80. package/file/lib/file.service.d.ts +0 -15
  81. package/format/lib/format.config.d.ts +0 -5
  82. package/format/lib/format.directive.d.ts +0 -12
  83. package/format/lib/format.module.d.ts +0 -19
  84. package/format/lib/format.pipe.d.ts +0 -12
  85. package/format/lib/format.service.d.ts +0 -44
  86. package/format/lib/format.types.d.ts +0 -4
  87. package/format/lib/formatters/number.formatter.d.ts +0 -23
  88. package/format/lib/formatters/string.formatter.d.ts +0 -14
  89. package/image/lib/image.service.d.ts +0 -13
  90. package/locale/lib/formatters/currency.formatter.d.ts +0 -10
  91. package/locale/lib/locale-profile-provider.service.d.ts +0 -24
  92. package/locale/lib/locale.config.d.ts +0 -5
  93. package/locale/lib/locale.module.d.ts +0 -7
  94. package/locale/lib/locale.service.d.ts +0 -20
  95. package/locale/lib/locale.types.d.ts +0 -61
  96. package/locale/lib/profiles/en-AU.profile.d.ts +0 -2
  97. package/locale/lib/profiles/en-US.profile.d.ts +0 -2
  98. package/locale/lib/profiles/fa-IR.profile.d.ts +0 -2
  99. package/memoize/lib/memoize.decorator.d.ts +0 -1
  100. package/network/lib/download-task.d.ts +0 -11
  101. package/network/lib/network.service.d.ts +0 -16
  102. package/network/lib/network.types.d.ts +0 -28
  103. package/network/lib/upload-task.d.ts +0 -14
  104. package/pipes/lib/safe/safe.pipe.d.ts +0 -10
  105. package/platform/lib/platform.service.d.ts +0 -77
  106. package/storage/cookie-storage.service.d.ts +0 -104
  107. package/storage/local-storage.service.d.ts +0 -16
  108. package/storage/session-storage.service.d.ts +0 -10
  109. package/storage/storage.interface.d.ts +0 -14
  110. package/translation/lib/translation-loader.service.d.ts +0 -20
  111. package/translation/lib/translation-scope.resolver.d.ts +0 -2
  112. package/translation/lib/translation.config.d.ts +0 -27
  113. package/translation/lib/translation.loader.d.ts +0 -14
  114. package/translation/lib/translation.module.d.ts +0 -8
  115. package/translation/lib/translation.parser.d.ts +0 -7
  116. package/translation/lib/translation.resolver.d.ts +0 -9
  117. package/translation/lib/translation.service.d.ts +0 -25
  118. package/translation/lib/translation.types.d.ts +0 -16
  119. package/translation/lib/translator.directive.d.ts +0 -12
  120. package/translation/lib/translator.pipe.d.ts +0 -10
  121. package/utils/lib/color.utils.d.ts +0 -26
  122. package/utils/lib/drawing.utils.d.ts +0 -18
  123. package/utils/lib/execution.utils.d.ts +0 -33
  124. package/utils/lib/html-utils.d.ts +0 -15
  125. package/utils/lib/lifecycle-helpers.utils.d.ts +0 -12
  126. package/utils/lib/string.utils.d.ts +0 -4
  127. package/validation/lib/rules/between-rule.d.ts +0 -18
  128. package/validation/lib/rules/callback-rule.d.ts +0 -24
  129. package/validation/lib/rules/equal-rule.d.ts +0 -17
  130. package/validation/lib/rules/greater-than.d.ts +0 -17
  131. package/validation/lib/rules/length-rule.d.ts +0 -17
  132. package/validation/lib/rules/less-than-rule.d.ts +0 -17
  133. package/validation/lib/rules/maxlength-rule.d.ts +0 -16
  134. package/validation/lib/rules/minlength-rule.d.ts +0 -16
  135. package/validation/lib/rules/regex-rule.d.ts +0 -17
  136. package/validation/lib/rules/required-rule.d.ts +0 -16
  137. package/validation/lib/validation.config.d.ts +0 -15
  138. package/validation/lib/validation.module.d.ts +0 -17
  139. package/validation/lib/validation.service.d.ts +0 -35
  140. package/validation/lib/validation.types.d.ts +0 -21
package/file/index.d.ts CHANGED
@@ -1,3 +1,42 @@
1
- export * from './lib/file-size-formatter';
2
- export * from './lib/file.module';
3
- export * from './lib/file.service';
1
+ import * as i1 from '@acorex/core/format';
2
+ import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
3
+ import * as i0 from '@angular/core';
4
+
5
+ interface AXFileSizeFormatterOptions extends AXFormatOptions {
6
+ format: string;
7
+ }
8
+ declare module '@acorex/core/format' {
9
+ interface AXFormatOptionsMap {
10
+ filesize: AXFileSizeFormatterOptions;
11
+ }
12
+ }
13
+ declare class AXFileSizeFormatter implements AXFormatter {
14
+ get name(): string;
15
+ format(value: number): string;
16
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFileSizeFormatter, never>;
17
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXFileSizeFormatter>;
18
+ }
19
+
20
+ declare class AXFileModule {
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFileModule, never>;
22
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXFileModule, never, [typeof i1.AXFormatModule], never>;
23
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXFileModule>;
24
+ }
25
+
26
+ declare class AXFileService {
27
+ private document;
28
+ private platformID;
29
+ choose(options?: {
30
+ accept?: string;
31
+ multiple?: boolean;
32
+ }): Promise<File[]>;
33
+ blobToBase64: (blob: Blob) => Promise<string>;
34
+ getSize(file: File | Blob | string): number | false;
35
+ isBase64(base64: string): boolean;
36
+ getBase64Size(base64: string): number;
37
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFileService, never>;
38
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXFileService>;
39
+ }
40
+
41
+ export { AXFileModule, AXFileService, AXFileSizeFormatter };
42
+ export type { AXFileSizeFormatterOptions };
package/format/index.d.ts CHANGED
@@ -1,8 +1,122 @@
1
- export * from './lib/format.config';
2
- export * from './lib/format.directive';
3
- export * from './lib/format.module';
4
- export * from './lib/format.pipe';
5
- export * from './lib/format.service';
6
- export * from './lib/format.types';
7
- export * from './lib/formatters/number.formatter';
8
- export * from './lib/formatters/string.formatter';
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, PipeTransform, ModuleWithProviders } from '@angular/core';
3
+ import * as rxjs from 'rxjs';
4
+ import { Observable } from 'rxjs';
5
+
6
+ interface AXFormatOptions {
7
+ }
8
+ interface AXFormatOptionsMap {
9
+ }
10
+
11
+ declare abstract class AXFormatter {
12
+ abstract get name(): string;
13
+ abstract format(value: unknown, options?: AXFormatOptions | string): string;
14
+ }
15
+
16
+ declare class AXFormatterDirective implements OnInit {
17
+ private templateRef;
18
+ private viewContainer;
19
+ private formatService;
20
+ ngOnInit(): void;
21
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatterDirective, never>;
22
+ static ɵdir: i0.ɵɵDirectiveDeclaration<AXFormatterDirective, "[formatter]", never, {}, {}, never, never, true, never>;
23
+ }
24
+
25
+ declare class AXFormatPipe implements PipeTransform {
26
+ private formatService;
27
+ private eventService;
28
+ private triggers;
29
+ transform(value: unknown, name: string, options?: AXFormatOptions | string): Observable<string>;
30
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatPipe, never>;
31
+ static ɵpipe: i0.ɵɵPipeDeclaration<AXFormatPipe, "format", true>;
32
+ }
33
+
34
+ interface AXFormatModuleConfigs {
35
+ formatters: (new () => AXFormatter)[];
36
+ }
37
+ declare class AXFormatModule {
38
+ static forRoot(configs?: AXFormatModuleConfigs): ModuleWithProviders<AXFormatModule>;
39
+ static forChild(configs?: AXFormatModuleConfigs): ModuleWithProviders<AXFormatModule>;
40
+ /**
41
+ * @ignore
42
+ */
43
+ constructor();
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatModule, never>;
45
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXFormatModule, never, [typeof AXFormatterDirective, typeof AXFormatPipe], [typeof AXFormatterDirective, typeof AXFormatPipe]>;
46
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXFormatModule>;
47
+ }
48
+
49
+ declare class AXFormatterRegistryService {
50
+ private plugins;
51
+ private injector;
52
+ register(...plugins: (new () => AXFormatter)[]): void;
53
+ get formatters(): AXFormatter[];
54
+ /**
55
+ * Resolves a formatter by its name.
56
+ * @param name The name of the formatter.
57
+ * @returns The formatter if found, otherwise throws an error.
58
+ */
59
+ get(name: string): AXFormatter;
60
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatterRegistryService, never>;
61
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXFormatterRegistryService>;
62
+ }
63
+ declare class AXFormatService {
64
+ private pluginRegistry;
65
+ private renderSubject;
66
+ onRender: rxjs.Observable<void>;
67
+ render(): void;
68
+ format(value: unknown, formatter: string, options?: any): string;
69
+ format(value: unknown): AXFormatFluent;
70
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXFormatService, never>;
71
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXFormatService>;
72
+ }
73
+ declare class AXFormatFluent {
74
+ private formatService;
75
+ private pluginRegistry;
76
+ private initialValue;
77
+ constructor(formatService: AXFormatService, pluginRegistry: AXFormatterRegistryService, initialValue: unknown);
78
+ /**
79
+ * Formats the value using the specified formatter and options.
80
+ * @param formatter The name of the formatter to use.
81
+ * @param options The options to pass to the formatter.
82
+ * @returns The formatted string.
83
+ */
84
+ to<K extends keyof AXFormatOptionsMap>(formatter: K, options?: AXFormatOptionsMap[K]): string;
85
+ }
86
+
87
+ interface AXNumberFormatterOptions extends AXFormatOptions {
88
+ decimalPlaces?: number;
89
+ thousandSeparator?: string;
90
+ decimalSeparator?: string;
91
+ zeroPadLength?: number;
92
+ locale?: string;
93
+ }
94
+ declare module '../format.types' {
95
+ interface AXFormatOptionsMap {
96
+ number: AXNumberFormatterOptions;
97
+ }
98
+ }
99
+ declare class AXNumberFormatter implements AXFormatter {
100
+ private separatorsCache;
101
+ get name(): string;
102
+ format(value: number, options: AXNumberFormatterOptions): string;
103
+ private getLocaleSeparators;
104
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXNumberFormatter, never>;
105
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXNumberFormatter>;
106
+ }
107
+
108
+ interface AXStringFormatterOptions extends AXFormatOptions {
109
+ [key: string]: any;
110
+ }
111
+ declare module '../format.types' {
112
+ interface AXFormatOptionsMap {
113
+ string: AXStringFormatterOptions;
114
+ }
115
+ }
116
+ declare class AXStringFormatter implements AXFormatter {
117
+ get name(): string;
118
+ format(value: unknown, options: AXStringFormatterOptions): string;
119
+ }
120
+
121
+ export { AXFormatModule, AXFormatPipe, AXFormatService, AXFormatter, AXFormatterDirective, AXFormatterRegistryService, AXNumberFormatter, AXStringFormatter };
122
+ export type { AXFormatModuleConfigs, AXFormatOptions, AXFormatOptionsMap, AXNumberFormatterOptions, AXStringFormatterOptions };
package/icon/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # @acorex/core/components
2
+
3
+ Secondary entry point of `@acorex/core`. It can be used by importing from `@acorex/core/components`.
@@ -0,0 +1,20 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken } from '@angular/core';
3
+
4
+ declare class AXIconResolverService {
5
+ private resolvers;
6
+ private cache;
7
+ resolve(icon: string): Promise<string>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXIconResolverService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXIconResolverService>;
10
+ }
11
+
12
+ declare abstract class AXIconResolver {
13
+ abstract resolve(icon: string): Promise<string | null>;
14
+ }
15
+ declare const AXP_ICON_RESOLVER: InjectionToken<AXIconResolver | AXIconResolver[]>;
16
+ declare class AXIconResolverDefault extends AXIconResolver {
17
+ resolve(icon: string): Promise<string | null>;
18
+ }
19
+
20
+ export { AXIconResolver, AXIconResolverDefault, AXIconResolverService, AXP_ICON_RESOLVER };
package/image/index.d.ts CHANGED
@@ -1 +1,16 @@
1
- export * from './lib/image.service';
1
+ import * as i0 from '@angular/core';
2
+
3
+ declare class AXImageService {
4
+ private document;
5
+ private platformID;
6
+ resize(options: {
7
+ maxSize: number;
8
+ source: HTMLImageElement | File;
9
+ type?: 'image/png' | 'image/jpeg' | 'image/webp';
10
+ quality?: number;
11
+ }): Promise<Blob>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXImageService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXImageService>;
14
+ }
15
+
16
+ export { AXImageService };
package/index.d.ts CHANGED
@@ -1 +1,3 @@
1
- export declare const AX_CORE = "ACOREX_CORE";
1
+ declare const AX_CORE = "ACOREX_CORE";
2
+
3
+ export { AX_CORE };
package/locale/index.d.ts CHANGED
@@ -1,8 +1,135 @@
1
- export * from './lib/formatters/currency.formatter';
2
- export * from './lib/locale-profile-provider.service';
3
- export * from './lib/locale.config';
4
- export * from './lib/locale.module';
5
- export * from './lib/locale.service';
6
- export * from './lib/locale.types';
7
- export * from './lib/profiles/en-US.profile';
8
- export * from './lib/profiles/fa-IR.profile';
1
+ import * as i1 from '@acorex/core/format';
2
+ import { AXFormatOptions } from '@acorex/core/format';
3
+ import * as i0 from '@angular/core';
4
+ import { InjectionToken } from '@angular/core';
5
+ import * as rxjs from 'rxjs';
6
+
7
+ interface AXCurrencyFormatterOptions extends AXFormatOptions {
8
+ locale?: string;
9
+ currency?: string;
10
+ }
11
+ declare module '@acorex/core/format' {
12
+ interface AXFormatOptionsMap {
13
+ currency: AXCurrencyFormatterOptions;
14
+ }
15
+ }
16
+
17
+ interface AXLocaleProfile {
18
+ localeInfo: {
19
+ code: string;
20
+ language: string;
21
+ region: string;
22
+ timezone: string;
23
+ };
24
+ calendar: {
25
+ system: 'gregorian' | 'solar-hijri' | string;
26
+ week: {
27
+ startsOn: number;
28
+ weekends: number[];
29
+ };
30
+ clock: {
31
+ format24Hour: boolean;
32
+ };
33
+ };
34
+ formats: {
35
+ date: FormatPattern;
36
+ time: FormatPattern;
37
+ datetime: FormatPattern;
38
+ numbers: {
39
+ decimalPattern: string;
40
+ currency: {
41
+ code: string;
42
+ };
43
+ };
44
+ contacts: {
45
+ phone: string;
46
+ postalCode: string;
47
+ };
48
+ };
49
+ units: {
50
+ temperature: 'celsius' | 'fahrenheit';
51
+ distance: 'kilometers' | 'miles';
52
+ weight: 'kilograms' | 'pounds';
53
+ volume: 'liters' | 'gallons';
54
+ speed: 'kmh' | 'mph';
55
+ area: 'square-meters' | 'square-feet';
56
+ custom?: Record<string, string>;
57
+ };
58
+ i18nMeta: {
59
+ fallbackLocales?: string[];
60
+ supportedLanguages?: string[];
61
+ rtl: boolean;
62
+ };
63
+ }
64
+ interface FormatPattern {
65
+ short: string;
66
+ medium: string;
67
+ long: string;
68
+ full: string;
69
+ }
70
+ declare enum AXLocaleEvents {
71
+ AXLocaleChanged = "AX_LOCALE_CHANGED",
72
+ AXLocaleLoaded = "AX_LOCALE_LOADED",
73
+ AXCalendarChanged = "AX_CALENDAR_CHANGED",
74
+ AXLanguageChanged = "AX_LANGUAGE_CHANGED",
75
+ AXLanguageLoaded = "AX_LANGUAGE_LOADED"
76
+ }
77
+
78
+ type AXLocaleProfileProviderResult = Record<string, () => Promise<AXLocaleProfile> | AXLocaleProfile>;
79
+ interface AXLocaleProfileProvider {
80
+ provide(): Promise<AXLocaleProfileProviderResult>;
81
+ }
82
+ declare const AX_LOCALE_PROFILE_PROVIDERS: InjectionToken<AXLocaleProfileProvider[]>;
83
+ declare class AXLocaleProfileProviderDefault implements AXLocaleProfileProvider {
84
+ provide(): Promise<AXLocaleProfileProviderResult>;
85
+ }
86
+ declare class AXLocaleProfileProviderService {
87
+ private providers;
88
+ private registry;
89
+ private resolvedCache;
90
+ private isInitialized;
91
+ private init;
92
+ getList(): Promise<AXLocaleProfile[]>;
93
+ getByLocale(localeCode: string): Promise<AXLocaleProfile | undefined>;
94
+ reload(): Promise<void>;
95
+ has(localeCode: string): boolean;
96
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXLocaleProfileProviderService, never>;
97
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXLocaleProfileProviderService>;
98
+ }
99
+
100
+ interface AXLocaleConfig {
101
+ default: string;
102
+ }
103
+ declare const AX_LOCALE_CONFIG: InjectionToken<AXLocaleConfig>;
104
+
105
+ declare class AXLocaleModule {
106
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXLocaleModule, never>;
107
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXLocaleModule, never, [typeof i1.AXFormatModule], never>;
108
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXLocaleModule>;
109
+ }
110
+
111
+ declare class AXLocaleService {
112
+ private provider;
113
+ private config;
114
+ private _activeProfile;
115
+ activeProfile: i0.Signal<AXLocaleProfile>;
116
+ profileChanged$: rxjs.Observable<AXLocaleProfile>;
117
+ private originalProfile;
118
+ setProfile(localeCode: string): Promise<void>;
119
+ /**
120
+ *
121
+ */
122
+ constructor();
123
+ apply(profile: Partial<AXLocaleProfile>): void;
124
+ apply(path: string, value: any): void;
125
+ reset(): void;
126
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXLocaleService, never>;
127
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXLocaleService>;
128
+ }
129
+
130
+ declare const AXUSLocaleProfile: AXLocaleProfile;
131
+
132
+ declare const AXIRLocaleProfile: AXLocaleProfile;
133
+
134
+ export { AXIRLocaleProfile, AXLocaleEvents, AXLocaleModule, AXLocaleProfileProviderDefault, AXLocaleProfileProviderService, AXLocaleService, AXUSLocaleProfile, AX_LOCALE_CONFIG, AX_LOCALE_PROFILE_PROVIDERS };
135
+ export type { AXCurrencyFormatterOptions, AXLocaleConfig, AXLocaleProfile, AXLocaleProfileProvider, AXLocaleProfileProviderResult };
@@ -1 +1,3 @@
1
- export * from './lib/memoize.decorator';
1
+ declare function Memoize(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
2
+
3
+ export { Memoize };
@@ -1,4 +1,69 @@
1
- export * from './lib/download-task';
2
- export * from './lib/network.service';
3
- export * from './lib/network.types';
4
- export * from './lib/upload-task';
1
+ import { HttpEvent, HttpClient, HttpRequest } from '@angular/common/http';
2
+ import { Observable, BehaviorSubject } from 'rxjs';
3
+ import * as i0 from '@angular/core';
4
+
5
+ declare enum AXUploadStatus {
6
+ Uploading = "Uploading...",
7
+ UploadComplete = "Upload complete",
8
+ StartingUpload = "Starting upload",
9
+ UploadFailed = "Upload failed",
10
+ UploadCanceled = "Upload Canceled"
11
+ }
12
+ type AXUploadResponse<T> = {
13
+ progress: number;
14
+ bytesTransferred: number;
15
+ totalBytes: number;
16
+ status: AXUploadStatus;
17
+ result?: T;
18
+ message?: string;
19
+ };
20
+ declare enum AXDownloadStatus {
21
+ Downloading = "Downloading...",
22
+ DownloadComplete = "Download complete",
23
+ StartingDownload = "Starting download",
24
+ DownloadFailed = "Download failed"
25
+ }
26
+ type AXDownloadResponse = {
27
+ progress: number;
28
+ bytesReceived: number;
29
+ totalBytes: number;
30
+ status: AXDownloadStatus;
31
+ data?: Blob;
32
+ };
33
+
34
+ declare class AXDownloadTask {
35
+ private observable;
36
+ private cancelSignal;
37
+ constructor(observable: Observable<HttpEvent<any>>);
38
+ get events(): Observable<AXDownloadResponse>;
39
+ private handleEvent;
40
+ cancel(): void;
41
+ }
42
+
43
+ declare class AXUploadTask<T> {
44
+ private http;
45
+ private request;
46
+ private totalFileSize;
47
+ private cancelSignal;
48
+ events: BehaviorSubject<AXUploadResponse<T>>;
49
+ constructor(http: HttpClient, request: HttpRequest<T>, totalFileSize: number);
50
+ private handleEvent;
51
+ cancel(): void;
52
+ start(): void;
53
+ }
54
+
55
+ declare class AXNetworkService {
56
+ private http;
57
+ private _status;
58
+ readonly status: i0.Signal<boolean>;
59
+ constructor();
60
+ upload<T>(url: string, formData: FormData): AXUploadTask<T>;
61
+ upload<T>(request: HttpRequest<any>): AXUploadTask<T>;
62
+ download(url: string): AXDownloadTask;
63
+ download(request: HttpRequest<Blob>): AXDownloadTask;
64
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXNetworkService, never>;
65
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXNetworkService>;
66
+ }
67
+
68
+ export { AXDownloadStatus, AXDownloadTask, AXNetworkService, AXUploadStatus, AXUploadTask };
69
+ export type { AXDownloadResponse, AXUploadResponse };
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@acorex/core",
3
- "version": "19.15.0-next.9",
3
+ "version": "20.0.1",
4
4
  "peerDependencies": {
5
- "@angular/common": ">=19.0.0",
6
- "@angular/core": ">=19.0.0",
5
+ "@angular/common": "^20.0.0",
6
+ "@angular/core": "^20.0.0",
7
7
  "lodash-es": ">=4.17.21",
8
8
  "memoizee": ">=0.4.15",
9
9
  "crypto-es": ">=2.1.0",
@@ -28,34 +28,38 @@
28
28
  "types": "./components/index.d.ts",
29
29
  "default": "./fesm2022/acorex-core-components.mjs"
30
30
  },
31
+ "./config": {
32
+ "types": "./config/index.d.ts",
33
+ "default": "./fesm2022/acorex-core-config.mjs"
34
+ },
35
+ "./constants": {
36
+ "types": "./constants/index.d.ts",
37
+ "default": "./fesm2022/acorex-core-constants.mjs"
38
+ },
31
39
  "./date-time": {
32
40
  "types": "./date-time/index.d.ts",
33
41
  "default": "./fesm2022/acorex-core-date-time.mjs"
34
42
  },
35
- "./file": {
36
- "types": "./file/index.d.ts",
37
- "default": "./fesm2022/acorex-core-file.mjs"
38
- },
39
43
  "./events": {
40
44
  "types": "./events/index.d.ts",
41
45
  "default": "./fesm2022/acorex-core-events.mjs"
42
46
  },
47
+ "./file": {
48
+ "types": "./file/index.d.ts",
49
+ "default": "./fesm2022/acorex-core-file.mjs"
50
+ },
43
51
  "./format": {
44
52
  "types": "./format/index.d.ts",
45
53
  "default": "./fesm2022/acorex-core-format.mjs"
46
54
  },
47
- "./constants": {
48
- "types": "./constants/index.d.ts",
49
- "default": "./fesm2022/acorex-core-constants.mjs"
55
+ "./icon": {
56
+ "types": "./icon/index.d.ts",
57
+ "default": "./fesm2022/acorex-core-icon.mjs"
50
58
  },
51
59
  "./image": {
52
60
  "types": "./image/index.d.ts",
53
61
  "default": "./fesm2022/acorex-core-image.mjs"
54
62
  },
55
- "./config": {
56
- "types": "./config/index.d.ts",
57
- "default": "./fesm2022/acorex-core-config.mjs"
58
- },
59
63
  "./locale": {
60
64
  "types": "./locale/index.d.ts",
61
65
  "default": "./fesm2022/acorex-core-locale.mjs"
@@ -68,14 +72,14 @@
68
72
  "types": "./network/index.d.ts",
69
73
  "default": "./fesm2022/acorex-core-network.mjs"
70
74
  },
71
- "./platform": {
72
- "types": "./platform/index.d.ts",
73
- "default": "./fesm2022/acorex-core-platform.mjs"
74
- },
75
75
  "./pipes": {
76
76
  "types": "./pipes/index.d.ts",
77
77
  "default": "./fesm2022/acorex-core-pipes.mjs"
78
78
  },
79
+ "./platform": {
80
+ "types": "./platform/index.d.ts",
81
+ "default": "./fesm2022/acorex-core-platform.mjs"
82
+ },
79
83
  "./storage": {
80
84
  "types": "./storage/index.d.ts",
81
85
  "default": "./fesm2022/acorex-core-storage.mjs"
package/pipes/index.d.ts CHANGED
@@ -1 +1,12 @@
1
- export * from './lib/safe/safe.pipe';
1
+ import * as i0 from '@angular/core';
2
+ import { PipeTransform } from '@angular/core';
3
+ import { DomSanitizer, SafeHtml, SafeStyle, SafeScript, SafeUrl, SafeResourceUrl } from '@angular/platform-browser';
4
+
5
+ declare class AXSafePipe implements PipeTransform {
6
+ protected sanitizer: DomSanitizer;
7
+ transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXSafePipe, never>;
9
+ static ɵpipe: i0.ɵɵPipeDeclaration<AXSafePipe, "safe", true>;
10
+ }
11
+
12
+ export { AXSafePipe };
@@ -1 +1,82 @@
1
- export * from './lib/platform.service';
1
+ import * as i0 from '@angular/core';
2
+ import { Subject, BehaviorSubject } from 'rxjs';
3
+
4
+ type AXThemeMode = 'light' | 'dark' | 'system' | 'system-dark' | 'system-light';
5
+ type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';
6
+ type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';
7
+ type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';
8
+ type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL' | '3XL' | '4XL' | '5XL';
9
+ declare const isChrome: (win: Window) => boolean;
10
+ declare const isFirefox: (win: Window) => boolean;
11
+ declare const isEdge: (win: Window) => boolean;
12
+ declare const isSafari: (win: Window) => boolean;
13
+ declare const isOpera: (win: Window) => boolean;
14
+ declare const isMSIE: (win: Window) => boolean;
15
+ declare const isMobileWeb: (win: Window) => boolean;
16
+ declare const isIpad: (win: Window) => boolean;
17
+ declare const isIphone: (win: Window) => boolean;
18
+ declare const isIOS: (win: Window) => boolean;
19
+ declare const isAndroid: (win: Window) => boolean;
20
+ declare const isAndroidTablet: (win: Window) => boolean;
21
+ declare const isPhablet: (win: Window) => boolean;
22
+ declare const isTablet: (win: Window) => boolean;
23
+ declare const isMobile: (win: Window) => boolean;
24
+ declare const isTouch: (win: Window) => boolean;
25
+ declare const isDesktop: (win: Window) => boolean;
26
+ declare const isHybrid: (win: Window) => boolean;
27
+ declare const isCordova: (win: any) => boolean;
28
+ declare const isCapacitorNative: (win: any) => boolean;
29
+ declare const isElectron: (win: Window) => boolean;
30
+ declare const isPWA: (win: Window) => boolean;
31
+ declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
32
+ declare const isBrowser: Function;
33
+ declare const isServer: Function;
34
+ declare const matchMedia: (win: Window, query: string) => boolean;
35
+ declare const isSMScreen: (win: Window) => boolean;
36
+ declare const isMDScreen: (win: Window) => boolean;
37
+ declare const isLGScreen: (win: Window) => boolean;
38
+ declare const isXLScreen: (win: Window) => boolean;
39
+ declare const is2XLScreen: (win: Window) => boolean;
40
+ declare const is3XLScreen: (win: Window) => boolean;
41
+ declare const is4XLScreen: (win: Window) => boolean;
42
+ declare const PLATFORMS_MAP: any;
43
+ declare class AXPlatformEvent<T extends Event = Event> {
44
+ nativeEvent: T;
45
+ source: AXPlatform;
46
+ data?: any;
47
+ }
48
+ declare class AXPlatform {
49
+ #private;
50
+ resize: Subject<AXPlatformEvent>;
51
+ directionChange: Subject<AXPlatformEvent>;
52
+ click: Subject<AXPlatformEvent>;
53
+ scroll: Subject<AXPlatformEvent>;
54
+ themeMode$: BehaviorSubject<AXThemeMode>;
55
+ themeMode: i0.WritableSignal<AXThemeMode>;
56
+ private document;
57
+ private platformID;
58
+ isDark(): boolean;
59
+ isRtl(): boolean;
60
+ isLandscape(): boolean;
61
+ isPortrate(): boolean;
62
+ is(name: AXPlatforms | AXBrowsers | AXTechnologies | AXScreenSizes): boolean;
63
+ get screenSize(): AXScreenSizes;
64
+ switchLightMode(): string;
65
+ switchDarkMode(): string;
66
+ switchSystemMode(): void;
67
+ autoDetectThemeMode(): "light" | "dark" | "system";
68
+ setThemeMode(mode: AXThemeMode): void;
69
+ private setFullHeightRatio;
70
+ private autoSystemModeDetection;
71
+ constructor();
72
+ private detectDarkMode;
73
+ private detectOnResize;
74
+ private detectClickEvent;
75
+ private detectScrollEvent;
76
+ private detectDocumentDirectionChange;
77
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXPlatform, never>;
78
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXPlatform>;
79
+ }
80
+
81
+ export { AXPlatform, AXPlatformEvent, PLATFORMS_MAP, is2XLScreen, is3XLScreen, is4XLScreen, isAndroid, isAndroidTablet, isBrowser, isCapacitorNative, isChrome, isCordova, isDesktop, isEdge, isElectron, isFirefox, isHybrid, isIOS, isIpad, isIphone, isLGScreen, isMDScreen, isMSIE, isMobile, isMobileWeb, isOpera, isPWA, isPhablet, isSMScreen, isSafari, isServer, isTablet, isTouch, isXLScreen, matchMedia, testUserAgent };
82
+ export type { AXBrowsers, AXPlatforms, AXScreenSizes, AXTechnologies, AXThemeMode };