simple-boot-front 1.0.119 → 1.0.120
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/.idea/dataSources.xml +12 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/jpa-buddy.xml +6 -0
- package/.idea/misc.xml +8 -0
- package/.idea/modules.xml +8 -0
- package/.idea/simple-boot-front.iml +9 -0
- package/.idea/vcs.xml +8 -0
- package/README.MD +6 -383
- package/package.json +11 -5
- package/SimpleBootFront.d.ts +0 -36
- package/SimpleBootFront.js +0 -325
- package/decorators/Component.d.ts +0 -11
- package/decorators/Component.js +0 -35
- package/decorators/Script.d.ts +0 -9
- package/decorators/Script.js +0 -31
- package/decorators/inject/InjectFrontSituationType.d.ts +0 -0
- package/decorators/inject/InjectFrontSituationType.js +0 -1
- package/fetch/Fetcher.d.ts +0 -4
- package/fetch/Fetcher.js +0 -9
- package/lifecycle/OnChangedRender.d.ts +0 -3
- package/lifecycle/OnChangedRender.js +0 -2
- package/lifecycle/OnDestroy.d.ts +0 -3
- package/lifecycle/OnDestroy.js +0 -2
- package/lifecycle/OnFinish.d.ts +0 -3
- package/lifecycle/OnFinish.js +0 -2
- package/lifecycle/OnInit.d.ts +0 -8
- package/lifecycle/OnInit.js +0 -2
- package/lifecycle/OnInitedChild.d.ts +0 -3
- package/lifecycle/OnInitedChild.js +0 -2
- package/option/SimFrontOption.d.ts +0 -14
- package/option/SimFrontOption.js +0 -45
- package/script/ScriptRunnable.d.ts +0 -7
- package/script/ScriptRunnable.js +0 -22
- package/service/CookieService.d.ts +0 -11
- package/service/CookieService.js +0 -54
- package/service/HttpService.d.ts +0 -3
- package/service/HttpService.js +0 -23
- package/service/MetaTagService.d.ts +0 -11
- package/service/MetaTagService.js +0 -52
- package/service/Navigation.d.ts +0 -18
- package/service/Navigation.js +0 -117
- package/service/ScriptService.d.ts +0 -7
- package/service/ScriptService.js +0 -39
- package/service/StorageService.d.ts +0 -12
- package/service/StorageService.js +0 -67
- package/service/view/View.d.ts +0 -6
- package/service/view/View.js +0 -29
- package/service/view/ViewService.d.ts +0 -7
- package/service/view/ViewService.js +0 -46
- package/throwable/RouterError.d.ts +0 -4
- package/throwable/RouterError.js +0 -27
- package/throwable/RouterIntentError.d.ts +0 -4
- package/throwable/RouterIntentError.js +0 -27
- package/throwable/RouterNotFount.d.ts +0 -4
- package/throwable/RouterNotFount.js +0 -27
package/service/HttpService.js
DELETED
@@ -1,23 +0,0 @@
|
|
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
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.HttpService = void 0;
|
13
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
14
|
-
var HttpService = (function () {
|
15
|
-
function HttpService() {
|
16
|
-
}
|
17
|
-
HttpService = __decorate([
|
18
|
-
SimDecorator_1.Sim,
|
19
|
-
__metadata("design:paramtypes", [])
|
20
|
-
], HttpService);
|
21
|
-
return HttpService;
|
22
|
-
}());
|
23
|
-
exports.HttpService = HttpService;
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { SimFrontOption } from '../option/SimFrontOption';
|
2
|
-
export declare class MetaTagService {
|
3
|
-
option: SimFrontOption;
|
4
|
-
constructor(option: SimFrontOption);
|
5
|
-
setMetaTag(selector: string, set: {
|
6
|
-
[key: string]: string;
|
7
|
-
}): void;
|
8
|
-
createMetaTag(set: {
|
9
|
-
[p: string]: string;
|
10
|
-
}): HTMLMetaElement;
|
11
|
-
}
|
@@ -1,52 +0,0 @@
|
|
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
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.MetaTagService = void 0;
|
13
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
14
|
-
var SimFrontOption_1 = require("../option/SimFrontOption");
|
15
|
-
var MetaTagService = (function () {
|
16
|
-
function MetaTagService(option) {
|
17
|
-
this.option = option;
|
18
|
-
}
|
19
|
-
MetaTagService.prototype.setMetaTag = function (selector, set) {
|
20
|
-
var target = this.option.window.document.querySelector(selector);
|
21
|
-
if (!target) {
|
22
|
-
this.option.window.document.head.appendChild(this.createMetaTag(set));
|
23
|
-
}
|
24
|
-
else {
|
25
|
-
Object.entries(set).forEach(function (_a) {
|
26
|
-
var key = _a[0], value = _a[1];
|
27
|
-
if (null === value) {
|
28
|
-
target.removeAttribute(key);
|
29
|
-
}
|
30
|
-
else {
|
31
|
-
target.setAttribute(key, value);
|
32
|
-
}
|
33
|
-
});
|
34
|
-
}
|
35
|
-
};
|
36
|
-
MetaTagService.prototype.createMetaTag = function (set) {
|
37
|
-
var meta = this.option.window.document.createElement('meta');
|
38
|
-
Object.entries(set).forEach(function (_a) {
|
39
|
-
var key = _a[0], value = _a[1];
|
40
|
-
if (value !== null) {
|
41
|
-
meta.setAttribute(key, value);
|
42
|
-
}
|
43
|
-
});
|
44
|
-
return meta;
|
45
|
-
};
|
46
|
-
MetaTagService = __decorate([
|
47
|
-
SimDecorator_1.Sim,
|
48
|
-
__metadata("design:paramtypes", [SimFrontOption_1.SimFrontOption])
|
49
|
-
], MetaTagService);
|
50
|
-
return MetaTagService;
|
51
|
-
}());
|
52
|
-
exports.MetaTagService = MetaTagService;
|
package/service/Navigation.d.ts
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
import { SimFrontOption } from '../option/SimFrontOption';
|
2
|
-
export declare class Navigation {
|
3
|
-
option: SimFrontOption;
|
4
|
-
constructor(option: SimFrontOption);
|
5
|
-
get url(): string;
|
6
|
-
get path(): string;
|
7
|
-
get queryParams(): Map<string, string>;
|
8
|
-
get queryParamsObject(): any;
|
9
|
-
get pathInfo(): {
|
10
|
-
path: string;
|
11
|
-
queryParams: Map<string, string>;
|
12
|
-
};
|
13
|
-
reload(): void;
|
14
|
-
pathAndSearch(): string;
|
15
|
-
goNoPopStateEvent(path: string, data?: any, title?: string): void;
|
16
|
-
go(path: string, data?: any, title?: string): void;
|
17
|
-
state(): any;
|
18
|
-
}
|
package/service/Navigation.js
DELETED
@@ -1,117 +0,0 @@
|
|
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
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.Navigation = void 0;
|
13
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
14
|
-
var SimFrontOption_1 = require("../option/SimFrontOption");
|
15
|
-
var LocationUtils_1 = require("dom-render/utils/location/LocationUtils");
|
16
|
-
var Navigation = (function () {
|
17
|
-
function Navigation(option) {
|
18
|
-
this.option = option;
|
19
|
-
}
|
20
|
-
Object.defineProperty(Navigation.prototype, "url", {
|
21
|
-
get: function () {
|
22
|
-
var queryParams = this.queryParamsObject;
|
23
|
-
var queryString = Object.entries(queryParams).map(function (_a) {
|
24
|
-
var key = _a[0], value = _a[1];
|
25
|
-
return "".concat(key, "=").concat(value);
|
26
|
-
}).join('&');
|
27
|
-
var path = this.path;
|
28
|
-
return path + (queryString.length > 0 ? ('?' + queryString) : '');
|
29
|
-
},
|
30
|
-
enumerable: false,
|
31
|
-
configurable: true
|
32
|
-
});
|
33
|
-
Object.defineProperty(Navigation.prototype, "path", {
|
34
|
-
get: function () {
|
35
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
36
|
-
return LocationUtils_1.LocationUtils.path(this.option.window);
|
37
|
-
}
|
38
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
39
|
-
return LocationUtils_1.LocationUtils.hashPath(this.option.window);
|
40
|
-
}
|
41
|
-
else {
|
42
|
-
return '';
|
43
|
-
}
|
44
|
-
},
|
45
|
-
enumerable: false,
|
46
|
-
configurable: true
|
47
|
-
});
|
48
|
-
Object.defineProperty(Navigation.prototype, "queryParams", {
|
49
|
-
get: function () {
|
50
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
51
|
-
return LocationUtils_1.LocationUtils.pathQueryParams(this.option.window);
|
52
|
-
}
|
53
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
54
|
-
return LocationUtils_1.LocationUtils.hashQueryParams(this.option.window);
|
55
|
-
}
|
56
|
-
else {
|
57
|
-
return new Map();
|
58
|
-
}
|
59
|
-
},
|
60
|
-
enumerable: false,
|
61
|
-
configurable: true
|
62
|
-
});
|
63
|
-
Object.defineProperty(Navigation.prototype, "queryParamsObject", {
|
64
|
-
get: function () {
|
65
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
66
|
-
return LocationUtils_1.LocationUtils.pathQueryParamsObject(this.option.window);
|
67
|
-
}
|
68
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
69
|
-
return LocationUtils_1.LocationUtils.hashQueryParamsObject(this.option.window);
|
70
|
-
}
|
71
|
-
else {
|
72
|
-
return {};
|
73
|
-
}
|
74
|
-
},
|
75
|
-
enumerable: false,
|
76
|
-
configurable: true
|
77
|
-
});
|
78
|
-
Object.defineProperty(Navigation.prototype, "pathInfo", {
|
79
|
-
get: function () {
|
80
|
-
return { path: this.path, queryParams: this.queryParams };
|
81
|
-
},
|
82
|
-
enumerable: false,
|
83
|
-
configurable: true
|
84
|
-
});
|
85
|
-
Navigation.prototype.reload = function () {
|
86
|
-
this.option.window.dispatchEvent(new Event('popstate'));
|
87
|
-
};
|
88
|
-
Navigation.prototype.pathAndSearch = function () {
|
89
|
-
return this.option.window.location.pathname + this.option.window.location.search;
|
90
|
-
};
|
91
|
-
Navigation.prototype.goNoPopStateEvent = function (path, data, title) {
|
92
|
-
if (data === void 0) { data = {}; }
|
93
|
-
if (title === void 0) { title = ''; }
|
94
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
95
|
-
this.option.window.history.pushState(data, title, path);
|
96
|
-
}
|
97
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
98
|
-
path = '#' + path;
|
99
|
-
this.option.window.history.pushState(data, title, path);
|
100
|
-
}
|
101
|
-
};
|
102
|
-
Navigation.prototype.go = function (path, data, title) {
|
103
|
-
if (data === void 0) { data = {}; }
|
104
|
-
if (title === void 0) { title = ''; }
|
105
|
-
this.goNoPopStateEvent(path, data, title);
|
106
|
-
this.option.window.dispatchEvent(new Event('popstate'));
|
107
|
-
};
|
108
|
-
Navigation.prototype.state = function () {
|
109
|
-
return this.option.window.history.state;
|
110
|
-
};
|
111
|
-
Navigation = __decorate([
|
112
|
-
SimDecorator_1.Sim,
|
113
|
-
__metadata("design:paramtypes", [SimFrontOption_1.SimFrontOption])
|
114
|
-
], Navigation);
|
115
|
-
return Navigation;
|
116
|
-
}());
|
117
|
-
exports.Navigation = Navigation;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { ScriptRunnable } from '../script/ScriptRunnable';
|
2
|
-
import { SimstanceManager } from 'simple-boot-core/simstance/SimstanceManager';
|
3
|
-
export declare class ScriptService {
|
4
|
-
private simstanceManager;
|
5
|
-
constructor(simstanceManager: SimstanceManager);
|
6
|
-
getScript<T = ScriptRunnable>(name: string): T | undefined;
|
7
|
-
}
|
package/service/ScriptService.js
DELETED
@@ -1,39 +0,0 @@
|
|
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
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.ScriptService = void 0;
|
13
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
14
|
-
var Script_1 = require("../decorators/Script");
|
15
|
-
var SimstanceManager_1 = require("simple-boot-core/simstance/SimstanceManager");
|
16
|
-
var ScriptService = (function () {
|
17
|
-
function ScriptService(simstanceManager) {
|
18
|
-
this.simstanceManager = simstanceManager;
|
19
|
-
}
|
20
|
-
ScriptService.prototype.getScript = function (name) {
|
21
|
-
var val = Script_1.scripts.get(name);
|
22
|
-
var obj = undefined;
|
23
|
-
if (val) {
|
24
|
-
try {
|
25
|
-
obj = this.simstanceManager.getOrNewSim(val);
|
26
|
-
}
|
27
|
-
catch (e) {
|
28
|
-
obj = this.simstanceManager.newSim(val);
|
29
|
-
}
|
30
|
-
}
|
31
|
-
return obj;
|
32
|
-
};
|
33
|
-
ScriptService = __decorate([
|
34
|
-
SimDecorator_1.Sim,
|
35
|
-
__metadata("design:paramtypes", [SimstanceManager_1.SimstanceManager])
|
36
|
-
], ScriptService);
|
37
|
-
return ScriptService;
|
38
|
-
}());
|
39
|
-
exports.ScriptService = ScriptService;
|
@@ -1,12 +0,0 @@
|
|
1
|
-
import { SimFrontOption } from '../option/SimFrontOption';
|
2
|
-
export declare class StorageService {
|
3
|
-
option: SimFrontOption;
|
4
|
-
constructor(option: SimFrontOption);
|
5
|
-
setLocalStorageItem(k: string, v: string | any, window?: Window): void;
|
6
|
-
getLocalStorageItem(k: string, window?: Window): string | null;
|
7
|
-
cutLocalStorageItem(k: string, window?: Window): string | null;
|
8
|
-
removeLocalStorageItem(k: string, window?: Window): void;
|
9
|
-
getLocalStorageJsonItem<T>(k: string, window?: Window): T | undefined;
|
10
|
-
cutLocalStorageJsonItem<T>(k: string, window?: Window): T | undefined;
|
11
|
-
clearLocalStorage(window?: Window): void;
|
12
|
-
}
|
@@ -1,67 +0,0 @@
|
|
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
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.StorageService = void 0;
|
13
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
14
|
-
var SimFrontOption_1 = require("../option/SimFrontOption");
|
15
|
-
var StorageUtils_1 = require("dom-render/utils/storage/StorageUtils");
|
16
|
-
var StorageService = (function () {
|
17
|
-
function StorageService(option) {
|
18
|
-
this.option = option;
|
19
|
-
}
|
20
|
-
StorageService.prototype.setLocalStorageItem = function (k, v, window) {
|
21
|
-
if (window === void 0) { window = this.option.window; }
|
22
|
-
if (typeof v === 'object') {
|
23
|
-
v = JSON.stringify(v);
|
24
|
-
}
|
25
|
-
window.localStorage.setItem(k, v);
|
26
|
-
};
|
27
|
-
StorageService.prototype.getLocalStorageItem = function (k, window) {
|
28
|
-
if (window === void 0) { window = this.option.window; }
|
29
|
-
return window.localStorage.getItem(k);
|
30
|
-
};
|
31
|
-
StorageService.prototype.cutLocalStorageItem = function (k, window) {
|
32
|
-
if (window === void 0) { window = this.option.window; }
|
33
|
-
var data = StorageUtils_1.StorageUtils.getLocalStorageItem(k, window);
|
34
|
-
StorageUtils_1.StorageUtils.removeLocalStorageItem(k, window);
|
35
|
-
return data;
|
36
|
-
};
|
37
|
-
StorageService.prototype.removeLocalStorageItem = function (k, window) {
|
38
|
-
if (window === void 0) { window = this.option.window; }
|
39
|
-
return window.localStorage.removeItem(k);
|
40
|
-
};
|
41
|
-
StorageService.prototype.getLocalStorageJsonItem = function (k, window) {
|
42
|
-
if (window === void 0) { window = this.option.window; }
|
43
|
-
var item = window.localStorage.getItem(k);
|
44
|
-
if (item) {
|
45
|
-
return JSON.parse(item);
|
46
|
-
}
|
47
|
-
else {
|
48
|
-
return undefined;
|
49
|
-
}
|
50
|
-
};
|
51
|
-
StorageService.prototype.cutLocalStorageJsonItem = function (k, window) {
|
52
|
-
if (window === void 0) { window = this.option.window; }
|
53
|
-
var item = StorageUtils_1.StorageUtils.getLocalStorageJsonItem(k, window);
|
54
|
-
StorageUtils_1.StorageUtils.removeLocalStorageItem(k, window);
|
55
|
-
return item;
|
56
|
-
};
|
57
|
-
StorageService.prototype.clearLocalStorage = function (window) {
|
58
|
-
if (window === void 0) { window = this.option.window; }
|
59
|
-
window.localStorage.clear();
|
60
|
-
};
|
61
|
-
StorageService = __decorate([
|
62
|
-
SimDecorator_1.Sim,
|
63
|
-
__metadata("design:paramtypes", [SimFrontOption_1.SimFrontOption])
|
64
|
-
], StorageService);
|
65
|
-
return StorageService;
|
66
|
-
}());
|
67
|
-
exports.StorageService = StorageService;
|
package/service/view/View.d.ts
DELETED
package/service/view/View.js
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.View = void 0;
|
4
|
-
var View = (function () {
|
5
|
-
function View(_e) {
|
6
|
-
this._e = _e;
|
7
|
-
}
|
8
|
-
Object.defineProperty(View.prototype, "e", {
|
9
|
-
get: function () {
|
10
|
-
if (typeof this._e === 'string') {
|
11
|
-
return document.querySelector(this._e);
|
12
|
-
}
|
13
|
-
else {
|
14
|
-
return this._e;
|
15
|
-
}
|
16
|
-
},
|
17
|
-
enumerable: false,
|
18
|
-
configurable: true
|
19
|
-
});
|
20
|
-
Object.defineProperty(View.prototype, "value", {
|
21
|
-
get: function () {
|
22
|
-
return this.e.value;
|
23
|
-
},
|
24
|
-
enumerable: false,
|
25
|
-
configurable: true
|
26
|
-
});
|
27
|
-
return View;
|
28
|
-
}());
|
29
|
-
exports.View = View;
|
@@ -1,7 +0,0 @@
|
|
1
|
-
import { View } from '../../service/view/View';
|
2
|
-
export declare class ViewService {
|
3
|
-
constructor();
|
4
|
-
e<T extends Element>(selector: string): View<T> | undefined;
|
5
|
-
eI<T extends Element = Element>(selector: string): View<T> | undefined;
|
6
|
-
eC<T extends Element = Element>(selector: string): View<T> | undefined;
|
7
|
-
}
|
@@ -1,46 +0,0 @@
|
|
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
|
-
};
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
exports.ViewService = void 0;
|
13
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
14
|
-
var View_1 = require("../../service/view/View");
|
15
|
-
var ViewService = (function () {
|
16
|
-
function ViewService() {
|
17
|
-
}
|
18
|
-
ViewService.prototype.e = function (selector) {
|
19
|
-
try {
|
20
|
-
var querySelector = document.querySelector(selector);
|
21
|
-
if (querySelector) {
|
22
|
-
return new View_1.View(querySelector);
|
23
|
-
}
|
24
|
-
else {
|
25
|
-
return undefined;
|
26
|
-
}
|
27
|
-
}
|
28
|
-
catch (e) {
|
29
|
-
return undefined;
|
30
|
-
}
|
31
|
-
};
|
32
|
-
ViewService.prototype.eI = function (selector) {
|
33
|
-
var _a;
|
34
|
-
return (_a = this.e("#".concat(selector))) !== null && _a !== void 0 ? _a : undefined;
|
35
|
-
};
|
36
|
-
ViewService.prototype.eC = function (selector) {
|
37
|
-
var _a;
|
38
|
-
return (_a = this.e(".".concat(selector))) !== null && _a !== void 0 ? _a : undefined;
|
39
|
-
};
|
40
|
-
ViewService = __decorate([
|
41
|
-
SimDecorator_1.Sim,
|
42
|
-
__metadata("design:paramtypes", [])
|
43
|
-
], ViewService);
|
44
|
-
return ViewService;
|
45
|
-
}());
|
46
|
-
exports.ViewService = ViewService;
|
package/throwable/RouterError.js
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
if (typeof b !== "function" && b !== null)
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
-
extendStatics(d, b);
|
13
|
-
function __() { this.constructor = d; }
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
-
};
|
16
|
-
})();
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
-
exports.RouterError = void 0;
|
19
|
-
var SimError_1 = require("simple-boot-core/throwable/SimError");
|
20
|
-
var RouterError = (function (_super) {
|
21
|
-
__extends(RouterError, _super);
|
22
|
-
function RouterError(message, name, stack) {
|
23
|
-
return _super.call(this, message, name, stack) || this;
|
24
|
-
}
|
25
|
-
return RouterError;
|
26
|
-
}(SimError_1.SimError));
|
27
|
-
exports.RouterError = RouterError;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
if (typeof b !== "function" && b !== null)
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
-
extendStatics(d, b);
|
13
|
-
function __() { this.constructor = d; }
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
-
};
|
16
|
-
})();
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
-
exports.RouterIntentError = void 0;
|
19
|
-
var RouterError_1 = require("./RouterError");
|
20
|
-
var RouterIntentError = (function (_super) {
|
21
|
-
__extends(RouterIntentError, _super);
|
22
|
-
function RouterIntentError(message, name, stack) {
|
23
|
-
return _super.call(this, message, name, stack) || this;
|
24
|
-
}
|
25
|
-
return RouterIntentError;
|
26
|
-
}(RouterError_1.RouterError));
|
27
|
-
exports.RouterIntentError = RouterIntentError;
|
@@ -1,27 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
3
|
-
var extendStatics = function (d, b) {
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
7
|
-
return extendStatics(d, b);
|
8
|
-
};
|
9
|
-
return function (d, b) {
|
10
|
-
if (typeof b !== "function" && b !== null)
|
11
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
12
|
-
extendStatics(d, b);
|
13
|
-
function __() { this.constructor = d; }
|
14
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
15
|
-
};
|
16
|
-
})();
|
17
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
18
|
-
exports.RouterNotFount = void 0;
|
19
|
-
var RouterError_1 = require("./RouterError");
|
20
|
-
var RouterNotFount = (function (_super) {
|
21
|
-
__extends(RouterNotFount, _super);
|
22
|
-
function RouterNotFount(message, name, stack) {
|
23
|
-
return _super.call(this, message, name, stack) || this;
|
24
|
-
}
|
25
|
-
return RouterNotFount;
|
26
|
-
}(RouterError_1.RouterError));
|
27
|
-
exports.RouterNotFount = RouterNotFount;
|