@betarena/ad-engine 0.0.32 → 0.0.33

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@betarena/ad-engine",
3
- "version": "0.0.32",
3
+ "version": "0.0.33",
4
4
  "private": false,
5
5
  "description": "Betarena ad-engine widget",
6
6
  "keywords": [
@@ -51,13 +51,13 @@
51
51
 
52
52
  import WidgetAdvertSlide from './Advert-Slide-Child.svelte';
53
53
  import WidgetAdGeneral from './Advert-General-Child.svelte';
54
+ import DevInfoBox from './misc/admin/Dev-Info-Box.svelte';
54
55
 
55
56
  import '../style/app.scss';
56
57
 
57
58
  import type { IAdsRequestBody, IAdsResponseBody } from '@betarena/scores-lib/types/ad-engine/index.js';
58
59
  import type { GeoJsResponse } from './types/geojs.js';
59
60
  import type { AdsCreativeMain } from '@betarena/scores-lib/types/_AUTO-HASURA_.js';
60
- import DevInfoBox from './misc/admin/Dev-Info-Box.svelte';
61
61
 
62
62
  // #endregion ➤ 📦 Package Imports
63
63
 
@@ -354,7 +354,7 @@
354
354
 
355
355
  for (const [zoneId, tagIds] of mapZoneToTagIds)
356
356
  {
357
- if (authorId && !tagIds.includes(authorId))
357
+ if (authorArticleTagIds.filter(x => { return tagIds.includes(x) } ).length == 0)
358
358
  continue;
359
359
  ;
360
360
 
@@ -427,7 +427,7 @@
427
427
  (
428
428
  {
429
429
  deviceType,
430
- isoCountryCode: geoLocation?.country_code ?? 'EB',
430
+ isoCountryCode: geoLocation?.country_code ?? 'EN',
431
431
  authorId,
432
432
  tagIds: authorArticleTagIds,
433
433
  zoneIds: [...betarenaAdsInjectMap.keys()]
@@ -39,6 +39,7 @@
39
39
  // ╰────────────────────────────────────────────────────────────────────────╯
40
40
 
41
41
  import { storeAdmin } from '../../store/admin.js';
42
+ import { betarenaAdEngineStore } from '../../_store.js';
42
43
 
43
44
  // #endregion ➤ 📦 Package Imports
44
45
 
@@ -65,6 +66,7 @@
65
66
  ;
66
67
 
67
68
  $: ({ numberOfAdvertsActive } = { ...$storeAdmin });
69
+ $: ({ advertDateLastShown, isBetarenaAdShownForToday } = { ...$betarenaAdEngineStore})
68
70
 
69
71
  // #endregion ➤ 📌 VARIABLES
70
72
 
@@ -131,6 +133,57 @@
131
133
  </p>
132
134
 
133
135
  <slot/>
136
+
137
+ <p>
138
+ [store] advertDateLastShown :|: {advertDateLastShown}
139
+ </p>
140
+
141
+ <p>
142
+ [store] isBetarenaAdShownForToday :|: {isBetarenaAdShownForToday}
143
+ </p>
144
+ </div>
145
+
146
+ <!--
147
+ ╭─────
148
+ │ > [I] Actions
149
+ ╰─────
150
+ -->
151
+ <div
152
+ class=
153
+ "
154
+ grid-box
155
+ "
156
+ >
157
+ <p
158
+ class=
159
+ "
160
+ title
161
+ "
162
+ >
163
+ Actions
164
+ </p>
165
+
166
+ <button
167
+ class=
168
+ "
169
+ btn-dark
170
+ "
171
+ on:click=
172
+ {
173
+ () =>
174
+ {
175
+ betarenaAdEngineStore.updateData
176
+ (
177
+ [
178
+ ['toggleAdShownState', undefined]
179
+ ]
180
+ );
181
+ return;
182
+ }
183
+ }
184
+ >
185
+ Toggle Advert Shown State [{isBetarenaAdShownForToday}]
186
+ </button>
134
187
  </div>
135
188
 
136
189
  </div>
@@ -209,7 +262,7 @@
209
262
  {
210
263
  /* 🛝 layout */
211
264
  display: grid;
212
- grid-template-columns: 1fr 1fr 1fr;
265
+ grid-template-columns: 1fr 1fr;
213
266
  }
214
267
  }
215
268