@anglr/common 17.0.0-beta.20230814105451 → 17.0.0-beta.20230815122135
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 +55 -3
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js +15 -2
- package/es2022/floating-ui/src/services/floatingUiDomPosition.service.js.map +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js +1 -1
- package/es2022/forms/src/modules/errorMessage/components/groupErrors/groupErrors.component.js.map +1 -1
- package/es2022/src/{modules/clickOutside/directives → directives}/clickOutside/clickOutside.directive.js +29 -22
- package/es2022/src/directives/clickOutside/clickOutside.directive.js.map +1 -0
- package/es2022/src/{modules/goBack/directives → directives}/goBack/goBack.directive.js +7 -6
- package/es2022/src/directives/goBack/goBack.directive.js.map +1 -0
- package/es2022/src/{modules/position/directives → directives}/positionTo/positionTo.directive.js +9 -8
- package/es2022/src/directives/positionTo/positionTo.directive.js.map +1 -0
- package/es2022/src/index.js +3 -4
- package/es2022/src/index.js.map +1 -1
- package/es2022/src/modules/commonUtils.module.js +21 -21
- package/es2022/src/modules/commonUtils.module.js.map +1 -1
- package/es2022/src/pipes/isNaN/isNaN.pipe.js +7 -6
- package/es2022/src/pipes/isNaN/isNaN.pipe.js.map +1 -1
- package/es2022/src/pipes/isPresent/isPresent.pipe.js +7 -6
- package/es2022/src/pipes/isPresent/isPresent.pipe.js.map +1 -1
- package/es2022/src/pipes/keys/keys.pipe.js +6 -6
- package/es2022/src/pipes/keys/keys.pipe.js.map +1 -1
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js +6 -6
- package/es2022/src/pipes/mergeCssClasses/mergeCssClasses.pipe.js.map +1 -1
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js +6 -6
- package/es2022/src/pipes/urlEncode/urlEncode.pipe.js.map +1 -1
- package/es2022/src/services/notifications/defaultNotifications.service.js +12 -12
- package/es2022/src/services/notifications/defaultNotifications.service.js.map +1 -1
- package/es2022/src/services/notifications/notifications.interface.js +10 -1
- package/es2022/src/services/notifications/notifications.interface.js.map +1 -1
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js +2 -4
- package/es2022/src/services/stringLocalization/noStringLocalization.service.js.map +1 -1
- package/es2022/structured-log/src/components/console/console.component.js +2 -2
- package/es2022/structured-log/src/components/console/console.component.js.map +1 -1
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts +3 -4
- package/floating-ui/src/services/floatingUiDomPosition.service.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/directives/clickOutside/clickOutside.directive.d.ts +48 -0
- package/src/directives/clickOutside/clickOutside.directive.d.ts.map +1 -0
- package/src/{modules/goBack/directives → directives}/goBack/goBack.directive.d.ts +3 -3
- package/src/directives/goBack/goBack.directive.d.ts.map +1 -0
- package/src/{modules/position/directives → directives}/positionTo/positionTo.directive.d.ts +4 -4
- package/src/{modules/position/directives → directives}/positionTo/positionTo.directive.d.ts.map +1 -1
- package/src/index.d.ts +3 -4
- package/src/index.d.ts.map +1 -1
- package/src/modules/commonUtils.module.d.ts +1 -1
- package/src/pipes/isNaN/isNaN.pipe.d.ts +3 -3
- package/src/pipes/isNaN/isNaN.pipe.d.ts.map +1 -1
- package/src/pipes/isPresent/isPresent.pipe.d.ts +4 -4
- package/src/pipes/isPresent/isPresent.pipe.d.ts.map +1 -1
- package/src/pipes/keys/keys.pipe.d.ts +3 -3
- package/src/pipes/keys/keys.pipe.d.ts.map +1 -1
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts +3 -3
- package/src/pipes/mergeCssClasses/mergeCssClasses.pipe.d.ts.map +1 -1
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts +3 -3
- package/src/pipes/urlEncode/urlEncode.pipe.d.ts.map +1 -1
- package/src/services/notifications/defaultNotifications.service.d.ts +6 -6
- package/src/services/notifications/defaultNotifications.service.d.ts.map +1 -1
- package/src/services/notifications/notifications.interface.d.ts +19 -7
- package/src/services/notifications/notifications.interface.d.ts.map +1 -1
- package/src/services/stringLocalization/noStringLocalization.service.d.ts +1 -2
- package/src/services/stringLocalization/noStringLocalization.service.d.ts.map +1 -1
- package/structured-log/src/components/console/console.component.d.ts.map +1 -1
- package/structured-log/src/components/console/console.component.html +1 -1
- package/version.bak +1 -1
- package/es2022/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.js.map +0 -1
- package/es2022/src/modules/clickOutside/modules/clickOutside.module.js +0 -25
- package/es2022/src/modules/clickOutside/modules/clickOutside.module.js.map +0 -1
- package/es2022/src/modules/goBack/directives/goBack/goBack.directive.js.map +0 -1
- package/es2022/src/modules/goBack/directives/index.js +0 -2
- package/es2022/src/modules/goBack/directives/index.js.map +0 -1
- package/es2022/src/modules/goBack/index.js +0 -3
- package/es2022/src/modules/goBack/index.js.map +0 -1
- package/es2022/src/modules/goBack/modules/goBack.module.js +0 -24
- package/es2022/src/modules/goBack/modules/goBack.module.js.map +0 -1
- package/es2022/src/modules/goBack/modules/index.js +0 -2
- package/es2022/src/modules/goBack/modules/index.js.map +0 -1
- package/es2022/src/modules/position/directives/index.js +0 -2
- package/es2022/src/modules/position/directives/index.js.map +0 -1
- package/es2022/src/modules/position/directives/positionTo/positionTo.directive.js.map +0 -1
- package/es2022/src/modules/position/index.js +0 -3
- package/es2022/src/modules/position/index.js.map +0 -1
- package/es2022/src/modules/position/modules/index.js +0 -2
- package/es2022/src/modules/position/modules/index.js.map +0 -1
- package/es2022/src/modules/position/modules/position.module.js +0 -25
- package/es2022/src/modules/position/modules/position.module.js.map +0 -1
- package/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.d.ts +0 -47
- package/src/modules/clickOutside/directives/clickOutside/clickOutside.directive.d.ts.map +0 -1
- package/src/modules/clickOutside/modules/clickOutside.module.d.ts +0 -11
- package/src/modules/clickOutside/modules/clickOutside.module.d.ts.map +0 -1
- package/src/modules/goBack/directives/goBack/goBack.directive.d.ts.map +0 -1
- package/src/modules/goBack/directives/index.d.ts +0 -2
- package/src/modules/goBack/directives/index.d.ts.map +0 -1
- package/src/modules/goBack/index.d.ts +0 -3
- package/src/modules/goBack/index.d.ts.map +0 -1
- package/src/modules/goBack/modules/goBack.module.d.ts +0 -11
- package/src/modules/goBack/modules/goBack.module.d.ts.map +0 -1
- package/src/modules/goBack/modules/index.d.ts +0 -2
- package/src/modules/goBack/modules/index.d.ts.map +0 -1
- package/src/modules/position/directives/index.d.ts +0 -2
- package/src/modules/position/directives/index.d.ts.map +0 -1
- package/src/modules/position/index.d.ts +0 -3
- package/src/modules/position/index.d.ts.map +0 -1
- package/src/modules/position/modules/index.d.ts +0 -2
- package/src/modules/position/modules/index.d.ts.map +0 -1
- package/src/modules/position/modules/position.module.d.ts +0 -11
- package/src/modules/position/modules/position.module.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commonUtils.module.js","sourceRoot":"","sources":["../../../src/modules/commonUtils.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"commonUtils.module.js","sourceRoot":"","sources":["../../../src/modules/commonUtils.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,WAAW,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;;AAE1G;;GAEG;AACH,MAmBa,iBAAiB;uGAAjB,iBAAiB;wGAAjB,iBAAiB,YAftB,WAAW;YACX,eAAe;YACf,eAAe;YACf,qBAAqB;YACrB,UAAU,aAIV,WAAW;YACX,eAAe;YACf,eAAe;YACf,qBAAqB;YACrB,UAAU;wGAGL,iBAAiB;;SAAjB,iBAAiB;2FAAjB,iBAAiB;kBAnB7B,QAAQ;mBACT;oBACI,OAAO,EACP;wBACI,WAAW;wBACX,eAAe;wBACf,eAAe;wBACf,qBAAqB;wBACrB,UAAU;qBACb;oBACD,OAAO,EACP;wBACI,WAAW;wBACX,eAAe;wBACf,eAAe;wBACf,qBAAqB;wBACrB,UAAU;qBACb;iBACJ","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {IsNaNSAPipe, IsPresentSAPipe, UrlEncodeSAPipe, MergeCssClassesSAPipe, KeysSAPipe} from '../pipes';\n\n/**\n * Module for common utility stuff\n */\n@NgModule(\n{\n imports:\n [\n IsNaNSAPipe,\n IsPresentSAPipe,\n UrlEncodeSAPipe,\n MergeCssClassesSAPipe,\n KeysSAPipe,\n ],\n exports: \n [\n IsNaNSAPipe,\n IsPresentSAPipe,\n UrlEncodeSAPipe,\n MergeCssClassesSAPipe,\n KeysSAPipe,\n ]\n})\nexport class CommonUtilsModule\n{\n}"]}
|
|
@@ -3,7 +3,7 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
/**
|
|
4
4
|
* Returns true if object is NaN
|
|
5
5
|
*/
|
|
6
|
-
class
|
|
6
|
+
class IsNaNSAPipe {
|
|
7
7
|
//######################### public methods #########################
|
|
8
8
|
/**
|
|
9
9
|
* Checks whether is value NaN
|
|
@@ -12,14 +12,15 @@ class IsNaNPipe {
|
|
|
12
12
|
transform(value) {
|
|
13
13
|
return isNaN(value);
|
|
14
14
|
}
|
|
15
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
16
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
15
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: IsNaNSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
16
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: IsNaNSAPipe, isStandalone: true, name: "isNaN" });
|
|
17
17
|
}
|
|
18
|
-
export {
|
|
19
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
18
|
+
export { IsNaNSAPipe };
|
|
19
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: IsNaNSAPipe, decorators: [{
|
|
20
20
|
type: Pipe,
|
|
21
21
|
args: [{
|
|
22
|
-
name: 'isNaN'
|
|
22
|
+
name: 'isNaN',
|
|
23
|
+
standalone: true
|
|
23
24
|
}]
|
|
24
25
|
}] });
|
|
25
26
|
//# sourceMappingURL=isNaN.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isNaN.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/isNaN/isNaN.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"isNaN.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/isNaN/isNaN.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;;AAElD;;GAEG;AACH,MAKa,WAAW;IAEpB,oEAAoE;IAEpE;;;OAGG;IACI,SAAS,CAAC,KAAU;QAEvB,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC;IACxB,CAAC;uGAXQ,WAAW;qGAAX,WAAW;;SAAX,WAAW;2FAAX,WAAW;kBALvB,IAAI;mBACL;oBACI,IAAI,EAAE,OAAO;oBACb,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\n\n/**\n * Returns true if object is NaN\n */\n@Pipe(\n{\n name: 'isNaN',\n standalone: true\n})\nexport class IsNaNSAPipe implements PipeTransform\n{\n //######################### public methods #########################\n\n /**\n * Checks whether is value NaN\n * @param value - Value to be checked\n */\n public transform(value: any): boolean\n {\n return isNaN(value);\n }\n}"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Returns true if object is different from null or undefined
|
|
6
6
|
*/
|
|
7
|
-
class
|
|
7
|
+
class IsPresentSAPipe {
|
|
8
8
|
//######################### public methods #########################
|
|
9
9
|
/**
|
|
10
10
|
* Checks whether is value different from null or undefined
|
|
@@ -13,14 +13,15 @@ class IsPresentPipe {
|
|
|
13
13
|
transform(value) {
|
|
14
14
|
return isPresent(value);
|
|
15
15
|
}
|
|
16
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
17
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
16
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: IsPresentSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
17
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: IsPresentSAPipe, isStandalone: true, name: "isPresent" });
|
|
18
18
|
}
|
|
19
|
-
export {
|
|
20
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
19
|
+
export { IsPresentSAPipe };
|
|
20
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: IsPresentSAPipe, decorators: [{
|
|
21
21
|
type: Pipe,
|
|
22
22
|
args: [{
|
|
23
|
-
name: 'isPresent'
|
|
23
|
+
name: 'isPresent',
|
|
24
|
+
standalone: true,
|
|
24
25
|
}]
|
|
25
26
|
}] });
|
|
26
27
|
//# sourceMappingURL=isPresent.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"isPresent.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/isPresent/isPresent.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEzC;;GAEG;AACH,
|
|
1
|
+
{"version":3,"file":"isPresent.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/isPresent/isPresent.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,SAAS,EAAC,MAAM,gBAAgB,CAAC;;AAEzC;;GAEG;AACH,MAKa,eAAe;IAExB,oEAAoE;IAEpE;;;OAGG;IACI,SAAS,CAAC,KAAc;QAE3B,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;IAC5B,CAAC;uGAXQ,eAAe;qGAAf,eAAe;;SAAf,eAAe;2FAAf,eAAe;kBAL3B,IAAI;mBACL;oBACI,IAAI,EAAE,WAAW;oBACjB,UAAU,EAAE,IAAI;iBACnB","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {isPresent} from '@jscrpt/common';\n\n/**\n * Returns true if object is different from null or undefined\n */\n@Pipe(\n{\n name: 'isPresent',\n standalone: true,\n})\nexport class IsPresentSAPipe implements PipeTransform\n{\n //######################### public methods #########################\n\n /**\n * Checks whether is value different from null or undefined\n * @param value - Value to be checked\n */\n public transform(value: unknown): boolean\n {\n return isPresent(value);\n }\n}"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Gets object keys/property names
|
|
6
6
|
*/
|
|
7
|
-
class
|
|
7
|
+
class KeysSAPipe {
|
|
8
8
|
/**
|
|
9
9
|
* Gets object keys/property names
|
|
10
10
|
* @param value - Object containing keys which will be obtained
|
|
@@ -15,12 +15,12 @@ class KeysPipe {
|
|
|
15
15
|
}
|
|
16
16
|
return Object.keys(value);
|
|
17
17
|
}
|
|
18
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
19
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
18
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: KeysSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
19
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: KeysSAPipe, isStandalone: true, name: "keys" });
|
|
20
20
|
}
|
|
21
|
-
export {
|
|
22
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
21
|
+
export { KeysSAPipe };
|
|
22
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: KeysSAPipe, decorators: [{
|
|
23
23
|
type: Pipe,
|
|
24
|
-
args: [{ name: 'keys' }]
|
|
24
|
+
args: [{ name: 'keys', standalone: true }]
|
|
25
25
|
}] });
|
|
26
26
|
//# sourceMappingURL=keys.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keys.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/keys/keys.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEnD;;GAEG;AACH,MACa,
|
|
1
|
+
{"version":3,"file":"keys.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/keys/keys.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,OAAO,EAAC,MAAM,gBAAgB,CAAC;;AAEnD;;GAEG;AACH,MACa,UAAU;IAEnB;;;OAGG;IACI,SAAS,CAAC,KAAsB;QAEnC,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,OAAO,EAAE,CAAC;SACb;QAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;uGAdQ,UAAU;qGAAV,UAAU;;SAAV,UAAU;2FAAV,UAAU;kBADtB,IAAI;mBAAC,EAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {Dictionary, isBlank} from '@jscrpt/common';\n\n/**\n * Gets object keys/property names\n */\n@Pipe({name: 'keys', standalone: true})\nexport class KeysSAPipe implements PipeTransform\n{\n /**\n * Gets object keys/property names\n * @param value - Object containing keys which will be obtained\n */\n public transform(value: Dictionary<any>): string[]\n {\n if(isBlank(value))\n {\n return [];\n }\n\n return Object.keys(value);\n }\n}\n"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Merges css classes that will be passed to ngClass
|
|
6
6
|
*/
|
|
7
|
-
class
|
|
7
|
+
class MergeCssClassesSAPipe {
|
|
8
8
|
/**
|
|
9
9
|
* Merges css classes that will be passed to ngClass
|
|
10
10
|
* @param value - Css class to be merged
|
|
@@ -33,12 +33,12 @@ class MergeCssClassesPipe {
|
|
|
33
33
|
});
|
|
34
34
|
return result;
|
|
35
35
|
}
|
|
36
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
37
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
36
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: MergeCssClassesSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
37
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: MergeCssClassesSAPipe, isStandalone: true, name: "mergeCssClasses" });
|
|
38
38
|
}
|
|
39
|
-
export {
|
|
40
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
39
|
+
export { MergeCssClassesSAPipe };
|
|
40
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: MergeCssClassesSAPipe, decorators: [{
|
|
41
41
|
type: Pipe,
|
|
42
|
-
args: [{ name: 'mergeCssClasses' }]
|
|
42
|
+
args: [{ name: 'mergeCssClasses', standalone: true }]
|
|
43
43
|
}] });
|
|
44
44
|
//# sourceMappingURL=mergeCssClasses.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeCssClasses.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/mergeCssClasses/mergeCssClasses.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,QAAQ,EAAC,MAAM,gBAAgB,CAAC;;AAOpD;;GAEG;AACH,MACa,
|
|
1
|
+
{"version":3,"file":"mergeCssClasses.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/mergeCssClasses/mergeCssClasses.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAa,QAAQ,EAAC,MAAM,gBAAgB,CAAC;;AAOpD;;GAEG;AACH,MACa,qBAAqB;IAE9B;;;;OAIG;IACI,SAAS,CAAC,KAAkB,EAAE,YAA2B;QAE5D,MAAM,MAAM,GAAwB,EAAE,CAAC;QAEvC,SAAS,YAAY,CAAC,GAAgB;YAElC,IAAG,QAAQ,CAAC,GAAG,CAAC,EAChB;gBACI,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;aACtB;iBACI,IAAG,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,EAC1B;gBACI,GAAG,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAEnB,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,CAAC;gBAC5B,CAAC,CAAC,CAAC;aACN;iBAED;gBACI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE;oBAEhC,MAAM,CAAC,QAAQ,CAAC,GAAG,GAAG,CAAC,QAAQ,CAAC,CAAC;gBACrC,CAAC,CAAC,CAAC;aACN;QACL,CAAC;QAED,YAAY,CAAC,KAAK,CAAC,CAAC;QAEpB,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAEvB,YAAY,CAAC,GAAG,CAAC,CAAC;QACtB,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAClB,CAAC;uGAzCQ,qBAAqB;qGAArB,qBAAqB;;SAArB,qBAAqB;2FAArB,qBAAqB;kBADjC,IAAI;mBAAC,EAAC,IAAI,EAAE,iBAAiB,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {Dictionary, isString} from '@jscrpt/common';\n\n/**\n * Type of css class definition for NgClass and merge\n */\nexport type NgClassType = string | string[] | Dictionary<boolean>;\n\n/**\n * Merges css classes that will be passed to ngClass\n */\n@Pipe({name: 'mergeCssClasses', standalone: true})\nexport class MergeCssClassesSAPipe implements PipeTransform\n{\n /**\n * Merges css classes that will be passed to ngClass\n * @param value - Css class to be merged\n * @param mergeClasses - Definition of css classes that will be merged\n */\n public transform(value: NgClassType, mergeClasses: NgClassType[]): Dictionary<boolean>\n {\n const result: Dictionary<boolean> = {};\n\n function updateResult(val: NgClassType): void\n {\n if(isString(val))\n {\n result[val] = true;\n }\n else if(Array.isArray(val))\n {\n val.forEach(cssClass =>\n {\n result[cssClass] = true;\n });\n }\n else\n {\n Object.keys(val).forEach(cssClass =>\n {\n result[cssClass] = val[cssClass];\n });\n }\n }\n\n updateResult(value);\n\n mergeClasses.forEach(itm =>\n {\n updateResult(itm);\n });\n\n return result;\n }\n}"]}
|
|
@@ -4,7 +4,7 @@ import * as i0 from "@angular/core";
|
|
|
4
4
|
/**
|
|
5
5
|
* Pipe that encodes data for url
|
|
6
6
|
*/
|
|
7
|
-
class
|
|
7
|
+
class UrlEncodeSAPipe {
|
|
8
8
|
//######################### public methods #########################
|
|
9
9
|
/**
|
|
10
10
|
* Encodes data for URL
|
|
@@ -16,12 +16,12 @@ class UrlEncodePipe {
|
|
|
16
16
|
}
|
|
17
17
|
return serializeToUrlQuery(value);
|
|
18
18
|
}
|
|
19
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
20
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
19
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: UrlEncodeSAPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
20
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: UrlEncodeSAPipe, isStandalone: true, name: "urlEncode" });
|
|
21
21
|
}
|
|
22
|
-
export {
|
|
23
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
22
|
+
export { UrlEncodeSAPipe };
|
|
23
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: UrlEncodeSAPipe, decorators: [{
|
|
24
24
|
type: Pipe,
|
|
25
|
-
args: [{ name: 'urlEncode' }]
|
|
25
|
+
args: [{ name: 'urlEncode', standalone: true }]
|
|
26
26
|
}] });
|
|
27
27
|
//# sourceMappingURL=urlEncode.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlEncode.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/urlEncode/urlEncode.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;;AAEnD;;GAEG;AACH,MACa,
|
|
1
|
+
{"version":3,"file":"urlEncode.pipe.js","sourceRoot":"","sources":["../../../../src/pipes/urlEncode/urlEncode.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,mBAAmB,EAAC,MAAM,gBAAgB,CAAC;;AAEnD;;GAEG;AACH,MACa,eAAe;IAExB,oEAAoE;IAEpE;;;OAGG;IACI,SAAS,CAAC,KAAa;QAE1B,IAAG,CAAC,KAAK,EACT;YACI,OAAO,EAAE,CAAC;SACb;QAED,OAAO,mBAAmB,CAAC,KAAK,CAAC,CAAC;IACtC,CAAC;uGAhBQ,eAAe;qGAAf,eAAe;;SAAf,eAAe;2FAAf,eAAe;kBAD3B,IAAI;mBAAC,EAAC,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform} from '@angular/core';\nimport {serializeToUrlQuery} from '@jscrpt/common';\n\n/**\n * Pipe that encodes data for url\n */\n@Pipe({name: 'urlEncode', standalone: true})\nexport class UrlEncodeSAPipe implements PipeTransform\n{\n //######################### public methods #########################\n \n /**\n * Encodes data for URL\n * @param value - Value to be encoded\n */ \n public transform(value: object): string\n {\n if(!value)\n {\n return '';\n }\n\n return serializeToUrlQuery(value);\n }\n}\n\n"]}
|
|
@@ -62,8 +62,8 @@ class DefaultNotificationsService {
|
|
|
62
62
|
/**
|
|
63
63
|
* @inheritdoc
|
|
64
64
|
*/
|
|
65
|
-
message(message, severity) {
|
|
66
|
-
const notification = new Notification(message, severity);
|
|
65
|
+
message(message, severity, parameter) {
|
|
66
|
+
const notification = new Notification(message, severity, parameter);
|
|
67
67
|
this._notifications.push(notification);
|
|
68
68
|
this._notificationsChange.next();
|
|
69
69
|
// set timeout
|
|
@@ -77,32 +77,32 @@ class DefaultNotificationsService {
|
|
|
77
77
|
/**
|
|
78
78
|
* @inheritdoc
|
|
79
79
|
*/
|
|
80
|
-
default(message) {
|
|
81
|
-
return this.message(message, NotificationSeverity.Default);
|
|
80
|
+
default(message, parameter) {
|
|
81
|
+
return this.message(message, NotificationSeverity.Default, parameter);
|
|
82
82
|
}
|
|
83
83
|
/**
|
|
84
84
|
* @inheritdoc
|
|
85
85
|
*/
|
|
86
|
-
success(message) {
|
|
87
|
-
return this.message(message, NotificationSeverity.Success);
|
|
86
|
+
success(message, parameter) {
|
|
87
|
+
return this.message(message, NotificationSeverity.Success, parameter);
|
|
88
88
|
}
|
|
89
89
|
/**
|
|
90
90
|
* @inheritdoc
|
|
91
91
|
*/
|
|
92
|
-
error(message) {
|
|
93
|
-
return this.message(message, NotificationSeverity.Error);
|
|
92
|
+
error(message, parameter) {
|
|
93
|
+
return this.message(message, NotificationSeverity.Error, parameter);
|
|
94
94
|
}
|
|
95
95
|
/**
|
|
96
96
|
* @inheritdoc
|
|
97
97
|
*/
|
|
98
|
-
info(message) {
|
|
99
|
-
return this.message(message, NotificationSeverity.Info);
|
|
98
|
+
info(message, parameter) {
|
|
99
|
+
return this.message(message, NotificationSeverity.Info, parameter);
|
|
100
100
|
}
|
|
101
101
|
/**
|
|
102
102
|
* @inheritdoc
|
|
103
103
|
*/
|
|
104
|
-
warning(message) {
|
|
105
|
-
return this.message(message, NotificationSeverity.Warning);
|
|
104
|
+
warning(message, parameter) {
|
|
105
|
+
return this.message(message, NotificationSeverity.Warning, parameter);
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* @inheritdoc
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultNotifications.service.js","sourceRoot":"","sources":["../../../../src/services/notifications/default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Q,EAAE,SAAS;SACtB;QACD;YACI,OAAO,EAAE,KAAK,IAAI,aAAa;YAC/B,UAAU,EAAE,CAAC,aAA4B,EAAE,EAAE;gBAEzC,OAAO,aAAa,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC7C,CAAC;YACD,IAAI,EAAE,CAAC,CAAC,IAAI,QAAQ,EAAE,EAAE,aAAa,CAAC,CAAC;SAC1C;KACJ,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,CAAC,cAAc,CAAC,qBAAqB,EAAE,OAAO,EACpD;IACI,GAAG;QAEC,MAAM,IAAI,GAAsC,CAAC,SAAiB,EAAE,KAAsD,EAAE,EAAE;YAE1H,OAAO,oBAAoB,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;QAClD,CAAC,CAAC;QAEF,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,EACpC;YACI,GAAG;gBAEC,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/C,CAAC;SACJ,CAAC,CAAC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAC,CAAC;AAEH,OAAO,EAAC,qBAAqB,EAAC,CAAC","sourcesContent":["import {Injectable, InjectionToken, Optional, SkipSelf, Type} from '@angular/core';\nimport {Dictionary, generateId} from '@jscrpt/common';\nimport {Observable, Subject, Subscription} from 'rxjs';\n\nimport {NOTIFICATIONS, NOTIFICATIONS_SCOPE} from '../../types/tokens';\nimport {Notifications, Notification, NotificationSeverity, NotificationsProvider, NotificationsScopeProviderFactory, NotificationsScopeProvider} from './notifications.interface';\nimport {NotificationsOptions} from './notificationsOptions';\n\n/**\n * Default notifications service implementation\n */\n@Injectable()\nexport class DefaultNotificationsService implements Notifications\n{\n //######################### protected fields #########################\n\n /**\n * Array of notifications\n */\n protected _notifications: Notification[] = [];\n\n /**\n * Array of notifications timeouts\n */\n protected _notificationsTimeouts: number[] = [];\n\n /**\n * Subject used for emitting changes of current notifications\n */\n protected _notificationsChange: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for emitting event when instance is being destroyed\n */\n protected _destroy: Subject<void> = new Subject<void>();\n\n /**\n * Array of scoped notifications\n */\n protected _scopes: Dictionary<[Notifications, Subscription]> = {};\n\n //######################### public properties #########################\n\n /**\n * @inheritdoc\n */\n public get notifications(): readonly Notification[]\n {\n return [...this._notifications];\n }\n\n /**\n * @inheritdoc\n */\n public get notificationsChange(): Observable<void>\n {\n return this._notificationsChange.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get destroy(): Observable<void>\n {\n return this._destroy.asObservable();\n }\n\n //######################### constructor #########################\n constructor(@Optional() protected _options: NotificationsOptions)\n {\n if(!this._options || !(this._options instanceof NotificationsOptions))\n {\n this._options = new NotificationsOptions();\n }\n }\n\n //######################### public methods - implementation of Notifications #########################\n \n /**\n * @inheritdoc\n */\n public message(message: string, severity: NotificationSeverity): Notifications\n {\n const notification = new Notification(message, severity);\n \n this._notifications.push(notification);\n this._notificationsChange.next();\n\n // set timeout\n if(this._options.timeout > 0)\n {\n this._notificationsTimeouts.push(setTimeout(() =>\n {\n this.remove(notification);\n }, this._options.timeout) as any);\n }\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public default(message: string): Notifications\n {\n return this.message(message, NotificationSeverity.Default);\n }\n\n /**\n * @inheritdoc\n */\n public success(message: string): Notifications\n {\n return this.message(message, NotificationSeverity.Success);\n }\n \n /**\n * @inheritdoc\n */\n public error(message: string): Notifications\n {\n return this.message(message, NotificationSeverity.Error);\n }\n \n /**\n * @inheritdoc\n */\n public info(message: string): Notifications\n {\n return this.message(message, NotificationSeverity.Info);\n }\n \n /**\n * @inheritdoc\n */\n public warning(message: string): Notifications\n {\n return this.message(message, NotificationSeverity.Warning);\n }\n\n /**\n * @inheritdoc\n */\n public clearNotifications(): Notifications\n {\n while(this._notifications[0])\n {\n this._remove(this._notifications[0], false);\n }\n\n this._notificationsChange.next();\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public remove(notification: Notification): Notifications\n {\n return this._remove(notification);\n }\n\n /**\n * @inheritdoc\n */\n public getScope(scopeName: string): Notifications\n {\n const scopeObj = this._scopes[scopeName];\n let scope: Notifications;\n\n // no scope yet\n if(!scopeObj)\n {\n scope = new DefaultNotificationsService(this._options);\n const subscription = new Subscription();\n\n this._scopes[scopeName] = [scope, subscription];\n\n //destroys and removes scope\n subscription.add(scope.destroy.subscribe(() =>\n {\n delete this._scopes[scopeName];\n subscription.unsubscribe();\n }));\n }\n else\n {\n scope = scopeObj[0];\n }\n\n return scope;\n }\n\n /**\n * @inheritdoc\n * \n * Call this manualy for scoped instances until this is fixed https://github.com/angular/angular/issues/28738\n */\n public ngOnDestroy(): void\n {\n this._destroy.next();\n this._destroy.complete();\n this._notificationsChange.complete();\n\n Object.keys(this._scopes).forEach(scopeName =>\n {\n const [scope] = this._scopes[scopeName];\n\n scope.ngOnDestroy();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Removes notification from array of notifications\n * @param notification - Notification to be removed\n * @param emitEvent - Indication whether emit event on removal\n */\n protected _remove(notification: Notification, emitEvent: boolean = true): Notifications\n {\n const index = this._notifications.indexOf(notification);\n\n if(index < 0)\n {\n return this;\n }\n\n this._notifications.splice(index, 1);\n\n if(emitEvent)\n {\n this._notificationsChange.next();\n }\n\n // clear timeout\n if(this._options.timeout > 0)\n {\n clearTimeout(this._notificationsTimeouts[index]);\n this._notificationsTimeouts.splice(index, 1);\n }\n\n return this;\n }\n}\n\n/**\n * Default notifications provider\n */\nconst DEFAULT_NOTIFICATIONS: NotificationsProvider =\n{\n provide: NOTIFICATIONS,\n useClass: DefaultNotificationsService\n};\n\n//TODO: add options to notifications factory\n\n/**\n * Factory that creates notifications provider for scope\n */\nconst notificationsFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n{\n return <NotificationsScopeProvider> [\n {\n provide: NOTIFICATIONS_SCOPE,\n useValue: scopeName\n },\n {\n provide: token ?? NOTIFICATIONS,\n useFactory: (notifications: Notifications) =>\n {\n return notifications.getScope(scopeName);\n },\n deps: [[new SkipSelf(), NOTIFICATIONS]]\n }\n ];\n};\n\nObject.defineProperty(DEFAULT_NOTIFICATIONS, 'scope', \n{\n get()\n {\n const func: NotificationsScopeProviderFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n {\n return notificationsFactory(scopeName, token);\n };\n\n Object.defineProperty(func, 'random', \n {\n get()\n {\n return notificationsFactory(generateId(6));\n }\n });\n\n return func;\n }\n});\n\nexport {DEFAULT_NOTIFICATIONS};"]}
|
|
1
|
+
{"version":3,"file":"defaultNotifications.service.js","sourceRoot":"","sources":["../../../../src/services/notifications/defaultNotifications.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAkB,QAAQ,EAAE,QAAQ,EAAO,MAAM,eAAe,CAAC;AACnF,OAAO,EAAa,UAAU,EAAC,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAa,OAAO,EAAE,YAAY,EAAC,MAAM,MAAM,CAAC;AAEvD,OAAO,EAAC,aAAa,EAAE,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AACtE,OAAO,EAAgB,YAAY,EAAE,oBAAoB,EAAuF,MAAM,2BAA2B,CAAC;AAClL,OAAO,EAAC,oBAAoB,EAAC,MAAM,wBAAwB,CAAC;;;AAE5D;;GAEG;AACH,MACa,2BAA2B;IAwDF;IAtDlC,sEAAsE;IAEtE;;OAEG;IACO,cAAc,GAAmB,EAAE,CAAC;IAE9C;;OAEG;IACO,sBAAsB,GAAa,EAAE,CAAC;IAEhD;;OAEG;IACO,oBAAoB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAEpE;;OAEG;IACO,QAAQ,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAExD;;OAEG;IACO,OAAO,GAA8C,EAAE,CAAC;IAElE,uEAAuE;IAEvE;;OAEG;IACH,IAAW,aAAa;QAEpB,OAAO,CAAC,GAAG,IAAI,CAAC,cAAc,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AC;QAEH,OAAO,IAAI,CAAC;IAChB,CAAC;CACJ,CAAC,CAAC;AAEH,OAAO,EAAC,qBAAqB,EAAC,CAAC","sourcesContent":["import {Injectable, InjectionToken, Optional, SkipSelf, Type} from '@angular/core';\nimport {Dictionary, generateId} from '@jscrpt/common';\nimport {Observable, Subject, Subscription} from 'rxjs';\n\nimport {NOTIFICATIONS, NOTIFICATIONS_SCOPE} from '../../types/tokens';\nimport {Notifications, Notification, NotificationSeverity, NotificationsProvider, NotificationsScopeProviderFactory, NotificationsScopeProvider} from './notifications.interface';\nimport {NotificationsOptions} from './notificationsOptions';\n\n/**\n * Default notifications service implementation\n */\n@Injectable()\nexport class DefaultNotificationsService implements Notifications\n{\n //######################### protected fields #########################\n\n /**\n * Array of notifications\n */\n protected _notifications: Notification[] = [];\n\n /**\n * Array of notifications timeouts\n */\n protected _notificationsTimeouts: number[] = [];\n\n /**\n * Subject used for emitting changes of current notifications\n */\n protected _notificationsChange: Subject<void> = new Subject<void>();\n\n /**\n * Subject used for emitting event when instance is being destroyed\n */\n protected _destroy: Subject<void> = new Subject<void>();\n\n /**\n * Array of scoped notifications\n */\n protected _scopes: Dictionary<[Notifications, Subscription]> = {};\n\n //######################### public properties #########################\n\n /**\n * @inheritdoc\n */\n public get notifications(): readonly Notification[]\n {\n return [...this._notifications];\n }\n\n /**\n * @inheritdoc\n */\n public get notificationsChange(): Observable<void>\n {\n return this._notificationsChange.asObservable();\n }\n\n /**\n * @inheritdoc\n */\n public get destroy(): Observable<void>\n {\n return this._destroy.asObservable();\n }\n\n //######################### constructor #########################\n constructor(@Optional() protected _options: NotificationsOptions)\n {\n if(!this._options || !(this._options instanceof NotificationsOptions))\n {\n this._options = new NotificationsOptions();\n }\n }\n\n //######################### public methods - implementation of Notifications #########################\n \n /**\n * @inheritdoc\n */\n public message(message: string, severity: NotificationSeverity, parameter?: Record<string, unknown>): Notifications\n {\n const notification = new Notification(message, severity, parameter);\n \n this._notifications.push(notification);\n this._notificationsChange.next();\n\n // set timeout\n if(this._options.timeout > 0)\n {\n this._notificationsTimeouts.push(setTimeout(() =>\n {\n this.remove(notification);\n }, this._options.timeout) as any);\n }\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public default(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Default, parameter);\n }\n\n /**\n * @inheritdoc\n */\n public success(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Success, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public error(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Error, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public info(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Info, parameter);\n }\n \n /**\n * @inheritdoc\n */\n public warning(message: string, parameter?: Record<string, unknown>): Notifications\n {\n return this.message(message, NotificationSeverity.Warning, parameter);\n }\n\n /**\n * @inheritdoc\n */\n public clearNotifications(): Notifications\n {\n while(this._notifications[0])\n {\n this._remove(this._notifications[0], false);\n }\n\n this._notificationsChange.next();\n\n return this;\n }\n\n /**\n * @inheritdoc\n */\n public remove(notification: Notification): Notifications\n {\n return this._remove(notification);\n }\n\n /**\n * @inheritdoc\n */\n public getScope(scopeName: string): Notifications\n {\n const scopeObj = this._scopes[scopeName];\n let scope: Notifications;\n\n // no scope yet\n if(!scopeObj)\n {\n scope = new DefaultNotificationsService(this._options);\n const subscription = new Subscription();\n\n this._scopes[scopeName] = [scope, subscription];\n\n //destroys and removes scope\n subscription.add(scope.destroy.subscribe(() =>\n {\n delete this._scopes[scopeName];\n subscription.unsubscribe();\n }));\n }\n else\n {\n scope = scopeObj[0];\n }\n\n return scope;\n }\n\n /**\n * @inheritdoc\n * \n * Call this manualy for scoped instances until this is fixed https://github.com/angular/angular/issues/28738\n */\n public ngOnDestroy(): void\n {\n this._destroy.next();\n this._destroy.complete();\n this._notificationsChange.complete();\n\n Object.keys(this._scopes).forEach(scopeName =>\n {\n const [scope] = this._scopes[scopeName];\n\n scope.ngOnDestroy();\n });\n }\n\n //######################### protected methods #########################\n\n /**\n * Removes notification from array of notifications\n * @param notification - Notification to be removed\n * @param emitEvent - Indication whether emit event on removal\n */\n protected _remove(notification: Notification, emitEvent: boolean = true): Notifications\n {\n const index = this._notifications.indexOf(notification);\n\n if(index < 0)\n {\n return this;\n }\n\n this._notifications.splice(index, 1);\n\n if(emitEvent)\n {\n this._notificationsChange.next();\n }\n\n // clear timeout\n if(this._options.timeout > 0)\n {\n clearTimeout(this._notificationsTimeouts[index]);\n this._notificationsTimeouts.splice(index, 1);\n }\n\n return this;\n }\n}\n\n/**\n * Default notifications provider\n */\nconst DEFAULT_NOTIFICATIONS: NotificationsProvider =\n{\n provide: NOTIFICATIONS,\n useClass: DefaultNotificationsService\n};\n\n//TODO: add options to notifications factory\n\n/**\n * Factory that creates notifications provider for scope\n */\nconst notificationsFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n{\n return <NotificationsScopeProvider> [\n {\n provide: NOTIFICATIONS_SCOPE,\n useValue: scopeName\n },\n {\n provide: token ?? NOTIFICATIONS,\n useFactory: (notifications: Notifications) =>\n {\n return notifications.getScope(scopeName);\n },\n deps: [[new SkipSelf(), NOTIFICATIONS]]\n }\n ];\n};\n\nObject.defineProperty(DEFAULT_NOTIFICATIONS, 'scope', \n{\n get()\n {\n const func: NotificationsScopeProviderFactory = (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>) =>\n {\n return notificationsFactory(scopeName, token);\n };\n\n Object.defineProperty(func, 'random', \n {\n get()\n {\n return notificationsFactory(generateId(6));\n }\n });\n\n return func;\n }\n});\n\nexport {DEFAULT_NOTIFICATIONS};"]}
|
|
@@ -31,6 +31,7 @@ export var NotificationSeverity;
|
|
|
31
31
|
export class Notification {
|
|
32
32
|
_message;
|
|
33
33
|
_severity;
|
|
34
|
+
_parameter;
|
|
34
35
|
/**
|
|
35
36
|
* Gets message that this notification represents
|
|
36
37
|
*/
|
|
@@ -43,15 +44,23 @@ export class Notification {
|
|
|
43
44
|
get severity() {
|
|
44
45
|
return this._severity;
|
|
45
46
|
}
|
|
47
|
+
/**
|
|
48
|
+
* Gets object that is used for formatting notification message
|
|
49
|
+
*/
|
|
50
|
+
get parameter() {
|
|
51
|
+
return this._parameter;
|
|
52
|
+
}
|
|
46
53
|
//######################### constructor #########################
|
|
47
54
|
/**
|
|
48
55
|
* Creates instance of `Notification`
|
|
49
56
|
* @param _message - Message that this notification represents
|
|
50
57
|
* @param _severity - Severity of notification message
|
|
58
|
+
* @param _parameter - Object that is used for formatting notification message
|
|
51
59
|
*/
|
|
52
|
-
constructor(_message, _severity) {
|
|
60
|
+
constructor(_message, _severity, _parameter) {
|
|
53
61
|
this._message = _message;
|
|
54
62
|
this._severity = _severity;
|
|
63
|
+
this._parameter = _parameter;
|
|
55
64
|
}
|
|
56
65
|
}
|
|
57
66
|
//# sourceMappingURL=notifications.interface.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.interface.js","sourceRoot":"","sources":["../../../../src/services/notifications/notifications.interface.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAE1C;;GAEG;AACH,MAAM,CAAN,IAAY,oBA0BX;AA1BD,WAAY,oBAAoB;IAE5B;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;IAEJ;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,iEAAK,CAAA;AACT,CAAC,EA1BW,oBAAoB,KAApB,oBAAoB,QA0B/B;AAED;;GAEG;AACH,MAAM,OAAO,YAAY;
|
|
1
|
+
{"version":3,"file":"notifications.interface.js","sourceRoot":"","sources":["../../../../src/services/notifications/notifications.interface.ts"],"names":[],"mappings":"AAGA,0CAA0C;AAE1C;;GAEG;AACH,MAAM,CAAN,IAAY,oBA0BX;AA1BD,WAAY,oBAAoB;IAE5B;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,+DAAI,CAAA;IAEJ;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,qEAAO,CAAA;IAEP;;OAEG;IACH,iEAAK,CAAA;AACT,CAAC,EA1BW,oBAAoB,KAApB,oBAAoB,QA0B/B;AAED;;GAEG;AACH,MAAM,OAAO,YAAY;IAkCD;IACA;IACA;IAlCpB;;OAEG;IACH,IAAW,OAAO;QAEd,OAAO,IAAI,CAAC,QAAQ,CAAC;IACzB,CAAC;IAED;;OAEG;IACH,IAAW,QAAQ;QAEf,OAAO,IAAI,CAAC,SAAS,CAAC;IAC1B,CAAC;IAED;;OAEG;IACH,IAAW,SAAS;QAEhB,OAAO,IAAI,CAAC,UAAU,CAAC;IAC3B,CAAC;IAED,iEAAiE;IAEjE;;;;;OAKG;IACH,YAAoB,QAAgB,EAChB,SAA+B,EAC/B,UAAoC;QAFpC,aAAQ,GAAR,QAAQ,CAAQ;QAChB,cAAS,GAAT,SAAS,CAAsB;QAC/B,eAAU,GAAV,UAAU,CAA0B;IAExD,CAAC;CACJ","sourcesContent":["import {ClassProvider, FactoryProvider, InjectionToken, Type, ValueProvider} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n//TODO: allow changing and merging options\n\n/**\n * Severity of notification message\n */\nexport enum NotificationSeverity\n{\n /**\n * Default severity of message, no special meaning\n */\n Default,\n\n /**\n * Information severity of message\n */\n Info,\n\n /**\n * Success severity of message\n */\n Success,\n\n /**\n * Warning severity of message\n */\n Warning,\n\n /**\n * Error severity of message\n */\n Error\n}\n\n/**\n * Instance of notification that is being displayed\n */\nexport class Notification\n{\n /**\n * Gets message that this notification represents\n */\n public get message(): string\n {\n return this._message;\n }\n\n /**\n * Gets severity of notification message\n */\n public get severity(): NotificationSeverity\n {\n return this._severity;\n }\n\n /**\n * Gets object that is used for formatting notification message\n */\n public get parameter(): Record<string, unknown>|undefined\n {\n return this._parameter;\n }\n\n //######################### constructor #########################\n \n /**\n * Creates instance of `Notification`\n * @param _message - Message that this notification represents\n * @param _severity - Severity of notification message\n * @param _parameter - Object that is used for formatting notification message\n */\n constructor(private _message: string,\n private _severity: NotificationSeverity,\n private _parameter?: Record<string, unknown>)\n {\n }\n}\n\n/**\n * Manages currently displayed notifications\n */\nexport interface Notifications\n{\n //######################### properties #########################\n\n /**\n * Gets array of notifications\n */\n readonly notifications: readonly Notification[];\n\n /**\n * Gets observable that emits changes of current notifications\n */\n readonly notificationsChange: Observable<void>;\n\n /**\n * Gets observable that emits event when instance is being destroyed\n */\n readonly destroy: Observable<void>;\n\n //######################### methods #########################\n \n /**\n * Displays message with specified severity\n * @param message - Message to be displayed\n * @param severity - Severity of displayed notification\n * @param parameter - Object that is used for formatting notification message\n */\n message(message: string, severity: NotificationSeverity, parameter?: Record<string, unknown>): Notifications;\n\n /**\n * Displays default notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n default(message: string, parameter?: Record<string, unknown>): Notifications;\n\n /**\n * Displays success notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n success(message: string, parameter?: Record<string, unknown>): Notifications;\n \n /**\n * Displays error notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n error(message: string, parameter?: Record<string, unknown>): Notifications;\n \n /**\n * Displays info notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n info(message: string, parameter?: Record<string, unknown>): Notifications;\n \n /**\n * Displays warning notification\n * @param message - Message to be displayed\n * @param parameter - Object that is used for formatting notification message\n */\n warning(message: string, parameter?: Record<string, unknown>): Notifications;\n\n /**\n * Clears all displayed notifications\n */\n clearNotifications(): Notifications;\n\n /**\n * Removes notification\n * @param notification - Notification to be removed\n */\n remove(notification: Notification): Notifications;\n\n /**\n * Gets scoped instance of `Notifications`\n * @param scopeName - Name of scope to be returned\n */\n getScope(scopeName: string): Notifications;\n\n /**\n * Destroys service and clears all used resources\n */\n ngOnDestroy(): void;\n}\n\n/**\n * Tuple that will hold notification provider and notifications scope provider\n */\nexport type NotificationsScopeProvider = [ValueProvider, FactoryProvider];\n\n/**\n * Factory for creating `NotificationsScopeProvider`\n */\nexport interface NotificationsScopeProviderFactory\n{\n /**\n * Creates `NotificationsScopeProvider` with specified `scopeName`\n * @param scopeName - Name of scope to be created\n * @param token - Custom token that can be used for injecting Notifications under custom provider\n */\n (scopeName: string, token?: Function | Type<any> | InjectionToken<unknown>): NotificationsScopeProvider;\n\n /**\n * Creates `NotificationsScopeProvider` with random scope name\n */\n random?: NotificationsScopeProvider;\n}\n\n/**\n * Notifications provider that allows to create scoped notifications provider\n */\nexport interface NotificationsProvider extends ClassProvider\n{\n /**\n * Gets scoped providers\n */\n scope?: NotificationsScopeProviderFactory;\n}"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Injectable } from '@angular/core';
|
|
2
|
+
import { formatString } from '@jscrpt/common';
|
|
2
3
|
import { Subject } from 'rxjs';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
/**
|
|
@@ -27,10 +28,7 @@ class NoStringLocalizationService {
|
|
|
27
28
|
if (!interpolateParams) {
|
|
28
29
|
return key;
|
|
29
30
|
}
|
|
30
|
-
|
|
31
|
-
key = key.replace(new RegExp(`{{${prop}}}`, 'g'), interpolateParams[prop]);
|
|
32
|
-
});
|
|
33
|
-
return key;
|
|
31
|
+
return formatString(key, interpolateParams);
|
|
34
32
|
}
|
|
35
33
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NoStringLocalizationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
36
34
|
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NoStringLocalizationService });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"noStringLocalization.service.js","sourceRoot":"","sources":["../../../../src/services/stringLocalization/noStringLocalization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"noStringLocalization.service.js","sourceRoot":"","sources":["../../../../src/services/stringLocalization/noStringLocalization.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,OAAO,EAAa,MAAM,MAAM,CAAC;;AAIzC;;GAEG;AACH,MACa,2BAA2B;IAEpC,oEAAoE;IAEpE;;OAEG;IACK,mBAAmB,GAAkB,IAAI,OAAO,EAAQ,CAAC;IAEjE,8GAA8G;IAE9G;;OAEG;IACH,IAAW,WAAW;QAElB,OAAO,IAAI,CAAC,mBAAmB,CAAC,YAAY,EAAE,CAAC;IACnD,CAAC;IAED,2GAA2G;IAE3G;;;;OAIG;IACI,GAAG,CAAC,GAAW,EAAE,iBAA2C;QAE/D,IAAG,CAAC,iBAAiB,EACrB;YACI,OAAO,GAAG,CAAC;SACd;QAGD,OAAO,YAAY,CAAC,GAAG,EAAE,iBAAiB,CAAC,CAAC;IAChD,CAAC;uGAnCQ,2BAA2B;2GAA3B,2BAA2B;;SAA3B,2BAA2B;2FAA3B,2BAA2B;kBADvC,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {formatString} from '@jscrpt/common';\nimport {Subject, Observable} from 'rxjs';\n\nimport {StringLocalization} from './stringLocalization.interface';\n\n/**\n * Default implementation of StringLocalization, which uses 'key' as localization text\n */\n@Injectable()\nexport class NoStringLocalizationService implements StringLocalization\n{\n //######################### private fields #########################\n\n /**\n * Subject used for emitting when indication that locale has changes and strings should be obtained again, because they have changed\n */\n private _textsChangeSubject: Subject<void> = new Subject<void>();\n\n //######################### public properties - implementation of StringLocalization #########################\n\n /**\n * Occurs when indication that locale has changes and strings should be obtained again, because they have changed\n */\n public get textsChange(): Observable<void>\n {\n return this._textsChangeSubject.asObservable();\n }\n\n //######################### public methods - implementation of StringLocalization #########################\n\n /**\n * Gets localized string for specified key, interpolation might be used\n * @param key - Key to be localized\n * @param interpolateParams - Optional object storing interpolation parameters\n */\n public get(key: string, interpolateParams?: Record<string, unknown>): string\n {\n if(!interpolateParams)\n {\n return key;\n }\n\n\n return formatString(key, interpolateParams);\n }\n}\n"]}
|
|
@@ -90,12 +90,12 @@ class ConsoleComponent {
|
|
|
90
90
|
}
|
|
91
91
|
}
|
|
92
92
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponent, deps: [{ token: CONSOLE_COMPONENT_SINK_SERVICE }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
93
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ConsoleComponent, 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
|
|
93
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: ConsoleComponent, 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: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
94
94
|
}
|
|
95
95
|
export { ConsoleComponent };
|
|
96
96
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: ConsoleComponent, decorators: [{
|
|
97
97
|
type: Component,
|
|
98
|
-
args: [{ selector: 'console', 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
|
|
98
|
+
args: [{ selector: 'console', 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}"] }]
|
|
99
99
|
}], ctorParameters: function () { return [{ type: undefined, decorators: [{
|
|
100
100
|
type: Inject,
|
|
101
101
|
args: [CONSOLE_COMPONENT_SINK_SERVICE]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.component.js","sourceRoot":"","sources":["../../../../../structured-log/src/components/console/console.component.ts","../../../../../structured-log/src/components/console/console.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAqB,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAG/G,OAAO,EAAC,8BAA8B,EAAC,MAAM,oBAAoB,CAAC;;;AAGlE;;GAEG;AACH,MAOa,gBAAgB;IA2BmC;IACxC;IA1BpB,oEAAoE;IAEpE;;OAEG;IACK,uBAAuB,
|
|
1
|
+
{"version":3,"file":"console.component.js","sourceRoot":"","sources":["../../../../../structured-log/src/components/console/console.component.ts","../../../../../structured-log/src/components/console/console.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAE,MAAM,EAAqB,iBAAiB,EAAC,MAAM,eAAe,CAAC;AAG/G,OAAO,EAAC,8BAA8B,EAAC,MAAM,oBAAoB,CAAC;;;AAGlE;;GAEG;AACH,MAOa,gBAAgB;IA2BmC;IACxC;IA1BpB,oEAAoE;IAEpE;;OAEG;IACK,uBAAuB,CAA8B;IAE7D,2FAA2F;IAE3F;;OAEG;IACI,WAAW,GAA0B,EAAE,CAAC;IAE/C;;OAEG;IACI,OAAO,GAAG,SAAS,IAAI,SAAS,CAAC,SAAS,CAAC;IAElD;;OAEG;IACI,WAAW,GAAW,EAAE,CAAC;IAEhC,iEAAiE;IACjE,YAA4D,WAAiC,EACzE,eAAkC;QADM,gBAAW,GAAX,WAAW,CAAsB;QACzE,oBAAe,GAAf,eAAe,CAAmB;IAEtD,CAAC;IAED,+FAA+F;IAE/F;;OAEG;IACI,QAAQ;QAEX,IAAI,CAAC,WAAW,EAAE,CAAC;QAEnB,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,GAAG,EAAE;YAEtE,IAAI,CAAC,WAAW,EAAE,CAAC;YACnB,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;QACzC,CAAC,CAAC,CAAC;IACP,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAA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F,uBAAuB,CAAC,MAAM;;0BA6BlC,MAAM;2BAAC,8BAA8B","sourcesContent":["import {Component, ChangeDetectionStrategy, Inject, OnInit, OnDestroy, ChangeDetectorRef} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {CONSOLE_COMPONENT_SINK_SERVICE} from '../../types/tokens';\nimport {ConsoleComponentSink, ConsoleComponentLog} from '../../types/logger.interface';\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 changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class ConsoleComponent implements OnInit, OnDestroy\n{\n //######################### private fields #########################\n\n /**\n * Subscription for log changes\n */\n private _logsChangeSubscription: Subscription|undefined|null;\n\n //######################### public properties - template bindings #########################\n\n /**\n * Current state of logger\n */\n public currentLogs: ConsoleComponentLog[] = [];\n\n /**\n * Indication whether can use copy to clipboard\n */\n public canCopy = navigator && navigator.clipboard;\n\n /**\n * Current value of filter\n */\n public filterValue: string = '';\n\n //######################### constructor #########################\n constructor(@Inject(CONSOLE_COMPONENT_SINK_SERVICE) private _consoleSvc: ConsoleComponentSink,\n private _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 //######################### public methods - template bindings #########################\n\n /**\n * Copies content of whole console log into clipboard\n */\n public 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 public 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 public clear(): void\n {\n this._consoleSvc.clear();\n }\n\n /**\n * Sets messages using filter\n */\n public 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,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { Position, PositionResult, PositionOptions } from '@anglr/common';
|
|
1
|
+
import { Position, PositionResult, PositionOptions, PositionType } from '@anglr/common';
|
|
3
2
|
import { Placement, Middleware } from '@floating-ui/dom';
|
|
4
3
|
import { Observable } from 'rxjs';
|
|
5
4
|
import * as i0 from "@angular/core";
|
|
@@ -32,7 +31,7 @@ export declare class FloatingUiDomPosition implements Position {
|
|
|
32
31
|
static ɵprov: i0.ɵɵInjectableDeclaration<FloatingUiDomPosition>;
|
|
33
32
|
}
|
|
34
33
|
/**
|
|
35
|
-
*
|
|
34
|
+
* Sets position to use floating ui position when used with `providePosition`
|
|
36
35
|
*/
|
|
37
|
-
export declare const
|
|
36
|
+
export declare const FloatingUiPosition: PositionType;
|
|
38
37
|
//# sourceMappingURL=floatingUiDomPosition.service.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floatingUiDomPosition.service.d.ts","sourceRoot":"","sources":["floatingUiDomPosition.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"floatingUiDomPosition.service.d.ts","sourceRoot":"","sources":["floatingUiDomPosition.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,QAAQ,EAAE,cAAc,EAAE,eAAe,EAAuH,YAAY,EAAC,MAAM,eAAe,CAAC;AAE3M,OAAO,EAAkB,SAAS,EAAc,UAAU,EAAe,MAAM,kBAAkB,CAAC;AAClG,OAAO,EAAC,UAAU,EAAC,MAAM,MAAM,CAAC;;AAahC;;GAEG;AACH,qBACa,qBAAsB,YAAW,QAAQ;IAIlD;;OAEG;IACI,YAAY,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,cAAc,CAAC;IAmFrH;;;;OAIG;IACH,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IAQ7E;;;;OAIG;IACH,SAAS,CAAC,UAAU,CAAC,WAAW,EAAE,UAAU,EAAE,EAAE,OAAO,EAAE,eAAe,GAAG,IAAI;IA6G/E;;;OAGG;IACH,SAAS,CAAC,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,SAAS;yCA7NnD,qBAAqB;6CAArB,qBAAqB;CAoRjC;AAoBD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAE,YAAqC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anglr/common",
|
|
3
|
-
"version": "17.0.0-beta.
|
|
3
|
+
"version": "17.0.0-beta.20230815122135",
|
|
4
4
|
"description": "Angular module for common angular stuff",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@angular/material": ">=16.0.3",
|
|
104
104
|
"@anglr/animations": ">=9.1.0",
|
|
105
105
|
"rxjs": ">=7.5.7",
|
|
106
|
-
"@jscrpt/common": ">=
|
|
106
|
+
"@jscrpt/common": ">=4.0.0",
|
|
107
107
|
"numeral": "^2.0.6",
|
|
108
108
|
"angular2-hotkeys": ">=15.0.0",
|
|
109
109
|
"store": "^2.0.12",
|
|
@@ -112,7 +112,7 @@
|
|
|
112
112
|
"date-fns": "^2.30.0",
|
|
113
113
|
"positions": "^1.6.2",
|
|
114
114
|
"@floating-ui/dom": "^1.4.4",
|
|
115
|
-
"tslib": "^2.6.
|
|
115
|
+
"tslib": "^2.6.1"
|
|
116
116
|
},
|
|
117
117
|
"devDependencies": {
|
|
118
118
|
"@angular/core": "^16.0.3",
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
"@angular/material": "^16.0.3",
|
|
126
126
|
"@anglr/animations": "^9.1.0",
|
|
127
127
|
"rxjs": "^7.5.7",
|
|
128
|
-
"@jscrpt/common": "^
|
|
128
|
+
"@jscrpt/common": "^4.0.0",
|
|
129
129
|
"angular2-hotkeys": "^15.0.0",
|
|
130
130
|
"store": "^2.0.12",
|
|
131
131
|
"structured-log": "^0.2.0",
|
|
@@ -142,14 +142,14 @@
|
|
|
142
142
|
"@angular/language-service": "^16.0.3",
|
|
143
143
|
"@microsoft/api-extractor": "7.36.1",
|
|
144
144
|
"@microsoft/api-documenter": "7.22.24",
|
|
145
|
-
"tslib": "2.6.
|
|
145
|
+
"tslib": "2.6.1",
|
|
146
146
|
"eslint": "7.32.0",
|
|
147
147
|
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
148
148
|
"@typescript-eslint/parser": "4.33.0",
|
|
149
149
|
"eslint-plugin-ressurectit": "0.1.0",
|
|
150
150
|
"rimraf": "3.0.2",
|
|
151
151
|
"copyfiles": "2.4.1",
|
|
152
|
-
"replace-in-file": "6.3.
|
|
152
|
+
"replace-in-file": "6.3.5",
|
|
153
153
|
"path-exists-cli": "2.0.0",
|
|
154
154
|
"typescript": "5.0.4",
|
|
155
155
|
"npm-git-version": "2.0.0"
|