@processpuzzle/base-entity 0.2.0 → 0.3.1

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.
Files changed (34) hide show
  1. package/README.md +129 -63
  2. package/fesm2022/processpuzzle-base-entity.mjs +653 -351
  3. package/fesm2022/processpuzzle-base-entity.mjs.map +1 -1
  4. package/index.d.ts +378 -3
  5. package/package.json +27 -17
  6. package/lib/base-entity/base-entity-attr.descriptor.d.ts +0 -43
  7. package/lib/base-entity/base-entity.d.ts +0 -3
  8. package/lib/base-entity/base-entity.descriptor.d.ts +0 -7
  9. package/lib/base-entity-container.component.d.ts +0 -15
  10. package/lib/base-entity-container.store.d.ts +0 -12
  11. package/lib/base-entity-load-response.d.ts +0 -7
  12. package/lib/base-entity.mapper.d.ts +0 -7
  13. package/lib/base-entity.routes.d.ts +0 -2
  14. package/lib/base-entity.service.d.ts +0 -25
  15. package/lib/base-entity.store.d.ts +0 -85
  16. package/lib/base-form/base-entity-form.component.d.ts +0 -25
  17. package/lib/base-form/base-form-control.component.d.ts +0 -14
  18. package/lib/base-form/base-form-host.directive.d.ts +0 -8
  19. package/lib/base-form/checkbox/checkbox.component.d.ts +0 -7
  20. package/lib/base-form/datepicker/datepicker.component.d.ts +0 -7
  21. package/lib/base-form/dropdown/dropdown.component.d.ts +0 -7
  22. package/lib/base-form/foreign-key/foreign-key.component.d.ts +0 -8
  23. package/lib/base-form/label/label.component.d.ts +0 -7
  24. package/lib/base-form/radio/radio.component.d.ts +0 -7
  25. package/lib/base-form/textarea/textarea.component.d.ts +0 -7
  26. package/lib/base-form/textbox/textbox.component.d.ts +0 -7
  27. package/lib/base-form-navigator/base-form-navigator.store.d.ts +0 -33
  28. package/lib/base-form-navigator/base-url-segments.d.ts +0 -7
  29. package/lib/base-list/base-entity-list.component.d.ts +0 -38
  30. package/lib/base-statusbar/base-entity-statusbar.component.d.ts +0 -12
  31. package/lib/base-tabs/base-entity-tabs.component.d.ts +0 -18
  32. package/lib/base-tabs/base-entity-tabs.store.d.ts +0 -16
  33. package/lib/base-toolbar/base-entity-toolbar.component.d.ts +0 -19
  34. package/public-api.d.ts +0 -16
@@ -1,25 +0,0 @@
1
- import { BaseEntity } from '../base-entity/base-entity';
2
- import { OnInit, Signal } from '@angular/core';
3
- import { FormBuilder, FormGroup } from '@angular/forms';
4
- import { BaseEntityDescriptor } from '../base-entity/base-entity.descriptor';
5
- import { BaseFormHostDirective } from './base-form-host.directive';
6
- import * as i0 from "@angular/core";
7
- export declare class BaseEntityFormComponent<Entity extends BaseEntity> implements OnInit {
8
- baseEntityForm: FormGroup;
9
- baseEntityListOptions: Signal<BaseEntityDescriptor>;
10
- entityId: Signal<string>;
11
- componentHost: BaseFormHostDirective;
12
- protected formBuilder: FormBuilder;
13
- store: Signal<any>;
14
- private isNewObject;
15
- entity: Signal<Entity>;
16
- constructor();
17
- ngOnInit(): void;
18
- onCancel(): Promise<void>;
19
- onSubmit(): Promise<void>;
20
- private buildForm;
21
- private createFormControl;
22
- private registerEffects;
23
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityFormComponent<any>, never>;
24
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityFormComponent<any>, "base-form", never, { "entityId": { "alias": "entityId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
25
- }
@@ -1,14 +0,0 @@
1
- import { Signal } from '@angular/core';
2
- import { FormGroup } from '@angular/forms';
3
- import { BaseEntity } from '../base-entity/base-entity';
4
- import { BaseEntityAttrDescriptor } from '../base-entity/base-entity-attr.descriptor';
5
- import * as i0 from "@angular/core";
6
- export declare abstract class BaseFormControlComponent<Entity extends BaseEntity> {
7
- config: Signal<BaseEntityAttrDescriptor<Entity>>;
8
- entity: Signal<Entity>;
9
- formGroup: FormGroup;
10
- store: any;
11
- value: Signal<any>;
12
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormControlComponent<any>, never>;
13
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseFormControlComponent<any>, "ng-component", never, { "config": { "alias": "config"; "required": true; "isSignal": true; }; "entity": { "alias": "entity"; "required": true; "isSignal": true; }; "value": { "alias": "value"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
14
- }
@@ -1,8 +0,0 @@
1
- import { ViewContainerRef } from '@angular/core';
2
- import * as i0 from "@angular/core";
3
- export declare class BaseFormHostDirective {
4
- viewContainerRef: ViewContainerRef;
5
- constructor(viewContainerRef: ViewContainerRef);
6
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseFormHostDirective, never>;
7
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaseFormHostDirective, "[baseFormHost]", never, {}, {}, never, never, true, never>;
8
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class CheckboxComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<CheckboxComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<CheckboxComponent<any>, "base-checkbox", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class DatepickerComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<DatepickerComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<DatepickerComponent<any>, "base-datepicker", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class DropdownComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<DropdownComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<DropdownComponent<any>, "base-dropdown", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,8 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class ForeignKeyComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- navigateToRelated(): void;
6
- static ɵfac: i0.ɵɵFactoryDeclaration<ForeignKeyComponent<any>, never>;
7
- static ɵcmp: i0.ɵɵComponentDeclaration<ForeignKeyComponent<any>, "base-foreign-key", never, {}, {}, never, never, true, never>;
8
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class LabelComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<LabelComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<LabelComponent<any>, "base-label", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class RadioComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<RadioComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<RadioComponent<any>, "base-radio", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class TextareaComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<TextareaComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<TextareaComponent<any>, "base-textarea", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,7 +0,0 @@
1
- import { BaseFormControlComponent } from '../base-form-control.component';
2
- import { BaseEntity } from '../../base-entity/base-entity';
3
- import * as i0 from "@angular/core";
4
- export declare class TextboxComponent<Entity extends BaseEntity> extends BaseFormControlComponent<Entity> {
5
- static ɵfac: i0.ɵɵFactoryDeclaration<TextboxComponent<any>, never>;
6
- static ɵcmp: i0.ɵɵComponentDeclaration<TextboxComponent<any>, "base-textbox", never, {}, {}, never, never, true, never>;
7
- }
@@ -1,33 +0,0 @@
1
- import { BaseEntity } from '../base-entity/base-entity';
2
- export declare enum RouteSegments {
3
- LIST_ROUTE = "LIST_ROUTE",
4
- DETAILS_ROUTE = "DETAILS_ROUTE"
5
- }
6
- export interface NavigationState {
7
- activeRouteSegment: RouteSegments;
8
- navigationError?: string;
9
- navigateTo: string;
10
- returnTo: string;
11
- }
12
- export declare function BaseFormNavigatorStore<Entity extends BaseEntity>(entityType: {
13
- new (): Entity;
14
- }): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
15
- state: {
16
- activeRouteSegment: RouteSegments;
17
- navigationError?: string | undefined;
18
- navigateTo: string;
19
- returnTo: string;
20
- };
21
- props: {};
22
- methods: {
23
- determineCurrentUrl: () => string;
24
- determineActiveRouteSegment: () => void;
25
- navigateBack: (defaultUrl?: string) => void;
26
- navigateToDetails: (id: string, returnTo?: string) => Promise<void>;
27
- navigateToList: (returnTo?: string) => Promise<void>;
28
- navigateToRelated: (relatedType: {
29
- new (): Entity;
30
- }, id: string, returnTo?: string) => Promise<void>;
31
- navigateToUrl: (url: string, returnTo?: string) => Promise<void>;
32
- };
33
- }>;
@@ -1,7 +0,0 @@
1
- export declare enum BaseUrlSegments {
2
- DetailsForm = "details",
3
- Feed = "feed",
4
- ListForm = "list",
5
- NewEntity = "new",
6
- UnknownEntity = "unknown"
7
- }
@@ -1,38 +0,0 @@
1
- import { AfterViewInit, OnInit, InjectionToken, Signal } from '@angular/core';
2
- import { BaseEntity } from '../base-entity/base-entity';
3
- import { MatTableDataSource } from '@angular/material/table';
4
- import { MatSort } from '@angular/material/sort';
5
- import { MatPaginator } from '@angular/material/paginator';
6
- import { Router } from '@angular/router';
7
- import { BaseEntityAttrDescriptor } from '../base-entity/base-entity-attr.descriptor';
8
- import { SelectionModel } from '@angular/cdk/collections';
9
- import * as i0 from "@angular/core";
10
- export declare const BASE_LIST_DESCRIPTORS: InjectionToken<string[]>;
11
- export declare class BaseEntityListComponent<Entity extends BaseEntity> implements AfterViewInit, OnInit {
12
- dataSource: MatTableDataSource<Entity>;
13
- selection: SelectionModel<Entity>;
14
- private baseEntityListOptions;
15
- columnDescriptors: Signal<BaseEntityAttrDescriptor<Entity>[]>;
16
- displayedColumns: Signal<string[]>;
17
- sort: MatSort;
18
- paginator: MatPaginator;
19
- store: any;
20
- router: Router;
21
- constructor();
22
- ngAfterViewInit(): void;
23
- ngOnInit(): void;
24
- onChangeSelection(entity?: Entity): void;
25
- onNavigateToDetails(entity: Entity): void;
26
- onNavigateToRelated(config: BaseEntityAttrDescriptor<Entity>, entity: Entity): void;
27
- onRowClick(entity: Entity): void;
28
- onToggleAllRows(): void;
29
- private cancelSelections;
30
- private doFilter;
31
- private getPropertyValue;
32
- private loadAllData;
33
- protected registerEffects(): void;
34
- isAllSelected(): boolean;
35
- isSelected(row: Entity): boolean;
36
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityListComponent<any>, never>;
37
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityListComponent<any>, "base-list", never, {}, {}, never, never, true, never>;
38
- }
@@ -1,12 +0,0 @@
1
- import { OnInit, Signal } from '@angular/core';
2
- import { BaseEntityDescriptor } from '../base-entity/base-entity.descriptor';
3
- import * as i0 from "@angular/core";
4
- export declare class BaseEntityStatusbarComponent implements OnInit {
5
- store: any;
6
- baseEntityListOptions: import("@angular/core").InputSignal<BaseEntityDescriptor>;
7
- entityTitle: Signal<string>;
8
- isVisible: Signal<boolean>;
9
- ngOnInit(): void;
10
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityStatusbarComponent, never>;
11
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityStatusbarComponent, "base-entity-statusbar", never, { "baseEntityListOptions": { "alias": "baseEntityListOptions"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
12
- }
@@ -1,18 +0,0 @@
1
- import { OnDestroy, OnInit, Signal } from '@angular/core';
2
- import { BaseEntityDescriptor } from '../base-entity/base-entity.descriptor';
3
- import * as i0 from "@angular/core";
4
- export declare class BaseEntityTabsComponent implements OnDestroy, OnInit {
5
- store: any;
6
- baseEntityListOptions: import("@angular/core").InputSignal<BaseEntityDescriptor>;
7
- selectedEntityId: Signal<string | undefined>;
8
- detailsTabName: Signal<string>;
9
- listTabName: Signal<string>;
10
- constructor();
11
- ngOnDestroy(): void;
12
- ngOnInit(): void;
13
- onShowDetails(): Promise<void>;
14
- onShowList(): Promise<void>;
15
- private registerEffects;
16
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityTabsComponent, never>;
17
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityTabsComponent, "base-entity-tabs", never, { "baseEntityListOptions": { "alias": "baseEntityListOptions"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
18
- }
@@ -1,16 +0,0 @@
1
- export interface EntityTabsState {
2
- activeTabs: string[];
3
- currentTab: string | undefined;
4
- }
5
- export declare function BaseEntityTabsStore(): import("@ngrx/signals").SignalStoreFeature<import("@ngrx/signals").EmptyFeatureResult, {
6
- state: {
7
- activeTabs: string[];
8
- currentTab: string | undefined;
9
- };
10
- props: {};
11
- methods: {
12
- reset: () => void;
13
- tabIsActive: (tabName: string) => void;
14
- tabIsInactive: (tabName: string) => void;
15
- };
16
- }>;
@@ -1,19 +0,0 @@
1
- import { OnInit } from '@angular/core';
2
- import { BaseEntity } from '../base-entity/base-entity';
3
- import { BaseEntityDescriptor } from '../base-entity/base-entity.descriptor';
4
- import { RouteSegments } from '../base-form-navigator/base-form-navigator.store';
5
- import { LayoutService } from '@processpuzzle/util';
6
- import * as i0 from "@angular/core";
7
- export declare class BaseEntityToolbarComponent<Entity extends BaseEntity> implements OnInit {
8
- baseEntityListOptions: import("@angular/core").InputSignal<BaseEntityDescriptor>;
9
- layoutService: LayoutService;
10
- store: any;
11
- ngOnInit(): void;
12
- onAddEntity(): void;
13
- onDeleteEntities(): void;
14
- onDoFilter($event: KeyboardEvent): void;
15
- isSmallDevice(): boolean;
16
- protected readonly RouteSegments: typeof RouteSegments;
17
- static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityToolbarComponent<any>, never>;
18
- static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityToolbarComponent<any>, "base-entity-toolbar", never, { "baseEntityListOptions": { "alias": "baseEntityListOptions"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
19
- }
package/public-api.d.ts DELETED
@@ -1,16 +0,0 @@
1
- export { BASE_ENTITY_ROUTES } from './lib/base-entity.routes';
2
- export { BaseEntityContainerStore } from './lib/base-entity-container.store';
3
- export { BaseEntity } from './lib/base-entity/base-entity';
4
- export { BaseEntityContainerComponent } from './lib/base-entity-container.component';
5
- export { BaseEntityAttrDescriptor, FormControlType } from './lib/base-entity/base-entity-attr.descriptor';
6
- export { BaseEntityFormComponent } from './lib/base-form/base-entity-form.component';
7
- export { BaseEntityDescriptor } from './lib/base-entity/base-entity.descriptor';
8
- export { BaseEntityListComponent, BASE_LIST_DESCRIPTORS } from './lib/base-list/base-entity-list.component';
9
- export { BaseEntityLoadResponse } from './lib/base-entity-load-response';
10
- export { BaseEntityMapper } from './lib/base-entity.mapper';
11
- export { BaseEntityService } from './lib/base-entity.service';
12
- export { BaseEntityTabsStore } from './lib/base-tabs/base-entity-tabs.store';
13
- export { BASE_ENTITY_SERVICE } from './lib/base-entity.service';
14
- export { BASE_ENTITY_STORE, BaseEntityStore, LoadMethodParameters } from './lib/base-entity.store';
15
- export { BaseFormHostDirective } from './lib/base-form/base-form-host.directive';
16
- export { BaseFormNavigatorStore } from './lib/base-form-navigator/base-form-navigator.store';