@adaas/a-concept 0.0.11 → 0.0.13
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.
- package/dist/src/global/A-Component/A-Component.meta.js +1 -0
- package/dist/src/global/A-Component/A-Component.meta.js.map +1 -1
- package/dist/src/global/A-Component/A-Component.types.d.ts +10 -0
- package/dist/src/global/A-Component/A-Component.types.js.map +1 -1
- package/dist/src/global/A-Container/A-Container.class.d.ts +25 -0
- package/dist/src/global/A-Container/A-Container.class.js +9 -0
- package/dist/src/global/A-Container/A-Container.class.js.map +1 -1
- package/dist/src/global/A-Context/A-Context.class.d.ts +11 -0
- package/dist/src/global/A-Context/A-Context.class.js +11 -6
- package/dist/src/global/A-Context/A-Context.class.js.map +1 -1
- package/dist/src/global/A-Entity/A-Entity.class.d.ts +5 -0
- package/dist/src/global/A-Entity/A-Entity.class.js +10 -0
- package/dist/src/global/A-Entity/A-Entity.class.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.class.js.map +1 -1
- package/dist/src/global/A-Feature/A-Feature.types.d.ts +16 -0
- package/package.json +1 -1
- package/src/global/A-Component/A-Component.meta.ts +1 -1
- package/src/global/A-Component/A-Component.types.ts +10 -0
- package/src/global/A-Container/A-Container.class.ts +48 -0
- package/src/global/A-Context/A-Context.class.ts +52 -17
- package/src/global/A-Entity/A-Entity.class.ts +12 -0
- package/src/global/A-Feature/A-Feature.class.ts +0 -1
- package/src/global/A-Feature/A-Feature.types.ts +16 -0
|
@@ -22,6 +22,7 @@ class A_ComponentMeta extends A_Meta_class_1.A_Meta {
|
|
|
22
22
|
const args = (injections === null || injections === void 0 ? void 0 : injections.get(extension.handler)) || [];
|
|
23
23
|
steps.push({
|
|
24
24
|
// component: constructor,
|
|
25
|
+
name: extension.name,
|
|
25
26
|
handler: extension.handler,
|
|
26
27
|
args
|
|
27
28
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Component.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.meta.ts"],"names":[],"mappings":";;;AAAA,yDAAgD;AAChD,2DAAyH;AAGzH,MAAa,eAAgB,SAAQ,qBAA8B;IAK/D;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,iDAAiD;QAGjD,UAAU,aAAV,UAAU,uBAAV,UAAU;QACN,gDAAgD;SAC9C,IAAI,CAAC,OAAO,EACb,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;
|
|
1
|
+
{"version":3,"file":"A-Component.meta.js","sourceRoot":"","sources":["../../../../src/global/A-Component/A-Component.meta.ts"],"names":[],"mappings":";;;AAAA,yDAAgD;AAChD,2DAAyH;AAGzH,MAAa,eAAgB,SAAQ,qBAA8B;IAK/D;;;;;OAKG;IACH,UAAU,CACN,OAAe;QAEf,MAAM,KAAK,GAAsC,EAAE,CAAC;QAEpD,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAClE,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,6CAAyB,CAAC,UAAU,CAAC,CAAC;QAElE,iDAAiD;QAGjD,UAAU,aAAV,UAAU,uBAAV,UAAU;QACN,gDAAgD;SAC9C,IAAI,CAAC,OAAO,EACb,OAAO,CAAC,CAAC,CAAC,OAAO,EAAE,UAAU,CAAC,EAAE,EAAE;YAC/B,UAAU,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE;gBAC3B,MAAM,IAAI,GAAG,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,GAAG,CAAC,SAAS,CAAC,OAAO,CAAC,KAAI,EAAE,CAAC;gBAEtD,KAAK,CAAC,IAAI,CAAC;oBACP,0BAA0B;oBAC1B,IAAI,EAAE,SAAS,CAAC,IAAI;oBACpB,OAAO,EAAE,SAAS,CAAC,OAAO;oBAC1B,IAAI;iBACP,CAAC,CAAC;YAEP,CAAC,CAAC,CAAC;QACP,CAAC,CAAC,CAAC;QAGP,OAAO,KAAK,CAAC;IACjB,CAAC;CAEJ;AA3CD,0CA2CC"}
|
|
@@ -38,7 +38,17 @@ export declare enum A_TYPES__ComponentMetaKey {
|
|
|
38
38
|
INJECTIONS = "a-component-injections"
|
|
39
39
|
}
|
|
40
40
|
export type A_TYPES__ComponentMetaExtension = {
|
|
41
|
+
/**
|
|
42
|
+
* The name of original Extension Definition
|
|
43
|
+
*/
|
|
44
|
+
name: string;
|
|
45
|
+
/**
|
|
46
|
+
* The name of the handler that will be used to apply the extension
|
|
47
|
+
*/
|
|
41
48
|
handler: string;
|
|
49
|
+
/**
|
|
50
|
+
* The arguments that will be passed to the handler
|
|
51
|
+
*/
|
|
42
52
|
args: A_TYPES__ComponentMeta_InjectionParams;
|
|
43
53
|
};
|
|
44
54
|
export type A_TYPES__ComponentMeta_ExtensionItem = {
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
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;AA2CD,KAAK;AACL,oBAAoB;AACpB,uBAAuB;AACvB,oCAAoC;AACpC,mBAAmB;AACnB,sBAAsB"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { A_TYPES__ContainerCallParams, A_TYPES__ContainerConstructor } from "./A-Container.types";
|
|
2
2
|
import { A_TYPES__Required } from "@adaas/a-utils";
|
|
3
3
|
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
4
|
+
import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
4
5
|
/**
|
|
5
6
|
* This class should combine Components to achieve the goal withing Concept
|
|
6
7
|
*
|
|
@@ -58,6 +59,30 @@ export declare class A_Container<_FeatureNames extends Array<string>> {
|
|
|
58
59
|
* Parameters to provide additional data to the feature
|
|
59
60
|
*/
|
|
60
61
|
params: Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>): Promise<any>;
|
|
62
|
+
/**
|
|
63
|
+
* This method allows to get a feature Definition for the future reuse with custom Feature classes
|
|
64
|
+
*
|
|
65
|
+
* @param feature
|
|
66
|
+
*/
|
|
67
|
+
feature(
|
|
68
|
+
/**
|
|
69
|
+
* A-Feature method name to be called
|
|
70
|
+
*/
|
|
71
|
+
feature: _FeatureNames[number]): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
|
|
72
|
+
feature(
|
|
73
|
+
/**
|
|
74
|
+
* A-Feature name to be called
|
|
75
|
+
*/
|
|
76
|
+
params: A_TYPES__Required<Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>, ['name']>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
|
|
77
|
+
feature(
|
|
78
|
+
/**
|
|
79
|
+
* A-Feature method name to be called
|
|
80
|
+
*/
|
|
81
|
+
feature: _FeatureNames[number],
|
|
82
|
+
/**
|
|
83
|
+
* Parameters to provide additional data to the feature
|
|
84
|
+
*/
|
|
85
|
+
params: Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
|
|
61
86
|
/**
|
|
62
87
|
* Before init hook to be used in inherited classes
|
|
63
88
|
*
|
|
@@ -84,6 +84,15 @@ class A_Container {
|
|
|
84
84
|
return yield newFeature.process();
|
|
85
85
|
});
|
|
86
86
|
}
|
|
87
|
+
feature(param1, param2) {
|
|
88
|
+
const feature = typeof param1 === 'string'
|
|
89
|
+
? param1
|
|
90
|
+
: param1.name;
|
|
91
|
+
const params = typeof param1 === 'string'
|
|
92
|
+
? param2 || {}
|
|
93
|
+
: param1;
|
|
94
|
+
return A_Context_class_1.A_Context.featureDefinition(this, feature, params);
|
|
95
|
+
}
|
|
87
96
|
// ==============================================================
|
|
88
97
|
// ======================= HOOKS ================================
|
|
89
98
|
// ==============================================================
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kEAAyD;
|
|
1
|
+
{"version":3,"file":"A-Container.class.js","sourceRoot":"","sources":["../../../../src/global/A-Container/A-Container.class.ts"],"names":[],"mappings":";;;;;;;;;;;;AAGA,kEAAyD;AAMzD;;;;;;;;;;GAUG;AACH,MAAa,WAAW;IAYpB,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,EAAS,CAAC;IAC5C,CAAC;IAED,IAAI,IAAI;QACJ,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IACrD,CAAC;IAED,IAAI,KAAK;QACL,OAAO,2BAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAGD;IACI;;OAEG;I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MAAM,UAAU,GAAG,2BAAS,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;YAE5D,OAAO,MAAM,UAAU,CAAC,OAAO,EAAE,CAAC;QACtC,CAAC;KAAA;IAkCD,OAAO,CACH,MAAyH,EACzH,MAAqE;QAGrE,MAAM,OAAO,GAAW,OAAO,MAAM,KAAK,QAAQ;YAC9C,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC;QAClB,MAAM,MAAM,GAAiE,OAAO,MAAM,KAAK,QAAQ;YACnG,CAAC,CAAC,MAAM,IAAI,EAAE;YACd,CAAC,CAAC,MAAM,CAAC;QAEb,OAAO,2BAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC;IAC9D,CAAC;IAID,iEAAiE;IACjE,iEAAiE;IACjE,iEAAiE;IAEjE;;;;OAIG;IACa,YAAY;;YACxB,OAAO;QACX,CAAC;KAAA;IAED;;OAEG;IACa,MAAM;;YAClB,OAAO;QACX,CAAC;KAAA;IAED;;;;OAIG;IACa,WAAW;;YACvB,OAAO;QACX,CAAC;KAAA;CAEJ;AA5MD,kCA4MC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { A_TYPES__Required } from "@adaas/a-utils";
|
|
1
2
|
import { A_Component } from "../A-Component/A-Component.class";
|
|
2
3
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
3
4
|
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
@@ -11,6 +12,7 @@ import { A_Concept } from "../A-Concept/A_Concept.class";
|
|
|
11
12
|
import { A_TYPES__EntityBaseMethod } from "../A-Entity/A-Entity.types";
|
|
12
13
|
import { A_Entity } from "../A-Entity/A-Entity.class";
|
|
13
14
|
import { A_EntityMeta } from "../A-Entity/A-Entity.meta";
|
|
15
|
+
import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
14
16
|
/**
|
|
15
17
|
* Namespace Provider is responsible for providing the Namespace to the Containers and other Namespaces.
|
|
16
18
|
* This class stores all Namespaces across the Program.
|
|
@@ -82,6 +84,15 @@ export declare class A_Context {
|
|
|
82
84
|
* @returns
|
|
83
85
|
*/
|
|
84
86
|
static component(meta: A_ComponentMeta): typeof A_Component;
|
|
87
|
+
/**
|
|
88
|
+
* This method returns a constructor params to create a new feature
|
|
89
|
+
*
|
|
90
|
+
* @param scope
|
|
91
|
+
* @returns
|
|
92
|
+
*/
|
|
93
|
+
static featureDefinition<T extends Array<string>>(entity: A_Entity<any, any, T>, feature: A_TYPES__EntityBaseMethod | string | T[number] | RegExp, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
|
|
94
|
+
static featureDefinition<T extends Array<string>>(container: A_Container<T>, feature: T[number], params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
|
|
95
|
+
static featureDefinition(component: A_Component, feature: string, params?: Partial<A_TYPES__ScopeConstructor>): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>;
|
|
85
96
|
/**
|
|
86
97
|
* This method returns a step-by-step instructions of feature implementation depending on the feature name and the class.
|
|
87
98
|
*
|
|
@@ -180,7 +180,7 @@ class A_Context {
|
|
|
180
180
|
}
|
|
181
181
|
return component;
|
|
182
182
|
}
|
|
183
|
-
static
|
|
183
|
+
static featureDefinition(param1, param2, param3) {
|
|
184
184
|
const instance = this.getInstance();
|
|
185
185
|
const component = param1;
|
|
186
186
|
const feature = `${component.constructor.name}.${param2}`;
|
|
@@ -198,9 +198,10 @@ class A_Context {
|
|
|
198
198
|
// Get all extensions for the feature
|
|
199
199
|
meta
|
|
200
200
|
.extensions(feature)
|
|
201
|
-
.forEach(({ handler, args }) => {
|
|
201
|
+
.forEach(({ handler, args, name }) => {
|
|
202
202
|
steps.push({
|
|
203
203
|
component: constructor,
|
|
204
|
+
name,
|
|
204
205
|
handler,
|
|
205
206
|
args
|
|
206
207
|
});
|
|
@@ -210,13 +211,17 @@ class A_Context {
|
|
|
210
211
|
// do nothing
|
|
211
212
|
}
|
|
212
213
|
});
|
|
213
|
-
|
|
214
|
+
return {
|
|
214
215
|
name: `${component.constructor.name}.${feature}`,
|
|
215
|
-
fragments: config.fragments,
|
|
216
|
-
components: config.components,
|
|
216
|
+
fragments: config.fragments || [],
|
|
217
|
+
components: config.components || [],
|
|
217
218
|
steps,
|
|
218
219
|
parent: component instanceof A_Container_class_1.A_Container ? this.scope(component) : undefined
|
|
219
|
-
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
static feature(param1, param2, param3) {
|
|
223
|
+
const featureConstructor = this.featureDefinition(param1, param2, param3);
|
|
224
|
+
const newFeature = new A_Feature_class_1.A_Feature(featureConstructor);
|
|
220
225
|
return newFeature;
|
|
221
226
|
}
|
|
222
227
|
static register(scope, param1) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,
|
|
1
|
+
{"version":3,"file":"A-Context.class.js","sourceRoot":"","sources":["../../../../src/global/A-Context/A-Context.class.ts"],"names":[],"mappings":";;;AAAA,4CAAgF;AAChF,wEAA+D;AAC/D,qEAA4D;AAC5D,kEAAyD;AACzD,wEAA+D;AAC/D,4DAAmD;AAEnD,yDAAgD;AAChD,sEAAkE;AAClE,sEAAkE;AAClE,kEAAyD;AAEzD,+DAAsD;AACtD,6DAAyD;AAIzD;;;;;;GAMG;AACH,MAAa,SAAS;IAwDlB;QApDA;;WAEG;QACO,eAAU,GAAuC,IAAI,OAAO,EAAE,CAAC;QAEzE;;WAEG;QACO,aAAQ,GAAgC,IAAI,OAAO,EAAE,CAAC;QAEhE;;WAEG;QACO,aAAQ,GAAqC,I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,6BAA6B;QAG7B,sBAAsB;QACtB,iCAAiC;QAEjC,4DAA4D;QAE5D,mBAAmB;IAEvB,CAAC;CACJ;AAjgBD,8BAigBC"}
|
|
@@ -10,6 +10,10 @@ import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
|
10
10
|
*/
|
|
11
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 {
|
|
12
12
|
aseid: ASEID;
|
|
13
|
+
/**
|
|
14
|
+
* Entity Identifier that corresponds to the class name
|
|
15
|
+
*/
|
|
16
|
+
static get entity(): string;
|
|
13
17
|
constructor(aseid: string);
|
|
14
18
|
constructor(aseid: ASEID);
|
|
15
19
|
constructor(serialized: _SerializedType);
|
|
@@ -32,6 +36,7 @@ export declare class A_Entity<_ConstructorType = any, _SerializedType extends A_
|
|
|
32
36
|
/**
|
|
33
37
|
* Extracts the entity from the ASEID
|
|
34
38
|
* entity is the name of the entity from Application Namespace
|
|
39
|
+
*
|
|
35
40
|
*/
|
|
36
41
|
get entity(): string;
|
|
37
42
|
/**
|
|
@@ -30,6 +30,15 @@ const A_Fragment_class_1 = require("../A-Fragment/A-Fragment.class");
|
|
|
30
30
|
* Each entity should be connected to the ContextFragment (Scope) and should be able to communicate with other entities.
|
|
31
31
|
*/
|
|
32
32
|
class A_Entity extends A_Fragment_class_1.A_Fragment {
|
|
33
|
+
/**
|
|
34
|
+
* Entity Identifier that corresponds to the class name
|
|
35
|
+
*/
|
|
36
|
+
static get entity() {
|
|
37
|
+
return a_utils_1.A_CommonHelper
|
|
38
|
+
.toUpperSnakeCase(this.constructor.name)
|
|
39
|
+
.toLocaleLowerCase()
|
|
40
|
+
.replace(/_/g, '-');
|
|
41
|
+
}
|
|
33
42
|
constructor(props) {
|
|
34
43
|
super();
|
|
35
44
|
switch (true) {
|
|
@@ -76,6 +85,7 @@ class A_Entity extends A_Fragment_class_1.A_Fragment {
|
|
|
76
85
|
/**
|
|
77
86
|
* Extracts the entity from the ASEID
|
|
78
87
|
* entity is the name of the entity from Application Namespace
|
|
88
|
+
*
|
|
79
89
|
*/
|
|
80
90
|
get entity() {
|
|
81
91
|
return this.aseid.entity;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"A-Entity.class.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.class.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"A-Entity.class.js","sourceRoot":"","sources":["../../../../src/global/A-Entity/A-Entity.class.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,4CAIwB;AACxB,qDAM0B;AAC1B,yFAAiG;AACjG,kEAAyD;AACzD,kEAAyD;AACzD,qEAA4D;AAI5D;;;;;;GAMG;AACH,MAAa,QAKT,SAAQ,6BAAU;IAMlB;;OAEG;IACH,MAAM,KAAK,MAAM;QACb,OAAO,wBAAc;aAChB,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;aACvC,iBAAiB,EAAE;aACnB,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC5B,CAAC;IAcD,YAAY,KAA0D;QAClE,KAAK,EAAE,CAAC;QAER,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,CAAC,CAAC,KAAK,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,IAAI,KA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CAAC;QACd,IAAI,EAAE,0CAAyB,CAAC,IAAI;KACvC,CAAC;oCAOD"}
|
|
@@ -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,4CAA4E;AAC5E,kEAAyD;AAKzD;;;;;;;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;
|
|
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,4CAA4E;AAC5E,kEAAyD;AAKzD;;;;;;;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,uCAA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+B,EAAE,KAAK,CAAC,CAAC;gBAEpD,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;YAC7B,CAAC;QACL,CAAC;KAAA;IAGe,YAAY,CAAC,KAAgC;;YACzD,QAAQ,IAAI,EAAE,CAAC;gBACX,KAAK,KAAK,YAAY,iBAAO;oBACzB,MAAM,KAAK,CAAC;gBAGhB,KAAK,KAAK,YAAY,KAAK;uBACpB,KAAK,CAAC,OAAO,KAAK,gCAAgC;uBAClD,IAAI,CAAC,KAAK,KAAK,uCAAqB,CAAC,MAAM;oBAC9C,MAAM,IAAI,iBAAO,CAAC;wBACd,OAAO,EAAE,gCAAgC;wBACzC,IAAI,EAAE,gCAAgC;wBACtC,IAAI,EAAE;4BACF,OAAO,EAAE,IAAI;yBAChB;qBACJ,CAAC,CAAC;gBAGP,KAAK,KAAK,YAAY,KAAK;uBACpB,KAAK,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;AAzLD,8BAyLC"}
|
|
@@ -12,7 +12,23 @@ export declare enum A_TYPES__FeatureState {
|
|
|
12
12
|
FAILED = "FAILED"
|
|
13
13
|
}
|
|
14
14
|
export type A_TYPES__FeatureStep = {
|
|
15
|
+
/**
|
|
16
|
+
* The component to be called
|
|
17
|
+
*/
|
|
15
18
|
component: typeof A_Component;
|
|
19
|
+
/**
|
|
20
|
+
* The method to be called on the component
|
|
21
|
+
*/
|
|
16
22
|
handler: string;
|
|
23
|
+
/**
|
|
24
|
+
* Original Feature Extension name
|
|
25
|
+
*
|
|
26
|
+
* [!] could be string or regex
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Arguments to be passed to the method
|
|
32
|
+
*/
|
|
17
33
|
args: A_TYPES__ComponentMeta_InjectionParams;
|
|
18
34
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaas/a-concept",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.13",
|
|
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",
|
|
@@ -29,11 +29,11 @@ export class A_ComponentMeta extends A_Meta<A_TYPES__ComponentMeta> {
|
|
|
29
29
|
?.find(feature)
|
|
30
30
|
.forEach(([handler, extensions]) => {
|
|
31
31
|
extensions.forEach(extension => {
|
|
32
|
-
|
|
33
32
|
const args = injections?.get(extension.handler) || [];
|
|
34
33
|
|
|
35
34
|
steps.push({
|
|
36
35
|
// component: constructor,
|
|
36
|
+
name: extension.name,
|
|
37
37
|
handler: extension.handler,
|
|
38
38
|
args
|
|
39
39
|
});
|
|
@@ -47,7 +47,17 @@ export enum A_TYPES__ComponentMetaKey {
|
|
|
47
47
|
}
|
|
48
48
|
|
|
49
49
|
export type A_TYPES__ComponentMetaExtension = {
|
|
50
|
+
/**
|
|
51
|
+
* The name of original Extension Definition
|
|
52
|
+
*/
|
|
53
|
+
name: string,
|
|
54
|
+
/**
|
|
55
|
+
* The name of the handler that will be used to apply the extension
|
|
56
|
+
*/
|
|
50
57
|
handler: string,
|
|
58
|
+
/**
|
|
59
|
+
* The arguments that will be passed to the handler
|
|
60
|
+
*/
|
|
51
61
|
args: A_TYPES__ComponentMeta_InjectionParams
|
|
52
62
|
}
|
|
53
63
|
|
|
@@ -3,6 +3,7 @@ import { A_TYPES__Required } from "@adaas/a-utils";
|
|
|
3
3
|
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
4
4
|
import { A_Context } from "../A-Context/A-Context.class";
|
|
5
5
|
import { A_Scope } from "../A-Scope/A-Scope.class";
|
|
6
|
+
import { A_TYPES__FeatureConstructor } from "../A-Feature/A-Feature.types";
|
|
6
7
|
|
|
7
8
|
|
|
8
9
|
|
|
@@ -145,6 +146,53 @@ export class A_Container<
|
|
|
145
146
|
|
|
146
147
|
|
|
147
148
|
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* This method allows to get a feature Definition for the future reuse with custom Feature classes
|
|
152
|
+
*
|
|
153
|
+
* @param feature
|
|
154
|
+
*/
|
|
155
|
+
feature(
|
|
156
|
+
/**
|
|
157
|
+
* A-Feature method name to be called
|
|
158
|
+
*/
|
|
159
|
+
feature: _FeatureNames[number],
|
|
160
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>
|
|
161
|
+
feature(
|
|
162
|
+
/**
|
|
163
|
+
* A-Feature name to be called
|
|
164
|
+
*/
|
|
165
|
+
params: A_TYPES__Required<Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>, ['name']>,
|
|
166
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>
|
|
167
|
+
|
|
168
|
+
feature(
|
|
169
|
+
/**
|
|
170
|
+
* A-Feature method name to be called
|
|
171
|
+
*/
|
|
172
|
+
feature: _FeatureNames[number],
|
|
173
|
+
/**
|
|
174
|
+
* Parameters to provide additional data to the feature
|
|
175
|
+
*/
|
|
176
|
+
params: Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>,
|
|
177
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>
|
|
178
|
+
|
|
179
|
+
feature(
|
|
180
|
+
param1: _FeatureNames[number] | A_TYPES__Required<Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>, ['name']>,
|
|
181
|
+
param2?: Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>>
|
|
182
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']> {
|
|
183
|
+
|
|
184
|
+
const feature: string = typeof param1 === 'string'
|
|
185
|
+
? param1
|
|
186
|
+
: param1.name;
|
|
187
|
+
const params: Partial<A_TYPES__ContainerCallParams<_FeatureNames[number]>> = typeof param1 === 'string'
|
|
188
|
+
? param2 || {}
|
|
189
|
+
: param1;
|
|
190
|
+
|
|
191
|
+
return A_Context.featureDefinition(this, feature, params);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
148
196
|
// ==============================================================
|
|
149
197
|
// ======================= HOOKS ================================
|
|
150
198
|
// ==============================================================
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A_CommonHelper, A_Polyfills } from "@adaas/a-utils";
|
|
1
|
+
import { A_CommonHelper, A_Polyfills, A_TYPES__Required } from "@adaas/a-utils";
|
|
2
2
|
import { A_Component } from "../A-Component/A-Component.class";
|
|
3
3
|
import { A_Fragment } from "../A-Fragment/A-Fragment.class";
|
|
4
4
|
import { A_Feature } from "../A-Feature/A-Feature.class";
|
|
@@ -12,7 +12,7 @@ import { A_Concept } from "../A-Concept/A_Concept.class";
|
|
|
12
12
|
import { A_TYPES__EntityBaseMethod } from "../A-Entity/A-Entity.types";
|
|
13
13
|
import { A_Entity } from "../A-Entity/A-Entity.class";
|
|
14
14
|
import { A_EntityMeta } from "../A-Entity/A-Entity.meta";
|
|
15
|
-
import { A_TYPES__FeatureStep } from "../A-Feature/A-Feature.types";
|
|
15
|
+
import { A_TYPES__FeatureConstructor, A_TYPES__FeatureStep } from "../A-Feature/A-Feature.types";
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -339,33 +339,32 @@ export class A_Context {
|
|
|
339
339
|
}
|
|
340
340
|
|
|
341
341
|
|
|
342
|
-
|
|
343
342
|
/**
|
|
344
|
-
* This method returns a
|
|
343
|
+
* This method returns a constructor params to create a new feature
|
|
345
344
|
*
|
|
346
345
|
* @param scope
|
|
347
346
|
* @returns
|
|
348
347
|
*/
|
|
349
|
-
static
|
|
348
|
+
static featureDefinition<T extends Array<string>>(
|
|
350
349
|
entity: A_Entity<any, any, T>,
|
|
351
350
|
feature: A_TYPES__EntityBaseMethod | string | T[number] | RegExp,
|
|
352
351
|
params?: Partial<A_TYPES__ScopeConstructor>
|
|
353
|
-
):
|
|
354
|
-
static
|
|
352
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>
|
|
353
|
+
static featureDefinition<T extends Array<string>>(
|
|
355
354
|
container: A_Container<T>,
|
|
356
355
|
feature: T[number],
|
|
357
356
|
params?: Partial<A_TYPES__ScopeConstructor>
|
|
358
|
-
):
|
|
359
|
-
static
|
|
357
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>
|
|
358
|
+
static featureDefinition(
|
|
360
359
|
component: A_Component,
|
|
361
360
|
feature: string,
|
|
362
361
|
params?: Partial<A_TYPES__ScopeConstructor>
|
|
363
|
-
):
|
|
364
|
-
static
|
|
362
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']>
|
|
363
|
+
static featureDefinition<T extends Array<string>>(
|
|
365
364
|
param1: A_Component<T> | A_Container<T> | A_Entity<any, any, T>,
|
|
366
365
|
param2: string | T[number],
|
|
367
366
|
param3?: Partial<A_TYPES__ScopeConstructor>
|
|
368
|
-
):
|
|
367
|
+
): A_TYPES__Required<Partial<A_TYPES__FeatureConstructor>, ['steps', 'fragments', 'name', 'components']> {
|
|
369
368
|
|
|
370
369
|
|
|
371
370
|
const instance = this.getInstance();
|
|
@@ -389,9 +388,10 @@ export class A_Context {
|
|
|
389
388
|
// Get all extensions for the feature
|
|
390
389
|
meta
|
|
391
390
|
.extensions(feature)
|
|
392
|
-
.forEach(({ handler, args }) => {
|
|
391
|
+
.forEach(({ handler, args, name }) => {
|
|
393
392
|
steps.push({
|
|
394
393
|
component: constructor,
|
|
394
|
+
name,
|
|
395
395
|
handler,
|
|
396
396
|
args
|
|
397
397
|
});
|
|
@@ -402,13 +402,48 @@ export class A_Context {
|
|
|
402
402
|
}
|
|
403
403
|
});
|
|
404
404
|
|
|
405
|
-
|
|
405
|
+
|
|
406
|
+
return {
|
|
406
407
|
name: `${component.constructor.name}.${feature}`,
|
|
407
|
-
fragments: config.fragments,
|
|
408
|
-
components: config.components,
|
|
408
|
+
fragments: config.fragments || [],
|
|
409
|
+
components: config.components || [],
|
|
409
410
|
steps,
|
|
410
411
|
parent: component instanceof A_Container ? this.scope(component) : undefined
|
|
411
|
-
}
|
|
412
|
+
};
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
/**
|
|
418
|
+
* This method returns a step-by-step instructions of feature implementation depending on the feature name and the class.
|
|
419
|
+
*
|
|
420
|
+
* @param scope
|
|
421
|
+
* @returns
|
|
422
|
+
*/
|
|
423
|
+
static feature<T extends Array<string>>(
|
|
424
|
+
entity: A_Entity<any, any, T>,
|
|
425
|
+
feature: A_TYPES__EntityBaseMethod | string | T[number] | RegExp,
|
|
426
|
+
params?: Partial<A_TYPES__ScopeConstructor>
|
|
427
|
+
): A_Feature
|
|
428
|
+
static feature<T extends Array<string>>(
|
|
429
|
+
container: A_Container<T>,
|
|
430
|
+
feature: T[number],
|
|
431
|
+
params?: Partial<A_TYPES__ScopeConstructor>
|
|
432
|
+
): A_Feature
|
|
433
|
+
static feature(
|
|
434
|
+
component: A_Component,
|
|
435
|
+
feature: string,
|
|
436
|
+
params?: Partial<A_TYPES__ScopeConstructor>
|
|
437
|
+
): A_Feature
|
|
438
|
+
static feature<T extends Array<string>>(
|
|
439
|
+
param1: A_Component<T> | A_Container<T> | A_Entity<any, any, T>,
|
|
440
|
+
param2: string | T[number],
|
|
441
|
+
param3?: Partial<A_TYPES__ScopeConstructor>
|
|
442
|
+
): A_Feature {
|
|
443
|
+
|
|
444
|
+
const featureConstructor = this.featureDefinition(param1, param2, param3);
|
|
445
|
+
|
|
446
|
+
const newFeature = new A_Feature(featureConstructor);
|
|
412
447
|
|
|
413
448
|
return newFeature;
|
|
414
449
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
A_CommonHelper,
|
|
2
3
|
A_Error, A_TYPES__Required,
|
|
3
4
|
ASEID
|
|
4
5
|
} from "@adaas/a-utils";
|
|
@@ -34,6 +35,16 @@ export class A_Entity<
|
|
|
34
35
|
aseid!: ASEID;
|
|
35
36
|
|
|
36
37
|
|
|
38
|
+
/**
|
|
39
|
+
* Entity Identifier that corresponds to the class name
|
|
40
|
+
*/
|
|
41
|
+
static get entity(): string {
|
|
42
|
+
return A_CommonHelper
|
|
43
|
+
.toUpperSnakeCase(this.constructor.name)
|
|
44
|
+
.toLocaleLowerCase()
|
|
45
|
+
.replace(/_/g, '-');
|
|
46
|
+
}
|
|
47
|
+
|
|
37
48
|
constructor(
|
|
38
49
|
aseid: string
|
|
39
50
|
)
|
|
@@ -100,6 +111,7 @@ export class A_Entity<
|
|
|
100
111
|
/**
|
|
101
112
|
* Extracts the entity from the ASEID
|
|
102
113
|
* entity is the name of the entity from Application Namespace
|
|
114
|
+
*
|
|
103
115
|
*/
|
|
104
116
|
get entity(): string {
|
|
105
117
|
return this.aseid.entity;
|
|
@@ -20,7 +20,23 @@ export enum A_TYPES__FeatureState {
|
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
export type A_TYPES__FeatureStep = {
|
|
23
|
+
/**
|
|
24
|
+
* The component to be called
|
|
25
|
+
*/
|
|
23
26
|
component: typeof A_Component,
|
|
27
|
+
/**
|
|
28
|
+
* The method to be called on the component
|
|
29
|
+
*/
|
|
24
30
|
handler: string,
|
|
31
|
+
/**
|
|
32
|
+
* Original Feature Extension name
|
|
33
|
+
*
|
|
34
|
+
* [!] could be string or regex
|
|
35
|
+
*
|
|
36
|
+
*/
|
|
37
|
+
name: string,
|
|
38
|
+
/**
|
|
39
|
+
* Arguments to be passed to the method
|
|
40
|
+
*/
|
|
25
41
|
args: A_TYPES__ComponentMeta_InjectionParams
|
|
26
42
|
}
|