Skip to content

Commit

Permalink
chore: new sample app anyupload (#617)
Browse files Browse the repository at this point in the history
  • Loading branch information
marianfoo authored Sep 5, 2024
1 parent cf1f3a4 commit 85b22e2
Show file tree
Hide file tree
Showing 31 changed files with 4,033 additions and 264 deletions.
22 changes: 22 additions & 0 deletions examples/packages/anyupload/.babelrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"presets": [
"@babel/preset-env",
[
"transform-ui5",
{
"overridesToOverride": true
}
],
"@babel/preset-typescript"
],
"plugins": [
"transform-remove-console",
[
"transform-async-to-promises",
{
"inlineHelpers": true
}
]
],
"sourceMaps": true
}
4 changes: 4 additions & 0 deletions examples/packages/anyupload/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "plugin:@sap-ux/eslint-plugin-fiori-tools/defaultTS",
"root": true
}
10 changes: 10 additions & 0 deletions examples/packages/anyupload/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules/
dist/
.scp/
.env
Makefile*.mta
mta_archives
mta-*
resources
archive.zip
.*_mta_build_tmp
43 changes: 43 additions & 0 deletions examples/packages/anyupload/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Fri Aug 23 2024 14:43:55 GMT+0200 (Mitteleuropäische Sommerzeit)|
|**App Generator**<br>@sap/generator-fiori-elements|
|**App Generator Version**<br>1.12.4|
|**Generation Platform**<br>Visual Studio Code|
|**Template Used**<br>Custom Page V4|
|**Service Type**<br>OData Url|
|**Service URL**<br>http://localhost:4004/odata/v4/orders/
|**Module Name**<br>anyupload|
|**Application Title**<br>Upload Spreadsheet to any OData API|
|**Namespace**<br>com.spreadsheetimporter|
|**UI5 Theme**<br>sap_horizon|
|**UI5 Version**<br>1.127.1|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>True|
|**Add Eslint configuration**<br>False|
|**Main Entity**<br>Orders|

## anyupload



### Starting the generated app

- This app has been generated using the SAP Fiori tools - App Generator, as part of the SAP Fiori tools suite. In order to launch the generated app, simply run the following from the generated app root folder:

```
npm start
```

- It is also possible to run the application using mock data that reflects the OData Service URL supplied during application generation. In order to run the application with Mock Data, run the following from the generated app root folder:

```
npm run start-mock
```

#### Pre-requisites:

1. Active NodeJS LTS (Long Term Support) version and associated supported NPM version. (See https://nodejs.org)


45 changes: 45 additions & 0 deletions examples/packages/anyupload/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "anyupload",
"version": "0.0.1",
"private": true,
"description": "",
"keywords": [
"ui5",
"openui5",
"sapui5"
],
"main": "webapp/index.html",
"dependencies": {
"ui5-cc-spreadsheetimporter": "link:../../../packages/ui5-cc-spreadsheetimporter"
},
"devDependencies": {
"@ui5/cli": "^3.0.0",
"@sap/ux-ui5-tooling": "1",
"@sap/ux-specification": "UI5-1.127",
"@sapui5/types": "~1.127.0",
"ui5-tooling-transpile": "^3.2.0",
"typescript": "^5.1.6",
"@typescript-eslint/eslint-plugin": "^5.59.0",
"@typescript-eslint/parser": "^5.59.0",
"@sap-ux/eslint-plugin-fiori-tools": "^0.2.0",
"@sap-ux/ui5-middleware-fe-mockserver": "2",
"ui5-middleware-serveframework": "3.1.3",
"ui5-middleware-ui5": "3.1.6",
"ui5-tooling-modules": "3.8.1"
},
"scripts": {
"start": "fiori run --o \"index.html?sap-ui-xx-viewCache=false\"",
"start-local": "fiori run --config ./ui5-local.yaml --open \"test/flpSandbox.html?sap-ui-xx-viewCache=false#comspreadsheetimporteranyuploa-tile\"",
"build": "ui5 build --config=ui5.yaml --clean-dest --dest dist",
"lint": "eslint ./",
"ts-typecheck": "tsc --noEmit",
"deploy": "fiori verify",
"deploy-config": "fiori add deploy-config",
"start-noflp": "ui5 serve --o \"index.html?sap-ui-xx-viewCache=false\"",
"start-mock": "fiori run --config ./ui5-mock.yaml --open \"test/flpSandbox.html?sap-ui-xx-viewCache=false#comspreadsheetimporteranyuploa-tile\"",
"int-test": "fiori run --config ./ui5-mock.yaml --open \"test/integration/opaTests.qunit.html\"",
"start-variants-management": "fiori run --open \"preview.html?sap-ui-xx-viewCache=false&fiori-tools-rta-mode=true&sap-ui-rta-skip-flex-validation=true#preview-app\""
},
"sapux": true,
"sapuxLayer": "CUSTOMER_BASE"
}
26 changes: 26 additions & 0 deletions examples/packages/anyupload/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"compilerOptions": {
"target": "es2022",
"module": "es2022",
"skipLibCheck": true,
"allowJs": true,
"strict": true,
"strictPropertyInitialization": false,
"moduleResolution": "node",
"rootDir": "./webapp",
"outDir": "./dist",
"baseUrl": "./",
"paths": {
"com/spreadsheetimporter/anyupload/*": [
"./webapp/*"
]
},
"typeRoots": [
"./node_modules/@types",
"./node_modules/@sapui5/types"
]
},
"include": [
"./webapp/**/*"
]
}
57 changes: 57 additions & 0 deletions examples/packages/anyupload/ui5-local.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
metadata:
name: com.spreadsheetimporter.anyupload
type: application
framework:
name: SAPUI5
version: 1.127.1
libraries:
- name: sap.m
- name: sap.ui.core
- name: sap.ushell
- name: sap.fe.templates
- name: themelib_sap_horizon
server:
customMiddleware:
- name: fiori-tools-appreload
afterMiddleware: compression
configuration:
port: 35729
path: webapp
delay: 300
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
debug: true
excludePatterns:
- /Component-preload.js
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
backend:
- path: /odata
url: http://localhost:4004
- name: sap-fe-mockserver
beforeMiddleware: csp
configuration:
mountPath: /
services:
- urlPath: /odata/v4/orders
metadataPath: ./webapp/localService/metadata.xml
mockdataPath: ./webapp/localService/data
generateMockData: true
annotations: []
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: com.spreadsheetimporter.anyupload
ui5Theme: sap_horizon
builder:
customTasks:
- name: ui5-tooling-transpile-task
afterTask: replaceVersion
configuration:
debug: true
48 changes: 48 additions & 0 deletions examples/packages/anyupload/ui5-mock.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
metadata:
name: com.spreadsheetimporter.anyupload
type: application
server:
customMiddleware:
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
ui5:
path:
- /resources
- /test-resources
url: https://ui5.sap.com
backend:
- path: /odata
url: http://localhost:4004
- name: fiori-tools-appreload
afterMiddleware: compression
configuration:
port: 35729
path: webapp
delay: 300
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
debug: true
excludePatterns:
- /Component-preload.js
- name: sap-fe-mockserver
beforeMiddleware: csp
configuration:
mountPath: /
services:
- urlPath: /odata/v4/orders
metadataPath: ./webapp/localService/metadata.xml
mockdataPath: ./webapp/localService/data
generateMockData: true
annotations: []
builder:
customTasks:
- name: ui5-tooling-transpile-task
afterTask: replaceVersion
configuration:
debug: true
57 changes: 57 additions & 0 deletions examples/packages/anyupload/ui5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# yaml-language-server: $schema=https://sap.github.io/ui5-tooling/schema/ui5.yaml.json

specVersion: "3.1"
metadata:
name: com.spreadsheetimporter.anyupload
type: application
framework:
name: SAPUI5
version: 1.120.19
libraries:
- name: sap.m
- name: sap.ui.core
- name: sap.ushell
- name: sap.fe.templates
- name: themelib_sap_horizon
server:
customMiddleware:
- name: ui5-middleware-serveframework
afterMiddleware: compression
- name: fiori-tools-proxy
afterMiddleware: compression
configuration:
ignoreCertError: false # If set to true, certificate errors will be ignored. E.g. self-signed certificates will be accepted
backend:
- path: /odata
url: http://localhost:4004
- name: fiori-tools-appreload
afterMiddleware: compression
configuration:
port: 35729
path: webapp
delay: 300
- name: ui5-tooling-transpile-middleware
afterMiddleware: compression
configuration:
debug: true
excludePatterns:
- /Component-preload.js
- name: fiori-tools-preview
afterMiddleware: fiori-tools-appreload
configuration:
component: com.spreadsheetimporter.anyupload
ui5Theme: sap_horizon
- name: ui5-middleware-ui5
afterMiddleware: compression
configuration:
modules:
ui5-cc-spreadsheetimporter:
configFile: "ui5-serve.yaml"
- name: ui5-tooling-modules-middleware
afterMiddleware: compression
builder:
customTasks:
- name: ui5-tooling-transpile-task
afterTask: replaceVersion
configuration:
debug: true
20 changes: 20 additions & 0 deletions examples/packages/anyupload/webapp/Component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import BaseComponent from "sap/fe/core/AppComponent";

/**
* @namespace com.spreadsheetimporter.anyupload
*/
export default class Component extends BaseComponent {

public static metadata = {
manifest: "json"
};

/**
* The component is initialized by UI5 automatically during the startup of the app and calls the init method once.
* @public
* @override
*/
//public init() : void {
// super.init();
//}
}
18 changes: 18 additions & 0 deletions examples/packages/anyupload/webapp/annotations/annotation.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<edmx:Edmx xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx" Version="4.0">
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
<edmx:Include Namespace="com.sap.vocabularies.Common.v1" Alias="Common"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
<edmx:Include Namespace="com.sap.vocabularies.UI.v1" Alias="UI"/>
</edmx:Reference>
<edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Communication.xml">
<edmx:Include Namespace="com.sap.vocabularies.Communication.v1" Alias="Communication"/>
</edmx:Reference>
<edmx:Reference Uri="/odata/v4/orders/$metadata">
<edmx:Include Namespace="OrdersService"/>
</edmx:Reference>
<edmx:DataServices>
<Schema xmlns="http://docs.oasis-open.org/odata/ns/edm" Namespace="local">
</Schema>
</edmx:DataServices>
</edmx:Edmx>
Loading

0 comments on commit 85b22e2

Please sign in to comment.