simple-boot-front 1.0.102 → 1.0.103
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/README.MD +388 -388
- package/SimpleBootFront.d.ts +34 -34
- package/SimpleBootFront.js +337 -337
- package/decorators/Component.d.ts +11 -11
- package/decorators/Component.js +30 -30
- package/decorators/Script.d.ts +10 -10
- package/decorators/Script.js +31 -31
- package/decorators/inject/InjectFrontSituationType.d.ts +3 -3
- package/decorators/inject/InjectFrontSituationType.js +7 -7
- package/fetch/Fetcher.d.ts +4 -4
- package/fetch/Fetcher.js +9 -9
- package/lifecycle/OnChangedRender.d.ts +3 -3
- package/lifecycle/OnChangedRender.js +2 -2
- package/lifecycle/OnDestroy.d.ts +3 -3
- package/lifecycle/OnDestroy.js +2 -2
- package/lifecycle/OnFinish.d.ts +3 -3
- package/lifecycle/OnFinish.js +2 -2
- package/lifecycle/OnInit.d.ts +8 -8
- package/lifecycle/OnInit.js +2 -2
- package/lifecycle/OnInitedChild.d.ts +3 -3
- package/lifecycle/OnInitedChild.js +2 -2
- package/option/SimFrontOption.d.ts +14 -14
- package/option/SimFrontOption.js +45 -45
- package/package.json +83 -83
- package/script/ScriptRunnable.d.ts +7 -7
- package/script/ScriptRunnable.js +22 -22
- package/service/CookieService.d.ts +11 -11
- package/service/CookieService.js +54 -54
- package/service/HttpService.d.ts +3 -3
- package/service/HttpService.js +23 -23
- package/service/MetaTagService.d.ts +11 -11
- package/service/MetaTagService.js +52 -52
- package/service/Navigation.d.ts +18 -18
- package/service/Navigation.js +117 -117
- package/service/ScriptService.d.ts +7 -7
- package/service/ScriptService.js +39 -39
- package/service/StorageService.d.ts +12 -12
- package/service/StorageService.js +67 -67
- package/service/view/View.d.ts +6 -6
- package/service/view/View.js +29 -29
- package/service/view/ViewService.d.ts +7 -7
- package/service/view/ViewService.js +46 -46
- package/throwable/RouterError.d.ts +4 -4
- package/throwable/RouterError.js +27 -27
- package/throwable/RouterIntentError.d.ts +4 -4
- package/throwable/RouterIntentError.js +27 -27
- package/throwable/RouterNotFount.d.ts +4 -4
- package/throwable/RouterNotFount.js +27 -27
package/service/ScriptService.js
CHANGED
@@ -1,39 +1,39 @@
|
|
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
|
-
(0, SimDecorator_1.Sim)(),
|
35
|
-
__metadata("design:paramtypes", [SimstanceManager_1.SimstanceManager])
|
36
|
-
], ScriptService);
|
37
|
-
return ScriptService;
|
38
|
-
}());
|
39
|
-
exports.ScriptService = ScriptService;
|
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
|
+
(0, SimDecorator_1.Sim)(),
|
35
|
+
__metadata("design:paramtypes", [SimstanceManager_1.SimstanceManager])
|
36
|
+
], ScriptService);
|
37
|
+
return ScriptService;
|
38
|
+
}());
|
39
|
+
exports.ScriptService = ScriptService;
|
@@ -1,12 +1,12 @@
|
|
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
|
+
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 +1,67 @@
|
|
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
|
-
(0, SimDecorator_1.Sim)(),
|
63
|
-
__metadata("design:paramtypes", [SimFrontOption_1.SimFrontOption])
|
64
|
-
], StorageService);
|
65
|
-
return StorageService;
|
66
|
-
}());
|
67
|
-
exports.StorageService = StorageService;
|
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
|
+
(0, 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
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export declare class View<T extends Element> {
|
2
|
-
private _e;
|
3
|
-
constructor(_e: T | string);
|
4
|
-
get e(): T;
|
5
|
-
get value(): any;
|
6
|
-
}
|
1
|
+
export declare class View<T extends Element> {
|
2
|
+
private _e;
|
3
|
+
constructor(_e: T | string);
|
4
|
+
get e(): T;
|
5
|
+
get value(): any;
|
6
|
+
}
|
package/service/view/View.js
CHANGED
@@ -1,29 +1,29 @@
|
|
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
|
+
"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 +1,7 @@
|
|
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
|
+
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 +1,46 @@
|
|
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
|
-
(0, SimDecorator_1.Sim)(),
|
42
|
-
__metadata("design:paramtypes", [])
|
43
|
-
], ViewService);
|
44
|
-
return ViewService;
|
45
|
-
}());
|
46
|
-
exports.ViewService = ViewService;
|
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
|
+
(0, SimDecorator_1.Sim)(),
|
42
|
+
__metadata("design:paramtypes", [])
|
43
|
+
], ViewService);
|
44
|
+
return ViewService;
|
45
|
+
}());
|
46
|
+
exports.ViewService = ViewService;
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { SimError } from 'simple-boot-core/throwable/SimError';
|
2
|
-
export declare class RouterError extends SimError {
|
3
|
-
constructor(message?: string, name?: string, stack?: string);
|
4
|
-
}
|
1
|
+
import { SimError } from 'simple-boot-core/throwable/SimError';
|
2
|
+
export declare class RouterError extends SimError {
|
3
|
+
constructor(message?: string, name?: string, stack?: string);
|
4
|
+
}
|
package/throwable/RouterError.js
CHANGED
@@ -1,27 +1,27 @@
|
|
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
|
+
"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,4 +1,4 @@
|
|
1
|
-
import { RouterError } from './RouterError';
|
2
|
-
export declare class RouterIntentError extends RouterError {
|
3
|
-
constructor(message?: string, name?: string, stack?: string);
|
4
|
-
}
|
1
|
+
import { RouterError } from './RouterError';
|
2
|
+
export declare class RouterIntentError extends RouterError {
|
3
|
+
constructor(message?: string, name?: string, stack?: string);
|
4
|
+
}
|
@@ -1,27 +1,27 @@
|
|
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
|
+
"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,4 +1,4 @@
|
|
1
|
-
import { RouterError } from './RouterError';
|
2
|
-
export declare class RouterNotFount extends RouterError {
|
3
|
-
constructor(message?: string, name?: string, stack?: string);
|
4
|
-
}
|
1
|
+
import { RouterError } from './RouterError';
|
2
|
+
export declare class RouterNotFount extends RouterError {
|
3
|
+
constructor(message?: string, name?: string, stack?: string);
|
4
|
+
}
|
@@ -1,27 +1,27 @@
|
|
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;
|
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;
|