Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sap-ux/fe-fpm-writer

Package Overview
Dependencies
Maintainers
3
Versions
142
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sap-ux/fe-fpm-writer - npm Package Compare versions

Comparing version 0.2.1 to 0.3.0

dist/section/index.d.ts

6

CHANGELOG.md
# @sap-ux/fe-fpm-writer
## 0.3.0
### Minor Changes
- c50f4e0: Custom Section support for fe-fpm-writer
## 0.2.1

@@ -4,0 +10,0 @@

23

dist/column/index.js

@@ -45,19 +45,6 @@ "use strict";

// generate column content
if (config.control) {
config.content = config.control;
}
else {
const content = config.properties && config.properties.length > 0
? `{=%{${config.properties.join("} + ' ' + %{")}}}`
: 'Sample Text';
if (config.eventHandler) {
const parts = config.eventHandler.split('.');
const method = parts.pop();
const handler = parts.join('/');
config.content = `<Button core:require="{ handler: '${handler}'}" text="${content}" press="handler.${method}" />`;
}
else {
config.content = `<Text text="${content}" />`;
}
}
const content = config.properties && config.properties.length > 0
? `{=%{${config.properties.join("} + ' ' + %{")}}}`
: 'Sample Text';
config.content = config.control || (0, defaults_1.getDefaultFragmentContent)(content, config.eventHandler);
return config;

@@ -94,3 +81,3 @@ }

const viewPath = (0, path_1.join)(completeColumn.path, `${completeColumn.name}.fragment.xml`);
fs.copyTpl((0, path_1.join)(root, 'column/ext/CustomColumnFragment.xml'), viewPath, completeColumn);
fs.copyTpl((0, path_1.join)(root, 'common/Fragment.xml'), viewPath, completeColumn);
return fs;

@@ -97,0 +84,0 @@ }

@@ -11,2 +11,12 @@ import { CustomElement, InternalCustomElement, Manifest } from './types';

export declare function setCommonDefaults<T extends CustomElement & Partial<InternalCustomElement>>(config: T, manifestPath: string, manifest: Manifest): InternalCustomElement & T;
/**
* Method to generate default content for xml fragment.
*
* @param {string} text - text of button or label
* @param {string} [eventHandler] - event handler path
* if value is passed then "Button" control with 'press' event would be generated
* if value is not passed then "Text" control would be generated
* @returns default content for fragment
*/
export declare function getDefaultFragmentContent(text: string, eventHandler?: string): string;
//# sourceMappingURL=defaults.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.setCommonDefaults = void 0;
exports.getDefaultFragmentContent = exports.setCommonDefaults = void 0;
const path_1 = require("path");

@@ -25,2 +25,25 @@ /**

exports.setCommonDefaults = setCommonDefaults;
/**
* Method to generate default content for xml fragment.
*
* @param {string} text - text of button or label
* @param {string} [eventHandler] - event handler path
* if value is passed then "Button" control with 'press' event would be generated
* if value is not passed then "Text" control would be generated
* @returns default content for fragment
*/
function getDefaultFragmentContent(text, eventHandler) {
let content;
if (eventHandler) {
const parts = eventHandler.split('.');
const method = parts.pop();
const handler = parts.join('/');
content = `<Button core:require="{ handler: '${handler}'}" text="${text}" press="handler.${method}" />`;
}
else {
content = `<Text text="${text}" />`;
}
return content;
}
exports.getDefaultFragmentContent = getDefaultFragmentContent;
//# sourceMappingURL=defaults.js.map

@@ -7,3 +7,5 @@ export { CustomPage } from './page/types';

export { generateCustomColumn } from './column';
export { CustomSection } from './section/types';
export { generateCustomSection } from './section';
export { validateBasePath, validateVersion } from './common/validate';
//# sourceMappingURL=index.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.validateVersion = exports.validateBasePath = exports.generateCustomColumn = exports.generateCustomAction = exports.TargetControl = exports.generateCustomPage = void 0;
exports.validateVersion = exports.validateBasePath = exports.generateCustomSection = exports.generateCustomColumn = exports.generateCustomAction = exports.TargetControl = exports.generateCustomPage = void 0;
var page_1 = require("./page");

@@ -12,2 +12,4 @@ Object.defineProperty(exports, "generateCustomPage", { enumerable: true, get: function () { return page_1.generateCustomPage; } });

Object.defineProperty(exports, "generateCustomColumn", { enumerable: true, get: function () { return column_1.generateCustomColumn; } });
var section_1 = require("./section");
Object.defineProperty(exports, "generateCustomSection", { enumerable: true, get: function () { return section_1.generateCustomSection; } });
var validate_1 = require("./common/validate");

@@ -14,0 +16,0 @@ Object.defineProperty(exports, "validateBasePath", { enumerable: true, get: function () { return validate_1.validateBasePath; } });

{
"name": "@sap-ux/fe-fpm-writer",
"description": "SAP Fiori elements flexible programming model writer",
"version": "0.2.1",
"version": "0.3.0",
"license": "Apache-2.0",

@@ -6,0 +6,0 @@ "main": "dist/index.js",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc