@sap/ux-specification
Advanced tools
Comparing version 1.71.13 to 1.71.14
@@ -7,5 +7,31 @@ # Change Log | ||
## [1.71.12] - 2020-08-xx | ||
## [1.71.14] - 2020-08-27 | ||
### Added | ||
- importProject API: support of OVP and ALP templates | ||
### Changed | ||
- Use @ui5/flexibility-utils for stringify/parse flex changes | ||
### Deprecated | ||
### Removed | ||
### Fixed | ||
- Synchronization of changes in manifest.json | ||
- Properties objectPageHeaderType and showDraftToggle are not shown anymore as part of app.json (JSON schema validation error) | ||
- Wrong ID at generated flex changes for object page table columns | ||
- Fixed issue related to page map and app.json while exporting | ||
- Sections not shown correctly in the page map for V4 applications | ||
- Shows warning in case of invalid card name for overview page | ||
- Enhanced test coverage: objectPageHeaderAction | ||
- Manifest did not get updated in case of deletion of some of the properties from config file | ||
## [1.71.13] - 2020-08-21 | ||
### Added | ||
- Support UI Flex binding change for header action | ||
@@ -12,0 +38,0 @@ |
@@ -62,22 +62,3 @@ "use strict"; | ||
const v2Params = exportParameters[page_1.FioriElementsVersion.v2]; | ||
if (v2Params[schemaAccess_1.SchemaType.ListReport]) { | ||
const { appId, page, manifest, jsonSchema } = v2Params[schemaAccess_1.SchemaType.ListReport]; | ||
exportResults = export_1.exportListReportPage(appId, page.config, page.entitySet, manifest, jsonSchema); | ||
} | ||
else if (v2Params[schemaAccess_1.SchemaType.ObjectPage]) { | ||
const { appId, page, manifest, jsonSchema } = v2Params[schemaAccess_1.SchemaType.ObjectPage]; | ||
exportResults = export_1.exportObjectPage(appId, page.config, page.entitySet, manifest, jsonSchema); | ||
} | ||
else if (v2Params[schemaAccess_1.SchemaType.OverviewPage]) { | ||
const { page, manifest, jsonSchema } = v2Params[schemaAccess_1.SchemaType.OverviewPage]; | ||
exportResults = export_1.exportOverviewPage(page.config, manifest, jsonSchema); | ||
} | ||
else if (v2Params[schemaAccess_1.SchemaType.Application]) { | ||
const { application, manifest, jsonSchema } = v2Params[schemaAccess_1.SchemaType.Application]; | ||
exportResults = export_1.exportApplicationV2(application, manifest, jsonSchema); | ||
} | ||
else if (v2Params[schemaAccess_1.SchemaType.AnalyticalListPage]) { | ||
const { appId, page, manifest, jsonSchema } = v2Params[schemaAccess_1.SchemaType.AnalyticalListPage]; | ||
exportResults = export_1.exportAnalyticalListPage(appId, page.config, page.entitySet, manifest, jsonSchema); | ||
} | ||
exportResults = export_1.exportPageV2(v2Params, exportParameters.ui5Version); | ||
} | ||
@@ -114,5 +95,2 @@ return exportResults; | ||
} | ||
/* ToDo: transfer AppProvider | ||
else if (v2Params[SchemaType.Application]) { | ||
} */ | ||
} | ||
@@ -119,0 +97,0 @@ return schema; |
@@ -85,2 +85,5 @@ import { SchemaType } from './specification/schemaAccess'; | ||
}; | ||
export interface UI5Version { | ||
ui5Version?: string; | ||
} | ||
export interface ExportParametersV2 { | ||
@@ -92,3 +95,3 @@ [FioriElementsVersion.v2]: ExportListReportV2 | ExportObjectPageV2 | ExportOverviewPageV2 | ExportAppV2 | ExportAnalyticalListPageV2; | ||
*/ | ||
export declare type ExportConfigParameters = ExportParametersV2; | ||
export declare type ExportConfigParameters = UI5Version & ExportParametersV2; | ||
/** | ||
@@ -95,0 +98,0 @@ * Types for v2 import |
@@ -16,6 +16,7 @@ import { Application, Manifest as ManifestV2, FioriElementsVersion, PagesBase } from '../../specification/common'; | ||
* This is basically a copy of createFiles optimized to be used in FTFS: | ||
* - always use posix path notation with forward slash (/) | ||
* - return app and page files as separate objects | ||
* it always uses posix path notation with forward slash (/) | ||
* @param {ConverterOutput} oDataServiceAVT - Complete service information, as returned by annotation vocabularies tool | ||
* @returns app and page files as separate objects | ||
*/ | ||
createConfigFiles(service: ConverterOutput): { | ||
createConfigFiles(oDataServiceAVT: ConverterOutput): { | ||
appConfig: Files; | ||
@@ -22,0 +23,0 @@ pageConfigs: Files; |
@@ -28,6 +28,7 @@ "use strict"; | ||
* This is basically a copy of createFiles optimized to be used in FTFS: | ||
* - always use posix path notation with forward slash (/) | ||
* - return app and page files as separate objects | ||
* it always uses posix path notation with forward slash (/) | ||
* @param {ConverterOutput} oDataServiceAVT - Complete service information, as returned by annotation vocabularies tool | ||
* @returns app and page files as separate objects | ||
*/ | ||
createConfigFiles(service) { | ||
createConfigFiles(oDataServiceAVT) { | ||
const pageConfigs = {}; | ||
@@ -43,5 +44,5 @@ const appConfig = {}; | ||
else { | ||
const entitySet = service && | ||
service.entitySets && | ||
service.entitySets.filter(function (current) { | ||
const entitySet = oDataServiceAVT && | ||
oDataServiceAVT.entitySets && | ||
oDataServiceAVT.entitySets.filter(function (current) { | ||
return current.name === page.entitySet; | ||
@@ -48,0 +49,0 @@ })[0]; |
@@ -94,3 +94,3 @@ "use strict"; | ||
':::sSmartTableId::' + | ||
tableId + | ||
tableId.replace('::Table', ':3a:3aTable') + | ||
':::' + | ||
@@ -97,0 +97,0 @@ lastIdPart.substr(splitPoint + 3); |
@@ -10,6 +10,7 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const changesUtils = __importStar(require("../../ui5-flexibility-utils/changeUtils")); | ||
const flexUtils = __importStar(require("@ui5/flexibility-utils")); | ||
const changesUtils = flexUtils.default.change; | ||
const defaultValues = { | ||
isCustomer: false, | ||
sapui5Version: '1.76', | ||
sapui5Version: ' ', | ||
creatingTool: 'SAPFioriTools', | ||
@@ -16,0 +17,0 @@ type: 'propertyChange' |
@@ -10,17 +10,25 @@ "use strict"; | ||
const types_1 = require("./types"); | ||
async function getGenericSchemas(fioriElementsVersion) { | ||
/** | ||
* Generates an object comprising all generic schemas | ||
* @param {TemplateType} templateType - Template type | ||
* @param {FioriElementsVersion} fioriElementsVersion - Fiori Elements version | ||
* @returns {Object} genericSchemas | ||
*/ | ||
async function getGenericSchemas(templateType, fioriElementsVersion) { | ||
const genericSchemas = {}; | ||
let schemaTypes = []; | ||
if (fioriElementsVersion === common_1.FioriElementsVersion.v2) { | ||
schemaTypes = [ | ||
common_1.SchemaType.Application, | ||
common_1.SchemaType.ListReport, | ||
common_1.SchemaType.ObjectPage, | ||
common_1.SchemaType.OverviewPage, | ||
common_1.SchemaType.AnalyticalListPage | ||
]; | ||
schemaTypes = [common_1.SchemaType.Application]; | ||
switch (templateType) { | ||
case utils_1.TemplateType.ListReportObjectPageV2: | ||
schemaTypes.push(common_1.SchemaType.ListReport, common_1.SchemaType.ObjectPage); | ||
break; | ||
case utils_1.TemplateType.AnalyticalListPageV2: | ||
schemaTypes.push(common_1.SchemaType.AnalyticalListPage, common_1.SchemaType.ObjectPage); | ||
break; | ||
case utils_1.TemplateType.OverviewPageV2: | ||
schemaTypes.push(common_1.SchemaType.OverviewPage); | ||
break; | ||
default: | ||
break; | ||
} | ||
if (fioriElementsVersion === common_1.FioriElementsVersion.v4) { | ||
schemaTypes = [common_1.SchemaType.Application, common_1.SchemaType.ListReport, common_1.SchemaType.ObjectPage]; | ||
} | ||
for (const schemaType of schemaTypes) { | ||
@@ -36,3 +44,3 @@ const schemaFile = utils_1.getSchemaFilePath(schemaType); | ||
*/ | ||
function getAnnotationsForUi(allEntityTypes) { | ||
function getAnnotationsForUi(oDataServiceAVT) { | ||
const filteredEntityTypes = { | ||
@@ -42,9 +50,11 @@ Facets: [], | ||
}; | ||
const allEntityTypes = oDataServiceAVT && oDataServiceAVT.entityTypes; | ||
if (allEntityTypes) { | ||
const alias = utils_1.findAlias('com.sap.vocabularies.UI.v1', oDataServiceAVT); | ||
for (const entity of allEntityTypes) { | ||
if (!entity.annotations || !entity.annotations.UI) { | ||
if (!entity.annotations || !entity.annotations[alias]) { | ||
continue; | ||
} | ||
const name = entity.name || entity.fullyQualifiedName.split('.').pop(); | ||
const { LineItem, Facets } = entity.annotations.UI; | ||
const { LineItem, Facets } = entity.annotations[alias]; | ||
if (LineItem && | ||
@@ -63,5 +73,5 @@ !LineItem.qualifier && | ||
} | ||
function generateAppSchemasV2(genericSchemas, uiEntityTypes, service, manifest) { | ||
const appSchemas = {}, entityTypes = service && service.entityTypes; | ||
if (uiEntityTypes) { | ||
function generateAppSchemasV2(genericSchemas, uiEntityTypes, oDataServiceAVT, manifest, templateType) { | ||
const appSchemas = {}, entityTypes = oDataServiceAVT && oDataServiceAVT.entityTypes; | ||
if (templateType === utils_1.TemplateType.ListReportObjectPageV2 && uiEntityTypes) { | ||
// ObjectPage | ||
@@ -71,3 +81,3 @@ for (const entityType of uiEntityTypes.Facets) { | ||
const genericSchemaFile = utils_1.getSchemaFilePath(common_1.SchemaType.ObjectPage); | ||
appSchemas[schemaFile.filename] = generate_1.generateObjectPageSchemaV2(genericSchemas[genericSchemaFile.filename], entityType, entityTypes, manifest); | ||
appSchemas[schemaFile.filename] = generate_1.generateObjectPageSchemaV2(genericSchemas[genericSchemaFile.filename], entityType, oDataServiceAVT, manifest); | ||
} | ||
@@ -81,6 +91,26 @@ // ListReport | ||
} | ||
else if (templateType === utils_1.TemplateType.AnalyticalListPageV2 && uiEntityTypes) { | ||
for (const entityType of uiEntityTypes.LineItems) { | ||
const schemaFile = utils_1.getSchemaFilePath(common_1.SchemaType.AnalyticalListPage, entityType); | ||
const genericSchemaFile = utils_1.getSchemaFilePath(common_1.SchemaType.AnalyticalListPage); | ||
appSchemas[schemaFile.filename] = generate_1.generateAnalyticalListReportSchemaV2(genericSchemas[genericSchemaFile.filename], entityType, entityTypes); | ||
} | ||
} | ||
else if (templateType === utils_1.TemplateType.OverviewPageV2) { | ||
const schemaFile = utils_1.getSchemaFilePath(common_1.SchemaType.OverviewPage); | ||
const genericSchemaFile = utils_1.getSchemaFilePath(common_1.SchemaType.OverviewPage); | ||
appSchemas[schemaFile.filename] = generate_1.generateOVPInterfaceV2(genericSchemas[genericSchemaFile.filename]); | ||
} | ||
return { ...genericSchemas, ...appSchemas }; | ||
} | ||
async function generateAppSchemas(uiEntityTypes, fioriElementsVersion, service, manifest) { | ||
const genericSchemas = await getGenericSchemas(fioriElementsVersion); | ||
/** | ||
* Generates app specific schemas by adding annotation information to copies of the generic schemas, thus replacing all generic definitions. | ||
* @param {UiEntityTypes} uiEntityTypes - list of all entity types from the service metadata | ||
* @param {FioriElementsVersion} fioriElementsVersion - version of Fiori Element (V2 or V4) | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
* @param manifest - manifest.json file content of the app in JSON format | ||
* @param templateType - type of the Fiori Elements' template | ||
*/ | ||
async function generateAppSchemas(uiEntityTypes, fioriElementsVersion, oDataServiceAVT, manifest, templateType) { | ||
const genericSchemas = await getGenericSchemas(templateType, fioriElementsVersion); | ||
if (fioriElementsVersion === common_1.FioriElementsVersion.v4) { | ||
@@ -90,16 +120,30 @@ return; //not supported in this release | ||
else { | ||
return generateAppSchemasV2(genericSchemas, uiEntityTypes, service, manifest); | ||
return generateAppSchemasV2(genericSchemas, uiEntityTypes, oDataServiceAVT, manifest, templateType); | ||
} | ||
} | ||
function importConfigs(manifest, flex, appSchemas, service) { | ||
/** | ||
* Imports manifest and flex changes into configuration files with aid of the relevant app provider | ||
* @param {Manifest} manifest - manifest.json file content of the app in JSON format | ||
* @param {string[]} flex - list of all UI flexibility changes | ||
* @param {Schemas} appSchemas - list of app-specific schemas | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
* @param {TemplateType} templateType - type of the Fiori Elements' template | ||
* @returns {File[]} a list of all configuration files as generated by the function | ||
*/ | ||
function importConfigs(manifest, flex, appSchemas, oDataServiceAVT, templateType) { | ||
let provider; | ||
const files = []; | ||
if (manifest['sap.ovp']) { | ||
provider = new ovpProvider_1.V2OvpProvider(manifest, appSchemas); | ||
switch (templateType) { | ||
case utils_1.TemplateType.ListReportObjectPageV2: | ||
case utils_1.TemplateType.AnalyticalListPageV2: | ||
provider = new appProvider_1.V2AppProvider(manifest, flex, appSchemas); | ||
break; | ||
case utils_1.TemplateType.OverviewPageV2: | ||
provider = new ovpProvider_1.V2OvpProvider(manifest, appSchemas); | ||
break; | ||
default: | ||
break; | ||
} | ||
else if (manifest['sap.ui.generic.app']) { | ||
provider = new appProvider_1.V2AppProvider(manifest, flex, appSchemas); | ||
} | ||
if (provider) { | ||
const { appConfig, pageConfigs } = provider.createConfigFiles(service); | ||
const { appConfig, pageConfigs } = provider.createConfigFiles(oDataServiceAVT); | ||
for (const app in appConfig) { | ||
@@ -140,6 +184,6 @@ files.push({ dataSourceUri: app, fileContent: JSON.stringify(appConfig[app], null, 4) }); | ||
const service = utils_1.parseAndMergeAndConvert(annotations); | ||
const entityTypes = service && service.entityTypes; | ||
const uiEntityTypes = getAnnotationsForUi(entityTypes); | ||
const schemas = await generateAppSchemas(uiEntityTypes, fioriElementsVersion, service, manifest); | ||
files = getFileList(schemas); | ||
const uiEntityTypes = getAnnotationsForUi(service); | ||
const templateType = utils_1.getTemplateTypeFromManifest(manifest); | ||
const appSchemas = await generateAppSchemas(uiEntityTypes, fioriElementsVersion, service, manifest, templateType); | ||
files = getFileList(appSchemas); | ||
return files; | ||
@@ -158,6 +202,6 @@ } | ||
const service = utils_1.parseAndMergeAndConvert(annotations); | ||
const entityTypes = service && service.entityTypes; | ||
const uiEntityTypes = entityTypes && getAnnotationsForUi(entityTypes); | ||
const appSchemas = await generateAppSchemas(uiEntityTypes, fioriElementsVersion, service, manifest); | ||
configFiles = importConfigs(manifest, flex, appSchemas, service); | ||
const uiEntityTypes = getAnnotationsForUi(service); | ||
const templateType = utils_1.getTemplateTypeFromManifest(manifest); | ||
const appSchemas = await generateAppSchemas(uiEntityTypes, fioriElementsVersion, service, manifest, templateType); | ||
configFiles = importConfigs(manifest, flex, appSchemas, service, templateType); | ||
files = getFileList(appSchemas, configFiles); | ||
@@ -164,0 +208,0 @@ return files; |
import { FacetConfigs, AnnotationData, FacetConfig, FacetSection, SchemaFilePath } from './types'; | ||
import { FioriElementsVersion, Manifest, PageType } from '../../specification/common'; | ||
import { EntityType, AnnotationTerm, LineItem, CollectionFacet, ReferenceFacet, ReferenceURLFacet, ConverterOutput } from '@sap-ux/vocabularies-types'; | ||
import { AnnotationTerm, LineItem, CollectionFacet, ReferenceFacet, ReferenceURLFacet, ConverterOutput } from '@sap-ux/vocabularies-types'; | ||
import { QualifiedName } from '@sap-ux/vocabularies-types/dist/generated/Common'; | ||
import { SchemaType } from '../../specification/schemaAccess'; | ||
export declare enum TemplateType { | ||
ListReportObjectPageV2 = "ListReportObjectPageV2", | ||
ListReportObjectPageV4 = "ListReportObjectPageV4", | ||
OverviewPageV2 = "OverviewPageV2", | ||
AnalyticalListPageV2 = "AnalyticalListPageV2" | ||
} | ||
/** | ||
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools | ||
* @param annotationFiles | ||
* @returns the typed entity types with annotations | ||
* @param annotationFiles - The list of all annotation files, in JSON format | ||
* @returns the complete service information | ||
*/ | ||
@@ -14,5 +20,10 @@ export declare function parseAndMergeAndConvert(annotationFiles: AnnotationData[]): ConverterOutput; | ||
/** | ||
* Return the page type for a given page in manifest | ||
* @param name - page component name | ||
*/ | ||
export declare function getPageType(name: any): PageType; | ||
/** | ||
* Resolve page section(get key and label->description). | ||
* @param facetDefinition - the actual annotation record | ||
* @param keyForRelatedFacetKeys - construvt key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there. | ||
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there. | ||
* @returns {FacetSection} - object comprising the relevant facet information | ||
@@ -23,2 +34,9 @@ */ | ||
/** | ||
* Finds the alias for a given namespace in the references' section of the converted service metadata | ||
* @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1' | ||
* @param {ConverterOutput} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools | ||
* @returns alias for the given namespace | ||
*/ | ||
export declare function findAlias(namespace: string, oDataServiceAVT: ConverterOutput): string; | ||
/** | ||
* The function parses the line item annotation and returns a list of keys, one for each record. | ||
@@ -36,6 +54,6 @@ * It simulates the work of the V2 StableIdHelper, as it calculates the last section of the stable ID. | ||
* Retrieve facet configurations that can be used to generate ObjectPage schemas | ||
* @param {QualifiedName} entitySet - the actual entitySet (corresponds to the given page) | ||
* @param {{Array.<EntityType>}} entityTypes - annotation schema, as delivered by parse & merge & convert | ||
* @param {QualifiedName} entityTypeName - the name of the actual entity type | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
export declare function getObjectPageFacets(entitySet: QualifiedName, entityTypes: EntityType[]): FacetConfigs; | ||
export declare function getObjectPageFacets(entityTypeName: QualifiedName, oDataServiceAVT: ConverterOutput): FacetConfigs; | ||
/** | ||
@@ -46,2 +64,3 @@ * Returns the version of Fiori elements (v2/v4) from a given manifest | ||
export declare function getVersionFromManifest(manifest: Manifest): FioriElementsVersion; | ||
export declare function getTemplateTypeFromManifest(manifest: Manifest): TemplateType; | ||
/** | ||
@@ -55,6 +74,6 @@ * Creates a default object for a new section or subsection, and adds the ID as title if present. | ||
* Retrieve page section data(so far id/key and label/description). | ||
* @param {QualifiedName} entitySet The actual entitySet (corresponds to the given page) | ||
* @param {EntityType[]} entityTypes Entity types, as delivered by parse & merge & convert | ||
* @param {QualifiedName} entityTypeName The actual entitySet (corresponds to the given page) | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
export declare function getObjectPageFacetSection(entitySet: QualifiedName, entityTypes: EntityType[]): FacetSection[]; | ||
export declare function getObjectPageFacetSection(entityTypeName: QualifiedName, oDataServiceAVT: ConverterOutput): FacetSection[]; | ||
/** | ||
@@ -61,0 +80,0 @@ * Cleans empty sub-structures from the export result for manifest |
@@ -8,6 +8,13 @@ "use strict"; | ||
const schemaAccess_1 = require("../../specification/schemaAccess"); | ||
var TemplateType; | ||
(function (TemplateType) { | ||
TemplateType["ListReportObjectPageV2"] = "ListReportObjectPageV2"; | ||
TemplateType["ListReportObjectPageV4"] = "ListReportObjectPageV4"; | ||
TemplateType["OverviewPageV2"] = "OverviewPageV2"; | ||
TemplateType["AnalyticalListPageV2"] = "AnalyticalListPageV2"; | ||
})(TemplateType = exports.TemplateType || (exports.TemplateType = {})); | ||
/** | ||
* Parses, merges, and converts a list of annotation files with aid of tools from annotation-vocabularies-tools | ||
* @param annotationFiles | ||
* @returns the typed entity types with annotations | ||
* @param annotationFiles - The list of all annotation files, in JSON format | ||
* @returns the complete service information | ||
*/ | ||
@@ -29,5 +36,13 @@ function parseAndMergeAndConvert(annotationFiles) { | ||
/** | ||
* Return the page type for a given page in manifest | ||
* @param name - page component name | ||
*/ | ||
function getPageType(name) { | ||
return name.split('sap.suite.ui.generic.template.')[1]; | ||
} | ||
exports.getPageType = getPageType; | ||
/** | ||
* Resolve page section(get key and label->description). | ||
* @param facetDefinition - the actual annotation record | ||
* @param keyForRelatedFacetKeys - construvt key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there. | ||
* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there. | ||
* @returns {FacetSection} - object comprising the relevant facet information | ||
@@ -79,8 +94,15 @@ */ | ||
}; | ||
function replaceAlias(target, service) { | ||
service.references.forEach((reference) => { | ||
target = target.replace('@' + reference.alias, '@' + reference.namespace); | ||
/** | ||
* Finds the alias for a given namespace in the references' section of the converted service metadata | ||
* @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1' | ||
* @param {ConverterOutput} oDataServiceAVT - combined service metadata, as returned by annotation vocabularies tools | ||
* @returns alias for the given namespace | ||
*/ | ||
function findAlias(namespace, oDataServiceAVT) { | ||
const aliasReference = oDataServiceAVT.references.find((reference) => { | ||
return reference.namespace === namespace; | ||
}); | ||
return target; | ||
return aliasReference && aliasReference.alias; | ||
} | ||
exports.findAlias = findAlias; | ||
/** | ||
@@ -101,3 +123,2 @@ * The function parses the line item annotation and returns a list of keys, one for each record. | ||
annotationTerm.forEach((lineItemRecord) => { | ||
let n; | ||
switch (lineItemRecord.$Type) { | ||
@@ -167,13 +188,14 @@ case "com.sap.vocabularies.UI.v1.DataField" /* DataField */: | ||
* @param {string} entityName - the entity (type) name | ||
* @param {EntityType[]} entityTypes - entity types, as delivered by parse & merge & convert | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
function evaluateTargetAnnotation(annotationRecord, facets, serviceName, entityName, entityTypes) { | ||
function evaluateTargetAnnotation(annotationRecord, facets, serviceName, entityName, oDataServiceAVT) { | ||
const section = getSectionFacet(annotationRecord); | ||
const path = section.key; | ||
if (path.includes('com.sap.vocabularies.UI.v1.Chart')) { | ||
const alias = findAlias('com.sap.vocabularies.UI.v1', oDataServiceAVT); | ||
if (path.includes('com.sap.vocabularies.UI.v1.Chart') || path.includes(alias + '.Chart')) { | ||
facets[path] = { base: 'ChartFacet' }; | ||
} | ||
else if (path.includes('com.sap.vocabularies.UI.v1.LineItem')) { | ||
else if (path.includes('com.sap.vocabularies.UI.v1.LineItem') || path.includes(alias + '.LineItem')) { | ||
facets[path] = { base: 'LineItemFacet' }; | ||
const entityType = entityTypes.find((e) => e.fullyQualifiedName === `${serviceName}.${entityName}`); | ||
const entityType = oDataServiceAVT.entityTypes.find((e) => e.fullyQualifiedName === `${serviceName}.${entityName}`); | ||
if (entityType) { | ||
@@ -183,4 +205,10 @@ const navPath = path.substr(0, path.lastIndexOf('::')); | ||
const targetEntity = navProp && navProp['targetType'].fullyQualifiedName; | ||
const [scope, version, annotation] = path.split('com.sap.vocabularies.')[1].split('.'); | ||
const targetEntityType = entityTypes.find((et) => et.fullyQualifiedName === targetEntity); | ||
let scope, version, annotation; | ||
if (path.includes('com.sap.vocabularies.UI.v1.LineItem')) { | ||
[scope, version, annotation] = path.split('com.sap.vocabularies.')[1].split('.'); | ||
} | ||
else if (path.includes(alias + '.LineItem')) { | ||
[scope, version, annotation] = path.split(alias + '.')[1].split('.'); | ||
} | ||
const targetEntityType = oDataServiceAVT.entityTypes.find((et) => et.fullyQualifiedName === targetEntity); | ||
if (targetEntityType && | ||
@@ -194,3 +222,3 @@ targetEntityType.annotations && | ||
} | ||
else if (path.includes('com.sap.vocabularies.UI.v1.FieldGroup')) { | ||
else if (path.includes('com.sap.vocabularies.UI.v1.FieldGroup') || path.includes(alias + '.FieldGroup')) { | ||
facets[path] = { base: 'FormFacet' }; | ||
@@ -212,3 +240,3 @@ } | ||
* @param {AnnotationTerm} annotationRecord - the actual annotation record | ||
* @param {EntityType[]} entityTypes - entity types, as delivered by parse & merge & convert | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
* @param {string} serviceName - name of the service of the app | ||
@@ -218,6 +246,6 @@ * @param {string} entityName - the entity (type) name | ||
*/ | ||
function addFacetToConfig(annotationRecord, entityTypes, serviceName, entityName, facets) { | ||
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityName, facets) { | ||
switch (annotationRecord.$Type) { | ||
case "com.sap.vocabularies.UI.v1.ReferenceFacet" /* ReferenceFacet */: { | ||
evaluateTargetAnnotation(annotationRecord, facets, serviceName, entityName, entityTypes); | ||
evaluateTargetAnnotation(annotationRecord, facets, serviceName, entityName, oDataServiceAVT); | ||
break; | ||
@@ -232,3 +260,3 @@ } | ||
annotationRecord.Facets.forEach((collectionItem) => { | ||
addFacetToConfig(collectionItem, entityTypes, serviceName, entityName, facet.facets); | ||
addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityName, facet.facets); | ||
}); | ||
@@ -241,19 +269,19 @@ break; | ||
* Retrieve facet configurations that can be used to generate ObjectPage schemas | ||
* @param {QualifiedName} entitySet - the actual entitySet (corresponds to the given page) | ||
* @param {{Array.<EntityType>}} entityTypes - annotation schema, as delivered by parse & merge & convert | ||
* @param {QualifiedName} entityTypeName - the name of the actual entity type | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
function getObjectPageFacets(entitySet, entityTypes) { | ||
function getObjectPageFacets(entityTypeName, oDataServiceAVT) { | ||
const facets = {}; | ||
const entityType = entityTypes.find((et) => et.name === entitySet); | ||
if (!entityType) { | ||
const entityType = oDataServiceAVT.entityTypes.find((et) => et.name === entityTypeName); | ||
if (!entityType || !entityType.annotations) { | ||
return; | ||
} | ||
const facetAnnotation = entityType.annotations.UI.Facets; | ||
const alias = findAlias('com.sap.vocabularies.UI.v1', oDataServiceAVT); | ||
const facetAnnotation = alias && entityType.annotations[alias] && entityType.annotations[alias].Facets; | ||
if (facetAnnotation) { | ||
const lastDot = entityType.fullyQualifiedName.lastIndexOf('.'); | ||
const serviceName = entityType.fullyQualifiedName.substr(0, lastDot); | ||
const entityName = entityType.fullyQualifiedName.substr(lastDot + 1); | ||
// Add facets to configuration | ||
facetAnnotation.forEach((item) => { | ||
addFacetToConfig(item, entityTypes, serviceName, entityName, facets); | ||
addFacetToConfig(item, oDataServiceAVT, serviceName, entityTypeName, facets); | ||
}); | ||
@@ -277,2 +305,27 @@ } | ||
exports.getVersionFromManifest = getVersionFromManifest; | ||
function getTemplateTypeFromManifest(manifest) { | ||
let templateType; | ||
if (manifest['sap.ovp']) { | ||
templateType = TemplateType.OverviewPageV2; | ||
} | ||
else if (manifest['sap.ui.generic.app']) { | ||
const v2Pages = manifest['sap.ui.generic.app'].pages; | ||
if (!v2Pages) { | ||
return; | ||
} | ||
templateType = TemplateType.ListReportObjectPageV2; | ||
for (const pageKey in v2Pages) { | ||
const v2Page = v2Pages[pageKey]; | ||
if (getPageType(v2Page.component.name) === common_1.PageType.AnalyticalListPage) { | ||
templateType = TemplateType.AnalyticalListPageV2; | ||
break; | ||
} | ||
} | ||
} | ||
else { | ||
templateType = TemplateType.ListReportObjectPageV4; | ||
} | ||
return templateType; | ||
} | ||
exports.getTemplateTypeFromManifest = getTemplateTypeFromManifest; | ||
/** | ||
@@ -297,8 +350,9 @@ * Creates a default object for a new section or subsection, and adds the ID as title if present. | ||
* Retrieve page section data(so far id/key and label/description). | ||
* @param {QualifiedName} entitySet The actual entitySet (corresponds to the given page) | ||
* @param {EntityType[]} entityTypes Entity types, as delivered by parse & merge & convert | ||
* @param {QualifiedName} entityTypeName The actual entitySet (corresponds to the given page) | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
function getObjectPageFacetSection(entitySet, entityTypes) { | ||
const entityType = entityTypes.find((et) => et.name === entitySet); | ||
const facetAnnotation = entityType.annotations.UI.Facets; | ||
function getObjectPageFacetSection(entityTypeName, oDataServiceAVT) { | ||
const entityType = oDataServiceAVT.entityTypes.find((et) => et.name === entityTypeName); | ||
const alias = findAlias('com.sap.vocabularies.UI.v1', oDataServiceAVT); | ||
const facetAnnotation = alias && entityType.annotations && entityType.annotations[alias] && entityType.annotations[alias].Facets; | ||
if (!facetAnnotation) { | ||
@@ -305,0 +359,0 @@ return []; |
@@ -47,3 +47,4 @@ "use strict"; | ||
}); | ||
pathParts.push('component/settings/sections/' + sectionId); | ||
const manifestSectionId = sectionId.replace('::@com.sap.vocabularies', '::com.sap.vocabularies'); | ||
pathParts.push('component/settings/sections/' + manifestSectionId); | ||
return pathParts.join('/'); | ||
@@ -50,0 +51,0 @@ }; |
@@ -1,43 +0,3 @@ | ||
import { ExportResults, AnalyticalListPageConfig, ListReportConfig, ObjectPageConfig, OverviewPageConfig } from '../../../v2'; | ||
import { ApplicationV2 } from '../application'; | ||
import { ExportResults } from '../../../v2'; | ||
/** | ||
* Run through the given ListReport config and return respective manifest entry and flex changes | ||
* @param appId - id of the Fiori elements app, which is usually namespace.appid | ||
* @param listReportConfig - content of the src/ListReport_<entity_set>.json file | ||
* @param entitySet - name of the entity set | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
export declare const exportListReportPage: (appId: string, listReportConfig: ListReportConfig, entitySet: string, manifest: object, jsonSchema: object) => ExportResults; | ||
/** | ||
* Run through the given AnalyticalListPage config and return respective manifest entry and flex changes | ||
* @param appId - id of the Fiori elements app, which is usually namespace.appid | ||
* @param analyticalListPageConfig - content of the src/AnalyticalListPage_<entity_set>.json file | ||
* @param entitySet - name of the entity set | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
export declare const exportAnalyticalListPage: (appId: string, analyticalListPageConfig: AnalyticalListPageConfig, entitySet: string, manifest: object, jsonSchema: object) => ExportResults; | ||
/** | ||
* Run through the given ObjectPage config and return respective manifest entry and flex changes | ||
* @param appId - id of the Fiori elements app, which is usually namespace.appid | ||
* @param objectPageConfig - content of the src/ObjectPage_<entity_set>.json file | ||
* @param entitySet - name of the entity set | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @param entityAnnotations - list of annotations of the entity type that the page is referring to | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
export declare const exportObjectPage: (appId: string, objectPageConfig: ObjectPageConfig, entitySet: string, manifest: object, jsonSchema: object) => ExportResults; | ||
/** | ||
* Run through the given ObjectPage config and return respective manifest entry and flex changes | ||
* @param overviewPageConfig - content of the src/OverviewPage_<entity_set>.json file | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
export declare const exportOverviewPage: (overviewPageConfig: OverviewPageConfig, manifest: object, jsonSchema: object) => ExportResults; | ||
/** | ||
* Exports a Fiori Element V2 page. | ||
@@ -52,11 +12,2 @@ * It converts the entries of the input page (config file) to corresponding manifest settings and flex changes | ||
*/ | ||
export declare const exportPageV2: (appId: string, page: import("../../../v2").PageBase, manifest: object, jsonSchema: object) => ExportResults; | ||
/** | ||
* Exports a Fiori Element V2 application. | ||
* It converts the entries of the input application (config file) to corresponding manifest settings and flex changes | ||
* @param application - content of the config file of an application | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
export declare const exportApplicationV2: (application: ApplicationV2, manifest: object, jsonSchema: object) => ExportResults; | ||
export declare const exportPageV2: (exportParametersV2: import("../../..").ExportListReportV2 | import("../../..").ExportOverviewPageV2 | import("../../..").ExportObjectPageV2 | import("../../..").ExportAppV2 | import("../../..").ExportAnalyticalListPageV2, ui5Version: string) => ExportResults; |
@@ -7,3 +7,2 @@ "use strict"; | ||
const AnalyticalListPageChart_1 = require("../../../sync/v2/export/controls/AnalyticalListPageChart"); | ||
const page_1 = require("../../../specification/common/page"); | ||
const v2_1 = require("../../../v2"); | ||
@@ -15,2 +14,3 @@ const application_1 = require("../application"); | ||
const common_1 = require("../../common"); | ||
const common_2 = require("../../../specification/common"); | ||
const ObjectPageHeaderAction_1 = require("../../../sync/v2/export/controls/ObjectPageHeaderAction"); | ||
@@ -203,5 +203,4 @@ /** | ||
*/ | ||
function evaluateExportRule(exportPropertyRule, configObject, breadcrumbs, baseId, ids, title, key, exportResults, fullManifest, pageKeys, manifestSection) { | ||
function evaluateExportRule(exportPropertyRule, configObject, breadcrumbs, baseId, ids, title, key, exportResults, fullManifest, pageKeys, manifestSection, ui5Version) { | ||
let localBreadcrumbs; | ||
let flexChange; | ||
//eliminate subsections' hierarchy | ||
@@ -222,22 +221,16 @@ let index = breadcrumbs.indexOf('subsections'); | ||
} | ||
const flexChange = { | ||
controlId: exportPropertyRule.flex.controlId(baseId, ids, localBreadcrumbs, exportPropertyRule.flex.controlType, title), | ||
controlType: exportPropertyRule.flex.controlType(), | ||
content: { | ||
property: key | ||
}, | ||
sapui5Version: ui5Version | ||
}; | ||
if (typeof configObject !== 'boolean' && breadcrumbs.includes('actions')) { | ||
flexChange = { | ||
controlId: exportPropertyRule.flex.controlId(baseId, ids, localBreadcrumbs, exportPropertyRule.flex.controlType, title), | ||
controlType: exportPropertyRule.flex.controlType(), | ||
content: { | ||
property: key, | ||
newBinding: configObject | ||
}, | ||
type: 'propertyBindingChange' | ||
}; | ||
flexChange.content.newBinding = configObject; | ||
flexChange.type = 'propertyBindingChange'; | ||
} | ||
else { | ||
flexChange = { | ||
controlId: exportPropertyRule.flex.controlId(baseId, ids, localBreadcrumbs, exportPropertyRule.flex.controlType, title), | ||
controlType: exportPropertyRule.flex.controlType(), | ||
content: { | ||
property: key, | ||
newValue: configObject | ||
} | ||
}; | ||
flexChange.content.newValue = configObject; | ||
} | ||
@@ -255,3 +248,3 @@ exportResults.flexChanges.push(exportPropertyRule.flex.exportFunction(flexChange, fullManifest)); | ||
path = exportPropertyRule.manifest.path(pageKeys, breadcrumbs[1]); | ||
path = path.replace('/@', '::'); | ||
path = path.replace('/@', '::').replace(/::@com.sap.vocabularies/g, '::com.sap.vocabularies'); | ||
} | ||
@@ -276,3 +269,3 @@ } | ||
else { | ||
if (manifestSection[manifestKey]) { | ||
if (Object.prototype.hasOwnProperty.call(manifestSection, manifestKey)) { | ||
delete manifestSection[manifestKey]; | ||
@@ -289,3 +282,3 @@ } | ||
*/ | ||
function getExportClassesForSections(objectPageConfig, objectPage) { | ||
function getExportClassesForSections(objectPageConfig, objectPage, v2Page) { | ||
/** | ||
@@ -296,17 +289,25 @@ * Instantiates the export classes for a single object page section | ||
*/ | ||
function getClassesForSingleSection(section, sectionId) { | ||
if (section && section['table']) { | ||
const tableType = section['table'].type; | ||
function getClassesForSingleSection(section, sectionId, sectionInManifest) { | ||
let tableType = v2_1.TableTypeV2.ResponsiveTable; | ||
if (section) { | ||
if (section['table']) { | ||
//listed in config | ||
tableType = section['table'].type; | ||
} | ||
else if (sectionInManifest) { | ||
//only listed in manifest, deleted from config | ||
tableType = sectionInManifest['tableSettings'].type; | ||
} | ||
switch (tableType) { | ||
case 'AnalyticalTable': | ||
case v2_1.TableTypeV2.AnalyticalTable: | ||
section['table'] = Object.assign(new controls_1.ObjectPageAnalyticalTable(), section['table']); | ||
break; | ||
case 'GridTable': | ||
case v2_1.TableTypeV2.GridTable: | ||
section['table'] = Object.assign(new controls_1.ObjectPageGridTable(), section['table']); | ||
break; | ||
case 'TreeTable': | ||
case v2_1.TableTypeV2.TreeTable: | ||
section['table'] = Object.assign(new controls_1.ObjectPageTreeTable(), section['table']); | ||
break; | ||
default: | ||
case 'ResponsiveTable': | ||
case v2_1.TableTypeV2.ResponsiveTable: | ||
section['table'] = Object.assign(new controls_1.ObjectPageResponsiveTable(), section['table']); | ||
@@ -320,9 +321,10 @@ break; | ||
} | ||
} | ||
else if (sectionId === 'custom' && Array.isArray(section)) { | ||
// Custom sections | ||
for (const index in section) { | ||
section[index] = Object.assign(section[index].className === v2_1.SAPUI5_FRAGMENT_CLASS | ||
? new controls_1.ObjectPageCustomSectionFragment() | ||
: new controls_1.ObjectPageCustomSectionView(), section[index]); | ||
// custom section | ||
if (sectionId === 'custom' && Array.isArray(section)) { | ||
// Custom sections | ||
for (const index in section) { | ||
section[index] = Object.assign(section[index].className === v2_1.SAPUI5_FRAGMENT_CLASS | ||
? new controls_1.ObjectPageCustomSectionFragment() | ||
: new controls_1.ObjectPageCustomSectionView(), section[index]); | ||
} | ||
} | ||
@@ -337,6 +339,10 @@ } | ||
if (section['subsections']) { | ||
let subSection; | ||
let subSection, sectionInManifest; | ||
for (const subSectionId in section['subsections']) { | ||
subSection = section['subsections'][subSectionId]; | ||
getClassesForSingleSection(subSection, subSectionId); | ||
sectionInManifest = | ||
v2Page.component.settings && | ||
v2Page.component.settings.sections && | ||
v2Page.component.settings.sections[subSectionId]; | ||
getClassesForSingleSection(subSection, subSectionId, sectionInManifest); | ||
getSubsectionClasses(subSection); | ||
@@ -347,6 +353,10 @@ } | ||
// Main function | ||
let section; | ||
let section, sectionInManifest; | ||
for (const sectionId in objectPageConfig.sections) { | ||
section = objectPage.sections[sectionId]; | ||
getClassesForSingleSection(section, sectionId); | ||
sectionInManifest = | ||
v2Page.component.settings && | ||
v2Page.component.settings.sections && | ||
v2Page.component.settings.sections[sectionId]; | ||
getClassesForSingleSection(section, sectionId, sectionInManifest); | ||
getSubsectionClasses(section); | ||
@@ -371,3 +381,3 @@ } | ||
*/ | ||
function transferManifestExtensions(configSections, pageKey, fullManifest, parentIds, manifest, breadcrumbs, exportResults, appId, baseId, pageKeys, jsonSchema, targetDefinition) { | ||
function transferManifestExtensions(configSections, pageKey, fullManifest, parentIds, manifest, breadcrumbs, exportResults, appId, baseId, pageKeys, jsonSchema, targetDefinition, ui5Version) { | ||
const sectionIds = []; | ||
@@ -383,3 +393,3 @@ const entity = pageKey.split('|')[1]; | ||
const nextTargetDefinition = jsonSchema['definitions'][definitionArray[definitionArray.length - 1]]; | ||
transferManifestEntriesAndFlexChange(fullManifest, configSections[index], parentIds, manifest, [...breadcrumbs, sectionIds[index]], exportResults, appId, baseId, pageKeys, jsonSchema, nextTargetDefinition); | ||
transferManifestEntriesAndFlexChange(fullManifest, configSections[index], parentIds, manifest, [...breadcrumbs, sectionIds[index]], exportResults, appId, baseId, pageKeys, jsonSchema, nextTargetDefinition, ui5Version); | ||
} | ||
@@ -408,3 +418,3 @@ // Delete removed manifest entries | ||
*/ | ||
function transferManifestEntriesAndFlexChange(fullManifest, configObject, parentIds, manifest, breadcrumbs, exportResults, appId, baseId, pageKeys, jsonSchema, schemaDefinition, title) { | ||
function transferManifestEntriesAndFlexChange(fullManifest, configObject, parentIds, manifest, breadcrumbs, exportResults, appId, baseId, pageKeys, jsonSchema, schemaDefinition, ui5Version, title) { | ||
let manifestSection, currentConfigObject; | ||
@@ -418,9 +428,7 @@ if (schemaDefinition && schemaDefinition['properties']) { | ||
if (exportPropertyRule) { | ||
evaluateExportRule(exportPropertyRule, currentConfigObject, breadcrumbs, baseId, ids, title, key, exportResults, fullManifest, pageKeys, manifestSection); | ||
evaluateExportRule(exportPropertyRule, currentConfigObject, breadcrumbs, baseId, ids, title, key, exportResults, fullManifest, pageKeys, manifestSection, ui5Version); | ||
continue; | ||
} | ||
const propertyDefinition = schemaDefinition['properties'][key]; | ||
if (typeof currentConfigObject === 'object' && | ||
Object.keys(currentConfigObject).length > 0 && | ||
propertyDefinition) { | ||
if (typeof currentConfigObject === 'object' && propertyDefinition) { | ||
let definitionArray; | ||
@@ -438,3 +446,3 @@ if (propertyDefinition.$ref) { | ||
key === 'custom') { | ||
transferManifestExtensions(configObject[key], pageKeys[pageKeys.length - 1], fullManifest, ids, manifest, [...breadcrumbs, key], exportResults, appId, baseId, pageKeys, jsonSchema, propertyDefinition.items); | ||
transferManifestExtensions(configObject[key], pageKeys[pageKeys.length - 1], fullManifest, ids, manifest, [...breadcrumbs, key], exportResults, appId, baseId, pageKeys, jsonSchema, propertyDefinition.items, ui5Version); | ||
continue; | ||
@@ -454,3 +462,3 @@ } | ||
} | ||
transferManifestEntriesAndFlexChange(fullManifest, nextConfigObject, ids, manifest, [...breadcrumbs, key], exportResults, appId, baseId, pageKeys, jsonSchema, nextTargetDefinition, nextTitle); | ||
transferManifestEntriesAndFlexChange(fullManifest, nextConfigObject, ids, manifest, [...breadcrumbs, key], exportResults, appId, baseId, pageKeys, jsonSchema, nextTargetDefinition, ui5Version, nextTitle); | ||
} | ||
@@ -469,3 +477,3 @@ } | ||
*/ | ||
exports.exportListReportPage = (appId, listReportConfig, entitySet, manifest, jsonSchema) => { | ||
const exportListReportPage = (appId, listReportConfig, entitySet, manifest, jsonSchema, ui5Version) => { | ||
const exportResults = getDefaultExportResult(); | ||
@@ -516,4 +524,4 @@ exportResults.flexChanges = []; | ||
exportResults.manifest = manifest; | ||
transferManifestEntriesAndFlexChange(JSON.parse(JSON.stringify(manifest)), listReport, [], v2Page, [], exportResults, appId, baseId, pageKeys, jsonSchema, jsonSchema //starting point for target definition | ||
); | ||
transferManifestEntriesAndFlexChange(JSON.parse(JSON.stringify(manifest)), listReport, [], v2Page, [], exportResults, appId, baseId, pageKeys, jsonSchema, jsonSchema, //starting point for target definition | ||
ui5Version); | ||
return exportResults; | ||
@@ -530,3 +538,3 @@ }; | ||
*/ | ||
exports.exportAnalyticalListPage = (appId, analyticalListPageConfig, entitySet, manifest, jsonSchema) => { | ||
const exportAnalyticalListPage = (appId, analyticalListPageConfig, entitySet, manifest, jsonSchema, ui5Version) => { | ||
const exportResults = getDefaultExportResult(); | ||
@@ -556,4 +564,4 @@ exportResults.flexChanges = []; | ||
analyticalListPage.chart = Object.assign(new AnalyticalListPageChart_1.ChartSettings(), analyticalListPage.chart); | ||
transferManifestEntriesAndFlexChange(JSON.parse(JSON.stringify(manifest)), analyticalListPage, [], v2Page, [], exportResults, appId, baseId, pageKeys, jsonSchema, jsonSchema //starting point for target definition | ||
); | ||
transferManifestEntriesAndFlexChange(JSON.parse(JSON.stringify(manifest)), analyticalListPage, [], v2Page, [], exportResults, appId, baseId, pageKeys, jsonSchema, jsonSchema, //starting point for target definition | ||
ui5Version); | ||
return exportResults; | ||
@@ -571,3 +579,3 @@ }; | ||
*/ | ||
exports.exportObjectPage = (appId, objectPageConfig, entitySet, manifest, jsonSchema) => { | ||
const exportObjectPage = (appId, objectPageConfig, entitySet, manifest, jsonSchema, ui5Version) => { | ||
const exportResults = getDefaultExportResult(); | ||
@@ -577,9 +585,11 @@ const objectPage = Object.assign(new pages_1.ObjectPage(), objectPageConfig); | ||
// find a better way to do this generically, perhaps using the schema? | ||
objectPage.header = Object.assign(new controls_1.ObjectPageHeader(), objectPage.header); | ||
for (const headerId in objectPageConfig.header) { | ||
if (headerId === 'actions') { | ||
objectPage.header.actions = Object.assign(new controls_1.ObjectPageHeader(), objectPage.header.actions); | ||
for (const actionId in objectPageConfig.header.actions) { | ||
const action = objectPage.header.actions; | ||
action[actionId] = Object.assign(new ObjectPageHeaderAction_1.Action(), action[actionId]); | ||
if (objectPage.header) { | ||
objectPage['header'] = Object.assign(new controls_1.ObjectPageHeader(), objectPage['header']); | ||
for (const headerId in objectPageConfig.header) { | ||
if (headerId === 'actions') { | ||
objectPage.header.actions = Object.assign(new controls_1.ObjectPageHeader(), objectPage.header.actions); | ||
for (const actionId in objectPageConfig.header.actions) { | ||
const action = objectPage.header.actions; | ||
action[actionId] = Object.assign(new ObjectPageHeaderAction_1.Action(), action[actionId]); | ||
} | ||
} | ||
@@ -601,6 +611,6 @@ } | ||
if (objectPageConfig && objectPageConfig.sections) { | ||
getExportClassesForSections(objectPageConfig, objectPage); | ||
getExportClassesForSections(objectPageConfig, objectPage, v2Page); | ||
} | ||
transferManifestEntriesAndFlexChange(JSON.parse(JSON.stringify(manifest)), objectPage, [], v2Page, [], exportResults, appId, baseId, pageKeys, jsonSchema, jsonSchema //starting point for target definition | ||
); | ||
transferManifestEntriesAndFlexChange(JSON.parse(JSON.stringify(manifest)), objectPage, [], v2Page, [], exportResults, appId, baseId, pageKeys, jsonSchema, jsonSchema, //starting point for target definition | ||
ui5Version); | ||
return exportResults; | ||
@@ -615,3 +625,3 @@ }; | ||
*/ | ||
exports.exportOverviewPage = (overviewPageConfig, manifest, jsonSchema) => { | ||
const exportOverviewPage = (overviewPageConfig, manifest, jsonSchema) => { | ||
const exportResults = getDefaultExportResult(); | ||
@@ -625,28 +635,2 @@ const overviewPage = Object.assign(new pages_1.OverviewPage(), overviewPageConfig); | ||
/** | ||
* Exports a Fiori Element V2 page. | ||
* It converts the entries of the input page (config file) to corresponding manifest settings and flex changes | ||
* @param appId - application id | ||
* @param page - content of the config file of a page | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @param entityAnnotations - list of annotations of the entity type that the page is referring to | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
exports.exportPageV2 = (appId, page, manifest, jsonSchema) => { | ||
switch (page.pageType) { | ||
case page_1.PageType.ListReport: { | ||
return exports.exportListReportPage(appId, page.config, page.entitySet, manifest, jsonSchema); | ||
} | ||
case page_1.PageType.ObjectPage: { | ||
return exports.exportObjectPage(appId, page.config, page.entitySet, manifest, jsonSchema); | ||
} | ||
case page_1.PageType.OverviewPage: { | ||
return exports.exportOverviewPage(page.config, manifest, jsonSchema); | ||
} | ||
case page_1.PageType.AnalyticalListPage: { | ||
return exports.exportAnalyticalListPage(appId, page.config, page.entitySet, manifest, jsonSchema); | ||
} | ||
} | ||
}; | ||
/** | ||
* Exports a Fiori Element V2 application. | ||
@@ -659,3 +643,3 @@ * It converts the entries of the input application (config file) to corresponding manifest settings and flex changes | ||
*/ | ||
exports.exportApplicationV2 = (application, manifest, jsonSchema) => { | ||
const exportApplicationV2 = (application, manifest, jsonSchema) => { | ||
const exportResults = getDefaultExportResult(); | ||
@@ -686,2 +670,34 @@ exportResults.manifest = manifest; | ||
}; | ||
/** | ||
* Exports a Fiori Element V2 page. | ||
* It converts the entries of the input page (config file) to corresponding manifest settings and flex changes | ||
* @param appId - application id | ||
* @param page - content of the config file of a page | ||
* @param manifest - app descriptor (manifest.json) | ||
* @param jsonSchema - application specific schema | ||
* @param entityAnnotations - list of annotations of the entity type that the page is referring to | ||
* @returns ExportResults - The export result comprises the enhanced manifest as well as a list of flex changes. | ||
*/ | ||
exports.exportPageV2 = (exportParametersV2, ui5Version) => { | ||
if (exportParametersV2[common_2.SchemaType.ListReport]) { | ||
const { appId, page, manifest, jsonSchema } = exportParametersV2[common_2.SchemaType.ListReport]; | ||
return exportListReportPage(appId, page.config, page.entitySet, manifest, jsonSchema, ui5Version); | ||
} | ||
else if (exportParametersV2[common_2.SchemaType.ObjectPage]) { | ||
const { appId, page, manifest, jsonSchema } = exportParametersV2[common_2.SchemaType.ObjectPage]; | ||
return exportObjectPage(appId, page.config, page.entitySet, manifest, jsonSchema, ui5Version); | ||
} | ||
else if (exportParametersV2[common_2.SchemaType.OverviewPage]) { | ||
const { page, manifest, jsonSchema } = exportParametersV2[common_2.SchemaType.OverviewPage]; | ||
return exportOverviewPage(page.config, manifest, jsonSchema); | ||
} | ||
else if (exportParametersV2[common_2.SchemaType.Application]) { | ||
const { application, manifest, jsonSchema } = exportParametersV2[common_2.SchemaType.Application]; | ||
return exportApplicationV2(application, manifest, jsonSchema); | ||
} | ||
else if (exportParametersV2[common_2.SchemaType.AnalyticalListPage]) { | ||
const { appId, page, manifest, jsonSchema } = exportParametersV2[common_2.SchemaType.AnalyticalListPage]; | ||
return exportAnalyticalListPage(appId, page.config, page.entitySet, manifest, jsonSchema, ui5Version); | ||
} | ||
}; | ||
//# sourceMappingURL=export.js.map |
@@ -16,7 +16,7 @@ import { AnnotationData } from '../../common/types'; | ||
/** | ||
* Generates an app specific schema out of the generic schema. | ||
* Generates the app specific schema of a list report out of the generic schema. | ||
* Generic types are replaced by information from the app specific annotations. | ||
* | ||
* @param genericSchema - generic JSON schema of a list report | ||
* @param entitySet - the base entity type of the given page | ||
* @param entityType - the base entity type of the given page | ||
* @param annotations - list of all annotation files (file content plus URI as identifier) | ||
@@ -26,4 +26,17 @@ * | ||
*/ | ||
export declare function generateListReportInterfaceV2(genericSchema: object, entitySet: string, annotations: AnnotationData[]): object; | ||
export declare function generateOVPInterfaceV2(fileContent: object): object; | ||
export declare function generateAnalyticalListPageInterfaceV2(genericSchema: object, entitySet: string, annotations: AnnotationData[]): object; | ||
export declare function generateListReportInterfaceV2(genericSchema: object, entityType: string, annotations: AnnotationData[]): object; | ||
/** | ||
* Generates the app specific schema of an overview page | ||
* @param genericSchema - file content of the generic schema | ||
* @returns the generic schema, as equivalent to the app schema | ||
*/ | ||
export declare function generateOVPInterfaceV2(genericSchema: object): object; | ||
/** | ||
* Generates the app specific schema of an analytical list page out of the generic schema. | ||
* Generic types are replaced by information from the app specific annotations. | ||
* | ||
* @param genericSchema - generic JSON schema of a list report | ||
* @param entityType - the base entity type of the given page | ||
* @param annotations - list of all annotation files (file content plus URI as identifier) | ||
*/ | ||
export declare function generateAnalyticalListPageInterfaceV2(genericSchema: object, entityType: string, annotations: AnnotationData[]): object; |
@@ -5,5 +5,4 @@ "use strict"; | ||
const objectPage_1 = require("./objectPage"); | ||
const listReportObjectPage_1 = require("./listReportObjectPage"); | ||
const common_1 = require("../../common"); | ||
const utils_2 = require("./utils"); | ||
const listReport_1 = require("./listReport"); | ||
const analyticalListReport_1 = require("./analyticalListReport"); | ||
/** | ||
@@ -23,11 +22,11 @@ * Generates an app specific schema out of the generic schema. | ||
const service = utils_1.parseAndMergeAndConvert(annotations); | ||
return objectPage_1.generateObjectPageSchemaV2(genericSchema, entitySet, service.entityTypes, manifest); | ||
return objectPage_1.generateObjectPageSchemaV2(genericSchema, entitySet, service, manifest); | ||
} | ||
exports.generateObjectPageInterfaceV2 = generateObjectPageInterfaceV2; | ||
/** | ||
* Generates an app specific schema out of the generic schema. | ||
* Generates the app specific schema of a list report out of the generic schema. | ||
* Generic types are replaced by information from the app specific annotations. | ||
* | ||
* @param genericSchema - generic JSON schema of a list report | ||
* @param entitySet - the base entity type of the given page | ||
* @param entityType - the base entity type of the given page | ||
* @param annotations - list of all annotation files (file content plus URI as identifier) | ||
@@ -37,25 +36,33 @@ * | ||
*/ | ||
function generateListReportInterfaceV2(genericSchema, entitySet, annotations) { | ||
function generateListReportInterfaceV2(genericSchema, entityType, annotations) { | ||
const service = utils_1.parseAndMergeAndConvert(annotations); | ||
return listReportObjectPage_1.generateListReportSchemaV2(genericSchema, entitySet, service.entityTypes); | ||
return listReport_1.generateListReportSchemaV2(genericSchema, entityType, service.entityTypes); | ||
} | ||
exports.generateListReportInterfaceV2 = generateListReportInterfaceV2; | ||
function generateOVPInterfaceV2(fileContent) { | ||
return fileContent; | ||
/** | ||
* Generates the app specific schema of an overview page | ||
* @param genericSchema - file content of the generic schema | ||
* @returns the generic schema, as equivalent to the app schema | ||
*/ | ||
function generateOVPInterfaceV2(genericSchema) { | ||
const appSchema = JSON.parse(JSON.stringify(genericSchema)); | ||
appSchema['properties']['cards']['propertyNames'] = { | ||
pattern: '^[a-zA-Z0-9_\\.\\-]+$' | ||
}; | ||
return appSchema; | ||
} | ||
exports.generateOVPInterfaceV2 = generateOVPInterfaceV2; | ||
function generateAnalyticalListPageInterfaceV2(genericSchema, entitySet, annotations) { | ||
/** | ||
* Generates the app specific schema of an analytical list page out of the generic schema. | ||
* Generic types are replaced by information from the app specific annotations. | ||
* | ||
* @param genericSchema - generic JSON schema of a list report | ||
* @param entityType - the base entity type of the given page | ||
* @param annotations - list of all annotation files (file content plus URI as identifier) | ||
*/ | ||
function generateAnalyticalListPageInterfaceV2(genericSchema, entityType, annotations) { | ||
const service = utils_1.parseAndMergeAndConvert(annotations); | ||
const lineItemAnnotation = service.entityTypes.find((et) => et.name === entitySet).annotations.UI.LineItem; | ||
const lineItemIDs = common_1.getLineItemsTyped(lineItemAnnotation); | ||
const appSchema = JSON.parse(JSON.stringify(genericSchema)); | ||
appSchema['properties']['table']['$ref'] = '#/definitions/AnalyticalTableALP<LineItems>'; | ||
const analyticalTableDefinition = JSON.parse(JSON.stringify(appSchema['definitions']['AnalyticalTableALP<GenericColumns>'])); | ||
appSchema['definitions']['AnalyticalTableALP<LineItems>'] = analyticalTableDefinition; | ||
delete appSchema['definitions']['AnalyticalTableALP<GenericColumns>']; | ||
delete appSchema['definitions']['GenericColumns']; | ||
utils_2.addLineItemsType(appSchema, lineItemIDs); | ||
return appSchema; | ||
return analyticalListReport_1.generateAnalyticalListReportSchemaV2(genericSchema, entityType, service.entityTypes); | ||
} | ||
exports.generateAnalyticalListPageInterfaceV2 = generateAnalyticalListPageInterfaceV2; | ||
//# sourceMappingURL=generate.js.map |
export { generateAnalyticalListPageInterfaceV2, generateListReportInterfaceV2, generateObjectPageInterfaceV2, generateOVPInterfaceV2 } from './generate'; | ||
export { generateObjectPageSchemaV2 } from './objectPage'; | ||
export { generateListReportSchemaV2 } from './listReportObjectPage'; | ||
export { generateListReportSchemaV2 } from './listReport'; | ||
export { generateAnalyticalListReportSchemaV2 } from './analyticalListReport'; |
@@ -10,4 +10,6 @@ "use strict"; | ||
exports.generateObjectPageSchemaV2 = objectPage_1.generateObjectPageSchemaV2; | ||
var listReportObjectPage_1 = require("./listReportObjectPage"); | ||
exports.generateListReportSchemaV2 = listReportObjectPage_1.generateListReportSchemaV2; | ||
var listReport_1 = require("./listReport"); | ||
exports.generateListReportSchemaV2 = listReport_1.generateListReportSchemaV2; | ||
var analyticalListReport_1 = require("./analyticalListReport"); | ||
exports.generateAnalyticalListReportSchemaV2 = analyticalListReport_1.generateAnalyticalListReportSchemaV2; | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { EntityType } from '@sap-ux/vocabularies-types'; | ||
import { ConverterOutput } from '@sap-ux/vocabularies-types'; | ||
/** | ||
@@ -7,9 +7,9 @@ * Generates an app specific schema out of the generic schema. | ||
* @param genericSchema - generic JSON schema of an object page | ||
* @param entitySet - the base entity type of the given page | ||
* @param entityTypeName - the base entity type of the given page | ||
* @param annotations - list of all annotation files (file content plus URI as identifier) | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
* @param manifest - manifest.json of the app | ||
* @param service - service metadata of the app | ||
* | ||
* @returns the app specific JSON schema | ||
*/ | ||
export declare function generateObjectPageSchemaV2(genericSchema: object, entitySet: string, entityTypes: EntityType[], manifest: object): object; | ||
export declare function generateObjectPageSchemaV2(genericSchema: object, entityTypeName: string, oDataServiceAVT: ConverterOutput, manifest: object): object; |
@@ -129,9 +129,8 @@ "use strict"; | ||
* Adds the sections to the app schema | ||
* @param appSchema - app specific schema that potentially gets enhanced | ||
* @param entitySet - entity set of the actual (object) page | ||
* @param pages - list of all pages | ||
* @param entityTypes - entity types, as delivered by parse & merge & convert | ||
* @param additionalSections - additional sections to merge with | ||
* @param {object} appSchema - app specific schema that potentially gets enhanced | ||
* @param {string} entityTypeName - current entity type | ||
* @param {SapUiAppPagesV2} pages - list of (manifest) pages | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
function addSections(appSchema, entitySet, pages, entityTypes) { | ||
function addSections(appSchema, entityTypeName, entitySetName, pages, oDataServiceAVT) { | ||
//initialize sections | ||
@@ -147,3 +146,3 @@ const sections = (appSchema['definitions']['Sections'] = { | ||
// Get facet annotations | ||
const facets = common_1.getObjectPageFacets(entitySet, entityTypes); | ||
const facets = common_1.getObjectPageFacets(entityTypeName, oDataServiceAVT); | ||
if (!facets || Object.keys(facets).length === 0) { | ||
@@ -155,3 +154,3 @@ return; | ||
const element = pages[key]; | ||
if (entitySet.includes(element.entitySet)) { | ||
if (entitySetName.includes(element.entitySet)) { | ||
// Loop on all facets (of the given entitySet) | ||
@@ -163,3 +162,3 @@ for (const facetKey in facets) { | ||
else { | ||
addSections(appSchema, entitySet, element.pages, entityTypes); | ||
addSections(appSchema, entityTypeName, entitySetName, element.pages, oDataServiceAVT); | ||
} | ||
@@ -176,6 +175,6 @@ } | ||
* @param {object} appSchema Schema of the app | ||
* @param {string} entitySet Entityset of the app | ||
* @param {string} entityTypeName - current entity type | ||
* @param {EntityType[]} entityTypes | ||
*/ | ||
function addActions(appSchema, entitySet, entityTypes) { | ||
function addActions(appSchema, entityTypeName, oDataServiceAVT) { | ||
appSchema['definitions']['ObjectPageHeader'] = JSON.parse(JSON.stringify(appSchema['definitions']['ObjectPageHeader<GenericActions>'])); | ||
@@ -189,7 +188,8 @@ delete appSchema['definitions']['ObjectPageHeader']['properties']['actions']; | ||
}); | ||
const entityType = entityTypes.find((et) => et.name === entitySet); | ||
const entityType = oDataServiceAVT.entityTypes.find((et) => et.name === entityTypeName); | ||
if (!entityType) { | ||
return; | ||
} | ||
const actionAnnotation = entityType.annotations.UI.Identification; | ||
const alias = common_1.findAlias('com.sap.vocabularies.UI.v1', oDataServiceAVT); | ||
const actionAnnotation = alias && entityType.annotations[alias].Identification; | ||
if (actionAnnotation) { | ||
@@ -220,9 +220,9 @@ // Add action to configuration | ||
* @param schema - app specific schema that potentially gets enhanced | ||
* @param entitySet - entity set of the actual (object) page | ||
* @param entityTypes - entity types, as delivered by parse & merge & convert | ||
* @param entityType - current entity type | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
*/ | ||
function addRelatedFacetKeysType(schema, entitySet, entityTypes) { | ||
function addRelatedFacetKeysType(schema, entityType, oDataServiceAVT) { | ||
// Find sections from annotation | ||
// And create new definition in schema as enum with description | ||
const facetSections = common_1.getObjectPageFacetSection(entitySet, entityTypes); | ||
const facetSections = common_1.getObjectPageFacetSection(entityType, oDataServiceAVT); | ||
addDefinitionForRelatedFacetKeys(schema, ['ObjectPageCustomSectionFragment', 'ObjectPageCustomSectionView'], facetSections); | ||
@@ -235,10 +235,10 @@ } | ||
* @param genericSchema - generic JSON schema of an object page | ||
* @param entitySet - the base entity type of the given page | ||
* @param entityTypeName - the base entity type of the given page | ||
* @param annotations - list of all annotation files (file content plus URI as identifier) | ||
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool | ||
* @param manifest - manifest.json of the app | ||
* @param service - service metadata of the app | ||
* | ||
* @returns the app specific JSON schema | ||
*/ | ||
function generateObjectPageSchemaV2(genericSchema, entitySet, entityTypes, manifest) { | ||
function generateObjectPageSchemaV2(genericSchema, entityTypeName, oDataServiceAVT, manifest) { | ||
const appSchema = JSON.parse(JSON.stringify(genericSchema)); | ||
@@ -258,11 +258,12 @@ // Custom sections as part of sections | ||
}; | ||
const entitySet = oDataServiceAVT.entitySets.find((es) => es.entityType.name === entityTypeName); | ||
// Add sections | ||
addSections(appSchema, entitySet, manifest['sap.ui.generic.app'].pages, entityTypes); | ||
addSections(appSchema, entityTypeName, entitySet.name, manifest['sap.ui.generic.app'].pages, oDataServiceAVT); | ||
delete appSchema['definitions']['ObjectPageTable<GenericColumns>']; | ||
// Add actions | ||
addActions(appSchema, entitySet, entityTypes); | ||
addActions(appSchema, entityTypeName, oDataServiceAVT); | ||
delete appSchema['definitions']['GenericActions']; | ||
delete appSchema['definitions']['ObjectPageHeader<GenericActions>']; | ||
// Custom Section facets | ||
addRelatedFacetKeysType(appSchema, entitySet, entityTypes); | ||
addRelatedFacetKeysType(appSchema, entityTypeName, oDataServiceAVT); | ||
// Eliminate generic Sections | ||
@@ -269,0 +270,0 @@ delete appSchema['definitions']['GenericSections']; |
@@ -81,3 +81,2 @@ "use strict"; | ||
super(manifest, schemas, generateId(v2Pages[Object.keys(v2Pages)[0]]), convertPages(v2Pages, changes, manifest, schemas), common_1.FioriElementsVersion.v2, appSettings); | ||
this.app.settings = { ...this.app.settings, ...(manifest['sap.ui.generic.app'].settings || {}) }; | ||
} | ||
@@ -84,0 +83,0 @@ /** |
@@ -8,3 +8,3 @@ "use strict"; | ||
const AnalyticalListPage_1 = require("../../export/pages/AnalyticalListPage"); | ||
const utils_1 = require("../utils"); | ||
const utils_1 = require("../../../common/utils"); | ||
function addSettings(analyticalListPageConfig, manifest, jsonSchema, pageKey) { | ||
@@ -11,0 +11,0 @@ // Check table settings from target structure |
@@ -6,3 +6,3 @@ "use strict"; | ||
const controls_1 = require("../../export/controls"); | ||
const utils_1 = require("../utils"); | ||
const utils_1 = require("../../../common/utils"); | ||
function addSettings(listReportConfig, manifest, jsonSchema, pageKey) { | ||
@@ -9,0 +9,0 @@ // Check table settings from target structure |
@@ -6,7 +6,2 @@ import { SapUiAppPageV2, SapUiAppPagesV2 } from '../../../specification/v2/webapp'; | ||
/** | ||
* Return the page type for a given page in manifest | ||
* @param name - page component name | ||
*/ | ||
export declare function getPageType(name: any): PageType; | ||
/** | ||
* Determines a V2 object page in the manifest, based on the given entity set | ||
@@ -13,0 +8,0 @@ * @param v2Pages - manifest['sap.ui.generic.app'].pages |
@@ -12,10 +12,2 @@ "use strict"; | ||
/** | ||
* Return the page type for a given page in manifest | ||
* @param name - page component name | ||
*/ | ||
function getPageType(name) { | ||
return name.split('sap.suite.ui.generic.template.')[1]; | ||
} | ||
exports.getPageType = getPageType; | ||
/** | ||
* Determines a V2 object page in the manifest, based on the given entity set | ||
@@ -30,3 +22,3 @@ * @param v2Pages - manifest['sap.ui.generic.app'].pages | ||
const v2Page = v2Pages[key]; | ||
if (getPageType(v2Page.component.name) === common_1.PageType.ObjectPage && v2Page.entitySet === entitySet) { | ||
if (common_2.getPageType(v2Page.component.name) === common_1.PageType.ObjectPage && v2Page.entitySet === entitySet) { | ||
pageKeys.push(key); | ||
@@ -52,3 +44,3 @@ return v2Page; | ||
pageKeys.push(key); | ||
if (getPageType(v2Page.component.name) === common_1.PageType.ListReport) { | ||
if (common_2.getPageType(v2Page.component.name) === common_1.PageType.ListReport) { | ||
return v2Page; | ||
@@ -69,3 +61,3 @@ } | ||
pageKeys.push(key); | ||
if (getPageType(v2Page.component.name) === common_1.PageType.AnalyticalListPage) { | ||
if (common_2.getPageType(v2Page.component.name) === common_1.PageType.AnalyticalListPage) { | ||
return v2Page; | ||
@@ -72,0 +64,0 @@ } |
{ | ||
"name": "@sap/ux-specification", | ||
"version": "1.71.13", | ||
"version": "1.71.14", | ||
"displayName": "SAP Fiori tools - Specification", | ||
@@ -20,6 +20,5 @@ "description": "Specification for Fiori elements", | ||
"clean": "rimraf ./dist && rimraf ./schemas", | ||
"build": "yarn run clean && tsc --project ./tsconfig.build.json && yarn run create-json-schemas && yarn copy-json-schemas && yarn copy-ui-flexibility-tools", | ||
"build": "yarn run clean && tsc --project ./tsconfig.build.json && yarn run create-json-schemas && yarn copy-json-schemas", | ||
"create-json-schemas": "node dist/scripts/to-json-schema.js", | ||
"copy-json-schemas": "cpy schemas/** dist --parents", | ||
"copy-ui-flexibility-tools": "cpy src/ui5-flexibility-utils/** dist --parents", | ||
"test": "yarn build && jest --colors", | ||
@@ -35,3 +34,3 @@ "update-snapshots": "jest --updateSnapshot", | ||
"iXiaSoftV4": "node dist/scripts/extractDocu.js --version=v4 --format=iXiaSoft", | ||
"postpublish": "npm dist-tag add @sap/ux-specification@1.71.13 UI5-1.72 && npm dist-tag add @sap/ux-specification@1.71.13 UI5-1.73 && npm dist-tag add @sap/ux-specification@1.71.13 UI5-1.74 && npm dist-tag add @sap/ux-specification@1.71.13 UI5-1.75" | ||
"postpublish": "npm dist-tag add @sap/ux-specification@1.71.14 UI5-1.72 && npm dist-tag add @sap/ux-specification@1.71.14 UI5-1.73 && npm dist-tag add @sap/ux-specification@1.71.14 UI5-1.74 && npm dist-tag add @sap/ux-specification@1.71.14 UI5-1.75" | ||
}, | ||
@@ -65,7 +64,8 @@ "publisher": "SAPSE", | ||
"dependencies": { | ||
"path": "0.12.7", | ||
"reflect-metadata": "0.1.13", | ||
"@sap-ux/annotation-converter": "0.2.6", | ||
"@sap-ux/edmx-parser": "0.2.6", | ||
"@sap-ux/vocabularies-types": "0.2.6" | ||
"@sap-ux/vocabularies-types": "0.2.6", | ||
"@ui5/flexibility-utils": "0.1.3", | ||
"path": "0.12.7", | ||
"reflect-metadata": "0.1.13" | ||
}, | ||
@@ -72,0 +72,0 @@ "bundledDependencies": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
1775487
402
6
31891
+ Added@ui5/flexibility-utils@0.1.3
+ Added@ui5/flexibility-utils@0.1.3(transitive)