@acorex/core 6.5.28 → 6.5.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/README.md +3 -3
  2. package/acorex-core.d.ts +5 -0
  3. package/esm2020/acorex-core.mjs +5 -0
  4. package/esm2020/lib/classes/base-page.class.mjs +28 -0
  5. package/esm2020/lib/classes/color.class.mjs +49 -0
  6. package/esm2020/lib/classes/datetime.class.mjs +314 -0
  7. package/esm2020/lib/classes/menu.class.mjs +27 -0
  8. package/esm2020/lib/classes/navigator.class.mjs +2 -0
  9. package/esm2020/lib/classes/popup.class.mjs +2 -0
  10. package/esm2020/lib/classes/promise.class.mjs +19 -0
  11. package/esm2020/lib/classes/sectionlist.class.mjs +2 -0
  12. package/esm2020/lib/classes/select.class.mjs +3 -0
  13. package/esm2020/lib/core.module.mjs +27 -0
  14. package/esm2020/lib/error/error.class.mjs +2 -0
  15. package/esm2020/lib/error/error.module.mjs +19 -0
  16. package/esm2020/lib/error/error.service.mjs +21 -0
  17. package/esm2020/lib/events/keyboard.mjs +2 -0
  18. package/esm2020/lib/http/http-error.class.mjs +2 -0
  19. package/esm2020/lib/http/http-events.interceptor.mjs +3 -0
  20. package/esm2020/lib/http/http-request.class.mjs +2 -0
  21. package/esm2020/lib/http/http-result.class.mjs +21 -0
  22. package/esm2020/lib/http/http.module.mjs +37 -0
  23. package/esm2020/lib/http/http.service.mjs +145 -0
  24. package/{src → esm2020}/lib/locale/en.json +255 -255
  25. package/{src → esm2020}/lib/locale/fa.json +245 -245
  26. package/esm2020/lib/pipe/datetime.pipe.mjs +25 -0
  27. package/esm2020/lib/pipe/htmlToText.pipe.mjs +25 -0
  28. package/esm2020/lib/platform/index.mjs +2 -0
  29. package/esm2020/lib/platform/platform.service.mjs +150 -0
  30. package/esm2020/lib/services/config.mjs +29 -0
  31. package/esm2020/lib/services/event.service.mjs +36 -0
  32. package/esm2020/lib/services/navigator.service.mjs +10 -0
  33. package/esm2020/lib/services/storage.service.mjs +16 -0
  34. package/esm2020/lib/translator/translator.mjs +26 -0
  35. package/esm2020/lib/translator/translator.module.mjs +25 -0
  36. package/esm2020/lib/translator/translator.pipe.mjs +24 -0
  37. package/esm2020/lib/translator/translator.service.mjs +21 -0
  38. package/esm2020/lib/utils/array/array-util.mjs +133 -0
  39. package/esm2020/lib/utils/html/html-util.mjs +192 -0
  40. package/esm2020/lib/utils/html/html.module.mjs +19 -0
  41. package/esm2020/lib/utils/math/math-util.mjs +6 -0
  42. package/esm2020/lib/utils/object/object-util.mjs +83 -0
  43. package/esm2020/lib/utils/render/on-demand-preload-strategy.service.mjs +20 -0
  44. package/esm2020/lib/utils/render/render.service.mjs +103 -0
  45. package/esm2020/lib/utils/render/rendering.module.mjs +35 -0
  46. package/esm2020/lib/utils/scroll/scroll.directive.mjs +54 -0
  47. package/esm2020/lib/utils/scroll/scroll.module.mjs +19 -0
  48. package/esm2020/lib/utils/separator/separator.module.mjs +19 -0
  49. package/esm2020/lib/utils/separator/separator.pipe.mjs +33 -0
  50. package/esm2020/public-api.mjs +44 -0
  51. package/fesm2015/acorex-core.mjs +2274 -0
  52. package/fesm2015/acorex-core.mjs.map +1 -0
  53. package/fesm2020/acorex-core.mjs +2270 -0
  54. package/fesm2020/acorex-core.mjs.map +1 -0
  55. package/lib/classes/base-page.class.d.ts +13 -0
  56. package/lib/classes/color.class.d.ts +17 -0
  57. package/lib/classes/datetime.class.d.ts +63 -0
  58. package/lib/classes/menu.class.d.ts +34 -0
  59. package/{src/lib/classes/navigator.class.ts → lib/classes/navigator.class.d.ts} +5 -5
  60. package/{src/lib/classes/popup.class.ts → lib/classes/popup.class.d.ts} +12 -14
  61. package/lib/classes/promise.class.d.ts +7 -0
  62. package/{src/lib/classes/sectionlist.class.ts → lib/classes/sectionlist.class.d.ts} +8 -8
  63. package/lib/classes/select.class.d.ts +7 -0
  64. package/lib/core.module.d.ts +9 -0
  65. package/{src/lib/error/error.class.ts → lib/error/error.class.d.ts} +4 -4
  66. package/lib/error/error.module.d.ts +7 -0
  67. package/lib/error/error.service.d.ts +13 -0
  68. package/{src/lib/events/keyboard.ts → lib/events/keyboard.d.ts} +2 -5
  69. package/{src/lib/http/http-error.class.ts → lib/http/http-error.class.d.ts} +7 -7
  70. package/{src/lib/http/http-events.interceptor.ts → lib/http/http-events.interceptor.d.ts} +10 -14
  71. package/{src/lib/http/http-request.class.ts → lib/http/http-request.class.d.ts} +14 -14
  72. package/lib/http/http-result.class.d.ts +11 -0
  73. package/lib/http/http.module.d.ts +10 -0
  74. package/lib/http/http.service.d.ts +23 -0
  75. package/lib/pipe/datetime.pipe.d.ts +8 -0
  76. package/lib/pipe/htmlToText.pipe.d.ts +7 -0
  77. package/lib/platform/index.d.ts +1 -0
  78. package/lib/platform/platform.service.d.ts +26 -0
  79. package/lib/services/config.d.ts +9 -0
  80. package/lib/services/event.service.d.ts +9 -0
  81. package/lib/services/navigator.service.d.ts +8 -0
  82. package/lib/services/storage.service.d.ts +7 -0
  83. package/lib/translator/translator.d.ts +9 -0
  84. package/lib/translator/translator.module.d.ts +8 -0
  85. package/lib/translator/translator.pipe.d.ts +8 -0
  86. package/lib/translator/translator.service.d.ts +8 -0
  87. package/lib/utils/array/array-util.d.ts +6 -0
  88. package/lib/utils/html/html-util.d.ts +62 -0
  89. package/lib/utils/html/html.module.d.ts +8 -0
  90. package/lib/utils/math/math-util.d.ts +3 -0
  91. package/lib/utils/object/object-util.d.ts +7 -0
  92. package/lib/utils/render/on-demand-preload-strategy.service.d.ts +10 -0
  93. package/lib/utils/render/render.service.d.ts +18 -0
  94. package/lib/utils/render/rendering.module.d.ts +8 -0
  95. package/lib/utils/scroll/scroll.directive.d.ts +18 -0
  96. package/lib/utils/scroll/scroll.module.d.ts +8 -0
  97. package/lib/utils/separator/separator.module.d.ts +8 -0
  98. package/lib/utils/separator/separator.pipe.d.ts +8 -0
  99. package/package.json +33 -13
  100. package/{src/public-api.ts → public-api.d.ts} +43 -53
  101. package/karma.conf.js +0 -32
  102. package/ng-package.json +0 -10
  103. package/src/lib/classes/base-page.class.ts +0 -29
  104. package/src/lib/classes/color.class.ts +0 -61
  105. package/src/lib/classes/datetime.class.ts +0 -373
  106. package/src/lib/classes/menu.class.ts +0 -37
  107. package/src/lib/classes/promise.class.ts +0 -25
  108. package/src/lib/classes/select.class.ts +0 -7
  109. package/src/lib/core.module.ts +0 -21
  110. package/src/lib/error/error.module.ts +0 -13
  111. package/src/lib/error/error.service.ts +0 -23
  112. package/src/lib/error/index.ts +0 -3
  113. package/src/lib/http/http-result.class.ts +0 -34
  114. package/src/lib/http/http.module.ts +0 -25
  115. package/src/lib/http/http.service.ts +0 -159
  116. package/src/lib/pipe/datetime.pipe.ts +0 -20
  117. package/src/lib/pipe/htmlToText.pipe.ts +0 -18
  118. package/src/lib/platform/index.ts +0 -1
  119. package/src/lib/platform/platform.service.ts +0 -223
  120. package/src/lib/services/config.ts +0 -36
  121. package/src/lib/services/event.service.ts +0 -31
  122. package/src/lib/services/navigator.service.ts +0 -8
  123. package/src/lib/services/storage.service.ts +0 -11
  124. package/src/lib/translator/translator.module.ts +0 -19
  125. package/src/lib/translator/translator.pipe.ts +0 -22
  126. package/src/lib/translator/translator.service.ts +0 -19
  127. package/src/lib/translator/translator.ts +0 -31
  128. package/src/lib/utils/array/array-util.ts +0 -140
  129. package/src/lib/utils/html/html-util.ts +0 -264
  130. package/src/lib/utils/html/html.module.ts +0 -11
  131. package/src/lib/utils/math/math-util.ts +0 -5
  132. package/src/lib/utils/object/object-util.ts +0 -87
  133. package/src/lib/utils/render/on-demand-preload-strategy.service.ts +0 -25
  134. package/src/lib/utils/render/render.service.ts +0 -110
  135. package/src/lib/utils/render/rendering.module.ts +0 -25
  136. package/src/lib/utils/scroll/scroll.directive.ts +0 -35
  137. package/src/lib/utils/scroll/scroll.module.ts +0 -11
  138. package/src/lib/utils/separator/separator.module.ts +0 -11
  139. package/src/lib/utils/separator/separator.pipe.ts +0 -27
  140. package/src/test.ts +0 -28
  141. package/tsconfig.lib.json +0 -25
  142. package/tsconfig.lib.prod.json +0 -6
  143. package/tsconfig.spec.json +0 -18
  144. package/tslint.json +0 -17
@@ -1,35 +0,0 @@
1
- import { Directive, HostListener, Input } from '@angular/core';
2
- import { ElementRef } from '@angular/core';
3
-
4
- @Directive({
5
- // tslint:disable-next-line: directive-selector
6
- selector: '[horizontalScroll]'
7
- })
8
- export class AXHorizontalScrollDirective {
9
- constructor(private el: ElementRef<HTMLElement>) { }
10
-
11
- @Input('horizontalScroll')
12
- scrollValue = 40;
13
-
14
- @HostListener('wheel', ['$event'])
15
- onMouseWheel(e) {
16
- const delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail));
17
- this.el.nativeElement.scrollLeft -= delta * this.scrollValue;
18
- }
19
- }
20
- @Directive({
21
- // tslint:disable-next-line: directive-selector
22
- selector: '[verticalScroll]'
23
- })
24
- export class AXVerticalScrollDirective {
25
- constructor(private el: ElementRef<HTMLElement>) { }
26
-
27
- @Input('verticalScroll')
28
- scrollValue = 40;
29
-
30
- @HostListener('wheel', ['$event'])
31
- onMouseWheel(e) {
32
- const delta = Math.max(-1, Math.min(1, e.wheelDelta || -e.detail));
33
- this.el.nativeElement.scrollTop -= delta * this.scrollValue;
34
- }
35
- }
@@ -1,11 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { AXHorizontalScrollDirective, AXVerticalScrollDirective } from './scroll.directive';
4
-
5
- @NgModule({
6
- declarations: [AXHorizontalScrollDirective, AXVerticalScrollDirective],
7
- imports: [CommonModule],
8
- exports: [AXHorizontalScrollDirective, AXVerticalScrollDirective],
9
- providers: []
10
- })
11
- export class AXScrollModule { }
@@ -1,11 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule } from '@angular/common';
3
- import { AXSeparatorPipe } from './separator.pipe';
4
-
5
- @NgModule({
6
- declarations: [AXSeparatorPipe],
7
- imports: [CommonModule],
8
- exports: [AXSeparatorPipe],
9
- providers: []
10
- })
11
- export class AXSeparatorModule { }
@@ -1,27 +0,0 @@
1
- import { Pipe, PipeTransform, Injectable } from '@angular/core';
2
- import { AXConfig } from '../../services/config';
3
-
4
- @Pipe({ name: 'separator' })
5
- @Injectable({
6
- providedIn: 'root'
7
- })
8
-
9
- // export class AXSeparatorPipe2 implements PipeTransform {
10
- // transform(value: any) {
11
- // if (value) {
12
- // return value.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ',');
13
- // } else {
14
- // return '0';
15
- // }
16
- // }
17
- // }
18
- export class AXSeparatorPipe implements PipeTransform {
19
- transform(value: number | string, currency: string = '', decimal: number = 0, locale: string = AXConfig.get('layout.rtl') ? 'fa' : 'en'): string {
20
- return (
21
- new Intl.NumberFormat(locale, {
22
- minimumFractionDigits: 0,
23
- maximumFractionDigits: decimal
24
- }).format(Number(value)) + (currency != '' ? ' ' + currency : '')
25
- );
26
- }
27
- }
package/src/test.ts DELETED
@@ -1,28 +0,0 @@
1
- // This file is required by karma.conf.js and loads recursively all the .spec and framework files
2
-
3
- import 'zone.js';
4
- import 'zone.js/testing';
5
- import { getTestBed } from '@angular/core/testing';
6
- import {
7
- BrowserDynamicTestingModule,
8
- platformBrowserDynamicTesting
9
- } from '@angular/platform-browser-dynamic/testing';
10
-
11
- declare const require: {
12
- context(path: string, deep?: boolean, filter?: RegExp): {
13
- keys(): string[];
14
- <T>(id: string): T;
15
- };
16
- };
17
-
18
- // First, initialize the Angular testing environment.
19
- getTestBed().initTestEnvironment(
20
- BrowserDynamicTestingModule,
21
- platformBrowserDynamicTesting(), {
22
- teardown: { destroyAfterEach: false }
23
- }
24
- );
25
- // Then we find all the tests.
26
- const context = require.context('./', true, /\.spec\.ts$/);
27
- // And load the modules.
28
- context.keys().map(context);
package/tsconfig.lib.json DELETED
@@ -1,25 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "compilerOptions": {
4
- "allowSyntheticDefaultImports": true,
5
- "outDir": "../../../out-tsc/lib",
6
- "target": "es2015",
7
- "declaration": true,
8
- "inlineSources": true,
9
- "esModuleInterop": true,
10
- "types": [],
11
- "lib": [
12
- "dom",
13
- "es2018"
14
- ]
15
- },
16
- "angularCompilerOptions": {
17
- "skipTemplateCodegen": true,
18
- "strictMetadataEmit": true,
19
- "enableResourceInlining": true
20
- },
21
- "exclude": [
22
- "src/test.ts",
23
- "**/*.spec.ts"
24
- ]
25
- }
@@ -1,6 +0,0 @@
1
- {
2
- "extends": "./tsconfig.lib.json",
3
- "angularCompilerOptions": {
4
- "enableIvy": false
5
- }
6
- }
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "../../../tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../../out-tsc/spec",
5
- "types": [
6
- "jasmine",
7
- "node"
8
- ],
9
- "resolveJsonModule":true
10
- },
11
- "files": [
12
- "src/test.ts"
13
- ],
14
- "include": [
15
- "**/*.spec.ts",
16
- "**/*.d.ts"
17
- ]
18
- }
package/tslint.json DELETED
@@ -1,17 +0,0 @@
1
- {
2
- "extends": "../../../tslint.json",
3
- "rules": {
4
- "directive-selector": [
5
- true,
6
- "attribute",
7
- "lib",
8
- "camelCase"
9
- ],
10
- "component-selector": [
11
- true,
12
- "element",
13
- "lib",
14
- "kebab-case"
15
- ]
16
- }
17
- }