lookbook 1.5.1 → 1.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/app/controllers/lookbook/previews_controller.rb +22 -4
- data/app/views/lookbook/preview.html.erb +1 -1
- data/lib/lookbook/entities/preview_example.rb +4 -0
- data/lib/lookbook/entities/preview_group.rb +4 -0
- data/lib/lookbook/version.rb +1 -1
- data/public/lookbook-assets/js/embed.js +32 -31
- data/public/lookbook-assets/js/embed.js.map +1 -1
- data/public/lookbook-assets/js/lookbook.js +83 -82
- data/public/lookbook-assets/js/lookbook.js.map +1 -1
- metadata +3 -3
@@ -7820,7 +7820,7 @@ function $5439cede634b2921$var$toCamel(s) {
|
|
7820
7820
|
}
|
7821
7821
|
|
7822
7822
|
|
7823
|
-
var $
|
7823
|
+
var $bdd4e72e556e17ae$exports = {};
|
7824
7824
|
var $cbd28b10fa9798c7$exports = {};
|
7825
7825
|
|
7826
7826
|
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
|
@@ -11490,11 +11490,11 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11490
11490
|
var x;
|
11491
11491
|
// Remove vendor prefixing if prefixed and break early if not
|
11492
11492
|
for(x = 0; x < vendors.length && !requestAnimationFrame; x += 1)requestAnimationFrame = window[vendors[x] + "RequestAnimationFrame"];
|
11493
|
-
if (
|
11494
|
-
else // Firefox extension content-scripts have a globalThis object that is not the same as window.
|
11493
|
+
if (requestAnimationFrame) // Firefox extension content-scripts have a globalThis object that is not the same as window.
|
11495
11494
|
// Binding `requestAnimationFrame` to window allows the function to work and prevents errors
|
11496
11495
|
// being thrown when run in that context, and should be a no-op in every other context.
|
11497
11496
|
requestAnimationFrame = requestAnimationFrame.bind(window);
|
11497
|
+
else log("setup", "RequestAnimationFrame not supported");
|
11498
11498
|
}
|
11499
11499
|
function getMyID(iframeId) {
|
11500
11500
|
var retStr = "Host page: " + iframeId;
|
@@ -11532,7 +11532,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11532
11532
|
syncResize(resize, messageData, "init");
|
11533
11533
|
}
|
11534
11534
|
function processMsg() {
|
11535
|
-
var data = msg.
|
11535
|
+
var data = msg.slice(msgIdLen).split(":");
|
11536
11536
|
var height = data[1] ? parseInt(data[1], 10) : 0;
|
11537
11537
|
var iframe = settings[data[0]] && settings[data[0]].iframe;
|
11538
11538
|
var compStyle = getComputedStyle(iframe);
|
@@ -11592,12 +11592,12 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11592
11592
|
return true;
|
11593
11593
|
}
|
11594
11594
|
function isMessageForUs() {
|
11595
|
-
return msgId === ("" + msg).
|
11595
|
+
return msgId === ("" + msg).slice(0, msgIdLen) && msg.slice(msgIdLen).split(":")[0] in settings // ''+Protects against non-string msg
|
11596
11596
|
;
|
11597
11597
|
}
|
11598
11598
|
function isMessageFromMetaParent() {
|
11599
11599
|
// Test if this message is from a parent above us. This is an ugly test, however, updating
|
11600
|
-
// the message format would break backwards
|
11600
|
+
// the message format would break backwards compatibility.
|
11601
11601
|
var retCode = messageData.type in {
|
11602
11602
|
true: 1,
|
11603
11603
|
false: 1,
|
@@ -11607,7 +11607,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11607
11607
|
return retCode;
|
11608
11608
|
}
|
11609
11609
|
function getMsgBody(offset) {
|
11610
|
-
return msg.
|
11610
|
+
return msg.slice(msg.indexOf(":") + msgHeaderLen + offset);
|
11611
11611
|
}
|
11612
11612
|
function forwardMsgFromIFrame(msgBody) {
|
11613
11613
|
log(iframeId, "onMessage passed: {iframe: " + messageData.iframe.id + ", message: " + msgBody + "}");
|
@@ -11709,12 +11709,12 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11709
11709
|
y: 0
|
11710
11710
|
}, newPosition = calcOffset();
|
11711
11711
|
log(iframeId, "Reposition requested from iFrame (offset x:" + offset.x + " y:" + offset.y + ")");
|
11712
|
-
if (window.top
|
11713
|
-
else
|
11712
|
+
if (window.top === window.self) reposition();
|
11713
|
+
else scrollParent();
|
11714
11714
|
}
|
11715
11715
|
function scrollTo() {
|
11716
|
-
if (false
|
11717
|
-
else
|
11716
|
+
if (false === on("onScroll", pagePosition)) unsetPagePosition();
|
11717
|
+
else setPagePosition(iframeId);
|
11718
11718
|
}
|
11719
11719
|
function findTarget(location) {
|
11720
11720
|
function jumpToTarget() {
|
@@ -11733,8 +11733,8 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11733
11733
|
}
|
11734
11734
|
var hash = location.split("#")[1] || "", hashData = decodeURIComponent(hash), target = document.getElementById(hashData) || document.getElementsByName(hashData)[0];
|
11735
11735
|
if (target) jumpToTarget();
|
11736
|
-
else if (window.top
|
11737
|
-
else
|
11736
|
+
else if (window.top === window.self) log(iframeId, "In page link #" + hash + " not found");
|
11737
|
+
else jumpToParent();
|
11738
11738
|
}
|
11739
11739
|
function onMouse(event) {
|
11740
11740
|
var mousePos = {};
|
@@ -11864,8 +11864,8 @@ var $ef5e88eaa61efd95$exports = {};
|
|
11864
11864
|
function getPagePosition(iframeId) {
|
11865
11865
|
if (null === pagePosition) {
|
11866
11866
|
pagePosition = {
|
11867
|
-
x: window.pageXOffset
|
11868
|
-
y: window.pageYOffset
|
11867
|
+
x: window.pageXOffset === undefined ? document.documentElement.scrollLeft : window.pageXOffset,
|
11868
|
+
y: window.pageYOffset === undefined ? document.documentElement.scrollTop : window.pageYOffset
|
11869
11869
|
};
|
11870
11870
|
log(iframeId, "Get page position: " + pagePosition.x + "," + pagePosition.y);
|
11871
11871
|
}
|
@@ -12110,14 +12110,15 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12110
12110
|
return iframeId in settings && "iFrameResizer" in iframe;
|
12111
12111
|
}
|
12112
12112
|
var iframeId = ensureHasId(iframe.id);
|
12113
|
-
if (
|
12113
|
+
if (beenHere()) warn(iframeId, "Ignored iFrame, already setup.");
|
12114
|
+
else {
|
12114
12115
|
processOptions(options);
|
12115
12116
|
setScrolling();
|
12116
12117
|
setLimits();
|
12117
12118
|
setupBodyMarginValues();
|
12118
12119
|
init(createOutgoingMsg(iframeId));
|
12119
12120
|
setupIFrameObject();
|
12120
|
-
}
|
12121
|
+
}
|
12121
12122
|
}
|
12122
12123
|
function debouce(fn, time) {
|
12123
12124
|
if (null === timer) timer = setTimeout(function() {
|
@@ -12176,10 +12177,10 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12176
12177
|
// Not testable in PhantomJS
|
12177
12178
|
/* istanbul ignore next */ function tabVisible() {
|
12178
12179
|
function resize() {
|
12179
|
-
sendTriggerMsg("Tab
|
12180
|
+
sendTriggerMsg("Tab Visible", "resize");
|
12180
12181
|
}
|
12181
12182
|
if ("hidden" !== document.visibilityState) {
|
12182
|
-
log("document", "Trigger event:
|
12183
|
+
log("document", "Trigger event: Visibility change");
|
12183
12184
|
debouce(resize, 16);
|
12184
12185
|
}
|
12185
12186
|
}
|
@@ -12244,7 +12245,7 @@ var $ef5e88eaa61efd95$exports = {};
|
|
12244
12245
|
return this.filter("iframe").each(init).end();
|
12245
12246
|
};
|
12246
12247
|
}
|
12247
|
-
if (window.jQuery) createJQueryPublicMethod(window.jQuery);
|
12248
|
+
if (window.jQuery !== undefined) createJQueryPublicMethod(window.jQuery);
|
12248
12249
|
if (typeof define === "function" && define.amd) define([], factory);
|
12249
12250
|
else if (typeof $ef5e88eaa61efd95$exports === "object") // Node for browserfy
|
12250
12251
|
$ef5e88eaa61efd95$exports = factory();
|
@@ -12283,6 +12284,31 @@ function $e1f51f020443edd4$export$2e2bcd8739ae039(id, embedStore) {
|
|
12283
12284
|
}
|
12284
12285
|
|
12285
12286
|
|
12287
|
+
var $e9904a14dabf652d$exports = {};
|
12288
|
+
|
12289
|
+
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
12290
|
+
|
12291
|
+
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
12292
|
+
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
12293
|
+
return {
|
12294
|
+
focussed: false,
|
12295
|
+
get active () {
|
12296
|
+
return store.active;
|
12297
|
+
},
|
12298
|
+
get text () {
|
12299
|
+
return store.text;
|
12300
|
+
},
|
12301
|
+
clear () {
|
12302
|
+
if (store.raw === "") this.$refs.input.blur();
|
12303
|
+
else store.raw = "";
|
12304
|
+
},
|
12305
|
+
focus () {
|
12306
|
+
this.$refs.input.focus();
|
12307
|
+
}
|
12308
|
+
};
|
12309
|
+
}
|
12310
|
+
|
12311
|
+
|
12286
12312
|
var $e398acaded942bbe$exports = {};
|
12287
12313
|
|
12288
12314
|
$parcel$defineInteropFlag($e398acaded942bbe$exports);
|
@@ -12316,43 +12342,6 @@ function $e398acaded942bbe$export$2e2bcd8739ae039(targetSelector) {
|
|
12316
12342
|
}
|
12317
12343
|
|
12318
12344
|
|
12319
|
-
var $e9904a14dabf652d$exports = {};
|
12320
|
-
|
12321
|
-
$parcel$defineInteropFlag($e9904a14dabf652d$exports);
|
12322
|
-
|
12323
|
-
$parcel$export($e9904a14dabf652d$exports, "default", () => $e9904a14dabf652d$export$2e2bcd8739ae039);
|
12324
|
-
function $e9904a14dabf652d$export$2e2bcd8739ae039(store) {
|
12325
|
-
return {
|
12326
|
-
focussed: false,
|
12327
|
-
get active () {
|
12328
|
-
return store.active;
|
12329
|
-
},
|
12330
|
-
get text () {
|
12331
|
-
return store.text;
|
12332
|
-
},
|
12333
|
-
clear () {
|
12334
|
-
if (store.raw === "") this.$refs.input.blur();
|
12335
|
-
else store.raw = "";
|
12336
|
-
},
|
12337
|
-
focus () {
|
12338
|
-
this.$refs.input.focus();
|
12339
|
-
}
|
12340
|
-
};
|
12341
|
-
}
|
12342
|
-
|
12343
|
-
|
12344
|
-
var $36506012e0c6e9e3$exports = {};
|
12345
|
-
|
12346
|
-
$parcel$defineInteropFlag($36506012e0c6e9e3$exports);
|
12347
|
-
|
12348
|
-
$parcel$export($36506012e0c6e9e3$exports, "default", () => $36506012e0c6e9e3$export$2e2bcd8739ae039);
|
12349
|
-
function $36506012e0c6e9e3$export$2e2bcd8739ae039(iconName) {
|
12350
|
-
return {
|
12351
|
-
iconName: iconName
|
12352
|
-
};
|
12353
|
-
}
|
12354
|
-
|
12355
|
-
|
12356
12345
|
var $d92d9d5253f84566$exports = {};
|
12357
12346
|
|
12358
12347
|
$parcel$defineInteropFlag($d92d9d5253f84566$exports);
|
@@ -12397,29 +12386,14 @@ function $d92d9d5253f84566$export$2e2bcd8739ae039(store) {
|
|
12397
12386
|
}
|
12398
12387
|
|
12399
12388
|
|
12400
|
-
var $
|
12389
|
+
var $36506012e0c6e9e3$exports = {};
|
12401
12390
|
|
12402
|
-
$parcel$defineInteropFlag($
|
12391
|
+
$parcel$defineInteropFlag($36506012e0c6e9e3$exports);
|
12403
12392
|
|
12404
|
-
$parcel$export($
|
12405
|
-
function $
|
12393
|
+
$parcel$export($36506012e0c6e9e3$exports, "default", () => $36506012e0c6e9e3$export$2e2bcd8739ae039);
|
12394
|
+
function $36506012e0c6e9e3$export$2e2bcd8739ae039(iconName) {
|
12406
12395
|
return {
|
12407
|
-
|
12408
|
-
return store || this;
|
12409
|
-
},
|
12410
|
-
get id () {
|
12411
|
-
return this.$root.id;
|
12412
|
-
},
|
12413
|
-
get panels () {
|
12414
|
-
return Array.from(this.$refs.panels.children);
|
12415
|
-
},
|
12416
|
-
isActive (el) {
|
12417
|
-
return this.store.activeTab === this._getRef(el);
|
12418
|
-
},
|
12419
|
-
// protected
|
12420
|
-
_getRef (el) {
|
12421
|
-
return el.getAttribute("x-ref");
|
12422
|
-
}
|
12396
|
+
iconName: iconName
|
12423
12397
|
};
|
12424
12398
|
}
|
12425
12399
|
|
@@ -13067,6 +13041,33 @@ function $0db07828cadc68e0$export$2e2bcd8739ae039(store) {
|
|
13067
13041
|
}
|
13068
13042
|
|
13069
13043
|
|
13044
|
+
var $a87dacf5139b5e2f$exports = {};
|
13045
|
+
|
13046
|
+
$parcel$defineInteropFlag($a87dacf5139b5e2f$exports);
|
13047
|
+
|
13048
|
+
$parcel$export($a87dacf5139b5e2f$exports, "default", () => $a87dacf5139b5e2f$export$2e2bcd8739ae039);
|
13049
|
+
function $a87dacf5139b5e2f$export$2e2bcd8739ae039(store) {
|
13050
|
+
return {
|
13051
|
+
get store () {
|
13052
|
+
return store || this;
|
13053
|
+
},
|
13054
|
+
get id () {
|
13055
|
+
return this.$root.id;
|
13056
|
+
},
|
13057
|
+
get panels () {
|
13058
|
+
return Array.from(this.$refs.panels.children);
|
13059
|
+
},
|
13060
|
+
isActive (el) {
|
13061
|
+
return this.store.activeTab === this._getRef(el);
|
13062
|
+
},
|
13063
|
+
// protected
|
13064
|
+
_getRef (el) {
|
13065
|
+
return el.getAttribute("x-ref");
|
13066
|
+
}
|
13067
|
+
};
|
13068
|
+
}
|
13069
|
+
|
13070
|
+
|
13070
13071
|
var $6d64716f0b34fdf4$exports = {};
|
13071
13072
|
|
13072
13073
|
$parcel$defineInteropFlag($6d64716f0b34fdf4$exports);
|
@@ -13194,18 +13195,18 @@ function $6d64716f0b34fdf4$export$2e2bcd8739ae039(store) {
|
|
13194
13195
|
}
|
13195
13196
|
|
13196
13197
|
|
13197
|
-
$
|
13198
|
+
$bdd4e72e556e17ae$exports = {
|
13198
13199
|
"button": $cbd28b10fa9798c7$exports,
|
13199
13200
|
"code": $99486586f6691564$exports,
|
13200
13201
|
"copy_button": $47a1c62621be0c54$exports,
|
13201
13202
|
"embed": $e1f51f020443edd4$exports,
|
13202
|
-
"dimensions_display": $e398acaded942bbe$exports,
|
13203
13203
|
"filter": $e9904a14dabf652d$exports,
|
13204
|
-
"
|
13204
|
+
"dimensions_display": $e398acaded942bbe$exports,
|
13205
13205
|
"nav": $d92d9d5253f84566$exports,
|
13206
|
-
"
|
13206
|
+
"icon": $36506012e0c6e9e3$exports,
|
13207
13207
|
"split_layout": $506dabb2bf255b38$exports,
|
13208
13208
|
"tabs": $0db07828cadc68e0$exports,
|
13209
|
+
"tab_panels": $a87dacf5139b5e2f$exports,
|
13209
13210
|
"viewport": $6d64716f0b34fdf4$exports
|
13210
13211
|
};
|
13211
13212
|
|
@@ -13495,7 +13496,7 @@ const $d73574cc5e9b9e72$var$prefix = window.APP_NAME;
|
|
13495
13496
|
// Components
|
13496
13497
|
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $d709d0f4027033b2$export$2e2bcd8739ae039));
|
13497
13498
|
[
|
13498
|
-
$
|
13499
|
+
$bdd4e72e556e17ae$exports,
|
13499
13500
|
$fe98e3f2bf49b28f$exports,
|
13500
13501
|
$6c10158820e535ef$exports
|
13501
13502
|
].forEach((scripts)=>{
|