New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@sap/ux-specification

Package Overview
Dependencies
Maintainers
1
Versions
515
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap/ux-specification - npm Package Compare versions

Comparing version 1.71.26 to 1.71.27

20

CHANGELOG.md

@@ -7,10 +7,6 @@ # Change Log

## [1.71.26] - 2021-03-11
## [1.71.27] - 2021-03-25
### Added
- Property valueSelectionInfo of OVP cards
- Tag isViewNode now marks schema elements that are relevant for setting up an out line or schematic view of a page; (complex) properties are not marked like that.
- Tag i18nClassification marks properties of the schema that are relevent for translation; it uses the key words following the SAP guidelines for translation.
### Changed

@@ -24,2 +20,16 @@

- No duplicate entries in the result lists of scripts for extracting documentation
### Quality
## [1.71.26] - 2021-03-11
### Added
- Property valueSelectionInfo of OVP cards
- Tag isViewNode now marks schema elements that are relevant for setting up an out line or schematic view of a page; (complex) properties are not marked like that.
- Tag i18nClassification marks properties of the schema that are relevent for translation; it uses the key words following the SAP guidelines for translation.
### Fixed
- Export of OVP card of the new V4 types to manifest

@@ -26,0 +36,0 @@ - OVP: Unknown properties are now excluded from export

@@ -161,2 +161,4 @@ "use strict";

function writeToExcel(workbook, output, file) {
//filter output to remove duplicated lines due to different table types (anyOf)
output = output.filter((e, i, a) => a.indexOf(e) === i);
const sheetName = file.split('.')[0];

@@ -186,2 +188,4 @@ const worksheet = workbook.addWorksheet(sheetName);

function generateIxiaSoftFormat(output, file, version) {
//filter output to remove duplicated lines due to different table types (anyOf)
output = output.filter((e, i, a) => a.indexOf(e) === i);
let iXiaFormat = `<simpletable frame="all" relcolwidth="1* 1*" id="simpletable_uqj_klr_jlb">

@@ -188,0 +192,0 @@ <sthead>

@@ -149,2 +149,3 @@ import { Manifest } from '../../specification/common/webapp/manifest';

entityType?: EntityType;
annotationPath?: string;
}

@@ -156,2 +157,3 @@ export interface SubSectionConfig {

facets: FacetConfigs;
annotationPath?: string;
}

@@ -158,0 +160,0 @@ export interface FacetConfigs {

@@ -32,3 +32,3 @@ import { FacetConfigs, FileData, FacetConfig, FacetSection, SchemaFilePath } from './types';

*/
export declare function getPageTypeV2(name: any): PageType;
export declare function getPageTypeV2(name: string): PageType;
/**

@@ -38,5 +38,7 @@ * Resolve page section(get key and label->description).

* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
* @param {FioriElementsVersion} oDataVersion - OData version
* @param {ExtensionLogger} logger - Logger class for logging messages
* @returns {FacetSection} - object comprising the relevant facet information
*/
export declare function getSectionFacet(facetDefinition: AnnotationTerm<CollectionFacet> | AnnotationTerm<ReferenceFacet> | AnnotationTerm<ReferenceURLFacet>, keyForRelatedFacetKeys?: boolean, oDataVersion?: FioriElementsVersion): FacetSection | undefined;
export declare function getSectionFacet(facetDefinition: AnnotationTerm<CollectionFacet> | AnnotationTerm<ReferenceFacet> | AnnotationTerm<ReferenceURLFacet>, keyForRelatedFacetKeys?: boolean, oDataVersion?: FioriElementsVersion, logger?: ExtensionLogger): FacetSection | undefined;
export declare const getManifestSectionByPathV4: (exportResultManifest: object, path: string, targetAnnotation?: string, targetAnnotationEncoded?: string) => object;

@@ -43,0 +45,0 @@ /**

@@ -176,5 +176,7 @@ "use strict";

* @param keyForRelatedFacetKeys - construct key for 'keyForRelatedFacetKeys' property(used to define custom sections) - we should not add '@' symbol there.
* @param {FioriElementsVersion} oDataVersion - OData version
* @param {ExtensionLogger} logger - Logger class for logging messages
* @returns {FacetSection} - object comprising the relevant facet information
*/
function getSectionFacet(facetDefinition, keyForRelatedFacetKeys = false, oDataVersion = common_1.FioriElementsVersion.v2) {
function getSectionFacet(facetDefinition, keyForRelatedFacetKeys = false, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
const entityName = facetDefinition.fullyQualifiedName.substr(facetDefinition.fullyQualifiedName.lastIndexOf('@'));

@@ -186,2 +188,9 @@ //Take facet ID as fallback

const propertyValue = exports.getAnnotationPropertyValue(facetDefinition.Target);
if (!propertyValue) {
extensionLogger_1.log(logger, {
severity: "error" /* Error */,
message: i18next_1.default.t('NOTARGET', { target: facetDefinition.Target })
});
return;
}
const navSeparator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '/';

@@ -304,16 +313,37 @@ const separator = oDataVersion === common_1.FioriElementsVersion.v2 ? '::' : '#';

*/
function evaluateTargetAnnotation(annotationRecord, facets, serviceName, entityName, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2) {
const section = getSectionFacet(annotationRecord, false, oDataVersion);
let path = section.key;
/**
* Evaluates the target annotation of a reference facet and actualizes the facets for the config
* @param {AnnotationTerm} annotationRecord - the actual annotation record
* @param {FacetConfigs} facets - list of facets in config format, to be updated
* @param {EntityType} entityType - the entity type
* @param {ConverterOutput} oDataServiceAVT - complete service information, as returned by annotation vocabularies tool
* @param {FioriElementsVersion} oDataVersion - OData version
* @param {ExtensionLogger} logger - Logger class for logging messages
*/
function evaluateTargetAnnotation(annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
const section = getSectionFacet(annotationRecord, false, oDataVersion, logger);
let path = section ? section.key : '';
let targetEntityType = entityType;
if (path.lastIndexOf('::') > -1) {
const navPath = path.substr(0, path.lastIndexOf('::'));
const navProp = entityType && entityType.navigationProperties.find((n) => n.name === navPath);
const targetEntity = navProp && navProp['targetType'].fullyQualifiedName;
targetEntityType =
targetEntity && oDataServiceAVT.entityTypes.find((et) => et.fullyQualifiedName === targetEntity);
}
let scope, version, annotation;
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' };
facets[path]['entityType'] = targetEntityType;
}
else if (path.includes('com.sap.vocabularies.UI.v1.Identification') || path.includes(alias + '.Identification')) {
facets[path] = { base: 'Identification' };
facets[path]['entityType'] = targetEntityType;
scope = alias;
annotation = 'Identification';
facets[path]['form'] = targetEntityType.annotations[scope][annotation];
}
else if (path.includes('com.sap.vocabularies.UI.v1.LineItem') || path.includes(alias + '.LineItem')) {
const entityType = oDataServiceAVT.entityTypes.find((e) => e.fullyQualifiedName === `${serviceName}.${entityName}`);
if (entityType) {
const navPath = path.substr(0, path.lastIndexOf('::'));
const navProp = entityType.navigationProperties.find((n) => n.name === navPath);
const targetEntity = navProp && navProp['targetType'].fullyQualifiedName;
let scope, version, annotation;
if (path.includes('com.sap.vocabularies.UI.v1.LineItem')) {

@@ -330,3 +360,2 @@ [scope, version, annotation] = path.split('com.sap.vocabularies.')[1].split('.');

facets[path] = { base: 'LineItemFacet' };
const targetEntityType = oDataServiceAVT.entityTypes.find((et) => et.fullyQualifiedName === targetEntity);
if (targetEntityType &&

@@ -343,2 +372,16 @@ targetEntityType.annotations &&

facets[path] = { base: 'FormFacet' };
if (path.includes('com.sap.vocabularies.UI.v1.FieldGroup')) {
[scope, version, annotation] = path.split('com.sap.vocabularies.')[1].split('.');
}
else {
scope = alias;
annotation = path.split(alias + '.')[1];
}
if (targetEntityType &&
targetEntityType.annotations &&
targetEntityType.annotations[scope] &&
targetEntityType.annotations[scope][annotation]) {
facets[path]['form'] = targetEntityType.annotations[scope][annotation];
facets[path]['entityType'] = targetEntityType;
}
}

@@ -348,2 +391,4 @@ else {

}
facets[path].annotationPath =
'/' + entityType.name + '/' + annotationRecord.fullyQualifiedName.split(entityType.fullyQualifiedName)[1];
if (annotationRecord.Label) {

@@ -364,18 +409,26 @@ facets[path].Label = annotationRecord.Label;

* @param {FacetConfigs} facets - list of facets in config format, to be updated
* @param {FioriElementsVersion} oDataVersion - OData version
* @param {ExtensionLogger} logger - Logger class for logging messages
*/
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityName, facets, oDataVersion = common_1.FioriElementsVersion.v2) {
function addFacetToConfig(annotationRecord, oDataServiceAVT, serviceName, entityType, facets, oDataVersion = common_1.FioriElementsVersion.v2, logger) {
switch (annotationRecord.$Type) {
case "com.sap.vocabularies.UI.v1.ReferenceFacet" /* ReferenceFacet */: {
evaluateTargetAnnotation(annotationRecord, facets, serviceName, entityName, oDataServiceAVT, oDataVersion);
evaluateTargetAnnotation(annotationRecord, facets, entityType, oDataServiceAVT, oDataVersion, logger);
break;
}
case "com.sap.vocabularies.UI.v1.CollectionFacet" /* CollectionFacet */: {
const section = getSectionFacet(annotationRecord, false, oDataVersion);
const section = getSectionFacet(annotationRecord, false, oDataVersion, logger);
const annotationPath = '/' +
entityType.name +
'/' +
annotationRecord.fullyQualifiedName.split(entityType.fullyQualifiedName)[1];
const facet = (facets[section.key] = {
base: 'CollectionFacet',
facets: {},
ID: section.ID
ID: section.ID,
annotationPath: annotationPath,
Label: section.label
});
annotationRecord.Facets.forEach((collectionItem) => {
addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityName, facet.facets, oDataVersion);
addFacetToConfig(collectionItem, oDataServiceAVT, serviceName, entityType, facet.facets, oDataVersion, logger);
});

@@ -405,3 +458,3 @@ break;

facetAnnotation.forEach((item) => {
addFacetToConfig(item, oDataServiceAVT, serviceName, entityTypeName, facets, oDataVersion);
addFacetToConfig(item, oDataServiceAVT, serviceName, entityType, facets, oDataVersion);
});

@@ -408,0 +461,0 @@ }

{
"name": "@sap/ux-specification",
"version": "1.71.26",
"version": "1.71.27",
"displayName": "SAP Fiori tools - Specification",

@@ -5,0 +5,0 @@ "description": "SAP Fiori tools - Specification",

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc