@cleavelandprice/ngx-lib 2.3.8 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/active-directory/model/service-config.d.ts +1 -1
- package/esm2020/active-directory/model/service-config.mjs +1 -1
- package/esm2020/authentication/services/authentication.service.mjs +9 -6
- package/esm2020/lib/model/app-path-config.mjs +2 -0
- package/esm2020/lib/model/app-type.mjs +2 -0
- package/esm2020/lib/model/app.mjs +2 -0
- package/esm2020/lib/model/default-config.mjs +4 -0
- package/esm2020/lib/model/service-config.mjs +3 -0
- package/esm2020/lib/ngx-lib.module.mjs +24 -4
- package/esm2020/lib/services/app-path-config.service.mjs +45 -0
- package/esm2020/public_api.mjs +6 -1
- package/esm2020/upload/model/service-config.mjs +1 -1
- package/esm2020/upload/services/upload.service.mjs +2 -2
- package/fesm2015/cleavelandprice-ngx-lib-active-directory.mjs.map +1 -1
- package/fesm2015/cleavelandprice-ngx-lib-authentication.mjs +8 -5
- package/fesm2015/cleavelandprice-ngx-lib-authentication.mjs.map +1 -1
- package/fesm2015/cleavelandprice-ngx-lib-upload.mjs +1 -1
- package/fesm2015/cleavelandprice-ngx-lib-upload.mjs.map +1 -1
- package/fesm2015/cleavelandprice-ngx-lib.mjs +75 -4
- package/fesm2015/cleavelandprice-ngx-lib.mjs.map +1 -1
- package/fesm2020/cleavelandprice-ngx-lib-active-directory.mjs.map +1 -1
- package/fesm2020/cleavelandprice-ngx-lib-authentication.mjs +8 -5
- package/fesm2020/cleavelandprice-ngx-lib-authentication.mjs.map +1 -1
- package/fesm2020/cleavelandprice-ngx-lib-upload.mjs +1 -1
- package/fesm2020/cleavelandprice-ngx-lib-upload.mjs.map +1 -1
- package/fesm2020/cleavelandprice-ngx-lib.mjs +70 -4
- package/fesm2020/cleavelandprice-ngx-lib.mjs.map +1 -1
- package/lib/model/app-path-config.d.ts +10 -0
- package/lib/model/app-type.d.ts +5 -0
- package/lib/model/app.d.ts +16 -0
- package/lib/model/default-config.d.ts +2 -0
- package/lib/model/service-config.d.ts +3 -0
- package/lib/ngx-lib.module.d.ts +5 -1
- package/lib/services/app-path-config.service.d.ts +20 -0
- package/package.json +1 -1
- package/public_api.d.ts +5 -0
- package/upload/model/service-config.d.ts +1 -1
|
@@ -1,9 +1,71 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
2
|
+
import { Injectable, Optional, NgModule, SkipSelf } from '@angular/core';
|
|
3
|
+
import * as i2 from '@angular/common/http';
|
|
4
|
+
|
|
5
|
+
class ServiceConfig {
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
const defaultConfig = {
|
|
9
|
+
apiUrl: 'http://utilityapi'
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
class AppPathConfigService {
|
|
13
|
+
constructor(config, http) {
|
|
14
|
+
this.config = config;
|
|
15
|
+
this.http = http;
|
|
16
|
+
this.config = this.config ?? defaultConfig;
|
|
17
|
+
this.url = `${this.config.apiUrl}/apppathconfigs`;
|
|
18
|
+
}
|
|
19
|
+
getAll() {
|
|
20
|
+
return this.http.get(this.url);
|
|
21
|
+
}
|
|
22
|
+
getById(id) {
|
|
23
|
+
return this.http.get(`${this.url}/${id}`);
|
|
24
|
+
}
|
|
25
|
+
getByAppId(id) {
|
|
26
|
+
return this.http.get(`${this.url}/appid/${id}`);
|
|
27
|
+
}
|
|
28
|
+
getByApp(name) {
|
|
29
|
+
return this.http.get(`${this.url}/app/${name}`);
|
|
30
|
+
}
|
|
31
|
+
getByAppTypeId(id) {
|
|
32
|
+
return this.http.get(`${this.url}/apptypeid/${id}`);
|
|
33
|
+
}
|
|
34
|
+
getByAppType(name) {
|
|
35
|
+
return this.http.get(`${this.url}/apptype/${name}`);
|
|
36
|
+
}
|
|
37
|
+
getByAppFunction(name) {
|
|
38
|
+
return this.http.get(`${this.url}/function/${name}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
AppPathConfigService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AppPathConfigService, deps: [{ token: ServiceConfig, optional: true }, { token: i2.HttpClient }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
42
|
+
AppPathConfigService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AppPathConfigService, providedIn: 'root' });
|
|
43
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: AppPathConfigService, decorators: [{
|
|
44
|
+
type: Injectable,
|
|
45
|
+
args: [{
|
|
46
|
+
providedIn: 'root'
|
|
47
|
+
}]
|
|
48
|
+
}], ctorParameters: function () { return [{ type: ServiceConfig, decorators: [{
|
|
49
|
+
type: Optional
|
|
50
|
+
}] }, { type: i2.HttpClient }]; } });
|
|
3
51
|
|
|
4
52
|
class NgxLibModule {
|
|
53
|
+
constructor(parentModule) {
|
|
54
|
+
if (parentModule) {
|
|
55
|
+
throw new Error('NgxLibModule is already loaded. Import it in the AppModule only');
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
static forRoot(config) {
|
|
59
|
+
return {
|
|
60
|
+
ngModule: NgxLibModule,
|
|
61
|
+
providers: [
|
|
62
|
+
AppPathConfigService,
|
|
63
|
+
{ provide: ServiceConfig, useValue: config }
|
|
64
|
+
]
|
|
65
|
+
};
|
|
66
|
+
}
|
|
5
67
|
}
|
|
6
|
-
NgxLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NgxLibModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
68
|
+
NgxLibModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NgxLibModule, deps: [{ token: NgxLibModule, optional: true, skipSelf: true }], target: i0.ɵɵFactoryTarget.NgModule });
|
|
7
69
|
NgxLibModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.0", ngImport: i0, type: NgxLibModule });
|
|
8
70
|
NgxLibModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NgxLibModule });
|
|
9
71
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImport: i0, type: NgxLibModule, decorators: [{
|
|
@@ -13,7 +75,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
13
75
|
imports: [],
|
|
14
76
|
exports: []
|
|
15
77
|
}]
|
|
16
|
-
}]
|
|
78
|
+
}], ctorParameters: function () { return [{ type: NgxLibModule, decorators: [{
|
|
79
|
+
type: Optional
|
|
80
|
+
}, {
|
|
81
|
+
type: SkipSelf
|
|
82
|
+
}] }]; } });
|
|
17
83
|
|
|
18
84
|
/*
|
|
19
85
|
* Public API Surface of ngx-lib
|
|
@@ -23,5 +89,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.0", ngImpor
|
|
|
23
89
|
* Generated bundle index. Do not edit.
|
|
24
90
|
*/
|
|
25
91
|
|
|
26
|
-
export { NgxLibModule };
|
|
92
|
+
export { AppPathConfigService, NgxLibModule, ServiceConfig };
|
|
27
93
|
//# sourceMappingURL=cleavelandprice-ngx-lib.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cleavelandprice-ngx-lib.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/src/lib/ngx-lib.module.ts","../../../../projects/cleavelandprice/ngx-lib/src/public_api.ts","../../../../projects/cleavelandprice/ngx-lib/src/cleavelandprice-ngx-lib.ts"],"sourcesContent":["import { NgModule } from '@angular/core';\n\n@NgModule({\n declarations: [\n ],\n imports: [\n ],\n exports: [\n ]\n})\nexport class NgxLibModule { }\n","/*\n * Public API Surface of ngx-lib\n */\n\nexport * from './lib/ngx-lib.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"cleavelandprice-ngx-lib.mjs","sources":["../../../../projects/cleavelandprice/ngx-lib/src/lib/model/service-config.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/model/default-config.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/services/app-path-config.service.ts","../../../../projects/cleavelandprice/ngx-lib/src/lib/ngx-lib.module.ts","../../../../projects/cleavelandprice/ngx-lib/src/public_api.ts","../../../../projects/cleavelandprice/ngx-lib/src/cleavelandprice-ngx-lib.ts"],"sourcesContent":["export class ServiceConfig {\r\n apiUrl!: string;\r\n}","import { ServiceConfig } from \"./service-config\";\r\n\r\nexport const defaultConfig: ServiceConfig = {\r\n apiUrl: 'http://utilityapi'\r\n}","import { HttpClient } from '@angular/common/http';\nimport { Injectable, Optional } from '@angular/core';\nimport { Observable } from 'rxjs';\nimport { AppPathConfig } from '../model/app-path-config';\n\nimport { defaultConfig } from '../model/default-config';\nimport { ServiceConfig } from '../model/service-config';\n\n@Injectable({\n providedIn: 'root'\n})\nexport class AppPathConfigService {\n url!: string;\n\n constructor(@Optional() private config: ServiceConfig,\n private http: HttpClient) {\n\n this.config = this.config ?? defaultConfig;\n this.url = `${this.config.apiUrl}/apppathconfigs`\n }\n\n getAll(): Observable<AppPathConfig[]> {\n return this.http.get<AppPathConfig[]>(this.url);\n }\n\n getById(id: number): Observable<AppPathConfig> {\n return this.http.get<AppPathConfig>(`${this.url}/${id}`);\n }\n\n getByAppId(id: number): Observable<AppPathConfig[]> {\n return this.http.get<AppPathConfig[]>(`${this.url}/appid/${id}`);\n }\n\n getByApp(name: string): Observable<AppPathConfig[]> {\n return this.http.get<AppPathConfig[]>(`${this.url}/app/${name}`);\n }\n\n getByAppTypeId(id: number): Observable<AppPathConfig[]> {\n return this.http.get<AppPathConfig[]>(`${this.url}/apptypeid/${id}`);\n }\n\n getByAppType(name: string): Observable<AppPathConfig[]> {\n return this.http.get<AppPathConfig[]>(`${this.url}/apptype/${name}`);\n }\n\n getByAppFunction(name: string): Observable<AppPathConfig[]> {\n return this.http.get<AppPathConfig[]>(`${this.url}/function/${name}`);\n }\n}\n","import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core';\nimport { AppPathConfigService } from '../public_api';\nimport { ServiceConfig } from './model/service-config';\n\n@NgModule({\n declarations: [\n ],\n imports: [\n ],\n exports: [\n ]\n})\nexport class NgxLibModule {\n static forRoot(config: ServiceConfig): ModuleWithProviders<NgxLibModule> {\n return {\n ngModule: NgxLibModule,\n providers: [\n AppPathConfigService,\n { provide: ServiceConfig, useValue: config }\n ]\n };\n }\n\n constructor( @Optional() @SkipSelf() parentModule: NgxLibModule) {\n if (parentModule) {\n throw new Error(\n 'NgxLibModule is already loaded. Import it in the AppModule only');\n }\n }\n}","/*\n * Public API Surface of ngx-lib\n */\n\nexport * from './lib/model/app';\nexport * from './lib/model/app-path-config';\nexport * from './lib/model/app-type';\nexport * from './lib/model/service-config';\n\nexport * from './lib/services/app-path-config.service';\n\nexport * from './lib/ngx-lib.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public_api';\n"],"names":["i1.ServiceConfig"],"mappings":";;;;MAAa,aAAa,CAAA;AAEzB;;ACAM,MAAM,aAAa,GAAkB;AACxC,IAAA,MAAM,EAAE,mBAAmB;CAC9B;;MCOY,oBAAoB,CAAA;IAG/B,WAAgC,CAAA,MAAqB,EACjC,IAAgB,EAAA;QADJ,IAAM,CAAA,MAAA,GAAN,MAAM,CAAe;QACjC,IAAI,CAAA,IAAA,GAAJ,IAAI,CAAY;QAEtB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,MAAM,IAAI,aAAa,CAAC;QAC3C,IAAI,CAAC,GAAG,GAAG,CAAG,EAAA,IAAI,CAAC,MAAM,CAAC,MAAM,CAAA,eAAA,CAAiB,CAAA;KAC9D;IAED,MAAM,GAAA;QACJ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ARxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EACb;AACD,oBAAA,OAAO,EAAE,EACR;AACD,oBAAA,OAAO,EAAE,EACR;AACF,iBAAA,CAAA;0DAYoD,YAAY,EAAA,UAAA,EAAA,CAAA;0BAAjD,QAAQ;;0BAAI,QAAQ;;;ACvBpC;;AAEG;;ACFH;;AAEG;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AppType } from "./app-type";
|
|
2
|
+
export interface App {
|
|
3
|
+
appID: number;
|
|
4
|
+
appName: string;
|
|
5
|
+
appStatus?: number;
|
|
6
|
+
appImage?: string;
|
|
7
|
+
appLocation?: string;
|
|
8
|
+
appDescription?: string;
|
|
9
|
+
defaultAssignee?: number;
|
|
10
|
+
notes?: string;
|
|
11
|
+
url?: string;
|
|
12
|
+
displayInList?: boolean;
|
|
13
|
+
displayname?: string;
|
|
14
|
+
displayInUserSettings?: boolean;
|
|
15
|
+
applicationType?: AppType;
|
|
16
|
+
}
|
package/lib/ngx-lib.module.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { ServiceConfig } from './model/service-config';
|
|
1
3
|
import * as i0 from "@angular/core";
|
|
2
4
|
export declare class NgxLibModule {
|
|
3
|
-
static
|
|
5
|
+
static forRoot(config: ServiceConfig): ModuleWithProviders<NgxLibModule>;
|
|
6
|
+
constructor(parentModule: NgxLibModule);
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<NgxLibModule, [{ optional: true; skipSelf: true; }]>;
|
|
4
8
|
static ɵmod: i0.ɵɵNgModuleDeclaration<NgxLibModule, never, never, never>;
|
|
5
9
|
static ɵinj: i0.ɵɵInjectorDeclaration<NgxLibModule>;
|
|
6
10
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { AppPathConfig } from '../model/app-path-config';
|
|
4
|
+
import { ServiceConfig } from '../model/service-config';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class AppPathConfigService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
url: string;
|
|
10
|
+
constructor(config: ServiceConfig, http: HttpClient);
|
|
11
|
+
getAll(): Observable<AppPathConfig[]>;
|
|
12
|
+
getById(id: number): Observable<AppPathConfig>;
|
|
13
|
+
getByAppId(id: number): Observable<AppPathConfig[]>;
|
|
14
|
+
getByApp(name: string): Observable<AppPathConfig[]>;
|
|
15
|
+
getByAppTypeId(id: number): Observable<AppPathConfig[]>;
|
|
16
|
+
getByAppType(name: string): Observable<AppPathConfig[]>;
|
|
17
|
+
getByAppFunction(name: string): Observable<AppPathConfig[]>;
|
|
18
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AppPathConfigService, [{ optional: true; }, null]>;
|
|
19
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AppPathConfigService>;
|
|
20
|
+
}
|
package/package.json
CHANGED
package/public_api.d.ts
CHANGED