@reventlessdev/reventless-core 3.0.0-alpha.190 → 3.0.0-alpha.192
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/CHANGELOG.md +22 -0
- package/package.json +5 -5
- package/src/admin/Platform_Admin.res +2 -2
- package/src/admin/Platform_Admin.res.mjs +6 -2
- package/src/admin/Platform_Admin_Structure.res +4 -0
- package/src/admin/Platform_Admin_Structure.res.mjs +5 -1
- package/src/admin/Platform_ComponentDefinitionsApi.res +5 -1
- package/src/admin/Platform_ComponentDefinitionsApi.res.mjs +5 -1
- package/src/components/Aggregate/Aggregate.res +7 -7
- package/src/components/Aggregate/Aggregate.res.mjs +7 -2
- package/src/components/Aggregate/Aggregate_Builder.res +4 -1
- package/src/components/Aggregate/Aggregate_Builder.res.mjs +11 -3
- package/src/components/Builder_Helpers.res +37 -4
- package/src/components/Builder_Helpers.res.mjs +24 -2
- package/src/components/Dcb/Dcb_Builder.res +2 -2
- package/src/components/Dcb/Dcb_Builder.res.mjs +4 -4
- package/src/components/SideEffectHandler/SideEffectHandler.res +11 -0
- package/src/components/SideEffectHandler/SideEffectHandler_Builder.res +2 -0
- package/src/components/SideEffectHandler/SideEffectHandler_Builder.res.mjs +3 -1
- package/src/components/Task/Task_Builder.res +11 -0
- package/src/components/Task/Task_Builder.res.mjs +2 -0
- package/src/plugin/component/Capability_Inference.res +68 -0
- package/src/plugin/component/Capability_Inference.res.mjs +79 -0
- package/src/plugin/component/Plugin_Builder.res +2 -2
- package/src/plugin/component/Plugin_Builder.res.mjs +4 -4
- package/src/plugin/component/Plugin_Helpers.res +18 -7
- package/src/plugin/component/Plugin_Helpers.res.mjs +20 -1
- package/src/plugin/component/Plugin_Structure.res +215 -79
- package/src/plugin/component/Plugin_Structure.res.mjs +195 -50
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res +5 -0
- package/tests/admin/Platform_ComponentDefinitionsApiTest.res.mjs +15 -4
- package/tests/message/MessageTest.res +1 -0
- package/tests/message/MessageTest.res.mjs +2 -1
- package/tests/plugin/PluginStructureTest.res +391 -0
- package/tests/plugin/PluginStructureTest.res.mjs +355 -0
- package/tests/plugin/StateChangeSlice/PsChangePhoto.res +33 -0
- package/tests/plugin/StateChangeSlice/PsChangePhoto.res.mjs +64 -0
|
@@ -5,68 +5,140 @@ import * as Stdlib_Array from "@rescript/runtime/lib/es6/Stdlib_Array.js";
|
|
|
5
5
|
import * as Primitive_int from "@rescript/runtime/lib/es6/Primitive_int.js";
|
|
6
6
|
import * as Stdlib_Option from "@rescript/runtime/lib/es6/Stdlib_Option.js";
|
|
7
7
|
import * as Belt_SetString from "@rescript/runtime/lib/es6/Belt_SetString.js";
|
|
8
|
+
import * as Primitive_object from "@rescript/runtime/lib/es6/Primitive_object.js";
|
|
9
|
+
import * as Primitive_string from "@rescript/runtime/lib/es6/Primitive_string.js";
|
|
8
10
|
import * as DcbTag$Reventless from "@reventlessdev/reventless-spec/src/components/DcbTag.res.mjs";
|
|
9
11
|
import * as Reference$Reventless from "@reventlessdev/reventless-spec/src/components/Reference.res.mjs";
|
|
10
12
|
import * as Logger$ReventlessCore from "../../util/Logger.res.mjs";
|
|
11
13
|
import * as StorageRef$Reventless from "@reventlessdev/reventless-spec/src/semantic/StorageRef.res.mjs";
|
|
12
14
|
import * as DisplayName$Reventless from "@reventlessdev/reventless-spec/src/components/DisplayName.res.mjs";
|
|
13
15
|
import * as Api_Naming$ReventlessCore from "../../components/Api/Api_Naming.res.mjs";
|
|
16
|
+
import * as SchemaType$ReventlessCore from "../../components/Api/SchemaType.res.mjs";
|
|
14
17
|
import * as StateAnnotations$Reventless from "@reventlessdev/reventless-spec/src/components/StateAnnotations.res.mjs";
|
|
15
18
|
import * as ApiNoApiHelpers$ReventlessCore from "../../components/Api/ApiNoApiHelpers.res.mjs";
|
|
16
19
|
import * as SuryToJsonSchema$ReventlessCore from "../../components/Api/SuryToJsonSchema.res.mjs";
|
|
20
|
+
import * as Capability_Inference$ReventlessCore from "./Capability_Inference.res.mjs";
|
|
17
21
|
import * as ApiTargetStateHelpers$ReventlessCore from "../../components/Api/ApiTargetStateHelpers.res.mjs";
|
|
18
22
|
import * as ApiAllowedStatesHelpers$ReventlessCore from "../../components/Api/ApiAllowedStatesHelpers.res.mjs";
|
|
19
23
|
|
|
20
24
|
let log = Logger$ReventlessCore.fromEnv();
|
|
21
25
|
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
26
|
+
function isLabelShape(_t) {
|
|
27
|
+
while (true) {
|
|
28
|
+
let t = _t;
|
|
29
|
+
if (typeof t !== "object") {
|
|
30
|
+
return t === "ScalarString";
|
|
31
|
+
}
|
|
32
|
+
if (t.TAG !== "Nullable") {
|
|
33
|
+
return false;
|
|
34
|
+
}
|
|
35
|
+
_t = t._0;
|
|
36
|
+
continue;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
function isStatusShape(_t) {
|
|
41
|
+
while (true) {
|
|
42
|
+
let t = _t;
|
|
43
|
+
if (typeof t !== "object") {
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
switch (t.TAG) {
|
|
47
|
+
case "Nullable" :
|
|
48
|
+
_t = t._0;
|
|
49
|
+
continue;
|
|
50
|
+
case "Enum" :
|
|
51
|
+
return true;
|
|
52
|
+
default:
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
28
56
|
}
|
|
29
57
|
|
|
30
|
-
|
|
58
|
+
let conventionalLabelNames = [
|
|
59
|
+
"name",
|
|
60
|
+
"title",
|
|
61
|
+
"label",
|
|
62
|
+
"displayname"
|
|
63
|
+
];
|
|
64
|
+
|
|
65
|
+
function shapeOfItem(entityName, item) {
|
|
66
|
+
return SchemaType$ReventlessCore.fromSury(entityName, item.location, item.schema);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function statusFieldFromStateSchema(entityName, stateSchema) {
|
|
31
70
|
let spec = StateAnnotations$Reventless.getSpec(stateSchema);
|
|
32
71
|
let annotated = spec !== undefined ? spec.status : undefined;
|
|
33
72
|
if (annotated !== undefined) {
|
|
34
73
|
return annotated;
|
|
35
74
|
} else if (stateSchema.type === "object") {
|
|
36
|
-
return Stdlib_Option.map(stateSchema.items.find(item =>
|
|
75
|
+
return Stdlib_Option.map(stateSchema.items.find(item => {
|
|
76
|
+
if (item.location === "status") {
|
|
77
|
+
return isStatusShape(shapeOfItem(entityName, item));
|
|
78
|
+
} else {
|
|
79
|
+
return false;
|
|
80
|
+
}
|
|
81
|
+
}), item => item.location);
|
|
37
82
|
} else {
|
|
38
83
|
return;
|
|
39
84
|
}
|
|
40
85
|
}
|
|
41
86
|
|
|
87
|
+
function labelFieldSourceToString(s) {
|
|
88
|
+
switch (s) {
|
|
89
|
+
case "Annotation" :
|
|
90
|
+
return "annotation";
|
|
91
|
+
case "Convention" :
|
|
92
|
+
return "convention";
|
|
93
|
+
case "Position" :
|
|
94
|
+
return "position";
|
|
95
|
+
case "Fallback" :
|
|
96
|
+
return "fallback";
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
42
100
|
function labelFieldsFromStateSchema(entityName, stateSchema) {
|
|
43
101
|
let spec = DisplayName$Reventless.getSpec(stateSchema);
|
|
44
102
|
if (spec !== undefined) {
|
|
45
|
-
return
|
|
46
|
-
"displayName",
|
|
47
|
-
spec.fields
|
|
48
|
-
|
|
103
|
+
return {
|
|
104
|
+
field: "displayName",
|
|
105
|
+
searchableFields: spec.fields,
|
|
106
|
+
source: "Annotation"
|
|
107
|
+
};
|
|
49
108
|
}
|
|
50
|
-
let
|
|
51
|
-
|
|
52
|
-
if (item.location
|
|
109
|
+
let candidates;
|
|
110
|
+
candidates = stateSchema.type === "object" ? stateSchema.items.filter(item => {
|
|
111
|
+
if (item.location !== "TAG" && item.location !== "id") {
|
|
112
|
+
return isLabelShape(shapeOfItem(entityName, item));
|
|
113
|
+
} else {
|
|
53
114
|
return false;
|
|
54
115
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
];
|
|
116
|
+
}) : [];
|
|
117
|
+
let conventional = candidates.find(item => {
|
|
118
|
+
let lower = item.location.toLowerCase();
|
|
119
|
+
return conventionalLabelNames.some(n => n === lower);
|
|
120
|
+
});
|
|
121
|
+
let picked = conventional !== undefined ? [
|
|
122
|
+
conventional,
|
|
123
|
+
"Convention"
|
|
124
|
+
] : Stdlib_Option.map(candidates[0], item => [
|
|
125
|
+
item,
|
|
126
|
+
"Position"
|
|
127
|
+
]);
|
|
128
|
+
if (picked !== undefined) {
|
|
129
|
+
let item = picked[0];
|
|
130
|
+
return {
|
|
131
|
+
field: item.location,
|
|
132
|
+
searchableFields: [item.location],
|
|
133
|
+
source: picked[1]
|
|
134
|
+
};
|
|
69
135
|
}
|
|
136
|
+
log.warn("Plugin_Structure", undefined, entityName + `: no @displayName annotation and no suitable string field — labelField falls back to "id"`);
|
|
137
|
+
return {
|
|
138
|
+
field: "id",
|
|
139
|
+
searchableFields: [],
|
|
140
|
+
source: "Fallback"
|
|
141
|
+
};
|
|
70
142
|
}
|
|
71
143
|
|
|
72
144
|
function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChangeSlicesOpt, automationSlicesOpt, outboundTranslationSlicesOpt, inboundTranslationSlicesOpt, extensionsOpt, extensionPointsOpt, componentChaptersOpt) {
|
|
@@ -317,11 +389,70 @@ function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChang
|
|
|
317
389
|
let match$3 = scored[0];
|
|
318
390
|
return match$3[0];
|
|
319
391
|
};
|
|
320
|
-
let
|
|
392
|
+
let compareDeclarations = (a, b) => {
|
|
393
|
+
let byStore = Primitive_string.compare(a.store, b.store);
|
|
394
|
+
if (byStore !== 0) {
|
|
395
|
+
return byStore;
|
|
396
|
+
}
|
|
397
|
+
let byComponent = Primitive_string.compare(a.component, b.component);
|
|
398
|
+
if (byComponent !== 0) {
|
|
399
|
+
return byComponent;
|
|
400
|
+
} else {
|
|
401
|
+
return Primitive_string.compare(a.field, b.field);
|
|
402
|
+
}
|
|
403
|
+
};
|
|
404
|
+
let storeDeclarationSites = [
|
|
405
|
+
aggregates.flatMap(A => [
|
|
406
|
+
[
|
|
407
|
+
A.Spec.name,
|
|
408
|
+
A.Spec.commandSchema
|
|
409
|
+
],
|
|
410
|
+
[
|
|
411
|
+
A.Spec.name,
|
|
412
|
+
A.Spec.eventSchema
|
|
413
|
+
]
|
|
414
|
+
]),
|
|
415
|
+
stateChangeSlices.flatMap(SCS => [
|
|
416
|
+
[
|
|
417
|
+
SCS.Spec.name,
|
|
418
|
+
SCS.Spec.commandSchema
|
|
419
|
+
],
|
|
420
|
+
[
|
|
421
|
+
SCS.Spec.name,
|
|
422
|
+
SCS.Spec.eventSchema
|
|
423
|
+
]
|
|
424
|
+
]),
|
|
425
|
+
stateViewSlices.map(SVS => [
|
|
426
|
+
SVS.Spec.name,
|
|
427
|
+
SVS.Spec.stateSchema
|
|
428
|
+
]),
|
|
429
|
+
readModels.map(R => [
|
|
430
|
+
R.Spec.name,
|
|
431
|
+
R.Spec.stateSchema
|
|
432
|
+
]),
|
|
433
|
+
automationSlices.map(AS => [
|
|
434
|
+
AS.Spec.name,
|
|
435
|
+
AS.Spec.commandSchema
|
|
436
|
+
]),
|
|
437
|
+
inboundTranslationSlices.map(ITS => [
|
|
438
|
+
ITS.Spec.name,
|
|
439
|
+
ITS.Spec.commandSchema
|
|
440
|
+
])
|
|
441
|
+
].flat();
|
|
442
|
+
let requiredStoreDeclarations = Stdlib_Array.reduce(storeDeclarationSites.flatMap(param => {
|
|
443
|
+
let component = param[0];
|
|
444
|
+
let schema = param[1];
|
|
321
445
|
let fromVariant = v => {
|
|
322
446
|
if (v.type === "object") {
|
|
323
447
|
let properties = v.properties;
|
|
324
|
-
return Stdlib_Array.filterMap(Object.entries(properties), param =>
|
|
448
|
+
return Stdlib_Array.filterMap(Object.entries(properties), param => {
|
|
449
|
+
let field = param[0];
|
|
450
|
+
return Stdlib_Option.map(StorageRef$Reventless.getStore(param[1]), target => ({
|
|
451
|
+
store: Stdlib_Option.getOr(target.plugin, name) + "." + target.store,
|
|
452
|
+
component: component,
|
|
453
|
+
field: field
|
|
454
|
+
}));
|
|
455
|
+
});
|
|
325
456
|
} else {
|
|
326
457
|
return [];
|
|
327
458
|
}
|
|
@@ -331,15 +462,22 @@ function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChang
|
|
|
331
462
|
} else {
|
|
332
463
|
return fromVariant(schema);
|
|
333
464
|
}
|
|
334
|
-
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
465
|
+
}).toSorted(compareDeclarations), [], (acc, d) => {
|
|
466
|
+
let prev = Stdlib_Array.last(acc);
|
|
467
|
+
if (prev !== undefined) {
|
|
468
|
+
if (Primitive_object.equal(prev, d)) {
|
|
469
|
+
return acc;
|
|
470
|
+
} else {
|
|
471
|
+
return acc.concat([d]);
|
|
472
|
+
}
|
|
473
|
+
} else {
|
|
474
|
+
return acc.concat([d]);
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
let requiredStores = Belt_SetString.toArray(Belt_SetString.fromArray(requiredStoreDeclarations.map(d => d.store)));
|
|
478
|
+
storeDeclarationSites.forEach(param => {
|
|
479
|
+
Capability_Inference$ReventlessCore.scanSchema(param[0], param[1]).forEach(w => log.warn("Plugin_Structure", undefined, Capability_Inference$ReventlessCore.message(w)));
|
|
480
|
+
});
|
|
343
481
|
let visibilityTag = v => {
|
|
344
482
|
if (v === "Public") {
|
|
345
483
|
return;
|
|
@@ -350,7 +488,7 @@ function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChang
|
|
|
350
488
|
let readModelDefs = readModels.map(R => {
|
|
351
489
|
let qf = Api_Naming$ReventlessCore.queryFieldNamesForReadModel(name, R.Spec.name, undefined);
|
|
352
490
|
let stateSchema = R.Spec.stateSchema;
|
|
353
|
-
let
|
|
491
|
+
let label = labelFieldsFromStateSchema(R.Spec.name, stateSchema);
|
|
354
492
|
let consumed = qualify(name, R.consumedEventNames);
|
|
355
493
|
return {
|
|
356
494
|
name: R.Spec.name,
|
|
@@ -358,9 +496,10 @@ function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChang
|
|
|
358
496
|
schema: JSON.stringify(SuryToJsonSchema$ReventlessCore.deriveObjectSchema(stateSchema)),
|
|
359
497
|
consumedEventTypes: consumed,
|
|
360
498
|
linkedWriteSide: linkedWriteSideFor(consumed),
|
|
361
|
-
labelField:
|
|
362
|
-
searchableFields:
|
|
363
|
-
|
|
499
|
+
labelField: label.field,
|
|
500
|
+
searchableFields: label.searchableFields,
|
|
501
|
+
labelFieldSource: labelFieldSourceToString(label.source),
|
|
502
|
+
statusField: statusFieldFromStateSchema(R.Spec.name, stateSchema),
|
|
364
503
|
visibility: visibilityTag(R.Spec.visibility),
|
|
365
504
|
chapter: componentChapters[R.Spec.name]
|
|
366
505
|
};
|
|
@@ -370,16 +509,17 @@ function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChang
|
|
|
370
509
|
let match = svsConsumed[i];
|
|
371
510
|
let consumed = match[1];
|
|
372
511
|
let stateSchema = SVS.Spec.stateSchema;
|
|
373
|
-
let
|
|
512
|
+
let label = labelFieldsFromStateSchema(SVS.Spec.name, stateSchema);
|
|
374
513
|
return {
|
|
375
514
|
name: SVS.Spec.name,
|
|
376
515
|
queryField: qf.listFieldName,
|
|
377
516
|
schema: JSON.stringify(SuryToJsonSchema$ReventlessCore.deriveObjectSchema(stateSchema)),
|
|
378
517
|
consumedEventTypes: consumed,
|
|
379
518
|
linkedWriteSide: linkedWriteSideFor(consumed),
|
|
380
|
-
labelField:
|
|
381
|
-
searchableFields:
|
|
382
|
-
|
|
519
|
+
labelField: label.field,
|
|
520
|
+
searchableFields: label.searchableFields,
|
|
521
|
+
labelFieldSource: labelFieldSourceToString(label.source),
|
|
522
|
+
statusField: statusFieldFromStateSchema(SVS.Spec.name, stateSchema),
|
|
383
523
|
visibility: visibilityTag(SVS.Spec.visibility),
|
|
384
524
|
chapter: componentChapters[SVS.Spec.name]
|
|
385
525
|
};
|
|
@@ -483,14 +623,19 @@ function make(name, aggregatesOpt, readModelsOpt, stateViewSlicesOpt, stateChang
|
|
|
483
623
|
inboundTranslationSlices: inboundTranslationSliceDefs,
|
|
484
624
|
extensions: extensionDefs,
|
|
485
625
|
extensionPoints: extensionPointDefs,
|
|
486
|
-
requiredStores: requiredStores
|
|
626
|
+
requiredStores: requiredStores,
|
|
627
|
+
requiredStoreDeclarations: requiredStoreDeclarations
|
|
487
628
|
};
|
|
488
629
|
}
|
|
489
630
|
|
|
490
631
|
export {
|
|
491
632
|
log,
|
|
492
|
-
|
|
633
|
+
isLabelShape,
|
|
634
|
+
isStatusShape,
|
|
635
|
+
conventionalLabelNames,
|
|
636
|
+
shapeOfItem,
|
|
493
637
|
statusFieldFromStateSchema,
|
|
638
|
+
labelFieldSourceToString,
|
|
494
639
|
labelFieldsFromStateSchema,
|
|
495
640
|
make,
|
|
496
641
|
}
|
|
@@ -27,6 +27,7 @@ let qbl: queryableDef = {
|
|
|
27
27
|
linkedWriteSide: ["Product"],
|
|
28
28
|
labelField: "displayName",
|
|
29
29
|
searchableFields: ["displayName"],
|
|
30
|
+
labelFieldSource: Some("annotation"),
|
|
30
31
|
statusField: None,
|
|
31
32
|
visibility: None,
|
|
32
33
|
chapter: None,
|
|
@@ -86,6 +87,7 @@ let structure: pluginStructure = {
|
|
|
86
87
|
],
|
|
87
88
|
extensionPoints: None,
|
|
88
89
|
requiredStores: None,
|
|
90
|
+
requiredStoreDeclarations: None,
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
let encoded = Platform_ComponentDefinitionsApi.encodePluginStructureEntry(
|
|
@@ -228,6 +230,7 @@ describe("visibility filtering (deployed AutoUI hides Internal)", () => {
|
|
|
228
230
|
linkedWriteSide: [],
|
|
229
231
|
labelField: "name",
|
|
230
232
|
searchableFields: ["name"],
|
|
233
|
+
labelFieldSource: Some("convention"),
|
|
231
234
|
statusField: None,
|
|
232
235
|
visibility: Some("Internal"),
|
|
233
236
|
chapter: None,
|
|
@@ -270,6 +273,7 @@ describe("allowedStates + statusField populated", () => {
|
|
|
270
273
|
linkedWriteSide: ["Plugin"],
|
|
271
274
|
labelField: "name",
|
|
272
275
|
searchableFields: ["name"],
|
|
276
|
+
labelFieldSource: Some("convention"),
|
|
273
277
|
statusField: Some("status"),
|
|
274
278
|
visibility: None,
|
|
275
279
|
chapter: None,
|
|
@@ -297,6 +301,7 @@ describe("allowedStates + statusField populated", () => {
|
|
|
297
301
|
extensions: [],
|
|
298
302
|
extensionPoints: None,
|
|
299
303
|
requiredStores: None,
|
|
304
|
+
requiredStoreDeclarations: None,
|
|
300
305
|
}
|
|
301
306
|
|
|
302
307
|
let json =
|
|
@@ -31,6 +31,8 @@ let qbl_linkedWriteSide = ["Product"];
|
|
|
31
31
|
|
|
32
32
|
let qbl_searchableFields = ["displayName"];
|
|
33
33
|
|
|
34
|
+
let qbl_labelFieldSource = "annotation";
|
|
35
|
+
|
|
34
36
|
let qbl = {
|
|
35
37
|
name: "Products",
|
|
36
38
|
queryField: "Catalog_Products",
|
|
@@ -39,6 +41,7 @@ let qbl = {
|
|
|
39
41
|
linkedWriteSide: qbl_linkedWriteSide,
|
|
40
42
|
labelField: "displayName",
|
|
41
43
|
searchableFields: qbl_searchableFields,
|
|
44
|
+
labelFieldSource: qbl_labelFieldSource,
|
|
42
45
|
statusField: undefined,
|
|
43
46
|
visibility: undefined,
|
|
44
47
|
chapter: undefined
|
|
@@ -119,7 +122,8 @@ let structure = {
|
|
|
119
122
|
inboundTranslationSlices: structure_inboundTranslationSlices,
|
|
120
123
|
extensions: structure_extensions,
|
|
121
124
|
extensionPoints: undefined,
|
|
122
|
-
requiredStores: undefined
|
|
125
|
+
requiredStores: undefined,
|
|
126
|
+
requiredStoreDeclarations: undefined
|
|
123
127
|
};
|
|
124
128
|
|
|
125
129
|
let encoded = Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry("Catalog", structure);
|
|
@@ -218,7 +222,8 @@ globalThis.describe("translation-slice externalSystem round-trip", () => {
|
|
|
218
222
|
inboundTranslationSlices: externalStructure_inboundTranslationSlices,
|
|
219
223
|
extensions: externalStructure_extensions,
|
|
220
224
|
extensionPoints: undefined,
|
|
221
|
-
requiredStores: undefined
|
|
225
|
+
requiredStores: undefined,
|
|
226
|
+
requiredStoreDeclarations: undefined
|
|
222
227
|
};
|
|
223
228
|
let externalJson = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry("Catalog", externalStructure));
|
|
224
229
|
globalThis.test("surfaces Some outbound externalSystem as its inner string", () => {
|
|
@@ -233,6 +238,7 @@ globalThis.describe("visibility filtering (deployed AutoUI hides Internal)", ()
|
|
|
233
238
|
let internalQbl_consumedEventTypes = ["CatalogProductSynced"];
|
|
234
239
|
let internalQbl_linkedWriteSide = [];
|
|
235
240
|
let internalQbl_searchableFields = ["name"];
|
|
241
|
+
let internalQbl_labelFieldSource = "convention";
|
|
236
242
|
let internalQbl_visibility = "Internal";
|
|
237
243
|
let internalQbl = {
|
|
238
244
|
name: "AvailableProducts",
|
|
@@ -242,6 +248,7 @@ globalThis.describe("visibility filtering (deployed AutoUI hides Internal)", ()
|
|
|
242
248
|
linkedWriteSide: internalQbl_linkedWriteSide,
|
|
243
249
|
labelField: "name",
|
|
244
250
|
searchableFields: internalQbl_searchableFields,
|
|
251
|
+
labelFieldSource: internalQbl_labelFieldSource,
|
|
245
252
|
statusField: undefined,
|
|
246
253
|
visibility: internalQbl_visibility,
|
|
247
254
|
chapter: undefined
|
|
@@ -267,7 +274,8 @@ globalThis.describe("visibility filtering (deployed AutoUI hides Internal)", ()
|
|
|
267
274
|
inboundTranslationSlices: mixed_inboundTranslationSlices,
|
|
268
275
|
extensions: mixed_extensions,
|
|
269
276
|
extensionPoints: undefined,
|
|
270
|
-
requiredStores: undefined
|
|
277
|
+
requiredStores: undefined,
|
|
278
|
+
requiredStoreDeclarations: undefined
|
|
271
279
|
};
|
|
272
280
|
let mixedJson = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry("Ordering", mixed));
|
|
273
281
|
globalThis.test("excludes an Internal queryableDef from the encoded read-side", () => {
|
|
@@ -298,6 +306,7 @@ globalThis.describe("allowedStates + statusField populated", () => {
|
|
|
298
306
|
let qblWithStatus_consumedEventTypes = [];
|
|
299
307
|
let qblWithStatus_linkedWriteSide = ["Plugin"];
|
|
300
308
|
let qblWithStatus_searchableFields = ["name"];
|
|
309
|
+
let qblWithStatus_labelFieldSource = "convention";
|
|
301
310
|
let qblWithStatus_statusField = "status";
|
|
302
311
|
let qblWithStatus = {
|
|
303
312
|
name: "Plugin",
|
|
@@ -307,6 +316,7 @@ globalThis.describe("allowedStates + statusField populated", () => {
|
|
|
307
316
|
linkedWriteSide: qblWithStatus_linkedWriteSide,
|
|
308
317
|
labelField: "name",
|
|
309
318
|
searchableFields: qblWithStatus_searchableFields,
|
|
319
|
+
labelFieldSource: qblWithStatus_labelFieldSource,
|
|
310
320
|
statusField: qblWithStatus_statusField,
|
|
311
321
|
visibility: undefined,
|
|
312
322
|
chapter: undefined
|
|
@@ -344,7 +354,8 @@ globalThis.describe("allowedStates + statusField populated", () => {
|
|
|
344
354
|
inboundTranslationSlices: structureWithStates_inboundTranslationSlices,
|
|
345
355
|
extensions: structureWithStates_extensions,
|
|
346
356
|
extensionPoints: undefined,
|
|
347
|
-
requiredStores: undefined
|
|
357
|
+
requiredStores: undefined,
|
|
358
|
+
requiredStoreDeclarations: undefined
|
|
348
359
|
};
|
|
349
360
|
let json = JSON.stringify(Platform_ComponentDefinitionsApi$ReventlessCore.encodePluginStructureEntry("Platform", structureWithStates));
|
|
350
361
|
globalThis.test("encodes populated allowedStates as a JSON array", () => {
|
|
@@ -118,7 +118,8 @@ globalThis.describe("Message should", () => {
|
|
|
118
118
|
inboundTranslationSlices: [],
|
|
119
119
|
extensions: [],
|
|
120
120
|
extensionPoints: undefined,
|
|
121
|
-
requiredStores: undefined
|
|
121
|
+
requiredStores: undefined,
|
|
122
|
+
requiredStoreDeclarations: undefined
|
|
122
123
|
},
|
|
123
124
|
dcbEventLog: undefined,
|
|
124
125
|
kind: "Domain"
|