@albi_scando/as-user-lib 1.0.0 → 1.0.2

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 (55) hide show
  1. package/dist/as-user-lib/esm2022/albi_scando-as-user-lib.mjs +5 -0
  2. package/dist/as-user-lib/esm2022/lib/assets/jsons/default.json +6 -0
  3. package/dist/as-user-lib/esm2022/lib/constants/default.mjs +3 -0
  4. package/dist/as-user-lib/esm2022/lib/constants/user-levels.constant.mjs +7 -0
  5. package/dist/as-user-lib/esm2022/lib/interfaces/setup.interface.mjs +2 -0
  6. package/dist/as-user-lib/esm2022/lib/interfaces/user.interface.mjs +2 -0
  7. package/dist/as-user-lib/esm2022/lib/services/user/user.service.interface.mjs +2 -0
  8. package/dist/as-user-lib/esm2022/lib/services/user/user.service.mjs +67 -0
  9. package/dist/as-user-lib/esm2022/lib/types/user-levels.type.mjs +2 -0
  10. package/dist/as-user-lib/esm2022/public-api.mjs +3 -0
  11. package/dist/as-user-lib/fesm2022/albi_scando-as-user-lib.mjs +89 -0
  12. package/dist/as-user-lib/fesm2022/albi_scando-as-user-lib.mjs.map +1 -0
  13. package/dist/as-user-lib/index.d.ts +5 -0
  14. package/dist/as-user-lib/lib/constants/default.d.ts +2 -0
  15. package/dist/as-user-lib/lib/constants/user-levels.constant.d.ts +6 -0
  16. package/dist/as-user-lib/lib/interfaces/setup.interface.d.ts +12 -0
  17. package/dist/as-user-lib/lib/interfaces/user.interface.d.ts +4 -0
  18. package/dist/as-user-lib/lib/services/user/user.service.d.ts +38 -0
  19. package/dist/as-user-lib/lib/services/user/user.service.interface.d.ts +7 -0
  20. package/dist/as-user-lib/lib/types/user-levels.type.d.ts +5 -0
  21. package/{projects/as-user-lib/src/public-api.ts → dist/as-user-lib/public-api.d.ts} +2 -1
  22. package/package.json +16 -2
  23. package/.angular/cache/17.3.17/ng-packagr/content-v2/sha512/9d/fd/3fd55b26dcebe15942c5fcc9d91f126ab17aba5ae4847a1e6669d10a3937ae327ab7c84a1f4b56583a73a8a0473ba722d0a42604d32dd58d1e0db4dc1e7e +0 -1
  24. package/.angular/cache/17.3.17/ng-packagr/content-v2/sha512/ac/02/eb68f5ca49f0ea1c01a46039194800d290d84257295fef668e0c877bba68eaf2e504053d2ed8dee20c6442a51bb35d1400a87012e5acf4852e58a464fbd1 +0 -1
  25. package/.angular/cache/17.3.17/ng-packagr/index-v5/52/8e/d5f62923c58f20a739e6b432e095b1e4846c23ce8a4e4451e24eb60c013a +0 -2
  26. package/.angular/cache/17.3.17/ng-packagr/index-v5/9a/30/7474355403522bcd93ad14a10c0167619ea6f7e10596584f6d1f150b6d4a +0 -2
  27. package/.branchlintrc.json +0 -30
  28. package/.editorconfig +0 -17
  29. package/.github/workflows/release.yml +0 -48
  30. package/.husky/commit-msg +0 -5
  31. package/.husky/pre-commit +0 -1
  32. package/.husky/pre-push +0 -5
  33. package/.nvmrc +0 -1
  34. package/.prettierignore +0 -5
  35. package/.releaserc.json +0 -11
  36. package/CHANGELOG.md +0 -15
  37. package/angular.json +0 -40
  38. package/commitlint.config.js +0 -1
  39. package/documentation/pages/CONTRIBUTING.md +0 -11
  40. package/documentation/pages/INSTALLATION.md +0 -17
  41. package/documentation/pages/LICENSE.md +0 -6
  42. package/eslint.config.js +0 -173
  43. package/lint-staged.config.js +0 -13
  44. package/netlify.toml +0 -6
  45. package/prettier.config.js +0 -12
  46. package/projects/as-user-lib/ng-package.json +0 -7
  47. package/projects/as-user-lib/package.json +0 -12
  48. package/projects/as-user-lib/tsconfig.lib.json +0 -12
  49. package/projects/as-user-lib/tsconfig.lib.prod.json +0 -10
  50. package/projects/as-user-lib/tsconfig.spec.json +0 -9
  51. package/scripts/check-branch.sh +0 -7
  52. package/scripts/lint-project.sh +0 -11
  53. package/tsconfig.json +0 -34
  54. package/typedoc.json +0 -7
  55. /package/{projects → dist}/as-user-lib/README.md +0 -0
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './public-api';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxiaV9zY2FuZG8tYXMtdXNlci1saWIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvYWxiaV9zY2FuZG8tYXMtdXNlci1saWIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==
@@ -0,0 +1,6 @@
1
+ {
2
+ "language": {
3
+ "username": "user",
4
+ "updateAPI": ""
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ export const DEFAULT_USERNAME = 'guest';
2
+ export const DEFAULT_LEVEL = 'guest';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9saWIvY29uc3RhbnRzL2RlZmF1bHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQUcsT0FBTyxDQUFDO0FBQ3hDLE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBRyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgREVGQVVMVF9VU0VSTkFNRSA9ICdndWVzdCc7XG5leHBvcnQgY29uc3QgREVGQVVMVF9MRVZFTCA9ICdndWVzdCc7XG4iXX0=
@@ -0,0 +1,7 @@
1
+ /**
2
+ * User levels constants.
3
+ */
4
+ export const USER_LEVELS = {
5
+ GUEST: 'guest',
6
+ };
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1sZXZlbHMuY29uc3RhbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvbGliL2NvbnN0YW50cy91c2VyLWxldmVscy5jb25zdGFudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRztJQUN6QixLQUFLLEVBQUUsT0FBTztDQUNmLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIFVzZXIgbGV2ZWxzIGNvbnN0YW50cy5cbiAqL1xuZXhwb3J0IGNvbnN0IFVTRVJfTEVWRUxTID0ge1xuICBHVUVTVDogJ2d1ZXN0Jyxcbn1cbiJdfQ==
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dXAuaW50ZXJmYWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXMtdXNlci1saWIvc3JjL2xpYi9pbnRlcmZhY2VzL3NldHVwLmludGVyZmFjZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLy8gVHlwZXNcbmltcG9ydCB0eXBlIHsgVXNlckxldmVscyB9IGZyb20gXCIuLi90eXBlcy91c2VyLWxldmVscy50eXBlXCI7XG5cbi8qKlxuICogQ29uZmlndXJhdGlvbiBpbnRlcmZhY2VcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBJVXNlckxpYlNldHVwIHtcbiAgdXNlcm5hbWU6IHN0cmluZztcbiAgbGV2ZWw6IFVzZXJMZXZlbHM7XG4gIGFwaT86IEFQSTtcbn1cblxuZXhwb3J0IGludGVyZmFjZSBBUEkge1xuICBwYXRjaFVzZXJEYXRhQVBJVXJsOiBzdHJpbmc7XG59XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5pbnRlcmZhY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvbGliL2ludGVyZmFjZXMvdXNlci5pbnRlcmZhY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgTG9jYWxlcyB9IGZyb20gXCJAYWxiaV9zY2FuZG8vYXMtY29uc3QtbGFuZ3VhZ2VzLWxpYlwiO1xuXG5leHBvcnQgaW50ZXJmYWNlIFVzZXIge1xuICBsYW5ndWFnZTogTG9jYWxlcztcbn0iXX0=
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5zZXJ2aWNlLmludGVyZmFjZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9saWIvc2VydmljZXMvdXNlci91c2VyLnNlcnZpY2UuaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgdHlwZSB7IFdyaXRhYmxlU2lnbmFsIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmV4cG9ydCBpbnRlcmZhY2UgSVVzZXJTZXJ2aWNlIHtcbiAgLyoqXG4gICAqIFRva2VuIHNpZ25hbFxuICAgKi9cbiAgdG9rZW46IFdyaXRhYmxlU2lnbmFsPHN0cmluZyB8IHVuZGVmaW5lZD47XG59XG4iXX0=
@@ -0,0 +1,67 @@
1
+ import { STRING_EMPTY } from '@albi_scando/as-const-lib';
2
+ import { Injectable, signal } from '@angular/core';
3
+ import { of, take } from 'rxjs';
4
+ import defaultConfigJSON from '../../assets/jsons/default.json';
5
+ // Constants
6
+ import { DEFAULT_LEVEL, DEFAULT_USERNAME } from '../../constants/default';
7
+ import * as i0 from "@angular/core";
8
+ export class UserService {
9
+ /**
10
+ * Constructor
11
+ * @constructor
12
+ * @ignore
13
+ */
14
+ constructor() {
15
+ this.username = signal(undefined);
16
+ /**
17
+ * {@link IUserService.token}
18
+ */
19
+ this.token = signal(undefined);
20
+ this._initialize();
21
+ }
22
+ /**
23
+ * {@link IUserService.setup$}
24
+ */
25
+ setup$(setup) {
26
+ this.reset();
27
+ this.setUsername(setup.username);
28
+ return of(undefined);
29
+ }
30
+ /**
31
+ * {@link IUserService.reset}
32
+ */
33
+ reset() {
34
+ this._initialize();
35
+ }
36
+ /**
37
+ * {@link IUserService.setUsername}
38
+ */
39
+ setUsername(username) {
40
+ this.username.set(username);
41
+ }
42
+ /**
43
+ * Initialization method
44
+ *
45
+ * @returns {void}
46
+ */
47
+ _initialize() {
48
+ const config = defaultConfigJSON;
49
+ const setup = {
50
+ username: config.language?.username ?? DEFAULT_USERNAME,
51
+ level: DEFAULT_LEVEL,
52
+ api: {
53
+ patchUserDataAPIUrl: config.language?.updateAPI ?? STRING_EMPTY,
54
+ },
55
+ };
56
+ this.setup$(setup).pipe(take(1)).subscribe();
57
+ }
58
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
59
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserService, providedIn: 'root' }); }
60
+ }
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserService, decorators: [{
62
+ type: Injectable,
63
+ args: [{
64
+ providedIn: 'root',
65
+ }]
66
+ }], ctorParameters: () => [] });
67
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXMtdXNlci1saWIvc3JjL2xpYi9zZXJ2aWNlcy91c2VyL3VzZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFFekQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFbkQsT0FBTyxFQUFFLEVBQUUsRUFBRSxJQUFJLEVBQUUsTUFBTSxNQUFNLENBQUM7QUFJaEMsT0FBTyxpQkFBaUIsTUFBTSxpQ0FBaUMsQ0FBQztBQUNoRSxZQUFZO0FBQ1osT0FBTyxFQUFFLGFBQWEsRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHlCQUF5QixDQUFDOztBQU8xRSxNQUFNLE9BQU8sV0FBVztJQVF0Qjs7OztPQUlHO0lBQ0g7UUFaTyxhQUFRLEdBQXVDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQztRQUV4RTs7V0FFRztRQUNJLFVBQUssR0FBdUMsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDO1FBUW5FLElBQUksQ0FBQyxXQUFXLEVBQUUsQ0FBQztJQUNyQixDQUFDO0lBRUQ7O09BRUc7SUFDSSxNQUFNLENBQUMsS0FBb0I7UUFDaEMsSUFBSSxD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cbiAgICAgIHVzZXJuYW1lOiBjb25maWcubGFuZ3VhZ2U/LnVzZXJuYW1lID8/IERFRkFVTFRfVVNFUk5BTUUsXG4gICAgICBsZXZlbDogREVGQVVMVF9MRVZFTCBhcyBJVXNlckxpYlNldHVwWydsZXZlbCddLFxuICAgICAgYXBpOiB7XG4gICAgICAgIHBhdGNoVXNlckRhdGFBUElVcmw6IGNvbmZpZy5sYW5ndWFnZT8udXBkYXRlQVBJID8/IFNUUklOR19FTVBUWSxcbiAgICAgIH0sXG4gICAgfTtcblxuICAgIHRoaXMuc2V0dXAkKHNldHVwKS5waXBlKHRha2UoMSkpLnN1YnNjcmliZSgpO1xuICB9XG59XG4iXX0=
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1sZXZlbHMudHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9saWIvdHlwZXMvdXNlci1sZXZlbHMudHlwZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLy8gQ29uc3RhbnRzXG5pbXBvcnQgdHlwZSB7IFVTRVJfTEVWRUxTIH0gZnJvbSAnLi4vY29uc3RhbnRzL3VzZXItbGV2ZWxzLmNvbnN0YW50LmpzJztcblxuLyoqXG4gKiBVbmlvbiB0eXBlIG9mIGFsbCB2YWx1ZXMgaW4gdGhlIHtAbGluayBVU0VSX0xFVkVMU30gY29uc3RhbnQuXG4gKi9cbmV4cG9ydCB0eXBlIFVzZXJMZXZlbHMgPSAodHlwZW9mIFVTRVJfTEVWRUxTKVtrZXlvZiB0eXBlb2YgVVNFUl9MRVZFTFNdO1xuIl19
@@ -0,0 +1,3 @@
1
+ export { USER_LEVELS } from './lib/constants/user-levels.constant';
2
+ export { UserService } from './lib/services/user/user.service';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQztBQUVuRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0NBQWtDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBVU0VSX0xFVkVMUyB9IGZyb20gJy4vbGliL2NvbnN0YW50cy91c2VyLWxldmVscy5jb25zdGFudCc7XG5leHBvcnQgeyBJVXNlckxpYlNldHVwIH0gZnJvbSAnLi9saWIvaW50ZXJmYWNlcy9zZXR1cC5pbnRlcmZhY2UnO1xuZXhwb3J0IHsgVXNlclNlcnZpY2UgfSBmcm9tICcuL2xpYi9zZXJ2aWNlcy91c2VyL3VzZXIuc2VydmljZSc7XG5leHBvcnQgeyBVc2VyTGV2ZWxzIH0gZnJvbSAnLi9saWIvdHlwZXMvdXNlci1sZXZlbHMudHlwZSc7XG5leHBvcnQgeyBVc2VyIH0gZnJvbSAnLi9saWIvaW50ZXJmYWNlcy91c2VyLmludGVyZmFjZSc7XG4iXX0=
@@ -0,0 +1,89 @@
1
+ import { STRING_EMPTY } from '@albi_scando/as-const-lib';
2
+ import * as i0 from '@angular/core';
3
+ import { signal, Injectable } from '@angular/core';
4
+ import { of, take } from 'rxjs';
5
+
6
+ /**
7
+ * User levels constants.
8
+ */
9
+ const USER_LEVELS = {
10
+ GUEST: 'guest',
11
+ };
12
+
13
+ var language = {
14
+ username: "user",
15
+ updateAPI: ""
16
+ };
17
+ var defaultConfigJSON = {
18
+ language: language
19
+ };
20
+
21
+ const DEFAULT_USERNAME = 'guest';
22
+ const DEFAULT_LEVEL = 'guest';
23
+
24
+ class UserService {
25
+ /**
26
+ * Constructor
27
+ * @constructor
28
+ * @ignore
29
+ */
30
+ constructor() {
31
+ this.username = signal(undefined);
32
+ /**
33
+ * {@link IUserService.token}
34
+ */
35
+ this.token = signal(undefined);
36
+ this._initialize();
37
+ }
38
+ /**
39
+ * {@link IUserService.setup$}
40
+ */
41
+ setup$(setup) {
42
+ this.reset();
43
+ this.setUsername(setup.username);
44
+ return of(undefined);
45
+ }
46
+ /**
47
+ * {@link IUserService.reset}
48
+ */
49
+ reset() {
50
+ this._initialize();
51
+ }
52
+ /**
53
+ * {@link IUserService.setUsername}
54
+ */
55
+ setUsername(username) {
56
+ this.username.set(username);
57
+ }
58
+ /**
59
+ * Initialization method
60
+ *
61
+ * @returns {void}
62
+ */
63
+ _initialize() {
64
+ const config = defaultConfigJSON;
65
+ const setup = {
66
+ username: config.language?.username ?? DEFAULT_USERNAME,
67
+ level: DEFAULT_LEVEL,
68
+ api: {
69
+ patchUserDataAPIUrl: config.language?.updateAPI ?? STRING_EMPTY,
70
+ },
71
+ };
72
+ this.setup$(setup).pipe(take(1)).subscribe();
73
+ }
74
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
75
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserService, providedIn: 'root' }); }
76
+ }
77
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: UserService, decorators: [{
78
+ type: Injectable,
79
+ args: [{
80
+ providedIn: 'root',
81
+ }]
82
+ }], ctorParameters: () => [] });
83
+
84
+ /**
85
+ * Generated bundle index. Do not edit.
86
+ */
87
+
88
+ export { USER_LEVELS, UserService };
89
+ //# sourceMappingURL=albi_scando-as-user-lib.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"albi_scando-as-user-lib.mjs","sources":["../../../projects/as-user-lib/src/lib/constants/user-levels.constant.ts","../../../projects/as-user-lib/src/lib/constants/default.ts","../../../projects/as-user-lib/src/lib/services/user/user.service.ts","../../../projects/as-user-lib/src/albi_scando-as-user-lib.ts"],"sourcesContent":["/**\n * User levels constants.\n */\nexport const USER_LEVELS = {\n GUEST: 'guest',\n}\n","export const DEFAULT_USERNAME = 'guest';\nexport const DEFAULT_LEVEL = 'guest';\n","import { STRING_EMPTY } from '@albi_scando/as-const-lib';\nimport type { WritableSignal} from '@angular/core';\nimport { Injectable, signal } from '@angular/core';\nimport type { Observable} from 'rxjs';\nimport { of, take } from 'rxjs';\n\n// Assets\nimport type { IUserService } from './user.service.interface';\nimport defaultConfigJSON from '../../assets/jsons/default.json';\n// Constants\nimport { DEFAULT_LEVEL, DEFAULT_USERNAME } from '../../constants/default';\n// Interfaces\nimport type { IUserLibSetup } from '../../interfaces/setup.interface';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class UserService implements IUserService {\n public username: WritableSignal<string | undefined> = signal(undefined);\n\n /**\n * {@link IUserService.token}\n */\n public token: WritableSignal<string | undefined> = signal(undefined);\n\n /**\n * Constructor\n * @constructor\n * @ignore\n */\n constructor() {\n this._initialize();\n }\n\n /**\n * {@link IUserService.setup$}\n */\n public setup$(setup: IUserLibSetup): Observable<void> {\n this.reset();\n\n this.setUsername(setup.username);\n\n return of(undefined);\n }\n\n /**\n * {@link IUserService.reset}\n */\n public reset(): void {\n this._initialize();\n }\n\n /**\n * {@link IUserService.setUsername}\n */\n public setUsername(username: string): void {\n this.username.set(username);\n }\n\n /**\n * Initialization method\n * \n * @returns {void}\n */\n private _initialize(): void {\n const config = defaultConfigJSON as {\n language?: {\n username?: string;\n updateAPI?: string;\n };\n };\n\n const setup: IUserLibSetup = {\n username: config.language?.username ?? DEFAULT_USERNAME,\n level: DEFAULT_LEVEL as IUserLibSetup['level'],\n api: {\n patchUserDataAPIUrl: config.language?.updateAPI ?? STRING_EMPTY,\n },\n };\n\n this.setup$(setup).pipe(take(1)).subscribe();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;AAAA;;AAEG;AACI,MAAM,WAAW,GAAG;AACzB,IAAA,KAAK,EAAE,OAAO;;;;;;;;;;;ACJT,MAAM,gBAAgB,GAAG,OAAO;AAChC,MAAM,aAAa,GAAG,OAAO;;MCgBvB,WAAW,CAAA;AAQtB;;;;AAIG;AACH,IAAA,WAAA,GAAA;AAZO,QAAA,IAAA,CAAA,QAAQ,GAAuC,MAAM,CAAC,SAAS,CAAC;AAEvE;;AAEG;AACI,QAAA,IAAA,CAAA,KAAK,GAAuC,MAAM,CAAC,SAAS,CAAC;QAQlE,IAAI,CAAC,WAAW,EAAE;IACpB;AAEA;;AAEG;AACI,IAAA,MAAM,CAAC,KAAoB,EAAA;QAChC,IAAI,CAAC,KAAK,EAAE;AAEZ,QAAA,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC;AAEhC,QAAA,OAAO,EAAE,CAAC,SAAS,CAAC;IACtB;AAEA;;AAEG;IACI,KAAK,GAAA;QACV,IAAI,CAAC,WAAW,EAAE;IACpB;AAEA;;AAEG;AACI,IAAA,WAAW,CAAC,QAAgB,EAAA;AACjC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC7B;AAEA;;;;AAIG;IACK,WAAW,GAAA;QACjB,MAAM,MAAM,GAAG,iBAKd;AAED,QAAA,MAAM,KAAK,GAAkB;AAC3B,YAAA,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,QAAQ,IAAI,gBAAgB;AACvD,YAAA,KAAK,EAAE,aAAuC;AAC9C,YAAA,GAAG,EAAE;AACH,gBAAA,mBAAmB,EAAE,MAAM,CAAC,QAAQ,EAAE,SAAS,IAAI,YAAY;AAChE,aAAA;SACF;AAED,QAAA,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE;IAC9C;+GAhEW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA,CAAA;;4FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;AChBD;;AAEG;;;;"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ /// <amd-module name="@albi_scando/as-user-lib" />
5
+ export * from './public-api';
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_USERNAME = "guest";
2
+ export declare const DEFAULT_LEVEL = "guest";
@@ -0,0 +1,6 @@
1
+ /**
2
+ * User levels constants.
3
+ */
4
+ export declare const USER_LEVELS: {
5
+ GUEST: string;
6
+ };
@@ -0,0 +1,12 @@
1
+ import type { UserLevels } from "../types/user-levels.type";
2
+ /**
3
+ * Configuration interface
4
+ */
5
+ export interface IUserLibSetup {
6
+ username: string;
7
+ level: UserLevels;
8
+ api?: API;
9
+ }
10
+ export interface API {
11
+ patchUserDataAPIUrl: string;
12
+ }
@@ -0,0 +1,4 @@
1
+ import type { Locales } from "@albi_scando/as-const-languages-lib";
2
+ export interface User {
3
+ language: Locales;
4
+ }
@@ -0,0 +1,38 @@
1
+ import type { WritableSignal } from '@angular/core';
2
+ import type { Observable } from 'rxjs';
3
+ import type { IUserService } from './user.service.interface';
4
+ import type { IUserLibSetup } from '../../interfaces/setup.interface';
5
+ import * as i0 from "@angular/core";
6
+ export declare class UserService implements IUserService {
7
+ username: WritableSignal<string | undefined>;
8
+ /**
9
+ * {@link IUserService.token}
10
+ */
11
+ token: WritableSignal<string | undefined>;
12
+ /**
13
+ * Constructor
14
+ * @constructor
15
+ * @ignore
16
+ */
17
+ constructor();
18
+ /**
19
+ * {@link IUserService.setup$}
20
+ */
21
+ setup$(setup: IUserLibSetup): Observable<void>;
22
+ /**
23
+ * {@link IUserService.reset}
24
+ */
25
+ reset(): void;
26
+ /**
27
+ * {@link IUserService.setUsername}
28
+ */
29
+ setUsername(username: string): void;
30
+ /**
31
+ * Initialization method
32
+ *
33
+ * @returns {void}
34
+ */
35
+ private _initialize;
36
+ static ɵfac: i0.ɵɵFactoryDeclaration<UserService, never>;
37
+ static ɵprov: i0.ɵɵInjectableDeclaration<UserService>;
38
+ }
@@ -0,0 +1,7 @@
1
+ import type { WritableSignal } from '@angular/core';
2
+ export interface IUserService {
3
+ /**
4
+ * Token signal
5
+ */
6
+ token: WritableSignal<string | undefined>;
7
+ }
@@ -0,0 +1,5 @@
1
+ import type { USER_LEVELS } from '../constants/user-levels.constant.js';
2
+ /**
3
+ * Union type of all values in the {@link USER_LEVELS} constant.
4
+ */
5
+ export type UserLevels = (typeof USER_LEVELS)[keyof typeof USER_LEVELS];
@@ -1,4 +1,5 @@
1
1
  export { USER_LEVELS } from './lib/constants/user-levels.constant';
2
- export { IUserLibSetup } from './lib/models/setup.interface';
2
+ export { IUserLibSetup } from './lib/interfaces/setup.interface';
3
3
  export { UserService } from './lib/services/user/user.service';
4
4
  export { UserLevels } from './lib/types/user-levels.type';
5
+ export { User } from './lib/interfaces/user.interface';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@albi_scando/as-user-lib",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "A library for managing languages in Angular applications, providing services and utilities to handle localization and internationalization.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,7 +12,19 @@
12
12
  "url": "https://github.com/albertoscandolara/as-user-lib/issues"
13
13
  },
14
14
  "homepage": "https://github.com/albertoscandolara/as-user-lib#readme",
15
- "main": "index.js",
15
+ "main": "dist/as-user-lib/index.js",
16
+ "module": "dist/as-user-lib/index.esm2022.js",
17
+ "types": "dist/as-user-lib/index.d.ts",
18
+ "exports": {
19
+ ".": {
20
+ "import": "./dist/as-user-lib/index.esm2022.js",
21
+ "require": "./dist/as-user-lib/index.js",
22
+ "types": "./dist/as-user-lib/index.d.ts"
23
+ }
24
+ },
25
+ "files": [
26
+ "dist/as-user-lib"
27
+ ],
16
28
  "scripts": {
17
29
  "ng": "ng",
18
30
  "start": "ng serve",
@@ -34,6 +46,7 @@
34
46
  "release:dry": "semantic-release --dry-run"
35
47
  },
36
48
  "devDependencies": {
49
+ "@albi_scando/as-const-languages-lib": "^1.1.0",
37
50
  "@albi_scando/as-const-lib": "^1.10.1",
38
51
  "@angular-devkit/build-angular": "^17.3.0",
39
52
  "@angular/cli": "^17.3.0",
@@ -75,6 +88,7 @@
75
88
  "validate-branch-name": "^1.3.2"
76
89
  },
77
90
  "dependencies": {
91
+ "@albi_scando/as-const-languages-lib": "^1.1.0",
78
92
  "@albi_scando/as-const-lib": "^1.10.1",
79
93
  "@angular/animations": "^17.3.0",
80
94
  "@angular/common": "^17.3.0",
@@ -1 +0,0 @@
1
- {"modules":[{"ast":{"type":"Program","start":0,"end":636,"body":[{"type":"ExportNamedDeclaration","start":34,"end":85,"specifiers":[],"source":null,"attributes":[],"declaration":{"type":"VariableDeclaration","start":41,"end":85,"kind":"const","declarations":[{"type":"VariableDeclarator","start":47,"end":84,"id":{"type":"Identifier","start":47,"end":58,"name":"USER_LEVELS"},"init":{"type":"ObjectExpression","start":61,"end":84,"properties":[{"type":"Property","start":67,"end":81,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":67,"end":72,"name":"GUEST"},"value":{"type":"Literal","start":74,"end":81,"value":"guest","raw":"'guest'"},"kind":"init"}]}}]}}],"_rollupRemoved":[{"end":636,"start":86,"type":"sourcemap"}],"sourceType":"module"},"attributes":{},"code":"/**\n * User levels constants.\n */\nexport const USER_LEVELS = {\n GUEST: 'guest',\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1sZXZlbHMuY29uc3RhbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvbGliL2NvbnN0YW50cy91c2VyLWxldmVscy5jb25zdGFudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRztJQUN6QixLQUFLLEVBQUUsT0FBTztDQUNmLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogVXNlciBsZXZlbHMgY29uc3RhbnRzLlxyXG4gKi9cclxuZXhwb3J0IGNvbnN0IFVTRVJfTEVWRUxTID0ge1xyXG4gIEdVRVNUOiAnZ3Vlc3QnLFxyXG59XHJcbiJdfQ==","customTransformCache":false,"dependencies":[],"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\user-levels.constant.mjs","meta":{},"moduleSideEffects":true,"originalCode":"/**\n * User levels constants.\n */\nexport const USER_LEVELS = {\n GUEST: 'guest',\n};\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci1sZXZlbHMuY29uc3RhbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvbGliL2NvbnN0YW50cy91c2VyLWxldmVscy5jb25zdGFudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7R0FFRztBQUNILE1BQU0sQ0FBQyxNQUFNLFdBQVcsR0FBRztJQUN6QixLQUFLLEVBQUUsT0FBTztDQUNmLENBQUEiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcclxuICogVXNlciBsZXZlbHMgY29uc3RhbnRzLlxyXG4gKi9cclxuZXhwb3J0IGNvbnN0IFVTRVJfTEVWRUxTID0ge1xyXG4gIEdVRVNUOiAnZ3Vlc3QnLFxyXG59XHJcbiJdfQ==","originalSourcemap":{"version":3,"file":"user-levels.constant.js","sourceRoot":"","sources":["../../../../../projects/as-user-lib/src/lib/constants/user-levels.constant.ts"],"names":[],"mappings":[[[0,0,0,0]],[],[[3,0,2,3]],[[0,0,3,0],[6,0,3,6],[7,0,3,7],[13,0,3,13],[24,0,3,24],[27,0,3,27]],[[4,0,4,2],[9,0,4,7],[11,0,4,9],[18,0,4,16]],[[1,0,5,1],[2,0,5,1]]],"sourcesContent":["/**\r\n * User levels constants.\r\n */\r\nexport const USER_LEVELS = {\r\n GUEST: 'guest',\r\n}\r\n"]},"resolvedIds":{},"safeVariableNames":{"USER_LEVELS":"USER_LEVELS"},"sourcemapChain":[],"syntheticNamedExports":false,"transformDependencies":[]},{"ast":{"type":"Program","start":0,"end":101,"body":[{"type":"ExportNamedDeclaration","start":0,"end":60,"specifiers":[],"source":null,"attributes":[],"declaration":{"type":"VariableDeclaration","start":7,"end":60,"kind":"var","declarations":[{"type":"VariableDeclarator","start":11,"end":59,"id":{"type":"Identifier","start":11,"end":19,"name":"language"},"init":{"type":"ObjectExpression","start":22,"end":59,"properties":[{"type":"Property","start":25,"end":41,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":25,"end":33,"name":"username"},"value":{"type":"Literal","start":35,"end":41,"value":"user","raw":"\"user\""},"kind":"init"},{"type":"Property","start":44,"end":57,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":44,"end":53,"name":"updateAPI"},"value":{"type":"Literal","start":55,"end":57,"value":"","raw":"\"\""},"kind":"init"}]}}]}},{"type":"ExportDefaultDeclaration","start":61,"end":100,"declaration":{"type":"ObjectExpression","start":76,"end":99,"properties":[{"type":"Property","start":79,"end":97,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":79,"end":87,"name":"language"},"value":{"type":"Identifier","start":89,"end":97,"name":"language"},"kind":"init"}]}}],"sourceType":"module"},"attributes":{},"code":"export var language = {\n\tusername: \"user\",\n\tupdateAPI: \"\"\n};\nexport default {\n\tlanguage: language\n};\n","customTransformCache":false,"dependencies":[],"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\assets\\jsons\\default.json","meta":{},"moduleSideEffects":true,"originalCode":"{\n \"language\": {\n \"username\": \"user\",\n \"updateAPI\": \"\"\n }\n}\n","originalSourcemap":null,"resolvedIds":{},"safeVariableNames":{"language":"language","defaultConfigJSON":"defaultConfigJSON"},"sourcemapChain":[{"mappings":[],"names":[],"sources":[],"version":3}],"syntheticNamedExports":false,"transformDependencies":[]},{"ast":{"type":"Program","start":0,"end":609,"body":[{"type":"ExportNamedDeclaration","start":0,"end":40,"specifiers":[],"source":null,"attributes":[],"declaration":{"type":"VariableDeclaration","start":7,"end":40,"kind":"const","declarations":[{"type":"VariableDeclarator","start":13,"end":39,"id":{"type":"Identifier","start":13,"end":29,"name":"DEFAULT_USERNAME"},"init":{"type":"Literal","start":32,"end":39,"value":"guest","raw":"'guest'"}}]}},{"type":"ExportNamedDeclaration","start":41,"end":78,"specifiers":[],"source":null,"attributes":[],"declaration":{"type":"VariableDeclaration","start":48,"end":78,"kind":"const","declarations":[{"type":"VariableDeclarator","start":54,"end":77,"id":{"type":"Identifier","start":54,"end":67,"name":"DEFAULT_LEVEL"},"init":{"type":"Literal","start":70,"end":77,"value":"guest","raw":"'guest'"}}]}}],"_rollupRemoved":[{"end":609,"start":79,"type":"sourcemap"}],"sourceType":"module"},"attributes":{},"code":"export const DEFAULT_USERNAME = 'guest';\nexport const DEFAULT_LEVEL = 'guest';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9saWIvY29uc3RhbnRzL2RlZmF1bHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQVcsT0FBTyxDQUFDO0FBQ2hELE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBVyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgREVGQVVMVF9VU0VSTkFNRTogc3RyaW5nID0gJ2d1ZXN0JztcclxuZXhwb3J0IGNvbnN0IERFRkFVTFRfTEVWRUw6IHN0cmluZyA9ICdndWVzdCc7XHJcbiJdfQ==","customTransformCache":false,"dependencies":[],"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\default.mjs","meta":{},"moduleSideEffects":true,"originalCode":"export const DEFAULT_USERNAME = 'guest';\nexport const DEFAULT_LEVEL = 'guest';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVmYXVsdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9saWIvY29uc3RhbnRzL2RlZmF1bHQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFDLE1BQU0sZ0JBQWdCLEdBQVcsT0FBTyxDQUFDO0FBQ2hELE1BQU0sQ0FBQyxNQUFNLGFBQWEsR0FBVyxPQUFPLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgY29uc3QgREVGQVVMVF9VU0VSTkFNRTogc3RyaW5nID0gJ2d1ZXN0JztcclxuZXhwb3J0IGNvbnN0IERFRkFVTFRfTEVWRUw6IHN0cmluZyA9ICdndWVzdCc7XHJcbiJdfQ==","originalSourcemap":{"version":3,"file":"default.js","sourceRoot":"","sources":["../../../../../projects/as-user-lib/src/lib/constants/default.ts"],"names":[],"mappings":[[[0,0,0,0],[6,0,0,6],[7,0,0,7],[13,0,0,13],[29,0,0,29],[32,0,0,40],[39,0,0,47],[40,0,0,48]],[[0,0,1,0],[6,0,1,6],[7,0,1,7],[13,0,1,13],[26,0,1,26],[29,0,1,37],[36,0,1,44],[37,0,1,45]]],"sourcesContent":["export const DEFAULT_USERNAME: string = 'guest';\r\nexport const DEFAULT_LEVEL: string = 'guest';\r\n"]},"resolvedIds":{},"safeVariableNames":{"DEFAULT_USERNAME":"DEFAULT_USERNAME","DEFAULT_LEVEL":"DEFAULT_LEVEL"},"sourcemapChain":[],"syntheticNamedExports":false,"transformDependencies":[]},{"ast":{"type":"Program","start":0,"end":5976,"body":[{"type":"ImportDeclaration","start":0,"end":51,"specifiers":[{"type":"ImportSpecifier","start":9,"end":19,"imported":{"type":"Identifier","start":9,"end":19,"name":"Injectable"},"local":{"type":"Identifier","start":9,"end":19,"name":"Injectable"}},{"type":"ImportSpecifier","start":21,"end":27,"imported":{"type":"Identifier","start":21,"end":27,"name":"signal"},"local":{"type":"Identifier","start":21,"end":27,"name":"signal"}}],"source":{"type":"Literal","start":35,"end":50,"value":"@angular/core","raw":"'@angular/core'"},"attributes":[]},{"type":"ImportDeclaration","start":52,"end":78,"specifiers":[{"type":"ImportSpecifier","start":61,"end":63,"imported":{"type":"Identifier","start":61,"end":63,"name":"of"},"local":{"type":"Identifier","start":61,"end":63,"name":"of"}}],"source":{"type":"Literal","start":71,"end":77,"value":"rxjs","raw":"'rxjs'"},"attributes":[]},{"type":"ImportDeclaration","start":79,"end":136,"specifiers":[{"type":"ImportSpecifier","start":88,"end":100,"imported":{"type":"Identifier","start":88,"end":100,"name":"STRING_EMPTY"},"local":{"type":"Identifier","start":88,"end":100,"name":"STRING_EMPTY"}}],"source":{"type":"Literal","start":108,"end":135,"value":"@albi_scando/as-const-lib","raw":"'@albi_scando/as-const-lib'"},"attributes":[]},{"type":"ImportDeclaration","start":147,"end":211,"specifiers":[{"type":"ImportDefaultSpecifier","start":154,"end":171,"local":{"type":"Identifier","start":154,"end":171,"name":"defaultConfigJSON"}}],"source":{"type":"Literal","start":177,"end":210,"value":"../../assets/jsons/default.json","raw":"'../../assets/jsons/default.json'"},"attributes":[]},{"type":"ImportDeclaration","start":225,"end":299,"specifiers":[{"type":"ImportSpecifier","start":234,"end":247,"imported":{"type":"Identifier","start":234,"end":247,"name":"DEFAULT_LEVEL"},"local":{"type":"Identifier","start":234,"end":247,"name":"DEFAULT_LEVEL"}},{"type":"ImportSpecifier","start":249,"end":265,"imported":{"type":"Identifier","start":249,"end":265,"name":"DEFAULT_USERNAME"},"local":{"type":"Identifier","start":249,"end":265,"name":"DEFAULT_USERNAME"}}],"source":{"type":"Literal","start":273,"end":298,"value":"../../constants/default","raw":"'../../constants/default'"},"attributes":[]},{"type":"ImportDeclaration","start":300,"end":336,"specifiers":[{"type":"ImportNamespaceSpecifier","start":307,"end":314,"local":{"type":"Identifier","start":312,"end":314,"name":"i0"}}],"source":{"type":"Literal","start":320,"end":335,"value":"@angular/core","raw":"\"@angular/core\""},"attributes":[]},{"type":"ExportNamedDeclaration","start":337,"end":1654,"specifiers":[],"source":null,"attributes":[],"declaration":{"type":"ClassDeclaration","start":344,"end":1654,"decorators":[],"id":{"type":"Identifier","start":350,"end":361,"name":"UserService"},"superClass":null,"body":{"type":"ClassBody","start":362,"end":1654,"body":[{"type":"MethodDefinition","start":438,"end":939,"static":false,"computed":false,"decorators":[],"key":{"type":"Identifier","start":438,"end":449,"name":"constructor"},"value":{"type":"FunctionExpression","start":449,"end":939,"async":false,"generator":false,"id":null,"params":[],"body":{"type":"BlockStatement","start":452,"end":939,"body":[{"type":"ExpressionStatement","start":462,"end":496,"expression":{"type":"AssignmentExpression","start":462,"end":495,"operator":"=","left":{"type":"MemberExpression","start":462,"end":475,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":462,"end":466},"property":{"type":"Identifier","start":467,"end":475,"name":"username"}},"right":{"type":"CallExpression","start":478,"end":495,"optional":false,"callee":{"type":"Identifier","start":478,"end":484,"name":"signal"},"arguments":[{"type":"Identifier","start":485,"end":494,"name":"undefined"}]}}},{"type":"ExpressionStatement","start":567,"end":598,"expression":{"type":"AssignmentExpression","start":567,"end":597,"operator":"=","left":{"type":"MemberExpression","start":567,"end":577,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":567,"end":571},"property":{"type":"Identifier","start":572,"end":577,"name":"token"}},"right":{"type":"CallExpression","start":580,"end":597,"optional":false,"callee":{"type":"Identifier","start":580,"end":586,"name":"signal"},"arguments":[{"type":"Identifier","start":587,"end":596,"name":"undefined"}]}}},{"type":"VariableDeclaration","start":607,"end":640,"kind":"const","declarations":[{"type":"VariableDeclarator","start":613,"end":639,"id":{"type":"Identifier","start":613,"end":619,"name":"config"},"init":{"type":"Identifier","start":622,"end":639,"name":"defaultConfigJSON"}}]},{"type":"VariableDeclaration","start":649,"end":893,"kind":"const","declarations":[{"type":"VariableDeclarator","start":655,"end":892,"id":{"type":"Identifier","start":655,"end":660,"name":"setup"},"init":{"type":"ObjectExpression","start":663,"end":892,"properties":[{"type":"Property","start":677,"end":722,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":677,"end":685,"name":"username"},"value":{"type":"LogicalExpression","start":687,"end":722,"operator":"||","left":{"type":"MemberExpression","start":687,"end":702,"computed":false,"optional":false,"object":{"type":"Identifier","start":687,"end":693,"name":"config"},"property":{"type":"Identifier","start":694,"end":702,"name":"username"}},"right":{"type":"Identifier","start":706,"end":722,"name":"DEFAULT_USERNAME"}},"kind":"init"},{"type":"Property","start":736,"end":772,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":736,"end":741,"name":"level"},"value":{"type":"LogicalExpression","start":743,"end":772,"operator":"||","left":{"type":"MemberExpression","start":743,"end":755,"computed":false,"optional":false,"object":{"type":"Identifier","start":743,"end":749,"name":"config"},"property":{"type":"Identifier","start":750,"end":755,"name":"level"}},"right":{"type":"Identifier","start":759,"end":772,"name":"DEFAULT_LEVEL"}},"kind":"init"},{"type":"Property","start":786,"end":881,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":786,"end":789,"name":"api"},"value":{"type":"ObjectExpression","start":791,"end":881,"properties":[{"type":"Property","start":809,"end":866,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":809,"end":828,"name":"patchUserDataAPIUrl"},"value":{"type":"LogicalExpression","start":830,"end":866,"operator":"||","left":{"type":"MemberExpression","start":830,"end":850,"computed":false,"optional":false,"object":{"type":"Identifier","start":830,"end":836,"name":"config"},"property":{"type":"Identifier","start":837,"end":850,"name":"patchUserData"}},"right":{"type":"Identifier","start":854,"end":866,"name":"STRING_EMPTY"}},"kind":"init"}]},"kind":"init"}]}}]},{"type":"ExpressionStatement","start":902,"end":933,"expression":{"type":"CallExpression","start":902,"end":932,"optional":false,"callee":{"type":"MemberExpression","start":902,"end":930,"computed":false,"optional":false,"object":{"type":"CallExpression","start":902,"end":920,"optional":false,"callee":{"type":"MemberExpression","start":902,"end":913,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":902,"end":906},"property":{"type":"Identifier","start":907,"end":913,"name":"setup$"}},"arguments":[{"type":"Identifier","start":914,"end":919,"name":"setup"}]},"property":{"type":"Identifier","start":921,"end":930,"name":"subscribe"}},"arguments":[]}}]},"expression":false},"kind":"constructor"},{"type":"MethodDefinition","start":995,"end":1128,"static":false,"computed":false,"decorators":[],"key":{"type":"Identifier","start":995,"end":1001,"name":"setup$"},"value":{"type":"FunctionExpression","start":1001,"end":1128,"async":false,"generator":false,"id":null,"params":[{"type":"Identifier","start":1002,"end":1007,"name":"setup"}],"body":{"type":"BlockStatement","start":1009,"end":1128,"body":[{"type":"ExpressionStatement","start":1019,"end":1032,"expression":{"type":"CallExpression","start":1019,"end":1031,"optional":false,"callee":{"type":"MemberExpression","start":1019,"end":1029,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":1019,"end":1023},"property":{"type":"Identifier","start":1024,"end":1029,"name":"reset"}},"arguments":[]}},{"type":"ExpressionStatement","start":1041,"end":1092,"expression":{"type":"LogicalExpression","start":1041,"end":1091,"operator":"??","left":{"type":"MemberExpression","start":1041,"end":1055,"computed":false,"optional":false,"object":{"type":"Identifier","start":1041,"end":1046,"name":"setup"},"property":{"type":"Identifier","start":1047,"end":1055,"name":"username"}},"right":{"type":"CallExpression","start":1059,"end":1091,"optional":false,"callee":{"type":"MemberExpression","start":1059,"end":1075,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":1059,"end":1063},"property":{"type":"Identifier","start":1064,"end":1075,"name":"setUsername"}},"arguments":[{"type":"MemberExpression","start":1076,"end":1090,"computed":false,"optional":false,"object":{"type":"Identifier","start":1076,"end":1081,"name":"setup"},"property":{"type":"Identifier","start":1082,"end":1090,"name":"username"}}]}}},{"type":"ReturnStatement","start":1101,"end":1122,"argument":{"type":"CallExpression","start":1108,"end":1121,"optional":false,"callee":{"type":"Identifier","start":1108,"end":1110,"name":"of"},"arguments":[{"type":"Identifier","start":1111,"end":1120,"name":"undefined"}]}}]},"expression":false},"kind":"method"},{"type":"MethodDefinition","start":1183,"end":1194,"static":false,"computed":false,"decorators":[],"key":{"type":"Identifier","start":1183,"end":1188,"name":"reset"},"value":{"type":"FunctionExpression","start":1188,"end":1194,"async":false,"generator":false,"id":null,"params":[],"body":{"type":"BlockStatement","start":1191,"end":1194,"body":[]},"expression":false},"kind":"method"},{"type":"MethodDefinition","start":1255,"end":1321,"static":false,"computed":false,"decorators":[],"key":{"type":"Identifier","start":1255,"end":1266,"name":"setUsername"},"value":{"type":"FunctionExpression","start":1266,"end":1321,"async":false,"generator":false,"id":null,"params":[{"type":"Identifier","start":1267,"end":1275,"name":"username"}],"body":{"type":"BlockStatement","start":1277,"end":1321,"body":[{"type":"ExpressionStatement","start":1287,"end":1315,"expression":{"type":"CallExpression","start":1287,"end":1314,"optional":false,"callee":{"type":"MemberExpression","start":1287,"end":1304,"computed":false,"optional":false,"object":{"type":"MemberExpression","start":1287,"end":1300,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":1287,"end":1291},"property":{"type":"Identifier","start":1292,"end":1300,"name":"username"}},"property":{"type":"Identifier","start":1301,"end":1304,"name":"set"}},"arguments":[{"type":"Identifier","start":1305,"end":1313,"name":"username"}]}}]},"expression":false},"kind":"method"},{"type":"StaticBlock","start":1326,"end":1499,"body":[{"type":"ExpressionStatement","start":1335,"end":1497,"expression":{"type":"AssignmentExpression","start":1335,"end":1496,"operator":"=","left":{"type":"MemberExpression","start":1335,"end":1344,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":1335,"end":1339},"property":{"type":"Identifier","start":1340,"end":1344,"name":"ɵfac"}},"right":{"type":"CallExpression","start":1347,"end":1496,"optional":false,"callee":{"type":"MemberExpression","start":1347,"end":1368,"computed":false,"optional":false,"object":{"type":"Identifier","start":1347,"end":1349,"name":"i0"},"property":{"type":"Identifier","start":1350,"end":1368,"name":"ɵɵngDeclareFactory"}},"arguments":[{"type":"ObjectExpression","start":1369,"end":1495,"properties":[{"type":"Property","start":1371,"end":1391,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1371,"end":1381,"name":"minVersion"},"value":{"type":"Literal","start":1383,"end":1391,"value":"12.0.0","raw":"\"12.0.0\""},"kind":"init"},{"type":"Property","start":1393,"end":1411,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1393,"end":1400,"name":"version"},"value":{"type":"Literal","start":1402,"end":1411,"value":"17.3.12","raw":"\"17.3.12\""},"kind":"init"},{"type":"Property","start":1413,"end":1425,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1413,"end":1421,"name":"ngImport"},"value":{"type":"Identifier","start":1423,"end":1425,"name":"i0"},"kind":"init"},{"type":"Property","start":1427,"end":1444,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1427,"end":1431,"name":"type"},"value":{"type":"Identifier","start":1433,"end":1444,"name":"UserService"},"kind":"init"},{"type":"Property","start":1446,"end":1454,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1446,"end":1450,"name":"deps"},"value":{"type":"ArrayExpression","start":1452,"end":1454,"elements":[]},"kind":"init"},{"type":"Property","start":1456,"end":1493,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1456,"end":1462,"name":"target"},"value":{"type":"MemberExpression","start":1464,"end":1493,"computed":false,"optional":false,"object":{"type":"MemberExpression","start":1464,"end":1482,"computed":false,"optional":false,"object":{"type":"Identifier","start":1464,"end":1466,"name":"i0"},"property":{"type":"Identifier","start":1467,"end":1482,"name":"ɵɵFactoryTarget"}},"property":{"type":"Identifier","start":1483,"end":1493,"name":"Injectable"}},"kind":"init"}]}]}}}]},{"type":"StaticBlock","start":1504,"end":1652,"body":[{"type":"ExpressionStatement","start":1513,"end":1650,"expression":{"type":"AssignmentExpression","start":1513,"end":1649,"operator":"=","left":{"type":"MemberExpression","start":1513,"end":1523,"computed":false,"optional":false,"object":{"type":"ThisExpression","start":1513,"end":1517},"property":{"type":"Identifier","start":1518,"end":1523,"name":"ɵprov"}},"right":{"type":"CallExpression","start":1526,"end":1649,"optional":false,"callee":{"type":"MemberExpression","start":1526,"end":1550,"computed":false,"optional":false,"object":{"type":"Identifier","start":1526,"end":1528,"name":"i0"},"property":{"type":"Identifier","start":1529,"end":1550,"name":"ɵɵngDeclareInjectable"}},"arguments":[{"type":"ObjectExpression","start":1551,"end":1648,"properties":[{"type":"Property","start":1553,"end":1573,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1553,"end":1563,"name":"minVersion"},"value":{"type":"Literal","start":1565,"end":1573,"value":"12.0.0","raw":"\"12.0.0\""},"kind":"init"},{"type":"Property","start":1575,"end":1593,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1575,"end":1582,"name":"version"},"value":{"type":"Literal","start":1584,"end":1593,"value":"17.3.12","raw":"\"17.3.12\""},"kind":"init"},{"type":"Property","start":1595,"end":1607,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1595,"end":1603,"name":"ngImport"},"value":{"type":"Identifier","start":1605,"end":1607,"name":"i0"},"kind":"init"},{"type":"Property","start":1609,"end":1626,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1609,"end":1613,"name":"type"},"value":{"type":"Identifier","start":1615,"end":1626,"name":"UserService"},"kind":"init"},{"type":"Property","start":1628,"end":1646,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1628,"end":1638,"name":"providedIn"},"value":{"type":"Literal","start":1640,"end":1646,"value":"root","raw":"'root'"},"kind":"init"}]}]}}}]}]}}},{"type":"ExpressionStatement","start":1655,"end":1925,"expression":{"type":"CallExpression","start":1655,"end":1924,"optional":false,"callee":{"type":"MemberExpression","start":1655,"end":1682,"computed":false,"optional":false,"object":{"type":"Identifier","start":1655,"end":1657,"name":"i0"},"property":{"type":"Identifier","start":1658,"end":1682,"name":"ɵɵngDeclareClassMetadata"}},"arguments":[{"type":"ObjectExpression","start":1683,"end":1923,"properties":[{"type":"Property","start":1685,"end":1705,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1685,"end":1695,"name":"minVersion"},"value":{"type":"Literal","start":1697,"end":1705,"value":"12.0.0","raw":"\"12.0.0\""},"kind":"init"},{"type":"Property","start":1707,"end":1725,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1707,"end":1714,"name":"version"},"value":{"type":"Literal","start":1716,"end":1725,"value":"17.3.12","raw":"\"17.3.12\""},"kind":"init"},{"type":"Property","start":1727,"end":1739,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1727,"end":1735,"name":"ngImport"},"value":{"type":"Identifier","start":1737,"end":1739,"name":"i0"},"kind":"init"},{"type":"Property","start":1741,"end":1758,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1741,"end":1745,"name":"type"},"value":{"type":"Identifier","start":1747,"end":1758,"name":"UserService"},"kind":"init"},{"type":"Property","start":1760,"end":1895,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1760,"end":1770,"name":"decorators"},"value":{"type":"ArrayExpression","start":1772,"end":1895,"elements":[{"type":"ObjectExpression","start":1773,"end":1894,"properties":[{"type":"Property","start":1787,"end":1803,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1787,"end":1791,"name":"type"},"value":{"type":"Identifier","start":1793,"end":1803,"name":"Injectable"},"kind":"init"},{"type":"Property","start":1817,"end":1884,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1817,"end":1821,"name":"args"},"value":{"type":"ArrayExpression","start":1823,"end":1884,"elements":[{"type":"ObjectExpression","start":1824,"end":1883,"properties":[{"type":"Property","start":1846,"end":1864,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1846,"end":1856,"name":"providedIn"},"value":{"type":"Literal","start":1858,"end":1864,"value":"root","raw":"'root'"},"kind":"init"}]}]},"kind":"init"}]}]},"kind":"init"},{"type":"Property","start":1897,"end":1921,"method":false,"shorthand":false,"computed":false,"key":{"type":"Identifier","start":1897,"end":1911,"name":"ctorParameters"},"value":{"type":"ArrowFunctionExpression","start":1913,"end":1921,"async":false,"expression":true,"generator":false,"params":[],"body":{"type":"ArrayExpression","start":1919,"end":1921,"elements":[]},"id":null},"kind":"init"}]}]}}],"_rollupRemoved":[{"end":5976,"start":1926,"type":"sourcemap"}],"sourceType":"module"},"attributes":{},"code":"import { Injectable, signal } from '@angular/core';\nimport { of } from 'rxjs';\nimport { STRING_EMPTY } from '@albi_scando/as-const-lib';\n// Assets\nimport defaultConfigJSON from '../../assets/jsons/default.json';\n// Constants\nimport { DEFAULT_LEVEL, DEFAULT_USERNAME } from '../../constants/default';\nimport * as i0 from \"@angular/core\";\nexport class UserService {\n /**\n * Constructor\n * @constructor\n * @ignore\n */\n constructor() {\n this.username = signal(undefined);\n /**\n * {@link IUserService.token}\n */\n this.token = signal(undefined);\n const config = defaultConfigJSON;\n const setup = {\n username: config.username || DEFAULT_USERNAME,\n level: config.level || DEFAULT_LEVEL,\n api: {\n patchUserDataAPIUrl: config.patchUserData || STRING_EMPTY,\n },\n };\n this.setup$(setup).subscribe();\n }\n /**\n * {@link IUserService.setup$}\n */\n setup$(setup) {\n this.reset();\n setup.username ?? this.setUsername(setup.username);\n return of(undefined);\n }\n /**\n * {@link IUserService.reset}\n */\n reset() { }\n /**\n * {@link IUserService.setUsername}\n */\n setUsername(username) {\n this.username.set(username);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXMtdXNlci1saWIvc3JjL2xpYi9zZXJ2aWNlcy91c2VyL3VzZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFrQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkUsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ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cm5hbWUoc2V0dXAudXNlcm5hbWUpO1xyXG5cclxuICAgIHJldHVybiBvZih1bmRlZmluZWQpO1xyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICoge0BsaW5rIElVc2VyU2VydmljZS5yZXNldH1cclxuICAgKi9cclxuICBwdWJsaWMgcmVzZXQoKTogdm9pZCB7fVxyXG5cclxuICAvKipcclxuICAgKiB7QGxpbmsgSVVzZXJTZXJ2aWNlLnNldFVzZXJuYW1lfVxyXG4gICAqL1xyXG4gIHB1YmxpYyBzZXRVc2VybmFtZSh1c2VybmFtZTogc3RyaW5nKTogdm9pZCB7XHJcbiAgICB0aGlzLnVzZXJuYW1lLnNldCh1c2VybmFtZSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==","customTransformCache":false,"dependencies":["@angular/core","rxjs","@albi_scando/as-const-lib","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\assets\\jsons\\default.json","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\default.mjs"],"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\services\\user\\user.service.mjs","meta":{},"moduleSideEffects":true,"originalCode":"import { Injectable, signal } from '@angular/core';\nimport { of } from 'rxjs';\nimport { STRING_EMPTY } from '@albi_scando/as-const-lib';\n// Assets\nimport defaultConfigJSON from '../../assets/jsons/default.json';\n// Constants\nimport { DEFAULT_LEVEL, DEFAULT_USERNAME } from '../../constants/default';\nimport * as i0 from \"@angular/core\";\nexport class UserService {\n /**\n * Constructor\n * @constructor\n * @ignore\n */\n constructor() {\n this.username = signal(undefined);\n /**\n * {@link IUserService.token}\n */\n this.token = signal(undefined);\n const config = defaultConfigJSON;\n const setup = {\n username: config.username || DEFAULT_USERNAME,\n level: config.level || DEFAULT_LEVEL,\n api: {\n patchUserDataAPIUrl: config.patchUserData || STRING_EMPTY,\n },\n };\n this.setup$(setup).subscribe();\n }\n /**\n * {@link IUserService.setup$}\n */\n setup$(setup) {\n this.reset();\n setup.username ?? this.setUsername(setup.username);\n return of(undefined);\n }\n /**\n * {@link IUserService.reset}\n */\n reset() { }\n /**\n * {@link IUserService.setUsername}\n */\n setUsername(username) {\n this.username.set(username);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: () => [] });\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvYXMtdXNlci1saWIvc3JjL2xpYi9zZXJ2aWNlcy91c2VyL3VzZXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFrQixNQUFNLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFDbkUsT0FBTyxFQUFjLEVBQUUsRUFBRSxNQUFNLE1BQU0sQ0FBQztBQUN0QyxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDekQsU0FBUztBQUNULE9BQU8saUJBQWlCLE1BQU0saUNBQWlDLENBQUM7QUFDaEUsWUFBWTtBQUNaLE9BQU8sRUFBRSxhQUFhLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSx5QkFBeUIsQ0FBQzs7QUFRMUUsTUFBT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ZGVmaW5lZD4gPSBzaWduYWwodW5kZWZpbmVkKTtcclxuXHJcbiAgLyoqXHJcbiAgICogQ29uc3RydWN0b3JcclxuICAgKiBAY29uc3RydWN0b3JcclxuICAgKiBAaWdub3JlXHJcbiAgICovXHJcbiAgY29uc3RydWN0b3IoKSB7XHJcbiAgICBjb25zdCBjb25maWc6IGFueSA9IGRlZmF1bHRDb25maWdKU09OO1xyXG5cclxuICAgIGNvbnN0IHNldHVwOiBJVXNlckxpYlNldHVwID0ge1xyXG4gICAgICB1c2VybmFtZTogY29uZmlnLnVzZXJuYW1lIHx8IERFRkFVTFRfVVNFUk5BTUUsXHJcbiAgICAgIGxldmVsOiBjb25maWcubGV2ZWwgfHwgREVGQVVMVF9MRVZFTCxcclxuICAgICAgYXBpOiB7XHJcbiAgICAgICAgcGF0Y2hVc2VyRGF0YUFQSVVybDogY29uZmlnLnBhdGNoVXNlckRhdGEgfHwgU1RSSU5HX0VNUFRZLFxyXG4gICAgICB9LFxyXG4gICAgfTtcclxuICAgIFxyXG4gICAgdGhpcy5zZXR1cCQoc2V0dXApLnN1YnNjcmliZSgpO1xyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICoge0BsaW5rIElVc2VyU2VydmljZS5zZXR1cCR9XHJcbiAgICovXHJcbiAgcHVibGljIHNldHVwJChzZXR1cDogSVVzZXJMaWJTZXR1cCk6IE9ic2VydmFibGU8dm9pZD4ge1xyXG4gICAgdGhpcy5yZXNldCgpO1xyXG5cclxuICAgIHNldHVwLnVzZXJuYW1lID8/IHRoaXMuc2V0VXNlcm5hbWUoc2V0dXAudXNlcm5hbWUpO1xyXG5cclxuICAgIHJldHVybiBvZih1bmRlZmluZWQpO1xyXG4gIH1cclxuXHJcbiAgLyoqXHJcbiAgICoge0BsaW5rIElVc2VyU2VydmljZS5yZXNldH1cclxuICAgKi9cclxuICBwdWJsaWMgcmVzZXQoKTogdm9pZCB7fVxyXG5cclxuICAvKipcclxuICAgKiB7QGxpbmsgSVVzZXJTZXJ2aWNlLnNldFVzZXJuYW1lfVxyXG4gICAqL1xyXG4gIHB1YmxpYyBzZXRVc2VybmFtZSh1c2VybmFtZTogc3RyaW5nKTogdm9pZCB7XHJcbiAgICB0aGlzLnVzZXJuYW1lLnNldCh1c2VybmFtZSk7XHJcbiAgfVxyXG59XHJcbiJdfQ==","originalSourcemap":{"version":3,"file":"user.service.js","sourceRoot":"","sources":["../../../../../../projects/as-user-lib/src/lib/services/user/user.service.ts"],"names":[],"mappings":[[[0,0,0,0],[7,0,0,7],[9,0,0,9],[19,0,0,19],[21,0,0,37],[27,0,0,43],[29,0,0,45],[35,0,0,51],[50,0,0,66],[51,0,0,67]],[[0,0,1,0],[7,0,1,7],[9,0,1,21],[11,0,1,23],[13,0,1,25],[19,0,1,31],[25,0,1,37],[26,0,1,38]],[[0,0,2,0],[7,0,2,7],[9,0,2,9],[21,0,2,21],[23,0,2,23],[29,0,2,29],[56,0,2,56],[57,0,2,57]],[[0,0,3,0],[9,0,3,9]],[[0,0,4,0],[7,0,4,7],[24,0,4,24],[30,0,4,30],[63,0,4,63],[64,0,4,64]],[[0,0,5,0],[12,0,5,12]],[[0,0,6,0],[7,0,6,7],[9,0,6,9],[22,0,6,22],[24,0,6,24],[40,0,6,40],[42,0,6,42],[48,0,6,48],[73,0,6,73],[74,0,6,74]],[],[[0,0,14,0],[6,0,14,6],[13,0,14,13],[24,0,14,24]],[[4,0,22,2]],[],[],[],[[7,0,26,5]],[[4,0,27,2]],[[8,0,15,9],[21,0,15,17],[24,0,15,56],[30,0,15,62],[31,0,15,63],[40,0,15,72],[41,0,15,73],[42,0,15,74]],[[8,0,17,2]],[],[[11,0,19,5]],[[8,0,20,9],[18,0,20,14],[21,0,20,53],[27,0,20,59],[28,0,20,60],[37,0,20,69],[38,0,20,70],[39,0,20,71]],[[8,0,28,4],[14,0,28,10],[20,0,28,16],[23,0,28,24],[40,0,28,41],[41,0,28,42]],[[8,0,30,4],[14,0,30,10],[19,0,30,15],[22,0,30,33]],[[12,0,31,6],[20,0,31,14],[22,0,31,16],[28,0,31,22],[29,0,31,23],[37,0,31,31],[41,0,31,35],[57,0,31,51]],[[12,0,32,6],[17,0,32,11],[19,0,32,13],[25,0,32,19],[26,0,32,20],[31,0,32,25],[35,0,32,29],[48,0,32,42]],[[12,0,33,6],[15,0,33,9],[17,0,33,11]],[[16,0,34,8],[35,0,34,27],[37,0,34,29],[43,0,34,35],[44,0,34,36],[57,0,34,49],[61,0,34,53],[73,0,34,65]],[[13,0,35,7]],[[9,0,36,5],[10,0,36,6]],[[8,0,38,4],[12,0,38,8],[13,0,38,9],[19,0,38,15],[20,0,38,16],[25,0,38,21],[26,0,38,22],[27,0,38,23],[36,0,38,32],[38,0,38,34],[39,0,38,35]],[[4,0,39,2],[5,0,39,3]],[[4,0,41,2]],[],[[7,0,43,5]],[[4,0,44,9],[10,0,44,15],[11,0,44,16],[16,0,44,36]],[[8,0,45,4],[12,0,45,8],[13,0,45,9],[18,0,45,14],[20,0,45,16],[21,0,45,17]],[[8,0,47,4],[13,0,47,9],[14,0,47,10],[22,0,47,18],[26,0,47,22],[30,0,47,26],[31,0,47,27],[42,0,47,38],[43,0,47,39],[48,0,47,44],[49,0,47,45],[57,0,47,53],[58,0,47,54],[59,0,47,55]],[[8,0,49,4],[15,0,49,11],[17,0,49,13],[18,0,49,14],[27,0,49,23],[28,0,49,24],[29,0,49,25]],[[4,0,50,2],[5,0,50,3]],[[4,0,52,2]],[],[[7,0,54,5]],[[4,0,55,9],[9,0,55,14],[14,0,55,24],[15,0,55,25]],[[4,0,57,2]],[],[[7,0,59,5]],[[4,0,60,9],[15,0,60,20],[16,0,60,21],[24,0,60,37]],[[8,0,61,4],[12,0,61,8],[13,0,61,9],[21,0,61,17],[22,0,61,18],[25,0,61,21],[26,0,61,22],[34,0,61,30],[35,0,61,31],[36,0,61,32]],[[4,0,62,2],[5,0,62,3]],[[111,0,14,13],[122,0,14,24]],[[115,0,14,13],[126,0,14,24],[140,0,12,14],[146,0,12,20]],[],[[92,0,14,13],[103,0,14,24]],[[18,0,11,1],[28,0,11,11]],[[19,0,11,12]],[[20,0,12,2],[30,0,12,12],[32,0,12,14],[38,0,12,20]],[[17,0,13,1]]],"sourcesContent":["import { Injectable, WritableSignal, signal } from '@angular/core';\r\nimport { Observable, of } from 'rxjs';\r\nimport { STRING_EMPTY } from '@albi_scando/as-const-lib';\r\n// Assets\r\nimport defaultConfigJSON from '../../assets/jsons/default.json';\r\n// Constants\r\nimport { DEFAULT_LEVEL, DEFAULT_USERNAME } from '../../constants/default';\r\n// Interfaces\r\nimport { IUserService } from './user.service.interface';\r\nimport { IUserLibSetup } from '../../models/setup.interface';\r\n\r\n@Injectable({\r\n providedIn: 'root',\r\n})\r\nexport class UserService implements IUserService {\r\n public username: WritableSignal<string | undefined> = signal(undefined);\r\n\r\n /**\r\n * {@link IUserService.token}\r\n */\r\n public token: WritableSignal<string | undefined> = signal(undefined);\r\n\r\n /**\r\n * Constructor\r\n * @constructor\r\n * @ignore\r\n */\r\n constructor() {\r\n const config: any = defaultConfigJSON;\r\n\r\n const setup: IUserLibSetup = {\r\n username: config.username || DEFAULT_USERNAME,\r\n level: config.level || DEFAULT_LEVEL,\r\n api: {\r\n patchUserDataAPIUrl: config.patchUserData || STRING_EMPTY,\r\n },\r\n };\r\n \r\n this.setup$(setup).subscribe();\r\n }\r\n\r\n /**\r\n * {@link IUserService.setup$}\r\n */\r\n public setup$(setup: IUserLibSetup): Observable<void> {\r\n this.reset();\r\n\r\n setup.username ?? this.setUsername(setup.username);\r\n\r\n return of(undefined);\r\n }\r\n\r\n /**\r\n * {@link IUserService.reset}\r\n */\r\n public reset(): void {}\r\n\r\n /**\r\n * {@link IUserService.setUsername}\r\n */\r\n public setUsername(username: string): void {\r\n this.username.set(username);\r\n }\r\n}\r\n"]},"resolvedIds":{"@angular/core":{"attributes":{},"external":true,"id":"@angular/core","meta":{},"moduleSideEffects":true,"resolvedBy":"rollup","syntheticNamedExports":false},"rxjs":{"attributes":{},"external":true,"id":"rxjs","meta":{},"moduleSideEffects":true,"resolvedBy":"rollup","syntheticNamedExports":false},"@albi_scando/as-const-lib":{"attributes":{},"external":true,"id":"@albi_scando/as-const-lib","meta":{},"moduleSideEffects":true,"resolvedBy":"rollup","syntheticNamedExports":false},"../../constants/default":{"attributes":{},"external":false,"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\default.mjs","meta":{},"moduleSideEffects":true,"resolvedBy":"node-resolve","syntheticNamedExports":false},"../../assets/jsons/default.json":{"attributes":{},"external":false,"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\assets\\jsons\\default.json","meta":{},"moduleSideEffects":true,"resolvedBy":"node-resolve","syntheticNamedExports":false}},"safeVariableNames":{"UserService":"UserService"},"sourcemapChain":[],"syntheticNamedExports":false,"transformDependencies":[]},{"ast":{"type":"Program","start":0,"end":858,"body":[{"type":"ExportNamedDeclaration","start":0,"end":67,"specifiers":[{"type":"ExportSpecifier","start":9,"end":20,"local":{"type":"Identifier","start":9,"end":20,"name":"USER_LEVELS"},"exported":{"type":"Identifier","start":9,"end":20,"name":"USER_LEVELS"}}],"source":{"type":"Literal","start":28,"end":66,"value":"./lib/constants/user-levels.constant","raw":"'./lib/constants/user-levels.constant'"},"attributes":[],"declaration":null},{"type":"ExportNamedDeclaration","start":68,"end":131,"specifiers":[{"type":"ExportSpecifier","start":77,"end":88,"local":{"type":"Identifier","start":77,"end":88,"name":"UserService"},"exported":{"type":"Identifier","start":77,"end":88,"name":"UserService"}}],"source":{"type":"Literal","start":96,"end":130,"value":"./lib/services/user/user.service","raw":"'./lib/services/user/user.service'"},"attributes":[],"declaration":null}],"_rollupRemoved":[{"end":858,"start":132,"type":"sourcemap"}],"sourceType":"module"},"attributes":{},"code":"export { USER_LEVELS } from './lib/constants/user-levels.constant';\nexport { UserService } from './lib/services/user/user.service';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQztBQUVuRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0NBQWtDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBVU0VSX0xFVkVMUyB9IGZyb20gJy4vbGliL2NvbnN0YW50cy91c2VyLWxldmVscy5jb25zdGFudCc7XHJcbmV4cG9ydCB7IElVc2VyTGliU2V0dXAgfSBmcm9tICcuL2xpYi9tb2RlbHMvc2V0dXAuaW50ZXJmYWNlJztcclxuZXhwb3J0IHsgVXNlclNlcnZpY2UgfSBmcm9tICcuL2xpYi9zZXJ2aWNlcy91c2VyL3VzZXIuc2VydmljZSc7XHJcbmV4cG9ydCB7IFVzZXJMZXZlbHMgfSBmcm9tICcuL2xpYi90eXBlcy91c2VyLWxldmVscy50eXBlJzsiXX0=","customTransformCache":false,"dependencies":["C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\user-levels.constant.mjs","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\services\\user\\user.service.mjs"],"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\public-api.mjs","meta":{},"moduleSideEffects":true,"originalCode":"export { USER_LEVELS } from './lib/constants/user-levels.constant';\nexport { UserService } from './lib/services/user/user.service';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHVibGljLWFwaS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3Byb2plY3RzL2FzLXVzZXItbGliL3NyYy9wdWJsaWMtYXBpLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSxzQ0FBc0MsQ0FBQztBQUVuRSxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sa0NBQWtDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgeyBVU0VSX0xFVkVMUyB9IGZyb20gJy4vbGliL2NvbnN0YW50cy91c2VyLWxldmVscy5jb25zdGFudCc7XHJcbmV4cG9ydCB7IElVc2VyTGliU2V0dXAgfSBmcm9tICcuL2xpYi9tb2RlbHMvc2V0dXAuaW50ZXJmYWNlJztcclxuZXhwb3J0IHsgVXNlclNlcnZpY2UgfSBmcm9tICcuL2xpYi9zZXJ2aWNlcy91c2VyL3VzZXIuc2VydmljZSc7XHJcbmV4cG9ydCB7IFVzZXJMZXZlbHMgfSBmcm9tICcuL2xpYi90eXBlcy91c2VyLWxldmVscy50eXBlJzsiXX0=","originalSourcemap":{"version":3,"file":"public-api.js","sourceRoot":"","sources":["../../../projects/as-user-lib/src/public-api.ts"],"names":[],"mappings":[[[0,0,0,0],[7,0,0,7],[9,0,0,9],[20,0,0,20],[22,0,0,22],[28,0,0,28],[66,0,0,66],[67,0,0,67]],[[0,0,2,0],[7,0,2,7],[9,0,2,9],[20,0,2,20],[22,0,2,22],[28,0,2,28],[62,0,2,62],[63,0,2,63]]],"sourcesContent":["export { USER_LEVELS } from './lib/constants/user-levels.constant';\r\nexport { IUserLibSetup } from './lib/models/setup.interface';\r\nexport { UserService } from './lib/services/user/user.service';\r\nexport { UserLevels } from './lib/types/user-levels.type';"]},"resolvedIds":{"./lib/constants/user-levels.constant":{"attributes":{},"external":false,"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\user-levels.constant.mjs","meta":{},"moduleSideEffects":true,"resolvedBy":"node-resolve","syntheticNamedExports":false},"./lib/services/user/user.service":{"attributes":{},"external":false,"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\services\\user\\user.service.mjs","meta":{},"moduleSideEffects":true,"resolvedBy":"node-resolve","syntheticNamedExports":false}},"safeVariableNames":{},"sourcemapChain":[],"syntheticNamedExports":false,"transformDependencies":[]},{"ast":{"type":"Program","start":0,"end":532,"body":[{"type":"ExportAllDeclaration","start":48,"end":77,"exported":null,"source":{"type":"Literal","start":62,"end":76,"value":"./public-api","raw":"'./public-api'"},"attributes":[]}],"_rollupRemoved":[{"end":532,"start":78,"type":"sourcemap"}],"sourceType":"module"},"attributes":{},"code":"/**\n * Generated bundle index. Do not edit.\n */\nexport * from './public-api';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxiaV9zY2FuZG8tYXMtdXNlci1saWIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvYWxiaV9zY2FuZG8tYXMtdXNlci1saWIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==","customTransformCache":false,"dependencies":["C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\public-api.mjs"],"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\albi_scando-as-user-lib.mjs","meta":{},"moduleSideEffects":true,"originalCode":"/**\n * Generated bundle index. Do not edit.\n */\nexport * from './public-api';\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWxiaV9zY2FuZG8tYXMtdXNlci1saWIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9wcm9qZWN0cy9hcy11c2VyLWxpYi9zcmMvYWxiaV9zY2FuZG8tYXMtdXNlci1saWIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLGNBQWMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9wdWJsaWMtYXBpJztcbiJdfQ==","originalSourcemap":{"version":3,"file":"albi_scando-as-user-lib.js","sourceRoot":"","sources":["../../../projects/as-user-lib/src/albi_scando-as-user-lib.ts"],"names":[],"mappings":[[[0,0,0,0]],[],[[3,0,2,3]],[[0,0,4,0],[14,0,4,14],[28,0,4,28],[29,0,4,29]]],"sourcesContent":["/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"]},"resolvedIds":{"./public-api":{"attributes":{},"external":false,"id":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\public-api.mjs","meta":{},"moduleSideEffects":true,"resolvedBy":"node-resolve","syntheticNamedExports":false}},"safeVariableNames":{},"sourcemapChain":[],"syntheticNamedExports":false,"transformDependencies":[]}],"plugins":{}}
@@ -1 +0,0 @@
1
- {"hash":"ea19ebb89723cd4194c9453e0c16f6534903dcf0","fesm2022":[{"exports":["USER_LEVELS","UserService"],"facadeModuleId":"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\albi_scando-as-user-lib.mjs","isDynamicEntry":false,"isEntry":true,"isImplicitEntry":false,"moduleIds":["C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\user-levels.constant.mjs","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\assets\\jsons\\default.json","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\default.mjs","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\services\\user\\user.service.mjs","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\public-api.mjs","C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\albi_scando-as-user-lib.mjs"],"name":"albi_scando-as-user-lib","type":"chunk","dynamicImports":[],"fileName":"albi_scando-as-user-lib.mjs","implicitlyLoadedBefore":[],"importedBindings":{"@angular/core":["signal","*","Injectable"],"rxjs":["of"],"@albi_scando/as-const-lib":["STRING_EMPTY"]},"imports":["@angular/core","rxjs","@albi_scando/as-const-lib"],"modules":{"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\user-levels.constant.mjs":{"code":"/**\n * User levels constants.\n */\nconst USER_LEVELS = {\n GUEST: 'guest',\n};","originalLength":636,"removedExports":[],"renderedExports":["USER_LEVELS"],"renderedLength":78},"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\assets\\jsons\\default.json":{"code":"var language = {\n\tusername: \"user\",\n\tupdateAPI: \"\"\n};\nvar defaultConfigJSON = {\n\tlanguage: language\n};","originalLength":80,"removedExports":[],"renderedExports":["language","default"],"renderedLength":102},"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\constants\\default.mjs":{"code":"const DEFAULT_USERNAME = 'guest';\nconst DEFAULT_LEVEL = 'guest';","originalLength":609,"removedExports":[],"renderedExports":["DEFAULT_USERNAME","DEFAULT_LEVEL"],"renderedLength":64},"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\lib\\services\\user\\user.service.mjs":{"code":"class UserService {\n /**\n * Constructor\n * @constructor\n * @ignore\n */\n constructor() {\n this.username = signal(undefined);\n /**\n * {@link IUserService.token}\n */\n this.token = signal(undefined);\n const config = defaultConfigJSON;\n const setup = {\n username: config.username || DEFAULT_USERNAME,\n level: config.level || DEFAULT_LEVEL,\n api: {\n patchUserDataAPIUrl: config.patchUserData || STRING_EMPTY,\n },\n };\n this.setup$(setup).subscribe();\n }\n /**\n * {@link IUserService.setup$}\n */\n setup$(setup) {\n this.reset();\n setup.username ?? this.setUsername(setup.username);\n return of(undefined);\n }\n /**\n * {@link IUserService.reset}\n */\n reset() { }\n /**\n * {@link IUserService.setUsername}\n */\n setUsername(username) {\n this.username.set(username);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: () => [] });","originalLength":5976,"removedExports":[],"renderedExports":["UserService"],"renderedLength":1581},"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\public-api.mjs":{"code":"","originalLength":858,"removedExports":[],"renderedExports":[],"renderedLength":0},"C:\\Users\\alber\\Desktop\\CV\\as-user-lib\\dist\\as-user-lib\\esm2022\\albi_scando-as-user-lib.mjs":{"code":"/**\n * Generated bundle index. Do not edit.\n */","originalLength":532,"removedExports":[],"renderedExports":[],"renderedLength":47}},"referencedFiles":[],"code":"import * as i0 from '@angular/core';\nimport { signal, Injectable } from '@angular/core';\nimport { of } from 'rxjs';\nimport { STRING_EMPTY } from '@albi_scando/as-const-lib';\n\n/**\n * User levels constants.\n */\nconst USER_LEVELS = {\n GUEST: 'guest',\n};\n\nvar language = {\n\tusername: \"user\",\n\tupdateAPI: \"\"\n};\nvar defaultConfigJSON = {\n\tlanguage: language\n};\n\nconst DEFAULT_USERNAME = 'guest';\nconst DEFAULT_LEVEL = 'guest';\n\nclass UserService {\n /**\n * Constructor\n * @constructor\n * @ignore\n */\n constructor() {\n this.username = signal(undefined);\n /**\n * {@link IUserService.token}\n */\n this.token = signal(undefined);\n const config = defaultConfigJSON;\n const setup = {\n username: config.username || DEFAULT_USERNAME,\n level: config.level || DEFAULT_LEVEL,\n api: {\n patchUserDataAPIUrl: config.patchUserData || STRING_EMPTY,\n },\n };\n this.setup$(setup).subscribe();\n }\n /**\n * {@link IUserService.setup$}\n */\n setup$(setup) {\n this.reset();\n setup.username ?? this.setUsername(setup.username);\n return of(undefined);\n }\n /**\n * {@link IUserService.reset}\n */\n reset() { }\n /**\n * {@link IUserService.setUsername}\n */\n setUsername(username) {\n this.username.set(username);\n }\n static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }\n static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, providedIn: 'root' }); }\n}\ni0.ɵɵngDeclareClassMetadata({ minVersion: \"12.0.0\", version: \"17.3.12\", ngImport: i0, type: UserService, decorators: [{\n type: Injectable,\n args: [{\n providedIn: 'root',\n }]\n }], ctorParameters: () => [] });\n\n/**\n * Generated bundle index. Do not edit.\n */\n\nexport { USER_LEVELS, UserService };\n//# sourceMappingURL=albi_scando-as-user-lib.mjs.map\n","map":null,"preliminaryFileName":"albi_scando-as-user-lib.mjs","sourcemapFileName":"albi_scando-as-user-lib.mjs.map"},{"fileName":"albi_scando-as-user-lib.mjs.map","names":[],"needsCodeReference":false,"originalFileName":null,"originalFileNames":[],"source":"{\"version\":3,\"file\":\"albi_scando-as-user-lib.mjs\",\"sources\":[\"../../../projects/as-user-lib/src/lib/constants/user-levels.constant.ts\",\"../../../projects/as-user-lib/src/lib/constants/default.ts\",\"../../../projects/as-user-lib/src/lib/services/user/user.service.ts\",\"../../../projects/as-user-lib/src/albi_scando-as-user-lib.ts\"],\"sourcesContent\":[\"/**\\r\\n * User levels constants.\\r\\n */\\r\\nexport const USER_LEVELS = {\\r\\n GUEST: 'guest',\\r\\n}\\r\\n\",\"export const DEFAULT_USERNAME: string = 'guest';\\r\\nexport const DEFAULT_LEVEL: string = 'guest';\\r\\n\",\"import { Injectable, WritableSignal, signal } from '@angular/core';\\r\\nimport { Observable, of } from 'rxjs';\\r\\nimport { STRING_EMPTY } from '@albi_scando/as-const-lib';\\r\\n// Assets\\r\\nimport defaultConfigJSON from '../../assets/jsons/default.json';\\r\\n// Constants\\r\\nimport { DEFAULT_LEVEL, DEFAULT_USERNAME } from '../../constants/default';\\r\\n// Interfaces\\r\\nimport { IUserService } from './user.service.interface';\\r\\nimport { IUserLibSetup } from '../../models/setup.interface';\\r\\n\\r\\n@Injectable({\\r\\n providedIn: 'root',\\r\\n})\\r\\nexport class UserService implements IUserService {\\r\\n public username: WritableSignal<string | undefined> = signal(undefined);\\r\\n\\r\\n /**\\r\\n * {@link IUserService.token}\\r\\n */\\r\\n public token: WritableSignal<string | undefined> = signal(undefined);\\r\\n\\r\\n /**\\r\\n * Constructor\\r\\n * @constructor\\r\\n * @ignore\\r\\n */\\r\\n constructor() {\\r\\n const config: any = defaultConfigJSON;\\r\\n\\r\\n const setup: IUserLibSetup = {\\r\\n username: config.username || DEFAULT_USERNAME,\\r\\n level: config.level || DEFAULT_LEVEL,\\r\\n api: {\\r\\n patchUserDataAPIUrl: config.patchUserData || STRING_EMPTY,\\r\\n },\\r\\n };\\r\\n \\r\\n this.setup$(setup).subscribe();\\r\\n }\\r\\n\\r\\n /**\\r\\n * {@link IUserService.setup$}\\r\\n */\\r\\n public setup$(setup: IUserLibSetup): Observable<void> {\\r\\n this.reset();\\r\\n\\r\\n setup.username ?? this.setUsername(setup.username);\\r\\n\\r\\n return of(undefined);\\r\\n }\\r\\n\\r\\n /**\\r\\n * {@link IUserService.reset}\\r\\n */\\r\\n public reset(): void {}\\r\\n\\r\\n /**\\r\\n * {@link IUserService.setUsername}\\r\\n */\\r\\n public setUsername(username: string): void {\\r\\n this.username.set(username);\\r\\n }\\r\\n}\\r\\n\",\"/**\\n * Generated bundle index. Do not edit.\\n */\\n\\nexport * from './public-api';\\n\"],\"names\":[],\"mappings\":\";;;;;AAAA;;AAEG;AACI,MAAM,WAAW,GAAG;AACzB,IAAA,KAAK,EAAE,OAAO;;;;;;;;;;;ACJT,MAAM,gBAAgB,GAAW,OAAO;AACxC,MAAM,aAAa,GAAW,OAAO;;MCa/B,WAAW,CAAA;AAQtB;;;;AAIG;AACH,IAAA,WAAA,GAAA;AAZO,QAAA,IAAA,CAAA,QAAQ,GAAuC,MAAM,CAAC,SAAS,CAAC;AAEvE;;AAEG;AACI,QAAA,IAAA,CAAA,KAAK,GAAuC,MAAM,CAAC,SAAS,CAAC;QAQlE,MAAM,MAAM,GAAQ,iBAAiB;AAErC,QAAA,MAAM,KAAK,GAAkB;AAC3B,YAAA,QAAQ,EAAE,MAAM,CAAC,QAAQ,IAAI,gBAAgB;AAC7C,YAAA,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,aAAa;AACpC,YAAA,GAAG,EAAE;AACH,gBAAA,mBAAmB,EAAE,MAAM,CAAC,aAAa,IAAI,YAAY;AAC1D,aAAA;SACF;QAED,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,SAAS,EAAE;IAChC;AAEA;;AAEG;AACI,IAAA,MAAM,CAAC,KAAoB,EAAA;QAChC,IAAI,CAAC,KAAK,EAAE;QAEZ,KAAK,CAAC,QAAQ,IAAI,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC;AAElD,QAAA,OAAO,EAAE,CAAC,SAAS,CAAC;IACtB;AAEA;;AAEG;AACI,IAAA,KAAK,KAAU;AAEtB;;AAEG;AACI,IAAA,WAAW,CAAC,QAAgB,EAAA;AACjC,QAAA,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC;IAC7B;+GAhDW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAX,IAAA,SAAA,IAAA,CAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAW,cAFV,MAAM,EAAA,CAAA,CAAA;;4FAEP,WAAW,EAAA,UAAA,EAAA,CAAA;kBAHvB,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA;;;ACbD;;AAEG;;;;\"}","type":"asset"}]}
@@ -1,2 +0,0 @@
1
-
2
- cdb5bfd09185b30f93aba1378402b400b8d73d59 {"key":"a84262f052ac385d33836a4f6b1ac4ad7890af01","integrity":"sha512-nf0/1Vsm3OvhWULF/MnZHxJqsXq6WuSEeh5madEKOTeuMnq3yEofS1ZYOnOooEc7pyLQpCYE0y3VjR4NtNwefg==","time":1773424225171,"size":52211}
@@ -1,2 +0,0 @@
1
-
2
- 7030cfcc0c2c56a8a2c51a865049b013c5876bf9 {"key":"1a8e50569b2661f062dd0e84a3ee52a77d13f302","integrity":"sha512-rALraPXKSfDqHAGkYDkZSADSkNhCVylf72aODId7umjq8uUEBT0u2N7iDGRCpRuzXRQAqHAS5az0hS5YpGT70Q==","time":1773424225178,"size":10902}
@@ -1,30 +0,0 @@
1
- {
2
- "branchNameLinter": {
3
- "prefixes": [
4
- "feature",
5
- "feat",
6
- "bugfix",
7
- "fix",
8
- "hotfix",
9
- "release",
10
- "chore"
11
- ],
12
-
13
- "suggestions": {
14
- "feat": "feature",
15
- "fix": "bugfix",
16
- "hot": "hotfix",
17
- "releases": "release",
18
- "docs": "chore",
19
- "doc": "chore"
20
- },
21
-
22
- "banned": ["wip"],
23
- "skip": ["main", "master", "develop"],
24
- "disallowed": ["master", "develop", "staging"],
25
- "separator": "/",
26
-
27
- "regex": "^(feature|feat|bugfix|fix|hotfix|chore)\\/[a-z0-9]+(?:-[a-z0-9]+)*$|^release\\/v?[0-9]+(?:\\.[0-9]+)+$",
28
- "regexOptions": ""
29
- }
30
- }
package/.editorconfig DELETED
@@ -1,17 +0,0 @@
1
- # Editor configuration, see https://editorconfig.org
2
- root = true
3
-
4
- [*]
5
- charset = utf-8
6
- indent_style = space
7
- indent_size = 2
8
- insert_final_newline = true
9
- trim_trailing_whitespace = true
10
- end_of_line = lf
11
-
12
- [*.ts]
13
- quote_type = single
14
-
15
- [*.md]
16
- max_line_length = 100
17
- trim_trailing_whitespace = true
@@ -1,48 +0,0 @@
1
- name: Release
2
-
3
- on:
4
- push:
5
- branches:
6
- - main
7
-
8
- jobs:
9
- release:
10
- runs-on: ubuntu-latest
11
- steps:
12
- # 1. Checkout repository
13
- - uses: actions/checkout@v4
14
- with:
15
- fetch-depth: 0
16
-
17
- # 2. Setup Node.js
18
- - uses: actions/setup-node@v4
19
- with:
20
- node-version: 22
21
- registry-url: 'https://registry.npmjs.org/'
22
-
23
- # 3. Configure npm authentication using environment variable
24
- - name: Configure npm authentication
25
- run: |
26
- echo "@albi_scando:registry=https://registry.npmjs.org/" >> ~/.npmrc
27
- echo "//registry.npmjs.org/:_authToken=${NPM_PORTFOLIO_TOKEN}" >> ~/.npmrc
28
- echo "always-auth=true" >> ~/.npmrc
29
- env:
30
- NPM_PORTFOLIO_TOKEN: ${{ secrets.NPM_PORTFOLIO_TOKEN }}
31
-
32
- # 4. Install dependencies
33
- - name: Install dependencies
34
- run: npm ci
35
- env:
36
- NPM_PORTFOLIO_TOKEN: ${{ secrets.NPM_PORTFOLIO_TOKEN }}
37
-
38
- # 5. Build the project
39
- - name: Build
40
- run: npm run build
41
-
42
- # 6. Release using semantic-release
43
- - name: Release
44
- run: npx semantic-release
45
- env:
46
- HUSKY: 0
47
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48
- NPM_PORTFOLIO_TOKEN: ${{ secrets.NPM_PORTFOLIO_TOKEN }}
package/.husky/commit-msg DELETED
@@ -1,5 +0,0 @@
1
- # 1️⃣ Check commit message
2
- npx --no-install commitlint --edit "$1"
3
- if [ $? -eq 0 ]; then
4
- echo "✅ Commit message is valid."
5
- fi
package/.husky/pre-commit DELETED
@@ -1 +0,0 @@
1
- npx lint-staged
package/.husky/pre-push DELETED
@@ -1,5 +0,0 @@
1
- # 1️⃣ Check branch name
2
- scripts/check-branch.sh
3
-
4
- # 2️⃣ Run full ESLint check
5
- scripts/lint-project.sh || exit 1
package/.nvmrc DELETED
@@ -1 +0,0 @@
1
- 22
package/.prettierignore DELETED
@@ -1,5 +0,0 @@
1
- build
2
- coverage
3
- public
4
- lib
5
- pnpm-lock.yaml
package/.releaserc.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "branches": ["main"],
3
- "plugins": [
4
- "@semantic-release/commit-analyzer",
5
- "@semantic-release/release-notes-generator",
6
- "@semantic-release/changelog",
7
- "@semantic-release/npm",
8
- "@semantic-release/github",
9
- "@semantic-release/git"
10
- ]
11
- }
package/CHANGELOG.md DELETED
@@ -1,15 +0,0 @@
1
- # 1.0.0 (2026-03-13)
2
-
3
-
4
- ### Bug Fixes
5
-
6
- * added always-auth ([c7cfea4](https://github.com/albertoscandolara/as-user-lib/commit/c7cfea4fe8ec1fed9266fb64e71c57110a59a939))
7
- * added eslint cache to gitignore ([891b3b8](https://github.com/albertoscandolara/as-user-lib/commit/891b3b83e192a3ec6f80dbbd7778d5dba4d19b96))
8
- * added scripts ([6c388fa](https://github.com/albertoscandolara/as-user-lib/commit/6c388fa608775b759cad724809d4f2a7b4ef8336))
9
- * fix ([bc56855](https://github.com/albertoscandolara/as-user-lib/commit/bc56855dcd2bb61d5cf7e36eeae1a271b05cb52f))
10
- * removed eslintcache ([9a56929](https://github.com/albertoscandolara/as-user-lib/commit/9a5692952c41c285020938dbf90850cb996f5018))
11
-
12
-
13
- ### Features
14
-
15
- * added new packages ([4ce8dd6](https://github.com/albertoscandolara/as-user-lib/commit/4ce8dd62f13a2cd2b00b91dde056085e68192352))
package/angular.json DELETED
@@ -1,40 +0,0 @@
1
- {
2
- "$schema": "./node_modules/@angular/cli/lib/config/schema.json",
3
- "version": 1,
4
- "newProjectRoot": "projects",
5
- "projects": {
6
- "as-user-lib": {
7
- "projectType": "library",
8
- "root": "projects/as-user-lib",
9
- "sourceRoot": "projects/as-user-lib/src",
10
- "prefix": "lib",
11
- "architect": {
12
- "build": {
13
- "builder": "@angular-devkit/build-angular:ng-packagr",
14
- "options": {
15
- "project": "projects/as-user-lib/ng-package.json"
16
- },
17
- "configurations": {
18
- "production": {
19
- "tsConfig": "projects/as-user-lib/tsconfig.lib.prod.json"
20
- },
21
- "development": {
22
- "tsConfig": "projects/as-user-lib/tsconfig.lib.json"
23
- }
24
- },
25
- "defaultConfiguration": "production"
26
- },
27
- "test": {
28
- "builder": "@angular-devkit/build-angular:karma",
29
- "options": {
30
- "tsConfig": "projects/as-user-lib/tsconfig.spec.json",
31
- "polyfills": ["zone.js", "zone.js/testing"]
32
- }
33
- }
34
- }
35
- }
36
- },
37
- "cli": {
38
- "analytics": false
39
- }
40
- }
@@ -1 +0,0 @@
1
- export default { extends: ['@commitlint/config-conventional'] };
@@ -1,11 +0,0 @@
1
- # Contributing
2
-
3
- Contributions are welcome! To contribute:
4
-
5
- 1. Fork the repo
6
- 2. Create a feature branch (git checkout -b feature-my-feature)
7
- 3. Commit your changes (git commit -m 'feat: add feature description')
8
- 4. Push to the branch (git push origin feature-my-feature)
9
- 5. Open a pull request
10
-
11
- Please ensure your code follows the existing style and passes lint and format checks.
@@ -1,17 +0,0 @@
1
- ## 📦 Installation
2
-
3
- ```bash
4
- npm install @albi_scando/as-user-lib
5
- ```
6
-
7
- or
8
-
9
- ```bash
10
- pnpm add @albi_scando/as-user-lib
11
- ```
12
-
13
- or
14
-
15
- ```bash
16
- yarn add @albi_scando/as-user-lib
17
- ```
@@ -1,6 +0,0 @@
1
- # License
2
-
3
- This software is the property of **Alberto Scandolara** and is provided for **authorized use only**.
4
- 🔒 Copying, modification, or distribution of this code is **strictly prohibited** without prior written consent from Alberto Scandolara.
5
-
6
- © 2025 **Alberto Scandolara**. All rights reserved.
package/eslint.config.js DELETED
@@ -1,173 +0,0 @@
1
- // eslint.config.js
2
- import tseslint from 'typescript-eslint';
3
- import prettier from 'eslint-config-prettier';
4
- import prettierPlugin from 'eslint-plugin-prettier';
5
- import js from '@eslint/js';
6
- import eslintPluginRegExp from 'eslint-plugin-regexp';
7
- import eslintPluginImportX from 'eslint-plugin-import-x';
8
- import eslintPluginSecurity from 'eslint-plugin-security';
9
- import path from 'path';
10
-
11
- export default [
12
- // ----------------------------------------------------
13
- // Ignore build artifacts
14
- // ----------------------------------------------------
15
- {
16
- ignores: [
17
- 'dist',
18
- 'node_modules',
19
- 'docs/**',
20
- 'vite.config.ts',
21
- 'vitepress.config.ts',
22
- ],
23
- },
24
-
25
- // ----------------------------------------------------
26
- // Base JavaScript recommended rules
27
- // ----------------------------------------------------
28
- js.configs.recommended,
29
-
30
- // ----------------------------------------------------
31
- // Disable formatting rules incompatible with Prettier
32
- // ----------------------------------------------------
33
- prettier,
34
-
35
- // ----------------------------------------------------
36
- // TypeScript recommended rules
37
- // ----------------------------------------------------
38
- ...tseslint.configs.recommended,
39
-
40
- // ----------------------------------------------------
41
- // TypeScript strict & stylistic
42
- // ----------------------------------------------------
43
- ...tseslint.configs.strict,
44
- ...tseslint.configs.stylistic,
45
-
46
- // ----------------------------------------------------
47
- // Project-level rules
48
- // ----------------------------------------------------
49
- {
50
- files: ['**/*.ts'],
51
-
52
- languageOptions: {
53
- parserOptions: {
54
- project: ['./tsconfig.json'],
55
- tsconfigRootDir: path.resolve(),
56
- },
57
- },
58
-
59
- plugins: {
60
- prettier: prettierPlugin,
61
- import: eslintPluginImportX,
62
- regexp: eslintPluginRegExp,
63
- security: eslintPluginSecurity,
64
- },
65
-
66
- rules: {
67
- // ----------------------------------------------
68
- // PRETTIER
69
- // ----------------------------------------------
70
- 'prettier/prettier': ['error', {}, { usePrettierrc: true }],
71
-
72
- // ----------------------------------------------
73
- // TYPESCRIPT RULES — MAX STRICTNESS
74
- // ----------------------------------------------
75
- '@typescript-eslint/no-unused-vars': [
76
- 'error',
77
- { argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
78
- ],
79
- '@typescript-eslint/no-explicit-any': 'error',
80
- '@typescript-eslint/no-floating-promises': 'error',
81
- '@typescript-eslint/no-misused-promises': 'error',
82
- '@typescript-eslint/no-non-null-assertion': 'error',
83
- '@typescript-eslint/no-unnecessary-type-assertion': 'error',
84
- '@typescript-eslint/no-redundant-type-constituents': 'error',
85
- '@typescript-eslint/explicit-function-return-type': [
86
- 'error',
87
- { allowExpressions: true, allowTypedFunctionExpressions: true },
88
- ],
89
- '@typescript-eslint/strict-boolean-expressions': [
90
- 'error',
91
- {
92
- allowNumber: false,
93
- allowString: false,
94
- allowNullableObject: false,
95
- allowNullableBoolean: false,
96
- allowNullableString: false,
97
- allowNullableNumber: false,
98
- allowAny: false,
99
- },
100
- ],
101
- '@typescript-eslint/switch-exhaustiveness-check': 'error',
102
- '@typescript-eslint/consistent-type-imports': [
103
- 'error',
104
- { prefer: 'type-imports', fixStyle: 'separate-type-imports' },
105
- ],
106
- '@typescript-eslint/no-confusing-void-expression': 'error',
107
- '@typescript-eslint/prefer-nullish-coalescing': 'error',
108
-
109
- // ----------------------------------------------
110
- // IMPORT RULES — ULTRA STRICT
111
- // ----------------------------------------------
112
- 'import/no-absolute-path': 'error',
113
- 'import/no-useless-path-segments': 'error',
114
- 'import/no-cycle': 'error',
115
- 'import/no-self-import': 'error',
116
- 'import/first': 'error',
117
- 'import/newline-after-import': 'error',
118
- 'import/order': [
119
- 'error',
120
- {
121
- groups: [
122
- 'builtin',
123
- 'external',
124
- 'internal',
125
- ['parent', 'sibling', 'index'],
126
- ],
127
- 'newlines-between': 'always',
128
- alphabetize: { order: 'asc' },
129
- },
130
- ],
131
-
132
- // ----------------------------------------------
133
- // REGEXP RULES
134
- // ----------------------------------------------
135
- 'regexp/no-dupe-disjunctions': 'error',
136
- 'regexp/no-empty-capturing-group': 'error',
137
- 'regexp/no-empty-character-class': 'error',
138
- 'regexp/no-legacy-features': 'error',
139
- 'regexp/no-trivially-nested-quantifier': 'error',
140
- 'regexp/no-useless-lazy': 'error',
141
-
142
- // ----------------------------------------------
143
- // SECURITY RULES
144
- // ----------------------------------------------
145
- 'security/detect-non-literal-fs-filename': 'error',
146
- 'security/detect-eval-with-expression': 'error',
147
- 'security/detect-child-process': 'error',
148
-
149
- // ----------------------------------------------
150
- // GENERAL JS RULES
151
- // ----------------------------------------------
152
- eqeqeq: ['error', 'always', { null: 'ignore' }],
153
- 'no-debugger': 'error',
154
- 'no-alert': 'error',
155
- 'no-var': 'error',
156
- 'prefer-const': 'error',
157
- 'no-return-await': 'error',
158
-
159
- // Specific rules
160
- curly: ['error', 'all'],
161
- },
162
- },
163
-
164
- {
165
- files: ['.storybook/**/*.ts'],
166
- languageOptions: {
167
- parserOptions: {
168
- project: ['./.storybook/tsconfig.json'],
169
- tsconfigRootDir: path.resolve(),
170
- },
171
- },
172
- },
173
- ];
@@ -1,13 +0,0 @@
1
- export default {
2
- '*.{ts,js}': (filenames) => {
3
- // only lint files outside docs
4
- const files = filenames.filter((f) => !f.startsWith('docs/'));
5
- return files.length
6
- ? [
7
- `eslint --fix ${files.join(' ')}`,
8
- `prettier --write ${files.join(' ')}`,
9
- ]
10
- : [];
11
- },
12
- '*.{json,md,html,css,scss}': ['prettier --write'],
13
- };
package/netlify.toml DELETED
@@ -1,6 +0,0 @@
1
- [build]
2
- command = "pnpm docs:build"
3
- publish = "dist/as-user-lib"
4
-
5
- [build.environment]
6
- NODE_VERSION = "22"
@@ -1,12 +0,0 @@
1
- export default {
2
- semi: true,
3
- singleQuote: true,
4
- tabWidth: 2,
5
- useTabs: false,
6
- trailingComma: 'es5',
7
- bracketSameLine: false,
8
- printWidth: 80,
9
- jsxSingleQuote: false,
10
- endOfLine: 'lf',
11
- arrowParens: 'always',
12
- };
@@ -1,7 +0,0 @@
1
- {
2
- "$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
3
- "dest": "../../dist/as-user-lib",
4
- "lib": {
5
- "entryFile": "src/public-api.ts"
6
- }
7
- }
@@ -1,12 +0,0 @@
1
- {
2
- "name": "@albi_scando/as-user-lib",
3
- "version": "0.0.1-rc1",
4
- "peerDependencies": {
5
- "@angular/common": "^17.2.0",
6
- "@angular/core": "^17.2.0"
7
- },
8
- "dependencies": {
9
- "tslib": "^2.3.0"
10
- },
11
- "sideEffects": false
12
- }
@@ -1,12 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/lib",
6
- "declaration": true,
7
- "declarationMap": true,
8
- "inlineSources": true,
9
- "types": []
10
- },
11
- "exclude": ["**/*.spec.ts"]
12
- }
@@ -1,10 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "./tsconfig.lib.json",
4
- "compilerOptions": {
5
- "declarationMap": false
6
- },
7
- "angularCompilerOptions": {
8
- "compilationMode": "partial"
9
- }
10
- }
@@ -1,9 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "extends": "../../tsconfig.json",
4
- "compilerOptions": {
5
- "outDir": "../../out-tsc/spec",
6
- "types": ["jasmine"]
7
- },
8
- "include": ["**/*.spec.ts", "**/*.d.ts"]
9
- }
@@ -1,7 +0,0 @@
1
- #!/bin/sh
2
-
3
- BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD)
4
-
5
- echo "Checking branch: $BRANCH_NAME"
6
-
7
- BRANCH_NAME="$BRANCH_NAME" npx branch-name-lint .branchlintrc.json
@@ -1,11 +0,0 @@
1
- #!/bin/sh
2
-
3
- echo "Running ESLint..."
4
- npx eslint . --ext .ts,.js --cache
5
-
6
- if [ $? -ne 0 ]; then
7
- echo "❌ ESLint errors detected. Fix them before pushing."
8
- exit 1
9
- fi
10
-
11
- echo "✔ ESLint passed."
package/tsconfig.json DELETED
@@ -1,34 +0,0 @@
1
- /* To learn more about this file see: https://angular.io/config/tsconfig. */
2
- {
3
- "compileOnSave": false,
4
- "compilerOptions": {
5
- "paths": {
6
- "as-user-lib": ["./dist/as-user-lib"]
7
- },
8
- "outDir": "./dist/out-tsc",
9
- "forceConsistentCasingInFileNames": true,
10
- "strict": true,
11
- "noImplicitOverride": true,
12
- "noPropertyAccessFromIndexSignature": true,
13
- "noImplicitReturns": true,
14
- "noFallthroughCasesInSwitch": true,
15
- "skipLibCheck": true,
16
- "esModuleInterop": true,
17
- "sourceMap": true,
18
- "declaration": false,
19
- "experimentalDecorators": true,
20
- "moduleResolution": "node",
21
- "importHelpers": true,
22
- "target": "ES2022",
23
- "module": "ES2022",
24
- "resolveJsonModule": true,
25
- "useDefineForClassFields": false,
26
- "lib": ["ES2022", "dom"]
27
- },
28
- "angularCompilerOptions": {
29
- "enableI18nLegacyMessageIdFormat": false,
30
- "strictInjectionParameters": true,
31
- "strictInputAccessModifiers": true,
32
- "strictTemplates": true
33
- }
34
- }
package/typedoc.json DELETED
@@ -1,7 +0,0 @@
1
- {
2
- "entryPoints": ["projects/as-user-lib/src/public-api.ts"],
3
- "out": "dist/as-user-lib",
4
- "theme": "default",
5
- "includeVersion": true,
6
- "exclude": ["**/node_modules/**", "**/*.spec.ts", "**/dist/**"]
7
- }
File without changes