bc-primeng-ui 0.0.1

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/index.d.ts ADDED
@@ -0,0 +1,1264 @@
1
+ import { TableFilterButtonPropsOptions, Table, TableRowExpandEvent, TableLazyLoadEvent } from 'primeng/table';
2
+ import { SelectItem, MessageService, Confirmation, SortMeta } from 'primeng/api';
3
+ import * as i0 from '@angular/core';
4
+ import { OnInit, EventEmitter, Injector, AfterViewInit, DestroyRef, Type, WritableSignal, Signal, TemplateRef, OnChanges, InputSignal, SimpleChanges, PipeTransform, OutputEmitterRef } from '@angular/core';
5
+ import { ControlValueAccessor, ControlContainer, AbstractControl, FormControl, FormGroup, FormArray, FormBuilder } from '@angular/forms';
6
+ import { Router } from '@angular/router';
7
+ import * as rxjs from 'rxjs';
8
+ import { Observable } from 'rxjs';
9
+ import { HttpClient, HttpParams, HttpInterceptorFn } from '@angular/common/http';
10
+ import { TranslocoService, TranslocoLoader, Translation } from '@jsverse/transloco';
11
+ import { DialogService, DynamicDialogRef, DynamicDialogConfig } from 'primeng/dynamicdialog';
12
+
13
+ declare abstract class BCBaseModel {
14
+ id: number;
15
+ active?: boolean;
16
+ /**
17
+ * Converts a date string (ex: "YYYY-MM-DD") coming from a DateOnly from the API
18
+ * to a Date object, safely, avoiding timezone problems.
19
+ */
20
+ protected fromApiDateOnly(dateOnlyString: string | Date | null | undefined): Date | null;
21
+ /**
22
+ * Very simple constructor: just assigns any key from `init` to this.
23
+ * If the JSON comes with dateUpdate as a string and you want to convert it to Date,
24
+ * you can handle it manually where needed. Here we just throw everything into the object.
25
+ */
26
+ constructor(init?: Partial<BCBaseModel>);
27
+ /**
28
+ If you still want to have an encapsulated fromJson, you can use this method.
29
+ * But, if you prefer, just always do `new FooModel(obj)`.
30
+ */
31
+ static fromJson<T extends BCBaseModel>(this: new (init?: Partial<T>) => T, json: Partial<T>): T;
32
+ /**
33
+ * Transforms the instance into a "plain" object (for example, to send back
34
+ * to the server). Here we just return a simple clone, without date conversion.
35
+ */
36
+ toJson(): any;
37
+ }
38
+
39
+ interface ISelectItem {
40
+ id: any;
41
+ label: string;
42
+ groupBy?: string | null;
43
+ disabled?: boolean;
44
+ }
45
+
46
+ interface ApiResponse<T> {
47
+ success: boolean;
48
+ statusCode: number;
49
+ data: T;
50
+ messages: string[];
51
+ dateTimeUtc: string;
52
+ }
53
+
54
+ /**
55
+ * Represents the display options for a column filter in a table or grid layout.
56
+ *
57
+ * The `ColumnFilterDisplay` type allows specifying how a column filter will be displayed.
58
+ * It provides two options:
59
+ * - `'row'`: The filter will be displayed inline as part of the row.
60
+ * - `'menu'`: The filter will be displayed within a menu.
61
+ */
62
+ type ColumnFilterDisplay = 'row' | 'menu';
63
+ /**
64
+ * Represents the type of a column filter in a data table or similar structure.
65
+ * Allows specifying different types of filters for columns, enabling appropriate
66
+ * filtering based on the data type of the column.
67
+ *
68
+ * - 'text': Defines a filter where data can be filtered based on plain string matching.
69
+ * - 'numeric': Specifies a filter for numeric values.
70
+ * - 'decimal': Represents a filter for decimal or floating-point numbers.
71
+ * - 'date': Used for filtering date values.
72
+ * - 'boolean': Allows filtering data based on boolean values (true/false).
73
+ * - 'select': Indicates a dropdown or selectable options-type filter.
74
+ * - string: Extends support for custom filter types as a string.
75
+ *
76
+ * This type is useful for configuring and managing dynamic filtering mechanisms
77
+ * in UI components or APIs.
78
+ */
79
+ type ColumnFilterType = 'text' | 'numeric' | 'decimal' | 'date' | 'boolean' | 'select' | string;
80
+ /**
81
+ * Represents a type definition for input filtering strategies.
82
+ *
83
+ * The `FilterOn` type is used to determine when a filter should be applied
84
+ * based on user interaction. It provides the following predefined options:
85
+ * - 'enter': Indicates that the filter should be applied when the user presses Enter.
86
+ * - 'input': Indicates that the filter should be applied dynamically as the user types.
87
+ */
88
+ type FilterOn = 'enter' | 'input';
89
+ interface ColumnFilter {
90
+ /** Defines the aria-label of the form element. */
91
+ ariaLabel?: string | null;
92
+ /** Enables currency input (ex.: 'BRL'). */
93
+ currency?: string | null;
94
+ /** Defines the display of the currency input. */
95
+ currencyDisplay?: string | null;
96
+ /**
97
+ * An object that represents customizable options for a specific feature or functionality.
98
+ * This variable can store various configuration settings or user-defined values.
99
+ * The structure and type of the content are flexible and depend on the implementation context.
100
+ */
101
+ customOptions?: any;
102
+ /** Filter display. */
103
+ display?: ColumnFilterDisplay;
104
+ /** Property represented by the column. */
105
+ field?: string;
106
+ /**
107
+ * Used to pass all filter button property object
108
+ * @default
109
+ * {
110
+ * filter: { severity: 'secondary', text: true, rounded: true },
111
+ * inline: { clear: { severity: 'secondary', text: true, rounded: true } },
112
+ * popover: {
113
+ * addRule: { severity: 'info', text: true, size: 'small' },
114
+ * removeRule: { severity: 'danger', text: true, size: 'small' },
115
+ * apply: { size: 'small' },
116
+ * clear: { outlined: true, size: 'small' }
117
+ * }
118
+ * }
119
+ */
120
+ filterButtonProps?: TableFilterButtonPropsOptions;
121
+ /**
122
+ * Default trigger to run filtering on built-in text and numeric filters.
123
+ * Valid values: 'enter' | 'input'
124
+ */
125
+ filterOn?: FilterOn;
126
+ /** Decides whether to close the popup on clear button click. */
127
+ hideOnClear?: boolean;
128
+ /** Defines filter locale (ex.: 'pt-BR'). */
129
+ locale?: string | null;
130
+ /** Defines filter locale matcher. */
131
+ localeMatcher?: string | null;
132
+ /** Filter match mode. */
133
+ matchMode?: string | null;
134
+ /** Filter match mode options. */
135
+ matchModeOptions?: SelectItem<any>[] | null;
136
+ /** Defines maximum number of constraints. */
137
+ maxConstraints?: number;
138
+ /** Defines a maximum fraction of digits. */
139
+ maxFractionDigits?: number | null;
140
+ /** Defines a minimum fraction of digits. */
141
+ minFractionDigits?: number | null;
142
+ /** Filter operator. */
143
+ operator?: string;
144
+ /** Filter placeholder. */
145
+ placeholder?: string;
146
+ /** Defines prefix of the filter (ex.: "R$"). */
147
+ prefix?: string;
148
+ /** Decides whether to display add filter button when display is a menu. */
149
+ showAddButton?: boolean;
150
+ /** Decides whether to display the applied filter button when display is a menu. */
151
+ showApplyButton?: boolean;
152
+ /** Defines the visibility of buttons. */
153
+ showButtons?: boolean;
154
+ /** Decides whether to display the clear filter button when display is a menu. */
155
+ showClearButton?: boolean;
156
+ /** Decides whether to display filter match modes when display is a menu. */
157
+ showMatchModes?: boolean;
158
+ /** Decides whether to display the filter menu popup. */
159
+ showMenu?: boolean;
160
+ /** Decides whether to display a filter operator. */
161
+ showOperator?: boolean;
162
+ /** Defines suffix of the filter (ex.: "%"). */
163
+ suffix?: string;
164
+ /**
165
+ * Defines the type of filter applied to a column.
166
+ * The value must be of a type compatible with the `ColumnFilterType` interface or type definition.
167
+ * This property determines the specific filtering mechanism or logic used for the column.
168
+ */
169
+ type?: ColumnFilterType;
170
+ /** Defines if grouping is enabled in numeric/currency inputs. */
171
+ useGrouping?: boolean;
172
+ /** Defines minimum value for inputs. */
173
+ minValue?: any;
174
+ /** Defines minimum value for inputs. */
175
+ maxValue?: any;
176
+ }
177
+ /**
178
+ * Defines the configuration for a column in the generic table.
179
+ * @template T The data object type of the row.
180
+ */
181
+ interface BCColumnHeader<T> {
182
+ /** The name of the property in the data object to be displayed. */
183
+ field: keyof T | (string & {});
184
+ /** The translation key for the column header title. */
185
+ header: string;
186
+ /**
187
+ * Additional parameters for the header translation, if needed.
188
+ */
189
+ headerParams?: {};
190
+ hasTranslate?: boolean;
191
+ /**
192
+ * Defines how the cell content should be rendered.
193
+ * - 'text' (default): Just text.
194
+ * - 'badge': Renders as a <p-badge> component.
195
+ * - 'image': Renders an avatar with an image and a name next to it.
196
+ */
197
+ displayAs?: 'text' | 'number' | 'currency' | 'date' | 'yesNo' | 'badge' | 'image';
198
+ /**
199
+ * Used when displayAs is 'image'. Specifies which field of the data object
200
+ * contains the name/text to be displayed next to the avatar.
201
+ */
202
+ nameField?: keyof T | (string & {});
203
+ /**
204
+ * Used when displayAs is 'badge'. Maps the cell values to the
205
+ * "severities" (colors) of the PrimeNG Badge.
206
+ * Example: { 'Complete': 'success', 'Pending': 'warning' }
207
+ */
208
+ badgeSeverityMap?: {
209
+ [key: string]: string;
210
+ };
211
+ /** An Angular pipe to be applied to the value (e.g., 'currency', 'date'). */
212
+ pipe?: string;
213
+ /** Arguments for the pipe (e.g., date or currency format). */
214
+ pipeArgs?: any;
215
+ /** A custom formatting function. Has priority over pipes. */
216
+ formatter?: (value: any, item?: T) => string;
217
+ /** For the 'lookup' pipe, specifies the type of lookup to be used. */
218
+ lookupType?: string;
219
+ /** Used by formatters/pipes to know the type of the enum. */
220
+ enumType?: string;
221
+ /** If the column can be hidden by the column selector. */
222
+ optional?: boolean;
223
+ /** If the optional column should be selected by default. */
224
+ defaultSelected?: boolean;
225
+ /** Inline CSS styles for the column (e.g., 'min-width: 150px;'). */
226
+ style?: string;
227
+ /** The order of display for the column. */
228
+ order?: number;
229
+ /** If the column should have a filter in the header. */
230
+ filter?: ColumnFilter;
231
+ /** If the column can be sorted. */
232
+ sortable?: boolean;
233
+ }
234
+
235
+ declare class CustomDatepickerComponent implements ControlValueAccessor, OnInit {
236
+ private controlContainer;
237
+ private injector;
238
+ formControlName: string;
239
+ control: any;
240
+ placeholder?: string;
241
+ label: string;
242
+ secondLabel?: string;
243
+ required: boolean;
244
+ isDisabled: boolean;
245
+ dateFormat: string;
246
+ showTime: boolean;
247
+ hourFormat: '12' | '24';
248
+ dataType: 'date' | 'string' | 'number';
249
+ blur: EventEmitter<any>;
250
+ dateSelect: EventEmitter<Date>;
251
+ valueChange: EventEmitter<any>;
252
+ private onChange;
253
+ private onTouched;
254
+ constructor(controlContainer: ControlContainer, injector: Injector);
255
+ private ngControlInstance;
256
+ ngOnInit(): void;
257
+ writeValue(value: any): void;
258
+ registerOnChange(fn: any): void;
259
+ registerOnTouched(fn: any): void;
260
+ setDisabledState(isDisabled: boolean): void;
261
+ onInputBlur(): void;
262
+ onSelect(event: Date): void;
263
+ onInput(event: Event): void;
264
+ static ɵfac: i0.ɵɵFactoryDeclaration<CustomDatepickerComponent, [{ optional: true; }, null]>;
265
+ static ɵcmp: i0.ɵɵComponentDeclaration<CustomDatepickerComponent, "app-custom-datepicker", never, { "formControlName": { "alias": "formControlName"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "label": { "alias": "label"; "required": false; }; "secondLabel": { "alias": "secondLabel"; "required": false; }; "required": { "alias": "required"; "required": false; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "showTime": { "alias": "showTime"; "required": false; }; "hourFormat": { "alias": "hourFormat"; "required": false; }; "dataType": { "alias": "dataType"; "required": false; }; }, { "blur": "blur"; "dateSelect": "dateSelect"; "valueChange": "valueChange"; }, never, never, true, never>;
266
+ }
267
+
268
+ declare class FormFieldErrorComponent {
269
+ /** The control that has errors (it could be FormControl, FormGroup, FormArray…) */
270
+ control: AbstractControl | null;
271
+ /** "Readable" field name to display in the message (e.g., "CNPJ", "Email", etc.) */
272
+ fieldName: string;
273
+ /** "Extra class" to add to the <small> element */
274
+ style: string;
275
+ /** Parameter value (e.g., requiredLength, min, max) for the message */
276
+ _validatorValue?: string | number | {};
277
+ /**
278
+ * Returns the exact translation key (e.g., "core.validation.required")
279
+ * or `null` if there is no error to display.
280
+ */
281
+ get errorKey(): string | null;
282
+ get validatorValue(): any;
283
+ /** Preenche `_validatorValue` de acordo com o tipo de erro */
284
+ private extractValidatorValue;
285
+ static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldErrorComponent, never>;
286
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldErrorComponent, "bc-form-field-error", never, { "control": { "alias": "control"; "required": false; }; "fieldName": { "alias": "fieldName"; "required": false; }; "style": { "alias": "style"; "required": false; }; }, {}, never, never, true, never>;
287
+ }
288
+
289
+ declare class Country extends BCBaseModel {
290
+ name: string;
291
+ aossId?: string;
292
+ code?: string;
293
+ isoCode?: string;
294
+ cultureCode?: string;
295
+ flag?: string;
296
+ constructor(init?: Partial<Country>);
297
+ }
298
+
299
+ declare class CountryCustom extends BCBaseModel {
300
+ locale: string;
301
+ utc: number;
302
+ hasProvince: boolean;
303
+ currencyCode: string;
304
+ currencyDigitsInfo: string;
305
+ dateFormat: string;
306
+ dateTimeFormat: string;
307
+ zipCodeFormat: string;
308
+ zipCodeRegExpFormat: string;
309
+ zipCodeReplaceValue: string;
310
+ documentFormat: string;
311
+ documentRegExpFormat: string;
312
+ documentReplaceValue: string;
313
+ personDocumentFormat: string;
314
+ personDocumentRegExpFormat: string;
315
+ personDocumentReplaceValue: string;
316
+ zipCodeRequired: boolean;
317
+ addressNumberRequired: boolean;
318
+ country?: Country;
319
+ constructor(init?: Partial<CountryCustom>);
320
+ }
321
+
322
+ declare class Session extends BCBaseModel {
323
+ acceptedTerms: boolean;
324
+ entityId?: string;
325
+ countryId?: string;
326
+ userLoggedIn: boolean;
327
+ countryCustom?: CountryCustom;
328
+ environment?: string;
329
+ constructor(init?: Partial<Session>);
330
+ }
331
+
332
+ declare class CryptoService {
333
+ private readonly iterations;
334
+ private readonly hash;
335
+ private readonly salt;
336
+ /** Gera uma CryptoKey AES-GCM a partir da senha (sessionSecret). */
337
+ private getKey;
338
+ /** Encripta um texto com AES-GCM. Retorna Base64(nonce + ciphertext). */
339
+ encrypt(plain: string, password: string): Promise<string>;
340
+ /** Decripta Base64(nonce + ciphertext) e retorna o texto puro. */
341
+ decrypt(base64: string, password: string): Promise<string>;
342
+ static ɵfac: i0.ɵɵFactoryDeclaration<CryptoService, never>;
343
+ static ɵprov: i0.ɵɵInjectableDeclaration<CryptoService>;
344
+ }
345
+
346
+ declare class StorageService {
347
+ private crypto;
348
+ private sessionSecret;
349
+ constructor(crypto: CryptoService);
350
+ setLocalStorage(key: string, value: any): Promise<void>;
351
+ getLocalStorage<T = any>(key: string): Promise<T | undefined>;
352
+ removeLocalStorage(key: string): void;
353
+ setSessionStorage(key: string, value: any): Promise<void>;
354
+ getSessionStorage<T = any>(key: string): Promise<T | undefined>;
355
+ removeSessionStorage(key: string): void;
356
+ static ɵfac: i0.ɵɵFactoryDeclaration<StorageService, never>;
357
+ static ɵprov: i0.ɵɵInjectableDeclaration<StorageService>;
358
+ }
359
+
360
+ declare class SessionService {
361
+ private http;
362
+ private storageService;
363
+ private readonly sessionKey;
364
+ private sessionSubject;
365
+ session$: Observable<Session | null>;
366
+ constructor(http: HttpClient, storageService: StorageService);
367
+ /** Initializes the BehaviorSubject with the locally saved session. */
368
+ private initializeSession;
369
+ /**
370
+ * store encripted session without sessionStorage and update the BehaviorSubject.
371
+ */
372
+ saveSession(session: Session | null | undefined): Promise<void>;
373
+ getSession(): Promise<Session | undefined>;
374
+ /** reactive version with observable*/
375
+ getSession$(): Observable<Session | undefined>;
376
+ static ɵfac: i0.ɵɵFactoryDeclaration<SessionService, never>;
377
+ static ɵprov: i0.ɵɵInjectableDeclaration<SessionService>;
378
+ }
379
+
380
+ declare class SessionStoreService {
381
+ private sessionService;
382
+ private _session$;
383
+ session$: rxjs.Observable<Session | null>;
384
+ constructor(sessionService: SessionService);
385
+ private loadFromStorage;
386
+ /** Search in backend and stores in brwoser Storage*/
387
+ clear(): void;
388
+ static ɵfac: i0.ɵɵFactoryDeclaration<SessionStoreService, never>;
389
+ static ɵprov: i0.ɵɵInjectableDeclaration<SessionStoreService>;
390
+ }
391
+
392
+ declare class NotificationService {
393
+ private messageService;
394
+ constructor(messageService: MessageService);
395
+ success(detail: string, summary?: string): void;
396
+ error(detail: string, summary?: string): void;
397
+ info(detail: string, summary?: string): void;
398
+ warn(detail: string, summary?: string): void;
399
+ static ɵfac: i0.ɵɵFactoryDeclaration<NotificationService, never>;
400
+ static ɵprov: i0.ɵɵInjectableDeclaration<NotificationService>;
401
+ }
402
+
403
+ declare abstract class BCBaseComponent {
404
+ pageTitle: string;
405
+ session: Session | null;
406
+ disableControl: boolean;
407
+ writeAccess: boolean;
408
+ deleteAccess: boolean;
409
+ protected router: Router;
410
+ protected sessionStoreService: SessionStoreService;
411
+ protected notificationService: NotificationService;
412
+ ngOnInit(): void;
413
+ /** Toast notifications with PrimeNG MessageService */
414
+ protected showSuccess(msg: string): void;
415
+ protected showError(msg: string): void;
416
+ protected showInfo(msg: string): void;
417
+ protected showWarn(msg: string): void;
418
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCBaseComponent, never>;
419
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BCBaseComponent, never, never, {}, {}, never, never, true, never>;
420
+ }
421
+
422
+ declare class AppConfirmationService {
423
+ private primeConfirmation;
424
+ private transloco;
425
+ /**
426
+ * MUDANÇA: Um novo método genérico para qualquer tipo de confirmação.
427
+ * Usa padrões neutros que podem ser sobrescritos.
428
+ */
429
+ confirm(config: Partial<Confirmation>): Promise<boolean>;
430
+ /**
431
+ * MUDANÇA: O método de exclusão agora simplesmente chama o método genérico
432
+ * com suas próprias configurações padrão para exclusão.
433
+ */
434
+ confirmDelete(config?: Partial<Confirmation> & {
435
+ data?: any;
436
+ }): Promise<boolean>;
437
+ static ɵfac: i0.ɵɵFactoryDeclaration<AppConfirmationService, never>;
438
+ static ɵprov: i0.ɵɵInjectableDeclaration<AppConfirmationService>;
439
+ }
440
+
441
+ declare class SearchStateService {
442
+ private readonly STORAGE_KEY_PREFIX;
443
+ private searchSubjects;
444
+ constructor();
445
+ /**
446
+ * Sets the search parameters for a specific key.
447
+ * @param key The unique key for this search (e.g., 'products', 'users').
448
+ * @param params The search parameters.
449
+ */
450
+ setSearchParams(key: string, params: any): void;
451
+ /**
452
+ * Returns an Observable of the search parameters for a specific key.
453
+ * @param key The unique key for this search.
454
+ * @returns An Observable of the search parameters.
455
+ */
456
+ getSearchParams(key: string): Observable<any>;
457
+ /**
458
+ * Clears the search parameters for a specific key.
459
+ * @param key The unique key for this search.
460
+ */
461
+ clearSearchParams(key: string): void;
462
+ private saveToStorage;
463
+ private loadFromStorage;
464
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchStateService, never>;
465
+ static ɵprov: i0.ɵɵInjectableDeclaration<SearchStateService>;
466
+ }
467
+
468
+ interface SearchFieldConfig {
469
+ key: string;
470
+ label?: string;
471
+ type: 'text' | 'number' | 'date' | 'dropdown' | 'multiselect' | 'boolean';
472
+ placeholder?: string;
473
+ options?: {
474
+ label: string;
475
+ value: any;
476
+ }[];
477
+ filterBy?: string;
478
+ optionLabel?: string;
479
+ optionValue?: string;
480
+ showClear?: boolean;
481
+ disabled?: boolean | ((params: any) => boolean);
482
+ dateFormat?: string;
483
+ minDate?: Date;
484
+ maxDate?: Date;
485
+ size?: 'small' | 'medium' | 'large' | 'full' | 'auto' | string;
486
+ }
487
+
488
+ declare class BCFormItemBase {
489
+ value?: any;
490
+ key: string;
491
+ currentId: string;
492
+ label: string;
493
+ placeholder: string;
494
+ required: boolean;
495
+ order: number;
496
+ controlType: string;
497
+ type: string;
498
+ options: ISelectItem[];
499
+ buildInForm: boolean;
500
+ constructor(options?: {
501
+ value?: any;
502
+ key?: string;
503
+ currentId?: string;
504
+ label?: string;
505
+ placeholder?: string;
506
+ required?: boolean;
507
+ order?: number;
508
+ controlType?: string;
509
+ type?: string;
510
+ options?: ISelectItem[];
511
+ buildInForm?: boolean;
512
+ });
513
+ }
514
+
515
+ declare class Search extends BCBaseModel {
516
+ page?: number;
517
+ size?: number;
518
+ filter?: string;
519
+ url?: string;
520
+ isCollapsed: boolean;
521
+ mediaType?: 'PDF' | 'EXCEL';
522
+ groupByRegion?: boolean;
523
+ usedFilterReport: string;
524
+ activeTab: number;
525
+ activeSecoundTab: number;
526
+ activeThirdTab: number;
527
+ activeTerrainTab: number;
528
+ filterValue: string;
529
+ pageIndex: number;
530
+ pageSize: number;
531
+ matSortActive: string;
532
+ matSortDirection: any;
533
+ userSearchId?: string;
534
+ userSearchName?: string;
535
+ accessGroupId?: string;
536
+ accessGroupName?: string;
537
+ userName?: string;
538
+ deactivatedItems?: boolean;
539
+ description?: string;
540
+ dateStart?: Date;
541
+ dateStart2?: Date;
542
+ dateEnd?: Date;
543
+ dateEnd2?: Date;
544
+ companyId?: string;
545
+ companyName?: string;
546
+ ieId?: string;
547
+ imId?: string;
548
+ pjId?: string;
549
+ cadastralSituation?: number;
550
+ cadastralSituationName?: string;
551
+ cnae?: string;
552
+ cnaeId?: number;
553
+ searchEntityId?: string;
554
+ entityId?: string;
555
+ divisionId?: string;
556
+ unionId?: string;
557
+ associationId?: string;
558
+ departamentId?: string;
559
+ legalEntityId?: string;
560
+ mainLegalEntityId?: string;
561
+ entityTypeId?: string;
562
+ entityTypeName?: string;
563
+ entityStatus?: number;
564
+ fileTypeId?: string;
565
+ identificationId?: string;
566
+ documentType?: number;
567
+ fileTypeName?: string;
568
+ notificationTypeId?: string;
569
+ notificationTypeName?: string;
570
+ propertyTypeId?: string;
571
+ propertyTypeName?: string;
572
+ possessionTitleId?: string;
573
+ possessionTitleName?: string;
574
+ nomenclatureName?: string;
575
+ cnoId?: string;
576
+ minArea?: number;
577
+ maxArea?: number;
578
+ projetoAprovado?: number;
579
+ constructionPermit?: number;
580
+ cno?: number;
581
+ avcb?: number;
582
+ habitese?: number;
583
+ businessLicense?: number;
584
+ occurrenceType?: number;
585
+ street?: string;
586
+ streetNumber?: string;
587
+ district?: string;
588
+ zipCode?: string;
589
+ city?: string;
590
+ cityId?: string;
591
+ state?: string;
592
+ stateId?: string;
593
+ country?: string;
594
+ countryId?: string;
595
+ isAdmin?: boolean;
596
+ isDivision?: boolean;
597
+ isUnion?: boolean;
598
+ archivedItems?: boolean;
599
+ userIds?: string[];
600
+ conservationCategory?: string;
601
+ propertyCategory?: number;
602
+ frequency?: number;
603
+ value?: string;
604
+ viewMode?: number;
605
+ open?: boolean;
606
+ conservationItemIds?: string[];
607
+ propertyId?: string;
608
+ typeOfProperty?: number;
609
+ constructor(init?: Partial<Search>);
610
+ }
611
+
612
+ declare class SearchService {
613
+ storageService: StorageService;
614
+ getSearch(url: string): Search;
615
+ setSearch(url: string, search: Search): void;
616
+ clearSearch(url: string): void;
617
+ static ɵfac: i0.ɵɵFactoryDeclaration<SearchService, never>;
618
+ static ɵprov: i0.ɵɵInjectableDeclaration<SearchService>;
619
+ }
620
+
621
+ declare class BaseHttpService {
622
+ protected http: HttpClient;
623
+ protected envBaseUrl: string;
624
+ protected apiName: string;
625
+ constructor(http: HttpClient, envBaseUrl: string, apiName: string);
626
+ protected get baseUrl(): string;
627
+ protected buildHttpParams(params: any): HttpParams;
628
+ }
629
+
630
+ interface FilterDto {
631
+ field: string;
632
+ value: string;
633
+ matchMode: string;
634
+ operator: string;
635
+ }
636
+
637
+ interface OrderDto {
638
+ field: string;
639
+ order: number;
640
+ }
641
+
642
+ interface PaginationRequestDto {
643
+ globalFilter?: string;
644
+ pageNumber: number;
645
+ pageSize: number;
646
+ filters: FilterDto[];
647
+ orders: OrderDto[];
648
+ }
649
+
650
+ interface PaginationResponseDto<TDto = any> {
651
+ data: TDto[];
652
+ pageNumber: number;
653
+ pageSize: number;
654
+ totalCount: number;
655
+ }
656
+
657
+ declare abstract class BCBaseService<T> extends BaseHttpService {
658
+ protected http: HttpClient;
659
+ protected envBaseUrl: string;
660
+ protected apiName: string;
661
+ private modelType?;
662
+ constructor(http: HttpClient, envBaseUrl: string, apiName: string, modelType?: (new (init?: Partial<T>) => T) | undefined);
663
+ list(params: any): Observable<T[]>;
664
+ getFilteredPages(paginationRequest: PaginationRequestDto): Observable<PaginationResponseDto<T>>;
665
+ getAllForSelect(): Observable<ISelectItem[]>;
666
+ getByFilterForSelect(filter: string): Observable<ISelectItem[]>;
667
+ get(id: number): Observable<T>;
668
+ create(obj: T): Observable<T>;
669
+ update(obj: T, id: number): Observable<boolean>;
670
+ delete(id: number): Observable<void>;
671
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCBaseService<any>, never>;
672
+ static ɵprov: i0.ɵɵInjectableDeclaration<BCBaseService<any>>;
673
+ }
674
+
675
+ declare abstract class BCBaseDataComponent<T extends BCBaseModel, TService extends BCBaseService<T>> extends BCBaseComponent implements AfterViewInit {
676
+ private baseService;
677
+ search: Search | null;
678
+ protected dialogService: DialogService;
679
+ protected confirmationService: AppConfirmationService;
680
+ protected searchStateService: SearchStateService;
681
+ protected searchService: SearchService;
682
+ protected transloco: TranslocoService;
683
+ protected destroyRef: DestroyRef;
684
+ protected abstract storageKey?: string;
685
+ protected searchConfig: SearchFieldConfig[];
686
+ currentSearchParams: any;
687
+ items: T[];
688
+ constructor(baseService: TService);
689
+ /**
690
+ * if the search should be executed automatically on initialization. Default is true
691
+ */
692
+ protected loadDataOnInitialization: boolean;
693
+ protected abstract getFormDialogComponent(): Type<any>;
694
+ ngOnInit(): void;
695
+ /******************pagination ****************/
696
+ paginationResponse: WritableSignal<PaginationResponseDto<T> | null>;
697
+ private paginationRequest;
698
+ onLazyLoad(paginationRequest: PaginationRequestDto): void;
699
+ /******************************************/
700
+ load(): Promise<void>;
701
+ ngAfterViewInit(): void;
702
+ /**
703
+ * Hook for subclasses to perform asynchronous actions before the initial load.
704
+ * Can be asynchronous (return Promise<void>) or synchronous (return void).
705
+ */
706
+ protected beforeInitialLoad(): Promise<void> | void;
707
+ list(params: any): void;
708
+ /** Returns an Observable<T[]> with all items; implemented by the child class */
709
+ protected abstract loadData(params: any): Observable<T[]>;
710
+ handleSearch(params: any): void;
711
+ openDialog(object?: T): void;
712
+ private handleSave;
713
+ protected getRowClass: (row: T) => string;
714
+ protected getFormItems(object?: T): BCFormItemBase[];
715
+ protected onAdd(object: T): Observable<any>;
716
+ protected onEdit(object: T, id: number): Observable<any>;
717
+ protected getObjectName(object?: T): string | undefined;
718
+ onRemove(object: T): Promise<void>;
719
+ protected onDelete(id: number): Observable<void>;
720
+ openFormDialog(objectModel?: T): void;
721
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCBaseDataComponent<any, any>, never>;
722
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BCBaseDataComponent<any, any>, never, never, {}, {}, never, never, true, never>;
723
+ }
724
+
725
+ type ControlValue<C> = C extends FormControl<infer V> ? V : C extends FormGroup<infer G> ? {
726
+ [K in keyof G]: ControlValue<G[K]>;
727
+ } : C extends FormArray<infer A> ? ReadonlyArray<ControlValue<A>> : never;
728
+ type SignalsFromForm<T> = {
729
+ [K in keyof T]: T[K] extends FormControl<infer V> ? Signal<V> : T[K] extends FormGroup<infer G> ? SignalsFromForm<G> : T[K] extends FormArray<infer A> ? Signal<ReadonlyArray<ControlValue<A>>> : never;
730
+ };
731
+
732
+ declare abstract class BCBaseFormDialogComponent<T> extends BCBaseComponent implements OnInit {
733
+ form: FormGroup;
734
+ formSignal: SignalsFromForm<any>;
735
+ protected injector: Injector;
736
+ protected formBuilder: FormBuilder;
737
+ protected ref: DynamicDialogRef<any>;
738
+ protected config: DynamicDialogConfig<any, any>;
739
+ protected translate: TranslocoService;
740
+ invalidControls: string[];
741
+ ngOnInit(): void;
742
+ /**
743
+ * called after form creation
744
+ * @param data contains data of DynamicDialogConfig.
745
+ */
746
+ protected abstract onInitDialog(data: T | null): void;
747
+ /**
748
+ * creates a FormGroup with its controls. Implemented by the child class.
749
+ * @returns formGroup
750
+ */
751
+ protected abstract newForm(): FormGroup;
752
+ /**
753
+ * builds the object of type T from the FormGroup values. Implemented by the child class.
754
+ * @returns object filled form.
755
+ */
756
+ protected abstract getFormValue(): T;
757
+ /**
758
+ * handles form submission.
759
+ */
760
+ onSubmit(): void;
761
+ /**
762
+ * closes the dialog without saving
763
+ */
764
+ onCancel(): void;
765
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCBaseFormDialogComponent<any>, never>;
766
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BCBaseFormDialogComponent<any>, never, never, {}, {}, never, never, true, never>;
767
+ }
768
+
769
+ declare class BCTextboxComponent implements ControlValueAccessor, OnInit {
770
+ private injector;
771
+ label: string;
772
+ placeholder?: string;
773
+ type: string;
774
+ /** can set manually, but is undefined, willbe detected in runtime */
775
+ required: boolean;
776
+ maxlength?: number;
777
+ value: string;
778
+ isDisabled: boolean;
779
+ inputId: string;
780
+ validatorValue?: string;
781
+ readonly: i0.InputSignal<boolean>;
782
+ fluid: i0.InputSignal<boolean>;
783
+ addOnBeforeTemplate: TemplateRef<any> | null;
784
+ addOnAfterTemplate: TemplateRef<any> | null;
785
+ onChange: (_: any) => void;
786
+ onTouched: () => void;
787
+ private ngControlInstance;
788
+ constructor(injector: Injector);
789
+ ngOnInit(): void;
790
+ writeValue(obj: any): void;
791
+ registerOnChange(fn: any): void;
792
+ registerOnTouched(fn: any): void;
793
+ setDisabledState(isDisabled: boolean): void;
794
+ onInput(event: Event): void;
795
+ get control(): AbstractControl | null;
796
+ get showError(): boolean;
797
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCTextboxComponent, never>;
798
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCTextboxComponent, "bc-textbox", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "type": { "alias": "type"; "required": false; }; "required": { "alias": "required"; "required": false; }; "maxlength": { "alias": "maxlength"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, {}, ["addOnBeforeTemplate", "addOnAfterTemplate"], never, true, never>;
799
+ }
800
+
801
+ declare class BCCustomSelectComponent implements ControlValueAccessor, OnInit, OnChanges {
802
+ private injector;
803
+ valueChange: EventEmitter<any>;
804
+ /** text label (or translation key) */
805
+ label: string;
806
+ subLabel: InputSignal<string | undefined>;
807
+ /** list of options: { label: string, value: any } */
808
+ options: ISelectItem[];
809
+ /** Placeholder (if not informed, uses label) */
810
+ placeholder?: string;
811
+ /** can force manually */
812
+ required: boolean;
813
+ readonly showErrorInTooltip: InputSignal<boolean>;
814
+ /** internal value (selected value) */
815
+ value: any;
816
+ /** disabled status */
817
+ isDisabled: boolean;
818
+ /** input for Input para carregar establishments ao selecionar company */
819
+ fetchEstablishmentsFromCompany: string | null | undefined;
820
+ /** Gera um ID único para associar label + select */
821
+ inputId: string;
822
+ /** Callbacks fornecidos pelo Angular Forms */
823
+ onChange: (v: any) => void;
824
+ onTouched: () => void;
825
+ /**
826
+ * Target element to attach the overlay, valid values are "body" or a local ng-template variable of another element.
827
+ * Note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name.
828
+ */
829
+ appendTo: InputSignal<any>;
830
+ /**
831
+ * Represents an input signal that holds a boolean value.
832
+ * The signal is initialized with a default value of `false`.
833
+ * This signal can be used to track or manage the flow of a boolean-driven process.
834
+ *
835
+ * @type {InputSignal<boolean>}
836
+ */
837
+ fluid: InputSignal<boolean>;
838
+ /**
839
+ * Represents a read-only boolean input signal.
840
+ * The value cannot be modified directly and reflects the
841
+ * current state of the boolean signal.
842
+ *
843
+ * @type {InputSignal<boolean>}
844
+ */
845
+ readonly: InputSignal<boolean>;
846
+ /** references to NgControl, if there is a formControlName in the parent component */
847
+ private ngControlInstance;
848
+ addOnBeforeTemplate: TemplateRef<any> | null;
849
+ addOnAfterTemplate: TemplateRef<any> | null;
850
+ constructor(injector: Injector);
851
+ ngOnInit(): void;
852
+ ngOnChanges(changes: SimpleChanges): void;
853
+ private loadEstablishments;
854
+ writeValue(obj: any): void;
855
+ registerOnChange(fn: any): void;
856
+ registerOnTouched(fn: any): void;
857
+ setDisabledState(isDisabled: boolean): void;
858
+ onSelectChange(event: any): void;
859
+ get control(): AbstractControl | null;
860
+ get showError(): boolean;
861
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCCustomSelectComponent, never>;
862
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCCustomSelectComponent, "bc-select", never, { "label": { "alias": "label"; "required": false; }; "subLabel": { "alias": "subLabel"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "showErrorInTooltip": { "alias": "showErrorInTooltip"; "required": false; "isSignal": true; }; "isDisabled": { "alias": "isDisabled"; "required": false; }; "fetchEstablishmentsFromCompany": { "alias": "fetchEstablishmentsFromCompany"; "required": false; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; }, { "valueChange": "valueChange"; }, ["addOnBeforeTemplate", "addOnAfterTemplate"], never, true, never>;
863
+ }
864
+
865
+ declare class BCDatePickerComponent implements ControlValueAccessor {
866
+ label: string;
867
+ placeholder: string;
868
+ formControl: FormControl;
869
+ dateFormat: string;
870
+ showTime: boolean;
871
+ hourFormat: '12' | '24';
872
+ dataType: 'date' | 'string' | 'number';
873
+ blur: EventEmitter<any>;
874
+ dateSelect: EventEmitter<Date>;
875
+ valueChange: EventEmitter<any>;
876
+ inputId: string;
877
+ value: any;
878
+ disabled: boolean;
879
+ onChange: any;
880
+ onTouched: any;
881
+ required: boolean;
882
+ ngOnInit(): void;
883
+ writeValue(obj: any): void;
884
+ registerOnChange(fn: any): void;
885
+ registerOnTouched(fn: any): void;
886
+ setDisabledState?(isDisabled: boolean): void;
887
+ onDateChange(event: any): void;
888
+ onInputBlur(): void;
889
+ onSelect(event: Date): void;
890
+ onInput(event: Event): void;
891
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCDatePickerComponent, never>;
892
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCDatePickerComponent, "bc-datePicker", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "formControl": { "alias": "formControl"; "required": false; }; "dateFormat": { "alias": "dateFormat"; "required": false; }; "showTime": { "alias": "showTime"; "required": false; }; "hourFormat": { "alias": "hourFormat"; "required": false; }; "dataType": { "alias": "dataType"; "required": false; }; }, { "blur": "blur"; "dateSelect": "dateSelect"; "valueChange": "valueChange"; }, never, never, true, never>;
893
+ }
894
+
895
+ declare class CurrencyFormatPipe implements PipeTransform {
896
+ private globalLocaleId;
897
+ constructor(globalLocaleId: string);
898
+ transform(value: number | string | null | undefined, countryCustom?: CountryCustom, defaultCurrencyCode?: string, defaultDigitsInfo?: string): string | null;
899
+ static ɵfac: i0.ɵɵFactoryDeclaration<CurrencyFormatPipe, never>;
900
+ static ɵpipe: i0.ɵɵPipeDeclaration<CurrencyFormatPipe, "currencyFormat", true>;
901
+ static ɵprov: i0.ɵɵInjectableDeclaration<CurrencyFormatPipe>;
902
+ }
903
+
904
+ declare class DateFormatPipe implements PipeTransform {
905
+ private globalLocaleId;
906
+ constructor(globalLocaleId: string);
907
+ transform(value?: Date | string | number, countryCustom?: CountryCustom, defaultFormat?: string): string | null;
908
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateFormatPipe, never>;
909
+ static ɵpipe: i0.ɵɵPipeDeclaration<DateFormatPipe, "dateFormat", true>;
910
+ static ɵprov: i0.ɵɵInjectableDeclaration<DateFormatPipe>;
911
+ }
912
+
913
+ declare class DateTimeFormatPipe implements PipeTransform {
914
+ private globalLocaleId;
915
+ constructor(globalLocaleId: string);
916
+ transform(value?: Date | string | number, countryCustom?: CountryCustom, defaultFormat?: string): string | null;
917
+ static ɵfac: i0.ɵɵFactoryDeclaration<DateTimeFormatPipe, never>;
918
+ static ɵpipe: i0.ɵɵPipeDeclaration<DateTimeFormatPipe, "dateTimeFormat", true>;
919
+ static ɵprov: i0.ɵɵInjectableDeclaration<DateTimeFormatPipe>;
920
+ }
921
+
922
+ declare class DocumentFormatPipe implements PipeTransform {
923
+ transform(value: string | number, countryCustom?: CountryCustom): string;
924
+ static ɵfac: i0.ɵɵFactoryDeclaration<DocumentFormatPipe, never>;
925
+ static ɵpipe: i0.ɵɵPipeDeclaration<DocumentFormatPipe, "documentFormat", true>;
926
+ static ɵprov: i0.ɵɵInjectableDeclaration<DocumentFormatPipe>;
927
+ }
928
+
929
+ declare class EnumLabelPipe implements PipeTransform {
930
+ private translate;
931
+ constructor(translate: TranslocoService);
932
+ transform(value: number, enumType: string | any): string;
933
+ static ɵfac: i0.ɵɵFactoryDeclaration<EnumLabelPipe, never>;
934
+ static ɵpipe: i0.ɵɵPipeDeclaration<EnumLabelPipe, "enumLabel", true>;
935
+ static ɵprov: i0.ɵɵInjectableDeclaration<EnumLabelPipe>;
936
+ }
937
+
938
+ declare class LookupPipe implements PipeTransform {
939
+ private lookupService;
940
+ transform(value: number | undefined | null, lookupType: string): string;
941
+ static ɵfac: i0.ɵɵFactoryDeclaration<LookupPipe, never>;
942
+ static ɵpipe: i0.ɵɵPipeDeclaration<LookupPipe, "lookup", true>;
943
+ static ɵprov: i0.ɵɵInjectableDeclaration<LookupPipe>;
944
+ }
945
+
946
+ declare class PersonDocumentFormatPipe implements PipeTransform {
947
+ transform(value: string | number, countryCustom?: CountryCustom, hideSomeValues?: boolean): string;
948
+ static ɵfac: i0.ɵɵFactoryDeclaration<PersonDocumentFormatPipe, never>;
949
+ static ɵpipe: i0.ɵɵPipeDeclaration<PersonDocumentFormatPipe, "personDocumentFormat", true>;
950
+ static ɵprov: i0.ɵɵInjectableDeclaration<PersonDocumentFormatPipe>;
951
+ }
952
+
953
+ declare class StatusPipe implements PipeTransform {
954
+ private translate;
955
+ constructor(translate: TranslocoService);
956
+ transform(value: any, args?: any): any;
957
+ static ɵfac: i0.ɵɵFactoryDeclaration<StatusPipe, never>;
958
+ static ɵpipe: i0.ɵɵPipeDeclaration<StatusPipe, "status", true>;
959
+ static ɵprov: i0.ɵɵInjectableDeclaration<StatusPipe>;
960
+ }
961
+
962
+ declare class YesNoPipe implements PipeTransform {
963
+ private translate;
964
+ constructor(translate: TranslocoService);
965
+ transform(value: any): string;
966
+ static ɵfac: i0.ɵɵFactoryDeclaration<YesNoPipe, never>;
967
+ static ɵpipe: i0.ɵɵPipeDeclaration<YesNoPipe, "yesNo", true>;
968
+ static ɵprov: i0.ɵɵInjectableDeclaration<YesNoPipe>;
969
+ }
970
+
971
+ declare class ZipCodeFormatPipe implements PipeTransform {
972
+ transform(value: string | number, countryCustom?: CountryCustom): string;
973
+ static ɵfac: i0.ɵɵFactoryDeclaration<ZipCodeFormatPipe, never>;
974
+ static ɵpipe: i0.ɵɵPipeDeclaration<ZipCodeFormatPipe, "zipCodeFormat", true>;
975
+ static ɵprov: i0.ɵɵInjectableDeclaration<ZipCodeFormatPipe>;
976
+ }
977
+
978
+ declare class TableFormattingService {
979
+ private translate;
980
+ private yesNoPipe;
981
+ private zipCodePipe;
982
+ private currencyFormatPipe;
983
+ private dateFormatPipe;
984
+ private dateTimeFormatPipe;
985
+ private documentPipe;
986
+ private personDocumentPipe;
987
+ private statusPipe;
988
+ private enumLabelPipe;
989
+ private lookupPipe;
990
+ constructor(translate: TranslocoService, yesNoPipe: YesNoPipe, zipCodePipe: ZipCodeFormatPipe, currencyFormatPipe: CurrencyFormatPipe, dateFormatPipe: DateFormatPipe, dateTimeFormatPipe: DateTimeFormatPipe, documentPipe: DocumentFormatPipe, personDocumentPipe: PersonDocumentFormatPipe, statusPipe: StatusPipe, enumLabelPipe: EnumLabelPipe, lookupPipe: LookupPipe);
991
+ formatCell<T extends BCBaseModel>(item: T, column: BCColumnHeader<T>, countryCustom?: CountryCustom): string;
992
+ static ɵfac: i0.ɵɵFactoryDeclaration<TableFormattingService, never>;
993
+ static ɵprov: i0.ɵɵInjectableDeclaration<TableFormattingService>;
994
+ }
995
+
996
+ declare class BCGenericPTableComponent<T extends BCBaseModel> implements OnInit, OnChanges {
997
+ private notificationService;
998
+ private formattingService;
999
+ private _tableData;
1000
+ set tableData(value: T[]);
1001
+ get tableData(): T[];
1002
+ customActionsTemplate: TemplateRef<any> | undefined;
1003
+ dt: Table | undefined;
1004
+ totalRecords: number;
1005
+ rows: number;
1006
+ serverSidePagination: boolean;
1007
+ columnDefinition: BCColumnHeader<T>[];
1008
+ optionsColumns: BCColumnHeader<T>[];
1009
+ tableName?: string | undefined;
1010
+ titleBtnCreate: string;
1011
+ hasBtnCreate: boolean;
1012
+ displayCreateAction: boolean;
1013
+ hasExpandedRows: InputSignal<boolean>;
1014
+ expandedRowKey: InputSignal<string | 'index'>;
1015
+ expandedRows: InputSignal<{
1016
+ [p: string]: boolean;
1017
+ }>;
1018
+ expandedRowTemplate: TemplateRef<any> | null;
1019
+ visibleColumns: BCColumnHeader<T>[];
1020
+ optionalColumnOptions: BCColumnHeader<T>[];
1021
+ selectedColumns: BCColumnHeader<T>[];
1022
+ stripedRows: boolean;
1023
+ /**
1024
+ * Receipt function for applicate css classes dinamycalle to a line.
1025
+ * The function receives the data of the line and should return a string with the classes.
1026
+ */
1027
+ rowStyleClass?: (rowData: T) => string;
1028
+ /**
1029
+ * Properties for selection
1030
+ */
1031
+ /** Enable the display of the selection column (checkboxes). */
1032
+ enableSelection: boolean;
1033
+ /** Receipt function to determine if a line can be selected. */
1034
+ isRowSelectable?: (event: {
1035
+ data: T;
1036
+ }) => boolean;
1037
+ /** 1. Receipt the selection from the parent component. */
1038
+ selection: T[];
1039
+ /** 2. Emit the changes back to the parent. The 'Change' suffix is crucial. */
1040
+ selectionChange: EventEmitter<T[]>;
1041
+ /**
1042
+ * Internal method to propagate the change of the p-table to the parent component.
1043
+ */
1044
+ onInternalSelectionChange(currentSelection: T[]): void;
1045
+ /**
1046
+ * Can be boolean (all) or function (by line)
1047
+ */
1048
+ displayDetailAction: boolean | ((item: any) => boolean);
1049
+ disableDetailCondition: InputSignal<((item: any) => boolean) | null>;
1050
+ displayEditAction: boolean;
1051
+ disableEditCondition: InputSignal<((item: any) => boolean) | null>;
1052
+ displayEditCondition: InputSignal<((item: any) => boolean) | null>;
1053
+ displayDeleteAction: boolean;
1054
+ disableDeleteCondition: InputSignal<((item: any) => boolean) | null>;
1055
+ displayDeleteCondition?: (item: any) => boolean;
1056
+ countryCustom?: CountryCustom;
1057
+ genericEvent: EventEmitter<T>;
1058
+ detail: EventEmitter<T>;
1059
+ add: EventEmitter<void>;
1060
+ edit: EventEmitter<T>;
1061
+ delete: EventEmitter<T>;
1062
+ readonly changeColumns: EventEmitter<BCColumnHeader<T>[]>;
1063
+ lazyLoad: OutputEmitterRef<PaginationRequestDto>;
1064
+ onRowExpand: OutputEmitterRef<TableRowExpandEvent>;
1065
+ onRowCollapse: OutputEmitterRef<TableRowExpandEvent>;
1066
+ private sortState;
1067
+ filteredTableData: T[];
1068
+ filter: string;
1069
+ rowsPerPageOptions: number[];
1070
+ private imageFields;
1071
+ private filterSubject;
1072
+ private hasFormattingErrorOccurred;
1073
+ private transloco;
1074
+ constructor(notificationService: NotificationService, formattingService: TableFormattingService);
1075
+ /**
1076
+ * Verify if the "New" button should be disabled
1077
+ *
1078
+ * PROFILES:
1079
+ * - Support: disable all (maximum priority)
1080
+ * - Requery: enable New, Send for Analysis and Reopen
1081
+ * - Approval: enable all
1082
+ */
1083
+ get isCreateButtonDisabled(): boolean;
1084
+ get displayActionsColumn(): boolean;
1085
+ ngOnInit(): void;
1086
+ ngOnChanges(changes: SimpleChanges): void;
1087
+ private readonly maxSelectedLabels;
1088
+ /**
1089
+ * Prepare the lists of required, optional and visible columns.
1090
+ */
1091
+ private initializeColumns;
1092
+ /**
1093
+ * Getter that transforms the array of selected columns into a string for display,
1094
+ * respecting the limit of 'maxSelectedLabels'.
1095
+ */
1096
+ get selectedColumnsLabel(): string;
1097
+ onColumnSelectionChange(): void;
1098
+ private updateVisibleColumns;
1099
+ isImageField(field: string): boolean;
1100
+ getImageSrc(field: string, rowData: any): string;
1101
+ getFormattedValue(item: T, column: BCColumnHeader<T>): string;
1102
+ getPrioritySeverity(priority: number | string): 'info' | 'success' | 'warn' | 'danger' | 'secondary' | 'contrast';
1103
+ onLazyLoad(event: TableLazyLoadEvent): void;
1104
+ onGlobalFilter(table: Table, event: any): void;
1105
+ private filterGlobalWithFormatters;
1106
+ onFilterChange(value: string): void;
1107
+ changeColumnHeaders(cols: BCColumnHeader<T>[]): void;
1108
+ onGenericEvent(object: T): void;
1109
+ onDetail(object: T): void;
1110
+ onAdd(): void;
1111
+ onEdit(object: T): void;
1112
+ onDelete(object: T): void;
1113
+ trackByField(_index: number, col: BCColumnHeader<T>): (string & {}) | keyof T;
1114
+ protected canShowEditButton(item: any): boolean | undefined;
1115
+ canShowDeleteButton(item: any): boolean;
1116
+ isDetailActionVisible(item: any): boolean;
1117
+ /**
1118
+ * NEW PUBLIC METHOD: Clears the selection and the table's saved state.
1119
+ * This method can be called by the parent component.
1120
+ */
1121
+ clearSelectionAndState(): void;
1122
+ customSort(multiSortMeta: SortMeta[]): void;
1123
+ /**
1124
+ * Sorts a list of objects based on multiple field and order criteria.
1125
+ * @param {Array<object>} list - The list of objects to sort.
1126
+ * @param {Array<{ field: string, order: 1 | -1 }>} sortRules - Fields and sort directions (1 = ASC, -1 = DESC).
1127
+ * @returns {Array<object>} - A new sorted list.
1128
+ */
1129
+ private sortGenericList;
1130
+ hasColumnsFilter(): boolean;
1131
+ hasFiltersApplied(dt: Table): boolean;
1132
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCGenericPTableComponent<any>, never>;
1133
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCGenericPTableComponent<any>, "bc-generic-p-table", never, { "tableData": { "alias": "tableData"; "required": false; }; "totalRecords": { "alias": "totalRecords"; "required": false; }; "rows": { "alias": "rows"; "required": false; }; "serverSidePagination": { "alias": "serverSidePagination"; "required": false; }; "columnDefinition": { "alias": "columnDefinition"; "required": false; }; "optionsColumns": { "alias": "optionsColumns"; "required": false; }; "tableName": { "alias": "tableName"; "required": false; }; "titleBtnCreate": { "alias": "titleBtnCreate"; "required": false; }; "hasBtnCreate": { "alias": "hasBtnCreate"; "required": false; }; "displayCreateAction": { "alias": "displayCreateAction"; "required": false; }; "hasExpandedRows": { "alias": "hasExpandedRows"; "required": false; "isSignal": true; }; "expandedRowKey": { "alias": "expandedRowKey"; "required": false; "isSignal": true; }; "expandedRows": { "alias": "expandedRows"; "required": false; "isSignal": true; }; "stripedRows": { "alias": "stripedRows"; "required": false; }; "rowStyleClass": { "alias": "rowStyleClass"; "required": false; }; "enableSelection": { "alias": "enableSelection"; "required": false; }; "isRowSelectable": { "alias": "isRowSelectable"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "displayDetailAction": { "alias": "displayDetailAction"; "required": false; }; "disableDetailCondition": { "alias": "disableDetailCondition"; "required": false; "isSignal": true; }; "displayEditAction": { "alias": "displayEditAction"; "required": false; }; "disableEditCondition": { "alias": "disableEditCondition"; "required": false; "isSignal": true; }; "displayEditCondition": { "alias": "displayEditCondition"; "required": false; "isSignal": true; }; "displayDeleteAction": { "alias": "displayDeleteAction"; "required": false; }; "disableDeleteCondition": { "alias": "disableDeleteCondition"; "required": false; "isSignal": true; }; "displayDeleteCondition": { "alias": "displayDeleteCondition"; "required": false; }; }, { "selectionChange": "selectionChange"; "genericEvent": "genericEvent"; "detail": "detail"; "add": "add"; "edit": "edit"; "delete": "delete"; "changeColumns": "changeColumns"; "lazyLoad": "lazyLoad"; "onRowExpand": "onRowExpand"; "onRowCollapse": "onRowCollapse"; }, ["customActionsTemplate", "expandedRowTemplate"], ["*"], true, never>;
1134
+ }
1135
+
1136
+ declare class BCAutoCompleteComponent implements ControlValueAccessor, OnInit {
1137
+ private injector;
1138
+ /** Label del campo */
1139
+ label: string;
1140
+ subLabel: InputSignal<string | undefined>;
1141
+ /** Sugerencias que vienen del padre */
1142
+ suggestions: any[];
1143
+ /** Campo a mostrar del objeto */
1144
+ field: string;
1145
+ placeholder?: string;
1146
+ minLength: number;
1147
+ dropdown: boolean;
1148
+ forceSelection: boolean;
1149
+ required: boolean;
1150
+ /** Evento para que el padre busque en el servicio */
1151
+ completeMethod: EventEmitter<any>;
1152
+ onSelect: EventEmitter<any>;
1153
+ onClear: EventEmitter<any>;
1154
+ value: any;
1155
+ isDisabled: boolean;
1156
+ inputId: string;
1157
+ onChange: (v: any) => void;
1158
+ onTouched: () => void;
1159
+ private ngControlInstance;
1160
+ addOnBeforeTemplate: TemplateRef<any> | null;
1161
+ addOnAfterTemplate: TemplateRef<any> | null;
1162
+ constructor(injector: Injector);
1163
+ ngOnInit(): void;
1164
+ writeValue(obj: any): void;
1165
+ registerOnChange(fn: any): void;
1166
+ registerOnTouched(fn: any): void;
1167
+ setDisabledState(isDisabled: boolean): void;
1168
+ onSearch(event: any): void;
1169
+ onItemSelect(event: any): void;
1170
+ onBlur(): void;
1171
+ get control(): AbstractControl | null;
1172
+ get showError(): boolean;
1173
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCAutoCompleteComponent, never>;
1174
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCAutoCompleteComponent, "bc-autocomplete", never, { "label": { "alias": "label"; "required": false; }; "subLabel": { "alias": "subLabel"; "required": false; "isSignal": true; }; "suggestions": { "alias": "suggestions"; "required": false; }; "field": { "alias": "field"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "minLength": { "alias": "minLength"; "required": false; }; "dropdown": { "alias": "dropdown"; "required": false; }; "forceSelection": { "alias": "forceSelection"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "completeMethod": "completeMethod"; "onSelect": "onSelect"; "onClear": "onClear"; }, ["addOnBeforeTemplate", "addOnAfterTemplate"], never, true, never>;
1175
+ }
1176
+
1177
+ declare class BCConfirmDialogComponent {
1178
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCConfirmDialogComponent, never>;
1179
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCConfirmDialogComponent, "bc-confirm-dialog", never, {}, {}, never, never, true, never>;
1180
+ }
1181
+
1182
+ declare class LoadingService {
1183
+ private _loading$;
1184
+ readonly loading$: rxjs.Observable<boolean>;
1185
+ show(): void;
1186
+ hide(): void;
1187
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingService, never>;
1188
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoadingService>;
1189
+ }
1190
+
1191
+ declare class BCLoadingComponent {
1192
+ loadingService: LoadingService;
1193
+ constructor(loadingService: LoadingService);
1194
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCLoadingComponent, never>;
1195
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCLoadingComponent, "bc-loading", never, {}, {}, never, never, true, never>;
1196
+ }
1197
+
1198
+ declare class BCCheckboxComponent implements ControlValueAccessor, OnInit {
1199
+ private injector;
1200
+ label: string;
1201
+ required: boolean;
1202
+ value: boolean;
1203
+ isDisabled: boolean;
1204
+ inputId: string;
1205
+ private ngControlInstance;
1206
+ constructor(injector: Injector);
1207
+ ngOnInit(): void;
1208
+ writeValue(obj: any): void;
1209
+ registerOnChange(fn: any): void;
1210
+ registerOnTouched(fn: any): void;
1211
+ setDisabledState(isDisabled: boolean): void;
1212
+ onChange: (_: any) => void;
1213
+ onTouched: () => void;
1214
+ onCheckboxChange(event: any): void;
1215
+ get control(): any;
1216
+ get showError(): boolean;
1217
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCCheckboxComponent, never>;
1218
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCCheckboxComponent, "bc-checkbox", never, { "label": { "alias": "label"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, {}, never, never, true, never>;
1219
+ }
1220
+
1221
+ declare class BCCurrencyboxComponent implements ControlValueAccessor, OnInit {
1222
+ private injector;
1223
+ label: string;
1224
+ placeholder?: string;
1225
+ required: boolean;
1226
+ mode: string;
1227
+ currency: string;
1228
+ locale: string;
1229
+ value: number | null;
1230
+ isDisabled: boolean;
1231
+ inputId: string;
1232
+ readonly: i0.InputSignal<boolean>;
1233
+ fluid: i0.InputSignal<boolean>;
1234
+ addOnBeforeTemplate: TemplateRef<any> | null;
1235
+ addOnAfterTemplate: TemplateRef<any> | null;
1236
+ onChange: (_: any) => void;
1237
+ onTouched: () => void;
1238
+ private ngControlInstance;
1239
+ constructor(injector: Injector);
1240
+ ngOnInit(): void;
1241
+ writeValue(obj: any): void;
1242
+ registerOnChange(fn: any): void;
1243
+ registerOnTouched(fn: any): void;
1244
+ setDisabledState(isDisabled: boolean): void;
1245
+ onInputValueChange(val: number | null): void;
1246
+ get control(): AbstractControl | null;
1247
+ get showError(): boolean;
1248
+ static ɵfac: i0.ɵɵFactoryDeclaration<BCCurrencyboxComponent, never>;
1249
+ static ɵcmp: i0.ɵɵComponentDeclaration<BCCurrencyboxComponent, "bc-currencybox", never, { "label": { "alias": "label"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "required": { "alias": "required"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "locale": { "alias": "locale"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, {}, ["addOnBeforeTemplate", "addOnAfterTemplate"], never, true, never>;
1250
+ }
1251
+
1252
+ declare class TranslationHttpLoader implements TranslocoLoader {
1253
+ private http;
1254
+ getTranslation(lang: string): rxjs.Observable<Translation>;
1255
+ static ɵfac: i0.ɵɵFactoryDeclaration<TranslationHttpLoader, never>;
1256
+ static ɵprov: i0.ɵɵInjectableDeclaration<TranslationHttpLoader>;
1257
+ }
1258
+
1259
+ declare const loadingInterceptor: HttpInterceptorFn;
1260
+
1261
+ declare const errorInterceptor: HttpInterceptorFn;
1262
+
1263
+ export { BCAutoCompleteComponent, BCBaseComponent, BCBaseDataComponent, BCBaseFormDialogComponent, BCBaseModel, BCBaseService, BCCheckboxComponent, BCConfirmDialogComponent, BCCurrencyboxComponent, BCCustomSelectComponent, BCDatePickerComponent, BCGenericPTableComponent, BCLoadingComponent, BCTextboxComponent, CustomDatepickerComponent, FormFieldErrorComponent, TranslationHttpLoader, errorInterceptor, loadingInterceptor };
1264
+ export type { ApiResponse, BCColumnHeader, ColumnFilter, ColumnFilterDisplay, ColumnFilterType, FilterOn, ISelectItem };