refactor(tealium): resolv lint issues
This commit is contained in:
parent
104e66db28
commit
7d52794933
@ -1,5 +1,12 @@
|
|||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Plugin, Cordova, CordovaProperty, CordovaInstance, InstanceProperty, AwesomeCordovaNativePlugin } from '@awesome-cordova-plugins/core';
|
import {
|
||||||
|
Plugin,
|
||||||
|
Cordova,
|
||||||
|
CordovaProperty,
|
||||||
|
CordovaInstance,
|
||||||
|
InstanceProperty,
|
||||||
|
AwesomeCordovaNativePlugin,
|
||||||
|
} from '@awesome-cordova-plugins/core';
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
export enum Collectors {
|
export enum Collectors {
|
||||||
@ -33,10 +40,10 @@ export interface TealiumDispatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class TealiumView implements TealiumDispatch {
|
export class TealiumView implements TealiumDispatch {
|
||||||
public type: string = 'view';
|
public type = 'view';
|
||||||
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
|
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
|
||||||
toJson() {
|
toJson() {
|
||||||
let dictionary: any = {};
|
const dictionary: any = {};
|
||||||
dictionary['type'] = this.type;
|
dictionary['type'] = this.type;
|
||||||
dictionary['dataLayer'] = {};
|
dictionary['dataLayer'] = {};
|
||||||
this.dataLayer.forEach((k, v) => {
|
this.dataLayer.forEach((k, v) => {
|
||||||
@ -49,10 +56,10 @@ export class TealiumView implements TealiumDispatch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class TealiumEvent implements TealiumDispatch {
|
export class TealiumEvent implements TealiumDispatch {
|
||||||
public type: string = 'event';
|
public type = 'event';
|
||||||
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
|
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
|
||||||
toJson() {
|
toJson() {
|
||||||
let dictionary: any = {};
|
const dictionary: any = {};
|
||||||
dictionary['type'] = this.type;
|
dictionary['type'] = this.type;
|
||||||
dictionary['dataLayer'] = {};
|
dictionary['dataLayer'] = {};
|
||||||
this.dataLayer.forEach((k, v) => {
|
this.dataLayer.forEach((k, v) => {
|
||||||
@ -178,11 +185,10 @@ export interface TealiumConfig {
|
|||||||
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
repo: 'https://github.com/Tealium/cordova-plugin', // the github repository URL for the plugin
|
||||||
install: '', // OPTIONAL install command, in case the plugin requires variables
|
install: '', // OPTIONAL install command, in case the plugin requires variables
|
||||||
installVariables: [], // OPTIONAL the plugin requires variables
|
installVariables: [], // OPTIONAL the plugin requires variables
|
||||||
platforms: ['Android', 'iOS'] // Array of platforms supported
|
platforms: ['Android', 'iOS'], // Array of platforms supported
|
||||||
})
|
})
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class Tealium extends AwesomeCordovaNativePlugin {
|
export class Tealium extends AwesomeCordovaNativePlugin {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This function initializes the Tealium Cordova Plugin
|
* This function initializes the Tealium Cordova Plugin
|
||||||
* @param config {TealiumConfig}
|
* @param config {TealiumConfig}
|
||||||
|
Loading…
Reference in New Issue
Block a user