asp-lib 1.1.2 → 1.1.4
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/asp-lib.module.mjs +8 -4
- package/esm2022/lib/company-dropdown/company-dropdown.component.mjs +16 -4
- package/esm2022/lib/header/header.component.mjs +23 -11
- package/esm2022/lib/items-viewer/items-viewer.component.mjs +41 -7
- package/esm2022/lib/nested-items-selector/nested-items-selector.component.mjs +125 -26
- package/esm2022/lib/utils/services/SecurityServicesDefault.mjs +8 -1
- package/esm2022/lib/utils/utils.mjs +10 -1
- package/fesm2022/asp-lib.mjs +215 -39
- package/fesm2022/asp-lib.mjs.map +1 -1
- package/lib/asp-lib.module.d.ts +2 -1
- package/lib/company-dropdown/company-dropdown.component.d.ts +1 -0
- package/lib/header/header.component.d.ts +4 -1
- package/lib/nested-items-selector/nested-items-selector.component.d.ts +16 -2
- package/lib/utils/services/SecurityServicesDefault.d.ts +2 -0
- package/lib/utils/utils.d.ts +1 -0
- package/package.json +1 -1
package/lib/asp-lib.module.d.ts
CHANGED
|
@@ -52,8 +52,9 @@ import * as i50 from "@angular/material/dialog";
|
|
|
52
52
|
import * as i51 from "@angular/material/tree";
|
|
53
53
|
import * as i52 from "@angular/common/http";
|
|
54
54
|
import * as i53 from "@angular/material/tooltip";
|
|
55
|
+
import * as i54 from "@angular/material/select";
|
|
55
56
|
export declare class AspLibModule {
|
|
56
57
|
static ɵfac: i0.ɵɵFactoryDeclaration<AspLibModule, never>;
|
|
57
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<AspLibModule, [typeof i1.AspLibComponent, typeof i2.MenuComponent, typeof i3.ApplicationMenuComponent, typeof i4.DropdownComponent, typeof i5.SecurityAdminComponent, typeof i6.ItemsViewerComponent, typeof i7.InputComponent, typeof i8.SelectComponent, typeof i9.EntityAdminComponent, typeof i10.HeaderComponent, typeof i11.RecentsDropdownComponent, typeof i12.NotificationsComponent, typeof i13.CompanyDropdownComponent, typeof i14.UserDropdownComponent, typeof i15.RadioGroupComponent, typeof i16.BasicItemComponent, typeof i17.RoleCardComponent, typeof i18.ItemsSelectorComponent, typeof i19.CheckboxComponent, typeof i20.CheckboxFieldComponent, typeof i21.FormComponent, typeof i22.ResourceActionsComponent, typeof i23.AssignRolesComponent, typeof i24.RoleInfoComponent, typeof i25.MenuAdminComponent, typeof i26.LoaderComponent, typeof i27.SnackbarComponent, typeof i28.RadioButtonComponent, typeof i29.MenuChildReportComponent, typeof i30.TreeComponent, typeof i31.MultiOptionDialogComponent, typeof i32.MoveMenuOptionComponent, typeof i33.ListComponent, typeof i34.ModulesAdminComponent, typeof i35.Form2Component, typeof i36.NestedItemsSelectorComponent, typeof i37.TranslatePipe, typeof i38.ChangePasswordComponent], [typeof i39.CommonModule, typeof i40.MatRadioModule, typeof i41.FormsModule, typeof i41.ReactiveFormsModule, typeof i42.MatFormFieldModule, typeof i43.MatInputModule, typeof i44.MatPaginatorModule, typeof i45.MatTabsModule, typeof i46.MatMenuModule, typeof i47.MatCheckboxModule, typeof i48.DragDropModule, typeof i49.AngularEditorModule, typeof i50.MatDialogModule, typeof i51.MatTreeModule, typeof i52.HttpClientModule, typeof i53.MatTooltipModule], [typeof i1.AspLibComponent, typeof i2.MenuComponent, typeof i3.ApplicationMenuComponent, typeof i4.DropdownComponent, typeof i5.SecurityAdminComponent, typeof i6.ItemsViewerComponent, typeof i7.InputComponent, typeof i8.SelectComponent, typeof i9.EntityAdminComponent, typeof i10.HeaderComponent, typeof i11.RecentsDropdownComponent, typeof i12.NotificationsComponent, typeof i13.CompanyDropdownComponent, typeof i14.UserDropdownComponent, typeof i15.RadioGroupComponent, typeof i16.BasicItemComponent, typeof i17.RoleCardComponent, typeof i18.ItemsSelectorComponent, typeof i20.CheckboxFieldComponent, typeof i19.CheckboxComponent, typeof i29.MenuChildReportComponent]>;
|
|
58
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<AspLibModule, [typeof i1.AspLibComponent, typeof i2.MenuComponent, typeof i3.ApplicationMenuComponent, typeof i4.DropdownComponent, typeof i5.SecurityAdminComponent, typeof i6.ItemsViewerComponent, typeof i7.InputComponent, typeof i8.SelectComponent, typeof i9.EntityAdminComponent, typeof i10.HeaderComponent, typeof i11.RecentsDropdownComponent, typeof i12.NotificationsComponent, typeof i13.CompanyDropdownComponent, typeof i14.UserDropdownComponent, typeof i15.RadioGroupComponent, typeof i16.BasicItemComponent, typeof i17.RoleCardComponent, typeof i18.ItemsSelectorComponent, typeof i19.CheckboxComponent, typeof i20.CheckboxFieldComponent, typeof i21.FormComponent, typeof i22.ResourceActionsComponent, typeof i23.AssignRolesComponent, typeof i24.RoleInfoComponent, typeof i25.MenuAdminComponent, typeof i26.LoaderComponent, typeof i27.SnackbarComponent, typeof i28.RadioButtonComponent, typeof i29.MenuChildReportComponent, typeof i30.TreeComponent, typeof i31.MultiOptionDialogComponent, typeof i32.MoveMenuOptionComponent, typeof i33.ListComponent, typeof i34.ModulesAdminComponent, typeof i35.Form2Component, typeof i36.NestedItemsSelectorComponent, typeof i37.TranslatePipe, typeof i38.ChangePasswordComponent], [typeof i39.CommonModule, typeof i40.MatRadioModule, typeof i41.FormsModule, typeof i41.ReactiveFormsModule, typeof i42.MatFormFieldModule, typeof i43.MatInputModule, typeof i44.MatPaginatorModule, typeof i45.MatTabsModule, typeof i46.MatMenuModule, typeof i47.MatCheckboxModule, typeof i48.DragDropModule, typeof i49.AngularEditorModule, typeof i50.MatDialogModule, typeof i51.MatTreeModule, typeof i52.HttpClientModule, typeof i53.MatTooltipModule, typeof i54.MatSelectModule], [typeof i1.AspLibComponent, typeof i2.MenuComponent, typeof i3.ApplicationMenuComponent, typeof i4.DropdownComponent, typeof i5.SecurityAdminComponent, typeof i6.ItemsViewerComponent, typeof i7.InputComponent, typeof i8.SelectComponent, typeof i9.EntityAdminComponent, typeof i10.HeaderComponent, typeof i11.RecentsDropdownComponent, typeof i12.NotificationsComponent, typeof i13.CompanyDropdownComponent, typeof i14.UserDropdownComponent, typeof i15.RadioGroupComponent, typeof i16.BasicItemComponent, typeof i17.RoleCardComponent, typeof i18.ItemsSelectorComponent, typeof i20.CheckboxFieldComponent, typeof i19.CheckboxComponent, typeof i29.MenuChildReportComponent]>;
|
|
58
59
|
static ɵinj: i0.ɵɵInjectorDeclaration<AspLibModule>;
|
|
59
60
|
}
|
|
@@ -11,6 +11,7 @@ export declare class CompanyDropdownComponent {
|
|
|
11
11
|
isCompanyOpen: boolean;
|
|
12
12
|
constructor(elementRef: ElementRef);
|
|
13
13
|
onClick(targetElement: HTMLElement): void;
|
|
14
|
+
ngOnInit(): void;
|
|
14
15
|
toggleDropdownHandler(): void;
|
|
15
16
|
selectCompany(option: any): void;
|
|
16
17
|
selectAgency(agency: any, company: any): void;
|
|
@@ -3,6 +3,7 @@ import { ActivatedRoute, Data, Router } from '@angular/router';
|
|
|
3
3
|
import { ServicesConfig } from '../utils/models/ServicesConfig';
|
|
4
4
|
import { SecurityServices } from '../utils/services/SecurityServicesDefault';
|
|
5
5
|
import { Observable } from 'rxjs';
|
|
6
|
+
import { SnackbarService } from '../services/snackbar.service';
|
|
6
7
|
import * as i0 from "@angular/core";
|
|
7
8
|
export interface DropdownOptions {
|
|
8
9
|
id: number;
|
|
@@ -19,6 +20,7 @@ export declare class HeaderComponent {
|
|
|
19
20
|
private router;
|
|
20
21
|
private route;
|
|
21
22
|
private cdr;
|
|
23
|
+
private snackbar;
|
|
22
24
|
appLogo: string;
|
|
23
25
|
theme: string;
|
|
24
26
|
showBackButton: boolean;
|
|
@@ -61,11 +63,12 @@ export declare class HeaderComponent {
|
|
|
61
63
|
currentModuleOption: any;
|
|
62
64
|
selectedOption: any;
|
|
63
65
|
dropdownOptionsMenu: DropdownOptions[];
|
|
64
|
-
constructor(services: SecurityServices, router: Router, route: ActivatedRoute, cdr: ChangeDetectorRef);
|
|
66
|
+
constructor(services: SecurityServices, router: Router, route: ActivatedRoute, cdr: ChangeDetectorRef, snackbar: SnackbarService);
|
|
65
67
|
ngOnInit(): void;
|
|
66
68
|
isAuth(): Observable<boolean>;
|
|
67
69
|
doLogin(): Observable<boolean>;
|
|
68
70
|
handleOptionSelected(option: any): void;
|
|
71
|
+
handleCompanySelected(agency: any): void;
|
|
69
72
|
onItemClick(url: any): void;
|
|
70
73
|
arrowClick($event: MouseEvent): void;
|
|
71
74
|
onItemModuleSelected(event: any): void;
|
|
@@ -23,7 +23,7 @@ export declare class NestedItemsSelectorComponent implements OnChanges, OnInit {
|
|
|
23
23
|
selectedItemSubject: Subject<any>;
|
|
24
24
|
selectionIds: Set<number | string>;
|
|
25
25
|
secondSelection: {
|
|
26
|
-
[id: number]: Set<
|
|
26
|
+
[id: number]: Set<any>;
|
|
27
27
|
};
|
|
28
28
|
loadingSecondItems: boolean;
|
|
29
29
|
loadedItems: any[];
|
|
@@ -43,8 +43,9 @@ export declare class NestedItemsSelectorComponent implements OnChanges, OnInit {
|
|
|
43
43
|
id: number;
|
|
44
44
|
checked: boolean;
|
|
45
45
|
}): void;
|
|
46
|
-
toggleSecondItem({ id, checked }: {
|
|
46
|
+
toggleSecondItem({ id, companyName, checked }: {
|
|
47
47
|
id: number;
|
|
48
|
+
companyName: string;
|
|
48
49
|
checked: boolean;
|
|
49
50
|
}): void;
|
|
50
51
|
selectSecondItem(item: any): void;
|
|
@@ -52,6 +53,19 @@ export declare class NestedItemsSelectorComponent implements OnChanges, OnInit {
|
|
|
52
53
|
selectItem(item: any): void;
|
|
53
54
|
loadItems(newItems: any): void;
|
|
54
55
|
save(): void;
|
|
56
|
+
getSelectedSecondaryItemsList(): any[];
|
|
57
|
+
/**inSecondSelection(item: any) {
|
|
58
|
+
return Object.entries(this.secondSelection).some(([mainId, set]) => {
|
|
59
|
+
const secundarios = this.loadedSecondItemsById[Number(mainId)] ?? [];
|
|
60
|
+
const exists = [...set].some(obj => obj.agencyCode === item.id);
|
|
61
|
+
return exists
|
|
62
|
+
&& secundarios.some(sec => sec.id === item.id && sec.companyName === item.companyName)
|
|
63
|
+
&& item.companyName === this.selectedItem.customerCode;
|
|
64
|
+
});
|
|
65
|
+
} */
|
|
66
|
+
getDefaultAgencyKey(): string | null;
|
|
67
|
+
onDefaultAgencyChange(value: string): void;
|
|
68
|
+
setDefaultAgency(selectedId: string, selectedCompanyName: string): void;
|
|
55
69
|
static ɵfac: i0.ɵɵFactoryDeclaration<NestedItemsSelectorComponent, never>;
|
|
56
70
|
static ɵcmp: i0.ɵɵComponentDeclaration<NestedItemsSelectorComponent, "lib-nested-items-selector", never, { "theme": { "alias": "theme"; "required": false; }; "listTitle": { "alias": "listTitle"; "required": false; }; "secondListTitle": { "alias": "secondListTitle"; "required": false; }; "selectionTitle": { "alias": "selectionTitle"; "required": false; }; "listEndpoint": { "alias": "listEndpoint"; "required": false; }; "secondListEndpoint": { "alias": "secondListEndpoint"; "required": false; }; "selectionEndpoint": { "alias": "selectionEndpoint"; "required": false; }; "secondSelectionEndpoint": { "alias": "secondSelectionEndpoint"; "required": false; }; "reloadSelectionSubject": { "alias": "reloadSelectionSubject"; "required": false; }; "hidden": { "alias": "hidden"; "required": false; }; }, { "saveClick": "saveClick"; }, never, never, false, never>;
|
|
57
71
|
}
|
|
@@ -15,6 +15,7 @@ export declare class SecurityServices {
|
|
|
15
15
|
static readonly VERIFY_RESOURCES_BY_USERROLE = "/security/secure/validateresourcesbyRole";
|
|
16
16
|
static readonly CHANGE_PASSWORD = "/security/secure/changePassword";
|
|
17
17
|
static readonly GET_AUTH_CODE = "/security/secure/getauthcode";
|
|
18
|
+
static readonly SET_DEFAULT_AGENCY = "/security/secure/setdefault";
|
|
18
19
|
constructor(http: HttpClient);
|
|
19
20
|
getHistory(baseUrl: string): Observable<Object>;
|
|
20
21
|
getModules(baseUrl: string): Observable<Object>;
|
|
@@ -26,6 +27,7 @@ export declare class SecurityServices {
|
|
|
26
27
|
login(baseUrl: string, username: string, password: string): Observable<Object>;
|
|
27
28
|
logOut(baseUrl: string): Observable<Object>;
|
|
28
29
|
saveHistory(baseUrl: string, option: any): Observable<Object>;
|
|
30
|
+
setDefaultAgency(baseUrl: string, agencyId: any): Observable<Object>;
|
|
29
31
|
changePassword(baseUrl: string, cp: any): Observable<Object>;
|
|
30
32
|
getAuthCode(baseUrl: string): Observable<Object>;
|
|
31
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<SecurityServices, never>;
|
package/lib/utils/utils.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export declare const defaultMapper: (x: any) => any;
|
|
2
2
|
export declare function removeArrayDuplicates(arr: any[]): any;
|
|
3
|
+
export declare function removeArrayDuplicatesByIdAndCompany(arr: any[]): any;
|
|
3
4
|
export declare const defaultSwitchMapper: (x: any) => import("rxjs").Observable<any>;
|