@sap/ux-specification 1.124.39 → 1.124.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 +41 -9
- package/dist/documentation/{runDocu-min.js → runDocu-min.mjs} +6 -6
- package/dist/documentation/{runDocu-min.js.map → runDocu-min.mjs.map} +2 -2
- package/dist/documentation/v2/v2-AnalyticalListPage.html +4 -4
- package/dist/documentation/v2/v2-ApplicationV2.html +4 -4
- package/dist/documentation/v2/v2-ListReport.html +4 -4
- package/dist/documentation/v2/v2-ListReportNew.html +4 -4
- package/dist/documentation/v2/v2-ObjectPage.html +4 -4
- package/dist/documentation/v2/v2-OverviewPage.html +4 -4
- package/dist/documentation/v4/v4-ApplicationV4.html +4 -4
- package/dist/documentation/v4/v4-BuildingBlocks.html +4 -4
- package/dist/documentation/v4/v4-FreestylePage.html +4 -4
- package/dist/documentation/v4/v4-ListReport.html +4 -4
- package/dist/documentation/v4/v4-ObjectPage.html +4 -4
- package/dist/index-min.mjs +1302 -0
- package/dist/index-min.mjs.map +7 -0
- package/dist/schemas/v2/ListReportNewConfig.json +143 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +8 -2
- package/dist/specification/package.json +17 -11
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +20 -3
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts +9 -0
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +21 -4
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts +21 -0
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js +35 -0
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js +3 -2
- package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts +0 -3
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js +6 -4
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.d.ts +86 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.js +139 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts +11 -52
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js +15 -81
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.d.ts +46 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.js +82 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.d.ts +2 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/actions/index.js +2 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.js.map +1 -1
- package/dist/specification/src/i18n/i18n.js +35 -2
- package/dist/specification/src/i18n/i18n.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +8 -0
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +56 -34
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +9 -2
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +10 -0
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +14 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js +110 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +4 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.d.ts +32 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.js +274 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -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 +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.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 +141 -72
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +66 -4
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +70 -19
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
- package/dist/templates/action/manifest.action-menu.json +10 -0
- package/dist/templates/action/manifest.action.json +13 -0
- package/dist/templates/app/Component.js +13 -0
- package/dist/templates/app/Component.ts +11 -0
- package/dist/templates/building-block/action/View.xml +30 -0
- package/dist/templates/building-block/chart/View.xml +9 -0
- package/dist/templates/building-block/common/manifest.json +7 -0
- package/dist/templates/building-block/custom-column/View.xml +5 -0
- package/dist/templates/building-block/custom-filter-field/View.xml +12 -0
- package/dist/templates/building-block/custom-form-field/View.xml +12 -0
- package/dist/templates/building-block/field/View.xml +8 -0
- package/dist/templates/building-block/filter-bar/View.xml +10 -0
- package/dist/templates/building-block/form/View.xml +4 -0
- package/dist/templates/building-block/page/View.xml +5 -0
- package/dist/templates/building-block/rich-text-editor/View.xml +3 -0
- package/dist/templates/building-block/rich-text-editor-button-groups/View.xml +18 -0
- package/dist/templates/building-block/table/View.xml +19 -0
- package/dist/templates/column/1.84/manifest.json +28 -0
- package/dist/templates/column/1.85/manifest.json +31 -0
- package/dist/templates/column/1.86/manifest.json +43 -0
- package/dist/templates/common/EventHandler.js +25 -0
- package/dist/templates/common/EventHandler.ts +28 -0
- package/dist/templates/common/Fragment.xml +3 -0
- package/dist/templates/common/FragmentWithForm.xml +7 -0
- package/dist/templates/common/FragmentWithVBox.xml +5 -0
- package/dist/templates/common/sap.fe.d.ts +43 -0
- package/dist/templates/controller-extension/Controller.js +18 -0
- package/dist/templates/controller-extension/Controller.ts +20 -0
- package/dist/templates/controller-extension/ControllerExtension.d.ts +11 -0
- package/dist/templates/controller-extension/manifest.json +14 -0
- package/dist/templates/field/manifest.json +32 -0
- package/dist/templates/filter/Controller.js +21 -0
- package/dist/templates/filter/Controller.ts +24 -0
- package/dist/templates/filter/fragment.xml +15 -0
- package/dist/templates/filter/manifest.json +12 -0
- package/dist/templates/header-section/1.85/manifest.json +43 -0
- package/dist/templates/header-section/1.86/manifest.json +45 -0
- package/dist/templates/page/custom/1.84/ext/Controller.js +45 -0
- package/dist/templates/page/custom/1.84/ext/Controller.ts +42 -0
- package/dist/templates/page/custom/1.84/ext/View.xml +6 -0
- package/dist/templates/page/custom/1.84/i18n/i18n.properties +2 -0
- package/dist/templates/page/custom/1.84/manifest.json +32 -0
- package/dist/templates/page/custom/1.94/ext/Controller.js +45 -0
- package/dist/templates/page/custom/1.94/ext/Controller.ts +42 -0
- package/dist/templates/page/custom/1.94/ext/View.xml +6 -0
- package/dist/templates/page/custom/1.94/i18n/i18n.properties +2 -0
- package/dist/templates/page/custom/1.94/manifest.json +33 -0
- package/dist/templates/page/custom/i18n/i18n.properties +2 -0
- package/dist/templates/page/list/manifest.json +20 -0
- package/dist/templates/page/object/manifest.json +33 -0
- package/dist/templates/section/1.85/manifest.json +33 -0
- package/dist/templates/section/1.86/manifest.json +32 -0
- package/dist/templates/subsection/1.85/manifest.json +37 -0
- package/dist/templates/subsection/1.86/manifest.json +36 -0
- package/dist/templates/view/ext/CustomViewWithTable.xml +3 -0
- package/dist/templates/view/manifest.json +41 -0
- package/package.json +17 -11
- package/dist/index-min.js +0 -649
- package/dist/index-min.js.map +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fpmCustomPage.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v4/import/pages/fpmCustomPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,EAAE,EACF,+BAA+B,EAC/B,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,4BAA4B,EAC/B,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"fpmCustomPage.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v4/import/pages/fpmCustomPage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,EAAE,EACF,+BAA+B,EAC/B,gBAAgB,EAChB,UAAU,EACV,eAAe,EACf,4BAA4B,EAC/B,MAAM,6BAA6B,CAAC;AAarC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AA0JrD;;;;;;;GAOG;AACH,wBAAgB,sBAAsB,CAClC,QAAQ,EAAE,iBAAiB,EAC3B,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,eAAe,GACxB,UAAU,CAmBZ;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAClC,gBAAgB,EAAE,+BAA+B,GAClD,EAAE,CAAC,kBAAkB,GAAG,SAAS,CAYnC;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACtC,gBAAgB,EAAE,4BAA4B,EAC9C,YAAY,EAAE,MAAM,GACrB,EAAE,CAAC,kBAAkB,GAAG,SAAS,CAyBnC"}
|
|
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.convertXmlFileToConfig = convertXmlFileToConfig;
|
|
4
4
|
exports.createCustomPageConfig = createCustomPageConfig;
|
|
5
5
|
exports.createCustomFragmentConfig = createCustomFragmentConfig;
|
|
6
|
+
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
7
|
+
const common_1 = require("../../../common");
|
|
6
8
|
const utils_1 = require("../../utils/utils");
|
|
7
9
|
const macros_1 = require("../../utils/macros");
|
|
8
10
|
/**
|
|
@@ -49,8 +51,65 @@ function convertValue(value, schema) {
|
|
|
49
51
|
if (isNumber(valueStr, schema)) {
|
|
50
52
|
return parseFloat(valueStr);
|
|
51
53
|
}
|
|
54
|
+
if (schema.type === 'array') {
|
|
55
|
+
return valueStr ? valueStr.split(',') : [];
|
|
56
|
+
}
|
|
52
57
|
return value;
|
|
53
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Compares two values for equality, with special handling for arrays.
|
|
61
|
+
*
|
|
62
|
+
* @param {unknown} value New value.
|
|
63
|
+
* @param {unknown} existing Current config value.
|
|
64
|
+
* @returns {boolean} True if values are equal.
|
|
65
|
+
*/
|
|
66
|
+
function isValueEqual(value, existing) {
|
|
67
|
+
if (Array.isArray(value) && Array.isArray(existing)) {
|
|
68
|
+
return value.length === existing.length && value.every((v, i) => v === existing[i]);
|
|
69
|
+
}
|
|
70
|
+
return value === existing;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Imports override element attributes and single-aggregation child elements into config.
|
|
74
|
+
*
|
|
75
|
+
* @param {Element} overrideElement Override XML element.
|
|
76
|
+
* @param {SchemaDefinition} property Schema property for the override.
|
|
77
|
+
* @param {object} config Fragment of page config object.
|
|
78
|
+
* @param {string} name Name of property to import.
|
|
79
|
+
* @returns {boolean} True if config was modified.
|
|
80
|
+
*/
|
|
81
|
+
function importOverrideElement(overrideElement, property, config, name) {
|
|
82
|
+
let differs = false;
|
|
83
|
+
const propertySchemas = property.properties ?? {};
|
|
84
|
+
const overrideAttrs = {};
|
|
85
|
+
for (const [key, value] of Object.entries(overrideElement.attributes ?? {})) {
|
|
86
|
+
if (key !== 'key' && value !== undefined) {
|
|
87
|
+
const propSchema = propertySchemas[key];
|
|
88
|
+
overrideAttrs[key] = (0, common_1.isSchemaDefinition)(propSchema) ? convertValue(value, propSchema) : value;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (Object.keys(overrideAttrs).length) {
|
|
92
|
+
config[name] = { ...(config[name] ?? {}), ...overrideAttrs };
|
|
93
|
+
differs = true;
|
|
94
|
+
}
|
|
95
|
+
for (const [propName, propSchema] of Object.entries(propertySchemas)) {
|
|
96
|
+
if (propSchema.metadata?.aggregationCardinality !== ux_specification_types_1.MacrosAggregatioCardinality.Single) {
|
|
97
|
+
continue;
|
|
98
|
+
}
|
|
99
|
+
const controlElement = overrideElement.elements?.find((el) => el.name?.split(':').pop() === propName)
|
|
100
|
+
?.elements?.[0];
|
|
101
|
+
if (!controlElement) {
|
|
102
|
+
continue;
|
|
103
|
+
}
|
|
104
|
+
const controlClassName = controlElement.name?.split(':').pop() ?? '';
|
|
105
|
+
config[name] = {
|
|
106
|
+
...(config[name] ?? {}),
|
|
107
|
+
[propName]: { [controlClassName]: { ...controlElement.attributes } }
|
|
108
|
+
};
|
|
109
|
+
differs = true;
|
|
110
|
+
}
|
|
111
|
+
return differs;
|
|
112
|
+
}
|
|
54
113
|
/**
|
|
55
114
|
* Callback method of traversing schema and XML.
|
|
56
115
|
* Method imports value from XML element to page config object.
|
|
@@ -67,29 +126,21 @@ function importProperty(traverseData, property, config, name) {
|
|
|
67
126
|
// Do not import comments inside XML
|
|
68
127
|
if (element && element.type !== 'comment' && element.attributes && name in element.attributes) {
|
|
69
128
|
const value = convertValue(element.attributes[name], property);
|
|
70
|
-
if (value
|
|
129
|
+
if (!isValueEqual(value, config[name])) {
|
|
71
130
|
config[name] = value;
|
|
72
131
|
differs = true;
|
|
73
132
|
}
|
|
74
133
|
}
|
|
75
|
-
if (property.isViewNode && property.metadata?.overrideClass && element?.elements) {
|
|
76
|
-
const
|
|
77
|
-
const shortName =
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
? convertValue(v, props[k])
|
|
86
|
-
: v;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
if (Object.keys(override).length) {
|
|
90
|
-
config[name] = { ...(config[name] ?? {}), ...override };
|
|
91
|
-
differs = true;
|
|
92
|
-
}
|
|
134
|
+
if (property.isViewNode && property.metadata?.overrideClass && (element?.elements || traverseData.parentElement)) {
|
|
135
|
+
const overrideClassName = property.metadata.overrideClass;
|
|
136
|
+
const shortName = overrideClassName.slice(overrideClassName.lastIndexOf('.') + 1);
|
|
137
|
+
// Override may sit inside the aggregation wrapper OR as a sibling of it at the
|
|
138
|
+
// parent control level (tolerated for hand-edited or legacy XML where the wrapper was omitted).
|
|
139
|
+
const overrideElement = (element && (0, macros_1.findChildElementByLocalNameAndKey)(element, shortName, name)) ??
|
|
140
|
+
(traverseData.parentElement &&
|
|
141
|
+
(0, macros_1.findChildElementByLocalNameAndKey)(traverseData.parentElement, shortName, name));
|
|
142
|
+
if (overrideElement) {
|
|
143
|
+
differs = importOverrideElement(overrideElement, property, config, name) || differs;
|
|
93
144
|
}
|
|
94
145
|
}
|
|
95
146
|
return differs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fpmCustomPage.js","sourceRoot":"","sources":["../../../../../../../src/sync/v4/import/pages/fpmCustomPage.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"fpmCustomPage.js","sourceRoot":"","sources":["../../../../../../../src/sync/v4/import/pages/fpmCustomPage.ts"],"names":[],"mappings":";;AAsLA,wDAuBC;AAQD,wDAcC;AASD,gEA4BC;AA/PD,wEAA0E;AAC1E,4CAAqD;AACrD,6CAAuG;AACvG,+CAM4B;AAI5B;;;;;;GAMG;AACH,SAAS,SAAS,CAAC,KAAa,EAAE,MAAwB;IACtD,MAAM,aAAa,GAAG,SAAS,CAAC;IAChC,IACI,MAAM,CAAC,IAAI,KAAK,aAAa;QAC7B,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,KAAuB,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,KAAK,aAAa,CAAC,EAC/E,CAAC;QACC,OA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C;QACzB,sBAAsB;QACtB,OAAO,SAAS,CAAC;IACrB,CAAC;IACD,MAAM,cAAc,GAAG,IAAA,uBAAe,EAAC,QAAQ,EAAE,SAAS,CAAC,CAAC;IAC5D,MAAM,YAAY,GAAG,IAAA,kCAA0B,EAC3C,SAAS,IAAI,EAAE,EACf,cAAc,EACd,QAAQ,EACR,UAAU,EACV,YAAY,CACf,CAAC;IACF,IAAI,MAAyC,CAAC;IAC9C,IAAI,YAAY,EAAE,CAAC;QACf,MAAM,UAAU,GAAG;YACf,GAAG,MAAM;YACT,WAAW,EAAE,UAAU,CAAC,aAAa,CAAC;SACrB,CAAC;QACtB,MAAM,GAAG,sBAAsB,CAAC,YAAY,EAAE,UAAU,EAAE,MAAM,CAAC,CAAC;IACtE,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<%- name %>": {
|
|
3
|
+
"text": "<%- settings.text %>",
|
|
4
|
+
"menu": <%- JSON.stringify(settings.actions) %><%if (settings.position) {%>,
|
|
5
|
+
"position": {
|
|
6
|
+
"placement": "<%- settings.position.placement %>"<%if (settings.position.anchor !== undefined) {%>,
|
|
7
|
+
"anchor": "<%- settings.position.anchor %>"<% } %>
|
|
8
|
+
}<% } %>
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"<%- name %>": {
|
|
3
|
+
"press": "<%- typeof eventHandler !== 'undefined' ? eventHandler : '' %>",
|
|
4
|
+
"visible": <%- settings.visible -%>,
|
|
5
|
+
"enabled": <%- settings.enabled -%><%if (settings.requiresSelection !== undefined) {%>,
|
|
6
|
+
"requiresSelection": <%- settings.requiresSelection -%><% } %>,
|
|
7
|
+
"text": "<%- settings.text %>"<%if (settings.position) {%>,
|
|
8
|
+
"position": {
|
|
9
|
+
"placement": "<%- settings.position.placement %>"<%if (settings.position.anchor !== undefined) {%>,
|
|
10
|
+
"anchor": "<%- settings.position.anchor %>"<% } %>
|
|
11
|
+
}<% } %>
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<%_ if (!config?.hasAggregation) { _%>
|
|
2
|
+
<<%- macrosNamespace %>:actions>
|
|
3
|
+
<%_ } _%>
|
|
4
|
+
<<%- config?.aggregationNamespace %>:Action
|
|
5
|
+
<%_ if (data.embeddedAction?.eventHandler?.fileName) { _%>
|
|
6
|
+
core:require="{ handler: '<%- data.embeddedAction.eventHandler.fileName %>' }"
|
|
7
|
+
<%_ } _%>
|
|
8
|
+
<%_ if (data.id) { _%>
|
|
9
|
+
id="<%- data.id %>"
|
|
10
|
+
<%_ } _%>
|
|
11
|
+
<%_ if (data.actionKey) { _%>
|
|
12
|
+
key="<%- data.actionKey %>"
|
|
13
|
+
<%_ } _%>
|
|
14
|
+
text="<%- data.text %>"
|
|
15
|
+
<%_ if (data.embeddedAction?.eventHandler?.fnName) { _%>
|
|
16
|
+
press="<%- data.embeddedAction.eventHandler.fnName %>"
|
|
17
|
+
<%_ } _%>
|
|
18
|
+
<%_ if (data.anchor) { _%>
|
|
19
|
+
anchor="<%- data.anchor %>"
|
|
20
|
+
<%_ } _%>
|
|
21
|
+
<%_ if (data.placement) { _%>
|
|
22
|
+
placement="<%- data.placement %>"
|
|
23
|
+
<%_ } _%>
|
|
24
|
+
<%_ if (data.requiresSelection !== undefined) { _%>
|
|
25
|
+
requiresSelection="<%- data.requiresSelection %>"
|
|
26
|
+
<%_ } _%>
|
|
27
|
+
/>
|
|
28
|
+
<%_ if (!config?.hasAggregation) { _%>
|
|
29
|
+
</<%- macrosNamespace %>:actions>
|
|
30
|
+
<%_ } _%>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
<<%- macrosNamespace %>:Chart
|
|
2
|
+
id="<%- data.id %>"<% if (data.metaPath) { %>
|
|
3
|
+
metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
|
|
4
|
+
contextPath="<%- data.contextPath %>"<% } %><% if (data.filterBar) { %>
|
|
5
|
+
filterBar="<%- data.filterBar %>"<% } %><% if (data.personalization) { %>
|
|
6
|
+
personalization="<%- data.personalization %>"<% } %><% if (data.selectionMode) { %>
|
|
7
|
+
selectionMode="<%- data.selectionMode %>"<% } %><% if (data.selectionChange) { %>
|
|
8
|
+
selectionChange="<%- data.selectionChange %>"<% } %>
|
|
9
|
+
/>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<% if (!config?.hasAggregation) { %><<%- macrosNamespace %>:columns>
|
|
2
|
+
<% } %><<%- config?.aggregationNamespace %>:Column <% if (ids.column) { %>id="<%- ids.column %>"<% } %> header="<%- data.title %>" importance="High" <% if (data.width) { %>width="<%- data.width %>"<% } %> <% if (data.position.anchor) { %>anchor="<%- data.position.anchor %>"<% } %> <% if (data.position.placement) { %>placement="<%- data.position.placement %>"<% } %> key="<%- data.columnKey || 'myColumnKey' %>">
|
|
3
|
+
<core:Fragment fragmentName="<%- data.embededFragment.ns %>.<%- data.embededFragment.name %>" type="XML" />
|
|
4
|
+
</<%- config?.aggregationNamespace %>:Column>
|
|
5
|
+
<% if (!config?.hasAggregation) { %></<%- macrosNamespace %>:columns><% } %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<% if (!config?.hasAggregation) { %><<%- macrosNamespace %>:filterFields><% } %>
|
|
2
|
+
<<%- config?.aggregationNamespace %>:FilterField
|
|
3
|
+
key="<%- data.filterFieldKey || 'myFilterFieldKey'%>"
|
|
4
|
+
label="<%- data.label %>"
|
|
5
|
+
<% if (data.id) { %> id="<%- data.id %>"<% } %>
|
|
6
|
+
<% if (data.position.anchor) { %> anchor="<%- data.position.anchor %>"<% } %>
|
|
7
|
+
<% if (data.position.placement) { %> placement="<%- data.position.placement %>"<% } %>
|
|
8
|
+
<% if (data.required) { %> required="<%- data.required %>"<% } %>
|
|
9
|
+
<% if (data.property) { %> property="<%- data.property %>"<% } %>>
|
|
10
|
+
<core:Fragment fragmentName="<%- data.embededFragment.ns %>.<%- data.embededFragment.name %>" type="XML" />
|
|
11
|
+
</<%- config?.aggregationNamespace %>:FilterField>
|
|
12
|
+
<% if (!config?.hasAggregation) { %></<%- macrosNamespace %>:filterFields><% } %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<<%- config?.aggregationNamespace %>:FormElement
|
|
2
|
+
<% if (data.formElementKey) { %> key="<%- data.formElementKey %>"<% } %>
|
|
3
|
+
label="<%- data.label %>"
|
|
4
|
+
<% if (data.id) { %> id="<%- data.id %>"<% } %>
|
|
5
|
+
<% if (data.metaPath) { %> metaPath="<%- data.metaPath %>"<% } %>
|
|
6
|
+
<% if (data.contextPath) { %> contextPath="<%- data.contextPath %>"<% } %>
|
|
7
|
+
<% if (data.position?.anchor) { %> anchor="<%- data.position.anchor %>"<% } %>
|
|
8
|
+
<% if (data.position?.placement) { %> placement="<%- data.position.placement %>"<% } %>>
|
|
9
|
+
<<%- config?.aggregationNamespace %>:fields>
|
|
10
|
+
<core:Fragment fragmentName="<%- data.embededFragment.ns %>.<%- data.embededFragment.name %>" type="XML" />
|
|
11
|
+
</<%- config?.aggregationNamespace %>:fields>
|
|
12
|
+
</<%- config?.aggregationNamespace %>:FormElement>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<<%- macrosNamespace %>:Field
|
|
2
|
+
id="<%- data.id %>"<% if (data.metaPath) { %>
|
|
3
|
+
metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
|
|
4
|
+
contextPath="<%- data.contextPath %>"<% } %><% if (data.formatOptions) { %>
|
|
5
|
+
formatOptions="<%- data.formatOptions %>"<% } %><% if (data.readOnly) { %>
|
|
6
|
+
readOnly="<%- data.readOnly %>"<% } %><% if (data.semanticObject) { %>
|
|
7
|
+
semanticObject="<%- data.semanticObject %>"<% } %>
|
|
8
|
+
/>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
<<%- macrosNamespace %>:FilterBar
|
|
2
|
+
id="<%- data.id %>"<% if (data.metaPath) { %>
|
|
3
|
+
metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
|
|
4
|
+
contextPath="<%- data.contextPath %>"<% } %><% if (data.search) { %>
|
|
5
|
+
search="<%- data.search %>"<% } %><% if (data.filterChanged) { %>
|
|
6
|
+
filterChanged="<%- data.filterChanged %>"<% } %><% if (data.liveMode !== undefined) { %>
|
|
7
|
+
liveMode="<%- data.liveMode %>"<% } %><% if (data.showClearButton !== undefined) { %>
|
|
8
|
+
showClearButton="<%- data.showClearButton %>"<% } %><% if (data.showMessages !== undefined) { %>
|
|
9
|
+
showMessages="<%- data.showMessages %>"<% } %>
|
|
10
|
+
/>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<<%- config.aggregationNamespace %>:buttonGroups>
|
|
2
|
+
<% (data.buttonGroups || []).forEach(function(buttonGroup, idKey) { %>
|
|
3
|
+
<richtexteditor:ButtonGroup
|
|
4
|
+
id="<%- buttonGroup.id || ids[idKey] %>"
|
|
5
|
+
name="<%- buttonGroup.name %>"
|
|
6
|
+
visible="<%- buttonGroup.visible !== undefined ? buttonGroup.visible : true %>"
|
|
7
|
+
buttons="<%- buttonGroup.buttons %>"<%
|
|
8
|
+
if (buttonGroup.priority !== undefined) { %>
|
|
9
|
+
priority="<%- buttonGroup.priority %>"<%
|
|
10
|
+
} %><%
|
|
11
|
+
if (buttonGroup.customToolbarPriority !== undefined) { %>
|
|
12
|
+
customToolbarPriority="<%- buttonGroup.customToolbarPriority %>"<%
|
|
13
|
+
} %><%
|
|
14
|
+
if (buttonGroup.row !== undefined) { %>
|
|
15
|
+
row="<%- buttonGroup.row %>"<%
|
|
16
|
+
} %>/>
|
|
17
|
+
<% }); %>
|
|
18
|
+
</<%- config.aggregationNamespace %>:buttonGroups>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<<%- macrosNamespace %>:Table
|
|
2
|
+
id="<%- data.id %>"<% if (data.metaPath) { %>
|
|
3
|
+
metaPath="<%- data.metaPath %>"<% } %><% if (data.contextPath) { %>
|
|
4
|
+
contextPath="<%- data.contextPath %>"<% } %><% if (data.busy) { %>
|
|
5
|
+
busy="<%- data.busy %>"<% } %><% if (data.enableAutoColumnWidth) { %>
|
|
6
|
+
enableAutoColumnWidth="<%- data.enableAutoColumnWidth %>"<% } %><% if (data.enableExport) { %>
|
|
7
|
+
enableExport="<%- data.enableExport %>"<% } %><% if (data.enableFullScreen) { %>
|
|
8
|
+
enableFullScreen="<%- data.enableFullScreen %>"<% } %><% if (data.enablePaste) { %>
|
|
9
|
+
enablePaste="<%- data.enablePaste %>"<% } %><% if (data.filterBar) { %>
|
|
10
|
+
filterBar="<%- data.filterBar %>"<% } %><% if (data.header) { %>
|
|
11
|
+
header="<%- data.header %>"<% } %><% if (data.headerVisible) { %>
|
|
12
|
+
headerVisible="<%- data.headerVisible %>"<% } %><% if (data.isSearchable) { %>
|
|
13
|
+
isSearchable="<%- data.isSearchable %>"<% } %><% if (data.personalization) { %>
|
|
14
|
+
personalization="<%- data.personalization %>"<% } %><% if (data.readOnly) { %>
|
|
15
|
+
readOnly="<%- data.readOnly %>"<% } %><% if (data.selectionMode) { %>
|
|
16
|
+
selectionMode="<%- data.selectionMode %>"<% } %><% if (data.type) { %>
|
|
17
|
+
type="<%- data.type %>"<% } %><% if (data.variantManagement) { %>
|
|
18
|
+
variantManagement="<%- data.variantManagement %>"<% } %>
|
|
19
|
+
/>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sap.ui5": {
|
|
3
|
+
"routing": {
|
|
4
|
+
"targets": {
|
|
5
|
+
"<%- target %>": {
|
|
6
|
+
"options": {
|
|
7
|
+
"settings": {
|
|
8
|
+
"controlConfiguration": {
|
|
9
|
+
"<%- targetEntity %>": {
|
|
10
|
+
"columns": {
|
|
11
|
+
"<%- name %>": {
|
|
12
|
+
"header": "<%- header %>",
|
|
13
|
+
<% if (locals.width) { %>
|
|
14
|
+
"width": "<%- width %>",
|
|
15
|
+
<% } %>
|
|
16
|
+
"position": <%- JSON.stringify(position) %>,
|
|
17
|
+
"template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>"
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sap.ui5": {
|
|
3
|
+
"routing": {
|
|
4
|
+
"targets": {
|
|
5
|
+
"<%- target %>": {
|
|
6
|
+
"options": {
|
|
7
|
+
"settings": {
|
|
8
|
+
"controlConfiguration": {
|
|
9
|
+
"<%- targetEntity %>": {
|
|
10
|
+
"columns": {
|
|
11
|
+
"<%- name %>": {
|
|
12
|
+
"header": "<%- header %>",
|
|
13
|
+
<% if (locals.width) { %>
|
|
14
|
+
"width": "<%- width %>",
|
|
15
|
+
<% } %>
|
|
16
|
+
"position": <%- JSON.stringify(position) %>,
|
|
17
|
+
"template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>"
|
|
18
|
+
<% if (locals.availability) { %>
|
|
19
|
+
, "availability": "<%- availability %>"
|
|
20
|
+
<% } %>
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"sap.ui5": {
|
|
3
|
+
"routing": {
|
|
4
|
+
"targets": {
|
|
5
|
+
"<%- target %>": {
|
|
6
|
+
"options": {
|
|
7
|
+
"settings": {
|
|
8
|
+
"controlConfiguration": {
|
|
9
|
+
"<%- targetEntity %>": {
|
|
10
|
+
"columns": {
|
|
11
|
+
"<%- name %>": {
|
|
12
|
+
"header": "<%- header %>",
|
|
13
|
+
<% if (locals.width) { %> "width": "<%- width %>", <%
|
|
14
|
+
} %>
|
|
15
|
+
"position": <%- JSON.stringify(position) %>,
|
|
16
|
+
<% if (locals.horizontalAlign) { %> "horizontalAlign": "<%- horizontalAlign %>", <%
|
|
17
|
+
} %>
|
|
18
|
+
"template": "<%- ns %>.<%- typeof fragmentFile !== 'undefined' ? fragmentFile : name %>"
|
|
19
|
+
<% if (locals.availability) { %> , "availability": "<%- availability %>" <%
|
|
20
|
+
} %>
|
|
21
|
+
<% if (locals.properties) { %> , "properties": [
|
|
22
|
+
<% for (var i =0; i < properties.length; i++) { %>
|
|
23
|
+
"<%- properties[i] %>"
|
|
24
|
+
<% if (i < properties.length - 1) { %>
|
|
25
|
+
,
|
|
26
|
+
<%
|
|
27
|
+
} %>
|
|
28
|
+
<%
|
|
29
|
+
} %>
|
|
30
|
+
]
|
|
31
|
+
<%
|
|
32
|
+
} %>
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
sap.ui.define([
|
|
2
|
+
"sap/m/MessageToast"
|
|
3
|
+
], function(MessageToast) {
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
6
|
+
return {
|
|
7
|
+
<% if (typeof parameters !== "undefined" && parameters.length) { -%>
|
|
8
|
+
/**
|
|
9
|
+
* Generated event handler.
|
|
10
|
+
*
|
|
11
|
+
<% parameters.forEach(function(param) { -%>
|
|
12
|
+
* @param <%- param.jsName %> <%- param.description %>
|
|
13
|
+
<% }) -%>
|
|
14
|
+
*/
|
|
15
|
+
<% } -%>
|
|
16
|
+
<%- eventHandlerFnName %>: function(<%=
|
|
17
|
+
(typeof parameters !== "undefined" ? parameters : [])
|
|
18
|
+
.map(function(param) {
|
|
19
|
+
return param.jsName;
|
|
20
|
+
}).join(", ")
|
|
21
|
+
-%>) {
|
|
22
|
+
MessageToast.show("Custom handler invoked.");
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
});
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import ExtensionAPI from 'sap/fe/core/ExtensionAPI';
|
|
2
|
+
<%
|
|
3
|
+
const importedTypes = new Set();
|
|
4
|
+
parameters.forEach(param => {
|
|
5
|
+
if (param.importType && !importedTypes.has(param.importType)) {
|
|
6
|
+
importedTypes.add(param.importType);
|
|
7
|
+
-%>
|
|
8
|
+
import <%- param.importType %> from '<%- param.importSource %>';
|
|
9
|
+
<%
|
|
10
|
+
}
|
|
11
|
+
}); -%>
|
|
12
|
+
import MessageToast from 'sap/m/MessageToast';
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Generated event handler.
|
|
16
|
+
*
|
|
17
|
+
* @param this reference to the 'this' that the event handler is bound to.
|
|
18
|
+
<% parameters.forEach(function(param) { -%>
|
|
19
|
+
* @param <%- param.name %> <%- param.description %>
|
|
20
|
+
<% }) -%>
|
|
21
|
+
*/
|
|
22
|
+
export function <%- eventHandlerFnName %>(this: ExtensionAPI, <%=
|
|
23
|
+
parameters.map(function(param) {
|
|
24
|
+
return param.name + ": " + (param.paramType ?? param.importType);
|
|
25
|
+
}).join(", ")
|
|
26
|
+
%>) {
|
|
27
|
+
MessageToast.show("Custom handler invoked.");
|
|
28
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m" xmlns:f="sap.ui.layout.form"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
|
|
2
|
+
<f:FormElement id="<%- ids.formElement %>"<%- typeof requireAttribute !== 'undefined' ? ` ${requireAttribute}` : '' %>>
|
|
3
|
+
<f:fields>
|
|
4
|
+
<%- content %>
|
|
5
|
+
</f:fields>
|
|
6
|
+
</f:FormElement>
|
|
7
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m"<%- typeof dependencies !== 'undefined' ? ` ${dependencies}` : '' %>>
|
|
2
|
+
<VBox id="<%- ids.vbox %>"<%- typeof requireAttribute !== 'undefined' ? ` ${requireAttribute}` : '' %>>
|
|
3
|
+
<%- content %>
|
|
4
|
+
</VBox>
|
|
5
|
+
</core:FragmentDefinition>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import ExtensionAPI from 'sap/fe/core/ExtensionAPI';
|
|
2
|
+
import Routing from 'sap/fe/core/controllerextensions/Routing';
|
|
3
|
+
import EditFlow from 'sap/fe/core/controllerextensions/EditFlow';
|
|
4
|
+
import IntentBasedNavigation from 'sap/fe/core/controllerextensions/IntentBasedNavigation';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Missing public properties (https://ui5.sap.com/#/api/sap.fe.core.ExtensionAPI)
|
|
8
|
+
*/
|
|
9
|
+
interface ExtensionAPIProperties {
|
|
10
|
+
routing: Routing;
|
|
11
|
+
editFlow: EditFlow;
|
|
12
|
+
intentBasedNavigation: IntentBasedNavigation;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Add missing public properties
|
|
17
|
+
*/
|
|
18
|
+
declare module 'sap/fe/core/ExtensionAPI' {
|
|
19
|
+
export default interface ExtensionAPI extends ExtensionAPIProperties {}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Add missing public properties
|
|
24
|
+
*/
|
|
25
|
+
declare module 'sap/fe/templates/ObjectPage/ExtensionAPI' {
|
|
26
|
+
export default interface ExtensionAPI extends ExtensionAPIProperties {}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Add missing public properties
|
|
31
|
+
*/
|
|
32
|
+
declare module 'sap/fe/templates/ListReport/ExtensionAPI' {
|
|
33
|
+
export default interface ExtensionAPI extends ExtensionAPIProperties {}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Enhancing the PageController type to simplify the work with the extension API
|
|
38
|
+
*/
|
|
39
|
+
declare module 'sap/fe/core/PageController' {
|
|
40
|
+
export default interface PageController {
|
|
41
|
+
getExtensionAPI() : ExtensionAPI;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
sap.ui.define(['sap/ui/core/mvc/ControllerExtension'], function (ControllerExtension) {
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
return ControllerExtension.extend('<%- ns %>.<%- name %>', {
|
|
5
|
+
// this section allows to extend lifecycle hooks or hooks provided by Fiori elements
|
|
6
|
+
override: {
|
|
7
|
+
/**
|
|
8
|
+
* Called when a controller is instantiated and its View controls (if available) are already created.
|
|
9
|
+
* Can be used to modify the View before it is displayed, to bind event handlers and do other one-time initialization.
|
|
10
|
+
* @memberOf <%- ns %>.<%- name %>
|
|
11
|
+
*/
|
|
12
|
+
onInit: function () {
|
|
13
|
+
// you can access the Fiori elements extensionAPI via this.base.getExtensionAPI
|
|
14
|
+
var oModel = this.base.getExtensionAPI().getModel();
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
});
|