@sap/ux-specification 1.124.19 → 1.124.21
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 +30 -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 +73 -0
- 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 +112 -112
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +16 -0
- package/dist/schemas/v4/ListReportConfig.json +18 -0
- package/dist/schemas/v4/ObjectPageConfig.json +27 -0
- package/dist/specification/package.json +4 -4
- package/dist/specification/scripts/schema/to-json-schema.d.ts +4 -0
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +25 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.js +2 -1
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts +63 -0
- package/dist/specification/src/sync/common/DataFieldStrategy.d.ts.map +1 -0
- package/dist/specification/src/sync/common/DataFieldStrategy.js +357 -0
- package/dist/specification/src/sync/common/DataFieldStrategy.js.map +1 -0
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +62 -1
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +172 -59
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts +19 -1
- package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/utils.js +45 -0
- package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +2 -1
- package/dist/specification/src/sync/common/index.d.ts +1 -0
- package/dist/specification/src/sync/common/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/index.js +1 -0
- package/dist/specification/src/sync/common/index.js.map +1 -1
- package/dist/specification/src/sync/common/utils.d.ts +25 -5
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +40 -65
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts +10 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +9 -2
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -2
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/generate.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/generate.js +5 -2
- package/dist/specification/src/sync/v2/generate/generate.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/index.d.ts +1 -1
- package/dist/specification/src/sync/v2/generate/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/index.js +5 -2
- package/dist/specification/src/sync/v2/generate/index.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts +5 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +27 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +60 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts +84 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +262 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -0
- package/dist/specification/src/sync/v2/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/app/appProvider.js +6 -2
- package/dist/specification/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.d.ts +2 -2
- package/dist/specification/src/sync/v2/import/importPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/import/importPage.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +2 -2
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +4 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js +4 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts +2 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeader.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +3 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +4 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +6 -0
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +7 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts +2 -2
- package/dist/specification/src/sync/v4/export/controls/ToolBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +6 -0
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +7 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/export.js +11 -1
- package/dist/specification/src/sync/v4/export/export.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +2 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +21 -0
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +44 -36
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js +13 -5
- package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/objectPage.js +36 -38
- package/dist/specification/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts +21 -0
- package/dist/specification/src/sync/v4/utils/StableIdHelper.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js +24 -53
- package/dist/specification/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts +71 -2
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +289 -123
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/common/types.d.ts +5 -0
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +5 -0
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts +4 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +4 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +4 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +8 -2
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/package.json +4 -4
|
@@ -4,6 +4,7 @@ exports.getStableIdPartFromDataField = exports.getStableIdPartFromSemanticObject
|
|
|
4
4
|
exports.replaceSpecialChars = replaceSpecialChars;
|
|
5
5
|
exports.getStableIdPartFromValue = getStableIdPartFromValue;
|
|
6
6
|
const utils_1 = require("../../common/utils");
|
|
7
|
+
const DataFieldStrategy_1 = require("../../common/DataFieldStrategy");
|
|
7
8
|
/**
|
|
8
9
|
* Stable Id helper (parts copied from sap.fe.core/helpers/StableIdHelper.ts)
|
|
9
10
|
*/
|
|
@@ -72,6 +73,17 @@ function getStableIdPartFromValue(oValue) {
|
|
|
72
73
|
}
|
|
73
74
|
}
|
|
74
75
|
}
|
|
76
|
+
/**
|
|
77
|
+
* Generates a stable ID part using the provided semantic object and action from the given data field.
|
|
78
|
+
* Combines the semantic object and action properties into a string formatted as `SemanticObject::Action`.
|
|
79
|
+
* If the `RequiresContext` property exists in the data field, it appends `::RequiresContext` to the ID.
|
|
80
|
+
*
|
|
81
|
+
* @param {object} oDataField - The data field containing SemanticObject, Action, and optionally RequiresContext properties.
|
|
82
|
+
* @param {string|object} oDataField.SemanticObject - The semantic object, which can be a string or an object with a $Path property.
|
|
83
|
+
* @param {string|object} oDataField.Action - The action, which can be a string or an object with a $Path property.
|
|
84
|
+
* @param {boolean} [oDataField.RequiresContext] - Indicates if RequiresContext should be appended to the ID.
|
|
85
|
+
* @returns {string} The constructed stable ID part.
|
|
86
|
+
*/
|
|
75
87
|
const getStableIdPartFromSemanticObjectAndAction = function (oDataField) {
|
|
76
88
|
let sIdPart = '';
|
|
77
89
|
if (typeof oDataField.SemanticObject === 'string') {
|
|
@@ -92,60 +104,19 @@ const getStableIdPartFromSemanticObjectAndAction = function (oDataField) {
|
|
|
92
104
|
return sIdPart;
|
|
93
105
|
};
|
|
94
106
|
exports.getStableIdPartFromSemanticObjectAndAction = getStableIdPartFromSemanticObjectAndAction;
|
|
107
|
+
/**
|
|
108
|
+
* Extracts a stable ID part from the provided data field object by utilizing
|
|
109
|
+
* a strategy defined in the data field strategy context.
|
|
110
|
+
*
|
|
111
|
+
* The function determines the appropriate strategy for the given data field type
|
|
112
|
+
* and invokes the `generateStableId` method of the strategy to create the stable ID part.
|
|
113
|
+
*
|
|
114
|
+
* @param {any} oDataField - The data field object from which the stable ID part is to be generated.
|
|
115
|
+
* @returns {string | undefined} The generated stable ID part as a string, or undefined if no strategy is available or applicable.
|
|
116
|
+
*/
|
|
95
117
|
const getStableIdPartFromDataField = function (oDataField) {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
sIdPart = 'DataFieldForAction::';
|
|
99
|
-
sIdPart += oDataField.Action;
|
|
100
|
-
return (0, exports.prepareId)(sIdPart);
|
|
101
|
-
}
|
|
102
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */) {
|
|
103
|
-
sIdPart = 'DataFieldForIntentBasedNavigation::';
|
|
104
|
-
sIdPart += (0, exports.getStableIdPartFromSemanticObjectAndAction)(oDataField);
|
|
105
|
-
return sIdPart;
|
|
106
|
-
}
|
|
107
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* UIAnnotationTypes.DataFieldForAnnotation */) {
|
|
108
|
-
sIdPart = 'DataFieldForAnnotation::';
|
|
109
|
-
sIdPart += (0, exports.prepareId)(oDataField.Target.$AnnotationPath || oDataField.Target.value);
|
|
110
|
-
return sIdPart;
|
|
111
|
-
}
|
|
112
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithAction" /* UIAnnotationTypes.DataFieldWithAction */) {
|
|
113
|
-
sIdPart = 'DataFieldWithAction::';
|
|
114
|
-
if (oDataField.Value) {
|
|
115
|
-
sIdPart += getStableIdPartFromValue(oDataField.Value) + '::';
|
|
116
|
-
}
|
|
117
|
-
sIdPart += oDataField.Action;
|
|
118
|
-
return (0, exports.prepareId)(sIdPart);
|
|
119
|
-
}
|
|
120
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataField" /* UIAnnotationTypes.DataField */) {
|
|
121
|
-
sIdPart = 'DataField::';
|
|
122
|
-
sIdPart += getStableIdPartFromValue(oDataField.Value);
|
|
123
|
-
return (0, exports.prepareId)(sIdPart);
|
|
124
|
-
}
|
|
125
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* UIAnnotationTypes.DataFieldWithIntentBasedNavigation */) {
|
|
126
|
-
sIdPart = 'DataFieldWithIntentBasedNavigation::';
|
|
127
|
-
sIdPart += getStableIdPartFromValue(oDataField.Value) + '::';
|
|
128
|
-
sIdPart += (0, exports.getStableIdPartFromSemanticObjectAndAction)(oDataField);
|
|
129
|
-
return (0, exports.prepareId)(sIdPart);
|
|
130
|
-
}
|
|
131
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* UIAnnotationTypes.DataFieldWithNavigationPath */) {
|
|
132
|
-
sIdPart = 'DataFieldWithNavigationPath::';
|
|
133
|
-
sIdPart += getStableIdPartFromValue(oDataField.Value);
|
|
134
|
-
if (oDataField.Target && oDataField.Target['$NavigationPropertyPath']) {
|
|
135
|
-
sIdPart += '::' + oDataField.Target['$NavigationPropertyPath'];
|
|
136
|
-
}
|
|
137
|
-
return (0, exports.prepareId)(sIdPart);
|
|
138
|
-
}
|
|
139
|
-
else if (oDataField.$Type && oDataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* UIAnnotationTypes.DataFieldWithUrl */) {
|
|
140
|
-
sIdPart = 'DataFieldWithUrl::';
|
|
141
|
-
sIdPart += getStableIdPartFromValue(oDataField.Value);
|
|
142
|
-
return (0, exports.prepareId)(sIdPart);
|
|
143
|
-
}
|
|
144
|
-
else {
|
|
145
|
-
// In case of a string or unknown property
|
|
146
|
-
// Log.error("Stable ID Helper: Unable to create a stable ID. Please check the annotations.");
|
|
147
|
-
}
|
|
148
|
-
return undefined;
|
|
118
|
+
const strategy = DataFieldStrategy_1.dataFieldStrategyContext.getStrategy(oDataField.$Type);
|
|
119
|
+
return strategy?.generateStableId(oDataField);
|
|
149
120
|
};
|
|
150
121
|
exports.getStableIdPartFromDataField = getStableIdPartFromDataField;
|
|
151
122
|
//# sourceMappingURL=StableIdHelper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StableIdHelper.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/utils/StableIdHelper.ts"],"names":[],"mappings":";;;AAaA,kDAoBC;AA+BD,4DAcC;
|
|
1
|
+
{"version":3,"file":"StableIdHelper.js","sourceRoot":"","sources":["../../../../../../src/sync/v4/utils/StableIdHelper.ts"],"names":[],"mappings":";;;AAaA,kDAoBC;AA+BD,4DAcC;AA9ED,8CAAsD;AACtD,sEAA0E;AAE1E;;GAEG;AAEH;;;;;GAKG;AACH,SAAgB,mBAAmB,CAAC,GAAW;IAC3C,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAC1B,OAAO;IACX,CAAC;IACD,GAAG,GAAG,GAAG;SACJ,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,6DAA6D;SAC1F,OAAO,CAAC,eAAe,EAAE,EAAE,CAAC,CAAC,uDAAuD;SACpF,OAAO,CAAC,WAAW,EAAE,IAAI,CAAC,CAAC,CAAC,qCAAqC;IAEtE,sEAAsE;IACtE,OAAO,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC;QAC9B,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC;IAED,kDAAkD;IAClD,IAAI,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QACzB,GAAG,GAAG,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;IAC3B,CAAC;IAED,OAAO,GAAG,CAAC;AACf,CAAC;AAEM,MAAM,SAAS,GAAG,UAAU,GAAW;IAC1C,OAAO,mBAAmB,CAAC,IAAA,wBAAgB,EAAC,GAAG,CAAC,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEF;;;;;GAKG;AACH,SAAS,cAAc,C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GAAG,UAAU,CAAC,MAAM,CAAC;IACxC,CAAC;SAAM,IAAI,UAAU,CAAC,MAAM,IAAI,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;QACtD,OAAO,IAAI,IAAI,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,CAAC;IAC9C,CAAC;IACD,IAAI,UAAU,CAAC,iBAAiB,CAAC,EAAE,CAAC;QAChC,OAAO,IAAI,mBAAmB,CAAC;IACnC,CAAC;IACD,OAAO,OAAO,CAAC;AACnB,CAAC,CAAC;AAhBW,QAAA,0CAA0C,8CAgBrD;AAEF;;;;;;;;;GASG;AACI,MAAM,4BAA4B,GAAG,UAAU,UAAe;IACjE,MAAM,QAAQ,GAAG,4CAAwB,CAAC,WAAW,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC;IACxE,OAAO,QAAQ,EAAE,gBAAgB,CAAC,UAAU,CAAC,CAAC;AAClD,CAAC,CAAC;AAHW,QAAA,4BAA4B,gCAGvC"}
|
|
@@ -1,13 +1,35 @@
|
|
|
1
|
-
import type { LineItem } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
1
|
+
import type { LineItem, DataFieldForActionAbstractTypes } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
2
2
|
import type { AnnotationTerm, ConvertedMetadata, EntitySet, EntityType } from '@sap-ux/vocabularies-types';
|
|
3
3
|
import type { Definition } from 'typescript-json-schema';
|
|
4
|
-
import type
|
|
4
|
+
import { type ExtensionLogger, type GenerateAppSchemaParameters, type FileData, type Manifest } from '@sap/ux-specification-types';
|
|
5
5
|
import { v4, DefinitionName } from '@sap/ux-specification-types';
|
|
6
6
|
import type { ExtensionFileData } from '../types';
|
|
7
|
+
import type { MetadataInstanceInterface } from '../../common/decoration/factory';
|
|
7
8
|
export type CustomExtension = v4.TableCustomColumn | v4.CustomAction | v4.SapUi5RoutingTargetContentSection | v4.SapUiGenericAppPageCustomFilterField;
|
|
8
9
|
export interface CustomExtensions {
|
|
9
10
|
[key: string]: CustomExtension;
|
|
10
11
|
}
|
|
12
|
+
export interface AddLineItemDefinitionParams {
|
|
13
|
+
lineItemData: LineItemDataForSchema;
|
|
14
|
+
actions: Definition;
|
|
15
|
+
lineItemPath: string;
|
|
16
|
+
lineItemRecord: DataFieldForActionAbstractTypes;
|
|
17
|
+
index: number;
|
|
18
|
+
lineItemDefinition?: Definition;
|
|
19
|
+
columnDefinitionName: string;
|
|
20
|
+
}
|
|
21
|
+
export interface ImportActionSettingsOfReferenceParams {
|
|
22
|
+
actionPropertyDefinition: Definition;
|
|
23
|
+
appSchema: Definition;
|
|
24
|
+
factory: MetadataInstanceInterface;
|
|
25
|
+
actionsInConfig: object;
|
|
26
|
+
actionKey: string;
|
|
27
|
+
manifest: Manifest;
|
|
28
|
+
routingId: string;
|
|
29
|
+
manifestSectionId?: string;
|
|
30
|
+
targetAnnotation?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare const DATA_FIELD_FOR_ACTION_GROUP = "DataFieldForActionGroup";
|
|
11
33
|
/**
|
|
12
34
|
* Adds extension at the right position of the sorted array of annotation-based nodes.
|
|
13
35
|
*
|
|
@@ -38,8 +60,46 @@ export declare function addEnumForProperties(lineItems: boolean | Definition, cu
|
|
|
38
60
|
* @param sectionIdInManifest - identifier of the current object page section in manifest
|
|
39
61
|
*/
|
|
40
62
|
export declare function addCustomColumnDefinition(appSchema: Definition, v4Page: v4.SapUiAppPageV4, logger: ExtensionLogger, customColumnDefinitionName?: string, sectionId?: string, sectionIdInManifest?: string): void;
|
|
63
|
+
/**
|
|
64
|
+
* Adds an action record to a schema definition based on the provided line item definition parameters.
|
|
65
|
+
* This involves defining action-specific properties, references, and metadata, and updating the schema accordingly.
|
|
66
|
+
*
|
|
67
|
+
* @param {AddLineItemDefinitionParams} lineItemDefinitionParams - The parameters describing the line item definition, including data, actions, path, record, and index.
|
|
68
|
+
* @param {boolean} [createRef] - A flag indicating whether to create a reference for the action definition.
|
|
69
|
+
* @returns {void} This function does not return a value.
|
|
70
|
+
*/
|
|
71
|
+
export declare function addActionRecordToSchema(lineItemDefinitionParams: AddLineItemDefinitionParams, createRef?: boolean): void;
|
|
72
|
+
/**
|
|
73
|
+
* Adds a group action record to the schema based on the given parameters. This involves determining
|
|
74
|
+
* action definitions, creating or referencing schema properties, and setting metadata fields.
|
|
75
|
+
*
|
|
76
|
+
* @param {AddLineItemDefinitionParams} lineItemDefinitionParams - Parameters that define the line item, including data, record, path, index, and actions.
|
|
77
|
+
* @param {boolean} [createRef] - Indicates whether to create a reference for the action definition or to use an inline object.
|
|
78
|
+
* @returns {void} - Does not return any value.
|
|
79
|
+
*/
|
|
80
|
+
export declare function addGroupActionRecordToSchema(lineItemDefinitionParams: AddLineItemDefinitionParams, createRef?: boolean): void;
|
|
81
|
+
/**
|
|
82
|
+
* Adds a line item action definition to the schema based on the provided parameters.
|
|
83
|
+
* Handles determining which action to take based on specific conditions of the line item record.
|
|
84
|
+
*
|
|
85
|
+
* @param {AddLineItemDefinitionParams} data - An object containing the details of the line item record and the line item definition.
|
|
86
|
+
* @param {object} data.lineItemRecord - The record of the line item to be processed, containing relevant properties.
|
|
87
|
+
* @param {boolean} data.lineItemRecord.Inline - Indicates whether the line item is inline.
|
|
88
|
+
* @param {boolean} data.lineItemRecord.Determining - Indicates if the line item is determining.
|
|
89
|
+
* @param {boolean} data.lineItemDefinition - Indicates whether the line item definition is present.
|
|
90
|
+
* @returns {void} This method does not return a value.
|
|
91
|
+
*/
|
|
92
|
+
export declare function addLineItemActionDefinition(data: AddLineItemDefinitionParams): void;
|
|
93
|
+
/**
|
|
94
|
+
* Adds a line item record to the provided schema based on the definition parameters.
|
|
95
|
+
*
|
|
96
|
+
* @param {AddLineItemDefinitionParams} lineItemDefinitionParams - The parameters defining the line item data, schema information, and record.
|
|
97
|
+
* @returns {void} This function does not return a value.
|
|
98
|
+
*/
|
|
99
|
+
export declare function addLineItemRecordToSchema(lineItemDefinitionParams: AddLineItemDefinitionParams): void;
|
|
41
100
|
export type LineItemDataForSchema = {
|
|
42
101
|
isObjectPage: boolean;
|
|
102
|
+
isMacro?: boolean;
|
|
43
103
|
appSchema: Definition;
|
|
44
104
|
lineItemAnnotation: AnnotationTerm<LineItem>;
|
|
45
105
|
entityType: EntityType;
|
|
@@ -185,4 +245,13 @@ export declare function addCustomSectionDefinition(appSchema: Definition, defini
|
|
|
185
245
|
* @param v4Page - actual page in the manifest
|
|
186
246
|
*/
|
|
187
247
|
export declare function addCustomFilterFieldDefinition(appSchema: Definition, definition: Definition, v4Page: v4.SapUiAppPageV4): void;
|
|
248
|
+
/**
|
|
249
|
+
* Imports the action settings of a specified reference based on the given parameters.
|
|
250
|
+
*
|
|
251
|
+
* @param {object} importActionParams - The parameters required for importing action settings.
|
|
252
|
+
* @param {object} importActionParams.actionPropertyDefinition - The action property definition containing the $ref to the reference.
|
|
253
|
+
* @param {object} importActionParams.appSchema - The application schema containing definitions and other related metadata.
|
|
254
|
+
* @returns {void} This function does not return a value.
|
|
255
|
+
*/
|
|
256
|
+
export declare function importActionSettingsOfReference(importActionParams: ImportActionSettingsOfReferenceParams): void;
|
|
188
257
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,QAAQ,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v4/utils/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACR,QAAQ,EACR,+BAA+B,EAElC,MAAM,4CAA4C,CAAC;AACpD,OAAO,KAAK,EAAE,cAAc,EAAE,iBAAiB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAuB3G,OAAO,KAAK,EAAE,UAAU,EAAuB,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAEH,KAAK,eAAe,EACpB,KAAK,2BAA2B,E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