@everymatrix/casino-betslip-indicator 0.0.309 → 0.0.312

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.
@@ -5972,9 +5972,9 @@
5972
5972
  /* src/CasinoBetslipIndicator.svelte generated by Svelte v3.48.0 */
5973
5973
  const file = "src/CasinoBetslipIndicator.svelte";
5974
5974
 
5975
- // (41:0) {#if mobileView && betNumber > 0}
5975
+ // (46:0) {#if mobileView && betNumber > 0}
5976
5976
  function create_if_block(ctx) {
5977
- let div;
5977
+ let button;
5978
5978
  let small;
5979
5979
  let t;
5980
5980
  let svg;
@@ -5997,7 +5997,7 @@
5997
5997
 
5998
5998
  const block = {
5999
5999
  c: function create() {
6000
- div = element("div");
6000
+ button = element("button");
6001
6001
  small = element("small");
6002
6002
  if_block.c();
6003
6003
  t = space();
@@ -6009,18 +6009,18 @@
6009
6009
  path3 = svg_element("path");
6010
6010
  path4 = svg_element("path");
6011
6011
  attr_dev(small, "class", "betslipIndicator__number");
6012
- add_location(small, file, 42, 4, 1121);
6012
+ add_location(small, file, 47, 4, 1366);
6013
6013
  attr_dev(path0, "d", "M45,95c0,1.1,0.9,2,2,2h11c3.3,0,6-2.7,6-6V9c0-3.3-2.7-6-6-6H47c-1.1,0-2,0.9-2,2c0,7.2-5.8,13-13,13S19,12.2,19,5\n c0-1.1-0.9-2-2-2H6C2.7,3,0,5.7,0,9v82c0,3.3,2.7,6,6,6h11c1.1,0,2-0.9,2-2c0-7.2,5.8-13,13-13S45,87.8,45,95z M32,78\n c-8.6,0-15.9,6.4-16.9,15H6c-1.1,0-2-0.9-2-2V9c0-1.1,0.9-2,2-2h9.1c1.2,9.3,9.7,15.9,19,14.8c7.7-1,13.8-7,14.8-14.8H58\n c1.1,0,2,0.9,2,2v82c0,1.1-0.9,2-2,2h-9.1C47.9,84.4,40.6,78,32,78z");
6014
- add_location(path0, file, 52, 8, 1548);
6014
+ add_location(path0, file, 57, 8, 1793);
6015
6015
  attr_dev(path1, "d", "M50.9,29.5H13.1c-0.8,0-1.5,0.9-1.5,2c0,1.1,0.7,2,1.5,2h37.8c0.8,0,1.5-0.9,1.5-2C52.4,30.4,51.7,29.5,50.9,29.5z");
6016
- add_location(path1, file, 56, 8, 2007);
6016
+ add_location(path1, file, 61, 8, 2252);
6017
6017
  attr_dev(path2, "d", "M50.9,41.5H13.1c-0.8,0-1.5,0.9-1.5,2s0.7,2,1.5,2h37.8c0.8,0,1.5-0.9,1.5-2S51.7,41.5,50.9,41.5z");
6018
- add_location(path2, file, 57, 8, 2138);
6018
+ add_location(path2, file, 62, 8, 2383);
6019
6019
  attr_dev(path3, "d", "M50.9,53.5H13.1c-0.8,0-1.5,0.9-1.5,2s0.7,2,1.5,2h37.8c0.8,0,1.5-0.9,1.5-2S51.7,53.5,50.9,53.5z");
6020
- add_location(path3, file, 58, 8, 2253);
6020
+ add_location(path3, file, 63, 8, 2498);
6021
6021
  attr_dev(path4, "d", "M50.9,66.5H13.1c-0.8,0-1.5,0.9-1.5,2s0.7,2,1.5,2h37.8c0.8,0,1.5-0.9,1.5-2S51.7,66.5,50.9,66.5z");
6022
- add_location(path4, file, 59, 8, 2368);
6023
- add_location(g, file, 51, 6, 1536);
6022
+ add_location(path4, file, 64, 8, 2613);
6023
+ add_location(g, file, 56, 6, 1781);
6024
6024
  attr_dev(svg, "version", "1.1");
6025
6025
  attr_dev(svg, "id", "Layer_1");
6026
6026
  attr_dev(svg, "class", "betslipIndicator__icon");
@@ -6031,16 +6031,16 @@
6031
6031
  attr_dev(svg, "viewBox", "0 0 64 100");
6032
6032
  set_style(svg, "enable-background", "new 0 0 64 100");
6033
6033
  attr_dev(svg, "xml:space", "preserve");
6034
- add_location(svg, file, 49, 4, 1282);
6035
- attr_dev(div, "class", "betslipIndicator");
6036
- add_location(div, file, 41, 2, 1055);
6034
+ add_location(svg, file, 54, 4, 1527);
6035
+ attr_dev(button, "class", "betslipIndicator");
6036
+ add_location(button, file, 46, 2, 1274);
6037
6037
  },
6038
6038
  m: function mount(target, anchor) {
6039
- insert_dev(target, div, anchor);
6040
- append_dev(div, small);
6039
+ insert_dev(target, button, anchor);
6040
+ append_dev(button, small);
6041
6041
  if_block.m(small, null);
6042
- append_dev(div, t);
6043
- append_dev(div, svg);
6042
+ append_dev(button, t);
6043
+ append_dev(button, svg);
6044
6044
  append_dev(svg, g);
6045
6045
  append_dev(g, path0);
6046
6046
  append_dev(g, path1);
@@ -6049,7 +6049,7 @@
6049
6049
  append_dev(g, path4);
6050
6050
 
6051
6051
  if (!mounted) {
6052
- dispose = listen_dev(div, "click", /*click_handler*/ ctx[4], false, false, false);
6052
+ dispose = listen_dev(button, "click", /*click_handler*/ ctx[4], false, false, false);
6053
6053
  mounted = true;
6054
6054
  }
6055
6055
  },
@@ -6067,7 +6067,7 @@
6067
6067
  }
6068
6068
  },
6069
6069
  d: function destroy(detaching) {
6070
- if (detaching) detach_dev(div);
6070
+ if (detaching) detach_dev(button);
6071
6071
  if_block.d();
6072
6072
  mounted = false;
6073
6073
  dispose();
@@ -6078,14 +6078,14 @@
6078
6078
  block,
6079
6079
  id: create_if_block.name,
6080
6080
  type: "if",
6081
- source: "(41:0) {#if mobileView && betNumber > 0}",
6081
+ source: "(46:0) {#if mobileView && betNumber > 0}",
6082
6082
  ctx
6083
6083
  });
6084
6084
 
6085
6085
  return block;
6086
6086
  }
6087
6087
 
6088
- // (46:4) {:else}
6088
+ // (51:4) {:else}
6089
6089
  function create_else_block(ctx) {
6090
6090
  let t;
6091
6091
 
@@ -6108,14 +6108,14 @@
6108
6108
  block,
6109
6109
  id: create_else_block.name,
6110
6110
  type: "else",
6111
- source: "(46:4) {:else}",
6111
+ source: "(51:4) {:else}",
6112
6112
  ctx
6113
6113
  });
6114
6114
 
6115
6115
  return block;
6116
6116
  }
6117
6117
 
6118
- // (44:4) {#if isLoading}
6118
+ // (49:4) {#if isLoading}
6119
6119
  function create_if_block_1(ctx) {
6120
6120
  let div;
6121
6121
 
@@ -6124,7 +6124,7 @@
6124
6124
  div = element("div");
6125
6125
  div.textContent = "Loading...";
6126
6126
  attr_dev(div, "class", "loader");
6127
- add_location(div, file, 44, 6, 1188);
6127
+ add_location(div, file, 49, 6, 1433);
6128
6128
  },
6129
6129
  m: function mount(target, anchor) {
6130
6130
  insert_dev(target, div, anchor);
@@ -6139,7 +6139,7 @@
6139
6139
  block,
6140
6140
  id: create_if_block_1.name,
6141
6141
  type: "if",
6142
- source: "(44:4) {#if isLoading}",
6142
+ source: "(49:4) {#if isLoading}",
6143
6143
  ctx
6144
6144
  });
6145
6145
 
@@ -6203,13 +6203,20 @@
6203
6203
  let betNumber = null;
6204
6204
  let mobileView = false;
6205
6205
  let isLoading = true;
6206
+ const thisComponent = get_current_component(); // dispatching events
6206
6207
 
6207
6208
  const getInitialBetSlipContent = () => {
6208
6209
  window.postMessage({ type: 'OMFE:getBetslipSelectionsCount' }, '*');
6209
6210
  };
6210
6211
 
6211
- const handleClick = () => {
6212
- window.postMessage({ type: 'EMFE:goToBetslip' }, '*');
6212
+ const dispatchWcEvent = (name, detail) => {
6213
+ thisComponent.dispatchEvent(new CustomEvent(name,
6214
+ {
6215
+ detail,
6216
+ composed: true,
6217
+ bubbles: true, // propagate across the shadow DOM
6218
+
6219
+ }));
6213
6220
  };
6214
6221
 
6215
6222
  const messageHandler = e => {
@@ -6244,17 +6251,19 @@
6244
6251
  if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<undefined> was created with unknown prop '${key}'`);
6245
6252
  });
6246
6253
 
6247
- const click_handler = () => handleClick();
6254
+ const click_handler = e => dispatchWcEvent("betslipClick", {});
6248
6255
 
6249
6256
  $$self.$capture_state = () => ({
6250
6257
  onMount,
6258
+ get_current_component,
6251
6259
  isMobile,
6252
6260
  userAgent,
6253
6261
  betNumber,
6254
6262
  mobileView,
6255
6263
  isLoading,
6264
+ thisComponent,
6256
6265
  getInitialBetSlipContent,
6257
- handleClick,
6266
+ dispatchWcEvent,
6258
6267
  messageHandler
6259
6268
  });
6260
6269
 
@@ -6269,7 +6278,7 @@
6269
6278
  $$self.$inject_state($$props.$$inject);
6270
6279
  }
6271
6280
 
6272
- return [betNumber, mobileView, isLoading, handleClick, click_handler];
6281
+ return [betNumber, mobileView, isLoading, dispatchWcEvent, click_handler];
6273
6282
  }
6274
6283
 
6275
6284
  class CasinoBetslipIndicator extends SvelteElement {