@sap/ux-specification 1.84.36 → 1.84.37
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 +28 -2
- 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-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/AnalyticalListPageConfig.json +9 -5
- package/dist/schemas/v2/ListReportConfig.json +11 -7
- package/dist/schemas/v2/ObjectPageConfig.json +11 -7
- package/dist/schemas/v4/ListReportConfig.json +22 -2
- package/dist/schemas/v4/ObjectPageConfig.json +36 -0
- package/dist/specification/v2/index-min.js +1 -1
- package/dist/src/apiTypes.d.ts +2 -1
- package/dist/src/specification/v2/controls/ObjectPageTable.d.ts +2 -3
- package/dist/src/specification/v2/controls/Table.d.ts +5 -2
- package/dist/src/specification/v2/controls/Table.js +5 -0
- package/dist/src/specification/v2/controls/Table.js.map +1 -1
- package/dist/src/specification/v4/controls/ObjectPageSection.d.ts +22 -1
- package/dist/src/specification/v4/controls/ObjectPageSection.js.map +1 -1
- package/dist/src/specification/v4/controls/Table.d.ts +4 -0
- package/dist/src/sync/common/decoration/control.js +26 -21
- package/dist/src/sync/common/decoration/control.js.map +1 -1
- package/dist/src/sync/common/generate/objectPage.js +7 -7
- package/dist/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +39 -8
- package/dist/src/sync/common/generate/utils.js +89 -20
- package/dist/src/sync/common/generate/utils.js.map +1 -1
- package/dist/src/sync/common/importProject.js +20 -19
- package/dist/src/sync/common/importProject.js.map +1 -1
- package/dist/src/sync/common/types.d.ts +57 -8
- package/dist/src/sync/common/types.js +52 -4
- package/dist/src/sync/common/types.js.map +1 -1
- package/dist/src/sync/common/utils.d.ts +16 -11
- package/dist/src/sync/common/utils.js +87 -52
- package/dist/src/sync/common/utils.js.map +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js +1 -1
- package/dist/src/sync/v2/export/controls/AnalyticalListPageChart.js.map +1 -1
- package/dist/src/sync/v2/export/controls/ObjectPageTable.d.ts +2 -3
- package/dist/src/sync/v2/export/controls/ObjectPageTable.js.map +1 -1
- package/dist/src/sync/v2/export/controls/Table.d.ts +3 -3
- package/dist/src/sync/v2/export/controls/Table.js +89 -48
- package/dist/src/sync/v2/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v2/export/export.d.ts +0 -1
- package/dist/src/sync/v2/export/export.js +219 -157
- package/dist/src/sync/v2/export/export.js.map +1 -1
- package/dist/src/sync/v2/export/exportPage.js +2 -1
- package/dist/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/src/sync/v2/export/manifest.d.ts +6 -0
- package/dist/src/sync/v2/export/manifest.js +50 -35
- package/dist/src/sync/v2/export/manifest.js.map +1 -1
- package/dist/src/sync/v2/export/pages/OverviewPage.d.ts +1 -1
- package/dist/src/sync/v2/export/pages/OverviewPage.js +18 -16
- package/dist/src/sync/v2/export/pages/OverviewPage.js.map +1 -1
- package/dist/src/sync/v2/generate/analyticalListReport.js +3 -3
- package/dist/src/sync/v2/generate/analyticalListReport.js.map +1 -1
- package/dist/src/sync/v2/generate/objectPage.js +33 -32
- package/dist/src/sync/v2/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v2/generate/utils.d.ts +5 -4
- package/dist/src/sync/v2/generate/utils.js +93 -90
- package/dist/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/src/sync/v2/import/app/appProvider.d.ts +9 -0
- package/dist/src/sync/v2/import/app/appProvider.js +36 -13
- package/dist/src/sync/v2/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js +1 -1
- package/dist/src/sync/v2/import/app/ovpProvider.js.map +1 -1
- package/dist/src/sync/v2/import/common/index.js +5 -5
- package/dist/src/sync/v2/import/common/index.js.map +1 -1
- package/dist/src/sync/v2/import/pages/objectPage.js +31 -34
- package/dist/src/sync/v2/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/application.d.ts +22 -10
- package/dist/src/sync/v4/application.js +67 -18
- package/dist/src/sync/v4/application.js.map +1 -1
- package/dist/src/sync/v4/export/controls/Table.d.ts +4 -0
- package/dist/src/sync/v4/export/controls/Table.js +78 -43
- package/dist/src/sync/v4/export/controls/Table.js.map +1 -1
- package/dist/src/sync/v4/export/controls/TableColumn.js +4 -4
- package/dist/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/src/sync/v4/export/export.js +300 -170
- package/dist/src/sync/v4/export/export.js.map +1 -1
- package/dist/src/sync/v4/export/pages/ObjectPage.js +3 -2
- package/dist/src/sync/v4/export/pages/ObjectPage.js.map +1 -1
- package/dist/src/sync/v4/export/types.d.ts +5 -5
- package/dist/src/sync/v4/generate/listReport.js +114 -70
- package/dist/src/sync/v4/generate/listReport.js.map +1 -1
- package/dist/src/sync/v4/generate/objectPage.d.ts +1 -1
- package/dist/src/sync/v4/generate/objectPage.js +302 -143
- package/dist/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/app/appProvider.js +32 -22
- package/dist/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/src/sync/v4/import/pages/objectPage.d.ts +13 -0
- package/dist/src/sync/v4/import/pages/objectPage.js +64 -35
- package/dist/src/sync/v4/import/pages/objectPage.js.map +1 -1
- package/dist/src/sync/v4/import/utils.d.ts +2 -1
- package/dist/src/sync/v4/import/utils.js.map +1 -1
- package/dist/src/sync/v4/types.d.ts +2 -0
- package/dist/src/sync/v4/utils/StableIdHelper.js +13 -10
- package/dist/src/sync/v4/utils/StableIdHelper.js.map +1 -1
- package/dist/src/sync/v4/utils/utils.d.ts +4 -3
- package/dist/src/sync/v4/utils/utils.js +20 -20
- package/dist/src/sync/v4/utils/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { Manifest } from '../../specification/common/webapp/manifest';
|
|
2
|
-
import type { EntityType } from '@sap-ux/vocabularies-types';
|
|
2
|
+
import type { AnnotationTerm, CollectionFacet, EntityType, ReferenceFacet, ReferenceURLFacet } from '@sap-ux/vocabularies-types';
|
|
3
3
|
import type { ManifestSettingsType } from '../../specification/common/types';
|
|
4
|
+
export declare type anyFacetType = AnnotationTerm<CollectionFacet> | AnnotationTerm<ReferenceFacet> | AnnotationTerm<ReferenceURLFacet>;
|
|
4
5
|
export declare enum ExportArtifacts {
|
|
5
6
|
flex = "flex",
|
|
6
7
|
manifest = "manifest"
|
|
@@ -109,12 +110,13 @@ export interface FlexAdapter {
|
|
|
109
110
|
importFlexValue?: importFlexValue;
|
|
110
111
|
}
|
|
111
112
|
export declare type ManifestPath = (pageKeys?: string[], manifest?: Manifest, ...pathParts: string[]) => string;
|
|
113
|
+
export declare type ExportHandlerFunction = (manifestSection: unknown, configObject: unknown, key: string, manifestKey?: string, ...pathParts: string[]) => unknown;
|
|
112
114
|
export interface ManifestConverter {
|
|
113
115
|
path: ManifestPath;
|
|
114
116
|
key?: string;
|
|
115
117
|
import?: ((manifestSection: unknown, sectionId?: string, propertyKey?: string, breadcrumbs?: string[]) => unknown) | boolean;
|
|
116
|
-
export?:
|
|
117
|
-
delete?: (manifestSection: unknown, configObject: unknown, key: string, manifestKey: string) => unknown;
|
|
118
|
+
export?: ExportHandlerFunction | boolean;
|
|
119
|
+
delete?: ((manifestSection: unknown, configObject: unknown, key: string, manifestKey: string, syncRuleKey?: string) => unknown) | boolean;
|
|
118
120
|
}
|
|
119
121
|
export interface SyncRule {
|
|
120
122
|
flex?: FlexAdapter;
|
|
@@ -168,6 +170,7 @@ export declare enum FacetBase {
|
|
|
168
170
|
DataPoint = "DataPoint",
|
|
169
171
|
Address = "Address",
|
|
170
172
|
Contact = "Contact",
|
|
173
|
+
PresentationVariant = "PresentationVariant",
|
|
171
174
|
Unknown = ""
|
|
172
175
|
}
|
|
173
176
|
export interface FacetConfig {
|
|
@@ -230,31 +233,65 @@ export declare enum DefinitionName {
|
|
|
230
233
|
AnalyticalListPageFilterBar = "AnalyticalListPageFilterBar",
|
|
231
234
|
AnnotationPathAsObject = "AnnotationPathAsObject",
|
|
232
235
|
ChartToolBarAction = "ChartToolBarAction",
|
|
236
|
+
CommonHeaderFacetSettings = "CommonHeaderFacetSettings",
|
|
233
237
|
CustomColumn = "TableCustomColumn",
|
|
234
238
|
CustomColumnOP = "TableCustomColumnOP",
|
|
235
239
|
CustomColumns = "TableCustomColumns",
|
|
240
|
+
CustomSections = "CustomSections",
|
|
241
|
+
FieldPath = "FieldPath",
|
|
236
242
|
Fields = "Fields",
|
|
243
|
+
Fields4Dialog = "Fields4Dialog",
|
|
244
|
+
Footer = "Footer",
|
|
237
245
|
FooterActions = "FooterActions",
|
|
238
246
|
Form = "Form",
|
|
239
247
|
FormAction = "FormAction",
|
|
240
248
|
GenericActions = "GenericActions",
|
|
249
|
+
GenericColumnsOP = "GenericColumnsOP",
|
|
250
|
+
GenericFooter = "GenericFooter",
|
|
251
|
+
GenericSections = "GenericSections",
|
|
241
252
|
HeaderActions = "HeaderActions",
|
|
253
|
+
HeaderSections = "HeaderSections",
|
|
242
254
|
LineItems = "LineItems",
|
|
243
255
|
LineItemsOfView = "LineItemsOfView",
|
|
244
256
|
ListReportFilterBar = "ListReportFilterBar",
|
|
245
257
|
LRTableView = "LRTableView",
|
|
246
258
|
LRChartView = "LRChartView",
|
|
247
259
|
MultiTableModeV4 = "MultiTableModeV4",
|
|
260
|
+
ObjectPageChart = "ObjectPageChart",
|
|
261
|
+
ObjectPageCustomSectionFragment = "ObjectPageCustomSectionFragment",
|
|
248
262
|
ObjectPageFooter = "ObjectPageFooter",
|
|
249
263
|
ObjectPageFooterAction = "ObjectPageFooterAction",
|
|
250
264
|
ObjectPageFooterActions = "ObjectPageFooterActions",
|
|
251
265
|
ObjectPageHeader = "ObjectPageHeader",
|
|
266
|
+
ObjectPageHeaderSectionForm = "ObjectPageHeaderSectionForm",
|
|
267
|
+
ObjectPageHeaderSectionChart = "ObjectPageHeaderSectionChart",
|
|
268
|
+
ObjectPageHeaderSectionDataPoint = "ObjectPageHeaderSectionDataPoint",
|
|
269
|
+
ObjectPageHeaderSectionContact = "ObjectPageHeaderSectionContact",
|
|
270
|
+
ObjectPageHeaderSectionAddress = "ObjectPageHeaderSectionAddress",
|
|
271
|
+
ObjectPageLayout = "ObjectPageLayout",
|
|
272
|
+
ObjectPagePresentationVariant = "ObjectPagePresentationVariant",
|
|
273
|
+
ObjectPageSectionAddress = "ObjectPageSectionAddress",
|
|
274
|
+
ObjectPageSectionChart = "ObjectPageSectionChart",
|
|
275
|
+
ObjectPageSectionContact = "ObjectPageSectionContact",
|
|
276
|
+
ObjectPageSectionDataPoint = "ObjectPageSectionDataPoint",
|
|
277
|
+
ObjectPageSectionForm = "ObjectPageSectionForm",
|
|
278
|
+
ObjectPageSectionPresentationVariant = "ObjectPageSectionPresentationVariant",
|
|
279
|
+
ObjectPageSectionTableV4 = "ObjectPageSectionTableV4",
|
|
280
|
+
ObjectPageSubSections = "ObjectPageSubSections",
|
|
252
281
|
ObjectPageTable = "ObjectPageTable",
|
|
253
282
|
ObjectPageTableColumn = "ObjectPageTableColumn",
|
|
283
|
+
ObjectPageToolBar = "ObjectPageToolBar",
|
|
254
284
|
ObjectPageToolBarAction = "ObjectPageToolBarAction",
|
|
285
|
+
ObjectPageToolBarActions = "ObjectPageToolBarActions",
|
|
255
286
|
Position = "Position",
|
|
256
287
|
PositionOP = "PositionOP",
|
|
288
|
+
QuickVariant = "QuickVariant",
|
|
289
|
+
QuickVariantSelectionOP = "QuickVariantSelectionOP",
|
|
290
|
+
QuickVariantSelectionV4OP = "QuickVariantSelectionV4OP",
|
|
291
|
+
RelatedFacetKeys = "RelatedFacetKeys",
|
|
292
|
+
Sections = "Sections",
|
|
257
293
|
Table = "Table",
|
|
294
|
+
TableSPV = "TableSPV",
|
|
258
295
|
TableColumn = "TableColumn",
|
|
259
296
|
ToolBarAction = "ToolBarAction",
|
|
260
297
|
ToolBarLR = "ToolBar<LineItems>",
|
|
@@ -264,21 +301,33 @@ export declare enum DefinitionName {
|
|
|
264
301
|
ViewChartToolBar = "ViewChartToolBar",
|
|
265
302
|
ViewToolBarAction = "ViewToolBarAction"
|
|
266
303
|
}
|
|
304
|
+
export declare enum PropertyName {
|
|
305
|
+
actions = "actions",
|
|
306
|
+
annotationPath = "annotationPath",
|
|
307
|
+
chart = "chart",
|
|
308
|
+
defaultPath = "defaultPath",
|
|
309
|
+
defaultTemplateAnnotationPath = "defaultTemplateAnnotationPath",
|
|
310
|
+
sections = "sections",
|
|
311
|
+
table = "table",
|
|
312
|
+
views = "views"
|
|
313
|
+
}
|
|
267
314
|
export declare enum SchemaTag {
|
|
268
|
-
hidden = "hidden",
|
|
269
|
-
isViewNode = "isViewNode",
|
|
270
315
|
annotationPath = "annotationPath",
|
|
271
316
|
annotationType = "annotationType",
|
|
272
|
-
dataType = "dataType",
|
|
273
|
-
propertyIndex = "propertyIndex",
|
|
274
317
|
artifactType = "artifactType",
|
|
275
|
-
|
|
318
|
+
dataType = "dataType",
|
|
319
|
+
fullyQualifiedName = "fullyQualifiedName",
|
|
320
|
+
hidden = "hidden",
|
|
321
|
+
isViewNode = "isViewNode",
|
|
322
|
+
key = "key",
|
|
323
|
+
propertyIndex = "propertyIndex"
|
|
276
324
|
}
|
|
277
325
|
export declare const METADATAPATH = "webapp/localService/metadata.xml";
|
|
278
326
|
export declare const MANIFESTPATH = "webapp/manifest.json";
|
|
279
327
|
export declare const VOCWITHSLASH = "/@com.sap.vocabularies";
|
|
280
328
|
export declare const VOCWITHCOLONS = "::@com.sap.vocabularies";
|
|
281
329
|
export declare const UIVOCABULARY = "com.sap.vocabularies.UI.v1";
|
|
330
|
+
export declare const UIVOCABULARYDOT = "com.sap.vocabularies.UI.v1.";
|
|
282
331
|
export declare const QUICKVARPATH = "/quickVariantSelection";
|
|
283
332
|
export declare const QUICKVARPATHX = "/quickVariantSelectionX";
|
|
284
333
|
export declare const DATESETTINGSPATH = "/filterSettings/dateSettings";
|
|
@@ -79,6 +79,7 @@ var FacetBase;
|
|
|
79
79
|
FacetBase["DataPoint"] = "DataPoint";
|
|
80
80
|
FacetBase["Address"] = "Address";
|
|
81
81
|
FacetBase["Contact"] = "Contact";
|
|
82
|
+
FacetBase["PresentationVariant"] = "PresentationVariant";
|
|
82
83
|
FacetBase["Unknown"] = "";
|
|
83
84
|
})(FacetBase = exports.FacetBase || (exports.FacetBase = {}));
|
|
84
85
|
exports.BindingPropertyRegexAsString = "^{[A-Za-z0-9{}&$!@#? _|,<>'()[\\]\\/:=.]+}$";
|
|
@@ -101,31 +102,65 @@ var DefinitionName;
|
|
|
101
102
|
DefinitionName["AnalyticalListPageFilterBar"] = "AnalyticalListPageFilterBar";
|
|
102
103
|
DefinitionName["AnnotationPathAsObject"] = "AnnotationPathAsObject";
|
|
103
104
|
DefinitionName["ChartToolBarAction"] = "ChartToolBarAction";
|
|
105
|
+
DefinitionName["CommonHeaderFacetSettings"] = "CommonHeaderFacetSettings";
|
|
104
106
|
DefinitionName["CustomColumn"] = "TableCustomColumn";
|
|
105
107
|
DefinitionName["CustomColumnOP"] = "TableCustomColumnOP";
|
|
106
108
|
DefinitionName["CustomColumns"] = "TableCustomColumns";
|
|
109
|
+
DefinitionName["CustomSections"] = "CustomSections";
|
|
110
|
+
DefinitionName["FieldPath"] = "FieldPath";
|
|
107
111
|
DefinitionName["Fields"] = "Fields";
|
|
112
|
+
DefinitionName["Fields4Dialog"] = "Fields4Dialog";
|
|
113
|
+
DefinitionName["Footer"] = "Footer";
|
|
108
114
|
DefinitionName["FooterActions"] = "FooterActions";
|
|
109
115
|
DefinitionName["Form"] = "Form";
|
|
110
116
|
DefinitionName["FormAction"] = "FormAction";
|
|
111
117
|
DefinitionName["GenericActions"] = "GenericActions";
|
|
118
|
+
DefinitionName["GenericColumnsOP"] = "GenericColumnsOP";
|
|
119
|
+
DefinitionName["GenericFooter"] = "GenericFooter";
|
|
120
|
+
DefinitionName["GenericSections"] = "GenericSections";
|
|
112
121
|
DefinitionName["HeaderActions"] = "HeaderActions";
|
|
122
|
+
DefinitionName["HeaderSections"] = "HeaderSections";
|
|
113
123
|
DefinitionName["LineItems"] = "LineItems";
|
|
114
124
|
DefinitionName["LineItemsOfView"] = "LineItemsOfView";
|
|
115
125
|
DefinitionName["ListReportFilterBar"] = "ListReportFilterBar";
|
|
116
126
|
DefinitionName["LRTableView"] = "LRTableView";
|
|
117
127
|
DefinitionName["LRChartView"] = "LRChartView";
|
|
118
128
|
DefinitionName["MultiTableModeV4"] = "MultiTableModeV4";
|
|
129
|
+
DefinitionName["ObjectPageChart"] = "ObjectPageChart";
|
|
130
|
+
DefinitionName["ObjectPageCustomSectionFragment"] = "ObjectPageCustomSectionFragment";
|
|
119
131
|
DefinitionName["ObjectPageFooter"] = "ObjectPageFooter";
|
|
120
132
|
DefinitionName["ObjectPageFooterAction"] = "ObjectPageFooterAction";
|
|
121
133
|
DefinitionName["ObjectPageFooterActions"] = "ObjectPageFooterActions";
|
|
122
134
|
DefinitionName["ObjectPageHeader"] = "ObjectPageHeader";
|
|
135
|
+
DefinitionName["ObjectPageHeaderSectionForm"] = "ObjectPageHeaderSectionForm";
|
|
136
|
+
DefinitionName["ObjectPageHeaderSectionChart"] = "ObjectPageHeaderSectionChart";
|
|
137
|
+
DefinitionName["ObjectPageHeaderSectionDataPoint"] = "ObjectPageHeaderSectionDataPoint";
|
|
138
|
+
DefinitionName["ObjectPageHeaderSectionContact"] = "ObjectPageHeaderSectionContact";
|
|
139
|
+
DefinitionName["ObjectPageHeaderSectionAddress"] = "ObjectPageHeaderSectionAddress";
|
|
140
|
+
DefinitionName["ObjectPageLayout"] = "ObjectPageLayout";
|
|
141
|
+
DefinitionName["ObjectPagePresentationVariant"] = "ObjectPagePresentationVariant";
|
|
142
|
+
DefinitionName["ObjectPageSectionAddress"] = "ObjectPageSectionAddress";
|
|
143
|
+
DefinitionName["ObjectPageSectionChart"] = "ObjectPageSectionChart";
|
|
144
|
+
DefinitionName["ObjectPageSectionContact"] = "ObjectPageSectionContact";
|
|
145
|
+
DefinitionName["ObjectPageSectionDataPoint"] = "ObjectPageSectionDataPoint";
|
|
146
|
+
DefinitionName["ObjectPageSectionForm"] = "ObjectPageSectionForm";
|
|
147
|
+
DefinitionName["ObjectPageSectionPresentationVariant"] = "ObjectPageSectionPresentationVariant";
|
|
148
|
+
DefinitionName["ObjectPageSectionTableV4"] = "ObjectPageSectionTableV4";
|
|
149
|
+
DefinitionName["ObjectPageSubSections"] = "ObjectPageSubSections";
|
|
123
150
|
DefinitionName["ObjectPageTable"] = "ObjectPageTable";
|
|
124
151
|
DefinitionName["ObjectPageTableColumn"] = "ObjectPageTableColumn";
|
|
152
|
+
DefinitionName["ObjectPageToolBar"] = "ObjectPageToolBar";
|
|
125
153
|
DefinitionName["ObjectPageToolBarAction"] = "ObjectPageToolBarAction";
|
|
154
|
+
DefinitionName["ObjectPageToolBarActions"] = "ObjectPageToolBarActions";
|
|
126
155
|
DefinitionName["Position"] = "Position";
|
|
127
156
|
DefinitionName["PositionOP"] = "PositionOP";
|
|
157
|
+
DefinitionName["QuickVariant"] = "QuickVariant";
|
|
158
|
+
DefinitionName["QuickVariantSelectionOP"] = "QuickVariantSelectionOP";
|
|
159
|
+
DefinitionName["QuickVariantSelectionV4OP"] = "QuickVariantSelectionV4OP";
|
|
160
|
+
DefinitionName["RelatedFacetKeys"] = "RelatedFacetKeys";
|
|
161
|
+
DefinitionName["Sections"] = "Sections";
|
|
128
162
|
DefinitionName["Table"] = "Table";
|
|
163
|
+
DefinitionName["TableSPV"] = "TableSPV";
|
|
129
164
|
DefinitionName["TableColumn"] = "TableColumn";
|
|
130
165
|
DefinitionName["ToolBarAction"] = "ToolBarAction";
|
|
131
166
|
DefinitionName["ToolBarLR"] = "ToolBar<LineItems>";
|
|
@@ -135,22 +170,35 @@ var DefinitionName;
|
|
|
135
170
|
DefinitionName["ViewChartToolBar"] = "ViewChartToolBar";
|
|
136
171
|
DefinitionName["ViewToolBarAction"] = "ViewToolBarAction";
|
|
137
172
|
})(DefinitionName = exports.DefinitionName || (exports.DefinitionName = {}));
|
|
173
|
+
var PropertyName;
|
|
174
|
+
(function (PropertyName) {
|
|
175
|
+
PropertyName["actions"] = "actions";
|
|
176
|
+
PropertyName["annotationPath"] = "annotationPath";
|
|
177
|
+
PropertyName["chart"] = "chart";
|
|
178
|
+
PropertyName["defaultPath"] = "defaultPath";
|
|
179
|
+
PropertyName["defaultTemplateAnnotationPath"] = "defaultTemplateAnnotationPath";
|
|
180
|
+
PropertyName["sections"] = "sections";
|
|
181
|
+
PropertyName["table"] = "table";
|
|
182
|
+
PropertyName["views"] = "views";
|
|
183
|
+
})(PropertyName = exports.PropertyName || (exports.PropertyName = {}));
|
|
138
184
|
var SchemaTag;
|
|
139
185
|
(function (SchemaTag) {
|
|
140
|
-
SchemaTag["hidden"] = "hidden";
|
|
141
|
-
SchemaTag["isViewNode"] = "isViewNode";
|
|
142
186
|
SchemaTag["annotationPath"] = "annotationPath";
|
|
143
187
|
SchemaTag["annotationType"] = "annotationType";
|
|
144
|
-
SchemaTag["dataType"] = "dataType";
|
|
145
|
-
SchemaTag["propertyIndex"] = "propertyIndex";
|
|
146
188
|
SchemaTag["artifactType"] = "artifactType";
|
|
189
|
+
SchemaTag["dataType"] = "dataType";
|
|
190
|
+
SchemaTag["fullyQualifiedName"] = "fullyQualifiedName";
|
|
191
|
+
SchemaTag["hidden"] = "hidden";
|
|
192
|
+
SchemaTag["isViewNode"] = "isViewNode";
|
|
147
193
|
SchemaTag["key"] = "key";
|
|
194
|
+
SchemaTag["propertyIndex"] = "propertyIndex";
|
|
148
195
|
})(SchemaTag = exports.SchemaTag || (exports.SchemaTag = {}));
|
|
149
196
|
exports.METADATAPATH = 'webapp/localService/metadata.xml';
|
|
150
197
|
exports.MANIFESTPATH = 'webapp/manifest.json';
|
|
151
198
|
exports.VOCWITHSLASH = '/@com.sap.vocabularies';
|
|
152
199
|
exports.VOCWITHCOLONS = '::@com.sap.vocabularies';
|
|
153
200
|
exports.UIVOCABULARY = 'com.sap.vocabularies.UI.v1';
|
|
201
|
+
exports.UIVOCABULARYDOT = 'com.sap.vocabularies.UI.v1.';
|
|
154
202
|
exports.QUICKVARPATH = '/quickVariantSelection';
|
|
155
203
|
exports.QUICKVARPATHX = '/quickVariantSelectionX';
|
|
156
204
|
exports.DATESETTINGSPATH = '/filterSettings/dateSettings';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sync/common/types.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/sync/common/types.ts"],"names":[],"mappings":";;AAeA,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,wCAAqB,CAAA;AACzB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,sCAAuB,CAAA;AAC3B,CAAC,EAHW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAGtB;AAED,IAAY,OAaX;AAbD,WAAY,OAAO;IACf,wBAAa,CAAA;IACb,+BAAoB,CAAA;IACpB,0BAAe,CAAA;IACf,4BAAiB,CAAA;IACjB,wBAAa,CAAA;IACb,8BAAmB,CAAA;IACnB,wCAA6B,CAAA;IAC7B,oCAAyB,CAAA;IACzB,wBAAa,CAAA;IACb,gCAAqB,CAAA;IACrB,sBAAW,CAAA;IACX,6BAAkB,CAAA;AACtB,CAAC,EAbW,OAAO,GAAP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C7B,kCAAqB,CAAA;IACrB,sDAAyC,CAAA;IACzC,8BAAiB,CAAA;IACjB,sCAAyB,CAAA;IACzB,wBAAW,CAAA;IACX,4CAA+B,CAAA;AACnC,CAAC,EAVW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAUpB;AAEY,QAAA,YAAY,GAAG,kCAAkC,CAAC;AAClD,QAAA,YAAY,GAAG,sBAAsB,CAAC;AACtC,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,YAAY,GAAG,4BAA4B,CAAC;AAC5C,QAAA,eAAe,GAAG,6BAA6B,CAAC;AAChD,QAAA,YAAY,GAAG,wBAAwB,CAAC;AACxC,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAC1C,QAAA,gBAAgB,GAAG,8BAA8B,CAAC;AAClD,QAAA,gBAAgB,GAAG,YAAY,CAAC"}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { Definition } from 'typescript-json-schema';
|
|
2
|
+
import type { ExtensionLogger } from '../../apiTypes';
|
|
3
|
+
import type { FacetConfigs, FileData, FacetConfig, FacetSection, SchemaFilePath, anyFacetType } from './types';
|
|
3
4
|
import type { Manifest } from '../../specification/common';
|
|
5
|
+
import type { MetadataInstanceInterface } from './decoration/factory';
|
|
6
|
+
import type { ConverterOutput, DataFieldAbstractTypes, EntityType, PropertyAnnotations, PropertyPath } from '@sap-ux/vocabularies-types';
|
|
4
7
|
import { FioriElementsVersion, PageType, PageTypeV4 } from '../../specification/common';
|
|
5
8
|
import { SchemaType } from '../../specification/schemaAccess';
|
|
6
|
-
import type { ExtensionLogger } from '../../apiTypes';
|
|
7
|
-
import type { MetadataInstanceInterface } from './decoration/factory';
|
|
8
9
|
export declare enum TemplateType {
|
|
9
10
|
ListReportObjectPageV2 = "ListReportObjectPageV2",
|
|
10
11
|
ListReportObjectPageV4 = "ListReportObjectPageV4",
|
|
@@ -54,7 +55,13 @@ export declare function getLabelForDataField(field: DataFieldAbstractTypes, enti
|
|
|
54
55
|
* @param dataFieldAbstract - the given record of the line item annotation
|
|
55
56
|
* @param entityType - the entity type as part of the AVT ConverterOutput
|
|
56
57
|
*/
|
|
57
|
-
export declare function
|
|
58
|
+
export declare function getDataFieldDescription(dataFieldAbstract: DataFieldAbstractTypes, entityType: EntityType): string;
|
|
59
|
+
/**
|
|
60
|
+
* Prepare string for reference use in schema
|
|
61
|
+
* @param refInput string to be character checked and replaced
|
|
62
|
+
* @returns string with replaced characters
|
|
63
|
+
*/
|
|
64
|
+
export declare function prepareRef(refInput: string): string;
|
|
58
65
|
/**
|
|
59
66
|
* Return the page type for a given V2 page in manifest
|
|
60
67
|
* @param name - page component name
|
|
@@ -81,7 +88,7 @@ export declare function findAlias(namespace: string, oDataServiceAVT: ConverterO
|
|
|
81
88
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
82
89
|
* @returns {FacetSection} - object comprising the relevant facet information
|
|
83
90
|
*/
|
|
84
|
-
export declare function getSectionFacet(facetDefinition:
|
|
91
|
+
export declare function getSectionFacet(facetDefinition: anyFacetType, sourceEntityType: EntityType, oDataServiceAVT: ConverterOutput, logger?: ExtensionLogger, oDataVersion?: FioriElementsVersion, keyForRelatedFacetKeys?: boolean): FacetSection | undefined;
|
|
85
92
|
/**
|
|
86
93
|
* Finds the alias for a given namespace in the references' section of the converted service metadata.
|
|
87
94
|
* An empty object is created if the path element does not exist yet.
|
|
@@ -144,7 +151,7 @@ export declare function getTemplateTypeFromManifest(manifest: Manifest, fioriEle
|
|
|
144
151
|
* @param section - section in the app schema
|
|
145
152
|
* @param facetKey - key of the facet
|
|
146
153
|
*/
|
|
147
|
-
export declare function addSectionTitleAndDescription(facet: FacetConfig, section:
|
|
154
|
+
export declare function addSectionTitleAndDescription(facet: FacetConfig, section: Definition, facetKey: string): void;
|
|
148
155
|
/**
|
|
149
156
|
* Adds target title or description to a section or header section in an app schema
|
|
150
157
|
* @param facet - intermediate facet structure comprising annotation information
|
|
@@ -157,7 +164,7 @@ export declare function addTargetTitleAndSectionDescription(facet: FacetConfig,
|
|
|
157
164
|
* @param facet Facet configuration, to be analyzed
|
|
158
165
|
* @returns the new section object
|
|
159
166
|
*/
|
|
160
|
-
export declare function createSectionWithoutProperties(facet: FacetConfig, facetKey: string):
|
|
167
|
+
export declare function createSectionWithoutProperties(facet: FacetConfig, facetKey: string): Definition;
|
|
161
168
|
/**
|
|
162
169
|
* Retrieve page section data(so far id/key and label/description).
|
|
163
170
|
* @param {EntityType} entityType The actual entityType
|
|
@@ -188,11 +195,10 @@ export declare const getSchemaFilePath: (schemaType: PageType | PageTypeV4 | Sch
|
|
|
188
195
|
* @param appVersion - Fiori Elements version - V2 or V4.
|
|
189
196
|
* @param pageType - Page type.
|
|
190
197
|
* @param entitySet - Entity Set.
|
|
191
|
-
* @param navigationProperty - Navigation property (optional).
|
|
192
198
|
* @param viewId - Custom page's viewId (optional).
|
|
193
199
|
* @returns {string} Generated page id
|
|
194
200
|
*/
|
|
195
|
-
export declare function generatePageId(pageType: PageType | PageTypeV4, entitySet: string,
|
|
201
|
+
export declare function generatePageId(pageType: PageType | PageTypeV4, entitySet: string, viewId?: string): string;
|
|
196
202
|
export declare type NextDefinition = {
|
|
197
203
|
configObject?: object;
|
|
198
204
|
targetDefinition?: object;
|
|
@@ -209,7 +215,6 @@ export declare type NextDefinition = {
|
|
|
209
215
|
* @param pageType - page type
|
|
210
216
|
*/
|
|
211
217
|
export declare function getNextTargetDefinition(appSchema: object, title: string, currentConfigObject: object, propertyDefinition: object, key: string, factory: MetadataInstanceInterface, pageType: PageType | PageTypeV4): NextDefinition;
|
|
212
|
-
export declare function prepareRef(refInput: string): string;
|
|
213
218
|
/**
|
|
214
219
|
* Custom array merge function called by deepmerge's merge function
|
|
215
220
|
*
|
|
@@ -3,16 +3,16 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const i18next_1 = __importDefault(require("i18next"));
|
|
7
|
+
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
8
|
+
const v4_1 = require("../../specification/v4");
|
|
9
|
+
const v2_1 = require("../../specification/v2");
|
|
6
10
|
const types_1 = require("./types");
|
|
7
11
|
const annotation_converter_1 = require("@sap-ux/annotation-converter");
|
|
8
12
|
const edmx_parser_1 = require("@sap-ux/edmx-parser");
|
|
9
13
|
const common_1 = require("../../specification/common");
|
|
10
14
|
const schemaAccess_1 = require("../../specification/schemaAccess");
|
|
11
|
-
const i18next_1 = __importDefault(require("i18next"));
|
|
12
|
-
const v2_1 = require("../../specification/v2");
|
|
13
|
-
const v4_1 = require("../../specification/v4");
|
|
14
15
|
const extensionLogger_1 = require("../../extensionLogger");
|
|
15
|
-
const deepmerge_1 = __importDefault(require("deepmerge"));
|
|
16
16
|
var TemplateType;
|
|
17
17
|
(function (TemplateType) {
|
|
18
18
|
TemplateType["ListReportObjectPageV2"] = "ListReportObjectPageV2";
|
|
@@ -182,7 +182,7 @@ function getTitleForDataField(dataField, entityType, dataFieldLabel) {
|
|
|
182
182
|
* @param dataFieldAbstract - the given record of the line item annotation
|
|
183
183
|
* @param entityType - the entity type as part of the AVT ConverterOutput
|
|
184
184
|
*/
|
|
185
|
-
function
|
|
185
|
+
function getDataFieldDescription(dataFieldAbstract, entityType) {
|
|
186
186
|
let title = '', propertyCommonLabel, dataField;
|
|
187
187
|
const dataFieldLabel = getLabel(dataFieldAbstract.Label, entityType);
|
|
188
188
|
switch (dataFieldAbstract.$Type) {
|
|
@@ -227,7 +227,16 @@ function getDatafieldDescription(dataFieldAbstract, entityType) {
|
|
|
227
227
|
}
|
|
228
228
|
return title;
|
|
229
229
|
}
|
|
230
|
-
exports.
|
|
230
|
+
exports.getDataFieldDescription = getDataFieldDescription;
|
|
231
|
+
/**
|
|
232
|
+
* Prepare string for reference use in schema
|
|
233
|
+
* @param refInput string to be character checked and replaced
|
|
234
|
+
* @returns string with replaced characters
|
|
235
|
+
*/
|
|
236
|
+
function prepareRef(refInput) {
|
|
237
|
+
return refInput.replace('#', '::').replace(/\//g, ':2f');
|
|
238
|
+
}
|
|
239
|
+
exports.prepareRef = prepareRef;
|
|
231
240
|
/**
|
|
232
241
|
* Return the page type for a given V2 page in manifest
|
|
233
242
|
* @param name - page component name
|
|
@@ -308,6 +317,31 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
|
308
317
|
else {
|
|
309
318
|
key = uiClass.replace('@UI', `${!keyForRelatedFacetKeys ? '@' : ''}com.sap.vocabularies.UI.v1`);
|
|
310
319
|
}
|
|
320
|
+
return key;
|
|
321
|
+
}
|
|
322
|
+
function getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion = common_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
323
|
+
var _a;
|
|
324
|
+
let stopProcessing = false;
|
|
325
|
+
const navigationParts = propertyValue.split('/');
|
|
326
|
+
const navigation = navigationParts.length > 1 ? navigationParts[0] : '';
|
|
327
|
+
if (navigation) {
|
|
328
|
+
entityType = (_a = entityType.resolvePath(navigation)) === null || _a === void 0 ? void 0 : _a.targetType;
|
|
329
|
+
}
|
|
330
|
+
key = adjustKey(key, navigationParts, keyForRelatedFacetKeys);
|
|
331
|
+
const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
|
|
332
|
+
if (targetAnnotation) {
|
|
333
|
+
const separator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '#';
|
|
334
|
+
key = getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys).replace('#', separator);
|
|
335
|
+
}
|
|
336
|
+
else {
|
|
337
|
+
stopProcessing = true;
|
|
338
|
+
return { key, entityType, stopProcessing };
|
|
339
|
+
}
|
|
340
|
+
if (navigation) {
|
|
341
|
+
const navSeparator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '/';
|
|
342
|
+
key = `${navigation}${navSeparator}${key}`;
|
|
343
|
+
}
|
|
344
|
+
return { key, entityType, stopProcessing };
|
|
311
345
|
}
|
|
312
346
|
/**
|
|
313
347
|
* Resolve page section(get key and label->description).
|
|
@@ -319,9 +353,8 @@ function adjustKey(key, navigationParts, keyForRelatedFacetKeys) {
|
|
|
319
353
|
* @returns {FacetSection} - object comprising the relevant facet information
|
|
320
354
|
*/
|
|
321
355
|
function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, logger, oDataVersion = common_1.FioriElementsVersion.v2, keyForRelatedFacetKeys = false) {
|
|
322
|
-
var _a;
|
|
323
356
|
//Take facet ID as fallback
|
|
324
|
-
const facetName = facetDefinition.fullyQualifiedName.
|
|
357
|
+
const facetName = facetDefinition.fullyQualifiedName.substring(facetDefinition.fullyQualifiedName.lastIndexOf('@'));
|
|
325
358
|
let key = facetDefinition.ID ? facetDefinition.ID.toString() : facetName;
|
|
326
359
|
let entityType = sourceEntityType; //default
|
|
327
360
|
//If reference facet: overwrite with target annotation if present
|
|
@@ -334,24 +367,12 @@ function getSectionFacet(facetDefinition, sourceEntityType, oDataServiceAVT, log
|
|
|
334
367
|
});
|
|
335
368
|
return;
|
|
336
369
|
}
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
entityType = (_a = sourceEntityType.resolvePath(navigation)) === null || _a === void 0 ? void 0 : _a.targetType;
|
|
341
|
-
}
|
|
342
|
-
adjustKey(key, navigationParts, keyForRelatedFacetKeys);
|
|
343
|
-
const targetAnnotation = determineTargetAnnotation(navigationParts, entityType, oDataServiceAVT);
|
|
344
|
-
if (targetAnnotation) {
|
|
345
|
-
const separator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '#';
|
|
346
|
-
key = getTargetAnnotationName(targetAnnotation, keyForRelatedFacetKeys).replace('#', separator);
|
|
347
|
-
}
|
|
348
|
-
else {
|
|
349
|
-
return undefined;
|
|
350
|
-
}
|
|
351
|
-
if (navigation) {
|
|
352
|
-
const navSeparator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '/';
|
|
353
|
-
key = `${navigation}${navSeparator}${key}`;
|
|
370
|
+
const { key: newKey, entityType: newEntityType, stopProcessing } = getKeyAndEntityTypeOfReferenceFacet(oDataServiceAVT, key, entityType, propertyValue, oDataVersion, keyForRelatedFacetKeys);
|
|
371
|
+
if (stopProcessing) {
|
|
372
|
+
return;
|
|
354
373
|
}
|
|
374
|
+
key = newKey;
|
|
375
|
+
entityType = newEntityType;
|
|
355
376
|
}
|
|
356
377
|
key = key.replace(/\//gi, '::');
|
|
357
378
|
return key
|
|
@@ -370,6 +391,9 @@ exports.getSectionFacet = getSectionFacet;
|
|
|
370
391
|
* @returns returns section of the manifest based on path, generates an empty object in case it does not exists
|
|
371
392
|
*/
|
|
372
393
|
exports.getManifestSectionByPathV4 = (manifest, path, targetAnnotation, targetAnnotationEncoded, importScenario = false) => {
|
|
394
|
+
if (!path) {
|
|
395
|
+
return undefined;
|
|
396
|
+
}
|
|
373
397
|
let manifestSection = manifest;
|
|
374
398
|
const pathElements = path.split('/');
|
|
375
399
|
for (let index = 0; index < pathElements.length; index++) {
|
|
@@ -474,6 +498,9 @@ function getUIAnnotationTerm(path, alias, entityType) {
|
|
|
474
498
|
else if (path.includes("com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */) || path.includes(alias + '.DataPoint')) {
|
|
475
499
|
return "com.sap.vocabularies.UI.v1.DataPoint" /* DataPoint */;
|
|
476
500
|
}
|
|
501
|
+
else if (path.includes("com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */) || path.includes(alias + '.PresentationVariant')) {
|
|
502
|
+
return "com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */;
|
|
503
|
+
}
|
|
477
504
|
else {
|
|
478
505
|
return undefined;
|
|
479
506
|
}
|
|
@@ -516,7 +543,7 @@ function getAnnotationTerm(path, alias, entityType) {
|
|
|
516
543
|
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
517
544
|
*/
|
|
518
545
|
function evaluateTargetAnnotation(section, annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
|
|
519
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
546
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
520
547
|
const alias = findAlias(types_1.UIVOCABULARY, oDataServiceAVT);
|
|
521
548
|
let path = section ? section.key : '';
|
|
522
549
|
const targetEntityType = section.entityType;
|
|
@@ -561,15 +588,21 @@ function evaluateTargetAnnotation(section, annotationRecord, facets, entityType,
|
|
|
561
588
|
facets[path].Label = (_e = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _e === void 0 ? void 0 : _e.$target['Title'];
|
|
562
589
|
break;
|
|
563
590
|
}
|
|
591
|
+
case "com.sap.vocabularies.UI.v1.PresentationVariant" /* PresentationVariant */: {
|
|
592
|
+
facets[path] = { base: types_1.FacetBase.PresentationVariant };
|
|
593
|
+
facets[path].target = (_f = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _f === void 0 ? void 0 : _f.$target;
|
|
594
|
+
facets[path].entityType = targetEntityType;
|
|
595
|
+
break;
|
|
596
|
+
}
|
|
564
597
|
case "com.sap.vocabularies.Communication.v1.Contact" /* Contact */: {
|
|
565
598
|
facets[path] = { base: types_1.FacetBase.Contact };
|
|
566
|
-
facets[path].target = (
|
|
599
|
+
facets[path].target = (_g = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _g === void 0 ? void 0 : _g.$target;
|
|
567
600
|
facets[path].entityType = targetEntityType;
|
|
568
601
|
break;
|
|
569
602
|
}
|
|
570
603
|
case "com.sap.vocabularies.Communication.v1.Address" /* Address */: {
|
|
571
604
|
facets[path] = { base: types_1.FacetBase.Address };
|
|
572
|
-
facets[path].target = (
|
|
605
|
+
facets[path].target = (_h = annotationRecord === null || annotationRecord === void 0 ? void 0 : annotationRecord.Target) === null || _h === void 0 ? void 0 : _h.$target;
|
|
573
606
|
facets[path].entityType = targetEntityType;
|
|
574
607
|
break;
|
|
575
608
|
}
|
|
@@ -841,20 +874,20 @@ exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest;
|
|
|
841
874
|
*/
|
|
842
875
|
function addSectionTitleAndDescription(facet, section, facetKey) {
|
|
843
876
|
if (facet === null || facet === void 0 ? void 0 : facet.ID) {
|
|
844
|
-
section
|
|
877
|
+
section.title = types_1.FacetTitlePrefix + facet.ID;
|
|
845
878
|
}
|
|
846
879
|
else {
|
|
847
|
-
section
|
|
880
|
+
section.title = facetKey.replace(/@com.sap/g, 'com.sap');
|
|
848
881
|
}
|
|
849
882
|
// Description
|
|
850
883
|
if (facet === null || facet === void 0 ? void 0 : facet.Label) {
|
|
851
|
-
section
|
|
884
|
+
section.description = facet.Label;
|
|
852
885
|
}
|
|
853
886
|
else if (facet === null || facet === void 0 ? void 0 : facet.ID) {
|
|
854
|
-
section
|
|
887
|
+
section.description = facet.ID;
|
|
855
888
|
}
|
|
856
889
|
else {
|
|
857
|
-
section
|
|
890
|
+
section.description = facetKey.substr(facetKey.lastIndexOf('.') + 1);
|
|
858
891
|
}
|
|
859
892
|
}
|
|
860
893
|
exports.addSectionTitleAndDescription = addSectionTitleAndDescription;
|
|
@@ -933,6 +966,9 @@ exports.getObjectPageFacetSection = getObjectPageFacetSection;
|
|
|
933
966
|
* @param targetAnnotationEncoded - encoded version of the target annotation, as represented in the manifest
|
|
934
967
|
*/
|
|
935
968
|
exports.deleteEmptyStructure = (manifest, path, targetAnnotation, targetAnnotationEncoded) => {
|
|
969
|
+
if (!path) {
|
|
970
|
+
return;
|
|
971
|
+
}
|
|
936
972
|
let manifestSection = manifest;
|
|
937
973
|
const pathArray = path.split('/');
|
|
938
974
|
pathArray.forEach(function (element) {
|
|
@@ -1010,11 +1046,10 @@ exports.getSchemaFilePath = (schemaType, entitySet) => {
|
|
|
1010
1046
|
* @param appVersion - Fiori Elements version - V2 or V4.
|
|
1011
1047
|
* @param pageType - Page type.
|
|
1012
1048
|
* @param entitySet - Entity Set.
|
|
1013
|
-
* @param navigationProperty - Navigation property (optional).
|
|
1014
1049
|
* @param viewId - Custom page's viewId (optional).
|
|
1015
1050
|
* @returns {string} Generated page id
|
|
1016
1051
|
*/
|
|
1017
|
-
function generatePageId(pageType, entitySet,
|
|
1052
|
+
function generatePageId(pageType, entitySet, viewId) {
|
|
1018
1053
|
if (pageType === common_1.PageType.CustomPage) {
|
|
1019
1054
|
const names = viewId && viewId.split('.');
|
|
1020
1055
|
return names && names[names.length - 1] + 'Page';
|
|
@@ -1027,6 +1062,18 @@ function generatePageId(pageType, entitySet, navigationProperty, viewId) {
|
|
|
1027
1062
|
return parts.join('_');
|
|
1028
1063
|
}
|
|
1029
1064
|
exports.generatePageId = generatePageId;
|
|
1065
|
+
function fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, definitionArray) {
|
|
1066
|
+
const $ref = element.$ref;
|
|
1067
|
+
if ($ref) {
|
|
1068
|
+
const definitionKey = $ref.split(exports.DEFINITION_LINK_PREFIX)[1];
|
|
1069
|
+
if (appSchema.definitions[definitionKey]) {
|
|
1070
|
+
const controlProperty = appSchema.definitions[definitionKey]['controlProperty'];
|
|
1071
|
+
if ($ref.includes(currentConfigObject[controlProperty])) {
|
|
1072
|
+
definitionArray.push(definitionKey);
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1030
1077
|
/**
|
|
1031
1078
|
* Fills an array of next definitions from given references in the JSON schema
|
|
1032
1079
|
* @param propertyDefinition - Definition of the current property in schema
|
|
@@ -1037,21 +1084,13 @@ exports.generatePageId = generatePageId;
|
|
|
1037
1084
|
*/
|
|
1038
1085
|
function fillArrayFromPropertyDefinition(propertyDefinition, currentConfigObject, appSchema) {
|
|
1039
1086
|
const definitionArray = [];
|
|
1040
|
-
if (propertyDefinition
|
|
1041
|
-
definitionArray.push(propertyDefinition
|
|
1087
|
+
if (propertyDefinition.$ref) {
|
|
1088
|
+
definitionArray.push(propertyDefinition.$ref.split(exports.DEFINITION_LINK_PREFIX)[1]);
|
|
1042
1089
|
}
|
|
1043
|
-
else if (propertyDefinition
|
|
1090
|
+
else if (propertyDefinition.anyOf) {
|
|
1044
1091
|
if (currentConfigObject) {
|
|
1045
|
-
propertyDefinition
|
|
1046
|
-
|
|
1047
|
-
const definitionKey = element.$ref.split(exports.DEFINITION_LINK_PREFIX)[1];
|
|
1048
|
-
if (appSchema['definitions'][definitionKey]) {
|
|
1049
|
-
const controlProperty = appSchema['definitions'][definitionKey]['controlProperty'];
|
|
1050
|
-
if (element.$ref.includes(currentConfigObject[controlProperty])) {
|
|
1051
|
-
definitionArray.push(definitionKey);
|
|
1052
|
-
}
|
|
1053
|
-
}
|
|
1054
|
-
}
|
|
1092
|
+
propertyDefinition.anyOf.forEach((element) => {
|
|
1093
|
+
fillArrayFromAnyOfReference(element, appSchema, currentConfigObject, definitionArray);
|
|
1055
1094
|
});
|
|
1056
1095
|
}
|
|
1057
1096
|
if (definitionArray.length === 0) {
|
|
@@ -1135,10 +1174,6 @@ function getNextTargetDefinition(appSchema, title, currentConfigObject, property
|
|
|
1135
1174
|
return nextDefinition;
|
|
1136
1175
|
}
|
|
1137
1176
|
exports.getNextTargetDefinition = getNextTargetDefinition;
|
|
1138
|
-
function prepareRef(refInput) {
|
|
1139
|
-
return refInput.replace('#', '::').replace(/\//g, ':2f');
|
|
1140
|
-
}
|
|
1141
|
-
exports.prepareRef = prepareRef;
|
|
1142
1177
|
/**
|
|
1143
1178
|
* Custom array merge function called by deepmerge's merge function
|
|
1144
1179
|
*
|