@mintplayer/ng-spark 0.0.8 → 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;
|
|
@@ -262,8 +275,15 @@ declare class SparkService {
|
|
|
262
275
|
getQueries(): Promise<SparkQuery[]>;
|
|
263
276
|
getQuery(id: string): Promise<SparkQuery>;
|
|
264
277
|
getQueryByName(name: string): Promise<SparkQuery | undefined>;
|
|
265
|
-
executeQuery(queryId: string,
|
|
266
|
-
|
|
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>;
|
|
267
287
|
getProgramUnits(): Promise<ProgramUnitsConfiguration>;
|
|
268
288
|
list(type: string): Promise<PersistentObject[]>;
|
|
269
289
|
get(type: string, id: string): Promise<PersistentObject>;
|
|
@@ -338,7 +358,7 @@ declare class SparkPoFormComponent {
|
|
|
338
358
|
referenceModalItems: _angular_core.WritableSignal<PersistentObject[]>;
|
|
339
359
|
referenceModalEntityType: _angular_core.WritableSignal<EntityType>;
|
|
340
360
|
referenceModalPagination: _angular_core.WritableSignal<PaginationResponse<PersistentObject>>;
|
|
341
|
-
referenceModalSettings: DatatableSettings
|
|
361
|
+
referenceModalSettings: _angular_core.WritableSignal<DatatableSettings>;
|
|
342
362
|
referenceSearchTerm: string;
|
|
343
363
|
editingLookupAttr: _angular_core.WritableSignal<EntityAttributeDefinition>;
|
|
344
364
|
showLookupModal: _angular_core.WritableSignal<boolean>;
|
|
@@ -498,25 +518,25 @@ declare class SparkQueryListComponent {
|
|
|
498
518
|
query: _angular_core.WritableSignal<SparkQuery>;
|
|
499
519
|
entityType: _angular_core.WritableSignal<EntityType>;
|
|
500
520
|
allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
|
|
501
|
-
allItems: _angular_core.WritableSignal<PersistentObject[]>;
|
|
502
521
|
lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
|
|
503
522
|
paginationData: _angular_core.WritableSignal<PaginationResponse<PersistentObject>>;
|
|
504
523
|
searchTerm: string;
|
|
505
524
|
canRead: _angular_core.WritableSignal<boolean>;
|
|
506
525
|
canCreate: _angular_core.WritableSignal<boolean>;
|
|
507
|
-
settings: DatatableSettings
|
|
508
|
-
|
|
509
|
-
|
|
526
|
+
settings: _angular_core.WritableSignal<DatatableSettings>;
|
|
527
|
+
virtualDataSource: _angular_core.WritableSignal<VirtualDatatableDataSource<PersistentObject>>;
|
|
528
|
+
virtualSettings: _angular_core.WritableSignal<DatatableSettings>;
|
|
510
529
|
constructor();
|
|
511
530
|
private onParamsChange;
|
|
512
531
|
private resolveEntityTypeForQuery;
|
|
513
532
|
private extractSourceName;
|
|
514
533
|
private singularize;
|
|
534
|
+
private initVirtualDataSource;
|
|
515
535
|
loadItems(): Promise<void>;
|
|
516
536
|
onSettingsChange(): void;
|
|
517
537
|
onSearchChange(): void;
|
|
518
|
-
applyFilter(): void;
|
|
519
538
|
clearSearch(): void;
|
|
539
|
+
isVirtualScrolling: _angular_core.Signal<boolean>;
|
|
520
540
|
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
521
541
|
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
522
542
|
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
@@ -535,13 +555,18 @@ 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>;
|
|
541
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>;
|
|
542
565
|
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
543
566
|
constructor();
|
|
544
567
|
private loadData;
|
|
568
|
+
private loadPage;
|
|
569
|
+
onSettingsChange(): void;
|
|
545
570
|
private loadLookupReferenceOptions;
|
|
546
571
|
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
547
572
|
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
@@ -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 };
|