@sap/ux-specification 1.96.16 → 1.96.19

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.
Files changed (39) hide show
  1. package/CHANGELOG.md +72 -15
  2. package/dist/documentation/runDocu-min.js +1 -1
  3. package/dist/documentation/v2/v2-AnalyticalListPage.html +1 -1
  4. package/dist/documentation/v2/v2-ApplicationV2.html +1 -1
  5. package/dist/documentation/v2/v2-ListReport.html +1 -1
  6. package/dist/documentation/v2/v2-ObjectPage.html +1 -1
  7. package/dist/documentation/v2/v2-OverviewPage.html +1 -1
  8. package/dist/documentation/v4/v4-ApplicationV4.html +1 -1
  9. package/dist/documentation/v4/v4-FreestylePage.html +1 -1
  10. package/dist/documentation/v4/v4-ListReport.html +1 -1
  11. package/dist/documentation/v4/v4-ObjectPage.html +1 -1
  12. package/dist/index-min.js +1 -1
  13. package/dist/schemas/v2/AnalyticalListPageConfig.json +3 -2
  14. package/dist/schemas/v2/ApplicationV2.json +10 -1
  15. package/dist/schemas/v2/ListReportConfig.json +5 -4
  16. package/dist/schemas/v2/ObjectPageConfig.json +20 -19
  17. package/dist/schemas/v4/ApplicationV4.json +10 -1
  18. package/dist/schemas/v4/ListReportConfig.json +307 -38
  19. package/dist/schemas/v4/ObjectPageConfig.json +101 -1
  20. package/dist/specification/v4/index-min.js +1 -1
  21. package/dist/src/apiTypes.d.ts +6 -3
  22. package/dist/src/specification/common/page.d.ts +1 -1
  23. package/dist/src/specification/v2/controls/Table.d.ts +1 -0
  24. package/dist/src/specification/v4/controls/ObjectPageToolBar.d.ts +14 -2
  25. package/dist/src/specification/v4/controls/Table.d.ts +42 -1
  26. package/dist/src/specification/v4/controls/ToolBar.d.ts +59 -2
  27. package/dist/src/specification/v4/webapp/manifest/sapUi5.d.ts +1 -3
  28. package/dist/src/sync/common/generate/utils.d.ts +39 -18
  29. package/dist/src/sync/common/types.d.ts +10 -3
  30. package/dist/src/sync/common/utils.d.ts +7 -1
  31. package/dist/src/sync/v2/export/export.d.ts +2 -1
  32. package/dist/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +16 -1
  33. package/dist/src/sync/v4/export/controls/Table.d.ts +12 -2
  34. package/dist/src/sync/v4/export/controls/ToolBar.d.ts +2 -2
  35. package/dist/src/sync/v4/export/controls/ToolBarAction.d.ts +31 -1
  36. package/dist/src/sync/v4/export/utils.d.ts +6 -0
  37. package/dist/src/sync/v4/generate/generate.d.ts +1 -1
  38. package/dist/src/sync/v4/utils/utils.d.ts +20 -3
  39. package/package.json +6 -6
@@ -341,7 +341,14 @@
341
341
  "isViewNode": true,
342
342
  "type": "object",
343
343
  "additionalProperties": {
344
- "$ref": "#/definitions/ObjectPageToolBarAction"
344
+ "anyOf": [
345
+ {
346
+ "$ref": "#/definitions/ObjectPageToolBarAction"
347
+ },
348
+ {
349
+ "$ref": "#/definitions/CustomActionOP"
350
+ }
351
+ ]
345
352
  }
346
353
  },
347
354
  "ObjectPageToolBarAction": {
@@ -364,6 +371,99 @@
364
371
  ],
365
372
  "type": "string"
366
373
  },
374
+ "CustomActionOP": {
375
+ "type": "object",
376
+ "properties": {
377
+ "position": {
378
+ "$ref": "#/definitions/CustomActionPositionOP",
379
+ "description": "Defines the position of the action relative to other actions.",
380
+ "artifactType": "Manifest"
381
+ },
382
+ "text": {
383
+ "description": "The text that is displayed on the button (typically a binding to an i18n entry).",
384
+ "i18nClassification": "COL: Custom action text",
385
+ "type": "string",
386
+ "artifactType": "Manifest"
387
+ },
388
+ "press": {
389
+ "description": "Relevant for extension actions; allows the definition of a target action handler.",
390
+ "type": "string",
391
+ "artifactType": "Manifest"
392
+ },
393
+ "requiresSelection": {
394
+ "description": "Indicates whether the action requires a selection of items.",
395
+ "type": "boolean",
396
+ "artifactType": "Manifest"
397
+ },
398
+ "visible": {
399
+ "pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#%? _|,<>'()[\\]\\/:=.]+}$",
400
+ "anyOf": [
401
+ {
402
+ "enum": [
403
+ false,
404
+ true,
405
+ "{ui>/editable}",
406
+ "{= !${ui>/editable}}"
407
+ ]
408
+ },
409
+ {
410
+ "type": "string"
411
+ }
412
+ ],
413
+ "description": "Whether the action button should be visible on the screen.",
414
+ "artifactType": "Manifest"
415
+ },
416
+ "enabled": {
417
+ "pattern": "^(false|true)$|^{[A-Za-z0-9{}&$!@#%? _|,<>'()[\\]\\/:=.]+}$",
418
+ "anyOf": [
419
+ {
420
+ "enum": [
421
+ false,
422
+ true,
423
+ "{ui>/editable}",
424
+ "{= !${ui>/editable}}"
425
+ ]
426
+ },
427
+ {
428
+ "type": "string"
429
+ }
430
+ ],
431
+ "description": "Whether the action button should be enabled. Default value is `true`.",
432
+ "artifactType": "Manifest"
433
+ }
434
+ },
435
+ "additionalProperties": false,
436
+ "required": [
437
+ "press",
438
+ "text"
439
+ ]
440
+ },
441
+ "CustomActionPositionOP": {
442
+ "type": "object",
443
+ "properties": {
444
+ "anchor": {
445
+ "description": "The key of another action to be used as placement anchor.",
446
+ "type": "string",
447
+ "artifactType": "Manifest"
448
+ },
449
+ "placement": {
450
+ "$ref": "#/definitions/ActionPlacement",
451
+ "description": "Define the placement, either before or after the anchor action.",
452
+ "artifactType": "Manifest"
453
+ }
454
+ },
455
+ "additionalProperties": false,
456
+ "required": [
457
+ "placement"
458
+ ]
459
+ },
460
+ "ActionPlacement": {
461
+ "enum": [
462
+ "After",
463
+ "Before"
464
+ ],
465
+ "type": "string"
466
+ },
367
467
  "TableCreationModeOP": {
368
468
  "type": "object",
369
469
  "properties": {
@@ -1 +1 @@
1
- (()=>{"use strict";var e={6442:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.OData="OData",e.ODataAnnotation="ODataAnnotation"}(t.DataSourceType||(t.DataSourceType={})),function(e){e.ui="sap.ui",e.app="sap.app",e.generic="sap.ui.generic.app",e.ovp="sap.ovp",e.ui5="sap.ui5"}(n=t.ManifestSection||(t.ManifestSection={})),t.GENERICAPPSETTINGS=`${n.generic}/settings`},3404:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(6442)),o(n(5281))},5281:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FIORI_FCL_ROOT_VIEW_NAME="sap.fe.templates.RootContainer.view.Fcl",t.FIORI_FCL_ROOT_ID="appRootView",function(e){e.XML="XML",e.HTML="HTML",e.JS="JS",e.JSON="JSON"}(t.ViewTypes||(t.ViewTypes={})),t.SAPUI5_VIEW_CLASS="sap.ui.core.mvc.View",t.SAPUI5_FRAGMENT_CLASS="sap.ui.core.Fragment"},9734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e["not-adaptable-visibility"]="not-adaptable-visibility"}(t.DesigntimeValues||(t.DesigntimeValues={}))},8554:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Tabs="Tabs",e.Page="Page"}(t.SectionLayoutType||(t.SectionLayoutType={}))},4685:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.After="After",e.Before="Before"}(t.SectionPosition||(t.SectionPosition={})),function(e){e.XML="XML"}(t.CustomSectionViewTypesV4||(t.CustomSectionViewTypesV4={}))},7093:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Multi="Multi",e.None="None",e.Single="Single",e.Auto="Auto"}(t.SelectionMode||(t.SelectionMode={})),function(e){e.ResponsiveTable="ResponsiveTable",e.GridTable="GridTable",e.AnalyticalTable="AnalyticalTable"}(t.TableTypeV4||(t.TableTypeV4={})),function(e){e.NewPage="NewPage",e.Inline="Inline",e.CreationRow="CreationRow"}(t.TableCreationModeType||(t.TableCreationModeType={})),function(e){e.Disabled="Disabled",e.Enabled="Enabled",e.Auto="Auto"}(t.InitialLoadType||(t.InitialLoadType={})),function(e){e.Primary="primary",e.Secondary="secondary",e.Both="both"}(t.DefaultPathType||(t.DefaultPathType={}))},8452:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.single="single",e.multi="multi"}(t.SelectType||(t.SelectType={}))},1709:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(7093)),o(n(8452)),o(n(9734)),o(n(8554)),o(n(4685))},5877:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(7005)),o(n(1709)),o(n(5113))},5759:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None="None",e.Control="Control",e.Page="Page"}(t.VariantManagementTypeListReport||(t.VariantManagementTypeListReport={}))},8999:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None="None",e.Control="Control"}(t.VariantManagementTypeObjectPage||(t.VariantManagementTypeObjectPage={}))},7005:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(8999)),o(n(5759))},5113:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(6568))},5817:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.After="After",e.Before="Before",e.End="End"}(t.Placement||(t.Placement={})),function(e){e.Default="Default",e.Adaptation="Adaptation",e.Hidden="Hidden"}(t.Availability||(t.Availability={})),function(e){e.Begin="Begin",e.Center="Center",e.End="End"}(t.HorizontalAlign||(t.HorizontalAlign={}))},6568:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(8778)),o(n(8741)),o(n(3404)),o(n(5817))},8741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FIORI_FCL_ROUTER_CLASS="sap.f.routing.Router",function(e){e.BeginColumnPages="beginColumnPages",e.MidColumnPages="midColumnPages",e.EndColumnPages="endColumnPages"}(t.FlexibleColumnLayoutAggregations||(t.FlexibleColumnLayoutAggregations={})),t.SAPUI5_DEPENDENCY_LIB_SAP_F="sap.f"},8778:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FE_TEMPLATE_V4="sap.fe.templates",t.FE_TEMPLATE_V4_CUSTOM_PAGE="sap.fe.core.fpm",t.FE_TEMPLATE_V4_OBJECT_PAGE="sap.fe.templates.ObjectPage",t.FE_TEMPLATE_V4_LIST_REPORT="sap.fe.templates.ListReport",t.FE_TEMPLATE_V4_ALP="sap.fe.templates.AnalyticalListPage",t.SAPUI5_FRAGMENT_TYPE_V4="XMLFragment",function(e){e.AfterFacet="AfterFacet",e.BeforeFacet="BeforeFacet"}(t.SectionPositionV4||(t.SectionPositionV4={}))}},t={};var n=function n(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(5877);module.exports=n})();
1
+ (()=>{"use strict";var e={6442:(e,t)=>{var n;Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.OData="OData",e.ODataAnnotation="ODataAnnotation"}(t.DataSourceType||(t.DataSourceType={})),function(e){e.ui="sap.ui",e.app="sap.app",e.generic="sap.ui.generic.app",e.ovp="sap.ovp",e.ui5="sap.ui5"}(n=t.ManifestSection||(t.ManifestSection={})),t.GENERICAPPSETTINGS=`${n.generic}/settings`},3404:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(6442)),o(n(5281))},5281:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FIORI_FCL_ROOT_VIEW_NAME="sap.fe.templates.RootContainer.view.Fcl",t.FIORI_FCL_ROOT_ID="appRootView",function(e){e.XML="XML",e.HTML="HTML",e.JS="JS",e.JSON="JSON"}(t.ViewTypes||(t.ViewTypes={})),t.SAPUI5_VIEW_CLASS="sap.ui.core.mvc.View",t.SAPUI5_FRAGMENT_CLASS="sap.ui.core.Fragment"},9734:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e["not-adaptable-visibility"]="not-adaptable-visibility"}(t.DesigntimeValues||(t.DesigntimeValues={}))},8554:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Tabs="Tabs",e.Page="Page"}(t.SectionLayoutType||(t.SectionLayoutType={}))},4685:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.After="After",e.Before="Before"}(t.SectionPosition||(t.SectionPosition={})),function(e){e.XML="XML"}(t.CustomSectionViewTypesV4||(t.CustomSectionViewTypesV4={}))},7093:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.Multi="Multi",e.None="None",e.Single="Single",e.Auto="Auto"}(t.SelectionMode||(t.SelectionMode={})),function(e){e.ResponsiveTable="ResponsiveTable",e.GridTable="GridTable",e.AnalyticalTable="AnalyticalTable"}(t.TableTypeV4||(t.TableTypeV4={})),function(e){e.NewPage="NewPage",e.Inline="Inline",e.CreationRow="CreationRow"}(t.TableCreationModeType||(t.TableCreationModeType={})),function(e){e.Disabled="Disabled",e.Enabled="Enabled",e.Auto="Auto"}(t.InitialLoadType||(t.InitialLoadType={})),function(e){e.Primary="primary",e.Secondary="secondary",e.Both="both"}(t.DefaultPathType||(t.DefaultPathType={}))},8452:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.single="single",e.multi="multi"}(t.SelectType||(t.SelectType={})),function(e){e.After="After",e.Before="Before"}(t.ActionPlacement||(t.ActionPlacement={}))},1709:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(7093)),o(n(8452)),o(n(9734)),o(n(8554)),o(n(4685))},5877:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(7005)),o(n(1709)),o(n(5113))},5759:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None="None",e.Control="Control",e.Page="Page"}(t.VariantManagementTypeListReport||(t.VariantManagementTypeListReport={}))},8999:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.None="None",e.Control="Control"}(t.VariantManagementTypeObjectPage||(t.VariantManagementTypeObjectPage={}))},7005:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(8999)),o(n(5759))},5113:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}(n(6568))},5817:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e){e.After="After",e.Before="Before",e.End="End"}(t.Placement||(t.Placement={})),function(e){e.Default="Default",e.Adaptation="Adaptation",e.Hidden="Hidden"}(t.Availability||(t.Availability={})),function(e){e.Begin="Begin",e.Center="Center",e.End="End"}(t.HorizontalAlign||(t.HorizontalAlign={}))},6568:(e,t,n)=>{function o(e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])}Object.defineProperty(t,"__esModule",{value:!0}),o(n(8778)),o(n(8741)),o(n(3404)),o(n(5817))},8741:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FIORI_FCL_ROUTER_CLASS="sap.f.routing.Router",function(e){e.BeginColumnPages="beginColumnPages",e.MidColumnPages="midColumnPages",e.EndColumnPages="endColumnPages"}(t.FlexibleColumnLayoutAggregations||(t.FlexibleColumnLayoutAggregations={})),t.SAPUI5_DEPENDENCY_LIB_SAP_F="sap.f"},8778:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FE_TEMPLATE_V4="sap.fe.templates",t.FE_TEMPLATE_V4_CUSTOM_PAGE="sap.fe.core.fpm",t.FE_TEMPLATE_V4_OBJECT_PAGE="sap.fe.templates.ObjectPage",t.FE_TEMPLATE_V4_LIST_REPORT="sap.fe.templates.ListReport",t.FE_TEMPLATE_V4_ALP="sap.fe.templates.AnalyticalListPage",t.SAPUI5_FRAGMENT_TYPE_V4="XMLFragment",function(e){e.AfterFacet="AfterFacet",e.BeforeFacet="BeforeFacet"}(t.SectionPositionV4||(t.SectionPositionV4={}))}},t={};var n=function n(o){var a=t[o];if(void 0!==a)return a.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}(5877);module.exports=n})();
@@ -9,7 +9,9 @@ import type { ApplicationV4, ObjectPageConfig as ObjectPageConfigV4, ListReportC
9
9
  import type { ConvertedMetadata } from '@sap-ux/vocabularies-types';
10
10
  import type { Editor } from 'mem-fs-editor';
11
11
  import type { TemplateType } from './sync/common';
12
- import type { CustomPage as FPMCustomPage, CustomTableColumn as FPMCustomTableColumn, CustomSection as FPMCustomSection, ObjectPage as FPMObjectPage } from '@sap-ux/fe-fpm-writer';
12
+ import type { CustomPage as FPMCustomPage, CustomTableColumn as FPMCustomTableColumn, CustomSection as FPMCustomSection, ObjectPage as FPMObjectPage, CustomAction as FPMCustomAction } from '@sap-ux/fe-fpm-writer';
13
+ import { TargetControl } from '@sap-ux/fe-fpm-writer';
14
+ export { TargetControl as CustomActionTargetControl };
13
15
  export declare type MessageMetadataType = (object | string | number)[];
14
16
  /**
15
17
  * Interface used to define a logger for the specificaton API
@@ -301,7 +303,8 @@ export declare enum CustomExtensionType {
301
303
  CustomPage = "CustomPage",
302
304
  CustomColumn = "CustomColumn",
303
305
  CustomSection = "CustomSection",
304
- ObjectPage = "ObjectPage"
306
+ ObjectPage = "ObjectPage",
307
+ CustomAction = "CustomAction"
305
308
  }
306
309
  export interface GenerateCustomExtensionParams {
307
310
  customExtension: CustomExtensionType;
@@ -309,7 +312,7 @@ export interface GenerateCustomExtensionParams {
309
312
  data: CustomExtensionData;
310
313
  fsEditor?: Editor;
311
314
  }
312
- export declare type CustomExtensionData = FPMCustomPage | FPMCustomTableColumn | FPMCustomSection | FPMObjectPage;
315
+ export declare type CustomExtensionData = FPMCustomPage | FPMCustomTableColumn | FPMCustomSection | FPMObjectPage | FPMCustomAction;
313
316
  export declare const FPMWriterMap: Map<CustomExtensionType, (basePath: string, data: CustomExtensionData, fs?: Editor) => Editor>;
314
317
  /**
315
318
  * API Version
@@ -21,7 +21,7 @@ export interface PageBase {
21
21
  navigationProperty?: string;
22
22
  config?: PageConfig;
23
23
  navigation?: {
24
- [property: string]: string;
24
+ [property: string]: string | object;
25
25
  };
26
26
  variantManagement?: string;
27
27
  defaultLayoutType?: FlexibleColumnLayoutType;
@@ -46,6 +46,7 @@ export interface TableCustomColumn {
46
46
  /**
47
47
  * The index of the column in the overall collection; if undefined, the custom column will be added at the end of the table.
48
48
  * @minimum 0
49
+ * @hidden true
49
50
  */
50
51
  columnIndex?: number;
51
52
  /**
@@ -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
@@ -145,6 +145,7 @@ export interface TableSettings {
145
145
  */
146
146
  condensedTableLayout?: boolean;
147
147
  }
148
+ export declare type ViewTypeV4 = LRTableView | LRChartView | TableViewExtension | boolean;
148
149
  /**
149
150
  * Views
150
151
  * @isViewNode true
@@ -153,7 +154,7 @@ export interface MultiTableModeV4 {
153
154
  /**
154
155
  * List of annotation paths
155
156
  */
156
- [key: string]: LRTableView | LRChartView | boolean;
157
+ [key: string]: ViewTypeV4;
157
158
  /**
158
159
  * You can show the counts of entries of each view. To do so, add the showCounts option and set it to true.
159
160
  */
@@ -195,6 +196,10 @@ export interface LRChartView {
195
196
  * @isViewNode true
196
197
  */
197
198
  toolBar?: ViewChartToolBar;
199
+ /**
200
+ * Specifies whether the view is visible or not
201
+ */
202
+ visible?: boolean;
198
203
  }
199
204
  /**
200
205
  * Table View
@@ -228,11 +233,40 @@ export interface ALPTableView extends TableSettings {
228
233
  toolBar?: ToolBar;
229
234
  columns?: ViewColumns;
230
235
  }
236
+ /**
237
+ * Table View Extension
238
+ * @isViewNode true
239
+ */
240
+ export interface TableViewExtension {
241
+ /**
242
+ * Unique tab identifier.
243
+ */
244
+ key: string;
245
+ /**
246
+ * @hidden true
247
+ */
248
+ index: number;
249
+ /**
250
+ * View title (localization supported).
251
+ */
252
+ label?: string;
253
+ /**
254
+ * The name contains sap.app.id as a prefix, followed by the path in the app/webapp folder and the name of the XML view.
255
+ */
256
+ template: string;
257
+ /**
258
+ * Specifies whether the view is visible or not
259
+ */
260
+ visible?: boolean;
261
+ }
231
262
  /**
232
263
  * Table View
233
264
  * @isViewNode true
234
265
  */
235
266
  export interface LRTableView extends TableSettings {
267
+ /**
268
+ * Unique tab identifier.
269
+ */
236
270
  key: string;
237
271
  index: number;
238
272
  /**
@@ -261,7 +295,14 @@ export interface LRTableView extends TableSettings {
261
295
  * Table Toolbar
262
296
  */
263
297
  toolBar?: ToolBar;
298
+ /**
299
+ * Columns
300
+ */
264
301
  columns?: ViewColumns;
302
+ /**
303
+ * Specifies whether the view is visible or not
304
+ */
305
+ visible?: boolean;
265
306
  }
266
307
  /**
267
308
  * Table
@@ -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
+ }
@@ -46,9 +46,7 @@ export interface SapUi5RoutingTargetCustomPageV4 extends SapUi5RoutingTargetBase
46
46
  controlConfiguration?: SapUiGenericAppPageSettings;
47
47
  }
48
48
  export interface SapUi5RoutingTargetNavigationV4 {
49
- detail: {
50
- route: string;
51
- };
49
+ detail: object;
52
50
  }
53
51
  export interface SapUi5ViewPath {
54
52
  key: string;
@@ -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: 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;
@@ -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",
@@ -239,6 +239,8 @@ export declare enum DefinitionName {
239
239
  AnnotationPathAsObject = "AnnotationPathAsObject",
240
240
  ChartToolBarAction = "ChartToolBarAction",
241
241
  CommonHeaderFacetSettings = "CommonHeaderFacetSettings",
242
+ CustomAction = "CustomAction",
243
+ CustomActionOP = "CustomActionOP",
242
244
  CustomColumn = "TableCustomColumn",
243
245
  CustomColumnOP = "TableCustomColumnOP",
244
246
  CustomColumns = "TableCustomColumns",
@@ -303,14 +305,19 @@ export declare enum DefinitionName {
303
305
  Table = "Table",
304
306
  TableSPV = "TableSPV",
305
307
  TableColumn = "TableColumn",
308
+ TableViewExtension = "TableViewExtension",
306
309
  ToolBarAction = "ToolBarAction",
307
310
  ToolBarLR = "ToolBar<LineItems>",
308
311
  ToolBar = "ToolBar",
309
312
  ViewTableColumn = "ViewTableColumn",
310
313
  ViewCustomColumn = "ViewTableCustomColumn",
314
+ ViewCustomAction = "ViewTableCustomAction",
311
315
  ViewChartToolBar = "ViewChartToolBar",
312
316
  ViewToolBarAction = "ViewToolBarAction",
313
- ViewPosition = "ViewPosition"
317
+ ViewPosition = "ViewPosition",
318
+ ViewCustomActionPosition = "ViewCustomActionPosition",
319
+ CustomActionPosition = "CustomActionPosition",
320
+ CustomActionPositionOP = "CustomActionPositionOP"
314
321
  }
315
322
  export declare enum PropertyName {
316
323
  actions = "actions",
@@ -104,7 +104,7 @@ export declare function getSectionFacet(facetDefinition: anyFacetType, sourceEnt
104
104
  * @param {boolean} importScenario - indicates if the function is called for the import, else it is the export
105
105
  * @returns returns section of the manifest based on path, generates an empty object in case it does not exists
106
106
  */
107
- export declare const getManifestSectionByPathV4: (manifest: object, path: string, targetAnnotation?: string, targetAnnotationEncoded?: string, importScenario?: boolean) => object;
107
+ export declare const getManifestSectionByPathV4: (manifest: object, path: string, targetAnnotation?: string, targetAnnotationEncoded?: string) => object;
108
108
  export declare function getSchemaKeyOfLineItemRecord(lineItemRecord: DataFieldAbstractTypes): string;
109
109
  /**
110
110
  * Retrieve header facet configurations that can be used to generate ObjectPage schemas
@@ -241,3 +241,9 @@ export declare function convertEnumToCSV(manifestSection: any, configPart: any,
241
241
  * @returns the converted action ID
242
242
  */
243
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,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;
@@ -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,4 +1,5 @@
1
- import type { TableSettings as TableSettingsIF, Table as TableInterface, TableCreationMode as TableCreationModeIF, ViewTableCreationMode as ViewTableCreationModeIF, PersonalizationType as PersonalizationTypeIF, ViewPersonalizationType as ViewPersonalizationTypeIF, QuickVariantSelectionV4 as QuickVariantSelectionV4IF, ALPChartView as ALPChartIF, LRChartView as LRChartViewIF, ALPTableView as ALPTableIF, LRTableView as LRTableViewIF, TableTypeV4, TableCreationModeType, ViewChartToolBar, SelectionMode, InitialLoadType, AnnotationPathAsObject, MultiTableModeV4 as MultiTableModeIF } from '../../../../specification/v4';
1
+ import { ViewTypeV4 } from '../../../../specification/v4';
2
+ import type { TableSettings as TableSettingsIF, Table as TableInterface, TableCreationMode as TableCreationModeIF, TableViewExtension as TableViewExtensionIF, ViewTableCreationMode as ViewTableCreationModeIF, PersonalizationType as PersonalizationTypeIF, ViewPersonalizationType as ViewPersonalizationTypeIF, QuickVariantSelectionV4 as QuickVariantSelectionV4IF, ALPChartView as ALPChartIF, LRChartView as LRChartViewIF, ALPTableView as ALPTableIF, LRTableView as LRTableViewIF, TableTypeV4, TableCreationModeType, ViewChartToolBar, SelectionMode, InitialLoadType, AnnotationPathAsObject, MultiTableModeV4 as MultiTableModeIF } from '../../../../specification/v4';
2
3
  import type { ToolBar } from './ToolBar';
3
4
  /**
4
5
  * sync rule function for export of creationMode.name
@@ -131,6 +132,7 @@ export declare class LRChartView implements LRChartViewIF {
131
132
  annotationPath: string;
132
133
  entitySet?: string;
133
134
  toolBar?: ViewChartToolBar;
135
+ visible?: boolean;
134
136
  }
135
137
  /****************************************
136
138
  * Sync class for LRTableView
@@ -141,13 +143,21 @@ export declare class LRTableView extends TableViewSettings implements LRTableVie
141
143
  annotationPath: string;
142
144
  keepPreviousPersonalization?: boolean;
143
145
  entitySet?: string;
146
+ visible?: boolean;
144
147
  toolBar?: ToolBar;
145
148
  }
149
+ export declare class TableViewExtension implements TableViewExtensionIF {
150
+ key: string;
151
+ index: number;
152
+ label?: string;
153
+ template: string;
154
+ visible?: boolean;
155
+ }
146
156
  /**
147
157
  * LR multi-view: own class for properties on views' level
148
158
  */
149
159
  export declare class MultiTableModeV4 implements MultiTableModeIF {
150
- [key: string]: LRTableView | LRChartView | boolean;
160
+ [key: string]: ViewTypeV4;
151
161
  showCounts?: boolean;
152
162
  }
153
163
  /****************************************
@@ -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;