@sap/ux-specification 1.124.31 → 1.124.33
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 +60 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +250 -250
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ApplicationV2.json +46 -12
- package/dist/schemas/v2/ListReportNewConfig.json +136 -0
- package/dist/schemas/v2/ObjectPageConfig.json +11 -5
- package/dist/schemas/v4/ApplicationV4.json +30 -15
- package/dist/schemas/v4/BuildingBlocksConfig.json +20 -34
- package/dist/schemas/v4/ListReportConfig.json +34 -0
- package/dist/schemas/v4/ObjectPageConfig.json +17 -0
- package/dist/specification/package.json +16 -16
- package/dist/specification/scripts/macros/schema.d.ts +7 -0
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +61 -14
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/macros/types.d.ts +1 -0
- package/dist/specification/scripts/macros/types.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +63 -7
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +65 -4
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +138 -8
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts +10 -3
- package/dist/specification/src/sync/common/distTagEvaluator.d.ts.map +1 -1
- package/dist/specification/src/sync/common/distTagEvaluator.js +14 -4
- package/dist/specification/src/sync/common/distTagEvaluator.js.map +1 -1
- package/dist/specification/src/sync/common/dist_tag.json +9 -5
- package/dist/specification/src/sync/common/generate/objectPage.js +3 -1
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +13 -4
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +35 -20
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +13 -1
- package/dist/specification/src/sync/common/utils.d.ts +64 -0
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +147 -1
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/application.d.ts +1 -0
- package/dist/specification/src/sync/v2/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/application.js +18 -0
- package/dist/specification/src/sync/v2/application.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +15 -4
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +6 -12
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.d.ts +26 -0
- package/dist/specification/src/sync/v2/export/factory.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/factory.js +3 -3
- package/dist/specification/src/sync/v2/export/factory.js.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts +1 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js +11 -0
- package/dist/specification/src/sync/v2/export/pages/ObjectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +46 -1
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts +1 -2
- package/dist/specification/src/sync/v2/generate/manifestPropertyUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +63 -13
- package/dist/specification/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +4 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +8 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js +1 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +3 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts +78 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +454 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts +22 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js +124 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiViewSingleTable.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +55 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +152 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +3 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +3 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +4 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +61 -23
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js +32 -13
- package/dist/specification/src/sync/v2/import/pages/overviewPage.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +23 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +67 -0
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts +3 -2
- package/dist/specification/src/sync/v4/export/controls/Header.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/Header.js +14 -2
- package/dist/specification/src/sync/v4/export/controls/Header.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +2 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +7 -2
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts +3 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js +20 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageTableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +5 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +40 -0
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +13 -3
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js +2 -1
- package/dist/specification/src/sync/v4/export/pages/ListReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts +107 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js +374 -0
- package/dist/specification/src/sync/v4/generate/ListReportUtils.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/listReport.d.ts +100 -2
- package/dist/specification/src/sync/v4/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/listReport.js +169 -104
- package/dist/specification/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +62 -12
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +141 -0
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js +208 -0
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +193 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +384 -0
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +172 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +410 -0
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +70 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js +73 -0
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts +9 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js +43 -0
- package/dist/specification/src/sync/v4/sync-rules/utils.js.map +1 -0
- package/dist/specification/src/sync/v4/utils/utils.d.ts +15 -4
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +54 -6
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/types.d.ts +110 -1
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +6 -0
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
- package/dist/types/src/v2/application.d.ts +18 -0
- package/dist/types/src/v2/application.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts +4 -4
- package/dist/types/src/v2/controls/ObjectPageTable.d.ts.map +1 -1
- package/dist/types/src/v2/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts +10 -1
- package/dist/types/src/v2/pages/ObjectPageConfigV2.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeaderSection.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageSection.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts +41 -0
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.d.ts.map +1 -1
- package/dist/types/src/v4/webapp/manifest/ManifestSettings.js.map +1 -1
- package/package.json +16 -16
|
@@ -911,6 +911,23 @@
|
|
|
911
911
|
"items": {
|
|
912
912
|
"type": "string"
|
|
913
913
|
}
|
|
914
|
+
},
|
|
915
|
+
"required": {
|
|
916
|
+
"description": "Determines whether a custom column is required.\nIf set to true, an asterisk is displayed in the column header.",
|
|
917
|
+
"artifactType": "Manifest",
|
|
918
|
+
"descriptionSrcURL": "https://ui5.sap.com/sdk/#/topic/d525522c1bf54672ae4e02d66b38e60c",
|
|
919
|
+
"type": "boolean"
|
|
920
|
+
},
|
|
921
|
+
"importance": {
|
|
922
|
+
"description": "The responsive table provides a feature where the table automatically moves columns to the pop-in area in the following order based on their importance:\n- Columns with \"Low\" importance are hidden first.\n- Columns with \"Medium\" importance are hidden next.\n- Columns with \"High\" importance are always displayed.",
|
|
923
|
+
"artifactType": "Manifest",
|
|
924
|
+
"descriptionSrcURL": "https://ui5.sap.com/sdk/#/topic/d525522c1bf54672ae4e02d66b38e60c",
|
|
925
|
+
"enum": [
|
|
926
|
+
"High",
|
|
927
|
+
"Low",
|
|
928
|
+
"Medium"
|
|
929
|
+
],
|
|
930
|
+
"type": "string"
|
|
914
931
|
}
|
|
915
932
|
},
|
|
916
933
|
"additionalProperties": false,
|
|
@@ -1493,6 +1510,23 @@
|
|
|
1493
1510
|
"items": {
|
|
1494
1511
|
"type": "string"
|
|
1495
1512
|
}
|
|
1513
|
+
},
|
|
1514
|
+
"required": {
|
|
1515
|
+
"description": "Determines whether a custom column is required.\nIf set to true, an asterisk is displayed in the column header.",
|
|
1516
|
+
"artifactType": "Manifest",
|
|
1517
|
+
"descriptionSrcURL": "https://ui5.sap.com/sdk/#/topic/d525522c1bf54672ae4e02d66b38e60c",
|
|
1518
|
+
"type": "boolean"
|
|
1519
|
+
},
|
|
1520
|
+
"importance": {
|
|
1521
|
+
"description": "The responsive table provides a feature where the table automatically moves columns to the pop-in area in the following order based on their importance:\n- Columns with \"Low\" importance are hidden first.\n- Columns with \"Medium\" importance are hidden next.\n- Columns with \"High\" importance are always displayed.",
|
|
1522
|
+
"artifactType": "Manifest",
|
|
1523
|
+
"descriptionSrcURL": "https://ui5.sap.com/sdk/#/topic/d525522c1bf54672ae4e02d66b38e60c",
|
|
1524
|
+
"enum": [
|
|
1525
|
+
"High",
|
|
1526
|
+
"Low",
|
|
1527
|
+
"Medium"
|
|
1528
|
+
],
|
|
1529
|
+
"type": "string"
|
|
1496
1530
|
}
|
|
1497
1531
|
},
|
|
1498
1532
|
"additionalProperties": false,
|
|
@@ -1035,6 +1035,23 @@
|
|
|
1035
1035
|
"items": {
|
|
1036
1036
|
"type": "string"
|
|
1037
1037
|
}
|
|
1038
|
+
},
|
|
1039
|
+
"required": {
|
|
1040
|
+
"description": "Determines whether a custom column is required.\nIf set to true, an asterisk is displayed in the column header.",
|
|
1041
|
+
"artifactType": "Manifest",
|
|
1042
|
+
"descriptionSrcURL": "https://ui5.sap.com/sdk/#/topic/d525522c1bf54672ae4e02d66b38e60c",
|
|
1043
|
+
"type": "boolean"
|
|
1044
|
+
},
|
|
1045
|
+
"importance": {
|
|
1046
|
+
"description": "The responsive table provides a feature where the table automatically moves columns to the pop-in area in the following order based on their importance:\n- Columns with \"Low\" importance are hidden first.\n- Columns with \"Medium\" importance are hidden next.\n- Columns with \"High\" importance are always displayed.",
|
|
1047
|
+
"artifactType": "Manifest",
|
|
1048
|
+
"descriptionSrcURL": "https://ui5.sap.com/sdk/#/topic/d525522c1bf54672ae4e02d66b38e60c",
|
|
1049
|
+
"enum": [
|
|
1050
|
+
"High",
|
|
1051
|
+
"Low",
|
|
1052
|
+
"Medium"
|
|
1053
|
+
],
|
|
1054
|
+
"type": "string"
|
|
1038
1055
|
}
|
|
1039
1056
|
},
|
|
1040
1057
|
"additionalProperties": false,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/ux-specification",
|
|
3
|
-
"version": "1.124.
|
|
3
|
+
"version": "1.124.33",
|
|
4
4
|
"displayName": "SAP Fiori tools - Specification",
|
|
5
5
|
"description": "SAP Fiori tools - Specification",
|
|
6
6
|
"files": [
|
|
@@ -34,11 +34,11 @@
|
|
|
34
34
|
"docuV4": "ts-node ./scripts/extractDocu.ts --version=v4 format=excel",
|
|
35
35
|
"htmlV2": "ts-node ./scripts/extractDocu.ts --version=v2 --format=html",
|
|
36
36
|
"htmlV4": "ts-node ./scripts/extractDocu.ts --version=v4 --format=html",
|
|
37
|
-
"lint": "eslint .
|
|
38
|
-
"lint:summary": "eslint .
|
|
39
|
-
"lint:fix": "eslint . --
|
|
40
|
-
"lint:report": "eslint .
|
|
41
|
-
"lint:report:jslint": "eslint .
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"lint:summary": "eslint . -f summary",
|
|
39
|
+
"lint:fix": "eslint . --fix",
|
|
40
|
+
"lint:report": "eslint . -f multiple",
|
|
41
|
+
"lint:report:jslint": "eslint . -o reports/lint/eslint.jslint.xml -f jslint-xml",
|
|
42
42
|
"macros": "ts-node ./scripts/macros/index.ts",
|
|
43
43
|
"test": "jest && node ../../scripts/scov.js reports/test/unit/coverage/lcov.info",
|
|
44
44
|
"test:ci": "jest --ci --forceExit --detectOpenHandles && node ../../scripts/scov.js reports/test/unit/coverage/lcov.info",
|
|
@@ -49,20 +49,20 @@
|
|
|
49
49
|
"publisher": "SAPSE",
|
|
50
50
|
"license": "SEE LICENSE IN LICENSE",
|
|
51
51
|
"dependencies": {
|
|
52
|
-
"@sap-ux/fe-fpm-writer": "0.
|
|
53
|
-
"@sap-ux/vocabularies-types": "0.
|
|
52
|
+
"@sap-ux/fe-fpm-writer": "0.40.11",
|
|
53
|
+
"@sap-ux/vocabularies-types": "0.14.5"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
|
-
"@sap-ux/annotation-converter": "0.10.
|
|
57
|
-
"@sap-ux/edmx-parser": "0.9.
|
|
58
|
-
"@sap-ux/project-access": "1.
|
|
59
|
-
"@sap/ux-specification-types": "1.124.
|
|
56
|
+
"@sap-ux/annotation-converter": "0.10.19",
|
|
57
|
+
"@sap-ux/edmx-parser": "0.9.8",
|
|
58
|
+
"@sap-ux/project-access": "1.33.0",
|
|
59
|
+
"@sap/ux-specification-types": "1.124.33",
|
|
60
60
|
"@sapui5/types": "latest-1.124",
|
|
61
61
|
"@types/d3": "7.4.3",
|
|
62
62
|
"@types/jquery": "3.5.33",
|
|
63
|
+
"@types/json-schema": "7.0.15",
|
|
63
64
|
"@types/mem-fs": "1.1.5",
|
|
64
65
|
"@types/mem-fs-editor": "7.0.1",
|
|
65
|
-
"@types/json-schema": "7.0.5",
|
|
66
66
|
"@ui5/flexibility-utils": "0.1.3",
|
|
67
67
|
"@xml-tools/ast": "5.0.5",
|
|
68
68
|
"@xml-tools/parser": "1.0.11",
|
|
@@ -71,17 +71,17 @@
|
|
|
71
71
|
"d3": "7.9.0",
|
|
72
72
|
"deepmerge": "4.3.1",
|
|
73
73
|
"ejs": "3.1.10",
|
|
74
|
+
"eslint-formatter-checkstyle": "9.0.1",
|
|
74
75
|
"excel4node": "1.8.2",
|
|
75
|
-
"i18next": "25.
|
|
76
|
+
"i18next": "25.7.4",
|
|
76
77
|
"jquery": "3.7.1",
|
|
77
78
|
"jsdom": "25.0.1",
|
|
78
|
-
"lodash.unset": "4.5.2",
|
|
79
79
|
"mem-fs": "2.1.0",
|
|
80
80
|
"mem-fs-editor": "9.7.0",
|
|
81
81
|
"path": "0.12.7",
|
|
82
82
|
"reflect-metadata": "0.2.2",
|
|
83
83
|
"semver": "7.7.3",
|
|
84
|
-
"typescript-json-schema": "0.
|
|
84
|
+
"typescript-json-schema": "0.67.1",
|
|
85
85
|
"xml-js": "1.6.11"
|
|
86
86
|
},
|
|
87
87
|
"husky": {
|
|
@@ -2,6 +2,13 @@ import type { SchemaDefinition } from '@sap/ux-specification-types';
|
|
|
2
2
|
import type { MacrosAPI } from './types';
|
|
3
3
|
import type { JSONSchema7TypeName } from 'json-schema';
|
|
4
4
|
export declare const UI5_TO_JSON_SCHEMA_TYPE_MAP: Map<string, JSONSchema7TypeName>;
|
|
5
|
+
/**
|
|
6
|
+
* Semantic classification patterns for properties
|
|
7
|
+
* Used to determine if a property should be visible (isViewNode = true/false)
|
|
8
|
+
*/
|
|
9
|
+
export declare const PROPERTY_SEMANTICS: {
|
|
10
|
+
AGGREGATIONS: RegExp[];
|
|
11
|
+
};
|
|
5
12
|
/**
|
|
6
13
|
* Method generates generic schema for passed "sap.fe.macros" api.
|
|
7
14
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../scripts/macros/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../scripts/macros/schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAGpE,OAAO,KAAK,EACR,SAAS,EAOZ,MAAM,SAAS,CAAC;AAGjB,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGvD,eAAO,MAAM,2BAA2B,EAAE,GAAG,CAAC,MAAM,EAAE,mBAAmB,CAAgC,CAAC;AAC1G;;;GAGG;AACH,eAAO,MAAM,kBAAkB;;CAE9B,CAAC;AAwSF;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,gBAAgB,CAkD/D"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UI5_TO_JSON_SCHEMA_TYPE_MAP = void 0;
|
|
3
|
+
exports.PROPERTY_SEMANTICS = exports.UI5_TO_JSON_SCHEMA_TYPE_MAP = void 0;
|
|
4
4
|
exports.generateSchema = generateSchema;
|
|
5
5
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
6
6
|
const ux_specification_types_2 = require("@sap/ux-specification-types");
|
|
@@ -8,6 +8,13 @@ const types_1 = require("./types");
|
|
|
8
8
|
const corrections_1 = require("./corrections");
|
|
9
9
|
const common_1 = require("../../src/sync/common");
|
|
10
10
|
exports.UI5_TO_JSON_SCHEMA_TYPE_MAP = new Map([['int', 'number']]);
|
|
11
|
+
/**
|
|
12
|
+
* Semantic classification patterns for properties
|
|
13
|
+
* Used to determine if a property should be visible (isViewNode = true/false)
|
|
14
|
+
*/
|
|
15
|
+
exports.PROPERTY_SEMANTICS = {
|
|
16
|
+
AGGREGATIONS: [/^(columns?|actions?|items?|content|filters?)/i, /buttonGroups/]
|
|
17
|
+
};
|
|
11
18
|
/**
|
|
12
19
|
* Method checks if passed type is atomic type like 'boolean', 'string', 'number', etc.
|
|
13
20
|
*
|
|
@@ -63,16 +70,20 @@ function formatDescription(description) {
|
|
|
63
70
|
* @param {MacrosPropertyType} metadataType Metadata property type.
|
|
64
71
|
* @param {string} [description] Description of definition.
|
|
65
72
|
* @param {string} defaultAggreation Default aggregation.
|
|
73
|
+
* @param {string} symbolName Name of the symbol.
|
|
66
74
|
* @returns {SchemaDefinition} JSON schema for definition.
|
|
67
75
|
*/
|
|
68
|
-
function prepareDefinition(metadataType, description, defaultAggreation) {
|
|
76
|
+
function prepareDefinition(metadataType, description, defaultAggreation, symbolName) {
|
|
69
77
|
if (description) {
|
|
70
78
|
// Remove html markup from description
|
|
71
79
|
description = formatDescription(description);
|
|
72
80
|
}
|
|
81
|
+
// For main control definitions (classes), default to true as they are primary UI building blocks
|
|
82
|
+
// But exclude configuration objects (*Options classes)
|
|
83
|
+
const isViewNode = !symbolName.endsWith('Options');
|
|
73
84
|
const definition = {
|
|
74
85
|
description,
|
|
75
|
-
isViewNode
|
|
86
|
+
isViewNode,
|
|
76
87
|
type: 'object',
|
|
77
88
|
properties: {},
|
|
78
89
|
additionalProperties: false,
|
|
@@ -141,7 +152,6 @@ function prepareSchemaProperty(property, metadataType, type, types) {
|
|
|
141
152
|
pattern: "^{[A-Za-z0-9{}&$!@#%? _|,<>'()[\\]\\/:=.]+}$"
|
|
142
153
|
});
|
|
143
154
|
}
|
|
144
|
-
const isViewNode = schemaTypes.some((schemaType) => !!schemaType.$ref);
|
|
145
155
|
// Define result
|
|
146
156
|
const propertySchema = schemaTypes.length === 1
|
|
147
157
|
? { ...schemaTypes[0] }
|
|
@@ -150,10 +160,6 @@ function prepareSchemaProperty(property, metadataType, type, types) {
|
|
|
150
160
|
};
|
|
151
161
|
propertySchema.description = formatDescription(property.description);
|
|
152
162
|
propertySchema['artifactType'] = ux_specification_types_1.ArtifactType.XMLProperty;
|
|
153
|
-
if (isViewNode) {
|
|
154
|
-
propertySchema.description = property.name;
|
|
155
|
-
propertySchema.isViewNode = true;
|
|
156
|
-
}
|
|
157
163
|
propertySchema.metadata = {
|
|
158
164
|
type: metadataType
|
|
159
165
|
};
|
|
@@ -198,14 +204,17 @@ function prepareEvent(property) {
|
|
|
198
204
|
* Method prepares schema object for passed SAPUI5 aggregation.
|
|
199
205
|
*
|
|
200
206
|
* @param aggregation SAPUI5 aggregation.
|
|
207
|
+
* @param defaultAggregation The default aggregation name for the parent class.
|
|
201
208
|
* @returns JSON schema.
|
|
202
209
|
*/
|
|
203
|
-
function prepareAggregations(aggregation) {
|
|
210
|
+
function prepareAggregations(aggregation, defaultAggregation) {
|
|
204
211
|
const schemaTypes = getTypes(aggregation.type);
|
|
212
|
+
const isViewNode = (defaultAggregation && aggregation.name === defaultAggregation) ||
|
|
213
|
+
exports.PROPERTY_SEMANTICS.AGGREGATIONS.some((pattern) => pattern.test(aggregation.name));
|
|
205
214
|
return {
|
|
206
215
|
type: 'object',
|
|
207
216
|
additionalProperties: schemaTypes.length ? schemaTypes[0] : { anyOf: schemaTypes },
|
|
208
|
-
isViewNode
|
|
217
|
+
isViewNode,
|
|
209
218
|
metadata: {
|
|
210
219
|
path: [],
|
|
211
220
|
type: ux_specification_types_2.MacrosPropertyType.Aggregation
|
|
@@ -225,6 +234,43 @@ function applyNamespaces(api, schema) {
|
|
|
225
234
|
}
|
|
226
235
|
}
|
|
227
236
|
}
|
|
237
|
+
/**
|
|
238
|
+
* Collects metadata (properties and aggregations) from a class symbol and all of its base classes by walking up the inheritance chain.
|
|
239
|
+
*
|
|
240
|
+
* @param {ClassSymbol} symbol The class symbol whose metadata should be retrieved.
|
|
241
|
+
* @param {ClassSymbol[]} allSymbols A list of all class symbols, used to resolve the full inheritance chain.
|
|
242
|
+
* @returns {{ properties: UI5Property[], aggregations: UI5Aggregation[] }}
|
|
243
|
+
* An object containing merged properties and aggregations accumulated from
|
|
244
|
+
* the class and its inheritance hierarchy.
|
|
245
|
+
*/
|
|
246
|
+
function getMetadata(symbol, allSymbols) {
|
|
247
|
+
const result = {
|
|
248
|
+
properties: [],
|
|
249
|
+
aggregations: []
|
|
250
|
+
};
|
|
251
|
+
// variable is used to prevent infinite loops
|
|
252
|
+
const visited = new Set();
|
|
253
|
+
let currentSymbol = symbol;
|
|
254
|
+
while (currentSymbol && !visited.has(currentSymbol.name)) {
|
|
255
|
+
visited.add(currentSymbol.name);
|
|
256
|
+
const { properties = [], aggregations = [] } = currentSymbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY] ?? {};
|
|
257
|
+
// Add properties without duplicates
|
|
258
|
+
for (const property of properties) {
|
|
259
|
+
if (!result.properties.some((existingProperty) => existingProperty.name === property.name)) {
|
|
260
|
+
result.properties.push(property);
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
// Add aggregations without duplicates
|
|
264
|
+
for (const aggregation of aggregations) {
|
|
265
|
+
if (!result.aggregations.some((existingAggregation) => existingAggregation.name === aggregation.name)) {
|
|
266
|
+
result.aggregations.push(aggregation);
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
// Go to next base class in inheritance chain
|
|
270
|
+
currentSymbol = currentSymbol.extends ? allSymbols.find((s) => s.name === currentSymbol.extends) : undefined;
|
|
271
|
+
}
|
|
272
|
+
return result;
|
|
273
|
+
}
|
|
228
274
|
/**
|
|
229
275
|
* Method generates generic schema for passed "sap.fe.macros" api.
|
|
230
276
|
*
|
|
@@ -239,17 +285,18 @@ function generateSchema(api) {
|
|
|
239
285
|
// Handle classes
|
|
240
286
|
const classSymbols = api.symbols.filter((symbol) => symbol.kind === types_1.SYMBOL_KIND_CLASS);
|
|
241
287
|
for (const symbol of classSymbols) {
|
|
242
|
-
const definition = prepareDefinition(ux_specification_types_2.MacrosPropertyType.Control, symbol.description, symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]?.defaultAggregation);
|
|
288
|
+
const definition = prepareDefinition(ux_specification_types_2.MacrosPropertyType.Control, symbol.description, symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]?.defaultAggregation, symbol.name);
|
|
243
289
|
definitions[symbol.name] = definition;
|
|
244
290
|
const events = symbol.events || [];
|
|
245
|
-
const { properties
|
|
291
|
+
const { properties, aggregations } = getMetadata(symbol, classSymbols);
|
|
246
292
|
// Handle properties
|
|
247
293
|
for (const property of properties) {
|
|
248
294
|
definition.properties[property.name] = prepareProperty(property);
|
|
249
295
|
}
|
|
250
296
|
// Handle aggregations
|
|
297
|
+
const defaultAggregation = symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]?.defaultAggregation;
|
|
251
298
|
for (const aggregation of aggregations) {
|
|
252
|
-
definition.properties[aggregation.name] = prepareAggregations(aggregation);
|
|
299
|
+
definition.properties[aggregation.name] = prepareAggregations(aggregation, defaultAggregation);
|
|
253
300
|
}
|
|
254
301
|
// Handle events
|
|
255
302
|
for (const event of events) {
|
|
@@ -261,7 +308,7 @@ function generateSchema(api) {
|
|
|
261
308
|
// Handle typedefs
|
|
262
309
|
const typedefSymbols = api.symbols.filter((symbol) => symbol.kind === types_1.SYMBOL_KIND_TYPEDEF);
|
|
263
310
|
for (const symbol of typedefSymbols) {
|
|
264
|
-
const definition = prepareDefinition(ux_specification_types_2.MacrosPropertyType.Control, symbol.description, symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]?.defaultAggregation);
|
|
311
|
+
const definition = prepareDefinition(ux_specification_types_2.MacrosPropertyType.Control, symbol.description, symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]?.defaultAggregation, symbol.name);
|
|
265
312
|
definitions[symbol.name] = definition;
|
|
266
313
|
const properties = symbol.properties || [];
|
|
267
314
|
for (const property of properties) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../scripts/macros/schema.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../../scripts/macros/schema.ts"],"names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M,UAAU,GAAG,iBAAiB,CAChC,2CAAkB,CAAC,OAAO,EAC1B,MAAM,CAAC,WAAW,EAClB,MAAM,CAAC,sCAA8B,CAAC,EAAE,kBAAkB,EAC1D,MAAM,CAAC,IAAI,CACd,CAAC;QACF,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,UAAU,CAAC;QACtC,MAAM,UAAU,GAAG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;QAC3C,KAAK,MAAM,QAAQ,IAAI,UAAU,EAAE,CAAC;YAChC,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;QACrE,CAAC;IACL,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -34,6 +34,7 @@ export interface ClassSymbol extends BaseSymbol {
|
|
|
34
34
|
kind: typeof SYMBOL_KIND_CLASS;
|
|
35
35
|
since?: string;
|
|
36
36
|
events?: UI5Event[];
|
|
37
|
+
extends?: string;
|
|
37
38
|
[CLASS_SYMBOL_METADATA_PROPERTY]?: SymbolMetadata;
|
|
38
39
|
}
|
|
39
40
|
export interface TypedefSymbol extends BaseSymbol {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../scripts/macros/types.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,cAAc,CAAC;AACjD,eAAO,MAAM,iBAAiB,UAAU,CAAC;AACzC,eAAO,MAAM,mBAAmB,YAAY,CAAC;AAE7C,eAAO,MAAM,8BAA8B,iBAAiB,CAAC;AAE7D,MAAM,MAAM,WAAW,GAAG,OAAO,qBAAqB,GAAG,OAAO,iBAAiB,GAAG,OAAO,mBAAmB,CAAC;AAE/G,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,SAAS,EAAE,CAAC;CACxB;AAED,oBAAY,aAAa;IACrB,MAAM,WAAW;IACjB,UAAU,eAAe;IACzB,MAAM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ACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-json-schema.d.ts","sourceRoot":"","sources":["../../../../scripts/schema/to-json-schema.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"to-json-schema.d.ts","sourceRoot":"","sources":["../../../../scripts/schema/to-json-schema.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,0CAA0C,CAAC;AAS1F,MAAM,MAAM,MAAM,GAAG;IAAE,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAAA;CAAE,CAAC;AA8BhD;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,OAAO,CAAC,EAAE,yBAAyB,QAErF;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,oBAAoB,GAAG,MAAM,EAAE,CA4BxG;AAuID;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,yBAwBzC,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CA0BrD"}
|
|
@@ -46,6 +46,10 @@ const factory_2 = require("../../src/sync/v4/export/factory");
|
|
|
46
46
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
47
47
|
const ListReportNew_1 = require("../../src/sync/v2/genericSchemaHandling/pages/ListReportNew");
|
|
48
48
|
const v2Controls = __importStar(require("../../src/sync/v2/genericSchemaHandling/controls"));
|
|
49
|
+
const decoration_1 = require("../../src/sync/common/decoration");
|
|
50
|
+
const utils_2 = require("../../src/sync/common/utils");
|
|
51
|
+
const application_1 = require("../../src/sync/v4/application");
|
|
52
|
+
const application_2 = require("../../src/sync/v2/application");
|
|
49
53
|
//TS compiler options, compare with tsconfig
|
|
50
54
|
const compilerOptions = {
|
|
51
55
|
skipLibCheck: true,
|
|
@@ -185,6 +189,55 @@ function convertPagesOfFEVersion(paths, version, outputPath, factory) {
|
|
|
185
189
|
function getPosition(string, subString, index) {
|
|
186
190
|
return string.split(subString, index).join(subString).length;
|
|
187
191
|
}
|
|
192
|
+
/**
|
|
193
|
+
* Performs post-processing on the provided array of schemas for V2 and V4 applications.
|
|
194
|
+
*
|
|
195
|
+
* @param schemas - An array of `Schema` objects to be post-processed.
|
|
196
|
+
*/
|
|
197
|
+
function postProcessingApps(schemas) {
|
|
198
|
+
// Add manifest paths to V4 and V2
|
|
199
|
+
addManifestPathsToApplication(schemas['ApplicationV4.json'], application_1.AppSettings.prototype);
|
|
200
|
+
addManifestPathsToApplication(schemas['ApplicationV2.json'], application_2.AppSettings.prototype);
|
|
201
|
+
}
|
|
202
|
+
/**
|
|
203
|
+
* Adds `manifestPath` to the `AppSettings` properties inside a JSON schema.
|
|
204
|
+
*
|
|
205
|
+
* @param {JSONSchema4} schema - The JSON schema object to be updated.
|
|
206
|
+
* @param {object} classPrototype - The prototype object whose metadata is used to determine manifest path information for each property.
|
|
207
|
+
*/
|
|
208
|
+
function addManifestPathsToApplication(schema, classPrototype) {
|
|
209
|
+
// Update schema with manifest path for properties in settings
|
|
210
|
+
for (const property in schema.definitions.AppSettings.properties) {
|
|
211
|
+
const propertySchema = schema.definitions.AppSettings.properties[property];
|
|
212
|
+
const rule = (0, decoration_1.getReflectMetadata)(classPrototype, property);
|
|
213
|
+
if (!rule?.manifest?.path) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
const exportPropertyKey = rule?.manifest?.key ?? property;
|
|
217
|
+
const manifestPath = `${rule.manifest.path()}/${exportPropertyKey}`;
|
|
218
|
+
propertySchema.manifestPath = (0, utils_2.convertSyncRulePathToJsonPath)(manifestPath);
|
|
219
|
+
// Continue parsing of inner properties
|
|
220
|
+
// Handle anyOf with inner properties
|
|
221
|
+
if (propertySchema.anyOf) {
|
|
222
|
+
for (const innerSchema of propertySchema.anyOf) {
|
|
223
|
+
if (!innerSchema.properties) {
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
for (const property in innerSchema.properties) {
|
|
227
|
+
innerSchema.properties[property].manifestPath = (0, utils_2.appendJsonPathSegment)(propertySchema.manifestPath, property);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// Handle $ref with inner properties
|
|
232
|
+
if (propertySchema.manifestPath && propertySchema.$ref) {
|
|
233
|
+
const innerDefinitions = (0, utils_2.getDefinitionKey)(propertySchema.$ref);
|
|
234
|
+
const innerProperties = schema.definitions[innerDefinitions]?.properties ?? {};
|
|
235
|
+
for (const innerProperty in innerProperties) {
|
|
236
|
+
innerProperties[innerProperty].manifestPath = (0, utils_2.appendJsonPathSegment)(propertySchema.manifestPath, innerProperty);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
}
|
|
188
241
|
/**
|
|
189
242
|
* Factory giving access to the metadata of the new v2 ListReport page.
|
|
190
243
|
*/
|
|
@@ -193,8 +246,9 @@ exports.FACTORY_FOR_LIST_REPORT_NEW = {
|
|
|
193
246
|
const metadataClass = v2Controls[schemaPropertyName];
|
|
194
247
|
// Naming convention: Types that are only introduced as host for enums have a name ending with 'Enum'.
|
|
195
248
|
// They cannot be instantiated.
|
|
196
|
-
// In addition to that
|
|
197
|
-
if (schemaPropertyName.endsWith('Enum') ||
|
|
249
|
+
// In addition to that some enums (ButtonType,...) are imported from sapui5.
|
|
250
|
+
if (schemaPropertyName.endsWith('Enum') ||
|
|
251
|
+
['ButtonType', 'smarttable.ExportType'].includes(schemaPropertyName)) {
|
|
198
252
|
return metadataClass;
|
|
199
253
|
}
|
|
200
254
|
let instance;
|
|
@@ -217,7 +271,6 @@ exports.FACTORY_FOR_LIST_REPORT_NEW = {
|
|
|
217
271
|
* @param outputPath - The path to write the generated schemas to.
|
|
218
272
|
*/
|
|
219
273
|
function toJsonSchema(outputPath) {
|
|
220
|
-
let schemas = [];
|
|
221
274
|
const rootName = __dirname.slice(0, getPosition(__dirname, 'specification', 2));
|
|
222
275
|
const typesPath = (0, path_1.join)(rootName, 'types', 'src');
|
|
223
276
|
//Pages V2
|
|
@@ -235,10 +288,13 @@ function toJsonSchema(outputPath) {
|
|
|
235
288
|
paths.push((0, path_1.join)(typesPath, 'v4', 'pages'));
|
|
236
289
|
convertPagesOfFEVersion(paths, ux_specification_types_1.FioriElementsVersion.v4, outputPath);
|
|
237
290
|
//App V2
|
|
238
|
-
|
|
239
|
-
writeSchemasToFile(outputPath, schemas, 'v2');
|
|
291
|
+
const v2AppSchemas = convertInterfaces((0, path_1.join)(typesPath, 'v2'), ['ApplicationV2.ts'], ux_specification_types_1.FioriElementsVersion.v2);
|
|
240
292
|
//App V4
|
|
241
|
-
|
|
242
|
-
|
|
293
|
+
const v4AppSchemas = convertInterfaces((0, path_1.join)(typesPath, 'v4'), ['ApplicationV4.ts'], ux_specification_types_1.FioriElementsVersion.v4);
|
|
294
|
+
//App postprocessing of schema
|
|
295
|
+
postProcessingApps({ ...v2AppSchemas, ...v4AppSchemas });
|
|
296
|
+
//Write App schemas
|
|
297
|
+
writeSchemasToFile(outputPath, v2AppSchemas, 'v2');
|
|
298
|
+
writeSchemasToFile(outputPath, v4AppSchemas, 'v4');
|
|
243
299
|
}
|
|
244
300
|
//# sourceMappingURL=to-json-schema.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"to-json-schema.js","sourceRoot":"","sources":["../../../../scripts/schema/to-json-schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"to-json-schema.js","sourceRoot":"","sources":["../../../../scripts/schema/to-json-schema.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuDA,gFAEC;AAUD,8CA4BC;AAyKD,oCA0BC;AAlSD,+BAAsC;AACtC,uCAAyB;AAEzB,m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13 @@
|
|
|
1
1
|
import 'reflect-metadata';
|
|
2
|
-
import type { SyncRule, PageLayoutInformation, ValidityInformation, SyncRuleProvider } from '@sap/ux-specification-types';
|
|
3
|
-
export declare const
|
|
2
|
+
import type { SyncRule, PageLayoutInformation, ValidityInformation, SyncRuleProvider, Validity, BooleanCondition, DependsOnCondition, DependsOnMessage, MultiDependsOnCondition } from '@sap/ux-specification-types';
|
|
3
|
+
export declare const metadataKeys: {
|
|
4
|
+
description: symbol;
|
|
5
|
+
hidden: symbol;
|
|
6
|
+
isViewNode: symbol;
|
|
7
|
+
syncRule: symbol;
|
|
8
|
+
dependsOn: symbol;
|
|
9
|
+
validity: symbol;
|
|
10
|
+
};
|
|
4
11
|
export declare const syncRule: (propSpec: SyncRule) => any;
|
|
5
12
|
/**
|
|
6
13
|
* Retrieves the metadata associated with a specific property of a target object.
|
|
@@ -24,8 +31,62 @@ export declare const getPageLayoutInformation: (target: any) => PageLayoutInform
|
|
|
24
31
|
export declare const descriptionUrlMetadataKey: unique symbol;
|
|
25
32
|
export declare const descriptionSrcURL: (id: string) => any;
|
|
26
33
|
export declare const getDescriptionSrcURL: (target: any, propertyName: string) => string;
|
|
27
|
-
export declare const
|
|
28
|
-
|
|
34
|
+
export declare const validity: (validity: Validity) => any;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieves the validity metadata associated with a specific property of a target object.
|
|
37
|
+
*
|
|
38
|
+
* @param target - The object containing the property.
|
|
39
|
+
* @param propertyName - The name of the property whose validity metadata is to be retrieved.
|
|
40
|
+
* @returns The validity information of the property, or undefined if no metadata is found.
|
|
41
|
+
*/
|
|
42
|
+
export declare function getValidityMetadata(target: object, propertyName: string): ValidityInformation | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Mark the target class with a metadata flag indicating it is a view node.
|
|
45
|
+
*
|
|
46
|
+
* @param target - The constructor of the class to be marked as a view node
|
|
47
|
+
*/
|
|
48
|
+
export declare function isViewNode(target: Function): void;
|
|
49
|
+
/**
|
|
50
|
+
* Decorator to add a description to a class or property in the schema.
|
|
51
|
+
*
|
|
52
|
+
* @param text - The description text
|
|
53
|
+
* @returns ClassDecorator
|
|
54
|
+
*/
|
|
55
|
+
export declare function description(text: string): (target: Function) => void;
|
|
56
|
+
/**
|
|
57
|
+
* Decorator to conditionally hide a property in the schema based on a condition function.
|
|
58
|
+
* The condition function is evaluated during schema generation with the appropriate context.
|
|
59
|
+
*
|
|
60
|
+
* @param condition - A function that takes context and returns boolean indicating if property should be hidden
|
|
61
|
+
* @returns PropertyDecorator or ClassDecorator depending on usage
|
|
62
|
+
*/
|
|
63
|
+
export declare function hidden(condition?: BooleanCondition): PropertyDecorator & ClassDecorator;
|
|
64
|
+
/**
|
|
65
|
+
* Helper function to create a DependsOnMessage object.
|
|
66
|
+
*
|
|
67
|
+
* @param text - The message text (can be true for default i18n message, a string, or a function)
|
|
68
|
+
* @param deletable - Whether the message can be deleted/dismissed in the UI
|
|
69
|
+
* @returns A DependsOnMessage object
|
|
70
|
+
*/
|
|
71
|
+
export declare const dependsOnMessage: (text?: DependsOnMessage["text"], deletable?: boolean) => DependsOnMessage;
|
|
72
|
+
/**
|
|
73
|
+
* Decorator to conditionally show/hide a property based on one or more property values.
|
|
74
|
+
* The decorated property will be hidden if the dependency condition(s) are not met.
|
|
75
|
+
*
|
|
76
|
+
* @param pathOrConditions - A string property path or an array of condition objects (all must be met)
|
|
77
|
+
* @param conditionOrValueOrMessage - Single condition: condition/expected value/message; Multi-condition: message parameter
|
|
78
|
+
* @param message - Optional message parameter (only for single condition with condition/value)
|
|
79
|
+
* @returns PropertyDecorator
|
|
80
|
+
*/
|
|
81
|
+
export declare function dependsOn(pathOrConditions: string | MultiDependsOnCondition, conditionOrValueOrMessage?: BooleanCondition | any | DependsOnMessage, message?: DependsOnMessage): PropertyDecorator;
|
|
82
|
+
/**
|
|
83
|
+
* Retrieves the dependsOn metadata associated with a specific property of a target object.
|
|
84
|
+
*
|
|
85
|
+
* @param target - The object containing the property.
|
|
86
|
+
* @param propertyName - The name of the property whose dependsOn metadata is to be retrieved.
|
|
87
|
+
* @returns The dependsOn information of the property, or undefined if no metadata is found.
|
|
88
|
+
*/
|
|
89
|
+
export declare function getDependsOnMetadata(target: object, propertyName: string): DependsOnCondition | undefined;
|
|
29
90
|
/**
|
|
30
91
|
* Generates a deprecation message for a given key, optionally including additional validity information.
|
|
31
92
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACR,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"decorators.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/common/decoration/decorators.ts"],"names":[],"mappings":"AAAA,OAAO,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EACR,QAAQ,EACR,qBAAqB,EACrB,mBAAmB,EACnB,gBAAgB,EAChB,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,uBAAuB,EAC1B,MAAM,6BAA6B,CAAC;AAGrC,eAAO,MAAM,YAAY;;;;;;;CAOxB,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,UAAU,QAAQ,KAAG,GAE7C,CAAC;AAEF;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAM7F;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,GAAG,EAAE,gBAAgB,GAAG,QAAQ,GAAG,SAAS,CAMlF;AAED,eAAO,MAAM,qBAAqB,GAC7B,UAAU,qBAAqB,MAC/B,aAAa,QAAQ,KAAG,IAExB,CAAC;AAGN,eAAO,MAAM,OAAO,GAAI,IAAI,MAAM,KAAG,GAEpC,CAAC;AAEF,eAAO,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