@base-framework/base 3.0.78 → 3.0.80
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.js +1 -1
- package/dist/base.js.map +3 -3
- package/dist/types/base.d.ts +25 -0
- package/dist/types/main/base.d.ts +94 -0
- package/dist/types/main/data-tracker/data-tracker.d.ts +93 -0
- package/dist/types/main/data-tracker/tracker-types.d.ts +23 -0
- package/dist/types/main/data-tracker/tracker.d.ts +56 -0
- package/dist/types/main/equals.d.ts +1 -0
- package/dist/types/main/events/event-methods.d.ts +124 -0
- package/dist/types/main/events/events.d.ts +208 -0
- package/dist/types/modules/ajax/ajax.d.ts +153 -0
- package/dist/types/modules/animation/animation.d.ts +79 -0
- package/dist/types/modules/animations/animation-controller.d.ts +61 -0
- package/dist/types/modules/animations/animation.d.ts +28 -0
- package/dist/types/modules/animations/attr-movement.d.ts +5 -0
- package/dist/types/modules/animations/css-movement.d.ts +8 -0
- package/dist/types/modules/animations/movement-factory.d.ts +34 -0
- package/dist/types/modules/animations/movement.d.ts +24 -0
- package/dist/types/modules/animations/value.d.ts +30 -0
- package/dist/types/modules/atom/atom.d.ts +1 -0
- package/dist/types/modules/atom/atoms.d.ts +343 -0
- package/dist/types/modules/component/component.d.ts +99 -0
- package/dist/types/modules/component/event-helper.d.ts +59 -0
- package/dist/types/modules/component/jot.d.ts +1 -0
- package/dist/types/modules/component/parse-args.d.ts +1 -0
- package/dist/types/modules/component/state-helper.d.ts +102 -0
- package/dist/types/modules/component/unit.d.ts +281 -0
- package/dist/types/modules/data/attrs.d.ts +1 -0
- package/dist/types/modules/data/basic-data.d.ts +259 -0
- package/dist/types/modules/data/data-proxy.d.ts +1 -0
- package/dist/types/modules/data/data-utils.d.ts +17 -0
- package/dist/types/modules/data/data.d.ts +3 -0
- package/dist/types/modules/data/deep-data.d.ts +162 -0
- package/dist/types/modules/data/model-service.d.ts +280 -0
- package/dist/types/modules/data/model.d.ts +33 -0
- package/dist/types/modules/data/simple-data.d.ts +12 -0
- package/dist/types/modules/data-binder/connection-tracker/connection-tracker.d.ts +45 -0
- package/dist/types/modules/data-binder/connection-tracker/connections/connection.d.ts +15 -0
- package/dist/types/modules/data-binder/connection-tracker/connections/one-way-connection.d.ts +23 -0
- package/dist/types/modules/data-binder/connection-tracker/connections/two-way-connection.d.ts +62 -0
- package/dist/types/modules/data-binder/data-binder.d.ts +175 -0
- package/dist/types/modules/data-binder/data-pub-sub.d.ts +66 -0
- package/dist/types/modules/data-binder/sources/data-source.d.ts +51 -0
- package/dist/types/modules/data-binder/sources/element-source.d.ts +84 -0
- package/dist/types/modules/data-binder/sources/one-way-source.d.ts +33 -0
- package/dist/types/modules/data-binder/sources/source.d.ts +26 -0
- package/dist/types/modules/data-binder/sources/two-way-source.d.ts +42 -0
- package/dist/types/modules/date/date-time.d.ts +165 -0
- package/dist/types/modules/history/history.d.ts +10 -0
- package/dist/types/modules/html/html.d.ts +136 -0
- package/dist/types/modules/import/import.d.ts +1 -0
- package/dist/types/modules/layout/builder.d.ts +102 -0
- package/dist/types/modules/layout/directives/core/aria/aria.d.ts +2 -0
- package/dist/types/modules/layout/directives/core/context/context-directives.d.ts +3 -0
- package/dist/types/modules/layout/directives/core/default-directives.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/dom-methods.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/parent/parent-directives.d.ts +5 -0
- package/dist/types/modules/layout/directives/core/reactive/bind.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/for-each.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/get-parent-data.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/map.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/on-created.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/on-destroyed.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/on-set.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/on-state.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/reactive/watch.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/route.d.ts +1 -0
- package/dist/types/modules/layout/directives/core/switch.d.ts +1 -0
- package/dist/types/modules/layout/directives/directive.d.ts +1 -0
- package/dist/types/modules/layout/directives/directives.d.ts +25 -0
- package/dist/types/modules/layout/element/attribute-directive.d.ts +1 -0
- package/dist/types/modules/layout/element/attribute.d.ts +1 -0
- package/dist/types/modules/layout/element/element.d.ts +1 -0
- package/dist/types/modules/layout/element/parser.d.ts +65 -0
- package/dist/types/modules/layout/html-helper.d.ts +57 -0
- package/dist/types/modules/layout/render/browser-render.d.ts +10 -0
- package/dist/types/modules/layout/render/render-controller.d.ts +23 -0
- package/dist/types/modules/layout/render/render.d.ts +18 -0
- package/dist/types/modules/layout/render/server-render.d.ts +10 -0
- package/dist/types/modules/layout/watcher-helper.d.ts +103 -0
- package/dist/types/modules/mouse/mouse.d.ts +45 -0
- package/dist/types/modules/router/history/browser-history.d.ts +39 -0
- package/dist/types/modules/router/history/hash-history.d.ts +25 -0
- package/dist/types/modules/router/history/history-controller.d.ts +21 -0
- package/dist/types/modules/router/history/history.d.ts +35 -0
- package/dist/types/modules/router/nav-link.d.ts +37 -0
- package/dist/types/modules/router/router.d.ts +268 -0
- package/dist/types/modules/router/routes/component-helper.d.ts +75 -0
- package/dist/types/modules/router/routes/param-pattern.d.ts +2 -0
- package/dist/types/modules/router/routes/route-pattern.d.ts +1 -0
- package/dist/types/modules/router/routes/route.d.ts +120 -0
- package/dist/types/modules/router/set-title.d.ts +1 -0
- package/dist/types/modules/router/utils.d.ts +9 -0
- package/dist/types/modules/state/state-target.d.ts +45 -0
- package/dist/types/modules/state/state-tracker.d.ts +103 -0
- package/dist/types/shared/arrays.d.ts +26 -0
- package/dist/types/shared/dom.d.ts +272 -0
- package/dist/types/shared/encode/encode.d.ts +38 -0
- package/dist/types/shared/encode/json.d.ts +15 -0
- package/dist/types/shared/objects.d.ts +62 -0
- package/dist/types/shared/strings.d.ts +34 -0
- package/dist/types/shared/types.d.ts +52 -0
- package/package.json +5 -3
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* BrowserHistory
|
|
3
|
+
*
|
|
4
|
+
* This will setup the history controller.
|
|
5
|
+
*
|
|
6
|
+
* @class
|
|
7
|
+
*/
|
|
8
|
+
export class BrowserHistory extends History {
|
|
9
|
+
/**
|
|
10
|
+
* This will remove the events.
|
|
11
|
+
*
|
|
12
|
+
* @returns {object} a reference to the object.
|
|
13
|
+
*/
|
|
14
|
+
removeEvent(): object;
|
|
15
|
+
/**
|
|
16
|
+
* This will check to activate the router.
|
|
17
|
+
*
|
|
18
|
+
* @param {object} evt
|
|
19
|
+
*/
|
|
20
|
+
check(evt: object): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* This will create a state object.
|
|
23
|
+
*
|
|
24
|
+
* @param {string} uri
|
|
25
|
+
* @param {*} data
|
|
26
|
+
* @returns {object}
|
|
27
|
+
*/
|
|
28
|
+
createState(uri: string, data?: any): object;
|
|
29
|
+
/**
|
|
30
|
+
* This will add a state to the history.
|
|
31
|
+
*
|
|
32
|
+
* @param {string} uri
|
|
33
|
+
* @param {object} data
|
|
34
|
+
* @param {boolean} replace
|
|
35
|
+
* @returns {object} a reference to the object.
|
|
36
|
+
*/
|
|
37
|
+
addState(uri: string, data: object, replace?: boolean): object;
|
|
38
|
+
}
|
|
39
|
+
import { History } from "./history.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HashHistory
|
|
3
|
+
*
|
|
4
|
+
* This will setup the history controller.
|
|
5
|
+
*
|
|
6
|
+
* @class
|
|
7
|
+
*/
|
|
8
|
+
export class HashHistory extends History {
|
|
9
|
+
/**
|
|
10
|
+
* This will remove the events.
|
|
11
|
+
*
|
|
12
|
+
* @returns {object} a reference to the object.
|
|
13
|
+
*/
|
|
14
|
+
removeEvent(): object;
|
|
15
|
+
/**
|
|
16
|
+
* This will add a state to the history.
|
|
17
|
+
*
|
|
18
|
+
* @param {string} uri
|
|
19
|
+
* @param {object} data
|
|
20
|
+
* @param {boolean} replace
|
|
21
|
+
* @returns {object} a reference to the object.
|
|
22
|
+
*/
|
|
23
|
+
addState(uri: string, data: object, replace: boolean): object;
|
|
24
|
+
}
|
|
25
|
+
import { History } from "./history.js";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HistoryController
|
|
3
|
+
*
|
|
4
|
+
* This will setup the history controller.
|
|
5
|
+
* @class
|
|
6
|
+
*/
|
|
7
|
+
export class HistoryController {
|
|
8
|
+
/**
|
|
9
|
+
* This will check if browser based navigation is supported
|
|
10
|
+
*
|
|
11
|
+
* @returns boolean
|
|
12
|
+
*/
|
|
13
|
+
static browserIsSupported(): boolean;
|
|
14
|
+
/**
|
|
15
|
+
* This will create a History Object based on navigation support
|
|
16
|
+
*
|
|
17
|
+
* @param {object} router
|
|
18
|
+
* @returns History
|
|
19
|
+
*/
|
|
20
|
+
static setup(router: object): any;
|
|
21
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* History
|
|
3
|
+
*
|
|
4
|
+
* This will setup the history controller.
|
|
5
|
+
* @class
|
|
6
|
+
*/
|
|
7
|
+
export class History {
|
|
8
|
+
/**
|
|
9
|
+
* @constructor
|
|
10
|
+
* @param {object} router
|
|
11
|
+
*/
|
|
12
|
+
constructor(router: object);
|
|
13
|
+
router: any;
|
|
14
|
+
locationId: string;
|
|
15
|
+
callBack: any;
|
|
16
|
+
/**
|
|
17
|
+
* This will check if the history api is supported
|
|
18
|
+
* and add events.
|
|
19
|
+
*
|
|
20
|
+
* @returns {object} a reference to the object.
|
|
21
|
+
*/
|
|
22
|
+
setup(): object;
|
|
23
|
+
/**
|
|
24
|
+
* This will check to activate the router.
|
|
25
|
+
*
|
|
26
|
+
* @param {object} evt
|
|
27
|
+
*/
|
|
28
|
+
check(evt: object): void;
|
|
29
|
+
/**
|
|
30
|
+
* This will add the events.
|
|
31
|
+
*
|
|
32
|
+
* @returns {object} a reference to the object.
|
|
33
|
+
*/
|
|
34
|
+
addEvent(): object;
|
|
35
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NavLink
|
|
3
|
+
*
|
|
4
|
+
* This will create a nav link that will add an active
|
|
5
|
+
* class when the browser route path matches the link
|
|
6
|
+
* href.
|
|
7
|
+
*
|
|
8
|
+
* @class
|
|
9
|
+
* @extends Component
|
|
10
|
+
*/
|
|
11
|
+
export class NavLink extends Component {
|
|
12
|
+
selectedClass: any;
|
|
13
|
+
/**
|
|
14
|
+
* This will get string.
|
|
15
|
+
*
|
|
16
|
+
* @param {string} string
|
|
17
|
+
* @returns {(string|null)}
|
|
18
|
+
*/
|
|
19
|
+
getString(string: string): (string | null);
|
|
20
|
+
/**
|
|
21
|
+
* This will setup the watchers.
|
|
22
|
+
*
|
|
23
|
+
* @protected
|
|
24
|
+
* @param {string} href
|
|
25
|
+
* @param {string} text
|
|
26
|
+
* @returns {array}
|
|
27
|
+
*/
|
|
28
|
+
protected setupWatchers(href: string, text: string): any[];
|
|
29
|
+
/**
|
|
30
|
+
* This will update the class on the element.
|
|
31
|
+
*
|
|
32
|
+
* @param {boolean} selected
|
|
33
|
+
* @returns {void}
|
|
34
|
+
*/
|
|
35
|
+
update(selected: boolean): void;
|
|
36
|
+
}
|
|
37
|
+
import { Component } from '../component/component.js';
|
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
export { NavLink } from "./nav-link.js";
|
|
2
|
+
/**
|
|
3
|
+
* Router
|
|
4
|
+
*
|
|
5
|
+
* This will create a browser router.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
*/
|
|
9
|
+
export class Router {
|
|
10
|
+
/**
|
|
11
|
+
* @member {string} version
|
|
12
|
+
*/
|
|
13
|
+
version: string;
|
|
14
|
+
/**
|
|
15
|
+
* This is the root of the uri for the routing object
|
|
16
|
+
* and the base title.
|
|
17
|
+
*/
|
|
18
|
+
baseURI: string;
|
|
19
|
+
title: string;
|
|
20
|
+
lastPath: string;
|
|
21
|
+
path: string;
|
|
22
|
+
/**
|
|
23
|
+
* This will be used to access our history object.
|
|
24
|
+
*/
|
|
25
|
+
history: any;
|
|
26
|
+
callBackLink: any;
|
|
27
|
+
location: Location;
|
|
28
|
+
/**
|
|
29
|
+
* This will store each route added to the router.
|
|
30
|
+
*/
|
|
31
|
+
routes: any[];
|
|
32
|
+
switches: {};
|
|
33
|
+
switchCount: number;
|
|
34
|
+
/**
|
|
35
|
+
* @member {object} data
|
|
36
|
+
*/
|
|
37
|
+
data: Data;
|
|
38
|
+
/**
|
|
39
|
+
* This will setup our history object.
|
|
40
|
+
*
|
|
41
|
+
* @protected
|
|
42
|
+
* @returns {void}
|
|
43
|
+
*/
|
|
44
|
+
protected setupHistory(): void;
|
|
45
|
+
/**
|
|
46
|
+
* This will create a new route.
|
|
47
|
+
*
|
|
48
|
+
* @protected
|
|
49
|
+
* @param {object} settings
|
|
50
|
+
* @returns {object}
|
|
51
|
+
*/
|
|
52
|
+
protected createRoute(settings: object): object;
|
|
53
|
+
/**
|
|
54
|
+
* This will add a new route to the router.
|
|
55
|
+
*
|
|
56
|
+
* @param {object} settings
|
|
57
|
+
* @returns {object}
|
|
58
|
+
*/
|
|
59
|
+
add(settings: object, ...args: any[]): object;
|
|
60
|
+
/**
|
|
61
|
+
* This will add a route.
|
|
62
|
+
*
|
|
63
|
+
* @param {object} route
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
addRoute(route: object): void;
|
|
67
|
+
/**
|
|
68
|
+
* This will resume a route.
|
|
69
|
+
*
|
|
70
|
+
* @param {object} route
|
|
71
|
+
* @param {object} container
|
|
72
|
+
* @returns {void}
|
|
73
|
+
*/
|
|
74
|
+
resume(route: object, container: object): void;
|
|
75
|
+
/**
|
|
76
|
+
* This will get the base path.
|
|
77
|
+
*
|
|
78
|
+
* @protected
|
|
79
|
+
* @returns {string}
|
|
80
|
+
*/
|
|
81
|
+
protected getBasePath(): string;
|
|
82
|
+
basePath: string;
|
|
83
|
+
/**
|
|
84
|
+
* This will create a uri.
|
|
85
|
+
*
|
|
86
|
+
* @protected
|
|
87
|
+
* @param {string} uri
|
|
88
|
+
* @returns {string}
|
|
89
|
+
*/
|
|
90
|
+
protected createURI(uri: string): string;
|
|
91
|
+
/**
|
|
92
|
+
* This will get a route by uri.
|
|
93
|
+
*
|
|
94
|
+
* @param {string} uri
|
|
95
|
+
* @returns {(object|boolean)}
|
|
96
|
+
*/
|
|
97
|
+
getRoute(uri: string): (object | boolean);
|
|
98
|
+
/**
|
|
99
|
+
* This will get a route by id.
|
|
100
|
+
*
|
|
101
|
+
* @param {string} id
|
|
102
|
+
* @returns {(object|boolean)}
|
|
103
|
+
*/
|
|
104
|
+
getRouteById(id: string): (object | boolean);
|
|
105
|
+
/**
|
|
106
|
+
* This will remove a route.
|
|
107
|
+
*
|
|
108
|
+
* @param {object} route
|
|
109
|
+
*/
|
|
110
|
+
removeRoute(route: object): void;
|
|
111
|
+
/**
|
|
112
|
+
* This will add a switch.
|
|
113
|
+
*
|
|
114
|
+
* @param {array} group
|
|
115
|
+
* @returns {number} the switch id.
|
|
116
|
+
*/
|
|
117
|
+
addSwitch(group: any[]): number;
|
|
118
|
+
/**
|
|
119
|
+
* This will resume a switch.
|
|
120
|
+
*
|
|
121
|
+
* @param {object} group
|
|
122
|
+
* @param {object} container
|
|
123
|
+
* @returns {number} the switch id.
|
|
124
|
+
*/
|
|
125
|
+
resumeSwitch(group: object, container: object): number;
|
|
126
|
+
getSwitchGroup(id: any): any[];
|
|
127
|
+
/**
|
|
128
|
+
* This will remove a switch by id.
|
|
129
|
+
*
|
|
130
|
+
* @param {string} id
|
|
131
|
+
*/
|
|
132
|
+
removeSwitch(id: string): void;
|
|
133
|
+
/**
|
|
134
|
+
* This will remove a route by uri.
|
|
135
|
+
*
|
|
136
|
+
* @param {string} uri
|
|
137
|
+
* @returns {object} a reference to the router object.
|
|
138
|
+
*/
|
|
139
|
+
remove(uri: string): object;
|
|
140
|
+
/**
|
|
141
|
+
* This will setup the router.
|
|
142
|
+
*
|
|
143
|
+
* @param {string} [baseURI]
|
|
144
|
+
* @param {string} [title]
|
|
145
|
+
* @returns {object} a reference to the router object.
|
|
146
|
+
*/
|
|
147
|
+
setup(baseURI?: string, title?: string): object;
|
|
148
|
+
updateBaseTag(url: any): void;
|
|
149
|
+
/**
|
|
150
|
+
* This will get the parent element link.
|
|
151
|
+
*
|
|
152
|
+
* @param {object} ele
|
|
153
|
+
* @returns {(object|boolean)}
|
|
154
|
+
*/
|
|
155
|
+
getParentLink(ele: object): (object | boolean);
|
|
156
|
+
/**
|
|
157
|
+
* This will check if a link was routed.
|
|
158
|
+
*
|
|
159
|
+
* @protected
|
|
160
|
+
* @param {object} evt
|
|
161
|
+
*/
|
|
162
|
+
protected checkLink(evt: object): boolean;
|
|
163
|
+
/**
|
|
164
|
+
* This will reset the router.
|
|
165
|
+
*
|
|
166
|
+
* @returns {object} a reference to the router object.
|
|
167
|
+
*/
|
|
168
|
+
reset(): object;
|
|
169
|
+
/**
|
|
170
|
+
* This will check the active routes.
|
|
171
|
+
*
|
|
172
|
+
* @returns {object} a reference to the router object.
|
|
173
|
+
*/
|
|
174
|
+
activate(): object;
|
|
175
|
+
/**
|
|
176
|
+
* This will navigate the router.
|
|
177
|
+
*
|
|
178
|
+
* @param {string} uri
|
|
179
|
+
* @param {object} [data]
|
|
180
|
+
* @param {boolean} [replace]
|
|
181
|
+
* @returns {object} a reference to the router object.
|
|
182
|
+
*/
|
|
183
|
+
navigate(uri: string, data?: object, replace?: boolean): object;
|
|
184
|
+
/**
|
|
185
|
+
* This will update the data path.
|
|
186
|
+
* @protected
|
|
187
|
+
*/
|
|
188
|
+
protected updatePath(): void;
|
|
189
|
+
/**
|
|
190
|
+
* This will update the title.
|
|
191
|
+
*
|
|
192
|
+
* @protected
|
|
193
|
+
* @param {object} route
|
|
194
|
+
*/
|
|
195
|
+
protected updateTitle(route: object): this;
|
|
196
|
+
/**
|
|
197
|
+
* This will check the routes to match the path.
|
|
198
|
+
*
|
|
199
|
+
* @protected
|
|
200
|
+
* @param {string} [path]
|
|
201
|
+
*/
|
|
202
|
+
protected checkActiveRoutes(path?: string): void;
|
|
203
|
+
/**
|
|
204
|
+
* This will check the switches to match the path.
|
|
205
|
+
*
|
|
206
|
+
* @protected
|
|
207
|
+
* @param {string} [path]
|
|
208
|
+
* @returns {void}
|
|
209
|
+
*/
|
|
210
|
+
protected checkSwitches(path?: string): void;
|
|
211
|
+
/**
|
|
212
|
+
* This will check a group to match a path.
|
|
213
|
+
*
|
|
214
|
+
* @protected
|
|
215
|
+
* @param {object} group
|
|
216
|
+
* @param {string} path
|
|
217
|
+
* @returns {void}
|
|
218
|
+
*/
|
|
219
|
+
protected checkGroup(group: object, path: string): void;
|
|
220
|
+
/**
|
|
221
|
+
* This will check if a route matches the path.
|
|
222
|
+
*
|
|
223
|
+
* @param {object} route
|
|
224
|
+
* @param {string} path
|
|
225
|
+
* @returns {boolean}
|
|
226
|
+
*/
|
|
227
|
+
checkRoute(route: object, path: string): boolean;
|
|
228
|
+
/**
|
|
229
|
+
* This will select a route if the route matches the path.
|
|
230
|
+
*
|
|
231
|
+
* @param {object} route
|
|
232
|
+
* @param {string} [path]
|
|
233
|
+
* @returns {boolean}
|
|
234
|
+
*/
|
|
235
|
+
check(route: object, path?: string): boolean;
|
|
236
|
+
/**
|
|
237
|
+
* This will select the route.
|
|
238
|
+
*
|
|
239
|
+
* @param {object} route
|
|
240
|
+
* @returns {void}
|
|
241
|
+
*/
|
|
242
|
+
select(route: object): void;
|
|
243
|
+
/**
|
|
244
|
+
* This will get the endpoint.
|
|
245
|
+
*
|
|
246
|
+
* @returns {string}
|
|
247
|
+
*/
|
|
248
|
+
getEndPoint(): string;
|
|
249
|
+
/**
|
|
250
|
+
* This will remove the router events.
|
|
251
|
+
*
|
|
252
|
+
* @returns {void}
|
|
253
|
+
*/
|
|
254
|
+
destroy(): void;
|
|
255
|
+
/**
|
|
256
|
+
* This will get the location pathname.
|
|
257
|
+
*
|
|
258
|
+
* @returns {string}
|
|
259
|
+
*/
|
|
260
|
+
getPath(): string;
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* This will create a new router.
|
|
264
|
+
*
|
|
265
|
+
* @type {Router}
|
|
266
|
+
*/
|
|
267
|
+
export const router: Router;
|
|
268
|
+
import { Data } from '../data/data.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ComponentHelper
|
|
3
|
+
*
|
|
4
|
+
* This will create a helper to create and destroy components
|
|
5
|
+
* that are added to a route.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
*/
|
|
9
|
+
export class ComponentHelper {
|
|
10
|
+
/**
|
|
11
|
+
* This will create a component helper.
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {object} route
|
|
15
|
+
* @param {object} settings
|
|
16
|
+
*/
|
|
17
|
+
constructor(route: object, settings: object);
|
|
18
|
+
route: any;
|
|
19
|
+
template: any;
|
|
20
|
+
component: any;
|
|
21
|
+
hasTemplate: boolean;
|
|
22
|
+
setup: boolean;
|
|
23
|
+
container: any;
|
|
24
|
+
persist: any;
|
|
25
|
+
parent: any;
|
|
26
|
+
/**
|
|
27
|
+
* This will create the component.
|
|
28
|
+
*
|
|
29
|
+
* @param {object} params
|
|
30
|
+
* @returns {void}
|
|
31
|
+
*/
|
|
32
|
+
focus(params: object): void;
|
|
33
|
+
/**
|
|
34
|
+
* This will setup the template.
|
|
35
|
+
*
|
|
36
|
+
* @protected
|
|
37
|
+
* @returns {void}
|
|
38
|
+
*/
|
|
39
|
+
protected setupTemplate(): void;
|
|
40
|
+
/**
|
|
41
|
+
* This will initialize the component.
|
|
42
|
+
*
|
|
43
|
+
* @protected
|
|
44
|
+
* @returns {void}
|
|
45
|
+
*/
|
|
46
|
+
protected initializeComponent(): void;
|
|
47
|
+
/**
|
|
48
|
+
* This will initialize the template object.
|
|
49
|
+
*
|
|
50
|
+
* @protected
|
|
51
|
+
* @returns {void}
|
|
52
|
+
*/
|
|
53
|
+
protected initializeTemplateObject(): void;
|
|
54
|
+
/**
|
|
55
|
+
* This will create the route component.
|
|
56
|
+
*
|
|
57
|
+
* @protected
|
|
58
|
+
* @returns {void}
|
|
59
|
+
*/
|
|
60
|
+
protected create(): void;
|
|
61
|
+
/**
|
|
62
|
+
* This will remove the component.
|
|
63
|
+
*
|
|
64
|
+
* @returns {void}
|
|
65
|
+
*/
|
|
66
|
+
remove(): void;
|
|
67
|
+
/**
|
|
68
|
+
* This will call the component update method and pass the params.
|
|
69
|
+
*
|
|
70
|
+
* @protected
|
|
71
|
+
* @param {object} params
|
|
72
|
+
* @returns {void}
|
|
73
|
+
*/
|
|
74
|
+
protected update(params: object): void;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function routePattern(uri: string): string;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Route
|
|
3
|
+
*
|
|
4
|
+
* This will create a route.
|
|
5
|
+
*
|
|
6
|
+
* @class
|
|
7
|
+
* @augments SimpleData
|
|
8
|
+
*/
|
|
9
|
+
export class Route extends SimpleData {
|
|
10
|
+
/**
|
|
11
|
+
* This will create a route.
|
|
12
|
+
*
|
|
13
|
+
* @constructor
|
|
14
|
+
* @param {object} settings
|
|
15
|
+
* @param {function} titleCallBack
|
|
16
|
+
*/
|
|
17
|
+
constructor(settings: object, titleCallBack: Function);
|
|
18
|
+
uri: any;
|
|
19
|
+
paramKeys: any[];
|
|
20
|
+
titleCallBack: Function;
|
|
21
|
+
id: any;
|
|
22
|
+
uriQuery: RegExp;
|
|
23
|
+
controller: ComponentHelper;
|
|
24
|
+
path: string;
|
|
25
|
+
referralPath: string;
|
|
26
|
+
params: any;
|
|
27
|
+
callBack: any;
|
|
28
|
+
title: any;
|
|
29
|
+
/**
|
|
30
|
+
* This will setup the route settings.
|
|
31
|
+
*
|
|
32
|
+
* @protected
|
|
33
|
+
* @param {object} settings
|
|
34
|
+
* @returns {void}
|
|
35
|
+
*/
|
|
36
|
+
protected setupRoute(settings: object): void;
|
|
37
|
+
/**
|
|
38
|
+
* This will update the route title.
|
|
39
|
+
*
|
|
40
|
+
* @param {string|function} title
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
setTitle(title: string | Function): void;
|
|
44
|
+
/**
|
|
45
|
+
* This will deactivate the route.
|
|
46
|
+
*
|
|
47
|
+
* @returns {void}
|
|
48
|
+
*/
|
|
49
|
+
deactivate(): void;
|
|
50
|
+
/**
|
|
51
|
+
* This will get the route layout.
|
|
52
|
+
*
|
|
53
|
+
* @param {object} settings
|
|
54
|
+
* @returns {object|null}
|
|
55
|
+
*/
|
|
56
|
+
getLayout(settings: object): object | null;
|
|
57
|
+
/**
|
|
58
|
+
* This will setup the route layout.
|
|
59
|
+
*
|
|
60
|
+
* @protected
|
|
61
|
+
* @param {object} settings
|
|
62
|
+
* @returns {void}
|
|
63
|
+
*/
|
|
64
|
+
protected setupComponentHelper(settings: object): void;
|
|
65
|
+
/**
|
|
66
|
+
* This will resume the route.
|
|
67
|
+
*
|
|
68
|
+
* @param {object} container
|
|
69
|
+
* @returns {void}
|
|
70
|
+
*/
|
|
71
|
+
resume(container: object): void;
|
|
72
|
+
/**
|
|
73
|
+
* This will set the route path.
|
|
74
|
+
*
|
|
75
|
+
* @param {string} path
|
|
76
|
+
* @param {string} referralPath
|
|
77
|
+
* @returns {void}
|
|
78
|
+
*/
|
|
79
|
+
setPath(path: string, referralPath: string): void;
|
|
80
|
+
/**
|
|
81
|
+
* This will select the route.
|
|
82
|
+
*
|
|
83
|
+
* @returns {void}
|
|
84
|
+
*/
|
|
85
|
+
select(): void;
|
|
86
|
+
/**
|
|
87
|
+
* This will scroll to the element by id.
|
|
88
|
+
*
|
|
89
|
+
* @param {string} hash
|
|
90
|
+
* @returns {void}
|
|
91
|
+
*/
|
|
92
|
+
scrollToId(hash: string): void;
|
|
93
|
+
/**
|
|
94
|
+
* This will check if a route matches the path.
|
|
95
|
+
*
|
|
96
|
+
* @param {string} path
|
|
97
|
+
* @returns {object|boolean}
|
|
98
|
+
*/
|
|
99
|
+
match(path: string): object | boolean;
|
|
100
|
+
/**
|
|
101
|
+
* This will reset the params.
|
|
102
|
+
*
|
|
103
|
+
* @returns {void}
|
|
104
|
+
*/
|
|
105
|
+
resetParams(): void;
|
|
106
|
+
/**
|
|
107
|
+
* This will set the params.
|
|
108
|
+
*
|
|
109
|
+
* @param {object} values
|
|
110
|
+
*/
|
|
111
|
+
setParams(values: object): void;
|
|
112
|
+
/**
|
|
113
|
+
* This will get the params.
|
|
114
|
+
*
|
|
115
|
+
* @returns {object}
|
|
116
|
+
*/
|
|
117
|
+
getParams(): object;
|
|
118
|
+
}
|
|
119
|
+
import { SimpleData } from '../../data/data.js';
|
|
120
|
+
import { ComponentHelper } from './component-helper.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export function setTitle(route: object, title: any, rootTitle: string): string;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* StateTarget
|
|
3
|
+
*
|
|
4
|
+
* This will create a state target to track the state
|
|
5
|
+
* of an object.
|
|
6
|
+
*
|
|
7
|
+
* @class
|
|
8
|
+
* @augments SimpleData
|
|
9
|
+
*/
|
|
10
|
+
export class StateTarget extends SimpleData {
|
|
11
|
+
/**
|
|
12
|
+
* This will create a state target.
|
|
13
|
+
*
|
|
14
|
+
* @constructor
|
|
15
|
+
* @param {string} id
|
|
16
|
+
*/
|
|
17
|
+
constructor(id: string);
|
|
18
|
+
id: string;
|
|
19
|
+
/**
|
|
20
|
+
* This will add an action to the target.
|
|
21
|
+
*
|
|
22
|
+
* @param {string} action
|
|
23
|
+
* @param {*} state
|
|
24
|
+
* @returns {void}
|
|
25
|
+
*/
|
|
26
|
+
addAction(action: string, state: any): void;
|
|
27
|
+
/**
|
|
28
|
+
* This will get the state of an action.
|
|
29
|
+
*
|
|
30
|
+
* @param {string} action
|
|
31
|
+
* @returns {*}
|
|
32
|
+
*/
|
|
33
|
+
getState(action: string): any;
|
|
34
|
+
/**
|
|
35
|
+
* This will remove an action or a callBack
|
|
36
|
+
* from an action. if no token is passed the
|
|
37
|
+
* whole action is removed.
|
|
38
|
+
*
|
|
39
|
+
* @param {string} action
|
|
40
|
+
* @param {string} [token]
|
|
41
|
+
* @returns {void}
|
|
42
|
+
*/
|
|
43
|
+
removeAction(action: string, token?: string): void;
|
|
44
|
+
}
|
|
45
|
+
import { SimpleData } from '../data/data.js';
|