@mintplayer/ng-spark 22.5.0 → 22.8.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-client-operations.mjs +12 -12
- package/fesm2022/mintplayer-ng-spark-grid.mjs +151 -70
- package/fesm2022/mintplayer-ng-spark-grid.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-icon.mjs +3 -3
- package/fesm2022/mintplayer-ng-spark-models.mjs +77 -7
- package/fesm2022/mintplayer-ng-spark-models.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-pipes.mjs +167 -74
- package/fesm2022/mintplayer-ng-spark-pipes.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-create.mjs +3 -3
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs +5 -5
- package/fesm2022/mintplayer-ng-spark-po-detail.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-po-edit.mjs +3 -3
- package/fesm2022/mintplayer-ng-spark-po-form.mjs +20 -22
- package/fesm2022/mintplayer-ng-spark-po-form.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-query-list.mjs +23 -9
- package/fesm2022/mintplayer-ng-spark-query-list.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs +14 -1
- package/fesm2022/mintplayer-ng-spark-renderers.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-retry-action-modal.mjs +3 -3
- package/fesm2022/mintplayer-ng-spark-services.mjs +107 -20
- package/fesm2022/mintplayer-ng-spark-services.mjs.map +1 -1
- package/fesm2022/mintplayer-ng-spark-shell.mjs +416 -0
- package/fesm2022/mintplayer-ng-spark-shell.mjs.map +1 -0
- package/fesm2022/mintplayer-ng-spark.mjs +17 -1
- package/fesm2022/mintplayer-ng-spark.mjs.map +1 -1
- package/package.json +5 -1
- package/types/mintplayer-ng-spark-grid.d.ts +75 -33
- package/types/mintplayer-ng-spark-models.d.ts +144 -7
- package/types/mintplayer-ng-spark-pipes.d.ts +42 -6
- package/types/mintplayer-ng-spark-po-detail.d.ts +2 -2
- package/types/mintplayer-ng-spark-po-form.d.ts +7 -7
- package/types/mintplayer-ng-spark-query-list.d.ts +11 -4
- package/types/mintplayer-ng-spark-renderers.d.ts +29 -11
- package/types/mintplayer-ng-spark-services.d.ts +71 -2
- package/types/mintplayer-ng-spark-shell.d.ts +272 -0
- package/types/mintplayer-ng-spark.d.ts +17 -2
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Pipe } from '@angular/core';
|
|
3
3
|
import { SparkLanguageService } from '@mintplayer/ng-spark/services';
|
|
4
|
-
import { resolveTranslation, nestedPoToDict, AS_DETAIL_BREADCRUMBS_KEY, selfBreadcrumb, ELookupDisplayType, nestedPoToDisplayRow } from '@mintplayer/ng-spark/models';
|
|
4
|
+
import { resolveTranslation, nestedPoToDict, AS_DETAIL_BREADCRUMBS_KEY, selfBreadcrumb, ELookupDisplayType, nestedPoToDisplayRow, valueFor } from '@mintplayer/ng-spark/models';
|
|
5
5
|
|
|
6
6
|
class TranslateKeyPipe {
|
|
7
7
|
lang = inject(SparkLanguageService);
|
|
8
8
|
transform(key) {
|
|
9
9
|
return this.lang.t(key);
|
|
10
10
|
}
|
|
11
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
12
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
11
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TranslateKeyPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
12
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: TranslateKeyPipe, isStandalone: true, name: "t", pure: false });
|
|
13
13
|
}
|
|
14
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
14
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: TranslateKeyPipe, decorators: [{
|
|
15
15
|
type: Pipe,
|
|
16
16
|
args: [{ name: 't', pure: false, standalone: true }]
|
|
17
17
|
}] });
|
|
@@ -20,10 +20,10 @@ class ResolveTranslationPipe {
|
|
|
20
20
|
transform(value, fallback) {
|
|
21
21
|
return resolveTranslation(value) || fallback || '';
|
|
22
22
|
}
|
|
23
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
24
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
23
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ResolveTranslationPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
24
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ResolveTranslationPipe, isStandalone: true, name: "resolveTranslation", pure: false });
|
|
25
25
|
}
|
|
26
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
26
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ResolveTranslationPipe, decorators: [{
|
|
27
27
|
type: Pipe,
|
|
28
28
|
args: [{ name: 'resolveTranslation', standalone: true, pure: false }]
|
|
29
29
|
}] });
|
|
@@ -42,14 +42,19 @@ class InputTypePipe {
|
|
|
42
42
|
return 'date';
|
|
43
43
|
case 'color':
|
|
44
44
|
return 'color';
|
|
45
|
+
case 'url':
|
|
46
|
+
case 'image':
|
|
47
|
+
// Both hold a URL, so `url` gets the browser's own validation and keyboard. `image` is a
|
|
48
|
+
// link to an image rather than an upload: the value is still a string the author types.
|
|
49
|
+
return 'url';
|
|
45
50
|
default:
|
|
46
51
|
return 'text';
|
|
47
52
|
}
|
|
48
53
|
}
|
|
49
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
50
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
54
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
55
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: InputTypePipe, isStandalone: true, name: "inputType" });
|
|
51
56
|
}
|
|
52
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
57
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InputTypePipe, decorators: [{
|
|
53
58
|
type: Pipe,
|
|
54
59
|
args: [{ name: 'inputType', standalone: true, pure: true }]
|
|
55
60
|
}] });
|
|
@@ -126,10 +131,10 @@ class AttributeValuePipe {
|
|
|
126
131
|
.filter(v => v != null && typeof v !== 'object' && String(v).trim() !== '')
|
|
127
132
|
.join(', ');
|
|
128
133
|
}
|
|
129
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
130
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
134
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AttributeValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
135
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: AttributeValuePipe, isStandalone: true, name: "attributeValue" });
|
|
131
136
|
}
|
|
132
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
137
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AttributeValuePipe, decorators: [{
|
|
133
138
|
type: Pipe,
|
|
134
139
|
args: [{ name: 'attributeValue', standalone: true, pure: true }]
|
|
135
140
|
}] });
|
|
@@ -138,10 +143,10 @@ class RawAttributeValuePipe {
|
|
|
138
143
|
transform(attrName, item) {
|
|
139
144
|
return item?.attributes.find(a => a.name === attrName)?.value;
|
|
140
145
|
}
|
|
141
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
142
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
146
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: RawAttributeValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
147
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: RawAttributeValuePipe, isStandalone: true, name: "rawAttributeValue" });
|
|
143
148
|
}
|
|
144
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
149
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: RawAttributeValuePipe, decorators: [{
|
|
145
150
|
type: Pipe,
|
|
146
151
|
args: [{ name: 'rawAttributeValue', standalone: true, pure: true }]
|
|
147
152
|
}] });
|
|
@@ -154,12 +159,14 @@ class ReferenceDisplayValuePipe {
|
|
|
154
159
|
return this.lang.t('notSelected');
|
|
155
160
|
const options = referenceOptions[attr.name] || [];
|
|
156
161
|
const selected = options.find(o => o.id === selectedId);
|
|
157
|
-
|
|
162
|
+
// The server resolves a row's display string into `breadcrumb`; falling back to the id
|
|
163
|
+
// beats showing nothing, and there is no third source now that a row carries no `name`.
|
|
164
|
+
return selected?.breadcrumb || selectedId;
|
|
158
165
|
}
|
|
159
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
160
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
166
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceDisplayValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
167
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ReferenceDisplayValuePipe, isStandalone: true, name: "referenceDisplayValue" });
|
|
161
168
|
}
|
|
162
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
169
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceDisplayValuePipe, decorators: [{
|
|
163
170
|
type: Pipe,
|
|
164
171
|
args: [{ name: 'referenceDisplayValue', standalone: true, pure: true }]
|
|
165
172
|
}] });
|
|
@@ -173,10 +180,10 @@ class ReferenceAttrValuePipe {
|
|
|
173
180
|
return attr.breadcrumb;
|
|
174
181
|
return attr.value ?? '';
|
|
175
182
|
}
|
|
176
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
177
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
183
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceAttrValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
184
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ReferenceAttrValuePipe, isStandalone: true, name: "referenceAttrValue" });
|
|
178
185
|
}
|
|
179
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
186
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceAttrValuePipe, decorators: [{
|
|
180
187
|
type: Pipe,
|
|
181
188
|
args: [{ name: 'referenceAttrValue', standalone: true, pure: true }]
|
|
182
189
|
}] });
|
|
@@ -190,10 +197,10 @@ class ReferenceLinkRoutePipe {
|
|
|
190
197
|
return null;
|
|
191
198
|
return ['/po', targetType.alias || targetType.id, referenceId];
|
|
192
199
|
}
|
|
193
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
194
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
200
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceLinkRoutePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
201
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ReferenceLinkRoutePipe, isStandalone: true, name: "referenceLinkRoute" });
|
|
195
202
|
}
|
|
196
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceLinkRoutePipe, decorators: [{
|
|
197
204
|
type: Pipe,
|
|
198
205
|
args: [{ name: 'referenceLinkRoute', standalone: true, pure: true }]
|
|
199
206
|
}] });
|
|
@@ -218,28 +225,40 @@ class ReferenceChipsPipe {
|
|
|
218
225
|
return { id, label: breadcrumbs[id] || id };
|
|
219
226
|
});
|
|
220
227
|
}
|
|
221
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
222
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
228
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceChipsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
229
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ReferenceChipsPipe, isStandalone: true, name: "referenceChips" });
|
|
223
230
|
}
|
|
224
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ReferenceChipsPipe, decorators: [{
|
|
225
232
|
type: Pipe,
|
|
226
233
|
args: [{ name: 'referenceChips', standalone: true, pure: true }]
|
|
227
234
|
}] });
|
|
228
235
|
|
|
236
|
+
/**
|
|
237
|
+
* Maps a program unit to the router commands that open it. Type comparisons are exact: the
|
|
238
|
+
* server's loader canonicalizes `type` casing, so tolerating variants here would only mask a
|
|
239
|
+
* server that stopped doing so.
|
|
240
|
+
*
|
|
241
|
+
* Returns null for a `url` unit — an external address is an `<a href>`, not a router link; the
|
|
242
|
+
* component rendering the menu owns that branch.
|
|
243
|
+
*/
|
|
229
244
|
class RouterLinkPipe {
|
|
230
245
|
transform(unit) {
|
|
231
246
|
if (unit.type === 'query') {
|
|
232
247
|
return ['/query', unit.alias || unit.queryId];
|
|
233
248
|
}
|
|
234
249
|
else if (unit.type === 'persistentObject') {
|
|
235
|
-
|
|
250
|
+
const type = unit.alias || unit.persistentObjectId;
|
|
251
|
+
return unit.objectId ? ['/po', type, unit.objectId] : ['/po', type];
|
|
252
|
+
}
|
|
253
|
+
else if (unit.type === 'url') {
|
|
254
|
+
return null;
|
|
236
255
|
}
|
|
237
256
|
return ['/'];
|
|
238
257
|
}
|
|
239
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
240
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
258
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: RouterLinkPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
259
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: RouterLinkPipe, isStandalone: true, name: "routerLink" });
|
|
241
260
|
}
|
|
242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
261
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: RouterLinkPipe, decorators: [{
|
|
243
262
|
type: Pipe,
|
|
244
263
|
args: [{ name: 'routerLink', standalone: true, pure: true }]
|
|
245
264
|
}] });
|
|
@@ -248,10 +267,10 @@ class AsDetailTypePipe {
|
|
|
248
267
|
transform(attr, asDetailTypes) {
|
|
249
268
|
return asDetailTypes[attr.name] || null;
|
|
250
269
|
}
|
|
251
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
252
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
270
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
271
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: AsDetailTypePipe, isStandalone: true, name: "asDetailType" });
|
|
253
272
|
}
|
|
254
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
273
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailTypePipe, decorators: [{
|
|
255
274
|
type: Pipe,
|
|
256
275
|
args: [{ name: 'asDetailType', standalone: true, pure: true }]
|
|
257
276
|
}] });
|
|
@@ -265,10 +284,10 @@ class AsDetailColumnsPipe {
|
|
|
265
284
|
.filter(a => a.isVisible)
|
|
266
285
|
.sort((a, b) => a.order - b.order);
|
|
267
286
|
}
|
|
268
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
269
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
287
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailColumnsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
288
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: AsDetailColumnsPipe, isStandalone: true, name: "asDetailColumns" });
|
|
270
289
|
}
|
|
271
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
290
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailColumnsPipe, decorators: [{
|
|
272
291
|
type: Pipe,
|
|
273
292
|
args: [{ name: 'asDetailColumns', standalone: true, pure: true }]
|
|
274
293
|
}] });
|
|
@@ -292,7 +311,7 @@ class AsDetailCellValuePipe {
|
|
|
292
311
|
if (options) {
|
|
293
312
|
const match = options.find(o => o.id === value);
|
|
294
313
|
if (match)
|
|
295
|
-
return match.breadcrumb ||
|
|
314
|
+
return match.breadcrumb || String(value);
|
|
296
315
|
}
|
|
297
316
|
}
|
|
298
317
|
}
|
|
@@ -303,10 +322,10 @@ class AsDetailCellValuePipe {
|
|
|
303
322
|
}
|
|
304
323
|
return String(value);
|
|
305
324
|
}
|
|
306
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
307
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
325
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailCellValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
326
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: AsDetailCellValuePipe, isStandalone: true, name: "asDetailCellValue" });
|
|
308
327
|
}
|
|
309
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
328
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailCellValuePipe, decorators: [{
|
|
310
329
|
type: Pipe,
|
|
311
330
|
args: [{ name: 'asDetailCellValue', standalone: true, pure: true }]
|
|
312
331
|
}] });
|
|
@@ -336,10 +355,10 @@ class AsDetailDisplayValuePipe {
|
|
|
336
355
|
}
|
|
337
356
|
return this.lang.t('clickToEdit');
|
|
338
357
|
}
|
|
339
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
340
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
358
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailDisplayValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
359
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: AsDetailDisplayValuePipe, isStandalone: true, name: "asDetailDisplayValue" });
|
|
341
360
|
}
|
|
342
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
361
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: AsDetailDisplayValuePipe, decorators: [{
|
|
343
362
|
type: Pipe,
|
|
344
363
|
args: [{ name: 'asDetailDisplayValue', standalone: true, pure: true }]
|
|
345
364
|
}] });
|
|
@@ -349,10 +368,10 @@ class CanCreateDetailRowPipe {
|
|
|
349
368
|
const perms = permissions[attr.name];
|
|
350
369
|
return perms ? perms.canCreate : true;
|
|
351
370
|
}
|
|
352
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
353
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
371
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CanCreateDetailRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
372
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: CanCreateDetailRowPipe, isStandalone: true, name: "canCreateDetailRow" });
|
|
354
373
|
}
|
|
355
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
374
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CanCreateDetailRowPipe, decorators: [{
|
|
356
375
|
type: Pipe,
|
|
357
376
|
args: [{ name: 'canCreateDetailRow', standalone: true, pure: true }]
|
|
358
377
|
}] });
|
|
@@ -362,10 +381,10 @@ class CanDeleteDetailRowPipe {
|
|
|
362
381
|
const perms = permissions[attr.name];
|
|
363
382
|
return perms ? perms.canDelete : true;
|
|
364
383
|
}
|
|
365
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
366
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
384
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CanDeleteDetailRowPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
385
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: CanDeleteDetailRowPipe, isStandalone: true, name: "canDeleteDetailRow" });
|
|
367
386
|
}
|
|
368
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
387
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: CanDeleteDetailRowPipe, decorators: [{
|
|
369
388
|
type: Pipe,
|
|
370
389
|
args: [{ name: 'canDeleteDetailRow', standalone: true, pure: true }]
|
|
371
390
|
}] });
|
|
@@ -375,10 +394,10 @@ class LookupDisplayTypePipe {
|
|
|
375
394
|
const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;
|
|
376
395
|
return lookupRef?.displayType ?? ELookupDisplayType.Dropdown;
|
|
377
396
|
}
|
|
378
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
379
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
397
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: LookupDisplayTypePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
398
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: LookupDisplayTypePipe, isStandalone: true, name: "lookupDisplayType" });
|
|
380
399
|
}
|
|
381
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
400
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: LookupDisplayTypePipe, decorators: [{
|
|
382
401
|
type: Pipe,
|
|
383
402
|
args: [{ name: 'lookupDisplayType', standalone: true, pure: true }]
|
|
384
403
|
}] });
|
|
@@ -395,10 +414,10 @@ class LookupDisplayValuePipe {
|
|
|
395
414
|
return String(currentValue);
|
|
396
415
|
return resolveTranslation(selected.values) || selected.key;
|
|
397
416
|
}
|
|
398
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
399
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
417
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: LookupDisplayValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
418
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: LookupDisplayValuePipe, isStandalone: true, name: "lookupDisplayValue" });
|
|
400
419
|
}
|
|
401
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
420
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: LookupDisplayValuePipe, decorators: [{
|
|
402
421
|
type: Pipe,
|
|
403
422
|
args: [{ name: 'lookupDisplayValue', standalone: true, pure: true }]
|
|
404
423
|
}] });
|
|
@@ -408,10 +427,10 @@ class LookupOptionsPipe {
|
|
|
408
427
|
const lookupRef = attr.lookupReferenceType ? lookupRefOptions[attr.lookupReferenceType] : null;
|
|
409
428
|
return lookupRef?.values.filter(v => v.isActive) || [];
|
|
410
429
|
}
|
|
411
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
412
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
430
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: LookupOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
431
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: LookupOptionsPipe, isStandalone: true, name: "lookupOptions" });
|
|
413
432
|
}
|
|
414
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
433
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: LookupOptionsPipe, decorators: [{
|
|
415
434
|
type: Pipe,
|
|
416
435
|
args: [{ name: 'lookupOptions', standalone: true, pure: true }]
|
|
417
436
|
}] });
|
|
@@ -420,10 +439,10 @@ class InlineRefOptionsPipe {
|
|
|
420
439
|
transform(parentAttr, col, asDetailRefOptions) {
|
|
421
440
|
return asDetailRefOptions[parentAttr.name]?.[col.name] || [];
|
|
422
441
|
}
|
|
423
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
424
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
442
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InlineRefOptionsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
443
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: InlineRefOptionsPipe, isStandalone: true, name: "inlineRefOptions" });
|
|
425
444
|
}
|
|
426
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
445
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: InlineRefOptionsPipe, decorators: [{
|
|
427
446
|
type: Pipe,
|
|
428
447
|
args: [{ name: 'inlineRefOptions', standalone: true, pure: true }]
|
|
429
448
|
}] });
|
|
@@ -433,10 +452,10 @@ class ErrorForAttributePipe {
|
|
|
433
452
|
const error = validationErrors.find(e => e.attributeName === attrName);
|
|
434
453
|
return error ? resolveTranslation(error.errorMessage) : null;
|
|
435
454
|
}
|
|
436
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
437
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
455
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ErrorForAttributePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
456
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ErrorForAttributePipe, isStandalone: true, name: "errorForAttribute" });
|
|
438
457
|
}
|
|
439
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
458
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ErrorForAttributePipe, decorators: [{
|
|
440
459
|
type: Pipe,
|
|
441
460
|
args: [{ name: 'errorForAttribute', standalone: true, pure: true }]
|
|
442
461
|
}] });
|
|
@@ -447,10 +466,10 @@ class IconNamePipe {
|
|
|
447
466
|
// Strip 'bi-' prefix if present
|
|
448
467
|
return iconClass.startsWith('bi-') ? iconClass.substring(3) : iconClass;
|
|
449
468
|
}
|
|
450
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
451
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
469
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: IconNamePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
470
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: IconNamePipe, isStandalone: true, name: "iconName" });
|
|
452
471
|
}
|
|
453
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
472
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: IconNamePipe, decorators: [{
|
|
454
473
|
type: Pipe,
|
|
455
474
|
args: [{ name: 'iconName', standalone: true, pure: true }]
|
|
456
475
|
}] });
|
|
@@ -475,17 +494,91 @@ class ArrayValuePipe {
|
|
|
475
494
|
return attr.value;
|
|
476
495
|
return [];
|
|
477
496
|
}
|
|
478
|
-
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.
|
|
479
|
-
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.
|
|
497
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ArrayValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
498
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: ArrayValuePipe, isStandalone: true, name: "arrayValue" });
|
|
480
499
|
}
|
|
481
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.
|
|
500
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: ArrayValuePipe, decorators: [{
|
|
482
501
|
type: Pipe,
|
|
483
502
|
args: [{ name: 'arrayValue', standalone: true, pure: true }]
|
|
484
503
|
}] });
|
|
485
504
|
|
|
505
|
+
/**
|
|
506
|
+
* The display text of one query-grid cell.
|
|
507
|
+
*
|
|
508
|
+
* The attribute-shaped sibling of this ({@link AttributeValuePipe}) still serves detail and edit
|
|
509
|
+
* pages, which do work in attributes. They are deliberately not one pipe: a query row is a flat
|
|
510
|
+
* projection with no nested objects and no per-row metadata, so the fallbacks that make sense
|
|
511
|
+
* there — reaching into `attr.object`, recomputing a breadcrumb template client-side — are not
|
|
512
|
+
* merely unnecessary here, they are unreachable. Sharing the code would mean carrying branches
|
|
513
|
+
* that can never fire and inviting the next reader to feed one shape into the other.
|
|
514
|
+
*/
|
|
515
|
+
class QueryCellValuePipe {
|
|
516
|
+
transform(column, item, lookupRefOptions) {
|
|
517
|
+
const cell = valueFor(item, column.name);
|
|
518
|
+
if (!cell)
|
|
519
|
+
return '';
|
|
520
|
+
// A resolved reference display wins: the server can resolve breadcrumb templates this side
|
|
521
|
+
// cannot (a template may name a computed property `[IgnoreProperty]` keeps out of the model).
|
|
522
|
+
if (cell.breadcrumb)
|
|
523
|
+
return cell.breadcrumb;
|
|
524
|
+
if (column.dataType === 'AsDetail') {
|
|
525
|
+
// The projection carries a child COUNT rather than the children, so the wording — and its
|
|
526
|
+
// pluralisation — is decided here, where the language is.
|
|
527
|
+
if (!column.isArray)
|
|
528
|
+
return '';
|
|
529
|
+
const count = typeof cell.value === 'number' ? cell.value : 0;
|
|
530
|
+
return count === 0 ? '' : `${count} item${count !== 1 ? 's' : ''}`;
|
|
531
|
+
}
|
|
532
|
+
if (column.lookupReferenceType && cell.value != null && cell.value !== '') {
|
|
533
|
+
const lookupRef = lookupRefOptions[column.lookupReferenceType];
|
|
534
|
+
const option = lookupRef?.values.find(v => v.key === String(cell.value));
|
|
535
|
+
if (option)
|
|
536
|
+
return resolveTranslation(option.values) || option.key;
|
|
537
|
+
}
|
|
538
|
+
// Null rather than '' so the cell can tell "false" from "unset" and render an indeterminate
|
|
539
|
+
// checkbox instead of an unchecked one.
|
|
540
|
+
if (column.dataType === 'boolean')
|
|
541
|
+
return cell.value ?? null;
|
|
542
|
+
return cell.value ?? '';
|
|
543
|
+
}
|
|
544
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QueryCellValuePipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
545
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: QueryCellValuePipe, isStandalone: true, name: "queryCellValue" });
|
|
546
|
+
}
|
|
547
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QueryCellValuePipe, decorators: [{
|
|
548
|
+
type: Pipe,
|
|
549
|
+
args: [{ name: 'queryCellValue', standalone: true, pure: true }]
|
|
550
|
+
}] });
|
|
551
|
+
/**
|
|
552
|
+
* Resolves a multi-reference column (`dataType === 'Reference'`, `isArray === true`) to chips.
|
|
553
|
+
*
|
|
554
|
+
* The cell's `value` carries the id array and `breadcrumbs` the server-resolved id → label map,
|
|
555
|
+
* falling back to the id itself when a label is missing — the same display rule as a single
|
|
556
|
+
* reference, applied per id.
|
|
557
|
+
*/
|
|
558
|
+
class QueryReferenceChipsPipe {
|
|
559
|
+
transform(column, item) {
|
|
560
|
+
const cell = valueFor(item, column.name);
|
|
561
|
+
if (!cell || !Array.isArray(cell.value))
|
|
562
|
+
return [];
|
|
563
|
+
const breadcrumbs = cell.breadcrumbs ?? {};
|
|
564
|
+
return cell.value
|
|
565
|
+
.filter(v => v != null && v !== '')
|
|
566
|
+
.map(v => {
|
|
567
|
+
const id = String(v);
|
|
568
|
+
return { id, label: breadcrumbs[id] || id };
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QueryReferenceChipsPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe });
|
|
572
|
+
static ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "22.1.3", ngImport: i0, type: QueryReferenceChipsPipe, isStandalone: true, name: "queryReferenceChips" });
|
|
573
|
+
}
|
|
574
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.1.3", ngImport: i0, type: QueryReferenceChipsPipe, decorators: [{
|
|
575
|
+
type: Pipe,
|
|
576
|
+
args: [{ name: 'queryReferenceChips', standalone: true, pure: true }]
|
|
577
|
+
}] });
|
|
578
|
+
|
|
486
579
|
/**
|
|
487
580
|
* Generated bundle index. Do not edit.
|
|
488
581
|
*/
|
|
489
582
|
|
|
490
|
-
export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceChipsPipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RouterLinkPipe, TranslateKeyPipe };
|
|
583
|
+
export { ArrayValuePipe, AsDetailCellValuePipe, AsDetailColumnsPipe, AsDetailDisplayValuePipe, AsDetailTypePipe, AttributeValuePipe, CanCreateDetailRowPipe, CanDeleteDetailRowPipe, ErrorForAttributePipe, IconNamePipe, InlineRefOptionsPipe, InputTypePipe, LookupDisplayTypePipe, LookupDisplayValuePipe, LookupOptionsPipe, QueryCellValuePipe, QueryReferenceChipsPipe, RawAttributeValuePipe, ReferenceAttrValuePipe, ReferenceChipsPipe, ReferenceDisplayValuePipe, ReferenceLinkRoutePipe, ResolveTranslationPipe, RouterLinkPipe, TranslateKeyPipe };
|
|
491
584
|
//# sourceMappingURL=mintplayer-ng-spark-pipes.mjs.map
|