@molecule/app-angular 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +115 -0
- package/dist/i18n-reactive.d.ts +41 -0
- package/dist/i18n-reactive.d.ts.map +1 -0
- package/dist/i18n-reactive.js +46 -0
- package/dist/i18n-reactive.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +84 -0
- package/dist/index.js.map +1 -0
- package/dist/providers.d.ts +96 -0
- package/dist/providers.d.ts.map +1 -0
- package/dist/providers.js +144 -0
- package/dist/providers.js.map +1 -0
- package/dist/services/async-state.service.d.ts +50 -0
- package/dist/services/async-state.service.d.ts.map +1 -0
- package/dist/services/async-state.service.js +109 -0
- package/dist/services/async-state.service.js.map +1 -0
- package/dist/services/auth.service.d.ts +105 -0
- package/dist/services/auth.service.d.ts.map +1 -0
- package/dist/services/auth.service.js +124 -0
- package/dist/services/auth.service.js.map +1 -0
- package/dist/services/capacitor-app.service.d.ts +46 -0
- package/dist/services/capacitor-app.service.d.ts.map +1 -0
- package/dist/services/capacitor-app.service.js +53 -0
- package/dist/services/capacitor-app.service.js.map +1 -0
- package/dist/services/change-password.service.d.ts +37 -0
- package/dist/services/change-password.service.d.ts.map +1 -0
- package/dist/services/change-password.service.js +34 -0
- package/dist/services/change-password.service.js.map +1 -0
- package/dist/services/device.service.d.ts +35 -0
- package/dist/services/device.service.d.ts.map +1 -0
- package/dist/services/device.service.js +29 -0
- package/dist/services/device.service.js.map +1 -0
- package/dist/services/forms.service.d.ts +237 -0
- package/dist/services/forms.service.d.ts.map +1 -0
- package/dist/services/forms.service.js +280 -0
- package/dist/services/forms.service.js.map +1 -0
- package/dist/services/http.service.d.ts +118 -0
- package/dist/services/http.service.d.ts.map +1 -0
- package/dist/services/http.service.js +171 -0
- package/dist/services/http.service.js.map +1 -0
- package/dist/services/i18n.service.d.ts +111 -0
- package/dist/services/i18n.service.d.ts.map +1 -0
- package/dist/services/i18n.service.js +135 -0
- package/dist/services/i18n.service.js.map +1 -0
- package/dist/services/index.d.ts +27 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/index.js +27 -0
- package/dist/services/index.js.map +1 -0
- package/dist/services/logger.service.d.ts +79 -0
- package/dist/services/logger.service.d.ts.map +1 -0
- package/dist/services/logger.service.js +110 -0
- package/dist/services/logger.service.js.map +1 -0
- package/dist/services/login.service.d.ts +37 -0
- package/dist/services/login.service.d.ts.map +1 -0
- package/dist/services/login.service.js +34 -0
- package/dist/services/login.service.js.map +1 -0
- package/dist/services/oauth.service.d.ts +110 -0
- package/dist/services/oauth.service.d.ts.map +1 -0
- package/dist/services/oauth.service.js +214 -0
- package/dist/services/oauth.service.js.map +1 -0
- package/dist/services/password-reset.service.d.ts +41 -0
- package/dist/services/password-reset.service.d.ts.map +1 -0
- package/dist/services/password-reset.service.js +45 -0
- package/dist/services/password-reset.service.js.map +1 -0
- package/dist/services/platform.service.d.ts +39 -0
- package/dist/services/platform.service.d.ts.map +1 -0
- package/dist/services/platform.service.js +33 -0
- package/dist/services/platform.service.js.map +1 -0
- package/dist/services/promise.service.d.ts +40 -0
- package/dist/services/promise.service.d.ts.map +1 -0
- package/dist/services/promise.service.js +85 -0
- package/dist/services/promise.service.js.map +1 -0
- package/dist/services/push.service.d.ts +45 -0
- package/dist/services/push.service.d.ts.map +1 -0
- package/dist/services/push.service.js +64 -0
- package/dist/services/push.service.js.map +1 -0
- package/dist/services/router.service.d.ts +114 -0
- package/dist/services/router.service.d.ts.map +1 -0
- package/dist/services/router.service.js +142 -0
- package/dist/services/router.service.js.map +1 -0
- package/dist/services/signup.service.d.ts +37 -0
- package/dist/services/signup.service.d.ts.map +1 -0
- package/dist/services/signup.service.js +34 -0
- package/dist/services/signup.service.js.map +1 -0
- package/dist/services/state.service.d.ts +82 -0
- package/dist/services/state.service.d.ts.map +1 -0
- package/dist/services/state.service.js +122 -0
- package/dist/services/state.service.js.map +1 -0
- package/dist/services/storage.service.d.ts +111 -0
- package/dist/services/storage.service.d.ts.map +1 -0
- package/dist/services/storage.service.js +167 -0
- package/dist/services/storage.service.js.map +1 -0
- package/dist/services/theme.service.d.ts +89 -0
- package/dist/services/theme.service.d.ts.map +1 -0
- package/dist/services/theme.service.js +116 -0
- package/dist/services/theme.service.js.map +1 -0
- package/dist/services/version.service.d.ts +44 -0
- package/dist/services/version.service.d.ts.map +1 -0
- package/dist/services/version.service.js +63 -0
- package/dist/services/version.service.js.map +1 -0
- package/dist/tokens.d.ts +47 -0
- package/dist/tokens.d.ts.map +1 -0
- package/dist/tokens.js +39 -0
- package/dist/tokens.js.map +1 -0
- package/dist/types.d.ts +42 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +7 -0
- package/dist/types.js.map +1 -0
- package/package.json +61 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular service for theming.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { Inject, Injectable } from '@angular/core';
|
|
7
|
+
import { BehaviorSubject, distinctUntilChanged, map } from 'rxjs';
|
|
8
|
+
import { THEME_PROVIDER } from '../tokens.js';
|
|
9
|
+
import * as i0 from "@angular/core";
|
|
10
|
+
/**
|
|
11
|
+
* Angular service for theming.
|
|
12
|
+
*
|
|
13
|
+
* Wraps molecule theme provider and exposes state as RxJS observables.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* ```typescript
|
|
17
|
+
* @Component({
|
|
18
|
+
* selector: 'app-root',
|
|
19
|
+
* template: `
|
|
20
|
+
* <div [style.background]="(theme$ | async)?.colors.background">
|
|
21
|
+
* <button (click)="toggleTheme()">
|
|
22
|
+
* Theme: {{ themeName$ | async }}
|
|
23
|
+
* </button>
|
|
24
|
+
* </div>
|
|
25
|
+
* `
|
|
26
|
+
* })
|
|
27
|
+
* export class AppComponent {
|
|
28
|
+
* theme$ = this.themeService.theme$
|
|
29
|
+
* themeName$ = this.themeService.themeName$
|
|
30
|
+
*
|
|
31
|
+
* constructor(private themeService: MoleculeThemeService) {}
|
|
32
|
+
*
|
|
33
|
+
* toggleTheme() {
|
|
34
|
+
* this.themeService.toggleTheme()
|
|
35
|
+
* }
|
|
36
|
+
* }
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
/**
|
|
40
|
+
* Molecule Theme Service class.
|
|
41
|
+
*/
|
|
42
|
+
export class MoleculeThemeService {
|
|
43
|
+
constructor(provider) {
|
|
44
|
+
this.provider = provider;
|
|
45
|
+
this.unsubscribe = null;
|
|
46
|
+
this.themeSubject = new BehaviorSubject(provider.getTheme());
|
|
47
|
+
this.themeNameSubject = new BehaviorSubject(provider.getTheme().name);
|
|
48
|
+
this.unsubscribe = provider.subscribe(() => {
|
|
49
|
+
this.themeSubject.next(provider.getTheme());
|
|
50
|
+
this.themeNameSubject.next(provider.getTheme().name);
|
|
51
|
+
});
|
|
52
|
+
this.theme$ = this.themeSubject.asObservable();
|
|
53
|
+
this.themeName$ = this.themeNameSubject.asObservable();
|
|
54
|
+
this.mode$ = this.theme$.pipe(map((theme) => theme.mode), distinctUntilChanged());
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Get the current theme snapshot.
|
|
58
|
+
* @returns The result.
|
|
59
|
+
*/
|
|
60
|
+
get theme() {
|
|
61
|
+
return this.provider.getTheme();
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Get the current theme name snapshot.
|
|
65
|
+
* @returns The result.
|
|
66
|
+
*/
|
|
67
|
+
get themeName() {
|
|
68
|
+
return this.provider.getTheme().name;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Get available themes.
|
|
72
|
+
* @returns The result.
|
|
73
|
+
*/
|
|
74
|
+
get themes() {
|
|
75
|
+
return this.provider.getThemes?.() ?? [];
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Set the current theme.
|
|
79
|
+
*
|
|
80
|
+
* @param name - Theme name
|
|
81
|
+
*/
|
|
82
|
+
setTheme(name) {
|
|
83
|
+
this.provider.setTheme(name);
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Toggle to the next theme.
|
|
87
|
+
*/
|
|
88
|
+
toggleTheme() {
|
|
89
|
+
const themes = this.themes;
|
|
90
|
+
const currentName = this.themeName;
|
|
91
|
+
const currentIndex = themes.findIndex((t) => t.name === currentName);
|
|
92
|
+
const nextIndex = (currentIndex + 1) % themes.length;
|
|
93
|
+
this.provider.setTheme(themes[nextIndex]);
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Cleans up subscriptions and completes subjects on service destruction.
|
|
97
|
+
*/
|
|
98
|
+
ngOnDestroy() {
|
|
99
|
+
this.unsubscribe?.();
|
|
100
|
+
this.themeSubject.complete();
|
|
101
|
+
this.themeNameSubject.complete();
|
|
102
|
+
}
|
|
103
|
+
static { this.ɵfac = function MoleculeThemeService_Factory(__ngFactoryType__) { /* @ts-ignore */
|
|
104
|
+
return new (__ngFactoryType__ || MoleculeThemeService)(i0.ɵɵinject(THEME_PROVIDER)); }; }
|
|
105
|
+
static { this.ɵprov = /*@__PURE__*/ i0.ɵɵdefineInjectable({ token: MoleculeThemeService, factory: MoleculeThemeService.ɵfac, providedIn: 'root' }); }
|
|
106
|
+
}
|
|
107
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MoleculeThemeService, [{
|
|
108
|
+
type: Injectable,
|
|
109
|
+
args: [{
|
|
110
|
+
providedIn: 'root',
|
|
111
|
+
}]
|
|
112
|
+
}], () => [{ type: undefined, decorators: [{
|
|
113
|
+
type: Inject,
|
|
114
|
+
args: [THEME_PROVIDER]
|
|
115
|
+
}] }], null); })();
|
|
116
|
+
//# sourceMappingURL=theme.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.service.js","sourceRoot":"","sources":["../../src/services/theme.service.ts"],"names":[],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+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { type Observable } from 'rxjs';
|
|
7
|
+
import type { UpdateCheckOptions, VersionState } from '@molecule/app-version';
|
|
8
|
+
/**
|
|
9
|
+
* Version service interface.
|
|
10
|
+
*/
|
|
11
|
+
export interface VersionService {
|
|
12
|
+
state$: Observable<VersionState>;
|
|
13
|
+
isUpdateAvailable$: Observable<boolean>;
|
|
14
|
+
isChecking$: Observable<boolean>;
|
|
15
|
+
isServiceWorkerWaiting$: Observable<boolean>;
|
|
16
|
+
newVersion$: Observable<string | undefined>;
|
|
17
|
+
getState: () => VersionState;
|
|
18
|
+
checkForUpdates: () => Promise<boolean>;
|
|
19
|
+
applyUpdate: (options?: {
|
|
20
|
+
force?: boolean;
|
|
21
|
+
}) => void;
|
|
22
|
+
dismissUpdate: () => void;
|
|
23
|
+
startPeriodicChecks: (options?: UpdateCheckOptions) => void;
|
|
24
|
+
stopPeriodicChecks: () => void;
|
|
25
|
+
destroy: () => void;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Creates an Angular version service with reactive state.
|
|
29
|
+
*
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* ```typescript
|
|
33
|
+
* const version = createVersionService()
|
|
34
|
+
*
|
|
35
|
+
* version.isUpdateAvailable$.subscribe(available => {
|
|
36
|
+
* if (available) console.log('Update available!')
|
|
37
|
+
* })
|
|
38
|
+
*
|
|
39
|
+
* await version.checkForUpdates()
|
|
40
|
+
* ```
|
|
41
|
+
* @returns The created instance.
|
|
42
|
+
*/
|
|
43
|
+
export declare const createVersionService: () => VersionService;
|
|
44
|
+
//# sourceMappingURL=version.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.service.d.ts","sourceRoot":"","sources":["../../src/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAA8C,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAElF,OAAO,KAAK,EAAE,kBAAkB,EAAgB,YAAY,EAAE,MAAM,uBAAuB,CAAA;AAG3F;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC,CAAA;IAChC,kBAAkB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IACvC,WAAW,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAChC,uBAAuB,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAC5C,WAAW,EAAE,UAAU,CAAC,MAAM,GAAG,SAAS,CAAC,CAAA;IAC3C,QAAQ,EAAE,MAAM,YAAY,CAAA;IAC5B,eAAe,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAA;IACvC,WAAW,EAAE,CAAC,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAA;IACpD,aAAa,EAAE,MAAM,IAAI,CAAA;IACzB,mBAAmB,EAAE,CAAC,OAAO,CAAC,EAAE,kBAAkB,KAAK,IAAI,CAAA;IAC3D,kBAAkB,EAAE,MAAM,IAAI,CAAA;IAC9B,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAWD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,oBAAoB,QAAO,cA8CvC,CAAA"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular version service for reactive version/update state.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { BehaviorSubject, distinctUntilChanged, map } from 'rxjs';
|
|
7
|
+
import { getProvider } from '@molecule/app-version';
|
|
8
|
+
const VERSION_EVENTS = [
|
|
9
|
+
'update-available',
|
|
10
|
+
'service-worker-waiting',
|
|
11
|
+
'service-worker-activated',
|
|
12
|
+
'check-start',
|
|
13
|
+
'check-complete',
|
|
14
|
+
'check-error',
|
|
15
|
+
];
|
|
16
|
+
/**
|
|
17
|
+
* Creates an Angular version service with reactive state.
|
|
18
|
+
*
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```typescript
|
|
22
|
+
* const version = createVersionService()
|
|
23
|
+
*
|
|
24
|
+
* version.isUpdateAvailable$.subscribe(available => {
|
|
25
|
+
* if (available) console.log('Update available!')
|
|
26
|
+
* })
|
|
27
|
+
*
|
|
28
|
+
* await version.checkForUpdates()
|
|
29
|
+
* ```
|
|
30
|
+
* @returns The created instance.
|
|
31
|
+
*/
|
|
32
|
+
export const createVersionService = () => {
|
|
33
|
+
const provider = getProvider();
|
|
34
|
+
const subject = new BehaviorSubject(provider.getState());
|
|
35
|
+
const unsubscribers = [];
|
|
36
|
+
const onEvent = () => {
|
|
37
|
+
subject.next(provider.getState());
|
|
38
|
+
};
|
|
39
|
+
for (const event of VERSION_EVENTS) {
|
|
40
|
+
unsubscribers.push(provider.on(event, onEvent));
|
|
41
|
+
}
|
|
42
|
+
const state$ = subject.asObservable();
|
|
43
|
+
return {
|
|
44
|
+
state$,
|
|
45
|
+
isUpdateAvailable$: state$.pipe(map((s) => s.isUpdateAvailable), distinctUntilChanged()),
|
|
46
|
+
isChecking$: state$.pipe(map((s) => s.isChecking), distinctUntilChanged()),
|
|
47
|
+
isServiceWorkerWaiting$: state$.pipe(map((s) => s.isServiceWorkerWaiting), distinctUntilChanged()),
|
|
48
|
+
newVersion$: state$.pipe(map((s) => s.newVersion), distinctUntilChanged()),
|
|
49
|
+
getState: () => provider.getState(),
|
|
50
|
+
checkForUpdates: () => provider.checkForUpdates(),
|
|
51
|
+
applyUpdate: (options) => provider.applyUpdate(options),
|
|
52
|
+
dismissUpdate: () => provider.dismissUpdate(),
|
|
53
|
+
startPeriodicChecks: (options) => provider.startPeriodicChecks(options),
|
|
54
|
+
stopPeriodicChecks: () => provider.stopPeriodicChecks(),
|
|
55
|
+
destroy: () => {
|
|
56
|
+
for (const unsub of unsubscribers) {
|
|
57
|
+
unsub();
|
|
58
|
+
}
|
|
59
|
+
subject.complete();
|
|
60
|
+
},
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=version.service.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.service.js","sourceRoot":"","sources":["../../src/services/version.service.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,EAAE,eAAe,EAAE,oBAAoB,EAAE,GAAG,EAAmB,MAAM,MAAM,CAAA;AAGlF,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAoBnD,MAAM,cAAc,GAAmB;IACrC,kBAAkB;IAClB,wBAAwB;IACxB,0BAA0B;IAC1B,aAAa;IACb,gBAAgB;IAChB,aAAa;CACd,CAAA;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAmB,EAAE;IACvD,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAA;IAC9B,MAAM,OAAO,GAAG,IAAI,eAAe,CAAe,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;IACtE,MAAM,aAAa,GAAmB,EAAE,CAAA;IAExC,MAAM,OAAO,GAAG,GAAS,EAAE;QACzB,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,CAAC,CAAA;IACnC,CAAC,CAAA;IAED,KAAK,MAAM,KAAK,IAAI,cAAc,EAAE,CAAC;QACnC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAA;IACjD,CAAC;IAED,MAAM,MAAM,GAAG,OAAO,CAAC,YAAY,EAAE,CAAA;IAErC,OAAO;QACL,MAAM;QACN,kBAAkB,EAAE,MAAM,CAAC,IAAI,CAC7B,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,CAAC,EAC/B,oBAAoB,EAAE,CACvB;QACD,WAAW,EAAE,MAAM,CAAC,IAAI,CACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EACxB,oBAAoB,EAAE,CACvB;QACD,uBAAuB,EAAE,MAAM,CAAC,IAAI,CAClC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,sBAAsB,CAAC,EACpC,oBAAoB,EAAE,CACvB;QACD,WAAW,EAAE,MAAM,CAAC,IAAI,CACtB,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,EACxB,oBAAoB,EAAE,CACvB;QACD,QAAQ,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE;QACnC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,eAAe,EAAE;QACjD,WAAW,EAAE,CAAC,OAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,WAAW,CAAC,OAAO,CAAC;QACxD,aAAa,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,aAAa,EAAE;QAC7C,mBAAmB,EAAE,CAAC,OAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,mBAAmB,CAAC,OAAO,CAAC;QACxE,kBAAkB,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,kBAAkB,EAAE;QACvD,OAAO,EAAE,GAAG,EAAE;YACZ,KAAK,MAAM,KAAK,IAAI,aAAa,EAAE,CAAC;gBAClC,KAAK,EAAE,CAAA;YACT,CAAC;YACD,OAAO,CAAC,QAAQ,EAAE,CAAA;QACpB,CAAC;KACF,CAAA;AACH,CAAC,CAAA"}
|
package/dist/tokens.d.ts
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular injection tokens for molecule.dev providers.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { InjectionToken } from '@angular/core';
|
|
7
|
+
import type { AuthClient } from '@molecule/app-auth';
|
|
8
|
+
import type { HttpClient } from '@molecule/app-http';
|
|
9
|
+
import type { I18nProvider } from '@molecule/app-i18n';
|
|
10
|
+
import type { LoggerProvider } from '@molecule/app-logger';
|
|
11
|
+
import type { Router } from '@molecule/app-routing';
|
|
12
|
+
import type { StateProvider } from '@molecule/app-state';
|
|
13
|
+
import type { StorageProvider } from '@molecule/app-storage';
|
|
14
|
+
import type { ThemeProvider } from '@molecule/app-theme';
|
|
15
|
+
/**
|
|
16
|
+
* Injection token for state provider.
|
|
17
|
+
*/
|
|
18
|
+
export declare const STATE_PROVIDER: InjectionToken<StateProvider>;
|
|
19
|
+
/**
|
|
20
|
+
* Injection token for auth client.
|
|
21
|
+
*/
|
|
22
|
+
export declare const AUTH_CLIENT: InjectionToken<AuthClient<unknown>>;
|
|
23
|
+
/**
|
|
24
|
+
* Injection token for theme provider.
|
|
25
|
+
*/
|
|
26
|
+
export declare const THEME_PROVIDER: InjectionToken<ThemeProvider>;
|
|
27
|
+
/**
|
|
28
|
+
* Injection token for router.
|
|
29
|
+
*/
|
|
30
|
+
export declare const ROUTER: InjectionToken<Router>;
|
|
31
|
+
/**
|
|
32
|
+
* Injection token for i18n provider.
|
|
33
|
+
*/
|
|
34
|
+
export declare const I18N_PROVIDER: InjectionToken<I18nProvider>;
|
|
35
|
+
/**
|
|
36
|
+
* Injection token for HTTP client.
|
|
37
|
+
*/
|
|
38
|
+
export declare const HTTP_CLIENT: InjectionToken<HttpClient>;
|
|
39
|
+
/**
|
|
40
|
+
* Injection token for storage provider.
|
|
41
|
+
*/
|
|
42
|
+
export declare const STORAGE_PROVIDER: InjectionToken<StorageProvider>;
|
|
43
|
+
/**
|
|
44
|
+
* Injection token for logger provider.
|
|
45
|
+
*/
|
|
46
|
+
export declare const LOGGER_PROVIDER: InjectionToken<LoggerProvider>;
|
|
47
|
+
//# sourceMappingURL=tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAE9C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAExD;;GAEG;AACH,eAAO,MAAM,cAAc,+BAA+D,CAAA;AAE1F;;GAEG;AACH,eAAO,MAAM,WAAW,qCAAkE,CAAA;AAE1F;;GAEG;AACH,eAAO,MAAM,cAAc,+BAA+D,CAAA;AAE1F;;GAEG;AACH,eAAO,MAAM,MAAM,wBAAgD,CAAA;AAEnE;;GAEG;AACH,eAAO,MAAM,aAAa,8BAA6D,CAAA;AAEvF;;GAEG;AACH,eAAO,MAAM,WAAW,4BAAyD,CAAA;AAEjF;;GAEG;AACH,eAAO,MAAM,gBAAgB,iCAAmE,CAAA;AAEhG;;GAEG;AACH,eAAO,MAAM,eAAe,gCAAiE,CAAA"}
|
package/dist/tokens.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular injection tokens for molecule.dev providers.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import { InjectionToken } from '@angular/core';
|
|
7
|
+
/**
|
|
8
|
+
* Injection token for state provider.
|
|
9
|
+
*/
|
|
10
|
+
export const STATE_PROVIDER = new InjectionToken('molecule-state-provider');
|
|
11
|
+
/**
|
|
12
|
+
* Injection token for auth client.
|
|
13
|
+
*/
|
|
14
|
+
export const AUTH_CLIENT = new InjectionToken('molecule-auth-client');
|
|
15
|
+
/**
|
|
16
|
+
* Injection token for theme provider.
|
|
17
|
+
*/
|
|
18
|
+
export const THEME_PROVIDER = new InjectionToken('molecule-theme-provider');
|
|
19
|
+
/**
|
|
20
|
+
* Injection token for router.
|
|
21
|
+
*/
|
|
22
|
+
export const ROUTER = new InjectionToken('molecule-router');
|
|
23
|
+
/**
|
|
24
|
+
* Injection token for i18n provider.
|
|
25
|
+
*/
|
|
26
|
+
export const I18N_PROVIDER = new InjectionToken('molecule-i18n-provider');
|
|
27
|
+
/**
|
|
28
|
+
* Injection token for HTTP client.
|
|
29
|
+
*/
|
|
30
|
+
export const HTTP_CLIENT = new InjectionToken('molecule-http-client');
|
|
31
|
+
/**
|
|
32
|
+
* Injection token for storage provider.
|
|
33
|
+
*/
|
|
34
|
+
export const STORAGE_PROVIDER = new InjectionToken('molecule-storage-provider');
|
|
35
|
+
/**
|
|
36
|
+
* Injection token for logger provider.
|
|
37
|
+
*/
|
|
38
|
+
export const LOGGER_PROVIDER = new InjectionToken('molecule-logger-provider');
|
|
39
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../src/tokens.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAA;AAW9C;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAgB,yBAAyB,CAAC,CAAA;AAE1F;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,cAAc,CAAsB,sBAAsB,CAAC,CAAA;AAE1F;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,IAAI,cAAc,CAAgB,yBAAyB,CAAC,CAAA;AAE1F;;GAEG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,cAAc,CAAS,iBAAiB,CAAC,CAAA;AAEnE;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,IAAI,cAAc,CAAe,wBAAwB,CAAC,CAAA;AAEvF;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,cAAc,CAAa,sBAAsB,CAAC,CAAA;AAEjF;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,IAAI,cAAc,CAAkB,2BAA2B,CAAC,CAAA;AAEhG;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,cAAc,CAAiB,0BAA0B,CAAC,CAAA"}
|
package/dist/types.d.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Angular-specific types for molecule.dev framework bindings.
|
|
3
|
+
*
|
|
4
|
+
* @module
|
|
5
|
+
*/
|
|
6
|
+
import type { AuthClient, AuthState } from '@molecule/app-auth';
|
|
7
|
+
import type { FormController, FormOptions } from '@molecule/app-forms';
|
|
8
|
+
import type { HttpClient } from '@molecule/app-http';
|
|
9
|
+
import type { I18nProvider } from '@molecule/app-i18n';
|
|
10
|
+
import type { Logger, LoggerProvider } from '@molecule/app-logger';
|
|
11
|
+
import type { QueryParams, RouteLocation, RouteParams, Router } from '@molecule/app-routing';
|
|
12
|
+
import type { StateProvider, Store, StoreConfig } from '@molecule/app-state';
|
|
13
|
+
import type { StorageProvider } from '@molecule/app-storage';
|
|
14
|
+
import type { Theme, ThemeProvider } from '@molecule/app-theme';
|
|
15
|
+
/**
|
|
16
|
+
* Configuration for molecule Angular module.
|
|
17
|
+
*/
|
|
18
|
+
export interface MoleculeModuleConfig {
|
|
19
|
+
state?: StateProvider;
|
|
20
|
+
auth?: AuthClient<unknown>;
|
|
21
|
+
theme?: ThemeProvider;
|
|
22
|
+
router?: Router;
|
|
23
|
+
i18n?: I18nProvider;
|
|
24
|
+
http?: HttpClient;
|
|
25
|
+
storage?: StorageProvider;
|
|
26
|
+
logger?: LoggerProvider;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Injection tokens for molecule services.
|
|
30
|
+
*/
|
|
31
|
+
export interface MoleculeTokens {
|
|
32
|
+
STATE_PROVIDER: symbol;
|
|
33
|
+
AUTH_CLIENT: symbol;
|
|
34
|
+
THEME_PROVIDER: symbol;
|
|
35
|
+
ROUTER: symbol;
|
|
36
|
+
I18N_PROVIDER: symbol;
|
|
37
|
+
HTTP_CLIENT: symbol;
|
|
38
|
+
STORAGE_PROVIDER: symbol;
|
|
39
|
+
LOGGER_PROVIDER: symbol;
|
|
40
|
+
}
|
|
41
|
+
export type { AuthClient, AuthState, FormController, FormOptions, HttpClient, I18nProvider, Logger, LoggerProvider, QueryParams, RouteLocation, RouteParams, Router, StateProvider, StorageProvider, Store, StoreConfig, Theme, ThemeProvider, };
|
|
42
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAA;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AACtE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACtD,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAClE,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAC5F,OAAO,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAC5E,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAC5D,OAAO,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAE/D;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,IAAI,CAAC,EAAE,UAAU,CAAC,OAAO,CAAC,CAAA;IAC1B,KAAK,CAAC,EAAE,aAAa,CAAA;IACrB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,YAAY,CAAA;IACnB,IAAI,CAAC,EAAE,UAAU,CAAA;IACjB,OAAO,CAAC,EAAE,eAAe,CAAA;IACzB,MAAM,CAAC,EAAE,cAAc,CAAA;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,EAAE,MAAM,CAAA;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,aAAa,EAAE,MAAM,CAAA;IACrB,WAAW,EAAE,MAAM,CAAA;IACnB,gBAAgB,EAAE,MAAM,CAAA;IACxB,eAAe,EAAE,MAAM,CAAA;CACxB;AAGD,YAAY,EACV,UAAU,EACV,SAAS,EACT,cAAc,EACd,WAAW,EACX,UAAU,EACV,YAAY,EACZ,MAAM,EACN,cAAc,EACd,WAAW,EACX,aAAa,EACb,WAAW,EACX,MAAM,EACN,aAAa,EACb,eAAe,EACf,KAAK,EACL,WAAW,EACX,KAAK,EACL,aAAa,GACd,CAAA"}
|
package/dist/types.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
package/package.json
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@molecule/app-angular",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Angular framework bindings for molecule.dev",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "ngc",
|
|
13
|
+
"dev": "ngc --watch",
|
|
14
|
+
"test": "vitest run",
|
|
15
|
+
"test:watch": "vitest"
|
|
16
|
+
},
|
|
17
|
+
"author": "Molecule Dev, Inc. (https://molecule.dev)",
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">=20"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@angular/core": "22.0.0",
|
|
24
|
+
"@molecule/app-auth": "^1.0.0",
|
|
25
|
+
"@molecule/app-device": "^1.0.0",
|
|
26
|
+
"@molecule/app-forms": "^1.0.0",
|
|
27
|
+
"@molecule/app-http": "^1.0.0",
|
|
28
|
+
"@molecule/app-i18n": "^1.0.0",
|
|
29
|
+
"@molecule/app-logger": "^1.0.0",
|
|
30
|
+
"@molecule/app-platform": "^1.0.0",
|
|
31
|
+
"@molecule/app-push": "^1.0.0",
|
|
32
|
+
"@molecule/app-routing": "^1.0.0",
|
|
33
|
+
"@molecule/app-state": "^1.0.0",
|
|
34
|
+
"@molecule/app-storage": "^1.0.0",
|
|
35
|
+
"@molecule/app-theme": "^1.0.0",
|
|
36
|
+
"@molecule/app-ui": "^1.0.0",
|
|
37
|
+
"@molecule/app-utilities": "^1.0.0",
|
|
38
|
+
"@molecule/app-version": "^1.0.0",
|
|
39
|
+
"rxjs": "^7.8.0"
|
|
40
|
+
},
|
|
41
|
+
"devDependencies": {
|
|
42
|
+
"@angular/compiler": "22.1.0",
|
|
43
|
+
"@angular/compiler-cli": "22.1.0",
|
|
44
|
+
"@angular/core": "22.1.0",
|
|
45
|
+
"@molecule/app-utilities": "1.0.0",
|
|
46
|
+
"@types/node": "26.1.2",
|
|
47
|
+
"rxjs": "7.8.2",
|
|
48
|
+
"typescript": "6.0.3",
|
|
49
|
+
"vitest": "4.1.10"
|
|
50
|
+
},
|
|
51
|
+
"repository": {
|
|
52
|
+
"type": "git",
|
|
53
|
+
"url": "https://github.com/molecule-dev/molecule.git",
|
|
54
|
+
"directory": "packages/app/frameworks/angular"
|
|
55
|
+
},
|
|
56
|
+
"homepage": "https://github.com/molecule-dev/molecule/tree/main/packages/app/frameworks/angular",
|
|
57
|
+
"bugs": "https://github.com/molecule-dev/molecule/issues",
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"access": "public"
|
|
60
|
+
}
|
|
61
|
+
}
|