@rxdi/router 0.7.219 → 0.7.221
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 +101 -0
- package/dist/decorators.d.ts +1 -2
- package/dist/decorators.js +1 -1
- package/dist/helpers.d.ts +1 -1
- package/dist/helpers.js +11 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -2
- package/dist/injection.tokens.d.ts +23 -16
- package/dist/injection.tokens.js +3 -1
- package/dist/lib/constants.d.ts +3 -0
- package/dist/lib/constants.js +6 -0
- package/dist/lib/index.d.ts +4 -0
- package/dist/{slot → lib}/index.js +6 -4
- package/dist/lib/path-to-regexp.d.ts +6 -0
- package/dist/lib/path-to-regexp.js +228 -0
- package/dist/lib/resolver.d.ts +70 -0
- package/dist/lib/resolver.js +426 -0
- package/dist/{vaadin/vaadin-router.d.ts → lib/router.d.ts} +98 -201
- package/dist/lib/router.js +833 -0
- package/dist/lib/triggers.d.ts +6 -0
- package/dist/lib/triggers.js +98 -0
- package/dist/lib/types.d.ts +134 -0
- package/dist/lib/types.js +6 -0
- package/dist/lib/utils.d.ts +20 -0
- package/dist/lib/utils.js +155 -0
- package/dist/not-found.component.js +3 -3
- package/dist/outlet.d.ts +7 -62
- package/dist/outlet.js +15 -84
- package/dist/router.component.d.ts +3 -3
- package/dist/router.component.js +4 -4
- package/package.json +3 -3
- package/dist/slot/index.d.ts +0 -8
- package/dist/slot/slot.d.ts +0 -11
- package/dist/slot/slot.js +0 -44
- package/dist/vaadin/vaadin-router.js +0 -2065
- package/slot/index.d.ts +0 -8
- package/slot/index.js +0 -8
- package/slot/slot.d.ts +0 -11
- package/slot/slot.js +0 -45
package/dist/router.component.js
CHANGED
|
@@ -20,7 +20,7 @@ const outlet_1 = require("./outlet");
|
|
|
20
20
|
let RouterComponent = class RouterComponent extends lit_html_1.LitElement {
|
|
21
21
|
constructor() {
|
|
22
22
|
super(...arguments);
|
|
23
|
-
this.id =
|
|
23
|
+
this.id = 'router-identifier';
|
|
24
24
|
}
|
|
25
25
|
OnUpdateFirst() {
|
|
26
26
|
const router = new outlet_1.Outlet(this.shadowRoot.getElementById(this.id), core_1.Container.get(injection_tokens_1.RouterOptions));
|
|
@@ -32,15 +32,15 @@ let RouterComponent = class RouterComponent extends lit_html_1.LitElement {
|
|
|
32
32
|
exports.RouterComponent = RouterComponent;
|
|
33
33
|
__decorate([
|
|
34
34
|
(0, lit_html_1.property)(),
|
|
35
|
-
__metadata("design:type",
|
|
35
|
+
__metadata("design:type", Object)
|
|
36
36
|
], RouterComponent.prototype, "id", void 0);
|
|
37
37
|
__decorate([
|
|
38
38
|
(0, lit_html_1.property)({ type: Array }),
|
|
39
|
-
__metadata("design:type",
|
|
39
|
+
__metadata("design:type", Object)
|
|
40
40
|
], RouterComponent.prototype, "routes", void 0);
|
|
41
41
|
exports.RouterComponent = RouterComponent = __decorate([
|
|
42
42
|
(0, lit_html_1.Component)({
|
|
43
|
-
selector:
|
|
43
|
+
selector: 'router-outlet',
|
|
44
44
|
template() {
|
|
45
45
|
return (0, lit_html_1.html) `
|
|
46
46
|
<slot name="header"></slot>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rxdi/router",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.221",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"author": "Kristiyan Tachev",
|
|
6
6
|
"license": "MIT",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"router-slot": "^1.5.4"
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
|
-
"@rxdi/core": "^0.7.
|
|
19
|
-
"@rxdi/lit-html": "^0.7.
|
|
18
|
+
"@rxdi/core": "^0.7.220",
|
|
19
|
+
"@rxdi/lit-html": "^0.7.220"
|
|
20
20
|
},
|
|
21
21
|
"types": "./dist/index.d.ts",
|
|
22
22
|
"module": "./dist/index.js",
|
package/dist/slot/index.d.ts
DELETED
package/dist/slot/slot.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { LitElement } from '@rxdi/lit-html';
|
|
2
|
-
import { IRoute } from 'router-slot';
|
|
3
|
-
import 'router-slot';
|
|
4
|
-
/**
|
|
5
|
-
* @customElement router-slots
|
|
6
|
-
*/
|
|
7
|
-
export declare class RouterSlots extends LitElement {
|
|
8
|
-
slots: IRoute[];
|
|
9
|
-
private routerSlot;
|
|
10
|
-
OnUpdate(): void;
|
|
11
|
-
}
|
package/dist/slot/slot.js
DELETED
|
@@ -1,44 +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.RouterSlots = void 0;
|
|
13
|
-
const lit_html_1 = require("@rxdi/lit-html");
|
|
14
|
-
const router_slot_1 = require("router-slot");
|
|
15
|
-
require("router-slot");
|
|
16
|
-
/**
|
|
17
|
-
* @customElement router-slots
|
|
18
|
-
*/
|
|
19
|
-
let RouterSlots = class RouterSlots extends lit_html_1.LitElement {
|
|
20
|
-
constructor() {
|
|
21
|
-
super(...arguments);
|
|
22
|
-
this.slots = [];
|
|
23
|
-
}
|
|
24
|
-
OnUpdate() {
|
|
25
|
-
this.routerSlot.add(this.slots);
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
exports.RouterSlots = RouterSlots;
|
|
29
|
-
__decorate([
|
|
30
|
-
(0, lit_html_1.property)({ type: Array }),
|
|
31
|
-
__metadata("design:type", Array)
|
|
32
|
-
], RouterSlots.prototype, "slots", void 0);
|
|
33
|
-
__decorate([
|
|
34
|
-
(0, lit_html_1.query)('router-slot'),
|
|
35
|
-
__metadata("design:type", router_slot_1.RouterSlot)
|
|
36
|
-
], RouterSlots.prototype, "routerSlot", void 0);
|
|
37
|
-
exports.RouterSlots = RouterSlots = __decorate([
|
|
38
|
-
(0, lit_html_1.Component)({
|
|
39
|
-
selector: 'router-slots',
|
|
40
|
-
template() {
|
|
41
|
-
return (0, lit_html_1.html) ` <router-slot></router-slot> `;
|
|
42
|
-
},
|
|
43
|
-
})
|
|
44
|
-
], RouterSlots);
|