@mintplayer/ng-spark 0.0.7 → 0.0.9
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,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-spark",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"description": "Angular component library for MintPlayer.Spark CRUD applications",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"@angular/common": "^21.0.0",
|
|
14
14
|
"@angular/router": "^21.0.0",
|
|
15
15
|
"@angular/forms": "^21.0.0",
|
|
16
|
-
"@mintplayer/ng-bootstrap": "^21.
|
|
16
|
+
"@mintplayer/ng-bootstrap": "^21.12.3",
|
|
17
17
|
"@mintplayer/pagination": "*",
|
|
18
18
|
"rxjs": "~7.8.0"
|
|
19
19
|
},
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
2
|
import { WritableSignal, InjectionToken, Type, TemplateRef, PipeTransform, InputSignal, Provider } from '@angular/core';
|
|
3
|
+
import { SortColumn, PaginationResponse } from '@mintplayer/pagination';
|
|
3
4
|
import { Color } from '@mintplayer/ng-bootstrap';
|
|
4
5
|
import { DatatableSettings } from '@mintplayer/ng-bootstrap/datatable';
|
|
5
|
-
import { PaginationResponse } from '@mintplayer/pagination';
|
|
6
6
|
import * as _mintplayer_ng_spark from '@mintplayer/ng-spark';
|
|
7
|
+
import { VirtualDatatableDataSource } from '@mintplayer/ng-bootstrap/virtual-datatable';
|
|
7
8
|
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
8
9
|
import { SafeHtml } from '@angular/platform-browser';
|
|
9
10
|
import { Route, Routes } from '@angular/router';
|
|
@@ -150,14 +151,19 @@ interface ValidationError {
|
|
|
150
151
|
ruleType: string;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
type SparkQueryRenderMode = 'Pagination' | 'VirtualScrolling';
|
|
155
|
+
interface SparkQuerySortColumn {
|
|
156
|
+
property: string;
|
|
157
|
+
direction: string;
|
|
158
|
+
}
|
|
153
159
|
interface SparkQuery {
|
|
154
160
|
id: string;
|
|
155
161
|
name: string;
|
|
156
162
|
description?: TranslatedString;
|
|
157
163
|
source: string;
|
|
158
164
|
alias?: string;
|
|
159
|
-
|
|
160
|
-
|
|
165
|
+
sortColumns: SparkQuerySortColumn[];
|
|
166
|
+
renderMode?: SparkQueryRenderMode;
|
|
161
167
|
/** Optional RavenDB index name for queries using indexes */
|
|
162
168
|
indexName?: string;
|
|
163
169
|
/** When true, uses the projection type from [QueryType] attribute */
|
|
@@ -166,6 +172,13 @@ interface SparkQuery {
|
|
|
166
172
|
entityType?: string;
|
|
167
173
|
}
|
|
168
174
|
|
|
175
|
+
interface QueryResult {
|
|
176
|
+
data: PersistentObject[];
|
|
177
|
+
totalRecords: number;
|
|
178
|
+
skip: number;
|
|
179
|
+
take: number;
|
|
180
|
+
}
|
|
181
|
+
|
|
169
182
|
interface ProgramUnit {
|
|
170
183
|
id: string;
|
|
171
184
|
name: TranslatedString;
|
|
@@ -226,6 +239,7 @@ interface RetryActionResult {
|
|
|
226
239
|
}
|
|
227
240
|
|
|
228
241
|
interface EntityPermissions {
|
|
242
|
+
canRead: boolean;
|
|
229
243
|
canCreate: boolean;
|
|
230
244
|
canEdit: boolean;
|
|
231
245
|
canDelete: boolean;
|
|
@@ -261,8 +275,15 @@ declare class SparkService {
|
|
|
261
275
|
getQueries(): Promise<SparkQuery[]>;
|
|
262
276
|
getQuery(id: string): Promise<SparkQuery>;
|
|
263
277
|
getQueryByName(name: string): Promise<SparkQuery | undefined>;
|
|
264
|
-
executeQuery(queryId: string,
|
|
265
|
-
|
|
278
|
+
executeQuery(queryId: string, options?: {
|
|
279
|
+
sortColumns?: SortColumn[];
|
|
280
|
+
parentId?: string;
|
|
281
|
+
parentType?: string;
|
|
282
|
+
skip?: number;
|
|
283
|
+
take?: number;
|
|
284
|
+
search?: string;
|
|
285
|
+
}): Promise<QueryResult>;
|
|
286
|
+
executeQueryByName(queryName: string): Promise<QueryResult>;
|
|
266
287
|
getProgramUnits(): Promise<ProgramUnitsConfiguration>;
|
|
267
288
|
list(type: string): Promise<PersistentObject[]>;
|
|
268
289
|
get(type: string, id: string): Promise<PersistentObject>;
|
|
@@ -337,7 +358,7 @@ declare class SparkPoFormComponent {
|
|
|
337
358
|
referenceModalItems: _angular_core.WritableSignal<PersistentObject[]>;
|
|
338
359
|
referenceModalEntityType: _angular_core.WritableSignal<EntityType>;
|
|
339
360
|
referenceModalPagination: _angular_core.WritableSignal<PaginationResponse<PersistentObject>>;
|
|
340
|
-
referenceModalSettings: DatatableSettings
|
|
361
|
+
referenceModalSettings: _angular_core.WritableSignal<DatatableSettings>;
|
|
341
362
|
referenceSearchTerm: string;
|
|
342
363
|
editingLookupAttr: _angular_core.WritableSignal<EntityAttributeDefinition>;
|
|
343
364
|
showLookupModal: _angular_core.WritableSignal<boolean>;
|
|
@@ -497,36 +518,35 @@ declare class SparkQueryListComponent {
|
|
|
497
518
|
query: _angular_core.WritableSignal<SparkQuery>;
|
|
498
519
|
entityType: _angular_core.WritableSignal<EntityType>;
|
|
499
520
|
allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
|
|
500
|
-
allItems: _angular_core.WritableSignal<PersistentObject[]>;
|
|
501
521
|
lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
|
|
502
522
|
paginationData: _angular_core.WritableSignal<PaginationResponse<PersistentObject>>;
|
|
503
523
|
searchTerm: string;
|
|
524
|
+
canRead: _angular_core.WritableSignal<boolean>;
|
|
504
525
|
canCreate: _angular_core.WritableSignal<boolean>;
|
|
505
|
-
settings: DatatableSettings
|
|
506
|
-
|
|
507
|
-
|
|
526
|
+
settings: _angular_core.WritableSignal<DatatableSettings>;
|
|
527
|
+
virtualDataSource: _angular_core.WritableSignal<VirtualDatatableDataSource<PersistentObject>>;
|
|
528
|
+
virtualSettings: _angular_core.WritableSignal<DatatableSettings>;
|
|
508
529
|
constructor();
|
|
509
530
|
private onParamsChange;
|
|
510
531
|
private resolveEntityTypeForQuery;
|
|
511
532
|
private extractSourceName;
|
|
512
533
|
private singularize;
|
|
534
|
+
private initVirtualDataSource;
|
|
513
535
|
loadItems(): Promise<void>;
|
|
514
536
|
onSettingsChange(): void;
|
|
515
537
|
onSearchChange(): void;
|
|
516
|
-
applyFilter(): void;
|
|
517
538
|
clearSearch(): void;
|
|
539
|
+
isVirtualScrolling: _angular_core.Signal<boolean>;
|
|
518
540
|
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
519
541
|
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
520
542
|
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
521
543
|
private loadLookupReferenceOptions;
|
|
522
|
-
onRowClick(item: PersistentObject): void;
|
|
523
544
|
onCreate(): void;
|
|
524
545
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkQueryListComponent, never>;
|
|
525
546
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkQueryListComponent, "spark-query-list", never, { "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; }, { "rowClicked": "rowClicked"; "createClicked": "createClicked"; }, never, never, true, never>;
|
|
526
547
|
}
|
|
527
548
|
|
|
528
549
|
declare class SparkSubQueryComponent {
|
|
529
|
-
private readonly router;
|
|
530
550
|
private readonly sparkService;
|
|
531
551
|
private readonly rendererRegistry;
|
|
532
552
|
queryId: _angular_core.InputSignal<string>;
|
|
@@ -535,16 +555,21 @@ declare class SparkSubQueryComponent {
|
|
|
535
555
|
query: _angular_core.WritableSignal<SparkQuery>;
|
|
536
556
|
entityType: _angular_core.WritableSignal<EntityType>;
|
|
537
557
|
allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
|
|
538
|
-
|
|
558
|
+
paginationData: _angular_core.WritableSignal<PaginationResponse<PersistentObject>>;
|
|
539
559
|
lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
|
|
540
560
|
loading: _angular_core.WritableSignal<boolean>;
|
|
561
|
+
canRead: _angular_core.WritableSignal<boolean>;
|
|
562
|
+
settings: _angular_core.WritableSignal<DatatableSettings>;
|
|
563
|
+
virtualDataSource: _angular_core.WritableSignal<VirtualDatatableDataSource<PersistentObject>>;
|
|
564
|
+
virtualSettings: _angular_core.WritableSignal<DatatableSettings>;
|
|
541
565
|
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
542
566
|
constructor();
|
|
543
567
|
private loadData;
|
|
568
|
+
private loadPage;
|
|
569
|
+
onSettingsChange(): void;
|
|
544
570
|
private loadLookupReferenceOptions;
|
|
545
571
|
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
546
572
|
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
547
|
-
onRowClick(item: PersistentObject): void;
|
|
548
573
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkSubQueryComponent, never>;
|
|
549
574
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkSubQueryComponent, "spark-sub-query", never, { "queryId": { "alias": "queryId"; "required": true; "isSignal": true; }; "parentId": { "alias": "parentId"; "required": true; "isSignal": true; }; "parentType": { "alias": "parentType"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
550
575
|
}
|
|
@@ -790,4 +815,4 @@ declare function sparkRoutes(config?: SparkRouteConfig): Routes;
|
|
|
790
815
|
declare function provideSpark(config?: Partial<SparkConfig>): Provider[];
|
|
791
816
|
|
|
792
817
|
export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ELookupDisplayType, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RetryActionService, RouterLinkPipe, SPARK_ATTRIBUTE_RENDERERS, SPARK_CONFIG, ShowedOn, SparkIconComponent, SparkIconRegistry, SparkLanguageService, SparkPoCreateComponent, SparkPoDetailComponent, SparkPoEditComponent, SparkPoFormComponent, SparkQueryListComponent, SparkRetryActionModalComponent, SparkService, SparkSubQueryComponent, TranslateKeyPipe, currentLanguage, defaultSparkConfig, hasShowedOnFlag, provideSpark, provideSparkAttributeRenderers, resolveTranslation, sparkRoutes };
|
|
793
|
-
export type { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, LookupReferenceListItem, LookupReferenceValue, PersistentObject, PersistentObjectAttribute, ProgramUnit, ProgramUnitGroup, ProgramUnitsConfiguration, RetryActionPayload, RetryActionResult, SparkAttributeColumnRenderer, SparkAttributeDetailRenderer, SparkAttributeEditRenderer, SparkAttributeRendererRegistration, SparkConfig, SparkQuery, SparkRouteConfig, TranslatedString, ValidationError, ValidationRule };
|
|
818
|
+
export type { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, LookupReferenceListItem, LookupReferenceValue, PersistentObject, PersistentObjectAttribute, ProgramUnit, ProgramUnitGroup, ProgramUnitsConfiguration, QueryResult, RetryActionPayload, RetryActionResult, SparkAttributeColumnRenderer, SparkAttributeDetailRenderer, SparkAttributeEditRenderer, SparkAttributeRendererRegistration, SparkConfig, SparkQuery, SparkQueryRenderMode, SparkQuerySortColumn, SparkRouteConfig, TranslatedString, ValidationError, ValidationRule };
|