@everymatrix/lottery-program-wof 1.28.0 → 1.28.1

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.
package/CHANGELOG.md CHANGED
@@ -3,5 +3,6 @@
3
3
 
4
4
  | Version | Release date | Impacted areas | Changes |
5
5
  | ------- | ------------ | ----------------------------- | --------------------------------------- |
6
+ | 1.28.0 | Fri Mar 08 2024 | lottery-program-wof | fix(FEW-264)(casino-tournaments-x,lottery-program-wof,casino-wagering-x): add v1 to endpoint |
6
7
  | 1.23.1 | Thu Jan 04 2024 | lottery-program-wof | feat(FEW-282)(lottery-program-wof): add timeout for draw api |
7
8
  | 1.23.0 | Thu Dec 21 2023 | lottery-program-wof | feat(FEW-277)(lottery-program-wof): add condition to hide bonus |
@@ -5330,7 +5330,7 @@
5330
5330
 
5331
5331
  /* src/private.message.svelte generated by Svelte v3.59.2 */
5332
5332
 
5333
- const { Object: Object_1$2 } = globals;
5333
+ const { Object: Object_1$3 } = globals;
5334
5334
  const file$6 = "src/private.message.svelte";
5335
5335
 
5336
5336
  // (89:0) {#if isShown && isOptionsReady}
@@ -6071,7 +6071,7 @@
6071
6071
 
6072
6072
  const writable_props = ['r', 'size', 'id', 'clientstyling', 'giftimagesrc'];
6073
6073
 
6074
- Object_1$2.keys($$props).forEach(key => {
6074
+ Object_1$3.keys($$props).forEach(key => {
6075
6075
  if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<lottery-program-wof-private-message-panel> was created with unknown prop '${key}'`);
6076
6076
  });
6077
6077
 
@@ -6350,7 +6350,7 @@
6350
6350
 
6351
6351
  /* src/private.tabs.svelte generated by Svelte v3.59.2 */
6352
6352
 
6353
- const { Object: Object_1$1 } = globals;
6353
+ const { Object: Object_1$2 } = globals;
6354
6354
  const file$5 = "src/private.tabs.svelte";
6355
6355
 
6356
6356
  function get_each_context$4(ctx, list, i) {
@@ -6709,7 +6709,7 @@
6709
6709
 
6710
6710
  const writable_props = ['lang', 'endpoint', 'session', 'clientstyling', 'isshowhistory'];
6711
6711
 
6712
- Object_1$1.keys($$props).forEach(key => {
6712
+ Object_1$2.keys($$props).forEach(key => {
6713
6713
  if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<lottery-program-wof-private-tabs> was created with unknown prop '${key}'`);
6714
6714
  });
6715
6715
 
@@ -6981,7 +6981,7 @@
6981
6981
  }
6982
6982
  };
6983
6983
  const args = getArgs[api]();
6984
- args.path = endpoint + args.path;
6984
+ args.path = endpoint + `/v1` + args.path;
6985
6985
  return await fetcher(args);
6986
6986
  };
6987
6987
  const setMessage = (id, entry) => {
@@ -7070,6 +7070,7 @@
7070
7070
  return findDeg(index, length);
7071
7071
  }
7072
7072
  };
7073
+ const isBonusInvalid = (bonus) => (bonus === null || bonus === void 0 ? void 0 : bonus.current.remainingTimes) == 0 && !(bonus === null || bonus === void 0 ? void 0 : bonus.next);
7073
7074
 
7074
7075
  /* src/private.loader.svelte generated by Svelte v3.59.2 */
7075
7076
 
@@ -7171,7 +7172,7 @@
7171
7172
 
7172
7173
  /* src/private.outcomes.svelte generated by Svelte v3.59.2 */
7173
7174
 
7174
- const { Object: Object_1 } = globals;
7175
+ const { Object: Object_1$1 } = globals;
7175
7176
  const file$3 = "src/private.outcomes.svelte";
7176
7177
 
7177
7178
  function get_each_context$3(ctx, list, i) {
@@ -7247,19 +7248,19 @@
7247
7248
  }
7248
7249
 
7249
7250
  t8 = space();
7250
- add_location(tr0, file$3, 80, 12, 2545);
7251
- add_location(div, file$3, 79, 10, 2527);
7252
- add_location(th0, file$3, 84, 14, 2696);
7253
- add_location(th1, file$3, 85, 14, 2739);
7254
- add_location(th2, file$3, 86, 14, 2781);
7255
- add_location(tr1, file$3, 83, 12, 2677);
7256
- add_location(thead, file$3, 82, 10, 2657);
7251
+ add_location(tr0, file$3, 80, 12, 2554);
7252
+ add_location(div, file$3, 79, 10, 2536);
7253
+ add_location(th0, file$3, 84, 14, 2705);
7254
+ add_location(th1, file$3, 85, 14, 2748);
7255
+ add_location(th2, file$3, 86, 14, 2790);
7256
+ add_location(tr1, file$3, 83, 12, 2686);
7257
+ add_location(thead, file$3, 82, 10, 2666);
7257
7258
 
7258
7259
  attr_dev(tbody, "style", tbody_style_value = /*outcomesItem*/ ctx[17].outcomes.length <= 5
7259
7260
  ? 'overflow: hidden;'
7260
7261
  : '');
7261
7262
 
7262
- add_location(tbody, file$3, 89, 10, 2854);
7263
+ add_location(tbody, file$3, 89, 10, 2863);
7263
7264
  },
7264
7265
  m: function mount(target, anchor) {
7265
7266
  insert_dev(target, div, anchor);
@@ -7356,7 +7357,7 @@
7356
7357
  div = element("div");
7357
7358
  t = text(t_value);
7358
7359
  attr_dev(div, "class", "OutcomeNoContent");
7359
- add_location(div, file$3, 77, 12, 2439);
7360
+ add_location(div, file$3, 77, 12, 2448);
7360
7361
  },
7361
7362
  m: function mount(target, anchor) {
7362
7363
  insert_dev(target, div, anchor);
@@ -7388,7 +7389,7 @@
7388
7389
  const block = {
7389
7390
  c: function create() {
7390
7391
  wof_loader = element("wof-loader");
7391
- add_location(wof_loader, file$3, 74, 10, 2319);
7392
+ add_location(wof_loader, file$3, 74, 10, 2328);
7392
7393
  },
7393
7394
  m: function mount(target, anchor) {
7394
7395
  insert_dev(target, wof_loader, anchor);
@@ -7438,10 +7439,10 @@
7438
7439
  t2 = space();
7439
7440
  td2 = element("td");
7440
7441
  t3 = text(t3_value);
7441
- add_location(td0, file$3, 92, 14, 3015);
7442
- add_location(td1, file$3, 93, 14, 3081);
7443
- add_location(td2, file$3, 94, 14, 3125);
7444
- add_location(tr, file$3, 91, 12, 2996);
7442
+ add_location(td0, file$3, 92, 14, 3024);
7443
+ add_location(td1, file$3, 93, 14, 3090);
7444
+ add_location(td2, file$3, 94, 14, 3134);
7445
+ add_location(tr, file$3, 91, 12, 3005);
7445
7446
  },
7446
7447
  m: function mount(target, anchor) {
7447
7448
  insert_dev(target, tr, anchor);
@@ -7552,11 +7553,11 @@
7552
7553
  }
7553
7554
 
7554
7555
  this.c = noop;
7555
- add_location(table, file$3, 71, 4, 2221);
7556
+ add_location(table, file$3, 71, 4, 2230);
7556
7557
  attr_dev(div0, "class", "TableContainer");
7557
- add_location(div0, file$3, 70, 2, 2188);
7558
+ add_location(div0, file$3, 70, 2, 2197);
7558
7559
  attr_dev(div1, "class", "Outcomes");
7559
- add_location(div1, file$3, 69, 0, 2137);
7560
+ add_location(div1, file$3, 69, 0, 2146);
7560
7561
  },
7561
7562
  l: function claim(nodes) {
7562
7563
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -7682,7 +7683,7 @@
7682
7683
  };
7683
7684
 
7684
7685
  onMountMessageLifeCycle({
7685
- 'wof-private-bonuses': data => {
7686
+ 'wof-private-bonuses-outcomes': data => {
7686
7687
  $$invalidate(1, bonuses = data.bonuses);
7687
7688
  },
7688
7689
  'wof-private-message-outcomes': () => {
@@ -7692,7 +7693,7 @@
7692
7693
 
7693
7694
  const writable_props = ['lang', 'endpoint', 'session', 'clientstyling', 'id'];
7694
7695
 
7695
- Object_1.keys($$props).forEach(key => {
7696
+ Object_1$1.keys($$props).forEach(key => {
7696
7697
  if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<lottery-program-wof-private-outcomes> was created with unknown prop '${key}'`);
7697
7698
  });
7698
7699
 
@@ -10186,7 +10187,7 @@
10186
10187
  return child_ctx;
10187
10188
  }
10188
10189
 
10189
- // (105:2) {#if bonus?.current && isOptionsReady}
10190
+ // (106:2) {#if bonus?.current && isOptionsReady}
10190
10191
  function create_if_block$1(ctx) {
10191
10192
  let div;
10192
10193
  let each_value = /*currentInfoKeys*/ ctx[6];
@@ -10206,7 +10207,7 @@
10206
10207
  }
10207
10208
 
10208
10209
  attr_dev(div, "class", "Current");
10209
- add_location(div, file$1, 105, 2, 2924);
10210
+ add_location(div, file$1, 106, 2, 2978);
10210
10211
  },
10211
10212
  m: function mount(target, anchor) {
10212
10213
  insert_dev(target, div, anchor);
@@ -10252,14 +10253,14 @@
10252
10253
  block,
10253
10254
  id: create_if_block$1.name,
10254
10255
  type: "if",
10255
- source: "(105:2) {#if bonus?.current && isOptionsReady}",
10256
+ source: "(106:2) {#if bonus?.current && isOptionsReady}",
10256
10257
  ctx
10257
10258
  });
10258
10259
 
10259
10260
  return block;
10260
10261
  }
10261
10262
 
10262
- // (107:4) {#each currentInfoKeys as CurrentInfoKey}
10263
+ // (108:4) {#each currentInfoKeys as CurrentInfoKey}
10263
10264
  function create_each_block$1(ctx) {
10264
10265
  let p;
10265
10266
  let t0_value = /*$_*/ ctx[11](`wof.${/*CurrentInfoKey*/ ctx[21]}`) + "";
@@ -10278,7 +10279,7 @@
10278
10279
  t2 = text(t2_value);
10279
10280
  t3 = space();
10280
10281
  attr_dev(p, "class", p_class_value = /*CurrentInfoKey*/ ctx[21]);
10281
- add_location(p, file$1, 107, 6, 2998);
10282
+ add_location(p, file$1, 108, 6, 3052);
10282
10283
  },
10283
10284
  m: function mount(target, anchor) {
10284
10285
  insert_dev(target, p, anchor);
@@ -10304,7 +10305,7 @@
10304
10305
  block,
10305
10306
  id: create_each_block$1.name,
10306
10307
  type: "each",
10307
- source: "(107:4) {#each currentInfoKeys as CurrentInfoKey}",
10308
+ source: "(108:4) {#each currentInfoKeys as CurrentInfoKey}",
10308
10309
  ctx
10309
10310
  });
10310
10311
 
@@ -10362,12 +10363,12 @@
10362
10363
  if (if_block) if_block.c();
10363
10364
  this.c = noop;
10364
10365
  set_attributes(lottery_program_wof_private_item_svg, lottery_program_wof_private_item_svg_data);
10365
- add_location(lottery_program_wof_private_item_svg, file$1, 88, 2, 2608);
10366
+ add_location(lottery_program_wof_private_item_svg, file$1, 89, 2, 2662);
10366
10367
  set_attributes(lottery_program_wof_private_message_panel, lottery_program_wof_private_message_panel_data);
10367
- add_location(lottery_program_wof_private_message_panel, file$1, 96, 2, 2743);
10368
+ add_location(lottery_program_wof_private_message_panel, file$1, 97, 2, 2797);
10368
10369
  attr_dev(div, "class", "LotteryItem");
10369
- toggle_class(div, "Invalid", /*bonus*/ ctx[5]?.current.remainingTimes == 0 && !/*bonus*/ ctx[5]?.next && /*checkableValid*/ ctx[8]);
10370
- add_location(div, file$1, 83, 0, 2460);
10370
+ toggle_class(div, "Invalid", isBonusInvalid(/*bonus*/ ctx[5]) && /*checkableValid*/ ctx[8]);
10371
+ add_location(div, file$1, 84, 0, 2543);
10371
10372
  },
10372
10373
  l: function claim(nodes) {
10373
10374
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -10415,8 +10416,8 @@
10415
10416
  if_block = null;
10416
10417
  }
10417
10418
 
10418
- if (dirty & /*bonus, checkableValid*/ 288) {
10419
- toggle_class(div, "Invalid", /*bonus*/ ctx[5]?.current.remainingTimes == 0 && !/*bonus*/ ctx[5]?.next && /*checkableValid*/ ctx[8]);
10419
+ if (dirty & /*isBonusInvalid, bonus, checkableValid*/ 288) {
10420
+ toggle_class(div, "Invalid", isBonusInvalid(/*bonus*/ ctx[5]) && /*checkableValid*/ ctx[8]);
10420
10421
  }
10421
10422
  },
10422
10423
  i: noop,
@@ -10499,6 +10500,7 @@
10499
10500
  },
10500
10501
  'wof-private-message-close': data => {
10501
10502
  if (data.id !== id) return;
10503
+ _postMessage({ type: 'wof-private-checking', bonus, id });
10502
10504
 
10503
10505
  setTimeout(
10504
10506
  () => {
@@ -10547,6 +10549,7 @@
10547
10549
  $$self.$capture_state = () => ({
10548
10550
  Lang,
10549
10551
  getCurrentInfo,
10552
+ isBonusInvalid,
10550
10553
  api,
10551
10554
  onMountMessageLifeCycle,
10552
10555
  _postMessage,
@@ -10792,6 +10795,8 @@
10792
10795
 
10793
10796
  /* src/LotteryProgramWof.svelte generated by Svelte v3.59.2 */
10794
10797
 
10798
+ const { Object: Object_1 } = globals;
10799
+
10795
10800
  const file = "src/LotteryProgramWof.svelte";
10796
10801
 
10797
10802
  function get_each_context(ctx, list, i) {
@@ -10800,7 +10805,7 @@
10800
10805
  return child_ctx;
10801
10806
  }
10802
10807
 
10803
- // (101:10) {:else}
10808
+ // (133:10) {:else}
10804
10809
  function create_else_block(ctx) {
10805
10810
  let div;
10806
10811
  let p;
@@ -10812,9 +10817,9 @@
10812
10817
  div = element("div");
10813
10818
  p = element("p");
10814
10819
  t = text(t_value);
10815
- add_location(p, file, 102, 14, 3117);
10820
+ add_location(p, file, 134, 14, 4083);
10816
10821
  attr_dev(div, "class", "NoContent");
10817
- add_location(div, file, 101, 12, 3079);
10822
+ add_location(div, file, 133, 12, 4045);
10818
10823
  },
10819
10824
  m: function mount(target, anchor) {
10820
10825
  insert_dev(target, div, anchor);
@@ -10833,14 +10838,14 @@
10833
10838
  block,
10834
10839
  id: create_else_block.name,
10835
10840
  type: "else",
10836
- source: "(101:10) {:else}",
10841
+ source: "(133:10) {:else}",
10837
10842
  ctx
10838
10843
  });
10839
10844
 
10840
10845
  return block;
10841
10846
  }
10842
10847
 
10843
- // (91:10) {#if bonuses.length}
10848
+ // (123:10) {#if bonuses.length}
10844
10849
  function create_if_block_1(ctx) {
10845
10850
  let each_1_anchor;
10846
10851
  let each_value = /*bonuses*/ ctx[6];
@@ -10903,21 +10908,21 @@
10903
10908
  block,
10904
10909
  id: create_if_block_1.name,
10905
10910
  type: "if",
10906
- source: "(91:10) {#if bonuses.length}",
10911
+ source: "(123:10) {#if bonuses.length}",
10907
10912
  ctx
10908
10913
  });
10909
10914
 
10910
10915
  return block;
10911
10916
  }
10912
10917
 
10913
- // (88:8) {#if loading}
10918
+ // (120:8) {#if loading}
10914
10919
  function create_if_block(ctx) {
10915
10920
  let wof_loader;
10916
10921
 
10917
10922
  const block = {
10918
10923
  c: function create() {
10919
10924
  wof_loader = element("wof-loader");
10920
- add_location(wof_loader, file, 88, 10, 2693);
10925
+ add_location(wof_loader, file, 120, 10, 3659);
10921
10926
  },
10922
10927
  m: function mount(target, anchor) {
10923
10928
  insert_dev(target, wof_loader, anchor);
@@ -10932,14 +10937,14 @@
10932
10937
  block,
10933
10938
  id: create_if_block.name,
10934
10939
  type: "if",
10935
- source: "(88:8) {#if loading}",
10940
+ source: "(120:8) {#if loading}",
10936
10941
  ctx
10937
10942
  });
10938
10943
 
10939
10944
  return block;
10940
10945
  }
10941
10946
 
10942
- // (92:12) {#each bonuses as bonus}
10947
+ // (124:12) {#each bonuses as bonus}
10943
10948
  function create_each_block(ctx) {
10944
10949
  let lottery_program_wof_private_item;
10945
10950
 
@@ -10963,7 +10968,7 @@
10963
10968
  c: function create() {
10964
10969
  lottery_program_wof_private_item = element("lottery-program-wof-private-item");
10965
10970
  set_attributes(lottery_program_wof_private_item, lottery_program_wof_private_item_data);
10966
- add_location(lottery_program_wof_private_item, file, 92, 14, 2806);
10971
+ add_location(lottery_program_wof_private_item, file, 124, 14, 3772);
10967
10972
  },
10968
10973
  m: function mount(target, anchor) {
10969
10974
  insert_dev(target, lottery_program_wof_private_item, anchor);
@@ -10988,7 +10993,7 @@
10988
10993
  block,
10989
10994
  id: create_each_block.name,
10990
10995
  type: "each",
10991
- source: "(92:12) {#each bonuses as bonus}",
10996
+ source: "(124:12) {#each bonuses as bonus}",
10992
10997
  ctx
10993
10998
  });
10994
10999
 
@@ -11045,17 +11050,17 @@
11045
11050
  lottery_program_wof_private_outcomes = element("lottery-program-wof-private-outcomes");
11046
11051
  this.c = noop;
11047
11052
  attr_dev(div0, "class", "CommonContainer");
11048
- add_location(div0, file, 86, 6, 2631);
11053
+ add_location(div0, file, 118, 6, 3597);
11049
11054
  attr_dev(div1, "slot", "tab-Program");
11050
- add_location(div1, file, 85, 4, 2600);
11055
+ add_location(div1, file, 117, 4, 3566);
11051
11056
  set_attributes(lottery_program_wof_private_outcomes, lottery_program_wof_private_outcomes_data);
11052
- add_location(lottery_program_wof_private_outcomes, file, 109, 6, 3254);
11057
+ add_location(lottery_program_wof_private_outcomes, file, 141, 6, 4220);
11053
11058
  attr_dev(div2, "slot", "tab-History");
11054
- add_location(div2, file, 108, 4, 3223);
11059
+ add_location(div2, file, 140, 4, 4189);
11055
11060
  set_attributes(lottery_program_wof_private_tabs, lottery_program_wof_private_tabs_data);
11056
- add_location(lottery_program_wof_private_tabs, file, 84, 2, 2528);
11061
+ add_location(lottery_program_wof_private_tabs, file, 116, 2, 3494);
11057
11062
  attr_dev(div3, "class", "WofContainer");
11058
- add_location(div3, file, 83, 0, 2473);
11063
+ add_location(div3, file, 115, 0, 3439);
11059
11064
  },
11060
11065
  l: function claim(nodes) {
11061
11066
  throw new Error("options.hydrate only works if the component was compiled with the `hydratable: true` option");
@@ -11164,7 +11169,18 @@
11164
11169
  };
11165
11170
 
11166
11171
  const fetcher = async () => {
11167
- $$invalidate(6, bonuses = await api.lotteries(endpoint, session));
11172
+ const _bonuses = await api.lotteries(endpoint, session);
11173
+
11174
+ _postMessage({
11175
+ type: 'wof-private-bonuses-outcomes',
11176
+ bonuses: _bonuses
11177
+ });
11178
+
11179
+ $$invalidate(6, bonuses = _bonuses.map(_bonus => {
11180
+ if (!isBonusInvalid(_bonus)) {
11181
+ return _bonus;
11182
+ }
11183
+ }).filter(_bonus => _bonus));
11168
11184
 
11169
11185
  _postMessage({
11170
11186
  type: 'WofStatus',
@@ -11189,6 +11205,32 @@
11189
11205
  init();
11190
11206
  };
11191
11207
 
11208
+ onMountMessageLifeCycle({
11209
+ 'wof-private-checking': data => {
11210
+ if (isBonusInvalid(data.bonus)) {
11211
+ $$invalidate(6, bonuses = bonuses.map(_bonus => {
11212
+ if (_bonus.program.id === data.id) {
11213
+ return Object.assign(Object.assign({}, _bonus), { hidden: true });
11214
+ } else {
11215
+ return _bonus;
11216
+ }
11217
+ }));
11218
+ }
11219
+
11220
+ let hidden = true;
11221
+
11222
+ bonuses.map(_bonus => {
11223
+ if (_bonus.hidden !== true) {
11224
+ hidden = false;
11225
+ }
11226
+ });
11227
+
11228
+ if (hidden) {
11229
+ $$invalidate(6, bonuses = []);
11230
+ }
11231
+ }
11232
+ });
11233
+
11192
11234
  const writable_props = [
11193
11235
  'lang',
11194
11236
  'endpoint',
@@ -11205,7 +11247,7 @@
11205
11247
  'contentdirection'
11206
11248
  ];
11207
11249
 
11208
- Object.keys($$props).forEach(key => {
11250
+ Object_1.keys($$props).forEach(key => {
11209
11251
  if (!~writable_props.indexOf(key) && key.slice(0, 2) !== '$$' && key !== 'slot') console.warn(`<undefined> was created with unknown prop '${key}'`);
11210
11252
  });
11211
11253
 
@@ -11241,7 +11283,9 @@
11241
11283
  setLocaleWhenInit,
11242
11284
  Lang,
11243
11285
  api,
11286
+ isBonusInvalid,
11244
11287
  _postMessage,
11288
+ onMountMessageLifeCycle,
11245
11289
  CurrentInfo,
11246
11290
  setClientStyling,
11247
11291
  setClientStylingURL,