@kompasid/lit-web-components 0.1.0
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/.editorconfig +29 -0
- package/.github/workflows/npm-publish.yml +35 -0
- package/LICENSE +21 -0
- package/README.md +62 -0
- package/assets/font-awesome.ts +21 -0
- package/components.d.ts +4 -0
- package/demo/index.html +137 -0
- package/dist/assets/font-awesome.d.ts +2 -0
- package/dist/assets/font-awesome.js +20 -0
- package/dist/assets/font-awesome.js.map +1 -0
- package/dist/src/components/kompas-footer/KompasFooter.d.ts +13 -0
- package/dist/src/components/kompas-footer/KompasFooter.js +304 -0
- package/dist/src/components/kompas-footer/KompasFooter.js.map +1 -0
- package/dist/src/components/kompas-footer/types.d.ts +47 -0
- package/dist/src/components/kompas-footer/types.js +2 -0
- package/dist/src/components/kompas-footer/types.js.map +1 -0
- package/dist/src/components/kompas-metered-paywall/KompasMeteredPaywall.d.ts +50 -0
- package/dist/src/components/kompas-metered-paywall/KompasMeteredPaywall.js +225 -0
- package/dist/src/components/kompas-metered-paywall/KompasMeteredPaywall.js.map +1 -0
- package/dist/src/components/kompas-paywall/KompasPaywall.d.ts +73 -0
- package/dist/src/components/kompas-paywall/KompasPaywall.js +470 -0
- package/dist/src/components/kompas-paywall/KompasPaywall.js.map +1 -0
- package/dist/src/components/kompas-paywall/types.d.ts +53 -0
- package/dist/src/components/kompas-paywall/types.js +2 -0
- package/dist/src/components/kompas-paywall/types.js.map +1 -0
- package/dist/src/components/kompas-paywall-banner-registration/KompasPaywallBannerRegistration.d.ts +11 -0
- package/dist/src/components/kompas-paywall-banner-registration/KompasPaywallBannerRegistration.js +100 -0
- package/dist/src/components/kompas-paywall-banner-registration/KompasPaywallBannerRegistration.js.map +1 -0
- package/dist/src/components/kompas-paywall-body/KompasPaywallBody.d.ts +107 -0
- package/dist/src/components/kompas-paywall-body/KompasPaywallBody.js +843 -0
- package/dist/src/components/kompas-paywall-body/KompasPaywallBody.js.map +1 -0
- package/dist/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.d.ts +8 -0
- package/dist/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.js +39 -0
- package/dist/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.js.map +1 -0
- package/dist/src/components/kompas-paywall-video/KompasPaywallVideo.d.ts +53 -0
- package/dist/src/components/kompas-paywall-video/KompasPaywallVideo.js +245 -0
- package/dist/src/components/kompas-paywall-video/KompasPaywallVideo.js.map +1 -0
- package/dist/src/index.d.ts +10 -0
- package/dist/src/index.js +5 -0
- package/dist/src/index.js.map +1 -0
- package/dist/src/utils/deviceType.d.ts +2 -0
- package/dist/src/utils/deviceType.js +11 -0
- package/dist/src/utils/deviceType.js.map +1 -0
- package/dist/src/utils/fontawesome-setup.d.ts +1 -0
- package/dist/src/utils/fontawesome-setup.js +25 -0
- package/dist/src/utils/fontawesome-setup.js.map +1 -0
- package/dist/tailwind/tailwind.d.ts +1 -0
- package/dist/tailwind/tailwind.js +1654 -0
- package/dist/tailwind/tailwind.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +94 -0
- package/src/components/kompas-footer/KompasFooter.ts +331 -0
- package/src/components/kompas-footer/types.ts +54 -0
- package/src/components/kompas-metered-paywall/KompasMeteredPaywall.ts +174 -0
- package/src/components/kompas-metered-paywall/readme.md +32 -0
- package/src/components/kompas-paywall/KompasPaywall.ts +398 -0
- package/src/components/kompas-paywall/readme.md +166 -0
- package/src/components/kompas-paywall/types.ts +53 -0
- package/src/components/kompas-paywall-banner-registration/KompasPaywallBannerRegistration.ts +92 -0
- package/src/components/kompas-paywall-banner-registration/readme.md +31 -0
- package/src/components/kompas-paywall-body/KompasPaywallBody.ts +844 -0
- package/src/components/kompas-paywall-body/readme.md +54 -0
- package/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.ts +29 -0
- package/src/components/kompas-paywall-information-header/readme.md +30 -0
- package/src/components/kompas-paywall-video/KompasPaywallVideo.ts +194 -0
- package/src/components/kompas-paywall-video/readme.md +46 -0
- package/src/index.ts +11 -0
- package/src/utils/deviceType.ts +11 -0
- package/src/utils/fontawesome-setup.ts +40 -0
- package/tailwind/tailwind.css +1635 -0
- package/tailwind/tailwind.ts +1654 -0
- package/tailwind/tailwindlib.css +3 -0
- package/tailwind.config.js +96 -0
- package/tsconfig.json +21 -0
- package/web-dev-server.config.mjs +27 -0
- package/web-test-runner.config.mjs +41 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KompasPaywallBody.js","sourceRoot":"","sources":["../../../../src/components/kompas-paywall-body/KompasPaywallBody.ts"],"names":[],"mappings":"AAAA,qCAAqC;;AAErC,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAA;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAOxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AACrE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAG/C,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAA1C;;QAGL;;WAEG;QACH;;;;;;;;;;;;;;;;;;;;;;;;;;WA0BG;QAEyB,SAAI,GAAG,EAAE,CAAA;QACT,SAAI,GAAG,CAAC,CAAA;QACP,YAAO,GAAG,KAAK,CAAA;QAChB,SAAI,GAAyB,SAAS,CAAA;QACtC,gBAAW,GACrC,SAAS,CAAA;QACiB,aAAQ,GAAG,EAAE,CAAA;QACb,uBAAkB,GAAG,EAAE,CAAA;QACvB,qBAAgB,GAAG,CAAC,CAAA;QACnB,cAAS,GAAG,KAAK,CAAA;QAClB,qBAAgB,GAAG,EAAE,CAAA;QACrB,iCAA4B,GAAG,E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AAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;8DAAyB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;oEAA+B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;uEAAiC;AAChC;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;iEAA4B;AAC3B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;gDAAW;AAErB;IAAhB,KAAK,EAAE;6DAAmC;AAC1B;IAAhB,KAAK,EAAE;yDAAkD;AACzC;IAAhB,KAAK,EAAE;2DAAsD;AAC7C;IAAhB,KAAK,EAAE;2DAAsD;AAC7C;IAAhB,KAAK,EAAE;0DAA4D;AACnD;IAAhB,KAAK,EAAE;mDAA8C;AACrC;IAAhB,KAAK,EAAE;2DAA2C;AAClC;IAAhB,KAAK,EAAE;yDAAqC;AAC5B;IAAhB,KAAK,EAAE;uDAA0D;AACjD;IAAhB,KAAK,EAAE;oDAAsB;AAvEnB,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CA2zB7B","sourcesContent":["/* eslint-disable no-return-assign */\n\nimport { html, css, LitElement } from 'lit'\nimport { property, state, customElement } from 'lit/decorators.js'\nimport { unsafeSVG } from 'lit/directives/unsafe-svg.js'\nimport { TWStyles } from '../../../tailwind/tailwind.js'\nimport {\n PaywallProduct,\n Product,\n Packages,\n PaymentImage,\n} from '../kompas-paywall/types.js'\nimport { getFontAwesomeIcon } from '../../utils/fontawesome-setup.js'\nimport { deviceType } from '../../utils/deviceType.js'\n\n@customElement('kompas-paywall-body')\nexport class KompasPaywallBody extends LitElement {\n static styles = [css``, TWStyles]\n\n /**\n * Props\n */\n /**\n * prop slug untuk menghandle slug\n * prop isLogin untuk menghandle apakah user sudah login atau belum\n * prop type untuk menghandle tipe epaper\n * prop paywallData untuk menghandle data paywall\n * prop userGuid untuk menghandle user Guid\n * prop subscriptionStatus untuk menghandle status subscription user\n * prop countdownArticle untuk menghandle count artikel\n * prop swgEnable untuk menghandle swg apakah di aktifkan atau tidak\n * prop paywall_location = The location where user encounter the paywall\n * prop paywall_subscription_package = The name of the subscription package viewed by user\n * prop paywall_subscription_id = The ID of the subscription package viewed by user\n * prop paywall_subscription_price = The price of the subscriprtion package viewed by user\n * prop paywall_position = The position of the subscription package viewed by user\n * prop tracker_page_type = Type of the page\n * prop tracker_content_id = ID of article (slug)\n * prop tracker_content_type = Whether it's free article or paid article\n * prop tracker_content_title = The title of article\n * prop tracker_content_categories = The category of the content\n * prop tracker_user_type = Type of user based on their subscription\n * prop tracker_subscription_status = Status of their subscription\n * prop tracker_page_domain = Page Domain\n * prop tracker_metered_wall_type = The type of Metered Wall\n * prop tracker_metered_wall_balance = The balance of their metered wall\n * prop tracker_metered_wall_balance = The edition of epaper viewed by user\n * prop theme = The theme of the paywall component\n */\n\n @property({ type: String }) slug = ''\n @property({ type: Number }) udin = 0\n @property({ type: Boolean }) isLogin = false\n @property({ type: String }) type: 'epaper' | 'reguler' = 'reguler'\n @property({ type: Object }) paywallData: PaywallProduct | undefined =\n undefined\n @property({ type: String }) userGuid = ''\n @property({ type: String }) subscriptionStatus = ''\n @property({ type: Number }) countdownArticle = 0\n @property({ type: Boolean }) swgEnable = false\n @property({ type: String }) paywall_location = ''\n @property({ type: String }) paywall_subscription_package = ''\n @property({ type: Number }) paywall_subscription_id = 0\n @property({ type: Number }) paywall_subscription_price = 0\n @property({ type: Number }) paywall_position = 0\n @property({ type: String }) tracker_page_type = ''\n @property({ type: String }) tracker_content_id = ''\n @property({ type: String }) tracker_content_title = ''\n @property({ type: String }) tracker_content_categories = ''\n @property({ type: String }) tracker_content_type = ''\n @property({ type: String }) tracker_user_type = ''\n @property({ type: String }) tracker_subscription_status = ''\n @property({ type: String }) tracker_page_domain = ''\n @property({ type: String }) tracker_metered_wall_type = ''\n @property({ type: Number }) tracker_metered_wall_balance = 0\n @property({ type: String }) tracker_epaper_edition = ''\n @property({ type: String }) theme = ''\n\n @state() private isExtensionsOpened = false\n @state() private kompasAkunHost = 'https://akun.kompas.id'\n @state() private kompasApigenHost = 'https://apigen.kompas.id'\n @state() private kompasApiWcmHost = 'https://apiwcm.kompas.id'\n @state() private kompasLoginHost = 'https://account.kompas.id/login'\n @state() private selfHost = 'https://epaper.kompas.id'\n @state() private swgPublisherName = 'Harian Kompas'\n @state() private swgPublisherId = 'kompas.id'\n @state() private swgProductId = 'kompas.id:kompas_digital_premium'\n @state() private errorFlag = 0\n\n buttonElement!: HTMLButtonElement\n\n private getRupiahFormat(value: number) {\n const roundedValue = Math.round(value)\n return `Rp ${roundedValue\n .toString()\n .replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, '$1.')}`\n }\n\n private redirectToCheckout(\n url: string,\n name: string,\n id: string,\n price: number,\n position: number\n ): void {\n this.sendDataLayeronButtonBuyPackage(name, id, price, position)\n const originHost: string = encodeURIComponent(window.location.href)\n const directUrlCheckout: string = url + originHost\n window.open(directUrlCheckout)\n }\n\n private redirectToPrevUrl(): void {\n window.history.back()\n }\n\n private redirectToSubscriber(): void {\n this.sendDataLayer()\n window.open('https://www.kompas.id/berlangganan')\n }\n\n private redirectToRegister(): void {\n const loginHost: string = 'https://account.kompas.id/login'\n const nextParams: string = encodeURIComponent(window.location.href)\n const directUrlRegister: string = `${loginHost}?next=${nextParams}?status=sukses_login&status_login=login`\n window.location.href = directUrlRegister\n }\n\n private redirectToHelpdesk(): void {\n this.sendDataLayeronHelpDesk()\n window.open(\n 'https://api.whatsapp.com/send/?phone=6281290050800&text=Halo,%20saya%20perlu%20informasi%20mengenai%20kompas.id'\n )\n }\n\n private paymentExtensionHandler(): void {\n this.isExtensionsOpened = !this.isExtensionsOpened\n }\n\n get isDark() {\n return this.theme === 'dark'\n }\n\n get redirectToLogin() {\n return `${this.kompasLoginHost}?next=${encodeURIComponent(\n this.selfHost + window.location.pathname\n )}`\n }\n\n private async getRegisterToken(path: string, payload: any): Promise<string> {\n return fetch(`${this.kompasApigenHost}/v1/user/register/token/${path}`, {\n method: 'POST',\n body: JSON.stringify(payload),\n headers: {\n 'content-type': 'application/json',\n },\n })\n .then(response => response.json())\n .then((data: any) => data.result.token)\n .catch(error => {\n throw error\n })\n }\n\n private async getUserToken(path: string, payload: any): Promise<string> {\n return fetch(`${this.kompasApigenHost}/v1/user/token/${path}`, {\n method: 'POST',\n body: JSON.stringify(payload),\n headers: {\n 'content-type': 'application/json',\n },\n })\n .then(response => response.json())\n .then((data: any) => data.result.token)\n .catch(error => {\n throw error\n })\n }\n\n private async getSubscriptionToken(\n path: string,\n payload: any\n ): Promise<string> {\n return fetch(`${this.kompasAkunHost}/api/subscription/login/${path}`, {\n method: 'POST',\n body: JSON.stringify(payload),\n headers: {\n 'content-type': 'application/json',\n },\n })\n .then(response => response.json())\n .then((data: any) => {\n this.errorFlag = 0\n return data.access_token\n })\n .catch(async error => {\n const errorCode = error.response.status\n if (errorCode === 500 && this.errorFlag < 5) {\n // eslint-disable-next-line no-plusplus\n this.errorFlag++\n setTimeout(async () => {\n await this.getSubscriptionToken(path, payload)\n }, 2000)\n } else {\n this.errorFlag = 0\n throw error\n }\n })\n }\n\n private async createSwG(payload: any, token: string) {\n await fetch(`${this.kompasApiWcmHost}/v2/membership/swg/create`, {\n method: 'POST',\n body: JSON.stringify(payload),\n headers: {\n 'content-type': 'application/json',\n Authorization: `Bearer ${token}`,\n },\n })\n .then(response => response.json())\n .catch(error => {\n throw error\n })\n }\n\n private subscribeWithGoogleButton = (): any => {\n // @ts-ignore\n // eslint-disable-next-line no-restricted-globals\n ;(self.SWG = self.SWG || []).push((subscriptions: any) => {\n // set entitlement\n subscriptions.setOnEntitlementsResponse(() => {\n // subscriptions attach button\n subscriptions.attachButton(\n this.buttonElement,\n { theme: 'light', lang: 'en' },\n () => {\n subscriptions.showOffers({ isClosable: true })\n subscriptions.setOnLoginRequest(() => {\n window.location.href = this.redirectToLogin\n })\n subscriptions.setOnPaymentResponse(async (paymentResponse: any) => {\n const response = await paymentResponse\n const raw = JSON.parse(response.purchaseData.raw)\n const { productId, purchaseToken, packageName } = raw\n const { email } = response.userData.data\n\n const payload = {\n subscription_token: purchaseToken,\n products: productId,\n detail: 'test',\n }\n const userToken = await this.getUserToken('google', payload)\n if (userToken) {\n // login and update membership\n const accessToken = await this.getSubscriptionToken('google', {\n token: userToken,\n })\n if (accessToken) {\n const payloadSWG = {\n email,\n package_name: packageName,\n product_id: productId,\n purchase_token: purchaseToken,\n }\n await this.createSwG(payloadSWG, accessToken)\n }\n } else {\n // register and login the unknown user\n const payloadRegisterToken = {\n subscription_token: purchaseToken,\n products: productId,\n detail: 'test',\n }\n const token = await this.getRegisterToken(\n 'google',\n payloadRegisterToken\n )\n if (token) {\n const accessToken = await this.getSubscriptionToken(\n 'google',\n { token }\n )\n const payloadSWRUknown = {\n email,\n package_name: packageName,\n product_id: productId,\n purchase_token: purchaseToken,\n }\n await this.createSwG(payloadSWRUknown, accessToken)\n }\n }\n response.complete().then(() => {\n window.location.href = this.redirectToLogin\n })\n })\n }\n )\n })\n })\n }\n\n private jsonScript() {\n const jsonData = {\n '@context': 'https://schema.org',\n '@type': ['WebSite', 'WebPage'],\n isAccessibleForFree: false,\n url: this.selfHost + window.location.pathname,\n name: this.swgPublisherName,\n hasPart: {\n '@type': 'WebPageElement',\n },\n isPartOf: {\n '@type': ['CreativeWork', 'Product'],\n name: this.swgPublisherId,\n productID: this.swgProductId,\n },\n }\n const str = JSON.stringify(jsonData)\n const jsonScript = document.createElement('script')\n jsonScript.type = 'application/ld+json'\n jsonScript.text = str\n jsonScript.defer = true\n const jsonHead = document.querySelector('head')\n if (jsonHead) {\n jsonHead.appendChild(jsonScript)\n }\n }\n\n override connectedCallback() {\n // eslint-disable-next-line wc/guard-super-call\n super.connectedCallback()\n if (this.swgEnable) {\n this.jsonScript()\n if (this.buttonElement) {\n const head = document.querySelector('head')\n const script = document.createElement('script')\n script.src = 'https://news.google.com/swg/js/v1/swg.js'\n script.defer = true\n script.onload = this.subscribeWithGoogleButton()\n if (head) {\n head.appendChild(script)\n }\n }\n }\n }\n\n private sendDataLayer(): void {\n window.dataLayer.push({\n event: 'halamanBerlanggananClick',\n subscriptionStatus: '',\n GUID: '',\n interface: deviceType(),\n })\n }\n\n private sendDataLayeronHelpDesk(): void {\n window.dataLayer.push({\n event: 'helpOfferClick',\n userType: this.subscriptionStatus,\n GUID: this.userGuid,\n interface: deviceType(),\n })\n }\n\n private sendDataLayeronButtonBuyPackage(\n name: string,\n id: string,\n price: number,\n position: number\n ): void {\n const gtmParams: Record<string, any> = {\n event: 'subscribe_button_clicked',\n paywall_location: this.paywall_location,\n paywall_subscription_package: name,\n paywall_subscription_id: id,\n paywall_subscription_price: price,\n paywall_position: position,\n user_type: this.tracker_user_type,\n subscription_status: this.tracker_subscription_status,\n page_domain: this.tracker_page_domain || 'Kompas.id',\n metered_wall_type: this.tracker_metered_wall_type || 'HP',\n metered_wall_balance: this.tracker_metered_wall_balance,\n }\n\n if (this.type !== 'epaper') {\n gtmParams.content_title = this.tracker_content_title\n gtmParams.content_id = this.tracker_content_id\n gtmParams.content_categories = this.tracker_content_categories\n gtmParams.content_type = this.tracker_content_type\n gtmParams.page_type = this.tracker_page_type\n } else {\n gtmParams.epaper_edition = this.tracker_epaper_edition\n }\n\n window.dataLayer.push(gtmParams)\n }\n\n private sendDataLayeronPaywallBody = (): void => {\n const gtmParams: Record<string, any> = {\n event: 'paywall_viewed',\n impressions: [\n {\n paywall_location: this.paywall_location || '',\n paywall_subscription_package:\n 'Cash-B2C-Halaman Berlangganan-Reguler_Digital-KDP 12',\n paywall_subscription_id: '9802032',\n paywall_subscription_price: 360000,\n paywall_position: 1,\n user_type: this.tracker_user_type,\n subscription_status: this.tracker_subscription_status,\n page_domain: this.tracker_page_domain || 'Kompas.id',\n metered_wall_type: this.tracker_metered_wall_type || 'HP',\n metered_wall_balance: this.tracker_metered_wall_balance,\n },\n {\n paywall_location: this.paywall_location || '',\n paywall_subscription_package:\n 'Cash-B2C-Halaman Berlangganan-Reguler_Digital-KDP 1',\n paywall_subscription_id: '9802035',\n paywall_subscription_price: 50000,\n paywall_position: 2,\n user_type: this.tracker_user_type,\n subscription_status: this.tracker_subscription_status,\n page_domain: this.tracker_page_domain || 'Kompas.id',\n metered_wall_type: this.tracker_metered_wall_type || 'HP',\n metered_wall_balance: this.tracker_metered_wall_balance,\n },\n ],\n }\n\n if (this.type === 'epaper') {\n gtmParams.impressions[0].epaper_edition = this.tracker_epaper_edition\n gtmParams.impressions[1].epaper_edition = this.tracker_epaper_edition\n } else {\n gtmParams.impressions[0].page_type = this.tracker_page_type\n gtmParams.impressions[0].content_id = this.tracker_content_id\n gtmParams.impressions[0].content_title = this.tracker_content_title\n gtmParams.impressions[0].content_categories =\n this.tracker_content_categories\n gtmParams.impressions[0].content_type = this.tracker_content_type\n\n gtmParams.impressions[1].page_type = this.tracker_page_type\n gtmParams.impressions[1].content_id = this.tracker_content_id\n gtmParams.impressions[1].content_title = this.tracker_content_title\n gtmParams.impressions[1].content_categories =\n this.tracker_content_categories\n gtmParams.impressions[1].content_type = this.tracker_content_type\n }\n\n window.dataLayer.push(gtmParams)\n }\n\n private headerSection(type: 'epaper' | 'reguler') {\n return html`\n <div class=\"flex w-full items-center\">\n ${type === 'epaper'\n ? html`<button\n @click=${() => this.redirectToPrevUrl()}\n class=\"hidden lg:block w-8 h-8 text-blue-600 pl-4\"\n >\n ${unsafeSVG(getFontAwesomeIcon('fas', 'arrow-left'))}\n </button>`\n : ''}\n <h4\n class=\"text-base md:text-xl ${this.isDark &&\n 'text-white'} text-center font-bold font-serif tracking-wide md:tracking-normal w-full\"\n >\n Langganan untuk Lanjut Membaca\n </h4>\n </div>\n `\n }\n\n private descriptionSection(data: Array<string>) {\n return html`<div class=\" flex flex-col items-center\">\n <div class=\"flex flex-col space-y-2 mt-2.5 md:mt-3\">\n ${data.map(\n item =>\n html`\n <div class=\"flex items-center\">\n <div class=\"text-green-500\">\n ${unsafeSVG(getFontAwesomeIcon('fas', 'check', 12, 12))}\n </div>\n <h6\n class=\"text-xs md:text-base ${this.isDark &&\n 'text-white'} ml-0.5 md:ml-1\"\n >\n ${item}\n </h6>\n </div>\n `\n )}\n </div>\n </div>`\n }\n\n private informationPackages() {\n return html` <div class=\"mt-4 flex justify-center\">\n <button\n @click=${() => this.redirectToSubscriber()}\n class=\"text-sm md:text-base font-bold ${this.isDark\n ? 'text-blue-300'\n : 'text-blue-600'} underline\"\n >\n Lihat Paket Lainnya\n </button>\n </div>`\n }\n\n private separatorLine() {\n return html`\n <div class=\"flex flex-row w-full justify-center\">\n <div\n class=\"border-b-2 ${this.isDark\n ? 'border-dark-2'\n : 'border-blue-200'} w-1/4 my-4 flex justify-center\"\n ></div>\n <p class=\"px-4 pt-1 ${this.isDark && 'text-dark-1'}\">atau</p>\n <div\n class=\"border-b-2 ${this.isDark\n ? 'border-dark-2'\n : 'border-blue-200'} w-1/4 my-4 flex justify-center\"\n ></div>\n </div>\n `\n }\n\n private paymentDesktopSection(data: Array<PaymentImage>) {\n return html`\n <div\n class=\"hidden md:flex w-full md:max-w-sm items-center justify-center flex-wrap\"\n >\n ${data.map(\n item =>\n html`<img\n class=\"object-cover ${this.isDark ? 'h-9' : 'h-10'}\"\n src=${item.link}\n alt=\"${item.name}-logo-payment\"\n />`\n )}\n </div>\n `\n }\n\n private paymentMobileSection(data: Array<PaymentImage>) {\n return html`\n <div\n class=\"grid md:hidden items-center grid-flow-col grid-cols-auto grid-rows-1 mt-4 mx-4\"\n >\n ${data.map(\n item =>\n html`<img\n class=\"w-16\"\n src=${item.link}\n alt=\"${item.name}-logo-payment\"\n />`\n )}\n <button\n @click=${() => this.paymentExtensionHandler()}\n class=\"text-xs md:text-sm ${this.isDark\n ? 'text-blue-300'\n : 'text-blue-600'} font-bold\"\n >\n +9 lainnya\n </button>\n </div>\n `\n }\n\n private paymentMobileExtension(data: Array<PaymentImage>) {\n return html`\n <div\n class=\"w-full ${this.isDark\n ? '-bottom-6'\n : 'bottom-0'} max-w-xs mb-1 ml-8 md:hidden absolute px-4\"\n >\n <div\n class=\"w-full ${this.isDark\n ? 'bg-dark-6 border-dark-6'\n : 'bg-white border-white'} rounded p-3 max-w-xs\"\n >\n <svg\n class=\"right-0 ${this.isDark\n ? 'text-dark-6 border-dark-6'\n : 'text-white border-white '} h-4 mr-10 -mt-7 z-0 transform rotate-180 absolute\"\n x=\"0px\"\n y=\"0px\"\n viewBox=\"0 0 255 255\"\n >\n <polygon class=\"fill-current\" points=\"0,0 127.5,127.5 255,0\" />\n </svg>\n <div\n class=\"grid place-items-center items-center grid-flow-row grid-cols-5 grid-rows-2 gap-y-4\"\n >\n ${data.map(\n item =>\n html`<img\n class=\"object-cover\"\n src=${item.link}\n alt=\"${item.name}-logo-payment\"\n />`\n )}\n </div>\n </div>\n </div>\n `\n }\n\n private primaryPackages(product: Product) {\n return html`\n <div\n class=\"flex flex-wrap justify-between items-center ${this.isDark\n ? 'bg-grey-600'\n : 'bg-white'} rounded md:mx-0 w-full max-w-xs md:max-w-sm md:w-3/5 mt-2.5 md:mt-4 border border-yellow-400 relative\"\n >\n <div class=\"flex flex-col py-3 px-4\">\n <div class=\"flex flex-none items-center\">\n <h5 class=\"text-base md:text-lg font-bold text-orange-400\">\n ${this.getRupiahFormat(product.price)}\n </h5>\n <h6\n class=\"text-xs md:text-base ${this.isDark &&\n 'text-white'} font-bold pl-1\"\n >\n / ${product.periode}\n </h6>\n </div>\n <div class=\"flex items-center\">\n <p class=\"text-xs ${this.isDark && 'text-white'}\">\n hanya <span class=\"text-orange-400\">Rp 30.000</span> / bulan\n </p>\n </div>\n </div>\n <button\n class=\"h-auto ${this.isDark\n ? 'bg-green-300 border border-green-400'\n : 'bg-green-500'} rounded mr-4\"\n @click=${() =>\n this.redirectToCheckout(\n product.url,\n 'Cash-B2C-Halaman Berlangganan-Reguler_Digital-KDP 12',\n '9802032',\n 360000,\n 1\n )}\n >\n <h6\n class=\"text-xs md:text-base ${this.isDark\n ? 'text-black'\n : 'text-white'} font-bold py-2 px-4\"\n >\n Langganan\n </h6>\n </button>\n <div class=\"absolute -top-2 left-4\">\n <div class=\"rounded bg-yellow-300 px-2 py-0.5 text-xs\">\n <b>Harga Terbaik</b>\n </div>\n </div>\n </div>\n `\n }\n\n private secondaryPackages(product: Product) {\n return html`\n <div\n class=\"flex flex-wrap justify-between ${this.isDark\n ? 'bg-grey-600'\n : 'bg-white'} py-3 px-4 rounded md:mx-0 w-full max-w-xs md:max-w-sm md:w-3/5 mt-3 md:mt-4\"\n >\n <div class=\"flex items-center\">\n <h5 class=\"text-base md:text-lg font-bold text-orange-400\">\n ${this.getRupiahFormat(product.price)}\n </h5>\n <h6\n class=\"text-xs md:text-base ${this.isDark &&\n 'text-white'} font-bold pl-1\"\n >\n / ${product.periode}\n </h6>\n </div>\n <button\n @click=${() =>\n this.redirectToCheckout(\n product.url,\n 'Cash-B2C-Halaman Berlangganan-Reguler_Digital-KDP 1',\n '9802035',\n 50000,\n 2\n )}\n class=\"h-auto ${!this.isDark &&\n 'bg-white'} border border-green-500 rounded\"\n >\n <h6\n class=\"text-xs md:text-base ${this.isDark\n ? 'text-green-300'\n : 'text-green-500'} font-bold py-2 px-4\"\n >\n Langganan\n </h6>\n </button>\n </div>\n `\n }\n\n private packagesSection(data: Packages) {\n return html`\n <div class=\"flex flex-col w-full items-center mt-8 lg:mt-2 px-2 \">\n <h6\n class=\"text-sm md:text-base ${this.isDark && 'text-white'} font-bold\"\n >\n ${data.title}\n </h6>\n ${data.memberships.map(item =>\n item.isHighlight\n ? this.primaryPackages(item)\n : this.secondaryPackages(item)\n )}\n </div>\n `\n }\n\n private topNavigator() {\n return html`\n <div class=\"flex lg:hidden items-center w-full pb-4 \">\n <button\n @click=${() => this.redirectToPrevUrl()}\n class=\"text-xs md:text-lg text-white flex flex-row\"\n >\n <div class=\"icon-lg icon-white w-4 h-4 mr-3.5 md:mr-5 pt-0.5\">\n ${unsafeSVG(getFontAwesomeIcon('fas', 'arrow-left'))}\n </div>\n Kembali\n </button>\n </div>\n `\n }\n\n private helpDesk() {\n return html`\n <div class=\"py-2.5 text-white self-center text-xs md:text-sm\">\n Mengalami masalah? Hubungi\n <button\n @click=${() => this.redirectToHelpdesk()}\n class=\"font-bold ${this.isDark && 'text-blue-300'} underline\"\n >\n Layanan Pelanggan.\n </button>\n </div>\n `\n }\n\n private authRegister() {\n return html`\n <div\n class=\"flex flex-row text-white px-2 py-2.5 space-x-4 md:space-x-8 self-center\"\n >\n <div class=\"flex flex-col text-left text-xs md:text-sm text-white\">\n <b>Sudah berlangganan Kompas.id?</b>\n <p>Masuk untuk lanjut membaca.</p>\n </div>\n <button\n @click=${() => this.redirectToRegister()}\n class=\"h-auto ${this.isDark\n ? 'bg-blue-300'\n : 'bg-grey-100'} rounded mr-3\"\n >\n <p\n class=\"text-xs md:text-sm ${this.isDark\n ? 'text-black'\n : 'text-blue-600'} font-bold py-2 px-4\"\n >\n Masuk / Daftar\n </p>\n </button>\n </div>\n `\n }\n\n private userAction(isLogin: boolean, type: 'epaper' | 'reguler') {\n return html`\n <div\n class=\"flex h-20 ${this.isDark\n ? 'bg-dark-4'\n : 'bg-blue-600'} w-full justify-evenly rounded-b mt-6 md:mt-8 relative\"\n >\n ${isLogin || type !== 'epaper' ? this.helpDesk() : this.authRegister()}\n </div>\n `\n }\n\n render() {\n return html`\n <div\n class=\"${this.type === 'epaper'\n ? 'bg-transparent wrapper-body'\n : 'wrapper-body'}\"\n >\n <div\n class=\"flex flex-col justify-center items-center w-full max-w-screen-sm px-4 md:px-0 my-5 relative\"\n >\n ${this.type === 'epaper' ? this.topNavigator() : ''}\n <div\n class=\"flex w-full flex-col items-center justify-center ${this\n .isDark\n ? 'bg-dark-3'\n : 'bg-blue-100'} rounded pt-6 md:pt-8 relative\"\n >\n ${this.headerSection(this.type)}\n ${this.descriptionSection(\n this.paywallData?.informations?.description ?? []\n )}\n ${this.packagesSection(\n this.paywallData?.packages ?? ({} as Packages)\n )}\n ${this.informationPackages()}\n ${this.swgEnable ? this.separatorLine() : null}\n ${this.swgEnable\n ? html`<button\n class=\"border-2 bg-grey-100 border-grey-100 rounded-lg px-6 shadow-sm flex flex-row py-2 mt-1 mb-4\"\n ref=${(el: any) => (this.buttonElement = el as HTMLButtonElement)}\n >\n <p>Subscribe with</p>\n <img class=\"pl-2 object-scale-down w-20 pt-0.5\" src=\"https://kompasid-production-www.s3.ap-southeast-1.amazonaws.com/paywall-asset/google.png\" alt=\"subscribe with google\"></img>\n </button>`\n : null}\n ${this.paymentDesktopSection(\n this.paywallData?.payment?.desktop ?? []\n )}\n ${this.paymentMobileSection(\n this.paywallData?.payment?.mobile ?? []\n )}\n ${this.userAction(this.isLogin, this.type)}\n ${this.sendDataLayeronPaywallBody()}\n </div>\n ${this.isExtensionsOpened\n ? this.paymentMobileExtension(\n this.paywallData?.payment?.ekstension ?? []\n )\n : ''}\n </div>\n </div>\n `\n }\n}\n"]}
|
package/dist/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
/* eslint-disable class-methods-use-this */
|
|
3
|
+
import { html, css, LitElement } from 'lit';
|
|
4
|
+
import { property, customElement } from 'lit/decorators.js';
|
|
5
|
+
import { TWStyles } from '../../../tailwind/tailwind.js';
|
|
6
|
+
let KompasPaywallInformationHeader = class KompasPaywallInformationHeader extends LitElement {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.text = '';
|
|
10
|
+
this.theme = '';
|
|
11
|
+
}
|
|
12
|
+
get isDark() {
|
|
13
|
+
return this.theme === 'dark';
|
|
14
|
+
}
|
|
15
|
+
render() {
|
|
16
|
+
return html `
|
|
17
|
+
<div class="my-4 md:my-8">
|
|
18
|
+
<h5
|
|
19
|
+
class="text-base text-center md:text-xl ${this.theme === 'dark' &&
|
|
20
|
+
'text-white'} font-bold font-serif"
|
|
21
|
+
>
|
|
22
|
+
${this.text}
|
|
23
|
+
</h5>
|
|
24
|
+
</div>
|
|
25
|
+
`;
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
KompasPaywallInformationHeader.styles = [css ``, TWStyles];
|
|
29
|
+
__decorate([
|
|
30
|
+
property({ type: String })
|
|
31
|
+
], KompasPaywallInformationHeader.prototype, "text", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
property({ type: String })
|
|
34
|
+
], KompasPaywallInformationHeader.prototype, "theme", void 0);
|
|
35
|
+
KompasPaywallInformationHeader = __decorate([
|
|
36
|
+
customElement('kompas-paywall-information-header')
|
|
37
|
+
], KompasPaywallInformationHeader);
|
|
38
|
+
export { KompasPaywallInformationHeader };
|
|
39
|
+
//# sourceMappingURL=KompasPaywallInformationHeader.js.map
|
package/dist/src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KompasPaywallInformationHeader.js","sourceRoot":"","sources":["../../../../src/components/kompas-paywall-information-header/KompasPaywallInformationHeader.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAC3D,OAAO,EAAE,QAAQ,EAAE,MAAM,+BAA+B,CAAA;AAGjD,IAAM,8BAA8B,GAApC,MAAM,8BAA+B,SAAQ,UAAU;IAAvD;;QAGuB,SAAI,GAAG,EAAE,CAAA;QACT,UAAK,GAAG,EAAE,CAAA;IAkBxC,CAAC;IAhBC,IAAI,MAAM;QACR,OAAO,IAAI,CAAC,KAAK,KAAK,MAAM,CAAA;IAC9B,CAAC;IAED,MAAM;QACJ,OAAO,IAAI,CAAA;;;oDAGqC,IAAI,CAAC,KAAK,KAAK,MAAM;YAC/D,YAAY;;YAEV,IAAI,CAAC,IAAI;;;KAGhB,CAAA;IACH,CAAC;;AApBM,qCAAM,GAAG,CAAC,GAAG,CAAA,EAAE,EAAE,QAAQ,CAAC,AAApB,CAAoB;AAEL;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;4DAAU;AACT;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;6DAAW;AAJ3B,8BAA8B;IAD1C,aAAa,CAAC,mCAAmC,CAAC;GACtC,8BAA8B,CAsB1C","sourcesContent":["/* eslint-disable class-methods-use-this */\nimport { html, css, LitElement } from 'lit'\nimport { property, customElement } from 'lit/decorators.js'\nimport { TWStyles } from '../../../tailwind/tailwind.js'\n\n@customElement('kompas-paywall-information-header')\nexport class KompasPaywallInformationHeader extends LitElement {\n static styles = [css``, TWStyles]\n\n @property({ type: String }) text = ''\n @property({ type: String }) theme = ''\n\n get isDark() {\n return this.theme === 'dark'\n }\n\n render() {\n return html`\n <div class=\"my-4 md:my-8\">\n <h5\n class=\"text-base text-center md:text-xl ${this.theme === 'dark' &&\n 'text-white'} font-bold font-serif\"\n >\n ${this.text}\n </h5>\n </div>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
export declare class KompasPaywallVideo extends LitElement {
|
|
3
|
+
static styles: import("lit").CSSResult[];
|
|
4
|
+
/**
|
|
5
|
+
* Props
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* prop isLogin untuk menghandle apakah user sudah login atau belum
|
|
9
|
+
* prop paywall_location = The location where user encounter the paywall
|
|
10
|
+
* prop paywall_subscription_package = The name of the subscription package viewed by user
|
|
11
|
+
* prop paywall_subscription_id = The ID of the subscription package viewed by user
|
|
12
|
+
* prop paywall_subscription_price = The price of the subscriprtion package viewed by user
|
|
13
|
+
* prop paywall_position = The position of the subscription package viewed by user
|
|
14
|
+
* prop page_type = Type of the page
|
|
15
|
+
* prop content_id = ID of article (slug)
|
|
16
|
+
* prop content_type = Whether it's free article or paid article
|
|
17
|
+
* prop content_title = The title of article
|
|
18
|
+
* prop tracker_content_categories = The category of the content
|
|
19
|
+
* prop user_type = Type of user based on their subscription
|
|
20
|
+
* prop subscription_status = Status of their subscription
|
|
21
|
+
* prop page_domain = Page Domain
|
|
22
|
+
* prop metered_wall_type = The type of Metered Wall
|
|
23
|
+
* prop metered_wall_balance = The balance of their metered wall
|
|
24
|
+
*/
|
|
25
|
+
private loginUrl;
|
|
26
|
+
private subscriptionUrl;
|
|
27
|
+
private registerUrl;
|
|
28
|
+
isLogin: boolean;
|
|
29
|
+
paywall_location: string;
|
|
30
|
+
paywall_subscription_package: string;
|
|
31
|
+
paywall_subscription_id: string;
|
|
32
|
+
paywall_subscription_price: number;
|
|
33
|
+
paywall_position: number;
|
|
34
|
+
tracker_page_type: string;
|
|
35
|
+
tracker_content_id: string;
|
|
36
|
+
tracker_content_title: string;
|
|
37
|
+
tracker_content_categories: string;
|
|
38
|
+
tracker_content_type: string;
|
|
39
|
+
tracker_user_type: string;
|
|
40
|
+
tracker_subscription_status: string;
|
|
41
|
+
tracker_page_domain: string;
|
|
42
|
+
tracker_metered_wall_type: string;
|
|
43
|
+
tracker_metered_wall_balance: number;
|
|
44
|
+
private isLoginComponent;
|
|
45
|
+
private defaultComponent;
|
|
46
|
+
private sendDataLayeronNonLogin;
|
|
47
|
+
private sendDataLayeronBerlangganan;
|
|
48
|
+
private sendDataLayeronButtonLogin;
|
|
49
|
+
private sendDataLayeronButtonBerlangganan;
|
|
50
|
+
private redirectToLogin;
|
|
51
|
+
private redirectToBerlangganan;
|
|
52
|
+
render(): import("lit-html").TemplateResult<1>;
|
|
53
|
+
}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
/* eslint-disable class-methods-use-this */
|
|
3
|
+
import { html, css, LitElement } from 'lit';
|
|
4
|
+
import { property, customElement, state } from 'lit/decorators.js';
|
|
5
|
+
import { TWStyles } from '../../../tailwind/tailwind.js';
|
|
6
|
+
import { deviceType } from '../../utils/deviceType.js';
|
|
7
|
+
let KompasPaywallVideo = class KompasPaywallVideo extends LitElement {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
/**
|
|
11
|
+
* Props
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* prop isLogin untuk menghandle apakah user sudah login atau belum
|
|
15
|
+
* prop paywall_location = The location where user encounter the paywall
|
|
16
|
+
* prop paywall_subscription_package = The name of the subscription package viewed by user
|
|
17
|
+
* prop paywall_subscription_id = The ID of the subscription package viewed by user
|
|
18
|
+
* prop paywall_subscription_price = The price of the subscriprtion package viewed by user
|
|
19
|
+
* prop paywall_position = The position of the subscription package viewed by user
|
|
20
|
+
* prop page_type = Type of the page
|
|
21
|
+
* prop content_id = ID of article (slug)
|
|
22
|
+
* prop content_type = Whether it's free article or paid article
|
|
23
|
+
* prop content_title = The title of article
|
|
24
|
+
* prop tracker_content_categories = The category of the content
|
|
25
|
+
* prop user_type = Type of user based on their subscription
|
|
26
|
+
* prop subscription_status = Status of their subscription
|
|
27
|
+
* prop page_domain = Page Domain
|
|
28
|
+
* prop metered_wall_type = The type of Metered Wall
|
|
29
|
+
* prop metered_wall_balance = The balance of their metered wall
|
|
30
|
+
*/
|
|
31
|
+
this.loginUrl = 'https://account.kompas.id/login';
|
|
32
|
+
this.subscriptionUrl = 'https://www.kompas.id/berlangganan';
|
|
33
|
+
this.registerUrl = 'https://account.kompas.id/register';
|
|
34
|
+
this.isLogin = false;
|
|
35
|
+
this.paywall_location = '';
|
|
36
|
+
this.paywall_subscription_package = '';
|
|
37
|
+
this.paywall_subscription_id = '';
|
|
38
|
+
this.paywall_subscription_price = 0;
|
|
39
|
+
this.paywall_position = 0;
|
|
40
|
+
this.tracker_page_type = '';
|
|
41
|
+
this.tracker_content_id = '';
|
|
42
|
+
this.tracker_content_title = '';
|
|
43
|
+
this.tracker_content_categories = '';
|
|
44
|
+
this.tracker_content_type = '';
|
|
45
|
+
this.tracker_user_type = '';
|
|
46
|
+
this.tracker_subscription_status = '';
|
|
47
|
+
this.tracker_page_domain = '';
|
|
48
|
+
this.tracker_metered_wall_type = '';
|
|
49
|
+
this.tracker_metered_wall_balance = 0;
|
|
50
|
+
this.sendDataLayeronNonLogin = () => {
|
|
51
|
+
window.dataLayer.push({
|
|
52
|
+
event: 'registrationOfferimppression',
|
|
53
|
+
interface: deviceType(),
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
this.sendDataLayeronBerlangganan = () => {
|
|
57
|
+
window.dataLayer.push({
|
|
58
|
+
event: 'paywall_viewed',
|
|
59
|
+
paywall_location: this.paywall_location,
|
|
60
|
+
paywall_subscription_package: this.paywall_subscription_package,
|
|
61
|
+
paywall_subscription_id: this.paywall_subscription_id,
|
|
62
|
+
paywall_subscription_price: this.paywall_subscription_price,
|
|
63
|
+
paywall_position: this.paywall_position,
|
|
64
|
+
page_type: this.tracker_page_type,
|
|
65
|
+
content_id: this.tracker_content_id,
|
|
66
|
+
content_title: this.tracker_content_title,
|
|
67
|
+
content_categories: this.tracker_content_categories,
|
|
68
|
+
content_type: this.tracker_content_type,
|
|
69
|
+
user_type: this.tracker_user_type,
|
|
70
|
+
subscription_status: this.tracker_subscription_status,
|
|
71
|
+
page_domain: this.tracker_page_domain || 'Kompas.id',
|
|
72
|
+
metered_wall_type: this.tracker_metered_wall_type || 'HP',
|
|
73
|
+
metered_wall_balance: this.tracker_metered_wall_balance,
|
|
74
|
+
});
|
|
75
|
+
};
|
|
76
|
+
this.sendDataLayeronButtonLogin = (triggerClick) => {
|
|
77
|
+
window.dataLayer.push({
|
|
78
|
+
event: 'registrationOfferClick',
|
|
79
|
+
interface: deviceType(),
|
|
80
|
+
buttonClicked: triggerClick,
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
this.sendDataLayeronButtonBerlangganan = () => {
|
|
84
|
+
window.dataLayer.push({
|
|
85
|
+
event: 'subscribe_button_clicked',
|
|
86
|
+
paywall_location: this.paywall_location,
|
|
87
|
+
paywall_subscription_package: this.paywall_subscription_package,
|
|
88
|
+
paywall_subscription_id: this.paywall_subscription_id,
|
|
89
|
+
paywall_subscription_price: this.paywall_subscription_price,
|
|
90
|
+
paywall_position: this.paywall_position,
|
|
91
|
+
page_type: this.tracker_page_type,
|
|
92
|
+
content_id: this.tracker_content_id,
|
|
93
|
+
content_title: this.tracker_content_title,
|
|
94
|
+
content_categories: this.tracker_content_categories,
|
|
95
|
+
content_type: this.tracker_content_type,
|
|
96
|
+
user_type: this.tracker_user_type,
|
|
97
|
+
subscription_status: this.tracker_subscription_status,
|
|
98
|
+
page_domain: this.tracker_page_domain || 'Kompas.id',
|
|
99
|
+
metered_wall_type: this.tracker_metered_wall_type || 'HP',
|
|
100
|
+
metered_wall_balance: this.tracker_metered_wall_balance,
|
|
101
|
+
});
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
isLoginComponent() {
|
|
105
|
+
return html `
|
|
106
|
+
<div>
|
|
107
|
+
${this.sendDataLayeronBerlangganan()}
|
|
108
|
+
<h5
|
|
109
|
+
class="leading-6 text-white text-center text-base md:text-xl max-w-2xl"
|
|
110
|
+
>
|
|
111
|
+
Akses konten premium Anda bulan ini sudah habis. Aktifkan langganan
|
|
112
|
+
untuk akses tanpa batas, mulai dari
|
|
113
|
+
<span class="font-bold">Rp50.000/bulan.</span>
|
|
114
|
+
</h5>
|
|
115
|
+
<div class="flex justify-between mt-4">
|
|
116
|
+
<button
|
|
117
|
+
@click=${() => this.redirectToBerlangganan()}
|
|
118
|
+
class="bg-green-500 rounded px-4 py-1.5 text-sm text-white font-bold"
|
|
119
|
+
>
|
|
120
|
+
Berlangganan
|
|
121
|
+
</button>
|
|
122
|
+
</div>
|
|
123
|
+
</div>
|
|
124
|
+
`;
|
|
125
|
+
}
|
|
126
|
+
defaultComponent() {
|
|
127
|
+
return html `
|
|
128
|
+
<div>
|
|
129
|
+
${this.sendDataLayeronNonLogin()} ${this.sendDataLayeronBerlangganan()}
|
|
130
|
+
<h5
|
|
131
|
+
class="leading-6 text-white text-center text-base md:text-xl max-w-xl"
|
|
132
|
+
>
|
|
133
|
+
Langganan untuk akses ke seluruh konten premium, mulai dari
|
|
134
|
+
<span class="font-bold">Rp50.000/bulan.</span>
|
|
135
|
+
</h5>
|
|
136
|
+
<div class="flex justify-center mt-4 space-x-3">
|
|
137
|
+
<button
|
|
138
|
+
@click=${() => this.redirectToLogin('Masuk')}
|
|
139
|
+
class="rounded text-sm text-white px-4 py-1.5 ring-1 ring-grey-100"
|
|
140
|
+
>
|
|
141
|
+
Masuk
|
|
142
|
+
</button>
|
|
143
|
+
<button
|
|
144
|
+
@click=${() => this.redirectToBerlangganan()}
|
|
145
|
+
class="bg-green-500 rounded px-4 py-1.5 text-sm text-white font-bold"
|
|
146
|
+
>
|
|
147
|
+
Berlangganan
|
|
148
|
+
</button>
|
|
149
|
+
</div>
|
|
150
|
+
<p
|
|
151
|
+
class="text-center text-sm leading-4 text-white mt-6 max-w-xs md:max-w-none"
|
|
152
|
+
>
|
|
153
|
+
Dapatkan 5 konten premium gratis tiap bulan!
|
|
154
|
+
<button
|
|
155
|
+
@click=${() => this.redirectToLogin('Coba Sekarang')}
|
|
156
|
+
target="_blank"
|
|
157
|
+
class="text-blue-300 font-bold cursor-pointer"
|
|
158
|
+
>
|
|
159
|
+
Coba Sekarang
|
|
160
|
+
</button>
|
|
161
|
+
</p>
|
|
162
|
+
</div>
|
|
163
|
+
`;
|
|
164
|
+
}
|
|
165
|
+
redirectToLogin(triggerClick) {
|
|
166
|
+
this.sendDataLayeronButtonLogin(triggerClick);
|
|
167
|
+
window.open(this.loginUrl, '_blank');
|
|
168
|
+
}
|
|
169
|
+
redirectToBerlangganan() {
|
|
170
|
+
this.sendDataLayeronButtonBerlangganan();
|
|
171
|
+
window.open(this.subscriptionUrl, '_blank');
|
|
172
|
+
}
|
|
173
|
+
render() {
|
|
174
|
+
return html `
|
|
175
|
+
<div
|
|
176
|
+
class="radius absolute z-20 bg-black bg-opacity-50 p-4 top-0 bottom-0 left-0 flex flex-col w-full h-full justify-center items-center"
|
|
177
|
+
>
|
|
178
|
+
${this.isLogin ? this.isLoginComponent() : this.defaultComponent()}
|
|
179
|
+
</div>
|
|
180
|
+
`;
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
KompasPaywallVideo.styles = [css ``, TWStyles];
|
|
184
|
+
__decorate([
|
|
185
|
+
state()
|
|
186
|
+
], KompasPaywallVideo.prototype, "loginUrl", void 0);
|
|
187
|
+
__decorate([
|
|
188
|
+
state()
|
|
189
|
+
], KompasPaywallVideo.prototype, "subscriptionUrl", void 0);
|
|
190
|
+
__decorate([
|
|
191
|
+
state()
|
|
192
|
+
], KompasPaywallVideo.prototype, "registerUrl", void 0);
|
|
193
|
+
__decorate([
|
|
194
|
+
property({ type: Boolean })
|
|
195
|
+
], KompasPaywallVideo.prototype, "isLogin", void 0);
|
|
196
|
+
__decorate([
|
|
197
|
+
property({ type: String })
|
|
198
|
+
], KompasPaywallVideo.prototype, "paywall_location", void 0);
|
|
199
|
+
__decorate([
|
|
200
|
+
property({ type: String })
|
|
201
|
+
], KompasPaywallVideo.prototype, "paywall_subscription_package", void 0);
|
|
202
|
+
__decorate([
|
|
203
|
+
property({ type: String })
|
|
204
|
+
], KompasPaywallVideo.prototype, "paywall_subscription_id", void 0);
|
|
205
|
+
__decorate([
|
|
206
|
+
property({ type: Number })
|
|
207
|
+
], KompasPaywallVideo.prototype, "paywall_subscription_price", void 0);
|
|
208
|
+
__decorate([
|
|
209
|
+
property({ type: Number })
|
|
210
|
+
], KompasPaywallVideo.prototype, "paywall_position", void 0);
|
|
211
|
+
__decorate([
|
|
212
|
+
property({ type: String })
|
|
213
|
+
], KompasPaywallVideo.prototype, "tracker_page_type", void 0);
|
|
214
|
+
__decorate([
|
|
215
|
+
property({ type: String })
|
|
216
|
+
], KompasPaywallVideo.prototype, "tracker_content_id", void 0);
|
|
217
|
+
__decorate([
|
|
218
|
+
property({ type: String })
|
|
219
|
+
], KompasPaywallVideo.prototype, "tracker_content_title", void 0);
|
|
220
|
+
__decorate([
|
|
221
|
+
property({ type: String })
|
|
222
|
+
], KompasPaywallVideo.prototype, "tracker_content_categories", void 0);
|
|
223
|
+
__decorate([
|
|
224
|
+
property({ type: String })
|
|
225
|
+
], KompasPaywallVideo.prototype, "tracker_content_type", void 0);
|
|
226
|
+
__decorate([
|
|
227
|
+
property({ type: String })
|
|
228
|
+
], KompasPaywallVideo.prototype, "tracker_user_type", void 0);
|
|
229
|
+
__decorate([
|
|
230
|
+
property({ type: String })
|
|
231
|
+
], KompasPaywallVideo.prototype, "tracker_subscription_status", void 0);
|
|
232
|
+
__decorate([
|
|
233
|
+
property({ type: String })
|
|
234
|
+
], KompasPaywallVideo.prototype, "tracker_page_domain", void 0);
|
|
235
|
+
__decorate([
|
|
236
|
+
property({ type: String })
|
|
237
|
+
], KompasPaywallVideo.prototype, "tracker_metered_wall_type", void 0);
|
|
238
|
+
__decorate([
|
|
239
|
+
property({ type: Number })
|
|
240
|
+
], KompasPaywallVideo.prototype, "tracker_metered_wall_balance", void 0);
|
|
241
|
+
KompasPaywallVideo = __decorate([
|
|
242
|
+
customElement('kompas-paywall-video')
|
|
243
|
+
], KompasPaywallVideo);
|
|
244
|
+
export { KompasPaywallVideo };
|
|
245
|
+
//# sourceMappingURL=KompasPaywallVideo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KompasPaywallVideo.js","sourceRoot":"","sources":["../../../../src/components/kompas-paywall-video/KompasPaywallVideo.ts"],"names":[],"mappings":";AAAA,2CAA2C;AAC3C,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAA;AAC3C,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,mBAA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,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;+DAAyB;AACxB;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;qEAA+B;AAC9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wEAAiC;AA7CjD,kBAAkB;IAD9B,aAAa,CAAC,sBAAsB,CAAC;GACzB,kBAAkB,CA0L9B","sourcesContent":["/* eslint-disable class-methods-use-this */\nimport { html, css, LitElement } from 'lit'\nimport { property, customElement, state } from 'lit/decorators.js'\nimport { TWStyles } from '../../../tailwind/tailwind.js'\nimport { deviceType } from '../../utils/deviceType.js'\n\n@customElement('kompas-paywall-video')\nexport class KompasPaywallVideo extends LitElement {\n static styles = [css``, TWStyles]\n\n /**\n * Props\n */\n /**\n * prop isLogin untuk menghandle apakah user sudah login atau belum\n * prop paywall_location = The location where user encounter the paywall\n * prop paywall_subscription_package = The name of the subscription package viewed by user\n * prop paywall_subscription_id = The ID of the subscription package viewed by user\n * prop paywall_subscription_price = The price of the subscriprtion package viewed by user\n * prop paywall_position = The position of the subscription package viewed by user\n * prop page_type = Type of the page\n * prop content_id = ID of article (slug)\n * prop content_type = Whether it's free article or paid article\n * prop content_title = The title of article\n * prop tracker_content_categories = The category of the content\n * prop user_type = Type of user based on their subscription\n * prop subscription_status = Status of their subscription\n * prop page_domain = Page Domain\n * prop metered_wall_type = The type of Metered Wall\n * prop metered_wall_balance = The balance of their metered wall\n */\n\n @state() private loginUrl: string = 'https://account.kompas.id/login'\n @state() private subscriptionUrl: string =\n 'https://www.kompas.id/berlangganan'\n @state() private registerUrl: string = 'https://account.kompas.id/register'\n\n @property({ type: Boolean }) isLogin = false\n @property({ type: String }) paywall_location = ''\n @property({ type: String }) paywall_subscription_package = ''\n @property({ type: String }) paywall_subscription_id = ''\n @property({ type: Number }) paywall_subscription_price = 0\n @property({ type: Number }) paywall_position = 0\n @property({ type: String }) tracker_page_type = ''\n @property({ type: String }) tracker_content_id = ''\n @property({ type: String }) tracker_content_title = ''\n @property({ type: String }) tracker_content_categories = ''\n @property({ type: String }) tracker_content_type = ''\n @property({ type: String }) tracker_user_type = ''\n @property({ type: String }) tracker_subscription_status = ''\n @property({ type: String }) tracker_page_domain = ''\n @property({ type: String }) tracker_metered_wall_type = ''\n @property({ type: Number }) tracker_metered_wall_balance = 0\n\n private isLoginComponent() {\n return html`\n <div>\n ${this.sendDataLayeronBerlangganan()}\n <h5\n class=\"leading-6 text-white text-center text-base md:text-xl max-w-2xl\"\n >\n Akses konten premium Anda bulan ini sudah habis. Aktifkan langganan\n untuk akses tanpa batas, mulai dari\n <span class=\"font-bold\">Rp50.000/bulan.</span>\n </h5>\n <div class=\"flex justify-between mt-4\">\n <button\n @click=${() => this.redirectToBerlangganan()}\n class=\"bg-green-500 rounded px-4 py-1.5 text-sm text-white font-bold\"\n >\n Berlangganan\n </button>\n </div>\n </div>\n `\n }\n\n private defaultComponent() {\n return html`\n <div>\n ${this.sendDataLayeronNonLogin()} ${this.sendDataLayeronBerlangganan()}\n <h5\n class=\"leading-6 text-white text-center text-base md:text-xl max-w-xl\"\n >\n Langganan untuk akses ke seluruh konten premium, mulai dari\n <span class=\"font-bold\">Rp50.000/bulan.</span>\n </h5>\n <div class=\"flex justify-center mt-4 space-x-3\">\n <button\n @click=${() => this.redirectToLogin('Masuk')}\n class=\"rounded text-sm text-white px-4 py-1.5 ring-1 ring-grey-100\"\n >\n Masuk\n </button>\n <button\n @click=${() => this.redirectToBerlangganan()}\n class=\"bg-green-500 rounded px-4 py-1.5 text-sm text-white font-bold\"\n >\n Berlangganan\n </button>\n </div>\n <p\n class=\"text-center text-sm leading-4 text-white mt-6 max-w-xs md:max-w-none\"\n >\n Dapatkan 5 konten premium gratis tiap bulan!\n <button\n @click=${() => this.redirectToLogin('Coba Sekarang')}\n target=\"_blank\"\n class=\"text-blue-300 font-bold cursor-pointer\"\n >\n Coba Sekarang\n </button>\n </p>\n </div>\n `\n }\n\n private sendDataLayeronNonLogin = (): void => {\n window.dataLayer.push({\n event: 'registrationOfferimppression',\n interface: deviceType(),\n })\n }\n\n private sendDataLayeronBerlangganan = (): void => {\n window.dataLayer.push({\n event: 'paywall_viewed',\n paywall_location: this.paywall_location,\n paywall_subscription_package: this.paywall_subscription_package,\n paywall_subscription_id: this.paywall_subscription_id,\n paywall_subscription_price: this.paywall_subscription_price,\n paywall_position: this.paywall_position,\n page_type: this.tracker_page_type,\n content_id: this.tracker_content_id,\n content_title: this.tracker_content_title,\n content_categories: this.tracker_content_categories,\n content_type: this.tracker_content_type,\n user_type: this.tracker_user_type,\n subscription_status: this.tracker_subscription_status,\n page_domain: this.tracker_page_domain || 'Kompas.id',\n metered_wall_type: this.tracker_metered_wall_type || 'HP',\n metered_wall_balance: this.tracker_metered_wall_balance,\n })\n }\n\n private sendDataLayeronButtonLogin = (triggerClick: string): void => {\n window.dataLayer.push({\n event: 'registrationOfferClick',\n interface: deviceType(),\n buttonClicked: triggerClick,\n })\n }\n\n private sendDataLayeronButtonBerlangganan = (): void => {\n window.dataLayer.push({\n event: 'subscribe_button_clicked',\n paywall_location: this.paywall_location,\n paywall_subscription_package: this.paywall_subscription_package,\n paywall_subscription_id: this.paywall_subscription_id,\n paywall_subscription_price: this.paywall_subscription_price,\n paywall_position: this.paywall_position,\n page_type: this.tracker_page_type,\n content_id: this.tracker_content_id,\n content_title: this.tracker_content_title,\n content_categories: this.tracker_content_categories,\n content_type: this.tracker_content_type,\n user_type: this.tracker_user_type,\n subscription_status: this.tracker_subscription_status,\n page_domain: this.tracker_page_domain || 'Kompas.id',\n metered_wall_type: this.tracker_metered_wall_type || 'HP',\n metered_wall_balance: this.tracker_metered_wall_balance,\n })\n }\n\n private redirectToLogin(triggerClick: string): void {\n this.sendDataLayeronButtonLogin(triggerClick)\n window.open(this.loginUrl, '_blank')\n }\n\n private redirectToBerlangganan(): void {\n this.sendDataLayeronButtonBerlangganan()\n window.open(this.subscriptionUrl, '_blank')\n }\n\n render() {\n return html`\n <div\n class=\"radius absolute z-20 bg-black bg-opacity-50 p-4 top-0 bottom-0 left-0 flex flex-col w-full h-full justify-center items-center\"\n >\n ${this.isLogin ? this.isLoginComponent() : this.defaultComponent()}\n </div>\n `\n }\n}\n"]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { KompasPaywall } from './components/kompas-paywall/KompasPaywall.js';
|
|
2
|
+
export { KompasFooter } from './components/kompas-footer/KompasFooter.js';
|
|
3
|
+
export { KompasPaywallVideo } from './components/kompas-paywall-video/KompasPaywallVideo.js';
|
|
4
|
+
export { KompasMeteredPaywall } from './components/kompas-metered-paywall/KompasMeteredPaywall.js';
|
|
5
|
+
declare global {
|
|
6
|
+
interface Window {
|
|
7
|
+
gtag: (...args: any[]) => void;
|
|
8
|
+
dataLayer: Record<string, any>;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { KompasPaywall } from './components/kompas-paywall/KompasPaywall.js';
|
|
2
|
+
export { KompasFooter } from './components/kompas-footer/KompasFooter.js';
|
|
3
|
+
export { KompasPaywallVideo } from './components/kompas-paywall-video/KompasPaywallVideo.js';
|
|
4
|
+
export { KompasMeteredPaywall } from './components/kompas-metered-paywall/KompasMeteredPaywall.js';
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,8CAA8C,CAAA;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,4CAA4C,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,MAAM,yDAAyD,CAAA;AAC5F,OAAO,EAAE,oBAAoB,EAAE,MAAM,6DAA6D,CAAA","sourcesContent":["export { KompasPaywall } from './components/kompas-paywall/KompasPaywall.js'\nexport { KompasFooter } from './components/kompas-footer/KompasFooter.js'\nexport { KompasPaywallVideo } from './components/kompas-paywall-video/KompasPaywallVideo.js'\nexport { KompasMeteredPaywall } from './components/kompas-metered-paywall/KompasMeteredPaywall.js'\n\ndeclare global {\n interface Window {\n gtag: (...args: any[]) => void\n dataLayer: Record<string, any>\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deviceType.js","sourceRoot":"","sources":["../../../src/utils/deviceType.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,GAAW,EAAE;IAC9B,IAAI,MAAM,CAAC,UAAU,IAAI,GAAG,EAAE;QAC5B,OAAO,QAAQ,CAAA;KAChB;IACD,IAAI,MAAM,CAAC,UAAU,GAAG,GAAG,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,EAAE;QACxD,OAAO,KAAK,CAAA;KACb;IACD,OAAO,SAAS,CAAA;AAClB,CAAC,CAAA;AAED,OAAO,EAAE,UAAU,EAAE,CAAA","sourcesContent":["const deviceType = (): string => {\n if (window.innerWidth <= 768) {\n return 'Mobile'\n }\n if (window.innerWidth > 768 && window.innerWidth <= 1024) {\n return 'Tab'\n }\n return 'Desktop'\n}\n\nexport { deviceType }\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getFontAwesomeIcon(prefix: string, iconName: string, width?: number, height?: number): string;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { library, config, icon, } from '@fortawesome/fontawesome-svg-core';
|
|
2
|
+
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
3
|
+
import { far } from '@fortawesome/free-regular-svg-icons';
|
|
4
|
+
import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
5
|
+
config.autoAddCss = false;
|
|
6
|
+
library.add(fas, far, fab);
|
|
7
|
+
export function getFontAwesomeIcon(prefix, iconName, width = 16, height = 16) {
|
|
8
|
+
const iconObject = icon({
|
|
9
|
+
prefix: prefix,
|
|
10
|
+
iconName: iconName,
|
|
11
|
+
});
|
|
12
|
+
if (iconObject) {
|
|
13
|
+
const htmlString = iconObject.html.join('');
|
|
14
|
+
const parser = new DOMParser();
|
|
15
|
+
const doc = parser.parseFromString(htmlString, 'image/svg+xml');
|
|
16
|
+
const svgElement = doc.querySelector('svg');
|
|
17
|
+
if (svgElement) {
|
|
18
|
+
svgElement.setAttribute('width', width.toString());
|
|
19
|
+
svgElement.setAttribute('height', height.toString());
|
|
20
|
+
return svgElement.outerHTML;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=fontawesome-setup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fontawesome-setup.js","sourceRoot":"","sources":["../../../src/utils/fontawesome-setup.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,MAAM,EACN,IAAI,GAGL,MAAM,mCAAmC,CAAA;AAC1C,OAAO,EAAE,GAAG,EAAE,MAAM,mCAAmC,CAAA;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,qCAAqC,CAAA;AACzD,OAAO,EAAE,GAAG,EAAE,MAAM,oCAAoC,CAAA;AAExD,MAAM,CAAC,UAAU,GAAG,KAAK,CAAA;AACzB,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,CAAA;AAE1B,MAAM,UAAU,kBAAkB,CAChC,MAAc,EACd,QAAgB,EAChB,QAAgB,EAAE,EAClB,SAAiB,EAAE;IAEnB,MAAM,UAAU,GAAG,IAAI,CAAC;QACtB,MAAM,EAAE,MAAoB;QAC5B,QAAQ,EAAE,QAAoB;KAC/B,CAAC,CAAA;IAEF,IAAI,UAAU,EAAE;QACd,MAAM,UAAU,GAAG,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;QAC3C,MAAM,MAAM,GAAG,IAAI,SAAS,EAAE,CAAA;QAC9B,MAAM,GAAG,GAAG,MAAM,CAAC,eAAe,CAAC,UAAU,EAAE,eAAe,CAAC,CAAA;QAC/D,MAAM,UAAU,GAAG,GAAG,CAAC,aAAa,CAAC,KAAK,CAAC,CAAA;QAE3C,IAAI,UAAU,EAAE;YACd,UAAU,CAAC,YAAY,CAAC,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAA;YAClD,UAAU,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAA;YACpD,OAAO,UAAU,CAAC,SAAS,CAAA;SAC5B;KACF;IAED,OAAO,EAAE,CAAA;AACX,CAAC","sourcesContent":["import {\n library,\n config,\n icon,\n IconName,\n IconPrefix,\n} from '@fortawesome/fontawesome-svg-core'\nimport { fas } from '@fortawesome/free-solid-svg-icons'\nimport { far } from '@fortawesome/free-regular-svg-icons'\nimport { fab } from '@fortawesome/free-brands-svg-icons'\n\nconfig.autoAddCss = false\nlibrary.add(fas, far, fab)\n\nexport function getFontAwesomeIcon(\n prefix: string,\n iconName: string,\n width: number = 16,\n height: number = 16\n): string {\n const iconObject = icon({\n prefix: prefix as IconPrefix,\n iconName: iconName as IconName,\n })\n\n if (iconObject) {\n const htmlString = iconObject.html.join('')\n const parser = new DOMParser()\n const doc = parser.parseFromString(htmlString, 'image/svg+xml')\n const svgElement = doc.querySelector('svg')\n\n if (svgElement) {\n svgElement.setAttribute('width', width.toString())\n svgElement.setAttribute('height', height.toString())\n return svgElement.outerHTML\n }\n }\n\n return ''\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TWStyles: import("lit").CSSResult;
|