@everymatrix/casino-slider
Advanced tools
Comparing version 0.0.55 to 0.0.56
@@ -463,14 +463,14 @@ (function (global, factory) { | ||
const child_ctx = ctx.slice(); | ||
child_ctx[14] = list[i]; | ||
child_ctx[16] = i; | ||
child_ctx[18] = list[i]; | ||
child_ctx[20] = i; | ||
return child_ctx; | ||
} | ||
// (53:8) {:else} | ||
// (61:8) {:else} | ||
function create_else_block(ctx) { | ||
let t0_value = /*item*/ ctx[14].name + ""; | ||
let t0_value = /*item*/ ctx[18].name + ""; | ||
let t0; | ||
let t1; | ||
let t2_value = (/*item*/ ctx[14].id === "FAVORITES" | ||
let t2_value = (/*item*/ ctx[18].id === "FAVORITES" | ||
? "(" + /*favoritesnumber*/ ctx[1] + ")" | ||
@@ -493,5 +493,5 @@ : "") + ""; | ||
p: function update(ctx, dirty) { | ||
if (dirty & /*sliderdata*/ 1 && t0_value !== (t0_value = /*item*/ ctx[14].name + "")) set_data_dev(t0, t0_value); | ||
if (dirty & /*sliderdata*/ 1 && t0_value !== (t0_value = /*item*/ ctx[18].name + "")) set_data_dev(t0, t0_value); | ||
if (dirty & /*sliderdata, favoritesnumber*/ 3 && t2_value !== (t2_value = (/*item*/ ctx[14].id === "FAVORITES" | ||
if (dirty & /*sliderdata, favoritesnumber*/ 3 && t2_value !== (t2_value = (/*item*/ ctx[18].id === "FAVORITES" | ||
? "(" + /*favoritesnumber*/ ctx[1] + ")" | ||
@@ -511,3 +511,3 @@ : "") + "")) set_data_dev(t2, t2_value); | ||
type: "else", | ||
source: "(53:8) {:else}", | ||
source: "(61:8) {:else}", | ||
ctx | ||
@@ -519,6 +519,6 @@ }); | ||
// (51:8) {#if location === 'headerMain'} | ||
// (59:8) {#if location === 'headerMain'} | ||
function create_if_block(ctx) { | ||
let a; | ||
let t_value = /*item*/ ctx[14].label + ""; | ||
let t_value = /*item*/ ctx[18].label + ""; | ||
let t; | ||
@@ -531,4 +531,4 @@ let a_href_value; | ||
t = text(t_value); | ||
attr_dev(a, "href", a_href_value = /*item*/ ctx[14].path); | ||
add_location(a, file, 51, 10, 1770); | ||
attr_dev(a, "href", a_href_value = /*item*/ ctx[18].path); | ||
add_location(a, file, 59, 10, 2073); | ||
}, | ||
@@ -540,5 +540,5 @@ m: function mount(target, anchor) { | ||
p: function update(ctx, dirty) { | ||
if (dirty & /*sliderdata*/ 1 && t_value !== (t_value = /*item*/ ctx[14].label + "")) set_data_dev(t, t_value); | ||
if (dirty & /*sliderdata*/ 1 && t_value !== (t_value = /*item*/ ctx[18].label + "")) set_data_dev(t, t_value); | ||
if (dirty & /*sliderdata*/ 1 && a_href_value !== (a_href_value = /*item*/ ctx[14].path)) { | ||
if (dirty & /*sliderdata*/ 1 && a_href_value !== (a_href_value = /*item*/ ctx[18].path)) { | ||
attr_dev(a, "href", a_href_value); | ||
@@ -556,3 +556,3 @@ } | ||
type: "if", | ||
source: "(51:8) {#if location === 'headerMain'}", | ||
source: "(59:8) {#if location === 'headerMain'}", | ||
ctx | ||
@@ -564,3 +564,3 @@ }); | ||
// (49:4) {#each sliderdata as item, index (item.id)} | ||
// (57:4) {#each sliderdata as item, index (item.id)} | ||
function create_each_block(key_1, ctx) { | ||
@@ -581,3 +581,3 @@ let li; | ||
function click_handler_1(...args) { | ||
return /*click_handler_1*/ ctx[10](/*item*/ ctx[14], /*index*/ ctx[16], ...args); | ||
return /*click_handler_1*/ ctx[12](/*item*/ ctx[18], /*index*/ ctx[20], ...args); | ||
} | ||
@@ -593,4 +593,4 @@ | ||
attr_dev(li, "class", "CarouselItem"); | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[16]); | ||
add_location(li, file, 49, 6, 1619); | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[20]); | ||
add_location(li, file, 57, 6, 1922); | ||
this.first = li; | ||
@@ -624,3 +624,3 @@ }, | ||
if (dirty & /*active, sliderdata*/ 17) { | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[16]); | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[20]); | ||
} | ||
@@ -640,3 +640,3 @@ }, | ||
type: "each", | ||
source: "(49:4) {#each sliderdata as item, index (item.id)}", | ||
source: "(57:4) {#each sliderdata as item, index (item.id)}", | ||
ctx | ||
@@ -666,3 +666,3 @@ }); | ||
validate_each_argument(each_value); | ||
const get_key = ctx => /*item*/ ctx[14].id; | ||
const get_key = ctx => /*item*/ ctx[18].id; | ||
validate_each_keys(ctx, each_value, get_each_context, get_key); | ||
@@ -698,3 +698,3 @@ | ||
attr_dev(path0, "d", "M15 19l-7-7 7-7"); | ||
add_location(path0, file, 43, 6, 1396); | ||
add_location(path0, file, 51, 6, 1699); | ||
attr_dev(svg0, "fill", "none"); | ||
@@ -704,7 +704,7 @@ attr_dev(svg0, "stroke", "currentColor"); | ||
attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg"); | ||
add_location(svg0, file, 42, 4, 1295); | ||
add_location(svg0, file, 50, 4, 1598); | ||
attr_dev(div0, "class", "CarouselLeftArrow"); | ||
add_location(div0, file, 41, 2, 1227); | ||
add_location(div0, file, 49, 2, 1530); | ||
attr_dev(ul, "class", "CarouselItems"); | ||
add_location(ul, file, 47, 2, 1517); | ||
add_location(ul, file, 55, 2, 1820); | ||
attr_dev(path1, "stroke-linecap", "round"); | ||
@@ -714,3 +714,3 @@ attr_dev(path1, "stroke-linejoin", "round"); | ||
attr_dev(path1, "d", "M9 5l7 7-7 7"); | ||
add_location(path1, file, 61, 6, 2126); | ||
add_location(path1, file, 69, 6, 2429); | ||
attr_dev(svg1, "fill", "none"); | ||
@@ -720,5 +720,5 @@ attr_dev(svg1, "stroke", "currentColor"); | ||
attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg"); | ||
add_location(svg1, file, 60, 4, 2025); | ||
add_location(svg1, file, 68, 4, 2328); | ||
attr_dev(div1, "class", "CarouselRightArrow"); | ||
add_location(div1, file, 59, 2, 1955); | ||
add_location(div1, file, 67, 2, 2258); | ||
@@ -729,3 +729,3 @@ attr_dev(div2, "class", div2_class_value = "CarouselContainer " + (/*location*/ ctx[2] === "headerMain" | ||
add_location(div2, file, 40, 0, 1124); | ||
add_location(div2, file, 48, 0, 1392); | ||
}, | ||
@@ -747,3 +747,3 @@ l: function claim(nodes) { | ||
/*ul_binding*/ ctx[11](ul); | ||
/*ul_binding*/ ctx[13](ul); | ||
append_dev(div2, t1); | ||
@@ -753,7 +753,8 @@ append_dev(div2, div1); | ||
append_dev(svg1, path1); | ||
/*div2_binding*/ ctx[15](div2); | ||
if (!mounted) { | ||
dispose = [ | ||
listen_dev(div0, "click", /*click_handler*/ ctx[9], false, false, false), | ||
listen_dev(div1, "click", /*click_handler_2*/ ctx[12], false, false, false) | ||
listen_dev(div0, "click", /*click_handler*/ ctx[11], false, false, false), | ||
listen_dev(div1, "click", /*click_handler_2*/ ctx[14], false, false, false) | ||
]; | ||
@@ -765,3 +766,3 @@ | ||
p: function update(ctx, [dirty]) { | ||
if (dirty & /*active, sliderdata, handleClick, location, favoritesnumber*/ 55) { | ||
if (dirty & /*active, sliderdata, handleClick, location, favoritesnumber*/ 87) { | ||
each_value = /*sliderdata*/ ctx[0]; | ||
@@ -788,3 +789,4 @@ validate_each_argument(each_value); | ||
/*ul_binding*/ ctx[11](null); | ||
/*ul_binding*/ ctx[13](null); | ||
/*div2_binding*/ ctx[15](null); | ||
mounted = false; | ||
@@ -813,4 +815,6 @@ run_all(dispose); | ||
let { location = "" } = $$props; | ||
let { clientstyling = "" } = $$props; | ||
let carousel; | ||
let active; | ||
let customStylingContainer; | ||
@@ -842,2 +846,8 @@ // Clicking on the slider item will trigger this method and send a postmessage on window | ||
const setClientStyling = () => { | ||
let sheet = document.createElement("style"); | ||
sheet.innerHTML = clientstyling; | ||
customStylingContainer.appendChild(sheet); | ||
}; | ||
onMount(() => { | ||
@@ -851,3 +861,9 @@ window.addEventListener("message", messageHandler, false); | ||
const writable_props = ["sliderdata", "onclickeventname", "favoritesnumber", "location"]; | ||
const writable_props = [ | ||
"sliderdata", | ||
"onclickeventname", | ||
"favoritesnumber", | ||
"location", | ||
"clientstyling" | ||
]; | ||
@@ -870,7 +886,15 @@ Object.keys($$props).forEach(key => { | ||
function div2_binding($$value) { | ||
binding_callbacks[$$value ? "unshift" : "push"](() => { | ||
customStylingContainer = $$value; | ||
$$invalidate(5, customStylingContainer); | ||
}); | ||
} | ||
$$self.$$set = $$props => { | ||
if ("sliderdata" in $$props) $$invalidate(0, sliderdata = $$props.sliderdata); | ||
if ("onclickeventname" in $$props) $$invalidate(8, onclickeventname = $$props.onclickeventname); | ||
if ("onclickeventname" in $$props) $$invalidate(9, onclickeventname = $$props.onclickeventname); | ||
if ("favoritesnumber" in $$props) $$invalidate(1, favoritesnumber = $$props.favoritesnumber); | ||
if ("location" in $$props) $$invalidate(2, location = $$props.location); | ||
if ("clientstyling" in $$props) $$invalidate(10, clientstyling = $$props.clientstyling); | ||
}; | ||
@@ -884,8 +908,11 @@ | ||
location, | ||
clientstyling, | ||
carousel, | ||
active, | ||
customStylingContainer, | ||
handleClick, | ||
messageHandler, | ||
scrollLeft, | ||
scrollRight | ||
scrollRight, | ||
setClientStyling | ||
}); | ||
@@ -895,10 +922,12 @@ | ||
if ("sliderdata" in $$props) $$invalidate(0, sliderdata = $$props.sliderdata); | ||
if ("onclickeventname" in $$props) $$invalidate(8, onclickeventname = $$props.onclickeventname); | ||
if ("onclickeventname" in $$props) $$invalidate(9, onclickeventname = $$props.onclickeventname); | ||
if ("favoritesnumber" in $$props) $$invalidate(1, favoritesnumber = $$props.favoritesnumber); | ||
if ("location" in $$props) $$invalidate(2, location = $$props.location); | ||
if ("clientstyling" in $$props) $$invalidate(10, clientstyling = $$props.clientstyling); | ||
if ("carousel" in $$props) $$invalidate(3, carousel = $$props.carousel); | ||
if ("active" in $$props) $$invalidate(4, active = $$props.active); | ||
if ("handleClick" in $$props) $$invalidate(5, handleClick = $$props.handleClick); | ||
if ("scrollLeft" in $$props) $$invalidate(6, scrollLeft = $$props.scrollLeft); | ||
if ("scrollRight" in $$props) $$invalidate(7, scrollRight = $$props.scrollRight); | ||
if ("customStylingContainer" in $$props) $$invalidate(5, customStylingContainer = $$props.customStylingContainer); | ||
if ("handleClick" in $$props) $$invalidate(6, handleClick = $$props.handleClick); | ||
if ("scrollLeft" in $$props) $$invalidate(7, scrollLeft = $$props.scrollLeft); | ||
if ("scrollRight" in $$props) $$invalidate(8, scrollRight = $$props.scrollRight); | ||
}; | ||
@@ -910,2 +939,8 @@ | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty & /*clientstyling*/ 1024) { | ||
clientstyling && setClientStyling(); | ||
} | ||
}; | ||
return [ | ||
@@ -917,2 +952,3 @@ sliderdata, | ||
active, | ||
customStylingContainer, | ||
handleClick, | ||
@@ -922,6 +958,8 @@ scrollLeft, | ||
onclickeventname, | ||
clientstyling, | ||
click_handler, | ||
click_handler_1, | ||
ul_binding, | ||
click_handler_2 | ||
click_handler_2, | ||
div2_binding | ||
]; | ||
@@ -947,5 +985,6 @@ } | ||
sliderdata: 0, | ||
onclickeventname: 8, | ||
onclickeventname: 9, | ||
favoritesnumber: 1, | ||
location: 2 | ||
location: 2, | ||
clientstyling: 10 | ||
} | ||
@@ -967,3 +1006,9 @@ ); | ||
static get observedAttributes() { | ||
return ["sliderdata", "onclickeventname", "favoritesnumber", "location"]; | ||
return [ | ||
"sliderdata", | ||
"onclickeventname", | ||
"favoritesnumber", | ||
"location", | ||
"clientstyling" | ||
]; | ||
} | ||
@@ -981,3 +1026,3 @@ | ||
get onclickeventname() { | ||
return this.$$.ctx[8]; | ||
return this.$$.ctx[9]; | ||
} | ||
@@ -1007,2 +1052,11 @@ | ||
} | ||
get clientstyling() { | ||
return this.$$.ctx[10]; | ||
} | ||
set clientstyling(clientstyling) { | ||
this.$set({ clientstyling }); | ||
flush(); | ||
} | ||
} | ||
@@ -1009,0 +1063,0 @@ |
{ | ||
"name": "@everymatrix/casino-slider", | ||
"version": "0.0.55", | ||
"version": "0.0.56", | ||
"main": "dist/casino-slider.js", | ||
@@ -39,3 +39,3 @@ "svelte": "src/index.ts", | ||
}, | ||
"gitHead": "e2b40db765dc440d41119ef90aeb2c0fcf597f23" | ||
"gitHead": "714714e774a03eab630f9d431084719ab20625f4" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
132390
1079