@sap/ux-specification 1.139.1 → 1.139.4
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 +47 -1
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/documentation/v4/v4-ApplicationV4.html +2 -2
- package/dist/documentation/v4/v4-BuildingBlocks.html +2 -2
- package/dist/documentation/v4/v4-FreestylePage.html +2 -2
- package/dist/documentation/v4/v4-ListReport.html +2 -2
- package/dist/documentation/v4/v4-ObjectPage.html +2 -2
- package/dist/index-min.js +249 -246
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +79 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +260 -39
- package/dist/schemas/v4/ListReportConfig.json +9 -153
- package/dist/schemas/v4/ObjectPageConfig.json +3 -135
- package/dist/specification/package.json +9 -8
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +2 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.js +2 -2
- package/dist/specification/src/ftfs/ftfs.d.ts +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +38 -5
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/parser/annotations.d.ts +9 -0
- package/dist/specification/src/ftfs/parser/annotations.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/annotations.js +13 -0
- package/dist/specification/src/ftfs/parser/annotations.js.map +1 -0
- package/dist/specification/src/ftfs/parser/index.d.ts +15 -0
- package/dist/specification/src/ftfs/parser/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/index.js +35 -0
- package/dist/specification/src/ftfs/parser/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/AggregationValidator.d.ts +65 -0
- package/dist/specification/src/ftfs/parser/model/AggregationValidator.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/AggregationValidator.js +209 -0
- package/dist/specification/src/ftfs/parser/model/AggregationValidator.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/ArrayAggregation.d.ts +49 -0
- package/dist/specification/src/ftfs/parser/model/ArrayAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/ArrayAggregation.js +122 -0
- package/dist/specification/src/ftfs/parser/model/ArrayAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/NodeProperty.d.ts +38 -0
- package/dist/specification/src/ftfs/parser/model/NodeProperty.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/NodeProperty.js +25 -0
- package/dist/specification/src/ftfs/parser/model/NodeProperty.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts +339 -0
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js +682 -0
- package/dist/specification/src/ftfs/parser/model/ObjectAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/RootAggregation.d.ts +24 -0
- package/dist/specification/src/ftfs/parser/model/RootAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/RootAggregation.js +57 -0
- package/dist/specification/src/ftfs/parser/model/RootAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts +224 -0
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/TreeModel.js +947 -0
- package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts +34 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js +94 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts +67 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js +113 -0
- package/dist/specification/src/ftfs/parser/model/actions/ActionsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.d.ts +3 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.js +19 -0
- package/dist/specification/src/ftfs/parser/model/actions/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.d.ts +17 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.js +29 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.d.ts +46 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.js +66 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/AdditionalObjectsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/index.d.ts +3 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/index.js +19 -0
- package/dist/specification/src/ftfs/parser/model/additionalObjects/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.d.ts +21 -0
- package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.js +30 -0
- package/dist/specification/src/ftfs/parser/model/chart/ChartAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/chart/index.d.ts +2 -0
- package/dist/specification/src/ftfs/parser/model/chart/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/chart/index.js +18 -0
- package/dist/specification/src/ftfs/parser/model/chart/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.d.ts +9 -0
- package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.js +16 -0
- package/dist/specification/src/ftfs/parser/model/fields/ConnectedFieldsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.d.ts +25 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.js +45 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.d.ts +22 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.js +37 -0
- package/dist/specification/src/ftfs/parser/model/fields/FieldsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/index.d.ts +4 -0
- package/dist/specification/src/ftfs/parser/model/fields/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/fields/index.js +20 -0
- package/dist/specification/src/ftfs/parser/model/fields/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.d.ts +39 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.js +97 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.d.ts +36 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.js +59 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/FilterFieldsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/index.d.ts +3 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/index.js +19 -0
- package/dist/specification/src/ftfs/parser/model/filter-fields/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/index.d.ts +19 -0
- package/dist/specification/src/ftfs/parser/model/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/index.js +35 -0
- package/dist/specification/src/ftfs/parser/model/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.d.ts +29 -0
- package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.js +50 -0
- package/dist/specification/src/ftfs/parser/model/macros/MacrosRoot.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/macros/index.d.ts +2 -0
- package/dist/specification/src/ftfs/parser/model/macros/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/macros/index.js +18 -0
- package/dist/specification/src/ftfs/parser/model/macros/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.d.ts +31 -0
- package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.js +82 -0
- package/dist/specification/src/ftfs/parser/model/sections/HeaderSectionsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.d.ts +78 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.js +126 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.d.ts +135 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.js +402 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.d.ts +50 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.js +120 -0
- package/dist/specification/src/ftfs/parser/model/sections/SectionsObjectAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.d.ts +39 -0
- package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.js +70 -0
- package/dist/specification/src/ftfs/parser/model/sections/SubSectionsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/index.d.ts +6 -0
- package/dist/specification/src/ftfs/parser/model/sections/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/sections/index.js +22 -0
- package/dist/specification/src/ftfs/parser/model/sections/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.d.ts +89 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.js +175 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.d.ts +113 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.js +290 -0
- package/dist/specification/src/ftfs/parser/model/table/ColumnsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/TableAggregation.d.ts +13 -0
- package/dist/specification/src/ftfs/parser/model/table/TableAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/TableAggregation.js +21 -0
- package/dist/specification/src/ftfs/parser/model/table/TableAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.d.ts +15 -0
- package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.js +22 -0
- package/dist/specification/src/ftfs/parser/model/table/ToolbarAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/index.d.ts +5 -0
- package/dist/specification/src/ftfs/parser/model/table/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/index.js +21 -0
- package/dist/specification/src/ftfs/parser/model/table/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/utils.d.ts +12 -0
- package/dist/specification/src/ftfs/parser/model/table/utils.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/table/utils.js +44 -0
- package/dist/specification/src/ftfs/parser/model/table/utils.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/types/annotations.d.ts +63 -0
- package/dist/specification/src/ftfs/parser/model/types/annotations.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/types/annotations.js +29 -0
- package/dist/specification/src/ftfs/parser/model/types/annotations.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/types/common.d.ts +13 -0
- package/dist/specification/src/ftfs/parser/model/types/common.d.ts.map +1 -0
- package/dist/{types/src/v4/controls/Action.js → specification/src/ftfs/parser/model/types/common.js} +1 -1
- package/dist/specification/src/ftfs/parser/model/types/common.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/types/index.d.ts +219 -0
- package/dist/specification/src/ftfs/parser/model/types/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/types/index.js +156 -0
- package/dist/specification/src/ftfs/parser/model/types/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/annotations.d.ts +38 -0
- package/dist/specification/src/ftfs/parser/model/utils/annotations.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/annotations.js +120 -0
- package/dist/specification/src/ftfs/parser/model/utils/annotations.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/i18n.d.ts +33 -0
- package/dist/specification/src/ftfs/parser/model/utils/i18n.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/i18n.js +69 -0
- package/dist/specification/src/ftfs/parser/model/utils/i18n.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/index.d.ts +6 -0
- package/dist/specification/src/ftfs/parser/model/utils/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/index.js +22 -0
- package/dist/specification/src/ftfs/parser/model/utils/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/object.d.ts +25 -0
- package/dist/specification/src/ftfs/parser/model/utils/object.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/object.js +68 -0
- package/dist/specification/src/ftfs/parser/model/utils/object.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/sort.d.ts +31 -0
- package/dist/specification/src/ftfs/parser/model/utils/sort.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/sort.js +18 -0
- package/dist/specification/src/ftfs/parser/model/utils/sort.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/utils.d.ts +95 -0
- package/dist/specification/src/ftfs/parser/model/utils/utils.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/utils/utils.js +267 -0
- package/dist/specification/src/ftfs/parser/model/utils/utils.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.d.ts +62 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.js +111 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.d.ts +54 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.js +144 -0
- package/dist/specification/src/ftfs/parser/model/views/ViewsAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/views/index.d.ts +3 -0
- package/dist/specification/src/ftfs/parser/model/views/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/views/index.js +19 -0
- package/dist/specification/src/ftfs/parser/model/views/index.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.d.ts +11 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.js +18 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFilterAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.d.ts +11 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.js +18 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/VisualFiltersAggregation.js.map +1 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/index.d.ts +3 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/index.d.ts.map +1 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/index.js +19 -0
- package/dist/specification/src/ftfs/parser/model/visual-filters/index.js.map +1 -0
- package/dist/specification/src/sync/common/generate/objectPage.d.ts +1 -10
- package/dist/specification/src/sync/common/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/common/generate/objectPage.js +8 -63
- package/dist/specification/src/sync/common/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +5 -4
- package/dist/specification/src/sync/common/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/common/utils.js +6 -1
- package/dist/specification/src/sync/common/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/listReport.js +1 -92
- package/dist/specification/src/sync/v2/generate/listReport.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -17
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts +40 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js +179 -0
- package/dist/specification/src/sync/v2/generate/stableIdUtils.js.map +1 -0
- package/dist/specification/src/sync/v2/generate/utils.d.ts +63 -3
- package/dist/specification/src/sync/v2/generate/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.js +191 -7
- package/dist/specification/src/sync/v2/generate/utils.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.d.ts +59 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.js +193 -4
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Action.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts +8 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js +52 -7
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/ListReportNew.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +0 -2
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +1 -29
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts +0 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js +0 -10
- package/dist/specification/src/sync/v4/export/controls/HeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts +0 -2
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.js +0 -20
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFooterAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts +2 -6
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js +4 -27
- package/dist/specification/src/sync/v4/export/controls/ObjectPageForm.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts +0 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js +0 -10
- package/dist/specification/src/sync/v4/export/controls/ObjectPageFormAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts +2 -7
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js +4 -37
- package/dist/specification/src/sync/v4/export/controls/ObjectPageHeaderAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.d.ts +0 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.js +0 -10
- package/dist/specification/src/sync/v4/export/controls/ObjectPageSectionAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts +2 -7
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js +3 -36
- package/dist/specification/src/sync/v4/export/controls/ObjectPageToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts +0 -2
- package/dist/specification/src/sync/v4/export/controls/TableColumn.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js +0 -20
- package/dist/specification/src/sync/v4/export/controls/TableColumn.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +4 -14
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +9 -75
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/manifest.js +1 -1
- package/dist/specification/src/sync/v4/export/manifest.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts +0 -1
- package/dist/specification/src/sync/v4/generate/objectPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/objectPage.js +3 -12
- package/dist/specification/src/sync/v4/generate/objectPage.js.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/app/appProvider.js +3 -0
- package/dist/specification/src/sync/v4/import/app/appProvider.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js +3 -1
- package/dist/specification/src/sync/v4/import/pages/listReport.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.d.ts +1 -3
- package/dist/specification/src/sync/v4/utils/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/utils.js +21 -47
- package/dist/specification/src/sync/v4/utils/utils.js.map +1 -1
- package/dist/types/src/apiTypes.d.ts +22 -0
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +0 -5
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js +0 -5
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/index.js +2 -1
- package/dist/types/src/index.js.map +1 -1
- package/dist/types/src/parser/application.d.ts +22 -0
- package/dist/types/src/parser/application.d.ts.map +1 -0
- package/dist/types/src/parser/application.js +3 -0
- package/dist/types/src/parser/application.js.map +1 -0
- package/dist/types/src/parser/index.d.ts +3 -0
- package/dist/types/src/parser/index.d.ts.map +1 -0
- package/dist/types/src/parser/index.js +18 -0
- package/dist/types/src/parser/index.js.map +1 -0
- package/dist/types/src/parser/model.d.ts +17 -0
- package/dist/types/src/parser/model.d.ts.map +1 -0
- package/dist/types/src/parser/model.js +3 -0
- package/dist/types/src/parser/model.js.map +1 -0
- package/dist/types/src/v4/controls/CustomAction.d.ts +1 -2
- package/dist/types/src/v4/controls/CustomAction.d.ts.map +1 -1
- package/dist/types/src/v4/controls/CustomAction.js.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts +1 -2
- package/dist/types/src/v4/controls/ObjectPageFooter.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts +3 -6
- package/dist/types/src/v4/controls/ObjectPageForm.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts +3 -6
- package/dist/types/src/v4/controls/ObjectPageHeader.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts +7 -10
- package/dist/types/src/v4/controls/ObjectPageToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/Table.d.ts +0 -5
- package/dist/types/src/v4/controls/Table.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.d.ts +14 -19
- package/dist/types/src/v4/controls/ToolBar.d.ts.map +1 -1
- package/dist/types/src/v4/controls/ToolBar.js.map +1 -1
- package/package.json +9 -8
- package/dist/specification/src/ftfs/annotations.d.ts +0 -12
- package/dist/specification/src/ftfs/annotations.d.ts.map +0 -1
- package/dist/specification/src/ftfs/annotations.js +0 -50
- package/dist/specification/src/ftfs/annotations.js.map +0 -1
- package/dist/types/src/v4/controls/Action.d.ts +0 -10
- package/dist/types/src/v4/controls/Action.d.ts.map +0 -1
- package/dist/types/src/v4/controls/Action.js.map +0 -1
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* @file This file contains helper functions to replicate the logic for stable id generation from Fiori Elements v2.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.getViewId = getViewId;
|
|
7
|
+
exports.getStableIdPartFromDataField = getStableIdPartFromDataField;
|
|
8
|
+
exports.getSuffixFromIconTabFilterKey = getSuffixFromIconTabFilterKey;
|
|
9
|
+
exports.getStableIdForDatafieldActionButton = getStableIdForDatafieldActionButton;
|
|
10
|
+
const extensionLogger_1 = require("../../../extensionLogger");
|
|
11
|
+
/**
|
|
12
|
+
* This function replicates the logic of function fnDetermineViewId in sap.suite.ui.generic.template.lib.TemplateComponent.js of FE coding.
|
|
13
|
+
* It determines the id of the view that contains one page of an FE app.
|
|
14
|
+
*
|
|
15
|
+
* @param appId - id of the app
|
|
16
|
+
* @param componentName - name of the template component (that identifies the floor plan)
|
|
17
|
+
* @param entitySet - name of the entity set of a page
|
|
18
|
+
* @returns the fully qualified view id
|
|
19
|
+
*/
|
|
20
|
+
function getViewId(appId, componentName, entitySet) {
|
|
21
|
+
const componentPath = componentName.split('.');
|
|
22
|
+
const templateShortName = componentPath[componentPath.length - 1];
|
|
23
|
+
// Replicate logic how oComponentData.templateName has been defined in FE coding. All follow the same pattern with exception of OP.
|
|
24
|
+
const templateName = componentName + '.view.' + (templateShortName === 'ObjectPage' ? 'Details' : templateShortName);
|
|
25
|
+
return `${appId}::${templateName}::${entitySet}`;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* This function replicates the logic from corresponding function in sap.suite.ui.generic.template.js.AnnotationHelper.js of FE coding.
|
|
29
|
+
*
|
|
30
|
+
* @param id - the id to be modified
|
|
31
|
+
* @param generateParameters - provides access to the logger
|
|
32
|
+
* @returns the modified id
|
|
33
|
+
*/
|
|
34
|
+
function replaceSpecialCharsInId(id, generateParameters) {
|
|
35
|
+
if (id.indexOf(' ') >= 0) {
|
|
36
|
+
(0, extensionLogger_1.log)(generateParameters.logger, {
|
|
37
|
+
severity: "error" /* LogSeverity.Error */,
|
|
38
|
+
message: 'Spaces are not allowed in ID parts. Please check the annotations, probably something is wrong there.'
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
return id.replace(/@/g, '').replace(/\//g, '::').replace(/#/g, '::');
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Determine the string which is used to identify an action in an action data field (DataFieldForAction or DataFieldWithIntentBasedNavigation) for the stable id generation.
|
|
45
|
+
*
|
|
46
|
+
* @param dataField - the action
|
|
47
|
+
* @returns the identifying string
|
|
48
|
+
*/
|
|
49
|
+
function getActionStringFromDataField(dataField) {
|
|
50
|
+
if (typeof dataField.Action === 'string') {
|
|
51
|
+
return dataField.Action;
|
|
52
|
+
}
|
|
53
|
+
if (typeof dataField.Action === 'object') {
|
|
54
|
+
return dataField.Action['path'];
|
|
55
|
+
}
|
|
56
|
+
return '';
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Determine the string which is used to identify a semantic object in a navigation data field (DataFieldFor/WithIntentBasedNavigation) for the stable id generation.
|
|
60
|
+
*
|
|
61
|
+
* @param dataField - the navigation
|
|
62
|
+
* @returns the identifying string
|
|
63
|
+
*/
|
|
64
|
+
function getSemanticObjectStringFromDataField(dataField) {
|
|
65
|
+
if (typeof dataField.SemanticObject === 'string') {
|
|
66
|
+
return dataField.SemanticObject;
|
|
67
|
+
}
|
|
68
|
+
if (typeof dataField.SemanticObject === 'object') {
|
|
69
|
+
return dataField.SemanticObject['path'];
|
|
70
|
+
}
|
|
71
|
+
return '';
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* This function replicates the logic from corresponding function in sap.suite.ui.generic.template.js.AnnotationHelper.js of FE coding.
|
|
75
|
+
*
|
|
76
|
+
* @param dataField - the data field for which a stable id part should be created
|
|
77
|
+
* @param generateParameters - provides access to the logger
|
|
78
|
+
* @returns the stable id part created from the given data field
|
|
79
|
+
*/
|
|
80
|
+
function getStableIdPartFromDataField(dataField, generateParameters) {
|
|
81
|
+
let pathConcat = '', idPart = '';
|
|
82
|
+
if (dataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */) {
|
|
83
|
+
return replaceSpecialCharsInId(getActionStringFromDataField(dataField), generateParameters);
|
|
84
|
+
}
|
|
85
|
+
else if (dataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */ ||
|
|
86
|
+
dataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldWithIntentBasedNavigation" /* UIAnnotationTypes.DataFieldWithIntentBasedNavigation */) {
|
|
87
|
+
idPart = replaceSpecialCharsInId(getSemanticObjectStringFromDataField(dataField), generateParameters);
|
|
88
|
+
idPart = idPart + '::' + replaceSpecialCharsInId(getActionStringFromDataField(dataField), generateParameters);
|
|
89
|
+
return idPart;
|
|
90
|
+
}
|
|
91
|
+
else if (dataField.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAnnotation" /* UIAnnotationTypes.DataFieldForAnnotation */ && typeof dataField.Target === 'object') {
|
|
92
|
+
return replaceSpecialCharsInId(dataField.Target['value'], generateParameters);
|
|
93
|
+
}
|
|
94
|
+
else if (dataField.IconUrl /* && (dataField.IconUrl.Path || dataField.IconUrl.String) */) {
|
|
95
|
+
/* if (dataField.IconUrl.Path) {
|
|
96
|
+
idPart = replaceSpecialCharsInId(dataField.IconUrl.Path, generateParameters);
|
|
97
|
+
} else if (dataField.IconUrl.String) {
|
|
98
|
+
dataFieldString = dataField.IconUrl.String.replace('://', '-');
|
|
99
|
+
idPart = replaceSpecialCharsInId(dataFieldString, generateParameters);
|
|
100
|
+
} */
|
|
101
|
+
idPart = replaceSpecialCharsInId(dataField.IconUrl.toString(), generateParameters); // todo: recheck Path and String scenario
|
|
102
|
+
return idPart;
|
|
103
|
+
}
|
|
104
|
+
else if (dataField['Value'] && dataField['Value']['type'] === 'Path') {
|
|
105
|
+
return replaceSpecialCharsInId(dataField['Value']['path'], generateParameters);
|
|
106
|
+
}
|
|
107
|
+
else if (dataField['Value'] &&
|
|
108
|
+
dataField['Value']['Apply'] &&
|
|
109
|
+
dataField['Value']['Apply']['Name'] === 'odata.concat') {
|
|
110
|
+
// todo: recheck
|
|
111
|
+
for (let i = 0; i < dataField['Value']['Apply']['Parameters'].length; i++) {
|
|
112
|
+
if (dataField['Value']['Apply']['Parameters'][i].Type === 'Path') {
|
|
113
|
+
if (pathConcat) {
|
|
114
|
+
pathConcat = pathConcat + '::';
|
|
115
|
+
}
|
|
116
|
+
pathConcat =
|
|
117
|
+
pathConcat +
|
|
118
|
+
replaceSpecialCharsInId(dataField['Value']['Apply']['Parameters'][i].Value, generateParameters);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return pathConcat;
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
// Todo: FE logs an error in this case. Check whether tools should do the same.
|
|
125
|
+
// If yes, some unit test will have to be adapted.
|
|
126
|
+
// In case of a string or unknown property
|
|
127
|
+
/* log(generateParameters.logger, {
|
|
128
|
+
severity: LogSeverity.Error,
|
|
129
|
+
message: 'Unable to create a stable ID. Please check the annotations.'
|
|
130
|
+
}); */
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* This function replicates the logic from corresponding function in sap.suite.ui.generic.template.js.AnnotationHelper.js of FE coding.
|
|
135
|
+
*
|
|
136
|
+
* @param iconTabFilterKey - in multi view case the key identifying the view. Note that we assume that replaceSpecialCharsInId has already been executed on this value (and therefore must not be called again).
|
|
137
|
+
* @returns the suffix for the stable ID part created from the given iconTabFilterKey
|
|
138
|
+
*/
|
|
139
|
+
function getSuffixFromIconTabFilterKey(iconTabFilterKey) {
|
|
140
|
+
if (iconTabFilterKey) {
|
|
141
|
+
return '-'.concat(iconTabFilterKey);
|
|
142
|
+
}
|
|
143
|
+
else {
|
|
144
|
+
return '';
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* This function replicates the logic from corresponding function in sap.suite.ui.generic.template.js.AnnotationHelper.js of FE coding and adds logic which is implemented
|
|
149
|
+
* in the FE fragments to build the id of an action button.
|
|
150
|
+
*
|
|
151
|
+
* @param actionInfo - the information about the action for which a stable id should be created
|
|
152
|
+
* @returns the stable id for the action button
|
|
153
|
+
*/
|
|
154
|
+
function getStableIdForDatafieldActionButton(actionInfo) {
|
|
155
|
+
let stableId = '';
|
|
156
|
+
let datafieldStableId = '';
|
|
157
|
+
const facetStableId = '';
|
|
158
|
+
/* To be activated when this logic is applied to OP as well:
|
|
159
|
+
if (actionInfo.facet) {
|
|
160
|
+
facetStableId = actionInfo.facet.stableIdPart;
|
|
161
|
+
} */
|
|
162
|
+
if (actionInfo.dataField) {
|
|
163
|
+
datafieldStableId = actionInfo.dataField.stableIdPart;
|
|
164
|
+
}
|
|
165
|
+
stableId = (facetStableId === '' ? '' : facetStableId + '::') + 'action::' + datafieldStableId;
|
|
166
|
+
const suffix = getSuffixFromIconTabFilterKey(actionInfo.iconTabFilterKey);
|
|
167
|
+
if (suffix) {
|
|
168
|
+
stableId = stableId.concat(suffix);
|
|
169
|
+
}
|
|
170
|
+
if (actionInfo.isChart) {
|
|
171
|
+
stableId = stableId + '::chart';
|
|
172
|
+
}
|
|
173
|
+
// Note: Special handling of determining buttons is not part of the Fiori Elements AnnotationHelper function. This is handled in the corresponding xml fragments.
|
|
174
|
+
if (actionInfo.isDetermining) {
|
|
175
|
+
stableId = stableId + '::Determining';
|
|
176
|
+
}
|
|
177
|
+
return stableId;
|
|
178
|
+
}
|
|
179
|
+
//# sourceMappingURL=stableIdUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stableIdUtils.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/stableIdUtils.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAuBH,8BAOC;AA+DD,oEAsDC;AAQD,sEAMC;AASD,kFAwBC;AAvLD,8DAA+C;AAG/C;;;;;;;;GAQG;AACH,SAAgB,SAAS,CAAC,KAAa,EAAE,aAAqB,EAAE,SAAiB;IAC7E,MAAM,aAAa,GAAG,aAAa,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC/C,MAAM,iBAAiB,GAAG,aAAa,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAClE,mIAAmI;IACnI,MAAM,YAAY,GACd,aAAa,GAAG,QAAQ,GAAG,CAAC,iBAAiB,KAAK,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;IACpG,OAAO,GAAG,KAAK,KAAK,YAAY,KAAK,SAAS,EAAE,CAAC;AACrD,CAAC;AAED;;;;;;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C,CAAC,EAAE,CAAC,CAAC,CAAC,aAAa,GAAG,IAAI,CAAC,GAAG,UAAU,GAAG,iBAAiB,CAAC;IAC/F,MAAM,MAAM,GAAG,6BAA6B,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC1E,IAAI,MAAM,EAAE,CAAC;QACT,QAAQ,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IACvC,CAAC;IACD,IAAI,UAAU,CAAC,OAAO,EAAE,CAAC;QACrB,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;IACpC,CAAC;IACD,iKAAiK;IACjK,IAAI,UAAU,CAAC,aAAa,EAAE,CAAC;QAC3B,QAAQ,GAAG,QAAQ,GAAG,eAAe,CAAC;IAC1C,CAAC;IACD,OAAO,QAAQ,CAAC;AACpB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { Definition } from 'typescript-json-schema';
|
|
2
2
|
import type { MetadataInstanceInterface } from '../../common/decoration/factory';
|
|
3
|
-
import type { v2, PageTypeV2, PageTypeV4, FileData, GenerateAppSchemaParameters } from '@sap/ux-specification-types';
|
|
3
|
+
import type { v2, PageTypeV2, PageTypeV4, FileData, PropertyMessage, GenerateAppSchemaParameters } from '@sap/ux-specification-types';
|
|
4
4
|
import type { AnnotationTerm, EntitySet, EntityType } from '@sap-ux/vocabularies-types';
|
|
5
|
-
import type { Chart, DataPoint, LineItem, SelectionFields } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
5
|
+
import type { Chart, DataPoint, DataFieldAbstractTypes, LineItem, SelectionFields } from '@sap-ux/vocabularies-types/vocabularies/UI';
|
|
6
6
|
import type * as Edm from '@sap-ux/vocabularies-types/Edm';
|
|
7
7
|
import type { EntityTypeAnnotations_UI } from '@sap-ux/vocabularies-types/vocabularies/UI_Edm';
|
|
8
8
|
import { ActionTypeV2 } from '../types';
|
|
9
|
-
import
|
|
9
|
+
import { FacetBase } from '../../../../../types/src/common/types';
|
|
10
|
+
import type { ExtensionLogger } from '../../..';
|
|
10
11
|
/**
|
|
11
12
|
* Processes a LineItem record of type DataFieldForAction and DataFieldForIntentBasedNavigation during app schema generation.
|
|
12
13
|
*
|
|
@@ -173,4 +174,63 @@ export declare function getUIAnnotationForEntitySet(generateParameters: Generate
|
|
|
173
174
|
entityType?: Edm.EntityType;
|
|
174
175
|
uIAnnotations?: EntityTypeAnnotations_UI;
|
|
175
176
|
};
|
|
177
|
+
/**
|
|
178
|
+
* Determine the LineItemAnnotation to be used for the LR.
|
|
179
|
+
* Reproduces logic from Fiori Elements LR implementation (function createWorkingContext in LR specific AnnotationHelper).
|
|
180
|
+
*
|
|
181
|
+
* @param uIAnnotations - The UI annotations for the entity type.
|
|
182
|
+
* @param settings - Optional settings object, typically a piece of the manifest, containing an optional annotationPath property.
|
|
183
|
+
* @param logger - Optional logger instance for logging warnings or errors.
|
|
184
|
+
* @returns The determined LineItem annotation or undefined if none is found.
|
|
185
|
+
*/
|
|
186
|
+
export declare function getLineItemAnnotation(uIAnnotations: EntityTypeAnnotations_UI, settings?: unknown, // an object (actually a piece of the manifest) possessing an optional property annotationPath which would define the path to the PresentationVariant
|
|
187
|
+
logger?: ExtensionLogger): LineItem | undefined;
|
|
188
|
+
/**
|
|
189
|
+
* Possible placements for a datafield in the ui.
|
|
190
|
+
*/
|
|
191
|
+
export declare enum DataFieldTarget {
|
|
192
|
+
Column = "Column",
|
|
193
|
+
Toolbar = "Toolbar",// This value represents the toolbar of a table or chart. Note that the ui5 control sap.m.Toolbar may also be used for other purposes (e.g. the footer of a page)
|
|
194
|
+
Footer = "Footer"
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* An instance of this type collects information about one data field within a line item.
|
|
198
|
+
*
|
|
199
|
+
* @property target - where the data field is placed in the ui
|
|
200
|
+
* @property stableIdPart - result of getStableIdPartFromDataField() for this data field, resp. '' if that function returned undefined (only happening if the service is the datafield is not modelled correctly)
|
|
201
|
+
* @property isAction - true if the data field is of type DataFieldForAction or DataFieldForIntentBasedNavigation
|
|
202
|
+
* @property description - the text of the data field (if any)
|
|
203
|
+
* @property dataField - the actual data field from the ui annotations
|
|
204
|
+
* @property message - possibly a message indicating an issue with this data field
|
|
205
|
+
*/
|
|
206
|
+
export type DataFieldInfo = {
|
|
207
|
+
target: DataFieldTarget;
|
|
208
|
+
stableIdPart: string;
|
|
209
|
+
isAction: boolean;
|
|
210
|
+
description: string;
|
|
211
|
+
dataField: DataFieldAbstractTypes;
|
|
212
|
+
message?: PropertyMessage;
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* An instance of this type collects information about the line item configured for a table.
|
|
216
|
+
*
|
|
217
|
+
* @property name - the name of the line item annotation (including qualifier if any)
|
|
218
|
+
* @property dataFieldInfos - information about each data field within the line item
|
|
219
|
+
*/
|
|
220
|
+
export type LineItemInfo = {
|
|
221
|
+
name: string;
|
|
222
|
+
dataFieldInfos: DataFieldInfo[];
|
|
223
|
+
};
|
|
224
|
+
/**
|
|
225
|
+
* Collects all relevant information about a given line item.
|
|
226
|
+
*
|
|
227
|
+
* @param lineItemName - the name of the line item annotation (including qualifier if any)
|
|
228
|
+
* @param lineItemDefinition - the definition of the line item
|
|
229
|
+
* @param entityType - the entity type the line item belongs to
|
|
230
|
+
* @param tableType - the table type the line item is used for
|
|
231
|
+
* @param generateParameters - the generation parameters of the process the information is collected for. Used for logging.
|
|
232
|
+
* @param isOP - whether the line item is for an object page
|
|
233
|
+
* @returns an instance of LineItemInfo containing the collected information
|
|
234
|
+
*/
|
|
235
|
+
export declare function getLineItemInfo(lineItemName: string, lineItemDefinition: AnnotationTerm<LineItem>, entityType: Edm.EntityType, tableType: string, generateParameters: GenerateAppSchemaParameters, isOP: boolean): LineItemInfo;
|
|
176
236
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/utils.ts"],"names":[],"mappings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2B,GAAG;IAC1F,UAAU,CAAC,EAAE,GAAG,CAAC,UAAU,CAAC;IAC5B,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC5C,CAaA;AA0DD;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,CACjC,aAAa,EAAE,wBAAwB,EACvC,QAAQ,CAAC,EAAE,OAAO,EAAE,qJAAqJ;AACzK,MAAM,CAAC,EAAE,eAAe,GACzB,QAAQ,GAAG,SAAS,CA4BtB;AAED;;GAEG;AACH,oBAAY,eAAe;IACvB,MAAM,WAAW;IACjB,OAAO,YAAY,CAAE,iKAAiK;IACtL,MAAM,WAAW;CACpB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,aAAa,GAAG;IACxB,MAAM,EAAE,eAAe,CAAC;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,sBAAsB,CAAC;IAClC,OAAO,CAAC,EAAE,eAAe,CAAC;CAC7B,CAAC;AAEF;;;;;GAKG;AACH,MAAM,MAAM,YAAY,GAAG;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,aAAa,EAAE,CAAC;CACnC,CAAC;AA4BF;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC3B,YAAY,EAAE,MAAM,EACpB,kBAAkB,EAAE,cAAc,CAAC,QAAQ,CAAC,EAC5C,UAAU,EAAE,GAAG,CAAC,UAAU,EAC1B,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,2BAA2B,EAC/C,IAAI,EAAE,OAAO,GACd,YAAY,CA2Cd"}
|
|
@@ -3,6 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.DataFieldTarget = void 0;
|
|
6
7
|
exports.handleActionRecord = handleActionRecord;
|
|
7
8
|
exports.retrieveNameWithoutVocabularyFromVisualization = retrieveNameWithoutVocabularyFromVisualization;
|
|
8
9
|
exports.addLineItemsType = addLineItemsType;
|
|
@@ -20,13 +21,18 @@ exports.isEntityUpdatable = isEntityUpdatable;
|
|
|
20
21
|
exports.addStandardHeaderActions = addStandardHeaderActions;
|
|
21
22
|
exports.addStandardFooterActionsOP = addStandardFooterActionsOP;
|
|
22
23
|
exports.getUIAnnotationForEntitySet = getUIAnnotationForEntitySet;
|
|
24
|
+
exports.getLineItemAnnotation = getLineItemAnnotation;
|
|
25
|
+
exports.getLineItemInfo = getLineItemInfo;
|
|
23
26
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
24
27
|
const common_1 = require("../../common");
|
|
25
28
|
const decorators_1 = require("../../common/decoration/decorators");
|
|
26
29
|
const path_1 = require("path");
|
|
27
30
|
const xml_js_1 = require("xml-js");
|
|
28
31
|
const types_1 = require("../types");
|
|
32
|
+
const types_2 = require("../../../../../types/src/common/types");
|
|
29
33
|
const extensionLogger_1 = require("../../../extensionLogger");
|
|
34
|
+
const manifestPropertyUtils_1 = require("./manifestPropertyUtils");
|
|
35
|
+
const stableIdUtils_1 = require("./stableIdUtils");
|
|
30
36
|
const i18next_1 = __importDefault(require("i18next"));
|
|
31
37
|
/**
|
|
32
38
|
* Common function for enhancing the LineItems definition of app schema by custom columns.
|
|
@@ -152,12 +158,12 @@ function handleActionRecord(appSchema, actions, lineItemProps, actionType, recor
|
|
|
152
158
|
/**
|
|
153
159
|
* Returns the type of a column lineItem action.
|
|
154
160
|
*
|
|
155
|
-
* @param
|
|
161
|
+
* @param {boolean} isOP - true if we deal with the usage of the line item on an OP, false otherwise;
|
|
156
162
|
* @param {object} lineItemRecord - actual record of the line item collection
|
|
157
163
|
* @param actionTypes - array of action types to be filled
|
|
158
164
|
*/
|
|
159
|
-
function getColumnActionType(
|
|
160
|
-
if (
|
|
165
|
+
function getColumnActionType(isOP, lineItemRecord, actionTypes) {
|
|
166
|
+
if (isOP &&
|
|
161
167
|
lineItemRecord.Inline === true &&
|
|
162
168
|
(lineItemRecord.$Type === "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */ ||
|
|
163
169
|
lineItemRecord.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */)) {
|
|
@@ -175,10 +181,10 @@ function getColumnActionType(lineItemId, lineItemRecord, actionTypes) {
|
|
|
175
181
|
* Returns the type of a lineItem action.
|
|
176
182
|
*
|
|
177
183
|
* @param {object} lineItemRecord - actual record of the line item collection
|
|
178
|
-
* @param
|
|
184
|
+
* @param {boolean} isOP - true if we deal with the usage of the line item on an OP, false otherwise;
|
|
179
185
|
* @returns {string[] | undefined } ActionTypeV2[] - action type(s) of the lineItem
|
|
180
186
|
*/
|
|
181
|
-
function getActionType(lineItemRecord,
|
|
187
|
+
function getActionType(lineItemRecord, isOP) {
|
|
182
188
|
const actionTypes = [];
|
|
183
189
|
if (lineItemRecord.$Type !== "com.sap.vocabularies.UI.v1.DataFieldForAction" /* UIAnnotationTypes.DataFieldForAction */ &&
|
|
184
190
|
lineItemRecord.$Type !== "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */) {
|
|
@@ -201,7 +207,7 @@ function getActionType(lineItemRecord, lineItemId) {
|
|
|
201
207
|
lineItemRecord.$Type === "com.sap.vocabularies.UI.v1.DataFieldForIntentBasedNavigation" /* UIAnnotationTypes.DataFieldForIntentBasedNavigation */) {
|
|
202
208
|
actionTypes.push(types_1.ActionTypeV2.FooterIntentBased);
|
|
203
209
|
}
|
|
204
|
-
getColumnActionType(
|
|
210
|
+
getColumnActionType(isOP, lineItemRecord, actionTypes);
|
|
205
211
|
return actionTypes;
|
|
206
212
|
}
|
|
207
213
|
/**
|
|
@@ -287,6 +293,7 @@ function retrieveNameWithoutVocabularyFromVisualization(annotationTerm, visualiz
|
|
|
287
293
|
* @param customColumnRef - schema reference to custom column definition.
|
|
288
294
|
*/
|
|
289
295
|
function addLineItemsType(isObjectPage, appSchema, lineItemAnnotation, entityType, lineItemId, customColumnRef) {
|
|
296
|
+
const isOP = !!lineItemId;
|
|
290
297
|
// Add the correct lineItem definition
|
|
291
298
|
lineItemId = lineItemId || ux_specification_types_1.DefinitionName.LineItems;
|
|
292
299
|
const { actions, footerActions, lineItemPath } = (0, common_1.addCommonLineItemDefinitions)(isObjectPage, appSchema, lineItemAnnotation, entityType, lineItemId);
|
|
@@ -294,7 +301,7 @@ function addLineItemsType(isObjectPage, appSchema, lineItemAnnotation, entityTyp
|
|
|
294
301
|
let recordIndex = 0;
|
|
295
302
|
lineItemAnnotation.forEach((lineItemRecord) => {
|
|
296
303
|
const lineItemProperties = { lineItemPath, lineItemRecord, lineItemId, entityType };
|
|
297
|
-
const actionTypes = getActionType(lineItemRecord,
|
|
304
|
+
const actionTypes = getActionType(lineItemRecord, isOP);
|
|
298
305
|
if (actionTypes) {
|
|
299
306
|
actionTypes.forEach((actionType) => {
|
|
300
307
|
handleAnyAction(actionType, appSchema, actions, lineItemProperties, recordIndex, footerActions, lineItemId);
|
|
@@ -753,4 +760,181 @@ function getUIAnnotationForEntitySet(generateParameters) {
|
|
|
753
760
|
}
|
|
754
761
|
return { entityType, uIAnnotations };
|
|
755
762
|
}
|
|
763
|
+
/**
|
|
764
|
+
* Helper function for getLineItemAnnotation which determines the presentation variant to be used. The parameters of both functions have identical meaning.
|
|
765
|
+
*
|
|
766
|
+
* @param uIAnnotations - The UI annotations for the entity type.
|
|
767
|
+
* @param annotationPath - Optional annotation path to identify the specific presentation variant.
|
|
768
|
+
* @param logger - Optional logger instance for logging warnings or errors.
|
|
769
|
+
* @returns The determined PresentationVariant or undefined if none is found.
|
|
770
|
+
*/
|
|
771
|
+
function getPresentationVariantForLineItem(uIAnnotations, annotationPath, logger) {
|
|
772
|
+
let presentationVariant; // the presentation variant to be used to determine the LineItem
|
|
773
|
+
// Note: annotationPath (if it exists) contains the fully qualified annotation name (starting with UIVOCABULARYDOT) which would be a member of enum UIAnnotationTerms.
|
|
774
|
+
// Inside uiAnnotations the unqualified annotation names are used as keys. They can be found in enum FacetBase or obtained from the terms above by removing UIVOCABULARYDOT.
|
|
775
|
+
if (annotationPath) {
|
|
776
|
+
const isSPV = annotationPath.includes("com.sap.vocabularies.UI.v1.SelectionPresentationVariant" /* UIAnnotationTerms.SelectionPresentationVariant */);
|
|
777
|
+
const isPV = !isSPV && annotationPath.includes("com.sap.vocabularies.UI.v1.PresentationVariant" /* UIAnnotationTerms.PresentationVariant */);
|
|
778
|
+
if (isSPV || isPV) {
|
|
779
|
+
const accessor = annotationPath.replace(ux_specification_types_1.UIVOCABULARYDOT, '');
|
|
780
|
+
const uiAnnotation = uIAnnotations[accessor]; // the ui annotation specified by the annotationPath if it exists
|
|
781
|
+
if (uiAnnotation) {
|
|
782
|
+
if (isPV) {
|
|
783
|
+
presentationVariant = uiAnnotation;
|
|
784
|
+
}
|
|
785
|
+
else {
|
|
786
|
+
// SPV case
|
|
787
|
+
presentationVariant = uiAnnotation[types_2.FacetBase.PresentationVariant];
|
|
788
|
+
if (presentationVariant &&
|
|
789
|
+
presentationVariant.fullyQualifiedName.includes(types_2.FacetBase.SelectionPresentationVariant)) {
|
|
790
|
+
presentationVariant = uIAnnotations[types_2.FacetBase.PresentationVariant]; // inline presentation variants are ignored, use standard presentation variant instead
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
else {
|
|
795
|
+
// annotationPath is pointing to a selection presentation variant or a presentation variant but the corresponding annotation does not exist
|
|
796
|
+
(0, extensionLogger_1.log)(logger, {
|
|
797
|
+
severity: "warning" /* LogSeverity.Warning */,
|
|
798
|
+
message: i18next_1.default.t('NOANNOTATIONFORPATH', { annotationPath: annotationPath })
|
|
799
|
+
});
|
|
800
|
+
// If the annotationPath has specified a non-existing selection presentation variant fall back to the standard presentation variant
|
|
801
|
+
if (isSPV) {
|
|
802
|
+
presentationVariant = uIAnnotations[types_2.FacetBase.PresentationVariant];
|
|
803
|
+
}
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
else {
|
|
807
|
+
// annotationPath exists but does not point to a selection presentation variant or presentation variant (should point to a selection variant then)
|
|
808
|
+
presentationVariant = uIAnnotations[types_2.FacetBase.PresentationVariant]; // use standard presentation variant in this case
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
presentationVariant = uIAnnotations[types_2.FacetBase.PresentationVariant];
|
|
813
|
+
}
|
|
814
|
+
return presentationVariant;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Determine the LineItemAnnotation to be used for the LR.
|
|
818
|
+
* Reproduces logic from Fiori Elements LR implementation (function createWorkingContext in LR specific AnnotationHelper).
|
|
819
|
+
*
|
|
820
|
+
* @param uIAnnotations - The UI annotations for the entity type.
|
|
821
|
+
* @param settings - Optional settings object, typically a piece of the manifest, containing an optional annotationPath property.
|
|
822
|
+
* @param logger - Optional logger instance for logging warnings or errors.
|
|
823
|
+
* @returns The determined LineItem annotation or undefined if none is found.
|
|
824
|
+
*/
|
|
825
|
+
function getLineItemAnnotation(uIAnnotations, settings, // an object (actually a piece of the manifest) possessing an optional property annotationPath which would define the path to the PresentationVariant
|
|
826
|
+
logger // used in case an error/warning is detected while determining the result
|
|
827
|
+
) {
|
|
828
|
+
if ((0, manifestPropertyUtils_1.hasPropertyTypeError)(settings, 'annotationPath', logger)) {
|
|
829
|
+
return undefined; // return undefined in case there is an error in the settings
|
|
830
|
+
}
|
|
831
|
+
const presentationVariant = getPresentationVariantForLineItem(uIAnnotations, settings?.['annotationPath'], logger); // the presentation variant to be used to determine the LineItem (if there is one)
|
|
832
|
+
// If a PV could be determined LineItem should be defined as a visualization of the PV.
|
|
833
|
+
const visualizations = presentationVariant?.Visualizations || [];
|
|
834
|
+
let lineItemName = ''; // the name that will be used to retrieve the LineItem from uiAnnotations
|
|
835
|
+
visualizations.some(function (visualization) {
|
|
836
|
+
lineItemName = retrieveNameWithoutVocabularyFromVisualization(types_2.FacetBase.LineItem, visualization);
|
|
837
|
+
return lineItemName; // end loop as soon as name of LineItem has been identified
|
|
838
|
+
});
|
|
839
|
+
// If the above logic did not identify a name for the LineItem then still the corresponding annotation (but without qualifier) will be used
|
|
840
|
+
lineItemName = lineItemName || types_2.FacetBase.LineItem;
|
|
841
|
+
const lineItem = uIAnnotations[lineItemName];
|
|
842
|
+
if (!lineItem) {
|
|
843
|
+
(0, extensionLogger_1.log)(logger, {
|
|
844
|
+
severity: "warning" /* LogSeverity.Warning */,
|
|
845
|
+
message: i18next_1.default.t('NOLINEITEMFORPATH', { annotationPath: lineItemName })
|
|
846
|
+
});
|
|
847
|
+
}
|
|
848
|
+
return lineItem;
|
|
849
|
+
}
|
|
850
|
+
/**
|
|
851
|
+
* Possible placements for a datafield in the ui.
|
|
852
|
+
*/
|
|
853
|
+
var DataFieldTarget;
|
|
854
|
+
(function (DataFieldTarget) {
|
|
855
|
+
DataFieldTarget["Column"] = "Column";
|
|
856
|
+
DataFieldTarget["Toolbar"] = "Toolbar";
|
|
857
|
+
DataFieldTarget["Footer"] = "Footer";
|
|
858
|
+
})(DataFieldTarget || (exports.DataFieldTarget = DataFieldTarget = {}));
|
|
859
|
+
/**
|
|
860
|
+
* Determines the target placement of an action based on its type.
|
|
861
|
+
*
|
|
862
|
+
* @param actionType - The type of the action
|
|
863
|
+
* @returns The target placement for the action, or undefined if no target can be determined
|
|
864
|
+
*/
|
|
865
|
+
function getTargetFromActionType(actionType) {
|
|
866
|
+
switch (actionType) {
|
|
867
|
+
case types_1.ActionTypeV2.ToolBar:
|
|
868
|
+
case types_1.ActionTypeV2.ToolBarIntentBased: {
|
|
869
|
+
return DataFieldTarget.Toolbar;
|
|
870
|
+
}
|
|
871
|
+
case types_1.ActionTypeV2.Footer:
|
|
872
|
+
case types_1.ActionTypeV2.FooterIntentBased: {
|
|
873
|
+
return DataFieldTarget.Footer;
|
|
874
|
+
}
|
|
875
|
+
case types_1.ActionTypeV2.Column:
|
|
876
|
+
case types_1.ActionTypeV2.ColumnIntentBased: {
|
|
877
|
+
return DataFieldTarget.Column;
|
|
878
|
+
}
|
|
879
|
+
case types_1.ActionTypeV2.OPColumn: {
|
|
880
|
+
return undefined; // TODO: Revisit when this code should also be used for OP
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Collects all relevant information about a given line item.
|
|
886
|
+
*
|
|
887
|
+
* @param lineItemName - the name of the line item annotation (including qualifier if any)
|
|
888
|
+
* @param lineItemDefinition - the definition of the line item
|
|
889
|
+
* @param entityType - the entity type the line item belongs to
|
|
890
|
+
* @param tableType - the table type the line item is used for
|
|
891
|
+
* @param generateParameters - the generation parameters of the process the information is collected for. Used for logging.
|
|
892
|
+
* @param isOP - whether the line item is for an object page
|
|
893
|
+
* @returns an instance of LineItemInfo containing the collected information
|
|
894
|
+
*/
|
|
895
|
+
function getLineItemInfo(lineItemName, lineItemDefinition, entityType, tableType, generateParameters, isOP) {
|
|
896
|
+
const dataFieldInfos = [];
|
|
897
|
+
lineItemDefinition.forEach((lineItemRecord) => {
|
|
898
|
+
const isDataField = lineItemRecord.$Type === "com.sap.vocabularies.UI.v1.DataField" /* UIAnnotationTypes.DataField */;
|
|
899
|
+
const stableIdPart = (0, stableIdUtils_1.getStableIdPartFromDataField)(lineItemRecord, generateParameters) || '';
|
|
900
|
+
const description = (0, common_1.getDataFieldDescription)(lineItemRecord, entityType);
|
|
901
|
+
const actionTypes = isDataField ? undefined : getActionType(lineItemRecord, isOP);
|
|
902
|
+
if (actionTypes) {
|
|
903
|
+
const message = lineItemRecord.Label
|
|
904
|
+
? undefined
|
|
905
|
+
: {
|
|
906
|
+
type: ux_specification_types_1.PropertyMessageType.Warning,
|
|
907
|
+
text: i18next_1.default.t('NOLABELFORBUTTON')
|
|
908
|
+
};
|
|
909
|
+
actionTypes.forEach((actionType) => {
|
|
910
|
+
const target = getTargetFromActionType(actionType); // Note that actionType has been produced by getActionType, so undefined can be excluded
|
|
911
|
+
const dataFieldInfo = {
|
|
912
|
+
isAction: true,
|
|
913
|
+
target,
|
|
914
|
+
stableIdPart,
|
|
915
|
+
description,
|
|
916
|
+
dataField: lineItemRecord
|
|
917
|
+
};
|
|
918
|
+
if (message) {
|
|
919
|
+
dataFieldInfo.message = message;
|
|
920
|
+
}
|
|
921
|
+
dataFieldInfos.push(dataFieldInfo);
|
|
922
|
+
});
|
|
923
|
+
}
|
|
924
|
+
else {
|
|
925
|
+
const dataFieldInfo = {
|
|
926
|
+
isAction: false,
|
|
927
|
+
target: DataFieldTarget.Column,
|
|
928
|
+
stableIdPart,
|
|
929
|
+
description,
|
|
930
|
+
dataField: lineItemRecord
|
|
931
|
+
};
|
|
932
|
+
dataFieldInfos.push(dataFieldInfo);
|
|
933
|
+
}
|
|
934
|
+
});
|
|
935
|
+
return {
|
|
936
|
+
name: lineItemName,
|
|
937
|
+
dataFieldInfos: dataFieldInfos
|
|
938
|
+
};
|
|
939
|
+
}
|
|
756
940
|
//# sourceMappingURL=utils.js.map
|