@dataclouder/ngx-core 0.1.45 → 0.1.46

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 CHANGED
@@ -51,7 +51,8 @@ declare const sortTypes: ({
51
51
  interface ICustomFilter {
52
52
  name: string;
53
53
  field: string;
54
- type: 'string' | 'number' | 'boolean' | 'date' | 'select';
54
+ type: 'string' | 'number' | 'boolean' | 'date' | 'select' | 'multi-select';
55
+ operator?: '$eq' | '$ne' | '$in' | '$nin' | '$regex' | '$gt' | '$lt' | '$gte' | '$lte' | 'range';
55
56
  options?: {
56
57
  label: string;
57
58
  value: any;
@@ -202,17 +203,22 @@ declare abstract class PaginationBase {
202
203
  static ɵdir: i0.ɵɵDirectiveDeclaration<PaginationBase, never, never, { "actions": { "alias": "actions"; "required": false; "isSignal": true; }; }, { "onAction": "onAction"; }, never, never, true, never>;
203
204
  }
204
205
 
205
- declare class DCFilterBarComponent {
206
+ declare class DCFilterBarComponent implements OnInit {
206
207
  private readonly dialogService;
208
+ private readonly filterService;
207
209
  readonly items: i0.InputSignal<MenuItem[]>;
208
210
  readonly options: i0.InputSignal<ListFilterBarOptions>;
209
211
  customFilters: ICustomFilter[];
210
212
  isAdmin: boolean;
213
+ persistenceKey: string;
211
214
  readonly onFilterAction: i0.OutputEmitterRef<any>;
212
215
  readonly onNew: i0.OutputEmitterRef<any>;
213
216
  isSearchVisible: boolean;
214
217
  placeholder: string;
215
218
  filter: FiltersConfig;
219
+ private uiState;
220
+ ngOnInit(): void;
221
+ private loadSavedFilters;
216
222
  createNew(): void;
217
223
  search(text: string | null): void;
218
224
  openFilterDialog(): void;
@@ -220,7 +226,7 @@ declare class DCFilterBarComponent {
220
226
  clearFilters(): void;
221
227
  doItemAction(filterEvent: OnActionEvent): void;
222
228
  static ɵfac: i0.ɵɵFactoryDeclaration<DCFilterBarComponent, never>;
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>;
229
+ 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; }; "persistenceKey": { "alias": "persistenceKey"; "required": false; }; }, { "onFilterAction": "onFilterAction"; "onNew": "onNew"; }, never, never, true, never>;
224
230
  }
225
231
 
226
232
  declare class ConfirmComponent implements OnInit {
@@ -693,6 +699,13 @@ declare abstract class EntityCommunicationService<T> {
693
699
  partialUpdate(id: string, partialUpdates: Partial<T>): Promise<T>;
694
700
  remove(id: string): Promise<void>;
695
701
  clone(id: string, overrides?: Partial<T>): Promise<T>;
702
+ operation(params: {
703
+ action: 'findOne' | 'find' | 'create' | 'updateOne' | 'updateMany' | 'deleteOne' | 'deleteMany' | 'aggregate' | 'count';
704
+ query?: any;
705
+ payload?: any;
706
+ projection?: any;
707
+ options?: any;
708
+ }): Promise<any>;
696
709
  static ɵfac: i0.ɵɵFactoryDeclaration<EntityCommunicationService<any>, never>;
697
710
  static ɵprov: i0.ɵɵInjectableDeclaration<EntityCommunicationService<any>>;
698
711
  }
@@ -720,6 +733,43 @@ declare abstract class EntityBaseListComponent<T> extends PaginationBase impleme
720
733
  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>;
721
734
  }
722
735
 
736
+ interface MongoState {
737
+ query: any;
738
+ projection: any;
739
+ options: {
740
+ sort?: any;
741
+ limit?: number;
742
+ skip?: number;
743
+ [key: string]: any;
744
+ };
745
+ payload: any;
746
+ }
747
+ declare abstract class EntityBaseListV2Component<T> extends PaginationBase implements OnInit {
748
+ protected router: Router;
749
+ protected route: ActivatedRoute;
750
+ protected abstract entityCommunicationService: EntityCommunicationService<T>;
751
+ abstract getCustomButtons(item: T): MenuItem[];
752
+ readonly initialViewType: i0.InputSignal<"table" | "card">;
753
+ readonly onlyView: i0.InputSignal<boolean>;
754
+ readonly onSelect: i0.OutputEmitterRef<T>;
755
+ items: WritableSignal<T[]>;
756
+ viewType: WritableSignal<'table' | 'card'>;
757
+ totalRecordsSignal: WritableSignal<number>;
758
+ filterBarOptions: ListFilterBarOptions;
759
+ columns: any[];
760
+ mongoState: MongoState;
761
+ constructor();
762
+ ngOnInit(): Promise<void>;
763
+ protected loadData(): Promise<void>;
764
+ onPageChange(pageEvent: any): Promise<void>;
765
+ onNew(): void;
766
+ toggleView(): void;
767
+ doAction(actionEvent: OnActionEvent): Promise<void>;
768
+ updateQueryFromFilter(filterConfig: any): void;
769
+ static ɵfac: i0.ɵɵFactoryDeclaration<EntityBaseListV2Component<any>, never>;
770
+ static ɵdir: i0.ɵɵDirectiveDeclaration<EntityBaseListV2Component<any>, never, never, { "initialViewType": { "alias": "initialViewType"; "required": false; "isSignal": true; }; "onlyView": { "alias": "onlyView"; "required": false; "isSignal": true; }; }, { "onSelect": "onSelect"; }, never, never, true, never>;
771
+ }
772
+
723
773
  declare abstract class EntityBaseFormComponent<T extends {
724
774
  _id?: string;
725
775
  }> {
@@ -1039,5 +1089,5 @@ declare const CharacterEventActions: {
1039
1089
  label: string;
1040
1090
  }[];
1041
1091
 
1042
- export { APP_CONFIG, AppConfigService, AudioNotificationService, AudioSpeed, AudioSpeedReverse, CharacterEventActions, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, DcTagsFormComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, MobileService, ModelQualityOptions, MoodState, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
1043
- 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 };
1092
+ export { APP_CONFIG, AppConfigService, AudioNotificationService, AudioSpeed, AudioSpeedReverse, CharacterEventActions, ChatUserSettings, ConfirmComponent, ConfirmService, DCFilterBarComponent, DCProgressToastComponent, DcAuditableViewerComponent, DcExtensionsViewerComponent, DcLearnableFormComponent, DcLearnableViewerComponent, DcManageableFormComponent, DcManageableViewerComponent, DcReactionsViewerComponent, DcTagsFormComponent, EModelQuality, EmptyStateComponent, EntityBaseFormComponent, EntityBaseListComponent, EntityBaseListV2Component, EntityCommunicationService, FlagPipe, FormUtilsService, GetPathPipe, HTTP_CORE_CONFIG, HttpCoreService, IAIModel, LANGUAGES, LangDescTranslation, LoadingBarComponent, LoadingBarService, MobileService, ModelQualityOptions, MoodState, MoodStateOptions, OptionValue, PaginationBase, PromptService, QuickTableComponent, SUPPORTED_LANGUAGES, TOAST_ALERTS_TOKEN, ToastAlertsAbstractService, UiStateService, availibleFilters, extractJsonFromString, formatCamelCaseString, getLangDesc, getSupportedLanguageOptions, provideToastAlert, sortOptions, sortTypes };
1093
+ export type { AppException, ConfirmOptions, DeleteHttpParams, DeletedData, FiltersConfig, GetHttpParams, HttpCoreConfig, HttpCoreError, IAppConfig, IAuditable, ICustomFilter, IExtensionable, IFilterQueryResponse, ILangTranslation, ILanguageData, ILearnable, IManageable, IReactable, LearnableForm, ListFilterBarOptions, MongoState, OnActionEvent, PColumn, PostHttpParams, PromptOptions, PutHttpParams, SortOption, ToastData };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dataclouder/ngx-core",
3
- "version": "0.1.45",
3
+ "version": "0.1.46",
4
4
  "description": "Angular core components library for DataClouder applications, only for internal use",
5
5
  "author": {
6
6
  "name": "dataclouder",