From 0a27079f8fad596cda09cc7fad96f0c6c0a5f302 Mon Sep 17 00:00:00 2001 From: Stacey Van Herk Date: Wed, 21 Feb 2018 18:28:13 -0500 Subject: [PATCH 01/37] Standardize editorconfig, eslintrc and package.json --- .editorconfig | 26 +++++++++++++------------- .eslintrc => .eslintrc.json | 0 package.json | 18 +++++++++--------- 3 files changed, 22 insertions(+), 22 deletions(-) rename .eslintrc => .eslintrc.json (100%) diff --git a/.editorconfig b/.editorconfig index 6662154..df8f468 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,13 +1,13 @@ -root = true - -[*] -charset = utf8 -end_of_line = lf -trim_trailing_whitespace = true -insert_final_newline = true -indent_style = tab -indent_size = 4 - -[{package.json,.travis.yml}] -indent_style = space -indent_size = 2 \ No newline at end of file +root = true + +[*] +charset = utf8 +end_of_line = lf +trim_trailing_whitespace = true +insert_final_newline = true +indent_style = tab +indent_size = 4 + +[{*.json,*.yml}] +indent_style = space +indent_size = 2 diff --git a/.eslintrc b/.eslintrc.json similarity index 100% rename from .eslintrc rename to .eslintrc.json diff --git a/package.json b/package.json index 6f3416c..a473760 100644 --- a/package.json +++ b/package.json @@ -4,11 +4,11 @@ "private": true, "main": "d2l-date-picker.html", "scripts": { - "postinstall": "bower install", - "test:lint": "npm run test:lint:wc && npm run test:lint:html", - "test:lint:html": "eslint *.html demo/*.html test/*.html", - "test:lint:wc": "polymer lint -i d2l-date-picker.html", - "test": "npm run test:lint && polymer test" + "postinstall": "polymer install --variants", + "lint": "npm run lint:wc && npm run lint:html", + "lint:html": "eslint *.html demo/*.html test/*.html", + "lint:wc": "polymer lint -i d2l-date-picker.html", + "test": "npm run lint && polymer test --skip-plugin sauce" }, "repository": { "type": "git", @@ -26,9 +26,9 @@ }, "homepage": "https://github.com/BrightspaceUI/date-picker#readme", "devDependencies": { - "bower": "^1.8.0", - "eslint": "^3.19.0", - "eslint-config-brightspace": "^0.2.4", - "eslint-plugin-html": "^2.0.3" + "eslint": "^4.15.0", + "eslint-config-brightspace": "^0.4.0", + "eslint-plugin-html": "^4.0.1", + "polymer-cli": "^1.5.7" } } From 867a4785d48c37d25779570ed8467291e6f6e2e3 Mon Sep 17 00:00:00 2001 From: Stacey Van Herk Date: Wed, 21 Feb 2018 18:28:52 -0500 Subject: [PATCH 02/37] Setup Sauce --- .travis.yml | 16 +++++++++------- wct.conf.json | 49 ++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index d99dc36..8b3f91a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,9 @@ -language: node_js -node_js: node -before_script: -- npm install -g polymer-cli -- polymer install --variants -script: -- npm run test:lint +language: node_js +node_js: node +script: +- npm run lint +- polymer test --skip-plugin local +env: + global: + - SAUCE_USERNAME: Desire2Learn + - secure: R9nrpeyuMcZTHnBcVAuMn+q/Fp9ti9K31tYlkBFhXtJc+rM/TYERiN195SRgbk2Gy6fK4exUXIWZtJW+cxuRwDoBIcSGWRwHWmkDc5k13kLaW/BcdWAfI/yFEkAwzrO1AfQOsB1qdbfYle9pP724BebfQHlqAxH9zNWlQdek+Gr02WKKXMWWhl2bH4P2QbNQItD5X6+xQTbnbmZnUECap9mQXbCzPVNU2MwvPRLuYuJmjcNBdC39iGfZNBY/+N1Ix3y6yFa41VD773KiqTZhVOM1TvVJz/lb+Dm25qSZdKixC0987eDY5zHiCigHIjJxo1bDwJz4xJ/DsnIo+hk0LvrOPvoxBp6tFNhGQgIUkwk0Lz6FsNQcH5l5QLh1ROq4isNx9BVEOHb+W1PdFzFlvoKf9+WS/ysSw19B/GFhtLJGTmGkaxnEBxhJ+DyiVnV5APV+cE4AEA4yB/Vz7cKOrBlLbZdZFb8x9DtHamKvyoZh7RVun6BHSmMNAlPD83oxF9HZ7GjhKeC1EpvIdSrZAh6NKgklt0slwSumWU6VfJeoT4STNfiP39DzHHtWqscwTTAG9Rp4UFxDRsz6jCWaPf7AfYe85fXp+EwBRC0RYikQz43IFnKoGpz69qNh4vap6HNPQmM2uctZeWbhtDSq2FzN5fbheSV5QlFeq88O4S8= diff --git a/wct.conf.json b/wct.conf.json index 29da96e..a207e31 100644 --- a/wct.conf.json +++ b/wct.conf.json @@ -1,7 +1,46 @@ { - "plugins": { - "local": { - "browsers": ["chrome"] - } - } + "plugins": { + "local": { + "browsers": ["chrome"] + }, + "sauce": { + "browsers": [ + { + "browserName": "chrome", + "platform": "OS X 10.12", + "version": "" + }, + { + "browserName": "chrome", + "platform": "Windows 10", + "version": "" + }, + { + "browserName": "firefox", + "platform": "OS X 10.12", + "version": "" + }, + { + "browserName": "firefox", + "platform": "Windows 10", + "version": "" + }, + { + "browserName": "safari", + "platform": "OS X 10.12", + "version": "" + }, + { + "browserName": "microsoftedge", + "platform": "Windows 10", + "version": "" + }, + { + "browserName": "internet explorer", + "platform": "Windows 10", + "version": "11" + } + ] + } + } } From df75f4b7f650230c3cb49bc50c6e413757cbcfea Mon Sep 17 00:00:00 2001 From: Stacey Van Herk Date: Wed, 21 Feb 2018 18:29:22 -0500 Subject: [PATCH 03/37] Remove window from behaviour and update gitignore --- .gitignore | 2 ++ d2l-date-picker.html | 2 +- localize-behavior.html | 9 +++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 7bf6eb1..60751ab 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ bower_components +bower_components-1.x +bower-1.x.json node_modules diff --git a/d2l-date-picker.html b/d2l-date-picker.html index b388d7c..2c45802 100644 --- a/d2l-date-picker.html +++ b/d2l-date-picker.html @@ -117,7 +117,7 @@ }, behaviors: [ - window.D2L.PolymerBehaviors.DatePicker.LocalizeBehavior + D2L.PolymerBehaviors.DatePicker.LocalizeBehavior ], properties: { diff --git a/localize-behavior.html b/localize-behavior.html index f5a015b..7cd47bc 100644 --- a/localize-behavior.html +++ b/localize-behavior.html @@ -3,7 +3,7 @@ (function() { 'use strict'; /** @polymerBehavior D2L.PolymerBehaviors.DatePicker.LocalizeBehavior */ - var LocalizeBehavior = { + var D2L.PolymerBehaviors.DatePicker.LocalizeBehaviorImpl = { properties: { language: { type: String, @@ -82,10 +82,11 @@ window.D2L = window.D2L || {}; window.D2L.PolymerBehaviors = window.D2L.PolymerBehaviors || {}; window.D2L.PolymerBehaviors.DatePicker = window.D2L.PolymerBehaviors.DatePicker || {}; - /** @polymerBehavior */ - window.D2L.PolymerBehaviors.DatePicker.LocalizeBehavior = [ + + /** @polymerBehavior D2L.PolymerBehaviors.DatePicker.LocalizeBehavior */ + D2L.PolymerBehaviors.DatePicker.LocalizeBehavior = [ Polymer.AppLocalizeBehavior, - LocalizeBehavior + D2L.PolymerBehaviors.DatePicker.LocalizeBehaviorImpl ]; })(); From 813a0a66f3d9e25aeaef52d58fd4e99aa3377bf0 Mon Sep 17 00:00:00 2001 From: Stacey Van Herk Date: Wed, 21 Feb 2018 18:51:59 -0500 Subject: [PATCH 04/37] Add bower ignore, variants and codeowners --- CODEOWNERS | 1 + bower.json | 45 ++++++++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 13 deletions(-) create mode 100644 CODEOWNERS diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..100444f --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1 @@ +* @alogan519 @d2l-pbrown diff --git a/bower.json b/bower.json index 5b3c1db..6015174 100644 --- a/bower.json +++ b/bower.json @@ -2,26 +2,45 @@ "name": "d2l-date-picker", "description": "A Date Picker for D2L Brightspace", "main": "d2l-date-picker.html", + "ignore": [ + ".editorconfig", + ".eslintrc.json", + ".gitignore", + ".travis.yml", + "package.json", + "polymer.json", + "wct.conf.json", + "test", + "demo" + ], "dependencies": { - "polymer": "Polymer/polymer#^1.9.0", "d2l-time-picker": "BrightspaceUI/time-picker#^0.3.0", "vaadin-date-picker": "~1.2.3", - "d2l-colors": "^2.4.0", - "d2l-intl": "^0.4.1", - "iron-a11y-keys": "^1.0.9", "app-localize-behavior": "~1.0.2", - "d2l-offscreen": "^3.0.1", - "d2l-polymer-behaviors": "^1.0.0" + "d2l-colors": "^3.1.2", + "d2l-intl": "^1.0.0", + "iron-a11y-keys": "^2.1.0", + "d2l-offscreen": "^3.0.3", + "d2l-polymer-behaviors": "^1.2.0", + "polymer": "1 - 2" }, "devDependencies": { - "iron-component-page": "PolymerElements/iron-component-page#^1.0.0", - "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^1.0.0", - "web-component-tester": "Polymer/web-component-tester#^6.0.0", - "webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0", - "iron-test-helpers": "^1.0.0" + "iron-component-page": "^2.0.0", + "iron-demo-helpers": "^2.0.0", + "iron-test-helpers": "^2.0.0", + "web-component-tester": "^6.0.0" + }, + "variants": { + "1.x": { + "dependencies": { + "polymer": "^1.9.1" + }, + "resolutions": { + "webcomponentsjs": "^0.7.24" + } + } }, "resolutions": { - "d2l-offscreen": "^3.0.1", - "d2l-polymer-behaviors": "^1.0.0" + "webcomponentsjs": "^v1.0.0" } } From e12a899757f0c7d523ad40e4b177071ad17cbf7a Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 9 May 2018 13:20:59 -0500 Subject: [PATCH 05/37] update bower deps --- bower.json | 44 ++++++++++++++++++++++++++++---------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/bower.json b/bower.json index 6015174..7af8d54 100644 --- a/bower.json +++ b/bower.json @@ -2,45 +2,57 @@ "name": "d2l-date-picker", "description": "A Date Picker for D2L Brightspace", "main": "d2l-date-picker.html", + "license": "Apache-2.0", "ignore": [ + "demo", + "test", ".editorconfig", ".eslintrc.json", ".gitignore", ".travis.yml", "package.json", "polymer.json", - "wct.conf.json", - "test", - "demo" + "wct.conf.json" ], "dependencies": { - "d2l-time-picker": "BrightspaceUI/time-picker#^0.3.0", - "vaadin-date-picker": "~1.2.3", - "app-localize-behavior": "~1.0.2", + "polymer": "1.9 - 2", + "d2l-time-picker": "BrightspaceUI/time-picker#^1.0.0", + "vaadin-date-picker": "^2.0.0", "d2l-colors": "^3.1.2", "d2l-intl": "^1.0.0", - "iron-a11y-keys": "^2.1.0", - "d2l-offscreen": "^3.0.3", - "d2l-polymer-behaviors": "^1.2.0", - "polymer": "1 - 2" + "iron-a11y-keys": "^2.0.0", + "app-localize-behavior": "PolymerElements/app-localize-behavior#1 - 2", + "d2l-offscreen": "^3.0.1", + "d2l-polymer-behaviors": "^1.0.0" }, "devDependencies": { - "iron-component-page": "^2.0.0", - "iron-demo-helpers": "^2.0.0", - "iron-test-helpers": "^2.0.0", - "web-component-tester": "^6.0.0" + "iron-component-page": "PolymerElements/iron-component-page#^2.0.0", + "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0", + "web-component-tester": "Polymer/web-component-tester#^6.0.0", + "iron-test-helpers": "^2.0.0" }, "variants": { "1.x": { "dependencies": { - "polymer": "^1.9.1" + "polymer": "^1.9.1", + "vaadin-date-picker": "~1.2.3" }, "resolutions": { - "webcomponentsjs": "^0.7.24" + "webcomponentsjs": "^0.7.24", + "iron-a11y-keys-behavior": "^2.0.0", + "iron-selector": "^2.0.0", + "iron-media-query": "^2.0.0", + "iron-iconset-svg": "^2.0.0", + "iron-a11y-announcer": "^2.0.0", + "iron-dropdown": "^2.0.0", + "iron-overlay-behavior": "^2.2.0", + "iron-resizable-behavior": "^2.0.0" } } }, "resolutions": { + "d2l-polymer-behaviors": "^1.0.0", + "vaadin-date-picker": "^2.0.0", "webcomponentsjs": "^v1.0.0" } } From 244bea3e4b3d4a235ae6b90c7f7251a8b17fee1a Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 9 May 2018 16:28:20 -0500 Subject: [PATCH 06/37] linting --- .travis.yml | 18 +++++++++--------- bower.json | 38 ++++++++++++++++++++------------------ d2l-date-picker.html | 35 +++++++++++++++++------------------ demo/index.html | 3 +-- localize-behavior.html | 12 +++++++----- package.json | 2 +- test/.eslintrc | 11 ----------- test/.eslintrc.json | 3 +++ 8 files changed, 58 insertions(+), 64 deletions(-) delete mode 100644 test/.eslintrc create mode 100644 test/.eslintrc.json diff --git a/.travis.yml b/.travis.yml index 8b3f91a..4be2ad5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,9 @@ -language: node_js -node_js: node -script: -- npm run lint -- polymer test --skip-plugin local -env: - global: - - SAUCE_USERNAME: Desire2Learn - - secure: R9nrpeyuMcZTHnBcVAuMn+q/Fp9ti9K31tYlkBFhXtJc+rM/TYERiN195SRgbk2Gy6fK4exUXIWZtJW+cxuRwDoBIcSGWRwHWmkDc5k13kLaW/BcdWAfI/yFEkAwzrO1AfQOsB1qdbfYle9pP724BebfQHlqAxH9zNWlQdek+Gr02WKKXMWWhl2bH4P2QbNQItD5X6+xQTbnbmZnUECap9mQXbCzPVNU2MwvPRLuYuJmjcNBdC39iGfZNBY/+N1Ix3y6yFa41VD773KiqTZhVOM1TvVJz/lb+Dm25qSZdKixC0987eDY5zHiCigHIjJxo1bDwJz4xJ/DsnIo+hk0LvrOPvoxBp6tFNhGQgIUkwk0Lz6FsNQcH5l5QLh1ROq4isNx9BVEOHb+W1PdFzFlvoKf9+WS/ysSw19B/GFhtLJGTmGkaxnEBxhJ+DyiVnV5APV+cE4AEA4yB/Vz7cKOrBlLbZdZFb8x9DtHamKvyoZh7RVun6BHSmMNAlPD83oxF9HZ7GjhKeC1EpvIdSrZAh6NKgklt0slwSumWU6VfJeoT4STNfiP39DzHHtWqscwTTAG9Rp4UFxDRsz6jCWaPf7AfYe85fXp+EwBRC0RYikQz43IFnKoGpz69qNh4vap6HNPQmM2uctZeWbhtDSq2FzN5fbheSV5QlFeq88O4S8= +language: node_js +node_js: 9 +script: +- npm run lint +- polymer test --skip-plugin local +env: + global: + - SAUCE_USERNAME: Desire2Learn + - secure: R9nrpeyuMcZTHnBcVAuMn+q/Fp9ti9K31tYlkBFhXtJc+rM/TYERiN195SRgbk2Gy6fK4exUXIWZtJW+cxuRwDoBIcSGWRwHWmkDc5k13kLaW/BcdWAfI/yFEkAwzrO1AfQOsB1qdbfYle9pP724BebfQHlqAxH9zNWlQdek+Gr02WKKXMWWhl2bH4P2QbNQItD5X6+xQTbnbmZnUECap9mQXbCzPVNU2MwvPRLuYuJmjcNBdC39iGfZNBY/+N1Ix3y6yFa41VD773KiqTZhVOM1TvVJz/lb+Dm25qSZdKixC0987eDY5zHiCigHIjJxo1bDwJz4xJ/DsnIo+hk0LvrOPvoxBp6tFNhGQgIUkwk0Lz6FsNQcH5l5QLh1ROq4isNx9BVEOHb+W1PdFzFlvoKf9+WS/ysSw19B/GFhtLJGTmGkaxnEBxhJ+DyiVnV5APV+cE4AEA4yB/Vz7cKOrBlLbZdZFb8x9DtHamKvyoZh7RVun6BHSmMNAlPD83oxF9HZ7GjhKeC1EpvIdSrZAh6NKgklt0slwSumWU6VfJeoT4STNfiP39DzHHtWqscwTTAG9Rp4UFxDRsz6jCWaPf7AfYe85fXp+EwBRC0RYikQz43IFnKoGpz69qNh4vap6HNPQmM2uctZeWbhtDSq2FzN5fbheSV5QlFeq88O4S8= diff --git a/bower.json b/bower.json index 7af8d54..d307dd4 100644 --- a/bower.json +++ b/bower.json @@ -15,21 +15,22 @@ "wct.conf.json" ], "dependencies": { - "polymer": "1.9 - 2", - "d2l-time-picker": "BrightspaceUI/time-picker#^1.0.0", - "vaadin-date-picker": "^2.0.0", - "d2l-colors": "^3.1.2", - "d2l-intl": "^1.0.0", - "iron-a11y-keys": "^2.0.0", "app-localize-behavior": "PolymerElements/app-localize-behavior#1 - 2", + "d2l-colors": "^3.1.2", + "d2l-intl-import": "^1.0.0", "d2l-offscreen": "^3.0.1", - "d2l-polymer-behaviors": "^1.0.0" + "d2l-polymer-behaviors": "^1.0.0", + "d2l-time-picker": "BrightspaceUI/time-picker#^1.0.0", + "iron-a11y-keys": "^2.0.0", + "iron-input": "^2.0.0", + "polymer": "1.9 - 2", + "vaadin-date-picker": "^2.0.0" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^2.0.0", "iron-demo-helpers": "PolymerElements/iron-demo-helpers#^2.0.0", - "web-component-tester": "Polymer/web-component-tester#^6.0.0", - "iron-test-helpers": "^2.0.0" + "iron-test-helpers": "^2.0.0", + "web-component-tester": "Polymer/web-component-tester#^6.0.0" }, "variants": { "1.x": { @@ -38,15 +39,16 @@ "vaadin-date-picker": "~1.2.3" }, "resolutions": { - "webcomponentsjs": "^0.7.24", - "iron-a11y-keys-behavior": "^2.0.0", - "iron-selector": "^2.0.0", - "iron-media-query": "^2.0.0", - "iron-iconset-svg": "^2.0.0", - "iron-a11y-announcer": "^2.0.0", - "iron-dropdown": "^2.0.0", - "iron-overlay-behavior": "^2.2.0", - "iron-resizable-behavior": "^2.0.0" + "iron-a11y-announcer": "^2.0.0", + "iron-a11y-keys-behavior": "^2.0.0", + "iron-dropdown": "^2.0.0", + "iron-iconset-svg": "^2.0.0", + "iron-input": "^2.0.0", + "iron-media-query": "^2.0.0", + "iron-overlay-behavior": "^2.2.0", + "iron-resizable-behavior": "^2.0.0", + "iron-selector": "^2.0.0", + "webcomponentsjs": "^0.7.24" } } }, diff --git a/d2l-date-picker.html b/d2l-date-picker.html index 2c45802..853ed2b 100644 --- a/d2l-date-picker.html +++ b/d2l-date-picker.html @@ -4,7 +4,7 @@ - + @@ -38,7 +38,6 @@ @apply --d2l-offscreen-rtl; } - vaadin-date-picker-light { --primary-color: var(--d2l-color-celestine); --light-primary-color: var(--d2l-color-celestine-plus-1); @@ -189,14 +188,14 @@ _handleTap: function() { var datepicker = this.$$('vaadin-date-picker-light'); - if ( !datepicker.opened ) { + if (!datepicker.opened) { datepicker._focusOverlayOnOpen = true; } }, _onEnter: function(e) { var datepicker = this.$$('vaadin-date-picker-light'); - if ( !datepicker.opened ) { + if (!datepicker.opened) { // A better solution is to add a boolean to the 3rd party open function datepicker._focusOverlayOnOpen = true; datepicker.open(); @@ -208,7 +207,7 @@ _onUpDown: function(e) { var datepicker = this.$$('vaadin-date-picker-light'); - if ( !datepicker.opened ) { + if (!datepicker.opened) { e.detail.keyboardEvent.preventDefault(); e.detail.keyboardEvent.stopPropagation(); } @@ -222,14 +221,14 @@ // in shady DOM the input's "focus" event does not bubble, // so no need to fire it if (!Polymer.Settings.useShadow) { - this.dispatchEvent( new CustomEvent( - 'focus', - {bubbles: true, composed: false} - ) ); + this.dispatchEvent(new CustomEvent( + 'focus', + { bubbles: true, composed: false } + )); } }, - _localeChanged: function( locale ) { + _localeChanged: function(locale) { this.language = locale; }, @@ -246,8 +245,8 @@ } } } : {}; - var formatter = new d2lIntl.DateTimeFormat( this.locale, dateFormatOverride ); - var parser = new d2lIntl.DateTimeParse( this.locale, dateFormatOverride ); + var formatter = new d2lIntl.DateTimeFormat(this.locale, dateFormatOverride); + var parser = new d2lIntl.DateTimeParse(this.locale, dateFormatOverride); var datePicker = this.$$('vaadin-date-picker-light'); var localeOverrides = { monthNames: locale.date.calendar.months.long, @@ -256,12 +255,12 @@ firstDayOfWeek: this.firstDayOfWeek ? this.firstDayOfWeek : locale.date.calendar.firstDayOfWeek, today: this.localize('today'), cancel: this.localize('cancel'), - formatDate: function( date ) { - return formatter.formatDate( date ); + formatDate: function(date) { + return formatter.formatDate(date); }, - parseDate: function( dateString ) { + parseDate: function(dateString) { try { - return parser.parseDate( dateString ); + return parser.parseDate(dateString); } catch (exception) { return null; } @@ -276,9 +275,9 @@ if (obj2 === undefined || obj2 === null || typeof(obj2) !== 'object') { return obj1; } - Object.keys(obj2).forEach( function(i) { + Object.keys(obj2).forEach(function(i) { if (obj1.hasOwnProperty(i)) { - if (typeof(obj2[i]) === 'object' && typeof(obj1[i]) === 'object' ) { + if (typeof(obj2[i]) === 'object' && typeof(obj1[i]) === 'object') { this._merge(obj1[i], obj2[i]); } else { obj1[i] = obj2[i]; diff --git a/demo/index.html b/demo/index.html index a08cb9b..413718e 100644 --- a/demo/index.html +++ b/demo/index.html @@ -13,8 +13,7 @@ - + diff --git a/localize-behavior.html b/localize-behavior.html index 7cd47bc..feb3680 100644 --- a/localize-behavior.html +++ b/localize-behavior.html @@ -2,12 +2,17 @@ diff --git a/d2l-date-picker.html b/d2l-date-picker.html index b73f143..2155bdd 100644 --- a/d2l-date-picker.html +++ b/d2l-date-picker.html @@ -7,6 +7,7 @@ + - - -
{{description}}
-
+ + + + + + +
{{description}}
+
+
@@ -99,8 +101,18 @@ } }, + ready: function() { + var input = this.$$('input'); + if (input) { + this._target = this.$$('input'); + } + }, + focus: function() { - this.$$('input').focus(); + var input = this.$$('input'); + if (input) { + input.focus(); + } }, _computedAriaInvalid: function(invalid) { diff --git a/demo/index.html b/demo/index.html index 413718e..7daeda2 100644 --- a/demo/index.html +++ b/demo/index.html @@ -17,13 +17,58 @@ -
-

Basic d2l-date-picker demo

- - - -
+ + + + +
+

Basic d2l-date-picker demo

+ + + + +

d2l-date-picker with slotted content

+ + + +
From 8b79ad77edeaa1411216b66d7479261d17841e6d Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 16 May 2018 10:43:32 -0500 Subject: [PATCH 27/37] allow for date picker 1 or 2 --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index bf7bfcb..10278da 100644 --- a/bower.json +++ b/bower.json @@ -23,7 +23,7 @@ "iron-a11y-keys": "^2.0.0", "iron-input": "^2.0.0", "polymer": "1.9 - 2", - "vaadin-date-picker": "^2.0.0" + "vaadin-date-picker": "1 - 2" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^2.0.0", From d423b9d2f7a82fd3a6ed168d7f1ba1ead6423516 Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 16 May 2018 12:49:58 -0500 Subject: [PATCH 28/37] reduce the resolutions as much as possible --- bower.json | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/bower.json b/bower.json index 10278da..0895f87 100644 --- a/bower.json +++ b/bower.json @@ -35,18 +35,11 @@ "1.x": { "dependencies": { "polymer": "^1.9.1", - "vaadin-date-picker": "Brightspace/vaadin-date-picker#^1.2.5" + "vaadin-date-picker": "Brightspace/vaadin-date-picker#ad0856f74e46b2f6d9faf0a6cdfd3c90011104df" }, "resolutions": { - "iron-a11y-announcer": "^2.0.0", - "iron-a11y-keys-behavior": "^2.0.0", - "iron-dropdown": "^2.0.0", - "iron-iconset-svg": "^2.0.0", - "iron-input": "^2.0.0", - "iron-media-query": "^2.0.0", - "iron-overlay-behavior": "^2.2.0", - "iron-resizable-behavior": "^2.0.0", - "iron-selector": "^2.0.0", + "iron-a11y-keys-behavior": "1 - 2", + "iron-selector": "1 - 2", "webcomponentsjs": "^0.7.24" } } From 3a01b0a78405cfb436ea0f67de1be33dd6a13be4 Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 16 May 2018 13:31:15 -0500 Subject: [PATCH 29/37] all on the brightspace fork --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 0895f87..2b1da49 100644 --- a/bower.json +++ b/bower.json @@ -23,7 +23,7 @@ "iron-a11y-keys": "^2.0.0", "iron-input": "^2.0.0", "polymer": "1.9 - 2", - "vaadin-date-picker": "1 - 2" + "vaadin-date-picker": "Brightspace/vaadin-date-picker#1 - 2" }, "devDependencies": { "iron-component-page": "PolymerElements/iron-component-page#^2.0.0", From 1d341985f895eaf7438923a933eb57138b9ea5cd Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 16 May 2018 13:57:28 -0500 Subject: [PATCH 30/37] use brightspace released version --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 2b1da49..b768c68 100644 --- a/bower.json +++ b/bower.json @@ -35,7 +35,7 @@ "1.x": { "dependencies": { "polymer": "^1.9.1", - "vaadin-date-picker": "Brightspace/vaadin-date-picker#ad0856f74e46b2f6d9faf0a6cdfd3c90011104df" + "vaadin-date-picker": "Brightspace/vaadin-date-picker#1.2.6" }, "resolutions": { "iron-a11y-keys-behavior": "1 - 2", From 34ec7c683515d105cc1a94f62ff1c991accea813 Mon Sep 17 00:00:00 2001 From: jstefaniuk Date: Wed, 16 May 2018 15:49:26 -0500 Subject: [PATCH 31/37] add a way to inject css into the overlay --- d2l-date-picker-behavior.html | 5 +++++ d2l-date-picker-style-modules.html | 15 +++++++++------ 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/d2l-date-picker-behavior.html b/d2l-date-picker-behavior.html index abb228c..55efdb0 100644 --- a/d2l-date-picker-behavior.html +++ b/d2l-date-picker-behavior.html @@ -50,6 +50,11 @@ type: String, reflectToAttribute: true, notify: true + }, + customOverlayStyle: { + type: Boolean, + reflectToAttribute: true, + value: false } }, diff --git a/d2l-date-picker-style-modules.html b/d2l-date-picker-style-modules.html index 03843f4..86e7ddc 100644 --- a/d2l-date-picker-style-modules.html +++ b/d2l-date-picker-style-modules.html @@ -5,6 +5,14 @@