unpoly-rails 2.0.0.pre.rc5 → 2.0.0.pre.rc6
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.
Potentially problematic release.
This version of unpoly-rails might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/dist/unpoly-migrate.js +338 -326
- data/dist/unpoly-migrate.min.js +1 -1
- data/dist/unpoly.js +286 -175
- data/dist/unpoly.min.js +5 -5
- data/lib/unpoly/rails/version.rb +1 -1
- data/lib/unpoly/tasks.rb +10 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ae929555ac3d1c4f901618fed559ec3c2d53f5117de889d72c81518e158f946
|
4
|
+
data.tar.gz: 4a7bbc9f22a3fab1127b6c4bf3e0f930f1a300725549367025bc50c45c6ebdca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ce5945794168936c808619d4ebd3a7490355dfadd7337324d40b68f2d211fc13149c46439abf693776e27c452a02f4acee78247b4196fc60bf27f94a1856b6f
|
7
|
+
data.tar.gz: d9c4f06cbc704414871a006c17b6ec1b7cb4d2f76c70c091f6585dc89265fa7f7e650e376e3ba632e4f75bb04049999fe0bc6644875b950616fb6ced4246b7dd
|
data/CHANGELOG.md
CHANGED
@@ -9,6 +9,13 @@ You may browse a formatted and hyperlinked version of this file at <https://unpo
|
|
9
9
|
2.0.0
|
10
10
|
-----
|
11
11
|
|
12
|
+
[See Unpoly 2 slides](http://triskweline.de/unpoly2-slides/)
|
13
|
+
|
14
|
+
TODO
|
15
|
+
----
|
16
|
+
|
17
|
+
This list is **far** from complete.
|
18
|
+
|
12
19
|
- up.network.config.slowDelay is now 800 (up from 300)
|
13
20
|
- up.network.config.cacheSize is now 50 (down from 70)
|
14
21
|
- up.network.isBusy() / isIdle() takes preload events into account
|
data/dist/unpoly-migrate.js
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
(function() {
|
2
|
+
up.framework.startExtension();
|
3
|
+
|
4
|
+
}).call(this);
|
1
5
|
(function() {
|
2
6
|
var u,
|
3
7
|
slice = [].slice;
|
@@ -105,6 +109,116 @@
|
|
105
109
|
|
106
110
|
}).call(this);
|
107
111
|
|
112
|
+
/***
|
113
|
+
@module up.util
|
114
|
+
*/
|
115
|
+
|
116
|
+
|
117
|
+
/***
|
118
|
+
Returns a copy of the given object that only contains
|
119
|
+
the given keys.
|
120
|
+
|
121
|
+
@function up.util.only
|
122
|
+
@param {Object} object
|
123
|
+
@param {Array} ...keys
|
124
|
+
@deprecated
|
125
|
+
Use `up.util.pick()` instead.
|
126
|
+
*/
|
127
|
+
|
128
|
+
(function() {
|
129
|
+
var slice = [].slice;
|
130
|
+
|
131
|
+
up.util.only = function() {
|
132
|
+
var keys, object;
|
133
|
+
object = arguments[0], keys = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
134
|
+
up.migrate.deprecated('up.util.only(object, ...keys)', 'up.util.pick(object, keys)');
|
135
|
+
return up.util.pick(object, keys);
|
136
|
+
};
|
137
|
+
|
138
|
+
|
139
|
+
/***
|
140
|
+
Returns a copy of the given object that contains all except
|
141
|
+
the given keys.
|
142
|
+
|
143
|
+
@function up.util.except
|
144
|
+
@param {Object} object
|
145
|
+
@param {Array} ...keys
|
146
|
+
@deprecated
|
147
|
+
Use `up.util.omit(object, keys)` (with an array argument) instead of `up.util.object(...keys)` (with rest arguments).
|
148
|
+
*/
|
149
|
+
|
150
|
+
up.util.except = function() {
|
151
|
+
var keys, object;
|
152
|
+
object = arguments[0], keys = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
153
|
+
up.migrate.deprecated('up.util.except(object, ...keys)', 'up.util.omit(object, keys)');
|
154
|
+
return up.util.omit(object, keys);
|
155
|
+
};
|
156
|
+
|
157
|
+
up.util.parseUrl = function() {
|
158
|
+
var args, ref;
|
159
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
160
|
+
up.migrate.warn('up.util.parseUrl() has been renamed to up.util.parseURL()');
|
161
|
+
return (ref = up.util).parseURL.apply(ref, args);
|
162
|
+
};
|
163
|
+
|
164
|
+
up.util.any = function() {
|
165
|
+
var args;
|
166
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
167
|
+
up.migrate.warn('up.util.any() has been renamed to up.util.some()');
|
168
|
+
return some.apply(null, args);
|
169
|
+
};
|
170
|
+
|
171
|
+
up.util.all = function() {
|
172
|
+
var args, ref;
|
173
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
174
|
+
up.migrate.warn('up.util.all() has been renamed to up.util.every()');
|
175
|
+
return (ref = up.util).every.apply(ref, args);
|
176
|
+
};
|
177
|
+
|
178
|
+
up.util.detect = function() {
|
179
|
+
var args, ref;
|
180
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
181
|
+
up.migrate.warn('up.util.detect() has been renamed to up.util.find()');
|
182
|
+
return (ref = up.util).find.apply(ref, args);
|
183
|
+
};
|
184
|
+
|
185
|
+
up.util.select = function() {
|
186
|
+
var args, ref;
|
187
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
188
|
+
up.migrate.warn('up.util.select() has been renamed to up.util.filter()');
|
189
|
+
return (ref = up.util).filter.apply(ref, args);
|
190
|
+
};
|
191
|
+
|
192
|
+
up.util.setTimer = function() {
|
193
|
+
var args, ref;
|
194
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
195
|
+
up.migrate.warn('up.util.setTimer() has been renamed to up.util.timer()');
|
196
|
+
return (ref = up.util).timer.apply(ref, args);
|
197
|
+
};
|
198
|
+
|
199
|
+
up.util.escapeHtml = function() {
|
200
|
+
var args, ref;
|
201
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
202
|
+
up.migrate.deprecated('up.util.escapeHtml', 'up.util.escapeHTML');
|
203
|
+
return (ref = up.util).escapeHTML.apply(ref, args);
|
204
|
+
};
|
205
|
+
|
206
|
+
up.util.selectorForElement = function() {
|
207
|
+
var args, ref;
|
208
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
209
|
+
up.migrate.warn('up.util.selectorForElement() has been renamed to up.fragment.toTarget()');
|
210
|
+
return (ref = up.fragment).toTarget.apply(ref, args);
|
211
|
+
};
|
212
|
+
|
213
|
+
up.util.nextFrame = function() {
|
214
|
+
var args, ref;
|
215
|
+
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
216
|
+
up.migrate.warn('up.util.nextFrame() has been renamed to up.util.task()');
|
217
|
+
return (ref = up.util).task.apply(ref, args);
|
218
|
+
};
|
219
|
+
|
220
|
+
}).call(this);
|
221
|
+
|
108
222
|
/***
|
109
223
|
@module up.element
|
110
224
|
*/
|
@@ -188,17 +302,6 @@ Returns the first descendant element matching the given selector.
|
|
188
302
|
|
189
303
|
}).call(this);
|
190
304
|
|
191
|
-
/***
|
192
|
-
@module up.feedback
|
193
|
-
*/
|
194
|
-
|
195
|
-
(function() {
|
196
|
-
up.migrate.renamedPackage('navigation', 'feedback');
|
197
|
-
|
198
|
-
up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
|
199
|
-
|
200
|
-
}).call(this);
|
201
|
-
|
202
305
|
/***
|
203
306
|
@module up.form
|
204
307
|
*/
|
@@ -425,6 +528,29 @@ Returns the first descendant element matching the given selector.
|
|
425
528
|
|
426
529
|
}).call(this);
|
427
530
|
|
531
|
+
/***
|
532
|
+
@module up.feedback
|
533
|
+
*/
|
534
|
+
|
535
|
+
(function() {
|
536
|
+
up.migrate.renamedPackage('navigation', 'feedback');
|
537
|
+
|
538
|
+
up.migrate.renamedProperty(up.feedback.config, 'navs', 'navSelectors');
|
539
|
+
|
540
|
+
}).call(this);
|
541
|
+
(function() {
|
542
|
+
up.migrate.parseFollowOptions = function(parser) {
|
543
|
+
parser.string('flavor');
|
544
|
+
parser.string('width');
|
545
|
+
parser.string('height');
|
546
|
+
parser.boolean('closable');
|
547
|
+
parser.booleanOrString('reveal');
|
548
|
+
parser.boolean('resetScroll');
|
549
|
+
return parser.boolean('restoreScroll');
|
550
|
+
};
|
551
|
+
|
552
|
+
}).call(this);
|
553
|
+
|
428
554
|
/***
|
429
555
|
@module up.layer
|
430
556
|
*/
|
@@ -496,16 +622,8 @@ Returns the first descendant element matching the given selector.
|
|
496
622
|
})(this));
|
497
623
|
};
|
498
624
|
|
499
|
-
|
500
|
-
(
|
501
|
-
up.migrate.parseFollowOptions = function(parser) {
|
502
|
-
parser.string('flavor');
|
503
|
-
parser.string('width');
|
504
|
-
parser.string('height');
|
505
|
-
parser.boolean('closable');
|
506
|
-
parser.booleanOrString('reveal');
|
507
|
-
parser.boolean('resetScroll');
|
508
|
-
return parser.boolean('restoreScroll');
|
625
|
+
up.migrate.handleLayerConfig = function(config) {
|
626
|
+
return up.migrate.fixKey(config, 'history', 'historyVisible');
|
509
627
|
};
|
510
628
|
|
511
629
|
}).call(this);
|
@@ -712,9 +830,9 @@ Returns the first descendant element matching the given selector.
|
|
712
830
|
*/
|
713
831
|
|
714
832
|
up.link.targetMacro('up-modal', {
|
715
|
-
'up-layer': 'modal'
|
833
|
+
'up-layer': 'new modal'
|
716
834
|
}, function() {
|
717
|
-
return up.migrate.deprecated('a[up-modal]', 'a[up-layer=modal]');
|
835
|
+
return up.migrate.deprecated('a[up-modal]', 'a[up-layer="new modal"]');
|
718
836
|
});
|
719
837
|
|
720
838
|
|
@@ -732,55 +850,213 @@ Returns the first descendant element matching the given selector.
|
|
732
850
|
*/
|
733
851
|
|
734
852
|
up.link.targetMacro('up-drawer', {
|
735
|
-
'up-layer': 'drawer'
|
853
|
+
'up-layer': 'new drawer'
|
736
854
|
}, function() {
|
737
|
-
return up.migrate.deprecated('a[up-drawer]', 'a[up-layer=drawer]');
|
855
|
+
return up.migrate.deprecated('a[up-drawer]', 'a[up-layer="new drawer"]');
|
738
856
|
});
|
739
857
|
|
740
858
|
}).call(this);
|
741
859
|
(function() {
|
742
|
-
var
|
743
|
-
slice = [].slice;
|
860
|
+
var e, u;
|
744
861
|
|
745
862
|
u = up.util;
|
746
863
|
|
864
|
+
e = up.element;
|
747
865
|
|
748
|
-
|
749
|
-
@module up.network
|
750
|
-
*/
|
751
|
-
|
752
|
-
up.migrate.renamedPackage('proxy', 'network');
|
753
|
-
|
754
|
-
up.migrate.renamedEvent('up:proxy:load', 'up:request:load');
|
755
|
-
|
756
|
-
up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded');
|
757
|
-
|
758
|
-
up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded');
|
759
|
-
|
760
|
-
up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal');
|
761
|
-
|
762
|
-
up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted');
|
763
|
-
|
764
|
-
up.migrate.renamedEvent('up:proxy:slow', 'up:request:late');
|
866
|
+
up.popup = u.literal({
|
765
867
|
|
766
|
-
|
868
|
+
/***
|
869
|
+
Attaches a popup overlay to the given element or selector.
|
870
|
+
|
871
|
+
@function up.popup.attach
|
872
|
+
@param {Element|jQuery|string} anchor
|
873
|
+
The element to which the popup will be attached.
|
874
|
+
@param {Object} [options]
|
875
|
+
See options for `up.render()`.
|
876
|
+
@return {Promise}
|
877
|
+
@deprecated
|
878
|
+
Use `up.layer.open({ origin, layer: 'popup' })` instead.
|
879
|
+
*/
|
880
|
+
attach: function(origin, options) {
|
881
|
+
if (options == null) {
|
882
|
+
options = {};
|
883
|
+
}
|
884
|
+
origin = up.fragment.get(origin);
|
885
|
+
up.migrate.deprecated('up.popup.attach(origin)', "up.layer.open({ origin, layer: 'popup' })");
|
886
|
+
return up.layer.open(u.merge(options, {
|
887
|
+
origin: origin,
|
888
|
+
layer: 'popup'
|
889
|
+
}));
|
890
|
+
},
|
767
891
|
|
768
|
-
|
769
|
-
|
770
|
-
|
892
|
+
/***
|
893
|
+
Closes a currently open overlay.
|
894
|
+
|
895
|
+
@function up.popup.close
|
896
|
+
@param {Object} options
|
897
|
+
@return {Promise}
|
898
|
+
@deprecated
|
899
|
+
Use `up.layer.dismiss()` instead.
|
900
|
+
*/
|
901
|
+
close: function(options) {
|
902
|
+
if (options == null) {
|
903
|
+
options = {};
|
904
|
+
}
|
905
|
+
up.migrate.deprecated('up.popup.close()', 'up.layer.dismiss()');
|
906
|
+
return up.layer.dismiss(null, options);
|
907
|
+
},
|
771
908
|
|
772
|
-
|
773
|
-
|
774
|
-
|
775
|
-
|
909
|
+
/***
|
910
|
+
Returns the location URL of the fragment displayed in the current overlay.
|
911
|
+
|
912
|
+
@function up.popup.url
|
913
|
+
@return {string}
|
914
|
+
@deprecated
|
915
|
+
Use `up.layer.location` instead.
|
916
|
+
*/
|
917
|
+
url: function() {
|
918
|
+
up.migrate.deprecated('up.popup.url()', 'up.layer.location');
|
919
|
+
return up.layer.location;
|
776
920
|
},
|
777
|
-
set: function(value) {
|
778
|
-
preloadDelayMoved();
|
779
|
-
return up.link.config.preloadDelay = value;
|
780
|
-
}
|
781
|
-
});
|
782
921
|
|
783
|
-
|
922
|
+
/***
|
923
|
+
Returns the location URL of the layer behind the current overlay.
|
924
|
+
|
925
|
+
@function up.popup.coveredUrl
|
926
|
+
@return {string}
|
927
|
+
@deprecated
|
928
|
+
Use `up.layer.parent.location` instead.
|
929
|
+
*/
|
930
|
+
coveredUrl: function() {
|
931
|
+
var ref;
|
932
|
+
up.migrate.deprecated('up.popup.coveredUrl()', 'up.layer.parent.location');
|
933
|
+
return (ref = up.layer.parent) != null ? ref.location : void 0;
|
934
|
+
},
|
935
|
+
|
936
|
+
/***
|
937
|
+
Sets default options for future popup overlays.
|
938
|
+
|
939
|
+
@property up.popup.config
|
940
|
+
@deprecated
|
941
|
+
Use `up.layer.config.popup` instead.
|
942
|
+
*/
|
943
|
+
get_config: function() {
|
944
|
+
up.migrate.deprecated('up.popup.config', 'up.layer.config.popup');
|
945
|
+
return up.layer.config.popup;
|
946
|
+
},
|
947
|
+
|
948
|
+
/***
|
949
|
+
Returns whether the given element or selector is contained
|
950
|
+
within the current layer.
|
951
|
+
|
952
|
+
@function up.popup.contains
|
953
|
+
@param {string} elementOrSelector
|
954
|
+
The element to test
|
955
|
+
@return {boolean}
|
956
|
+
@deprecated
|
957
|
+
Use `up.layer.contains()` instead.
|
958
|
+
*/
|
959
|
+
contains: function(element) {
|
960
|
+
up.migrate.deprecated('up.popup.contains()', 'up.layer.contains()');
|
961
|
+
return up.layer.contains(element);
|
962
|
+
},
|
963
|
+
|
964
|
+
/***
|
965
|
+
Returns whether an overlay is currently open.
|
966
|
+
|
967
|
+
@function up.popup.isOpen
|
968
|
+
@return {boolean}
|
969
|
+
@deprecated
|
970
|
+
Use `up.layer.isOverlay()` instead.
|
971
|
+
*/
|
972
|
+
isOpen: function() {
|
973
|
+
up.migrate.deprecated('up.popup.isOpen()', 'up.layer.isOverlay()');
|
974
|
+
return up.layer.isOverlay();
|
975
|
+
},
|
976
|
+
sync: function() {
|
977
|
+
up.migrate.deprecated('up.popup.sync()', 'up.layer.sync()');
|
978
|
+
return up.layer.sync();
|
979
|
+
}
|
980
|
+
});
|
981
|
+
|
982
|
+
up.migrate.renamedEvent('up:popup:open', 'up:layer:open');
|
983
|
+
|
984
|
+
up.migrate.renamedEvent('up:popup:opened', 'up:layer:opened');
|
985
|
+
|
986
|
+
up.migrate.renamedEvent('up:popup:close', 'up:layer:dismiss');
|
987
|
+
|
988
|
+
up.migrate.renamedEvent('up:popup:closed', 'up:layer:dismissed');
|
989
|
+
|
990
|
+
up.link.targetMacro('up-popup', {
|
991
|
+
'up-layer': 'new popup'
|
992
|
+
}, function() {
|
993
|
+
return up.migrate.deprecated('[up-popup]', '[up-layer="new popup"]');
|
994
|
+
});
|
995
|
+
|
996
|
+
}).call(this);
|
997
|
+
|
998
|
+
/***
|
999
|
+
Tooltips
|
1000
|
+
========
|
1001
|
+
|
1002
|
+
Unpoly used to come with a basic tooltip implementation.
|
1003
|
+
This feature is now deprecated.
|
1004
|
+
|
1005
|
+
@module up.tooltip
|
1006
|
+
*/
|
1007
|
+
|
1008
|
+
(function() {
|
1009
|
+
up.tooltip = (function() {
|
1010
|
+
return up.macro('[up-tooltip]', function(opener) {
|
1011
|
+
up.migrate.warn('[up-tooltip] has been deprecated. A [title] was set instead.');
|
1012
|
+
return up.element.setMissingAttr(opener, 'title', opener.getAttribute('up-tooltip'));
|
1013
|
+
});
|
1014
|
+
})();
|
1015
|
+
|
1016
|
+
}).call(this);
|
1017
|
+
(function() {
|
1018
|
+
var preloadDelayMoved, u,
|
1019
|
+
slice = [].slice;
|
1020
|
+
|
1021
|
+
u = up.util;
|
1022
|
+
|
1023
|
+
|
1024
|
+
/***
|
1025
|
+
@module up.network
|
1026
|
+
*/
|
1027
|
+
|
1028
|
+
up.migrate.renamedPackage('proxy', 'network');
|
1029
|
+
|
1030
|
+
up.migrate.renamedEvent('up:proxy:load', 'up:request:load');
|
1031
|
+
|
1032
|
+
up.migrate.renamedEvent('up:proxy:received', 'up:request:loaded');
|
1033
|
+
|
1034
|
+
up.migrate.renamedEvent('up:proxy:loaded', 'up:request:loaded');
|
1035
|
+
|
1036
|
+
up.migrate.renamedEvent('up:proxy:fatal', 'up:request:fatal');
|
1037
|
+
|
1038
|
+
up.migrate.renamedEvent('up:proxy:aborted', 'up:request:aborted');
|
1039
|
+
|
1040
|
+
up.migrate.renamedEvent('up:proxy:slow', 'up:request:late');
|
1041
|
+
|
1042
|
+
up.migrate.renamedEvent('up:proxy:recover', 'up:request:recover');
|
1043
|
+
|
1044
|
+
preloadDelayMoved = function() {
|
1045
|
+
return up.migrate.deprecated('up.proxy.config.preloadDelay', 'up.link.config.preloadDelay');
|
1046
|
+
};
|
1047
|
+
|
1048
|
+
Object.defineProperty(up.network.config, 'preloadDelay', {
|
1049
|
+
get: function() {
|
1050
|
+
preloadDelayMoved();
|
1051
|
+
return up.link.config.preloadDelay;
|
1052
|
+
},
|
1053
|
+
set: function(value) {
|
1054
|
+
preloadDelayMoved();
|
1055
|
+
return up.link.config.preloadDelay = value;
|
1056
|
+
}
|
1057
|
+
});
|
1058
|
+
|
1059
|
+
up.migrate.renamedProperty(up.network.config, 'maxRequests', 'concurrency');
|
784
1060
|
|
785
1061
|
up.migrate.renamedProperty(up.network.config, 'slowDelay', 'badResponseTime');
|
786
1062
|
|
@@ -893,144 +1169,6 @@ Returns the first descendant element matching the given selector.
|
|
893
1169
|
return !this.ok;
|
894
1170
|
};
|
895
1171
|
|
896
|
-
}).call(this);
|
897
|
-
(function() {
|
898
|
-
var e, u;
|
899
|
-
|
900
|
-
u = up.util;
|
901
|
-
|
902
|
-
e = up.element;
|
903
|
-
|
904
|
-
up.popup = u.literal({
|
905
|
-
|
906
|
-
/***
|
907
|
-
Attaches a popup overlay to the given element or selector.
|
908
|
-
|
909
|
-
@function up.popup.attach
|
910
|
-
@param {Element|jQuery|string} anchor
|
911
|
-
The element to which the popup will be attached.
|
912
|
-
@param {Object} [options]
|
913
|
-
See options for `up.render()`.
|
914
|
-
@return {Promise}
|
915
|
-
@deprecated
|
916
|
-
Use `up.layer.open({ origin, layer: 'popup' })` instead.
|
917
|
-
*/
|
918
|
-
attach: function(origin, options) {
|
919
|
-
if (options == null) {
|
920
|
-
options = {};
|
921
|
-
}
|
922
|
-
origin = up.fragment.get(origin);
|
923
|
-
up.migrate.deprecated('up.popup.attach(origin)', "up.layer.open({ origin, layer: 'popup' })");
|
924
|
-
return up.layer.open(u.merge(options, {
|
925
|
-
origin: origin,
|
926
|
-
layer: 'popup'
|
927
|
-
}));
|
928
|
-
},
|
929
|
-
|
930
|
-
/***
|
931
|
-
Closes a currently open overlay.
|
932
|
-
|
933
|
-
@function up.popup.close
|
934
|
-
@param {Object} options
|
935
|
-
@return {Promise}
|
936
|
-
@deprecated
|
937
|
-
Use `up.layer.dismiss()` instead.
|
938
|
-
*/
|
939
|
-
close: function(options) {
|
940
|
-
if (options == null) {
|
941
|
-
options = {};
|
942
|
-
}
|
943
|
-
up.migrate.deprecated('up.popup.close()', 'up.layer.dismiss()');
|
944
|
-
return up.layer.dismiss(null, options);
|
945
|
-
},
|
946
|
-
|
947
|
-
/***
|
948
|
-
Returns the location URL of the fragment displayed in the current overlay.
|
949
|
-
|
950
|
-
@function up.popup.url
|
951
|
-
@return {string}
|
952
|
-
@deprecated
|
953
|
-
Use `up.layer.location` instead.
|
954
|
-
*/
|
955
|
-
url: function() {
|
956
|
-
up.migrate.deprecated('up.popup.url()', 'up.layer.location');
|
957
|
-
return up.layer.location;
|
958
|
-
},
|
959
|
-
|
960
|
-
/***
|
961
|
-
Returns the location URL of the layer behind the current overlay.
|
962
|
-
|
963
|
-
@function up.popup.coveredUrl
|
964
|
-
@return {string}
|
965
|
-
@deprecated
|
966
|
-
Use `up.layer.parent.location` instead.
|
967
|
-
*/
|
968
|
-
coveredUrl: function() {
|
969
|
-
var ref;
|
970
|
-
up.migrate.deprecated('up.popup.coveredUrl()', 'up.layer.parent.location');
|
971
|
-
return (ref = up.layer.parent) != null ? ref.location : void 0;
|
972
|
-
},
|
973
|
-
|
974
|
-
/***
|
975
|
-
Sets default options for future popup overlays.
|
976
|
-
|
977
|
-
@property up.popup.config
|
978
|
-
@deprecated
|
979
|
-
Use `up.layer.config.popup` instead.
|
980
|
-
*/
|
981
|
-
get_config: function() {
|
982
|
-
up.migrate.deprecated('up.popup.config', 'up.layer.config.popup');
|
983
|
-
return up.layer.config.popup;
|
984
|
-
},
|
985
|
-
|
986
|
-
/***
|
987
|
-
Returns whether the given element or selector is contained
|
988
|
-
within the current layer.
|
989
|
-
|
990
|
-
@function up.popup.contains
|
991
|
-
@param {string} elementOrSelector
|
992
|
-
The element to test
|
993
|
-
@return {boolean}
|
994
|
-
@deprecated
|
995
|
-
Use `up.layer.contains()` instead.
|
996
|
-
*/
|
997
|
-
contains: function(element) {
|
998
|
-
up.migrate.deprecated('up.popup.contains()', 'up.layer.contains()');
|
999
|
-
return up.layer.contains(element);
|
1000
|
-
},
|
1001
|
-
|
1002
|
-
/***
|
1003
|
-
Returns whether an overlay is currently open.
|
1004
|
-
|
1005
|
-
@function up.popup.isOpen
|
1006
|
-
@return {boolean}
|
1007
|
-
@deprecated
|
1008
|
-
Use `up.layer.isOverlay()` instead.
|
1009
|
-
*/
|
1010
|
-
isOpen: function() {
|
1011
|
-
up.migrate.deprecated('up.popup.isOpen()', 'up.layer.isOverlay()');
|
1012
|
-
return up.layer.isOverlay();
|
1013
|
-
},
|
1014
|
-
sync: function() {
|
1015
|
-
up.migrate.deprecated('up.popup.sync()', 'up.layer.sync()');
|
1016
|
-
return up.layer.sync();
|
1017
|
-
}
|
1018
|
-
});
|
1019
|
-
|
1020
|
-
up.migrate.renamedEvent('up:popup:open', 'up:layer:open');
|
1021
|
-
|
1022
|
-
up.migrate.renamedEvent('up:popup:opened', 'up:layer:opened');
|
1023
|
-
|
1024
|
-
up.migrate.renamedEvent('up:popup:close', 'up:layer:dismiss');
|
1025
|
-
|
1026
|
-
up.migrate.renamedEvent('up:popup:closed', 'up:layer:dismissed');
|
1027
|
-
|
1028
|
-
up.link.targetMacro('up-popup', {
|
1029
|
-
'up-layer': 'popup'
|
1030
|
-
}, function() {
|
1031
|
-
return up.migrate.deprecated('[up-popup]', '[up-layer=popup]');
|
1032
|
-
});
|
1033
|
-
|
1034
1172
|
}).call(this);
|
1035
1173
|
|
1036
1174
|
/***
|
@@ -1042,136 +1180,6 @@ Returns the first descendant element matching the given selector.
|
|
1042
1180
|
|
1043
1181
|
}).call(this);
|
1044
1182
|
|
1045
|
-
/***
|
1046
|
-
Tooltips
|
1047
|
-
========
|
1048
|
-
|
1049
|
-
Unpoly used to come with a basic tooltip implementation.
|
1050
|
-
This feature is now deprecated.
|
1051
|
-
|
1052
|
-
@module up.tooltip
|
1053
|
-
*/
|
1054
|
-
|
1055
|
-
(function() {
|
1056
|
-
up.tooltip = (function() {
|
1057
|
-
return up.macro('[up-tooltip]', function(opener) {
|
1058
|
-
up.migrate.warn('[up-tooltip] has been deprecated. A [title] was set instead.');
|
1059
|
-
return up.element.setMissingAttr(opener, 'title', opener.getAttribute('up-tooltip'));
|
1060
|
-
});
|
1061
|
-
})();
|
1062
|
-
|
1063
|
-
}).call(this);
|
1064
|
-
|
1065
|
-
/***
|
1066
|
-
@module up.util
|
1067
|
-
*/
|
1068
|
-
|
1069
|
-
|
1070
|
-
/***
|
1071
|
-
Returns a copy of the given object that only contains
|
1072
|
-
the given keys.
|
1073
|
-
|
1074
|
-
@function up.util.only
|
1075
|
-
@param {Object} object
|
1076
|
-
@param {Array} ...keys
|
1077
|
-
@deprecated
|
1078
|
-
Use `up.util.pick()` instead.
|
1079
|
-
*/
|
1080
|
-
|
1081
|
-
(function() {
|
1082
|
-
var slice = [].slice;
|
1083
|
-
|
1084
|
-
up.util.only = function() {
|
1085
|
-
var keys, object;
|
1086
|
-
object = arguments[0], keys = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
1087
|
-
up.migrate.deprecated('up.util.only(object, ...keys)', 'up.util.pick(object, keys)');
|
1088
|
-
return up.util.pick(object, keys);
|
1089
|
-
};
|
1090
|
-
|
1091
|
-
|
1092
|
-
/***
|
1093
|
-
Returns a copy of the given object that contains all except
|
1094
|
-
the given keys.
|
1095
|
-
|
1096
|
-
@function up.util.except
|
1097
|
-
@param {Object} object
|
1098
|
-
@param {Array} ...keys
|
1099
|
-
@deprecated
|
1100
|
-
Use `up.util.omit(object, keys)` (with an array argument) instead of `up.util.object(...keys)` (with rest arguments).
|
1101
|
-
*/
|
1102
|
-
|
1103
|
-
up.util.except = function() {
|
1104
|
-
var keys, object;
|
1105
|
-
object = arguments[0], keys = 2 <= arguments.length ? slice.call(arguments, 1) : [];
|
1106
|
-
up.migrate.deprecated('up.util.except(object, ...keys)', 'up.util.omit(object, keys)');
|
1107
|
-
return up.util.omit(object, keys);
|
1108
|
-
};
|
1109
|
-
|
1110
|
-
up.util.parseUrl = function() {
|
1111
|
-
var args, ref;
|
1112
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1113
|
-
up.migrate.warn('up.util.parseUrl() has been renamed to up.util.parseURL()');
|
1114
|
-
return (ref = up.util).parseURL.apply(ref, args);
|
1115
|
-
};
|
1116
|
-
|
1117
|
-
up.util.any = function() {
|
1118
|
-
var args;
|
1119
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1120
|
-
up.migrate.warn('up.util.any() has been renamed to up.util.some()');
|
1121
|
-
return some.apply(null, args);
|
1122
|
-
};
|
1123
|
-
|
1124
|
-
up.util.all = function() {
|
1125
|
-
var args, ref;
|
1126
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1127
|
-
up.migrate.warn('up.util.all() has been renamed to up.util.every()');
|
1128
|
-
return (ref = up.util).every.apply(ref, args);
|
1129
|
-
};
|
1130
|
-
|
1131
|
-
up.util.detect = function() {
|
1132
|
-
var args, ref;
|
1133
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1134
|
-
up.migrate.warn('up.util.detect() has been renamed to up.util.find()');
|
1135
|
-
return (ref = up.util).find.apply(ref, args);
|
1136
|
-
};
|
1137
|
-
|
1138
|
-
up.util.select = function() {
|
1139
|
-
var args, ref;
|
1140
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1141
|
-
up.migrate.warn('up.util.select() has been renamed to up.util.filter()');
|
1142
|
-
return (ref = up.util).filter.apply(ref, args);
|
1143
|
-
};
|
1144
|
-
|
1145
|
-
up.util.setTimer = function() {
|
1146
|
-
var args, ref;
|
1147
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1148
|
-
up.migrate.warn('up.util.setTimer() has been renamed to up.util.timer()');
|
1149
|
-
return (ref = up.util).timer.apply(ref, args);
|
1150
|
-
};
|
1151
|
-
|
1152
|
-
up.util.escapeHtml = function() {
|
1153
|
-
var args, ref;
|
1154
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1155
|
-
up.migrate.deprecated('up.util.escapeHtml', 'up.util.escapeHTML');
|
1156
|
-
return (ref = up.util).escapeHTML.apply(ref, args);
|
1157
|
-
};
|
1158
|
-
|
1159
|
-
up.util.selectorForElement = function() {
|
1160
|
-
var args, ref;
|
1161
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1162
|
-
up.migrate.warn('up.util.selectorForElement() has been renamed to up.fragment.toTarget()');
|
1163
|
-
return (ref = up.fragment).toTarget.apply(ref, args);
|
1164
|
-
};
|
1165
|
-
|
1166
|
-
up.util.nextFrame = function() {
|
1167
|
-
var args, ref;
|
1168
|
-
args = 1 <= arguments.length ? slice.call(arguments, 0) : [];
|
1169
|
-
up.migrate.warn('up.util.nextFrame() has been renamed to up.util.task()');
|
1170
|
-
return (ref = up.util).task.apply(ref, args);
|
1171
|
-
};
|
1172
|
-
|
1173
|
-
}).call(this);
|
1174
|
-
|
1175
1183
|
/***
|
1176
1184
|
@module up.viewport
|
1177
1185
|
*/
|
@@ -1206,6 +1214,10 @@ the given keys.
|
|
1206
1214
|
return (ref = up.viewport).get.apply(ref, args);
|
1207
1215
|
};
|
1208
1216
|
|
1217
|
+
}).call(this);
|
1218
|
+
(function() {
|
1219
|
+
up.framework.stopExtension();
|
1220
|
+
|
1209
1221
|
}).call(this);
|
1210
1222
|
(function() {
|
1211
1223
|
|