[NIFI-5164] upgrade to angular v5.2.0, angular-material v5.2.0, covalent v1.0.1 remove package-lock file from .gitignore and remove author info update pull request template add package-lock.json, update version number to indicate current version, update pr template to simplify reviewer process include webapp in src to facilitate local build and review process update gh-pages deploy process create src/ This closes #1
Project: http://git-wip-us.apache.org/repos/asf/nifi-fds/repo Commit: http://git-wip-us.apache.org/repos/asf/nifi-fds/commit/c85638d8 Tree: http://git-wip-us.apache.org/repos/asf/nifi-fds/tree/c85638d8 Diff: http://git-wip-us.apache.org/repos/asf/nifi-fds/diff/c85638d8 Branch: refs/heads/master Commit: c85638d8ffc4d49ebc98e42c9f5ad4a8144a472e Parents: 4eee1d7 Author: Scott Aslan <[email protected]> Authored: Tue Apr 24 13:43:42 2018 -0400 Committer: Matt Gilman <[email protected]> Committed: Tue May 15 13:55:18 2018 -0400 ---------------------------------------------------------------------- .github/PULL_REQUEST_TEMPLATE.md | 28 + .gitignore | 5 +- Gruntfile.js | 14 + README.md | 58 +- karma-test-shim.js | 112 - karma.conf.js | 134 - package-lock.json | 1288 +++----- package.json | 52 +- platform/core/common/fds-common.module.js | 48 - platform/core/common/fds.animations.js | 133 - .../core/common/services/fds-storage.service.js | 219 -- .../common/services/fds-storage.service.spec.js | 61 - platform/core/common/styles/_basicElements.scss | 130 - platform/core/common/styles/_buttonToggles.scss | 98 - platform/core/common/styles/_buttons.scss | 214 -- platform/core/common/styles/_checkboxes.scss | 85 - platform/core/common/styles/_chips.scss | 73 - .../core/common/styles/_expansionPanels.scss | 62 - platform/core/common/styles/_globalVars.scss | 69 - platform/core/common/styles/_helperClasses.scss | 85 - platform/core/common/styles/_inputs.scss | 109 - platform/core/common/styles/_links.scss | 35 - platform/core/common/styles/_menus.scss | 118 - platform/core/common/styles/_modals.scss | 23 - platform/core/common/styles/_panels.scss | 54 - platform/core/common/styles/_progress-bar.scss | 20 - platform/core/common/styles/_radios.scss | 56 - platform/core/common/styles/_sideNav.scss | 20 - platform/core/common/styles/_stepper.scss | 20 - platform/core/common/styles/_tables.scss | 118 - platform/core/common/styles/_tabs.scss | 41 - platform/core/common/styles/_tooltips.scss | 24 - .../styles/css/fluid-design-system.min.css | 3 - .../styles/css/fluid-design-system.min.css.gz | Bin 3220 -> 0 bytes .../styles/css/fluid-design-system.min.css.map | 28 - .../core/common/styles/fluid-design-system.scss | 36 - .../core/dialogs/_fds-dialog-component.scss | 21 - .../confirm-dialog.component.html | 45 - .../confirm-dialog/confirm-dialog.component.js | 64 - .../confirm-dialog.component.spec.js | 50 - platform/core/dialogs/fds-dialog.component.html | 29 - platform/core/dialogs/fds-dialog.component.js | 85 - .../core/dialogs/fds-dialogs.component.spec.js | 32 - platform/core/dialogs/fds-dialogs.module.js | 87 - .../core/dialogs/services/dialog.service.js | 134 - platform/core/fluid-design-system.module.js | 155 - .../snackbars/coaster/_coaster.component.scss | 63 - .../snackbars/coaster/coaster.component.html | 33 - .../core/snackbars/coaster/coaster.component.js | 70 - .../snackbars/coaster/coaster.component.spec.js | 32 - .../core/snackbars/fds-snackbar.component.html | 29 - .../core/snackbars/fds-snackbar.component.js | 85 - .../snackbars/fds-snackbar.component.spec.js | 32 - platform/core/snackbars/fds-snackbars.module.js | 87 - .../core/snackbars/services/snackbar.service.js | 132 - platform/core/theming/_all-theme.scss | 36 - platform/systemjs-angular-loader.js | 66 - platform/systemjs.spec.config.js | 106 - scripts/clean-install | 9 + scripts/clean-install-skipTests | 18 + scripts/deploy-gh-pages | 19 + scripts/dev-install | 9 + scripts/dev-install-skipTests | 16 + .../dialogs/demo/fds-demo-dialog.html | 18 + .../dialogs/demo/fds-demo-dialog.js | 59 + .../fluid-design-system/fds-demo.html | 2980 ++++++++++++++++++ .../components/fluid-design-system/fds-demo.js | 1066 +++++++ src/demo-app/fds-bootstrap.js | 53 + src/demo-app/fds.animations.js | 133 + src/demo-app/fds.html | 34 + src/demo-app/fds.js | 74 + src/demo-app/fds.module.js | 55 + src/demo-app/fds.routes.js | 26 + src/demo-app/gh-pages.index.html | 36 + src/demo-app/gh-pages.package.json | 57 + src/demo-app/gh-pages.systemjs.config.js | 129 + src/demo-app/index.html | 36 + src/demo-app/services/fds.service.js | 52 + src/demo-app/systemjs-angular-loader.js | 66 + src/demo-app/systemjs.config.extras.js | 27 + src/demo-app/systemjs.config.js | 142 + src/demo-app/theming/_helperClasses.scss | 78 + src/demo-app/theming/_structureElements.scss | 84 + src/demo-app/theming/fds-demo.scss | 49 + src/platform/core/common/fds-common.module.js | 48 + src/platform/core/common/fds.animations.js | 133 + .../core/common/services/fds-storage.service.js | 219 ++ .../common/services/fds-storage.service.spec.js | 61 + .../core/common/styles/_basicElements.scss | 130 + .../core/common/styles/_buttonToggles.scss | 98 + src/platform/core/common/styles/_buttons.scss | 214 ++ .../core/common/styles/_checkboxes.scss | 85 + src/platform/core/common/styles/_chips.scss | 73 + .../core/common/styles/_expansionPanels.scss | 62 + .../core/common/styles/_globalVars.scss | 69 + .../core/common/styles/_helperClasses.scss | 85 + src/platform/core/common/styles/_inputs.scss | 109 + src/platform/core/common/styles/_links.scss | 35 + src/platform/core/common/styles/_menus.scss | 118 + src/platform/core/common/styles/_modals.scss | 23 + src/platform/core/common/styles/_panels.scss | 54 + .../core/common/styles/_progress-bar.scss | 20 + src/platform/core/common/styles/_radios.scss | 56 + src/platform/core/common/styles/_sideNav.scss | 20 + src/platform/core/common/styles/_stepper.scss | 20 + src/platform/core/common/styles/_tables.scss | 118 + src/platform/core/common/styles/_tabs.scss | 41 + src/platform/core/common/styles/_tooltips.scss | 24 + .../core/common/styles/fluid-design-system.scss | 36 + .../core/dialogs/_fds-dialog-component.scss | 21 + .../confirm-dialog.component.html | 45 + .../confirm-dialog/confirm-dialog.component.js | 64 + .../confirm-dialog.component.spec.js | 50 + .../core/dialogs/fds-dialog.component.html | 29 + .../core/dialogs/fds-dialog.component.js | 102 + .../core/dialogs/fds-dialogs.component.spec.js | 32 + src/platform/core/dialogs/fds-dialogs.module.js | 87 + .../core/dialogs/services/dialog.service.js | 140 + src/platform/core/fluid-design-system.module.js | 155 + .../snackbars/coaster/_coaster.component.scss | 63 + .../snackbars/coaster/coaster.component.html | 33 + .../core/snackbars/coaster/coaster.component.js | 70 + .../snackbars/coaster/coaster.component.spec.js | 32 + .../core/snackbars/fds-snackbar.component.html | 29 + .../core/snackbars/fds-snackbar.component.js | 102 + .../snackbars/fds-snackbar.component.spec.js | 32 + .../core/snackbars/fds-snackbars.module.js | 87 + .../core/snackbars/services/snackbar.service.js | 138 + src/platform/core/theming/_all-theme.scss | 36 + src/platform/systemjs.spec.config.js | 115 + test/karma-test-shim.js | 112 + test/karma.conf.js | 132 + 132 files changed, 9586 insertions(+), 4542 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/c85638d8/.github/PULL_REQUEST_TEMPLATE.md ---------------------------------------------------------------------- diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..06d8a85 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,28 @@ +Thank you for submitting a contribution to Apache NiFi Fluid Design System. + +In order to streamline the review of the contribution we ask you +to ensure the following steps have been taken: + +### For all changes: +- [ ] Is there a JIRA ticket associated with this PR? Is it referenced + in the commit message? + +- [ ] Does your PR title start with either NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character. + +- [ ] Has your PR been rebased against the latest commit within the target branch (typically master)? + +- [ ] Is your initial contribution a single, squashed commit? + +### For code changes: +- [ ] Have you written or updated unit tests to verify your changes? +- [ ] Have you ensured that a full build and that the full suite of unit tests is executed via npm run clean:install at the root nifi-fds folder? +- [ ] Have you written or updated the Apache NiFi Fluid Design System demo application to demonstrate any new functionality, provide examples of usage, and to verify your changes via npm start at the nifi-fds/target folder? +- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? +- [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-fds? +- [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-fds? + +### For documentation related changes: +- [ ] Have you ensured that format looks appropriate for the output in which it is rendered? + +### Note: +Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible. http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/c85638d8/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index 1b63b48..e3a849c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,5 @@ -node_modules/ -coverage/ +target/ npm-debug.log* -webapp/ -package-lock.json # Intellij .idea/ http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/c85638d8/Gruntfile.js ---------------------------------------------------------------------- diff --git a/Gruntfile.js b/Gruntfile.js index f4f8ae7..4f69a8f 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -29,6 +29,11 @@ module.exports = function (grunt) { files: [{ './platform/core/common/styles/css/fluid-design-system.min.css': ['./platform/core/common/styles/fluid-design-system.scss'] }] + }, + minifyFdsDemo: { + files: [{ + './demo-app/css/fds-demo.min.css': ['./demo-app/theming/fds-demo.scss'] + }] } }, compress: { @@ -42,6 +47,14 @@ module.exports = function (grunt) { dest: './', ext: '.min.css.gz' }] + }, + fdsDemoStyles: { + files: [{ + expand: true, + src: ['./demo-app/css/fds-demo.min.css'], + dest: './', + ext: '.min.css.gz' + }] } }, bump: { @@ -65,4 +78,5 @@ module.exports = function (grunt) { } }); grunt.registerTask('compile-fds-styles', ['sass:minifyFds', 'compress:fdsStyles']); + grunt.registerTask('compile-fds-demo-styles', ['sass:minifyFdsDemo', 'compress:fdsDemoStyles']); }; http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/c85638d8/README.md ---------------------------------------------------------------------- diff --git a/README.md b/README.md index 5ac1f90..bf4825f 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,10 @@ # Apache NiFi Fluid Design System -The Apache NiFi Fluid Design System module is an atomic reusable platform providing consistent set of UI/UX components for open source friendly web applications to consume. Checkout the demo web application on the `gh-pages` branch to see a complete example of an Angular application that leverages this NGModule. This demo application allows users to interact with and provides sample code for the available UI/UX components: [https://apache.github.io/nifi-fds/](https://apache.github.io/nifi-fds/). +The Apache NiFi Fluid Design System module is an atomic reusable platform providing consistent set of UI/UX components for open source friendly web applications to consume. Users can interact with this design system by running the demo-app locally or by visiting: [https://apache.github.io/nifi-fds/](https://apache.github.io/nifi-fds/). This demo application also provides an example of how an Angular application would leverage the nifi-fds NgModule. #### npm -For developers not interested in building the FDS NgModule you can use **npm** to install the distribution files. +For developers not interested in building the FDS NgModule you can use **npm** to install the distribution files. (TBD: awaiting 0.1 release) ```bash npm install nifi-fds @@ -12,7 +12,7 @@ npm install nifi-fds ## Setup -Import the **Fluid Design System** NgModule into your angular application: +Import the **Apache NiFi Fluid Design System** NgModule into your angular application: ```javascript var fdsCore = require('fluid-design-system/core'); @@ -62,67 +62,57 @@ $fds-theme: mat-light-theme($fds-primary, $fds-accent, $fds-warn); @include fds-theme($fds-theme); ``` -NiFi Fluid Design System UI/UX Platform comes with a base CSS file `node_modules/fluid-design-system/core/common/styles/css/fluid-design-system.min.css` (includes icons). +The Apache NiFi Fluid Design System UI/UX Platform comes with a base CSS file `node_modules/fluid-design-system/core/common/styles/css/fluid-design-system.min.css` (includes icons) that should be included in the head of your HTML document. ## Building -Developers can easily build this project using **npm**. - -First install or update your local project's **npm** tools: +Developers can easily build this project using **npm** from the root nifi-fds directory via: ```bash -npm install +npm run clean:install ``` -Next run: +or to run without unit tests run: ```bash -npm run build +npm run clean:install:skipTests ``` -## Testing +## Developing -Developers can easily test this project using **npm**. +Developers can easily skip the re-instalation of node_modules and run unit tests in development mode using **npm**. ```bash -npm test +npm run dev:install ``` -Or, during development: +or to run without unit tests run: ```bash -npm run test:dev +npm run dev:install:skipTests ``` -## Release Managment - -For developers with permissions releasing a new version of the NiFi Fluid Design System is simple with [grunt bump](https://github.com/vojtajina/grunt-bump) +## Running locally -## Running the demo locally - -For developers that would like to contribute to the demo please checkout the `gh-pages` branch: +Once built you can start the application from the target directory via: ```bash -git checkout gh-pages +cd target +npm start ``` -Next, you will need to update the base url. To do this simply edit the index.html file on line 21: +The demo application should now be availalbe at: [http://127.0.0.1:8080/](http://127.0.0.1:8080/). The port may differ if there is a conflict on 8080. See the output of the start command for the +available URLs. -```bash -<base href='/fluid-design-system/'> -``` +## Release Managment -should be: +For developers with permissions releasing a new version of the NiFi Fluid Design System is simple with [grunt bump](https://github.com/vojtajina/grunt-bump). -```bash -<base href='/'> -``` +## Deploying github.io demo -Finally, start the application: +The nifi-fds github.io demo can be deployed from the root nifi-fds directory via: (TBD: awaiting 0.1 release) ```bash -npm start +npm run deploy:ghpages ``` -The demo application should now be availalbe at: [http://127.0.0.1:8080/](http://127.0.0.1:8080/). - http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/c85638d8/karma-test-shim.js ---------------------------------------------------------------------- diff --git a/karma-test-shim.js b/karma-test-shim.js deleted file mode 100644 index eeeb18d..0000000 --- a/karma-test-shim.js +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -// /*global jasmine, __karma__, window*/ -Error.stackTraceLimit = 0; // "No stacktrace"" is usually best for app testing. - -// Uncomment to get full stacktrace output. Sometimes helpful, usually not. -// Error.stackTraceLimit = Infinity; // - -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000; - -// builtPaths: root paths for output ("built") files -// get from karma.config.js, then prefix with '/base/' -var builtPaths = (__karma__.config.builtPaths) - .map(function (p) { - return '/base/' + p; - }); - -__karma__.loaded = function () { -}; - -function isJsFile(path) { - return path.slice(-3) == '.js'; -} - -function isSpecFile(path) { - return /\.spec\.(.*\.)?js$/.test(path); -} - -// Is a "built" file if is JavaScript file in one of the "built" folders -function isBuiltFile(path) { - return isJsFile(path) && - builtPaths.reduce(function (keep, bp) { - return keep || (path.substr(0, bp.length) === bp); - }, false); -} - -var allSpecFiles = Object.keys(window.__karma__.files) - .filter(isSpecFile) - .filter(isBuiltFile); - -System.config({ - // Base URL for System.js calls. 'base/' is where Karma serves files from. - baseURL: 'base', - - // Map the angular testing umd bundles - map: { - '@angular/core/testing': 'npm:@angular/core/bundles/core-testing.umd.js', - '@angular/common/testing': 'npm:@angular/common/bundles/common-testing.umd.js', - '@angular/compiler/testing': 'npm:@angular/compiler/bundles/compiler-testing.umd.js', - '@angular/platform-browser/testing': 'npm:@angular/platform-browser/bundles/platform-browser-testing.umd.js', - '@angular/platform-browser-dynamic/testing': 'npm:@angular/platform-browser-dynamic/bundles/platform-browser-dynamic-testing.umd.js', - '@angular/http/testing': 'npm:@angular/http/bundles/http-testing.umd.js', - '@angular/router/testing': 'npm:@angular/router/bundles/router-testing.umd.js', - '@angular/forms/testing': 'npm:@angular/forms/bundles/forms-testing.umd.js' - } -}); - -System.import('platform/systemjs.spec.config.js') - .then(initTestBed) - .then(initTesting); - -/** Optional SystemJS configuration extras. Keep going w/o it */ -function importSystemJsExtras() { - return System.import('platform/systemjs.config.extras.js') - .catch(function (reason) { - console.log( - 'Warning: System.import could not load the optional "systemjs.config.extras.js". Did you omit it by accident? Continuing without it.' - ); - console.log(reason); - }); -} - -function initTestBed() { - return Promise.all([ - System.import('@angular/core/testing'), - System.import('@angular/platform-browser-dynamic/testing') - ]) - - .then(function (providers) { - var coreTesting = providers[0]; - var browserTesting = providers[1]; - - coreTesting.TestBed.initTestEnvironment( - browserTesting.BrowserDynamicTestingModule, - browserTesting.platformBrowserDynamicTesting()); - }) -} - -// Import all spec files and start karma -function initTesting() { - return Promise.all( - allSpecFiles.map(function (moduleName) { - return System.import(moduleName); - }) - ) - .then(__karma__.start, __karma__.error); -} http://git-wip-us.apache.org/repos/asf/nifi-fds/blob/c85638d8/karma.conf.js ---------------------------------------------------------------------- diff --git a/karma.conf.js b/karma.conf.js deleted file mode 100644 index 4b0f692..0000000 --- a/karma.conf.js +++ /dev/null @@ -1,134 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -module.exports = function (config) { - - var appBase = 'platform/'; // app JS and map files - - config.set({ - basePath: '', - browserNoActivityTimeout: 9999999, //default 10000 - browserDisconnectTimeout: 999999, // default 2000 - browserDisconnectTolerance: 1, // default 0 - captureTimeout: 999999, - frameworks: ['jasmine'], - customLaunchers: { - Chrome_travis_ci: { - base: 'ChromeHeadless', - flags: ['--no-sandbox'] - } - }, - plugins: [ - require('karma-jasmine'), - require('karma-chrome-launcher'), - require('karma-jasmine-html-reporter'), - require('karma-spec-reporter'), - require('karma-coverage') - ], - - client: { - builtPaths: [appBase], // add more spec base paths as needed - clearContext: false // leave Jasmine Spec Runner output visible in browser - }, - - files: [ - // System.js for module loading - 'node_modules/systemjs/dist/system.src.js', - - // Polyfills - 'node_modules/core-js/client/shim.js', - - // zone.js - 'node_modules/zone.js/dist/zone.js', - 'node_modules/zone.js/dist/long-stack-trace-zone.js', - 'node_modules/zone.js/dist/proxy.js', - 'node_modules/zone.js/dist/sync-test.js', - 'node_modules/zone.js/dist/jasmine-patch.js', - 'node_modules/zone.js/dist/async-test.js', - 'node_modules/zone.js/dist/fake-async-test.js', - - // RxJs - {pattern: 'node_modules/rxjs/**/*.js', included: false, watched: false}, - {pattern: 'node_modules/rxjs/**/*.js.map', included: false, watched: false}, - - // Paths loaded via module imports: - {pattern: 'node_modules/systemjs/**/*.js.map', included: false, watched: false}, - {pattern: 'node_modules/@angular/**/*.js', included: false, watched: false}, - {pattern: 'node_modules/@angular/**/*.js.map', included: false, watched: false}, - {pattern: 'node_modules/jquery/**/*.js', included: false, watched: false}, - {pattern: 'node_modules/systemjs-plugin-text/text.js', included: false, watched: false}, - - {pattern: appBase + 'systemjs.spec.config.js', included: false, watched: false}, - 'karma-test-shim.js', // optionally extend SystemJS mapping e.g., with barrels - - // Include the Fluid Design System templates in the test suite. - { - pattern: 'platform/core/**/*.html', - included: true, - watched: true, - served: true - }, - - // Paths for debugging with source maps in dev tools - {pattern: appBase + '**/*.css.map', included: false, watched: false}, - {pattern: appBase + '**/*.js', included: false, watched: false} - ], - - // Proxied base paths for loading assets - proxies: { - // required for modules fetched by SystemJS - '/base/fds/node_modules/': '/base/node_modules/', - '/base/systemjs-angular-loader.js': '/base/platform/systemjs-angular-loader.js', - '/base/fds/': '/base/platform/' - }, - - exclude: [], - preprocessors: { - 'platform/**/!(*spec|*mock|*stub|*config|*extras|).js': 'coverage' - }, - reporters: ['kjhtml', 'spec', 'coverage'], - coverageReporter: { - type: 'html', - dir: 'coverage/' - }, - specReporter: { - failFast: false - }, - port: 9876, - colors: true, - logLevel: config.LOG_INFO, - autoWatch: true, - browsers: ['Chrome'], - singleRun: false - }); - - if (process.env.TRAVIS) { - config.set({ - browsers: ['Chrome_travis_ci'] - }); - - // Override base config - config.set({ - singleRun: true, - autoWatch: false, - reporters: ['spec', 'coverage'], - specReporter: { - failFast: true - } - }); - } -}
