@ms-atlas/datastudio 0.1.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of @ms-atlas/datastudio might be problematic. Click here for more details.
- package/ExternalLibraries/Monaco/vs/loader.js +2166 -0
- package/ExternalLibraries/URI.min.js +1901 -0
- package/ExternalLibraries/crossroads.min.js +453 -0
- package/ExternalLibraries/css.js +165 -0
- package/ExternalLibraries/d3.min.js +10857 -0
- package/ExternalLibraries/es6-promise.min.js +363 -0
- package/ExternalLibraries/hammer.js +2224 -0
- package/ExternalLibraries/hull.js +444 -0
- package/ExternalLibraries/i18n.min.js +115 -0
- package/ExternalLibraries/jquery-ui-timepicker-addon.min.css +76 -0
- package/ExternalLibraries/jquery-ui-timepicker-addon.min.js +1918 -0
- package/ExternalLibraries/jquery-ui.js +17201 -0
- package/ExternalLibraries/jquery-ui.min.css +1454 -0
- package/ExternalLibraries/jquery.history.js +2173 -0
- package/ExternalLibraries/jquery.min.js +5168 -0
- package/ExternalLibraries/jquery.mockjax.min.js +445 -0
- package/ExternalLibraries/jquery.modal.js +173 -0
- package/ExternalLibraries/jstree.js +10086 -0
- package/ExternalLibraries/jstree.style.css +1048 -0
- package/ExternalLibraries/jwt-decode.min.js +142 -0
- package/ExternalLibraries/knockout-latest.debug.js +7375 -0
- package/ExternalLibraries/knockout.mapping.min.js +534 -0
- package/ExternalLibraries/moment.js +3389 -0
- package/ExternalLibraries/q.js +1974 -0
- package/ExternalLibraries/require.js +2230 -0
- package/ExternalLibraries/signals.min.js +179 -0
- package/ExternalLibraries/text.js +445 -0
- package/ExternalLibraries/uuid.js +274 -0
- package/datastudio.application.mainpage.js +1502 -0
- package/datastudio.application.shared.js +626 -0
- package/datastudio.bootstrapper.js +517 -0
- package/fonts.css +14 -0
- package/nls/resx.js +1 -0
- package/nls/root/resx.js +22 -0
- package/package.json +22 -0
- package/scripts/application/sourceMapper.js +15 -0
- package/scripts/libs/adal/adal.js +720 -0
- package/stylesheets/main.css +8879 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
!(function (e) {
|
|
2
|
+
if ("object" == typeof exports && "undefined" != typeof module)
|
|
3
|
+
module.exports = e();
|
|
4
|
+
else if ("function" == typeof define && define.amd) define([], e);
|
|
5
|
+
else {
|
|
6
|
+
var f;
|
|
7
|
+
"undefined" != typeof window
|
|
8
|
+
? (f = window)
|
|
9
|
+
: "undefined" != typeof global
|
|
10
|
+
? (f = global)
|
|
11
|
+
: "undefined" != typeof self && (f = self),
|
|
12
|
+
(f.hull = e());
|
|
13
|
+
}
|
|
14
|
+
})(function () {
|
|
15
|
+
var define, module, exports;
|
|
16
|
+
return (function e(t, n, r) {
|
|
17
|
+
function s(o, u) {
|
|
18
|
+
if (!n[o]) {
|
|
19
|
+
if (!t[o]) {
|
|
20
|
+
var a = typeof require == "function" && require;
|
|
21
|
+
if (!u && a) return a(o, !0);
|
|
22
|
+
if (i) return i(o, !0);
|
|
23
|
+
var f = new Error("Cannot find module '" + o + "'");
|
|
24
|
+
throw ((f.code = "MODULE_NOT_FOUND"), f);
|
|
25
|
+
}
|
|
26
|
+
var l = (n[o] = { exports: {} });
|
|
27
|
+
t[o][0].call(
|
|
28
|
+
l.exports,
|
|
29
|
+
function (e) {
|
|
30
|
+
var n = t[o][1][e];
|
|
31
|
+
return s(n ? n : e);
|
|
32
|
+
},
|
|
33
|
+
l,
|
|
34
|
+
l.exports,
|
|
35
|
+
e,
|
|
36
|
+
t,
|
|
37
|
+
n,
|
|
38
|
+
r
|
|
39
|
+
);
|
|
40
|
+
}
|
|
41
|
+
return n[o].exports;
|
|
42
|
+
}
|
|
43
|
+
var i = typeof require == "function" && require;
|
|
44
|
+
for (var o = 0; o < r.length; o++) s(r[o]);
|
|
45
|
+
return s;
|
|
46
|
+
})(
|
|
47
|
+
{
|
|
48
|
+
1: [
|
|
49
|
+
function (require, module, exports) {
|
|
50
|
+
function Grid(points) {
|
|
51
|
+
var _cells = [];
|
|
52
|
+
|
|
53
|
+
points.forEach(function (point) {
|
|
54
|
+
var cellXY = this.point2CellXY(point),
|
|
55
|
+
x = cellXY[0],
|
|
56
|
+
y = cellXY[1];
|
|
57
|
+
if (_cells[x] === undefined) {
|
|
58
|
+
_cells[x] = [];
|
|
59
|
+
}
|
|
60
|
+
if (_cells[x][y] === undefined) {
|
|
61
|
+
_cells[x][y] = [];
|
|
62
|
+
}
|
|
63
|
+
_cells[x][y].push(point);
|
|
64
|
+
}, this);
|
|
65
|
+
|
|
66
|
+
this.cellPoints = function (x, y) {
|
|
67
|
+
// (Number, Number) -> Array
|
|
68
|
+
return _cells[x] !== undefined && _cells[x][y] !== undefined
|
|
69
|
+
? _cells[x][y]
|
|
70
|
+
: [];
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
this.removePoint = function (point) {
|
|
74
|
+
// (Array) -> Array
|
|
75
|
+
var cellXY = this.point2CellXY(point),
|
|
76
|
+
cell = _cells[cellXY[0]][cellXY[1]],
|
|
77
|
+
pointIdxInCell;
|
|
78
|
+
|
|
79
|
+
for (var i = 0; i < cell.length; i++) {
|
|
80
|
+
if (cell[i][0] === point[0] && cell[i][1] === point[1]) {
|
|
81
|
+
pointIdxInCell = i;
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
cell.splice(pointIdxInCell, 1);
|
|
87
|
+
|
|
88
|
+
return cell;
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
Grid.prototype = {
|
|
93
|
+
point2CellXY: function (point) {
|
|
94
|
+
// (Array) -> Array
|
|
95
|
+
var x = parseInt(point[0] / Grid.CELL_SIZE),
|
|
96
|
+
y = parseInt(point[1] / Grid.CELL_SIZE);
|
|
97
|
+
return [x, y];
|
|
98
|
+
},
|
|
99
|
+
|
|
100
|
+
rangePoints: function (bbox) {
|
|
101
|
+
// (Array) -> Array
|
|
102
|
+
var tlCellXY = this.point2CellXY([bbox[0], bbox[1]]),
|
|
103
|
+
brCellXY = this.point2CellXY([bbox[2], bbox[3]]),
|
|
104
|
+
points = [];
|
|
105
|
+
|
|
106
|
+
for (var x = tlCellXY[0]; x <= brCellXY[0]; x++) {
|
|
107
|
+
for (var y = tlCellXY[1]; y <= brCellXY[1]; y++) {
|
|
108
|
+
points = points.concat(this.cellPoints(x, y));
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return points;
|
|
113
|
+
},
|
|
114
|
+
|
|
115
|
+
addBorder2Bbox: function (bbox, border) {
|
|
116
|
+
// (Array, Number) -> Array
|
|
117
|
+
return [
|
|
118
|
+
bbox[0] - border * Grid.CELL_SIZE,
|
|
119
|
+
bbox[1] - border * Grid.CELL_SIZE,
|
|
120
|
+
bbox[2] + border * Grid.CELL_SIZE,
|
|
121
|
+
bbox[3] + border * Grid.CELL_SIZE,
|
|
122
|
+
];
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
function grid(points) {
|
|
127
|
+
return new Grid(points);
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
Grid.CELL_SIZE = 10;
|
|
131
|
+
|
|
132
|
+
module.exports = grid;
|
|
133
|
+
},
|
|
134
|
+
{},
|
|
135
|
+
],
|
|
136
|
+
2: [
|
|
137
|
+
function (require, module, exports) {
|
|
138
|
+
/*
|
|
139
|
+
(c) 2014-2015, Andrii Heonia
|
|
140
|
+
Hull.js, a JavaScript library for concave hull generation by set of points.
|
|
141
|
+
https://github.com/AndriiHeonia/hull
|
|
142
|
+
*/
|
|
143
|
+
|
|
144
|
+
var intersect = require("./intersect.js");
|
|
145
|
+
var grid = require("./grid.js");
|
|
146
|
+
|
|
147
|
+
function _formatToXy(pointset, format) {
|
|
148
|
+
if (format === undefined) {
|
|
149
|
+
return pointset;
|
|
150
|
+
}
|
|
151
|
+
return pointset.map(function (pt) {
|
|
152
|
+
/*jslint evil: true */
|
|
153
|
+
var _getXY = new Function(
|
|
154
|
+
"pt",
|
|
155
|
+
"return [pt" + format[0] + "," + "pt" + format[1] + "];"
|
|
156
|
+
);
|
|
157
|
+
return _getXY(pt);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
function _xyToFormat(pointset, format) {
|
|
162
|
+
if (format === undefined) {
|
|
163
|
+
return pointset;
|
|
164
|
+
}
|
|
165
|
+
return pointset.map(function (pt) {
|
|
166
|
+
/*jslint evil: true */
|
|
167
|
+
var _getObj = new Function(
|
|
168
|
+
"pt",
|
|
169
|
+
"var o = {}; o" +
|
|
170
|
+
format[0] +
|
|
171
|
+
"= pt[0]; o" +
|
|
172
|
+
format[1] +
|
|
173
|
+
"= pt[1]; return o;"
|
|
174
|
+
);
|
|
175
|
+
return _getObj(pt);
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function _sortByX(pointset) {
|
|
180
|
+
return pointset.sort(function (a, b) {
|
|
181
|
+
if (a[0] == b[0]) {
|
|
182
|
+
return a[1] - b[1];
|
|
183
|
+
} else {
|
|
184
|
+
return a[0] - b[0];
|
|
185
|
+
}
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
function _getMaxY(pointset) {
|
|
190
|
+
var maxY = -Infinity;
|
|
191
|
+
for (var i = pointset.length - 1; i >= 0; i--) {
|
|
192
|
+
if (pointset[i][1] > maxY) {
|
|
193
|
+
maxY = pointset[i][1];
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return maxY;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
function _upperTangent(pointset) {
|
|
200
|
+
var lower = [];
|
|
201
|
+
for (var l = 0; l < pointset.length; l++) {
|
|
202
|
+
while (
|
|
203
|
+
lower.length >= 2 &&
|
|
204
|
+
_cross(
|
|
205
|
+
lower[lower.length - 2],
|
|
206
|
+
lower[lower.length - 1],
|
|
207
|
+
pointset[l]
|
|
208
|
+
) <= 0
|
|
209
|
+
) {
|
|
210
|
+
lower.pop();
|
|
211
|
+
}
|
|
212
|
+
lower.push(pointset[l]);
|
|
213
|
+
}
|
|
214
|
+
lower.pop();
|
|
215
|
+
return lower;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
function _lowerTangent(pointset) {
|
|
219
|
+
var reversed = pointset.reverse(),
|
|
220
|
+
upper = [];
|
|
221
|
+
for (var u = 0; u < reversed.length; u++) {
|
|
222
|
+
while (
|
|
223
|
+
upper.length >= 2 &&
|
|
224
|
+
_cross(
|
|
225
|
+
upper[upper.length - 2],
|
|
226
|
+
upper[upper.length - 1],
|
|
227
|
+
reversed[u]
|
|
228
|
+
) <= 0
|
|
229
|
+
) {
|
|
230
|
+
upper.pop();
|
|
231
|
+
}
|
|
232
|
+
upper.push(reversed[u]);
|
|
233
|
+
}
|
|
234
|
+
upper.pop();
|
|
235
|
+
return upper;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
function _cross(o, a, b) {
|
|
239
|
+
return (
|
|
240
|
+
(a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0])
|
|
241
|
+
);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
function _sqLength(a, b) {
|
|
245
|
+
return Math.pow(b[0] - a[0], 2) + Math.pow(b[1] - a[1], 2);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
function _cos(o, a, b) {
|
|
249
|
+
var aShifted = [a[0] - o[0], a[1] - o[1]],
|
|
250
|
+
bShifted = [b[0] - o[0], b[1] - o[1]],
|
|
251
|
+
sqALen = _sqLength(o, a),
|
|
252
|
+
sqBLen = _sqLength(o, b),
|
|
253
|
+
dot = aShifted[0] * bShifted[0] + aShifted[1] * bShifted[1];
|
|
254
|
+
|
|
255
|
+
return dot / Math.sqrt(sqALen * sqBLen);
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
function _intersect(segment, pointset) {
|
|
259
|
+
for (var i = 0; i < pointset.length - 1; i++) {
|
|
260
|
+
var seg = [pointset[i], pointset[i + 1]];
|
|
261
|
+
if (
|
|
262
|
+
(segment[0][0] === seg[0][0] && segment[0][1] === seg[0][1]) ||
|
|
263
|
+
(segment[0][0] === seg[1][0] && segment[0][1] === seg[1][1])
|
|
264
|
+
) {
|
|
265
|
+
continue;
|
|
266
|
+
}
|
|
267
|
+
if (intersect(segment, seg)) {
|
|
268
|
+
return true;
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
function _bBoxAround(edge, boxSize) {
|
|
275
|
+
var minX, maxX, minY, maxY;
|
|
276
|
+
|
|
277
|
+
if (edge[0][0] < edge[1][0]) {
|
|
278
|
+
minX = edge[0][0] - boxSize;
|
|
279
|
+
maxX = edge[1][0] + boxSize;
|
|
280
|
+
} else {
|
|
281
|
+
minX = edge[1][0] - boxSize;
|
|
282
|
+
maxX = edge[0][0] + boxSize;
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
if (edge[0][1] < edge[1][1]) {
|
|
286
|
+
minY = edge[0][1] - boxSize;
|
|
287
|
+
maxY = edge[1][1] + boxSize;
|
|
288
|
+
} else {
|
|
289
|
+
minY = edge[1][1] - boxSize;
|
|
290
|
+
maxY = edge[0][1] + boxSize;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
return [
|
|
294
|
+
minX,
|
|
295
|
+
minY, // tl
|
|
296
|
+
maxX,
|
|
297
|
+
maxY, // br
|
|
298
|
+
];
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function _midPoint(edge, innerPoints, convex) {
|
|
302
|
+
var point = null,
|
|
303
|
+
angle1Cos = MAX_CONCAVE_ANGLE_COS,
|
|
304
|
+
angle2Cos = MAX_CONCAVE_ANGLE_COS,
|
|
305
|
+
a1Cos,
|
|
306
|
+
a2Cos;
|
|
307
|
+
|
|
308
|
+
for (var i = 0; i < innerPoints.length; i++) {
|
|
309
|
+
a1Cos = _cos(edge[0], edge[1], innerPoints[i]);
|
|
310
|
+
a2Cos = _cos(edge[1], edge[0], innerPoints[i]);
|
|
311
|
+
|
|
312
|
+
if (
|
|
313
|
+
a1Cos > angle1Cos &&
|
|
314
|
+
a2Cos > angle2Cos &&
|
|
315
|
+
!_intersect([edge[0], innerPoints[i]], convex) &&
|
|
316
|
+
!_intersect([edge[1], innerPoints[i]], convex)
|
|
317
|
+
) {
|
|
318
|
+
angle1Cos = a1Cos;
|
|
319
|
+
angle2Cos = a2Cos;
|
|
320
|
+
point = innerPoints[i];
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
return point;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
function _concave(convex, maxSqEdgeLen, maxSearchBBoxSize, grid) {
|
|
328
|
+
var edge,
|
|
329
|
+
border,
|
|
330
|
+
bBoxSize,
|
|
331
|
+
midPoint,
|
|
332
|
+
bBoxAround,
|
|
333
|
+
midPointInserted = false;
|
|
334
|
+
|
|
335
|
+
for (var i = 0; i < convex.length - 1; i++) {
|
|
336
|
+
edge = [convex[i], convex[i + 1]];
|
|
337
|
+
|
|
338
|
+
if (_sqLength(edge[0], edge[1]) < maxSqEdgeLen) {
|
|
339
|
+
continue;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
border = 0;
|
|
343
|
+
bBoxSize = MIN_SEARCH_BBOX_SIZE;
|
|
344
|
+
bBoxAround = _bBoxAround(edge, bBoxSize);
|
|
345
|
+
do {
|
|
346
|
+
bBoxAround = grid.addBorder2Bbox(bBoxAround, border);
|
|
347
|
+
bBoxSize = bBoxAround[2] - bBoxAround[0];
|
|
348
|
+
midPoint = _midPoint(
|
|
349
|
+
edge,
|
|
350
|
+
grid.rangePoints(bBoxAround),
|
|
351
|
+
convex
|
|
352
|
+
);
|
|
353
|
+
border++;
|
|
354
|
+
} while (midPoint === null && maxSearchBBoxSize > bBoxSize);
|
|
355
|
+
|
|
356
|
+
if (midPoint !== null) {
|
|
357
|
+
convex.splice(i + 1, 0, midPoint);
|
|
358
|
+
grid.removePoint(midPoint);
|
|
359
|
+
midPointInserted = true;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
if (midPointInserted) {
|
|
364
|
+
return _concave(convex, maxSqEdgeLen, maxSearchBBoxSize, grid);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
return convex;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
function hull(pointset, concavity, format) {
|
|
371
|
+
var lower,
|
|
372
|
+
upper,
|
|
373
|
+
convex,
|
|
374
|
+
innerPoints,
|
|
375
|
+
maxSearchBBoxSize,
|
|
376
|
+
maxEdgeLen = concavity || 20;
|
|
377
|
+
|
|
378
|
+
if (pointset.length < 4) {
|
|
379
|
+
return pointset;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
pointset = _sortByX(_formatToXy(pointset, format));
|
|
383
|
+
upper = _upperTangent(pointset);
|
|
384
|
+
lower = _lowerTangent(pointset);
|
|
385
|
+
convex = lower.concat(upper);
|
|
386
|
+
convex.push(pointset[0]);
|
|
387
|
+
|
|
388
|
+
maxSearchBBoxSize =
|
|
389
|
+
Math.max(pointset[pointset.length - 1][0], _getMaxY(convex)) *
|
|
390
|
+
MAX_SEARCH_BBOX_SIZE_PERCENT;
|
|
391
|
+
innerPoints = pointset.filter(function (pt) {
|
|
392
|
+
return convex.indexOf(pt) < 0;
|
|
393
|
+
});
|
|
394
|
+
|
|
395
|
+
return _xyToFormat(
|
|
396
|
+
_concave(
|
|
397
|
+
convex,
|
|
398
|
+
Math.pow(maxEdgeLen, 2),
|
|
399
|
+
maxSearchBBoxSize,
|
|
400
|
+
grid(innerPoints)
|
|
401
|
+
),
|
|
402
|
+
format
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
var MAX_CONCAVE_ANGLE_COS = Math.cos(90 / (180 / Math.PI)); // angle = 90 deg
|
|
407
|
+
var MIN_SEARCH_BBOX_SIZE = 5;
|
|
408
|
+
var MAX_SEARCH_BBOX_SIZE_PERCENT = 0.8;
|
|
409
|
+
|
|
410
|
+
module.exports = hull;
|
|
411
|
+
},
|
|
412
|
+
{ "./grid.js": 1, "./intersect.js": 3 },
|
|
413
|
+
],
|
|
414
|
+
3: [
|
|
415
|
+
function (require, module, exports) {
|
|
416
|
+
function ccw(x1, y1, x2, y2, x3, y3) {
|
|
417
|
+
var cw = (y3 - y1) * (x2 - x1) - (y2 - y1) * (x3 - x1);
|
|
418
|
+
return cw > 0 ? true : cw < 0 ? false : true; // colinear
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function intersect(seg1, seg2) {
|
|
422
|
+
var x1 = seg1[0][0],
|
|
423
|
+
y1 = seg1[0][1],
|
|
424
|
+
x2 = seg1[1][0],
|
|
425
|
+
y2 = seg1[1][1],
|
|
426
|
+
x3 = seg2[0][0],
|
|
427
|
+
y3 = seg2[0][1],
|
|
428
|
+
x4 = seg2[1][0],
|
|
429
|
+
y4 = seg2[1][1];
|
|
430
|
+
return (
|
|
431
|
+
ccw(x1, y1, x3, y3, x4, y4) !== ccw(x2, y2, x3, y3, x4, y4) &&
|
|
432
|
+
ccw(x1, y1, x2, y2, x3, y3) !== ccw(x1, y1, x2, y2, x4, y4)
|
|
433
|
+
);
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
module.exports = intersect;
|
|
437
|
+
},
|
|
438
|
+
{},
|
|
439
|
+
],
|
|
440
|
+
},
|
|
441
|
+
{},
|
|
442
|
+
[2]
|
|
443
|
+
)(2);
|
|
444
|
+
});
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license RequireJS i18n 2.0.6 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
|
|
3
|
+
* Available via the MIT or new BSD license.
|
|
4
|
+
* see: http://github.com/requirejs/i18n for details
|
|
5
|
+
*/
|
|
6
|
+
/*jslint regexp: true */
|
|
7
|
+
/*global require: false, navigator: false, define: false */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* This plugin handles i18n! prefixed modules. It does the following:
|
|
11
|
+
*
|
|
12
|
+
* 1) A regular module can have a dependency on an i18n bundle, but the regular
|
|
13
|
+
* module does not want to specify what locale to load. So it just specifies
|
|
14
|
+
* the top-level bundle, like 'i18n!nls/colors'.
|
|
15
|
+
*
|
|
16
|
+
* This plugin will load the i18n bundle at nls/colors, see that it is a root/master
|
|
17
|
+
* bundle since it does not have a locale in its name. It will then try to find
|
|
18
|
+
* the best match locale available in that master bundle, then request all the
|
|
19
|
+
* locale pieces for that best match locale. For instance, if the locale is 'en-us',
|
|
20
|
+
* then the plugin will ask for the 'en-us', 'en' and 'root' bundles to be loaded
|
|
21
|
+
* (but only if they are specified on the master bundle).
|
|
22
|
+
*
|
|
23
|
+
* Once all the bundles for the locale pieces load, then it mixes in all those
|
|
24
|
+
* locale pieces into each other, then finally sets the context.defined value
|
|
25
|
+
* for the nls/colors bundle to be that mixed in locale.
|
|
26
|
+
*
|
|
27
|
+
* 2) A regular module specifies a specific locale to load. For instance,
|
|
28
|
+
* i18n!nls/fr-fr/colors. In this case, the plugin needs to load the master bundle
|
|
29
|
+
* first, at nls/colors, then figure out what the best match locale is for fr-fr,
|
|
30
|
+
* since maybe only fr or just root is defined for that locale. Once that best
|
|
31
|
+
* fit is found, all of its locale pieces need to have their bundles loaded.
|
|
32
|
+
*
|
|
33
|
+
* Once all the bundles for the locale pieces load, then it mixes in all those
|
|
34
|
+
* locale pieces into each other, then finally sets the context.defined value
|
|
35
|
+
* for the nls/fr-fr/colors bundle to be that mixed in locale.
|
|
36
|
+
*/
|
|
37
|
+
!(function () {
|
|
38
|
+
"use strict";
|
|
39
|
+
function o(o, n, e, a, t, r) {
|
|
40
|
+
n[o] && (e.push(o), (n[o] === !0 || 1 === n[o]) && a.push(t + o + "/" + r));
|
|
41
|
+
}
|
|
42
|
+
function n(o, n, e, a, t) {
|
|
43
|
+
var r = a + n + "/" + t;
|
|
44
|
+
require._fileExists(o.toUrl(r + ".js")) && e.push(r);
|
|
45
|
+
}
|
|
46
|
+
function e(o, n, a) {
|
|
47
|
+
var t;
|
|
48
|
+
for (t in n)
|
|
49
|
+
!n.hasOwnProperty(t) || (o.hasOwnProperty(t) && !a)
|
|
50
|
+
? "object" == typeof n[t] &&
|
|
51
|
+
(!o[t] && n[t] && (o[t] = {}), e(o[t], n[t], a))
|
|
52
|
+
: (o[t] = n[t]);
|
|
53
|
+
}
|
|
54
|
+
var a = /(^.*(^|\/)nls(\/|$))([^\/]*)\/?([^\/]*)/;
|
|
55
|
+
define(["module"], function (t) {
|
|
56
|
+
var r = t.config ? t.config() : {};
|
|
57
|
+
return {
|
|
58
|
+
version: "2.0.6",
|
|
59
|
+
load: function (t, i, l, u) {
|
|
60
|
+
(u = u || {}), u.locale && (r.locale = u.locale);
|
|
61
|
+
var f,
|
|
62
|
+
s,
|
|
63
|
+
c,
|
|
64
|
+
g = a.exec(t),
|
|
65
|
+
v = g[1],
|
|
66
|
+
p = g[4],
|
|
67
|
+
h = g[5],
|
|
68
|
+
d = p.split("-"),
|
|
69
|
+
y = [],
|
|
70
|
+
w = {},
|
|
71
|
+
j = "";
|
|
72
|
+
if (
|
|
73
|
+
(g[5]
|
|
74
|
+
? ((v = g[1]), (f = v + h))
|
|
75
|
+
: ((f = t),
|
|
76
|
+
(h = g[4]),
|
|
77
|
+
(p = r.locale),
|
|
78
|
+
p ||
|
|
79
|
+
(p = r.locale =
|
|
80
|
+
"undefined" == typeof navigator
|
|
81
|
+
? "root"
|
|
82
|
+
: (
|
|
83
|
+
(navigator.languages && navigator.languages[0]) ||
|
|
84
|
+
navigator.language ||
|
|
85
|
+
navigator.userLanguage ||
|
|
86
|
+
"root"
|
|
87
|
+
).toLowerCase()),
|
|
88
|
+
(d = p.split("-"))),
|
|
89
|
+
u.isBuild)
|
|
90
|
+
) {
|
|
91
|
+
for (y.push(f), n(i, "root", y, v, h), s = 0; s < d.length; s++)
|
|
92
|
+
(c = d[s]), (j += (j ? "-" : "") + c), n(i, j, y, v, h);
|
|
93
|
+
i(y, function () {
|
|
94
|
+
l();
|
|
95
|
+
});
|
|
96
|
+
} else
|
|
97
|
+
i([f], function (n) {
|
|
98
|
+
var a,
|
|
99
|
+
t = [];
|
|
100
|
+
for (o("root", n, t, y, v, h), s = 0; s < d.length; s++)
|
|
101
|
+
(a = d[s]), (j += (j ? "-" : "") + a), o(j, n, t, y, v, h);
|
|
102
|
+
i(y, function () {
|
|
103
|
+
var o, a, r;
|
|
104
|
+
for (o = t.length - 1; o > -1 && t[o]; o--)
|
|
105
|
+
(r = t[o]),
|
|
106
|
+
(a = n[r]),
|
|
107
|
+
(a === !0 || 1 === a) && (a = i(v + r + "/" + h)),
|
|
108
|
+
e(w, a);
|
|
109
|
+
l(w);
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
})();
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/*! jQuery Timepicker Addon - v1.5.5 - 2015-05-24
|
|
2
|
+
* http://trentrichardson.com/examples/timepicker
|
|
3
|
+
* Copyright (c) 2015 Trent Richardson;Licensed MIT */
|
|
4
|
+
.ui-timepicker-div .ui-widget-header {
|
|
5
|
+
margin-bottom: 8px;
|
|
6
|
+
}
|
|
7
|
+
.ui-timepicker-div dl {
|
|
8
|
+
text-align: left;
|
|
9
|
+
}
|
|
10
|
+
.ui-timepicker-div dl dt {
|
|
11
|
+
float: left;
|
|
12
|
+
clear: left;
|
|
13
|
+
padding: 0 0 0 5px;
|
|
14
|
+
}
|
|
15
|
+
.ui-timepicker-div dl dd {
|
|
16
|
+
margin: 0 10px 10px 40%;
|
|
17
|
+
}
|
|
18
|
+
.ui-timepicker-div td {
|
|
19
|
+
font-size: 90%;
|
|
20
|
+
}
|
|
21
|
+
.ui-tpicker-grid-label {
|
|
22
|
+
background: 0 0;
|
|
23
|
+
border: 0;
|
|
24
|
+
margin: 0;
|
|
25
|
+
padding: 0;
|
|
26
|
+
}
|
|
27
|
+
.ui-timepicker-div .ui_tpicker_unit_hide {
|
|
28
|
+
display: none;
|
|
29
|
+
}
|
|
30
|
+
.ui-timepicker-rtl {
|
|
31
|
+
direction: rtl;
|
|
32
|
+
}
|
|
33
|
+
.ui-timepicker-rtl dl {
|
|
34
|
+
text-align: right;
|
|
35
|
+
padding: 0 5px 0 0;
|
|
36
|
+
}
|
|
37
|
+
.ui-timepicker-rtl dl dt {
|
|
38
|
+
float: right;
|
|
39
|
+
clear: right;
|
|
40
|
+
}
|
|
41
|
+
.ui-timepicker-rtl dl dd {
|
|
42
|
+
margin: 0 40% 10px 10px;
|
|
43
|
+
}
|
|
44
|
+
.ui-timepicker-div.ui-timepicker-oneLine {
|
|
45
|
+
padding-right: 2px;
|
|
46
|
+
}
|
|
47
|
+
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time,
|
|
48
|
+
.ui-timepicker-div.ui-timepicker-oneLine dt {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_time_label {
|
|
52
|
+
display: block;
|
|
53
|
+
padding-top: 2px;
|
|
54
|
+
}
|
|
55
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl {
|
|
56
|
+
text-align: right;
|
|
57
|
+
}
|
|
58
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl dd,
|
|
59
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl dd > div {
|
|
60
|
+
display: inline-block;
|
|
61
|
+
margin: 0;
|
|
62
|
+
}
|
|
63
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_minute:before,
|
|
64
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_second:before {
|
|
65
|
+
content: ":";
|
|
66
|
+
display: inline-block;
|
|
67
|
+
}
|
|
68
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_millisec:before,
|
|
69
|
+
.ui-timepicker-div.ui-timepicker-oneLine dl dd.ui_tpicker_microsec:before {
|
|
70
|
+
content: ".";
|
|
71
|
+
display: inline-block;
|
|
72
|
+
}
|
|
73
|
+
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide,
|
|
74
|
+
.ui-timepicker-div.ui-timepicker-oneLine .ui_tpicker_unit_hide:before {
|
|
75
|
+
display: none;
|
|
76
|
+
}
|