@acorex/core 6.0.1 → 6.0.7

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 (170) hide show
  1. package/README.md +24 -24
  2. package/config/index.d.ts +5 -0
  3. package/config/public-api.d.ts +1 -0
  4. package/config/src/configs.d.ts +9 -0
  5. package/dateTime/index.d.ts +5 -0
  6. package/dateTime/{public-api.ts → public-api.d.ts} +1 -1
  7. package/dateTime/src/datetime.class.d.ts +100 -0
  8. package/dateTime/src/datetime.module.d.ts +8 -0
  9. package/dateTime/src/datetime.pipe.d.ts +8 -0
  10. package/dateTime/src/georgian.calendar.d.ts +20 -0
  11. package/dateTime/src/jalali.calendar.d.ts +35 -0
  12. package/esm2020/acorex-core.mjs +5 -0
  13. package/esm2020/config/acorex-core-config.mjs +5 -0
  14. package/esm2020/config/public-api.mjs +2 -0
  15. package/esm2020/config/src/configs.mjs +32 -0
  16. package/esm2020/dateTime/acorex-core-dateTime.mjs +5 -0
  17. package/esm2020/dateTime/public-api.mjs +6 -0
  18. package/esm2020/dateTime/src/datetime.class.mjs +296 -0
  19. package/esm2020/dateTime/src/datetime.module.mjs +33 -0
  20. package/esm2020/dateTime/src/datetime.pipe.mjs +26 -0
  21. package/esm2020/dateTime/src/georgian.calendar.mjs +189 -0
  22. package/esm2020/dateTime/src/jalali.calendar.mjs +359 -0
  23. package/esm2020/events/acorex-core-events.mjs +5 -0
  24. package/esm2020/events/public-api.mjs +2 -0
  25. package/esm2020/events/src/event.service.mjs +36 -0
  26. package/esm2020/http/acorex-core-http.mjs +5 -0
  27. package/esm2020/http/public-api.mjs +6 -0
  28. package/esm2020/http/src/http-error.class.mjs +2 -0
  29. package/esm2020/http/src/http-events.interceptor.mjs +3 -0
  30. package/esm2020/http/src/http-request.class.mjs +2 -0
  31. package/esm2020/http/src/http-result.class.mjs +21 -0
  32. package/esm2020/http/src/http.module.mjs +29 -0
  33. package/esm2020/http/src/http.service.mjs +147 -0
  34. package/esm2020/pipes/acorex-core-pipes.mjs +5 -0
  35. package/esm2020/pipes/public-api.mjs +3 -0
  36. package/esm2020/pipes/src/pipes.module.mjs +19 -0
  37. package/esm2020/pipes/src/safe.pipe.mjs +30 -0
  38. package/esm2020/platform/acorex-core-platform.mjs +5 -0
  39. package/esm2020/platform/public-api.mjs +2 -0
  40. package/esm2020/platform/src/platform.service.mjs +141 -0
  41. package/esm2020/public-api.mjs +5 -0
  42. package/esm2020/translation/acorex-core-translation.mjs +5 -0
  43. package/esm2020/translation/public-api.mjs +4 -0
  44. package/esm2020/translation/src/translation.module.mjs +18 -0
  45. package/esm2020/translation/src/translator.mjs +43 -0
  46. package/esm2020/translation/src/translator.pipe.mjs +15 -0
  47. package/esm2020/utils/acorex-core-utils.mjs +5 -0
  48. package/esm2020/utils/public-api.mjs +5 -0
  49. package/esm2020/utils/src/color-util.mjs +71 -0
  50. package/esm2020/utils/src/drawing-util.mjs +27 -0
  51. package/esm2020/utils/src/object-util.mjs +39 -0
  52. package/esm2020/utils/src/string-util.mjs +19 -0
  53. package/events/index.d.ts +5 -0
  54. package/events/public-api.d.ts +1 -0
  55. package/events/src/event.service.d.ts +9 -0
  56. package/fesm2015/acorex-core-config.mjs +39 -0
  57. package/fesm2015/acorex-core-config.mjs.map +1 -0
  58. package/fesm2015/acorex-core-dateTime.mjs +900 -0
  59. package/fesm2015/acorex-core-dateTime.mjs.map +1 -0
  60. package/fesm2015/acorex-core-events.mjs +43 -0
  61. package/fesm2015/acorex-core-events.mjs.map +1 -0
  62. package/fesm2015/acorex-core-http.mjs +201 -0
  63. package/fesm2015/acorex-core-http.mjs.map +1 -0
  64. package/fesm2015/acorex-core-pipes.mjs +53 -0
  65. package/fesm2015/acorex-core-pipes.mjs.map +1 -0
  66. package/fesm2015/acorex-core-platform.mjs +148 -0
  67. package/fesm2015/acorex-core-platform.mjs.map +1 -0
  68. package/fesm2015/acorex-core-translation.mjs +80 -0
  69. package/fesm2015/acorex-core-translation.mjs.map +1 -0
  70. package/fesm2015/acorex-core-utils.mjs +163 -0
  71. package/fesm2015/acorex-core-utils.mjs.map +1 -0
  72. package/fesm2015/acorex-core.mjs +11 -0
  73. package/fesm2015/acorex-core.mjs.map +1 -0
  74. package/fesm2020/acorex-core-config.mjs +39 -0
  75. package/fesm2020/acorex-core-config.mjs.map +1 -0
  76. package/fesm2020/acorex-core-dateTime.mjs +900 -0
  77. package/fesm2020/acorex-core-dateTime.mjs.map +1 -0
  78. package/fesm2020/acorex-core-events.mjs +43 -0
  79. package/fesm2020/acorex-core-events.mjs.map +1 -0
  80. package/fesm2020/acorex-core-http.mjs +200 -0
  81. package/fesm2020/acorex-core-http.mjs.map +1 -0
  82. package/fesm2020/acorex-core-pipes.mjs +53 -0
  83. package/fesm2020/acorex-core-pipes.mjs.map +1 -0
  84. package/fesm2020/acorex-core-platform.mjs +148 -0
  85. package/fesm2020/acorex-core-platform.mjs.map +1 -0
  86. package/fesm2020/acorex-core-translation.mjs +79 -0
  87. package/fesm2020/acorex-core-translation.mjs.map +1 -0
  88. package/fesm2020/acorex-core-utils.mjs +163 -0
  89. package/fesm2020/acorex-core-utils.mjs.map +1 -0
  90. package/fesm2020/acorex-core.mjs +11 -0
  91. package/fesm2020/acorex-core.mjs.map +1 -0
  92. package/http/index.d.ts +5 -0
  93. package/http/{public-api.ts → public-api.d.ts} +1 -1
  94. package/http/src/{http-error.class.ts → http-error.class.d.ts} +2 -2
  95. package/http/src/{http-events.interceptor.ts → http-events.interceptor.d.ts} +3 -7
  96. package/http/src/{http-request.class.ts → http-request.class.d.ts} +5 -5
  97. package/http/src/http-result.class.d.ts +11 -0
  98. package/http/src/http.module.d.ts +8 -0
  99. package/http/src/http.service.d.ts +23 -0
  100. package/index.d.ts +5 -0
  101. package/package.json +106 -23
  102. package/pipes/index.d.ts +5 -0
  103. package/pipes/public-api.d.ts +2 -0
  104. package/pipes/src/pipes.module.d.ts +8 -0
  105. package/pipes/src/safe.pipe.d.ts +10 -0
  106. package/platform/index.d.ts +5 -0
  107. package/platform/public-api.d.ts +1 -0
  108. package/platform/src/platform.service.d.ts +25 -0
  109. package/public-api.d.ts +1 -0
  110. package/translation/index.d.ts +5 -0
  111. package/translation/{public-api.ts → public-api.d.ts} +1 -1
  112. package/translation/src/translation.module.d.ts +7 -0
  113. package/translation/src/translator.d.ts +11 -0
  114. package/translation/src/translator.pipe.d.ts +7 -0
  115. package/utils/index.d.ts +5 -0
  116. package/utils/{public-api.ts → public-api.d.ts} +1 -1
  117. package/utils/src/color-util.d.ts +20 -0
  118. package/utils/src/drawing-util.d.ts +17 -0
  119. package/utils/src/object-util.d.ts +4 -0
  120. package/utils/src/string-util.d.ts +6 -0
  121. package/.browserslistrc +0 -16
  122. package/config/ax-preset.js +0 -186
  123. package/config/index.ts +0 -1
  124. package/config/ng-package.json +0 -6
  125. package/config/public-api.ts +0 -1
  126. package/config/src/configs.ts +0 -37
  127. package/dateTime/index.ts +0 -1
  128. package/dateTime/ng-package.json +0 -6
  129. package/dateTime/src/datetime.class.ts +0 -452
  130. package/dateTime/src/datetime.module.ts +0 -29
  131. package/dateTime/src/datetime.pipe.ts +0 -21
  132. package/dateTime/src/georgian.calendar.ts +0 -205
  133. package/dateTime/src/jalali.calendar.ts +0 -416
  134. package/events/index.ts +0 -1
  135. package/events/ng-package.json +0 -6
  136. package/events/public-api.ts +0 -1
  137. package/events/src/event.service.ts +0 -31
  138. package/http/index.ts +0 -1
  139. package/http/ng-package.json +0 -6
  140. package/http/src/http-result.class.ts +0 -34
  141. package/http/src/http.module.ts +0 -25
  142. package/http/src/http.service.ts +0 -161
  143. package/index.ts +0 -1
  144. package/karma.conf.js +0 -44
  145. package/ng-package.json +0 -7
  146. package/pipes/index.ts +0 -1
  147. package/pipes/ng-package.json +0 -6
  148. package/pipes/public-api.ts +0 -2
  149. package/pipes/src/pipes.module.ts +0 -11
  150. package/pipes/src/safe.pipe.ts +0 -24
  151. package/platform/index.ts +0 -1
  152. package/platform/ng-package.json +0 -6
  153. package/platform/public-api.ts +0 -1
  154. package/platform/src/platform.service.ts +0 -207
  155. package/public-api.ts +0 -4
  156. package/test.ts +0 -27
  157. package/translation/index.ts +0 -1
  158. package/translation/ng-package.json +0 -6
  159. package/translation/src/translation.module.ts +0 -12
  160. package/translation/src/translator.pipe.ts +0 -9
  161. package/translation/src/translator.ts +0 -49
  162. package/tsconfig.lib.json +0 -15
  163. package/tsconfig.lib.prod.json +0 -10
  164. package/tsconfig.spec.json +0 -17
  165. package/utils/index.ts +0 -1
  166. package/utils/ng-package.json +0 -6
  167. package/utils/src/color-util.ts +0 -83
  168. package/utils/src/drawing-util.ts +0 -43
  169. package/utils/src/object-util.ts +0 -82
  170. package/utils/src/string-util.ts +0 -25
@@ -1,82 +0,0 @@
1
- // @dynamic
2
- export class AXObjectUtil {
3
- static deepJSONClone(obj: any): any {
4
- return obj ? JSON.parse(JSON.stringify(obj)) : null;
5
- }
6
-
7
- static deepCopy(obj) {
8
- let copy;
9
- // Handle the 3 simple types, and null or undefined
10
- if (null == obj || 'object' !== typeof obj) { return obj; }
11
- // Handle Date
12
- if (obj instanceof Date) {
13
- copy = new Date();
14
- copy.setTime(obj.getTime());
15
- return copy;
16
- }
17
- // Handle Array
18
- if (obj instanceof Array) {
19
- copy = [];
20
- for (let i = 0, len = obj.length; i < len; i++) {
21
- copy[i] = AXObjectUtil.deepCopy(obj[i]);
22
- }
23
- return copy;
24
- }
25
- // Handle Object
26
- if (obj instanceof Object) {
27
- copy = {};
28
- for (const attr in obj) {
29
- if (obj.hasOwnProperty(attr)) { copy[attr] = AXObjectUtil.deepCopy(obj[attr]); }
30
- }
31
- return copy;
32
- }
33
- throw new Error('Unable to copy obj! Its type isn\'t supported.');
34
- }
35
-
36
- // static fetchProp(obj, prop: string) {
37
- // if (typeof obj === 'undefined') {
38
- // return false;
39
- // }
40
- // const index = prop.indexOf('.');
41
-
42
- // if (index > -1) {
43
- // return AXObjectUtil.fetchProp(obj[prop.substring(0, index)], prop.substr(index + 1));
44
- // }
45
-
46
- // return obj[prop];
47
- // }
48
-
49
- // static getPropByPath(obj, path, defaultVal?) {
50
- // path = path
51
- // .replace(/\[/g, '.')
52
- // .replace(/]/g, '')
53
- // .split('.');
54
-
55
- // path.forEach((level) => {
56
- // if (obj) {
57
- // obj = obj[level];
58
- // }
59
- // });
60
-
61
- // if (obj === undefined) {
62
- // return defaultVal;
63
- // }
64
- // return obj;
65
- // }
66
-
67
- // static setPropByPath(obj, path, value) {
68
- // if (Object(obj) !== obj) { return obj; } // When obj is not an object
69
- // // If not yet an array, get the keys from the string-path
70
- // if (!Array.isArray(path)) { path = path.toString().match(/[^.[\]]+/g) || []; }
71
- // path.slice(0, -1).reduce((a, c, i) => // Iterate all of them except the last one
72
- // Object(a[c]) === a[c] // Does the key exist and is its value an object?
73
- // // Yes: then follow that path
74
- // ? a[c]
75
- // // No: create the key. Is the next key a potential array-index?
76
- // : a[c] = Math.abs(path[i + 1]) >> 0 === +path[i + 1]
77
- // ? [] // Yes: assign a new array object
78
- // : {}, // No: assign a new plain object
79
- // obj)[path[path.length - 1]] = value; // Finally assign the value to the last key
80
- // return obj; // Return the top-level object to allow chaining
81
- // }
82
- }
@@ -1,25 +0,0 @@
1
- // @dynamic
2
- export class AXStringUtil {
3
-
4
- static getWordBoundsAtPosition(str: string, position: number): { start: number, end: number } {
5
- const isSpace = (c) => /[^a-zA-Z0-9]+/i.test(c);
6
- let start = position - 1;
7
-
8
- while (start >= 0 && !isSpace(str[start])) {
9
- start -= 1;
10
- }
11
- start = Math.max(0, start + 1);
12
- const leftSideString:any = str.slice(start).match(/[a-zA-Z0-9]+/i);
13
- start += leftSideString.index;
14
- let end = start + leftSideString[0].length;
15
- return {
16
- start,
17
- end
18
- };
19
- }
20
-
21
-
22
-
23
-
24
-
25
- }