From 615e4acf66ad8e839fec5613203b7471da7a0de4 Mon Sep 17 00:00:00 2001 From: Dan Date: Wed, 30 Mar 2016 15:15:23 -0400 Subject: [PATCH] Bumped version number to 3.3.2. --- bower.json | 4 +- dist/docs/css/patternfly-additions.css | 5 +- dist/docs/grunt-scripts/angular-animate.js | 7 +- dist/docs/grunt-scripts/angular-patternfly.js | 243 +++++++++++++++++- dist/docs/grunt-scripts/angular-sanitize.js | 2 +- dist/docs/grunt-scripts/angular.js | 186 ++++++++++++-- .../grunt-scripts/bootstrap-datepicker.js | 4 +- dist/docs/js/docs-setup.js | 9 + .../api/patternfly.autofocus.pfFocused.html | 2 +- ....card.directive.pfAggregateStatusCard.html | 2 +- .../api/patternfly.card.directive.pfCard.html | 2 +- ...patternfly.charts.directive.pfC3Chart.html | 2 +- ...nfly.charts.directive.pfDonutPctChart.html | 2 +- ...patternfly.charts.directive.pfHeatMap.html | 2 +- ...fly.charts.directive.pfSparklineChart.html | 14 +- ...ernfly.charts.directive.pfTrendsChart.html | 14 +- ...harts.directive.pfUtilizationBarChart.html | 14 +- ...rts.directive.pfUtilizationTrendChart.html | 14 +- ...patternfly.filters.directive.pfFilter.html | 14 +- ...nfly.filters.directive.pfFilterFields.html | 2 +- ...fly.filters.directive.pfFilterResults.html | 2 +- ...atternfly.form.directive.pfDatepicker.html | 14 +- ...tternfly.form.directive.pfFormButtons.html | 14 +- ...patternfly.form.directive.pfFormGroup.html | 14 +- ....form.directive.pfRemainingCharsCount.html | 14 +- .../patternfly.notification.Notification.html | 14 +- ...cation.directive.pfInlineNotification.html | 14 +- ...fication.directive.pfNotificationList.html | 14 +- .../api/patternfly.select.pfSelect.html | 14 +- .../api/patternfly.sort.directive.pfSort.html | 14 +- ...tternfly.toolbars.directive.pfToolbar.html | 14 +- ...tternfly.utils.directive.pfTransclude.html | 14 +- .../patternfly.validation.pfValidation.html | 14 +- ...patternfly.views.directive.pfCardView.html | 14 +- ...patternfly.views.directive.pfListView.html | 14 +- package.json | 2 +- 36 files changed, 561 insertions(+), 183 deletions(-) diff --git a/bower.json b/bower.json index 6fca4d87c..116c6f7c0 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "angular-patternfly", - "version": "3.3.1", + "version": "3.3.2", "authors": [ "Red Hat" ], @@ -39,7 +39,7 @@ "angular-sanitize": "1.3.0 - 1.5.*", "angular-bootstrap": "0.13.x", "lodash": "3.x", - "patternfly": "~3.3.1" + "patternfly": "~3.3.2" }, "devDependencies": { "angular-mocks": "1.3.0 - 1.5.*" diff --git a/dist/docs/css/patternfly-additions.css b/dist/docs/css/patternfly-additions.css index 600527850..5d388d145 100644 --- a/dist/docs/css/patternfly-additions.css +++ b/dist/docs/css/patternfly-additions.css @@ -4931,7 +4931,10 @@ table.datatable th:active { padding: 0; top: 23px!important; width: calc(100% - 25px); - z-index: 0; +} +.bootstrap-datetimepicker-widget.dropdown-menu:before, +.bootstrap-datetimepicker-widget.dropdown-menu:after { + content: none; } .bootstrap-datetimepicker-widget .timepicker-hour { width: 100%; diff --git a/dist/docs/grunt-scripts/angular-animate.js b/dist/docs/grunt-scripts/angular-animate.js index 1652a9bba..c30fed7b5 100644 --- a/dist/docs/grunt-scripts/angular-animate.js +++ b/dist/docs/grunt-scripts/angular-animate.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.5.2 + * @license AngularJS v1.5.3 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ @@ -2225,6 +2225,11 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) { }); rules.cancel.push(function(element, newAnimation, currentAnimation) { + // cancel the animation if classes added / removed in both animation cancel each other out, + // but only if the current animation isn't structural + + if (currentAnimation.structural) return false; + var nA = newAnimation.addClass; var nR = newAnimation.removeClass; var cA = currentAnimation.addClass; diff --git a/dist/docs/grunt-scripts/angular-patternfly.js b/dist/docs/grunt-scripts/angular-patternfly.js index 9439a0666..de4f49aed 100644 --- a/dist/docs/grunt-scripts/angular-patternfly.js +++ b/dist/docs/grunt-scripts/angular-patternfly.js @@ -573,7 +573,8 @@ angular.module('patternfly.card').directive('pfCard', function () { getDefaultSparklineLegend: patternflyDefaults.getDefaultSparklineLegend, getDefaultSparklinePoint: patternflyDefaults.getDefaultSparklinePoint, getDefaultSparklineTooltip: patternflyDefaults.getDefaultSparklineTooltip, - getDefaultSparklineConfig: patternflyDefaults.getDefaultSparklineConfig + getDefaultSparklineConfig: patternflyDefaults.getDefaultSparklineConfig, + getDefaultLineConfig: patternflyDefaults.getDefaultLineConfig }); })(); ;/** @@ -942,14 +943,14 @@ angular.module('patternfly.charts').directive('pfDonutPctChart', ["pfUtils", "$t } $scope.getStatusColor = function (used, thresholds) { - var color = '#0088CE'; + var color = pfUtils.colorPalette.blue; if (thresholds) { - color = '#3f9c35'; + color = pfUtils.colorPalette.green; if (used >= thresholds.error) { - color = '#CC0000'; + color = pfUtils.colorPalette.red; } else if (used >= thresholds.warning) { - color = '#EC7A08'; + color = pfUtils.colorPalette.orange; } } @@ -962,7 +963,7 @@ angular.module('patternfly.charts').directive('pfDonutPctChart', ["pfUtils", "$t color = { pattern: [] }; percentUsed = scope.data.used / scope.data.total * 100.0; color.pattern[0] = $scope.getStatusColor(percentUsed, scope.config.thresholds); - color.pattern[1] = '#D1D1D1'; + color.pattern[1] = pfUtils.colorPalette.black300; return color; }; @@ -1463,6 +1464,225 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", function } }; }]); +;/** + * @ngdoc directive + * @name patternfly.charts.directive:pfLineChart + * + * @description + * Directive for rendering a line chart. + *

+ * See http://c3js.org/reference.html for a full list of C3 chart options. + * + * @param {object} config configuration settings for the line chart:
+ * + * + * @param {object} chartData the data to be shown as an area chart
+ * First and second Array elements, xData and yData, must exist, next data arrays are optional.
+ * + * + * @param {boolean=} showXAxis override config settings for showing the X Axis + * @param {boolean=} showYAxis override config settings for showing the Y Axis + * @param {boolean=} setAreaChart override config settings for showing area type chart + + * @example + + +
+
+
+
+
+
+
+
+
+
+ + + +
+
+
+
+ +
+
+
+
+
+ + + angular.module( 'patternfly.charts' ).controller( 'ChartCtrl', function( $scope, pfUtils ) { + + $scope.config = { + chartId: 'exampleLine', + grid: {y: {show: false}}, + point: {r: 1}, + color: {pattern: [pfUtils.colorPalette.blue, pfUtils.colorPalette.green]} + }; + + var today = new Date(); + var dates = ['dates']; + for (var d = 20 - 1; d >= 0; d--) { + dates.push(new Date(today.getTime() - (d * 24 * 60 * 60 * 1000))); + } + + $scope.data = { + xData: dates, + yData0: ['Created', 12, 10,10, 62, 17, 10, 15, 13, 17, 10, 12, 10, 10, 12, 17, 16, 15, 13, 17, 10], + yData1: ['Deleted', 10, 17, 76,14, 10, 10, 10, 10, 10, 10, 10, 17, 17, 14, 10, 10, 10, 10, 10, 10] + }; + + $scope.custShowXAxis = false; + $scope.custShowYAxis = false; + $scope.custAreaChart = false; + + $scope.addDataPoint = function () { + $scope.data.xData.push(new Date($scope.data.xData[$scope.data.xData.length - 1].getTime() + (24 * 60 * 60 * 1000))); + $scope.data.yData0.push(Math.round(Math.random() * 100)); + $scope.data.yData1.push(Math.round(Math.random() * 100)); + }; + }); + +
+ */ +angular.module('patternfly.charts').directive('pfLineChart', ["pfUtils", function (pfUtils) { + 'use strict'; + return { + restrict: 'A', + scope: { + config: '=', + chartData: '=', + showXAxis: '=?', + showYAxis: '=?', + setAreaChart: '=?' + }, + replace: true, + templateUrl: 'charts/line/line-chart.html', + controller: ['$scope', + function ($scope) { + + // Create an ID for the chart based on the chartId in the config if given + $scope.lineChartId = 'lineChart'; + if ($scope.config.chartId) { + $scope.lineChartId = $scope.config.chartId + $scope.lineChartId; + } + + /* + * Convert the config data to C3 Data + */ + $scope.getLineData = function (chartData) { + var lineData = { + type: $scope.setAreaChart ? "area" : "line" + }; + + if (chartData && chartData.dataAvailable !== false && chartData.xData) { + lineData.x = chartData.xData[0]; + // Convert the chartData dictionary into a C3 columns data arrays + lineData.columns = Object.keys (chartData).map (function (key) { + return chartData[key]; + }); + } + + return lineData; + }; + + /* + * Setup Axis options. Default is to not show either axis. This can be overridden in two ways: + * 1) in the config, setting showAxis to true will show both axes + * 2) in the attributes showXAxis and showYAxis will override the config if set + * + * By default only line and the tick marks are shown, no labels. This is a line and should be used + * only to show a brief idea of trending. This can be overridden by setting the config.axis options per C3 + */ + + if ($scope.showXAxis === undefined) { + $scope.showXAxis = ($scope.config.showAxis !== undefined) && $scope.config.showAxis; + } + + if ($scope.showYAxis === undefined) { + $scope.showYAxis = ($scope.config.showAxis !== undefined) && $scope.config.showAxis; + } + + $scope.defaultConfig = $().c3ChartDefaults().getDefaultLineConfig(); + $scope.defaultConfig.axis = { + x: { + show: $scope.showXAxis === true, + type: 'timeseries', + tick: { + format: function () { + return ''; + } + } + }, + y: { + show: $scope.showYAxis === true, + tick: { + format: function () { + return ''; + } + } + } + }; + + /* + * Setup Chart type option. Default is Line Chart. + */ + if ($scope.setAreaChart === undefined) { + $scope.setAreaChart = ($scope.config.setAreaChart !== undefined) && $scope.config.setAreaChart; + } + + // Convert the given data to C3 chart format + $scope.config.data = pfUtils.merge($scope.config.data, $scope.getLineData($scope.chartData)); + + // Override defaults with callers specifications + $scope.defaultConfig = pfUtils.merge($scope.defaultConfig, $scope.config); + } + ], + + link: function (scope) { + scope.$watch('config', function () { + scope.config.data = pfUtils.merge(scope.config.data, scope.getLineData(scope.chartData)); + scope.chartConfig = pfUtils.merge(scope.config, scope.defaultConfig); + }, true); + scope.$watch('showXAxis', function () { + scope.chartConfig.axis.x.show = scope.showXAxis === true; + }); + scope.$watch('showYAxis', function () { + scope.chartConfig.axis.y.show = scope.showYAxis === true; + }); + scope.$watch('setAreaChart', function () { + scope.chartConfig.data.type = scope.setAreaChart ? "area" : "line"; + }); + scope.$watch('chartData', function () { + scope.chartConfig.data = pfUtils.merge(scope.chartConfig.data, scope.getLineData(scope.chartData)); + }, true); + } + }; +}] +); ;/** * @ngdoc directive * @name patternfly.charts.directive:pfSparklineChart @@ -4470,7 +4690,9 @@ angular }, mergeDeep: function (source1, source2) { return mergeDeep({}, angular.copy(source1), angular.copy(source2)); - } + }, + + colorPalette: $.pfPaletteColors }); })(); @@ -5568,6 +5790,11 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window ); + $templateCache.put('charts/line/line-chart.html', + "
" + ); + + $templateCache.put('charts/sparkline/sparkline-chart.html', "
" ); @@ -5647,7 +5874,7 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window 'use strict'; $templateCache.put('sort/sort.html', - "
" + "
" ); }]); diff --git a/dist/docs/grunt-scripts/angular-sanitize.js b/dist/docs/grunt-scripts/angular-sanitize.js index 8161e4894..f4e25237b 100644 --- a/dist/docs/grunt-scripts/angular-sanitize.js +++ b/dist/docs/grunt-scripts/angular-sanitize.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.5.2 + * @license AngularJS v1.5.3 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ diff --git a/dist/docs/grunt-scripts/angular.js b/dist/docs/grunt-scripts/angular.js index 625177774..5e6fb2c36 100644 --- a/dist/docs/grunt-scripts/angular.js +++ b/dist/docs/grunt-scripts/angular.js @@ -1,5 +1,5 @@ /** - * @license AngularJS v1.5.2 + * @license AngularJS v1.5.3 * (c) 2010-2016 Google, Inc. http://angularjs.org * License: MIT */ @@ -57,7 +57,7 @@ function minErr(module, ErrorConstructor) { return match; }); - message += '\nhttp://errors.angularjs.org/1.5.2/' + + message += '\nhttp://errors.angularjs.org/1.5.3/' + (module ? module + '/' : '') + code; for (i = SKIP_INDEXES, paramPrefix = '?'; i < templateArgs.length; i++, paramPrefix = '&') { @@ -2443,11 +2443,11 @@ function toDebugString(obj) { * - `codeName` – `{string}` – Code name of the release, such as "jiggling-armfat". */ var version = { - full: '1.5.2', // all of these placeholder strings will be replaced by grunt's + full: '1.5.3', // all of these placeholder strings will be replaced by grunt's major: 1, // package task minor: 5, - dot: 2, - codeName: 'differential-recovery' + dot: 3, + codeName: 'diplohaplontic-meiosis' }; @@ -5862,7 +5862,14 @@ function Browser(window, document, $log, $sniffer) { var cachedState, lastHistoryState, lastBrowserUrl = location.href, baseElement = document.find('base'), - pendingLocation = null; + pendingLocation = null, + getCurrentState = !$sniffer.history ? noop : function getCurrentState() { + try { + return history.state; + } catch (e) { + // MSIE can reportedly throw when there is no state (UNCONFIRMED). + } + }; cacheState(); lastHistoryState = cachedState; @@ -5970,14 +5977,6 @@ function Browser(window, document, $log, $sniffer) { fireUrlChange(); } - function getCurrentState() { - try { - return history.state; - } catch (e) { - // MSIE can reportedly throw when there is no state (UNCONFIRMED). - } - } - // This variable should be used *only* inside the cacheState function. var lastCachedState = null; function cacheState() { @@ -6829,9 +6828,23 @@ function $TemplateCacheProvider() { * `true` if the specified slot contains content (i.e. one or more DOM nodes). * * The controller can provide the following methods that act as life-cycle hooks: - * * `$onInit` - Called on each controller after all the controllers on an element have been constructed and + * * `$onInit()` - Called on each controller after all the controllers on an element have been constructed and * had their bindings initialized (and before the pre & post linking functions for the directives on * this element). This is a good place to put initialization code for your controller. + * * `$onChanges(changesObj)` - Called whenever one-way (`<`) or interpolation (`@`) bindings are updated. The + * `changesObj` is a hash whose keys are the names of the bound properties that have changed, and the values are an + * object of the form `{ currentValue: ..., previousValue: ... }`. Use this hook to trigger updates within a component + * such as cloning the bound value to prevent accidental mutation of the outer value. + * * `$onDestroy()` - Called on a controller when its containing scope is destroyed. Use this hook for releasing + * external resources, watches and event handlers. Note that components have their `$onDestroy()` hooks called in + * the same order as the `$scope.$broadcast` events are triggered, which is top down. This means that parent + * components will have their `$onDestroy()` hook called before child components. + * * `$postLink()` - Called after this controller's element and its children have been linked. Similar to the post-link + * function this hook can be used to set up DOM event handlers and do direct DOM manipulation. + * Note that child elements that contain `templateUrl` directives will not have been compiled and linked since + * they are waiting for their template to load asynchronously and their own compilation and linking has been + * suspended until that occurs. + * * * #### `require` * Require another directive and inject its controller as the fourth argument to the linking function. The @@ -7464,11 +7477,11 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { function assertValidDirectiveName(name) { var letter = name.charAt(0); if (!letter || letter !== lowercase(letter)) { - throw $compileMinErr('baddir', "Directive name '{0}' is invalid. The first character must be a lowercase letter", name); + throw $compileMinErr('baddir', "Directive/Component name '{0}' is invalid. The first character must be a lowercase letter", name); } if (name !== name.trim()) { throw $compileMinErr('baddir', - "Directive name '{0}' is invalid. The name should not contain leading or trailing whitespaces", + "Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces", name); } } @@ -7743,6 +7756,36 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { return debugInfoEnabled; }; + + var TTL = 10; + /** + * @ngdoc method + * @name $compileProvider#onChangesTtl + * @description + * + * Sets the number of times `$onChanges` hooks can trigger new changes before giving up and + * assuming that the model is unstable. + * + * The current default is 10 iterations. + * + * In complex applications it's possible that dependencies between `$onChanges` hooks and bindings will result + * in several iterations of calls to these hooks. However if an application needs more than the default 10 + * iterations to stabilize then you should investigate what is causing the model to continuously change during + * the `$onChanges` hook execution. + * + * Increasing the TTL could have performance implications, so you should not change it without proper justification. + * + * @param {number} limit The number of `$onChanges` hook iterations. + * @returns {number|object} the current limit (or `this` if called as a setter for chaining) + */ + this.onChangesTtl = function(value) { + if (arguments.length) { + TTL = value; + return this; + } + return TTL; + }; + this.$get = [ '$injector', '$interpolate', '$exceptionHandler', '$templateRequest', '$parse', '$controller', '$rootScope', '$sce', '$animate', '$$sanitizeUri', @@ -7751,6 +7794,36 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { var SIMPLE_ATTR_NAME = /^\w/; var specialAttrHolder = document.createElement('div'); + + + + var onChangesTtl = TTL; + // The onChanges hooks should all be run together in a single digest + // When changes occur, the call to trigger their hooks will be added to this queue + var onChangesQueue; + + // This function is called in a $$postDigest to trigger all the onChanges hooks in a single digest + function flushOnChangesQueue() { + try { + if (!(--onChangesTtl)) { + // We have hit the TTL limit so reset everything + onChangesQueue = undefined; + throw $compileMinErr('infchng', '{0} $onChanges() iterations reached. Aborting!\n', TTL); + } + // We must run this hook in an apply since the $$postDigest runs outside apply + $rootScope.$apply(function() { + for (var i = 0, ii = onChangesQueue.length; i < ii; ++i) { + onChangesQueue[i](); + } + // Reset the queue to trigger a new schedule next time there is a change + onChangesQueue = undefined; + }); + } finally { + onChangesTtl++; + } + } + + function Attributes(element, attributesToCopy) { if (attributesToCopy) { var keys = Object.keys(attributesToCopy); @@ -8616,6 +8689,17 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { compileNode = $compileNode[0]; replaceWith(jqCollection, sliceArgs($template), compileNode); + // Support: Chrome < 50 + // https://github.com/angular/angular.js/issues/14041 + + // In the versions of V8 prior to Chrome 50, the document fragment that is created + // in the `replaceWith` function is improperly garbage collected despite still + // being referenced by the `parentNode` property of all of the child nodes. By adding + // a reference to the fragment via a different property, we can avoid that incorrect + // behavior. + // TODO: remove this line after Chrome 50 has been released + $template[0].$$parentNode = $template[0].parentNode; + childTranscludeFn = compilationGenerator(mightHaveMultipleTransclusionError, $template, transcludeFn, terminalPriority, replaceDirective && replaceDirective.name, { // Don't pass in: @@ -8898,10 +8982,16 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } }); - // Trigger the `$onInit` method on all controllers that have one + // Handle the init and destroy lifecycle hooks on all controllers that have them forEach(elementControllers, function(controller) { - if (isFunction(controller.instance.$onInit)) { - controller.instance.$onInit(); + var controllerInstance = controller.instance; + if (isFunction(controllerInstance.$onInit)) { + controllerInstance.$onInit(); + } + if (isFunction(controllerInstance.$onDestroy)) { + controllerScope.$on('$destroy', function callOnDestroyHook() { + controllerInstance.$onDestroy(); + }); } }); @@ -8938,6 +9028,14 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { ); } + // Trigger $postLink lifecycle hooks + forEach(elementControllers, function(controller) { + var controllerInstance = controller.instance; + if (isFunction(controllerInstance.$postLink)) { + controllerInstance.$postLink(); + } + }); + // This is the function that is injected as `$transclude`. // Note: all arguments are optional! function controllersBoundTransclude(scope, cloneAttachFn, futureParentElement, slotName) { @@ -9533,6 +9631,7 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { // only occurs for isolate scopes and new scopes with controllerAs. function initializeDirectiveBindings(scope, attrs, destination, bindings, directive) { var removeWatchCollection = []; + var changes; forEach(bindings, function initializeBinding(definition, scopeName) { var attrName = definition.attrName, optional = definition.optional, @@ -9548,6 +9647,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } attrs.$observe(attrName, function(value) { if (isString(value)) { + var oldValue = destination[scopeName]; + recordChanges(scopeName, value, oldValue); destination[scopeName] = value; } }); @@ -9619,6 +9720,8 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { destination[scopeName] = parentGet(scope); removeWatch = scope.$watch(parentGet, function parentValueWatchAction(newParentValue) { + var oldValue = destination[scopeName]; + recordChanges(scopeName, newParentValue, oldValue); destination[scopeName] = newParentValue; }, parentGet.literal); @@ -9639,6 +9742,33 @@ function $CompileProvider($provide, $$sanitizeUriProvider) { } }); + function recordChanges(key, currentValue, previousValue) { + if (isFunction(destination.$onChanges) && currentValue !== previousValue) { + // If we have not already scheduled the top level onChangesQueue handler then do so now + if (!onChangesQueue) { + scope.$$postDigest(flushOnChangesQueue); + onChangesQueue = []; + } + // If we have not already queued a trigger of onChanges for this controller then do so now + if (!changes) { + changes = {}; + onChangesQueue.push(triggerOnChangesHook); + } + // If the has been a change on this property already then we need to reuse the previous value + if (changes[key]) { + previousValue = changes[key].previousValue; + } + // Store this change + changes[key] = {previousValue: previousValue, currentValue: currentValue}; + } + } + + function triggerOnChangesHook() { + destination.$onChanges(changes); + // Now clear the changes so that we schedule onChanges when more changes arrive + changes = undefined; + } + return removeWatchCollection.length && function removeWatches() { for (var i = 0, ii = removeWatchCollection.length; i < ii; ++i) { removeWatchCollection[i](); @@ -15325,15 +15455,15 @@ function $ParseProvider() { * [Kris Kowal's Q](https://github.com/kriskowal/q). * * $q can be used in two fashions --- one which is more similar to Kris Kowal's Q or jQuery's Deferred - * implementations, and the other which resembles ES6 promises to some degree. + * implementations, and the other which resembles ES6 (ES2015) promises to some degree. * * # $q constructor * * The streamlined ES6 style promise is essentially just using $q as a constructor which takes a `resolver` - * function as the first argument. This is similar to the native Promise implementation from ES6 Harmony, + * function as the first argument. This is similar to the native Promise implementation from ES6, * see [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise). * - * While the constructor-style use is supported, not all of the supporting methods from ES6 Harmony promises are + * While the constructor-style use is supported, not all of the supporting methods from ES6 promises are * available yet. * * It can be used like so: @@ -18471,6 +18601,10 @@ function $SceProvider() { function $SnifferProvider() { this.$get = ['$window', '$document', function($window, $document) { var eventSupport = {}, + // Chrome Packaged Apps are not allowed to access `history.pushState`. They can be detected by + // the presence of `chrome.app.runtime` (see https://developer.chrome.com/apps/api_index) + isChromePackagedApp = $window.chrome && $window.chrome.app && $window.chrome.app.runtime, + hasHistoryPushState = !isChromePackagedApp && $window.history && $window.history.pushState, android = toInt((/android (\d+)/.exec(lowercase(($window.navigator || {}).userAgent)) || [])[1]), boxee = /Boxee/i.test(($window.navigator || {}).userAgent), @@ -18515,7 +18649,7 @@ function $SnifferProvider() { // so let's not use the history API also // We are purposefully using `!(android < 4)` to cover the case when `android` is undefined // jshint -W018 - history: !!($window.history && $window.history.pushState && !(android < 4) && !boxee), + history: !!(hasHistoryPushState && !(android < 4) && !boxee), // jshint +W018 hasEvent: function(event) { // IE9 implements 'input' event it's so fubared that we rather pretend that it doesn't have @@ -19797,7 +19931,7 @@ function formatNumber(number, pattern, groupSep, decimalSep, fractionSize) { // format the integer digits with grouping separators var groups = []; - if (digits.length > pattern.lgSize) { + if (digits.length >= pattern.lgSize) { groups.unshift(digits.splice(-pattern.lgSize).join('')); } while (digits.length > pattern.gSize) { @@ -22033,7 +22167,7 @@ var inputType = { }]);
- +
diff --git a/dist/docs/grunt-scripts/bootstrap-datepicker.js b/dist/docs/grunt-scripts/bootstrap-datepicker.js index 474a6665c..e9512b8b2 100644 --- a/dist/docs/grunt-scripts/bootstrap-datepicker.js +++ b/dist/docs/grunt-scripts/bootstrap-datepicker.js @@ -1,5 +1,5 @@ /*! - * Datepicker for Bootstrap v1.4.0 (https://github.com/eternicode/bootstrap-datepicker) + * Datepicker for Bootstrap v1.4.1 (https://github.com/eternicode/bootstrap-datepicker) * * Copyright 2012 Stefan Petre * Improvements by Andrew Rowls @@ -1758,7 +1758,7 @@ /* DATEPICKER VERSION * =================== */ - $.fn.datepicker.version = "1.4.0"; + $.fn.datepicker.version = "1.4.1"; /* DATEPICKER DATA-API * ================== */ diff --git a/dist/docs/js/docs-setup.js b/dist/docs/js/docs-setup.js index 4db038972..e6b1d9e79 100644 --- a/dist/docs/js/docs-setup.js +++ b/dist/docs/js/docs-setup.js @@ -57,6 +57,15 @@ NG_DOCS={ "shortDescription": "Directive for rendering a heatmap chart.", "keywords": "$scope angular api block block-padding blockpadding blocks call ce0000 chart chart-data-available chart-title chartctrl chartdataavailable charts charttitle checkbox checkbox-inline class click-action clickaction clicked col-md-3 col-md-5 colors console controller correspond d4f0fa data dataavailable default defaults directive displayed ec7a08 example-heatmap-container f00 f9d67a flag form form-group function heapmap heatmap heatmap-color-pattern heatmapcolorpattern height hightest hover html js kubernetes labels legend legend-labels legendlabels legends list-style-type log m8y max-block-size maxblocksize maximum measurement message module ng-controller ng-model node openshift overriding padding patternfly pf-heatmap pixels provider range rendering role row script show-legend showlegend showlegends size style threshold thresholds title titlealt tooltip total true type units utilization values var" }, + { + "section": "api", + "id": "patternfly.charts.directive:pfLineChart", + "shortName": "pfLineChart", + "type": "directive", + "moduleName": "patternfly.charts", + "shortDescription": "Directive for rendering a line chart.", + "keywords": "$scope adddatapoint angular api area array arrays axis bind blue c3 chart chart-data chartctrl chartdata chartid charts checkbox checkbox-inline class col-md-12 col-md-3 col-md-6 color colorpalette config configuration container contents controller created custareachart custshowxaxis custshowyaxis d-- data dates default deleted directive display element elements exampleline exist false form form-group full function functions gb generation gettime green grid html http js label legend length list list-style-type markup mhz module ng-click ng-controller ng-model optional options org override overrides patternfly pf-line-chart pfutils point points properties push random rendering return role round row script second set-area-chart setareachart setting settings show-x-axis show-y-axis showing showxaxis showyaxis size style today tooltip tooltipfn tooltiptype type unit units values var width xdata ydata ydata0 ydata1" + }, { "section": "api", "id": "patternfly.charts.directive:pfSparklineChart", diff --git a/dist/docs/partials/api/patternfly.autofocus.pfFocused.html b/dist/docs/partials/api/patternfly.autofocus.pfFocused.html index 49a4aec89..391f681e4 100644 --- a/dist/docs/partials/api/patternfly.autofocus.pfFocused.html +++ b/dist/docs/partials/api/patternfly.autofocus.pfFocused.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfFocused + Improve this doc View source

pfFocused
directive in module patternfly
diff --git a/dist/docs/partials/api/patternfly.card.directive.pfAggregateStatusCard.html b/dist/docs/partials/api/patternfly.card.directive.pfAggregateStatusCard.html index 29ae8eda4..a27cd43d5 100644 --- a/dist/docs/partials/api/patternfly.card.directive.pfAggregateStatusCard.html +++ b/dist/docs/partials/api/patternfly.card.directive.pfAggregateStatusCard.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfAggregateStatusCard + Improve this doc View source

pfAggregateStatusCard
directive in module patternfly.card
diff --git a/dist/docs/partials/api/patternfly.card.directive.pfCard.html b/dist/docs/partials/api/patternfly.card.directive.pfCard.html index 886ada012..c53c2b348 100644 --- a/dist/docs/partials/api/patternfly.card.directive.pfCard.html +++ b/dist/docs/partials/api/patternfly.card.directive.pfCard.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfCard + Improve this doc View source

pfCard
directive in module patternfly.card
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfC3Chart.html b/dist/docs/partials/api/patternfly.charts.directive.pfC3Chart.html index 90fd9bf44..293cdd367 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfC3Chart.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfC3Chart.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfC3Chart + Improve this doc View source

pfC3Chart
directive in module patternfly.charts
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfDonutPctChart.html b/dist/docs/partials/api/patternfly.charts.directive.pfDonutPctChart.html index 0dd20f996..dafa5ec4a 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfDonutPctChart.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfDonutPctChart.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfDonutPctChart + Improve this doc View source

pfDonutPctChart
directive in module patternfly.charts
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfHeatMap.html b/dist/docs/partials/api/patternfly.charts.directive.pfHeatMap.html index a1e44ccd7..e514e822f 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfHeatMap.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfHeatMap.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfHeatMap + Improve this doc View source

pfHeatMap
directive in module patternfly.charts
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfSparklineChart.html b/dist/docs/partials/api/patternfly.charts.directive.pfSparklineChart.html index eb57d69a7..fdcc3733f 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfSparklineChart.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfSparklineChart.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfSparklineChart + Improve this doc View source

pfSparklineChart
directive in module patternfly.charts
@@ -47,10 +47,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfTrendsChart.html b/dist/docs/partials/api/patternfly.charts.directive.pfTrendsChart.html index 3af548f21..cb33f2c0a 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfTrendsChart.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfTrendsChart.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfTrendsChart + Improve this doc View source

pfTrendsChart
directive in module patternfly.charts
@@ -40,10 +40,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationBarChart.html b/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationBarChart.html index 6b97cceb0..d90924dc0 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationBarChart.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationBarChart.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfUtilizationBarChart + Improve this doc View source

pfUtilizationBarChart
directive in module patternfly.charts
@@ -49,10 +49,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationTrendChart.html b/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationTrendChart.html index 4b6090971..2669433a9 100644 --- a/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationTrendChart.html +++ b/dist/docs/partials/api/patternfly.charts.directive.pfUtilizationTrendChart.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfUtilizationTrendChart + Improve this doc View source

pfUtilizationTrendChart
directive in module patternfly.charts
@@ -49,10 +49,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.filters.directive.pfFilter.html b/dist/docs/partials/api/patternfly.filters.directive.pfFilter.html index e0a2accd2..5115f329b 100644 --- a/dist/docs/partials/api/patternfly.filters.directive.pfFilter.html +++ b/dist/docs/partials/api/patternfly.filters.directive.pfFilter.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfFilter + Improve this doc View source

pfFilter
directive in module patternfly.filters
@@ -28,10 +28,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.filters.directive.pfFilterFields.html b/dist/docs/partials/api/patternfly.filters.directive.pfFilterFields.html index 08c5711de..1e36f970e 100644 --- a/dist/docs/partials/api/patternfly.filters.directive.pfFilterFields.html +++ b/dist/docs/partials/api/patternfly.filters.directive.pfFilterFields.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfFilterFields + Improve this doc View source

pfFilterFields
directive in module patternfly.filters
diff --git a/dist/docs/partials/api/patternfly.filters.directive.pfFilterResults.html b/dist/docs/partials/api/patternfly.filters.directive.pfFilterResults.html index 87ce29bb9..928e4a2e6 100644 --- a/dist/docs/partials/api/patternfly.filters.directive.pfFilterResults.html +++ b/dist/docs/partials/api/patternfly.filters.directive.pfFilterResults.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfFilterResults + Improve this doc View source

pfFilterResults
directive in module patternfly.filters
diff --git a/dist/docs/partials/api/patternfly.form.directive.pfDatepicker.html b/dist/docs/partials/api/patternfly.form.directive.pfDatepicker.html index f5cb92139..7c07496a9 100644 --- a/dist/docs/partials/api/patternfly.form.directive.pfDatepicker.html +++ b/dist/docs/partials/api/patternfly.form.directive.pfDatepicker.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfDatepicker + Improve this doc View source

pfDatepicker
directive in module patternfly.form
@@ -17,10 +17,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.form.directive.pfFormButtons.html b/dist/docs/partials/api/patternfly.form.directive.pfFormButtons.html index 62dce9ca0..142207dcc 100644 --- a/dist/docs/partials/api/patternfly.form.directive.pfFormButtons.html +++ b/dist/docs/partials/api/patternfly.form.directive.pfFormButtons.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfFormButtons + Improve this doc View source

pfFormButtons
directive in module patternfly.form
@@ -23,10 +23,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.form.directive.pfFormGroup.html b/dist/docs/partials/api/patternfly.form.directive.pfFormGroup.html index ff1a85c82..d802b154a 100644 --- a/dist/docs/partials/api/patternfly.form.directive.pfFormGroup.html +++ b/dist/docs/partials/api/patternfly.form.directive.pfFormGroup.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfFormGroup + Improve this doc View source

pfFormGroup
directive in module patternfly.form
@@ -23,10 +23,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.form.directive.pfRemainingCharsCount.html b/dist/docs/partials/api/patternfly.form.directive.pfRemainingCharsCount.html index ab2c29d90..5dd71a595 100644 --- a/dist/docs/partials/api/patternfly.form.directive.pfRemainingCharsCount.html +++ b/dist/docs/partials/api/patternfly.form.directive.pfRemainingCharsCount.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfRemainingCharsCount + Improve this doc View source

pfRemainingCharsCount
directive in module patternfly.form
@@ -40,10 +40,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.notification.Notification.html b/dist/docs/partials/api/patternfly.notification.Notification.html index 3555413bc..3d7f9eace 100644 --- a/dist/docs/partials/api/patternfly.notification.Notification.html +++ b/dist/docs/partials/api/patternfly.notification.Notification.html @@ -1,4 +1,4 @@ - Improve this doc View source

Notification + Improve this doc View source

Notification
service in module patternfly.notification
@@ -29,10 +29,10 @@

Dependencies

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.notification.directive.pfInlineNotification.html b/dist/docs/partials/api/patternfly.notification.directive.pfInlineNotification.html index a45bbc23f..0f91ff411 100644 --- a/dist/docs/partials/api/patternfly.notification.directive.pfInlineNotification.html +++ b/dist/docs/partials/api/patternfly.notification.directive.pfInlineNotification.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfInlineNotification + Improve this doc View source

pfInlineNotification
directive in module patternfly.notification
@@ -24,10 +24,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.notification.directive.pfNotificationList.html b/dist/docs/partials/api/patternfly.notification.directive.pfNotificationList.html index e9d1179f2..1e4de40cf 100644 --- a/dist/docs/partials/api/patternfly.notification.directive.pfNotificationList.html +++ b/dist/docs/partials/api/patternfly.notification.directive.pfNotificationList.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfNotificationList + Improve this doc View source

pfNotificationList
directive in module patternfly.notification
@@ -12,10 +12,10 @@

Usage

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.select.pfSelect.html b/dist/docs/partials/api/patternfly.select.pfSelect.html index f24aed5d2..225e66d55 100644 --- a/dist/docs/partials/api/patternfly.select.pfSelect.html +++ b/dist/docs/partials/api/patternfly.select.pfSelect.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfSelect + Improve this doc View source

pfSelect
directive in module patternfly
@@ -19,10 +19,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.sort.directive.pfSort.html b/dist/docs/partials/api/patternfly.sort.directive.pfSort.html index c6fd578ea..c6c4baebd 100644 --- a/dist/docs/partials/api/patternfly.sort.directive.pfSort.html +++ b/dist/docs/partials/api/patternfly.sort.directive.pfSort.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfSort + Improve this doc View source

pfSort
directive in module patternfly.sort
@@ -26,10 +26,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.toolbars.directive.pfToolbar.html b/dist/docs/partials/api/patternfly.toolbars.directive.pfToolbar.html index 5a75b61b0..9cbf7960a 100644 --- a/dist/docs/partials/api/patternfly.toolbars.directive.pfToolbar.html +++ b/dist/docs/partials/api/patternfly.toolbars.directive.pfToolbar.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfToolbar + Improve this doc View source

pfToolbar
directive in module patternfly.toolbars
@@ -50,10 +50,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.utils.directive.pfTransclude.html b/dist/docs/partials/api/patternfly.utils.directive.pfTransclude.html index 1ae154a43..57f154413 100644 --- a/dist/docs/partials/api/patternfly.utils.directive.pfTransclude.html +++ b/dist/docs/partials/api/patternfly.utils.directive.pfTransclude.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfTransclude + Improve this doc View source

pfTransclude
directive in module patternfly.utils
@@ -20,10 +20,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.validation.pfValidation.html b/dist/docs/partials/api/patternfly.validation.pfValidation.html index cc9f6311e..9b65bd44f 100644 --- a/dist/docs/partials/api/patternfly.validation.pfValidation.html +++ b/dist/docs/partials/api/patternfly.validation.pfValidation.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfValidation + Improve this doc View source

pfValidation
directive in module patternfly
@@ -18,10 +18,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.views.directive.pfCardView.html b/dist/docs/partials/api/patternfly.views.directive.pfCardView.html index 9e1eb6d33..3fea3783e 100644 --- a/dist/docs/partials/api/patternfly.views.directive.pfCardView.html +++ b/dist/docs/partials/api/patternfly.views.directive.pfCardView.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfCardView + Improve this doc View source

pfCardView
directive in module patternfly.views
@@ -31,10 +31,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/dist/docs/partials/api/patternfly.views.directive.pfListView.html b/dist/docs/partials/api/patternfly.views.directive.pfListView.html index 548caca3c..2a5d863e4 100644 --- a/dist/docs/partials/api/patternfly.views.directive.pfListView.html +++ b/dist/docs/partials/api/patternfly.views.directive.pfListView.html @@ -1,4 +1,4 @@ - Improve this doc View source

pfListView + Improve this doc View source

pfListView
directive in module patternfly.views
@@ -50,10 +50,10 @@

Parameters

Example

Source

-
+
-

-
 
-

-
 

Demo

-
+
diff --git a/package.json b/package.json index 64273a6cb..6ea9a7a63 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "author": "Red Hat", "name": "angular-patternfly", - "version": "3.3.1", + "version": "3.3.2", "license": "Apache-2.0", "description": "Angular extension of the PatternFly project.", "homepage": "https://github.com/patternfly/angular-patternfly",