ende 0.4.17 → 0.4.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/component.json +0 -1
- data/lib/assets/javascripts/aura/extensions/domain.js.coffee +8 -6
- data/lib/assets/javascripts/aura/extensions/rivets.js.coffee +2 -2
- data/lib/assets/javascripts/aura/extensions/states.js.coffee +27 -26
- data/lib/assets/javascripts/aura/extensions/widget/composable.js.coffee +12 -13
- data/lib/assets/javascripts/aura/extensions/widget/eventable.js.coffee +1 -5
- data/lib/assets/javascripts/aura/extensions/widget/lifecycleable.js.coffee +3 -2
- data/lib/assets/javascripts/config/load_components.js.coffee +2 -0
- data/lib/ende/version.rb +1 -1
- data/vendor/assets/components/ende_build.js +684 -5384
- data/vendor/components/indefinido-indemma/build/development.js +44 -21901
- data/vendor/components/indefinido-indemma/build/release.js +228 -256
- data/vendor/components/indefinido-indemma/build/test.js +44 -21901
- data/vendor/components/indefinido-indemma/lib/record/rest.js +7 -2
- data/vendor/components/indefinido-indemma/lib/record/restfulable.js +17 -7
- data/vendor/components/indefinido-indemma/lib/record/scopable.js +1 -41
- data/vendor/components/indefinido-indemma/lib/record/validatable.js +206 -191
- data/vendor/components/indefinido-indemma/src/lib/record/rest.coffee +7 -1
- data/vendor/components/indefinido-indemma/src/lib/record/restfulable.coffee +12 -5
- data/vendor/components/indefinido-indemma/src/lib/record/scopable.coffee +14 -23
- data/vendor/components/indefinido-indemma/src/lib/record/validatable.coffee +12 -1
- metadata +3 -3
- /data/{vendor/assets/javascripts/stampit → lib/assets/javascripts/aura/extensions/stamps}/stampit.js +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e8a4619668c8d4c75730345a70ae3d5048f6123
|
4
|
+
data.tar.gz: eaee553e3bc31f9140bd6e4c578fb9184ada2d06
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54d10671eeee0b0316b986a4c1f6e2a500659f68859d5ab30d20c31133409c0ef1be2e631a854be64baa5a73f4fd11526f5272fc461d4332957f034d828436e4
|
7
|
+
data.tar.gz: d260f9927d642d1b528387b7602e2bf9872197b26502104f17282a98b819b70aee0fdb93a1da63ab7f2ad538c91f3ea0fa4cc4dd414d0135bc2eaf1b29659378
|
data/component.json
CHANGED
@@ -21,7 +21,6 @@
|
|
21
21
|
},
|
22
22
|
"scripts": [
|
23
23
|
"vendor/assets/javascripts/lennon/lennon.js",
|
24
|
-
"vendor/assets/javascripts/stampit/stampit.js",
|
25
24
|
"vendor/assets/javascripts/spin/spin.js",
|
26
25
|
"vendor/assets/javascripts/jquery/inview.js",
|
27
26
|
"vendor/assets/javascripts/jquery/inputmask.js",
|
@@ -8,10 +8,9 @@ define 'aura/extensions/domain', ->
|
|
8
8
|
version: '0.1.0'
|
9
9
|
|
10
10
|
initialize: (application) ->
|
11
|
-
{core: {mediator}} = application
|
12
|
-
stampit = require 'stampit/stampit'
|
11
|
+
{core: {mediator, stamp}} = application
|
13
12
|
|
14
|
-
eventable =
|
13
|
+
eventable = stamp
|
15
14
|
on : mediator.on
|
16
15
|
off : mediator.off
|
17
16
|
once : mediator.once
|
@@ -19,7 +18,7 @@ define 'aura/extensions/domain', ->
|
|
19
18
|
emit : mediator.emit
|
20
19
|
unlisten: mediator.removeAllListeners
|
21
20
|
|
22
|
-
domainable =
|
21
|
+
domainable = stamp()
|
23
22
|
|
24
23
|
# application.use('extensions/models').use 'extensions/widget/flows'
|
25
24
|
# TODO detect if flows extension and models extension have already been loaded
|
@@ -28,8 +27,9 @@ define 'aura/extensions/domain', ->
|
|
28
27
|
application.domain ||= eventable()
|
29
28
|
|
30
29
|
afterAppStart: (application) ->
|
31
|
-
{core: {resourceable: {every: resourceables}, Widgets: {Flow}}} = application
|
30
|
+
{core: {resourceable: {every: resourceables}, Widgets: {Flow}, stamp, stamps}, domain} = application
|
32
31
|
|
32
|
+
# TODO disponibilize the resourceables method through the resources extension
|
33
33
|
extensions = {}
|
34
34
|
for resourceable in resourceables
|
35
35
|
resource = resourceable.resource.toString()
|
@@ -45,7 +45,9 @@ define 'aura/extensions/domain', ->
|
|
45
45
|
|
46
46
|
node[method] = resourceable
|
47
47
|
|
48
|
-
|
48
|
+
stamp 'resourceables', extensions
|
49
|
+
|
50
|
+
Flow.compose stamp.compose stamps.resourceables, stamp().enclose -> domain[@name] = @
|
49
51
|
|
50
52
|
|
51
53
|
|
@@ -269,8 +269,8 @@ define 'aura/extensions/rivets', ['aura/extensions/rivets/formatters'], (formatt
|
|
269
269
|
|
270
270
|
original_bind.apply rivets, arguments
|
271
271
|
|
272
|
-
extend application.sandbox,
|
273
|
-
|
272
|
+
extend application.sandbox, view: rivets
|
273
|
+
extend application.core , view: rivets
|
274
274
|
|
275
275
|
extend application.core.Widgets.Base.prototype,
|
276
276
|
bind: (presentation, options) ->
|
@@ -136,32 +136,33 @@ define 'aura/extensions/states', ['states'], (states) ->
|
|
136
136
|
|
137
137
|
get: -> state.current
|
138
138
|
|
139
|
-
|
140
|
-
|
141
|
-
|
139
|
+
# TODO clearer startup sequence
|
140
|
+
application.core.metabolize = (root) ->
|
141
|
+
# If any initialized flow changed the application state
|
142
|
+
# before the widgets initialization, store its state pass
|
143
|
+
# through the default state and go back to the old state
|
144
|
+
# created by the flows
|
145
|
+
#
|
146
|
+
# TODO initialize the first flow in flows extension
|
147
|
+
current_state = application.state if application.state != 'initialization'
|
148
|
+
application.startOptions.widgets ||= root
|
142
149
|
application.state = "default"
|
143
|
-
else
|
144
|
-
application.core.metabolize = ->
|
145
|
-
# If any initialized flow changed the application state
|
146
|
-
# before the widgets initialization, store its state pass
|
147
|
-
# through the default state and go back to the old state
|
148
|
-
# created by the flows
|
149
|
-
#
|
150
|
-
# TODO initialize the first flow in flows extension
|
151
|
-
current_state = application.state if application.state != 'initialization'
|
152
|
-
application.startOptions.widgets = arguments[0]
|
153
|
-
application.state = "default"
|
154
|
-
|
155
|
-
startup = application.core.start arguments...
|
156
|
-
|
157
|
-
# TODO move to domain extension
|
158
|
-
# TODO let this code more legible
|
159
|
-
domain_flow = application.domain.default
|
160
|
-
domain_flow?.ready ||= injection.then((widgets...) ->
|
161
|
-
# TODO use es6-shim promises
|
162
|
-
$.Deferred().resolveWith domain_flow, widgets
|
163
|
-
).done
|
164
150
|
|
165
|
-
|
151
|
+
startup = application.core.start arguments...
|
166
152
|
|
167
|
-
|
153
|
+
# TODO move to domain extension
|
154
|
+
# TODO let this code more legible
|
155
|
+
domain_flow = application.domain.default
|
156
|
+
domain_flow?.ready ||= injection.then((widgets...) ->
|
157
|
+
# TODO use es6-shim promises
|
158
|
+
$.Deferred().resolveWith domain_flow, widgets
|
159
|
+
).done
|
160
|
+
|
161
|
+
application.state = current_state if current_state?
|
162
|
+
|
163
|
+
startup
|
164
|
+
|
165
|
+
|
166
|
+
afterAppStart: (application) ->
|
167
|
+
# TODO Change the application to default state in flows extension
|
168
|
+
application.state = "default" if application.startOptions.widgets
|
@@ -1,7 +1,7 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
3
|
define 'aura/extensions/widget/composable', ->
|
4
|
-
|
4
|
+
stamp = extend = null
|
5
5
|
|
6
6
|
advisorable = (advisor) ->
|
7
7
|
# TODO merge advices in the composition chain
|
@@ -42,13 +42,13 @@ define 'aura/extensions/widget/composable', ->
|
|
42
42
|
advisor.advisable = (factory) ->
|
43
43
|
original = factory.compose
|
44
44
|
|
45
|
-
|
45
|
+
stamp.mixIn factory,
|
46
46
|
compose: (stamps...) ->
|
47
47
|
{fixed: {methods: composition_methods}} = @composition
|
48
48
|
advices = extract_advices composition_methods
|
49
49
|
|
50
|
-
for
|
51
|
-
{fixed: {methods: stamp_methods}} =
|
50
|
+
for stamped in stamps
|
51
|
+
{fixed: {methods: stamp_methods}} = stamped
|
52
52
|
advices = advices.concat extract_advices stamp_methods
|
53
53
|
|
54
54
|
adviced_stamp = {}
|
@@ -58,7 +58,7 @@ define 'aura/extensions/widget/composable', ->
|
|
58
58
|
|
59
59
|
# Create a ultimate stamp with all advices arrays or functions merged
|
60
60
|
# TODO do not store advices definitions in the prototype chain
|
61
|
-
stamps.push
|
61
|
+
stamps.push stamp adviced_stamp
|
62
62
|
|
63
63
|
original.apply factory, stamps
|
64
64
|
|
@@ -81,14 +81,14 @@ define 'aura/extensions/widget/composable', ->
|
|
81
81
|
# if methods.composition
|
82
82
|
# composition = methods.composition
|
83
83
|
# delete methods.composition
|
84
|
-
# composition =
|
84
|
+
# composition = stamp.compose composition, stamp methods, state
|
85
85
|
# else
|
86
|
-
# composition =
|
86
|
+
# composition = stamp methods, state
|
87
87
|
|
88
|
-
|
89
|
-
composition:
|
88
|
+
stamp.mixIn factory,
|
89
|
+
composition: stamp methods, state
|
90
90
|
# Suport an extension with multiple compositions
|
91
|
-
compose: -> @composition =
|
91
|
+
compose: -> @composition = stamp.compose @composition, arguments...
|
92
92
|
|
93
93
|
extend: ->
|
94
94
|
`var methods, state`
|
@@ -114,13 +114,12 @@ define 'aura/extensions/widget/composable', ->
|
|
114
114
|
|
115
115
|
compositor
|
116
116
|
|
117
|
-
version: '0.1.
|
117
|
+
version: '0.1.2'
|
118
118
|
|
119
119
|
initialize: (application) ->
|
120
|
-
stampit = require 'stampit/stampit'
|
121
120
|
advisable = require 'advisable'
|
122
121
|
|
123
|
-
{core: {Widgets, util: {extend}}} = application
|
122
|
+
{core: {Widgets, util: {extend}, stamp}} = application
|
124
123
|
|
125
124
|
Widgets = composerable advisorable Widgets
|
126
125
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict';
|
2
2
|
|
3
|
-
define 'aura/extensions/widget/eventable', ['es6-map-shim'], ->
|
3
|
+
define 'aura/extensions/widget/eventable', ['stampit', 'es6-map-shim'], (stampit) ->
|
4
4
|
|
5
5
|
extractor = /.*?\$(.*?)@(.*?)\+(.*?)/
|
6
6
|
|
@@ -24,10 +24,6 @@ define 'aura/extensions/widget/eventable', ['es6-map-shim'], ->
|
|
24
24
|
event.preventDefault()
|
25
25
|
false
|
26
26
|
|
27
|
-
# TODO pass this extensions to the identifiable extension
|
28
|
-
with_component = 'stampit/stampit'
|
29
|
-
stampit = require with_component
|
30
|
-
|
31
27
|
eventable = stampit
|
32
28
|
# TODO implement rivets compatibility, instead of generic
|
33
29
|
# binding events, alter html
|
@@ -113,8 +113,9 @@ define 'aura/extensions/widget/lifecycleable', ->
|
|
113
113
|
root = core.dom.find app.startOptions.widgets
|
114
114
|
throw new TypeError "No root node found for selector '#{app.startOptions.widgets}'." unless root.length != 0
|
115
115
|
|
116
|
-
# Cache and override root when found
|
117
|
-
|
116
|
+
# TODO Cache and override root when found
|
117
|
+
# TODO check how this will integrate with mocha specs
|
118
|
+
# Object.defineProperty lifecycleable, 'root', value: root
|
118
119
|
|
119
120
|
root
|
120
121
|
|
@@ -26,6 +26,8 @@ define 'modernizr' , ['config/load_components'], ->
|
|
26
26
|
require 'modernizr'
|
27
27
|
window.Modernizr
|
28
28
|
|
29
|
+
define 'rivets', ['config/load_components'], -> require 'rivets'
|
30
|
+
|
29
31
|
# TODO define 'underscore', ['config/load_components'], -> require 'lodash'
|
30
32
|
|
31
33
|
# TODO figure out how to use rjs optmizer to include component builds
|
data/lib/ende/version.rb
CHANGED