@mintplayer/ng-spark 0.1.2 → 0.2.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/mintplayer-ng-spark-icon.mjs +35 -0
- package/fesm2022/mintplayer-ng-spark-icon.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-models.mjs +48 -0
- package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-pipes.mjs +427 -0
- package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-po-create.mjs +121 -0
- package/fesm2022/mintplayer-ng-spark-po-create.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs +368 -0
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs +139 -0
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-po-form.mjs +393 -0
- package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-query-list.mjs +392 -0
- package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-renderers.mjs +25 -0
- package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +87 -0
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-routes.mjs +31 -0
- package/fesm2022/mintplayer-ng-spark-routes.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark-services.mjs +348 -0
- package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark.mjs +17 -2262
- package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
- package/package.json +49 -1
- package/types/mintplayer-ng-spark-icon.d.ts +13 -0
- package/types/mintplayer-ng-spark-models.d.ts +275 -0
- package/types/mintplayer-ng-spark-pipes.d.ts +143 -0
- package/types/mintplayer-ng-spark-po-create.d.ts +29 -0
- package/types/mintplayer-ng-spark-po-detail.d.ts +88 -0
- package/types/mintplayer-ng-spark-po-edit.d.ts +31 -0
- package/types/mintplayer-ng-spark-po-form.d.ts +84 -0
- package/types/mintplayer-ng-spark-query-list.d.ts +60 -0
- package/types/mintplayer-ng-spark-renderers.d.ts +68 -0
- package/types/mintplayer-ng-spark-retry-action-modal.d.ts +14 -0
- package/types/mintplayer-ng-spark-routes.d.ts +12 -0
- package/types/mintplayer-ng-spark-services.d.ts +100 -0
- package/types/mintplayer-ng-spark.d.ts +3 -855
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintplayer/ng-spark",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.2.0",
|
|
5
5
|
"description": "Angular component library for MintPlayer.Spark CRUD applications",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -27,6 +27,54 @@
|
|
|
27
27
|
".": {
|
|
28
28
|
"types": "./types/mintplayer-ng-spark.d.ts",
|
|
29
29
|
"default": "./fesm2022/mintplayer-ng-spark.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./icon": {
|
|
32
|
+
"types": "./types/mintplayer-ng-spark-icon.d.ts",
|
|
33
|
+
"default": "./fesm2022/mintplayer-ng-spark-icon.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./models": {
|
|
36
|
+
"types": "./types/mintplayer-ng-spark-models.d.ts",
|
|
37
|
+
"default": "./fesm2022/mintplayer-ng-spark-models.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./pipes": {
|
|
40
|
+
"types": "./types/mintplayer-ng-spark-pipes.d.ts",
|
|
41
|
+
"default": "./fesm2022/mintplayer-ng-spark-pipes.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./po-create": {
|
|
44
|
+
"types": "./types/mintplayer-ng-spark-po-create.d.ts",
|
|
45
|
+
"default": "./fesm2022/mintplayer-ng-spark-po-create.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./po-detail": {
|
|
48
|
+
"types": "./types/mintplayer-ng-spark-po-detail.d.ts",
|
|
49
|
+
"default": "./fesm2022/mintplayer-ng-spark-po-detail.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./po-edit": {
|
|
52
|
+
"types": "./types/mintplayer-ng-spark-po-edit.d.ts",
|
|
53
|
+
"default": "./fesm2022/mintplayer-ng-spark-po-edit.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./po-form": {
|
|
56
|
+
"types": "./types/mintplayer-ng-spark-po-form.d.ts",
|
|
57
|
+
"default": "./fesm2022/mintplayer-ng-spark-po-form.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./query-list": {
|
|
60
|
+
"types": "./types/mintplayer-ng-spark-query-list.d.ts",
|
|
61
|
+
"default": "./fesm2022/mintplayer-ng-spark-query-list.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./renderers": {
|
|
64
|
+
"types": "./types/mintplayer-ng-spark-renderers.d.ts",
|
|
65
|
+
"default": "./fesm2022/mintplayer-ng-spark-renderers.mjs"
|
|
66
|
+
},
|
|
67
|
+
"./retry-action-modal": {
|
|
68
|
+
"types": "./types/mintplayer-ng-spark-retry-action-modal.d.ts",
|
|
69
|
+
"default": "./fesm2022/mintplayer-ng-spark-retry-action-modal.mjs"
|
|
70
|
+
},
|
|
71
|
+
"./routes": {
|
|
72
|
+
"types": "./types/mintplayer-ng-spark-routes.d.ts",
|
|
73
|
+
"default": "./fesm2022/mintplayer-ng-spark-routes.mjs"
|
|
74
|
+
},
|
|
75
|
+
"./services": {
|
|
76
|
+
"types": "./types/mintplayer-ng-spark-services.d.ts",
|
|
77
|
+
"default": "./fesm2022/mintplayer-ng-spark-services.mjs"
|
|
30
78
|
}
|
|
31
79
|
},
|
|
32
80
|
"dependencies": {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as _angular_platform_browser from '@angular/platform-browser';
|
|
2
|
+
import * as _angular_core from '@angular/core';
|
|
3
|
+
|
|
4
|
+
declare class SparkIconComponent {
|
|
5
|
+
private registry;
|
|
6
|
+
name: _angular_core.InputSignal<string>;
|
|
7
|
+
iconHtml: _angular_core.Signal<_angular_platform_browser.SafeHtml>;
|
|
8
|
+
cssFallbackClass: _angular_core.Signal<string>;
|
|
9
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkIconComponent, never>;
|
|
10
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkIconComponent, "spark-icon", never, { "name": { "alias": "name"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export { SparkIconComponent };
|
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
import { WritableSignal } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
type TranslatedString = Record<string, string>;
|
|
4
|
+
/** Global reactive language state — shared across library boundaries via globalThis */
|
|
5
|
+
declare const currentLanguage: WritableSignal<string>;
|
|
6
|
+
declare function resolveTranslation(ts: TranslatedString | undefined, lang?: string): string;
|
|
7
|
+
|
|
8
|
+
interface ValidationRule {
|
|
9
|
+
type: string;
|
|
10
|
+
value?: any;
|
|
11
|
+
min?: number;
|
|
12
|
+
max?: number;
|
|
13
|
+
message?: TranslatedString;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
interface ValidationError {
|
|
17
|
+
attributeName: string;
|
|
18
|
+
errorMessage: TranslatedString;
|
|
19
|
+
ruleType: string;
|
|
20
|
+
}
|
|
21
|
+
interface ValidationErrorResponse {
|
|
22
|
+
errors: ValidationError[];
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Flags enum controlling on which pages an attribute should be displayed.
|
|
27
|
+
* Values can be combined: ShowedOn.Query | ShowedOn.PersistentObject
|
|
28
|
+
*/
|
|
29
|
+
declare enum ShowedOn {
|
|
30
|
+
Query = 1,
|
|
31
|
+
PersistentObject = 2
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Helper function to check if a ShowedOn value includes a specific flag.
|
|
35
|
+
*/
|
|
36
|
+
declare function hasShowedOnFlag(value: ShowedOn | string | undefined, flag: ShowedOn): boolean;
|
|
37
|
+
|
|
38
|
+
interface PersistentObjectAttribute {
|
|
39
|
+
id: string;
|
|
40
|
+
name: string;
|
|
41
|
+
label?: TranslatedString;
|
|
42
|
+
value?: any;
|
|
43
|
+
dataType: string;
|
|
44
|
+
isArray?: boolean;
|
|
45
|
+
isRequired: boolean;
|
|
46
|
+
isVisible: boolean;
|
|
47
|
+
isReadOnly: boolean;
|
|
48
|
+
order: number;
|
|
49
|
+
query?: string;
|
|
50
|
+
breadcrumb?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Controls on which pages the attribute should be displayed.
|
|
53
|
+
* Query = shown in list views, PersistentObject = shown in detail/edit views.
|
|
54
|
+
* Can be a numeric flag value or a string like "Query, PersistentObject".
|
|
55
|
+
*/
|
|
56
|
+
showedOn?: ShowedOn | string;
|
|
57
|
+
isValueChanged?: boolean;
|
|
58
|
+
rules: ValidationRule[];
|
|
59
|
+
group?: string;
|
|
60
|
+
/** Renderer component name for custom display in detail/list views */
|
|
61
|
+
renderer?: string;
|
|
62
|
+
/** Options passed to the renderer component */
|
|
63
|
+
rendererOptions?: Record<string, any>;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
interface PersistentObject {
|
|
67
|
+
id: string;
|
|
68
|
+
name: string;
|
|
69
|
+
objectTypeId: string;
|
|
70
|
+
breadcrumb?: string;
|
|
71
|
+
attributes: PersistentObjectAttribute[];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
interface EntityAttributeDefinition {
|
|
75
|
+
id: string;
|
|
76
|
+
name: string;
|
|
77
|
+
label?: TranslatedString;
|
|
78
|
+
dataType: string;
|
|
79
|
+
isRequired: boolean;
|
|
80
|
+
isVisible: boolean;
|
|
81
|
+
isReadOnly: boolean;
|
|
82
|
+
order: number;
|
|
83
|
+
query?: string;
|
|
84
|
+
/** For reference attributes, specifies the target entity type's CLR type name */
|
|
85
|
+
referenceType?: string;
|
|
86
|
+
/** For AsDetail attributes, specifies the nested entity type's CLR type name */
|
|
87
|
+
asDetailType?: string;
|
|
88
|
+
/** When true, the attribute represents an array/collection of AsDetail objects */
|
|
89
|
+
isArray?: boolean;
|
|
90
|
+
/** For array AsDetail attributes: "modal" (default) or "inline" */
|
|
91
|
+
editMode?: 'inline' | 'modal';
|
|
92
|
+
/** For LookupReference attributes, specifies the lookup reference type name */
|
|
93
|
+
lookupReferenceType?: string;
|
|
94
|
+
/**
|
|
95
|
+
* Controls on which pages the attribute should be displayed.
|
|
96
|
+
* Query = shown in list views, PersistentObject = shown in detail/edit views.
|
|
97
|
+
* Can be a numeric flag value or a string like "Query, PersistentObject".
|
|
98
|
+
*/
|
|
99
|
+
showedOn?: ShowedOn | string;
|
|
100
|
+
rules: ValidationRule[];
|
|
101
|
+
/** References an AttributeGroup.id to assign this attribute to a group */
|
|
102
|
+
group?: string;
|
|
103
|
+
/** Number of grid columns this attribute spans within a tab's column layout */
|
|
104
|
+
columnSpan?: number;
|
|
105
|
+
/** Renderer component name for custom display in detail/list views */
|
|
106
|
+
renderer?: string;
|
|
107
|
+
/** Options passed to the renderer component */
|
|
108
|
+
rendererOptions?: Record<string, any>;
|
|
109
|
+
}
|
|
110
|
+
interface AttributeTab {
|
|
111
|
+
id: string;
|
|
112
|
+
name: string;
|
|
113
|
+
label?: TranslatedString;
|
|
114
|
+
order: number;
|
|
115
|
+
/** Number of columns for the grid layout within this tab */
|
|
116
|
+
columnCount?: number;
|
|
117
|
+
}
|
|
118
|
+
interface AttributeGroup {
|
|
119
|
+
id: string;
|
|
120
|
+
name: string;
|
|
121
|
+
label?: TranslatedString;
|
|
122
|
+
/** References an AttributeTab.id to assign this group to a tab */
|
|
123
|
+
tab?: string;
|
|
124
|
+
order: number;
|
|
125
|
+
}
|
|
126
|
+
interface EntityType {
|
|
127
|
+
id: string;
|
|
128
|
+
name: string;
|
|
129
|
+
description?: TranslatedString;
|
|
130
|
+
clrType: string;
|
|
131
|
+
alias?: string;
|
|
132
|
+
/**
|
|
133
|
+
* Template string with {PropertyName} placeholders for building a formatted display value.
|
|
134
|
+
* Example: "{Street}, {PostalCode} {City}"
|
|
135
|
+
*/
|
|
136
|
+
displayFormat?: string;
|
|
137
|
+
/**
|
|
138
|
+
* (Fallback) Single attribute name to use as display value when displayFormat is not specified.
|
|
139
|
+
*/
|
|
140
|
+
displayAttribute?: string;
|
|
141
|
+
tabs?: AttributeTab[];
|
|
142
|
+
groups?: AttributeGroup[];
|
|
143
|
+
attributes: EntityAttributeDefinition[];
|
|
144
|
+
/** Query aliases or IDs to display as related query tables on the detail page. */
|
|
145
|
+
queries?: string[];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
type SparkQueryRenderMode = 'Pagination' | 'VirtualScrolling';
|
|
149
|
+
interface SparkQuerySortColumn {
|
|
150
|
+
property: string;
|
|
151
|
+
direction: string;
|
|
152
|
+
}
|
|
153
|
+
interface SparkQuery {
|
|
154
|
+
id: string;
|
|
155
|
+
name: string;
|
|
156
|
+
description?: TranslatedString;
|
|
157
|
+
source: string;
|
|
158
|
+
alias?: string;
|
|
159
|
+
sortColumns: SparkQuerySortColumn[];
|
|
160
|
+
renderMode?: SparkQueryRenderMode;
|
|
161
|
+
/** Optional RavenDB index name for queries using indexes */
|
|
162
|
+
indexName?: string;
|
|
163
|
+
/** When true, uses the projection type from [QueryType] attribute */
|
|
164
|
+
useProjection?: boolean;
|
|
165
|
+
/** Optional entity type name (e.g., "Person"). When set, used for entity type resolution. */
|
|
166
|
+
entityType?: string;
|
|
167
|
+
/** When true, this query uses WebSocket streaming with snapshot + patch updates. */
|
|
168
|
+
isStreamingQuery?: boolean;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
interface QueryResult {
|
|
172
|
+
data: PersistentObject[];
|
|
173
|
+
totalRecords: number;
|
|
174
|
+
skip: number;
|
|
175
|
+
take: number;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
interface ProgramUnit {
|
|
179
|
+
id: string;
|
|
180
|
+
name: TranslatedString;
|
|
181
|
+
icon?: string;
|
|
182
|
+
type: string;
|
|
183
|
+
queryId?: string;
|
|
184
|
+
persistentObjectId?: string;
|
|
185
|
+
order: number;
|
|
186
|
+
alias?: string;
|
|
187
|
+
}
|
|
188
|
+
interface ProgramUnitGroup {
|
|
189
|
+
id: string;
|
|
190
|
+
name: TranslatedString;
|
|
191
|
+
icon?: string;
|
|
192
|
+
order: number;
|
|
193
|
+
programUnits: ProgramUnit[];
|
|
194
|
+
}
|
|
195
|
+
interface ProgramUnitsConfiguration {
|
|
196
|
+
programUnitGroups: ProgramUnitGroup[];
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
declare enum ELookupDisplayType {
|
|
200
|
+
Dropdown = 0,
|
|
201
|
+
Modal = 1
|
|
202
|
+
}
|
|
203
|
+
interface LookupReferenceListItem {
|
|
204
|
+
name: string;
|
|
205
|
+
isTransient: boolean;
|
|
206
|
+
valueCount: number;
|
|
207
|
+
displayType: ELookupDisplayType;
|
|
208
|
+
}
|
|
209
|
+
interface LookupReference {
|
|
210
|
+
name: string;
|
|
211
|
+
isTransient: boolean;
|
|
212
|
+
displayType: ELookupDisplayType;
|
|
213
|
+
values: LookupReferenceValue[];
|
|
214
|
+
}
|
|
215
|
+
interface LookupReferenceValue {
|
|
216
|
+
key: string;
|
|
217
|
+
values: TranslatedString;
|
|
218
|
+
isActive: boolean;
|
|
219
|
+
extra?: Record<string, unknown>;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
interface RetryActionPayload {
|
|
223
|
+
type: 'retry-action';
|
|
224
|
+
step: number;
|
|
225
|
+
title: string;
|
|
226
|
+
message?: string;
|
|
227
|
+
options: string[];
|
|
228
|
+
defaultOption?: string;
|
|
229
|
+
persistentObject?: PersistentObject;
|
|
230
|
+
}
|
|
231
|
+
interface RetryActionResult {
|
|
232
|
+
step: number;
|
|
233
|
+
option: string;
|
|
234
|
+
persistentObject?: PersistentObject;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
interface EntityPermissions {
|
|
238
|
+
canRead: boolean;
|
|
239
|
+
canCreate: boolean;
|
|
240
|
+
canEdit: boolean;
|
|
241
|
+
canDelete: boolean;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
interface CustomActionDefinition {
|
|
245
|
+
name: string;
|
|
246
|
+
displayName: TranslatedString;
|
|
247
|
+
icon?: string;
|
|
248
|
+
description?: string;
|
|
249
|
+
showedOn: string;
|
|
250
|
+
selectionRule?: string;
|
|
251
|
+
refreshOnCompleted: boolean;
|
|
252
|
+
confirmationMessageKey?: string;
|
|
253
|
+
offset: number;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
interface StreamingSnapshotMessage {
|
|
257
|
+
type: 'snapshot';
|
|
258
|
+
data: PersistentObject[];
|
|
259
|
+
}
|
|
260
|
+
interface StreamingPatchItem {
|
|
261
|
+
id: string;
|
|
262
|
+
attributes: Record<string, any>;
|
|
263
|
+
}
|
|
264
|
+
interface StreamingPatchMessage {
|
|
265
|
+
type: 'patch';
|
|
266
|
+
updated: StreamingPatchItem[];
|
|
267
|
+
}
|
|
268
|
+
interface StreamingErrorMessage {
|
|
269
|
+
type: 'error';
|
|
270
|
+
message: string;
|
|
271
|
+
}
|
|
272
|
+
type StreamingMessage = StreamingSnapshotMessage | StreamingPatchMessage | StreamingErrorMessage;
|
|
273
|
+
|
|
274
|
+
export { ELookupDisplayType, ShowedOn, currentLanguage, hasShowedOnFlag, resolveTranslation };
|
|
275
|
+
export type { AttributeGroup, AttributeTab, CustomActionDefinition, EntityAttributeDefinition, EntityPermissions, EntityType, LookupReference, LookupReferenceListItem, LookupReferenceValue, PersistentObject, PersistentObjectAttribute, ProgramUnit, ProgramUnitGroup, ProgramUnitsConfiguration, QueryResult, RetryActionPayload, RetryActionResult, SparkQuery, SparkQueryRenderMode, SparkQuerySortColumn, StreamingErrorMessage, StreamingMessage, StreamingPatchItem, StreamingPatchMessage, StreamingSnapshotMessage, TranslatedString, ValidationError, ValidationErrorResponse, ValidationRule };
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { PipeTransform } from '@angular/core';
|
|
3
|
+
import { TranslatedString, PersistentObject, EntityType, LookupReference, EntityAttributeDefinition, ProgramUnit, EntityPermissions, ELookupDisplayType, LookupReferenceValue, ValidationError } from '@mintplayer/ng-spark/models';
|
|
4
|
+
|
|
5
|
+
declare class TranslateKeyPipe implements PipeTransform {
|
|
6
|
+
private readonly lang;
|
|
7
|
+
transform(key: string): string;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TranslateKeyPipe, never>;
|
|
9
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<TranslateKeyPipe, "t", true>;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare class ResolveTranslationPipe implements PipeTransform {
|
|
13
|
+
transform(value: TranslatedString | undefined, fallback?: string): string;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ResolveTranslationPipe, never>;
|
|
15
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ResolveTranslationPipe, "resolveTranslation", true>;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
declare class InputTypePipe implements PipeTransform {
|
|
19
|
+
transform(dataType: string): string;
|
|
20
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InputTypePipe, never>;
|
|
21
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<InputTypePipe, "inputType", true>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare class AttributeValuePipe implements PipeTransform {
|
|
25
|
+
transform(attrName: string, item: PersistentObject | null, entityType: EntityType | null, lookupRefOptions: Record<string, LookupReference>, allEntityTypes: EntityType[]): any;
|
|
26
|
+
private formatAsDetailValue;
|
|
27
|
+
private resolveDisplayFormat;
|
|
28
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AttributeValuePipe, never>;
|
|
29
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AttributeValuePipe, "attributeValue", true>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
declare class RawAttributeValuePipe implements PipeTransform {
|
|
33
|
+
transform(attrName: string, item: PersistentObject | null): any;
|
|
34
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RawAttributeValuePipe, never>;
|
|
35
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<RawAttributeValuePipe, "rawAttributeValue", true>;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
declare class ReferenceDisplayValuePipe implements PipeTransform {
|
|
39
|
+
private readonly lang;
|
|
40
|
+
transform(attr: EntityAttributeDefinition, formData: Record<string, any>, referenceOptions: Record<string, PersistentObject[]>): string;
|
|
41
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceDisplayValuePipe, never>;
|
|
42
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceDisplayValuePipe, "referenceDisplayValue", true>;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
declare class ReferenceAttrValuePipe implements PipeTransform {
|
|
46
|
+
transform(item: PersistentObject, attrName: string): any;
|
|
47
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceAttrValuePipe, never>;
|
|
48
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceAttrValuePipe, "referenceAttrValue", true>;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
declare class ReferenceLinkRoutePipe implements PipeTransform {
|
|
52
|
+
transform(referenceClrType: string, referenceId: any, allEntityTypes: EntityType[]): string[] | null;
|
|
53
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ReferenceLinkRoutePipe, never>;
|
|
54
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ReferenceLinkRoutePipe, "referenceLinkRoute", true>;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
declare class RouterLinkPipe implements PipeTransform {
|
|
58
|
+
transform(unit: ProgramUnit): string[];
|
|
59
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RouterLinkPipe, never>;
|
|
60
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<RouterLinkPipe, "routerLink", true>;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
declare class AsDetailTypePipe implements PipeTransform {
|
|
64
|
+
transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityType | null;
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailTypePipe, never>;
|
|
66
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailTypePipe, "asDetailType", true>;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
declare class AsDetailColumnsPipe implements PipeTransform {
|
|
70
|
+
transform(attr: EntityAttributeDefinition, asDetailTypes: Record<string, EntityType>): EntityAttributeDefinition[];
|
|
71
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailColumnsPipe, never>;
|
|
72
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailColumnsPipe, "asDetailColumns", true>;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
declare class AsDetailCellValuePipe implements PipeTransform {
|
|
76
|
+
transform(row: Record<string, any>, parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, PersistentObject[]>>): string;
|
|
77
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailCellValuePipe, never>;
|
|
78
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailCellValuePipe, "asDetailCellValue", true>;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
declare class AsDetailDisplayValuePipe implements PipeTransform {
|
|
82
|
+
private readonly lang;
|
|
83
|
+
transform(attr: EntityAttributeDefinition, formData: Record<string, any>, asDetailTypes: Record<string, EntityType>): string;
|
|
84
|
+
private resolveDisplayFormat;
|
|
85
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AsDetailDisplayValuePipe, never>;
|
|
86
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<AsDetailDisplayValuePipe, "asDetailDisplayValue", true>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
declare class CanCreateDetailRowPipe implements PipeTransform {
|
|
90
|
+
transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
|
|
91
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CanCreateDetailRowPipe, never>;
|
|
92
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CanCreateDetailRowPipe, "canCreateDetailRow", true>;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
declare class CanDeleteDetailRowPipe implements PipeTransform {
|
|
96
|
+
transform(attr: EntityAttributeDefinition, permissions: Record<string, EntityPermissions>): boolean;
|
|
97
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CanDeleteDetailRowPipe, never>;
|
|
98
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<CanDeleteDetailRowPipe, "canDeleteDetailRow", true>;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
declare class LookupDisplayTypePipe implements PipeTransform {
|
|
102
|
+
transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): ELookupDisplayType;
|
|
103
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayTypePipe, never>;
|
|
104
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LookupDisplayTypePipe, "lookupDisplayType", true>;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare class LookupDisplayValuePipe implements PipeTransform {
|
|
108
|
+
transform(attr: EntityAttributeDefinition, formData: Record<string, any>, lookupRefOptions: Record<string, LookupReference>): string;
|
|
109
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LookupDisplayValuePipe, never>;
|
|
110
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LookupDisplayValuePipe, "lookupDisplayValue", true>;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
declare class LookupOptionsPipe implements PipeTransform {
|
|
114
|
+
transform(attr: EntityAttributeDefinition, lookupRefOptions: Record<string, LookupReference>): LookupReferenceValue[];
|
|
115
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<LookupOptionsPipe, never>;
|
|
116
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<LookupOptionsPipe, "lookupOptions", true>;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
declare class InlineRefOptionsPipe implements PipeTransform {
|
|
120
|
+
transform(parentAttr: EntityAttributeDefinition, col: EntityAttributeDefinition, asDetailRefOptions: Record<string, Record<string, PersistentObject[]>>): PersistentObject[];
|
|
121
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<InlineRefOptionsPipe, never>;
|
|
122
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<InlineRefOptionsPipe, "inlineRefOptions", true>;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
declare class ErrorForAttributePipe implements PipeTransform {
|
|
126
|
+
transform(attrName: string, validationErrors: ValidationError[]): string | null;
|
|
127
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ErrorForAttributePipe, never>;
|
|
128
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ErrorForAttributePipe, "errorForAttribute", true>;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
declare class IconNamePipe implements PipeTransform {
|
|
132
|
+
transform(value: string | undefined, fallback: string): string;
|
|
133
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<IconNamePipe, never>;
|
|
134
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<IconNamePipe, "iconName", true>;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
declare class ArrayValuePipe implements PipeTransform {
|
|
138
|
+
transform(attrName: string, item: PersistentObject | null): Record<string, any>[];
|
|
139
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArrayValuePipe, never>;
|
|
140
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<ArrayValuePipe, "arrayValue", true>;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RouterLinkPipe, TranslateKeyPipe };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import * as _mintplayer_ng_spark_models from '@mintplayer/ng-spark/models';
|
|
2
|
+
import { PersistentObject, EntityType, ValidationError } from '@mintplayer/ng-spark/models';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { Color } from '@mintplayer/ng-bootstrap';
|
|
5
|
+
|
|
6
|
+
declare class SparkPoCreateComponent {
|
|
7
|
+
private readonly route;
|
|
8
|
+
private readonly router;
|
|
9
|
+
private readonly sparkService;
|
|
10
|
+
saved: _angular_core.OutputEmitterRef<PersistentObject>;
|
|
11
|
+
cancelled: _angular_core.OutputEmitterRef<void>;
|
|
12
|
+
colors: typeof Color;
|
|
13
|
+
entityType: _angular_core.WritableSignal<EntityType>;
|
|
14
|
+
type: _angular_core.WritableSignal<string>;
|
|
15
|
+
formData: _angular_core.WritableSignal<Record<string, any>>;
|
|
16
|
+
validationErrors: _angular_core.WritableSignal<ValidationError[]>;
|
|
17
|
+
isSaving: _angular_core.WritableSignal<boolean>;
|
|
18
|
+
generalErrors: _angular_core.Signal<ValidationError[]>;
|
|
19
|
+
constructor();
|
|
20
|
+
private onParamsChange;
|
|
21
|
+
initFormData(): void;
|
|
22
|
+
getEditableAttributes(): _mintplayer_ng_spark_models.EntityAttributeDefinition[];
|
|
23
|
+
onSave(): Promise<void>;
|
|
24
|
+
onCancel(): void;
|
|
25
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoCreateComponent, never>;
|
|
26
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoCreateComponent, "spark-po-create", never, {}, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export { SparkPoCreateComponent };
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { TemplateRef, Type } from '@angular/core';
|
|
3
|
+
import { Color } from '@mintplayer/ng-bootstrap';
|
|
4
|
+
import { PersistentObject, EntityType, CustomActionDefinition, LookupReference, EntityAttributeDefinition, AttributeTab, AttributeGroup, SparkQuery } from '@mintplayer/ng-spark/models';
|
|
5
|
+
import { DatatableSettings } from '@mintplayer/ng-bootstrap/datatable';
|
|
6
|
+
import { VirtualDatatableDataSource } from '@mintplayer/ng-bootstrap/virtual-datatable';
|
|
7
|
+
import { PaginationResponse } from '@mintplayer/pagination';
|
|
8
|
+
|
|
9
|
+
declare class SparkPoDetailComponent {
|
|
10
|
+
private readonly route;
|
|
11
|
+
private readonly router;
|
|
12
|
+
private readonly sparkService;
|
|
13
|
+
private readonly lang;
|
|
14
|
+
private readonly rendererRegistry;
|
|
15
|
+
showCustomActions: _angular_core.InputSignal<boolean>;
|
|
16
|
+
extraActionsTemplate: _angular_core.InputSignal<TemplateRef<void>>;
|
|
17
|
+
extraContentTemplate: _angular_core.InputSignal<TemplateRef<{
|
|
18
|
+
$implicit: PersistentObject;
|
|
19
|
+
entityType: EntityType;
|
|
20
|
+
}>>;
|
|
21
|
+
edited: _angular_core.OutputEmitterRef<void>;
|
|
22
|
+
deleted: _angular_core.OutputEmitterRef<void>;
|
|
23
|
+
customActionExecuted: _angular_core.OutputEmitterRef<{
|
|
24
|
+
action: CustomActionDefinition;
|
|
25
|
+
item: PersistentObject;
|
|
26
|
+
}>;
|
|
27
|
+
colors: typeof Color;
|
|
28
|
+
errorMessage: _angular_core.WritableSignal<string>;
|
|
29
|
+
entityType: _angular_core.WritableSignal<EntityType>;
|
|
30
|
+
allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
|
|
31
|
+
item: _angular_core.WritableSignal<PersistentObject>;
|
|
32
|
+
lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
|
|
33
|
+
asDetailTypes: _angular_core.WritableSignal<Record<string, EntityType>>;
|
|
34
|
+
asDetailReferenceOptions: _angular_core.WritableSignal<Record<string, Record<string, PersistentObject[]>>>;
|
|
35
|
+
type: string;
|
|
36
|
+
id: string;
|
|
37
|
+
canEdit: _angular_core.WritableSignal<boolean>;
|
|
38
|
+
canDelete: _angular_core.WritableSignal<boolean>;
|
|
39
|
+
customActions: _angular_core.WritableSignal<CustomActionDefinition[]>;
|
|
40
|
+
constructor();
|
|
41
|
+
private onParamsChange;
|
|
42
|
+
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
43
|
+
private static readonly DEFAULT_TAB;
|
|
44
|
+
ungroupedAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
45
|
+
resolvedTabs: _angular_core.Signal<AttributeTab[]>;
|
|
46
|
+
groupsForTab(tab: AttributeTab): AttributeGroup[];
|
|
47
|
+
attrsForGroup(group: AttributeGroup): EntityAttributeDefinition[];
|
|
48
|
+
getDetailRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
49
|
+
getDetailRendererInputs(attr: EntityAttributeDefinition, item: PersistentObject): Record<string, any>;
|
|
50
|
+
private loadLookupReferenceOptions;
|
|
51
|
+
private loadAsDetailTypes;
|
|
52
|
+
onCustomAction(action: CustomActionDefinition): Promise<void>;
|
|
53
|
+
onEdit(): void;
|
|
54
|
+
onDelete(): Promise<void>;
|
|
55
|
+
onBack(): void;
|
|
56
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoDetailComponent, never>;
|
|
57
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoDetailComponent, "spark-po-detail", never, { "showCustomActions": { "alias": "showCustomActions"; "required": false; "isSignal": true; }; "extraActionsTemplate": { "alias": "extraActionsTemplate"; "required": false; "isSignal": true; }; "extraContentTemplate": { "alias": "extraContentTemplate"; "required": false; "isSignal": true; }; }, { "edited": "edited"; "deleted": "deleted"; "customActionExecuted": "customActionExecuted"; }, never, never, true, never>;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
declare class SparkSubQueryComponent {
|
|
61
|
+
private readonly sparkService;
|
|
62
|
+
private readonly rendererRegistry;
|
|
63
|
+
queryId: _angular_core.InputSignal<string>;
|
|
64
|
+
parentId: _angular_core.InputSignal<string>;
|
|
65
|
+
parentType: _angular_core.InputSignal<string>;
|
|
66
|
+
query: _angular_core.WritableSignal<SparkQuery>;
|
|
67
|
+
entityType: _angular_core.WritableSignal<EntityType>;
|
|
68
|
+
allEntityTypes: _angular_core.WritableSignal<EntityType[]>;
|
|
69
|
+
paginationData: _angular_core.WritableSignal<PaginationResponse<PersistentObject>>;
|
|
70
|
+
lookupReferenceOptions: _angular_core.WritableSignal<Record<string, LookupReference>>;
|
|
71
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
72
|
+
canRead: _angular_core.WritableSignal<boolean>;
|
|
73
|
+
settings: _angular_core.WritableSignal<DatatableSettings>;
|
|
74
|
+
virtualDataSource: _angular_core.WritableSignal<VirtualDatatableDataSource<PersistentObject>>;
|
|
75
|
+
virtualSettings: _angular_core.WritableSignal<DatatableSettings>;
|
|
76
|
+
visibleAttributes: _angular_core.Signal<EntityAttributeDefinition[]>;
|
|
77
|
+
constructor();
|
|
78
|
+
private loadData;
|
|
79
|
+
private loadPage;
|
|
80
|
+
onSettingsChange(): void;
|
|
81
|
+
private loadLookupReferenceOptions;
|
|
82
|
+
getColumnRendererComponent(attr: EntityAttributeDefinition): Type<any> | null;
|
|
83
|
+
getColumnRendererInputs(item: PersistentObject, attr: EntityAttributeDefinition): Record<string, any>;
|
|
84
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkSubQueryComponent, never>;
|
|
85
|
+
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>;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export { SparkPoDetailComponent, SparkSubQueryComponent };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as _mintplayer_ng_spark_models from '@mintplayer/ng-spark/models';
|
|
2
|
+
import { PersistentObject, EntityType, ValidationError } from '@mintplayer/ng-spark/models';
|
|
3
|
+
import * as _angular_core from '@angular/core';
|
|
4
|
+
import { Color } from '@mintplayer/ng-bootstrap';
|
|
5
|
+
|
|
6
|
+
declare class SparkPoEditComponent {
|
|
7
|
+
private readonly route;
|
|
8
|
+
private readonly router;
|
|
9
|
+
private readonly sparkService;
|
|
10
|
+
saved: _angular_core.OutputEmitterRef<PersistentObject>;
|
|
11
|
+
cancelled: _angular_core.OutputEmitterRef<void>;
|
|
12
|
+
colors: typeof Color;
|
|
13
|
+
entityType: _angular_core.WritableSignal<EntityType>;
|
|
14
|
+
item: _angular_core.WritableSignal<PersistentObject>;
|
|
15
|
+
type: string;
|
|
16
|
+
id: string;
|
|
17
|
+
formData: _angular_core.WritableSignal<Record<string, any>>;
|
|
18
|
+
validationErrors: _angular_core.WritableSignal<ValidationError[]>;
|
|
19
|
+
isSaving: _angular_core.WritableSignal<boolean>;
|
|
20
|
+
generalErrors: _angular_core.Signal<ValidationError[]>;
|
|
21
|
+
constructor();
|
|
22
|
+
private onParamsChange;
|
|
23
|
+
initFormData(): void;
|
|
24
|
+
getEditableAttributes(): _mintplayer_ng_spark_models.EntityAttributeDefinition[];
|
|
25
|
+
onSave(): Promise<void>;
|
|
26
|
+
onCancel(): void;
|
|
27
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SparkPoEditComponent, never>;
|
|
28
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SparkPoEditComponent, "spark-po-edit", never, {}, { "saved": "saved"; "cancelled": "cancelled"; }, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export { SparkPoEditComponent };
|