From 2825e0145b7bd1fd19c04d4084bbbcdcdbfa1fe9 Mon Sep 17 00:00:00 2001 From: steve wirts Date: Thu, 19 Feb 2015 19:02:37 -0500 Subject: [PATCH] major refactoring --- .csslintrc | 4 + Gruntfile-old.js | 292 +++ Gruntfile.js | 373 +++- behaviors/fin-hypergrid-behavior-json.html | 389 ---- demo.html | 2 +- .../fin-hypergrid-feature-cell-editing.html | 36 - ...ypergrid-feature-thumbwheel-scrolling.html | 37 - fin-hypergrid.html | 1816 ----------------- fin-hypergrid.min.html | 10 +- fin-hypergrid.post.html | 2 - fin-hypergrid.pre.html | 123 -- main.html | 2 + package.json | 8 + .../fin-hypergrid-behavior-default.css | 4 + .../behaviors/fin-hypergrid-behavior-gol.css | 4 + .../fin-hypergrid-behavior-in-memory.css | 4 + .../behaviors/fin-hypergrid-behavior-json.css | 4 + .../behaviors/fin-hypergrid-behavior-q.css | 4 + .../fin-hypergrid-behavior-qtree.css | 4 + .../fin-hypergrid-cell-editor-base.css | 4 + .../fin-hypergrid-cell-editor-choice.css | 4 + .../fin-hypergrid-cell-editor-color.css | 4 + .../fin-hypergrid-cell-editor-date.css | 4 + .../fin-hypergrid-cell-editor-simple.css | 4 + .../fin-hypergrid-cell-editor-slider.css | 4 + .../fin-hypergrid-cell-editor-spinner.css | 4 + .../fin-hypergrid-cell-editor-textfield.css | 4 + .../features/fin-hypergrid-feature-base.css | 4 + .../fin-hypergrid-feature-cell-editing.css | 4 + .../fin-hypergrid-feature-cell-selection.css | 4 + .../fin-hypergrid-feature-column-moving.css | 4 + .../fin-hypergrid-feature-column-resizing.css | 4 + .../fin-hypergrid-feature-column-sorting.css | 4 + .../fin-hypergrid-feature-overlay.css | 4 + .../fin-hypergrid-feature-row-resizing.css | 4 + ...hypergrid-feature-thumbwheel-scrolling.css | 4 + polymer/css/fin-hypergrid-cell-provider.css | 4 + polymer/css/fin-hypergrid-constants.css | 4 + polymer/css/fin-hypergrid-excel.css | 4 + polymer/css/fin-hypergrid-renderer.css | 4 + polymer/css/fin-hypergrid-selection-model.css | 4 + polymer/css/fin-hypergrid.css | 53 + .../fin-hypergrid-behavior-default.html | 22 + .../behaviors/fin-hypergrid-behavior-gol.html | 12 + .../fin-hypergrid-behavior-in-memory.html | 12 + .../fin-hypergrid-behavior-json.html | 13 + .../behaviors/fin-hypergrid-behavior-q.html | 12 + .../fin-hypergrid-behavior-qtree.html | 12 + .../fin-hypergrid-cell-editor-base.html | 12 + .../fin-hypergrid-cell-editor-choice.html | 25 +- .../fin-hypergrid-cell-editor-color.html | 22 +- .../fin-hypergrid-cell-editor-date.html | 22 +- .../fin-hypergrid-cell-editor-simple.html | 14 + .../fin-hypergrid-cell-editor-slider.html | 23 +- .../fin-hypergrid-cell-editor-spinner.html | 23 +- .../fin-hypergrid-cell-editor-textfield.html | 25 +- .../features/fin-hypergrid-feature-base.html | 12 + .../fin-hypergrid-feature-cell-editing.html | 12 + .../fin-hypergrid-feature-cell-selection.html | 12 + .../fin-hypergrid-feature-column-moving.html | 12 + ...fin-hypergrid-feature-column-resizing.html | 12 + .../fin-hypergrid-feature-column-sorting.html | 12 + .../fin-hypergrid-feature-overlay.html | 12 + .../fin-hypergrid-feature-row-resizing.html | 12 + ...ypergrid-feature-thumbwheel-scrolling.html | 12 + polymer/html/fin-hypergrid-cell-provider.html | 13 + polymer/html/fin-hypergrid-constants.html | 12 + polymer/html/fin-hypergrid-excel.html | 12 + polymer/html/fin-hypergrid-renderer.html | 13 + .../html/fin-hypergrid-selection-model.html | 12 + polymer/html/fin-hypergrid.html | 59 + .../fin-hypergrid-behavior-default.js | 57 +- .../behaviors/fin-hypergrid-behavior-gol.js | 120 +- .../fin-hypergrid-behavior-in-memory.js | 24 +- .../behaviors/fin-hypergrid-behavior-json.js | 374 ++++ .../js/behaviors/fin-hypergrid-behavior-q.js | 42 +- .../behaviors/fin-hypergrid-behavior-qtree.js | 232 +-- .../fin-hypergrid-cell-editor-base.js | 31 +- .../fin-hypergrid-cell-editor-choice.js | 13 + .../fin-hypergrid-cell-editor-color.js | 9 + .../fin-hypergrid-cell-editor-date.js | 9 + .../fin-hypergrid-cell-editor-simple.js | 21 +- .../fin-hypergrid-cell-editor-slider.js | 9 + .../fin-hypergrid-cell-editor-spinner.js | 9 + .../fin-hypergrid-cell-editor-textfield.js | 12 + .../js/features/fin-hypergrid-feature-base.js | 24 +- .../fin-hypergrid-feature-cell-editing.js | 19 + .../fin-hypergrid-feature-cell-selection.js | 22 +- .../fin-hypergrid-feature-column-moving.js | 26 +- .../fin-hypergrid-feature-column-resizing.js | 33 +- .../fin-hypergrid-feature-column-sorting.js | 19 +- .../features/fin-hypergrid-feature-overlay.js | 31 +- .../fin-hypergrid-feature-row-resizing.js | 21 +- ...-hypergrid-feature-thumbwheel-scrolling.js | 20 + .../js/fin-hypergrid-cell-provider.js | 36 +- .../js/fin-hypergrid-constants.js | 16 - .../js/fin-hypergrid-excel.js | 19 +- .../js/fin-hypergrid-renderer.js | 108 +- .../js/fin-hypergrid-selection-model.js | 17 - .../js/fin-hypergrid.js | 0 talk-outline.txt | 17 + test/basic-test.html | 39 - test/basic-test.post.html | 4 - test/basic-test.pre.html | 17 - .../fin-hypergrid-behavior-default.html | 15 + .../fin-hypergrid-behavior-default.js | 16 + .../behaviors/fin-hypergrid-behavior-gol.html | 15 + test/behaviors/fin-hypergrid-behavior-gol.js | 16 + .../fin-hypergrid-behavior-in-memory.html | 15 + .../fin-hypergrid-behavior-in-memory.js | 16 + .../fin-hypergrid-behavior-json.html | 15 + test/behaviors/fin-hypergrid-behavior-json.js | 16 + test/behaviors/fin-hypergrid-behavior-q.html | 15 + test/behaviors/fin-hypergrid-behavior-q.js | 16 + .../fin-hypergrid-behavior-qtree.html | 15 + .../behaviors/fin-hypergrid-behavior-qtree.js | 16 + .../fin-hypergrid-cell-editor-base.html | 15 + .../fin-hypergrid-cell-editor-base.js | 16 + .../fin-hypergrid-cell-editor-choice.html | 15 + .../fin-hypergrid-cell-editor-choice.js | 16 + .../fin-hypergrid-cell-editor-color.html | 15 + .../fin-hypergrid-cell-editor-color.js | 16 + .../fin-hypergrid-cell-editor-date.html | 15 + .../fin-hypergrid-cell-editor-date.js | 16 + .../fin-hypergrid-cell-editor-simple.html | 15 + .../fin-hypergrid-cell-editor-simple.js | 16 + .../fin-hypergrid-cell-editor-slider.html | 15 + .../fin-hypergrid-cell-editor-slider.js | 16 + .../fin-hypergrid-cell-editor-spinner.html | 15 + .../fin-hypergrid-cell-editor-spinner.js | 16 + .../fin-hypergrid-cell-editor-textfield.html | 15 + .../fin-hypergrid-cell-editor-textfield.js | 16 + test/features/fin-hypergrid-feature-base.html | 15 + test/features/fin-hypergrid-feature-base.js | 16 + .../fin-hypergrid-feature-cell-editing.html | 15 + .../fin-hypergrid-feature-cell-editing.js | 16 + .../fin-hypergrid-feature-cell-selection.html | 15 + .../fin-hypergrid-feature-cell-selection.js | 16 + .../fin-hypergrid-feature-column-moving.html | 15 + .../fin-hypergrid-feature-column-moving.js | 16 + ...fin-hypergrid-feature-column-resizing.html | 15 + .../fin-hypergrid-feature-column-resizing.js | 16 + .../fin-hypergrid-feature-column-sorting.html | 15 + .../fin-hypergrid-feature-column-sorting.js | 16 + .../fin-hypergrid-feature-overlay.html | 15 + .../features/fin-hypergrid-feature-overlay.js | 16 + .../fin-hypergrid-feature-row-resizing.html | 15 + .../fin-hypergrid-feature-row-resizing.js | 16 + ...ypergrid-feature-thumbwheel-scrolling.html | 15 + ...-hypergrid-feature-thumbwheel-scrolling.js | 16 + test/fin-hypergrid-cell-provider.html | 15 + test/fin-hypergrid-cell-provider.js | 16 + test/fin-hypergrid-constants.html | 15 + test/fin-hypergrid-constants.js | 16 + test/fin-hypergrid-excel.html | 15 + test/fin-hypergrid-excel.js | 16 + test/fin-hypergrid-renderer.html | 15 + test/fin-hypergrid-renderer.js | 16 + test/fin-hypergrid-selection-model.html | 15 + test/fin-hypergrid-selection-model.js | 16 + test/fin-hypergrid.html | 15 + test/{basic-test.js => fin-hypergrid.js} | 2 +- test/index.html | 30 +- validation-report.json | 1 + validation-status.json | 1 + 165 files changed, 2867 insertions(+), 3237 deletions(-) create mode 100644 .csslintrc create mode 100644 Gruntfile-old.js delete mode 100644 behaviors/fin-hypergrid-behavior-json.html delete mode 100644 features/fin-hypergrid-feature-cell-editing.html delete mode 100644 features/fin-hypergrid-feature-thumbwheel-scrolling.html delete mode 100644 fin-hypergrid.html delete mode 100644 fin-hypergrid.post.html delete mode 100644 fin-hypergrid.pre.html create mode 100644 main.html create mode 100644 polymer/css/behaviors/fin-hypergrid-behavior-default.css create mode 100644 polymer/css/behaviors/fin-hypergrid-behavior-gol.css create mode 100644 polymer/css/behaviors/fin-hypergrid-behavior-in-memory.css create mode 100644 polymer/css/behaviors/fin-hypergrid-behavior-json.css create mode 100644 polymer/css/behaviors/fin-hypergrid-behavior-q.css create mode 100644 polymer/css/behaviors/fin-hypergrid-behavior-qtree.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-base.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-choice.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-color.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-date.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-simple.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-slider.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-spinner.css create mode 100644 polymer/css/cell-editors/fin-hypergrid-cell-editor-textfield.css create mode 100644 polymer/css/features/fin-hypergrid-feature-base.css create mode 100644 polymer/css/features/fin-hypergrid-feature-cell-editing.css create mode 100644 polymer/css/features/fin-hypergrid-feature-cell-selection.css create mode 100644 polymer/css/features/fin-hypergrid-feature-column-moving.css create mode 100644 polymer/css/features/fin-hypergrid-feature-column-resizing.css create mode 100644 polymer/css/features/fin-hypergrid-feature-column-sorting.css create mode 100644 polymer/css/features/fin-hypergrid-feature-overlay.css create mode 100644 polymer/css/features/fin-hypergrid-feature-row-resizing.css create mode 100644 polymer/css/features/fin-hypergrid-feature-thumbwheel-scrolling.css create mode 100644 polymer/css/fin-hypergrid-cell-provider.css create mode 100644 polymer/css/fin-hypergrid-constants.css create mode 100644 polymer/css/fin-hypergrid-excel.css create mode 100644 polymer/css/fin-hypergrid-renderer.css create mode 100644 polymer/css/fin-hypergrid-selection-model.css create mode 100644 polymer/css/fin-hypergrid.css create mode 100644 polymer/html/behaviors/fin-hypergrid-behavior-default.html create mode 100644 polymer/html/behaviors/fin-hypergrid-behavior-gol.html create mode 100644 polymer/html/behaviors/fin-hypergrid-behavior-in-memory.html create mode 100644 polymer/html/behaviors/fin-hypergrid-behavior-json.html create mode 100644 polymer/html/behaviors/fin-hypergrid-behavior-q.html create mode 100644 polymer/html/behaviors/fin-hypergrid-behavior-qtree.html create mode 100644 polymer/html/cell-editors/fin-hypergrid-cell-editor-base.html rename {cell-editors => polymer/html/cell-editors}/fin-hypergrid-cell-editor-choice.html (56%) rename {cell-editors => polymer/html/cell-editors}/fin-hypergrid-cell-editor-color.html (64%) rename {cell-editors => polymer/html/cell-editors}/fin-hypergrid-cell-editor-date.html (64%) create mode 100644 polymer/html/cell-editors/fin-hypergrid-cell-editor-simple.html rename {cell-editors => polymer/html/cell-editors}/fin-hypergrid-cell-editor-slider.html (64%) rename {cell-editors => polymer/html/cell-editors}/fin-hypergrid-cell-editor-spinner.html (64%) rename {cell-editors => polymer/html/cell-editors}/fin-hypergrid-cell-editor-textfield.html (60%) create mode 100644 polymer/html/features/fin-hypergrid-feature-base.html create mode 100644 polymer/html/features/fin-hypergrid-feature-cell-editing.html create mode 100644 polymer/html/features/fin-hypergrid-feature-cell-selection.html create mode 100644 polymer/html/features/fin-hypergrid-feature-column-moving.html create mode 100644 polymer/html/features/fin-hypergrid-feature-column-resizing.html create mode 100644 polymer/html/features/fin-hypergrid-feature-column-sorting.html create mode 100644 polymer/html/features/fin-hypergrid-feature-overlay.html create mode 100644 polymer/html/features/fin-hypergrid-feature-row-resizing.html create mode 100644 polymer/html/features/fin-hypergrid-feature-thumbwheel-scrolling.html create mode 100644 polymer/html/fin-hypergrid-cell-provider.html create mode 100644 polymer/html/fin-hypergrid-constants.html create mode 100644 polymer/html/fin-hypergrid-excel.html create mode 100644 polymer/html/fin-hypergrid-renderer.html create mode 100644 polymer/html/fin-hypergrid-selection-model.html create mode 100644 polymer/html/fin-hypergrid.html rename behaviors/fin-hypergrid-behavior-default.html => polymer/js/behaviors/fin-hypergrid-behavior-default.js (88%) rename behaviors/fin-hypergrid-behavior-gol.html => polymer/js/behaviors/fin-hypergrid-behavior-gol.js (67%) rename behaviors/fin-hypergrid-behavior-in-memory.html => polymer/js/behaviors/fin-hypergrid-behavior-in-memory.js (96%) create mode 100644 polymer/js/behaviors/fin-hypergrid-behavior-json.js rename behaviors/fin-hypergrid-behavior-q.html => polymer/js/behaviors/fin-hypergrid-behavior-q.js (92%) rename behaviors/fin-hypergrid-behavior-qtree.html => polymer/js/behaviors/fin-hypergrid-behavior-qtree.js (78%) rename cell-editors/fin-hypergrid-cell-editor-base.html => polymer/js/cell-editors/fin-hypergrid-cell-editor-base.js (86%) create mode 100644 polymer/js/cell-editors/fin-hypergrid-cell-editor-choice.js create mode 100644 polymer/js/cell-editors/fin-hypergrid-cell-editor-color.js create mode 100644 polymer/js/cell-editors/fin-hypergrid-cell-editor-date.js rename cell-editors/fin-hypergrid-cell-editor-simple.html => polymer/js/cell-editors/fin-hypergrid-cell-editor-simple.js (79%) create mode 100644 polymer/js/cell-editors/fin-hypergrid-cell-editor-slider.js create mode 100644 polymer/js/cell-editors/fin-hypergrid-cell-editor-spinner.js create mode 100644 polymer/js/cell-editors/fin-hypergrid-cell-editor-textfield.js rename features/fin-hypergrid-feature-base.html => polymer/js/features/fin-hypergrid-feature-base.js (85%) create mode 100644 polymer/js/features/fin-hypergrid-feature-cell-editing.js rename features/fin-hypergrid-feature-cell-selection.html => polymer/js/features/fin-hypergrid-feature-cell-selection.js (97%) rename features/fin-hypergrid-feature-column-moving.html => polymer/js/features/fin-hypergrid-feature-column-moving.js (97%) rename features/fin-hypergrid-feature-column-resizing.html => polymer/js/features/fin-hypergrid-feature-column-resizing.js (85%) rename features/fin-hypergrid-feature-column-sorting.html => polymer/js/features/fin-hypergrid-feature-column-sorting.js (68%) rename features/fin-hypergrid-feature-overlay.html => polymer/js/features/fin-hypergrid-feature-overlay.js (84%) rename features/fin-hypergrid-feature-row-resizing.html => polymer/js/features/fin-hypergrid-feature-row-resizing.js (74%) create mode 100644 polymer/js/features/fin-hypergrid-feature-thumbwheel-scrolling.js rename fin-hypergrid-cell-provider.html => polymer/js/fin-hypergrid-cell-provider.js (91%) rename fin-hypergrid-constants.html => polymer/js/fin-hypergrid-constants.js (70%) rename fin-hypergrid-excel.html => polymer/js/fin-hypergrid-excel.js (88%) rename fin-hypergrid-renderer.html => polymer/js/fin-hypergrid-renderer.js (91%) rename fin-hypergrid-selection-model.html => polymer/js/fin-hypergrid-selection-model.js (86%) rename fin-hypergrid.js => polymer/js/fin-hypergrid.js (100%) delete mode 100644 test/basic-test.html delete mode 100644 test/basic-test.post.html delete mode 100644 test/basic-test.pre.html create mode 100644 test/behaviors/fin-hypergrid-behavior-default.html create mode 100644 test/behaviors/fin-hypergrid-behavior-default.js create mode 100644 test/behaviors/fin-hypergrid-behavior-gol.html create mode 100644 test/behaviors/fin-hypergrid-behavior-gol.js create mode 100644 test/behaviors/fin-hypergrid-behavior-in-memory.html create mode 100644 test/behaviors/fin-hypergrid-behavior-in-memory.js create mode 100644 test/behaviors/fin-hypergrid-behavior-json.html create mode 100644 test/behaviors/fin-hypergrid-behavior-json.js create mode 100644 test/behaviors/fin-hypergrid-behavior-q.html create mode 100644 test/behaviors/fin-hypergrid-behavior-q.js create mode 100644 test/behaviors/fin-hypergrid-behavior-qtree.html create mode 100644 test/behaviors/fin-hypergrid-behavior-qtree.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-base.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-base.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-choice.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-choice.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-color.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-color.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-date.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-date.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-simple.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-simple.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-slider.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-slider.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-spinner.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-spinner.js create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-textfield.html create mode 100644 test/cell-editors/fin-hypergrid-cell-editor-textfield.js create mode 100644 test/features/fin-hypergrid-feature-base.html create mode 100644 test/features/fin-hypergrid-feature-base.js create mode 100644 test/features/fin-hypergrid-feature-cell-editing.html create mode 100644 test/features/fin-hypergrid-feature-cell-editing.js create mode 100644 test/features/fin-hypergrid-feature-cell-selection.html create mode 100644 test/features/fin-hypergrid-feature-cell-selection.js create mode 100644 test/features/fin-hypergrid-feature-column-moving.html create mode 100644 test/features/fin-hypergrid-feature-column-moving.js create mode 100644 test/features/fin-hypergrid-feature-column-resizing.html create mode 100644 test/features/fin-hypergrid-feature-column-resizing.js create mode 100644 test/features/fin-hypergrid-feature-column-sorting.html create mode 100644 test/features/fin-hypergrid-feature-column-sorting.js create mode 100644 test/features/fin-hypergrid-feature-overlay.html create mode 100644 test/features/fin-hypergrid-feature-overlay.js create mode 100644 test/features/fin-hypergrid-feature-row-resizing.html create mode 100644 test/features/fin-hypergrid-feature-row-resizing.js create mode 100644 test/features/fin-hypergrid-feature-thumbwheel-scrolling.html create mode 100644 test/features/fin-hypergrid-feature-thumbwheel-scrolling.js create mode 100644 test/fin-hypergrid-cell-provider.html create mode 100644 test/fin-hypergrid-cell-provider.js create mode 100644 test/fin-hypergrid-constants.html create mode 100644 test/fin-hypergrid-constants.js create mode 100644 test/fin-hypergrid-excel.html create mode 100644 test/fin-hypergrid-excel.js create mode 100644 test/fin-hypergrid-renderer.html create mode 100644 test/fin-hypergrid-renderer.js create mode 100644 test/fin-hypergrid-selection-model.html create mode 100644 test/fin-hypergrid-selection-model.js create mode 100644 test/fin-hypergrid.html rename test/{basic-test.js => fin-hypergrid.js} (86%) mode change 100755 => 100644 test/index.html create mode 100644 validation-report.json create mode 100644 validation-status.json diff --git a/.csslintrc b/.csslintrc new file mode 100644 index 000000000..8054f45ee --- /dev/null +++ b/.csslintrc @@ -0,0 +1,4 @@ +{ + // unicorns + 'outline-none': false +} diff --git a/Gruntfile-old.js b/Gruntfile-old.js new file mode 100644 index 000000000..6cebd0064 --- /dev/null +++ b/Gruntfile-old.js @@ -0,0 +1,292 @@ +'use strict'; + +var files = { + js: [ + 'gruntfile.js', + '*.js', + 'test/**/*.js' + ], + + jshint: [ + 'gruntfile.js', + '*.js', + 'test/**/*.js', + ], + jsandhtml: [ + 'gruntfile.js', + '*.js', + '*.html', + 'test/**/*.js', + 'test/**/*.html' + ] +}; +var delimeter = (__dirname.indexOf('/') > -1) ? '/' : '\\'; +var myDir = __dirname.split(delimeter); +var elementName = myDir[myDir.length - 1]; +myDir.pop(); +var parentDir = myDir.join(delimeter); + +module.exports = function(grunt) { + //load all npm tasks automagically + require('load-grunt-tasks')(grunt); + + grunt.initConfig({ + + watch: { + jsandhtml: { + files: files.js, + tasks: ['jsbeautifier', 'jshint', 'concat', 'wct-test', 'vulcanize'], + }, + gruntfile: { + files: ['Gruntfile.js'], + tasks: [] + }, + lr: { + files: ['**/*.html', '*.js'], + options: { + livereload: true + }, + tasks: ['jshint'] + } + }, + + vulcanize: { + default: { + options: { + inline: true, + strip: true + }, + files: { + 'fin-hypergrid.min.html': 'fin-hypergrid.html' + }, + }, + }, + + jshint: { + files: files.jshint, + options: { + jshintrc: '.jshintrc', + reporter: require('jshint-stylish') + } + }, + + concat: { + 'polymer-element': { + src: [elementName + '.pre.html', elementName + '.js', elementName + '.post.html'], + dest: elementName + '.html', + }, + 'basic-test': { + src: ['test/basic-test.pre.html', 'test/basic-test.js', 'test/basic-test.post.html'], + dest: 'test/basic-test.html', + } + }, + + 'wct-test': { + default: { + options: { + testTimeout: 3 * 1000, + browsers: ['chrome'], + remote: false + }, + } + }, + + jsbeautifier: { + files: files.js, + options: { + js: { + braceStyle: 'collapse', + breakChainedMethods: false, + e4x: false, + evalCode: false, + indentChar: ' ', + indentLevel: 0, + indentSize: 4, + indentWithTabs: false, + jslintHappy: false, + keepArrayIndentation: false, + keepFunctionIndentation: false, + maxPreserveNewlines: 10, + preserveNewlines: true, + spaceBeforeConditional: true, + spaceInParen: false, + unescapeStrings: false, + wrapLineLength: 0 + } + } + }, + 'polymer-html-concat': { + default: { + js: 'poly-js', + pre: 'poly-pre-html', + post: 'poly-post-html', + css: 'poly-css' + } + }, + connect: { + server: { + options: { + port: 9000, + // Change this to '0.0.0.0' to access the server from outside. + hostname: '0.0.0.0', + livereload: true, + open: true, + base: [{ + path: './', + options: { + index: 'demo.html', + maxAge: 0 + } + }, { + path: '../', + options: { + maxAge: 0 + } + } + + ] + } + }, + serverDocs: { + options: { + port: 9090, + // Change this to '0.0.0.0' to access the server from outside. + hostname: '0.0.0.0', + livereload: true, + open: { + target: 'http://localhost:9090/' + elementName + '/' + 'index.html' + }, + base: [{ + path: parentDir + } + + ] + } + } + }, + + //---------------------------------- + }); + + grunt.loadNpmTasks('web-component-tester'); + grunt.registerTask('test', ['jshint', 'wct-test']); + grunt.registerTask('default', [ + 'jsbeautifier', + 'jshint', + 'wct-test', + ]); + + grunt.registerTask('serve', function() { + return grunt.task.run([ + 'concat', + 'wct-test', + 'connect', + 'watch' + ]); + }); + +// /poly-css +// /poly-pre-html +// /poly-post-html +// /poly-js + function createHtmlPre(elName){ + var strVar = '\n'; + strVar += '\n'; + strVar += ' - - \ No newline at end of file diff --git a/fin-hypergrid.min.html b/fin-hypergrid.min.html index 4df0341e3..6931d202c 100644 --- a/fin-hypergrid.min.html +++ b/fin-hypergrid.min.html @@ -1,27 +1,21 @@ \ No newline at end of file diff --git a/fin-hypergrid.post.html b/fin-hypergrid.post.html deleted file mode 100644 index ff422e702..000000000 --- a/fin-hypergrid.post.html +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/fin-hypergrid.pre.html b/fin-hypergrid.pre.html deleted file mode 100644 index 34ae7fab8..000000000 --- a/fin-hypergrid.pre.html +++ /dev/null @@ -1,123 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - + \ No newline at end of file diff --git a/polymer/html/behaviors/fin-hypergrid-behavior-gol.html b/polymer/html/behaviors/fin-hypergrid-behavior-gol.html new file mode 100644 index 000000000..3f1474687 --- /dev/null +++ b/polymer/html/behaviors/fin-hypergrid-behavior-gol.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/behaviors/fin-hypergrid-behavior-in-memory.html b/polymer/html/behaviors/fin-hypergrid-behavior-in-memory.html new file mode 100644 index 000000000..77d224e97 --- /dev/null +++ b/polymer/html/behaviors/fin-hypergrid-behavior-in-memory.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/behaviors/fin-hypergrid-behavior-json.html b/polymer/html/behaviors/fin-hypergrid-behavior-json.html new file mode 100644 index 000000000..f56d6ffbc --- /dev/null +++ b/polymer/html/behaviors/fin-hypergrid-behavior-json.html @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/polymer/html/behaviors/fin-hypergrid-behavior-q.html b/polymer/html/behaviors/fin-hypergrid-behavior-q.html new file mode 100644 index 000000000..929413ccd --- /dev/null +++ b/polymer/html/behaviors/fin-hypergrid-behavior-q.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/behaviors/fin-hypergrid-behavior-qtree.html b/polymer/html/behaviors/fin-hypergrid-behavior-qtree.html new file mode 100644 index 000000000..c8c5d411a --- /dev/null +++ b/polymer/html/behaviors/fin-hypergrid-behavior-qtree.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/cell-editors/fin-hypergrid-cell-editor-base.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-base.html new file mode 100644 index 000000000..33f3233ba --- /dev/null +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-base.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/cell-editors/fin-hypergrid-cell-editor-choice.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-choice.html similarity index 56% rename from cell-editors/fin-hypergrid-cell-editor-choice.html rename to polymer/html/cell-editors/fin-hypergrid-cell-editor-choice.html index 82babf1b0..b9c44ce6a 100644 --- a/cell-editors/fin-hypergrid-cell-editor-choice.html +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-choice.html @@ -1,7 +1,5 @@ - - - + + \ No newline at end of file diff --git a/cell-editors/fin-hypergrid-cell-editor-date.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-date.html similarity index 64% rename from cell-editors/fin-hypergrid-cell-editor-date.html rename to polymer/html/cell-editors/fin-hypergrid-cell-editor-date.html index f77b998b3..b292db47c 100644 --- a/cell-editors/fin-hypergrid-cell-editor-date.html +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-date.html @@ -1,28 +1,14 @@ - - - + + \ No newline at end of file diff --git a/polymer/html/cell-editors/fin-hypergrid-cell-editor-simple.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-simple.html new file mode 100644 index 000000000..e437453fb --- /dev/null +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-simple.html @@ -0,0 +1,14 @@ + + + + + + \ No newline at end of file diff --git a/cell-editors/fin-hypergrid-cell-editor-slider.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-slider.html similarity index 64% rename from cell-editors/fin-hypergrid-cell-editor-slider.html rename to polymer/html/cell-editors/fin-hypergrid-cell-editor-slider.html index 97aac2785..30f42f3d5 100644 --- a/cell-editors/fin-hypergrid-cell-editor-slider.html +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-slider.html @@ -1,29 +1,14 @@ - - - - + + \ No newline at end of file diff --git a/cell-editors/fin-hypergrid-cell-editor-spinner.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-spinner.html similarity index 64% rename from cell-editors/fin-hypergrid-cell-editor-spinner.html rename to polymer/html/cell-editors/fin-hypergrid-cell-editor-spinner.html index 3bbb2e892..1792ddf74 100644 --- a/cell-editors/fin-hypergrid-cell-editor-spinner.html +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-spinner.html @@ -1,29 +1,14 @@ - - - - + + \ No newline at end of file diff --git a/cell-editors/fin-hypergrid-cell-editor-textfield.html b/polymer/html/cell-editors/fin-hypergrid-cell-editor-textfield.html similarity index 60% rename from cell-editors/fin-hypergrid-cell-editor-textfield.html rename to polymer/html/cell-editors/fin-hypergrid-cell-editor-textfield.html index 0ffb9f1a8..af5f4d550 100644 --- a/cell-editors/fin-hypergrid-cell-editor-textfield.html +++ b/polymer/html/cell-editors/fin-hypergrid-cell-editor-textfield.html @@ -1,31 +1,14 @@ - - - + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-base.html b/polymer/html/features/fin-hypergrid-feature-base.html new file mode 100644 index 000000000..85f5fdcd8 --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-base.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-cell-editing.html b/polymer/html/features/fin-hypergrid-feature-cell-editing.html new file mode 100644 index 000000000..cca7c1b22 --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-cell-editing.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-cell-selection.html b/polymer/html/features/fin-hypergrid-feature-cell-selection.html new file mode 100644 index 000000000..25e4dd5ff --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-cell-selection.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-column-moving.html b/polymer/html/features/fin-hypergrid-feature-column-moving.html new file mode 100644 index 000000000..76f1ba9ce --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-column-moving.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-column-resizing.html b/polymer/html/features/fin-hypergrid-feature-column-resizing.html new file mode 100644 index 000000000..eafdbcc20 --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-column-resizing.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-column-sorting.html b/polymer/html/features/fin-hypergrid-feature-column-sorting.html new file mode 100644 index 000000000..566d8534e --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-column-sorting.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-overlay.html b/polymer/html/features/fin-hypergrid-feature-overlay.html new file mode 100644 index 000000000..b8c1849a1 --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-overlay.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-row-resizing.html b/polymer/html/features/fin-hypergrid-feature-row-resizing.html new file mode 100644 index 000000000..0deaef068 --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-row-resizing.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/features/fin-hypergrid-feature-thumbwheel-scrolling.html b/polymer/html/features/fin-hypergrid-feature-thumbwheel-scrolling.html new file mode 100644 index 000000000..715539ee6 --- /dev/null +++ b/polymer/html/features/fin-hypergrid-feature-thumbwheel-scrolling.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/fin-hypergrid-cell-provider.html b/polymer/html/fin-hypergrid-cell-provider.html new file mode 100644 index 000000000..6a811d8d4 --- /dev/null +++ b/polymer/html/fin-hypergrid-cell-provider.html @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/polymer/html/fin-hypergrid-constants.html b/polymer/html/fin-hypergrid-constants.html new file mode 100644 index 000000000..ad0df5328 --- /dev/null +++ b/polymer/html/fin-hypergrid-constants.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/fin-hypergrid-excel.html b/polymer/html/fin-hypergrid-excel.html new file mode 100644 index 000000000..32a991805 --- /dev/null +++ b/polymer/html/fin-hypergrid-excel.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/fin-hypergrid-renderer.html b/polymer/html/fin-hypergrid-renderer.html new file mode 100644 index 000000000..9fc4448df --- /dev/null +++ b/polymer/html/fin-hypergrid-renderer.html @@ -0,0 +1,13 @@ + + + + + + \ No newline at end of file diff --git a/polymer/html/fin-hypergrid-selection-model.html b/polymer/html/fin-hypergrid-selection-model.html new file mode 100644 index 000000000..a6ac088ea --- /dev/null +++ b/polymer/html/fin-hypergrid-selection-model.html @@ -0,0 +1,12 @@ + + + + + \ No newline at end of file diff --git a/polymer/html/fin-hypergrid.html b/polymer/html/fin-hypergrid.html new file mode 100644 index 000000000..0ba976c41 --- /dev/null +++ b/polymer/html/fin-hypergrid.html @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/behaviors/fin-hypergrid-behavior-default.html b/polymer/js/behaviors/fin-hypergrid-behavior-default.js similarity index 88% rename from behaviors/fin-hypergrid-behavior-default.html rename to polymer/js/behaviors/fin-hypergrid-behavior-default.js index 1a1f654fe..9d8320c16 100644 --- a/behaviors/fin-hypergrid-behavior-default.html +++ b/polymer/js/behaviors/fin-hypergrid-behavior-default.js @@ -1,26 +1,3 @@ - - - - - - - - - - - - - - - - diff --git a/behaviors/fin-hypergrid-behavior-gol.html b/polymer/js/behaviors/fin-hypergrid-behavior-gol.js similarity index 67% rename from behaviors/fin-hypergrid-behavior-gol.html rename to polymer/js/behaviors/fin-hypergrid-behavior-gol.js index ac3de020f..4c8f216dc 100644 --- a/behaviors/fin-hypergrid-behavior-gol.html +++ b/polymer/js/behaviors/fin-hypergrid-behavior-gol.js @@ -1,25 +1,15 @@ - - - - - - diff --git a/behaviors/fin-hypergrid-behavior-in-memory.html b/polymer/js/behaviors/fin-hypergrid-behavior-in-memory.js similarity index 96% rename from behaviors/fin-hypergrid-behavior-in-memory.html rename to polymer/js/behaviors/fin-hypergrid-behavior-in-memory.js index 6553fb949..754446465 100644 --- a/behaviors/fin-hypergrid-behavior-in-memory.html +++ b/polymer/js/behaviors/fin-hypergrid-behavior-in-memory.js @@ -1,16 +1,3 @@ - - - - - - diff --git a/polymer/js/behaviors/fin-hypergrid-behavior-json.js b/polymer/js/behaviors/fin-hypergrid-behavior-json.js new file mode 100644 index 000000000..69a784d30 --- /dev/null +++ b/polymer/js/behaviors/fin-hypergrid-behavior-json.js @@ -0,0 +1,374 @@ +/*jshint bitwise: false */ +'use strict'; + +var noop = function() {}; + +//only use on number columns +window.flashSort = function(a, property) { + var strVar = '(function(a) { '; + strVar += ' var n = a.length;'; + strVar += ''; + strVar += ' var i = 0, j = 0, k = 0, t;'; + strVar += ' var m = ~~( n * 0.125 );'; + strVar += ' var a_nmin = a[0];'; + strVar += ' var nmax = 0;'; + strVar += ' var nmove = 0;'; + strVar += ''; + strVar += ' var l = new Array(m);'; + strVar += ' for ( i = 0; i < m; i++ ) {'; + strVar += ' l[ i ] = 0;'; + strVar += ' }'; + strVar += ''; + strVar += ' for ( i = 1; i < n; ++i ) {'; + strVar += ' var a_i = a[ i ];'; + strVar += ' if ( a_i.' + property + ' < a_nmin.' + property + ' ) { a_nmin = a_i; }'; + strVar += ' if ( a_i.' + property + ' > a[ nmax ].' + property + ' ) { nmax = i; }'; + strVar += ' }'; + strVar += ''; + strVar += ' var a_nmax = a[ nmax ];'; + strVar += ' if ( a_nmin.' + property + ' === a_nmax.' + property + ') { return a; }'; + strVar += ' var c1 = ( m - 1 ) \/ ( a_nmax.' + property + ' - a_nmin.' + property + ' );'; + strVar += ''; + strVar += ' for ( i = 0; i < n; ++i ) {'; + strVar += ' ++l[ ~~( c1 * ( a[ i ].' + property + ' - a_nmin.' + property + ' ) ) ];'; + strVar += ' }'; + strVar += ''; + strVar += ' for ( k = 1; k < m; ++k ) {'; + strVar += ' l[ k ] += l[ k - 1 ];'; + strVar += ' }'; + strVar += ''; + strVar += ' var hold = a_nmax;'; + strVar += ' a[ nmax ] = a[ 0 ];'; + strVar += ' a[ 0 ] = hold;'; + strVar += ''; + strVar += ' var flash;'; + strVar += ' j = 0;'; + strVar += ' k = m - 1;'; + strVar += ' i = n - 1;'; + strVar += ''; + strVar += ' while ( nmove < i ) {'; + strVar += ' while ( j > ( l[ k ] - 1 ) ) {'; + strVar += ' k = ~~( c1 * ( a[ ++j ].' + property + ' - a_nmin.' + property + ' ) );'; + strVar += ' }'; + strVar += ' if (k < 0) { break; }'; + strVar += ''; + strVar += ' flash = a[ j ];'; + strVar += ''; + strVar += ' while ( j !== l[ k ] ) {'; + strVar += ' k = ~~( c1 * ( flash.' + property + ' - a_nmin.' + property + ' ) );'; + strVar += ' hold = a[ t = --l[ k ] ];'; + strVar += ' a[ t ] = flash;'; + strVar += ' flash = hold;'; + strVar += ' ++nmove;'; + strVar += ' }'; + strVar += ' }'; + strVar += ''; + strVar += ' for( j = 1; j < n; ++j ) {'; + strVar += ' hold = a[ j ];'; + strVar += ' i = j - 1;'; + strVar += ' while( i >= 0 && a[i].' + property + ' > hold.' + property + ' ) {'; + strVar += ' a[ i + 1 ] = a[ i-- ];'; + strVar += ' }'; + strVar += ' a[ i + 1 ] = hold;'; + strVar += ' }'; + strVar += ''; + strVar += ' return a; })'; + var sortFunction = eval(strVar); /* jshint ignore:line */ + sortFunction(a); +}; + +window.dualPivotQuickSort = (function() { + + var dualPivotQS = {}; + + dualPivotQS.sort = function(arr, property, fromIndex, toIndex) { + if (fromIndex === undefined && toIndex === undefined) { + dualPivotQS.sort(arr, property, 0, arr.length); + } else { + rangeCheck(arr.length, fromIndex, toIndex); + dualPivotQuicksort(property, arr, fromIndex, toIndex - 1, 3); + } + return arr; + }; + + function rangeCheck(length, fromIndex, toIndex) { + if (fromIndex > toIndex) { + console.error('fromIndex(' + fromIndex + ') > toIndex(' + toIndex + ')'); + } + if (fromIndex < 0) { + console.error(fromIndex); + } + if (toIndex > length) { + console.error(toIndex); + } + } + + function swap(arr, i, j) { + var temp = arr[i]; + arr[i] = arr[j]; + arr[j] = temp; + } + + function dualPivotQuicksort(property, arr, left, right, div) { + var len = right - left; + + if (len < 27) { // insertion sort for tiny array + for (var i = left + 1; i <= right; i++) { + for (var j = i; j > left && arr[j][property] < arr[j - 1][property]; j--) { + swap(arr, j, j - 1); + } + } + return; + } + var third = Math.floor(len / div); //TODO: check if we need to round up or down or just nearest + + // "medians" + var m1 = left + third; + var m2 = right - third; + + if (m1 <= left) { + m1 = left + 1; + } + if (m2 >= right) { + m2 = right - 1; + } + if (arr[m1][property] < arr[m2][property]) { + swap(arr, m1, left); + swap(arr, m2, right); + } else { + swap(arr, m1, right); + swap(arr, m2, left); + } + // pivots + var pivot1 = arr[left]; + var pivot2 = arr[right]; + + //their values + var pivot1Val = pivot1[property]; + var pivot2Val = pivot2[property]; + + // pointers + var less = left + 1; + var great = right - 1; + + // sorting + var k = less; + for (; k <= great; k++) { + if (arr[k][property] < pivot1Val) { + swap(arr, k, less++); + } else if (arr[k][property] > pivot2Val) { + while (k < great && arr[great][property] > pivot2Val) { + great--; + } + swap(arr, k, great--); + + if (arr[k][property] < pivot1Val) { + swap(arr, k, less++); + } + } + } + // swaps + var dist = great - less; + + if (dist < 13) { + div++; + } + swap(arr, less - 1, left); + swap(arr, great + 1, right); + + // subarrays + dualPivotQuicksort(property, arr, left, less - 2, div); + dualPivotQuicksort(property, arr, great + 2, right, div); + + // equal elements + if (dist > len - 13 && pivot1Val !== pivot2Val) { + for (k = less; k <= great; k++) { + if (arr[k][property] === pivot1Val) { + swap(arr, k, less++); + } else if (arr[k][property] === pivot2Val) { + swap(arr, k, great--); + + if (arr[k][property] === pivot1Val) { + swap(arr, k, less++); + } + } + } + } + // subarray + if (pivot1Val < pivot2Val) { + dualPivotQuicksort(property, arr, less, great, div); + } + } + return dualPivotQS.sort; +}()); + +(function() { + + Polymer({ /* jslint ignore:line */ + + sorted: {}, + sortStates: [' ', ' ^', ' v'], + dataIndexes: [], + data: [], + headers: [], + fields: [], + + setHeaders: function(headerLabels) { + this.headers = headerLabels; + }, + + setFields: function(fieldNames) { + this.fields = fieldNames; + }, + + setData: function(jsonData) { + this.data = jsonData; + this.initDataIndexes(); + this.initColumnIndexes(); + this.changed(); + }, + + initDataIndexes: function() { + //initialize the indexe cache + for (var i = 0; i < this.data.length; i++) { + this.data[i].__si = i; + this.data[i].__i = i; + } + }, + + getValue: function(x, y) { + x = this.translateColumnIndex(x); + return this.data[y][this.fields[x]]; + }, + + setValue: function(x, y, value) { + x = this.translateColumnIndex(x); + this.data[y][this.fields[x]] = value; + }, + + getFixedRowValue: function(x, y) { + noop(y); + x = this.translateColumnIndex(x); + var sortIndex = this.sorted[x] || 0; + return this.headers[x] + this.sortStates[sortIndex]; + }, + + getFixedColumnCount: function() { + return 1; + }, + + getRowCount: function() { + return this.data.length; + }, + + getColumnCount: function() { + return this.fields.length; + }, + + fixedRowClicked: function(grid, mouse) { + var columnIndex = this.scrollPositionX + mouse.gridCell.x - this.getFixedColumnCount(); + this.toggleSort(columnIndex); + }, + + toggleSort: function(columnIndex) { + columnIndex = this.translateColumnIndex(columnIndex); + this.grid.clearSelections(); + if (columnIndex >= this.fields.length) { + return; + } + var current = this.sorted[columnIndex] || 0; + var stateCount = this.sortStates.length; + var sortStateIndex = (current + 1) % stateCount; + var i = 0; + for (; i < this.fields.length; i++) { + this.sorted[i] = 0; + } + this.sorted[columnIndex] = sortStateIndex; + var colName = this.fields[columnIndex]; + if (sortStateIndex === 0) { + var newData = new Array(this.data.length); + for (i = 0; i < this.data.length; i++) { + var each = this.data[i]; + newData[each.__si] = each; + } + this.data = newData; + } else if (sortStateIndex === 1) { + //var start = Date.now(); + + //last,first,birthdate,employed,income + + // uncomment this to use javascript native sorting + // this is also a stable sort + + // 5602ms + // 2877ms + // 4570ms + // 1804ms + // 11073ms + // this.data.sort(function (a, b) { + // if (a[colName] === b[colName]) + // return a.__i - b.__i; + // if (a[colName] < b[colName]) + // return -1; + // return 1; + // }); + + // 5382ms ~5000 + // 1851ms + // 3682ms + // 1705ms ~1850 + // 1852ms ~1850 + var theSorter = eval('(function (a, b) {' + /* jshint ignore:line */ + ' if (a.' + colName + ' === b.' + colName + ')' + + ' return a.__i - b.__i;' + + ' if (a.' + colName + ' < b.' + colName + ')' + + ' return -1;' + + ' return 1;' + + '})'); + this.data.sort(theSorter); + + //uncomment this to use a simple dual pivot sort from above + //this is not a stable sort + // 4370ms + // 1338ms + // 3272ms + // 614ms + // 6336ms + //dualPivotQuickSort(this.data, colName); + + // ms + // ms + // ms + // 298ms ~3300 + // 3236ms ~3300 + //uncomment this to use a flash sort from above + //this is not a stable sort and it ONLY works on numberic/boolean columns + // the fastest sorting for numeric data + // var sort = flashSort(this.data, colName); + + //uncomment this to use the crossfilter dual pivot sort (fastest) + //this is not a stable sort + //fastest for string and boolean data + // 3725ms + // 711ms + // 2261ms + // 383ms ~1400 + // 1639ms ~1400 + // var theSorter = eval('(function(d){return d.' + colName + '})'); + // var sort = crossfilter.quicksort.by(theSorter); + // sort(this.data, 0, this.data.length); + + + //console.log('duration: ' + (Date.now() - start) + 'ms'); + } else { + this.data = this.data.reverse(); + } + for (i = 0; i < this.data.length; i++) { + this.data[i].__i = i; + } + this.changed(); + } + + }); + +})(); /* jslint ignore:line */ diff --git a/behaviors/fin-hypergrid-behavior-q.html b/polymer/js/behaviors/fin-hypergrid-behavior-q.js similarity index 92% rename from behaviors/fin-hypergrid-behavior-q.html rename to polymer/js/behaviors/fin-hypergrid-behavior-q.js index 7220e162e..c15381825 100644 --- a/behaviors/fin-hypergrid-behavior-q.html +++ b/polymer/js/behaviors/fin-hypergrid-behavior-q.js @@ -1,16 +1,3 @@ - - - - - - diff --git a/behaviors/fin-hypergrid-behavior-qtree.html b/polymer/js/behaviors/fin-hypergrid-behavior-qtree.js similarity index 78% rename from behaviors/fin-hypergrid-behavior-qtree.html rename to polymer/js/behaviors/fin-hypergrid-behavior-qtree.js index a123c58cb..32520d07f 100644 --- a/behaviors/fin-hypergrid-behavior-qtree.html +++ b/polymer/js/behaviors/fin-hypergrid-behavior-qtree.js @@ -1,16 +1,3 @@ - - - - - - diff --git a/cell-editors/fin-hypergrid-cell-editor-base.html b/polymer/js/cell-editors/fin-hypergrid-cell-editor-base.js similarity index 86% rename from cell-editors/fin-hypergrid-cell-editor-base.html rename to polymer/js/cell-editors/fin-hypergrid-cell-editor-base.js index 1f5f64a9b..f6771e9a8 100644 --- a/cell-editors/fin-hypergrid-cell-editor-base.html +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-base.js @@ -1,21 +1,9 @@ - - - - - - diff --git a/polymer/js/cell-editors/fin-hypergrid-cell-editor-choice.js b/polymer/js/cell-editors/fin-hypergrid-cell-editor-choice.js new file mode 100644 index 000000000..2721da8a2 --- /dev/null +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-choice.js @@ -0,0 +1,13 @@ +'use strict'; + +(function() { + + Polymer({ /* jshint ignore:line */ + alias: 'choice', + items: ['Moe', 'Larry', 'Curly', 'Groucho', 'Harpo', 'Zeppo', 'Chico'], + originOffset: function() { + return [-1, -1]; + }, + }); + +})(); /* jshint ignore:line */ diff --git a/polymer/js/cell-editors/fin-hypergrid-cell-editor-color.js b/polymer/js/cell-editors/fin-hypergrid-cell-editor-color.js new file mode 100644 index 000000000..81edbf5cb --- /dev/null +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-color.js @@ -0,0 +1,9 @@ +'use strict'; + +(function() { + + Polymer({ /* jshint ignore:line */ + alias: 'color' + }); + +})(); /* jshint ignore:line */ diff --git a/polymer/js/cell-editors/fin-hypergrid-cell-editor-date.js b/polymer/js/cell-editors/fin-hypergrid-cell-editor-date.js new file mode 100644 index 000000000..50606e31a --- /dev/null +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-date.js @@ -0,0 +1,9 @@ +'use strict'; + +(function() { + + Polymer({ /* jshint ignore:line */ + alias: 'date' + }); + +})(); /* jshint ignore:line */ diff --git a/cell-editors/fin-hypergrid-cell-editor-simple.html b/polymer/js/cell-editors/fin-hypergrid-cell-editor-simple.js similarity index 79% rename from cell-editors/fin-hypergrid-cell-editor-simple.html rename to polymer/js/cell-editors/fin-hypergrid-cell-editor-simple.js index 32a076cad..290905877 100644 --- a/cell-editors/fin-hypergrid-cell-editor-simple.html +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-simple.js @@ -1,19 +1,3 @@ - - - - - - - diff --git a/polymer/js/cell-editors/fin-hypergrid-cell-editor-slider.js b/polymer/js/cell-editors/fin-hypergrid-cell-editor-slider.js new file mode 100644 index 000000000..853c20fce --- /dev/null +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-slider.js @@ -0,0 +1,9 @@ +'use strict'; + +(function() { + + Polymer({ /* jshint ignore:line */ + alias: 'slider' + }); + +})(); /* jshint ignore:line */ diff --git a/polymer/js/cell-editors/fin-hypergrid-cell-editor-spinner.js b/polymer/js/cell-editors/fin-hypergrid-cell-editor-spinner.js new file mode 100644 index 000000000..878d4eebf --- /dev/null +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-spinner.js @@ -0,0 +1,9 @@ +'use strict'; + +(function() { + + Polymer({ /* jshint ignore:line */ + alias: 'spinner' + }); + +})(); /* jshint ignore:line */ diff --git a/polymer/js/cell-editors/fin-hypergrid-cell-editor-textfield.js b/polymer/js/cell-editors/fin-hypergrid-cell-editor-textfield.js new file mode 100644 index 000000000..6ffc5dc3d --- /dev/null +++ b/polymer/js/cell-editors/fin-hypergrid-cell-editor-textfield.js @@ -0,0 +1,12 @@ +'use strict'; + +(function() { + + Polymer({ /* jshint ignore:line */ + alias: 'textfield', + selectAll: function() { + this.input.setSelectionRange(0, this.input.value.length); + } + }); + +})(); /* jshint ignore:line */ diff --git a/features/fin-hypergrid-feature-base.html b/polymer/js/features/fin-hypergrid-feature-base.js similarity index 85% rename from features/fin-hypergrid-feature-base.html rename to polymer/js/features/fin-hypergrid-feature-base.js index 9eac22a2a..799c4cd71 100644 --- a/features/fin-hypergrid-feature-base.html +++ b/polymer/js/features/fin-hypergrid-feature-base.js @@ -1,20 +1,6 @@ - - - - - - diff --git a/polymer/js/features/fin-hypergrid-feature-cell-editing.js b/polymer/js/features/fin-hypergrid-feature-cell-editing.js new file mode 100644 index 000000000..8a299a880 --- /dev/null +++ b/polymer/js/features/fin-hypergrid-feature-cell-editing.js @@ -0,0 +1,19 @@ +(function() { + + 'use strict'; + + Polymer({ /* jshint ignore:line */ + handleDoubleClick: function(grid, mouseEvent) { + grid.activateEditor(mouseEvent); + }, + + handleHoldPulse: function(grid, mouseEvent) { + var primEvent = mouseEvent.primitiveEvent; + if (primEvent.detail.count < 2) { + return; + } + grid.activateEditor(mouseEvent); + }, + }); + +})(); /* jshint ignore:line */ diff --git a/features/fin-hypergrid-feature-cell-selection.html b/polymer/js/features/fin-hypergrid-feature-cell-selection.js similarity index 97% rename from features/fin-hypergrid-feature-cell-selection.html rename to polymer/js/features/fin-hypergrid-feature-cell-selection.js index d78303bc7..2483b6298 100644 --- a/features/fin-hypergrid-feature-cell-selection.html +++ b/polymer/js/features/fin-hypergrid-feature-cell-selection.js @@ -1,20 +1,6 @@ - - - - - - diff --git a/features/fin-hypergrid-feature-column-moving.html b/polymer/js/features/fin-hypergrid-feature-column-moving.js similarity index 97% rename from features/fin-hypergrid-feature-column-moving.html rename to polymer/js/features/fin-hypergrid-feature-column-moving.js index cc0370492..98c7cab8a 100644 --- a/features/fin-hypergrid-feature-column-moving.html +++ b/polymer/js/features/fin-hypergrid-feature-column-moving.js @@ -1,20 +1,8 @@ - - - - - - diff --git a/features/fin-hypergrid-feature-column-resizing.html b/polymer/js/features/fin-hypergrid-feature-column-resizing.js similarity index 85% rename from features/fin-hypergrid-feature-column-resizing.html rename to polymer/js/features/fin-hypergrid-feature-column-resizing.js index 6a0f11cc8..13bfaa5b4 100644 --- a/features/fin-hypergrid-feature-column-resizing.html +++ b/polymer/js/features/fin-hypergrid-feature-column-resizing.js @@ -1,20 +1,8 @@ - - - - - - diff --git a/features/fin-hypergrid-feature-column-sorting.html b/polymer/js/features/fin-hypergrid-feature-column-sorting.js similarity index 68% rename from features/fin-hypergrid-feature-column-sorting.html rename to polymer/js/features/fin-hypergrid-feature-column-sorting.js index 9edc59546..a7cf7774f 100644 --- a/features/fin-hypergrid-feature-column-sorting.html +++ b/polymer/js/features/fin-hypergrid-feature-column-sorting.js @@ -1,20 +1,6 @@ - - - - - - diff --git a/features/fin-hypergrid-feature-overlay.html b/polymer/js/features/fin-hypergrid-feature-overlay.js similarity index 84% rename from features/fin-hypergrid-feature-overlay.html rename to polymer/js/features/fin-hypergrid-feature-overlay.js index b74452267..5252e45ab 100644 --- a/features/fin-hypergrid-feature-overlay.html +++ b/polymer/js/features/fin-hypergrid-feature-overlay.js @@ -1,23 +1,12 @@ - - - - - - diff --git a/features/fin-hypergrid-feature-row-resizing.html b/polymer/js/features/fin-hypergrid-feature-row-resizing.js similarity index 74% rename from features/fin-hypergrid-feature-row-resizing.html rename to polymer/js/features/fin-hypergrid-feature-row-resizing.js index 8a337f608..9fb8d3946 100644 --- a/features/fin-hypergrid-feature-row-resizing.html +++ b/polymer/js/features/fin-hypergrid-feature-row-resizing.js @@ -1,20 +1,6 @@ - - - - - - diff --git a/polymer/js/features/fin-hypergrid-feature-thumbwheel-scrolling.js b/polymer/js/features/fin-hypergrid-feature-thumbwheel-scrolling.js new file mode 100644 index 000000000..33de38cae --- /dev/null +++ b/polymer/js/features/fin-hypergrid-feature-thumbwheel-scrolling.js @@ -0,0 +1,20 @@ +(function() { + + 'use strict'; + + Polymer({ /* jshint ignore:line */ + handleWheelMoved: function(grid, e) { + var primEvent = e.primitiveEvent; + if (primEvent.wheelDeltaY > 0) { + grid.scrollBy(0, -1); + } else if (primEvent.wheelDeltaY < -0) { + grid.scrollBy(0, 1); + } else if (primEvent.wheelDeltaX > 0) { + grid.scrollBy(-1, 0); + } else if (primEvent.wheelDeltaX < -0) { + grid.scrollBy(1, 0); + } + } + }); + +})(); /* jshint ignore:line */ diff --git a/fin-hypergrid-cell-provider.html b/polymer/js/fin-hypergrid-cell-provider.js similarity index 91% rename from fin-hypergrid-cell-provider.html rename to polymer/js/fin-hypergrid-cell-provider.js index 829e9276e..f038cc879 100644 --- a/fin-hypergrid-cell-provider.html +++ b/polymer/js/fin-hypergrid-cell-provider.js @@ -1,19 +1,7 @@ - - - - - - - diff --git a/fin-hypergrid-constants.html b/polymer/js/fin-hypergrid-constants.js similarity index 70% rename from fin-hypergrid-constants.html rename to polymer/js/fin-hypergrid-constants.js index b6ca1b3d1..aa8d37836 100644 --- a/fin-hypergrid-constants.html +++ b/polymer/js/fin-hypergrid-constants.js @@ -1,16 +1,3 @@ - - - - - - diff --git a/fin-hypergrid-excel.html b/polymer/js/fin-hypergrid-excel.js similarity index 88% rename from fin-hypergrid-excel.html rename to polymer/js/fin-hypergrid-excel.js index 1a6b632e5..587a267fb 100644 --- a/fin-hypergrid-excel.html +++ b/polymer/js/fin-hypergrid-excel.js @@ -1,20 +1,8 @@ - - - - - - diff --git a/fin-hypergrid-renderer.html b/polymer/js/fin-hypergrid-renderer.js similarity index 91% rename from fin-hypergrid-renderer.html rename to polymer/js/fin-hypergrid-renderer.js index 4b6e143cc..9a0749ae5 100644 --- a/fin-hypergrid-renderer.html +++ b/polymer/js/fin-hypergrid-renderer.js @@ -1,17 +1,3 @@ - - - - - - - diff --git a/fin-hypergrid-selection-model.html b/polymer/js/fin-hypergrid-selection-model.js similarity index 86% rename from fin-hypergrid-selection-model.html rename to polymer/js/fin-hypergrid-selection-model.js index a93589eb4..5e9360a49 100644 --- a/fin-hypergrid-selection-model.html +++ b/polymer/js/fin-hypergrid-selection-model.js @@ -1,17 +1,3 @@ - - - - - - diff --git a/fin-hypergrid.js b/polymer/js/fin-hypergrid.js similarity index 100% rename from fin-hypergrid.js rename to polymer/js/fin-hypergrid.js diff --git a/talk-outline.txt b/talk-outline.txt index 6454cdf6b..59656a29c 100644 --- a/talk-outline.txt +++ b/talk-outline.txt @@ -1,3 +1,20 @@ +fix gp to copy all directories EXCEPT project dir + copy all dirs first, delete project directory then build it + +make all files pre - js - post html dynamically buildable +validate all js files + + +/poly-css +/poly-html +/poly-js + +minimize all files before vulcanize +vulcanize ONLY 1X + + + + talk #3 GDG meetup more polymer notes ----------------------------------------- diff --git a/test/basic-test.html b/test/basic-test.html deleted file mode 100644 index 97b75a8b8..000000000 --- a/test/basic-test.html +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - fin-hypergrid - - - - - - - - - - - - - - diff --git a/test/basic-test.post.html b/test/basic-test.post.html deleted file mode 100644 index 75ef15491..000000000 --- a/test/basic-test.post.html +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/test/basic-test.pre.html b/test/basic-test.pre.html deleted file mode 100644 index bf9a08f8f..000000000 --- a/test/basic-test.pre.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - fin-hypergrid - - - - - - - - - - - + + + + + + + + diff --git a/test/behaviors/fin-hypergrid-behavior-default.js b/test/behaviors/fin-hypergrid-behavior-default.js new file mode 100644 index 000000000..56754a004 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-default.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-behavior-default'); + +describe('', function() { + + describe('behaviors/fin-hypergrid-behavior-default.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/behaviors/fin-hypergrid-behavior-gol.html b/test/behaviors/fin-hypergrid-behavior-gol.html new file mode 100644 index 000000000..e56d876c5 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-gol.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-behavior-gol + + + + + + + + + diff --git a/test/behaviors/fin-hypergrid-behavior-gol.js b/test/behaviors/fin-hypergrid-behavior-gol.js new file mode 100644 index 000000000..fee17b422 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-gol.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-behavior-gol'); + +describe('', function() { + + describe('behaviors/fin-hypergrid-behavior-gol.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/behaviors/fin-hypergrid-behavior-in-memory.html b/test/behaviors/fin-hypergrid-behavior-in-memory.html new file mode 100644 index 000000000..1f092a624 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-in-memory.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-behavior-in-memory + + + + + + + + + diff --git a/test/behaviors/fin-hypergrid-behavior-in-memory.js b/test/behaviors/fin-hypergrid-behavior-in-memory.js new file mode 100644 index 000000000..63aee9bba --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-in-memory.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-behavior-in-memory'); + +describe('', function() { + + describe('behaviors/fin-hypergrid-behavior-in-memory.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/behaviors/fin-hypergrid-behavior-json.html b/test/behaviors/fin-hypergrid-behavior-json.html new file mode 100644 index 000000000..2f08b328b --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-json.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-behavior-json + + + + + + + + + diff --git a/test/behaviors/fin-hypergrid-behavior-json.js b/test/behaviors/fin-hypergrid-behavior-json.js new file mode 100644 index 000000000..f9d686187 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-json.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-behavior-json'); + +describe('', function() { + + describe('behaviors/fin-hypergrid-behavior-json.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/behaviors/fin-hypergrid-behavior-q.html b/test/behaviors/fin-hypergrid-behavior-q.html new file mode 100644 index 000000000..8991d15e0 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-q.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-behavior-q + + + + + + + + + diff --git a/test/behaviors/fin-hypergrid-behavior-q.js b/test/behaviors/fin-hypergrid-behavior-q.js new file mode 100644 index 000000000..baa8fe8ea --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-q.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-behavior-q'); + +describe('', function() { + + describe('behaviors/fin-hypergrid-behavior-q.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/behaviors/fin-hypergrid-behavior-qtree.html b/test/behaviors/fin-hypergrid-behavior-qtree.html new file mode 100644 index 000000000..f087b84a3 --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-qtree.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-behavior-qtree + + + + + + + + + diff --git a/test/behaviors/fin-hypergrid-behavior-qtree.js b/test/behaviors/fin-hypergrid-behavior-qtree.js new file mode 100644 index 000000000..05599723d --- /dev/null +++ b/test/behaviors/fin-hypergrid-behavior-qtree.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-behavior-qtree'); + +describe('', function() { + + describe('behaviors/fin-hypergrid-behavior-qtree.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-base.html b/test/cell-editors/fin-hypergrid-cell-editor-base.html new file mode 100644 index 000000000..ec866bf5f --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-base.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-base + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-base.js b/test/cell-editors/fin-hypergrid-cell-editor-base.js new file mode 100644 index 000000000..9ff72b4fc --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-base.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-base'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-base.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-choice.html b/test/cell-editors/fin-hypergrid-cell-editor-choice.html new file mode 100644 index 000000000..340627569 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-choice.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-choice + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-choice.js b/test/cell-editors/fin-hypergrid-cell-editor-choice.js new file mode 100644 index 000000000..b14f8a820 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-choice.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-choice'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-choice.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-color.html b/test/cell-editors/fin-hypergrid-cell-editor-color.html new file mode 100644 index 000000000..21118c387 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-color.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-color + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-color.js b/test/cell-editors/fin-hypergrid-cell-editor-color.js new file mode 100644 index 000000000..01276ec03 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-color.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-color'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-color.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-date.html b/test/cell-editors/fin-hypergrid-cell-editor-date.html new file mode 100644 index 000000000..1bf002e2c --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-date.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-date + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-date.js b/test/cell-editors/fin-hypergrid-cell-editor-date.js new file mode 100644 index 000000000..0cd578c52 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-date.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-date'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-date.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-simple.html b/test/cell-editors/fin-hypergrid-cell-editor-simple.html new file mode 100644 index 000000000..f0e24151a --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-simple.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-simple + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-simple.js b/test/cell-editors/fin-hypergrid-cell-editor-simple.js new file mode 100644 index 000000000..1ae9f1a5f --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-simple.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-simple'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-simple.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-slider.html b/test/cell-editors/fin-hypergrid-cell-editor-slider.html new file mode 100644 index 000000000..1ef70fe8d --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-slider.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-slider + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-slider.js b/test/cell-editors/fin-hypergrid-cell-editor-slider.js new file mode 100644 index 000000000..4149427fb --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-slider.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-slider'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-slider.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-spinner.html b/test/cell-editors/fin-hypergrid-cell-editor-spinner.html new file mode 100644 index 000000000..178e7ba1c --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-spinner.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-spinner + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-spinner.js b/test/cell-editors/fin-hypergrid-cell-editor-spinner.js new file mode 100644 index 000000000..5f69011f5 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-spinner.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-spinner'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-spinner.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/cell-editors/fin-hypergrid-cell-editor-textfield.html b/test/cell-editors/fin-hypergrid-cell-editor-textfield.html new file mode 100644 index 000000000..5ed4f1fbb --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-textfield.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-editor-textfield + + + + + + + + + diff --git a/test/cell-editors/fin-hypergrid-cell-editor-textfield.js b/test/cell-editors/fin-hypergrid-cell-editor-textfield.js new file mode 100644 index 000000000..741295fe1 --- /dev/null +++ b/test/cell-editors/fin-hypergrid-cell-editor-textfield.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-editor-textfield'); + +describe('', function() { + + describe('cell-editors/fin-hypergrid-cell-editor-textfield.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-base.html b/test/features/fin-hypergrid-feature-base.html new file mode 100644 index 000000000..e896cca0c --- /dev/null +++ b/test/features/fin-hypergrid-feature-base.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-base + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-base.js b/test/features/fin-hypergrid-feature-base.js new file mode 100644 index 000000000..1d16fa7d0 --- /dev/null +++ b/test/features/fin-hypergrid-feature-base.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-base'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-base.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-cell-editing.html b/test/features/fin-hypergrid-feature-cell-editing.html new file mode 100644 index 000000000..4cc3edbb1 --- /dev/null +++ b/test/features/fin-hypergrid-feature-cell-editing.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-cell-editing + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-cell-editing.js b/test/features/fin-hypergrid-feature-cell-editing.js new file mode 100644 index 000000000..d78397296 --- /dev/null +++ b/test/features/fin-hypergrid-feature-cell-editing.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-cell-editing'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-cell-editing.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-cell-selection.html b/test/features/fin-hypergrid-feature-cell-selection.html new file mode 100644 index 000000000..f782a3e98 --- /dev/null +++ b/test/features/fin-hypergrid-feature-cell-selection.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-cell-selection + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-cell-selection.js b/test/features/fin-hypergrid-feature-cell-selection.js new file mode 100644 index 000000000..85c34bc16 --- /dev/null +++ b/test/features/fin-hypergrid-feature-cell-selection.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-cell-selection'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-cell-selectionX.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-column-moving.html b/test/features/fin-hypergrid-feature-column-moving.html new file mode 100644 index 000000000..bfdf73aeb --- /dev/null +++ b/test/features/fin-hypergrid-feature-column-moving.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-column-moving + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-column-moving.js b/test/features/fin-hypergrid-feature-column-moving.js new file mode 100644 index 000000000..90bd6451b --- /dev/null +++ b/test/features/fin-hypergrid-feature-column-moving.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-column-moving'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-column-moving.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-column-resizing.html b/test/features/fin-hypergrid-feature-column-resizing.html new file mode 100644 index 000000000..13480ff67 --- /dev/null +++ b/test/features/fin-hypergrid-feature-column-resizing.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-column-resizing + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-column-resizing.js b/test/features/fin-hypergrid-feature-column-resizing.js new file mode 100644 index 000000000..b13c3a067 --- /dev/null +++ b/test/features/fin-hypergrid-feature-column-resizing.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-column-resizing'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-column-resizing.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-column-sorting.html b/test/features/fin-hypergrid-feature-column-sorting.html new file mode 100644 index 000000000..cb683e1fe --- /dev/null +++ b/test/features/fin-hypergrid-feature-column-sorting.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-column-sorting + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-column-sorting.js b/test/features/fin-hypergrid-feature-column-sorting.js new file mode 100644 index 000000000..9f2230f90 --- /dev/null +++ b/test/features/fin-hypergrid-feature-column-sorting.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-column-sorting'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-column-sorting.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-overlay.html b/test/features/fin-hypergrid-feature-overlay.html new file mode 100644 index 000000000..3501464e9 --- /dev/null +++ b/test/features/fin-hypergrid-feature-overlay.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-overlay + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-overlay.js b/test/features/fin-hypergrid-feature-overlay.js new file mode 100644 index 000000000..e3bbbddc5 --- /dev/null +++ b/test/features/fin-hypergrid-feature-overlay.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-overlay'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-overlay.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-row-resizing.html b/test/features/fin-hypergrid-feature-row-resizing.html new file mode 100644 index 000000000..50bc8fd25 --- /dev/null +++ b/test/features/fin-hypergrid-feature-row-resizing.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-row-resizing + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-row-resizing.js b/test/features/fin-hypergrid-feature-row-resizing.js new file mode 100644 index 000000000..2c7362513 --- /dev/null +++ b/test/features/fin-hypergrid-feature-row-resizing.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-row-resizing'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-row-resizing.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/features/fin-hypergrid-feature-thumbwheel-scrolling.html b/test/features/fin-hypergrid-feature-thumbwheel-scrolling.html new file mode 100644 index 000000000..cdc607cf0 --- /dev/null +++ b/test/features/fin-hypergrid-feature-thumbwheel-scrolling.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-feature-thumbwheel-scrolling + + + + + + + + + diff --git a/test/features/fin-hypergrid-feature-thumbwheel-scrolling.js b/test/features/fin-hypergrid-feature-thumbwheel-scrolling.js new file mode 100644 index 000000000..8334e447e --- /dev/null +++ b/test/features/fin-hypergrid-feature-thumbwheel-scrolling.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-feature-thumbwheel-scrolling'); + +describe('', function() { + + describe('features/fin-hypergrid-feature-thumbwheel-scrolling.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/fin-hypergrid-cell-provider.html b/test/fin-hypergrid-cell-provider.html new file mode 100644 index 000000000..3a1296033 --- /dev/null +++ b/test/fin-hypergrid-cell-provider.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-cell-provider + + + + + + + + + diff --git a/test/fin-hypergrid-cell-provider.js b/test/fin-hypergrid-cell-provider.js new file mode 100644 index 000000000..ba04fbb08 --- /dev/null +++ b/test/fin-hypergrid-cell-provider.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-cell-provider'); + +describe('', function() { + + describe('fin-hypergrid-cell-provider.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/fin-hypergrid-constants.html b/test/fin-hypergrid-constants.html new file mode 100644 index 000000000..c7c3ebdf9 --- /dev/null +++ b/test/fin-hypergrid-constants.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-constants + + + + + + + + + diff --git a/test/fin-hypergrid-constants.js b/test/fin-hypergrid-constants.js new file mode 100644 index 000000000..1d8ad3d7c --- /dev/null +++ b/test/fin-hypergrid-constants.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-constants'); + +describe('', function() { + + describe('fin-hypergrid-constants.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/fin-hypergrid-excel.html b/test/fin-hypergrid-excel.html new file mode 100644 index 000000000..b24287f22 --- /dev/null +++ b/test/fin-hypergrid-excel.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-excel + + + + + + + + + diff --git a/test/fin-hypergrid-excel.js b/test/fin-hypergrid-excel.js new file mode 100644 index 000000000..dee64862f --- /dev/null +++ b/test/fin-hypergrid-excel.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-excel'); + +describe('', function() { + + describe('fin-hypergrid-excel.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/fin-hypergrid-renderer.html b/test/fin-hypergrid-renderer.html new file mode 100644 index 000000000..7190f8551 --- /dev/null +++ b/test/fin-hypergrid-renderer.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-renderer + + + + + + + + + diff --git a/test/fin-hypergrid-renderer.js b/test/fin-hypergrid-renderer.js new file mode 100644 index 000000000..d826c1c94 --- /dev/null +++ b/test/fin-hypergrid-renderer.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-renderer'); + +describe('', function() { + + describe('fin-hypergrid-renderer.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/fin-hypergrid-selection-model.html b/test/fin-hypergrid-selection-model.html new file mode 100644 index 000000000..5204ebb50 --- /dev/null +++ b/test/fin-hypergrid-selection-model.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid-selection-model + + + + + + + + + diff --git a/test/fin-hypergrid-selection-model.js b/test/fin-hypergrid-selection-model.js new file mode 100644 index 000000000..1621274fc --- /dev/null +++ b/test/fin-hypergrid-selection-model.js @@ -0,0 +1,16 @@ +/* globals describe, it, assert */ + +'use strict'; + +var customElement = document.querySelector('fin-hypergrid-selection-model'); + +describe('', function() { + + describe('fin-hypergrid-selection-model.js', function() { + it('should have real tests filled out', function() { + assert.equal(customElement, customElement); + }); + + }); + +}); diff --git a/test/fin-hypergrid.html b/test/fin-hypergrid.html new file mode 100644 index 000000000..22b07e15b --- /dev/null +++ b/test/fin-hypergrid.html @@ -0,0 +1,15 @@ + + + + + + fin-hypergrid + + + + + + + + + diff --git a/test/basic-test.js b/test/fin-hypergrid.js similarity index 86% rename from test/basic-test.js rename to test/fin-hypergrid.js index 05920027e..eeac15db0 100644 --- a/test/basic-test.js +++ b/test/fin-hypergrid.js @@ -6,7 +6,7 @@ var customElement = document.querySelector('fin-hypergrid'); describe('', function() { - describe('test/basic-test.js', function() { + describe('fin-hypergrid.js', function() { it('should have real tests filled out', function() { assert.equal(customElement, customElement); }); diff --git a/test/index.html b/test/index.html old mode 100755 new mode 100644 index feb444fff..6950dc708 --- a/test/index.html +++ b/test/index.html @@ -12,7 +12,35 @@ diff --git a/validation-report.json b/validation-report.json new file mode 100644 index 000000000..43d2934e4 --- /dev/null +++ b/validation-report.json @@ -0,0 +1 @@ +[{"filename":"poly-html/fin-test.html","error":[]},{"filename":"poly-html/fin-test.html","error":[]}] \ No newline at end of file diff --git a/validation-status.json b/validation-status.json new file mode 100644 index 000000000..068f85cfe --- /dev/null +++ b/validation-status.json @@ -0,0 +1 @@ +{"poly-html/fin-test.html":true} \ No newline at end of file