@zambon-dev/library 1.0.0
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/zambon-dev-library.mjs +3795 -0
- package/fesm2022/zambon-dev-library.mjs.map +1 -0
- package/index.d.ts +10 -0
- package/lib/components/base.component.d.ts +9 -0
- package/lib/components/catalog-select/catalog-select.component.d.ts +112 -0
- package/lib/components/data-grid/data-grid.component.d.ts +49 -0
- package/lib/components/data-grid-row/data-grid-row.component.d.ts +30 -0
- package/lib/components/form-group/form-group.component.d.ts +8 -0
- package/lib/components/form-input/form-input.component.d.ts +47 -0
- package/lib/components/form-input-group/form-input-group.component.d.ts +40 -0
- package/lib/components/group-accordion/group-accordion.component.d.ts +13 -0
- package/lib/components/group-container/group-container.component.d.ts +16 -0
- package/lib/components/group-scroll-spy/group-scroll-spy.component.d.ts +14 -0
- package/lib/components/index.d.ts +18 -0
- package/lib/components/modal/modal.component.d.ts +26 -0
- package/lib/components/multi-editor/multi-editor.component.d.ts +30 -0
- package/lib/components/multi-select/multi-select.component.d.ts +25 -0
- package/lib/components/multi-select/result-grid/result-grid.component.d.ts +18 -0
- package/lib/components/ribbon/ribbon.component.d.ts +5 -0
- package/lib/components/ribbon-button/ribbon-button.component.d.ts +31 -0
- package/lib/components/ribbon-group/ribbon-group.component.d.ts +10 -0
- package/lib/components/sidebar/sidebar.component.d.ts +34 -0
- package/lib/components/sidebar-item/sidebar-item.component.d.ts +30 -0
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/scroll-spy.directive.d.ts +16 -0
- package/lib/helpers/date-helpers.d.ts +3 -0
- package/lib/helpers/guid-helper.d.ts +3 -0
- package/lib/helpers/index.d.ts +3 -0
- package/lib/helpers/route-formatter.d.ts +4 -0
- package/lib/library.module.d.ts +27 -0
- package/lib/models/batch-update.d.ts +4 -0
- package/lib/models/catalog-entry.d.ts +4 -0
- package/lib/models/catalog-result.d.ts +5 -0
- package/lib/models/configs/data-grid-configs.d.ts +9 -0
- package/lib/models/configs/grid-configs.d.ts +9 -0
- package/lib/models/configs/index.d.ts +2 -0
- package/lib/models/data-grid-parameters.d.ts +12 -0
- package/lib/models/grid-column.d.ts +9 -0
- package/lib/models/index.d.ts +13 -0
- package/lib/models/modal.interface.d.ts +7 -0
- package/lib/models/multi-editor-changes.d.ts +6 -0
- package/lib/models/multi-selector-changes.d.ts +4 -0
- package/lib/models/ribbon-button-option.d.ts +13 -0
- package/lib/models/ribbon-group-child.d.ts +3 -0
- package/lib/models/sidebar/index.d.ts +3 -0
- package/lib/models/sidebar/sidebar-configs.d.ts +9 -0
- package/lib/models/sidebar/sidebar-menu.d.ts +12 -0
- package/lib/models/sidebar/sidebar-profile.d.ts +5 -0
- package/lib/models/tab-view.d.ts +5 -0
- package/lib/pipes/enum.d.ts +12 -0
- package/lib/pipes/index.d.ts +3 -0
- package/lib/pipes/replace-many.pipe.d.ts +9 -0
- package/lib/pipes/replace.pipe.d.ts +7 -0
- package/lib/services/catalog.service.d.ts +11 -0
- package/lib/services/configs-providers/data-grid-configs.provider.d.ts +8 -0
- package/lib/services/configs-providers/grid-configs.provider.d.ts +9 -0
- package/lib/services/configs-providers/index.d.ts +2 -0
- package/lib/services/data-providers/data-provider.service.d.ts +29 -0
- package/lib/services/data-providers/index.d.ts +1 -0
- package/lib/services/datasets/base.dataset.d.ts +15 -0
- package/lib/services/datasets/data-grid.dataset.d.ts +33 -0
- package/lib/services/datasets/grid.dataset.d.ts +55 -0
- package/lib/services/datasets/index.d.ts +5 -0
- package/lib/services/datasets/multi-editor.dataset.d.ts +22 -0
- package/lib/services/datasets/multi-select-result.dataset.d.ts +26 -0
- package/lib/services/form-group.service.d.ts +5 -0
- package/lib/services/form.service.d.ts +39 -0
- package/lib/services/index.d.ts +6 -0
- package/lib/services/sidebar.service.d.ts +27 -0
- package/lib/validators/date.validators.d.ts +13 -0
- package/lib/validators/index.d.ts +1 -0
- package/package.json +49 -0
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as i0 from "@angular/core";
|
|
2
|
+
import * as i1 from "./components/catalog-select/catalog-select.component";
|
|
3
|
+
import * as i2 from "./components/data-grid/data-grid.component";
|
|
4
|
+
import * as i3 from "./components/data-grid-row/data-grid-row.component";
|
|
5
|
+
import * as i4 from "./components/form-input/form-input.component";
|
|
6
|
+
import * as i5 from "./components/form-input-group/form-input-group.component";
|
|
7
|
+
import * as i6 from "./components/form-group/form-group.component";
|
|
8
|
+
import * as i7 from "./components/group-accordion/group-accordion.component";
|
|
9
|
+
import * as i8 from "./components/group-container/group-container.component";
|
|
10
|
+
import * as i9 from "./components/group-scroll-spy/group-scroll-spy.component";
|
|
11
|
+
import * as i10 from "./components/sidebar/sidebar.component";
|
|
12
|
+
import * as i11 from "./components/modal/modal.component";
|
|
13
|
+
import * as i12 from "./components/multi-editor/multi-editor.component";
|
|
14
|
+
import * as i13 from "./components/multi-select/multi-select.component";
|
|
15
|
+
import * as i14 from "./components/multi-select/result-grid/result-grid.component";
|
|
16
|
+
import * as i15 from "./components/ribbon/ribbon.component";
|
|
17
|
+
import * as i16 from "./components/ribbon-button/ribbon-button.component";
|
|
18
|
+
import * as i17 from "./components/ribbon-group/ribbon-group.component";
|
|
19
|
+
import * as i18 from "./directives/scroll-spy.directive";
|
|
20
|
+
import * as i19 from "./pipes/enum";
|
|
21
|
+
import * as i20 from "./pipes/replace.pipe";
|
|
22
|
+
import * as i21 from "./pipes/replace-many.pipe";
|
|
23
|
+
export declare class LibraryModule {
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LibraryModule, never>;
|
|
25
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<LibraryModule, never, [typeof i1.CatalogSelectComponent, typeof i2.DataGridComponent, typeof i3.DataGridRowComponent, typeof i4.FormInputComponent, typeof i5.FormInputGroupComponent, typeof i6.FormGroupComponent, typeof i7.GroupAccordionComponent, typeof i8.GroupContainerComponent, typeof i9.GroupScrollSpyComponent, typeof i10.SidebarComponent, typeof i11.ModalComponent, typeof i12.MultiEditorComponent, typeof i13.MultiSelectComponent, typeof i14.MultiSelectResultGridComponent, typeof i15.RibbonComponent, typeof i16.RibbonButtonComponent, typeof i17.RibbonGroupComponent, typeof i18.ScrollSpyDirective, typeof i19.EnumTranslatePipe, typeof i20.ReplacePipe, typeof i21.ReplaceManyPipe], [typeof i1.CatalogSelectComponent, typeof i2.DataGridComponent, typeof i3.DataGridRowComponent, typeof i4.FormInputComponent, typeof i5.FormInputGroupComponent, typeof i6.FormGroupComponent, typeof i7.GroupAccordionComponent, typeof i8.GroupContainerComponent, typeof i9.GroupScrollSpyComponent, typeof i10.SidebarComponent, typeof i11.ModalComponent, typeof i12.MultiEditorComponent, typeof i13.MultiSelectComponent, typeof i14.MultiSelectResultGridComponent, typeof i15.RibbonComponent, typeof i16.RibbonButtonComponent, typeof i17.RibbonGroupComponent, typeof i18.ScrollSpyDirective, typeof i19.EnumTranslatePipe, typeof i20.ReplacePipe, typeof i21.ReplaceManyPipe]>;
|
|
26
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<LibraryModule>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GridConfigs } from './grid-configs';
|
|
2
|
+
export type DataGridConfigs = GridConfigs & {
|
|
3
|
+
hideBorders?: boolean;
|
|
4
|
+
hideColumnHeaders?: boolean;
|
|
5
|
+
multiSelect?: boolean;
|
|
6
|
+
multiSelectSize?: string;
|
|
7
|
+
selectOnClick?: boolean;
|
|
8
|
+
showMessageOnEmpty?: boolean;
|
|
9
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { IBatchUpdate } from './batch-update';
|
|
2
|
+
export { ICatalogEntry } from './catalog-entry';
|
|
3
|
+
export { ICatalogResult } from './catalog-result';
|
|
4
|
+
export * from './configs';
|
|
5
|
+
export { IListParameters, ISummaryParameters } from './data-grid-parameters';
|
|
6
|
+
export { IGridColumn } from './grid-column';
|
|
7
|
+
export { IModal } from './modal.interface';
|
|
8
|
+
export { IMultiEditorChanges } from './multi-editor-changes';
|
|
9
|
+
export { IMultiSelectorChanges } from './multi-selector-changes';
|
|
10
|
+
export { IRibbonButtonOption } from './ribbon-button-option';
|
|
11
|
+
export { RibbonGroupChild } from './ribbon-group-child';
|
|
12
|
+
export * from './sidebar';
|
|
13
|
+
export { ITabView } from './tab-view';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export interface IRibbonButtonOption {
|
|
2
|
+
allowedActions?: string[];
|
|
3
|
+
icon?: string;
|
|
4
|
+
id: string;
|
|
5
|
+
isAccessAllowed?: boolean;
|
|
6
|
+
isDisabled?: boolean;
|
|
7
|
+
isVisible?: boolean;
|
|
8
|
+
label: string;
|
|
9
|
+
parameters?: {
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
};
|
|
12
|
+
path?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InjectionToken } from '@angular/core';
|
|
2
|
+
export declare const SIDEBAR_CONFIGS: InjectionToken<SidebarConfigs>;
|
|
3
|
+
export declare class SidebarConfigs {
|
|
4
|
+
errorText: string;
|
|
5
|
+
loadingText: string;
|
|
6
|
+
logoCollapsedPath?: string;
|
|
7
|
+
logoExpandedPath?: string;
|
|
8
|
+
constructor(options?: Partial<SidebarConfigs>);
|
|
9
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class SidebarMenu {
|
|
2
|
+
childCount: number;
|
|
3
|
+
children: SidebarMenu[];
|
|
4
|
+
height?: number;
|
|
5
|
+
icon?: string;
|
|
6
|
+
id: number;
|
|
7
|
+
label: string;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
parent: SidebarMenu | null;
|
|
10
|
+
url?: string;
|
|
11
|
+
constructor(options?: Partial<SidebarMenu>);
|
|
12
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class EnumTranslatePipe implements PipeTransform {
|
|
5
|
+
private translate;
|
|
6
|
+
transform(enumType: any): Array<{
|
|
7
|
+
value: any;
|
|
8
|
+
display: Observable<any>;
|
|
9
|
+
}>;
|
|
10
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EnumTranslatePipe, never>;
|
|
11
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<EnumTranslatePipe, "enumTranslate", true>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ReplaceManyPipe implements PipeTransform {
|
|
4
|
+
transform(message: string, replaceArgs?: {
|
|
5
|
+
[id: string]: string | null | undefined;
|
|
6
|
+
}): string;
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReplaceManyPipe, never>;
|
|
8
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ReplaceManyPipe, "replaceMany", true>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PipeTransform } from '@angular/core';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class ReplacePipe implements PipeTransform {
|
|
4
|
+
transform(message: string, searchValue: string, replaceValue?: string | null): string;
|
|
5
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReplacePipe, never>;
|
|
6
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ReplacePipe, "replace", true>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ICatalogResult } from '../models/catalog-result';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class CatalogService {
|
|
5
|
+
private http;
|
|
6
|
+
search(endpoint: string, maxResults: number, criteria?: string, filters?: {
|
|
7
|
+
[key: string]: string;
|
|
8
|
+
} | null): Observable<ICatalogResult>;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CatalogService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CatalogService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DataGridConfigs } from '../../models/configs/data-grid-configs';
|
|
2
|
+
import { GridConfigsProvider } from './grid-configs.provider';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class DataGridConfigsProvider extends GridConfigsProvider<DataGridConfigs> {
|
|
5
|
+
constructor();
|
|
6
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridConfigsProvider, never>;
|
|
7
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DataGridConfigsProvider>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { GridConfigs } from '../../models/configs/grid-configs';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
export declare class GridConfigsProvider<TGridConfigs extends GridConfigs = GridConfigs> {
|
|
4
|
+
protected _configs: TGridConfigs;
|
|
5
|
+
get configs(): TGridConfigs;
|
|
6
|
+
constructor();
|
|
7
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GridConfigsProvider<any>, never>;
|
|
8
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GridConfigsProvider<any>>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
|
+
import { OnDestroy } from '@angular/core';
|
|
3
|
+
import { ActivatedRoute } from '@angular/router';
|
|
4
|
+
import { Observable, Subject } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare abstract class DataProviderService<TEntityModel> implements OnDestroy {
|
|
7
|
+
protected activatedRoute: ActivatedRoute;
|
|
8
|
+
protected destroy$: Subject<boolean>;
|
|
9
|
+
protected shouldLazyLoad: boolean;
|
|
10
|
+
private _entityID?;
|
|
11
|
+
private errorSubject;
|
|
12
|
+
private isLoading;
|
|
13
|
+
private isModelLoaded;
|
|
14
|
+
private modelCache;
|
|
15
|
+
get entityID(): number | undefined;
|
|
16
|
+
get hasEntityID(): boolean;
|
|
17
|
+
constructor();
|
|
18
|
+
ngOnDestroy(): void;
|
|
19
|
+
getError$(): Observable<HttpErrorResponse>;
|
|
20
|
+
abstract getTitle(entity: TEntityModel): string;
|
|
21
|
+
getModel$(): Observable<TEntityModel | null>;
|
|
22
|
+
refreshModel(): void;
|
|
23
|
+
resetForNewEntity(): void;
|
|
24
|
+
abstract saveModel(model: any): Observable<TEntityModel>;
|
|
25
|
+
updateModel(model: any): void;
|
|
26
|
+
protected abstract loadModel(entityID?: number): Observable<TEntityModel | null>;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataProviderService<any>, never>;
|
|
28
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DataProviderService<any>>;
|
|
29
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DataProviderService } from './data-provider.service';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { Subject } from 'rxjs';
|
|
3
|
+
import { DataProviderService } from '../data-providers';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare abstract class BaseDataset implements OnDestroy {
|
|
6
|
+
protected dataProvider: DataProviderService<any> | null;
|
|
7
|
+
protected destroy$: Subject<boolean>;
|
|
8
|
+
private _parentEntityId?;
|
|
9
|
+
get parentEntityId(): any;
|
|
10
|
+
set parentEntityId(value: any);
|
|
11
|
+
constructor();
|
|
12
|
+
ngOnDestroy(): void;
|
|
13
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BaseDataset, never>;
|
|
14
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BaseDataset>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { DataGridConfigs } from '../../models/configs/data-grid-configs';
|
|
3
|
+
import { IGridColumn } from '../../models/grid-column';
|
|
4
|
+
import { GridDataset } from './grid.dataset';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare abstract class DataGridDataset extends GridDataset {
|
|
7
|
+
selectedRowsChanged: EventEmitter<{
|
|
8
|
+
[id: string]: {
|
|
9
|
+
rowData: any;
|
|
10
|
+
selected: boolean;
|
|
11
|
+
};
|
|
12
|
+
}>;
|
|
13
|
+
columns: IGridColumn[];
|
|
14
|
+
configs: DataGridConfigs;
|
|
15
|
+
selectedRowKeys: string[];
|
|
16
|
+
get columnsSize(): string;
|
|
17
|
+
get hasSelectedRows(): boolean;
|
|
18
|
+
constructor();
|
|
19
|
+
clearSelection(): void;
|
|
20
|
+
deselectRow(key: string): void;
|
|
21
|
+
deselectRowID(id: any): void;
|
|
22
|
+
getSelectedRowsData(): any[];
|
|
23
|
+
isKeySelected(key: any): boolean;
|
|
24
|
+
refresh(): void;
|
|
25
|
+
removeKeys(keys: string[]): void;
|
|
26
|
+
selectRow(key: string): void;
|
|
27
|
+
selectRowID(id: any): void;
|
|
28
|
+
selectRows(keys: string[]): void;
|
|
29
|
+
setFocusedRow(key: any): void;
|
|
30
|
+
protected removeSelectedRow(key: string): void;
|
|
31
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<DataGridDataset, never>;
|
|
32
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<DataGridDataset>;
|
|
33
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { GridConfigs } from '../../models/configs/grid-configs';
|
|
4
|
+
import { GridConfigsProvider } from '../configs-providers/grid-configs.provider';
|
|
5
|
+
import { BaseDataset } from './base.dataset';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class GridDataset extends BaseDataset {
|
|
8
|
+
configs: GridConfigs;
|
|
9
|
+
filtersChanged: EventEmitter<{
|
|
10
|
+
[key: string]: string;
|
|
11
|
+
}>;
|
|
12
|
+
isLoading: boolean;
|
|
13
|
+
loadedLastRow: boolean;
|
|
14
|
+
loadFinished: EventEmitter<boolean>;
|
|
15
|
+
loadStarted: EventEmitter<void>;
|
|
16
|
+
protected compareProperty: string;
|
|
17
|
+
protected configsProvider: GridConfigsProvider;
|
|
18
|
+
protected focusedRow: string | null;
|
|
19
|
+
protected recordBlock: number;
|
|
20
|
+
private _hasBeenLoaded;
|
|
21
|
+
private _loadedKeys?;
|
|
22
|
+
private _loadedRows?;
|
|
23
|
+
private queryFilters?;
|
|
24
|
+
get filters(): {
|
|
25
|
+
[key: string]: string;
|
|
26
|
+
} | undefined;
|
|
27
|
+
get hasBeenLoaded(): boolean;
|
|
28
|
+
get hasLoadedRows(): boolean;
|
|
29
|
+
get keyProperty(): string;
|
|
30
|
+
get loadedKeys(): string[] | undefined;
|
|
31
|
+
get loadedRows(): any[] | undefined;
|
|
32
|
+
get parentEntityId(): any;
|
|
33
|
+
set parentEntityId(value: any);
|
|
34
|
+
constructor();
|
|
35
|
+
addNewRow(row: any): void;
|
|
36
|
+
clearFocusedRow(): void;
|
|
37
|
+
getRowData(key: string): any | null;
|
|
38
|
+
getRowID(key: string): any;
|
|
39
|
+
getRowInternalKey(row: any): string;
|
|
40
|
+
hasRowWithID(id: any): boolean;
|
|
41
|
+
isKeyExists(key: string): boolean;
|
|
42
|
+
loadRows(): void;
|
|
43
|
+
refresh(): void;
|
|
44
|
+
removeKeys(keys: string[]): void;
|
|
45
|
+
setFilters(filters?: {
|
|
46
|
+
[key: string]: string;
|
|
47
|
+
}): void;
|
|
48
|
+
setFocusedRow(key: string): void;
|
|
49
|
+
updateRow(key: string, newRowData: any): void;
|
|
50
|
+
protected clearLoadedRows(): void;
|
|
51
|
+
protected updateLoadedRows(rows: any[]): void;
|
|
52
|
+
abstract getData(params?: any): Observable<any[]>;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<GridDataset, never>;
|
|
54
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<GridDataset>;
|
|
55
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { BaseDataset } from './base.dataset';
|
|
2
|
+
export { DataGridDataset } from './data-grid.dataset';
|
|
3
|
+
export { GridDataset } from './grid.dataset';
|
|
4
|
+
export { MultiEditorDataset } from './multi-editor.dataset';
|
|
5
|
+
export { MultiSelectResultDataset } from './multi-select-result.dataset';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IBatchUpdate } from '../../models/batch-update';
|
|
4
|
+
import { BaseDataset } from './base.dataset';
|
|
5
|
+
import { DataGridDataset } from './data-grid.dataset';
|
|
6
|
+
import * as i0 from "@angular/core";
|
|
7
|
+
export declare abstract class MultiEditorDataset extends BaseDataset {
|
|
8
|
+
savedChanges: EventEmitter<void>;
|
|
9
|
+
protected readonly dataGridDataset: DataGridDataset;
|
|
10
|
+
private fakeIDsGenerated;
|
|
11
|
+
private modifiedValues;
|
|
12
|
+
constructor();
|
|
13
|
+
clearChangedValues(): void;
|
|
14
|
+
removeValue(key: string): void;
|
|
15
|
+
saveChanges(): Observable<any>;
|
|
16
|
+
storeFakeIDGenerated(id: any): void;
|
|
17
|
+
updateValues(key: string, newRowData: any): void;
|
|
18
|
+
abstract newData(id: any): any;
|
|
19
|
+
abstract saveData(batchUpdate: IBatchUpdate<any, any>): Observable<any>;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiEditorDataset, never>;
|
|
21
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MultiEditorDataset>;
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { IMultiSelectorChanges } from '../../models/multi-selector-changes';
|
|
4
|
+
import { GridDataset } from './grid.dataset';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare abstract class MultiSelectResultDataset extends GridDataset {
|
|
7
|
+
savedChanges: EventEmitter<void>;
|
|
8
|
+
displayedIDs: any[];
|
|
9
|
+
displayedRows: any[];
|
|
10
|
+
private _idsToAdd;
|
|
11
|
+
private _idsToRemove;
|
|
12
|
+
private addedRowData;
|
|
13
|
+
get idsToAdd(): any[];
|
|
14
|
+
get idsToRemove(): any[];
|
|
15
|
+
refresh(): void;
|
|
16
|
+
saveChanges(): Observable<any>;
|
|
17
|
+
setIDToAdd(idToAdd: any, rowData: any): void;
|
|
18
|
+
setIDToRemove(idToRemove: any): void;
|
|
19
|
+
protected updateLoadedRows(rows: any[]): void;
|
|
20
|
+
private clearSelection;
|
|
21
|
+
private isExistingID;
|
|
22
|
+
private updateDisplayedRows;
|
|
23
|
+
protected abstract saveData(changedIds: IMultiSelectorChanges): Observable<any>;
|
|
24
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MultiSelectResultDataset, never>;
|
|
25
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<MultiSelectResultDataset>;
|
|
26
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { HttpErrorResponse } from '@angular/common/http';
|
|
2
|
+
import { EventEmitter } from '@angular/core';
|
|
3
|
+
import { FormGroup } from '@angular/forms';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class FormService {
|
|
7
|
+
fieldRefreshed: EventEmitter<{
|
|
8
|
+
fieldName: string;
|
|
9
|
+
value?: any;
|
|
10
|
+
loading?: boolean;
|
|
11
|
+
}>;
|
|
12
|
+
modelRefreshed: EventEmitter<any>;
|
|
13
|
+
private _loading;
|
|
14
|
+
private _model;
|
|
15
|
+
private currentMode;
|
|
16
|
+
private editCanceled$;
|
|
17
|
+
private form?;
|
|
18
|
+
private initialValue?;
|
|
19
|
+
get editCanceled(): Observable<void>;
|
|
20
|
+
get isEditMode(): boolean;
|
|
21
|
+
get isValid(): boolean;
|
|
22
|
+
get loading(): boolean;
|
|
23
|
+
set loading(value: boolean);
|
|
24
|
+
get model(): any | null;
|
|
25
|
+
set model(value: any | null);
|
|
26
|
+
beginEdit(): void;
|
|
27
|
+
beginFieldLoading(fieldName: string): void;
|
|
28
|
+
cancelEdit(): void;
|
|
29
|
+
disableForm(): void;
|
|
30
|
+
enableForm(): void;
|
|
31
|
+
getModelFromForm(): any;
|
|
32
|
+
initializeForm(form: FormGroup): void;
|
|
33
|
+
markAllAsTouched(): void;
|
|
34
|
+
resetForm(): void;
|
|
35
|
+
setFieldValue(fieldName: string, value: any): void;
|
|
36
|
+
setValidationErrorsFromHttpResponse(errorResponse: HttpErrorResponse): void;
|
|
37
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<FormService, never>;
|
|
38
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<FormService>;
|
|
39
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { CatalogService } from './catalog.service';
|
|
2
|
+
export * from './data-providers';
|
|
3
|
+
export * from './datasets';
|
|
4
|
+
export { FormGroupService } from './form-group.service';
|
|
5
|
+
export { FormService } from './form.service';
|
|
6
|
+
export { SidebarService } from './sidebar.service';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { ISidebarProfile, SidebarMenu } from '../models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare abstract class SidebarService {
|
|
6
|
+
childrenFailed: EventEmitter<SidebarMenu>;
|
|
7
|
+
childrenLoading: EventEmitter<SidebarMenu>;
|
|
8
|
+
childrenInitialized: EventEmitter<SidebarMenu>;
|
|
9
|
+
menuUrlSelected: EventEmitter<SidebarMenu>;
|
|
10
|
+
selectionChanged: EventEmitter<SidebarMenu>;
|
|
11
|
+
isActive: boolean;
|
|
12
|
+
isCollapsed: boolean;
|
|
13
|
+
shouldActivate: boolean;
|
|
14
|
+
private menus;
|
|
15
|
+
private selectedMenu;
|
|
16
|
+
deselectAll(): void;
|
|
17
|
+
loadChildren(parentMenu: SidebarMenu): void;
|
|
18
|
+
loadRoot(): Observable<SidebarMenu[]>;
|
|
19
|
+
select(menu: SidebarMenu): void;
|
|
20
|
+
private deselectMenu;
|
|
21
|
+
private selectMenu;
|
|
22
|
+
abstract getMenuFromUrl(url: string): Observable<SidebarMenu>;
|
|
23
|
+
abstract getUserProfile(): ISidebarProfile | undefined;
|
|
24
|
+
protected abstract loadMenus(parentMenuID: SidebarMenu | null): Observable<SidebarMenu[]>;
|
|
25
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SidebarService, never>;
|
|
26
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SidebarService>;
|
|
27
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
|
|
2
|
+
export declare class DateValidators {
|
|
3
|
+
static greaterThanControl(controlName: string): ValidatorFn;
|
|
4
|
+
static greaterThanOrEqualControl(controlName: string): ValidatorFn;
|
|
5
|
+
static greaterThanOrEqualToday(control: AbstractControl): ValidationErrors | null;
|
|
6
|
+
static greaterThanToday(control: AbstractControl): ValidationErrors | null;
|
|
7
|
+
static lessThanControl(controlName: string): ValidatorFn;
|
|
8
|
+
static lessThanOrEqualControl(controlName: string): ValidatorFn;
|
|
9
|
+
static lessThanOrEqualToday(control: AbstractControl): ValidationErrors | null;
|
|
10
|
+
static lessThanToday(control: AbstractControl): ValidationErrors | null;
|
|
11
|
+
static maxDate(maxDate: Date): ValidatorFn;
|
|
12
|
+
static minDate(minDate: Date): ValidatorFn;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './date.validators';
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@zambon-dev/library",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Angular UI components and shared presentation utilities for Zambon applications.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"angular",
|
|
7
|
+
"components",
|
|
8
|
+
"library",
|
|
9
|
+
"zambon",
|
|
10
|
+
"zlibraries"
|
|
11
|
+
],
|
|
12
|
+
"author": "Ricardo Zambon",
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/RicardoZambon/ZLibraries.git",
|
|
17
|
+
"directory": "libs/library"
|
|
18
|
+
},
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/RicardoZambon/ZLibraries/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/RicardoZambon/ZLibraries/tree/main/libs/library#readme",
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@angular/cdk": "^19.1.5",
|
|
25
|
+
"@angular/common": "^19.1.0",
|
|
26
|
+
"@angular/core": "^19.1.0",
|
|
27
|
+
"@angular/forms": "^19.1.0",
|
|
28
|
+
"@angular/router": "^19.1.0",
|
|
29
|
+
"@ngx-translate/core": "^16.0.4"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"module": "fesm2022/zambon-dev-library.mjs",
|
|
36
|
+
"typings": "index.d.ts",
|
|
37
|
+
"exports": {
|
|
38
|
+
"./package.json": {
|
|
39
|
+
"default": "./package.json"
|
|
40
|
+
},
|
|
41
|
+
".": {
|
|
42
|
+
"types": "./index.d.ts",
|
|
43
|
+
"default": "./fesm2022/zambon-dev-library.mjs"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"dependencies": {
|
|
47
|
+
"tslib": "^2.3.0"
|
|
48
|
+
}
|
|
49
|
+
}
|