@dataclouder/ngx-core 0.1.32 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/dataclouder-ngx-core.mjs +892 -702
- package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
- package/index.d.ts +71 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { OnInit, OnChanges, SimpleChanges, OnDestroy, InjectionToken, WritableSignal, Type, Provider, PipeTransform } from '@angular/core';
|
|
3
|
-
import { FormGroup, FormArray } from '@angular/forms';
|
|
3
|
+
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
4
4
|
import { MenuItem, FilterMetadata } from 'primeng/api';
|
|
5
5
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
6
6
|
import { Table } from 'primeng/table';
|
|
@@ -64,6 +64,7 @@ interface FiltersConfig {
|
|
|
64
64
|
sort?: {
|
|
65
65
|
[key: string]: number;
|
|
66
66
|
};
|
|
67
|
+
seed?: number;
|
|
67
68
|
filters?: {
|
|
68
69
|
[key: string]: any;
|
|
69
70
|
};
|
|
@@ -398,6 +399,36 @@ declare class DcReactionsViewerComponent {
|
|
|
398
399
|
static ɵcmp: i0.ɵɵComponentDeclaration<DcReactionsViewerComponent, "dc-reactions-viewer", never, { "data": { "alias": "data"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
399
400
|
}
|
|
400
401
|
|
|
402
|
+
declare class DcManageableFormComponent {
|
|
403
|
+
form: i0.InputSignal<FormGroup<any>>;
|
|
404
|
+
statusOptions: {
|
|
405
|
+
label: string;
|
|
406
|
+
value: string;
|
|
407
|
+
}[];
|
|
408
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DcManageableFormComponent, never>;
|
|
409
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DcManageableFormComponent, "dc-manageable-form", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
type LearnableForm = FormGroup<{
|
|
413
|
+
level: FormControl<number | null>;
|
|
414
|
+
takenCount: FormControl<number | null>;
|
|
415
|
+
tags: FormArray<FormControl<string | null>>;
|
|
416
|
+
}>;
|
|
417
|
+
declare class FormUtilsService {
|
|
418
|
+
private fb;
|
|
419
|
+
createMetaFormGroup(): FormGroup;
|
|
420
|
+
createManageableFormGroup(): FormGroup;
|
|
421
|
+
createLearnableFormGroup(): LearnableForm;
|
|
422
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormUtilsService, never>;
|
|
423
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormUtilsService>;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
declare class DcLearnableFormComponent {
|
|
427
|
+
form: i0.InputSignal<LearnableForm>;
|
|
428
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DcLearnableFormComponent, never>;
|
|
429
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<DcLearnableFormComponent, "dc-learnable-form", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
430
|
+
}
|
|
431
|
+
|
|
401
432
|
/**
|
|
402
433
|
* Interface for HTTP error responses
|
|
403
434
|
*/
|
|
@@ -423,6 +454,25 @@ interface HttpCoreConfig {
|
|
|
423
454
|
defaultHost?: 'primary' | 'secondary';
|
|
424
455
|
errorHandler?: (error: HttpErrorResponse) => void;
|
|
425
456
|
}
|
|
457
|
+
interface PostHttpParams {
|
|
458
|
+
service: string;
|
|
459
|
+
data: unknown;
|
|
460
|
+
host?: 'primary' | 'secondary' | string;
|
|
461
|
+
}
|
|
462
|
+
interface PutHttpParams {
|
|
463
|
+
service: string;
|
|
464
|
+
data: unknown;
|
|
465
|
+
host?: 'primary' | 'secondary' | string;
|
|
466
|
+
}
|
|
467
|
+
interface GetHttpParams {
|
|
468
|
+
service: string;
|
|
469
|
+
host?: 'primary' | 'secondary' | string;
|
|
470
|
+
skipErrorHandling?: boolean;
|
|
471
|
+
}
|
|
472
|
+
interface DeleteHttpParams {
|
|
473
|
+
service: string;
|
|
474
|
+
host?: 'primary' | 'secondary' | string;
|
|
475
|
+
}
|
|
426
476
|
/**
|
|
427
477
|
* Injection token for HttpCoreService configuration
|
|
428
478
|
*/
|
|
@@ -435,7 +485,7 @@ declare class HttpCoreService {
|
|
|
435
485
|
private httpClient;
|
|
436
486
|
private isLoading;
|
|
437
487
|
private lastError;
|
|
438
|
-
|
|
488
|
+
config: HttpCoreConfig;
|
|
439
489
|
constructor(config: HttpCoreConfig | null);
|
|
440
490
|
/**
|
|
441
491
|
* Set the configuration for the service
|
|
@@ -450,12 +500,17 @@ declare class HttpCoreService {
|
|
|
450
500
|
* Get the last error as a signal
|
|
451
501
|
*/
|
|
452
502
|
error(): i0.WritableSignal<HttpCoreError>;
|
|
503
|
+
postHttp<T = any>({ service, data, host }: PostHttpParams): Promise<T>;
|
|
504
|
+
putHttp<T = any>({ service, data, host }: PutHttpParams): Promise<T>;
|
|
505
|
+
getHttp<T = any>({ service, host, skipErrorHandling }: GetHttpParams): Promise<T>;
|
|
506
|
+
deleteHttp<T = DeletedData>({ service, host }: DeleteHttpParams): Promise<T>;
|
|
453
507
|
/**
|
|
454
508
|
* Make a POST request to the specified service
|
|
455
509
|
* @param service The service endpoint
|
|
456
510
|
* @param data The data to send
|
|
457
511
|
* @param host The host to use (primary or secondary)
|
|
458
512
|
* @returns A promise with the response
|
|
513
|
+
* @deprecated Use postHttp instead
|
|
459
514
|
*/
|
|
460
515
|
post<T = any>(service: string, data: any, host?: "primary" | "secondary"): Promise<T>;
|
|
461
516
|
/**
|
|
@@ -472,6 +527,7 @@ declare class HttpCoreService {
|
|
|
472
527
|
* @param data The data to send
|
|
473
528
|
* @param host The host to use (primary or secondary)
|
|
474
529
|
* @returns A promise with the response
|
|
530
|
+
* @deprecated Use putHttp instead
|
|
475
531
|
*/
|
|
476
532
|
put<T = any>(service: string, data: any, host?: "primary" | "secondary"): Promise<T>;
|
|
477
533
|
/**
|
|
@@ -488,6 +544,7 @@ declare class HttpCoreService {
|
|
|
488
544
|
* @param host The host to use (primary or secondary)
|
|
489
545
|
* @param skipErrorHandling Whether to skip error handling
|
|
490
546
|
* @returns A promise with the response
|
|
547
|
+
* @deprecated Use getHttp instead
|
|
491
548
|
*/
|
|
492
549
|
get<T = any>(service: string, host?: "primary" | "secondary", skipErrorHandling?: boolean): Promise<T>;
|
|
493
550
|
/**
|
|
@@ -503,6 +560,7 @@ declare class HttpCoreService {
|
|
|
503
560
|
* @param service The service endpoint
|
|
504
561
|
* @param host The host to use (primary or secondary)
|
|
505
562
|
* @returns A promise with the response
|
|
563
|
+
* @deprecated Use deleteHttp instead
|
|
506
564
|
*/
|
|
507
565
|
delete<T = DeletedData>(service: string, host?: "primary" | "secondary"): Promise<T>;
|
|
508
566
|
/**
|
|
@@ -605,8 +663,9 @@ declare class HttpCoreService {
|
|
|
605
663
|
|
|
606
664
|
declare abstract class EntityCommunicationService<T> {
|
|
607
665
|
private serviceName;
|
|
666
|
+
private customHost?;
|
|
608
667
|
protected httpService: HttpCoreService;
|
|
609
|
-
constructor(serviceName: string);
|
|
668
|
+
constructor(serviceName: string, customHost?: string);
|
|
610
669
|
findAll(): Promise<T[]>;
|
|
611
670
|
findOne(id: string): Promise<T>;
|
|
612
671
|
createOrUpdate(entity: Partial<T>): Promise<T>;
|
|
@@ -755,6 +814,12 @@ declare class GetPathPipe implements PipeTransform {
|
|
|
755
814
|
static ɵpipe: i0.ɵɵPipeDeclaration<GetPathPipe, "getPath", true>;
|
|
756
815
|
}
|
|
757
816
|
|
|
817
|
+
declare class LangDescTranslation implements PipeTransform {
|
|
818
|
+
transform(value: string, lang: any): string;
|
|
819
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LangDescTranslation, never>;
|
|
820
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LangDescTranslation, "langDesc", true>;
|
|
821
|
+
}
|
|
822
|
+
|
|
758
823
|
interface ConfirmOptions {
|
|
759
824
|
title?: string;
|
|
760
825
|
message?: string;
|
|
@@ -815,6 +880,7 @@ interface ILanguageData {
|
|
|
815
880
|
flagImg?: string;
|
|
816
881
|
status: 'ready' | 'commingsoon' | 'almostready';
|
|
817
882
|
speakers: number;
|
|
883
|
+
releaseDate?: string;
|
|
818
884
|
}
|
|
819
885
|
declare const LANGUAGES: Record<string, ILanguageData>;
|
|
820
886
|
declare function getLangDesc(langCode: string, lang: string): string;
|
|
@@ -829,5 +895,5 @@ declare const MoodStateOptions: {
|
|
|
829
895
|
emoji: string;
|
|
830
896
|
}[];
|
|
831
897
|
|
|
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 };
|
|
898
|
+
export { AudioSpeed, AudioSpeedReverse, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityCommunicationService, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, ModelQualityOptions, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
|
|
899
|
+
export type { ConfirmOptions, DeleteHttpParams, DeletedData, FiltersConfig, GetHttpParams, HttpCoreConfig, HttpCoreError, IAuditable, ICustomFilter, IExtensionable, IFilterQueryResponse, ILangTranslation, ILanguageData, ILearnable, IManageable, IReactable, LearnableForm, ListFilterBarOptions, OnActionEvent, PColumn, PostHttpParams, PromptOptions, PutHttpParams, SortOption, ToastData };
|