@acorex/core 5.0.3 → 5.0.7

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 (46) hide show
  1. package/README.md +24 -24
  2. package/acorex-core.d.ts +5 -5
  3. package/bundles/acorex-core.umd.js +1238 -818
  4. package/bundles/acorex-core.umd.js.map +1 -1
  5. package/esm2015/acorex-core.js +4 -4
  6. package/esm2015/lib/config/configs.js +30 -29
  7. package/esm2015/lib/core.module.js +18 -18
  8. package/esm2015/lib/dateTime/datetime.class.js +260 -236
  9. package/esm2015/lib/dateTime/datetime.module.js +31 -18
  10. package/esm2015/lib/dateTime/datetime.pipe.js +25 -25
  11. package/esm2015/lib/dateTime/georgian.calendar.js +162 -145
  12. package/esm2015/lib/dateTime/index.js +5 -5
  13. package/esm2015/lib/dateTime/jalali.calendar.js +327 -0
  14. package/esm2015/lib/platform/index.js +1 -1
  15. package/esm2015/lib/platform/platform.service.js +119 -119
  16. package/esm2015/lib/translation/index.js +4 -4
  17. package/esm2015/lib/translation/translation.module.js +18 -18
  18. package/esm2015/lib/translation/translator.js +26 -26
  19. package/esm2015/lib/translation/translator.pipe.js +15 -15
  20. package/esm2015/lib/utils/drawing-util.js +27 -0
  21. package/esm2015/lib/utils/index.js +4 -3
  22. package/esm2015/lib/utils/object-util.js +83 -83
  23. package/esm2015/lib/utils/safe.pipe.js +30 -30
  24. package/esm2015/public-api.js +11 -11
  25. package/fesm2015/acorex-core.js +1120 -715
  26. package/fesm2015/acorex-core.js.map +1 -1
  27. package/lib/config/configs.d.ts +9 -9
  28. package/lib/core.module.d.ts +7 -7
  29. package/lib/dateTime/datetime.class.d.ts +86 -96
  30. package/lib/dateTime/datetime.module.d.ts +8 -7
  31. package/lib/dateTime/datetime.pipe.d.ts +8 -8
  32. package/lib/dateTime/georgian.calendar.d.ts +19 -17
  33. package/lib/dateTime/index.d.ts +4 -4
  34. package/lib/dateTime/jalali.calendar.d.ts +34 -0
  35. package/lib/platform/index.d.ts +1 -1
  36. package/lib/platform/platform.service.d.ts +22 -22
  37. package/lib/translation/index.d.ts +3 -3
  38. package/lib/translation/translation.module.d.ts +7 -7
  39. package/lib/translation/translator.d.ts +9 -9
  40. package/lib/translation/translator.pipe.d.ts +7 -7
  41. package/lib/utils/drawing-util.d.ts +17 -0
  42. package/lib/utils/index.d.ts +3 -2
  43. package/lib/utils/object-util.d.ts +7 -7
  44. package/lib/utils/safe.pipe.d.ts +10 -10
  45. package/package.json +17 -17
  46. package/public-api.d.ts +10 -10
@@ -30,850 +30,1270 @@
30
30
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
31
31
  var merge__default = /*#__PURE__*/_interopDefaultLegacy(merge);
32
32
 
33
- // @dynamic
34
- var AXObjectUtil = /** @class */ (function () {
35
- function AXObjectUtil() {
36
- }
37
- AXObjectUtil.deepJSONClone = function (obj) {
38
- return obj ? JSON.parse(JSON.stringify(obj)) : null;
39
- };
40
- AXObjectUtil.deepCopy = function (obj) {
41
- var copy;
42
- // Handle the 3 simple types, and null or undefined
43
- if (null == obj || 'object' !== typeof obj) {
44
- return obj;
45
- }
46
- // Handle Date
47
- if (obj instanceof Date) {
48
- copy = new Date();
49
- copy.setTime(obj.getTime());
50
- return copy;
51
- }
52
- // Handle Array
53
- if (obj instanceof Array) {
54
- copy = [];
55
- for (var i = 0, len = obj.length; i < len; i++) {
56
- copy[i] = AXObjectUtil.deepCopy(obj[i]);
57
- }
58
- return copy;
59
- }
60
- // Handle Object
61
- if (obj instanceof Object) {
62
- copy = {};
63
- for (var attr in obj) {
64
- if (obj.hasOwnProperty(attr)) {
65
- copy[attr] = AXObjectUtil.deepCopy(obj[attr]);
66
- }
67
- }
68
- return copy;
69
- }
70
- throw new Error('Unable to copy obj! Its type isn\'t supported.');
71
- };
72
- AXObjectUtil.fetchProp = function (obj, prop) {
73
- if (typeof obj === 'undefined') {
74
- return false;
75
- }
76
- var index = prop.indexOf('.');
77
- if (index > -1) {
78
- return AXObjectUtil.fetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));
79
- }
80
- return obj[prop];
81
- };
82
- AXObjectUtil.getPropByPath = function (obj, path, defaultVal) {
83
- path = path
84
- .replace(/\[/g, '.')
85
- .replace(/]/g, '')
86
- .split('.');
87
- path.forEach(function (level) {
88
- if (obj) {
89
- obj = obj[level];
90
- }
91
- });
92
- if (obj === undefined) {
93
- return defaultVal;
94
- }
95
- return obj;
96
- };
97
- AXObjectUtil.setPropByPath = function (obj, path, value) {
98
- if (Object(obj) !== obj) {
99
- return obj;
100
- } // When obj is not an object
101
- // If not yet an array, get the keys from the string-path
102
- if (!Array.isArray(path)) {
103
- path = path.toString().match(/[^.[\]]+/g) || [];
104
- }
105
- path.slice(0, -1).reduce(function (a, c, i) {
106
- return Object(a[c]) === a[c] // Does the key exist and is its value an object?
107
- // Yes: then follow that path
108
- ? a[c]
109
- // No: create the key. Is the next key a potential array-index?
110
- : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1]
111
- ? [] // Yes: assign a new array object
112
- : {};
113
- }, // No: assign a new plain object
114
- obj)[path[path.length - 1]] = value; // Finally assign the value to the last key
115
- return obj; // Return the top-level object to allow chaining
116
- };
117
- return AXObjectUtil;
33
+ // @dynamic
34
+ var AXObjectUtil = /** @class */ (function () {
35
+ function AXObjectUtil() {
36
+ }
37
+ AXObjectUtil.deepJSONClone = function (obj) {
38
+ return obj ? JSON.parse(JSON.stringify(obj)) : null;
39
+ };
40
+ AXObjectUtil.deepCopy = function (obj) {
41
+ var copy;
42
+ // Handle the 3 simple types, and null or undefined
43
+ if (null == obj || 'object' !== typeof obj) {
44
+ return obj;
45
+ }
46
+ // Handle Date
47
+ if (obj instanceof Date) {
48
+ copy = new Date();
49
+ copy.setTime(obj.getTime());
50
+ return copy;
51
+ }
52
+ // Handle Array
53
+ if (obj instanceof Array) {
54
+ copy = [];
55
+ for (var i = 0, len = obj.length; i < len; i++) {
56
+ copy[i] = AXObjectUtil.deepCopy(obj[i]);
57
+ }
58
+ return copy;
59
+ }
60
+ // Handle Object
61
+ if (obj instanceof Object) {
62
+ copy = {};
63
+ for (var attr in obj) {
64
+ if (obj.hasOwnProperty(attr)) {
65
+ copy[attr] = AXObjectUtil.deepCopy(obj[attr]);
66
+ }
67
+ }
68
+ return copy;
69
+ }
70
+ throw new Error('Unable to copy obj! Its type isn\'t supported.');
71
+ };
72
+ AXObjectUtil.fetchProp = function (obj, prop) {
73
+ if (typeof obj === 'undefined') {
74
+ return false;
75
+ }
76
+ var index = prop.indexOf('.');
77
+ if (index > -1) {
78
+ return AXObjectUtil.fetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));
79
+ }
80
+ return obj[prop];
81
+ };
82
+ AXObjectUtil.getPropByPath = function (obj, path, defaultVal) {
83
+ path = path
84
+ .replace(/\[/g, '.')
85
+ .replace(/]/g, '')
86
+ .split('.');
87
+ path.forEach(function (level) {
88
+ if (obj) {
89
+ obj = obj[level];
90
+ }
91
+ });
92
+ if (obj === undefined) {
93
+ return defaultVal;
94
+ }
95
+ return obj;
96
+ };
97
+ AXObjectUtil.setPropByPath = function (obj, path, value) {
98
+ if (Object(obj) !== obj) {
99
+ return obj;
100
+ } // When obj is not an object
101
+ // If not yet an array, get the keys from the string-path
102
+ if (!Array.isArray(path)) {
103
+ path = path.toString().match(/[^.[\]]+/g) || [];
104
+ }
105
+ path.slice(0, -1).reduce(function (a, c, i) {
106
+ return Object(a[c]) === a[c] // Does the key exist and is its value an object?
107
+ // Yes: then follow that path
108
+ ? a[c]
109
+ // No: create the key. Is the next key a potential array-index?
110
+ : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1]
111
+ ? [] // Yes: assign a new array object
112
+ : {};
113
+ }, // No: assign a new plain object
114
+ obj)[path[path.length - 1]] = value; // Finally assign the value to the last key
115
+ return obj; // Return the top-level object to allow chaining
116
+ };
117
+ return AXObjectUtil;
118
118
  }());
119
119
 
120
- var AXSafePipe = /** @class */ (function () {
121
- function AXSafePipe(sanitizer) {
122
- this.sanitizer = sanitizer;
123
- }
124
- AXSafePipe.prototype.transform = function (value, type) {
125
- if (value == null || value == undefined || value == '')
126
- return null;
127
- switch (type) {
128
- case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);
129
- case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);
130
- case 'script': return this.sanitizer.bypassSecurityTrustScript(value);
131
- case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);
132
- case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);
133
- default: throw new Error("Invalid safe type specified: " + type);
134
- }
135
- };
136
- return AXSafePipe;
120
+ // @dynamic
121
+ var AXDrawingUtil = /** @class */ (function () {
122
+ function AXDrawingUtil() {
123
+ }
124
+ AXDrawingUtil.collision = function (a, b) {
125
+ var ac = a.getBoundingClientRect();
126
+ var bc = b.getBoundingClientRect();
127
+ if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left &&
128
+ ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
129
+ return true;
130
+ }
131
+ else {
132
+ return false;
133
+ }
134
+ };
135
+ AXDrawingUtil.isInElementBound = function (pos, element) {
136
+ var elBound = element.getBoundingClientRect();
137
+ return AXDrawingUtil.isInRecPoint(pos, {
138
+ left: elBound.x,
139
+ width: elBound.width,
140
+ top: elBound.y,
141
+ height: elBound.height
142
+ });
143
+ };
144
+ AXDrawingUtil.isInRecPoint = function (pos, rec) {
145
+ return pos.x >= rec.left && pos.x <= (rec.left + rec.width) && pos.y >= rec.top && (pos.y <= (rec.top + rec.height));
146
+ };
147
+ return AXDrawingUtil;
137
148
  }());
138
- AXSafePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXSafePipe, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
139
- AXSafePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXSafePipe, name: "safe" });
140
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXSafePipe, decorators: [{
141
- type: i0.Pipe,
142
- args: [{
143
- name: 'safe',
144
- pure: true
145
- }]
149
+
150
+ var AXSafePipe = /** @class */ (function () {
151
+ function AXSafePipe(sanitizer) {
152
+ this.sanitizer = sanitizer;
153
+ }
154
+ AXSafePipe.prototype.transform = function (value, type) {
155
+ if (value == null || value == undefined || value == '')
156
+ return null;
157
+ switch (type) {
158
+ case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);
159
+ case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);
160
+ case 'script': return this.sanitizer.bypassSecurityTrustScript(value);
161
+ case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);
162
+ case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);
163
+ default: throw new Error("Invalid safe type specified: " + type);
164
+ }
165
+ };
166
+ return AXSafePipe;
167
+ }());
168
+ AXSafePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXSafePipe, deps: [{ token: i1__namespace.DomSanitizer }], target: i0__namespace.ɵɵFactoryTarget.Pipe });
169
+ AXSafePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXSafePipe, name: "safe" });
170
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXSafePipe, decorators: [{
171
+ type: i0.Pipe,
172
+ args: [{
173
+ name: 'safe',
174
+ pure: true
175
+ }]
146
176
  }], ctorParameters: function () { return [{ type: i1__namespace.DomSanitizer }]; } });
147
177
 
148
- var AXCoreModule = /** @class */ (function () {
149
- function AXCoreModule() {
150
- }
151
- return AXCoreModule;
152
- }());
153
- AXCoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
154
- AXCoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
155
- AXCoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, providers: [], imports: [[]] });
156
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, decorators: [{
157
- type: i0.NgModule,
158
- args: [{
159
- imports: [],
160
- exports: [AXSafePipe],
161
- declarations: [AXSafePipe],
162
- providers: [],
163
- }]
178
+ var AXCoreModule = /** @class */ (function () {
179
+ function AXCoreModule() {
180
+ }
181
+ return AXCoreModule;
182
+ }());
183
+ AXCoreModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
184
+ AXCoreModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
185
+ AXCoreModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, providers: [], imports: [[]] });
186
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXCoreModule, decorators: [{
187
+ type: i0.NgModule,
188
+ args: [{
189
+ imports: [],
190
+ exports: [AXSafePipe],
191
+ declarations: [AXSafePipe],
192
+ providers: [],
193
+ }]
164
194
  }] });
165
195
 
166
- // @dynamic
167
- var AXConfig = /** @class */ (function () {
168
- function AXConfig() {
169
- }
170
- Object.defineProperty(AXConfig, "onChange", {
171
- get: function () {
172
- return AXConfig.dataChangeSubject.asObservable();
173
- },
174
- enumerable: false,
175
- configurable: true
176
- });
177
- AXConfig.set = function (arg1, arg2) {
178
- if (arg1 && typeof arg1 == 'string') {
179
- AXObjectUtil.setPropByPath(AXConfig.dataModel, arg1, arg2);
180
- AXConfig.dataChangeSubject.next(AXConfig.dataModel);
181
- return;
182
- }
183
- if (arg1 && typeof arg1 == 'object') {
184
- Object.assign(AXConfig.dataModel, arg1);
185
- AXConfig.dataChangeSubject.next(AXConfig.dataModel);
186
- return;
187
- }
188
- if (!arg1 && !arg2) {
189
- return AXConfig.dataChangeSubject.asObservable();
190
- }
191
- };
192
- AXConfig.get = function (path, defaultValue) {
193
- return AXObjectUtil.getPropByPath(AXConfig.dataModel, path) || defaultValue;
194
- };
195
- return AXConfig;
196
- }());
197
- AXConfig.dataModel = {};
196
+ // @dynamic
197
+ var AXConfig = /** @class */ (function () {
198
+ function AXConfig() {
199
+ }
200
+ Object.defineProperty(AXConfig, "onChange", {
201
+ get: function () {
202
+ return AXConfig.dataChangeSubject.asObservable();
203
+ },
204
+ enumerable: false,
205
+ configurable: true
206
+ });
207
+ AXConfig.set = function (arg1, arg2) {
208
+ if (arg1 && typeof arg1 == 'string') {
209
+ AXObjectUtil.setPropByPath(AXConfig.dataModel, arg1, arg2);
210
+ AXConfig.dataChangeSubject.next(AXConfig.dataModel);
211
+ return;
212
+ }
213
+ if (arg1 && typeof arg1 == 'object') {
214
+ //TODO : fix override
215
+ Object.assign(AXConfig.dataModel, arg1);
216
+ AXConfig.dataChangeSubject.next(AXConfig.dataModel);
217
+ return;
218
+ }
219
+ if (!arg1 && !arg2) {
220
+ return AXConfig.dataChangeSubject.asObservable();
221
+ }
222
+ };
223
+ AXConfig.get = function (path, defaultValue) {
224
+ return AXObjectUtil.getPropByPath(AXConfig.dataModel, path) || defaultValue;
225
+ };
226
+ return AXConfig;
227
+ }());
228
+ AXConfig.dataModel = {};
198
229
  AXConfig.dataChangeSubject = new rxjs.Subject();
199
230
 
200
- var AX_CALENDARS = [
201
- {
202
- name: 'gregorian',
203
- type: 'GeorgianCalendar'
204
- },
205
- {
206
- name: 'jalali',
207
- type: 'JalaliCalendar'
208
- }
209
- ];
210
- /**
211
- * Standard links:
212
- * {@link Foo} or {@linkplain Foo} or [[Foo]]
213
- *
214
- * Code links: (Puts Foo inside <code> tags)
215
- * {@linkcode Foo} or [[`Foo`]]
216
- */
217
- // @dynamic
218
- var AXDateTime = /** @class */ (function () {
219
- function AXDateTime(value, calendar) {
220
- if (value === void 0) { value = new Date(); }
221
- if (calendar === void 0) { calendar = AXConfig.get('dateTime.type') || 'gregorian'; }
222
- this._calendar =
223
- typeof calendar == 'string'
224
- ? eval("new " + AX_CALENDARS.find(function (c) { return c.name == calendar; }).type + "()")
225
- : calendar;
226
- if (value instanceof Date) {
227
- this._date = value;
228
- }
229
- else {
230
- this._date = new Date(value);
231
- }
232
- }
233
- AXDateTime.convert = function (value, calendar) {
234
- if (calendar === void 0) { calendar = AXConfig.get('dateTime.type') || 'gregorian'; }
235
- var date;
236
- if (typeof value === 'string' || value instanceof String) {
237
- date = new AXDateTime(value, calendar);
238
- }
239
- else if (value instanceof Date) {
240
- date = new AXDateTime(value, calendar);
241
- }
242
- else if (value instanceof AXDateTime) {
243
- date = new AXDateTime(value.date, calendar);
244
- }
245
- return date;
246
- };
247
- Object.defineProperty(AXDateTime.prototype, "date", {
248
- /**
249
- * This comment _supports_ [Markdown](https://marked.js.org/)
250
- */
251
- get: function () {
252
- return this._date;
253
- },
254
- enumerable: false,
255
- configurable: true
256
- });
257
- Object.defineProperty(AXDateTime.prototype, "calendar", {
258
- get: function () {
259
- return this._calendar;
260
- },
261
- enumerable: false,
262
- configurable: true
263
- });
264
- AXDateTime.prototype.clone = function () {
265
- return new AXDateTime(this.date, this.calendar.name());
266
- };
267
- Object.defineProperty(AXDateTime.prototype, "dayInMonth", {
268
- get: function () {
269
- return this._calendar.dayInMonth(this.date);
270
- },
271
- enumerable: false,
272
- configurable: true
273
- });
274
- Object.defineProperty(AXDateTime.prototype, "dayOfYear", {
275
- get: function () {
276
- return this._calendar.dayOfYear(this.date);
277
- },
278
- enumerable: false,
279
- configurable: true
280
- });
281
- Object.defineProperty(AXDateTime.prototype, "dayInWeek", {
282
- get: function () {
283
- return this._calendar.dayInWeek(this.date);
284
- },
285
- enumerable: false,
286
- configurable: true
287
- });
288
- Object.defineProperty(AXDateTime.prototype, "hour", {
289
- get: function () {
290
- return this._date.getHours();
291
- },
292
- enumerable: false,
293
- configurable: true
294
- });
295
- Object.defineProperty(AXDateTime.prototype, "minute", {
296
- get: function () {
297
- return this._date.getMinutes();
298
- },
299
- enumerable: false,
300
- configurable: true
301
- });
302
- Object.defineProperty(AXDateTime.prototype, "second", {
303
- get: function () {
304
- return this._date.getSeconds();
305
- },
306
- enumerable: false,
307
- configurable: true
308
- });
309
- Object.defineProperty(AXDateTime.prototype, "year", {
310
- get: function () {
311
- return this._calendar.year(this.date);
312
- },
313
- enumerable: false,
314
- configurable: true
315
- });
316
- Object.defineProperty(AXDateTime.prototype, "monthOfYear", {
317
- get: function () {
318
- return this._calendar.monthOfYear(this.date);
319
- },
320
- enumerable: false,
321
- configurable: true
322
- });
323
- Object.defineProperty(AXDateTime.prototype, "month", {
324
- get: function () {
325
- return new AXCalendarMonth(this);
326
- },
327
- enumerable: false,
328
- configurable: true
329
- });
330
- AXDateTime.prototype.add = function (unit, amount) {
331
- return this._calendar.add(this.date, unit, amount);
332
- };
333
- AXDateTime.prototype.set = function (unit, value) {
334
- if (unit === void 0) { unit = 'day'; }
335
- return this._calendar.set(this.date, unit, value);
336
- };
337
- AXDateTime.prototype.duration = function (end, unit) {
338
- if (unit === void 0) { unit = 'day'; }
339
- var range = new AXDateTimeRange(this, AXDateTime.convert(end, this.calendar.name()));
340
- return range.duration();
341
- };
342
- AXDateTime.prototype.startOf = function (unit) {
343
- if (unit === void 0) { unit = 'day'; }
344
- return this._calendar.startOf(this.date, unit);
345
- };
346
- AXDateTime.prototype.endOf = function (unit) {
347
- if (unit === void 0) { unit = 'day'; }
348
- return this._calendar.endOf(this.date, unit);
349
- };
350
- AXDateTime.prototype.format = function (format) {
351
- if (format === void 0) { format = AXConfig.get('dateTime.shortDateFormat') ||
352
- 'DDD, dd MMM yyyy'; }
353
- format = format.replace('ss', this.pad(this.date.getSeconds(), 2));
354
- format = format.replace('s', this.date.getSeconds().toString());
355
- format = format.replace('dd', this.pad(this.calendar.dayInMonth(this.date), 2));
356
- format = format.replace('d', this.calendar.dayInMonth(this.date).toString());
357
- format = format.replace('mm', this.pad(this.date.getMinutes(), 2));
358
- format = format.replace('m', this.date.getMinutes().toString());
359
- format = format.replace('MMMM', this.calendar.monthNames[this.calendar.monthOfYear(this.date) - 1]);
360
- format = format.replace('MMM', this.calendar.monthShortNames[this.calendar.monthOfYear(this.date) - 1]);
361
- format = format.replace('MM', this.pad(this.calendar.monthOfYear(this.date), 2));
362
- format = format.replace(/M(?![ao])/, this.calendar.monthOfYear(this.date).toString());
363
- format = format.replace('DDDD', this.calendar.dayNames[this.calendar.dayInWeek(this.date) - 1]);
364
- format = format.replace('DDD', this.calendar.dayShortNames[this.calendar.dayInWeek(this.date) - 1]);
365
- format = format.replace(/D(?!e)/, this.calendar.dayNames[this.calendar.dayInWeek(this.date) - 1].substring(0, 3));
366
- format = format.replace('yyyy', this.calendar.year(this.date).toString());
367
- format = format.replace('YYYY', this.calendar.year(this.date).toString());
368
- format = format.replace('yy', this.calendar.year(this.date).toString().substring(2));
369
- format = format.replace('YY', this.calendar.year(this.date).toString().substring(2));
370
- format = format.replace('HH', this.pad(this.date.getHours(), 2));
371
- format = format.replace('H', this.date.getHours().toString());
372
- return format;
373
- };
374
- AXDateTime.prototype.pad = function (n, width, z) {
375
- if (z === void 0) { z = '0'; }
376
- n = n + '';
377
- return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
378
- };
379
- AXDateTime.prototype.toString = function () {
380
- return this.format();
381
- };
382
- AXDateTime.prototype.equal = function (value, unit) {
383
- if (unit === void 0) { unit = 'day'; }
384
- return this.compaire(value, unit) == 0;
385
- };
386
- AXDateTime.prototype.compaire = function (value, unit) {
387
- if (unit === void 0) { unit = 'day'; }
388
- // TODO:
389
- var val = AXDateTime.convert(value);
390
- if (this.date == val.date) {
391
- return 0;
392
- }
393
- else if (this.date > val.date) {
394
- return 1;
395
- }
396
- else {
397
- return -1;
398
- }
399
- };
400
- AXDateTime.prototype.convert = function (calendar) {
401
- return AXDateTime.convert(this, calendar);
402
- };
403
- return AXDateTime;
404
- }());
405
- var AXCalendarMonth = /** @class */ (function () {
406
- function AXCalendarMonth(date) {
407
- this.index = date.date.getMonth();
408
- this.name = date.format('MMMM');
409
- this.range = new AXDateTimeRange(new AXDateTime(date.startOf('month').date, date.calendar), new AXDateTime(date.endOf('month').date, date.calendar));
410
- }
411
- Object.defineProperty(AXCalendarMonth.prototype, "range", {
412
- get: function () {
413
- return this._range;
414
- },
415
- set: function (v) {
416
- this._range = v;
417
- },
418
- enumerable: false,
419
- configurable: true
420
- });
421
- return AXCalendarMonth;
422
- }());
423
- var AXDateTimeRange = /** @class */ (function () {
424
- function AXDateTimeRange(startTime, endTime) {
425
- this.startTime = startTime;
426
- this.endTime = endTime;
427
- }
428
- AXDateTimeRange.prototype.duration = function () {
429
- var result = {
430
- miliseconds: 0,
431
- seconds: 0,
432
- minutes: 0,
433
- hours: 0,
434
- days: 0,
435
- months: 0,
436
- years: 0,
437
- total: {
438
- miliseconds: 0,
439
- seconds: 0,
440
- minutes: 0,
441
- hours: 0,
442
- days: 0,
443
- weeks: 0,
444
- months: 0,
445
- years: 0,
446
- },
447
- };
448
- var one_second = 1000;
449
- var one_min = one_second * 60;
450
- var one_hour = one_min * 60;
451
- var one_day = one_hour * 24;
452
- var one_week = one_day * 7;
453
- var one_year = 365.25 * one_day;
454
- var one_month = one_year / 12;
455
- var startTime = this.startTime.date.getTime();
456
- var endTime = this.endTime.date.getTime();
457
- var diff = Math.abs(endTime - startTime);
458
- //
459
- result.total.miliseconds = diff;
460
- result.total.seconds = Number((diff / one_second).toFixed(2));
461
- result.total.minutes = Number((diff / one_min).toFixed(2));
462
- result.total.hours = Number((diff / one_hour).toFixed(2));
463
- result.total.days = Number((diff / one_day).toFixed(2));
464
- result.total.weeks = Number((diff / one_week).toFixed(2));
465
- //
466
- // let months = (this.endTime.year - this.startTime.year) * 12;
467
- // months += this.endTime.monthOfYear - this.startTime.monthOfYear + 1;
468
- // if (this.endTime.dayOfYear < this.startTime.dayOfYear) {
469
- // months--;
470
- // }
471
- // result.total.months = Math.abs(months);
472
- // TODO: review
473
- result.total.months = Number((diff / one_month).toFixed(2));
474
- result.total.years = Number((diff / one_year).toFixed(2));
475
- //
476
- result.miliseconds = result.total.miliseconds % 1000;
477
- result.seconds = Number((result.total.seconds % 60).toFixed(0));
478
- result.minutes = Number((result.total.minutes % 60).toFixed(0));
479
- result.hours = Number((result.total.hours % 24).toFixed(0));
480
- // TODO: review
481
- result.days = Number((result.total.days % 30.4).toFixed(0));
482
- result.months = Number((result.total.months % 12).toFixed(0));
483
- result.years = Number(result.total.years.toFixed(0));
484
- return result;
485
- };
486
- AXDateTimeRange.prototype.enumurate = function (unit) {
487
- if (unit === void 0) { unit = 'day'; }
488
- // TODO: ??
489
- return [];
490
- };
491
- AXDateTimeRange.prototype.includes = function (value, unit) {
492
- if (unit === void 0) { unit = 'day'; }
493
- // TODO: ??
494
- return true;
495
- };
496
- return AXDateTimeRange;
231
+ // @dynamic
232
+ var AXDateTime = /** @class */ (function () {
233
+ function AXDateTime(value, calendar) {
234
+ if (value === void 0) { value = new Date(); }
235
+ if (calendar === void 0) { calendar = AXConfig.get('dateTime.type') || 'gregorian'; }
236
+ this._calendar =
237
+ // typeof calendar == 'string'
238
+ // ? eval(`new ${AX_CALENDARS.find((c) => c.name == calendar).type}()`)
239
+ // : calendar;
240
+ typeof calendar == 'string'
241
+ ? AXConfig.get("dateTime.calendars." + calendar)
242
+ : calendar;
243
+ if (value instanceof Date) {
244
+ this._date = value;
245
+ }
246
+ else {
247
+ this._date = new Date(value);
248
+ }
249
+ }
250
+ AXDateTime.convert = function (value, calendar) {
251
+ if (calendar === void 0) { calendar = AXConfig.get('dateTime.type') || 'gregorian'; }
252
+ var date;
253
+ if (typeof value === 'string' || value instanceof String) {
254
+ date = new AXDateTime(value, calendar);
255
+ }
256
+ else if (value instanceof Date) {
257
+ date = new AXDateTime(value, calendar);
258
+ }
259
+ else if (value instanceof AXDateTime) {
260
+ date = new AXDateTime(value.date, calendar);
261
+ }
262
+ return date;
263
+ };
264
+ Object.defineProperty(AXDateTime.prototype, "date", {
265
+ get: function () {
266
+ return this._date;
267
+ },
268
+ enumerable: false,
269
+ configurable: true
270
+ });
271
+ Object.defineProperty(AXDateTime.prototype, "calendar", {
272
+ get: function () {
273
+ return this._calendar;
274
+ },
275
+ enumerable: false,
276
+ configurable: true
277
+ });
278
+ AXDateTime.prototype.clone = function () {
279
+ return new AXDateTime(this.date, this.calendar.name());
280
+ };
281
+ Object.defineProperty(AXDateTime.prototype, "dayOfMonth", {
282
+ get: function () {
283
+ return this._calendar.dayOfMonth(this.date);
284
+ },
285
+ enumerable: false,
286
+ configurable: true
287
+ });
288
+ Object.defineProperty(AXDateTime.prototype, "dayOfYear", {
289
+ get: function () {
290
+ return this._calendar.dayOfYear(this.date);
291
+ },
292
+ enumerable: false,
293
+ configurable: true
294
+ });
295
+ Object.defineProperty(AXDateTime.prototype, "dayOfWeek", {
296
+ get: function () {
297
+ return this._calendar.dayOfWeek(this.date);
298
+ },
299
+ enumerable: false,
300
+ configurable: true
301
+ });
302
+ Object.defineProperty(AXDateTime.prototype, "hour", {
303
+ get: function () {
304
+ return this._date.getHours();
305
+ },
306
+ enumerable: false,
307
+ configurable: true
308
+ });
309
+ Object.defineProperty(AXDateTime.prototype, "minute", {
310
+ get: function () {
311
+ return this._date.getMinutes();
312
+ },
313
+ enumerable: false,
314
+ configurable: true
315
+ });
316
+ Object.defineProperty(AXDateTime.prototype, "second", {
317
+ get: function () {
318
+ return this._date.getSeconds();
319
+ },
320
+ enumerable: false,
321
+ configurable: true
322
+ });
323
+ Object.defineProperty(AXDateTime.prototype, "year", {
324
+ get: function () {
325
+ return this._calendar.year(this.date);
326
+ },
327
+ enumerable: false,
328
+ configurable: true
329
+ });
330
+ Object.defineProperty(AXDateTime.prototype, "monthOfYear", {
331
+ get: function () {
332
+ return this._calendar.monthOfYear(this.date);
333
+ },
334
+ enumerable: false,
335
+ configurable: true
336
+ });
337
+ Object.defineProperty(AXDateTime.prototype, "weekOfYear", {
338
+ get: function () {
339
+ return this._calendar.weekOfYear(this.date);
340
+ },
341
+ enumerable: false,
342
+ configurable: true
343
+ });
344
+ Object.defineProperty(AXDateTime.prototype, "month", {
345
+ get: function () {
346
+ return new AXCalendarMonth(this);
347
+ },
348
+ enumerable: false,
349
+ configurable: true
350
+ });
351
+ AXDateTime.prototype.add = function (unit, amount) {
352
+ return this._calendar.add(this.date, unit, amount);
353
+ };
354
+ AXDateTime.prototype.set = function (unit, value) {
355
+ if (unit === void 0) { unit = 'day'; }
356
+ return this._calendar.set(this.date, unit, value);
357
+ };
358
+ AXDateTime.prototype.duration = function (end, unit) {
359
+ if (unit === void 0) { unit = 'day'; }
360
+ var range = new AXDateTimeRange(this, AXDateTime.convert(end, this.calendar.name()));
361
+ return range.duration();
362
+ };
363
+ AXDateTime.prototype.startOf = function (unit) {
364
+ if (unit === void 0) { unit = 'day'; }
365
+ return this._calendar.startOf(this.date, unit);
366
+ };
367
+ AXDateTime.prototype.endOf = function (unit) {
368
+ if (unit === void 0) { unit = 'day'; }
369
+ return this._calendar.endOf(this.date, unit);
370
+ };
371
+ AXDateTime.prototype.format = function (format) {
372
+ if (format === void 0) { format = AXConfig.get('dateTime.shortDateFormat') ||
373
+ 'DDD, dd MMM yyyy'; }
374
+ format = format.replace('ss', this.pad(this.date.getSeconds(), 2));
375
+ format = format.replace('s', this.date.getSeconds().toString());
376
+ format = format.replace('dd', this.pad(this.calendar.dayOfMonth(this.date), 2));
377
+ format = format.replace('d', this.calendar.dayOfMonth(this.date).toString());
378
+ format = format.replace('mm', this.pad(this.date.getMinutes(), 2));
379
+ format = format.replace('m', this.date.getMinutes().toString());
380
+ format = format.replace('MMMM', this.calendar.monthNames[this.calendar.monthOfYear(this.date) - 1]);
381
+ format = format.replace('MMM', this.calendar.monthShortNames[this.calendar.monthOfYear(this.date) - 1]);
382
+ format = format.replace('MM', this.pad(this.calendar.monthOfYear(this.date), 2));
383
+ format = format.replace(/M(?![ao])/, this.calendar.monthOfYear(this.date).toString());
384
+ format = format.replace('DDDD', this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1]);
385
+ format = format.replace('DDD', this.calendar.dayShortNames[this.calendar.dayOfWeek(this.date) - 1]);
386
+ format = format.replace(/D(?!e)/, this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1].substring(0, 3));
387
+ format = format.replace('yyyy', this.calendar.year(this.date).toString());
388
+ format = format.replace('YYYY', this.calendar.year(this.date).toString());
389
+ format = format.replace('yy', this.calendar.year(this.date).toString().substring(2));
390
+ format = format.replace('YY', this.calendar.year(this.date).toString().substring(2));
391
+ format = format.replace('HH', this.pad(this.date.getHours(), 2));
392
+ format = format.replace('H', this.date.getHours().toString());
393
+ return format;
394
+ };
395
+ AXDateTime.prototype.pad = function (n, width, z) {
396
+ if (z === void 0) { z = '0'; }
397
+ n = n + '';
398
+ return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
399
+ };
400
+ AXDateTime.prototype.toString = function () {
401
+ return this.format();
402
+ };
403
+ AXDateTime.prototype.equal = function (value, unit) {
404
+ if (unit === void 0) { unit = 'day'; }
405
+ return this.compare(value, unit) == 0;
406
+ };
407
+ AXDateTime.prototype.compare = function (value, unit) {
408
+ if (unit === void 0) { unit = 'day'; }
409
+ var val = AXDateTime.convert(value);
410
+ var func = function (v1, v2) {
411
+ if (v1 == v2) {
412
+ return 0;
413
+ }
414
+ else if (v1 > v2) {
415
+ return 1;
416
+ }
417
+ else {
418
+ return -1;
419
+ }
420
+ };
421
+ var p = 0;
422
+ switch (unit) {
423
+ case 'year':
424
+ return func(this.year, val.year);
425
+ case 'week':
426
+ p = this.compare(val, 'year');
427
+ return p == 0 ? func(this.weekOfYear, val.weekOfYear) : p;
428
+ case 'month':
429
+ p = this.compare(val, 'year');
430
+ return p == 0 ? func(this.monthOfYear, val.monthOfYear) : p;
431
+ case 'day':
432
+ p = this.compare(val, 'year');
433
+ return p == 0 ? func(this.dayOfYear, val.dayOfYear) : p;
434
+ case 'hour':
435
+ p = this.compare(val, 'day');
436
+ return p == 0 ? func(this.hour, val.hour) : p;
437
+ case 'minute':
438
+ p = this.compare(val, 'hour');
439
+ return p == 0 ? func(this.minute, val.minute) : p;
440
+ case 'second':
441
+ p = this.compare(val, 'minute');
442
+ return p == 0 ? func(this.second, val.second) : p;
443
+ default:
444
+ return func(this.date.getTime(), val.date.getTime());
445
+ }
446
+ };
447
+ AXDateTime.prototype.convert = function (calendar) {
448
+ return AXDateTime.convert(this, calendar);
449
+ };
450
+ return AXDateTime;
451
+ }());
452
+ var AXCalendarMonth = /** @class */ (function () {
453
+ function AXCalendarMonth(date) {
454
+ this.index = date.date.getMonth();
455
+ this.name = date.format('MMMM');
456
+ this.range = new AXDateTimeRange(new AXDateTime(date.startOf('month').date, date.calendar), new AXDateTime(date.endOf('month').date, date.calendar));
457
+ }
458
+ Object.defineProperty(AXCalendarMonth.prototype, "range", {
459
+ get: function () {
460
+ return this._range;
461
+ },
462
+ set: function (v) {
463
+ this._range = v;
464
+ },
465
+ enumerable: false,
466
+ configurable: true
467
+ });
468
+ return AXCalendarMonth;
469
+ }());
470
+ var AXDateTimeRange = /** @class */ (function () {
471
+ function AXDateTimeRange(startTime, endTime) {
472
+ this._startTime = startTime;
473
+ this._endTime = endTime;
474
+ }
475
+ Object.defineProperty(AXDateTimeRange.prototype, "startTime", {
476
+ get: function () {
477
+ return this._startTime;
478
+ },
479
+ enumerable: false,
480
+ configurable: true
481
+ });
482
+ Object.defineProperty(AXDateTimeRange.prototype, "endTime", {
483
+ get: function () {
484
+ return this._endTime;
485
+ },
486
+ enumerable: false,
487
+ configurable: true
488
+ });
489
+ AXDateTimeRange.prototype.duration = function () {
490
+ var result = {
491
+ miliseconds: 0,
492
+ seconds: 0,
493
+ minutes: 0,
494
+ hours: 0,
495
+ days: 0,
496
+ months: 0,
497
+ years: 0,
498
+ total: {
499
+ miliseconds: 0,
500
+ seconds: 0,
501
+ minutes: 0,
502
+ hours: 0,
503
+ days: 0,
504
+ weeks: 0,
505
+ months: 0,
506
+ years: 0,
507
+ },
508
+ };
509
+ var one_second = 1000;
510
+ var one_min = one_second * 60;
511
+ var one_hour = one_min * 60;
512
+ var one_day = one_hour * 24;
513
+ var one_week = one_day * 7;
514
+ var one_year = 365.25 * one_day;
515
+ var one_month = one_year / 12;
516
+ var startTime = this._startTime.date.getTime();
517
+ var endTime = this._endTime.date.getTime();
518
+ var diff = Math.abs(endTime - startTime);
519
+ //
520
+ result.total.miliseconds = diff;
521
+ result.total.seconds = Number((diff / one_second).toFixed(2));
522
+ result.total.minutes = Number((diff / one_min).toFixed(2));
523
+ result.total.hours = Number((diff / one_hour).toFixed(2));
524
+ result.total.days = Number((diff / one_day).toFixed(2));
525
+ result.total.weeks = Number((diff / one_week).toFixed(2));
526
+ //
527
+ // let months = (this.endTime.year - this.startTime.year) * 12;
528
+ // months += this.endTime.monthOfYear - this.startTime.monthOfYear + 1;
529
+ // if (this.endTime.dayOfYear < this.startTime.dayOfYear) {
530
+ // months--;
531
+ // }
532
+ // result.total.months = Math.abs(months);
533
+ // TODO: review
534
+ result.total.months = Number((diff / one_month).toFixed(2));
535
+ result.total.years = Number((diff / one_year).toFixed(2));
536
+ //
537
+ result.miliseconds = result.total.miliseconds % 1000;
538
+ result.seconds = Number((result.total.seconds % 60).toFixed(0));
539
+ result.minutes = Number((result.total.minutes % 60).toFixed(0));
540
+ result.hours = Number((result.total.hours % 24).toFixed(0));
541
+ // TODO: review
542
+ result.days = Number((result.total.days % 30.4).toFixed(0));
543
+ result.months = Number((result.total.months % 12).toFixed(0));
544
+ result.years = Number(result.total.years.toFixed(0));
545
+ return result;
546
+ };
547
+ AXDateTimeRange.prototype.enumurate = function (unit, amount) {
548
+ if (unit === void 0) { unit = 'day'; }
549
+ if (amount === void 0) { amount = 1; }
550
+ // TODO: setptemper savingtime issue
551
+ var result = [];
552
+ var item = this._startTime.clone();
553
+ while (item.compare(this._endTime, unit) < 1) {
554
+ result.push(item);
555
+ item = item.add(unit, amount);
556
+ }
557
+ return result;
558
+ };
559
+ AXDateTimeRange.prototype.includes = function (value, unit) {
560
+ if (unit === void 0) { unit = 'day'; }
561
+ // TODO: ??
562
+ return true;
563
+ };
564
+ return AXDateTimeRange;
497
565
  }());
498
566
 
499
- var AXDateTimePipe = /** @class */ (function () {
500
- function AXDateTimePipe() {
501
- }
502
- AXDateTimePipe.prototype.transform = function (value, format, calendar) {
503
- if (value == null) {
504
- return '';
505
- }
506
- var date = value instanceof AXDateTime ? value.clone() : AXDateTime.convert(value, calendar);
507
- if (!format) {
508
- return date.toString();
509
- }
510
- else {
511
- return date.format(format);
512
- }
513
- };
514
- return AXDateTimePipe;
515
- }());
516
- AXDateTimePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
517
- AXDateTimePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimePipe, name: "axDate" });
518
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimePipe, decorators: [{
519
- type: i0.Pipe,
520
- args: [{ name: 'axDate' }]
567
+ var AXDateTimePipe = /** @class */ (function () {
568
+ function AXDateTimePipe() {
569
+ }
570
+ AXDateTimePipe.prototype.transform = function (value, format, calendar) {
571
+ if (value == null) {
572
+ return '';
573
+ }
574
+ var date = value instanceof AXDateTime ? value.clone() : AXDateTime.convert(value, calendar);
575
+ if (!format) {
576
+ return date.toString();
577
+ }
578
+ else {
579
+ return date.format(format);
580
+ }
581
+ };
582
+ return AXDateTimePipe;
583
+ }());
584
+ AXDateTimePipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimePipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
585
+ AXDateTimePipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimePipe, name: "axDate" });
586
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimePipe, decorators: [{
587
+ type: i0.Pipe,
588
+ args: [{ name: 'axDate' }]
521
589
  }], ctorParameters: function () { return []; } });
522
590
 
523
- var AXDateTimeModule = /** @class */ (function () {
524
- function AXDateTimeModule() {
525
- }
526
- return AXDateTimeModule;
591
+ var GeorgianCalendar = /** @class */ (function () {
592
+ function GeorgianCalendar() {
593
+ this.monthNames = [
594
+ "January", "February", "March",
595
+ "April", "May", "June", "July",
596
+ "August", "September", "October",
597
+ "November", "December"
598
+ ];
599
+ this.monthShortNames = [
600
+ "Jan", "Feb", "Mar",
601
+ "Apr", "May", "Jun", "Jul",
602
+ "Aug", "Sep", "Oct",
603
+ "Nov", "Dec"
604
+ ];
605
+ this.dayNames = [
606
+ "Sunday", "Monday", "Tuesday", "Wednesday",
607
+ "Thursday", "Friday", "Saturday"
608
+ ];
609
+ this.dayShortNames = [
610
+ "Sun", "Mon", "Tue", "Wed",
611
+ "Thu", "Fri", "Sat"
612
+ ];
613
+ }
614
+ GeorgianCalendar.prototype.name = function () {
615
+ return 'gregorian';
616
+ };
617
+ GeorgianCalendar.prototype.dayOfMonth = function (date) {
618
+ return date.getDate();
619
+ };
620
+ GeorgianCalendar.prototype.dayOfYear = function (date) {
621
+ var result = 0;
622
+ var m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
623
+ if (this.isLeap(date)) {
624
+ m[1] = 29;
625
+ }
626
+ for (var i = 0; i < date.getMonth(); i++) {
627
+ result = result + m[i];
628
+ }
629
+ result += date.getDate();
630
+ return result;
631
+ };
632
+ GeorgianCalendar.prototype.dayOfWeek = function (date) {
633
+ return date.getDay() + 1;
634
+ };
635
+ GeorgianCalendar.prototype.weekOfYear = function (date) {
636
+ var firstDay = new AXDateTime(date).startOf('year');
637
+ return Math.ceil((((date.getTime() - firstDay.date.getTime()) / 86400000) + firstDay.date.getDay() + 1) / 7);
638
+ };
639
+ GeorgianCalendar.prototype.year = function (date) {
640
+ return date.getFullYear();
641
+ };
642
+ GeorgianCalendar.prototype.monthOfYear = function (date) {
643
+ return date.getMonth() + 1;
644
+ };
645
+ GeorgianCalendar.prototype.add = function (date, unit, amount) {
646
+ var value = date.valueOf();
647
+ switch (unit) {
648
+ case 'second':
649
+ value += 1000 * amount;
650
+ break;
651
+ case 'minute':
652
+ value += 60000 * amount;
653
+ break;
654
+ case 'hour':
655
+ value += 3600000 * amount;
656
+ break;
657
+ case 'month':
658
+ var v = new Date(value);
659
+ var mo = date.getMonth();
660
+ var yr = date.getFullYear();
661
+ mo = (mo + amount) % 12;
662
+ if (0 > mo) {
663
+ yr += (date.getMonth() + amount - mo - 12) / 12;
664
+ mo += 12;
665
+ }
666
+ else
667
+ yr += ((date.getMonth() + amount - mo) / 12);
668
+ v.setMonth(mo);
669
+ v.setFullYear(yr);
670
+ value = v.valueOf();
671
+ break;
672
+ case 'week':
673
+ value += 7 * 86400000 * amount;
674
+ break;
675
+ case 'year':
676
+ var yv = new Date(value);
677
+ yv.setFullYear(yv.getFullYear() + amount);
678
+ value = yv.valueOf();
679
+ break;
680
+ case 'day':
681
+ default:
682
+ value += 86400000 * amount;
683
+ }
684
+ return new AXDateTime(new Date(value), this.name());
685
+ };
686
+ GeorgianCalendar.prototype.set = function (date, unit, value) {
687
+ throw new Error("Method not implemented.");
688
+ };
689
+ GeorgianCalendar.prototype.startOf = function (date, unit) {
690
+ var clone = new Date(date.valueOf());
691
+ switch (unit) {
692
+ case 'second':
693
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
694
+ return new AXDateTime(clone, this.name());
695
+ case 'minute':
696
+ clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
697
+ return new AXDateTime(clone, this.name());
698
+ case 'hour':
699
+ clone.setHours(clone.getHours(), 0, 0, 0);
700
+ return new AXDateTime(clone, this.name());
701
+ default:
702
+ case 'day':
703
+ clone.setHours(0, 0, 0, 0);
704
+ return new AXDateTime(clone, this.name());
705
+ case "week":
706
+ var index = 0;
707
+ var start = index >= 0 ? index : 0;
708
+ var day = clone.getDay();
709
+ var diff = clone.getDate() - day + (start > day ? start - 7 : start);
710
+ clone.setDate(diff);
711
+ return new AXDateTime(clone, this.name()).startOf('day');
712
+ case "month":
713
+ clone.setDate(1);
714
+ return new AXDateTime(clone, this.name()).startOf('day');
715
+ case "year":
716
+ clone.setMonth(0);
717
+ clone.setDate(1);
718
+ return new AXDateTime(clone, this.name()).startOf('day');
719
+ }
720
+ };
721
+ GeorgianCalendar.prototype.endOf = function (date, unit) {
722
+ var clone = new Date(date.valueOf());
723
+ switch (unit) {
724
+ case 'second':
725
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
726
+ return new AXDateTime(clone, this.name());
727
+ case 'minute':
728
+ clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
729
+ return new AXDateTime(clone, this.name());
730
+ case 'hour':
731
+ clone.setHours(clone.getHours(), 59, 59, 999);
732
+ return new AXDateTime(clone, this.name());
733
+ default:
734
+ case 'day':
735
+ clone.setHours(23, 59, 59, 999);
736
+ return new AXDateTime(clone, this.name());
737
+ case 'week':
738
+ return this.startOf(date, 'week').add('day', 6).endOf('day');
739
+ case 'month':
740
+ return new AXDateTime(new Date(date.getFullYear(), date.getMonth() + 1, 0), this.name()).endOf('day');
741
+ case "year":
742
+ clone.setMonth(11);
743
+ return new AXDateTime(clone, this.name()).endOf('month');
744
+ }
745
+ };
746
+ GeorgianCalendar.prototype.isLeap = function (date) {
747
+ var leapYear = new Date(date.getFullYear(), 1, 29);
748
+ return leapYear.getDate() == 29;
749
+ };
750
+ return GeorgianCalendar;
527
751
  }());
528
- AXDateTimeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
529
- AXDateTimeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
530
- AXDateTimeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, providers: [], imports: [[]] });
531
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, decorators: [{
532
- type: i0.NgModule,
533
- args: [{
534
- imports: [],
535
- exports: [AXDateTimePipe],
536
- declarations: [AXDateTimePipe],
537
- providers: [],
538
- }]
539
- }] });
540
752
 
541
- var GeorgianCalendar = /** @class */ (function () {
542
- function GeorgianCalendar() {
543
- this.monthNames = [
544
- "January", "February", "March",
545
- "April", "May", "June", "July",
546
- "August", "September", "October",
547
- "November", "December"
548
- ];
549
- this.monthShortNames = [
550
- "Jan", "Feb", "Mar",
551
- "Apr", "May", "Jun", "Jul",
552
- "Aug", "Sep", "Oct",
553
- "Nov", "Dec"
554
- ];
555
- this.dayNames = [
556
- "Sunday", "Monday", "Tuesday", "Wednesday",
557
- "Thursday", "Friday", "Saturday"
558
- ];
559
- this.dayShortNames = [
560
- "Sun", "Mon", "Tue", "Wed",
561
- "Thu", "Fri", "Sat"
562
- ];
563
- }
564
- GeorgianCalendar.prototype.name = function () {
565
- return 'gregorian';
566
- };
567
- GeorgianCalendar.prototype.dayInMonth = function (date) {
568
- return date.getDate();
569
- };
570
- GeorgianCalendar.prototype.dayOfYear = function (date) {
571
- var start = +new Date(date.getFullYear(), 0, 0);
572
- var diff = +date - start;
573
- var oneDay = 1000 * 60 * 60 * 24;
574
- return Math.floor(diff / oneDay);
575
- };
576
- GeorgianCalendar.prototype.dayInWeek = function (date) {
577
- return date.getDay() + 1;
578
- };
579
- GeorgianCalendar.prototype.year = function (date) {
580
- return date.getFullYear();
581
- };
582
- GeorgianCalendar.prototype.monthOfYear = function (date) {
583
- return date.getMonth() + 1;
584
- };
585
- GeorgianCalendar.prototype.add = function (date, unit, amount) {
586
- var value = date.valueOf();
587
- switch (unit) {
588
- case 'second':
589
- value += 1000 * amount;
590
- break;
591
- case 'minute':
592
- value += 60000 * amount;
593
- break;
594
- case 'hour':
595
- value += 3600000 * amount;
596
- break;
597
- case 'month':
598
- var v = new Date(value);
599
- var mo = date.getMonth();
600
- var yr = date.getFullYear();
601
- mo = (mo + amount) % 12;
602
- if (0 > mo) {
603
- yr += (date.getMonth() + amount - mo - 12) / 12;
604
- mo += 12;
605
- }
606
- else
607
- yr += ((date.getMonth() + amount - mo) / 12);
608
- v.setMonth(mo);
609
- v.setFullYear(yr);
610
- value = v.valueOf();
611
- break;
612
- case 'week':
613
- value += 7 * 86400000 * amount;
614
- break;
615
- case 'year':
616
- var yv = new Date(value);
617
- yv.setFullYear(yv.getFullYear() + amount);
618
- value = v.valueOf();
619
- break;
620
- case 'day':
621
- default:
622
- value += 86400000 * amount;
623
- }
624
- return new AXDateTime(new Date(value), this.name());
625
- };
626
- GeorgianCalendar.prototype.set = function (date, unit, value) {
627
- throw new Error("Method not implemented.");
628
- };
629
- GeorgianCalendar.prototype.startOf = function (date, unit) {
630
- var clone = new Date(date.valueOf());
631
- switch (unit) {
632
- case 'second':
633
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
634
- return new AXDateTime(clone, this.name());
635
- case 'minute':
636
- clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
637
- return new AXDateTime(clone, this.name());
638
- case 'hour':
639
- clone.setHours(clone.getHours(), 0, 0, 0);
640
- return new AXDateTime(clone, this.name());
641
- default:
642
- case 'day':
643
- clone.setHours(0, 0, 0, 0);
644
- return new AXDateTime(clone, this.name());
645
- case "week":
646
- var diff = clone.getDate() - clone.getDay() + (clone.getDay() === 0 ? -6 : 1);
647
- clone.setDate(diff);
648
- return new AXDateTime(clone, this.name()).startOf('day');
649
- case "month":
650
- clone.setDate(1);
651
- return new AXDateTime(clone, this.name()).startOf('day');
652
- case "year":
653
- clone.setMonth(0);
654
- clone.setDate(1);
655
- return new AXDateTime(clone, this.name()).startOf('day');
656
- }
657
- };
658
- GeorgianCalendar.prototype.endOf = function (date, unit) {
659
- var clone = new Date(date.valueOf());
660
- switch (unit) {
661
- case 'second':
662
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
663
- return new AXDateTime(clone, this.name());
664
- case 'minute':
665
- clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
666
- return new AXDateTime(clone, this.name());
667
- case 'hour':
668
- clone.setHours(clone.getHours(), 59, 59, 999);
669
- return new AXDateTime(clone, this.name());
670
- default:
671
- case 'day':
672
- clone.setHours(23, 59, 59, 999);
673
- return new AXDateTime(clone, this.name());
674
- case 'week':
675
- return this.startOf(date, 'week').add('day', 6).endOf('day');
676
- case 'month':
677
- return new AXDateTime(new Date(date.getFullYear(), date.getMonth() + 1, 0), this.name()).endOf('day');
678
- case "year":
679
- clone.setMonth(11);
680
- return new AXDateTime(clone, this.name()).endOf('month');
681
- }
682
- };
683
- return GeorgianCalendar;
753
+ var JalaliCalendar = /** @class */ (function () {
754
+ function JalaliCalendar() {
755
+ this.monthNames = ("فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند").split("_");
756
+ this.monthShortNames = ("فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند").split("_");
757
+ this.dayNames = ("شنبه_یکشنبه_دوشنبه_سه شنبه_چهارشنبه_پنج شنبه_جمعه").split("_");
758
+ this.dayShortNames = "ش_ی_د_س_چ_پ_ج".split("_");
759
+ }
760
+ JalaliCalendar.prototype.name = function () {
761
+ return 'jalali';
762
+ };
763
+ JalaliCalendar.prototype.dayOfMonth = function (date) {
764
+ return this.toJalali(date).day;
765
+ };
766
+ JalaliCalendar.prototype.dayOfYear = function (date) {
767
+ var j = this.toJalali(date);
768
+ return (j.month <= 6 ? ((j.month - 1) * 31) : ((6 * 31) + (j.month - 7) * 30)) + j.day;
769
+ };
770
+ JalaliCalendar.prototype.dayOfWeek = function (date) {
771
+ return date.getDay() == 6 ? 1 : date.getDay() + 2;
772
+ };
773
+ JalaliCalendar.prototype.weekOfYear = function (date) {
774
+ //TODO : apply jalali
775
+ var firstDay = new AXDateTime(date).startOf('year');
776
+ return Math.ceil((((date.getTime() - firstDay.date.getTime()) / 86400000) + firstDay.date.getDay() + 1) / 7);
777
+ };
778
+ JalaliCalendar.prototype.year = function (date) {
779
+ return this.toJalali(date).year;
780
+ };
781
+ JalaliCalendar.prototype.monthOfYear = function (date) {
782
+ return this.toJalali(date).month;
783
+ };
784
+ JalaliCalendar.prototype.add = function (date, unit, amount) {
785
+ var value = date.valueOf();
786
+ switch (unit) {
787
+ case 'second':
788
+ value += 1000 * amount;
789
+ break;
790
+ case 'minute':
791
+ value += 60000 * amount;
792
+ break;
793
+ case 'hour':
794
+ value += 3600000 * amount;
795
+ break;
796
+ case 'month':
797
+ {
798
+ var v = new Date(value);
799
+ var jd = this.dayOfMonth(date);
800
+ var jm = this.monthOfYear(date);
801
+ var jy = this.year(date);
802
+ jm = (jm + amount) % 12;
803
+ if (0 > jm) {
804
+ jy += (this.monthOfYear(date) + amount - jm - 12) / 12;
805
+ jm += 12;
806
+ }
807
+ else {
808
+ jy += ((this.monthOfYear(date) + amount - jm) / 12);
809
+ }
810
+ var vv = this.toGregorian(jy, jm, jd);
811
+ v.setFullYear(vv.getFullYear());
812
+ v.setMonth(vv.getMonth());
813
+ v.setDate(vv.getDate());
814
+ value = v.valueOf();
815
+ break;
816
+ }
817
+ case 'week':
818
+ value += 7 * 86400000 * amount;
819
+ break;
820
+ case 'year':
821
+ {
822
+ var v = new Date(value);
823
+ var jd = this.dayOfMonth(date);
824
+ var jm = this.monthOfYear(date);
825
+ var jy = this.year(date);
826
+ var vv = this.toGregorian(jy + amount, jm, jd);
827
+ v.setFullYear(vv.getFullYear());
828
+ v.setMonth(vv.getMonth());
829
+ v.setDate(vv.getDate());
830
+ value = v.valueOf();
831
+ }
832
+ break;
833
+ case 'day':
834
+ default:
835
+ value += 86400000 * amount;
836
+ }
837
+ return new AXDateTime(new Date(value), this.name());
838
+ };
839
+ JalaliCalendar.prototype.set = function (date, unit, value) {
840
+ throw new Error("Method not implemented.");
841
+ };
842
+ JalaliCalendar.prototype.startOf = function (date, unit) {
843
+ var clone = new Date(date.valueOf());
844
+ switch (unit) {
845
+ case 'second':
846
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
847
+ return new AXDateTime(clone, this.name());
848
+ case 'minute':
849
+ clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
850
+ return new AXDateTime(clone, this.name());
851
+ case 'hour':
852
+ clone.setHours(clone.getHours(), 0, 0, 0);
853
+ return new AXDateTime(clone, this.name());
854
+ default:
855
+ case 'day':
856
+ clone.setHours(0, 0, 0, 0);
857
+ return new AXDateTime(clone, this.name());
858
+ case "week":
859
+ return new AXDateTime(clone, this.name()).add('day', -this.dayOfWeek(clone) + 1).startOf('day');
860
+ case "month":
861
+ {
862
+ var jy = this.year(date);
863
+ var jm = this.monthOfYear(date);
864
+ var gDate = this.toGregorian(jy, jm, 1);
865
+ return new AXDateTime(gDate, this.name()).startOf('day');
866
+ }
867
+ case "year":
868
+ {
869
+ var jy = this.year(date);
870
+ var gDate = this.toGregorian(jy, 1, 1);
871
+ return new AXDateTime(gDate, this.name()).startOf('day');
872
+ }
873
+ }
874
+ };
875
+ JalaliCalendar.prototype.endOf = function (date, unit) {
876
+ var clone = new Date(date.valueOf());
877
+ switch (unit) {
878
+ case 'second':
879
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
880
+ return new AXDateTime(clone, this.name());
881
+ case 'minute':
882
+ clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
883
+ return new AXDateTime(clone, this.name());
884
+ case 'hour':
885
+ clone.setHours(clone.getHours(), 59, 59, 999);
886
+ return new AXDateTime(clone, this.name());
887
+ default:
888
+ case 'day':
889
+ clone.setHours(23, 59, 59, 999);
890
+ return new AXDateTime(clone, this.name());
891
+ case 'week':
892
+ {
893
+ return this.startOf(date, 'week').add('day', 6).endOf('day');
894
+ }
895
+ case 'month':
896
+ {
897
+ var jy_1 = this.year(date);
898
+ var jm = this.monthOfYear(date);
899
+ var jd = this.monthLength(jy_1, jm);
900
+ var gDate_1 = this.toGregorian(jy_1, jm, jd);
901
+ return new AXDateTime(gDate_1, this.name()).endOf('day');
902
+ }
903
+ case "year":
904
+ var jy = this.year(date);
905
+ var gDate = this.toGregorian(jy, 12, this.monthLength(jy, 12));
906
+ return new AXDateTime(gDate, this.name()).endOf('day');
907
+ }
908
+ };
909
+ JalaliCalendar.prototype.toJalali = function (date) {
910
+ var gy = date.getFullYear();
911
+ var gm = date.getMonth() + 1;
912
+ var gd = date.getDate();
913
+ var r = this.d2j(this.g2d(gy, gm, gd));
914
+ return {
915
+ year: r.jy,
916
+ month: r.jm,
917
+ day: r.jd,
918
+ };
919
+ };
920
+ /*
921
+ Converts a Jalaali date to Gregorian.
922
+ */
923
+ JalaliCalendar.prototype.toGregorian = function (jy, jm, jd) {
924
+ var g = this.d2g(this.j2d(jy, jm, jd));
925
+ return new Date(g.gy, g.gm - 1, g.gd);
926
+ };
927
+ /*
928
+ Checks whether a Jalaali date is valid or not.
929
+ */
930
+ JalaliCalendar.prototype.isValid = function (jy, jm, jd) {
931
+ return jy >= -61 && jy <= 3177 &&
932
+ jm >= 1 && jm <= 12 &&
933
+ jd >= 1 && jd <= this.monthLength(jy, jm);
934
+ };
935
+ /*
936
+ Is this a leap year or not?
937
+ */
938
+ JalaliCalendar.prototype.isLeapYear = function (jy) {
939
+ return this.jalCal(jy).leap === 0;
940
+ };
941
+ /*
942
+ Number of days in a given month in a Jalaali year.
943
+ */
944
+ JalaliCalendar.prototype.monthLength = function (jy, jm) {
945
+ if (jm <= 6)
946
+ return 31;
947
+ if (jm <= 11)
948
+ return 30;
949
+ if (this.isLeapYear(jy))
950
+ return 30;
951
+ return 29;
952
+ };
953
+ JalaliCalendar.prototype.jalCal = function (jy) {
954
+ // Jalaali years starting the 33-year rule.
955
+ var breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210,
956
+ 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178
957
+ ], bl = breaks.length, gy = jy + 621, leapJ = -14, jp = breaks[0], jm, jump, leap, leapG, march, n, i;
958
+ if (jy < jp || jy >= breaks[bl - 1])
959
+ throw new Error('Invalid Jalaali year ' + jy);
960
+ // Find the limiting years for the Jalaali year jy.
961
+ for (i = 1; i < bl; i += 1) {
962
+ jm = breaks[i];
963
+ jump = jm - jp;
964
+ if (jy < jm)
965
+ break;
966
+ leapJ = leapJ + this.div(jump, 33) * 8 + this.div(this.mod(jump, 33), 4);
967
+ jp = jm;
968
+ }
969
+ n = jy - jp;
970
+ // Find the number of leap years from AD 621 to the beginning
971
+ // of the current Jalaali year in the Persian calendar.
972
+ leapJ = leapJ + this.div(n, 33) * 8 + this.div(this.mod(n, 33) + 3, 4);
973
+ if (this.mod(jump, 33) === 4 && jump - n === 4)
974
+ leapJ += 1;
975
+ // And the same in the Gregorian calendar (until the year gy).
976
+ leapG = this.div(gy, 4) - this.div((this.div(gy, 100) + 1) * 3, 4) - 150;
977
+ // Determine the Gregorian date of Farvardin the 1st.
978
+ march = 20 + leapJ - leapG;
979
+ // Find how many years have passed since the last leap year.
980
+ if (jump - n < 6)
981
+ n = n - jump + this.div(jump + 4, 33) * 33;
982
+ leap = this.mod(this.mod(n + 1, 33) - 1, 4);
983
+ if (leap === -1) {
984
+ leap = 4;
985
+ }
986
+ return {
987
+ leap: leap,
988
+ gy: gy,
989
+ march: march
990
+ };
991
+ };
992
+ /*
993
+ Converts a date of the Jalaali calendar to the Julian Day number.
994
+ @param jy Jalaali year (1 to 3100)
995
+ @param jm Jalaali month (1 to 12)
996
+ @param jd Jalaali day (1 to 29/31)
997
+ @return Julian Day number
998
+ */
999
+ JalaliCalendar.prototype.j2d = function (jy, jm, jd) {
1000
+ var r = this.jalCal(jy);
1001
+ return this.g2d(r.gy, 3, r.march) + (jm - 1) * 31 - this.div(jm, 7) * (jm - 7) + jd - 1;
1002
+ };
1003
+ /*
1004
+ Converts the Julian Day number to a date in the Jalaali calendar.
1005
+ @param jdn Julian Day number
1006
+ @return
1007
+ jy: Jalaali year (1 to 3100)
1008
+ jm: Jalaali month (1 to 12)
1009
+ jd: Jalaali day (1 to 29/31)
1010
+ */
1011
+ JalaliCalendar.prototype.d2j = function (jdn) {
1012
+ var gy = this.d2g(jdn).gy // Calculate Gregorian year (gy).
1013
+ , jy = gy - 621, r = this.jalCal(jy), jdn1f = this.g2d(gy, 3, r.march), jd, jm, k;
1014
+ // Find number of days that passed since 1 Farvardin.
1015
+ k = jdn - jdn1f;
1016
+ if (k >= 0) {
1017
+ if (k <= 185) {
1018
+ // The first 6 months.
1019
+ jm = 1 + this.div(k, 31);
1020
+ jd = this.mod(k, 31) + 1;
1021
+ return {
1022
+ jy: jy,
1023
+ jm: jm,
1024
+ jd: jd
1025
+ };
1026
+ }
1027
+ else {
1028
+ // The remaining months.
1029
+ k -= 186;
1030
+ }
1031
+ }
1032
+ else {
1033
+ // Previous Jalaali year.
1034
+ jy -= 1;
1035
+ k += 179;
1036
+ if (r.leap === 1)
1037
+ k += 1;
1038
+ }
1039
+ jm = 7 + this.div(k, 30);
1040
+ jd = this.mod(k, 30) + 1;
1041
+ return {
1042
+ jy: jy,
1043
+ jm: jm,
1044
+ jd: jd
1045
+ };
1046
+ };
1047
+ JalaliCalendar.prototype.g2d = function (gy, gm, gd) {
1048
+ var d = this.div((gy + this.div(gm - 8, 6) + 100100) * 1461, 4)
1049
+ + this.div(153 * this.mod(gm + 9, 12) + 2, 5)
1050
+ + gd - 34840408;
1051
+ d = d - this.div(this.div(gy + 100100 + this.div(gm - 8, 6), 100) * 3, 4) + 752;
1052
+ return d;
1053
+ };
1054
+ JalaliCalendar.prototype.d2g = function (jdn) {
1055
+ var j, i, gd, gm, gy;
1056
+ j = 4 * jdn + 139361631;
1057
+ j = j + this.div(this.div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;
1058
+ i = this.div(this.mod(j, 1461), 4) * 5 + 308;
1059
+ gd = this.div(this.mod(i, 153), 5) + 1;
1060
+ gm = this.mod(this.div(i, 153), 12) + 1;
1061
+ gy = this.div(j, 1461) - 100100 + this.div(8 - gm, 6);
1062
+ return {
1063
+ gy: gy,
1064
+ gm: gm,
1065
+ gd: gd
1066
+ };
1067
+ };
1068
+ /*
1069
+ Utility helper functions.
1070
+ */
1071
+ JalaliCalendar.prototype.div = function (a, b) {
1072
+ return ~~(a / b);
1073
+ };
1074
+ JalaliCalendar.prototype.mod = function (a, b) {
1075
+ return a - ~~(a / b) * b;
1076
+ };
1077
+ return JalaliCalendar;
684
1078
  }());
685
1079
 
686
- // @dynamic
687
- var AXTranslator = /** @class */ (function () {
688
- function AXTranslator() {
689
- }
690
- Object.defineProperty(AXTranslator, "onChange", {
691
- get: function () {
692
- return AXTranslator.dataChangeSubject.asObservable();
693
- },
694
- enumerable: false,
695
- configurable: true
696
- });
697
- AXTranslator.load = function (lang, value) {
698
- if (typeof value === 'object') {
699
- if (!AXTranslator["__data__" + lang]) {
700
- AXTranslator["__data__" + lang] = {};
701
- }
702
- AXTranslator["__data__" + lang] = merge__default['default'](AXTranslator["__data__" + lang], value);
703
- }
704
- };
705
- AXTranslator.use = function (lang) {
706
- AXTranslator.lang = lang;
707
- };
708
- AXTranslator.get = function (key, lang) {
709
- return AXObjectUtil.getPropByPath(AXTranslator["__data__" + (lang || AXTranslator.lang)], key) || key;
710
- };
711
- return AXTranslator;
712
- }());
713
- AXTranslator.lang = 'en';
1080
+ var AXDateTimeModule = /** @class */ (function () {
1081
+ function AXDateTimeModule() {
1082
+ AXConfig.set({
1083
+ dateTime: {
1084
+ calendars: {
1085
+ jalali: new JalaliCalendar(),
1086
+ gregorian: new GeorgianCalendar()
1087
+ }
1088
+ }
1089
+ });
1090
+ }
1091
+ return AXDateTimeModule;
1092
+ }());
1093
+ AXDateTimeModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1094
+ AXDateTimeModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
1095
+ AXDateTimeModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, providers: [], imports: [[]] });
1096
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXDateTimeModule, decorators: [{
1097
+ type: i0.NgModule,
1098
+ args: [{
1099
+ imports: [],
1100
+ exports: [AXDateTimePipe],
1101
+ declarations: [AXDateTimePipe],
1102
+ providers: [],
1103
+ }]
1104
+ }], ctorParameters: function () { return []; } });
1105
+
1106
+ // @dynamic
1107
+ var AXTranslator = /** @class */ (function () {
1108
+ function AXTranslator() {
1109
+ }
1110
+ Object.defineProperty(AXTranslator, "onChange", {
1111
+ get: function () {
1112
+ return AXTranslator.dataChangeSubject.asObservable();
1113
+ },
1114
+ enumerable: false,
1115
+ configurable: true
1116
+ });
1117
+ AXTranslator.load = function (lang, value) {
1118
+ if (typeof value === 'object') {
1119
+ if (!AXTranslator["__data__" + lang]) {
1120
+ AXTranslator["__data__" + lang] = {};
1121
+ }
1122
+ AXTranslator["__data__" + lang] = merge__default['default'](AXTranslator["__data__" + lang], value);
1123
+ }
1124
+ };
1125
+ AXTranslator.use = function (lang) {
1126
+ AXTranslator.lang = lang;
1127
+ };
1128
+ AXTranslator.get = function (key, lang) {
1129
+ return AXObjectUtil.getPropByPath(AXTranslator["__data__" + (lang || AXTranslator.lang)], key) || key;
1130
+ };
1131
+ return AXTranslator;
1132
+ }());
1133
+ AXTranslator.lang = 'en';
714
1134
  AXTranslator.dataChangeSubject = new rxjs.Subject();
715
1135
 
716
- var AXTranslatorPipe = /** @class */ (function () {
717
- function AXTranslatorPipe() {
718
- }
719
- AXTranslatorPipe.prototype.transform = function (value, lang) {
720
- return AXTranslator.get(value, lang);
721
- };
722
- return AXTranslatorPipe;
723
- }());
724
- AXTranslatorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslatorPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
725
- AXTranslatorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslatorPipe, name: "trans" });
726
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslatorPipe, decorators: [{
727
- type: i0.Pipe,
728
- args: [{ name: 'trans', pure: true }]
1136
+ var AXTranslatorPipe = /** @class */ (function () {
1137
+ function AXTranslatorPipe() {
1138
+ }
1139
+ AXTranslatorPipe.prototype.transform = function (value, lang) {
1140
+ return AXTranslator.get(value, lang);
1141
+ };
1142
+ return AXTranslatorPipe;
1143
+ }());
1144
+ AXTranslatorPipe.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslatorPipe, deps: [], target: i0__namespace.ɵɵFactoryTarget.Pipe });
1145
+ AXTranslatorPipe.ɵpipe = i0__namespace.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslatorPipe, name: "trans" });
1146
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslatorPipe, decorators: [{
1147
+ type: i0.Pipe,
1148
+ args: [{ name: 'trans', pure: true }]
729
1149
  }] });
730
1150
 
731
- var AXTranslationModule = /** @class */ (function () {
732
- function AXTranslationModule() {
733
- }
734
- return AXTranslationModule;
735
- }());
736
- AXTranslationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
737
- AXTranslationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
738
- AXTranslationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, providers: [], imports: [[]] });
739
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, decorators: [{
740
- type: i0.NgModule,
741
- args: [{
742
- imports: [],
743
- exports: [AXTranslatorPipe],
744
- declarations: [AXTranslatorPipe],
745
- providers: [],
746
- }]
1151
+ var AXTranslationModule = /** @class */ (function () {
1152
+ function AXTranslationModule() {
1153
+ }
1154
+ return AXTranslationModule;
1155
+ }());
1156
+ AXTranslationModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1157
+ AXTranslationModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1158
+ AXTranslationModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, providers: [], imports: [[]] });
1159
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXTranslationModule, decorators: [{
1160
+ type: i0.NgModule,
1161
+ args: [{
1162
+ imports: [],
1163
+ exports: [AXTranslatorPipe],
1164
+ declarations: [AXTranslatorPipe],
1165
+ providers: [],
1166
+ }]
747
1167
  }] });
748
1168
 
749
- var isChrome = function (win) { return testUserAgent(win, /Chrome/i); };
750
- var isFirefox = function (win) { return testUserAgent(win, /Firefox/i); };
751
- var isEdge = function (win) { return testUserAgent(win, /Edge/i); };
752
- var isSafari = function (win) { return testUserAgent(win, /Safari/i); };
753
- var isOpera = function (win) { return testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i); };
754
- var isMSIE = function (win) { return testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i); };
755
- var isMobileWeb = function (win) { return isMobile(win) && !isHybrid(win); };
756
- var isIpad = function (win) {
757
- // iOS 12 and below
758
- if (testUserAgent(win, /iPad/i)) {
759
- return true;
760
- }
761
- // iOS 13+
762
- if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
763
- return true;
764
- }
765
- return false;
766
- };
767
- var isIphone = function (win) { return testUserAgent(win, /iPhone/i); };
768
- var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
769
- var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
770
- var isAndroidTablet = function (win) {
771
- return isAndroid(win) && !testUserAgent(win, /mobile/i);
772
- };
773
- var isPhablet = function (win) {
774
- var width = win.innerWidth;
775
- var height = win.innerHeight;
776
- var smallest = Math.min(width, height);
777
- var largest = Math.max(width, height);
778
- return (smallest > 390 && smallest < 520) &&
779
- (largest > 620 && largest < 800);
780
- };
781
- var isTablet = function (win) {
782
- var width = win.innerWidth;
783
- var height = win.innerHeight;
784
- var smallest = Math.min(width, height);
785
- var largest = Math.max(width, height);
786
- return (isIpad(win) ||
787
- isAndroidTablet(win) ||
788
- ((smallest > 460 && smallest < 820) &&
789
- (largest > 780 && largest < 1400)));
790
- };
791
- var isMobile = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
792
- var isDesktop = function (win) { return !isMobile(win); };
793
- var isHybrid = function (win) { return isCordova(win) || isCapacitorNative(win); };
794
- var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
795
- var isCapacitorNative = function (win) {
796
- var capacitor = win['Capacitor'];
797
- return !!(capacitor && capacitor.isNative);
798
- };
799
- var isElectron = function (win) { return testUserAgent(win, /electron/i); };
800
- var isPWA = function (win) { return !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone); };
801
- var testUserAgent = function (win, expr) { return expr.test(win.navigator.userAgent); };
802
- var matchMedia = function (win, query) { return win.matchMedia(query).matches; };
803
- var PLATFORMS_MAP = {
804
- 'Android': isAndroid,
805
- 'iOS': isIOS,
806
- 'Desktop': isDesktop,
807
- 'Mobile': isMobile,
808
- 'Chrome': isChrome,
809
- 'Firefox': isFirefox,
810
- 'Safari': isSafari,
811
- 'Edge': isEdge,
812
- 'Opera': isOpera,
813
- 'Hybrid': isHybrid,
814
- 'PWA': isPWA,
815
- 'Electron': isElectron,
816
- };
817
- var AXPlatformEvent = /** @class */ (function () {
818
- function AXPlatformEvent() {
819
- }
820
- return AXPlatformEvent;
821
- }());
822
- var AXPlatform = /** @class */ (function () {
823
- function AXPlatform() {
824
- var _this = this;
825
- this.resize = new rxjs.Subject();
826
- this.click = new rxjs.Subject();
827
- this.scroll = new rxjs.Subject();
828
- window.addEventListener('resize', function (e) {
829
- _this.resize.next({
830
- nativeEvent: e,
831
- source: _this
832
- });
833
- });
834
- document.addEventListener('click', function (e) {
835
- _this.click.next({
836
- nativeEvent: e,
837
- source: _this
838
- });
839
- }, true);
840
- document.addEventListener('scroll', function (e) {
841
- _this.scroll.next({
842
- nativeEvent: e,
843
- source: _this
844
- });
845
- }, true);
846
- }
847
- AXPlatform.prototype.isRtl = function () {
848
- return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';
849
- };
850
- AXPlatform.prototype.isLandscape = function () {
851
- return window.innerHeight < window.innerWidth;
852
- };
853
- AXPlatform.prototype.isPortrate = function () {
854
- return !this.isLandscape();
855
- };
856
- AXPlatform.prototype.is = function (name) {
857
- return PLATFORMS_MAP[name](window) || false;
858
- };
859
- return AXPlatform;
860
- }());
861
- AXPlatform.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXPlatform, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
862
- AXPlatform.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXPlatform, providedIn: 'platform' });
863
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXPlatform, decorators: [{
864
- type: i0.Injectable,
865
- args: [{
866
- providedIn: 'platform',
867
- }]
1169
+ var isChrome = function (win) { return testUserAgent(win, /Chrome/i); };
1170
+ var isFirefox = function (win) { return testUserAgent(win, /Firefox/i); };
1171
+ var isEdge = function (win) { return testUserAgent(win, /Edge/i); };
1172
+ var isSafari = function (win) { return testUserAgent(win, /Safari/i); };
1173
+ var isOpera = function (win) { return testUserAgent(win, /Opera/i) || testUserAgent(win, /OPR/i); };
1174
+ var isMSIE = function (win) { return testUserAgent(win, /MSIE/i) || testUserAgent(win, /Trident/i); };
1175
+ var isMobileWeb = function (win) { return isMobile(win) && !isHybrid(win); };
1176
+ var isIpad = function (win) {
1177
+ // iOS 12 and below
1178
+ if (testUserAgent(win, /iPad/i)) {
1179
+ return true;
1180
+ }
1181
+ // iOS 13+
1182
+ if (testUserAgent(win, /Macintosh/i) && isMobile(win)) {
1183
+ return true;
1184
+ }
1185
+ return false;
1186
+ };
1187
+ var isIphone = function (win) { return testUserAgent(win, /iPhone/i); };
1188
+ var isIOS = function (win) { return testUserAgent(win, /iPhone|iPod/i) || isIpad(win); };
1189
+ var isAndroid = function (win) { return testUserAgent(win, /android|sink/i); };
1190
+ var isAndroidTablet = function (win) {
1191
+ return isAndroid(win) && !testUserAgent(win, /mobile/i);
1192
+ };
1193
+ var isPhablet = function (win) {
1194
+ var width = win.innerWidth;
1195
+ var height = win.innerHeight;
1196
+ var smallest = Math.min(width, height);
1197
+ var largest = Math.max(width, height);
1198
+ return (smallest > 390 && smallest < 520) &&
1199
+ (largest > 620 && largest < 800);
1200
+ };
1201
+ var isTablet = function (win) {
1202
+ var width = win.innerWidth;
1203
+ var height = win.innerHeight;
1204
+ var smallest = Math.min(width, height);
1205
+ var largest = Math.max(width, height);
1206
+ return (isIpad(win) ||
1207
+ isAndroidTablet(win) ||
1208
+ ((smallest > 460 && smallest < 820) &&
1209
+ (largest > 780 && largest < 1400)));
1210
+ };
1211
+ var isMobile = function (win) { return matchMedia(win, '(any-pointer:coarse)'); };
1212
+ var isDesktop = function (win) { return !isMobile(win); };
1213
+ var isHybrid = function (win) { return isCordova(win) || isCapacitorNative(win); };
1214
+ var isCordova = function (win) { return !!(win['cordova'] || win['phonegap'] || win['PhoneGap']); };
1215
+ var isCapacitorNative = function (win) {
1216
+ var capacitor = win['Capacitor'];
1217
+ return !!(capacitor && capacitor.isNative);
1218
+ };
1219
+ var isElectron = function (win) { return testUserAgent(win, /electron/i); };
1220
+ var isPWA = function (win) { return !!(win.matchMedia('(display-mode: standalone)').matches || win.navigator.standalone); };
1221
+ var testUserAgent = function (win, expr) { return expr.test(win.navigator.userAgent); };
1222
+ var matchMedia = function (win, query) { return win.matchMedia(query).matches; };
1223
+ var PLATFORMS_MAP = {
1224
+ 'Android': isAndroid,
1225
+ 'iOS': isIOS,
1226
+ 'Desktop': isDesktop,
1227
+ 'Mobile': isMobile,
1228
+ 'Chrome': isChrome,
1229
+ 'Firefox': isFirefox,
1230
+ 'Safari': isSafari,
1231
+ 'Edge': isEdge,
1232
+ 'Opera': isOpera,
1233
+ 'Hybrid': isHybrid,
1234
+ 'PWA': isPWA,
1235
+ 'Electron': isElectron,
1236
+ };
1237
+ var AXPlatformEvent = /** @class */ (function () {
1238
+ function AXPlatformEvent() {
1239
+ }
1240
+ return AXPlatformEvent;
1241
+ }());
1242
+ var AXPlatform = /** @class */ (function () {
1243
+ function AXPlatform() {
1244
+ var _this = this;
1245
+ this.resize = new rxjs.Subject();
1246
+ this.click = new rxjs.Subject();
1247
+ this.scroll = new rxjs.Subject();
1248
+ window.addEventListener('resize', function (e) {
1249
+ _this.resize.next({
1250
+ nativeEvent: e,
1251
+ source: _this
1252
+ });
1253
+ });
1254
+ document.addEventListener('click', function (e) {
1255
+ _this.click.next({
1256
+ nativeEvent: e,
1257
+ source: _this
1258
+ });
1259
+ }, true);
1260
+ document.addEventListener('scroll', function (e) {
1261
+ _this.scroll.next({
1262
+ nativeEvent: e,
1263
+ source: _this
1264
+ });
1265
+ }, true);
1266
+ }
1267
+ AXPlatform.prototype.isRtl = function () {
1268
+ return document.dir == 'rtl' || document.body.dir == 'rtl' || document.body.style.direction == 'rtl';
1269
+ };
1270
+ AXPlatform.prototype.isLandscape = function () {
1271
+ return window.innerHeight < window.innerWidth;
1272
+ };
1273
+ AXPlatform.prototype.isPortrate = function () {
1274
+ return !this.isLandscape();
1275
+ };
1276
+ AXPlatform.prototype.is = function (name) {
1277
+ return PLATFORMS_MAP[name](window) || false;
1278
+ };
1279
+ return AXPlatform;
1280
+ }());
1281
+ AXPlatform.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXPlatform, deps: [], target: i0__namespace.ɵɵFactoryTarget.Injectable });
1282
+ AXPlatform.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXPlatform, providedIn: 'platform' });
1283
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.6", ngImport: i0__namespace, type: AXPlatform, decorators: [{
1284
+ type: i0.Injectable,
1285
+ args: [{
1286
+ providedIn: 'platform',
1287
+ }]
868
1288
  }], ctorParameters: function () { return []; } });
869
1289
 
870
- /**
871
- * Public API refrences of core libraries
872
- * @module @acorex/core
1290
+ /**
1291
+ * Public API refrences of core libraries
1292
+ * @module @acorex/core
873
1293
  */
874
1294
 
875
- /**
876
- * Generated bundle index. Do not edit.
1295
+ /**
1296
+ * Generated bundle index. Do not edit.
877
1297
  */
878
1298
 
879
1299
  exports.AXCalendarMonth = AXCalendarMonth;
@@ -883,6 +1303,7 @@
883
1303
  exports.AXDateTimeModule = AXDateTimeModule;
884
1304
  exports.AXDateTimePipe = AXDateTimePipe;
885
1305
  exports.AXDateTimeRange = AXDateTimeRange;
1306
+ exports.AXDrawingUtil = AXDrawingUtil;
886
1307
  exports.AXObjectUtil = AXObjectUtil;
887
1308
  exports.AXPlatform = AXPlatform;
888
1309
  exports.AXPlatformEvent = AXPlatformEvent;
@@ -890,7 +1311,6 @@
890
1311
  exports.AXTranslationModule = AXTranslationModule;
891
1312
  exports.AXTranslator = AXTranslator;
892
1313
  exports.AXTranslatorPipe = AXTranslatorPipe;
893
- exports.AX_CALENDARS = AX_CALENDARS;
894
1314
  exports.GeorgianCalendar = GeorgianCalendar;
895
1315
  exports.testUserAgent = testUserAgent;
896
1316