@acorex/core 5.1.2 → 5.1.5

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 (131) hide show
  1. package/README.md +2 -23
  2. package/esm2020/lib/classes/base-page.class.mjs +28 -0
  3. package/esm2020/lib/classes/color.class.mjs +49 -0
  4. package/esm2020/lib/classes/datetime.class.mjs +314 -0
  5. package/esm2020/lib/classes/menu.class.mjs +27 -0
  6. package/esm2020/lib/classes/navigator.class.mjs +2 -0
  7. package/esm2020/lib/classes/popup.class.mjs +2 -0
  8. package/esm2020/lib/classes/promise.class.mjs +19 -0
  9. package/esm2020/lib/classes/sectionlist.class.mjs +2 -0
  10. package/esm2020/lib/classes/select.class.mjs +3 -0
  11. package/esm2020/lib/core.module.mjs +20 -11
  12. package/esm2020/lib/error/error.class.mjs +2 -0
  13. package/esm2020/lib/error/error.module.mjs +19 -0
  14. package/esm2020/lib/error/error.service.mjs +21 -0
  15. package/esm2020/lib/events/keyboard.mjs +2 -0
  16. package/esm2020/lib/http/http-error.class.mjs +2 -0
  17. package/esm2020/lib/http/http-events.interceptor.mjs +3 -0
  18. package/esm2020/lib/http/http-request.class.mjs +2 -0
  19. package/esm2020/lib/http/http-result.class.mjs +21 -0
  20. package/esm2020/lib/http/http.module.mjs +37 -0
  21. package/esm2020/lib/http/http.service.mjs +145 -0
  22. package/esm2020/lib/locale/en.json +255 -0
  23. package/esm2020/lib/locale/fa.json +244 -0
  24. package/esm2020/lib/pipe/datetime.pipe.mjs +25 -0
  25. package/esm2020/lib/pipe/htmlToText.pipe.mjs +25 -0
  26. package/esm2020/lib/platform/platform.service.mjs +5 -5
  27. package/esm2020/lib/services/config.mjs +29 -0
  28. package/esm2020/lib/services/event.service.mjs +36 -0
  29. package/esm2020/lib/services/navigator.service.mjs +10 -0
  30. package/esm2020/lib/services/storage.service.mjs +16 -0
  31. package/esm2020/lib/translator/translator.mjs +26 -0
  32. package/esm2020/lib/translator/translator.module.mjs +25 -0
  33. package/esm2020/lib/translator/translator.pipe.mjs +24 -0
  34. package/esm2020/lib/translator/translator.service.mjs +21 -0
  35. package/esm2020/lib/utils/array/array-util.mjs +133 -0
  36. package/esm2020/lib/utils/html/html-util.mjs +192 -0
  37. package/esm2020/lib/utils/html/html.module.mjs +19 -0
  38. package/esm2020/lib/utils/math/math-util.mjs +6 -0
  39. package/esm2020/lib/utils/object/object-util.mjs +83 -0
  40. package/esm2020/lib/utils/render/on-demand-preload-strategy.service.mjs +20 -0
  41. package/esm2020/lib/utils/render/render.service.mjs +103 -0
  42. package/esm2020/lib/utils/render/rendering.module.mjs +35 -0
  43. package/esm2020/lib/utils/scroll/scroll.directive.mjs +54 -0
  44. package/esm2020/lib/utils/scroll/scroll.module.mjs +19 -0
  45. package/esm2020/lib/utils/separator/separator.module.mjs +19 -0
  46. package/esm2020/lib/utils/separator/separator.pipe.mjs +33 -0
  47. package/esm2020/public-api.mjs +43 -12
  48. package/fesm2015/acorex-core.mjs +1940 -1011
  49. package/fesm2015/acorex-core.mjs.map +1 -1
  50. package/fesm2020/acorex-core.mjs +1932 -1004
  51. package/fesm2020/acorex-core.mjs.map +1 -1
  52. package/lib/classes/base-page.class.d.ts +13 -0
  53. package/lib/classes/color.class.d.ts +17 -0
  54. package/lib/classes/datetime.class.d.ts +63 -0
  55. package/lib/classes/menu.class.d.ts +34 -0
  56. package/lib/classes/navigator.class.d.ts +5 -0
  57. package/lib/classes/popup.class.d.ts +12 -0
  58. package/lib/classes/promise.class.d.ts +7 -0
  59. package/lib/classes/sectionlist.class.d.ts +8 -0
  60. package/lib/classes/select.class.d.ts +7 -0
  61. package/lib/core.module.d.ts +4 -2
  62. package/lib/error/error.class.d.ts +4 -0
  63. package/lib/error/error.module.d.ts +7 -0
  64. package/lib/error/error.service.d.ts +13 -0
  65. package/lib/events/keyboard.d.ts +2 -0
  66. package/lib/http/http-error.class.d.ts +7 -0
  67. package/lib/http/http-events.interceptor.d.ts +10 -0
  68. package/lib/http/http-request.class.d.ts +14 -0
  69. package/lib/http/http-result.class.d.ts +11 -0
  70. package/lib/http/http.module.d.ts +10 -0
  71. package/lib/http/http.service.d.ts +23 -0
  72. package/lib/{dateTime → pipe}/datetime.pipe.d.ts +2 -2
  73. package/lib/pipe/htmlToText.pipe.d.ts +7 -0
  74. package/lib/{config/configs.d.ts → services/config.d.ts} +1 -1
  75. package/lib/{events → services}/event.service.d.ts +0 -0
  76. package/lib/services/navigator.service.d.ts +8 -0
  77. package/lib/services/storage.service.d.ts +7 -0
  78. package/lib/{translation → translator}/translator.d.ts +1 -3
  79. package/lib/translator/translator.module.d.ts +8 -0
  80. package/lib/{translation → translator}/translator.pipe.d.ts +1 -0
  81. package/lib/translator/translator.service.d.ts +8 -0
  82. package/lib/utils/array/array-util.d.ts +6 -0
  83. package/lib/utils/html/html-util.d.ts +62 -0
  84. package/lib/utils/html/html.module.d.ts +8 -0
  85. package/lib/utils/math/math-util.d.ts +3 -0
  86. package/lib/utils/object/object-util.d.ts +7 -0
  87. package/lib/utils/render/on-demand-preload-strategy.service.d.ts +10 -0
  88. package/lib/utils/render/render.service.d.ts +18 -0
  89. package/lib/utils/render/rendering.module.d.ts +8 -0
  90. package/lib/utils/scroll/scroll.directive.d.ts +18 -0
  91. package/lib/utils/scroll/scroll.module.d.ts +8 -0
  92. package/lib/utils/separator/separator.module.d.ts +8 -0
  93. package/lib/utils/separator/separator.pipe.d.ts +8 -0
  94. package/package.json +6 -11
  95. package/public-api.d.ts +42 -11
  96. package/config/ax-preset.js +0 -182
  97. package/esm2020/lib/config/configs.mjs +0 -29
  98. package/esm2020/lib/dateTime/datetime.class.mjs +0 -295
  99. package/esm2020/lib/dateTime/datetime.module.mjs +0 -33
  100. package/esm2020/lib/dateTime/datetime.pipe.mjs +0 -26
  101. package/esm2020/lib/dateTime/georgian.calendar.mjs +0 -189
  102. package/esm2020/lib/dateTime/index.mjs +0 -6
  103. package/esm2020/lib/dateTime/jalali.calendar.mjs +0 -359
  104. package/esm2020/lib/events/event.service.mjs +0 -36
  105. package/esm2020/lib/events/index.mjs +0 -2
  106. package/esm2020/lib/hotkeys/hotkeys.service.mjs +0 -37
  107. package/esm2020/lib/hotkeys/index.mjs +0 -2
  108. package/esm2020/lib/translation/index.mjs +0 -4
  109. package/esm2020/lib/translation/translation.module.mjs +0 -18
  110. package/esm2020/lib/translation/translator.mjs +0 -42
  111. package/esm2020/lib/translation/translator.pipe.mjs +0 -15
  112. package/esm2020/lib/utils/drawing-util.mjs +0 -27
  113. package/esm2020/lib/utils/index.mjs +0 -5
  114. package/esm2020/lib/utils/object-util.mjs +0 -39
  115. package/esm2020/lib/utils/safe.pipe.mjs +0 -30
  116. package/esm2020/lib/utils/string-util.mjs +0 -19
  117. package/lib/dateTime/datetime.class.d.ts +0 -100
  118. package/lib/dateTime/datetime.module.d.ts +0 -8
  119. package/lib/dateTime/georgian.calendar.d.ts +0 -20
  120. package/lib/dateTime/index.d.ts +0 -5
  121. package/lib/dateTime/jalali.calendar.d.ts +0 -35
  122. package/lib/events/index.d.ts +0 -1
  123. package/lib/hotkeys/hotkeys.service.d.ts +0 -17
  124. package/lib/hotkeys/index.d.ts +0 -1
  125. package/lib/translation/index.d.ts +0 -3
  126. package/lib/translation/translation.module.d.ts +0 -7
  127. package/lib/utils/drawing-util.d.ts +0 -17
  128. package/lib/utils/index.d.ts +0 -4
  129. package/lib/utils/object-util.d.ts +0 -4
  130. package/lib/utils/safe.pipe.d.ts +0 -10
  131. package/lib/utils/string-util.d.ts +0 -6
@@ -1,12 +1,63 @@
1
- import * as i0 from '@angular/core';
2
- import { Pipe, NgModule, Injectable, Inject } from '@angular/core';
3
- import * as i1 from '@angular/platform-browser';
4
- import _ from 'lodash';
1
+ import moment from 'jalali-moment';
5
2
  import { Subject, fromEvent } from 'rxjs';
6
- import { DOCUMENT } from '@angular/common';
7
- import { Observable } from 'rxjs/internal/Observable';
8
- import merge from 'lodash-es/merge';
3
+ import * as i0 from '@angular/core';
4
+ import { EventEmitter, Injectable, InjectionToken, NgModule, Pipe, Directive, Input, HostListener } from '@angular/core';
5
+ import { CommonModule } from '@angular/common';
6
+ import * as i1 from '@angular/common/http';
7
+ import { HttpHeaders, HttpParams, HttpClientModule } from '@angular/common/http';
9
8
  import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
9
+ import merge from 'lodash-es/merge';
10
+ import { __awaiter } from 'tslib';
11
+ import * as i1$1 from '@angular/router';
12
+
13
+ class AXColorUtil {
14
+ static hex2Rgb(hexColor) {
15
+ const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hexColor);
16
+ return result ? {
17
+ r: parseInt(result[1], 16),
18
+ g: parseInt(result[2], 16),
19
+ b: parseInt(result[3], 16)
20
+ } : null;
21
+ }
22
+ static rgb2Hex(r, g, b, a = 255) {
23
+ let alpha;
24
+ let hex = (r | 1 << 8).toString(16).slice(1) +
25
+ (g | 1 << 8).toString(16).slice(1) +
26
+ (b | 1 << 8).toString(16).slice(1);
27
+ if (a !== 255) {
28
+ alpha = a;
29
+ }
30
+ else {
31
+ alpha = 1;
32
+ }
33
+ alpha = Math.round(alpha * 100) / 100;
34
+ alpha = Math.round(alpha * 255);
35
+ const hexAlpha = (alpha + 0x10000).toString(16).substr(-2).toUpperCase();
36
+ return '#' + hex + (alpha == 255 ? '' : hexAlpha);
37
+ }
38
+ ;
39
+ static illuminance(hexColor) {
40
+ const rgbColor = AXColorUtil.hex2Rgb(hexColor);
41
+ if (!rgbColor) {
42
+ return -1;
43
+ }
44
+ const r = rgbColor.r;
45
+ const g = rgbColor.g;
46
+ const b = rgbColor.b;
47
+ const a = [r, g, b].map(v => {
48
+ v /= 255;
49
+ return (v <= 0.03928) ?
50
+ v / 12.92 :
51
+ Math.pow(((v + 0.055) / 1.055), 2.4);
52
+ });
53
+ return a[0] * 0.2126 + a[1] * 0.7152 + a[2] * 0.0722;
54
+ }
55
+ static contrastToWhite(hexColor) {
56
+ const whiteIlluminance = 1;
57
+ const illuminance = AXColorUtil.illuminance(hexColor);
58
+ return whiteIlluminance / illuminance;
59
+ }
60
+ }
10
61
 
11
62
  // @dynamic
12
63
  class AXObjectUtil {
@@ -45,95 +96,51 @@ class AXObjectUtil {
45
96
  }
46
97
  throw new Error('Unable to copy obj! Its type isn\'t supported.');
47
98
  }
48
- }
49
-
50
- // @dynamic
51
- class AXDrawingUtil {
52
- static collision(a, b) {
53
- const ac = a.getBoundingClientRect();
54
- const bc = b.getBoundingClientRect();
55
- if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left &&
56
- ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
57
- return true;
58
- }
59
- else {
60
- return false;
61
- }
62
- }
63
- static isInElementBound(pos, element) {
64
- const elBound = element.getBoundingClientRect();
65
- return AXDrawingUtil.isInRecPoint(pos, {
66
- left: elBound.x,
67
- width: elBound.width,
68
- top: elBound.y,
69
- height: elBound.height
70
- });
71
- }
72
- static isInRecPoint(pos, rec) {
73
- return pos.x >= rec.left && pos.x <= (rec.left + rec.width) && pos.y >= rec.top && (pos.y <= (rec.top + rec.height));
99
+ }
100
+ function AXFetchProp(obj, prop) {
101
+ if (typeof obj === 'undefined') {
102
+ return false;
74
103
  }
75
- }
76
-
77
- // @dynamic
78
- class AXStringUtil {
79
- static getWordBoundsAtPosition(str, position) {
80
- const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);
81
- let start = position - 1;
82
- while (start >= 0 && !isSpace(str[start])) {
83
- start -= 1;
84
- }
85
- start = Math.max(0, start + 1);
86
- const leftSideString = str.slice(start).match(/[a-zA-Z0-9]+/i);
87
- start += leftSideString.index;
88
- let end = start + leftSideString[0].length;
89
- return {
90
- start,
91
- end
92
- };
104
+ const index = prop.indexOf('.');
105
+ if (index > -1) {
106
+ return AXFetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));
93
107
  }
94
- }
95
-
96
- class AXSafePipe {
97
- constructor(sanitizer) {
98
- this.sanitizer = sanitizer;
99
- }
100
- transform(value, type) {
101
- if (value == null || value == undefined || value == '')
102
- return null;
103
- switch (type) {
104
- case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);
105
- case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);
106
- case 'script': return this.sanitizer.bypassSecurityTrustScript(value);
107
- case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);
108
- case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);
109
- default: throw new Error(`Invalid safe type specified: ${type}`);
108
+ return obj[prop];
109
+ }
110
+ function getPropByPath(obj, path, defaultVal) {
111
+ path = path
112
+ .replace(/\[/g, '.')
113
+ .replace(/]/g, '')
114
+ .split('.');
115
+ path.forEach((level) => {
116
+ if (obj) {
117
+ obj = obj[level];
110
118
  }
119
+ });
120
+ if (obj === undefined) {
121
+ return defaultVal;
111
122
  }
123
+ return obj;
112
124
  }
113
- AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
114
- AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, name: "safe" });
115
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, decorators: [{
116
- type: Pipe,
117
- args: [{
118
- name: 'safe',
119
- pure: true
120
- }]
121
- }], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
122
-
123
- class AXCoreModule {
124
- }
125
- AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
126
- AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
127
- AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, providers: [], imports: [[]] });
128
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, decorators: [{
129
- type: NgModule,
130
- args: [{
131
- imports: [],
132
- exports: [AXSafePipe],
133
- declarations: [AXSafePipe],
134
- providers: [],
135
- }]
136
- }] });
125
+ function setPropByPath(obj, path, value) {
126
+ if (Object(obj) !== obj) {
127
+ return obj;
128
+ } // When obj is not an object
129
+ // If not yet an array, get the keys from the string-path
130
+ if (!Array.isArray(path)) {
131
+ path = path.toString().match(/[^.[\]]+/g) || [];
132
+ }
133
+ path.slice(0, -1).reduce((a, c, i) => // Iterate all of them except the last one
134
+ Object(a[c]) === a[c] // Does the key exist and is its value an object?
135
+ // Yes: then follow that path
136
+ ? a[c]
137
+ // No: create the key. Is the next key a potential array-index?
138
+ : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1]
139
+ ? [] // Yes: assign a new array object
140
+ : {}, // No: assign a new plain object
141
+ obj)[path[path.length - 1]] = value; // Finally assign the value to the last key
142
+ return obj[path[0]]; // Return the top-level object to allow chaining
143
+ }
137
144
 
138
145
  // @dynamic
139
146
  class AXConfig {
@@ -142,12 +149,12 @@ class AXConfig {
142
149
  }
143
150
  static set(arg1, arg2) {
144
151
  if (arg1 && typeof arg1 == 'string') {
145
- _.set(AXConfig.dataModel, arg1, arg2);
152
+ setPropByPath(AXConfig.dataModel, arg1, arg2);
146
153
  AXConfig.dataChangeSubject.next(AXConfig.dataModel);
147
154
  return;
148
155
  }
149
156
  if (arg1 && typeof arg1 == 'object') {
150
- _.merge(AXConfig.dataModel, arg1);
157
+ Object.assign(AXConfig.dataModel, arg1);
151
158
  AXConfig.dataChangeSubject.next(AXConfig.dataModel);
152
159
  return;
153
160
  }
@@ -155,213 +162,285 @@ class AXConfig {
155
162
  return AXConfig.dataChangeSubject.asObservable();
156
163
  }
157
164
  }
158
- static get(path, defaultValue) {
159
- return _.get(AXConfig.dataModel, path, defaultValue);
165
+ static get(path) {
166
+ return getPropByPath(AXConfig.dataModel, path);
160
167
  }
161
168
  }
162
169
  AXConfig.dataModel = {};
163
170
  AXConfig.dataChangeSubject = new Subject();
164
171
 
165
- // @dynamic
166
172
  class AXDateTime {
167
- constructor(value = new Date(), calendar = AXConfig.get(`dateTime.calendar`)) {
168
- this._formatKeys = {
169
- ss: () => this.pad(this.date.getSeconds(), 2),
170
- s: () => this.date.getSeconds().toString(),
171
- //
172
- dd: () => this.pad(this.calendar.dayOfMonth(this.date), 2),
173
- d: () => this.calendar.dayOfMonth(this.date).toString(),
174
- //
175
- mm: () => this.pad(this.date.getMinutes(), 2),
176
- m: () => this.date.getMinutes().toString(),
177
- //
178
- MMMM: () => this.calendar.monthNames[this.calendar.monthOfYear(this.date) - 1],
179
- MMM: () => this.calendar.monthShortNames[this.calendar.monthOfYear(this.date) - 1],
180
- MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),
181
- //
182
- DDDD: () => this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1],
183
- DDD: () => this.calendar.dayShortNames[this.calendar.dayOfWeek(this.date) - 1],
184
- //
185
- yyyy: () => this.calendar.year(this.date).toString(),
186
- YYYY: () => this.calendar.year(this.date).toString(),
187
- yy: () => this.calendar.year(this.date).toString().substring(2),
188
- YY: () => this.calendar.year(this.date).toString().substring(2),
189
- //
190
- HH: () => this.pad(this.date.getHours(), 2),
191
- H: () => this.date.getHours().toString(),
192
- //
193
- hh: () => this.pad((this.date.getHours() % 12 || 12), 2),
194
- h: () => (this.date.getHours() % 12 || 12).toString(),
195
- //
196
- A: () => (this.date.getHours() < 12) ? 'am' : 'pm',
197
- a: () => (this.date.getHours() < 12) ? 'am' : 'pm',
198
- };
199
- this._calendar = AXDateTime.resolveCalendar(calendar);
173
+ // private get _moment(): moment_.Moment {
174
+ // const m = moment(this.date);
175
+ // if (this.type === 'jalali') {
176
+ // m.locale('fa');
177
+ // }
178
+ // return m;
179
+ // }
180
+ constructor(value = new Date(), type = AXConfig.get('dateTime.type') || 'gregorian') {
181
+ this.type = type;
200
182
  if (value instanceof Date) {
201
183
  this._date = value;
202
184
  }
203
185
  else {
204
- //TODO: parse jalali
205
186
  this._date = new Date(value);
206
187
  }
188
+ this._moment = moment(this.date);
189
+ if (this.type === 'jalali') {
190
+ this._moment.locale('fa');
191
+ }
207
192
  }
208
- static convert(value, calendar = AXConfig.get('dateTime.calendar')) {
193
+ static convert(value, type = AXConfig.get('dateTime.type') || 'gregorian') {
209
194
  let date;
210
195
  if (typeof value === 'string' || value instanceof String) {
211
- date = new AXDateTime(value, calendar);
196
+ date = new AXDateTime(value, type);
212
197
  }
213
198
  else if (value instanceof Date) {
214
- date = new AXDateTime(value, calendar);
199
+ date = new AXDateTime(value, type);
215
200
  }
216
201
  else if (value instanceof AXDateTime) {
217
- date = new AXDateTime(value.date, calendar);
202
+ date = value;
218
203
  }
219
204
  return date;
220
205
  }
221
- static from(value = {
222
- calendar: AXConfig.get('dateTime.calendar'),
223
- year: 1,
224
- month: 1,
225
- date: 1,
226
- hours: 0,
227
- minutes: 0,
228
- seconds: 0,
229
- ms: 0
230
- }) {
231
- // let date: AXDateTime = new AXDateTime(new Date(), value.calendar);
232
- // date.set('year', value.year);
233
- // date.set('month', value.month);
234
- // date.set('day', value.date);
235
- // date.set('hour', value.hours);
236
- // date.set('minute', value.minutes);
237
- // date.set('second', value.seconds);
238
- // date.set('ms', value.ms);
239
- return AXDateTime.resolveCalendar(value.calendar).create(value);
240
- }
241
- static resolveCalendar(calendar) {
242
- return typeof calendar == 'string'
243
- ? AXConfig.get(`dateTime.calendars.${calendar}`)
244
- : calendar;
245
- }
246
206
  get date() {
247
207
  return this._date;
248
208
  }
249
- get calendar() {
250
- return this._calendar;
209
+ resolveUnit(unit) {
210
+ return this.type === 'jalali' ? 'j' + unit : unit;
251
211
  }
252
212
  clone() {
253
- return new AXDateTime(this.date, this.calendar);
213
+ return new AXDateTime(this.date, this.type);
254
214
  }
255
- get dayOfMonth() {
256
- return this._calendar.dayOfMonth(this.date);
215
+ get dayInMonth() {
216
+ return this._moment.date();
257
217
  }
258
218
  get dayOfYear() {
259
- return this._calendar.dayOfYear(this.date);
219
+ return this._moment.dayOfYear();
260
220
  }
261
- get dayOfWeek() {
262
- return this._calendar.dayOfWeek(this.date);
221
+ get dayInWeek() {
222
+ return this._moment.day();
263
223
  }
264
224
  get hour() {
265
- return this._date.getHours();
225
+ return this._moment.hour();
266
226
  }
267
227
  get minute() {
268
- return this._date.getMinutes();
228
+ return this._moment.minute();
269
229
  }
270
230
  get second() {
271
- return this._date.getSeconds();
231
+ return this._moment.second();
272
232
  }
273
233
  get year() {
274
- return this._calendar.year(this.date);
234
+ return this._moment.year();
275
235
  }
276
236
  get monthOfYear() {
277
- return this._calendar.monthOfYear(this.date);
278
- }
279
- get weekOfYear() {
280
- return this._calendar.weekOfYear(this.date);
237
+ return this._moment.month();
281
238
  }
282
239
  get month() {
283
240
  return new AXCalendarMonth(this);
284
241
  }
285
- add(unit, amount) {
286
- return this._calendar.add(this.date, unit, amount);
242
+ get firstDayOfWeek() {
243
+ const a = moment(this.date);
244
+ if (this.type === 'jalali') {
245
+ this._moment.locale('fa');
246
+ }
247
+ return new AXDateTime(a.startOf('w').toDate(), this.type);
248
+ }
249
+ get endDayOfWeek() {
250
+ const a = moment(this.date);
251
+ if (this.type === 'jalali') {
252
+ this._moment.locale('fa');
253
+ }
254
+ return new AXDateTime(moment(this.date).endOf('w').toDate(), this.type);
255
+ }
256
+ convertStringToJalali(date, format) {
257
+ return moment(date).locale('fa').format('YYYY/M/D');
258
+ }
259
+ convertStringToGregorian(date, format) {
260
+ return new Date(moment.from(date, 'fa', 'YYYY/MM/DD').format('YYYY/MM/DD'));
261
+ }
262
+ add(unit = 'day', amount) {
263
+ return new AXDateTime(moment(this.date).add(amount, this.resolveUnit(unit)).toDate(), this.type);
264
+ }
265
+ addDay(amount) {
266
+ return new AXDateTime(moment(this.date).add(amount, 'd').toDate(), this.type);
267
+ }
268
+ addMonth(amount) {
269
+ return new AXDateTime(moment(this.date).add(amount, 'months').toDate(), this.type);
270
+ }
271
+ addHour(amount) {
272
+ return new AXDateTime(moment(this.date).add(amount, 'hours').toDate(), this.type);
287
273
  }
288
274
  set(unit = 'day', value) {
289
- return this._calendar.set(this.date, unit, value);
275
+ return new AXDateTime(this._moment.set(unit, value).toDate(), this.type);
290
276
  }
291
- duration(end, unit = 'day') {
292
- const range = new AXDateTimeRange(this, AXDateTime.convert(end, this.calendar.name()));
293
- return range.duration();
277
+ duration(end, unit = 'days') {
278
+ const duration = moment.duration(this._moment.diff(end._moment));
279
+ return Math.round(duration.as(unit));
294
280
  }
295
281
  startOf(unit = 'day') {
296
- return this._calendar.startOf(this.date, unit);
282
+ return new AXDateTime(moment(this.date).startOf(this.resolveUnit(unit)).toDate(), this.type);
297
283
  }
298
284
  endOf(unit = 'day') {
299
- return this._calendar.endOf(this.date, unit);
285
+ return new AXDateTime(moment(this.date).endOf(this.resolveUnit(unit)).toDate(), this.type);
300
286
  }
301
- format(format = AXConfig.get('dateTime.shortDateFormat')) {
302
- const re = new RegExp(_.orderBy(Object.keys(this._formatKeys), c => c.length, ['desc']).join("|"), "gi");
303
- return format.replace(re, (matched) => {
304
- return this._formatKeys[matched]();
305
- });
306
- }
307
- pad(n, width, z = '0') {
308
- n = n + '';
309
- return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
287
+ format(format = AXConfig.get('dateTime.shortDateFormat') || (this.type === 'gregorian' ? 'DD-MM-YYYY' : 'YYYY-MM-DD')) {
288
+ if (format === 'P') {
289
+ return this._moment.fromNow();
290
+ }
291
+ return this._moment.format(format);
310
292
  }
311
- toString(format = AXConfig.get('dateTime.shortDateFormat')) {
312
- return this.format(format);
293
+ toString() {
294
+ return this.format();
313
295
  }
314
296
  equal(value, unit = 'day') {
315
- return this.compare(value, unit) == 0;
316
- }
317
- compare(value, unit = 'day') {
318
- const val = AXDateTime.convert(value, this.calendar.name());
319
- const func = (v1, v2) => {
320
- if (v1 == v2) {
321
- return 0;
322
- }
323
- else if (v1 > v2) {
324
- return 1;
325
- }
326
- else {
327
- return -1;
328
- }
297
+ if (!value) {
298
+ return false;
299
+ }
300
+ return this._moment.isSame(moment(value.date), this.resolveUnit(unit));
301
+ }
302
+ convertToJalaliDate(value) {
303
+ const options = {
304
+ numberingSystem: 'latn',
305
+ year: 'numeric',
306
+ month: '2-digit',
307
+ day: '2-digit',
308
+ hour: '2-digit',
309
+ minute: '2-digit',
310
+ second: '2-digit'
329
311
  };
330
- let p = 0;
312
+ const jDate = new Date(value).toLocaleDateString('fa-IR', options);
313
+ const item = {};
314
+ item.year = jDate.slice(0, 4);
315
+ item.month = jDate.slice(5, 7);
316
+ item.day = jDate.slice(8, 10);
317
+ item.hour = jDate.slice(13, 15);
318
+ item.minutes = jDate.slice(16, 18);
319
+ item.seconds = jDate.slice(19, 21);
320
+ return item;
321
+ }
322
+ toJalaliString(value) {
323
+ const date = this.convertToJalaliDate(value);
324
+ let str = '';
325
+ str = date.year + '-' + date.month + '-' + date.day + 'T' + date.hour + ':' + date.minutes + ':' + date.seconds;
326
+ return str;
327
+ }
328
+ convertToGregorianDate(value) {
329
+ // TODO: check this fucking type
330
+ const options = {
331
+ numberingSystem: 'latn',
332
+ year: 'numeric',
333
+ month: '2-digit',
334
+ day: '2-digit',
335
+ hour: '2-digit',
336
+ minute: '2-digit',
337
+ second: '2-digit'
338
+ };
339
+ const date = new Date(value).toLocaleString('en-us', options);
340
+ const item = {};
341
+ item.year = date.slice(6, 10);
342
+ item.month = date.slice(0, 2);
343
+ item.day = date.slice(3, 5);
344
+ item.hour = date.slice(12, 14);
345
+ item.minutes = date.slice(15, 17);
346
+ item.seconds = date.slice(18, 20);
347
+ return item;
348
+ }
349
+ toGregorianString(value) {
350
+ const date = this.convertToGregorianDate(value);
351
+ let str = '';
352
+ str = date.year + '-' + date.month + '-' + date.day + 'T' + date.hour + ':' + date.minutes + ':' + date.seconds;
353
+ return str;
354
+ }
355
+ compaireNew(value, unit = 'YMD', type = 'jalali') {
356
+ const range = [0, 0];
357
+ let str1;
358
+ let str2;
359
+ if (type === 'jalali') {
360
+ str1 = this.toJalaliString(this.date);
361
+ str2 = this.toJalaliString(value.date ? value.date : value);
362
+ }
363
+ else {
364
+ str1 = this.toGregorianString(this.date);
365
+ str2 = this.toGregorianString(value.date ? value.date : value);
366
+ }
331
367
  switch (unit) {
332
- case 'year':
333
- return func(this.year, val.year);
334
- case 'week':
335
- p = this.compare(val, 'year');
336
- return p == 0 ? func(this.weekOfYear, val.weekOfYear) : p;
337
- case 'month':
338
- p = this.compare(val, 'year');
339
- return p == 0 ? func(this.monthOfYear, val.monthOfYear) : p;
340
- case 'day':
341
- p = this.compare(val, 'year');
342
- return p == 0 ? func(this.dayOfYear, val.dayOfYear) : p;
343
- case 'hour':
344
- p = this.compare(val, 'day');
345
- return p == 0 ? func(this.hour, val.hour) : p;
346
- case 'minute':
347
- p = this.compare(val, 'hour');
348
- return p == 0 ? func(this.minute, val.minute) : p;
349
- case 'second':
350
- p = this.compare(val, 'minute');
351
- return p == 0 ? func(this.second, val.second) : p;
352
- default:
353
- return func(this.date.getTime(), val.date.getTime());
368
+ case 'YMDhms':
369
+ range[0] = 0;
370
+ range[1] = 19;
371
+ break;
372
+ case 'YMDhm':
373
+ range[0] = 0;
374
+ range[1] = 16;
375
+ break;
376
+ case 'YMDh':
377
+ range[0] = 0;
378
+ range[1] = 13;
379
+ break;
380
+ case 'YMD':
381
+ range[0] = 0;
382
+ range[1] = 10;
383
+ break;
384
+ case 'YM':
385
+ range[0] = 0;
386
+ range[1] = 7;
387
+ break;
388
+ case 'h':
389
+ range[0] = 11;
390
+ range[1] = 13;
391
+ break;
392
+ case 'm':
393
+ range[0] = 14;
394
+ range[1] = 16;
395
+ break;
396
+ case 's':
397
+ range[0] = 17;
398
+ range[1] = 19;
399
+ break;
400
+ case 'D':
401
+ range[0] = 8;
402
+ range[1] = 10;
403
+ break;
404
+ case 'M':
405
+ range[0] = 5;
406
+ range[1] = 7;
407
+ break;
408
+ case 'Y':
409
+ range[0] = 0;
410
+ range[1] = 4;
411
+ break;
412
+ }
413
+ if (str1.slice(range[0], range[1]) === str2.slice(range[0], range[1])) {
414
+ return 0;
415
+ }
416
+ else if (str1.slice(range[0], range[1]) > str2.slice(range[0], range[1])) {
417
+ return 1;
418
+ }
419
+ else {
420
+ return -1;
421
+ }
422
+ }
423
+ compaire(value, unit = 'day') {
424
+ if (this._moment.isSame(moment(value.date), this.resolveUnit(unit))) {
425
+ return 0;
426
+ }
427
+ else if (this._moment.isAfter(moment(value.date), this.resolveUnit(unit))) {
428
+ return 1;
429
+ }
430
+ else {
431
+ return -1;
354
432
  }
355
433
  }
356
- convert(calendar) {
357
- return AXDateTime.convert(this, calendar);
434
+ toISOString() {
435
+ return this._date.toISOString();
358
436
  }
359
437
  }
360
438
  class AXCalendarMonth {
361
439
  constructor(date) {
440
+ this._moment = moment(date.date);
362
441
  this.index = date.date.getMonth();
363
- this.name = date.format('MMMM');
364
- this.range = new AXDateTimeRange(new AXDateTime(date.startOf('month').date, date.calendar), new AXDateTime(date.endOf('month').date, date.calendar));
442
+ this.name = this._moment.format('MMMM');
443
+ this.range = new AXDateTimeRange(new AXDateTime(this._moment.startOf('month').toDate(), date.type), new AXDateTime(this._moment.endOf('month').toDate(), date.type));
365
444
  }
366
445
  get range() {
367
446
  return this._range;
@@ -372,816 +451,337 @@ class AXCalendarMonth {
372
451
  }
373
452
  class AXDateTimeRange {
374
453
  constructor(startTime, endTime) {
375
- this._startTime = startTime;
376
- this._endTime = endTime;
377
- }
378
- get startTime() {
379
- return this._startTime;
380
- }
381
- get endTime() {
382
- return this._endTime;
383
- }
384
- duration() {
385
- const result = {
386
- miliseconds: 0,
387
- seconds: 0,
388
- minutes: 0,
389
- hours: 0,
390
- days: 0,
391
- months: 0,
392
- years: 0,
393
- total: {
394
- miliseconds: 0,
395
- seconds: 0,
396
- minutes: 0,
397
- hours: 0,
398
- days: 0,
399
- weeks: 0,
400
- months: 0,
401
- years: 0,
402
- },
403
- };
404
- const one_second = 1000;
405
- const one_min = one_second * 60;
406
- const one_hour = one_min * 60;
407
- const one_day = one_hour * 24;
408
- const one_week = one_day * 7;
409
- const one_year = 365.25 * one_day;
410
- const one_month = one_year / 12;
411
- const startTime = this._startTime.date.getTime();
412
- const endTime = this._endTime.date.getTime();
413
- const diff = Math.abs(endTime - startTime);
414
- //
415
- result.total.miliseconds = diff;
416
- result.total.seconds = Number((diff / one_second).toFixed(2));
417
- result.total.minutes = Number((diff / one_min).toFixed(2));
418
- result.total.hours = Number((diff / one_hour).toFixed(2));
419
- result.total.days = Number((diff / one_day).toFixed(2));
420
- result.total.weeks = Number((diff / one_week).toFixed(2));
421
- //
422
- // let months = (this.endTime.year - this.startTime.year) * 12;
423
- // months += this.endTime.monthOfYear - this.startTime.monthOfYear + 1;
424
- // if (this.endTime.dayOfYear < this.startTime.dayOfYear) {
425
- // months--;
426
- // }
427
- // result.total.months = Math.abs(months);
428
- // TODO: review
429
- result.total.months = Number((diff / one_month).toFixed(2));
430
- result.total.years = Number((diff / one_year).toFixed(2));
431
- //
432
- result.miliseconds = result.total.miliseconds % 1000;
433
- result.seconds = Number((result.total.seconds % 60).toFixed(0));
434
- result.minutes = Number((result.total.minutes % 60).toFixed(0));
435
- result.hours = Number((result.total.hours % 24).toFixed(0));
436
- // TODO: review
437
- result.days = Number((result.total.days % 30.4).toFixed(0));
438
- result.months = Number((result.total.months % 12).toFixed(0));
439
- result.years = Number(result.total.years.toFixed(0));
440
- return result;
454
+ this.startTime = startTime;
455
+ this.endTime = endTime;
441
456
  }
442
- enumurate(unit = 'day', amount = 1) {
443
- // TODO: setptemper savingtime issue
457
+ duration(unit = 'days') {
458
+ const duration = moment.duration(moment(this.startTime.date).diff(moment(this.endTime.date)));
459
+ return duration.as(unit);
460
+ }
461
+ enumurate(unit = 'day', type = AXConfig.get('dateTime.type') || 'jalali') {
444
462
  const result = [];
445
- let item = this._startTime.clone();
446
- while (item.compare(this._endTime, unit) < 1) {
447
- result.push(item);
448
- item = item.add(unit, amount);
463
+ for (let index = 0; this.startTime.add(unit, index).compaireNew(this.endTime, this.getViewCompaire(unit), type) <= 0; index++) {
464
+ result.push(this.startTime.add(unit, index));
449
465
  }
450
466
  return result;
451
467
  }
452
- includes(value, unit = 'day') {
453
- // TODO: ??
454
- return true;
468
+ includes(value, unit = 'day', type = 'jalali') {
469
+ return (value.compaireNew(this.startTime, this.getViewCompaire(unit), type) >= 0 &&
470
+ value.compaireNew(this.endTime, this.getViewCompaire(unit), type) <= 0);
455
471
  }
456
- }
457
-
458
- class AXDateTimePipe {
459
- constructor() { }
460
- transform(value, format, calendar) {
461
- if (value == null) {
462
- return '';
463
- }
464
- const date = value instanceof AXDateTime ? value.clone() : AXDateTime.convert(value, calendar);
465
- if (!format) {
466
- return date.format(AXConfig.get('dateTime.shortDateFormat'));
467
- }
468
- else {
469
- return date.format(format);
472
+ getViewCompaire(view) {
473
+ switch (view) {
474
+ case 'day':
475
+ return 'YMD';
476
+ case 'month':
477
+ return 'YM';
478
+ case 'year':
479
+ return 'Y';
470
480
  }
471
481
  }
472
- }
473
- AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
474
- AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
475
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, decorators: [{
476
- type: Pipe,
477
- args: [{ name: 'axDate' }]
478
- }], ctorParameters: function () { return []; } });
482
+ }
479
483
 
480
- class GeorgianCalendar {
484
+ class AXBaseMenuItem {
481
485
  constructor() {
482
- this.monthNames = [
483
- "January", "February", "March",
484
- "April", "May", "June", "July",
485
- "August", "September", "October",
486
- "November", "December"
487
- ];
488
- this.monthShortNames = [
489
- "Jan", "Feb", "Mar",
490
- "Apr", "May", "Jun", "Jul",
491
- "Aug", "Sep", "Oct",
492
- "Nov", "Dec"
493
- ];
494
- this.dayNames = [
495
- "Sunday", "Monday", "Tuesday", "Wednesday",
496
- "Thursday", "Friday", "Saturday"
497
- ];
498
- this.dayShortNames = [
499
- "Sun", "Mon", "Tue", "Wed",
500
- "Thu", "Fri", "Sat"
501
- ];
502
- }
503
- create(value) {
504
- return new AXDateTime(new Date(value.year, value.month - 1, value.date, value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0), this.name());
505
- }
506
- name() {
507
- return 'gregorian';
508
- }
509
- dayOfMonth(date) {
510
- return date.getDate();
511
- }
512
- dayOfYear(date) {
513
- let result = 0;
514
- let m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
515
- if (this.isLeap(date)) {
516
- m[1] = 29;
517
- }
518
- for (let i = 0; i < date.getMonth(); i++) {
519
- result = result + m[i];
520
- }
521
- result += date.getDate();
522
- return result;
486
+ this.uid = new Date().getTime().toString();
487
+ this.visible = true;
488
+ this.disable = false;
489
+ this.selected = false;
490
+ this.style = 'ax light';
491
+ this.orderIndex = 0;
523
492
  }
524
- dayOfWeek(date) {
525
- return date.getDay() + 1;
493
+ }
494
+ class AXMenuItem extends AXBaseMenuItem {
495
+ constructor() {
496
+ super(...arguments);
497
+ this.divider = false;
526
498
  }
527
- weekOfYear(date) {
528
- const firstDay = new AXDateTime(date).startOf('year');
529
- return Math.ceil((((date.getTime() - firstDay.date.getTime()) / 86400000) + firstDay.date.getDay() + 1) / 7);
499
+ }
500
+ class AXButtonItem extends AXBaseMenuItem {
501
+ constructor() {
502
+ super(...arguments);
503
+ this.dropdown = false;
504
+ this.submitBehavior = false;
505
+ this.cancelBehavior = false;
530
506
  }
531
- year(date) {
532
- return date.getFullYear();
507
+ }
508
+ class AXCheckItem {
509
+ }
510
+
511
+ class AXPromise {
512
+ constructor(executor) {
513
+ this._executor = executor;
514
+ setTimeout(() => {
515
+ this._executor(this.thenAction);
516
+ }, 50);
517
+ }
518
+ static resolve(value) {
519
+ const r = new AXPromise(z => {
520
+ z(value);
521
+ }).then(() => { });
522
+ return r;
523
+ }
524
+ then(action) {
525
+ this.thenAction = action;
526
+ return this;
533
527
  }
534
- monthOfYear(date) {
535
- return date.getMonth() + 1;
528
+ }
529
+
530
+ class AXSelectItem {
531
+ }
532
+
533
+ /**
534
+ * @deprecated Use AXBasePageComponent from @acorex/components
535
+ */
536
+ // TODO: Add Angular decorator.
537
+ class AXBasePageComponent {
538
+ constructor() {
539
+ this.onClosed = new EventEmitter();
536
540
  }
537
- add(date, unit, amount) {
538
- let value = date.valueOf();
539
- switch (unit) {
540
- case 'second':
541
- value += 1000 * amount;
542
- break;
543
- case 'minute':
544
- value += 60000 * amount;
545
- break;
546
- case 'hour':
547
- value += 3600000 * amount;
548
- break;
549
- case 'month':
550
- const v = new Date(value);
551
- var mo = date.getMonth();
552
- var yr = date.getFullYear();
553
- mo = (mo + amount) % 12;
554
- if (0 > mo) {
555
- yr += (date.getMonth() + amount - mo - 12) / 12;
556
- mo += 12;
557
- }
558
- else
559
- yr += ((date.getMonth() + amount - mo) / 12);
560
- v.setMonth(mo);
561
- v.setFullYear(yr);
562
- value = v.valueOf();
563
- break;
564
- case 'week':
565
- value += 7 * 86400000 * amount;
566
- break;
567
- case 'year':
568
- const yv = new Date(value);
569
- yv.setFullYear(yv.getFullYear() + amount);
570
- value = yv.valueOf();
571
- break;
572
- case 'day':
573
- default:
574
- value += 86400000 * amount;
575
- }
576
- return new AXDateTime(new Date(value), this.name());
541
+ close(data) {
542
+ this.onClosed.emit({
543
+ component: this,
544
+ data: data
545
+ });
577
546
  }
578
- set(date, unit, value) {
579
- const clone = new Date(date.valueOf());
580
- switch (unit) {
581
- case 'second':
582
- clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());
583
- break;
584
- case 'minute':
585
- clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());
586
- break;
587
- case 'hour':
588
- clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());
589
- break;
590
- default:
591
- case 'day':
592
- clone.setDate(value);
593
- break;
594
- case "week":
595
- break;
596
- case "month":
597
- clone.setMonth(Math.max(0, value - 1));
598
- break;
599
- case "year":
600
- clone.setFullYear(value);
601
- break;
602
- }
603
- return new AXDateTime(clone, this.name());
547
+ onClosing(e) {
604
548
  }
605
- startOf(date, unit) {
606
- const clone = new Date(date.valueOf());
607
- switch (unit) {
608
- case 'second':
609
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
610
- return new AXDateTime(clone, this.name());
611
- case 'minute':
612
- clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
613
- return new AXDateTime(clone, this.name());
614
- case 'hour':
615
- clone.setHours(clone.getHours(), 0, 0, 0);
616
- return new AXDateTime(clone, this.name());
617
- default:
618
- case 'day':
619
- clone.setHours(0, 0, 0, 0);
620
- return new AXDateTime(clone, this.name());
621
- case "week":
622
- const index = 0;
623
- const start = index >= 0 ? index : 0;
624
- const day = clone.getDay();
625
- const diff = clone.getDate() - day + (start > day ? start - 7 : start);
626
- clone.setDate(diff);
627
- return new AXDateTime(clone, this.name()).startOf('day');
628
- case "month":
629
- clone.setDate(1);
630
- return new AXDateTime(clone, this.name()).startOf('day');
631
- case "year":
632
- clone.setMonth(0);
633
- clone.setDate(1);
634
- return new AXDateTime(clone, this.name()).startOf('day');
635
- }
549
+ ngOnDestroy() {
550
+ this.onClosed.unsubscribe();
636
551
  }
637
- endOf(date, unit) {
638
- const clone = new Date(date.valueOf());
639
- switch (unit) {
640
- case 'second':
641
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
642
- return new AXDateTime(clone, this.name());
643
- case 'minute':
644
- clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
645
- return new AXDateTime(clone, this.name());
646
- case 'hour':
647
- clone.setHours(clone.getHours(), 59, 59, 999);
648
- return new AXDateTime(clone, this.name());
649
- default:
650
- case 'day':
651
- clone.setHours(23, 59, 59, 999);
652
- return new AXDateTime(clone, this.name());
653
- case 'week':
654
- return this.startOf(date, 'week').add('day', 6).endOf('day');
655
- case 'month':
656
- return new AXDateTime(new Date(date.getFullYear(), date.getMonth() + 1, 0), this.name()).endOf('day');
657
- case "year":
658
- clone.setMonth(11);
659
- return new AXDateTime(clone, this.name()).endOf('month');
552
+ }
553
+ AXBasePageComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXBasePageComponent, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
554
+ AXBasePageComponent.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXBasePageComponent });
555
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXBasePageComponent, decorators: [{
556
+ type: Injectable
557
+ }] });
558
+
559
+ const AX_ERROR_DISPLAY_INTERCEPTOR = new InjectionToken('ax.error');
560
+ class AXErrorService {
561
+ constructor(injector) {
562
+ this.injector = injector;
563
+ }
564
+ handle(message) {
565
+ const instance = this.injector.get(AX_ERROR_DISPLAY_INTERCEPTOR);
566
+ if (instance) {
567
+ instance.show(message);
660
568
  }
661
569
  }
662
- isLeap(date) {
663
- let leapYear = new Date(date.getFullYear(), 1, 29);
664
- return leapYear.getDate() == 29;
665
- }
666
- }
570
+ }
571
+ AXErrorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
572
+ AXErrorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorService, providedIn: 'root' });
573
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorService, decorators: [{
574
+ type: Injectable,
575
+ args: [{ providedIn: 'root' }]
576
+ }], ctorParameters: function () { return [{ type: i0.Injector }]; } });
667
577
 
668
- class JalaliCalendar {
669
- constructor() {
670
- this.monthNames = ("فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند").split("_");
671
- this.monthShortNames = ("فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند").split("_");
672
- this.dayNames = ("شنبه_یکشنبه_دوشنبه_سه شنبه_چهارشنبه_پنج شنبه_جمعه").split("_");
673
- this.dayShortNames = "ش_ی_د_س_چ_پ_ج".split("_");
674
- }
675
- create(value) {
676
- const a = this.toGregorian(value.year, value.month, value.date);
677
- return new AXDateTime(new Date(a.getFullYear(), a.getMonth(), a.getDate(), value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0), this.name());
678
- }
679
- name() {
680
- return 'jalali';
578
+ class AXErrorModule {
579
+ }
580
+ AXErrorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
581
+ AXErrorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorModule, imports: [CommonModule] });
582
+ AXErrorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorModule, providers: [AXErrorService], imports: [[CommonModule]] });
583
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXErrorModule, decorators: [{
584
+ type: NgModule,
585
+ args: [{
586
+ declarations: [],
587
+ imports: [CommonModule],
588
+ exports: [],
589
+ providers: [AXErrorService],
590
+ }]
591
+ }] });
592
+
593
+ const AX_HTTP_EVENT_INTERCEPTOR = new InjectionToken('ax.http.events');
594
+
595
+ class HttpResult {
596
+ constructor(executor) {
597
+ this._executor = executor;
598
+ setTimeout(() => {
599
+ this._executor(this.resultAction, this.errorAction, this.completeAction);
600
+ }, 50);
681
601
  }
682
- dayOfMonth(date) {
683
- return this.toJalali(date).day;
602
+ result(action) {
603
+ this.resultAction = action;
604
+ return this;
684
605
  }
685
- dayOfYear(date) {
686
- const j = this.toJalali(date);
687
- return (j.month <= 6 ? ((j.month - 1) * 31) : ((6 * 31) + (j.month - 7) * 30)) + j.day;
606
+ error(action) {
607
+ this.errorAction = action;
608
+ return this;
688
609
  }
689
- dayOfWeek(date) {
690
- return date.getDay() == 6 ? 1 : date.getDay() + 2;
610
+ complete(action) {
611
+ this.completeAction = action;
612
+ return this;
691
613
  }
692
- weekOfYear(date) {
693
- //TODO : apply jalali
694
- const firstDay = new AXDateTime(date).startOf('year');
695
- return Math.ceil((((date.getTime() - firstDay.date.getTime()) / 86400000) + firstDay.date.getDay() + 1) / 7);
614
+ }
615
+
616
+ // import { catchError, retry, retryWhen, mergeMap, delay, switchMap, scan, takeWhile, flatMap } from 'rxjs/operators';
617
+ // import { of, concat, throwError } from 'rxjs';
618
+ class AXHttpService {
619
+ constructor(http, injector) {
620
+ this.http = http;
621
+ this.injector = injector;
622
+ this.interceptor = this.injector.get(AX_HTTP_EVENT_INTERCEPTOR);
623
+ }
624
+ get(url, config = {}) {
625
+ config.url = url;
626
+ config.method = "get";
627
+ return this.request(config);
628
+ }
629
+ post(url, config = {}) {
630
+ config.url = url;
631
+ config.method = "post";
632
+ return this.request(config);
633
+ }
634
+ delete(url, config = {}) {
635
+ config.url = url;
636
+ config.method = "delete";
637
+ return this.request(config);
638
+ }
639
+ put(url, config = {}) {
640
+ config.url = url;
641
+ config.method = "put";
642
+ return this.request(config);
643
+ }
644
+ request(config) {
645
+ return new HttpResult((result, error, complete) => {
646
+ this.handleBegin(config).then(c => {
647
+ this.http
648
+ .request(config.method, config.url, this.mapOptions(config))
649
+ //.pipe(this.retry)
650
+ .subscribe(data => {
651
+ this.handleResult(data, result, complete, config);
652
+ }, c => {
653
+ this.handleError(c, error, complete, config);
654
+ });
655
+ });
656
+ });
696
657
  }
697
- year(date) {
698
- return this.toJalali(date).year;
658
+ handleResult(data, result, complete, config) {
659
+ if (this.interceptor) {
660
+ this.interceptor.success(config, data).then(c => {
661
+ if (result)
662
+ result(c);
663
+ this.handleComplete(complete, config);
664
+ });
665
+ }
666
+ else {
667
+ //
668
+ if (result)
669
+ result(data);
670
+ this.handleComplete(complete, config);
671
+ }
699
672
  }
700
- monthOfYear(date) {
701
- return this.toJalali(date).month;
673
+ handleBegin(config) {
674
+ return new Promise((resolve) => {
675
+ if (!config.headers)
676
+ config.headers = {};
677
+ if (!config.params)
678
+ config.params = {};
679
+ //
680
+ if (this.interceptor) {
681
+ this.interceptor.begin(config).then(c => {
682
+ resolve(c);
683
+ });
684
+ }
685
+ else {
686
+ resolve(config);
687
+ }
688
+ });
702
689
  }
703
- add(date, unit, amount) {
704
- let value = date.valueOf();
705
- switch (unit) {
706
- case 'second':
707
- value += 1000 * amount;
708
- break;
709
- case 'minute':
710
- value += 60000 * amount;
711
- break;
712
- case 'hour':
713
- value += 3600000 * amount;
714
- break;
715
- case 'month':
716
- {
717
- const v = new Date(value);
718
- let jd = this.dayOfMonth(date);
719
- let jm = this.monthOfYear(date);
720
- let jy = this.year(date);
721
- const nm = (jm + amount);
722
- const ny = (nm % 12) ? Math.floor(nm / 12) : 0;
723
- jy += ny;
724
- jm = nm - (ny * 12);
725
- const vv = this.toGregorian(jy, jm, jd);
726
- v.setFullYear(vv.getFullYear());
727
- v.setMonth(vv.getMonth());
728
- v.setDate(vv.getDate());
729
- value = v.valueOf();
730
- break;
731
- }
732
- case 'week':
733
- value += 7 * 86400000 * amount;
734
- break;
735
- case 'year':
736
- {
737
- // const v = new Date(value);
738
- // v.setFullYear(v.getFullYear() + amount);
739
- // value = v.valueOf();
740
- // break
741
- const v = new Date(value);
742
- let jd = this.dayOfMonth(date);
743
- let jm = this.monthOfYear(date);
744
- let jy = this.year(date);
745
- const vv = this.toGregorian(jy + amount, jm, jd);
746
- v.setFullYear(vv.getFullYear());
747
- v.setMonth(vv.getMonth());
748
- v.setDate(vv.getDate());
749
- value = v.valueOf();
750
- break;
751
- }
752
- case 'day':
753
- default:
754
- value += 86400000 * amount;
690
+ handleComplete(complete, config) {
691
+ if (complete)
692
+ complete();
693
+ if (this.interceptor)
694
+ this.interceptor.complete(config);
695
+ }
696
+ handleError(c, error, complete, config) {
697
+ var _a;
698
+ let r = {
699
+ message: c.message,
700
+ status: c.status,
701
+ code: (_a = c.status) === null || _a === void 0 ? void 0 : _a.toString(),
702
+ handled: false,
703
+ error: c.error
704
+ };
705
+ if (error) {
706
+ error(r);
755
707
  }
756
- return new AXDateTime(new Date(value), this.name());
757
- }
758
- set(date, unit, value) {
759
- const clone = new Date(date.valueOf());
760
- const jDate = this.toJalali(clone);
761
- switch (unit) {
762
- case 'second':
763
- clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());
764
- break;
765
- case 'minute':
766
- clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());
767
- break;
768
- case 'hour':
769
- clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());
770
- break;
771
- default:
772
- case 'day':
773
- const gDate = this.toGregorian(jDate.year, jDate.month, value);
774
- clone.setDate(gDate.getDate());
775
- break;
776
- case "week":
777
- break;
778
- case "month":
779
- const gDate2 = this.toGregorian(jDate.year, value, jDate.day);
780
- clone.setMonth(gDate2.getMonth());
781
- break;
782
- case "year":
783
- const gDate3 = this.toGregorian(value, jDate.month, jDate.day);
784
- clone.setFullYear(gDate3.getFullYear());
785
- break;
708
+ if (!r.handled) {
709
+ if (this.interceptor)
710
+ this.interceptor.error(config, r);
786
711
  }
787
- return new AXDateTime(clone, this.name());
788
- }
789
- startOf(date, unit) {
790
- const clone = new Date(date.valueOf());
791
- switch (unit) {
792
- case 'second':
793
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
794
- return new AXDateTime(clone, this.name());
795
- case 'minute':
796
- clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
797
- return new AXDateTime(clone, this.name());
798
- case 'hour':
799
- clone.setHours(clone.getHours(), 0, 0, 0);
800
- return new AXDateTime(clone, this.name());
801
- default:
802
- case 'day':
803
- clone.setHours(0, 0, 0, 0);
804
- return new AXDateTime(clone, this.name());
805
- case "week":
806
- return new AXDateTime(clone, this.name()).add('day', -this.dayOfWeek(clone) + 1).startOf('day');
807
- case "month":
808
- {
809
- const jy = this.year(date);
810
- const jm = this.monthOfYear(date);
811
- const gDate = this.toGregorian(jy, jm, 1);
812
- return new AXDateTime(gDate, this.name()).startOf('day');
813
- }
814
- case "year":
815
- {
816
- const jy = this.year(date);
817
- const gDate = this.toGregorian(jy, 1, 1);
818
- return new AXDateTime(gDate, this.name()).startOf('day');
819
- }
712
+ this.handleComplete(complete, config);
713
+ }
714
+ mapOptions(options) {
715
+ let headers = new HttpHeaders();
716
+ for (const key in options.headers) {
717
+ if (options.headers.hasOwnProperty(key)) {
718
+ const value = options.headers[key];
719
+ headers = headers.set(key, value);
720
+ }
820
721
  }
821
- }
822
- endOf(date, unit) {
823
- const clone = new Date(date.valueOf());
824
- switch (unit) {
825
- case 'second':
826
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
827
- return new AXDateTime(clone, this.name());
828
- case 'minute':
829
- clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
830
- return new AXDateTime(clone, this.name());
831
- case 'hour':
832
- clone.setHours(clone.getHours(), 59, 59, 999);
833
- return new AXDateTime(clone, this.name());
834
- default:
835
- case 'day':
836
- clone.setHours(23, 59, 59, 999);
837
- return new AXDateTime(clone, this.name());
838
- case 'week':
839
- {
840
- return this.startOf(date, 'week').add('day', 6).endOf('day');
841
- }
842
- case 'month':
843
- {
844
- const jy = this.year(date);
845
- const jm = this.monthOfYear(date);
846
- const jd = this.monthLength(jy, jm);
847
- const gDate = this.toGregorian(jy, jm, jd);
848
- return new AXDateTime(gDate, this.name()).endOf('day');
849
- }
850
- case "year":
851
- let jy = this.year(date);
852
- const gDate = this.toGregorian(jy, 12, this.monthLength(jy, 12));
853
- return new AXDateTime(gDate, this.name()).endOf('day');
854
- }
855
- }
856
- toJalali(date) {
857
- const gy = date.getFullYear();
858
- const gm = date.getMonth() + 1;
859
- const gd = date.getDate();
860
- const r = this.d2j(this.g2d(gy, gm, gd));
861
- return {
862
- year: r.jy,
863
- month: r.jm,
864
- day: r.jd,
865
- };
866
- }
867
- /*
868
- Converts a Jalaali date to Gregorian.
869
- */
870
- toGregorian(jy, jm, jd) {
871
- const g = this.d2g(this.j2d(jy, jm, jd));
872
- return new Date(g.gy, g.gm - 1, g.gd);
873
- }
874
- /*
875
- Checks whether a Jalaali date is valid or not.
876
- */
877
- isValid(jy, jm, jd) {
878
- return jy >= -61 && jy <= 3177 &&
879
- jm >= 1 && jm <= 12 &&
880
- jd >= 1 && jd <= this.monthLength(jy, jm);
881
- }
882
- /*
883
- Is this a leap year or not?
884
- */
885
- isLeapYear(jy) {
886
- return this.jalCal(jy).leap === 0;
887
- }
888
- /*
889
- Number of days in a given month in a Jalaali year.
890
- */
891
- monthLength(jy, jm) {
892
- if (jm <= 6)
893
- return 31;
894
- if (jm <= 11)
895
- return 30;
896
- if (this.isLeapYear(jy))
897
- return 30;
898
- return 29;
899
- }
900
- jalCal(jy) {
901
- // Jalaali years starting the 33-year rule.
902
- let breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210,
903
- 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178
904
- ], bl = breaks.length, gy = jy + 621, leapJ = -14, jp = breaks[0], jm, jump, leap, leapG, march, n, i;
905
- if (jy < jp || jy >= breaks[bl - 1])
906
- throw new Error('Invalid Jalaali year ' + jy);
907
- // Find the limiting years for the Jalaali year jy.
908
- for (i = 1; i < bl; i += 1) {
909
- jm = breaks[i];
910
- jump = jm - jp;
911
- if (jy < jm)
912
- break;
913
- leapJ = leapJ + this.div(jump, 33) * 8 + this.div(this.mod(jump, 33), 4);
914
- jp = jm;
915
- }
916
- n = jy - jp;
917
- // Find the number of leap years from AD 621 to the beginning
918
- // of the current Jalaali year in the Persian calendar.
919
- leapJ = leapJ + this.div(n, 33) * 8 + this.div(this.mod(n, 33) + 3, 4);
920
- if (this.mod(jump, 33) === 4 && jump - n === 4)
921
- leapJ += 1;
922
- // And the same in the Gregorian calendar (until the year gy).
923
- leapG = this.div(gy, 4) - this.div((this.div(gy, 100) + 1) * 3, 4) - 150;
924
- // Determine the Gregorian date of Farvardin the 1st.
925
- march = 20 + leapJ - leapG;
926
- // Find how many years have passed since the last leap year.
927
- if (jump - n < 6)
928
- n = n - jump + this.div(jump + 4, 33) * 33;
929
- leap = this.mod(this.mod(n + 1, 33) - 1, 4);
930
- if (leap === -1) {
931
- leap = 4;
932
- }
933
- return {
934
- leap: leap,
935
- gy: gy,
936
- march: march
937
- };
938
- }
939
- /*
940
- Converts a date of the Jalaali calendar to the Julian Day number.
941
- @param jy Jalaali year (1 to 3100)
942
- @param jm Jalaali month (1 to 12)
943
- @param jd Jalaali day (1 to 29/31)
944
- @return Julian Day number
945
- */
946
- j2d(jy, jm, jd) {
947
- let r = this.jalCal(jy);
948
- return this.g2d(r.gy, 3, r.march) + (jm - 1) * 31 - this.div(jm, 7) * (jm - 7) + jd - 1;
949
- }
950
- /*
951
- Converts the Julian Day number to a date in the Jalaali calendar.
952
- @param jdn Julian Day number
953
- @return
954
- jy: Jalaali year (1 to 3100)
955
- jm: Jalaali month (1 to 12)
956
- jd: Jalaali day (1 to 29/31)
957
- */
958
- d2j(jdn) {
959
- let gy = this.d2g(jdn).gy // Calculate Gregorian year (gy).
960
- , jy = gy - 621, r = this.jalCal(jy), jdn1f = this.g2d(gy, 3, r.march), jd, jm, k;
961
- // Find number of days that passed since 1 Farvardin.
962
- k = jdn - jdn1f;
963
- if (k >= 0) {
964
- if (k <= 185) {
965
- // The first 6 months.
966
- jm = 1 + this.div(k, 31);
967
- jd = this.mod(k, 31) + 1;
968
- return {
969
- jy: jy,
970
- jm: jm,
971
- jd: jd
972
- };
973
- }
974
- else {
975
- // The remaining months.
976
- k -= 186;
722
+ let params = new HttpParams();
723
+ for (const key in options.params) {
724
+ if (options.params.hasOwnProperty(key)) {
725
+ const value = options.params[key];
726
+ params = params.set(key, value);
977
727
  }
978
728
  }
979
- else {
980
- // Previous Jalaali year.
981
- jy -= 1;
982
- k += 179;
983
- if (r.leap === 1)
984
- k += 1;
985
- }
986
- jm = 7 + this.div(k, 30);
987
- jd = this.mod(k, 30) + 1;
988
- return {
989
- jy: jy,
990
- jm: jm,
991
- jd: jd
992
- };
993
- }
994
- g2d(gy, gm, gd) {
995
- let d = this.div((gy + this.div(gm - 8, 6) + 100100) * 1461, 4)
996
- + this.div(153 * this.mod(gm + 9, 12) + 2, 5)
997
- + gd - 34840408;
998
- d = d - this.div(this.div(gy + 100100 + this.div(gm - 8, 6), 100) * 3, 4) + 752;
999
- return d;
1000
- }
1001
- d2g(jdn) {
1002
- let j, i, gd, gm, gy;
1003
- j = 4 * jdn + 139361631;
1004
- j = j + this.div(this.div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;
1005
- i = this.div(this.mod(j, 1461), 4) * 5 + 308;
1006
- gd = this.div(this.mod(i, 153), 5) + 1;
1007
- gm = this.mod(this.div(i, 153), 12) + 1;
1008
- gy = this.div(j, 1461) - 100100 + this.div(8 - gm, 6);
1009
729
  return {
1010
- gy: gy,
1011
- gm: gm,
1012
- gd: gd
730
+ headers: headers,
731
+ params: params,
732
+ body: options.body,
733
+ responseType: options.responseType || 'json'
1013
734
  };
1014
- }
1015
- /*
1016
- Utility helper functions.
1017
- */
1018
- div(a, b) {
1019
- return ~~(a / b);
1020
- }
1021
- mod(a, b) {
1022
- return a - ~~(a / b) * b;
1023
- }
1024
- }
1025
-
1026
- class AXDateTimeModule {
1027
- constructor() {
1028
- AXConfig.set({
1029
- dateTime: {
1030
- calendars: {
1031
- jalali: new JalaliCalendar(),
1032
- gregorian: new GeorgianCalendar()
1033
- },
1034
- calendar: 'gregorian',
1035
- shortDateFormat: 'DDDD, d MMM yyyy'
1036
- }
1037
- });
1038
- }
1039
- }
1040
- AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1041
- AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
1042
- AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
1043
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, decorators: [{
1044
- type: NgModule,
1045
- args: [{
1046
- imports: [],
1047
- exports: [AXDateTimePipe],
1048
- declarations: [AXDateTimePipe],
1049
- providers: [],
1050
- }]
1051
- }], ctorParameters: function () { return []; } });
1052
-
1053
- class AXEventService {
1054
- constructor() {
1055
- this.list = [];
1056
- }
1057
- broadcast(key, options) {
1058
- const d = this.list.find(c => c.key === key);
1059
- if (d) {
1060
- d.events.forEach(c => {
1061
- c(options);
1062
- });
1063
- }
1064
- }
1065
- on(key, callback) {
1066
- let d = this.list.find(c => c.key === key);
1067
- if (!d) {
1068
- d = { key, events: [] };
1069
- this.list.push(d);
1070
- }
1071
- d.events.push(callback);
1072
- }
1073
- destroy(key, callback) {
1074
- const d = this.list.find(c => c.key === key);
1075
- if (d) {
1076
- d.events = [];
1077
- }
1078
- }
1079
- }
1080
- AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1081
- AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, providedIn: 'root' });
1082
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, decorators: [{
1083
- type: Injectable,
1084
- args: [{ providedIn: 'root' }]
1085
- }] });
1086
-
1087
- class AXHotkeysService {
1088
- constructor(eventManager, document) {
1089
- this.eventManager = eventManager;
1090
- this.document = document;
1091
- this.defaults = {
1092
- element: this.document
1093
- };
1094
- }
1095
- addShortcut(options) {
1096
- const merged = Object.assign(Object.assign({}, this.defaults), options);
1097
- const event = `keydown.${merged.keys}`;
1098
- return new Observable(observer => {
1099
- const handler = (e) => {
1100
- e.preventDefault();
1101
- observer.next(e);
1102
- };
1103
- const dispose = this.eventManager.addEventListener(merged.element, event, handler);
1104
- return () => {
1105
- dispose();
1106
- };
1107
- });
735
+ // if (options.method == "get") {
736
+ // return {
737
+ // headers: headers,
738
+ // params: params
739
+ // };
740
+ // }
741
+ // else {
742
+ // return {
743
+ // headers: headers,
744
+ // params: params,
745
+ // body: options.body
746
+ // };
747
+ // }
1108
748
  }
1109
749
  }
1110
- AXHotkeysService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService, deps: [{ token: i1.EventManager }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Injectable });
1111
- AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService });
1112
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService, decorators: [{
750
+ AXHttpService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpService, deps: [{ token: i1.HttpClient }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
751
+ AXHttpService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpService });
752
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpService, decorators: [{
1113
753
  type: Injectable
1114
- }], ctorParameters: function () {
1115
- return [{ type: i1.EventManager }, { type: Document, decorators: [{
1116
- type: Inject,
1117
- args: [DOCUMENT]
1118
- }] }];
1119
- } });
754
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Injector }]; } });
1120
755
 
1121
- // @dynamic
1122
- class AXTranslator {
1123
- static get onChange() {
1124
- return AXTranslator.dataChangeSubject.asObservable();
1125
- }
1126
- static load(lang, value) {
1127
- if (typeof value === 'object') {
1128
- if (!AXTranslator[`__data__${lang}`]) {
1129
- AXTranslator[`__data__${lang}`] = {};
1130
- }
1131
- AXTranslator[`__data__${lang}`] = merge(AXTranslator[`__data__${lang}`], value);
1132
- }
1133
- }
1134
- static use(lang) {
1135
- AXTranslator.lang = lang;
1136
- }
1137
- static get(key, lang, params) {
1138
- lang = lang || AXTranslator.lang;
1139
- let result = _.get(AXTranslator[`__data__${lang}`], key, key);
1140
- const vars = typeof (result) == 'string' ? result === null || result === void 0 ? void 0 : result.match(this._varsRegx) : [];
1141
- if (vars === null || vars === void 0 ? void 0 : vars.length) {
1142
- vars.forEach(v => {
1143
- var _a;
1144
- const varKey = ((_a = v.match(this._varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? v.match(this._varNameRegx)[0] : null;
1145
- if (varKey) {
1146
- const p = _.get(params, varKey) || this.get(varKey, lang);
1147
- if (p) {
1148
- result = result.replace(v, p);
1149
- }
1150
- }
1151
- });
1152
- }
1153
- return typeof (result) == 'string' ? result : JSON.stringify(result);
1154
- }
1155
- }
1156
- AXTranslator.lang = 'en';
1157
- AXTranslator.dataChangeSubject = new Subject();
1158
- AXTranslator._varsRegx = /((\$\{[a-zA-Z_0-9\.]+\})+)/gm;
1159
- AXTranslator._varNameRegx = /[a-zA-Z_0-9\.]+/gm;
1160
-
1161
- class AXTranslatorPipe {
1162
- transform(value, lang) {
1163
- return AXTranslator.get(value, lang);
756
+ class AXHttpModule {
757
+ static forRoot() {
758
+ return {
759
+ ngModule: AXHttpModule,
760
+ providers: [AXHttpService]
761
+ };
1164
762
  }
1165
763
  }
1166
- AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1167
- AXTranslatorPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1168
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1169
- type: Pipe,
1170
- args: [{ name: 'trans', pure: true }]
1171
- }] });
1172
-
1173
- class AXTranslationModule {
1174
- }
1175
- AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1176
- AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1177
- AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
1178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, decorators: [{
764
+ AXHttpModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
765
+ AXHttpModulemod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpModule, imports: [CommonModule,
766
+ HttpClientModule], exports: [HttpClientModule] });
767
+ AXHttpModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpModule, providers: [
768
+ AXHttpService
769
+ ], imports: [[
770
+ CommonModule,
771
+ HttpClientModule
772
+ ], HttpClientModule] });
773
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHttpModule, decorators: [{
1179
774
  type: NgModule,
1180
775
  args: [{
1181
- imports: [],
1182
- exports: [AXTranslatorPipe],
1183
- declarations: [AXTranslatorPipe],
1184
- providers: [],
776
+ declarations: [],
777
+ imports: [
778
+ CommonModule,
779
+ HttpClientModule
780
+ ],
781
+ exports: [HttpClientModule],
782
+ providers: [
783
+ AXHttpService
784
+ ]
1185
785
  }]
1186
786
  }] });
1187
787
 
@@ -1261,7 +861,7 @@ class AXPlatform {
1261
861
  this.click = new Subject();
1262
862
  this.scroll = new Subject();
1263
863
  fromEvent(window, 'resize')
1264
- .pipe(debounceTime(500))
864
+ .pipe(debounceTime(100))
1265
865
  .pipe(distinctUntilChanged())
1266
866
  .subscribe((e) => {
1267
867
  this.resize.next({
@@ -1310,23 +910,1352 @@ class AXPlatform {
1310
910
  document.querySelector(':root').style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
1311
911
  }
1312
912
  }
1313
- AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1314
- AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
1315
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, decorators: [{
913
+ AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
914
+ AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
915
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXPlatform, decorators: [{
1316
916
  type: Injectable,
1317
917
  args: [{
1318
918
  providedIn: 'platform',
1319
919
  }]
1320
920
  }], ctorParameters: function () { return []; } });
1321
921
 
1322
- /**
1323
- * Public API refrences of core libraries
1324
- * @module @acorex/core
1325
- */
922
+ class AXDateTimePipe {
923
+ constructor() { }
924
+ transform(value, format) {
925
+ const date = AXDateTime.convert(value);
926
+ if (value == null) {
927
+ return '';
928
+ }
929
+ if (!format) {
930
+ return date.toString();
931
+ }
932
+ else {
933
+ return date.format(format);
934
+ }
935
+ }
936
+ }
937
+ AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
938
+ AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDateTimePipe, name: "dt" });
939
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXDateTimePipe, decorators: [{
940
+ type: Pipe,
941
+ args: [{ name: 'dt' }]
942
+ }], ctorParameters: function () { return []; } });
943
+
944
+ class AXHtmlToTextPipe {
945
+ transform(value) {
946
+ if (value) {
947
+ const regexHtml = /<\/?[^>]+>/gi;
948
+ const regexNbsp = /&nbsp;/gi;
949
+ const regexAmp = /&amp;/gi;
950
+ return value
951
+ .replace(regexHtml, '')
952
+ .replace(regexNbsp, '')
953
+ .replace(regexAmp, '');
954
+ }
955
+ else {
956
+ return '';
957
+ }
958
+ }
959
+ }
960
+ AXHtmlToTextPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlToTextPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
961
+ AXHtmlToTextPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlToTextPipe, name: "html2text" });
962
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlToTextPipe, decorators: [{
963
+ type: Pipe,
964
+ args: [{ name: 'html2text' }]
965
+ }] });
966
+
967
+ class AXEventService {
968
+ constructor() {
969
+ this.list = [];
970
+ }
971
+ broadcast(key, options) {
972
+ const d = this.list.find(c => c.key === key);
973
+ if (d) {
974
+ d.events.forEach(c => {
975
+ c(options);
976
+ });
977
+ }
978
+ }
979
+ on(key, callback) {
980
+ let d = this.list.find(c => c.key === key);
981
+ if (!d) {
982
+ d = { key, events: [] };
983
+ this.list.push(d);
984
+ }
985
+ d.events.push(callback);
986
+ }
987
+ destroy(key, callback) {
988
+ const d = this.list.find(c => c.key === key);
989
+ if (d) {
990
+ d.events = [];
991
+ }
992
+ }
993
+ }
994
+ AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
995
+ AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXEventService, providedIn: 'root' });
996
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXEventService, decorators: [{
997
+ type: Injectable,
998
+ args: [{ providedIn: 'root' }]
999
+ }] });
1000
+
1001
+ class AXNavigator {
1002
+ }
1003
+ AXNavigator.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXNavigator, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1004
+ AXNavigator.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXNavigator });
1005
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXNavigator, decorators: [{
1006
+ type: Injectable
1007
+ }] });
1008
+
1009
+ class AXStorageService {
1010
+ get(key) {
1011
+ return localStorage.getItem(key);
1012
+ }
1013
+ set(key, value) {
1014
+ localStorage.setItem(key, value);
1015
+ }
1016
+ }
1017
+ AXStorageService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXStorageService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1018
+ AXStorageService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXStorageService });
1019
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXStorageService, decorators: [{
1020
+ type: Injectable
1021
+ }] });
1022
+
1023
+ // @dynamic
1024
+ class AXTranslator {
1025
+ static get onChange() {
1026
+ return AXTranslator.dataChangeSubject.asObservable();
1027
+ }
1028
+ static load(lang, value) {
1029
+ if (typeof value === 'object') {
1030
+ if (!AXTranslator[`__data__${lang}`]) {
1031
+ AXTranslator[`__data__${lang}`] = {};
1032
+ }
1033
+ AXTranslator[`__data__${lang}`] = merge(AXTranslator[`__data__${lang}`], value);
1034
+ }
1035
+ }
1036
+ static use(lang) {
1037
+ AXTranslator.lang = lang;
1038
+ }
1039
+ static get(key, lang) {
1040
+ return getPropByPath(AXTranslator[`__data__${lang || AXTranslator.lang}`], key) || key;
1041
+ }
1042
+ }
1043
+ AXTranslator.lang = 'en';
1044
+ AXTranslator.dataChangeSubject = new Subject();
1045
+
1046
+ class AXTranslatorService {
1047
+ load(lang, value) {
1048
+ AXTranslator.load(lang, value);
1049
+ }
1050
+ use(lang) {
1051
+ AXTranslator.use(lang);
1052
+ }
1053
+ get(key, lang) {
1054
+ return AXTranslator.get(lang, lang);
1055
+ }
1056
+ }
1057
+ AXTranslatorService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1058
+ AXTranslatorService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorService, providedIn: 'platform' });
1059
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorService, decorators: [{
1060
+ type: Injectable,
1061
+ args: [{ providedIn: 'platform' }]
1062
+ }] });
1063
+
1064
+ class AXTranslatorPipe {
1065
+ constructor() { }
1066
+ // transform(value: string, lang?: string): Promise<string> {
1067
+ // return new Promise<string>((resolve, reject) => {
1068
+ // if (!value) {
1069
+ // resolve(value);
1070
+ // }
1071
+ // resolve(this.translate.get(value, lang));
1072
+ // });
1073
+ // }
1074
+ transform(value, lang) {
1075
+ return AXTranslator.get(value, lang);
1076
+ }
1077
+ }
1078
+ AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1079
+ AXTranslatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1080
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1081
+ type: Pipe,
1082
+ args: [{ name: 'trans', pure: true }]
1083
+ }], ctorParameters: function () { return []; } });
1084
+
1085
+ var common$1 = {
1086
+ search: "Search",
1087
+ yes: "yes",
1088
+ no: "No",
1089
+ confirm: "Confirm",
1090
+ okay: "Okay",
1091
+ cancel: "Cancel",
1092
+ remove: "Remove",
1093
+ edit: "Edit",
1094
+ configs: "Configs",
1095
+ noDataFound: "No data found!",
1096
+ searching: "searching ...",
1097
+ save: "Save",
1098
+ "save-as": "Save As...",
1099
+ title: "Title",
1100
+ description: "Description",
1101
+ name: "Name",
1102
+ uniquename: "Unique Name",
1103
+ size: "Size",
1104
+ "add-item": "Add Item",
1105
+ color: "Color",
1106
+ display: "Display",
1107
+ "min-value": "Min Value",
1108
+ value: "Value",
1109
+ "max-value": "Max Value",
1110
+ "refresh-rate": "Refresh Rate",
1111
+ refresh: "Refresh",
1112
+ reload: "Reload",
1113
+ condition: "Condition",
1114
+ next: "Next",
1115
+ prev: "Prev"
1116
+ };
1117
+ var dateTime$1 = {
1118
+ weekdaysShort: {
1119
+ sun: "Sun",
1120
+ mon: "Mon",
1121
+ tue: "Tue",
1122
+ wed: "Wed",
1123
+ thu: "Thu",
1124
+ fri: "Fri",
1125
+ sat: "Sat"
1126
+ },
1127
+ dayTime: {
1128
+ am: "am",
1129
+ pm: "pm",
1130
+ m: "m",
1131
+ a: "a",
1132
+ p: "p"
1133
+ },
1134
+ today: "today",
1135
+ duration: {
1136
+ format_second: "{0} second(s)",
1137
+ format_minute: "{0} minute(s)"
1138
+ }
1139
+ };
1140
+ var queryBuilder$1 = {
1141
+ contains: "contains",
1142
+ "not-contains": "not-contains",
1143
+ "contains-all": "contains-all",
1144
+ "start-with": "start-with",
1145
+ "end-with": "end-with",
1146
+ equal: "equal",
1147
+ "not-equal": "not-equal",
1148
+ "null": "null",
1149
+ "not-null": "not-null",
1150
+ "greater-than": "greater-than",
1151
+ gt: "greater-than",
1152
+ "greater-than-equal": "greater-than-equal",
1153
+ gte: "greater-than-equal",
1154
+ "less-than": "less-than",
1155
+ lt: "less-than",
1156
+ "less-than-equal": "less-than-equal",
1157
+ lte: "less-than-equal",
1158
+ "true": "true",
1159
+ "false": "false",
1160
+ empty: "empty"
1161
+ };
1162
+ var validation$1 = {
1163
+ messages: {
1164
+ required: "This field is required!",
1165
+ email: "Please enter a valid email address!",
1166
+ phone: "Please enter a valid phone number!"
1167
+ }
1168
+ };
1169
+ var dataGrid$1 = {
1170
+ page: "page",
1171
+ more: "more",
1172
+ to: "To",
1173
+ of: "Of",
1174
+ next: "next",
1175
+ last: "last",
1176
+ first: "first",
1177
+ previous: "previous",
1178
+ loadingOoo: "Loading...",
1179
+ selectAll: "selectAll",
1180
+ searchOoo: "Search...",
1181
+ blanks: "blanks",
1182
+ filterOoo: "Filter...",
1183
+ equals: "Equals",
1184
+ notEqual: "NotEqual",
1185
+ lessThan: "LessThan",
1186
+ greaterThan: "GreaterThan",
1187
+ lessThanOrEqual: "LessThanOrEqual",
1188
+ greaterThanOrEqual: "GreaterThanOrEqual",
1189
+ inRange: "InRange",
1190
+ inRangeStart: "To",
1191
+ inRangeEnd: "From",
1192
+ contains: "Contains",
1193
+ notContains: "NotContains",
1194
+ startsWith: "Starts with",
1195
+ endsWith: "Ends with",
1196
+ andCondition: "AND",
1197
+ orCondition: "OR",
1198
+ applyFilter: "Apply",
1199
+ resetFilter: "Reset",
1200
+ clearFilter: "Clear",
1201
+ group: "Group",
1202
+ columns: "Columns",
1203
+ filters: "Filters",
1204
+ groups: "Groups",
1205
+ values: "Values",
1206
+ enabled: "Enabled",
1207
+ pinColumn: "Pin Column",
1208
+ groupBy: "Group by",
1209
+ ungroupBy: "UnGroup by",
1210
+ resetColumns: "ResetColumns",
1211
+ expandAll: "ExpandAll",
1212
+ collapseAll: "CollapseAll",
1213
+ toolPanel: "ToolPanel",
1214
+ "export": "Exporto",
1215
+ csvExport: "csv Export",
1216
+ excelExport: "Excel Export (.xlsx)",
1217
+ excelXmlExport: "Excel Exporto (.xml)",
1218
+ chartRange: "Chart Range",
1219
+ columnChart: "Column",
1220
+ groupedColumn: "Grouped",
1221
+ stackedColumn: "Stacked",
1222
+ normalizedColumn: "normalized Column",
1223
+ barChart: "bar Chart",
1224
+ groupedBar: "Grouped",
1225
+ stackedBar: "Stacked",
1226
+ normalizedBar: "normalized Bar",
1227
+ pie: "Pie",
1228
+ doughnut: "Doughnut",
1229
+ line: "Line",
1230
+ xyChart: "X Y (Scatter)",
1231
+ scatter: "Scatter",
1232
+ bubble: "Bubble",
1233
+ areaChart: "Area",
1234
+ area: "Area",
1235
+ stackedArea: "Stacked",
1236
+ normalizedArea: "100% Stacked",
1237
+ histogramChart: "Histogram",
1238
+ pinLeft: "Pin Left",
1239
+ pinRight: "Pin Right",
1240
+ noPin: "Dont Pin",
1241
+ sum: "Sum",
1242
+ min: "Min",
1243
+ max: "Max",
1244
+ none: "None",
1245
+ count: "Count",
1246
+ avg: "Average",
1247
+ filteredRows: "Filtered",
1248
+ selectedRows: "Selected",
1249
+ totalRows: "Total Rows",
1250
+ totalAndFilteredRows: "Rows",
1251
+ copy: "Copy",
1252
+ copyWithHeaders: "Copy With Headers",
1253
+ ctrlC: "Ctrl C",
1254
+ paste: "Paste",
1255
+ ctrlV: "Ctrl V",
1256
+ pivotChartTitle: "Pivot Chart",
1257
+ rangeChartTitle: "Range Chart",
1258
+ settings: "Settings",
1259
+ data: "Data",
1260
+ format: "Format",
1261
+ categories: "Categories",
1262
+ series: "Series",
1263
+ xyValues: "X Y Values",
1264
+ paired: "Paired Mode",
1265
+ axis: "Axis",
1266
+ color: "Color",
1267
+ thickness: "Thickness",
1268
+ xType: "X Type",
1269
+ automatic: "Automatic",
1270
+ category: "Category",
1271
+ number: "Number",
1272
+ time: "Time",
1273
+ xRotation: "X Rotation",
1274
+ yRotation: "Y Rotation",
1275
+ ticks: "Ticks",
1276
+ width: "Width",
1277
+ length: "Length",
1278
+ padding: "Padding",
1279
+ chart: "Chart",
1280
+ title: "Title",
1281
+ background: "Background",
1282
+ font: "Font",
1283
+ top: "Top",
1284
+ right: "Right",
1285
+ bottom: "Bottom",
1286
+ left: "Left",
1287
+ labels: "Labels",
1288
+ size: "Size",
1289
+ minSize: "Minimum Size",
1290
+ maxSize: "Maximum Size",
1291
+ legend: "Legend",
1292
+ position: "Position",
1293
+ markerSize: "Marker Size",
1294
+ markerStroke: "Marker Stroke",
1295
+ markerPadding: "Marker Padding",
1296
+ itemPaddingX: "Item Padding X",
1297
+ itemPaddingY: "Item Padding Y",
1298
+ strokeWidth: "Stroke Width",
1299
+ offset: "Offset",
1300
+ offsets: "Offsets",
1301
+ tooltips: "Tooltips",
1302
+ callout: "Callout",
1303
+ markers: "Markers",
1304
+ shadow: "Shadow",
1305
+ blur: "Blur",
1306
+ xOffset: "X Offset",
1307
+ yOffset: "Y Offset",
1308
+ lineWidth: "Line Width",
1309
+ normal: "Normal",
1310
+ bold: "Bold",
1311
+ italic: "Italic",
1312
+ boldItalic: "Bold Italic",
1313
+ predefined: "Predefined",
1314
+ fillOpacity: "Fill Opacity",
1315
+ strokeOpacity: "Line Opacity",
1316
+ histogramBinCount: "Bin Count",
1317
+ columnGroup: "Column",
1318
+ barGroup: "Bar",
1319
+ pieGroup: "Pie",
1320
+ lineGroup: "Line",
1321
+ scatterGroup: "Scatter",
1322
+ areaGroup: "Area",
1323
+ histogramGroup: "Histogram",
1324
+ groupedColumnTooltip: "Grouped",
1325
+ stackedColumnTooltip: "Stacked",
1326
+ normalizedColumnTooltip: "100% Stacked",
1327
+ groupedBarTooltip: "Grouped",
1328
+ stackedBarTooltip: "Stacked",
1329
+ pieTooltip: "Pie",
1330
+ doughnutTooltip: "Doughnut",
1331
+ lineTooltip: "Line",
1332
+ groupedAreaTooltip: "Grouped",
1333
+ stackedAreaTooltip: "Stacked",
1334
+ scatterTooltip: "Scatter",
1335
+ bubbleTooltip: "Bubble",
1336
+ histogramTooltip: "Histogram"
1337
+ };
1338
+ var en = {
1339
+ common: common$1,
1340
+ dateTime: dateTime$1,
1341
+ queryBuilder: queryBuilder$1,
1342
+ validation: validation$1,
1343
+ dataGrid: dataGrid$1
1344
+ };
1345
+
1346
+ var en$1 = /*#__PURE__*/Object.freeze({
1347
+ __proto__: null,
1348
+ common: common$1,
1349
+ dateTime: dateTime$1,
1350
+ queryBuilder: queryBuilder$1,
1351
+ validation: validation$1,
1352
+ dataGrid: dataGrid$1,
1353
+ 'default': en
1354
+ });
1355
+
1356
+ var common = {
1357
+ search: "جستجو",
1358
+ yes: "بله",
1359
+ no: "خیر",
1360
+ confirm: "تایید",
1361
+ okay: "تایید",
1362
+ cancel: "انصراف",
1363
+ remove: "حذف",
1364
+ edit: "ویرایش",
1365
+ configs: "پیکربندی",
1366
+ noDataFound: "موردی یافت نشد!",
1367
+ searching: "درحال جستجو ...",
1368
+ "save-as": "ذخیره به عنوان ...",
1369
+ title: "عنوان",
1370
+ description: "توضیحات",
1371
+ name: "نام",
1372
+ uniquename: "نام شناسه یکتا",
1373
+ size: "اندازه",
1374
+ "add-item": "افزودن",
1375
+ color: "رنگ",
1376
+ display: "نمایش",
1377
+ value: "مقدار",
1378
+ "min-value": "مقدار کمینه",
1379
+ "max-value": "مقدار بیشینه",
1380
+ "refresh-rate": "نرخ بروز رسانی",
1381
+ refresh: "بروز رسانی",
1382
+ reload: "بارگزاری مجدد",
1383
+ condition: "شرط",
1384
+ next: "بعدی",
1385
+ prev: "قبلی"
1386
+ };
1387
+ var dateTime = {
1388
+ weekdaysShort: {
1389
+ sun: "ی",
1390
+ mon: "د",
1391
+ tue: "س",
1392
+ wed: "چ",
1393
+ thu: "پ",
1394
+ fri: "ج",
1395
+ sat: "ش"
1396
+ },
1397
+ dayTime: {
1398
+ am: "ق ظ",
1399
+ pm: "ب ظُ",
1400
+ m: ".ظ",
1401
+ a: "ق",
1402
+ p: "ب"
1403
+ },
1404
+ today: "امروز",
1405
+ duration: {
1406
+ format_second: "{0} ثانیه",
1407
+ format_minute: "{0} دقیقه"
1408
+ }
1409
+ };
1410
+ var queryBuilder = {
1411
+ contains: "شامل",
1412
+ "not-contains": "به غیر از",
1413
+ "contains-all": "شامل همه",
1414
+ "start-with": "شروع شود با",
1415
+ "end-with": "پایان با",
1416
+ equal: "برابر با",
1417
+ "not-equal": "نا برابر با",
1418
+ "null": " خالی باشد",
1419
+ "not-null": "خالی نباشد",
1420
+ "greater-than": "بزرگ تر",
1421
+ gt: "بزرگ تر",
1422
+ "greater-than-equal": "بزرگتر مساوی",
1423
+ gte: "بزرگتر مساوی",
1424
+ "less-than": "کوچکتر",
1425
+ lt: "کوچکتر",
1426
+ "less-than-equal": "کوچکتر مساوی",
1427
+ lte: "کوچکتر مساوی",
1428
+ "true": "true",
1429
+ "false": "false"
1430
+ };
1431
+ var validation = {
1432
+ messages: {
1433
+ required: "مقدار این فیلد الزامی می باشد!",
1434
+ email: "این آدرس ایمیل معتبر نمی باشد!",
1435
+ phone: "این شماره تلفن معتبر نمی باشد!"
1436
+ }
1437
+ };
1438
+ var dataGrid = {
1439
+ page: "صفحه",
1440
+ more: "بیشتر",
1441
+ to: "تا",
1442
+ of: "از",
1443
+ next: "بعدی",
1444
+ last: "آخرین",
1445
+ first: "اولین",
1446
+ previous: "قبلی",
1447
+ loadingOoo: "... لطفا منتظر بمانید",
1448
+ selectAll: "انتخاب همه",
1449
+ searchOoo: "جستجو ...",
1450
+ blanks: "جای خالی",
1451
+ filterOoo: "فیلتر ...",
1452
+ equals: "برابر",
1453
+ notEqual: "نابرابر",
1454
+ lessThan: "کوچکتر از",
1455
+ greaterThan: "بزرگتر از",
1456
+ lessThanOrEqual: "کوچکتر مساوی",
1457
+ greaterThanOrEqual: "بزرکتر مساوی",
1458
+ inRange: "در محدوده",
1459
+ inRangeStart: "تا",
1460
+ inRangeEnd: "از",
1461
+ contains: "شامل",
1462
+ notContains: "شامل نمی شود",
1463
+ startsWith: "شروع شود با",
1464
+ endsWith: "پایان با",
1465
+ andCondition: "و",
1466
+ orCondition: "یا",
1467
+ applyFilter: "اعمال",
1468
+ resetFilter: "تنظیم مجدد فیلتر",
1469
+ clearFilter: "پاک کردن فیلتر",
1470
+ group: "گروه",
1471
+ columns: "ستون ها",
1472
+ filters: "فیاتر ها",
1473
+ groups: "گروه ها ",
1474
+ values: "مقدار ها",
1475
+ enabled: "فعال شده",
1476
+ pinColumn: "سنجاق",
1477
+ groupBy: "دسته بندی بر اساس",
1478
+ ungroupBy: "حذف دسته بندی",
1479
+ resetColumns: "تنظیم مجدد ستون ها",
1480
+ expandAll: "باز کردن همه",
1481
+ collapseAll: "بستن همه",
1482
+ toolPanel: "پنل ابزار",
1483
+ "export": "خروجی",
1484
+ csvExport: "csv خروجی",
1485
+ excelExport: "خروجی اکسل (.xlsx)",
1486
+ excelXmlExport: "خروجی اکسل (.xml)",
1487
+ chartRange: "محدوده نمودار",
1488
+ columnChart: "ستون",
1489
+ groupedColumn: "دسته بندی شده",
1490
+ stackedColumn: "انباشته",
1491
+ normalizedColumn: "ستون نرمال",
1492
+ barChart: "نمودار میله ای",
1493
+ groupedBar: "دسته بندی شده",
1494
+ stackedBar: "انباشته",
1495
+ normalizedBar: "نوار ",
1496
+ pie: "پای",
1497
+ doughnut: "Doughnut",
1498
+ line: "خط",
1499
+ xyChart: "X Y (پراکندگی)",
1500
+ scatter: "پراکندگی",
1501
+ bubble: "حباب",
1502
+ areaChart: "حوزه",
1503
+ area: "حوزه",
1504
+ stackedArea: "انباشته ",
1505
+ normalizedArea: "100% انباشته",
1506
+ histogramChart: "هیستوگرام",
1507
+ pinLeft: "سنجاق چپ",
1508
+ pinRight: "سنجاق راست",
1509
+ noPin: "حذف سنجاق",
1510
+ sum: "مجموع",
1511
+ min: "مینیمم",
1512
+ max: "ماکزیمم",
1513
+ none: "هیچ",
1514
+ count: "شمردن",
1515
+ avg: "میانگین",
1516
+ filteredRows: "فیلتر شده",
1517
+ selectedRows: "انتخاب شده",
1518
+ totalRows: "مجموع ردیف ها",
1519
+ totalAndFilteredRows: "سطر ها",
1520
+ copy: "کپی",
1521
+ copyWithHeaders: "کپی با هدر ها",
1522
+ ctrlC: "Ctrl C",
1523
+ paste: "جایگزینی",
1524
+ ctrlV: "Ctrl V",
1525
+ pivotChartTitle: "نمودار محوری",
1526
+ rangeChartTitle: "نمودار محدوده",
1527
+ settings: "تنظیمات",
1528
+ data: "تاریخ",
1529
+ format: "قالب",
1530
+ categories: "دسته بندی ها",
1531
+ series: "Series",
1532
+ xyValues: "X Y مقادیر",
1533
+ paired: "حالت زوج",
1534
+ axis: "محور",
1535
+ color: "رنگ",
1536
+ thickness: "ضخامت",
1537
+ xType: "X Type",
1538
+ automatic: "خودکار",
1539
+ category: "دسته بندی",
1540
+ number: "عدد",
1541
+ time: "زمان",
1542
+ xRotation: "X چرخش",
1543
+ yRotation: "Y چرخش",
1544
+ ticks: "نمادها",
1545
+ width: "عرض",
1546
+ length: "طول",
1547
+ padding: "لایه گزاری",
1548
+ chart: "جدول",
1549
+ title: "عنوان",
1550
+ background: "زمینه",
1551
+ font: "فونت",
1552
+ top: "بالا",
1553
+ right: "راست",
1554
+ bottom: "پایین",
1555
+ left: "چپ",
1556
+ labels: "برچسب",
1557
+ size: "اندازه",
1558
+ minSize: "حداقل اندازه",
1559
+ maxSize: "بیشترین اندازه",
1560
+ position: "موقعیت",
1561
+ markerSize: "اندازه نشانگر",
1562
+ callout: "فراخوان",
1563
+ markers: "نشانه گرها",
1564
+ shadow: "سایه",
1565
+ blur: "محو شدن",
1566
+ xOffset: "X انحراف",
1567
+ yOffset: "Y انحراف",
1568
+ lineWidth: "عرض خط",
1569
+ normal: "نرمال",
1570
+ italic: "Italic",
1571
+ boldItalic: "Bold Italic",
1572
+ predefined: "Predefined",
1573
+ fillOpacity: "Fill Opacity",
1574
+ strokeOpacity: "Line Opacity",
1575
+ histogramBinCount: "Bin Count",
1576
+ columnGroup: "ستون",
1577
+ barGroup: "Bar",
1578
+ pieGroup: "Pie",
1579
+ lineGroup: "خط",
1580
+ areaGroup: "حوزه",
1581
+ histogramGroup: "هیستوگرام",
1582
+ groupedColumnTooltip: "دسته بندی شده",
1583
+ stackedColumnTooltip: "Stacked",
1584
+ normalizedColumnTooltip: "100% Stacked",
1585
+ groupedBarTooltip: "دسته بندی شده",
1586
+ stackedBarTooltip: "Stacked",
1587
+ pieTooltip: "Pie",
1588
+ doughnutTooltip: "Doughnut",
1589
+ lineTooltip: "خط",
1590
+ groupedAreaTooltip: "گروه بندی شده",
1591
+ stackedAreaTooltip: "Stacked",
1592
+ scatterTooltip: "Scatter",
1593
+ bubbleTooltip: "حباب",
1594
+ histogramTooltip: "هیستوگرام",
1595
+ autosizeThiscolumn: "تنظیم اندازه ستون ",
1596
+ autosizeAllColumns: "تنظیم اندازه همه ستون ها"
1597
+ };
1598
+ var fa = {
1599
+ common: common,
1600
+ dateTime: dateTime,
1601
+ queryBuilder: queryBuilder,
1602
+ validation: validation,
1603
+ dataGrid: dataGrid
1604
+ };
1605
+
1606
+ var fa$1 = /*#__PURE__*/Object.freeze({
1607
+ __proto__: null,
1608
+ common: common,
1609
+ dateTime: dateTime,
1610
+ queryBuilder: queryBuilder,
1611
+ validation: validation,
1612
+ dataGrid: dataGrid,
1613
+ 'default': fa
1614
+ });
1615
+
1616
+ class AXTranslatorModule {
1617
+ constructor() {
1618
+ AXTranslator.load('en', en$1);
1619
+ AXTranslator.load('fa', fa$1);
1620
+ }
1621
+ }
1622
+ AXTranslatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1623
+ AXTranslatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1624
+ AXTranslatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorModule, providers: [], imports: [[]] });
1625
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXTranslatorModule, decorators: [{
1626
+ type: NgModule,
1627
+ args: [{
1628
+ imports: [],
1629
+ exports: [AXTranslatorPipe],
1630
+ declarations: [AXTranslatorPipe],
1631
+ providers: [],
1632
+ }]
1633
+ }], ctorParameters: function () { return []; } });
1634
+
1635
+ // @dynamic
1636
+ class AXArrayUtil {
1637
+ static pickRandom(array) {
1638
+ return array[Math.floor(Math.random() * array.length)];
1639
+ }
1640
+ static insert(array, index, ...rest) {
1641
+ array.splice.apply(array, [index, 0].concat(Array.prototype.slice.call(rest, 1)));
1642
+ return array;
1643
+ }
1644
+ static range(min, max) {
1645
+ return new Array(max - min).fill(1).map((d, i) => i);
1646
+ }
1647
+ static filter(array, filters) {
1648
+ if (filters == null || filters.length === 0) {
1649
+ return array;
1650
+ }
1651
+ const lamda = (item) => {
1652
+ let result = true;
1653
+ for (const key in filters) {
1654
+ if (filters.hasOwnProperty(key)) {
1655
+ const f = filters[key];
1656
+ if (f !== 'AND') {
1657
+ const vals = [];
1658
+ const mt = f.field.match(/\[\:(.*?)\]/);
1659
+ if (mt && mt.length > 1) {
1660
+ const p1 = f.field.replace(mt[0], '');
1661
+ const p2 = mt[1];
1662
+ const prop = AXFetchProp(item, p1);
1663
+ if (prop instanceof Array && prop.length) {
1664
+ vals.push(...prop.map(m => (AXFetchProp(m, p2))));
1665
+ }
1666
+ else {
1667
+ result = false;
1668
+ }
1669
+ }
1670
+ else {
1671
+ vals.push(AXFetchProp(item, f.field));
1672
+ }
1673
+ for (const j in vals) {
1674
+ if (vals.hasOwnProperty(j)) {
1675
+ let v1 = vals[j];
1676
+ const v2 = f.value;
1677
+ if (f.dataType === 'string') {
1678
+ v1 = v1.toString();
1679
+ switch (f.condition) {
1680
+ case 'equal':
1681
+ result = (v1 && v2) && v1.toLowerCase() === v2.toLowerCase();
1682
+ break;
1683
+ case 'not-equal':
1684
+ result = !((v1 && v2) && v1.toLowerCase() === v2.toLowerCase());
1685
+ break;
1686
+ case 'contains':
1687
+ result = ((v1 && v2) && (v1.toLowerCase().includes(v2.toLowerCase())));
1688
+ break;
1689
+ case 'not-contains':
1690
+ result = !((v1 && v2) && (v1.toLowerCase().includes(v2.toLowerCase())));
1691
+ break;
1692
+ case 'start-with':
1693
+ result = ((v1 && v2) && (v1.toLowerCase().startsWith(v2.toLowerCase())));
1694
+ break;
1695
+ case 'end-with':
1696
+ result = ((v1 && v2) && (v1.toLowerCase().endsWith(v2.toLowerCase())));
1697
+ break;
1698
+ case 'is-empty':
1699
+ result = v1 == null || v1 === undefined;
1700
+ break;
1701
+ case 'is-not-empty':
1702
+ result = !(v1 == null || v1 === undefined);
1703
+ break;
1704
+ default:
1705
+ console.error('The condition is not defined');
1706
+ result = false;
1707
+ }
1708
+ }
1709
+ else if (f.dataType === 'date') {
1710
+ }
1711
+ else if (f.dataType === 'number') {
1712
+ v1 = Number(v1);
1713
+ switch (f.condition) {
1714
+ case 'equal':
1715
+ result = v1 === v2;
1716
+ break;
1717
+ case 'not-equal':
1718
+ result = v1 !== v2;
1719
+ break;
1720
+ case 'contains':
1721
+ result = v2 && v2 instanceof Array && v2.includes(v1);
1722
+ break;
1723
+ case 'less-than':
1724
+ result = v1 < v2;
1725
+ break;
1726
+ case 'less-than-equal':
1727
+ result = v1 <= v2;
1728
+ break;
1729
+ case 'greater-than':
1730
+ result = v1 > v2;
1731
+ break;
1732
+ case 'greater-than-equal':
1733
+ result = v1 >= v2;
1734
+ break;
1735
+ case 'is-empty':
1736
+ result = v1 == null || v1 === undefined;
1737
+ break;
1738
+ case 'is-not-empty':
1739
+ result = !(v1 == null || v1 === undefined);
1740
+ break;
1741
+ default:
1742
+ console.error('The condition is not defined');
1743
+ result = false;
1744
+ }
1745
+ }
1746
+ else {
1747
+ console.error('The datatype is not supported');
1748
+ result = false;
1749
+ }
1750
+ if (result) {
1751
+ break;
1752
+ }
1753
+ }
1754
+ }
1755
+ }
1756
+ if (!result) {
1757
+ return false;
1758
+ }
1759
+ }
1760
+ }
1761
+ return true;
1762
+ };
1763
+ return array.filter(lamda);
1764
+ }
1765
+ }
1766
+
1767
+ class AXMathUtil {
1768
+ static randomRange(min, max) {
1769
+ return Math.floor(Math.random() * (max - min + 1) + min);
1770
+ }
1771
+ }
1772
+
1773
+ class AXPoint {
1774
+ constructor(x, y) {
1775
+ this.x = x;
1776
+ this.y = y;
1777
+ }
1778
+ }
1779
+ class AXClientRec {
1780
+ constructor(rec) {
1781
+ this._left = rec.left;
1782
+ this._top = rec.top;
1783
+ this._width = rec.width;
1784
+ this._height = rec.height;
1785
+ this._right = this._left + this._width;
1786
+ this._bottom = this._top + this._height;
1787
+ }
1788
+ get left() {
1789
+ return this._left;
1790
+ }
1791
+ set left(v) {
1792
+ this._left = v;
1793
+ }
1794
+ get top() {
1795
+ return this._top;
1796
+ }
1797
+ set top(v) {
1798
+ this._top = v;
1799
+ }
1800
+ get right() {
1801
+ return this._right;
1802
+ }
1803
+ set right(v) {
1804
+ this._right = v;
1805
+ }
1806
+ get bottom() {
1807
+ return this._bottom;
1808
+ }
1809
+ set bottom(v) {
1810
+ this._bottom = v;
1811
+ }
1812
+ get width() {
1813
+ return this._width;
1814
+ }
1815
+ set width(v) {
1816
+ this._width = v;
1817
+ }
1818
+ get height() {
1819
+ return this._height;
1820
+ }
1821
+ set height(v) {
1822
+ this._height = v;
1823
+ }
1824
+ intersect(rec) {
1825
+ return (this.left < rec.left + rec.width &&
1826
+ this.left + this.width > rec.left &&
1827
+ this.top < rec.top + rec.height &&
1828
+ this.top + this.height > rec.top);
1829
+ }
1830
+ }
1831
+ // @dynamic
1832
+ class AXHtmlUtil {
1833
+ static getBoundingRectPoint(el, placement) {
1834
+ const rec = el.getBoundingClientRect();
1835
+ const width = el.offsetWidth;
1836
+ const height = el.offsetHeight;
1837
+ switch (placement) {
1838
+ case 'top-start':
1839
+ return new AXPoint(rec.left, rec.top);
1840
+ case 'top-middle':
1841
+ return new AXPoint(rec.left + (width / 2), rec.top);
1842
+ case 'top-end':
1843
+ return new AXPoint(rec.left + (width), rec.top);
1844
+ case 'center-end':
1845
+ return new AXPoint(rec.left + (width), rec.top + (height / 2));
1846
+ case 'bottom-end':
1847
+ return new AXPoint(rec.left + (width), rec.top + (height));
1848
+ case 'bottom-middle':
1849
+ return new AXPoint(rec.left + (width / 2), rec.top + (height));
1850
+ case 'bottom-start':
1851
+ return new AXPoint(rec.left, rec.top + (height));
1852
+ case 'center-start':
1853
+ return new AXPoint(rec.left, rec.top + (height / 2));
1854
+ default:
1855
+ return new AXPoint(rec.left + (width / 2), rec.top + (height));
1856
+ }
1857
+ }
1858
+ static isInRecPoint(pos, rec) {
1859
+ return pos.x >= rec.left && pos.x <= (rec.left + rec.width) && pos.y >= rec.top && (pos.y <= (rec.top + rec.height));
1860
+ }
1861
+ // static isOverLap(rec1: AXClientRecCtor, rec2: AXClientRecCtor): boolean {
1862
+ // const r1: AXClientRec = new AXClientRec(rec1);
1863
+ // const r2: AXClientRec = new AXClientRec(rec2);
1864
+ // return ;
1865
+ // }
1866
+ static isInElementBound(pos, element) {
1867
+ const elBound = element.getBoundingClientRect();
1868
+ return AXHtmlUtil.isInRecPoint(pos, {
1869
+ left: elBound.left,
1870
+ width: elBound.width,
1871
+ top: elBound.top,
1872
+ height: elBound.height
1873
+ });
1874
+ }
1875
+ static getDimensions() {
1876
+ let winW = 630;
1877
+ let winH = 460;
1878
+ if (document.body && document.body.offsetWidth) {
1879
+ winW = document.body.offsetWidth;
1880
+ winH = document.body.offsetHeight;
1881
+ }
1882
+ if (document.compatMode === 'CSS1Compat' && document.documentElement && document.documentElement.offsetWidth) {
1883
+ winW = document.documentElement.offsetWidth;
1884
+ winH = document.documentElement.offsetHeight;
1885
+ }
1886
+ if (window.innerWidth && window.innerHeight) {
1887
+ winW = window.innerWidth;
1888
+ winH = window.innerHeight;
1889
+ }
1890
+ return { width: winW, height: winH };
1891
+ }
1892
+ static getOffsetRight(elem) {
1893
+ let element = elem;
1894
+ const width = element.offsetWidth;
1895
+ let right = 0;
1896
+ while (element.offsetParent) {
1897
+ right += element.offsetLeft;
1898
+ element = element.offsetParent;
1899
+ }
1900
+ right += element.offsetLeft;
1901
+ right = AXHtmlUtil.getDimensions().width - right;
1902
+ right -= width;
1903
+ return right;
1904
+ }
1905
+ static getUID() {
1906
+ return 'el-' + AXMathUtil.randomRange(1000000000, 9999999999).toString();
1907
+ }
1908
+ static getRelatedPosition(source, placement, target, alignment) {
1909
+ const result = { x: 0, y: 0 };
1910
+ const sourcePos = AXHtmlUtil.getBoundingRectPoint(source, placement);
1911
+ let top = 0;
1912
+ let left = 0;
1913
+ switch (alignment) {
1914
+ case 'top-start':
1915
+ top = sourcePos.y;
1916
+ left = sourcePos.x;
1917
+ break;
1918
+ case 'top-middle':
1919
+ top = sourcePos.y;
1920
+ left = sourcePos.x - target.offsetWidth / 2;
1921
+ break;
1922
+ case 'top-end':
1923
+ top = sourcePos.y;
1924
+ left = sourcePos.x - target.offsetWidth;
1925
+ break;
1926
+ case 'center-end':
1927
+ top = sourcePos.y - target.offsetHeight / 2;
1928
+ left = sourcePos.x - target.offsetWidth;
1929
+ break;
1930
+ case 'bottom-end':
1931
+ top = sourcePos.y - target.offsetHeight;
1932
+ left = sourcePos.x - target.offsetWidth;
1933
+ break;
1934
+ case 'bottom-middle':
1935
+ top = sourcePos.y - target.offsetHeight;
1936
+ left = sourcePos.x - target.offsetWidth / 2;
1937
+ break;
1938
+ case 'bottom-start':
1939
+ top = sourcePos.y - target.offsetHeight;
1940
+ left = sourcePos.x;
1941
+ break;
1942
+ case 'center-start':
1943
+ top = sourcePos.y - target.offsetHeight / 2;
1944
+ left = sourcePos.x;
1945
+ break;
1946
+ }
1947
+ result.y = top;
1948
+ result.x = left;
1949
+ return result;
1950
+ }
1951
+ static collision(a, b) {
1952
+ const ac = a.getBoundingClientRect();
1953
+ const bc = b.getBoundingClientRect();
1954
+ if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left &&
1955
+ ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
1956
+ return true;
1957
+ }
1958
+ else {
1959
+ return false;
1960
+ }
1961
+ }
1962
+ }
1963
+
1964
+ class AXHtmlModule {
1965
+ }
1966
+ AXHtmlModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1967
+ AXHtmlModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlModule, declarations: [AXHtmlToTextPipe], imports: [CommonModule], exports: [AXHtmlToTextPipe] });
1968
+ AXHtmlModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlModule, providers: [], imports: [[CommonModule]] });
1969
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHtmlModule, decorators: [{
1970
+ type: NgModule,
1971
+ args: [{
1972
+ declarations: [AXHtmlToTextPipe],
1973
+ imports: [CommonModule],
1974
+ exports: [AXHtmlToTextPipe],
1975
+ providers: []
1976
+ }]
1977
+ }] });
1978
+
1979
+ class AXOnDemandPreloadService {
1980
+ constructor() {
1981
+ this.subject = new Subject();
1982
+ this.tmp = AXHtmlUtil.getUID();
1983
+ }
1984
+ startPreload(routePath) {
1985
+ const slices = [];
1986
+ this.subject.next(routePath);
1987
+ }
1988
+ }
1989
+ AXOnDemandPreloadService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXOnDemandPreloadService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1990
+ AXOnDemandPreloadService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXOnDemandPreloadService });
1991
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXOnDemandPreloadService, decorators: [{
1992
+ type: Injectable
1993
+ }], ctorParameters: function () { return []; } });
1994
+
1995
+ class AXRenderService {
1996
+ constructor(appRef, router, componentFactoryResolver, compiler, modulePreloadService, injector) {
1997
+ this.appRef = appRef;
1998
+ this.router = router;
1999
+ this.componentFactoryResolver = componentFactoryResolver;
2000
+ this.compiler = compiler;
2001
+ this.modulePreloadService = modulePreloadService;
2002
+ this.injector = injector;
2003
+ }
2004
+ appendComponent(componentClass, options = {}, location) {
2005
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentClass);
2006
+ const componentRef = componentFactory.create(this.injector);
2007
+ this.appRef.attachView(componentRef.hostView);
2008
+ Object.assign(componentRef.instance, options);
2009
+ //
2010
+ const domElem = componentRef.hostView.rootNodes[0];
2011
+ componentRef.onDestroy(() => {
2012
+ this.appRef.detachView(componentRef.hostView);
2013
+ });
2014
+ if (location) {
2015
+ location.appendChild(domElem);
2016
+ }
2017
+ else {
2018
+ document.body.appendChild(domElem);
2019
+ }
2020
+ setTimeout(() => {
2021
+ componentRef.changeDetectorRef.detectChanges();
2022
+ }, 0);
2023
+ return componentRef;
2024
+ }
2025
+ findLoadedComponentByRoute(path, timeoutTime = 10) {
2026
+ const delay = 200;
2027
+ const loop = timeoutTime * 1000 / delay;
2028
+ return new Promise((resolve, reject) => {
2029
+ let found = null;
2030
+ let preload = false;
2031
+ const theLoop = (i) => {
2032
+ setTimeout(() => __awaiter(this, void 0, void 0, function* () {
2033
+ found = yield this._findLoadedComponentByRoute(path);
2034
+ if (--i && found == null) {
2035
+ if (!preload) {
2036
+ this.modulePreloadService.startPreload(path);
2037
+ preload = true;
2038
+ }
2039
+ theLoop(i);
2040
+ }
2041
+ else if (found) {
2042
+ resolve(found);
2043
+ }
2044
+ else {
2045
+ reject();
2046
+ }
2047
+ }), delay);
2048
+ };
2049
+ theLoop(loop);
2050
+ });
2051
+ }
2052
+ _findLoadedComponentByRoute(search) {
2053
+ return __awaiter(this, void 0, void 0, function* () {
2054
+ let found = null;
2055
+ const f = (children, parentPath) => {
2056
+ for (const p in children) {
2057
+ if (children.hasOwnProperty(p)) {
2058
+ const route = children[p];
2059
+ const pp = (route.path != '' && route.path != null) ? parentPath + '/' + route.path : parentPath;
2060
+ if (pp == search && !route._loadedConfig && route.component) {
2061
+ found = route;
2062
+ return;
2063
+ }
2064
+ else if (route._loadedConfig || route.children) {
2065
+ f(route.children || route._loadedConfig.routes, pp);
2066
+ }
2067
+ }
2068
+ }
2069
+ };
2070
+ for (const p in this.router.config) {
2071
+ if (this.router.config.hasOwnProperty(p)) {
2072
+ const route = this.router.config[p];
2073
+ if (route.path === search && route.component) {
2074
+ found = route;
2075
+ }
2076
+ else if (route['_loadedConfig'] || route.children) {
2077
+ f(route.children || route['_loadedConfig'].routes, route.path);
2078
+ }
2079
+ if (found)
2080
+ break;
2081
+ }
2082
+ }
2083
+ return found;
2084
+ });
2085
+ }
2086
+ }
2087
+ AXRenderService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderService, deps: [{ token: i0.ApplicationRef }, { token: i1$1.Router }, { token: i0.ComponentFactoryResolver }, { token: i0.Compiler }, { token: AXOnDemandPreloadService }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable });
2088
+ AXRenderService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderService, providedIn: 'root' });
2089
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderService, decorators: [{
2090
+ type: Injectable,
2091
+ args: [{ providedIn: 'root' }]
2092
+ }], ctorParameters: function () { return [{ type: i0.ApplicationRef }, { type: i1$1.Router }, { type: i0.ComponentFactoryResolver }, { type: i0.Compiler }, { type: AXOnDemandPreloadService }, { type: i0.Injector }]; } });
2093
+
2094
+ // @dynamic
2095
+ function getOnDemandPreloadServiceFactory() {
2096
+ return new AXOnDemandPreloadService();
2097
+ }
2098
+ class AXRenderingModule {
2099
+ }
2100
+ AXRenderingModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderingModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2101
+ AXRenderingModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderingModule });
2102
+ AXRenderingModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderingModule, providers: [
2103
+ {
2104
+ provide: AXOnDemandPreloadService,
2105
+ useFactory: getOnDemandPreloadServiceFactory
2106
+ },
2107
+ AXRenderService
2108
+ ], imports: [[]] });
2109
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXRenderingModule, decorators: [{
2110
+ type: NgModule,
2111
+ args: [{
2112
+ imports: [],
2113
+ exports: [],
2114
+ declarations: [],
2115
+ providers: [
2116
+ {
2117
+ provide: AXOnDemandPreloadService,
2118
+ useFactory: getOnDemandPreloadServiceFactory
2119
+ },
2120
+ AXRenderService
2121
+ ],
2122
+ }]
2123
+ }] });
2124
+
2125
+ class AXHorizontalScrollDirective {
2126
+ constructor(el) {
2127
+ this.el = el;
2128
+ this.scrollValue = 40;
2129
+ }
2130
+ onMouseWheel(e) {
2131
+ const delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail));
2132
+ this.el.nativeElement.scrollLeft -= delta * this.scrollValue;
2133
+ }
2134
+ }
2135
+ AXHorizontalScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHorizontalScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2136
+ AXHorizontalScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: AXHorizontalScrollDirective, selector: "[horizontalScroll]", inputs: { scrollValue: ["horizontalScroll", "scrollValue"] }, host: { listeners: { "wheel": "onMouseWheel($event)" } }, ngImport: i0 });
2137
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXHorizontalScrollDirective, decorators: [{
2138
+ type: Directive,
2139
+ args: [{
2140
+ // tslint:disable-next-line: directive-selector
2141
+ selector: '[horizontalScroll]'
2142
+ }]
2143
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scrollValue: [{
2144
+ type: Input,
2145
+ args: ['horizontalScroll']
2146
+ }], onMouseWheel: [{
2147
+ type: HostListener,
2148
+ args: ['wheel', ['$event']]
2149
+ }] } });
2150
+ class AXVerticalScrollDirective {
2151
+ constructor(el) {
2152
+ this.el = el;
2153
+ this.scrollValue = 40;
2154
+ }
2155
+ onMouseWheel(e) {
2156
+ const delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail));
2157
+ this.el.nativeElement.scrollTop -= delta * this.scrollValue;
2158
+ }
2159
+ }
2160
+ AXVerticalScrollDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXVerticalScrollDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
2161
+ AXVerticalScrollDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "13.3.11", type: AXVerticalScrollDirective, selector: "[verticalScroll]", inputs: { scrollValue: ["verticalScroll", "scrollValue"] }, host: { listeners: { "wheel": "onMouseWheel($event)" } }, ngImport: i0 });
2162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXVerticalScrollDirective, decorators: [{
2163
+ type: Directive,
2164
+ args: [{
2165
+ // tslint:disable-next-line: directive-selector
2166
+ selector: '[verticalScroll]'
2167
+ }]
2168
+ }], ctorParameters: function () { return [{ type: i0.ElementRef }]; }, propDecorators: { scrollValue: [{
2169
+ type: Input,
2170
+ args: ['verticalScroll']
2171
+ }], onMouseWheel: [{
2172
+ type: HostListener,
2173
+ args: ['wheel', ['$event']]
2174
+ }] } });
2175
+
2176
+ class AXScrollModule {
2177
+ }
2178
+ AXScrollModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXScrollModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2179
+ AXScrollModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXScrollModule, declarations: [AXHorizontalScrollDirective, AXVerticalScrollDirective], imports: [CommonModule], exports: [AXHorizontalScrollDirective, AXVerticalScrollDirective] });
2180
+ AXScrollModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXScrollModule, providers: [], imports: [[CommonModule]] });
2181
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXScrollModule, decorators: [{
2182
+ type: NgModule,
2183
+ args: [{
2184
+ declarations: [AXHorizontalScrollDirective, AXVerticalScrollDirective],
2185
+ imports: [CommonModule],
2186
+ exports: [AXHorizontalScrollDirective, AXVerticalScrollDirective],
2187
+ providers: []
2188
+ }]
2189
+ }] });
2190
+
2191
+ // export class AXSeparatorPipe2 implements PipeTransform {
2192
+ // transform(value: any) {
2193
+ // if (value) {
2194
+ // return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
2195
+ // } else {
2196
+ // return '0';
2197
+ // }
2198
+ // }
2199
+ // }
2200
+ class AXSeparatorPipe {
2201
+ transform(value, currency = '', decimal = 0, locale = AXConfig.get('layout.rtl') ? 'fa' : 'en') {
2202
+ return (new Intl.NumberFormat(locale, {
2203
+ minimumFractionDigits: 0,
2204
+ maximumFractionDigits: decimal
2205
+ }).format(Number(value)) + (currency != '' ? ' ' + currency : ''));
2206
+ }
2207
+ }
2208
+ AXSeparatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
2209
+ AXSeparatorPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorPipe, name: "separator" });
2210
+ AXSeparatorPipe.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorPipe, providedIn: 'root' });
2211
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorPipe, decorators: [{
2212
+ type: Pipe,
2213
+ args: [{ name: 'separator' }]
2214
+ }, {
2215
+ type: Injectable,
2216
+ args: [{
2217
+ providedIn: 'root'
2218
+ }]
2219
+ }] });
2220
+
2221
+ class AXSeparatorModule {
2222
+ }
2223
+ AXSeparatorModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2224
+ AXSeparatorModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorModule, declarations: [AXSeparatorPipe], imports: [CommonModule], exports: [AXSeparatorPipe] });
2225
+ AXSeparatorModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorModule, providers: [], imports: [[CommonModule]] });
2226
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXSeparatorModule, decorators: [{
2227
+ type: NgModule,
2228
+ args: [{
2229
+ declarations: [AXSeparatorPipe],
2230
+ imports: [CommonModule],
2231
+ exports: [AXSeparatorPipe],
2232
+ providers: []
2233
+ }]
2234
+ }] });
2235
+
2236
+ const PIPES = [AXDateTimePipe];
2237
+ const MODULES = [AXScrollModule, AXTranslatorModule];
2238
+ const SERVICES = [AXEventService,
2239
+ AXStorageService
2240
+ ];
2241
+ class AXCoreModule {
2242
+ }
2243
+ AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
2244
+ AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXCoreModule, declarations: [AXDateTimePipe], imports: [AXScrollModule, AXTranslatorModule], exports: [AXDateTimePipe] });
2245
+ AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXCoreModule, providers: [...SERVICES], imports: [[...MODULES]] });
2246
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.11", ngImport: i0, type: AXCoreModule, decorators: [{
2247
+ type: NgModule,
2248
+ args: [{
2249
+ declarations: [...PIPES],
2250
+ imports: [...MODULES],
2251
+ exports: [...PIPES],
2252
+ providers: [...SERVICES]
2253
+ }]
2254
+ }] });
1326
2255
 
1327
2256
  /**
1328
2257
  * Generated bundle index. Do not edit.
1329
2258
  */
1330
2259
 
1331
- export { AXCalendarMonth, AXConfig, AXCoreModule, AXDateTime, AXDateTimeModule, AXDateTimePipe, AXDateTimeRange, AXDrawingUtil, AXEventService, AXHotkeysService, AXObjectUtil, AXPlatform, AXPlatformEvent, AXSafePipe, AXStringUtil, AXTranslationModule, AXTranslator, AXTranslatorPipe, GeorgianCalendar, JalaliCalendar, testUserAgent };
2260
+ export { AXArrayUtil, AXBaseMenuItem, AXBasePageComponent, AXButtonItem, AXCalendarMonth, AXCheckItem, AXClientRec, AXColorUtil, AXConfig, AXCoreModule, AXDateTime, AXDateTimePipe, AXDateTimeRange, AXErrorModule, AXErrorService, AXEventService, AXFetchProp, AXHorizontalScrollDirective, AXHtmlModule, AXHtmlToTextPipe, AXHtmlUtil, AXHttpModule, AXHttpService, AXMathUtil, AXMenuItem, AXNavigator, AXObjectUtil, AXOnDemandPreloadService, AXPlatform, AXPlatformEvent, AXPoint, AXPromise, AXRenderService, AXRenderingModule, AXScrollModule, AXSelectItem, AXSeparatorModule, AXSeparatorPipe, AXStorageService, AXTranslator, AXTranslatorModule, AXTranslatorPipe, AXTranslatorService, AXVerticalScrollDirective, AX_ERROR_DISPLAY_INTERCEPTOR, AX_HTTP_EVENT_INTERCEPTOR, HttpResult, getOnDemandPreloadServiceFactory, getPropByPath, setPropByPath, testUserAgent };
1332
2261
  //# sourceMappingURL=acorex-core.mjs.map