@rolatech/angular-services 16.0.0 → 17.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/angular-services.module.mjs +6 -7
- package/esm2022/lib/components/dialog/dialog.component.mjs +22 -32
- package/esm2022/lib/directive/back-button.directive.mjs +6 -7
- package/esm2022/lib/interceptor/loading.interceptor.mjs +6 -7
- package/esm2022/lib/services/base.service.mjs +6 -7
- package/esm2022/lib/services/breadcrumb.service.mjs +34 -0
- package/esm2022/lib/services/dialog.service.mjs +5 -6
- package/esm2022/lib/services/index.mjs +6 -2
- package/esm2022/lib/services/layout.service.mjs +6 -7
- package/esm2022/lib/services/loading.service.mjs +6 -7
- package/esm2022/lib/services/media.service.mjs +5 -6
- package/esm2022/lib/services/navigation.service.mjs +6 -9
- package/esm2022/lib/services/snack-bar.service.mjs +5 -6
- package/esm2022/lib/services/support.service.mjs +96 -0
- package/fesm2022/rolatech-angular-services.mjs +184 -70
- package/fesm2022/rolatech-angular-services.mjs.map +1 -1
- package/lib/services/base.service.d.ts +1 -2
- package/lib/services/breadcrumb.service.d.ts +15 -0
- package/lib/services/index.d.ts +3 -1
- package/lib/services/support.service.d.ts +20 -0
- package/package.json +4 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { inject, Injectable } from '@angular/core';
|
|
2
2
|
import { MatSnackBar } from '@angular/material/snack-bar';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
class SnackBarService {
|
|
4
|
+
export class SnackBarService {
|
|
5
5
|
snackBar = inject(MatSnackBar);
|
|
6
6
|
open(message) {
|
|
7
7
|
this.snackBar.open(message);
|
|
@@ -9,11 +9,10 @@ class SnackBarService {
|
|
|
9
9
|
dismiss() {
|
|
10
10
|
this.snackBar.dismiss();
|
|
11
11
|
}
|
|
12
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
13
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
12
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SnackBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
13
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SnackBarService });
|
|
14
14
|
}
|
|
15
|
-
|
|
16
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImport: i0, type: SnackBarService, decorators: [{
|
|
15
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SnackBarService, decorators: [{
|
|
17
16
|
type: Injectable
|
|
18
17
|
}] });
|
|
19
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
18
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic25hY2stYmFyLnNlcnZpY2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2FuZ3VsYXItc2VydmljZXMvc3JjL2xpYi9zZXJ2aWNlcy9zbmFjay1iYXIuc2VydmljZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsTUFBTSxFQUFFLFVBQVUsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNuRCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sNkJBQTZCLENBQUM7O0FBRzFELE1BQU0sT0FBTyxlQUFlO0lBQzFCLFFBQVEsR0FBRyxNQUFNLENBQUMsV0FBVyxDQUFDLENBQUM7SUFDL0IsSUFBSSxDQUFDLE9BQU87UUFDVixJQUFJLENBQUMsUUFBUSxDQUFDLElBQUksQ0FBQyxPQUFPLENBQUMsQ0FBQztJQUM5QixDQUFDO0lBQ0QsT0FBTztRQUNMLElBQUksQ0FBQyxRQUFRLENBQUMsT0FBTyxFQUFFLENBQUM7SUFDMUIsQ0FBQzt1R0FQVSxlQUFlOzJHQUFmLGVBQWU7OzJGQUFmLGVBQWU7a0JBRDNCLFVBQVUiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBpbmplY3QsIEluamVjdGFibGUgfSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7IE1hdFNuYWNrQmFyIH0gZnJvbSAnQGFuZ3VsYXIvbWF0ZXJpYWwvc25hY2stYmFyJztcblxuQEluamVjdGFibGUoKVxuZXhwb3J0IGNsYXNzIFNuYWNrQmFyU2VydmljZSB7XG4gIHNuYWNrQmFyID0gaW5qZWN0KE1hdFNuYWNrQmFyKTtcbiAgb3BlbihtZXNzYWdlKSB7XG4gICAgdGhpcy5zbmFja0Jhci5vcGVuKG1lc3NhZ2UpO1xuICB9XG4gIGRpc21pc3MoKSB7XG4gICAgdGhpcy5zbmFja0Jhci5kaXNtaXNzKCk7XG4gIH1cbn1cbiJdfQ==
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Injectable, inject } from '@angular/core';
|
|
3
|
+
import { APP_CONFIG } from '@rolatech/angular-common';
|
|
4
|
+
import { catchError } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export class SupportService {
|
|
7
|
+
environment = inject(APP_CONFIG);
|
|
8
|
+
http = inject(HttpClient);
|
|
9
|
+
findAllBuckets(options) {
|
|
10
|
+
return this.http
|
|
11
|
+
.get(`${this.environment.baseUrl}/support/buckets`, {
|
|
12
|
+
params: options,
|
|
13
|
+
withCredentials: false,
|
|
14
|
+
})
|
|
15
|
+
.pipe(catchError((error) => {
|
|
16
|
+
throw error;
|
|
17
|
+
}));
|
|
18
|
+
}
|
|
19
|
+
findAll(options) {
|
|
20
|
+
return this.http
|
|
21
|
+
.get(`${this.environment.baseUrl}/support/folders`, {
|
|
22
|
+
params: options,
|
|
23
|
+
withCredentials: false,
|
|
24
|
+
})
|
|
25
|
+
.pipe(catchError((error) => {
|
|
26
|
+
throw error;
|
|
27
|
+
}));
|
|
28
|
+
}
|
|
29
|
+
findFolderBySlug(slug) {
|
|
30
|
+
return this.http
|
|
31
|
+
.get(`${this.environment.baseUrl}/support/folders/slug/${slug}`, {
|
|
32
|
+
withCredentials: false,
|
|
33
|
+
})
|
|
34
|
+
.pipe(catchError((error) => {
|
|
35
|
+
throw error;
|
|
36
|
+
}));
|
|
37
|
+
}
|
|
38
|
+
findByPath(path) {
|
|
39
|
+
return this.http
|
|
40
|
+
.get(`${this.environment.baseUrl}/support/folders/by?path=${path}`, {
|
|
41
|
+
withCredentials: false,
|
|
42
|
+
})
|
|
43
|
+
.pipe(catchError((error) => {
|
|
44
|
+
throw error;
|
|
45
|
+
}));
|
|
46
|
+
}
|
|
47
|
+
findAllFiles(options) {
|
|
48
|
+
return this.http
|
|
49
|
+
.get(`${this.environment.baseUrl}/support/files`, {
|
|
50
|
+
params: options,
|
|
51
|
+
withCredentials: false,
|
|
52
|
+
})
|
|
53
|
+
.pipe(catchError((error) => {
|
|
54
|
+
throw error;
|
|
55
|
+
}));
|
|
56
|
+
}
|
|
57
|
+
findFileByFolder(folder) {
|
|
58
|
+
return this.http.get(`${this.environment.baseUrl}/support/files/by?folder=${folder}`, {
|
|
59
|
+
withCredentials: false,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
findFileBySlug(slug) {
|
|
63
|
+
return this.http.get(`${this.environment.baseUrl}/support/files/slug/${slug}`, {
|
|
64
|
+
withCredentials: false,
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
uploadFile(data) {
|
|
68
|
+
return this.http.post(`${this.environment.baseUrl}/support/files`, data, {
|
|
69
|
+
withCredentials: true,
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
createBucket(data) {
|
|
73
|
+
return this.http.post(`${this.environment.baseUrl}/support/buckets`, data, {
|
|
74
|
+
withCredentials: true,
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
createFolderBySlug(slug, data) {
|
|
78
|
+
return this.http.post(`${this.environment.baseUrl}/support/folders/slug/${slug}`, data, {
|
|
79
|
+
withCredentials: true,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
uploadFileBySlug(slug, data) {
|
|
83
|
+
return this.http.post(`${this.environment.baseUrl}/support/files/slug/${slug}`, data, {
|
|
84
|
+
withCredentials: true,
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
88
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SupportService, providedIn: 'root' });
|
|
89
|
+
}
|
|
90
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SupportService, decorators: [{
|
|
91
|
+
type: Injectable,
|
|
92
|
+
args: [{
|
|
93
|
+
providedIn: 'root',
|
|
94
|
+
}]
|
|
95
|
+
}] });
|
|
96
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic3VwcG9ydC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9hbmd1bGFyLXNlcnZpY2VzL3NyYy9saWIvc2VydmljZXMvc3VwcG9ydC5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUNsRCxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNuRCxPQUFPLEVBQUUsVUFBVSxF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1cHBvcnQvZmlsZXNgLCBkYXRhLCB7XG4gICAgICB3aXRoQ3JlZGVudGlhbHM6IHRydWUsXG4gICAgfSk7XG4gIH1cbiAgY3JlYXRlQnVja2V0KGRhdGE6IGFueSkge1xuICAgIHJldHVybiB0aGlzLmh0dHAucG9zdDxhbnk+KGAke3RoaXMuZW52aXJvbm1lbnQuYmFzZVVybH0vc3VwcG9ydC9idWNrZXRzYCwgZGF0YSwge1xuICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlLFxuICAgIH0pO1xuICB9XG4gIGNyZWF0ZUZvbGRlckJ5U2x1ZyhzbHVnOiBzdHJpbmcsIGRhdGE6IGFueSkge1xuICAgIHJldHVybiB0aGlzLmh0dHAucG9zdDxhbnk+KGAke3RoaXMuZW52aXJvbm1lbnQuYmFzZVVybH0vc3VwcG9ydC9mb2xkZXJzL3NsdWcvJHtzbHVnfWAsIGRhdGEsIHtcbiAgICAgIHdpdGhDcmVkZW50aWFsczogdHJ1ZSxcbiAgICB9KTtcbiAgfVxuICB1cGxvYWRGaWxlQnlTbHVnKHNsdWc6IHN0cmluZywgZGF0YTogRm9ybURhdGEpIHtcbiAgICByZXR1cm4gdGhpcy5odHRwLnBvc3Q8YW55PihgJHt0aGlzLmVudmlyb25tZW50LmJhc2VVcmx9L3N1cHBvcnQvZmlsZXMvc2x1Zy8ke3NsdWd9YCwgZGF0YSwge1xuICAgICAgd2l0aENyZWRlbnRpYWxzOiB0cnVlLFxuICAgIH0pO1xuICB9XG59XG4iXX0=
|
|
@@ -3,8 +3,9 @@ import { inject, Injectable, EventEmitter, ViewContainerRef, Component, ViewChil
|
|
|
3
3
|
import { Location } from '@angular/common';
|
|
4
4
|
import { Router, NavigationEnd } from '@angular/router';
|
|
5
5
|
import { MAT_DIALOG_DATA, MatDialogRef, MatDialog } from '@angular/material/dialog';
|
|
6
|
-
import { take, map, BehaviorSubject } from 'rxjs';
|
|
6
|
+
import { take, map, BehaviorSubject, catchError } from 'rxjs';
|
|
7
7
|
import * as i1 from '@angular/common/http';
|
|
8
|
+
import { HttpClient } from '@angular/common/http';
|
|
8
9
|
import { APP_CONFIG, AngularCommonModule } from '@rolatech/angular-common';
|
|
9
10
|
import * as i1$1 from '@angular/cdk/layout';
|
|
10
11
|
import { Breakpoints } from '@angular/cdk/layout';
|
|
@@ -26,7 +27,6 @@ class NavigationService {
|
|
|
26
27
|
// this.router.events.subscribe((event) => {
|
|
27
28
|
// if (event instanceof NavigationEnd) {
|
|
28
29
|
// this.history.push(event.urlAfterRedirects);
|
|
29
|
-
// console.log(this.history);
|
|
30
30
|
// }
|
|
31
31
|
// });
|
|
32
32
|
}
|
|
@@ -34,7 +34,6 @@ class NavigationService {
|
|
|
34
34
|
return this.history;
|
|
35
35
|
}
|
|
36
36
|
back() {
|
|
37
|
-
console.log(this.history);
|
|
38
37
|
this.history.pop();
|
|
39
38
|
if (this.history.length > 0) {
|
|
40
39
|
this.location.back();
|
|
@@ -49,15 +48,15 @@ class NavigationService {
|
|
|
49
48
|
}
|
|
50
49
|
return '';
|
|
51
50
|
}
|
|
52
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
53
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
51
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NavigationService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
52
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NavigationService, providedIn: 'root' });
|
|
54
53
|
}
|
|
55
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
54
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: NavigationService, decorators: [{
|
|
56
55
|
type: Injectable,
|
|
57
56
|
args: [{
|
|
58
57
|
providedIn: 'root',
|
|
59
58
|
}]
|
|
60
|
-
}], ctorParameters:
|
|
59
|
+
}], ctorParameters: () => [] });
|
|
61
60
|
|
|
62
61
|
class DialogComponent {
|
|
63
62
|
data = inject(MAT_DIALOG_DATA);
|
|
@@ -66,37 +65,28 @@ class DialogComponent {
|
|
|
66
65
|
componentRef;
|
|
67
66
|
ngOnInit() {
|
|
68
67
|
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
68
|
}
|
|
77
69
|
createComponent() {
|
|
78
70
|
this.componentRef.clear();
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
71
|
+
if (this.data.component) {
|
|
72
|
+
const componentRef = this.componentRef.createComponent(this.data.component);
|
|
73
|
+
const hostedComponent = componentRef.instance;
|
|
74
|
+
if (this.data.data) {
|
|
75
|
+
Object.keys(this.data.data).forEach((inputName) => {
|
|
76
|
+
hostedComponent[inputName] = this.data.data[inputName];
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
Object.keys(hostedComponent)
|
|
80
|
+
.filter((prop) => hostedComponent[prop] instanceof EventEmitter)
|
|
81
|
+
.forEach((output) => {
|
|
82
|
+
this[output] = new EventEmitter();
|
|
83
|
+
hostedComponent[output].subscribe((data) => {
|
|
84
|
+
this[output].emit(data);
|
|
85
|
+
});
|
|
86
86
|
});
|
|
87
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
88
|
this.dialogRef.afterOpened().subscribe(() => {
|
|
98
|
-
this.dialogRef.componentInstance['
|
|
99
|
-
console.log(res);
|
|
89
|
+
this.dialogRef.componentInstance['output'].subscribe((res) => {
|
|
100
90
|
this.result = res;
|
|
101
91
|
});
|
|
102
92
|
});
|
|
@@ -111,15 +101,15 @@ class DialogComponent {
|
|
|
111
101
|
this.dialogRef.close(value);
|
|
112
102
|
}
|
|
113
103
|
confirm() {
|
|
114
|
-
this.close(this.result);
|
|
104
|
+
this.close(this.result || true);
|
|
115
105
|
}
|
|
116
106
|
onEsc() {
|
|
117
107
|
this.close(false);
|
|
118
108
|
}
|
|
119
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
120
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "
|
|
109
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: DialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
110
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.0.2", 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
111
|
}
|
|
122
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
112
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: DialogComponent, decorators: [{
|
|
123
113
|
type: Component,
|
|
124
114
|
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
115
|
}], propDecorators: { componentRef: [{
|
|
@@ -146,10 +136,10 @@ class DialogService {
|
|
|
146
136
|
confirmed() {
|
|
147
137
|
return this.dialogRef.afterClosed().pipe(take(1), map((res) => res));
|
|
148
138
|
}
|
|
149
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
150
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
139
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: DialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
140
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: DialogService });
|
|
151
141
|
}
|
|
152
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
142
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: DialogService, decorators: [{
|
|
153
143
|
type: Injectable
|
|
154
144
|
}] });
|
|
155
145
|
|
|
@@ -204,15 +194,15 @@ class BaseService {
|
|
|
204
194
|
})
|
|
205
195
|
.pipe(map((result) => result));
|
|
206
196
|
}
|
|
207
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
208
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
197
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BaseService, deps: [{ token: i1.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
198
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BaseService, providedIn: 'root' });
|
|
209
199
|
}
|
|
210
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
200
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BaseService, decorators: [{
|
|
211
201
|
type: Injectable,
|
|
212
202
|
args: [{
|
|
213
203
|
providedIn: 'root',
|
|
214
204
|
}]
|
|
215
|
-
}], ctorParameters:
|
|
205
|
+
}], ctorParameters: () => [{ type: i1.HttpClient }] });
|
|
216
206
|
|
|
217
207
|
class LoadingService {
|
|
218
208
|
loading$ = new BehaviorSubject(false);
|
|
@@ -231,15 +221,15 @@ class LoadingService {
|
|
|
231
221
|
async dismiss() {
|
|
232
222
|
this.isLoading = false;
|
|
233
223
|
}
|
|
234
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
235
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
224
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LoadingService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
225
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LoadingService, providedIn: 'root' });
|
|
236
226
|
}
|
|
237
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
227
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LoadingService, decorators: [{
|
|
238
228
|
type: Injectable,
|
|
239
229
|
args: [{
|
|
240
230
|
providedIn: 'root',
|
|
241
231
|
}]
|
|
242
|
-
}], ctorParameters:
|
|
232
|
+
}], ctorParameters: () => [] });
|
|
243
233
|
|
|
244
234
|
class MediaService extends BaseService {
|
|
245
235
|
init() {
|
|
@@ -295,10 +285,10 @@ class MediaService extends BaseService {
|
|
|
295
285
|
.get(`${this.actionUrl}/groups`, { withCredentials: true })
|
|
296
286
|
.pipe(map((result) => result));
|
|
297
287
|
}
|
|
298
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
299
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
288
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: MediaService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
289
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: MediaService, providedIn: 'root' });
|
|
300
290
|
}
|
|
301
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
291
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: MediaService, decorators: [{
|
|
302
292
|
type: Injectable,
|
|
303
293
|
args: [{
|
|
304
294
|
providedIn: 'root',
|
|
@@ -314,12 +304,12 @@ class LayoutService {
|
|
|
314
304
|
.observe([Breakpoints.Small, Breakpoints.HandsetPortrait])
|
|
315
305
|
.pipe(map$1((result) => result.matches), shareReplay());
|
|
316
306
|
}
|
|
317
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
318
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
307
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LayoutService, deps: [{ token: i1$1.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
308
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LayoutService });
|
|
319
309
|
}
|
|
320
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
310
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LayoutService, decorators: [{
|
|
321
311
|
type: Injectable
|
|
322
|
-
}], ctorParameters:
|
|
312
|
+
}], ctorParameters: () => [{ type: i1$1.BreakpointObserver }] });
|
|
323
313
|
|
|
324
314
|
class SnackBarService {
|
|
325
315
|
snackBar = inject(MatSnackBar);
|
|
@@ -329,13 +319,135 @@ class SnackBarService {
|
|
|
329
319
|
dismiss() {
|
|
330
320
|
this.snackBar.dismiss();
|
|
331
321
|
}
|
|
332
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
333
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
322
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SnackBarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
323
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SnackBarService });
|
|
334
324
|
}
|
|
335
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
325
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SnackBarService, decorators: [{
|
|
336
326
|
type: Injectable
|
|
337
327
|
}] });
|
|
338
328
|
|
|
329
|
+
class SupportService {
|
|
330
|
+
environment = inject(APP_CONFIG);
|
|
331
|
+
http = inject(HttpClient);
|
|
332
|
+
findAllBuckets(options) {
|
|
333
|
+
return this.http
|
|
334
|
+
.get(`${this.environment.baseUrl}/support/buckets`, {
|
|
335
|
+
params: options,
|
|
336
|
+
withCredentials: false,
|
|
337
|
+
})
|
|
338
|
+
.pipe(catchError((error) => {
|
|
339
|
+
throw error;
|
|
340
|
+
}));
|
|
341
|
+
}
|
|
342
|
+
findAll(options) {
|
|
343
|
+
return this.http
|
|
344
|
+
.get(`${this.environment.baseUrl}/support/folders`, {
|
|
345
|
+
params: options,
|
|
346
|
+
withCredentials: false,
|
|
347
|
+
})
|
|
348
|
+
.pipe(catchError((error) => {
|
|
349
|
+
throw error;
|
|
350
|
+
}));
|
|
351
|
+
}
|
|
352
|
+
findFolderBySlug(slug) {
|
|
353
|
+
return this.http
|
|
354
|
+
.get(`${this.environment.baseUrl}/support/folders/slug/${slug}`, {
|
|
355
|
+
withCredentials: false,
|
|
356
|
+
})
|
|
357
|
+
.pipe(catchError((error) => {
|
|
358
|
+
throw error;
|
|
359
|
+
}));
|
|
360
|
+
}
|
|
361
|
+
findByPath(path) {
|
|
362
|
+
return this.http
|
|
363
|
+
.get(`${this.environment.baseUrl}/support/folders/by?path=${path}`, {
|
|
364
|
+
withCredentials: false,
|
|
365
|
+
})
|
|
366
|
+
.pipe(catchError((error) => {
|
|
367
|
+
throw error;
|
|
368
|
+
}));
|
|
369
|
+
}
|
|
370
|
+
findAllFiles(options) {
|
|
371
|
+
return this.http
|
|
372
|
+
.get(`${this.environment.baseUrl}/support/files`, {
|
|
373
|
+
params: options,
|
|
374
|
+
withCredentials: false,
|
|
375
|
+
})
|
|
376
|
+
.pipe(catchError((error) => {
|
|
377
|
+
throw error;
|
|
378
|
+
}));
|
|
379
|
+
}
|
|
380
|
+
findFileByFolder(folder) {
|
|
381
|
+
return this.http.get(`${this.environment.baseUrl}/support/files/by?folder=${folder}`, {
|
|
382
|
+
withCredentials: false,
|
|
383
|
+
});
|
|
384
|
+
}
|
|
385
|
+
findFileBySlug(slug) {
|
|
386
|
+
return this.http.get(`${this.environment.baseUrl}/support/files/slug/${slug}`, {
|
|
387
|
+
withCredentials: false,
|
|
388
|
+
});
|
|
389
|
+
}
|
|
390
|
+
uploadFile(data) {
|
|
391
|
+
return this.http.post(`${this.environment.baseUrl}/support/files`, data, {
|
|
392
|
+
withCredentials: true,
|
|
393
|
+
});
|
|
394
|
+
}
|
|
395
|
+
createBucket(data) {
|
|
396
|
+
return this.http.post(`${this.environment.baseUrl}/support/buckets`, data, {
|
|
397
|
+
withCredentials: true,
|
|
398
|
+
});
|
|
399
|
+
}
|
|
400
|
+
createFolderBySlug(slug, data) {
|
|
401
|
+
return this.http.post(`${this.environment.baseUrl}/support/folders/slug/${slug}`, data, {
|
|
402
|
+
withCredentials: true,
|
|
403
|
+
});
|
|
404
|
+
}
|
|
405
|
+
uploadFileBySlug(slug, data) {
|
|
406
|
+
return this.http.post(`${this.environment.baseUrl}/support/files/slug/${slug}`, data, {
|
|
407
|
+
withCredentials: true,
|
|
408
|
+
});
|
|
409
|
+
}
|
|
410
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SupportService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
411
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SupportService, providedIn: 'root' });
|
|
412
|
+
}
|
|
413
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: SupportService, decorators: [{
|
|
414
|
+
type: Injectable,
|
|
415
|
+
args: [{
|
|
416
|
+
providedIn: 'root',
|
|
417
|
+
}]
|
|
418
|
+
}] });
|
|
419
|
+
|
|
420
|
+
class BreadcrumbService {
|
|
421
|
+
router = inject(Router);
|
|
422
|
+
breadcrumbs = [];
|
|
423
|
+
add(label, slug) {
|
|
424
|
+
const breadcrumb = {
|
|
425
|
+
label: label,
|
|
426
|
+
slug: slug,
|
|
427
|
+
};
|
|
428
|
+
this.breadcrumbs.push(breadcrumb);
|
|
429
|
+
return this.breadcrumbs;
|
|
430
|
+
}
|
|
431
|
+
goTo(slug, route) {
|
|
432
|
+
if (this.breadcrumbs.length === 1) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
const index = this.breadcrumbs.findIndex((item) => item.slug === slug);
|
|
436
|
+
this.breadcrumbs.length = index;
|
|
437
|
+
this.router.navigate([`${slug}`], {
|
|
438
|
+
relativeTo: route,
|
|
439
|
+
});
|
|
440
|
+
}
|
|
441
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BreadcrumbService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
442
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BreadcrumbService, providedIn: 'root' });
|
|
443
|
+
}
|
|
444
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BreadcrumbService, decorators: [{
|
|
445
|
+
type: Injectable,
|
|
446
|
+
args: [{
|
|
447
|
+
providedIn: 'root',
|
|
448
|
+
}]
|
|
449
|
+
}] });
|
|
450
|
+
|
|
339
451
|
const services = [
|
|
340
452
|
BaseService,
|
|
341
453
|
LoadingService,
|
|
@@ -344,6 +456,8 @@ const services = [
|
|
|
344
456
|
DialogService,
|
|
345
457
|
SnackBarService,
|
|
346
458
|
NavigationService,
|
|
459
|
+
SupportService,
|
|
460
|
+
BreadcrumbService,
|
|
347
461
|
];
|
|
348
462
|
|
|
349
463
|
class BackButtonDirective {
|
|
@@ -352,16 +466,16 @@ class BackButtonDirective {
|
|
|
352
466
|
onClick() {
|
|
353
467
|
this.navigation.back();
|
|
354
468
|
}
|
|
355
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
356
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "
|
|
469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BackButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
470
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.0.2", type: BackButtonDirective, isStandalone: true, selector: "[rolatechBackButton]", host: { listeners: { "click": "onClick()" } }, ngImport: i0 });
|
|
357
471
|
}
|
|
358
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: BackButtonDirective, decorators: [{
|
|
359
473
|
type: Directive,
|
|
360
474
|
args: [{
|
|
361
475
|
selector: '[rolatechBackButton]',
|
|
362
476
|
standalone: true,
|
|
363
477
|
}]
|
|
364
|
-
}], ctorParameters:
|
|
478
|
+
}], ctorParameters: () => [], propDecorators: { onClick: [{
|
|
365
479
|
type: HostListener,
|
|
366
480
|
args: ['click']
|
|
367
481
|
}] } });
|
|
@@ -369,11 +483,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.0.0", ngImpor
|
|
|
369
483
|
const SERVICE_DIRECTIVES = [BackButtonDirective];
|
|
370
484
|
|
|
371
485
|
class AngularServicesModule {
|
|
372
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
373
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "
|
|
374
|
-
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "
|
|
486
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: AngularServicesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
487
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.0.2", ngImport: i0, type: AngularServicesModule, declarations: [DialogComponent], imports: [AngularCommonModule, BackButtonDirective], exports: [BackButtonDirective] });
|
|
488
|
+
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: AngularServicesModule, providers: [...services], imports: [AngularCommonModule] });
|
|
375
489
|
}
|
|
376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
490
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: AngularServicesModule, decorators: [{
|
|
377
491
|
type: NgModule,
|
|
378
492
|
args: [{
|
|
379
493
|
imports: [AngularCommonModule, SERVICE_DIRECTIVES],
|
|
@@ -401,19 +515,19 @@ class LoadingInterceptor {
|
|
|
401
515
|
}
|
|
402
516
|
}));
|
|
403
517
|
}
|
|
404
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "
|
|
405
|
-
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "
|
|
518
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LoadingInterceptor, deps: [{ token: LoadingService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
519
|
+
static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LoadingInterceptor, providedIn: 'root' });
|
|
406
520
|
}
|
|
407
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "
|
|
521
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.0.2", ngImport: i0, type: LoadingInterceptor, decorators: [{
|
|
408
522
|
type: Injectable,
|
|
409
523
|
args: [{
|
|
410
524
|
providedIn: 'root',
|
|
411
525
|
}]
|
|
412
|
-
}], ctorParameters:
|
|
526
|
+
}], ctorParameters: () => [{ type: LoadingService }] });
|
|
413
527
|
|
|
414
528
|
/**
|
|
415
529
|
* Generated bundle index. Do not edit.
|
|
416
530
|
*/
|
|
417
531
|
|
|
418
|
-
export { AngularServicesModule, BackButtonDirective, BaseService, DialogService, LayoutService, LoadingInterceptor, LoadingService, MediaService, NavigationService, SERVICE_DIRECTIVES, SnackBarService, services };
|
|
532
|
+
export { AngularServicesModule, BackButtonDirective, BaseService, BreadcrumbService, DialogService, LayoutService, LoadingInterceptor, LoadingService, MediaService, NavigationService, SERVICE_DIRECTIVES, SnackBarService, SupportService, services };
|
|
419
533
|
//# sourceMappingURL=rolatech-angular-services.mjs.map
|