erp-library-itdev 0.1.5

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.
@@ -0,0 +1,806 @@
1
+ import * as i0 from '@angular/core';
2
+ import { EventEmitter, Signal, TemplateRef, ElementRef, EnvironmentProviders } from '@angular/core';
3
+ import { Observable } from 'rxjs';
4
+ import { HttpClient } from '@angular/common/http';
5
+ import { TranslateService, TranslateLoader } from '@ngx-translate/core';
6
+
7
+ type ButtonVariant = 'primary' | 'secondary' | 'danger' | 'ghost';
8
+ type ButtonSize = 'sm' | 'md' | 'lg';
9
+ declare class ButtonComponent {
10
+ variant: ButtonVariant;
11
+ size: ButtonSize;
12
+ disabled: boolean;
13
+ loading: boolean;
14
+ type: 'button' | 'submit' | 'reset';
15
+ clicked: EventEmitter<MouseEvent>;
16
+ get classes(): string[];
17
+ onClick(event: MouseEvent): void;
18
+ static ɵfac: i0.ɵɵFactoryDeclaration<ButtonComponent, never>;
19
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonComponent, "itdev-button", never, { "variant": { "alias": "variant"; "required": false; }; "size": { "alias": "size"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "type": { "alias": "type"; "required": false; }; }, { "clicked": "clicked"; }, never, ["*"], true, never>;
20
+ }
21
+
22
+ declare enum Icons {
23
+ ADD_ROUNDED = "add-rounded",
24
+ ARROW_TOP = "arrow-top",
25
+ ARROW_TOP_2 = "arrow-top-2",
26
+ ARROW_TOP_ROUNDED = "arrow-top-rounded",
27
+ ARROW_TOP_ROUNDED_2 = "arrow-top-rounded-2",
28
+ ARROW_BOTTOM = "arrow-bottom",
29
+ ARROW_BOTTOM_2 = "arrow-bottom-2",
30
+ ARROW_BOTTOM_ROUNDED = "arrow-bottom-rounded",
31
+ ARROW_BOTTOM_ROUNDED_2 = "arrow-bottom-rounded-2",
32
+ ARROW_RIGHT = "arrow-right",
33
+ ARROW_RIGHT_2 = "arrow-right-2",
34
+ ARROW_RIGHT_ROUNDED = "arrow-right-rounded",
35
+ ARROW_RIGHT_ROUNDED_2 = "arrow-right-rounded-2",
36
+ ARROW_LEFT = "arrow-left",
37
+ ARROW_LEFT_2 = "arrow-left",
38
+ ARROW_LEFT_ROUNDED = "arrow-left-rounded",
39
+ ARROW_LEFT_ROUNDED_2 = "arrow-left-rounded-2",
40
+ AWARD = "award",
41
+ CALENDAR = "calendar",
42
+ CALL_CALLING = "call-calling",
43
+ CALL_MUTED = "call-muted",
44
+ CALL_SLASH = "call-slash",
45
+ CAMERA_SLASH = "camera-slash",
46
+ CAMERA = "camera",
47
+ CARD = "card",
48
+ CHART = "chart",
49
+ CHECK = "check",
50
+ CHECK_LIST = "check-list",
51
+ CLOCK = "clock",
52
+ CLOSE = "close",
53
+ CLOUD = "cloud",
54
+ CLOUD_2 = "cloud-1",
55
+ COMPARISON = "comparison",
56
+ COPY = "copy",
57
+ CPU = "cpu",
58
+ CUP = "cup",
59
+ DELETE = "delete",
60
+ DELETE_2 = "delete-2",
61
+ DISCOVER = "discover",
62
+ DOCUMENT = "document",
63
+ DOLLAR_ROUNDED = "dollar-rounded",
64
+ EDIT_ROUNDED = "edit-rounded",
65
+ EDIT_ROUNDED_2 = "edit-rounded-2",
66
+ EDIT_UNDERLINE = "edit-underline",
67
+ EDIT = "edit",
68
+ EXPORT = "export",
69
+ EYE = "eye",
70
+ EYE_SLASH = "eye-slash",
71
+ FILTER = "filter",
72
+ FLAG = "flag",
73
+ FOLDER = "folder",
74
+ GALLERY = "gallery",
75
+ GRID = "grid",
76
+ GRID_2 = "grid-2",
77
+ GRID_3 = "grid-3",
78
+ HEADPHONE_SLASH = "headphone-slash",
79
+ HEADPHONE = "headphone",
80
+ HEART = "heart",
81
+ HOME = "home",
82
+ HOME_2 = "home-2",
83
+ INFO = "info",
84
+ LOADING = "loading",
85
+ LOCATION = "location",
86
+ LOCK = "lock",
87
+ LOCK_2 = "lock-1",
88
+ LOGOUT = "logout",
89
+ MENU = "menu",
90
+ MENU_2 = "menu-1",
91
+ MESSAGE = "message",
92
+ MESSAGES = "messages",
93
+ MESSAGE_2 = "message-2",
94
+ MESSAGE_3 = "message-3",
95
+ MESSAGE_4 = "message-4",
96
+ MIC = "mic",
97
+ MINUS = "minus",
98
+ MOBILE = "mobile",
99
+ MONITOR = "monitor",
100
+ MOON = "moon",
101
+ MORE = "more",
102
+ MORE_2 = "more-2",
103
+ MOUSE = "mouse",
104
+ NOTE = "note",
105
+ NOTE_2 = "note-2",
106
+ NOTE_3 = "note-3",
107
+ NOTE_ADD = "note-add",
108
+ NOTE_CHECK = "note-check",
109
+ NOTE_DELETE = "note-delete",
110
+ NOTE_MINUS = "note-minus",
111
+ NOTIFICATION = "notification",
112
+ NOTIFICATION_2 = "notification-2",
113
+ NOTIFICATION_3 = "notification-3",
114
+ NOTIFICATION_4 = "notification-4",
115
+ PHONE = "phone",
116
+ PLAY = "play",
117
+ PLAY_1 = "play-1",
118
+ PLUS = "plus",
119
+ PRESENTATION = "presentation",
120
+ PRESENTATION_2 = "presentation-2",
121
+ QUESTION_ROUNDED = "question-rounded",
122
+ ROTATE_LEFT = "rotate-left",
123
+ ROTATE_RIGHT = "rotate-right",
124
+ SAVE = "save",
125
+ SCAN = "scan",
126
+ SCAN_2 = "scan-2",
127
+ SCAN_3 = "scan-3",
128
+ SEARCH = "search",
129
+ SEND = "send",
130
+ SETTINGS = "settings",
131
+ SETTINGS_2 = "settings-2",
132
+ SETTINGS_3 = "settings-3",
133
+ SHIELD = "shield",
134
+ SHIELD_CHECK = "shield-check",
135
+ SHIELD_CROSS = "shield-cross",
136
+ SHOPPING = "shopping",
137
+ SORT = "sort",
138
+ STAR = "star",
139
+ STARS = "stars",
140
+ STATUS = "status",
141
+ SUN = "sun",
142
+ SUNRISE = "sunrise",
143
+ SWAP = "swap",
144
+ TERMINAL = "terminal",
145
+ TEXT = "text",
146
+ TICK = "tick",
147
+ TODO = "todo",
148
+ TV = "tv",
149
+ UNLOCK = "unlock",
150
+ USER_ADD = "user-add",
151
+ USER_SCAN = "user-scan",
152
+ USER_TWO = "user-two",
153
+ USER = "user",
154
+ UNCHECKED = "unchecked",
155
+ VIDEO = "video",
156
+ VOLUME_CROSS = "volume-cross",
157
+ VOLUME_HIGH = "volume-high",
158
+ VOLUME_LOW = "volume-low",
159
+ VOLUME_MUTE = "volume-mute",
160
+ VOLUME_SLASH = "volume-slash",
161
+ WALLET = "wallet",
162
+ WORK = "work",
163
+ WEB = "web",
164
+ ZOOM_IN = "zoom-in",
165
+ ZOOM_OUT = "zoom-out"
166
+ }
167
+
168
+ declare enum InputTypes {
169
+ GROUP = "GROUP",
170
+ TEXT = "TEXT",
171
+ TEXT_AR = "TEXT_AR",
172
+ STATUS = "STATUS",
173
+ DATE = "DATE",
174
+ NUMBER = "NUMBER",
175
+ CURRENCY = "CURRENCY",
176
+ BIG_INT_CURRENCY = "BIG_INT_CURRENCY",
177
+ MULTI_DATE = "MULTI_DATE",
178
+ SELECT = "SELECT",
179
+ MULTI_SELECT = "MULTI_SELECT",
180
+ PHONE_NUMBER = "PHONE_NUMBER",
181
+ FAX = "FAX",
182
+ EMAIL = "EMAIL",
183
+ PASSWORD = "PASSWORD",
184
+ AUTOCOMPLETE = "AUTOCOMPLETE",
185
+ TEXT_AREA = "TEXT_AREA",
186
+ MASK = "MASK",
187
+ CHECKBOX = "CHECK_BOX"
188
+ }
189
+ interface InputField<T> {
190
+ value: Signal<T | null>;
191
+ setValue: (value: T | null) => void;
192
+ touched: Signal<boolean>;
193
+ setTouched: () => void;
194
+ type?: InputTypes;
195
+ error?: Signal<string | null>;
196
+ required?: Signal<boolean>;
197
+ label?: Signal<string>;
198
+ placeholder?: Signal<string>;
199
+ options?: Signal<T[]>;
200
+ optionLabel?: keyof T;
201
+ optionValue?: keyof T;
202
+ }
203
+
204
+ declare class ErpDate {
205
+ Icons: typeof Icons;
206
+ icon: i0.InputSignal<Icons>;
207
+ field: InputField<Date>;
208
+ open: i0.WritableSignal<boolean>;
209
+ get fieldValue(): Date | null;
210
+ get label(): string | undefined;
211
+ get placeholder(): string;
212
+ get touched(): boolean;
213
+ get required(): boolean;
214
+ day: i0.WritableSignal<number | undefined>;
215
+ month: i0.WritableSignal<number | undefined>;
216
+ year: i0.WritableSignal<number | undefined>;
217
+ displayedValue: i0.WritableSignal<string>;
218
+ calendarMatrix: i0.Signal<{
219
+ day: number;
220
+ currentMonth: boolean;
221
+ }[][]>;
222
+ daysCode: string[];
223
+ constructor();
224
+ ngOnInit(): void;
225
+ toggleOpen(event: MouseEvent): void;
226
+ initCurrentDate(): void;
227
+ getCalendarMatrix(year: number, month: number): {
228
+ day: number;
229
+ currentMonth: boolean;
230
+ }[][];
231
+ previousMonth(event: MouseEvent): void;
232
+ nextMonth(event: MouseEvent): void;
233
+ setMonth(month: number): void;
234
+ setYear(year: number): void;
235
+ getMonthCode(): string;
236
+ getDayNumber(day: number): string;
237
+ getMonthNumber(month: number): string;
238
+ selectDate(event: MouseEvent, day: number): void;
239
+ dayIsCurrent(day: number): boolean;
240
+ dayIsSelected(day: number): boolean;
241
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpDate, never>;
242
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErpDate, "erp-date", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
243
+ }
244
+
245
+ declare class ErpInputText<String> {
246
+ Icons: typeof Icons;
247
+ icon: i0.InputSignal<Icons | undefined>;
248
+ field: InputField<String>;
249
+ get label(): string | undefined;
250
+ get placeholder(): string;
251
+ get touched(): boolean;
252
+ get required(): boolean;
253
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpInputText<any>, never>;
254
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErpInputText<any>, "erp-input-text", never, { "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
255
+ }
256
+
257
+ declare class ErpSelect<T extends object> {
258
+ private eRef;
259
+ selectedTemplate?: TemplateRef<any>;
260
+ optionTemplate?: TemplateRef<any>;
261
+ icon: i0.InputSignal<Icons>;
262
+ field: InputField<T>;
263
+ open: i0.WritableSignal<boolean>;
264
+ get fieldValue(): T | null;
265
+ get label(): string | undefined;
266
+ get placeholder(): string;
267
+ get options(): T[];
268
+ get optionValue(): keyof T;
269
+ get optionLabel(): keyof T;
270
+ get touched(): boolean;
271
+ get error(): string | null | undefined;
272
+ get displayValue(): string;
273
+ get required(): boolean;
274
+ constructor(eRef: ElementRef);
275
+ toggleOpen(event: MouseEvent): void;
276
+ select(option: T): void;
277
+ clickOutside(event: Event): void;
278
+ getOptionLabel(option: T): string;
279
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpSelect<any>, never>;
280
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErpSelect<any>, "erp-select", never, { "selectedTemplate": { "alias": "selectedTemplate"; "required": false; }; "optionTemplate": { "alias": "optionTemplate"; "required": false; }; "icon": { "alias": "icon"; "required": false; "isSignal": true; }; "field": { "alias": "field"; "required": false; }; }, {}, never, never, true, never>;
281
+ }
282
+
283
+ declare class ErpStatusCell {
284
+ label: i0.InputSignal<string>;
285
+ textColor: string | undefined;
286
+ backgroundColor: string | undefined;
287
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpStatusCell, never>;
288
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErpStatusCell, "erp-status-cell", never, { "label": { "alias": "label"; "required": true; "isSignal": true; }; "textColor": { "alias": "textColor"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; }, {}, never, never, true, never>;
289
+ }
290
+
291
+ interface Status {
292
+ label: string;
293
+ textColor: string;
294
+ background: string;
295
+ buttonBackground?: string;
296
+ buttonTextColor?: string;
297
+ }
298
+
299
+ interface Action {
300
+ title: string;
301
+ icon: Icons;
302
+ status?: Status;
303
+ disabled?: boolean;
304
+ hasRole: (item?: any) => boolean;
305
+ execute: (body: any) => void;
306
+ }
307
+
308
+ interface ColumnDef<T> {
309
+ key: keyof T;
310
+ header: string;
311
+ cellAlignment?: "START" | "END" | "CENTER";
312
+ type?: InputTypes;
313
+ }
314
+ declare class ErpTable<T extends object> {
315
+ Icons: typeof Icons;
316
+ columns: i0.ModelSignal<ColumnDef<T>[]>;
317
+ data: i0.ModelSignal<T[]>;
318
+ idCol: i0.ModelSignal<keyof T | null>;
319
+ selectedData: i0.ModelSignal<T[]>;
320
+ rowSelection: boolean;
321
+ withPagination: boolean;
322
+ templates: Partial<Record<keyof T, TemplateRef<any>>>;
323
+ actionHeaderLabel: string;
324
+ selectedItemsLabel: string | undefined;
325
+ selectActions: i0.ModelSignal<Action[]>;
326
+ perItemActions: i0.ModelSignal<Action[]>;
327
+ bottomBarFading: i0.WritableSignal<boolean>;
328
+ constructor();
329
+ ngOnInit(): void;
330
+ getTemplate(key: keyof T): TemplateRef<any> | undefined;
331
+ isAllToggled: Signal<boolean>;
332
+ toggleAll(): void;
333
+ toggleRow(row: T): void;
334
+ isRowSelected(row: T): boolean;
335
+ clearSelectedData(): void;
336
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpTable<any>, never>;
337
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErpTable<any>, "erp-table", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "idCol": { "alias": "idCol"; "required": false; "isSignal": true; }; "selectedData": { "alias": "selectedData"; "required": false; "isSignal": true; }; "rowSelection": { "alias": "rowSelection"; "required": false; }; "withPagination": { "alias": "withPagination"; "required": false; }; "templates": { "alias": "templates"; "required": false; }; "actionHeaderLabel": { "alias": "actionHeaderLabel"; "required": false; }; "selectedItemsLabel": { "alias": "selectedItemsLabel"; "required": false; }; "selectActions": { "alias": "selectActions"; "required": false; "isSignal": true; }; "perItemActions": { "alias": "perItemActions"; "required": false; "isSignal": true; }; }, { "columns": "columnsChange"; "data": "dataChange"; "idCol": "idColChange"; "selectedData": "selectedDataChange"; "selectActions": "selectActionsChange"; "perItemActions": "perItemActionsChange"; }, never, never, true, never>;
338
+ }
339
+
340
+ declare class ErpUserCell {
341
+ firstName: string;
342
+ lastName: string;
343
+ email: string;
344
+ constructor();
345
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpUserCell, never>;
346
+ static ɵcmp: i0.ɵɵComponentDeclaration<ErpUserCell, "erp-user-cell", never, { "firstName": { "alias": "firstName"; "required": false; }; "lastName": { "alias": "lastName"; "required": false; }; "email": { "alias": "email"; "required": false; }; }, {}, never, never, true, never>;
347
+ }
348
+
349
+ declare abstract class BaseEntity {
350
+ id: number;
351
+ createdAt: Date;
352
+ updatedAt: Date;
353
+ createdBy: string;
354
+ updatedBy: string;
355
+ archived: boolean;
356
+ attributes?: Record<string, unknown>;
357
+ }
358
+ /** */
359
+ interface ErpResponse<T> {
360
+ data: T | null;
361
+ message: string;
362
+ success: boolean;
363
+ statusCode: number;
364
+ errors?: ErpError[];
365
+ meta?: any;
366
+ }
367
+ interface ErpError {
368
+ field?: string;
369
+ code: string;
370
+ message: string;
371
+ }
372
+ interface ErpPaginatedResponse<T> {
373
+ content: T[];
374
+ page: number;
375
+ size: number;
376
+ totalElements: number;
377
+ totalPages: number;
378
+ last: boolean;
379
+ }
380
+
381
+ declare class ErpApiService {
382
+ private readonly http;
383
+ private readonly config;
384
+ private baseUrl;
385
+ constructor();
386
+ get<T>(endpoint: string, params?: Record<string, string>): Observable<T>;
387
+ getPaginated<T>(endpoint: string, params?: Record<string, string>): Observable<ErpPaginatedResponse<T>>;
388
+ getByID<T>(endpoint: string, id: number, params?: Record<string, string>): Observable<T>;
389
+ post<T>(endpoint: string, body: unknown): Observable<any>;
390
+ put<T>(endpoint: string, body: unknown): Observable<ErpResponse<T>>;
391
+ patch<T>(endpoint: string, body: unknown): Observable<ErpResponse<T>>;
392
+ delete<T>(endpoint: string): Observable<ErpResponse<T>>;
393
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpApiService, never>;
394
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErpApiService>;
395
+ }
396
+
397
+ declare class ErpAuthService {
398
+ private readonly keycloak;
399
+ /** True when the user has an active Keycloak session */
400
+ readonly isAuthenticated: i0.WritableSignal<boolean>;
401
+ /** Decoded token payload as a signal */
402
+ readonly tokenParsed: i0.WritableSignal<Record<string, unknown> | undefined>;
403
+ /** Convenience: logged-in username */
404
+ readonly username: i0.Signal<string>;
405
+ /** Convenience: user's realm roles */
406
+ readonly roles: i0.Signal<string[]>;
407
+ /**
408
+ * Redirect to the Keycloak login page.
409
+ * @param redirectUri Where to return after login. Defaults to current URL.
410
+ */
411
+ login(redirectUri?: string): Promise<void>;
412
+ /**
413
+ * Logout and redirect.
414
+ * @param redirectUri Where to redirect after logout. Defaults to current origin.
415
+ */
416
+ logout(redirectUri?: string): Promise<void>;
417
+ /**
418
+ * Redirect to Keycloak's account management page.
419
+ */
420
+ manageAccount(): Promise<void>;
421
+ /**
422
+ * Get the current bearer token string (for manual use if needed).
423
+ */
424
+ getToken(): Promise<string>;
425
+ /**
426
+ * Check if the user has a specific realm role.
427
+ */
428
+ hasRole(role: string): boolean;
429
+ /**
430
+ * Check if the user has a specific resource (client) role.
431
+ */
432
+ hasResourceRole(role: string, resource?: string): boolean;
433
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpAuthService, never>;
434
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErpAuthService>;
435
+ }
436
+
437
+ interface Config {
438
+ hostOrigin: string;
439
+ remoteOrigin: string;
440
+ backOrigin: string;
441
+ }
442
+ declare class ErpConfigService {
443
+ private hostOrigin;
444
+ private remoteOrigin;
445
+ private backOrigin;
446
+ constructor();
447
+ setConfig(config: Config): void;
448
+ setHostOrigin(origin: string): void;
449
+ setRemoteOrigin(origin: string): void;
450
+ setBackOrigin(origin: string): void;
451
+ getConfig(): Config;
452
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpConfigService, never>;
453
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErpConfigService>;
454
+ }
455
+
456
+ type NotificationType = "success" | "error" | "warning" | "info";
457
+ interface ErpNotification {
458
+ id: number;
459
+ type: NotificationType;
460
+ title: string;
461
+ message?: string;
462
+ duration?: number;
463
+ }
464
+ declare class ErpNotificationService {
465
+ readonly notifications: i0.WritableSignal<ErpNotification[]>;
466
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpNotificationService, never>;
467
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErpNotificationService>;
468
+ }
469
+
470
+ declare class ErpTranslationService {
471
+ private http;
472
+ translate: TranslateService;
473
+ config: ErpConfigService;
474
+ constructor(http: HttpClient);
475
+ getHostTranslationForKey(key: string, lang?: string): Observable<string>;
476
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpTranslationService, never>;
477
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErpTranslationService>;
478
+ }
479
+
480
+ type ErpLang = string;
481
+ declare class ErpI18nService {
482
+ private readonly translate;
483
+ /** Reactive signal of the currently active language */
484
+ readonly currentLang: i0.WritableSignal<string>;
485
+ constructor();
486
+ /**
487
+ * Switch the active language and persist the choice to localStorage.
488
+ */
489
+ use(lang: ErpLang): Observable<unknown>;
490
+ /**
491
+ * Restore the persisted language on app startup.
492
+ * Call this in your root component's ngOnInit or APP_INITIALIZER.
493
+ */
494
+ restorePersistedLang(): void;
495
+ /**
496
+ * Translate a key instantly (synchronous).
497
+ */
498
+ instant(key: string, params?: Record<string, unknown>): string;
499
+ /**
500
+ * Translate a key reactively (observable — auto-updates on lang change).
501
+ */
502
+ get(key: string, params?: Record<string, unknown>): Observable<string>;
503
+ static ɵfac: i0.ɵɵFactoryDeclaration<ErpI18nService, never>;
504
+ static ɵprov: i0.ɵɵInjectableDeclaration<ErpI18nService>;
505
+ }
506
+
507
+ interface ErpTranslateConfig {
508
+ /**
509
+ * Path to the consuming app's translation JSON files.
510
+ * Default: 'assets/i18n/'
511
+ */
512
+ translationsPath?: string;
513
+ /**
514
+ * Default and fallback language.
515
+ * Default: 'fr'
516
+ */
517
+ defaultLang?: string;
518
+ }
519
+ /**
520
+ * Call once in your app.config.ts providers array.
521
+ *
522
+ * @example
523
+ * export const appConfig: ApplicationConfig = {
524
+ * providers: [
525
+ * provideHttpClient(),
526
+ * provideErpTranslate({ defaultLang: 'fr' }),
527
+ * ],
528
+ * };
529
+ */
530
+ declare function provideErpTranslate(config?: ErpTranslateConfig): EnvironmentProviders;
531
+ declare class CustomTranslateLoader implements TranslateLoader {
532
+ private http;
533
+ constructor(http: HttpClient);
534
+ getTranslation(lang: string): Observable<any>;
535
+ }
536
+ declare function HttpLoaderFactory(http: HttpClient): CustomTranslateLoader;
537
+
538
+ interface ErpPageRequest {
539
+ page?: number;
540
+ size?: number;
541
+ sort?: string;
542
+ }
543
+ /** parametters for pagination (e.g. ) toPageParams({ page: 0, size: 10, sort: 'createdAt' })*/
544
+ declare function toPageParams(req: ErpPageRequest): Record<string, string>;
545
+
546
+ interface ErpUser {
547
+ id: number;
548
+ username: string;
549
+ email: string;
550
+ firstName: string;
551
+ lastName: string;
552
+ role: ErpUserRole;
553
+ permissions: string[];
554
+ createdAt: string;
555
+ updatedAt: string;
556
+ }
557
+ type ErpUserRole = "admin" | "manager" | "user" | "viewer";
558
+ interface ErpUserProfile extends ErpUser {
559
+ avatar?: string;
560
+ phone?: string;
561
+ department?: string;
562
+ lastLogin?: string;
563
+ }
564
+
565
+ interface ICategorieSocioProf {
566
+ id: number;
567
+ libelleFr?: string;
568
+ libelleAr?: string;
569
+ libelleEn?: string;
570
+ }
571
+
572
+ declare class CategorieSocioProfRequest {
573
+ libelleFr?: string;
574
+ libelleAr?: string;
575
+ libelleEn?: string;
576
+ constructor(data?: Partial<CategorieSocioProfRequest>);
577
+ }
578
+
579
+ declare class CategorieSocioProf extends BaseEntity implements ICategorieSocioProf {
580
+ libelleFr?: string;
581
+ libelleAr?: string;
582
+ libelleEn?: string;
583
+ toJson(): CategorieSocioProfRequest;
584
+ static fromJson(data: any): CategorieSocioProf;
585
+ }
586
+
587
+ interface IGrille {
588
+ id: number;
589
+ section?: string;
590
+ indice?: string;
591
+ sbase?: number;
592
+ statut?: boolean;
593
+ }
594
+
595
+ declare class GrilleRequest {
596
+ section?: string;
597
+ indice?: string;
598
+ sbase?: number;
599
+ statut?: boolean;
600
+ constructor(data?: Partial<GrilleRequest>);
601
+ }
602
+
603
+ declare class Grille extends BaseEntity implements IGrille {
604
+ section?: string;
605
+ indice?: string;
606
+ sbase?: number;
607
+ statut?: boolean;
608
+ toJson(): GrilleRequest;
609
+ static fromJson(data: any): Grille;
610
+ }
611
+
612
+ interface IFichePoste {
613
+ id: number;
614
+ libelleFr?: string;
615
+ libelleAr?: string;
616
+ libelleEn?: string;
617
+ grille?: Grille;
618
+ }
619
+
620
+ declare class FichePosteRequest {
621
+ libelleFr?: string;
622
+ libelleAr?: string;
623
+ libelleEn?: string;
624
+ grilleId?: number;
625
+ constructor(data?: Partial<FichePosteRequest>);
626
+ }
627
+
628
+ declare class FichePoste extends BaseEntity implements IFichePoste {
629
+ libelleFr?: string;
630
+ libelleAr?: string;
631
+ libelleEn?: string;
632
+ grille?: Grille;
633
+ toJson(): FichePosteRequest;
634
+ static fromJson(data: any): FichePoste;
635
+ }
636
+
637
+ declare enum SensComptable {
638
+ DEBIT = "DEBIT",
639
+ CREDIT = "CREDIT"
640
+ }
641
+ declare const SensComptableList: {
642
+ key: string;
643
+ value: SensComptable;
644
+ }[];
645
+
646
+ interface IPlanComptable {
647
+ id: number;
648
+ libelleFr?: string;
649
+ libelleAr?: string;
650
+ libelleEn?: string;
651
+ sens?: SensComptable;
652
+ }
653
+
654
+ declare class PlanComptableRequest {
655
+ id?: number;
656
+ libelleFr?: string;
657
+ libelleAr?: string;
658
+ libelleEn?: string;
659
+ sens?: SensComptable;
660
+ constructor(data?: Partial<PlanComptableRequest>);
661
+ }
662
+
663
+ declare class PlanComptable extends BaseEntity implements IPlanComptable {
664
+ id: any;
665
+ libelleFr?: string;
666
+ libelleAr?: string;
667
+ libelleEn?: string;
668
+ sens?: SensComptable;
669
+ toJson(): PlanComptableRequest;
670
+ static fromJson(data: any): PlanComptable;
671
+ }
672
+
673
+ declare enum TypeRubrique {
674
+ FIXE = "FIXE",
675
+ VARIABLE = "VARIABLE"
676
+ }
677
+ declare const TypeRubriqueList: {
678
+ key: string;
679
+ value: TypeRubrique;
680
+ }[];
681
+
682
+ interface IPlanRubrique {
683
+ id: number;
684
+ codeRubrique?: string;
685
+ libelleFr?: string;
686
+ libelleAr?: string;
687
+ libelleEn?: string;
688
+ sens?: string;
689
+ modeCalcul?: string;
690
+ typeRubrique?: TypeRubrique;
691
+ }
692
+
693
+ declare class PlanRubriqueRequest {
694
+ codeRubrique?: string;
695
+ libelleFr?: string;
696
+ libelleAr?: string;
697
+ libelleEn?: string;
698
+ sens?: string;
699
+ modeCalcul?: string;
700
+ typeRubrique?: TypeRubrique;
701
+ constructor(data?: Partial<PlanRubriqueRequest>);
702
+ }
703
+
704
+ declare class PlanRubrique extends BaseEntity implements IPlanRubrique {
705
+ codeRubrique?: string;
706
+ libelleFr?: string;
707
+ libelleAr?: string;
708
+ libelleEn?: string;
709
+ sens?: string;
710
+ modeCalcul?: string;
711
+ typeRubrique?: TypeRubrique;
712
+ toJson(): PlanRubriqueRequest;
713
+ static fromJson(data: any): PlanRubrique;
714
+ }
715
+
716
+ interface ITypeConge {
717
+ id: number;
718
+ libelleFr?: string;
719
+ libelleAr?: string;
720
+ libelleEn?: string;
721
+ }
722
+
723
+ declare class TypeCongeRequest {
724
+ libelleFr?: string;
725
+ libelleAr?: string;
726
+ libelleEn?: string;
727
+ constructor(data?: Partial<TypeCongeRequest>);
728
+ }
729
+
730
+ declare class TypeConge extends BaseEntity implements ITypeConge {
731
+ libelleFr?: string;
732
+ libelleAr?: string;
733
+ libelleEn?: string;
734
+ toJson(): TypeCongeRequest;
735
+ static fromJson(data: any): TypeConge;
736
+ }
737
+
738
+ interface ITypeContrat {
739
+ id: number;
740
+ libelleAr?: string;
741
+ libelleEn?: string;
742
+ libelleFr?: string;
743
+ }
744
+
745
+ declare class TypeContratRequest {
746
+ libelleEn?: string;
747
+ libelleFr?: string;
748
+ libelleAr?: string;
749
+ constructor(data?: Partial<TypeContratRequest>);
750
+ }
751
+
752
+ declare class TypeContrat extends BaseEntity implements ITypeContrat {
753
+ libelleAr?: string;
754
+ libelleEn?: string;
755
+ libelleFr?: string;
756
+ toJson(): TypeContratRequest;
757
+ static fromJson(data: any): TypeContrat;
758
+ }
759
+
760
+ interface ITypeFormation {
761
+ id: number;
762
+ libelleFr?: string;
763
+ libelleAr?: string;
764
+ libelleEn?: string;
765
+ }
766
+
767
+ declare class TypeFormationRequest {
768
+ libelleFr?: string;
769
+ libelleAr?: string;
770
+ libelleEn?: string;
771
+ constructor(data?: Partial<TypeFormationRequest>);
772
+ }
773
+
774
+ declare class TypeFormation extends BaseEntity implements ITypeFormation {
775
+ libelleFr?: string;
776
+ libelleAr?: string;
777
+ libelleEn?: string;
778
+ toJson(): TypeFormationRequest;
779
+ static fromJson(data: any): TypeFormation;
780
+ }
781
+
782
+ interface ITypeSanction {
783
+ id: number;
784
+ libelleFr?: string;
785
+ libelleAr?: string;
786
+ libelleEn?: string;
787
+ }
788
+
789
+ declare class TypeSanctionRequest {
790
+ libelleFr?: string;
791
+ libelleAr?: string;
792
+ libelleEn?: string;
793
+ constructor(data?: Partial<TypeSanctionRequest>);
794
+ }
795
+
796
+ declare class TypeSanction extends BaseEntity implements ITypeSanction {
797
+ libelleFr?: string;
798
+ libelleAr?: string;
799
+ libelleEn?: string;
800
+ toJson(): TypeSanctionRequest;
801
+ static fromJson(data: any): TypeSanction;
802
+ }
803
+
804
+ export { BaseEntity, ButtonComponent, CategorieSocioProf, CategorieSocioProfRequest, CustomTranslateLoader, ErpApiService, ErpAuthService, ErpConfigService, ErpDate, ErpI18nService, ErpInputText, ErpNotificationService, ErpSelect, ErpStatusCell, ErpTable, ErpTranslationService, ErpUserCell, FichePoste, FichePosteRequest, Grille, GrilleRequest, HttpLoaderFactory, Icons, InputTypes, PlanComptable, PlanComptableRequest, PlanRubrique, PlanRubriqueRequest, SensComptable, SensComptableList, TypeConge, TypeCongeRequest, TypeContrat, TypeContratRequest, TypeFormation, TypeFormationRequest, TypeRubrique, TypeRubriqueList, TypeSanction, TypeSanctionRequest, provideErpTranslate, toPageParams };
805
+ export type { Action, ButtonSize, ButtonVariant, ColumnDef, Config, ErpError, ErpLang, ErpNotification, ErpPageRequest, ErpPaginatedResponse, ErpResponse, ErpTranslateConfig, ErpUser, ErpUserProfile, ErpUserRole, ICategorieSocioProf, IFichePoste, IGrille, IPlanComptable, IPlanRubrique, ITypeConge, ITypeContrat, ITypeFormation, ITypeSanction, InputField, NotificationType, Status };
806
+ //# sourceMappingURL=erp-library-itdev.d.ts.map