@rtsee/ngx 0.0.101 → 0.0.103
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { Injectable, Input, Component, ViewChild, Directive, DOCUMENT, HostListener, Inject, EventEmitter, Output, forwardRef, output, CUSTOM_ELEMENTS_SCHEMA, NgModule } from '@angular/core';
|
|
3
3
|
import * as i2$1 from '@angular/common';
|
|
4
|
-
import { NgClass, NgIf, NgForOf, SlicePipe, NgStyle, DatePipe, NgOptimizedImage, CommonModule } from '@angular/common';
|
|
4
|
+
import { NgClass, NgIf, NgForOf, DOCUMENT as DOCUMENT$1, SlicePipe, NgStyle, DatePipe, NgOptimizedImage, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/forms';
|
|
6
6
|
import { FormsModule, FormGroup, FormControl, Validators, ReactiveFormsModule } from '@angular/forms';
|
|
7
7
|
import { Select } from 'primeng/select';
|
|
@@ -1210,11 +1210,13 @@ class PaymentProductSnippetComponent {
|
|
|
1210
1210
|
this.priceSelected.emit(price);
|
|
1211
1211
|
}
|
|
1212
1212
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PaymentProductSnippetComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1213
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PaymentProductSnippetComponent, isStandalone: true, selector: "rtsee-payment-product-snippet", inputs: { product: "product", theme: "theme" }, outputs: { priceSelected: "priceSelected" }, ngImport: i0, template: "<div class=\"rtsee-payment-product-snippet\">\n <div class=\"rtsee-payment-product-card\">\n <h3 class=\"rtsee-payment-product-header\">{{product.name}}</h3>\n <p class=\"rtsee-payment-product-description\">{{product.description}}</p>\n <div class=\"rtsee-payment-product-prices\">\n @for (price of product.prices; track price.id) {\n <div class=\"rtsee-payment-price-card\">\n <p class=\"rtsee-payment-price-label\">{{price.label}}</p>\n <p class=\"rtsee-payment-price-description\">{{price.description}}</p>\n <button class=\"rtsee-payment-select-plan-btn\"\n (click)=\"selectPrice(price)\"\n >Select Plan</button>\n </div>\n }\n </div>\n </div>\n</div>\n" }); }
|
|
1213
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PaymentProductSnippetComponent, isStandalone: true, selector: "rtsee-payment-product-snippet", inputs: { product: "product", theme: "theme" }, outputs: { priceSelected: "priceSelected" }, ngImport: i0, template: "<div class=\"rtsee-payment-product-snippet\" [ngClass]=\"product.name\">\n <div class=\"rtsee-payment-product-card\">\n <h3 class=\"rtsee-payment-product-header\">{{product.name}}</h3>\n <p class=\"rtsee-payment-product-description\">{{product.description}}</p>\n <div class=\"rtsee-payment-product-prices\">\n @for (price of product.prices; track price.id) {\n <div class=\"rtsee-payment-price-card\">\n <p class=\"rtsee-payment-price-label\">{{price.label}}</p>\n <p class=\"rtsee-payment-price-description\">{{price.description}}</p>\n <button class=\"rtsee-payment-select-plan-btn\"\n (click)=\"selectPrice(price)\"\n >Select Plan</button>\n </div>\n }\n </div>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1214
1214
|
}
|
|
1215
1215
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PaymentProductSnippetComponent, decorators: [{
|
|
1216
1216
|
type: Component,
|
|
1217
|
-
args: [{ selector: 'rtsee-payment-product-snippet', imports: [
|
|
1217
|
+
args: [{ selector: 'rtsee-payment-product-snippet', imports: [
|
|
1218
|
+
NgClass
|
|
1219
|
+
], template: "<div class=\"rtsee-payment-product-snippet\" [ngClass]=\"product.name\">\n <div class=\"rtsee-payment-product-card\">\n <h3 class=\"rtsee-payment-product-header\">{{product.name}}</h3>\n <p class=\"rtsee-payment-product-description\">{{product.description}}</p>\n <div class=\"rtsee-payment-product-prices\">\n @for (price of product.prices; track price.id) {\n <div class=\"rtsee-payment-price-card\">\n <p class=\"rtsee-payment-price-label\">{{price.label}}</p>\n <p class=\"rtsee-payment-price-description\">{{price.description}}</p>\n <button class=\"rtsee-payment-select-plan-btn\"\n (click)=\"selectPrice(price)\"\n >Select Plan</button>\n </div>\n }\n </div>\n </div>\n</div>\n" }]
|
|
1218
1220
|
}], propDecorators: { product: [{
|
|
1219
1221
|
type: Input
|
|
1220
1222
|
}], theme: [{
|
|
@@ -1377,10 +1379,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1377
1379
|
args: ['checkoutContainer']
|
|
1378
1380
|
}] } });
|
|
1379
1381
|
|
|
1382
|
+
/// <reference types="gtag.js" />
|
|
1383
|
+
class GtagService {
|
|
1384
|
+
constructor(document) {
|
|
1385
|
+
this.window = document.defaultView;
|
|
1386
|
+
}
|
|
1387
|
+
reportConversion(url, key) {
|
|
1388
|
+
const callback = () => {
|
|
1389
|
+
if (typeof url !== 'undefined' && this.window) {
|
|
1390
|
+
this.window.location.href = url;
|
|
1391
|
+
}
|
|
1392
|
+
};
|
|
1393
|
+
if (this.window && typeof this.window.gtag === 'function' && key) {
|
|
1394
|
+
this.window.gtag('event', 'conversion', {
|
|
1395
|
+
send_to: key,
|
|
1396
|
+
value: 1.0,
|
|
1397
|
+
currency: 'USD',
|
|
1398
|
+
event_callback: callback,
|
|
1399
|
+
});
|
|
1400
|
+
}
|
|
1401
|
+
else {
|
|
1402
|
+
callback();
|
|
1403
|
+
}
|
|
1404
|
+
return false;
|
|
1405
|
+
}
|
|
1406
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: GtagService, deps: [{ token: DOCUMENT$1 }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1407
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: GtagService, providedIn: 'root' }); }
|
|
1408
|
+
}
|
|
1409
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: GtagService, decorators: [{
|
|
1410
|
+
type: Injectable,
|
|
1411
|
+
args: [{
|
|
1412
|
+
providedIn: 'root',
|
|
1413
|
+
}]
|
|
1414
|
+
}], ctorParameters: () => [{ type: Document, decorators: [{
|
|
1415
|
+
type: Inject,
|
|
1416
|
+
args: [DOCUMENT$1]
|
|
1417
|
+
}] }] });
|
|
1418
|
+
|
|
1380
1419
|
class PaymentValidationPageComponent {
|
|
1381
|
-
constructor(paymentsService,
|
|
1420
|
+
constructor(paymentsService, gtagService) {
|
|
1382
1421
|
this.paymentsService = paymentsService;
|
|
1383
|
-
this.
|
|
1422
|
+
this.gtagService = gtagService;
|
|
1384
1423
|
this.loadInProgress = false;
|
|
1385
1424
|
this.theme = 'dark';
|
|
1386
1425
|
this.RTSeeTextLabelKeys = RTSeeTextLabelKeys;
|
|
@@ -1394,12 +1433,18 @@ class PaymentValidationPageComponent {
|
|
|
1394
1433
|
undefined;
|
|
1395
1434
|
this.validatePayment();
|
|
1396
1435
|
}
|
|
1436
|
+
reportConversion(url, eventName) {
|
|
1437
|
+
return this.gtagService.reportConversion(url, eventName);
|
|
1438
|
+
}
|
|
1397
1439
|
validatePayment() {
|
|
1398
1440
|
this.paymentsService.getSession().subscribe((res) => {
|
|
1399
1441
|
// this.messenger.closePaymentValidationPage();
|
|
1400
1442
|
if (res.user && res.token) {
|
|
1401
1443
|
localStorage.setItem(LS_TOKEN_LABEL, res.token);
|
|
1402
1444
|
localStorage.setItem(LS_USER_LABEL, JSON.stringify(JSON.stringify(res.user)));
|
|
1445
|
+
if (this.paymentsService.paymentsConfig?.gTagEventName && this.paymentsService.paymentsConfig?.isProdMode) {
|
|
1446
|
+
this.reportConversion(undefined, this.paymentsService.paymentsConfig.gTagEventName);
|
|
1447
|
+
}
|
|
1403
1448
|
setTimeout(() => {
|
|
1404
1449
|
window.location.href = document.baseURI;
|
|
1405
1450
|
}, 1000);
|
|
@@ -1412,13 +1457,13 @@ class PaymentValidationPageComponent {
|
|
|
1412
1457
|
}
|
|
1413
1458
|
void this.init();
|
|
1414
1459
|
}
|
|
1415
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PaymentValidationPageComponent, deps: [{ token: PaymentsService }, { token:
|
|
1460
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PaymentValidationPageComponent, deps: [{ token: PaymentsService }, { token: GtagService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1416
1461
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.4", type: PaymentValidationPageComponent, isStandalone: true, selector: "rtsee-payment-validation-page", inputs: { messenger: "messenger", theme: "theme" }, viewQueries: [{ propertyName: "checkoutContainer", first: true, predicate: ["checkoutContainer"], descendants: true }], ngImport: i0, template: "<div class=\"rtsee-payment-page\" [ngClass]=\"'rtsee-payment-theme-' + theme\">\n @if (messenger.payments?.validationInProgress) {\n <div class=\"rtsee-payment-spinner\">\n <div class=\"rtsee-payment-spinner-ring\"></div>\n </div>\n }\n <div class=\"rtsee-payment-page-footer\">\n <button class=\"rtsee-payment-cancel-btn\"\n (click)=\"messenger.closePaymentPage()\"\n >{{messenger.labels[RTSeeTextLabelKeys.CANCEL_LABEL]}}</button>\n </div>\n</div>\n", dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
1417
1462
|
}
|
|
1418
1463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PaymentValidationPageComponent, decorators: [{
|
|
1419
1464
|
type: Component,
|
|
1420
1465
|
args: [{ selector: 'rtsee-payment-validation-page', imports: [ReactiveFormsModule, NgClass], template: "<div class=\"rtsee-payment-page\" [ngClass]=\"'rtsee-payment-theme-' + theme\">\n @if (messenger.payments?.validationInProgress) {\n <div class=\"rtsee-payment-spinner\">\n <div class=\"rtsee-payment-spinner-ring\"></div>\n </div>\n }\n <div class=\"rtsee-payment-page-footer\">\n <button class=\"rtsee-payment-cancel-btn\"\n (click)=\"messenger.closePaymentPage()\"\n >{{messenger.labels[RTSeeTextLabelKeys.CANCEL_LABEL]}}</button>\n </div>\n</div>\n" }]
|
|
1421
|
-
}], ctorParameters: () => [{ type: PaymentsService }, { type:
|
|
1466
|
+
}], ctorParameters: () => [{ type: PaymentsService }, { type: GtagService }], propDecorators: { messenger: [{
|
|
1422
1467
|
type: Input
|
|
1423
1468
|
}], theme: [{
|
|
1424
1469
|
type: Input
|
|
@@ -4432,5 +4477,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
4432
4477
|
* Generated bundle index. Do not edit.
|
|
4433
4478
|
*/
|
|
4434
4479
|
|
|
4435
|
-
export { EntitiesConfigurationsListComponent, EntitiesListComponent, FormComponent, ManageEntityComponent, ManageEntityConfigurationComponent, MessengerComponent, NgxService, PaymentProductSnippetComponent, PresentationComponent, ProfileComponent, RTSeeAuthComponent, RTSeeConferenceComponent, RTSeeContainerComponent, RTSeeControlsComponent, RTSeeModule, RtseeEntityCommentsComponent, RtseeEntityPreviewComponent, RtseeEntityTagsComponent, RtseeEventsDashboardComponent, RtseePeerComponent, RtseeSettingsComponent, RtseeTagGroupManageComponent, RtseeTagGroupsManageComponent, RtseeTagManageComponent, RtseeTagsAccordionMenuComponent };
|
|
4480
|
+
export { EntitiesConfigurationsListComponent, EntitiesListComponent, FormComponent, GtagService, ManageEntityComponent, ManageEntityConfigurationComponent, MessengerComponent, NgxService, PaymentProductSnippetComponent, PresentationComponent, ProfileComponent, RTSeeAuthComponent, RTSeeConferenceComponent, RTSeeContainerComponent, RTSeeControlsComponent, RTSeeModule, RtseeEntityCommentsComponent, RtseeEntityPreviewComponent, RtseeEntityTagsComponent, RtseeEventsDashboardComponent, RtseePeerComponent, RtseeSettingsComponent, RtseeTagGroupManageComponent, RtseeTagGroupsManageComponent, RtseeTagManageComponent, RtseeTagsAccordionMenuComponent };
|
|
4436
4481
|
//# sourceMappingURL=rtsee-ngx.mjs.map
|