@sap-ux/fe-fpm-writer
Advanced tools
Comparing version 0.19.1 to 0.20.0
@@ -29,5 +29,6 @@ import type { Editor } from 'mem-fs-editor'; | ||
* @param parameters - parameter configurations for the event handler | ||
* @param templatePath - path to the template without the extension | ||
* @returns {string} full namespace path to method | ||
*/ | ||
export declare function applyEventHandlerConfiguration(fs: Editor, config: Partial<InternalCustomElement>, eventHandler: EventHandlerConfiguration | true | string, controllerSuffix?: boolean, typescript?: boolean, parameters?: EventHandlerTypescriptParameters): string; | ||
export declare function applyEventHandlerConfiguration(fs: Editor, config: Partial<InternalCustomElement>, eventHandler: EventHandlerConfiguration | true | string, controllerSuffix?: boolean, typescript?: boolean, parameters?: EventHandlerTypescriptParameters, templatePath?: string): string; | ||
//# sourceMappingURL=event-handler.d.ts.map |
@@ -34,5 +34,6 @@ "use strict"; | ||
* @param parameters - parameter configurations for the event handler | ||
* @param templatePath - path to the template without the extension | ||
* @returns {string} full namespace path to method | ||
*/ | ||
function applyEventHandlerConfiguration(fs, config, eventHandler, controllerSuffix = false, typescript, parameters = exports.defaultParameter) { | ||
function applyEventHandlerConfiguration(fs, config, eventHandler, controllerSuffix = false, typescript, parameters = exports.defaultParameter, templatePath = 'common/EventHandler') { | ||
if (typeof eventHandler === 'string') { | ||
@@ -45,4 +46,4 @@ // Existing event handler is passed - no need for file creation/update | ||
let insertScript; | ||
// By default - use config name for js file name | ||
let fileName = `${config.name}`; | ||
// By default - use config name for created file name | ||
let fileName = config.name; | ||
if (typeof eventHandler === 'object') { | ||
@@ -61,6 +62,4 @@ if (eventHandler.fnName) { | ||
if (!fs.exists(controllerPath)) { | ||
fs.copyTpl((0, templates_1.getTemplatePath)(`common/EventHandler.${ext}`), controllerPath, { | ||
eventHandlerFnName, | ||
parameters | ||
}); | ||
fs.copyTpl((0, templates_1.getTemplatePath)(`${templatePath}.${ext}`), controllerPath, Object.assign({ eventHandlerFnName, | ||
parameters }, config)); | ||
} | ||
@@ -67,0 +66,0 @@ else if (insertScript) { |
@@ -9,2 +9,4 @@ export { CustomPage, ObjectPage, ListReport } from './page/types'; | ||
export { generateCustomSection, generateCustomSubSection } from './section'; | ||
export { CustomFilter } from './filter/types'; | ||
export { generateCustomFilter } from './filter'; | ||
export { CustomView } from './view/types'; | ||
@@ -11,0 +13,0 @@ export { generateCustomView } from './view'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.generateControllerExtension = exports.ControllerExtensionPageType = exports.generateBuildingBlock = exports.BuildingBlockType = exports.validateVersion = exports.validateBasePath = exports.enableFPM = exports.generateCustomView = exports.generateCustomSubSection = exports.generateCustomSection = exports.generateCustomColumn = exports.generateCustomAction = exports.TargetControl = exports.generateListReport = exports.generateObjectPage = exports.generateCustomPage = void 0; | ||
exports.generateControllerExtension = exports.ControllerExtensionPageType = exports.generateBuildingBlock = exports.BuildingBlockType = exports.validateVersion = exports.validateBasePath = exports.enableFPM = exports.generateCustomView = exports.generateCustomFilter = exports.generateCustomSubSection = exports.generateCustomSection = exports.generateCustomColumn = exports.generateCustomAction = exports.TargetControl = exports.generateListReport = exports.generateObjectPage = exports.generateCustomPage = void 0; | ||
var page_1 = require("./page"); | ||
@@ -17,2 +17,4 @@ Object.defineProperty(exports, "generateCustomPage", { enumerable: true, get: function () { return page_1.generateCustomPage; } }); | ||
Object.defineProperty(exports, "generateCustomSubSection", { enumerable: true, get: function () { return section_1.generateCustomSubSection; } }); | ||
var filter_1 = require("./filter"); | ||
Object.defineProperty(exports, "generateCustomFilter", { enumerable: true, get: function () { return filter_1.generateCustomFilter; } }); | ||
var view_1 = require("./view"); | ||
@@ -19,0 +21,0 @@ Object.defineProperty(exports, "generateCustomView", { enumerable: true, get: function () { return view_1.generateCustomView; } }); |
{ | ||
"name": "@sap-ux/fe-fpm-writer", | ||
"description": "SAP Fiori elements flexible programming model writer", | ||
"version": "0.19.1", | ||
"version": "0.20.0", | ||
"repository": { | ||
@@ -6,0 +6,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
179136
98
3877