@sap/ux-specification 1.136.19 → 1.136.21

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 (148) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
  3. package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
  4. package/dist/documentation/v2/v2-ListReport.html +2 -2
  5. package/dist/documentation/v2/v2-ListReportNew.html +2 -2
  6. package/dist/documentation/v2/v2-ObjectPage.html +2 -2
  7. package/dist/documentation/v2/v2-OverviewPage.html +2 -2
  8. package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
  9. package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
  10. package/dist/documentation/v4/v4-FreestylePage.html +2 -2
  11. package/dist/documentation/v4/v4-ListReport.html +2 -2
  12. package/dist/documentation/v4/v4-ObjectPage.html +2 -2
  13. package/dist/index-min.js +279 -271
  14. package/dist/index-min.js.map +4 -4
  15. package/dist/schemas/v2/ListReportNewConfig.json +143 -0
  16. package/dist/schemas/v4/BuildingBlocksConfig.json +100 -8
  17. package/dist/schemas/v4/ListReportConfig.json +30 -9
  18. package/dist/schemas/v4/ObjectPageConfig.json +14 -4
  19. package/dist/specification/package.json +6 -6
  20. package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
  21. package/dist/specification/scripts/macros/corrections.js +71 -3
  22. package/dist/specification/scripts/macros/corrections.js.map +1 -1
  23. package/dist/specification/scripts/macros/schema.d.ts +9 -0
  24. package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
  25. package/dist/specification/scripts/macros/schema.js +21 -4
  26. package/dist/specification/scripts/macros/schema.js.map +1 -1
  27. package/dist/specification/scripts/schema/to-json-schema.js +1 -1
  28. package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
  29. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts +21 -0
  30. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts.map +1 -1
  31. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js +35 -0
  32. package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js.map +1 -1
  33. package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
  34. package/dist/specification/src/ftfs/parser/model/TreeModel.js +3 -2
  35. package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
  36. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts +0 -3
  37. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts.map +1 -1
  38. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js +6 -4
  39. package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js.map +1 -1
  40. package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.d.ts +86 -0
  41. package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.d.ts.map +1 -0
  42. package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.js +139 -0
  43. package/dist/specification/src/ftfs/parser/model/actions/ActionGroupAggregation.js.map +1 -0
  44. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts +11 -52
  45. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts.map +1 -1
  46. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js +15 -81
  47. package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js.map +1 -1
  48. package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.d.ts +46 -0
  49. package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.d.ts.map +1 -0
  50. package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.js +81 -0
  51. package/dist/specification/src/ftfs/parser/model/actions/ActionsContainerAggregation.js.map +1 -0
  52. package/dist/specification/src/ftfs/parser/model/actions/index.d.ts +2 -0
  53. package/dist/specification/src/ftfs/parser/model/actions/index.d.ts.map +1 -1
  54. package/dist/specification/src/ftfs/parser/model/actions/index.js +2 -0
  55. package/dist/specification/src/ftfs/parser/model/actions/index.js.map +1 -1
  56. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +4 -0
  57. package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
  58. package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
  59. package/dist/specification/src/sync/common/generate/utils.d.ts +8 -0
  60. package/dist/specification/src/sync/common/generate/utils.d.ts.map +1 -1
  61. package/dist/specification/src/sync/common/generate/utils.js +56 -34
  62. package/dist/specification/src/sync/common/generate/utils.js.map +1 -1
  63. package/dist/specification/src/sync/common/i18n.json +1 -0
  64. package/dist/specification/src/sync/common/utils.d.ts +9 -2
  65. package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
  66. package/dist/specification/src/sync/common/utils.js +10 -0
  67. package/dist/specification/src/sync/common/utils.js.map +1 -1
  68. package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +14 -1
  69. package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -1
  70. package/dist/specification/src/sync/v2/generate/stableIdUtils.js +110 -0
  71. package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -1
  72. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.d.ts.map +1 -1
  73. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +1 -1
  74. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
  75. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +1 -0
  76. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
  77. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +4 -0
  78. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
  79. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.d.ts +32 -0
  80. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.d.ts.map +1 -0
  81. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.js +274 -0
  82. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/TableColumn.js.map +1 -0
  83. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
  84. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
  85. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
  86. package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
  87. package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
  88. package/dist/specification/src/sync/v4/application.js +4 -1
  89. package/dist/specification/src/sync/v4/application.js.map +1 -1
  90. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts +1 -0
  91. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.d.ts.map +1 -1
  92. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js +23 -4
  93. package/dist/specification/src/sync/v4/export/controls/ObjectPageTable.js.map +1 -1
  94. package/dist/specification/src/sync/v4/export/controls/Table.d.ts +14 -0
  95. package/dist/specification/src/sync/v4/export/controls/Table.d.ts.map +1 -1
  96. package/dist/specification/src/sync/v4/export/controls/Table.js +61 -8
  97. package/dist/specification/src/sync/v4/export/controls/Table.js.map +1 -1
  98. package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
  99. package/dist/specification/src/sync/v4/export/fpmCustomPage.js +141 -72
  100. package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
  101. package/dist/specification/src/sync/v4/export/utils.d.ts +12 -0
  102. package/dist/specification/src/sync/v4/export/utils.d.ts.map +1 -1
  103. package/dist/specification/src/sync/v4/export/utils.js +41 -0
  104. package/dist/specification/src/sync/v4/export/utils.js.map +1 -1
  105. package/dist/specification/src/sync/v4/generate/actions.d.ts.map +1 -1
  106. package/dist/specification/src/sync/v4/generate/actions.js.map +1 -1
  107. package/dist/specification/src/sync/v4/generate/app.d.ts.map +1 -1
  108. package/dist/specification/src/sync/v4/generate/app.js +8 -0
  109. package/dist/specification/src/sync/v4/generate/app.js.map +1 -1
  110. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
  111. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +14 -1
  112. package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
  113. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
  114. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +66 -4
  115. package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
  116. package/dist/specification/src/sync/v4/generate/list-report/listReport.d.ts.map +1 -1
  117. package/dist/specification/src/sync/v4/generate/list-report/listReport.js +19 -0
  118. package/dist/specification/src/sync/v4/generate/list-report/listReport.js.map +1 -1
  119. package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
  120. package/dist/specification/src/sync/v4/generate/objectPage.js +71 -48
  121. package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
  122. package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
  123. package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +70 -19
  124. package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
  125. package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
  126. package/dist/specification/src/sync/v4/sync-rules/App.js +6 -1
  127. package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
  128. package/dist/specification/src/sync/v4/sync-rules/index.d.ts +0 -1
  129. package/dist/specification/src/sync/v4/sync-rules/index.d.ts.map +1 -1
  130. package/dist/specification/src/sync/v4/sync-rules/index.js +0 -1
  131. package/dist/specification/src/sync/v4/sync-rules/index.js.map +1 -1
  132. package/dist/specification/src/sync/v4/utils/utils.d.ts +12 -1
  133. package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
  134. package/dist/specification/src/sync/v4/utils/utils.js +33 -1
  135. package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
  136. package/dist/types/src/common/types.d.ts +3 -1
  137. package/dist/types/src/common/types.d.ts.map +1 -1
  138. package/dist/types/src/common/types.js +2 -0
  139. package/dist/types/src/common/types.js.map +1 -1
  140. package/dist/types/src/v4/controls/ObjectPageTable.d.ts +4 -0
  141. package/dist/types/src/v4/controls/ObjectPageTable.d.ts.map +1 -1
  142. package/dist/types/src/v4/controls/Table.d.ts +8 -0
  143. package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
  144. package/package.json +6 -6
  145. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts +0 -2
  146. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +0 -1
  147. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +0 -3
  148. package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +0 -1
@@ -53,6 +53,7 @@ const ObjectPageCustomSection_1 = require("../export/controls/ObjectPageCustomSe
53
53
  const Decorator_1 = require("../../common/decoration/Decorator");
54
54
  const ObjectPageTable_1 = require("../export/controls/ObjectPageTable");
55
55
  const AppSchema_1 = require("../sync-rules/AppSchema");
56
+ const sync_rules_1 = require("../sync-rules");
56
57
  const ROOT_PROPERTIES_ORDER = ['header', 'layout', 'sections', 'footer'];
57
58
  const CRITICAL_ACTION_TYPES = [
58
59
  'UI.CriticalityType/Positive',
@@ -474,14 +475,15 @@ function addTableDefinition({ tableType, facetKey, facet, appSchema, lineItemId,
474
475
  /**
475
476
  * Object Page specific enhancements to handleFormIdentification.
476
477
  *
477
- * @param appSchema - app schema of the object page
478
+ * @param context - decorator context containing schema and app
478
479
  * @param v4Page - current page in manifest
479
480
  * @param formItemId - identifier of the current form in schema
480
481
  * @param facetIdInManifest - identifier of the current object page section in manifest
481
482
  * @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
482
483
  * @returns Schema ID for actions definition.
483
484
  */
484
- function addFormCustomActionsOP(appSchema, v4Page, formItemId, facetIdInManifest, generateParameters) {
485
+ function addFormCustomActionsOP(context, v4Page, formItemId, facetIdInManifest, generateParameters) {
486
+ const appSchema = context.schema.get();
485
487
  const customActionDefinitionKey = `${ux_specification_types_1.DefinitionName.CustomFormActionOP}<${formItemId}>`;
486
488
  const customActionDefinition = appSchema.definitions[customActionDefinitionKey];
487
489
  customActionDefinition[ux_specification_types_1.SchemaTag.isViewNode] = true;
@@ -528,14 +530,15 @@ function extractNavigationPath(lineItemId) {
528
530
  * @param {GenerateAppSchemaParameters} generateParameters - Parameters required for generating the application schema.
529
531
  * @param {FacetConfig} facet - The facet configuration object defining the current facet.
530
532
  * @param {string} facetKey - The unique key associated with the facet.
531
- * @param {Definition} appSchema - The application schema to be updated with line item definitions.
533
+ * @param {DecoratorContext} context - The decorator context containing schema and app.
532
534
  * @param {FacetConfig} lineItemFacet - The configuration of the line item facet being processed.
533
535
  * @param {ConvertedMetadata} oDataServiceAVT - Metadata converted from OData service annotations (AVT).
534
536
  * @param {v4.SapUiAppPageV4} v4Page - The V4 application page object.
535
537
  * @param {ExtensionLogger} logger - Logger instance for capturing warnings and diagnostic messages.
536
538
  * @param {boolean} [isCollection] - Indicates if the facet represents a collection of entities.
537
539
  */
538
- function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItemFacet, oDataServiceAVT, v4Page, logger, isCollection) {
540
+ function handleLineItem(generateParameters, facet, facetKey, context, lineItemFacet, oDataServiceAVT, v4Page, logger, isCollection) {
541
+ const appSchema = context.schema.get();
539
542
  const lineItemId = (0, common_1.getFacetKeyInSchema)(facetKey);
540
543
  addTableDefinition({
541
544
  tableType: ux_specification_types_1.DefinitionName.ObjectPageTable,
@@ -577,6 +580,8 @@ function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItem
577
580
  }
578
581
  // Populate the set of fields and field groups for the creationFields property definition
579
582
  (0, utils_1.addOneOfForCreationFields)(appSchema, lineItemFacet.entityType, ux_specification_types_1.DefinitionName.TableCreationModeOP, lineItemId);
583
+ // This creates section-specific personalization definitions for Object Page tables with multiple sections
584
+ const personalizationDefinitionKey = (0, utils_1.initializePersonalizationSchema)(appSchema, ux_specification_types_1.DefinitionName.PersonalizationTypeOP, lineItemId, ux_specification_types_1.DefinitionName.ObjectPageTable);
580
585
  // Get table settings from manifest for decorator context
581
586
  const tableSettings = v4Page?.options?.settings?.controlConfiguration?.[facetKey.replace('::', '/')]?.tableSettings;
582
587
  // Check if navigation is defined to determine default creation mode
@@ -593,6 +598,7 @@ function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItem
593
598
  popinLayout: tableSettings?.popinLayout,
594
599
  analyticalConfiguration: tableSettings?.analyticalConfiguration,
595
600
  creationMode: tableSettings?.creationMode,
601
+ personalization: tableSettings?.personalization,
596
602
  hasNavigation,
597
603
  isInsertable,
598
604
  isCollection
@@ -606,6 +612,11 @@ function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItem
606
612
  const context = { schema: new AppSchema_1.AppSchema(appSchema) };
607
613
  new Decorator_1.Decorator(context).init(ObjectPageTable_1.TableCreationModeOP, decoratorContext, creationModeDefinition);
608
614
  }
615
+ const personalizationDefinition = appSchema.definitions[personalizationDefinitionKey];
616
+ if (personalizationDefinition) {
617
+ // Apply decorators to PersonalizationType definition
618
+ new Decorator_1.Decorator(context).init(v4controls.PersonalizationTypeOP, decoratorContext, personalizationDefinition);
619
+ }
609
620
  // Apply decorators to table definition properties (creationMode, rowCountMode, rowCount, popinLayout, analyticalConfiguration)
610
621
  const opTableDefinitionKey = `${ux_specification_types_1.DefinitionName.ObjectPageTable}<${lineItemId}>`;
611
622
  const opTableDefinition = appSchema.definitions[opTableDefinitionKey];
@@ -623,7 +634,7 @@ function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItem
623
634
  *
624
635
  * @param facet - The facet configuration object containing details for the section.
625
636
  * @param facetKey - The unique key for identifying the facet in the schema.
626
- * @param appSchema - The overall application schema where the section table is defined.
637
+ * @param context - decorator context containing schema and app
627
638
  * @param lineItemFacet - The facet configuration specific to line item processing.
628
639
  * @param generateParameters - Parameters required for generating the application schema.
629
640
  * @param v4Page - The OData V4 page object containing details about the target application page.
@@ -631,7 +642,8 @@ function handleLineItem(generateParameters, facet, facetKey, appSchema, lineItem
631
642
  * @param isCollection - Indicates if the table is in a collection section.
632
643
  * @returns The updated definition of the section table included or modified in the application schema.
633
644
  */
634
- function handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateParameters, v4Page, sections, isCollection) {
645
+ function handleSectionTable(facet, facetKey, context, lineItemFacet, generateParameters, v4Page, sections, isCollection) {
646
+ const appSchema = context.schema.get();
635
647
  if (sections) {
636
648
  addPropertyRef(sections, facetKey, ux_specification_types_1.DefinitionName.ObjectPageSectionTableV4);
637
649
  }
@@ -656,7 +668,7 @@ function handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateP
656
668
  const definition = tableProperty.$ref.split('/').pop();
657
669
  tableProperty.$ref = (0, common_1.getFacetDefinitionLink)(definition, facetKey);
658
670
  }
659
- handleLineItem(generateParameters, facet, facetKey, appSchema, lineItemFacet, generateParameters.serviceAVT, v4Page, generateParameters.logger, isCollection);
671
+ handleLineItem(generateParameters, facet, facetKey, context, lineItemFacet, generateParameters.serviceAVT, v4Page, generateParameters.logger, isCollection);
660
672
  return sectionTable;
661
673
  }
662
674
  /**
@@ -666,11 +678,12 @@ function handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateP
666
678
  * @param {v4.SapUiAppPageV4} v4Page Current page in manifest
667
679
  * @param {string} facetKey - facet key
668
680
  * @param {object} sections - schema of current sections definition
669
- * @param {object} appSchema - app specific schema of the object page that gets enhanced
681
+ * @param {DecoratorContext} context - decorator context containing schema and app
670
682
  * @param {SectionType} sectionPrefix - prefix to distinguish Section and HeaderSection
671
683
  * @param {GenerateAppSchemaParameters} generateParameters - list of API input parameters
672
684
  */
673
- function handleFormIdentification(facet, v4Page, facetKey, sections, appSchema, sectionPrefix, generateParameters) {
685
+ function handleFormIdentification(facet, v4Page, facetKey, sections, context, sectionPrefix, generateParameters) {
686
+ const appSchema = context.schema.get();
674
687
  let definitionType;
675
688
  if (sectionPrefix === ux_specification_types_1.SectionType.Section) {
676
689
  definitionType = ux_specification_types_1.DefinitionName.ObjectPageSectionForm;
@@ -694,7 +707,7 @@ function handleFormIdentification(facet, v4Page, facetKey, sections, appSchema,
694
707
  const formItemId = (0, common_1.getFacetKeyInSchema)(facetKey);
695
708
  if (facet.base === ux_specification_types_1.FacetBase.Form) {
696
709
  (0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.CustomFormActionOP, targetId, appSchema);
697
- const schemaIdForActions = addFormCustomActionsOP(appSchema, v4Page, targetId, formItemId, generateParameters);
710
+ const schemaIdForActions = addFormCustomActionsOP(context, v4Page, targetId, formItemId, generateParameters);
698
711
  addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, schemaIdForActions, generateParameters, facetKey);
699
712
  }
700
713
  // Add custom fields
@@ -727,7 +740,7 @@ function handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinition
727
740
  *
728
741
  * @param {FacetConfig | Chart | object} facet - current facet.
729
742
  * @param {string} facetKey - facet key.
730
- * @param {object} appSchema - app specific schema of the object page that gets enhanced.
743
+ * @param {Definition} appSchema - app specific schema of the object page that gets enhanced.
731
744
  * @param {EntityType} entityType - current entity type
732
745
  * @returns {Definition} - the new chart definition
733
746
  */
@@ -762,11 +775,12 @@ function handleChartActions(facet, facetKey, appSchema, entityType) {
762
775
  *
763
776
  * @param facet - current facet.
764
777
  * @param facetKey - facet key.
765
- * @param appSchema - app specific schema of the object page that gets enhanced.
778
+ * @param context - decorator context containing schema and app
766
779
  * @param entityType - current entity type
767
780
  * @returns - the new chart definition
768
781
  */
769
- function handleChart(facet, facetKey, appSchema, entityType) {
782
+ function handleChart(facet, facetKey, context, entityType) {
783
+ const appSchema = context.schema.get();
770
784
  const chart = (0, common_1.parseSchemaDefinition)(ux_specification_types_1.DefinitionName.ObjectPageChart, facetKey, appSchema);
771
785
  if (facet['Title']) {
772
786
  chart.description = facet['Title'];
@@ -785,14 +799,15 @@ function handleChart(facet, facetKey, appSchema, entityType) {
785
799
  *
786
800
  * @param {FacetConfig} facet - current facet.
787
801
  * @param {string} facetKey - facet key.
788
- * @param {object} appSchema - app specific schema of the object page that gets enhanced.
802
+ * @param {DecoratorContext} context - decorator context containing schema and app
789
803
  * @param {object} sections - schema of current sections definition.
790
804
  * @param {EntityType} entityType - current entity type
791
805
  * @param {boolean} isPVHeaderFacet - whether the facet is a Presentation Variant header facet
792
806
  * @param namespace - the namespace of the facet
793
807
  * @returns - the new chart definition
794
808
  */
795
- function handleSectionChart(facet, facetKey, appSchema, sections, entityType = facet.entityType, isPVHeaderFacet = false, namespace) {
809
+ function handleSectionChart(facet, facetKey, context, sections, entityType = facet.entityType, isPVHeaderFacet = false, namespace) {
810
+ const appSchema = context.schema.get();
796
811
  const definition = isPVHeaderFacet
797
812
  ? ux_specification_types_1.DefinitionName.CommonHeaderFacetSettings
798
813
  : ux_specification_types_1.DefinitionName.ObjectPageSectionChart;
@@ -812,7 +827,7 @@ function handleSectionChart(facet, facetKey, appSchema, sections, entityType = f
812
827
  }
813
828
  parentChartRef[ux_specification_types_1.SchemaTag.annotationPath] = (0, common_1.getFacetAnnotationPath)(facet);
814
829
  parentChartRef.properties.chart['$ref'] = (0, common_1.getFacetDefinitionLink)(ux_specification_types_1.DefinitionName.ObjectPageChart, facetKey);
815
- const { chart, chartActions } = handleChart(facet.target || facet, facetKey, appSchema, entityType);
830
+ const { chart, chartActions } = handleChart(facet.target || facet, facetKey, context, entityType);
816
831
  chart[ux_specification_types_1.SchemaTag.target] = namespace;
817
832
  return { parentChartRef, chart, chartActions };
818
833
  }
@@ -897,16 +912,16 @@ function getSectionPropertyRef(facetKey, props) {
897
912
  *
898
913
  * @param facet - the given facet from the UI annotations
899
914
  * @param facetKey - key of the facet, as used in annotation
900
- * @param appSchema - app schema of the object page
915
+ * @param context - decorator context containing schema and app
901
916
  * @param sections - schema of current sections definition.
902
917
  * @param props - visualization properties
903
918
  * @param generateParameters - list of API input parameters
904
919
  * @param v4Page Current page in manifest
905
920
  */
906
- function addPVLineItemSection(facet, facetKey, appSchema, sections, props, generateParameters, v4Page) {
921
+ function addPVLineItemSection(facet, facetKey, context, sections, props, generateParameters, v4Page) {
907
922
  const { propertyKey, navigationKey } = getSectionPropertyRef(facetKey, props);
908
923
  addPropertyRef(sections, propertyKey, ux_specification_types_1.DefinitionName.ObjectPageSectionTableV4, navigationKey);
909
- const sectionTable = handleSectionTable(facet, navigationKey, appSchema, {
924
+ const sectionTable = handleSectionTable(facet, navigationKey, context, {
910
925
  target: props.target,
911
926
  entityType: facet.entityType,
912
927
  annotationPath: `/${props.namespace}/${props.key}`,
@@ -921,18 +936,18 @@ function addPVLineItemSection(facet, facetKey, appSchema, sections, props, gener
921
936
  *
922
937
  * @param {FacetConfig} facet - the given facet from the UI annotations
923
938
  * @param {string} facetKey - key of the facet, as used in annotation
924
- * @param {Definition} appSchema - app schema of the object page
939
+ * @param {DecoratorContext} context - decorator context containing schema and app
925
940
  * @param {object} sections - schema of current sections definition.
926
941
  * @param {VisualizationProps} props - visualization properties
927
942
  * @param {boolean} isPVHeaderFacet - flag to determine if the facet is a header facet
928
943
  */
929
- function addPVChartSection(facet, facetKey, appSchema, sections, props, isPVHeaderFacet = false) {
944
+ function addPVChartSection(facet, facetKey, context, sections, props, isPVHeaderFacet = false) {
930
945
  const definition = isPVHeaderFacet
931
946
  ? ux_specification_types_1.DefinitionName.ObjectPageHeaderSectionChart
932
947
  : ux_specification_types_1.DefinitionName.ObjectPageSectionChart;
933
948
  const { propertyKey, navigationKey } = getSectionPropertyRef(facetKey, props);
934
949
  addPropertyRef(sections, propertyKey, definition, navigationKey);
935
- const { parentChartRef } = handleSectionChart(props.target, navigationKey, appSchema, undefined, facet.entityType, isPVHeaderFacet, props.namespace);
950
+ const { parentChartRef } = handleSectionChart(props.target, navigationKey, context, undefined, facet.entityType, isPVHeaderFacet, props.namespace);
936
951
  parentChartRef[ux_specification_types_1.SchemaTag.annotationPath] = facet.annotationPath;
937
952
  // If no header facet ID exists, remove properties as it is requirement for export to manifest.json
938
953
  if (!facet?.['ID']) {
@@ -952,13 +967,13 @@ function addPVChartSection(facet, facetKey, appSchema, sections, props, isPVHead
952
967
  *
953
968
  * @param facet - the given facet from the UI annotations
954
969
  * @param facetKey - key of the facet, as used in annotation
955
- * @param appSchema - app schema of the object page
970
+ * @param context - decorator context containing schema and app
956
971
  * @param sections - schema of current sections definition.
957
972
  * @param sectionPrefix - prefix to distinguish Section and HeaderSection
958
973
  * @param generateParameters - list of API input parameters
959
974
  * @param v4Page Current page in manifest
960
975
  */
961
- function handleSectionPresentationVariant(facet, facetKey, appSchema, sections, sectionPrefix, generateParameters, v4Page) {
976
+ function handleSectionPresentationVariant(facet, facetKey, context, sections, sectionPrefix, generateParameters, v4Page) {
962
977
  if (!facet?.target) {
963
978
  (0, extensionLogger_1.log)(generateParameters.logger, {
964
979
  severity: "error" /* LogSeverity.Error */,
@@ -973,10 +988,10 @@ function handleSectionPresentationVariant(facet, facetKey, appSchema, sections,
973
988
  return;
974
989
  }
975
990
  if (visualizationProps.type.startsWith(ux_specification_types_1.Visualization.Chart)) {
976
- addPVChartSection(facet, facetKey, appSchema, sections, visualizationProps, isPVHeaderFacet);
991
+ addPVChartSection(facet, facetKey, context, sections, visualizationProps, isPVHeaderFacet);
977
992
  }
978
993
  else if (visualizationProps.type.startsWith(ux_specification_types_1.Visualization.LineItem)) {
979
- addPVLineItemSection(facet, facetKey, appSchema, sections, visualizationProps, generateParameters, v4Page);
994
+ addPVLineItemSection(facet, facetKey, context, sections, visualizationProps, generateParameters, v4Page);
980
995
  }
981
996
  }
982
997
  /**
@@ -1140,15 +1155,16 @@ function applyCustomSections(sections, appSchema, generateParameters, v4Page, cu
1140
1155
  *
1141
1156
  * @param facet - the given facet from the UI annotations
1142
1157
  * @param facetKey - key of the facet, as used in annotation
1143
- * @param appSchema - app schema of the object page
1158
+ * @param context - decorator context containing schema and app
1144
1159
  * @param sections - schema of current sections definition.
1145
1160
  * @param sectionPrefix - prefix to distinguish Section and HeaderSection
1146
1161
  * @param generateParameters - list of API input parameters
1147
1162
  * @param v4Page Current page in manifest
1148
1163
  * @param level Collection level in tree
1149
1164
  */
1150
- function handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, generateParameters, v4Page, level) {
1165
+ function handleCollection(facet, facetKey, context, sections, sectionPrefix, generateParameters, v4Page, level) {
1151
1166
  const isCustomSubSectionsSupported = level === 0;
1167
+ const appSchema = context.schema.get();
1152
1168
  const collectionFacet = (sections.properties[facetKey] = (0, common_1.createDefaultSection)(appSchema, facet, facetKey));
1153
1169
  const subsections = {
1154
1170
  // Custom subsections are allowed on first level of subsections
@@ -1171,7 +1187,7 @@ function handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, g
1171
1187
  subsections[ux_specification_types_1.SchemaTag.isViewNode] = true;
1172
1188
  const nextLevel = level + 1;
1173
1189
  for (const key in facet.facets) {
1174
- addSection(generateParameters, facet.facets, key, subsections, appSchema, sectionPrefix, v4Page, nextLevel);
1190
+ addSection(generateParameters, facet.facets, key, subsections, context, sectionPrefix, v4Page, nextLevel);
1175
1191
  }
1176
1192
  if (isCustomSubSectionsSupported) {
1177
1193
  applyCustomSections(subsections, appSchema, generateParameters, v4Page, ux_specification_types_1.DefinitionName.ObjectPageCustomSectionFragment, facet, facetKey);
@@ -1184,34 +1200,35 @@ function handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, g
1184
1200
  * @param facets - list of all facets
1185
1201
  * @param facetKey - facet key
1186
1202
  * @param sections - schema of current sections definition
1187
- * @param appSchema - app specific schema of the object page that gets enhanced.
1203
+ * @param context - decorator context containing schema and app
1188
1204
  * @param sectionPrefix - prefix to distinguish Section and HeaderSection
1189
1205
  * @param v4Page Current page in manifest
1190
1206
  * @param [level] Section level in tree
1191
1207
  */
1192
- function addSection(generateParameters, facets, facetKey, sections, appSchema, sectionPrefix, v4Page, level = 0) {
1208
+ function addSection(generateParameters, facets, facetKey, sections, context, sectionPrefix, v4Page, level = 0) {
1209
+ const appSchema = context.schema.get();
1193
1210
  const facet = facets[facetKey];
1194
1211
  const facetDefinitionKey = `ObjectPage${sectionPrefix}${facet.base}<${(0, common_1.getFacetKeyInSchema)(facetKey)}>`;
1195
1212
  switch (facet.base) {
1196
1213
  case ux_specification_types_1.FacetBase.PresentationVariant:
1197
1214
  case ux_specification_types_1.FacetBase.SelectionPresentationVariant: {
1198
- handleSectionPresentationVariant(facet, facetKey, appSchema, sections, sectionPrefix, generateParameters, v4Page);
1215
+ handleSectionPresentationVariant(facet, facetKey, context, sections, sectionPrefix, generateParameters, v4Page);
1199
1216
  break;
1200
1217
  }
1201
1218
  case ux_specification_types_1.FacetBase.CollectionFacet: {
1202
- handleCollection(facet, facetKey, appSchema, sections, sectionPrefix, generateParameters, v4Page, level);
1219
+ handleCollection(facet, facetKey, context, sections, sectionPrefix, generateParameters, v4Page, level);
1203
1220
  break;
1204
1221
  }
1205
1222
  case ux_specification_types_1.FacetBase.LineItem: {
1206
1223
  if (sectionPrefix !== ux_specification_types_1.SectionType.HeaderSection) {
1207
1224
  const lineItemFacet = facets[facetKey];
1208
- handleSectionTable(facet, facetKey, appSchema, lineItemFacet, generateParameters, v4Page, sections, level > 0 ? true : false);
1225
+ handleSectionTable(facet, facetKey, context, lineItemFacet, generateParameters, v4Page, sections, level > 0 ? true : false);
1209
1226
  }
1210
1227
  break;
1211
1228
  }
1212
1229
  case ux_specification_types_1.FacetBase.Form:
1213
1230
  case ux_specification_types_1.FacetBase.Identification: {
1214
- handleFormIdentification(facet, v4Page, facetKey, sections, appSchema, sectionPrefix, generateParameters);
1231
+ handleFormIdentification(facet, v4Page, facetKey, sections, context, sectionPrefix, generateParameters);
1215
1232
  break;
1216
1233
  }
1217
1234
  case ux_specification_types_1.FacetBase.DataPoint: {
@@ -1223,7 +1240,7 @@ function addSection(generateParameters, facets, facetKey, sections, appSchema, s
1223
1240
  handleHeaderFacet(facet, facetKey, sections, appSchema, facetDefinitionKey);
1224
1241
  }
1225
1242
  else if (sectionPrefix === ux_specification_types_1.SectionType.Section) {
1226
- handleSectionChart(facet, facetKey, appSchema, sections);
1243
+ handleSectionChart(facet, facetKey, context, sections);
1227
1244
  }
1228
1245
  break;
1229
1246
  }
@@ -1241,10 +1258,11 @@ function addSection(generateParameters, facets, facetKey, sections, appSchema, s
1241
1258
  * Derives the sections from the UI.Facets annotation and adds them to the schema.
1242
1259
  *
1243
1260
  * @param generateParameters - list of API input parameters
1244
- * @param appSchema - application specific JSON schema of the object page
1261
+ * @param context - decorator context containing schema and app
1245
1262
  * @param v4Page - current page
1246
1263
  */
1247
- function addSections(generateParameters, appSchema, v4Page) {
1264
+ function addSections(generateParameters, context, v4Page) {
1265
+ const appSchema = context.schema.get();
1248
1266
  // Get facet annotations
1249
1267
  const facets = (0, common_1.getObjectPageFacets)(generateParameters.entityType, generateParameters.serviceAVT, ux_specification_types_1.FioriElementsVersion.v4, generateParameters.logger);
1250
1268
  if (!facets) {
@@ -1253,7 +1271,7 @@ function addSections(generateParameters, appSchema, v4Page) {
1253
1271
  }
1254
1272
  const sections = appSchema.definitions[ux_specification_types_1.DefinitionName.Sections];
1255
1273
  for (const facetKey in facets) {
1256
- addSection(generateParameters, facets, facetKey, sections, appSchema, ux_specification_types_1.SectionType.Section, v4Page);
1274
+ addSection(generateParameters, facets, facetKey, sections, context, ux_specification_types_1.SectionType.Section, v4Page);
1257
1275
  }
1258
1276
  // add custom sections
1259
1277
  applyCustomSections(sections, appSchema, generateParameters, v4Page, ux_specification_types_1.DefinitionName.ObjectPageCustomSectionFragment);
@@ -1263,11 +1281,12 @@ function addSections(generateParameters, appSchema, v4Page) {
1263
1281
  * Derives the header sections from the UI.HeaderFacets annotation and adds them to the schema.
1264
1282
  *
1265
1283
  * @param generateParameters - list of API input parameters
1266
- * @param appSchema - application specific JSON schema of the object page
1284
+ * @param context - decorator context containing schema and app
1267
1285
  * @param entityType - current entity type
1268
1286
  * @param v4Page - current page in manifest
1269
1287
  */
1270
- function addHeaderSections(generateParameters, appSchema, entityType, v4Page) {
1288
+ function addHeaderSections(generateParameters, context, entityType, v4Page) {
1289
+ const appSchema = context.schema.get();
1271
1290
  // Get facet annotations
1272
1291
  const facets = (0, common_1.getObjectPageHeaderFacets)(entityType, generateParameters.serviceAVT, ux_specification_types_1.FioriElementsVersion.v4, generateParameters.logger);
1273
1292
  const sections = appSchema.definitions[ux_specification_types_1.DefinitionName.HeaderSections];
@@ -1278,7 +1297,7 @@ function addHeaderSections(generateParameters, appSchema, entityType, v4Page) {
1278
1297
  }
1279
1298
  // add annotation header sections
1280
1299
  for (const facetKey in facets) {
1281
- addSection(generateParameters, facets, facetKey, sections, appSchema, ux_specification_types_1.SectionType.HeaderSection, v4Page);
1300
+ addSection(generateParameters, facets, facetKey, sections, context, ux_specification_types_1.SectionType.HeaderSection, v4Page);
1282
1301
  }
1283
1302
  // add custom header sections
1284
1303
  applyCustomSections(sections, appSchema, generateParameters, v4Page, ux_specification_types_1.DefinitionName.ObjectPageCustomHeaderSectionFragment);
@@ -1293,11 +1312,12 @@ function addHeaderSections(generateParameters, appSchema, entityType, v4Page) {
1293
1312
  * Add Object Page Header to app-specific schema.
1294
1313
  *
1295
1314
  * @param generateParameters - list of API input parameters
1296
- * @param appSchema Schema of the object page
1315
+ * @param context - decorator context containing schema and app
1297
1316
  * @param v4Page - current page in manifest
1298
1317
  */
1299
- function addHeader(generateParameters, appSchema, v4Page) {
1318
+ function addHeader(generateParameters, context, v4Page) {
1300
1319
  const entityType = generateParameters.entityType;
1320
+ const appSchema = context.schema.get();
1301
1321
  (0, common_1.addCommonHeaderSchema)(appSchema, entityType);
1302
1322
  // Add header actions
1303
1323
  (0, common_1.addHeaderActions)(appSchema, entityType, generateParameters, addHeaderActionCallBackV4, v4Page);
@@ -1307,7 +1327,7 @@ function addHeader(generateParameters, appSchema, v4Page) {
1307
1327
  appSchema.definitions[ux_specification_types_1.DefinitionName.HeaderSections][ux_specification_types_1.SchemaTag.annotationPath] =
1308
1328
  `/${entityType.fullyQualifiedName}/@${"com.sap.vocabularies.UI.v1.HeaderFacets" /* UIAnnotationTerms.HeaderFacets */}`;
1309
1329
  }
1310
- addHeaderSections(generateParameters, appSchema, entityType, v4Page);
1330
+ addHeaderSections(generateParameters, context, entityType, v4Page);
1311
1331
  addManifestPathsToDefinitionPropertiesOP(appSchema, v4Page.id, ux_specification_types_1.DefinitionName.HeaderSections, generateParameters);
1312
1332
  }
1313
1333
  /**
@@ -1378,7 +1398,10 @@ function addManifestPathsToStaticNodes(appSchema, pathParams) {
1378
1398
  * @returns the app specific JSON schema
1379
1399
  */
1380
1400
  function generateObjectPageSchemaV4(generateParameters, genericSchema, contextPath, genericMacrosSchema) {
1381
- const appSchema = JSON.parse(JSON.stringify(genericSchema));
1401
+ const schema = JSON.parse(JSON.stringify(genericSchema));
1402
+ const app = (0, sync_rules_1.createApp)(generateParameters.manifest, generateParameters.serviceAVT, generateParameters.logger);
1403
+ const context = { schema: new AppSchema_1.AppSchema(schema), app };
1404
+ const appSchema = context.schema.get();
1382
1405
  // Change reference to generated sections
1383
1406
  appSchema.properties.sections = {
1384
1407
  $ref: `${common_1.DEFINITION_LINK_PREFIX}${ux_specification_types_1.DefinitionName.Sections}`
@@ -1421,7 +1444,7 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, contextPa
1421
1444
  return appSchema;
1422
1445
  }
1423
1446
  // Add Header
1424
- addHeader(generateParameters, appSchema, v4Page);
1447
+ addHeader(generateParameters, context, v4Page);
1425
1448
  // Add sections
1426
1449
  sections[ux_specification_types_1.SchemaTag.isViewNode] = true;
1427
1450
  if (generateParameters.entityType) {
@@ -1443,7 +1466,7 @@ function generateObjectPageSchemaV4(generateParameters, genericSchema, contextPa
1443
1466
  });
1444
1467
  }
1445
1468
  }
1446
- addSections(generateParameters, appSchema, v4Page);
1469
+ addSections(generateParameters, context, v4Page);
1447
1470
  // Add Footer (actions only)
1448
1471
  addFooter(generateParameters, appSchema, v4Page);
1449
1472
  // Add "manifestPath" on root.page level properties