@webtrekk-smart-pixel/angular 1.1.1 → 1.1.4
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/{dist/smart-pixel-angular.umd.js → bundles/webtrekk-smart-pixel-angular.umd.js} +253 -260
- package/bundles/webtrekk-smart-pixel-angular.umd.js.map +1 -0
- package/esm2015/lib/Directives/ContentEngagementDirective.js +31 -0
- package/esm2015/lib/Directives/ContentEngagementDirective.ngsummary.json +1 -0
- package/esm2015/lib/Directives/DataDirective.js +66 -0
- package/esm2015/lib/Directives/DataDirective.ngsummary.json +1 -0
- package/esm2015/lib/Directives/DataTypes.js +2 -0
- package/esm2015/lib/Directives/DataTypes.ngsummary.json +1 -0
- package/esm2015/lib/Directives/ExtensionDirective.js +25 -0
- package/esm2015/lib/Directives/ExtensionDirective.ngsummary.json +1 -0
- package/esm2015/lib/Directives/ProductListDirective.js +30 -0
- package/esm2015/lib/Directives/ProductListDirective.ngsummary.json +1 -0
- package/esm2015/lib/Directives/TeaserDirective.js +31 -0
- package/esm2015/lib/Directives/TeaserDirective.ngsummary.json +1 -0
- package/esm2015/lib/WebtrekkSmartPixelAngular.js +133 -0
- package/esm2015/lib/WebtrekkSmartPixelAngular.ngsummary.json +1 -0
- package/esm2015/lib/WebtrekkSmartPixelAutoTracking.js +44 -0
- package/esm2015/lib/WebtrekkSmartPixelAutoTracking.ngfactory.js +14 -0
- package/esm2015/lib/WebtrekkSmartPixelAutoTracking.ngsummary.json +1 -0
- package/esm2015/lib/WebtrekkSmartPixelConfig.js +12 -0
- package/esm2015/lib/WebtrekkSmartPixelConfig.ngsummary.json +1 -0
- package/esm2015/lib/WebtrekkSmartPixelModule.js +54 -0
- package/esm2015/lib/WebtrekkSmartPixelModule.ngfactory.js +15 -0
- package/esm2015/lib/WebtrekkSmartPixelModule.ngsummary.json +1 -0
- package/esm2015/lib/WebtrekkSmartPixelToken.js +3 -0
- package/esm2015/lib/WebtrekkSmartPixelToken.ngsummary.json +1 -0
- package/esm2015/public-api.js +22 -0
- package/esm2015/public-api.ngsummary.json +1 -0
- package/esm2015/webtrekk-smart-pixel-angular.js +6 -0
- package/esm2015/webtrekk-smart-pixel-angular.ngsummary.json +1 -0
- package/fesm2015/webtrekk-smart-pixel-angular.js +422 -0
- package/fesm2015/webtrekk-smart-pixel-angular.js.map +1 -0
- package/lib/Directives/ContentEngagementDirective.d.ts +10 -0
- package/lib/Directives/DataDirective.d.ts +17 -0
- package/lib/Directives/DataTypes.d.ts +176 -0
- package/lib/Directives/ExtensionDirective.d.ts +9 -0
- package/lib/Directives/ProductListDirective.d.ts +10 -0
- package/lib/Directives/TeaserDirective.d.ts +10 -0
- package/lib/WebtrekkSmartPixelAngular.d.ts +19 -0
- package/lib/WebtrekkSmartPixelAutoTracking.d.ts +9 -0
- package/lib/WebtrekkSmartPixelAutoTracking.ngfactory.d.ts +3 -0
- package/lib/WebtrekkSmartPixelConfig.d.ts +22 -0
- package/lib/WebtrekkSmartPixelModule.d.ts +5 -0
- package/lib/WebtrekkSmartPixelModule.ngfactory.d.ts +3 -0
- package/lib/WebtrekkSmartPixelToken.d.ts +3 -0
- package/package.json +19 -6
- package/public-api.d.ts +17 -0
- package/webtrekk-smart-pixel-angular.d.ts +6 -0
- package/webtrekk-smart-pixel-angular.metadata.json +1 -0
- package/CHANGELOG.md +0 -45
- package/index.js +0 -4
|
@@ -1,249 +1,41 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
2
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@webtrekk-smart-pixel/core'), require('@angular/router'), require('rxjs/operators')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@angular/core', '@webtrekk-smart-pixel/core', '@angular/router', 'rxjs/operators'], factory) :
|
|
4
|
-
(global = global || self, factory(global[
|
|
5
|
-
}(this, (function (exports, core, wtSmart, router, operators) { 'use strict';
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@webtrekk-smart-pixel/angular', ['exports', '@angular/core', '@webtrekk-smart-pixel/core', '@angular/router', 'rxjs/operators'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global["webtrekk-smart-pixel"] = global["webtrekk-smart-pixel"] || {}, global["webtrekk-smart-pixel"].angular = {}), global.ng.core, global.wtSmart, global.ng.router, global.rxjs.operators));
|
|
5
|
+
})(this, (function (exports, core, wtSmart, router, operators) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
|
|
12
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
-
purpose with or without fee is hereby granted.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
22
|
-
***************************************************************************** */
|
|
23
|
-
|
|
24
|
-
var __assign = function() {
|
|
25
|
-
__assign = Object.assign || function __assign(t) {
|
|
26
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
27
|
-
s = arguments[i];
|
|
28
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
29
|
-
}
|
|
30
|
-
return t;
|
|
31
|
-
};
|
|
32
|
-
return __assign.apply(this, arguments);
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
function __decorate(decorators, target, key, desc) {
|
|
36
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
37
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
38
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
39
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
function __param(paramIndex, decorator) {
|
|
43
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
44
|
-
}
|
|
9
|
+
var wtSmart__default = /*#__PURE__*/_interopDefaultLegacy(wtSmart);
|
|
45
10
|
|
|
46
|
-
var
|
|
47
|
-
+ '[wt-campaign-data],'
|
|
48
|
-
+ '[wt-customer-data],'
|
|
49
|
-
+ '[wt-init-data],'
|
|
50
|
-
+ '[wt-order-data],'
|
|
51
|
-
+ '[wt-page-data],'
|
|
52
|
-
+ '[wt-product-data],'
|
|
53
|
-
+ '[wt-session-data]';
|
|
54
|
-
var DataDirective = /** @class */ (function () {
|
|
55
|
-
function DataDirective(pixel) {
|
|
56
|
-
this.pixel = pixel;
|
|
57
|
-
}
|
|
58
|
-
DataDirective.prototype.ngAfterContentInit = function () {
|
|
59
|
-
var _this = this;
|
|
60
|
-
if (this.wtAdvancedData) {
|
|
61
|
-
this.pixel.advanced(this.wtAdvancedData);
|
|
62
|
-
}
|
|
63
|
-
if (this.wtCampaignData) {
|
|
64
|
-
this.pixel.campaign(this.wtCampaignData);
|
|
65
|
-
}
|
|
66
|
-
if (this.wtCustomerData) {
|
|
67
|
-
this.pixel.customer(this.wtCustomerData.id, this.wtCustomerData, this.wtCustomerData.validation);
|
|
68
|
-
}
|
|
69
|
-
if (this.wtInitData) {
|
|
70
|
-
this.pixel.init(this.wtInitData);
|
|
71
|
-
}
|
|
72
|
-
if (this.wtOrderData) {
|
|
73
|
-
this.pixel.order(this.wtOrderData);
|
|
74
|
-
}
|
|
75
|
-
if (this.wtPageData) {
|
|
76
|
-
this.pixel.page(this.wtPageData.name, this.wtPageData);
|
|
77
|
-
}
|
|
78
|
-
if (this.wtProductData) {
|
|
79
|
-
this.pixel.product(this.wtProductData.action, this.wtProductData);
|
|
80
|
-
}
|
|
81
|
-
if (this.wtSessionData) {
|
|
82
|
-
this.pixel.session(this.wtSessionData);
|
|
83
|
-
}
|
|
84
|
-
if (typeof this.wtTrack !== 'undefined') {
|
|
85
|
-
setTimeout(function () {
|
|
86
|
-
_this.pixel.track();
|
|
87
|
-
}, 0);
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
|
-
__decorate([
|
|
91
|
-
core.Input('wt-advanced-data')
|
|
92
|
-
], DataDirective.prototype, "wtAdvancedData", void 0);
|
|
93
|
-
__decorate([
|
|
94
|
-
core.Input('wt-campaign-data')
|
|
95
|
-
], DataDirective.prototype, "wtCampaignData", void 0);
|
|
96
|
-
__decorate([
|
|
97
|
-
core.Input('wt-customer-data')
|
|
98
|
-
], DataDirective.prototype, "wtCustomerData", void 0);
|
|
99
|
-
__decorate([
|
|
100
|
-
core.Input('wt-init-data')
|
|
101
|
-
], DataDirective.prototype, "wtInitData", void 0);
|
|
102
|
-
__decorate([
|
|
103
|
-
core.Input('wt-order-data')
|
|
104
|
-
], DataDirective.prototype, "wtOrderData", void 0);
|
|
105
|
-
__decorate([
|
|
106
|
-
core.Input('wt-page-data')
|
|
107
|
-
], DataDirective.prototype, "wtPageData", void 0);
|
|
108
|
-
__decorate([
|
|
109
|
-
core.Input('wt-product-data')
|
|
110
|
-
], DataDirective.prototype, "wtProductData", void 0);
|
|
111
|
-
__decorate([
|
|
112
|
-
core.Input('wt-session-data')
|
|
113
|
-
], DataDirective.prototype, "wtSessionData", void 0);
|
|
114
|
-
__decorate([
|
|
115
|
-
core.Input('wt-track')
|
|
116
|
-
], DataDirective.prototype, "wtTrack", void 0);
|
|
117
|
-
DataDirective = __decorate([
|
|
118
|
-
core.Directive({
|
|
119
|
-
selector: directiveSelector
|
|
120
|
-
})
|
|
121
|
-
], DataDirective);
|
|
122
|
-
return DataDirective;
|
|
123
|
-
}());
|
|
124
|
-
|
|
125
|
-
var TeaserDirective = /** @class */ (function () {
|
|
126
|
-
function TeaserDirective(elementRef, pixel) {
|
|
127
|
-
this.elementRef = elementRef;
|
|
128
|
-
this.pixel = pixel;
|
|
129
|
-
}
|
|
130
|
-
TeaserDirective.prototype.ngAfterContentInit = function () {
|
|
131
|
-
var _this = this;
|
|
132
|
-
this.pixel.call(function (pix) {
|
|
133
|
-
pix.extension.teaser_tracking.add({
|
|
134
|
-
selector: ((_this.wtTeaserElement.selector) ? _this.wtTeaserElement.selector : _this.elementRef.nativeElement),
|
|
135
|
-
data: _this.wtTeaserElement,
|
|
136
|
-
conversion: _this.wtTeaserElement
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
__decorate([
|
|
141
|
-
core.Input('wt-teaser')
|
|
142
|
-
], TeaserDirective.prototype, "wtTeaserElement", void 0);
|
|
143
|
-
TeaserDirective = __decorate([
|
|
144
|
-
core.Directive({
|
|
145
|
-
selector: '[wt-teaser]',
|
|
146
|
-
exportAs: 'wt-teaser'
|
|
147
|
-
})
|
|
148
|
-
], TeaserDirective);
|
|
149
|
-
return TeaserDirective;
|
|
150
|
-
}());
|
|
151
|
-
|
|
152
|
-
var ProductListDirective = /** @class */ (function () {
|
|
153
|
-
function ProductListDirective(elementRef, pixel) {
|
|
154
|
-
this.elementRef = elementRef;
|
|
155
|
-
this.pixel = pixel;
|
|
156
|
-
}
|
|
157
|
-
ProductListDirective.prototype.ngAfterContentInit = function () {
|
|
158
|
-
var _this = this;
|
|
159
|
-
this.pixel.call(function (pix) {
|
|
160
|
-
pix.extension.product_list_tracking.add({
|
|
161
|
-
selector: ((_this.wtProductListElement.selector) ? _this.wtProductListElement.selector : _this.elementRef.nativeElement),
|
|
162
|
-
data: _this.wtProductListElement
|
|
163
|
-
});
|
|
164
|
-
});
|
|
165
|
-
};
|
|
166
|
-
__decorate([
|
|
167
|
-
core.Input('wt-product-list')
|
|
168
|
-
], ProductListDirective.prototype, "wtProductListElement", void 0);
|
|
169
|
-
ProductListDirective = __decorate([
|
|
170
|
-
core.Directive({
|
|
171
|
-
selector: '[wt-product-list]',
|
|
172
|
-
exportAs: 'wt-product-list'
|
|
173
|
-
})
|
|
174
|
-
], ProductListDirective);
|
|
175
|
-
return ProductListDirective;
|
|
176
|
-
}());
|
|
177
|
-
|
|
178
|
-
var ContentEngagementDirective = /** @class */ (function () {
|
|
179
|
-
function ContentEngagementDirective(elementRef, pixel) {
|
|
180
|
-
this.elementRef = elementRef;
|
|
181
|
-
this.pixel = pixel;
|
|
182
|
-
}
|
|
183
|
-
ContentEngagementDirective.prototype.ngAfterContentInit = function () {
|
|
184
|
-
var _this = this;
|
|
185
|
-
this.pixel.call(function (pix) {
|
|
186
|
-
pix.extension.content_engagement.add({
|
|
187
|
-
selector: ((_this.wtContentEngagementElement.selector) ? _this.wtContentEngagementElement.selector : _this.elementRef.nativeElement),
|
|
188
|
-
name: _this.wtContentEngagementElement.name,
|
|
189
|
-
config: _this.wtContentEngagementElement
|
|
190
|
-
});
|
|
191
|
-
});
|
|
192
|
-
};
|
|
193
|
-
__decorate([
|
|
194
|
-
core.Input('wt-content-engagement')
|
|
195
|
-
], ContentEngagementDirective.prototype, "wtContentEngagementElement", void 0);
|
|
196
|
-
ContentEngagementDirective = __decorate([
|
|
197
|
-
core.Directive({
|
|
198
|
-
selector: '[wt-content-engagement]',
|
|
199
|
-
exportAs: 'wt-content-engagement'
|
|
200
|
-
})
|
|
201
|
-
], ContentEngagementDirective);
|
|
202
|
-
return ContentEngagementDirective;
|
|
203
|
-
}());
|
|
204
|
-
|
|
205
|
-
var ExtensionDirective = /** @class */ (function () {
|
|
206
|
-
function ExtensionDirective(pixel) {
|
|
207
|
-
this.pixel = pixel;
|
|
208
|
-
}
|
|
209
|
-
ExtensionDirective.prototype.ngAfterContentInit = function () {
|
|
210
|
-
this.pixel.extension(this.wtExtensionData.name, this.wtExtensionData.action, this.wtExtensionData.config);
|
|
211
|
-
};
|
|
212
|
-
__decorate([
|
|
213
|
-
core.Input('wt-extension')
|
|
214
|
-
], ExtensionDirective.prototype, "wtExtensionData", void 0);
|
|
215
|
-
ExtensionDirective = __decorate([
|
|
216
|
-
core.Directive({
|
|
217
|
-
selector: '[wt-extension]',
|
|
218
|
-
exportAs: 'wt-extension'
|
|
219
|
-
})
|
|
220
|
-
], ExtensionDirective);
|
|
221
|
-
return ExtensionDirective;
|
|
222
|
-
}());
|
|
223
|
-
|
|
224
|
-
var pixel_ = null;
|
|
11
|
+
var pixel_;
|
|
225
12
|
var getWindow_ = function () {
|
|
226
13
|
return ((typeof window !== 'undefined') ? window : null);
|
|
227
14
|
};
|
|
15
|
+
var ɵ0 = getWindow_;
|
|
228
16
|
var getDocument_ = function () {
|
|
229
17
|
return ((typeof window !== 'undefined' && typeof window.document !== 'undefined') ? window.document : null);
|
|
230
18
|
};
|
|
19
|
+
var ɵ1 = getDocument_;
|
|
231
20
|
var init_ = function () {
|
|
232
21
|
var window_ = getWindow_();
|
|
233
22
|
var document_ = getDocument_();
|
|
234
23
|
if (window_ !== null && document_ !== null) {
|
|
235
|
-
pixel_ =
|
|
24
|
+
pixel_ = wtSmart__default["default"].use(window_, document_);
|
|
25
|
+
// @ts-ignore
|
|
236
26
|
window_['wtSmart'] = pixel_;
|
|
27
|
+
window_['wtSmart']['_ps'](1, '1.1.4');
|
|
237
28
|
}
|
|
238
29
|
};
|
|
30
|
+
var ɵ2 = init_;
|
|
239
31
|
var WebtrekkSmartPixelAngular = /** @class */ (function () {
|
|
240
32
|
function WebtrekkSmartPixelAngular() {
|
|
241
33
|
}
|
|
242
34
|
WebtrekkSmartPixelAngular.prototype.call = function (call) {
|
|
243
|
-
if (pixel_
|
|
35
|
+
if (!pixel_) {
|
|
244
36
|
init_();
|
|
245
37
|
}
|
|
246
|
-
if (pixel_
|
|
38
|
+
if (pixel_) {
|
|
247
39
|
pixel_.push(call);
|
|
248
40
|
}
|
|
249
41
|
};
|
|
@@ -300,12 +92,14 @@
|
|
|
300
92
|
WebtrekkSmartPixelAngular.prototype.product = function (action, data) {
|
|
301
93
|
this.call(function (pix) {
|
|
302
94
|
var method = (action === 'view' || action === 'basket') ? 'set' : 'add';
|
|
95
|
+
// @ts-ignore
|
|
303
96
|
pix.product[action].data[method]([data]);
|
|
304
97
|
});
|
|
305
98
|
};
|
|
306
99
|
WebtrekkSmartPixelAngular.prototype.products = function (action, data) {
|
|
307
100
|
this.call(function (pix) {
|
|
308
101
|
var method = (action === 'view' || action === 'basket') ? 'set' : 'add';
|
|
102
|
+
// @ts-ignore
|
|
309
103
|
pix.product[action].data[method](data);
|
|
310
104
|
});
|
|
311
105
|
};
|
|
@@ -322,6 +116,7 @@
|
|
|
322
116
|
action = 'activate';
|
|
323
117
|
}
|
|
324
118
|
this.call(function (pix) {
|
|
119
|
+
// @ts-ignore
|
|
325
120
|
pix.extension[extension][action](config);
|
|
326
121
|
});
|
|
327
122
|
};
|
|
@@ -340,11 +135,193 @@
|
|
|
340
135
|
pix.trackAction(keepData);
|
|
341
136
|
});
|
|
342
137
|
};
|
|
343
|
-
WebtrekkSmartPixelAngular = __decorate([
|
|
344
|
-
core.Injectable()
|
|
345
|
-
], WebtrekkSmartPixelAngular);
|
|
346
138
|
return WebtrekkSmartPixelAngular;
|
|
347
139
|
}());
|
|
140
|
+
WebtrekkSmartPixelAngular.decorators = [
|
|
141
|
+
{ type: core.Injectable }
|
|
142
|
+
];
|
|
143
|
+
|
|
144
|
+
var directiveSelector = '[wt-advanced-data],'
|
|
145
|
+
+ '[wt-campaign-data],'
|
|
146
|
+
+ '[wt-customer-data],'
|
|
147
|
+
+ '[wt-init-data],'
|
|
148
|
+
+ '[wt-order-data],'
|
|
149
|
+
+ '[wt-page-data],'
|
|
150
|
+
+ '[wt-product-data],'
|
|
151
|
+
+ '[wt-session-data]';
|
|
152
|
+
var DataDirective = /** @class */ (function () {
|
|
153
|
+
function DataDirective(pixel) {
|
|
154
|
+
this.pixel = pixel;
|
|
155
|
+
}
|
|
156
|
+
DataDirective.prototype.ngAfterContentInit = function () {
|
|
157
|
+
var _this = this;
|
|
158
|
+
if (this.wtAdvancedData) {
|
|
159
|
+
this.pixel.advanced(this.wtAdvancedData);
|
|
160
|
+
}
|
|
161
|
+
if (this.wtCampaignData) {
|
|
162
|
+
this.pixel.campaign(this.wtCampaignData);
|
|
163
|
+
}
|
|
164
|
+
if (this.wtCustomerData) {
|
|
165
|
+
this.pixel.customer(this.wtCustomerData && this.wtCustomerData.id ? this.wtCustomerData.id : this.wtCustomerData, this.wtCustomerData, this.wtCustomerData.validation);
|
|
166
|
+
}
|
|
167
|
+
if (this.wtInitData) {
|
|
168
|
+
this.pixel.init(this.wtInitData);
|
|
169
|
+
}
|
|
170
|
+
if (this.wtOrderData) {
|
|
171
|
+
this.pixel.order(this.wtOrderData);
|
|
172
|
+
}
|
|
173
|
+
if (this.wtPageData) {
|
|
174
|
+
this.pixel.page(this.wtPageData && this.wtPageData.name ? this.wtPageData.name : this.wtPageData, this.wtPageData);
|
|
175
|
+
}
|
|
176
|
+
if (this.wtProductData) {
|
|
177
|
+
this.pixel.product(this.wtProductData && this.wtProductData.action ? this.wtProductData.action : 'view', this.wtProductData);
|
|
178
|
+
}
|
|
179
|
+
if (this.wtSessionData) {
|
|
180
|
+
this.pixel.session(this.wtSessionData);
|
|
181
|
+
}
|
|
182
|
+
if (typeof this.wtTrack !== 'undefined') {
|
|
183
|
+
setTimeout(function () {
|
|
184
|
+
_this.pixel.track();
|
|
185
|
+
}, 0);
|
|
186
|
+
}
|
|
187
|
+
};
|
|
188
|
+
return DataDirective;
|
|
189
|
+
}());
|
|
190
|
+
DataDirective.decorators = [
|
|
191
|
+
{ type: core.Directive, args: [{
|
|
192
|
+
selector: directiveSelector
|
|
193
|
+
},] }
|
|
194
|
+
];
|
|
195
|
+
DataDirective.ctorParameters = function () { return [
|
|
196
|
+
{ type: WebtrekkSmartPixelAngular }
|
|
197
|
+
]; };
|
|
198
|
+
DataDirective.propDecorators = {
|
|
199
|
+
wtAdvancedData: [{ type: core.Input, args: ['wt-advanced-data',] }],
|
|
200
|
+
wtCampaignData: [{ type: core.Input, args: ['wt-campaign-data',] }],
|
|
201
|
+
wtCustomerData: [{ type: core.Input, args: ['wt-customer-data',] }],
|
|
202
|
+
wtInitData: [{ type: core.Input, args: ['wt-init-data',] }],
|
|
203
|
+
wtOrderData: [{ type: core.Input, args: ['wt-order-data',] }],
|
|
204
|
+
wtPageData: [{ type: core.Input, args: ['wt-page-data',] }],
|
|
205
|
+
wtProductData: [{ type: core.Input, args: ['wt-product-data',] }],
|
|
206
|
+
wtSessionData: [{ type: core.Input, args: ['wt-session-data',] }],
|
|
207
|
+
wtTrack: [{ type: core.Input, args: ['wt-track',] }]
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
var TeaserDirective = /** @class */ (function () {
|
|
211
|
+
function TeaserDirective(elementRef, pixel) {
|
|
212
|
+
this.elementRef = elementRef;
|
|
213
|
+
this.pixel = pixel;
|
|
214
|
+
}
|
|
215
|
+
TeaserDirective.prototype.ngAfterContentInit = function () {
|
|
216
|
+
var _this = this;
|
|
217
|
+
this.pixel.call(function (pix) {
|
|
218
|
+
pix.extension.teaser_tracking.add({
|
|
219
|
+
selector: _this.wtTeaserElement && _this.wtTeaserElement.selector ? _this.wtTeaserElement.selector : _this.elementRef.nativeElement,
|
|
220
|
+
data: _this.wtTeaserElement,
|
|
221
|
+
conversion: _this.wtTeaserElement
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
};
|
|
225
|
+
return TeaserDirective;
|
|
226
|
+
}());
|
|
227
|
+
TeaserDirective.decorators = [
|
|
228
|
+
{ type: core.Directive, args: [{
|
|
229
|
+
selector: '[wt-teaser]',
|
|
230
|
+
exportAs: 'wt-teaser'
|
|
231
|
+
},] }
|
|
232
|
+
];
|
|
233
|
+
TeaserDirective.ctorParameters = function () { return [
|
|
234
|
+
{ type: core.ElementRef },
|
|
235
|
+
{ type: WebtrekkSmartPixelAngular }
|
|
236
|
+
]; };
|
|
237
|
+
TeaserDirective.propDecorators = {
|
|
238
|
+
wtTeaserElement: [{ type: core.Input, args: ['wt-teaser',] }]
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
var ProductListDirective = /** @class */ (function () {
|
|
242
|
+
function ProductListDirective(elementRef, pixel) {
|
|
243
|
+
this.elementRef = elementRef;
|
|
244
|
+
this.pixel = pixel;
|
|
245
|
+
}
|
|
246
|
+
ProductListDirective.prototype.ngAfterContentInit = function () {
|
|
247
|
+
var _this = this;
|
|
248
|
+
this.pixel.call(function (pix) {
|
|
249
|
+
pix.extension.product_list_tracking.add({
|
|
250
|
+
selector: _this.wtProductListElement && _this.wtProductListElement.selector ? _this.wtProductListElement.selector : _this.elementRef.nativeElement,
|
|
251
|
+
data: _this.wtProductListElement
|
|
252
|
+
});
|
|
253
|
+
});
|
|
254
|
+
};
|
|
255
|
+
return ProductListDirective;
|
|
256
|
+
}());
|
|
257
|
+
ProductListDirective.decorators = [
|
|
258
|
+
{ type: core.Directive, args: [{
|
|
259
|
+
selector: '[wt-product-list]',
|
|
260
|
+
exportAs: 'wt-product-list'
|
|
261
|
+
},] }
|
|
262
|
+
];
|
|
263
|
+
ProductListDirective.ctorParameters = function () { return [
|
|
264
|
+
{ type: core.ElementRef },
|
|
265
|
+
{ type: WebtrekkSmartPixelAngular }
|
|
266
|
+
]; };
|
|
267
|
+
ProductListDirective.propDecorators = {
|
|
268
|
+
wtProductListElement: [{ type: core.Input, args: ['wt-product-list',] }]
|
|
269
|
+
};
|
|
270
|
+
|
|
271
|
+
var ContentEngagementDirective = /** @class */ (function () {
|
|
272
|
+
function ContentEngagementDirective(elementRef, pixel) {
|
|
273
|
+
this.elementRef = elementRef;
|
|
274
|
+
this.pixel = pixel;
|
|
275
|
+
}
|
|
276
|
+
ContentEngagementDirective.prototype.ngAfterContentInit = function () {
|
|
277
|
+
var _this = this;
|
|
278
|
+
this.pixel.call(function (pix) {
|
|
279
|
+
pix.extension.content_engagement.add({
|
|
280
|
+
selector: _this.wtContentEngagementElement && _this.wtContentEngagementElement.selector ? _this.wtContentEngagementElement.selector : _this.elementRef.nativeElement,
|
|
281
|
+
name: _this.wtContentEngagementElement && _this.wtContentEngagementElement.name ? _this.wtContentEngagementElement.name : '',
|
|
282
|
+
config: _this.wtContentEngagementElement
|
|
283
|
+
});
|
|
284
|
+
});
|
|
285
|
+
};
|
|
286
|
+
return ContentEngagementDirective;
|
|
287
|
+
}());
|
|
288
|
+
ContentEngagementDirective.decorators = [
|
|
289
|
+
{ type: core.Directive, args: [{
|
|
290
|
+
selector: '[wt-content-engagement]',
|
|
291
|
+
exportAs: 'wt-content-engagement'
|
|
292
|
+
},] }
|
|
293
|
+
];
|
|
294
|
+
ContentEngagementDirective.ctorParameters = function () { return [
|
|
295
|
+
{ type: core.ElementRef },
|
|
296
|
+
{ type: WebtrekkSmartPixelAngular }
|
|
297
|
+
]; };
|
|
298
|
+
ContentEngagementDirective.propDecorators = {
|
|
299
|
+
wtContentEngagementElement: [{ type: core.Input, args: ['wt-content-engagement',] }]
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
var ExtensionDirective = /** @class */ (function () {
|
|
303
|
+
function ExtensionDirective(pixel) {
|
|
304
|
+
this.pixel = pixel;
|
|
305
|
+
}
|
|
306
|
+
ExtensionDirective.prototype.ngAfterContentInit = function () {
|
|
307
|
+
if (this.wtExtensionData) {
|
|
308
|
+
this.pixel.extension(this.wtExtensionData.name, this.wtExtensionData.action, this.wtExtensionData.config);
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
return ExtensionDirective;
|
|
312
|
+
}());
|
|
313
|
+
ExtensionDirective.decorators = [
|
|
314
|
+
{ type: core.Directive, args: [{
|
|
315
|
+
selector: '[wt-extension]',
|
|
316
|
+
exportAs: 'wt-extension'
|
|
317
|
+
},] }
|
|
318
|
+
];
|
|
319
|
+
ExtensionDirective.ctorParameters = function () { return [
|
|
320
|
+
{ type: WebtrekkSmartPixelAngular }
|
|
321
|
+
]; };
|
|
322
|
+
ExtensionDirective.propDecorators = {
|
|
323
|
+
wtExtensionData: [{ type: core.Input, args: ['wt-extension',] }]
|
|
324
|
+
};
|
|
348
325
|
|
|
349
326
|
var WEBTREKK_SMART_PIXEL_TOKEN = new core.InjectionToken('WEBTREKK-SMART-PIXEL-ANGULAR');
|
|
350
327
|
|
|
@@ -378,12 +355,16 @@
|
|
|
378
355
|
});
|
|
379
356
|
}
|
|
380
357
|
}
|
|
381
|
-
WebtrekkSmartPixelAutoTracking = __decorate([
|
|
382
|
-
core.NgModule(),
|
|
383
|
-
__param(2, core.Inject(WEBTREKK_SMART_PIXEL_TOKEN))
|
|
384
|
-
], WebtrekkSmartPixelAutoTracking);
|
|
385
358
|
return WebtrekkSmartPixelAutoTracking;
|
|
386
359
|
}());
|
|
360
|
+
WebtrekkSmartPixelAutoTracking.decorators = [
|
|
361
|
+
{ type: core.NgModule }
|
|
362
|
+
];
|
|
363
|
+
WebtrekkSmartPixelAutoTracking.ctorParameters = function () { return [
|
|
364
|
+
{ type: router.Router },
|
|
365
|
+
{ type: WebtrekkSmartPixelAngular },
|
|
366
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [WEBTREKK_SMART_PIXEL_TOKEN,] }] }
|
|
367
|
+
]; };
|
|
387
368
|
|
|
388
369
|
var DefaultConfig = /** @class */ (function () {
|
|
389
370
|
function DefaultConfig() {
|
|
@@ -402,15 +383,14 @@
|
|
|
402
383
|
var WebtrekkSmartPixelModule = /** @class */ (function () {
|
|
403
384
|
function WebtrekkSmartPixelModule() {
|
|
404
385
|
}
|
|
405
|
-
WebtrekkSmartPixelModule_1 = WebtrekkSmartPixelModule;
|
|
406
386
|
WebtrekkSmartPixelModule.forRoot = function (conf) {
|
|
407
387
|
if (conf === void 0) { conf = {}; }
|
|
408
388
|
return {
|
|
409
|
-
ngModule:
|
|
389
|
+
ngModule: WebtrekkSmartPixelModule,
|
|
410
390
|
providers: [
|
|
411
391
|
{
|
|
412
392
|
provide: WEBTREKK_SMART_PIXEL_TOKEN,
|
|
413
|
-
useValue:
|
|
393
|
+
useValue: Object.assign(Object.assign({}, defaultConfig), conf)
|
|
414
394
|
},
|
|
415
395
|
{
|
|
416
396
|
provide: WebtrekkSmartPixelAngular,
|
|
@@ -419,48 +399,61 @@
|
|
|
419
399
|
]
|
|
420
400
|
};
|
|
421
401
|
};
|
|
422
|
-
var WebtrekkSmartPixelModule_1;
|
|
423
|
-
WebtrekkSmartPixelModule = WebtrekkSmartPixelModule_1 = __decorate([
|
|
424
|
-
core.NgModule({
|
|
425
|
-
declarations: [
|
|
426
|
-
DataDirective,
|
|
427
|
-
ExtensionDirective,
|
|
428
|
-
TeaserDirective,
|
|
429
|
-
ProductListDirective,
|
|
430
|
-
ContentEngagementDirective
|
|
431
|
-
],
|
|
432
|
-
exports: [
|
|
433
|
-
DataDirective,
|
|
434
|
-
ExtensionDirective,
|
|
435
|
-
TeaserDirective,
|
|
436
|
-
ProductListDirective,
|
|
437
|
-
ContentEngagementDirective,
|
|
438
|
-
WebtrekkSmartPixelAutoTracking
|
|
439
|
-
],
|
|
440
|
-
imports: [
|
|
441
|
-
WebtrekkSmartPixelAutoTracking
|
|
442
|
-
],
|
|
443
|
-
providers: [],
|
|
444
|
-
bootstrap: []
|
|
445
|
-
})
|
|
446
|
-
], WebtrekkSmartPixelModule);
|
|
447
402
|
return WebtrekkSmartPixelModule;
|
|
448
403
|
}());
|
|
404
|
+
WebtrekkSmartPixelModule.decorators = [
|
|
405
|
+
{ type: core.NgModule, args: [{
|
|
406
|
+
declarations: [
|
|
407
|
+
DataDirective,
|
|
408
|
+
ExtensionDirective,
|
|
409
|
+
TeaserDirective,
|
|
410
|
+
ProductListDirective,
|
|
411
|
+
ContentEngagementDirective
|
|
412
|
+
],
|
|
413
|
+
exports: [
|
|
414
|
+
DataDirective,
|
|
415
|
+
ExtensionDirective,
|
|
416
|
+
TeaserDirective,
|
|
417
|
+
ProductListDirective,
|
|
418
|
+
ContentEngagementDirective,
|
|
419
|
+
WebtrekkSmartPixelAutoTracking
|
|
420
|
+
],
|
|
421
|
+
imports: [
|
|
422
|
+
WebtrekkSmartPixelAutoTracking
|
|
423
|
+
],
|
|
424
|
+
providers: [],
|
|
425
|
+
bootstrap: []
|
|
426
|
+
},] }
|
|
427
|
+
];
|
|
449
428
|
|
|
429
|
+
/*
|
|
430
|
+
* Public API Surface of smart-pixel-angular
|
|
431
|
+
*/
|
|
450
432
|
// compatibility for v0
|
|
451
433
|
var webtrekkSmartPixelAngular = new WebtrekkSmartPixelAngular();
|
|
452
|
-
var
|
|
434
|
+
var publicApi = {
|
|
453
435
|
WebtrekkSmartPixelModule: WebtrekkSmartPixelModule,
|
|
454
436
|
WebtrekkSmartPixelAngular: WebtrekkSmartPixelAngular,
|
|
455
437
|
// compatibility for v0
|
|
456
438
|
webtrekkSmartPixelAngular: webtrekkSmartPixelAngular
|
|
457
439
|
};
|
|
458
440
|
|
|
441
|
+
/**
|
|
442
|
+
* Generated bundle index. Do not edit.
|
|
443
|
+
*/
|
|
444
|
+
|
|
445
|
+
exports.ContentEngagementDirective = ContentEngagementDirective;
|
|
446
|
+
exports.DataDirective = DataDirective;
|
|
447
|
+
exports.ExtensionDirective = ExtensionDirective;
|
|
448
|
+
exports.ProductListDirective = ProductListDirective;
|
|
449
|
+
exports.TeaserDirective = TeaserDirective;
|
|
459
450
|
exports.WebtrekkSmartPixelAngular = WebtrekkSmartPixelAngular;
|
|
451
|
+
exports.WebtrekkSmartPixelAutoTracking = WebtrekkSmartPixelAutoTracking;
|
|
460
452
|
exports.WebtrekkSmartPixelModule = WebtrekkSmartPixelModule;
|
|
461
|
-
exports.default = index;
|
|
462
453
|
exports.webtrekkSmartPixelAngular = webtrekkSmartPixelAngular;
|
|
454
|
+
exports["ɵa"] = WEBTREKK_SMART_PIXEL_TOKEN;
|
|
463
455
|
|
|
464
456
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
465
457
|
|
|
466
|
-
}))
|
|
458
|
+
}));
|
|
459
|
+
//# sourceMappingURL=webtrekk-smart-pixel-angular.umd.js.map
|