@acorex/core 19.12.0 → 19.13.0-next.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/date-time/index.d.ts +5 -5
- package/date-time/lib/calendar.service.d.ts +8 -3
- package/date-time/lib/dateTime.config.d.ts +1 -1
- package/date-time/lib/datetime.pipe.d.ts +2 -1
- package/date-time/lib/{datetime.class.d.ts → datetime.types.d.ts} +2 -2
- package/date-time/lib/formatters/date.formatter.d.ts +12 -0
- package/date-time/lib/formatters/{datetime-formatter.d.ts → datetime.formatter.d.ts} +3 -1
- package/date-time/lib/formatters/time.formatter.d.ts +12 -0
- package/date-time/lib/{georgian.calendar.d.ts → gregorian.calendar.d.ts} +2 -2
- package/date-time/lib/{jalali.calendar.d.ts → solar-hijri.calendar.d.ts} +8 -8
- package/events/index.d.ts +0 -1
- package/fesm2022/acorex-core-components.mjs +3 -3
- package/fesm2022/acorex-core-config.mjs +3 -3
- package/fesm2022/acorex-core-date-time.mjs +282 -119
- package/fesm2022/acorex-core-date-time.mjs.map +1 -1
- package/fesm2022/acorex-core-events.mjs +4 -10
- package/fesm2022/acorex-core-events.mjs.map +1 -1
- package/fesm2022/acorex-core-file.mjs +10 -10
- package/fesm2022/acorex-core-format.mjs +78 -63
- package/fesm2022/acorex-core-format.mjs.map +1 -1
- package/fesm2022/acorex-core-image.mjs +3 -3
- package/fesm2022/acorex-core-locale-en-AU.profile-BW-_9tgT.mjs +64 -0
- package/fesm2022/acorex-core-locale-en-AU.profile-BW-_9tgT.mjs.map +1 -0
- package/fesm2022/acorex-core-locale.mjs +341 -0
- package/fesm2022/acorex-core-locale.mjs.map +1 -0
- package/fesm2022/acorex-core-network.mjs +3 -3
- package/fesm2022/acorex-core-pipes.mjs +3 -3
- package/fesm2022/acorex-core-platform.mjs +3 -3
- package/fesm2022/acorex-core-storage.mjs +9 -9
- package/fesm2022/acorex-core-translation.mjs +246 -206
- package/fesm2022/acorex-core-translation.mjs.map +1 -1
- package/fesm2022/acorex-core-utils.mjs +143 -18
- package/fesm2022/acorex-core-utils.mjs.map +1 -1
- package/fesm2022/acorex-core-validation.mjs +40 -40
- package/format/index.d.ts +2 -2
- package/format/lib/format.directive.d.ts +1 -1
- package/format/lib/format.module.d.ts +3 -3
- package/format/lib/format.service.d.ts +8 -7
- package/locale/README.md +3 -0
- package/locale/index.d.ts +8 -0
- package/locale/lib/formatters/currency.formatter.d.ts +10 -0
- package/locale/lib/locale-profile-provider.service.d.ts +24 -0
- package/locale/lib/locale.config.d.ts +5 -0
- package/locale/lib/locale.module.d.ts +7 -0
- package/locale/lib/locale.service.d.ts +20 -0
- package/locale/lib/locale.types.d.ts +61 -0
- package/locale/lib/profiles/en-AU.profile.d.ts +2 -0
- package/locale/lib/profiles/en-US.profile.d.ts +2 -0
- package/locale/lib/profiles/fa-IR.profile.d.ts +2 -0
- package/package.json +5 -1
- package/translation/index.d.ts +1 -1
- package/translation/lib/translation-loader.service.d.ts +20 -0
- package/translation/lib/translation.config.d.ts +19 -6
- package/translation/lib/translation.loader.d.ts +2 -2
- package/translation/lib/translation.parser.d.ts +7 -0
- package/translation/lib/translation.resolver.d.ts +9 -0
- package/translation/lib/translation.service.d.ts +12 -31
- package/translation/lib/translation.types.d.ts +8 -2
- package/translation/lib/translator.pipe.d.ts +0 -2
- package/types/README.md +2 -2
- package/utils/index.d.ts +6 -5
- package/utils/lib/execution.utils.d.ts +33 -0
- package/utils/lib/string.utils.d.ts +4 -0
- package/events/lib/event.type.d.ts +0 -5
- package/i18n/en/common.json +0 -191
- package/i18n/fa/common.json +0 -190
- package/utils/lib/string-util.d.ts +0 -6
- /package/date-time/lib/formatters/{time-duration-formatter.d.ts → time-duration.formatter.d.ts} +0 -0
- /package/date-time/lib/formatters/{timeleft-formatter.d.ts → timeleft.formatter.d.ts} +0 -0
- /package/format/lib/formatters/{number-formatter.d.ts → number.formatter.d.ts} +0 -0
- /package/format/lib/formatters/{string-formatter.d.ts → string.formatter.d.ts} +0 -0
- /package/utils/lib/{color-util.d.ts → color.utils.d.ts} +0 -0
- /package/utils/lib/{drawing-util.d.ts → drawing.utils.d.ts} +0 -0
- /package/utils/lib/{html-util.d.ts → html-utils.d.ts} +0 -0
- /package/utils/lib/{auto-unsubscribe.d.ts → lifecycle-helpers.utils.d.ts} +0 -0
@@ -19,19 +19,19 @@ class AXFileSizeFormatter {
|
|
19
19
|
const i = Math.floor(Math.log(size) / Math.log(k));
|
20
20
|
return parseFloat((size / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
21
21
|
}
|
22
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
23
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
22
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileSizeFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
23
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileSizeFormatter }); }
|
24
24
|
}
|
25
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
25
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileSizeFormatter, decorators: [{
|
26
26
|
type: Injectable
|
27
27
|
}] });
|
28
28
|
|
29
29
|
class AXFileModule {
|
30
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
31
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
32
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
30
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
31
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: AXFileModule, imports: [i1.AXFormatModule] }); }
|
32
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileModule, providers: [AXFileSizeFormatter], imports: [AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] })] }); }
|
33
33
|
}
|
34
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
34
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileModule, decorators: [{
|
35
35
|
type: NgModule,
|
36
36
|
args: [{
|
37
37
|
imports: [AXFormatModule.forChild({ formatters: [AXFileSizeFormatter] })],
|
@@ -105,10 +105,10 @@ class AXFileService {
|
|
105
105
|
getBase64Size(base64) {
|
106
106
|
return atob(base64.substring(base64.indexOf(',') + 1)).length;
|
107
107
|
}
|
108
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
109
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
108
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
109
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileService, providedIn: 'root' }); }
|
110
110
|
}
|
111
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
111
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFileService, decorators: [{
|
112
112
|
type: Injectable,
|
113
113
|
args: [{
|
114
114
|
providedIn: 'root',
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import * as i0 from '@angular/core';
|
2
2
|
import { Injector, Injectable, Directive, inject, Pipe, Inject, NgModule } from '@angular/core';
|
3
3
|
import { Subject, filter, startWith, switchMap, of } from 'rxjs';
|
4
|
-
import { AXEventService } from '@acorex/core/events';
|
5
4
|
import { defaults, padStart, isInteger, get } from 'lodash-es';
|
5
|
+
import { AXEventService } from '@acorex/core/events';
|
6
6
|
|
7
7
|
class AXFormatter {
|
8
8
|
}
|
@@ -27,10 +27,22 @@ class AXFormatterRegistryService {
|
|
27
27
|
get formatters() {
|
28
28
|
return this.plugins;
|
29
29
|
}
|
30
|
-
|
31
|
-
|
30
|
+
/**
|
31
|
+
* Resolves a formatter by its name.
|
32
|
+
* @param name The name of the formatter.
|
33
|
+
* @returns The formatter if found, otherwise throws an error.
|
34
|
+
*/
|
35
|
+
get(name) {
|
36
|
+
const formatter = this.formatters.find((c) => c.name == name);
|
37
|
+
if (!formatter) {
|
38
|
+
throw new Error(`Formatter not found: ${name}`);
|
39
|
+
}
|
40
|
+
return formatter;
|
41
|
+
}
|
42
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatterRegistryService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
43
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatterRegistryService, providedIn: 'root' }); }
|
32
44
|
}
|
33
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
45
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatterRegistryService, decorators: [{
|
34
46
|
type: Injectable,
|
35
47
|
args: [{
|
36
48
|
providedIn: 'root',
|
@@ -46,38 +58,27 @@ class AXFormatService {
|
|
46
58
|
render() {
|
47
59
|
this.renderSubject.next();
|
48
60
|
}
|
49
|
-
/**
|
50
|
-
* Resolves a formatter by its name.
|
51
|
-
* @param name The name of the formatter.
|
52
|
-
* @returns The formatter if found, otherwise throws an error.
|
53
|
-
*/
|
54
|
-
resolveFormatter(name) {
|
55
|
-
const formatter = this.pluginRegistry.formatters.find((c) => c.name == name);
|
56
|
-
if (!formatter) {
|
57
|
-
throw new Error(`Formatter not found: ${name}`);
|
58
|
-
}
|
59
|
-
return formatter;
|
60
|
-
}
|
61
61
|
// Implementation of the format method
|
62
62
|
format(value, formatter, options) {
|
63
63
|
if (typeof formatter === 'string') {
|
64
|
-
const formatterRef = this.
|
64
|
+
const formatterRef = this.pluginRegistry.get(formatter);
|
65
65
|
return formatterRef.format(value, options);
|
66
66
|
}
|
67
67
|
else {
|
68
|
-
return new AXFormatFluent(this, value);
|
68
|
+
return new AXFormatFluent(this, this.pluginRegistry, value);
|
69
69
|
}
|
70
70
|
}
|
71
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
72
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
71
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatService, deps: [{ token: AXFormatterRegistryService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
72
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatService, providedIn: 'root' }); }
|
73
73
|
}
|
74
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
74
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatService, decorators: [{
|
75
75
|
type: Injectable,
|
76
76
|
args: [{ providedIn: 'root' }]
|
77
77
|
}], ctorParameters: () => [{ type: AXFormatterRegistryService }] });
|
78
78
|
class AXFormatFluent {
|
79
|
-
constructor(formatService, initialValue) {
|
79
|
+
constructor(formatService, pluginRegistry, initialValue) {
|
80
80
|
this.formatService = formatService;
|
81
|
+
this.pluginRegistry = pluginRegistry;
|
81
82
|
this.initialValue = initialValue;
|
82
83
|
}
|
83
84
|
/**
|
@@ -88,7 +89,7 @@ class AXFormatFluent {
|
|
88
89
|
*/
|
89
90
|
to(formatter, options) {
|
90
91
|
try {
|
91
|
-
const formatterRef = this.
|
92
|
+
const formatterRef = this.pluginRegistry.get(formatter);
|
92
93
|
return formatterRef.format(this.initialValue, options);
|
93
94
|
}
|
94
95
|
catch (error) {
|
@@ -111,41 +112,16 @@ class AXFormatterDirective {
|
|
111
112
|
},
|
112
113
|
});
|
113
114
|
}
|
114
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
115
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.
|
115
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatterDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: AXFormatService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
116
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: AXFormatterDirective, isStandalone: true, selector: "[formatter]", ngImport: i0 }); }
|
116
117
|
}
|
117
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
118
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatterDirective, decorators: [{
|
118
119
|
type: Directive,
|
119
|
-
args: [{ selector: '[format]' }]
|
120
|
-
}], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: AXFormatService }] });
|
121
|
-
|
122
|
-
class AXFormatPipe {
|
123
|
-
constructor() {
|
124
|
-
this.formatService = inject(AXFormatService);
|
125
|
-
this.eventService = inject(AXEventService);
|
126
|
-
this.triggers = ['AX_CALENDAR_CHANGED', 'AX_LANGUAGE_CHANGED', 'AX_LANGUAGE_LOADED'];
|
127
|
-
}
|
128
|
-
transform(value, name, options) {
|
129
|
-
// Initial formatted value
|
130
|
-
const initialFormattedValue = this.formatService.format(value, name, options);
|
131
|
-
// React to language changes and re-format the value
|
132
|
-
return this.eventService.onEvent.pipe(filter((event) => this.triggers.includes(event.type)), startWith(initialFormattedValue), // Emit the initial formatted value immediately
|
133
|
-
switchMap((event) => {
|
134
|
-
// Re-call format method on every language change
|
135
|
-
const formattedValue = this.formatService.format(value, name, options);
|
136
|
-
return of(formattedValue);
|
137
|
-
}));
|
138
|
-
}
|
139
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
140
|
-
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.5", ngImport: i0, type: AXFormatPipe, isStandalone: true, name: "format" }); }
|
141
|
-
}
|
142
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.5", ngImport: i0, type: AXFormatPipe, decorators: [{
|
143
|
-
type: Pipe,
|
144
120
|
args: [{
|
145
|
-
|
146
|
-
|
121
|
+
selector: '[formatter]',
|
122
|
+
standalone: true,
|
147
123
|
}]
|
148
|
-
}] });
|
124
|
+
}], ctorParameters: () => [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: AXFormatService }] });
|
149
125
|
|
150
126
|
class AXNumberFormatter {
|
151
127
|
constructor() {
|
@@ -211,10 +187,10 @@ class AXNumberFormatter {
|
|
211
187
|
this.separatorsCache[locale] = { thousandSeparator, decimalSeparator };
|
212
188
|
return this.separatorsCache[locale];
|
213
189
|
}
|
214
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
215
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
190
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXNumberFormatter, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
191
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXNumberFormatter }); }
|
216
192
|
}
|
217
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXNumberFormatter, decorators: [{
|
218
194
|
type: Injectable
|
219
195
|
}] });
|
220
196
|
|
@@ -234,6 +210,45 @@ class AXStringFormatter {
|
|
234
210
|
}
|
235
211
|
}
|
236
212
|
|
213
|
+
var AXLocaleEvents;
|
214
|
+
(function (AXLocaleEvents) {
|
215
|
+
AXLocaleEvents["AXLocaleChanged"] = "AX_LOCALE_CHANGED";
|
216
|
+
AXLocaleEvents["AXLocaleLoaded"] = "AX_LOCALE_LOADED";
|
217
|
+
//
|
218
|
+
AXLocaleEvents["AXCalendarChanged"] = "AX_CALENDAR_CHANGED";
|
219
|
+
//
|
220
|
+
AXLocaleEvents["AXLanguageChanged"] = "AX_LANGUAGE_CHANGED";
|
221
|
+
AXLocaleEvents["AXLanguageLoaded"] = "AX_LANGUAGE_LOADED";
|
222
|
+
})(AXLocaleEvents || (AXLocaleEvents = {}));
|
223
|
+
class AXFormatPipe {
|
224
|
+
constructor() {
|
225
|
+
this.formatService = inject(AXFormatService);
|
226
|
+
this.eventService = inject(AXEventService);
|
227
|
+
this.triggers = [...Object.values(AXLocaleEvents).map((event) => event)];
|
228
|
+
}
|
229
|
+
transform(value, name, options) {
|
230
|
+
// Initial formatted value
|
231
|
+
const initialFormattedValue = this.formatService.format(value, name, options);
|
232
|
+
// React to language changes and re-format the value
|
233
|
+
return this.eventService.onEvent.pipe(filter((event) => this.triggers.includes(event.type)), startWith(initialFormattedValue), // Emit the initial formatted value immediately
|
234
|
+
switchMap((event) => {
|
235
|
+
// Re-call format method on every language change
|
236
|
+
const formattedValue = this.formatService.format(value, name, options);
|
237
|
+
return of(formattedValue);
|
238
|
+
}));
|
239
|
+
}
|
240
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
241
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: AXFormatPipe, isStandalone: true, name: "format" }); }
|
242
|
+
}
|
243
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatPipe, decorators: [{
|
244
|
+
type: Pipe,
|
245
|
+
args: [{
|
246
|
+
name: 'format',
|
247
|
+
standalone: true,
|
248
|
+
pure: true,
|
249
|
+
}]
|
250
|
+
}] });
|
251
|
+
|
237
252
|
const BUILT_IN_RULES = [AXNumberFormatter, AXStringFormatter];
|
238
253
|
class AXFormatModule {
|
239
254
|
static forRoot(configs) {
|
@@ -276,15 +291,15 @@ class AXFormatModule {
|
|
276
291
|
f();
|
277
292
|
});
|
278
293
|
}
|
279
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
280
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.
|
281
|
-
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.
|
294
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatModule, deps: [{ token: 'AXFormatModuleFactory' }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
295
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: AXFormatModule, imports: [AXFormatterDirective, AXFormatPipe], exports: [AXFormatterDirective, AXFormatPipe] }); }
|
296
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatModule }); }
|
282
297
|
}
|
283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
298
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXFormatModule, decorators: [{
|
284
299
|
type: NgModule,
|
285
300
|
args: [{
|
286
|
-
imports: [
|
287
|
-
exports: [
|
301
|
+
imports: [AXFormatterDirective, AXFormatPipe],
|
302
|
+
exports: [AXFormatterDirective, AXFormatPipe],
|
288
303
|
}]
|
289
304
|
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
290
305
|
type: Inject,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"acorex-core-format.mjs","sources":["../../../../libs/core/format/src/lib/format.config.ts","../../../../libs/core/format/src/lib/format.service.ts","../../../../libs/core/format/src/lib/format.directive.ts","../../../../libs/core/format/src/lib/format.pipe.ts","../../../../libs/core/format/src/lib/formatters/number-formatter.ts","../../../../libs/core/format/src/lib/formatters/string-formatter.ts","../../../../libs/core/format/src/lib/format.module.ts","../../../../libs/core/format/src/acorex-core-format.ts"],"sourcesContent":["import { AXFormatOptions } from './format.types';\n\nexport abstract class AXFormatter {\n abstract get name(): string;\n abstract format(value: unknown, options?: AXFormatOptions | string): string;\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormatter } from './format.config';\nimport { AXFormatOptionsMap } from './format.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFormatterRegistryService {\n private plugins: AXFormatter[] = [];\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXFormatter)[]) {\n plugins.forEach((t) => {\n const childInjector = Injector.create({\n providers: [{ provide: t, useClass: t, deps: [] }],\n parent: this.injector,\n });\n const v = childInjector.get(t);\n\n if (v && !this.plugins.some((p) => p.name == v.name)) {\n this.plugins.push(v);\n }\n });\n }\n\n get formatters(): AXFormatter[] {\n return this.plugins;\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXFormatService {\n constructor(private pluginRegistry: AXFormatterRegistryService) {}\n\n private renderSubject = new Subject<void>();\n\n // Observable that other services/components can subscribe to\n onRender = this.renderSubject.asObservable();\n\n render() {\n this.renderSubject.next();\n }\n\n /**\n * Resolves a formatter by its name.\n * @param name The name of the formatter.\n * @returns The formatter if found, otherwise throws an error.\n */\n resolveFormatter(name: string): AXFormatter {\n const formatter = this.pluginRegistry.formatters.find((c) => c.name == name);\n if (!formatter) {\n throw new Error(`Formatter not found: ${name}`);\n }\n return formatter;\n }\n\n // Overload for traditional formatting\n format<K extends keyof AXFormatOptionsMap>(value: unknown, formatter: K, options?: AXFormatOptionsMap[K]): string;\n\n // Overload for starting fluent API chain\n format(value: unknown): AXFormatFluent;\n\n // Implementation of the format method\n format<K extends keyof AXFormatOptionsMap>(value: unknown, formatter?: K, options?: AXFormatOptionsMap[K]): string | AXFormatFluent {\n if (typeof formatter === 'string') {\n const formatterRef = this.resolveFormatter(formatter);\n return formatterRef.format(value, options);\n } else {\n return new AXFormatFluent(this, value);\n }\n }\n}\n\nclass AXFormatFluent {\n constructor(\n private formatService: AXFormatService,\n private initialValue: unknown,\n ) {}\n\n /**\n * Formats the value using the specified formatter and options.\n * @param formatter The name of the formatter to use.\n * @param options The options to pass to the formatter.\n * @returns The formatted string.\n */\n to<K extends keyof AXFormatOptionsMap>(formatter: K, options?: AXFormatOptionsMap[K]): string {\n try {\n const formatterRef = this.formatService.resolveFormatter(formatter);\n return formatterRef.format(this.initialValue, options);\n } catch (error) {\n return String(this.initialValue);\n }\n }\n}\n","import { Directive, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AXFormatService } from './format.service';\nimport { AXFormatOptionsMap } from './format.types';\n\n@Directive({ selector: '[format]' })\nexport class AXFormatterDirective implements OnInit {\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private formatService: AXFormatService,\n ) {}\n\n ngOnInit() {\n this.viewContainer.clear();\n this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: <K extends keyof AXFormatOptionsMap>(value: unknown, formatter: K, options?: AXFormatOptionsMap[K]) => {\n return this.formatService.format(value, formatter, options);\n },\n });\n }\n}\n","import { AXEventData, AXEventService } from '@acorex/core/events';\nimport { Pipe, PipeTransform, inject } from '@angular/core';\nimport { Observable, filter, of, startWith, switchMap } from 'rxjs';\nimport { AXFormatService } from './format.service';\nimport { AXFormatOptions } from './format.types';\n\n@Pipe({\n name: 'format',\n pure: true,\n})\nexport class AXFormatPipe implements PipeTransform {\n private formatService = inject(AXFormatService);\n private eventService = inject(AXEventService);\n\n private triggers = ['AX_CALENDAR_CHANGED', 'AX_LANGUAGE_CHANGED', 'AX_LANGUAGE_LOADED'];\n\n transform(value: unknown, name: string, options?: AXFormatOptions | string): Observable<string> {\n // Initial formatted value\n const initialFormattedValue = this.formatService.format(value, name as any, options);\n\n // React to language changes and re-format the value\n return this.eventService.onEvent.pipe(\n filter((event: AXEventData) => this.triggers.includes(event.type)),\n startWith(initialFormattedValue), // Emit the initial formatted value immediately\n switchMap((event) => {\n // Re-call format method on every language change\n const formattedValue = this.formatService.format(value, name as any, options);\n return of(formattedValue);\n }),\n );\n }\n}\n","import { Injectable } from '@angular/core';\nimport { defaults, isInteger, padStart } from 'lodash-es';\nimport { AXFormatter } from '../format.config';\nimport { AXFormatOptions } from '../format.types';\n\nexport interface AXNumberFormatterOptions extends AXFormatOptions {\n decimalPlaces?: number;\n thousandSeparator?: string;\n decimalSeparator?: string;\n zeroPadLength?: number; // New option for zero padding,\n locale?: string;\n}\n\ndeclare module '../format.types' {\n interface AXFormatOptionsMap {\n number: AXNumberFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXNumberFormatter implements AXFormatter {\n private separatorsCache: any = {};\n\n get name(): string {\n return 'number';\n }\n\n format(value: number, options: AXNumberFormatterOptions): string {\n const { thousandSeparator, decimalSeparator } = this.getLocaleSeparators(options?.locale);\n // Merge user options with default options\n const effectiveOptions = defaults({}, options, {\n thousandSeparator,\n decimalSeparator,\n zeroPadLength: 0,\n locale: navigator.language,\n });\n\n const sign = value < 0 ? '-' : '';\n const absoluteValue = Math.abs(value);\n\n // Handling zero padding for integer part\n let integerPart = Math.floor(absoluteValue).toString();\n if (effectiveOptions.zeroPadLength && effectiveOptions.zeroPadLength > integerPart.length) {\n integerPart = padStart(integerPart, effectiveOptions.zeroPadLength, '0');\n }\n\n // Applying thousand separator to integer part\n if (effectiveOptions.thousandSeparator) {\n integerPart = integerPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, effectiveOptions.thousandSeparator);\n }\n\n // Constructing the final formatted value\n let formattedValue = sign + integerPart;\n if (effectiveOptions.decimalPlaces !== undefined) {\n // Limiting decimal places if specified\n const decimalPart = absoluteValue.toFixed(effectiveOptions.decimalPlaces).split('.')[1];\n formattedValue += effectiveOptions.decimalSeparator + decimalPart;\n } else if (!isInteger(value)) {\n // Showing full decimal part if decimalPlaces is not specified\n const decimalPart = absoluteValue.toString().split('.')[1] || '';\n if (decimalPart.length > 0) {\n formattedValue += effectiveOptions.decimalSeparator + decimalPart;\n }\n }\n\n return formattedValue;\n }\n\n private getLocaleSeparators(locale = navigator.language): {\n thousandSeparator: string;\n decimalSeparator: string;\n } {\n // Use cache if available\n if (this.separatorsCache[locale]) {\n return this.separatorsCache[locale];\n }\n\n const numberFormat = new Intl.NumberFormat(locale);\n const parts = numberFormat.formatToParts(1234567.89);\n let thousandSeparator = '';\n let decimalSeparator = '';\n\n for (const part of parts) {\n if (part.type === 'group') {\n thousandSeparator = part.value;\n } else if (part.type === 'decimal') {\n decimalSeparator = part.value;\n }\n }\n\n // Cache the result\n this.separatorsCache[locale] = { thousandSeparator, decimalSeparator };\n return this.separatorsCache[locale];\n }\n}\n","import { get } from 'lodash-es';\nimport { AXFormatter } from '../format.config';\nimport { AXFormatOptions } from '../format.types';\n\nexport interface AXStringFormatterOptions extends AXFormatOptions {\n [key: string]: any;\n}\n\ndeclare module '../format.types' {\n interface AXFormatOptionsMap {\n string: AXStringFormatterOptions;\n }\n}\n\nexport class AXStringFormatter implements AXFormatter {\n get name(): string {\n return 'string';\n }\n\n format(value: unknown, options: AXStringFormatterOptions): string {\n if (typeof value != 'string') return String(value);\n const result = get(options, value)\n ? get(options, value)\n : value.replace(/{{\\s*([^}]+)\\s*}}/g, (match, path: string) => {\n return (get(options, path.trim()) as string) ?? match;\n });\n\n return result;\n }\n}\n","import { Inject, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AXFormatter } from './format.config';\nimport { AXFormatterDirective } from './format.directive';\nimport { AXFormatPipe } from './format.pipe';\nimport { AXFormatterRegistryService } from './format.service';\nimport { AXNumberFormatter } from './formatters/number-formatter';\nimport { AXStringFormatter } from './formatters/string-formatter';\n\nconst BUILT_IN_RULES = [AXNumberFormatter, AXStringFormatter];\n\nexport interface AXFormatModuleConfigs {\n formatters: (new () => AXFormatter)[];\n}\n\n@NgModule({\n imports: [AXFormatPipe, AXFormatterDirective],\n exports: [AXFormatPipe, AXFormatterDirective],\n})\nexport class AXFormatModule {\n static forRoot(configs?: AXFormatModuleConfigs): ModuleWithProviders<AXFormatModule> {\n return {\n ngModule: AXFormatModule,\n providers: [\n ...(configs?.formatters || []),\n {\n provide: 'AXFormatModuleFactory',\n useFactory: (pluginRegistry: AXFormatterRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.formatters || [])]);\n },\n deps: [AXFormatterRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(configs?: AXFormatModuleConfigs): ModuleWithProviders<AXFormatModule> {\n return {\n ngModule: AXFormatModule,\n providers: [\n ...(configs?.formatters || []),\n {\n provide: 'AXFormatModuleFactory',\n useFactory: (pluginRegistry: AXFormatterRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.formatters || [])]);\n },\n deps: [AXFormatterRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Inject('AXFormatModuleFactory') instances: any[]) {\n instances.forEach((f) => {\n f();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXFormatService"],"mappings":";;;;;;MAEsB,WAAW,CAAA;AAGhC;;MCGY,0BAA0B,CAAA;AAKrC,IAAA,WAAA,CAAY,QAAkB,EAAA;QAJtB,IAAO,CAAA,OAAA,GAAkB,EAAE;AAKjC,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;;IAG1B,QAAQ,CAAC,GAAG,OAAkC,EAAA;AAC5C,QAAA,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AACpB,YAAA,MAAM,aAAa,GAAG,QAAQ,CAAC,MAAM,CAAC;AACpC,gBAAA,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;gBAClD,MAAM,EAAE,IAAI,CAAC,QAAQ;AACtB,aAAA,CAAC;YACF,MAAM,CAAC,GAAG,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC;YAE9B,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE;AACpD,gBAAA,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;;AAExB,SAAC,CAAC;;AAGJ,IAAA,IAAI,U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ACF;;AAGH;;AAEG;AACH,IAAA,WAAA,CAA6C,SAAgB,EAAA;AAC3D,QAAA,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,KAAI;AACtB,YAAA,CAAC,EAAE;AACL,SAAC,CAAC;;AAzCO,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,kBAsCL,uBAAuB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAtChC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,YAAY,EAAE,oBAAoB,CAClC,EAAA,OAAA,EAAA,CAAA,YAAY,EAAE,oBAAoB,CAAA,EAAA,CAAA,CAAA;+GAEjC,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;AAC7C,oBAAA,OAAO,EAAE,CAAC,YAAY,EAAE,oBAAoB,CAAC;AAC9C,iBAAA;;0BAuCc,MAAM;2BAAC,uBAAuB;;;ACxD7C;;AAEG;;;;"}
|
1
|
+
{"version":3,"file":"acorex-core-format.mjs","sources":["../../../../libs/core/format/src/lib/format.config.ts","../../../../libs/core/format/src/lib/format.service.ts","../../../../libs/core/format/src/lib/format.directive.ts","../../../../libs/core/format/src/lib/formatters/number.formatter.ts","../../../../libs/core/format/src/lib/formatters/string.formatter.ts","../../../../libs/core/format/src/lib/format.pipe.ts","../../../../libs/core/format/src/lib/format.module.ts","../../../../libs/core/format/src/acorex-core-format.ts"],"sourcesContent":["import { AXFormatOptions } from './format.types';\n\nexport abstract class AXFormatter {\n abstract get name(): string;\n abstract format(value: unknown, options?: AXFormatOptions | string): string;\n}\n","import { Injectable, Injector } from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { AXFormatter } from './format.config';\nimport { AXFormatOptionsMap } from './format.types';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class AXFormatterRegistryService {\n private plugins: AXFormatter[] = [];\n\n private injector: Injector;\n\n constructor(injector: Injector) {\n this.injector = injector;\n }\n\n register(...plugins: (new () => AXFormatter)[]) {\n plugins.forEach((t) => {\n const childInjector = Injector.create({\n providers: [{ provide: t, useClass: t, deps: [] }],\n parent: this.injector,\n });\n const v = childInjector.get(t);\n\n if (v && !this.plugins.some((p) => p.name == v.name)) {\n this.plugins.push(v);\n }\n });\n }\n\n get formatters(): AXFormatter[] {\n return this.plugins;\n }\n\n /**\n * Resolves a formatter by its name.\n * @param name The name of the formatter.\n * @returns The formatter if found, otherwise throws an error.\n */\n get(name: string): AXFormatter {\n const formatter = this.formatters.find((c) => c.name == name);\n if (!formatter) {\n throw new Error(`Formatter not found: ${name}`);\n }\n return formatter;\n }\n}\n\n@Injectable({ providedIn: 'root' })\nexport class AXFormatService {\n constructor(private pluginRegistry: AXFormatterRegistryService) { }\n\n private renderSubject = new Subject<void>();\n\n // Observable that other services/components can subscribe to\n onRender = this.renderSubject.asObservable();\n\n render() {\n this.renderSubject.next();\n }\n\n\n\n // Overload for traditional formatting\n format<K extends keyof AXFormatOptionsMap>(value: unknown, formatter: K, options?: AXFormatOptionsMap[K]): string;\n\n // Overload for starting fluent API chain\n format(value: unknown): AXFormatFluent;\n\n // Implementation of the format method\n format<K extends keyof AXFormatOptionsMap>(value: unknown, formatter?: K, options?: AXFormatOptionsMap[K]): string | AXFormatFluent {\n if (typeof formatter === 'string') {\n const formatterRef = this.pluginRegistry.get(formatter);\n return formatterRef.format(value, options);\n } else {\n return new AXFormatFluent(this, this.pluginRegistry, value);\n }\n }\n}\n\nclass AXFormatFluent {\n constructor(\n private formatService: AXFormatService,\n private pluginRegistry: AXFormatterRegistryService,\n private initialValue: unknown,\n ) { }\n\n /**\n * Formats the value using the specified formatter and options.\n * @param formatter The name of the formatter to use.\n * @param options The options to pass to the formatter.\n * @returns The formatted string.\n */\n to<K extends keyof AXFormatOptionsMap>(formatter: K, options?: AXFormatOptionsMap[K]): string {\n try {\n const formatterRef = this.pluginRegistry.get(formatter);\n return formatterRef.format(this.initialValue, options);\n } catch (error) {\n return String(this.initialValue);\n }\n }\n}\n","import { Directive, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { AXFormatService } from './format.service';\nimport { AXFormatOptionsMap } from './format.types';\n\n@Directive({\n selector: '[formatter]',\n standalone: true,\n})\nexport class AXFormatterDirective implements OnInit {\n constructor(\n private templateRef: TemplateRef<any>,\n private viewContainer: ViewContainerRef,\n private formatService: AXFormatService,\n ) { }\n\n ngOnInit() {\n this.viewContainer.clear();\n this.viewContainer.createEmbeddedView(this.templateRef, {\n $implicit: <K extends keyof AXFormatOptionsMap>(value: unknown, formatter: K, options?: AXFormatOptionsMap[K]) => {\n return this.formatService.format(value, formatter, options);\n },\n });\n }\n}\n","import { Injectable } from '@angular/core';\nimport { defaults, isInteger, padStart } from 'lodash-es';\nimport { AXFormatter } from '../format.config';\nimport { AXFormatOptions } from '../format.types';\n\nexport interface AXNumberFormatterOptions extends AXFormatOptions {\n decimalPlaces?: number;\n thousandSeparator?: string;\n decimalSeparator?: string;\n zeroPadLength?: number; // New option for zero padding,\n locale?: string;\n}\n\ndeclare module '../format.types' {\n interface AXFormatOptionsMap {\n number: AXNumberFormatterOptions;\n }\n}\n\n@Injectable()\nexport class AXNumberFormatter implements AXFormatter {\n private separatorsCache: any = {};\n\n get name(): string {\n return 'number';\n }\n\n format(value: number, options: AXNumberFormatterOptions): string {\n const { thousandSeparator, decimalSeparator } = this.getLocaleSeparators(options?.locale);\n // Merge user options with default options\n const effectiveOptions = defaults({}, options, {\n thousandSeparator,\n decimalSeparator,\n zeroPadLength: 0,\n locale: navigator.language,\n });\n\n const sign = value < 0 ? '-' : '';\n const absoluteValue = Math.abs(value);\n\n // Handling zero padding for integer part\n let integerPart = Math.floor(absoluteValue).toString();\n if (effectiveOptions.zeroPadLength && effectiveOptions.zeroPadLength > integerPart.length) {\n integerPart = padStart(integerPart, effectiveOptions.zeroPadLength, '0');\n }\n\n // Applying thousand separator to integer part\n if (effectiveOptions.thousandSeparator) {\n integerPart = integerPart.replace(/\\B(?=(\\d{3})+(?!\\d))/g, effectiveOptions.thousandSeparator);\n }\n\n // Constructing the final formatted value\n let formattedValue = sign + integerPart;\n if (effectiveOptions.decimalPlaces !== undefined) {\n // Limiting decimal places if specified\n const decimalPart = absoluteValue.toFixed(effectiveOptions.decimalPlaces).split('.')[1];\n formattedValue += effectiveOptions.decimalSeparator + decimalPart;\n } else if (!isInteger(value)) {\n // Showing full decimal part if decimalPlaces is not specified\n const decimalPart = absoluteValue.toString().split('.')[1] || '';\n if (decimalPart.length > 0) {\n formattedValue += effectiveOptions.decimalSeparator + decimalPart;\n }\n }\n\n return formattedValue;\n }\n\n private getLocaleSeparators(locale = navigator.language): {\n thousandSeparator: string;\n decimalSeparator: string;\n } {\n // Use cache if available\n if (this.separatorsCache[locale]) {\n return this.separatorsCache[locale];\n }\n\n const numberFormat = new Intl.NumberFormat(locale);\n const parts = numberFormat.formatToParts(1234567.89);\n let thousandSeparator = '';\n let decimalSeparator = '';\n\n for (const part of parts) {\n if (part.type === 'group') {\n thousandSeparator = part.value;\n } else if (part.type === 'decimal') {\n decimalSeparator = part.value;\n }\n }\n\n // Cache the result\n this.separatorsCache[locale] = { thousandSeparator, decimalSeparator };\n return this.separatorsCache[locale];\n }\n}\n","import { get } from 'lodash-es';\nimport { AXFormatter } from '../format.config';\nimport { AXFormatOptions } from '../format.types';\n\nexport interface AXStringFormatterOptions extends AXFormatOptions {\n [key: string]: any;\n}\n\ndeclare module '../format.types' {\n interface AXFormatOptionsMap {\n string: AXStringFormatterOptions;\n }\n}\n\nexport class AXStringFormatter implements AXFormatter {\n get name(): string {\n return 'string';\n }\n\n format(value: unknown, options: AXStringFormatterOptions): string {\n if (typeof value != 'string') return String(value);\n const result = get(options, value)\n ? get(options, value)\n : value.replace(/{{\\s*([^}]+)\\s*}}/g, (match, path: string) => {\n return (get(options, path.trim()) as string) ?? match;\n });\n\n return result;\n }\n}\n","import { AXEventData, AXEventService } from '@acorex/core/events';\nimport { Pipe, PipeTransform, inject } from '@angular/core';\nimport { Observable, filter, of, startWith, switchMap } from 'rxjs';\nimport { AXFormatService } from './format.service';\nimport { AXFormatOptions } from './format.types';\n\nenum AXLocaleEvents {\n AXLocaleChanged = 'AX_LOCALE_CHANGED',\n AXLocaleLoaded = 'AX_LOCALE_LOADED',\n //\n AXCalendarChanged = 'AX_CALENDAR_CHANGED',\n //\n AXLanguageChanged = 'AX_LANGUAGE_CHANGED',\n AXLanguageLoaded = 'AX_LANGUAGE_LOADED',\n}\n\n\n@Pipe({\n name: 'format',\n standalone: true,\n pure: true,\n})\nexport class AXFormatPipe implements PipeTransform {\n private formatService = inject(AXFormatService);\n private eventService = inject(AXEventService);\n\n private triggers = [...Object.values(AXLocaleEvents).map((event) => event as string)];\n\n transform(value: unknown, name: string, options?: AXFormatOptions | string): Observable<string> {\n // Initial formatted value\n const initialFormattedValue = this.formatService.format(value, name as any, options);\n\n // React to language changes and re-format the value\n return this.eventService.onEvent.pipe(\n filter((event: AXEventData) => this.triggers.includes(event.type as AXLocaleEvents)),\n startWith(initialFormattedValue), // Emit the initial formatted value immediately\n switchMap((event) => {\n // Re-call format method on every language change\n const formattedValue = this.formatService.format(value, name as any, options);\n return of(formattedValue);\n }),\n );\n }\n}\n","import { Inject, ModuleWithProviders, NgModule } from '@angular/core';\nimport { AXFormatter } from './format.config';\nimport { AXFormatterDirective } from './format.directive';\nimport { AXFormatterRegistryService } from './format.service';\nimport { AXNumberFormatter } from './formatters/number.formatter';\nimport { AXStringFormatter } from './formatters/string.formatter';\nimport { AXFormatPipe } from './format.pipe';\n\nconst BUILT_IN_RULES = [AXNumberFormatter, AXStringFormatter];\n\nexport interface AXFormatModuleConfigs {\n formatters: (new () => AXFormatter)[];\n}\n\n@NgModule({\n imports: [AXFormatterDirective, AXFormatPipe],\n exports: [AXFormatterDirective, AXFormatPipe],\n})\nexport class AXFormatModule {\n static forRoot(configs?: AXFormatModuleConfigs): ModuleWithProviders<AXFormatModule> {\n return {\n ngModule: AXFormatModule,\n providers: [\n ...(configs?.formatters || []),\n {\n provide: 'AXFormatModuleFactory',\n useFactory: (pluginRegistry: AXFormatterRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.formatters || [])]);\n },\n deps: [AXFormatterRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n static forChild(configs?: AXFormatModuleConfigs): ModuleWithProviders<AXFormatModule> {\n return {\n ngModule: AXFormatModule,\n providers: [\n ...(configs?.formatters || []),\n {\n provide: 'AXFormatModuleFactory',\n useFactory: (pluginRegistry: AXFormatterRegistryService) => () => {\n pluginRegistry.register(...[...BUILT_IN_RULES, ...(configs?.formatters || [])]);\n },\n deps: [AXFormatterRegistryService],\n multi: true,\n },\n ],\n };\n }\n\n /**\n * @ignore\n */\n constructor(@Inject('AXFormatModuleFactory') instances: any[]) {\n instances.forEach((f) => {\n f();\n });\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["i1.AXFormatService"],"mappings":";;;;;;MAEsB,WAAW,CAAA;AAGhC;;MCGY,0BAA0B,CAAA;AAKrC,IAAA,WAAA,CAAY,QAAkB,EAAA;QAJtB,IAAO,CAAA,OAAA,GAAkB,EAAE;AAKjC,QAAA,IAAI,CAAC,QAAQ,GAAG,QAAQ;;IAG1B,QAAQ,CAAC,GAAG,OAAkC,EAAA;AAC5C,QAAA,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,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KAAI;AACtB,YAAA,CAAC,EAAE;AACL,SAAC,CAAC;;AAzCO,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,kBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,kBAsCL,uBAAuB,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAtChC,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,cAAc,YAHf,oBAAoB,EAAE,YAAY,CAClC,EAAA,OAAA,EAAA,CAAA,oBAAoB,EAAE,YAAY,CAAA,EAAA,CAAA,CAAA;+GAEjC,cAAc,EAAA,CAAA,CAAA;;2FAAd,cAAc,EAAA,UAAA,EAAA,CAAA;kBAJ1B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,YAAY,CAAC;AAC7C,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,YAAY,CAAC;AAC9C,iBAAA;;0BAuCc,MAAM;2BAAC,uBAAuB;;;ACxD7C;;AAEG;;;;"}
|
@@ -40,10 +40,10 @@ class AXImageService {
|
|
40
40
|
canvas.getContext('2d').drawImage(image, 0, 0, width, height);
|
41
41
|
return new Promise((resolve) => canvas.toBlob(resolve, options.type, options.quality));
|
42
42
|
}
|
43
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.
|
44
|
-
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.
|
43
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXImageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
44
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXImageService }); }
|
45
45
|
}
|
46
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.
|
46
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: AXImageService, decorators: [{
|
47
47
|
type: Injectable
|
48
48
|
}] });
|
49
49
|
|
@@ -0,0 +1,64 @@
|
|
1
|
+
const AXAURegionalConfig = {
|
2
|
+
localeInfo: {
|
3
|
+
code: 'en-AU',
|
4
|
+
language: 'en',
|
5
|
+
region: 'AU',
|
6
|
+
timezone: 'Australia/Sydney',
|
7
|
+
},
|
8
|
+
calendar: {
|
9
|
+
system: 'gregorian',
|
10
|
+
week: {
|
11
|
+
startsOn: 1, // Monday
|
12
|
+
weekends: [0, 6], // Sunday + Saturday
|
13
|
+
},
|
14
|
+
clock: {
|
15
|
+
format24Hour: true,
|
16
|
+
},
|
17
|
+
},
|
18
|
+
formats: {
|
19
|
+
date: {
|
20
|
+
short: 'DD/MM/YY',
|
21
|
+
medium: 'DD MMM YYYY',
|
22
|
+
long: 'DD MMMM YYYY',
|
23
|
+
full: 'dddd, DD MMMM YYYY',
|
24
|
+
},
|
25
|
+
time: {
|
26
|
+
short: 'HH:mm',
|
27
|
+
medium: 'HH:mm:ss',
|
28
|
+
long: 'HH:mm:ss Z',
|
29
|
+
full: 'HH:mm:ss ZZZZ',
|
30
|
+
},
|
31
|
+
datetime: {
|
32
|
+
short: 'DD/MM/YY HH:mm',
|
33
|
+
medium: 'DD MMM YYYY HH:mm:ss',
|
34
|
+
long: 'DD MMMM YYYY HH:mm:ss Z',
|
35
|
+
full: 'dddd, DD MMMM YYYY HH:mm:ss ZZZZ',
|
36
|
+
},
|
37
|
+
numbers: {
|
38
|
+
decimalPattern: '1,000.00',
|
39
|
+
currency: {
|
40
|
+
code: 'AUD',
|
41
|
+
},
|
42
|
+
},
|
43
|
+
contacts: {
|
44
|
+
phone: '04XX XXX XXX',
|
45
|
+
postalCode: '0000',
|
46
|
+
},
|
47
|
+
},
|
48
|
+
units: {
|
49
|
+
temperature: 'celsius',
|
50
|
+
distance: 'kilometers',
|
51
|
+
weight: 'kilograms',
|
52
|
+
volume: 'liters',
|
53
|
+
speed: 'km/h',
|
54
|
+
area: 'square-meters',
|
55
|
+
},
|
56
|
+
i18nMeta: {
|
57
|
+
rtl: false,
|
58
|
+
fallbackLocales: ['en-AU'],
|
59
|
+
supportedLanguages: ['en-AU'],
|
60
|
+
},
|
61
|
+
};
|
62
|
+
|
63
|
+
export { AXAURegionalConfig };
|
64
|
+
//# sourceMappingURL=acorex-core-locale-en-AU.profile-BW-_9tgT.mjs.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"acorex-core-locale-en-AU.profile-BW-_9tgT.mjs","sources":["../../../../libs/core/locale/src/lib/profiles/en-AU.profile.ts"],"sourcesContent":["import { AXLocaleProfile } from \"../locale.types\";\n\nexport const AXAURegionalConfig: AXLocaleProfile = {\n localeInfo: {\n code: 'en-AU',\n language: 'en',\n region: 'AU',\n timezone: 'Australia/Sydney',\n },\n calendar: {\n system: 'gregorian',\n week: {\n startsOn: 1, // Monday\n weekends: [0, 6], // Sunday + Saturday\n },\n clock: {\n format24Hour: true,\n },\n },\n formats: {\n date: {\n short: 'DD/MM/YY',\n medium: 'DD MMM YYYY',\n long: 'DD MMMM YYYY',\n full: 'dddd, DD MMMM YYYY',\n },\n time: {\n short: 'HH:mm',\n medium: 'HH:mm:ss',\n long: 'HH:mm:ss Z',\n full: 'HH:mm:ss ZZZZ',\n },\n datetime: {\n short: 'DD/MM/YY HH:mm',\n medium: 'DD MMM YYYY HH:mm:ss',\n long: 'DD MMMM YYYY HH:mm:ss Z',\n full: 'dddd, DD MMMM YYYY HH:mm:ss ZZZZ',\n },\n numbers: {\n decimalPattern: '1,000.00',\n currency: {\n code: 'AUD',\n },\n },\n contacts: {\n phone: '04XX XXX XXX',\n postalCode: '0000',\n },\n },\n\n units: {\n temperature: 'celsius',\n distance: 'kilometers',\n weight: 'kilograms',\n volume: 'liters',\n speed: 'km/h',\n area: 'square-meters',\n },\n\n i18nMeta: {\n rtl: false,\n fallbackLocales: ['en-AU'],\n supportedLanguages: ['en-AU'],\n },\n};\n"],"names":[],"mappings":"AAEa,MAAA,kBAAkB,GAAoB;AAC/C,IAAA,UAAU,EAAE;AACR,QAAA,IAAI,EAAE,OAAO;AACb,QAAA,QAAQ,EAAE,IAAI;AACd,QAAA,MAAM,EAAE,IAAI;AACZ,QAAA,QAAQ,EAAE,kBAAkB;AAC/B,KAAA;AACD,IAAA,QAAQ,EAAE;AACN,QAAA,MAAM,EAAE,WAAW;AACnB,QAAA,IAAI,EAAE;YACF,QAAQ,EAAE,CAAC;AACX,YAAA,QAAQ,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;AACnB,SAAA;AACD,QAAA,KAAK,EAAE;AACH,YAAA,YAAY,EAAE,IAAI;AACrB,SAAA;AACJ,KAAA;AACD,IAAA,OAAO,EAAE;AACL,QAAA,IAAI,EAAE;AACF,YAAA,KAAK,EAAE,UAAU;AACjB,YAAA,MAAM,EAAE,aAAa;AACrB,YAAA,IAAI,EAAE,cAAc;AACpB,YAAA,IAAI,EAAE,oBAAoB;AAC7B,SAAA;AACD,QAAA,IAAI,EAAE;AACF,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,UAAU;AAClB,YAAA,IAAI,EAAE,YAAY;AAClB,YAAA,IAAI,EAAE,eAAe;AACxB,SAAA;AACD,QAAA,QAAQ,EAAE;AACN,YAAA,KAAK,EAAE,gBAAgB;AACvB,YAAA,MAAM,EAAE,sBAAsB;AAC9B,YAAA,IAAI,EAAE,yBAAyB;AAC/B,YAAA,IAAI,EAAE,kCAAkC;AAC3C,SAAA;AACD,QAAA,OAAO,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