@dataclouder/ngx-core 0.1.38 → 0.1.40
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 +241 -164
- package/fesm2022/dataclouder-ngx-core.mjs.map +1 -1
- package/index.d.ts +35 -42
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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';
|
|
@@ -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 {
|
|
@@ -430,13 +420,6 @@ declare class DcLearnableFormComponent {
|
|
|
430
420
|
static ɵcmp: i0.ɵɵComponentDeclaration<DcLearnableFormComponent, "dc-learnable-form", never, { "form": { "alias": "form"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
431
421
|
}
|
|
432
422
|
|
|
433
|
-
declare const AppHttpCode: {
|
|
434
|
-
GoodRefreshToken: number;
|
|
435
|
-
GoodPlanExpired: number;
|
|
436
|
-
ErrorRefreshToken: number;
|
|
437
|
-
GoodWelcome: number;
|
|
438
|
-
ErrorAndLogout: number;
|
|
439
|
-
};
|
|
440
423
|
/**
|
|
441
424
|
* Interface for HTTP error responses
|
|
442
425
|
*/
|
|
@@ -510,8 +493,10 @@ declare class HttpCoreService {
|
|
|
510
493
|
*/
|
|
511
494
|
error(): i0.WritableSignal<HttpCoreError>;
|
|
512
495
|
postHttp<T = any>({ service, data, host }: PostHttpParams): Promise<T>;
|
|
496
|
+
postHttp$<T = any>({ service, data, host }: PostHttpParams): Observable<T>;
|
|
513
497
|
putHttp<T = any>({ service, data, host }: PutHttpParams): Promise<T>;
|
|
514
498
|
getHttp<T = any>({ service, host, skipErrorHandling }: GetHttpParams): Promise<T>;
|
|
499
|
+
getHttp$<T = any>({ service, host, skipErrorHandling }: GetHttpParams): Observable<T>;
|
|
515
500
|
deleteHttp<T = DeletedData>({ service, host }: DeleteHttpParams): Promise<T>;
|
|
516
501
|
/**
|
|
517
502
|
* Make a POST request to the specified service
|
|
@@ -666,11 +651,6 @@ declare class HttpCoreService {
|
|
|
666
651
|
* @returns An observable that throws the error
|
|
667
652
|
*/
|
|
668
653
|
private handleBlobError;
|
|
669
|
-
/**
|
|
670
|
-
* Check the status of a response
|
|
671
|
-
* @param response The response to check
|
|
672
|
-
*/
|
|
673
|
-
private checkResponseStatus;
|
|
674
654
|
/**
|
|
675
655
|
* Convert an object to a plain object
|
|
676
656
|
* @param obj The object to convert
|
|
@@ -692,6 +672,7 @@ declare abstract class EntityCommunicationService<T> {
|
|
|
692
672
|
constructor(serviceName: string);
|
|
693
673
|
findAll(): Promise<T[]>;
|
|
694
674
|
findOne(id: string): Promise<T>;
|
|
675
|
+
findOneByQuery(query: any, projection?: any): Promise<T>;
|
|
695
676
|
createOrUpdate(entity: Partial<T>): Promise<T>;
|
|
696
677
|
query(filterConfig: FiltersConfig): Promise<IFilterQueryResponse<T>>;
|
|
697
678
|
update(id: string, update: any): Promise<T>;
|
|
@@ -731,7 +712,9 @@ declare abstract class EntityBaseFormComponent<T extends {
|
|
|
731
712
|
protected route: ActivatedRoute;
|
|
732
713
|
protected router: Router;
|
|
733
714
|
toastService: _dataclouder_ngx_core.ToastAlertsAbstractService;
|
|
715
|
+
id: i0.InputSignal<string>;
|
|
734
716
|
entity: i0.WritableSignal<T>;
|
|
717
|
+
private entityIdFromUrl;
|
|
735
718
|
entityId: i0.Signal<string>;
|
|
736
719
|
abstract form: FormGroup;
|
|
737
720
|
protected abstract entityCommunicationService: EntityCommunicationService<T>;
|
|
@@ -743,7 +726,7 @@ declare abstract class EntityBaseFormComponent<T extends {
|
|
|
743
726
|
saveDirtyValues(): Promise<T>;
|
|
744
727
|
private loadEntityEffect;
|
|
745
728
|
static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseFormComponent<any>, never>;
|
|
746
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseFormComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
729
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseFormComponent<any>, never, never, { "id": { "alias": "id"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
747
730
|
}
|
|
748
731
|
|
|
749
732
|
declare enum EModelQuality {
|
|
@@ -802,6 +785,17 @@ declare class ChatUserSettings {
|
|
|
802
785
|
userMessageTask: boolean;
|
|
803
786
|
assistantMessageTask: boolean;
|
|
804
787
|
}
|
|
788
|
+
interface AppException {
|
|
789
|
+
error_message?: string;
|
|
790
|
+
explanation?: string;
|
|
791
|
+
path?: string;
|
|
792
|
+
statusCode?: number;
|
|
793
|
+
method?: string;
|
|
794
|
+
obj?: any;
|
|
795
|
+
exception?: any;
|
|
796
|
+
suggestion?: string;
|
|
797
|
+
type?: string;
|
|
798
|
+
}
|
|
805
799
|
|
|
806
800
|
/**
|
|
807
801
|
* Extracts and parses the first JSON object or array found within a string.
|
|
@@ -902,7 +896,7 @@ interface IAppConfig {
|
|
|
902
896
|
backendPythonUrl: string;
|
|
903
897
|
backendNodeUrl: string;
|
|
904
898
|
aiServicesUrl: string;
|
|
905
|
-
|
|
899
|
+
kbHost: string;
|
|
906
900
|
clientId: string;
|
|
907
901
|
mobile: {
|
|
908
902
|
appleAppId: string;
|
|
@@ -926,7 +920,6 @@ interface IAppConfig {
|
|
|
926
920
|
declare const APP_CONFIG: InjectionToken<IAppConfig>;
|
|
927
921
|
declare class AppConfigService {
|
|
928
922
|
config: IAppConfig;
|
|
929
|
-
constructor();
|
|
930
923
|
static ɵfac: i0.ɵɵFactoryDeclaration<AppConfigService, never>;
|
|
931
924
|
static ɵprov: i0.ɵɵInjectableDeclaration<AppConfigService>;
|
|
932
925
|
}
|
|
@@ -1002,5 +995,5 @@ declare const CharacterEventActions: {
|
|
|
1002
995
|
label: string;
|
|
1003
996
|
}[];
|
|
1004
997
|
|
|
1005
|
-
export { APP_CONFIG, AppConfigService,
|
|
1006
|
-
export type { 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 };
|
|
998
|
+
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 };
|
|
999
|
+
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 };
|