@mgremy/core 0.0.1
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/README.md +3 -0
- package/fesm2022/mgremy-core.mjs +18 -0
- package/fesm2022/mgremy-core.mjs.map +1 -0
- package/package.json +28 -0
- package/types/mgremy-core.d.ts +49 -0
package/README.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
const APP_CONFIG_SERVICE = new InjectionToken('APP_CONFIG_SERVICE');
|
|
4
|
+
|
|
5
|
+
const APP_ENVIRONMENT_SERVICE = new InjectionToken('APP_ENVIRONMENT_SERVICE');
|
|
6
|
+
|
|
7
|
+
const APP_STORAGE_SERVICE = new InjectionToken('APP_STORAGE_SERVICE');
|
|
8
|
+
|
|
9
|
+
const APP_THEME_SERVICE = new InjectionToken('APP_THEME_SERVICE');
|
|
10
|
+
|
|
11
|
+
const APP_TRANSLATION_SERVICE = new InjectionToken('APP_TRANSLATION_SERVICE');
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Generated bundle index. Do not edit.
|
|
15
|
+
*/
|
|
16
|
+
|
|
17
|
+
export { APP_CONFIG_SERVICE, APP_ENVIRONMENT_SERVICE, APP_STORAGE_SERVICE, APP_THEME_SERVICE, APP_TRANSLATION_SERVICE };
|
|
18
|
+
//# sourceMappingURL=mgremy-core.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mgremy-core.mjs","sources":["../../../../libs/core/src/lib/app-config.service.ts","../../../../libs/core/src/lib/environment.service.ts","../../../../libs/core/src/lib/storage.service.ts","../../../../libs/core/src/lib/theme.service.ts","../../../../libs/core/src/lib/translation.service.ts","../../../../libs/core/src/mgremy-core.ts"],"sourcesContent":["import { InjectionToken } from '@angular/core';\n\nexport const APP_CONFIG_SERVICE = new InjectionToken<IAppConfigService>('APP_CONFIG_SERVICE');\n\nexport interface IAppConfigService {\n get appUrl(): string;\n get appBaseHref(): string;\n get apiUrl(): string;\n get defaultLanguage(): string;\n get authUrl(): string;\n get authRealm(): string;\n get authClientId(): string;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const APP_ENVIRONMENT_SERVICE = new InjectionToken<Environment>('APP_ENVIRONMENT_SERVICE');\n\nexport interface Environment {\n production: boolean;\n appUrl: string;\n appBaseHref: string;\n apiUrl: string;\n defaultLanguage: string;\n authUrl: string;\n authRealm: string;\n authClientId: string;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const APP_STORAGE_SERVICE = new InjectionToken<IStorageService>('APP_STORAGE_SERVICE');\n\nexport interface IStorageService {\n getItem(key: string): string | undefined;\n setItem(key: string, value: string): void;\n removeItem(key: string): void;\n clear(): void;\n}\n","import { InjectionToken } from '@angular/core';\n\nexport const APP_THEME_SERVICE = new InjectionToken<IAppThemeService>('APP_THEME_SERVICE');\n\nexport type AppTheme = 'light' | 'dark';\n\nexport interface IAppThemeService {\n getTheme(): AppTheme;\n setTheme(value: AppTheme): void;\n}\n","import { InjectionToken, Signal } from '@angular/core';\n\nexport const APP_TRANSLATION_SERVICE = new InjectionToken<ITranslationService>(\n 'APP_TRANSLATION_SERVICE'\n);\n\nexport interface ITranslationService {\n currentLanguage: Signal<string>;\n\n init(): void;\n setLanguage(code: string): void;\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;MAEa,kBAAkB,GAAG,IAAI,cAAc,CAAoB,oBAAoB;;MCA/E,uBAAuB,GAAG,IAAI,cAAc,CAAc,yBAAyB;;MCAnF,mBAAmB,GAAG,IAAI,cAAc,CAAkB,qBAAqB;;MCA/E,iBAAiB,GAAG,IAAI,cAAc,CAAmB,mBAAmB;;MCA5E,uBAAuB,GAAG,IAAI,cAAc,CACvD,yBAAyB;;ACH3B;;AAEG;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@mgremy/core",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"repository": {
|
|
8
|
+
"url": "https://github.com/MGREMY/nx_source"
|
|
9
|
+
},
|
|
10
|
+
"peerDependencies": {
|
|
11
|
+
"@angular/core": "^21.1.0"
|
|
12
|
+
},
|
|
13
|
+
"sideEffects": false,
|
|
14
|
+
"module": "fesm2022/mgremy-core.mjs",
|
|
15
|
+
"typings": "types/mgremy-core.d.ts",
|
|
16
|
+
"exports": {
|
|
17
|
+
"./package.json": {
|
|
18
|
+
"default": "./package.json"
|
|
19
|
+
},
|
|
20
|
+
".": {
|
|
21
|
+
"types": "./types/mgremy-core.d.ts",
|
|
22
|
+
"default": "./fesm2022/mgremy-core.mjs"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"dependencies": {
|
|
26
|
+
"tslib": "^2.3.0"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { InjectionToken, Signal } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
declare const APP_CONFIG_SERVICE: InjectionToken<IAppConfigService>;
|
|
4
|
+
interface IAppConfigService {
|
|
5
|
+
get appUrl(): string;
|
|
6
|
+
get appBaseHref(): string;
|
|
7
|
+
get apiUrl(): string;
|
|
8
|
+
get defaultLanguage(): string;
|
|
9
|
+
get authUrl(): string;
|
|
10
|
+
get authRealm(): string;
|
|
11
|
+
get authClientId(): string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
declare const APP_ENVIRONMENT_SERVICE: InjectionToken<Environment>;
|
|
15
|
+
interface Environment {
|
|
16
|
+
production: boolean;
|
|
17
|
+
appUrl: string;
|
|
18
|
+
appBaseHref: string;
|
|
19
|
+
apiUrl: string;
|
|
20
|
+
defaultLanguage: string;
|
|
21
|
+
authUrl: string;
|
|
22
|
+
authRealm: string;
|
|
23
|
+
authClientId: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
declare const APP_STORAGE_SERVICE: InjectionToken<IStorageService>;
|
|
27
|
+
interface IStorageService {
|
|
28
|
+
getItem(key: string): string | undefined;
|
|
29
|
+
setItem(key: string, value: string): void;
|
|
30
|
+
removeItem(key: string): void;
|
|
31
|
+
clear(): void;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare const APP_THEME_SERVICE: InjectionToken<IAppThemeService>;
|
|
35
|
+
type AppTheme = 'light' | 'dark';
|
|
36
|
+
interface IAppThemeService {
|
|
37
|
+
getTheme(): AppTheme;
|
|
38
|
+
setTheme(value: AppTheme): void;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare const APP_TRANSLATION_SERVICE: InjectionToken<ITranslationService>;
|
|
42
|
+
interface ITranslationService {
|
|
43
|
+
currentLanguage: Signal<string>;
|
|
44
|
+
init(): void;
|
|
45
|
+
setLanguage(code: string): void;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export { APP_CONFIG_SERVICE, APP_ENVIRONMENT_SERVICE, APP_STORAGE_SERVICE, APP_THEME_SERVICE, APP_TRANSLATION_SERVICE };
|
|
49
|
+
export type { AppTheme, Environment, IAppConfigService, IAppThemeService, IStorageService, ITranslationService };
|