@acorex/core 5.1.1 → 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 +10 -6
  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 +1939 -1006
  49. package/fesm2015/acorex-core.mjs.map +1 -1
  50. package/fesm2020/acorex-core.mjs +1939 -1007
  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,11 +1,63 @@
1
+ import moment from 'jalali-moment';
2
+ import { Subject, fromEvent } from 'rxjs';
1
3
  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';
5
- import { Subject } from 'rxjs';
6
- import { DOCUMENT } from '@angular/common';
7
- import { Observable } from 'rxjs/internal/Observable';
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';
8
+ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
8
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
+ }
9
61
 
10
62
  // @dynamic
11
63
  class AXObjectUtil {
@@ -44,95 +96,51 @@ class AXObjectUtil {
44
96
  }
45
97
  throw new Error('Unable to copy obj! Its type isn\'t supported.');
46
98
  }
47
- }
48
-
49
- // @dynamic
50
- class AXDrawingUtil {
51
- static collision(a, b) {
52
- const ac = a.getBoundingClientRect();
53
- const bc = b.getBoundingClientRect();
54
- if (ac.left < bc.left + bc.width && ac.left + ac.width > bc.left &&
55
- ac.top < bc.top + bc.height && ac.top + ac.height > bc.top) {
56
- return true;
57
- }
58
- else {
59
- return false;
60
- }
61
- }
62
- static isInElementBound(pos, element) {
63
- const elBound = element.getBoundingClientRect();
64
- return AXDrawingUtil.isInRecPoint(pos, {
65
- left: elBound.x,
66
- width: elBound.width,
67
- top: elBound.y,
68
- height: elBound.height
69
- });
70
- }
71
- static isInRecPoint(pos, rec) {
72
- 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;
73
103
  }
74
- }
75
-
76
- // @dynamic
77
- class AXStringUtil {
78
- static getWordBoundsAtPosition(str, position) {
79
- const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);
80
- let start = position - 1;
81
- while (start >= 0 && !isSpace(str[start])) {
82
- start -= 1;
83
- }
84
- start = Math.max(0, start + 1);
85
- const leftSideString = str.slice(start).match(/[a-zA-Z0-9]+/i);
86
- start += leftSideString.index;
87
- let end = start + leftSideString[0].length;
88
- return {
89
- start,
90
- end
91
- };
104
+ const index = prop.indexOf('.');
105
+ if (index > -1) {
106
+ return AXFetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));
92
107
  }
93
- }
94
-
95
- class AXSafePipe {
96
- constructor(sanitizer) {
97
- this.sanitizer = sanitizer;
98
- }
99
- transform(value, type) {
100
- if (value == null || value == undefined || value == '')
101
- return null;
102
- switch (type) {
103
- case 'html': return this.sanitizer.bypassSecurityTrustHtml(value);
104
- case 'style': return this.sanitizer.bypassSecurityTrustStyle(value);
105
- case 'script': return this.sanitizer.bypassSecurityTrustScript(value);
106
- case 'url': return this.sanitizer.bypassSecurityTrustUrl(value);
107
- case 'resourceUrl': return this.sanitizer.bypassSecurityTrustResourceUrl(value);
108
- 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];
109
118
  }
119
+ });
120
+ if (obj === undefined) {
121
+ return defaultVal;
110
122
  }
123
+ return obj;
111
124
  }
112
- AXSafePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, deps: [{ token: i1.DomSanitizer }], target: i0.ɵɵFactoryTarget.Pipe });
113
- AXSafePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, name: "safe" });
114
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXSafePipe, decorators: [{
115
- type: Pipe,
116
- args: [{
117
- name: 'safe',
118
- pure: true
119
- }]
120
- }], ctorParameters: function () { return [{ type: i1.DomSanitizer }]; } });
121
-
122
- class AXCoreModule {
123
- }
124
- AXCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
125
- AXCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, declarations: [AXSafePipe], exports: [AXSafePipe] });
126
- AXCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, providers: [], imports: [[]] });
127
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXCoreModule, decorators: [{
128
- type: NgModule,
129
- args: [{
130
- imports: [],
131
- exports: [AXSafePipe],
132
- declarations: [AXSafePipe],
133
- providers: [],
134
- }]
135
- }] });
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
+ }
136
144
 
137
145
  // @dynamic
138
146
  class AXConfig {
@@ -141,12 +149,12 @@ class AXConfig {
141
149
  }
142
150
  static set(arg1, arg2) {
143
151
  if (arg1 && typeof arg1 == 'string') {
144
- _.set(AXConfig.dataModel, arg1, arg2);
152
+ setPropByPath(AXConfig.dataModel, arg1, arg2);
145
153
  AXConfig.dataChangeSubject.next(AXConfig.dataModel);
146
154
  return;
147
155
  }
148
156
  if (arg1 && typeof arg1 == 'object') {
149
- _.merge(AXConfig.dataModel, arg1);
157
+ Object.assign(AXConfig.dataModel, arg1);
150
158
  AXConfig.dataChangeSubject.next(AXConfig.dataModel);
151
159
  return;
152
160
  }
@@ -154,213 +162,285 @@ class AXConfig {
154
162
  return AXConfig.dataChangeSubject.asObservable();
155
163
  }
156
164
  }
157
- static get(path, defaultValue) {
158
- return _.get(AXConfig.dataModel, path, defaultValue);
165
+ static get(path) {
166
+ return getPropByPath(AXConfig.dataModel, path);
159
167
  }
160
168
  }
161
169
  AXConfig.dataModel = {};
162
170
  AXConfig.dataChangeSubject = new Subject();
163
171
 
164
- // @dynamic
165
172
  class AXDateTime {
166
- constructor(value = new Date(), calendar = AXConfig.get(`dateTime.calendar`)) {
167
- this._formatKeys = {
168
- ss: () => this.pad(this.date.getSeconds(), 2),
169
- s: () => this.date.getSeconds().toString(),
170
- //
171
- dd: () => this.pad(this.calendar.dayOfMonth(this.date), 2),
172
- d: () => this.calendar.dayOfMonth(this.date).toString(),
173
- //
174
- mm: () => this.pad(this.date.getMinutes(), 2),
175
- m: () => this.date.getMinutes().toString(),
176
- //
177
- MMMM: () => this.calendar.monthNames[this.calendar.monthOfYear(this.date) - 1],
178
- MMM: () => this.calendar.monthShortNames[this.calendar.monthOfYear(this.date) - 1],
179
- MM: () => this.pad(this.calendar.monthOfYear(this.date), 2),
180
- //
181
- DDDD: () => this.calendar.dayNames[this.calendar.dayOfWeek(this.date) - 1],
182
- DDD: () => this.calendar.dayShortNames[this.calendar.dayOfWeek(this.date) - 1],
183
- //
184
- yyyy: () => this.calendar.year(this.date).toString(),
185
- YYYY: () => this.calendar.year(this.date).toString(),
186
- yy: () => this.calendar.year(this.date).toString().substring(2),
187
- YY: () => this.calendar.year(this.date).toString().substring(2),
188
- //
189
- HH: () => this.pad(this.date.getHours(), 2),
190
- H: () => this.date.getHours().toString(),
191
- //
192
- hh: () => this.pad((this.date.getHours() % 12 || 12), 2),
193
- h: () => (this.date.getHours() % 12 || 12).toString(),
194
- //
195
- A: () => (this.date.getHours() < 12) ? 'am' : 'pm',
196
- a: () => (this.date.getHours() < 12) ? 'am' : 'pm',
197
- };
198
- 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;
199
182
  if (value instanceof Date) {
200
183
  this._date = value;
201
184
  }
202
185
  else {
203
- //TODO: parse jalali
204
186
  this._date = new Date(value);
205
187
  }
188
+ this._moment = moment(this.date);
189
+ if (this.type === 'jalali') {
190
+ this._moment.locale('fa');
191
+ }
206
192
  }
207
- static convert(value, calendar = AXConfig.get('dateTime.calendar')) {
193
+ static convert(value, type = AXConfig.get('dateTime.type') || 'gregorian') {
208
194
  let date;
209
195
  if (typeof value === 'string' || value instanceof String) {
210
- date = new AXDateTime(value, calendar);
196
+ date = new AXDateTime(value, type);
211
197
  }
212
198
  else if (value instanceof Date) {
213
- date = new AXDateTime(value, calendar);
199
+ date = new AXDateTime(value, type);
214
200
  }
215
201
  else if (value instanceof AXDateTime) {
216
- date = new AXDateTime(value.date, calendar);
202
+ date = value;
217
203
  }
218
204
  return date;
219
205
  }
220
- static from(value = {
221
- calendar: AXConfig.get('dateTime.calendar'),
222
- year: 1,
223
- month: 1,
224
- date: 1,
225
- hours: 0,
226
- minutes: 0,
227
- seconds: 0,
228
- ms: 0
229
- }) {
230
- // let date: AXDateTime = new AXDateTime(new Date(), value.calendar);
231
- // date.set('year', value.year);
232
- // date.set('month', value.month);
233
- // date.set('day', value.date);
234
- // date.set('hour', value.hours);
235
- // date.set('minute', value.minutes);
236
- // date.set('second', value.seconds);
237
- // date.set('ms', value.ms);
238
- return AXDateTime.resolveCalendar(value.calendar).create(value);
239
- }
240
- static resolveCalendar(calendar) {
241
- return typeof calendar == 'string'
242
- ? AXConfig.get(`dateTime.calendars.${calendar}`)
243
- : calendar;
244
- }
245
206
  get date() {
246
207
  return this._date;
247
208
  }
248
- get calendar() {
249
- return this._calendar;
209
+ resolveUnit(unit) {
210
+ return this.type === 'jalali' ? 'j' + unit : unit;
250
211
  }
251
212
  clone() {
252
- return new AXDateTime(this.date, this.calendar);
213
+ return new AXDateTime(this.date, this.type);
253
214
  }
254
- get dayOfMonth() {
255
- return this._calendar.dayOfMonth(this.date);
215
+ get dayInMonth() {
216
+ return this._moment.date();
256
217
  }
257
218
  get dayOfYear() {
258
- return this._calendar.dayOfYear(this.date);
219
+ return this._moment.dayOfYear();
259
220
  }
260
- get dayOfWeek() {
261
- return this._calendar.dayOfWeek(this.date);
221
+ get dayInWeek() {
222
+ return this._moment.day();
262
223
  }
263
224
  get hour() {
264
- return this._date.getHours();
225
+ return this._moment.hour();
265
226
  }
266
227
  get minute() {
267
- return this._date.getMinutes();
228
+ return this._moment.minute();
268
229
  }
269
230
  get second() {
270
- return this._date.getSeconds();
231
+ return this._moment.second();
271
232
  }
272
233
  get year() {
273
- return this._calendar.year(this.date);
234
+ return this._moment.year();
274
235
  }
275
236
  get monthOfYear() {
276
- return this._calendar.monthOfYear(this.date);
277
- }
278
- get weekOfYear() {
279
- return this._calendar.weekOfYear(this.date);
237
+ return this._moment.month();
280
238
  }
281
239
  get month() {
282
240
  return new AXCalendarMonth(this);
283
241
  }
284
- add(unit, amount) {
285
- 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);
286
273
  }
287
274
  set(unit = 'day', value) {
288
- return this._calendar.set(this.date, unit, value);
275
+ return new AXDateTime(this._moment.set(unit, value).toDate(), this.type);
289
276
  }
290
- duration(end, unit = 'day') {
291
- const range = new AXDateTimeRange(this, AXDateTime.convert(end, this.calendar.name()));
292
- 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));
293
280
  }
294
281
  startOf(unit = 'day') {
295
- return this._calendar.startOf(this.date, unit);
282
+ return new AXDateTime(moment(this.date).startOf(this.resolveUnit(unit)).toDate(), this.type);
296
283
  }
297
284
  endOf(unit = 'day') {
298
- return this._calendar.endOf(this.date, unit);
285
+ return new AXDateTime(moment(this.date).endOf(this.resolveUnit(unit)).toDate(), this.type);
299
286
  }
300
- format(format = AXConfig.get('dateTime.shortDateFormat')) {
301
- const re = new RegExp(_.orderBy(Object.keys(this._formatKeys), c => c.length, ['desc']).join("|"), "gi");
302
- return format.replace(re, (matched) => {
303
- return this._formatKeys[matched]();
304
- });
305
- }
306
- pad(n, width, z = '0') {
307
- n = n + '';
308
- 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);
309
292
  }
310
- toString(format = AXConfig.get('dateTime.shortDateFormat')) {
311
- return this.format(format);
293
+ toString() {
294
+ return this.format();
312
295
  }
313
296
  equal(value, unit = 'day') {
314
- return this.compare(value, unit) == 0;
315
- }
316
- compare(value, unit = 'day') {
317
- const val = AXDateTime.convert(value, this.calendar.name());
318
- const func = (v1, v2) => {
319
- if (v1 == v2) {
320
- return 0;
321
- }
322
- else if (v1 > v2) {
323
- return 1;
324
- }
325
- else {
326
- return -1;
327
- }
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'
328
311
  };
329
- 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
+ }
330
367
  switch (unit) {
331
- case 'year':
332
- return func(this.year, val.year);
333
- case 'week':
334
- p = this.compare(val, 'year');
335
- return p == 0 ? func(this.weekOfYear, val.weekOfYear) : p;
336
- case 'month':
337
- p = this.compare(val, 'year');
338
- return p == 0 ? func(this.monthOfYear, val.monthOfYear) : p;
339
- case 'day':
340
- p = this.compare(val, 'year');
341
- return p == 0 ? func(this.dayOfYear, val.dayOfYear) : p;
342
- case 'hour':
343
- p = this.compare(val, 'day');
344
- return p == 0 ? func(this.hour, val.hour) : p;
345
- case 'minute':
346
- p = this.compare(val, 'hour');
347
- return p == 0 ? func(this.minute, val.minute) : p;
348
- case 'second':
349
- p = this.compare(val, 'minute');
350
- return p == 0 ? func(this.second, val.second) : p;
351
- default:
352
- 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;
353
432
  }
354
433
  }
355
- convert(calendar) {
356
- return AXDateTime.convert(this, calendar);
434
+ toISOString() {
435
+ return this._date.toISOString();
357
436
  }
358
437
  }
359
438
  class AXCalendarMonth {
360
439
  constructor(date) {
440
+ this._moment = moment(date.date);
361
441
  this.index = date.date.getMonth();
362
- this.name = date.format('MMMM');
363
- 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));
364
444
  }
365
445
  get range() {
366
446
  return this._range;
@@ -371,816 +451,337 @@ class AXCalendarMonth {
371
451
  }
372
452
  class AXDateTimeRange {
373
453
  constructor(startTime, endTime) {
374
- this._startTime = startTime;
375
- this._endTime = endTime;
376
- }
377
- get startTime() {
378
- return this._startTime;
379
- }
380
- get endTime() {
381
- return this._endTime;
382
- }
383
- duration() {
384
- const result = {
385
- miliseconds: 0,
386
- seconds: 0,
387
- minutes: 0,
388
- hours: 0,
389
- days: 0,
390
- months: 0,
391
- years: 0,
392
- total: {
393
- miliseconds: 0,
394
- seconds: 0,
395
- minutes: 0,
396
- hours: 0,
397
- days: 0,
398
- weeks: 0,
399
- months: 0,
400
- years: 0,
401
- },
402
- };
403
- const one_second = 1000;
404
- const one_min = one_second * 60;
405
- const one_hour = one_min * 60;
406
- const one_day = one_hour * 24;
407
- const one_week = one_day * 7;
408
- const one_year = 365.25 * one_day;
409
- const one_month = one_year / 12;
410
- const startTime = this._startTime.date.getTime();
411
- const endTime = this._endTime.date.getTime();
412
- const diff = Math.abs(endTime - startTime);
413
- //
414
- result.total.miliseconds = diff;
415
- result.total.seconds = Number((diff / one_second).toFixed(2));
416
- result.total.minutes = Number((diff / one_min).toFixed(2));
417
- result.total.hours = Number((diff / one_hour).toFixed(2));
418
- result.total.days = Number((diff / one_day).toFixed(2));
419
- result.total.weeks = Number((diff / one_week).toFixed(2));
420
- //
421
- // let months = (this.endTime.year - this.startTime.year) * 12;
422
- // months += this.endTime.monthOfYear - this.startTime.monthOfYear + 1;
423
- // if (this.endTime.dayOfYear < this.startTime.dayOfYear) {
424
- // months--;
425
- // }
426
- // result.total.months = Math.abs(months);
427
- // TODO: review
428
- result.total.months = Number((diff / one_month).toFixed(2));
429
- result.total.years = Number((diff / one_year).toFixed(2));
430
- //
431
- result.miliseconds = result.total.miliseconds % 1000;
432
- result.seconds = Number((result.total.seconds % 60).toFixed(0));
433
- result.minutes = Number((result.total.minutes % 60).toFixed(0));
434
- result.hours = Number((result.total.hours % 24).toFixed(0));
435
- // TODO: review
436
- result.days = Number((result.total.days % 30.4).toFixed(0));
437
- result.months = Number((result.total.months % 12).toFixed(0));
438
- result.years = Number(result.total.years.toFixed(0));
439
- return result;
454
+ this.startTime = startTime;
455
+ this.endTime = endTime;
440
456
  }
441
- enumurate(unit = 'day', amount = 1) {
442
- // TODO: setptemper savingtime issue
443
- const result = [];
444
- let item = this._startTime.clone();
445
- while (item.compare(this._endTime, unit) < 1) {
446
- result.push(item);
447
- item = item.add(unit, amount);
448
- }
449
- return result;
450
- }
451
- includes(value, unit = 'day') {
452
- // TODO: ??
453
- return true;
454
- }
455
- }
456
-
457
- class AXDateTimePipe {
458
- constructor() { }
459
- transform(value, format, calendar) {
460
- if (value == null) {
461
- return '';
462
- }
463
- const date = value instanceof AXDateTime ? value.clone() : AXDateTime.convert(value, calendar);
464
- if (!format) {
465
- return date.format(AXConfig.get('dateTime.shortDateFormat'));
466
- }
467
- else {
468
- return date.format(format);
469
- }
457
+ duration(unit = 'days') {
458
+ const duration = moment.duration(moment(this.startTime.date).diff(moment(this.endTime.date)));
459
+ return duration.as(unit);
470
460
  }
471
- }
472
- AXDateTimePipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
473
- AXDateTimePipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, name: "axDate" });
474
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimePipe, decorators: [{
475
- type: Pipe,
476
- args: [{ name: 'axDate' }]
477
- }], ctorParameters: function () { return []; } });
478
-
479
- class GeorgianCalendar {
480
- constructor() {
481
- this.monthNames = [
482
- "January", "February", "March",
483
- "April", "May", "June", "July",
484
- "August", "September", "October",
485
- "November", "December"
486
- ];
487
- this.monthShortNames = [
488
- "Jan", "Feb", "Mar",
489
- "Apr", "May", "Jun", "Jul",
490
- "Aug", "Sep", "Oct",
491
- "Nov", "Dec"
492
- ];
493
- this.dayNames = [
494
- "Sunday", "Monday", "Tuesday", "Wednesday",
495
- "Thursday", "Friday", "Saturday"
496
- ];
497
- this.dayShortNames = [
498
- "Sun", "Mon", "Tue", "Wed",
499
- "Thu", "Fri", "Sat"
500
- ];
501
- }
502
- create(value) {
503
- 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());
504
- }
505
- name() {
506
- return 'gregorian';
507
- }
508
- dayOfMonth(date) {
509
- return date.getDate();
510
- }
511
- dayOfYear(date) {
512
- let result = 0;
513
- let m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
514
- if (this.isLeap(date)) {
515
- m[1] = 29;
516
- }
517
- for (let i = 0; i < date.getMonth(); i++) {
518
- result = result + m[i];
461
+ enumurate(unit = 'day', type = AXConfig.get('dateTime.type') || 'jalali') {
462
+ const result = [];
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));
519
465
  }
520
- result += date.getDate();
521
466
  return result;
522
467
  }
523
- dayOfWeek(date) {
524
- return date.getDay() + 1;
525
- }
526
- weekOfYear(date) {
527
- const firstDay = new AXDateTime(date).startOf('year');
528
- return Math.ceil((((date.getTime() - firstDay.date.getTime()) / 86400000) + firstDay.date.getDay() + 1) / 7);
529
- }
530
- year(date) {
531
- return date.getFullYear();
532
- }
533
- monthOfYear(date) {
534
- return date.getMonth() + 1;
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);
535
471
  }
536
- add(date, unit, amount) {
537
- let value = date.valueOf();
538
- switch (unit) {
539
- case 'second':
540
- value += 1000 * amount;
541
- break;
542
- case 'minute':
543
- value += 60000 * amount;
544
- break;
545
- case 'hour':
546
- value += 3600000 * amount;
547
- break;
472
+ getViewCompaire(view) {
473
+ switch (view) {
474
+ case 'day':
475
+ return 'YMD';
548
476
  case 'month':
549
- const v = new Date(value);
550
- var mo = date.getMonth();
551
- var yr = date.getFullYear();
552
- mo = (mo + amount) % 12;
553
- if (0 > mo) {
554
- yr += (date.getMonth() + amount - mo - 12) / 12;
555
- mo += 12;
556
- }
557
- else
558
- yr += ((date.getMonth() + amount - mo) / 12);
559
- v.setMonth(mo);
560
- v.setFullYear(yr);
561
- value = v.valueOf();
562
- break;
563
- case 'week':
564
- value += 7 * 86400000 * amount;
565
- break;
477
+ return 'YM';
566
478
  case 'year':
567
- const yv = new Date(value);
568
- yv.setFullYear(yv.getFullYear() + amount);
569
- value = yv.valueOf();
570
- break;
571
- case 'day':
572
- default:
573
- value += 86400000 * amount;
479
+ return 'Y';
574
480
  }
575
- return new AXDateTime(new Date(value), this.name());
576
481
  }
577
- set(date, unit, value) {
578
- const clone = new Date(date.valueOf());
579
- switch (unit) {
580
- case 'second':
581
- clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());
582
- break;
583
- case 'minute':
584
- clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());
585
- break;
586
- case 'hour':
587
- clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());
588
- break;
589
- default:
590
- case 'day':
591
- clone.setDate(value);
592
- break;
593
- case "week":
594
- break;
595
- case "month":
596
- clone.setMonth(Math.max(0, value - 1));
597
- break;
598
- case "year":
599
- clone.setFullYear(value);
600
- break;
601
- }
602
- return new AXDateTime(clone, this.name());
482
+ }
483
+
484
+ class AXBaseMenuItem {
485
+ constructor() {
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;
603
492
  }
604
- startOf(date, unit) {
605
- const clone = new Date(date.valueOf());
606
- switch (unit) {
607
- case 'second':
608
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
609
- return new AXDateTime(clone, this.name());
610
- case 'minute':
611
- clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
612
- return new AXDateTime(clone, this.name());
613
- case 'hour':
614
- clone.setHours(clone.getHours(), 0, 0, 0);
615
- return new AXDateTime(clone, this.name());
616
- default:
617
- case 'day':
618
- clone.setHours(0, 0, 0, 0);
619
- return new AXDateTime(clone, this.name());
620
- case "week":
621
- const index = 0;
622
- const start = index >= 0 ? index : 0;
623
- const day = clone.getDay();
624
- const diff = clone.getDate() - day + (start > day ? start - 7 : start);
625
- clone.setDate(diff);
626
- return new AXDateTime(clone, this.name()).startOf('day');
627
- case "month":
628
- clone.setDate(1);
629
- return new AXDateTime(clone, this.name()).startOf('day');
630
- case "year":
631
- clone.setMonth(0);
632
- clone.setDate(1);
633
- return new AXDateTime(clone, this.name()).startOf('day');
634
- }
493
+ }
494
+ class AXMenuItem extends AXBaseMenuItem {
495
+ constructor() {
496
+ super(...arguments);
497
+ this.divider = false;
635
498
  }
636
- endOf(date, unit) {
637
- const clone = new Date(date.valueOf());
638
- switch (unit) {
639
- case 'second':
640
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
641
- return new AXDateTime(clone, this.name());
642
- case 'minute':
643
- clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
644
- return new AXDateTime(clone, this.name());
645
- case 'hour':
646
- clone.setHours(clone.getHours(), 59, 59, 999);
647
- return new AXDateTime(clone, this.name());
648
- default:
649
- case 'day':
650
- clone.setHours(23, 59, 59, 999);
651
- return new AXDateTime(clone, this.name());
652
- case 'week':
653
- return this.startOf(date, 'week').add('day', 6).endOf('day');
654
- case 'month':
655
- return new AXDateTime(new Date(date.getFullYear(), date.getMonth() + 1, 0), this.name()).endOf('day');
656
- case "year":
657
- clone.setMonth(11);
658
- return new AXDateTime(clone, this.name()).endOf('month');
659
- }
499
+ }
500
+ class AXButtonItem extends AXBaseMenuItem {
501
+ constructor() {
502
+ super(...arguments);
503
+ this.dropdown = false;
504
+ this.submitBehavior = false;
505
+ this.cancelBehavior = false;
660
506
  }
661
- isLeap(date) {
662
- let leapYear = new Date(date.getFullYear(), 1, 29);
663
- return leapYear.getDate() == 29;
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;
664
527
  }
665
528
  }
666
529
 
667
- class JalaliCalendar {
530
+ class AXSelectItem {
531
+ }
532
+
533
+ /**
534
+ * @deprecated Use AXBasePageComponent from @acorex/components
535
+ */
536
+ // TODO: Add Angular decorator.
537
+ class AXBasePageComponent {
668
538
  constructor() {
669
- this.monthNames = ("فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند").split("_");
670
- this.monthShortNames = ("فروردین_اردیبهشت_خرداد_تیر_مرداد_شهریور_مهر_آبان_آذر_دی_بهمن_اسفند").split("_");
671
- this.dayNames = ("شنبه_یکشنبه_دوشنبه_سه شنبه_چهارشنبه_پنج شنبه_جمعه").split("_");
672
- this.dayShortNames = "ش_ی_د_س_چ_پ_ج".split("_");
539
+ this.onClosed = new EventEmitter();
673
540
  }
674
- create(value) {
675
- const a = this.toGregorian(value.year, value.month, value.date);
676
- 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());
541
+ close(data) {
542
+ this.onClosed.emit({
543
+ component: this,
544
+ data: data
545
+ });
677
546
  }
678
- name() {
679
- return 'jalali';
547
+ onClosing(e) {
680
548
  }
681
- dayOfMonth(date) {
682
- return this.toJalali(date).day;
549
+ ngOnDestroy() {
550
+ this.onClosed.unsubscribe();
683
551
  }
684
- dayOfYear(date) {
685
- const j = this.toJalali(date);
686
- return (j.month <= 6 ? ((j.month - 1) * 31) : ((6 * 31) + (j.month - 7) * 30)) + j.day;
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);
568
+ }
687
569
  }
688
- dayOfWeek(date) {
689
- return date.getDay() == 6 ? 1 : date.getDay() + 2;
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 }]; } });
577
+
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);
690
601
  }
691
- weekOfYear(date) {
692
- //TODO : apply jalali
693
- const firstDay = new AXDateTime(date).startOf('year');
694
- return Math.ceil((((date.getTime() - firstDay.date.getTime()) / 86400000) + firstDay.date.getDay() + 1) / 7);
602
+ result(action) {
603
+ this.resultAction = action;
604
+ return this;
695
605
  }
696
- year(date) {
697
- return this.toJalali(date).year;
606
+ error(action) {
607
+ this.errorAction = action;
608
+ return this;
698
609
  }
699
- monthOfYear(date) {
700
- return this.toJalali(date).month;
610
+ complete(action) {
611
+ this.completeAction = action;
612
+ return this;
701
613
  }
702
- add(date, unit, amount) {
703
- let value = date.valueOf();
704
- switch (unit) {
705
- case 'second':
706
- value += 1000 * amount;
707
- break;
708
- case 'minute':
709
- value += 60000 * amount;
710
- break;
711
- case 'hour':
712
- value += 3600000 * amount;
713
- break;
714
- case 'month':
715
- {
716
- const v = new Date(value);
717
- let jd = this.dayOfMonth(date);
718
- let jm = this.monthOfYear(date);
719
- let jy = this.year(date);
720
- const nm = (jm + amount);
721
- const ny = (nm % 12) ? Math.floor(nm / 12) : 0;
722
- jy += ny;
723
- jm = nm - (ny * 12);
724
- const vv = this.toGregorian(jy, jm, jd);
725
- v.setFullYear(vv.getFullYear());
726
- v.setMonth(vv.getMonth());
727
- v.setDate(vv.getDate());
728
- value = v.valueOf();
729
- break;
730
- }
731
- case 'week':
732
- value += 7 * 86400000 * amount;
733
- break;
734
- case 'year':
735
- {
736
- // const v = new Date(value);
737
- // v.setFullYear(v.getFullYear() + amount);
738
- // value = v.valueOf();
739
- // break
740
- const v = new Date(value);
741
- let jd = this.dayOfMonth(date);
742
- let jm = this.monthOfYear(date);
743
- let jy = this.year(date);
744
- const vv = this.toGregorian(jy + amount, jm, jd);
745
- v.setFullYear(vv.getFullYear());
746
- v.setMonth(vv.getMonth());
747
- v.setDate(vv.getDate());
748
- value = v.valueOf();
749
- break;
750
- }
751
- case 'day':
752
- default:
753
- value += 86400000 * amount;
754
- }
755
- return new AXDateTime(new Date(value), this.name());
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
+ });
756
657
  }
757
- set(date, unit, value) {
758
- const clone = new Date(date.valueOf());
759
- const jDate = this.toJalali(clone);
760
- switch (unit) {
761
- case 'second':
762
- clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());
763
- break;
764
- case 'minute':
765
- clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());
766
- break;
767
- case 'hour':
768
- clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());
769
- break;
770
- default:
771
- case 'day':
772
- const gDate = this.toGregorian(jDate.year, jDate.month, value);
773
- clone.setDate(gDate.getDate());
774
- break;
775
- case "week":
776
- break;
777
- case "month":
778
- const gDate2 = this.toGregorian(jDate.year, value, jDate.day);
779
- clone.setMonth(gDate2.getMonth());
780
- break;
781
- case "year":
782
- const gDate3 = this.toGregorian(value, jDate.month, jDate.day);
783
- clone.setFullYear(gDate3.getFullYear());
784
- break;
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
+ });
785
665
  }
786
- return new AXDateTime(clone, this.name());
787
- }
788
- startOf(date, unit) {
789
- const clone = new Date(date.valueOf());
790
- switch (unit) {
791
- case 'second':
792
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
793
- return new AXDateTime(clone, this.name());
794
- case 'minute':
795
- clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
796
- return new AXDateTime(clone, this.name());
797
- case 'hour':
798
- clone.setHours(clone.getHours(), 0, 0, 0);
799
- return new AXDateTime(clone, this.name());
800
- default:
801
- case 'day':
802
- clone.setHours(0, 0, 0, 0);
803
- return new AXDateTime(clone, this.name());
804
- case "week":
805
- return new AXDateTime(clone, this.name()).add('day', -this.dayOfWeek(clone) + 1).startOf('day');
806
- case "month":
807
- {
808
- const jy = this.year(date);
809
- const jm = this.monthOfYear(date);
810
- const gDate = this.toGregorian(jy, jm, 1);
811
- return new AXDateTime(gDate, this.name()).startOf('day');
812
- }
813
- case "year":
814
- {
815
- const jy = this.year(date);
816
- const gDate = this.toGregorian(jy, 1, 1);
817
- return new AXDateTime(gDate, this.name()).startOf('day');
818
- }
666
+ else {
667
+ //
668
+ if (result)
669
+ result(data);
670
+ this.handleComplete(complete, config);
819
671
  }
820
672
  }
821
- endOf(date, unit) {
822
- const clone = new Date(date.valueOf());
823
- switch (unit) {
824
- case 'second':
825
- clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
826
- return new AXDateTime(clone, this.name());
827
- case 'minute':
828
- clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
829
- return new AXDateTime(clone, this.name());
830
- case 'hour':
831
- clone.setHours(clone.getHours(), 59, 59, 999);
832
- return new AXDateTime(clone, this.name());
833
- default:
834
- case 'day':
835
- clone.setHours(23, 59, 59, 999);
836
- return new AXDateTime(clone, this.name());
837
- case 'week':
838
- {
839
- return this.startOf(date, 'week').add('day', 6).endOf('day');
840
- }
841
- case 'month':
842
- {
843
- const jy = this.year(date);
844
- const jm = this.monthOfYear(date);
845
- const jd = this.monthLength(jy, jm);
846
- const gDate = this.toGregorian(jy, jm, jd);
847
- return new AXDateTime(gDate, this.name()).endOf('day');
848
- }
849
- case "year":
850
- let jy = this.year(date);
851
- const gDate = this.toGregorian(jy, 12, this.monthLength(jy, 12));
852
- return new AXDateTime(gDate, this.name()).endOf('day');
853
- }
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
+ });
854
689
  }
855
- toJalali(date) {
856
- const gy = date.getFullYear();
857
- const gm = date.getMonth() + 1;
858
- const gd = date.getDate();
859
- const r = this.d2j(this.g2d(gy, gm, gd));
860
- return {
861
- year: r.jy,
862
- month: r.jm,
863
- day: r.jd,
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
864
704
  };
865
- }
866
- /*
867
- Converts a Jalaali date to Gregorian.
868
- */
869
- toGregorian(jy, jm, jd) {
870
- const g = this.d2g(this.j2d(jy, jm, jd));
871
- return new Date(g.gy, g.gm - 1, g.gd);
872
- }
873
- /*
874
- Checks whether a Jalaali date is valid or not.
875
- */
876
- isValid(jy, jm, jd) {
877
- return jy >= -61 && jy <= 3177 &&
878
- jm >= 1 && jm <= 12 &&
879
- jd >= 1 && jd <= this.monthLength(jy, jm);
880
- }
881
- /*
882
- Is this a leap year or not?
883
- */
884
- isLeapYear(jy) {
885
- return this.jalCal(jy).leap === 0;
886
- }
887
- /*
888
- Number of days in a given month in a Jalaali year.
889
- */
890
- monthLength(jy, jm) {
891
- if (jm <= 6)
892
- return 31;
893
- if (jm <= 11)
894
- return 30;
895
- if (this.isLeapYear(jy))
896
- return 30;
897
- return 29;
898
- }
899
- jalCal(jy) {
900
- // Jalaali years starting the 33-year rule.
901
- let breaks = [-61, 9, 38, 199, 426, 686, 756, 818, 1111, 1181, 1210,
902
- 1635, 2060, 2097, 2192, 2262, 2324, 2394, 2456, 3178
903
- ], bl = breaks.length, gy = jy + 621, leapJ = -14, jp = breaks[0], jm, jump, leap, leapG, march, n, i;
904
- if (jy < jp || jy >= breaks[bl - 1])
905
- throw new Error('Invalid Jalaali year ' + jy);
906
- // Find the limiting years for the Jalaali year jy.
907
- for (i = 1; i < bl; i += 1) {
908
- jm = breaks[i];
909
- jump = jm - jp;
910
- if (jy < jm)
911
- break;
912
- leapJ = leapJ + this.div(jump, 33) * 8 + this.div(this.mod(jump, 33), 4);
913
- jp = jm;
705
+ if (error) {
706
+ error(r);
914
707
  }
915
- n = jy - jp;
916
- // Find the number of leap years from AD 621 to the beginning
917
- // of the current Jalaali year in the Persian calendar.
918
- leapJ = leapJ + this.div(n, 33) * 8 + this.div(this.mod(n, 33) + 3, 4);
919
- if (this.mod(jump, 33) === 4 && jump - n === 4)
920
- leapJ += 1;
921
- // And the same in the Gregorian calendar (until the year gy).
922
- leapG = this.div(gy, 4) - this.div((this.div(gy, 100) + 1) * 3, 4) - 150;
923
- // Determine the Gregorian date of Farvardin the 1st.
924
- march = 20 + leapJ - leapG;
925
- // Find how many years have passed since the last leap year.
926
- if (jump - n < 6)
927
- n = n - jump + this.div(jump + 4, 33) * 33;
928
- leap = this.mod(this.mod(n + 1, 33) - 1, 4);
929
- if (leap === -1) {
930
- leap = 4;
708
+ if (!r.handled) {
709
+ if (this.interceptor)
710
+ this.interceptor.error(config, r);
931
711
  }
932
- return {
933
- leap: leap,
934
- gy: gy,
935
- march: march
936
- };
937
- }
938
- /*
939
- Converts a date of the Jalaali calendar to the Julian Day number.
940
- @param jy Jalaali year (1 to 3100)
941
- @param jm Jalaali month (1 to 12)
942
- @param jd Jalaali day (1 to 29/31)
943
- @return Julian Day number
944
- */
945
- j2d(jy, jm, jd) {
946
- let r = this.jalCal(jy);
947
- return this.g2d(r.gy, 3, r.march) + (jm - 1) * 31 - this.div(jm, 7) * (jm - 7) + jd - 1;
948
- }
949
- /*
950
- Converts the Julian Day number to a date in the Jalaali calendar.
951
- @param jdn Julian Day number
952
- @return
953
- jy: Jalaali year (1 to 3100)
954
- jm: Jalaali month (1 to 12)
955
- jd: Jalaali day (1 to 29/31)
956
- */
957
- d2j(jdn) {
958
- let gy = this.d2g(jdn).gy // Calculate Gregorian year (gy).
959
- , jy = gy - 621, r = this.jalCal(jy), jdn1f = this.g2d(gy, 3, r.march), jd, jm, k;
960
- // Find number of days that passed since 1 Farvardin.
961
- k = jdn - jdn1f;
962
- if (k >= 0) {
963
- if (k <= 185) {
964
- // The first 6 months.
965
- jm = 1 + this.div(k, 31);
966
- jd = this.mod(k, 31) + 1;
967
- return {
968
- jy: jy,
969
- jm: jm,
970
- jd: jd
971
- };
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);
972
720
  }
973
- else {
974
- // The remaining months.
975
- k -= 186;
976
- }
977
- }
978
- else {
979
- // Previous Jalaali year.
980
- jy -= 1;
981
- k += 179;
982
- if (r.leap === 1)
983
- k += 1;
984
721
  }
985
- jm = 7 + this.div(k, 30);
986
- jd = this.mod(k, 30) + 1;
987
- return {
988
- jy: jy,
989
- jm: jm,
990
- jd: jd
991
- };
992
- }
993
- g2d(gy, gm, gd) {
994
- let d = this.div((gy + this.div(gm - 8, 6) + 100100) * 1461, 4)
995
- + this.div(153 * this.mod(gm + 9, 12) + 2, 5)
996
- + gd - 34840408;
997
- d = d - this.div(this.div(gy + 100100 + this.div(gm - 8, 6), 100) * 3, 4) + 752;
998
- return d;
999
- }
1000
- d2g(jdn) {
1001
- let j, i, gd, gm, gy;
1002
- j = 4 * jdn + 139361631;
1003
- j = j + this.div(this.div(4 * jdn + 183187720, 146097) * 3, 4) * 4 - 3908;
1004
- i = this.div(this.mod(j, 1461), 4) * 5 + 308;
1005
- gd = this.div(this.mod(i, 153), 5) + 1;
1006
- gm = this.mod(this.div(i, 153), 12) + 1;
1007
- gy = this.div(j, 1461) - 100100 + this.div(8 - gm, 6);
1008
- return {
1009
- gy: gy,
1010
- gm: gm,
1011
- gd: gd
1012
- };
1013
- }
1014
- /*
1015
- Utility helper functions.
1016
- */
1017
- div(a, b) {
1018
- return ~~(a / b);
1019
- }
1020
- mod(a, b) {
1021
- return a - ~~(a / b) * b;
1022
- }
1023
- }
1024
-
1025
- class AXDateTimeModule {
1026
- constructor() {
1027
- AXConfig.set({
1028
- dateTime: {
1029
- calendars: {
1030
- jalali: new JalaliCalendar(),
1031
- gregorian: new GeorgianCalendar()
1032
- },
1033
- calendar: 'gregorian',
1034
- shortDateFormat: 'DDDD, d MMM yyyy'
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);
1035
727
  }
1036
- });
1037
- }
1038
- }
1039
- AXDateTimeModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1040
- AXDateTimeModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, declarations: [AXDateTimePipe], exports: [AXDateTimePipe] });
1041
- AXDateTimeModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, providers: [], imports: [[]] });
1042
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXDateTimeModule, decorators: [{
1043
- type: NgModule,
1044
- args: [{
1045
- imports: [],
1046
- exports: [AXDateTimePipe],
1047
- declarations: [AXDateTimePipe],
1048
- providers: [],
1049
- }]
1050
- }], ctorParameters: function () { return []; } });
1051
-
1052
- class AXEventService {
1053
- constructor() {
1054
- this.list = [];
1055
- }
1056
- broadcast(key, options) {
1057
- const d = this.list.find(c => c.key === key);
1058
- if (d) {
1059
- d.events.forEach(c => {
1060
- c(options);
1061
- });
1062
- }
1063
- }
1064
- on(key, callback) {
1065
- let d = this.list.find(c => c.key === key);
1066
- if (!d) {
1067
- d = { key, events: [] };
1068
- this.list.push(d);
1069
- }
1070
- d.events.push(callback);
1071
- }
1072
- destroy(key, callback) {
1073
- const d = this.list.find(c => c.key === key);
1074
- if (d) {
1075
- d.events = [];
1076
728
  }
1077
- }
1078
- }
1079
- AXEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1080
- AXEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, providedIn: 'root' });
1081
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXEventService, decorators: [{
1082
- type: Injectable,
1083
- args: [{ providedIn: 'root' }]
1084
- }] });
1085
-
1086
- class AXHotkeysService {
1087
- constructor(eventManager, document) {
1088
- this.eventManager = eventManager;
1089
- this.document = document;
1090
- this.defaults = {
1091
- element: this.document
729
+ return {
730
+ headers: headers,
731
+ params: params,
732
+ body: options.body,
733
+ responseType: options.responseType || 'json'
1092
734
  };
1093
- }
1094
- addShortcut(options) {
1095
- const merged = Object.assign(Object.assign({}, this.defaults), options);
1096
- const event = `keydown.${merged.keys}`;
1097
- return new Observable(observer => {
1098
- const handler = (e) => {
1099
- e.preventDefault();
1100
- observer.next(e);
1101
- };
1102
- const dispose = this.eventManager.addEventListener(merged.element, event, handler);
1103
- return () => {
1104
- dispose();
1105
- };
1106
- });
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
+ // }
1107
748
  }
1108
749
  }
1109
- 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 });
1110
- AXHotkeysService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXHotkeysService });
1111
- 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: [{
1112
753
  type: Injectable
1113
- }], ctorParameters: function () {
1114
- return [{ type: i1.EventManager }, { type: Document, decorators: [{
1115
- type: Inject,
1116
- args: [DOCUMENT]
1117
- }] }];
1118
- } });
1119
-
1120
- // @dynamic
1121
- class AXTranslator {
1122
- static get onChange() {
1123
- return AXTranslator.dataChangeSubject.asObservable();
1124
- }
1125
- static load(lang, value) {
1126
- if (typeof value === 'object') {
1127
- if (!AXTranslator[`__data__${lang}`]) {
1128
- AXTranslator[`__data__${lang}`] = {};
1129
- }
1130
- AXTranslator[`__data__${lang}`] = merge(AXTranslator[`__data__${lang}`], value);
1131
- }
1132
- }
1133
- static use(lang) {
1134
- AXTranslator.lang = lang;
1135
- }
1136
- static get(key, lang, params) {
1137
- lang = lang || AXTranslator.lang;
1138
- let result = _.get(AXTranslator[`__data__${lang}`], key, key);
1139
- const vars = typeof (result) == 'string' ? result === null || result === void 0 ? void 0 : result.match(this._varsRegx) : [];
1140
- if (vars === null || vars === void 0 ? void 0 : vars.length) {
1141
- vars.forEach(v => {
1142
- var _a;
1143
- const varKey = ((_a = v.match(this._varNameRegx)) === null || _a === void 0 ? void 0 : _a.length) ? v.match(this._varNameRegx)[0] : null;
1144
- if (varKey) {
1145
- const p = _.get(params, varKey) || this.get(varKey, lang);
1146
- if (p) {
1147
- result = result.replace(v, p);
1148
- }
1149
- }
1150
- });
1151
- }
1152
- return typeof (result) == 'string' ? result : JSON.stringify(result);
1153
- }
1154
- }
1155
- AXTranslator.lang = 'en';
1156
- AXTranslator.dataChangeSubject = new Subject();
1157
- AXTranslator._varsRegx = /((\$\{[a-zA-Z_0-9\.]+\})+)/gm;
1158
- AXTranslator._varNameRegx = /[a-zA-Z_0-9\.]+/gm;
754
+ }], ctorParameters: function () { return [{ type: i1.HttpClient }, { type: i0.Injector }]; } });
1159
755
 
1160
- class AXTranslatorPipe {
1161
- transform(value, lang) {
1162
- return AXTranslator.get(value, lang);
756
+ class AXHttpModule {
757
+ static forRoot() {
758
+ return {
759
+ ngModule: AXHttpModule,
760
+ providers: [AXHttpService]
761
+ };
1163
762
  }
1164
763
  }
1165
- AXTranslatorPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
1166
- AXTranslatorPipepipe = i0.ɵɵngDeclarePipe({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, name: "trans" });
1167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslatorPipe, decorators: [{
1168
- type: Pipe,
1169
- args: [{ name: 'trans', pure: true }]
1170
- }] });
1171
-
1172
- class AXTranslationModule {
1173
- }
1174
- AXTranslationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
1175
- AXTranslationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, declarations: [AXTranslatorPipe], exports: [AXTranslatorPipe] });
1176
- AXTranslationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXTranslationModule, providers: [], imports: [[]] });
1177
- 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: [{
1178
774
  type: NgModule,
1179
775
  args: [{
1180
- imports: [],
1181
- exports: [AXTranslatorPipe],
1182
- declarations: [AXTranslatorPipe],
1183
- providers: [],
776
+ declarations: [],
777
+ imports: [
778
+ CommonModule,
779
+ HttpClientModule
780
+ ],
781
+ exports: [HttpClientModule],
782
+ providers: [
783
+ AXHttpService
784
+ ]
1184
785
  }]
1185
786
  }] });
1186
787
 
@@ -1259,7 +860,10 @@ class AXPlatform {
1259
860
  this.resize = new Subject();
1260
861
  this.click = new Subject();
1261
862
  this.scroll = new Subject();
1262
- window.addEventListener('resize', (e) => {
863
+ fromEvent(window, 'resize')
864
+ .pipe(debounceTime(100))
865
+ .pipe(distinctUntilChanged())
866
+ .subscribe((e) => {
1263
867
  this.resize.next({
1264
868
  nativeEvent: e,
1265
869
  source: this
@@ -1306,23 +910,1352 @@ class AXPlatform {
1306
910
  document.querySelector(':root').style.setProperty('--ax-vh', window.innerHeight / 100 + 'px');
1307
911
  }
1308
912
  }
1309
- AXPlatform.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
1310
- AXPlatform.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "13.3.2", ngImport: i0, type: AXPlatform, providedIn: 'platform' });
1311
- 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: [{
1312
916
  type: Injectable,
1313
917
  args: [{
1314
918
  providedIn: 'platform',
1315
919
  }]
1316
920
  }], ctorParameters: function () { return []; } });
1317
921
 
1318
- /**
1319
- * Public API refrences of core libraries
1320
- * @module @acorex/core
1321
- */
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
+ }] });
1322
2255
 
1323
2256
  /**
1324
2257
  * Generated bundle index. Do not edit.
1325
2258
  */
1326
2259
 
1327
- 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 };
1328
2261
  //# sourceMappingURL=acorex-core.mjs.map