@dataclouder/ngx-core 0.1.30 → 0.1.31

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.
Files changed (34) hide show
  1. package/fesm2022/dataclouder-ngx-core.mjs +137 -108
  2. package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
  3. package/index.d.ts +831 -3
  4. package/package.json +1 -1
  5. package/lib/components/base-form/entity-base-form.d.ts +0 -24
  6. package/lib/components/base-list/entity-base-list.component.d.ts +0 -29
  7. package/lib/components/confirm/confirm.component.d.ts +0 -23
  8. package/lib/components/empty-state/empty-state.component.d.ts +0 -8
  9. package/lib/components/forms/dc-auditable-viewer.component.d.ts +0 -7
  10. package/lib/components/forms/dc-extensions-viewer.component.d.ts +0 -7
  11. package/lib/components/forms/dc-learnable-viewer.component.d.ts +0 -7
  12. package/lib/components/forms/dc-manageable-viewer.component.d.ts +0 -7
  13. package/lib/components/forms/dc-reactions-viewer.component.d.ts +0 -7
  14. package/lib/components/list-filter-bar/dc-list-filter-bar.component.d.ts +0 -40
  15. package/lib/components/loading-bar/loading-bar.d.ts +0 -7
  16. package/lib/components/loading-bar/loading-bar.service.d.ts +0 -63
  17. package/lib/components/progress-toast/progress-toast.d.ts +0 -19
  18. package/lib/components/prompt/prompt.component.d.ts +0 -17
  19. package/lib/components/quick-table/quick-table.d.ts +0 -35
  20. package/lib/models/character-models.d.ts +0 -5
  21. package/lib/models/classes.d.ts +0 -47
  22. package/lib/models/common-enums.d.ts +0 -10
  23. package/lib/models/extension.model.d.ts +0 -28
  24. package/lib/models/filter.models.d.ts +0 -62
  25. package/lib/models/languages.model.d.ts +0 -23
  26. package/lib/models/pagination.abstract.d.ts +0 -88
  27. package/lib/pipes/loadash-get.pipe.d.ts +0 -8
  28. package/lib/services/confirm.service.d.ts +0 -20
  29. package/lib/services/entity-cominication.service.d.ts +0 -17
  30. package/lib/services/http-core.service.d.ts +0 -204
  31. package/lib/services/prompt.service.d.ts +0 -19
  32. package/lib/services/ui-state.service.d.ts +0 -7
  33. package/lib/utils/utils.d.ts +0 -29
  34. package/public-api.d.ts +0 -28
package/index.d.ts CHANGED
@@ -1,5 +1,833 @@
1
+ import * as i0 from '@angular/core';
2
+ import { OnInit, OnChanges, SimpleChanges, OnDestroy, InjectionToken, WritableSignal, Type, Provider, PipeTransform } from '@angular/core';
3
+ import { FormGroup, FormArray } from '@angular/forms';
4
+ import { MenuItem, FilterMetadata } from 'primeng/api';
5
+ import { ActivatedRoute, Router } from '@angular/router';
6
+ import { Table } from 'primeng/table';
7
+ import { DynamicDialogRef, DialogService } from 'primeng/dynamicdialog';
8
+ import { HttpErrorResponse } from '@angular/common/http';
9
+ import * as rxjs from 'rxjs';
10
+ import { Observable } from 'rxjs';
11
+ import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
12
+
13
+ declare class EmptyStateComponent {
14
+ headingText: string;
15
+ subHeadingText: string;
16
+ readonly mainIconSrcString: i0.InputSignal<string>;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<EmptyStateComponent, never>;
18
+ static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "dc-empty-state", never, { "headingText": { "alias": "headingText"; "required": false; }; "subHeadingText": { "alias": "subHeadingText"; "required": false; }; "mainIconSrcString": { "alias": "mainIconSrcString"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
19
+ }
20
+
21
+ interface SortOption {
22
+ label: string;
23
+ value: string;
24
+ }
25
+ declare const availibleFilters: {
26
+ name: string;
27
+ code: string;
28
+ }[];
29
+ declare enum OptionValue {
30
+ Newest = "newest",
31
+ Oldest = "oldest",
32
+ Alphabetical = "alphabetical",
33
+ ReverseAlphabetical = "reverseAlphabetical"
34
+ }
35
+ declare const sortOptions: SortOption[];
36
+ declare const sortTypes: ({
37
+ name: string;
38
+ code: string;
39
+ sort: {
40
+ createdDate: number;
41
+ takenCount?: undefined;
42
+ };
43
+ } | {
44
+ name: string;
45
+ code: string;
46
+ sort: {
47
+ takenCount: number;
48
+ createdDate?: undefined;
49
+ };
50
+ })[];
51
+ interface ICustomFilter {
52
+ name: string;
53
+ field: string;
54
+ type: 'string' | 'number' | 'boolean' | 'date' | 'select';
55
+ options?: {
56
+ label: string;
57
+ value: any;
58
+ }[];
59
+ defaultValue?: any;
60
+ }
61
+ interface FiltersConfig {
62
+ page?: number;
63
+ rowsPerPage?: number;
64
+ sort?: {
65
+ [key: string]: number;
66
+ };
67
+ filters?: {
68
+ [key: string]: any;
69
+ };
70
+ text?: string;
71
+ returnProps?: Record<string, 0 | 1>;
72
+ }
73
+ interface IFilterQueryResponse<T> {
74
+ rows: T[];
75
+ count: number;
76
+ skip: number;
77
+ }
78
+ interface ListFilterBarOptions {
79
+ showCreateButton?: boolean;
80
+ showViewButton?: boolean;
81
+ showActions?: boolean;
82
+ }
83
+
84
+ interface PColumn {
85
+ field: string;
86
+ header: string;
87
+ type?: 'text' | 'image' | 'tags' | 'actions';
88
+ }
89
+ declare class QuickTableComponent {
90
+ readonly columns: i0.InputSignal<PColumn[]>;
91
+ readonly tableData: i0.InputSignal<any[]>;
92
+ readonly actions: i0.InputSignal<MenuItem[]>;
93
+ readonly onAction: i0.OutputEmitterRef<OnActionEvent>;
94
+ _columns: i0.WritableSignal<PColumn[]>;
95
+ _tableData: i0.WritableSignal<any[]>;
96
+ _actions: i0.WritableSignal<MenuItem[]>;
97
+ filters: i0.WritableSignal<{
98
+ [s: string]: FilterMetadata | FilterMetadata[];
99
+ }>;
100
+ globalFilterFields: i0.WritableSignal<string[]>;
101
+ tableRef: Table;
102
+ tableColumns: any[];
103
+ constructor();
104
+ private initializeTableColumns;
105
+ selectItem(item: any, action: MenuItem): void;
106
+ onGlobalFilter(event: Event): void;
107
+ getFilterType(column: PColumn): string;
108
+ private initializeFilters;
109
+ onFilterLocal(event: any): void;
110
+ filterOutsideTable(type: 'tags' | 'text', column: string, value: string[]): void;
111
+ static ɵfac: i0.ɵɵFactoryDeclaration<QuickTableComponent, never>;
112
+ static ɵcmp: i0.ɵɵComponentDeclaration<QuickTableComponent, "app-quick-table", never, { "columns": { "alias": "columns"; "required": false; "isSignal": true; }; "tableData": { "alias": "tableData"; "required": false; "isSignal": true; }; "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
113
+ }
114
+
115
+ interface OnActionEvent {
116
+ action?: string;
117
+ item?: any;
118
+ menuItem?: MenuItem;
119
+ }
1
120
  /**
2
- * Generated bundle index. Do not edit.
121
+ * Abstract base class for implementing pagination functionality.
122
+ * Provides common pagination logic, state management, and navigation handling.
123
+ * Child classes must implement the loadData method and define columns.
3
124
  */
4
- /// <amd-module name="@dataclouder/ngx-core" />
5
- export * from './public-api';
125
+ declare abstract class PaginationBase {
126
+ /**
127
+ * Available actions for items.
128
+ * Must be implemented by child classes.
129
+ */
130
+ readonly actions: i0.InputSignal<MenuItem[]>;
131
+ /**
132
+ * Event emitted when an action is performed on an item.
133
+ * Emits an object containing the item and the action that was triggered.
134
+ */
135
+ readonly onAction: i0.OutputEmitterRef<OnActionEvent>;
136
+ /** Current first record index for the paginator */
137
+ first: number;
138
+ /** Number of rows to display per page */
139
+ rows: number;
140
+ /** Total number of records available */
141
+ totalRecords: number;
142
+ /** Current view mode, either cards or table */
143
+ viewMode: 'cards' | 'table';
144
+ /** Loading state indicator */
145
+ isLoading: boolean;
146
+ /** Available button actions for items */
147
+ buttonActions: MenuItem[];
148
+ /**
149
+ * Columns configuration for the table view.
150
+ * Must be implemented by child classes.
151
+ */
152
+ protected abstract columns: PColumn[];
153
+ /**
154
+ * Configuration for filtering, sorting, and pagination.
155
+ * Includes current page, rows per page, sorting criteria, and applied filters.
156
+ */
157
+ filterConfig: FiltersConfig;
158
+ protected route: ActivatedRoute;
159
+ protected router: Router;
160
+ /**
161
+ * Creates an instance of PaginationBase.
162
+ * @param route - The ActivatedRoute for accessing route parameters
163
+ * @param router - The Router for navigation
164
+ */
165
+ constructor();
166
+ /**
167
+ * Initializes pagination based on URL query parameters.
168
+ * Sets the current page from the 'page' query parameter if available.
169
+ * @private
170
+ */
171
+ private initializePagination;
172
+ /**
173
+ * Handles pagination events from the paginator component.
174
+ * Updates the filter configuration, loads new data, and updates the URL.
175
+ * @param pageEvent - The page event containing page number and rows per page
176
+ */
177
+ onPageChange(pageEvent: any): Promise<void>;
178
+ /**
179
+ * Updates the 'page' query parameter in the URL.
180
+ * @param newPage - The new page number to set in the URL
181
+ * @private
182
+ */
183
+ private updatePageParam;
184
+ /**
185
+ * Loads data for the current page configuration.
186
+ * Must be implemented by child classes to fetch data from the appropriate source.
187
+ * @returns A promise that resolves when data loading is complete
188
+ */
189
+ protected abstract loadData(): Promise<void>;
190
+ /**
191
+ * Handle actions triggered from the table or card view
192
+ * @param param0 Object containing the item and action that was triggered
193
+ */
194
+ doAction(actionEvent: OnActionEvent): void;
195
+ static ɵfac: i0.ɵɵFactoryDeclaration<PaginationBase, never>;
196
+ static ɵdir: i0.ɵɵDirectiveDeclaration<PaginationBase, never, never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
197
+ }
198
+
199
+ declare class DCFilterBarComponent implements OnInit, OnChanges {
200
+ private readonly fb;
201
+ readonly items: i0.InputSignal<MenuItem[]>;
202
+ readonly options: i0.InputSignal<ListFilterBarOptions>;
203
+ customFilters: ICustomFilter[];
204
+ readonly onFilterAction: i0.OutputEmitterRef<any>;
205
+ readonly onChangeSort: i0.OutputEmitterRef<any>;
206
+ readonly onNew: i0.OutputEmitterRef<any>;
207
+ customFiltersForm: FormGroup;
208
+ ngOnInit(): void;
209
+ ngOnChanges(changes: SimpleChanges): void;
210
+ private buildCustomFiltersForm;
211
+ availibleFilters: {
212
+ name: string;
213
+ code: string;
214
+ }[];
215
+ sortOptions: SortOption[];
216
+ isSearchVisible: boolean;
217
+ isFilterVisible: boolean;
218
+ placeholder: string;
219
+ filter: FiltersConfig;
220
+ selectedFilters: (typeof availibleFilters)[];
221
+ selectedSort: SortOption | null;
222
+ dateRange: Date[];
223
+ changeFilter(event: any): void;
224
+ changeSort(event: any): void;
225
+ createNew(): void;
226
+ search(text?: string): void;
227
+ clearFilters(): void;
228
+ applyFilters(): void;
229
+ doItemAction(filterEvent: OnActionEvent): void;
230
+ static ɵfac: i0.ɵɵFactoryDeclaration<DCFilterBarComponent, never>;
231
+ static ɵcmp: i0.ɵɵComponentDeclaration<DCFilterBarComponent, "dc-filter-bar", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "customFilters": { "alias": "customFilters"; "required": false; }; }, { "onFilterAction": "onFilterAction"; "onChangeSort": "onChangeSort"; "onNew": "onNew"; }, never, never, true, never>;
232
+ }
233
+
234
+ declare class ConfirmComponent implements OnInit {
235
+ private dynamicDialogConfig;
236
+ ref: DynamicDialogRef<any>;
237
+ title: string;
238
+ message: string;
239
+ warning: string;
240
+ oneBotton: boolean;
241
+ acceptText: string;
242
+ cancelText: string;
243
+ piIcon: string;
244
+ onEnter(_event: any): void;
245
+ onEscapte(_event: any): void;
246
+ /** Inserted by Angular inject() migration for backwards compatibility */
247
+ constructor(...args: unknown[]);
248
+ ngOnInit(): void;
249
+ cancel(): void;
250
+ confirm(): void;
251
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmComponent, never>;
252
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfirmComponent, "app-confirm", never, { "title": { "alias": "title"; "required": false; }; "message": { "alias": "message"; "required": false; }; "warning": { "alias": "warning"; "required": false; }; "oneBotton": { "alias": "oneBotton"; "required": false; }; "acceptText": { "alias": "acceptText"; "required": false; }; "cancelText": { "alias": "cancelText"; "required": false; }; "piIcon": { "alias": "piIcon"; "required": false; }; }, {}, never, never, true, never>;
253
+ }
254
+
255
+ declare class DCProgressToastComponent implements OnChanges, OnDestroy {
256
+ private messageService;
257
+ private cdr;
258
+ visible: boolean;
259
+ readonly progress: i0.InputSignal<number>;
260
+ readonly processCompleted: i0.OutputEmitterRef<void>;
261
+ readonly processClosed: i0.OutputEmitterRef<void>;
262
+ /** Inserted by Angular inject() migration for backwards compatibility */
263
+ constructor(...args: unknown[]);
264
+ ngOnChanges(changes: SimpleChanges): void;
265
+ ngOnDestroy(): void;
266
+ private showConfirm;
267
+ private onComplete;
268
+ onClose(): void;
269
+ static ɵfac: i0.ɵɵFactoryDeclaration<DCProgressToastComponent, never>;
270
+ static ɵcmp: i0.ɵɵComponentDeclaration<DCProgressToastComponent, "dc-progress-toast", never, { "visible": { "alias": "visible"; "required": false; }; "progress": { "alias": "progress"; "required": false; "isSignal": true; }; }, { "processCompleted": "processCompleted"; "processClosed": "processClosed"; }, never, never, true, never>;
271
+ }
272
+
273
+ /**
274
+ * Service for managing a loading/progress bar component in the application.
275
+ *
276
+ * This service provides methods to control the visibility, progress state, and appearance
277
+ * of a loading bar. It supports both determinate (with specific progress percentage)
278
+ * and indeterminate modes, as well as different color options.
279
+ */
280
+ declare class LoadingBarService {
281
+ /** Flag indicating whether the loading bar is currently visible */
282
+ isShowing: boolean;
283
+ /** Current progress value (0-100) for determinate mode */
284
+ progress: number;
285
+ /** The current display mode of the loading bar */
286
+ mode: 'indeterminate' | 'determinate';
287
+ /** The color of the loading bar (can be a theme color name or hex value) */
288
+ color: string;
289
+ /** Interval reference for the fake progress animation */
290
+ private progressInterval;
291
+ constructor();
292
+ /**
293
+ * Shows the loading bar in determinate mode with 0% progress.
294
+ * Use this method when starting a process with known progress states.
295
+ */
296
+ showProgressBar(): void;
297
+ /**
298
+ * Shows the loading bar in indeterminate mode.
299
+ * Use this method when the progress of a process cannot be determined.
300
+ */
301
+ showIndeterminate(): void;
302
+ /**
303
+ * Shows the loading bar in determinate mode with a specific progress value.
304
+ *
305
+ * @param progress The progress value to display (0-100)
306
+ */
307
+ showProgressBarWithProgress(progress: number): void;
308
+ /**
309
+ * Hides the loading bar and resets its state.
310
+ * Call this method when a process completes or when you want to hide the loading bar.
311
+ */
312
+ hideProgressBar(): void;
313
+ /**
314
+ * Shows a success state (green color, 100% progress) and then automatically hides the loading bar after a delay.
315
+ * Use this method to indicate successful completion of a process with visual feedback.
316
+ */
317
+ successAndHide(): void;
318
+ errorAndHide(): void;
319
+ infoAndHide(): void;
320
+ /**
321
+ * Demonstrates the loading bar by simulating progress from 0% to 100% over 5 seconds.
322
+ * This is a test/demo method to visualize how the loading bar works.
323
+ */
324
+ testProgressBar(): void;
325
+ /**
326
+ * Animates the progress bar from 0 to 100 over a specified time period
327
+ * use when you dont know the duration of the process
328
+ * if your process finish before the time ends call successAndHide()
329
+ * @param durationInSeconds The total duration of the animation in seconds (default: 20)
330
+ */
331
+ fakeProgressWithTime(durationInSeconds?: number): void;
332
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingBarService, never>;
333
+ static ɵprov: i0.ɵɵInjectableDeclaration<LoadingBarService>;
334
+ }
335
+
336
+ declare class LoadingBarComponent {
337
+ loadingBarService: LoadingBarService;
338
+ static ɵfac: i0.ɵɵFactoryDeclaration<LoadingBarComponent, never>;
339
+ static ɵcmp: i0.ɵɵComponentDeclaration<LoadingBarComponent, "dc-loading-bar", never, {}, {}, never, never, true, never>;
340
+ }
341
+
342
+ type IExtensionable = Record<string, any>;
343
+ interface IAuditable {
344
+ createdBy: string;
345
+ updatedBy: string;
346
+ authorEmail: string;
347
+ generatedByIA: boolean;
348
+ prompt?: string;
349
+ createdAt?: Date;
350
+ updatedAt?: Date;
351
+ }
352
+ interface ILearnable {
353
+ level: number;
354
+ takenCount: number;
355
+ tags: string[];
356
+ avgRating?: number;
357
+ ratingsCount?: number;
358
+ estimatedDuration?: number;
359
+ successRate?: number;
360
+ }
361
+ interface IManageable {
362
+ isPublic: boolean;
363
+ status?: 'draft' | 'review' | 'published' | 'archived';
364
+ }
365
+ interface IReactable {
366
+ reactionsCount?: {
367
+ [reactionType: string]: number;
368
+ };
369
+ }
370
+
371
+ declare class DcAuditableViewerComponent {
372
+ data: i0.InputSignal<IAuditable>;
373
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcAuditableViewerComponent, never>;
374
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcAuditableViewerComponent, "dc-auditable-viewer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
375
+ }
376
+
377
+ declare class DcExtensionsViewerComponent {
378
+ data: i0.InputSignal<IExtensionable>;
379
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcExtensionsViewerComponent, never>;
380
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcExtensionsViewerComponent, "dc-extensions-viewer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
381
+ }
382
+
383
+ declare class DcLearnableViewerComponent {
384
+ data: i0.InputSignal<ILearnable>;
385
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcLearnableViewerComponent, never>;
386
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcLearnableViewerComponent, "dc-learnable-viewer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
387
+ }
388
+
389
+ declare class DcManageableViewerComponent {
390
+ data: i0.InputSignal<IManageable>;
391
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcManageableViewerComponent, never>;
392
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcManageableViewerComponent, "dc-manageable-viewer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
393
+ }
394
+
395
+ declare class DcReactionsViewerComponent {
396
+ data: i0.InputSignal<IReactable>;
397
+ static ɵfac: i0.ɵɵFactoryDeclaration<DcReactionsViewerComponent, never>;
398
+ static ɵcmp: i0.ɵɵComponentDeclaration<DcReactionsViewerComponent, "dc-reactions-viewer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
399
+ }
400
+
401
+ /**
402
+ * Interface for HTTP error responses
403
+ */
404
+ interface HttpCoreError {
405
+ error_message: string;
406
+ explanation: string;
407
+ status?: number;
408
+ code?: string;
409
+ }
410
+ /**
411
+ * Interface for deleted data response
412
+ */
413
+ interface DeletedData {
414
+ acknowledged: boolean;
415
+ deletedCount: number;
416
+ }
417
+ /**
418
+ * Configuration for HttpCoreService
419
+ */
420
+ interface HttpCoreConfig {
421
+ primaryUrl: string;
422
+ secondaryUrl?: string;
423
+ defaultHost?: 'primary' | 'secondary';
424
+ errorHandler?: (error: HttpErrorResponse) => void;
425
+ }
426
+ /**
427
+ * Injection token for HttpCoreService configuration
428
+ */
429
+ declare const HTTP_CORE_CONFIG: InjectionToken<HttpCoreConfig>;
430
+ /**
431
+ * Modern HTTP service for Angular applications
432
+ * Provides methods for making HTTP requests with proper error handling and response transformation
433
+ */
434
+ declare class HttpCoreService {
435
+ private httpClient;
436
+ private isLoading;
437
+ private lastError;
438
+ private config;
439
+ constructor(config: HttpCoreConfig | null);
440
+ /**
441
+ * Set the configuration for the service
442
+ * This allows for manual configuration when not using dependency injection
443
+ */
444
+ setConfig(config: HttpCoreConfig): void;
445
+ /**
446
+ * Get the loading state as a signal
447
+ */
448
+ loading(): i0.WritableSignal<boolean>;
449
+ /**
450
+ * Get the last error as a signal
451
+ */
452
+ error(): i0.WritableSignal<HttpCoreError>;
453
+ /**
454
+ * Make a POST request to the specified service
455
+ * @param service The service endpoint
456
+ * @param data The data to send
457
+ * @param host The host to use (primary or secondary)
458
+ * @returns A promise with the response
459
+ */
460
+ post<T = any>(service: string, data: any, host?: "primary" | "secondary"): Promise<T>;
461
+ /**
462
+ * Make a POST request to a specific URL
463
+ * @param baseUrl The base URL
464
+ * @param service The service endpoint
465
+ * @param data The data to send
466
+ * @returns A promise with the response
467
+ */
468
+ postToUrl<T = any>(baseUrl: string, service: string, data: any): Promise<T>;
469
+ /**
470
+ * Make a PUT request to the specified service
471
+ * @param service The service endpoint
472
+ * @param data The data to send
473
+ * @param host The host to use (primary or secondary)
474
+ * @returns A promise with the response
475
+ */
476
+ put<T = any>(service: string, data: any, host?: "primary" | "secondary"): Promise<T>;
477
+ /**
478
+ * Make a PUT request to a specific URL
479
+ * @param baseUrl The base URL
480
+ * @param service The service endpoint
481
+ * @param data The data to send
482
+ * @returns A promise with the response
483
+ */
484
+ putToUrl<T = any>(baseUrl: string, service: string, data: any): Promise<T>;
485
+ /**
486
+ * Make a GET request to the specified service
487
+ * @param service The service endpoint
488
+ * @param host The host to use (primary or secondary)
489
+ * @param skipErrorHandling Whether to skip error handling
490
+ * @returns A promise with the response
491
+ */
492
+ get<T = any>(service: string, host?: "primary" | "secondary", skipErrorHandling?: boolean): Promise<T>;
493
+ /**
494
+ * Make a GET request to a specific URL
495
+ * @param baseUrl The base URL
496
+ * @param service The service endpoint
497
+ * @param skipErrorHandling Whether to skip error handling
498
+ * @returns A promise with the response
499
+ */
500
+ getFromUrl<T = any>(baseUrl: string, service: string, skipErrorHandling?: boolean): Promise<T>;
501
+ /**
502
+ * Make a DELETE request to the specified service
503
+ * @param service The service endpoint
504
+ * @param host The host to use (primary or secondary)
505
+ * @returns A promise with the response
506
+ */
507
+ delete<T = DeletedData>(service: string, host?: "primary" | "secondary"): Promise<T>;
508
+ /**
509
+ * Make a DELETE request to a specific URL
510
+ * @param baseUrl The base URL
511
+ * @param service The service endpoint
512
+ * @returns A promise with the response
513
+ */
514
+ deleteFromUrl<T = DeletedData>(baseUrl: string, service: string): Promise<T>;
515
+ /**
516
+ * Get an observable for a GET request
517
+ * @param service The service endpoint
518
+ * @param host The host to use (primary or secondary)
519
+ * @returns An observable with the response
520
+ */
521
+ getObservable<T = any>(service: string, host?: "primary" | "secondary"): Observable<T>;
522
+ /**
523
+ * Get an observable for a POST request
524
+ * @param service The service endpoint
525
+ * @param data The data to send
526
+ * @param skipErrorHandling Whether to skip error handling
527
+ * @param host The host to use (primary or secondary)
528
+ * @returns An observable with the response
529
+ */
530
+ postObservable<T = any>(service: string, data: any, skipErrorHandling?: boolean, host?: "primary" | "secondary"): Observable<T>;
531
+ /**
532
+ * Get an observable for a DELETE request
533
+ * @param service The service endpoint
534
+ * @param host The host to use (primary or secondary)
535
+ * @returns An observable with the response
536
+ */
537
+ deleteObservable<T = DeletedData>(service: string, host?: "primary" | "secondary"): Observable<T>;
538
+ /**
539
+ * Upload a file to the specified service
540
+ * @param service The service endpoint
541
+ * @param file The file to upload
542
+ * @param metadata Optional metadata to send with the file
543
+ * @param host The host to use (primary or secondary)
544
+ * @returns A promise with the response
545
+ */
546
+ uploadFile<T = any>(service: string, file: Blob, metadata?: any, host?: "primary" | "secondary"): Promise<T>;
547
+ /**
548
+ * Download a file from the specified service
549
+ * @param service The service endpoint
550
+ * @param host The host to use (primary or secondary)
551
+ * @returns A promise with the response
552
+ */
553
+ downloadFile(service: string, host?: "primary" | "secondary"): Promise<any>;
554
+ /**
555
+ * Upload a file to the specified service and get the response as a blob
556
+ * @param service The service endpoint
557
+ * @param data The data to send
558
+ * @param host The host to use (primary or secondary)
559
+ * @returns A promise with the response
560
+ */
561
+ postFileAndGetBlob(service: string, data: any, host?: "primary" | "secondary"): Promise<any>;
562
+ /**
563
+ * Get a file from the specified service as an observable
564
+ * @param service The service endpoint
565
+ * @param host The host to use (primary or secondary)
566
+ * @returns An observable with the response
567
+ */
568
+ getFileObservable(service: string, host?: "primary" | "secondary"): Observable<Blob>;
569
+ /**
570
+ * Get the URL for the specified host
571
+ * @param host The host to use (primary or secondary)
572
+ * @returns The URL for the specified host
573
+ */
574
+ private getHostUrl;
575
+ /**
576
+ * Handle an error from a request
577
+ * @param error The error to handle
578
+ * @returns An observable that throws the error
579
+ */
580
+ private handleRequestError;
581
+ /**
582
+ * Handle an error from a blob request
583
+ * @param error The error to handle
584
+ * @returns An observable that throws the error
585
+ */
586
+ private handleBlobError;
587
+ /**
588
+ * Check the status of a response
589
+ * @param response The response to check
590
+ */
591
+ private checkResponseStatus;
592
+ /**
593
+ * Convert an object to a plain object
594
+ * @param obj The object to convert
595
+ * @returns A plain object
596
+ */
597
+ private toPlainObject;
598
+ postObservableWithProgress<DataType>(service: string, data: DataType, host?: 'primary' | 'secondary'): Observable<{
599
+ progress?: number;
600
+ blob?: Blob;
601
+ }>;
602
+ static ɵfac: i0.ɵɵFactoryDeclaration<HttpCoreService, [{ optional: true; }]>;
603
+ static ɵprov: i0.ɵɵInjectableDeclaration<HttpCoreService>;
604
+ }
605
+
606
+ declare abstract class EntityCommunicationService<T> {
607
+ private serviceName;
608
+ protected httpService: HttpCoreService;
609
+ constructor(serviceName: string);
610
+ findAll(): Promise<T[]>;
611
+ findOne(id: string): Promise<T>;
612
+ createOrUpdate(entity: Partial<T>): Promise<T>;
613
+ query(filterConfig: FiltersConfig): Promise<IFilterQueryResponse<T>>;
614
+ partialUpdate(id: string, partialUpdates: Partial<T>): Promise<T>;
615
+ remove(id: string): Promise<void>;
616
+ clone(id: string, overrides?: Partial<T>): Promise<T>;
617
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityCommunicationService<any>, never>;
618
+ static ɵprov: i0.ɵɵInjectableDeclaration<EntityCommunicationService<any>>;
619
+ }
620
+
621
+ declare abstract class EntityBaseListComponent<T> extends PaginationBase implements OnInit {
622
+ protected router: Router;
623
+ protected route: ActivatedRoute;
624
+ protected abstract entityCommunicationService: EntityCommunicationService<T>;
625
+ abstract getCustomButtons(item: T): MenuItem[];
626
+ readonly initialViewType: i0.InputSignal<"table" | "card">;
627
+ readonly onlyView: i0.InputSignal<boolean>;
628
+ readonly onSelect: i0.OutputEmitterRef<T>;
629
+ items: WritableSignal<T[]>;
630
+ viewType: WritableSignal<'table' | 'card'>;
631
+ totalRecordsSignal: WritableSignal<number>;
632
+ filterBarOptions: ListFilterBarOptions;
633
+ columns: any[];
634
+ constructor();
635
+ ngOnInit(): Promise<void>;
636
+ protected loadData(): Promise<void>;
637
+ onNew(): void;
638
+ toggleView(): void;
639
+ doAction(actionEvent: OnActionEvent): Promise<void>;
640
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseListComponent<any>, never>;
641
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseListComponent<any>, never, never, { "initialViewType": { "alias": "initialViewType"; "required": false; "isSignal": true; }; "onlyView": { "alias": "onlyView"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, never, never, true, never>;
642
+ }
643
+
644
+ declare abstract class EntityBaseFormComponent<T extends {
645
+ _id?: string;
646
+ }> {
647
+ protected route: ActivatedRoute;
648
+ protected router: Router;
649
+ toastService: _dataclouder_ngx_core.ToastAlertsAbstractService;
650
+ entity: i0.WritableSignal<T>;
651
+ entityId: i0.Signal<string>;
652
+ abstract form: FormGroup;
653
+ protected abstract entityCommunicationService: EntityCommunicationService<T>;
654
+ protected abstract patchForm(entity: T): void;
655
+ save(): Promise<T | undefined>;
656
+ getDirtyValues(form: FormGroup | FormArray): {
657
+ [key: string]: unknown;
658
+ };
659
+ saveDirtyValues(): Promise<T>;
660
+ private loadEntityEffect;
661
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseFormComponent<any>, never>;
662
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseFormComponent<any>, never, never, {}, {}, never, never, true, never>;
663
+ }
664
+
665
+ declare enum EModelQuality {
666
+ FAST = "fast",// Prioritize speed over intelligence like flash lite
667
+ BALANCED = "balanced",// Equal balance like flash 2.5
668
+ SMART = "smart",// Prioritize intelligence over speed like gemini pro 2.5
669
+ SMART_THINKING = "smart-thinking"
670
+ }
671
+ declare const ModelQualityOptions: {
672
+ label: string;
673
+ value: EModelQuality;
674
+ }[];
675
+
676
+ declare const TOAST_ALERTS_TOKEN: InjectionToken<ToastAlertsAbstractService>;
677
+ interface ToastData {
678
+ title: string;
679
+ subtitle: string;
680
+ }
681
+ declare abstract class ToastAlertsAbstractService {
682
+ abstract success(data: ToastData): void;
683
+ abstract info(data: ToastData): void;
684
+ abstract warn(data: ToastData): void;
685
+ abstract error(data: ToastData): void;
686
+ }
687
+ declare function provideToastAlert(serviceImplementation: Type<ToastAlertsAbstractService>): Provider[];
688
+ declare enum AudioSpeed {
689
+ VerySlow = "verySlow",
690
+ Slow = "slow",
691
+ Regular = "regular",
692
+ Fast = "fast",
693
+ VeryFast = "veryFast"
694
+ }
695
+ declare const AudioSpeedReverse: {
696
+ verySlow: number;
697
+ slow: number;
698
+ regular: number;
699
+ fast: number;
700
+ veryFast: number;
701
+ };
702
+ declare class IAIModel {
703
+ provider?: string;
704
+ modelName?: string;
705
+ quality?: EModelQuality;
706
+ id?: string;
707
+ }
708
+ declare class ChatUserSettings {
709
+ realTime: boolean;
710
+ superHearing: boolean;
711
+ repeatRecording: boolean;
712
+ voice?: string;
713
+ highlightWords?: boolean;
714
+ synthVoice?: boolean;
715
+ model?: IAIModel;
716
+ speed?: AudioSpeed;
717
+ speedRate?: number;
718
+ userMessageTask: boolean;
719
+ assistantMessageTask: boolean;
720
+ }
721
+
722
+ /**
723
+ * Extracts and parses the first JSON object or array found within a string.
724
+ *
725
+ * @param content - The input string that may contain JSON data
726
+ * @returns {any} The parsed JSON data if found and valid, or null if:
727
+ * - No JSON object/array is found in the string
728
+ * - The found JSON is invalid and cannot be parsed
729
+ *
730
+ * @example
731
+ * // Returns {name: "John"}
732
+ * extractJsonFromString('Some text {"name": "John"} more text');
733
+ *
734
+ * // Returns [1, 2, 3]
735
+ * extractJsonFromString('Before [1,2,3] after');
736
+ *
737
+ * // Returns null
738
+ * extractJsonFromString('No JSON here');
739
+ */
740
+ declare function extractJsonFromString(content: string): any;
741
+ /**
742
+ * Transforms a camelCase string into a string with spaces between words,
743
+ * with the first letter of each word capitalized.
744
+ * e.g., "camelCaseString" becomes "Camel Case String"
745
+ * e.g., "characterDescription" becomes "Character Description"
746
+ *
747
+ * @param input The camelCase string to transform.
748
+ * @returns The transformed string with spaces and capitalized words.
749
+ */
750
+ declare function formatCamelCaseString(input: string): string;
751
+
752
+ declare class GetPathPipe implements PipeTransform {
753
+ transform(obj: any, column: PColumn): string;
754
+ static ɵfac: i0.ɵɵFactoryDeclaration<GetPathPipe, never>;
755
+ static ɵpipe: i0.ɵɵPipeDeclaration<GetPathPipe, "getPath", true>;
756
+ }
757
+
758
+ interface ConfirmOptions {
759
+ title?: string;
760
+ message?: string;
761
+ acceptText?: string;
762
+ cancelText?: string;
763
+ warning?: string;
764
+ oneBotton?: boolean;
765
+ piIcon?: string;
766
+ }
767
+ declare class ConfirmService {
768
+ pdialogService: DialogService;
769
+ /** Inserted by Angular inject() migration for backwards compatibility */
770
+ constructor(...args: unknown[]);
771
+ openConfirm(title?: string, message?: string, acceptText?: string): rxjs.Observable<any>;
772
+ confirm(options: ConfirmOptions): Promise<any>;
773
+ static ɵfac: i0.ɵɵFactoryDeclaration<ConfirmService, never>;
774
+ static ɵprov: i0.ɵɵInjectableDeclaration<ConfirmService>;
775
+ }
776
+
777
+ interface PromptOptions {
778
+ title?: string;
779
+ message?: string;
780
+ acceptText?: string;
781
+ cancelText?: string;
782
+ initialValue?: string;
783
+ }
784
+ declare class PromptService {
785
+ private readonly dialogService;
786
+ /**
787
+ * Opens a prompt dialog.
788
+ * @param options Configuration options for the prompt dialog.
789
+ * @returns A promise that resolves with the input value if accepted, or null if canceled.
790
+ */
791
+ openPrompt(options: PromptOptions): Promise<string | null>;
792
+ static ɵfac: i0.ɵɵFactoryDeclaration<PromptService, never>;
793
+ static ɵprov: i0.ɵɵInjectableDeclaration<PromptService>;
794
+ }
795
+
796
+ declare class UiStateService {
797
+ chatDrawerVisible: WritableSignal<boolean>;
798
+ static ɵfac: i0.ɵɵFactoryDeclaration<UiStateService, never>;
799
+ static ɵprov: i0.ɵɵInjectableDeclaration<UiStateService>;
800
+ }
801
+
802
+ interface ILangTranslation {
803
+ en: string;
804
+ es: string;
805
+ }
806
+ declare const SUPPORTED_LANGUAGES: string[];
807
+ interface ILanguageData {
808
+ nativeName: string;
809
+ flag: string;
810
+ code: string;
811
+ i: number;
812
+ llmKnowledge: number;
813
+ countries: string[];
814
+ translations: ILangTranslation;
815
+ flagImg?: string;
816
+ status: 'ready' | 'commingsoon' | 'almostready';
817
+ speakers: number;
818
+ }
819
+ declare const LANGUAGES: Record<string, ILanguageData>;
820
+ declare function getLangDesc(langCode: string, lang: string): string;
821
+ declare function getSupportedLanguageOptions(lang?: 'es' | 'en'): {
822
+ value: string;
823
+ label: string;
824
+ }[];
825
+
826
+ declare const MoodStateOptions: {
827
+ value: string;
828
+ label: string;
829
+ emoji: string;
830
+ }[];
831
+
832
+ export { AudioSpeed, AudioSpeedReverse, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableViewerComponent, DcManageableViewerComponent, DcReactionsViewerComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityCommunicationService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LoadingBarComponent, LoadingBarService, ModelQualityOptions, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
833
+ export type { ConfirmOptions, DeletedData, FiltersConfig, HttpCoreConfig, HttpCoreError, IAuditable, ICustomFilter, IExtensionable, IFilterQueryResponse, ILangTranslation, ILanguageData, ILearnable, IManageable, IReactable, ListFilterBarOptions, OnActionEvent, PColumn, PromptOptions, SortOption, ToastData };