simple-boot-front 1.0.74 → 1.0.75
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 +252 -252
- package/SimpleBootFront.d.ts +22 -22
- package/SimpleBootFront.js +229 -229
- package/decorators/Component.d.ts +11 -11
- package/decorators/Component.js +50 -50
- package/fetch/Fetcher.d.ts +4 -4
- package/fetch/Fetcher.js +9 -9
- package/module/FrontLifeCycle.d.ts +7 -7
- package/module/FrontLifeCycle.js +2 -2
- package/option/SimFrontOption.d.ts +14 -14
- package/option/SimFrontOption.js +45 -45
- package/package.json +80 -80
- package/service/CookieService.d.ts +8 -8
- package/service/CookieService.js +42 -42
- package/service/HttpService.d.ts +3 -3
- package/service/HttpService.js +23 -23
- package/service/Navigation.d.ts +12 -12
- package/service/Navigation.js +75 -75
- 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/utils/dom/DomUtils.d.ts +13 -13
- package/utils/dom/DomUtils.js +45 -45
- package/utils/node/NodeUtils.d.ts +10 -10
- package/utils/node/NodeUtils.js +25 -25
- package/utils/window/LocationUtils.d.ts +8 -8
- package/utils/window/LocationUtils.js +34 -34
package/module/FrontLifeCycle.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { SimOption } from 'simple-boot-core/SimOption';
|
2
|
-
import { ConstructorType } from 'simple-boot-core/types/Types';
|
3
|
-
export declare enum UrlType {
|
4
|
-
path = "path",
|
5
|
-
hash = "hash"
|
6
|
-
}
|
7
|
-
export declare class SimFrontOption extends SimOption {
|
8
|
-
window: Window;
|
9
|
-
selector: string;
|
10
|
-
urlType: UrlType;
|
11
|
-
constructor(window: Window, advice?: ConstructorType<any>[]);
|
12
|
-
setSelector(selector: string): SimFrontOption;
|
13
|
-
setUrlType(urlType: UrlType): SimFrontOption;
|
14
|
-
}
|
1
|
+
import { SimOption } from 'simple-boot-core/SimOption';
|
2
|
+
import { ConstructorType } from 'simple-boot-core/types/Types';
|
3
|
+
export declare enum UrlType {
|
4
|
+
path = "path",
|
5
|
+
hash = "hash"
|
6
|
+
}
|
7
|
+
export declare class SimFrontOption extends SimOption {
|
8
|
+
window: Window;
|
9
|
+
selector: string;
|
10
|
+
urlType: UrlType;
|
11
|
+
constructor(window: Window, advice?: ConstructorType<any>[]);
|
12
|
+
setSelector(selector: string): SimFrontOption;
|
13
|
+
setUrlType(urlType: UrlType): SimFrontOption;
|
14
|
+
}
|
package/option/SimFrontOption.js
CHANGED
@@ -1,45 +1,45 @@
|
|
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.SimFrontOption = exports.UrlType = void 0;
|
19
|
-
var SimOption_1 = require("simple-boot-core/SimOption");
|
20
|
-
var UrlType;
|
21
|
-
(function (UrlType) {
|
22
|
-
UrlType["path"] = "path";
|
23
|
-
UrlType["hash"] = "hash";
|
24
|
-
})(UrlType = exports.UrlType || (exports.UrlType = {}));
|
25
|
-
var SimFrontOption = (function (_super) {
|
26
|
-
__extends(SimFrontOption, _super);
|
27
|
-
function SimFrontOption(window, advice) {
|
28
|
-
if (advice === void 0) { advice = []; }
|
29
|
-
var _this = _super.call(this, advice) || this;
|
30
|
-
_this.window = window;
|
31
|
-
_this.selector = '#app';
|
32
|
-
_this.urlType = UrlType.path;
|
33
|
-
return _this;
|
34
|
-
}
|
35
|
-
SimFrontOption.prototype.setSelector = function (selector) {
|
36
|
-
this.selector = selector;
|
37
|
-
return this;
|
38
|
-
};
|
39
|
-
SimFrontOption.prototype.setUrlType = function (urlType) {
|
40
|
-
this.urlType = urlType;
|
41
|
-
return this;
|
42
|
-
};
|
43
|
-
return SimFrontOption;
|
44
|
-
}(SimOption_1.SimOption));
|
45
|
-
exports.SimFrontOption = SimFrontOption;
|
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.SimFrontOption = exports.UrlType = void 0;
|
19
|
+
var SimOption_1 = require("simple-boot-core/SimOption");
|
20
|
+
var UrlType;
|
21
|
+
(function (UrlType) {
|
22
|
+
UrlType["path"] = "path";
|
23
|
+
UrlType["hash"] = "hash";
|
24
|
+
})(UrlType = exports.UrlType || (exports.UrlType = {}));
|
25
|
+
var SimFrontOption = (function (_super) {
|
26
|
+
__extends(SimFrontOption, _super);
|
27
|
+
function SimFrontOption(window, advice) {
|
28
|
+
if (advice === void 0) { advice = []; }
|
29
|
+
var _this = _super.call(this, advice) || this;
|
30
|
+
_this.window = window;
|
31
|
+
_this.selector = '#app';
|
32
|
+
_this.urlType = UrlType.path;
|
33
|
+
return _this;
|
34
|
+
}
|
35
|
+
SimFrontOption.prototype.setSelector = function (selector) {
|
36
|
+
this.selector = selector;
|
37
|
+
return this;
|
38
|
+
};
|
39
|
+
SimFrontOption.prototype.setUrlType = function (urlType) {
|
40
|
+
this.urlType = urlType;
|
41
|
+
return this;
|
42
|
+
};
|
43
|
+
return SimFrontOption;
|
44
|
+
}(SimOption_1.SimOption));
|
45
|
+
exports.SimFrontOption = SimFrontOption;
|
package/package.json
CHANGED
@@ -1,80 +1,80 @@
|
|
1
|
-
{
|
2
|
-
"name": "simple-boot-front",
|
3
|
-
"version": "1.0.
|
4
|
-
"main": "SimpleApplication.js",
|
5
|
-
"license": "MIT",
|
6
|
-
"description": "front end SPA frameworks",
|
7
|
-
"keywords": [
|
8
|
-
"front",
|
9
|
-
"spa",
|
10
|
-
"SPA",
|
11
|
-
"module",
|
12
|
-
"front-end",
|
13
|
-
"framwork",
|
14
|
-
"node"
|
15
|
-
],
|
16
|
-
"author": "visualkhh <visualkhh@gmail.com> (https://github.com/visualkhh)",
|
17
|
-
"contributors": [
|
18
|
-
"sewoo <sewooimda@nate.com> (https://github.com/sewoo)",
|
19
|
-
"SeoDH <adonis_84@naver.com> (https://github.com/SeoDH)",
|
20
|
-
"tkyung (https://github.com/tkyungDev)",
|
21
|
-
"Hoil-Gang (https://github.com/khl1154)",
|
22
|
-
"hwangsero (https://github.com/hwangsero)"
|
23
|
-
],
|
24
|
-
"homepage": "https://github.com/visualkhh/simple-boot-front",
|
25
|
-
"bugs": {
|
26
|
-
"url": "https://github.com/visualkhh/simple-boot-front",
|
27
|
-
"email": "visualkhh@gmail.com"
|
28
|
-
},
|
29
|
-
"repository": {
|
30
|
-
"type": "git",
|
31
|
-
"url": "https://github.com/visualkhh/simple-boot-front"
|
32
|
-
},
|
33
|
-
"jest": {
|
34
|
-
"transform": {
|
35
|
-
"^.+\\.ts$": "ts-jest"
|
36
|
-
},
|
37
|
-
"testRegex": "\\.test\\.ts$",
|
38
|
-
"moduleFileExtensions": [
|
39
|
-
"ts",
|
40
|
-
"tsx",
|
41
|
-
"js",
|
42
|
-
"json"
|
43
|
-
],
|
44
|
-
"globals": {
|
45
|
-
"ts-jest": {
|
46
|
-
"diagnostics": true
|
47
|
-
}
|
48
|
-
}
|
49
|
-
},
|
50
|
-
"scripts": {
|
51
|
-
"build": "rm -rf dist && tsc --outDir dist --declarationDir dist",
|
52
|
-
"dev:serve": "npm run serve --workspace=dev",
|
53
|
-
"dev-onepage:serve": "npm run serve --workspace=dev-onepage",
|
54
|
-
"npm-build": "rm -rf dist && tsc --outDir dist --declarationDir dist && cp package-prod.json dist/package.json && cp README.MD dist",
|
55
|
-
"npm-publish": "npm run npm-build && npm publish ./dist",
|
56
|
-
"tsc": "tsc",
|
57
|
-
"test": "jest --detectOpenHandles --forceExit"
|
58
|
-
},
|
59
|
-
"alias": {
|
60
|
-
},
|
61
|
-
"devDependencies": {
|
62
|
-
"@types/jest": "^26.0.22",
|
63
|
-
"@typescript-eslint/eslint-plugin": "^4.16.1",
|
64
|
-
"@typescript-eslint/parser": "^4.16.1",
|
65
|
-
"eslint": "^7.21.0",
|
66
|
-
"eslint-config-standard": "^16.0.2",
|
67
|
-
"eslint-plugin-import": "^2.22.1",
|
68
|
-
"eslint-plugin-node": "^11.1.0",
|
69
|
-
"eslint-plugin-promise": "^4.3.1",
|
70
|
-
"jest": "^26.6.3",
|
71
|
-
"supertest": "^6.1.3",
|
72
|
-
"ts-jest": "^26.5.4",
|
73
|
-
"typescript": "^4.3.5"
|
74
|
-
},
|
75
|
-
"dependencies": {
|
76
|
-
"dom-render": "^1.0.
|
77
|
-
"reflect-metadata": "^0.1.13",
|
78
|
-
"simple-boot-core": "^1.0.20"
|
79
|
-
}
|
80
|
-
}
|
1
|
+
{
|
2
|
+
"name": "simple-boot-front",
|
3
|
+
"version": "1.0.75",
|
4
|
+
"main": "SimpleApplication.js",
|
5
|
+
"license": "MIT",
|
6
|
+
"description": "front end SPA frameworks",
|
7
|
+
"keywords": [
|
8
|
+
"front",
|
9
|
+
"spa",
|
10
|
+
"SPA",
|
11
|
+
"module",
|
12
|
+
"front-end",
|
13
|
+
"framwork",
|
14
|
+
"node"
|
15
|
+
],
|
16
|
+
"author": "visualkhh <visualkhh@gmail.com> (https://github.com/visualkhh)",
|
17
|
+
"contributors": [
|
18
|
+
"sewoo <sewooimda@nate.com> (https://github.com/sewoo)",
|
19
|
+
"SeoDH <adonis_84@naver.com> (https://github.com/SeoDH)",
|
20
|
+
"tkyung (https://github.com/tkyungDev)",
|
21
|
+
"Hoil-Gang (https://github.com/khl1154)",
|
22
|
+
"hwangsero (https://github.com/hwangsero)"
|
23
|
+
],
|
24
|
+
"homepage": "https://github.com/visualkhh/simple-boot-front",
|
25
|
+
"bugs": {
|
26
|
+
"url": "https://github.com/visualkhh/simple-boot-front",
|
27
|
+
"email": "visualkhh@gmail.com"
|
28
|
+
},
|
29
|
+
"repository": {
|
30
|
+
"type": "git",
|
31
|
+
"url": "https://github.com/visualkhh/simple-boot-front"
|
32
|
+
},
|
33
|
+
"jest": {
|
34
|
+
"transform": {
|
35
|
+
"^.+\\.ts$": "ts-jest"
|
36
|
+
},
|
37
|
+
"testRegex": "\\.test\\.ts$",
|
38
|
+
"moduleFileExtensions": [
|
39
|
+
"ts",
|
40
|
+
"tsx",
|
41
|
+
"js",
|
42
|
+
"json"
|
43
|
+
],
|
44
|
+
"globals": {
|
45
|
+
"ts-jest": {
|
46
|
+
"diagnostics": true
|
47
|
+
}
|
48
|
+
}
|
49
|
+
},
|
50
|
+
"scripts": {
|
51
|
+
"build": "rm -rf dist && tsc --outDir dist --declarationDir dist",
|
52
|
+
"dev:serve": "npm run serve --workspace=dev",
|
53
|
+
"dev-onepage:serve": "npm run serve --workspace=dev-onepage",
|
54
|
+
"npm-build": "rm -rf dist && tsc --outDir dist --declarationDir dist && cp package-prod.json dist/package.json && cp README.MD dist",
|
55
|
+
"npm-publish": "npm run npm-build && npm publish ./dist",
|
56
|
+
"tsc": "tsc",
|
57
|
+
"test": "jest --detectOpenHandles --forceExit"
|
58
|
+
},
|
59
|
+
"alias": {
|
60
|
+
},
|
61
|
+
"devDependencies": {
|
62
|
+
"@types/jest": "^26.0.22",
|
63
|
+
"@typescript-eslint/eslint-plugin": "^4.16.1",
|
64
|
+
"@typescript-eslint/parser": "^4.16.1",
|
65
|
+
"eslint": "^7.21.0",
|
66
|
+
"eslint-config-standard": "^16.0.2",
|
67
|
+
"eslint-plugin-import": "^2.22.1",
|
68
|
+
"eslint-plugin-node": "^11.1.0",
|
69
|
+
"eslint-plugin-promise": "^4.3.1",
|
70
|
+
"jest": "^26.6.3",
|
71
|
+
"supertest": "^6.1.3",
|
72
|
+
"ts-jest": "^26.5.4",
|
73
|
+
"typescript": "^4.3.5"
|
74
|
+
},
|
75
|
+
"dependencies": {
|
76
|
+
"dom-render": "^1.0.37",
|
77
|
+
"reflect-metadata": "^0.1.13",
|
78
|
+
"simple-boot-core": "^1.0.20"
|
79
|
+
}
|
80
|
+
}
|
@@ -1,8 +1,8 @@
|
|
1
|
-
export declare class CookieService {
|
2
|
-
get(key: string): string | undefined;
|
3
|
-
getAll(): {
|
4
|
-
[k: string]: string;
|
5
|
-
};
|
6
|
-
set(name: string, value: string, exp: number): void;
|
7
|
-
delete(name: string): void;
|
8
|
-
}
|
1
|
+
export declare class CookieService {
|
2
|
+
get(key: string): string | undefined;
|
3
|
+
getAll(): {
|
4
|
+
[k: string]: string;
|
5
|
+
};
|
6
|
+
set(name: string, value: string, exp: number): void;
|
7
|
+
delete(name: string): void;
|
8
|
+
}
|
package/service/CookieService.js
CHANGED
@@ -1,42 +1,42 @@
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
-
exports.CookieService = void 0;
|
10
|
-
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
11
|
-
var CookieService = (function () {
|
12
|
-
function CookieService() {
|
13
|
-
}
|
14
|
-
CookieService.prototype.get = function (key) {
|
15
|
-
return this.getAll()[key];
|
16
|
-
};
|
17
|
-
CookieService.prototype.getAll = function () {
|
18
|
-
var _a;
|
19
|
-
var all = {};
|
20
|
-
var strings = (_a = document.cookie.split(';')) !== null && _a !== void 0 ? _a : [];
|
21
|
-
strings.forEach(function (it) {
|
22
|
-
var set = it.split('=');
|
23
|
-
if (set[0] && set[1] && set[0].trim().length > 0 && set[1].trim().length > 0) {
|
24
|
-
all[set[0].trim()] = set[1].trim();
|
25
|
-
}
|
26
|
-
});
|
27
|
-
return all;
|
28
|
-
};
|
29
|
-
CookieService.prototype.set = function (name, value, exp) {
|
30
|
-
var date = new Date();
|
31
|
-
date.setTime(date.getTime() + exp);
|
32
|
-
document.cookie = name + '=' + value + ';expires=' + date.toUTCString() + ';path=/';
|
33
|
-
};
|
34
|
-
CookieService.prototype.delete = function (name) {
|
35
|
-
document.cookie = name + '=; expires=Thu, 01 Jan 1999 00:00:10 GMT;';
|
36
|
-
};
|
37
|
-
CookieService = __decorate([
|
38
|
-
SimDecorator_1.Sim()
|
39
|
-
], CookieService);
|
40
|
-
return CookieService;
|
41
|
-
}());
|
42
|
-
exports.CookieService = CookieService;
|
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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
9
|
+
exports.CookieService = void 0;
|
10
|
+
var SimDecorator_1 = require("simple-boot-core/decorators/SimDecorator");
|
11
|
+
var CookieService = (function () {
|
12
|
+
function CookieService() {
|
13
|
+
}
|
14
|
+
CookieService.prototype.get = function (key) {
|
15
|
+
return this.getAll()[key];
|
16
|
+
};
|
17
|
+
CookieService.prototype.getAll = function () {
|
18
|
+
var _a;
|
19
|
+
var all = {};
|
20
|
+
var strings = (_a = document.cookie.split(';')) !== null && _a !== void 0 ? _a : [];
|
21
|
+
strings.forEach(function (it) {
|
22
|
+
var set = it.split('=');
|
23
|
+
if (set[0] && set[1] && set[0].trim().length > 0 && set[1].trim().length > 0) {
|
24
|
+
all[set[0].trim()] = set[1].trim();
|
25
|
+
}
|
26
|
+
});
|
27
|
+
return all;
|
28
|
+
};
|
29
|
+
CookieService.prototype.set = function (name, value, exp) {
|
30
|
+
var date = new Date();
|
31
|
+
date.setTime(date.getTime() + exp);
|
32
|
+
document.cookie = name + '=' + value + ';expires=' + date.toUTCString() + ';path=/';
|
33
|
+
};
|
34
|
+
CookieService.prototype.delete = function (name) {
|
35
|
+
document.cookie = name + '=; expires=Thu, 01 Jan 1999 00:00:10 GMT;';
|
36
|
+
};
|
37
|
+
CookieService = __decorate([
|
38
|
+
(0, SimDecorator_1.Sim)()
|
39
|
+
], CookieService);
|
40
|
+
return CookieService;
|
41
|
+
}());
|
42
|
+
exports.CookieService = CookieService;
|
package/service/HttpService.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export declare class HttpService {
|
2
|
-
constructor();
|
3
|
-
}
|
1
|
+
export declare class HttpService {
|
2
|
+
constructor();
|
3
|
+
}
|
package/service/HttpService.js
CHANGED
@@ -1,23 +1,23 @@
|
|
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
|
+
"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
|
+
(0, SimDecorator_1.Sim)(),
|
19
|
+
__metadata("design:paramtypes", [])
|
20
|
+
], HttpService);
|
21
|
+
return HttpService;
|
22
|
+
}());
|
23
|
+
exports.HttpService = HttpService;
|
package/service/Navigation.d.ts
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
import { SimFrontOption } from '../option/SimFrontOption';
|
2
|
-
export declare class Navigation {
|
3
|
-
private option;
|
4
|
-
constructor(option: SimFrontOption);
|
5
|
-
get path(): string;
|
6
|
-
get queryParams(): Map<string, string>;
|
7
|
-
get pathInfo(): {
|
8
|
-
path: string;
|
9
|
-
queryParams: Map<string, string>;
|
10
|
-
};
|
11
|
-
go(path: string, data?: {}, title?: string): void;
|
12
|
-
}
|
1
|
+
import { SimFrontOption } from '../option/SimFrontOption';
|
2
|
+
export declare class Navigation {
|
3
|
+
private option;
|
4
|
+
constructor(option: SimFrontOption);
|
5
|
+
get path(): string;
|
6
|
+
get queryParams(): Map<string, string>;
|
7
|
+
get pathInfo(): {
|
8
|
+
path: string;
|
9
|
+
queryParams: Map<string, string>;
|
10
|
+
};
|
11
|
+
go(path: string, data?: {}, title?: string): void;
|
12
|
+
}
|
package/service/Navigation.js
CHANGED
@@ -1,75 +1,75 @@
|
|
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("../utils/window/LocationUtils");
|
16
|
-
var Navigation = (function () {
|
17
|
-
function Navigation(option) {
|
18
|
-
this.option = option;
|
19
|
-
}
|
20
|
-
Object.defineProperty(Navigation.prototype, "path", {
|
21
|
-
get: function () {
|
22
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
23
|
-
return LocationUtils_1.LocationUtils.path();
|
24
|
-
}
|
25
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
26
|
-
return LocationUtils_1.LocationUtils.hashPath();
|
27
|
-
}
|
28
|
-
else {
|
29
|
-
return '';
|
30
|
-
}
|
31
|
-
},
|
32
|
-
enumerable: false,
|
33
|
-
configurable: true
|
34
|
-
});
|
35
|
-
Object.defineProperty(Navigation.prototype, "queryParams", {
|
36
|
-
get: function () {
|
37
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
38
|
-
return LocationUtils_1.LocationUtils.pathQueryParams();
|
39
|
-
}
|
40
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
41
|
-
return LocationUtils_1.LocationUtils.hashQueryParams();
|
42
|
-
}
|
43
|
-
else {
|
44
|
-
return new Map();
|
45
|
-
}
|
46
|
-
},
|
47
|
-
enumerable: false,
|
48
|
-
configurable: true
|
49
|
-
});
|
50
|
-
Object.defineProperty(Navigation.prototype, "pathInfo", {
|
51
|
-
get: function () {
|
52
|
-
return { path: this.path, queryParams: this.queryParams };
|
53
|
-
},
|
54
|
-
enumerable: false,
|
55
|
-
configurable: true
|
56
|
-
});
|
57
|
-
Navigation.prototype.go = function (path, data, title) {
|
58
|
-
if (data === void 0) { data = {}; }
|
59
|
-
if (title === void 0) { title = ''; }
|
60
|
-
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
61
|
-
history.pushState(data, title, path);
|
62
|
-
}
|
63
|
-
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
64
|
-
path = '#' + path.substring(1);
|
65
|
-
history.pushState(data, title, path);
|
66
|
-
}
|
67
|
-
window.dispatchEvent(new Event('popstate'));
|
68
|
-
};
|
69
|
-
Navigation = __decorate([
|
70
|
-
SimDecorator_1.Sim(),
|
71
|
-
__metadata("design:paramtypes", [SimFrontOption_1.SimFrontOption])
|
72
|
-
], Navigation);
|
73
|
-
return Navigation;
|
74
|
-
}());
|
75
|
-
exports.Navigation = Navigation;
|
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("../utils/window/LocationUtils");
|
16
|
+
var Navigation = (function () {
|
17
|
+
function Navigation(option) {
|
18
|
+
this.option = option;
|
19
|
+
}
|
20
|
+
Object.defineProperty(Navigation.prototype, "path", {
|
21
|
+
get: function () {
|
22
|
+
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
23
|
+
return LocationUtils_1.LocationUtils.path();
|
24
|
+
}
|
25
|
+
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
26
|
+
return LocationUtils_1.LocationUtils.hashPath();
|
27
|
+
}
|
28
|
+
else {
|
29
|
+
return '';
|
30
|
+
}
|
31
|
+
},
|
32
|
+
enumerable: false,
|
33
|
+
configurable: true
|
34
|
+
});
|
35
|
+
Object.defineProperty(Navigation.prototype, "queryParams", {
|
36
|
+
get: function () {
|
37
|
+
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
38
|
+
return LocationUtils_1.LocationUtils.pathQueryParams();
|
39
|
+
}
|
40
|
+
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
41
|
+
return LocationUtils_1.LocationUtils.hashQueryParams();
|
42
|
+
}
|
43
|
+
else {
|
44
|
+
return new Map();
|
45
|
+
}
|
46
|
+
},
|
47
|
+
enumerable: false,
|
48
|
+
configurable: true
|
49
|
+
});
|
50
|
+
Object.defineProperty(Navigation.prototype, "pathInfo", {
|
51
|
+
get: function () {
|
52
|
+
return { path: this.path, queryParams: this.queryParams };
|
53
|
+
},
|
54
|
+
enumerable: false,
|
55
|
+
configurable: true
|
56
|
+
});
|
57
|
+
Navigation.prototype.go = function (path, data, title) {
|
58
|
+
if (data === void 0) { data = {}; }
|
59
|
+
if (title === void 0) { title = ''; }
|
60
|
+
if (SimFrontOption_1.UrlType.path === this.option.urlType) {
|
61
|
+
history.pushState(data, title, path);
|
62
|
+
}
|
63
|
+
else if (SimFrontOption_1.UrlType.hash === this.option.urlType) {
|
64
|
+
path = '#' + path.substring(1);
|
65
|
+
history.pushState(data, title, path);
|
66
|
+
}
|
67
|
+
window.dispatchEvent(new Event('popstate'));
|
68
|
+
};
|
69
|
+
Navigation = __decorate([
|
70
|
+
(0, SimDecorator_1.Sim)(),
|
71
|
+
__metadata("design:paramtypes", [SimFrontOption_1.SimFrontOption])
|
72
|
+
], Navigation);
|
73
|
+
return Navigation;
|
74
|
+
}());
|
75
|
+
exports.Navigation = Navigation;
|
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
|
+
}
|