@bitblit/ngx-acute-common 5.1.636-alpha → 5.1.638-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.
- package/lib/constants.d.ts +2 -0
- package/lib/constants.js +3 -0
- package/lib/constants.js.map +1 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/services/local-storage.service.d.ts +2 -1
- package/lib/services/local-storage.service.js +16 -6
- package/lib/services/local-storage.service.js.map +1 -1
- package/package.json +6 -6
package/lib/constants.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GAA2B,IAAI,cAAc,CAAS,wBAAwB,CAAC,CAAC"}
|
package/lib/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './build/ngx-acute-common-info';
|
|
|
2
2
|
export * from './components/log-display/log-display.component';
|
|
3
3
|
export * from './components/dialogs/alert/alert.component';
|
|
4
4
|
export * from './components/process-monitor/process-monitor.component';
|
|
5
|
+
export * from './constants';
|
|
5
6
|
export * from './model/google-analytics-config';
|
|
6
7
|
export * from './pipes/capitalize.pipe';
|
|
7
8
|
export * from './pipes/dollar-formatted.pipe';
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export * from './build/ngx-acute-common-info';
|
|
|
2
2
|
export * from './components/log-display/log-display.component';
|
|
3
3
|
export * from './components/dialogs/alert/alert.component';
|
|
4
4
|
export * from './components/process-monitor/process-monitor.component';
|
|
5
|
+
export * from './constants';
|
|
5
6
|
export * from './model/google-analytics-config';
|
|
6
7
|
export * from './pipes/capitalize.pipe';
|
|
7
8
|
export * from './pipes/dollar-formatted.pipe';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAE9C,cAAc,gDAAgD,CAAC;AAE/D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,wDAAwD,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,+BAA+B,CAAC;AAE9C,cAAc,gDAAgD,CAAC;AAE/D,cAAc,4CAA4C,CAAC;AAE3D,cAAc,wDAAwD,CAAC;AAEvE,cAAc,aAAa,CAAC;AAE5B,cAAc,iCAAiC,CAAC;AAEhD,cAAc,yBAAyB,CAAC;AACxC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yBAAyB,CAAC;AACxC,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,qBAAqB,CAAC;AACpC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iCAAiC,CAAC;AAChD,cAAc,qBAAqB,CAAC;AAEpC,cAAc,qCAAqC,CAAC;AACpD,cAAc,kCAAkC,CAAC;AACjD,cAAc,kCAAkC,CAAC;AACjD,cAAc,+BAA+B,CAAC;AAE9C,cAAc,oDAAoD,CAAC;AACnE,cAAc,2CAA2C,CAAC;AAC1D,cAAc,kDAAkD,CAAC"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
2
|
export declare function storageFinder(): Storage | null;
|
|
3
3
|
export declare class LocalStorageService<T> {
|
|
4
|
-
private
|
|
4
|
+
private appName;
|
|
5
|
+
constructor(appName: string);
|
|
5
6
|
get storageReady(): boolean;
|
|
6
7
|
clear(): void;
|
|
7
8
|
update(value: T): T;
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import { Injectable } from
|
|
1
|
+
import { Inject, Injectable } from "@angular/core";
|
|
2
2
|
import { Logger } from '@bitblit/ratchet-common/logger/logger';
|
|
3
|
+
import { ACUTE_APPLICATION_NAME } from "../constants.js";
|
|
4
|
+
import { RequireRatchet } from "@bitblit/ratchet-common/lang/require-ratchet";
|
|
3
5
|
import * as i0 from "@angular/core";
|
|
4
6
|
export function storageFinder() {
|
|
5
7
|
if (typeof window !== 'undefined') {
|
|
@@ -10,7 +12,12 @@ export function storageFinder() {
|
|
|
10
12
|
return null;
|
|
11
13
|
}
|
|
12
14
|
export class LocalStorageService {
|
|
13
|
-
|
|
15
|
+
appName;
|
|
16
|
+
constructor(appName) {
|
|
17
|
+
this.appName = appName;
|
|
18
|
+
RequireRatchet.notNullUndefinedOrOnlyWhitespaceString(appName);
|
|
19
|
+
Logger.debug('Starting local storage with application name %s', this.appName);
|
|
20
|
+
}
|
|
14
21
|
get storageReady() {
|
|
15
22
|
return !!storageFinder();
|
|
16
23
|
}
|
|
@@ -22,7 +29,7 @@ export class LocalStorageService {
|
|
|
22
29
|
const toSave = value || {};
|
|
23
30
|
const saveString = JSON.stringify(toSave);
|
|
24
31
|
Logger.info('Updating storage to %s', saveString);
|
|
25
|
-
localStorage.setItem(
|
|
32
|
+
localStorage.setItem(this.appName, saveString);
|
|
26
33
|
return toSave;
|
|
27
34
|
}
|
|
28
35
|
else {
|
|
@@ -32,7 +39,7 @@ export class LocalStorageService {
|
|
|
32
39
|
}
|
|
33
40
|
fetch() {
|
|
34
41
|
if (this.storageReady) {
|
|
35
|
-
const loadString = localStorage.getItem(
|
|
42
|
+
const loadString = localStorage.getItem(this.appName) || '{}';
|
|
36
43
|
const rval = JSON.parse(loadString);
|
|
37
44
|
return rval;
|
|
38
45
|
}
|
|
@@ -41,11 +48,14 @@ export class LocalStorageService {
|
|
|
41
48
|
return {};
|
|
42
49
|
}
|
|
43
50
|
}
|
|
44
|
-
static ɵfac = function LocalStorageService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LocalStorageService)(); };
|
|
51
|
+
static ɵfac = function LocalStorageService_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || LocalStorageService)(i0.ɵɵinject(ACUTE_APPLICATION_NAME)); };
|
|
45
52
|
static ɵprov = i0.ɵɵdefineInjectable({ token: LocalStorageService, factory: LocalStorageService.ɵfac, providedIn: 'root' });
|
|
46
53
|
}
|
|
47
54
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(LocalStorageService, [{
|
|
48
55
|
type: Injectable,
|
|
49
56
|
args: [{ providedIn: 'root' }]
|
|
50
|
-
}],
|
|
57
|
+
}], () => [{ type: undefined, decorators: [{
|
|
58
|
+
type: Inject,
|
|
59
|
+
args: [ACUTE_APPLICATION_NAME]
|
|
60
|
+
}] }], null); })();
|
|
51
61
|
//# sourceMappingURL=local-storage.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"local-storage.service.js","sourceRoot":"","sources":["../../src/services/local-storage.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"local-storage.service.js","sourceRoot":"","sources":["../../src/services/local-storage.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,uCAAuC,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,8CAA8C,CAAC;;AAW9E,MAAM,UAAU,aAAa;IAC3B,IAAI,OAAO,MAAM,KAAK,WAAW,EAAE,CAAC;QAClC,IAAI,OAAO,MAAM,CAAC,YAAY,KAAK,WAAW,EAAE,CAAC;YAC/C,OAAO,MAAM,CAAC,YAAY,CAAC;QAC7B,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAGD,MAAM,OAAO,mBAAmB;IAEsB;IAApD,YAAoD,OAAe;QAAf,YAAO,GAAP,OAAO,CAA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AAU,EAAE,MAAM,EAAE;;sBAGnB,MAAM;uBAAC,sBAAsB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bitblit/ngx-acute-common",
|
|
3
|
-
"version": "5.1.
|
|
3
|
+
"version": "5.1.638-alpha",
|
|
4
4
|
"description": "Library for using angular",
|
|
5
5
|
"module": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|
|
@@ -44,8 +44,8 @@
|
|
|
44
44
|
"@angular/platform-browser": "19.2.9",
|
|
45
45
|
"@angular/platform-browser-dynamic": "19.2.9",
|
|
46
46
|
"@angular/router": "19.2.9",
|
|
47
|
-
"@bitblit/ratchet-common": "5.1.
|
|
48
|
-
"@bitblit/ratchet-graphql": "5.1.
|
|
47
|
+
"@bitblit/ratchet-common": "5.1.638-alpha",
|
|
48
|
+
"@bitblit/ratchet-graphql": "5.1.638-alpha",
|
|
49
49
|
"primeflex": "4.0.0",
|
|
50
50
|
"primeicons": "7.0.0",
|
|
51
51
|
"primeng": "19.1.2",
|
|
@@ -62,8 +62,8 @@
|
|
|
62
62
|
"@angular/platform-browser": "^19.2.9",
|
|
63
63
|
"@angular/platform-browser-dynamic": "^19.2.9",
|
|
64
64
|
"@angular/router": "^19.2.9",
|
|
65
|
-
"@bitblit/ratchet-common": "5.1.
|
|
66
|
-
"@bitblit/ratchet-graphql": "5.1.
|
|
65
|
+
"@bitblit/ratchet-common": "5.1.638-alpha",
|
|
66
|
+
"@bitblit/ratchet-graphql": "5.1.638-alpha",
|
|
67
67
|
"primeflex": "4.0.0",
|
|
68
68
|
"primeicons": "7.0.0",
|
|
69
69
|
"primeng": "19.1.2",
|
|
@@ -72,6 +72,6 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@angular/compiler-cli": "19.2.9",
|
|
75
|
-
"@bitblit/ratchet-node-only": "5.1.
|
|
75
|
+
"@bitblit/ratchet-node-only": "5.1.638-alpha"
|
|
76
76
|
}
|
|
77
77
|
}
|