@rolatech/angular-services 0.0.25 → 16.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/esm2022/index.mjs +5 -0
- package/esm2022/lib/angular-services.module.mjs +23 -0
- package/esm2022/lib/components/dialog/dialog.component.mjs +75 -0
- package/esm2022/lib/directive/back-button.directive.mjs +24 -0
- package/esm2022/lib/directive/index.mjs +4 -0
- package/esm2022/lib/interceptor/index.mjs +2 -0
- package/esm2022/lib/interceptor/loading.interceptor.mjs +34 -0
- package/esm2022/lib/services/base.service.mjs +68 -0
- package/esm2022/lib/services/dialog.service.mjs +29 -0
- package/esm2022/lib/services/index.mjs +18 -0
- package/esm2022/lib/services/layout.service.mjs +22 -0
- package/esm2022/lib/services/loading.service.mjs +31 -0
- package/esm2022/lib/services/media.service.mjs +69 -0
- package/esm2022/lib/services/navigation.service.mjs +53 -0
- package/esm2022/lib/services/snack-bar.service.mjs +19 -0
- package/fesm2022/rolatech-angular-services.mjs +419 -0
- package/fesm2022/rolatech-angular-services.mjs.map +1 -0
- package/index.d.ts +2 -0
- package/lib/angular-services.module.d.ts +4 -2
- package/lib/components/dialog/dialog.component.d.ts +35 -0
- package/lib/directive/back-button.directive.d.ts +9 -0
- package/lib/directive/index.d.ts +3 -0
- package/lib/interceptor/index.d.ts +1 -0
- package/lib/interceptor/loading.interceptor.d.ts +12 -0
- package/lib/services/base.service.d.ts +2 -2
- package/lib/services/dialog.service.d.ts +13 -0
- package/lib/services/index.d.ts +4 -1
- package/lib/services/navigation.service.d.ts +15 -0
- package/lib/services/snack-bar.service.d.ts +9 -0
- package/package.json +11 -16
- package/esm2020/index.mjs +0 -3
- package/esm2020/lib/angular-services.module.mjs +0 -17
- package/esm2020/lib/services/base.service.mjs +0 -68
- package/esm2020/lib/services/index.mjs +0 -12
- package/esm2020/lib/services/layout.service.mjs +0 -19
- package/esm2020/lib/services/loading.service.mjs +0 -31
- package/esm2020/lib/services/media.service.mjs +0 -68
- package/fesm2015/rolatech-angular-services.mjs +0 -211
- package/fesm2015/rolatech-angular-services.mjs.map +0 -1
- package/fesm2020/rolatech-angular-services.mjs +0 -204
- package/fesm2020/rolatech-angular-services.mjs.map +0 -1
- /package/{esm2020 → esm2022}/rolatech-angular-services.mjs +0 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Injectable, EventEmitter, ViewContainerRef, Component, ViewChild, HostListener, Directive, NgModule } from '@angular/core';
|
|
3
|
+
import { Location } from '@angular/common';
|
|
4
|
+
import { Router, NavigationEnd } from '@angular/router';
|
|
5
|
+
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
6
|
+
import { take, map, BehaviorSubject } from 'rxjs';
|
|
7
|
+
import * as i1 from '@angular/common/http';
|
|
8
|
+
import { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';
|
|
9
|
+
import * as i1$1 from '@angular/cdk/layout';
|
|
10
|
+
import { Breakpoints } from '@angular/cdk/layout';
|
|
11
|
+
import { map as map$1, shareReplay, finalize } from 'rxjs/operators';
|
|
12
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
13
|
+
|
|
14
|
+
class NavigationService {
|
|
15
|
+
history = [];
|
|
16
|
+
router = inject(Router);
|
|
17
|
+
location = inject(Location);
|
|
18
|
+
constructor() {
|
|
19
|
+
this.router.events.subscribe((event) => {
|
|
20
|
+
if (event instanceof NavigationEnd) {
|
|
21
|
+
this.history.push(event.urlAfterRedirects);
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
start() {
|
|
26
|
+
// this.router.events.subscribe((event) => {
|
|
27
|
+
// if (event instanceof NavigationEnd) {
|
|
28
|
+
// this.history.push(event.urlAfterRedirects);
|
|
29
|
+
// console.log(this.history);
|
|
30
|
+
// }
|
|
31
|
+
// });
|
|
32
|
+
}
|
|
33
|
+
getHistory() {
|
|
34
|
+
return this.history;
|
|
35
|
+
}
|
|
36
|
+
back() {
|
|
37
|
+
console.log(this.history);
|
|
38
|
+
this.history.pop();
|
|
39
|
+
if (this.history.length > 0) {
|
|
40
|
+
this.location.back();
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.router.navigateByUrl('/');
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
next() {
|
|
47
|
+
if (this.history.length > 0) {
|
|
48
|
+
return this.history[this.history.length - 2];
|
|
49
|
+
}
|
|
50
|
+
return '';
|
|
51
|
+
}
|
|
52
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
53
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NavigationService, providedIn: 'root' });
|
|
54
|
+
}
|
|
55
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: NavigationService, decorators: [{
|
|
56
|
+
type: Injectable,
|
|
57
|
+
args: [{
|
|
58
|
+
providedIn: 'root',
|
|
59
|
+
}]
|
|
60
|
+
}], ctorParameters: function () { return []; } });
|
|
61
|
+
|
|
62
|
+
class DialogComponent {
|
|
63
|
+
data = inject(MAT_DIALOG_DATA);
|
|
64
|
+
result;
|
|
65
|
+
dialogRef = inject((MatDialogRef));
|
|
66
|
+
componentRef;
|
|
67
|
+
ngOnInit() {
|
|
68
|
+
this.createComponent();
|
|
69
|
+
// this.dialogRef.afterOpened().subscribe((res) => {
|
|
70
|
+
// console.log(res);
|
|
71
|
+
// this.result = res;
|
|
72
|
+
// this.dialogRef.componentInstance['someOutput'].subscribe((res) => {
|
|
73
|
+
// console.log(res);
|
|
74
|
+
// });
|
|
75
|
+
// });
|
|
76
|
+
}
|
|
77
|
+
createComponent() {
|
|
78
|
+
this.componentRef.clear();
|
|
79
|
+
const componentRef = this.componentRef.createComponent(this.data.component);
|
|
80
|
+
const hostedComponent = componentRef.instance;
|
|
81
|
+
// hostedComponent.data = this.data.data;
|
|
82
|
+
// componentRef.instance['someOutput'].subsribe();
|
|
83
|
+
if (this.data.data) {
|
|
84
|
+
Object.keys(this.data.data).forEach((inputName) => {
|
|
85
|
+
hostedComponent[inputName] = this.data.data[inputName];
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
Object.keys(hostedComponent)
|
|
89
|
+
.filter((prop) => hostedComponent[prop] instanceof EventEmitter)
|
|
90
|
+
.forEach((output) => {
|
|
91
|
+
this[output] = new EventEmitter();
|
|
92
|
+
hostedComponent[output].subscribe((data) => {
|
|
93
|
+
console.log(data);
|
|
94
|
+
this[output].emit(data);
|
|
95
|
+
});
|
|
96
|
+
});
|
|
97
|
+
this.dialogRef.afterOpened().subscribe(() => {
|
|
98
|
+
this.dialogRef.componentInstance['someOutput'].subscribe((res) => {
|
|
99
|
+
console.log(res);
|
|
100
|
+
this.result = res;
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
ngOnDestroy() {
|
|
105
|
+
this.componentRef.clear();
|
|
106
|
+
}
|
|
107
|
+
cancel() {
|
|
108
|
+
this.close(false);
|
|
109
|
+
}
|
|
110
|
+
close(value) {
|
|
111
|
+
this.dialogRef.close(value);
|
|
112
|
+
}
|
|
113
|
+
confirm() {
|
|
114
|
+
this.close(this.result);
|
|
115
|
+
}
|
|
116
|
+
onEsc() {
|
|
117
|
+
this.close(false);
|
|
118
|
+
}
|
|
119
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
120
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "16.0.0", type: DialogComponent, selector: "rolatech-dialog", host: { listeners: { "keydown.esc": "onEsc()" } }, viewQueries: [{ propertyName: "componentRef", first: true, predicate: ["container"], descendants: true, read: ViewContainerRef, static: true }], ngImport: i0, template: "<div class=\"p-3 flex flex-col min-w-[320px]\" style=\"width: {{ data.width }};height: {{ data.height }}\">\n <div class=\"p-2\">\n <h1 class=\"text-xl\">{{ data.title }}</h1>\n </div>\n <div class=\"p-2\">\n <p class=\"\">{{ data.message }}</p>\n <ng-template #container></ng-template>\n <!-- <ng-container #container></ng-container> -->\n </div>\n <div class=\"flex-1\"></div>\n <div class=\"flex justify-end items-center p-2 mt-3\">\n <a class=\"mr-3 cursor-pointer\" (click)=\"cancel()\">{{ data.cancelText ? data.cancelText : 'Cancel' }}</a>\n <a class=\"w-20 text-center hover:bg-black bg-black cursor-pointer p-2 text-white rounded\" (click)=\"confirm()\">{{\n data.confirmText ? data.confirmText : 'Ok'\n }}</a>\n </div>\n</div>\n", styles: [""] });
|
|
121
|
+
}
|
|
122
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DialogComponent, decorators: [{
|
|
123
|
+
type: Component,
|
|
124
|
+
args: [{ selector: 'rolatech-dialog', template: "<div class=\"p-3 flex flex-col min-w-[320px]\" style=\"width: {{ data.width }};height: {{ data.height }}\">\n <div class=\"p-2\">\n <h1 class=\"text-xl\">{{ data.title }}</h1>\n </div>\n <div class=\"p-2\">\n <p class=\"\">{{ data.message }}</p>\n <ng-template #container></ng-template>\n <!-- <ng-container #container></ng-container> -->\n </div>\n <div class=\"flex-1\"></div>\n <div class=\"flex justify-end items-center p-2 mt-3\">\n <a class=\"mr-3 cursor-pointer\" (click)=\"cancel()\">{{ data.cancelText ? data.cancelText : 'Cancel' }}</a>\n <a class=\"w-20 text-center hover:bg-black bg-black cursor-pointer p-2 text-white rounded\" (click)=\"confirm()\">{{\n data.confirmText ? data.confirmText : 'Ok'\n }}</a>\n </div>\n</div>\n" }]
|
|
125
|
+
}], propDecorators: { componentRef: [{
|
|
126
|
+
type: ViewChild,
|
|
127
|
+
args: ['container', { read: ViewContainerRef, static: true }]
|
|
128
|
+
}], onEsc: [{
|
|
129
|
+
type: HostListener,
|
|
130
|
+
args: ['keydown.esc']
|
|
131
|
+
}] } });
|
|
132
|
+
|
|
133
|
+
class DialogService {
|
|
134
|
+
dialog = inject(MatDialog);
|
|
135
|
+
dialogRef;
|
|
136
|
+
open(options) {
|
|
137
|
+
this.dialogRef = this.dialog.open(DialogComponent, {
|
|
138
|
+
data: {
|
|
139
|
+
...options,
|
|
140
|
+
},
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
cancelled() {
|
|
144
|
+
return this.dialogRef.beforeClosed().pipe(take(1), map((res) => res));
|
|
145
|
+
}
|
|
146
|
+
confirmed() {
|
|
147
|
+
return this.dialogRef.afterClosed().pipe(take(1), map((res) => res));
|
|
148
|
+
}
|
|
149
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
150
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DialogService });
|
|
151
|
+
}
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: DialogService, decorators: [{
|
|
153
|
+
type: Injectable
|
|
154
|
+
}] });
|
|
155
|
+
|
|
156
|
+
class BaseService {
|
|
157
|
+
http;
|
|
158
|
+
actionUrl;
|
|
159
|
+
endpoint;
|
|
160
|
+
environment = inject(APP_CONFIG);
|
|
161
|
+
constructor(http) {
|
|
162
|
+
this.http = http;
|
|
163
|
+
this.init();
|
|
164
|
+
}
|
|
165
|
+
init() {
|
|
166
|
+
this.actionUrl = `${this.environment.baseUrl}/${this.endpoint}`;
|
|
167
|
+
}
|
|
168
|
+
find(options) {
|
|
169
|
+
return this.http.get(this.actionUrl, {
|
|
170
|
+
params: options,
|
|
171
|
+
withCredentials: true,
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
get(id, options) {
|
|
175
|
+
return this.http.get(`${this.actionUrl}/${id}`, {
|
|
176
|
+
params: options,
|
|
177
|
+
withCredentials: true,
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
create(item) {
|
|
181
|
+
return this.http.post(`${this.actionUrl}`, item, {
|
|
182
|
+
withCredentials: true,
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
update(id, data) {
|
|
186
|
+
return this.http.put(`${this.actionUrl}/${id}`, data, {
|
|
187
|
+
withCredentials: true,
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
delete(id) {
|
|
191
|
+
return this.http.delete(`${this.actionUrl}/${id}`, {
|
|
192
|
+
withCredentials: true,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
updateStatus(id, data) {
|
|
196
|
+
return this.http.put(`${this.actionUrl}/${id}/status`, data, {
|
|
197
|
+
withCredentials: true,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
search(word) {
|
|
201
|
+
return this.http
|
|
202
|
+
.get(`${this.actionUrl}?search=${word}`, {
|
|
203
|
+
withCredentials: true,
|
|
204
|
+
})
|
|
205
|
+
.pipe(map((result) => result));
|
|
206
|
+
}
|
|
207
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
208
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
209
|
+
}
|
|
210
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: BaseService, decorators: [{
|
|
211
|
+
type: Injectable,
|
|
212
|
+
args: [{
|
|
213
|
+
providedIn: 'root',
|
|
214
|
+
}]
|
|
215
|
+
}], ctorParameters: function () { return [{ type: i1.HttpClient }]; } });
|
|
216
|
+
|
|
217
|
+
class LoadingService {
|
|
218
|
+
loading$ = new BehaviorSubject(false);
|
|
219
|
+
ratio$ = new BehaviorSubject(0);
|
|
220
|
+
isLoading = false;
|
|
221
|
+
constructor() { }
|
|
222
|
+
start() {
|
|
223
|
+
this.loading$.next(true);
|
|
224
|
+
}
|
|
225
|
+
stop() {
|
|
226
|
+
this.loading$.next(false);
|
|
227
|
+
}
|
|
228
|
+
async present(text) {
|
|
229
|
+
this.isLoading = true;
|
|
230
|
+
}
|
|
231
|
+
async dismiss() {
|
|
232
|
+
this.isLoading = false;
|
|
233
|
+
}
|
|
234
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
235
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LoadingService, providedIn: 'root' });
|
|
236
|
+
}
|
|
237
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LoadingService, decorators: [{
|
|
238
|
+
type: Injectable,
|
|
239
|
+
args: [{
|
|
240
|
+
providedIn: 'root',
|
|
241
|
+
}]
|
|
242
|
+
}], ctorParameters: function () { return []; } });
|
|
243
|
+
|
|
244
|
+
class MediaService extends BaseService {
|
|
245
|
+
init() {
|
|
246
|
+
this.endpoint = 'media';
|
|
247
|
+
super.init();
|
|
248
|
+
}
|
|
249
|
+
upload(data) {
|
|
250
|
+
return this.http
|
|
251
|
+
.post(`${this.actionUrl}/upload`, data, {
|
|
252
|
+
reportProgress: false,
|
|
253
|
+
withCredentials: true,
|
|
254
|
+
// headers: new HttpHeaders({
|
|
255
|
+
// 'Content-Type': 'multipart/form-data',
|
|
256
|
+
// }),
|
|
257
|
+
})
|
|
258
|
+
.pipe(map((result) => result));
|
|
259
|
+
}
|
|
260
|
+
uploadAndSave(data) {
|
|
261
|
+
return this.http
|
|
262
|
+
.post(`${this.actionUrl}/save`, data, {
|
|
263
|
+
reportProgress: false,
|
|
264
|
+
withCredentials: true,
|
|
265
|
+
})
|
|
266
|
+
.pipe(map((result) => result));
|
|
267
|
+
}
|
|
268
|
+
deleteBy(filename) {
|
|
269
|
+
return this.http
|
|
270
|
+
.delete(`${this.actionUrl}/${filename}`, {})
|
|
271
|
+
.pipe(map((result) => result));
|
|
272
|
+
}
|
|
273
|
+
batchDelete(data) {
|
|
274
|
+
return this.http
|
|
275
|
+
.post(`${this.actionUrl}/batch`, data, { withCredentials: true })
|
|
276
|
+
.pipe(map((result) => result));
|
|
277
|
+
}
|
|
278
|
+
moveToGroup(data) {
|
|
279
|
+
return this.http
|
|
280
|
+
.post(`${this.actionUrl}/move`, data, { withCredentials: true })
|
|
281
|
+
.pipe(map((result) => result));
|
|
282
|
+
}
|
|
283
|
+
addGroup(data) {
|
|
284
|
+
return this.http
|
|
285
|
+
.post(`${this.actionUrl}/groups`, data, { withCredentials: true })
|
|
286
|
+
.pipe(map((result) => result));
|
|
287
|
+
}
|
|
288
|
+
findGroup(id) {
|
|
289
|
+
return this.http
|
|
290
|
+
.get(`${this.actionUrl}/groups/${id}`, { withCredentials: true })
|
|
291
|
+
.pipe(map((result) => result));
|
|
292
|
+
}
|
|
293
|
+
findGroups(options) {
|
|
294
|
+
return this.http
|
|
295
|
+
.get(`${this.actionUrl}/groups`, { withCredentials: true })
|
|
296
|
+
.pipe(map((result) => result));
|
|
297
|
+
}
|
|
298
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MediaService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
299
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MediaService, providedIn: 'root' });
|
|
300
|
+
}
|
|
301
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: MediaService, decorators: [{
|
|
302
|
+
type: Injectable,
|
|
303
|
+
args: [{
|
|
304
|
+
providedIn: 'root',
|
|
305
|
+
}]
|
|
306
|
+
}] });
|
|
307
|
+
|
|
308
|
+
class LayoutService {
|
|
309
|
+
breakpointObserver;
|
|
310
|
+
isHandset$;
|
|
311
|
+
constructor(breakpointObserver) {
|
|
312
|
+
this.breakpointObserver = breakpointObserver;
|
|
313
|
+
this.isHandset$ = this.breakpointObserver
|
|
314
|
+
.observe([Breakpoints.Small, Breakpoints.HandsetPortrait])
|
|
315
|
+
.pipe(map$1((result) => result.matches), shareReplay());
|
|
316
|
+
}
|
|
317
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LayoutService, deps: [{ token: i1$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
318
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LayoutService });
|
|
319
|
+
}
|
|
320
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LayoutService, decorators: [{
|
|
321
|
+
type: Injectable
|
|
322
|
+
}], ctorParameters: function () { return [{ type: i1$1.BreakpointObserver }]; } });
|
|
323
|
+
|
|
324
|
+
class SnackBarService {
|
|
325
|
+
snackBar = inject(MatSnackBar);
|
|
326
|
+
open(message) {
|
|
327
|
+
this.snackBar.open(message);
|
|
328
|
+
}
|
|
329
|
+
dismiss() {
|
|
330
|
+
this.snackBar.dismiss();
|
|
331
|
+
}
|
|
332
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SnackBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
333
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SnackBarService });
|
|
334
|
+
}
|
|
335
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SnackBarService, decorators: [{
|
|
336
|
+
type: Injectable
|
|
337
|
+
}] });
|
|
338
|
+
|
|
339
|
+
const services = [
|
|
340
|
+
BaseService,
|
|
341
|
+
LoadingService,
|
|
342
|
+
MediaService,
|
|
343
|
+
LayoutService,
|
|
344
|
+
DialogService,
|
|
345
|
+
SnackBarService,
|
|
346
|
+
NavigationService,
|
|
347
|
+
];
|
|
348
|
+
|
|
349
|
+
class BackButtonDirective {
|
|
350
|
+
navigation = inject(NavigationService);
|
|
351
|
+
constructor() { }
|
|
352
|
+
onClick() {
|
|
353
|
+
this.navigation.back();
|
|
354
|
+
}
|
|
355
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: BackButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
356
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.0.0", type: BackButtonDirective, isStandalone: true, selector: "[rolatechBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
357
|
+
}
|
|
358
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: BackButtonDirective, decorators: [{
|
|
359
|
+
type: Directive,
|
|
360
|
+
args: [{
|
|
361
|
+
selector: '[rolatechBackButton]',
|
|
362
|
+
standalone: true,
|
|
363
|
+
}]
|
|
364
|
+
}], ctorParameters: function () { return []; }, propDecorators: { onClick: [{
|
|
365
|
+
type: HostListener,
|
|
366
|
+
args: ['click']
|
|
367
|
+
}] } });
|
|
368
|
+
|
|
369
|
+
const SERVICE_DIRECTIVES = [BackButtonDirective];
|
|
370
|
+
|
|
371
|
+
class AngularServicesModule {
|
|
372
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AngularServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
373
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "16.0.0", ngImport: i0, type: AngularServicesModule, declarations: [DialogComponent], imports: [AngularCommonModule, BackButtonDirective], exports: [BackButtonDirective] });
|
|
374
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AngularServicesModule, providers: [...services], imports: [AngularCommonModule] });
|
|
375
|
+
}
|
|
376
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: AngularServicesModule, decorators: [{
|
|
377
|
+
type: NgModule,
|
|
378
|
+
args: [{
|
|
379
|
+
imports: [AngularCommonModule, SERVICE_DIRECTIVES],
|
|
380
|
+
providers: [...services],
|
|
381
|
+
declarations: [DialogComponent],
|
|
382
|
+
exports: [SERVICE_DIRECTIVES],
|
|
383
|
+
}]
|
|
384
|
+
}] });
|
|
385
|
+
|
|
386
|
+
class LoadingInterceptor {
|
|
387
|
+
loadingService;
|
|
388
|
+
activeRequests = 0;
|
|
389
|
+
constructor(loadingService) {
|
|
390
|
+
this.loadingService = loadingService;
|
|
391
|
+
}
|
|
392
|
+
intercept(request, next) {
|
|
393
|
+
if (this.activeRequests === 0) {
|
|
394
|
+
this.loadingService.start();
|
|
395
|
+
}
|
|
396
|
+
this.activeRequests++;
|
|
397
|
+
return next.handle(request).pipe(finalize(() => {
|
|
398
|
+
this.activeRequests--;
|
|
399
|
+
if (this.activeRequests === 0) {
|
|
400
|
+
this.loadingService.stop();
|
|
401
|
+
}
|
|
402
|
+
}));
|
|
403
|
+
}
|
|
404
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LoadingInterceptor, deps: [{ token: LoadingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
405
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LoadingInterceptor, providedIn: 'root' });
|
|
406
|
+
}
|
|
407
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: LoadingInterceptor, decorators: [{
|
|
408
|
+
type: Injectable,
|
|
409
|
+
args: [{
|
|
410
|
+
providedIn: 'root',
|
|
411
|
+
}]
|
|
412
|
+
}], ctorParameters: function () { return [{ type: LoadingService }]; } });
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* Generated bundle index. Do not edit.
|
|
416
|
+
*/
|
|
417
|
+
|
|
418
|
+
export { AngularServicesModule, BackButtonDirective, BaseService, DialogService, LayoutService, LoadingInterceptor, LoadingService, MediaService, NavigationService, SERVICE_DIRECTIVES, SnackBarService, services };
|
|
419
|
+
//# sourceMappingURL=rolatech-angular-services.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rolatech-angular-services.mjs","sources":["../../../../libs/angular-services/src/lib/services/navigation.service.ts","../../../../libs/angular-services/src/lib/components/dialog/dialog.component.ts","../../../../libs/angular-services/src/lib/components/dialog/dialog.component.html","../../../../libs/angular-services/src/lib/services/dialog.service.ts","../../../../libs/angular-services/src/lib/services/base.service.ts","../../../../libs/angular-services/src/lib/services/loading.service.ts","../../../../libs/angular-services/src/lib/services/media.service.ts","../../../../libs/angular-services/src/lib/services/layout.service.ts","../../../../libs/angular-services/src/lib/services/snack-bar.service.ts","../../../../libs/angular-services/src/lib/services/index.ts","../../../../libs/angular-services/src/lib/directive/back-button.directive.ts","../../../../libs/angular-services/src/lib/directive/index.ts","../../../../libs/angular-services/src/lib/angular-services.module.ts","../../../../libs/angular-services/src/lib/interceptor/loading.interceptor.ts","../../../../libs/angular-services/src/rolatech-angular-services.ts"],"sourcesContent":["import { inject, Injectable } from '@angular/core';\nimport { Location } from '@angular/common';\nimport { NavigationEnd, Router } from '@angular/router';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class NavigationService {\n private history: string[] = [];\n router = inject(Router);\n location = inject(Location);\n constructor() {\n this.router.events.subscribe((event) => {\n if (event instanceof NavigationEnd) {\n this.history.push(event.urlAfterRedirects);\n }\n });\n }\n start() {\n // this.router.events.subscribe((event) => {\n // if (event instanceof NavigationEnd) {\n // this.history.push(event.urlAfterRedirects);\n // console.log(this.history);\n // }\n // });\n }\n getHistory(): string[] {\n return this.history;\n }\n back(): void {\n console.log(this.history);\n this.history.pop();\n if (this.history.length > 0) {\n this.location.back();\n } else {\n this.router.navigateByUrl('/');\n }\n }\n next(): string {\n if (this.history.length > 0) {\n return this.history[this.history.length - 2];\n }\n return '';\n }\n}\n","import {\n Component,\n ComponentRef,\n EventEmitter,\n HostListener,\n inject,\n InjectionToken,\n OnDestroy,\n OnInit,\n TemplateRef,\n ViewChild,\n ViewContainerRef,\n} from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\n\nexport interface DialogData {\n title: string;\n message?: string;\n cancelText?: string;\n confirmText?: string;\n component?: any;\n width?: any;\n height?: any;\n data?: any;\n}\nexport interface IDynamicDialogConfig {\n title?: string;\n okText?: string;\n cancelText?: string;\n component: Component;\n data: any;\n}\n@Component({\n selector: 'rolatech-dialog',\n templateUrl: './dialog.component.html',\n styleUrls: ['./dialog.component.scss'],\n})\nexport class DialogComponent implements OnInit, OnDestroy {\n data: DialogData = inject(MAT_DIALOG_DATA);\n result: any;\n dialogRef = inject(MatDialogRef<DialogComponent>);\n\n @ViewChild('container', { read: ViewContainerRef, static: true })\n public componentRef!: ViewContainerRef;\n\n ngOnInit() {\n this.createComponent();\n // this.dialogRef.afterOpened().subscribe((res) => {\n // console.log(res);\n // this.result = res;\n // this.dialogRef.componentInstance['someOutput'].subscribe((res) => {\n // console.log(res);\n // });\n // });\n }\n createComponent() {\n this.componentRef.clear();\n const componentRef = this.componentRef.createComponent<DialogComponent>(this.data.component);\n const hostedComponent = componentRef.instance;\n // hostedComponent.data = this.data.data;\n\n // componentRef.instance['someOutput'].subsribe();\n\n if (this.data.data) {\n Object.keys(this.data.data).forEach((inputName) => {\n hostedComponent[inputName] = this.data.data[inputName];\n });\n }\n\n Object.keys(hostedComponent)\n .filter((prop) => hostedComponent[prop] instanceof EventEmitter)\n .forEach((output) => {\n this[output] = new EventEmitter();\n hostedComponent[output].subscribe((data) => {\n console.log(data);\n this[output].emit(data);\n });\n });\n this.dialogRef.afterOpened().subscribe(() => {\n this.dialogRef.componentInstance['someOutput'].subscribe((res) => {\n console.log(res);\n this.result = res;\n });\n });\n }\n\n ngOnDestroy() {\n this.componentRef.clear();\n }\n\n public cancel() {\n this.close(false);\n }\n public close(value) {\n this.dialogRef.close(value);\n }\n public confirm() {\n this.close(this.result);\n }\n @HostListener('keydown.esc')\n public onEsc() {\n this.close(false);\n }\n}\n","<div class=\"p-3 flex flex-col min-w-[320px]\" style=\"width: {{ data.width }};height: {{ data.height }}\">\n <div class=\"p-2\">\n <h1 class=\"text-xl\">{{ data.title }}</h1>\n </div>\n <div class=\"p-2\">\n <p class=\"\">{{ data.message }}</p>\n <ng-template #container></ng-template>\n <!-- <ng-container #container></ng-container> -->\n </div>\n <div class=\"flex-1\"></div>\n <div class=\"flex justify-end items-center p-2 mt-3\">\n <a class=\"mr-3 cursor-pointer\" (click)=\"cancel()\">{{ data.cancelText ? data.cancelText : 'Cancel' }}</a>\n <a class=\"w-20 text-center hover:bg-black bg-black cursor-pointer p-2 text-white rounded\" (click)=\"confirm()\">{{\n data.confirmText ? data.confirmText : 'Ok'\n }}</a>\n </div>\n</div>\n","import { inject, Injectable } from '@angular/core';\nimport { MatDialog, MatDialogRef } from '@angular/material/dialog';\nimport { map, Observable, take } from 'rxjs';\nimport { DialogComponent, DialogData } from '../components/dialog/dialog.component';\n\n@Injectable()\nexport class DialogService {\n dialog = inject(MatDialog);\n dialogRef!: MatDialogRef<DialogComponent>;\n\n public open(options: DialogData) {\n this.dialogRef = this.dialog.open<DialogComponent, DialogData>(DialogComponent, {\n data: {\n ...options,\n },\n });\n }\n public cancelled(): Observable<any> {\n return this.dialogRef.beforeClosed().pipe(\n take(1),\n map((res) => res)\n );\n }\n public confirmed(): Observable<any> {\n return this.dialogRef.afterClosed().pipe(\n take(1),\n map((res) => res)\n );\n }\n}\n","import { HttpClient } from '@angular/common/http';\nimport { inject, Inject, Injectable } from '@angular/core';\nimport { APP_CONFIG, AppConfig } from '@rolatech/angular-common';\nimport { map, Observable } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class BaseService {\n protected actionUrl!: string;\n public endpoint!: string;\n environment = inject(APP_CONFIG);\n\n constructor(protected http: HttpClient) {\n this.init();\n }\n init() {\n this.actionUrl = `${this.environment.baseUrl}/${this.endpoint}`;\n }\n find<T>(options?: any): Observable<T> {\n return this.http.get<T>(this.actionUrl, {\n params: options,\n withCredentials: true,\n });\n }\n get<T>(id: string, options?: any): Observable<T> {\n return this.http.get<T>(`${this.actionUrl}/${id}`, {\n params: options,\n withCredentials: true,\n });\n }\n create<T>(item: T): Observable<T> {\n return this.http.post<T>(`${this.actionUrl}`, item, {\n withCredentials: true,\n });\n }\n update<T>(id: string, data: T): Observable<T> {\n return this.http.put<T>(`${this.actionUrl}/${id}`, data, {\n withCredentials: true,\n });\n }\n delete<T>(id: string): Observable<T> {\n return this.http.delete<T>(`${this.actionUrl}/${id}`, {\n withCredentials: true,\n });\n }\n updateStatus<T>(id: string, data: T): Observable<T> {\n return this.http.put<T>(`${this.actionUrl}/${id}/status`, data, {\n withCredentials: true,\n });\n }\n search(word: string): Observable<any> {\n return this.http\n .get<any>(`${this.actionUrl}?search=${word}`, {\n withCredentials: true,\n })\n .pipe(map((result) => result));\n }\n}\n","import { Injectable } from '@angular/core';\nimport { BehaviorSubject } from 'rxjs';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoadingService {\n public loading$ = new BehaviorSubject(false);\n public ratio$ = new BehaviorSubject(0);\n isLoading = false;\n\n constructor() {}\n\n start() {\n this.loading$.next(true);\n }\n\n stop() {\n this.loading$.next(false);\n }\n async present(text?: string) {\n this.isLoading = true;\n }\n\n async dismiss() {\n this.isLoading = false;\n }\n}\n","import { HttpHeaders } from '@angular/common/http';\nimport { Injectable } from '@angular/core';\nimport { BaseService } from './base.service';\nimport { map, Observable } from 'rxjs';\n@Injectable({\n providedIn: 'root',\n})\nexport class MediaService extends BaseService {\n override init() {\n this.endpoint = 'media';\n super.init();\n }\n upload(data: FormData): Observable<any> {\n return this.http\n .post<any>(`${this.actionUrl}/upload`, data, {\n reportProgress: false,\n withCredentials: true,\n // headers: new HttpHeaders({\n // 'Content-Type': 'multipart/form-data',\n // }),\n })\n .pipe(map((result) => result));\n }\n uploadAndSave(data: FormData): Observable<any> {\n return this.http\n .post<any>(`${this.actionUrl}/save`, data, {\n reportProgress: false,\n withCredentials: true,\n })\n .pipe(map((result) => result));\n }\n deleteBy(filename: string): Observable<any> {\n return this.http\n .delete<any>(`${this.actionUrl}/${filename}`, {})\n .pipe(map((result) => result));\n }\n batchDelete(data: any): Observable<any> {\n return this.http\n .post<any>(`${this.actionUrl}/batch`, data, { withCredentials: true })\n .pipe(map((result) => result));\n }\n moveToGroup(data: any): Observable<any> {\n return this.http\n .post<any>(`${this.actionUrl}/move`, data, { withCredentials: true })\n .pipe(map((result) => result));\n }\n addGroup(data: any): Observable<any> {\n return this.http\n .post<any>(`${this.actionUrl}/groups`, data, { withCredentials: true })\n .pipe(map((result) => result));\n }\n findGroup(id: string): Observable<any> {\n return this.http\n .get<any>(`${this.actionUrl}/groups/${id}`, { withCredentials: true })\n .pipe(map((result) => result));\n }\n findGroups(options?: any): Observable<any> {\n return this.http\n .get<any>(`${this.actionUrl}/groups`, { withCredentials: true })\n .pipe(map((result) => result));\n }\n}\n","import { BreakpointObserver, Breakpoints } from '@angular/cdk/layout';\nimport { Injectable } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { map, shareReplay } from 'rxjs/operators';\n\n@Injectable()\nexport class LayoutService {\n isHandset$: Observable<boolean>;\n\n constructor(private breakpointObserver: BreakpointObserver) {\n this.isHandset$ = this.breakpointObserver\n .observe([Breakpoints.Small, Breakpoints.HandsetPortrait])\n .pipe(\n map((result) => result.matches),\n shareReplay()\n );\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { MatSnackBar } from '@angular/material/snack-bar';\n\n@Injectable()\nexport class SnackBarService {\n snackBar = inject(MatSnackBar);\n open(message) {\n this.snackBar.open(message);\n }\n dismiss() {\n this.snackBar.dismiss();\n }\n}\n","import { NavigationService } from './navigation.service';\nimport { DialogService } from './dialog.service';\nimport { BaseService } from './base.service';\nimport { LoadingService } from './loading.service';\nimport { MediaService } from './media.service';\nimport { LayoutService } from './layout.service';\nimport { SnackBarService } from './snack-bar.service';\n\nexport { BaseService, LoadingService, MediaService, LayoutService, DialogService, SnackBarService, NavigationService };\n\nexport const services: any[] = [\n BaseService,\n LoadingService,\n MediaService,\n LayoutService,\n DialogService,\n SnackBarService,\n NavigationService,\n];\n","import { Directive, ElementRef, HostListener, inject } from '@angular/core';\nimport { NavigationService } from '../services';\n\n@Directive({\n selector: '[rolatechBackButton]',\n standalone: true,\n})\nexport class BackButtonDirective {\n navigation = inject(NavigationService);\n constructor() {}\n @HostListener('click')\n onClick(): void {\n this.navigation.back();\n }\n}\n","import { Provider } from '@angular/core';\nimport { BackButtonDirective } from './back-button.directive';\n\nexport { BackButtonDirective } from './back-button.directive';\n\nexport const SERVICE_DIRECTIVES: Provider[] = [BackButtonDirective];\n","import { NgModule } from '@angular/core';\nimport * as fromServices from './services';\nimport { DialogComponent } from './components/dialog/dialog.component';\nimport { SERVICE_DIRECTIVES } from './directive';\nimport { AngularCommonModule } from '@rolatech/angular-common';\n\n@NgModule({\n imports: [AngularCommonModule, SERVICE_DIRECTIVES],\n providers: [...fromServices.services],\n declarations: [DialogComponent],\n exports: [SERVICE_DIRECTIVES],\n})\nexport class AngularServicesModule {}\n","import { Injectable } from '@angular/core';\nimport {\n HttpInterceptor,\n HttpRequest,\n HttpHandler,\n HttpEvent,\n} from '@angular/common/http';\nimport { Observable } from 'rxjs';\nimport { finalize } from 'rxjs/operators';\nimport { LoadingService } from '../services';\n\n@Injectable({\n providedIn: 'root',\n})\nexport class LoadingInterceptor {\n activeRequests = 0;\n\n constructor(private loadingService: LoadingService) {}\n\n intercept(\n request: HttpRequest<any>,\n next: HttpHandler\n ): Observable<HttpEvent<any>> {\n if (this.activeRequests === 0) {\n this.loadingService.start();\n }\n\n this.activeRequests++;\n\n return next.handle(request).pipe(\n finalize(() => {\n this.activeRequests--;\n if (this.activeRequests === 0) {\n this.loadingService.stop();\n }\n })\n );\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["map","i1","i1.BackButtonDirective","fromServices.services","i1.LoadingService"],"mappings":";;;;;;;;;;;;;AAIA,MAGa,iBAAiB,CAAA;IACpB,OAAO,GAAa,EAAE,CAAC;AAC/B,IAAA,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC;AACxB,IAAA,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;AAC5B,IAAA,WAAA,GAAA;QACE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,KAAK,KAAI;YACrC,IAAI,KAAK,YAAY,aAAa,EAAE;gBAClC,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,CAAC;AAC5C,aAAA;AACH,SAAC,CAAC,CAAC;KACJ;IACD,KAAK,GAAA;;;;;;;KAOJ;IACD,UAAU,GAAA;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;KACrB;IACD,IAAI,GAAA;AACF,QAAA,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;AAC1B,QAAA,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;AACnB,QAAA,IAAI,IAAI,CAAC,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE;AAC3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B;KAAI;IAEtD,SAAS,CACP,OAAyB,EACzB,IAAiB,EAAA;AAEjB,QAAA,IAAI,IAAI,CAAC,cAAc,KAAK,CAAC,EAAE;AAC7B,YAAA,IAAI,CAAC,cAAc,CAAC,KAAK,EAAE,CAAC;AAC7B,SAAA;QAED,IAAI,CAAC,cAAc,EAAE,CAAC;AAEtB,QAAA,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAC9B,QAAQ,CAAC,MAAK;YACZ,IAAI,CAAC,cAAc,EAAE,CAAC;AACtB,YAAA,IAAI,IAAI,CAAC,cAAc,KAAK,CAAC,EAAE;AAC7B,gBAAA,IAAI,CAAC,cAAc,CAAC,IAAI,EAAE,CAAC;AAC5B,aAAA;SACF,CAAC,CACH,CAAC;KACH;uGAvBU,kBAAkB,EAAA,IAAA,EAAA,CAAA,EAAA,KAAA,EAAAC,cAAA,EAAA,CAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,UAAA,EAAA,CAAA,CAAA;AAAlB,IAAA,OAAA,KAAA,GAAA,EAAA,CAAA,qBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,kBAAkB,cAFjB,MAAM,EAAA,CAAA,CAAA;;2FAEP,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAH9B,UAAU;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,UAAU,EAAE,MAAM;AACnB,iBAAA,CAAA;;;ACbD;;AAEG;;;;"}
|
package/index.d.ts
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as i0 from "@angular/core";
|
|
2
|
-
import * as i1 from "
|
|
2
|
+
import * as i1 from "./components/dialog/dialog.component";
|
|
3
|
+
import * as i2 from "@rolatech/angular-common";
|
|
4
|
+
import * as i3 from "./directive/back-button.directive";
|
|
3
5
|
export declare class AngularServicesModule {
|
|
4
6
|
static ɵfac: i0.ɵɵFactoryDeclaration<AngularServicesModule, never>;
|
|
5
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularServicesModule,
|
|
7
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AngularServicesModule, [typeof i1.DialogComponent], [typeof i2.AngularCommonModule, typeof i3.BackButtonDirective], [typeof i3.BackButtonDirective]>;
|
|
6
8
|
static ɵinj: i0.ɵɵInjectorDeclaration<AngularServicesModule>;
|
|
7
9
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { Component, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
+
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export interface DialogData {
|
|
5
|
+
title: string;
|
|
6
|
+
message?: string;
|
|
7
|
+
cancelText?: string;
|
|
8
|
+
confirmText?: string;
|
|
9
|
+
component?: any;
|
|
10
|
+
width?: any;
|
|
11
|
+
height?: any;
|
|
12
|
+
data?: any;
|
|
13
|
+
}
|
|
14
|
+
export interface IDynamicDialogConfig {
|
|
15
|
+
title?: string;
|
|
16
|
+
okText?: string;
|
|
17
|
+
cancelText?: string;
|
|
18
|
+
component: Component;
|
|
19
|
+
data: any;
|
|
20
|
+
}
|
|
21
|
+
export declare class DialogComponent implements OnInit, OnDestroy {
|
|
22
|
+
data: DialogData;
|
|
23
|
+
result: any;
|
|
24
|
+
dialogRef: MatDialogRef<any, any>;
|
|
25
|
+
componentRef: ViewContainerRef;
|
|
26
|
+
ngOnInit(): void;
|
|
27
|
+
createComponent(): void;
|
|
28
|
+
ngOnDestroy(): void;
|
|
29
|
+
cancel(): void;
|
|
30
|
+
close(value: any): void;
|
|
31
|
+
confirm(): void;
|
|
32
|
+
onEsc(): void;
|
|
33
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogComponent, never>;
|
|
34
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DialogComponent, "rolatech-dialog", never, {}, {}, never, never, false, never>;
|
|
35
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NavigationService } from '../services';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class BackButtonDirective {
|
|
4
|
+
navigation: NavigationService;
|
|
5
|
+
constructor();
|
|
6
|
+
onClick(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BackButtonDirective, never>;
|
|
8
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<BackButtonDirective, "[rolatechBackButton]", never, {}, {}, never, never, true, never>;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { LoadingInterceptor } from './loading.interceptor';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { LoadingService } from '../services';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class LoadingInterceptor {
|
|
6
|
+
private loadingService;
|
|
7
|
+
activeRequests: number;
|
|
8
|
+
constructor(loadingService: LoadingService);
|
|
9
|
+
intercept(request: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LoadingInterceptor, never>;
|
|
11
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<LoadingInterceptor>;
|
|
12
|
+
}
|
|
@@ -4,10 +4,10 @@ import { Observable } from 'rxjs';
|
|
|
4
4
|
import * as i0 from "@angular/core";
|
|
5
5
|
export declare class BaseService {
|
|
6
6
|
protected http: HttpClient;
|
|
7
|
-
private environment;
|
|
8
7
|
protected actionUrl: string;
|
|
9
8
|
endpoint: string;
|
|
10
|
-
|
|
9
|
+
environment: AppConfig;
|
|
10
|
+
constructor(http: HttpClient);
|
|
11
11
|
init(): void;
|
|
12
12
|
find<T>(options?: any): Observable<T>;
|
|
13
13
|
get<T>(id: string, options?: any): Observable<T>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { DialogComponent, DialogData } from '../components/dialog/dialog.component';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class DialogService {
|
|
6
|
+
dialog: MatDialog;
|
|
7
|
+
dialogRef: MatDialogRef<DialogComponent>;
|
|
8
|
+
open(options: DialogData): void;
|
|
9
|
+
cancelled(): Observable<any>;
|
|
10
|
+
confirmed(): Observable<any>;
|
|
11
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DialogService, never>;
|
|
12
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DialogService>;
|
|
13
|
+
}
|
package/lib/services/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
+
import { NavigationService } from './navigation.service';
|
|
2
|
+
import { DialogService } from './dialog.service';
|
|
1
3
|
import { BaseService } from './base.service';
|
|
2
4
|
import { LoadingService } from './loading.service';
|
|
3
5
|
import { MediaService } from './media.service';
|
|
4
6
|
import { LayoutService } from './layout.service';
|
|
5
|
-
|
|
7
|
+
import { SnackBarService } from './snack-bar.service';
|
|
8
|
+
export { BaseService, LoadingService, MediaService, LayoutService, DialogService, SnackBarService, NavigationService };
|
|
6
9
|
export declare const services: any[];
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Location } from '@angular/common';
|
|
2
|
+
import { Router } from '@angular/router';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class NavigationService {
|
|
5
|
+
private history;
|
|
6
|
+
router: Router;
|
|
7
|
+
location: Location;
|
|
8
|
+
constructor();
|
|
9
|
+
start(): void;
|
|
10
|
+
getHistory(): string[];
|
|
11
|
+
back(): void;
|
|
12
|
+
next(): string;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NavigationService, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<NavigationService>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class SnackBarService {
|
|
4
|
+
snackBar: MatSnackBar;
|
|
5
|
+
open(message: any): void;
|
|
6
|
+
dismiss(): void;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SnackBarService, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SnackBarService>;
|
|
9
|
+
}
|