@sap-ux/fiori-generator-shared 0.12.7 → 0.12.8
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.
- package/dist/app-helpers/app-helpers.d.ts +10 -0
- package/dist/app-helpers/app-helpers.js +20 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates a value suitable for use as a semantic object for navigation intents.
|
|
3
|
+
* Removes specific characters that would break the navigation.
|
|
4
|
+
*
|
|
5
|
+
* @param appId
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare const getSemanticObject: (appId: string) => string;
|
|
9
|
+
export declare const getFlpId: (appId: string, action?: string | undefined) => string;
|
|
10
|
+
//# sourceMappingURL=app-helpers.d.ts.map
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getFlpId = exports.getSemanticObject = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Creates a value suitable for use as a semantic object for navigation intents.
|
|
6
|
+
* Removes specific characters that would break the navigation.
|
|
7
|
+
*
|
|
8
|
+
* @param appId
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
11
|
+
const getSemanticObject = (appId) => {
|
|
12
|
+
const semanticObject = appId.replace(/[-_.#]/g, '');
|
|
13
|
+
return semanticObject.length > 30 ? semanticObject.substring(0, 30) : semanticObject;
|
|
14
|
+
};
|
|
15
|
+
exports.getSemanticObject = getSemanticObject;
|
|
16
|
+
const getFlpId = (appId, action) => {
|
|
17
|
+
return `${(0, exports.getSemanticObject)(appId)}${action ? '-' + action : ''}`;
|
|
18
|
+
};
|
|
19
|
+
exports.getFlpId = getFlpId;
|
|
20
|
+
//# sourceMappingURL=app-helpers.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export { getBootstrapResourceUrls } from './ui5/ui5';
|
|
|
10
10
|
export { getDefaultTargetFolder, isExtensionInstalled } from './vscode-helpers/vscode-helpers';
|
|
11
11
|
export { generateAppGenInfo } from './app-gen-info';
|
|
12
12
|
export { getHostEnvironment } from './environment';
|
|
13
|
+
export { getFlpId, getSemanticObject } from './app-helpers/app-helpers';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.getHostEnvironment = exports.generateAppGenInfo = exports.isExtensionInstalled = exports.getDefaultTargetFolder = exports.getBootstrapResourceUrls = exports.getPackageScripts = void 0;
|
|
17
|
+
exports.getSemanticObject = exports.getFlpId = exports.getHostEnvironment = exports.generateAppGenInfo = exports.isExtensionInstalled = exports.getDefaultTargetFolder = exports.getBootstrapResourceUrls = exports.getPackageScripts = void 0;
|
|
18
18
|
__exportStar(require("./cap"), exports);
|
|
19
19
|
__exportStar(require("./constants"), exports);
|
|
20
20
|
__exportStar(require("./environment"), exports);
|
|
@@ -33,4 +33,7 @@ var app_gen_info_1 = require("./app-gen-info");
|
|
|
33
33
|
Object.defineProperty(exports, "generateAppGenInfo", { enumerable: true, get: function () { return app_gen_info_1.generateAppGenInfo; } });
|
|
34
34
|
var environment_1 = require("./environment");
|
|
35
35
|
Object.defineProperty(exports, "getHostEnvironment", { enumerable: true, get: function () { return environment_1.getHostEnvironment; } });
|
|
36
|
+
var app_helpers_1 = require("./app-helpers/app-helpers");
|
|
37
|
+
Object.defineProperty(exports, "getFlpId", { enumerable: true, get: function () { return app_helpers_1.getFlpId; } });
|
|
38
|
+
Object.defineProperty(exports, "getSemanticObject", { enumerable: true, get: function () { return app_helpers_1.getSemanticObject; } });
|
|
36
39
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-generator-shared",
|
|
3
3
|
"description": "Commonly used shared functionality and types to support the fiori generator.",
|
|
4
|
-
"version": "0.12.
|
|
4
|
+
"version": "0.12.8",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|