-
Notifications
You must be signed in to change notification settings - Fork 3
/
index.js
82 lines (70 loc) · 2.13 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
import proxy from './utils/proxy.js';
import extend from './utils/extend';
import { version as VERSION } from './version';
import {
bindEvents as _bindEvents,
unbindEvents as _unbindEvents
} from './modules/common/bind-events.js';
import {
bindRequests as _bindRequests,
unbindRequests as _unbindRequests
} from './modules/common/bind-requests';
import _getOption from './modules/common/get-option';
import _mergeOptions from './modules/common/merge-options';
import monitorViewEvents from './modules/common/monitor-view-events';
import _normalizeMethods from './modules/common/normalize-methods';
import _triggerMethod from './modules/common/trigger-method';
import Events from './mixins/events';
import Requests from './mixins/requests';
import MnObject from './modules/object';
import View from './modules/view';
import CollectionView from './modules/collection-view';
import Behavior from './modules/behavior';
import Region from './modules/region';
import Application from './modules/application';
import Radio from './modules/radio';
import DomApi from './config/dom';
import {
isEnabled,
setEnabled
} from './config/features';
// Utilities
export const bindEvents = proxy(_bindEvents);
export const unbindEvents = proxy(_unbindEvents);
export const bindRequests = proxy(_bindRequests);
export const unbindRequests = proxy(_unbindRequests);
export const mergeOptions = proxy(_mergeOptions);
export const getOption = proxy(_getOption);
export const normalizeMethods = proxy(_normalizeMethods);
export const triggerMethod = proxy(_triggerMethod);
// Configuration
export const setDomApi = function(mixin) {
CollectionView.setDomApi(mixin);
Region.setDomApi(mixin);
View.setDomApi(mixin);
};
export const setRenderer = function(renderer) {
CollectionView.setRenderer(renderer);
View.setRenderer(renderer);
};
export const setEventDelegator = function(delegator) {
CollectionView.setEventDelegator(delegator);
View.setEventDelegator(delegator);
};
export {
View,
CollectionView,
MnObject,
Region,
Behavior,
Application,
Radio,
isEnabled,
setEnabled,
monitorViewEvents,
Events,
Requests,
extend,
DomApi,
VERSION,
};