@sap/ux-specification 1.124.36 → 1.124.37
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 +39 -0
- 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 +264 -259
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +202 -7
- package/dist/schemas/v4/ApplicationV4.json +14 -0
- package/dist/schemas/v4/BuildingBlocksConfig.json +73 -2
- package/dist/specification/package.json +8 -8
- package/dist/specification/scripts/macros/corrections.d.ts +1 -0
- package/dist/specification/scripts/macros/corrections.d.ts.map +1 -1
- package/dist/specification/scripts/macros/corrections.js +93 -1
- package/dist/specification/scripts/macros/corrections.js.map +1 -1
- package/dist/specification/scripts/macros/schema.d.ts.map +1 -1
- package/dist/specification/scripts/macros/schema.js +23 -10
- package/dist/specification/scripts/macros/schema.js.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +39 -3
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts +8 -0
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +1 -0
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/index.d.ts +1 -1
- package/dist/specification/src/ftfs/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/index.js +2 -1
- package/dist/specification/src/ftfs/index.js.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.d.ts.map +1 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js +3 -1
- package/dist/specification/src/ftfs/parser/model/TreeModel.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts +91 -0
- package/dist/specification/src/sync/common/decoration/Decorator.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/Decorator.js +139 -0
- package/dist/specification/src/sync/common/decoration/Decorator.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts +95 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js +210 -0
- package/dist/specification/src/sync/common/decoration/condition-evaluator.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts +5 -22
- package/dist/specification/src/sync/common/decoration/decorator-paths.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorator-paths.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.d.ts +0 -8
- package/dist/specification/src/sync/common/decoration/decorators.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/decorators.js +0 -15
- package/dist/specification/src/sync/common/decoration/decorators.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.d.ts +4 -0
- package/dist/specification/src/sync/common/decoration/index.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/index.js +4 -0
- package/dist/specification/src/sync/common/decoration/index.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts +38 -0
- package/dist/specification/src/sync/common/decoration/interfaces.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/interfaces.js +3 -0
- package/dist/specification/src/sync/common/decoration/interfaces.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.js +50 -0
- package/dist/specification/src/sync/common/decoration/steps/Enums.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.js +46 -0
- package/dist/specification/src/sync/common/decoration/steps/Hide.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts +26 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.js +77 -0
- package/dist/specification/src/sync/common/decoration/steps/Message.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js +43 -0
- package/dist/specification/src/sync/common/decoration/steps/Readonly.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts +18 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.js +68 -0
- package/dist/specification/src/sync/common/decoration/steps/Validity.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts +19 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js +48 -0
- package/dist/specification/src/sync/common/decoration/steps/enum-utils.js.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts +6 -0
- package/dist/specification/src/sync/common/decoration/steps/index.d.ts.map +1 -0
- package/dist/specification/src/sync/common/decoration/steps/index.js +14 -0
- package/dist/specification/src/sync/common/decoration/steps/index.js.map +1 -0
- package/dist/specification/src/sync/common/i18n.json +22 -0
- package/dist/specification/src/sync/common/importProject.d.ts.map +1 -1
- package/dist/specification/src/sync/common/importProject.js +2 -0
- package/dist/specification/src/sync/common/importProject.js.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +4 -5
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +29 -20
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +3 -2
- package/dist/specification/src/sync/v2/export/export.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +48 -19
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -0
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +17 -6
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +54 -6
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +106 -12
- package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +4 -4
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts +12 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.d.ts.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js +167 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiEdit.js.map +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +59 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +582 -7
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js +1 -0
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/index.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +29 -6
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
- package/dist/specification/src/sync/v2/types.d.ts +2 -0
- package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/types.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +25 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +28 -4
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/application.d.ts +1 -0
- package/dist/specification/src/sync/v4/application.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/application.js +10 -0
- package/dist/specification/src/sync/v4/application.js.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts +3 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js +8 -5
- package/dist/specification/src/sync/v4/export/controls/ToolBarAction.js.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts +1 -0
- package/dist/specification/src/sync/v4/export/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js +212 -46
- package/dist/specification/src/sync/v4/export/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/app.d.ts +11 -0
- package/dist/specification/src/sync/v4/generate/app.d.ts.map +1 -0
- package/dist/specification/src/sync/v4/generate/app.js +31 -0
- package/dist/specification/src/sync/v4/generate/app.js.map +1 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts +13 -0
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js +74 -2
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/annotations.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js +4 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/extensions.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js +29 -27
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/generator.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js +12 -3
- package/dist/specification/src/sync/v4/generate/fpm-custom-page/utils.js.map +1 -1
- package/dist/specification/src/sync/v4/generate/list-report/ListReportUtils.js.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js +20 -0
- package/dist/specification/src/sync/v4/import/pages/fpmCustomPage.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts +2 -4
- package/dist/specification/src/sync/v4/sync-rules/App.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js +2 -1
- package/dist/specification/src/sync/v4/sync-rules/App.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts +2 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js +3 -1
- package/dist/specification/src/sync/v4/sync-rules/AppSchema.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js +4 -3
- package/dist/specification/src/sync/v4/sync-rules/DecoratorClass.js.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts +7 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/sync-rules/Page.js.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.d.ts +19 -0
- package/dist/specification/src/sync/v4/utils/macros.d.ts.map +1 -1
- package/dist/specification/src/sync/v4/utils/macros.js +34 -0
- package/dist/specification/src/sync/v4/utils/macros.js.map +1 -1
- package/dist/specification/test/test-utils/utils.d.ts.map +1 -1
- package/dist/specification/test/test-utils/utils.js +4 -0
- package/dist/specification/test/test-utils/utils.js.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts +2 -2
- package/dist/specification/test/unit/decorators/validity-test-utils.d.ts.map +1 -1
- package/dist/specification/test/unit/decorators/validity-test-utils.js +6 -6
- package/dist/specification/test/unit/decorators/validity-test-utils.js.map +1 -1
- package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
- package/dist/templates/GridTableColumnsExtension.xml +3 -3
- package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
- package/dist/templates/TreeTableColumnsExtension.xml +4 -4
- package/dist/templates/fragment.xml +3 -3
- package/dist/templates/view.xml +3 -3
- package/dist/types/src/apiTypes.d.ts +15 -5
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +1 -0
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +1 -0
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts +2 -1
- package/dist/types/src/common/webapp/manifest/Manifest.d.ts.map +1 -1
- package/dist/types/src/common/webapp/manifest/Manifest.js +1 -0
- package/dist/types/src/common/webapp/manifest/Manifest.js.map +1 -1
- package/dist/types/src/v4/application.d.ts +15 -0
- package/dist/types/src/v4/application.d.ts.map +1 -1
- package/dist/types/src/v4/application.js +10 -0
- package/dist/types/src/v4/application.js.map +1 -1
- package/package.json +8 -8
|
@@ -46,16 +46,25 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
46
46
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
47
|
};
|
|
48
48
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
49
|
-
exports.Table = void 0;
|
|
49
|
+
exports.CREATE_WITH_PARAMETER_DIALOG = exports.Table = exports.Fields4CreateWithParametersDialog = exports.CreateWithFilters = exports.DataLoadSettings = void 0;
|
|
50
50
|
exports.getDefaultTableType = getDefaultTableType;
|
|
51
|
+
exports.getTableType = getTableType;
|
|
51
52
|
exports.checkTableType = checkTableType;
|
|
53
|
+
exports.getManifestPathForTableSettings = getManifestPathForTableSettings;
|
|
54
|
+
exports.addEntityTypeFieldsAsEnum = addEntityTypeFieldsAsEnum;
|
|
52
55
|
const i18next_1 = __importDefault(require("i18next"));
|
|
53
56
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
54
57
|
const v2 = __importStar(require("@sap/ux-specification-types/src/v2/genericSchemaHandling/controls/Table"));
|
|
55
58
|
const decoration_1 = require("../../../common/decoration");
|
|
56
59
|
const extensionLogger_1 = require("../../../../extensionLogger");
|
|
60
|
+
const utils_1 = require("../../generate/utils");
|
|
57
61
|
const MultiTable_1 = require("./MultiTable");
|
|
58
62
|
const MultiViewSingleTable_1 = require("./MultiViewSingleTable");
|
|
63
|
+
const manifestPropertyUtils_1 = require("../../generate/manifestPropertyUtils");
|
|
64
|
+
const utils_2 = require("../../utils");
|
|
65
|
+
const common_1 = require("../../../common");
|
|
66
|
+
const Action_1 = require("./Action");
|
|
67
|
+
const MultiEdit_1 = require("./MultiEdit");
|
|
59
68
|
/**
|
|
60
69
|
* This function should return the information whether the given entity type is analytical.
|
|
61
70
|
* Unfortunately this is currently impossible due to missing information provided by the annotation api.
|
|
@@ -67,6 +76,18 @@ const MultiViewSingleTable_1 = require("./MultiViewSingleTable");
|
|
|
67
76
|
function isTypeAnalytical(entityTypeDefinition) {
|
|
68
77
|
return false; // todo: enhance
|
|
69
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* Returns the entity set applicable for the given table parameters.
|
|
81
|
+
*
|
|
82
|
+
* @param tableParams - the parameters describing the table
|
|
83
|
+
* @param generateParameters - the parameters used for schema generation
|
|
84
|
+
* @returns the entity set for the given table
|
|
85
|
+
*/
|
|
86
|
+
function getEntitySet(tableParams, generateParameters) {
|
|
87
|
+
return tableParams.multiTableInfo?.variantInfo
|
|
88
|
+
? tableParams.multiTableInfo?.variantInfo.entitySetDefinition
|
|
89
|
+
: generateParameters.entitySet;
|
|
90
|
+
}
|
|
70
91
|
/**
|
|
71
92
|
* Returns the default table type used for tables for the given entity type (i.e. the table type which will be used by Fiori Elements if no manifest setting for the table type is available).
|
|
72
93
|
*
|
|
@@ -77,6 +98,71 @@ function getDefaultTableType(entityTypeDefinition) {
|
|
|
77
98
|
const isAnalytical = isTypeAnalytical(entityTypeDefinition);
|
|
78
99
|
return isAnalytical ? v2.TableTypeV2Enum.AnalyticalTable : v2.TableTypeV2Enum.ResponsiveTable;
|
|
79
100
|
}
|
|
101
|
+
/**
|
|
102
|
+
* Returns the table type valid for the artifact described by given parameters.
|
|
103
|
+
*
|
|
104
|
+
* @param tableParams - the parameters describing the table
|
|
105
|
+
* @returns the table type for the given table
|
|
106
|
+
*/
|
|
107
|
+
function getTableType(tableParams) {
|
|
108
|
+
if (tableParams.multiTableInfo?.variantInfo) {
|
|
109
|
+
return tableParams.multiTableInfo.variantInfo.tableType;
|
|
110
|
+
}
|
|
111
|
+
const tableSettings = tableParams.settings?.tableSettings;
|
|
112
|
+
const tableType = (tableSettings && tableSettings['type']) ||
|
|
113
|
+
tableParams.settings?.tableType ||
|
|
114
|
+
getDefaultTableType(tableParams.entityType);
|
|
115
|
+
return tableType;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Checks whether the table described by the given parameters is a responsive table.
|
|
119
|
+
*
|
|
120
|
+
* @param tableParams - the parameters describing the table
|
|
121
|
+
* @returns true if the table is a responsive table, false otherwise
|
|
122
|
+
*/
|
|
123
|
+
function isResponsiveTable(tableParams) {
|
|
124
|
+
return getTableType(tableParams) === v2.TableTypeV2Enum.ResponsiveTable;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Checks whether the table described by the given parameters is a ui table.
|
|
128
|
+
*
|
|
129
|
+
* @param tableParams - the parameters describing the table
|
|
130
|
+
* @returns true if the table is a ui table, false otherwise
|
|
131
|
+
*/
|
|
132
|
+
function isUiTable(tableParams) {
|
|
133
|
+
return !isResponsiveTable(tableParams) && !tableParams.multiTableInfo?.variantInfo?.isChart;
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Get the tableSettings object from the manifest applicable to the specified table.
|
|
137
|
+
*
|
|
138
|
+
* @param tableParams - the parameters describing the table
|
|
139
|
+
* @returns the tableSettings or undefined if no tableSettings are applicable
|
|
140
|
+
*/
|
|
141
|
+
function getTableSettings(tableParams) {
|
|
142
|
+
return ((tableParams.multiTableInfo?.variantInfo &&
|
|
143
|
+
tableParams.multiTableInfo.variantInfo.variantDefinition['tableSettings']) ||
|
|
144
|
+
(tableParams.settings && tableParams.settings['tableSettings']));
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Returns whether the specified table is configured a multi-selection table.
|
|
148
|
+
*
|
|
149
|
+
* @param tableParams - the parameters describing the table
|
|
150
|
+
* @returns whether the table is multi-select
|
|
151
|
+
*/
|
|
152
|
+
function isMultiSelect(tableParams) {
|
|
153
|
+
const tableSettings = getTableSettings(tableParams);
|
|
154
|
+
return tableSettings?.['multiSelect'] === true;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Checks whether the table described by the given parameters has selectAll switched on.
|
|
158
|
+
*
|
|
159
|
+
* @param tableParams - the parameters describing the table
|
|
160
|
+
* @returns true if the table has selectAll switched on, false otherwise
|
|
161
|
+
*/
|
|
162
|
+
function isSelectAll(tableParams) {
|
|
163
|
+
const tableSettings = getTableSettings(tableParams);
|
|
164
|
+
return isMultiSelect(tableParams) && tableSettings['selectAll'] !== false; // note that tableSettings are available if isMultiSelect is true
|
|
165
|
+
}
|
|
80
166
|
/**
|
|
81
167
|
* Checks whether a given table type is valid. Thereby undefined and empty string are also considered as valid (they represent the default table type).
|
|
82
168
|
*
|
|
@@ -117,16 +203,192 @@ const syncRuleForFlexSmartTable = {
|
|
|
117
203
|
}
|
|
118
204
|
}
|
|
119
205
|
};
|
|
206
|
+
/**
|
|
207
|
+
* Provide the syncRule for a property with artifact type 'FlexChange' belonging to the ResponsiveTable inside the SmartTable.
|
|
208
|
+
*
|
|
209
|
+
* @param addPatternForBinding information whether the addPatternForBindingChangeOfEnumLR should be added as generate property to the sync rule
|
|
210
|
+
* @returns the syncRule
|
|
211
|
+
*/
|
|
212
|
+
function getSyncRuleForFlexResponsiveTable(addPatternForBinding) {
|
|
213
|
+
const syncRule = {
|
|
214
|
+
flex: {
|
|
215
|
+
controlType: () => ux_specification_types_1.ControlType.Table
|
|
216
|
+
},
|
|
217
|
+
processingRuleAdapter: function (processingRule, schemaHandlingParams) {
|
|
218
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
219
|
+
if ((!tableParams.multiTableInfo || tableParams.multiTableInfo.variantInfo) &&
|
|
220
|
+
isResponsiveTable(tableParams)) {
|
|
221
|
+
// Replicate logic from sap.suite.ui.generic.template.lib.StableIdDefinition, type: ListReport, subType: ResponsiveTable
|
|
222
|
+
const suffix = tableParams.multiTableInfo
|
|
223
|
+
? `-${tableParams.multiTableInfo.variantInfo.variantDefinition['key']}`
|
|
224
|
+
: '';
|
|
225
|
+
processingRule.controlId = `responsiveTable${suffix}`;
|
|
226
|
+
}
|
|
227
|
+
else {
|
|
228
|
+
delete processingRule.element;
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
};
|
|
232
|
+
if (addPatternForBinding) {
|
|
233
|
+
syncRule.generate = decoration_1.addPatternForBindingChangeOfEnumLR; // add option for bindings (already executed in the generation of the generic schema)
|
|
234
|
+
}
|
|
235
|
+
return syncRule;
|
|
236
|
+
}
|
|
237
|
+
/**
|
|
238
|
+
* Helper functions for implementing a ProcessingRuleAdapter for a manifest-based property belonging to the tableSettings.
|
|
239
|
+
* Returns the manifest path for the table settings for the specified table params (which may either be global or for a specific view in a multi-table scenario).
|
|
240
|
+
*
|
|
241
|
+
* @param schemaHandlingParams - the schema handling parameters passed to the ProcessingRuleAdapter
|
|
242
|
+
* @param tableParams - the parameters describing the table
|
|
243
|
+
* @returns the manifest path to the tableSettings of the specified table
|
|
244
|
+
*/
|
|
245
|
+
function getManifestPathForTableSettings(schemaHandlingParams, tableParams) {
|
|
246
|
+
const suffix = [];
|
|
247
|
+
if (tableParams.multiTableInfo?.variantInfo) {
|
|
248
|
+
suffix.push('quickVariantSelectionX', 'variants', tableParams.multiTableInfo.variantInfo.accessor);
|
|
249
|
+
}
|
|
250
|
+
suffix.push('tableSettings');
|
|
251
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath, suffix);
|
|
252
|
+
return manifestPath;
|
|
253
|
+
}
|
|
254
|
+
/**
|
|
255
|
+
* This function adapts getSyncRuleForManifestProperty for properties belonging to the tableSettings of a table.
|
|
256
|
+
*
|
|
257
|
+
* @param property - the name of the property in tableSettings section of the manifest the SyncRule should be generated for
|
|
258
|
+
* @param getDisallowReason - optional function to determine whether the property is disallowed for the given table params
|
|
259
|
+
* @param adapt - an optional function that can be used to adapt the schema element representing the manifest property
|
|
260
|
+
* @param provideReferenceAdaptation - an optional function that can be used to provide the ReferenceAdaptationInfo for the manifest property
|
|
261
|
+
* @param expectedType - the expected type of the value of the property (if it is not undefined)
|
|
262
|
+
* @returns the SyncRule for the tableSettings property
|
|
263
|
+
*/
|
|
264
|
+
function getSyncRuleForTableSettingsProperty(property, getDisallowReason, adapt, provideReferenceAdaptation, expectedType) {
|
|
265
|
+
// Construct the analyze function for getSyncRuleForManifestProperty
|
|
266
|
+
const analyze = function (element, schemaHandlingParams, generateParameters) {
|
|
267
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
268
|
+
let disallowedReason;
|
|
269
|
+
// If the view is a chart view we can exclude the property generically. Otherwise check with function getDisallowedReason
|
|
270
|
+
if (tableParams.multiTableInfo?.variantInfo?.isChart) {
|
|
271
|
+
disallowedReason = i18next_1.default.t('NOCHARTPROPERTY', { property: property });
|
|
272
|
+
}
|
|
273
|
+
else if (getDisallowReason) {
|
|
274
|
+
disallowedReason = getDisallowReason(tableParams, generateParameters, element);
|
|
275
|
+
}
|
|
276
|
+
const manifestPath = getManifestPathForTableSettings(schemaHandlingParams, tableParams);
|
|
277
|
+
return { manifestPath, disallowedReason };
|
|
278
|
+
};
|
|
279
|
+
// Create a getReferenceAdaptation function with the correct signature for getSyncRuleForManifestProperty
|
|
280
|
+
const provideReferenceAdaptationWrapper = provideReferenceAdaptation
|
|
281
|
+
? function (schemaHandlingParams, generateParameters) {
|
|
282
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
283
|
+
return provideReferenceAdaptation(tableParams, generateParameters);
|
|
284
|
+
}
|
|
285
|
+
: undefined;
|
|
286
|
+
return (0, manifestPropertyUtils_1.getSyncRuleForManifestProperty)(property, analyze, adapt, provideReferenceAdaptationWrapper, expectedType);
|
|
287
|
+
}
|
|
288
|
+
/**
|
|
289
|
+
* This function provides a SyncRule for manifest properties which are only allowed on the top-level of the table definition and not on the level of views in a multi-table scenario.
|
|
290
|
+
* Moreover, these properties possess a parent property that is a child of the page settings (so they are no direct children of the page settings).
|
|
291
|
+
*
|
|
292
|
+
* @param property - the property name in the manifest
|
|
293
|
+
* @param noWorklistI18nKey - the i18n key specifying the warning message in case the property is used in a worklist scenario
|
|
294
|
+
* @param syncRuleProvider - the sync rule provider for the specified manifest property
|
|
295
|
+
* @returns the syncRule for the specified manifest property
|
|
296
|
+
*/
|
|
297
|
+
function getOnlyTopLevelNotWorklistSyncRule(property, noWorklistI18nKey, syncRuleProvider) {
|
|
298
|
+
return {
|
|
299
|
+
processingRuleAdapter(processingRule, schemaHandlingParams, generateParameters) {
|
|
300
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
301
|
+
if (tableParams.multiTableInfo?.variantInfo) {
|
|
302
|
+
delete processingRule.element; // ignore this property on level of single views in multi-table scenario
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (tableParams.settings?.isWorklist) {
|
|
306
|
+
const disallowedReason = i18next_1.default.t(noWorklistI18nKey);
|
|
307
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath, []);
|
|
308
|
+
const { value } = (0, utils_2.getManifestPropertyByPath)(generateParameters.manifest, manifestPath, property);
|
|
309
|
+
(0, manifestPropertyUtils_1.handleDisallowedProperty)(disallowedReason, processingRule, value, manifestPath);
|
|
310
|
+
return;
|
|
311
|
+
}
|
|
312
|
+
processingRule.referenceAdaptation = {
|
|
313
|
+
syncRuleProvider: syncRuleProvider
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
};
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Modifies a schema element such that the fields of the given entity type are added as enumeration values.
|
|
320
|
+
*
|
|
321
|
+
* @param element - the schema element to be modified
|
|
322
|
+
* @param entityTypeDefinition - the entity type hosting the fields
|
|
323
|
+
*/
|
|
324
|
+
function addEntityTypeFieldsAsEnum(element, entityTypeDefinition) {
|
|
325
|
+
const itemsEnum = entityTypeDefinition.entityProperties.map((property) => property.name);
|
|
326
|
+
element.items = {
|
|
327
|
+
type: 'string',
|
|
328
|
+
enum: itemsEnum
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
class DataLoadSettings {
|
|
332
|
+
}
|
|
333
|
+
exports.DataLoadSettings = DataLoadSettings;
|
|
334
|
+
__decorate([
|
|
335
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/b736ab6ae3654789ba1f9630e5720af3?q=loadDataOnAppLaunch'),
|
|
336
|
+
(0, decoration_1.syncRule)({
|
|
337
|
+
manifest: {},
|
|
338
|
+
processingRuleAdapter(processingRule, schemaHandlingParams) {
|
|
339
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath, [
|
|
340
|
+
'dataLoadSettings'
|
|
341
|
+
]);
|
|
342
|
+
processingRule.manifestPath = manifestPath;
|
|
343
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
344
|
+
if (tableParams.multiTableInfo && !tableParams.multiTableInfo.variantInfo) {
|
|
345
|
+
processingRule.element.description += '\n' + i18next_1.default.t('LOADDATAONAPPLAUNCHMULTITABLE'); // add information to the description providing specific information in multi-table scenarios
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
}),
|
|
349
|
+
(0, decoration_1.validity)({
|
|
350
|
+
since: '1.75.2'
|
|
351
|
+
})
|
|
352
|
+
], DataLoadSettings.prototype, "loadDataOnAppLaunch", void 0);
|
|
353
|
+
class CreateWithFilters {
|
|
354
|
+
}
|
|
355
|
+
exports.CreateWithFilters = CreateWithFilters;
|
|
356
|
+
__decorate([
|
|
357
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/189e2d8a59f04a2693a4fde7f4a91a65?q=createWithFilters'),
|
|
358
|
+
(0, decoration_1.syncRule)({
|
|
359
|
+
manifest: {},
|
|
360
|
+
processingRuleAdapter(processingRule, schemaHandlingParams) {
|
|
361
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath, [
|
|
362
|
+
'createWithFilters'
|
|
363
|
+
]);
|
|
364
|
+
processingRule.manifestPath = manifestPath;
|
|
365
|
+
}
|
|
366
|
+
})
|
|
367
|
+
], CreateWithFilters.prototype, "strategy", void 0);
|
|
368
|
+
class Fields4CreateWithParametersDialog {
|
|
369
|
+
}
|
|
370
|
+
exports.Fields4CreateWithParametersDialog = Fields4CreateWithParametersDialog;
|
|
371
|
+
__decorate([
|
|
372
|
+
(0, decoration_1.validity)({
|
|
373
|
+
since: '1.77.0'
|
|
374
|
+
}),
|
|
375
|
+
(0, decoration_1.syncRule)({
|
|
376
|
+
processingRuleAdapter(processingRule, schemaHandlingParams) {
|
|
377
|
+
const entityTypeDefinition = schemaHandlingParams.specificParams;
|
|
378
|
+
addEntityTypeFieldsAsEnum(processingRule.element, entityTypeDefinition);
|
|
379
|
+
}
|
|
380
|
+
})
|
|
381
|
+
], Fields4CreateWithParametersDialog.prototype, "fields", void 0);
|
|
120
382
|
class Table {
|
|
121
383
|
} // Table
|
|
122
384
|
exports.Table = Table;
|
|
123
385
|
__decorate([
|
|
124
386
|
(0, decoration_1.syncRule)((0, MultiTable_1.getSyncRuleForMultiTableManifestProperty)('entitySet')),
|
|
125
|
-
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/
|
|
387
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/6698b80fc1a543ebb5c07e0781e9b93e')
|
|
126
388
|
], Table.prototype, "entitySet", void 0);
|
|
127
389
|
__decorate([
|
|
128
390
|
(0, decoration_1.syncRule)((0, MultiTable_1.getSyncRuleForMultiTableManifestProperty)('annotationPath')),
|
|
129
|
-
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/
|
|
391
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/97dfeea4a8c346368cea6bf7a3e85478')
|
|
130
392
|
], Table.prototype, "annotationPath", void 0);
|
|
131
393
|
__decorate([
|
|
132
394
|
(0, decoration_1.syncRule)((0, MultiTable_1.getSyncRuleForMultiTableManifestProperty)('showItemNavigationOnChart'))
|
|
@@ -141,12 +403,325 @@ __decorate([
|
|
|
141
403
|
(0, decoration_1.syncRule)(syncRuleForFlexSmartTable)
|
|
142
404
|
], Table.prototype, "showTablePersonalisation", void 0);
|
|
143
405
|
__decorate([
|
|
144
|
-
(0, decoration_1.syncRule)(syncRuleForFlexSmartTable)
|
|
145
|
-
(0, decoration_1.validity)({
|
|
146
|
-
since: '1.50.0'
|
|
147
|
-
})
|
|
406
|
+
(0, decoration_1.syncRule)(syncRuleForFlexSmartTable)
|
|
148
407
|
], Table.prototype, "exportType", void 0);
|
|
149
408
|
__decorate([
|
|
150
409
|
(0, decoration_1.syncRule)(syncRuleForFlexSmartTable)
|
|
151
410
|
], Table.prototype, "useExportToExcel", void 0);
|
|
411
|
+
__decorate([
|
|
412
|
+
(0, decoration_1.syncRule)(getSyncRuleForFlexResponsiveTable(false))
|
|
413
|
+
], Table.prototype, "growingThreshold", void 0);
|
|
414
|
+
__decorate([
|
|
415
|
+
(0, decoration_1.syncRule)(getSyncRuleForFlexResponsiveTable(true))
|
|
416
|
+
], Table.prototype, "popinLayout", void 0);
|
|
417
|
+
__decorate([
|
|
418
|
+
(0, decoration_1.syncRule)(getSyncRuleForFlexResponsiveTable(false))
|
|
419
|
+
], Table.prototype, "includeItemInSelection", void 0);
|
|
420
|
+
__decorate([
|
|
421
|
+
(0, decoration_1.syncRule)((0, manifestPropertyUtils_1.getSyncRuleForManifestProperty)('tableType',
|
|
422
|
+
// analyze:
|
|
423
|
+
function (element, schemaHandlingParams) {
|
|
424
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
425
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath);
|
|
426
|
+
// Property tableType is obsolete. For views in a multi-table scenario it was even never supported.
|
|
427
|
+
const disallowedReason = tableParams.multiTableInfo?.variantInfo
|
|
428
|
+
? manifestPropertyUtils_1.DISALLOWED_WITHOUT_EXPLANATION
|
|
429
|
+
: i18next_1.default.t('PROPERTYOBSOLETE', { property: 'tableType' });
|
|
430
|
+
return {
|
|
431
|
+
manifestPath,
|
|
432
|
+
disallowedReason
|
|
433
|
+
};
|
|
434
|
+
} // analyze
|
|
435
|
+
))
|
|
436
|
+
], Table.prototype, "tableType", void 0);
|
|
437
|
+
__decorate([
|
|
438
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('type', undefined,
|
|
439
|
+
// adapt:
|
|
440
|
+
function (element, schemaHandlingParams) {
|
|
441
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
442
|
+
// defaultTypeForMultiView is only set when we are on variant level and the generic level explicitly sets a type
|
|
443
|
+
const defaultTypeForMultiView = tableParams.multiTableInfo?.variantInfo && tableParams.settings?.tableSettings
|
|
444
|
+
? tableParams.settings.tableSettings['type']
|
|
445
|
+
: '';
|
|
446
|
+
if (tableParams.multiTableInfo?.variantInfo &&
|
|
447
|
+
tableParams.multiTableInfo.usedTableTypes.nonResponsive > 0 &&
|
|
448
|
+
tableParams.multiTableInfo.usedTableTypes.responsive > 0) {
|
|
449
|
+
// We have an illegal combination of responsive and non-responsive table types in a multi-view setting.
|
|
450
|
+
// We will add this as an error to all instances that defer from the default.
|
|
451
|
+
const defaultTableType = defaultTypeForMultiView || getDefaultTableType(tableParams.entityType);
|
|
452
|
+
const isDefaultResponsive = defaultTableType === v2.TableTypeV2Enum.ResponsiveTable;
|
|
453
|
+
if (isResponsiveTable(tableParams) !== isDefaultResponsive) {
|
|
454
|
+
// This is a variant which defers from the default -> consider it as being a reason for the incorrect setup
|
|
455
|
+
element[ux_specification_types_1.SchemaTag.messages] = [
|
|
456
|
+
{
|
|
457
|
+
text: i18next_1.default.t(isDefaultResponsive ? 'MULTITABLEONLYRESPONSIVE' : 'MULTITABLENORESPONSIVE'),
|
|
458
|
+
type: ux_specification_types_1.PropertyMessageType.Warning
|
|
459
|
+
}
|
|
460
|
+
];
|
|
461
|
+
}
|
|
462
|
+
}
|
|
463
|
+
// The generic schema element points to TableTypeV2Enum which provides all possible table types as an enumeration.
|
|
464
|
+
// In the following cases we need to reduce this enumeration:
|
|
465
|
+
// 1. type for one view in a multi-table scenario in order to avoid combinations of responsive and non-responsive table types
|
|
466
|
+
// 2. Remove AnalyticalTable in case the entity type is not analytical
|
|
467
|
+
// As we cannot determine whether an entity type is analytical yet, we ignore the second case.
|
|
468
|
+
if (tableParams.multiTableInfo?.variantInfo /* || !isTypeAnalytical(tableParams.entityType) */) {
|
|
469
|
+
delete element.$ref; // Remove reference to TableTypeV2Enum
|
|
470
|
+
const enumEntries = [];
|
|
471
|
+
// When
|
|
472
|
+
// - dealing with a variant of a multi-view scenario and
|
|
473
|
+
// - the generic level sets a non-responsive type as default and
|
|
474
|
+
// - there is indeed no responsive table variant yet and
|
|
475
|
+
// - there is at least one other non-responsive table variant
|
|
476
|
+
// In this case changing the type to responsive would automatically break the app, since it creates a mixture of responsive and non-responsive tables.
|
|
477
|
+
// => Suppress responsive from the value-help. If the user really wants to change all variants to responsive he should first remove the explicit generic setting defaulting to non-responsive.
|
|
478
|
+
if (!defaultTypeForMultiView ||
|
|
479
|
+
defaultTypeForMultiView === v2.TableTypeV2Enum.ResponsiveTable ||
|
|
480
|
+
tableParams.multiTableInfo.usedTableTypes.responsive > 0 ||
|
|
481
|
+
tableParams.multiTableInfo.usedTableTypes.nonResponsive < 2) {
|
|
482
|
+
// In all other cases add 'responsive' to the value-help
|
|
483
|
+
enumEntries.push(v2.TableTypeV2Enum.ResponsiveTable);
|
|
484
|
+
}
|
|
485
|
+
if (defaultTypeForMultiView !== v2.TableTypeV2Enum.ResponsiveTable ||
|
|
486
|
+
tableParams.multiTableInfo.usedTableTypes.nonResponsive > 0 ||
|
|
487
|
+
tableParams.multiTableInfo.usedTableTypes.responsive < 2) {
|
|
488
|
+
// Same as above, interchanging the roles of responsive and non-responsive.
|
|
489
|
+
enumEntries.push(v2.TableTypeV2Enum.GridTable);
|
|
490
|
+
//if (isAnalytical(tableParams.entityType)){ // todo: activate this condition
|
|
491
|
+
enumEntries.push(v2.TableTypeV2Enum.AnalyticalTable);
|
|
492
|
+
//}
|
|
493
|
+
enumEntries.push(v2.TableTypeV2Enum.TreeTable);
|
|
494
|
+
}
|
|
495
|
+
(0, common_1.addEnumToSchema)(enumEntries, element);
|
|
496
|
+
}
|
|
497
|
+
}, // adapt
|
|
498
|
+
undefined, 'string')),
|
|
499
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/5d270547f113468e83e06dd7ee408a45')
|
|
500
|
+
], Table.prototype, "type", void 0);
|
|
501
|
+
__decorate([
|
|
502
|
+
(0, decoration_1.syncRule)((0, manifestPropertyUtils_1.getSyncRuleForManifestProperty)('condensedTableLayout',
|
|
503
|
+
// analyze:
|
|
504
|
+
function (element, schemaHandlingParams) {
|
|
505
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
506
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath);
|
|
507
|
+
let disallowedReason;
|
|
508
|
+
if (tableParams.multiTableInfo?.variantInfo) {
|
|
509
|
+
disallowedReason = manifestPropertyUtils_1.DISALLOWED_WITHOUT_EXPLANATION; // Setting is not allowed on level of views. Hence, ignore it here without any feedback.
|
|
510
|
+
}
|
|
511
|
+
else if (isResponsiveTable(tableParams)) {
|
|
512
|
+
disallowedReason = i18next_1.default.t('CONDENSEDTABLELAYOUTNOEFFECT');
|
|
513
|
+
}
|
|
514
|
+
return {
|
|
515
|
+
manifestPath,
|
|
516
|
+
disallowedReason
|
|
517
|
+
};
|
|
518
|
+
} // analyze
|
|
519
|
+
))
|
|
520
|
+
], Table.prototype, "condensedTableLayout", void 0);
|
|
521
|
+
__decorate([
|
|
522
|
+
(0, decoration_1.syncRule)((0, manifestPropertyUtils_1.getSyncRuleForManifestProperty)('enableTableFilterInPageVariant',
|
|
523
|
+
// analyze:
|
|
524
|
+
function (element, schemaHandlingParams) {
|
|
525
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
526
|
+
const manifestPath = (0, utils_2.getManifestPathToPageSettings)(schemaHandlingParams.pageInfo.pagePath);
|
|
527
|
+
let disallowedReason;
|
|
528
|
+
if (tableParams.multiTableInfo?.variantInfo) {
|
|
529
|
+
disallowedReason = manifestPropertyUtils_1.DISALLOWED_WITHOUT_EXPLANATION; // Setting is not allowed on level of views. Hence, ignore it here without any feedback.
|
|
530
|
+
}
|
|
531
|
+
else if (tableParams.settings?.isWorklist) {
|
|
532
|
+
disallowedReason = i18next_1.default.t('ENABLETABLEFILTERINPAGEVARIANTWORKLIST');
|
|
533
|
+
}
|
|
534
|
+
else if (tableParams.settings?.smartVariantManagement === false) {
|
|
535
|
+
disallowedReason = i18next_1.default.t('ENABLETABLEFILTERINPAGEVARIANTNOEFFECT');
|
|
536
|
+
}
|
|
537
|
+
return {
|
|
538
|
+
manifestPath,
|
|
539
|
+
disallowedReason
|
|
540
|
+
};
|
|
541
|
+
} // analyze
|
|
542
|
+
))
|
|
543
|
+
], Table.prototype, "enableTableFilterInPageVariant", void 0);
|
|
544
|
+
__decorate([
|
|
545
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('inlineDelete',
|
|
546
|
+
// getDisallowReason
|
|
547
|
+
function (tableParams) {
|
|
548
|
+
return isResponsiveTable(tableParams) ? undefined : i18next_1.default.t('INLINEDELETEONLYRESPONSIVE');
|
|
549
|
+
}, // getDisallowedReason
|
|
550
|
+
//adapt:
|
|
551
|
+
function (element, schemaHandlingParams, generateParameters, value) {
|
|
552
|
+
if (value === true && isMultiSelect(schemaHandlingParams.specificParams)) {
|
|
553
|
+
element[ux_specification_types_1.SchemaTag.messages] = [
|
|
554
|
+
{
|
|
555
|
+
text: i18next_1.default.t('NOINLINEDELETEANDMULTISELECT'),
|
|
556
|
+
deletable: true,
|
|
557
|
+
type: ux_specification_types_1.PropertyMessageType.Warning
|
|
558
|
+
}
|
|
559
|
+
];
|
|
560
|
+
}
|
|
561
|
+
} // adapt
|
|
562
|
+
))
|
|
563
|
+
], Table.prototype, "inlineDelete", void 0);
|
|
564
|
+
__decorate([
|
|
565
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('multiSelect', undefined, // getDisallowedReason
|
|
566
|
+
//adapt:
|
|
567
|
+
function (element, schemaHandlingParams, generateParameters, value) {
|
|
568
|
+
// Problematic scenario: multiSelect and inlineDelete switched on at the same time. Can only happen for responsive tables as inlineDelete is only available for responsive tables.
|
|
569
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
570
|
+
if (value !== true || !isResponsiveTable(tableParams)) {
|
|
571
|
+
return;
|
|
572
|
+
}
|
|
573
|
+
const tableSettings = getTableSettings(tableParams);
|
|
574
|
+
if (tableSettings?.['inlineDelete'] === true) {
|
|
575
|
+
element[ux_specification_types_1.SchemaTag.messages] = [
|
|
576
|
+
{
|
|
577
|
+
text: i18next_1.default.t('NOINLINEDELETEANDMULTISELECT'),
|
|
578
|
+
deletable: true,
|
|
579
|
+
type: ux_specification_types_1.PropertyMessageType.Warning
|
|
580
|
+
}
|
|
581
|
+
];
|
|
582
|
+
}
|
|
583
|
+
} // adapt
|
|
584
|
+
)),
|
|
585
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/402fac73b4794a31983609ebdde580d2')
|
|
586
|
+
], Table.prototype, "multiSelect", void 0);
|
|
587
|
+
__decorate([
|
|
588
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('selectAll',
|
|
589
|
+
// getDisallowReason:
|
|
590
|
+
function (tableParams, generateParameters, element) {
|
|
591
|
+
if (!isMultiSelect(tableParams)) {
|
|
592
|
+
// In this case the function returns a disallowedReason. Therefore, the adapt function will not be called.
|
|
593
|
+
// Still the property may be shown to the user (in case it contains a value).
|
|
594
|
+
// The description contains markups that allow the adapt function (below) to provide the correct text depending on the table type.
|
|
595
|
+
// For the warning scenario we simply remove this part.
|
|
596
|
+
element.description = element.description.split('\n')[0];
|
|
597
|
+
return i18next_1.default.t('SELECTALLNOMULTISELECT');
|
|
598
|
+
}
|
|
599
|
+
}, // getDisallowReason
|
|
600
|
+
// adapt:
|
|
601
|
+
function (element, schemaHandlingParams) {
|
|
602
|
+
// add table type dependent information to the description of the property.
|
|
603
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
604
|
+
const i18nForDefaultInfo = isUiTable(tableParams)
|
|
605
|
+
? 'SELECTALLDEFAULTINFOUITABLE'
|
|
606
|
+
: 'SELECTALLDEFAULTINFORESPONSIVETABLE';
|
|
607
|
+
element.description += '\n' + i18next_1.default.t(i18nForDefaultInfo);
|
|
608
|
+
} // adapt
|
|
609
|
+
))
|
|
610
|
+
], Table.prototype, "selectAll", void 0);
|
|
611
|
+
__decorate([
|
|
612
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('selectionLimit', function (tableParams) {
|
|
613
|
+
if (!isUiTable(tableParams) || !isMultiSelect(tableParams)) {
|
|
614
|
+
return i18next_1.default.t('SELECTIONLIMITPREREQUISIT');
|
|
615
|
+
}
|
|
616
|
+
if (isSelectAll(tableParams)) {
|
|
617
|
+
return i18next_1.default.t('SELECTIONLIMITNOSELECTALL');
|
|
618
|
+
}
|
|
619
|
+
})),
|
|
620
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/116b5d82e8c545e2a56e1b51b8b0a9bd?q=selectionLimit')
|
|
621
|
+
], Table.prototype, "selectionLimit", void 0);
|
|
622
|
+
__decorate([
|
|
623
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('copy')),
|
|
624
|
+
(0, decoration_1.validity)({
|
|
625
|
+
since: '1.120.0'
|
|
626
|
+
}),
|
|
627
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/c0f6592a592e47f9bb6d09900de47412')
|
|
628
|
+
], Table.prototype, "copy", void 0);
|
|
629
|
+
__decorate([
|
|
630
|
+
(0, decoration_1.syncRule)(getOnlyTopLevelNotWorklistSyncRule('dataLoadSettings', 'NODATALOADSETTINGSINWORKLIST', DataLoadSettings))
|
|
631
|
+
], Table.prototype, "dataLoadSettings", void 0);
|
|
632
|
+
__decorate([
|
|
633
|
+
(0, decoration_1.syncRule)(getOnlyTopLevelNotWorklistSyncRule('createWithFilters', 'NOCREATEWITHFILTERSINWORKLIST', CreateWithFilters))
|
|
634
|
+
], Table.prototype, "createWithFilters", void 0);
|
|
635
|
+
__decorate([
|
|
636
|
+
(0, decoration_1.validity)({
|
|
637
|
+
since: '1.77.0'
|
|
638
|
+
}),
|
|
639
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/2d04f60da84a49f6bb8617fbf1d3d2aa'),
|
|
640
|
+
(0, decoration_1.syncRule)(getSyncRuleForTableSettingsProperty('createWithParameterDialog',
|
|
641
|
+
// getDisallowReason:
|
|
642
|
+
function (tableParams, generateParameters) {
|
|
643
|
+
const entitySet = getEntitySet(tableParams, generateParameters);
|
|
644
|
+
if (!entitySet) {
|
|
645
|
+
return manifestPropertyUtils_1.DISALLOWED_WITHOUT_EXPLANATION;
|
|
646
|
+
}
|
|
647
|
+
const draftInfo = (0, utils_2.getDraftInfo)(entitySet);
|
|
648
|
+
if (draftInfo.isDraft) {
|
|
649
|
+
return i18next_1.default.t('CREATEWITHDIALOGDRAFT');
|
|
650
|
+
}
|
|
651
|
+
}, // getDisallowReason
|
|
652
|
+
// adapt:
|
|
653
|
+
function (element, schemaHandlingParams, generateParameters, value) {
|
|
654
|
+
(0, utils_2.addConversionExit)(element, 'createWithParameterDialog', value);
|
|
655
|
+
}, // adapt
|
|
656
|
+
// provideReferenceAdaptation:
|
|
657
|
+
function (tableParams) {
|
|
658
|
+
return {
|
|
659
|
+
syncRuleProvider: Fields4CreateWithParametersDialog,
|
|
660
|
+
specificParams: tableParams.multiTableInfo?.variantInfo
|
|
661
|
+
? tableParams.multiTableInfo.variantInfo.entityTypeDefinition
|
|
662
|
+
: tableParams.entityType,
|
|
663
|
+
suffix: tableParams.multiTableInfo?.variantInfo
|
|
664
|
+
? tableParams.multiTableInfo.variantInfo.iconTabFilterKey
|
|
665
|
+
: undefined
|
|
666
|
+
};
|
|
667
|
+
}, // provideReferenceAdaptation
|
|
668
|
+
'object'))
|
|
669
|
+
], Table.prototype, "createWithParameterDialog", void 0);
|
|
670
|
+
__decorate([
|
|
671
|
+
(0, decoration_1.validity)({
|
|
672
|
+
since: '1.98.0'
|
|
673
|
+
}),
|
|
674
|
+
(0, decoration_1.descriptionSrcURL)('https://ui5.sap.com/sdk/#/topic/7cc4f04364c540c397130ff92f84c3ca'),
|
|
675
|
+
(0, decoration_1.syncRule)(MultiEdit_1.syncRuleMultiEdit)
|
|
676
|
+
], Table.prototype, "multiEdit", void 0);
|
|
677
|
+
__decorate([
|
|
678
|
+
(0, decoration_1.syncRule)({
|
|
679
|
+
processingRuleAdapter(processingRule, schemaHandlingParams) {
|
|
680
|
+
const tableParams = schemaHandlingParams.specificParams;
|
|
681
|
+
if (tableParams.multiTableInfo && !tableParams.multiTableInfo.variantInfo) {
|
|
682
|
+
delete processingRule.element; // no toolbar defined in the global table settings in the multi-table case
|
|
683
|
+
return;
|
|
684
|
+
}
|
|
685
|
+
processingRule.element[ux_specification_types_1.SchemaTag.propertyIndex] = 0;
|
|
686
|
+
const lineItemInfo = tableParams.multiTableInfo
|
|
687
|
+
? tableParams.multiTableInfo.variantInfo.lineItemInfo
|
|
688
|
+
: tableParams.lineItemInfo;
|
|
689
|
+
const isChart = tableParams.multiTableInfo?.variantInfo?.isChart;
|
|
690
|
+
const iconTabFilterKey = tableParams.multiTableInfo?.variantInfo?.iconTabFilterKey;
|
|
691
|
+
(0, Action_1.adaptProcessingRuleForToolbar)(processingRule, utils_1.DataFieldTarget.Toolbar, lineItemInfo?.dataFieldInfos ?? [], isChart, iconTabFilterKey);
|
|
692
|
+
}
|
|
693
|
+
})
|
|
694
|
+
], Table.prototype, "toolbar", void 0);
|
|
695
|
+
/**
|
|
696
|
+
* ConversionExit for property createWithParameterDialog of Table control.
|
|
697
|
+
* Converts between the manifest representation (object with field names as keys) and the config representation (object with array of field names).
|
|
698
|
+
*/
|
|
699
|
+
exports.CREATE_WITH_PARAMETER_DIALOG = {
|
|
700
|
+
appToConfig(appValue, parameters, fragments, definition, logger) {
|
|
701
|
+
const hasTypeError = (0, manifestPropertyUtils_1.hasPropertyTypeError)(appValue, 'fields', logger, 'object');
|
|
702
|
+
return appValue && !hasTypeError
|
|
703
|
+
? {
|
|
704
|
+
fields: Object.keys(appValue['fields'])
|
|
705
|
+
}
|
|
706
|
+
: undefined;
|
|
707
|
+
},
|
|
708
|
+
configToApp(configValue, parameters, fragments, definition, oldAppValue) {
|
|
709
|
+
const configFields = configValue?.['fields'];
|
|
710
|
+
if (Array.isArray(configFields)) {
|
|
711
|
+
const newAppValue = oldAppValue && typeof oldAppValue === 'object' ? { ...oldAppValue } : {};
|
|
712
|
+
if (configFields.length === 0) {
|
|
713
|
+
delete newAppValue['fields'];
|
|
714
|
+
return (0, utils_2.isEmpty)(newAppValue) ? undefined : newAppValue;
|
|
715
|
+
}
|
|
716
|
+
const fields = {}; // the new entry for the fields-property
|
|
717
|
+
const fieldsAsArray = configFields;
|
|
718
|
+
fieldsAsArray.forEach(function (field) {
|
|
719
|
+
fields[field] = { path: field };
|
|
720
|
+
});
|
|
721
|
+
newAppValue['fields'] = fields;
|
|
722
|
+
return newAppValue;
|
|
723
|
+
}
|
|
724
|
+
return oldAppValue; // the fields-property in configValue was untouched (since every change would have converted it into an array). Hence, keep the old value.
|
|
725
|
+
}
|
|
726
|
+
};
|
|
152
727
|
//# sourceMappingURL=Table.js.map
|