@rxap/ngx-marker-io 21.0.1 → 22.0.0-dev.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/CHANGELOG.md +8 -0
- package/compodoc/changelog.html +7 -0
- package/compodoc/dependencies.html +5 -5
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +10 -10
- package/docs/html/classes/MarkerIoService.html +2 -2
- package/docs/html/functions/provideMarkerIo.html +1 -1
- package/docs/html/index.html +2 -2
- package/docs/html/modules.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/MarkerIoService.md +5 -5
- package/docs/markdown/functions/provideMarkerIo.md +2 -2
- package/docs/markdown/globals.md +2 -2
- package/docs/wiki/Class.MarkerIoService.md +4 -4
- package/docs/wiki/Function.provideMarkerIo.md +1 -1
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-ngx-marker-io.mjs +85 -72
- package/fesm2022/rxap-ngx-marker-io.mjs.map +1 -1
- package/package.json +12 -12
- package/types/rxap-ngx-marker-io.d.ts +16 -16
|
@@ -1,75 +1,88 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import {
|
|
3
|
-
import markerSDK from
|
|
4
|
-
import { ConfigService } from
|
|
5
|
-
import { RXAP_ENVIRONMENT } from
|
|
6
|
-
import { PubSubService, RXAP_TOPICS } from
|
|
7
|
-
import { DeleteProperties } from
|
|
8
|
-
import { tap } from
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable, inject, provideAppInitializer } from "@angular/core";
|
|
3
|
+
import markerSDK from "@marker.io/browser";
|
|
4
|
+
import { ConfigService } from "@rxap/config";
|
|
5
|
+
import { RXAP_ENVIRONMENT } from "@rxap/environment";
|
|
6
|
+
import { PubSubService, RXAP_TOPICS } from "@rxap/ngx-pub-sub";
|
|
7
|
+
import { DeleteProperties } from "@rxap/utilities";
|
|
8
|
+
import { tap } from "rxjs";
|
|
9
|
+
var MarkerIoService = class MarkerIoService {
|
|
10
|
+
environment = inject(RXAP_ENVIRONMENT);
|
|
11
|
+
config = inject(ConfigService);
|
|
12
|
+
pubSub = inject(PubSubService);
|
|
13
|
+
widget = null;
|
|
14
|
+
async load() {
|
|
15
|
+
const config = this.config.get("marker");
|
|
16
|
+
if (!config) {
|
|
17
|
+
console.warn("No marker.io configuration found");
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
if (typeof config !== "object") {
|
|
21
|
+
console.error("The marker.io configuration is not an object");
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
if (config.disabled) {
|
|
25
|
+
console.log("The marker.io widget is disabled");
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
if (!config.project) {
|
|
29
|
+
console.error("The marker.io configuration object does not contain a project key");
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
console.log("Load marker.io widget");
|
|
33
|
+
try {
|
|
34
|
+
this.widget = await markerSDK.loadWidget(config);
|
|
35
|
+
const customData = DeleteProperties(this.environment, [
|
|
36
|
+
"moduleFederation",
|
|
37
|
+
"sentry",
|
|
38
|
+
"config",
|
|
39
|
+
"openApi",
|
|
40
|
+
"slug"
|
|
41
|
+
]);
|
|
42
|
+
console.debug("Set custom marker.io data", customData);
|
|
43
|
+
this.widget.setCustomData(customData);
|
|
44
|
+
} catch (e) {
|
|
45
|
+
console.error("Failed to load marker.io widget:", e.message);
|
|
46
|
+
}
|
|
47
|
+
this.pubSub.subscribe(RXAP_TOPICS.authentication.logout).pipe(tap(() => this.clearReporter())).subscribe();
|
|
48
|
+
}
|
|
49
|
+
setReporter(reporter) {
|
|
50
|
+
this.widget?.setReporter(reporter);
|
|
51
|
+
}
|
|
52
|
+
clearReporter() {
|
|
53
|
+
this.widget?.clearReporter();
|
|
54
|
+
}
|
|
55
|
+
static ɵfac = i0.ɵɵngDeclareFactory({
|
|
56
|
+
minVersion: "12.0.0",
|
|
57
|
+
version: "22.3.0",
|
|
58
|
+
ngImport: i0,
|
|
59
|
+
type: MarkerIoService,
|
|
60
|
+
deps: [],
|
|
61
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
62
|
+
});
|
|
63
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "22.3.0",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: MarkerIoService,
|
|
68
|
+
providedIn: "root"
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
72
|
+
minVersion: "12.0.0",
|
|
73
|
+
version: "22.3.0",
|
|
74
|
+
ngImport: i0,
|
|
75
|
+
type: MarkerIoService,
|
|
76
|
+
decorators: [{
|
|
77
|
+
type: Injectable,
|
|
78
|
+
args: [{ providedIn: "root" }]
|
|
79
|
+
}]
|
|
80
|
+
});
|
|
58
81
|
function provideMarkerIo() {
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
return initializerFn();
|
|
63
|
-
})
|
|
64
|
-
];
|
|
82
|
+
return [provideAppInitializer(() => {
|
|
83
|
+
return ((service) => () => service.load())(inject(MarkerIoService))();
|
|
84
|
+
})];
|
|
65
85
|
}
|
|
66
|
-
|
|
67
|
-
// region
|
|
68
|
-
// endregion
|
|
69
|
-
|
|
70
|
-
/**
|
|
71
|
-
* Generated bundle index. Do not edit.
|
|
72
|
-
*/
|
|
73
|
-
|
|
74
86
|
export { MarkerIoService, provideMarkerIo };
|
|
75
|
-
|
|
87
|
+
|
|
88
|
+
//# sourceMappingURL=rxap-ngx-marker-io.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-ngx-marker-io.mjs","sources":["../../../../../packages/angular/marker-io/src/lib/marker-io.service.ts"
|
|
1
|
+
{"version":3,"file":"rxap-ngx-marker-io.mjs","names":[],"sources":["../../../../../packages/angular/marker-io/src/lib/marker-io.service.ts"],"sourcesContent":["import { inject, Injectable, Provider, provideAppInitializer } from '@angular/core';\nimport markerSDK, {\n MarkerReporter,\n MarkerSdk\n} from '@marker.io/browser';\nimport { ConfigService } from '@rxap/config';\nimport {\n Environment,\n RXAP_ENVIRONMENT\n} from '@rxap/environment';\nimport {\n PubSubService,\n RXAP_TOPICS\n} from '@rxap/ngx-pub-sub';\nimport { DeleteProperties } from '@rxap/utilities';\nimport { tap } from 'rxjs';\n\n\n@Injectable({ providedIn: 'root' })\nexport class MarkerIoService {\n\n private readonly environment = inject<Environment>(RXAP_ENVIRONMENT);\n\n private readonly config = inject(ConfigService);\n\n private readonly pubSub = inject(PubSubService);\n\n private widget: MarkerSdk | null = null;\n\n async load() {\n const config = this.config.get('marker');\n if (!config) {\n console.warn('No marker.io configuration found');\n return;\n }\n if (typeof config !== 'object') {\n console.error('The marker.io configuration is not an object');\n return;\n }\n if (config.disabled) {\n console.log('The marker.io widget is disabled');\n return;\n }\n if (!config.project) {\n console.error('The marker.io configuration object does not contain a project key');\n return;\n }\n console.log('Load marker.io widget');\n try {\n this.widget = await markerSDK.loadWidget(config);\n const customData = DeleteProperties(\n this.environment, [ 'moduleFederation', 'sentry', 'config', 'openApi', 'slug' ]);\n console.debug('Set custom marker.io data', customData);\n this.widget.setCustomData(customData);\n } catch (e: any) {\n console.error('Failed to load marker.io widget:', e.message);\n }\n this.pubSub.subscribe(RXAP_TOPICS.authentication.logout).pipe(\n tap(() => this.clearReporter())\n ).subscribe();\n }\n\n setReporter(reporter: MarkerReporter) {\n this.widget?.setReporter(reporter);\n }\n\n clearReporter() {\n this.widget?.clearReporter();\n }\n}\n\nexport function provideMarkerIo() {\n return [\n provideAppInitializer(() => {\n const initializerFn = ((service: MarkerIoService) => () => service.load())(inject(MarkerIoService));\n return initializerFn();\n })\n ];\n}\n"],"mappings":";;;;;;;;AAmBA,IAAa,kBAAb,MAAa,gBAAe;CAET,cAAc,OAAoB,gBAAgB;CAElD,SAAS,OAAO,aAAa;CAE7B,SAAS,OAAO,aAAa;CAEtC,SAA2B;CAEnC,MAAM,OAAI;EACR,MAAM,SAAS,KAAK,OAAO,IAAI,QAAQ;EACvC,IAAI,CAAC,QAAQ;GACX,QAAQ,KAAK,kCAAkC;GAC/C;EACF;EACA,IAAI,OAAO,WAAW,UAAU;GAC9B,QAAQ,MAAM,8CAA8C;GAC5D;EACF;EACA,IAAI,OAAO,UAAU;GACnB,QAAQ,IAAI,kCAAkC;GAC9C;EACF;EACA,IAAI,CAAC,OAAO,SAAS;GACnB,QAAQ,MAAM,mEAAmE;GACjF;EACF;EACA,QAAQ,IAAI,uBAAuB;EACnC,IAAI;GACF,KAAK,SAAS,MAAM,UAAU,WAAW,MAAM;GAC/C,MAAM,aAAa,iBACjB,KAAK,aAAa;IAAE;IAAoB;IAAU;IAAU;IAAW;GAAM,CAAE;GACjF,QAAQ,MAAM,6BAA6B,UAAU;GACrD,KAAK,OAAO,cAAc,UAAU;EACtC,SAAS,GAAQ;GACf,QAAQ,MAAM,oCAAoC,EAAE,OAAO;EAC7D;EACA,KAAK,OAAO,UAAU,YAAY,eAAe,MAAM,CAAC,CAAC,KACvD,UAAU,KAAK,cAAa,CAAE,CAAC,CAChC,CAAC,UAAS;CACb;CAEA,YAAY,UAAwB;EAClC,KAAK,QAAQ,YAAY,QAAQ;CACnC;CAEA,gBAAa;EACX,KAAK,QAAQ,cAAa;CAC5B;CAjDW,OAAA,OAAA,GAAA,mBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAe,MAAA,CAAA;EAAA,QAAA,GAAA,gBAAA;CAAA,CAAA;CAAf,OAAA,QAAA,GAAA,sBAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,MAAA;EAAe,YADF;CAAM,CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAe,YAAA,CAAA;EAD3B,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE;;;AAqDlC,SAAgB,kBAAe;CAC7B,OAAO,CACL,4BAA2B;EAEvB,SADwB,kBAAmC,QAAQ,KAAI,EAAA,CAAI,OAAO,eAAe,CAC1F,CAAA,CAAa;CACtB,CAAC,CACJ;AACH"}
|
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "22.0.0-dev.0",
|
|
3
3
|
"name": "@rxap/ngx-marker-io",
|
|
4
4
|
"description": "This package provides an Angular service to integrate with marker.io, a visual feedback and bug reporting tool. It allows you to easily load the marker.io widget, set custom data, and manage reporter information within your Angular application. The package also includes an init generator for setting up peer dependencies.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "
|
|
7
|
+
"@nx/devkit": "24.0.6",
|
|
8
8
|
"tslib": "2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/core": "^
|
|
11
|
+
"@angular/core": "^22.3.0",
|
|
12
12
|
"@marker.io/browser": "^0.20.2",
|
|
13
|
-
"@rxap/config": "^
|
|
14
|
-
"@rxap/environment": "^
|
|
15
|
-
"@rxap/ngx-pub-sub": "^
|
|
13
|
+
"@rxap/config": "^22.0.0-dev.0",
|
|
14
|
+
"@rxap/environment": "^22.0.0-dev.0",
|
|
15
|
+
"@rxap/ngx-pub-sub": "^22.0.0-dev.0",
|
|
16
16
|
"@rxap/utilities": "^16.5.2",
|
|
17
17
|
"rxjs": "^7.8.2"
|
|
18
18
|
},
|
|
@@ -37,27 +37,27 @@
|
|
|
37
37
|
"packageGroup": [
|
|
38
38
|
{
|
|
39
39
|
"package": "@angular/common",
|
|
40
|
-
"version": "
|
|
40
|
+
"version": "22.3.0"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"package": "@angular/compiler",
|
|
44
|
-
"version": "
|
|
44
|
+
"version": "22.3.0"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"package": "@angular/core",
|
|
48
|
-
"version": "
|
|
48
|
+
"version": "22.3.0"
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
"package": "@rxap/config",
|
|
52
|
-
"version": "
|
|
52
|
+
"version": "22.0.0-dev.0"
|
|
53
53
|
},
|
|
54
54
|
{
|
|
55
55
|
"package": "@rxap/environment",
|
|
56
|
-
"version": "
|
|
56
|
+
"version": "22.0.0-dev.0"
|
|
57
57
|
},
|
|
58
58
|
{
|
|
59
59
|
"package": "@rxap/ngx-pub-sub",
|
|
60
|
-
"version": "
|
|
60
|
+
"version": "22.0.0-dev.0"
|
|
61
61
|
},
|
|
62
62
|
{
|
|
63
63
|
"package": "@rxap/utilities",
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import { MarkerReporter } from "@marker.io/browser";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class MarkerIoService {
|
|
7
|
+
private readonly environment;
|
|
8
|
+
private readonly config;
|
|
9
|
+
private readonly pubSub;
|
|
10
|
+
private widget;
|
|
11
|
+
load(): Promise<void>;
|
|
12
|
+
setReporter(reporter: MarkerReporter): void;
|
|
13
|
+
clearReporter(): void;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MarkerIoService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
14
16
|
}
|
|
15
|
-
declare function provideMarkerIo():
|
|
16
|
-
|
|
17
|
-
export { MarkerIoService, provideMarkerIo };
|
|
17
|
+
export declare function provideMarkerIo(): import("@angular/core").EnvironmentProviders[];
|