@kompasid/lit-web-components 0.5.5 → 0.5.7

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/demo/index.html CHANGED
@@ -50,6 +50,7 @@
50
50
  import '../dist/src/components/kompasid-paywall-video/KompasPaywallVideo.js'
51
51
  import '../dist/src/components/kompasid-metered-paywall/KompasMeteredPaywall.js'
52
52
  import '../dist/src/components/kompasid-freewall/KompasFreewall.js'
53
+ import '../dist/src/components/kompasid-metered-wall-register/KompasMeteredWallRegister.js'
53
54
 
54
55
  const type = 'reguler'
55
56
  const theme = ''
@@ -82,6 +83,11 @@
82
83
  const headCopyExpand = ''
83
84
  const headCopyCollapse = ''
84
85
  const expand = false
86
+ const countdownArticle = 2
87
+ const trackerContentAuthors = 'Author 1|Author 2'
88
+ const trackerContentEditors = 'Editor 1|Editor 2'
89
+ const trackerContentTags = 'Tag1|Tag2|Tag3'
90
+ const trackerContentPublishedDate = '2023-10-12'
85
91
 
86
92
  render(
87
93
  html`
@@ -135,7 +141,7 @@
135
141
  </kompasid-paywall-video>
136
142
  </div>
137
143
  <kompasid-footer></kompasid-footer>
138
-
144
+
139
145
  <kompasid-freewall
140
146
  .isLogin=${isLogin}
141
147
  .type=${freewallType}
@@ -160,6 +166,25 @@
160
166
  .tracker_metered_wall_balance=${trackerMeteredWallBalance}
161
167
  >
162
168
  </kompasid-freewall>
169
+ <kompasid-metered-wall-register
170
+ .id=${"metered-wall-register"}
171
+ .countdownArticle=${countdownArticle}
172
+ .tracker_page_title=${trackerPageTitle}
173
+ .tracker_page_type=${trackerPageType}
174
+ .tracker_content_type=${trackerContentType}
175
+ .tracker_content_id=${trackerContentId}
176
+ .tracker_content_title=${trackerContentTitle}
177
+ .tracker_content_authors=${trackerContentAuthors}
178
+ .tracker_content_editors=${trackerContentEditors}
179
+ .tracker_content_tags=${trackerContentTags}
180
+ .tracker_content_published_date=${trackerContentPublishedDate}
181
+ .tracker_content_categories=${trackerContentCategories}
182
+ .tracker_user_type=${trackerUserType}
183
+ .tracker_subscription_status=${trackerSubscriptionStatus}
184
+ .tracker_metered_wall_type=${meteredWallType}
185
+ .tracker_metered_wall_balance=${trackerMeteredWallBalance}
186
+ .tracker_page_domain=${trackerPageDomain}
187
+ ></kompasid-metered-wall-register>
163
188
  `,
164
189
  document.querySelector('#demo')
165
190
  )
@@ -0,0 +1,98 @@
1
+ import { LitElement } from 'lit';
2
+ export declare class KompasMeteredWallRegister extends LitElement {
3
+ static styles: import("lit").CSSResult[];
4
+ /**
5
+ * state
6
+ */
7
+ /**
8
+ * state registerUrl untuk memberikan link kemana user akan dialihkan.
9
+ */
10
+ registerUrl: string;
11
+ /**
12
+ * state isShowBanner untuk memunculkan component.
13
+ */
14
+ isShowBanner: boolean;
15
+ /**
16
+ * state isExpandBanner untuk menentukan apakah component sedang dalam mode expand.
17
+ */
18
+ isExpandBanner: boolean;
19
+ /**
20
+ * state textTemplate untuk menyimpan template yang di berikan.
21
+ */
22
+ private textTemplate;
23
+ /**
24
+ * Props
25
+ */
26
+ /**
27
+ * prop countdownArticle untuk menghandle sudah berapa artikel gratis yang user baca.
28
+ * prop defaultExpandBanner untuk menentukan keadaan awal komponen apakah dalam mode expand atau tidak.
29
+ * prop tracker_page_title untuk title of the page
30
+ * prop tracker_page_type untuk type of the page
31
+ * prop tracker_content_type untuk whether it's a free article or paid article (will only be sent if the user views article detail page)
32
+ * prop tracker_content_id untuk the ID for the article (will only be sent if the user views article detail page)
33
+ * prop tracker_content_title untuk the title of the article (will only be sent if the user views article detail page)
34
+ * prop tracker_content_authors untuk name of the authors (will only be sent if the user views article detail page)
35
+ * prop tracker_content_editors untuk name of the editors (will only be sent if the user views article detail page)
36
+ * prop tracker_content_tags untuk tags inside the article (will only be sent if the user views article detail page)
37
+ * prop tracker_content_published_date untuk the published date (will only be sent if the user views article detail page)
38
+ * prop tracker_content_categories untuk The main category the content belongs to
39
+ * prop tracker_user_type untuk type of user based on their subscription
40
+ * prop tracker_subscription_status untuk status of their subscription
41
+ * prop tracker_metered_wall_type untuk the type of Metered Wall
42
+ * prop tracker_metered_wall_balance untuk the balance of their metered wall
43
+ * prop tracker_page_domain untuk Page Domain
44
+ * prop next_param untuk page Domain
45
+ */
46
+ countdownArticle: number;
47
+ defaultExpandBanner: boolean;
48
+ isDesktop: boolean;
49
+ tracker_page_title: string;
50
+ tracker_page_type: string;
51
+ tracker_content_type: string;
52
+ tracker_content_id: string;
53
+ tracker_content_title: string;
54
+ tracker_content_authors: string;
55
+ tracker_content_editors: string;
56
+ tracker_content_tags: string;
57
+ tracker_content_published_date: string;
58
+ tracker_content_categories: string;
59
+ tracker_user_type: string;
60
+ tracker_subscription_status: string;
61
+ tracker_metered_wall_type: string;
62
+ tracker_metered_wall_balance: number;
63
+ tracker_page_domain: string;
64
+ next_param: string;
65
+ /**
66
+ * menentukan template yang akan di render
67
+ */
68
+ private setTemplate;
69
+ private checkIsDesktop;
70
+ /**
71
+ * Render Statement
72
+ */
73
+ private bannerTemplate;
74
+ private defaultBannerContent;
75
+ private expandedBannerContent;
76
+ /**
77
+ * template button register
78
+ */
79
+ private registerButtonTemplate;
80
+ /**
81
+ * mengarahkan ke page register
82
+ */
83
+ private redirectToRegister;
84
+ /**
85
+ * mengirim event ke datalayer
86
+ */
87
+ private pushToDataLayer;
88
+ /**
89
+ * toggle isExpandBanner flag
90
+ */
91
+ private triggerExpandBanner;
92
+ /**
93
+ * Lifecycle
94
+ */
95
+ connectedCallback(): Promise<void>;
96
+ private loadData;
97
+ render(): import("lit").TemplateResult<1> | null;
98
+ }
@@ -0,0 +1,395 @@
1
+ import { __decorate } from "tslib";
2
+ import { html, css, LitElement } from 'lit';
3
+ import { customElement, state, property } from 'lit/decorators.js';
4
+ import { unsafeSVG } from 'lit/directives/unsafe-svg.js';
5
+ import { getFontAwesomeIcon } from '../../utils/fontawesome-setup.js';
6
+ import { TWStyles } from '../../../tailwind/tailwind.js';
7
+ let KompasMeteredWallRegister = class KompasMeteredWallRegister extends LitElement {
8
+ constructor() {
9
+ super(...arguments);
10
+ /**
11
+ * state
12
+ */
13
+ /**
14
+ * state registerUrl untuk memberikan link kemana user akan dialihkan.
15
+ */
16
+ this.registerUrl = 'https://account.kompas.id/register?loc=metered_register_wall';
17
+ /**
18
+ * state isShowBanner untuk memunculkan component.
19
+ */
20
+ this.isShowBanner = true;
21
+ /**
22
+ * state isExpandBanner untuk menentukan apakah component sedang dalam mode expand.
23
+ */
24
+ this.isExpandBanner = true;
25
+ /**
26
+ * state textTemplate untuk menyimpan template yang di berikan.
27
+ */
28
+ this.textTemplate = {
29
+ default: { title: '', lastArticle: { title: '' } },
30
+ expand: {
31
+ title: '',
32
+ description: '',
33
+ lastArticle: { title: '', description: '' },
34
+ },
35
+ };
36
+ /**
37
+ * Props
38
+ */
39
+ /**
40
+ * prop countdownArticle untuk menghandle sudah berapa artikel gratis yang user baca.
41
+ * prop defaultExpandBanner untuk menentukan keadaan awal komponen apakah dalam mode expand atau tidak.
42
+ * prop tracker_page_title untuk title of the page
43
+ * prop tracker_page_type untuk type of the page
44
+ * prop tracker_content_type untuk whether it's a free article or paid article (will only be sent if the user views article detail page)
45
+ * prop tracker_content_id untuk the ID for the article (will only be sent if the user views article detail page)
46
+ * prop tracker_content_title untuk the title of the article (will only be sent if the user views article detail page)
47
+ * prop tracker_content_authors untuk name of the authors (will only be sent if the user views article detail page)
48
+ * prop tracker_content_editors untuk name of the editors (will only be sent if the user views article detail page)
49
+ * prop tracker_content_tags untuk tags inside the article (will only be sent if the user views article detail page)
50
+ * prop tracker_content_published_date untuk the published date (will only be sent if the user views article detail page)
51
+ * prop tracker_content_categories untuk The main category the content belongs to
52
+ * prop tracker_user_type untuk type of user based on their subscription
53
+ * prop tracker_subscription_status untuk status of their subscription
54
+ * prop tracker_metered_wall_type untuk the type of Metered Wall
55
+ * prop tracker_metered_wall_balance untuk the balance of their metered wall
56
+ * prop tracker_page_domain untuk Page Domain
57
+ * prop next_param untuk page Domain
58
+ */
59
+ this.countdownArticle = 0;
60
+ this.defaultExpandBanner = false;
61
+ this.isDesktop = false;
62
+ this.tracker_page_title = '';
63
+ this.tracker_page_type = '';
64
+ this.tracker_content_type = '';
65
+ this.tracker_content_id = '';
66
+ this.tracker_content_title = '';
67
+ this.tracker_content_authors = '';
68
+ this.tracker_content_editors = '';
69
+ this.tracker_content_tags = '';
70
+ this.tracker_content_published_date = '';
71
+ this.tracker_content_categories = '';
72
+ this.tracker_user_type = '';
73
+ this.tracker_subscription_status = '';
74
+ this.tracker_metered_wall_type = '';
75
+ this.tracker_metered_wall_balance = 0;
76
+ this.tracker_page_domain = '';
77
+ this.next_param = 'https://www.kompas.id/baca/opini/2023/12/05/masa-depan-wolbachia-sebagai-alternatif-pengendalian-dbd?open_from=Section_Opini';
78
+ /**
79
+ * mengarahkan ke page register
80
+ */
81
+ this.redirectToRegister = () => {
82
+ this.pushToDataLayer('mrw_clicked');
83
+ const newUrl = new URL(decodeURIComponent(this.registerUrl));
84
+ if (this.next_param)
85
+ newUrl.searchParams.append('next', decodeURIComponent(this.next_param));
86
+ window.location.href = newUrl.toString();
87
+ };
88
+ }
89
+ /**
90
+ * menentukan template yang akan di render
91
+ */
92
+ setTemplate(prop, mode = 'default') {
93
+ let template = '';
94
+ // dynamicMode dibuat agar typescript bisa akses data lastArticle
95
+ const dynamicMode = this.textTemplate[mode];
96
+ if ('lastArticle' in dynamicMode) {
97
+ const lastArticleMode = dynamicMode;
98
+ template = lastArticleMode.lastArticle[prop] || '';
99
+ }
100
+ else {
101
+ template = dynamicMode[prop] || '';
102
+ }
103
+ return template;
104
+ }
105
+ checkIsDesktop() {
106
+ if (window.innerWidth >= 960) {
107
+ this.isDesktop = true;
108
+ }
109
+ else {
110
+ this.isDesktop = false;
111
+ }
112
+ }
113
+ /**
114
+ * Render Statement
115
+ */
116
+ bannerTemplate() {
117
+ return this.isExpandBanner
118
+ ? this.expandedBannerContent()
119
+ : this.defaultBannerContent();
120
+ }
121
+ defaultBannerContent() {
122
+ return html `
123
+ <div>
124
+ <div
125
+ class="${this.isDesktop
126
+ ? 'cont-banner-content justify-center'
127
+ : null} flex flex-row justify-between"
128
+ >
129
+ <div class="banner-content flex flex-row">
130
+ <div
131
+ class="text-base md:text-lg font-lora mb-3 mt-1 md:mb-0 md:mt-0 pr-14 md:px-0"
132
+ .innerHTML=${this.setTemplate('title')}
133
+ ></div>
134
+ <div .hidden="${!this.isDesktop}" class="md:self-center btn-regis">
135
+ ${this.isDesktop
136
+ ? html `<div class="ml-4"></div>
137
+ ${this.registerButtonTemplate()}`
138
+ : null}
139
+ </div>
140
+ </div>
141
+ <div>
142
+ <button
143
+ @click="${this.triggerExpandBanner}"
144
+ class="h-9 w-9 flex ml-2 items-center justify-center text-blue-500 rounded bg-blue-200"
145
+ >
146
+ <div
147
+ class="icon icon-blue-600 ${this.isExpandBanner
148
+ ? 'chevron-down'
149
+ : 'rotate-180'}"
150
+ >
151
+ ${unsafeSVG(getFontAwesomeIcon('fas', 'chevron-down'))}
152
+ </div>
153
+ </button>
154
+ </div>
155
+ </div>
156
+ <div class="md:self-center mt-4">
157
+ ${!this.isDesktop ? html `${this.registerButtonTemplate()} ` : null}
158
+ </div>
159
+ </div>
160
+ `;
161
+ }
162
+ expandedBannerContent() {
163
+ return html `
164
+ <div
165
+ class="flex flex-col-reverse justify-evenly md:flex-row gap-4 md:gap-8"
166
+ >
167
+ <div
168
+ class="flex flex-col justify-evenly md:text-left md:w-5/12 gap-4 md:gap-2"
169
+ >
170
+ <p
171
+ class="text-lg md:text-2xl font-lora"
172
+ .innerHTML=${this.setTemplate('title', 'expand')}
173
+ ></p>
174
+ <p
175
+ class="text-sm md:text-base"
176
+ .innerHTML=${this.setTemplate('description', 'expand')}
177
+ ></p>
178
+ <div class="${this.isDesktop ? null : 'expanded-btn'} md:self-start">
179
+ ${this.registerButtonTemplate()}
180
+ </div>
181
+ </div>
182
+ <div class="flex justify-center">
183
+ <img
184
+ alt="metered-wall-register"
185
+ src="https://d3w4qaq4xm1ncv.cloudfront.net/paywall-asset/paywall_ilustrasi3-03_1.png"
186
+ class="h-40 w-40 md:w-full md:h-full"
187
+ />
188
+ </div>
189
+ <button
190
+ @click="${this.triggerExpandBanner}"
191
+ class="h-9 w-9 ${this.isDesktop
192
+ ? null
193
+ : 'ml-auto'} flex items-center justify-center text-blue-500 rounded bg-blue-200"
194
+ >
195
+ <div
196
+ class="icon icon-blue-600 ${this.isExpandBanner
197
+ ? 'chevron-down'
198
+ : 'rotate-180'}"
199
+ >
200
+ ${unsafeSVG(getFontAwesomeIcon('fas', 'chevron-down'))}
201
+ </div>
202
+ </button>
203
+ </div>
204
+ `;
205
+ }
206
+ /**
207
+ * template button register
208
+ */
209
+ registerButtonTemplate() {
210
+ return html `
211
+ <button
212
+ onClick=${this.redirectToRegister}
213
+ class="bg-green-500 px-5 py-3 w-full rounded-md font-bold text-grey-100 text-sm md:text-base"
214
+ >
215
+ Daftar Akun
216
+ </button>
217
+ `;
218
+ }
219
+ /**
220
+ * mengirim event ke datalayer
221
+ */
222
+ pushToDataLayer(eventName) {
223
+ window.dataLayer.push({
224
+ event: eventName,
225
+ page_title: this.tracker_page_title,
226
+ page_type: this.tracker_page_type,
227
+ content_type: this.tracker_content_type,
228
+ content_id: this.tracker_content_id,
229
+ content_title: this.tracker_content_title,
230
+ content_authors: this.tracker_content_authors,
231
+ content_editors: this.tracker_content_editors,
232
+ content_tags: this.tracker_content_tags,
233
+ content_published_date: this.tracker_content_published_date,
234
+ content_categories: this.tracker_content_categories,
235
+ user_type: this.tracker_user_type || 'G',
236
+ subscription_status: this.tracker_subscription_status || '',
237
+ metered_wall_type: this.tracker_metered_wall_type || 'MRW',
238
+ metered_wall_balance: this.tracker_metered_wall_balance,
239
+ page_domain: this.tracker_page_domain || 'Kompas.id',
240
+ });
241
+ }
242
+ /**
243
+ * toggle isExpandBanner flag
244
+ */
245
+ triggerExpandBanner() {
246
+ this.isExpandBanner = !this.isExpandBanner;
247
+ return !this.isExpandBanner && this.pushToDataLayer('mrw_closed');
248
+ }
249
+ /**
250
+ * Lifecycle
251
+ */
252
+ async connectedCallback() {
253
+ super.connectedCallback();
254
+ await this.updateComplete;
255
+ this.loadData();
256
+ this.checkIsDesktop();
257
+ }
258
+ async loadData() {
259
+ const req = await fetch(`https://d3w4qaq4xm1ncv.cloudfront.net/assets/register_wall.json`);
260
+ if (req.status !== 200) {
261
+ throw new Error(`${req.status} Ada galat saat memproses permintaan.`);
262
+ }
263
+ this.textTemplate = await req.json();
264
+ const getCountdown = this.countdownArticle;
265
+ if (!getCountdown) {
266
+ this.isShowBanner = false;
267
+ }
268
+ else {
269
+ this.isExpandBanner = this.defaultExpandBanner;
270
+ }
271
+ if (this.isShowBanner) {
272
+ this.pushToDataLayer('mrw_viewed');
273
+ }
274
+ }
275
+ render() {
276
+ return this.isShowBanner
277
+ ? html `
278
+ <div class="sticky bottom-0 w-full h-full z-20">
279
+ <div class="w-full bg-blue-100 px-4 xl:px-0 bottom-0 py-4">
280
+ <div class="lg:max-w-7xl m-auto relative">
281
+ <div>${this.bannerTemplate()}</div>
282
+ </div>
283
+ </div>
284
+ </div>
285
+ `
286
+ : null;
287
+ }
288
+ };
289
+ KompasMeteredWallRegister.styles = [
290
+ css `
291
+ :host {
292
+ font-family: 'PT Sans', sans-serif;
293
+ }
294
+
295
+ .body {
296
+ position: sticky;
297
+ top: 0;
298
+ height: 100%;
299
+ width: 100%;
300
+ }
301
+
302
+ .btn-regis {
303
+ margin-left: 16px;
304
+ width: 127px;
305
+ }
306
+
307
+ .banner-content {
308
+ gap: 55px;
309
+ justify-content: space-between;
310
+ }
311
+
312
+ .cont-banner-content {
313
+ gap: 201px;
314
+ }
315
+
316
+ .expanded-btn {
317
+ width: 127px;
318
+ }
319
+ `,
320
+ TWStyles,
321
+ ];
322
+ __decorate([
323
+ state()
324
+ ], KompasMeteredWallRegister.prototype, "registerUrl", void 0);
325
+ __decorate([
326
+ state()
327
+ ], KompasMeteredWallRegister.prototype, "isShowBanner", void 0);
328
+ __decorate([
329
+ state()
330
+ ], KompasMeteredWallRegister.prototype, "isExpandBanner", void 0);
331
+ __decorate([
332
+ state()
333
+ ], KompasMeteredWallRegister.prototype, "textTemplate", void 0);
334
+ __decorate([
335
+ property({ type: Number })
336
+ ], KompasMeteredWallRegister.prototype, "countdownArticle", void 0);
337
+ __decorate([
338
+ property({ type: Boolean })
339
+ ], KompasMeteredWallRegister.prototype, "defaultExpandBanner", void 0);
340
+ __decorate([
341
+ property({ type: Boolean })
342
+ ], KompasMeteredWallRegister.prototype, "isDesktop", void 0);
343
+ __decorate([
344
+ property({ type: String })
345
+ ], KompasMeteredWallRegister.prototype, "tracker_page_title", void 0);
346
+ __decorate([
347
+ property({ type: String })
348
+ ], KompasMeteredWallRegister.prototype, "tracker_page_type", void 0);
349
+ __decorate([
350
+ property({ type: String })
351
+ ], KompasMeteredWallRegister.prototype, "tracker_content_type", void 0);
352
+ __decorate([
353
+ property({ type: String })
354
+ ], KompasMeteredWallRegister.prototype, "tracker_content_id", void 0);
355
+ __decorate([
356
+ property({ type: String })
357
+ ], KompasMeteredWallRegister.prototype, "tracker_content_title", void 0);
358
+ __decorate([
359
+ property({ type: String })
360
+ ], KompasMeteredWallRegister.prototype, "tracker_content_authors", void 0);
361
+ __decorate([
362
+ property({ type: String })
363
+ ], KompasMeteredWallRegister.prototype, "tracker_content_editors", void 0);
364
+ __decorate([
365
+ property({ type: String })
366
+ ], KompasMeteredWallRegister.prototype, "tracker_content_tags", void 0);
367
+ __decorate([
368
+ property({ type: String })
369
+ ], KompasMeteredWallRegister.prototype, "tracker_content_published_date", void 0);
370
+ __decorate([
371
+ property({ type: String })
372
+ ], KompasMeteredWallRegister.prototype, "tracker_content_categories", void 0);
373
+ __decorate([
374
+ property({ type: String })
375
+ ], KompasMeteredWallRegister.prototype, "tracker_user_type", void 0);
376
+ __decorate([
377
+ property({ type: String })
378
+ ], KompasMeteredWallRegister.prototype, "tracker_subscription_status", void 0);
379
+ __decorate([
380
+ property({ type: String })
381
+ ], KompasMeteredWallRegister.prototype, "tracker_metered_wall_type", void 0);
382
+ __decorate([
383
+ property({ type: Number })
384
+ ], KompasMeteredWallRegister.prototype, "tracker_metered_wall_balance", void 0);
385
+ __decorate([
386
+ property({ type: String })
387
+ ], KompasMeteredWallRegister.prototype, "tracker_page_domain", void 0);
388
+ __decorate([
389
+ property({ type: String })
390
+ ], KompasMeteredWallRegister.prototype, "next_param", void 0);
391
+ KompasMeteredWallRegister = __decorate([
392
+ customElement('kompasid-metered-wall-register')
393
+ ], KompasMeteredWallRegister);
394
+ export { KompasMeteredWallRegister };
395
+ //# sourceMappingURL=KompasMeteredWallRegister.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"KompasMeteredWallRegister.js","sourceRoot":"","sources":["../../../../src/components/kompasid-metered-wall-register/KompasMeteredWallRegister.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAIjD,IAAM,yBAAyB,GAA/B,MAAM,yBAA0B,SAAQ,UAAU;IAAlD;;QAmCL;;WAEG;QACH;;WAEG;QACM,gBAAW,GAClB,8DAA8D,CAAA;QAChE;;WAEG;QACM,iBAAY,GAAY,IAAI,CAAA;QACrC;;WAEG;QACM,mBAAc,GAAY,IAAI,CAAA;QACvC;;WAEG;QACc,iBAAY,GAA2B;YACtD,OAAO,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE;YAClD,MAAM,EAAE;gBACN,KAAK,EAAE,EAA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AA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uEAA0B;AACzB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iFAAoC;AACnC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6EAAgC;AAC/B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oEAAuB;AACtB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8EAAiC;AAChC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4EAA+B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+EAAiC;AAChC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;sEAAyB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DACqG;AAzGrH,yBAAyB;IADrC,aAAa,CAAC,gCAAgC,CAAC;GACnC,yBAAyB,CAoVrC;SApVY,yBAAyB","sourcesContent":["import { html, css, LitElement } from 'lit'\nimport { customElement, state, property } from 'lit/decorators.js'\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js'\nimport { getFontAwesomeIcon } from '../../utils/fontawesome-setup.js'\nimport { TWStyles } from '../../../tailwind/tailwind.js'\nimport { meteredRegisterContent } from './types.js'\n\n@customElement('kompasid-metered-wall-register')\nexport class KompasMeteredWallRegister extends LitElement {\n static styles = [\n css`\n :host {\n font-family: 'PT Sans', sans-serif;\n }\n\n .body {\n position: sticky;\n top: 0;\n height: 100%;\n width: 100%;\n }\n\n .btn-regis {\n margin-left: 16px;\n width: 127px;\n }\n\n .banner-content {\n gap: 55px;\n justify-content: space-between;\n }\n\n .cont-banner-content {\n gap: 201px;\n }\n\n .expanded-btn {\n width: 127px;\n }\n `,\n TWStyles,\n ]\n\n /**\n * state\n */\n /**\n * state registerUrl untuk memberikan link kemana user akan dialihkan.\n */\n @state() registerUrl: string =\n 'https://account.kompas.id/register?loc=metered_register_wall'\n /**\n * state isShowBanner untuk memunculkan component.\n */\n @state() isShowBanner: boolean = true\n /**\n * state isExpandBanner untuk menentukan apakah component sedang dalam mode expand.\n */\n @state() isExpandBanner: boolean = true\n /**\n * state textTemplate untuk menyimpan template yang di berikan.\n */\n @state() private textTemplate: meteredRegisterContent = {\n default: { title: '', lastArticle: { title: '' } },\n expand: {\n title: '',\n description: '',\n lastArticle: { title: '', description: '' },\n },\n }\n /**\n * Props\n */\n /**\n * prop countdownArticle untuk menghandle sudah berapa artikel gratis yang user baca.\n * prop defaultExpandBanner untuk menentukan keadaan awal komponen apakah dalam mode expand atau tidak.\n * prop tracker_page_title untuk title of the page\n * prop tracker_page_type untuk type of the page\n * prop tracker_content_type untuk whether it's a free article or paid article (will only be sent if the user views article detail page)\n * prop tracker_content_id untuk the ID for the article (will only be sent if the user views article detail page)\n * prop tracker_content_title untuk the title of the article (will only be sent if the user views article detail page)\n * prop tracker_content_authors untuk name of the authors (will only be sent if the user views article detail page)\n * prop tracker_content_editors untuk name of the editors (will only be sent if the user views article detail page)\n * prop tracker_content_tags untuk tags inside the article (will only be sent if the user views article detail page)\n * prop tracker_content_published_date untuk the published date (will only be sent if the user views article detail page)\n * prop tracker_content_categories untuk The main category the content belongs to\n * prop tracker_user_type untuk type of user based on their subscription\n * prop tracker_subscription_status untuk status of their subscription\n * prop tracker_metered_wall_type untuk the type of Metered Wall\n * prop tracker_metered_wall_balance untuk the balance of their metered wall\n * prop tracker_page_domain untuk Page Domain\n * prop next_param untuk page Domain\n */\n\n @property({ type: Number }) countdownArticle = 0\n @property({ type: Boolean }) defaultExpandBanner = false\n @property({ type: Boolean }) isDesktop = false\n @property({ type: String }) tracker_page_title = ''\n @property({ type: String }) tracker_page_type = ''\n @property({ type: String }) tracker_content_type = ''\n @property({ type: String }) tracker_content_id = ''\n @property({ type: String }) tracker_content_title = ''\n @property({ type: String }) tracker_content_authors = ''\n @property({ type: String }) tracker_content_editors = ''\n @property({ type: String }) tracker_content_tags = ''\n @property({ type: String }) tracker_content_published_date = ''\n @property({ type: String }) tracker_content_categories = ''\n @property({ type: String }) tracker_user_type = ''\n @property({ type: String }) tracker_subscription_status = ''\n @property({ type: String }) tracker_metered_wall_type = ''\n @property({ type: Number }) tracker_metered_wall_balance = 0\n @property({ type: String }) tracker_page_domain = ''\n @property({ type: String }) next_param =\n 'https://www.kompas.id/baca/opini/2023/12/05/masa-depan-wolbachia-sebagai-alternatif-pengendalian-dbd?open_from=Section_Opini'\n\n /**\n * menentukan template yang akan di render\n */\n private setTemplate(\n prop: string,\n mode: keyof meteredRegisterContent = 'default'\n ): string {\n let template = ''\n\n // dynamicMode dibuat agar typescript bisa akses data lastArticle\n const dynamicMode = this.textTemplate[mode]\n\n if ('lastArticle' in dynamicMode) {\n const lastArticleMode = dynamicMode as {\n lastArticle: { [key: string]: string }\n }\n template = lastArticleMode.lastArticle[prop] || ''\n } else {\n template = dynamicMode[prop] || ''\n }\n return template\n }\n\n private checkIsDesktop() {\n if (window.innerWidth >= 960) {\n this.isDesktop = true\n } else {\n this.isDesktop = false\n }\n }\n\n /**\n * Render Statement\n */\n\n private bannerTemplate() {\n return this.isExpandBanner\n ? this.expandedBannerContent()\n : this.defaultBannerContent()\n }\n\n private defaultBannerContent() {\n return html`\n <div>\n <div\n class=\"${this.isDesktop\n ? 'cont-banner-content justify-center'\n : null} flex flex-row justify-between\"\n >\n <div class=\"banner-content flex flex-row\">\n <div\n class=\"text-base md:text-lg font-lora mb-3 mt-1 md:mb-0 md:mt-0 pr-14 md:px-0\"\n .innerHTML=${this.setTemplate('title')}\n ></div>\n <div .hidden=\"${!this.isDesktop}\" class=\"md:self-center btn-regis\">\n ${this.isDesktop\n ? html`<div class=\"ml-4\"></div>\n ${this.registerButtonTemplate()}`\n : null}\n </div>\n </div>\n <div>\n <button\n @click=\"${this.triggerExpandBanner}\"\n class=\"h-9 w-9 flex ml-2 items-center justify-center text-blue-500 rounded bg-blue-200\"\n >\n <div\n class=\"icon icon-blue-600 ${this.isExpandBanner\n ? 'chevron-down'\n : 'rotate-180'}\"\n >\n ${unsafeSVG(getFontAwesomeIcon('fas', 'chevron-down'))}\n </div>\n </button>\n </div>\n </div>\n <div class=\"md:self-center mt-4\">\n ${!this.isDesktop ? html`${this.registerButtonTemplate()} ` : null}\n </div>\n </div>\n `\n }\n\n private expandedBannerContent() {\n return html`\n <div\n class=\"flex flex-col-reverse justify-evenly md:flex-row gap-4 md:gap-8\"\n >\n <div\n class=\"flex flex-col justify-evenly md:text-left md:w-5/12 gap-4 md:gap-2\"\n >\n <p\n class=\"text-lg md:text-2xl font-lora\"\n .innerHTML=${this.setTemplate('title', 'expand')}\n ></p>\n <p\n class=\"text-sm md:text-base\"\n .innerHTML=${this.setTemplate('description', 'expand')}\n ></p>\n <div class=\"${this.isDesktop ? null : 'expanded-btn'} md:self-start\">\n ${this.registerButtonTemplate()}\n </div>\n </div>\n <div class=\"flex justify-center\">\n <img\n alt=\"metered-wall-register\"\n src=\"https://d3w4qaq4xm1ncv.cloudfront.net/paywall-asset/paywall_ilustrasi3-03_1.png\"\n class=\"h-40 w-40 md:w-full md:h-full\"\n />\n </div>\n <button\n @click=\"${this.triggerExpandBanner}\"\n class=\"h-9 w-9 ${this.isDesktop\n ? null\n : 'ml-auto'} flex items-center justify-center text-blue-500 rounded bg-blue-200\"\n >\n <div\n class=\"icon icon-blue-600 ${this.isExpandBanner\n ? 'chevron-down'\n : 'rotate-180'}\"\n >\n ${unsafeSVG(getFontAwesomeIcon('fas', 'chevron-down'))}\n </div>\n </button>\n </div>\n `\n }\n\n /**\n * template button register\n */\n private registerButtonTemplate() {\n return html`\n <button\n onClick=${this.redirectToRegister}\n class=\"bg-green-500 px-5 py-3 w-full rounded-md font-bold text-grey-100 text-sm md:text-base\"\n >\n Daftar Akun\n </button>\n `\n }\n\n /**\n * mengarahkan ke page register\n */\n private redirectToRegister = (): void => {\n this.pushToDataLayer('mrw_clicked')\n const newUrl = new URL(decodeURIComponent(this.registerUrl))\n if (this.next_param)\n newUrl.searchParams.append('next', decodeURIComponent(this.next_param))\n window.location.href = newUrl.toString()\n }\n\n /**\n * mengirim event ke datalayer\n */\n private pushToDataLayer(eventName: string) {\n window.dataLayer.push({\n event: eventName,\n page_title: this.tracker_page_title,\n page_type: this.tracker_page_type,\n content_type: this.tracker_content_type,\n content_id: this.tracker_content_id,\n content_title: this.tracker_content_title,\n content_authors: this.tracker_content_authors,\n content_editors: this.tracker_content_editors,\n content_tags: this.tracker_content_tags,\n content_published_date: this.tracker_content_published_date,\n content_categories: this.tracker_content_categories,\n user_type: this.tracker_user_type || 'G',\n subscription_status: this.tracker_subscription_status || '',\n metered_wall_type: this.tracker_metered_wall_type || 'MRW',\n metered_wall_balance: this.tracker_metered_wall_balance,\n page_domain: this.tracker_page_domain || 'Kompas.id',\n })\n }\n\n /**\n * toggle isExpandBanner flag\n */\n private triggerExpandBanner() {\n this.isExpandBanner = !this.isExpandBanner\n return !this.isExpandBanner && this.pushToDataLayer('mrw_closed')\n }\n\n /**\n * Lifecycle\n */\n\n override async connectedCallback() {\n super.connectedCallback()\n await this.updateComplete\n this.loadData()\n this.checkIsDesktop()\n }\n\n private async loadData() {\n const req = await fetch(\n `https://d3w4qaq4xm1ncv.cloudfront.net/assets/register_wall.json`\n )\n\n if (req.status !== 200) {\n throw new Error(`${req.status} Ada galat saat memproses permintaan.`)\n }\n\n this.textTemplate = await req.json()\n\n const getCountdown = this.countdownArticle\n\n if (!getCountdown) {\n this.isShowBanner = false\n } else {\n this.isExpandBanner = this.defaultExpandBanner\n }\n\n if (this.isShowBanner) {\n this.pushToDataLayer('mrw_viewed')\n }\n }\n\n render() {\n return this.isShowBanner\n ? html`\n <div class=\"sticky bottom-0 w-full h-full z-20\">\n <div class=\"w-full bg-blue-100 px-4 xl:px-0 bottom-0 py-4\">\n <div class=\"lg:max-w-7xl m-auto relative\">\n <div>${this.bannerTemplate()}</div>\n </div>\n </div>\n </div>\n `\n : null\n }\n}\n"]}
@@ -0,0 +1,16 @@
1
+ export interface meteredRegisterContent {
2
+ expand: {
3
+ lastArticle: {
4
+ title: string;
5
+ description: string;
6
+ };
7
+ title: string;
8
+ description: string;
9
+ };
10
+ default: {
11
+ lastArticle: {
12
+ title: string;
13
+ };
14
+ title: string;
15
+ };
16
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/components/kompasid-metered-wall-register/types.ts"],"names":[],"mappings":"","sourcesContent":["export interface meteredRegisterContent {\n expand: {\n lastArticle: {\n title: string\n description: string\n }\n title: string\n description: string\n }\n default: {\n lastArticle: {\n title: string\n }\n title: string\n }\n}\n"]}
@@ -3,6 +3,7 @@ export { KompasFooter } from './components/kompasid-footer/KompasFooter.js';
3
3
  export { KompasPaywallVideo } from './components/kompasid-paywall-video/KompasPaywallVideo.js';
4
4
  export { KompasMeteredPaywall } from './components/kompasid-metered-paywall/KompasMeteredPaywall.js';
5
5
  export { KompasFreewall } from './components/kompasid-freewall/KompasFreewall.js';
6
+ export { KompasMeteredWallRegister } from './components/kompasid-metered-wall-register/KompasMeteredWallRegister.js';
6
7
  declare global {
7
8
  interface Window {
8
9
  gtag: (...args: any[]) => void;
package/dist/src/index.js CHANGED
@@ -3,4 +3,5 @@ export { KompasFooter } from './components/kompasid-footer/KompasFooter.js';
3
3
  export { KompasPaywallVideo } from './components/kompasid-paywall-video/KompasPaywallVideo.js';
4
4
  export { KompasMeteredPaywall } from './components/kompasid-metered-paywall/KompasMeteredPaywall.js';
5
5
  export { KompasFreewall } from './components/kompasid-freewall/KompasFreewall.js';
6
+ export { KompasMeteredWallRegister } from './components/kompasid-metered-wall-register/KompasMeteredWallRegister.js';
6
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAA;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAA","sourcesContent":["export { KompasPaywall } from './components/kompasid-paywall/KompasPaywall.js'\nexport { KompasFooter } from './components/kompasid-footer/KompasFooter.js'\nexport { KompasPaywallVideo } from './components/kompasid-paywall-video/KompasPaywallVideo.js'\nexport { KompasMeteredPaywall } from './components/kompasid-metered-paywall/KompasMeteredPaywall.js'\nexport { KompasFreewall } from './components/kompasid-freewall/KompasFreewall.js'\n\ndeclare global {\n interface Window {\n gtag: (...args: any[]) => void\n dataLayer: Record<string, any>\n }\n}\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAA;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAA;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2DAA2D,CAAA;AAC9F,OAAO,EAAE,oBAAoB,EAAE,MAAM,+DAA+D,CAAA;AACpG,OAAO,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAA;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,0EAA0E,CAAA","sourcesContent":["export { KompasPaywall } from './components/kompasid-paywall/KompasPaywall.js'\nexport { KompasFooter } from './components/kompasid-footer/KompasFooter.js'\nexport { KompasPaywallVideo } from './components/kompasid-paywall-video/KompasPaywallVideo.js'\nexport { KompasMeteredPaywall } from './components/kompasid-metered-paywall/KompasMeteredPaywall.js'\nexport { KompasFreewall } from './components/kompasid-freewall/KompasFreewall.js'\nexport { KompasMeteredWallRegister } from './components/kompasid-metered-wall-register/KompasMeteredWallRegister.js'\n\ndeclare global {\n interface Window {\n gtag: (...args: any[]) => void\n dataLayer: Record<string, any>\n }\n}\n"]}