Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:54:49 +08:00
commit 9d01254182
21 changed files with 3697 additions and 0 deletions

View File

@@ -0,0 +1,87 @@
{
"_version": "1.52.0",
"_comment": "UI Integration Card manifest template for SAP Build Work Zone",
"sap.app": {
"id": "{{namespace}}.{{cardName}}",
"type": "card",
"title": "{{Card Title}}",
"subTitle": "{{Card Subtitle}}",
"applicationVersion": {
"version": "1.0.0"
},
"dataSources": {
"_comment": "Note: This dataSources section documents the OData service metadata. Actual data fetching uses the destinations configuration in sap.card below.",
"mainService": {
"uri": "{{OData Service URL}}",
"type": "OData",
"settings": {
"odataVersion": "2.0"
}
}
}
},
"sap.ui": {
"technology": "UI5",
"icons": {
"icon": "sap-icon://card"
}
},
"sap.card": {
"type": "List",
"designtime": "dt/configuration",
"configuration": {
"destinations": {
"_comment": "Destinations are resolved at runtime via SAP BTP destination service",
"myDestination": {
"name": "{{Destination Name}}"
}
},
"parameters": {
"maxItems": {
"value": 5,
"type": "integer",
"label": "Maximum Items"
}
}
},
"header": {
"title": "{{Card Title}}",
"subTitle": "{{Card Subtitle}}",
"icon": {
"src": "sap-icon://list"
},
"status": {
"text": "{= ${count} + ' items'}"
}
},
"content": {
"data": {
"_comment": "Data is fetched using the destination reference, not the dataSources URI",
"request": {
"url": "{{destinations.myDestination}}/{{EntitySet}}",
"parameters": {
"$top": "{parameters>/maxItems/value}",
"$orderby": "{{OrderByField}} desc"
}
},
"path": "/d/results"
},
"item": {
"title": "{{{TitleField}}}",
"description": "{{{DescriptionField}}}",
"icon": {
"src": "sap-icon://product"
},
"actions": [
{
"type": "Navigation",
"parameters": {
"url": "{{Navigation URL}}/{{{IdField}}}"
}
}
]
},
"maxItems": 5
}
}
}

View File

@@ -0,0 +1,44 @@
{
"_version": "1.0.0",
"sap.package": {
"id": "{{company}}.{{packageName}}",
"version": "1.0.0",
"title": "{{Package Title}}",
"description": "{{Package description}}",
"vendor": "{{Company Name}}",
"icon": "sap-icon://package"
},
"contents": {
"cards": [
{
"id": "{{namespace}}.{{cardName}}",
"type": "card",
"src": "cards/{{cardName}}"
}
],
"workspaceTemplates": [
{
"id": "{{namespace}}.{{templateName}}",
"type": "workspaceTemplate",
"src": "templates/{{templateName}}"
}
],
"workflows": [
{
"id": "{{namespace}}.{{workflowName}}",
"type": "workflow",
"src": "workflows/{{workflowName}}"
}
]
},
"dependencies": {
"minSAPUI5Version": "1.87.0"
},
"metadata": {
"keywords": [
"{{keyword1}}",
"{{keyword2}}"
],
"category": "{{Category}}"
}
}

View File

@@ -0,0 +1,112 @@
/**
* UI Integration Card Design-time Configuration
*
* This file defines the configuration editor for the card,
* allowing users to customize card settings in the Work Zone editor.
*
* Place this file at: dt/configuration.js in your card project
*
* Documentation: https://ui5.sap.com/#/topic/5b46b03f024542ba802d99d67bc1a3f4
*/
sap.ui.define(["sap/ui/integration/Designtime"], function (Designtime) {
"use strict";
return Designtime.extend("{{namespace}}.{{cardName}}.dt.Configuration", {
/**
* Create the card configuration form
*/
create: function () {
return {
form: {
items: {
// General Settings Group
generalGroup: {
type: "group",
label: "General Settings"
},
title: {
manifestpath: "/sap.card/header/title",
type: "string",
label: "Card Title",
description: "Title displayed in the card header",
required: true
},
subTitle: {
manifestpath: "/sap.card/header/subTitle",
type: "string",
label: "Card Subtitle",
description: "Subtitle displayed below the title"
},
// Data Settings Group
dataGroup: {
type: "group",
label: "Data Settings"
},
destination: {
manifestpath: "/sap.card/configuration/destinations/myDestination/name",
type: "destination",
label: "Data Destination",
description: "Select the destination for data retrieval"
},
maxItems: {
manifestpath: "/sap.card/configuration/parameters/maxItems/value",
type: "integer",
label: "Maximum Items",
description: "Maximum number of items to display",
visualization: {
type: "Slider",
settings: {
min: 1,
max: 20
}
}
},
// Display Settings Group
displayGroup: {
type: "group",
label: "Display Settings"
},
showIcon: {
manifestpath: "/sap.card/content/item/icon/visible",
type: "boolean",
label: "Show Item Icons",
description: "Display icons next to list items"
}
}
},
// Context values available from SAP Build Work Zone
// Note: Verify these paths against your tenant's Host API using getContextValue()
// Available context keys may vary by Work Zone version and configuration
context: {
"sap.workzone": {
currentUser: {
id: {
label: "Current User ID",
description: "Unique identifier of the logged-in user"
},
firstName: {
label: "Current User First Name",
description: "First name of the logged-in user"
},
lastName: {
label: "Current User Last Name",
description: "Last name of the logged-in user"
},
email: {
label: "Current User Email",
description: "Email address of the logged-in user"
}
}
// Note: currentCompany and currentWorkspace context values
// should be verified against your tenant's Host API.
// Use oHost.getContextValue("sap.workzone/...") to check availability.
}
}
};
}
});
});

View File

@@ -0,0 +1,112 @@
{
"_version": "1.0.0",
"sap.workspaceTemplate": {
"id": "{{namespace}}.{{templateName}}",
"version": "1.0.0",
"title": "{{Template Title}}",
"description": "{{Template description for workspace creation}}",
"icon": "sap-icon://collaborate"
},
"workspace": {
"name": "{{Default Workspace Name}}",
"description": "{{Default Workspace Description}}",
"privacy": "public",
"features": {
"feeds": true,
"contentCreation": true,
"forums": true,
"knowledgeBase": true,
"events": true
}
},
"pages": [
{
"id": "overview",
"title": "Overview",
"isDefault": true,
"layout": {
"sections": [
{
"columns": 2,
"widgets": [
{
"type": "Feed",
"column": 1,
"settings": {
"title": "Recent Activity"
}
},
{
"type": "People",
"column": 2,
"settings": {
"title": "Team Members"
}
}
]
},
{
"columns": 3,
"widgets": [
{
"type": "Content",
"column": 1,
"settings": {
"title": "Documents"
}
},
{
"type": "Event",
"column": 2,
"settings": {
"title": "Upcoming Events"
}
},
{
"type": "RecentItems",
"column": 3,
"settings": {
"title": "Recent Items"
}
}
]
}
]
}
},
{
"id": "resources",
"title": "Resources",
"layout": {
"sections": [
{
"columns": 1,
"widgets": [
{
"type": "KnowledgeBase",
"column": 1,
"settings": {
"title": "Knowledge Base"
}
}
]
}
]
}
}
],
"defaultRoles": [
{
"role": "Admin",
"description": "Full workspace administration"
},
{
"role": "Member",
"description": "Standard member access"
},
{
"role": "Viewer",
"description": "Read-only access"
}
]
}