@anglr/common 18.0.0-beta.20230823132055 → 18.0.0-beta.20230823135645
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 +7 -6
- package/es2022/src/modules/logger/components/console/console.component.js +7 -9
- package/es2022/src/modules/logger/components/console/console.component.js.map +1 -1
- package/es2022/src/modules/logger/interfaces/loggerConsoleComponent.interface.js.map +1 -1
- package/es2022/src/modules/logger/misc/providers.js +4 -4
- package/es2022/src/modules/logger/misc/providers.js.map +1 -1
- package/es2022/src/modules/logger/misc/tokens.js +0 -5
- package/es2022/src/modules/logger/misc/tokens.js.map +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js +64 -0
- package/es2022/src/modules/logger/services/console/consoleComponent.service.js.map +1 -0
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js +3 -39
- package/es2022/src/modules/logger/services/console/consoleComponent.sink.js.map +1 -1
- package/es2022/src/modules/logger/services/console/{consoleComponentSink.options.js → consoleComponentService.options.js} +8 -8
- package/es2022/src/modules/logger/services/console/consoleComponentService.options.js.map +1 -0
- package/es2022/src/modules/logger/services/index.js +2 -1
- package/es2022/src/modules/logger/services/index.js.map +1 -1
- package/package.json +1 -1
- package/src/modules/logger/components/console/console.component.d.ts +4 -3
- package/src/modules/logger/components/console/console.component.d.ts.map +1 -1
- package/src/modules/logger/interfaces/loggerConsoleComponent.interface.d.ts +0 -18
- package/src/modules/logger/interfaces/loggerConsoleComponent.interface.d.ts.map +1 -1
- package/src/modules/logger/misc/providers.d.ts +3 -3
- package/src/modules/logger/misc/providers.d.ts.map +1 -1
- package/src/modules/logger/misc/tokens.d.ts +1 -5
- package/src/modules/logger/misc/tokens.d.ts.map +1 -1
- package/src/modules/logger/services/console/consoleComponent.service.d.ts +41 -0
- package/src/modules/logger/services/console/consoleComponent.service.d.ts.map +1 -0
- package/src/modules/logger/services/console/consoleComponent.sink.d.ts +4 -25
- package/src/modules/logger/services/console/consoleComponent.sink.d.ts.map +1 -1
- package/src/modules/logger/services/console/consoleComponentService.options.d.ts +14 -0
- package/src/modules/logger/services/console/consoleComponentService.options.d.ts.map +1 -0
- package/src/modules/logger/services/index.d.ts +2 -1
- package/src/modules/logger/services/index.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2022/src/modules/logger/services/console/consoleComponentSink.options.js.map +0 -1
- package/src/modules/logger/services/console/consoleComponentSink.options.d.ts +0 -14
- package/src/modules/logger/services/console/consoleComponentSink.options.d.ts.map +0 -1
package/changelog.md
CHANGED
|
@@ -43,6 +43,9 @@
|
|
|
43
43
|
- new `SubLoggerSink` service, that is sink that is used as sub logger
|
|
44
44
|
- **implements**
|
|
45
45
|
- `LoggerSink`
|
|
46
|
+
- new `ConsoleComponentSink` service, that is used for storing logs in `ConsoleComponent`
|
|
47
|
+
- **implements**
|
|
48
|
+
- `LoggerSink`
|
|
46
49
|
- new `LoggerOptions` class, that are options for logger that are used during logging
|
|
47
50
|
- **properties**
|
|
48
51
|
- `minimumLogLevel` minimal log level, that is used for logging, logs with lower log level are ignored
|
|
@@ -68,7 +71,7 @@
|
|
|
68
71
|
- **methods**
|
|
69
72
|
- `buildMessage` builds message that will be logged in logger sink
|
|
70
73
|
- new `provideLoggerRestClient` function, that provides logger rest client
|
|
71
|
-
- new `
|
|
74
|
+
- new `provideConsoleComponentServiceOptions` function, that provides `ConsoleComponentServiceOptions`
|
|
72
75
|
- new `provideRestSinkOptions` function, that provides `RestSinkOptions`
|
|
73
76
|
- updated `LOGGER` injection token, now provides `DefaultLogger` as default value
|
|
74
77
|
|
|
@@ -111,16 +114,14 @@
|
|
|
111
114
|
- moved `ConsoleComponent` to `@anglr/common` from `@anglr/common/structured-log`
|
|
112
115
|
- renamed to `ConsoleSAComponent`
|
|
113
116
|
- moved `ConsoleComponentLog` to `@anglr/common` from `@anglr/common/structured-log`
|
|
114
|
-
-
|
|
115
|
-
- renamed to `ConsoleComponentSinkData`
|
|
117
|
+
- renamed to `ConsoleComponentService` and updated to service class
|
|
116
118
|
- moved `RestLog` to `@anglr/common` from `@anglr/common/structured-log`
|
|
117
119
|
- moved `LoggerRestClient` to `@anglr/common` from `@anglr/common/structured-log`
|
|
118
|
-
- moved `CONSOLE_COMPONENT_SINK_SERVICE` to `@anglr/common` from `@anglr/common/structured-log`
|
|
119
120
|
- moved `LOGGER_REST_CLIENT` to `@anglr/common` from `@anglr/common/structured-log`
|
|
120
121
|
- moved `ConsoleComponentSinkService` to `@anglr/common` from `@anglr/common/structured-log`
|
|
121
|
-
- renamed to `
|
|
122
|
+
- renamed to `ConsoleComponentService`
|
|
122
123
|
- moved `ConsoleSinkConfigService` to `@anglr/common` from `@anglr/common/structured-log`
|
|
123
|
-
- renamed to `
|
|
124
|
+
- renamed to `ConsoleComponentServiceOptions`
|
|
124
125
|
- moved `RestSinkService` to `@anglr/common` from `@anglr/common/structured-log`
|
|
125
126
|
- renamed to `RestSink`
|
|
126
127
|
- moved `RestSinkOptions` to `@anglr/common` from `@anglr/common/structured-log`
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy,
|
|
1
|
+
import { Component, ChangeDetectionStrategy, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { CommonModule } from '@angular/common';
|
|
3
|
-
import {
|
|
3
|
+
import { ConsoleComponentService } from '../../services';
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
|
-
import * as i1 from "
|
|
5
|
+
import * as i1 from "../../services";
|
|
6
|
+
import * as i2 from "@angular/common";
|
|
6
7
|
/**
|
|
7
8
|
* Component used for displaying console logs
|
|
8
9
|
*/
|
|
@@ -90,8 +91,8 @@ class ConsoleSAComponent {
|
|
|
90
91
|
this.currentLogs = this.consoleSvc.logs.filter(log => log.text.toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0);
|
|
91
92
|
}
|
|
92
93
|
}
|
|
93
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleSAComponent, deps: [{ token:
|
|
94
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ConsoleSAComponent, isStandalone: true, selector: "console", ngImport: i0, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type:
|
|
94
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleSAComponent, deps: [{ token: i1.ConsoleComponentService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
95
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ConsoleSAComponent, isStandalone: true, selector: "console", ngImport: i0, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
95
96
|
}
|
|
96
97
|
export { ConsoleSAComponent };
|
|
97
98
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleSAComponent, decorators: [{
|
|
@@ -99,8 +100,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImpor
|
|
|
99
100
|
args: [{ selector: 'console', standalone: true, imports: [
|
|
100
101
|
CommonModule,
|
|
101
102
|
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>", styles: [":host\n{\n display: flex;\n flex-direction: column;\n position: absolute;\n width: 100%;\n height: 50%;\n}\n\n.console-data\n{\n background-color: #000000c7;\n border: none;\n border-bottom: 1px solid #AAA;\n border-radius: 0;\n color: #EEE;\n flex: 1;\n min-height: 0;\n min-width: 0;\n overflow-y: auto;\n overflow-x: hidden;\n cursor: pointer;\n}\n\n.console-filter\n{\n align-self: stretch;\n}\n\n.console-filter input\n{\n width: 100%;\n background-color: #000000c7;\n color: #FFF;\n border: none;\n border-bottom: 1px solid #AAA;\n padding: 0 4px;\n}\n\n.copy-icon,\n.clear-icon\n{\n position: absolute;\n top: 0;\n right: 0;\n padding: 4px 14px;\n}\n\n.copy-icon\n{\n margin-right: 20px;\n}\n\n.clear-icon div:hover,\n.copy-icon div:hover\n{\n color: #31A1FF;\n cursor: pointer;\n}\n\n.console-log\n{\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 12px;\n display: flex;\n flex-direction: row;\n}\n\n.console-log.error,\n.console-log.fatal\n{\n color: #FF3131;\n}\n\n.console-log.warning\n{\n color: #FFC531;\n}\n\n.console-log.debug,\n.console-log.verbose\n{\n color: #31A1FF;\n}\n\n.console-log-icon\n{\n color: #FFF;\n font-weight: bold;\n margin: 2px 4px 0;\n}\n\n.console-log-icon.fa-angle-down\n{\n margin: 3px 3px 0 2px;\n}\n\n.console-log-text\n{\n flex: 1;\n min-width: 0;\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.console-log-text.expanded\n{\n white-space: pre;\n text-overflow: initial;\n}"] }]
|
|
102
|
-
}], ctorParameters: function () { return [{ type:
|
|
103
|
-
type: Inject,
|
|
104
|
-
args: [CONSOLE_COMPONENT_SINK_SERVICE]
|
|
105
|
-
}] }, { type: i0.ChangeDetectorRef }]; } });
|
|
103
|
+
}], ctorParameters: function () { return [{ type: i1.ConsoleComponentService }, { type: i0.ChangeDetectorRef }]; } });
|
|
106
104
|
//# sourceMappingURL=console.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.component.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/components/console/console.component.ts","../../../../../../src/modules/logger/components/console/console.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,
|
|
1
|
+
{"version":3,"file":"console.component.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/components/console/console.component.ts","../../../../../../src/modules/logger/components/console/console.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAqB,iBAAiB,EAAC,MAAM,eAAe,CAAC;AACvG,OAAO,EAAC,YAAY,EAAC,MAAM,iBAAiB,CAAC;AAI7C,OAAO,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAC;;;;AAEvD;;GAEG;AACH,MAYa,kBAAkB;IA2BL;IACA;IA1BtB,sEAAsE;IAEtE;;OAEG;IACO,sBAAsB,CAA8B;IAE9D,8FAA8F;IAE9F;;OAEG;IACO,WAAW,GAA0B,EAAE,CAAC;IAElD;;OAEG;IACO,OAAO,GAAG,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC;IAErD;;OAEG;IACO,WAAW,GAAW,EAAE,CAAC;IAEnC,iEAAiE;IACjE,YAAsB,UAAmC,EACnC,cAAiC;QADjC,eAAU,GAAV,UAAU,CAAyB;QACnC,mBAAc,GAAd,cAAc,CAAmB;IAEvD,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;YAEpE,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;QACxC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAG,IAAI,CAAC,sBAAsB,EAC9B;YACI,IAAI,CAAC,sBAAsB,CAAC,WAAW,EAAE,CAAC;YAC1C,IAAI,CAAC,sBAAsB,GAAG,IAAI,CAAC;SACtC;IACL,CAAC;IAED,2FAA2F;IAE3F;;OAEG;IACO,IAAI;QAEV,IAAG,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,EACrC;YACI,OAAO;SACV;QAED,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;IACpF,CAAC;IAED;;;OAGG;IACO,WAAW,CAAC,OAAe;QAEjC,IAAG,CAAC,SAAS,IAAI,CAAC,SAAS,CAAC,SAAS,EACrC;YACI,OAAO;SACV;QAED,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IAC3C,CAAC;IAED;;OAEG;IACO,KAAK;QAEX,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED;;OAEG;IACO,WAAW;QAEjB,IAAG,CAAC,IAAI,CAAC,WAAW,EACpB;YACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;SAC3C;aAED;YACI,IAAI,CAAC,WAAW,GAAG,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;SAC9H;IACL,CAAC;uGAhHQ,kBAAkB;2FAAlB,kBAAkB,mECtB/B,i5BAiBM,8oDDCE,YAAY;;SAIP,kBAAkB;2FAAlB,kBAAkB;kBAZ9B,SAAS;+BAEI,SAAS,cAGP,IAAI,WAEhB;wBACI,YAAY;qBACf,mBACgB,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, OnInit, OnDestroy, ChangeDetectorRef} from '@angular/core';\nimport {CommonModule} from '@angular/common';\nimport {Subscription} from 'rxjs';\n\nimport {ConsoleComponentLog} from '../../interfaces';\nimport {ConsoleComponentService} from '../../services';\n\n/**\n * Component used for displaying console logs\n */\n@Component(\n{\n selector: 'console',\n templateUrl: 'console.component.html',\n styleUrls: ['console.component.css'],\n standalone: true,\n imports:\n [\n CommonModule,\n ],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ConsoleSAComponent implements OnInit, OnDestroy\n{\n //######################### protected fields #########################\n\n /**\n * Subscription for log changes\n */\n protected logsChangeSubscription: Subscription|undefined|null;\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Current state of logger\n */\n protected currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Indication whether can use copy to clipboard\n */\n protected canCopy = navigator && navigator.clipboard;\n\n /**\n * Current value of filter\n */\n protected filterValue: string = '';\n\n //######################### constructor #########################\n constructor(protected consoleSvc: ConsoleComponentService,\n protected changeDetector: ChangeDetectorRef)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n \n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.setMessages();\n \n this.logsChangeSubscription = this.consoleSvc.logsChange.subscribe(() =>\n {\n this.setMessages();\n this.changeDetector.detectChanges();\n });\n }\n\n //######################### public methods - implementation of OnDestroy #########################\n \n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n if(this.logsChangeSubscription)\n {\n this.logsChangeSubscription.unsubscribe();\n this.logsChangeSubscription = null;\n }\n }\n\n //######################### protected methods - template bindings #########################\n\n /**\n * Copies content of whole console log into clipboard\n */\n protected copy(): void\n {\n if(!navigator || !navigator.clipboard)\n {\n return;\n }\n\n navigator.clipboard.writeText(this.currentLogs.map(log => log.text).join('\\n'));\n }\n\n /**\n * Copies message to clipboard\n * @param message - Message to be copied\n */\n protected copyMessage(message: string): void\n {\n if(!navigator || !navigator.clipboard)\n {\n return;\n }\n\n navigator.clipboard.writeText(message);\n }\n\n /**\n * Clears existing logs\n */\n protected clear(): void\n {\n this.consoleSvc.clear();\n }\n\n /**\n * Sets messages using filter\n */\n protected setMessages(): void\n {\n if(!this.filterValue)\n {\n this.currentLogs = this.consoleSvc.logs;\n }\n else\n {\n this.currentLogs = this.consoleSvc.logs.filter(log => log.text.toLowerCase().indexOf(this.filterValue.toLowerCase()) >= 0);\n }\n }\n}","<div class=\"console-data thin-scrollbar\">\n <div class=\"console-log\" [ngClass]=\"log?.logLevel\" *ngFor=\"let log of currentLogs\">\n <div class=\"console-log-icon fa\" [class.fa-angle-right]=\"!log?.expanded\" [class.fa-angle-down]=\"log?.expanded\" (click)=\"log.expanded = !log.expanded\"></div>\n <div class=\"console-log-text\" [class.expanded]=\"log?.expanded\" (click)=\"copyMessage(log.text)\">{{log?.text}}</div>\n </div>\n\n <div class=\"clear-icon\" (click)=\"clear()\" title=\"clear log\">\n <div class=\"fa fa-times\"></div>\n </div>\n\n <div class=\"copy-icon\" (click)=\"copy()\" title=\"copy to clipboard\" *ngIf=\"canCopy\">\n <div class=\"fa fa-copy\"></div>\n </div>\n</div>\n\n<div class=\"console-filter\">\n <input type=\"text\" placeholder=\"Filter messages\" (input)=\"filterValue = $any($event.target).value; setMessages()\">\n</div>"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggerConsoleComponent.interface.js","sourceRoot":"","sources":["../../../../../src/modules/logger/interfaces/loggerConsoleComponent.interface.ts"],"names":[],"mappings":"","sourcesContent":["
|
|
1
|
+
{"version":3,"file":"loggerConsoleComponent.interface.js","sourceRoot":"","sources":["../../../../../src/modules/logger/interfaces/loggerConsoleComponent.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Definition of logs available for `ConsoleComponent`\n */\nexport interface ConsoleComponentLog\n{\n /**\n * Text of log to be displayed\n */\n text: string;\n\n /**\n * Log level of log\n */\n logLevel: string;\n\n /**\n * Indication whether detail of line is expanded or not\n */\n expanded?: boolean;\n}\n"]}
|
|
@@ -2,7 +2,7 @@ import { makeEnvironmentProviders } from '@angular/core';
|
|
|
2
2
|
import { LoggerConfigurationImpl } from '../types/loggerConfiguration';
|
|
3
3
|
import { LoggerOptions } from '../types';
|
|
4
4
|
import { LOGGER_REST_CLIENT } from './tokens';
|
|
5
|
-
import {
|
|
5
|
+
import { ConsoleComponentServiceOptions, RestSinkOptions } from '../services';
|
|
6
6
|
/**
|
|
7
7
|
* Provides configuration for default built-in logger
|
|
8
8
|
* @param configBuilder - Configuration builder that is used for configuring logger
|
|
@@ -30,13 +30,13 @@ export function provideLoggerRestClient(type) {
|
|
|
30
30
|
]);
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Provides `
|
|
33
|
+
* Provides `ConsoleComponentServiceOptions`
|
|
34
34
|
* @param options - Value of options to be provided
|
|
35
35
|
*/
|
|
36
|
-
export function
|
|
36
|
+
export function provideConsoleComponentServiceOptions(options) {
|
|
37
37
|
return makeEnvironmentProviders([
|
|
38
38
|
{
|
|
39
|
-
provide:
|
|
39
|
+
provide: ConsoleComponentServiceOptions,
|
|
40
40
|
useValue: options,
|
|
41
41
|
}
|
|
42
42
|
]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../../../src/modules/logger/misc/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4E,wBAAwB,EAAC,MAAM,eAAe,CAAC;AAIlI,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../../../src/modules/logger/misc/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAA4E,wBAAwB,EAAC,MAAM,eAAe,CAAC;AAIlI,OAAO,EAAC,uBAAuB,EAAC,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAC,aAAa,EAAC,MAAM,UAAU,CAAC;AACvC,OAAO,EAAC,kBAAkB,EAAC,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAC,8BAA8B,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAE5E;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CAAC,aAA2C;IAE3E,MAAM,MAAM,GAAG,IAAI,uBAAuB,EAAE,CAAC;IAE7C,aAAa,CAAC,MAAM,CAAC,CAAC;IAEtB,OAAO,wBAAwB,CAC/B;QAEI;YACI,OAAO,EAAE,aAAa;YACtB,UAAU,EAAE,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC;SAC/C;KACJ,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA4B;IAEhE,OAAO,wBAAwB,CAC/B;QAEI;YACI,OAAO,EAAE,kBAAkB;YAC3B,QAAQ,EAAE,IAAI;SACjB;KACJ,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qCAAqC,CAAC,OAAuC;IAEzF,OAAO,wBAAwB,CAC/B;QAEI;YACI,OAAO,EAAE,8BAA8B;YACvC,QAAQ,EAAE,OAAO;SACpB;KACJ,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAwB;IAE3D,OAAO,wBAAwB,CAC/B;QAEI;YACI,OAAO,EAAE,eAAe;YACxB,QAAQ,EAAE,OAAO;SACpB;KACJ,CAAC,CAAC;AACP,CAAC","sourcesContent":["import {ClassProvider, EnvironmentProviders, FactoryProvider, Type, ValueProvider, makeEnvironmentProviders} from '@angular/core';\nimport {Action1} from '@jscrpt/common';\n\nimport {LoggerConfiguration, LoggerRestClient} from '../interfaces';\nimport {LoggerConfigurationImpl} from '../types/loggerConfiguration';\nimport {LoggerOptions} from '../types';\nimport {LOGGER_REST_CLIENT} from './tokens';\nimport {ConsoleComponentServiceOptions, RestSinkOptions} from '../services';\n\n/**\n * Provides configuration for default built-in logger\n * @param configBuilder - Configuration builder that is used for configuring logger\n */\nexport function provideLoggerConfig(configBuilder: Action1<LoggerConfiguration>): EnvironmentProviders\n{\n const config = new LoggerConfigurationImpl();\n\n configBuilder(config);\n\n return makeEnvironmentProviders(\n [\n <FactoryProvider>\n {\n provide: LoggerOptions,\n useFactory: config.buildOptions.bind(config),\n }\n ]);\n}\n\n/**\n * Provides logger rest client\n * @param type - Type that implements `LoggerRestClient`\n */\nexport function provideLoggerRestClient(type: Type<LoggerRestClient>): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n <ClassProvider>\n {\n provide: LOGGER_REST_CLIENT,\n useClass: type,\n }\n ]);\n}\n\n/**\n * Provides `ConsoleComponentServiceOptions`\n * @param options - Value of options to be provided\n */\nexport function provideConsoleComponentServiceOptions(options: ConsoleComponentServiceOptions): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n <ValueProvider>\n {\n provide: ConsoleComponentServiceOptions,\n useValue: options,\n }\n ]);\n}\n\n/**\n * Provides `RestSinkOptions`\n * @param options - Value of options to be provided\n */\nexport function provideRestSinkOptions(options: RestSinkOptions): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n <ValueProvider>\n {\n provide: RestSinkOptions,\n useValue: options,\n }\n ]);\n}\n"]}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import { ConsoleComponentSink } from '../services/console/consoleComponent.sink';
|
|
3
|
-
/**
|
|
4
|
-
* Injection token for obtaining sink service for `ConsoleComponent`
|
|
5
|
-
*/
|
|
6
|
-
export const CONSOLE_COMPONENT_SINK_SERVICE = new InjectionToken('CONSOLE_COMPONENT_SINK_SERVICE', { providedIn: 'root', factory: () => new ConsoleComponentSink() });
|
|
7
2
|
/**
|
|
8
3
|
* Injection token for obtaining rest client for rest sink
|
|
9
4
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/modules/logger/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../../../../src/modules/logger/misc/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAI7C;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAqC,IAAI,cAAc,CAAmB,oBAAoB,CAAC,CAAC","sourcesContent":["import {InjectionToken} from '@angular/core';\n\nimport {LoggerRestClient} from '../interfaces';\n\n/**\n * Injection token for obtaining rest client for rest sink\n */\nexport const LOGGER_REST_CLIENT: InjectionToken<LoggerRestClient> = new InjectionToken<LoggerRestClient>('LOGGER_REST_CLIENT');\n"]}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { Injectable, inject } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { ConsoleComponentServiceOptions } from './consoleComponentService.options';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Sink that is used for storing logs in `ConsoleComponent`
|
|
7
|
+
*/
|
|
8
|
+
class ConsoleComponentService {
|
|
9
|
+
//######################### protected fields #########################
|
|
10
|
+
/**
|
|
11
|
+
* Array of current logs
|
|
12
|
+
*/
|
|
13
|
+
currentLogs = [];
|
|
14
|
+
/**
|
|
15
|
+
* Subject used for indicating logs change
|
|
16
|
+
*/
|
|
17
|
+
logsChangeSubject = new Subject();
|
|
18
|
+
/**
|
|
19
|
+
* Options for this sink
|
|
20
|
+
*/
|
|
21
|
+
options = inject(ConsoleComponentServiceOptions);
|
|
22
|
+
//######################### public properties #########################
|
|
23
|
+
/**
|
|
24
|
+
* Occurs when logs change
|
|
25
|
+
*/
|
|
26
|
+
get logsChange() {
|
|
27
|
+
return this.logsChangeSubject.asObservable();
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Gets current logs
|
|
31
|
+
*/
|
|
32
|
+
get logs() {
|
|
33
|
+
return this.currentLogs;
|
|
34
|
+
}
|
|
35
|
+
//######################### public methods #########################
|
|
36
|
+
/**
|
|
37
|
+
* Clears all current logs
|
|
38
|
+
*/
|
|
39
|
+
clear() {
|
|
40
|
+
this.currentLogs = [];
|
|
41
|
+
this.logsChangeSubject.next();
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Logs log into service
|
|
45
|
+
* @param log - Log to be stored
|
|
46
|
+
*/
|
|
47
|
+
log(log) {
|
|
48
|
+
this.currentLogs.push(log);
|
|
49
|
+
//TRIM LOGS
|
|
50
|
+
if (this.currentLogs.length > this.options.maxLogsCount) {
|
|
51
|
+
const removeCount = this.currentLogs.length - this.options.maxLogsCount;
|
|
52
|
+
this.currentLogs.splice(0, removeCount);
|
|
53
|
+
}
|
|
54
|
+
this.logsChangeSubject.next();
|
|
55
|
+
}
|
|
56
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponentService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
57
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponentService, providedIn: 'root' });
|
|
58
|
+
}
|
|
59
|
+
export { ConsoleComponentService };
|
|
60
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponentService, decorators: [{
|
|
61
|
+
type: Injectable,
|
|
62
|
+
args: [{ providedIn: 'root' }]
|
|
63
|
+
}] });
|
|
64
|
+
//# sourceMappingURL=consoleComponent.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleComponent.service.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAE,MAAM,EAAC,MAAM,eAAe,CAAC;AACjD,OAAO,EAAa,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;;AAGjF;;GAEG;AACH,MACa,uBAAuB;IAEhC,sEAAsE;IAEtE;;OAEG;IACO,WAAW,GAA0B,EAAE,CAAC;IAElD;;OAEG;IACO,iBAAiB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAEjE;;OAEG;IACO,OAAO,GAAmC,MAAM,CAAC,8BAA8B,CAAC,CAAC;IAE3F,uEAAuE;IAEvE;;OAEG;IACH,IAAW,UAAU;QAEjB,OAAO,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,CAAC;IACjD,CAAC;IAED;;OAEG;IACH,IAAW,IAAI;QAEX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,oEAAoE;IAEpE;;OAEG;IACI,KAAK;QAER,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;IAED;;;OAGG;IACI,GAAG,CAAC,GAAwB;QAE/B,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;QAE3B,WAAW;QACX,IAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EACtD;YACI,MAAM,WAAW,GAAG,IAAI,CAAC,WAAW,CAAC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC;YAExE,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;SAC3C;QAED,IAAI,CAAC,iBAAiB,CAAC,IAAI,EAAE,CAAC;IAClC,CAAC;uGAjEQ,uBAAuB;2GAAvB,uBAAuB,cADX,MAAM;;SAClB,uBAAuB;2FAAvB,uBAAuB;kBADnC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAC","sourcesContent":["import {Injectable, inject} from '@angular/core';\nimport {Observable, Subject} from 'rxjs';\n\nimport {ConsoleComponentServiceOptions} from './consoleComponentService.options';\nimport {ConsoleComponentLog} from '../../interfaces';\n\n/**\n * Sink that is used for storing logs in `ConsoleComponent`\n */\n@Injectable({providedIn: 'root'})\nexport class ConsoleComponentService\n{\n //######################### protected fields #########################\n\n /**\n * Array of current logs\n */\n protected currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Subject used for indicating logs change\n */\n protected logsChangeSubject: Subject<void> = new Subject<void>();\n\n /**\n * Options for this sink\n */\n protected options: ConsoleComponentServiceOptions = inject(ConsoleComponentServiceOptions);\n\n //######################### public properties #########################\n\n /**\n * Occurs when logs change\n */\n public get logsChange(): Observable<void>\n {\n return this.logsChangeSubject.asObservable();\n }\n\n /**\n * Gets current logs\n */\n public get logs(): ConsoleComponentLog[]\n {\n return this.currentLogs;\n }\n \n //######################### public methods #########################\n\n /**\n * Clears all current logs\n */\n public clear(): void\n {\n this.currentLogs = [];\n this.logsChangeSubject.next();\n }\n\n /**\n * Logs log into service\n * @param log - Log to be stored\n */\n public log(log: ConsoleComponentLog): void\n {\n this.currentLogs.push(log);\n\n //TRIM LOGS\n if(this.currentLogs.length > this.options.maxLogsCount)\n {\n const removeCount = this.currentLogs.length - this.options.maxLogsCount;\n\n this.currentLogs.splice(0, removeCount);\n }\n\n this.logsChangeSubject.next();\n }\n}"]}
|
|
@@ -1,63 +1,27 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
2
|
import { inject } from '@angular/core';
|
|
3
|
-
import { Subject } from 'rxjs';
|
|
4
|
-
import { ConsoleComponentSinkOptions } from './consoleComponentSink.options';
|
|
5
3
|
import { LogLevel } from '../../types';
|
|
6
4
|
import { SinkType } from '../../decorators';
|
|
5
|
+
import { ConsoleComponentService } from './consoleComponent.service';
|
|
7
6
|
/**
|
|
8
7
|
* Sink that is used for storing logs in `ConsoleComponent`
|
|
9
8
|
*/
|
|
10
9
|
let ConsoleComponentSink = class ConsoleComponentSink {
|
|
11
10
|
//######################### protected fields #########################
|
|
12
|
-
/**
|
|
13
|
-
* Array of current logs
|
|
14
|
-
*/
|
|
15
|
-
currentLogs = [];
|
|
16
|
-
/**
|
|
17
|
-
* Subject used for indicating logs change
|
|
18
|
-
*/
|
|
19
|
-
logsChangeSubject = new Subject();
|
|
20
11
|
/**
|
|
21
12
|
* Options for this sink
|
|
22
13
|
*/
|
|
23
|
-
|
|
24
|
-
//######################### public properties - implementation of ConsoleComponentSink #########################
|
|
25
|
-
/**
|
|
26
|
-
* Occurs when logs change
|
|
27
|
-
*/
|
|
28
|
-
get logsChange() {
|
|
29
|
-
return this.logsChangeSubject.asObservable();
|
|
30
|
-
}
|
|
31
|
-
/**
|
|
32
|
-
* Gets current logs
|
|
33
|
-
*/
|
|
34
|
-
get logs() {
|
|
35
|
-
return this.currentLogs;
|
|
36
|
-
}
|
|
37
|
-
//######################### public methods - implementation of ConsoleComponentSinkData #########################
|
|
38
|
-
/**
|
|
39
|
-
* Clears all current logs
|
|
40
|
-
*/
|
|
41
|
-
clear() {
|
|
42
|
-
this.currentLogs = [];
|
|
43
|
-
this.logsChangeSubject.next();
|
|
44
|
-
}
|
|
14
|
+
consoleComponentSvc = inject(ConsoleComponentService);
|
|
45
15
|
//######################### public methods - implementation of LoggerSink #########################
|
|
46
16
|
/**
|
|
47
17
|
* @inheritdoc
|
|
48
18
|
*/
|
|
49
19
|
log(options, loggerProperties, messageLog) {
|
|
50
20
|
const fullMessage = `${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;
|
|
51
|
-
this.
|
|
21
|
+
this.consoleComponentSvc.log({
|
|
52
22
|
text: fullMessage,
|
|
53
23
|
logLevel: LogLevel[messageLog.logLevel],
|
|
54
24
|
});
|
|
55
|
-
//TRIM LOGS
|
|
56
|
-
if (this.currentLogs.length > this.options.maxLogsCount) {
|
|
57
|
-
const removeCount = this.currentLogs.length - this.options.maxLogsCount;
|
|
58
|
-
this.currentLogs.splice(0, removeCount);
|
|
59
|
-
}
|
|
60
|
-
this.logsChangeSubject.next();
|
|
61
25
|
}
|
|
62
26
|
};
|
|
63
27
|
ConsoleComponentSink = __decorate([
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleComponent.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.sink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"consoleComponent.sink.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponent.sink.ts"],"names":[],"mappings":";AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,eAAe,CAAC;AAGrC,OAAO,EAAC,QAAQ,EAA4B,MAAM,aAAa,CAAC;AAChE,OAAO,EAAC,QAAQ,EAAC,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AAEH,IAAa,oBAAoB,GAAjC,MAAa,oBAAoB;IAE7B,sEAAsE;IAEtE;;OAEG;IACO,mBAAmB,GAA4B,MAAM,CAAC,uBAAuB,CAAC,CAAC;IAEzF,mGAAmG;IAEnG;;OAEG;IACI,GAAG,CAAC,OAAsB,EAAE,gBAAyC,EAAE,UAA+C;QAEzH,MAAM,WAAW,GAAG,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,eAAe,IAAI,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,CAAC;QAEhH,IAAI,CAAC,mBAAmB,CAAC,GAAG,CAC5B;YACI,IAAI,EAAE,WAAW;YACjB,QAAQ,EAAE,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC;SAC1C,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AAxBY,oBAAoB;IADhC,QAAQ,EAAE;GACE,oBAAoB,CAwBhC;SAxBY,oBAAoB","sourcesContent":["import {inject} from '@angular/core';\n\nimport {LoggerSink} from '../../interfaces';\nimport {LogLevel, LoggerOptions, MessageLog} from '../../types';\nimport {SinkType} from '../../decorators';\nimport {ConsoleComponentService} from './consoleComponent.service';\n\n/**\n * Sink that is used for storing logs in `ConsoleComponent`\n */\n@SinkType()\nexport class ConsoleComponentSink implements LoggerSink\n{\n //######################### protected fields #########################\n\n /**\n * Options for this sink\n */\n protected consoleComponentSvc: ConsoleComponentService = inject(ConsoleComponentService);\n\n //######################### public methods - implementation of LoggerSink #########################\n\n /**\n * @inheritdoc\n */\n public log(options: LoggerOptions, loggerProperties: Record<string, unknown>, messageLog: MessageLog<Record<string, unknown>>): void\n {\n const fullMessage = `${messageLog.buildMessage(options.messageTemplate ?? '{{messageLog}}', loggerProperties)}`;\n\n this.consoleComponentSvc.log(\n {\n text: fullMessage,\n logLevel: LogLevel[messageLog.logLevel],\n });\n }\n}"]}
|
|
@@ -6,9 +6,9 @@ import * as i0 from "@angular/core";
|
|
|
6
6
|
*/
|
|
7
7
|
const MAX_LOGS = 1500;
|
|
8
8
|
/**
|
|
9
|
-
* Options for *console
|
|
9
|
+
* Options for *console component service*
|
|
10
10
|
*/
|
|
11
|
-
class
|
|
11
|
+
class ConsoleComponentServiceOptions {
|
|
12
12
|
//######################### public properties #########################
|
|
13
13
|
/**
|
|
14
14
|
* Maximal number of logs that can be stored
|
|
@@ -20,12 +20,12 @@ class ConsoleComponentSinkOptions {
|
|
|
20
20
|
this.maxLogsCount = maxLogsCount;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
24
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponentServiceOptions, deps: "invalid", target: i0.ɵɵFactoryTarget.Injectable });
|
|
24
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponentServiceOptions, providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions() });
|
|
25
25
|
}
|
|
26
|
-
export {
|
|
27
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
26
|
+
export { ConsoleComponentServiceOptions };
|
|
27
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponentServiceOptions, decorators: [{
|
|
28
28
|
type: Injectable,
|
|
29
|
-
args: [{ providedIn: 'root', useFactory: () => new
|
|
29
|
+
args: [{ providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions() }]
|
|
30
30
|
}], ctorParameters: function () { return [{ type: undefined }]; } });
|
|
31
|
-
//# sourceMappingURL=
|
|
31
|
+
//# sourceMappingURL=consoleComponentService.options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleComponentService.options.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponentService.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEzC;;GAEG;AACH,MAAM,QAAQ,GAAW,IAAI,CAAC;AAE9B;;GAEG;AACH,MACa,8BAA8B;IAEvC,uEAAuE;IAEvE;;OAEG;IACI,YAAY,GAAW,QAAQ,CAAC;IAEvC,iEAAiE;IACjE,YAAY,YAAqB;QAE7B,IAAG,SAAS,CAAC,YAAY,CAAC,EAC1B;YACI,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;SACpC;IACL,CAAC;uGAhBQ,8BAA8B;2GAA9B,8BAA8B,cADlB,MAAM,cAAc,GAAG,EAAE,CAAC,IAAI,8BAA8B,EAAE;;SAC1E,8BAA8B;2FAA9B,8BAA8B;kBAD1C,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,oCAAoC,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\n/**\n * Maximal number of logs that can be stored\n */\nconst MAX_LOGS: number = 1500;\n\n/**\n * Options for *console component service*\n */\n@Injectable({providedIn: 'root', useFactory: () => new ConsoleComponentServiceOptions()})\nexport class ConsoleComponentServiceOptions\n{\n //######################### public properties #########################\n\n /**\n * Maximal number of logs that can be stored\n */\n public maxLogsCount: number = MAX_LOGS;\n\n //######################### constructor #########################\n constructor(maxLogsCount?: number)\n {\n if(isPresent(maxLogsCount))\n {\n this.maxLogsCount = maxLogsCount;\n }\n }\n}\n"]}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export * from './console/consoleComponent.service';
|
|
1
2
|
export * from './console/consoleComponent.sink';
|
|
2
|
-
export * from './console/
|
|
3
|
+
export * from './console/consoleComponentService.options';
|
|
3
4
|
export * from './developmentConsoleSink/developmentConsole.sink';
|
|
4
5
|
export * from './logger/logger.interface';
|
|
5
6
|
export * from './logger/logger.service';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/logger/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/modules/logger/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC","sourcesContent":["export * from './console/consoleComponent.service';\nexport * from './console/consoleComponent.sink';\nexport * from './console/consoleComponentService.options';\nexport * from './developmentConsoleSink/developmentConsole.sink';\nexport * from './logger/logger.interface';\nexport * from './logger/logger.service';\nexport * from './logLevelEnricher/logLevelEnricher.enricher';\nexport * from './rest/rest.sink';\nexport * from './rest/restSink.options';\nexport * from './subLoggerSink/subLogger.sink';\nexport * from './timestampEnricher/timestamp.enricher';\n"]}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { OnInit, OnDestroy, ChangeDetectorRef } from '@angular/core';
|
|
2
2
|
import { Subscription } from 'rxjs';
|
|
3
|
-
import { ConsoleComponentLog
|
|
3
|
+
import { ConsoleComponentLog } from '../../interfaces';
|
|
4
|
+
import { ConsoleComponentService } from '../../services';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
/**
|
|
6
7
|
* Component used for displaying console logs
|
|
7
8
|
*/
|
|
8
9
|
export declare class ConsoleSAComponent implements OnInit, OnDestroy {
|
|
9
|
-
protected consoleSvc:
|
|
10
|
+
protected consoleSvc: ConsoleComponentService;
|
|
10
11
|
protected changeDetector: ChangeDetectorRef;
|
|
11
12
|
/**
|
|
12
13
|
* Subscription for log changes
|
|
@@ -24,7 +25,7 @@ export declare class ConsoleSAComponent implements OnInit, OnDestroy {
|
|
|
24
25
|
* Current value of filter
|
|
25
26
|
*/
|
|
26
27
|
protected filterValue: string;
|
|
27
|
-
constructor(consoleSvc:
|
|
28
|
+
constructor(consoleSvc: ConsoleComponentService, changeDetector: ChangeDetectorRef);
|
|
28
29
|
/**
|
|
29
30
|
* Initialize component
|
|
30
31
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.component.d.ts","sourceRoot":"","sources":["console.component.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"console.component.d.ts","sourceRoot":"","sources":["console.component.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAEvG,OAAO,EAAC,YAAY,EAAC,MAAM,MAAM,CAAC;AAElC,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAC,uBAAuB,EAAC,MAAM,gBAAgB,CAAC;;AAEvD;;GAEG;AACH,qBAYa,kBAAmB,YAAW,MAAM,EAAE,SAAS;IA2B5C,SAAS,CAAC,UAAU,EAAE,uBAAuB;IAC7C,SAAS,CAAC,cAAc,EAAE,iBAAiB;IAxBvD;;OAEG;IACH,SAAS,CAAC,sBAAsB,EAAE,YAAY,GAAC,SAAS,GAAC,IAAI,CAAC;IAI9D;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,mBAAmB,EAAE,CAAM;IAElD;;OAEG;IACH,SAAS,CAAC,OAAO,YAAoC;IAErD;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,CAAM;gBAGb,UAAU,EAAE,uBAAuB,EACnC,cAAc,EAAE,iBAAiB;IAMvD;;OAEG;IACI,QAAQ,IAAI,IAAI;IAavB;;OAEG;IACI,WAAW,IAAI,IAAI;IAW1B;;OAEG;IACH,SAAS,CAAC,IAAI,IAAI,IAAI;IAUtB;;;OAGG;IACH,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAU5C;;OAEG;IACH,SAAS,CAAC,KAAK,IAAI,IAAI;IAKvB;;OAEG;IACH,SAAS,CAAC,WAAW,IAAI,IAAI;yCAtGpB,kBAAkB;2CAAlB,kBAAkB;CAiH9B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Observable } from 'rxjs';
|
|
2
1
|
/**
|
|
3
2
|
* Definition of logs available for `ConsoleComponent`
|
|
4
3
|
*/
|
|
@@ -16,21 +15,4 @@ export interface ConsoleComponentLog {
|
|
|
16
15
|
*/
|
|
17
16
|
expanded?: boolean;
|
|
18
17
|
}
|
|
19
|
-
/**
|
|
20
|
-
* Definition of sink data that will be written to `ConsoleComponent`
|
|
21
|
-
*/
|
|
22
|
-
export interface ConsoleComponentSinkData {
|
|
23
|
-
/**
|
|
24
|
-
* Occurs when logs change
|
|
25
|
-
*/
|
|
26
|
-
readonly logsChange: Observable<void>;
|
|
27
|
-
/**
|
|
28
|
-
* Gets current logs
|
|
29
|
-
*/
|
|
30
|
-
readonly logs: ConsoleComponentLog[];
|
|
31
|
-
/**
|
|
32
|
-
* Clears all current logs
|
|
33
|
-
*/
|
|
34
|
-
clear(): void;
|
|
35
|
-
}
|
|
36
18
|
//# sourceMappingURL=loggerConsoleComponent.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loggerConsoleComponent.interface.d.ts","sourceRoot":"","sources":["loggerConsoleComponent.interface.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"loggerConsoleComponent.interface.d.ts","sourceRoot":"","sources":["loggerConsoleComponent.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAEhC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EnvironmentProviders, Type } from '@angular/core';
|
|
2
2
|
import { Action1 } from '@jscrpt/common';
|
|
3
3
|
import { LoggerConfiguration, LoggerRestClient } from '../interfaces';
|
|
4
|
-
import {
|
|
4
|
+
import { ConsoleComponentServiceOptions, RestSinkOptions } from '../services';
|
|
5
5
|
/**
|
|
6
6
|
* Provides configuration for default built-in logger
|
|
7
7
|
* @param configBuilder - Configuration builder that is used for configuring logger
|
|
@@ -13,10 +13,10 @@ export declare function provideLoggerConfig(configBuilder: Action1<LoggerConfigu
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function provideLoggerRestClient(type: Type<LoggerRestClient>): EnvironmentProviders;
|
|
15
15
|
/**
|
|
16
|
-
* Provides `
|
|
16
|
+
* Provides `ConsoleComponentServiceOptions`
|
|
17
17
|
* @param options - Value of options to be provided
|
|
18
18
|
*/
|
|
19
|
-
export declare function
|
|
19
|
+
export declare function provideConsoleComponentServiceOptions(options: ConsoleComponentServiceOptions): EnvironmentProviders;
|
|
20
20
|
/**
|
|
21
21
|
* Provides `RestSinkOptions`
|
|
22
22
|
* @param options - Value of options to be provided
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,oBAAoB,EAAmB,IAAI,EAA0C,MAAM,eAAe,CAAC;AAClI,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"providers.d.ts","sourceRoot":"","sources":["providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,oBAAoB,EAAmB,IAAI,EAA0C,MAAM,eAAe,CAAC;AAClI,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AAEvC,OAAO,EAAC,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAIpE,OAAO,EAAC,8BAA8B,EAAE,eAAe,EAAC,MAAM,aAAa,CAAC;AAE5E;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,OAAO,CAAC,mBAAmB,CAAC,GAAG,oBAAoB,CAcrG;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,IAAI,CAAC,gBAAgB,CAAC,GAAG,oBAAoB,CAU1F;AAED;;;GAGG;AACH,wBAAgB,qCAAqC,CAAC,OAAO,EAAE,8BAA8B,GAAG,oBAAoB,CAUnH;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,eAAe,GAAG,oBAAoB,CAUrF"}
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { InjectionToken } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
/**
|
|
4
|
-
* Injection token for obtaining sink service for `ConsoleComponent`
|
|
5
|
-
*/
|
|
6
|
-
export declare const CONSOLE_COMPONENT_SINK_SERVICE: InjectionToken<ConsoleComponentSinkData>;
|
|
2
|
+
import { LoggerRestClient } from '../interfaces';
|
|
7
3
|
/**
|
|
8
4
|
* Injection token for obtaining rest client for rest sink
|
|
9
5
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,eAAe,CAAC;AAE7C,OAAO,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,gBAAgB,CAA8D,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Observable, Subject } from 'rxjs';
|
|
2
|
+
import { ConsoleComponentServiceOptions } from './consoleComponentService.options';
|
|
3
|
+
import { ConsoleComponentLog } from '../../interfaces';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* Sink that is used for storing logs in `ConsoleComponent`
|
|
7
|
+
*/
|
|
8
|
+
export declare class ConsoleComponentService {
|
|
9
|
+
/**
|
|
10
|
+
* Array of current logs
|
|
11
|
+
*/
|
|
12
|
+
protected currentLogs: ConsoleComponentLog[];
|
|
13
|
+
/**
|
|
14
|
+
* Subject used for indicating logs change
|
|
15
|
+
*/
|
|
16
|
+
protected logsChangeSubject: Subject<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Options for this sink
|
|
19
|
+
*/
|
|
20
|
+
protected options: ConsoleComponentServiceOptions;
|
|
21
|
+
/**
|
|
22
|
+
* Occurs when logs change
|
|
23
|
+
*/
|
|
24
|
+
get logsChange(): Observable<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Gets current logs
|
|
27
|
+
*/
|
|
28
|
+
get logs(): ConsoleComponentLog[];
|
|
29
|
+
/**
|
|
30
|
+
* Clears all current logs
|
|
31
|
+
*/
|
|
32
|
+
clear(): void;
|
|
33
|
+
/**
|
|
34
|
+
* Logs log into service
|
|
35
|
+
* @param log - Log to be stored
|
|
36
|
+
*/
|
|
37
|
+
log(log: ConsoleComponentLog): void;
|
|
38
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleComponentService, never>;
|
|
39
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleComponentService>;
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=consoleComponent.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleComponent.service.d.ts","sourceRoot":"","sources":["consoleComponent.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAE,OAAO,EAAC,MAAM,MAAM,CAAC;AAEzC,OAAO,EAAC,8BAA8B,EAAC,MAAM,mCAAmC,CAAC;AACjF,OAAO,EAAC,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;;AAErD;;GAEG;AACH,qBACa,uBAAuB;IAIhC;;OAEG;IACH,SAAS,CAAC,WAAW,EAAE,mBAAmB,EAAE,CAAM;IAElD;;OAEG;IACH,SAAS,CAAC,iBAAiB,EAAE,OAAO,CAAC,IAAI,CAAC,CAAuB;IAEjE;;OAEG;IACH,SAAS,CAAC,OAAO,EAAE,8BAA8B,CAA0C;IAI3F;;OAEG;IACH,IAAW,UAAU,IAAI,UAAU,CAAC,IAAI,CAAC,CAGxC;IAED;;OAEG;IACH,IAAW,IAAI,IAAI,mBAAmB,EAAE,CAGvC;IAID;;OAEG;IACI,KAAK,IAAI,IAAI;IAMpB;;;OAGG;IACI,GAAG,CAAC,GAAG,EAAE,mBAAmB,GAAG,IAAI;yCApDjC,uBAAuB;6CAAvB,uBAAuB;CAkEnC"}
|
|
@@ -1,35 +1,14 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConsoleComponentSinkOptions } from './consoleComponentSink.options';
|
|
3
|
-
import { ConsoleComponentLog, ConsoleComponentSinkData, LoggerSink } from '../../interfaces';
|
|
1
|
+
import { LoggerSink } from '../../interfaces';
|
|
4
2
|
import { LoggerOptions, MessageLog } from '../../types';
|
|
3
|
+
import { ConsoleComponentService } from './consoleComponent.service';
|
|
5
4
|
/**
|
|
6
5
|
* Sink that is used for storing logs in `ConsoleComponent`
|
|
7
6
|
*/
|
|
8
|
-
export declare class ConsoleComponentSink implements LoggerSink
|
|
9
|
-
/**
|
|
10
|
-
* Array of current logs
|
|
11
|
-
*/
|
|
12
|
-
protected currentLogs: ConsoleComponentLog[];
|
|
13
|
-
/**
|
|
14
|
-
* Subject used for indicating logs change
|
|
15
|
-
*/
|
|
16
|
-
protected logsChangeSubject: Subject<void>;
|
|
7
|
+
export declare class ConsoleComponentSink implements LoggerSink {
|
|
17
8
|
/**
|
|
18
9
|
* Options for this sink
|
|
19
10
|
*/
|
|
20
|
-
protected
|
|
21
|
-
/**
|
|
22
|
-
* Occurs when logs change
|
|
23
|
-
*/
|
|
24
|
-
get logsChange(): Observable<void>;
|
|
25
|
-
/**
|
|
26
|
-
* Gets current logs
|
|
27
|
-
*/
|
|
28
|
-
get logs(): ConsoleComponentLog[];
|
|
29
|
-
/**
|
|
30
|
-
* Clears all current logs
|
|
31
|
-
*/
|
|
32
|
-
clear(): void;
|
|
11
|
+
protected consoleComponentSvc: ConsoleComponentService;
|
|
33
12
|
/**
|
|
34
13
|
* @inheritdoc
|
|
35
14
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consoleComponent.sink.d.ts","sourceRoot":"","sources":["consoleComponent.sink.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consoleComponent.sink.d.ts","sourceRoot":"","sources":["consoleComponent.sink.ts"],"names":[],"mappings":"AAEA,OAAO,EAAC,UAAU,EAAC,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAW,aAAa,EAAE,UAAU,EAAC,MAAM,aAAa,CAAC;AAEhE,OAAO,EAAC,uBAAuB,EAAC,MAAM,4BAA4B,CAAC;AAEnE;;GAEG;AACH,qBACa,oBAAqB,YAAW,UAAU;IAInD;;OAEG;IACH,SAAS,CAAC,mBAAmB,EAAE,uBAAuB,CAAmC;IAIzF;;OAEG;IACI,GAAG,CAAC,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,GAAG,IAAI;CAUvI"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
/**
|
|
3
|
+
* Options for *console component service*
|
|
4
|
+
*/
|
|
5
|
+
export declare class ConsoleComponentServiceOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Maximal number of logs that can be stored
|
|
8
|
+
*/
|
|
9
|
+
maxLogsCount: number;
|
|
10
|
+
constructor(maxLogsCount?: number);
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleComponentServiceOptions, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleComponentServiceOptions>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=consoleComponentService.options.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleComponentService.options.d.ts","sourceRoot":"","sources":["consoleComponentService.options.ts"],"names":[],"mappings":";AAQA;;GAEG;AACH,qBACa,8BAA8B;IAIvC;;OAEG;IACI,YAAY,EAAE,MAAM,CAAY;gBAG3B,YAAY,CAAC,EAAE,MAAM;yCAVxB,8BAA8B;6CAA9B,8BAA8B;CAiB1C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
export * from './console/consoleComponent.service';
|
|
1
2
|
export * from './console/consoleComponent.sink';
|
|
2
|
-
export * from './console/
|
|
3
|
+
export * from './console/consoleComponentService.options';
|
|
3
4
|
export * from './developmentConsoleSink/developmentConsole.sink';
|
|
4
5
|
export * from './logger/logger.interface';
|
|
5
6
|
export * from './logger/logger.service';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAC;AAChD,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"AAAA,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC;AACjE,cAAc,2BAA2B,CAAC;AAC1C,cAAc,yBAAyB,CAAC;AACxC,cAAc,8CAA8C,CAAC;AAC7D,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,wCAAwC,CAAC"}
|
package/version.bak
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
18.0.0-beta.
|
|
1
|
+
18.0.0-beta.20230823135645
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consoleComponentSink.options.js","sourceRoot":"","sources":["../../../../../../src/modules/logger/services/console/consoleComponentSink.options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEzC;;GAEG;AACH,MAAM,QAAQ,GAAW,IAAI,CAAC;AAE9B;;GAEG;AACH,MACa,2BAA2B;IAEpC,uEAAuE;IAEvE;;OAEG;IACI,YAAY,GAAW,QAAQ,CAAC;IAEvC,iEAAiE;IACjE,YAAY,YAAqB;QAE7B,IAAG,SAAS,CAAC,YAAY,CAAC,EAC1B;YACI,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;SACpC;IACL,CAAC;uGAhBQ,2BAA2B;2GAA3B,2BAA2B,cADf,MAAM,cAAc,GAAG,EAAE,CAAC,IAAI,2BAA2B,EAAE;;SACvE,2BAA2B;2FAA3B,2BAA2B;kBADvC,UAAU;mBAAC,EAAC,UAAU,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,iCAAiC,EAAC","sourcesContent":["import {Injectable} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\n/**\n * Maximal number of logs that can be stored\n */\nconst MAX_LOGS: number = 1500;\n\n/**\n * Options for *console sink component*\n */\n@Injectable({providedIn: 'root', useFactory: () => new ConsoleComponentSinkOptions()})\nexport class ConsoleComponentSinkOptions\n{\n //######################### public properties #########################\n\n /**\n * Maximal number of logs that can be stored\n */\n public maxLogsCount: number = MAX_LOGS;\n\n //######################### constructor #########################\n constructor(maxLogsCount?: number)\n {\n if(isPresent(maxLogsCount))\n {\n this.maxLogsCount = maxLogsCount;\n }\n }\n}\n"]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import * as i0 from "@angular/core";
|
|
2
|
-
/**
|
|
3
|
-
* Options for *console sink component*
|
|
4
|
-
*/
|
|
5
|
-
export declare class ConsoleComponentSinkOptions {
|
|
6
|
-
/**
|
|
7
|
-
* Maximal number of logs that can be stored
|
|
8
|
-
*/
|
|
9
|
-
maxLogsCount: number;
|
|
10
|
-
constructor(maxLogsCount?: number);
|
|
11
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<ConsoleComponentSinkOptions, never>;
|
|
12
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ConsoleComponentSinkOptions>;
|
|
13
|
-
}
|
|
14
|
-
//# sourceMappingURL=consoleComponentSink.options.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"consoleComponentSink.options.d.ts","sourceRoot":"","sources":["consoleComponentSink.options.ts"],"names":[],"mappings":";AAQA;;GAEG;AACH,qBACa,2BAA2B;IAIpC;;OAEG;IACI,YAAY,EAAE,MAAM,CAAY;gBAG3B,YAAY,CAAC,EAAE,MAAM;yCAVxB,2BAA2B;6CAA3B,2BAA2B;CAiBvC"}
|