spiderly 19.7.2 → 19.7.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/fesm2022/spiderly.mjs +66 -111
- package/fesm2022/spiderly.mjs.map +1 -1
- package/lib/components/layout/profile-avatar/profile-avatar.component.d.ts +0 -3
- package/lib/components/spiderly-data-table/spiderly-data-table.component.d.ts +4 -2
- package/lib/components/spiderly-delete-dialog/spiderly-delete-confirmation.component.d.ts +12 -2
- package/lib/controls/spiderly-file/spiderly-file.component.d.ts +8 -3
- package/lib/entities/init-top-bar-data.d.ts +1 -3
- package/lib/errors/api-error-codes.d.ts +12 -0
- package/lib/services/api.service.security.d.ts +0 -1
- package/lib/services/app-layout.service.base.d.ts +1 -6
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -24,10 +24,8 @@ export declare class ProfileAvatarComponent {
|
|
|
24
24
|
private initTopBarSubscription;
|
|
25
25
|
currentUser: UserBase;
|
|
26
26
|
userProfilePath: string;
|
|
27
|
-
unreadNotificationsCount: number;
|
|
28
27
|
avatarLabel: string;
|
|
29
28
|
showProfileIcon: boolean;
|
|
30
|
-
notificationMenuItem: ProfileAvatarModalMenuItem;
|
|
31
29
|
menu: ElementRef;
|
|
32
30
|
topbarProfileDropdownMenuButton: ElementRef;
|
|
33
31
|
constructor(layoutService: LayoutServiceBase, authService: AuthServiceBase, router: Router, translocoService: TranslocoService, config: ConfigServiceBase);
|
|
@@ -45,5 +43,4 @@ export interface ProfileAvatarModalMenuItem {
|
|
|
45
43
|
icon?: string;
|
|
46
44
|
showSeparator?: boolean;
|
|
47
45
|
onClick?: () => void;
|
|
48
|
-
showNotificationBadge?: boolean;
|
|
49
46
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AfterViewInit, EventEmitter, OnInit } from '@angular/core';
|
|
1
|
+
import { AfterViewInit, EventEmitter, OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
3
3
|
import { TranslocoService } from '@jsverse/transloco';
|
|
4
4
|
import { SelectItem } from 'primeng/api';
|
|
@@ -13,7 +13,7 @@ import { ConfigServiceBase } from '../../services/config.service.base';
|
|
|
13
13
|
import { SpiderlyMessageService } from '../../services/spiderly-message.service';
|
|
14
14
|
import { SpiderlyFormControl } from '../spiderly-form-control/spiderly-form-control';
|
|
15
15
|
import * as i0 from "@angular/core";
|
|
16
|
-
export declare class SpiderlyDataTableComponent implements OnInit, AfterViewInit {
|
|
16
|
+
export declare class SpiderlyDataTableComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
17
17
|
private router;
|
|
18
18
|
private dialogService;
|
|
19
19
|
private route;
|
|
@@ -21,6 +21,7 @@ export declare class SpiderlyDataTableComponent implements OnInit, AfterViewInit
|
|
|
21
21
|
private translocoService;
|
|
22
22
|
private configService;
|
|
23
23
|
private locale;
|
|
24
|
+
private readonly destroy$;
|
|
24
25
|
table: Table;
|
|
25
26
|
tableTitle: string;
|
|
26
27
|
tableIcon: string;
|
|
@@ -98,6 +99,7 @@ export declare class SpiderlyDataTableComponent implements OnInit, AfterViewInit
|
|
|
98
99
|
deleteObject(rowId: number): void;
|
|
99
100
|
deleteSelectedObjects(): void;
|
|
100
101
|
private openDeleteConfirmation;
|
|
102
|
+
ngOnDestroy(): void;
|
|
101
103
|
get showSelectAllCheckbox(): boolean;
|
|
102
104
|
private resetSelection;
|
|
103
105
|
reload(): void;
|
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
import { DynamicDialogConfig, DynamicDialogRef } from 'primeng/dynamicdialog';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
2
3
|
import * as i0 from "@angular/core";
|
|
4
|
+
export type DeleteConfirmationData = {
|
|
5
|
+
message: string;
|
|
6
|
+
deleteItemFromTableObservableMethod: (id: number) => Observable<any>;
|
|
7
|
+
id: number;
|
|
8
|
+
} | {
|
|
9
|
+
message: string;
|
|
10
|
+
deleteListFromTableObservableMethod: (ids: number[]) => Observable<any>;
|
|
11
|
+
ids: number[];
|
|
12
|
+
};
|
|
3
13
|
export declare class SpiderlyDeleteConfirmationComponent {
|
|
4
14
|
ref: DynamicDialogRef;
|
|
5
|
-
config: DynamicDialogConfig
|
|
6
|
-
constructor(ref: DynamicDialogRef, config: DynamicDialogConfig);
|
|
15
|
+
config: DynamicDialogConfig<DeleteConfirmationData>;
|
|
16
|
+
constructor(ref: DynamicDialogRef, config: DynamicDialogConfig<DeleteConfirmationData>);
|
|
7
17
|
accept(): void;
|
|
8
18
|
reject(): void;
|
|
9
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyDeleteConfirmationComponent, never>;
|
|
@@ -17,11 +17,14 @@ export declare class SpiderlyFileComponent extends BaseControl implements OnInit
|
|
|
17
17
|
acceptedFileTypes: Array<'image/*' | 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif' | 'image/avif' | 'image/svg+xml' | '.png' | '.jpg' | '.jpeg' | '.webp' | '.gif' | '.avif' | '.svg' | 'application/pdf' | '.pdf' | 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' | 'application/vnd.ms-excel' | '.xlsx' | '.xls' | 'video/*' | 'video/mp4' | '.mp4' | 'audio/*' | 'audio/mpeg' | '.mp3' | 'application/zip' | '.zip' | 'text/csv' | '.csv'>;
|
|
18
18
|
required: boolean;
|
|
19
19
|
multiple: boolean;
|
|
20
|
-
|
|
20
|
+
isUrlFileData: boolean;
|
|
21
21
|
imageWidth: number;
|
|
22
22
|
imageHeight: number;
|
|
23
23
|
maxFileSize: number;
|
|
24
24
|
acceptedFileTypesCommaSeparated: string;
|
|
25
|
+
existingFileUrl: string | null;
|
|
26
|
+
existingFileIsImage: boolean;
|
|
27
|
+
existingFileName: string;
|
|
25
28
|
files: File[];
|
|
26
29
|
constructor(translocoService: TranslocoService, messageService: SpiderlyMessageService, validatorService: ValidatorAbstractService);
|
|
27
30
|
ngOnInit(): void;
|
|
@@ -30,12 +33,14 @@ export declare class SpiderlyFileComponent extends BaseControl implements OnInit
|
|
|
30
33
|
private hasImageDimensionConstraints;
|
|
31
34
|
choose(event: any, chooseCallback: any): void;
|
|
32
35
|
fileRemoved(removeFileCallback: any, index: number): void;
|
|
33
|
-
|
|
36
|
+
removeExistingFile(): void;
|
|
37
|
+
private clearFile;
|
|
38
|
+
private setExistingFileUrl;
|
|
34
39
|
getFileFromBase64(base64String: string): File;
|
|
35
40
|
isFileImageType(mimeType: string): boolean;
|
|
36
41
|
isExcelFileType(mimeType: string): boolean;
|
|
37
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<SpiderlyFileComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyFileComponent, "spiderly-file", never, { "objectId": { "alias": "objectId"; "required": false; }; "fileData": { "alias": "fileData"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SpiderlyFileComponent, "spiderly-file", never, { "objectId": { "alias": "objectId"; "required": false; }; "fileData": { "alias": "fileData"; "required": false; }; "acceptedFileTypes": { "alias": "acceptedFileTypes"; "required": false; }; "required": { "alias": "required"; "required": false; }; "multiple": { "alias": "multiple"; "required": false; }; "isUrlFileData": { "alias": "isUrlFileData"; "required": false; }; "imageWidth": { "alias": "imageWidth"; "required": false; }; "imageHeight": { "alias": "imageHeight"; "required": false; }; "maxFileSize": { "alias": "maxFileSize"; "required": false; }; "files": { "alias": "files"; "required": false; }; }, { "onFileSelected": "onFileSelected"; "onFileRemoved": "onFileRemoved"; }, never, never, true, never>;
|
|
39
44
|
}
|
|
40
45
|
export declare class SpiderlyFileSelectEvent extends BaseEntity {
|
|
41
46
|
file?: File;
|
|
@@ -3,13 +3,11 @@ import { UserBase } from './security-entities';
|
|
|
3
3
|
export declare class InitTopBarData extends BaseEntity {
|
|
4
4
|
companyName?: string;
|
|
5
5
|
userProfilePath?: string;
|
|
6
|
-
unreadNotificationsCount?: number;
|
|
7
6
|
showProfileIcon?: boolean;
|
|
8
7
|
currentUser?: UserBase;
|
|
9
|
-
constructor({ companyName, userProfilePath,
|
|
8
|
+
constructor({ companyName, userProfilePath, showProfileIcon, currentUser, }?: {
|
|
10
9
|
companyName?: string;
|
|
11
10
|
userProfilePath?: string;
|
|
12
|
-
unreadNotificationsCount?: number;
|
|
13
11
|
showProfileIcon?: boolean;
|
|
14
12
|
currentUser?: UserBase;
|
|
15
13
|
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Machine-readable error codes returned in `ApiErrorDTO.errorCode`.
|
|
3
|
+
* Mirror of Spiderly.Shared.DTO.ApiErrorCodes — keep in sync.
|
|
4
|
+
*/
|
|
5
|
+
export declare const ApiErrorCodes: {
|
|
6
|
+
readonly InvalidToken: "invalid_token";
|
|
7
|
+
readonly ValidationFailed: "validation_failed";
|
|
8
|
+
readonly UniqueViolation: "unique_violation";
|
|
9
|
+
readonly ForeignKeyViolation: "foreign_key_violation";
|
|
10
|
+
readonly ConcurrencyConflict: "concurrency_conflict";
|
|
11
|
+
};
|
|
12
|
+
export type ApiErrorCode = (typeof ApiErrorCodes)[keyof typeof ApiErrorCodes];
|
|
@@ -18,7 +18,6 @@ export declare class ApiSecurityService {
|
|
|
18
18
|
refreshTokenWithCookies: (browserId: string) => Observable<AuthResultWithCookies>;
|
|
19
19
|
getCurrentUserBase: () => Observable<UserBase>;
|
|
20
20
|
getCurrentUserPermissionCodes: () => Observable<string[]>;
|
|
21
|
-
getUnreadNotificationsCountForCurrentUser: () => Observable<number>;
|
|
22
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<ApiSecurityService, never>;
|
|
23
22
|
static ɵprov: i0.ɵɵInjectableDeclaration<ApiSecurityService>;
|
|
24
23
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AuthServiceBase } from './auth.service.base';
|
|
2
2
|
import { ApiSecurityService } from './api.service.security';
|
|
3
3
|
import { OnDestroy } from '@angular/core';
|
|
4
|
-
import {
|
|
4
|
+
import { Observable, Subscription } from 'rxjs';
|
|
5
5
|
import { InitTopBarData } from '../entities/init-top-bar-data';
|
|
6
6
|
import { ConfigServiceBase } from './config.service.base';
|
|
7
7
|
import { AutoCompleteCompleteEvent } from 'primeng/autocomplete';
|
|
@@ -30,8 +30,6 @@ export declare class LayoutServiceBase implements OnDestroy {
|
|
|
30
30
|
protected config: ConfigServiceBase;
|
|
31
31
|
protected authService: AuthServiceBase;
|
|
32
32
|
userSubscription: Subscription;
|
|
33
|
-
protected _unreadNotificationsNumber: BehaviorSubject<number>;
|
|
34
|
-
unreadNotificationsCount$: Observable<number>;
|
|
35
33
|
layoutConfig: AppConfig;
|
|
36
34
|
state: LayoutState;
|
|
37
35
|
private configUpdate;
|
|
@@ -39,9 +37,6 @@ export declare class LayoutServiceBase implements OnDestroy {
|
|
|
39
37
|
configUpdate$: Observable<AppConfig>;
|
|
40
38
|
overlayOpen$: Observable<any>;
|
|
41
39
|
constructor(apiService: ApiSecurityService, config: ConfigServiceBase, authService: AuthServiceBase);
|
|
42
|
-
initUnreadNotificationsCountForCurrentUser: () => void;
|
|
43
|
-
initUnreadNotificationsCountForCurrentUserObservable: () => Observable<any>;
|
|
44
|
-
setUnreadNotificationsCountForCurrentUser: () => Observable<any>;
|
|
45
40
|
onMenuToggle(): void;
|
|
46
41
|
showProfileSidebar(): void;
|
|
47
42
|
showProfileDropdownSidebar(): void;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED