@processpuzzle/base-entity 0.3.7 → 0.4.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@processpuzzle/base-entity",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Zsolt Zsuffa",
|
|
@@ -45,5 +45,6 @@
|
|
|
45
45
|
"types": "./types/processpuzzle-base-entity.d.ts",
|
|
46
46
|
"default": "./fesm2022/processpuzzle-base-entity.mjs"
|
|
47
47
|
}
|
|
48
|
-
}
|
|
48
|
+
},
|
|
49
|
+
"type": "module"
|
|
49
50
|
}
|
|
@@ -17,6 +17,7 @@ import * as _ngrx_signals_rxjs_interop from '@ngrx/signals/rxjs-interop';
|
|
|
17
17
|
import * as _firebase_firestore from '@firebase/firestore';
|
|
18
18
|
|
|
19
19
|
declare enum FormControlType {
|
|
20
|
+
ARTIFACT = "ARTIFACT",
|
|
20
21
|
CHECKBOX = "CHECKBOX",
|
|
21
22
|
DATE = "DATE",
|
|
22
23
|
DROPDOWN = "DROPDOWN",
|
|
@@ -24,6 +25,7 @@ declare enum FormControlType {
|
|
|
24
25
|
FOREIGN_KEY = "FOREIGN_KEY",
|
|
25
26
|
LABEL = "LABEL",
|
|
26
27
|
RADIO = "RADIO",
|
|
28
|
+
TAGS = "TAGS",
|
|
27
29
|
TITLE = "TITLE",
|
|
28
30
|
TEXT_BOX = "TEXT_BOX",
|
|
29
31
|
TEXTAREA = "TEXTAREA"
|
|
@@ -38,6 +40,13 @@ declare abstract class AbstractAttrDescriptor {
|
|
|
38
40
|
protected constructor(attrName: string, formControlType: FormControlType);
|
|
39
41
|
}
|
|
40
42
|
|
|
43
|
+
interface ArtifactAttr {
|
|
44
|
+
readonly bucket: string;
|
|
45
|
+
readonly objectId: string;
|
|
46
|
+
readonly name: string;
|
|
47
|
+
readonly mimeType: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
41
50
|
interface BaseEntityDescriptor {
|
|
42
51
|
store: any;
|
|
43
52
|
attrDescriptors: AbstractAttrDescriptor[];
|
|
@@ -46,7 +55,7 @@ interface BaseEntityDescriptor {
|
|
|
46
55
|
}
|
|
47
56
|
|
|
48
57
|
declare class BaseEntityContainerComponent implements OnDestroy, OnInit {
|
|
49
|
-
|
|
58
|
+
entityDescriptor: i0.InputSignal<BaseEntityDescriptor>;
|
|
50
59
|
protected snackBar: MatSnackBar;
|
|
51
60
|
store: any;
|
|
52
61
|
constructor();
|
|
@@ -54,7 +63,7 @@ declare class BaseEntityContainerComponent implements OnDestroy, OnInit {
|
|
|
54
63
|
ngOnInit(): void;
|
|
55
64
|
private registerEffects;
|
|
56
65
|
static ɵfac: i0.ɵɵFactoryDeclaration<BaseEntityContainerComponent, never>;
|
|
57
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityContainerComponent, "base-entity-container", never, { "
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityContainerComponent, "base-entity-container", never, { "entityDescriptor": { "alias": "entityDescriptor"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
58
67
|
}
|
|
59
68
|
|
|
60
69
|
declare function BaseEntityContainerStore(): _ngrx_signals.SignalStoreFeature<_ngrx_signals.EmptyFeatureResult, {
|
|
@@ -179,7 +188,7 @@ declare class BaseFormHostDirective {
|
|
|
179
188
|
|
|
180
189
|
declare class BaseEntityFormComponent<Entity extends BaseEntity> implements OnInit {
|
|
181
190
|
baseEntityForm: FormGroup;
|
|
182
|
-
|
|
191
|
+
entityDescriptor: Signal<BaseEntityDescriptor>;
|
|
183
192
|
entity: Signal<Entity>;
|
|
184
193
|
entityId: Signal<string>;
|
|
185
194
|
componentHost: BaseFormHostDirective;
|
|
@@ -197,12 +206,22 @@ declare class BaseEntityFormComponent<Entity extends BaseEntity> implements OnIn
|
|
|
197
206
|
static ɵcmp: i0.ɵɵComponentDeclaration<BaseEntityFormComponent<any>, "base-form", never, { "entityId": { "alias": "entityId"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
198
207
|
}
|
|
199
208
|
|
|
209
|
+
interface ArtifactReference {
|
|
210
|
+
objectID?: string;
|
|
211
|
+
objectId?: string;
|
|
212
|
+
id?: string;
|
|
213
|
+
bucketName?: string;
|
|
214
|
+
bucket?: string;
|
|
215
|
+
name?: string;
|
|
216
|
+
fileName?: string;
|
|
217
|
+
}
|
|
200
218
|
declare const BASE_LIST_DESCRIPTORS: InjectionToken<string[]>;
|
|
201
219
|
declare class BaseEntityListComponent<Entity extends BaseEntity> implements AfterViewInit, OnInit {
|
|
202
220
|
dataSource: MatTableDataSource<Entity>;
|
|
203
221
|
selection: SelectionModel<Entity>;
|
|
204
222
|
private readonly entityDescriptor;
|
|
205
223
|
private readonly logger;
|
|
224
|
+
private readonly objectStoreService;
|
|
206
225
|
columnDescriptors: Signal<BaseEntityAttrDescriptor[]>;
|
|
207
226
|
displayedColumns: Signal<string[]>;
|
|
208
227
|
sort: MatSort;
|
|
@@ -216,6 +235,7 @@ declare class BaseEntityListComponent<Entity extends BaseEntity> implements Afte
|
|
|
216
235
|
onNavigateToDetails(entity: Entity): void;
|
|
217
236
|
onNavigateToRelated(config: BaseEntityAttrDescriptor, entity: Entity): void;
|
|
218
237
|
onRowClick(entity: Entity): void;
|
|
238
|
+
onDownloadObject(artifact: ArtifactReference, event?: MouseEvent): void;
|
|
219
239
|
onToggleAllRows(): void;
|
|
220
240
|
private cancelSelections;
|
|
221
241
|
private doFilter;
|
|
@@ -379,4 +399,4 @@ declare function getEntityIds(instance: any): string[];
|
|
|
379
399
|
declare const BASE_ENTITY_ROUTES: Routes;
|
|
380
400
|
|
|
381
401
|
export { AbstractAttrDescriptor, BASE_ENTITY_ROUTES, BASE_ENTITY_SERVICE, BASE_ENTITY_STORE, BASE_LIST_DESCRIPTORS, BaseEntityAttrDescriptor, BaseEntityContainerComponent, BaseEntityContainerStore, BaseEntityFirestoreService, BaseEntityFormComponent, BaseEntityListComponent, BaseEntityRestService, BaseEntityStore, BaseEntityTabsStore, BaseFormHostDirective, BaseFormNavigatorStore, Entity, FlexDirection, FlexboxDescriptor, FormControlType, Id, OrderByDirection, RouteSegments, getEntityIds, getEntityOptions };
|
|
382
|
-
export type { BaseEntity, BaseEntityDescriptor, BaseEntityLoadResponse, BaseEntityMapper, BaseEntityQueryCondition, EntityOptions, FilterCondition, NavigationState, OrderByCondition };
|
|
402
|
+
export type { ArtifactAttr, BaseEntity, BaseEntityDescriptor, BaseEntityLoadResponse, BaseEntityMapper, BaseEntityQueryCondition, EntityOptions, FilterCondition, NavigationState, OrderByCondition };
|