@rtsee/ngx 0.0.102 → 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';
|
|
@@ -1379,10 +1379,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
1379
1379
|
args: ['checkoutContainer']
|
|
1380
1380
|
}] } });
|
|
1381
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
|
+
|
|
1382
1419
|
class PaymentValidationPageComponent {
|
|
1383
|
-
constructor(paymentsService,
|
|
1420
|
+
constructor(paymentsService, gtagService) {
|
|
1384
1421
|
this.paymentsService = paymentsService;
|
|
1385
|
-
this.
|
|
1422
|
+
this.gtagService = gtagService;
|
|
1386
1423
|
this.loadInProgress = false;
|
|
1387
1424
|
this.theme = 'dark';
|
|
1388
1425
|
this.RTSeeTextLabelKeys = RTSeeTextLabelKeys;
|
|
@@ -1396,12 +1433,18 @@ class PaymentValidationPageComponent {
|
|
|
1396
1433
|
undefined;
|
|
1397
1434
|
this.validatePayment();
|
|
1398
1435
|
}
|
|
1436
|
+
reportConversion(url, eventName) {
|
|
1437
|
+
return this.gtagService.reportConversion(url, eventName);
|
|
1438
|
+
}
|
|
1399
1439
|
validatePayment() {
|
|
1400
1440
|
this.paymentsService.getSession().subscribe((res) => {
|
|
1401
1441
|
// this.messenger.closePaymentValidationPage();
|
|
1402
1442
|
if (res.user && res.token) {
|
|
1403
1443
|
localStorage.setItem(LS_TOKEN_LABEL, res.token);
|
|
1404
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
|
+
}
|
|
1405
1448
|
setTimeout(() => {
|
|
1406
1449
|
window.location.href = document.baseURI;
|
|
1407
1450
|
}, 1000);
|
|
@@ -1414,13 +1457,13 @@ class PaymentValidationPageComponent {
|
|
|
1414
1457
|
}
|
|
1415
1458
|
void this.init();
|
|
1416
1459
|
}
|
|
1417
|
-
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 }); }
|
|
1418
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"] }] }); }
|
|
1419
1462
|
}
|
|
1420
1463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImport: i0, type: PaymentValidationPageComponent, decorators: [{
|
|
1421
1464
|
type: Component,
|
|
1422
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" }]
|
|
1423
|
-
}], ctorParameters: () => [{ type: PaymentsService }, { type:
|
|
1466
|
+
}], ctorParameters: () => [{ type: PaymentsService }, { type: GtagService }], propDecorators: { messenger: [{
|
|
1424
1467
|
type: Input
|
|
1425
1468
|
}], theme: [{
|
|
1426
1469
|
type: Input
|
|
@@ -4434,5 +4477,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.4", ngImpor
|
|
|
4434
4477
|
* Generated bundle index. Do not edit.
|
|
4435
4478
|
*/
|
|
4436
4479
|
|
|
4437
|
-
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 };
|
|
4438
4481
|
//# sourceMappingURL=rtsee-ngx.mjs.map
|