strata.client.core 0.0.1 → 0.0.2
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/Main → Main}/AbstractApplication.d.ts +13 -13
- package/{dist/Main → Main}/AbstractApplication.js +23 -21
- package/Main/AbstractApplication.js.map +1 -0
- package/{dist/Main → Main}/IApplication.d.ts +4 -4
- package/{dist/Presenter/IUpdatable.js → Main/IApplication.js} +3 -3
- package/Main/IApplication.js.map +1 -0
- package/Main/index.d.ts +2 -0
- package/Main/index.js +6 -0
- package/Main/index.js.map +1 -0
- package/{dist/Presenter → Presenter}/AbstractPresenter.d.ts +11 -11
- package/{dist/Presenter → Presenter}/AbstractPresenter.js +21 -20
- package/Presenter/AbstractPresenter.js.map +1 -0
- package/{dist/Presenter → Presenter}/AbstractUpdatable.d.ts +14 -14
- package/{dist/Presenter → Presenter}/AbstractUpdatable.js +32 -30
- package/Presenter/AbstractUpdatable.js.map +1 -0
- package/{dist/Presenter → Presenter}/Action.d.ts +9 -9
- package/{dist/Presenter → Presenter}/Action.js +18 -16
- package/Presenter/Action.js.map +1 -0
- package/{dist/Presenter → Presenter}/IAction.d.ts +5 -5
- package/{dist/Presenter → Presenter}/IAction.js +2 -2
- package/Presenter/IAction.js.map +1 -0
- package/{dist/Presenter → Presenter}/IModelStore.d.ts +11 -11
- package/{dist/Service/IResponse.js → Presenter/IModelStore.js} +3 -3
- package/Presenter/IModelStore.js.map +1 -0
- package/{dist/Presenter → Presenter}/IPresentable.d.ts +4 -4
- package/{dist/Presenter/IPresenter.js → Presenter/IPresentable.js} +3 -3
- package/Presenter/IPresentable.js.map +1 -0
- package/{dist/Presenter → Presenter}/IPresenter.d.ts +4 -4
- package/Presenter/IPresenter.js +3 -0
- package/Presenter/IPresenter.js.map +1 -0
- package/{dist/Presenter → Presenter}/IUpdatable.d.ts +8 -8
- package/Presenter/IUpdatable.js +3 -0
- package/Presenter/IUpdatable.js.map +1 -0
- package/{dist/Presenter → Presenter}/IView.d.ts +4 -4
- package/{dist/Presenter → Presenter}/IView.js +2 -2
- package/Presenter/IView.js.map +1 -0
- package/{dist/Presenter → Presenter}/IViewVisitor.d.ts +4 -4
- package/Presenter/IViewVisitor.js +3 -0
- package/Presenter/IViewVisitor.js.map +1 -0
- package/{dist/Presenter → Presenter}/ModelStore.d.ts +16 -16
- package/{dist/Presenter → Presenter}/ModelStore.js +58 -56
- package/Presenter/ModelStore.js.map +1 -0
- package/{dist/Presenter → Presenter}/SimpleAction.d.ts +9 -9
- package/{dist/Presenter → Presenter}/SimpleAction.js +19 -17
- package/Presenter/SimpleAction.js.map +1 -0
- package/Presenter/index.d.ts +10 -0
- package/Presenter/index.js +14 -0
- package/Presenter/index.js.map +1 -0
- package/{dist/Service → Service}/AbstractRestClient.d.ts +23 -23
- package/{dist/Service → Service}/AbstractRestClient.js +94 -91
- package/{dist/Service → Service}/AbstractRestClient.js.map +1 -1
- package/{dist/Service → Service}/IResponse.d.ts +8 -8
- package/{src/Presenter/IAction.js → Service/IResponse.js} +3 -3
- package/Service/IResponse.js.map +1 -0
- package/{dist/Service → Service}/IResponseProcessor.d.ts +4 -4
- package/{dist/Main/IApplication.js → Service/IResponseProcessor.js} +3 -3
- package/Service/IResponseProcessor.js.map +1 -0
- package/{dist/Service → Service}/ServiceError.d.ts +10 -10
- package/{dist/Service → Service}/ServiceError.js +31 -28
- package/Service/ServiceError.js.map +1 -0
- package/{dist/Service → Service}/StandardResponse.d.ts +12 -12
- package/{dist/Service → Service}/StandardResponse.js +31 -29
- package/Service/StandardResponse.js.map +1 -0
- package/{dist/Service → Service}/StandardResponseProcessor.d.ts +5 -5
- package/{dist/Service → Service}/StandardResponseProcessor.js +16 -16
- package/Service/StandardResponseProcessor.js.map +1 -0
- package/Service/index.d.ts +6 -0
- package/Service/index.js +12 -0
- package/Service/index.js.map +1 -0
- package/package.json +15 -20
- package/strata.client.core-v0.0.1.tgz +0 -0
- package/Strata.Client.Core.iml +0 -10
- package/dist/Main/AbstractApplication.js.map +0 -1
- package/dist/Main/IApplication.js.map +0 -1
- package/dist/Presenter/AbstractPresenter.js.map +0 -1
- package/dist/Presenter/AbstractUpdatable.js.map +0 -1
- package/dist/Presenter/Action.js.map +0 -1
- package/dist/Presenter/IAction.js.map +0 -1
- package/dist/Presenter/IModelStore.js +0 -3
- package/dist/Presenter/IModelStore.js.map +0 -1
- package/dist/Presenter/IPresentable.js +0 -3
- package/dist/Presenter/IPresentable.js.map +0 -1
- package/dist/Presenter/IPresenter.js.map +0 -1
- package/dist/Presenter/IUpdatable.js.map +0 -1
- package/dist/Presenter/IView.js.map +0 -1
- package/dist/Presenter/IViewVisitor.js +0 -3
- package/dist/Presenter/IViewVisitor.js.map +0 -1
- package/dist/Presenter/ModelStore.js.map +0 -1
- package/dist/Presenter/SimpleAction.js.map +0 -1
- package/dist/Service/IResponse.js.map +0 -1
- package/dist/Service/IResponseProcessor.js +0 -3
- package/dist/Service/IResponseProcessor.js.map +0 -1
- package/dist/Service/ServiceError.js.map +0 -1
- package/dist/Service/StandardResponse.js.map +0 -1
- package/dist/Service/StandardResponseProcessor.js.map +0 -1
- package/dist/index.d.ts +0 -18
- package/dist/index.js +0 -23
- package/dist/index.js.map +0 -1
- package/src/Main/AbstractApplication.ts +0 -39
- package/src/Main/IApplication.ts +0 -7
- package/src/Presenter/AbstractPresenter.js +0 -21
- package/src/Presenter/AbstractPresenter.js.map +0 -1
- package/src/Presenter/AbstractPresenter.ts +0 -35
- package/src/Presenter/AbstractUpdatable.js +0 -27
- package/src/Presenter/AbstractUpdatable.js.map +0 -1
- package/src/Presenter/AbstractUpdatable.ts +0 -52
- package/src/Presenter/Action.ts +0 -27
- package/src/Presenter/IAction.js.map +0 -1
- package/src/Presenter/IAction.ts +0 -9
- package/src/Presenter/IModelStore.js +0 -3
- package/src/Presenter/IModelStore.js.map +0 -1
- package/src/Presenter/IModelStore.ts +0 -21
- package/src/Presenter/IPresentable.ts +0 -9
- package/src/Presenter/IPresenter.js +0 -3
- package/src/Presenter/IPresenter.js.map +0 -1
- package/src/Presenter/IPresenter.ts +0 -6
- package/src/Presenter/IUpdatable.js +0 -3
- package/src/Presenter/IUpdatable.js.map +0 -1
- package/src/Presenter/IUpdatable.ts +0 -16
- package/src/Presenter/IView.ts +0 -7
- package/src/Presenter/IViewVisitor.ts +0 -7
- package/src/Presenter/ModelStore.js +0 -32
- package/src/Presenter/ModelStore.js.map +0 -1
- package/src/Presenter/ModelStore.ts +0 -95
- package/src/Presenter/SimpleAction.ts +0 -27
- package/src/Service/AbstractRestClient.ts +0 -171
- package/src/Service/IResponse.ts +0 -16
- package/src/Service/IResponseProcessor.ts +0 -7
- package/src/Service/ServiceError.ts +0 -43
- package/src/Service/StandardResponse.ts +0 -48
- package/src/Service/StandardResponseProcessor.ts +0 -21
- package/src/index.ts +0 -20
- package/strata.client.core-0.0.1.tgz +0 -0
- package/tsconfig.json +0 -18
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IResponse } from "./IResponse";
|
|
2
|
-
export declare class StandardResponse implements IResponse {
|
|
3
|
-
private readonly requestPath;
|
|
4
|
-
private readonly response;
|
|
5
|
-
constructor(rootPath: string, methodPath: string, response: Response);
|
|
6
|
-
getRequestPath(): string;
|
|
7
|
-
getMediaType(): string;
|
|
8
|
-
getStatus(): number;
|
|
9
|
-
getStatusReason(): string;
|
|
10
|
-
readEntity<E>(): Promise<E>;
|
|
11
|
-
close(): void;
|
|
12
|
-
}
|
|
1
|
+
import { IResponse } from "./IResponse";
|
|
2
|
+
export declare class StandardResponse implements IResponse {
|
|
3
|
+
private readonly requestPath;
|
|
4
|
+
private readonly response;
|
|
5
|
+
constructor(rootPath: string, methodPath: string, response: Response);
|
|
6
|
+
getRequestPath(): string;
|
|
7
|
+
getMediaType(): string;
|
|
8
|
+
getStatus(): number;
|
|
9
|
+
getStatusReason(): string;
|
|
10
|
+
readEntity<E>(): Promise<E>;
|
|
11
|
+
close(): void;
|
|
12
|
+
}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StandardResponse = void 0;
|
|
4
|
-
class StandardResponse {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StandardResponse = void 0;
|
|
4
|
+
class StandardResponse {
|
|
5
|
+
requestPath;
|
|
6
|
+
response;
|
|
7
|
+
constructor(rootPath, methodPath, response) {
|
|
8
|
+
this.requestPath = rootPath + '/' + methodPath;
|
|
9
|
+
this.response = response;
|
|
10
|
+
}
|
|
11
|
+
getRequestPath() {
|
|
12
|
+
return this.requestPath;
|
|
13
|
+
}
|
|
14
|
+
getMediaType() {
|
|
15
|
+
if (this.response.headers.has("Content-Type"))
|
|
16
|
+
return this.response.headers.get("Content-Type");
|
|
17
|
+
return "unknown";
|
|
18
|
+
}
|
|
19
|
+
getStatus() {
|
|
20
|
+
return this.response.status;
|
|
21
|
+
}
|
|
22
|
+
getStatusReason() {
|
|
23
|
+
return this.response.statusText;
|
|
24
|
+
}
|
|
25
|
+
readEntity() {
|
|
26
|
+
return this.response.json().then(value => value);
|
|
27
|
+
}
|
|
28
|
+
close() {
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.StandardResponse = StandardResponse;
|
|
30
32
|
//# sourceMappingURL=StandardResponse.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StandardResponse.js","sourceRoot":"","sources":["../../../main/typescript/Service/StandardResponse.ts"],"names":[],"mappings":";;;AAEA,MACM,gBAAgB;IAGD,WAAW,CAAS;IACpB,QAAQ,CAAW;IAEpC,YAAY,QAAgB,EAAC,UAAkB,EAAC,QAAkB;QAE9D,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,CAAC;QAC/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,cAAc;QAEV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,YAAY;QAER,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;YACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAErD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,SAAS;QAEL,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,eAAe;QAEX,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IACpC,CAAC;IAED,UAAU;QAEN,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAI,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,KAAK;IAEL,CAAC;CAEJ;AA7CD,4CA6CC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IResponseProcessor } from "./IResponseProcessor";
|
|
2
|
-
import { IResponse } from "./IResponse";
|
|
3
|
-
export declare class StandardResponseProcessor implements IResponseProcessor {
|
|
4
|
-
process<R>(response: IResponse): Promise<R>;
|
|
5
|
-
}
|
|
1
|
+
import { IResponseProcessor } from "./IResponseProcessor";
|
|
2
|
+
import { IResponse } from "./IResponse";
|
|
3
|
+
export declare class StandardResponseProcessor implements IResponseProcessor {
|
|
4
|
+
process<R>(response: IResponse): Promise<R>;
|
|
5
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StandardResponseProcessor = void 0;
|
|
4
|
-
const ServiceError_1 = require("./ServiceError");
|
|
5
|
-
class StandardResponseProcessor {
|
|
6
|
-
process(response) {
|
|
7
|
-
switch (response.getStatus()) {
|
|
8
|
-
case 200: // OK
|
|
9
|
-
case 500: //INTERNAL_SERVER_ERROR
|
|
10
|
-
return response.readEntity();
|
|
11
|
-
default:
|
|
12
|
-
throw new ServiceError_1.ServiceError(response);
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
exports.StandardResponseProcessor = StandardResponseProcessor;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StandardResponseProcessor = void 0;
|
|
4
|
+
const ServiceError_1 = require("./ServiceError");
|
|
5
|
+
class StandardResponseProcessor {
|
|
6
|
+
process(response) {
|
|
7
|
+
switch (response.getStatus()) {
|
|
8
|
+
case 200: // OK
|
|
9
|
+
case 500: //INTERNAL_SERVER_ERROR
|
|
10
|
+
return response.readEntity();
|
|
11
|
+
default:
|
|
12
|
+
throw new ServiceError_1.ServiceError(response);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.StandardResponseProcessor = StandardResponseProcessor;
|
|
17
17
|
//# sourceMappingURL=StandardResponseProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StandardResponseProcessor.js","sourceRoot":"","sources":["../../../main/typescript/Service/StandardResponseProcessor.ts"],"names":[],"mappings":";;;AAEA,iDAA4C;AAE5C,MACM,yBAAyB;IAG3B,OAAO,CAAI,QAAmB;QAE1B,QAAQ,QAAQ,CAAC,SAAS,EAAE,EAC5B;YACI,KAAK,GAAG,CAAC,CAAC,KAAK;YACf,KAAK,GAAG,EAAE,uBAAuB;gBAC7B,OAAO,QAAQ,CAAC,UAAU,EAAK,CAAC;YAEpC;gBACI,MAAM,IAAI,2BAAY,CAAC,QAAQ,CAAC,CAAC;SACxC;IACL,CAAC;CACJ;AAhBD,8DAgBC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { IResponse } from "./IResponse";
|
|
2
|
+
export { IResponseProcessor } from "./IResponseProcessor";
|
|
3
|
+
export { StandardResponse } from "./StandardResponse";
|
|
4
|
+
export { StandardResponseProcessor } from "./StandardResponseProcessor";
|
|
5
|
+
export { AbstractRestClient } from "./AbstractRestClient";
|
|
6
|
+
export { ServiceError } from "./ServiceError";
|
package/Service/index.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ServiceError = exports.AbstractRestClient = exports.StandardResponseProcessor = exports.StandardResponse = void 0;
|
|
4
|
+
var StandardResponse_1 = require("./StandardResponse");
|
|
5
|
+
Object.defineProperty(exports, "StandardResponse", { enumerable: true, get: function () { return StandardResponse_1.StandardResponse; } });
|
|
6
|
+
var StandardResponseProcessor_1 = require("./StandardResponseProcessor");
|
|
7
|
+
Object.defineProperty(exports, "StandardResponseProcessor", { enumerable: true, get: function () { return StandardResponseProcessor_1.StandardResponseProcessor; } });
|
|
8
|
+
var AbstractRestClient_1 = require("./AbstractRestClient");
|
|
9
|
+
Object.defineProperty(exports, "AbstractRestClient", { enumerable: true, get: function () { return AbstractRestClient_1.AbstractRestClient; } });
|
|
10
|
+
var ServiceError_1 = require("./ServiceError");
|
|
11
|
+
Object.defineProperty(exports, "ServiceError", { enumerable: true, get: function () { return ServiceError_1.ServiceError; } });
|
|
12
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../main/typescript/Service/index.ts"],"names":[],"mappings":";;;AAEA,uDAAoD;AAA5C,oHAAA,gBAAgB,OAAA;AACxB,yEAAsE;AAA9D,sIAAA,yBAAyB,OAAA;AACjC,2DAAwD;AAAhD,wHAAA,kBAAkB,OAAA;AAC1B,+CAA4C;AAApC,4GAAA,YAAY,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
"dependencies": {
|
|
17
|
-
"rxjs": "^6.5.5",
|
|
18
|
-
"strata.foundation.core": "0.0.0"
|
|
19
|
-
}
|
|
20
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "strata.client.core",
|
|
3
|
+
"version": "0.0.2",
|
|
4
|
+
"license": "Apache-2.0",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"increment-major": "npm version major",
|
|
7
|
+
"increment-minor": "npm version minor",
|
|
8
|
+
"increment-patch": "npm version patch"
|
|
9
|
+
},
|
|
10
|
+
"dependencies": {
|
|
11
|
+
"rxjs": "^6.5.5",
|
|
12
|
+
"strata.foundation.core": "^0.0.6",
|
|
13
|
+
"typescript": "^5.1.6"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
Binary file
|
package/Strata.Client.Core.iml
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<module type="WEB_MODULE" version="4">
|
|
3
|
-
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
|
4
|
-
<exclude-output />
|
|
5
|
-
<content url="file://$MODULE_DIR$">
|
|
6
|
-
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
|
7
|
-
</content>
|
|
8
|
-
<orderEntry type="sourceFolder" forTests="false" />
|
|
9
|
-
</component>
|
|
10
|
-
</module>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractApplication.js","sourceRoot":"","sources":["../../src/Main/AbstractApplication.ts"],"names":[],"mappings":";;;AAIA,MACe,mBAAmB;IAM9B;QAEI,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;QACvB,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;IAC1B,CAAC;IAES,UAAU,CAAC,UAAuB,EAAC,SAAY;QAErD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;QAE3B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;IAC3C,CAAC;IAMS,aAAa;QAEnB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAES,YAAY;QAElB,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;CACJ;AAlCD,kDAkCC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IApplication.js","sourceRoot":"","sources":["../../src/Main/IApplication.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractPresenter.js","sourceRoot":"","sources":["../../src/Presenter/AbstractPresenter.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAItD,MACe,iBACX,SAAQ,qCAAoB;IAK5B,YAAsB,GAAW,EAAC,UAAwB;QAEtD,KAAK,CAAC,GAAG,EAAC,UAAU,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,OAAO,CAAC,IAAO;QAEX,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAED,OAAO;QAEH,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAED,MAAM,CAAC,KAAQ;QAEX,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAC,KAAK,CAAC,CAAC;IACnC,CAAC;CAIJ;AA9BD,8CA8BC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractUpdatable.js","sourceRoot":"","sources":["../../src/Presenter/AbstractUpdatable.ts"],"names":[],"mappings":";;;AAIA,MACe,iBAAiB;IAM5B,YAAsB,GAAW,EAAC,UAAwB;QAEtD,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QAEf,IAAI,UAAU,IAAI,IAAI,EACtB;YACI,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;YAC7B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;SAChC;;YAEG,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC/B,CAAC;IAED,aAAa,CAAC,UAAuB;QAEjC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAED,eAAe;QAEX,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3B,CAAC;IAED,aAAa;QAET,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,MAAM;QAEF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAIS,QAAQ,CAAI,MAAkB;QAEpC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CAEJ;AA/CD,8CA+CC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Action.js","sourceRoot":"","sources":["../../src/Presenter/Action.ts"],"names":[],"mappings":";;;AAGA,MACM,MAAM;IAMR,YAAY,GAAW,EAAC,MAAyC;QAE7D,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,MAAM;QAEF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,KAAQ;QAEV,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;CAEJ;AAvBD,wBAuBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAction.js","sourceRoot":"","sources":["../../src/Presenter/IAction.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelStore.js","sourceRoot":"","sources":["../../src/Presenter/IModelStore.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPresentable.js","sourceRoot":"","sources":["../../src/Presenter/IPresentable.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IPresenter.js","sourceRoot":"","sources":["../../src/Presenter/IPresenter.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IUpdatable.js","sourceRoot":"","sources":["../../src/Presenter/IUpdatable.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IView.js","sourceRoot":"","sources":["../../src/Presenter/IView.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IViewVisitor.js","sourceRoot":"","sources":["../../src/Presenter/IViewVisitor.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ModelStore.js","sourceRoot":"","sources":["../../src/Presenter/ModelStore.ts"],"names":[],"mappings":";;;AAIA,mEAAgD;AAEhD,MACM,UAAU;IAMZ;QAEI,IAAI,CAAC,UAAU,GAAG,IAAI,iCAAQ,EAAiB,CAAC;QAChD,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAAkB,CAAC;IAC5C,CAAC;IAED,MAAM,CAAI,SAAwB;QAE9B,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,EAAE,EAAC,SAAS,CAAC,CAAC;QAElD,IAAI,SAAS,CAAC,aAAa,EAAE,IAAI,IAAI;YACjC,SAAS,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAElC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAI,SAAwB;QAE9B,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,EAAC,SAAS,CAAC,CAAC;QAErD,IAAI,SAAS,CAAC,aAAa,EAAE,IAAI,IAAI;YACjC,SAAS,CAAC,eAAe,EAAE,CAAC;QAEhC,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAI,GAAW,EAAE,KAAQ;QAE3B,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAC,KAAK,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,MAAM,CAAC,GAAW;QAEd,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QACxB,OAAO,IAAI,CAAC;IAChB,CAAC;IAED,YAAY,CAAC,GAAW;QAEpB,OAAO,IAAI,CAAC,UAAU,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;IAC5C,CAAC;IAED,QAAQ,CAAC,GAAW;QAEhB,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAChC,CAAC;IAED,KAAK,CAAI,MAAkB;QAEvB,IAAI,GAAG,GAAW,MAAM,CAAC,MAAM,EAAE,CAAC;QAClC,IAAI,UAAU,GAAkB,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACzD,IAAI,KAAK,GAAS,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;QACvC,IAAI,OAAO,GAAwB,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QAEvD,IAAI,CAAC,OAAO,CAAC,GAAG,EAAC,OAAO,EAAC,KAAK,EAAC,UAAU,CAAC,CAAC;IAC/C,CAAC;IAEO,OAAO,CACX,GAAkB,EAClB,OAA+B,EAC/B,QAAa,EACb,UAAyB;QAEzB,OAAO;aACF,SAAS,CACN,OAAO,CAAC,EAAE;YAEN,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;YACxB,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAC,OAAO,CAAC,CAAC;YAC7B,OAAO,OAAO,CAAC;QACnB,CAAC,CAAC;aACL,UAAU,CACP,OAAO,CAAC,EAAE,CACN,UAAU;aACL,GAAG,CAAC,SAAS,CAAC,EAAE,CAAgB,SAAS,CAAC;aAC1C,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,EACxD,KAAK,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;aACjC,SAAS,EAAE,CAAC;IACrB,CAAC;CAEJ;AAxFD,gCAwFC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleAction.js","sourceRoot":"","sources":["../../src/Presenter/SimpleAction.ts"],"names":[],"mappings":";;;AACA,mEAA8E;AAE9E,MACM,YAAY;IAMd,YAAY,GAAW,EAAC,MAAuB;QAE3C,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACzB,CAAC;IAED,MAAM;QAEF,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAED,KAAK,CAAC,KAAQ;QAEV,OAAO,8CAAqB,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAChE,CAAC;CAEJ;AAvBD,oCAuBC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IResponse.js","sourceRoot":"","sources":["../../src/Service/IResponse.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IResponseProcessor.js","sourceRoot":"","sources":["../../src/Service/IResponseProcessor.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceError.js","sourceRoot":"","sources":["../../src/Service/ServiceError.ts"],"names":[],"mappings":";;;AAEA,MACM,YACF,SAAQ,KAAK;IAMb,YAAY,QAAmB;QAE3B,KAAK,CAAC,6BAA6B,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/C,IAAI,CAAC,WAAW,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC;QAC7C,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,SAAS,EAAE,CAAC;QACnC,IAAI,CAAC,YAAY,GAAG,QAAQ,CAAC,eAAe,EAAE,CAAC;IACnD,CAAC;IAED,cAAc;QAEV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,SAAS;QAEL,OAAO,IAAI,CAAC,MAAM,CAAC;IACvB,CAAC;IAED,eAAe;QAEX,OAAO,IAAI,CAAC,YAAY,CAAC;IAC7B,CAAC;CAEJ;AA/BD,oCA+BC;AAED,SAAS,6BAA6B,CAAC,QAAmB;IAEtD,OAAO,yCAAyC;QAC5C,kBAAkB,GAAG,QAAQ,CAAC,cAAc,EAAE,GAAG,IAAI;QACrD,0BAA0B,GAAG,QAAQ,CAAC,SAAS,EAAE,GAAG,IAAI;QACxD,6BAA6B,GAAG,QAAQ,CAAC,eAAe,EAAE,GAAG,IAAI;QACjE,yBAAyB,GAAG,QAAQ,CAAC,YAAY,EAAE,GAAG,IAAI,CAAC;AACnE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StandardResponse.js","sourceRoot":"","sources":["../../src/Service/StandardResponse.ts"],"names":[],"mappings":";;;AAEA,MACM,gBAAgB;IAMlB,YAAY,QAAgB,EAAC,UAAkB,EAAC,QAAkB;QAE9D,IAAI,CAAC,WAAW,GAAG,QAAQ,GAAG,GAAG,GAAG,UAAU,CAAC;QAC/C,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC7B,CAAC;IAED,cAAc;QAEV,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,YAAY;QAER,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC;YACzC,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;QAErD,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,SAAS;QAEL,OAAO,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC;IAChC,CAAC;IAED,eAAe;QAEX,OAAO,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC;IACpC,CAAC;IAED,UAAU;QAEN,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAI,KAAK,CAAC,CAAC;IACxD,CAAC;IAED,KAAK;IAEL,CAAC;CAEJ;AA7CD,4CA6CC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"StandardResponseProcessor.js","sourceRoot":"","sources":["../../src/Service/StandardResponseProcessor.ts"],"names":[],"mappings":";;;AAEA,iDAA4C;AAE5C,MACM,yBAAyB;IAG3B,OAAO,CAAI,QAAmB;QAE1B,QAAQ,QAAQ,CAAC,SAAS,EAAE,EAC5B;YACI,KAAK,GAAG,CAAC,CAAC,KAAK;YACf,KAAK,GAAG,EAAE,uBAAuB;gBAC7B,OAAO,QAAQ,CAAC,UAAU,EAAK,CAAC;YAEpC;gBACI,MAAM,IAAI,2BAAY,CAAC,QAAQ,CAAC,CAAC;SACxC;IACL,CAAC;CACJ;AAhBD,8DAgBC"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export { IUpdatable } from './Presenter/IUpdatable';
|
|
2
|
-
export { IPresentable } from './Presenter/IPresentable';
|
|
3
|
-
export { IAction } from './Presenter/IAction';
|
|
4
|
-
export { IModelStore } from './Presenter/IModelStore';
|
|
5
|
-
export { IPresenter } from './Presenter/IPresenter';
|
|
6
|
-
export { AbstractUpdatable } from './Presenter/AbstractUpdatable';
|
|
7
|
-
export { AbstractPresenter } from './Presenter/AbstractPresenter';
|
|
8
|
-
export { ModelStore } from './Presenter/ModelStore';
|
|
9
|
-
export { Action } from './Presenter/Action';
|
|
10
|
-
export { SimpleAction } from './Presenter/SimpleAction';
|
|
11
|
-
export { IResponse } from "./Service/IResponse";
|
|
12
|
-
export { IResponseProcessor } from "./Service/IResponseProcessor";
|
|
13
|
-
export { StandardResponse } from "./Service/StandardResponse";
|
|
14
|
-
export { StandardResponseProcessor } from "./Service/StandardResponseProcessor";
|
|
15
|
-
export { AbstractRestClient } from "./Service/AbstractRestClient";
|
|
16
|
-
export { ServiceError } from "./Service/ServiceError";
|
|
17
|
-
export { IApplication } from './Main/IApplication';
|
|
18
|
-
export { AbstractApplication } from './Main/AbstractApplication';
|
package/dist/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
var AbstractUpdatable_1 = require("./Presenter/AbstractUpdatable");
|
|
4
|
-
Object.defineProperty(exports, "AbstractUpdatable", { enumerable: true, get: function () { return AbstractUpdatable_1.AbstractUpdatable; } });
|
|
5
|
-
var AbstractPresenter_1 = require("./Presenter/AbstractPresenter");
|
|
6
|
-
Object.defineProperty(exports, "AbstractPresenter", { enumerable: true, get: function () { return AbstractPresenter_1.AbstractPresenter; } });
|
|
7
|
-
var ModelStore_1 = require("./Presenter/ModelStore");
|
|
8
|
-
Object.defineProperty(exports, "ModelStore", { enumerable: true, get: function () { return ModelStore_1.ModelStore; } });
|
|
9
|
-
var Action_1 = require("./Presenter/Action");
|
|
10
|
-
Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return Action_1.Action; } });
|
|
11
|
-
var SimpleAction_1 = require("./Presenter/SimpleAction");
|
|
12
|
-
Object.defineProperty(exports, "SimpleAction", { enumerable: true, get: function () { return SimpleAction_1.SimpleAction; } });
|
|
13
|
-
var StandardResponse_1 = require("./Service/StandardResponse");
|
|
14
|
-
Object.defineProperty(exports, "StandardResponse", { enumerable: true, get: function () { return StandardResponse_1.StandardResponse; } });
|
|
15
|
-
var StandardResponseProcessor_1 = require("./Service/StandardResponseProcessor");
|
|
16
|
-
Object.defineProperty(exports, "StandardResponseProcessor", { enumerable: true, get: function () { return StandardResponseProcessor_1.StandardResponseProcessor; } });
|
|
17
|
-
var AbstractRestClient_1 = require("./Service/AbstractRestClient");
|
|
18
|
-
Object.defineProperty(exports, "AbstractRestClient", { enumerable: true, get: function () { return AbstractRestClient_1.AbstractRestClient; } });
|
|
19
|
-
var ServiceError_1 = require("./Service/ServiceError");
|
|
20
|
-
Object.defineProperty(exports, "ServiceError", { enumerable: true, get: function () { return ServiceError_1.ServiceError; } });
|
|
21
|
-
var AbstractApplication_1 = require("./Main/AbstractApplication");
|
|
22
|
-
Object.defineProperty(exports, "AbstractApplication", { enumerable: true, get: function () { return AbstractApplication_1.AbstractApplication; } });
|
|
23
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AAKA,mEAAgE;AAAxD,sHAAA,iBAAiB,OAAA;AACzB,mEAAgE;AAAxD,sHAAA,iBAAiB,OAAA;AACzB,qDAAkD;AAA1C,wGAAA,UAAU,OAAA;AAClB,6CAA0C;AAAlC,gGAAA,MAAM,OAAA;AACd,yDAAsD;AAA9C,4GAAA,YAAY,OAAA;AAIpB,+DAA4D;AAApD,oHAAA,gBAAgB,OAAA;AACxB,iFAA8E;AAAtE,sIAAA,yBAAyB,OAAA;AACjC,mEAAgE;AAAxD,wHAAA,kBAAkB,OAAA;AAC1B,uDAAoD;AAA5C,4GAAA,YAAY,OAAA;AAGpB,kEAA+D;AAAvD,0HAAA,mBAAmB,OAAA"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import {IApplication} from "./IApplication";
|
|
2
|
-
import {IModelStore} from "../Presenter/IModelStore";
|
|
3
|
-
import {IPresenter} from "../Presenter/IPresenter";
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
abstract class AbstractApplication<M,V,P extends IPresenter<M,V>>
|
|
7
|
-
implements IApplication
|
|
8
|
-
{
|
|
9
|
-
private modelstore: IModelStore;
|
|
10
|
-
private presenter: P;
|
|
11
|
-
|
|
12
|
-
protected constructor()
|
|
13
|
-
{
|
|
14
|
-
this.modelstore = null;
|
|
15
|
-
this.presenter = null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
protected initialize(modelstore: IModelStore,presenter: P)
|
|
19
|
-
{
|
|
20
|
-
this.modelstore = modelstore;
|
|
21
|
-
this.presenter = presenter;
|
|
22
|
-
|
|
23
|
-
this.modelstore.attach(this.presenter);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
abstract start(): void;
|
|
27
|
-
|
|
28
|
-
abstract stop(): void;
|
|
29
|
-
|
|
30
|
-
protected getModelStore(): IModelStore
|
|
31
|
-
{
|
|
32
|
-
return this.modelstore;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
protected getPresenter(): P
|
|
36
|
-
{
|
|
37
|
-
return this.presenter;
|
|
38
|
-
}
|
|
39
|
-
}
|
package/src/Main/IApplication.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractPresenter = void 0;
|
|
4
|
-
const AbstractUpdatable_1 = require("./AbstractUpdatable");
|
|
5
|
-
class AbstractPresenter extends AbstractUpdatable_1.AbstractUpdatable {
|
|
6
|
-
constructor(modelstore, key) {
|
|
7
|
-
super(modelstore, key);
|
|
8
|
-
this.view = null;
|
|
9
|
-
}
|
|
10
|
-
getView() {
|
|
11
|
-
return this.view;
|
|
12
|
-
}
|
|
13
|
-
update(model) {
|
|
14
|
-
this.doUpdate(this.view, model);
|
|
15
|
-
}
|
|
16
|
-
setView(view) {
|
|
17
|
-
this.view = view;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
exports.AbstractPresenter = AbstractPresenter;
|
|
21
|
-
//# sourceMappingURL=AbstractPresenter.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractPresenter.js","sourceRoot":"","sources":["AbstractPresenter.ts"],"names":[],"mappings":";;;AAAA,2DAAsD;AAItD,MACe,iBACX,SAAQ,qCAAoB;IAK5B,YAAsB,UAAuB,EAAC,GAAW;QAErD,KAAK,CAAC,UAAU,EAAC,GAAG,CAAC,CAAC;QACtB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;IAEM,OAAO;QAEV,OAAO,IAAI,CAAC,IAAI,CAAC;IACrB,CAAC;IAEM,MAAM,CAAC,KAAQ;QAElB,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAC,KAAK,CAAC,CAAC;IACnC,CAAC;IAES,OAAO,CAAC,IAAO;QAErB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CAGJ;AA7BD,8CA6BC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import {AbstractUpdatable} from "./AbstractUpdatable";
|
|
2
|
-
import {IPresenter} from "./IPresenter";
|
|
3
|
-
import {IModelStore} from "./IModelStore";
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
abstract class AbstractPresenter<M,V>
|
|
7
|
-
extends AbstractUpdatable<M>
|
|
8
|
-
implements IPresenter<M,V>
|
|
9
|
-
{
|
|
10
|
-
private view: V;
|
|
11
|
-
|
|
12
|
-
protected constructor(key: string,modelstore?: IModelStore)
|
|
13
|
-
{
|
|
14
|
-
super(key,modelstore);
|
|
15
|
-
this.view = null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
setView(view: V): void
|
|
19
|
-
{
|
|
20
|
-
this.view = view;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
getView(): V
|
|
24
|
-
{
|
|
25
|
-
return this.view;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
update(model: M): void
|
|
29
|
-
{
|
|
30
|
-
this.doUpdate(this.view,model);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
protected abstract doUpdate(view: V,model: M): void;
|
|
35
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AbstractUpdatable = void 0;
|
|
4
|
-
class AbstractUpdatable {
|
|
5
|
-
constructor(modelstore, key) {
|
|
6
|
-
this.modelStore = modelstore;
|
|
7
|
-
this.key = key;
|
|
8
|
-
this.modelStore.attach(this);
|
|
9
|
-
}
|
|
10
|
-
setModelStore(modelStore) {
|
|
11
|
-
this.modelStore = modelStore;
|
|
12
|
-
}
|
|
13
|
-
clearModelStore() {
|
|
14
|
-
this.modelStore = null;
|
|
15
|
-
}
|
|
16
|
-
getModelStore() {
|
|
17
|
-
return this.modelStore;
|
|
18
|
-
}
|
|
19
|
-
getKey() {
|
|
20
|
-
return this.key;
|
|
21
|
-
}
|
|
22
|
-
dispatch(action) {
|
|
23
|
-
this.modelStore.apply(action);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
exports.AbstractUpdatable = AbstractUpdatable;
|
|
27
|
-
//# sourceMappingURL=AbstractUpdatable.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractUpdatable.js","sourceRoot":"","sources":["AbstractUpdatable.ts"],"names":[],"mappings":";;;AAIA,MACe,iBAAiB;IAM5B,YAAsB,UAAsB,EAAC,GAAW;QAEpD,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;QAC7B,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;QACf,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACjC,CAAC;IAEM,aAAa,CAAC,UAAuB;QAExC,IAAI,CAAC,UAAU,GAAG,UAAU,CAAC;IACjC,CAAC;IAEM,eAAe;QAElB,IAAI,CAAC,UAAU,GAAG,IAAI,CAAC;IAC3B,CAAC;IAEM,aAAa;QAEhB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAEM,MAAM;QAET,OAAO,IAAI,CAAC,GAAG,CAAC;IACpB,CAAC;IAIS,QAAQ,CAAI,MAAkB;QAEpC,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CAEJ;AAzCD,8CAyCC"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import {IUpdatable} from "./IUpdatable";
|
|
2
|
-
import {IModelStore} from "./IModelStore";
|
|
3
|
-
import {IAction} from "./IAction";
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
abstract class AbstractUpdatable<M>
|
|
7
|
-
implements IUpdatable<M>
|
|
8
|
-
{
|
|
9
|
-
private modelstore: IModelStore;
|
|
10
|
-
private readonly key: string;
|
|
11
|
-
|
|
12
|
-
protected constructor(key: string,modelstore?: IModelStore)
|
|
13
|
-
{
|
|
14
|
-
this.key = key;
|
|
15
|
-
|
|
16
|
-
if (modelstore != null)
|
|
17
|
-
{
|
|
18
|
-
this.modelstore = modelstore;
|
|
19
|
-
this.modelstore.attach(this);
|
|
20
|
-
}
|
|
21
|
-
else
|
|
22
|
-
this.modelstore = null;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
setModelStore(modelStore: IModelStore): void
|
|
26
|
-
{
|
|
27
|
-
this.modelstore = modelStore;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
clearModelStore(): void
|
|
31
|
-
{
|
|
32
|
-
this.modelstore = null;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
getModelStore(): IModelStore
|
|
36
|
-
{
|
|
37
|
-
return this.modelstore;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
getKey(): string
|
|
41
|
-
{
|
|
42
|
-
return this.key;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
abstract update(model: M): void;
|
|
46
|
-
|
|
47
|
-
protected dispatch<M>(action: IAction<M>)
|
|
48
|
-
{
|
|
49
|
-
this.modelstore.apply(action);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
}
|
package/src/Presenter/Action.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {IAction} from "./IAction";
|
|
2
|
-
import {ICompletionStage} from "strata.foundation.core";
|
|
3
|
-
|
|
4
|
-
export
|
|
5
|
-
class Action<M>
|
|
6
|
-
implements IAction<M>
|
|
7
|
-
{
|
|
8
|
-
private readonly key: string;
|
|
9
|
-
private readonly action: (model: M) => ICompletionStage<M>;
|
|
10
|
-
|
|
11
|
-
constructor(key: string,action: (model: M) => ICompletionStage<M>)
|
|
12
|
-
{
|
|
13
|
-
this.key = key;
|
|
14
|
-
this.action = action;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
getKey(): string
|
|
18
|
-
{
|
|
19
|
-
return this.key;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
apply(model: M): ICompletionStage<M>
|
|
23
|
-
{
|
|
24
|
-
return this.action(model);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IAction.js","sourceRoot":"","sources":["IAction.ts"],"names":[],"mappings":""}
|
package/src/Presenter/IAction.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"IModelStore.js","sourceRoot":"","sources":["IModelStore.ts"],"names":[],"mappings":""}
|