-
Notifications
You must be signed in to change notification settings - Fork 9
/
config.js
194 lines (187 loc) · 3.81 KB
/
config.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
182
183
184
185
186
187
188
189
190
191
192
193
194
/**
* @license MIT http://troopjs.mit-license.org/
*/
define([
"module",
"troopjs-compose/config",
"mu-emitter/config",
"mu-merge/main"
], function (module, config, emitterConfig, merge) {
"use strict";
/**
* @class core.config.emitter
* @enum {String}
* @private
*/
/**
* @property handlers Property name for `handlers`
*/
/**
* @property emitter Property name for `emitter`
*/
/**
* @property type Property name for `type`
*/
/**
* @property callback Property name for `callback`
*/
/**
* @property data Property name for `data`
*/
/**
* @property scope Property name for `scope`
*/
/**
* @property executor Property name for `executor`
*/
/**
* @property head Property name for `head`
*/
/**
* @property tail Property name for `tail`
*/
/**
* @property next Property name for `next`
*/
/**
* @property count Property name for `count`
*/
/**
* @property limit Property name for `limit`
*/
/**
* @property on Property name for `on`
*/
/**
* @property off Property name for `off`
*/
/**
* @class core.config.phase
* @enum
* @private
*/
var PHASE = {
/**
* Protected phases
*/
"skip": /^(?:initi|fin)alized?$/,
/**
* Phase while component is initializing.
*/
"initialize": "initialize",
/**
* Phase when component is initialized.
*/
"initialized": "initialized",
/**
* Phase while component is starting.
*/
"start": "start",
/**
* Phase when component is started.
*/
"started": "started",
/**
* Phase while component is stopping.
*/
"stop": "stop",
/**
* Phase when component is stopped.
*/
"stopped": "stopped",
/**
* Phase while component is finalizing.
*/
"finalize": "finalize",
/**
* Phase when component is finalized.
*/
"finalized": "finalized"
};
/**
* @class core.config.signal
* @enum {String}
* @private
*/
var SIGNAL = {
/**
* Signal emitted first time an event handler is added.
*/
"setup": "sig/setup",
/**
* Signal emitted before each time an event handler is added.
*/
"add": "sig/add",
/**
* Signal emitted each time an event handler is added.
*/
"added": "sig/added",
/**
* Signal emitted before each time an event handler is removed.
*/
"remove": "sig/remove",
/**
* Signal emitted each time an event handler is removed.
*/
"removed": "sig/removed",
/**
* Signal emitted last time an event handler is removed.
*/
"teardown": "sig/teardown",
/**
* Signal emitted when component initializes.
*/
"initialize": "sig/initialize",
/**
* Signal emitted when component starts.
*/
"start": "sig/start",
/**
* Signal emitted when component stops.
*/
"stop": "sig/stop",
/**
* Signal emitted when component finalizes.
*/
"finalize": "sig/finalize",
/**
* Signal emitted during registration.
*/
"register": "sig/register",
/**
* Signal emitted during un-registeration.
*/
"unregister": "sig/unregister",
/**
* Signal emitted when component starts a task.
*/
"task": "sig/task"
};
/**
* Component configuration
* @class core.config
* @extends compose.config
* @private
* @alias feature.config
*/
return merge.call({}, config, {
/**
* Component signals
* @cfg {core.config.signal}
* @protected
*/
"signal": SIGNAL,
/**
* Component phases
* @cfg {core.config.phase}
* @protected
*/
"phase": PHASE,
/**
* Emitter properties
* @cfg {core.config.emitter}
* @protected
*/
"emitter": emitterConfig
}, module.config());
});