@everymatrix/casino-slider
Advanced tools
Comparing version 0.0.111 to 0.0.112
@@ -463,157 +463,14 @@ (function (global, factory) { | ||
const child_ctx = ctx.slice(); | ||
child_ctx[21] = list[i]; | ||
child_ctx[23] = i; | ||
child_ctx[20] = list[i]; | ||
child_ctx[22] = i; | ||
return child_ctx; | ||
} | ||
// (65:2) {#if !isLoadingStyle} | ||
function create_if_block(ctx) { | ||
let div2; | ||
let div0; | ||
let svg0; | ||
let path0; | ||
let t0; | ||
let ul; | ||
let each_blocks = []; | ||
let each_1_lookup = new Map(); | ||
let t1; | ||
let div1; | ||
let svg1; | ||
let path1; | ||
let div2_class_value; | ||
let mounted; | ||
let dispose; | ||
let each_value = /*sliderdata*/ ctx[0]; | ||
validate_each_argument(each_value); | ||
const get_key = ctx => /*item*/ ctx[21].id; | ||
validate_each_keys(ctx, each_value, get_each_context, get_key); | ||
for (let i = 0; i < each_value.length; i += 1) { | ||
let child_ctx = get_each_context(ctx, each_value, i); | ||
let key = get_key(child_ctx); | ||
each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx)); | ||
} | ||
const block = { | ||
c: function create() { | ||
div2 = element("div"); | ||
div0 = element("div"); | ||
svg0 = svg_element("svg"); | ||
path0 = svg_element("path"); | ||
t0 = space(); | ||
ul = element("ul"); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].c(); | ||
} | ||
t1 = space(); | ||
div1 = element("div"); | ||
svg1 = svg_element("svg"); | ||
path1 = svg_element("path"); | ||
attr_dev(path0, "stroke-linecap", "round"); | ||
attr_dev(path0, "stroke-linejoin", "round"); | ||
attr_dev(path0, "stroke-width", "2"); | ||
attr_dev(path0, "d", "M15 19l-7-7 7-7"); | ||
add_location(path0, file, 68, 8, 2286); | ||
attr_dev(svg0, "fill", "none"); | ||
attr_dev(svg0, "stroke", "currentColor"); | ||
attr_dev(svg0, "viewBox", "0 0 24 24"); | ||
attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg"); | ||
add_location(svg0, file, 67, 6, 2183); | ||
attr_dev(div0, "class", "CarouselLeftArrow"); | ||
add_location(div0, file, 66, 4, 2113); | ||
attr_dev(ul, "class", "CarouselItems"); | ||
add_location(ul, file, 72, 4, 2413); | ||
attr_dev(path1, "stroke-linecap", "round"); | ||
attr_dev(path1, "stroke-linejoin", "round"); | ||
attr_dev(path1, "stroke-width", "2"); | ||
attr_dev(path1, "d", "M9 5l7 7-7 7"); | ||
add_location(path1, file, 86, 8, 3048); | ||
attr_dev(svg1, "fill", "none"); | ||
attr_dev(svg1, "stroke", "currentColor"); | ||
attr_dev(svg1, "viewBox", "0 0 24 24"); | ||
attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg"); | ||
add_location(svg1, file, 85, 6, 2945); | ||
attr_dev(div1, "class", "CarouselRightArrow"); | ||
add_location(div1, file, 84, 4, 2873); | ||
attr_dev(div2, "class", div2_class_value = "CarouselContainer " + (/*location*/ ctx[2] === "headerMain" | ||
? "CarouselContainerHeaderMain" | ||
: "")); | ||
add_location(div2, file, 65, 2, 2008); | ||
}, | ||
m: function mount(target, anchor) { | ||
insert_dev(target, div2, anchor); | ||
append_dev(div2, div0); | ||
append_dev(div0, svg0); | ||
append_dev(svg0, path0); | ||
append_dev(div2, t0); | ||
append_dev(div2, ul); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].m(ul, null); | ||
} | ||
/*ul_binding*/ ctx[15](ul); | ||
append_dev(div2, t1); | ||
append_dev(div2, div1); | ||
append_dev(div1, svg1); | ||
append_dev(svg1, path1); | ||
if (!mounted) { | ||
dispose = [ | ||
listen_dev(div0, "click", /*click_handler*/ ctx[13], false, false, false), | ||
listen_dev(div1, "click", /*click_handler_2*/ ctx[16], false, false, false) | ||
]; | ||
mounted = true; | ||
} | ||
}, | ||
p: function update(ctx, dirty) { | ||
if (dirty & /*active, sliderdata, handleClick, location, favoritesnumber*/ 151) { | ||
each_value = /*sliderdata*/ ctx[0]; | ||
validate_each_argument(each_value); | ||
validate_each_keys(ctx, each_value, get_each_context, get_key); | ||
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, ul, destroy_block, create_each_block, null, get_each_context); | ||
} | ||
if (dirty & /*location*/ 4 && div2_class_value !== (div2_class_value = "CarouselContainer " + (/*location*/ ctx[2] === "headerMain" | ||
? "CarouselContainerHeaderMain" | ||
: ""))) { | ||
attr_dev(div2, "class", div2_class_value); | ||
} | ||
}, | ||
d: function destroy(detaching) { | ||
if (detaching) detach_dev(div2); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].d(); | ||
} | ||
/*ul_binding*/ ctx[15](null); | ||
mounted = false; | ||
run_all(dispose); | ||
} | ||
}; | ||
dispatch_dev("SvelteRegisterBlock", { | ||
block, | ||
id: create_if_block.name, | ||
type: "if", | ||
source: "(65:2) {#if !isLoadingStyle}", | ||
ctx | ||
}); | ||
return block; | ||
} | ||
// (78:10) {:else} | ||
// (75:10) {:else} | ||
function create_else_block(ctx) { | ||
let t0_value = /*item*/ ctx[21].name + ""; | ||
let t0_value = /*item*/ ctx[20].name + ""; | ||
let t0; | ||
let t1; | ||
let t2_value = (/*item*/ ctx[21].id === "FAVORITES" | ||
let t2_value = (/*item*/ ctx[20].id === "FAVORITES" | ||
? "(" + /*favoritesnumber*/ ctx[1] + ")" | ||
@@ -636,5 +493,5 @@ : "") + ""; | ||
p: function update(ctx, dirty) { | ||
if (dirty & /*sliderdata*/ 1 && t0_value !== (t0_value = /*item*/ ctx[21].name + "")) set_data_dev(t0, t0_value); | ||
if (dirty & /*sliderdata*/ 1 && t0_value !== (t0_value = /*item*/ ctx[20].name + "")) set_data_dev(t0, t0_value); | ||
if (dirty & /*sliderdata, favoritesnumber*/ 3 && t2_value !== (t2_value = (/*item*/ ctx[21].id === "FAVORITES" | ||
if (dirty & /*sliderdata, favoritesnumber*/ 3 && t2_value !== (t2_value = (/*item*/ ctx[20].id === "FAVORITES" | ||
? "(" + /*favoritesnumber*/ ctx[1] + ")" | ||
@@ -654,3 +511,3 @@ : "") + "")) set_data_dev(t2, t2_value); | ||
type: "else", | ||
source: "(78:10) {:else}", | ||
source: "(75:10) {:else}", | ||
ctx | ||
@@ -662,6 +519,6 @@ }); | ||
// (76:10) {#if location === 'headerMain'} | ||
function create_if_block_1(ctx) { | ||
// (73:10) {#if location === 'headerMain'} | ||
function create_if_block(ctx) { | ||
let a; | ||
let t_value = /*item*/ ctx[21].label + ""; | ||
let t_value = /*item*/ ctx[20].label + ""; | ||
let t; | ||
@@ -674,4 +531,4 @@ let a_href_value; | ||
t = text(t_value); | ||
attr_dev(a, "href", a_href_value = /*item*/ ctx[21].path); | ||
add_location(a, file, 76, 12, 2674); | ||
attr_dev(a, "href", a_href_value = /*item*/ ctx[20].path); | ||
add_location(a, file, 73, 12, 2571); | ||
}, | ||
@@ -683,5 +540,5 @@ m: function mount(target, anchor) { | ||
p: function update(ctx, dirty) { | ||
if (dirty & /*sliderdata*/ 1 && t_value !== (t_value = /*item*/ ctx[21].label + "")) set_data_dev(t, t_value); | ||
if (dirty & /*sliderdata*/ 1 && t_value !== (t_value = /*item*/ ctx[20].label + "")) set_data_dev(t, t_value); | ||
if (dirty & /*sliderdata*/ 1 && a_href_value !== (a_href_value = /*item*/ ctx[21].path)) { | ||
if (dirty & /*sliderdata*/ 1 && a_href_value !== (a_href_value = /*item*/ ctx[20].path)) { | ||
attr_dev(a, "href", a_href_value); | ||
@@ -697,5 +554,5 @@ } | ||
block, | ||
id: create_if_block_1.name, | ||
id: create_if_block.name, | ||
type: "if", | ||
source: "(76:10) {#if location === 'headerMain'}", | ||
source: "(73:10) {#if location === 'headerMain'}", | ||
ctx | ||
@@ -707,3 +564,3 @@ }); | ||
// (74:6) {#each sliderdata as item, index (item.id)} | ||
// (71:6) {#each sliderdata as item, index (item.id)} | ||
function create_each_block(key_1, ctx) { | ||
@@ -716,3 +573,3 @@ let li; | ||
function select_block_type(ctx, dirty) { | ||
if (/*location*/ ctx[2] === "headerMain") return create_if_block_1; | ||
if (/*location*/ ctx[2] === "headerMain") return create_if_block; | ||
return create_else_block; | ||
@@ -725,3 +582,3 @@ } | ||
function click_handler_1(...args) { | ||
return /*click_handler_1*/ ctx[14](/*item*/ ctx[21], /*index*/ ctx[23], ...args); | ||
return /*click_handler_1*/ ctx[13](/*item*/ ctx[20], /*index*/ ctx[22], ...args); | ||
} | ||
@@ -737,4 +594,4 @@ | ||
attr_dev(li, "class", "CarouselItem"); | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[23]); | ||
add_location(li, file, 74, 8, 2519); | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[22]); | ||
add_location(li, file, 71, 8, 2416); | ||
this.first = li; | ||
@@ -768,3 +625,3 @@ }, | ||
if (dirty & /*active, sliderdata*/ 17) { | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[23]); | ||
toggle_class(li, "active", /*active*/ ctx[4] == /*index*/ ctx[22]); | ||
} | ||
@@ -784,3 +641,3 @@ }, | ||
type: "each", | ||
source: "(74:6) {#each sliderdata as item, index (item.id)}", | ||
source: "(71:6) {#each sliderdata as item, index (item.id)}", | ||
ctx | ||
@@ -793,11 +650,81 @@ }); | ||
function create_fragment(ctx) { | ||
let div; | ||
let if_block = !/*isLoadingStyle*/ ctx[6] && create_if_block(ctx); | ||
let div3; | ||
let div2; | ||
let div0; | ||
let svg0; | ||
let path0; | ||
let t0; | ||
let ul; | ||
let each_blocks = []; | ||
let each_1_lookup = new Map(); | ||
let t1; | ||
let div1; | ||
let svg1; | ||
let path1; | ||
let div2_class_value; | ||
let mounted; | ||
let dispose; | ||
let each_value = /*sliderdata*/ ctx[0]; | ||
validate_each_argument(each_value); | ||
const get_key = ctx => /*item*/ ctx[20].id; | ||
validate_each_keys(ctx, each_value, get_each_context, get_key); | ||
for (let i = 0; i < each_value.length; i += 1) { | ||
let child_ctx = get_each_context(ctx, each_value, i); | ||
let key = get_key(child_ctx); | ||
each_1_lookup.set(key, each_blocks[i] = create_each_block(key, child_ctx)); | ||
} | ||
const block = { | ||
c: function create() { | ||
div = element("div"); | ||
if (if_block) if_block.c(); | ||
div3 = element("div"); | ||
div2 = element("div"); | ||
div0 = element("div"); | ||
svg0 = svg_element("svg"); | ||
path0 = svg_element("path"); | ||
t0 = space(); | ||
ul = element("ul"); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].c(); | ||
} | ||
t1 = space(); | ||
div1 = element("div"); | ||
svg1 = svg_element("svg"); | ||
path1 = svg_element("path"); | ||
this.c = noop; | ||
add_location(div, file, 63, 0, 1941); | ||
attr_dev(path0, "stroke-linecap", "round"); | ||
attr_dev(path0, "stroke-linejoin", "round"); | ||
attr_dev(path0, "stroke-width", "2"); | ||
attr_dev(path0, "d", "M15 19l-7-7 7-7"); | ||
add_location(path0, file, 65, 8, 2183); | ||
attr_dev(svg0, "fill", "none"); | ||
attr_dev(svg0, "stroke", "currentColor"); | ||
attr_dev(svg0, "viewBox", "0 0 24 24"); | ||
attr_dev(svg0, "xmlns", "http://www.w3.org/2000/svg"); | ||
add_location(svg0, file, 64, 6, 2080); | ||
attr_dev(div0, "class", "CarouselLeftArrow"); | ||
add_location(div0, file, 63, 4, 2010); | ||
attr_dev(ul, "class", "CarouselItems"); | ||
add_location(ul, file, 69, 4, 2310); | ||
attr_dev(path1, "stroke-linecap", "round"); | ||
attr_dev(path1, "stroke-linejoin", "round"); | ||
attr_dev(path1, "stroke-width", "2"); | ||
attr_dev(path1, "d", "M9 5l7 7-7 7"); | ||
add_location(path1, file, 83, 8, 2945); | ||
attr_dev(svg1, "fill", "none"); | ||
attr_dev(svg1, "stroke", "currentColor"); | ||
attr_dev(svg1, "viewBox", "0 0 24 24"); | ||
attr_dev(svg1, "xmlns", "http://www.w3.org/2000/svg"); | ||
add_location(svg1, file, 82, 6, 2842); | ||
attr_dev(div1, "class", "CarouselRightArrow"); | ||
add_location(div1, file, 81, 4, 2770); | ||
attr_dev(div2, "class", div2_class_value = "CarouselContainer " + (/*location*/ ctx[2] === "headerMain" | ||
? "CarouselContainerHeaderMain" | ||
: "")); | ||
add_location(div2, file, 62, 2, 1905); | ||
add_location(div3, file, 61, 0, 1862); | ||
}, | ||
@@ -808,19 +735,43 @@ l: function claim(nodes) { | ||
m: function mount(target, anchor) { | ||
insert_dev(target, div, anchor); | ||
if (if_block) if_block.m(div, null); | ||
/*div_binding*/ ctx[17](div); | ||
insert_dev(target, div3, anchor); | ||
append_dev(div3, div2); | ||
append_dev(div2, div0); | ||
append_dev(div0, svg0); | ||
append_dev(svg0, path0); | ||
append_dev(div2, t0); | ||
append_dev(div2, ul); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].m(ul, null); | ||
} | ||
/*ul_binding*/ ctx[14](ul); | ||
append_dev(div2, t1); | ||
append_dev(div2, div1); | ||
append_dev(div1, svg1); | ||
append_dev(svg1, path1); | ||
/*div3_binding*/ ctx[16](div3); | ||
if (!mounted) { | ||
dispose = [ | ||
listen_dev(div0, "click", /*click_handler*/ ctx[12], false, false, false), | ||
listen_dev(div1, "click", /*click_handler_2*/ ctx[15], false, false, false) | ||
]; | ||
mounted = true; | ||
} | ||
}, | ||
p: function update(ctx, [dirty]) { | ||
if (!/*isLoadingStyle*/ ctx[6]) { | ||
if (if_block) { | ||
if_block.p(ctx, dirty); | ||
} else { | ||
if_block = create_if_block(ctx); | ||
if_block.c(); | ||
if_block.m(div, null); | ||
} | ||
} else if (if_block) { | ||
if_block.d(1); | ||
if_block = null; | ||
if (dirty & /*active, sliderdata, handleClick, location, favoritesnumber*/ 87) { | ||
each_value = /*sliderdata*/ ctx[0]; | ||
validate_each_argument(each_value); | ||
validate_each_keys(ctx, each_value, get_each_context, get_key); | ||
each_blocks = update_keyed_each(each_blocks, dirty, get_key, 1, ctx, each_value, each_1_lookup, ul, destroy_block, create_each_block, null, get_each_context); | ||
} | ||
if (dirty & /*location*/ 4 && div2_class_value !== (div2_class_value = "CarouselContainer " + (/*location*/ ctx[2] === "headerMain" | ||
? "CarouselContainerHeaderMain" | ||
: ""))) { | ||
attr_dev(div2, "class", div2_class_value); | ||
} | ||
}, | ||
@@ -830,5 +781,12 @@ i: noop, | ||
d: function destroy(detaching) { | ||
if (detaching) detach_dev(div); | ||
if (if_block) if_block.d(); | ||
/*div_binding*/ ctx[17](null); | ||
if (detaching) detach_dev(div3); | ||
for (let i = 0; i < each_blocks.length; i += 1) { | ||
each_blocks[i].d(); | ||
} | ||
/*ul_binding*/ ctx[14](null); | ||
/*div3_binding*/ ctx[16](null); | ||
mounted = false; | ||
run_all(dispose); | ||
} | ||
@@ -897,3 +855,2 @@ }; | ||
let cssFile = document.createElement("style"); | ||
$$invalidate(6, isLoadingStyle = true); | ||
@@ -907,3 +864,2 @@ if (clientstylingurl) { | ||
customStylingContainer.appendChild(cssFile); | ||
$$invalidate(6, isLoadingStyle = false); | ||
}, | ||
@@ -916,4 +872,2 @@ 1 | ||
let isLoadingStyle = false; | ||
onMount(() => { | ||
@@ -952,3 +906,3 @@ window.addEventListener("message", messageHandler, false); | ||
function div_binding($$value) { | ||
function div3_binding($$value) { | ||
binding_callbacks[$$value ? "unshift" : "push"](() => { | ||
@@ -962,7 +916,7 @@ customStylingContainer = $$value; | ||
if ("sliderdata" in $$props) $$invalidate(0, sliderdata = $$props.sliderdata); | ||
if ("onclickeventname" in $$props) $$invalidate(10, 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(11, clientstyling = $$props.clientstyling); | ||
if ("clientstylingurl" in $$props) $$invalidate(12, clientstylingurl = $$props.clientstylingurl); | ||
if ("clientstyling" in $$props) $$invalidate(10, clientstyling = $$props.clientstyling); | ||
if ("clientstylingurl" in $$props) $$invalidate(11, clientstylingurl = $$props.clientstylingurl); | ||
}; | ||
@@ -986,4 +940,3 @@ | ||
setClientStyling, | ||
setClientStylingURL, | ||
isLoadingStyle | ||
setClientStylingURL | ||
}); | ||
@@ -993,14 +946,13 @@ | ||
if ("sliderdata" in $$props) $$invalidate(0, sliderdata = $$props.sliderdata); | ||
if ("onclickeventname" in $$props) $$invalidate(10, 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(11, clientstyling = $$props.clientstyling); | ||
if ("clientstylingurl" in $$props) $$invalidate(12, clientstylingurl = $$props.clientstylingurl); | ||
if ("clientstyling" in $$props) $$invalidate(10, clientstyling = $$props.clientstyling); | ||
if ("clientstylingurl" in $$props) $$invalidate(11, clientstylingurl = $$props.clientstylingurl); | ||
if ("carousel" in $$props) $$invalidate(3, carousel = $$props.carousel); | ||
if ("active" in $$props) $$invalidate(4, active = $$props.active); | ||
if ("customStylingContainer" in $$props) $$invalidate(5, customStylingContainer = $$props.customStylingContainer); | ||
if ("handleClick" in $$props) $$invalidate(7, handleClick = $$props.handleClick); | ||
if ("scrollLeft" in $$props) $$invalidate(8, scrollLeft = $$props.scrollLeft); | ||
if ("scrollRight" in $$props) $$invalidate(9, scrollRight = $$props.scrollRight); | ||
if ("isLoadingStyle" in $$props) $$invalidate(6, isLoadingStyle = $$props.isLoadingStyle); | ||
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); | ||
}; | ||
@@ -1013,7 +965,7 @@ | ||
$$self.$$.update = () => { | ||
if ($$self.$$.dirty & /*clientstyling*/ 2048) { | ||
if ($$self.$$.dirty & /*clientstyling*/ 1024) { | ||
clientstyling && setClientStyling(); | ||
} | ||
if ($$self.$$.dirty & /*clientstylingurl*/ 4096) { | ||
if ($$self.$$.dirty & /*clientstylingurl*/ 2048) { | ||
clientstylingurl && setClientStylingURL(); | ||
@@ -1030,3 +982,2 @@ } | ||
customStylingContainer, | ||
isLoadingStyle, | ||
handleClick, | ||
@@ -1042,3 +993,3 @@ scrollLeft, | ||
click_handler_2, | ||
div_binding | ||
div3_binding | ||
]; | ||
@@ -1064,7 +1015,7 @@ } | ||
sliderdata: 0, | ||
onclickeventname: 10, | ||
onclickeventname: 9, | ||
favoritesnumber: 1, | ||
location: 2, | ||
clientstyling: 11, | ||
clientstylingurl: 12 | ||
clientstyling: 10, | ||
clientstylingurl: 11 | ||
} | ||
@@ -1106,3 +1057,3 @@ ); | ||
get onclickeventname() { | ||
return this.$$.ctx[10]; | ||
return this.$$.ctx[9]; | ||
} | ||
@@ -1134,3 +1085,3 @@ | ||
get clientstyling() { | ||
return this.$$.ctx[11]; | ||
return this.$$.ctx[10]; | ||
} | ||
@@ -1144,3 +1095,3 @@ | ||
get clientstylingurl() { | ||
return this.$$.ctx[12]; | ||
return this.$$.ctx[11]; | ||
} | ||
@@ -1147,0 +1098,0 @@ |
{ | ||
"name": "@everymatrix/casino-slider", | ||
"version": "0.0.111", | ||
"version": "0.0.112", | ||
"main": "dist/casino-slider.js", | ||
@@ -39,3 +39,3 @@ "svelte": "src/index.ts", | ||
}, | ||
"gitHead": "91fd0475dad30921eec5bb6dfa7a1fb646e6a4a2" | ||
"gitHead": "be7c0af4bbdd0f4dfa855e61b4a165a9cd1542d2" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
135085
1118