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