@kompasid/lit-web-components 0.9.28 → 0.9.30
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 +25 -1
- package/dist/src/components/kompasid-metered-paywall-personalize/KompasMeteredPaywallPersonalize.d.ts +71 -0
- package/dist/src/components/kompasid-metered-paywall-personalize/KompasMeteredPaywallPersonalize.js +725 -0
- package/dist/src/components/kompasid-metered-paywall-personalize/KompasMeteredPaywallPersonalize.js.map +1 -0
- package/dist/src/components/kompasid-metered-paywall-personalize/types.d.ts +23 -0
- package/dist/src/components/kompasid-metered-paywall-personalize/types.js +2 -0
- package/dist/src/components/kompasid-metered-paywall-personalize/types.js.map +1 -0
- package/dist/src/components/kompasid-paywall/KompasPaywall.js +1 -1
- package/dist/src/components/kompasid-paywall/KompasPaywall.js.map +1 -1
- package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js +2 -2
- package/dist/src/components/kompasid-paywall-body/KompasPaywallBody.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/tailwind/tailwind.js +179 -16
- package/dist/tailwind/tailwind.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
- package/src/components/kompasid-metered-paywall-personalize/KompasMeteredPaywallPersonalize.ts +752 -0
- package/src/components/kompasid-metered-paywall-personalize/readme.md +156 -0
- package/src/components/kompasid-metered-paywall-personalize/types.ts +26 -0
- package/src/components/kompasid-paywall/KompasPaywall.ts +1 -1
- package/src/components/kompasid-paywall-body/KompasPaywallBody.ts +2 -2
- package/src/index.ts +1 -0
- package/tailwind/tailwind.css +188 -6
- package/tailwind/tailwind.ts +179 -16
package/demo/index.html
CHANGED
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
import '../dist/src/components/kompasid-paywall/KompasPaywall.js'
|
|
53
53
|
import '../dist/src/components/kompasid-paywall-video/KompasPaywallVideo.js'
|
|
54
54
|
import '../dist/src/components/kompasid-metered-paywall/KompasMeteredPaywall.js'
|
|
55
|
+
import '../dist/src/components/kompasid-metered-paywall-personalize/KompasMeteredPaywallPersonalize.js'
|
|
55
56
|
import '../dist/src/components/kompasid-freewall/KompasFreewall.js'
|
|
56
57
|
import '../dist/src/components/kompasid-metered-wall-register/KompasMeteredWallRegister.js'
|
|
57
58
|
import '../dist/src/components/kompasid-header-account/KompasHeaderAccount.js'
|
|
@@ -260,7 +261,7 @@
|
|
|
260
261
|
.tracker_subscription_status=${trackerSubscriptionStatus}
|
|
261
262
|
>
|
|
262
263
|
</kompasid-paywall>
|
|
263
|
-
<div class="metered font-sans">
|
|
264
|
+
<div class="metered font-sans" style="position: sticky; bottom: 0; width: 100%; z-index: 999;">
|
|
264
265
|
<kompasid-metered-paywall
|
|
265
266
|
.paywall_location=${paywallLocation}
|
|
266
267
|
.paywall_subscription_id=${paywallSubscriptionId}
|
|
@@ -280,6 +281,29 @@
|
|
|
280
281
|
.metered_wall_balance=${meteredWallBalance}
|
|
281
282
|
>
|
|
282
283
|
</kompasid-metered-paywall>
|
|
284
|
+
<kompasid-metered-paywall-personalize
|
|
285
|
+
segment="Unaware"
|
|
286
|
+
offering="Q3"
|
|
287
|
+
user_name="Dummy User"
|
|
288
|
+
rubrik="Politik & Hukum"
|
|
289
|
+
.paywall_location=${paywallLocation}
|
|
290
|
+
.paywall_subscription_id=${paywallSubscriptionId}
|
|
291
|
+
.paywall_subscription_price=${paywallSubscriptionPrice}
|
|
292
|
+
.paywall_position=${paywallPosition}
|
|
293
|
+
.tracker_page_type=${trackerPageType}
|
|
294
|
+
.tracker_content_id=${trackerContentId}
|
|
295
|
+
.tracker_content_type=${trackerContentType}
|
|
296
|
+
.tracker_content_title=${trackerContentTitle}
|
|
297
|
+
.tracker_content_categories=${trackerContentCategories}
|
|
298
|
+
.tracker_user_type=${trackerUserType}
|
|
299
|
+
.subscriptionStatus=${subscriptionStatus}
|
|
300
|
+
.tracker_page_domain=${trackerPageDomain}
|
|
301
|
+
.metered_wall_type=${meteredWallType}
|
|
302
|
+
.subscriptionStatus=${subscriptionStatus}
|
|
303
|
+
.tracker_epaper_edition=${trackerEpaperEdition}
|
|
304
|
+
.metered_wall_balance=${meteredWallBalance}
|
|
305
|
+
>
|
|
306
|
+
</kompasid-metered-paywall-personalize>
|
|
283
307
|
</div>
|
|
284
308
|
|
|
285
309
|
<!-- <div style="margin: 20px 0">
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { LitElement, nothing } from 'lit';
|
|
2
|
+
export declare class KompasMeteredPaywallPersonalize extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
private isLoading;
|
|
5
|
+
private maxQuota;
|
|
6
|
+
private packageData;
|
|
7
|
+
/**
|
|
8
|
+
* Props
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* prop countdownArticle untuk menghandle sudah berapa artikel gratis yang user baca.
|
|
12
|
+
* prop segment untuk menentukan paywall template dari segmen apa yang di pakai, bila tidak ada yang cocok jangan render paywall
|
|
13
|
+
* prop offering untuk handle offering yang akan di berikan, bila tidak di isi maka akan default menjadi Q1
|
|
14
|
+
* prop user_name untuk menerima nama user yang akan di tampilkan paywall specific
|
|
15
|
+
* prop rubrik untuk menerika rubrikasi dari implementor
|
|
16
|
+
* prop paywall_location = The location where user encounter the paywall
|
|
17
|
+
* prop paywall_subscription_package = The name of the subscription package viewed by user
|
|
18
|
+
* prop paywall_subscription_id = The ID of the subscription package viewed by user
|
|
19
|
+
* prop paywall_subscription_price = The price of the subscriprtion package viewed by user
|
|
20
|
+
* prop paywall_position = The position of ther subscription package viewed by user
|
|
21
|
+
* prop tracker_page_type = Type of the page
|
|
22
|
+
* prop tracker_content_id = ID of article (slug)
|
|
23
|
+
* prop tracker_content_type = Whether it's free article or paid article
|
|
24
|
+
* prop tracker_content_title = The title of article
|
|
25
|
+
* prop tracker_content_categories = The category of the content
|
|
26
|
+
* prop tracker_user_type = Type of user based on their subscription
|
|
27
|
+
* prop tracker_subscription_status = Status of their subscription
|
|
28
|
+
* prop tracker_page_domain = Page Domain
|
|
29
|
+
* prop tracker_metered_wall_type = The type of Metered Wall
|
|
30
|
+
* prop tracker_epaper_edition = The edition of epaper viewed by user
|
|
31
|
+
* prop tracker_metered_wall_balance = The balance of their metered wall
|
|
32
|
+
*/
|
|
33
|
+
countdownArticle: number;
|
|
34
|
+
segment: string;
|
|
35
|
+
offering: string;
|
|
36
|
+
user_name: string;
|
|
37
|
+
rubrik: string;
|
|
38
|
+
paywall_location: string;
|
|
39
|
+
paywall_subscription_package: string;
|
|
40
|
+
paywall_subscription_id: string;
|
|
41
|
+
paywall_subscription_price: number;
|
|
42
|
+
paywall_position: number;
|
|
43
|
+
tracker_page_type: string;
|
|
44
|
+
tracker_content_id: string;
|
|
45
|
+
tracker_content_title: string;
|
|
46
|
+
tracker_content_categories: string;
|
|
47
|
+
tracker_content_type: string;
|
|
48
|
+
tracker_user_type: string;
|
|
49
|
+
tracker_subscription_status: string;
|
|
50
|
+
tracker_page_domain: string;
|
|
51
|
+
tracker_metered_wall_type: string;
|
|
52
|
+
tracker_metered_wall_balance: number;
|
|
53
|
+
connectedCallback(): Promise<void>;
|
|
54
|
+
getMeteredPaywallData(): Promise<void>;
|
|
55
|
+
private redirectToBerlangganan;
|
|
56
|
+
private dataLayeronLanggananButton;
|
|
57
|
+
private dataLayeronMeteredPaywall;
|
|
58
|
+
private stateDefaultPaywall;
|
|
59
|
+
private computedstateDefaultPaywall;
|
|
60
|
+
/**
|
|
61
|
+
* Ganti placeholder _key_ di template dengan nilai dari data offering
|
|
62
|
+
* Hanya replace jika placeholder cocok dan datanya valid
|
|
63
|
+
*/
|
|
64
|
+
private replacePlaceholdersFromOffering;
|
|
65
|
+
private engageReturners;
|
|
66
|
+
private passiveFaders;
|
|
67
|
+
private lostButCurious;
|
|
68
|
+
private unaware;
|
|
69
|
+
private pickTemplate;
|
|
70
|
+
render(): import("lit-html").TemplateResult<1> | typeof nothing;
|
|
71
|
+
}
|