-
Notifications
You must be signed in to change notification settings - Fork 2
/
API.js
181 lines (161 loc) · 3.17 KB
/
API.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
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
const G_C = require('./apis/globalconfig')
const G_API = require('./apis/globalapi')
const O_D = require('./apis/optionsdata')
const O_DOM = require('./apis/optionsdom')
const O_LH = require('./apis/optionslifecyclehooks')
const O_A = require('./apis/optionsassets')
const O_C = require('./apis/optionscomposition')
const O_M = require('./apis/optionsmisc')
const I_P = require('./apis/instanceproperties')
const I_D = require('./apis/instancedata')
const I_E = require('./apis/instanceevents')
const I_L = require('./apis/instancelifecycle')
const D = require('./apis/directives')
const S_A = require('./apis/specialattributes')
const B_C = require('./apis/builtincomp')
const GlobalConfig = [
G_C.SILENT,
G_C.OPTION_MERGE_STRATEGIES,
G_C.DEVTOOLS,
G_C.ERROR_HANDLER,
G_C.WARN_HANDLER,
G_C.IGNORED_ELEMENTS,
G_C.KEY_CODES,
G_C.PERFORMANCE,
G_C.PRODUCTION_TIP
]
const GlobalAPI = [
G_API.EXTEND,
G_API.NEXT_TICK,
G_API.SET,
G_API.DELETE,
G_API.DIRECTIVE,
G_API.FILTER,
G_API.COMPONENT,
G_API.USE,
G_API.MIXIN,
G_API.COMPILE,
G_API.VERSION
]
const OptionsData = [
O_D.DATA,
O_D.PROPS,
O_D.PROPS_DATA,
O_D.COMPUTED,
O_D.METHODS,
O_D.WATCH
]
const OptionsDOM = [
O_DOM.EL,
O_DOM.TEMPLATE,
O_DOM.RENDER,
O_DOM.RENDER_ERROR
]
const OptionsLifecycleHooks = [
O_LH.BEFORE_CREATE,
O_LH.CREATED,
O_LH.BEFORE_MOUNT,
O_LH.MOUNTED,
O_LH.BEFORE_UPDATE,
O_LH.UPDATED,
O_LH.ACTIVATED,
O_LH.DEACTIVATED,
O_LH.BEFORE_DESTROY,
O_LH.DESTROYED
]
const OptionsAssets = [
O_A.DIRECTIVES,
O_A.FILTERS,
O_A.COMPONENTS
]
const OptionsComposition = [
O_C.PARENT,
O_C.MIXINS,
O_C.EXTENDS,
O_C.PROVIDE_INJECT
]
const OptionsMisc = [
O_M.NAME,
O_M.DELIMITERS,
O_M.FUNCTIONAL,
O_M.MODEL,
O_M.INHERIT_ATTRS,
O_M.COMMENTS
]
const InstanceProperties = [
I_P.VM_$DATA,
I_P.VM_$PROPS,
I_P.VM_$EL,
I_P.VM_$OPTIONS,
I_P.VM_$PARENT,
I_P.VM_$ROOT,
I_P.VM_$CHILDREN,
I_P.VM_$SLOTS,
I_P.VM_$SCOPED_SLOTS,
I_P.VM_$REFS,
I_P.VM_$IS_SERVER,
I_P.VM_$ATTRS,
I_P.VM_$LISTENERS
]
const InstanceData = [
I_D.VM_$WATCH,
I_D.VM_$SET,
I_D.VM_$DELETE
]
const InstanceEvents = [
I_E.VM_$ON,
I_E.VM_$ONCE,
I_E.VM_$OFF,
I_E.VM_$EMIT
]
const InstanceLifecycle = [
I_L.VM_$MOUNT,
I_L.VM_$FORCE_UPDATE,
I_L.VM_$NEXT_TICK,
I_L.VM_$DESTROY
]
const Directives = [
D.V_TEXT,
D.V_HTML,
D.V_SHOW,
D.V_IF,
D.V_ELSE,
D.V_ELSE_IF,
D.V_FOR,
D.V_ON,
D.V_BIND,
D.V_MODEL,
D.V_PRE,
D.V_CLOAK,
D.V_ONCE
]
const SpecialAttributes = [
S_A.KEY,
S_A.REF,
S_A.SLOT,
S_A.IS
]
const BuiltInComponents = [
B_C.COMPONENT,
B_C.TRANSITION,
B_C.TRANSITION_GROUP,
B_C.KEEP_ALIVE,
B_C.SLOT_COMPONENT
]
module.exports = {
GlobalConfig,
GlobalAPI,
OptionsData,
OptionsDOM,
OptionsLifecycleHooks,
OptionsAssets,
OptionsComposition,
OptionsMisc,
InstanceProperties,
InstanceData,
InstanceEvents,
InstanceLifecycle,
Directives,
SpecialAttributes,
BuiltInComponents
}