Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1 www 1
module.exports = function(grunt) {
2
  return {
3
 
4
    /***********
5
     * PRIVATE METHODS
6
     * Ignore _init method, which is a subset of other method names, and is used in different ways
7
     * Note: can't do public methods, as they need to be called as is
8
     ***********/
9
    one: {
10
      options: {
11
        patterns: [
12
          // Note: _a is now reserved for step two
13
          {
14
            match: /_processCountryData/g,
15
            replacement: '_b'
16
          }, {
17
            match: /_addCountryCode/g,
18
            replacement: '_c'
19
          }, {
20
            match: /_processAllCountries/g,
21
            replacement: '_d'
22
          }, {
23
            match: /_translateCountriesByLocale/g,
24
            replacement: '_d0'
25
          }, {
26
            match: /_countryNameSort/g,
27
            replacement: '_d1'
28
          }, {
29
            match: /_processCountryCodes/g,
30
            replacement: '_d2'
31
          }, {
32
            match: /_processPreferredCountries/g,
33
            replacement: '_e'
34
          }, {
35
            match: /_createEl/g,
36
            replacement: '_e2'
37
          }, {
38
            match: /_generateMarkup/g,
39
            replacement: '_f'
40
          }, {
41
            match: /_appendListItems/g,
42
            replacement: '_g'
43
          }, {
44
            match: /_setInitialState/g,
45
            replacement: '_h'
46
          }, {
47
            match: /_initListeners/g,
48
            replacement: '_i'
49
          }, {
50
            match: /_initHiddenInputListener/g,
51
            replacement: '_i0'
52
          }, {
53
            match: /_getClosestLabel/g,
54
            replacement: '_i1'
55
          }, {
56
            match: /_initDropdownListeners/g,
57
            replacement: '_i2'
58
          }, {
59
            match: /_initRequests/g,
60
            replacement: '_i3'
61
          }, {
62
            match: /_loadAutoCountry/g,
63
            replacement: '_i4'
64
          }, {
65
            match: /_initKeyListeners/g,
66
            replacement: '_j'
67
          }, {
68
            match: /_cap/g,
69
            replacement: '_j2'
70
          }, {
71
            match: /_initBlurListeners/g,
72
            replacement: '_l'
73
          }, {
74
            match: /_removeEmptyDialCode/g,
75
            replacement: '_l2'
76
          }, {
77
            match: /_getNumeric/g,
78
            replacement: '_m'
79
          }, {
80
            match: /_trigger/g,
81
            replacement: '_m2'
82
          }, {
83
            match: /_showDropdown/g,
84
            replacement: '_n'
85
          }, {
86
            match: /_toggleClass/g,
87
            replacement: '_n2'
88
          }, {
89
            match: /_setDropdownPosition/g,
90
            replacement: '_o'
91
          }, {
92
            match: /_getClosestListItem/g,
93
            replacement: '_o2'
94
          }, {
95
            match: /_bindDropdownListeners/g,
96
            replacement: '_p'
97
          }, {
98
            match: /_handleUpDownKey/g,
99
            replacement: '_q'
100
          }, {
101
            match: /_handleEnterKey/g,
102
            replacement: '_r'
103
          }, {
104
            match: /_searchForCountry/g,
105
            replacement: '_s'
106
          }, {
107
            match: /_startsWith/g,
108
            replacement: '_t'
109
          }, {
110
            match: /_updateValFromNumber/g,
111
            replacement: '_u'
112
          }, {
113
            match: /_updateFlagFromNumber/g,
114
            replacement: '_v'
115
          }, {
116
            match: /_isRegionlessNanp/g,
117
            replacement: '_w'
118
          }, {
119
            match: /_highlightListItem/g,
120
            replacement: '_x'
121
          }, {
122
            match: /_getCountryData/g,
123
            replacement: '_y'
124
          }, {
125
            match: /_setFlag/g,
126
            replacement: '_z'
127
          }, {
128
            match: /_getHiddenSelectedFlagWidth/g,
129
            replacement: '_z2'
130
          }, {
131
            match: /_updatePlaceholder/g,
132
            replacement: '_0'
133
          }, {
134
            match: /_selectListItem/g,
135
            replacement: '_1'
136
          }, {
137
            match: /_closeDropdown/g,
138
            replacement: '_2'
139
          }, {
140
            match: /_scrollTo/g,
141
            replacement: '_3'
142
          }, {
143
            match: /_updateDialCode/g,
144
            replacement: '_4'
145
          }, {
146
            match: /_getDialCode/g,
147
            replacement: '_5'
148
          }, {
149
            match: /_getFullNumber/g,
150
            replacement: '_6'
151
          }, {
152
            match: /_beforeSetNumber/g,
153
            replacement: '_7'
154
          }
155
        ]
156
      },
157
      files: {
158
        'tmp/one.min.js': 'tmp/wrapped.min.js',
159
        'tmp/one-jquery.min.js': 'tmp/wrapped-jquery.min.js',
160
      }
161
    },
162
 
163
 
164
    /***********
165
     * INLINE PRIVATE METHODS
166
     ***********/
167
    two: {
168
      options: {
169
        patterns: [
170
          {
171
            match: /_handleMouseoverCountryList/g,
172
            replacement: '_a0'
173
          }, {
174
            match: /_handleClickCountryList/g,
175
            replacement: '_a1'
176
          }, {
177
            match: /_handleClickOffToClose/g,
178
            replacement: '_a2'
179
          }, {
180
            match: /_handleKeydownOnDropdown/g,
181
            replacement: '_a3'
182
          }, {
183
            match: /_handleWindowScroll/g,
184
            replacement: '_a4'
185
          }, {
186
            match: /_handleSubmitOrBlurEvent/g,
187
            replacement: '_a8'
188
          }, {
189
            match: /_handleLabelClick/g,
190
            replacement: '_a9'
191
          }, {
192
            match: /_handleClickSelectedFlag/g,
193
            replacement: '_a10'
194
          }, {
195
            match: /_handleFlagsContainerKeydown/g,
196
            replacement: '_a11'
197
          }, {
198
            match: /_handleKeyupEvent/g,
199
            replacement: '_a12'
200
          }, {
201
            match: /_handleClipboardEvent/g,
202
            replacement: '_a13'
203
          }, {
204
            match: /_handleHiddenInputSubmit/g,
205
            replacement: '_a14'
206
          }
207
        ]
208
      },
209
      files: {
210
        'tmp/two.min.js': 'tmp/one.min.js',
211
        'tmp/two-jquery.min.js': 'tmp/one-jquery.min.js',
212
      }
213
    },
214
 
215
 
216
    /***********
217
     * INSTANCE FIELDS
218
     * Note: avoid option names as that will break things!
219
     ***********/
220
    three: {
221
      options: {
222
        patterns: [
223
          {
224
            match: /\.telInput/g,
225
            replacement: '.a'
226
          }, {
227
            match: /\.activeItem/g,
228
            replacement: '.b'
229
          }, {
230
            match: /\.highlightedItem/g,
231
            replacement: '.c'
232
          }, {
233
            match: /\.options/g,
234
            replacement: '.d'
235
          }, {
236
            match: /\.hadInitialPlaceholder/g,
237
            replacement: '.e'
238
          }, {
239
            match: /\.isMobile/g,
240
            replacement: '.g'
241
          }, {
242
            match: /\.resolveAutoCountryPromise/g,
243
            replacement: '.h'
244
          }, {
245
            match: /\.rejectAutoCountryPromise/g,
246
            replacement: '.i'
247
          }, {
248
            match: /\.resolveUtilsScriptPromise/g,
249
            replacement: '.i0'
250
          }, {
251
            match: /\.rejectUtilsScriptPromise/g,
252
            replacement: '.i1'
253
          }, {
254
            match: /\.defaultCountry/g,
255
            replacement: '.j'
256
          }, {
257
            match: /\.flagsContainer/g,
258
            replacement: '.k'
259
          }, {
260
            match: /\.selectedFlagInner/g,
261
            replacement: '.l'
262
          }, {
263
            match: /\.countryList/g,
264
            replacement: '.m'
265
          }, {
266
            match: /\.countries/g,
267
            replacement: '.p'
268
          }, {
269
            match: /\.countryCodes/g,
270
            replacement: '.q'
271
          }, {
272
            match: /\.selectedCountryData/g,
273
            replacement: '.s'
274
          }, {
275
            match: /\.selectedDialCode/g,
276
            replacement: '.t'
277
          }, {
278
            match: /\.dropdownArrow/g,
279
            replacement: '.u'
280
          }
281
        ]
282
      },
283
      files: {
284
        'build/js/intlTelInput.min.js': 'tmp/two.min.js',
285
        'build/js/intlTelInput-jquery.min.js': 'tmp/two-jquery.min.js',
286
      }
287
    }
288
  };
289
};