@anglr/common 17.0.0-beta.20230711090239 → 17.0.0-beta.20230814105451
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 +45 -1
- package/es2022/hotkeys/src/services/appHotkeys.service.js +6 -2
- package/es2022/hotkeys/src/services/appHotkeys.service.js.map +1 -1
- package/es2022/numeral/src/modules/numeral.module.js +4 -4
- package/es2022/numeral/src/modules/numeral.module.js.map +1 -1
- package/es2022/numeral/src/pipes/numeral.pipe.js +6 -6
- package/es2022/numeral/src/pipes/numeral.pipe.js.map +1 -1
- package/es2022/src/index.js +3 -1
- package/es2022/src/index.js.map +1 -1
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js +26 -26
- package/es2022/src/modules/debugData/components/debugData/debugData.component.js.map +1 -1
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +15 -15
- package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
- package/es2022/src/services/logger/logger.interface.js.map +1 -1
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +22 -0
- package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
- package/es2022/src/services/permanentStorage/permanentStorage.interface.js.map +1 -1
- package/es2022/src/services/position/position.interface.js.map +1 -1
- package/es2022/src/services/stringLocalization/stringLocalization.interface.js.map +1 -1
- package/es2022/src/services/temporaryStorage/temporaryStorage.interface.js.map +1 -1
- package/es2022/src/types/providerDecoratedType.js +32 -0
- package/es2022/src/types/providerDecoratedType.js.map +1 -0
- package/es2022/src/types/providers.js +48 -0
- package/es2022/src/types/providers.js.map +1 -0
- package/es2022/store/src/index.js +1 -1
- package/es2022/store/src/index.js.map +1 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +21 -1
- package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +21 -0
- package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
- package/es2022/structured-log/src/index.js +2 -1
- package/es2022/structured-log/src/index.js.map +1 -1
- package/es2022/structured-log/src/misc/providers.js +12 -0
- package/es2022/structured-log/src/misc/providers.js.map +1 -0
- package/es2022/structured-log/src/modules/consoleLog.module.js +0 -15
- package/es2022/structured-log/src/modules/consoleLog.module.js.map +1 -1
- package/es2022/structured-log/src/services/logger.service.js +21 -0
- package/es2022/structured-log/src/services/logger.service.js.map +1 -1
- package/es2022/structured-log/src/services/rest/restSink.options.js +40 -0
- package/es2022/structured-log/src/services/rest/restSink.options.js.map +1 -0
- package/es2022/structured-log/src/services/rest/restSink.service.js +22 -12
- package/es2022/structured-log/src/services/rest/restSink.service.js.map +1 -1
- package/es2022/structured-log/src/types/tokens.js +0 -9
- package/es2022/structured-log/src/types/tokens.js.map +1 -1
- package/hotkeys/src/services/appHotkeys.service.d.ts.map +1 -1
- package/numeral/src/modules/numeral.module.d.ts +1 -1
- package/numeral/src/pipes/numeral.pipe.d.ts +3 -3
- package/numeral/src/pipes/numeral.pipe.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/index.d.ts +6 -4
- package/src/index.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.d.ts +8 -8
- package/src/modules/debugData/components/debugData/debugData.component.d.ts.map +1 -1
- package/src/modules/debugData/components/debugData/debugData.component.html +1 -1
- package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts +10 -9
- package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts.map +1 -1
- package/src/services/logger/logger.interface.d.ts +6 -0
- package/src/services/logger/logger.interface.d.ts.map +1 -1
- package/src/services/permanentStorage/cookiePermanentStorage.service.d.ts +5 -1
- package/src/services/permanentStorage/cookiePermanentStorage.service.d.ts.map +1 -1
- package/src/services/permanentStorage/permanentStorage.interface.d.ts +6 -0
- package/src/services/permanentStorage/permanentStorage.interface.d.ts.map +1 -1
- package/src/services/position/position.interface.d.ts +6 -0
- package/src/services/position/position.interface.d.ts.map +1 -1
- package/src/services/stringLocalization/stringLocalization.interface.d.ts +6 -0
- package/src/services/stringLocalization/stringLocalization.interface.d.ts.map +1 -1
- package/src/services/temporaryStorage/temporaryStorage.interface.d.ts +6 -0
- package/src/services/temporaryStorage/temporaryStorage.interface.d.ts.map +1 -1
- package/src/types/providerDecoratedType.d.ts +12 -0
- package/src/types/providerDecoratedType.d.ts.map +1 -0
- package/src/types/providers.d.ts +32 -0
- package/src/types/providers.d.ts.map +1 -0
- package/store/src/index.d.ts +1 -1
- package/store/src/index.d.ts.map +1 -1
- package/store/src/services/permanentStorage/localPermanentStorage.service.d.ts +5 -1
- package/store/src/services/permanentStorage/localPermanentStorage.service.d.ts.map +1 -1
- package/store/src/services/temporaryStorage/sessionTemporaryStorage.service.d.ts +5 -1
- package/store/src/services/temporaryStorage/sessionTemporaryStorage.service.d.ts.map +1 -1
- package/structured-log/src/index.d.ts +2 -1
- package/structured-log/src/index.d.ts.map +1 -1
- package/structured-log/src/misc/providers.d.ts +6 -0
- package/structured-log/src/misc/providers.d.ts.map +1 -0
- package/structured-log/src/modules/consoleLog.module.d.ts +0 -5
- package/structured-log/src/modules/consoleLog.module.d.ts.map +1 -1
- package/structured-log/src/services/logger.service.d.ts +5 -1
- package/structured-log/src/services/logger.service.d.ts.map +1 -1
- package/structured-log/src/services/rest/restSink.options.d.ts +24 -0
- package/structured-log/src/services/rest/restSink.options.d.ts.map +1 -0
- package/structured-log/src/services/rest/restSink.service.d.ts +7 -4
- package/structured-log/src/services/rest/restSink.service.d.ts.map +1 -1
- package/structured-log/src/types/tokens.d.ts +0 -4
- package/structured-log/src/types/tokens.d.ts.map +1 -1
- package/version.bak +1 -1
- package/es2022/structured-log/src/services/rest/restSinkConfig.service.js +0 -60
- package/es2022/structured-log/src/services/rest/restSinkConfig.service.js.map +0 -1
- package/structured-log/src/services/rest/restSinkConfig.service.d.ts +0 -22
- package/structured-log/src/services/rest/restSinkConfig.service.d.ts.map +0 -1
package/changelog.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## Version 17.0.0 (2023-
|
|
3
|
+
## Version 17.0.0 (2023-08-14)
|
|
4
4
|
|
|
5
5
|
### Features
|
|
6
6
|
|
|
@@ -18,8 +18,29 @@
|
|
|
18
18
|
- **name** `firstUppercaseLocalize`
|
|
19
19
|
- new `FirstUppercaseSAPipe` pipe, that converts first letter of text to uppercase
|
|
20
20
|
- **name** `firstUppercase`
|
|
21
|
+
- new `getProviderForType` function, that gets provider from type
|
|
22
|
+
- new `TypeProvider` decorator, that attach provider to type
|
|
23
|
+
- new `LoggerType` interface, that is used for restriction of logger provider type only for type decorated with logger provider
|
|
24
|
+
- new `PermanentStorageType` interface, that is used for restriction of permanent storage provider type only for type decorated with permanent storage provider
|
|
25
|
+
- new `PositionType` interface, that is used for restriction of position provider type only for type decorated with position provider
|
|
26
|
+
- new `StringLocalizationType` interface, that is used for restriction of string localization provider type only for type decorated with string localization provider
|
|
27
|
+
- new `TemporaryStorageType` interface, that is used for restriction of temporary storage provider type only for type decorated with temporary storage provider
|
|
28
|
+
- new `provideLogger` function that provides logger service type
|
|
29
|
+
- new `providePermanentStorage` function that provides permanent storage service type
|
|
30
|
+
- new `providePosition` function that provides position service type
|
|
31
|
+
- new `provideStringLocalization` function that provides string localization service type
|
|
32
|
+
- new `provideTemporaryStorage` function that provides temporary storage service type
|
|
33
|
+
- new `CookiePermanentStorage` type, that sets permanent storage to use cookie permanent storage when used with `providePermanentStorage`
|
|
21
34
|
- updated `LocalizeSAPipe`
|
|
22
35
|
- now its `standalone`
|
|
36
|
+
- *subpackage* `@anglr/common/numeral`
|
|
37
|
+
- updated `NumeralSAPipe` pipe is now standalone
|
|
38
|
+
- *subpackage* `@anglr/common/store`
|
|
39
|
+
- new `LocalPermanentStorage` type, that sets permanent storage to use local permanent storage when used with `providePermanentStorage`
|
|
40
|
+
- new `SessionTemporaryStorage` type, that sets temporary storage to use session temporary storage when used with `provideTemporaryStorage`
|
|
41
|
+
- *subpackage* `@anglr/common/structured-log`
|
|
42
|
+
- new `provideConsoleComponentSink` function, that provides console component as sink for logger
|
|
43
|
+
- new `StructuredLogLogger` type, that sets logger to use structured log logger when used with `provideLogger`
|
|
23
44
|
|
|
24
45
|
### BREAKING CHANGES
|
|
25
46
|
|
|
@@ -32,6 +53,29 @@
|
|
|
32
53
|
- minimal supported version of `tslib` is `2.6.0`
|
|
33
54
|
- dropped support of `NodeJs` lower than `16.14`
|
|
34
55
|
- pipe `LocalizePipe` renamed to `LocalizeSAPipe`
|
|
56
|
+
- `RestSinkConfigService` renamed to `RestSinkOptions`
|
|
57
|
+
- updated `RestSinkService` constructor parameters order
|
|
58
|
+
- updated `DebugDataComponent` component
|
|
59
|
+
- renamed `_debugDataEnabledChangeSubscription` to `debugDataEnabledChangeSubscription`
|
|
60
|
+
- `debugDataEnabledChangeSubscription` is now *nullable*
|
|
61
|
+
- renamed `_debugDataEnabledSvc` to `debugDataEnabledSvc`
|
|
62
|
+
- renamed `changeDetector` to `_changeDetector`
|
|
63
|
+
- renamed `element` to `_element`
|
|
64
|
+
- `enabled` property changed to `protected`
|
|
65
|
+
- now using `signals`
|
|
66
|
+
- updated `TooltipComponent` component
|
|
67
|
+
- renamed `_enterFn` to `enterFn`
|
|
68
|
+
- renamed `_leaveFn` to `leaveFn`
|
|
69
|
+
- renamed `_changeDetector` to `changeDetector`
|
|
70
|
+
- renamed `_element` to `element`
|
|
71
|
+
- `mouseEnter` is now `protected`
|
|
72
|
+
- `mouseLeave` is now `protected`
|
|
73
|
+
- *subpackage* `@anglr/common/numeral`
|
|
74
|
+
- pipe `NumeralPipe` renamed to `NumeralSAPipe`
|
|
75
|
+
- *subpackage* `@anglr/common/structured-log`
|
|
76
|
+
- updated `ConsoleLogModule` module
|
|
77
|
+
- removed `forRoot` method, instead use new `provideConsoleComponentSink` function
|
|
78
|
+
- removed `STRUCTURED_LOG_LOGGER` from public API, instead use new `provideLogger` with `StructuredLogLogger` type
|
|
35
79
|
|
|
36
80
|
## Version 16.0.0 (2023-02-08)
|
|
37
81
|
|
|
@@ -66,7 +66,9 @@ class AppHotkeysService {
|
|
|
66
66
|
appHotkeysService = tmp.hotkeys;
|
|
67
67
|
}
|
|
68
68
|
const oldHotkeys = appHotkeysService._hotkeySvc.mousetrap;
|
|
69
|
-
|
|
69
|
+
if (appHotkeysService._mousetrap) {
|
|
70
|
+
appHotkeysService._hotkeySvc.mousetrap = appHotkeysService._mousetrap;
|
|
71
|
+
}
|
|
70
72
|
scopedInitialization(appHotkeysService);
|
|
71
73
|
appHotkeysService._hotkeySvc.mousetrap = oldHotkeys;
|
|
72
74
|
}
|
|
@@ -100,7 +102,9 @@ class AppHotkeysService {
|
|
|
100
102
|
});
|
|
101
103
|
this._oldHotkeys = [];
|
|
102
104
|
if (this._mousetrap) {
|
|
103
|
-
|
|
105
|
+
if (oldMouseTrap) {
|
|
106
|
+
this._hotkeySvc.mousetrap = oldMouseTrap;
|
|
107
|
+
}
|
|
104
108
|
this._mousetrap.reset();
|
|
105
109
|
this._mousetrap = null;
|
|
106
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appHotkeys.service.js","sourceRoot":"","sources":["../../../../hotkeys/src/services/appHotkeys.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AACzC,OAAO,EAAC,cAAc,EAAS,MAAM,kBAAkB,CAAC;AACxD,OAAO,SAA8B,MAAM,WAAW,CAAC;;;AAEvD;;GAEG;AACH,MACa,iBAAiB;IAgCN;IA9BpB,oEAAoE;IAEpE;;OAEG;IACK,WAAW,GAAa,EAAE,CAAC;IAEnC;;OAEG;IACK,QAAQ,GAAa,EAAE,CAAC;IAEhC;;OAEG;IACK,OAAO,GAAyD,EAAE,CAAC;IAE3E;;OAEG;IACK,UAAU,
|
|
1
|
+
{"version":3,"file":"appHotkeys.service.js","sourceRoot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AAS,CAAC,CAAC;SACpC;QAED,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAC/B,CAAC;uGAvLQ,iBAAiB;2GAAjB,iBAAiB;;SAAjB,iBAAiB;2FAAjB,iBAAiB;kBAD7B,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {HotkeysService, Hotkey} from 'angular2-hotkeys';\nimport Mousetrap, {MousetrapInstance} from 'mousetrap';\n\n/**\n * Application hotkeys service\n */\n@Injectable()\nexport class AppHotkeysService\n{\n //######################### private fields #########################\n\n /**\n * Old hotkeys from parent\n */\n private _oldHotkeys: Hotkey[] = [];\n\n /**\n * Hotkeys for current service\n */\n private _hotkeys: Hotkey[] = [];\n\n /**\n * Array of scoped instances of AppHotkeysService\n */\n private _scoped: {element: HTMLElement; hotkeys: AppHotkeysService}[] = [];\n\n /**\n * Instance of mousetrap that is attached to specific element\n */\n private _mousetrap: MousetrapInstance|null = null;\n\n //######################### public properties #########################\n\n /**\n * Hotkeys service used for handling hotkeys\n */\n public hotkeys: HotkeysService;\n\n //######################### constructor #########################\n constructor(private _hotkeySvc: HotkeysService)\n {\n this.hotkeys = new Proxy(this._hotkeySvc,\n {\n get: (target: HotkeysService, property: string, receiver: any) =>\n {\n if(property == 'add')\n {\n return new Proxy(Reflect.get(target, property, receiver), \n {\n apply: (method: (hotkey: Hotkey | Hotkey[], specificEvent?: string ) => Hotkey | Hotkey[], _thisArg: any, argArray: any) =>\n {\n this._processAddedHotkeys(argArray[0]);\n\n return method.apply(this._hotkeySvc, argArray);\n }\n });\n }\n else\n {\n return Reflect.get(target, property, receiver);\n }\n }\n });\n }\n\n //######################### public methods #########################\n\n /**\n * Creates scoped hotkeys for html element\n * @param element - Html element used as scope base for hotkeys\n * @param scopedInitialization - Method used for initialization scoped hotkeys, hotkeys can be initialized only inside this method\n */\n public withScope(element: HTMLElement, scopedInitialization: (appHotkeysService: AppHotkeysService) => void): void\n {\n const tmp = this._scoped.find(itm => itm.element == element);\n let appHotkeysService: AppHotkeysService;\n\n if(!tmp)\n {\n appHotkeysService = new AppHotkeysService(this._hotkeySvc);\n appHotkeysService._mousetrap = new Mousetrap(element);\n }\n else\n {\n appHotkeysService = tmp.hotkeys;\n }\n\n const oldHotkeys = appHotkeysService._hotkeySvc.mousetrap;\n\n if(appHotkeysService._mousetrap)\n {\n appHotkeysService._hotkeySvc.mousetrap = appHotkeysService._mousetrap;\n }\n\n scopedInitialization(appHotkeysService);\n appHotkeysService._hotkeySvc.mousetrap = oldHotkeys;\n }\n\n /**\n * Called when component is destroyed\n */\n public ngOnDestroy(): void\n {\n this.destroy();\n }\n\n /**\n * This method should be called in ngOnDestroy for each component which registered new hotkeys\n */\n public destroy(): void\n {\n this._scoped.forEach(scoped =>\n {\n scoped.hotkeys.destroy();\n });\n\n this._scoped = [];\n\n let oldMouseTrap;\n\n if(this._mousetrap)\n {\n oldMouseTrap = this._hotkeySvc.mousetrap;\n this._hotkeySvc.mousetrap = this._mousetrap;\n }\n\n //remove all hotkeys registered by this service\n this._hotkeys.forEach(key =>\n {\n this._hotkeySvc.remove(key);\n });\n\n this._hotkeys = [];\n\n //restore old hotkeys from parent component\n this._oldHotkeys.forEach(key =>\n {\n this._hotkeySvc.add(key);\n });\n\n this._oldHotkeys = [];\n\n if(this._mousetrap)\n {\n if(oldMouseTrap)\n {\n this._hotkeySvc.mousetrap = oldMouseTrap;\n }\n \n this._mousetrap.reset();\n this._mousetrap = null;\n }\n }\n\n //######################### private methods #########################\n\n /**\n * Process added hotkeys, stores old ones\n * @param hotkey - Hotkey to be added\n */\n private _processAddedHotkeys(hotkey: Hotkey | Hotkey[]): void\n {\n if(Array.isArray(hotkey)) \n {\n hotkey.forEach(key =>\n {\n this._processAddedHotkeys(key);\n });\n\n return;\n }\n\n const oldHotkeyVal = this._hotkeySvc.get(hotkey.combo);\n\n if(!Array.isArray(oldHotkeyVal))\n {\n console.warn('Unexpected array of hotkeys');\n\n return;\n }\n\n const oldHotkey = oldHotkeyVal[0];\n\n if(oldHotkey)\n {\n this._hotkeySvc.remove(oldHotkey);\n this._oldHotkeys.push(oldHotkey);\n }\n\n this._hotkeys.push(hotkey);\n }\n}"]}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { NgModule } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { NumeralSAPipe } from './../pipes/numeral.pipe';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
5
5
|
* Module for components, pipes and directives that are using numeral library
|
|
6
6
|
*/
|
|
7
7
|
class NumeralModule {
|
|
8
8
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
9
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule,
|
|
9
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule, imports: [NumeralSAPipe], exports: [NumeralSAPipe] });
|
|
10
10
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule });
|
|
11
11
|
}
|
|
12
12
|
export { NumeralModule };
|
|
13
13
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralModule, decorators: [{
|
|
14
14
|
type: NgModule,
|
|
15
15
|
args: [{
|
|
16
|
-
|
|
17
|
-
exports: [
|
|
16
|
+
imports: [NumeralSAPipe],
|
|
17
|
+
exports: [NumeralSAPipe]
|
|
18
18
|
}]
|
|
19
19
|
}] });
|
|
20
20
|
//# sourceMappingURL=numeral.module.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeral.module.js","sourceRoot":"","sources":["../../../../numeral/src/modules/numeral.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,
|
|
1
|
+
{"version":3,"file":"numeral.module.js","sourceRoot":"","sources":["../../../../numeral/src/modules/numeral.module.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,QAAQ,EAAC,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAC,aAAa,EAAC,MAAM,yBAAyB,CAAC;;AAEtD;;GAEG;AACH,MAKa,aAAa;uGAAb,aAAa;wGAAb,aAAa,YAHZ,aAAa,aACb,aAAa;wGAEd,aAAa;;SAAb,aAAa;2FAAb,aAAa;kBALzB,QAAQ;mBACT;oBACI,OAAO,EAAE,CAAC,aAAa,CAAC;oBACxB,OAAO,EAAE,CAAC,aAAa,CAAC;iBAC3B","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {NumeralSAPipe} from './../pipes/numeral.pipe';\n\n/**\n * Module for components, pipes and directives that are using numeral library\n */\n@NgModule(\n{\n imports: [NumeralSAPipe],\n exports: [NumeralSAPipe]\n})\nexport class NumeralModule\n{\n}"]}
|
|
@@ -7,7 +7,7 @@ import * as i1 from "@anglr/common";
|
|
|
7
7
|
/**
|
|
8
8
|
* Pipe to transform numbers to regional formatting using numeraljs.
|
|
9
9
|
*/
|
|
10
|
-
class
|
|
10
|
+
class NumeralSAPipe {
|
|
11
11
|
//######################### private fields #########################
|
|
12
12
|
/**
|
|
13
13
|
* Subscription for globalization changes
|
|
@@ -45,12 +45,12 @@ class NumeralPipe {
|
|
|
45
45
|
this._globalizationChangeSubscription = null;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
49
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type:
|
|
48
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralSAPipe, deps: [{ token: i1.GlobalizationService }], target: i0.ɵɵFactoryTarget.Pipe });
|
|
49
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: NumeralSAPipe, isStandalone: true, name: "numeral" });
|
|
50
50
|
}
|
|
51
|
-
export {
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type:
|
|
51
|
+
export { NumeralSAPipe };
|
|
52
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralSAPipe, decorators: [{
|
|
53
53
|
type: Pipe,
|
|
54
|
-
args: [{ name: 'numeral' }]
|
|
54
|
+
args: [{ name: 'numeral', standalone: true }]
|
|
55
55
|
}], ctorParameters: function () { return [{ type: i1.GlobalizationService }]; } });
|
|
56
56
|
//# sourceMappingURL=numeral.pipe.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numeral.pipe.js","sourceRoot":"","sources":["../../../../numeral/src/pipes/numeral.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAA2B,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,OAAO,MAAM,SAAS,CAAC;;;AAG9B;;GAEG;AACH,MACa,
|
|
1
|
+
{"version":3,"file":"numeral.pipe.js","sourceRoot":"","sources":["../../../../numeral/src/pipes/numeral.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAA2B,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAC,oBAAoB,EAAC,MAAM,eAAe,CAAC;AACnD,OAAO,EAAC,OAAO,EAAC,MAAM,gBAAgB,CAAC;AACvC,OAAO,OAAO,MAAM,SAAS,CAAC;;;AAG9B;;GAEG;AACH,MACa,aAAa;IAEtB,oEAAoE;IAEpE;;OAEG;IACK,gCAAgC,CAAoB;IAE5D,kEAAkE;IAClE,YAAY,gBAAsC;QAE9C,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC;QAExC,IAAI,CAAC,gCAAgC,GAAG,gBAAgB;aACnD,YAAY;aACZ,SAAS,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IAClE,CAAC;IAED,oEAAoE;IAEpE;;;;OAIG;IACI,SAAS,CAAC,KAAa,EAAE,MAAc;QAE1C,IAAG,OAAO,CAAC,KAAK,CAAC,EACjB;YACI,OAAO,EAAE,CAAC;SACb;QAED,IAAG,KAAK,CAAC,KAAK,CAAC,EACf;YACI,KAAK,GAAG,CAAC,CAAC;SACb;QAED,OAAO,OAAO,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACzC,CAAC;IAED,kGAAkG;IAElG;;OAEG;IACI,WAAW;QAEd,IAAG,IAAI,CAAC,gCAAgC,EACxC;YACI,IAAI,CAAC,gCAAgC,CAAC,WAAW,EAAE,CAAC;YACpD,IAAI,CAAC,gCAAgC,GAAG,IAAI,CAAC;SAChD;IACL,CAAC;uGArDQ,aAAa;qGAAb,aAAa;;SAAb,aAAa;2FAAb,aAAa;kBADzB,IAAI;mBAAC,EAAC,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,IAAI,EAAC","sourcesContent":["import {Pipe, PipeTransform, OnDestroy} from '@angular/core';\nimport {GlobalizationService} from '@anglr/common';\nimport {isBlank} from '@jscrpt/common';\nimport numeral from 'numeral';\nimport {Subscription} from 'rxjs';\n\n/**\n * Pipe to transform numbers to regional formatting using numeraljs.\n */\n@Pipe({name: 'numeral', standalone: true})\nexport class NumeralSAPipe implements PipeTransform, OnDestroy\n{\n //######################### private fields #########################\n \n /**\n * Subscription for globalization changes\n */\n private _globalizationChangeSubscription: Subscription|null;\n\n //######################### constructors #########################\n constructor(globalizationSvc: GlobalizationService)\n {\n numeral.locale(globalizationSvc.locale);\n\n this._globalizationChangeSubscription = globalizationSvc\n .localeChange\n .subscribe(() => numeral.locale(globalizationSvc.locale));\n }\n \n //######################### public methods #########################\n \n /**\n * Formats number value as slovak format string\n * @param value - Number to format\n * @param format - Format string (optional) \n */ \n public transform(value: number, format: string): string\n {\n if(isBlank(value))\n {\n return '';\n }\n \n if(isNaN(value))\n {\n value = 0;\n }\n \n return numeral(value).format(format);\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._globalizationChangeSubscription)\n {\n this._globalizationChangeSubscription.unsubscribe();\n this._globalizationChangeSubscription = null;\n }\n }\n}\n\n"]}
|
package/es2022/src/index.js
CHANGED
|
@@ -20,10 +20,12 @@ export * from './pipes';
|
|
|
20
20
|
export * from './types/host';
|
|
21
21
|
export * from './types/styles';
|
|
22
22
|
export * from './types/tokens';
|
|
23
|
+
export * from './types/providers';
|
|
24
|
+
export * from './types/providerDecoratedType';
|
|
23
25
|
export * from './utils';
|
|
24
26
|
export { CookieService } from './services/cookies/cookies.service';
|
|
25
27
|
export { StatusCodeService } from './services/statusCode/statusCode.service';
|
|
26
|
-
export { CookiePermanentStorageService } from './services/permanentStorage';
|
|
28
|
+
export { CookiePermanentStorageService, CookiePermanentStorage } from './services/permanentStorage';
|
|
27
29
|
export { MemoryTemporaryStorageService } from './services/temporaryStorage';
|
|
28
30
|
export { NoStringLocalizationService } from './services/stringLocalization';
|
|
29
31
|
export * from './directives/bodyRender/bodyRender.directive';
|
package/es2022/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,oBAAoB,EAAC,MAAM,gDAAgD,CAAC;AACpF,OAAO,EAAC,mBAAmB,EAAC,MAAM,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AS,CAAC;AACnG,OAAO,EAAC,qBAAqB,EAAE,2BAA2B,EAAE,YAAY,EAAE,oBAAoB,EAAiB,oBAAoB,EAAuF,MAAM,0BAA0B,CAAC;AAC3P,cAAc,qBAAqB,CAAC;AAEpC,sBAAsB;AACtB,0BAA0B","sourcesContent":["export {GlobalizationService} from './services/globalization/globalization.service';\nexport {CommonDynamicModule} from './modules/commonDynamic.module';\nexport {CommonLocalizeModule} from './modules/commonLocalize.module';\nexport {CommonUtilsModule} from './modules/commonUtils.module';\nexport {DebugDataModule} from './modules/debugData/modules/debugData.module';\nexport {DebugDataComponent} from './modules/debugData/components/debugData/debugData.component';\nexport {DebugDataEnabledService} from './modules/debugData/services/debugDataEnabled/debugDataEnabled.service';\nexport {ClickOutsideDirective} from './modules/clickOutside/directives/clickOutside/clickOutside.directive';\nexport {ClickOutsideModule} from './modules/clickOutside/modules/clickOutside.module';\nexport {MultiButtonComponent} from './modules/multiButton/components/multiButton/multiButton.component';\nexport {MultiButtonCssClasses} from './modules/multiButton/components/multiButton/multiButton.interface';\nexport {MULTI_BUTTON_CSS_CLASSES} from './modules/multiButton/misc/tokens';\nexport {MultiButtonModule} from './modules/multiButton/modules/multiButton.module';\nexport * from './decorators';\nexport * from './modules/castPipes';\nexport * from './modules/goBack';\nexport * from './modules/position';\nexport * from './modules/progressIndicator';\nexport * from './modules/tooltip';\nexport * from './pipes';\nexport * from './types/host';\nexport * from './types/styles';\nexport * from './types/tokens';\nexport * from './types/providers';\nexport * from './types/providerDecoratedType';\nexport * from './utils';\nexport {CookieService} from './services/cookies/cookies.service';\nexport {StatusCodeService} from './services/statusCode/statusCode.service';\nexport {CookiePermanentStorageService, PermanentStorage, PermanentStorageType, CookiePermanentStorage} from './services/permanentStorage';\nexport {MemoryTemporaryStorageService, TemporaryStorage, TemporaryStorageType} from './services/temporaryStorage';\nexport {NoStringLocalizationService, StringLocalization, StringLocalizationType} from './services/stringLocalization';\nexport {Logger, LoggerType} from './services/logger';\nexport * from './directives/bodyRender/bodyRender.directive';\nexport {NgComponentOutletEx} from './directives/ngComponentOutletEx/ngComponentOutletEx.directive';\nexport {APP_STABLE, extractAppStableResolve, runWhenModuleStable, runWhenAppStable} from './utils';\nexport {DEFAULT_NOTIFICATIONS, DefaultNotificationsService, Notification, NotificationSeverity, Notifications, NotificationsOptions, NotificationsProvider, NotificationsScopeProvider, NotificationsScopeProviderFactory} from './services/notifications';\nexport * from './services/position';\n\n//TODO: any to unknown\n//TODO: strict null checks"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef } from '@angular/core';
|
|
1
|
+
import { Component, ChangeDetectionStrategy, ChangeDetectorRef, ElementRef, signal } from '@angular/core';
|
|
2
2
|
import { DebugDataEnabledService } from '../../services/debugDataEnabled/debugDataEnabled.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
import * as i1 from "../../services/debugDataEnabled/debugDataEnabled.service";
|
|
@@ -11,38 +11,38 @@ const ENABLED = 'enabled';
|
|
|
11
11
|
* Component used for displaying debug data
|
|
12
12
|
*/
|
|
13
13
|
class DebugDataComponent {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
debugDataEnabledSvc;
|
|
15
|
+
changeDetector;
|
|
16
|
+
element;
|
|
17
17
|
//######################### protected fields #########################
|
|
18
18
|
/**
|
|
19
19
|
* Subscription for changes of debug data enabled
|
|
20
20
|
*/
|
|
21
|
-
|
|
22
|
-
//#########################
|
|
21
|
+
debugDataEnabledChangeSubscription;
|
|
22
|
+
//######################### protected properties - template bindings #########################
|
|
23
23
|
/**
|
|
24
24
|
* Indication whether is debug data enabled
|
|
25
25
|
*
|
|
26
26
|
* @internal
|
|
27
27
|
*/
|
|
28
|
-
enabled = false;
|
|
28
|
+
enabled = signal(false);
|
|
29
29
|
//######################### constructor #########################
|
|
30
|
-
constructor(
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
30
|
+
constructor(debugDataEnabledSvc, changeDetector, element) {
|
|
31
|
+
this.debugDataEnabledSvc = debugDataEnabledSvc;
|
|
32
|
+
this.changeDetector = changeDetector;
|
|
33
|
+
this.element = element;
|
|
34
34
|
}
|
|
35
35
|
//######################### public methods - implementation of OnInit #########################
|
|
36
36
|
/**
|
|
37
37
|
* Initialize component
|
|
38
38
|
*/
|
|
39
39
|
ngOnInit() {
|
|
40
|
-
this.enabled
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
43
|
-
this.enabled
|
|
44
|
-
this.
|
|
45
|
-
this.
|
|
40
|
+
this.enabled.set(this.debugDataEnabledSvc.enabled);
|
|
41
|
+
this.setEnabledCssClass();
|
|
42
|
+
this.debugDataEnabledChangeSubscription = this.debugDataEnabledSvc.enabledChange.subscribe(() => {
|
|
43
|
+
this.enabled.set(this.debugDataEnabledSvc.enabled);
|
|
44
|
+
this.setEnabledCssClass();
|
|
45
|
+
this.changeDetector.detectChanges();
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
//######################### public methods - implementation of OnDestroy #########################
|
|
@@ -50,27 +50,27 @@ class DebugDataComponent {
|
|
|
50
50
|
* Called when component is destroyed
|
|
51
51
|
*/
|
|
52
52
|
ngOnDestroy() {
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
53
|
+
this.debugDataEnabledChangeSubscription?.unsubscribe();
|
|
54
|
+
this.debugDataEnabledChangeSubscription = null;
|
|
55
55
|
}
|
|
56
|
-
//#########################
|
|
56
|
+
//######################### protected methods #########################
|
|
57
57
|
/**
|
|
58
58
|
* Sets enabled css class according enabled state
|
|
59
59
|
*/
|
|
60
|
-
|
|
61
|
-
if (this.enabled) {
|
|
62
|
-
this.
|
|
60
|
+
setEnabledCssClass() {
|
|
61
|
+
if (this.enabled()) {
|
|
62
|
+
this.element.nativeElement.classList.add(ENABLED);
|
|
63
63
|
}
|
|
64
64
|
else {
|
|
65
|
-
this.
|
|
65
|
+
this.element.nativeElement.classList.remove(ENABLED);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DebugDataComponent, deps: [{ token: i1.DebugDataEnabledService }, { token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
69
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DebugDataComponent, selector: "debug-data", ngImport: i0, template: "<ng-template [ngIf]=\"enabled\">\r\n <ng-content></ng-content>\r\n</ng-template>", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
69
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: DebugDataComponent, selector: "debug-data", ngImport: i0, template: "<ng-template [ngIf]=\"enabled()\">\r\n <ng-content></ng-content>\r\n</ng-template>", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"], dependencies: [{ kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
70
70
|
}
|
|
71
71
|
export { DebugDataComponent };
|
|
72
72
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: DebugDataComponent, decorators: [{
|
|
73
73
|
type: Component,
|
|
74
|
-
args: [{ selector: 'debug-data', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngIf]=\"enabled\">\r\n <ng-content></ng-content>\r\n</ng-template>", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"] }]
|
|
74
|
+
args: [{ selector: 'debug-data', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-template [ngIf]=\"enabled()\">\r\n <ng-content></ng-content>\r\n</ng-template>", styles: [":host\r\n{\r\n font-weight: normal;\r\n font-style: italic;\r\n text-shadow: 0 0 1px;\r\n display: none;\r\n}\r\n\r\n:host(.clickable)\r\n{\r\n cursor: pointer;\r\n}\r\n\r\n:host(.enabled)\r\n{\r\n display: block;\r\n}"] }]
|
|
75
75
|
}], ctorParameters: function () { return [{ type: i1.DebugDataEnabledService }, { type: i0.ChangeDetectorRef }, { type: i0.ElementRef }]; } });
|
|
76
76
|
//# sourceMappingURL=debugData.component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugData.component.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/components/debugData/debugData.component.ts","../../../../../../src/modules/debugData/components/debugData/debugData.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAqB,iBAAiB,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"debugData.component.js","sourceRoot":"","sources":["../../../../../../src/modules/debugData/components/debugData/debugData.component.ts","../../../../../../src/modules/debugData/components/debugData/debugData.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAqB,iBAAiB,EAAE,UAAU,EAAE,MAAM,EAAiB,MAAM,eAAe,CAAC;AAG3I,OAAO,EAAC,uBAAuB,EAAC,MAAM,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AI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;SACxD;IACL,CAAC;uGAtEQ,kBAAkB;2FAAlB,kBAAkB,kDCpB/B,uFAEc;;SDkBD,kBAAkB;2FAAlB,kBAAkB;kBAP9B,SAAS;+BAEI,YAAY,mBAGL,uBAAuB,CAAC,MAAM","sourcesContent":["import {Component, ChangeDetectionStrategy, OnDestroy, OnInit, ChangeDetectorRef, ElementRef, signal, WritableSignal} from '@angular/core';\nimport {Subscription} from 'rxjs';\n\nimport {DebugDataEnabledService} from '../../services/debugDataEnabled/debugDataEnabled.service';\n\n/**\n * Name of css class for enabled debug data\n */\nconst ENABLED = 'enabled';\n\n/**\n * Component used for displaying debug data\n */\n@Component(\n{\n selector: 'debug-data',\n templateUrl: 'debugData.component.html',\n styleUrls: ['debugData.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class DebugDataComponent implements OnDestroy, OnInit\n{\n //######################### protected fields #########################\n\n /**\n * Subscription for changes of debug data enabled\n */\n protected debugDataEnabledChangeSubscription: Subscription|undefined|null;\n\n //######################### protected properties - template bindings #########################\n\n /**\n * Indication whether is debug data enabled\n *\n * @internal\n */\n protected enabled: WritableSignal<boolean> = signal(false);\n\n //######################### constructor #########################\n constructor(protected debugDataEnabledSvc: DebugDataEnabledService,\n protected changeDetector: ChangeDetectorRef,\n protected element: ElementRef<HTMLElement>)\n {\n }\n\n //######################### public methods - implementation of OnInit #########################\n\n /**\n * Initialize component\n */\n public ngOnInit(): void\n {\n this.enabled.set(this.debugDataEnabledSvc.enabled);\n this.setEnabledCssClass();\n\n this.debugDataEnabledChangeSubscription = this.debugDataEnabledSvc.enabledChange.subscribe(() =>\n {\n this.enabled.set(this.debugDataEnabledSvc.enabled);\n this.setEnabledCssClass();\n\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 this.debugDataEnabledChangeSubscription?.unsubscribe();\n this.debugDataEnabledChangeSubscription = null;\n }\n\n //######################### protected methods #########################\n\n /**\n * Sets enabled css class according enabled state\n */\n protected setEnabledCssClass(): void\n {\n if(this.enabled())\n {\n this.element.nativeElement.classList.add(ENABLED);\n }\n else\n {\n this.element.nativeElement.classList.remove(ENABLED);\n }\n }\n}","<ng-template [ngIf]=\"enabled()\">\r\n <ng-content></ng-content>\r\n</ng-template>"]}
|
|
@@ -5,17 +5,17 @@ import * as i1 from "@angular/common";
|
|
|
5
5
|
* Component used for displaying tooltip content
|
|
6
6
|
*/
|
|
7
7
|
class TooltipComponent {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
changeDetector;
|
|
9
|
+
element;
|
|
10
10
|
//######################### protected fields #########################
|
|
11
11
|
/**
|
|
12
12
|
* Called when mouse enter tooltip component, hover
|
|
13
13
|
*/
|
|
14
|
-
|
|
14
|
+
enterFn = () => null;
|
|
15
15
|
/**
|
|
16
16
|
* Called when mouse leaves tooltip component
|
|
17
17
|
*/
|
|
18
|
-
|
|
18
|
+
leaveFn = () => null;
|
|
19
19
|
//######################### public properties - implementation of TooltipRenderer #########################
|
|
20
20
|
/**
|
|
21
21
|
* Data that are rendered in tooltip
|
|
@@ -34,9 +34,9 @@ class TooltipComponent {
|
|
|
34
34
|
*/
|
|
35
35
|
cssClass;
|
|
36
36
|
//######################### constructor #########################
|
|
37
|
-
constructor(
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
37
|
+
constructor(changeDetector, element) {
|
|
38
|
+
this.changeDetector = changeDetector;
|
|
39
|
+
this.element = element;
|
|
40
40
|
}
|
|
41
41
|
//######################### public methods - implementation of TooltipRenderer #########################
|
|
42
42
|
/**
|
|
@@ -45,32 +45,32 @@ class TooltipComponent {
|
|
|
45
45
|
* @param leave - Called when mouse leaves tooltip component
|
|
46
46
|
*/
|
|
47
47
|
registerHoverEvents(enter, leave) {
|
|
48
|
-
this.
|
|
49
|
-
this.
|
|
48
|
+
this.enterFn = enter;
|
|
49
|
+
this.leaveFn = leave;
|
|
50
50
|
}
|
|
51
51
|
/**
|
|
52
|
-
*
|
|
52
|
+
* @inheritdoc
|
|
53
53
|
*/
|
|
54
54
|
invalidateVisuals() {
|
|
55
55
|
if (this.cssClass) {
|
|
56
|
-
this.
|
|
56
|
+
this.element.nativeElement.classList.add(this.cssClass);
|
|
57
57
|
}
|
|
58
|
-
this.
|
|
58
|
+
this.changeDetector.detectChanges();
|
|
59
59
|
}
|
|
60
|
-
//#########################
|
|
60
|
+
//######################### protected methods - host #########################
|
|
61
61
|
/**
|
|
62
62
|
* Handles mouse enter event over tooltip
|
|
63
63
|
* @internal
|
|
64
64
|
*/
|
|
65
65
|
mouseEnter() {
|
|
66
|
-
this.
|
|
66
|
+
this.enterFn();
|
|
67
67
|
}
|
|
68
68
|
/**
|
|
69
69
|
* Handles mouse leave event over tooltip
|
|
70
70
|
* @internal
|
|
71
71
|
*/
|
|
72
72
|
mouseLeave() {
|
|
73
|
-
this.
|
|
73
|
+
this.leaveFn();
|
|
74
74
|
}
|
|
75
75
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: TooltipComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
76
76
|
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.1.4", type: TooltipComponent, selector: "tooltip-popup", host: { listeners: { "mouseenter": "mouseEnter()", "mouseleave": "mouseLeave()" } }, ngImport: i0, template: "<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>", styles: [":host\r\n{\r\n display: block;\r\n position: absolute;\r\n padding: 2px 4px;\r\n border-radius: 3px;\r\n font-size: 0.9em;\r\n max-width: 300px;\r\n user-select: text;\r\n}"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.ts","../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAe,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;;;
|
|
1
|
+
{"version":3,"file":"tooltip.component.js","sourceRoot":"","sources":["../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.ts","../../../../../../src/modules/tooltip/components/tooltip/tooltip.component.html"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAE,uBAAuB,EAAe,iBAAiB,EAAE,UAAU,EAAE,YAAY,EAAC,MAAM,eAAe,CAAC;;;AAM3H;;GAEG;AACH,MAOa,gBAAgB;IAqCH;IACA;IApCtB,sEAAsE;IAEtE;;OAEG;IACO,OAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;IAE3C;;OAEG;IACO,OAAO,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;IAE3C,2GAA2G;IAE3G;;OAEG;IACI,IAAI,CAAuB;IAElC;;OAEG;IACI,QAAQ,CAA4D;IAE3E;;OAEG;IACI,SAAS,GAAY,KAAK,CAAC;IAElC;;OAEG;IACI,QAAQ,CAAwB;IAEvC,iEAAiE;IACjE,YAAsB,cAAiC,EACjC,OAAgC;QADhC,mBAAc,GAAd,cAAc,CAAmB;QACjC,YAAO,GAAP,OAAO,CAAyB;IAEtD,CAAC;IAED,wGAAwG;IAExG;;;;OAIG;IACI,mBAAmB,CAAC,KAAiB,EAAE,KAAiB;QAE3D,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;QACrB,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;IACzB,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAG,IAAI,CAAC,QAAQ,EAChB;YACI,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC3D;QAED,IAAI,CAAC,cAAc,CAAC,aAAa,EAAE,CAAC;IACxC,CAAC;IAED,8EAA8E;IAE9E;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;IAED;;;OAGG;IAEO,UAAU;QAEhB,IAAI,CAAC,OAAO,EAAE,CAAC;IACnB,CAAC;uGAxFQ,gBAAgB;2FAAhB,gBAAgB,0IChB7B,uRAKc;;SDWD,gBAAgB;2FAAhB,gBAAgB;kBAP5B,SAAS;+BAEI,eAAe,mBAGR,uBAAuB,CAAC,MAAM;iIA6ErC,UAAU;sBADnB,YAAY;uBAAC,YAAY;gBAWhB,UAAU;sBADnB,YAAY;uBAAC,YAAY","sourcesContent":["import {Component, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, ElementRef, HostListener} from '@angular/core';\nimport {Invalidatable} from '@jscrpt/common';\n\nimport {TooltipTemplateContext} from '../../directives';\nimport {TooltipRenderer} from '../../misc/tooltip.interface';\n\n/**\n * Component used for displaying tooltip content\n */\n@Component(\n{\n selector: 'tooltip-popup',\n templateUrl: 'tooltip.component.html',\n styleUrls: ['tooltip.component.css'],\n changeDetection: ChangeDetectionStrategy.OnPush\n})\nexport class TooltipComponent<TData = any> implements TooltipRenderer<TData>, Invalidatable\n{\n //######################### protected fields #########################\n\n /**\n * Called when mouse enter tooltip component, hover\n */\n protected enterFn: () => void = () => null;\n\n /**\n * Called when mouse leaves tooltip component\n */\n protected leaveFn: () => void = () => null;\n\n //######################### public properties - implementation of TooltipRenderer #########################\n\n /**\n * Data that are rendered in tooltip\n */\n public data: TData|null|undefined;\n\n /**\n * Template used for rendering tooltip\n */\n public template: TemplateRef<TooltipTemplateContext<TData>>|null|undefined;\n\n /**\n * Indication whether are html tags allowed in tooltip text\n */\n public allowHtml: boolean = false;\n\n /**\n * Css class that is applied to tooltip renderer component\n */\n public cssClass: string|null|undefined;\n\n //######################### constructor #########################\n constructor(protected changeDetector: ChangeDetectorRef,\n protected element: ElementRef<HTMLElement>)\n {\n }\n\n //######################### public methods - implementation of TooltipRenderer #########################\n\n /**\n * Registers handlers that allows reaction to entering or leaving tooltip\n * @param enter - Called when mouse enter tooltip component, hover\n * @param leave - Called when mouse leaves tooltip component\n */\n public registerHoverEvents(enter: () => void, leave: () => void): void\n {\n this.enterFn = enter;\n this.leaveFn = leave;\n }\n\n /**\n * @inheritdoc\n */\n public invalidateVisuals(): void\n {\n if(this.cssClass)\n {\n this.element.nativeElement.classList.add(this.cssClass);\n }\n\n this.changeDetector.detectChanges();\n }\n\n //######################### protected methods - host #########################\n\n /**\n * Handles mouse enter event over tooltip\n * @internal\n */\n @HostListener('mouseenter')\n protected mouseEnter(): void\n {\n this.enterFn();\n }\n\n /**\n * Handles mouse leave event over tooltip\n * @internal\n */\n @HostListener('mouseleave')\n protected mouseLeave(): void\n {\n this.leaveFn();\n }\n}","<div *ngIf=\"!template && !allowHtml\">{{data}}</div>\r\n<div *ngIf=\"!template && allowHtml\" [innerHTML]=\"data\"></div>\r\n\r\n<ng-template [ngIf]=\"template\">\r\n <ng-container *ngTemplateOutlet=\"template; context: {$implicit: data}\"></ng-container>\r\n</ng-template>"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"logger.interface.js","sourceRoot":"","sources":["../../../../src/services/logger/logger.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Interface for general logger\n */\nexport interface Logger\n{\n //######################### public methods #########################\n\n /**\n * Logs an event with the LogEventLevel.fatal severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n fatal(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.fatal severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n fatal(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.error severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n error(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.error severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n error(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.warning severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n warn(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.warning severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n warn(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.information severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n info(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.information severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n info(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.debug severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n debug(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.debug severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n debug(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.verbose severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n verbose(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.verbose severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n verbose(error: Error, messageTemplate: string, ...properties: any[]): void;\n}"]}
|
|
1
|
+
{"version":3,"file":"logger.interface.js","sourceRoot":"","sources":["../../../../src/services/logger/logger.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\n\n/**\n * Interface for general logger\n */\nexport interface Logger\n{\n //######################### public methods #########################\n\n /**\n * Logs an event with the LogEventLevel.fatal severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n fatal(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.fatal severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n fatal(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.error severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n error(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.error severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n error(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.warning severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n warn(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.warning severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n warn(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.information severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n info(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.information severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n info(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.debug severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n debug(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.debug severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n debug(error: Error, messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.verbose severity.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n verbose(messageTemplate: string, ...properties: any[]): void;\n\n /**\n * Logs an event with the LogEventLevel.verbose severity.\n * @param error - Error for the log event.\n * @param messageTemplate - Message template for the log event.\n * @param properties - Properties that can be used to render the message template.\n */\n verbose(error: Error, messageTemplate: string, ...properties: any[]): void;\n}\n\n/**\n * Used for restriction of logger provider type only for type decorated with logger provider\n */\nexport interface LoggerType extends Type<unknown>\n{\n}"]}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
1
2
|
import { Injectable } from '@angular/core';
|
|
2
3
|
import { CookieService } from '../cookies/cookies.service';
|
|
4
|
+
import { PERMANENT_STORAGE } from '../../types/tokens';
|
|
5
|
+
import { TypeProvider } from '../../types/providerDecoratedType';
|
|
3
6
|
import * as i0 from "@angular/core";
|
|
4
7
|
import * as i1 from "../cookies/cookies.service";
|
|
5
8
|
/**
|
|
@@ -42,4 +45,23 @@ export { CookiePermanentStorageService };
|
|
|
42
45
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: CookiePermanentStorageService, decorators: [{
|
|
43
46
|
type: Injectable
|
|
44
47
|
}], ctorParameters: function () { return [{ type: i1.CookieService }]; } });
|
|
48
|
+
/**
|
|
49
|
+
* Provider for permanent storage that is using cookie storage implementation
|
|
50
|
+
*/
|
|
51
|
+
const COOKIE_PERMANENT_STORAGE = {
|
|
52
|
+
provide: PERMANENT_STORAGE,
|
|
53
|
+
useClass: CookiePermanentStorageService
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Type that contains provider for cookie permanent storage when used with `providePermanentStorage`
|
|
57
|
+
*/
|
|
58
|
+
let CookiePermanentStorageType = class CookiePermanentStorageType {
|
|
59
|
+
};
|
|
60
|
+
CookiePermanentStorageType = __decorate([
|
|
61
|
+
TypeProvider(COOKIE_PERMANENT_STORAGE)
|
|
62
|
+
], CookiePermanentStorageType);
|
|
63
|
+
/**
|
|
64
|
+
* Sets permanent storage to use cookie permanent storage when used with `providePermanentStorage`
|
|
65
|
+
*/
|
|
66
|
+
export const CookiePermanentStorage = CookiePermanentStorageType;
|
|
45
67
|
//# sourceMappingURL=cookiePermanentStorage.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cookiePermanentStorage.service.js","sourceRoot":"","sources":["../../../../src/services/permanentStorage/cookiePermanentStorage.service.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"cookiePermanentStorage.service.js","sourceRoot":"","sources":["../../../../src/services/permanentStorage/cookiePermanentStorage.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAW,MAAM,eAAe,CAAC;AAGlE,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;AACzD,OAAO,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAC,YAAY,EAAC,MAAM,mCAAmC,CAAC;;;AAE/D;;GAEG;AACH,MACa,6BAA6B;IAGlB;IADpB,iEAAiE;IACjE,YAAoB,QAAuB;QAAvB,aAAQ,GAAR,QAAQ,CAAe;IAE3C,CAAC;IAED,2GAA2G;IAE3G;;;OAGG;IACI,GAAG,CAAU,IAAY;QAE5B,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAiBD;;;;;OAKG;IACI,GAAG,CAAC,IAAY,EAAE,KAAU,EAAE,OAAc;QAE/C,IAAI,CAAC,QAAQ,CAAC,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAClF,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,IAAY;QAEtB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC;IAC1C,CAAC;uGAnDQ,6BAA6B;2GAA7B,6BAA6B;;SAA7B,6BAA6B;2FAA7B,6BAA6B;kBADzC,UAAU;;AAwDX;;GAEG;AACH,MAAM,wBAAwB,GAE9B;IACI,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,6BAA6B;CAC1C,CAAC;AAEF;;GAEG;AAEH,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;CAE/B,CAAA;AAFK,0BAA0B;IAD/B,YAAY,CAAC,wBAAwB,CAAC;GACjC,0BAA0B,CAE/B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAyB,0BAA0B,CAAC","sourcesContent":["import {ClassProvider, Injectable, Provider} from '@angular/core';\n\nimport {PermanentStorage, PermanentStorageType} from './permanentStorage.interface';\nimport {CookieService} from '../cookies/cookies.service';\nimport {PERMANENT_STORAGE} from '../../types/tokens';\nimport {TypeProvider} from '../../types/providerDecoratedType';\n\n/**\n * Implementation of permanent storage using cookies\n */\n@Injectable()\nexport class CookiePermanentStorageService implements PermanentStorage\n{\n //######################### constructor #########################\n constructor(private _cookies: CookieService)\n {\n }\n\n //######################### public methods - implementation of StringLocalization #########################\n\n /**\n * Gets value that was stored with 'name' from permanent storage\n * @param name - Name with which was value stored\n */\n public get<TResult>(name: string): TResult\n {\n return this._cookies.getCookie(name);\n }\n\n /**\n * Sets value that will be stored with 'name'e in permanent storage\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n */\n public set(name: string, value: any): void;\n\n /**\n * Sets value that will be stored with 'name' in permanent storage until expiration date\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n * @param expires - Time when value should expire\n */\n public set(name: string, value: any, expires: Date): void;\n\n /**\n * Sets value that will be stored with 'name' in permanent storage until expiration date\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n * @param expires - Time when value should expire\n */\n public set(name: string, value: any, expires?: Date): void\n {\n this._cookies.setCookie(name, value, expires ? expires.valueOf() : null, '/');\n }\n\n /**\n * Removes value stored with 'name' from permanent storage\n * @param name - Name of stored value that will be removed\n */\n public remove(name: string): void\n {\n this._cookies.deleteCookie(name, '/');\n }\n}\n\n\n/**\n * Provider for permanent storage that is using cookie storage implementation\n */\nconst COOKIE_PERMANENT_STORAGE: Provider =\n<ClassProvider>\n{\n provide: PERMANENT_STORAGE,\n useClass: CookiePermanentStorageService\n};\n\n/**\n * Type that contains provider for cookie permanent storage when used with `providePermanentStorage`\n */\n@TypeProvider(COOKIE_PERMANENT_STORAGE)\nclass CookiePermanentStorageType\n{\n}\n\n/**\n * Sets permanent storage to use cookie permanent storage when used with `providePermanentStorage`\n */\nexport const CookiePermanentStorage: PermanentStorageType = CookiePermanentStorageType;"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permanentStorage.interface.js","sourceRoot":"","sources":["../../../../src/services/permanentStorage/permanentStorage.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Provides api for implementing permanent storage\n */\nexport interface PermanentStorage\n{\n /**\n * Gets value that was stored with 'name' from permanent storage\n * @param name - Name with which was value stored\n */\n get<TResult>(name: string): TResult;\n\n /**\n * Sets value that will be stored with 'name'e in permanent storage\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n */\n set(name: string, value: any): void;\n\n /**\n * Sets value that will be stored with 'name' in permanent storage until expiration date\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n * @param expires - Time when value should expire\n */\n set(name: string, value: any, expires: Date): void;\n\n /**\n * Removes value stored with 'name' from permanent storage\n * @param name - Name of stored value that will be removed\n */\n remove(name: string): void;\n}"]}
|
|
1
|
+
{"version":3,"file":"permanentStorage.interface.js","sourceRoot":"","sources":["../../../../src/services/permanentStorage/permanentStorage.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\n\n/**\n * Provides api for implementing permanent storage\n */\nexport interface PermanentStorage\n{\n /**\n * Gets value that was stored with 'name' from permanent storage\n * @param name - Name with which was value stored\n */\n get<TResult>(name: string): TResult;\n\n /**\n * Sets value that will be stored with 'name'e in permanent storage\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n */\n set(name: string, value: any): void;\n\n /**\n * Sets value that will be stored with 'name' in permanent storage until expiration date\n * @param name - Name with which will be value stored\n * @param value - Value to be stored\n * @param expires - Time when value should expire\n */\n set(name: string, value: any, expires: Date): void;\n\n /**\n * Removes value stored with 'name' from permanent storage\n * @param name - Name of stored value that will be removed\n */\n remove(name: string): void;\n}\n\n/**\n * Used for restriction of permanent storage provider type only for type decorated with permanent storage provider\n */\nexport interface PermanentStorageType extends Type<unknown>\n{\n}"]}
|