@sap/ux-specification 1.71.37 → 1.71.41
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 +101 -3
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/AnalyticalListPageConfig.json +394 -44
- package/dist/schemas/v2/ListReportConfig.json +257 -78
- package/dist/schemas/v2/ObjectPageConfig.json +220 -66
- package/dist/schemas/v2/OverviewPageConfig.json +80 -38
- package/dist/scripts/extractDocu.d.ts +1 -0
- package/dist/scripts/extractDocu.js +311 -0
- package/dist/scripts/extractDocu.js.map +1 -0
- package/dist/scripts/spec.d.ts +1 -0
- package/dist/scripts/spec.js +114 -0
- package/dist/scripts/spec.js.map +1 -0
- package/dist/scripts/to-json-schema.d.ts +10 -0
- package/dist/scripts/to-json-schema.js +109 -0
- package/dist/scripts/to-json-schema.js.map +1 -0
- package/dist/specification/v2/index-min.js +1 -1
- package/dist/src/api.js +2 -1
- package/dist/src/api.js.map +1 -1
- package/dist/src/apiTypes.d.ts +2 -1
- package/dist/src/extensionLogger.js +6 -0
- package/dist/src/extensionLogger.js.map +1 -1
- package/dist/src/specification/common/types.d.ts +4 -0
- package/dist/src/specification/common/types.js +5 -0
- package/dist/src/specification/common/types.js.map +1 -1
- package/dist/src/specification/common/webapp/manifest/Manifest.d.ts +7 -0
- package/dist/src/specification/common/webapp/manifest/Manifest.js +8 -0
- package/dist/src/specification/common/webapp/manifest/Manifest.js.map +1 -1
- package/dist/src/specification/v2/controls/Card.d.ts +4 -0
- package/dist/src/specification/v2/controls/Card.js.map +1 -1
- package/dist/src/specification/v2/controls/FilterBar.d.ts +15 -0
- package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +9 -0
- package/dist/src/specification/v2/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/specification/v2/controls/ObjectPageToolBar.d.ts +19 -0
- package/dist/src/specification/v2/controls/ObjectPageToolBar.js +3 -0
- package/dist/src/specification/v2/controls/ObjectPageToolBar.js.map +1 -0
- package/dist/src/specification/v2/controls/Table.d.ts +54 -5
- package/dist/src/specification/v2/controls/Table.js.map +1 -1
- package/dist/src/specification/v2/controls/ToolBar.d.ts +19 -0
- package/dist/src/specification/v2/controls/ToolBar.js +3 -0
- package/dist/src/specification/v2/controls/ToolBar.js.map +1 -0
- package/dist/src/specification/v2/controls/index.d.ts +2 -0
- package/dist/src/specification/v2/controls/index.js.map +1 -1
- package/dist/src/specification/v2/pages/AnalyticalListPageConfig.d.ts +2 -2
- package/dist/src/specification/v2/webapp/manifest/sapUi5.d.ts +2 -1
- package/dist/src/specification/v2/webapp/manifest/sapUi5.js +1 -0
- package/dist/src/specification/v2/webapp/manifest/sapUi5.js.map +1 -1
- package/dist/src/sync/common/appProvider.d.ts +3 -1
- package/dist/src/sync/common/appProvider.js +2 -1
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/decoration/control.js +7 -4
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/flexUtils.d.ts +3 -2
- package/dist/src/sync/common/flexUtils.js +4 -1
- package/dist/src/sync/common/flexUtils.js.map +1 -1
- package/dist/src/sync/common/i18n.json +3 -1
- package/dist/src/sync/common/importProject.js +9 -7
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +20 -4
- package/dist/src/sync/common/types.js +20 -4
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +64 -20
- package/dist/src/sync/common/utils.js +216 -90
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/application.js +7 -6
- package/dist/src/sync/v2/application.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.d.ts +1 -0
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +5 -5
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Card.d.ts +1 -0
- package/dist/src/sync/v2/export/controls/Card.js +7 -0
- package/dist/src/sync/v2/export/controls/Card.js.map +1 -1
- package/dist/src/sync/v2/export/controls/FilterBar.d.ts +3 -0
- package/dist/src/sync/v2/export/controls/FilterBar.js +36 -0
- package/dist/src/sync/v2/export/controls/FilterBar.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js +2 -1
- package/dist/src/sync/v2/export/controls/ObjectPageCustomSection.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +1 -0
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js +12 -0
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts +11 -2
- package/dist/src/sync/v2/export/controls/Table.js +39 -6
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/export.d.ts +2 -2
- package/dist/src/sync/v2/export/export.js +15 -13
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/pages/AnalyticalListPage.js +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts +3 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +59 -16
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/generate.d.ts +5 -2
- package/dist/src/sync/v2/generate/generate.js +8 -5
- package/dist/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts +6 -2
- package/dist/src/sync/v2/generate/listReport.js +60 -23
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +74 -52
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +19 -2
- package/dist/src/sync/v2/generate/utils.js +134 -55
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.d.ts +3 -2
- package/dist/src/sync/v2/import/app/appProvider.js +10 -9
- package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js +6 -6
- package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.d.ts +1 -0
- package/dist/src/sync/v2/import/common/index.js +11 -7
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/pages/analyticalListPage.d.ts +10 -0
- package/dist/src/sync/v2/import/pages/analyticalListPage.js +24 -13
- package/dist/src/sync/v2/import/pages/analyticalListPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/listReport.d.ts +10 -0
- package/dist/src/sync/v2/import/pages/listReport.js +24 -14
- package/dist/src/sync/v2/import/pages/listReport.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +15 -13
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v2/import/pages/overviewPage.js +5 -3
- package/dist/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/src/sync/v2/import/utils.d.ts +0 -12
- package/dist/src/sync/v2/import/utils.js +0 -35
- package/dist/src/sync/v2/import/utils.js.map +1 -1
- package/dist/test/test-utils/utils.d.ts +0 -1
- package/package.json +8 -8
|
@@ -3,59 +3,73 @@
|
|
|
3
3
|
"properties": {
|
|
4
4
|
"globalFilterModel": {
|
|
5
5
|
"description": "globalFilterModel defines the OData model that contains entity definitions relevant for global filters.",
|
|
6
|
-
"type": "string"
|
|
6
|
+
"type": "string",
|
|
7
|
+
"artifactType": "Manifest"
|
|
7
8
|
},
|
|
8
9
|
"globalFilterEntityType": {
|
|
9
10
|
"description": "globalFilterEntityType defines the entity type to use as a global filter in the smart filter bar control.",
|
|
10
|
-
"type": "string"
|
|
11
|
+
"type": "string",
|
|
12
|
+
"artifactType": "Manifest"
|
|
11
13
|
},
|
|
12
14
|
"globalFilterEntitySet": {
|
|
13
15
|
"description": "globalFilterEntitySet defines the entity set to use as global filter in the smart filter bar control.",
|
|
14
|
-
"type": "string"
|
|
16
|
+
"type": "string",
|
|
17
|
+
"artifactType": "Manifest"
|
|
15
18
|
},
|
|
16
19
|
"containerLayout": {
|
|
17
20
|
"$ref": "#/definitions/ContainerLayoutType",
|
|
18
|
-
"description": "containerLayout represents the layout of the card container, as fixed or resizable. The default value is fixed."
|
|
21
|
+
"description": "containerLayout represents the layout of the card container, as fixed or resizable. The default value is fixed.",
|
|
22
|
+
"artifactType": "Manifest"
|
|
19
23
|
},
|
|
20
24
|
"smartVariantRequired": {
|
|
21
25
|
"description": "Set smartVariantRequired to false to deactivate smart variant management in the global filters. The default value is true.",
|
|
22
|
-
"type": "boolean"
|
|
26
|
+
"type": "boolean",
|
|
27
|
+
"artifactType": "Manifest"
|
|
23
28
|
},
|
|
24
29
|
"showDateInRelativeFormat": {
|
|
25
30
|
"description": "Set showDateInRelativeFormat to true to enable relative or normal date formatting in OVP applications.",
|
|
26
|
-
"type": "boolean"
|
|
31
|
+
"type": "boolean",
|
|
32
|
+
"artifactType": "Manifest"
|
|
27
33
|
},
|
|
28
34
|
"enableLiveFilter": {
|
|
29
35
|
"description": "Set enableLiveFilter to true to activate a live update in the global filter. The default requires the user to click the Go button..",
|
|
30
|
-
"type": "boolean"
|
|
36
|
+
"type": "boolean",
|
|
37
|
+
"artifactType": "Manifest"
|
|
31
38
|
},
|
|
32
39
|
"imageSupported": {
|
|
33
40
|
"description": "imageSupported allows the condensed list card to show images or icons.",
|
|
34
|
-
"type": "boolean"
|
|
41
|
+
"type": "boolean",
|
|
42
|
+
"artifactType": "Manifest"
|
|
35
43
|
},
|
|
36
44
|
"considerAnalyticalParameters": {
|
|
37
45
|
"description": "considerAnalyticalParameters enables analytical parameter support for the smart filter bar.",
|
|
38
|
-
"type": "boolean"
|
|
46
|
+
"type": "boolean",
|
|
47
|
+
"artifactType": "Manifest"
|
|
39
48
|
},
|
|
40
49
|
"refreshIntervalInMinutes": {
|
|
41
50
|
"description": "refreshIntervalInMinutes represents the time interval in minutes to auto refresh the card models.",
|
|
42
|
-
"type": "number"
|
|
51
|
+
"type": "number",
|
|
52
|
+
"artifactType": "Manifest"
|
|
43
53
|
},
|
|
44
54
|
"useDateRangeType": {
|
|
45
55
|
"description": "Set useDateRangeType to true to enable semantic date range control for the smart filter bar.",
|
|
46
|
-
"type": "boolean"
|
|
56
|
+
"type": "boolean",
|
|
57
|
+
"artifactType": "Manifest"
|
|
47
58
|
},
|
|
48
59
|
"showBasicSearch": {
|
|
49
60
|
"description": "Determines if the basic search shall be part of the global filters.",
|
|
50
|
-
"type": "boolean"
|
|
61
|
+
"type": "boolean",
|
|
62
|
+
"artifactType": "Manifest"
|
|
51
63
|
},
|
|
52
64
|
"disableErrorPage": {
|
|
53
65
|
"description": "Disables the error page of OVP. Error page in OVP appears only when all cards have failed.",
|
|
54
|
-
"type": "boolean"
|
|
66
|
+
"type": "boolean",
|
|
67
|
+
"artifactType": "Manifest"
|
|
55
68
|
},
|
|
56
69
|
"bHeaderExpanded": {
|
|
57
70
|
"description": "Shows smart filter bar in expanded mode.",
|
|
58
|
-
"type": "boolean"
|
|
71
|
+
"type": "boolean",
|
|
72
|
+
"artifactType": "Manifest"
|
|
59
73
|
},
|
|
60
74
|
"cards": {
|
|
61
75
|
"description": "Cards",
|
|
@@ -104,16 +118,19 @@
|
|
|
104
118
|
"properties": {
|
|
105
119
|
"model": {
|
|
106
120
|
"description": "Represents the model for the card",
|
|
107
|
-
"type": "string"
|
|
121
|
+
"type": "string",
|
|
122
|
+
"artifactType": "Manifest"
|
|
108
123
|
},
|
|
109
124
|
"template": {
|
|
110
125
|
"description": "Represents the card component path to use for this card.",
|
|
111
126
|
"pattern": "^(?!(sap.ovp.cards.charts.analytical|sap.ovp.cards.linklist|sap.ovp.cards.list|sap.ovp.cards.stack|sap.ovp.cards.table)$).*$",
|
|
112
|
-
"type": "string"
|
|
127
|
+
"type": "string",
|
|
128
|
+
"artifactType": "Manifest"
|
|
113
129
|
},
|
|
114
130
|
"settings": {
|
|
115
131
|
"$ref": "#/definitions/CustomCardSettings",
|
|
116
|
-
"description": "Represents the properties that are passed to the custom card."
|
|
132
|
+
"description": "Represents the properties that are passed to the custom card.",
|
|
133
|
+
"artifactType": "Manifest"
|
|
117
134
|
}
|
|
118
135
|
},
|
|
119
136
|
"additionalProperties": false,
|
|
@@ -396,18 +413,21 @@
|
|
|
396
413
|
"properties": {
|
|
397
414
|
"model": {
|
|
398
415
|
"description": "Represents the model for the List Card",
|
|
399
|
-
"type": "string"
|
|
416
|
+
"type": "string",
|
|
417
|
+
"artifactType": "Manifest"
|
|
400
418
|
},
|
|
401
419
|
"template": {
|
|
402
420
|
"description": "Represents the card component path to use for this List Card.",
|
|
403
421
|
"type": "string",
|
|
404
422
|
"enum": [
|
|
405
423
|
"sap.ovp.cards.list"
|
|
406
|
-
]
|
|
424
|
+
],
|
|
425
|
+
"artifactType": "Manifest"
|
|
407
426
|
},
|
|
408
427
|
"listCardSettings": {
|
|
409
428
|
"$ref": "#/definitions/ListCardSettings",
|
|
410
|
-
"description": "Represents the properties that are passed to the list card."
|
|
429
|
+
"description": "Represents the properties that are passed to the list card.",
|
|
430
|
+
"artifactType": "Manifest"
|
|
411
431
|
},
|
|
412
432
|
"tabs": {
|
|
413
433
|
"description": "Represents the List Card with view switch control.",
|
|
@@ -420,7 +440,8 @@
|
|
|
420
440
|
"minItems": 1,
|
|
421
441
|
"additionalItems": {
|
|
422
442
|
"$ref": "#/definitions/TabSetting"
|
|
423
|
-
}
|
|
443
|
+
},
|
|
444
|
+
"artifactType": "Manifest"
|
|
424
445
|
}
|
|
425
446
|
},
|
|
426
447
|
"additionalProperties": false,
|
|
@@ -479,6 +500,10 @@
|
|
|
479
500
|
"$ref": "#/definitions/TabSetting"
|
|
480
501
|
}
|
|
481
502
|
},
|
|
503
|
+
"dataPointAnnotationPath": {
|
|
504
|
+
"description": "Represents the data point annotation path.",
|
|
505
|
+
"type": "string"
|
|
506
|
+
},
|
|
482
507
|
"title": {
|
|
483
508
|
"description": "The language-dependent title of the card, used in the card header.",
|
|
484
509
|
"i18nClassification": "TIT: Title of the card, used in the card header",
|
|
@@ -651,18 +676,21 @@
|
|
|
651
676
|
"properties": {
|
|
652
677
|
"model": {
|
|
653
678
|
"description": "Represents the model for the StackCard.",
|
|
654
|
-
"type": "string"
|
|
679
|
+
"type": "string",
|
|
680
|
+
"artifactType": "Manifest"
|
|
655
681
|
},
|
|
656
682
|
"template": {
|
|
657
683
|
"description": "Represents the Stack Card component path to use for this card.",
|
|
658
684
|
"type": "string",
|
|
659
685
|
"enum": [
|
|
660
686
|
"sap.ovp.cards.stack"
|
|
661
|
-
]
|
|
687
|
+
],
|
|
688
|
+
"artifactType": "Manifest"
|
|
662
689
|
},
|
|
663
690
|
"stackCardSettings": {
|
|
664
691
|
"$ref": "#/definitions/StackCardSettings",
|
|
665
|
-
"description": "Represents the properties that are passed to the stack card."
|
|
692
|
+
"description": "Represents the properties that are passed to the stack card.",
|
|
693
|
+
"artifactType": "Manifest"
|
|
666
694
|
},
|
|
667
695
|
"tabs": {
|
|
668
696
|
"description": "Represents the Stack Card with view switch control.",
|
|
@@ -675,7 +703,8 @@
|
|
|
675
703
|
"minItems": 1,
|
|
676
704
|
"additionalItems": {
|
|
677
705
|
"$ref": "#/definitions/TabSetting"
|
|
678
|
-
}
|
|
706
|
+
},
|
|
707
|
+
"artifactType": "Manifest"
|
|
679
708
|
}
|
|
680
709
|
},
|
|
681
710
|
"additionalProperties": false,
|
|
@@ -802,18 +831,21 @@
|
|
|
802
831
|
"properties": {
|
|
803
832
|
"model": {
|
|
804
833
|
"description": "Represents the model for the Link list Card.",
|
|
805
|
-
"type": "string"
|
|
834
|
+
"type": "string",
|
|
835
|
+
"artifactType": "Manifest"
|
|
806
836
|
},
|
|
807
837
|
"template": {
|
|
808
838
|
"description": "Represents the Link list Card component path to use for this card.",
|
|
809
839
|
"type": "string",
|
|
810
840
|
"enum": [
|
|
811
841
|
"sap.ovp.cards.linklist"
|
|
812
|
-
]
|
|
842
|
+
],
|
|
843
|
+
"artifactType": "Manifest"
|
|
813
844
|
},
|
|
814
845
|
"linkListCardSettings": {
|
|
815
846
|
"$ref": "#/definitions/LinkListCardSettings",
|
|
816
|
-
"description": "Represents the properties that are passed to the link list card."
|
|
847
|
+
"description": "Represents the properties that are passed to the link list card.",
|
|
848
|
+
"artifactType": "Manifest"
|
|
817
849
|
},
|
|
818
850
|
"tabs": {
|
|
819
851
|
"description": "Represents the card with view switch control.",
|
|
@@ -826,7 +858,8 @@
|
|
|
826
858
|
"minItems": 1,
|
|
827
859
|
"additionalItems": {
|
|
828
860
|
"$ref": "#/definitions/TabSetting"
|
|
829
|
-
}
|
|
861
|
+
},
|
|
862
|
+
"artifactType": "Manifest"
|
|
830
863
|
}
|
|
831
864
|
},
|
|
832
865
|
"additionalProperties": false,
|
|
@@ -990,18 +1023,21 @@
|
|
|
990
1023
|
"properties": {
|
|
991
1024
|
"model": {
|
|
992
1025
|
"description": "Represents the model for the TableCard.",
|
|
993
|
-
"type": "string"
|
|
1026
|
+
"type": "string",
|
|
1027
|
+
"artifactType": "Manifest"
|
|
994
1028
|
},
|
|
995
1029
|
"template": {
|
|
996
1030
|
"description": "Represents the Table Card component path to use for this card.",
|
|
997
1031
|
"type": "string",
|
|
998
1032
|
"enum": [
|
|
999
1033
|
"sap.ovp.cards.table"
|
|
1000
|
-
]
|
|
1034
|
+
],
|
|
1035
|
+
"artifactType": "Manifest"
|
|
1001
1036
|
},
|
|
1002
1037
|
"tableCardSettings": {
|
|
1003
1038
|
"$ref": "#/definitions/TableCardSettings",
|
|
1004
|
-
"description": "Represents the properties that are passed to the table card."
|
|
1039
|
+
"description": "Represents the properties that are passed to the table card.",
|
|
1040
|
+
"artifactType": "Manifest"
|
|
1005
1041
|
},
|
|
1006
1042
|
"tabs": {
|
|
1007
1043
|
"description": "Represents the card with view switch control.",
|
|
@@ -1014,11 +1050,13 @@
|
|
|
1014
1050
|
"minItems": 1,
|
|
1015
1051
|
"additionalItems": {
|
|
1016
1052
|
"$ref": "#/definitions/TabSetting"
|
|
1017
|
-
}
|
|
1053
|
+
},
|
|
1054
|
+
"artifactType": "Manifest"
|
|
1018
1055
|
},
|
|
1019
1056
|
"disableTableCardFlexibility": {
|
|
1020
1057
|
"description": "If you set disableTableCardFlexibility to true, then at runtime, DataField records are sorted according to the importance set in the com.sap.vocabularies.UI.v1.ImportanceType annotation, and their order of entry.\nIf you set disableTableCardFlexibility to false, then at runtime, table columns are sorted according to the importance set in the com.sap.vocabularies.UI.v1.ImportanceType annotation, and their order of entry.",
|
|
1021
|
-
"type": "boolean"
|
|
1058
|
+
"type": "boolean",
|
|
1059
|
+
"artifactType": "Manifest"
|
|
1022
1060
|
}
|
|
1023
1061
|
},
|
|
1024
1062
|
"additionalProperties": false,
|
|
@@ -1167,18 +1205,21 @@
|
|
|
1167
1205
|
"properties": {
|
|
1168
1206
|
"model": {
|
|
1169
1207
|
"description": "Represents the model for the Analytical Card",
|
|
1170
|
-
"type": "string"
|
|
1208
|
+
"type": "string",
|
|
1209
|
+
"artifactType": "Manifest"
|
|
1171
1210
|
},
|
|
1172
1211
|
"template": {
|
|
1173
1212
|
"description": "Represents the Analytical Card component path to use for this card.",
|
|
1174
1213
|
"type": "string",
|
|
1175
1214
|
"enum": [
|
|
1176
1215
|
"sap.ovp.cards.charts.analytical"
|
|
1177
|
-
]
|
|
1216
|
+
],
|
|
1217
|
+
"artifactType": "Manifest"
|
|
1178
1218
|
},
|
|
1179
1219
|
"analyticalCardSettings": {
|
|
1180
1220
|
"$ref": "#/definitions/AnalyticalCardSettings",
|
|
1181
|
-
"description": "Represents the properties that are passed to the analytical card."
|
|
1221
|
+
"description": "Represents the properties that are passed to the analytical card.",
|
|
1222
|
+
"artifactType": "Manifest"
|
|
1182
1223
|
},
|
|
1183
1224
|
"tabs": {
|
|
1184
1225
|
"description": "Represents the Analytical Card with view switch control.",
|
|
@@ -1191,7 +1232,8 @@
|
|
|
1191
1232
|
"minItems": 1,
|
|
1192
1233
|
"additionalItems": {
|
|
1193
1234
|
"$ref": "#/definitions/TabSetting"
|
|
1194
|
-
}
|
|
1235
|
+
},
|
|
1236
|
+
"artifactType": "Manifest"
|
|
1195
1237
|
}
|
|
1196
1238
|
},
|
|
1197
1239
|
"additionalProperties": false,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,311 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
3
|
+
if (mod && mod.__esModule) return mod;
|
|
4
|
+
var result = {};
|
|
5
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
6
|
+
result["default"] = mod;
|
|
7
|
+
return result;
|
|
8
|
+
};
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
/**
|
|
11
|
+
* This script extracts all existing documentation (i.e. descriptions) from the generic schemas of a certain OData version (V2 or V4).
|
|
12
|
+
* All descriptions are collected in an Excel sheet that you afterwards can find under dist/documentation: it is named Specificationv2.xslx or Specificationv4.xslx, depending on the chosen version.
|
|
13
|
+
* You can find one worksheet for each generic schema file.
|
|
14
|
+
*
|
|
15
|
+
* The script expects that you supply an argument --version with either v2 or v4.
|
|
16
|
+
* You can also start it from one of the debugger scripts named in launch.json: "Extract V2 documentation" or "Extract V4 documentation".
|
|
17
|
+
*/
|
|
18
|
+
const page_1 = require("../src/specification/common/page");
|
|
19
|
+
const path_1 = require("path");
|
|
20
|
+
const fs = __importStar(require("fs"));
|
|
21
|
+
const excel = __importStar(require("excel4node"));
|
|
22
|
+
/**
|
|
23
|
+
* Handles reference ($ref) within the schema, finds the corresponding definition
|
|
24
|
+
* @param schema - Object representing the whole generic schema
|
|
25
|
+
* @param reference - Content for the $ref property
|
|
26
|
+
* @param output - Array of descriptions with assigned hierarchy elements, all separated by ';' (csv like)
|
|
27
|
+
* @param definition - The current hierarchy element (list of path parts separated by ';')
|
|
28
|
+
*/
|
|
29
|
+
function dereference(schema, reference, output, definition, description) {
|
|
30
|
+
const currentDefinition = reference.split('#/definitions/')[1];
|
|
31
|
+
try {
|
|
32
|
+
parseSchema(schema, schema['definitions'][currentDefinition], output, definition, description);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
console.log(error);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Handles one property of a sub-schema
|
|
40
|
+
* @param schema - Object representing the whole generic schema
|
|
41
|
+
* @param subSchema - Object representing the current sub-structure of the schema
|
|
42
|
+
* @param property - Name of the property ithin the subSchema
|
|
43
|
+
* @param output - Array of descriptions with assigned hierarchy elements, all separated by ';' (csv like)
|
|
44
|
+
* @param definition - The current hierarchy element (list of path parts separated by ';')
|
|
45
|
+
*/
|
|
46
|
+
function processElement(schema, subSchema, property, output, definition) {
|
|
47
|
+
if (['$schema', 'id', 'pages', 'home', 'custom', '1', '2', '3', '4', '5', '6', '7', '8', '9'].includes(property)) {
|
|
48
|
+
return;
|
|
49
|
+
}
|
|
50
|
+
const element = subSchema[property];
|
|
51
|
+
definition = definition ? definition + ';' + property : property;
|
|
52
|
+
if (property === 'columns') {
|
|
53
|
+
definition = definition + ';columnId';
|
|
54
|
+
}
|
|
55
|
+
if (property === 'sections') {
|
|
56
|
+
definition = definition + ';sectionId';
|
|
57
|
+
}
|
|
58
|
+
if (property === 'cards') {
|
|
59
|
+
definition = definition + ';cardKey';
|
|
60
|
+
}
|
|
61
|
+
if (element['description'] !== undefined) {
|
|
62
|
+
if (element['$ref'] !== undefined) {
|
|
63
|
+
dereference(schema, element['$ref'], output, definition, element['description']);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
else if (element['anyOf'] !== undefined) {
|
|
67
|
+
handleAnyOf(schema, element['anyOf'], output, definition, element['description']);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
if (element['type'] !== undefined && element['items']) {
|
|
71
|
+
const reference = element['items']['$ref'] || (element['items'][0] && element['items'][0]['$ref']);
|
|
72
|
+
if (reference) {
|
|
73
|
+
dereference(schema, reference, output, definition, element['description']);
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
output.push(definition + ';' + `TYPE_${element['type']}` + ';' + element['description']);
|
|
77
|
+
}
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
80
|
+
if (element['type'] !== undefined) {
|
|
81
|
+
output.push(definition + ';' + `TYPE_${element['type']}` + ';' + element['description']);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
// Temporary as Description is not maintained for some properties - description should be added
|
|
85
|
+
if (!element['description'] && element['type'] !== undefined) {
|
|
86
|
+
output.push(definition + ';' + `TYPE_${element['type']}`);
|
|
87
|
+
}
|
|
88
|
+
if (element['$ref'] !== undefined) {
|
|
89
|
+
dereference(schema, element['$ref'], output, definition);
|
|
90
|
+
}
|
|
91
|
+
else {
|
|
92
|
+
parseSchema(schema, element, output, definition);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Special handing of anyOf elements of a JSON schema
|
|
97
|
+
* @param schema - Object representing the whole generic schema
|
|
98
|
+
* @param anyOfSchema - Object representing the current sub-structure of the schema
|
|
99
|
+
* @param output - Array of descriptions with assigned hierarchy elements, all separated by ';' (csv like)
|
|
100
|
+
* @param definition - The current hierarchy element (list of path parts separated by ';')
|
|
101
|
+
*/
|
|
102
|
+
function handleAnyOf(schema, anyOfSchema, output, definition, description) {
|
|
103
|
+
for (let index = 0; index < anyOfSchema.length; index++) {
|
|
104
|
+
const element = anyOfSchema[index];
|
|
105
|
+
if (Object.keys(element)[0] === '$ref') {
|
|
106
|
+
dereference(schema, element['$ref'], output, definition);
|
|
107
|
+
}
|
|
108
|
+
else {
|
|
109
|
+
parseSchema(schema, element, output, definition, description);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Parses a sub-structure of the schema
|
|
115
|
+
* @param schema - Object representing the whole generic schema
|
|
116
|
+
* @param subSchema - Object representing the current sub-structure of the schema
|
|
117
|
+
* @param output - Array of descriptions with assigned hierarchy elements, all separated by ';' (csv like)
|
|
118
|
+
* @param definition - The current hierarchy element (list of path parts separated by ';')
|
|
119
|
+
*/
|
|
120
|
+
function parseSchema(schema, subSchema, output, definition, description) {
|
|
121
|
+
if (Object.keys(subSchema) && Object.keys(subSchema)[0] === 'anyOf') {
|
|
122
|
+
handleAnyOf(schema, subSchema['anyOf'], output, definition);
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
for (const property in subSchema['properties']) {
|
|
126
|
+
if (property === '$ref') {
|
|
127
|
+
dereference(schema, subSchema['properties']['$ref'], output, definition);
|
|
128
|
+
}
|
|
129
|
+
else if (property === 'anyOf') {
|
|
130
|
+
handleAnyOf(schema, subSchema['properties']['anyOf'], output, definition);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
processElement(schema, subSchema['properties'], property, output, definition);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
for (const property in subSchema['patternProperties']) {
|
|
137
|
+
if (property === '$ref') {
|
|
138
|
+
dereference(schema, subSchema['patternProperties']['$ref'], output, definition);
|
|
139
|
+
}
|
|
140
|
+
else if (property === 'anyOf') {
|
|
141
|
+
handleAnyOf(schema, subSchema['patternProperties']['anyOf'], output, definition);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
processElement(schema, subSchema['patternProperties'], property, output, definition);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
for (const property in subSchema['additionalProperties']) {
|
|
148
|
+
if (property === '$ref') {
|
|
149
|
+
dereference(schema, subSchema['additionalProperties']['$ref'], output, definition);
|
|
150
|
+
}
|
|
151
|
+
else if (property === 'anyOf') {
|
|
152
|
+
handleAnyOf(schema, subSchema['additionalProperties']['anyOf'], output, definition);
|
|
153
|
+
}
|
|
154
|
+
else {
|
|
155
|
+
processElement(schema, subSchema['additionalProperties'], property, output, definition);
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
if (subSchema['enum'] && description) {
|
|
159
|
+
output.push(definition + ';' + `TYPE_${[subSchema['enum'].join('|')]}` + ';' + description);
|
|
160
|
+
}
|
|
161
|
+
else if (subSchema['type'] && description) {
|
|
162
|
+
output.push(definition + ';' + `TYPE_${subSchema['type']}` + ';' + description);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* Fills an excel4node workbook based on csv like information
|
|
167
|
+
* @param workbook - Excel workbook (excel4node format)
|
|
168
|
+
* @param output - Array of descriptions with assigned hierarchy elements, all separated by ';' (csv like)
|
|
169
|
+
* @param file - file name of the original schema
|
|
170
|
+
*/
|
|
171
|
+
function writeToExcel(workbook, output, file) {
|
|
172
|
+
//filter output to remove duplicated lines due to different table types (anyOf)
|
|
173
|
+
output = output.filter((e, i, a) => a.indexOf(e) === i);
|
|
174
|
+
const sheetName = file.split('.')[0];
|
|
175
|
+
const worksheet = workbook.addWorksheet(sheetName);
|
|
176
|
+
worksheet.headerFooter = { evenHeader: output[0] };
|
|
177
|
+
// Create a reusable style
|
|
178
|
+
const style = workbook.createStyle({
|
|
179
|
+
font: {
|
|
180
|
+
//color: '#800000',
|
|
181
|
+
size: 12
|
|
182
|
+
},
|
|
183
|
+
numberFormat: '$#,##0.00; ($#,##0.00); -'
|
|
184
|
+
});
|
|
185
|
+
for (let rowIndex = 1; rowIndex < output.length; rowIndex++) {
|
|
186
|
+
const element = output[rowIndex];
|
|
187
|
+
const cellArray = element.split(';');
|
|
188
|
+
for (let cellIndex = 0; cellIndex < cellArray.length; cellIndex++) {
|
|
189
|
+
const cell = cellArray[cellIndex];
|
|
190
|
+
worksheet
|
|
191
|
+
.cell(rowIndex, cellIndex + 1)
|
|
192
|
+
.string(cell)
|
|
193
|
+
.style(style);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
function generateIxiaSoftFormat(output, file, version) {
|
|
198
|
+
//filter output to remove duplicated lines due to different table types (anyOf)
|
|
199
|
+
output = output.filter((e, i, a) => a.indexOf(e) === i);
|
|
200
|
+
let iXiaFormat = `<simpletable frame="all" relcolwidth="1* 1*" id="simpletable_uqj_klr_jlb">
|
|
201
|
+
<sthead>
|
|
202
|
+
<stentry> Settings </stentry>
|
|
203
|
+
<stentry> Description </stentry>
|
|
204
|
+
</sthead>
|
|
205
|
+
`;
|
|
206
|
+
const fileName = file.split('.')[0];
|
|
207
|
+
for (let rowIndex = 1; rowIndex < output.length; rowIndex++) {
|
|
208
|
+
const element = output[rowIndex];
|
|
209
|
+
const cellArray = element.split(';');
|
|
210
|
+
let setting = '{';
|
|
211
|
+
iXiaFormat = iXiaFormat + `\t<strow>\n`;
|
|
212
|
+
for (let cellIndex = 0; cellIndex < cellArray.length - 1; cellIndex++) {
|
|
213
|
+
let cell = cellArray[cellIndex];
|
|
214
|
+
if (['0', '1'].includes(cell)) {
|
|
215
|
+
cell = 'variantKey' + cell;
|
|
216
|
+
}
|
|
217
|
+
if (cellArray[cellIndex + 1].includes('TYPE')) {
|
|
218
|
+
setting = setting + `"${cell}": ${cellArray[cellIndex + 1].split('_')[1]}`;
|
|
219
|
+
let noOfOpeningBraces = setting.match(/{/g).length;
|
|
220
|
+
while (noOfOpeningBraces > 0) {
|
|
221
|
+
setting = setting + '}';
|
|
222
|
+
noOfOpeningBraces--;
|
|
223
|
+
}
|
|
224
|
+
iXiaFormat = iXiaFormat + `\t\t<stentry> ${setting} </stentry>\n`;
|
|
225
|
+
}
|
|
226
|
+
else {
|
|
227
|
+
setting = setting + `"${cell}": {`;
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
// add description to the table
|
|
231
|
+
iXiaFormat = iXiaFormat + `\t\t<stentry> ${cellArray[cellArray.length - 1]} </stentry>\n\t</strow>\n`;
|
|
232
|
+
}
|
|
233
|
+
iXiaFormat = iXiaFormat + `</simpletable>`;
|
|
234
|
+
const outDir = path_1.join('dist', 'documentation');
|
|
235
|
+
if (!fs.existsSync(outDir)) {
|
|
236
|
+
fs.mkdirSync(outDir);
|
|
237
|
+
}
|
|
238
|
+
const outFile = path_1.join(outDir, 'Specification' + version + fileName + '.txt');
|
|
239
|
+
fs.writeFile(outFile, iXiaFormat, (err) => {
|
|
240
|
+
if (err)
|
|
241
|
+
throw err;
|
|
242
|
+
console.log(`${outFile} was succesfully saved!`);
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* Writes an Excel workbook to a file in the dist/documentation folder.
|
|
247
|
+
* @param workbook - Excel workbook (excel4node format)
|
|
248
|
+
* @param version - OData version
|
|
249
|
+
*/
|
|
250
|
+
function writeToFile(workbook, version) {
|
|
251
|
+
const outDir = path_1.join('dist', 'documentation');
|
|
252
|
+
if (!fs.existsSync(outDir)) {
|
|
253
|
+
fs.mkdirSync(outDir);
|
|
254
|
+
}
|
|
255
|
+
const outFile = path_1.join(outDir, 'Specification' + version + '.xlsx');
|
|
256
|
+
workbook.write(outFile);
|
|
257
|
+
}
|
|
258
|
+
/********************** Main ***************************/
|
|
259
|
+
function generateDocmentation() {
|
|
260
|
+
const myArgs = process.argv.slice(2);
|
|
261
|
+
let version;
|
|
262
|
+
let format;
|
|
263
|
+
myArgs.forEach((arg) => {
|
|
264
|
+
const value = arg.split('=')[1];
|
|
265
|
+
if (arg.includes('version')) {
|
|
266
|
+
version = value;
|
|
267
|
+
}
|
|
268
|
+
else if (arg.includes('format')) {
|
|
269
|
+
format = value;
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
let directoryPath = '';
|
|
273
|
+
switch (version) {
|
|
274
|
+
case page_1.FioriElementsVersion.v2:
|
|
275
|
+
directoryPath = path_1.join('schemas', 'v2');
|
|
276
|
+
break;
|
|
277
|
+
case page_1.FioriElementsVersion.v4:
|
|
278
|
+
directoryPath = path_1.join('schemas', 'v4');
|
|
279
|
+
break;
|
|
280
|
+
default:
|
|
281
|
+
console.log('Invalid version ' + version + '; processing stopped.');
|
|
282
|
+
break;
|
|
283
|
+
}
|
|
284
|
+
if (directoryPath.length > 0) {
|
|
285
|
+
const workbook = new excel.Workbook();
|
|
286
|
+
fs.readdir(directoryPath, function (err, files) {
|
|
287
|
+
if (err) {
|
|
288
|
+
return console.log(err);
|
|
289
|
+
}
|
|
290
|
+
files.forEach((file) => {
|
|
291
|
+
const filePath = path_1.join(directoryPath, file);
|
|
292
|
+
const output = [filePath];
|
|
293
|
+
const data = fs.readFileSync(filePath, 'utf8');
|
|
294
|
+
const schema = JSON.parse(data);
|
|
295
|
+
parseSchema(schema, schema, output);
|
|
296
|
+
//console.log(output);
|
|
297
|
+
if (format === 'excel') {
|
|
298
|
+
writeToExcel(workbook, output, file);
|
|
299
|
+
}
|
|
300
|
+
if (format === 'iXiaSoft') {
|
|
301
|
+
generateIxiaSoftFormat(output, file, version);
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
if (format === 'excel') {
|
|
305
|
+
writeToFile(workbook, version);
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
}
|
|
310
|
+
generateDocmentation();
|
|
311
|
+
//# sourceMappingURL=extractDocu.js.map
|