polymer-rails 1.1.2 → 1.1.5
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/README.md +1 -1
- data/app/assets/javascripts/polymer/polymer-micro.html +5 -5
- data/app/assets/javascripts/polymer/polymer.html +53 -25
- data/app/assets/javascripts/webcomponentsjs/webcomponents-lite.js +56 -23
- data/app/assets/javascripts/webcomponentsjs/webcomponents.js +49 -23
- data/lib/polymer-rails/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6346498c89225b35229ef4da6c33c1eec56486c
|
4
|
+
data.tar.gz: 91f6d3c2d603c649c9d0c677cd356da0ffbbf5c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9daa6731fd57bc121bdb8106079d226537a4392a0c1c14d7c8612e2ac83e45c03a6fbfb7de5793840908f601a8eabb25be6e4d6a25159b26f7b193861b03f659
|
7
|
+
data.tar.gz: 507084b7873dd864fecbcbd18904a2c38783709c93ded5292c5df702aeaa42d35a0a57e73d1e67eca6890adf592517b2767aa2f450206c4b97914702d45bac32
|
data/README.md
CHANGED
@@ -12,7 +12,7 @@ Want to get started with [web components](http://www.w3.org/wiki/WebComponents/
|
|
12
12
|
Polymer-rails works well with compiling assets, such as CoffeeScript and Sass.
|
13
13
|
You can easily use external stylesheet or script tag references in your web component `<link rel="stylesheet" href="application.css">` for stylesheets and `<script src="application.js">` for javascripts.
|
14
14
|
This assets will be automatically compiled and required into component html file.
|
15
|
-
* Note that if you're using sass or
|
15
|
+
* Note that if you're using sass or coffee precompilation, assets are required to use '.css.sass' and '.js.coffee' extensions.*
|
16
16
|
|
17
17
|
|
18
18
|
## Versions
|
@@ -56,10 +56,10 @@ prototype = {};
|
|
56
56
|
}
|
57
57
|
var factory = desugar(prototype);
|
58
58
|
prototype = factory.prototype;
|
59
|
-
var options = {
|
60
|
-
prototype
|
61
|
-
extends
|
62
|
-
}
|
59
|
+
var options = { prototype: prototype };
|
60
|
+
if (prototype.extends) {
|
61
|
+
options.extends = prototype.extends;
|
62
|
+
}
|
63
63
|
Polymer.telemetry._registrate(prototype);
|
64
64
|
document.registerElement(prototype.is, options);
|
65
65
|
return factory;
|
@@ -576,7 +576,7 @@ debouncer.stop();
|
|
576
576
|
}
|
577
577
|
}
|
578
578
|
});
|
579
|
-
Polymer.version = '1.1.
|
579
|
+
Polymer.version = '1.1.5';
|
580
580
|
Polymer.Base._addFeature({
|
581
581
|
_registerFeatures: function () {
|
582
582
|
this._prepIs();
|
@@ -357,7 +357,15 @@ this.listen(node, name, listeners[key]);
|
|
357
357
|
}
|
358
358
|
},
|
359
359
|
listen: function (node, eventName, methodName) {
|
360
|
-
this.
|
360
|
+
var handler = this._recallEventHandler(this, eventName, node, methodName);
|
361
|
+
if (!handler) {
|
362
|
+
handler = this._createEventHandler(node, eventName, methodName);
|
363
|
+
}
|
364
|
+
if (handler._listening) {
|
365
|
+
return;
|
366
|
+
}
|
367
|
+
this._listen(node, eventName, handler);
|
368
|
+
handler._listening = true;
|
361
369
|
},
|
362
370
|
_boundListenerKey: function (eventName, methodName) {
|
363
371
|
return eventName + ':' + methodName;
|
@@ -396,6 +404,7 @@ host[methodName](e, e.detail);
|
|
396
404
|
host._warn(host._logf('_createEventHandler', 'listener method `' + methodName + '` not defined'));
|
397
405
|
}
|
398
406
|
};
|
407
|
+
handler._listening = false;
|
399
408
|
this._recordEventHandler(host, eventName, node, methodName, handler);
|
400
409
|
return handler;
|
401
410
|
},
|
@@ -403,6 +412,7 @@ unlisten: function (node, eventName, methodName) {
|
|
403
412
|
var handler = this._recallEventHandler(this, eventName, node, methodName);
|
404
413
|
if (handler) {
|
405
414
|
this._unlisten(node, eventName, handler);
|
415
|
+
handler._listening = false;
|
406
416
|
}
|
407
417
|
},
|
408
418
|
_listen: function (node, eventName, handler) {
|
@@ -687,12 +697,12 @@ gd = gobj[dep];
|
|
687
697
|
if (gd && gd[name]) {
|
688
698
|
gd[name] = (gd[name] || 1) - 1;
|
689
699
|
gd._count = (gd._count || 1) - 1;
|
690
|
-
}
|
691
700
|
if (gd._count === 0) {
|
692
701
|
node.removeEventListener(dep, this.handleNative);
|
693
702
|
}
|
694
703
|
}
|
695
704
|
}
|
705
|
+
}
|
696
706
|
node.removeEventListener(evType, handler);
|
697
707
|
},
|
698
708
|
register: function (recog) {
|
@@ -1250,6 +1260,12 @@ elt[n] = props[n];
|
|
1250
1260
|
}
|
1251
1261
|
}
|
1252
1262
|
return elt;
|
1263
|
+
},
|
1264
|
+
isLightDescendant: function (node) {
|
1265
|
+
return this.contains(node) && Polymer.dom(this).getOwnerRoot() === Polymer.dom(node).getOwnerRoot();
|
1266
|
+
},
|
1267
|
+
isLocalDescendant: function (node) {
|
1268
|
+
return this.root === Polymer.dom(node).getOwnerRoot();
|
1253
1269
|
}
|
1254
1270
|
});
|
1255
1271
|
Polymer.Bind = {
|
@@ -1817,6 +1833,7 @@ var h$ = this._handlers;
|
|
1817
1833
|
for (var i = 0, l = h$.length, h; i < l && (h = h$[i]); i++) {
|
1818
1834
|
h[0].call(this, h[1], h[2]);
|
1819
1835
|
}
|
1836
|
+
this._handlers = [];
|
1820
1837
|
}
|
1821
1838
|
});
|
1822
1839
|
(function () {
|
@@ -1940,7 +1957,7 @@ this._boundPaths = this._boundPaths || {};
|
|
1940
1957
|
if (from) {
|
1941
1958
|
this._boundPaths[to] = from;
|
1942
1959
|
} else {
|
1943
|
-
this.
|
1960
|
+
this.unlinkPaths(to);
|
1944
1961
|
}
|
1945
1962
|
},
|
1946
1963
|
unlinkPaths: function (path) {
|
@@ -1949,24 +1966,14 @@ delete this._boundPaths[path];
|
|
1949
1966
|
}
|
1950
1967
|
},
|
1951
1968
|
_notifyBoundPaths: function (path, value) {
|
1952
|
-
var from, to;
|
1953
1969
|
for (var a in this._boundPaths) {
|
1954
1970
|
var b = this._boundPaths[a];
|
1955
1971
|
if (path.indexOf(a + '.') == 0) {
|
1956
|
-
|
1957
|
-
|
1958
|
-
|
1959
|
-
}
|
1960
|
-
if (path.indexOf(b + '.') == 0) {
|
1961
|
-
from = b;
|
1962
|
-
to = a;
|
1963
|
-
break;
|
1972
|
+
this.notifyPath(this._fixPath(b, a, path), value);
|
1973
|
+
} else if (path.indexOf(b + '.') == 0) {
|
1974
|
+
this.notifyPath(this._fixPath(a, b, path), value);
|
1964
1975
|
}
|
1965
1976
|
}
|
1966
|
-
if (from && to) {
|
1967
|
-
var p = this._fixPath(to, from, path);
|
1968
|
-
this.notifyPath(p, value);
|
1969
|
-
}
|
1970
1977
|
},
|
1971
1978
|
_fixPath: function (property, root, path) {
|
1972
1979
|
return property + path.slice(root.length);
|
@@ -2060,6 +2067,22 @@ if (args.length) {
|
|
2060
2067
|
this._notifySplice(array, path, 0, args.length, []);
|
2061
2068
|
}
|
2062
2069
|
return ret;
|
2070
|
+
},
|
2071
|
+
prepareModelNotifyPath: function (model) {
|
2072
|
+
this.mixin(model, {
|
2073
|
+
fire: Polymer.Base.fire,
|
2074
|
+
notifyPath: Polymer.Base.notifyPath,
|
2075
|
+
_EVENT_CHANGED: Polymer.Base._EVENT_CHANGED,
|
2076
|
+
_notifyPath: Polymer.Base._notifyPath,
|
2077
|
+
_pathEffector: Polymer.Base._pathEffector,
|
2078
|
+
_annotationPathEffect: Polymer.Base._annotationPathEffect,
|
2079
|
+
_complexObserverPathEffect: Polymer.Base._complexObserverPathEffect,
|
2080
|
+
_annotatedComputationPathEffect: Polymer.Base._annotatedComputationPathEffect,
|
2081
|
+
_computePathEffect: Polymer.Base._computePathEffect,
|
2082
|
+
_modelForPath: Polymer.Base._modelForPath,
|
2083
|
+
_pathMatchesEffect: Polymer.Base._pathMatchesEffect,
|
2084
|
+
_notifyBoundPaths: Polymer.Base._notifyBoundPaths
|
2085
|
+
});
|
2063
2086
|
}
|
2064
2087
|
});
|
2065
2088
|
}());
|
@@ -2193,7 +2216,7 @@ MIXIN_RULE: 1000
|
|
2193
2216
|
OPEN_BRACE: '{',
|
2194
2217
|
CLOSE_BRACE: '}',
|
2195
2218
|
_rx: {
|
2196
|
-
comments: /\/\*[^*]*\*+([
|
2219
|
+
comments: /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim,
|
2197
2220
|
port: /@import[^;]*;/gim,
|
2198
2221
|
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
|
2199
2222
|
mixinProp: /(?:^|[\s;])--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
|
@@ -3267,6 +3290,7 @@ properties: { __hideTemplateChildren__: { observer: '_showHideChildren' } },
|
|
3267
3290
|
_instanceProps: Polymer.nob,
|
3268
3291
|
_parentPropPrefix: '_parent_',
|
3269
3292
|
templatize: function (template) {
|
3293
|
+
this._templatized = template;
|
3270
3294
|
if (!template._content) {
|
3271
3295
|
template._content = template.content;
|
3272
3296
|
}
|
@@ -3277,11 +3301,11 @@ return;
|
|
3277
3301
|
}
|
3278
3302
|
var archetype = Object.create(Polymer.Base);
|
3279
3303
|
this._customPrepAnnotations(archetype, template);
|
3304
|
+
this._prepParentProperties(archetype, template);
|
3280
3305
|
archetype._prepEffects();
|
3281
3306
|
this._customPrepEffects(archetype);
|
3282
3307
|
archetype._prepBehaviors();
|
3283
3308
|
archetype._prepBindings();
|
3284
|
-
this._prepParentProperties(archetype, template);
|
3285
3309
|
archetype._notifyPath = this._notifyPathImpl;
|
3286
3310
|
archetype._scopeElementClass = this._scopeElementClassImpl;
|
3287
3311
|
archetype.listen = this._listenImpl;
|
@@ -3364,6 +3388,7 @@ delete parentProps[prop];
|
|
3364
3388
|
proto = archetype._parentPropProto = Object.create(null);
|
3365
3389
|
if (template != this) {
|
3366
3390
|
Polymer.Bind.prepareModel(proto);
|
3391
|
+
Polymer.Base.prepareModelNotifyPath(proto);
|
3367
3392
|
}
|
3368
3393
|
for (prop in parentProps) {
|
3369
3394
|
var parentProp = this._parentPropPrefix + prop;
|
@@ -3382,6 +3407,7 @@ Polymer.Bind.prepareInstance(template);
|
|
3382
3407
|
template._forwardParentProp = this._forwardParentProp.bind(this);
|
3383
3408
|
}
|
3384
3409
|
this._extendTemplate(template, proto);
|
3410
|
+
template._pathEffector = this._pathEffectorImpl.bind(this);
|
3385
3411
|
}
|
3386
3412
|
},
|
3387
3413
|
_createForwardPropEffector: function (prop) {
|
@@ -3392,7 +3418,7 @@ this._forwardParentProp(prop, value);
|
|
3392
3418
|
_createHostPropEffector: function (prop) {
|
3393
3419
|
var prefix = this._parentPropPrefix;
|
3394
3420
|
return function (source, value) {
|
3395
|
-
this.dataHost[prefix + prop] = value;
|
3421
|
+
this.dataHost._templatized[prefix + prop] = value;
|
3396
3422
|
};
|
3397
3423
|
},
|
3398
3424
|
_createInstancePropEffector: function (prop) {
|
@@ -3424,16 +3450,17 @@ var dot = path.indexOf('.');
|
|
3424
3450
|
var root = dot < 0 ? path : path.slice(0, dot);
|
3425
3451
|
dataHost._forwardInstancePath.call(dataHost, this, path, value);
|
3426
3452
|
if (root in dataHost._parentProps) {
|
3427
|
-
dataHost.notifyPath(dataHost._parentPropPrefix + path, value);
|
3453
|
+
dataHost._templatized.notifyPath(dataHost._parentPropPrefix + path, value);
|
3428
3454
|
}
|
3429
3455
|
},
|
3430
|
-
|
3456
|
+
_pathEffectorImpl: function (path, value, fromAbove) {
|
3431
3457
|
if (this._forwardParentPath) {
|
3432
3458
|
if (path.indexOf(this._parentPropPrefix) === 0) {
|
3433
|
-
|
3459
|
+
var subPath = path.substring(this._parentPropPrefix.length);
|
3460
|
+
this._forwardParentPath(subPath, value);
|
3434
3461
|
}
|
3435
3462
|
}
|
3436
|
-
Polymer.Base._pathEffector.
|
3463
|
+
Polymer.Base._pathEffector.call(this._templatized, path, value, fromAbove);
|
3437
3464
|
},
|
3438
3465
|
_constructorImpl: function (model, host) {
|
3439
3466
|
this._rootDataHost = host._getRootDataHost();
|
@@ -3476,8 +3503,9 @@ return host._scopeElementClass(node, value);
|
|
3476
3503
|
stamp: function (model) {
|
3477
3504
|
model = model || {};
|
3478
3505
|
if (this._parentProps) {
|
3506
|
+
var templatized = this._templatized;
|
3479
3507
|
for (var prop in this._parentProps) {
|
3480
|
-
model[prop] =
|
3508
|
+
model[prop] = templatized[this._parentPropPrefix + prop];
|
3481
3509
|
}
|
3482
3510
|
}
|
3483
3511
|
return new this.ctor(model, this);
|
@@ -4085,7 +4113,7 @@ this.deselect(item);
|
|
4085
4113
|
}
|
4086
4114
|
} else {
|
4087
4115
|
this.push('selected', item);
|
4088
|
-
skey = this._selectedColl.getKey(item);
|
4116
|
+
var skey = this._selectedColl.getKey(item);
|
4089
4117
|
this.linkPaths('selected.' + skey, 'items.' + key);
|
4090
4118
|
}
|
4091
4119
|
} else {
|
@@ -7,13 +7,14 @@
|
|
7
7
|
* Code distributed by Google as part of the polymer project is also
|
8
8
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
9
9
|
*/
|
10
|
-
// @version 0.7.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
// @version 0.7.15
|
11
|
+
(function() {
|
12
|
+
window.WebComponents = window.WebComponents || {
|
13
|
+
flags: {}
|
14
|
+
};
|
15
15
|
var file = "webcomponents-lite.js";
|
16
16
|
var script = document.querySelector('script[src*="' + file + '"]');
|
17
|
+
var flags = {};
|
17
18
|
if (!flags.noOpts) {
|
18
19
|
location.search.slice(1).split("&").forEach(function(option) {
|
19
20
|
var parts = option.split("=");
|
@@ -29,7 +30,7 @@ window.WebComponents = window.WebComponents || {};
|
|
29
30
|
}
|
30
31
|
}
|
31
32
|
}
|
32
|
-
if (flags.log) {
|
33
|
+
if (flags.log && flags.log.split) {
|
33
34
|
var parts = flags.log.split(",");
|
34
35
|
flags.log = {};
|
35
36
|
parts.forEach(function(f) {
|
@@ -39,20 +40,14 @@ window.WebComponents = window.WebComponents || {};
|
|
39
40
|
flags.log = {};
|
40
41
|
}
|
41
42
|
}
|
42
|
-
flags.shadow = flags.shadow || flags.shadowdom || flags.polyfill;
|
43
|
-
if (flags.shadow === "native") {
|
44
|
-
flags.shadow = false;
|
45
|
-
} else {
|
46
|
-
flags.shadow = flags.shadow || !HTMLElement.prototype.createShadowRoot;
|
47
|
-
}
|
48
43
|
if (flags.register) {
|
49
44
|
window.CustomElements = window.CustomElements || {
|
50
45
|
flags: {}
|
51
46
|
};
|
52
47
|
window.CustomElements.flags.register = flags.register;
|
53
48
|
}
|
54
|
-
|
55
|
-
})(
|
49
|
+
WebComponents.flags = flags;
|
50
|
+
})();
|
56
51
|
|
57
52
|
(function(scope) {
|
58
53
|
"use strict";
|
@@ -574,7 +569,7 @@ window.WebComponents = window.WebComponents || {};
|
|
574
569
|
};
|
575
570
|
}
|
576
571
|
scope.URL = jURL;
|
577
|
-
})(
|
572
|
+
})(self);
|
578
573
|
|
579
574
|
if (typeof WeakMap === "undefined") {
|
580
575
|
(function() {
|
@@ -613,6 +608,9 @@ if (typeof WeakMap === "undefined") {
|
|
613
608
|
}
|
614
609
|
|
615
610
|
(function(global) {
|
611
|
+
if (global.JsMutationObserver) {
|
612
|
+
return;
|
613
|
+
}
|
616
614
|
var registrationsTable = new WeakMap();
|
617
615
|
var setImmediate;
|
618
616
|
if (/Trident|Edge/.test(navigator.userAgent)) {
|
@@ -908,8 +906,11 @@ if (typeof WeakMap === "undefined") {
|
|
908
906
|
}
|
909
907
|
};
|
910
908
|
global.JsMutationObserver = JsMutationObserver;
|
911
|
-
if (!global.MutationObserver)
|
912
|
-
|
909
|
+
if (!global.MutationObserver) {
|
910
|
+
global.MutationObserver = JsMutationObserver;
|
911
|
+
JsMutationObserver._isPolyfilled = true;
|
912
|
+
}
|
913
|
+
})(self);
|
913
914
|
|
914
915
|
window.HTMLImports = window.HTMLImports || {
|
915
916
|
flags: {}
|
@@ -1629,7 +1630,7 @@ window.HTMLImports.addModule(function(scope) {
|
|
1629
1630
|
if (scope.useNative) {
|
1630
1631
|
return;
|
1631
1632
|
}
|
1632
|
-
if (isIE && typeof window.CustomEvent !== "function") {
|
1633
|
+
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
1633
1634
|
window.CustomEvent = function(inType, params) {
|
1634
1635
|
params = params || {};
|
1635
1636
|
var e = document.createEvent("CustomEvent");
|
@@ -1756,8 +1757,9 @@ window.CustomElements.addModule(function(scope) {
|
|
1756
1757
|
}
|
1757
1758
|
});
|
1758
1759
|
}
|
1759
|
-
var
|
1760
|
-
scope.hasPolyfillMutations =
|
1760
|
+
var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
|
1761
|
+
scope.hasPolyfillMutations = hasThrottledAttached;
|
1762
|
+
scope.hasThrottledAttached = hasThrottledAttached;
|
1761
1763
|
var isPendingMutations = false;
|
1762
1764
|
var pendingMutations = [];
|
1763
1765
|
function deferMutation(fn) {
|
@@ -1776,7 +1778,7 @@ window.CustomElements.addModule(function(scope) {
|
|
1776
1778
|
pendingMutations = [];
|
1777
1779
|
}
|
1778
1780
|
function attached(element) {
|
1779
|
-
if (
|
1781
|
+
if (hasThrottledAttached) {
|
1780
1782
|
deferMutation(function() {
|
1781
1783
|
_attached(element);
|
1782
1784
|
});
|
@@ -1799,7 +1801,7 @@ window.CustomElements.addModule(function(scope) {
|
|
1799
1801
|
});
|
1800
1802
|
}
|
1801
1803
|
function detached(element) {
|
1802
|
-
if (
|
1804
|
+
if (hasThrottledAttached) {
|
1803
1805
|
deferMutation(function() {
|
1804
1806
|
_detached(element);
|
1805
1807
|
});
|
@@ -2260,7 +2262,7 @@ window.CustomElements.addModule(function(scope) {
|
|
2260
2262
|
});
|
2261
2263
|
});
|
2262
2264
|
}
|
2263
|
-
if (isIE && typeof window.CustomEvent !== "function") {
|
2265
|
+
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
2264
2266
|
window.CustomEvent = function(inType, params) {
|
2265
2267
|
params = params || {};
|
2266
2268
|
var e = document.createEvent("CustomEvent");
|
@@ -2368,6 +2370,37 @@ if (typeof HTMLTemplateElement === "undefined") {
|
|
2368
2370
|
})();
|
2369
2371
|
}
|
2370
2372
|
|
2373
|
+
(function(scope) {
|
2374
|
+
"use strict";
|
2375
|
+
if (!window.performance) {
|
2376
|
+
var start = Date.now();
|
2377
|
+
window.performance = {
|
2378
|
+
now: function() {
|
2379
|
+
return Date.now() - start;
|
2380
|
+
}
|
2381
|
+
};
|
2382
|
+
}
|
2383
|
+
if (!window.requestAnimationFrame) {
|
2384
|
+
window.requestAnimationFrame = function() {
|
2385
|
+
var nativeRaf = window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame;
|
2386
|
+
return nativeRaf ? function(callback) {
|
2387
|
+
return nativeRaf(function() {
|
2388
|
+
callback(performance.now());
|
2389
|
+
});
|
2390
|
+
} : function(callback) {
|
2391
|
+
return window.setTimeout(callback, 1e3 / 60);
|
2392
|
+
};
|
2393
|
+
}();
|
2394
|
+
}
|
2395
|
+
if (!window.cancelAnimationFrame) {
|
2396
|
+
window.cancelAnimationFrame = function() {
|
2397
|
+
return window.webkitCancelAnimationFrame || window.mozCancelAnimationFrame || function(id) {
|
2398
|
+
clearTimeout(id);
|
2399
|
+
};
|
2400
|
+
}();
|
2401
|
+
}
|
2402
|
+
})(window.WebComponents);
|
2403
|
+
|
2371
2404
|
(function(scope) {
|
2372
2405
|
var style = document.createElement("style");
|
2373
2406
|
style.textContent = "" + "body {" + "transition: opacity ease-in 0.2s;" + " } \n" + "body[unresolved] {" + "opacity: 0; display: block; overflow: hidden; position: relative;" + " } \n";
|
@@ -7,13 +7,14 @@
|
|
7
7
|
* Code distributed by Google as part of the polymer project is also
|
8
8
|
* subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
|
9
9
|
*/
|
10
|
-
// @version 0.7.
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
// @version 0.7.15
|
11
|
+
(function() {
|
12
|
+
window.WebComponents = window.WebComponents || {
|
13
|
+
flags: {}
|
14
|
+
};
|
15
15
|
var file = "webcomponents.js";
|
16
16
|
var script = document.querySelector('script[src*="' + file + '"]');
|
17
|
+
var flags = {};
|
17
18
|
if (!flags.noOpts) {
|
18
19
|
location.search.slice(1).split("&").forEach(function(option) {
|
19
20
|
var parts = option.split("=");
|
@@ -51,8 +52,8 @@ window.WebComponents = window.WebComponents || {};
|
|
51
52
|
};
|
52
53
|
window.CustomElements.flags.register = flags.register;
|
53
54
|
}
|
54
|
-
|
55
|
-
})(
|
55
|
+
WebComponents.flags = flags;
|
56
|
+
})();
|
56
57
|
|
57
58
|
if (WebComponents.flags.shadow) {
|
58
59
|
if (typeof WeakMap === "undefined") {
|
@@ -3159,18 +3160,29 @@ if (WebComponents.flags.shadow) {
|
|
3159
3160
|
"use strict";
|
3160
3161
|
var Element = scope.wrappers.Element;
|
3161
3162
|
var HTMLElement = scope.wrappers.HTMLElement;
|
3162
|
-
var
|
3163
|
+
var registerWrapper = scope.registerWrapper;
|
3163
3164
|
var defineWrapGetter = scope.defineWrapGetter;
|
3165
|
+
var unsafeUnwrap = scope.unsafeUnwrap;
|
3166
|
+
var wrap = scope.wrap;
|
3167
|
+
var mixin = scope.mixin;
|
3164
3168
|
var SVG_NS = "http://www.w3.org/2000/svg";
|
3169
|
+
var OriginalSVGElement = window.SVGElement;
|
3165
3170
|
var svgTitleElement = document.createElementNS(SVG_NS, "title");
|
3166
|
-
var SVGTitleElement = registerObject(svgTitleElement);
|
3167
|
-
var SVGElement = Object.getPrototypeOf(SVGTitleElement.prototype).constructor;
|
3168
3171
|
if (!("classList" in svgTitleElement)) {
|
3169
3172
|
var descr = Object.getOwnPropertyDescriptor(Element.prototype, "classList");
|
3170
3173
|
Object.defineProperty(HTMLElement.prototype, "classList", descr);
|
3171
3174
|
delete Element.prototype.classList;
|
3172
3175
|
}
|
3173
|
-
|
3176
|
+
function SVGElement(node) {
|
3177
|
+
Element.call(this, node);
|
3178
|
+
}
|
3179
|
+
SVGElement.prototype = Object.create(Element.prototype);
|
3180
|
+
mixin(SVGElement.prototype, {
|
3181
|
+
get ownerSVGElement() {
|
3182
|
+
return wrap(unsafeUnwrap(this).ownerSVGElement);
|
3183
|
+
}
|
3184
|
+
});
|
3185
|
+
registerWrapper(OriginalSVGElement, SVGElement, document.createElementNS(SVG_NS, "title"));
|
3174
3186
|
scope.wrappers.SVGElement = SVGElement;
|
3175
3187
|
})(window.ShadowDOMPolyfill);
|
3176
3188
|
(function(scope) {
|
@@ -3309,20 +3321,27 @@ if (WebComponents.flags.shadow) {
|
|
3309
3321
|
})(window.ShadowDOMPolyfill);
|
3310
3322
|
(function(scope) {
|
3311
3323
|
"use strict";
|
3324
|
+
var Node = scope.wrappers.Node;
|
3312
3325
|
var GetElementsByInterface = scope.GetElementsByInterface;
|
3313
3326
|
var NonElementParentNodeInterface = scope.NonElementParentNodeInterface;
|
3314
3327
|
var ParentNodeInterface = scope.ParentNodeInterface;
|
3315
3328
|
var SelectorsInterface = scope.SelectorsInterface;
|
3316
3329
|
var mixin = scope.mixin;
|
3317
3330
|
var registerObject = scope.registerObject;
|
3318
|
-
var
|
3331
|
+
var registerWrapper = scope.registerWrapper;
|
3332
|
+
var OriginalDocumentFragment = window.DocumentFragment;
|
3333
|
+
function DocumentFragment(node) {
|
3334
|
+
Node.call(this, node);
|
3335
|
+
}
|
3336
|
+
DocumentFragment.prototype = Object.create(Node.prototype);
|
3319
3337
|
mixin(DocumentFragment.prototype, ParentNodeInterface);
|
3320
3338
|
mixin(DocumentFragment.prototype, SelectorsInterface);
|
3321
3339
|
mixin(DocumentFragment.prototype, GetElementsByInterface);
|
3322
3340
|
mixin(DocumentFragment.prototype, NonElementParentNodeInterface);
|
3341
|
+
registerWrapper(OriginalDocumentFragment, DocumentFragment, document.createDocumentFragment());
|
3342
|
+
scope.wrappers.DocumentFragment = DocumentFragment;
|
3323
3343
|
var Comment = registerObject(document.createComment(""));
|
3324
3344
|
scope.wrappers.Comment = Comment;
|
3325
|
-
scope.wrappers.DocumentFragment = DocumentFragment;
|
3326
3345
|
})(window.ShadowDOMPolyfill);
|
3327
3346
|
(function(scope) {
|
3328
3347
|
"use strict";
|
@@ -4694,7 +4713,7 @@ if (WebComponents.flags.shadow) {
|
|
4694
4713
|
}
|
4695
4714
|
}
|
4696
4715
|
};
|
4697
|
-
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([
|
4716
|
+
var selectorRe = /([^{]*)({[\s\S]*?})/gim, cssCommentRe = /\/\*[^*]*\*+([^\/*][^*]*\*+)*\//gim, cssCommentNextSelectorRe = /\/\*\s*@polyfill ([^*]*\*+([^\/*][^*]*\*+)*\/)([^{]*?){/gim, cssContentNextSelectorRe = /polyfill-next-selector[^}]*content\:[\s]*?['"](.*?)['"][;\s]*}([^{]*?){/gim, cssCommentRuleRe = /\/\*\s@polyfill-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentRuleRe = /(polyfill-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssCommentUnscopedRuleRe = /\/\*\s@polyfill-unscoped-rule([^*]*\*+([^\/*][^*]*\*+)*)\//gim, cssContentUnscopedRuleRe = /(polyfill-unscoped-rule)[^}]*(content\:[\s]*['"](.*?)['"])[;\s]*[^}]*}/gim, cssPseudoRe = /::(x-[^\s{,(]*)/gim, cssPartRe = /::part\(([^)]*)\)/gim, polyfillHost = "-shadowcsshost", polyfillHostContext = "-shadowcsscontext", parenSuffix = ")(?:\\((" + "(?:\\([^)(]*\\)|[^)(]*)+?" + ")\\))?([^,{]*)";
|
4698
4717
|
var cssColonHostRe = new RegExp("(" + polyfillHost + parenSuffix, "gim"), cssColonHostContextRe = new RegExp("(" + polyfillHostContext + parenSuffix, "gim"), selectorReSuffix = "([>\\s~+[.,{:][\\s\\S]*)?$", colonHostRe = /\:host/gim, colonHostContextRe = /\:host-context/gim, polyfillHostNoCombinator = polyfillHost + "-no-combinator", polyfillHostRe = new RegExp(polyfillHost, "gim"), polyfillHostContextRe = new RegExp(polyfillHostContext, "gim"), shadowDOMSelectorsRe = [ />>>/g, /::shadow/g, /::content/g, /\/deep\//g, /\/shadow\//g, /\/shadow-deep\//g, /\^\^/g, /\^/g ];
|
4699
4718
|
function stylesToCssText(styles, preserveComments) {
|
4700
4719
|
var cssText = "";
|
@@ -5379,9 +5398,12 @@ if (WebComponents.flags.shadow) {
|
|
5379
5398
|
};
|
5380
5399
|
}
|
5381
5400
|
scope.URL = jURL;
|
5382
|
-
})(
|
5401
|
+
})(self);
|
5383
5402
|
|
5384
5403
|
(function(global) {
|
5404
|
+
if (global.JsMutationObserver) {
|
5405
|
+
return;
|
5406
|
+
}
|
5385
5407
|
var registrationsTable = new WeakMap();
|
5386
5408
|
var setImmediate;
|
5387
5409
|
if (/Trident|Edge/.test(navigator.userAgent)) {
|
@@ -5677,8 +5699,11 @@ if (WebComponents.flags.shadow) {
|
|
5677
5699
|
}
|
5678
5700
|
};
|
5679
5701
|
global.JsMutationObserver = JsMutationObserver;
|
5680
|
-
if (!global.MutationObserver)
|
5681
|
-
|
5702
|
+
if (!global.MutationObserver) {
|
5703
|
+
global.MutationObserver = JsMutationObserver;
|
5704
|
+
JsMutationObserver._isPolyfilled = true;
|
5705
|
+
}
|
5706
|
+
})(self);
|
5682
5707
|
|
5683
5708
|
window.HTMLImports = window.HTMLImports || {
|
5684
5709
|
flags: {}
|
@@ -6398,7 +6423,7 @@ window.HTMLImports.addModule(function(scope) {
|
|
6398
6423
|
if (scope.useNative) {
|
6399
6424
|
return;
|
6400
6425
|
}
|
6401
|
-
if (isIE && typeof window.CustomEvent !== "function") {
|
6426
|
+
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
6402
6427
|
window.CustomEvent = function(inType, params) {
|
6403
6428
|
params = params || {};
|
6404
6429
|
var e = document.createEvent("CustomEvent");
|
@@ -6525,8 +6550,9 @@ window.CustomElements.addModule(function(scope) {
|
|
6525
6550
|
}
|
6526
6551
|
});
|
6527
6552
|
}
|
6528
|
-
var
|
6529
|
-
scope.hasPolyfillMutations =
|
6553
|
+
var hasThrottledAttached = window.MutationObserver._isPolyfilled && flags["throttle-attached"];
|
6554
|
+
scope.hasPolyfillMutations = hasThrottledAttached;
|
6555
|
+
scope.hasThrottledAttached = hasThrottledAttached;
|
6530
6556
|
var isPendingMutations = false;
|
6531
6557
|
var pendingMutations = [];
|
6532
6558
|
function deferMutation(fn) {
|
@@ -6545,7 +6571,7 @@ window.CustomElements.addModule(function(scope) {
|
|
6545
6571
|
pendingMutations = [];
|
6546
6572
|
}
|
6547
6573
|
function attached(element) {
|
6548
|
-
if (
|
6574
|
+
if (hasThrottledAttached) {
|
6549
6575
|
deferMutation(function() {
|
6550
6576
|
_attached(element);
|
6551
6577
|
});
|
@@ -6568,7 +6594,7 @@ window.CustomElements.addModule(function(scope) {
|
|
6568
6594
|
});
|
6569
6595
|
}
|
6570
6596
|
function detached(element) {
|
6571
|
-
if (
|
6597
|
+
if (hasThrottledAttached) {
|
6572
6598
|
deferMutation(function() {
|
6573
6599
|
_detached(element);
|
6574
6600
|
});
|
@@ -7029,7 +7055,7 @@ window.CustomElements.addModule(function(scope) {
|
|
7029
7055
|
});
|
7030
7056
|
});
|
7031
7057
|
}
|
7032
|
-
if (isIE && typeof window.CustomEvent !== "function") {
|
7058
|
+
if (!window.CustomEvent || isIE && typeof window.CustomEvent !== "function") {
|
7033
7059
|
window.CustomEvent = function(inType, params) {
|
7034
7060
|
params = params || {};
|
7035
7061
|
var e = document.createEvent("CustomEvent");
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polymer-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Chaplinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.4.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 1.4.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rails
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|