@sapui5/sap.fe.base 1.126.2 → 1.127.1

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.
@@ -65,6 +65,7 @@ const DT_DESIGNTIME = "dt:designtime";
65
65
  const CORE_REQUIRE = "core:require";
66
66
  const LOG_SOURCEPATH = "log:sourcePath";
67
67
  const CUSTOM_LOADVALUE = "customData:loadValue";
68
+ const CUSTOM_ENTITYTYPE = "customData:entityType";
68
69
  const CUSTOM_URL = "customData:url";
69
70
 
70
71
  function processObjectPropertyValue(
@@ -134,7 +135,7 @@ function processProperties<T>(
134
135
  if (propertyName === LOG_SOURCEPATH) {
135
136
  propertiesString.push(`xmlns:log="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"`);
136
137
  }
137
- if (propertyName === CUSTOM_URL || propertyName === CUSTOM_LOADVALUE) {
138
+ if (propertyName === CUSTOM_URL || propertyName === CUSTOM_LOADVALUE || propertyName === CUSTOM_ENTITYTYPE) {
138
139
  propertiesString.push(`xmlns:customData="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1"`);
139
140
  }
140
141
  if (propertyValue && typeof propertyValue === "object") {
@@ -157,7 +158,7 @@ function processProperties<T>(
157
158
  } else {
158
159
  aggregationString.push(processObjectPropertyValue(propertyValue as Record<string, string>, undefined, propertyName));
159
160
  }
160
- } else {
161
+ } else if (mSettings[propertyName] !== null) {
161
162
  const prop = mSettings[propertyName] as string | boolean | number;
162
163
  propertiesString.push(`${propertyName}='${escapeXMLAttributeValue(prop.toString())}'`);
163
164
  }
@@ -233,7 +234,7 @@ function processAggregations(
233
234
  propertiesString.push(`${aggregationName}='${JSON.stringify(mSettings[aggregationName])}'`);
234
235
  } else {
235
236
  // In some case the aggregation expect a string value (like for the tooltip), in this case we set it directly as a property
236
- propertiesString.push(`${aggregationName}='${mSettings[aggregationName]}'`);
237
+ propertiesString.push(`${aggregationName}='${escapeXMLAttributeValue(mSettings[aggregationName] as string)}'`);
237
238
  }
238
239
  }
239
240
  });
@@ -241,8 +242,8 @@ function processAggregations(
241
242
  }
242
243
 
243
244
  const jsxXml = function <T>(
244
- type: typeof Control | typeof BuildingBlockTemplatingBase,
245
- mSettings: NonControlProperties<T> & { key?: string; children?: UI5Element | ControlProperties<T> },
245
+ type: typeof Control | typeof BuildingBlockTemplatingBase | "slot",
246
+ mSettings: NonControlProperties<T> & { key?: string; children?: UI5Element | ControlProperties<T>; name?: string },
246
247
  key: string | undefined,
247
248
  xmlNamespaceMap: Record<string, string>,
248
249
  overrideNodeName?: string
@@ -254,7 +255,9 @@ const jsxXml = function <T>(
254
255
  let metadataAggregations;
255
256
  let defaultAggregationName: string | undefined;
256
257
  let isControl = false;
257
- if (isAControl(type)) {
258
+ if (type === "slot") {
259
+ return `<slot name="${mSettings.name}"/>`;
260
+ } else if (isAControl(type)) {
258
261
  metadata = type.getMetadata();
259
262
  metadataProperties = metadata.getAllProperties();
260
263
  metadataProperties = { ...metadataProperties, ...metadata.getAllEvents(), ...metadata.getAllAssociations() };
@@ -265,7 +268,7 @@ const jsxXml = function <T>(
265
268
  isControl = true;
266
269
  } else {
267
270
  metadata = type.metadata;
268
- metadataProperties = metadata.properties;
271
+ metadataProperties = { ...metadata.properties };
269
272
  metadataAggregations = { ...{ dependents: {}, customData: {} }, ...metadata.aggregations };
270
273
  metadataEvents = {};
271
274
  defaultAggregationName = metadata.defaultAggregation;
@@ -284,6 +287,7 @@ const jsxXml = function <T>(
284
287
  metadataProperties[CORE_REQUIRE] = { name: CORE_REQUIRE };
285
288
  metadataProperties[LOG_SOURCEPATH] = { name: LOG_SOURCEPATH };
286
289
  metadataProperties[CUSTOM_LOADVALUE] = { name: CUSTOM_LOADVALUE };
290
+ metadataProperties[CUSTOM_ENTITYTYPE] = { name: CUSTOM_ENTITYTYPE };
287
291
  metadataProperties[CUSTOM_URL] = { name: CUSTOM_URL };
288
292
  metadataProperties["xmlns:fl"] = { name: FL_DELEGATE };
289
293
  metadataProperties["xmlns:dt"] = { name: DT_DESIGNTIME };
@@ -22,7 +22,7 @@ sap.ui.define(["sap/ui/core/Lib"], function (Library) {
22
22
  controls: [],
23
23
  elements: [],
24
24
  // eslint-disable-next-line no-template-curly-in-string
25
- version: "1.126.2",
25
+ version: "1.127.1",
26
26
  noLibraryCSS: true
27
27
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
28
28
  });