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