@bitblit/ngx-acute-common 5.0.517-alpha → 5.0.519-alpha

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 (63) hide show
  1. package/lib/build/ngx-acute-common-info.d.ts +5 -0
  2. package/lib/build/ngx-acute-common-info.js +15 -0
  3. package/lib/build/ngx-acute-common-info.js.map +1 -0
  4. package/lib/components/dialogs/alert/alert.component.d.ts +12 -0
  5. package/lib/components/dialogs/alert/alert.component.js +50 -0
  6. package/lib/components/dialogs/alert/alert.component.js.map +1 -0
  7. package/lib/components/dialogs/block-ui/block-ui.component.d.ts +12 -0
  8. package/lib/components/dialogs/block-ui/block-ui.component.js +79 -0
  9. package/lib/components/dialogs/block-ui/block-ui.component.js.map +1 -0
  10. package/lib/esm2022/components/dialogs/block-ui/block-ui.component.d.ts +2 -2
  11. package/lib/esm2022/index.d.ts +1 -2
  12. package/lib/esm2022/ngx-acute-common.mjs +24 -62
  13. package/lib/esm2022/ngx-acute-common.mjs.map +1 -1
  14. package/lib/index.d.ts +18 -0
  15. package/lib/index.js +19 -0
  16. package/lib/index.js.map +1 -0
  17. package/lib/model/google-analytics-config.d.ts +3 -0
  18. package/lib/model/google-analytics-config.js +2 -0
  19. package/lib/model/google-analytics-config.js.map +1 -0
  20. package/lib/pipes/capitalize.pipe.d.ts +7 -0
  21. package/lib/pipes/capitalize.pipe.js +16 -0
  22. package/lib/pipes/capitalize.pipe.js.map +1 -0
  23. package/lib/pipes/dollar-formatted.pipe.d.ts +7 -0
  24. package/lib/pipes/dollar-formatted.pipe.js +18 -0
  25. package/lib/pipes/dollar-formatted.pipe.js.map +1 -0
  26. package/lib/pipes/map-values.pipe.d.ts +7 -0
  27. package/lib/pipes/map-values.pipe.js +23 -0
  28. package/lib/pipes/map-values.pipe.js.map +1 -0
  29. package/lib/pipes/number-with-commas.pipe.d.ts +7 -0
  30. package/lib/pipes/number-with-commas.pipe.js +14 -0
  31. package/lib/pipes/number-with-commas.pipe.js.map +1 -0
  32. package/lib/pipes/order-by.pipe.d.ts +8 -0
  33. package/lib/pipes/order-by.pipe.js +59 -0
  34. package/lib/pipes/order-by.pipe.js.map +1 -0
  35. package/lib/pipes/percent-formatted.pipe.d.ts +7 -0
  36. package/lib/pipes/percent-formatted.pipe.js +15 -0
  37. package/lib/pipes/percent-formatted.pipe.js.map +1 -0
  38. package/lib/pipes/plural.pipe.d.ts +7 -0
  39. package/lib/pipes/plural.pipe.js +19 -0
  40. package/lib/pipes/plural.pipe.js.map +1 -0
  41. package/lib/pipes/round.pipe.d.ts +7 -0
  42. package/lib/pipes/round.pipe.js +14 -0
  43. package/lib/pipes/round.pipe.js.map +1 -0
  44. package/lib/pipes/time-ago-formatted.pipe.d.ts +7 -0
  45. package/lib/pipes/time-ago-formatted.pipe.js +16 -0
  46. package/lib/pipes/time-ago-formatted.pipe.js.map +1 -0
  47. package/lib/pipes/timing.pipe.d.ts +8 -0
  48. package/lib/pipes/timing.pipe.js +22 -0
  49. package/lib/pipes/timing.pipe.js.map +1 -0
  50. package/lib/services/google-analytics.service.d.ts +12 -0
  51. package/lib/services/google-analytics.service.js +61 -0
  52. package/lib/services/google-analytics.service.js.map +1 -0
  53. package/lib/services/graphql-query.service.d.ts +17 -0
  54. package/lib/services/graphql-query.service.js +87 -0
  55. package/lib/services/graphql-query.service.js.map +1 -0
  56. package/lib/services/local-storage.service.d.ts +11 -0
  57. package/lib/services/local-storage.service.js +51 -0
  58. package/lib/services/local-storage.service.js.map +1 -0
  59. package/lib/services/window-ref.service.d.ts +6 -0
  60. package/lib/services/window-ref.service.js +22 -0
  61. package/lib/services/window-ref.service.js.map +1 -0
  62. package/package.json +7 -3
  63. package/lib/esm2022/acute-common.module.d.ts +0 -2
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=google-analytics-config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-analytics-config.js","sourceRoot":"","sources":["../../src/model/google-analytics-config.ts"],"names":[],"mappings":""}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CapitalizePipe implements PipeTransform {
4
+ transform(input: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<CapitalizePipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<CapitalizePipe, "acuteCapitalize", true>;
7
+ }
@@ -0,0 +1,16 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class CapitalizePipe {
4
+ transform(input) {
5
+ return input && input.length
6
+ ? (input.charAt(0).toUpperCase() + input.slice(1).toLowerCase())
7
+ : input;
8
+ }
9
+ static ɵfac = function CapitalizePipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || CapitalizePipe)(); };
10
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteCapitalize", type: CapitalizePipe, pure: true, standalone: true });
11
+ }
12
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(CapitalizePipe, [{
13
+ type: Pipe,
14
+ args: [{ name: 'acuteCapitalize', standalone: true }]
15
+ }], null, null); })();
16
+ //# sourceMappingURL=capitalize.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"capitalize.pipe.js","sourceRoot":"","sources":["../../src/pipes/capitalize.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,cAAc;IAEzB,SAAS,CAAC,KAAa;QACrB,OAAO,KAAK,IAAI,KAAK,CAAC,MAAM;YAC1B,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,WAAW,EAAE,CAAC;YAChE,CAAC,CAAC,KAAK,CAAC;IACZ,CAAC;wGANU,cAAc;oEAAd,cAAc;;iFAAd,cAAc;cAD1B,IAAI;eAAC,EAAE,IAAI,EAAE,iBAAiB,EAAG,UAAU,EAAE,IAAI,EAAC"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class DollarFormattedPipe implements PipeTransform {
4
+ transform(input: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<DollarFormattedPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<DollarFormattedPipe, "acuteDollars", true>;
7
+ }
@@ -0,0 +1,18 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { CurrencyRatchet } from "@bitblit/ratchet-common/lang/currency-ratchet";
3
+ import * as i0 from "@angular/core";
4
+ export class DollarFormattedPipe {
5
+ transform(input) {
6
+ const rval = input === null || input === undefined
7
+ ? 'Null'
8
+ : CurrencyRatchet.dollarFormat(input);
9
+ return rval;
10
+ }
11
+ static ɵfac = function DollarFormattedPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || DollarFormattedPipe)(); };
12
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteDollars", type: DollarFormattedPipe, pure: true, standalone: true });
13
+ }
14
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(DollarFormattedPipe, [{
15
+ type: Pipe,
16
+ args: [{ name: 'acuteDollars', standalone: true }]
17
+ }], null, null); })();
18
+ //# sourceMappingURL=dollar-formatted.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dollar-formatted.pipe.js","sourceRoot":"","sources":["../../src/pipes/dollar-formatted.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;;AAG9E,MAAM,OAAO,mBAAmB;IAC9B,SAAS,CAAC,KAAa;QACrB,MAAM,IAAI,GACR,KAAK,KAAK,IAAI,IAAI,KAAK,KAAK,SAAS;YACnC,CAAC,CAAC,MAAM;YACR,CAAC,CAAC,eAAe,CAAC,YAAY,CAAC,KAAK,CAAC,CAAA;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;6GAPU,mBAAmB;iEAAnB,mBAAmB;;iFAAnB,mBAAmB;cAD/B,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class MapValuesPipe implements PipeTransform {
4
+ transform(value: any, args?: any[]): any[];
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<MapValuesPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<MapValuesPipe, "acuteMapValues", true>;
7
+ }
@@ -0,0 +1,23 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
3
+ import * as i0 from "@angular/core";
4
+ export class MapValuesPipe {
5
+ transform(value, args) {
6
+ const returnArray = [];
7
+ for (const k of Object.keys(value)) {
8
+ returnArray.push({
9
+ key: k,
10
+ val: value[k],
11
+ });
12
+ }
13
+ Logger.info('Map values : %j : %j', returnArray, args);
14
+ return returnArray;
15
+ }
16
+ static ɵfac = function MapValuesPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || MapValuesPipe)(); };
17
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteMapValues", type: MapValuesPipe, pure: true, standalone: true });
18
+ }
19
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MapValuesPipe, [{
20
+ type: Pipe,
21
+ args: [{ name: 'acuteMapValues', standalone: true }]
22
+ }], null, null); })();
23
+ //# sourceMappingURL=map-values.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"map-values.pipe.js","sourceRoot":"","sources":["../../src/pipes/map-values.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;;AAG/D,MAAM,OAAO,aAAa;IACxB,SAAS,CAAC,KAAU,EAAE,IAAY;QAChC,MAAM,WAAW,GAAG,EAAE,CAAC;QAEvB,KAAK,MAAM,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACnC,WAAW,CAAC,IAAI,CAAC;gBACf,GAAG,EAAE,CAAC;gBACN,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;aACd,CAAC,CAAC;QACL,CAAC;QAED,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,WAAW,EAAE,IAAI,CAAC,CAAC;QACvD,OAAO,WAAW,CAAC;IACrB,CAAC;uGAbU,aAAa;mEAAb,aAAa;;iFAAb,aAAa;cADzB,IAAI;eAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,UAAU,EAAE,IAAI,EAAE"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class NumberWithCommasPipe implements PipeTransform {
4
+ transform(input: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<NumberWithCommasPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<NumberWithCommasPipe, "acuteNumberWithCommas", true>;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class NumberWithCommasPipe {
4
+ transform(input) {
5
+ return new Intl.NumberFormat().format(input);
6
+ }
7
+ static ɵfac = function NumberWithCommasPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || NumberWithCommasPipe)(); };
8
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteNumberWithCommas", type: NumberWithCommasPipe, pure: true, standalone: true });
9
+ }
10
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NumberWithCommasPipe, [{
11
+ type: Pipe,
12
+ args: [{ name: 'acuteNumberWithCommas', standalone: true }]
13
+ }], null, null); })();
14
+ //# sourceMappingURL=number-with-commas.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"number-with-commas.pipe.js","sourceRoot":"","sources":["../../src/pipes/number-with-commas.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,oBAAoB;IAE/B,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,IAAI,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/C,CAAC;8GAJU,oBAAoB;0EAApB,oBAAoB;;iFAApB,oBAAoB;cADhC,IAAI;eAAC,EAAE,IAAI,EAAE,uBAAuB,EAAI,UAAU,EAAE,IAAI,EAAC"}
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class OrderByPipe implements PipeTransform {
4
+ static _orderByComparator(a: any, b: any): number;
5
+ transform(input: any, [config]: [string?]): any;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<OrderByPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<OrderByPipe, "acuteOrderBy", true>;
8
+ }
@@ -0,0 +1,59 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class OrderByPipe {
4
+ static _orderByComparator(a, b) {
5
+ if (isNaN(parseFloat(a)) || !isFinite(a) || isNaN(parseFloat(b)) || !isFinite(b)) {
6
+ if (String(a).toLowerCase() < String(b).toLowerCase())
7
+ return -1;
8
+ if (String(a).toLowerCase() > String(b).toLowerCase())
9
+ return 1;
10
+ }
11
+ else {
12
+ if (parseFloat(a) < parseFloat(b))
13
+ return -1;
14
+ if (parseFloat(a) > parseFloat(b))
15
+ return 1;
16
+ }
17
+ return 0;
18
+ }
19
+ transform(input, [config = '+']) {
20
+ if (!Array.isArray(input))
21
+ return input;
22
+ if (!Array.isArray(config) || (Array.isArray(config) && config.length == 1)) {
23
+ const propertyToCheck = !Array.isArray(config) ? config : config[0];
24
+ const desc = propertyToCheck.substr(0, 1) == '-';
25
+ if (!propertyToCheck || propertyToCheck == '-' || propertyToCheck == '+') {
26
+ return !desc ? input.sort() : input.sort().reverse();
27
+ }
28
+ else {
29
+ const property = propertyToCheck.substr(0, 1) == '+' || propertyToCheck.substr(0, 1) == '-' ? propertyToCheck.substr(1) : propertyToCheck;
30
+ return input.sort(function (a, b) {
31
+ return !desc
32
+ ? OrderByPipe._orderByComparator(a[property], b[property])
33
+ : -OrderByPipe._orderByComparator(a[property], b[property]);
34
+ });
35
+ }
36
+ }
37
+ else {
38
+ return input.sort(function (a, b) {
39
+ for (let i = 0; i < config.length; i++) {
40
+ const desc = config[i].substr(0, 1) == '-';
41
+ const property = config[i].substr(0, 1) == '+' || config[i].substr(0, 1) == '-' ? config[i].substr(1) : config[i];
42
+ const comparison = !desc
43
+ ? OrderByPipe._orderByComparator(a[property], b[property])
44
+ : -OrderByPipe._orderByComparator(a[property], b[property]);
45
+ if (comparison != 0)
46
+ return comparison;
47
+ }
48
+ return 0;
49
+ });
50
+ }
51
+ }
52
+ static ɵfac = function OrderByPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || OrderByPipe)(); };
53
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteOrderBy", type: OrderByPipe, pure: false, standalone: true });
54
+ }
55
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(OrderByPipe, [{
56
+ type: Pipe,
57
+ args: [{ name: 'acuteOrderBy', pure: false, standalone: true }]
58
+ }], null, null); })();
59
+ //# sourceMappingURL=order-by.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"order-by.pipe.js","sourceRoot":"","sources":["../../src/pipes/order-by.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AA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AG,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,IAAI,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;oBAElH,MAAM,UAAU,GAAG,CAAC,IAAI;wBACtB,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC;wBAC1D,CAAC,CAAC,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC;oBAG9D,IAAI,UAAU,IAAI,CAAC;wBAAE,OAAO,UAAU,CAAC;gBACzC,CAAC;gBAED,OAAO,CAAC,CAAC;YACX,CAAC,CAAC,CAAC;QACL,CAAC;IACH,CAAC;qGArDU,WAAW;iEAAX,WAAW;;iFAAX,WAAW;cADvB,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PercentFormattedPipe implements PipeTransform {
4
+ transform(input: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<PercentFormattedPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<PercentFormattedPipe, "acutePercent", true>;
7
+ }
@@ -0,0 +1,15 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { NumberRatchet } from "@bitblit/ratchet-common/lang/number-ratchet";
3
+ import * as i0 from "@angular/core";
4
+ export class PercentFormattedPipe {
5
+ transform(input) {
6
+ return NumberRatchet.pctFormatted(input);
7
+ }
8
+ static ɵfac = function PercentFormattedPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PercentFormattedPipe)(); };
9
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acutePercent", type: PercentFormattedPipe, pure: true, standalone: true });
10
+ }
11
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PercentFormattedPipe, [{
12
+ type: Pipe,
13
+ args: [{ name: 'acutePercent', standalone: true }]
14
+ }], null, null); })();
15
+ //# sourceMappingURL=percent-formatted.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"percent-formatted.pipe.js","sourceRoot":"","sources":["../../src/pipes/percent-formatted.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;AACpD,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;;AAG1E,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAC,KAAa;QACrB,OAAO,aAAa,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;IAC3C,CAAC;8GAHU,oBAAoB;iEAApB,oBAAoB;;iFAApB,oBAAoB;cADhC,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAG,UAAU,EAAE,IAAI,EAAE"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class PluralPipe implements PipeTransform {
4
+ transform(input: number, label: string, pluralLabel?: string): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<PluralPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<PluralPipe, "acutePlural", true>;
7
+ }
@@ -0,0 +1,19 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class PluralPipe {
4
+ transform(input, label, pluralLabel = '') {
5
+ input = input || 0;
6
+ return input === 1
7
+ ? `${input} ${label}`
8
+ : pluralLabel
9
+ ? `${input} ${pluralLabel}`
10
+ : `${input} ${label}s`;
11
+ }
12
+ static ɵfac = function PluralPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PluralPipe)(); };
13
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acutePlural", type: PluralPipe, pure: true, standalone: true });
14
+ }
15
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PluralPipe, [{
16
+ type: Pipe,
17
+ args: [{ name: 'acutePlural', standalone: true }]
18
+ }], null, null); })();
19
+ //# sourceMappingURL=plural.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"plural.pipe.js","sourceRoot":"","sources":["../../src/pipes/plural.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,UAAU;IAErB,SAAS,CAAC,KAAa,EAAE,KAAa,EAAE,cAAsB,EAAE;QAC9D,KAAK,GAAG,KAAK,IAAI,CAAC,CAAC;QACnB,OAAO,KAAK,KAAK,CAAC;YAChB,CAAC,CAAC,GAAG,KAAK,IAAI,KAAK,EAAE;YACrB,CAAC,CAAC,WAAW;gBACX,CAAC,CAAC,GAAG,KAAK,IAAI,WAAW,EAAE;gBAC3B,CAAC,CAAC,GAAG,KAAK,IAAI,KAAK,GAAG,CAAC;IAC7B,CAAC;oGATU,UAAU;gEAAV,UAAU;;iFAAV,UAAU;cADtB,IAAI;eAAC,EAAE,IAAI,EAAE,aAAa,EAAI,UAAU,EAAE,IAAI,EAAC"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class RoundPipe implements PipeTransform {
4
+ transform(input: number): number;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<RoundPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<RoundPipe, "acuteRound", true>;
7
+ }
@@ -0,0 +1,14 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class RoundPipe {
4
+ transform(input) {
5
+ return Math.round(input);
6
+ }
7
+ static ɵfac = function RoundPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || RoundPipe)(); };
8
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteRound", type: RoundPipe, pure: true, standalone: true });
9
+ }
10
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RoundPipe, [{
11
+ type: Pipe,
12
+ args: [{ name: 'acuteRound', standalone: true }]
13
+ }], null, null); })();
14
+ //# sourceMappingURL=round.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"round.pipe.js","sourceRoot":"","sources":["../../src/pipes/round.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,SAAS;IAEpB,SAAS,CAAC,KAAa;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;mGAJU,SAAS;+DAAT,SAAS;;iFAAT,SAAS;cADrB,IAAI;eAAC,EAAE,IAAI,EAAE,YAAY,EAAI,UAAU,EAAE,IAAI,EAAC"}
@@ -0,0 +1,7 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TimeAgoFormattedPipe implements PipeTransform {
4
+ transform(input: number): string;
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimeAgoFormattedPipe, never>;
6
+ static ɵpipe: i0.ɵɵPipeDeclaration<TimeAgoFormattedPipe, "acuteTimeAgo", true>;
7
+ }
@@ -0,0 +1,16 @@
1
+ import { Pipe } from '@angular/core';
2
+ import { DurationRatchet } from "@bitblit/ratchet-common/lang/duration-ratchet";
3
+ import { NumberRatchet } from "@bitblit/ratchet-common/lang/number-ratchet";
4
+ import * as i0 from "@angular/core";
5
+ export class TimeAgoFormattedPipe {
6
+ transform(input) {
7
+ return DurationRatchet.formatMsDuration(new Date().getTime() - NumberRatchet.safeNumber(input));
8
+ }
9
+ static ɵfac = function TimeAgoFormattedPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimeAgoFormattedPipe)(); };
10
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteTimeAgo", type: TimeAgoFormattedPipe, pure: true, standalone: true });
11
+ }
12
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimeAgoFormattedPipe, [{
13
+ type: Pipe,
14
+ args: [{ name: 'acuteTimeAgo', standalone: true }]
15
+ }], null, null); })();
16
+ //# sourceMappingURL=time-ago-formatted.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time-ago-formatted.pipe.js","sourceRoot":"","sources":["../../src/pipes/time-ago-formatted.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,IAAI,EAAgB,MAAM,eAAe,CAAC;AAClD,OAAO,EAAC,eAAe,EAAC,MAAM,+CAA+C,CAAC;AAC9E,OAAO,EAAC,aAAa,EAAC,MAAM,6CAA6C,CAAC;;AAG1E,MAAM,OAAO,oBAAoB;IAC/B,SAAS,CAAC,KAAa;QACrB,OAAO,eAAe,CAAC,gBAAgB,CAAC,IAAI,IAAI,EAAE,CAAC,OAAO,EAAE,GAAG,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;IAClG,CAAC;8GAHU,oBAAoB;iEAApB,oBAAoB;;iFAApB,oBAAoB;cADhC,IAAI;eAAC,EAAE,IAAI,EAAE,cAAc,EAAI,UAAU,EAAE,IAAI,EAAC"}
@@ -0,0 +1,8 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class TimingPipe implements PipeTransform {
4
+ transform(time: number): string;
5
+ private initZero;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<TimingPipe, never>;
7
+ static ɵpipe: i0.ɵɵPipeDeclaration<TimingPipe, "acuteTiming", true>;
8
+ }
@@ -0,0 +1,22 @@
1
+ import { Pipe } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export class TimingPipe {
4
+ transform(time) {
5
+ if (time) {
6
+ const minutes = Math.floor(time / 60);
7
+ const seconds = Math.floor(time % 60);
8
+ return `${this.initZero(minutes)}${minutes}:${this.initZero(seconds)}${seconds}`;
9
+ }
10
+ return '00:00';
11
+ }
12
+ initZero(time) {
13
+ return time < 10 ? '0' : '';
14
+ }
15
+ static ɵfac = function TimingPipe_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || TimingPipe)(); };
16
+ static ɵpipe = i0.ɵɵdefinePipe({ name: "acuteTiming", type: TimingPipe, pure: true, standalone: true });
17
+ }
18
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(TimingPipe, [{
19
+ type: Pipe,
20
+ args: [{ name: 'acuteTiming', standalone: true }]
21
+ }], null, null); })();
22
+ //# sourceMappingURL=timing.pipe.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timing.pipe.js","sourceRoot":"","sources":["../../src/pipes/timing.pipe.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAiB,MAAM,eAAe,CAAC;;AAGpD,MAAM,OAAO,UAAU;IACrB,SAAS,CAAC,IAAY;QACpB,IAAI,IAAI,EAAE,CAAC;YACT,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YACtC,MAAM,OAAO,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,GAAG,EAAE,CAAC,CAAC;YACtC,OAAO,GAAG,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,OAAO,EAAE,CAAC;QACnF,CAAC;QAED,OAAO,OAAO,CAAC;IACjB,CAAC;IAEO,QAAQ,CAAC,IAAY;QAC3B,OAAO,IAAI,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9B,CAAC;oGAbU,UAAU;gEAAV,UAAU;;iFAAV,UAAU;cADtB,IAAI;eAAC,EAAE,IAAI,EAAE,aAAa,EAAI,UAAU,EAAE,IAAI,EAAC"}
@@ -0,0 +1,12 @@
1
+ import { Router } from '@angular/router';
2
+ import * as i0 from "@angular/core";
3
+ export declare class GoogleAnalyticsService {
4
+ private router;
5
+ private static readonly IS_PROD;
6
+ constructor(router: Router);
7
+ initialize(): void;
8
+ private onRouteChange;
9
+ event(action: string, eventCategory?: string, eventLabel?: string, value?: string): void;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<GoogleAnalyticsService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<GoogleAnalyticsService>;
12
+ }
@@ -0,0 +1,61 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { NavigationEnd, Router } from '@angular/router';
3
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
4
+ import * as i0 from "@angular/core";
5
+ import * as i1 from "@angular/router";
6
+ export class GoogleAnalyticsService {
7
+ router;
8
+ static IS_PROD = true;
9
+ constructor(router) {
10
+ this.router = router;
11
+ }
12
+ initialize() {
13
+ this.onRouteChange();
14
+ try {
15
+ const url = 'https://www.googletagmanager.com/gtag/js?id=';
16
+ const gTagScript = document.createElement('script');
17
+ gTagScript.async = true;
18
+ const tagId = GoogleAnalyticsService.IS_PROD ? 'G-7D5BBK4K8X' : null;
19
+ gTagScript.src = `${url}${tagId}`;
20
+ document.head.appendChild(gTagScript);
21
+ const dataLayerScript = document.createElement('script');
22
+ dataLayerScript.innerHTML = `
23
+ window.dataLayer = window.dataLayer || [];
24
+ function gtag(){dataLayer.push(arguments);}
25
+ gtag('js', new Date());
26
+ gtag('config', '${tagId}', {'send_page_view': false});`;
27
+ document.head.appendChild(dataLayerScript);
28
+ }
29
+ catch (e) {
30
+ Logger.error('Error adding Google Analytics', e, e);
31
+ }
32
+ }
33
+ onRouteChange() {
34
+ const tagId = GoogleAnalyticsService.IS_PROD ? 'G-7D5BBK4K8X' : null;
35
+ this.router.events.subscribe((event) => {
36
+ if (event instanceof NavigationEnd) {
37
+ gtag('config', tagId, {
38
+ page_path: event.urlAfterRedirects,
39
+ });
40
+ Logger.info('Sending Google Analytics tracking for: ', event.urlAfterRedirects);
41
+ Logger.info('Google Analytics property ID: ', tagId);
42
+ }
43
+ });
44
+ }
45
+ event(action, eventCategory, eventLabel, value) {
46
+ gtag('event', action, {
47
+ ...(eventCategory && { event_category: eventCategory }),
48
+ ...(eventLabel && { event_label: eventLabel }),
49
+ ...(value && { value: value }),
50
+ });
51
+ }
52
+ static ɵfac = function GoogleAnalyticsService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GoogleAnalyticsService)(i0.ɵɵinject(i1.Router)); };
53
+ static ɵprov = i0.ɵɵdefineInjectable({ token: GoogleAnalyticsService, factory: GoogleAnalyticsService.ɵfac, providedIn: 'root' });
54
+ }
55
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GoogleAnalyticsService, [{
56
+ type: Injectable,
57
+ args: [{
58
+ providedIn: 'root',
59
+ }]
60
+ }], () => [{ type: i1.Router }], null); })();
61
+ //# sourceMappingURL=google-analytics.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"google-analytics.service.js","sourceRoot":"","sources":["../../src/services/google-analytics.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;;;AAS/D,MAAM,OAAO,sBAAsB;IAGb;IAFZ,MAAM,CAAU,OAAO,GAAY,IAAI,CAAC;IAEhD,YAAoB,MAAc;QAAd,WAAM,GAAN,MAAM,CAAQ;IAAG,CAAC;IAE/B,UAAU;QACf,IAAI,CAAC,aAAa,E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,CAAC,CAAC,CAAC;IACL,CAAC;IAGM,KAAK,CAAC,MAAc,EAAE,aAAsB,EAAE,UAAmB,EAAE,KAAc;QACtF,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE;YACpB,GAAG,CAAC,aAAa,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,CAAC;YACvD,GAAG,CAAC,UAAU,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC;YAC9C,GAAG,CAAC,KAAK,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;SAC/B,CAAC,CAAC;IACL,CAAC;gHApDU,sBAAsB;kDAAtB,sBAAsB,WAAtB,sBAAsB,mBAHrB,MAAM;;iFAGP,sBAAsB;cAJlC,UAAU;eAAC;gBACV,UAAU,EAAE,MAAM;aACnB"}
@@ -0,0 +1,17 @@
1
+ import { DialogService } from 'primeng/dynamicdialog';
2
+ import { MessageService } from 'primeng/api';
3
+ import { GraphqlRatchet } from '@bitblit/ratchet-graphql/graphql/graphql-ratchet';
4
+ import { AuthorizationStyle } from "@bitblit/ratchet-graphql/graphql/authorization-style";
5
+ import * as i0 from "@angular/core";
6
+ export declare class GraphqlQueryService {
7
+ private graphqlRatchet;
8
+ private dialogService;
9
+ private messageService;
10
+ constructor(graphqlRatchet: GraphqlRatchet, dialogService: DialogService, messageService: MessageService);
11
+ executeQuery<T>(queryName: string, variables: any, authStyle?: AuthorizationStyle): Promise<T | null>;
12
+ executeQueryWithBlock<T>(blockMessage: string, queryName: string, variables: any, authStyle?: AuthorizationStyle): Promise<T | null>;
13
+ executeMutate<T>(queryName: string, variables: any, authStyle?: AuthorizationStyle): Promise<T | null>;
14
+ executeMutateWithBlock<T>(blockMessage: string, queryName: string, variables: any, authStyle?: AuthorizationStyle): Promise<T | null>;
15
+ static ɵfac: i0.ɵɵFactoryDeclaration<GraphqlQueryService, never>;
16
+ static ɵprov: i0.ɵɵInjectableDeclaration<GraphqlQueryService>;
17
+ }
@@ -0,0 +1,87 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { DialogService } from 'primeng/dynamicdialog';
3
+ import { MessageService } from 'primeng/api';
4
+ import { Logger } from '@bitblit/ratchet-common/logger/logger';
5
+ import { GraphqlRatchet } from '@bitblit/ratchet-graphql/graphql/graphql-ratchet';
6
+ import { BlockUiComponent } from "../components/dialogs/block-ui/block-ui.component";
7
+ import { AuthorizationStyle } from "@bitblit/ratchet-graphql/graphql/authorization-style";
8
+ import * as i0 from "@angular/core";
9
+ import * as i1 from "@bitblit/ratchet-graphql/graphql/graphql-ratchet";
10
+ import * as i2 from "primeng/dynamicdialog";
11
+ import * as i3 from "primeng/api";
12
+ export class GraphqlQueryService {
13
+ graphqlRatchet;
14
+ dialogService;
15
+ messageService;
16
+ constructor(graphqlRatchet, dialogService, messageService) {
17
+ this.graphqlRatchet = graphqlRatchet;
18
+ this.dialogService = dialogService;
19
+ this.messageService = messageService;
20
+ }
21
+ async executeQuery(queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
22
+ let rval = null;
23
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
24
+ Logger.info('eq: %j -: %s --: %s ---: %j', queryName, variables);
25
+ try {
26
+ rval = await this.graphqlRatchet.executeQuery(queryName, variables, authStyle);
27
+ }
28
+ catch (err) {
29
+ Logger.error('Fail : %s', err);
30
+ }
31
+ finally {
32
+ this.messageService.clear();
33
+ }
34
+ return rval;
35
+ }
36
+ async executeQueryWithBlock(blockMessage, queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
37
+ let rval = null;
38
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
39
+ Logger.info('eqb: %j -: %s --: %s ---: %j', blockMessage, queryName, variables);
40
+ try {
41
+ rval = await BlockUiComponent.runPromiseWithUiBlock(this.dialogService, this.graphqlRatchet.executeQuery(queryName, variables, authStyle), blockMessage);
42
+ }
43
+ catch (err) {
44
+ Logger.error('Fail : %s', err);
45
+ }
46
+ finally {
47
+ this.messageService.clear();
48
+ }
49
+ return rval;
50
+ }
51
+ async executeMutate(queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
52
+ let rval = null;
53
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
54
+ Logger.info('eq: %j -: %s --: %s ---: %j', queryName, variables);
55
+ try {
56
+ rval = await this.graphqlRatchet.executeMutate(queryName, variables, authStyle);
57
+ }
58
+ catch (err) {
59
+ Logger.error('Fail : %s', err);
60
+ }
61
+ finally {
62
+ this.messageService.clear();
63
+ }
64
+ return rval;
65
+ }
66
+ async executeMutateWithBlock(blockMessage, queryName, variables, authStyle = AuthorizationStyle.TokenRequired) {
67
+ let rval = null;
68
+ this.messageService.add({ severity: 'info', summary: 'Running query', detail: queryName, life: 3000 });
69
+ try {
70
+ rval = await BlockUiComponent.runPromiseWithUiBlock(this.dialogService, this.graphqlRatchet.executeMutate(queryName, variables, authStyle), blockMessage);
71
+ }
72
+ catch (err) {
73
+ Logger.error('Fail : %s', err);
74
+ }
75
+ finally {
76
+ this.messageService.clear();
77
+ }
78
+ return rval;
79
+ }
80
+ static ɵfac = function GraphqlQueryService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || GraphqlQueryService)(i0.ɵɵinject(i1.GraphqlRatchet), i0.ɵɵinject(i2.DialogService), i0.ɵɵinject(i3.MessageService)); };
81
+ static ɵprov = i0.ɵɵdefineInjectable({ token: GraphqlQueryService, factory: GraphqlQueryService.ɵfac, providedIn: 'root' });
82
+ }
83
+ (() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(GraphqlQueryService, [{
84
+ type: Injectable,
85
+ args: [{ providedIn: 'root' }]
86
+ }], () => [{ type: i1.GraphqlRatchet }, { type: i2.DialogService }, { type: i3.MessageService }], null); })();
87
+ //# sourceMappingURL=graphql-query.service.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"graphql-query.service.js","sourceRoot":"","sources":["../../src/services/graphql-query.service.ts"],"names":[],"m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,cAAc,CAAC,aAAa,CAAI,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC;QACrF,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAEM,KAAK,CAAC,sBAAsB,CACjC,YAAoB,EACpB,SAAiB,EACjB,SAAc,EACd,YAAgC,kBAAkB,CAAC,aAAa;QAGhE,IAAI,IAAI,GAAa,IAAI,CAAC;QAC1B,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAEvG,IAAI,CAAC;YACH,IAAI,GAAG,MAAM,gBAAgB,CAAC,qBAAqB,CACjD,IAAI,CAAC,aAAa,EAClB,IAAI,CAAC,cAAc,CAAC,aAAa,CAAI,SAAS,EAAE,SAAS,EAAE,SAAS,CAAC,EACrE,YAAY,CACb,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,CAAC,KAAK,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC;QACjC,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;QAC9B,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;6GA5FU,mBAAmB;kDAAnB,mBAAmB,WAAnB,mBAAmB,mBADP,MAAM;;iFAClB,mBAAmB;cAD/B,UAAU;eAAC,EAAC,UAAU,EAAE,MAAM,EAAC"}
@@ -0,0 +1,11 @@
1
+ import * as i0 from "@angular/core";
2
+ export declare function storageFinder(): Storage | null;
3
+ export declare class LocalStorageService<T> {
4
+ private static readonly APP_NAME;
5
+ get storageReady(): boolean;
6
+ clear(): void;
7
+ update(value: T): T;
8
+ fetch(): T;
9
+ static ɵfac: i0.ɵɵFactoryDeclaration<LocalStorageService<any>, never>;
10
+ static ɵprov: i0.ɵɵInjectableDeclaration<LocalStorageService<any>>;
11
+ }