@dataclouder/ngx-core 0.1.37 → 0.1.39
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 +415 -193
- package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
- package/index.d.ts +97 -42
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { OnInit, OnChanges,
|
|
3
|
-
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
2
|
+
import { OnInit, OnChanges, OnDestroy, SimpleChanges, InjectionToken, WritableSignal, Type, Provider, PipeTransform } from '@angular/core';
|
|
4
3
|
import { MenuItem, FilterMetadata } from 'primeng/api';
|
|
5
4
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
6
5
|
import { Table } from 'primeng/table';
|
|
7
6
|
import { DynamicDialogRef, DialogService } from 'primeng/dynamicdialog';
|
|
7
|
+
import { FormGroup, FormControl, FormArray } from '@angular/forms';
|
|
8
8
|
import { HttpErrorResponse } from '@angular/common/http';
|
|
9
9
|
import * as rxjs from 'rxjs';
|
|
10
10
|
import { Observable } from 'rxjs';
|
|
11
11
|
import * as _dataclouder_ngx_core from '@dataclouder/ngx-core';
|
|
12
12
|
|
|
13
13
|
declare class EmptyStateComponent {
|
|
14
|
-
headingText: string
|
|
15
|
-
subHeadingText: string
|
|
16
|
-
|
|
14
|
+
headingText: i0.InputSignal<string>;
|
|
15
|
+
subHeadingText: i0.InputSignal<string>;
|
|
16
|
+
mainIconSrcString: i0.InputSignal<string>;
|
|
17
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>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EmptyStateComponent, "dc-empty-state", never, { "headingText": { "alias": "headingText"; "required": false; "isSignal": true; }; "subHeadingText": { "alias": "subHeadingText"; "required": false; "isSignal": true; }; "mainIconSrcString": { "alias": "mainIconSrcString"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
interface SortOption {
|
|
@@ -85,7 +85,12 @@ interface ListFilterBarOptions {
|
|
|
85
85
|
interface PColumn {
|
|
86
86
|
field: string;
|
|
87
87
|
header: string;
|
|
88
|
-
type?: 'text' | 'image' | 'tags' | 'actions';
|
|
88
|
+
type?: 'text' | 'image' | 'tags' | 'actions' | 'select' | 'boolean' | 'numeric';
|
|
89
|
+
options?: {
|
|
90
|
+
label: string;
|
|
91
|
+
value: any;
|
|
92
|
+
}[];
|
|
93
|
+
reverse?: boolean;
|
|
89
94
|
}
|
|
90
95
|
declare class QuickTableComponent {
|
|
91
96
|
readonly columns: i0.InputSignal<PColumn[]>;
|
|
@@ -108,7 +113,7 @@ declare class QuickTableComponent {
|
|
|
108
113
|
getFilterType(column: PColumn): string;
|
|
109
114
|
private initializeFilters;
|
|
110
115
|
onFilterLocal(event: any): void;
|
|
111
|
-
filterOutsideTable(type: 'tags' | 'text', column: string, value:
|
|
116
|
+
filterOutsideTable(type: 'tags' | 'text' | 'select', column: string, value: any): void;
|
|
112
117
|
static ɵfac: i0.ɵɵFactoryDeclaration<QuickTableComponent, never>;
|
|
113
118
|
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>;
|
|
114
119
|
}
|
|
@@ -197,40 +202,25 @@ declare abstract class PaginationBase {
|
|
|
197
202
|
static ɵdir: i0.ɵɵDirectiveDeclaration<PaginationBase, never, never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
|
|
198
203
|
}
|
|
199
204
|
|
|
200
|
-
declare class DCFilterBarComponent
|
|
201
|
-
private readonly
|
|
205
|
+
declare class DCFilterBarComponent {
|
|
206
|
+
private readonly dialogService;
|
|
202
207
|
readonly items: i0.InputSignal<MenuItem[]>;
|
|
203
208
|
readonly options: i0.InputSignal<ListFilterBarOptions>;
|
|
204
209
|
customFilters: ICustomFilter[];
|
|
205
210
|
isAdmin: boolean;
|
|
206
211
|
readonly onFilterAction: i0.OutputEmitterRef<any>;
|
|
207
|
-
readonly onChangeSort: i0.OutputEmitterRef<any>;
|
|
208
212
|
readonly onNew: i0.OutputEmitterRef<any>;
|
|
209
|
-
customFiltersForm: FormGroup;
|
|
210
|
-
ngOnInit(): void;
|
|
211
|
-
ngOnChanges(changes: SimpleChanges): void;
|
|
212
|
-
private buildCustomFiltersForm;
|
|
213
|
-
availibleFilters: {
|
|
214
|
-
name: string;
|
|
215
|
-
code: string;
|
|
216
|
-
}[];
|
|
217
|
-
sortOptions: SortOption[];
|
|
218
213
|
isSearchVisible: boolean;
|
|
219
|
-
isFilterVisible: boolean;
|
|
220
214
|
placeholder: string;
|
|
221
215
|
filter: FiltersConfig;
|
|
222
|
-
selectedFilters: (typeof availibleFilters)[];
|
|
223
|
-
selectedSort: SortOption | null;
|
|
224
|
-
dateRange: Date[];
|
|
225
|
-
changeFilter(event: any): void;
|
|
226
|
-
changeSort(event: any): void;
|
|
227
216
|
createNew(): void;
|
|
228
|
-
search(text
|
|
217
|
+
search(text: string | null): void;
|
|
218
|
+
openFilterDialog(): void;
|
|
219
|
+
private applyFilters;
|
|
229
220
|
clearFilters(): void;
|
|
230
|
-
applyFilters(): void;
|
|
231
221
|
doItemAction(filterEvent: OnActionEvent): void;
|
|
232
222
|
static ɵfac: i0.ɵɵFactoryDeclaration<DCFilterBarComponent, never>;
|
|
233
|
-
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; }; "isAdmin": { "alias": "isAdmin"; "required": false; }; }, { "onFilterAction": "onFilterAction"; "
|
|
223
|
+
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; }; "isAdmin": { "alias": "isAdmin"; "required": false; }; }, { "onFilterAction": "onFilterAction"; "onNew": "onNew"; }, never, never, true, never>;
|
|
234
224
|
}
|
|
235
225
|
|
|
236
226
|
declare class ConfirmComponent implements OnInit {
|
|
@@ -503,8 +493,10 @@ declare class HttpCoreService {
|
|
|
503
493
|
*/
|
|
504
494
|
error(): i0.WritableSignal<HttpCoreError>;
|
|
505
495
|
postHttp<T = any>({ service, data, host }: PostHttpParams): Promise<T>;
|
|
496
|
+
postHttp$<T = any>({ service, data, host }: PostHttpParams): Observable<T>;
|
|
506
497
|
putHttp<T = any>({ service, data, host }: PutHttpParams): Promise<T>;
|
|
507
498
|
getHttp<T = any>({ service, host, skipErrorHandling }: GetHttpParams): Promise<T>;
|
|
499
|
+
getHttp$<T = any>({ service, host, skipErrorHandling }: GetHttpParams): Observable<T>;
|
|
508
500
|
deleteHttp<T = DeletedData>({ service, host }: DeleteHttpParams): Promise<T>;
|
|
509
501
|
/**
|
|
510
502
|
* Make a POST request to the specified service
|
|
@@ -597,6 +589,7 @@ declare class HttpCoreService {
|
|
|
597
589
|
deleteObservable<T = DeletedData>(service: string, host?: string): Observable<T>;
|
|
598
590
|
/**
|
|
599
591
|
* Upload a file to the specified service
|
|
592
|
+
* @Deprecated use postFile
|
|
600
593
|
* @param service The service endpoint
|
|
601
594
|
* @param file The file to upload
|
|
602
595
|
* @param metadata Optional metadata to send with the file
|
|
@@ -604,6 +597,20 @@ declare class HttpCoreService {
|
|
|
604
597
|
* @returns A promise with the response
|
|
605
598
|
*/
|
|
606
599
|
uploadFile<T = any>(service: string, file: Blob, metadata?: any, host?: string): Promise<T>;
|
|
600
|
+
/**
|
|
601
|
+
* Upload a file to the specified service
|
|
602
|
+
* @param service The service endpoint
|
|
603
|
+
* @param file The file to upload
|
|
604
|
+
* @param metadata Optional metadata to send with the file
|
|
605
|
+
* @param host The host to use (primary or secondary)
|
|
606
|
+
* @returns A promise with the response
|
|
607
|
+
*/
|
|
608
|
+
postFile<T = any>({ service, file, metadata, host }: {
|
|
609
|
+
service: string;
|
|
610
|
+
file: Blob;
|
|
611
|
+
metadata?: any;
|
|
612
|
+
host?: string;
|
|
613
|
+
}): Promise<T>;
|
|
607
614
|
/**
|
|
608
615
|
* Download a file from the specified service
|
|
609
616
|
* @param service The service endpoint
|
|
@@ -637,18 +644,13 @@ declare class HttpCoreService {
|
|
|
637
644
|
* @param error The error to handle
|
|
638
645
|
* @returns An observable that throws the error
|
|
639
646
|
*/
|
|
640
|
-
|
|
647
|
+
protected handleRequestError(error: HttpErrorResponse): Observable<never>;
|
|
641
648
|
/**
|
|
642
649
|
* Handle an error from a blob request
|
|
643
650
|
* @param error The error to handle
|
|
644
651
|
* @returns An observable that throws the error
|
|
645
652
|
*/
|
|
646
653
|
private handleBlobError;
|
|
647
|
-
/**
|
|
648
|
-
* Check the status of a response
|
|
649
|
-
* @param response The response to check
|
|
650
|
-
*/
|
|
651
|
-
private checkResponseStatus;
|
|
652
654
|
/**
|
|
653
655
|
* Convert an object to a plain object
|
|
654
656
|
* @param obj The object to convert
|
|
@@ -672,6 +674,7 @@ declare abstract class EntityCommunicationService<T> {
|
|
|
672
674
|
findOne(id: string): Promise<T>;
|
|
673
675
|
createOrUpdate(entity: Partial<T>): Promise<T>;
|
|
674
676
|
query(filterConfig: FiltersConfig): Promise<IFilterQueryResponse<T>>;
|
|
677
|
+
update(id: string, update: any): Promise<T>;
|
|
675
678
|
partialUpdate(id: string, partialUpdates: Partial<T>): Promise<T>;
|
|
676
679
|
remove(id: string): Promise<void>;
|
|
677
680
|
clone(id: string, overrides?: Partial<T>): Promise<T>;
|
|
@@ -708,7 +711,9 @@ declare abstract class EntityBaseFormComponent<T extends {
|
|
|
708
711
|
protected route: ActivatedRoute;
|
|
709
712
|
protected router: Router;
|
|
710
713
|
toastService: _dataclouder_ngx_core.ToastAlertsAbstractService;
|
|
714
|
+
id: i0.InputSignal<string>;
|
|
711
715
|
entity: i0.WritableSignal<T>;
|
|
716
|
+
private entityIdFromUrl;
|
|
712
717
|
entityId: i0.Signal<string>;
|
|
713
718
|
abstract form: FormGroup;
|
|
714
719
|
protected abstract entityCommunicationService: EntityCommunicationService<T>;
|
|
@@ -720,7 +725,7 @@ declare abstract class EntityBaseFormComponent<T extends {
|
|
|
720
725
|
saveDirtyValues(): Promise<T>;
|
|
721
726
|
private loadEntityEffect;
|
|
722
727
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseFormComponent<any>, never>;
|
|
723
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseFormComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
728
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseFormComponent<any>, never, never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
724
729
|
}
|
|
725
730
|
|
|
726
731
|
declare enum EModelQuality {
|
|
@@ -779,6 +784,17 @@ declare class ChatUserSettings {
|
|
|
779
784
|
userMessageTask: boolean;
|
|
780
785
|
assistantMessageTask: boolean;
|
|
781
786
|
}
|
|
787
|
+
interface AppException {
|
|
788
|
+
error_message?: string;
|
|
789
|
+
explanation?: string;
|
|
790
|
+
path?: string;
|
|
791
|
+
statusCode?: number;
|
|
792
|
+
method?: string;
|
|
793
|
+
obj?: any;
|
|
794
|
+
exception?: any;
|
|
795
|
+
suggestion?: string;
|
|
796
|
+
type?: string;
|
|
797
|
+
}
|
|
782
798
|
|
|
783
799
|
/**
|
|
784
800
|
* Extracts and parses the first JSON object or array found within a string.
|
|
@@ -879,7 +895,7 @@ interface IAppConfig {
|
|
|
879
895
|
backendPythonUrl: string;
|
|
880
896
|
backendNodeUrl: string;
|
|
881
897
|
aiServicesUrl: string;
|
|
882
|
-
|
|
898
|
+
kbHost: string;
|
|
883
899
|
clientId: string;
|
|
884
900
|
mobile: {
|
|
885
901
|
appleAppId: string;
|
|
@@ -903,11 +919,16 @@ interface IAppConfig {
|
|
|
903
919
|
declare const APP_CONFIG: InjectionToken<IAppConfig>;
|
|
904
920
|
declare class AppConfigService {
|
|
905
921
|
config: IAppConfig;
|
|
906
|
-
constructor();
|
|
907
922
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigService, never>;
|
|
908
923
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppConfigService>;
|
|
909
924
|
}
|
|
910
925
|
|
|
926
|
+
declare class AudioNotificationService {
|
|
927
|
+
playFinishNotification(): void;
|
|
928
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AudioNotificationService, never>;
|
|
929
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AudioNotificationService>;
|
|
930
|
+
}
|
|
931
|
+
|
|
911
932
|
interface ILangTranslation {
|
|
912
933
|
en: string;
|
|
913
934
|
es: string;
|
|
@@ -917,6 +938,7 @@ interface ILanguageData {
|
|
|
917
938
|
nativeName: string;
|
|
918
939
|
flag: string;
|
|
919
940
|
code: string;
|
|
941
|
+
defaultLocale: string;
|
|
920
942
|
i: number;
|
|
921
943
|
llmKnowledge: number;
|
|
922
944
|
countries: string[];
|
|
@@ -927,17 +949,50 @@ interface ILanguageData {
|
|
|
927
949
|
releaseDate?: string;
|
|
928
950
|
}
|
|
929
951
|
declare const LANGUAGES: Record<string, ILanguageData>;
|
|
930
|
-
declare function getLangDesc(langCode: string, lang
|
|
952
|
+
declare function getLangDesc(langCode: string, lang?: string): string;
|
|
931
953
|
declare function getSupportedLanguageOptions(lang?: 'es' | 'en'): {
|
|
932
954
|
value: string;
|
|
933
955
|
label: string;
|
|
934
956
|
}[];
|
|
935
957
|
|
|
958
|
+
declare enum MoodState {
|
|
959
|
+
HAPPY = "happy",
|
|
960
|
+
SAD = "sad",
|
|
961
|
+
ANGRY = "angry",
|
|
962
|
+
FEAR = "fear",
|
|
963
|
+
SURPRISED = "surprised",
|
|
964
|
+
DISGUSTED = "disgusted",
|
|
965
|
+
PROUD = "proud",
|
|
966
|
+
ASHAMED = "ashamed",
|
|
967
|
+
GUILTY = "guilty",
|
|
968
|
+
JEALOUS = "jealous",
|
|
969
|
+
LOVE = "love",
|
|
970
|
+
CONTEMPT = "contempt",
|
|
971
|
+
COMIC = "comic",
|
|
972
|
+
BLUSHING = "blushing",
|
|
973
|
+
CONFUSED = "confused",
|
|
974
|
+
CURIOUS = "curious",
|
|
975
|
+
BORED = "bored",
|
|
976
|
+
FRUSTRATED = "frustrated",
|
|
977
|
+
OVERWHELMED = "overwhelmed",
|
|
978
|
+
FOCUSED = "focused",
|
|
979
|
+
CHALLENGE = "challenge",
|
|
980
|
+
SERIOUS = "serious",
|
|
981
|
+
SLEEPY = "sleepy",
|
|
982
|
+
HORNY = "horny",
|
|
983
|
+
ANXIOUS = "anxious",
|
|
984
|
+
RELAXED = "relaxed"
|
|
985
|
+
}
|
|
936
986
|
declare const MoodStateOptions: {
|
|
937
|
-
value:
|
|
987
|
+
value: MoodState;
|
|
938
988
|
label: string;
|
|
939
989
|
emoji: string;
|
|
940
990
|
}[];
|
|
941
991
|
|
|
942
|
-
|
|
943
|
-
|
|
992
|
+
declare const CharacterEventActions: {
|
|
993
|
+
value: string;
|
|
994
|
+
label: string;
|
|
995
|
+
}[];
|
|
996
|
+
|
|
997
|
+
export { APP_CONFIG, AppConfigService, AudioNotificationService, AudioSpeed, AudioSpeedReverse, CharacterEventActions, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, ModelQualityOptions, MoodState, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
|
|
998
|
+
export type { AppException, ConfirmOptions, DeleteHttpParams, DeletedData, FiltersConfig, GetHttpParams, HttpCoreConfig, HttpCoreError, IAppConfig, IAuditable, ICustomFilter, IExtensionable, IFilterQueryResponse, ILangTranslation, ILanguageData, ILearnable, IManageable, IReactable, LearnableForm, ListFilterBarOptions, OnActionEvent, PColumn, PostHttpParams, PromptOptions, PutHttpParams, SortOption, ToastData };
|