@adaas/a-concept 0.0.8 → 0.0.9

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.
@@ -2,6 +2,9 @@ import { A_Component } from "../../global/A-Component/A-Component.class";
2
2
  import { A_TYPES__A_InjectDecoratorReturn } from "./A-Inject.decorator.types";
3
3
  import { A_Fragment } from "../../global/A-Fragment/A-Fragment.class";
4
4
  import { A_Scope } from "../../global/A-Scope/A-Scope.class";
5
+ import { A_TYPES__ComponentMeta_EntityInjectionInstructions } from "../../global/A-Component/A-Component.types";
6
+ import { A_Feature } from "../../global/A-Feature/A-Feature.class";
7
+ import { A_Entity } from "../../global/A-Entity/A-Entity.class";
5
8
  /**
6
9
  * A-Inject decorator
7
10
  *
@@ -14,9 +17,13 @@ import { A_Scope } from "../../global/A-Scope/A-Scope.class";
14
17
  * @returns
15
18
  */
16
19
  export declare function A_Inject(scope: typeof A_Scope): A_TYPES__A_InjectDecoratorReturn;
17
- export declare function A_Inject(component: typeof A_Component): A_TYPES__A_InjectDecoratorReturn;
20
+ export declare function A_Inject(feature: typeof A_Feature): A_TYPES__A_InjectDecoratorReturn;
18
21
  export declare function A_Inject(component: {
19
- new (...args: any[]): any;
22
+ new (...args: any[]): A_Component;
20
23
  }): A_TYPES__A_InjectDecoratorReturn;
21
- export declare function A_Inject(fragment: typeof A_Fragment): A_TYPES__A_InjectDecoratorReturn;
22
- export declare function A_Inject<T extends Array<typeof A_Fragment>>(fragments: T): A_TYPES__A_InjectDecoratorReturn;
24
+ export declare function A_Inject(fragment: {
25
+ new (...args: any[]): A_Fragment;
26
+ }): A_TYPES__A_InjectDecoratorReturn;
27
+ export declare function A_Inject(entity: {
28
+ new (...args: any[]): A_Entity;
29
+ }, config: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>): A_TYPES__A_InjectDecoratorReturn;
@@ -5,16 +5,18 @@ const A_Context_class_1 = require("../../global/A-Context/A-Context.class");
5
5
  const A_Component_types_1 = require("../../global/A-Component/A-Component.types");
6
6
  const A_Meta_class_1 = require("../../global/A-Meta/A-Meta.class");
7
7
  // ====================== BASE FUNCTION ======================
8
- function A_Inject(param1) {
8
+ function A_Inject(param1, param2) {
9
9
  return function (target, methodName, parameterIndex) {
10
10
  const method = methodName ? String(methodName) : 'constructor';
11
- console.log('target: ', target);
12
11
  const existedMeta = A_Context_class_1.A_Context
13
12
  .meta(target)
14
13
  .get(A_Component_types_1.A_TYPES__ComponentMetaKey.INJECTIONS)
15
14
  || new A_Meta_class_1.A_Meta();
16
15
  const paramsArray = existedMeta.get(method) || [];
17
- paramsArray[parameterIndex] = param1;
16
+ paramsArray[parameterIndex] = {
17
+ target: param1,
18
+ instructions: param2
19
+ };
18
20
  existedMeta.set(method, paramsArray);
19
21
  A_Context_class_1.A_Context
20
22
  .meta(target)
@@ -1 +1 @@
1
- {"version":3,"file":"A-Inject.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Inject/A-Inject.decorator.ts"],"names":[],"mappings":";;AAqDA,4BAkCC;AAnFD,uFAA8E;AAC9E,6FAAkG;AAClG,8EAAqE;AA8CrE,8DAA8D;AAC9D,SAAgB,QAAQ,CACpB,MAAkF;IAGlF,OAAO,UACH,MAAmB,EACnB,UAAuC,EACvC,cAAsB;QAGtB,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;QAE/D,OAAO,CAAC,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;QAEhC,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,qBAAM,EAAE,CAAC;QAGpB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAElD,WAAW,CAAC,cAAc,CAAC,GAAG,MAAM,CAAC;QAErC,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAGrC,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,6CAAyB,CAAC,UAAU,EACpC,WAAW,CACd,CAAA;IACT,CAAC,CAAA;AACL,CAAC"}
1
+ {"version":3,"file":"A-Inject.decorator.js","sourceRoot":"","sources":["../../../../src/decorators/A-Inject/A-Inject.decorator.ts"],"names":[],"mappings":";;AAgDA,4BAyCC;AArFD,uFAA8E;AAC9E,6FAAsJ;AACtJ,8EAAqE;AAyCrE,8DAA8D;AAC9D,SAAgB,QAAQ,CACpB,MAIuC,EACvC,MAGC;IAED,OAAO,UACH,MAAmB,EACnB,UAAuC,EACvC,cAAsB;QAGtB,MAAM,MAAM,GAAG,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC;QAE/D,MAAM,WAAW,GAAG,2BAAS;aACxB,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC;eACvC,IAAI,qBAAM,EAAE,CAAC;QAGpB,MAAM,WAAW,GAAG,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAElD,WAAW,CAAC,cAAc,CAAC,GAAG;YAC1B,MAAM,EAAE,MAAM;YACd,YAAY,EAAE,MAAM;SACvB,CAAA;QAED,WAAW,CAAC,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;QAErC,2BAAS;aACJ,IAAI,CAAC,MAAM,CAAC;aACZ,GAAG,CACA,6CAAyB,CAAC,UAAU,EACpC,WAAW,CACd,CAAC;IACV,CAAC,CAAA;AACL,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { A_Entity } from "../A-Entity/A-Entity.class";
1
2
  import { A_Feature } from "../A-Feature/A-Feature.class";
2
3
  import { A_Fragment } from "../A-Fragment/A-Fragment.class";
3
4
  import { A_Meta } from "../A-Meta/A-Meta.class";
@@ -28,7 +29,7 @@ export type A_TYPES__ComponentMeta = {
28
29
  *
29
30
  * Where value is the list of injections
30
31
  */
31
- [Key: string]: Array<A_TYPES__ComponentMeta_InjectionParam>;
32
+ [Key: string]: A_TYPES__ComponentMeta_InjectionParams;
32
33
  }>;
33
34
  };
34
35
  export declare enum A_TYPES__ComponentMetaKey {
@@ -38,12 +39,24 @@ export declare enum A_TYPES__ComponentMetaKey {
38
39
  }
39
40
  export type A_TYPES__ComponentMetaExtension = {
40
41
  handler: string;
41
- args: A_TYPES__ComponentMeta_InjectionParam[];
42
+ args: A_TYPES__ComponentMeta_InjectionParams;
42
43
  };
43
44
  export type A_TYPES__ComponentMeta_ExtensionItem = {
44
45
  name: string;
45
46
  handler: string;
46
47
  };
48
+ export type A_TYPES__ComponentMeta_InjectionParams = Array<{
49
+ target: A_TYPES__ComponentMeta_InjectionParam;
50
+ } | {
51
+ target: {
52
+ new (...args: any[]): A_Entity;
53
+ };
54
+ instructions: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>;
55
+ }>;
56
+ export type A_TYPES__ComponentMeta_EntityInjectionInstructions = {
57
+ aseid: string;
58
+ id: string;
59
+ };
47
60
  export type A_TYPES__ComponentMeta_InjectionParam = {
48
61
  new (...args: any[]): A_Fragment;
49
62
  } | {
@@ -7,6 +7,7 @@ var A_TYPES__ComponentMetaKey;
7
7
  A_TYPES__ComponentMetaKey["FEATURES"] = "a-component-features";
8
8
  A_TYPES__ComponentMetaKey["INJECTIONS"] = "a-component-injections";
9
9
  })(A_TYPES__ComponentMetaKey || (exports.A_TYPES__ComponentMetaKey = A_TYPES__ComponentMetaKey = {}));
10
+ // |
10
11
  // typeof A_Fragment
11
12
  // | typeof A_Component
12
13
  // // | { new(...args: any[]): any }
@@ -1 +1 @@
1
- {"version":3,"file":"A-Component.types.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.types.ts"],"names":[],"mappings":";;;AAyCA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,kEAAqC,CAAA;IACrC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;AACzC,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC;AAqBD,oBAAoB;AACpB,uBAAuB;AACvB,oCAAoC;AACpC,mBAAmB;AACnB,sBAAsB"}
1
+ {"version":3,"file":"A-Component.types.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.types.ts"],"names":[],"mappings":";;;AA0CA,IAAY,yBAIX;AAJD,WAAY,yBAAyB;IACjC,kEAAqC,CAAA;IACrC,8DAAiC,CAAA;IACjC,kEAAqC,CAAA;AACzC,CAAC,EAJW,yBAAyB,yCAAzB,yBAAyB,QAIpC;AAiCD,KAAK;AACL,oBAAoB;AACpB,uBAAuB;AACvB,oCAAoC;AACpC,mBAAmB;AACnB,sBAAsB"}
@@ -1,5 +1,6 @@
1
1
  import { A_TYPES__Required, ASEID } from "@adaas/a-utils";
2
- import { A_TYPES__Entity_JSON, A_TYPES__EntityBaseMethods, A_TYPES__EntityCallParams, A_TYPES__IEntity } from "./A-Entity.types";
2
+ import { A_TYPES__Entity_JSON, A_TYPES__EntityBaseMethod, A_TYPES__EntityBaseMethods, A_TYPES__EntityCallParams, A_TYPES__IEntity } from "./A-Entity.types";
3
+ import { A_Fragment } from "../A-Fragment/A-Fragment.class";
3
4
  /**
4
5
  * A_Entity is another abstraction that describes all major participants in the system business logic.
5
6
  * Each Entity should have a clear definition and a clear set of responsibilities.
@@ -7,7 +8,7 @@ import { A_TYPES__Entity_JSON, A_TYPES__EntityBaseMethods, A_TYPES__EntityCallPa
7
8
  *
8
9
  * Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
9
10
  */
10
- export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_TYPES__Entity_JSON = A_TYPES__Entity_JSON, _FeatureNames extends Array<string> = A_TYPES__EntityBaseMethods> implements A_TYPES__IEntity {
11
+ export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_TYPES__Entity_JSON = A_TYPES__Entity_JSON, _FeatureNames extends Array<string | A_TYPES__EntityBaseMethod> = A_TYPES__EntityBaseMethods> extends A_Fragment implements A_TYPES__IEntity {
11
12
  aseid: ASEID;
12
13
  constructor(aseid: string);
13
14
  constructor(aseid: ASEID);
@@ -63,11 +64,15 @@ export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_
63
64
  /**
64
65
  * A-Feature method name to be called
65
66
  */
66
- feature: string,
67
+ feature: _FeatureNames[number],
67
68
  /**
68
69
  * Parameters to provide additional data to the feature
69
70
  */
70
71
  params: Partial<A_TYPES__EntityCallParams<_FeatureNames[number]>>): Promise<any>;
72
+ load(): void;
73
+ update(): void;
74
+ destroy(): void;
75
+ save(): void;
71
76
  protected fromNewEntity(newEntity: _ConstructorType): void;
72
77
  protected fromSerialized(serialized: _SerializedType): void;
73
78
  /**
@@ -1,4 +1,10 @@
1
1
  "use strict";
2
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
7
+ };
2
8
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
9
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
10
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -11,8 +17,11 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
11
17
  Object.defineProperty(exports, "__esModule", { value: true });
12
18
  exports.A_Entity = void 0;
13
19
  const a_utils_1 = require("@adaas/a-utils");
20
+ const A_Entity_types_1 = require("./A-Entity.types");
14
21
  const errors_constants_1 = require("@adaas/a-utils/dist/src/constants/errors.constants");
15
22
  const A_Context_class_1 = require("../A-Context/A-Context.class");
23
+ const A_Feature_class_1 = require("../A-Feature/A-Feature.class");
24
+ const A_Fragment_class_1 = require("../A-Fragment/A-Fragment.class");
16
25
  /**
17
26
  * A_Entity is another abstraction that describes all major participants in the system business logic.
18
27
  * Each Entity should have a clear definition and a clear set of responsibilities.
@@ -20,8 +29,9 @@ const A_Context_class_1 = require("../A-Context/A-Context.class");
20
29
  *
21
30
  * Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
22
31
  */
23
- class A_Entity {
32
+ class A_Entity extends A_Fragment_class_1.A_Fragment {
24
33
  constructor(props) {
34
+ super();
25
35
  switch (true) {
26
36
  case (typeof props === 'string' && a_utils_1.ASEID.isASEID(props)):
27
37
  this.aseid = new a_utils_1.ASEID(props);
@@ -96,6 +106,10 @@ class A_Entity {
96
106
  return yield newFeature.process();
97
107
  });
98
108
  }
109
+ load() { }
110
+ update() { }
111
+ destroy() { }
112
+ save() { }
99
113
  fromNewEntity(newEntity) {
100
114
  return;
101
115
  }
@@ -119,4 +133,24 @@ class A_Entity {
119
133
  }
120
134
  }
121
135
  exports.A_Entity = A_Entity;
136
+ __decorate([
137
+ A_Feature_class_1.A_Feature.Define({
138
+ name: A_Entity_types_1.A_TYPES__EntityBaseMethod.LOAD
139
+ })
140
+ ], A_Entity.prototype, "load", null);
141
+ __decorate([
142
+ A_Feature_class_1.A_Feature.Define({
143
+ name: A_Entity_types_1.A_TYPES__EntityBaseMethod.UPDATE
144
+ })
145
+ ], A_Entity.prototype, "update", null);
146
+ __decorate([
147
+ A_Feature_class_1.A_Feature.Define({
148
+ name: A_Entity_types_1.A_TYPES__EntityBaseMethod.DESTROY
149
+ })
150
+ ], A_Entity.prototype, "destroy", null);
151
+ __decorate([
152
+ A_Feature_class_1.A_Feature.Define({
153
+ name: A_Entity_types_1.A_TYPES__EntityBaseMethod.SAVE
154
+ })
155
+ ], A_Entity.prototype, "save", null);
122
156
  //# sourceMappingURL=A-Entity.class.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"A-Entity.class.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,4CAGwB;AAOxB,yFAAiG;AACjG,kEAAyD;AAIzD;;;;;;GAMG;AACH,MAAa,QAAQ;IAsBjB,YAAY,KAA0D;QAElE,QAAQ,IAAI,EAAE,CAAC;YACX,KAAK,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,eAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;gBACpD,IAAI,CAAC,KAAK,GAAG,IAAI,eAAK,CAAC,KAAK,CAAC,CAAC;gBAC9B,MAAM;YACV,KAAK,CAAC,KAAK,YAAY,eAAK,CAAC;gBACzB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;gBACnB,MAAM;YACV,KAAK,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAK,KAAa,CAAC,KAAK,CAAC;gBACpD,IAAI,CAAC,cAAc,CAAC,KAAwB,CAAC,CAAC;gBAC9C,MAAM;YAEV,KAAK,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC;gBAC5B,IAAI,CAAC,aAAa,CAAC,KAAyB,CAAC,CAAC;gBAC9C,MAAK;YAET;gBACI,MAAM,IAAI,iBAAO,CAAC,8CAA2B,CAAC,8BAA8B,CAAC,CAAC;QACtF,CAAC;IACL,CAAC;IAED,uEAAuE;IACvE,uEAAuE;IACvE,uEAAuE;IAEvE;;;OAGG;IACH,IAAI,EAAE;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;IACzB,CAAC;IAED;;;OAGG;IACH,IAAI,SAAS;QACT,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,CAAA;IAC/B,CAAC;IAED;;;OAGG;IACH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC;IAC5B,CAAC;IAED;;;O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AAC;QACd,IAAI,EAAE,0CAAyB,CAAC,MAAM;KACzC,CAAC;sCACU;AAKZ;IAHC,2BAAS,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,0CAAyB,CAAC,OAAO;KAC1C,CAAC;uCACW;AAMb;IAHC,2BAAS,CAAC,MAAM,CAAC;QACd,IAAI,EAAE,0CAAyB,CAAC,IAAI;KACvC,CAAC;oCACQ"}
@@ -66,7 +66,7 @@ class A_Feature {
66
66
  return {
67
67
  value: () => __awaiter(this, void 0, void 0, function* () {
68
68
  if (instance[handler]) {
69
- const callArgs = A_Context_class_1.A_Context.scope(this).resolve(args);
69
+ const callArgs = A_Context_class_1.A_Context.scope(this).resolve(args.map(arg => arg.target));
70
70
  yield instance[handler](...callArgs);
71
71
  }
72
72
  this._index++;
@@ -1 +1 @@
1
- {"version":3,"file":"A-Feature.class.js","sourceRoot":"","sources":["../../../../src/global/A-Feature/A-Feature.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iHAAoG;AACpG,iHAAoG;AACpG,uDAA6I;AAC7I,4CAA4D;AAC5D,kEAAyD;AAIzD;;;;;;;GAOG;AACH,MAAa,SAAS;IAGlB;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,6CAAgB,CAAC;IAC5B,CAAC;IAGD;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,6CAAgB,CAAC;IAC5B,CAAC;IAeD,YACI,MAA0E;QAX9E,2BAA2B;QACjB,UAAK,GAA2B,EAAE,CAAC;QAEnC,WAAM,GAAW,CAAC,CAAC;QAE7B,UAAK,GAA0B,uCAAqB,CAAC,WAAW,CAAC;QAQ7D,6BAA6B;QAC7B,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAE1B,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;IAErC,CAAC;IAGD;;;;OAIG;IACH,CAAC,MAAM,CAAC,QAAQ,CAAC;QACb,OAAO;YACH,qBAAqB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CAAC,OAAO,KAAK,gCAAgC;uBAClD,IAAI,CAAC,KAAK,KAAK,uCAAqB,CAAC,SAAS;oBAEjD,aAAa;oBACb,MAAM;gBAEV;oBACI,MAAM,KAAK,CAAC;YACpB,CAAC;QACL,CAAC;KAAA;CAGJ;AArLD,8BAqLC"}
@@ -1,5 +1,5 @@
1
1
  import { A_Component } from "../A-Component/A-Component.class";
2
- import { A_TYPES__ComponentMeta_InjectionParam } from "../A-Component/A-Component.types";
2
+ import { A_TYPES__ComponentMeta_InjectionParams } from "../A-Component/A-Component.types";
3
3
  import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types";
4
4
  export type A_TYPES__FeatureIteratorReturn<T extends any = any> = () => Promise<T>;
5
5
  export type A_TYPES__FeatureConstructor = {
@@ -14,5 +14,5 @@ export declare enum A_TYPES__FeatureState {
14
14
  export type A_TYPES__FeatureStep = {
15
15
  component: typeof A_Component;
16
16
  handler: string;
17
- args: A_TYPES__ComponentMeta_InjectionParam[];
17
+ args: A_TYPES__ComponentMeta_InjectionParams;
18
18
  };
@@ -1,6 +1,6 @@
1
1
  import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "./A-Scope.types";
2
2
  import { A_Fragment } from "../A-Fragment/A-Fragment.class";
3
- import { A_TYPES__ComponentMeta_InjectionParam } from "../A-Component/A-Component.types";
3
+ import { A_TYPES__ComponentMeta_EntityInjectionInstructions, A_TYPES__ComponentMeta_InjectionParam } from "../A-Component/A-Component.types";
4
4
  import { A_Component } from "../A-Component/A-Component.class";
5
5
  import { A_Entity } from "../A-Entity/A-Entity.class";
6
6
  /**
@@ -44,6 +44,9 @@ export declare class A_Scope {
44
44
  * @returns
45
45
  */
46
46
  resolve<T extends A_TYPES__ComponentMeta_InjectionParam>(component: T): InstanceType<T>;
47
+ resolve<T extends {
48
+ new (...args: any[]): A_Entity;
49
+ }>(entity: T, instructions: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>): InstanceType<T>;
47
50
  resolve<T extends A_TYPES__ComponentMeta_InjectionParam>(component: Array<T>): Array<InstanceType<T>>;
48
51
  private resolveOnce;
49
52
  private resolveFragment;
@@ -96,7 +96,7 @@ class A_Scope {
96
96
  }
97
97
  }
98
98
  }
99
- resolveOnce(component) {
99
+ resolveOnce(component, instructions) {
100
100
  switch (true) {
101
101
  case a_utils_1.A_CommonHelper.isInheritedFrom(component, A_Fragment_class_1.A_Fragment): {
102
102
  return this.resolveFragment(component);
@@ -130,7 +130,13 @@ class A_Scope {
130
130
  const componentMeta = A_Context_class_1.A_Context.meta(component);
131
131
  const argsMeta = componentMeta.get(A_Component_types_1.A_TYPES__ComponentMetaKey.INJECTIONS);
132
132
  const resolvedArgs = ((argsMeta === null || argsMeta === void 0 ? void 0 : argsMeta.get('constructor')) || [])
133
- .map(arg => this.resolve(arg));
133
+ .map(arg => {
134
+ if ('instructions' in arg) {
135
+ const { target, instructions } = arg;
136
+ return this.resolve(target, instructions);
137
+ }
138
+ return this.resolve(arg.target);
139
+ });
134
140
  const newComponent = new component(...resolvedArgs);
135
141
  this.register(newComponent);
136
142
  return this._components.get(component);
@@ -1 +1 @@
1
- {"version":3,"file":"A-Scope.class.js","sourceRoot":"","sources":["../../../../src/global/A-Scope/A-Scope.class.ts"],"names":[],"mappings":";;;AAAA,4CAAgD;AAEhD,qEAA4D;AAC5D,kEAAyD;AACzD,wEAAoH;AACpH,wEAA+D;AAC/D,+DAAsD;AAEtD;;;;;;;;;;;;GAYG;AACH,MAAa,OAAO;IAahB,YACI,MAA0C,EAC1C,SAAwC,EAAE;QAb9C,SAAI,GAAW,EAAE,CAAC;QAEV,gBAAW,GAAiD,IAAI,OAAO,EAAE,CAAC;QAC1E,eAAU,GAAgD,IAAI,OAAO,EAAE,CAAC;QACxE,cAAS,GAA0B,IAAI,GAAG,EAAE,CAAC;QAWjD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CA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CAAC,UAAU,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;gBAChD,kDAAkD;gBAClD,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAa,CAAC,CAAC;gBACxC,MAAM;YACV,CAAC;YAED,KAAK,MAAM,YAAY,yBAAQ,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC;gBAC9E,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,MAAM,CAAC,CAAC;gBACpD,kDAAkD;gBAClD,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAa,CAAC,CAAC;gBACxC,MAAM;YACV,CAAC;YAED,KAAK,MAAM,YAAY,+BAAW,CAAC,CAAC,CAAC;gBACjC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;gBACjD,kDAAkD;gBAClD,2BAAS,CAAC,QAAQ,CAAC,IAAI,EAAE,MAAa,CAAC,CAAC;gBACxC,MAAM;YACV,CAAC;YAED;gBACI,MAAM,IAAI,KAAK,CAAC,4BAA4B,CAAC,CAAC;QACtD,CAAC;IAIL,CAAC;CACJ;AApRD,0BAoRC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adaas/a-concept",
3
- "version": "0.0.8",
3
+ "version": "0.0.9",
4
4
  "description": "A-Concept is a framework to build new Applications within or outside the ADAAS ecosystem. This framework is designed to be modular structure regardless environment and program goal.",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -3,10 +3,10 @@ import { A_TYPES__A_InjectDecoratorReturn } from "./A-Inject.decorator.types";
3
3
  import { A_Fragment } from "@adaas/a-concept/global/A-Fragment/A-Fragment.class";
4
4
  import { A_Scope } from "@adaas/a-concept/global/A-Scope/A-Scope.class";
5
5
  import { A_Context } from "@adaas/a-concept/global/A-Context/A-Context.class";
6
- import { A_TYPES__ComponentMetaKey } from "@adaas/a-concept/global/A-Component/A-Component.types";
6
+ import { A_TYPES__ComponentMeta_EntityInjectionInstructions, A_TYPES__ComponentMetaKey } from "@adaas/a-concept/global/A-Component/A-Component.types";
7
7
  import { A_Meta } from "@adaas/a-concept/global/A-Meta/A-Meta.class";
8
8
  import { A_Feature } from "@adaas/a-concept/global/A-Feature/A-Feature.class";
9
-
9
+ import { A_Entity } from "@adaas/a-concept/global/A-Entity/A-Entity.class";
10
10
 
11
11
 
12
12
 
@@ -25,35 +25,37 @@ import { A_Feature } from "@adaas/a-concept/global/A-Feature/A-Feature.class";
25
25
  export function A_Inject(
26
26
  scope: typeof A_Scope
27
27
  ): A_TYPES__A_InjectDecoratorReturn
28
-
29
28
  export function A_Inject(
30
- component: typeof A_Component
29
+ feature: typeof A_Feature
31
30
  ): A_TYPES__A_InjectDecoratorReturn
32
31
  export function A_Inject(
33
- component: { new(...args: any[]): any }
32
+ component: { new(...args: any[]): A_Component }
34
33
  ): A_TYPES__A_InjectDecoratorReturn
35
-
36
34
  // Allows to inject just one container
37
35
  // export function A_Inject(
38
36
  // container: typeof A_Container
39
37
  // ): A_TYPES__A_InjectDecoratorReturn
40
-
41
38
  // Allows to inject just one Context Fragment
42
39
  export function A_Inject(
43
- fragment: typeof A_Fragment
40
+ fragment: { new(...args: any[]): A_Fragment }
44
41
  ): A_TYPES__A_InjectDecoratorReturn
45
42
 
46
- // Allows to inject multiple Fragments
47
- export function A_Inject<
48
- T extends Array<typeof A_Fragment>
49
- >(
50
- fragments: T
43
+ export function A_Inject(
44
+ entity: { new(...args: any[]): A_Entity },
45
+ config: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>
51
46
  ): A_TYPES__A_InjectDecoratorReturn
52
47
 
53
48
  // ====================== BASE FUNCTION ======================
54
49
  export function A_Inject(
55
- param1: typeof A_Fragment | typeof A_Component | typeof A_Scope | typeof A_Feature,
56
-
50
+ param1: typeof A_Scope
51
+ | typeof A_Feature
52
+ | { new(...args: any[]): A_Component }
53
+ | { new(...args: any[]): A_Fragment }
54
+ | { new(...args: any[]): A_Entity },
55
+ param2?: {
56
+ aseid?: string,
57
+ id?: string,
58
+ }
57
59
  ): A_TYPES__A_InjectDecoratorReturn {
58
60
  return function (
59
61
  target: A_Component,
@@ -63,8 +65,6 @@ export function A_Inject(
63
65
 
64
66
  const method = methodName ? String(methodName) : 'constructor';
65
67
 
66
- console.log('target: ', target);
67
-
68
68
  const existedMeta = A_Context
69
69
  .meta(target)
70
70
  .get(A_TYPES__ComponentMetaKey.INJECTIONS)
@@ -73,16 +73,18 @@ export function A_Inject(
73
73
 
74
74
  const paramsArray = existedMeta.get(method) || [];
75
75
 
76
- paramsArray[parameterIndex] = param1;
76
+ paramsArray[parameterIndex] = {
77
+ target: param1,
78
+ instructions: param2
79
+ }
77
80
 
78
81
  existedMeta.set(method, paramsArray);
79
82
 
80
-
81
83
  A_Context
82
84
  .meta(target)
83
85
  .set(
84
86
  A_TYPES__ComponentMetaKey.INJECTIONS,
85
87
  existedMeta
86
- )
88
+ );
87
89
  }
88
90
  }
@@ -1,3 +1,4 @@
1
+ import { A_Entity } from "../A-Entity/A-Entity.class"
1
2
  import { A_Feature } from "../A-Feature/A-Feature.class"
2
3
  import { A_Fragment } from "../A-Fragment/A-Fragment.class"
3
4
  import { A_Meta } from "../A-Meta/A-Meta.class"
@@ -35,7 +36,7 @@ export type A_TYPES__ComponentMeta = {
35
36
  *
36
37
  * Where value is the list of injections
37
38
  */
38
- [Key: string]: Array<A_TYPES__ComponentMeta_InjectionParam>
39
+ [Key: string]: A_TYPES__ComponentMeta_InjectionParams
39
40
  }>
40
41
  }
41
42
 
@@ -47,7 +48,7 @@ export enum A_TYPES__ComponentMetaKey {
47
48
 
48
49
  export type A_TYPES__ComponentMetaExtension = {
49
50
  handler: string,
50
- args: A_TYPES__ComponentMeta_InjectionParam[]
51
+ args: A_TYPES__ComponentMeta_InjectionParams
51
52
  }
52
53
 
53
54
 
@@ -56,6 +57,18 @@ export type A_TYPES__ComponentMeta_ExtensionItem = {
56
57
  handler: string,
57
58
  }
58
59
 
60
+ export type A_TYPES__ComponentMeta_InjectionParams = Array<{
61
+ target: A_TYPES__ComponentMeta_InjectionParam
62
+ } | {
63
+ target: { new(...args: any[]): A_Entity },
64
+ instructions: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>
65
+ }>;
66
+
67
+
68
+ export type A_TYPES__ComponentMeta_EntityInjectionInstructions = {
69
+ aseid: string,
70
+ id: string,
71
+ }
59
72
 
60
73
 
61
74
  export type A_TYPES__ComponentMeta_InjectionParam =
@@ -64,6 +77,7 @@ export type A_TYPES__ComponentMeta_InjectionParam =
64
77
  // | { new(...args: any[]): any }
65
78
  | { new(...args: any[]): A_Scope }
66
79
  | { new(...args: any[]): A_Feature };
80
+ // |
67
81
  // typeof A_Fragment
68
82
  // | typeof A_Component
69
83
  // // | { new(...args: any[]): any }
@@ -4,12 +4,15 @@ import {
4
4
  } from "@adaas/a-utils";
5
5
  import {
6
6
  A_TYPES__Entity_JSON,
7
+ A_TYPES__EntityBaseMethod,
7
8
  A_TYPES__EntityBaseMethods,
8
9
  A_TYPES__EntityCallParams,
9
10
  A_TYPES__IEntity
10
11
  } from "./A-Entity.types";
11
12
  import { A_CONSTANTS__DEFAULT_ERRORS } from "@adaas/a-utils/dist/src/constants/errors.constants";
12
13
  import { A_Context } from "../A-Context/A-Context.class";
14
+ import { A_Feature } from "../A-Feature/A-Feature.class";
15
+ import { A_Fragment } from "../A-Fragment/A-Fragment.class";
13
16
 
14
17
 
15
18
 
@@ -23,8 +26,9 @@ import { A_Context } from "../A-Context/A-Context.class";
23
26
  export class A_Entity<
24
27
  _ConstructorType = any,
25
28
  _SerializedType extends A_TYPES__Entity_JSON = A_TYPES__Entity_JSON,
26
- _FeatureNames extends Array<string> = A_TYPES__EntityBaseMethods
29
+ _FeatureNames extends Array<string | A_TYPES__EntityBaseMethod> = A_TYPES__EntityBaseMethods
27
30
  >
31
+ extends A_Fragment
28
32
  implements A_TYPES__IEntity {
29
33
 
30
34
  aseid!: ASEID;
@@ -43,6 +47,7 @@ export class A_Entity<
43
47
  newEntity: _ConstructorType
44
48
  )
45
49
  constructor(props: string | ASEID | _SerializedType | _ConstructorType) {
50
+ super();
46
51
 
47
52
  switch (true) {
48
53
  case (typeof props === 'string' && ASEID.isASEID(props)):
@@ -140,7 +145,7 @@ export class A_Entity<
140
145
  /**
141
146
  * A-Feature method name to be called
142
147
  */
143
- feature: string,
148
+ feature: _FeatureNames[number],
144
149
  /**
145
150
  * Parameters to provide additional data to the feature
146
151
  */
@@ -165,6 +170,29 @@ export class A_Entity<
165
170
  }
166
171
 
167
172
 
173
+ @A_Feature.Define({
174
+ name: A_TYPES__EntityBaseMethod.LOAD
175
+ })
176
+ load() { }
177
+
178
+
179
+ @A_Feature.Define({
180
+ name: A_TYPES__EntityBaseMethod.UPDATE
181
+ })
182
+ update() { }
183
+
184
+ @A_Feature.Define({
185
+ name: A_TYPES__EntityBaseMethod.DESTROY
186
+ })
187
+ destroy() { }
188
+
189
+
190
+ @A_Feature.Define({
191
+ name: A_TYPES__EntityBaseMethod.SAVE
192
+ })
193
+ save() { }
194
+
195
+
168
196
 
169
197
 
170
198
  protected fromNewEntity(newEntity: _ConstructorType): void {
@@ -84,7 +84,7 @@ export class A_Feature {
84
84
  value: async () => {
85
85
 
86
86
  if (instance[handler]) {
87
- const callArgs = A_Context.scope(this).resolve(args);
87
+ const callArgs = A_Context.scope(this).resolve(args.map(arg => arg.target));
88
88
  await instance[handler](...callArgs);
89
89
  }
90
90
 
@@ -1,5 +1,5 @@
1
1
  import { A_Component } from "../A-Component/A-Component.class"
2
- import { A_TYPES__ComponentMeta_InjectionParam } from "../A-Component/A-Component.types"
2
+ import { A_TYPES__ComponentMeta_InjectionParam, A_TYPES__ComponentMeta_InjectionParams } from "../A-Component/A-Component.types"
3
3
  import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "../A-Scope/A-Scope.types"
4
4
 
5
5
 
@@ -22,5 +22,5 @@ export enum A_TYPES__FeatureState {
22
22
  export type A_TYPES__FeatureStep = {
23
23
  component: typeof A_Component,
24
24
  handler: string,
25
- args: A_TYPES__ComponentMeta_InjectionParam[]
25
+ args: A_TYPES__ComponentMeta_InjectionParams
26
26
  }
@@ -2,7 +2,7 @@ import { A_CommonHelper } from "@adaas/a-utils";
2
2
  import { A_TYPES__ScopeConfig, A_TYPES__ScopeConstructor } from "./A-Scope.types";
3
3
  import { A_Fragment } from "../A-Fragment/A-Fragment.class";
4
4
  import { A_Context } from "../A-Context/A-Context.class";
5
- import { A_TYPES__ComponentMeta_InjectionParam, A_TYPES__ComponentMetaKey } from "../A-Component/A-Component.types";
5
+ import { A_TYPES__ComponentMeta_EntityInjectionInstructions, A_TYPES__ComponentMeta_InjectionParam, A_TYPES__ComponentMetaKey } from "../A-Component/A-Component.types";
6
6
  import { A_Component } from "../A-Component/A-Component.class";
7
7
  import { A_Entity } from "../A-Entity/A-Entity.class";
8
8
 
@@ -129,12 +129,20 @@ export class A_Scope {
129
129
  * @param component
130
130
  * @returns
131
131
  */
132
- resolve<T extends A_TYPES__ComponentMeta_InjectionParam>(component: T): InstanceType<T>
133
- resolve<T extends A_TYPES__ComponentMeta_InjectionParam>(component: Array<T>): Array<InstanceType<T>>
132
+ resolve<T extends A_TYPES__ComponentMeta_InjectionParam>(
133
+ component: T
134
+ ): InstanceType<T>
135
+ resolve<T extends { new(...args: any[]): A_Entity }>(
136
+ entity: T,
137
+ instructions: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>): InstanceType<T>
138
+ resolve<
139
+ T extends A_TYPES__ComponentMeta_InjectionParam>(component: Array<T>
140
+
141
+ ): Array<InstanceType<T>>
134
142
  // base definition
135
143
  resolve<T extends A_TYPES__ComponentMeta_InjectionParam>(
136
144
  param1: Array<T> | T,
137
- param2?: string
145
+ param2?: string | Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>
138
146
  ): Array<InstanceType<T>> | InstanceType<T> {
139
147
 
140
148
  switch (true) {
@@ -154,7 +162,17 @@ export class A_Scope {
154
162
 
155
163
 
156
164
 
157
- private resolveOnce<T extends A_TYPES__ComponentMeta_InjectionParam>(component: T): InstanceType<T> {
165
+ private resolveOnce<T extends { new(...args: any[]): A_Entity }>(
166
+ entity: T,
167
+ instructions: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>
168
+ ): InstanceType<T>
169
+ private resolveOnce<T extends A_TYPES__ComponentMeta_InjectionParam>(
170
+ component: T
171
+ ): InstanceType<T>
172
+ private resolveOnce<T extends { new(...args: any[]): A_Entity } | A_TYPES__ComponentMeta_InjectionParam>(
173
+ component: T,
174
+ instructions?: Partial<A_TYPES__ComponentMeta_EntityInjectionInstructions>
175
+ ): InstanceType<T> {
158
176
  switch (true) {
159
177
  case A_CommonHelper.isInheritedFrom(component, A_Fragment): {
160
178
  return this.resolveFragment(component as typeof A_Fragment) as InstanceType<T>;
@@ -206,7 +224,16 @@ export class A_Scope {
206
224
  const argsMeta = componentMeta.get(A_TYPES__ComponentMetaKey.INJECTIONS);
207
225
 
208
226
  const resolvedArgs = (argsMeta?.get('constructor') || [])
209
- .map(arg => this.resolve(arg));
227
+ .map(arg => {
228
+ if ('instructions' in arg) {
229
+ const { target, instructions } = arg
230
+ return this.resolve(
231
+ target,
232
+ instructions
233
+ );
234
+ }
235
+ return this.resolve(arg.target)
236
+ });
210
237
 
211
238
  const newComponent = new component(...resolvedArgs)
212
239