@sap/ux-specification
Advanced tools
Comparing version 1.71.25 to 1.71.26
@@ -7,2 +7,23 @@ # Change Log | ||
## [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. | ||
### Changed | ||
### Deprecated | ||
### Removed | ||
### Fixed | ||
- Export of OVP card of the new V4 types to manifest | ||
- OVP: Unknown properties are now excluded from export | ||
### Quality | ||
## [1.71.25] - 2021-02-25 | ||
@@ -62,2 +83,3 @@ | ||
### Fixed | ||
- OData V2: Export fails to resolve page in `manifest.json` when page key does not contain entitySet. | ||
@@ -64,0 +86,0 @@ |
@@ -18,2 +18,3 @@ { | ||
"keyPerformanceIndicators": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -31,2 +32,3 @@ "additionalProperties": { | ||
"AnalyticalTableALP<GenericColumns>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -57,3 +59,3 @@ "properties": { | ||
"description": "Lets you define title for the content area", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title for the content area", | ||
"type": "string" | ||
@@ -207,2 +209,3 @@ }, | ||
"GenericColumns": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -215,2 +218,3 @@ "additionalProperties": { | ||
{ | ||
"isViewNode": true, | ||
"type": "array", | ||
@@ -225,2 +229,3 @@ "items": { | ||
"TableColumn": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -251,2 +256,3 @@ "properties": { | ||
"TableCustomColumn": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -259,3 +265,4 @@ "properties": { | ||
"text": { | ||
"description": "The label of the custom column, preferrable as an i18n key", | ||
"description": "The label of the custom column, preferrable as an i18n key.", | ||
"i18nClassification": "COL: Custom column header text", | ||
"type": "string" | ||
@@ -317,2 +324,3 @@ }, | ||
"AnalyticalListPageFilterBar": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -337,3 +345,3 @@ "properties": { | ||
"description": "You can choose an app-specific title by setting the corresponding value for the subTitleIfVariantMgmtHidden property.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle if variant management is hidden", | ||
"type": "string" | ||
@@ -345,2 +353,3 @@ } | ||
"ChartSettings": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -403,2 +412,3 @@ "properties": { | ||
"KPISettings": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -405,0 +415,0 @@ "properties": { |
@@ -34,2 +34,3 @@ { | ||
"ResponsiveTable<GenericColumns>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -207,2 +208,3 @@ "properties": { | ||
"GenericColumns": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -215,2 +217,3 @@ "additionalProperties": { | ||
{ | ||
"isViewNode": true, | ||
"type": "array", | ||
@@ -225,2 +228,3 @@ "items": { | ||
"TableColumn": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -251,2 +255,3 @@ "properties": { | ||
"TableCustomColumn": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -259,3 +264,4 @@ "properties": { | ||
"text": { | ||
"description": "The label of the custom column, preferrable as an i18n key", | ||
"description": "The label of the custom column, preferrable as an i18n key.", | ||
"i18nClassification": "COL: Custom column header text", | ||
"type": "string" | ||
@@ -317,2 +323,3 @@ }, | ||
"TreeTable<GenericColumns>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -382,2 +389,3 @@ "properties": { | ||
"AnalyticalTable<GenericColumns>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -408,3 +416,3 @@ "properties": { | ||
"description": "Lets you define title for the content area", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title for the content area", | ||
"type": "string" | ||
@@ -490,2 +498,3 @@ }, | ||
"GridTable<GenericColumns>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -559,2 +568,3 @@ "properties": { | ||
"FilterBar": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -575,3 +585,3 @@ "properties": { | ||
"description": "You can choose an app-specific title by setting the corresponding value for the subTitleIfVariantMgmtHidden property.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle if variant management is hidden", | ||
"type": "string" | ||
@@ -578,0 +588,0 @@ } |
@@ -43,2 +43,3 @@ { | ||
"ObjectPageHeader<GenericActions>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -77,2 +78,3 @@ "properties": { | ||
"GenericActions": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -84,2 +86,3 @@ "additionalProperties": { | ||
"HeaderAction": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -99,2 +102,3 @@ "properties": { | ||
"ObjectPageLayout": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -122,2 +126,3 @@ "properties": { | ||
"GenericSections": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -129,2 +134,3 @@ "additionalProperties": { | ||
"ObjectPageSectionV2<GenericColumns>": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -291,2 +297,3 @@ "properties": { | ||
"GenericColumns": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -299,2 +306,3 @@ "additionalProperties": { | ||
{ | ||
"isViewNode": true, | ||
"type": "array", | ||
@@ -309,2 +317,3 @@ "items": { | ||
"TableColumn": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -335,2 +344,3 @@ "properties": { | ||
"TableCustomColumn": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -343,3 +353,4 @@ "properties": { | ||
"text": { | ||
"description": "The label of the custom column, preferrable as an i18n key", | ||
"description": "The label of the custom column, preferrable as an i18n key.", | ||
"i18nClassification": "COL: Custom column header text", | ||
"type": "string" | ||
@@ -566,5 +577,7 @@ }, | ||
"CustomSections": { | ||
"isViewNode": true, | ||
"type": "object", | ||
"properties": { | ||
"custom": { | ||
"isViewNode": true, | ||
"type": "array", | ||
@@ -586,2 +599,3 @@ "items": { | ||
"ObjectPageCustomSectionView": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -609,3 +623,3 @@ "properties": { | ||
"description": "The label of the custom section, preferrable as an i18n key", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Custom section title", | ||
"type": "string" | ||
@@ -642,2 +656,3 @@ } | ||
"ObjectPageCustomSectionFragment": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -668,3 +683,3 @@ "properties": { | ||
"description": "The label of the custom section, preferrable as an i18n key", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Custom section title", | ||
"type": "string" | ||
@@ -671,0 +686,0 @@ } |
@@ -100,3 +100,3 @@ { | ||
"CustomCard": { | ||
"description": "Represents the card attributes\n\nThis interface was referenced by `undefined`'s JSON-Schema definition\nvia the `patternProperty` \"^[a-zA-Z0-9_\\.\\-]+$\".", | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -286,3 +286,3 @@ "properties": { | ||
"description": "The language-dependent title of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the card, used in the card header", | ||
"type": "string" | ||
@@ -292,3 +292,3 @@ }, | ||
"description": "The language-dependent subtitle of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the card, used in the card header", | ||
"type": "string" | ||
@@ -393,2 +393,3 @@ }, | ||
"ListCard": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -451,2 +452,6 @@ "properties": { | ||
}, | ||
"valueSelectionInfo": { | ||
"description": "Represents things like people, number of items.", | ||
"type": "string" | ||
}, | ||
"sortBy": { | ||
@@ -479,3 +484,3 @@ "description": "Defines the property by which the list shall be sorted.", | ||
"description": "The language-dependent title of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the card, used in the card header", | ||
"type": "string" | ||
@@ -485,3 +490,3 @@ }, | ||
"description": "The language-dependent subtitle of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the card, used in the card header", | ||
"type": "string" | ||
@@ -644,2 +649,3 @@ }, | ||
"StackCard": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -715,3 +721,3 @@ "properties": { | ||
"description": "The language-dependent title of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the card, used in the card header", | ||
"type": "string" | ||
@@ -721,3 +727,3 @@ }, | ||
"description": "The language-dependent subtitle of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the card, used in the card header", | ||
"type": "string" | ||
@@ -794,2 +800,3 @@ }, | ||
"LinklistCard": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -841,3 +848,3 @@ "properties": { | ||
"description": "title represents the language-dependent title of the card, as used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the card, used in the card header", | ||
"type": "string" | ||
@@ -847,3 +854,3 @@ }, | ||
"description": "YOu can define the language-dependent subtitle of the card, as used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the card, used in the card header", | ||
"type": "string" | ||
@@ -941,3 +948,3 @@ }, | ||
"description": "The language-dependent title of the StaticContent.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the StaticContent", | ||
"type": "string" | ||
@@ -947,3 +954,3 @@ }, | ||
"description": "The language-dependent subtitle of the StaticContent.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the StaticContent", | ||
"type": "string" | ||
@@ -961,3 +968,3 @@ }, | ||
"description": "The alternative text for the image of the StaticContent.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "ALT: The alternative text for the image of the StaticContent", | ||
"type": "string" | ||
@@ -984,2 +991,3 @@ }, | ||
"TableCard": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -1054,5 +1062,30 @@ "properties": { | ||
}, | ||
"valueSelectionInfo": { | ||
"description": "Represents things like people, number of items.", | ||
"type": "string" | ||
}, | ||
"sortBy": { | ||
"description": "Defines the property by which the list shall be sorted.", | ||
"type": "string" | ||
}, | ||
"sortOrder": { | ||
"$ref": "#/definitions/SortOrderType", | ||
"description": "Defines the sort order." | ||
}, | ||
"tabs": { | ||
"description": "Represents the card with view switch control.", | ||
"type": "array", | ||
"items": [ | ||
{ | ||
"$ref": "#/definitions/TabSetting" | ||
} | ||
], | ||
"minItems": 1, | ||
"additionalItems": { | ||
"$ref": "#/definitions/TabSetting" | ||
} | ||
}, | ||
"title": { | ||
"description": "The language-dependent title of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the card, used in the card header", | ||
"type": "string" | ||
@@ -1062,3 +1095,3 @@ }, | ||
"description": "The language-dependent subtitle of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the card, used in the card header", | ||
"type": "string" | ||
@@ -1135,2 +1168,3 @@ }, | ||
"AnalyticalCard": { | ||
"isViewNode": true, | ||
"type": "object", | ||
@@ -1188,5 +1222,9 @@ "properties": { | ||
}, | ||
"valueSelectionInfo": { | ||
"description": "Represents things like people, number of items.", | ||
"type": "string" | ||
}, | ||
"title": { | ||
"description": "The language-dependent title of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Title of the card, used in the card header", | ||
"type": "string" | ||
@@ -1196,3 +1234,3 @@ }, | ||
"description": "The language-dependent subtitle of the card, used in the card header.", | ||
"isLanguageDependent": true, | ||
"i18nClassification": "TIT: Subtitle of the card, used in the card header", | ||
"type": "string" | ||
@@ -1199,0 +1237,0 @@ }, |
@@ -31,3 +31,3 @@ "use strict"; | ||
required: true, | ||
validationKeywords: ['isLanguageDependent'] | ||
validationKeywords: ['i18nClassification', 'isViewNode'] | ||
}); | ||
@@ -34,0 +34,0 @@ schemas[file.replace('ts', 'json')] = generator.getSchemaForSymbol(file.replace('.ts', '')); |
@@ -33,2 +33,5 @@ export declare enum ChartType { | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ChartSettings { | ||
@@ -35,0 +38,0 @@ /** |
@@ -0,1 +1,4 @@ | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface KPISettings { | ||
@@ -2,0 +5,0 @@ /** |
@@ -82,3 +82,3 @@ /** | ||
* The language-dependent title of the card, used in the card header. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Title of the card, used in the card header | ||
*/ | ||
@@ -88,3 +88,3 @@ title: string; | ||
* The language-dependent subtitle of the card, used in the card header. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Subtitle of the card, used in the card header | ||
*/ | ||
@@ -137,6 +137,3 @@ subTitle?: string; | ||
/** | ||
* Represents the card attributes | ||
* | ||
* This interface was referenced by `undefined`'s JSON-Schema definition | ||
* via the `patternProperty` "^[a-zA-Z0-9_\.\-]+$". | ||
* @isViewNode true | ||
*/ | ||
@@ -158,2 +155,5 @@ export interface CustomCard { | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ListCard { | ||
@@ -177,2 +177,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface StackCard { | ||
@@ -196,2 +199,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface LinklistCard { | ||
@@ -215,2 +221,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface TableCard { | ||
@@ -239,2 +248,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface AnalyticalCard { | ||
@@ -400,2 +412,6 @@ /** | ||
dataPointAnnotationPath?: string; | ||
/** | ||
* Represents things like people, number of items. | ||
*/ | ||
valueSelectionInfo?: string; | ||
} | ||
@@ -433,2 +449,6 @@ export declare enum ListFlavorType { | ||
/** | ||
* Represents things like people, number of items. | ||
*/ | ||
valueSelectionInfo?: string; | ||
/** | ||
* Defines the property by which the list shall be sorted. | ||
@@ -506,2 +526,18 @@ */ | ||
selectionPresentationAnnotationPath?: string; | ||
/** | ||
* Represents things like people, number of items. | ||
*/ | ||
valueSelectionInfo?: string; | ||
/** | ||
* Defines the property by which the list shall be sorted. | ||
*/ | ||
sortBy?: string; | ||
/** | ||
* Defines the sort order. | ||
*/ | ||
sortOrder?: SortOrderType; | ||
/** | ||
* Represents the card with view switch control. | ||
*/ | ||
tabs?: [TabSetting, ...TabSetting[]]; | ||
} | ||
@@ -519,3 +555,3 @@ export declare enum LinkListFlavorType { | ||
* title represents the language-dependent title of the card, as used in the card header. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Title of the card, used in the card header | ||
*/ | ||
@@ -525,3 +561,3 @@ title: string; | ||
* YOu can define the language-dependent subtitle of the card, as used in the card header. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Subtitle of the card, used in the card header | ||
*/ | ||
@@ -565,3 +601,3 @@ subTitle?: string; | ||
* The language-dependent title of the StaticContent. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Title of the StaticContent | ||
*/ | ||
@@ -571,3 +607,3 @@ title: string; | ||
* The language-dependent subtitle of the StaticContent. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Subtitle of the StaticContent | ||
*/ | ||
@@ -585,3 +621,3 @@ subTitle?: string; | ||
* The alternative text for the image of the StaticContent. | ||
* @isLanguageDependent true | ||
* @i18nClassification ALT: The alternative text for the image of the StaticContent | ||
*/ | ||
@@ -588,0 +624,0 @@ imageAltText?: string; |
import { GenericColumns } from './Table'; | ||
import { ObjectPageResponsiveTable, ObjectPageAnalyticalTable, ObjectPageGridTable, ObjectPageTreeTable } from './ObjectPageTable'; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface LineItemFacet<COLS = GenericColumns> { | ||
table: ObjectPageResponsiveTable<COLS> | ObjectPageAnalyticalTable<COLS> | ObjectPageGridTable<COLS> | ObjectPageTreeTable<COLS>; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface FormFacet { | ||
[id: string]: boolean | number | string | object; | ||
} |
@@ -0,1 +1,18 @@ | ||
export declare type FilterTypeCategory = { | ||
/** | ||
* Choose 'key' to define filter values for single values of the date range type, or 'category' to filter by a whole subset. | ||
*/ | ||
path: 'category'; | ||
/** | ||
* The 'contains' string specifies a filter describing a set of values of the date range type. | ||
*/ | ||
contains: string; | ||
/** | ||
* The exclude property is set to True by default. This means excluding all values given as selectedValues from the list of date range filters. If the exclude property is set to False, the application shows only selected values in the list of date range filters. | ||
*/ | ||
exclude?: boolean; | ||
}; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface FilterBar { | ||
@@ -13,6 +30,9 @@ /** | ||
* You can choose an app-specific title by setting the corresponding value for the subTitleIfVariantMgmtHidden property. | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Subtitle if variant management is hidden | ||
*/ | ||
subTitleIfVariantMgmtHidden?: string; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface AnalyticalListPageFilterBar extends FilterBar { | ||
@@ -19,0 +39,0 @@ /** |
@@ -6,5 +6,11 @@ import { HeaderAction } from '../controls/ObjectPageHeaderAction'; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface GenericActions { | ||
[id: string]: HeaderAction; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ObjectPageHeader<ACT = GenericActions> { | ||
@@ -11,0 +17,0 @@ /** |
@@ -5,4 +5,7 @@ export declare enum BindingValue { | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface HeaderAction { | ||
visible?: boolean | BindingValue; | ||
} |
@@ -0,1 +1,4 @@ | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ObjectPageLayout { | ||
@@ -2,0 +5,0 @@ /** |
import { ObjectPageResponsiveTable, ObjectPageAnalyticalTable, ObjectPageGridTable, ObjectPageTreeTable } from './ObjectPageTable'; | ||
import { GenericColumns } from './Table'; | ||
import { ViewTypes, SAPUI5_FRAGMENT_CLASS, SAPUI5_VIEW_CLASS } from '../../common/webapp/manifest/sapUi5'; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ObjectPageSectionV2<COLS = GenericColumns> { | ||
table?: ObjectPageResponsiveTable<COLS> | ObjectPageAnalyticalTable<COLS> | ObjectPageGridTable<COLS> | ObjectPageTreeTable<COLS>; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ObjectPageSubSectionsV2 { | ||
subsections: GenericSections; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface GenericSections { | ||
[key: string]: ObjectPageSectionV2; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface CustomSections { | ||
/** | ||
* @isViewNode true | ||
*/ | ||
custom?: (ObjectPageCustomSectionView | ObjectPageCustomSectionFragment)[]; | ||
@@ -21,6 +36,9 @@ } | ||
* The label of the custom section, preferrable as an i18n key | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Custom section title | ||
*/ | ||
title: string; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ObjectPageCustomSectionView extends ObjectPageCustomSectionBase { | ||
@@ -31,2 +49,5 @@ className: typeof SAPUI5_VIEW_CLASS; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ObjectPageCustomSectionFragment extends ObjectPageCustomSectionBase { | ||
@@ -33,0 +54,0 @@ className: typeof SAPUI5_FRAGMENT_CLASS; |
@@ -10,2 +10,5 @@ import { SAPUI5_FRAGMENT_CLASS } from '../../common/webapp/manifest/sapUi5'; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface TableColumn { | ||
@@ -21,2 +24,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface TableCustomColumn { | ||
@@ -28,4 +34,4 @@ /** | ||
/** | ||
* The label of the custom column, preferrable as an i18n key | ||
* @IsLanguageDependent true | ||
* The label of the custom column, preferrable as an i18n key. | ||
* @i18nClassification COL: Custom column header text | ||
*/ | ||
@@ -81,3 +87,9 @@ text?: string; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export declare type TableCustomColumns = Array<TableCustomColumn>; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface GenericColumns { | ||
@@ -186,4 +198,10 @@ [key: string]: TableColumn | TableCustomColumns; | ||
enableTableFilterInPageVariant?: boolean; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
columns?: COLS; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface ResponsiveTable<COLS = GenericColumns> extends CommonTableSettings { | ||
@@ -211,2 +229,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface TreeTable<COLS = GenericColumns> extends CommonTableSettings { | ||
@@ -222,2 +243,5 @@ /** | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface AnalyticalTable<COLS = GenericColumns> extends CommonTableSettings { | ||
@@ -242,3 +266,3 @@ /** | ||
* Lets you define title for the content area | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Title for the content area | ||
*/ | ||
@@ -259,2 +283,5 @@ contentTitle?: string; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface AnalyticalTableALP<COLS = GenericColumns> extends CommonTableSettings { | ||
@@ -279,3 +306,3 @@ /** | ||
* Lets you define title for the content area | ||
* @isLanguageDependent true | ||
* @i18nClassification TIT: Title for the content area | ||
*/ | ||
@@ -292,2 +319,5 @@ contentTitle?: string; | ||
} | ||
/** | ||
* @isViewNode true | ||
*/ | ||
export interface GridTable<COLS = GenericColumns> extends CommonTableSettings { | ||
@@ -294,0 +324,0 @@ /** |
@@ -10,5 +10,11 @@ import { AnalyticalListPageFilterBar, AnalyticalTableALP } from '../controls'; | ||
fitContent?: boolean; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
table?: AnalyticalTableALP; | ||
filterBar?: AnalyticalListPageFilterBar; | ||
chart?: ChartSettings; | ||
/** | ||
* @isViewNode true | ||
*/ | ||
keyPerformanceIndicators?: { | ||
@@ -15,0 +21,0 @@ [k: string]: KPISettings; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const types_1 = require("../types"); | ||
const utils_1 = require("../utils"); | ||
/** | ||
@@ -106,3 +107,3 @@ * General export rule, joining all given breadcrumbs to the base ID | ||
if (originalDefinition.$ref) { | ||
targetDefinition = schema['definitions'][originalDefinition.$ref.split('#/definitions/')[1]]; | ||
targetDefinition = schema['definitions'][originalDefinition.$ref.split(utils_1.DEFINITION_LINK_PREFIX)[1]]; | ||
} | ||
@@ -109,0 +110,0 @@ else { |
@@ -13,2 +13,3 @@ import { FacetConfigs, FileData, FacetConfig, FacetSection, SchemaFilePath } from './types'; | ||
} | ||
export declare const DEFINITION_LINK_PREFIX = "#/definitions/"; | ||
export declare function readFile(path: string): Promise<string>; | ||
@@ -23,7 +24,7 @@ /** | ||
/** | ||
* Determines the description of a column header | ||
* @param lineItemRecord - the given record of the line item annotation | ||
* Determines the description of a data field, e.g. for the column header | ||
* @param dataField - the given record of the line item annotation | ||
* @param entityType - the entity type as part of the AVT ConverterOutput | ||
*/ | ||
export declare function getColumnDescription(lineItemRecord: DataFieldAbstractTypes, entityType: EntityType): string; | ||
export declare function getDatafieldDescription(dataField: DataFieldAbstractTypes, entityType: EntityType): string; | ||
/** | ||
@@ -109,1 +110,10 @@ * Return the page type for a given V2 page in manifest | ||
export declare function addDefinitionForRelatedFacetKeys(schema: object, sectionDefinitions: string[], facetSections: FacetSection[], idProperties: Array<keyof Omit<FacetSection, 'custom'>>): void; | ||
/** | ||
* Custom array merge function called by deepmerge's merge function | ||
* | ||
* @param {*} target Target array | ||
* @param {*} source Source array | ||
* @param {*} options options object provided by deepmerge's merge function | ||
* @returns | ||
*/ | ||
export declare const arrayCombineMerge: (target: any, source: any, options: any) => any; |
@@ -21,2 +21,3 @@ "use strict"; | ||
const extensionLogger_1 = require("../../extensionLogger"); | ||
const deepmerge_1 = __importDefault(require("deepmerge")); | ||
var TemplateType; | ||
@@ -29,2 +30,3 @@ (function (TemplateType) { | ||
})(TemplateType = exports.TemplateType || (exports.TemplateType = {})); | ||
exports.DEFINITION_LINK_PREFIX = '#/definitions/'; | ||
async function readFile(path) { | ||
@@ -107,55 +109,50 @@ return new Promise((resolve, reject) => { | ||
/** | ||
* Determines the description of a column header | ||
* @param lineItemRecord - the given record of the line item annotation | ||
* Determines the description of a data field, e.g. for the column header | ||
* @param dataField - the given record of the line item annotation | ||
* @param entityType - the entity type as part of the AVT ConverterOutput | ||
*/ | ||
function getColumnDescription(lineItemRecord, entityType) { | ||
function getDatafieldDescription(dataField, entityType) { | ||
let title = '', propertyCommonLabel; | ||
switch (lineItemRecord.$Type) { | ||
switch (dataField.$Type) { | ||
case "com.sap.vocabularies.UI.v1.DataField" /* DataField */: | ||
propertyCommonLabel = getCommonLabel(lineItemRecord, entityType); | ||
propertyCommonLabel = getCommonLabel(dataField, entityType); | ||
title = | ||
lineItemRecord.Label || | ||
dataField.Label || | ||
propertyCommonLabel || | ||
(lineItemRecord.Value.$target | ||
? lineItemRecord.Value.$target.name | ||
: lineItemRecord.Value.value || lineItemRecord.Value.path); | ||
(dataField.Value.$target | ||
? dataField.Value.$target.name | ||
: dataField.Value.value || dataField.Value.path); | ||
break; | ||
case "com.sap.vocabularies.UI.v1.DataFieldWithUrl" /* DataFieldWithUrl */: | ||
propertyCommonLabel = getCommonLabel(lineItemRecord, entityType); | ||
propertyCommonLabel = getCommonLabel(dataField, entityType); | ||
title = | ||
lineItemRecord.Label || | ||
dataField.Label || | ||
propertyCommonLabel || | ||
(typeof lineItemRecord.Value === 'string' ? lineItemRecord.Value : lineItemRecord.Value.path); | ||
(typeof dataField.Value === 'string' ? dataField.Value : dataField.Value.path); | ||
break; | ||
case "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* DataFieldForAnnotation */: | ||
propertyCommonLabel = getCommonLabel(lineItemRecord, entityType); | ||
title = | ||
lineItemRecord.Label || | ||
propertyCommonLabel || | ||
lineItemRecord.Target.$target.Title || | ||
lineItemRecord.Target.value; | ||
propertyCommonLabel = getCommonLabel(dataField, entityType); | ||
title = dataField.Label || propertyCommonLabel || dataField.Target.$target.Title || dataField.Target.value; | ||
break; | ||
case "com.sap.vocabularies.UI.v1.DataFieldForAction" /* DataFieldForAction */: | ||
case "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* DataFieldForIntentBasedNavigation */: | ||
if (lineItemRecord.Label) { | ||
title = | ||
typeof lineItemRecord.Label === 'string' ? lineItemRecord.Label : lineItemRecord.Action; | ||
if (dataField.Label) { | ||
title = typeof dataField.Label === 'string' ? dataField.Label : dataField.Action; | ||
} | ||
else { | ||
title = lineItemRecord.Action; | ||
title = dataField.Action; | ||
} | ||
break; | ||
case "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* DataFieldWithIntentBasedNavigation */: | ||
propertyCommonLabel = getCommonLabel(lineItemRecord, entityType); | ||
title = propertyCommonLabel || lineItemRecord.Value.path; | ||
propertyCommonLabel = getCommonLabel(dataField, entityType); | ||
title = propertyCommonLabel || dataField.Value.path; | ||
break; | ||
case "com.sap.vocabularies.UI.v1.DataFieldWithNavigationPath" /* DataFieldWithNavigationPath */: | ||
propertyCommonLabel = getCommonLabel(lineItemRecord, entityType); | ||
propertyCommonLabel = getCommonLabel(dataField, entityType); | ||
title = | ||
lineItemRecord.Label || | ||
dataField.Label || | ||
propertyCommonLabel || | ||
(lineItemRecord.Value.$target | ||
? lineItemRecord.Value.$target.name | ||
: lineItemRecord.Value.value || lineItemRecord.Value.path); | ||
(dataField.Value.$target | ||
? dataField.Value.$target.name | ||
: dataField.Value.value || dataField.Value.path); | ||
break; | ||
@@ -167,3 +164,3 @@ default: | ||
} | ||
exports.getColumnDescription = getColumnDescription; | ||
exports.getDatafieldDescription = getDatafieldDescription; | ||
/** | ||
@@ -483,3 +480,4 @@ * Return the page type for a given V2 page in manifest | ||
properties: {}, | ||
additionalProperties: false | ||
additionalProperties: false, | ||
isViewNode: true | ||
}; | ||
@@ -670,3 +668,3 @@ if (facet && facet.ID) { | ||
{ | ||
$ref: '#/definitions/RelatedFacetKeys' | ||
$ref: exports.DEFINITION_LINK_PREFIX + 'RelatedFacetKeys' | ||
}, | ||
@@ -680,2 +678,25 @@ property | ||
exports.addDefinitionForRelatedFacetKeys = addDefinitionForRelatedFacetKeys; | ||
/** | ||
* Custom array merge function called by deepmerge's merge function | ||
* | ||
* @param {*} target Target array | ||
* @param {*} source Source array | ||
* @param {*} options options object provided by deepmerge's merge function | ||
* @returns | ||
*/ | ||
exports.arrayCombineMerge = (target, source, options) => { | ||
const destination = target.slice(); | ||
source.forEach((item, index) => { | ||
if (typeof destination[index] === 'undefined') { | ||
destination[index] = options.cloneUnlessOtherwiseSpecified(item, options); | ||
} | ||
else if (options.isMergeableObject(item)) { | ||
destination[index] = deepmerge_1.default(target[index], item, options); | ||
} | ||
else if (target.indexOf(item) === -1) { | ||
destination.push(item); | ||
} | ||
}); | ||
return destination; | ||
}; | ||
//# sourceMappingURL=utils.js.map |
@@ -7,2 +7,3 @@ import { AppSettings as CommonSettingsV2, Pages } from '../../specification/v2'; | ||
export declare const getCardSettingsPath: (cardKey: string[]) => string; | ||
export declare const getGlobalSettingsPath: (cardKey: string[]) => string; | ||
export declare const getAppSettingOBJPathV2: (pageKeys: string[]) => string; | ||
@@ -9,0 +10,0 @@ export declare const getKPISettingsPath: (pageKeys: string[], manifest: Manifest, kpiKey: string) => string; |
@@ -34,2 +34,10 @@ "use strict"; | ||
}; | ||
exports.getGlobalSettingsPath = (cardKey) => { | ||
const pathParts = ['sap.ovp']; | ||
cardKey.forEach((block) => { | ||
pathParts.push(block); | ||
}); | ||
pathParts.pop(); | ||
return pathParts.join('/'); | ||
}; | ||
exports.getAppSettingOBJPathV2 = (pageKeys) => { | ||
@@ -36,0 +44,0 @@ const pathParts = ['sap.ui.generic.app']; |
@@ -1,2 +0,2 @@ | ||
import { CustomCard as CustomCardConfig, ListCard as ListCardConfig, AnalyticalCard as AnalyticalCardConfig, StackCard as StackCardConfig, LinklistCard as LinklistCardConfig, TableCard as TableCardConfig, AnalyticalCardSettings, TableCardSettings, LinkListCardSettings, ListCardSettings, StackCardSettings, TabSetting, CustomCardSettings, CommonCardSettings as CommonCardConfig, DefaultSpanDef, StaticContent, CardTemplateType } from '../../../../specification/v2/controls/Card'; | ||
import { CustomCard as CustomCardConfig, ListCard as ListCardConfig, AnalyticalCard as AnalyticalCardConfig, StackCard as StackCardConfig, LinklistCard as LinklistCardConfig, TableCard as TableCardConfig, AnalyticalCardSettings, TableCardSettings, LinkListCardSettings, ListCardSettings, StackCardSettings, TabSetting, CustomCardSettings, CommonCardSettings as CommonCardConfig, DefaultSpanDef, StaticContent, CardTemplateType, PlotAreaDef } from '../../../../specification/v2/controls/Card'; | ||
export declare class CommonCardSettings implements CommonCardConfig { | ||
@@ -9,7 +9,46 @@ entitySet?: string; | ||
presentationAnnotationPath?: string; | ||
defaultSpan?: DefaultSpanDef; | ||
} | ||
export declare class CustomCard extends CommonCardSettings implements CustomCardConfig { | ||
export declare class CustomCard extends CommonCardSettings implements CustomCardConfig, CustomCardSettings { | ||
model: string; | ||
template: CardTemplateType; | ||
settings?: CustomCardSettings; | ||
entitySet?: string; | ||
itemText?: string; | ||
valueSelectionInfo?: string; | ||
staticContent?: { | ||
[k: string]: any; | ||
}[]; | ||
listFlavor?: 'standard' | 'bar' | 'carousel'; | ||
listType?: 'extended' | 'condensed'; | ||
sortBy?: string; | ||
sortOrder?: 'ascending' | 'descending'; | ||
annotationPath?: string; | ||
chartAnnotationPath?: string; | ||
dataPointAnnotationPath?: string; | ||
kpiAnnotationPath?: string; | ||
selectionPresentationAnnotationPath?: string; | ||
dynamicSubtitleAnnotationPath?: string; | ||
ignoreSapText?: boolean; | ||
objectStreamCardsSettings?: { | ||
showFirstActionInFooter?: boolean; | ||
annotationPath?: string; | ||
}; | ||
enableLocaleCurrencyFormatting?: boolean; | ||
navigation?: 'dataPointNav' | 'chartNav' | 'headerNav' | 'noHeaderNav'; | ||
showFilterInHeader?: boolean; | ||
showSortingInHeader?: boolean; | ||
imageSupported?: boolean; | ||
showLineItemDetail?: boolean; | ||
showLabelText?: boolean; | ||
customParams?: string; | ||
chartProperties?: { | ||
plotArea?: PlotAreaDef; | ||
}; | ||
colorPalette?: { | ||
[k: string]: any; | ||
}[] | { | ||
[k: string]: any; | ||
}; | ||
[k: string]: any; | ||
} | ||
@@ -25,2 +64,3 @@ export declare class ListCard extends CommonCardSettings implements ListCardConfig { | ||
annotationPath?: string; | ||
valueSelectionInfo?: string; | ||
sortBy?: string; | ||
@@ -37,2 +77,3 @@ sortOrder?: string; | ||
dataPointAnnotationPath?: string; | ||
valueSelectionInfo?: string; | ||
tabs?: [TabSetting]; | ||
@@ -78,3 +119,4 @@ } | ||
selectionPresentationAnnotationPath?: string; | ||
valueSelectionInfo?: string; | ||
tabs?: [TabSetting]; | ||
} |
@@ -55,2 +55,9 @@ "use strict"; | ||
], CommonCardSettings.prototype, "presentationAnnotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CommonCardSettings.prototype, "defaultSpan", void 0); | ||
exports.CommonCardSettings = CommonCardSettings; | ||
@@ -80,2 +87,184 @@ class CustomCard extends CommonCardSettings { | ||
], CustomCard.prototype, "settings", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "entitySet", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "itemText", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "valueSelectionInfo", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "staticContent", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "listFlavor", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "listType", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "sortBy", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "sortOrder", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "annotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "chartAnnotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "dataPointAnnotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "kpiAnnotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "selectionPresentationAnnotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "dynamicSubtitleAnnotationPath", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "ignoreSapText", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "objectStreamCardsSettings", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "enableLocaleCurrencyFormatting", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "navigation", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "showFilterInHeader", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "showSortingInHeader", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "imageSupported", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "showLineItemDetail", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "showLabelText", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "customParams", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "chartProperties", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], CustomCard.prototype, "colorPalette", void 0); | ||
exports.CustomCard = CustomCard; | ||
@@ -146,2 +335,9 @@ class ListCard extends CommonCardSettings { | ||
}) | ||
], ListCard.prototype, "valueSelectionInfo", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], ListCard.prototype, "sortBy", void 0); | ||
@@ -213,2 +409,9 @@ __decorate([ | ||
}) | ||
], AnalyticalCard.prototype, "valueSelectionInfo", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], AnalyticalCard.prototype, "tabs", void 0); | ||
@@ -461,4 +664,11 @@ exports.AnalyticalCard = AnalyticalCard; | ||
}) | ||
], TableCard.prototype, "valueSelectionInfo", void 0); | ||
__decorate([ | ||
decorators_1.syncRule({ | ||
manifest: { | ||
path: (cardKeys) => application_1.getCardSettingsPath(cardKeys) | ||
} | ||
}) | ||
], TableCard.prototype, "tabs", void 0); | ||
exports.TableCard = TableCard; | ||
//# sourceMappingURL=Card.js.map |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const pages_1 = require("./pages"); | ||
const decorators_1 = require("../../common/decoration/decorators"); | ||
const ajv_1 = __importDefault(require("ajv")); | ||
const lodash_unset_1 = __importDefault(require("lodash.unset")); | ||
const deepmerge_1 = __importDefault(require("deepmerge")); | ||
const controls_1 = require("./controls"); | ||
const AnalyticalListPageChart_1 = require("../../../sync/v2/export/controls/AnalyticalListPageChart"); | ||
const AnalyticalListPageKPI_1 = require("../../../sync/v2/export/controls/AnalyticalListPageKPI"); | ||
const utils_1 = require("../../common/utils"); | ||
const utils_2 = require("../../common/utils"); | ||
const v2_1 = require("../../../v2"); | ||
const application_1 = require("../application"); | ||
const manifest_1 = require("./manifest"); | ||
const utils_1 = require("../import/utils"); | ||
const utils_3 = require("../import/utils"); | ||
const Card_1 = require("../../../specification/v2/controls/Card"); | ||
@@ -79,2 +87,36 @@ const common_1 = require("../../common"); | ||
/** | ||
* Assign sync rules to {currentObject} | ||
* | ||
* @param {string} cardSettingsType - type of card | ||
* @param {object} currentObject - the given part of the configuration | ||
*/ | ||
function assignReflectMetadataRules(cardType, currentObject) { | ||
switch (cardType) { | ||
case Card_1.CardTemplateType.list: | ||
case v2_1.CardSettingsType.listCardSettings: | ||
currentObject = Object.assign(new controls_1.ListCard(), currentObject); | ||
break; | ||
case Card_1.CardTemplateType.stack: | ||
case v2_1.CardSettingsType.stackCardSettings: | ||
currentObject = Object.assign(new controls_1.StackCard(), currentObject); | ||
break; | ||
case Card_1.CardTemplateType.linklist: | ||
case v2_1.CardSettingsType.linkListCardSettings: | ||
currentObject = Object.assign(new controls_1.LinklistCard(), currentObject); | ||
break; | ||
case Card_1.CardTemplateType.table: | ||
case v2_1.CardSettingsType.tableCardSettings: | ||
currentObject = Object.assign(new controls_1.TableCard(), currentObject); | ||
break; | ||
case Card_1.CardTemplateType.analytical: | ||
case v2_1.CardSettingsType.analyticalCardSettings: | ||
currentObject = Object.assign(new controls_1.AnalyticalCard(), currentObject); | ||
break; | ||
default: | ||
currentObject = Object.assign(new controls_1.CustomCard(), currentObject); | ||
break; | ||
} | ||
return currentObject; | ||
} | ||
/** | ||
* Recursive function that transfers the content of a list of properties of a configuration to the overall exportResults | ||
@@ -90,5 +132,40 @@ * @param configObject - the given part of the configuration | ||
let currentObject; | ||
let isAnyOfObject = false; | ||
let isObjectProperty = false; | ||
const exceptionList = ['colorPalette', 'tabs']; | ||
for (const key in propertyList) { | ||
currentObject = configObject[key]; | ||
const syncRule = decorators_1.getReflectMetadata(configObject, key); | ||
let syncRule = decorators_1.getReflectMetadata(configObject, key); | ||
if (pathHierarchy[pathHierarchy.length - 1] === 'anyOfObject') { | ||
isAnyOfObject = true; | ||
pathHierarchy.pop(); | ||
} | ||
if (isAnyOfObject) { | ||
currentObject = configObject[pathHierarchy[pathHierarchy.length - 1]][key]; | ||
syncRule = decorators_1.getReflectMetadata(configObject, pathHierarchy[pathHierarchy.length - 1]); | ||
} | ||
if (pathHierarchy[pathHierarchy.length - 1] === 'objectProperties') { | ||
isObjectProperty = true; | ||
pathHierarchy.pop(); | ||
} | ||
if (isObjectProperty) { | ||
currentObject = configObject[pathHierarchy[pathHierarchy.length - 1]][key]; | ||
syncRule = decorators_1.getReflectMetadata(configObject, pathHierarchy[pathHierarchy.length - 1]); | ||
} | ||
if (pathHierarchy[pathHierarchy.length - 1] === 'anyOf') { | ||
pathHierarchy.pop(); | ||
for (const key in propertyList['anyOf']) { | ||
if (propertyList['anyOf'][key].$ref) { | ||
const definitionArray = propertyList['anyOf'][key].$ref.split('#/definitions/'); | ||
const nextTargetDefinition = jsonSchema['definitions'][definitionArray[definitionArray.length - 1]]; | ||
const cardSettingsType = pathHierarchy[1]; | ||
currentObject = configObject[cardSettingsType]; | ||
currentObject = assignReflectMetadataRules(cardSettingsType, currentObject); | ||
transferManifestEntriesOVP(currentObject, manifest, exportResults, jsonSchema, nextTargetDefinition, [...pathHierarchy]); | ||
} | ||
else if (typeof propertyList['anyOf'][key] === 'object') { | ||
processProperties(configObject, manifest, exportResults, jsonSchema, propertyList['anyOf'][key].properties, [...pathHierarchy, 'anyOfObject']); | ||
} | ||
} | ||
} | ||
if (syncRule) { | ||
@@ -99,12 +176,26 @@ if (syncRule.manifest) { | ||
if (key in v2_1.CardSettingsType) { | ||
manifestSection['settings'] = currentObject ? currentObject : {}; | ||
manifestSection['settings'] = deepmerge_1.default(manifestSection['settings'] || {}, currentObject || {}, { | ||
arrayMerge: utils_1.arrayCombineMerge | ||
}); | ||
} | ||
else { | ||
if (currentObject !== undefined) { | ||
manifestSection[key] = currentObject; | ||
else if (currentObject !== undefined) { | ||
const exportHandler = syncRule.manifest.export; | ||
if (exportHandler !== false) { | ||
if (exportHandler && typeof exportHandler === 'function') { | ||
exportHandler(manifestSection, configObject, key); | ||
} | ||
else if (typeof currentObject === 'object' && !exceptionList.includes(key)) { | ||
// colorPalette is an exception as it can contain anything as per our schema, so just replace the object | ||
manifestSection[key] = deepmerge_1.default(manifestSection[key] || {}, currentObject || {}, { | ||
arrayMerge: utils_1.arrayCombineMerge | ||
}); | ||
} | ||
else { | ||
manifestSection[key] = currentObject; | ||
} | ||
} | ||
else if (manifestSection[key]) { | ||
delete manifestSection[key]; | ||
} | ||
} | ||
else if (manifestSection[key] !== undefined) { | ||
delete manifestSection[key]; | ||
} | ||
} | ||
@@ -117,22 +208,3 @@ } | ||
const cardType = currentObject[newKey].template; | ||
switch (cardType) { | ||
case Card_1.CardTemplateType.list: | ||
currentObject[newKey] = Object.assign(new controls_1.ListCard(), currentObject[newKey]); | ||
break; | ||
case Card_1.CardTemplateType.stack: | ||
currentObject[newKey] = Object.assign(new controls_1.StackCard(), currentObject[newKey]); | ||
break; | ||
case Card_1.CardTemplateType.linklist: | ||
currentObject[newKey] = Object.assign(new controls_1.LinklistCard(), currentObject[newKey]); | ||
break; | ||
case Card_1.CardTemplateType.table: | ||
currentObject[newKey] = Object.assign(new controls_1.TableCard(), currentObject[newKey]); | ||
break; | ||
case Card_1.CardTemplateType.analytical: | ||
currentObject[newKey] = Object.assign(new controls_1.AnalyticalCard(), currentObject[newKey]); | ||
break; | ||
default: | ||
currentObject[newKey] = Object.assign(new controls_1.CustomCard(), currentObject[newKey]); | ||
break; | ||
} | ||
currentObject[newKey] = assignReflectMetadataRules(cardType, currentObject[newKey]); | ||
createCard(newKey, exportResults['manifest']['sap.ovp']); | ||
@@ -147,4 +219,3 @@ let targetDefinition; | ||
jsonSchema['definitions'][definition].properties.template.enum && | ||
jsonSchema['definitions'][definition].properties.template.enum[0] === | ||
currentObject[newKey].template); | ||
jsonSchema['definitions'][definition].properties.template.enum.indexOf(currentObject[newKey].template) > -1); | ||
} | ||
@@ -161,25 +232,6 @@ transferManifestEntriesOVP(currentObject[newKey], manifest, exportResults, jsonSchema, jsonSchema['definitions'][targetDefinition[0]], [newKey]); | ||
else if (propertyList[key].$ref) { | ||
const definitionArray = propertyList[key].$ref.split('#/definitions/'); | ||
const definitionArray = propertyList[key].$ref.split(utils_2.DEFINITION_LINK_PREFIX); | ||
const nextTargetDefinition = jsonSchema['definitions'][definitionArray[definitionArray.length - 1]]; | ||
const cardSettingsType = key; | ||
switch (cardSettingsType) { | ||
case v2_1.CardSettingsType.listCardSettings: | ||
currentObject = Object.assign(new controls_1.ListCard(), currentObject); | ||
break; | ||
case v2_1.CardSettingsType.stackCardSettings: | ||
currentObject = Object.assign(new controls_1.StackCard(), currentObject); | ||
break; | ||
case v2_1.CardSettingsType.linkListCardSettings: | ||
currentObject = Object.assign(new controls_1.LinklistCard(), currentObject); | ||
break; | ||
case v2_1.CardSettingsType.tableCardSettings: | ||
currentObject = Object.assign(new controls_1.TableCard(), currentObject); | ||
break; | ||
case v2_1.CardSettingsType.analyticalCardSettings: | ||
currentObject = Object.assign(new controls_1.AnalyticalCard(), currentObject); | ||
break; | ||
default: | ||
currentObject = Object.assign(new controls_1.CustomCard(), currentObject); | ||
break; | ||
} | ||
currentObject = assignReflectMetadataRules(cardSettingsType, currentObject); | ||
transferManifestEntriesOVP(currentObject, manifest, exportResults, jsonSchema, nextTargetDefinition, [ | ||
@@ -191,4 +243,15 @@ ...pathHierarchy, | ||
else if (propertyList[key].anyOf) { | ||
processProperties(configObject, manifest, exportResults, jsonSchema, propertyList[key].anyOf, pathHierarchy); | ||
processProperties(configObject, manifest, exportResults, jsonSchema, propertyList[key], [ | ||
...pathHierarchy, | ||
key, | ||
'anyOf' | ||
]); | ||
} | ||
else if (propertyList[key]['properties'] !== undefined) { | ||
processProperties(configObject, manifest, exportResults, jsonSchema, propertyList[key].properties, [ | ||
...pathHierarchy, | ||
key, | ||
'objectProperties' | ||
]); | ||
} | ||
} | ||
@@ -545,3 +608,3 @@ } | ||
const definition = targetDefinition['anyOf'].find((element) => element.$ref.includes(configSections[index].constructor.name)); | ||
const definitionArray = definition.$ref.split('#/definitions/'); | ||
const definitionArray = definition.$ref.split(utils_2.DEFINITION_LINK_PREFIX); | ||
const nextTargetDefinition = jsonSchema['definitions'][definitionArray[definitionArray.length - 1]]; | ||
@@ -553,3 +616,3 @@ transferManifestEntriesAndFlexChange(fullManifest, configSections[index], parentIds, manifest, [...breadcrumbs, sectionIds[index]], exportResults, appId, baseId, pageKeys, jsonSchema, nextTargetDefinition, ui5Version); | ||
for (const key in manifestSections) { | ||
if (utils_1.isAssociatedCustomSection(key, entity) && !sectionIds.includes(key)) { | ||
if (utils_3.isAssociatedCustomSection(key, entity) && !sectionIds.includes(key)) { | ||
delete manifestSections[key]; | ||
@@ -612,3 +675,3 @@ } | ||
if (propertyDefinition.$ref) { | ||
definitionArray = propertyDefinition.$ref.split('#/definitions/'); | ||
definitionArray = propertyDefinition.$ref.split(utils_2.DEFINITION_LINK_PREFIX); | ||
} | ||
@@ -618,7 +681,7 @@ else if (propertyDefinition['anyOf']) { | ||
if (element.$ref.includes(currentConfigObject.constructor.name)) { | ||
definitionArray.push(...element.$ref.split('#/definitions/')); | ||
definitionArray.push(...element.$ref.split(utils_2.DEFINITION_LINK_PREFIX)); | ||
} | ||
}); | ||
if (definitionArray.length === 0) { | ||
definitionArray = propertyDefinition['anyOf'][0].$ref.split('#/definitions/'); | ||
definitionArray = propertyDefinition['anyOf'][0].$ref.split(utils_2.DEFINITION_LINK_PREFIX); | ||
} | ||
@@ -635,3 +698,3 @@ } | ||
let objectPageSectionData; | ||
const target = utils_1.getTargetFromCustomColumnRef(propertyDefinition.$ref); | ||
const target = utils_3.getTargetFromCustomColumnRef(propertyDefinition.$ref); | ||
if (target) { | ||
@@ -651,3 +714,4 @@ objectPageSectionData = { | ||
} | ||
else if (propertyDefinition && propertyDefinition.$ref === '#/definitions/TableCustomColumns') { | ||
else if (propertyDefinition && | ||
propertyDefinition.$ref === utils_2.DEFINITION_LINK_PREFIX + 'TableCustomColumns') { | ||
//empty config ==> delete all given extensions | ||
@@ -730,3 +794,3 @@ transferColumnExtensions([], exportResults, appId, jsonSchema['definitions']['TableCustomColumn'], logger, manifest); | ||
const pageKeys = []; | ||
const v2Page = utils_1.findListReportPage(manifest['sap.ui.generic.app'].pages, pageKeys); | ||
const v2Page = utils_3.findListReportPage(manifest['sap.ui.generic.app'].pages, pageKeys); | ||
if (!v2Page.component.settings) { | ||
@@ -775,3 +839,3 @@ v2Page.component.settings = {}; | ||
analyticalListPage.chart = Object.assign(new AnalyticalListPageChart_1.ChartSettings(), analyticalListPage.chart); | ||
const v2Page = utils_1.findAnalyticalListPage(manifest['sap.ui.generic.app'].pages, pageKeys); | ||
const v2Page = utils_3.findAnalyticalListPage(manifest['sap.ui.generic.app'].pages, pageKeys); | ||
v2Page.component.settings = {}; | ||
@@ -821,3 +885,3 @@ exportResults.manifest = JSON.parse(JSON.stringify(manifest)); | ||
const pageKeys = []; | ||
const v2Page = utils_1.findObjectPage(manifest['sap.ui.generic.app'].pages, entitySet, pageKeys); | ||
const v2Page = utils_3.findObjectPage(manifest['sap.ui.generic.app'].pages, entitySet, pageKeys); | ||
if (!v2Page) { | ||
@@ -853,2 +917,14 @@ return exportResults; | ||
const overviewPage = Object.assign(new pages_1.OverviewPage(), overviewPageConfig); | ||
const ajv = new ajv_1.default({ allErrors: true }); | ||
const validate = ajv.compile(jsonSchema); | ||
if (!validate(overviewPage)) { | ||
for (const err of validate.errors) { | ||
const additionalProperty = err.params['additionalProperty']; | ||
if (err.keyword === 'additionalProperties' && | ||
!Object.values(v2_1.CardSettingsType).includes(err.params['additionalProperty']) && | ||
additionalProperty !== 'settings') { | ||
lodash_unset_1.default(overviewPage, `${err.dataPath.slice(1)}.${additionalProperty}`); | ||
} | ||
} | ||
} | ||
overviewPage.cards = Object.assign(new controls_1.CustomCard(), overviewPage.cards); | ||
@@ -855,0 +931,0 @@ exportResults.manifest = JSON.parse(JSON.stringify(manifest)); |
@@ -86,3 +86,3 @@ "use strict"; | ||
manifest: { | ||
path: () => application_1.getOVPsettingPath() | ||
path: (cardKeys) => application_1.getGlobalSettingsPath(cardKeys) | ||
} | ||
@@ -89,0 +89,0 @@ }) |
@@ -5,2 +5,3 @@ "use strict"; | ||
const import_1 = require("../import"); | ||
const common_1 = require("../../common"); | ||
const v2_1 = require("../../../specification/v2"); | ||
@@ -19,6 +20,6 @@ /** | ||
const appSchema = JSON.parse(JSON.stringify(genericSchema)); | ||
appSchema['properties']['table']['$ref'] = '#/definitions/AnalyticalTableALP<LineItems>'; | ||
appSchema['properties']['table']['$ref'] = common_1.DEFINITION_LINK_PREFIX + 'AnalyticalTableALP<LineItems>'; | ||
const analyticalTableDefinition = JSON.parse(JSON.stringify(appSchema['definitions']['AnalyticalTableALP<GenericColumns>'])); | ||
analyticalTableDefinition['properties']['columns'] = { | ||
$ref: '#/definitions/LineItems' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems' | ||
}; | ||
@@ -25,0 +26,0 @@ appSchema['definitions']['AnalyticalTableALP<LineItems>'] = analyticalTableDefinition; |
@@ -5,2 +5,3 @@ "use strict"; | ||
const import_1 = require("../import"); | ||
const common_1 = require("../../common"); | ||
/** | ||
@@ -18,6 +19,6 @@ * Generates an app specific schema for the FE V2 Listreport from the generic schema. | ||
const appSchema = JSON.parse(JSON.stringify(genericSchema)); | ||
appSchema['properties']['table']['anyOf']['0']['$ref'] = '#/definitions/ResponsiveTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['1']['$ref'] = '#/definitions/TreeTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['2']['$ref'] = '#/definitions/AnalyticalTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['3']['$ref'] = '#/definitions/GridTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['0']['$ref'] = common_1.DEFINITION_LINK_PREFIX + 'ResponsiveTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['1']['$ref'] = common_1.DEFINITION_LINK_PREFIX + 'TreeTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['2']['$ref'] = common_1.DEFINITION_LINK_PREFIX + 'AnalyticalTable<LineItems>'; | ||
appSchema['properties']['table']['anyOf']['3']['$ref'] = common_1.DEFINITION_LINK_PREFIX + 'GridTable<LineItems>'; | ||
const responsiveTableDefinition = JSON.parse(JSON.stringify(appSchema['definitions']['ResponsiveTable<GenericColumns>'])); | ||
@@ -28,12 +29,12 @@ const treeTableDefinition = JSON.parse(JSON.stringify(appSchema['definitions']['TreeTable<GenericColumns>'])); | ||
responsiveTableDefinition['properties']['columns'] = { | ||
$ref: '#/definitions/LineItems' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems' | ||
}; | ||
treeTableDefinition['properties']['columns'] = { | ||
$ref: '#/definitions/LineItems' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems' | ||
}; | ||
analyticalTableDefinition['properties']['columns'] = { | ||
$ref: '#/definitions/LineItems' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems' | ||
}; | ||
gridTableDefinition['properties']['columns'] = { | ||
$ref: '#/definitions/LineItems' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'LineItems' | ||
}; | ||
@@ -40,0 +41,0 @@ appSchema['definitions']['ResponsiveTable<LineItems>'] = responsiveTableDefinition; |
@@ -59,12 +59,12 @@ "use strict"; | ||
{ | ||
$ref: '#/definitions/ObjectPageResponsiveTable<' + facetId + '>' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'ObjectPageResponsiveTable<' + facetId + '>' | ||
}, | ||
{ | ||
$ref: '#/definitions/ObjectPageAnalyticalTable<' + facetId + '>' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'ObjectPageAnalyticalTable<' + facetId + '>' | ||
}, | ||
{ | ||
$ref: '#/definitions/ObjectPageGridTable<' + facetId + '>' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'ObjectPageGridTable<' + facetId + '>' | ||
}, | ||
{ | ||
$ref: '#/definitions/ObjectPageTreeTable<' + facetId + '>' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'ObjectPageTreeTable<' + facetId + '>' | ||
} | ||
@@ -92,10 +92,12 @@ ] | ||
appSchema['definitions'][schemaIdForOpResponsibleTable]['properties']['columns']['$ref'] = | ||
'#/definitions/' + facetId; | ||
common_1.DEFINITION_LINK_PREFIX + facetId; | ||
appSchema['definitions'][schemaIdForOpAnalyticalTable] = JSON.parse(JSON.stringify(appSchema['definitions']['ObjectPageAnalyticalTable<GenericColumns>'])); | ||
appSchema['definitions'][schemaIdForOpAnalyticalTable]['properties']['columns']['$ref'] = | ||
'#/definitions/' + facetId; | ||
common_1.DEFINITION_LINK_PREFIX + facetId; | ||
appSchema['definitions'][schemaIdForOpGridTable] = JSON.parse(JSON.stringify(appSchema['definitions']['ObjectPageGridTable<GenericColumns>'])); | ||
appSchema['definitions'][schemaIdForOpGridTable]['properties']['columns']['$ref'] = '#/definitions/' + facetId; | ||
appSchema['definitions'][schemaIdForOpGridTable]['properties']['columns']['$ref'] = | ||
common_1.DEFINITION_LINK_PREFIX + facetId; | ||
appSchema['definitions'][schemaIdForOpTreeTable] = JSON.parse(JSON.stringify(appSchema['definitions']['ObjectPageTreeTable<GenericColumns>'])); | ||
appSchema['definitions'][schemaIdForOpTreeTable]['properties']['columns']['$ref'] = '#/definitions/' + facetId; | ||
appSchema['definitions'][schemaIdForOpTreeTable]['properties']['columns']['$ref'] = | ||
common_1.DEFINITION_LINK_PREFIX + facetId; | ||
let customColumnDefinitionKey; | ||
@@ -131,6 +133,6 @@ if (targetEntity) { | ||
subsections: { | ||
$ref: '#/definitions/' + collectionDefinition | ||
$ref: common_1.DEFINITION_LINK_PREFIX + collectionDefinition | ||
} | ||
}; | ||
appSchema['definitions'][collectionDefinition] = common_1.createSectionWithoutProperties(); | ||
appSchema['definitions'][collectionDefinition] = common_1.createSectionWithoutProperties(facet); | ||
for (const key in facet['facets']) { | ||
@@ -143,3 +145,3 @@ addSection(facet['facets'], key, appSchema['definitions'][collectionDefinition], appSchema, manifest, oDataServiceAVT, fragments); | ||
sections['properties'][facetKey] = { | ||
$ref: '#/definitions/ObjectPageSectionV2<' + facetKey + '>' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'ObjectPageSectionV2<' + facetKey + '>' | ||
}; | ||
@@ -165,3 +167,4 @@ handleLineItem(facetKey, appSchema, facet, facets, oDataServiceAVT, manifest); | ||
properties: {}, | ||
additionalProperties: false | ||
additionalProperties: false, | ||
isViewNode: true | ||
}); | ||
@@ -216,3 +219,3 @@ if (!pages) { | ||
appSchema['definitions']['ObjectPageHeader'].properties['actions'] = { | ||
$ref: '#/definitions/HeaderActions' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'HeaderActions' | ||
}; | ||
@@ -222,3 +225,4 @@ const headerActions = (appSchema['definitions']['HeaderActions'] = { | ||
properties: {}, | ||
additionalProperties: false | ||
additionalProperties: false, | ||
isViewNode: true | ||
}); | ||
@@ -231,3 +235,3 @@ actionAnnotation.forEach((item) => { | ||
headerActions.properties[actionId] = { | ||
$ref: '#/definitions/HeaderAction' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'HeaderAction' | ||
}; | ||
@@ -274,7 +278,7 @@ } | ||
appSchema['properties']['sections'] = { | ||
$ref: '#/definitions/Sections' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'Sections' | ||
}; | ||
// Change reference to header actions | ||
appSchema['properties']['header'] = { | ||
$ref: '#/definitions/ObjectPageHeader' | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'ObjectPageHeader' | ||
}; | ||
@@ -314,3 +318,4 @@ const entitySet = oDataServiceAVT.entitySets && | ||
properties: additionalSections, | ||
additionalProperties: false | ||
additionalProperties: false, | ||
isViewNode: true | ||
}; | ||
@@ -317,0 +322,0 @@ } |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
const common_1 = require("../../../specification/common"); | ||
const common_2 = require("../../common"); | ||
/** | ||
@@ -48,3 +49,3 @@ * Method returns array of card definition names. | ||
delete property.type; | ||
property['$ref'] = '#/definitions/CardModel'; | ||
property['$ref'] = common_2.DEFINITION_LINK_PREFIX + 'CardModel'; | ||
} | ||
@@ -51,0 +52,0 @@ } |
@@ -24,3 +24,4 @@ "use strict"; | ||
properties: {}, | ||
additionalProperties: false | ||
additionalProperties: false, | ||
isViewNode: true | ||
}; | ||
@@ -33,4 +34,4 @@ if (lineItemAnnotation) { | ||
appSchema['definitions'][lineItemId]['properties'][schemaKey] = { | ||
$ref: '#/definitions/TableColumn', | ||
description: common_1.getColumnDescription(lineItemRecord, entityType), | ||
$ref: common_1.DEFINITION_LINK_PREFIX + 'TableColumn', | ||
description: common_1.getDatafieldDescription(lineItemRecord, entityType), | ||
// Custom property in schema - for object properties ordering purpose | ||
@@ -157,3 +158,4 @@ propertyIndex: i | ||
$ref: `#/definitions/${customColumnDefinitionName}` | ||
} | ||
}, | ||
isViewNode: true | ||
}; | ||
@@ -160,0 +162,0 @@ // Leading Property |
@@ -214,3 +214,3 @@ "use strict"; | ||
let schemaSection = sectionProperties[sectionId]; | ||
if (schemaSection['$ref'] && schemaSection['$ref'].startsWith('#/definitions/ObjectPageSectionV2')) { | ||
if (schemaSection['$ref'] && schemaSection['$ref'].startsWith(common_1.DEFINITION_LINK_PREFIX + 'ObjectPageSectionV2')) { | ||
// Section without subsections | ||
@@ -217,0 +217,0 @@ schemaSection = jsonSchema['definitions']['ObjectPageSectionV2<' + escapedId + '>']; |
{ | ||
"name": "@sap/ux-specification", | ||
"version": "1.71.25", | ||
"version": "1.71.26", | ||
"displayName": "SAP Fiori tools - Specification", | ||
@@ -24,3 +24,3 @@ "description": "SAP Fiori tools - Specification", | ||
"copy-templates": "cpy src/sync/v2/export/templates/** dist --parents", | ||
"test": "jest --colors", | ||
"test": "jest --colors && node ../../scripts/scov.js reports/test/unit/coverage/lcov.info", | ||
"update-snapshots": "jest --updateSnapshot", | ||
@@ -68,4 +68,7 @@ "lint": "eslint . --ext .ts", | ||
"@ui5/flexibility-utils": "0.1.3", | ||
"ajv": "6.12.6", | ||
"deepmerge": "4.2.2", | ||
"ejs": "3.1.5", | ||
"i18next": "19.8.4", | ||
"lodash.unset": "4.5.2", | ||
"path": "0.12.7", | ||
@@ -72,0 +75,0 @@ "reflect-metadata": "0.1.13", |
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
Sorry, the diff of this file is not supported yet
2498692
41452
12
+ Addedajv@6.12.6
+ Addeddeepmerge@4.2.2
+ Addedlodash.unset@4.5.2
+ Addedajv@6.12.6(transitive)
+ Addeddeepmerge@4.2.2(transitive)
+ Addedfast-deep-equal@3.1.3(transitive)
+ Addedfast-json-stable-stringify@2.1.0(transitive)
+ Addedjson-schema-traverse@0.4.1(transitive)
+ Addedlodash.unset@4.5.2(transitive)
+ Addedpunycode@2.3.1(transitive)
+ Addeduri-js@4.4.1(transitive)