UNPKG

ui5_easy_use

Version:

CLI tool for SAP ui5 and SAPUI5 projects to initialize apps, generate pages, insert form and table components, manage routing, and automate i18n bindings

28 lines (24 loc) 776 B
sap.ui.define([], function () { "use strict"; return class Helper { constructor(controller, autoG = []) { this._controllerJS = controller; this.autoG = Array.isArray(autoG) ? autoG : []; } getValuesFromAutoG() { return this.autoG.reduce((acc, field) => { acc[field.fieldName] = field.value; return acc; }, {}); } extractVisibilityAndEditability(autoG = this.autoG) { return (autoG || []).reduce((acc, field) => { acc[field.fieldName] = { visible: field.visible, editable: field.editable }; return acc; }, {}); } }; });