Skip to content

Commit 4f6489c

Browse files
Merge pull request #228 from patternfly/bump-v3.3.4
Bumped version number to 3.3.4.
2 parents 70ca227 + ce2bad5 commit 4f6489c

File tree

40 files changed

+495
-246
lines changed

40 files changed

+495
-246
lines changed

bower.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-patternfly",
3-
"version": "3.3.3",
3+
"version": "3.3.4",
44
"authors": [
55
"Red Hat"
66
],
@@ -39,7 +39,7 @@
3939
"angular-sanitize": "1.3.0 - 1.5.*",
4040
"angular-bootstrap": "0.13.x",
4141
"lodash": "3.x",
42-
"patternfly": "~3.3.3"
42+
"patternfly": "~3.3.4"
4343
},
4444
"devDependencies": {
4545
"angular-mocks": "1.3.0 - 1.5.*"

dist/docs/css/angular-patternfly.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
padding: 0 20px 0;
3232
}
3333

34+
.card-pf-icon-image {
35+
height: 18px;
36+
margin: 0 5px 5px;
37+
}
38+
3439
.empty-chart-content {
3540
text-align: center;
3641
}

dist/docs/css/patternfly-additions.css

Lines changed: 0 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/docs/grunt-scripts/angular-animate.js

Lines changed: 52 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* @license AngularJS v1.5.3
2+
* @license AngularJS v1.5.5
33
* (c) 2010-2016 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
6-
(function(window, angular, undefined) {'use strict';
6+
(function(window, angular) {'use strict';
77

88
/* jshint ignore:start */
99
var noop = angular.noop;
@@ -2317,7 +2317,7 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
23172317
}
23182318

23192319
// IE9-11 has no method "contains" in SVG element and in Node.prototype. Bug #10259.
2320-
var contains = Node.prototype.contains || function(arg) {
2320+
var contains = window.Node.prototype.contains || function(arg) {
23212321
// jshint bitwise: false
23222322
return this === arg || !!(this.compareDocumentPosition(arg) & 16);
23232323
// jshint bitwise: true
@@ -2342,6 +2342,23 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
23422342
return matches;
23432343
}
23442344

2345+
function filterFromRegistry(list, matchContainer, matchCallback) {
2346+
var containerNode = extractElementNode(matchContainer);
2347+
return list.filter(function(entry) {
2348+
var isMatch = entry.node === containerNode &&
2349+
(!matchCallback || entry.callback === matchCallback);
2350+
return !isMatch;
2351+
});
2352+
}
2353+
2354+
function cleanupEventListeners(phase, element) {
2355+
if (phase === 'close' && !element[0].parentNode) {
2356+
// If the element is not attached to a parentNode, it has been removed by
2357+
// the domOperation, and we can safely remove the event callbacks
2358+
$animate.off(element);
2359+
}
2360+
}
2361+
23452362
var $animate = {
23462363
on: function(event, container, callback) {
23472364
var node = extractElementNode(container);
@@ -2353,26 +2370,33 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
23532370

23542371
// Remove the callback when the element is removed from the DOM
23552372
jqLite(container).on('$destroy', function() {
2356-
$animate.off(event, container, callback);
2373+
var animationDetails = activeAnimationsLookup.get(node);
2374+
2375+
if (!animationDetails) {
2376+
// If there's an animation ongoing, the callback calling code will remove
2377+
// the event listeners. If we'd remove here, the callbacks would be removed
2378+
// before the animation ends
2379+
$animate.off(event, container, callback);
2380+
}
23572381
});
23582382
},
23592383

23602384
off: function(event, container, callback) {
2385+
if (arguments.length === 1 && !angular.isString(arguments[0])) {
2386+
container = arguments[0];
2387+
for (var eventType in callbackRegistry) {
2388+
callbackRegistry[eventType] = filterFromRegistry(callbackRegistry[eventType], container);
2389+
}
2390+
2391+
return;
2392+
}
2393+
23612394
var entries = callbackRegistry[event];
23622395
if (!entries) return;
23632396

23642397
callbackRegistry[event] = arguments.length === 1
23652398
? null
23662399
: filterFromRegistry(entries, container, callback);
2367-
2368-
function filterFromRegistry(list, matchContainer, matchCallback) {
2369-
var containerNode = extractElementNode(matchContainer);
2370-
return list.filter(function(entry) {
2371-
var isMatch = entry.node === containerNode &&
2372-
(!matchCallback || entry.callback === matchCallback);
2373-
return !isMatch;
2374-
});
2375-
}
23762400
},
23772401

23782402
pin: function(element, parentElement) {
@@ -2486,12 +2510,14 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
24862510

24872511
var isStructural = ['enter', 'move', 'leave'].indexOf(event) >= 0;
24882512

2513+
var documentHidden = $document[0].hidden;
2514+
24892515
// this is a hard disable of all animations for the application or on
24902516
// the element itself, therefore there is no need to continue further
24912517
// past this point if not enabled
24922518
// Animations are also disabled if the document is currently hidden (page is not visible
24932519
// to the user), because browsers slow down or do not flush calls to requestAnimationFrame
2494-
var skipAnimations = !animationsEnabled || $document[0].hidden || disabledElementsLookup.get(node);
2520+
var skipAnimations = !animationsEnabled || documentHidden || disabledElementsLookup.get(node);
24952521
var existingAnimation = (!skipAnimations && activeAnimationsLookup.get(node)) || {};
24962522
var hasExistingAnimation = !!existingAnimation.state;
24972523

@@ -2502,7 +2528,10 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
25022528
}
25032529

25042530
if (skipAnimations) {
2531+
// Callbacks should fire even if the document is hidden (regression fix for issue #14120)
2532+
if (documentHidden) notifyProgress(runner, event, 'start');
25052533
close();
2534+
if (documentHidden) notifyProgress(runner, event, 'close');
25062535
return runner;
25072536
}
25082537

@@ -2652,6 +2681,11 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
26522681
markElementAnimationState(element, RUNNING_STATE);
26532682
var realRunner = $$animation(element, event, animationDetails.options);
26542683

2684+
// this will update the runner's flow-control events based on
2685+
// the `realRunner` object.
2686+
runner.setHost(realRunner);
2687+
notifyProgress(runner, event, 'start', {});
2688+
26552689
realRunner.done(function(status) {
26562690
close(!status);
26572691
var animationDetails = activeAnimationsLookup.get(node);
@@ -2660,11 +2694,6 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
26602694
}
26612695
notifyProgress(runner, event, 'close', {});
26622696
});
2663-
2664-
// this will update the runner's flow-control events based on
2665-
// the `realRunner` object.
2666-
runner.setHost(realRunner);
2667-
notifyProgress(runner, event, 'start', {});
26682697
});
26692698

26702699
return runner;
@@ -2681,7 +2710,10 @@ var $$AnimateQueueProvider = ['$animateProvider', function($animateProvider) {
26812710
forEach(callbacks, function(callback) {
26822711
callback(element, phase, data);
26832712
});
2713+
cleanupEventListeners(phase, element);
26842714
});
2715+
} else {
2716+
cleanupEventListeners(phase, element);
26852717
}
26862718
});
26872719
runner.progress(event, phase, data);
@@ -3486,7 +3518,7 @@ var ngAnimateSwapDirective = ['$animate', '$rootScope', function($animate, $root
34863518
* <div ng-show="bool" class="fade">
34873519
* Show and hide me
34883520
* </div>
3489-
* <button ng-click="bool=true">Toggle</button>
3521+
* <button ng-click="bool=!bool">Toggle</button>
34903522
*
34913523
* <style>
34923524
* .fade.ng-hide {

dist/docs/grunt-scripts/angular-patternfly.js

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,11 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
157157
* <li>.count - the number count of the main statuses
158158
* <li>.href - the href to navigate to if one clicks on the title or count
159159
* <li>.iconClass - an icon to display to the left of the count
160+
* <li>.iconImage - an image to display to the left of the count
160161
* <li>.notifications - an array of status icons & counts
161162
* <ul style='list-style-type: none'>
162163
* <li>.iconClass - an icon to display to the right of the notification count
164+
* <li>.iconImage - an image to display to the left of the notification count
163165
* <li>.count - the number count of the notification status
164166
* <li>.href - href to navigate to if one clicks on the notification status icon or count
165167
* </ul>
@@ -170,6 +172,7 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
170172
* <li><strong>.notification</strong> - an <em>object</em> of containing a single notification icon & count
171173
* <ul style='list-style-type: none'>
172174
* <li>.iconClass - an icon to display to the right of the notification count
175+
* <li>.iconImage - an image to display to the left of the notification count
173176
* <li>.count - the number count of the notification status
174177
* <li>.href - href to navigate to if one clicks on the notification status icon or count
175178
* </ul>
@@ -237,12 +240,12 @@ angular.module('patternfly.autofocus', []).directive('pfFocused', ["$timeout", f
237240
"count":3,
238241
"notifications":[
239242
{
240-
"iconClass":"pficon pficon-openshift",
243+
"iconImage":"img/kubernetes.svg",
241244
"count":1,
242245
"href":"#"
243246
},
244247
{
245-
"iconClass":"pficon pficon-kubernetes",
248+
"iconImage":"img/OpenShift-logo.svg",
246249
"count":2,
247250
"href":"#"
248251
}
@@ -772,10 +775,12 @@ angular.module('patternfly.card').directive('pfCard', function () {
772775
var chart;
773776
//generate c3 chart data
774777
var chartData = scope.config;
775-
chartData.bindto = '#' + attrs.id;
776-
chart = c3.generate(chartData);
777-
if (scope.getChartCallback) {
778-
scope.getChartCallback(chart);
778+
if (chartData) {
779+
chartData.bindto = '#' + attrs.id;
780+
chart = c3.generate(chartData);
781+
if (scope.getChartCallback) {
782+
scope.getChartCallback(chart);
783+
}
779784
}
780785
});
781786
}, true);
@@ -1647,6 +1652,19 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", "$window
16471652
</div>
16481653
</div>
16491654
</div>
1655+
<div class="col-md-12">
1656+
<div class="row">
1657+
<div class="col-md-6">
1658+
<form role="form"">
1659+
<div class="form-group">
1660+
<label class="checkbox-inline">
1661+
<input type="checkbox" ng-model="data.dataAvailable">Data Available</input>
1662+
</label>
1663+
</div>
1664+
</form>
1665+
</div>
1666+
</div>
1667+
</div>
16501668
</div>
16511669
</file>
16521670
@@ -1667,6 +1685,7 @@ angular.module('patternfly.charts').directive('pfHeatmap', ["$compile", "$window
16671685
}
16681686
16691687
$scope.data = {
1688+
dataAvailable: true,
16701689
xData: dates,
16711690
yData0: ['Created', 12, 10,10, 62, 17, 10, 15, 13, 17, 10, 12, 10, 10, 12, 17, 16, 15, 13, 17, 10],
16721691
yData1: ['Deleted', 10, 17, 76,14, 10, 10, 10, 10, 10, 10, 10, 17, 17, 14, 10, 10, 10, 10, 10, 10]
@@ -3991,7 +4010,7 @@ angular.module('patternfly.select', []).directive('pfSelect', ["$timeout", funct
39914010
* <li>.title - (String) The title to display for the sort field
39924011
* <li>.sortType - (String) The sort type, 'alpha' or 'numeric'
39934012
* </ul>
3994-
* <li>.sortId - (Object) Id of the current sort field
4013+
* <li>.currentField - (Object) Currently selected field
39954014
* <li>.isAscending - (boolean) Current sort direction is ascending. True for ascending, False for descending
39964015
* <li>.onSortChange - ( function(sortId, sortDirection ) Function to call when the current sort params change
39974016
* </ul>
@@ -5870,7 +5889,7 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window
58705889
'use strict';
58715890

58725891
$templateCache.put('card/aggregate-status/aggregate-status-card.html',
5873-
"<div ng-if=!isMiniLayout class=\"card-pf card-pf-aggregate-status\" ng-class=\"{'card-pf-accented': shouldShowTopBorder, 'card-pf-aggregate-status-alt': isAltLayout}\"><h2 class=card-pf-title><a href={{status.href}} ng-if=status.href><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></a> <span ng-if=!status.href><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></span></h2><div class=card-pf-body><p class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification ng-repeat=\"notification in status.notifications\"><a href={{notification.href}} ng-if=notification.href><span class={{notification.iconClass}}></span>{{ notification.count }}</a> <span ng-if=!notification.href><span class={{notification.iconClass}}></span>{{ notification.count }}</span></span></p></div></div><div ng-if=isMiniLayout class=\"card-pf card-pf-aggregate-status card-pf-aggregate-status-mini\" ng-class=\"{'card-pf-accented': shouldShowTopBorder}\"><h2 class=card-pf-title><span ng-if=status.iconClass class={{status.iconClass}}></span> <a ng-if=status.href href={{status.href}}><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</a> <span ng-if=!status.href><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</span></h2><div class=card-pf-body><p ng-if=\"status.notification.iconClass || status.notification.count\" class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification><a ng-if=status.notification.href href={{status.notification.href}}><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></a> <span ng-if=!status.notification.href><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></span></span></p></div></div>"
5892+
"<div ng-if=!isMiniLayout class=\"card-pf card-pf-aggregate-status\" ng-class=\"{'card-pf-accented': shouldShowTopBorder, 'card-pf-aggregate-status-alt': isAltLayout}\"><h2 class=card-pf-title><a href={{status.href}} ng-if=status.href><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></a> <span ng-if=!status.href><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{status.iconClass}}></span> <span class=card-pf-aggregate-status-count>{{status.count}}</span> <span class=card-pf-aggregate-status-title>{{status.title}}</span></span></h2><div class=card-pf-body><p class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification ng-repeat=\"notification in status.notifications\"><a href={{notification.href}} ng-if=notification.href><image ng-if=notification.iconImage ng-src={{notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{notification.iconClass}}></span>{{ notification.count }}</a> <span ng-if=!notification.href><image ng-if=notification.iconImage ng-src={{notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span class={{notification.iconClass}}></span>{{ notification.count }}</span></span></p></div></div><div ng-if=isMiniLayout class=\"card-pf card-pf-aggregate-status card-pf-aggregate-status-mini\" ng-class=\"{'card-pf-accented': shouldShowTopBorder}\"><h2 class=card-pf-title><image ng-if=status.iconImage ng-src={{status.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.iconClass class={{status.iconClass}}></span> <a ng-if=status.href href={{status.href}}><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</a> <span ng-if=!status.href><span class=card-pf-aggregate-status-count>{{status.count}}</span> {{status.title}}</span></h2><div class=card-pf-body><p ng-if=\"status.notification.iconImage || status.notification.iconClass || status.notification.count\" class=card-pf-aggregate-status-notifications><span class=card-pf-aggregate-status-notification><a ng-if=status.notification.href href={{status.notification.href}}><image ng-if=status.notification.iconImage ng-src={{status.notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></a> <span ng-if=!status.notification.href><image ng-if=status.notification.iconImage ng-src={{status.notification.iconImage}} alt=\"\" class=card-pf-icon-image></image><span ng-if=status.notification.iconClass class={{status.notification.iconClass}}></span><span ng-if=status.notification.count>{{status.notification.count}}</span></span></span></p></div></div>"
58745893
);
58755894

58765895

@@ -5908,7 +5927,7 @@ angular.module('patternfly.views').directive('pfListView', ["$timeout", "$window
59085927

59095928

59105929
$templateCache.put('charts/line/line-chart.html',
5911-
"<span><div pf-c3-chart id={{lineChartId}} config=chartConfig></div></span>"
5930+
"<span><div pf-c3-chart id={{lineChartId}} ng-if=\"chartData.dataAvailable !== false\" config=chartConfig></div><div pf-empty-chart ng-if=\"chartData.dataAvailable === false\" chart-height=chartConfig.size.height></div></span>"
59125931
);
59135932

59145933

dist/docs/grunt-scripts/angular-sanitize.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* @license AngularJS v1.5.3
2+
* @license AngularJS v1.5.5
33
* (c) 2010-2016 Google, Inc. http://angularjs.org
44
* License: MIT
55
*/
6-
(function(window, angular, undefined) {'use strict';
6+
(function(window, angular) {'use strict';
77

88
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
99
* Any commits to this file should be reviewed with security in mind. *
@@ -349,7 +349,7 @@ function htmlParser(html, handler) {
349349
mXSSAttempts--;
350350

351351
// strip custom-namespaced attributes on IE<=11
352-
if (document.documentMode <= 11) {
352+
if (window.document.documentMode) {
353353
stripCustomNsAttrs(inertBodyElement);
354354
}
355355
html = inertBodyElement.innerHTML; //trigger mXSS
@@ -489,7 +489,7 @@ function htmlSanitizeWriter(buf, uriValidator) {
489489
* @param node Root element to process
490490
*/
491491
function stripCustomNsAttrs(node) {
492-
if (node.nodeType === Node.ELEMENT_NODE) {
492+
if (node.nodeType === window.Node.ELEMENT_NODE) {
493493
var attrs = node.attributes;
494494
for (var i = 0, l = attrs.length; i < l; i++) {
495495
var attrNode = attrs[i];

0 commit comments

Comments
 (0)