import * as i0 from '@angular/core'; import { OnInit, Type, Signal, InputSignal, OnDestroy, WritableSignal, AfterContentInit, PipeTransform, ModuleWithProviders, ViewContainerRef, TemplateRef, InjectionToken } from '@angular/core'; import * as _smartsoft001_angular from '@smartsoft001/angular'; import { BaseComponent as BaseComponent$1, IButtonOptions, PaginationMode, ICellPipe, ListMode, IIconButtonOptions, InputBaseComponent, IListOptions, IFormOptions, DynamicComponentType, FormComponent, IDetailsOptions, IPageOptions, DynamicContentDirective, IListPaginationOptions } from '@smartsoft001/angular'; import { IEntity } from '@smartsoft001/domain-core'; import * as _smartsoft001_models from '@smartsoft001/models'; import { IModelFilter } from '@smartsoft001/models'; import { TranslateService } from '@ngx-translate/core'; import * as _ngrx_store from '@ngrx/store'; import { Store, ActionsSubject, State as State$1, Action } from '@ngrx/store'; import * as i17 from '@angular/forms'; import * as i18 from '@angular/common'; import * as i19 from 'ng-dynamic-component'; import { HttpClient } from '@angular/common/http'; import { Subscription, Observable } from 'rxjs'; import * as i7 from '@angular/router'; declare class ExportComponent> extends BaseComponent$1 implements OnInit { private facade; private popoverService; private styleService; private elementRef; buttonExportCsvOptions: IButtonOptions; buttonExportXlsxOptions: IButtonOptions; ngOnInit(): void; private initButtonExportOptions; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-export", never, {}, {}, never, never, true, never>; } interface ICrudFilter { searchText?: string; sortBy?: string; sortDesc?: boolean; offset?: number; limit?: number; paginationMode?: PaginationMode; query?: Array; } interface ICrudFilterQueryItem extends IModelFilter { key: string; value: any; type: '=' | '!=' | '>=' | '<=' | '<' | '>'; hidden?: boolean; } interface ICrudCreateManyOptions { mode: CrudCreateManyMode; } interface ICrudListGroup { key: string; value: string; text: string; show?: boolean; changed?: boolean; children?: Array; } type CrudCreateManyMode = 'default' | 'replace'; declare class FilterComponent { FieldType: typeof _smartsoft001_models.FieldTypeDef; item: i0.InputSignal; filter: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CrudConfig { apiUrl: string; entity: string; type?: any; reducerFactory?: () => any; baseQuery?: Array; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class CrudFullConfig extends CrudConfig { title: string; details?: boolean | { cellPipe?: ICellPipe; components?: { top?: any; bottom?: any; }; }; edit?: boolean | { cellPipe?: ICellPipe; components?: { top?: any; bottom?: any; }; }; add?: boolean | { components?: { top?: any; bottom?: any; }; }; remove?: boolean; search?: boolean; export?: boolean; pagination?: { limit: number; }; sort?: boolean | { default?: string; defaultDesc?: boolean; }; list?: { cellPipe?: ICellPipe; components?: { top?: any; multi?: any; }; mode?: ListMode; paginationMode?: PaginationMode; resetQuery?: 'beforeInit'; groups?: Array; }; buttons?: Array; inputComponents?: { [key: string]: Type>; }; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class CrudFacade> { private readonly store; private config; readonly loaded: Signal; readonly loading: Signal; readonly selected: Signal; readonly multiSelected: Signal; readonly list: Signal; readonly filter: Signal; readonly totalCount: Signal; readonly links: Signal; readonly error: Signal; constructor(store: Store, config: CrudConfig); create(item: T): void; createMany(items: Array, options: ICrudCreateManyOptions): void; read(filter?: ICrudFilter): void; clear(): void; select(id: string): void; unselect(): void; multiSelect(items: Array): void; update(item: T): void; export(filter?: ICrudFilter, format?: string): void; updatePartial(item: Partial & { id: string; }): void; updatePartialMany(items: (Partial & { id: string; })[]): void; delete(id: string): void; private getStore; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class BaseComponent> implements OnInit { protected facade: CrudFacade; protected translateService: TranslateService; possibilities: Signal<{ id: any; text: string; }[]>; readonly item: InputSignal; readonly filter: InputSignal; get value(): any; set value(val: any); get minValue(): any; set minValue(val: any); get maxValue(): any; set maxValue(val: any); get lang(): string; refresh(val: any, type?: string | null): void; clear(): void; ngOnInit(): void; private initPossibilities; private isArrayType; private refreshForArray; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "item": { "alias": "item"; "required": false; "isSignal": true; }; "filter": { "alias": "filter"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class FilterDateComponent> extends BaseComponent { id: string; get allowAdvanced(): boolean; set customValue(val: any); get customValue(): any; set customMinValue(val: any); get customMinValue(): any; set customMaxValue(val: any); get customMaxValue(): any; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-date", never, {}, {}, never, never, true, never>; } declare class FilterDateWithEditComponent> extends FilterDateComponent implements OnInit, OnDestroy { private _subscriptions; advanced: WritableSignal; id: string; toggleAdvanced(): void; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-date-with-edit", never, {}, {}, never, never, true, never>; } declare class FilterDateTimeComponent> extends FilterDateComponent implements OnInit, OnDestroy { private _subscriptions; id: string; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-date-time", never, {}, {}, never, never, true, never>; } declare class FilterRadioComponent> extends BaseComponent { static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-radio", never, {}, {}, never, never, true, never>; } declare class FilterTextComponent> extends BaseComponent { static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-text", never, {}, {}, never, never, true, never>; } declare class FilterFlagComponent> extends BaseComponent { static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-flag", never, {}, {}, never, never, true, never>; } declare class FilterCheckComponent> extends BaseComponent implements AfterContentInit { list: Signal<{ value: any; isCheck: boolean; }[]>; ngAfterContentInit(): void; onCheckChange(checked: boolean, entry: { value: any; isCheck: boolean; }): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-check", never, {}, {}, never, never, true, never>; } declare class FilterIntComponent> extends BaseComponent implements OnInit, OnDestroy { private _subscriptions; advanced: WritableSignal; get allowAdvanced(): boolean; ngOnInit(): void; ngOnDestroy(): void; toggleAdvanced(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filter-int", never, {}, {}, never, never, true, never>; } /** * This component is only to use in crud module * @requires CrudModule * @example * * html: * * use on the model: * @Model({ titleKey: 'body', filters: [ { label: 'testNegation', key: 'body', type: '!=', }, { label: 'fromDate', key: 'createDate', type: '<=', fieldType: FieldType.dateWithEdit }, { label: 'select', key: 'type', type: '=', fieldType: FieldType.radio, possibilities$: of([ { id: 1, text: 'Test 1' }, { id: 2, text: 'Test 2' } ]) } ] }) * * use on the field (list.filter property): * @Field({ create: modifyMetdata, update: { ...modifyMetdata, multi: true }, type: FieldType.longText, details: true, list: { order: 2, filter: true } }) body: string; */ declare class FiltersComponent> implements OnInit { private menuService; private config; private facade; private styleService; private elementRef; list: WritableSignal>; filter: Signal; /** * Hide menu used only from MenuService */ readonly hideMenu: InputSignal; onClose(): Promise; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-filters", never, { "hideMenu": { "alias": "hideMenu"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class FiltersConfigComponent implements OnInit { private readonly facade; private styleService; private elementRef; query: Signal; onRemoveQuery(item: ICrudFilterQueryItem): void; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MultiselectComponent> { private facade; config: CrudFullConfig; private menuService; private _list; private _changes; item: T; valid: boolean; buttonOptions: IButtonOptions; lock: boolean; showForm: boolean; list: Signal; constructor(); onClose(): Promise; onPartialChange(changes: Partial, list: Array): void; onValidChange(valid: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-multiselect", never, {}, {}, never, never, true, never>; } declare class GroupComponent> extends BaseComponent$1 implements OnInit, OnDestroy { private styleService; private elementRef; private groupService; readonly groups: InputSignal | null>; readonly listOptions: InputSignal | null>; change(val: boolean, item: ICrudListGroup, force?: boolean): void; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-group", never, { "groups": { "alias": "groups"; "required": false; "isSignal": true; }; "listOptions": { "alias": "listOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class FormOptionsPipe> implements PipeTransform { private modelPossibilitiesProvider; transform(item: T, mode: string, type: any, uniqueProvider?: (values: Record) => Promise, inputComponents?: { [key: string]: Type>; }): IFormOptions; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵpipe: i0.ɵɵPipeDeclaration, "smartFormOptions", true>; } declare class CrudPipesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class CrudComponentsModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class CrudService> { protected config: CrudConfig; protected http: HttpClient; protected _formatMap: { csv: string; xlsx: string; }; create(item: T): Promise; createMany(items: Array, options: ICrudCreateManyOptions): Promise; getById(id: string): Promise; getList(filter?: ICrudFilter | null): Promise<{ data: T[]; totalCount: number; links: any; }>; exportList(filter: (ICrudFilter | null) | undefined, format: 'csv' | 'xlsx'): Promise; update(item: T): Promise; updatePartial(item: Partial & { id: string; }): Promise; updatePartialMany(items: (Partial & { id: string; })[]): Promise; delete(id: string): Promise; protected getQuery(filter: ICrudFilter): string; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class CrudEffects> { private actions$; private service; private config; private store; private state; constructor(actions$: ActionsSubject, service: CrudService, config: CrudConfig, store: Store, state: State$1); init(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class CrudCoreModule> { constructor(config: CrudConfig, effects: CrudEffects); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class CrudModule> { static forFeature>(options: ICrudModuleOptionsWithRoutng | ICrudModuleOptionsWithoutRoutng): ModuleWithProviders>; constructor(config: CrudConfig, effects: CrudEffects); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } interface ICrudModuleOptionsWithRoutng { config: CrudFullConfig; socket?: boolean; routing: true; } interface ICrudModuleOptionsWithoutRoutng { config: CrudConfig; socket?: boolean; routing: false; } declare abstract class CrudItemPageBaseComponent> extends BaseComponent$1 { config: CrudFullConfig; facade: CrudFacade; static smartType: DynamicComponentType; selected: Signal; contentTpl: Signal; formComponents: Signal[]>; detailsOptions: i0.InputSignal | undefined>; mode: i0.InputSignal; uniqueProvider: i0.InputSignal<((values: Record) => Promise) | undefined>; onPartialChange: i0.OutputEmitterRef>; onChange: i0.OutputEmitterRef; onValidChange: i0.OutputEmitterRef; constructor(); static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "detailsOptions": { "alias": "detailsOptions"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; "uniqueProvider": { "alias": "uniqueProvider"; "required": false; "isSignal": true; }; }, { "onPartialChange": "onPartialChange"; "onChange": "onChange"; "onValidChange": "onValidChange"; }, never, never, true, never>; } declare class ItemStandardComponent> extends CrudItemPageBaseComponent { static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-item-standard-page", never, {}, {}, never, never, true, never>; } declare const ItemComponent_base: new () => _smartsoft001_angular.IDynamicComponent>; declare class ItemComponent> extends ItemComponent_base implements OnInit, OnDestroy { private router; private activeRoute; private facade; private service; private dynamicComponentLoader; private translateService; config: CrudFullConfig; private location; private cd; private styleService; private elementRef; private toastService; private pageService; private detailsService; private _mode; pageOptions: WritableSignal; detailsOptions: WritableSignal>; id: string; formValue: T; formValid: boolean; item: T; formPartialValue: Partial; uniqueProvider: WritableSignal<(values: Record) => Promise>; set mode(val: string); get mode(): string; selected: Signal; standardComponents: Signal>[]>; contentTpl: Signal | undefined>; topTpl: Signal; bottomTpl: Signal; dynamicContents: Signal; subscription: Subscription; constructor(); refreshProperties(): void; ngOnInit(): Promise; ngOnDestroy(): void; private generateComponents; onPartialChange(val: Partial): void; onChange(val: T): void; onValidChange(val: boolean): void; private initPageOptions; private getButtons; private getTitle; private removeParagraph; private checkFirstInvalid; private getInvalidFields; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-item-page", never, {}, {}, never, ["*"], true, never>; } declare abstract class CrudListPageBaseComponent> extends BaseComponent$1 { config: CrudFullConfig; static smartType: DynamicComponentType; contentTpl: i0.Signal; listOptions: i0.InputSignal | null | undefined>; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "listOptions": { "alias": "listOptions"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare const ListComponent_base: new () => _smartsoft001_angular.IDynamicComponent>; declare class ListComponent> extends ListComponent_base implements OnInit, OnDestroy { private facade; private router; private dynamicComponentLoader; private injector; private cd; private menuService; private hardwareService; private paginationFacade; private pageService; config: CrudFullConfig; private searchService; private _cleanMultiSelected$; pageOptions: WritableSignal; listOptions: WritableSignal | null>; links: Signal; filter: Signal; topTpl: Signal; contentTpl: Signal | undefined>; dynamicContents: Signal; refreshProperties(): void; ngOnInit(): Promise; private initCloseMenu; private clear; private getEndButtons; private initTopComponent; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-list-page", never, {}, {}, never, ["*"], true, never>; } declare class ListStandardComponent> extends CrudListPageBaseComponent { private readonly facade; readonly config: CrudFullConfig; isSearch: Signal; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "smart-crud-list-standard-page", never, {}, {}, never, never, true, never>; } declare const PAGES: (typeof ItemStandardComponent | typeof ItemComponent | typeof ListStandardComponent | typeof ListComponent)[]; declare class CrudFullModule> { constructor(config: CrudConfig, effects: CrudEffects); static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class CrudListPaginationFactory> { private readonly facade; create(options: { mode?: PaginationMode; limit: number; provider: { getLinks(): any; getFilter(): ICrudFilter; }; }): Promise; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class PageService { private authService; private config; checkPermissions(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; } declare class CrudSearchService { private _filterSource; private _enabledSource; get filter(): Partial; get enabled(): boolean; enabled$: Observable; filter$: Observable>; setFilter(val: Partial): void; setEnabled(val: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface State> { selected?: T; multiSelected?: Array; list?: T[]; totalCount?: number; filter?: ICrudFilter; links?: any; loaded: boolean; error?: string | null; } declare const initialState: State; declare function getReducer(entity: string): (state: any, action: Action) => State | { loaded: boolean; error: any; selected?: any; multiSelected?: any[] | undefined; list?: any[] | undefined; totalCount?: number; filter?: ICrudFilter; links?: any; } | { loaded: boolean; filter: any; error: null; totalCount: null; links: null; selected?: any; multiSelected?: any[] | undefined; list?: any[] | undefined; } | { loaded: boolean; list: any[]; totalCount: any; links: any; error: null; selected?: any; multiSelected?: any[] | undefined; filter?: ICrudFilter; }; declare const getCrudState: (entity: string) => _ngrx_store.MemoizedSelector>; declare const getCrudSelected: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudMultiSelected: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudList: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudTotalCount: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudLinks: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudLoaded: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudFilter: (entity: string) => _ngrx_store.MemoizedSelector any>; declare const getCrudError: (entity: string) => _ngrx_store.MemoizedSelector any>; /** * @deprecated - please, use IModelPossibilitiesProvider from @smartsoft001/angular */ declare abstract class ICrudModelPossibilitiesProvider { abstract get(type: any): { [key: string]: Observable<{ id: any; text: string; }[]>; }; } /** * @deprecated - please, use MODEL_POSSIBILITIES_PROVIDER from @smartsoft001/angular */ declare const CRUD_MODEL_POSSIBILITIES_PROVIDER: InjectionToken; export { CRUD_MODEL_POSSIBILITIES_PROVIDER, CrudComponentsModule, CrudConfig, CrudCoreModule, CrudFacade, CrudFullConfig, CrudFullModule, CrudItemPageBaseComponent, CrudListPageBaseComponent, CrudListPaginationFactory, CrudModule, CrudPipesModule, CrudSearchService, CrudService, ExportComponent, FilterCheckComponent, FilterComponent, FilterDateComponent, FilterDateTimeComponent, FilterDateWithEditComponent, FilterFlagComponent, FilterIntComponent, FilterRadioComponent, FilterTextComponent, FiltersComponent, FiltersConfigComponent, FormOptionsPipe, GroupComponent, ICrudModelPossibilitiesProvider, ItemComponent, ItemStandardComponent, ListComponent, ListStandardComponent, MultiselectComponent, PAGES, PageService, getCrudError, getCrudFilter, getCrudLinks, getCrudList, getCrudLoaded, getCrudMultiSelected, getCrudSelected, getCrudState, getCrudTotalCount, getReducer, initialState }; export type { CrudCreateManyMode, ICrudCreateManyOptions, ICrudFilter, ICrudFilterQueryItem, ICrudListGroup, ICrudModuleOptionsWithRoutng, ICrudModuleOptionsWithoutRoutng, State };