@sap/ux-specification 1.96.15 → 1.96.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -8
- package/dist/documentation/runDocu-min.js +1 -1
- package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
- package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
- package/dist/documentation/v2/v2-ListReport.html +1 -1
- package/dist/documentation/v2/v2-ObjectPage.html +1 -1
- package/dist/documentation/v2/v2-OverviewPage.html +1 -1
- package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
- package/dist/documentation/v4/v4-FreestylePage.html +48 -0
- package/dist/documentation/v4/v4-ListReport.html +1 -1
- package/dist/documentation/v4/v4-ObjectPage.html +1 -1
- package/dist/index-min.js +1 -1
- package/dist/schemas/v2/AnalyticalListPageConfig.json +2 -2
- package/dist/schemas/v2/ListReportConfig.json +4 -4
- package/dist/schemas/v2/ObjectPageConfig.json +19 -19
- package/dist/schemas/v4/ApplicationV4.json +4 -0
- package/dist/schemas/v4/FreestylePageConfig.json +10 -0
- package/dist/schemas/v4/ListReportConfig.json +184 -1
- package/dist/schemas/v4/ObjectPageConfig.json +101 -1
- package/dist/specification/v4/index-min.js +1 -1
- package/dist/src/apiTypes.d.ts +16 -4
- package/dist/src/specification/schemaAccess.d.ts +2 -1
- package/dist/src/specification/v4/ApplicationV4.d.ts +4 -0
- package/dist/src/specification/v4/controls/ObjectPageToolBar.d.ts +14 -2
- package/dist/src/specification/v4/controls/ToolBar.d.ts +59 -2
- package/dist/src/specification/v4/pages/FreestylePageConfig.d.ts +2 -0
- package/dist/src/specification/v4/pages/index.d.ts +1 -0
- package/dist/src/specification/v4/webapp/manifest/sapUi5.d.ts +2 -0
- package/dist/src/sync/common/appProvider.d.ts +1 -1
- package/dist/src/sync/common/generate/utils.d.ts +39 -18
- package/dist/src/sync/common/types.d.ts +14 -3
- package/dist/src/sync/common/utils.d.ts +23 -2
- package/dist/src/sync/v2/export/controls/Table.d.ts +1 -2
- package/dist/src/sync/v2/export/export.d.ts +2 -1
- package/dist/src/sync/v2/import/common/index.d.ts +1 -0
- package/dist/src/sync/v2/import/controls/table.d.ts +3 -1
- package/dist/src/sync/v2/types.d.ts +4 -3
- package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +16 -1
- package/dist/src/sync/v4/export/controls/ToolBar.d.ts +2 -2
- package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts +31 -1
- package/dist/src/sync/v4/export/pages/FreestylePage.d.ts +5 -0
- package/dist/src/sync/v4/export/pages/index.d.ts +1 -0
- package/dist/src/sync/v4/export/utils.d.ts +6 -0
- package/dist/src/sync/v4/generate/freestylePage.d.ts +10 -0
- package/dist/src/sync/v4/generate/generate.d.ts +12 -0
- package/dist/src/sync/v4/generate/index.d.ts +2 -1
- package/dist/src/sync/v4/import/app/appProvider.d.ts +4 -17
- package/dist/src/sync/v4/import/app/baseAppProvider.d.ts +45 -0
- package/dist/src/sync/v4/import/app/freestyleProvider.d.ts +7 -0
- package/dist/src/sync/v4/import/app/index.d.ts +3 -0
- package/dist/src/sync/v4/utils/utils.d.ts +20 -3
- package/dist/test/unit/generateAppSchema/generateAppSchemaFFV4.test.d.ts +1 -0
- package/dist/test/unit/generateGenericSchema/generateGenericSchemaFFV4.test.d.ts +1 -0
- package/package.json +6 -6
|
@@ -6,6 +6,10 @@ export interface AppSettings extends CommonAppSettings {
|
|
|
6
6
|
* The flexible column layout allows users to see more details on the page, and to expand and collapse the screen areas. For the overview page, this layout is not relevant.
|
|
7
7
|
*/
|
|
8
8
|
flexibleColumnLayout?: FlexibleColumnLayoutV4;
|
|
9
|
+
/**
|
|
10
|
+
* Prefix that is preceding the view
|
|
11
|
+
*/
|
|
12
|
+
viewPath?: string;
|
|
9
13
|
}
|
|
10
14
|
export interface PagesV4 extends Pages {
|
|
11
15
|
[key: string]: PageV4;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SelectType } from './ToolBar';
|
|
1
|
+
import type { SelectType, CustomAction, CustomActionPosition } from './ToolBar';
|
|
2
2
|
/**
|
|
3
3
|
* Action
|
|
4
4
|
* @isViewNode true
|
|
@@ -9,12 +9,24 @@ export interface ObjectPageToolBarAction {
|
|
|
9
9
|
*/
|
|
10
10
|
enableOnSelect?: SelectType;
|
|
11
11
|
}
|
|
12
|
+
export interface CustomActionPositionOP extends CustomActionPosition {
|
|
13
|
+
/**
|
|
14
|
+
* The key of another action to be used as placement anchor.
|
|
15
|
+
*/
|
|
16
|
+
anchor?: string;
|
|
17
|
+
}
|
|
18
|
+
export interface CustomActionOP extends CustomAction {
|
|
19
|
+
/**
|
|
20
|
+
* Defines the position of the action relative to other actions.
|
|
21
|
+
*/
|
|
22
|
+
position?: CustomActionPositionOP;
|
|
23
|
+
}
|
|
12
24
|
/**
|
|
13
25
|
* Actions
|
|
14
26
|
* @isViewNode true
|
|
15
27
|
*/
|
|
16
28
|
export interface ObjectPageToolBarActions {
|
|
17
|
-
[key: string]: ObjectPageToolBarAction;
|
|
29
|
+
[key: string]: ObjectPageToolBarAction | CustomActionOP;
|
|
18
30
|
}
|
|
19
31
|
/**
|
|
20
32
|
* Toolbar
|
|
@@ -2,6 +2,10 @@ export declare enum SelectType {
|
|
|
2
2
|
single = "single",
|
|
3
3
|
multi = "multi"
|
|
4
4
|
}
|
|
5
|
+
export declare enum ActionPlacement {
|
|
6
|
+
After = "After",
|
|
7
|
+
Before = "Before"
|
|
8
|
+
}
|
|
5
9
|
/**
|
|
6
10
|
* Action
|
|
7
11
|
* @isViewNode true
|
|
@@ -28,14 +32,14 @@ export declare type ChartToolBarAction = {};
|
|
|
28
32
|
* @isViewNode true
|
|
29
33
|
*/
|
|
30
34
|
export interface Actions {
|
|
31
|
-
[key: string]: ToolBarAction;
|
|
35
|
+
[key: string]: ToolBarAction | CustomAction;
|
|
32
36
|
}
|
|
33
37
|
/**
|
|
34
38
|
* Actions
|
|
35
39
|
* @isViewNode true
|
|
36
40
|
*/
|
|
37
41
|
export interface ViewActions {
|
|
38
|
-
[key: string]: ViewToolBarAction | ChartToolBarAction;
|
|
42
|
+
[key: string]: ViewToolBarAction | ChartToolBarAction | ViewTableCustomAction;
|
|
39
43
|
}
|
|
40
44
|
/**
|
|
41
45
|
* Table Toolbar
|
|
@@ -51,3 +55,56 @@ export interface ToolBar {
|
|
|
51
55
|
export interface ViewChartToolBar {
|
|
52
56
|
actions: ViewActions;
|
|
53
57
|
}
|
|
58
|
+
export interface CustomActionPosition {
|
|
59
|
+
/**
|
|
60
|
+
* The key of another action to be used as placement anchor.
|
|
61
|
+
*/
|
|
62
|
+
anchor?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Define the placement, either before or after the anchor action.
|
|
65
|
+
*/
|
|
66
|
+
placement: ActionPlacement;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Action
|
|
70
|
+
* @isViewNode true
|
|
71
|
+
*/
|
|
72
|
+
export interface CustomAction {
|
|
73
|
+
/**
|
|
74
|
+
* The text that is displayed on the button (typically a binding to an i18n entry).
|
|
75
|
+
* @i18nClassification COL: Custom action text
|
|
76
|
+
*/
|
|
77
|
+
text: string;
|
|
78
|
+
/**
|
|
79
|
+
* Defines the position of the action relative to other actions.
|
|
80
|
+
*/
|
|
81
|
+
position?: CustomActionPosition;
|
|
82
|
+
/**
|
|
83
|
+
* Relevant for extension actions; allows the definition of a target action handler.
|
|
84
|
+
*/
|
|
85
|
+
press: string;
|
|
86
|
+
/**
|
|
87
|
+
* Indicates whether the action requires a selection of items.
|
|
88
|
+
*/
|
|
89
|
+
requiresSelection?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Whether the action button should be visible on the screen.
|
|
92
|
+
*/
|
|
93
|
+
visible?: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* Whether the action button should be enabled. Default value is `true`.
|
|
96
|
+
*/
|
|
97
|
+
enabled?: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface ViewCustomActionPosition extends CustomActionPosition {
|
|
100
|
+
/**
|
|
101
|
+
* The key of another action to be used as placement anchor.
|
|
102
|
+
*/
|
|
103
|
+
anchor?: string;
|
|
104
|
+
}
|
|
105
|
+
export interface ViewTableCustomAction extends CustomAction {
|
|
106
|
+
/**
|
|
107
|
+
* Defines the position of the action relative to other actions.
|
|
108
|
+
*/
|
|
109
|
+
position?: ViewCustomActionPosition;
|
|
110
|
+
}
|
|
@@ -61,6 +61,7 @@ export interface SapUi5RoutingTargetSettingsV4 {
|
|
|
61
61
|
[key: string]: SapUi5RoutingTargetNavigationV4;
|
|
62
62
|
};
|
|
63
63
|
variantManagement?: string;
|
|
64
|
+
viewPath?: string;
|
|
64
65
|
views?: {
|
|
65
66
|
paths: Array<SapUi5ViewPath>;
|
|
66
67
|
showCounts?: boolean;
|
|
@@ -80,6 +81,7 @@ export declare type RouterClass = typeof FIORI_FCL_ROUTER_CLASS | string;
|
|
|
80
81
|
export interface SapUi5RoutingConfig {
|
|
81
82
|
routerClass?: RouterClass;
|
|
82
83
|
flexibleColumnLayout?: FlexibleColumnLayoutV4;
|
|
84
|
+
viewPath?: string;
|
|
83
85
|
}
|
|
84
86
|
export declare enum FlexibleColumnLayoutAggregations {
|
|
85
87
|
BeginColumnPages = "beginColumnPages",
|
|
@@ -10,7 +10,7 @@ export interface Controllers {
|
|
|
10
10
|
export declare abstract class AppProvider {
|
|
11
11
|
readonly app: Application;
|
|
12
12
|
readonly logger: ExtensionLogger;
|
|
13
|
-
|
|
13
|
+
readonly schemas: Files;
|
|
14
14
|
unhandledControllers: Array<string>;
|
|
15
15
|
protected constructor(manifest: ManifestV2 | ManifestV4, schemas: Files, home: string, pages: PagesBase, version: FioriElementsVersion, settings?: AppSettingsV2 | AppSettingsV4, logger?: ExtensionLogger);
|
|
16
16
|
/**
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import type { AnnotationTerm, ConvertedMetadata, EntitySet, EntityType } from '@sap-ux/vocabularies-types';
|
|
2
2
|
import type { LineItem } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
3
|
-
import type { Definition } from 'typescript-json-schema';
|
|
3
|
+
import type { Definition, DefinitionOrBoolean } from 'typescript-json-schema';
|
|
4
4
|
import type { FacetConfig, FacetSection, SectionType } from '..';
|
|
5
5
|
import type { SectionTypeV2 } from '../../v2/types';
|
|
6
6
|
import type { PresentationVariantV4 } from '../../v4/types';
|
|
7
7
|
import { UIAnnotationTerms } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
8
8
|
import { DefinitionName } from '..';
|
|
9
|
+
interface PropertyInDefinition {
|
|
10
|
+
definition: string;
|
|
11
|
+
property?: string;
|
|
12
|
+
}
|
|
9
13
|
/**
|
|
10
14
|
* Adds an enum filled with existing UI annotations of the given list (validAnnotations)
|
|
11
15
|
* @param {EntityType} entityType
|
|
@@ -50,6 +54,30 @@ export declare function addEnumForFilterBarAnnotationPath(entityType: EntityType
|
|
|
50
54
|
* Please note that method depends on order and takes first non empty value associated to passed properties.
|
|
51
55
|
*/
|
|
52
56
|
export declare function addDefinitionForRelatedFacetKeys(appSchema: Definition, sectionDefinitions: string[], facetSections: FacetSection[], idProperties: Array<keyof Omit<FacetSection, 'custom'>>): void;
|
|
57
|
+
/**
|
|
58
|
+
* Receives a facet key and returns the key as used in schema
|
|
59
|
+
* @param facetKey - key of the facet, as used in annotation
|
|
60
|
+
* @returns facetKeyInSchema - key of the facet, as used in schema
|
|
61
|
+
*/
|
|
62
|
+
export declare function getFacetKeyInSchema(facetKey: string): string;
|
|
63
|
+
/**
|
|
64
|
+
* Adds an existing schema definition to a new definition in the app schema
|
|
65
|
+
* @param definition name of definition, as used in schema
|
|
66
|
+
* @param facetKey - key of the facet, as used in annotation
|
|
67
|
+
* @param {Definition} appSchema App schema in general
|
|
68
|
+
* @param {boolean} useDefinitionAsKey If set to false, facet key will solely be used as key, else encapsulated within definition key `definition<facetKey>`
|
|
69
|
+
* @param subDefinitionName - sub definition, if different from the definition (e.g. subsection vs. section)
|
|
70
|
+
* @returns {Definition} part of app schema that has been added and filled
|
|
71
|
+
*/
|
|
72
|
+
export declare function parseSchemaDefinition(definition: string, facetKey: string, appSchema: Definition, useDefinitionAsKey?: boolean, subDefinitionName?: DefinitionName): Definition;
|
|
73
|
+
/**
|
|
74
|
+
* Method receives custom extension base definition name and detect if it should be combined with lineItemId.
|
|
75
|
+
* @param appSchema - the app specific schema that shall get enhanced
|
|
76
|
+
* @param lineItemId - line item ID, as comprise in stable ID
|
|
77
|
+
* @param customColumnDefinitionName - (optional) definition name of custom extension.
|
|
78
|
+
* @returns $ref path for definition.
|
|
79
|
+
*/
|
|
80
|
+
export declare function getCustomExtensionDefinitionName(appSchema: Definition, lineItemId: string, customExtensionDefinitionName: string): string;
|
|
53
81
|
/**
|
|
54
82
|
* Functions used both by V2 and V4 to add the common definitions for a line item to the app schema
|
|
55
83
|
* @param appSchema - the app specific schema that shall get enhanced
|
|
@@ -60,7 +88,7 @@ export declare function addDefinitionForRelatedFacetKeys(appSchema: Definition,
|
|
|
60
88
|
* Passed in the V4 case, then additional properties of this type will be allowed.
|
|
61
89
|
* @returns the actions definition plus the annotation path to the given line item
|
|
62
90
|
*/
|
|
63
|
-
export declare function addCommonLineItemDefinitions(appSchema: Definition, lineItemAnnotation: AnnotationTerm<LineItem>, entityType: EntityType, lineItemId: string, customColumnDefinitionName?: string): {
|
|
91
|
+
export declare function addCommonLineItemDefinitions(appSchema: Definition, lineItemAnnotation: AnnotationTerm<LineItem>, entityType: EntityType, lineItemId: string, customColumnDefinitionName?: string, customActionDefinitionName?: string): {
|
|
64
92
|
actions: Definition;
|
|
65
93
|
footerActions: Definition;
|
|
66
94
|
lineItemPath: string;
|
|
@@ -104,22 +132,6 @@ export declare function determineDataType(field: object): string | undefined;
|
|
|
104
132
|
* @param field - given field definition = annotation property, at AVT
|
|
105
133
|
*/
|
|
106
134
|
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
135
|
/**
|
|
124
136
|
* Creates a definition link for a facet and definition name
|
|
125
137
|
* @param {DefinitionName} definition - name of definition, as used in schema
|
|
@@ -150,3 +162,12 @@ export declare function getFacetAnnotationPath(facet: FacetConfig | Presentation
|
|
|
150
162
|
* @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
|
|
151
163
|
*/
|
|
152
164
|
export declare function handleAddressContact(facet: FacetConfig, facetKey: string, sections: Definition, appSchema: Definition, sectionPrefix: SectionType, subSectionPrefix?: SectionType, versionPostfix?: string): void;
|
|
165
|
+
/**
|
|
166
|
+
* Method adds enum with key and description to schema definition.
|
|
167
|
+
* Description can be easily used by UI to describe enum value/key.
|
|
168
|
+
* @param {Definition} appSchema App specific JSON schema
|
|
169
|
+
* @param {DefinitionOrBoolean} origin Origin schema object containing key and description.
|
|
170
|
+
* @param {PropertyInDefinition} target Target to update with enum.
|
|
171
|
+
*/
|
|
172
|
+
export declare function addDescriptiveEnumDefinition(appSchema: Definition, origin: DefinitionOrBoolean, target: PropertyInDefinition): void;
|
|
173
|
+
export {};
|
|
@@ -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:
|
|
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;
|
|
@@ -219,7 +219,7 @@ export interface ObjectPageSectionData {
|
|
|
219
219
|
target: string;
|
|
220
220
|
key?: string;
|
|
221
221
|
}
|
|
222
|
-
export declare const BindingPropertyRegexAsString = "^{[A-Za-z0-9{}
|
|
222
|
+
export declare const BindingPropertyRegexAsString = "^{[A-Za-z0-9{}&$!@#%? _|,<>'()[\\]\\/:=.]+}$";
|
|
223
223
|
export declare enum ViewTemplateType {
|
|
224
224
|
ResponsiveTableColumnsExtension = "ResponsiveTableColumnsExtension",
|
|
225
225
|
AnalyticalTableColumnsExtension = "AnalyticalTableColumnsExtension",
|
|
@@ -228,7 +228,9 @@ export declare enum ViewTemplateType {
|
|
|
228
228
|
ResponsiveTableCellsExtension = "ResponsiveTableCellsExtension"
|
|
229
229
|
}
|
|
230
230
|
export declare enum DefinitionName {
|
|
231
|
+
Action = "Action",
|
|
231
232
|
Actions = "Actions",
|
|
233
|
+
ActionsLR = "Actions<LineItems>",
|
|
232
234
|
ALPChart = "ALPChart",
|
|
233
235
|
ALPChartView = "ALPChartView",
|
|
234
236
|
ALPTable = "ALPTable",
|
|
@@ -237,6 +239,8 @@ export declare enum DefinitionName {
|
|
|
237
239
|
AnnotationPathAsObject = "AnnotationPathAsObject",
|
|
238
240
|
ChartToolBarAction = "ChartToolBarAction",
|
|
239
241
|
CommonHeaderFacetSettings = "CommonHeaderFacetSettings",
|
|
242
|
+
CustomAction = "CustomAction",
|
|
243
|
+
CustomActionOP = "CustomActionOP",
|
|
240
244
|
CustomColumn = "TableCustomColumn",
|
|
241
245
|
CustomColumnOP = "TableCustomColumnOP",
|
|
242
246
|
CustomColumns = "TableCustomColumns",
|
|
@@ -247,7 +251,9 @@ export declare enum DefinitionName {
|
|
|
247
251
|
Fields4Dialog = "Fields4Dialog",
|
|
248
252
|
FilterBar = "FilterBar",
|
|
249
253
|
Footer = "Footer",
|
|
254
|
+
FooterAction = "FooterAction",
|
|
250
255
|
FooterActions = "FooterActions",
|
|
256
|
+
FooterActionsLR = "FooterActions<LineItems>",
|
|
251
257
|
Form = "Form",
|
|
252
258
|
FormAction = "FormAction",
|
|
253
259
|
GenericActions = "GenericActions",
|
|
@@ -295,6 +301,7 @@ export declare enum DefinitionName {
|
|
|
295
301
|
QuickVariantSelectionV4OP = "QuickVariantSelectionV4OP",
|
|
296
302
|
RelatedFacetKeys = "RelatedFacetKeys",
|
|
297
303
|
Sections = "Sections",
|
|
304
|
+
SelectionFields = "SelectionFields",
|
|
298
305
|
Table = "Table",
|
|
299
306
|
TableSPV = "TableSPV",
|
|
300
307
|
TableColumn = "TableColumn",
|
|
@@ -303,9 +310,13 @@ export declare enum DefinitionName {
|
|
|
303
310
|
ToolBar = "ToolBar",
|
|
304
311
|
ViewTableColumn = "ViewTableColumn",
|
|
305
312
|
ViewCustomColumn = "ViewTableCustomColumn",
|
|
313
|
+
ViewCustomAction = "ViewTableCustomAction",
|
|
306
314
|
ViewChartToolBar = "ViewChartToolBar",
|
|
307
315
|
ViewToolBarAction = "ViewToolBarAction",
|
|
308
|
-
ViewPosition = "ViewPosition"
|
|
316
|
+
ViewPosition = "ViewPosition",
|
|
317
|
+
ViewCustomActionPosition = "ViewCustomActionPosition",
|
|
318
|
+
CustomActionPosition = "CustomActionPosition",
|
|
319
|
+
CustomActionPositionOP = "CustomActionPositionOP"
|
|
309
320
|
}
|
|
310
321
|
export declare enum PropertyName {
|
|
311
322
|
actions = "actions",
|
|
@@ -3,6 +3,7 @@ import type { ExtensionLogger } from '../../apiTypes';
|
|
|
3
3
|
import type { FacetConfigs, FileData, FacetConfig, FacetSection, SchemaFilePath, anyFacetType } from './types';
|
|
4
4
|
import type { Manifest } from '../../specification/common';
|
|
5
5
|
import type { MetadataInstanceInterface } from './decoration/factory';
|
|
6
|
+
import type { SapUiAppPageV4, SapUi5RoutingTargetCustomPageV4 } from '../../specification/v4';
|
|
6
7
|
import type { DataFieldAbstractTypes } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
7
8
|
import type { ConvertedMetadata, EntityType, PropertyPath } from '@sap-ux/vocabularies-types';
|
|
8
9
|
import { FioriElementsVersion, PageType, PageTypeV4 } from '../../specification/common';
|
|
@@ -13,7 +14,8 @@ export declare enum TemplateType {
|
|
|
13
14
|
ListReportObjectPageV4 = "ListReportObjectPageV4",
|
|
14
15
|
OverviewPageV2 = "OverviewPageV2",
|
|
15
16
|
AnalyticalListPageV2 = "AnalyticalListPageV2",
|
|
16
|
-
AnalyticalListPageV4 = "AnalyticalListPageV4"
|
|
17
|
+
AnalyticalListPageV4 = "AnalyticalListPageV4",
|
|
18
|
+
FreestylePageV4 = "FreestylePageV4"
|
|
17
19
|
}
|
|
18
20
|
export declare const DEFINITION_LINK_PREFIX = "#/definitions/";
|
|
19
21
|
/**
|
|
@@ -73,7 +75,7 @@ export declare function getPageTypeV2(name: string): PageType | undefined;
|
|
|
73
75
|
* Return the page type for a given V4 page in manifest
|
|
74
76
|
* @param name - page component name
|
|
75
77
|
*/
|
|
76
|
-
export declare function getPageTypeV4(
|
|
78
|
+
export declare function getPageTypeV4(v4App: SapUiAppPageV4 | SapUi5RoutingTargetCustomPageV4): PageTypeV4 | undefined;
|
|
77
79
|
/**
|
|
78
80
|
* Finds the alias for a given namespace in the references' section of the converted service metadata
|
|
79
81
|
* @param {string} namespace - complete namespace, e.g. 'com.sap.vocabularies.UI.v1'
|
|
@@ -226,3 +228,22 @@ export declare function getNextTargetDefinition(appSchema: object, title: string
|
|
|
226
228
|
* @returns
|
|
227
229
|
*/
|
|
228
230
|
export declare const arrayCombineMerge: (target: any, source: any, options: any) => string[];
|
|
231
|
+
/**
|
|
232
|
+
* Converts an enum into a CSV
|
|
233
|
+
* @param {object} manifestSection - manifestSection where the key exists
|
|
234
|
+
* @param {object} configPart - Property as mentioned in config file
|
|
235
|
+
* @param {string} key - Property to be exported to manifest
|
|
236
|
+
*/
|
|
237
|
+
export declare function convertEnumToCSV(manifestSection: any, configPart: any, key: string): void;
|
|
238
|
+
/**
|
|
239
|
+
* Converts an action ID from the internal format (schema, config) to the stable ID representation
|
|
240
|
+
* @param actionId - the (unique) internal format of the action ID
|
|
241
|
+
* @returns the converted action ID
|
|
242
|
+
*/
|
|
243
|
+
export declare function convertActionKeyToStableId(actionId: string): string;
|
|
244
|
+
/**
|
|
245
|
+
* Method returns definition key for passed '$ref' property by removing 'definition' prefix
|
|
246
|
+
* @param $ref - definition reference.
|
|
247
|
+
* @returns Definition key.
|
|
248
|
+
*/
|
|
249
|
+
export declare function getDefinitionKey($ref: string): string;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="@sapui5/ts-types-esm" />
|
|
2
|
-
import type { AnalyticalTable as AnalyticalTableConfig, TableALP as TableALPConfig, CommonTableSettings as CommonTableConfig, DefaultContentView, DefaultFilterMode, GenericColumns, GridTable as GridTableConfig, LoadDataOnAppLaunchSettings, QuickVariantSelectionX as QuickVariantSelectionXInterface, ResponsiveTable as ResponsiveTableConfig, TreeTable as TreeTableConfig, Strategy, FieldPath as FieldPathInterface, QuickVariant, QuickVariantX, CreationFieldKeys, ToolBar } from '../../../../specification/v2';
|
|
3
|
-
import { TableTypeV2 } from '../../../../specification/v2';
|
|
2
|
+
import type { AnalyticalTable as AnalyticalTableConfig, TableALP as TableALPConfig, CommonTableSettings as CommonTableConfig, DefaultContentView, DefaultFilterMode, GenericColumns, GridTable as GridTableConfig, LoadDataOnAppLaunchSettings, QuickVariantSelectionX as QuickVariantSelectionXInterface, ResponsiveTable as ResponsiveTableConfig, TreeTable as TreeTableConfig, Strategy, FieldPath as FieldPathInterface, QuickVariant, QuickVariantX, CreationFieldKeys, ToolBar, TableTypeV2 } from '../../../../specification/v2';
|
|
4
3
|
import type { ControlTypeFunction, DeprecatedProperties } from '../../../common';
|
|
5
4
|
import type { PopinLayout } from 'sap/m/library';
|
|
6
5
|
import type { smarttable } from 'sap/ui/comp/library';
|
|
@@ -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:
|
|
35
|
+
}, parentIds: string[], breadcrumbs: string[], schemaDefinition: Definition, title?: string): void;
|
|
@@ -6,6 +6,7 @@ import type { SapUiAppPageV2 } from '../../../../specification/v2';
|
|
|
6
6
|
import { TableTypeV2 } from '../../../../specification/v2';
|
|
7
7
|
import type { ExtensionLogger } from '../../../../apiTypes';
|
|
8
8
|
export declare type LROPConfigsType = ListReportConfig | AnalyticalListPageConfig | ObjectPageConfig;
|
|
9
|
+
export declare function convertActionKey(actionProperty: string): string;
|
|
9
10
|
/**
|
|
10
11
|
* Unescapes the selector ID of a flex change
|
|
11
12
|
* @param selectorId - escaped selector ID
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import type { TreeTable, ResponsiveTable, AnalyticalTable, GridTable, TableALP } from '../../../../specification/v2/index';
|
|
2
|
+
import type { Definition } from 'typescript-json-schema';
|
|
2
3
|
export declare type FlexForTransfer = {
|
|
3
4
|
controlId: string;
|
|
4
5
|
controlType: string;
|
|
5
6
|
propertyId: string;
|
|
6
7
|
facetId?: string;
|
|
7
8
|
newValue: any;
|
|
9
|
+
creation: string;
|
|
8
10
|
};
|
|
9
11
|
export interface FlexChangesForTransfer {
|
|
10
12
|
[controlId: string]: FlexForTransfer;
|
|
11
13
|
}
|
|
12
14
|
export declare type ConfigTableType = ResponsiveTable | TreeTable | AnalyticalTable | GridTable | TableALP;
|
|
13
|
-
export declare function addFlexForTable(config: ConfigTableType, change: FlexForTransfer, jsonSchema:
|
|
15
|
+
export declare function addFlexForTable(config: ConfigTableType, change: FlexForTransfer, jsonSchema: Definition): void;
|
|
@@ -62,7 +62,8 @@ export declare type ObjectPageV2ConfigParameters = {
|
|
|
62
62
|
objectPageConfig?: ObjectPageConfig;
|
|
63
63
|
};
|
|
64
64
|
export declare type SectionPartProperties = {
|
|
65
|
-
id
|
|
66
|
-
type
|
|
67
|
-
schema
|
|
65
|
+
id?: string;
|
|
66
|
+
type?: SectionTypeV2;
|
|
67
|
+
schema?: Definition;
|
|
68
|
+
title?: string;
|
|
68
69
|
};
|
|
@@ -1,4 +1,19 @@
|
|
|
1
|
-
import type { ObjectPageToolBarAction as ToolBarActionIF, SelectType } from '../../../../specification/v4';
|
|
1
|
+
import type { ObjectPageToolBarAction as ToolBarActionIF, SelectType, CustomAction as CustomActionIF, CustomActionPosition as PositionIF, ActionPlacement } from '../../../../specification/v4';
|
|
2
2
|
export declare class ObjectPageToolBarAction implements ToolBarActionIF {
|
|
3
3
|
enableOnSelect?: SelectType;
|
|
4
4
|
}
|
|
5
|
+
/**
|
|
6
|
+
* Sync class for Position
|
|
7
|
+
*/
|
|
8
|
+
export declare class CustomActionPositionOP implements PositionIF {
|
|
9
|
+
anchor?: string;
|
|
10
|
+
placement: ActionPlacement;
|
|
11
|
+
}
|
|
12
|
+
export declare class CustomActionOP implements CustomActionIF {
|
|
13
|
+
text: string;
|
|
14
|
+
position: CustomActionPositionOP;
|
|
15
|
+
press: string;
|
|
16
|
+
requiresSelection?: boolean;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
enabled?: boolean;
|
|
19
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ToolBar as ToolBarIF, Actions as ActionsIF } from '../../../../specification/v4';
|
|
2
|
-
import { ToolBarAction } from './ToolBarAction';
|
|
2
|
+
import { ToolBarAction, CustomAction } from './ToolBarAction';
|
|
3
3
|
export declare class Actions implements ActionsIF {
|
|
4
|
-
[key: string]: ToolBarAction;
|
|
4
|
+
[key: string]: ToolBarAction | CustomAction;
|
|
5
5
|
}
|
|
6
6
|
export declare class ToolBar implements ToolBarIF {
|
|
7
7
|
actions: Actions;
|
|
@@ -1,7 +1,37 @@
|
|
|
1
|
-
import type { ToolBarAction as ToolBarActionIF, ViewToolBarAction as ViewToolBarActionIF, SelectType } from '../../../../specification/v4';
|
|
1
|
+
import type { ToolBarAction as ToolBarActionIF, ViewToolBarAction as ViewToolBarActionIF, SelectType, CustomAction as CustomActionIF, CustomActionPosition as PositionIF, ViewTableCustomAction as ViewTableCustomActionIF, ViewCustomActionPosition as ViewCustomActionPositionIF, ActionPlacement } from '../../../../specification/v4';
|
|
2
2
|
export declare class ToolBarAction implements ToolBarActionIF {
|
|
3
3
|
enableOnSelect?: SelectType;
|
|
4
4
|
}
|
|
5
5
|
export declare class ViewToolBarAction implements ViewToolBarActionIF {
|
|
6
6
|
enableOnSelect?: SelectType;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* Sync class for Position
|
|
10
|
+
*/
|
|
11
|
+
export declare class CustomActionPosition implements PositionIF {
|
|
12
|
+
anchor?: string;
|
|
13
|
+
placement: ActionPlacement;
|
|
14
|
+
}
|
|
15
|
+
export declare class CustomAction implements CustomActionIF {
|
|
16
|
+
text: string;
|
|
17
|
+
position: CustomActionPosition;
|
|
18
|
+
press: string;
|
|
19
|
+
requiresSelection?: boolean;
|
|
20
|
+
visible?: boolean;
|
|
21
|
+
enabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Sync class for Position
|
|
25
|
+
*/
|
|
26
|
+
export declare class ViewCustomActionPosition implements ViewCustomActionPositionIF {
|
|
27
|
+
anchor?: string;
|
|
28
|
+
placement: ActionPlacement;
|
|
29
|
+
}
|
|
30
|
+
export declare class ViewTableCustomAction implements ViewTableCustomActionIF {
|
|
31
|
+
text: string;
|
|
32
|
+
position: CustomActionPosition;
|
|
33
|
+
press: string;
|
|
34
|
+
requiresSelection?: boolean;
|
|
35
|
+
visible?: boolean;
|
|
36
|
+
enabled?: boolean;
|
|
37
|
+
}
|
|
@@ -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;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { GenerateAppSchemaParameters } from '../../../apiTypes';
|
|
2
|
+
/**
|
|
3
|
+
* Generates an app specific schema for the FE V4 Freestyle page from the generic schema.
|
|
4
|
+
* Generic types are replaced by information from the app specific annotations.
|
|
5
|
+
* @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
|
|
6
|
+
* @param genericSchema - generic JSON schema of an object page
|
|
7
|
+
*
|
|
8
|
+
* @returns {object} application-specific schema of the freestyle page
|
|
9
|
+
*/
|
|
10
|
+
export declare function generateFreestyleSchemaV4(_generateParameters: GenerateAppSchemaParameters, genericSchema: object): object;
|
|
@@ -28,3 +28,15 @@ export declare function generateObjectPageInterfaceV4(genericSchema: object, ent
|
|
|
28
28
|
* @returns the app specific JSON schema
|
|
29
29
|
*/
|
|
30
30
|
export declare function generateListReportInterfaceV4(templateType: TemplateType, genericSchema: object, entitySetName: string, annotations: FileData[], logger?: ExtensionLogger, manifest?: object): object;
|
|
31
|
+
/**
|
|
32
|
+
* Generates the app specific schema of a freestyle page out of the generic schema.
|
|
33
|
+
* Generic types are replaced by information from the app specific annotations.
|
|
34
|
+
* @param {TemplateType} templateType - the template type allows distinguishing LR and ALP
|
|
35
|
+
* @param genericSchema - generic JSON schema of a list report
|
|
36
|
+
* @param annotations - list of all annotation files (file content plus URI as identifier)
|
|
37
|
+
* @param {ExtensionLogger} logger - Logger class for logging messages
|
|
38
|
+
* @param manifest - manifest.json of the app
|
|
39
|
+
*
|
|
40
|
+
* @returns the app specific JSON schema
|
|
41
|
+
*/
|
|
42
|
+
export declare function generateFreestyleInterfaceV4(templateType: TemplateType, genericSchema: object, annotations: FileData[], manifest?: object, entitySetName?: string, logger?: ExtensionLogger): object;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { generateListReportSchemaV4 } from './listReport';
|
|
2
2
|
export { generateObjectPageSchemaV4 } from './objectPage';
|
|
3
|
-
export {
|
|
3
|
+
export { generateFreestyleSchemaV4 } from './freestylePage';
|
|
4
|
+
export { generateListReportInterfaceV4, generateObjectPageInterfaceV4, generateFreestyleInterfaceV4 } from './generate';
|
|
@@ -1,20 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { Files } from '../../../common';
|
|
3
|
-
import { TemplateType } from '../../../common';
|
|
4
|
-
import type { SapUiAppPagesV4, Manifest, Pages } from '../../../../specification/v4';
|
|
1
|
+
import type { Files, TemplateType } from '../../../common';
|
|
5
2
|
import type { ExtensionLogger } from '../../../..';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Namespace = "sap.fe.templates"
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* Determines the Pages(app.json) using routing configuration from manifest and creates the configuration for each page
|
|
13
|
-
* @param manifest - manifest.json of the app
|
|
14
|
-
* @param schemas - list of JSON schemas of all pages
|
|
15
|
-
*/
|
|
16
|
-
export declare function getPagesAndConfigs(manifest: Manifest, schemas: Files, templateType: TemplateType, logger?: ExtensionLogger): Pages;
|
|
17
|
-
export declare class V4AppProvider extends AppProvider {
|
|
3
|
+
import type { Manifest } from '../../../../specification/v4';
|
|
4
|
+
import { BaseAppProvider } from './baseAppProvider';
|
|
5
|
+
export declare class V4AppProvider extends BaseAppProvider {
|
|
18
6
|
constructor(manifest: Manifest, schemas: Files, templateType: TemplateType, logger?: ExtensionLogger);
|
|
19
7
|
}
|
|
20
|
-
export declare function getPages(manifest: Manifest, targetName: string): SapUiAppPagesV4;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { AppProvider } from '../../../common/appProvider';
|
|
2
|
+
import { AppSettings } from '../../application';
|
|
3
|
+
import type { Files } from '../../../common';
|
|
4
|
+
import { TemplateType } from '../../../common';
|
|
5
|
+
import type { SapUiAppPagesV4, SapUi5RoutingV4, Manifest, Pages, Page, RoutingTargetOptions } from '../../../../specification/v4';
|
|
6
|
+
import { PageTypeV4 } from '../../../../specification/common';
|
|
7
|
+
import type { ExtensionLogger } from '../../../..';
|
|
8
|
+
export declare enum Constants {
|
|
9
|
+
OptionalQuery = ":?query:",
|
|
10
|
+
Component = "sap/fe/AppComponent",
|
|
11
|
+
Namespace = "sap.fe.templates"
|
|
12
|
+
}
|
|
13
|
+
export declare const unhandledControllers: Array<string>;
|
|
14
|
+
export declare type ConversionParameters = {
|
|
15
|
+
target: RoutingTargetOptions;
|
|
16
|
+
pageType: PageTypeV4;
|
|
17
|
+
manifest: Manifest;
|
|
18
|
+
schemas: Files;
|
|
19
|
+
logger: ExtensionLogger;
|
|
20
|
+
page: Page;
|
|
21
|
+
id: string;
|
|
22
|
+
templateType: TemplateType;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Determines the Pages(app.json) using routing configuration from manifest and creates the configuration for each page
|
|
26
|
+
* @param manifest - manifest.json of the app
|
|
27
|
+
* @param schemas - list of JSON schemas of all pages
|
|
28
|
+
*/
|
|
29
|
+
export declare function getPagesAndConfigs(manifest: Manifest, schemas: Files, templateType: TemplateType, logger?: ExtensionLogger): Pages;
|
|
30
|
+
/**
|
|
31
|
+
* Get the id of the page that is to open when the application is started.
|
|
32
|
+
* @param routing UI5 routing configuration
|
|
33
|
+
*/
|
|
34
|
+
export declare function getHome(routing: SapUi5RoutingV4): string;
|
|
35
|
+
/**
|
|
36
|
+
* Method which detects app settings from manifest.
|
|
37
|
+
* Currently only one setting is detected -Flexible Column Layout
|
|
38
|
+
* @param routing UI5 routing configuration.
|
|
39
|
+
* @return {AppSettings} Application settings.
|
|
40
|
+
*/
|
|
41
|
+
export declare function getSettings(routing: SapUi5RoutingV4): AppSettings;
|
|
42
|
+
export declare function getPages(manifest: Manifest, targetName: string): SapUiAppPagesV4;
|
|
43
|
+
export declare abstract class BaseAppProvider extends AppProvider {
|
|
44
|
+
constructor(manifest: Manifest, schemas: Files, templateType: TemplateType, logger?: ExtensionLogger);
|
|
45
|
+
}
|