@sap/ux-specification 1.84.37 → 1.84.38
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 +27 -6
- package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
- package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
- package/dist/documentation/v2/v2-ListReport.html +1 -1
- package/dist/documentation/v2/v2-ObjectPage.html +1 -1
- package/dist/documentation/v2/v2-OverviewPage.html +1 -1
- package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
- package/dist/documentation/v4/v4-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/ObjectPageConfig.json +184 -0
- package/dist/src/project.d.ts +1 -0
- package/dist/src/project.js +2 -2
- package/dist/src/project.js.map +1 -1
- package/dist/src/specification/v2/controls/ObjectPageSection.d.ts +40 -7
- package/dist/src/specification/v2/controls/ObjectPageSection.js.map +1 -1
- package/dist/src/sync/common/decoration/control.d.ts +1 -1
- package/dist/src/sync/common/decoration/control.js +1 -1
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +12 -2
- package/dist/src/sync/common/generate/utils.js +57 -35
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/import/utils.d.ts +3 -2
- package/dist/src/sync/common/import/utils.js +11 -6
- package/dist/src/sync/common/import/utils.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +4 -0
- package/dist/src/sync/common/types.js +3 -0
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +2 -2
- package/dist/src/sync/common/utils.js +51 -42
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.d.ts +26 -14
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js +57 -5
- package/dist/src/sync/v2/export/controls/ObjectPageSectionsV2.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +32 -32
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +72 -59
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +64 -67
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/types.d.ts +8 -3
- package/dist/src/sync/v2/types.js +6 -2
- package/dist/src/sync/v2/types.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.js +4 -6
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/export/export.js +6 -4
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/manifest.js +25 -6
- package/dist/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/src/sync/v4/generate/listReport.js +55 -21
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +8 -26
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/pages/listReport.js +19 -10
- package/dist/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/package.json +1 -1
|
@@ -231,6 +231,9 @@
|
|
|
231
231
|
"type": "object",
|
|
232
232
|
"additionalProperties": {
|
|
233
233
|
"anyOf": [
|
|
234
|
+
{
|
|
235
|
+
"$ref": "#/definitions/ObjectPageSectionV2"
|
|
236
|
+
},
|
|
234
237
|
{
|
|
235
238
|
"$ref": "#/definitions/ObjectPageSectionFormV2"
|
|
236
239
|
},
|
|
@@ -240,12 +243,45 @@
|
|
|
240
243
|
{
|
|
241
244
|
"$ref": "#/definitions/ObjectPageSectionChartV2"
|
|
242
245
|
},
|
|
246
|
+
{
|
|
247
|
+
"$ref": "#/definitions/ObjectPageSectionContactV2"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"$ref": "#/definitions/ObjectPageSectionAddressV2"
|
|
251
|
+
},
|
|
243
252
|
{
|
|
244
253
|
"$ref": "#/definitions/ObjectPageSubSectionV2"
|
|
245
254
|
}
|
|
246
255
|
]
|
|
247
256
|
}
|
|
248
257
|
},
|
|
258
|
+
"ObjectPageSectionV2": {
|
|
259
|
+
"description": "Section",
|
|
260
|
+
"isViewNode": true,
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"visible": {
|
|
264
|
+
"pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#? _|,<>'()[\\]\\/:=.]+}$",
|
|
265
|
+
"anyOf": [
|
|
266
|
+
{
|
|
267
|
+
"enum": [
|
|
268
|
+
false,
|
|
269
|
+
true,
|
|
270
|
+
"{ui>/editable}",
|
|
271
|
+
"{= !${ui>/editable}}"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"type": "string"
|
|
276
|
+
}
|
|
277
|
+
],
|
|
278
|
+
"description": "Whether the section should be visible on the screen.",
|
|
279
|
+
"artifactType": "FlexChange",
|
|
280
|
+
"controlType": "sap.uxap.ObjectPageSection"
|
|
281
|
+
}
|
|
282
|
+
},
|
|
283
|
+
"additionalProperties": false
|
|
284
|
+
},
|
|
249
285
|
"ObjectPageSectionFormV2": {
|
|
250
286
|
"description": "Form",
|
|
251
287
|
"isViewNode": true,
|
|
@@ -1311,12 +1347,160 @@
|
|
|
1311
1347
|
},
|
|
1312
1348
|
"additionalProperties": false
|
|
1313
1349
|
},
|
|
1350
|
+
"ObjectPageSectionContactV2": {
|
|
1351
|
+
"type": "object",
|
|
1352
|
+
"properties": {
|
|
1353
|
+
"contact": {
|
|
1354
|
+
"description": "Contact",
|
|
1355
|
+
"isViewNode": true,
|
|
1356
|
+
"type": "object",
|
|
1357
|
+
"properties": {},
|
|
1358
|
+
"additionalProperties": true
|
|
1359
|
+
},
|
|
1360
|
+
"visible": {
|
|
1361
|
+
"pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#? _|,<>'()[\\]\\/:=.]+}$",
|
|
1362
|
+
"anyOf": [
|
|
1363
|
+
{
|
|
1364
|
+
"enum": [
|
|
1365
|
+
false,
|
|
1366
|
+
true,
|
|
1367
|
+
"{ui>/editable}",
|
|
1368
|
+
"{= !${ui>/editable}}"
|
|
1369
|
+
]
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"type": "string"
|
|
1373
|
+
}
|
|
1374
|
+
],
|
|
1375
|
+
"description": "Whether the section should be visible on the screen.",
|
|
1376
|
+
"artifactType": "FlexChange",
|
|
1377
|
+
"controlType": "sap.uxap.ObjectPageSection"
|
|
1378
|
+
}
|
|
1379
|
+
},
|
|
1380
|
+
"additionalProperties": false
|
|
1381
|
+
},
|
|
1382
|
+
"ObjectPageSectionAddressV2": {
|
|
1383
|
+
"type": "object",
|
|
1384
|
+
"properties": {
|
|
1385
|
+
"address": {
|
|
1386
|
+
"description": "Address",
|
|
1387
|
+
"isViewNode": true,
|
|
1388
|
+
"type": "object",
|
|
1389
|
+
"properties": {},
|
|
1390
|
+
"additionalProperties": true
|
|
1391
|
+
},
|
|
1392
|
+
"visible": {
|
|
1393
|
+
"pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#? _|,<>'()[\\]\\/:=.]+}$",
|
|
1394
|
+
"anyOf": [
|
|
1395
|
+
{
|
|
1396
|
+
"enum": [
|
|
1397
|
+
false,
|
|
1398
|
+
true,
|
|
1399
|
+
"{ui>/editable}",
|
|
1400
|
+
"{= !${ui>/editable}}"
|
|
1401
|
+
]
|
|
1402
|
+
},
|
|
1403
|
+
{
|
|
1404
|
+
"type": "string"
|
|
1405
|
+
}
|
|
1406
|
+
],
|
|
1407
|
+
"description": "Whether the section should be visible on the screen.",
|
|
1408
|
+
"artifactType": "FlexChange",
|
|
1409
|
+
"controlType": "sap.uxap.ObjectPageSection"
|
|
1410
|
+
}
|
|
1411
|
+
},
|
|
1412
|
+
"additionalProperties": false
|
|
1413
|
+
},
|
|
1314
1414
|
"ObjectPageSubSectionV2": {
|
|
1315
1415
|
"description": "Subsection",
|
|
1316
1416
|
"isViewNode": true,
|
|
1317
1417
|
"type": "object",
|
|
1318
1418
|
"properties": {
|
|
1319
1419
|
"subsections": {
|
|
1420
|
+
"$ref": "#/definitions/GenericSubSections"
|
|
1421
|
+
},
|
|
1422
|
+
"visible": {
|
|
1423
|
+
"pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#? _|,<>'()[\\]\\/:=.]+}$",
|
|
1424
|
+
"anyOf": [
|
|
1425
|
+
{
|
|
1426
|
+
"enum": [
|
|
1427
|
+
false,
|
|
1428
|
+
true,
|
|
1429
|
+
"{ui>/editable}",
|
|
1430
|
+
"{= !${ui>/editable}}"
|
|
1431
|
+
]
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
"type": "string"
|
|
1435
|
+
}
|
|
1436
|
+
],
|
|
1437
|
+
"description": "Whether the section should be visible on the screen.",
|
|
1438
|
+
"artifactType": "FlexChange",
|
|
1439
|
+
"controlType": "sap.uxap.ObjectPageSubSection"
|
|
1440
|
+
}
|
|
1441
|
+
},
|
|
1442
|
+
"additionalProperties": false
|
|
1443
|
+
},
|
|
1444
|
+
"GenericSubSections": {
|
|
1445
|
+
"type": "object",
|
|
1446
|
+
"additionalProperties": {
|
|
1447
|
+
"anyOf": [
|
|
1448
|
+
{
|
|
1449
|
+
"$ref": "#/definitions/ObjectPageSectionFormV2"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
"$ref": "#/definitions/ObjectPageSectionTableV2"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"$ref": "#/definitions/ObjectPageSectionChartV2"
|
|
1456
|
+
},
|
|
1457
|
+
{
|
|
1458
|
+
"$ref": "#/definitions/ObjectPageSubSectionContactV2"
|
|
1459
|
+
},
|
|
1460
|
+
{
|
|
1461
|
+
"$ref": "#/definitions/ObjectPageSubSectionAddressV2"
|
|
1462
|
+
}
|
|
1463
|
+
]
|
|
1464
|
+
}
|
|
1465
|
+
},
|
|
1466
|
+
"ObjectPageSubSectionContactV2": {
|
|
1467
|
+
"type": "object",
|
|
1468
|
+
"properties": {
|
|
1469
|
+
"contact": {
|
|
1470
|
+
"description": "Contact",
|
|
1471
|
+
"isViewNode": true,
|
|
1472
|
+
"type": "object",
|
|
1473
|
+
"properties": {},
|
|
1474
|
+
"additionalProperties": true
|
|
1475
|
+
},
|
|
1476
|
+
"visible": {
|
|
1477
|
+
"pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#? _|,<>'()[\\]\\/:=.]+}$",
|
|
1478
|
+
"anyOf": [
|
|
1479
|
+
{
|
|
1480
|
+
"enum": [
|
|
1481
|
+
false,
|
|
1482
|
+
true,
|
|
1483
|
+
"{ui>/editable}",
|
|
1484
|
+
"{= !${ui>/editable}}"
|
|
1485
|
+
]
|
|
1486
|
+
},
|
|
1487
|
+
{
|
|
1488
|
+
"type": "string"
|
|
1489
|
+
}
|
|
1490
|
+
],
|
|
1491
|
+
"description": "Whether the section should be visible on the screen.",
|
|
1492
|
+
"artifactType": "FlexChange",
|
|
1493
|
+
"controlType": "sap.uxap.ObjectPageSubSection"
|
|
1494
|
+
}
|
|
1495
|
+
},
|
|
1496
|
+
"additionalProperties": false
|
|
1497
|
+
},
|
|
1498
|
+
"ObjectPageSubSectionAddressV2": {
|
|
1499
|
+
"type": "object",
|
|
1500
|
+
"properties": {
|
|
1501
|
+
"address": {
|
|
1502
|
+
"description": "Address",
|
|
1503
|
+
"isViewNode": true,
|
|
1320
1504
|
"type": "object",
|
|
1321
1505
|
"properties": {},
|
|
1322
1506
|
"additionalProperties": true
|
package/dist/src/project.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export interface Project {
|
|
|
9
9
|
}
|
|
10
10
|
export declare const readDirectory: (path: string) => Promise<string[]>;
|
|
11
11
|
export declare const isDirectory: (path: string) => Promise<boolean>;
|
|
12
|
+
export declare const getChanges: (webapp: string) => Promise<string[]>;
|
|
12
13
|
/**
|
|
13
14
|
* Get the project artefacts, like manifest, service metadata, annotations
|
|
14
15
|
* @param root - project root where package.json is
|
package/dist/src/project.js
CHANGED
|
@@ -51,7 +51,7 @@ const resourceExists = async (path) => {
|
|
|
51
51
|
const getManifest = async (path) => {
|
|
52
52
|
return readJSON(path_1.join(path, 'manifest.json'));
|
|
53
53
|
};
|
|
54
|
-
|
|
54
|
+
exports.getChanges = async (webapp) => {
|
|
55
55
|
const changes = [];
|
|
56
56
|
const changesDirectory = path_1.join(webapp, 'changes');
|
|
57
57
|
if (!(await resourceExists(changesDirectory))) {
|
|
@@ -137,7 +137,7 @@ exports.getProject = async (root) => {
|
|
|
137
137
|
const webappPath = path_1.join(root, 'webapp');
|
|
138
138
|
const manifest = await getManifest(webappPath);
|
|
139
139
|
const annotations = await getAnnotations(manifest, webappPath);
|
|
140
|
-
const changes = await getChanges(webappPath);
|
|
140
|
+
const changes = await exports.getChanges(webappPath);
|
|
141
141
|
const fragments = await getFragments(webappPath);
|
|
142
142
|
return {
|
|
143
143
|
root,
|
package/dist/src/project.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":";;AAAA,+BAAsC;AACtC,2BAAmE;AAYnE,MAAM,QAAQ,GAAG,KAAK,EAAE,IAAY,EAAmB,EAAE;IACrD,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAQ,EAAE;QACzC,aAAU,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,CAAC,GAAG,EAAE,IAAI,EAAQ,EAAE;YACvD,IAAI,GAAG,EAAE;gBACL,MAAM,CAAC,GAAG,CAAC,CAAC;aACf;iBAAM;gBACH,OAAO,CAAC,IAAI,CAAC,CAAC;aACjB;QACL,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,QAAQ,GAAG,KAAK,EAAK,IAAY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AU,GAAG,KAAK,EAAE,IAAY,EAAoB,EAAE;IAC/D,MAAM,IAAI,GAAG,eAAQ,CAAC,IAAI,CAAC,CAAC;IAC5B,MAAM,UAAU,GAAG,WAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,MAAM,WAAW,CAAC,UAAU,CAAC,CAAC;IAC/C,MAAM,WAAW,GAAG,MAAM,cAAc,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;IAC/D,MAAM,OAAO,GAAG,MAAM,kBAAU,CAAC,UAAU,CAAC,CAAC;IAC7C,MAAM,SAAS,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,CAAC;IACjD,OAAO;QACH,IAAI;QACJ,IAAI;QACJ,QAAQ;QACR,WAAW;QACX,OAAO;QACP,SAAS;KACZ,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@ import type { ViewTypes, SAPUI5_FRAGMENT_CLASS, SAPUI5_VIEW_CLASS } from '../../
|
|
|
4
4
|
* Section
|
|
5
5
|
* @isViewNode true
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface ObjectPageSectionV2 {
|
|
8
8
|
/**
|
|
9
9
|
* Whether the section should be visible on the screen.
|
|
10
10
|
*/
|
|
@@ -14,32 +14,65 @@ export interface ObjectPageSection {
|
|
|
14
14
|
* Form
|
|
15
15
|
* @isViewNode true
|
|
16
16
|
*/
|
|
17
|
-
export interface ObjectPageSectionFormV2 extends
|
|
17
|
+
export interface ObjectPageSectionFormV2 extends ObjectPageSectionV2 {
|
|
18
18
|
form?: ObjectPageForm;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
21
|
* Table
|
|
22
22
|
* @isViewNode true
|
|
23
23
|
*/
|
|
24
|
-
export interface ObjectPageSectionTableV2 extends
|
|
24
|
+
export interface ObjectPageSectionTableV2 extends ObjectPageSectionV2 {
|
|
25
25
|
table?: ObjectPageResponsiveTableWithMultiSelect | ObjectPageResponsiveTableWithInlineDelete | ObjectPageAnalyticalTable | ObjectPageGridTable | ObjectPageTreeTable;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
28
|
* Chart
|
|
29
29
|
* @isViewNode true
|
|
30
30
|
*/
|
|
31
|
-
export interface ObjectPageSectionChartV2 extends
|
|
31
|
+
export interface ObjectPageSectionChartV2 extends ObjectPageSectionV2 {
|
|
32
32
|
chart?: ObjectPageChart;
|
|
33
33
|
}
|
|
34
|
+
export interface ObjectPageSectionContactV2 extends ObjectPageSectionV2 {
|
|
35
|
+
/**
|
|
36
|
+
* Contact
|
|
37
|
+
* @isViewNode true
|
|
38
|
+
*/
|
|
39
|
+
contact?: object;
|
|
40
|
+
}
|
|
41
|
+
export interface ObjectPageSectionAddressV2 extends ObjectPageSectionV2 {
|
|
42
|
+
/**
|
|
43
|
+
* Address
|
|
44
|
+
* @isViewNode true
|
|
45
|
+
*/
|
|
46
|
+
address?: object;
|
|
47
|
+
}
|
|
48
|
+
export interface ObjectPageSubSectionContactV2 extends ObjectPageSectionV2 {
|
|
49
|
+
/**
|
|
50
|
+
* Contact
|
|
51
|
+
* @isViewNode true
|
|
52
|
+
*/
|
|
53
|
+
contact?: object;
|
|
54
|
+
}
|
|
55
|
+
export interface ObjectPageSubSectionAddressV2 extends ObjectPageSectionV2 {
|
|
56
|
+
/**
|
|
57
|
+
* Address
|
|
58
|
+
* @isViewNode true
|
|
59
|
+
*/
|
|
60
|
+
address?: object;
|
|
61
|
+
}
|
|
62
|
+
export declare type AnySubSectionType = ObjectPageSectionTableV2 | ObjectPageSectionChartV2 | ObjectPageSectionFormV2 | ObjectPageSubSectionContactV2 | ObjectPageSubSectionAddressV2;
|
|
63
|
+
export interface GenericSubSections {
|
|
64
|
+
[key: string]: AnySubSectionType;
|
|
65
|
+
}
|
|
34
66
|
/**
|
|
35
67
|
* Subsection
|
|
36
68
|
* @isViewNode true
|
|
37
69
|
*/
|
|
38
|
-
export interface ObjectPageSubSectionV2 extends
|
|
39
|
-
subsections?:
|
|
70
|
+
export interface ObjectPageSubSectionV2 extends ObjectPageSectionV2 {
|
|
71
|
+
subsections?: GenericSubSections;
|
|
40
72
|
}
|
|
73
|
+
export declare type AnySectionType = ObjectPageSectionTableV2 | ObjectPageSectionChartV2 | ObjectPageSectionFormV2 | ObjectPageSectionContactV2 | ObjectPageSectionAddressV2 | ObjectPageSectionV2 | ObjectPageSubSectionV2;
|
|
41
74
|
export interface GenericSections {
|
|
42
|
-
[key: string]:
|
|
75
|
+
[key: string]: AnySectionType;
|
|
43
76
|
}
|
|
44
77
|
/**
|
|
45
78
|
* Custom Sections
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ObjectPageSection.js","sourceRoot":"","sources":["../../../../../src/specification/v2/controls/ObjectPageSection.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"ObjectPageSection.js","sourceRoot":"","sources":["../../../../../src/specification/v2/controls/ObjectPageSection.ts"],"names":[],"mappings":";;AAyJA,IAAY,eAIX;AAJD,WAAY,eAAe;IACvB,4CAAyB,CAAA;IACzB,8CAA2B,CAAA;IAC3B,gDAA6B,CAAA;AACjC,CAAC,EAJW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAI1B;AAED,IAAY,sBAEX;AAFD,WAAY,sBAAsB;IAC9B,qCAAW,CAAA;AACf,CAAC,EAFW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAEjC"}
|
|
@@ -35,7 +35,7 @@ export declare enum BindingValue {
|
|
|
35
35
|
* @param controlType - controlType function of ecorators, not used here
|
|
36
36
|
* @param title - title from JSON schema, comprising the facet ID
|
|
37
37
|
*/
|
|
38
|
-
export declare const buildColumnControlId: (baseId: string, idBreadcrumbs: string[], breadcrumbs: string[],
|
|
38
|
+
export declare const buildColumnControlId: (baseId: string, idBreadcrumbs: string[], breadcrumbs: string[], _controlType: ControlTypeFunction, title: string) => string;
|
|
39
39
|
/**
|
|
40
40
|
* Split up action breadcrumb and return different parts from it
|
|
41
41
|
* @param breadcrumbs - array of breadcrumbs
|
|
@@ -88,7 +88,7 @@ function mapBreadcrumbs(idBreadcrumbs, localBreadcrumbs, title) {
|
|
|
88
88
|
* @param controlType - controlType function of ecorators, not used here
|
|
89
89
|
* @param title - title from JSON schema, comprising the facet ID
|
|
90
90
|
*/
|
|
91
|
-
exports.buildColumnControlId = (baseId, idBreadcrumbs, breadcrumbs,
|
|
91
|
+
exports.buildColumnControlId = (baseId, idBreadcrumbs, breadcrumbs, _controlType, title) => {
|
|
92
92
|
let tableId = 'listReport'; //default
|
|
93
93
|
const localBreadcrumbs = [...breadcrumbs];
|
|
94
94
|
({ idBreadcrumbs } = mapBreadcrumbs(idBreadcrumbs, localBreadcrumbs, title));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.js","sourceRoot":"","sources":["../../../../../src/sync/common/decoration/control.ts"],"names":[],"mappings":";;AAEA,oCAAiH;AACjH,oCAAkD;AAElD;;;;GAIG;AACU,QAAA,wBAAwB,GAAG,CAAC,MAAc,EAAE,aAAuB,EAAU,EAAE;IACxF,OAAO,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC7C,CAAC,CAAC;AAEF;;;;;GAKG;AACU,QAAA,qBAAqB,GAAG,CAAC,MAAc,EAAE,aAAuB,EAAE,WAAqB,EAAU,EAAE;IAC5G,OAAO,MAAM,GAAG,aAAa,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC;AAC9D,CAAC,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,gBAAgB,GAAG,CAAC,SAAiB,EAAE,KAAa,EAAU,EAAE;IACzE,IAAI,kBAA0B,CAAC;IAC/B,MAAM,MAAM,GAAW,wBAAgB,CAAC;IACxC,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;QAC/C,kBAAkB,GAAG,KAAK,CAAC,KAA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AC,YAAY,CAAC,CAAC,WAAW,GAAG,WAAW,CAAC;QACrD,OAAO,kBAAkB,CAAC,WAAW,CAAC;KACzC;AACL,CAAC,CAAC;AAEW,QAAA,kCAAkC,GAAG,CAAC,MAAc,EAAE,UAAkB,EAAE,YAAoB,EAAQ,EAAE;IACjH,gCAAgC,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC;AACvE,CAAC,CAAC;AAEW,QAAA,kCAAkC,GAAG,CAAC,MAAc,EAAE,UAAkB,EAAE,YAAoB,EAAQ,EAAE;IACjH,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,YAAY,CAAC,CAAC;IAClD,gCAAgC,CAAC,MAAM,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,CAAC;AACtF,CAAC,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { EntitySet, EntityType } from '@sap-ux/annotation-converter';
|
|
2
2
|
import type { AnnotationTerm, ConverterOutput, LineItem } from '@sap-ux/vocabularies-types';
|
|
3
3
|
import type { Definition } from 'typescript-json-schema';
|
|
4
|
-
import type { FacetConfig, FacetSection } from '..';
|
|
4
|
+
import type { FacetConfig, FacetSection, SectionType } from '..';
|
|
5
5
|
import type { SectionTypeV2 } from '../../v2/types';
|
|
6
6
|
import type { PresentationVariantV4 } from '../../v4/types';
|
|
7
7
|
import { UIAnnotationTerms } from '@sap-ux/vocabularies-types';
|
|
@@ -107,9 +107,10 @@ export declare function getFacetKeyInSchema(facetKey: string): string;
|
|
|
107
107
|
* @param facetKey - key of the facet, as used in annotation
|
|
108
108
|
* @param {Definition} appSchema App schema in general
|
|
109
109
|
* @param {boolean} useDefinitionAsKey If set to false, facet key will solely be used as key, else encapsulated within definition key `definition<facetKey>`
|
|
110
|
+
* @param subDefinitionName - sub definition, if different from the definition (e.g. subsection vs. section)
|
|
110
111
|
* @returns {Definition} part of app schema that has been added and filled
|
|
111
112
|
*/
|
|
112
|
-
export declare function parseSchemaDefinition(definition: DefinitionName | SectionTypeV2, facetKey: string, appSchema: Definition, useDefinitionAsKey?: boolean): Definition;
|
|
113
|
+
export declare function parseSchemaDefinition(definition: DefinitionName | SectionTypeV2, facetKey: string, appSchema: Definition, useDefinitionAsKey?: boolean, subDefinitionName?: DefinitionName): Definition;
|
|
113
114
|
/**
|
|
114
115
|
* Creates a definition link for a facet and definition name
|
|
115
116
|
* @param definition name of definition, as used in schema
|
|
@@ -123,3 +124,12 @@ export declare function getFacetDefinitionLink(definition: DefinitionName | Sect
|
|
|
123
124
|
* @returns {string} annotationPath
|
|
124
125
|
*/
|
|
125
126
|
export declare function getFacetAnnotationPath(facet: FacetConfig | PresentationVariantV4 | object): string | undefined;
|
|
127
|
+
/**
|
|
128
|
+
* Adds definitions for Address and Contact items in object page sections to the app schema
|
|
129
|
+
* @param {FacetConfig} facet - current facet.
|
|
130
|
+
* @param {string} facetKey - facet key.
|
|
131
|
+
* @param {object} sections - schema of current sections definition.
|
|
132
|
+
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
133
|
+
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
134
|
+
*/
|
|
135
|
+
export declare function handleAddressContact(facet: FacetConfig, facetKey: string, sections: Definition, appSchema: Definition, sectionPrefix: SectionType, subSectionPrefix?: SectionType, versionPostfix?: string): void;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const __1 = require("..");
|
|
4
|
+
const __2 = require("..");
|
|
4
5
|
/**
|
|
5
6
|
* Adds an enum filled with existing UI annotations of the given list (validAnnotations)
|
|
6
7
|
* @param {EntityType} entityType
|
|
@@ -36,7 +37,7 @@ exports.addEnumForValidAnnotations = addEnumForValidAnnotations;
|
|
|
36
37
|
* @param definitionName - name of the definition in the app schema
|
|
37
38
|
*/
|
|
38
39
|
function addEnumForSingleTabVariant(entityType, appSchema, definitionName) {
|
|
39
|
-
const annoPath = appSchema.definitions[definitionName].properties[
|
|
40
|
+
const annoPath = appSchema.definitions[definitionName].properties[__2.SchemaTag.annotationPath];
|
|
40
41
|
const validAnnotations = ["com.sap.vocabularies.UI.v1.SelectionVariant" /* SelectionVariant */, "com.sap.vocabularies.UI.v1.SelectionPresentationVariant" /* SelectionPresentationVariant */];
|
|
41
42
|
addEnumForValidAnnotations(entityType, validAnnotations, annoPath);
|
|
42
43
|
}
|
|
@@ -90,7 +91,7 @@ function addDefinitionForRelatedFacetKeys(appSchema, sectionDefinitions, facetSe
|
|
|
90
91
|
if (oneOfSections.length) {
|
|
91
92
|
// Create new definition in schema as 'oneOf'.
|
|
92
93
|
// Simpler way would be to use 'enum', but then there no option to pass description.
|
|
93
|
-
appSchema.definitions[
|
|
94
|
+
appSchema.definitions[__2.DefinitionName.RelatedFacetKeys] = {
|
|
94
95
|
type: 'string',
|
|
95
96
|
oneOf: oneOfSections
|
|
96
97
|
};
|
|
@@ -101,7 +102,7 @@ function addDefinitionForRelatedFacetKeys(appSchema, sectionDefinitions, facetSe
|
|
|
101
102
|
definition.properties['relatedFacet'] = {
|
|
102
103
|
anyOf: [
|
|
103
104
|
{
|
|
104
|
-
$ref: `${
|
|
105
|
+
$ref: `${__2.DEFINITION_LINK_PREFIX}${__2.DefinitionName.RelatedFacetKeys}`
|
|
105
106
|
},
|
|
106
107
|
property
|
|
107
108
|
]
|
|
@@ -126,44 +127,44 @@ function addCommonLineItemDefinitions(appSchema, lineItemAnnotation, entityType,
|
|
|
126
127
|
description: 'Columns'
|
|
127
128
|
};
|
|
128
129
|
appSchema.definitions[lineItemId].additionalProperties = false;
|
|
129
|
-
appSchema.definitions[lineItemId][
|
|
130
|
+
appSchema.definitions[lineItemId][__2.SchemaTag.isViewNode] = true;
|
|
130
131
|
appSchema.definitions[lineItemId].additionalProperties = customColumnDefinitionName
|
|
131
|
-
? { $ref: `${
|
|
132
|
+
? { $ref: `${__2.DEFINITION_LINK_PREFIX}${customColumnDefinitionName}` }
|
|
132
133
|
: false;
|
|
133
134
|
// Copy toolbar
|
|
134
|
-
const toolBar = lineItemId.startsWith(
|
|
135
|
-
?
|
|
136
|
-
:
|
|
135
|
+
const toolBar = lineItemId.startsWith(__2.DefinitionName.LineItems)
|
|
136
|
+
? __2.DefinitionName.ToolBar
|
|
137
|
+
: __2.DefinitionName.ObjectPageToolBar;
|
|
137
138
|
const schemaIdForToolBar = `${toolBar}<${lineItemId}>`;
|
|
138
139
|
appSchema.definitions[schemaIdForToolBar] = JSON.parse(JSON.stringify(appSchema.definitions[`${toolBar}`]));
|
|
139
|
-
const schemaIdForActions = `${
|
|
140
|
+
const schemaIdForActions = `${__2.DefinitionName.Actions}<${__2.prepareRef(lineItemId)}>`;
|
|
140
141
|
appSchema.definitions[schemaIdForToolBar].properties.actions['$ref'] =
|
|
141
|
-
|
|
142
|
-
const actionId = lineItemId.startsWith(
|
|
143
|
-
?
|
|
144
|
-
:
|
|
142
|
+
__2.DEFINITION_LINK_PREFIX + schemaIdForActions;
|
|
143
|
+
const actionId = lineItemId.startsWith(__2.DefinitionName.LineItems)
|
|
144
|
+
? __2.DefinitionName.Actions
|
|
145
|
+
: __2.DefinitionName.ObjectPageToolBarActions;
|
|
145
146
|
const actions = (appSchema.definitions[schemaIdForActions] = JSON.parse(JSON.stringify(appSchema.definitions[actionId])));
|
|
146
147
|
actions.properties = {};
|
|
147
148
|
actions.additionalProperties = false;
|
|
148
149
|
// Copy LR footer
|
|
149
150
|
let footerActions, schemaIdForFooter;
|
|
150
|
-
if (lineItemId ===
|
|
151
|
-
schemaIdForFooter = `${
|
|
152
|
-
appSchema.properties['footer'].$ref = `${
|
|
153
|
-
appSchema.definitions[schemaIdForFooter] = JSON.parse(JSON.stringify(appSchema.definitions[
|
|
154
|
-
const schemaIdForFooterActions = `${
|
|
151
|
+
if (lineItemId === __2.DefinitionName.LineItems && appSchema.properties['footer']) {
|
|
152
|
+
schemaIdForFooter = `${__2.DefinitionName.Footer}<${lineItemId}>`;
|
|
153
|
+
appSchema.properties['footer'].$ref = `${__2.DEFINITION_LINK_PREFIX}${schemaIdForFooter}`;
|
|
154
|
+
appSchema.definitions[schemaIdForFooter] = JSON.parse(JSON.stringify(appSchema.definitions[__2.DefinitionName.GenericFooter]));
|
|
155
|
+
const schemaIdForFooterActions = `${__2.DefinitionName.FooterActions}<${__2.prepareRef(lineItemId)}>`;
|
|
155
156
|
appSchema.definitions[schemaIdForFooter].properties.actions['$ref'] =
|
|
156
|
-
|
|
157
|
-
footerActions = appSchema.definitions[schemaIdForFooterActions] = JSON.parse(JSON.stringify(appSchema.definitions[
|
|
157
|
+
__2.DEFINITION_LINK_PREFIX + schemaIdForFooterActions;
|
|
158
|
+
footerActions = appSchema.definitions[schemaIdForFooterActions] = JSON.parse(JSON.stringify(appSchema.definitions[__2.DefinitionName.Actions]));
|
|
158
159
|
footerActions.properties = {};
|
|
159
160
|
footerActions.additionalProperties = false;
|
|
160
161
|
}
|
|
161
162
|
//Determine annotation path
|
|
162
163
|
if (lineItemAnnotation) {
|
|
163
|
-
lineItemPath =
|
|
164
|
-
appSchema.definitions[lineItemId][
|
|
164
|
+
lineItemPath = __2.createAnnotationPath(entityType.fullyQualifiedName, lineItemAnnotation.term, lineItemAnnotation.qualifier);
|
|
165
|
+
appSchema.definitions[lineItemId][__2.SchemaTag.annotationPath] = appSchema.definitions[schemaIdForToolBar][__2.SchemaTag.annotationPath] = lineItemPath;
|
|
165
166
|
if (footerActions) {
|
|
166
|
-
appSchema.definitions[schemaIdForFooter][
|
|
167
|
+
appSchema.definitions[schemaIdForFooter][__2.SchemaTag.annotationPath] = lineItemPath;
|
|
167
168
|
}
|
|
168
169
|
}
|
|
169
170
|
return { actions, footerActions, lineItemPath };
|
|
@@ -177,28 +178,28 @@ exports.addCommonLineItemDefinitions = addCommonLineItemDefinitions;
|
|
|
177
178
|
*/
|
|
178
179
|
function addFieldsType(appSchema, entityType, floorplanSuffix = '') {
|
|
179
180
|
const propertyNameArray = [], propertyObject = {};
|
|
180
|
-
const fieldPathRef = `${
|
|
181
|
+
const fieldPathRef = `${__2.DefinitionName.FieldPath}${__2.prepareRef(floorplanSuffix)}`;
|
|
181
182
|
for (const key of entityType.entityProperties) {
|
|
182
183
|
const propertyName = key.name;
|
|
183
184
|
propertyNameArray.push(propertyName);
|
|
184
185
|
propertyObject[propertyName] = {
|
|
185
|
-
$ref: `${
|
|
186
|
+
$ref: `${__2.DEFINITION_LINK_PREFIX}${fieldPathRef}`
|
|
186
187
|
};
|
|
187
188
|
}
|
|
188
189
|
appSchema.definitions[entityType.name] = {
|
|
189
190
|
enum: propertyNameArray
|
|
190
191
|
};
|
|
191
192
|
appSchema.definitions[fieldPathRef].properties.path = {
|
|
192
|
-
$ref: `${
|
|
193
|
+
$ref: `${__2.DEFINITION_LINK_PREFIX}${entityType.name}`
|
|
193
194
|
};
|
|
194
|
-
const creationFieldsRef = `CreationFieldKeys${
|
|
195
|
+
const creationFieldsRef = `CreationFieldKeys${__2.prepareRef(floorplanSuffix)}`;
|
|
195
196
|
appSchema.definitions[creationFieldsRef] = {
|
|
196
197
|
type: 'object',
|
|
197
198
|
properties: propertyObject,
|
|
198
199
|
additionalProperties: false
|
|
199
200
|
};
|
|
200
|
-
const fields4Dialog = appSchema.definitions[`${
|
|
201
|
-
fields4Dialog.properties.fields.$ref = `${
|
|
201
|
+
const fields4Dialog = appSchema.definitions[`${__2.DefinitionName.Fields4Dialog}${floorplanSuffix}`];
|
|
202
|
+
fields4Dialog.properties.fields.$ref = `${__2.DEFINITION_LINK_PREFIX}${creationFieldsRef}`;
|
|
202
203
|
}
|
|
203
204
|
exports.addFieldsType = addFieldsType;
|
|
204
205
|
var DataType;
|
|
@@ -301,7 +302,7 @@ exports.determineDataType = determineDataType;
|
|
|
301
302
|
function addDataTypeToDefinition(definition, field) {
|
|
302
303
|
const dataType = determineDataType(field);
|
|
303
304
|
if (dataType) {
|
|
304
|
-
definition[
|
|
305
|
+
definition[__2.SchemaTag.dataType] = dataType;
|
|
305
306
|
}
|
|
306
307
|
}
|
|
307
308
|
exports.addDataTypeToDefinition = addDataTypeToDefinition;
|
|
@@ -329,13 +330,14 @@ function getFacetDefinitionKey(definition, facetKey) {
|
|
|
329
330
|
* @param facetKey - key of the facet, as used in annotation
|
|
330
331
|
* @param {Definition} appSchema App schema in general
|
|
331
332
|
* @param {boolean} useDefinitionAsKey If set to false, facet key will solely be used as key, else encapsulated within definition key `definition<facetKey>`
|
|
333
|
+
* @param subDefinitionName - sub definition, if different from the definition (e.g. subsection vs. section)
|
|
332
334
|
* @returns {Definition} part of app schema that has been added and filled
|
|
333
335
|
*/
|
|
334
|
-
function parseSchemaDefinition(definition, facetKey, appSchema, useDefinitionAsKey = true) {
|
|
336
|
+
function parseSchemaDefinition(definition, facetKey, appSchema, useDefinitionAsKey = true, subDefinitionName) {
|
|
335
337
|
const schemaDefinition = JSON.parse(JSON.stringify(appSchema.definitions[definition]));
|
|
336
338
|
let facetDefinitionKey = facetKey;
|
|
337
339
|
if (useDefinitionAsKey) {
|
|
338
|
-
facetDefinitionKey = getFacetDefinitionKey(definition, facetKey);
|
|
340
|
+
facetDefinitionKey = getFacetDefinitionKey(subDefinitionName ? subDefinitionName : definition, facetKey);
|
|
339
341
|
}
|
|
340
342
|
appSchema.definitions[facetDefinitionKey] = schemaDefinition;
|
|
341
343
|
return appSchema.definitions[facetDefinitionKey];
|
|
@@ -348,7 +350,7 @@ exports.parseSchemaDefinition = parseSchemaDefinition;
|
|
|
348
350
|
* @returns definition link of facet, as used in definition
|
|
349
351
|
*/
|
|
350
352
|
function getFacetDefinitionLink(definition, facetKey) {
|
|
351
|
-
return `${
|
|
353
|
+
return `${__2.DEFINITION_LINK_PREFIX}${getFacetDefinitionKey(definition, facetKey)}`;
|
|
352
354
|
}
|
|
353
355
|
exports.getFacetDefinitionLink = getFacetDefinitionLink;
|
|
354
356
|
/**
|
|
@@ -361,10 +363,30 @@ function getFacetAnnotationPath(facet) {
|
|
|
361
363
|
return facet.annotationPath;
|
|
362
364
|
}
|
|
363
365
|
else if (facet.fullyQualifiedName) {
|
|
364
|
-
const [namespace, target] = facet.fullyQualifiedName.split(`@${
|
|
365
|
-
return `/${namespace}/@${
|
|
366
|
+
const [namespace, target] = facet.fullyQualifiedName.split(`@${__2.UIVOCABULARY}`);
|
|
367
|
+
return `/${namespace}/@${__2.UIVOCABULARY}${target}`;
|
|
366
368
|
}
|
|
367
369
|
return undefined;
|
|
368
370
|
}
|
|
369
371
|
exports.getFacetAnnotationPath = getFacetAnnotationPath;
|
|
372
|
+
/**
|
|
373
|
+
* Adds definitions for Address and Contact items in object page sections to the app schema
|
|
374
|
+
* @param {FacetConfig} facet - current facet.
|
|
375
|
+
* @param {string} facetKey - facet key.
|
|
376
|
+
* @param {object} sections - schema of current sections definition.
|
|
377
|
+
* @param {object} appSchema - app specific schema that potentially gets enhanced.
|
|
378
|
+
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
379
|
+
*/
|
|
380
|
+
function handleAddressContact(facet, facetKey, sections, appSchema, sectionPrefix, subSectionPrefix, versionPostfix = '') {
|
|
381
|
+
const definitionName = `ObjectPage${sectionPrefix}${facet.base}${versionPostfix}`;
|
|
382
|
+
const subDefinitionName = `ObjectPage${subSectionPrefix}${facet.base}${versionPostfix}`;
|
|
383
|
+
sections.properties[facetKey] = {
|
|
384
|
+
$ref: getFacetDefinitionLink(subSectionPrefix ? subDefinitionName : definitionName, facetKey)
|
|
385
|
+
};
|
|
386
|
+
const definition = parseSchemaDefinition(subSectionPrefix ? subDefinitionName : definitionName, facetKey, appSchema, true, subSectionPrefix ? subDefinitionName : undefined);
|
|
387
|
+
__1.addSectionTitleAndDescription(facet, definition, facetKey);
|
|
388
|
+
definition[__2.SchemaTag.annotationPath] = facet.annotationPath;
|
|
389
|
+
definition[__2.SchemaTag.isViewNode] = true;
|
|
390
|
+
}
|
|
391
|
+
exports.handleAddressContact = handleAddressContact;
|
|
370
392
|
//# sourceMappingURL=utils.js.map
|