@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
@@ -0,0 +1 @@
|
|
1
|
+
export declare function Memorize(): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;
|
package/package.json
CHANGED
@@ -1,11 +1,14 @@
|
|
1
1
|
{
|
2
2
|
"name": "@acorex/core",
|
3
|
-
"version": "
|
3
|
+
"version": "17.0.1",
|
4
4
|
"peerDependencies": {
|
5
|
-
"@angular/common": "^
|
6
|
-
"@angular/core": "^
|
7
|
-
"
|
8
|
-
"
|
5
|
+
"@angular/common": "^17.3.2",
|
6
|
+
"@angular/core": "^17.3.2",
|
7
|
+
"lodash-es": ">=4.17.21",
|
8
|
+
"memoizee": ">=0.4.15",
|
9
|
+
"crypto-js": "^4.2.0",
|
10
|
+
"wavesurfer.js": "^7.7.5",
|
11
|
+
"tinygradient-es": "^1.0.0"
|
9
12
|
},
|
10
13
|
"dependencies": {
|
11
14
|
"tslib": "^2.3.0"
|
@@ -22,6 +25,96 @@
|
|
22
25
|
"esm2022": "./esm2022/acorex-core.mjs",
|
23
26
|
"esm": "./esm2022/acorex-core.mjs",
|
24
27
|
"default": "./fesm2022/acorex-core.mjs"
|
28
|
+
},
|
29
|
+
"./common": {
|
30
|
+
"types": "./common/index.d.ts",
|
31
|
+
"esm2022": "./esm2022/common/acorex-core-common.mjs",
|
32
|
+
"esm": "./esm2022/common/acorex-core-common.mjs",
|
33
|
+
"default": "./fesm2022/acorex-core-common.mjs"
|
34
|
+
},
|
35
|
+
"./config": {
|
36
|
+
"types": "./config/index.d.ts",
|
37
|
+
"esm2022": "./esm2022/config/acorex-core-config.mjs",
|
38
|
+
"esm": "./esm2022/config/acorex-core-config.mjs",
|
39
|
+
"default": "./fesm2022/acorex-core-config.mjs"
|
40
|
+
},
|
41
|
+
"./date-time": {
|
42
|
+
"types": "./date-time/index.d.ts",
|
43
|
+
"esm2022": "./esm2022/date-time/acorex-core-date-time.mjs",
|
44
|
+
"esm": "./esm2022/date-time/acorex-core-date-time.mjs",
|
45
|
+
"default": "./fesm2022/acorex-core-date-time.mjs"
|
46
|
+
},
|
47
|
+
"./events": {
|
48
|
+
"types": "./events/index.d.ts",
|
49
|
+
"esm2022": "./esm2022/events/acorex-core-events.mjs",
|
50
|
+
"esm": "./esm2022/events/acorex-core-events.mjs",
|
51
|
+
"default": "./fesm2022/acorex-core-events.mjs"
|
52
|
+
},
|
53
|
+
"./file": {
|
54
|
+
"types": "./file/index.d.ts",
|
55
|
+
"esm2022": "./esm2022/file/acorex-core-file.mjs",
|
56
|
+
"esm": "./esm2022/file/acorex-core-file.mjs",
|
57
|
+
"default": "./fesm2022/acorex-core-file.mjs"
|
58
|
+
},
|
59
|
+
"./format": {
|
60
|
+
"types": "./format/index.d.ts",
|
61
|
+
"esm2022": "./esm2022/format/acorex-core-format.mjs",
|
62
|
+
"esm": "./esm2022/format/acorex-core-format.mjs",
|
63
|
+
"default": "./fesm2022/acorex-core-format.mjs"
|
64
|
+
},
|
65
|
+
"./image": {
|
66
|
+
"types": "./image/index.d.ts",
|
67
|
+
"esm2022": "./esm2022/image/acorex-core-image.mjs",
|
68
|
+
"esm": "./esm2022/image/acorex-core-image.mjs",
|
69
|
+
"default": "./fesm2022/acorex-core-image.mjs"
|
70
|
+
},
|
71
|
+
"./memorize": {
|
72
|
+
"types": "./memorize/index.d.ts",
|
73
|
+
"esm2022": "./esm2022/memorize/acorex-core-memorize.mjs",
|
74
|
+
"esm": "./esm2022/memorize/acorex-core-memorize.mjs",
|
75
|
+
"default": "./fesm2022/acorex-core-memorize.mjs"
|
76
|
+
},
|
77
|
+
"./pipes": {
|
78
|
+
"types": "./pipes/index.d.ts",
|
79
|
+
"esm2022": "./esm2022/pipes/acorex-core-pipes.mjs",
|
80
|
+
"esm": "./esm2022/pipes/acorex-core-pipes.mjs",
|
81
|
+
"default": "./fesm2022/acorex-core-pipes.mjs"
|
82
|
+
},
|
83
|
+
"./platform": {
|
84
|
+
"types": "./platform/index.d.ts",
|
85
|
+
"esm2022": "./esm2022/platform/acorex-core-platform.mjs",
|
86
|
+
"esm": "./esm2022/platform/acorex-core-platform.mjs",
|
87
|
+
"default": "./fesm2022/acorex-core-platform.mjs"
|
88
|
+
},
|
89
|
+
"./storage": {
|
90
|
+
"types": "./storage/index.d.ts",
|
91
|
+
"esm2022": "./esm2022/storage/acorex-core-storage.mjs",
|
92
|
+
"esm": "./esm2022/storage/acorex-core-storage.mjs",
|
93
|
+
"default": "./fesm2022/acorex-core-storage.mjs"
|
94
|
+
},
|
95
|
+
"./translation": {
|
96
|
+
"types": "./translation/index.d.ts",
|
97
|
+
"esm2022": "./esm2022/translation/acorex-core-translation.mjs",
|
98
|
+
"esm": "./esm2022/translation/acorex-core-translation.mjs",
|
99
|
+
"default": "./fesm2022/acorex-core-translation.mjs"
|
100
|
+
},
|
101
|
+
"./types": {
|
102
|
+
"types": "./types/index.d.ts",
|
103
|
+
"esm2022": "./esm2022/types/acorex-core-types.mjs",
|
104
|
+
"esm": "./esm2022/types/acorex-core-types.mjs",
|
105
|
+
"default": "./fesm2022/acorex-core-types.mjs"
|
106
|
+
},
|
107
|
+
"./utils": {
|
108
|
+
"types": "./utils/index.d.ts",
|
109
|
+
"esm2022": "./esm2022/utils/acorex-core-utils.mjs",
|
110
|
+
"esm": "./esm2022/utils/acorex-core-utils.mjs",
|
111
|
+
"default": "./fesm2022/acorex-core-utils.mjs"
|
112
|
+
},
|
113
|
+
"./validation": {
|
114
|
+
"types": "./validation/index.d.ts",
|
115
|
+
"esm2022": "./esm2022/validation/acorex-core-validation.mjs",
|
116
|
+
"esm": "./esm2022/validation/acorex-core-validation.mjs",
|
117
|
+
"default": "./fesm2022/acorex-core-validation.mjs"
|
25
118
|
}
|
26
119
|
}
|
27
120
|
}
|
package/pipes/README.md
ADDED
package/pipes/index.d.ts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/safe/safe.pipe';
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import { DomSanitizer, SafeHtml, SafeResourceUrl, SafeScript, SafeStyle, SafeUrl } from '@angular/platform-browser';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class AXSafePipe implements PipeTransform {
|
5
|
+
protected sanitizer: DomSanitizer;
|
6
|
+
constructor(sanitizer: DomSanitizer);
|
7
|
+
transform(value: any, type: string): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl;
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXSafePipe, never>;
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXSafePipe, "safe", true>;
|
10
|
+
}
|
@@ -0,0 +1 @@
|
|
1
|
+
export * from './lib/platform.service';
|
@@ -1,25 +1,33 @@
|
|
1
|
-
import { Subject } from
|
1
|
+
import { BehaviorSubject, Subject } from 'rxjs';
|
2
2
|
import * as i0 from "@angular/core";
|
3
|
-
export type
|
3
|
+
export type AXThemeMode = 'light' | 'dark' | 'system';
|
4
|
+
export type AXPlatforms = 'Android' | 'Desktop' | 'iOS' | 'Mobile';
|
4
5
|
export type AXBrowsers = 'Chrome' | 'Safari' | 'Edge' | 'Firefox' | 'Opera' | 'MSIE';
|
5
6
|
export type AXTechnologies = 'PWA' | 'Hybrid' | 'Electron';
|
6
|
-
export type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL';
|
7
|
+
export type AXScreenSizes = 'SM' | 'MD' | 'LG' | 'XL' | '2XL' | '3XL' | '4XL' | '5XL';
|
7
8
|
export declare const testUserAgent: (win: Window, expr: RegExp) => boolean;
|
8
|
-
export declare
|
9
|
-
|
9
|
+
export declare const isBrowser: Function;
|
10
|
+
export declare const isServer: Function;
|
11
|
+
export declare class AXPlatformEvent<T extends Event = Event> {
|
12
|
+
nativeEvent: T;
|
10
13
|
source: AXPlatform;
|
11
14
|
}
|
12
15
|
export declare class AXPlatform {
|
13
16
|
resize: Subject<AXPlatformEvent>;
|
14
17
|
click: Subject<AXPlatformEvent>;
|
15
18
|
scroll: Subject<AXPlatformEvent>;
|
19
|
+
themeMode$: BehaviorSubject<AXThemeMode>;
|
16
20
|
isRtl(): boolean;
|
17
21
|
isLandscape(): boolean;
|
18
22
|
isPortrate(): boolean;
|
19
23
|
is(name: AXPlatforms | AXBrowsers | AXTechnologies | AXScreenSizes): boolean;
|
24
|
+
get screenSize(): AXScreenSizes;
|
25
|
+
switchLightMode(): string;
|
20
26
|
switchDarkMode(): void;
|
21
|
-
|
27
|
+
switchSystemMode(): void;
|
28
|
+
autoDetectThemeMode(): string | void;
|
22
29
|
private _setFullHeightRatio;
|
30
|
+
private autoSystemModeDetection;
|
23
31
|
constructor();
|
24
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<AXPlatform, never>;
|
25
33
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXPlatform>;
|
@@ -0,0 +1,104 @@
|
|
1
|
+
import { AXCookieOptions, AXSameSite } from './storage.interface';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class AXCookieStorageService {
|
4
|
+
private document;
|
5
|
+
private platformId;
|
6
|
+
private readonly documentIsAccessible;
|
7
|
+
constructor(document: Document, platformId: any);
|
8
|
+
/**
|
9
|
+
* Get cookie Regular Expression
|
10
|
+
*
|
11
|
+
* @param name Cookie name
|
12
|
+
* @returns property RegExp
|
13
|
+
*
|
14
|
+
*/
|
15
|
+
private static getCookieRegExp;
|
16
|
+
/**
|
17
|
+
* Gets the unencoded version of an encoded component of a Uniform Resource Identifier (URI).
|
18
|
+
*
|
19
|
+
* @param encodedURIComponent A value representing an encoded URI component.
|
20
|
+
*
|
21
|
+
* @returns The unencoded version of an encoded component of a Uniform Resource Identifier (URI).
|
22
|
+
*
|
23
|
+
*/
|
24
|
+
private static safeDecodeURIComponent;
|
25
|
+
/**
|
26
|
+
* Return `true` if {@link Document} is accessible, otherwise return `false`
|
27
|
+
*
|
28
|
+
* @param name Cookie name
|
29
|
+
* @returns boolean - whether cookie with specified name exists
|
30
|
+
*
|
31
|
+
*/
|
32
|
+
check(name: string): boolean;
|
33
|
+
/**
|
34
|
+
* Get cookies by name
|
35
|
+
*
|
36
|
+
* @param name Cookie name
|
37
|
+
* @returns property value
|
38
|
+
*
|
39
|
+
*/
|
40
|
+
get(name: string): string;
|
41
|
+
/**
|
42
|
+
* Get all cookies in JSON format
|
43
|
+
*
|
44
|
+
* @returns all the cookies in json
|
45
|
+
*
|
46
|
+
*/
|
47
|
+
getAll(): {
|
48
|
+
[key: string]: string;
|
49
|
+
};
|
50
|
+
/**
|
51
|
+
* Set cookie based on provided information
|
52
|
+
*
|
53
|
+
* @param name Cookie name
|
54
|
+
* @param value Cookie value
|
55
|
+
* @param expires Number of days until the cookies expires or an actual `Date`
|
56
|
+
* @param path Cookie path
|
57
|
+
* @param domain Cookie domain
|
58
|
+
* @param secure Secure flag
|
59
|
+
* @param sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax`
|
60
|
+
*
|
61
|
+
*/
|
62
|
+
set(name: string, value: string, expires?: AXCookieOptions['expires'], path?: AXCookieOptions['path'], domain?: AXCookieOptions['domain'], secure?: AXCookieOptions['secure'], sameSite?: AXSameSite): void;
|
63
|
+
/**
|
64
|
+
* Set cookie based on provided information
|
65
|
+
*
|
66
|
+
* Cookie's parameters:
|
67
|
+
* <pre>
|
68
|
+
* expires Number of days until the cookies expires or an actual `Date`
|
69
|
+
* path Cookie path
|
70
|
+
* domain Cookie domain
|
71
|
+
* secure Secure flag
|
72
|
+
* sameSite OWASP samesite token `Lax`, `None`, or `Strict`. Defaults to `Lax`
|
73
|
+
* </pre>
|
74
|
+
*
|
75
|
+
* @param name Cookie name
|
76
|
+
* @param value Cookie value
|
77
|
+
* @param options Body with cookie's params
|
78
|
+
*
|
79
|
+
*/
|
80
|
+
set(name: string, value: string, options?: AXCookieOptions): void;
|
81
|
+
/**
|
82
|
+
* Delete cookie by name
|
83
|
+
*
|
84
|
+
* @param name Cookie name
|
85
|
+
* @param path Cookie path
|
86
|
+
* @param domain Cookie domain
|
87
|
+
* @param secure Cookie secure flag
|
88
|
+
* @param sameSite Cookie sameSite flag - https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie/SameSite
|
89
|
+
*
|
90
|
+
*/
|
91
|
+
delete(name: string, path?: AXCookieOptions['path'], domain?: AXCookieOptions['domain'], secure?: AXCookieOptions['secure'], sameSite?: AXSameSite): void;
|
92
|
+
/**
|
93
|
+
* Delete all cookies
|
94
|
+
*
|
95
|
+
* @param path Cookie path
|
96
|
+
* @param domain Cookie domain
|
97
|
+
* @param secure Is the Cookie secure
|
98
|
+
* @param sameSite Is the cookie same site
|
99
|
+
*
|
100
|
+
*/
|
101
|
+
deleteAll(path?: AXCookieOptions['path'], domain?: AXCookieOptions['domain'], secure?: AXCookieOptions['secure'], sameSite?: AXSameSite): void;
|
102
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXCookieStorageService, never>;
|
103
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXCookieStorageService>;
|
104
|
+
}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
import { AXStorage } from './storage.interface';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare const AX_LOCALSTORAGE_SECRET_KEY: InjectionToken<string>;
|
5
|
+
export declare class AXLocalStorageService implements AXStorage {
|
6
|
+
private secret_key;
|
7
|
+
constructor(secret_key: string);
|
8
|
+
get<T = unknown>(key: string): T;
|
9
|
+
set<T = unknown>(key: string, value: T): void;
|
10
|
+
clear(): void;
|
11
|
+
removeItem(key: string): void;
|
12
|
+
setWithEncryption<T = unknown>(key: string, value: T): void;
|
13
|
+
getWithEncription<T = unknown>(key: string): T;
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXLocalStorageService, never>;
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXLocalStorageService>;
|
16
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import { AXStorage } from './storage.interface';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export declare class AXSessionStorageService implements AXStorage {
|
4
|
+
get<T = unknown>(key: string): T;
|
5
|
+
set<T = unknown>(key: string, value: T): void;
|
6
|
+
clear(): void;
|
7
|
+
removeItem(key: string): void;
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXSessionStorageService, never>;
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXSessionStorageService>;
|
10
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export interface AXStorage {
|
2
|
+
get<T = unknown>(key: string): T;
|
3
|
+
set<T = unknown>(key: string, value: T): void;
|
4
|
+
removeItem(key: string): any;
|
5
|
+
clear(): void;
|
6
|
+
}
|
7
|
+
export type AXSameSite = 'Lax' | 'None' | 'Strict';
|
8
|
+
export interface AXCookieOptions {
|
9
|
+
expires?: number | Date;
|
10
|
+
path?: string;
|
11
|
+
domain?: string;
|
12
|
+
secure?: boolean;
|
13
|
+
sameSite?: AXSameSite;
|
14
|
+
}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
export * from './lib/translation.config';
|
2
|
+
export * from './lib/translation.loader';
|
3
|
+
export * from './lib/translation.module';
|
4
|
+
export * from './lib/translation.types';
|
5
|
+
export * from './lib/translation-scope.resolver';
|
6
|
+
export * from './lib/translation.service';
|
7
|
+
export * from './lib/translator.directive';
|
8
|
+
export * from './lib/translator.pipe';
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
import { AXTranslateLang, AXTranslateScope } from './translation.types';
|
3
|
+
export interface AXTranslationConfig {
|
4
|
+
defaultLang: AXTranslateLang;
|
5
|
+
defaultScope: AXTranslateScope;
|
6
|
+
preloadLangs?: AXTranslateLang[];
|
7
|
+
preloadScopes?: AXTranslateLang[];
|
8
|
+
availableLangs?: AXTranslateLang[];
|
9
|
+
scopeResolverKey: string;
|
10
|
+
}
|
11
|
+
export declare const AX_TRANSLATION_CONFIG: InjectionToken<AXTranslationConfig>;
|
12
|
+
export declare const AXTranslationDefaultConfig: AXTranslationConfig;
|
13
|
+
export type AXPartialTranslationConfig = Partial<AXTranslationConfig>;
|
14
|
+
export declare function translationConfig(config?: AXPartialTranslationConfig): AXTranslationConfig;
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
2
|
+
import { AXTranslateLang, AXTranslateScope, AXTranslation } from './translation.types';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
export interface AXTranslationLoaderOptions {
|
5
|
+
lang: AXTranslateLang;
|
6
|
+
scope?: AXTranslateScope;
|
7
|
+
}
|
8
|
+
export interface AXTranslationLoader {
|
9
|
+
getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation>;
|
10
|
+
}
|
11
|
+
export declare class AXTranslationLoaderDefault implements AXTranslationLoader {
|
12
|
+
getTranslation(options: AXTranslationLoaderOptions): Observable<AXTranslation>;
|
13
|
+
}
|
14
|
+
export declare const AX_TRANSLATION_LOADER: InjectionToken<AXTranslationLoader>;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import * as i0 from "@angular/core";
|
2
|
+
import * as i1 from "./translator.pipe";
|
3
|
+
import * as i2 from "./translator.directive";
|
4
|
+
export declare class AXTranslationModule {
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslationModule, never>;
|
6
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AXTranslationModule, [typeof i1.AXTranslatorPipe, typeof i2.AXTranslatorDirective], never, [typeof i1.AXTranslatorPipe, typeof i2.AXTranslatorDirective]>;
|
7
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<AXTranslationModule>;
|
8
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import { Observable } from 'rxjs';
|
2
|
+
import { AXTranslateOptions } from './translation.types';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare function translateSync(key: string, options?: AXTranslateOptions): string;
|
5
|
+
export declare class AXTranslationService {
|
6
|
+
private loader;
|
7
|
+
private config;
|
8
|
+
private eventService;
|
9
|
+
private translationCache;
|
10
|
+
private ongoingRequests;
|
11
|
+
private activeLang;
|
12
|
+
langChanges$: Observable<string>;
|
13
|
+
private lastActiveLang;
|
14
|
+
/**
|
15
|
+
* @ignore
|
16
|
+
*/
|
17
|
+
constructor();
|
18
|
+
loadLanguagesAndScopes(languages: string[], scopes: string[]): Observable<unknown>;
|
19
|
+
private getOrLoadTranslations;
|
20
|
+
private cacheTranslations;
|
21
|
+
getDefaultLang(): string;
|
22
|
+
getActiveLang(): string;
|
23
|
+
setActiveLang(lang: string): void;
|
24
|
+
private load;
|
25
|
+
private getTranslation;
|
26
|
+
translate(key: string, options?: AXTranslateOptions): Observable<string>;
|
27
|
+
translateAsync(key: string, options?: AXTranslateOptions): Promise<string>;
|
28
|
+
translateSync(key: string, options?: AXTranslateOptions): string;
|
29
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslationService, never>;
|
30
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXTranslationService>;
|
31
|
+
}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
export type AXTranslateParams<T = unknown> = Record<string, T>;
|
2
|
+
export type AXTranslateHashMap<T = unknown> = Record<string, T>;
|
3
|
+
export type AXTranslation = Record<string, string>;
|
4
|
+
export type AXTranslateLang = string;
|
5
|
+
export type AXTranslateScope = string;
|
6
|
+
export interface AXTranslateOptions {
|
7
|
+
lang?: AXTranslateLang;
|
8
|
+
scope?: AXTranslateScope;
|
9
|
+
params?: AXTranslateParams;
|
10
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
|
2
|
+
import { AXTranslationService } from './translation.service';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare class AXTranslatorDirective implements OnInit {
|
5
|
+
private templateRef;
|
6
|
+
private viewContainer;
|
7
|
+
private translationService;
|
8
|
+
constructor(templateRef: TemplateRef<any>, viewContainer: ViewContainerRef, translationService: AXTranslationService);
|
9
|
+
ngOnInit(): void;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorDirective, never>;
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<AXTranslatorDirective, "[translate]", never, {}, {}, never, never, false, never>;
|
12
|
+
}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
2
|
+
import { AXTranslationService } from './translation.service';
|
3
|
+
import { Observable } from 'rxjs';
|
4
|
+
import { AXTranslateOptions } from './translation.types';
|
5
|
+
import * as i0 from "@angular/core";
|
6
|
+
export declare class AXTranslatorPipe implements PipeTransform {
|
7
|
+
private service;
|
8
|
+
constructor(service: AXTranslationService);
|
9
|
+
transform(key: string, options?: AXTranslateOptions): Observable<string>;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXTranslatorPipe, never>;
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AXTranslatorPipe, "translate", false>;
|
12
|
+
}
|
package/types/README.md
ADDED
package/types/index.d.ts
ADDED
package/utils/README.md
ADDED
package/utils/index.d.ts
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
2
|
+
import { Observable, Subject } from 'rxjs';
|
3
|
+
import * as i0 from "@angular/core";
|
4
|
+
export declare function AXAutoUnsubscriber(): (constructor: any) => void;
|
5
|
+
export declare class AXUnsubscriber implements OnDestroy {
|
6
|
+
private readonly _destroy$;
|
7
|
+
readonly takeUntilDestroy: <T>(origin: Observable<T> | Subject<T>) => Observable<T> | Subject<T>;
|
8
|
+
unsubscribe(): void;
|
9
|
+
ngOnDestroy(): void;
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXUnsubscriber, never>;
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXUnsubscriber>;
|
12
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
export type AXColorMode = 'rgba' | 'hex' | 'hsla' | 'hsva' | null;
|
2
|
+
import tinycolor, { ColorInput } from 'tinycolor2';
|
3
|
+
import { Instance } from 'tinygradient-es';
|
4
|
+
export type AXColorFormat = ColorInput;
|
5
|
+
export declare class AXColorUtil {
|
6
|
+
static to(color: AXColorFormat, mode: AXColorMode): AXColorFormat;
|
7
|
+
static toString(color: AXColorFormat, mode?: AXColorMode): string;
|
8
|
+
static isValid(color: AXColorFormat): boolean;
|
9
|
+
static mix(baseColor: AXColorFormat, hex: AXColorFormat, percentage: number): string;
|
10
|
+
static multiply(color1: AXColorFormat, color2: AXColorFormat): string;
|
11
|
+
static contrastToWhite(color: AXColorFormat): number;
|
12
|
+
static lighten(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
13
|
+
static darken(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
14
|
+
static brighten(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
15
|
+
static saturate(hex: AXColorFormat, percentage?: number): tinycolor.Instance;
|
16
|
+
static desaturate(hex: AXColorFormat): number;
|
17
|
+
static equal(color1: AXColorFormat, color2: AXColorFormat): boolean;
|
18
|
+
static gradient(values: unknown[] | {
|
19
|
+
color: unknown;
|
20
|
+
pos: number;
|
21
|
+
}[]): Instance;
|
22
|
+
static getLuminance(hex: AXColorFormat): number;
|
23
|
+
static xyToRgb(vX: any, vY: any): string;
|
24
|
+
}
|
@@ -0,0 +1,18 @@
|
|
1
|
+
export interface AXPoint {
|
2
|
+
x: number;
|
3
|
+
y: number;
|
4
|
+
}
|
5
|
+
export interface AXBoundingClientRect {
|
6
|
+
left?: number;
|
7
|
+
top?: number;
|
8
|
+
width?: number;
|
9
|
+
height?: number;
|
10
|
+
bottom?: number;
|
11
|
+
right?: number;
|
12
|
+
}
|
13
|
+
export declare class AXDrawingUtil {
|
14
|
+
static collision(a: HTMLElement, b: HTMLElement): boolean;
|
15
|
+
static isInElementBound(pos: AXPoint, element: HTMLElement): boolean;
|
16
|
+
static isInRecPoint(pos: AXPoint, rec: AXBoundingClientRect | any): boolean;
|
17
|
+
static convertRemToPixels(rem: number): number;
|
18
|
+
}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
export * from './lib/rules/callback-rule';
|
2
|
+
export * from './lib/rules/regex-rule';
|
3
|
+
export * from './lib/rules/required-rule';
|
4
|
+
export * from './lib/rules/length-rule';
|
5
|
+
export * from './lib/rules/maxlength-rule';
|
6
|
+
export * from './lib/rules/minlength-rule';
|
7
|
+
export * from './lib/rules/between-rule';
|
8
|
+
export * from './lib/rules/equal-rule';
|
9
|
+
export * from './lib/rules/greater-than';
|
10
|
+
export * from './lib/rules/less-than-rule';
|
11
|
+
export * from './lib/validation.config';
|
12
|
+
export * from './lib/validation.module';
|
13
|
+
export * from './lib/validation.service';
|
14
|
+
export * from './lib/validation.types';
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export interface AXBetweenValidationRuleOptions<T = number | Date> extends AXValidationRuleOptions {
|
4
|
+
lowerValue: T;
|
5
|
+
upperValue: T;
|
6
|
+
inclusive?: boolean;
|
7
|
+
}
|
8
|
+
declare module '../validation.types' {
|
9
|
+
interface AXValidationRuleOptionsMap {
|
10
|
+
between: AXBetweenValidationRuleOptions;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
export declare class AXBetweenValidationRule<T = number | Date> implements AXValidationRule {
|
14
|
+
get name(): string;
|
15
|
+
validate(value: T, options: AXBetweenValidationRuleOptions<T>): Promise<AXValidationRuleResult>;
|
16
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXBetweenValidationRule<any>, never>;
|
17
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXBetweenValidationRule<any>>;
|
18
|
+
}
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import { AXValidationRule, AXValidationRuleOptions, AXValidationRuleResult } from '../validation.types';
|
2
|
+
import * as i0 from "@angular/core";
|
3
|
+
export type AXCallbackValidation<T> = (value: T, options?: AXCallbackValidationRuleOptions<T>) => Promise<{
|
4
|
+
result: boolean;
|
5
|
+
message?: string;
|
6
|
+
}> | {
|
7
|
+
result: boolean;
|
8
|
+
message?: string;
|
9
|
+
};
|
10
|
+
export interface AXCallbackValidationRuleOptions<T> extends AXValidationRuleOptions {
|
11
|
+
validate: AXCallbackValidation<T>;
|
12
|
+
}
|
13
|
+
declare module '../validation.types' {
|
14
|
+
interface AXValidationRuleOptionsMap {
|
15
|
+
callback: AXCallbackValidationRuleOptions<unknown>;
|
16
|
+
}
|
17
|
+
}
|
18
|
+
export declare class AXCallbackValidationRule<T> implements AXValidationRule {
|
19
|
+
get name(): string;
|
20
|
+
validate(value: T, options: AXCallbackValidationRuleOptions<T>): Promise<AXValidationRuleResult>;
|
21
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXCallbackValidationRule<any>, never>;
|
22
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXCallbackValidationRule<any>>;
|
23
|
+
}
|