ende 0.4.7 → 0.4.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/lib/assets/javascripts/aura/extensions/states.js.coffee +19 -10
- data/lib/assets/javascripts/config/load_components.js.coffee +12 -6
- data/lib/assets/javascripts/widgets/content/main.js.coffee +2 -0
- data/lib/assets/javascripts/widgets/list/main.js.coffee +1 -1
- data/lib/assets/javascripts/widgets/viewer/main.js.coffee +1 -1
- data/lib/ende/version.rb +1 -1
- data/vendor/assets/components/build.js +32401 -0
- data/vendor/assets/components/ende_build.js +33 -13
- data/vendor/components/indefinido-indemma/Readme.md +2 -2
- data/vendor/components/indefinido-indemma/build/development.js +4 -4
- data/vendor/components/indefinido-indemma/build/release.js +15 -8
- data/vendor/components/indefinido-indemma/build/test.js +4 -4
- data/vendor/components/indefinido-indemma/lib/record/queryable.js +1 -1
- data/vendor/components/indefinido-indemma/lib/record/restfulable.js +12 -5
- data/vendor/components/indefinido-indemma/lib/record/scopable.js +1 -1
- data/vendor/components/indefinido-indemma/lib/record.js +1 -1
- data/vendor/components/indefinido-indemma/spec/record/scopable_spec.js +1 -1
- data/vendor/components/indefinido-indemma/src/lib/record/queryable.coffee +1 -1
- data/vendor/components/indefinido-indemma/src/lib/record/restfulable.coffee +16 -4
- data/vendor/components/indefinido-indemma/src/lib/record/scopable.coffee +1 -1
- data/vendor/components/indefinido-indemma/src/lib/record.coffee +1 -1
- data/vendor/components/indefinido-indemma/src/spec/record/scopable_spec.coffee +1 -1
- data/vendor/components/indefinido-observable/lib/observable.js +1 -1
- data/vendor/components/indefinido-observable/vendor/shims/accessors.js +17 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d16802734857d0dd2c41903be9133eae36249ab9
|
4
|
+
data.tar.gz: 56497874bf1b5d72b063cb83cb794f726efed3a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6155c21110a59cbd24160b74c86f5c49c90413387d3b18251a329540829379c08bce9bca21ec718b2a8dd78a479d6a6528a3ab4111eee1570fd5820031c5d00b
|
7
|
+
data.tar.gz: 2f28469461acf1e97c2a6b4aa6061012658917033e912a431025939bbf2de2bc2bc3ded0e2c714ebeb40f220b3d33015e6f99ff8b5d73340b7cc5a2bf53de315
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use strict'
|
2
2
|
|
3
|
-
define 'aura/extensions/states', ['
|
3
|
+
define 'aura/extensions/states', ['states'], (states) ->
|
4
4
|
|
5
5
|
(application) ->
|
6
6
|
{core, logger} = application
|
@@ -33,24 +33,35 @@ define 'aura/extensions/states', ['application/states'], (states) ->
|
|
33
33
|
flow =
|
34
34
|
|
35
35
|
changed: (transition) ->
|
36
|
+
{domain} = application
|
36
37
|
unormalized_widget_options = states[transition.to]
|
37
38
|
|
39
|
+
# TODO update aura and use native start method
|
40
|
+
# TODO move domain flow logic to a domain extension
|
41
|
+
#
|
42
|
+
domain_flow = domain?[transition.to]
|
43
|
+
|
38
44
|
# TODO cache rendered widgets!
|
39
45
|
if unormalized_widget_options
|
40
46
|
widgets_options = @normalize_widget_options unormalized_widget_options, transition
|
41
47
|
|
42
|
-
# TODO update aura and use native start method
|
43
|
-
# TODO move this logic to a domain extension
|
44
|
-
{domain} = application
|
45
|
-
|
46
48
|
injection = core.inject(widgets_options).fail flow.failed
|
47
49
|
|
48
|
-
|
50
|
+
# TODO let this code more legible
|
51
|
+
domain_flow?.ready ||= injection.then((widgets...) ->
|
52
|
+
# TODO use es6-shim promises
|
53
|
+
$.Deferred().resolveWith domain_flow, widgets
|
54
|
+
).done
|
49
55
|
|
50
56
|
# To prevent reinstation upon changing to this state for the
|
51
57
|
# second time, delete stored configuration for this state
|
52
58
|
delete states[transition.to]
|
53
59
|
|
60
|
+
if domain_flow and not domain_flow.ready
|
61
|
+
# TODO use es6-shim promises
|
62
|
+
domain_flow.ready = $.Deferred().resolveWith(domain_flow, []).done
|
63
|
+
|
64
|
+
|
54
65
|
normalize_widget_options: (unormalized_widget_options, transition_widgets_options) ->
|
55
66
|
widgets = []
|
56
67
|
|
@@ -130,8 +141,7 @@ define 'aura/extensions/states', ['application/states'], (states) ->
|
|
130
141
|
if (application.startOptions.widgets)
|
131
142
|
application.state = "default"
|
132
143
|
else
|
133
|
-
|
134
|
-
application.core.start = ->
|
144
|
+
application.core.metabolize = ->
|
135
145
|
# If any initialized flow changed the application state
|
136
146
|
# before the widgets initialization, store its state pass
|
137
147
|
# through the default state and go back to the old state
|
@@ -141,8 +151,7 @@ define 'aura/extensions/states', ['application/states'], (states) ->
|
|
141
151
|
current_state = application.state if application.state != 'initialization'
|
142
152
|
application.state = "default"
|
143
153
|
|
144
|
-
application.core.start
|
145
|
-
startup = current_start.apply @, arguments
|
154
|
+
startup = application.core.start.apply @, arguments
|
146
155
|
|
147
156
|
application.state = current_state if current_state?
|
148
157
|
|
@@ -121,13 +121,19 @@ define 'config/load_components', ['application_components'], ->
|
|
121
121
|
module = loader.loaders.discovered.apply @, params
|
122
122
|
|
123
123
|
catch e
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
124
|
+
if e.require
|
125
|
+
# TODO better loggin support
|
126
|
+
if app.debug
|
127
|
+
(app?.logger || console).warn "loader: Failed to load '#{params[0]}' with #{using}: \n Exception: '#{e.message}'. Trying with requirejs."
|
128
|
+
|
129
|
+
# Since it failed to load with component, try to load with requirejs
|
130
|
+
loader.activate 'requirejs'
|
131
|
+
unless module
|
132
|
+
module = loader.loaders.discovered.apply @, params
|
133
|
+
else
|
134
|
+
throw e
|
129
135
|
|
130
|
-
|
136
|
+
# Always let requirejs active by default
|
131
137
|
loader.activate 'requirejs'
|
132
138
|
|
133
139
|
module
|
data/lib/ende/version.rb
CHANGED