@bloomscorp/ngx-bloomsight 1.5.1 → 1.6.0
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/README.md +143 -143
- package/esm2020/bloomscorp-ngx-bloomsight.mjs +4 -4
- package/esm2020/lib/ngx-bloomsight.component.mjs +22 -22
- package/esm2020/lib/ngx-bloomsight.module.mjs +33 -33
- package/esm2020/lib/ngx-bloomsight.service.mjs +14 -14
- package/esm2020/lib/service/bloomsight-event.service.mjs +45 -45
- package/esm2020/lib/service/bloomsight-mail.service.mjs +29 -25
- package/esm2020/lib/type/bloomsight-email-engine.mjs +2 -0
- package/esm2020/public-api.mjs +10 -9
- package/fesm2015/bloomscorp-ngx-bloomsight.mjs +120 -116
- package/fesm2015/bloomscorp-ngx-bloomsight.mjs.map +1 -1
- package/fesm2020/bloomscorp-ngx-bloomsight.mjs +116 -112
- package/fesm2020/bloomscorp-ngx-bloomsight.mjs.map +1 -1
- package/index.d.ts +5 -5
- package/lib/ngx-bloomsight.component.d.ts +8 -8
- package/lib/ngx-bloomsight.module.d.ts +10 -10
- package/lib/ngx-bloomsight.service.d.ts +6 -6
- package/lib/service/bloomsight-event.service.d.ts +17 -17
- package/lib/service/bloomsight-mail.service.d.ts +11 -10
- package/lib/type/bloomsight-email-engine.d.ts +11 -0
- package/package.json +2 -2
- package/public-api.d.ts +6 -5
|
@@ -4,130 +4,134 @@ import { init, pageViewObserver, resolveSimpleEvent, resolveDataEvent, sendEmail
|
|
|
4
4
|
import * as i1 from '@angular/router';
|
|
5
5
|
import { NavigationEnd } from '@angular/router';
|
|
6
6
|
|
|
7
|
-
class NgxBloomsightService {
|
|
8
|
-
constructor() { }
|
|
9
|
-
}
|
|
10
|
-
NgxBloomsightService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11
|
-
NgxBloomsightService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightService, providedIn: 'root' });
|
|
12
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightService, decorators: [{
|
|
13
|
-
type: Injectable,
|
|
14
|
-
args: [{
|
|
15
|
-
providedIn: 'root'
|
|
16
|
-
}]
|
|
7
|
+
class NgxBloomsightService {
|
|
8
|
+
constructor() { }
|
|
9
|
+
}
|
|
10
|
+
NgxBloomsightService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11
|
+
NgxBloomsightService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightService, providedIn: 'root' });
|
|
12
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightService, decorators: [{
|
|
13
|
+
type: Injectable,
|
|
14
|
+
args: [{
|
|
15
|
+
providedIn: 'root'
|
|
16
|
+
}]
|
|
17
17
|
}], ctorParameters: function () { return []; } });
|
|
18
18
|
|
|
19
|
-
class NgxBloomsightComponent {
|
|
20
|
-
constructor() { }
|
|
21
|
-
ngOnInit() {
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
NgxBloomsightComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
-
NgxBloomsightComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxBloomsightComponent, selector: "lib-ngx-bloomsight", ngImport: i0, template: `
|
|
26
|
-
<p>
|
|
27
|
-
ngx-bloomsight works!
|
|
28
|
-
</p>
|
|
29
|
-
`, isInline: true });
|
|
30
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightComponent, decorators: [{
|
|
31
|
-
type: Component,
|
|
32
|
-
args: [{ selector: 'lib-ngx-bloomsight', template: `
|
|
33
|
-
<p>
|
|
34
|
-
ngx-bloomsight works!
|
|
35
|
-
</p>
|
|
36
|
-
` }]
|
|
19
|
+
class NgxBloomsightComponent {
|
|
20
|
+
constructor() { }
|
|
21
|
+
ngOnInit() {
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
NgxBloomsightComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25
|
+
NgxBloomsightComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.3.0", type: NgxBloomsightComponent, selector: "lib-ngx-bloomsight", ngImport: i0, template: `
|
|
26
|
+
<p>
|
|
27
|
+
ngx-bloomsight works!
|
|
28
|
+
</p>
|
|
29
|
+
`, isInline: true });
|
|
30
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightComponent, decorators: [{
|
|
31
|
+
type: Component,
|
|
32
|
+
args: [{ selector: 'lib-ngx-bloomsight', template: `
|
|
33
|
+
<p>
|
|
34
|
+
ngx-bloomsight works!
|
|
35
|
+
</p>
|
|
36
|
+
` }]
|
|
37
37
|
}], ctorParameters: function () { return []; } });
|
|
38
38
|
|
|
39
|
-
class BloomsightEventService {
|
|
40
|
-
constructor(_config, _router) {
|
|
41
|
-
this._config = _config;
|
|
42
|
-
this._router = _router;
|
|
43
|
-
this._previousUrl = '';
|
|
44
|
-
this.init();
|
|
45
|
-
this.pageViewObserver();
|
|
46
|
-
}
|
|
47
|
-
init() {
|
|
48
|
-
init(this._config);
|
|
49
|
-
}
|
|
50
|
-
pageViewObserver() {
|
|
51
|
-
this._router.events.subscribe(event => {
|
|
52
|
-
if (event instanceof NavigationEnd) {
|
|
53
|
-
if (this._previousUrl !== event.url) {
|
|
54
|
-
pageViewObserver();
|
|
55
|
-
}
|
|
56
|
-
this._previousUrl = event.url;
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
resolveSimpleEvent(eventToken, label = '') {
|
|
61
|
-
resolveSimpleEvent(eventToken, label);
|
|
62
|
-
}
|
|
63
|
-
resolveDataEvent(eventToken, eventData, label = '') {
|
|
64
|
-
resolveDataEvent(eventToken, eventData, label);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
BloomsightEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightEventService, deps: [{ token: 'bloomsightConfig' }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
68
|
-
BloomsightEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightEventService });
|
|
69
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightEventService, decorators: [{
|
|
70
|
-
type: Injectable
|
|
71
|
-
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
72
|
-
type: Inject,
|
|
73
|
-
args: ['bloomsightConfig']
|
|
39
|
+
class BloomsightEventService {
|
|
40
|
+
constructor(_config, _router) {
|
|
41
|
+
this._config = _config;
|
|
42
|
+
this._router = _router;
|
|
43
|
+
this._previousUrl = '';
|
|
44
|
+
this.init();
|
|
45
|
+
this.pageViewObserver();
|
|
46
|
+
}
|
|
47
|
+
init() {
|
|
48
|
+
init(this._config);
|
|
49
|
+
}
|
|
50
|
+
pageViewObserver() {
|
|
51
|
+
this._router.events.subscribe(event => {
|
|
52
|
+
if (event instanceof NavigationEnd) {
|
|
53
|
+
if (this._previousUrl !== event.url) {
|
|
54
|
+
pageViewObserver();
|
|
55
|
+
}
|
|
56
|
+
this._previousUrl = event.url;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
resolveSimpleEvent(eventToken, label = '') {
|
|
61
|
+
resolveSimpleEvent(eventToken, label);
|
|
62
|
+
}
|
|
63
|
+
resolveDataEvent(eventToken, eventData, label = '') {
|
|
64
|
+
resolveDataEvent(eventToken, eventData, label);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
BloomsightEventService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightEventService, deps: [{ token: 'bloomsightConfig' }, { token: i1.Router }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
68
|
+
BloomsightEventService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightEventService });
|
|
69
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightEventService, decorators: [{
|
|
70
|
+
type: Injectable
|
|
71
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
72
|
+
type: Inject,
|
|
73
|
+
args: ['bloomsightConfig']
|
|
74
74
|
}] }, { type: i1.Router }]; } });
|
|
75
75
|
|
|
76
|
-
class BloomsightMailService {
|
|
77
|
-
constructor(_config) {
|
|
78
|
-
this._config = _config;
|
|
79
|
-
this.init();
|
|
80
|
-
}
|
|
81
|
-
init() {
|
|
82
|
-
init(this._config);
|
|
83
|
-
}
|
|
84
|
-
sendMail(engineId, templateId, templateOwnerId, emailMetaData, onSuccess, onError) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
76
|
+
class BloomsightMailService {
|
|
77
|
+
constructor(_config) {
|
|
78
|
+
this._config = _config;
|
|
79
|
+
this.init();
|
|
80
|
+
}
|
|
81
|
+
init() {
|
|
82
|
+
init(this._config);
|
|
83
|
+
}
|
|
84
|
+
sendMail(engineId, templateId, templateOwnerId, emailMetaData, onSuccess, onError, engineType = 'GMAIL') {
|
|
85
|
+
// TypeScript enums are nominal, so the literal union will not assign to
|
|
86
|
+
// EmailEngineTypeEnum directly. The SDK compares this value as a plain
|
|
87
|
+
// string at runtime, so the assertion is safe; the import above is
|
|
88
|
+
// type-only and emits nothing.
|
|
89
|
+
sendEmail(engineType, engineId, templateId, templateOwnerId, emailMetaData, onSuccess, onError);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
BloomsightMailService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightMailService, deps: [{ token: 'bloomsightConfig' }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
93
|
+
BloomsightMailService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightMailService });
|
|
94
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: BloomsightMailService, decorators: [{
|
|
95
|
+
type: Injectable
|
|
96
|
+
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
97
|
+
type: Inject,
|
|
98
|
+
args: ['bloomsightConfig']
|
|
95
99
|
}] }]; } });
|
|
96
100
|
|
|
97
|
-
class NgxBloomsightModule {
|
|
98
|
-
static forRoot(bloomsightConfig) {
|
|
99
|
-
return {
|
|
100
|
-
ngModule: NgxBloomsightModule,
|
|
101
|
-
providers: [
|
|
102
|
-
BloomsightEventService,
|
|
103
|
-
BloomsightMailService,
|
|
104
|
-
{ provide: 'bloomsightConfig', useValue: bloomsightConfig }
|
|
105
|
-
]
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
NgxBloomsightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
110
|
-
NgxBloomsightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule, declarations: [NgxBloomsightComponent], exports: [NgxBloomsightComponent] });
|
|
111
|
-
NgxBloomsightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule });
|
|
112
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule, decorators: [{
|
|
113
|
-
type: NgModule,
|
|
114
|
-
args: [{
|
|
115
|
-
declarations: [
|
|
116
|
-
NgxBloomsightComponent
|
|
117
|
-
],
|
|
118
|
-
imports: [],
|
|
119
|
-
exports: [
|
|
120
|
-
NgxBloomsightComponent
|
|
121
|
-
]
|
|
122
|
-
}]
|
|
101
|
+
class NgxBloomsightModule {
|
|
102
|
+
static forRoot(bloomsightConfig) {
|
|
103
|
+
return {
|
|
104
|
+
ngModule: NgxBloomsightModule,
|
|
105
|
+
providers: [
|
|
106
|
+
BloomsightEventService,
|
|
107
|
+
BloomsightMailService,
|
|
108
|
+
{ provide: 'bloomsightConfig', useValue: bloomsightConfig }
|
|
109
|
+
]
|
|
110
|
+
};
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
NgxBloomsightModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
114
|
+
NgxBloomsightModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule, declarations: [NgxBloomsightComponent], exports: [NgxBloomsightComponent] });
|
|
115
|
+
NgxBloomsightModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule });
|
|
116
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.3.0", ngImport: i0, type: NgxBloomsightModule, decorators: [{
|
|
117
|
+
type: NgModule,
|
|
118
|
+
args: [{
|
|
119
|
+
declarations: [
|
|
120
|
+
NgxBloomsightComponent
|
|
121
|
+
],
|
|
122
|
+
imports: [],
|
|
123
|
+
exports: [
|
|
124
|
+
NgxBloomsightComponent
|
|
125
|
+
]
|
|
126
|
+
}]
|
|
123
127
|
}] });
|
|
124
128
|
|
|
125
|
-
/*
|
|
126
|
-
* Public API Surface of ngx-bloomsight
|
|
129
|
+
/*
|
|
130
|
+
* Public API Surface of ngx-bloomsight
|
|
127
131
|
*/
|
|
128
132
|
|
|
129
|
-
/**
|
|
130
|
-
* Generated bundle index. Do not edit.
|
|
133
|
+
/**
|
|
134
|
+
* Generated bundle index. Do not edit.
|
|
131
135
|
*/
|
|
132
136
|
|
|
133
137
|
export { BloomsightEventService, BloomsightMailService, NgxBloomsightComponent, NgxBloomsightModule, NgxBloomsightService };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bloomscorp-ngx-bloomsight.mjs","sources":["../../../../projects/bloomscorp/ngx-bloomsight/src/lib/ngx-bloomsight.service.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/ngx-bloomsight.component.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/service/bloomsight-event.service.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/service/bloomsight-mail.service.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/ngx-bloomsight.module.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/public-api.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/bloomscorp-ngx-bloomsight.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\
|
|
1
|
+
{"version":3,"file":"bloomscorp-ngx-bloomsight.mjs","sources":["../../../../projects/bloomscorp/ngx-bloomsight/src/lib/ngx-bloomsight.service.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/ngx-bloomsight.component.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/service/bloomsight-event.service.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/service/bloomsight-mail.service.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/lib/ngx-bloomsight.module.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/public-api.ts","../../../../projects/bloomscorp/ngx-bloomsight/src/bloomscorp-ngx-bloomsight.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class NgxBloomsightService {\n\n constructor() { }\n}\n","import { Component, OnInit } from '@angular/core';\n\n@Component({\n selector: 'lib-ngx-bloomsight',\n template: `\n <p>\n ngx-bloomsight works!\n </p>\n `,\n styles: [\n ]\n})\nexport class NgxBloomsightComponent implements OnInit {\n\n constructor() { }\n\n ngOnInit(): void {\n }\n\n}\n","import {Inject, Injectable, OnDestroy, OnInit} from '@angular/core';\nimport {init} from '@bloomscorp/bloomsight.js';\nimport {pageViewObserver as pageView} from '@bloomscorp/bloomsight.js';\nimport {NavigationEnd, Router} from '@angular/router';\nimport {IConfig} from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';\nimport {resolveSimpleEvent as simpleEvent} from '@bloomscorp/bloomsight.js';\nimport {resolveDataEvent as dataEvent} from '@bloomscorp/bloomsight.js';\nimport {sendEmail as mail} from '@bloomscorp/bloomsight.js';\nimport {filter, take} from 'rxjs/operators';\nimport {Subscription} from 'rxjs';\n\n@Injectable()\nexport class BloomsightEventService {\n\n private _previousUrl: string = '';\n\n init() {\n init(this._config);\n }\n\n constructor(\n @Inject('bloomsightConfig') private _config: IConfig,\n private _router: Router\n ) {\n this.init();\n this.pageViewObserver();\n }\n\n public pageViewObserver(): void {\n \n this._router.events.subscribe(event => {\n if (event instanceof NavigationEnd) {\n \n if (this._previousUrl !== event.url) {\n pageView();\n }\n\n this._previousUrl = event.url;\n }\n });\n }\n\n\n public resolveSimpleEvent(eventToken: string, label: string = ''): void {\n simpleEvent(eventToken, label);\n }\n\n public resolveDataEvent(\n eventToken: string, \n eventData: {[key: string]: any},\n label: string = ''\n ): void {\n dataEvent(eventToken, eventData, label);\n }\n}\n","import {Inject, Injectable} from '@angular/core';\nimport {init} from '@bloomscorp/bloomsight.js';\nimport {IConfig} from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';\nimport {sendEmail as mail} from '@bloomscorp/bloomsight.js';\nimport {BloomsightEmailEngine} from '../type/bloomsight-email-engine';\nimport type {EmailEngineTypeEnum} from '@bloomscorp/bloomsight.js/dist/email/enums/emailEngineTypeEnum';\n\n@Injectable()\nexport class BloomsightMailService {\n\n init() {\n init(this._config);\n }\n\n constructor(\n @Inject('bloomsightConfig') private _config: IConfig,\n ) {\n this.init();\n }\n\n public sendMail(\n engineId: string,\n templateId: string,\n templateOwnerId: string,\n emailMetaData: FormData,\n onSuccess: () => void,\n onError: () => void,\n engineType: BloomsightEmailEngine = 'GMAIL'\n ): void {\n // TypeScript enums are nominal, so the literal union will not assign to\n // EmailEngineTypeEnum directly. The SDK compares this value as a plain\n // string at runtime, so the assertion is safe; the import above is\n // type-only and emits nothing.\n mail(\n engineType as unknown as EmailEngineTypeEnum,\n engineId, templateId, templateOwnerId, emailMetaData, onSuccess, onError\n );\n }\n\n}","import {ModuleWithProviders, NgModule} from '@angular/core';\nimport {NgxBloomsightComponent} from './ngx-bloomsight.component';\nimport {BloomsightEventService} from './service/bloomsight-event.service';\nimport {IConfig} from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';\nimport {BloomsightMailService} from './service/bloomsight-mail.service';\n\n\n\n@NgModule({\n declarations: [\n NgxBloomsightComponent\n ],\n imports: [\n ],\n exports: [\n NgxBloomsightComponent\n ]\n})\nexport class NgxBloomsightModule {\n \n static forRoot(bloomsightConfig: IConfig): ModuleWithProviders<NgxBloomsightModule> {\n\n return {\n ngModule: NgxBloomsightModule,\n providers: [\n BloomsightEventService, \n BloomsightMailService, \n {provide: 'bloomsightConfig', useValue: bloomsightConfig}\n ]\n };\n }\n}\n","/*\n * Public API Surface of ngx-bloomsight\n */\n\nexport * from './lib/ngx-bloomsight.service';\nexport * from './lib/ngx-bloomsight.component';\nexport * from './lib/ngx-bloomsight.module';\nexport * from './lib/service/bloomsight-event.service';\nexport * from './lib/service/bloomsight-mail.service';\nexport * from './lib/type/bloomsight-email-engine';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["pageView","simpleEvent","dataEvent","mail"],"mappings":";;;;;;MAKa,oBAAoB,CAAA;AAE/B,IAAA,WAAA,GAAA,GAAiB;;iHAFN,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAApB,oBAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,cAFnB,MAAM,EAAA,CAAA,CAAA;2FAEP,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAHhC,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;MCQY,sBAAsB,CAAA;AAEjC,IAAA,WAAA,GAAA,GAAiB;IAEjB,QAAQ,GAAA;KACP;;mHALU,sBAAsB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAtB,sBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,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,CAAA,CAAA;2FAArB,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBADjC,UAAU;;0BAQF,MAAM;2BAAC,kBAAkB,CAAA;;;MCGrB,mBAAmB,CAAA;IAE5B,OAAO,OAAO,CAAC,gBAAyB,EAAA;QAEpC,OAAO;AACH,YAAA,QAAQ,EAAE,mBAAmB;AAC7B,YAAA,SAAS,EAAE;gBACP,sBAAsB;gBACtB,qBAAqB;AACrB,gBAAA,EAAC,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,gBAAgB,EAAC;AAC5D,aAAA;SACJ,CAAC;KACL;;gHAZQ,mBAAmB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;iHAAnB,mBAAmB,EAAA,YAAA,EAAA,CARxB,sBAAsB,CAAA,EAAA,OAAA,EAAA,CAKtB,sBAAsB,CAAA,EAAA,CAAA,CAAA;iHAGjB,mBAAmB,EAAA,CAAA,CAAA;2FAAnB,mBAAmB,EAAA,UAAA,EAAA,CAAA;kBAV/B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACN,oBAAA,YAAY,EAAE;wBACV,sBAAsB;AACzB,qBAAA;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE;wBACL,sBAAsB;AACzB,qBAAA;AACJ,iBAAA,CAAA;;;ACjBD;;AAEG;;ACFH;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Generated bundle index. Do not edit.
|
|
3
|
-
*/
|
|
4
|
-
/// <amd-module name="@bloomscorp/ngx-bloomsight" />
|
|
5
|
-
export * from './public-api';
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
/// <amd-module name="@bloomscorp/ngx-bloomsight" />
|
|
5
|
+
export * from './public-api';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import * as i0 from "@angular/core";
|
|
3
|
-
export declare class NgxBloomsightComponent implements OnInit {
|
|
4
|
-
constructor();
|
|
5
|
-
ngOnInit(): void;
|
|
6
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxBloomsightComponent, never>;
|
|
7
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<NgxBloomsightComponent, "lib-ngx-bloomsight", never, {}, {}, never, never, false>;
|
|
8
|
-
}
|
|
1
|
+
import { OnInit } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class NgxBloomsightComponent implements OnInit {
|
|
4
|
+
constructor();
|
|
5
|
+
ngOnInit(): void;
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxBloomsightComponent, never>;
|
|
7
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<NgxBloomsightComponent, "lib-ngx-bloomsight", never, {}, {}, never, never, false>;
|
|
8
|
+
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
-
import { IConfig } from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
import * as i1 from "./ngx-bloomsight.component";
|
|
5
|
-
export declare class NgxBloomsightModule {
|
|
6
|
-
static forRoot(bloomsightConfig: IConfig): ModuleWithProviders<NgxBloomsightModule>;
|
|
7
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxBloomsightModule, never>;
|
|
8
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxBloomsightModule, [typeof i1.NgxBloomsightComponent], never, [typeof i1.NgxBloomsightComponent]>;
|
|
9
|
-
static ɵinj: i0.ɵɵInjectorDeclaration<NgxBloomsightModule>;
|
|
10
|
-
}
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { IConfig } from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "./ngx-bloomsight.component";
|
|
5
|
+
export declare class NgxBloomsightModule {
|
|
6
|
+
static forRoot(bloomsightConfig: IConfig): ModuleWithProviders<NgxBloomsightModule>;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxBloomsightModule, never>;
|
|
8
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxBloomsightModule, [typeof i1.NgxBloomsightComponent], never, [typeof i1.NgxBloomsightComponent]>;
|
|
9
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<NgxBloomsightModule>;
|
|
10
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
export declare class NgxBloomsightService {
|
|
3
|
-
constructor();
|
|
4
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<NgxBloomsightService, never>;
|
|
5
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<NgxBloomsightService>;
|
|
6
|
-
}
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
export declare class NgxBloomsightService {
|
|
3
|
+
constructor();
|
|
4
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxBloomsightService, never>;
|
|
5
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NgxBloomsightService>;
|
|
6
|
+
}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Router } from '@angular/router';
|
|
2
|
-
import { IConfig } from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';
|
|
3
|
-
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class BloomsightEventService {
|
|
5
|
-
private _config;
|
|
6
|
-
private _router;
|
|
7
|
-
private _previousUrl;
|
|
8
|
-
init(): void;
|
|
9
|
-
constructor(_config: IConfig, _router: Router);
|
|
10
|
-
pageViewObserver(): void;
|
|
11
|
-
resolveSimpleEvent(eventToken: string, label?: string): void;
|
|
12
|
-
resolveDataEvent(eventToken: string, eventData: {
|
|
13
|
-
[key: string]: any;
|
|
14
|
-
}, label?: string): void;
|
|
15
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BloomsightEventService, never>;
|
|
16
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<BloomsightEventService>;
|
|
17
|
-
}
|
|
1
|
+
import { Router } from '@angular/router';
|
|
2
|
+
import { IConfig } from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class BloomsightEventService {
|
|
5
|
+
private _config;
|
|
6
|
+
private _router;
|
|
7
|
+
private _previousUrl;
|
|
8
|
+
init(): void;
|
|
9
|
+
constructor(_config: IConfig, _router: Router);
|
|
10
|
+
pageViewObserver(): void;
|
|
11
|
+
resolveSimpleEvent(eventToken: string, label?: string): void;
|
|
12
|
+
resolveDataEvent(eventToken: string, eventData: {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}, label?: string): void;
|
|
15
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BloomsightEventService, never>;
|
|
16
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BloomsightEventService>;
|
|
17
|
+
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { IConfig } from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
static
|
|
10
|
-
|
|
1
|
+
import { IConfig } from '@bloomscorp/bloomsight.js/dist/configuration/interface/config';
|
|
2
|
+
import { BloomsightEmailEngine } from '../type/bloomsight-email-engine';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class BloomsightMailService {
|
|
5
|
+
private _config;
|
|
6
|
+
init(): void;
|
|
7
|
+
constructor(_config: IConfig);
|
|
8
|
+
sendMail(engineId: string, templateId: string, templateOwnerId: string, emailMetaData: FormData, onSuccess: () => void, onError: () => void, engineType?: BloomsightEmailEngine): void;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BloomsightMailService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BloomsightMailService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mail delivery engine, selecting the backend endpoint that handles the send.
|
|
3
|
+
*
|
|
4
|
+
* Declared here rather than re-exported from `@bloomscorp/bloomsight.js`
|
|
5
|
+
* deliberately: that package's `EmailEngineTypeEnum` is a type-only
|
|
6
|
+
* declaration with no JavaScript emitted for it, so importing it as a value
|
|
7
|
+
* yields `undefined` at runtime and silently routes mail to SMTP. The SDK
|
|
8
|
+
* compares this value as a plain string, so a union of string literals is
|
|
9
|
+
* both safer and exactly equivalent.
|
|
10
|
+
*/
|
|
11
|
+
export declare type BloomsightEmailEngine = 'GMAIL' | 'CUSTOM_SMTP';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bloomscorp/ngx-bloomsight",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^14.2.0",
|
|
6
6
|
"@angular/core": "^14.2.0",
|
|
7
|
-
"@bloomscorp/bloomsight.js": "
|
|
7
|
+
"@bloomscorp/bloomsight.js": ">=0.7.0 <1.0.0"
|
|
8
8
|
},
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.3.0"
|
package/public-api.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export * from './lib/ngx-bloomsight.service';
|
|
2
|
-
export * from './lib/ngx-bloomsight.component';
|
|
3
|
-
export * from './lib/ngx-bloomsight.module';
|
|
4
|
-
export * from './lib/service/bloomsight-event.service';
|
|
5
|
-
export * from './lib/service/bloomsight-mail.service';
|
|
1
|
+
export * from './lib/ngx-bloomsight.service';
|
|
2
|
+
export * from './lib/ngx-bloomsight.component';
|
|
3
|
+
export * from './lib/ngx-bloomsight.module';
|
|
4
|
+
export * from './lib/service/bloomsight-event.service';
|
|
5
|
+
export * from './lib/service/bloomsight-mail.service';
|
|
6
|
+
export * from './lib/type/bloomsight-email-engine';
|