@anglr/common 17.0.0-beta.20230711095959 → 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.
Files changed (77) hide show
  1. package/changelog.md +36 -2
  2. package/es2022/numeral/src/modules/numeral.module.js +4 -4
  3. package/es2022/numeral/src/modules/numeral.module.js.map +1 -1
  4. package/es2022/numeral/src/pipes/numeral.pipe.js +6 -6
  5. package/es2022/numeral/src/pipes/numeral.pipe.js.map +1 -1
  6. package/es2022/src/index.js +3 -1
  7. package/es2022/src/index.js.map +1 -1
  8. package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js +15 -15
  9. package/es2022/src/modules/tooltip/components/tooltip/tooltip.component.js.map +1 -1
  10. package/es2022/src/services/logger/logger.interface.js.map +1 -1
  11. package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js +22 -0
  12. package/es2022/src/services/permanentStorage/cookiePermanentStorage.service.js.map +1 -1
  13. package/es2022/src/services/permanentStorage/permanentStorage.interface.js.map +1 -1
  14. package/es2022/src/services/position/position.interface.js.map +1 -1
  15. package/es2022/src/services/stringLocalization/stringLocalization.interface.js.map +1 -1
  16. package/es2022/src/services/temporaryStorage/temporaryStorage.interface.js.map +1 -1
  17. package/es2022/src/types/providerDecoratedType.js +32 -0
  18. package/es2022/src/types/providerDecoratedType.js.map +1 -0
  19. package/es2022/src/types/providers.js +48 -0
  20. package/es2022/src/types/providers.js.map +1 -0
  21. package/es2022/store/src/index.js +1 -1
  22. package/es2022/store/src/index.js.map +1 -1
  23. package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js +21 -1
  24. package/es2022/store/src/services/permanentStorage/localPermanentStorage.service.js.map +1 -1
  25. package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js +21 -0
  26. package/es2022/store/src/services/temporaryStorage/sessionTemporaryStorage.service.js.map +1 -1
  27. package/es2022/structured-log/src/index.js +1 -0
  28. package/es2022/structured-log/src/index.js.map +1 -1
  29. package/es2022/structured-log/src/misc/providers.js +12 -0
  30. package/es2022/structured-log/src/misc/providers.js.map +1 -0
  31. package/es2022/structured-log/src/modules/consoleLog.module.js +0 -15
  32. package/es2022/structured-log/src/modules/consoleLog.module.js.map +1 -1
  33. package/es2022/structured-log/src/services/logger.service.js +21 -0
  34. package/es2022/structured-log/src/services/logger.service.js.map +1 -1
  35. package/es2022/structured-log/src/types/tokens.js +0 -9
  36. package/es2022/structured-log/src/types/tokens.js.map +1 -1
  37. package/numeral/src/modules/numeral.module.d.ts +1 -1
  38. package/numeral/src/pipes/numeral.pipe.d.ts +3 -3
  39. package/numeral/src/pipes/numeral.pipe.d.ts.map +1 -1
  40. package/package.json +1 -1
  41. package/src/index.d.ts +6 -4
  42. package/src/index.d.ts.map +1 -1
  43. package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts +10 -9
  44. package/src/modules/tooltip/components/tooltip/tooltip.component.d.ts.map +1 -1
  45. package/src/services/logger/logger.interface.d.ts +6 -0
  46. package/src/services/logger/logger.interface.d.ts.map +1 -1
  47. package/src/services/permanentStorage/cookiePermanentStorage.service.d.ts +5 -1
  48. package/src/services/permanentStorage/cookiePermanentStorage.service.d.ts.map +1 -1
  49. package/src/services/permanentStorage/permanentStorage.interface.d.ts +6 -0
  50. package/src/services/permanentStorage/permanentStorage.interface.d.ts.map +1 -1
  51. package/src/services/position/position.interface.d.ts +6 -0
  52. package/src/services/position/position.interface.d.ts.map +1 -1
  53. package/src/services/stringLocalization/stringLocalization.interface.d.ts +6 -0
  54. package/src/services/stringLocalization/stringLocalization.interface.d.ts.map +1 -1
  55. package/src/services/temporaryStorage/temporaryStorage.interface.d.ts +6 -0
  56. package/src/services/temporaryStorage/temporaryStorage.interface.d.ts.map +1 -1
  57. package/src/types/providerDecoratedType.d.ts +12 -0
  58. package/src/types/providerDecoratedType.d.ts.map +1 -0
  59. package/src/types/providers.d.ts +32 -0
  60. package/src/types/providers.d.ts.map +1 -0
  61. package/store/src/index.d.ts +1 -1
  62. package/store/src/index.d.ts.map +1 -1
  63. package/store/src/services/permanentStorage/localPermanentStorage.service.d.ts +5 -1
  64. package/store/src/services/permanentStorage/localPermanentStorage.service.d.ts.map +1 -1
  65. package/store/src/services/temporaryStorage/sessionTemporaryStorage.service.d.ts +5 -1
  66. package/store/src/services/temporaryStorage/sessionTemporaryStorage.service.d.ts.map +1 -1
  67. package/structured-log/src/index.d.ts +1 -0
  68. package/structured-log/src/index.d.ts.map +1 -1
  69. package/structured-log/src/misc/providers.d.ts +6 -0
  70. package/structured-log/src/misc/providers.d.ts.map +1 -0
  71. package/structured-log/src/modules/consoleLog.module.d.ts +0 -5
  72. package/structured-log/src/modules/consoleLog.module.d.ts.map +1 -1
  73. package/structured-log/src/services/logger.service.d.ts +5 -1
  74. package/structured-log/src/services/logger.service.d.ts.map +1 -1
  75. package/structured-log/src/types/tokens.d.ts +0 -4
  76. package/structured-log/src/types/tokens.d.ts.map +1 -1
  77. package/version.bak +1 -1
package/changelog.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Changelog
2
2
 
3
- ## Version 17.0.0 (2023-07-11)
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
 
@@ -34,7 +55,7 @@
34
55
  - pipe `LocalizePipe` renamed to `LocalizeSAPipe`
35
56
  - `RestSinkConfigService` renamed to `RestSinkOptions`
36
57
  - updated `RestSinkService` constructor parameters order
37
- - updated `DebugDataComponent`
58
+ - updated `DebugDataComponent` component
38
59
  - renamed `_debugDataEnabledChangeSubscription` to `debugDataEnabledChangeSubscription`
39
60
  - `debugDataEnabledChangeSubscription` is now *nullable*
40
61
  - renamed `_debugDataEnabledSvc` to `debugDataEnabledSvc`
@@ -42,6 +63,19 @@
42
63
  - renamed `element` to `_element`
43
64
  - `enabled` property changed to `protected`
44
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
45
79
 
46
80
  ## Version 16.0.0 (2023-02-08)
47
81
 
@@ -1,20 +1,20 @@
1
1
  import { NgModule } from '@angular/core';
2
- import { NumeralPipe } from './../pipes/numeral.pipe';
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, declarations: [NumeralPipe], exports: [NumeralPipe] });
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
- declarations: [NumeralPipe],
17
- exports: [NumeralPipe]
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,WAAW,EAAC,MAAM,yBAAyB,CAAC;;AAEpD;;GAEG;AACH,MAKa,aAAa;uGAAb,aAAa;wGAAb,aAAa,iBAHP,WAAW,aAChB,WAAW;wGAEZ,aAAa;;SAAb,aAAa;2FAAb,aAAa;kBALzB,QAAQ;mBACT;oBACI,YAAY,EAAE,CAAC,WAAW,CAAC;oBAC3B,OAAO,EAAE,CAAC,WAAW,CAAC;iBACzB","sourcesContent":["import {NgModule} from '@angular/core';\n\nimport {NumeralPipe} from './../pipes/numeral.pipe';\n\n/**\n * Module for components, pipes and directives that are using numeral library\n */\n@NgModule(\n{\n declarations: [NumeralPipe],\n exports: [NumeralPipe]\n})\nexport class NumeralModule\n{\n}"]}
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 NumeralPipe {
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: NumeralPipe, deps: [{ token: i1.GlobalizationService }], target: i0.ɵɵFactoryTarget.Pipe });
49
- static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "16.1.4", ngImport: i0, type: NumeralPipe, name: "numeral" });
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 { NumeralPipe };
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: NumeralPipe, decorators: [{
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,WAAW;IAEpB,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,WAAW;qGAAX,WAAW;;SAAX,WAAW;2FAAX,WAAW;kBADvB,IAAI;mBAAC,EAAC,IAAI,EAAE,SAAS,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'})\nexport class NumeralPipe 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"]}
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"]}
@@ -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';
@@ -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,gCAAgC,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAC,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAC,kBAAkB,EAAC,MAAM,8DAA8D,CAAC;AAChG,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,qBAAqB,EAAC,MAAM,uEAAuE,CAAC;AAC5G,OAAO,EAAC,kBAAkB,EAAC,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAC,oBAAoB,EAAC,MAAM,oEAAoE,CAAC;AAExG,OAAO,EAAC,wBAAwB,EAAC,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,kDAAkD,CAAC;AACnF,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAAmB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAC,6BAA6B,EAAmB,MAAM,6BAA6B,CAAC;AAC5F,OAAO,EAAC,2BAA2B,EAAqB,MAAM,+BAA+B,CAAC;AAE9F,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,SAAS,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 './utils';\nexport {CookieService} from './services/cookies/cookies.service';\nexport {StatusCodeService} from './services/statusCode/statusCode.service';\nexport {CookiePermanentStorageService, PermanentStorage} from './services/permanentStorage';\nexport {MemoryTemporaryStorageService, TemporaryStorage} from './services/temporaryStorage';\nexport {NoStringLocalizationService, StringLocalization} from './services/stringLocalization';\nexport {Logger} 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
+ {"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,gCAAgC,CAAC;AACnE,OAAO,EAAC,oBAAoB,EAAC,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAC,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAC,eAAe,EAAC,MAAM,8CAA8C,CAAC;AAC7E,OAAO,EAAC,kBAAkB,EAAC,MAAM,8DAA8D,CAAC;AAChG,OAAO,EAAC,uBAAuB,EAAC,MAAM,wEAAwE,CAAC;AAC/G,OAAO,EAAC,qBAAqB,EAAC,MAAM,uEAAuE,CAAC;AAC5G,OAAO,EAAC,kBAAkB,EAAC,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAC,oBAAoB,EAAC,MAAM,oEAAoE,CAAC;AAExG,OAAO,EAAC,wBAAwB,EAAC,MAAM,mCAAmC,CAAC;AAC3E,OAAO,EAAC,iBAAiB,EAAC,MAAM,kDAAkD,CAAC;AACnF,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,mBAAmB,CAAC;AAClC,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,mBAAmB,CAAC;AAClC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,SAAS,CAAC;AACxB,OAAO,EAAC,aAAa,EAAC,MAAM,oCAAoC,CAAC;AACjE,OAAO,EAAC,iBAAiB,EAAC,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAC,6BAA6B,EAA0C,sBAAsB,EAAC,MAAM,6BAA6B,CAAC;AAC1I,OAAO,EAAC,6BAA6B,EAAyC,MAAM,6BAA6B,CAAC;AAClH,OAAO,EAAC,2BAA2B,EAA6C,MAAM,+BAA+B,CAAC;AAEtH,cAAc,8CAA8C,CAAC;AAC7D,OAAO,EAAC,mBAAmB,EAAC,MAAM,gEAAgE,CAAC;AACnG,OAAO,EAAC,UAAU,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,gBAAgB,EAAC,MAAM,SAAS,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"]}
@@ -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
- _changeDetector;
9
- _element;
8
+ changeDetector;
9
+ element;
10
10
  //######################### protected fields #########################
11
11
  /**
12
12
  * Called when mouse enter tooltip component, hover
13
13
  */
14
- _enterFn = () => null;
14
+ enterFn = () => null;
15
15
  /**
16
16
  * Called when mouse leaves tooltip component
17
17
  */
18
- _leaveFn = () => null;
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(_changeDetector, _element) {
38
- this._changeDetector = _changeDetector;
39
- this._element = _element;
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._enterFn = enter;
49
- this._leaveFn = leave;
48
+ this.enterFn = enter;
49
+ this.leaveFn = leave;
50
50
  }
51
51
  /**
52
- * Explicitly runs invalidation of content (change detection)
52
+ * @inheritdoc
53
53
  */
54
54
  invalidateVisuals() {
55
55
  if (this.cssClass) {
56
- this._element.nativeElement.classList.add(this.cssClass);
56
+ this.element.nativeElement.classList.add(this.cssClass);
57
57
  }
58
- this._changeDetector.detectChanges();
58
+ this.changeDetector.detectChanges();
59
59
  }
60
- //######################### public methods - host #########################
60
+ //######################### protected methods - host #########################
61
61
  /**
62
62
  * Handles mouse enter event over tooltip
63
63
  * @internal
64
64
  */
65
65
  mouseEnter() {
66
- this._enterFn();
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._leaveFn();
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;;;AAK3H;;GAEG;AACH,MAOa,gBAAgB;IAqCH;IACA;IApCtB,sEAAsE;IAEtE;;OAEG;IACO,QAAQ,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;IAE5C;;OAEG;IACO,QAAQ,GAAe,GAAG,EAAE,CAAC,IAAI,CAAC;IAE5C,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,eAAkC,EAClC,QAAiC;QADjC,oBAAe,GAAf,eAAe,CAAmB;QAClC,aAAQ,GAAR,QAAQ,CAAyB;IAEvD,CAAC;IAED,wGAAwG;IAExG;;;;OAIG;IACI,mBAAmB,CAAC,KAAiB,EAAE,KAAiB;QAE3D,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;QACtB,IAAI,CAAC,QAAQ,GAAG,KAAK,CAAC;IAC1B,CAAC;IAED;;OAEG;IACI,iBAAiB;QAEpB,IAAG,IAAI,CAAC,QAAQ,EAChB;YACI,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAC5D;QAED,IAAI,CAAC,eAAe,CAAC,aAAa,EAAE,CAAC;IACzC,CAAC;IAED,2EAA2E;IAE3E;;;OAGG;IAEI,UAAU;QAEb,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;IAED;;;OAGG;IAEI,UAAU;QAEb,IAAI,CAAC,QAAQ,EAAE,CAAC;IACpB,CAAC;uGAxFQ,gBAAgB;2FAAhB,gBAAgB,0ICf7B,uRAKc;;SDUD,gBAAgB;2FAAhB,gBAAgB;kBAP5B,SAAS;+BAEI,eAAe,mBAGR,uBAAuB,CAAC,MAAM;iIA6ExC,UAAU;sBADhB,YAAY;uBAAC,YAAY;gBAWnB,UAAU;sBADhB,YAAY;uBAAC,YAAY","sourcesContent":["import {Component, ChangeDetectionStrategy, TemplateRef, ChangeDetectorRef, ElementRef, HostListener} from '@angular/core';\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>\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 * Explicitly runs invalidation of content (change detection)\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 //######################### public methods - host #########################\n\n /**\n * Handles mouse enter event over tooltip\n * @internal\n */\n @HostListener('mouseenter')\n public mouseEnter(): void\n {\n this._enterFn();\n }\n\n /**\n * Handles mouse leave event over tooltip\n * @internal\n */\n @HostListener('mouseleave')\n public 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
+ {"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,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAC,aAAa,EAAC,MAAM,4BAA4B,CAAC;;;AAEzD;;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","sourcesContent":["import {Injectable} from '@angular/core';\n\nimport {PermanentStorage} from './permanentStorage.interface';\nimport {CookieService} from '../cookies/cookies.service';\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}"]}
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}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"position.interface.js","sourceRoot":"","sources":["../../../../src/services/position/position.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Func1} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {PositionOffsetString, PositionPlacement} from './position.types';\n\n/**\n * Options for autoupdate specific functionality\n */\nexport interface AutoUpdateOptions\n{\n /**\n * Indication whether update position when ancestor scroll changes\n */\n ancestorScroll: boolean;\n\n /**\n * Indication whether update position when ancestor size changes\n */\n ancestorResize: boolean;\n\n /**\n * Indication whether update position when target element changes size\n */\n elementResize: boolean;\n}\n\n/**\n * Defines object which describes offsets for positioned element\n */\nexport interface PositionOffsets\n{\n /**\n * Distance between positioned and reference element.\n */\n mainAxis?: number;\n\n /**\n * Skidding between floating and reference element.\n */\n crossAxis?: number;\n\n /**\n * Works on the same axis as crossAxis but applies only to aligned placements and works logically. The offset is inverted for -end alignments.\n */\n alignmentAxis?: number|null;\n}\n\n/**\n * Stores positioned element and reference element\n */\nexport interface PositionElements<TElement extends Element = Element>\n{\n /**\n * Reference element against which is object positioned\n */\n reference: TElement;\n\n /**\n * Element that is positioned\n */\n floating: TElement;\n}\n\n/**\n * Arguments that are passed during positioning\n */\nexport interface PositionArguments<TElement extends Element = Element>\n{\n /**\n * X coordinate of positioned element\n */\n x: number;\n\n /**\n * Y coordinate of positioned element\n */\n y: number;\n\n /**\n * Elements that are being used during positioning\n */\n elements: PositionElements<TElement>;\n}\n\n/**\n * Options that are passed to position service\n */\nexport interface PositionOptions\n{\n //######################### properties #########################\n\n /**\n * Placement of target element against source element\n */\n placement: PositionPlacement;\n\n /**\n * Offset which allows moving target element along the cross axis of placement, or any chosed direction\n */\n offset: PositionOffsetString|number|PositionOffsets|Func1<number|PositionOffsets, PositionArguments>;\n\n /**\n * Indication whether perform flip in case of collision (with view boundaries)\n */\n flip: boolean;\n\n /**\n * Indication whether set up 'auto updating' of position\n */\n autoUpdate: boolean|AutoUpdateOptions;\n\n /**\n * Mouse event that occured when positioning was called\n */\n mouseEvent?: MouseEvent;\n}\n\n/**\n * Result of positioning process, storing new coordinates\n */\nexport interface PositionResult<TElement extends Element = any>\n{\n /**\n * Target element to be positioned\n */\n target: TElement;\n\n /**\n * X coordinate of position of target\n */\n x: number;\n\n /**\n * Y coordinate of position of target\n */\n y: number;\n\n /**\n * Indication whether there was flip applied\n */\n flip: boolean;\n\n /**\n * Disposes instance of engine used for positioning\n */\n dispose(): void;\n}\n\n/**\n * Service that is used for positioning two elements against each other\n */\nexport interface Position\n{\n //######################### methods #########################\n\n /**\n * Places target element relatively to source element according options and returns result storing information about new position\n * @param target - Target element to be placed\n * @param source - Source element to be placed against\n * @param options - Optional options with informations about new position\n */\n placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Observable<PositionResult>;\n}\n"]}
1
+ {"version":3,"file":"position.interface.js","sourceRoot":"","sources":["../../../../src/services/position/position.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {Func1} from '@jscrpt/common';\nimport {Observable} from 'rxjs';\n\nimport {PositionOffsetString, PositionPlacement} from './position.types';\n\n/**\n * Options for autoupdate specific functionality\n */\nexport interface AutoUpdateOptions\n{\n /**\n * Indication whether update position when ancestor scroll changes\n */\n ancestorScroll: boolean;\n\n /**\n * Indication whether update position when ancestor size changes\n */\n ancestorResize: boolean;\n\n /**\n * Indication whether update position when target element changes size\n */\n elementResize: boolean;\n}\n\n/**\n * Defines object which describes offsets for positioned element\n */\nexport interface PositionOffsets\n{\n /**\n * Distance between positioned and reference element.\n */\n mainAxis?: number;\n\n /**\n * Skidding between floating and reference element.\n */\n crossAxis?: number;\n\n /**\n * Works on the same axis as crossAxis but applies only to aligned placements and works logically. The offset is inverted for -end alignments.\n */\n alignmentAxis?: number|null;\n}\n\n/**\n * Stores positioned element and reference element\n */\nexport interface PositionElements<TElement extends Element = Element>\n{\n /**\n * Reference element against which is object positioned\n */\n reference: TElement;\n\n /**\n * Element that is positioned\n */\n floating: TElement;\n}\n\n/**\n * Arguments that are passed during positioning\n */\nexport interface PositionArguments<TElement extends Element = Element>\n{\n /**\n * X coordinate of positioned element\n */\n x: number;\n\n /**\n * Y coordinate of positioned element\n */\n y: number;\n\n /**\n * Elements that are being used during positioning\n */\n elements: PositionElements<TElement>;\n}\n\n/**\n * Options that are passed to position service\n */\nexport interface PositionOptions\n{\n //######################### properties #########################\n\n /**\n * Placement of target element against source element\n */\n placement: PositionPlacement;\n\n /**\n * Offset which allows moving target element along the cross axis of placement, or any chosed direction\n */\n offset: PositionOffsetString|number|PositionOffsets|Func1<number|PositionOffsets, PositionArguments>;\n\n /**\n * Indication whether perform flip in case of collision (with view boundaries)\n */\n flip: boolean;\n\n /**\n * Indication whether set up 'auto updating' of position\n */\n autoUpdate: boolean|AutoUpdateOptions;\n\n /**\n * Mouse event that occured when positioning was called\n */\n mouseEvent?: MouseEvent;\n}\n\n/**\n * Result of positioning process, storing new coordinates\n */\nexport interface PositionResult<TElement extends Element = any>\n{\n /**\n * Target element to be positioned\n */\n target: TElement;\n\n /**\n * X coordinate of position of target\n */\n x: number;\n\n /**\n * Y coordinate of position of target\n */\n y: number;\n\n /**\n * Indication whether there was flip applied\n */\n flip: boolean;\n\n /**\n * Disposes instance of engine used for positioning\n */\n dispose(): void;\n}\n\n/**\n * Service that is used for positioning two elements against each other\n */\nexport interface Position\n{\n //######################### methods #########################\n\n /**\n * Places target element relatively to source element according options and returns result storing information about new position\n * @param target - Target element to be placed\n * @param source - Source element to be placed against\n * @param options - Optional options with informations about new position\n */\n placeElement(target: Element, source: Element, options?: Partial<PositionOptions>): Observable<PositionResult>;\n}\n\n/**\n * Used for restriction of position provider type only for type decorated with position provider\n */\nexport interface PositionType extends Type<unknown>\n{\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"stringLocalization.interface.js","sourceRoot":"","sources":["../../../../src/services/stringLocalization/stringLocalization.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Observable} from 'rxjs';\n\n/**\n * Provides api to localize strings\n */\nexport interface StringLocalization\n{\n /**\n * Occurs when indication that locale has changes and strings should be obtained again, because they have changed\n */\n readonly textsChange: Observable<void>;\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 get(key: string, interpolateParams?: Object): string;\n}"]}
1
+ {"version":3,"file":"stringLocalization.interface.js","sourceRoot":"","sources":["../../../../src/services/stringLocalization/stringLocalization.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\nimport {Observable} from 'rxjs';\n\n/**\n * Provides api to localize strings\n */\nexport interface StringLocalization\n{\n /**\n * Occurs when indication that locale has changes and strings should be obtained again, because they have changed\n */\n readonly textsChange: Observable<void>;\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 get(key: string, interpolateParams?: Object): string;\n}\n\n/**\n * Used for restriction of string localization provider type only for type decorated with string localization provider\n */\nexport interface StringLocalizationType extends Type<unknown>\n{\n}"]}
@@ -1 +1 @@
1
- {"version":3,"file":"temporaryStorage.interface.js","sourceRoot":"","sources":["../../../../src/services/temporaryStorage/temporaryStorage.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Provides api for implementing temporary storage\n */\nexport interface TemporaryStorage\n{\n /**\n * Gets value that was stored with 'name' from temporary 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 temporary 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 * Removes value stored with 'name' from temporary storage\n * @param name - Name of stored value that will be removed\n */\n remove(name: string): void;\n}"]}
1
+ {"version":3,"file":"temporaryStorage.interface.js","sourceRoot":"","sources":["../../../../src/services/temporaryStorage/temporaryStorage.interface.ts"],"names":[],"mappings":"","sourcesContent":["import {Type} from '@angular/core';\n\n/**\n * Provides api for implementing temporary storage\n */\nexport interface TemporaryStorage\n{\n /**\n * Gets value that was stored with 'name' from temporary 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 temporary 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 * Removes value stored with 'name' from temporary 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 temporary storage provider type only for type decorated with temporary storage provider\n */\nexport interface TemporaryStorageType extends Type<unknown>\n{\n}"]}
@@ -0,0 +1,32 @@
1
+ import { nameof } from '@jscrpt/common';
2
+ /**
3
+ * Gets provider from type
4
+ * @param type - Type that should contain provider
5
+ */
6
+ export function getProviderForType(type) {
7
+ const typeWithProvider = type;
8
+ if (!typeWithProvider.ɵɵprovider) {
9
+ throw new Error(`Type ${type} is without provider!`);
10
+ }
11
+ return typeWithProvider.ɵɵprovider;
12
+ }
13
+ /**
14
+ * Attach provider to type
15
+ * @param provider - Provider to be attached
16
+ */
17
+ export function TypeProvider(provider) {
18
+ // eslint-disable-next-line @typescript-eslint/ban-types
19
+ return function (target) {
20
+ const typeWithProvider = target;
21
+ if (!typeWithProvider.ɵɵprovider) {
22
+ Object.defineProperty(typeWithProvider, nameof('ɵɵprovider'), {
23
+ value: provider,
24
+ writable: false,
25
+ enumerable: false,
26
+ configurable: false,
27
+ });
28
+ }
29
+ return target;
30
+ };
31
+ }
32
+ //# sourceMappingURL=providerDecoratedType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providerDecoratedType.js","sourceRoot":"","sources":["../../../src/types/providerDecoratedType.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAC;AAatC;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAAmB;IAElD,MAAM,gBAAgB,GAAG,IAA6B,CAAC;IAEvD,IAAG,CAAC,gBAAgB,CAAC,UAAU,EAC/B;QACI,MAAM,IAAI,KAAK,CAAC,QAAQ,IAAI,uBAAuB,CAAC,CAAC;KACxD;IAED,OAAO,gBAAgB,CAAC,UAAU,CAAC;AACvC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,QAAkB;IAE3C,wDAAwD;IACxD,OAAO,UAAsC,MAAiB;QAE1D,MAAM,gBAAgB,GAAG,MAA+B,CAAC;QAEzD,IAAG,CAAC,gBAAgB,CAAC,UAAU,EAC/B;YACI,MAAM,CAAC,cAAc,CAAC,gBAAgB,EAAE,MAAM,CAAwB,YAAY,CAAC,EACnF;gBACI,KAAK,EAAE,QAAQ;gBACf,QAAQ,EAAE,KAAK;gBACf,UAAU,EAAE,KAAK;gBACjB,YAAY,EAAE,KAAK;aACtB,CAAC,CAAC;SACN;QAED,OAAO,MAAM,CAAC;IAClB,CAAC,CAAC;AACN,CAAC","sourcesContent":["import {Provider, Type} from '@angular/core';\nimport {nameof} from '@jscrpt/common';\n\n/**\n * Type that contains provider\n */\ninterface ProviderDecoratedType\n{\n /**\n * Provider that is attached to type\n */\n ɵɵprovider?: Provider;\n}\n\n/**\n * Gets provider from type\n * @param type - Type that should contain provider\n */\nexport function getProviderForType(type: Type<unknown>): Provider\n{\n const typeWithProvider = type as ProviderDecoratedType;\n\n if(!typeWithProvider.ɵɵprovider)\n {\n throw new Error(`Type ${type} is without provider!`);\n }\n\n return typeWithProvider.ɵɵprovider;\n}\n\n/**\n * Attach provider to type\n * @param provider - Provider to be attached\n */\nexport function TypeProvider(provider: Provider): ClassDecorator\n{\n // eslint-disable-next-line @typescript-eslint/ban-types\n return function<TFunction extends Function> (target: TFunction): TFunction\n {\n const typeWithProvider = target as ProviderDecoratedType;\n \n if(!typeWithProvider.ɵɵprovider)\n {\n Object.defineProperty(typeWithProvider, nameof<ProviderDecoratedType>('ɵɵprovider'),\n {\n value: provider,\n writable: false,\n enumerable: false,\n configurable: false,\n });\n }\n\n return target;\n };\n}"]}
@@ -0,0 +1,48 @@
1
+ import { makeEnvironmentProviders } from '@angular/core';
2
+ import { getProviderForType } from './providerDecoratedType';
3
+ /**
4
+ * Provides logger service type
5
+ * @param type - Type of logger that should be used
6
+ */
7
+ export function provideLogger(type) {
8
+ return makeEnvironmentProviders([
9
+ getProviderForType(type),
10
+ ]);
11
+ }
12
+ /**
13
+ * Provides permanent storage service type
14
+ * @param type - Type of permanent storage that should be used
15
+ */
16
+ export function providePermanentStorage(type) {
17
+ return makeEnvironmentProviders([
18
+ getProviderForType(type),
19
+ ]);
20
+ }
21
+ /**
22
+ * Provides position service type
23
+ * @param type - Type of position that should be used
24
+ */
25
+ export function providePosition(type) {
26
+ return makeEnvironmentProviders([
27
+ getProviderForType(type),
28
+ ]);
29
+ }
30
+ /**
31
+ * Provides string localization service type
32
+ * @param type - Type of string localization that should be used
33
+ */
34
+ export function provideStringLocalization(type) {
35
+ return makeEnvironmentProviders([
36
+ getProviderForType(type),
37
+ ]);
38
+ }
39
+ /**
40
+ * Provides temporary storage service type
41
+ * @param type - Type of temporary storage that should be used
42
+ */
43
+ export function provideTemporaryStorage(type) {
44
+ return makeEnvironmentProviders([
45
+ getProviderForType(type),
46
+ ]);
47
+ }
48
+ //# sourceMappingURL=providers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"providers.js","sourceRoot":"","sources":["../../../src/types/providers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,wBAAwB,EAAC,MAAM,eAAe,CAAC;AAO7E,OAAO,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAE3D;;;GAGG;AACH,MAAM,UAAU,aAAa,CAAC,IAAgB;IAE1C,OAAO,wBAAwB,CAC/B;QACI,kBAAkB,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA0B;IAE9D,OAAO,wBAAwB,CAC/B;QACI,kBAAkB,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAAC,IAAkB;IAE9C,OAAO,wBAAwB,CAC/B;QACI,kBAAkB,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,yBAAyB,CAAC,IAA4B;IAElE,OAAO,wBAAwB,CAC/B;QACI,kBAAkB,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;AACP,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CAAC,IAA0B;IAE9D,OAAO,wBAAwB,CAC/B;QACI,kBAAkB,CAAC,IAAI,CAAC;KAC3B,CAAC,CAAC;AACP,CAAC","sourcesContent":["import {EnvironmentProviders, makeEnvironmentProviders} from '@angular/core';\n\nimport {LoggerType} from '../services/logger/logger.interface';\nimport {PermanentStorageType} from '../services/permanentStorage/permanentStorage.interface';\nimport {PositionType} from '../services/position/position.interface';\nimport {StringLocalizationType} from '../services/stringLocalization/stringLocalization.interface';\nimport {TemporaryStorageType} from '../services/temporaryStorage/temporaryStorage.interface';\nimport {getProviderForType} from './providerDecoratedType';\n\n/**\n * Provides logger service type\n * @param type - Type of logger that should be used\n */\nexport function provideLogger(type: LoggerType): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n getProviderForType(type),\n ]);\n}\n\n/**\n * Provides permanent storage service type\n * @param type - Type of permanent storage that should be used\n */\nexport function providePermanentStorage(type: PermanentStorageType): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n getProviderForType(type),\n ]);\n}\n\n/**\n * Provides position service type\n * @param type - Type of position that should be used\n */\nexport function providePosition(type: PositionType): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n getProviderForType(type),\n ]);\n}\n\n/**\n * Provides string localization service type\n * @param type - Type of string localization that should be used\n */\nexport function provideStringLocalization(type: StringLocalizationType): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n getProviderForType(type),\n ]);\n}\n\n/**\n * Provides temporary storage service type\n * @param type - Type of temporary storage that should be used\n */\nexport function provideTemporaryStorage(type: TemporaryStorageType): EnvironmentProviders\n{\n return makeEnvironmentProviders(\n [\n getProviderForType(type),\n ]);\n}\n"]}
@@ -1,2 +1,2 @@
1
- export { LocalPermanentStorageService, SessionTemporaryStorageService } from './services';
1
+ export { LocalPermanentStorageService, SessionTemporaryStorageService, SessionTemporaryStorage, LocalPermanentStorage } from './services';
2
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../store/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAE,8BAA8B,EAAC,MAAM,YAAY,CAAC","sourcesContent":["export {LocalPermanentStorageService, SessionTemporaryStorageService} from './services';"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../store/src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAE,8BAA8B,EAAE,uBAAuB,EAAE,qBAAqB,EAAC,MAAM,YAAY,CAAC","sourcesContent":["export {LocalPermanentStorageService, SessionTemporaryStorageService, SessionTemporaryStorage, LocalPermanentStorage} from './services';"]}
@@ -1,8 +1,9 @@
1
+ import { __decorate } from "tslib";
1
2
  import { Injectable } from '@angular/core';
3
+ import { PERMANENT_STORAGE, TypeProvider } from '@anglr/common';
2
4
  import store from 'store';
3
5
  import expirePlugin from 'store/plugins/expire';
4
6
  import * as i0 from "@angular/core";
5
- //TODO: add tokens for storages
6
7
  /**
7
8
  * Implementation of permanent storage using LocalStorage
8
9
  */
@@ -47,4 +48,23 @@ export { LocalPermanentStorageService };
47
48
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.1.4", ngImport: i0, type: LocalPermanentStorageService, decorators: [{
48
49
  type: Injectable
49
50
  }], ctorParameters: function () { return []; } });
51
+ /**
52
+ * Provider for permanent storage that is using local storage implementation
53
+ */
54
+ const LOCAL_PERMANENT_STORAGE = {
55
+ provide: PERMANENT_STORAGE,
56
+ useClass: LocalPermanentStorageService
57
+ };
58
+ /**
59
+ * Type that contains provider for local permanent storage when used with `providePermanentStorage`
60
+ */
61
+ let LocalPermanentStorageType = class LocalPermanentStorageType {
62
+ };
63
+ LocalPermanentStorageType = __decorate([
64
+ TypeProvider(LOCAL_PERMANENT_STORAGE)
65
+ ], LocalPermanentStorageType);
66
+ /**
67
+ * Sets permanent storage to use local permanent storage when used with `providePermanentStorage`
68
+ */
69
+ export const LocalPermanentStorage = LocalPermanentStorageType;
50
70
  //# sourceMappingURL=localPermanentStorage.service.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"localPermanentStorage.service.js","sourceRoot":"","sources":["../../../../../store/src/services/permanentStorage/localPermanentStorage.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,UAAU,EAAC,MAAM,eAAe,CAAC;AAEzC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,sBAAsB,CAAC;;AAEhD,+BAA+B;AAE/B;;GAEG;AACH,MACa,4BAA4B;IAErC,iEAAiE;IAEjE;QAEI,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IAED,yGAAyG;IAEzG;;;OAGG;IACI,GAAG,CAAU,IAAY;QAE5B,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAiBD;;;;;OAKG;IACI,GAAG,CAAC,IAAY,EAAE,KAAU,EAAE,OAAc;QAE/C,IAAG,OAAO,EACV;YACI,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;SAC7C;aAED;YACI,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1B;IACL,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,IAAY;QAEtB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;uGA5DQ,4BAA4B;2GAA5B,4BAA4B;;SAA5B,4BAA4B;2FAA5B,4BAA4B;kBADxC,UAAU","sourcesContent":["import {Injectable} from '@angular/core';\nimport {PermanentStorage} from '@anglr/common';\nimport store from 'store';\nimport expirePlugin from 'store/plugins/expire';\n\n//TODO: add tokens for storages\n\n/**\n * Implementation of permanent storage using LocalStorage\n */\n@Injectable()\nexport class LocalPermanentStorageService implements PermanentStorage\n{\n //######################### constructor #########################\n\n constructor()\n {\n store.addPlugin(expirePlugin);\n }\n\n //######################### public methods - implementation of 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 public get<TResult>(name: string): TResult\n {\n return store.get(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 if(expires)\n {\n store.set(name, value, expires.valueOf());\n }\n else\n {\n store.set(name, value);\n }\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 store.remove(name);\n }\n}"]}
1
+ {"version":3,"file":"localPermanentStorage.service.js","sourceRoot":"","sources":["../../../../../store/src/services/permanentStorage/localPermanentStorage.service.ts"],"names":[],"mappings":";AAAA,OAAO,EAAgB,UAAU,EAAW,MAAM,eAAe,CAAC;AAClE,OAAO,EAAC,iBAAiB,EAA0C,YAAY,EAAC,MAAM,eAAe,CAAC;AACtG,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,YAAY,MAAM,sBAAsB,CAAC;;AAEhD;;GAEG;AACH,MACa,4BAA4B;IAErC,iEAAiE;IAEjE;QAEI,KAAK,CAAC,SAAS,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IAED,yGAAyG;IAEzG;;;OAGG;IACI,GAAG,CAAU,IAAY;QAE5B,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAC3B,CAAC;IAiBD;;;;;OAKG;IACI,GAAG,CAAC,IAAY,EAAE,KAAU,EAAE,OAAc;QAE/C,IAAG,OAAO,EACV;YACI,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC;SAC7C;aAED;YACI,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;SAC1B;IACL,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,IAAY;QAEtB,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IACvB,CAAC;uGA5DQ,4BAA4B;2GAA5B,4BAA4B;;SAA5B,4BAA4B;2FAA5B,4BAA4B;kBADxC,UAAU;;AAgEX;;GAEG;AACH,MAAM,uBAAuB,GAE7B;IACI,OAAO,EAAE,iBAAiB;IAC1B,QAAQ,EAAE,4BAA4B;CACzC,CAAC;AAEF;;GAEG;AAEH,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;CAE9B,CAAA;AAFK,yBAAyB;IAD9B,YAAY,CAAC,uBAAuB,CAAC;GAChC,yBAAyB,CAE9B;AAED;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAyB,yBAAyB,CAAC","sourcesContent":["import {ClassProvider, Injectable, Provider} from '@angular/core';\nimport {PERMANENT_STORAGE, PermanentStorage, PermanentStorageType, TypeProvider} from '@anglr/common';\nimport store from 'store';\nimport expirePlugin from 'store/plugins/expire';\n\n/**\n * Implementation of permanent storage using LocalStorage\n */\n@Injectable()\nexport class LocalPermanentStorageService implements PermanentStorage\n{\n //######################### constructor #########################\n\n constructor()\n {\n store.addPlugin(expirePlugin);\n }\n\n //######################### public methods - implementation of 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 public get<TResult>(name: string): TResult\n {\n return store.get(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 if(expires)\n {\n store.set(name, value, expires.valueOf());\n }\n else\n {\n store.set(name, value);\n }\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 store.remove(name);\n }\n}\n\n/**\n * Provider for permanent storage that is using local storage implementation\n */\nconst LOCAL_PERMANENT_STORAGE: Provider =\n<ClassProvider>\n{\n provide: PERMANENT_STORAGE,\n useClass: LocalPermanentStorageService\n};\n\n/**\n * Type that contains provider for local permanent storage when used with `providePermanentStorage`\n */\n@TypeProvider(LOCAL_PERMANENT_STORAGE)\nclass LocalPermanentStorageType\n{\n}\n\n/**\n * Sets permanent storage to use local permanent storage when used with `providePermanentStorage`\n */\nexport const LocalPermanentStorage: PermanentStorageType = LocalPermanentStorageType;"]}