@adaas/a-concept 0.1.23 → 0.1.25

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 (234) hide show
  1. package/dist/index.cjs +3 -0
  2. package/dist/index.cjs.map +1 -0
  3. package/dist/index.d.mts +3952 -0
  4. package/dist/index.d.ts +3952 -50
  5. package/dist/index.mjs +3 -0
  6. package/dist/index.mjs.map +1 -0
  7. package/package.json +5 -6
  8. package/src/global/A-Abstraction/A-Abstraction-Extend.decorator.ts +18 -13
  9. package/src/global/A-Component/A-Component.meta.ts +3 -2
  10. package/src/global/A-Container/A-Container.meta.ts +5 -8
  11. package/src/global/A-Context/A-Context.class.ts +81 -7
  12. package/src/global/A-Context/A-Context.error.ts +4 -0
  13. package/src/global/A-Dependency/A-Dependency-Default.decorator.ts +75 -0
  14. package/src/global/A-Dependency/A-Dependency-Load.decorator.ts +80 -0
  15. package/src/global/A-Dependency/A-Dependency-Require.decorator.ts +68 -0
  16. package/src/global/A-Dependency/A-Dependency.class.ts +33 -0
  17. package/src/global/A-Dependency/A-Dependency.error.ts +13 -0
  18. package/src/global/A-Dependency/A-Dependency.types.ts +28 -0
  19. package/src/global/A-Entity/A-Entity.class.ts +2 -1
  20. package/src/global/A-Feature/A-Feature-Define.decorator.ts +7 -4
  21. package/src/global/A-Feature/A-Feature-Extend.decorator.ts +23 -17
  22. package/src/global/A-Feature/A-Feature.class.ts +12 -1
  23. package/src/global/A-Feature/A-Feature.types.ts +33 -8
  24. package/src/global/A-Inject/A-Inject.decorator.ts +4 -2
  25. package/src/global/A-Inject/A-Inject.types.ts +5 -3
  26. package/src/global/A-Scope/A-Scope.class.ts +85 -57
  27. package/src/global/A-Stage/A-Stage.class.ts +22 -2
  28. package/src/global/A-Stage/A-Stage.error.ts +2 -0
  29. package/src/global/A-Stage/A-Stage.types.ts +7 -2
  30. package/src/global/A-StepManager/A-StepManager.class.ts +19 -13
  31. package/src/helpers/A_Common.helper.ts +101 -0
  32. package/src/helpers/A_TypeGuards.helper.ts +8 -0
  33. package/src/index.ts +88 -0
  34. package/tests/A-Component.test.ts +1 -1
  35. package/tests/A-Concept.test.ts +58 -10
  36. package/tests/A-Dependency.test.ts +93 -0
  37. package/tests/A-Feature.test.ts +11 -11
  38. package/tests/A-Scope.test.ts +10 -10
  39. package/tests/A-StepManager.test.ts +60 -11
  40. package/tsconfig.json +2 -2
  41. package/tsup.config.ts +32 -0
  42. package/dist/index.js +0 -112
  43. package/dist/index.js.map +0 -1
  44. package/dist/src/constants/env.constants.d.ts +0 -33
  45. package/dist/src/constants/env.constants.js +0 -47
  46. package/dist/src/constants/env.constants.js.map +0 -1
  47. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.d.ts +0 -23
  48. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js +0 -89
  49. package/dist/src/global/A-Abstraction/A-Abstraction-Extend.decorator.js.map +0 -1
  50. package/dist/src/global/A-Abstraction/A-Abstraction.class.d.ts +0 -74
  51. package/dist/src/global/A-Abstraction/A-Abstraction.class.js +0 -130
  52. package/dist/src/global/A-Abstraction/A-Abstraction.class.js.map +0 -1
  53. package/dist/src/global/A-Abstraction/A-Abstraction.error.d.ts +0 -7
  54. package/dist/src/global/A-Abstraction/A-Abstraction.error.js +0 -12
  55. package/dist/src/global/A-Abstraction/A-Abstraction.error.js.map +0 -1
  56. package/dist/src/global/A-Abstraction/A-Abstraction.types.d.ts +0 -38
  57. package/dist/src/global/A-Abstraction/A-Abstraction.types.js +0 -3
  58. package/dist/src/global/A-Abstraction/A-Abstraction.types.js.map +0 -1
  59. package/dist/src/global/A-Caller/A_Caller.class.d.ts +0 -33
  60. package/dist/src/global/A-Caller/A_Caller.class.js +0 -44
  61. package/dist/src/global/A-Caller/A_Caller.class.js.map +0 -1
  62. package/dist/src/global/A-Caller/A_Caller.error.d.ts +0 -7
  63. package/dist/src/global/A-Caller/A_Caller.error.js +0 -12
  64. package/dist/src/global/A-Caller/A_Caller.error.js.map +0 -1
  65. package/dist/src/global/A-Caller/A_Caller.types.d.ts +0 -18
  66. package/dist/src/global/A-Caller/A_Caller.types.js +0 -3
  67. package/dist/src/global/A-Caller/A_Caller.types.js.map +0 -1
  68. package/dist/src/global/A-Component/A-Component.class.d.ts +0 -34
  69. package/dist/src/global/A-Component/A-Component.class.js +0 -56
  70. package/dist/src/global/A-Component/A-Component.class.js.map +0 -1
  71. package/dist/src/global/A-Component/A-Component.constants.d.ts +0 -6
  72. package/dist/src/global/A-Component/A-Component.constants.js +0 -11
  73. package/dist/src/global/A-Component/A-Component.constants.js.map +0 -1
  74. package/dist/src/global/A-Component/A-Component.meta.d.ts +0 -34
  75. package/dist/src/global/A-Component/A-Component.meta.js +0 -77
  76. package/dist/src/global/A-Component/A-Component.meta.js.map +0 -1
  77. package/dist/src/global/A-Component/A-Component.types.d.ts +0 -76
  78. package/dist/src/global/A-Component/A-Component.types.js +0 -4
  79. package/dist/src/global/A-Component/A-Component.types.js.map +0 -1
  80. package/dist/src/global/A-Concept/A-Concept.class.d.ts +0 -153
  81. package/dist/src/global/A-Concept/A-Concept.class.js +0 -260
  82. package/dist/src/global/A-Concept/A-Concept.class.js.map +0 -1
  83. package/dist/src/global/A-Concept/A-Concept.constants.d.ts +0 -33
  84. package/dist/src/global/A-Concept/A-Concept.constants.js +0 -39
  85. package/dist/src/global/A-Concept/A-Concept.constants.js.map +0 -1
  86. package/dist/src/global/A-Concept/A-Concept.meta.d.ts +0 -6
  87. package/dist/src/global/A-Concept/A-Concept.meta.js +0 -12
  88. package/dist/src/global/A-Concept/A-Concept.meta.js.map +0 -1
  89. package/dist/src/global/A-Concept/A-Concept.types.d.ts +0 -66
  90. package/dist/src/global/A-Concept/A-Concept.types.js +0 -3
  91. package/dist/src/global/A-Concept/A-Concept.types.js.map +0 -1
  92. package/dist/src/global/A-Container/A-Container.class.d.ts +0 -52
  93. package/dist/src/global/A-Container/A-Container.class.js +0 -78
  94. package/dist/src/global/A-Container/A-Container.class.js.map +0 -1
  95. package/dist/src/global/A-Container/A-Container.constants.d.ts +0 -6
  96. package/dist/src/global/A-Container/A-Container.constants.js +0 -11
  97. package/dist/src/global/A-Container/A-Container.constants.js.map +0 -1
  98. package/dist/src/global/A-Container/A-Container.meta.d.ts +0 -35
  99. package/dist/src/global/A-Container/A-Container.meta.js +0 -83
  100. package/dist/src/global/A-Container/A-Container.meta.js.map +0 -1
  101. package/dist/src/global/A-Container/A-Container.types.d.ts +0 -75
  102. package/dist/src/global/A-Container/A-Container.types.js +0 -4
  103. package/dist/src/global/A-Container/A-Container.types.js.map +0 -1
  104. package/dist/src/global/A-Context/A-Context.class.d.ts +0 -361
  105. package/dist/src/global/A-Context/A-Context.class.js +0 -603
  106. package/dist/src/global/A-Context/A-Context.class.js.map +0 -1
  107. package/dist/src/global/A-Context/A-Context.error.d.ts +0 -20
  108. package/dist/src/global/A-Context/A-Context.error.js +0 -25
  109. package/dist/src/global/A-Context/A-Context.error.js.map +0 -1
  110. package/dist/src/global/A-Context/A-Context.types.d.ts +0 -5
  111. package/dist/src/global/A-Context/A-Context.types.js +0 -3
  112. package/dist/src/global/A-Context/A-Context.types.js.map +0 -1
  113. package/dist/src/global/A-Dependency/A-DependencyReference.class.d.ts +0 -0
  114. package/dist/src/global/A-Dependency/A-DependencyReference.class.js +0 -49
  115. package/dist/src/global/A-Dependency/A-DependencyReference.class.js.map +0 -1
  116. package/dist/src/global/A-Dependency/A-DependencyReference.types.d.ts +0 -0
  117. package/dist/src/global/A-Dependency/A-DependencyReference.types.js +0 -58
  118. package/dist/src/global/A-Dependency/A-DependencyReference.types.js.map +0 -1
  119. package/dist/src/global/A-Entity/A-Entity.class.d.ts +0 -214
  120. package/dist/src/global/A-Entity/A-Entity.class.js +0 -281
  121. package/dist/src/global/A-Entity/A-Entity.class.js.map +0 -1
  122. package/dist/src/global/A-Entity/A-Entity.constants.d.ts +0 -11
  123. package/dist/src/global/A-Entity/A-Entity.constants.js +0 -17
  124. package/dist/src/global/A-Entity/A-Entity.constants.js.map +0 -1
  125. package/dist/src/global/A-Entity/A-Entity.error.d.ts +0 -7
  126. package/dist/src/global/A-Entity/A-Entity.error.js +0 -12
  127. package/dist/src/global/A-Entity/A-Entity.error.js.map +0 -1
  128. package/dist/src/global/A-Entity/A-Entity.meta.d.ts +0 -11
  129. package/dist/src/global/A-Entity/A-Entity.meta.js +0 -18
  130. package/dist/src/global/A-Entity/A-Entity.meta.js.map +0 -1
  131. package/dist/src/global/A-Entity/A-Entity.types.d.ts +0 -56
  132. package/dist/src/global/A-Entity/A-Entity.types.js +0 -5
  133. package/dist/src/global/A-Entity/A-Entity.types.js.map +0 -1
  134. package/dist/src/global/A-Error/A_Error.class.d.ts +0 -229
  135. package/dist/src/global/A-Error/A_Error.class.js +0 -296
  136. package/dist/src/global/A-Error/A_Error.class.js.map +0 -1
  137. package/dist/src/global/A-Error/A_Error.constants.d.ts +0 -5
  138. package/dist/src/global/A-Error/A_Error.constants.js +0 -9
  139. package/dist/src/global/A-Error/A_Error.constants.js.map +0 -1
  140. package/dist/src/global/A-Error/A_Error.types.d.ts +0 -93
  141. package/dist/src/global/A-Error/A_Error.types.js +0 -3
  142. package/dist/src/global/A-Error/A_Error.types.js.map +0 -1
  143. package/dist/src/global/A-Feature/A-Feature-Define.decorator.d.ts +0 -15
  144. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js +0 -76
  145. package/dist/src/global/A-Feature/A-Feature-Define.decorator.js.map +0 -1
  146. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.d.ts +0 -56
  147. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js +0 -119
  148. package/dist/src/global/A-Feature/A-Feature-Extend.decorator.js.map +0 -1
  149. package/dist/src/global/A-Feature/A-Feature.class.d.ts +0 -175
  150. package/dist/src/global/A-Feature/A-Feature.class.js +0 -318
  151. package/dist/src/global/A-Feature/A-Feature.class.js.map +0 -1
  152. package/dist/src/global/A-Feature/A-Feature.error.d.ts +0 -25
  153. package/dist/src/global/A-Feature/A-Feature.error.js +0 -33
  154. package/dist/src/global/A-Feature/A-Feature.error.js.map +0 -1
  155. package/dist/src/global/A-Feature/A-Feature.types.d.ts +0 -310
  156. package/dist/src/global/A-Feature/A-Feature.types.js +0 -26
  157. package/dist/src/global/A-Feature/A-Feature.types.js.map +0 -1
  158. package/dist/src/global/A-Fragment/A-Fragment.class.d.ts +0 -36
  159. package/dist/src/global/A-Fragment/A-Fragment.class.js +0 -46
  160. package/dist/src/global/A-Fragment/A-Fragment.class.js.map +0 -1
  161. package/dist/src/global/A-Fragment/A-Fragment.types.d.ts +0 -21
  162. package/dist/src/global/A-Fragment/A-Fragment.types.js +0 -6
  163. package/dist/src/global/A-Fragment/A-Fragment.types.js.map +0 -1
  164. package/dist/src/global/A-Inject/A-Inject.decorator.d.ts +0 -80
  165. package/dist/src/global/A-Inject/A-Inject.decorator.js +0 -49
  166. package/dist/src/global/A-Inject/A-Inject.decorator.js.map +0 -1
  167. package/dist/src/global/A-Inject/A-Inject.error.d.ts +0 -5
  168. package/dist/src/global/A-Inject/A-Inject.error.js +0 -10
  169. package/dist/src/global/A-Inject/A-Inject.error.js.map +0 -1
  170. package/dist/src/global/A-Inject/A-Inject.types.d.ts +0 -42
  171. package/dist/src/global/A-Inject/A-Inject.types.js +0 -3
  172. package/dist/src/global/A-Inject/A-Inject.types.js.map +0 -1
  173. package/dist/src/global/A-Meta/A-Meta.class.d.ts +0 -97
  174. package/dist/src/global/A-Meta/A-Meta.class.js +0 -164
  175. package/dist/src/global/A-Meta/A-Meta.class.js.map +0 -1
  176. package/dist/src/global/A-Meta/A-Meta.types.d.ts +0 -14
  177. package/dist/src/global/A-Meta/A-Meta.types.js +0 -3
  178. package/dist/src/global/A-Meta/A-Meta.types.js.map +0 -1
  179. package/dist/src/global/A-Scope/A-Scope.class.d.ts +0 -466
  180. package/dist/src/global/A-Scope/A-Scope.class.js +0 -791
  181. package/dist/src/global/A-Scope/A-Scope.class.js.map +0 -1
  182. package/dist/src/global/A-Scope/A-Scope.error.d.ts +0 -8
  183. package/dist/src/global/A-Scope/A-Scope.error.js +0 -13
  184. package/dist/src/global/A-Scope/A-Scope.error.js.map +0 -1
  185. package/dist/src/global/A-Scope/A-Scope.types.d.ts +0 -81
  186. package/dist/src/global/A-Scope/A-Scope.types.js +0 -3
  187. package/dist/src/global/A-Scope/A-Scope.types.js.map +0 -1
  188. package/dist/src/global/A-Stage/A-Stage.class.d.ts +0 -112
  189. package/dist/src/global/A-Stage/A-Stage.class.js +0 -240
  190. package/dist/src/global/A-Stage/A-Stage.class.js.map +0 -1
  191. package/dist/src/global/A-Stage/A-Stage.error.d.ts +0 -4
  192. package/dist/src/global/A-Stage/A-Stage.error.js +0 -11
  193. package/dist/src/global/A-Stage/A-Stage.error.js.map +0 -1
  194. package/dist/src/global/A-Stage/A-Stage.types.d.ts +0 -97
  195. package/dist/src/global/A-Stage/A-Stage.types.js +0 -43
  196. package/dist/src/global/A-Stage/A-Stage.types.js.map +0 -1
  197. package/dist/src/global/A-StepManager/A-StepManager.class.d.ts +0 -20
  198. package/dist/src/global/A-StepManager/A-StepManager.class.js +0 -111
  199. package/dist/src/global/A-StepManager/A-StepManager.class.js.map +0 -1
  200. package/dist/src/global/A-StepManager/A-StepManager.error.d.ts +0 -4
  201. package/dist/src/global/A-StepManager/A-StepManager.error.js +0 -9
  202. package/dist/src/global/A-StepManager/A-StepManager.error.js.map +0 -1
  203. package/dist/src/global/ASEID/ASEID.class.d.ts +0 -130
  204. package/dist/src/global/ASEID/ASEID.class.js +0 -167
  205. package/dist/src/global/ASEID/ASEID.class.js.map +0 -1
  206. package/dist/src/global/ASEID/ASEID.constants.d.ts +0 -0
  207. package/dist/src/global/ASEID/ASEID.constants.js +0 -2
  208. package/dist/src/global/ASEID/ASEID.constants.js.map +0 -1
  209. package/dist/src/global/ASEID/ASEID.error.d.ts +0 -5
  210. package/dist/src/global/ASEID/ASEID.error.js +0 -10
  211. package/dist/src/global/ASEID/ASEID.error.js.map +0 -1
  212. package/dist/src/global/ASEID/ASEID.types.d.ts +0 -65
  213. package/dist/src/global/ASEID/ASEID.types.js +0 -5
  214. package/dist/src/global/ASEID/ASEID.types.js.map +0 -1
  215. package/dist/src/helpers/A_Common.helper.d.ts +0 -28
  216. package/dist/src/helpers/A_Common.helper.js +0 -170
  217. package/dist/src/helpers/A_Common.helper.js.map +0 -1
  218. package/dist/src/helpers/A_Formatter.helper.d.ts +0 -35
  219. package/dist/src/helpers/A_Formatter.helper.js +0 -62
  220. package/dist/src/helpers/A_Formatter.helper.js.map +0 -1
  221. package/dist/src/helpers/A_Identity.helper.d.ts +0 -29
  222. package/dist/src/helpers/A_Identity.helper.js +0 -43
  223. package/dist/src/helpers/A_Identity.helper.js.map +0 -1
  224. package/dist/src/helpers/A_TypeGuards.helper.d.ts +0 -207
  225. package/dist/src/helpers/A_TypeGuards.helper.js +0 -296
  226. package/dist/src/helpers/A_TypeGuards.helper.js.map +0 -1
  227. package/dist/src/types/A_Common.types.d.ts +0 -36
  228. package/dist/src/types/A_Common.types.js +0 -3
  229. package/dist/src/types/A_Common.types.js.map +0 -1
  230. package/index.ts +0 -81
  231. package/src/global/A-Dependency/A-DependencyReference.class.ts +0 -61
  232. package/src/global/A-Dependency/A-DependencyReference.types.ts +0 -61
  233. package/trace-require.js +0 -46
  234. package/tsconfig.build.json +0 -58
@@ -1,42 +0,0 @@
1
- import { A_TYPES__Component_Constructor } from "../A-Component/A-Component.types";
2
- import { A_TYPES__Container_Constructor } from "../A-Container/A-Container.types";
3
- import { A_Entity } from "../A-Entity/A-Entity.class";
4
- import { A_TYPES__Entity_Constructor } from "../A-Entity/A-Entity.types";
5
- import { A_TYPES__Feature_Constructor } from "../A-Feature/A-Feature.types";
6
- import { A_TYPES__Fragment_Constructor } from "../A-Fragment/A-Fragment.types";
7
- import { A_TYPES__Caller_Constructor } from "../A-Caller/A_Caller.types";
8
- /**
9
- * A-Inject decorator descriptor type
10
- * Indicates the type of the decorator function
11
- */
12
- export type A_TYPES__A_InjectDecoratorDescriptor = TypedPropertyDescriptor<(...args: any[]) => Promise<void>>;
13
- /**
14
- * A-Inject decorator return type
15
- * Indicates what the decorator function returns
16
- */
17
- export type A_TYPES__A_InjectDecoratorReturn<T = any> = (target: T, propertyKey: string | symbol | undefined, parameterIndex: number) => void;
18
- export type A_TYPES__A_InjectDecorator_Meta = Array<{
19
- target: A_TYPES__InjectableConstructors;
20
- } | {
21
- target: A_TYPES__Entity_Constructor;
22
- instructions: Partial<A_TYPES__A_InjectDecorator_EntityInjectionInstructions>;
23
- }>;
24
- /**
25
- * Targets that can be injected into Extended functions or constructors
26
- *
27
- */
28
- export type A_TYPES__InjectableTargets = A_TYPES__Component_Constructor | InstanceType<A_TYPES__Component_Constructor> | InstanceType<A_TYPES__Container_Constructor>;
29
- export type A_TYPES__InjectableConstructors = A_TYPES__Component_Constructor | A_TYPES__Container_Constructor | A_TYPES__Entity_Constructor | A_TYPES__Feature_Constructor | A_TYPES__Caller_Constructor | A_TYPES__Fragment_Constructor | string;
30
- export type A_TYPES__A_InjectDecorator_EntityInjectionInstructions<T extends A_Entity = A_Entity> = {
31
- query: Partial<A_TYPES__A_InjectDecorator_EntityInjectionQuery<T>>;
32
- pagination: Partial<A_TYPES__A_InjectDecorator_EntityInjectionPagination>;
33
- };
34
- export type A_TYPES__A_InjectDecorator_EntityInjectionQuery<T extends A_Entity = A_Entity> = {
35
- aseid: string;
36
- } & {
37
- [key in keyof T]?: any;
38
- };
39
- export type A_TYPES__A_InjectDecorator_EntityInjectionPagination = {
40
- count: number;
41
- from: 'start' | 'end';
42
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A-Inject.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Inject.types.js","sourceRoot":"","sources":["../../../../src/global/A-Inject/A-Inject.types.ts"],"names":[],"mappings":""}
@@ -1,97 +0,0 @@
1
- /**
2
- * A Meta is an entity that stores all the metadata for the specific entity like container, component, feature, etc.
3
- *
4
- * [!] Meta can be different depending on the type of input data
5
- */
6
- export declare class A_Meta<_StorageItems extends Record<string, any> = any> implements Iterable<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]> {
7
- protected meta: Map<keyof _StorageItems, _StorageItems[keyof _StorageItems]>;
8
- /**
9
- * Method to get the iterator for the meta object
10
- *
11
- * @returns
12
- */
13
- [Symbol.iterator](): Iterator<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
14
- /**
15
- * Allows to replicate received meta object by replacing internal meta to the received one
16
- *
17
- * @param meta
18
- * @returns
19
- */
20
- from(meta: A_Meta<_StorageItems>): A_Meta<_StorageItems>;
21
- /**
22
- * Method to set values in the map
23
- *
24
- * @param key
25
- * @param value
26
- */
27
- set<K extends keyof _StorageItems>(key: K, value: _StorageItems[K]): void;
28
- /**
29
- * Method to get values from the map
30
- *
31
- * @param key
32
- * @returns
33
- */
34
- get<K extends keyof _StorageItems>(key: K): _StorageItems[K] | undefined;
35
- /**
36
- * Method to delete values from the map
37
- *
38
- * @param key
39
- * @returns
40
- */
41
- delete(key: keyof _StorageItems): boolean;
42
- /**
43
- * Method to get the size of the map
44
- *
45
- * @returns
46
- */
47
- size(): number;
48
- /**
49
- * This method is needed to convert the key to a regular expression and cover cases like:
50
- *
51
- * simple * e.g. "a*" instead of "a.*"
52
- *
53
- * simple ? e.g. "a?" instead of "a."
54
- *
55
- * etc.
56
- *
57
- * @param key
58
- * @returns
59
- */
60
- private convertToRegExp;
61
- /**
62
- * Method to find values in the map by name.
63
- *
64
- * Converts the Key in Map to a regular expression and then compares to the name
65
- *
66
- * @param name
67
- * @returns
68
- */
69
- find(name: string): [keyof _StorageItems, _StorageItems[keyof _StorageItems]][];
70
- /**
71
- * Method to find values in the map by regular expression
72
- *
73
- * Compares Map Key to the input regular expression
74
- *
75
- * @param regex
76
- * @returns
77
- */
78
- findByRegex(regex: RegExp): Array<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
79
- /**
80
- * Method to check if the map has a specific key
81
- *
82
- * @param key
83
- * @returns
84
- */
85
- has(key: keyof _StorageItems): boolean;
86
- /**
87
- * Method to get the size of the map
88
- *
89
- * @returns
90
- */
91
- entries(): IterableIterator<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
92
- /**
93
- * Method to clear the map
94
- */
95
- clear(): void;
96
- toArray(): Array<[keyof _StorageItems, _StorageItems[keyof _StorageItems]]>;
97
- }
@@ -1,164 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.A_Meta = void 0;
4
- /**
5
- * A Meta is an entity that stores all the metadata for the specific entity like container, component, feature, etc.
6
- *
7
- * [!] Meta can be different depending on the type of input data
8
- */
9
- class A_Meta {
10
- constructor() {
11
- this.meta = new Map();
12
- }
13
- /**
14
- * Method to get the iterator for the meta object
15
- *
16
- * @returns
17
- */
18
- [Symbol.iterator]() {
19
- const iterator = this.meta.entries();
20
- return {
21
- next: () => iterator.next()
22
- };
23
- }
24
- // ===================================================================================================
25
- // ================================ META OPERATIONS ==================================================
26
- // ===================================================================================================
27
- /**
28
- * Allows to replicate received meta object by replacing internal meta to the received one
29
- *
30
- * @param meta
31
- * @returns
32
- */
33
- from(meta) {
34
- this.meta = new Map(meta.meta);
35
- return this;
36
- }
37
- /**
38
- * Method to set values in the map
39
- *
40
- * @param key
41
- * @param value
42
- */
43
- set(key, value) {
44
- const inheritedValue = this.meta.get(key)
45
- || Array.isArray(value)
46
- ? []
47
- : value instanceof Map
48
- ? new Map()
49
- : {};
50
- const targetValue = this.meta.get(key)
51
- || Array.isArray(value)
52
- ? [
53
- ...inheritedValue
54
- ] : value instanceof Map
55
- ? new Map(inheritedValue)
56
- : Object.assign({}, inheritedValue);
57
- this.meta.set(key, value);
58
- }
59
- /**
60
- * Method to get values from the map
61
- *
62
- * @param key
63
- * @returns
64
- */
65
- get(key) {
66
- return this.meta.get(key);
67
- }
68
- /**
69
- * Method to delete values from the map
70
- *
71
- * @param key
72
- * @returns
73
- */
74
- delete(key) {
75
- return this.meta.delete(key);
76
- }
77
- /**
78
- * Method to get the size of the map
79
- *
80
- * @returns
81
- */
82
- size() {
83
- return this.meta.size;
84
- }
85
- /**
86
- * This method is needed to convert the key to a regular expression and cover cases like:
87
- *
88
- * simple * e.g. "a*" instead of "a.*"
89
- *
90
- * simple ? e.g. "a?" instead of "a."
91
- *
92
- * etc.
93
- *
94
- * @param key
95
- * @returns
96
- */
97
- convertToRegExp(key) {
98
- return key instanceof RegExp
99
- ? key
100
- : new RegExp(key);
101
- }
102
- /**
103
- * Method to find values in the map by name.
104
- *
105
- * Converts the Key in Map to a regular expression and then compares to the name
106
- *
107
- * @param name
108
- * @returns
109
- */
110
- find(name) {
111
- const results = [];
112
- for (const [key, value] of this.meta.entries()) {
113
- if (this.convertToRegExp(String(key)).test(name)) {
114
- results.push([key, value]);
115
- }
116
- }
117
- return results;
118
- }
119
- /**
120
- * Method to find values in the map by regular expression
121
- *
122
- * Compares Map Key to the input regular expression
123
- *
124
- * @param regex
125
- * @returns
126
- */
127
- findByRegex(regex) {
128
- const results = [];
129
- for (const [key, value] of this.meta.entries()) {
130
- if (regex.test(String(key))) {
131
- results.push([key, value]);
132
- }
133
- }
134
- return results;
135
- }
136
- /**
137
- * Method to check if the map has a specific key
138
- *
139
- * @param key
140
- * @returns
141
- */
142
- has(key) {
143
- return this.meta.has(key);
144
- }
145
- /**
146
- * Method to get the size of the map
147
- *
148
- * @returns
149
- */
150
- entries() {
151
- return this.meta.entries();
152
- }
153
- /**
154
- * Method to clear the map
155
- */
156
- clear() {
157
- this.meta.clear();
158
- }
159
- toArray() {
160
- return Array.from(this.meta.entries());
161
- }
162
- }
163
- exports.A_Meta = A_Meta;
164
- //# sourceMappingURL=A-Meta.class.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Meta.class.js","sourceRoot":"","sources":["../../../../src/global/A-Meta/A-Meta.class.ts"],"names":[],"mappings":";;;AAAA;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O,CAAC;IACnB,CAAC;IAGD;;;;;OAKG;IACH,GAAG,CAAC,GAAwB;QACxB,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC9B,CAAC;IAGD;;;;OAIG;IACH,OAAO;QACH,OAAO,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;IAC/B,CAAC;IAGD;;OAEG;IACH,KAAK;QACD,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;IACtB,CAAC;IAGD,OAAO;QACH,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;IAC3C,CAAC;CACJ;AA7LD,wBA6LC"}
@@ -1,14 +0,0 @@
1
- import { A_Component } from "../A-Component/A-Component.class";
2
- import { A_TYPES__Component_Constructor } from "../A-Component/A-Component.types";
3
- import { A_Container } from "../A-Container/A-Container.class";
4
- import { A_TYPES__Container_Constructor } from "../A-Container/A-Container.types";
5
- import { A_Entity } from "../A-Entity/A-Entity.class";
6
- import { A_TYPES__Entity_Constructor } from "../A-Entity/A-Entity.types";
7
- /**
8
- * Components that can have Meta associated with them
9
- */
10
- export type A_TYPES__MetaLinkedComponents = A_Container | A_Component | A_Entity;
11
- /**
12
- * Constructors of components that can have Meta associated with them
13
- */
14
- export type A_TYPES__MetaLinkedComponentConstructors = A_TYPES__Container_Constructor | A_TYPES__Component_Constructor | A_TYPES__Entity_Constructor;
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=A-Meta.types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"A-Meta.types.js","sourceRoot":"","sources":["../../../../src/global/A-Meta/A-Meta.types.ts"],"names":[],"mappings":""}