@rxap/services 21.0.1 → 22.0.0-dev.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/CHANGELOG.md +4 -0
- package/compodoc/changelog.html +2 -0
- package/compodoc/dependencies.html +3 -3
- package/compodoc/injectables/WindowContainerSidenavService.html +8 -10
- package/compodoc/interfaces/ContainerComponent.html +0 -47
- package/compodoc/js/search/search_index.js +2 -2
- package/compodoc/properties.html +1 -1
- package/docs/documentation.json +89 -129
- package/docs/html/assets/search.js +1 -1
- package/docs/html/classes/AvatarImageService.html +2 -2
- package/docs/html/classes/ImageLoaderService.html +2 -2
- package/docs/html/classes/LoadingIndicatorService.html +3 -3
- package/docs/html/classes/ResetService.html +2 -2
- package/docs/html/classes/WindowContainerSidenavService.html +2 -2
- package/docs/html/index.html +2 -2
- package/docs/html/interfaces/ContainerComponent.html +2 -3
- package/docs/html/modules.html +1 -1
- package/docs/markdown/README.md +1 -1
- package/docs/markdown/classes/AvatarImageService.md +3 -3
- package/docs/markdown/classes/ImageLoaderService.md +3 -3
- package/docs/markdown/classes/LoadingIndicatorService.md +8 -8
- package/docs/markdown/classes/ResetService.md +7 -7
- package/docs/markdown/classes/WindowContainerSidenavService.md +7 -7
- package/docs/markdown/globals.md +2 -2
- package/docs/markdown/interfaces/ContainerComponent.md +6 -14
- package/docs/wiki/Class.AvatarImageService.md +2 -2
- package/docs/wiki/Class.ImageLoaderService.md +2 -2
- package/docs/wiki/Class.LoadingIndicatorService.md +7 -7
- package/docs/wiki/Class.ResetService.md +6 -6
- package/docs/wiki/Class.WindowContainerSidenavService.md +6 -6
- package/docs/wiki/Interface.ContainerComponent.md +5 -13
- package/docs/wiki/globals.md +1 -1
- package/fesm2022/rxap-services.mjs +238 -146
- package/fesm2022/rxap-services.mjs.map +1 -1
- package/package.json +6 -6
- package/types/rxap-services.d.ts +53 -59
|
@@ -1,147 +1,239 @@
|
|
|
1
|
-
import * as i0 from
|
|
2
|
-
import { Injectable } from
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { ToggleSubject } from
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import { Injectable } from "@angular/core";
|
|
3
|
+
import { HttpParams, HttpRequest } from "@angular/common/http";
|
|
4
|
+
import { Subject, Subscription } from "rxjs";
|
|
5
|
+
import { delay, map } from "rxjs/operators";
|
|
6
|
+
import { ToggleSubject } from "@rxap/rxjs";
|
|
7
|
+
var AvatarImageService = class AvatarImageService {
|
|
8
|
+
get({ name }) {
|
|
9
|
+
return new HttpRequest("GET", "https://eu.ui-avatars.com/api", { params: new HttpParams({ fromObject: { name } }) }).urlWithParams;
|
|
10
|
+
}
|
|
11
|
+
static {
|
|
12
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
13
|
+
minVersion: "12.0.0",
|
|
14
|
+
version: "22.3.0",
|
|
15
|
+
ngImport: i0,
|
|
16
|
+
type: AvatarImageService,
|
|
17
|
+
deps: [],
|
|
18
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
static {
|
|
22
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
23
|
+
minVersion: "12.0.0",
|
|
24
|
+
version: "22.3.0",
|
|
25
|
+
ngImport: i0,
|
|
26
|
+
type: AvatarImageService,
|
|
27
|
+
providedIn: "root"
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
32
|
+
minVersion: "12.0.0",
|
|
33
|
+
version: "22.3.0",
|
|
34
|
+
ngImport: i0,
|
|
35
|
+
type: AvatarImageService,
|
|
36
|
+
decorators: [{
|
|
37
|
+
type: Injectable,
|
|
38
|
+
args: [{ providedIn: "root" }]
|
|
39
|
+
}]
|
|
40
|
+
});
|
|
41
|
+
var ImageLoaderService = class ImageLoaderService {
|
|
42
|
+
constructor() {
|
|
43
|
+
this.loading = /* @__PURE__ */ new Map();
|
|
44
|
+
this.loaded = /* @__PURE__ */ new Map();
|
|
45
|
+
}
|
|
46
|
+
load(imageSrc) {
|
|
47
|
+
if (this.loaded.has(imageSrc)) return Promise.resolve();
|
|
48
|
+
if (this.loading.has(imageSrc)) return this.loading.get(imageSrc);
|
|
49
|
+
const loading = new Promise((resolve, reject) => {
|
|
50
|
+
const image = new Image();
|
|
51
|
+
image.src = imageSrc;
|
|
52
|
+
image.onerror = reject;
|
|
53
|
+
image.onload = () => resolve();
|
|
54
|
+
}).then(() => {
|
|
55
|
+
this.loaded.set(imageSrc, true);
|
|
56
|
+
}).finally(() => {
|
|
57
|
+
this.loading.delete(imageSrc);
|
|
58
|
+
});
|
|
59
|
+
this.loading.set(imageSrc, loading);
|
|
60
|
+
return loading;
|
|
61
|
+
}
|
|
62
|
+
static {
|
|
63
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
64
|
+
minVersion: "12.0.0",
|
|
65
|
+
version: "22.3.0",
|
|
66
|
+
ngImport: i0,
|
|
67
|
+
type: ImageLoaderService,
|
|
68
|
+
deps: [],
|
|
69
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
static {
|
|
73
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
74
|
+
minVersion: "12.0.0",
|
|
75
|
+
version: "22.3.0",
|
|
76
|
+
ngImport: i0,
|
|
77
|
+
type: ImageLoaderService,
|
|
78
|
+
providedIn: "root"
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
83
|
+
minVersion: "12.0.0",
|
|
84
|
+
version: "22.3.0",
|
|
85
|
+
ngImport: i0,
|
|
86
|
+
type: ImageLoaderService,
|
|
87
|
+
decorators: [{
|
|
88
|
+
type: Injectable,
|
|
89
|
+
args: [{ providedIn: "root" }]
|
|
90
|
+
}]
|
|
91
|
+
});
|
|
92
|
+
var LoadingIndicatorService = class LoadingIndicatorService {
|
|
93
|
+
constructor() {
|
|
94
|
+
this.loading$ = new ToggleSubject(true);
|
|
95
|
+
this._attachedLoadingSubscription = new Subscription();
|
|
96
|
+
this.isLoading$ = this.loading$.asObservable();
|
|
97
|
+
}
|
|
98
|
+
attachLoading(loading$) {
|
|
99
|
+
this._attachedLoadingSubscription.add(loading$.pipe(map(Boolean), delay(0)).subscribe(this.loading$.next));
|
|
100
|
+
}
|
|
101
|
+
ngOnDestroy() {
|
|
102
|
+
this._attachedLoadingSubscription.unsubscribe();
|
|
103
|
+
}
|
|
104
|
+
disable() {
|
|
105
|
+
setTimeout(() => {
|
|
106
|
+
this.loading$.disable();
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
enable() {
|
|
110
|
+
setTimeout(() => {
|
|
111
|
+
this.loading$.enable();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
static {
|
|
115
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
116
|
+
minVersion: "12.0.0",
|
|
117
|
+
version: "22.3.0",
|
|
118
|
+
ngImport: i0,
|
|
119
|
+
type: LoadingIndicatorService,
|
|
120
|
+
deps: [],
|
|
121
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
static {
|
|
125
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
126
|
+
minVersion: "12.0.0",
|
|
127
|
+
version: "22.3.0",
|
|
128
|
+
ngImport: i0,
|
|
129
|
+
type: LoadingIndicatorService
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
};
|
|
133
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
134
|
+
minVersion: "12.0.0",
|
|
135
|
+
version: "22.3.0",
|
|
136
|
+
ngImport: i0,
|
|
137
|
+
type: LoadingIndicatorService,
|
|
138
|
+
decorators: [{ type: Injectable }],
|
|
139
|
+
ctorParameters: () => []
|
|
140
|
+
});
|
|
141
|
+
var ResetService = class ResetService {
|
|
142
|
+
constructor() {
|
|
143
|
+
this.view$ = new Subject();
|
|
144
|
+
this.dataSource$ = new Subject();
|
|
145
|
+
}
|
|
146
|
+
resetView() {
|
|
147
|
+
this.view$.next();
|
|
148
|
+
}
|
|
149
|
+
resetDataSource() {
|
|
150
|
+
this.dataSource$.next();
|
|
151
|
+
}
|
|
152
|
+
resetAll() {
|
|
153
|
+
this.resetDataSource();
|
|
154
|
+
this.resetView();
|
|
155
|
+
}
|
|
156
|
+
static {
|
|
157
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
158
|
+
minVersion: "12.0.0",
|
|
159
|
+
version: "22.3.0",
|
|
160
|
+
ngImport: i0,
|
|
161
|
+
type: ResetService,
|
|
162
|
+
deps: [],
|
|
163
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
static {
|
|
167
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
168
|
+
minVersion: "12.0.0",
|
|
169
|
+
version: "22.3.0",
|
|
170
|
+
ngImport: i0,
|
|
171
|
+
type: ResetService,
|
|
172
|
+
providedIn: "root"
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
177
|
+
minVersion: "12.0.0",
|
|
178
|
+
version: "22.3.0",
|
|
179
|
+
ngImport: i0,
|
|
180
|
+
type: ResetService,
|
|
181
|
+
decorators: [{
|
|
182
|
+
type: Injectable,
|
|
183
|
+
args: [{ providedIn: "root" }]
|
|
184
|
+
}]
|
|
185
|
+
});
|
|
186
|
+
var WindowContainerSidenavService = class WindowContainerSidenavService {
|
|
187
|
+
constructor() {
|
|
188
|
+
this.add$ = new Subject();
|
|
189
|
+
this.remove$ = new Subject();
|
|
190
|
+
this.components = /* @__PURE__ */ new Map();
|
|
191
|
+
}
|
|
192
|
+
add(component) {
|
|
193
|
+
if (this.components.has(component.id)) this.remove$.next(this.components.get(component.id));
|
|
194
|
+
this.components.set(component.id, component);
|
|
195
|
+
this.add$.next(component);
|
|
196
|
+
}
|
|
197
|
+
remove(componentOrId) {
|
|
198
|
+
const id = typeof componentOrId === "string" ? componentOrId : componentOrId.id;
|
|
199
|
+
if (this.components.has(id)) {
|
|
200
|
+
this.remove$.next(this.components.get(id));
|
|
201
|
+
this.components.delete(id);
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
getAll() {
|
|
205
|
+
return Array.from(this.components.values());
|
|
206
|
+
}
|
|
207
|
+
static {
|
|
208
|
+
this.ɵfac = i0.ɵɵngDeclareFactory({
|
|
209
|
+
minVersion: "12.0.0",
|
|
210
|
+
version: "22.3.0",
|
|
211
|
+
ngImport: i0,
|
|
212
|
+
type: WindowContainerSidenavService,
|
|
213
|
+
deps: [],
|
|
214
|
+
target: i0.ɵɵFactoryTarget.Injectable
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
static {
|
|
218
|
+
this.ɵprov = i0.ɵɵngDeclareInjectable({
|
|
219
|
+
minVersion: "12.0.0",
|
|
220
|
+
version: "22.3.0",
|
|
221
|
+
ngImport: i0,
|
|
222
|
+
type: WindowContainerSidenavService,
|
|
223
|
+
providedIn: "root"
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
};
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({
|
|
228
|
+
minVersion: "12.0.0",
|
|
229
|
+
version: "22.3.0",
|
|
230
|
+
ngImport: i0,
|
|
231
|
+
type: WindowContainerSidenavService,
|
|
232
|
+
decorators: [{
|
|
233
|
+
type: Injectable,
|
|
234
|
+
args: [{ providedIn: "root" }]
|
|
235
|
+
}]
|
|
236
|
+
});
|
|
146
237
|
export { AvatarImageService, ImageLoaderService, LoadingIndicatorService, ResetService, WindowContainerSidenavService };
|
|
147
|
-
|
|
238
|
+
|
|
239
|
+
//# sourceMappingURL=rxap-services.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rxap-services.mjs","sources":["../../../../../packages/angular/services/src/lib/avatar-image.service.ts","../../../../../packages/angular/services/src/lib/image-loader.service.ts","../../../../../packages/angular/services/src/lib/loading-indicator.service.ts","../../../../../packages/angular/services/src/lib/reset.service.ts","../../../../../packages/angular/services/src/lib/window-container-sidenav.service.ts"
|
|
1
|
+
{"version":3,"file":"rxap-services.mjs","names":[],"sources":["../../../../../packages/angular/services/src/lib/avatar-image.service.ts","../../../../../packages/angular/services/src/lib/image-loader.service.ts","../../../../../packages/angular/services/src/lib/loading-indicator.service.ts","../../../../../packages/angular/services/src/lib/reset.service.ts","../../../../../packages/angular/services/src/lib/window-container-sidenav.service.ts"],"sourcesContent":["import { Injectable } from '@angular/core';\nimport { HttpParams, HttpRequest } from '@angular/common/http';\n\n@Injectable({ providedIn: 'root' })\nexport class AvatarImageService {\n\n public get({ name }: { name: string }): string {\n return new HttpRequest(\n 'GET',\n 'https://eu.ui-avatars.com/api',\n {\n params: new HttpParams({ fromObject: { name } }),\n },\n ).urlWithParams;\n }\n\n}\n","import { Injectable } from '@angular/core';\n\n@Injectable({ providedIn: 'root' })\nexport class ImageLoaderService {\n\n private readonly loading = new Map<string, Promise<void>>();\n private readonly loaded = new Map<string, true>();\n\n public load(imageSrc: string): Promise<void> {\n\n if (this.loaded.has(imageSrc)) {\n return Promise.resolve();\n }\n\n if (this.loading.has(imageSrc)) {\n return this.loading.get(imageSrc)!;\n }\n\n const loading = new Promise<void>((resolve, reject) => {\n const image = new Image();\n image.src = imageSrc;\n\n image.onerror = reject;\n image.onload = () => resolve();\n }).then(() => {\n this.loaded.set(imageSrc, true);\n }).finally(() => {\n this.loading.delete(imageSrc);\n });\n\n this.loading.set(imageSrc, loading);\n\n return loading;\n }\n\n}\n","import {\n Injectable,\n OnDestroy,\n} from '@angular/core';\nimport {\n Observable,\n Subscription,\n} from 'rxjs';\nimport {\n delay,\n map,\n} from 'rxjs/operators';\nimport { ToggleSubject } from '@rxap/rxjs';\n\n@Injectable()\nexport class LoadingIndicatorService implements OnDestroy {\n\n public isLoading$: Observable<boolean>;\n private readonly loading$ = new ToggleSubject(true);\n private readonly _attachedLoadingSubscription = new Subscription();\n\n constructor() {\n this.isLoading$ = this.loading$.asObservable();\n }\n\n public attachLoading(loading$: Observable<any>) {\n this._attachedLoadingSubscription.add(\n loading$.pipe(map(Boolean), delay(0)).subscribe(this.loading$.next),\n );\n }\n\n public ngOnDestroy() {\n this._attachedLoadingSubscription.unsubscribe();\n }\n\n public disable() {\n setTimeout(() => {\n this.loading$.disable();\n });\n }\n\n public enable() {\n setTimeout(() => {\n this.loading$.enable();\n });\n }\n\n}\n","import { Injectable } from '@angular/core';\nimport { Subject } from 'rxjs';\n\n@Injectable({ providedIn: 'root' })\nexport class ResetService {\n\n public view$ = new Subject<void>();\n public dataSource$ = new Subject<void>();\n\n public resetView() {\n this.view$.next();\n }\n\n public resetDataSource() {\n // TODO : iterate over the list of active DataSources\n this.dataSource$.next();\n }\n\n public resetAll() {\n this.resetDataSource();\n this.resetView();\n }\n\n}\n","import {\n Injectable,\n Injector,\n ViewContainerRef,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\nimport { Constructor } from '@rxap/utilities';\n\nexport interface ContainerComponent {\n id: string;\n component: Constructor;\n viewContainerRef?: ViewContainerRef | null;\n injector?: Injector | null;\n}\n\n@Injectable({ providedIn: 'root' })\nexport class WindowContainerSidenavService {\n\n public add$ = new Subject<ContainerComponent>();\n public remove$ = new Subject<ContainerComponent>();\n private components = new Map<string, ContainerComponent>();\n\n public add(component: ContainerComponent): void {\n if (this.components.has(component.id)) {\n this.remove$.next(this.components.get(component.id)!);\n }\n this.components.set(component.id, component);\n this.add$.next(component);\n }\n\n public remove(componentOrId: ContainerComponent | string): void {\n const id = typeof componentOrId === 'string' ? componentOrId : componentOrId.id;\n if (this.components.has(id)) {\n this.remove$.next(this.components.get(id)!);\n this.components.delete(id);\n }\n }\n\n public getAll(): ContainerComponent[] {\n return Array.from(this.components.values());\n }\n\n\n}\n"],"mappings":";;;;;;AAIA,IAAa,qBAAb,MAAa,mBAAkB;CAEtB,IAAI,EAAE,QAAwB;EACnC,OAAO,IAAI,YACT,OACA,iCACA,EACE,QAAQ,IAAI,WAAW,EAAE,YAAY,EAAE,KAAI,EAAE,CAAE,EAChD,CAAA,CACF,CAAC;CACJ;CAVW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAAlB;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAAkB,YADL;EAAM,CAAA;CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAkB,YAAA,CAAA;EAD9B,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE;;;ACAlC,IAAa,qBAAb,MAAa,mBAAkB;CAD/B,cAAA;EAGmB,KAAA,0BAAU,IAAI,IAAG;EACjB,KAAA,yBAAS,IAAI,IAAG;CA6BlC;CA3BQ,KAAK,UAAgB;EAE1B,IAAI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A,UAAU,IAAI,QAAO;EACpB,KAAA,6BAAa,IAAI,IAAG;CAuB7B;CArBQ,IAAI,WAA6B;EACtC,IAAI,KAAK,WAAW,IAAI,UAAU,EAAE,GAClC,KAAK,QAAQ,KAAK,KAAK,WAAW,IAAI,UAAU,EAAE,CAAE;EAEtD,KAAK,WAAW,IAAI,UAAU,IAAI,SAAS;EAC3C,KAAK,KAAK,KAAK,SAAS;CAC1B;CAEO,OAAO,eAA0C;EACtD,MAAM,KAAK,OAAO,kBAAkB,WAAW,gBAAgB,cAAc;EAC7E,IAAI,KAAK,WAAW,IAAI,EAAE,GAAG;GAC3B,KAAK,QAAQ,KAAK,KAAK,WAAW,IAAI,EAAE,CAAE;GAC1C,KAAK,WAAW,OAAO,EAAE;EAC3B;CACF;CAEO,SAAM;EACX,OAAO,MAAM,KAAK,KAAK,WAAW,OAAM,CAAE;CAC5C;CAxBW;EAAA,KAAA,OAAA,GAAA,mBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,MAAA,CAAA;GAAA,QAAA,GAAA,gBAAA;EAAA,CAAA;CAAA;CAA7B;EAAA,KAAA,QAAA,GAAA,sBAAA;GAAA,YAAA;GAAA,SAAA;GAAA,UAAA;GAAA,MAAA;GAA6B,YADhB;EAAM,CAAA;CAAA;;AACnB,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAA6B,YAAA,CAAA;EADzC,MAAA;EAAW,MAAA,CAAA,EAAE,YAAY,OAAM,CAAE"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "
|
|
2
|
+
"version": "22.0.0-dev.0",
|
|
3
3
|
"name": "@rxap/services",
|
|
4
4
|
"description": "Provides Angular services for common tasks such as loading images, managing loading indicators, resetting data, and managing components in a window container sidenav. It also includes a service to generate avatar images. This package offers reusable services to simplify development in Angular applications.\n",
|
|
5
5
|
"license": "GPL-3.0-or-later",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"@nx/devkit": "
|
|
7
|
+
"@nx/devkit": "24.0.6",
|
|
8
8
|
"tslib": "2.6.2"
|
|
9
9
|
},
|
|
10
10
|
"peerDependencies": {
|
|
11
|
-
"@angular/common": "^
|
|
12
|
-
"@angular/core": "^
|
|
11
|
+
"@angular/common": "^22.3.0",
|
|
12
|
+
"@angular/core": "^22.3.0",
|
|
13
13
|
"@rxap/rxjs": "^1.1.18",
|
|
14
14
|
"@rxap/utilities": "^16.5.2",
|
|
15
15
|
"rxjs": "^7.8.2"
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
"packageGroup": [
|
|
38
38
|
{
|
|
39
39
|
"package": "@angular/common",
|
|
40
|
-
"version": "
|
|
40
|
+
"version": "22.3.0"
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
"package": "@angular/core",
|
|
44
|
-
"version": "
|
|
44
|
+
"version": "22.3.0"
|
|
45
45
|
},
|
|
46
46
|
{
|
|
47
47
|
"package": "@rxap/rxjs",
|
package/types/rxap-services.d.ts
CHANGED
|
@@ -1,64 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generated bundle index. Do not edit.
|
|
3
|
+
*/
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
import { Injector, OnDestroy, ViewContainerRef } from "@angular/core";
|
|
6
|
+
import { Observable, Subject } from "rxjs";
|
|
7
|
+
import { Constructor } from "@rxap/utilities";
|
|
8
|
+
export declare class AvatarImageService {
|
|
9
|
+
get({ name }: {
|
|
10
|
+
name: string;
|
|
11
|
+
}): string;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AvatarImageService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
12
14
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ImageLoaderService>;
|
|
15
|
+
export declare class ImageLoaderService {
|
|
16
|
+
private readonly loading;
|
|
17
|
+
private readonly loaded;
|
|
18
|
+
load(imageSrc: string): Promise<void>;
|
|
19
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ImageLoaderService, never>;
|
|
20
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
20
21
|
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<LoadingIndicatorService>;
|
|
22
|
+
export declare class LoadingIndicatorService implements OnDestroy {
|
|
23
|
+
isLoading$: Observable<boolean>;
|
|
24
|
+
private readonly loading$;
|
|
25
|
+
private readonly _attachedLoadingSubscription;
|
|
26
|
+
constructor();
|
|
27
|
+
attachLoading(loading$: Observable<any>): void;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
disable(): void;
|
|
30
|
+
enable(): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingIndicatorService, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
33
33
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<ResetService>;
|
|
34
|
+
export declare class ResetService {
|
|
35
|
+
view$: Subject<void>;
|
|
36
|
+
dataSource$: Subject<void>;
|
|
37
|
+
resetView(): void;
|
|
38
|
+
resetDataSource(): void;
|
|
39
|
+
resetAll(): void;
|
|
40
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResetService, never>;
|
|
41
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
43
42
|
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
injector?: Injector | null;
|
|
50
|
-
componentFactoryResolver?: ComponentFactoryResolver | null;
|
|
43
|
+
export interface ContainerComponent {
|
|
44
|
+
id: string;
|
|
45
|
+
component: Constructor;
|
|
46
|
+
viewContainerRef?: ViewContainerRef | null;
|
|
47
|
+
injector?: Injector | null;
|
|
51
48
|
}
|
|
52
|
-
declare class WindowContainerSidenavService {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export { AvatarImageService, ImageLoaderService, LoadingIndicatorService, ResetService, WindowContainerSidenavService };
|
|
64
|
-
export type { ContainerComponent };
|
|
49
|
+
export declare class WindowContainerSidenavService {
|
|
50
|
+
add$: Subject<ContainerComponent>;
|
|
51
|
+
remove$: Subject<ContainerComponent>;
|
|
52
|
+
private components;
|
|
53
|
+
add(component: ContainerComponent): void;
|
|
54
|
+
remove(componentOrId: ContainerComponent | string): void;
|
|
55
|
+
getAll(): ContainerComponent[];
|
|
56
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<WindowContainerSidenavService, never>;
|
|
57
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<any>;
|
|
58
|
+
}
|