@flusys/ng-shared 4.1.1 → 5.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/README.md +75 -444
- package/fesm2022/flusys-ng-shared.mjs +2199 -2424
- package/fesm2022/flusys-ng-shared.mjs.map +1 -1
- package/package.json +2 -2
- package/types/flusys-ng-shared.d.ts +200 -467
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as rxjs from 'rxjs';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
import * as _angular_core from '@angular/core';
|
|
4
|
-
import { Signal, PipeTransform,
|
|
4
|
+
import { Signal, PipeTransform, ResourceRef, ResourceStatus, Injector, model, OnDestroy, ElementRef, TemplateRef, DestroyRef, InjectionToken } from '@angular/core';
|
|
5
5
|
import * as i3 from '@angular/router';
|
|
6
6
|
import { ResolveFn, CanActivateFn, Router, ActivatedRoute } from '@angular/router';
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
@@ -54,6 +54,8 @@ import { FormValueControl } from '@angular/forms/signals';
|
|
|
54
54
|
import * as _flusys_ng_core from '@flusys/ng-core';
|
|
55
55
|
import { MessageService, ConfirmationService } from 'primeng/api';
|
|
56
56
|
|
|
57
|
+
declare const SHARED_MESSAGES: Record<string, string>;
|
|
58
|
+
|
|
57
59
|
declare const USER_PERMISSIONS: {
|
|
58
60
|
readonly CREATE: "user.create";
|
|
59
61
|
readonly READ: "user.read";
|
|
@@ -172,129 +174,6 @@ declare const TRANSLATION_PERMISSIONS: {
|
|
|
172
174
|
readonly UPDATE: "translation.update";
|
|
173
175
|
readonly DELETE: "translation.delete";
|
|
174
176
|
};
|
|
175
|
-
declare const PERMISSIONS: {
|
|
176
|
-
readonly USER: {
|
|
177
|
-
readonly CREATE: "user.create";
|
|
178
|
-
readonly READ: "user.read";
|
|
179
|
-
readonly UPDATE: "user.update";
|
|
180
|
-
readonly DELETE: "user.delete";
|
|
181
|
-
};
|
|
182
|
-
readonly COMPANY: {
|
|
183
|
-
readonly CREATE: "company.create";
|
|
184
|
-
readonly READ: "company.read";
|
|
185
|
-
readonly UPDATE: "company.update";
|
|
186
|
-
readonly DELETE: "company.delete";
|
|
187
|
-
};
|
|
188
|
-
readonly BRANCH: {
|
|
189
|
-
readonly CREATE: "branch.create";
|
|
190
|
-
readonly READ: "branch.read";
|
|
191
|
-
readonly UPDATE: "branch.update";
|
|
192
|
-
readonly DELETE: "branch.delete";
|
|
193
|
-
};
|
|
194
|
-
readonly ACTION: {
|
|
195
|
-
readonly CREATE: "action.create";
|
|
196
|
-
readonly READ: "action.read";
|
|
197
|
-
readonly UPDATE: "action.update";
|
|
198
|
-
readonly DELETE: "action.delete";
|
|
199
|
-
};
|
|
200
|
-
readonly ROLE: {
|
|
201
|
-
readonly CREATE: "role.create";
|
|
202
|
-
readonly READ: "role.read";
|
|
203
|
-
readonly UPDATE: "role.update";
|
|
204
|
-
readonly DELETE: "role.delete";
|
|
205
|
-
};
|
|
206
|
-
readonly ROLE_ACTION: {
|
|
207
|
-
readonly READ: "role-action.read";
|
|
208
|
-
readonly ASSIGN: "role-action.assign";
|
|
209
|
-
};
|
|
210
|
-
readonly USER_ROLE: {
|
|
211
|
-
readonly READ: "user-role.read";
|
|
212
|
-
readonly ASSIGN: "user-role.assign";
|
|
213
|
-
};
|
|
214
|
-
readonly USER_ACTION: {
|
|
215
|
-
readonly READ: "user-action.read";
|
|
216
|
-
readonly ASSIGN: "user-action.assign";
|
|
217
|
-
};
|
|
218
|
-
readonly COMPANY_ACTION: {
|
|
219
|
-
readonly READ: "company-action.read";
|
|
220
|
-
readonly ASSIGN: "company-action.assign";
|
|
221
|
-
};
|
|
222
|
-
readonly FILE: {
|
|
223
|
-
readonly CREATE: "file.create";
|
|
224
|
-
readonly READ: "file.read";
|
|
225
|
-
readonly UPDATE: "file.update";
|
|
226
|
-
readonly DELETE: "file.delete";
|
|
227
|
-
};
|
|
228
|
-
readonly FOLDER: {
|
|
229
|
-
readonly CREATE: "folder.create";
|
|
230
|
-
readonly READ: "folder.read";
|
|
231
|
-
readonly UPDATE: "folder.update";
|
|
232
|
-
readonly DELETE: "folder.delete";
|
|
233
|
-
};
|
|
234
|
-
readonly STORAGE_CONFIG: {
|
|
235
|
-
readonly CREATE: "storage-config.create";
|
|
236
|
-
readonly READ: "storage-config.read";
|
|
237
|
-
readonly UPDATE: "storage-config.update";
|
|
238
|
-
readonly DELETE: "storage-config.delete";
|
|
239
|
-
};
|
|
240
|
-
readonly EMAIL_CONFIG: {
|
|
241
|
-
readonly CREATE: "email-config.create";
|
|
242
|
-
readonly READ: "email-config.read";
|
|
243
|
-
readonly UPDATE: "email-config.update";
|
|
244
|
-
readonly DELETE: "email-config.delete";
|
|
245
|
-
};
|
|
246
|
-
readonly EMAIL_TEMPLATE: {
|
|
247
|
-
readonly CREATE: "email-template.create";
|
|
248
|
-
readonly READ: "email-template.read";
|
|
249
|
-
readonly UPDATE: "email-template.update";
|
|
250
|
-
readonly DELETE: "email-template.delete";
|
|
251
|
-
};
|
|
252
|
-
readonly FORM: {
|
|
253
|
-
readonly CREATE: "form.create";
|
|
254
|
-
readonly READ: "form.read";
|
|
255
|
-
readonly UPDATE: "form.update";
|
|
256
|
-
readonly DELETE: "form.delete";
|
|
257
|
-
};
|
|
258
|
-
readonly EVENT: {
|
|
259
|
-
readonly CREATE: "event.create";
|
|
260
|
-
readonly READ: "event.read";
|
|
261
|
-
readonly UPDATE: "event.update";
|
|
262
|
-
readonly DELETE: "event.delete";
|
|
263
|
-
};
|
|
264
|
-
readonly EVENT_PARTICIPANT: {
|
|
265
|
-
readonly CREATE: "event-participant.create";
|
|
266
|
-
readonly READ: "event-participant.read";
|
|
267
|
-
readonly UPDATE: "event-participant.update";
|
|
268
|
-
readonly DELETE: "event-participant.delete";
|
|
269
|
-
};
|
|
270
|
-
readonly NOTIFICATION: {
|
|
271
|
-
readonly CREATE: "notification.create";
|
|
272
|
-
readonly READ: "notification.read";
|
|
273
|
-
readonly UPDATE: "notification.update";
|
|
274
|
-
readonly DELETE: "notification.delete";
|
|
275
|
-
};
|
|
276
|
-
readonly LANGUAGE: {
|
|
277
|
-
readonly CREATE: "language.create";
|
|
278
|
-
readonly READ: "language.read";
|
|
279
|
-
readonly UPDATE: "language.update";
|
|
280
|
-
readonly DELETE: "language.delete";
|
|
281
|
-
};
|
|
282
|
-
readonly TRANSLATION_KEY: {
|
|
283
|
-
readonly CREATE: "translation-key.create";
|
|
284
|
-
readonly READ: "translation-key.read";
|
|
285
|
-
readonly UPDATE: "translation-key.update";
|
|
286
|
-
readonly DELETE: "translation-key.delete";
|
|
287
|
-
};
|
|
288
|
-
readonly TRANSLATION: {
|
|
289
|
-
readonly CREATE: "translation.create";
|
|
290
|
-
readonly READ: "translation.read";
|
|
291
|
-
readonly UPDATE: "translation.update";
|
|
292
|
-
readonly DELETE: "translation.delete";
|
|
293
|
-
};
|
|
294
|
-
};
|
|
295
|
-
type PermissionCode = (typeof PERMISSIONS)[keyof typeof PERMISSIONS][keyof (typeof PERMISSIONS)[keyof typeof PERMISSIONS]];
|
|
296
|
-
|
|
297
|
-
declare const SHARED_MESSAGES: Record<string, string>;
|
|
298
177
|
|
|
299
178
|
/**
|
|
300
179
|
* Base entity interface - matches backend Identity entity
|
|
@@ -333,12 +212,6 @@ interface IActivatable {
|
|
|
333
212
|
interface IOrderable {
|
|
334
213
|
serial?: number | null;
|
|
335
214
|
}
|
|
336
|
-
/**
|
|
337
|
-
* Entity with metadata JSON field
|
|
338
|
-
*/
|
|
339
|
-
interface IMetadata {
|
|
340
|
-
metadata?: Record<string, unknown> | null;
|
|
341
|
-
}
|
|
342
215
|
/**
|
|
343
216
|
* Logged-in user info - matches backend ILoggedUserInfo
|
|
344
217
|
*/
|
|
@@ -390,21 +263,6 @@ interface IGroupNode {
|
|
|
390
263
|
/** Permission logic tree (discriminated union of action/group) */
|
|
391
264
|
type ILogicNode = IActionNode | IGroupNode;
|
|
392
265
|
|
|
393
|
-
interface IPagination {
|
|
394
|
-
pageSize: number;
|
|
395
|
-
currentPage: number;
|
|
396
|
-
}
|
|
397
|
-
type ISort = Record<string, 'ASC' | 'DESC'>;
|
|
398
|
-
type IFilter = Record<string, string | number | boolean | null | undefined | string[] | number[]>;
|
|
399
|
-
interface IFilterData {
|
|
400
|
-
filter?: IFilter;
|
|
401
|
-
pagination?: IPagination;
|
|
402
|
-
select?: string[];
|
|
403
|
-
sort?: ISort;
|
|
404
|
-
withDeleted?: boolean;
|
|
405
|
-
extraKey?: string[];
|
|
406
|
-
}
|
|
407
|
-
|
|
408
266
|
/**
|
|
409
267
|
* Request metadata added by backend ResponseMetaInterceptor
|
|
410
268
|
*/
|
|
@@ -447,7 +305,7 @@ interface ISingleResponse<T> {
|
|
|
447
305
|
success: boolean;
|
|
448
306
|
message: string;
|
|
449
307
|
messageKey?: string;
|
|
450
|
-
|
|
308
|
+
messageVariables?: Record<string, unknown>;
|
|
451
309
|
data?: T;
|
|
452
310
|
_meta?: IRequestMeta;
|
|
453
311
|
}
|
|
@@ -458,7 +316,7 @@ interface IListResponse<T> {
|
|
|
458
316
|
success: boolean;
|
|
459
317
|
message: string;
|
|
460
318
|
messageKey?: string;
|
|
461
|
-
|
|
319
|
+
messageVariables?: Record<string, unknown>;
|
|
462
320
|
data?: T[];
|
|
463
321
|
meta: IPaginationMeta;
|
|
464
322
|
_meta?: IRequestMeta;
|
|
@@ -470,7 +328,7 @@ interface IBulkResponse<T> {
|
|
|
470
328
|
success: boolean;
|
|
471
329
|
message: string;
|
|
472
330
|
messageKey?: string;
|
|
473
|
-
|
|
331
|
+
messageVariables?: Record<string, unknown>;
|
|
474
332
|
data?: T[];
|
|
475
333
|
meta: IBulkMeta;
|
|
476
334
|
_meta?: IRequestMeta;
|
|
@@ -482,7 +340,7 @@ interface IMessageResponse {
|
|
|
482
340
|
success: boolean;
|
|
483
341
|
message: string;
|
|
484
342
|
messageKey?: string;
|
|
485
|
-
|
|
343
|
+
messageVariables?: Record<string, unknown>;
|
|
486
344
|
_meta?: IRequestMeta;
|
|
487
345
|
}
|
|
488
346
|
/**
|
|
@@ -492,7 +350,7 @@ interface IErrorResponse {
|
|
|
492
350
|
success: false;
|
|
493
351
|
message: string;
|
|
494
352
|
messageKey?: string;
|
|
495
|
-
|
|
353
|
+
messageVariables?: Record<string, unknown>;
|
|
496
354
|
errors?: IValidationError[];
|
|
497
355
|
_meta?: IRequestMeta;
|
|
498
356
|
}
|
|
@@ -500,48 +358,6 @@ interface IErrorResponse {
|
|
|
500
358
|
* Union type for all API responses
|
|
501
359
|
*/
|
|
502
360
|
type ApiResponse<T> = ISingleResponse<T> | IListResponse<T> | IBulkResponse<T> | IMessageResponse | IErrorResponse;
|
|
503
|
-
interface IUserCompanyPayload {
|
|
504
|
-
id: string;
|
|
505
|
-
name: string;
|
|
506
|
-
slug: string;
|
|
507
|
-
logoId?: string;
|
|
508
|
-
}
|
|
509
|
-
interface IUserBranchPayload {
|
|
510
|
-
id: string;
|
|
511
|
-
name: string;
|
|
512
|
-
slug: string;
|
|
513
|
-
logoId?: string;
|
|
514
|
-
}
|
|
515
|
-
interface ILoginUserData {
|
|
516
|
-
id: string;
|
|
517
|
-
name: string;
|
|
518
|
-
email: string;
|
|
519
|
-
phone?: string;
|
|
520
|
-
profilePictureId?: string | null;
|
|
521
|
-
companyId?: string;
|
|
522
|
-
branchId?: string;
|
|
523
|
-
company?: IUserCompanyPayload;
|
|
524
|
-
branch?: IUserBranchPayload;
|
|
525
|
-
}
|
|
526
|
-
interface ILoginResponse {
|
|
527
|
-
success: boolean;
|
|
528
|
-
message: string;
|
|
529
|
-
data: {
|
|
530
|
-
accessToken: string;
|
|
531
|
-
refreshToken: string;
|
|
532
|
-
user: ILoginUserData;
|
|
533
|
-
};
|
|
534
|
-
_meta?: IRequestMeta;
|
|
535
|
-
}
|
|
536
|
-
interface IRefreshTokenResponse {
|
|
537
|
-
success: boolean;
|
|
538
|
-
message: string;
|
|
539
|
-
data: {
|
|
540
|
-
accessToken: string;
|
|
541
|
-
refreshToken?: string;
|
|
542
|
-
};
|
|
543
|
-
_meta?: IRequestMeta;
|
|
544
|
-
}
|
|
545
361
|
interface IFileData {
|
|
546
362
|
id: string;
|
|
547
363
|
name: string;
|
|
@@ -613,6 +429,21 @@ declare function isFileTypeAllowed(file: File, allowedTypes: string[]): boolean;
|
|
|
613
429
|
declare function getFileIconClass(contentType: string): string;
|
|
614
430
|
declare function formatFileSize(sizeInKb: string | number): string;
|
|
615
431
|
|
|
432
|
+
interface IPagination {
|
|
433
|
+
pageSize: number;
|
|
434
|
+
currentPage: number;
|
|
435
|
+
}
|
|
436
|
+
type ISort = Record<string, 'ASC' | 'DESC'>;
|
|
437
|
+
type IFilter = Record<string, string | number | boolean | null | undefined | string[] | number[]>;
|
|
438
|
+
interface IFilterData {
|
|
439
|
+
filter?: IFilter;
|
|
440
|
+
pagination?: IPagination;
|
|
441
|
+
select?: string[];
|
|
442
|
+
sort?: ISort;
|
|
443
|
+
withDeleted?: boolean;
|
|
444
|
+
extraKey?: string[];
|
|
445
|
+
}
|
|
446
|
+
|
|
616
447
|
/**
|
|
617
448
|
* Auth State Provider Interface
|
|
618
449
|
*
|
|
@@ -788,11 +619,6 @@ interface IFileProvider {
|
|
|
788
619
|
loadStorageConfigs?(filter: ISelectFilter): Observable<IListResponse<IStorageConfigBasicInfo>>;
|
|
789
620
|
}
|
|
790
621
|
|
|
791
|
-
declare enum ContactTypeEnum {
|
|
792
|
-
PHONE = 1,
|
|
793
|
-
EMAIL = 2
|
|
794
|
-
}
|
|
795
|
-
|
|
796
622
|
declare enum IconTypeEnum {
|
|
797
623
|
PRIMENG_ICON = 1,
|
|
798
624
|
IMAGE_FILE_LINK = 2,
|
|
@@ -856,7 +682,6 @@ declare class PermissionValidatorService {
|
|
|
856
682
|
clearPermissions(): void;
|
|
857
683
|
/** Check if user has permission (supports wildcards: '*', 'module.*') */
|
|
858
684
|
hasPermission(code: string): boolean;
|
|
859
|
-
/** @deprecated Use `isLoaded()` signal instead */
|
|
860
685
|
isPermissionsLoaded(): boolean;
|
|
861
686
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<PermissionValidatorService, never>;
|
|
862
687
|
static ɵprov: _angular_core.ɵɵInjectableDeclaration<PermissionValidatorService>;
|
|
@@ -907,20 +732,18 @@ declare class EditModeElementChangerDirective {
|
|
|
907
732
|
* @example
|
|
908
733
|
* // In component
|
|
909
734
|
* readonly userManageLogic: ILogicNode = {
|
|
910
|
-
* id: 'root',
|
|
911
735
|
* type: 'group',
|
|
912
736
|
* operator: 'AND',
|
|
913
737
|
* children: [
|
|
914
738
|
* {
|
|
915
|
-
* id: '1',
|
|
916
739
|
* type: 'group',
|
|
917
740
|
* operator: 'OR',
|
|
918
741
|
* children: [
|
|
919
|
-
* {
|
|
920
|
-
* {
|
|
742
|
+
* { type: 'action', actionId: 'user.view' },
|
|
743
|
+
* { type: 'action', actionId: 'user.create' }
|
|
921
744
|
* ]
|
|
922
745
|
* },
|
|
923
|
-
* {
|
|
746
|
+
* { type: 'action', actionId: 'department.manage' }
|
|
924
747
|
* ]
|
|
925
748
|
* };
|
|
926
749
|
*
|
|
@@ -982,7 +805,7 @@ declare class PreventDefaultDirective {
|
|
|
982
805
|
declare class TranslatePipe implements PipeTransform {
|
|
983
806
|
private readonly translateAdapter;
|
|
984
807
|
private readonly fallbackMessages;
|
|
985
|
-
transform(key: string, params?: Record<string, string | number>): string;
|
|
808
|
+
transform(key: string | null | undefined, params?: Record<string, string | number> | null, fallback?: string): string;
|
|
986
809
|
private getFromFallback;
|
|
987
810
|
private interpolate;
|
|
988
811
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<TranslatePipe, never>;
|
|
@@ -995,19 +818,6 @@ interface IResolverModuleConfig {
|
|
|
995
818
|
}
|
|
996
819
|
declare function resolveTranslationModule(config: IResolverModuleConfig): ResolveFn<boolean>;
|
|
997
820
|
|
|
998
|
-
/**
|
|
999
|
-
* Provide fallback localization when @flusys/ng-localization is not used.
|
|
1000
|
-
* Uses hardcoded fallback messages registered by route resolvers.
|
|
1001
|
-
*
|
|
1002
|
-
* @example
|
|
1003
|
-
* ```typescript
|
|
1004
|
-
* providers: [
|
|
1005
|
-
* ...provideFallbackLocalization(),
|
|
1006
|
-
* ]
|
|
1007
|
-
* ```
|
|
1008
|
-
*/
|
|
1009
|
-
declare function provideFallbackLocalization(): Provider[];
|
|
1010
|
-
|
|
1011
821
|
declare class AngularModule {
|
|
1012
822
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AngularModule, never>;
|
|
1013
823
|
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<AngularModule, never, [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.RouterOutlet, typeof i3.RouterLink, typeof i3.RouterLinkActive, typeof IsEmptyImageDirective, typeof i1.NgOptimizedImage, typeof i1.NgComponentOutlet, typeof PreventDefaultDirective], [typeof i1.CommonModule, typeof i2.FormsModule, typeof i2.ReactiveFormsModule, typeof i3.RouterOutlet, typeof i3.RouterLink, typeof i3.RouterLinkActive, typeof IsEmptyImageDirective, typeof i1.NgOptimizedImage, typeof i1.NgComponentOutlet, typeof PreventDefaultDirective]>;
|
|
@@ -1020,76 +830,55 @@ declare class PrimeModule {
|
|
|
1020
830
|
static ɵinj: _angular_core.ɵɵInjectorDeclaration<PrimeModule>;
|
|
1021
831
|
}
|
|
1022
832
|
|
|
1023
|
-
type ServiceName = 'auth' | 'administration' | 'iam' | 'storage' | 'formBuilder' | 'email' | 'eventManager' | 'notification';
|
|
1024
|
-
|
|
1025
|
-
/**
|
|
1026
|
-
* Service interface for CRUD operations.
|
|
1027
|
-
* Matches NestJS shared API controller endpoints (all POST, RPC-style).
|
|
1028
|
-
*/
|
|
833
|
+
type ServiceName = 'auth' | 'administration' | 'iam' | 'storage' | 'formBuilder' | 'email' | 'eventManager' | 'notification' | 'localization';
|
|
1029
834
|
interface IApiService<DtoT, InterfaceT> {
|
|
1030
|
-
insert(dto: DtoT):
|
|
1031
|
-
insertMany(dtos: DtoT[]):
|
|
1032
|
-
findById(id: string, select?: string[]):
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
835
|
+
insert(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
|
|
836
|
+
insertMany(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
|
|
837
|
+
findById(id: string, select?: string[]): Promise<ISingleResponse<InterfaceT>>;
|
|
838
|
+
findByIds(ids: string[], select?: string[] | string): Promise<IListResponse<InterfaceT>>;
|
|
839
|
+
getAll(filter: IFilterData, search?: string): Promise<IListResponse<InterfaceT>>;
|
|
840
|
+
getByFilter(filter: Record<string, unknown>): Promise<ISingleResponse<InterfaceT>>;
|
|
841
|
+
update(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
|
|
842
|
+
updateMany(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
|
|
843
|
+
bulkUpsert(toInsert: Array<DtoT>, toUpdate: Array<DtoT>): Promise<Array<InterfaceT>>;
|
|
844
|
+
delete(deleteDto: IDeleteData): Promise<IMessageResponse>;
|
|
1037
845
|
}
|
|
1038
|
-
/**
|
|
1039
|
-
* Abstract base class for API services using Angular 21 resource() API.
|
|
1040
|
-
* Provides signal-based reactive data fetching with automatic loading states.
|
|
1041
|
-
*
|
|
1042
|
-
* @example
|
|
1043
|
-
* ```typescript
|
|
1044
|
-
* @Injectable({ providedIn: 'root' })
|
|
1045
|
-
* export class UserService extends ApiResourceService<UserDto, User> {
|
|
1046
|
-
* constructor() {
|
|
1047
|
-
* super('auth/users', inject(HttpClient));
|
|
1048
|
-
* }
|
|
1049
|
-
* }
|
|
1050
|
-
* ```
|
|
1051
|
-
*/
|
|
1052
846
|
declare abstract class ApiResourceService<DtoT, InterfaceT> implements IApiService<DtoT, InterfaceT> {
|
|
1053
847
|
protected readonly baseUrl: string;
|
|
1054
|
-
protected readonly injector: Injector;
|
|
1055
848
|
protected readonly http: HttpClient;
|
|
1056
849
|
protected readonly moduleApiName: string;
|
|
1057
850
|
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
1058
851
|
readonly filterData: _angular_core.WritableSignal<IFilterData>;
|
|
1059
|
-
private
|
|
1060
|
-
|
|
1061
|
-
private readonly _resourceInitSignal;
|
|
1062
|
-
get listResource(): ResourceRef<IListResponse<InterfaceT> | undefined>;
|
|
1063
|
-
initListResource(): void;
|
|
852
|
+
private readonly _active;
|
|
853
|
+
readonly listResource: ResourceRef<IListResponse<InterfaceT> | undefined>;
|
|
1064
854
|
readonly isLoading: _angular_core.Signal<boolean>;
|
|
1065
855
|
readonly data: _angular_core.Signal<InterfaceT[]>;
|
|
1066
856
|
readonly total: _angular_core.Signal<number>;
|
|
1067
857
|
readonly pageInfo: _angular_core.Signal<_flusys_ng_shared.IPaginationMeta | undefined>;
|
|
1068
858
|
readonly hasMore: _angular_core.Signal<boolean>;
|
|
859
|
+
readonly error: _angular_core.Signal<Error | undefined>;
|
|
860
|
+
readonly status: _angular_core.Signal<ResourceStatus>;
|
|
1069
861
|
constructor(moduleApiName: string, http: HttpClient, serviceName?: ServiceName);
|
|
1070
862
|
protected getHttpOptions(endpoint: string, params?: HttpParams): {
|
|
1071
863
|
params?: HttpParams | undefined;
|
|
1072
864
|
headers: HttpHeaders;
|
|
1073
865
|
};
|
|
866
|
+
private _getAllObs;
|
|
1074
867
|
fetchList(search?: string, filter?: Partial<IFilterData>): void;
|
|
1075
868
|
setPagination(pagination: IPagination): void;
|
|
1076
869
|
nextPage(): void;
|
|
1077
870
|
resetPagination(): void;
|
|
1078
871
|
reload(): void;
|
|
1079
|
-
insert(dto: DtoT):
|
|
1080
|
-
insertMany(dtos: DtoT[]):
|
|
1081
|
-
findById(id: string, select?: string[]):
|
|
1082
|
-
getAll(
|
|
1083
|
-
update(dto: DtoT):
|
|
1084
|
-
updateMany(dtos: DtoT[]):
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
insertManyAsync(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
|
|
1090
|
-
updateAsync(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
|
|
1091
|
-
updateManyAsync(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
|
|
1092
|
-
deleteAsync(deleteDto: IDeleteData): Promise<IMessageResponse>;
|
|
872
|
+
insert(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
|
|
873
|
+
insertMany(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
|
|
874
|
+
findById(id: string, select?: string[]): Promise<ISingleResponse<InterfaceT>>;
|
|
875
|
+
getAll(filter: IFilterData, search?: string): Promise<IListResponse<InterfaceT>>;
|
|
876
|
+
update(dto: DtoT): Promise<ISingleResponse<InterfaceT>>;
|
|
877
|
+
updateMany(dtos: DtoT[]): Promise<IBulkResponse<InterfaceT>>;
|
|
878
|
+
findByIds(ids: string[], select?: string[] | string): Promise<IListResponse<InterfaceT>>;
|
|
879
|
+
bulkUpsert(toInsert: Array<DtoT>, toUpdate: Array<DtoT>): Promise<Array<InterfaceT>>;
|
|
880
|
+
getByFilter(filter: Record<string, unknown>): Promise<ISingleResponse<InterfaceT>>;
|
|
881
|
+
delete(deleteDto: IDeleteData): Promise<IMessageResponse>;
|
|
1093
882
|
}
|
|
1094
883
|
|
|
1095
884
|
/**
|
|
@@ -1182,6 +971,118 @@ declare function provideValueAccessor<T extends new (...args: unknown[]) => Cont
|
|
|
1182
971
|
multi: boolean;
|
|
1183
972
|
};
|
|
1184
973
|
|
|
974
|
+
declare class FileSelectorDialogComponent {
|
|
975
|
+
private readonly destroyRef;
|
|
976
|
+
private readonly translateAdapter;
|
|
977
|
+
readonly fileProvider: _flusys_ng_shared.IFileProvider | null;
|
|
978
|
+
private abortController;
|
|
979
|
+
private searchDebounceTimer;
|
|
980
|
+
readonly header: _angular_core.InputSignal<string | undefined>;
|
|
981
|
+
readonly acceptTypes: _angular_core.InputSignal<string[]>;
|
|
982
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
983
|
+
readonly dialogHeader: _angular_core.Signal<string>;
|
|
984
|
+
readonly maxSelection: _angular_core.InputSignal<number>;
|
|
985
|
+
readonly pageSize: _angular_core.InputSignal<number>;
|
|
986
|
+
readonly folderId: _angular_core.InputSignal<string | undefined>;
|
|
987
|
+
readonly withUploader: _angular_core.InputSignal<boolean>;
|
|
988
|
+
readonly visible: _angular_core.ModelSignal<boolean>;
|
|
989
|
+
readonly fileSelected: _angular_core.OutputEmitterRef<IFileBasicInfo>;
|
|
990
|
+
readonly filesSelected: _angular_core.OutputEmitterRef<IFileBasicInfo[]>;
|
|
991
|
+
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
992
|
+
readonly onError: _angular_core.OutputEmitterRef<Error>;
|
|
993
|
+
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
994
|
+
readonly files: _angular_core.WritableSignal<IFileBasicInfo[]>;
|
|
995
|
+
readonly selectedFiles: _angular_core.WritableSignal<IFileBasicInfo[]>;
|
|
996
|
+
readonly total: _angular_core.WritableSignal<number | undefined>;
|
|
997
|
+
readonly pagination: _angular_core.WritableSignal<IPagination>;
|
|
998
|
+
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
999
|
+
readonly folders: _angular_core.WritableSignal<IFolderBasicInfo[]>;
|
|
1000
|
+
readonly selectedFolderId: _angular_core.WritableSignal<string | null>;
|
|
1001
|
+
readonly foldersLoading: _angular_core.WritableSignal<boolean>;
|
|
1002
|
+
readonly foldersPagination: _angular_core.WritableSignal<IPagination>;
|
|
1003
|
+
readonly foldersTotal: _angular_core.WritableSignal<number | undefined>;
|
|
1004
|
+
readonly storageConfigs: _angular_core.WritableSignal<IStorageConfigBasicInfo[]>;
|
|
1005
|
+
readonly selectedStorageConfigId: _angular_core.WritableSignal<string | null>;
|
|
1006
|
+
readonly storageConfigsLoading: _angular_core.WritableSignal<boolean>;
|
|
1007
|
+
readonly storageConfigsPagination: _angular_core.WritableSignal<IPagination>;
|
|
1008
|
+
readonly storageConfigsTotal: _angular_core.WritableSignal<number | undefined>;
|
|
1009
|
+
readonly effectiveStorageConfigId: _angular_core.Signal<string | undefined>;
|
|
1010
|
+
readonly uploadFileFn: (file: File, options?: IFileUploadOptions) => rxjs.Observable<_flusys_ng_shared.ISingleResponse<IUploadedFile>>;
|
|
1011
|
+
readonly uploadMultipleFilesFn: ((files: File[], options?: IFileUploadOptions) => rxjs.Observable<_flusys_ng_shared.ISingleResponse<IUploadedFile[]>>) | undefined;
|
|
1012
|
+
constructor();
|
|
1013
|
+
onSearchChange(value: string): void;
|
|
1014
|
+
onScroll(event: Event): void;
|
|
1015
|
+
toggleSelection(file: IFileBasicInfo): void;
|
|
1016
|
+
isSelected(file: IFileBasicInfo): boolean;
|
|
1017
|
+
isFileAllowed(file: IFileBasicInfo): boolean;
|
|
1018
|
+
isImage(file: IFileBasicInfo): boolean;
|
|
1019
|
+
getFileIcon(file: IFileBasicInfo): string;
|
|
1020
|
+
formatSize(size: string): string;
|
|
1021
|
+
onCancel(): void;
|
|
1022
|
+
onConfirm(): void;
|
|
1023
|
+
onDialogHide(): void;
|
|
1024
|
+
onFolderChange(folderId: string | null): void;
|
|
1025
|
+
onFolderSearch(event: {
|
|
1026
|
+
filter: string;
|
|
1027
|
+
}): void;
|
|
1028
|
+
loadFolders(search?: string): Promise<void>;
|
|
1029
|
+
onStorageConfigChange(configId: string | null): void;
|
|
1030
|
+
onStorageConfigSearch(event: {
|
|
1031
|
+
filter: string;
|
|
1032
|
+
}): void;
|
|
1033
|
+
loadStorageConfigs(search?: string): Promise<void>;
|
|
1034
|
+
onFileUploaded(uploadedFile: IUploadedFile): void;
|
|
1035
|
+
private resetState;
|
|
1036
|
+
private fetchFiles;
|
|
1037
|
+
private t;
|
|
1038
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileSelectorDialogComponent, never>;
|
|
1039
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileSelectorDialogComponent, "lib-file-selector-dialog", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "acceptTypes": { "alias": "acceptTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxSelection": { "alias": "maxSelection"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "folderId": { "alias": "folderId"; "required": false; "isSignal": true; }; "withUploader": { "alias": "withUploader"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "fileSelected": "fileSelected"; "filesSelected": "filesSelected"; "closed": "closed"; "onError": "onError"; }, never, never, true, never>;
|
|
1040
|
+
}
|
|
1041
|
+
|
|
1042
|
+
declare class FileUploaderComponent {
|
|
1043
|
+
private readonly messageService;
|
|
1044
|
+
private readonly translateAdapter;
|
|
1045
|
+
private readonly fileProvider;
|
|
1046
|
+
readonly uploadFile: _angular_core.InputSignal<UploadFileFn | undefined>;
|
|
1047
|
+
readonly uploadMultipleFiles: _angular_core.InputSignal<UploadMultipleFilesFn | undefined>;
|
|
1048
|
+
readonly hasUploadCapability: _angular_core.Signal<boolean>;
|
|
1049
|
+
private getUploadFn;
|
|
1050
|
+
private getUploadMultipleFn;
|
|
1051
|
+
readonly acceptTypes: _angular_core.InputSignal<string[]>;
|
|
1052
|
+
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
1053
|
+
readonly maxFiles: _angular_core.InputSignal<number>;
|
|
1054
|
+
readonly maxSizeMb: _angular_core.InputSignal<number>;
|
|
1055
|
+
readonly uploadOptions: _angular_core.InputSignal<IFileUploadOptions>;
|
|
1056
|
+
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1057
|
+
readonly showPreview: _angular_core.InputSignal<boolean>;
|
|
1058
|
+
readonly autoUpload: _angular_core.InputSignal<boolean>;
|
|
1059
|
+
readonly fileUploaded: _angular_core.OutputEmitterRef<IUploadedFile>;
|
|
1060
|
+
readonly filesUploaded: _angular_core.OutputEmitterRef<IUploadedFile[]>;
|
|
1061
|
+
readonly onError: _angular_core.OutputEmitterRef<Error>;
|
|
1062
|
+
readonly fileSelected: _angular_core.OutputEmitterRef<File[]>;
|
|
1063
|
+
readonly isUploading: _angular_core.WritableSignal<boolean>;
|
|
1064
|
+
readonly isDragOver: _angular_core.WritableSignal<boolean>;
|
|
1065
|
+
readonly uploadProgress: _angular_core.WritableSignal<number>;
|
|
1066
|
+
readonly uploadingFileName: _angular_core.WritableSignal<string>;
|
|
1067
|
+
readonly selectedFiles: _angular_core.WritableSignal<File[]>;
|
|
1068
|
+
readonly acceptString: _angular_core.Signal<string>;
|
|
1069
|
+
readonly acceptTypesDisplay: _angular_core.Signal<string>;
|
|
1070
|
+
onDragOver(event: DragEvent): void;
|
|
1071
|
+
onDragLeave(event: DragEvent): void;
|
|
1072
|
+
onDrop(event: DragEvent): void;
|
|
1073
|
+
onFileSelected(event: Event): void;
|
|
1074
|
+
private handleFiles;
|
|
1075
|
+
removeFile(file: File): void;
|
|
1076
|
+
uploadFiles(files?: File[]): Promise<void>;
|
|
1077
|
+
private uploadBatch;
|
|
1078
|
+
private uploadSequential;
|
|
1079
|
+
getFileIcon(file: File): string;
|
|
1080
|
+
formatSize(bytes: number): string;
|
|
1081
|
+
private t;
|
|
1082
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileUploaderComponent, never>;
|
|
1083
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileUploaderComponent, "lib-file-uploader", never, { "uploadFile": { "alias": "uploadFile"; "required": false; "isSignal": true; }; "uploadMultipleFiles": { "alias": "uploadMultipleFiles"; "required": false; "isSignal": true; }; "acceptTypes": { "alias": "acceptTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "maxSizeMb": { "alias": "maxSizeMb"; "required": false; "isSignal": true; }; "uploadOptions": { "alias": "uploadOptions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "showPreview": { "alias": "showPreview"; "required": false; "isSignal": true; }; "autoUpload": { "alias": "autoUpload"; "required": false; "isSignal": true; }; }, { "fileUploaded": "fileUploaded"; "filesUploaded": "filesUploaded"; "onError": "onError"; "fileSelected": "fileSelected"; }, never, never, true, never>;
|
|
1084
|
+
}
|
|
1085
|
+
|
|
1185
1086
|
declare class IconComponent {
|
|
1186
1087
|
icon: _angular_core.InputSignal<string>;
|
|
1187
1088
|
iconType: _angular_core.InputSignal<IconTypeEnum | undefined>;
|
|
@@ -1320,42 +1221,6 @@ declare abstract class BaseUserSelectComponent {
|
|
|
1320
1221
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseUserSelectComponent, never, never, { "loadUsers": { "alias": "loadUsers"; "required": false; "isSignal": true; }; "placeHolder": { "alias": "placeHolder"; "required": false; "isSignal": true; }; "isEditMode": { "alias": "isEditMode"; "required": true; "isSignal": true; }; "filterActive": { "alias": "filterActive"; "required": false; "isSignal": true; }; "additionalFilters": { "alias": "additionalFilters"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; }, { "onError": "onError"; }, never, never, true, never>;
|
|
1321
1222
|
}
|
|
1322
1223
|
|
|
1323
|
-
/**
|
|
1324
|
-
* User Select Component - Single user selection with lazy loading.
|
|
1325
|
-
*
|
|
1326
|
-
* Uses USER_PROVIDER internally by default, or accepts custom `loadUsers` function.
|
|
1327
|
-
*
|
|
1328
|
-
* Features:
|
|
1329
|
-
* - Search with debouncing (handled by lazy-select)
|
|
1330
|
-
* - Infinite scroll pagination
|
|
1331
|
-
* - Filter active users by default (configurable)
|
|
1332
|
-
* - Supports additional filters via `additionalFilters` input
|
|
1333
|
-
*
|
|
1334
|
-
* @example
|
|
1335
|
-
* ```html
|
|
1336
|
-
* <!-- Simple usage - uses USER_PROVIDER internally -->
|
|
1337
|
-
* <lib-user-select
|
|
1338
|
-
* [(value)]="selectedUserId"
|
|
1339
|
-
* [isEditMode]="true"
|
|
1340
|
-
* />
|
|
1341
|
-
*
|
|
1342
|
-
* <!-- With custom loadUsers function -->
|
|
1343
|
-
* <lib-user-select
|
|
1344
|
-
* [(value)]="selectedUserId"
|
|
1345
|
-
* [isEditMode]="true"
|
|
1346
|
-
* [loadUsers]="customLoadUsers"
|
|
1347
|
-
* />
|
|
1348
|
-
* ```
|
|
1349
|
-
*/
|
|
1350
|
-
declare class UserSelectComponent extends BaseUserSelectComponent {
|
|
1351
|
-
readonly showClear: _angular_core.InputSignal<boolean>;
|
|
1352
|
-
readonly value: _angular_core.ModelSignal<string | null>;
|
|
1353
|
-
readonly userSelected: _angular_core.OutputEmitterRef<IUserBasicInfo | null>;
|
|
1354
|
-
protected setupValueEffect(): void;
|
|
1355
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserSelectComponent, never>;
|
|
1356
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserSelectComponent, "lib-user-select", never, { "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "userSelected": "userSelected"; }, never, never, true, never>;
|
|
1357
|
-
}
|
|
1358
|
-
|
|
1359
1224
|
/**
|
|
1360
1225
|
* User Multi-Select Component - Multiple user selection with lazy loading.
|
|
1361
1226
|
*
|
|
@@ -1394,162 +1259,39 @@ declare class UserMultiSelectComponent extends BaseUserSelectComponent {
|
|
|
1394
1259
|
}
|
|
1395
1260
|
|
|
1396
1261
|
/**
|
|
1397
|
-
*
|
|
1398
|
-
*
|
|
1399
|
-
* Uses FILE_PROVIDER when available (no inputs needed).
|
|
1400
|
-
* Optionally pass `uploadFile` to override the provider.
|
|
1401
|
-
*
|
|
1402
|
-
* @example
|
|
1403
|
-
* ```html
|
|
1404
|
-
* <!-- Using FILE_PROVIDER (recommended) -->
|
|
1405
|
-
* <lib-file-uploader
|
|
1406
|
-
* [acceptTypes]="['image/*']"
|
|
1407
|
-
* (fileUploaded)="onFileUploaded($event)"
|
|
1408
|
-
* />
|
|
1409
|
-
*
|
|
1410
|
-
* <!-- Custom upload function -->
|
|
1411
|
-
* <lib-file-uploader
|
|
1412
|
-
* [uploadFile]="customUploadFn"
|
|
1413
|
-
* (fileUploaded)="onFileUploaded($event)"
|
|
1414
|
-
* />
|
|
1415
|
-
* ```
|
|
1416
|
-
*/
|
|
1417
|
-
declare class FileUploaderComponent {
|
|
1418
|
-
private readonly messageService;
|
|
1419
|
-
private readonly translateAdapter;
|
|
1420
|
-
private readonly fileProvider;
|
|
1421
|
-
readonly uploadFile: _angular_core.InputSignal<UploadFileFn | undefined>;
|
|
1422
|
-
readonly uploadMultipleFiles: _angular_core.InputSignal<UploadMultipleFilesFn | undefined>;
|
|
1423
|
-
readonly hasUploadCapability: _angular_core.Signal<boolean>;
|
|
1424
|
-
private getUploadFn;
|
|
1425
|
-
private getUploadMultipleFn;
|
|
1426
|
-
readonly acceptTypes: _angular_core.InputSignal<string[]>;
|
|
1427
|
-
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
1428
|
-
readonly maxFiles: _angular_core.InputSignal<number>;
|
|
1429
|
-
readonly maxSizeMb: _angular_core.InputSignal<number>;
|
|
1430
|
-
readonly uploadOptions: _angular_core.InputSignal<IFileUploadOptions>;
|
|
1431
|
-
readonly disabled: _angular_core.InputSignal<boolean>;
|
|
1432
|
-
readonly showPreview: _angular_core.InputSignal<boolean>;
|
|
1433
|
-
readonly autoUpload: _angular_core.InputSignal<boolean>;
|
|
1434
|
-
readonly fileUploaded: _angular_core.OutputEmitterRef<IUploadedFile>;
|
|
1435
|
-
readonly filesUploaded: _angular_core.OutputEmitterRef<IUploadedFile[]>;
|
|
1436
|
-
readonly onError: _angular_core.OutputEmitterRef<Error>;
|
|
1437
|
-
readonly fileSelected: _angular_core.OutputEmitterRef<File[]>;
|
|
1438
|
-
readonly isUploading: _angular_core.WritableSignal<boolean>;
|
|
1439
|
-
readonly isDragOver: _angular_core.WritableSignal<boolean>;
|
|
1440
|
-
readonly uploadProgress: _angular_core.WritableSignal<number>;
|
|
1441
|
-
readonly uploadingFileName: _angular_core.WritableSignal<string>;
|
|
1442
|
-
readonly selectedFiles: _angular_core.WritableSignal<File[]>;
|
|
1443
|
-
readonly acceptString: _angular_core.Signal<string>;
|
|
1444
|
-
readonly acceptTypesDisplay: _angular_core.Signal<string>;
|
|
1445
|
-
onDragOver(event: DragEvent): void;
|
|
1446
|
-
onDragLeave(event: DragEvent): void;
|
|
1447
|
-
onDrop(event: DragEvent): void;
|
|
1448
|
-
onFileSelected(event: Event): void;
|
|
1449
|
-
private handleFiles;
|
|
1450
|
-
removeFile(file: File): void;
|
|
1451
|
-
uploadFiles(files?: File[]): Promise<void>;
|
|
1452
|
-
private uploadBatch;
|
|
1453
|
-
private uploadSequential;
|
|
1454
|
-
getFileIcon(file: File): string;
|
|
1455
|
-
formatSize(bytes: number): string;
|
|
1456
|
-
private t;
|
|
1457
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileUploaderComponent, never>;
|
|
1458
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileUploaderComponent, "lib-file-uploader", never, { "uploadFile": { "alias": "uploadFile"; "required": false; "isSignal": true; }; "uploadMultipleFiles": { "alias": "uploadMultipleFiles"; "required": false; "isSignal": true; }; "acceptTypes": { "alias": "acceptTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxFiles": { "alias": "maxFiles"; "required": false; "isSignal": true; }; "maxSizeMb": { "alias": "maxSizeMb"; "required": false; "isSignal": true; }; "uploadOptions": { "alias": "uploadOptions"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "showPreview": { "alias": "showPreview"; "required": false; "isSignal": true; }; "autoUpload": { "alias": "autoUpload"; "required": false; "isSignal": true; }; }, { "fileUploaded": "fileUploaded"; "filesUploaded": "filesUploaded"; "onError": "onError"; "fileSelected": "fileSelected"; }, never, never, true, never>;
|
|
1459
|
-
}
|
|
1460
|
-
|
|
1461
|
-
/**
|
|
1462
|
-
* File Selector Dialog - Self-contained file browser with upload support.
|
|
1262
|
+
* User Select Component - Single user selection with lazy loading.
|
|
1463
1263
|
*
|
|
1464
|
-
* Uses
|
|
1465
|
-
* Just configure with inputs and handle selection events.
|
|
1264
|
+
* Uses USER_PROVIDER internally by default, or accepts custom `loadUsers` function.
|
|
1466
1265
|
*
|
|
1467
1266
|
* Features:
|
|
1468
|
-
* - Search with debouncing
|
|
1469
|
-
* - File type filtering (acceptTypes)
|
|
1470
|
-
* - Folder filtering
|
|
1267
|
+
* - Search with debouncing (handled by lazy-select)
|
|
1471
1268
|
* - Infinite scroll pagination
|
|
1472
|
-
* -
|
|
1473
|
-
* -
|
|
1474
|
-
* - File preview with icons
|
|
1269
|
+
* - Filter active users by default (configurable)
|
|
1270
|
+
* - Supports additional filters via `additionalFilters` input
|
|
1475
1271
|
*
|
|
1476
1272
|
* @example
|
|
1477
1273
|
* ```html
|
|
1478
|
-
*
|
|
1479
|
-
*
|
|
1480
|
-
* [
|
|
1481
|
-
* [
|
|
1482
|
-
*
|
|
1483
|
-
*
|
|
1274
|
+
* <!-- Simple usage - uses USER_PROVIDER internally -->
|
|
1275
|
+
* <lib-user-select
|
|
1276
|
+
* [(value)]="selectedUserId"
|
|
1277
|
+
* [isEditMode]="true"
|
|
1278
|
+
* />
|
|
1279
|
+
*
|
|
1280
|
+
* <!-- With custom loadUsers function -->
|
|
1281
|
+
* <lib-user-select
|
|
1282
|
+
* [(value)]="selectedUserId"
|
|
1283
|
+
* [isEditMode]="true"
|
|
1284
|
+
* [loadUsers]="customLoadUsers"
|
|
1484
1285
|
* />
|
|
1485
1286
|
* ```
|
|
1486
1287
|
*/
|
|
1487
|
-
declare class
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
readonly
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
readonly acceptTypes: _angular_core.InputSignal<string[]>;
|
|
1495
|
-
readonly multiple: _angular_core.InputSignal<boolean>;
|
|
1496
|
-
readonly dialogHeader: _angular_core.Signal<string>;
|
|
1497
|
-
readonly maxSelection: _angular_core.InputSignal<number>;
|
|
1498
|
-
readonly pageSize: _angular_core.InputSignal<number>;
|
|
1499
|
-
readonly folderId: _angular_core.InputSignal<string | undefined>;
|
|
1500
|
-
readonly withUploader: _angular_core.InputSignal<boolean>;
|
|
1501
|
-
readonly visible: _angular_core.ModelSignal<boolean>;
|
|
1502
|
-
readonly fileSelected: _angular_core.OutputEmitterRef<IFileBasicInfo>;
|
|
1503
|
-
readonly filesSelected: _angular_core.OutputEmitterRef<IFileBasicInfo[]>;
|
|
1504
|
-
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1505
|
-
readonly onError: _angular_core.OutputEmitterRef<Error>;
|
|
1506
|
-
readonly isLoading: _angular_core.WritableSignal<boolean>;
|
|
1507
|
-
readonly files: _angular_core.WritableSignal<IFileBasicInfo[]>;
|
|
1508
|
-
readonly selectedFiles: _angular_core.WritableSignal<IFileBasicInfo[]>;
|
|
1509
|
-
readonly total: _angular_core.WritableSignal<number | undefined>;
|
|
1510
|
-
readonly pagination: _angular_core.WritableSignal<IPagination>;
|
|
1511
|
-
readonly searchTerm: _angular_core.WritableSignal<string>;
|
|
1512
|
-
readonly folders: _angular_core.WritableSignal<IFolderBasicInfo[]>;
|
|
1513
|
-
readonly selectedFolderId: _angular_core.WritableSignal<string | null>;
|
|
1514
|
-
readonly foldersLoading: _angular_core.WritableSignal<boolean>;
|
|
1515
|
-
readonly foldersPagination: _angular_core.WritableSignal<IPagination>;
|
|
1516
|
-
readonly foldersTotal: _angular_core.WritableSignal<number | undefined>;
|
|
1517
|
-
readonly storageConfigs: _angular_core.WritableSignal<IStorageConfigBasicInfo[]>;
|
|
1518
|
-
readonly selectedStorageConfigId: _angular_core.WritableSignal<string | null>;
|
|
1519
|
-
readonly storageConfigsLoading: _angular_core.WritableSignal<boolean>;
|
|
1520
|
-
readonly storageConfigsPagination: _angular_core.WritableSignal<IPagination>;
|
|
1521
|
-
readonly storageConfigsTotal: _angular_core.WritableSignal<number | undefined>;
|
|
1522
|
-
readonly effectiveStorageConfigId: _angular_core.Signal<string | undefined>;
|
|
1523
|
-
readonly uploadFileFn: (file: File, options?: IFileUploadOptions) => rxjs.Observable<_flusys_ng_shared.ISingleResponse<IUploadedFile>>;
|
|
1524
|
-
readonly uploadMultipleFilesFn: ((files: File[], options?: IFileUploadOptions) => rxjs.Observable<_flusys_ng_shared.ISingleResponse<IUploadedFile[]>>) | undefined;
|
|
1525
|
-
constructor();
|
|
1526
|
-
onSearchChange(value: string): void;
|
|
1527
|
-
onScroll(event: Event): void;
|
|
1528
|
-
toggleSelection(file: IFileBasicInfo): void;
|
|
1529
|
-
isSelected(file: IFileBasicInfo): boolean;
|
|
1530
|
-
isFileAllowed(file: IFileBasicInfo): boolean;
|
|
1531
|
-
isImage(file: IFileBasicInfo): boolean;
|
|
1532
|
-
getFileIcon(file: IFileBasicInfo): string;
|
|
1533
|
-
formatSize(size: string): string;
|
|
1534
|
-
onCancel(): void;
|
|
1535
|
-
onConfirm(): void;
|
|
1536
|
-
onDialogHide(): void;
|
|
1537
|
-
onFolderChange(folderId: string | null): void;
|
|
1538
|
-
onFolderSearch(event: {
|
|
1539
|
-
filter: string;
|
|
1540
|
-
}): void;
|
|
1541
|
-
loadFolders(search?: string): Promise<void>;
|
|
1542
|
-
onStorageConfigChange(configId: string | null): void;
|
|
1543
|
-
onStorageConfigSearch(event: {
|
|
1544
|
-
filter: string;
|
|
1545
|
-
}): void;
|
|
1546
|
-
loadStorageConfigs(search?: string): Promise<void>;
|
|
1547
|
-
onFileUploaded(uploadedFile: IUploadedFile): void;
|
|
1548
|
-
private resetState;
|
|
1549
|
-
private fetchFiles;
|
|
1550
|
-
private t;
|
|
1551
|
-
static ɵfac: _angular_core.ɵɵFactoryDeclaration<FileSelectorDialogComponent, never>;
|
|
1552
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<FileSelectorDialogComponent, "lib-file-selector-dialog", never, { "header": { "alias": "header"; "required": false; "isSignal": true; }; "acceptTypes": { "alias": "acceptTypes"; "required": false; "isSignal": true; }; "multiple": { "alias": "multiple"; "required": false; "isSignal": true; }; "maxSelection": { "alias": "maxSelection"; "required": false; "isSignal": true; }; "pageSize": { "alias": "pageSize"; "required": false; "isSignal": true; }; "folderId": { "alias": "folderId"; "required": false; "isSignal": true; }; "withUploader": { "alias": "withUploader"; "required": false; "isSignal": true; }; "visible": { "alias": "visible"; "required": false; "isSignal": true; }; }, { "visible": "visibleChange"; "fileSelected": "fileSelected"; "filesSelected": "filesSelected"; "closed": "closed"; "onError": "onError"; }, never, never, true, never>;
|
|
1288
|
+
declare class UserSelectComponent extends BaseUserSelectComponent {
|
|
1289
|
+
readonly showClear: _angular_core.InputSignal<boolean>;
|
|
1290
|
+
readonly value: _angular_core.ModelSignal<string | null>;
|
|
1291
|
+
readonly userSelected: _angular_core.OutputEmitterRef<IUserBasicInfo | null>;
|
|
1292
|
+
protected setupValueEffect(): void;
|
|
1293
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserSelectComponent, never>;
|
|
1294
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserSelectComponent, "lib-user-select", never, { "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "userSelected": "userSelected"; }, never, never, true, never>;
|
|
1553
1295
|
}
|
|
1554
1296
|
|
|
1555
1297
|
/**
|
|
@@ -1605,20 +1347,6 @@ declare const AUTH_STATE_PROVIDER: InjectionToken<IAuthStateProvider>;
|
|
|
1605
1347
|
* Use with `inject(PROFILE_PERMISSION_PROVIDER, { optional: true })`.
|
|
1606
1348
|
*/
|
|
1607
1349
|
declare const PROFILE_PERMISSION_PROVIDER: InjectionToken<IProfilePermissionProvider>;
|
|
1608
|
-
/**
|
|
1609
|
-
* User List Provider Token
|
|
1610
|
-
*
|
|
1611
|
-
* Provides extra actions, columns, and data enrichment for user list.
|
|
1612
|
-
* Optional - if not configured, default user list behavior is used.
|
|
1613
|
-
* Use with `inject(USER_LIST_PROVIDER, { optional: true })`.
|
|
1614
|
-
*
|
|
1615
|
-
* @example
|
|
1616
|
-
* // In app.config.ts
|
|
1617
|
-
* providers: [
|
|
1618
|
-
* { provide: USER_LIST_PROVIDER, useClass: MyUserListProvider },
|
|
1619
|
-
* ]
|
|
1620
|
-
*/
|
|
1621
|
-
declare const USER_LIST_PROVIDER: InjectionToken<IUserListProvider<IUserListItem>>;
|
|
1622
1350
|
/**
|
|
1623
1351
|
* File Provider Token
|
|
1624
1352
|
*
|
|
@@ -1945,10 +1673,8 @@ declare abstract class BaseListPage<T> {
|
|
|
1945
1673
|
* @param deleteApiCall Function that returns Observable for delete API call
|
|
1946
1674
|
* @param options Optional configuration
|
|
1947
1675
|
*/
|
|
1948
|
-
onDelete(item: T, idGetter: (item: T) => string, deleteApiCall: (id: string) => Observable<unknown>, options?: {
|
|
1676
|
+
onDelete(item: T, idGetter: (item: T) => string, deleteApiCall: (id: string) => Observable<unknown> | Promise<unknown>, options?: {
|
|
1949
1677
|
header?: string;
|
|
1950
|
-
successMessage?: string;
|
|
1951
|
-
errorMessage?: string;
|
|
1952
1678
|
}): void;
|
|
1953
1679
|
/**
|
|
1954
1680
|
* Delete an item with confirmation dialog using async/await
|
|
@@ -1959,8 +1685,6 @@ declare abstract class BaseListPage<T> {
|
|
|
1959
1685
|
*/
|
|
1960
1686
|
onDeleteAsync(item: T, idGetter: (item: T) => string, deleteApiCall: (id: string) => Promise<unknown>, options?: {
|
|
1961
1687
|
header?: string;
|
|
1962
|
-
successMessage?: string;
|
|
1963
|
-
errorMessage?: string;
|
|
1964
1688
|
}): Promise<void>;
|
|
1965
1689
|
/**
|
|
1966
1690
|
* Navigate to a route
|
|
@@ -1970,6 +1694,15 @@ declare abstract class BaseListPage<T> {
|
|
|
1970
1694
|
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<BaseListPage<any>, never, never, {}, {}, never, never, true, never>;
|
|
1971
1695
|
}
|
|
1972
1696
|
|
|
1697
|
+
declare function localToUtc(dateStr: string, timeStr: string, timezone: string): Date;
|
|
1698
|
+
declare function utcToLocal(utcDate: Date | string, timezone: string): {
|
|
1699
|
+
date: string;
|
|
1700
|
+
time: string;
|
|
1701
|
+
display: string;
|
|
1702
|
+
};
|
|
1703
|
+
declare function formatInTimezone(utcDate: Date | string, timezone: string, options?: Intl.DateTimeFormatOptions): string;
|
|
1704
|
+
declare function getUserTimezone(): string;
|
|
1705
|
+
|
|
1973
1706
|
/**
|
|
1974
1707
|
* Check if user has a specific permission using wildcard matching.
|
|
1975
1708
|
* Supports:
|
|
@@ -2020,5 +1753,5 @@ interface ScrollPaginationConfig {
|
|
|
2020
1753
|
*/
|
|
2021
1754
|
declare function checkScrollPagination(event: Event, config: ScrollPaginationConfig): IPagination | null;
|
|
2022
1755
|
|
|
2023
|
-
export { ACTION_PERMISSIONS, AUTH_STATE_PROVIDER, AngularModule, ApiResourceService, ApiResourceService as ApiService, BRANCH_PERMISSIONS, BaseFormControl, BaseFormPage, BaseListPage, BaseUserSelectComponent, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, COMPANY_PERMISSIONS,
|
|
2024
|
-
export type { ApiResponse, DeleteType, FilesResponseDto, GetFileUrlsFn, IActionNode, IActivatable, IApiService, IAuthStateProvider, IBaseEntity, IBulkMeta, IBulkResponse, ICompanyApiProvider, ICompanyBasicInfo, IDeleteData, IDropDown, IErrorResponse, IFileBasicInfo, IFileData, IFileProvider, IFileSelectFilter, IFileUploadOptions, IFilter, IFilterData, IFolderBasicInfo, IGroupNode, IListResponse, ILoggedUserInfo, ILogicNode,
|
|
1756
|
+
export { ACTION_PERMISSIONS, AUTH_STATE_PROVIDER, AngularModule, ApiResourceService, ApiResourceService as ApiService, BRANCH_PERMISSIONS, BaseFormControl, BaseFormPage, BaseListPage, BaseUserSelectComponent, COMPANY_ACTION_PERMISSIONS, COMPANY_API_PROVIDER, COMPANY_PERMISSIONS, CookieService, EMAIL_CONFIG_PERMISSIONS, EMAIL_TEMPLATE_PERMISSIONS, EVENT_PARTICIPANT_PERMISSIONS, EVENT_PERMISSIONS, EditModeElementChangerDirective, FILE_PERMISSIONS, FILE_PROVIDER, FILE_TYPE_FILTERS, FOLDER_PERMISSIONS, FORM_PERMISSIONS, FileSelectorDialogComponent, FileUploaderComponent, FileUrlService, HasPermissionDirective, IconComponent, IconTypeEnum, IsEmptyImageDirective, LANGUAGE_PERMISSIONS, LazyMultiSelectComponent, LazySelectComponent, NOTIFICATION_PERMISSIONS, PROFILE_PERMISSION_PROVIDER, PermissionValidatorService, PlatformService, PreventDefaultDirective, PrimeModule, ROLE_ACTION_PERMISSIONS, ROLE_PERMISSIONS, SHARED_MESSAGES, STORAGE_CONFIG_PERMISSIONS, TRANSLATION_KEY_PERMISSIONS, TRANSLATION_PERMISSIONS, TranslatePipe, USER_ACTION_PERMISSIONS, USER_PERMISSIONS, USER_PERMISSION_PROVIDER, USER_PROVIDER, USER_ROLE_PERMISSIONS, UserMultiSelectComponent, UserSelectComponent, allPermissionsGuard, anyPermissionGuard, checkScrollPagination, evaluateLogicNode, evaluatePermission, formatFileSize, formatInTimezone, getAcceptString, getFileIconClass, getUserTimezone, hasAllPermissions, hasAnyPermission, hasPermission, isFileTypeAllowed, localToUtc, permissionGuard, provideValueAccessor, resolveTranslationModule, utcToLocal };
|
|
1757
|
+
export type { ApiResponse, DeleteType, FilesResponseDto, GetFileUrlsFn, IActionNode, IActivatable, IApiService, IAuthStateProvider, IBaseEntity, IBulkMeta, IBulkResponse, ICompanyApiProvider, ICompanyBasicInfo, IDeleteData, IDropDown, IErrorResponse, IFileBasicInfo, IFileData, IFileProvider, IFileSelectFilter, IFileUploadOptions, IFilter, IFilterData, IFolderBasicInfo, IGroupNode, IListResponse, ILoggedUserInfo, ILogicNode, IMessageResponse, IOrderable, IPagination, IPaginationMeta, IProfileActionInfo, IProfilePermissionProvider, IProfileRoleInfo, IRequestMeta, IResolverModuleConfig, ISelectFilter, ISingleResponse, ISoftDeletable, ISort, IStorageConfigBasicInfo, ITimestampable, IUploadedFile, IUserBasicInfo, IUserBranchPermission, IUserListAction, IUserListColumn, IUserListFilter, IUserListItem, IUserListProvider, IUserPermissionProvider, IUserProvider, IUserSelectFilter, IValidationError, LoadFilesFn, LoadUsersFn, ScrollPaginationConfig, ServiceName, UploadFileFn, UploadMultipleFilesFn };
|