@sap/ux-specification 1.96.27 → 1.96.28
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/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-BuildingBlocks.html +60 -0
- package/dist/documentation/v4/v4-FreestylePage.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 +271 -187
- package/dist/index-min.js.map +3 -3
- package/dist/package.json +111 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +750 -0
- package/dist/schemas/v4/ObjectPageConfig.json +185 -9
- package/dist/scripts/macros/api.d.ts +9 -0
- package/dist/scripts/macros/api.d.ts.map +1 -0
- package/dist/scripts/macros/api.js +161 -0
- package/dist/scripts/macros/api.js.map +1 -0
- package/dist/scripts/macros/cmd.d.ts +7 -0
- package/dist/scripts/macros/cmd.d.ts.map +1 -0
- package/dist/scripts/macros/cmd.js +49 -0
- package/dist/scripts/macros/cmd.js.map +1 -0
- package/dist/scripts/macros/corrections.d.ts +18 -0
- package/dist/scripts/macros/corrections.d.ts.map +1 -0
- package/dist/scripts/macros/corrections.js +188 -0
- package/dist/scripts/macros/corrections.js.map +1 -0
- package/dist/scripts/macros/index.d.ts +2 -0
- package/dist/scripts/macros/index.d.ts.map +1 -0
- package/dist/scripts/macros/index.js +8 -0
- package/dist/scripts/macros/index.js.map +1 -0
- package/dist/scripts/macros/schema.d.ts +9 -0
- package/dist/scripts/macros/schema.d.ts.map +1 -0
- package/dist/scripts/macros/schema.js +201 -0
- package/dist/scripts/macros/schema.js.map +1 -0
- package/dist/scripts/macros/types.d.ts +77 -0
- package/dist/scripts/macros/types.d.ts.map +1 -0
- package/dist/scripts/macros/types.js +14 -0
- package/dist/scripts/macros/types.js.map +1 -0
- package/dist/src/api.d.ts.map +1 -1
- package/dist/src/api.js +8 -1
- package/dist/src/api.js.map +1 -1
- package/dist/src/project.d.ts +1 -0
- package/dist/src/project.d.ts.map +1 -1
- package/dist/src/project.js +6 -4
- package/dist/src/project.js.map +1 -1
- package/dist/src/specification/schemaAccess.d.ts.map +1 -1
- package/dist/src/specification/schemaAccess.js +16 -3
- package/dist/src/specification/schemaAccess.js.map +1 -1
- package/dist/src/sync/common/appProvider.d.ts +12 -0
- package/dist/src/sync/common/appProvider.d.ts.map +1 -1
- package/dist/src/sync/common/appProvider.js +51 -18
- package/dist/src/sync/common/appProvider.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +7 -7
- package/dist/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/src/sync/common/generate/utils.js +27 -33
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/i18n.json +2 -1
- package/dist/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/src/sync/common/importProject.js +67 -31
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +6 -0
- package/dist/src/sync/common/types.d.ts.map +1 -0
- package/dist/src/sync/common/types.js +3 -0
- package/dist/src/sync/common/types.js.map +1 -0
- package/dist/src/sync/common/utils.d.ts +26 -5
- package/dist/src/sync/common/utils.d.ts.map +1 -1
- package/dist/src/sync/common/utils.js +42 -5
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +1 -0
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/listReport.js +1 -0
- package/dist/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +1 -0
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.d.ts +5 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.js +4 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooter.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts +14 -0
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.js +83 -1
- package/dist/src/sync/v4/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts +5 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.js +4 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +14 -0
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.js +83 -1
- package/dist/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/src/sync/v4/export/export.d.ts +1 -0
- package/dist/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/src/sync/v4/export/export.js +11 -6
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/fpmCustomPage.d.ts +11 -0
- package/dist/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -0
- package/dist/src/sync/v4/export/fpmCustomPage.js +131 -0
- package/dist/src/sync/v4/export/fpmCustomPage.js.map +1 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.d.ts +10 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.d.ts.map +1 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.js +266 -0
- package/dist/src/sync/v4/generate/fpmCustomPage.js.map +1 -0
- package/dist/src/sync/v4/generate/generate.d.ts +13 -1
- package/dist/src/sync/v4/generate/generate.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/generate.js +22 -1
- package/dist/src/sync/v4/generate/generate.js.map +1 -1
- package/dist/src/sync/v4/generate/index.d.ts +2 -1
- package/dist/src/sync/v4/generate/index.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/index.js +4 -1
- package/dist/src/sync/v4/generate/index.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +45 -12
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts +2 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.js +2 -2
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +7 -2
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/baseAppProvider.js +26 -6
- package/dist/src/sync/v4/import/app/baseAppProvider.js.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts +2 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts.map +1 -1
- package/dist/src/sync/v4/import/app/freestyleProvider.js +2 -2
- package/dist/src/sync/v4/import/app/freestyleProvider.js.map +1 -1
- package/dist/src/sync/v4/import/index.d.ts +1 -0
- package/dist/src/sync/v4/import/index.d.ts.map +1 -1
- package/dist/src/sync/v4/import/index.js +1 -0
- package/dist/src/sync/v4/import/index.js.map +1 -1
- package/dist/src/sync/v4/import/pages/fpmCustomPage.d.ts +9 -0
- package/dist/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -0
- package/dist/src/sync/v4/import/pages/fpmCustomPage.js +102 -0
- package/dist/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -0
- package/dist/src/sync/v4/import/pages/objectPage.js +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/utils/macros.d.ts +29 -0
- package/dist/src/sync/v4/utils/macros.d.ts.map +1 -0
- package/dist/src/sync/v4/utils/macros.js +113 -0
- package/dist/src/sync/v4/utils/macros.js.map +1 -0
- package/dist/src/sync/v4/utils/utils.d.ts +11 -1
- package/dist/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/src/sync/v4/utils/utils.js +88 -1
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/package.json +14 -8
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.applyCorrections = exports.macrosCorrection = void 0;
|
|
4
|
+
const types_1 = require("./types");
|
|
5
|
+
exports.macrosCorrection = {
|
|
6
|
+
'sap.fe.macros.Table': {
|
|
7
|
+
aggregations: [
|
|
8
|
+
{
|
|
9
|
+
name: 'actions',
|
|
10
|
+
singularName: 'action',
|
|
11
|
+
type: 'sap.fe.macros.table.Action',
|
|
12
|
+
cardinality: '0..n',
|
|
13
|
+
visibility: types_1.UI5Visibility.public,
|
|
14
|
+
description: 'Table actions',
|
|
15
|
+
methods: [],
|
|
16
|
+
linkEnabled: true
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
name: 'columns',
|
|
20
|
+
singularName: 'column',
|
|
21
|
+
type: 'sap.fe.macros.table.Column',
|
|
22
|
+
cardinality: '0..n',
|
|
23
|
+
visibility: types_1.UI5Visibility.public,
|
|
24
|
+
description: 'Table columns',
|
|
25
|
+
methods: [],
|
|
26
|
+
linkEnabled: true
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
properties: [
|
|
30
|
+
{
|
|
31
|
+
name: 'title',
|
|
32
|
+
description: 'The text that will be displayed for table title',
|
|
33
|
+
group: 'Misc',
|
|
34
|
+
methods: [],
|
|
35
|
+
visibility: types_1.UI5Visibility.public,
|
|
36
|
+
types: [
|
|
37
|
+
{
|
|
38
|
+
value: 'string'
|
|
39
|
+
}
|
|
40
|
+
],
|
|
41
|
+
bindable: true,
|
|
42
|
+
defaultValue: ''
|
|
43
|
+
}
|
|
44
|
+
]
|
|
45
|
+
},
|
|
46
|
+
'sap.fe.macros.ActionGroup': {
|
|
47
|
+
aggregations: [
|
|
48
|
+
{
|
|
49
|
+
name: 'actions',
|
|
50
|
+
singularName: 'action',
|
|
51
|
+
type: 'sap.fe.macros.table.Action',
|
|
52
|
+
cardinality: '0..n',
|
|
53
|
+
visibility: types_1.UI5Visibility.public,
|
|
54
|
+
description: 'Table actions',
|
|
55
|
+
methods: [],
|
|
56
|
+
linkEnabled: true
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
properties: [
|
|
60
|
+
{
|
|
61
|
+
defaultValue: '',
|
|
62
|
+
description: 'The text that will be displayed for this action group',
|
|
63
|
+
group: 'Misc',
|
|
64
|
+
methods: [],
|
|
65
|
+
name: 'text',
|
|
66
|
+
types: [
|
|
67
|
+
{
|
|
68
|
+
value: 'string'
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
visibility: types_1.UI5Visibility.public
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
defaultValue: '',
|
|
75
|
+
description: 'Defines where this action group should be placed relative to the defined anchor',
|
|
76
|
+
group: 'Misc',
|
|
77
|
+
methods: [],
|
|
78
|
+
name: 'placement',
|
|
79
|
+
types: [
|
|
80
|
+
{
|
|
81
|
+
value: 'string'
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
visibility: types_1.UI5Visibility.public
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
defaultValue: '',
|
|
88
|
+
description: 'Reference to the key of another action or action group already displayed in the toolbar to properly place this one',
|
|
89
|
+
group: 'Misc',
|
|
90
|
+
methods: [],
|
|
91
|
+
name: 'anchor',
|
|
92
|
+
types: [
|
|
93
|
+
{
|
|
94
|
+
value: 'string'
|
|
95
|
+
}
|
|
96
|
+
],
|
|
97
|
+
visibility: types_1.UI5Visibility.public
|
|
98
|
+
}
|
|
99
|
+
],
|
|
100
|
+
metadata: {
|
|
101
|
+
kind: types_1.SYMBOL_KIND_CLASS,
|
|
102
|
+
name: 'sap.fe.macros.ActionGroup',
|
|
103
|
+
basename: 'ActionGroup',
|
|
104
|
+
resource: '',
|
|
105
|
+
module: '',
|
|
106
|
+
static: true,
|
|
107
|
+
visibility: types_1.UI5Visibility.public,
|
|
108
|
+
description: 'Definition of a actions group to be used inside the table toolbar',
|
|
109
|
+
displayName: 'sap.fe.macros.ActionGroup',
|
|
110
|
+
title: 'class sap.fe.macros.ActionGroup',
|
|
111
|
+
subTitle: ''
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Method returns node with "properties" and "aggregation" for passed symbol.
|
|
117
|
+
* If node does not contains "properties" or "aggregation", then it prepares empty objects.
|
|
118
|
+
* @param {ClassSymbol | TypedefSymbol} symbol Symbol from SAPUI5 api.
|
|
119
|
+
* @returns {APICorrection} Correction object which contains "properties" and "aggregation" properties.
|
|
120
|
+
*/
|
|
121
|
+
function getNode(symbol) {
|
|
122
|
+
let node;
|
|
123
|
+
if (symbol.kind === types_1.SYMBOL_KIND_CLASS) {
|
|
124
|
+
if (!symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY]) {
|
|
125
|
+
symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY] = {
|
|
126
|
+
aggregations: [],
|
|
127
|
+
properties: [],
|
|
128
|
+
stereotype: ''
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
node = symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY];
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
node = symbol;
|
|
135
|
+
}
|
|
136
|
+
if (!node.aggregations) {
|
|
137
|
+
node.aggregations = [];
|
|
138
|
+
}
|
|
139
|
+
if (!node.properties) {
|
|
140
|
+
node.properties = [];
|
|
141
|
+
}
|
|
142
|
+
return node;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Method applies correction for passed node.
|
|
146
|
+
* @param {APICorrection} node Original node to update with corrections.
|
|
147
|
+
* @param {APICorrection} correction Correction to apply - "properties" and "aggregation" are applied.
|
|
148
|
+
*/
|
|
149
|
+
function applyCorrectionForNode(node, correction) {
|
|
150
|
+
for (const aggregation of correction.aggregations || []) {
|
|
151
|
+
if (!node.aggregations.some((existingAggregation) => existingAggregation.name === aggregation.name)) {
|
|
152
|
+
node.aggregations.push(aggregation);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
for (const property of correction.properties || []) {
|
|
156
|
+
if (!node.properties.some((existingProperty) => existingProperty.name === property.name)) {
|
|
157
|
+
node.properties.push(property);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Method applies missing aggregations and properties for "sap.fe.macros" api object.
|
|
163
|
+
* We notice that api object of "sap.fe.macros" is missing some aggregation and properties information
|
|
164
|
+
* - in result we apply missing data on top of received api object.
|
|
165
|
+
* @param {MacrosAPI} api "sap.fe.macros" api object.
|
|
166
|
+
*/
|
|
167
|
+
function applyCorrections(api) {
|
|
168
|
+
// Apply missing classes
|
|
169
|
+
for (const name in exports.macrosCorrection) {
|
|
170
|
+
const symbol = api.symbols.find((apiSymbol) => apiSymbol.name === name);
|
|
171
|
+
if (!symbol && exports.macrosCorrection[name].metadata) {
|
|
172
|
+
api.symbols.push({
|
|
173
|
+
...exports.macrosCorrection[name].metadata
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
// Apply missing aggregation and properties
|
|
178
|
+
for (const symbol of api.symbols) {
|
|
179
|
+
const correction = exports.macrosCorrection[symbol.name];
|
|
180
|
+
if (!correction || symbol.kind === types_1.SYMBOL_KIND_NAMESPACE) {
|
|
181
|
+
continue;
|
|
182
|
+
}
|
|
183
|
+
const node = getNode(symbol);
|
|
184
|
+
applyCorrectionForNode(node, correction);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
exports.applyCorrections = applyCorrections;
|
|
188
|
+
//# sourceMappingURL=corrections.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"corrections.js","sourceRoot":"","sources":["../../../scripts/macros/corrections.ts"],"names":[],"mappings":";;;AAAA,mCAAkH;AASrG,QAAA,gBAAgB,GAAqC;IAC9D,qBAAqB,EAAE;QACnB,YAAY,EAAE;YACV;gBACI,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,4BAA4B;gBAClC,WAAW,EAAE,MAAM;gBACnB,UAAU,EAAE,qBAAa,CAAC,MAAM;gBAChC,WAAW,EAAE,eAAe;gBAC5B,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,IAAI;aACpB;YACD;gBACI,IAAI,EAAE,SAAS;gBACf,YAAY,EAAE,QAAQ;gBACtB,IAAI,EAAE,4BAA4B;gBAClC,WAAW,EAAE,MAAM;gBACnB,UAAU,EAAE,qBAAa,CAAC,MAAM;gBAChC,WAAW,EAAE,eAAe;gBAC5B,OAAO,EAAE,EAAE;gBACX,WAAW,EAAE,IAAI;aACpB;SACJ;QACD,UAAU,EAAE;YACR;gBACI,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,iDAAiD;gBAC9D,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,EAAE;gBACX,UAAU,EAAE,qBAAa,CAAC,MAAM;gBAChC,KAAK,EAAE;oBACH;wBACI,KAAK,EAAE,QAAQ;qBAClB;iBACJ;gBACD,QAAQ,EAAE,IAAI;gBACd,YAAY,EAAE,EAAE;aACnB;SACJ;KACJ;IACD,2BAA2B,EAAE;QACzB,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,IAAI,CAAC,EAAE;YACtF,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SAClC;KACJ;AACL,CAAC;AAED;;;;;GAKG;AACH,SAAgB,gBAAgB,CAAC,GAAc;IAC3C,wBAAwB;IACxB,KAAK,MAAM,IAAI,IAAI,wBAAgB,EAAE;QACjC,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,SAAoB,EAAE,EAAE,CAAC,SAAS,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC;QACnF,IAAI,CAAC,MAAM,IAAI,wBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;YAC5C,GAAG,CAAC,OAAO,CAAC,IAAI,CAAC;gBACb,GAAG,wBAAgB,CAAC,IAAI,CAAC,CAAC,QAAQ;aACrC,CAAC,CAAC;SACN;KACJ;IACD,2CAA2C;IAC3C,KAAK,MAAM,MAAM,IAAI,GAAG,CAAC,OAAO,EAAE;QAC9B,MAAM,UAAU,GAAG,wBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACjD,IAAI,CAAC,UAAU,IAAI,MAAM,CAAC,IAAI,KAAK,6BAAqB,EAAE;YACtD,SAAS;SACZ;QACD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,sBAAsB,CAAC,IAAI,EAAE,UAAU,CAAC,CAAC;KAC5C;AACL,CAAC;AAnBD,4CAmBC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../scripts/macros/index.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../scripts/macros/index.ts"],"names":[],"mappings":";;AAAA,+BAA4B;AAE5B;;GAEG;AACH,SAAG,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { SchemaDefinition } from '@sap/ux-specification-types';
|
|
2
|
+
import type { MacrosAPI } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Method generates generic schema for passed "sap.fe.macros" api.
|
|
5
|
+
* @param {MacrosAPI} api SAPUI5 "sap.fe.macros" api.
|
|
6
|
+
* @returns {SchemaDefinition} JSON schema for "sap.fe.macros" api.
|
|
7
|
+
*/
|
|
8
|
+
export declare function generateSchema(api: MacrosAPI): SchemaDefinition;
|
|
9
|
+
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +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;AAEpE,OAAO,KAAK,EACR,SAAS,EAQZ,MAAM,SAAS,CAAC;AAyKjB;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,GAAG,gBAAgB,CAsC/D"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.generateSchema = void 0;
|
|
4
|
+
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
5
|
+
const types_1 = require("./types");
|
|
6
|
+
const corrections_1 = require("./corrections");
|
|
7
|
+
/**
|
|
8
|
+
* Method checks if passed type is atomic type like 'boolean', 'string', 'number', etc.
|
|
9
|
+
* @param {string} type Type to check.
|
|
10
|
+
* @returns {boolean} Is atomic type.
|
|
11
|
+
*/
|
|
12
|
+
function isAtomicType(type) {
|
|
13
|
+
return ['string', 'number', 'integer', 'boolean', 'object', 'array', 'null', 'any'].includes(type);
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Method returns base/skeleton schema.
|
|
17
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
18
|
+
*/
|
|
19
|
+
function getRootSchema() {
|
|
20
|
+
const hiddenProperty = { type: 'string', hidden: true };
|
|
21
|
+
return {
|
|
22
|
+
type: 'object',
|
|
23
|
+
properties: {
|
|
24
|
+
$filePath: hiddenProperty,
|
|
25
|
+
$schema: hiddenProperty
|
|
26
|
+
},
|
|
27
|
+
additionalProperties: false,
|
|
28
|
+
definitions: {},
|
|
29
|
+
$schema: 'http://json-schema.org/draft-07/schema#'
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Method formats description text before storing it into schema.
|
|
34
|
+
* Currently method removes HTML markup from text.
|
|
35
|
+
* @param {string} [description] Description to format.
|
|
36
|
+
* @returns {string} Formatted description.
|
|
37
|
+
*/
|
|
38
|
+
function formatDescription(description) {
|
|
39
|
+
return description ? description.replace(/<\/?[^>]+(>|$)/g, '') : '';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Method prepares schema definition object.
|
|
43
|
+
* @param {MacrosPropertyType} metadataType Metadata property type.
|
|
44
|
+
* @param {string} [description] Description of definition.
|
|
45
|
+
* @returns {SchemaDefinition} JSON schema for definition.
|
|
46
|
+
*/
|
|
47
|
+
function prepareDefinition(metadataType, description) {
|
|
48
|
+
if (description) {
|
|
49
|
+
// Remove html markup from description
|
|
50
|
+
description = formatDescription(description);
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
description,
|
|
54
|
+
isViewNode: true,
|
|
55
|
+
type: 'object',
|
|
56
|
+
properties: {},
|
|
57
|
+
additionalProperties: false,
|
|
58
|
+
metadata: {
|
|
59
|
+
path: [],
|
|
60
|
+
type: metadataType
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Method prepares schema object for passed type.
|
|
66
|
+
* @param {string} type Type of target property or object.
|
|
67
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
68
|
+
*/
|
|
69
|
+
function getSchemaForType(type) {
|
|
70
|
+
const schema = {};
|
|
71
|
+
if (isAtomicType(type)) {
|
|
72
|
+
schema.type = type;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
schema.$ref = `#/definitions/${type}`;
|
|
76
|
+
}
|
|
77
|
+
return schema;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Method prepares schema object for passed types.
|
|
81
|
+
* @param {string} [type] Type of target property or object.
|
|
82
|
+
* @param {UI5PropertyType[]} [types] Types of target property or object.
|
|
83
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
84
|
+
*/
|
|
85
|
+
function getTypes(type, types) {
|
|
86
|
+
let result = [];
|
|
87
|
+
if (type) {
|
|
88
|
+
result = type.split('|');
|
|
89
|
+
}
|
|
90
|
+
else if (types) {
|
|
91
|
+
result = types.map((propertyType) => propertyType.value);
|
|
92
|
+
}
|
|
93
|
+
return result.map((propertyType) => {
|
|
94
|
+
return getSchemaForType(propertyType);
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Method prepares schema property object for passed generic property.
|
|
99
|
+
* @param {UI5Property} property SAPUI5 property.
|
|
100
|
+
* @param {MacrosPropertyType} metadataType Metadata property type.
|
|
101
|
+
* @param {string} [type] Type of target property or object.
|
|
102
|
+
* @param {UI5PropertyType[]} [types] Types of target property or object.
|
|
103
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
104
|
+
*/
|
|
105
|
+
function prepareSchemaProperty(property, metadataType, type, types) {
|
|
106
|
+
const schemaTypes = getTypes(type, types);
|
|
107
|
+
const isViewNode = schemaTypes.some((schemaType) => !!schemaType.$ref);
|
|
108
|
+
// Define result
|
|
109
|
+
const propertySchema = schemaTypes.length === 1
|
|
110
|
+
? { ...schemaTypes[0] }
|
|
111
|
+
: {
|
|
112
|
+
anyOf: schemaTypes
|
|
113
|
+
};
|
|
114
|
+
propertySchema.description = formatDescription(property.description);
|
|
115
|
+
if (isViewNode) {
|
|
116
|
+
propertySchema.description = property.name;
|
|
117
|
+
propertySchema.isViewNode = true;
|
|
118
|
+
}
|
|
119
|
+
propertySchema.metadata = {
|
|
120
|
+
type: metadataType
|
|
121
|
+
};
|
|
122
|
+
return propertySchema;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Method prepares schema object for passed SAPUI5 property.
|
|
126
|
+
* @param {UI5Property} property SAPUI5 property.
|
|
127
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
128
|
+
*/
|
|
129
|
+
function prepareProperty(property) {
|
|
130
|
+
return prepareSchemaProperty(property, ux_specification_types_1.MacrosPropertyType.Property, property.type, property.types);
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Method prepares schema object for passed SAPUI5 event.
|
|
134
|
+
* @param {UI5Property} property SAPUI5 event.
|
|
135
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
136
|
+
*/
|
|
137
|
+
function prepareEvent(property) {
|
|
138
|
+
return prepareSchemaProperty(property, ux_specification_types_1.MacrosPropertyType.Event, 'string');
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Method prepares schema object for passed SAPUI5 aggregation.
|
|
142
|
+
* @param {UI5Property} property SAPUI5 aggregation.
|
|
143
|
+
* @returns {SchemaDefinition} JSON schema.
|
|
144
|
+
*/
|
|
145
|
+
function prepareAggregations(aggregation) {
|
|
146
|
+
const schemaTypes = getTypes(aggregation.type);
|
|
147
|
+
return {
|
|
148
|
+
description: aggregation.name,
|
|
149
|
+
type: 'object',
|
|
150
|
+
additionalProperties: schemaTypes.length ? schemaTypes[0] : { anyOf: schemaTypes },
|
|
151
|
+
isViewNode: true,
|
|
152
|
+
metadata: {
|
|
153
|
+
path: [],
|
|
154
|
+
type: ux_specification_types_1.MacrosPropertyType.Aggregation
|
|
155
|
+
}
|
|
156
|
+
};
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Method generates generic schema for passed "sap.fe.macros" api.
|
|
160
|
+
* @param {MacrosAPI} api SAPUI5 "sap.fe.macros" api.
|
|
161
|
+
* @returns {SchemaDefinition} JSON schema for "sap.fe.macros" api.
|
|
162
|
+
*/
|
|
163
|
+
function generateSchema(api) {
|
|
164
|
+
// Apply corrections for macros API - there is some missing information in api.json
|
|
165
|
+
corrections_1.applyCorrections(api);
|
|
166
|
+
const schema = getRootSchema();
|
|
167
|
+
const { definitions } = schema;
|
|
168
|
+
// Handle classes
|
|
169
|
+
const classSymbols = api.symbols.filter((symbol) => symbol.kind === types_1.SYMBOL_KIND_CLASS);
|
|
170
|
+
for (const symbol of classSymbols) {
|
|
171
|
+
const definition = prepareDefinition(ux_specification_types_1.MacrosPropertyType.Control, symbol.description);
|
|
172
|
+
definitions[symbol.name] = definition;
|
|
173
|
+
const events = symbol.events || [];
|
|
174
|
+
const { properties = [], aggregations = [] } = symbol[types_1.CLASS_SYMBOL_METADATA_PROPERTY] || {};
|
|
175
|
+
// Handle properties
|
|
176
|
+
for (const property of properties) {
|
|
177
|
+
definition.properties[property.name] = prepareProperty(property);
|
|
178
|
+
}
|
|
179
|
+
// Handle aggregations
|
|
180
|
+
for (const aggregation of aggregations) {
|
|
181
|
+
definition.properties[aggregation.name] = prepareAggregations(aggregation);
|
|
182
|
+
}
|
|
183
|
+
// Handle events
|
|
184
|
+
for (const event of events) {
|
|
185
|
+
definition.properties[event.name] = prepareEvent(event);
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// Handle typedefs
|
|
189
|
+
const typedefSymbols = api.symbols.filter((symbol) => symbol.kind === types_1.SYMBOL_KIND_TYPEDEF);
|
|
190
|
+
for (const symbol of typedefSymbols) {
|
|
191
|
+
const definition = prepareDefinition(ux_specification_types_1.MacrosPropertyType.Control, symbol.description);
|
|
192
|
+
definitions[symbol.name] = definition;
|
|
193
|
+
const properties = symbol.properties || [];
|
|
194
|
+
for (const property of properties) {
|
|
195
|
+
definition.properties[property.name] = prepareProperty(property);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
return schema;
|
|
199
|
+
}
|
|
200
|
+
exports.generateSchema = generateSchema;
|
|
201
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../scripts/macros/schema.ts"],"names":[],"mappings":";;;AACA,wEAAiE;AAWjE,mCAAiG;AACjG,+CAAiD;AAEjD;;;;GAIG;AACH,SAAS,YAAY,CAAC,IAAY;IAC9B,OAAO,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACvG,CAAC;AAED;;;GAGG;AACH,SAAS,aAAa;IAClB,MAAM,cAAc,GAAqB,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1E,OAAO;QACH,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACR,SAAS,EAAE,cAAc;YACzB,OAAO,EAAE,cAAc;SAC1B;QACD,oBAAoB,EAAE,KAAK;QAC3B,WAAW,EAAE,EAAE;QACf,OAAO,EAAE,yCAAyC;KACrD,CAAC;AACN,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,WAAoB;IAC3C,OAAO,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,OAAO,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACzE,CAAC;AAED;;;;;GAKG;AACH,SAAS,iBAAiB,CAAC,YAAgC,EAAE,WAAoB;IAC7E,IAAI,WAAW,EAAE;QACb,sCAAsC;QACtC,WAAW,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;KAChD;IACD,OAAO;QACH,WAAW;QACX,UAAU,EAAE,IAAI;QAChB,IAAI,EAAE,QAAQ;QACd,UAAU,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E,CAAC,MAAM,CAAC,IAAI,KAAK,2BAAmB,CAAoB,CAAC;IAC9G,KAAK,MAAM,MAAM,IAAI,cAAc,EAAE;QACjC,MAAM,UAAU,GAAG,iBAAiB,CAAC,2CAAkB,CAAC,OAAO,EAAE,MAAM,CAAC,WAAW,CAAC,CAAC;QACrF,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;YAC/B,UAAU,CAAC,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,eAAe,CAAC,QAAQ,CAAC,CAAC;SACpE;KACJ;IAED,OAAO,MAAM,CAAC;AAClB,CAAC;AAtCD,wCAsCC"}
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
export declare const SYMBOL_KIND_NAMESPACE = "namespace";
|
|
2
|
+
export declare const SYMBOL_KIND_CLASS = "class";
|
|
3
|
+
export declare const SYMBOL_KIND_TYPEDEF = "typedef";
|
|
4
|
+
export declare const CLASS_SYMBOL_METADATA_PROPERTY = "ui5-metadata";
|
|
5
|
+
export declare type SYMBOL_KIND = typeof SYMBOL_KIND_NAMESPACE | typeof SYMBOL_KIND_CLASS | typeof SYMBOL_KIND_TYPEDEF;
|
|
6
|
+
export interface MacrosAPI {
|
|
7
|
+
symbols: UI5Symbol[];
|
|
8
|
+
}
|
|
9
|
+
export declare enum UI5Visibility {
|
|
10
|
+
public = "public",
|
|
11
|
+
restricted = "restricted",
|
|
12
|
+
hidden = "hidden"
|
|
13
|
+
}
|
|
14
|
+
export interface BaseSymbol {
|
|
15
|
+
name: string;
|
|
16
|
+
basename: string;
|
|
17
|
+
resource: string;
|
|
18
|
+
module: string;
|
|
19
|
+
static: boolean;
|
|
20
|
+
visibility: UI5Visibility;
|
|
21
|
+
description: string;
|
|
22
|
+
displayName: string;
|
|
23
|
+
title: string;
|
|
24
|
+
subTitle: string;
|
|
25
|
+
}
|
|
26
|
+
export declare type UI5Symbol = NamespaceSymbol | ClassSymbol | TypedefSymbol;
|
|
27
|
+
export interface NamespaceSymbol extends BaseSymbol {
|
|
28
|
+
kind: typeof SYMBOL_KIND_NAMESPACE;
|
|
29
|
+
export: string;
|
|
30
|
+
nodes: [];
|
|
31
|
+
}
|
|
32
|
+
export interface ClassSymbol extends BaseSymbol {
|
|
33
|
+
kind: typeof SYMBOL_KIND_CLASS;
|
|
34
|
+
since?: string;
|
|
35
|
+
events?: UI5Event[];
|
|
36
|
+
[CLASS_SYMBOL_METADATA_PROPERTY]?: SymbolMetadata;
|
|
37
|
+
}
|
|
38
|
+
export interface TypedefSymbol extends BaseSymbol {
|
|
39
|
+
kind: typeof SYMBOL_KIND_TYPEDEF;
|
|
40
|
+
properties: UI5Property[];
|
|
41
|
+
aggregations?: UI5Aggregation[];
|
|
42
|
+
}
|
|
43
|
+
export interface SymbolMetadata {
|
|
44
|
+
stereotype: string;
|
|
45
|
+
properties: UI5Property[];
|
|
46
|
+
aggregations: UI5Aggregation[];
|
|
47
|
+
}
|
|
48
|
+
export interface UI5PropertyGeneric {
|
|
49
|
+
name: string;
|
|
50
|
+
description: string;
|
|
51
|
+
visibility: UI5Visibility;
|
|
52
|
+
}
|
|
53
|
+
export interface UI5PropertyCore extends UI5PropertyGeneric {
|
|
54
|
+
methods: string[];
|
|
55
|
+
}
|
|
56
|
+
export interface UI5Event {
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
visibility: UI5Visibility;
|
|
60
|
+
}
|
|
61
|
+
export interface UI5PropertyType {
|
|
62
|
+
value: string;
|
|
63
|
+
}
|
|
64
|
+
export interface UI5Property extends UI5PropertyCore {
|
|
65
|
+
bindable?: boolean;
|
|
66
|
+
group: string;
|
|
67
|
+
defaultValue: unknown;
|
|
68
|
+
type?: string;
|
|
69
|
+
types?: UI5PropertyType[];
|
|
70
|
+
}
|
|
71
|
+
export interface UI5Aggregation extends UI5PropertyCore {
|
|
72
|
+
singularName: string;
|
|
73
|
+
cardinality: string;
|
|
74
|
+
linkEnabled: true;
|
|
75
|
+
type: string;
|
|
76
|
+
}
|
|
77
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +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,oBAAY,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,WAAW;CACpB;AAED,MAAM,WAAW,UAAU;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,aAAa,CAAC;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED,oBAAY,SAAS,GAAG,eAAe,GAAG,WAAW,GAAG,aAAa,CAAC;AAEtE,MAAM,WAAW,eAAgB,SAAQ,UAAU;IAC/C,IAAI,EAAE,OAAO,qBAAqB,CAAC;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,EAAE,CAAC;CACb;AAED,MAAM,WAAW,WAAY,SAAQ,UAAU;IAC3C,I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
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UI5Visibility = exports.CLASS_SYMBOL_METADATA_PROPERTY = exports.SYMBOL_KIND_TYPEDEF = exports.SYMBOL_KIND_CLASS = exports.SYMBOL_KIND_NAMESPACE = void 0;
|
|
4
|
+
exports.SYMBOL_KIND_NAMESPACE = 'namespace';
|
|
5
|
+
exports.SYMBOL_KIND_CLASS = 'class';
|
|
6
|
+
exports.SYMBOL_KIND_TYPEDEF = 'typedef';
|
|
7
|
+
exports.CLASS_SYMBOL_METADATA_PROPERTY = 'ui5-metadata';
|
|
8
|
+
var UI5Visibility;
|
|
9
|
+
(function (UI5Visibility) {
|
|
10
|
+
UI5Visibility["public"] = "public";
|
|
11
|
+
UI5Visibility["restricted"] = "restricted";
|
|
12
|
+
UI5Visibility["hidden"] = "hidden";
|
|
13
|
+
})(UI5Visibility = exports.UI5Visibility || (exports.UI5Visibility = {}));
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../scripts/macros/types.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACpC,QAAA,iBAAiB,GAAG,OAAO,CAAC;AAC5B,QAAA,mBAAmB,GAAG,SAAS,CAAC;AAEhC,QAAA,8BAA8B,GAAG,cAAc,CAAC;AAQ7D,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,kCAAiB,CAAA;IACjB,0CAAyB,CAAA;IACzB,kCAAiB,CAAA;AACrB,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB"}
|
package/dist/src/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAER,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EAEV,6BAA6B,EAChC,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAER,aAAa,EACb,IAAI,EACJ,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,uBAAuB,EACvB,UAAU,EAEV,6BAA6B,EAChC,MAAM,6BAA6B,CAAC;AA2BrC,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAwB5C;;;;;GAKG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAEhE;;;GAGG;AACH,wBAAgB,cAAc,CAAC,kBAAkB,EAAE,wBAAwB,GAAG,MAAM,CAmFnF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,aAAa,CAiBpF;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,gBAAgB,EAAE,sBAAsB,GAAG,MAAM,GAAG,SAAS,CAgCzF;AAED;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,gBAAgB,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAE9F;AAED;;;;GAIG;AACH,wBAAsB,mBAAmB,CAAC,gBAAgB,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,EAAE,CAAC,CAEpG;AAED;;;GAGG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAK1C;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CAAC,qBAAqB,EAAE,6BAA6B,GAAG,MAAM,GAAG,SAAS,CAYhH"}
|
package/dist/src/api.js
CHANGED
|
@@ -80,6 +80,10 @@ function generateSchema(generateParameters) {
|
|
|
80
80
|
const { genericSchema, entitySet, annotations, logger, manifest } = v4Params[ux_specification_types_1.SchemaType.FreestylePage];
|
|
81
81
|
schema = generate_2.generateFreestyleInterfaceV4(ux_specification_types_1.TemplateType.FreestylePageV4, genericSchema, annotations, manifest, entitySet, logger);
|
|
82
82
|
}
|
|
83
|
+
else if (v4Params[ux_specification_types_1.SchemaType.FPMCustomPage]) {
|
|
84
|
+
const { genericSchema, routingId, manifest, views, logger } = v4Params[ux_specification_types_1.SchemaType.FPMCustomPage];
|
|
85
|
+
schema = generate_2.generateFPMCustomPageInterfaceV4(genericSchema, routingId, manifest, views, generateParameters.featureToggles, logger);
|
|
86
|
+
}
|
|
83
87
|
}
|
|
84
88
|
return schema;
|
|
85
89
|
}
|
|
@@ -146,6 +150,9 @@ function importConfig(importParameters) {
|
|
|
146
150
|
else if (v4Params[ux_specification_types_1.SchemaType.AnalyticalListPage]) {
|
|
147
151
|
config = import_2.createListReportConfig(v4Params[ux_specification_types_1.SchemaType.AnalyticalListPage], ux_specification_types_1.SchemaType.AnalyticalListPage);
|
|
148
152
|
}
|
|
153
|
+
else if (v4Params[ux_specification_types_1.SchemaType.FPMCustomPage]) {
|
|
154
|
+
config = import_2.createCustomPageConfig(v4Params[ux_specification_types_1.SchemaType.FPMCustomPage]);
|
|
155
|
+
}
|
|
149
156
|
}
|
|
150
157
|
return config;
|
|
151
158
|
}
|
|
@@ -174,7 +181,7 @@ exports.importProjectSchema = importProjectSchema;
|
|
|
174
181
|
*/
|
|
175
182
|
function getApiVersion() {
|
|
176
183
|
return {
|
|
177
|
-
version: '
|
|
184
|
+
version: '6',
|
|
178
185
|
fpmWriter: '5'
|
|
179
186
|
};
|
|
180
187
|
}
|
package/dist/src/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,wEAAkH;AAalH,iDAK4B;AAC5B,
|
|
1
|
+
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/api.ts"],"names":[],"mappings":";;;AAAA;;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AK,UAAU,aAAa,CAAC,gBAAyC;IACzE,OAAO,qCAA4B,CAAC,gBAAgB,CAAC,CAAC;AAC1D,CAAC;AAFD,sCAEC;AAED;;;;GAIG;AACI,KAAK,UAAU,mBAAmB,CAAC,gBAAyC;IAC/E,OAAO,4BAAuB,CAAC,gBAAgB,CAAC,CAAC;AACrD,CAAC;AAFD,kDAEC;AAED;;;GAGG;AACH,SAAgB,aAAa;IACzB,OAAO;QACH,OAAO,EAAE,GAAG;QACZ,SAAS,EAAE,GAAG;KACjB,CAAC;AACN,CAAC;AALD,sCAKC;AAED;;;;;GAKG;AACH,SAAgB,uBAAuB,CAAC,qBAAoD;IACxF,MAAM,iBAAiB,GAAG,YAAY,CAAC,GAAG,CAAC,qBAAqB,CAAC,eAAe,CAAC,CAAC;IAClF,IAAI,iBAAiB,IAAI,OAAO,iBAAiB,KAAK,UAAU,EAAE;QAC9D,yBAAS,CAAC,qBAAqB,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAC9C,OAAO,iBAAiB,CACpB,qBAAqB,CAAC,QAAQ,EAC9B,qBAAqB,CAAC,IAAI,EAC1B,qBAAqB,CAAC,QAAQ,CACjC,CAAC;KACL;SAAM;QACH,OAAO;KACV;AACL,CAAC;AAZD,0DAYC"}
|
package/dist/src/project.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export interface Project {
|
|
|
6
6
|
annotations: FileData[];
|
|
7
7
|
changes: string[];
|
|
8
8
|
fragments: FileData[];
|
|
9
|
+
views: FileData[];
|
|
9
10
|
}
|
|
10
11
|
export declare const readDirectory: (path: string) => Promise<string[]>;
|
|
11
12
|
export declare const isDirectory: (path: string) => Promise<boolean>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,QAAQ,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"project.d.ts","sourceRoot":"","sources":["../../src/project.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,QAAQ,CAAC;IACnB,WAAW,EAAE,QAAQ,EAAE,CAAC;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,KAAK,EAAE,QAAQ,EAAE,CAAC;CACrB;AAkBD,eAAO,MAAM,aAAa,SAAgB,MAAM,KAAG,QAAQ,MAAM,EAAE,CAUlE,CAAC;AAEF,eAAO,MAAM,WAAW,SAAgB,MAAM,KAAG,QAAQ,OAAO,CAU/D,CAAC;AAcF,eAAO,MAAM,UAAU,WAAkB,MAAM,KAAG,QAAQ,MAAM,EAAE,CAoBjE,CAAC;AA2DF;;;GAGG;AACH,eAAO,MAAM,UAAU,SAAgB,MAAM,KAAG,QAAQ,OAAO,CAiB9D,CAAC"}
|
package/dist/src/project.js
CHANGED
|
@@ -76,9 +76,9 @@ const getChanges = async (webapp) => {
|
|
|
76
76
|
return changes;
|
|
77
77
|
};
|
|
78
78
|
exports.getChanges = getChanges;
|
|
79
|
-
const
|
|
79
|
+
const getExtensionFiles = async (webAppPath, folder = 'fragments') => {
|
|
80
80
|
const fragments = [];
|
|
81
|
-
const directoryPath = path_1.join(webAppPath, 'ext',
|
|
81
|
+
const directoryPath = path_1.join(webAppPath, 'ext', folder);
|
|
82
82
|
if (!(await resourceExists(directoryPath))) {
|
|
83
83
|
return fragments;
|
|
84
84
|
}
|
|
@@ -139,14 +139,16 @@ const getProject = async (root) => {
|
|
|
139
139
|
const manifest = await getManifest(webappPath);
|
|
140
140
|
const annotations = await getAnnotations(manifest, webappPath);
|
|
141
141
|
const changes = await exports.getChanges(webappPath);
|
|
142
|
-
const fragments = await
|
|
142
|
+
const fragments = await getExtensionFiles(webappPath);
|
|
143
|
+
const views = await getExtensionFiles(webappPath, 'views');
|
|
143
144
|
return {
|
|
144
145
|
root,
|
|
145
146
|
name,
|
|
146
147
|
manifest,
|
|
147
148
|
annotations,
|
|
148
149
|
changes,
|
|
149
|
-
fragments
|
|
150
|
+
fragments,
|
|
151
|
+
views
|
|
150
152
|
};
|
|
151
153
|
};
|
|
152
154
|
exports.getProject = getProject;
|