upjs-rails 0.13.0 → 0.14.0
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/CHANGELOG.md +9 -0
- data/design/up-validate.js.coffee +4 -4
- data/dist/up.js +885 -158
- data/dist/up.min.js +2 -2
- data/lib/assets/javascripts/up/browser.js.coffee +7 -2
- data/lib/assets/javascripts/up/bus.js.coffee +10 -9
- data/lib/assets/javascripts/up/flow.js.coffee +13 -7
- data/lib/assets/javascripts/up/form.js.coffee +8 -2
- data/lib/assets/javascripts/up/history.js.coffee +28 -5
- data/lib/assets/javascripts/up/layout.js.coffee +19 -12
- data/lib/assets/javascripts/up/link.js.coffee +16 -7
- data/lib/assets/javascripts/up/modal.js.coffee +24 -6
- data/lib/assets/javascripts/up/motion.js.coffee +10 -3
- data/lib/assets/javascripts/up/navigation.js.coffee +2 -0
- data/lib/assets/javascripts/up/popup.js.coffee +9 -2
- data/lib/assets/javascripts/up/proxy.js.coffee +47 -9
- data/lib/assets/javascripts/up/syntax.js.coffee +7 -6
- data/lib/assets/javascripts/up/tooltip.js.coffee +6 -0
- data/lib/assets/javascripts/up/util.js.coffee +613 -95
- data/lib/upjs/rails/version.rb +1 -1
- data/spec_app/Gemfile +6 -0
- data/spec_app/Gemfile.lock +18 -13
- data/spec_app/spec/javascripts/helpers/to_end_with.js.coffee +4 -1
- data/spec_app/spec/javascripts/up/proxy_spec.js.coffee +0 -2
- data/spec_app/spec/javascripts/up/util_spec.js.coffee +6 -6
- metadata +2 -2
@@ -192,6 +192,7 @@ up.syntax = (($) ->
|
|
192
192
|
clear global state such as time-outs and event handlers bound to the document.
|
193
193
|
The destructor is *not* expected to remove the element from the DOM, which
|
194
194
|
is already handled by [`up.destroy`](/up.destroy).
|
195
|
+
@stable
|
195
196
|
###
|
196
197
|
compilers = []
|
197
198
|
defaultCompilers = null
|
@@ -235,16 +236,13 @@ up.syntax = (($) ->
|
|
235
236
|
|
236
237
|
Returns an empty object if the element has no `up-data` attribute.
|
237
238
|
|
238
|
-
The API of this method is likely to change in the future, so
|
239
|
-
we can support getting or setting individual keys.
|
240
|
-
|
241
|
-
@protected
|
242
239
|
@function up.syntax.data
|
243
240
|
@param {String|Element|jQuery} elementOrSelector
|
244
241
|
@return
|
245
242
|
The JSON-decoded value of the `up-data` attribute.
|
246
243
|
|
247
244
|
Returns an empty object (`{}`) if the element has no (or an empty) `up-data` attribute.
|
245
|
+
@experimental
|
248
246
|
###
|
249
247
|
|
250
248
|
###
|
@@ -259,6 +257,7 @@ up.syntax = (($) ->
|
|
259
257
|
@selector [up-data]
|
260
258
|
@param {JSON} up-data
|
261
259
|
A serialized JSON string
|
260
|
+
@stable
|
262
261
|
###
|
263
262
|
data = (elementOrSelector) ->
|
264
263
|
$element = $(elementOrSelector)
|
@@ -272,7 +271,7 @@ up.syntax = (($) ->
|
|
272
271
|
Makes a snapshot of the currently registered event listeners,
|
273
272
|
to later be restored through `reset`.
|
274
273
|
|
275
|
-
@
|
274
|
+
@internal
|
276
275
|
###
|
277
276
|
snapshot = ->
|
278
277
|
defaultCompilers = u.copy(compilers)
|
@@ -281,7 +280,7 @@ up.syntax = (($) ->
|
|
281
280
|
Resets the list of registered compiler directives to the
|
282
281
|
moment when the framework was booted.
|
283
282
|
|
284
|
-
@
|
283
|
+
@internal
|
285
284
|
###
|
286
285
|
reset = ->
|
287
286
|
compilers = u.copy(defaultCompilers)
|
@@ -305,6 +304,7 @@ up.syntax = (($) ->
|
|
305
304
|
|
306
305
|
@function up.hello
|
307
306
|
@param {String|Element|jQuery} selectorOrElement
|
307
|
+
@stable
|
308
308
|
###
|
309
309
|
hello = (selectorOrElement) ->
|
310
310
|
$element = $(selectorOrElement)
|
@@ -324,6 +324,7 @@ up.syntax = (($) ->
|
|
324
324
|
@event up:fragment:inserted
|
325
325
|
@param {jQuery} event.$element
|
326
326
|
The fragment that has been inserted or updated.
|
327
|
+
@stable
|
327
328
|
###
|
328
329
|
|
329
330
|
up.on 'ready', (-> hello(document.body))
|
@@ -92,6 +92,9 @@ up.tooltip = (($) ->
|
|
92
92
|
The position of the tooltip. Known values are `top` and `bottom`.
|
93
93
|
@param {String} [options.animation]
|
94
94
|
The animation to use when opening the tooltip.
|
95
|
+
@return {Promise}
|
96
|
+
A promise that will be resolved when the tooltip's opening animation has finished.
|
97
|
+
@stable
|
95
98
|
###
|
96
99
|
attach = (linkOrSelector, options = {}) ->
|
97
100
|
$link = $(linkOrSelector)
|
@@ -112,6 +115,7 @@ up.tooltip = (($) ->
|
|
112
115
|
@function up.tooltip.close
|
113
116
|
@param {Object} options
|
114
117
|
See options for [`up.animate`](/up.animate).
|
118
|
+
@stable
|
115
119
|
###
|
116
120
|
close = (options) ->
|
117
121
|
$tooltip = $('.up-tooltip')
|
@@ -138,6 +142,7 @@ up.tooltip = (($) ->
|
|
138
142
|
The default position of tooltips relative to the element.
|
139
143
|
Can be either `"top"` or `"bottom"`.
|
140
144
|
Defaults to [`up.tooltip.config.position`](/up.tooltip.config).
|
145
|
+
@stable
|
141
146
|
###
|
142
147
|
|
143
148
|
###*
|
@@ -146,6 +151,7 @@ up.tooltip = (($) ->
|
|
146
151
|
<a href="/decks" up-tooltip="Show <b>all</b> decks">Decks</a>
|
147
152
|
|
148
153
|
@selector [up-tooltip-html]
|
154
|
+
@stable
|
149
155
|
###
|
150
156
|
up.compiler('[up-tooltip], [up-tooltip-html]', ($link) ->
|
151
157
|
# Don't register these events on document since *every*
|