1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | /**
|
7 | * Events constants, which is firing to app.
|
8 | *
|
9 | * @enum {string}
|
10 | */
|
11 | const Events = Object.freeze({
|
12 | /**
|
13 | * Router fire event {@code $IMA.$Router.beforeHandleRoute} before page
|
14 | * manager handle the route. Event's data contain
|
15 | * {@code { params: Object<string, string>}, route: ima.router.Route,
|
16 | * path: string, options: Object<string, *>}}. The {@code path} is current
|
17 | * path, the {@code params} are params extracted from path, the
|
18 | * {@code route} is handle route for path and the {@code options} is route
|
19 | * additional options.
|
20 | *
|
21 | * @const
|
22 | * @type {string}
|
23 | */
|
24 | BEFORE_HANDLE_ROUTE: '$IMA.$Router.beforeHandleRoute',
|
25 |
|
26 | /**
|
27 | * Router fire event {@code $IMA.$Router.afterHandleRoute} after page
|
28 | * manager handle the route. Event's data contain
|
29 | * {@code {response: Object<string, *>, params: Object<string, string>},
|
30 | * route: ima.router.Route, path: string, options: Object<string, *>}}.
|
31 | * The {@code response} is page render result. The {@code path} is current
|
32 | * path, the {@code params} are params extracted from path, the
|
33 | * {@code route} is handle route for path and the {@code options} is route
|
34 | * additional options.
|
35 | *
|
36 | * @const
|
37 | * @type {string}
|
38 | */
|
39 | AFTER_HANDLE_ROUTE: '$IMA.$Router.afterHandleRoute'
|
40 | });
|
41 |
|
42 | exports.default = Events;
|
43 |
|
44 | typeof $IMA !== 'undefined' && $IMA !== null && $IMA.Loader && $IMA.Loader.register('ima/router/Events', [], function (_export, _context) {
|
45 | ;
|
46 | return {
|
47 | setters: [],
|
48 | execute: function () {
|
49 | _export('default', exports.default);
|
50 | }
|
51 | };
|
52 | });
|