@kompasid/lit-web-components 0.9.53 → 0.9.55
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/header.html +36 -3
- package/dist/src/components/kompasid-grace-period/KompasGracePeriod.d.ts +12 -1
- package/dist/src/components/kompasid-grace-period/KompasGracePeriod.js +138 -55
- package/dist/src/components/kompasid-grace-period/KompasGracePeriod.js.map +1 -1
- package/dist/src/components/kompasid-header-account/types.d.ts +6 -0
- package/dist/src/components/kompasid-header-account/types.js.map +1 -1
- package/dist/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.d.ts +1 -0
- package/dist/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.js +20 -0
- package/dist/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.js.map +1 -1
- package/dist/tailwind/tailwind.js +6 -49
- package/dist/tailwind/tailwind.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/kompasid-grace-period/KompasGracePeriod.ts +149 -59
- package/src/components/kompasid-grace-period/readme.md +5 -2
- package/src/components/kompasid-header-account/readme.md +18 -3
- package/src/components/kompasid-header-account/types.ts +7 -2
- package/src/components/kompasid-header-account-profile/KompasHeaderAccountProfile.ts +22 -0
- package/tailwind/tailwind.css +6 -49
- package/tailwind/tailwind.ts +6 -49
|
@@ -36,6 +36,9 @@ export class KompasGracePeriod extends LitElement {
|
|
|
36
36
|
* property isColumn = changes how the component looks on different screen sizes
|
|
37
37
|
* property isShowButton = shows or hides a subscription button
|
|
38
38
|
* property isEpaper = is paywall opened in epaper page
|
|
39
|
+
* property memberhsip_channel_id = the ID of the subscription package by platform
|
|
40
|
+
* property payment_method = the payment method used by user
|
|
41
|
+
* property offering = the offering product
|
|
39
42
|
* property paywall_location = the location where user encounter the paywall
|
|
40
43
|
* property paywall_subscription_package = the name of the subscription package viewed by user
|
|
41
44
|
* property paywall_subscription_id = the ID of the subscription package viewed by user
|
|
@@ -55,13 +58,16 @@ export class KompasGracePeriod extends LitElement {
|
|
|
55
58
|
*/
|
|
56
59
|
|
|
57
60
|
@property({ type: Number }) totalGracePeriod = 0
|
|
61
|
+
@property({ type: Number }) memberhsip_channel_id = 0 // [2 5 8] itu autorenewal
|
|
62
|
+
@property({ type: String }) payment_method = '' // xendit_shopeepay, midtrans_gopay, xendit_ovo , midtrans_cc
|
|
63
|
+
@property({ type: String }) offering = '' // Q1 ... Q5, [Q5 default]
|
|
58
64
|
@property({ type: Boolean }) isColumn = false
|
|
59
65
|
@property({ type: Boolean }) isShowButton = true
|
|
60
66
|
@property({ type: Boolean }) isEpaper = false
|
|
61
67
|
@property({ type: Boolean }) isBackgroundOnContentOnly = false
|
|
62
68
|
@property({ type: String }) source = 'article'
|
|
63
69
|
@property({ type: String }) paywall_location = ''
|
|
64
|
-
@property({ type: String }) paywall_subscription_package = ''
|
|
70
|
+
@property({ type: String }) paywall_subscription_package = '' // kdp, kompas-one, kdp-koran
|
|
65
71
|
@property({ type: Number }) paywall_subscription_id = 0
|
|
66
72
|
@property({ type: Number }) paywall_subscription_price = 0
|
|
67
73
|
@property({ type: Number }) paywall_position = 0
|
|
@@ -84,6 +90,9 @@ export class KompasGracePeriod extends LitElement {
|
|
|
84
90
|
@state() private subscriptionPage = 'https://www.kompas.id/berlangganan'
|
|
85
91
|
@state() private checkoutPage = 'https://checkoutv2.kompas.id'
|
|
86
92
|
@state() private tempTextEachDay = []
|
|
93
|
+
@state() private basketSize: { [key: string]: string } = {}
|
|
94
|
+
@state() private messages: { [key: string]: string } = {}
|
|
95
|
+
@state() private templateCheckout: string = ''
|
|
87
96
|
@state() private tempButtonA: {
|
|
88
97
|
url: string
|
|
89
98
|
text: string
|
|
@@ -99,19 +108,65 @@ export class KompasGracePeriod extends LitElement {
|
|
|
99
108
|
text: '',
|
|
100
109
|
}
|
|
101
110
|
|
|
111
|
+
private isAutoRenewal() {
|
|
112
|
+
if (!this.memberhsip_channel_id) return false
|
|
113
|
+
|
|
114
|
+
if (
|
|
115
|
+
this.memberhsip_channel_id === 2 ||
|
|
116
|
+
this.memberhsip_channel_id === 5 ||
|
|
117
|
+
this.memberhsip_channel_id === 8
|
|
118
|
+
) {
|
|
119
|
+
return true
|
|
120
|
+
}
|
|
121
|
+
return false
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
private isWallet() {
|
|
125
|
+
if (!this.memberhsip_channel_id) return false
|
|
126
|
+
|
|
127
|
+
const isMobile =
|
|
128
|
+
this.memberhsip_channel_id === 5 || this.memberhsip_channel_id === 2
|
|
129
|
+
if (this.payment_method.includes('cc')) {
|
|
130
|
+
return false
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
if (isMobile) {
|
|
134
|
+
return false
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
return true
|
|
138
|
+
}
|
|
139
|
+
|
|
102
140
|
private getCountdownGracePeriod() {
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
141
|
+
// 8=Autorenewal
|
|
142
|
+
// 5=Apple
|
|
143
|
+
// 2=Google
|
|
144
|
+
const isMobile =
|
|
145
|
+
this.memberhsip_channel_id === 5 || this.memberhsip_channel_id === 2
|
|
146
|
+
|
|
147
|
+
if (!this.isAutoRenewal() || isMobile) {
|
|
148
|
+
return this.messages.default
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
// if string contains cc
|
|
152
|
+
if (this.payment_method.includes('cc')) {
|
|
153
|
+
return this.messages.credit_card
|
|
154
|
+
}
|
|
155
|
+
return this.messages.ewallet
|
|
156
|
+
|
|
157
|
+
// Comment old
|
|
158
|
+
// const { totalGracePeriod } = this
|
|
159
|
+
// const { maxGracePeriod } = this
|
|
160
|
+
// return html`
|
|
161
|
+
// <p
|
|
162
|
+
// class="message-gp"
|
|
163
|
+
// .innerHTML=${this.tempTextEachDay[
|
|
164
|
+
// totalGracePeriod > maxGracePeriod
|
|
165
|
+
// ? maxGracePeriod - 1
|
|
166
|
+
// : totalGracePeriod - 1 // template maksimal 7 hari
|
|
167
|
+
// ]}
|
|
168
|
+
// ></p>
|
|
169
|
+
// `
|
|
115
170
|
// comment old html
|
|
116
171
|
// if (totalGracePeriod === 7) {
|
|
117
172
|
// return html`
|
|
@@ -151,27 +206,56 @@ export class KompasGracePeriod extends LitElement {
|
|
|
151
206
|
)
|
|
152
207
|
}
|
|
153
208
|
|
|
154
|
-
private
|
|
155
|
-
|
|
156
|
-
this.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
const urlComputed = url || `${this.subscriptionPage}?open_from=Grace_Period`
|
|
209
|
+
private redirectCekSaldo(): void {
|
|
210
|
+
// this.dataLayeronPerbaruiLanggananButton()
|
|
211
|
+
// this.sendGtmEvent('subscribe_button_clicked', true)
|
|
212
|
+
const urlComputed =
|
|
213
|
+
'https://kb.kompas.id/baca/berlangganan-kompas-id/langganan-kompas-id/mengapa-perpanjangan-pembaruan-langganan-otomatis-melalui-e-wallet-belum-berhasil/'
|
|
160
214
|
window.open(urlComputed)
|
|
161
215
|
}
|
|
162
216
|
|
|
163
217
|
private redirectToCheckout(): void {
|
|
164
|
-
const {
|
|
165
|
-
|
|
166
|
-
|
|
218
|
+
const {
|
|
219
|
+
paywall_subscription_package: paywallSubscriptionPackage,
|
|
220
|
+
paywall_subscription_id: paywallSubscriptionId,
|
|
221
|
+
basketSize,
|
|
222
|
+
templateCheckout,
|
|
223
|
+
offering,
|
|
224
|
+
} = this
|
|
225
|
+
const tempOffering = offering || 'Q5'
|
|
226
|
+
const tempPackageSlug = paywallSubscriptionPackage.toLowerCase()
|
|
167
227
|
|
|
228
|
+
this.dataLayeronPerbaruiLanggananButton()
|
|
168
229
|
this.sendGtmEvent('subscribe_button_clicked')
|
|
169
230
|
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
231
|
+
if (!paywallSubscriptionId) {
|
|
232
|
+
window.open(basketSize[tempOffering])
|
|
233
|
+
return
|
|
234
|
+
}
|
|
173
235
|
|
|
174
|
-
|
|
236
|
+
if (tempPackageSlug.includes('kdp') && !tempPackageSlug.includes('koran')) {
|
|
237
|
+
window.open(basketSize[tempOffering])
|
|
238
|
+
} else {
|
|
239
|
+
window.open(
|
|
240
|
+
templateCheckout.replace(
|
|
241
|
+
'_productid_',
|
|
242
|
+
paywallSubscriptionId.toString()
|
|
243
|
+
)
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
// comment old
|
|
248
|
+
// const { url = '' } = this.tempButtonA
|
|
249
|
+
// this.dataLayeronPerbaruiLanggananButton()
|
|
250
|
+
// const originHost: string = encodeURIComponent(window.location.href)
|
|
251
|
+
|
|
252
|
+
// this.sendGtmEvent('subscribe_button_clicked')
|
|
253
|
+
|
|
254
|
+
// const defaultPath =
|
|
255
|
+
// url ||
|
|
256
|
+
// `${this.checkoutPage}/v2/kdp?productId=${this.paywall_subscription_id}&autorenewal=1`
|
|
257
|
+
|
|
258
|
+
// window.open(`${defaultPath}&referrer=${originHost}&source=${this.source}`)
|
|
175
259
|
}
|
|
176
260
|
|
|
177
261
|
private getGtmParams(
|
|
@@ -251,56 +335,52 @@ export class KompasGracePeriod extends LitElement {
|
|
|
251
335
|
|
|
252
336
|
const { text: textA = '' } = this.tempButtonA
|
|
253
337
|
|
|
254
|
-
const { text: textB = '' } = this.tempButtonB
|
|
338
|
+
// const { text: textB = '' } = this.tempButtonB
|
|
255
339
|
|
|
256
340
|
const wrapperColumnClass = isColumn
|
|
257
341
|
? 'rounded-lg'
|
|
258
|
-
: 'md:flex-row lg:px-8
|
|
259
|
-
const buttonColumnClass = isColumn
|
|
260
|
-
? ''
|
|
261
|
-
: 'md:w-1/2 justify-end md:flex-row pt-4 md:pt-0'
|
|
342
|
+
: 'md:flex-row lg:px-8 px-4 py-4'
|
|
343
|
+
const buttonColumnClass = isColumn ? '' : 'justify-end md:flex-row'
|
|
262
344
|
const otherBtnColumnClass = isColumn ? '' : 'md:w-auto'
|
|
263
345
|
const wrapperBgClass = !isBackgroundOnContentOnly ? 'p-4' : ''
|
|
264
346
|
const contentBgClass = isBackgroundOnContentOnly
|
|
265
|
-
? 'bg-orange-100 p-4 rounded-lg
|
|
347
|
+
? 'bg-orange-100 p-4 rounded-lg'
|
|
266
348
|
: ''
|
|
267
349
|
|
|
268
350
|
return html`
|
|
269
351
|
<div
|
|
270
|
-
class="bottom-0 mx-auto flex w-full max-w-7xl flex-col justify-end ${wrapperColumnClass} ${wrapperBgClass}"
|
|
352
|
+
class="bottom-0 mx-auto flex gap-4 w-full max-w-7xl flex-col justify-end ${wrapperColumnClass} ${wrapperBgClass}"
|
|
271
353
|
>
|
|
272
354
|
<div
|
|
273
|
-
class="self-center text-left text-sm text-grey-600 md:text-base ${contentBgClass}"
|
|
355
|
+
class="self-center w-full text-left text-sm text-grey-600 md:text-base ${contentBgClass}"
|
|
274
356
|
>
|
|
275
357
|
${this.getCountdownGracePeriod()}
|
|
276
358
|
</div>
|
|
277
359
|
${this.isShowButton
|
|
278
360
|
? html`
|
|
279
361
|
<div
|
|
280
|
-
class="flex
|
|
362
|
+
class="flex grow items-center flex-wrap shrink-0 gap-2 ${buttonColumnClass}"
|
|
281
363
|
>
|
|
282
|
-
<
|
|
283
|
-
@click=${this.redirectToCheckout}
|
|
284
|
-
class="w-full rounded-md bg-brand-1 p-2 px-5 text-sm font-bold text-grey-100 md:w-auto md:text-base"
|
|
285
|
-
>
|
|
286
|
-
${textA || 'Perbarui Langganan'}
|
|
287
|
-
</button>
|
|
288
|
-
<div class="md:block hidden">
|
|
289
|
-
<button
|
|
290
|
-
@click=${this.redirectToBerlangganan}
|
|
291
|
-
class="bg-transparent w-full rounded-md border border-brand-1 p-1.5 px-5 text-sm font-bold text-brand-1 md:text-base ${otherBtnColumnClass}"
|
|
292
|
-
>
|
|
293
|
-
${textB || 'Paket Lainnya'}
|
|
294
|
-
</button>
|
|
295
|
-
</div>
|
|
296
|
-
<div class="md:hidden block">
|
|
364
|
+
<div class="max-h-10 flex flex-grow md:w-auto">
|
|
297
365
|
<button
|
|
298
|
-
@click=${this.
|
|
299
|
-
class="
|
|
366
|
+
@click=${this.redirectToCheckout}
|
|
367
|
+
class="w-full rounded-md bg-brand-1 p-2 px-5 text-sm justify-center items-center font-bold text-grey-100 md:text-base"
|
|
300
368
|
>
|
|
301
|
-
${
|
|
369
|
+
${textA || 'Perbarui Langganan'}
|
|
302
370
|
</button>
|
|
303
371
|
</div>
|
|
372
|
+
${this.isWallet()
|
|
373
|
+
? html`
|
|
374
|
+
<div class="w-full md:w-auto flex flex-grow max-h-10">
|
|
375
|
+
<button
|
|
376
|
+
@click=${this.redirectCekSaldo}
|
|
377
|
+
class="bg-transparent w-full rounded-md border border-brand-1 p-1.5 px-5 text-sm font-bold text-brand-1 md:text-base ${otherBtnColumnClass}"
|
|
378
|
+
>
|
|
379
|
+
Cara Isi Saldo
|
|
380
|
+
</button>
|
|
381
|
+
</div>
|
|
382
|
+
`
|
|
383
|
+
: nothing}
|
|
304
384
|
</div>
|
|
305
385
|
`
|
|
306
386
|
: nothing}
|
|
@@ -309,13 +389,23 @@ export class KompasGracePeriod extends LitElement {
|
|
|
309
389
|
}
|
|
310
390
|
|
|
311
391
|
override async connectedCallback() {
|
|
392
|
+
// New API
|
|
393
|
+
const endpointNew =
|
|
394
|
+
'https://cdn-www.kompas.id/web-component/grace-period-offering.json'
|
|
395
|
+
const responseNew = await fetch(endpointNew)
|
|
396
|
+
const resultNew = await responseNew.json()
|
|
397
|
+
this.basketSize = resultNew.basket_size_kdp
|
|
398
|
+
this.messages = resultNew.payment_method_messages
|
|
399
|
+
this.templateCheckout = resultNew.template_checkout_url
|
|
400
|
+
|
|
401
|
+
// comment old
|
|
312
402
|
// Constructing the URL with parameters
|
|
313
|
-
const endpoint = `https://cdn-www.kompas.id/web-component/grace-period-paywall.json`
|
|
314
|
-
const response = await fetch(endpoint)
|
|
315
|
-
const result = await response.json()
|
|
316
|
-
this.tempTextEachDay = result.message
|
|
317
|
-
this.tempButtonA = result.buttonA
|
|
318
|
-
this.tempButtonB = result.buttonB
|
|
403
|
+
// const endpoint = `https://cdn-www.kompas.id/web-component/grace-period-paywall.json`
|
|
404
|
+
// const response = await fetch(endpoint)
|
|
405
|
+
// const result = await response.json()
|
|
406
|
+
// this.tempTextEachDay = result.message
|
|
407
|
+
// this.tempButtonA = result.buttonA
|
|
408
|
+
// this.tempButtonB = result.buttonB
|
|
319
409
|
|
|
320
410
|
super.connectedCallback()
|
|
321
411
|
|
|
@@ -11,10 +11,13 @@ Ini adalah redesign komponen _grace period_ yang digunakan pada [kompas.id](http
|
|
|
11
11
|
| `isEpaper` | `is-epaper` | | `boolean` | `false` |
|
|
12
12
|
| `isShowButton` | `is-show-button` | | `boolean` | `false` |
|
|
13
13
|
| `subscriptionId` | `subscription-id` | | `string` | `false` |
|
|
14
|
+
| `memberhsip_channel_id` | `memberhsip_channel_id` | | `number` | `0` |
|
|
15
|
+
| `payment_method` | `payment_method` | | `string` | `''` |
|
|
16
|
+
| `offering` | `offering` | | `string` | `''` |
|
|
17
|
+
| `paywall_subscription_id` | `paywall_subscription_id` |used scenario GP| `number` | `0` |
|
|
18
|
+
| `paywall_subscription_package` | `paywall_subscription_package` |used scenario GP| `string` | `''` |
|
|
14
19
|
| `paywall_location` | `paywall_location` | | `string` | `''` |
|
|
15
20
|
| `paywall_position` | `paywall_position` | | `number` | `0` |
|
|
16
|
-
| `paywall_subscription_id` | `paywall_subscription_id` | | `number` | `0` |
|
|
17
|
-
| `paywall_subscription_package` | `paywall_subscription_package` | | `string` | `''` |
|
|
18
21
|
| `paywall_subscription_price` | `paywall_subscription_price` | | `number` | `0` |
|
|
19
22
|
| `tracker_content_categories` | `tracker_content_categories` | | `string` | `''` |
|
|
20
23
|
| `tracker_content_id` | `tracker_content_id` | | `string` | `''` |
|
|
@@ -22,6 +22,15 @@ Ini adalah komponen _header account_ yang akan di implementasi pada header
|
|
|
22
22
|
| `totalGracePeriod` | `totalGracePeriod` | Number of grace period days calculated from the **end date of the last grace period record**. The grace period lasts **7 days**, counted from day 1 to day 7 (last day). | `number` | `0` | yes |
|
|
23
23
|
| `isGracePeriod` | `isGracePeriod` | Boolean flag indicating whether the user is currently in a grace period. Set to `true` if the grace period array is not empty. **However**, if both active membership and grace period arrays are not empty, this value must be `false`. | `boolean` | `false` | yes |
|
|
24
24
|
| `isMembership` | `isMembership` | Boolean flag indicating whether the user has an active membership. Set to `true` if the active membership array is not empty. | `boolean` | `false` | yes |
|
|
25
|
+
| `detailPackageUser` | `detailPackageUser` | Object to use detail grace period user | `object` | `{}` | yes |
|
|
26
|
+
|
|
27
|
+
## Properties Detail Package User (detailPackageUser)
|
|
28
|
+
Property ini di peruntukan untuk mendetilkan skenario graceperiod yang akan di tampilkan, bila object ini kosong maka akan menggunakan flow default
|
|
29
|
+
| Property | Attribute | Description | Type | Default | Required |
|
|
30
|
+
| ------------------------------ | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------------- | -------- |
|
|
31
|
+
| `offering` | `paywall_location` | | `string` | `''` | yes |
|
|
32
|
+
| `payment_method` | `paywall_location` | | `string` | `''` | yes |
|
|
33
|
+
| `memberhsip_channel_id` | `paywall_location` | | `number` | `0` | yes |
|
|
25
34
|
|
|
26
35
|
## Properties Grace Period Default
|
|
27
36
|
Property dapat dilihat di [Readme Grace Period](https://github.com/pt-kompas-media-nusantara/lit-web-component/tree/master/src/components/kompasid-grace-period).
|
|
@@ -30,8 +39,8 @@ Pemakaian kalo memang tidak ada perubahan, lebih baik tidak digunakan atau di ko
|
|
|
30
39
|
| Property | Attribute | Description | Type | Default | Required |
|
|
31
40
|
| ------------------------------ | ------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------- | -------------- | -------- |
|
|
32
41
|
| `paywall_location` | `paywall_location` | | `string` | `''` | no |
|
|
33
|
-
| `paywall_subscription_package` | `paywall_subscription_package` |
|
|
34
|
-
| `paywall_subscription_id` | `paywall_subscription_id` |
|
|
42
|
+
| `paywall_subscription_package` | `paywall_subscription_package` |Used for graceperiod | `string` | `''` | yes |
|
|
43
|
+
| `paywall_subscription_id` | `paywall_subscription_id` |Used for graceperiod | `number` | `0` | yes |
|
|
35
44
|
| `paywall_subscription_price` | `paywall_subscription_price` | | `number` | `0` | no |
|
|
36
45
|
| `paywall_position` | `paywall_position` | | `number` | `0` | no |
|
|
37
46
|
| `tracker_page_type` | `tracker_page_type` | | `string` | `''` | no |
|
|
@@ -65,6 +74,7 @@ API Last Order = "https://api.kompas.cloud/order/api/v1/product/latest"
|
|
|
65
74
|
subscriptionUrl="https://www.kompas.id/berlangganan"
|
|
66
75
|
read_later_url="https://www.kompas.id/bacananti"
|
|
67
76
|
:paywall_subscription_id="98888"
|
|
77
|
+
paywall_subscription_package="kdp"
|
|
68
78
|
theme="primary"
|
|
69
79
|
:userData="userData"
|
|
70
80
|
/>
|
|
@@ -77,8 +87,13 @@ API Last Order = "https://api.kompas.cloud/order/api/v1/product/latest"
|
|
|
77
87
|
totalGracePeriod: 0
|
|
78
88
|
isGracePeriod: false
|
|
79
89
|
isMembership: false
|
|
90
|
+
detailPackageUser: {
|
|
91
|
+
memberhsip_channel_id: 0
|
|
92
|
+
payment_method: ''
|
|
93
|
+
offering: ''
|
|
94
|
+
}
|
|
80
95
|
}
|
|
81
96
|
```
|
|
82
97
|
|
|
83
|
-
Update
|
|
98
|
+
Update 05 06 2026 - Penggunaan yang sudah berjalan di tim terkait
|
|
84
99
|
_Terbikin oleh tim front-end kompas.id_
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
export interface detailPackage {
|
|
2
|
+
offering: string
|
|
3
|
+
payment_method: string
|
|
4
|
+
memberhsip_channel_id: number
|
|
5
|
+
}
|
|
6
|
+
|
|
1
7
|
export interface User {
|
|
2
8
|
userName: string
|
|
3
9
|
expired: string
|
|
4
10
|
totalGracePeriod: number
|
|
5
11
|
isGracePeriod: boolean
|
|
6
12
|
isMembership: boolean
|
|
7
|
-
|
|
8
|
-
// activeInfo: string // ga kepake dua data ini
|
|
13
|
+
detailPackageUser: detailPackage
|
|
9
14
|
}
|
|
@@ -77,6 +77,23 @@ export class KompasHeaderAccountProfile extends LitElement {
|
|
|
77
77
|
return format(new Date(date), 'dd MMM yyyy', { locale: id })
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
+
private handleDetailGracePeriod() {
|
|
81
|
+
const { userData } = this
|
|
82
|
+
if (userData.detailPackageUser) {
|
|
83
|
+
return {
|
|
84
|
+
memberhsip_channel_id:
|
|
85
|
+
userData.detailPackageUser.memberhsip_channel_id || 0,
|
|
86
|
+
payment_method: userData.detailPackageUser.payment_method || '',
|
|
87
|
+
offering: userData.detailPackageUser.offering || '',
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return {
|
|
91
|
+
memberhsip_channel_id: 0,
|
|
92
|
+
payment_method: '',
|
|
93
|
+
offering: '',
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
80
97
|
private renderSkeletonLoading() {
|
|
81
98
|
return html`
|
|
82
99
|
<div>
|
|
@@ -286,6 +303,11 @@ export class KompasHeaderAccountProfile extends LitElement {
|
|
|
286
303
|
? html` <div class="mt-4 kompasid-grace-period">
|
|
287
304
|
<kompasid-grace-period
|
|
288
305
|
totalGracePeriod=${this.userData.totalGracePeriod}
|
|
306
|
+
offering="${this.handleDetailGracePeriod().offering}"
|
|
307
|
+
memberhsip_channel_id="${this.handleDetailGracePeriod()
|
|
308
|
+
.memberhsip_channel_id}"
|
|
309
|
+
payment_method="${this.handleDetailGracePeriod()
|
|
310
|
+
.payment_method}"
|
|
289
311
|
isColumn="true"
|
|
290
312
|
isShowButton="true"
|
|
291
313
|
isBackgroundOnContentOnly="true"
|
package/tailwind/tailwind.css
CHANGED
|
@@ -972,6 +972,10 @@ video {
|
|
|
972
972
|
height: 100vh;
|
|
973
973
|
}
|
|
974
974
|
|
|
975
|
+
.max-h-10 {
|
|
976
|
+
max-height: 2.5rem;
|
|
977
|
+
}
|
|
978
|
+
|
|
975
979
|
.max-h-40 {
|
|
976
980
|
max-height: 10rem;
|
|
977
981
|
}
|
|
@@ -1139,10 +1143,6 @@ video {
|
|
|
1139
1143
|
width: 100vw;
|
|
1140
1144
|
}
|
|
1141
1145
|
|
|
1142
|
-
.min-w-0 {
|
|
1143
|
-
min-width: 0px;
|
|
1144
|
-
}
|
|
1145
|
-
|
|
1146
1146
|
.max-w-4xl {
|
|
1147
1147
|
max-width: 56rem;
|
|
1148
1148
|
}
|
|
@@ -1159,10 +1159,6 @@ video {
|
|
|
1159
1159
|
max-width: 1200px;
|
|
1160
1160
|
}
|
|
1161
1161
|
|
|
1162
|
-
.max-w-\[190px\] {
|
|
1163
|
-
max-width: 190px;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
1162
|
.max-w-\[214px\] {
|
|
1167
1163
|
max-width: 214px;
|
|
1168
1164
|
}
|
|
@@ -1203,31 +1199,10 @@ video {
|
|
|
1203
1199
|
max-width: 20rem;
|
|
1204
1200
|
}
|
|
1205
1201
|
|
|
1206
|
-
.max-w-full {
|
|
1207
|
-
max-width: 100%;
|
|
1208
|
-
}
|
|
1209
|
-
|
|
1210
|
-
.max-w-fit {
|
|
1211
|
-
max-width: -moz-fit-content;
|
|
1212
|
-
max-width: fit-content;
|
|
1213
|
-
}
|
|
1214
|
-
|
|
1215
|
-
.max-w-\[200px\] {
|
|
1216
|
-
max-width: 200px;
|
|
1217
|
-
}
|
|
1218
|
-
|
|
1219
|
-
.flex-1 {
|
|
1220
|
-
flex: 1 1 0%;
|
|
1221
|
-
}
|
|
1222
|
-
|
|
1223
1202
|
.flex-shrink-0 {
|
|
1224
1203
|
flex-shrink: 0;
|
|
1225
1204
|
}
|
|
1226
1205
|
|
|
1227
|
-
.flex-shrink {
|
|
1228
|
-
flex-shrink: 1;
|
|
1229
|
-
}
|
|
1230
|
-
|
|
1231
1206
|
.shrink-0 {
|
|
1232
1207
|
flex-shrink: 0;
|
|
1233
1208
|
}
|
|
@@ -1236,8 +1211,8 @@ video {
|
|
|
1236
1211
|
flex-grow: 1;
|
|
1237
1212
|
}
|
|
1238
1213
|
|
|
1239
|
-
.
|
|
1240
|
-
flex-grow:
|
|
1214
|
+
.grow {
|
|
1215
|
+
flex-grow: 1;
|
|
1241
1216
|
}
|
|
1242
1217
|
|
|
1243
1218
|
.rotate-180 {
|
|
@@ -1474,10 +1449,6 @@ video {
|
|
|
1474
1449
|
white-space: nowrap;
|
|
1475
1450
|
}
|
|
1476
1451
|
|
|
1477
|
-
.overflow-ellipsis {
|
|
1478
|
-
text-overflow: ellipsis;
|
|
1479
|
-
}
|
|
1480
|
-
|
|
1481
1452
|
.whitespace-nowrap {
|
|
1482
1453
|
white-space: nowrap;
|
|
1483
1454
|
}
|
|
@@ -1486,10 +1457,6 @@ video {
|
|
|
1486
1457
|
text-wrap: wrap;
|
|
1487
1458
|
}
|
|
1488
1459
|
|
|
1489
|
-
.text-nowrap {
|
|
1490
|
-
text-wrap: nowrap;
|
|
1491
|
-
}
|
|
1492
|
-
|
|
1493
1460
|
.break-words {
|
|
1494
1461
|
overflow-wrap: break-word;
|
|
1495
1462
|
}
|
|
@@ -2604,12 +2571,6 @@ video {
|
|
|
2604
2571
|
gap: 2rem;
|
|
2605
2572
|
}
|
|
2606
2573
|
|
|
2607
|
-
.md\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
|
2608
|
-
--tw-space-x-reverse: 0;
|
|
2609
|
-
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
|
2610
|
-
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
|
|
2611
|
-
}
|
|
2612
|
-
|
|
2613
2574
|
.md\:space-x-5 > :not([hidden]) ~ :not([hidden]) {
|
|
2614
2575
|
--tw-space-x-reverse: 0;
|
|
2615
2576
|
margin-right: calc(1.25rem * var(--tw-space-x-reverse));
|
|
@@ -2636,10 +2597,6 @@ video {
|
|
|
2636
2597
|
align-self: flex-end;
|
|
2637
2598
|
}
|
|
2638
2599
|
|
|
2639
|
-
.md\:whitespace-normal {
|
|
2640
|
-
white-space: normal;
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
2600
|
.md\:rounded {
|
|
2644
2601
|
border-radius: 0.25rem;
|
|
2645
2602
|
}
|
package/tailwind/tailwind.ts
CHANGED
|
@@ -979,6 +979,10 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
979
979
|
height: 100vh;
|
|
980
980
|
}
|
|
981
981
|
|
|
982
|
+
.max-h-10 {
|
|
983
|
+
max-height: 2.5rem;
|
|
984
|
+
}
|
|
985
|
+
|
|
982
986
|
.max-h-40 {
|
|
983
987
|
max-height: 10rem;
|
|
984
988
|
}
|
|
@@ -1146,10 +1150,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
1146
1150
|
width: 100vw;
|
|
1147
1151
|
}
|
|
1148
1152
|
|
|
1149
|
-
.min-w-0 {
|
|
1150
|
-
min-width: 0px;
|
|
1151
|
-
}
|
|
1152
|
-
|
|
1153
1153
|
.max-w-4xl {
|
|
1154
1154
|
max-width: 56rem;
|
|
1155
1155
|
}
|
|
@@ -1166,10 +1166,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
1166
1166
|
max-width: 1200px;
|
|
1167
1167
|
}
|
|
1168
1168
|
|
|
1169
|
-
.max-w-\\[190px\\] {
|
|
1170
|
-
max-width: 190px;
|
|
1171
|
-
}
|
|
1172
|
-
|
|
1173
1169
|
.max-w-\\[214px\\] {
|
|
1174
1170
|
max-width: 214px;
|
|
1175
1171
|
}
|
|
@@ -1210,31 +1206,10 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
1210
1206
|
max-width: 20rem;
|
|
1211
1207
|
}
|
|
1212
1208
|
|
|
1213
|
-
.max-w-full {
|
|
1214
|
-
max-width: 100%;
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
.max-w-fit {
|
|
1218
|
-
max-width: -moz-fit-content;
|
|
1219
|
-
max-width: fit-content;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
.max-w-\\[200px\\] {
|
|
1223
|
-
max-width: 200px;
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
.flex-1 {
|
|
1227
|
-
flex: 1 1 0%;
|
|
1228
|
-
}
|
|
1229
|
-
|
|
1230
1209
|
.flex-shrink-0 {
|
|
1231
1210
|
flex-shrink: 0;
|
|
1232
1211
|
}
|
|
1233
1212
|
|
|
1234
|
-
.flex-shrink {
|
|
1235
|
-
flex-shrink: 1;
|
|
1236
|
-
}
|
|
1237
|
-
|
|
1238
1213
|
.shrink-0 {
|
|
1239
1214
|
flex-shrink: 0;
|
|
1240
1215
|
}
|
|
@@ -1243,8 +1218,8 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
1243
1218
|
flex-grow: 1;
|
|
1244
1219
|
}
|
|
1245
1220
|
|
|
1246
|
-
.
|
|
1247
|
-
flex-grow:
|
|
1221
|
+
.grow {
|
|
1222
|
+
flex-grow: 1;
|
|
1248
1223
|
}
|
|
1249
1224
|
|
|
1250
1225
|
.rotate-180 {
|
|
@@ -1485,10 +1460,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
1485
1460
|
white-space: nowrap;
|
|
1486
1461
|
}
|
|
1487
1462
|
|
|
1488
|
-
.overflow-ellipsis {
|
|
1489
|
-
text-overflow: ellipsis;
|
|
1490
|
-
}
|
|
1491
|
-
|
|
1492
1463
|
.whitespace-nowrap {
|
|
1493
1464
|
white-space: nowrap;
|
|
1494
1465
|
}
|
|
@@ -1497,10 +1468,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
1497
1468
|
text-wrap: wrap;
|
|
1498
1469
|
}
|
|
1499
1470
|
|
|
1500
|
-
.text-nowrap {
|
|
1501
|
-
text-wrap: nowrap;
|
|
1502
|
-
}
|
|
1503
|
-
|
|
1504
1471
|
.break-words {
|
|
1505
1472
|
overflow-wrap: break-word;
|
|
1506
1473
|
}
|
|
@@ -2627,12 +2594,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
2627
2594
|
gap: 2rem;
|
|
2628
2595
|
}
|
|
2629
2596
|
|
|
2630
|
-
.md\\:space-x-4 > :not([hidden]) ~ :not([hidden]) {
|
|
2631
|
-
--tw-space-x-reverse: 0;
|
|
2632
|
-
margin-right: calc(1rem * var(--tw-space-x-reverse));
|
|
2633
|
-
margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));
|
|
2634
|
-
}
|
|
2635
|
-
|
|
2636
2597
|
.md\\:space-x-5 > :not([hidden]) ~ :not([hidden]) {
|
|
2637
2598
|
--tw-space-x-reverse: 0;
|
|
2638
2599
|
margin-right: calc(1.25rem * var(--tw-space-x-reverse));
|
|
@@ -2659,10 +2620,6 @@ Constrain images and videos to the parent width and preserve their intrinsic asp
|
|
|
2659
2620
|
align-self: flex-end;
|
|
2660
2621
|
}
|
|
2661
2622
|
|
|
2662
|
-
.md\\:whitespace-normal {
|
|
2663
|
-
white-space: normal;
|
|
2664
|
-
}
|
|
2665
|
-
|
|
2666
2623
|
.md\\:rounded {
|
|
2667
2624
|
border-radius: 0.25rem;
|
|
2668
2625
|
}
|