mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-04-24 20:00:16 +08:00
refactor(tealium): resolv lint issues
This commit is contained in:
parent
104e66db28
commit
7d52794933
@ -1,5 +1,12 @@
|
||||
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';
|
||||
|
||||
export enum Collectors {
|
||||
@ -33,10 +40,10 @@ export interface TealiumDispatch {
|
||||
}
|
||||
|
||||
export class TealiumView implements TealiumDispatch {
|
||||
public type: string = 'view';
|
||||
public type = 'view';
|
||||
constructor(public viewName: string, public dataLayer: Map<string, any>) {}
|
||||
toJson() {
|
||||
let dictionary: any = {};
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
dictionary['dataLayer'] = {};
|
||||
this.dataLayer.forEach((k, v) => {
|
||||
@ -49,10 +56,10 @@ export class TealiumView implements TealiumDispatch {
|
||||
}
|
||||
|
||||
export class TealiumEvent implements TealiumDispatch {
|
||||
public type: string = 'event';
|
||||
public type = 'event';
|
||||
constructor(public eventName: string, public dataLayer: Map<string, any>) {}
|
||||
toJson() {
|
||||
let dictionary: any = {};
|
||||
const dictionary: any = {};
|
||||
dictionary['type'] = this.type;
|
||||
dictionary['dataLayer'] = {};
|
||||
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
|
||||
install: '', // OPTIONAL install command, in case 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()
|
||||
export class Tealium extends AwesomeCordovaNativePlugin {
|
||||
|
||||
/**
|
||||
* This function initializes the Tealium Cordova Plugin
|
||||
* @param config {TealiumConfig}
|
||||
|
Loading…
x
Reference in New Issue
Block a user