diff --git a/.github/workflows/lint-ui5_v2.yml b/.github/workflows/lint-ui5_v2.yml new file mode 100644 index 0000000..ec2428c --- /dev/null +++ b/.github/workflows/lint-ui5_v2.yml @@ -0,0 +1,29 @@ +name: Lint ui5_v2 + +on: + pull_request: + workflow_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ui5_v2 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20" + + - name: Install dependencies + run: npm install --no-audit --no-fund + + - name: Run ESLint + run: npm run lint:eslint + + - name: Run UI5 linter + run: npm run lint:ui5 diff --git a/app2/webapp/model/data.json b/app2/webapp/model/data.json deleted file mode 100644 index 3e41960..0000000 --- a/app2/webapp/model/data.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "app": { - "name": "app2", - "version": "0.0.1" - } -} diff --git a/app2/.editorconfig b/ui5_v2/.editorconfig similarity index 100% rename from app2/.editorconfig rename to ui5_v2/.editorconfig diff --git a/app2/.gitignore b/ui5_v2/.gitignore similarity index 100% rename from app2/.gitignore rename to ui5_v2/.gitignore diff --git a/app2/eslint.config.mjs b/ui5_v2/eslint.config.mjs similarity index 100% rename from app2/eslint.config.mjs rename to ui5_v2/eslint.config.mjs diff --git a/app2/package.json b/ui5_v2/package.json similarity index 73% rename from app2/package.json rename to ui5_v2/package.json index 7f162a2..5611c60 100644 --- a/app2/package.json +++ b/ui5_v2/package.json @@ -1,12 +1,14 @@ { - "name": "app2", + "name": "ui5_v2", "version": "0.0.1", "description": "Modern UI5 2.x application (legacy-free)", "private": true, "scripts": { "start": "ui5 serve --open index.html", "build": "ui5 build --clean-dest", - "lint": "eslint webapp" + "lint": "npm run lint:eslint && npm run lint:ui5", + "lint:eslint": "eslint webapp", + "lint:ui5": "ui5lint" }, "devDependencies": { "@eslint/js": "^9.17.0", diff --git a/app2/ui5.yaml b/ui5_v2/ui5.yaml similarity index 92% rename from app2/ui5.yaml rename to ui5_v2/ui5.yaml index a0d09ed..dfd7d78 100644 --- a/app2/ui5.yaml +++ b/ui5_v2/ui5.yaml @@ -1,6 +1,6 @@ specVersion: "4.0" metadata: - name: app2 + name: ui5_v2 type: application framework: name: OpenUI5 diff --git a/app2/webapp/Component.js b/ui5_v2/webapp/Component.js similarity index 83% rename from app2/webapp/Component.js rename to ui5_v2/webapp/Component.js index e114172..e0fedd7 100644 --- a/app2/webapp/Component.js +++ b/ui5_v2/webapp/Component.js @@ -1,11 +1,11 @@ sap.ui.define([ "sap/ui/core/UIComponent", "sap/ui/Device", - "app2/model/models", + "ui5_v2/model/models", ], (UIComponent, Device, models) => { "use strict"; - return UIComponent.extend("app2.Component", { + return UIComponent.extend("ui5_v2.Component", { metadata: { manifest: "json", interfaces: ["sap.ui.core.IAsyncContentCreation"], diff --git a/app2/webapp/controller/App.controller.js b/ui5_v2/webapp/controller/App.controller.js similarity index 67% rename from app2/webapp/controller/App.controller.js rename to ui5_v2/webapp/controller/App.controller.js index 95508bf..34d8efe 100644 --- a/app2/webapp/controller/App.controller.js +++ b/ui5_v2/webapp/controller/App.controller.js @@ -3,7 +3,7 @@ sap.ui.define([ ], (Controller) => { "use strict"; - return Controller.extend("app2.controller.App", { + return Controller.extend("ui5_v2.controller.App", { onInit() { }, }); diff --git a/app2/webapp/controller/Main.controller.js b/ui5_v2/webapp/controller/Main.controller.js similarity index 84% rename from app2/webapp/controller/Main.controller.js rename to ui5_v2/webapp/controller/Main.controller.js index aa6009e..0390135 100644 --- a/app2/webapp/controller/Main.controller.js +++ b/ui5_v2/webapp/controller/Main.controller.js @@ -4,7 +4,7 @@ sap.ui.define([ ], (Controller, MessageToast) => { "use strict"; - return Controller.extend("app2.controller.Main", { + return Controller.extend("ui5_v2.controller.Main", { onInit() { }, diff --git a/app2/webapp/css/style.css b/ui5_v2/webapp/css/style.css similarity index 100% rename from app2/webapp/css/style.css rename to ui5_v2/webapp/css/style.css diff --git a/app2/webapp/i18n/i18n.properties b/ui5_v2/webapp/i18n/i18n.properties similarity index 85% rename from app2/webapp/i18n/i18n.properties rename to ui5_v2/webapp/i18n/i18n.properties index 15bc8c2..20179f7 100644 --- a/app2/webapp/i18n/i18n.properties +++ b/ui5_v2/webapp/i18n/i18n.properties @@ -1,9 +1,9 @@ # Application Descriptors -appTitle=App2 +appTitle=UI5 v2 appDescription=Modern UI5 2.x application built with legacy-free standards # Main View -welcomeTitle=Welcome to App2 +welcomeTitle=Welcome to UI5 v2 welcomeText=This application is built on OpenUI5 2.x using the latest legacy-free standards: asynchronous content creation, Horizon theme, manifest-first routing, and ES module style definitions. # Device Info @@ -14,4 +14,4 @@ devicePhone=Running on phone # Actions sayHelloButton=Say Hello -helloMessage=Hello from App2 ✨ +helloMessage=Hello from UI5 v2 ✨ diff --git a/app2/webapp/index.html b/ui5_v2/webapp/index.html similarity index 68% rename from app2/webapp/index.html rename to ui5_v2/webapp/index.html index cbf88a4..980cfdd 100644 --- a/app2/webapp/index.html +++ b/ui5_v2/webapp/index.html @@ -4,16 +4,14 @@ - App2 + UI5 v2 diff --git a/app2/webapp/index.js b/ui5_v2/webapp/index.js similarity index 82% rename from app2/webapp/index.js rename to ui5_v2/webapp/index.js index 911aa62..9eb942d 100644 --- a/app2/webapp/index.js +++ b/ui5_v2/webapp/index.js @@ -4,8 +4,8 @@ sap.ui.define([ "use strict"; new ComponentContainer({ - id: "app2Container", - name: "app2", + id: "ui5_v2Container", + name: "ui5_v2", async: true, manifest: true, height: "100%", diff --git a/app2/webapp/manifest.json b/ui5_v2/webapp/manifest.json similarity index 75% rename from app2/webapp/manifest.json rename to ui5_v2/webapp/manifest.json index 1ff538e..e0a7e66 100644 --- a/app2/webapp/manifest.json +++ b/ui5_v2/webapp/manifest.json @@ -1,15 +1,18 @@ { "_version": "1.65.0", "sap.app": { - "id": "app2", + "id": "ui5_v2", "type": "application", - "i18n": "i18n/i18n.properties", + "i18n": { + "bundleUrl": "i18n/i18n.properties", + "supportedLocales": [""], + "fallbackLocale": "" + }, "title": "{{appTitle}}", "description": "{{appDescription}}", "applicationVersion": { "version": "0.0.1" - }, - "dataSources": {} + } }, "sap.ui": { "technology": "UI5", @@ -19,11 +22,15 @@ "phone": true } }, + "sap.fiori": { + "registrationIds": [], + "archeType": "transactional" + }, "sap.ui5": { + "handleValidation": true, "rootView": { - "viewName": "app2.view.App", + "viewName": "ui5_v2.view.App", "type": "XML", - "async": true, "id": "app" }, "dependencies": { @@ -44,16 +51,10 @@ "i18n": { "type": "sap.ui.model.resource.ResourceModel", "settings": { - "bundleName": "app2.i18n.i18n", + "bundleName": "ui5_v2.i18n.i18n", "supportedLocales": [""], "fallbackLocale": "" } - }, - "": { - "type": "sap.ui.model.json.JSONModel", - "settings": {}, - "uri": "model/data.json", - "preload": true } }, "routing": { @@ -61,10 +62,9 @@ "routerClass": "sap.m.routing.Router", "type": "View", "viewType": "XML", - "path": "app2.view", + "path": "ui5_v2.view", "controlId": "app", - "controlAggregation": "pages", - "async": true + "controlAggregation": "pages" }, "routes": [ { diff --git a/app2/webapp/model/models.js b/ui5_v2/webapp/model/models.js similarity index 100% rename from app2/webapp/model/models.js rename to ui5_v2/webapp/model/models.js diff --git a/app2/webapp/view/App.view.xml b/ui5_v2/webapp/view/App.view.xml similarity index 80% rename from app2/webapp/view/App.view.xml rename to ui5_v2/webapp/view/App.view.xml index ed73fcc..083982d 100644 --- a/app2/webapp/view/App.view.xml +++ b/ui5_v2/webapp/view/App.view.xml @@ -1,5 +1,5 @@ diff --git a/app2/webapp/view/Main.view.xml b/ui5_v2/webapp/view/Main.view.xml similarity index 96% rename from app2/webapp/view/Main.view.xml rename to ui5_v2/webapp/view/Main.view.xml index f9b4416..bbdadc3 100644 --- a/app2/webapp/view/Main.view.xml +++ b/ui5_v2/webapp/view/Main.view.xml @@ -1,5 +1,5 @@