@webtrekk-smart-pixel/angular 1.1.1 → 1.1.2

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.
Files changed (51) hide show
  1. package/{dist/smart-pixel-angular.umd.js → bundles/webtrekk-smart-pixel-angular.umd.js} +252 -260
  2. package/bundles/webtrekk-smart-pixel-angular.umd.js.map +1 -0
  3. package/esm2015/lib/Directives/ContentEngagementDirective.js +31 -0
  4. package/esm2015/lib/Directives/ContentEngagementDirective.ngsummary.json +1 -0
  5. package/esm2015/lib/Directives/DataDirective.js +66 -0
  6. package/esm2015/lib/Directives/DataDirective.ngsummary.json +1 -0
  7. package/esm2015/lib/Directives/DataTypes.js +2 -0
  8. package/esm2015/lib/Directives/DataTypes.ngsummary.json +1 -0
  9. package/esm2015/lib/Directives/ExtensionDirective.js +25 -0
  10. package/esm2015/lib/Directives/ExtensionDirective.ngsummary.json +1 -0
  11. package/esm2015/lib/Directives/ProductListDirective.js +30 -0
  12. package/esm2015/lib/Directives/ProductListDirective.ngsummary.json +1 -0
  13. package/esm2015/lib/Directives/TeaserDirective.js +31 -0
  14. package/esm2015/lib/Directives/TeaserDirective.ngsummary.json +1 -0
  15. package/esm2015/lib/WebtrekkSmartPixelAngular.js +132 -0
  16. package/esm2015/lib/WebtrekkSmartPixelAngular.ngsummary.json +1 -0
  17. package/esm2015/lib/WebtrekkSmartPixelAutoTracking.js +44 -0
  18. package/esm2015/lib/WebtrekkSmartPixelAutoTracking.ngfactory.js +14 -0
  19. package/esm2015/lib/WebtrekkSmartPixelAutoTracking.ngsummary.json +1 -0
  20. package/esm2015/lib/WebtrekkSmartPixelConfig.js +12 -0
  21. package/esm2015/lib/WebtrekkSmartPixelConfig.ngsummary.json +1 -0
  22. package/esm2015/lib/WebtrekkSmartPixelModule.js +54 -0
  23. package/esm2015/lib/WebtrekkSmartPixelModule.ngfactory.js +15 -0
  24. package/esm2015/lib/WebtrekkSmartPixelModule.ngsummary.json +1 -0
  25. package/esm2015/lib/WebtrekkSmartPixelToken.js +3 -0
  26. package/esm2015/lib/WebtrekkSmartPixelToken.ngsummary.json +1 -0
  27. package/esm2015/public-api.js +22 -0
  28. package/esm2015/public-api.ngsummary.json +1 -0
  29. package/esm2015/webtrekk-smart-pixel-angular.js +6 -0
  30. package/esm2015/webtrekk-smart-pixel-angular.ngsummary.json +1 -0
  31. package/fesm2015/webtrekk-smart-pixel-angular.js +421 -0
  32. package/fesm2015/webtrekk-smart-pixel-angular.js.map +1 -0
  33. package/lib/Directives/ContentEngagementDirective.d.ts +10 -0
  34. package/lib/Directives/DataDirective.d.ts +17 -0
  35. package/lib/Directives/DataTypes.d.ts +174 -0
  36. package/lib/Directives/ExtensionDirective.d.ts +9 -0
  37. package/lib/Directives/ProductListDirective.d.ts +10 -0
  38. package/lib/Directives/TeaserDirective.d.ts +10 -0
  39. package/lib/WebtrekkSmartPixelAngular.d.ts +19 -0
  40. package/lib/WebtrekkSmartPixelAutoTracking.d.ts +9 -0
  41. package/lib/WebtrekkSmartPixelAutoTracking.ngfactory.d.ts +3 -0
  42. package/lib/WebtrekkSmartPixelConfig.d.ts +22 -0
  43. package/lib/WebtrekkSmartPixelModule.d.ts +5 -0
  44. package/lib/WebtrekkSmartPixelModule.ngfactory.d.ts +3 -0
  45. package/lib/WebtrekkSmartPixelToken.d.ts +3 -0
  46. package/package.json +19 -6
  47. package/public-api.d.ts +17 -0
  48. package/webtrekk-smart-pixel-angular.d.ts +6 -0
  49. package/webtrekk-smart-pixel-angular.metadata.json +1 -0
  50. package/CHANGELOG.md +0 -45
  51. package/index.js +0 -4
@@ -1,249 +1,40 @@
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['@webtrekk-smart-pixel/angular'] = {}, global.ng.core, global.wtSmart, global.ng.router, global.Rx.operators));
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
- wtSmart = wtSmart && Object.prototype.hasOwnProperty.call(wtSmart, 'default') ? wtSmart['default'] : wtSmart;
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 directiveSelector = '[wt-advanced-data],'
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_ = wtSmart.use(window_, document_);
24
+ pixel_ = wtSmart__default["default"].use(window_, document_);
25
+ // @ts-ignore
236
26
  window_['wtSmart'] = pixel_;
237
27
  }
238
28
  };
29
+ var ɵ2 = init_;
239
30
  var WebtrekkSmartPixelAngular = /** @class */ (function () {
240
31
  function WebtrekkSmartPixelAngular() {
241
32
  }
242
33
  WebtrekkSmartPixelAngular.prototype.call = function (call) {
243
- if (pixel_ === null) {
34
+ if (!pixel_) {
244
35
  init_();
245
36
  }
246
- if (pixel_ !== null) {
37
+ if (pixel_) {
247
38
  pixel_.push(call);
248
39
  }
249
40
  };
@@ -300,12 +91,14 @@
300
91
  WebtrekkSmartPixelAngular.prototype.product = function (action, data) {
301
92
  this.call(function (pix) {
302
93
  var method = (action === 'view' || action === 'basket') ? 'set' : 'add';
94
+ // @ts-ignore
303
95
  pix.product[action].data[method]([data]);
304
96
  });
305
97
  };
306
98
  WebtrekkSmartPixelAngular.prototype.products = function (action, data) {
307
99
  this.call(function (pix) {
308
100
  var method = (action === 'view' || action === 'basket') ? 'set' : 'add';
101
+ // @ts-ignore
309
102
  pix.product[action].data[method](data);
310
103
  });
311
104
  };
@@ -322,6 +115,7 @@
322
115
  action = 'activate';
323
116
  }
324
117
  this.call(function (pix) {
118
+ // @ts-ignore
325
119
  pix.extension[extension][action](config);
326
120
  });
327
121
  };
@@ -340,11 +134,193 @@
340
134
  pix.trackAction(keepData);
341
135
  });
342
136
  };
343
- WebtrekkSmartPixelAngular = __decorate([
344
- core.Injectable()
345
- ], WebtrekkSmartPixelAngular);
346
137
  return WebtrekkSmartPixelAngular;
347
138
  }());
139
+ WebtrekkSmartPixelAngular.decorators = [
140
+ { type: core.Injectable }
141
+ ];
142
+
143
+ var directiveSelector = '[wt-advanced-data],'
144
+ + '[wt-campaign-data],'
145
+ + '[wt-customer-data],'
146
+ + '[wt-init-data],'
147
+ + '[wt-order-data],'
148
+ + '[wt-page-data],'
149
+ + '[wt-product-data],'
150
+ + '[wt-session-data]';
151
+ var DataDirective = /** @class */ (function () {
152
+ function DataDirective(pixel) {
153
+ this.pixel = pixel;
154
+ }
155
+ DataDirective.prototype.ngAfterContentInit = function () {
156
+ var _this = this;
157
+ if (this.wtAdvancedData) {
158
+ this.pixel.advanced(this.wtAdvancedData);
159
+ }
160
+ if (this.wtCampaignData) {
161
+ this.pixel.campaign(this.wtCampaignData);
162
+ }
163
+ if (this.wtCustomerData) {
164
+ this.pixel.customer(this.wtCustomerData && this.wtCustomerData.id ? this.wtCustomerData.id : this.wtCustomerData, this.wtCustomerData, this.wtCustomerData.validation);
165
+ }
166
+ if (this.wtInitData) {
167
+ this.pixel.init(this.wtInitData);
168
+ }
169
+ if (this.wtOrderData) {
170
+ this.pixel.order(this.wtOrderData);
171
+ }
172
+ if (this.wtPageData) {
173
+ this.pixel.page(this.wtPageData && this.wtPageData.name ? this.wtPageData.name : this.wtPageData, this.wtPageData);
174
+ }
175
+ if (this.wtProductData) {
176
+ this.pixel.product(this.wtProductData && this.wtProductData.action ? this.wtProductData.action : 'view', this.wtProductData);
177
+ }
178
+ if (this.wtSessionData) {
179
+ this.pixel.session(this.wtSessionData);
180
+ }
181
+ if (typeof this.wtTrack !== 'undefined') {
182
+ setTimeout(function () {
183
+ _this.pixel.track();
184
+ }, 0);
185
+ }
186
+ };
187
+ return DataDirective;
188
+ }());
189
+ DataDirective.decorators = [
190
+ { type: core.Directive, args: [{
191
+ selector: directiveSelector
192
+ },] }
193
+ ];
194
+ DataDirective.ctorParameters = function () { return [
195
+ { type: WebtrekkSmartPixelAngular }
196
+ ]; };
197
+ DataDirective.propDecorators = {
198
+ wtAdvancedData: [{ type: core.Input, args: ['wt-advanced-data',] }],
199
+ wtCampaignData: [{ type: core.Input, args: ['wt-campaign-data',] }],
200
+ wtCustomerData: [{ type: core.Input, args: ['wt-customer-data',] }],
201
+ wtInitData: [{ type: core.Input, args: ['wt-init-data',] }],
202
+ wtOrderData: [{ type: core.Input, args: ['wt-order-data',] }],
203
+ wtPageData: [{ type: core.Input, args: ['wt-page-data',] }],
204
+ wtProductData: [{ type: core.Input, args: ['wt-product-data',] }],
205
+ wtSessionData: [{ type: core.Input, args: ['wt-session-data',] }],
206
+ wtTrack: [{ type: core.Input, args: ['wt-track',] }]
207
+ };
208
+
209
+ var TeaserDirective = /** @class */ (function () {
210
+ function TeaserDirective(elementRef, pixel) {
211
+ this.elementRef = elementRef;
212
+ this.pixel = pixel;
213
+ }
214
+ TeaserDirective.prototype.ngAfterContentInit = function () {
215
+ var _this = this;
216
+ this.pixel.call(function (pix) {
217
+ pix.extension.teaser_tracking.add({
218
+ selector: _this.wtTeaserElement && _this.wtTeaserElement.selector ? _this.wtTeaserElement.selector : _this.elementRef.nativeElement,
219
+ data: _this.wtTeaserElement,
220
+ conversion: _this.wtTeaserElement
221
+ });
222
+ });
223
+ };
224
+ return TeaserDirective;
225
+ }());
226
+ TeaserDirective.decorators = [
227
+ { type: core.Directive, args: [{
228
+ selector: '[wt-teaser]',
229
+ exportAs: 'wt-teaser'
230
+ },] }
231
+ ];
232
+ TeaserDirective.ctorParameters = function () { return [
233
+ { type: core.ElementRef },
234
+ { type: WebtrekkSmartPixelAngular }
235
+ ]; };
236
+ TeaserDirective.propDecorators = {
237
+ wtTeaserElement: [{ type: core.Input, args: ['wt-teaser',] }]
238
+ };
239
+
240
+ var ProductListDirective = /** @class */ (function () {
241
+ function ProductListDirective(elementRef, pixel) {
242
+ this.elementRef = elementRef;
243
+ this.pixel = pixel;
244
+ }
245
+ ProductListDirective.prototype.ngAfterContentInit = function () {
246
+ var _this = this;
247
+ this.pixel.call(function (pix) {
248
+ pix.extension.product_list_tracking.add({
249
+ selector: _this.wtProductListElement && _this.wtProductListElement.selector ? _this.wtProductListElement.selector : _this.elementRef.nativeElement,
250
+ data: _this.wtProductListElement
251
+ });
252
+ });
253
+ };
254
+ return ProductListDirective;
255
+ }());
256
+ ProductListDirective.decorators = [
257
+ { type: core.Directive, args: [{
258
+ selector: '[wt-product-list]',
259
+ exportAs: 'wt-product-list'
260
+ },] }
261
+ ];
262
+ ProductListDirective.ctorParameters = function () { return [
263
+ { type: core.ElementRef },
264
+ { type: WebtrekkSmartPixelAngular }
265
+ ]; };
266
+ ProductListDirective.propDecorators = {
267
+ wtProductListElement: [{ type: core.Input, args: ['wt-product-list',] }]
268
+ };
269
+
270
+ var ContentEngagementDirective = /** @class */ (function () {
271
+ function ContentEngagementDirective(elementRef, pixel) {
272
+ this.elementRef = elementRef;
273
+ this.pixel = pixel;
274
+ }
275
+ ContentEngagementDirective.prototype.ngAfterContentInit = function () {
276
+ var _this = this;
277
+ this.pixel.call(function (pix) {
278
+ pix.extension.content_engagement.add({
279
+ selector: _this.wtContentEngagementElement && _this.wtContentEngagementElement.selector ? _this.wtContentEngagementElement.selector : _this.elementRef.nativeElement,
280
+ name: _this.wtContentEngagementElement && _this.wtContentEngagementElement.name ? _this.wtContentEngagementElement.name : '',
281
+ config: _this.wtContentEngagementElement
282
+ });
283
+ });
284
+ };
285
+ return ContentEngagementDirective;
286
+ }());
287
+ ContentEngagementDirective.decorators = [
288
+ { type: core.Directive, args: [{
289
+ selector: '[wt-content-engagement]',
290
+ exportAs: 'wt-content-engagement'
291
+ },] }
292
+ ];
293
+ ContentEngagementDirective.ctorParameters = function () { return [
294
+ { type: core.ElementRef },
295
+ { type: WebtrekkSmartPixelAngular }
296
+ ]; };
297
+ ContentEngagementDirective.propDecorators = {
298
+ wtContentEngagementElement: [{ type: core.Input, args: ['wt-content-engagement',] }]
299
+ };
300
+
301
+ var ExtensionDirective = /** @class */ (function () {
302
+ function ExtensionDirective(pixel) {
303
+ this.pixel = pixel;
304
+ }
305
+ ExtensionDirective.prototype.ngAfterContentInit = function () {
306
+ if (this.wtExtensionData) {
307
+ this.pixel.extension(this.wtExtensionData.name, this.wtExtensionData.action, this.wtExtensionData.config);
308
+ }
309
+ };
310
+ return ExtensionDirective;
311
+ }());
312
+ ExtensionDirective.decorators = [
313
+ { type: core.Directive, args: [{
314
+ selector: '[wt-extension]',
315
+ exportAs: 'wt-extension'
316
+ },] }
317
+ ];
318
+ ExtensionDirective.ctorParameters = function () { return [
319
+ { type: WebtrekkSmartPixelAngular }
320
+ ]; };
321
+ ExtensionDirective.propDecorators = {
322
+ wtExtensionData: [{ type: core.Input, args: ['wt-extension',] }]
323
+ };
348
324
 
349
325
  var WEBTREKK_SMART_PIXEL_TOKEN = new core.InjectionToken('WEBTREKK-SMART-PIXEL-ANGULAR');
350
326
 
@@ -378,12 +354,16 @@
378
354
  });
379
355
  }
380
356
  }
381
- WebtrekkSmartPixelAutoTracking = __decorate([
382
- core.NgModule(),
383
- __param(2, core.Inject(WEBTREKK_SMART_PIXEL_TOKEN))
384
- ], WebtrekkSmartPixelAutoTracking);
385
357
  return WebtrekkSmartPixelAutoTracking;
386
358
  }());
359
+ WebtrekkSmartPixelAutoTracking.decorators = [
360
+ { type: core.NgModule }
361
+ ];
362
+ WebtrekkSmartPixelAutoTracking.ctorParameters = function () { return [
363
+ { type: router.Router },
364
+ { type: WebtrekkSmartPixelAngular },
365
+ { type: undefined, decorators: [{ type: core.Inject, args: [WEBTREKK_SMART_PIXEL_TOKEN,] }] }
366
+ ]; };
387
367
 
388
368
  var DefaultConfig = /** @class */ (function () {
389
369
  function DefaultConfig() {
@@ -402,15 +382,14 @@
402
382
  var WebtrekkSmartPixelModule = /** @class */ (function () {
403
383
  function WebtrekkSmartPixelModule() {
404
384
  }
405
- WebtrekkSmartPixelModule_1 = WebtrekkSmartPixelModule;
406
385
  WebtrekkSmartPixelModule.forRoot = function (conf) {
407
386
  if (conf === void 0) { conf = {}; }
408
387
  return {
409
- ngModule: WebtrekkSmartPixelModule_1,
388
+ ngModule: WebtrekkSmartPixelModule,
410
389
  providers: [
411
390
  {
412
391
  provide: WEBTREKK_SMART_PIXEL_TOKEN,
413
- useValue: __assign({}, defaultConfig, conf)
392
+ useValue: Object.assign(Object.assign({}, defaultConfig), conf)
414
393
  },
415
394
  {
416
395
  provide: WebtrekkSmartPixelAngular,
@@ -419,48 +398,61 @@
419
398
  ]
420
399
  };
421
400
  };
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
401
  return WebtrekkSmartPixelModule;
448
402
  }());
403
+ WebtrekkSmartPixelModule.decorators = [
404
+ { type: core.NgModule, args: [{
405
+ declarations: [
406
+ DataDirective,
407
+ ExtensionDirective,
408
+ TeaserDirective,
409
+ ProductListDirective,
410
+ ContentEngagementDirective
411
+ ],
412
+ exports: [
413
+ DataDirective,
414
+ ExtensionDirective,
415
+ TeaserDirective,
416
+ ProductListDirective,
417
+ ContentEngagementDirective,
418
+ WebtrekkSmartPixelAutoTracking
419
+ ],
420
+ imports: [
421
+ WebtrekkSmartPixelAutoTracking
422
+ ],
423
+ providers: [],
424
+ bootstrap: []
425
+ },] }
426
+ ];
449
427
 
428
+ /*
429
+ * Public API Surface of smart-pixel-angular
430
+ */
450
431
  // compatibility for v0
451
432
  var webtrekkSmartPixelAngular = new WebtrekkSmartPixelAngular();
452
- var index = {
433
+ var publicApi = {
453
434
  WebtrekkSmartPixelModule: WebtrekkSmartPixelModule,
454
435
  WebtrekkSmartPixelAngular: WebtrekkSmartPixelAngular,
455
436
  // compatibility for v0
456
437
  webtrekkSmartPixelAngular: webtrekkSmartPixelAngular
457
438
  };
458
439
 
440
+ /**
441
+ * Generated bundle index. Do not edit.
442
+ */
443
+
444
+ exports.ContentEngagementDirective = ContentEngagementDirective;
445
+ exports.DataDirective = DataDirective;
446
+ exports.ExtensionDirective = ExtensionDirective;
447
+ exports.ProductListDirective = ProductListDirective;
448
+ exports.TeaserDirective = TeaserDirective;
459
449
  exports.WebtrekkSmartPixelAngular = WebtrekkSmartPixelAngular;
450
+ exports.WebtrekkSmartPixelAutoTracking = WebtrekkSmartPixelAutoTracking;
460
451
  exports.WebtrekkSmartPixelModule = WebtrekkSmartPixelModule;
461
- exports.default = index;
462
452
  exports.webtrekkSmartPixelAngular = webtrekkSmartPixelAngular;
453
+ exports["ɵa"] = WEBTREKK_SMART_PIXEL_TOKEN;
463
454
 
464
455
  Object.defineProperty(exports, '__esModule', { value: true });
465
456
 
466
- })));
457
+ }));
458
+ //# sourceMappingURL=webtrekk-smart-pixel-angular.umd.js.map