@sap/ux-specification 1.96.105 → 1.96.107

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