ende 0.4.5 → 0.4.6
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/lib/assets/javascripts/aura/extensions/devise.js.coffee +0 -2
- data/lib/assets/javascripts/aura/extensions/platform.js.coffee +3 -0
- data/lib/assets/javascripts/aura/extensions/rivets.js.coffee +17 -1
- data/lib/assets/javascripts/aura/extensions/routes.js.coffee +8 -7
- data/lib/assets/javascripts/aura/extensions/states.js.coffee +13 -1
- data/lib/assets/javascripts/aura/extensions/widget/eventable.js.coffee +4 -2
- data/lib/assets/javascripts/config/load_components.js.coffee +19 -12
- data/lib/assets/javascripts/ende.js.coffee +33 -12
- data/lib/ende/version.rb +1 -1
- data/vendor/assets/components/build.css +111 -0
- data/vendor/assets/components/ende_build.js +160 -41
- data/vendor/components/indefinido-indemma/build/development.js +3 -118
- data/vendor/components/indefinido-indemma/build/release.js +39 -4170
- data/vendor/components/indefinido-indemma/build/test.js +3 -118
- data/vendor/components/indefinido-indemma/lib/record/associable.js +10 -2
- data/vendor/components/indefinido-indemma/lib/record/restfulable.js +26 -15
- data/vendor/components/indefinido-indemma/lib/record.js +3 -1
- data/vendor/components/indefinido-indemma/src/lib/record/associable.coffee +15 -1
- data/vendor/components/indefinido-indemma/src/lib/record/restfulable.coffee +37 -12
- data/vendor/components/indefinido-indemma/src/lib/record.coffee +3 -1
- data/vendor/components/indefinido-observable/.gitignore +15 -0
- data/vendor/components/indefinido-observable/.ruby-gemset +1 -0
- data/vendor/components/indefinido-observable/.ruby-version +1 -0
- data/vendor/components/indefinido-observable/Gemfile +13 -0
- data/vendor/components/indefinido-observable/Guardfile +39 -0
- data/vendor/components/indefinido-observable/History.md +0 -0
- data/vendor/components/indefinido-observable/Readme.md +116 -0
- data/vendor/components/indefinido-observable/build/build.js +14798 -0
- data/vendor/components/indefinido-observable/build/development.js +339 -0
- data/vendor/components/indefinido-observable/build/release.js +14937 -0
- data/vendor/components/indefinido-observable/build/test.js +339 -0
- data/vendor/components/indefinido-observable/component.json +5 -1
- data/vendor/components/indefinido-observable/components/chaijs-chai/component.json +46 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/index.js +1 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/assertion.js +132 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/core/assertions.js +1270 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/error.js +60 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/interface/assert.js +1060 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/interface/expect.js +12 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/interface/should.js +76 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/addChainableMethod.js +94 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/addMethod.js +37 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/addProperty.js +40 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/eql.js +124 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/flag.js +32 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/getActual.js +19 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/getEnumerableProperties.js +25 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/getMessage.js +49 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/getName.js +20 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/getPathValue.js +102 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/getProperties.js +35 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/index.js +108 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/inspect.js +316 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/objDisplay.js +48 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/overwriteMethod.js +51 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/overwriteProperty.js +54 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/test.js +26 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/transferFlags.js +44 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai/utils/type.js +45 -0
- data/vendor/components/indefinido-observable/components/chaijs-chai/lib/chai.js +79 -0
- data/vendor/components/indefinido-observable/components/component-jquery/component.json +14 -0
- data/vendor/components/indefinido-observable/components/component-jquery/index.js +9601 -0
- data/vendor/components/indefinido-observable/components/kapit-observe-shim/component.json +11 -0
- data/vendor/components/indefinido-observable/components/kapit-observe-utils/component.json +13 -0
- data/vendor/components/indefinido-observable/karma.conf.js +92 -0
- data/vendor/components/indefinido-observable/lib/adapters/rivets.js +3 -1
- data/vendor/components/indefinido-observable/lib/observable.js +47 -13
- data/vendor/components/indefinido-observable/spec/legacy/observable_spec.js +126 -0
- data/vendor/components/indefinido-observable/spec/observable_spec.js +92 -0
- data/vendor/components/indefinido-observable/spec/spec_helper.js +8 -0
- data/vendor/components/indefinido-observable/spec/vendor/accessors_spec.js +63 -0
- data/vendor/components/indefinido-observable/src/lib/adapters/rivets.js.coffee +15 -0
- data/vendor/components/indefinido-observable/src/spec/legacy/observable_spec.coffee +132 -0
- data/vendor/components/indefinido-observable/src/spec/observable_spec.coffee +85 -0
- data/vendor/components/indefinido-observable/src/spec/spec_helper.coffee +5 -0
- data/vendor/components/indefinido-observable/src/spec/vendor/accessors_spec.coffee +59 -0
- data/vendor/components/indefinido-observable/vendor/shims/accessors.js +71 -9
- data/vendor/components/indefinido-observable/vendor/spec/boot.js +104 -0
- data/vendor/components/indefinido-observable/vendor/spec/jasmine.js +2054 -0
- metadata +58 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc8dff9c0479d83c8085ff175d38f9cdc0d1199f
|
4
|
+
data.tar.gz: 3327dd1a52e3555c3aee4c1b8397a60013ff82ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ee32a68199bddfe215d5e7af4403fe2057d43712837ae8b5df5727e143b9cc68b9e8c0709043d5c6706919a7398d7b010ebca22dadc3e91b848a342ec7075b54
|
7
|
+
data.tar.gz: e3a8e137cfc3a781f6d0930f8d56d157a0a03a2681f0d0a44bb0362d338284b32062365b5a0f4f4736cb330bb5a8d6b9b341dde4bf400338776533b7aa216891
|
@@ -1,6 +1,5 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
|
4
3
|
# TODO require formatters through aura instead of directly loding a module
|
5
4
|
define 'aura/extensions/rivets', ['aura/extensions/rivets/formatters'], (formatters) ->
|
6
5
|
|
@@ -23,6 +22,23 @@ define 'aura/extensions/rivets', ['aura/extensions/rivets/formatters'], (formatt
|
|
23
22
|
prefix: ''
|
24
23
|
templateDelimiters: ['{{', '}}']
|
25
24
|
|
25
|
+
|
26
|
+
# Create Node Types list for legacy browsers
|
27
|
+
#
|
28
|
+
# TODO externalize this to a shims file and pehaps put it on
|
29
|
+
# platform extension
|
30
|
+
try
|
31
|
+
throw true if (Node.ELEMENT_NODE != 1)
|
32
|
+
catch e
|
33
|
+
window.Node = document.Node =
|
34
|
+
ELEMENT_NODE : 1
|
35
|
+
ATTRIBUTE_NODE : 2
|
36
|
+
TEXT_NODE : 3
|
37
|
+
CDATA_SECTION_NODE : 4
|
38
|
+
ENTITY_REFERENCE_NODE : 5
|
39
|
+
ENTITY_NODE : 6
|
40
|
+
|
41
|
+
# TOOD move rivets view to another file
|
26
42
|
# Custom rivets view because we don't want to prefix attributes
|
27
43
|
# Rivets.View
|
28
44
|
# -----------
|
@@ -67,7 +67,7 @@ define 'aura/extensions/routes', (routes) ->
|
|
67
67
|
context[paramKeys[j - 1].replace(/:/g, '')] = params[j]
|
68
68
|
j++
|
69
69
|
|
70
|
-
if
|
70
|
+
if @current_route
|
71
71
|
|
72
72
|
#-- Don't dispatch the route we are already on
|
73
73
|
if ( @current_route.path == route.path && @current_route.search == search)
|
@@ -79,20 +79,22 @@ define 'aura/extensions/routes', (routes) ->
|
|
79
79
|
application.logger.info('Exiting', @current_route.path, 'with', context || {})
|
80
80
|
|
81
81
|
#-- Execute the callback
|
82
|
-
if
|
83
|
-
@current_route.exitEventName
|
82
|
+
if 'function' == typeof @current_route.exitEventName
|
83
|
+
@current_route.exitEventName context || {}
|
84
|
+
else
|
84
85
|
#-- Run the publish event
|
85
|
-
|
86
|
+
@publishEvent(@current_route.exitEventName, context || {})
|
86
87
|
|
87
88
|
#-- Update the current route
|
88
89
|
@last_route = @current_route
|
89
90
|
@current_route = route
|
90
91
|
|
91
92
|
#-- Update the current route search string
|
92
|
-
@current_route.search
|
93
|
+
@current_route.search = search
|
94
|
+
@current_route.last_contextualized_path = path
|
93
95
|
|
94
96
|
#-- Dispatch
|
95
|
-
return @dispatch
|
97
|
+
return @dispatch route, context
|
96
98
|
|
97
99
|
|
98
100
|
#-- No route has been found, hence, nothing dispatched
|
@@ -114,7 +116,6 @@ define 'aura/extensions/routes', (routes) ->
|
|
114
116
|
# logger: application.logger
|
115
117
|
publishEvent: lennon_extensions.publishEvent
|
116
118
|
|
117
|
-
|
118
119
|
application.core.router = core.util.extend router, lennon_extensions
|
119
120
|
|
120
121
|
location = Object.create null,
|
@@ -132,6 +132,18 @@ define 'aura/extensions/states', ['application/states'], (states) ->
|
|
132
132
|
else
|
133
133
|
current_start = application.core.start
|
134
134
|
application.core.start = ->
|
135
|
+
# If any initialized flow changed the application state
|
136
|
+
# before the widgets initialization, store its state pass
|
137
|
+
# through the default state and go back to the old state
|
138
|
+
# created by the flows
|
139
|
+
#
|
140
|
+
# TODO initialize the first flow in flows extension
|
141
|
+
current_state = application.state if application.state != 'initialization'
|
135
142
|
application.state = "default"
|
143
|
+
|
136
144
|
application.core.start = current_start
|
137
|
-
current_start.apply @, arguments
|
145
|
+
startup = current_start.apply @, arguments
|
146
|
+
|
147
|
+
application.state = current_state if current_state?
|
148
|
+
|
149
|
+
startup
|
@@ -1,6 +1,6 @@
|
|
1
|
-
|
1
|
+
'use strict';
|
2
2
|
|
3
|
-
|
3
|
+
define 'aura/extensions/widget/eventable', ['es6-map-shim'], ->
|
4
4
|
|
5
5
|
extractor = /.*?\$(.*?)@(.*?)\+(.*?)/
|
6
6
|
|
@@ -39,6 +39,8 @@ define 'aura/extensions/widget/eventable', ->
|
|
39
39
|
@
|
40
40
|
|
41
41
|
|
42
|
+
version: '0.1.0'
|
43
|
+
|
42
44
|
initialize: (application) ->
|
43
45
|
with_component = 'segmentio-extend'
|
44
46
|
extend = require with_component
|
@@ -60,24 +60,28 @@ define 'config/load_components', ['application_components'], ->
|
|
60
60
|
# Little object class to merge component require and requirejs require
|
61
61
|
loader =
|
62
62
|
shim: ->
|
63
|
+
component = require
|
64
|
+
|
63
65
|
# Store loaders functions
|
64
|
-
loader.loaders.component =
|
66
|
+
loader.loaders.component = component
|
65
67
|
loader.loaders.requirejs = requirejs
|
66
68
|
loader.activate.define = root.define
|
67
69
|
|
68
70
|
# Expand require fuction with requirejs configurations
|
69
71
|
# so we can require without great problems
|
70
|
-
|
71
|
-
loader.require
|
72
|
+
aliases = ['config', 's']
|
73
|
+
loader.require[alias] = requirejs[alias] for alias in aliases
|
72
74
|
|
73
|
-
|
74
|
-
|
75
|
-
extend = require with_component
|
76
|
-
extend loader.require, require
|
75
|
+
aliases = ['aliases', 'modules', 'alias', 'normalize', 'resolve', 'relative', 'register']
|
76
|
+
loader.require[alias] = component[alias] for alias in aliases
|
77
77
|
|
78
|
-
|
78
|
+
|
79
|
+
initialize: ->
|
80
|
+
# Override global require for ouer one
|
79
81
|
root.require = loader.require
|
80
|
-
|
82
|
+
|
83
|
+
# TODO remove global loader and use requirejs instead
|
84
|
+
root.loader = @
|
81
85
|
|
82
86
|
# Resource loaders compatibility
|
83
87
|
loaders:
|
@@ -92,7 +96,9 @@ define 'config/load_components', ['application_components'], ->
|
|
92
96
|
else
|
93
97
|
requirer = 'component'
|
94
98
|
|
95
|
-
@activate
|
99
|
+
@activate requirer
|
100
|
+
|
101
|
+
requirer
|
96
102
|
|
97
103
|
activate: (requirer) ->
|
98
104
|
switch requirer
|
@@ -115,8 +121,9 @@ define 'config/load_components', ['application_components'], ->
|
|
115
121
|
module = loader.loaders.discovered.apply @, params
|
116
122
|
|
117
123
|
catch e
|
118
|
-
|
119
|
-
console.
|
124
|
+
# TODO better loggin support
|
125
|
+
(app?.logger || console).warn "loader: Failed to load '#{params[0]}' with #{using}: \n Exception: '#{e.message}'. Trying with requirejs."
|
126
|
+
|
120
127
|
loader.activate 'requirejs'
|
121
128
|
module = loader.loaders.discovered.apply @, params unless module
|
122
129
|
|
@@ -1,20 +1,41 @@
|
|
1
1
|
# TODO think if require jquery and jquery inview in this place is actualy a good idead
|
2
|
-
|
3
|
-
|
4
2
|
# TODO use requirejs alias / packing modules definition for this
|
5
|
-
define 'ende', ['config/load_components', 'config/initializers', 'jquery.ujs'], ->
|
6
|
-
|
7
|
-
# Override defaults components definition
|
8
|
-
# TODO better way to forward component modules to application
|
9
|
-
define 'observable' , [], -> require("indefinido-observable").mixin
|
10
|
-
define 'advisable' , [], -> require("indefinido-advisable").mixin
|
3
|
+
define 'ende', ['config/load_components', 'config/initializers', 'jquery.ujs', 'es6-shim'], ->
|
11
4
|
|
12
5
|
# TODO FIX THIS!
|
13
6
|
require.register('observable', (r, e, module) -> module.exports = require("indefinido-observable").mixin)
|
14
7
|
require.register('advisable' , (r, e, module) -> module.exports = require("indefinido-advisable").mixin )
|
15
8
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
# TODO rename ened to ende, move shims to an extension
|
10
|
+
define 'es5-shim' , ['config/load_components'], -> require "ened/vendor/assets/javascripts/polyfills/es5-shim.js"
|
11
|
+
define 'es6-map-shim' , ['es5-shim' , 'config/load_components'], ->
|
12
|
+
require "indefinido-observable/vendor/shims/object.create.js"
|
13
|
+
|
14
|
+
# TODO improve map shimming
|
15
|
+
if (!Object.defineProperties)
|
16
|
+
undefine = true
|
17
|
+
Object.defineProperties = (object, properties) ->
|
18
|
+
for name, descriptor of properties
|
19
|
+
object[name] = descriptor.value
|
20
|
+
|
21
|
+
object
|
22
|
+
|
23
|
+
require "ened/vendor/assets/javascripts/polyfills/es6-map-shim.js"
|
24
|
+
|
25
|
+
delete Object.defineProperties if undefine
|
26
|
+
|
27
|
+
define 'es6-shim' , ['es6-map-shim', 'es5-shim' , 'config/load_components'], ->
|
28
|
+
# Fix wrong object order definition in internet explorer
|
29
|
+
# TODO send a pull request to use dependency only after object definition
|
30
|
+
require "paulmillr-es6-shim"
|
31
|
+
|
32
|
+
# TODO only load relevante polyfills for getter and setters
|
33
|
+
require "indefinido-observable"
|
34
|
+
|
20
35
|
|
36
|
+
# Override defaults components definition, and force observable
|
37
|
+
# loading after es6-shim, so it does not define collectionShims
|
38
|
+
#
|
39
|
+
# TODO better way to forward component modules to application
|
40
|
+
define 'observable' , ['es6-shim', 'config/load_components'], -> require("indefinido-observable").mixin
|
41
|
+
define 'advisable' , ['config/load_components'], -> require("indefinido-advisable").mixin
|
data/lib/ende/version.rb
CHANGED
@@ -0,0 +1,111 @@
|
|
1
|
+
.overlay {
|
2
|
+
position: absolute;
|
3
|
+
top: 0;
|
4
|
+
left: 0;
|
5
|
+
opacity: 1;
|
6
|
+
width: 100%;
|
7
|
+
height: 100%;
|
8
|
+
background: rgba(0,0,0,.75);
|
9
|
+
-webkit-transition: opacity 300ms;
|
10
|
+
-moz-transition: opacity 300ms;
|
11
|
+
transition: opacity 300ms;
|
12
|
+
z-index: 500;
|
13
|
+
}
|
14
|
+
|
15
|
+
.overlay.hide {
|
16
|
+
pointer-events: none;
|
17
|
+
opacity: 0;
|
18
|
+
}
|
19
|
+
|
20
|
+
#dialog {
|
21
|
+
position: fixed;
|
22
|
+
left: 50%;
|
23
|
+
top: 150px;
|
24
|
+
max-width: 600px;
|
25
|
+
min-width: 250px;
|
26
|
+
border: 1px solid #eee;
|
27
|
+
background: white;
|
28
|
+
z-index: 1000;
|
29
|
+
}
|
30
|
+
|
31
|
+
#dialog .content {
|
32
|
+
padding: 15px 20px;
|
33
|
+
}
|
34
|
+
|
35
|
+
#dialog h1 {
|
36
|
+
margin: 0 0 5px 0;
|
37
|
+
font-size: 16px;
|
38
|
+
font-weight: normal;
|
39
|
+
}
|
40
|
+
|
41
|
+
#dialog p {
|
42
|
+
margin: 0;
|
43
|
+
padding: 0;
|
44
|
+
font-size: .9em;
|
45
|
+
}
|
46
|
+
|
47
|
+
/* close */
|
48
|
+
|
49
|
+
#dialog .close {
|
50
|
+
position: absolute;
|
51
|
+
top: 3px;
|
52
|
+
right: 10px;
|
53
|
+
text-decoration: none;
|
54
|
+
color: #888;
|
55
|
+
font-size: 16px;
|
56
|
+
font-weight: bold;
|
57
|
+
display: none;
|
58
|
+
}
|
59
|
+
|
60
|
+
#dialog .close em {
|
61
|
+
display: none;
|
62
|
+
}
|
63
|
+
|
64
|
+
#dialog.closable .close {
|
65
|
+
display: block;
|
66
|
+
}
|
67
|
+
|
68
|
+
#dialog .close:hover {
|
69
|
+
color: black;
|
70
|
+
}
|
71
|
+
|
72
|
+
#dialog .close:active {
|
73
|
+
margin-top: 1px;
|
74
|
+
}
|
75
|
+
|
76
|
+
/* slide */
|
77
|
+
|
78
|
+
#dialog.slide {
|
79
|
+
-webkit-transition: opacity 300ms, top 300ms;
|
80
|
+
-moz-transition: opacity 300ms, top 300ms;
|
81
|
+
}
|
82
|
+
|
83
|
+
#dialog.slide.hide {
|
84
|
+
opacity: 0;
|
85
|
+
top: -500px;
|
86
|
+
}
|
87
|
+
|
88
|
+
/* fade */
|
89
|
+
|
90
|
+
#dialog.fade {
|
91
|
+
-webkit-transition: opacity 300ms;
|
92
|
+
-moz-transition: opacity 300ms;
|
93
|
+
}
|
94
|
+
|
95
|
+
#dialog.fade.hide {
|
96
|
+
opacity: 0;
|
97
|
+
}
|
98
|
+
|
99
|
+
/* scale */
|
100
|
+
|
101
|
+
#dialog.scale {
|
102
|
+
-webkit-transition: -webkit-transform 300ms;
|
103
|
+
-moz-transition: -moz-transform 300ms;
|
104
|
+
-webkit-transform: scale(1);
|
105
|
+
-moz-transform: scale(1);
|
106
|
+
}
|
107
|
+
|
108
|
+
#dialog.scale.hide {
|
109
|
+
-webkit-transform: scale(0);
|
110
|
+
-moz-transform: scale(0);
|
111
|
+
}
|