ende 0.3.7 → 0.3.8
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.
- checksums.yaml +4 -4
- data/component.json +2 -1
- data/lib/assets/javascripts/aura/extensions/devise.js.coffee +10 -4
- data/lib/assets/javascripts/aura/extensions/models.js.coffee.erb +1 -1
- data/lib/assets/javascripts/aura/extensions/platform.js.coffee +14 -0
- data/lib/assets/javascripts/aura/extensions/states.js.coffee +3 -1
- data/lib/ende/version.rb +1 -1
- data/vendor/assets/components/ende_build.js +259 -1
- data/vendor/assets/javascripts/shims/es6-map-shim.js +255 -0
- data/vendor/components/paulmillr-es6-shim/es6-shim.js +1 -1
- metadata +4 -3
- data/vendor/assets/components/build.js +0 -28282
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: afc83f12e9cf9f4666f64acf9f0d710f5db2c002
|
4
|
+
data.tar.gz: 37d64cd00940f3845462d03ca7e578c3f79c6672
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca50e3c7fc8a00f4fc50ddfc29002aab38dce53a96334e0b47d747e3e97074a57263452f550e4cc5d353a0507b7583f0a97555cd7afbe0ed38e8784d7630d3d5
|
7
|
+
data.tar.gz: 5e5128e54fb8cd471d14e63fd9ed813a828ac49fbab6f3e552011e72c8d2c718bb55d1d9265d941bcd8160d9bd7d12f0d50464ec8b37da90c2246ad8ae7f3fcc
|
data/component.json
CHANGED
@@ -22,7 +22,8 @@
|
|
22
22
|
"scripts": [
|
23
23
|
"vendor/assets/javascripts/lennon/lennon.js",
|
24
24
|
"vendor/assets/javascripts/stampit/stampit.js",
|
25
|
-
"vendor/assets/javascripts/jquery/inview.js"
|
25
|
+
"vendor/assets/javascripts/jquery/inview.js",
|
26
|
+
"vendor/assets/javascripts/shims/es6-map-shim.js"
|
26
27
|
],
|
27
28
|
"development": {},
|
28
29
|
"paths": [
|
@@ -1,6 +1,6 @@
|
|
1
1
|
root = exports ? this
|
2
2
|
|
3
|
-
define 'aura/extensions/devise',
|
3
|
+
define 'aura/extensions/devise', ->
|
4
4
|
|
5
5
|
'use strict'
|
6
6
|
|
@@ -40,7 +40,10 @@ define 'aura/extensions/devise', () ->
|
|
40
40
|
@_id = id
|
41
41
|
promise
|
42
42
|
|
43
|
-
|
43
|
+
# TODO create an indemma model
|
44
|
+
Object.defineProperty user_session, 'route',
|
45
|
+
value: "/#{user_session.resource}s/sessions"
|
46
|
+
configurable: true
|
44
47
|
|
45
48
|
user_session
|
46
49
|
|
@@ -263,7 +266,7 @@ define 'aura/extensions/devise', () ->
|
|
263
266
|
|
264
267
|
# Extension definition
|
265
268
|
name: 'devise'
|
266
|
-
version: '1.0.
|
269
|
+
version: '1.0.2'
|
267
270
|
initialize: (application) ->
|
268
271
|
{core, sandbox} = application
|
269
272
|
{mediator} = core
|
@@ -274,7 +277,10 @@ define 'aura/extensions/devise', () ->
|
|
274
277
|
mediator.emit 'action.unauthorized', sandbox.current_user unless session.restoring
|
275
278
|
|
276
279
|
# Define api
|
277
|
-
|
280
|
+
#
|
281
|
+
# TODO ask aura to use Object.create to instantiate a new
|
282
|
+
# application, and remove access to the global window.app object
|
283
|
+
Object.defineProperty window.app.sandbox, 'current_user',
|
278
284
|
set: (user) -> session.current_user = user
|
279
285
|
get: -> session.current_user
|
280
286
|
|
@@ -57,7 +57,7 @@ define 'aura/extensions/models', <%= models_list.to_json %>, (models...) ->
|
|
57
57
|
define: owl.pluralize.define
|
58
58
|
|
59
59
|
# TODO rename core.models and core.domain to core.resources, completely
|
60
|
-
core.resources = core.domain = core.models = sandbox.models = indemma.model
|
60
|
+
core.resourceable = core.resources = core.domain = core.models = sandbox.models = indemma.model
|
61
61
|
|
62
62
|
core.resource = core.model = sandbox.resource = sandbox.model = (name) ->
|
63
63
|
# TODO use a Map internally in indemma
|
@@ -0,0 +1,14 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
define 'aura/extensions/platform', ->
|
4
|
+
|
5
|
+
name: 'platform'
|
6
|
+
version: '0.1.0'
|
7
|
+
initialize: (application) ->
|
8
|
+
descriptors = platform: get: -> true
|
9
|
+
|
10
|
+
# Force core to be a dom element, so we can use getters and setters
|
11
|
+
application.core = Object.create application.core, descriptors
|
12
|
+
application.sandbox = Object.create application.sandbox, descriptors
|
13
|
+
|
14
|
+
# TODO copy other properties to the main application
|
@@ -98,7 +98,9 @@ define 'aura/extensions/states', ['application/states'], (states) ->
|
|
98
98
|
console.warn 'Getting state through the core object is no longer supported. Use application.state instead.'
|
99
99
|
application.state
|
100
100
|
|
101
|
-
Object.
|
101
|
+
# TODO ask aura to use Object.create when instantiating a new
|
102
|
+
# application and stop accessing the global object
|
103
|
+
Object.defineProperty window.app, 'state',
|
102
104
|
set: (to) ->
|
103
105
|
# To use a unified internal api, transform the setter call
|
104
106
|
# into the transition api
|
data/lib/ende/version.rb
CHANGED
@@ -1722,7 +1722,7 @@ require.register("paulmillr-es6-shim/es6-shim.js", function(exports, require, mo
|
|
1722
1722
|
// isNaN is broken: it converts its argument to number, so
|
1723
1723
|
// isNaN('foo') => true
|
1724
1724
|
return value !== value;
|
1725
|
-
}
|
1725
|
+
}
|
1726
1726
|
|
1727
1727
|
});
|
1728
1728
|
|
@@ -28138,6 +28138,264 @@ require.register("ened/vendor/assets/javascripts/jquery/inview.js", function(exp
|
|
28138
28138
|
// intervals while the user scrolls. Therefore the inview event might fire a bit late there
|
28139
28139
|
setInterval(checkInView, 250);
|
28140
28140
|
})(jQuery);
|
28141
|
+
});
|
28142
|
+
require.register("ened/vendor/assets/javascripts/shims/es6-map-shim.js", function(exports, require, module){
|
28143
|
+
/**
|
28144
|
+
* Copyright 2012 Eric Wendelin - MIT License
|
28145
|
+
*
|
28146
|
+
* es6-map-shim.js is a DESTRUCTIVE shim that follows the latest Map specification
|
28147
|
+
* as closely as possible. It is destructive in the sense that it overrides native implementations.
|
28148
|
+
*
|
28149
|
+
* IMPORTANT: Currently, get(), set(), has() and delete() are all O(n) operations.
|
28150
|
+
* Normally, they would be O(1). Therefore it is NOT recommended to use this with
|
28151
|
+
* a large dataset or in any production environment.
|
28152
|
+
*
|
28153
|
+
* This library assumes ES5 functionality: Object.create, Object.defineProperty,
|
28154
|
+
* Array.indexOf, Function.bind and others.
|
28155
|
+
*/
|
28156
|
+
(function(module) {
|
28157
|
+
function Map(iterable) {
|
28158
|
+
var _items = [];
|
28159
|
+
var _keys = [];
|
28160
|
+
var _values = [];
|
28161
|
+
|
28162
|
+
// Object.is polyfill, courtesy of @WebReflection
|
28163
|
+
var is = Object.is || function(a, b) {
|
28164
|
+
return a === b ?
|
28165
|
+
a !== 0 || 1 / a == 1 / b :
|
28166
|
+
a != a && b != b;
|
28167
|
+
};
|
28168
|
+
|
28169
|
+
// More reliable indexOf, courtesy of @WebReflection
|
28170
|
+
var betterIndexOf = function(value) {
|
28171
|
+
if(value != value || value === 0) {
|
28172
|
+
for(var i = this.length; i-- && !is(this[i], value););
|
28173
|
+
} else {
|
28174
|
+
i = [].indexOf.call(this, value);
|
28175
|
+
}
|
28176
|
+
return i;
|
28177
|
+
};
|
28178
|
+
|
28179
|
+
/**
|
28180
|
+
* MapIterator used for iterating over all entries in given map.
|
28181
|
+
*
|
28182
|
+
* @param map {Map} to iterate
|
28183
|
+
* @param kind {String} identifying what to yield. Possible values
|
28184
|
+
* are 'keys', 'values' and 'keys+values'
|
28185
|
+
* @constructor
|
28186
|
+
*/
|
28187
|
+
var MapIterator = function MapIterator(map, kind) {
|
28188
|
+
var _index = 0;
|
28189
|
+
|
28190
|
+
return Object.create({}, {
|
28191
|
+
next: {
|
28192
|
+
value: function() {
|
28193
|
+
// check if index is within bounds
|
28194
|
+
if (_index < map.items().length) {
|
28195
|
+
switch(kind) {
|
28196
|
+
case 'keys': return map.keys()[_index++];
|
28197
|
+
case 'values': return map.values()[_index++];
|
28198
|
+
case 'keys+values': return [].slice.call(map.items()[_index++]);
|
28199
|
+
default: throw new TypeError('Invalid iterator type');
|
28200
|
+
}
|
28201
|
+
}
|
28202
|
+
// TODO: make sure I'm interpreting the spec correctly here
|
28203
|
+
throw new Error('Stop Iteration');
|
28204
|
+
}
|
28205
|
+
},
|
28206
|
+
iterator: {
|
28207
|
+
value: function() {
|
28208
|
+
return this;
|
28209
|
+
}
|
28210
|
+
},
|
28211
|
+
toString: {
|
28212
|
+
value: function() {
|
28213
|
+
return '[object Map Iterator]';
|
28214
|
+
}
|
28215
|
+
}
|
28216
|
+
});
|
28217
|
+
};
|
28218
|
+
|
28219
|
+
var _set = function(key, value) {
|
28220
|
+
// check if key exists and overwrite
|
28221
|
+
var index = betterIndexOf.call(_keys, key);
|
28222
|
+
if (index > -1) {
|
28223
|
+
_items[index] = value;
|
28224
|
+
_values[index] = value;
|
28225
|
+
} else {
|
28226
|
+
_items.push([key, value]);
|
28227
|
+
_keys.push(key);
|
28228
|
+
_values.push(value);
|
28229
|
+
}
|
28230
|
+
};
|
28231
|
+
|
28232
|
+
var setItem = function(item) {
|
28233
|
+
if (item.length !== 2) {
|
28234
|
+
throw new TypeError('Invalid iterable passed to Map constructor');
|
28235
|
+
}
|
28236
|
+
|
28237
|
+
_set(item[0], item[1]);
|
28238
|
+
};
|
28239
|
+
|
28240
|
+
// FIXME: accommodate any class that defines an @@iterator method that returns
|
28241
|
+
// an iterator object that produces two element array-like objects
|
28242
|
+
if (Array.isArray(iterable)) {
|
28243
|
+
iterable.forEach(setItem);
|
28244
|
+
} else if (iterable !== undefined) {
|
28245
|
+
throw new TypeError('Invalid Map');
|
28246
|
+
}
|
28247
|
+
|
28248
|
+
return Object.create(MapPrototype, {
|
28249
|
+
/**
|
28250
|
+
* @return {Array} all entries in the Map, in order
|
28251
|
+
*/
|
28252
|
+
items:{
|
28253
|
+
value:function() {
|
28254
|
+
return [].slice.call(_items);
|
28255
|
+
}
|
28256
|
+
},
|
28257
|
+
/**
|
28258
|
+
* @return {Array} all keys in the Map, in order
|
28259
|
+
*/
|
28260
|
+
keys:{
|
28261
|
+
value:function() {
|
28262
|
+
return [].slice.call(_keys);
|
28263
|
+
}
|
28264
|
+
},
|
28265
|
+
/**
|
28266
|
+
* @return {Array} all values in the Map, in order
|
28267
|
+
*/
|
28268
|
+
values:{
|
28269
|
+
value:function() {
|
28270
|
+
return [].slice.call(_values);
|
28271
|
+
}
|
28272
|
+
},
|
28273
|
+
/**
|
28274
|
+
* Given a key, indicate whether that key exists in this Map.
|
28275
|
+
*
|
28276
|
+
* @param key {Object} expected key
|
28277
|
+
* @return {Boolean} true if key in Map
|
28278
|
+
*/
|
28279
|
+
has:{
|
28280
|
+
value:function(key) {
|
28281
|
+
// TODO: double-check how spec reads about null values
|
28282
|
+
var index = betterIndexOf.call(_keys, key);
|
28283
|
+
return index > -1;
|
28284
|
+
}
|
28285
|
+
},
|
28286
|
+
/**
|
28287
|
+
* Given a key, retrieve the value associated with that key (or undefined).
|
28288
|
+
*
|
28289
|
+
* @param key {Object}
|
28290
|
+
* @return {Object} value associated with key or undefined
|
28291
|
+
*/
|
28292
|
+
get:{
|
28293
|
+
value:function(key) {
|
28294
|
+
var index = betterIndexOf.call(_keys, key);
|
28295
|
+
return index > -1 ? _values[index] : undefined;
|
28296
|
+
}
|
28297
|
+
},
|
28298
|
+
/**
|
28299
|
+
* Add or overwrite entry associating key with value. Always returns undefined.
|
28300
|
+
*
|
28301
|
+
* @param key {Object} anything
|
28302
|
+
* @param value {Object} also anything
|
28303
|
+
*/
|
28304
|
+
set:{
|
28305
|
+
value: _set
|
28306
|
+
},
|
28307
|
+
/**
|
28308
|
+
* Return the number of entries in this Map.
|
28309
|
+
*
|
28310
|
+
* @return {Number} number of entries
|
28311
|
+
*/
|
28312
|
+
size:{
|
28313
|
+
get:function() {
|
28314
|
+
return _items.length;
|
28315
|
+
}
|
28316
|
+
},
|
28317
|
+
/**
|
28318
|
+
* Remove all entries in this Map. Returns undefined.
|
28319
|
+
*/
|
28320
|
+
clear:{
|
28321
|
+
value:function() {
|
28322
|
+
_keys.length = _values.length = _items.length = 0;
|
28323
|
+
}
|
28324
|
+
},
|
28325
|
+
/**
|
28326
|
+
* Delete entry with given key, if it exists.
|
28327
|
+
*
|
28328
|
+
* @param key {Object} any possible key
|
28329
|
+
* @return {Boolean} true if an entry was deleted
|
28330
|
+
*/
|
28331
|
+
'delete':{
|
28332
|
+
value:function(key) {
|
28333
|
+
var index = betterIndexOf.call(_keys, key);
|
28334
|
+
if (index > -1) {
|
28335
|
+
_keys.splice(index, 1);
|
28336
|
+
_values.splice(index, 1);
|
28337
|
+
_items.splice(index, 1);
|
28338
|
+
return true;
|
28339
|
+
}
|
28340
|
+
return false;
|
28341
|
+
}
|
28342
|
+
},
|
28343
|
+
/**
|
28344
|
+
* Given a callback function and optional context, invoke the callback on all
|
28345
|
+
* entries in this Map.
|
28346
|
+
*
|
28347
|
+
* @param callbackFn {Function}
|
28348
|
+
*/
|
28349
|
+
forEach:{
|
28350
|
+
value:function(callbackfn /*, thisArg*/) {
|
28351
|
+
if (typeof callbackfn != 'function') {
|
28352
|
+
throw new TypeError('Invalid callback function given to forEach');
|
28353
|
+
}
|
28354
|
+
|
28355
|
+
function tryNext() {
|
28356
|
+
try {
|
28357
|
+
return iter.next();
|
28358
|
+
} catch(e) {
|
28359
|
+
return undefined;
|
28360
|
+
}
|
28361
|
+
}
|
28362
|
+
|
28363
|
+
var iter = this.iterator();
|
28364
|
+
var current = tryNext();
|
28365
|
+
var next = tryNext();
|
28366
|
+
while(current !== undefined) {
|
28367
|
+
callbackfn.apply(arguments[1], [current[1], current[0], this]);
|
28368
|
+
current = next;
|
28369
|
+
next = tryNext();
|
28370
|
+
}
|
28371
|
+
}
|
28372
|
+
},
|
28373
|
+
/**
|
28374
|
+
* Return a MapIterator object for this map.
|
28375
|
+
*/
|
28376
|
+
iterator:{
|
28377
|
+
value: function() {
|
28378
|
+
return new MapIterator(this, 'keys+values');
|
28379
|
+
}
|
28380
|
+
},
|
28381
|
+
toString:{
|
28382
|
+
value: function() {
|
28383
|
+
return '[Object Map]';
|
28384
|
+
}
|
28385
|
+
}
|
28386
|
+
});
|
28387
|
+
}
|
28388
|
+
|
28389
|
+
var notInNode = !!module;
|
28390
|
+
var window = notInNode ? this : global;
|
28391
|
+
var module = notInNode ? {} : exports;
|
28392
|
+
var MapPrototype = Map.prototype;
|
28393
|
+
|
28394
|
+
Map.prototype = MapPrototype = Map();
|
28395
|
+
|
28396
|
+
window.Map = module.Map = window.Map || Map;
|
28397
|
+
}.call(this, window));
|
28398
|
+
|
28141
28399
|
});
|
28142
28400
|
require.alias("mikeric-rivets/dist/rivets.js", "ened/deps/rivets/dist/rivets.js");
|
28143
28401
|
require.alias("mikeric-rivets/dist/rivets.js", "ened/deps/rivets/index.js");
|
@@ -0,0 +1,255 @@
|
|
1
|
+
/**
|
2
|
+
* Copyright 2012 Eric Wendelin - MIT License
|
3
|
+
*
|
4
|
+
* es6-map-shim.js is a DESTRUCTIVE shim that follows the latest Map specification
|
5
|
+
* as closely as possible. It is destructive in the sense that it overrides native implementations.
|
6
|
+
*
|
7
|
+
* IMPORTANT: Currently, get(), set(), has() and delete() are all O(n) operations.
|
8
|
+
* Normally, they would be O(1). Therefore it is NOT recommended to use this with
|
9
|
+
* a large dataset or in any production environment.
|
10
|
+
*
|
11
|
+
* This library assumes ES5 functionality: Object.create, Object.defineProperty,
|
12
|
+
* Array.indexOf, Function.bind and others.
|
13
|
+
*/
|
14
|
+
(function(module) {
|
15
|
+
function Map(iterable) {
|
16
|
+
var _items = [];
|
17
|
+
var _keys = [];
|
18
|
+
var _values = [];
|
19
|
+
|
20
|
+
// Object.is polyfill, courtesy of @WebReflection
|
21
|
+
var is = Object.is || function(a, b) {
|
22
|
+
return a === b ?
|
23
|
+
a !== 0 || 1 / a == 1 / b :
|
24
|
+
a != a && b != b;
|
25
|
+
};
|
26
|
+
|
27
|
+
// More reliable indexOf, courtesy of @WebReflection
|
28
|
+
var betterIndexOf = function(value) {
|
29
|
+
if(value != value || value === 0) {
|
30
|
+
for(var i = this.length; i-- && !is(this[i], value););
|
31
|
+
} else {
|
32
|
+
i = [].indexOf.call(this, value);
|
33
|
+
}
|
34
|
+
return i;
|
35
|
+
};
|
36
|
+
|
37
|
+
/**
|
38
|
+
* MapIterator used for iterating over all entries in given map.
|
39
|
+
*
|
40
|
+
* @param map {Map} to iterate
|
41
|
+
* @param kind {String} identifying what to yield. Possible values
|
42
|
+
* are 'keys', 'values' and 'keys+values'
|
43
|
+
* @constructor
|
44
|
+
*/
|
45
|
+
var MapIterator = function MapIterator(map, kind) {
|
46
|
+
var _index = 0;
|
47
|
+
|
48
|
+
return Object.create({}, {
|
49
|
+
next: {
|
50
|
+
value: function() {
|
51
|
+
// check if index is within bounds
|
52
|
+
if (_index < map.items().length) {
|
53
|
+
switch(kind) {
|
54
|
+
case 'keys': return map.keys()[_index++];
|
55
|
+
case 'values': return map.values()[_index++];
|
56
|
+
case 'keys+values': return [].slice.call(map.items()[_index++]);
|
57
|
+
default: throw new TypeError('Invalid iterator type');
|
58
|
+
}
|
59
|
+
}
|
60
|
+
// TODO: make sure I'm interpreting the spec correctly here
|
61
|
+
throw new Error('Stop Iteration');
|
62
|
+
}
|
63
|
+
},
|
64
|
+
iterator: {
|
65
|
+
value: function() {
|
66
|
+
return this;
|
67
|
+
}
|
68
|
+
},
|
69
|
+
toString: {
|
70
|
+
value: function() {
|
71
|
+
return '[object Map Iterator]';
|
72
|
+
}
|
73
|
+
}
|
74
|
+
});
|
75
|
+
};
|
76
|
+
|
77
|
+
var _set = function(key, value) {
|
78
|
+
// check if key exists and overwrite
|
79
|
+
var index = betterIndexOf.call(_keys, key);
|
80
|
+
if (index > -1) {
|
81
|
+
_items[index] = value;
|
82
|
+
_values[index] = value;
|
83
|
+
} else {
|
84
|
+
_items.push([key, value]);
|
85
|
+
_keys.push(key);
|
86
|
+
_values.push(value);
|
87
|
+
}
|
88
|
+
};
|
89
|
+
|
90
|
+
var setItem = function(item) {
|
91
|
+
if (item.length !== 2) {
|
92
|
+
throw new TypeError('Invalid iterable passed to Map constructor');
|
93
|
+
}
|
94
|
+
|
95
|
+
_set(item[0], item[1]);
|
96
|
+
};
|
97
|
+
|
98
|
+
// FIXME: accommodate any class that defines an @@iterator method that returns
|
99
|
+
// an iterator object that produces two element array-like objects
|
100
|
+
if (Array.isArray(iterable)) {
|
101
|
+
iterable.forEach(setItem);
|
102
|
+
} else if (iterable !== undefined) {
|
103
|
+
throw new TypeError('Invalid Map');
|
104
|
+
}
|
105
|
+
|
106
|
+
return Object.create(MapPrototype, {
|
107
|
+
/**
|
108
|
+
* @return {Array} all entries in the Map, in order
|
109
|
+
*/
|
110
|
+
items:{
|
111
|
+
value:function() {
|
112
|
+
return [].slice.call(_items);
|
113
|
+
}
|
114
|
+
},
|
115
|
+
/**
|
116
|
+
* @return {Array} all keys in the Map, in order
|
117
|
+
*/
|
118
|
+
keys:{
|
119
|
+
value:function() {
|
120
|
+
return [].slice.call(_keys);
|
121
|
+
}
|
122
|
+
},
|
123
|
+
/**
|
124
|
+
* @return {Array} all values in the Map, in order
|
125
|
+
*/
|
126
|
+
values:{
|
127
|
+
value:function() {
|
128
|
+
return [].slice.call(_values);
|
129
|
+
}
|
130
|
+
},
|
131
|
+
/**
|
132
|
+
* Given a key, indicate whether that key exists in this Map.
|
133
|
+
*
|
134
|
+
* @param key {Object} expected key
|
135
|
+
* @return {Boolean} true if key in Map
|
136
|
+
*/
|
137
|
+
has:{
|
138
|
+
value:function(key) {
|
139
|
+
// TODO: double-check how spec reads about null values
|
140
|
+
var index = betterIndexOf.call(_keys, key);
|
141
|
+
return index > -1;
|
142
|
+
}
|
143
|
+
},
|
144
|
+
/**
|
145
|
+
* Given a key, retrieve the value associated with that key (or undefined).
|
146
|
+
*
|
147
|
+
* @param key {Object}
|
148
|
+
* @return {Object} value associated with key or undefined
|
149
|
+
*/
|
150
|
+
get:{
|
151
|
+
value:function(key) {
|
152
|
+
var index = betterIndexOf.call(_keys, key);
|
153
|
+
return index > -1 ? _values[index] : undefined;
|
154
|
+
}
|
155
|
+
},
|
156
|
+
/**
|
157
|
+
* Add or overwrite entry associating key with value. Always returns undefined.
|
158
|
+
*
|
159
|
+
* @param key {Object} anything
|
160
|
+
* @param value {Object} also anything
|
161
|
+
*/
|
162
|
+
set:{
|
163
|
+
value: _set
|
164
|
+
},
|
165
|
+
/**
|
166
|
+
* Return the number of entries in this Map.
|
167
|
+
*
|
168
|
+
* @return {Number} number of entries
|
169
|
+
*/
|
170
|
+
size:{
|
171
|
+
get:function() {
|
172
|
+
return _items.length;
|
173
|
+
}
|
174
|
+
},
|
175
|
+
/**
|
176
|
+
* Remove all entries in this Map. Returns undefined.
|
177
|
+
*/
|
178
|
+
clear:{
|
179
|
+
value:function() {
|
180
|
+
_keys.length = _values.length = _items.length = 0;
|
181
|
+
}
|
182
|
+
},
|
183
|
+
/**
|
184
|
+
* Delete entry with given key, if it exists.
|
185
|
+
*
|
186
|
+
* @param key {Object} any possible key
|
187
|
+
* @return {Boolean} true if an entry was deleted
|
188
|
+
*/
|
189
|
+
'delete':{
|
190
|
+
value:function(key) {
|
191
|
+
var index = betterIndexOf.call(_keys, key);
|
192
|
+
if (index > -1) {
|
193
|
+
_keys.splice(index, 1);
|
194
|
+
_values.splice(index, 1);
|
195
|
+
_items.splice(index, 1);
|
196
|
+
return true;
|
197
|
+
}
|
198
|
+
return false;
|
199
|
+
}
|
200
|
+
},
|
201
|
+
/**
|
202
|
+
* Given a callback function and optional context, invoke the callback on all
|
203
|
+
* entries in this Map.
|
204
|
+
*
|
205
|
+
* @param callbackFn {Function}
|
206
|
+
*/
|
207
|
+
forEach:{
|
208
|
+
value:function(callbackfn /*, thisArg*/) {
|
209
|
+
if (typeof callbackfn != 'function') {
|
210
|
+
throw new TypeError('Invalid callback function given to forEach');
|
211
|
+
}
|
212
|
+
|
213
|
+
function tryNext() {
|
214
|
+
try {
|
215
|
+
return iter.next();
|
216
|
+
} catch(e) {
|
217
|
+
return undefined;
|
218
|
+
}
|
219
|
+
}
|
220
|
+
|
221
|
+
var iter = this.iterator();
|
222
|
+
var current = tryNext();
|
223
|
+
var next = tryNext();
|
224
|
+
while(current !== undefined) {
|
225
|
+
callbackfn.apply(arguments[1], [current[1], current[0], this]);
|
226
|
+
current = next;
|
227
|
+
next = tryNext();
|
228
|
+
}
|
229
|
+
}
|
230
|
+
},
|
231
|
+
/**
|
232
|
+
* Return a MapIterator object for this map.
|
233
|
+
*/
|
234
|
+
iterator:{
|
235
|
+
value: function() {
|
236
|
+
return new MapIterator(this, 'keys+values');
|
237
|
+
}
|
238
|
+
},
|
239
|
+
toString:{
|
240
|
+
value: function() {
|
241
|
+
return '[Object Map]';
|
242
|
+
}
|
243
|
+
}
|
244
|
+
});
|
245
|
+
}
|
246
|
+
|
247
|
+
var notInNode = !!module;
|
248
|
+
var window = notInNode ? this : global;
|
249
|
+
var module = notInNode ? {} : exports;
|
250
|
+
var MapPrototype = Map.prototype;
|
251
|
+
|
252
|
+
Map.prototype = MapPrototype = Map();
|
253
|
+
|
254
|
+
window.Map = module.Map = window.Map || Map;
|
255
|
+
}.call(this, window));
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ende
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Heitor Salazar
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-02-
|
11
|
+
date: 2014-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -75,6 +75,7 @@ files:
|
|
75
75
|
- lib/assets/javascripts/aura/extensions/mask.js.coffee
|
76
76
|
- lib/assets/javascripts/aura/extensions/mediator.js
|
77
77
|
- lib/assets/javascripts/aura/extensions/models.js.coffee.erb
|
78
|
+
- lib/assets/javascripts/aura/extensions/platform.js.coffee
|
78
79
|
- lib/assets/javascripts/aura/extensions/rivets.js.coffee
|
79
80
|
- lib/assets/javascripts/aura/extensions/rivets/accounting.js.coffee
|
80
81
|
- lib/assets/javascripts/aura/extensions/rivets/formatters.js.coffee
|
@@ -139,7 +140,6 @@ files:
|
|
139
140
|
- lib/ende/version.rb
|
140
141
|
- lib/tasks/.gitkeep
|
141
142
|
- vendor/assets/components/build.css
|
142
|
-
- vendor/assets/components/build.js
|
143
143
|
- vendor/assets/components/ende_build.css
|
144
144
|
- vendor/assets/components/ende_build.js
|
145
145
|
- vendor/assets/javascripts/accounting/accounting.js
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- vendor/assets/javascripts/jquery/inputmask.numeric.extensions.js
|
150
150
|
- vendor/assets/javascripts/jquery/inview.js
|
151
151
|
- vendor/assets/javascripts/lennon/lennon.js
|
152
|
+
- vendor/assets/javascripts/shims/es6-map-shim.js
|
152
153
|
- vendor/assets/javascripts/stampit/stampit.js
|
153
154
|
- vendor/components/KapIT-observe-utils/component.json
|
154
155
|
- vendor/components/KapIT-observe-utils/lib/observe-utils.js
|