@kompasid/lit-web-components 0.9.47 → 0.9.49

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.
Files changed (42) hide show
  1. package/demo/header.html +21 -5
  2. package/demo/paywall.html +3 -2
  3. package/dist/src/components/kompasid-header-account/KompasHeaderAccount.d.ts +1 -0
  4. package/dist/src/components/kompasid-header-account/KompasHeaderAccount.js +8 -0
  5. package/dist/src/components/kompasid-header-account/KompasHeaderAccount.js.map +1 -1
  6. package/dist/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.d.ts +1 -0
  7. package/dist/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.js +23 -6
  8. package/dist/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.js.map +1 -1
  9. package/dist/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.d.ts +3 -0
  10. package/dist/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.js +83 -6
  11. package/dist/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.js.map +1 -1
  12. package/dist/src/components/kompasid-paywall/KompasPaywall.js +0 -3
  13. package/dist/src/components/kompasid-paywall/KompasPaywall.js.map +1 -1
  14. package/dist/src/components/kompasid-paywall/types.d.ts +1 -0
  15. package/dist/src/components/kompasid-paywall/types.js.map +1 -1
  16. package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.d.ts +1 -0
  17. package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js +22 -1
  18. package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js.map +1 -1
  19. package/dist/src/components/kompasid-paywall-modal-register/KompasPaywallModalRegister.d.ts +36 -0
  20. package/dist/src/components/kompasid-paywall-modal-register/KompasPaywallModalRegister.js +589 -0
  21. package/dist/src/components/kompasid-paywall-modal-register/KompasPaywallModalRegister.js.map +1 -0
  22. package/dist/src/components/kompasid-paywall-modal-register/types.d.ts +33 -0
  23. package/dist/src/components/kompasid-paywall-modal-register/types.js +2 -0
  24. package/dist/src/components/kompasid-paywall-modal-register/types.js.map +1 -0
  25. package/dist/src/index.d.ts +1 -0
  26. package/dist/src/index.js +1 -0
  27. package/dist/src/index.js.map +1 -1
  28. package/dist/tailwind/tailwind.js +160 -5
  29. package/dist/tailwind/tailwind.js.map +1 -1
  30. package/dist/tsconfig.tsbuildinfo +1 -1
  31. package/package.json +1 -1
  32. package/src/components/kompasid-header-account/KompasHeaderAccount.ts +5 -0
  33. package/src/components/kompasid-header-account-menu/KompasHeaderAccountMenu.ts +25 -8
  34. package/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.ts +78 -6
  35. package/src/components/kompasid-paywall/KompasPaywall.ts +0 -4
  36. package/src/components/kompasid-paywall/types.ts +1 -0
  37. package/src/components/kompasid-paywall-body/KompasPaywallBody.ts +22 -1
  38. package/src/components/kompasid-paywall-modal-register/KompasPaywallModalRegister.ts +613 -0
  39. package/src/components/kompasid-paywall-modal-register/types.ts +39 -0
  40. package/src/index.ts +1 -0
  41. package/tailwind/tailwind.css +160 -5
  42. package/tailwind/tailwind.ts +160 -5
@@ -0,0 +1,613 @@
1
+ import { LitElement, html, css, nothing } from 'lit'
2
+ import { customElement, state, property } from 'lit/decorators.js'
3
+ import { unsafeSVG } from 'lit/directives/unsafe-svg.js'
4
+ import { addGoogleFonts } from '../../utils/googleFont.js'
5
+ import { getFontAwesomeIcon } from '../../utils/fontawesome-setup.js'
6
+ import { TWStyles } from '../../../tailwind/tailwind.js'
7
+ import { deviceType } from '../../utils/deviceType.js'
8
+ import { ModalRegister } from './types.js'
9
+
10
+ @customElement('kompasid-paywall-modal-register')
11
+ export class KompasPaywallModalRegister extends LitElement {
12
+ static styles = [
13
+ css`
14
+ :host {
15
+ display: block;
16
+ }
17
+
18
+ .bold-yellow b {
19
+ color: #dbaa00;
20
+ }
21
+
22
+ .modal-overlay {
23
+ position: fixed;
24
+ top: 0;
25
+ left: 0;
26
+ width: 100%;
27
+ height: 100%;
28
+ background-color: rgba(0, 0, 0, 0.5);
29
+ display: flex;
30
+ justify-content: center;
31
+ align-items: center;
32
+ z-index: 1000;
33
+ }
34
+
35
+ .modal-content {
36
+ background-color: #222222;
37
+ border-radius: 12px;
38
+ overflow: hidden;
39
+ position: relative;
40
+ }
41
+
42
+ .close-button {
43
+ position: absolute;
44
+ top: 10px;
45
+ right: 10px;
46
+ background: none;
47
+ border: none;
48
+ font-size: 1.5em;
49
+ color: #999999;
50
+ cursor: pointer;
51
+ z-index: 1;
52
+ }
53
+
54
+ .transparent-linear-dark {
55
+ background-image: -webkit-gradient(
56
+ linear,
57
+ left top,
58
+ left bottom,
59
+ from(hsla(0, 0%, 18%, 0)),
60
+ to(#333333)
61
+ );
62
+ background-image: linear-gradient(180deg, hsla(0, 0%, 18%, 0), #333333);
63
+ }
64
+
65
+ .font-lora {
66
+ font-family: 'Lora', 'Georgia', 'serif';
67
+ }
68
+ `,
69
+ TWStyles,
70
+ ]
71
+
72
+ /**
73
+ * Properties
74
+ */
75
+ @property({ type: String }) subscriptionStatus = ''
76
+ @property({ type: String }) userGuid = ''
77
+
78
+ @state() private isModalOpen = false
79
+ @state() private confirmation = false
80
+ @state() private dataModalRegister: ModalRegister = {} as ModalRegister
81
+ @state() private showModalRegister = false
82
+
83
+ /**
84
+ * Lifecycle
85
+ */
86
+ override connectedCallback() {
87
+ super.connectedCallback()
88
+ addGoogleFonts(['pt-sans', 'lora', 'roboto-condensed'])
89
+ this.getRegisterProData()
90
+ }
91
+
92
+ async getRegisterProData() {
93
+ try {
94
+ const response = await fetch(
95
+ 'https://cdn-www.kompas.id/web-component/form-b2b-kompas-pro.json'
96
+ )
97
+ const data = await response.json()
98
+ this.dataModalRegister = data
99
+ } catch (error) {
100
+ if (error instanceof Error) {
101
+ console.log(error.message)
102
+ }
103
+ } finally {
104
+ this.showModalRegister = true
105
+ }
106
+ }
107
+
108
+ openModal() {
109
+ this.isModalOpen = true
110
+ }
111
+
112
+ closeModal() {
113
+ this.isModalOpen = false
114
+ this.confirmation = false
115
+ }
116
+
117
+ @state()
118
+ private showMobileBenefit = false
119
+
120
+ @state()
121
+ private formData = {
122
+ nameUser: '',
123
+ email: '',
124
+ nomor: '',
125
+ nameCompany: '',
126
+ }
127
+
128
+ @state()
129
+ private formErrors = {
130
+ nameUser: '',
131
+ email: '',
132
+ nomor: '',
133
+ nameCompany: '',
134
+ }
135
+
136
+ @state()
137
+ private formTouched = {
138
+ nameUser: false,
139
+ email: false,
140
+ nomor: false,
141
+ nameCompany: false,
142
+ }
143
+
144
+ @state()
145
+ private formSubmitted = false
146
+
147
+ private toggleMobileBenefit() {
148
+ this.showMobileBenefit = !this.showMobileBenefit
149
+ }
150
+
151
+ private handleInput(e: InputEvent) {
152
+ const target = e.target as HTMLInputElement
153
+ const name = target.name as keyof typeof this.formData
154
+ this.formData = {
155
+ ...this.formData,
156
+ [name]: target.value,
157
+ }
158
+
159
+ if (this.formTouched[name] || this.formSubmitted) {
160
+ this.validateField(name)
161
+ }
162
+ }
163
+
164
+ private handleBlur(e: FocusEvent) {
165
+ const target = e.target as HTMLInputElement
166
+ const name = target.name as keyof typeof this.formData
167
+ this.formTouched = {
168
+ ...this.formTouched,
169
+ [name]: true,
170
+ }
171
+ this.validateField(name)
172
+ }
173
+
174
+ private validateField(field: keyof typeof this.formData) {
175
+ const value = this.formData[field].trim()
176
+ let error = ''
177
+
178
+ if (!value) {
179
+ switch (field) {
180
+ case 'nameUser':
181
+ error = 'Nama lengkap harus diisi.'
182
+ break
183
+ case 'email':
184
+ error = 'Email harus diisi.'
185
+ break
186
+ case 'nomor':
187
+ error = 'Nomor kontak harus diisi.'
188
+ break
189
+ case 'nameCompany':
190
+ error = 'Nama perusahaan/asosiasi harus diisi.'
191
+ break
192
+ default:
193
+ error = ''
194
+ break
195
+ }
196
+ } else if (field === 'email' && !/^\S+@\S+\.\S+$/.test(value)) {
197
+ error = 'Masukan email yang valid.'
198
+ } else if (field === 'nomor' && !/^[0-9+\-\s()]{6,20}$/.test(value)) {
199
+ error = 'Masukan nomor kontak yang valid.'
200
+ }
201
+
202
+ this.formErrors = {
203
+ ...this.formErrors,
204
+ [field]: error,
205
+ }
206
+ }
207
+
208
+ private validateForm() {
209
+ this.validateField('nameUser')
210
+ this.validateField('email')
211
+ this.validateField('nomor')
212
+ this.validateField('nameCompany')
213
+
214
+ return (
215
+ Object.values(this.formErrors).every(error => !error) &&
216
+ Object.values(this.formData).every(value => value.trim() !== '')
217
+ )
218
+ }
219
+
220
+ private async handleSubmit(e: Event) {
221
+ e.preventDefault()
222
+ this.formSubmitted = true
223
+
224
+ const isValid = this.validateForm()
225
+ if (!isValid) {
226
+ return
227
+ }
228
+
229
+ const formResult = {
230
+ name: this.formData.nameUser,
231
+ email: this.formData.email,
232
+ phone: this.formData.nomor,
233
+ company: this.formData.nameCompany,
234
+ }
235
+
236
+ this.confirmation = true
237
+
238
+ // Send form data to Zapier
239
+ try {
240
+ const formBody = new URLSearchParams(formResult)
241
+ await fetch('https://hooks.zapier.com/hooks/catch/14222434/uedqovx/', {
242
+ method: 'POST',
243
+ body: formBody,
244
+ })
245
+ } catch (err) {
246
+ console.error('Form submission error:', err)
247
+ }
248
+ }
249
+
250
+ private customerServiceClicked() {
251
+ this.redirectToHelpdesk()
252
+ }
253
+
254
+ private redirectToHelpdesk(): void {
255
+ this.sendDataLayeronHelpDesk()
256
+ window.open(
257
+ 'https://api.whatsapp.com/send/?phone=6281290050800&text=Halo,%20saya%20perlu%20informasi%20mengenai%20kompas.id'
258
+ )
259
+ }
260
+
261
+ private sendDataLayeronHelpDesk(): void {
262
+ window.dataLayer.push({
263
+ event: 'helpOfferClick',
264
+ userType: this.subscriptionStatus,
265
+ GUID: this.userGuid,
266
+ interface: deviceType(),
267
+ })
268
+ }
269
+
270
+ private templateForm = () => html`
271
+ <div class="text-white text-center font-sans py-6 px-4 md:px-20 md:py-16">
272
+ <h1 class="font-lora text-xl md:text-2xl font-bold">
273
+ Akses Penuh Media Intelligence dengan Paket Langganan Korporasi
274
+ </h1>
275
+ <div class="text-grey-200 text-sm md:text-base mt-4">
276
+ Lengkapi formulir ini untuk dapatkan konsultasi paket korporasi Kompas
277
+ Professional dan penawaran harga terbaik bagi organisasi Anda.
278
+ </div>
279
+ <div>
280
+ <form
281
+ @submit="${this.handleSubmit}"
282
+ action=""
283
+ class="mt-8 gap-6 flex flex-col"
284
+ >
285
+ <div class="flex flex-col gap-2">
286
+ <label for="nameUser" class="font-bold flex flex-row">
287
+ Nama Lengkap
288
+ <span class="text-[#F57A7A] flex items-start">*</span>
289
+ </label>
290
+ <input
291
+ id="nameUser"
292
+ name="nameUser"
293
+ type="text"
294
+ placeholder=""
295
+ class="p-2 bg-grey-500 rounded border border-grey-400"
296
+ .value="${this.formData.nameUser}"
297
+ @input="${this.handleInput}"
298
+ @blur="${this.handleBlur}"
299
+ aria-invalid="${!!this.formErrors.nameUser}"
300
+ />
301
+ ${(this.formTouched.nameUser || this.formSubmitted) &&
302
+ this.formErrors.nameUser
303
+ ? html`
304
+ <div
305
+ class="text-sm text-[#F57A7A] flex flex-row items-center"
306
+ >
307
+ <div class="h-4 w-4 flex items-center justify-center mr-2">
308
+ ${unsafeSVG(
309
+ getFontAwesomeIcon('fas', 'exclamation-circle', 10, 10)
310
+ )}
311
+ </div>
312
+ ${this.formErrors.nameUser}
313
+ </div>
314
+ `
315
+ : ''}
316
+ </div>
317
+ <div class="flex flex-col gap-2">
318
+ <label for="email" class="font-bold flex flex-row">
319
+ Email
320
+ <span class="text-[#F57A7A] flex items-start">*</span>
321
+ </label>
322
+ <input
323
+ autocomplete="off"
324
+ id="email"
325
+ name="email"
326
+ type="email"
327
+ placeholder=""
328
+ class="p-2 bg-grey-500 rounded border border-grey-400"
329
+ .value="${this.formData.email}"
330
+ @input="${this.handleInput}"
331
+ @blur="${this.handleBlur}"
332
+ aria-invalid="${!!this.formErrors.email}"
333
+ />
334
+ ${(this.formTouched.email || this.formSubmitted) &&
335
+ this.formErrors.email
336
+ ? html`
337
+ <div
338
+ class="text-sm text-[#F57A7A] flex flex-row items-center"
339
+ >
340
+ <div class="h-4 w-4 flex items-center justify-center mr-2">
341
+ ${unsafeSVG(
342
+ getFontAwesomeIcon('fas', 'exclamation-circle', 10, 10)
343
+ )}
344
+ </div>
345
+ ${this.formErrors.email}
346
+ </div>
347
+ `
348
+ : ''}
349
+ </div>
350
+ <div class="flex flex-col gap-2">
351
+ <label for="nomor" class="font-bold flex flex-row">
352
+ Nomor Kontak (WhatsApp/Ponsel)
353
+ <span class="text-[#F57A7A] flex items-start">*</span>
354
+ </label>
355
+ <input
356
+ autocomplete="off"
357
+ id="nomor"
358
+ name="nomor"
359
+ type="tel"
360
+ placeholder=""
361
+ class="p-2 bg-grey-500 rounded border border-grey-400"
362
+ .value="${this.formData.nomor}"
363
+ @input="${this.handleInput}"
364
+ @blur="${this.handleBlur}"
365
+ aria-invalid="${!!this.formErrors.nomor}"
366
+ />
367
+ ${(this.formTouched.nomor || this.formSubmitted) &&
368
+ this.formErrors.nomor
369
+ ? html`
370
+ <div
371
+ class="text-sm text-[#F57A7A] flex flex-row items-center"
372
+ >
373
+ <div class="h-4 w-4 flex items-center justify-center mr-2">
374
+ ${unsafeSVG(
375
+ getFontAwesomeIcon('fas', 'exclamation-circle', 10, 10)
376
+ )}
377
+ </div>
378
+ ${this.formErrors.nomor}
379
+ </div>
380
+ `
381
+ : ''}
382
+ </div>
383
+ <div class="flex flex-col gap-2">
384
+ <label for="name_company" class="font-bold flex flex-row">
385
+ Nama Perusahaan/Asosiasi
386
+ <span class="text-[#F57A7A] flex items-start">*</span>
387
+ </label>
388
+ <input
389
+ id="name_company"
390
+ name="nameCompany"
391
+ type="text"
392
+ placeholder=""
393
+ class="p-2 bg-grey-500 rounded border border-grey-400"
394
+ .value="${this.formData.nameCompany}"
395
+ @input="${this.handleInput}"
396
+ @blur="${this.handleBlur}"
397
+ aria-invalid="${!!this.formErrors.nameCompany}"
398
+ />
399
+ ${(this.formTouched.nameCompany || this.formSubmitted) &&
400
+ this.formErrors.nameCompany
401
+ ? html`
402
+ <div
403
+ class="text-sm text-[#F57A7A] flex flex-row items-center"
404
+ >
405
+ <div class="h-4 w-4 flex items-center justify-center mr-2">
406
+ ${unsafeSVG(
407
+ getFontAwesomeIcon('fas', 'exclamation-circle', 10, 10)
408
+ )}
409
+ </div>
410
+ ${this.formErrors.nameCompany}
411
+ </div>
412
+ `
413
+ : ''}
414
+ </div>
415
+ <button
416
+ type="submit"
417
+ class="bg-yellow-500 text-center h-10 rounded text-grey-600 mt-2 w-full font-bold"
418
+ >
419
+ Kirim
420
+ </button>
421
+ </form>
422
+ </div>
423
+ </div>
424
+ `
425
+
426
+ render() {
427
+ return this.showModalRegister
428
+ ? html`<div
429
+ class="px-4 font-sans flex flex-wrap items-center justify-between rounded-lg md:mx-0 w-full min-h-[68px] bg-white relative"
430
+ >
431
+ <div class="flex flex-col gap-1">
432
+ <span class="text-xs leading-tight text-grey-500">
433
+ ${this.dataModalRegister.card.labelPackage}
434
+ </span>
435
+ <div class="flex items-baseline">
436
+ <h5 class="text-base font-bold text-orange-400 leading-none">
437
+ ${this.dataModalRegister.card.textInvitation}
438
+ </h5>
439
+ </div>
440
+ </div>
441
+ <button
442
+ @click="${this.openModal}"
443
+ class="h-8 rounded ${this.dataModalRegister.card.isButtonSolid
444
+ ? 'bg-green-500 text-white'
445
+ : 'bg-white border border-green-500 text-green-500'} flex items-center"
446
+ >
447
+ <h6 class="text-xs md:text-sm font-bold py-2 px-4">
448
+ ${this.dataModalRegister.card.textButton}
449
+ </h6>
450
+ </button>
451
+ </div>
452
+
453
+ ${this.isModalOpen && !this.confirmation
454
+ ? html`
455
+ <div
456
+ class="modal-overlay p-4"
457
+ @click="${this.closeModal}"
458
+ @keydown=${() => this.closeModal()}
459
+ >
460
+ <div
461
+ class="modal-content max-w-7xl w-full flex flex-col lg:flex-row max-h-full overflow-auto"
462
+ @click="${(e: { stopPropagation: () => any }) =>
463
+ e.stopPropagation()}"
464
+ @keydown=${(e: { stopPropagation: () => any }) =>
465
+ e.stopPropagation()}
466
+ >
467
+ <button class="close-button" @click="${this.closeModal}">
468
+ ${unsafeSVG(getFontAwesomeIcon('fa', 'times', 20, 20))}
469
+ </button>
470
+ <div
471
+ class="bg-grey-600 lg:max-w-[515px] w-full p-4 md:p-16 justify-between items-center flex flex-col relative"
472
+ >
473
+ <div class="items-center flex flex-col">
474
+ ${this.dataModalRegister.modal.registerPopUp.logo
475
+ ? html`
476
+ <img
477
+ class=" max-w-[214px] md:max-w-[321px] pt-2 md:pt-0"
478
+ src="${this.dataModalRegister.modal
479
+ .registerPopUp.logo}"
480
+ alt="logo kompas pro mining"
481
+ />
482
+ `
483
+ : nothing}
484
+ <div
485
+ class="flex flex-col mt-6 md:mt-10 gap-2 text-left overflow-hidden ${this
486
+ .showMobileBenefit
487
+ ? 'max-h-fit'
488
+ : 'max-h-[150px] md:max-h-fit'}"
489
+ >
490
+ ${this.dataModalRegister.modal.registerPopUp
491
+ .benefits &&
492
+ this.dataModalRegister.modal.registerPopUp.benefits
493
+ .length
494
+ ? this.dataModalRegister.modal.registerPopUp.benefits.map(
495
+ item =>
496
+ html`
497
+ <div
498
+ class="flex items-baseline text-left text-white"
499
+ >
500
+ <div
501
+ class="text-green-400 h-5 w-5 md:h-6 md:w-6 flex shrink-0 items-center justify-center"
502
+ >
503
+ ${unsafeSVG(
504
+ getFontAwesomeIcon(
505
+ 'fas',
506
+ 'check',
507
+ 16,
508
+ 16
509
+ )
510
+ )}
511
+ </div>
512
+ <h6
513
+ class="text-sm md:text-lg font-sans ml-1 leading-6"
514
+ >
515
+ ${item}
516
+ </h6>
517
+ </div>
518
+ `
519
+ )
520
+ : nothing}
521
+ </div>
522
+ </div>
523
+ <button
524
+ @click="${this.toggleMobileBenefit}"
525
+ class="bg-grey-600 absolute text-grey-100 py-6 w-full bottom-0 left-0 text-center md:hidden"
526
+ >
527
+ <div
528
+ class="h-12 transparent-linear-dark -mt-[72px] z-0 w-full absolute ${this
529
+ .showMobileBenefit
530
+ ? 'hidden'
531
+ : ''}"
532
+ ></div>
533
+ <div
534
+ class="flex flex-row items-center justify-center gap-4"
535
+ >
536
+ ${this.showMobileBenefit
537
+ ? 'Sembunyikan'
538
+ : 'Lihat keuntungan lainnnya'}
539
+ ${unsafeSVG(
540
+ getFontAwesomeIcon(
541
+ 'fas',
542
+ this.showMobileBenefit
543
+ ? 'chevron-up'
544
+ : 'chevron-down'
545
+ )
546
+ )}
547
+ </div>
548
+ </button>
549
+ <div
550
+ class="hidden md:block text-grey-300 pt-10 border-t border-grey-500 w-full text-center"
551
+ >
552
+ Butuh bantuan? Hubungi
553
+ <button
554
+ @click=${this.customerServiceClicked}
555
+ class="font-bold underline"
556
+ >
557
+ Layanan Pelanggan.
558
+ </button>
559
+ </div>
560
+ </div>
561
+ <div class="w-full h-full">${this.templateForm()}</div>
562
+ </div>
563
+ </div>
564
+ `
565
+ : ''}
566
+ ${this.isModalOpen && this.confirmation
567
+ ? html` <div
568
+ class="modal-overlay px-4"
569
+ @click="${this.closeModal}"
570
+ @keydown=${() => this.closeModal()}
571
+ >
572
+ <div
573
+ class="modal-content max-w-[624px] max-h-[577px] items-end flex flex-col justify-end h-full w-full p-4 md:p-10"
574
+ @click="${(e: { stopPropagation: () => any }) =>
575
+ e.stopPropagation()}"
576
+ @keydown=${(e: { stopPropagation: () => any }) =>
577
+ e.stopPropagation()}
578
+ >
579
+ <button class="close-button" @click="${this.closeModal}">
580
+ ${unsafeSVG(getFontAwesomeIcon('fa', 'times', 20, 20))}
581
+ </button>
582
+ ${this.dataModalRegister.modal.successPopUp.logo
583
+ ? html`
584
+ <img
585
+ class="w-full max-w-[242px] mx-auto"
586
+ src="${this.dataModalRegister.modal.successPopUp
587
+ .logo}"
588
+ alt="konfirmasi"
589
+ />
590
+ `
591
+ : nothing}
592
+ <div class="text-grey-300 text-center mt-8">
593
+ <h1 class="text-lg md:text-xl font-bold ">
594
+ ${this.dataModalRegister.modal.successPopUp.title}
595
+ </h1>
596
+ <p
597
+ class="text-sm md:text-base mt-4 bold-yellow"
598
+ .innerHTML="${this.dataModalRegister.modal.successPopUp
599
+ .description}"
600
+ ></p>
601
+ <button
602
+ @click="${this.closeModal}"
603
+ class="bg-yellow-500 text-center h-10 rounded text-grey-600 mt-6 w-full font-bold"
604
+ >
605
+ Oke
606
+ </button>
607
+ </div>
608
+ </div>
609
+ </div>`
610
+ : ''} `
611
+ : nothing
612
+ }
613
+ }
@@ -0,0 +1,39 @@
1
+ export interface CardRegister {
2
+ labelPackage: string
3
+ textInvitation: string
4
+ isButtonSolid: boolean
5
+ textButton: string
6
+ }
7
+
8
+ export interface hotline {
9
+ text: string
10
+ url: string
11
+ }
12
+
13
+ export interface sectionRegister {
14
+ title: string
15
+ description: string
16
+ }
17
+
18
+ export interface popUpRegister {
19
+ logo: string
20
+ benefits: string[]
21
+ sectionRegister: sectionRegister
22
+ hotline: hotline
23
+ }
24
+
25
+ export interface popUpSuccess {
26
+ logo: string
27
+ title: string
28
+ description: string
29
+ }
30
+
31
+ export interface PopUp {
32
+ registerPopUp: popUpRegister
33
+ successPopUp: popUpSuccess
34
+ }
35
+
36
+ export interface ModalRegister {
37
+ card: CardRegister
38
+ modal: PopUp
39
+ }
package/src/index.ts CHANGED
@@ -11,6 +11,7 @@ export { KompasHeaderAccount } from './components/kompasid-header-account/Kompas
11
11
  export { KompasHeaderNotification } from './components/kompasid-header-notification/KompasHeaderNotification.js'
12
12
  export { KompasGracePeriod } from './components/kompasid-grace-period/KompasGracePeriod.js'
13
13
  export { KompasMeteredPaywallPersonalize } from './components/kompasid-metered-paywall-personalize/KompasMeteredPaywallPersonalize.js'
14
+ export { KompasPaywallModalRegister } from './components/kompasid-paywall-modal-register/KompasPaywallModalRegister.js'
14
15
 
15
16
  declare global {
16
17
  interface Window {