@sap-ux/fe-fpm-writer
Advanced tools
Comparing version 0.17.3 to 0.17.4
@@ -30,2 +30,12 @@ "use strict"; | ||
/** | ||
* Get additional dependencies for fragment.xml template based on passed ui5 version. | ||
* | ||
* @param ui5Version required UI5 version. | ||
* @returns Additional dependencies for fragment.xml | ||
*/ | ||
function getAdditionalDependencies(ui5Version) { | ||
const minVersion = semver_1.coerce(ui5Version); | ||
return !minVersion || minVersion.minor >= 90 ? { 'xmlns:macros': 'sap.fe.macros' } : undefined; | ||
} | ||
/** | ||
* Enhances the provided custom section configuration with additonal data. | ||
@@ -48,2 +58,4 @@ * | ||
config.content = config.control || defaults_1.getDefaultFragmentContent(config.name, config.eventHandler); | ||
// Additional dependencies to include into 'Fragment.xml' | ||
config.dependencies = getAdditionalDependencies(config.minUI5Version); | ||
return config; | ||
@@ -50,0 +62,0 @@ } |
@@ -20,5 +20,9 @@ import type { CustomElement, InternalCustomElement, Position, EventHandler } from '../common/types'; | ||
} | ||
export interface CustomSectionDependencies { | ||
[key: string]: string; | ||
} | ||
export interface InternalCustomSection extends CustomSection, InternalCustomElement { | ||
content: string; | ||
dependencies?: CustomSectionDependencies; | ||
} | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "@sap-ux/fe-fpm-writer", | ||
"description": "SAP Fiori elements flexible programming model writer", | ||
"version": "0.17.3", | ||
"version": "0.17.4", | ||
"repository": { | ||
@@ -43,4 +43,4 @@ "type": "git", | ||
"scripts": { | ||
"build": "pnpm clean && tsc", | ||
"clean": "rimraf dist", | ||
"build": "pnpm clean && tsc -p tsconfig-build.json", | ||
"clean": "rimraf dist test/test-output", | ||
"format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore", | ||
@@ -47,0 +47,0 @@ "lint": "eslint . --ext .ts", |
Sorry, the diff of this file is not supported yet
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
153844
3299