@sap/ux-specification 1.96.16 → 1.96.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -50,6 +50,22 @@ export declare function addEnumForFilterBarAnnotationPath(entityType: EntityType
50
50
  * Please note that method depends on order and takes first non empty value associated to passed properties.
51
51
  */
52
52
  export declare function addDefinitionForRelatedFacetKeys(appSchema: Definition, sectionDefinitions: string[], facetSections: FacetSection[], idProperties: Array<keyof Omit<FacetSection, 'custom'>>): void;
53
+ /**
54
+ * Receives a facet key and returns the key as used in schema
55
+ * @param facetKey - key of the facet, as used in annotation
56
+ * @returns facetKeyInSchema - key of the facet, as used in schema
57
+ */
58
+ export declare function getFacetKeyInSchema(facetKey: string): string;
59
+ /**
60
+ * Adds an existing schema definition to a new definition in the app schema
61
+ * @param definition name of definition, as used in schema
62
+ * @param facetKey - key of the facet, as used in annotation
63
+ * @param {Definition} appSchema App schema in general
64
+ * @param {boolean} useDefinitionAsKey If set to false, facet key will solely be used as key, else encapsulated within definition key `definition<facetKey>`
65
+ * @param subDefinitionName - sub definition, if different from the definition (e.g. subsection vs. section)
66
+ * @returns {Definition} part of app schema that has been added and filled
67
+ */
68
+ export declare function parseSchemaDefinition(definition: string, facetKey: string, appSchema: Definition, useDefinitionAsKey?: boolean, subDefinitionName?: DefinitionName): Definition;
53
69
  /**
54
70
  * Functions used both by V2 and V4 to add the common definitions for a line item to the app schema
55
71
  * @param appSchema - the app specific schema that shall get enhanced
@@ -104,22 +120,6 @@ export declare function determineDataType(field: object): string | undefined;
104
120
  * @param field - given field definition = annotation property, at AVT
105
121
  */
106
122
  export declare function addDataTypeToDefinition(definition: object, field: object): void;
107
- /**
108
- * Receives a facet key and returns the key as used in schema
109
- * @param facetKey - key of the facet, as used in annotation
110
- * @returns facetKeyInSchema - key of the facet, as used in schema
111
- */
112
- export declare function getFacetKeyInSchema(facetKey: string): string;
113
- /**
114
- * Adds an existing schema definition to a new definition in the app schema
115
- * @param definition name of definition, as used in schema
116
- * @param facetKey - key of the facet, as used in annotation
117
- * @param {Definition} appSchema App schema in general
118
- * @param {boolean} useDefinitionAsKey If set to false, facet key will solely be used as key, else encapsulated within definition key `definition<facetKey>`
119
- * @param subDefinitionName - sub definition, if different from the definition (e.g. subsection vs. section)
120
- * @returns {Definition} part of app schema that has been added and filled
121
- */
122
- export declare function parseSchemaDefinition(definition: DefinitionName | SectionTypeV2, facetKey: string, appSchema: Definition, useDefinitionAsKey?: boolean, subDefinitionName?: DefinitionName): Definition;
123
123
  /**
124
124
  * Creates a definition link for a facet and definition name
125
125
  * @param {DefinitionName} definition - name of definition, as used in schema
@@ -111,7 +111,7 @@ export interface FlexAdapter {
111
111
  exportFlexValue?: exportFlexValue;
112
112
  importFlexValue?: importFlexValue;
113
113
  }
114
- export declare type ManifestPath = (pageKeys?: string[], manifest?: Manifest, ...pathParts: string[]) => string;
114
+ export declare type ManifestPath = (pageKeys?: string[], manifest?: Manifest, ...pathParts: any[]) => string;
115
115
  export declare type ExportHandlerFunction = (manifestSection: unknown, configObject: unknown, key: string, manifestKey?: string, ...pathParts: string[]) => unknown;
116
116
  export interface ManifestConverter {
117
117
  path: ManifestPath;
@@ -1,6 +1,7 @@
1
1
  import type { ExportResults } from '../../../v2';
2
2
  import type { MetadataInstanceInterface } from '../../common/decoration/factory';
3
3
  import type { TransferParameterTypeV2 } from '../types';
4
+ import type { Definition } from 'typescript-json-schema';
4
5
  /**
5
6
  * Private recursive function that traverses the content of the current object. It reads decorators and fills manifest entries and flex changes
6
7
  * @param configObject - current object to traverse
@@ -31,4 +32,4 @@ export declare function assignReflectMetadataRules(factory: MetadataInstanceInte
31
32
  */
32
33
  export declare function transferManifestEntriesAndFlexChange(transferParameters: TransferParameterTypeV2, configObject: {
33
34
  [key: string]: any;
34
- }, parentIds: string[], breadcrumbs: string[], schemaDefinition: object, title?: string): void;
35
+ }, parentIds: string[], breadcrumbs: string[], schemaDefinition: Definition, title?: string): void;
@@ -6,3 +6,9 @@ import type { SapUi5V4 } from '../../../specification/v4';
6
6
  * @param {boolean} [add=true] - Add or remove library.
7
7
  */
8
8
  export declare function updateDependencyLib(manifest: SapUi5V4, name: string, add?: boolean): void;
9
+ /**
10
+ * Looks for <...> pattern in the input string; if found, extracts this last part of the string
11
+ * @param longId - schema ID in its long format
12
+ * @returns the converted ID
13
+ */
14
+ export declare function extractLastIdPart(longId: string): string;
@@ -13,7 +13,7 @@ import type { Definition } from 'typescript-json-schema';
13
13
  * @param sectionId - identifier of the current object page section in schema
14
14
  * @param sectionIdInManifest - identifier of the current object page section in manifest
15
15
  */
16
- export declare function addCustomColumnDefinition(appSchema: object, v4Page: SapUiAppPageV4, logger: ExtensionLogger, customColumnDefinitionName?: string, sectionId?: string, sectionIdInManifest?: string): void;
16
+ export declare function addCustomColumnDefinition(appSchema: Definition, v4Page: SapUiAppPageV4, logger: ExtensionLogger, customColumnDefinitionName?: string, sectionId?: string, sectionIdInManifest?: string): void;
17
17
  /**
18
18
  * Processes a LineItem record of type DataFieldForAction during app schema generation
19
19
  * @param appSchema - the app specific schema that shall get enhanced
@@ -44,7 +44,7 @@ export declare function addLineItemsType(appSchema: Definition, lineItemAnnotati
44
44
  * @param positionName - ID of the definition of custom column position in schema
45
45
  * @param sectionIdInManifest - identifier of the current object page section in manifest
46
46
  */
47
- export declare function addFragmentEnumForAnchor(appSchema: Definition, lineItemId: string, v4Page: SapUiAppPageV4, positionName?: DefinitionName, sectionIdInManifest?: string): void;
47
+ export declare function addFragmentEnumForAnchor(appSchema: Definition, lineItemId: string, v4Page: SapUiAppPageV4, positionName?: string, sectionIdInManifest?: string): void;
48
48
  /**
49
49
  * Find the relevant V4 page under the routing targets of manifest,json
50
50
  * @param pages - list of all pages in manifest
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/ux-specification",
3
- "version": "1.96.16",
3
+ "version": "1.96.17",
4
4
  "displayName": "SAP Fiori tools - Specification",
5
5
  "description": "SAP Fiori tools - Specification",
6
6
  "files": [
@@ -14,7 +14,7 @@
14
14
  },
15
15
  "engines": {
16
16
  "node": ">=14.16.0",
17
- "yarn": ">=1.22.18"
17
+ "yarn": ">=1.22.19"
18
18
  },
19
19
  "scripts": {
20
20
  "clean": "rimraf ./dist ./schemas",