├── app
├── templates
│ ├── gitkeep
│ ├── application
│ │ ├── css
│ │ │ └── style.css
│ │ ├── model
│ │ │ ├── img.json
│ │ │ └── Config.js
│ │ ├── view
│ │ │ ├── _Main.view.xml
│ │ │ ├── _Main.view.js
│ │ │ └── _Main.controller.js
│ │ ├── i18n
│ │ │ └── messageBundle.properties
│ │ ├── _index.html
│ │ └── _Application.js
│ ├── Ui5RepositoryIgnore
│ ├── tdg
│ │ ├── css
│ │ │ └── style.css
│ │ ├── view
│ │ │ ├── _App.view.xml
│ │ │ ├── _NameRequiredDialog.fragment.xml
│ │ │ ├── _NotFound.view.xml
│ │ │ ├── _CategoryInfoForm.fragment.xml
│ │ │ ├── _SupplierAddressForm.fragment.xml
│ │ │ ├── _Master.view.xml
│ │ │ ├── _Detail.view.xml
│ │ │ ├── _AddProduct.view.xml
│ │ │ ├── _Detail.controller.js
│ │ │ ├── _AddProduct.controller.js
│ │ │ └── _Master.controller.js
│ │ ├── util
│ │ │ ├── _Controller.js
│ │ │ └── _Formatter.js
│ │ ├── model
│ │ │ ├── Category.json
│ │ │ ├── Supplier.json
│ │ │ ├── metadata.xml
│ │ │ └── Product.json
│ │ ├── _index.html
│ │ ├── i18n
│ │ │ └── messageBundle.properties
│ │ ├── _MyRouter.js
│ │ ├── _Component.js
│ │ └── tests
│ │ │ └── Navigation.qunit.html
│ ├── gitignore
│ ├── _README.md
│ ├── openui5-sample
│ │ └── webapp
│ │ │ ├── i18n
│ │ │ ├── messageBundle.properties
│ │ │ ├── messageBundle_de.properties
│ │ │ ├── messageBundle_en.properties
│ │ │ ├── messageBundle_en_AU.properties
│ │ │ └── messageBundle_en_US.properties
│ │ │ ├── css
│ │ │ └── styles.css
│ │ │ ├── _Component.js
│ │ │ ├── _index.html
│ │ │ └── view
│ │ │ ├── _App.view.xml
│ │ │ └── _App.controller.js
│ ├── _bower.json
│ ├── _bower_openui5.json
│ ├── editorconfig
│ ├── jshintrc
│ ├── _package_openui5.json
│ ├── _package.json
│ ├── eslintrc_openui5
│ ├── spa
│ │ └── _index.html
│ ├── Gruntfile_openui5.js
│ └── Gruntfile.js
├── .jsbeautifyrc
└── index.js
├── .gitattributes
├── .travis.yml
├── .gitignore
├── uiComponent
├── templates
│ └── application
│ │ ├── _component.json
│ │ └── _Component.js
└── index.js
├── facelessComponent
├── templates
│ └── application
│ │ ├── _component.json
│ │ └── _Component.js
└── index.js
├── test
├── test-load.js
├── test-creation-facelessComponent.js
├── test-creation-uicomponent.js
├── test-creation-view.js
├── test-creation-app-spa.js
├── test-creation-app-classic.js
└── test-creation-app-classic-xml.js
├── .editorconfig
├── view
├── templates
│ └── application
│ │ └── view
│ │ ├── _Main.view.xml
│ │ ├── _Main.view.js
│ │ └── _Main.controller.js
└── index.js
├── .jsbeautifyrc
├── .jshintrc
├── LICENSE
├── package.json
├── COMMIT_GUIDELINES.md
├── Gruntfile.js
├── README.md
├── CHANGELOG.md
├── script-base.js
└── utils.js
/app/templates/gitkeep:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gitattributes:
--------------------------------------------------------------------------------
1 | * text=auto
2 |
--------------------------------------------------------------------------------
/app/templates/application/css/style.css:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/app/templates/Ui5RepositoryIgnore:
--------------------------------------------------------------------------------
1 | node_modules\
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: node_js
2 | node_js:
3 | - '0.10'
4 |
--------------------------------------------------------------------------------
/app/templates/tdg/css/style.css:
--------------------------------------------------------------------------------
1 | .spacerTop {
2 | margin-top: 2rem;
3 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | temp/
3 |
4 | npm-debug.log
5 | jslint_report.xml
6 |
--------------------------------------------------------------------------------
/app/templates/gitignore:
--------------------------------------------------------------------------------
1 | node_modules
2 | bower_components
3 | dist
4 | .DS_Store
5 |
--------------------------------------------------------------------------------
/app/templates/application/model/img.json:
--------------------------------------------------------------------------------
1 | {
2 | "icon": {
3 | "logo": "img/logo.png"
4 | }
5 | }
--------------------------------------------------------------------------------
/app/templates/_README.md:
--------------------------------------------------------------------------------
1 | # <%= _.slugify(applicationName) %>
2 |
3 | > <%= appDescription %>
4 |
5 | ## Getting Started
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/i18n/messageBundle.properties:
--------------------------------------------------------------------------------
1 | TITLE=todos
2 | INPUT_PLACEHOLDER=What needs to be done?
3 |
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/i18n/messageBundle_de.properties:
--------------------------------------------------------------------------------
1 | TITLE=todos
2 | INPUT_PLACEHOLDER=Was muss getan werden?
3 |
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/i18n/messageBundle_en.properties:
--------------------------------------------------------------------------------
1 | TITLE=todos
2 | INPUT_PLACEHOLDER=What needs to be done?
3 |
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/i18n/messageBundle_en_AU.properties:
--------------------------------------------------------------------------------
1 | TITLE=todos
2 | INPUT_PLACEHOLDER=What needs to be done?
3 |
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/i18n/messageBundle_en_US.properties:
--------------------------------------------------------------------------------
1 | TITLE=todos
2 | INPUT_PLACEHOLDER=What needs to be done?
3 |
--------------------------------------------------------------------------------
/app/templates/tdg/view/_App.view.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/uiComponent/templates/application/_component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= componentName %>",
3 | "version": "0.1.0",
4 | "description": "",
5 | "keywords": [],
6 | "dependencies": {}
7 | }
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/css/styles.css:
--------------------------------------------------------------------------------
1 | .todoInput {
2 | padding-left: 0.25rem;
3 |
4 | }
5 |
6 | .todoInput,
7 | .todoListInput {
8 | padding-right: 0.25rem;
9 | }
10 |
--------------------------------------------------------------------------------
/facelessComponent/templates/application/_component.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= componentName %>",
3 | "version": "0.1.0",
4 | "description": "",
5 | "keywords": [],
6 | "dependencies": {}
7 | }
--------------------------------------------------------------------------------
/app/templates/_bower.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "package",
3 | "version": "0.0.1",
4 | "dependencies": { <%
5 | if (openUI5LocationOption === "bower") { %>
6 | "openui5-bower": "~1.22.9" <%
7 | } %>
8 | }
9 | }
--------------------------------------------------------------------------------
/test/test-load.js:
--------------------------------------------------------------------------------
1 | /*global describe, it, require*/
2 | (function() {
3 | "use strict";
4 |
5 | var assert = require("assert");
6 |
7 | describe("openui5 generator", function() {
8 | it("can be imported without blowing up", function() {
9 | var app = require("../app");
10 | assert(app !== undefined);
11 | });
12 | });
13 | }());
14 |
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/_Component.js:
--------------------------------------------------------------------------------
1 | sap.ui.core.UIComponent.extend("<%= fioriComponentNamespace %>.Component", {
2 | metadata: {
3 | name: "<%= applicationName %>",
4 | version: "1.0.0",
5 | includes: ["css/styles.css"],
6 | dependencies: {
7 | libs: ["sap.m"]
8 | },
9 | rootView: "<%= fioriComponentNamespace %>.view.App"
10 | }
11 | });
12 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # see http://editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | indent_style = tab
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | # npm is using 2 spaces when modifying package.json
13 | [package.json]
14 | indent_style = space
15 | indent_size = 2
16 |
17 | [*.md]
18 | trim_trailing_whitespace = false
19 |
--------------------------------------------------------------------------------
/app/templates/_bower_openui5.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= applicationName %>",
3 | "description": "<%= appDescription %>",
4 | "private": true,
5 | "dependencies": {
6 | "openui5-sap.ui.core": "openui5/packaged-sap.ui.core#~1.26.2",
7 | "openui5-sap.m": "openui5/packaged-sap.m#~1.26.2",
8 | "openui5-themelib_sap_bluecrystal": "openui5/packaged-themelib_sap_bluecrystal#~1.26.2"
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/app/templates/application/view/_Main.view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/templates/editorconfig:
--------------------------------------------------------------------------------
1 | # see http://editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | indent_style = tab
7 | end_of_line = lf
8 | charset = utf-8
9 | trim_trailing_whitespace = true
10 | insert_final_newline = true
11 |
12 | # npm is using 2 spaces when modifying package.json
13 | [package.json]
14 | indent_style = space
15 | indent_size = 2
16 |
17 | [*.md]
18 | trim_trailing_whitespace = false
19 |
--------------------------------------------------------------------------------
/app/templates/application/i18n/messageBundle.properties:
--------------------------------------------------------------------------------
1 | WELCOME_MESSAGE=Welcome!
2 | ShellTitle=Sales Orders App
3 | MasterTitle=Sales Orders
4 | DetailTitle=Sales Order
5 | ApproveButtonText=Approve
6 | ApproveDialogTitle=Approve Sales Order
7 | ApproveDialogMsg=Do you want to approve this sales order now?
8 | ApproveDialogSuccessMsg=The sales order has been approved
9 | LineItemTableHeader=Products
10 | LineItemTitle=Product
--------------------------------------------------------------------------------
/view/templates/application/view/_Main.view.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/app/templates/application/model/Config.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | "use strict";
3 |
4 | jQuery.sap.declare("model.Config");
5 |
6 | model.Config = {};
7 |
8 | (function() {
9 |
10 | // The "reponder" URL parameter defines if the app shall run with mock data
11 | var responderOn = jQuery.sap.getUriParameters().get("responderOn");
12 |
13 | // set the flag for later usage
14 | model.Config.isMock = ("true" === responderOn);
15 | })();
16 | }());
--------------------------------------------------------------------------------
/app/templates/tdg/view/_NameRequiredDialog.fragment.xml:
--------------------------------------------------------------------------------
1 |
4 |
14 |
--------------------------------------------------------------------------------
/.jsbeautifyrc:
--------------------------------------------------------------------------------
1 | {
2 | // exposed jsbeautifier options
3 | "indent_with_tabs": true,
4 | "preserve_newlines": true,
5 | "max_preserve_newlines": 4,
6 | "space_in_paren": false,
7 | "jslint_happy": false,
8 | "brace_style": "collapse",
9 | "keep_array_indentation": false,
10 | "keep_function_indentation": false,
11 | "eval_code": false,
12 | "unescape_strings": false,
13 | "break_chained_methods": false,
14 |
15 | // jsformat options
16 | "format_on_save": true
17 | }
--------------------------------------------------------------------------------
/app/.jsbeautifyrc:
--------------------------------------------------------------------------------
1 | {
2 | // exposed jsbeautifier options
3 | "indent_with_tabs": true,
4 | "preserve_newlines": true,
5 | "max_preserve_newlines": 4,
6 | "space_in_paren": false,
7 | "jslint_happy": false,
8 | "brace_style": "collapse",
9 | "keep_array_indentation": false,
10 | "keep_function_indentation": false,
11 | "eval_code": false,
12 | "unescape_strings": false,
13 | "break_chained_methods": false,
14 |
15 | // jsformat options
16 | "format_on_save": false
17 | }
--------------------------------------------------------------------------------
/app/templates/tdg/util/_Controller.js:
--------------------------------------------------------------------------------
1 | jQuery.sap.declare("<%= fioriComponentNamespace %>.util.Controller");
2 |
3 | sap.ui.core.mvc.Controller.extend("<%= fioriComponentNamespace %>.util.Controller", {
4 | getEventBus : function () {
5 | var sComponentId = sap.ui.core.Component.getOwnerIdFor(this.getView());
6 | return sap.ui.component(sComponentId).getEventBus();
7 | },
8 |
9 | getRouter : function () {
10 | return sap.ui.core.UIComponent.getRouterFor(this);
11 | }
12 | });
--------------------------------------------------------------------------------
/app/templates/tdg/view/_NotFound.view.xml:
--------------------------------------------------------------------------------
1 |
4 |
7 |
8 |
11 |
12 |
16 |
17 |
18 |
19 |
23 |
24 |
--------------------------------------------------------------------------------
/app/templates/tdg/util/_Formatter.js:
--------------------------------------------------------------------------------
1 | jQuery.sap.declare("<%= fioriComponentNamespace %>.util.Formatter");
2 |
3 | <%= fioriComponentNamespace %>.util.Formatter = {
4 |
5 | uppercaseFirstChar : function(sStr) {
6 | return sStr.charAt(0).toUpperCase() + sStr.slice(1);
7 | },
8 |
9 | discontinuedStatusState : function(sDate) {
10 | return sDate ? "Error" : "None";
11 | },
12 |
13 | discontinuedStatusValue : function(sDate) {
14 | return sDate ? "Discontinued" : "";
15 | },
16 |
17 | currencyValue : function (value) {
18 | return parseFloat(value).toFixed(2);
19 | }
20 |
21 | };
--------------------------------------------------------------------------------
/.jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "devel": true,
3 | "curly": true,
4 | "eqeqeq": true,
5 | "immed": false,
6 | "latedef": true,
7 | "newcap": true,
8 | "noarg": true,
9 | "sub": true,
10 | "undef": true,
11 | "unused": true,
12 | "boss": true,
13 | "eqnull": true,
14 | "browser": true,
15 | "quotmark": "double",
16 | "trailing": true,
17 | "smarttabs": true,
18 | "globals": {
19 | "$": true,
20 | "jQuery": true,
21 | "model": true,
22 | "sap": true,
23 | "util": true,
24 | "view": true
25 | }
26 | }
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright 2013, Sascha Kiefer
2 |
3 | Licensed under the Apache License, Version 2.0 (the "License");
4 | you may not use this file except in compliance with the License.
5 | You may obtain a copy of the License at
6 |
7 | http://www.apache.org/licenses/LICENSE-2.0
8 |
9 | Unless required by applicable law or agreed to in writing, software
10 | distributed under the License is distributed on an "AS IS" BASIS,
11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 | See the License for the specific language governing permissions and
13 | limitations under the License.
--------------------------------------------------------------------------------
/app/templates/jshintrc:
--------------------------------------------------------------------------------
1 | {
2 | "boss": true,
3 | "browser": true,
4 | "curly": true,
5 | "devel": true,
6 | "eqeqeq": true,
7 | "eqnull": true,
8 | "quotmark": "double",
9 | "trailing": true,
10 | "globals": {
11 | "$": true,
12 | "jQuery": true,
13 | "model": true,
14 | "sap": true,
15 | "util": true,
16 | "view": true
17 | },
18 | "immed": true,
19 | "latedef": true,
20 | "newcap": true,
21 | "noarg": true,
22 | "sub": true,
23 | "undef": true,
24 | "unused": true,
25 | "smarttabs": true
26 | }
--------------------------------------------------------------------------------
/app/templates/_package_openui5.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= _.slugify(applicationName) %>",
3 | "version": "0.1.0",
4 | "description": "<%= appDescription %>",
5 | "private": true,
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "author": "<%= authorName %>",
10 | "devDependencies": {
11 | "grunt": "^0.4.5",
12 | "grunt-contrib-clean": "^0.6.0",
13 | "grunt-contrib-connect": "^0.9.0",
14 | "grunt-contrib-copy": "^0.7.0",
15 | "grunt-contrib-watch": "^0.6.1",
16 | "grunt-eslint": "2.1.0",
17 | "grunt-open": "^0.2.3",
18 | "grunt-openui5": "^0.5.0"
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/app/templates/_package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "<%= _.slugify(applicationName) %>",
3 | "version": "0.0.1",
4 | "description": "<%= appDescription %>",
5 | "main": "index.html",
6 | "scripts": {
7 | "test": "echo \"Error: no test specified\" && exit 1"
8 | },
9 | "repository": {
10 | "type": "git",
11 | "url": "<%= gitRepository %>"
12 | },
13 | "author": "<%= authorName %>",
14 | "license": "<%= licenseType %>",
15 | "devDependencies": {
16 | "grunt": "~0.4.1",
17 | "grunt-contrib-qunit": "~0.4.0",
18 | "grunt-contrib-jshint": "~0.8.0",
19 | "grunt-contrib-watch": "~0.5.2",
20 | "grunt-execute": "~0.1.5",
21 | "grunt-open": "~0.2.3",
22 | "grunt-contrib-connect": "~0.6.0",
23 | "grunt-connect-proxy": "~0.1.7"
24 | }
25 | }
--------------------------------------------------------------------------------
/app/templates/tdg/view/_CategoryInfoForm.fragment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/app/templates/tdg/model/Category.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "__metadata":{
4 | "uri":"http://services.odata.org/V2/OData/OData.svc/Categories(0)",
5 | "type":"ODataDemo.Category"
6 | },
7 | "ID":0,
8 | "Name":"Food",
9 | "Products":{
10 | "__deferred":{
11 | "uri":"http://services.odata.org/V2/OData/OData.svc/Categories(0)/Products"
12 | }
13 | }
14 | },
15 | {
16 | "__metadata":{
17 | "uri":"http://services.odata.org/V2/OData/OData.svc/Categories(1)",
18 | "type":"ODataDemo.Category"
19 | },
20 | "ID":1,
21 | "Name":"Beverages",
22 | "Products":{
23 | "__deferred":{
24 | "uri":"http://services.odata.org/V2/OData/OData.svc/Categories(1)/Products"
25 | }
26 | }
27 | },
28 | {
29 | "__metadata":{
30 | "uri":"http://services.odata.org/V2/OData/OData.svc/Categories(2)",
31 | "type":"ODataDemo.Category"
32 | },
33 | "ID":2,
34 | "Name":"Electronics",
35 | "Products":{
36 | "__deferred":{
37 | "uri":"http://services.odata.org/V2/OData/OData.svc/Categories(2)/Products"
38 | }
39 | }
40 | }
41 | ]
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/_index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | <%= applicationName %>
7 |
8 |
9 |
10 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/templates/tdg/_index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | <%= applicationName %>
9 |
10 |
19 |
20 |
21 |
22 |
32 |
33 |
34 |
38 |
39 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/templates/tdg/model/Supplier.json:
--------------------------------------------------------------------------------
1 | [
2 | {
3 | "__metadata":{
4 | "uri":"http://services.odata.org/V2/OData/OData.svc/Suppliers(0)",
5 | "etag":"W/\"0\"",
6 | "type":"ODataDemo.Supplier"
7 | },
8 | "ID":0,
9 | "Name":"Exotic Liquids",
10 | "Address":{
11 | "__metadata":{
12 | "type":"ODataDemo.Address"
13 | },
14 | "Street":"NE 228th",
15 | "City":"Sammamish",
16 | "State":"WA",
17 | "ZipCode":"98074",
18 | "Country":"USA"
19 | },
20 | "Concurrency":0,
21 | "Products":{
22 | "__deferred":{
23 | "uri":"http://services.odata.org/V2/OData/OData.svc/Suppliers(0)/Products"
24 | }
25 | }
26 | },
27 | {
28 | "__metadata":{
29 | "uri":"http://services.odata.org/V2/OData/OData.svc/Suppliers(1)",
30 | "etag":"W/\"0\"",
31 | "type":"ODataDemo.Supplier"
32 | },
33 | "ID":1,
34 | "Name":"Tokyo Traders",
35 | "Address":{
36 | "__metadata":{
37 | "type":"ODataDemo.Address"
38 | },
39 | "Street":"NE 40th",
40 | "City":"Redmond",
41 | "State":"WA",
42 | "ZipCode":"98052",
43 | "Country":"USA"
44 | },
45 | "Concurrency":0,
46 | "Products":{
47 | "__deferred":{
48 | "uri":"http://services.odata.org/V2/OData/OData.svc/Suppliers(1)/Products"
49 | }
50 | }
51 | }
52 | ]
--------------------------------------------------------------------------------
/test/test-creation-facelessComponent.js:
--------------------------------------------------------------------------------
1 | /*global describe, beforeEach, it, __dirname, require*/
2 | (function() {
3 | "use strict";
4 |
5 | var path = require("path");
6 | var helpers = require("yeoman-generator").test;
7 |
8 | describe("openui5 uiComponent generator", function() {
9 | beforeEach(function(done) {
10 | console.log("*** Faceless Component ***");
11 |
12 | helpers.testDirectory(path.join(__dirname, "temp"), function(err) {
13 | if (err) {
14 | return done(err);
15 | }
16 |
17 | this.component = helpers.createGenerator("openui5:uiComponent", [
18 | "../../uiComponent"
19 | ]);
20 |
21 | done();
22 | }.bind(this));
23 | });
24 |
25 | it("creates expected files with args", function(done) {
26 | var expected = [
27 | "foo/bar/Test/Component.js",
28 | "foo/bar/Test/component.json",
29 | "foo/bar/Test/js/.gitkeep"
30 | ];
31 |
32 | helpers.mockPrompt(this.component, {
33 | componentName: "foo.bar.Test"
34 | });
35 |
36 | this.component.run({}, function() {
37 | helpers.assertFile(expected);
38 | done();
39 | });
40 | });
41 | });
42 |
43 | }());
--------------------------------------------------------------------------------
/app/templates/tdg/view/_SupplierAddressForm.fragment.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/app/templates/openui5-sample/webapp/view/_App.view.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
14 |
15 |
16 |
17 |
18 |
19 |
26 |
27 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/test/test-creation-uicomponent.js:
--------------------------------------------------------------------------------
1 | /*global describe, beforeEach, it, __dirname, require*/
2 | (function() {
3 | "use strict";
4 |
5 | var path = require("path");
6 | var helpers = require("yeoman-generator").test;
7 |
8 | describe("openui5 uiComponent generator", function() {
9 | beforeEach(function(done) {
10 | console.log("*** UI Component ***");
11 |
12 | helpers.testDirectory(path.join(__dirname, "temp"), function(err) {
13 | if (err) {
14 | return done(err);
15 | }
16 |
17 | this.component = helpers.createGenerator("openui5:uiComponent", [
18 | "../../uiComponent"
19 | ]);
20 |
21 | done();
22 | }.bind(this));
23 | });
24 |
25 | it("creates expected files with args", function(done) {
26 | var expected = [
27 | "foo/bar/Test/Component.js",
28 | "foo/bar/Test/component.json",
29 | "foo/bar/Test/css/.gitkeep",
30 | "foo/bar/Test/i18n/.gitkeep",
31 | "foo/bar/Test/img/.gitkeep",
32 | "foo/bar/Test/js/.gitkeep",
33 | "foo/bar/Test/view/.gitkeep"
34 | ];
35 |
36 | helpers.mockPrompt(this.component, {
37 | componentName: "foo.bar.Test"
38 | });
39 |
40 | this.component.run({}, function() {
41 | helpers.assertFile(expected);
42 | done();
43 | });
44 | });
45 | });
46 |
47 | }());
--------------------------------------------------------------------------------
/app/templates/application/view/_Main.view.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | "use strict";
3 |
4 | sap.ui.jsview("view.Main", {
5 |
6 | /** Specifies the Controller belonging to this View.
7 | * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
8 | * @memberOf fioricollaboration.ShellView
9 | */
10 | getControllerName: function() {
11 | return "view.Main";
12 | },
13 |
14 | //#######################################################################################################################################################
15 | // VIEW LAYOUT FUNCTIONS
16 | //#######################################################################################################################################################
17 |
18 | /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
19 | * Since the Controller is given to this method, its event handlers can be attached right away.
20 | * @memberOf fioricollaboration.ShellView
21 | */
22 | /*jshint unused: vars */
23 | createContent: function(oController) {
24 | var oControl = new sap.ui.commons.Button({
25 | text: "{i18n>WELCOME_MESSAGE}",
26 | press: oController.doSomething
27 | });
28 |
29 | return oControl;
30 | }
31 | });
32 | }());
--------------------------------------------------------------------------------
/view/templates/application/view/_Main.view.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | "use strict";
3 |
4 | sap.ui.jsview("<%= applicationNamespace%><%= viewName %>", {
5 |
6 | /** Specifies the Controller belonging to this View.
7 | * In the case that it is not implemented, or that "null" is returned, this View does not have a Controller.
8 | * @memberOf fioricollaboration.ShellView
9 | */
10 | getControllerName: function() {
11 | return "<%= applicationNamespace%><%= viewName %>";
12 | },
13 |
14 | //#######################################################################################################################################################
15 | // VIEW LAYOUT FUNCTIONS
16 | //#######################################################################################################################################################
17 |
18 | /** Is initially called once after the Controller has been instantiated. It is the place where the UI is constructed.
19 | * Since the Controller is given to this method, its event handlers can be attached right away.
20 | * @memberOf fioricollaboration.ShellView
21 | */
22 | /*jshint unused: vars */
23 | createContent: function(oController) {
24 | var oControl = new <%= UI5library %>.Button({
25 | text: "{i18n>WELCOME_MESSAGE}",
26 | press: oController.doSomething
27 | });
28 |
29 | return oControl;
30 | }
31 | });
32 | }());
--------------------------------------------------------------------------------
/app/templates/application/view/_Main.controller.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | "use strict";
3 |
4 | sap.ui.controller("view.Main", {
5 |
6 | /**
7 | * Called when a controller is instantiated and its View controls (if available) are already created.
8 | * Can be used to modify the View before it is displayed, to bind event handlers and do other one-time initialization.
9 | * @memberOf view.Main
10 | */
11 | // onInit: function() {
12 |
13 | // },
14 |
15 | /**
16 | * Similar to onAfterRendering, but this hook is invoked before the controller's View is re-rendered
17 | * (NOT before the first rendering! onInit() is used for that one!).
18 | * @memberOf view.Main
19 | */
20 | // onBeforeRendering: function() {
21 | //
22 | // },
23 |
24 | /**
25 | * Called when the View has been rendered (so its HTML is part of the document). Post-rendering manipulations of the HTML could be done here.
26 | * This hook is the same one that OpenUI5 controls get after being rendered.
27 | * @memberOf view.Main
28 | */
29 | // onAfterRendering: function() {
30 | //
31 | // },
32 |
33 | /**
34 | * Called when the Controller is destroyed. Use this one to free resources and finalize activities.
35 | * @memberOf view.Main
36 | */
37 | // onExit: function() {
38 | //
39 | // }
40 |
41 | doSomething: function() {
42 | alert("Button was pressed!");
43 | }
44 | });
45 | }());
--------------------------------------------------------------------------------
/app/templates/eslintrc_openui5:
--------------------------------------------------------------------------------
1 | {
2 | "env": {
3 | "browser": true
4 | },
5 | "globals": {
6 | "sap": true,
7 | "jQuery": true
8 | },
9 | "rules": {
10 | "block-scoped-var": 1,
11 | "brace-style": [2, "1tbs", { "allowSingleLine": true }],
12 | "consistent-this": 2,
13 | "global-strict": 2,
14 | "no-div-regex": 2,
15 | "no-floating-decimal": 2,
16 | "no-self-compare": 2,
17 | "no-mixed-spaces-and-tabs": [2, true],
18 | "no-nested-ternary": 2,
19 | "no-unused-vars": [2, {"vars":"all", "args":"none"}],
20 | "radix": 2,
21 | "space-after-keywords": [2, "always"],
22 | "space-unary-ops": 2,
23 | "wrap-iife": [2, "any"],
24 |
25 | "camelcase": 1,
26 | "consistent-return": 1,
27 | "max-nested-callbacks": [1, 3],
28 | "new-cap": 1,
29 | "no-extra-boolean-cast": 1,
30 | "no-lonely-if": 1,
31 | "no-new": 1,
32 | "no-new-wrappers": 1,
33 | "no-redeclare": 1,
34 | "no-unused-expressions": 1,
35 | "no-use-before-define": [1, "nofunc"],
36 | "no-warning-comments": 1,
37 | "strict": 1,
38 | "valid-jsdoc": [1, {
39 | "requireReturn": false
40 | }],
41 | "default-case": 1,
42 |
43 | "dot-notation": 0,
44 | "eol-last": 0,
45 | "eqeqeq": 0,
46 | "no-trailing-spaces": 0,
47 | "no-underscore-dangle": 0,
48 | "quotes": [2, "double"],
49 | "key-spacing": 0,
50 | "comma-spacing": 0,
51 | "no-multi-spaces": 0,
52 | "no-shadow": 0,
53 | "no-irregular-whitespace": 0
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/app/templates/tdg/i18n/messageBundle.properties:
--------------------------------------------------------------------------------
1 | masterTitle=Products
2 | detailTitle=Product
3 | notFoundTitle=Not Found
4 | notFoundText=The requested resource was not found
5 | masterFooterAddButtonTooltip=Add new product
6 | masterListNoDataText=No products
7 | addProductTitle=Add Product
8 | addProductButtonSave=Save
9 | addProductButtonCancel=Cancel
10 | addProductLabelName=Product Name
11 | addProductLabelSupplier=Supplier
12 | addProductLabelCategory=Category
13 | addProductLabelDescription=Product Description
14 | addProductLabelReleaseDate=Release Date
15 | addProductLabelDiscontinuedFlag=Discontinued
16 | addProductLabelDiscontinuedDate=Discontinued Date
17 | addProductLabelPrice=Price (USD)
18 | addProductLabelRating=Rating
19 | addProductTitleBasic=Basic Info
20 | addProductTitleDiscontinued=Discontinued
21 | addProductTitleSupplierCategory=Supplier & Category
22 | iconTabFilterSupplier=Supplier
23 | iconTabFilterCategory=Category
24 | masterSearchTooltip=Enter a product name or part-name
25 | detailFromDate=From
26 | supplierAddress=Supplier Address
27 | supplierAddressName=Name
28 | supplierAddressStreet=Street
29 | supplierAddressCity=City
30 | supplierAddressZIPCode=ZIP Code
31 | supplierAddressCountry=Country
32 | categoryInfo=Category Assignment
33 | categoryInfoID=ID
34 | categoryInfoName=Name
35 | nameRequiredDialogTitle=Missing Product Name
36 | nameRequiredDialogText=Please enter a name for the new product
37 | nameRequiredDialogButton=OK
38 |
--------------------------------------------------------------------------------
/app/templates/application/_index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
<%= applicationName %>
8 |
9 |
15 |
16 |
17 |
18 |
19 |
34 |
35 |
36 |
37 |