aboutsummaryrefslogtreecommitdiffstats
path: root/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial
diff options
context:
space:
mode:
authorseshukm <seshu.kumar.m@huawei.com>2017-03-06 10:23:16 +0530
committerseshukm <seshu.kumar.m@huawei.com>2017-03-06 10:23:16 +0530
commit663394f188c4460ad889b70a82557db0f9754032 (patch)
tree09d5bea2b0684b5752f5cd8f74e1f3f4ffaa740a /vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial
parent194d6e19da729265130123b6638e0f57589c9367 (diff)
thirdparty files updated for the vnf market place
IssueId : CLIENT-4 Change-Id: Id58c2d11985bda35dc482b122dc404aea2e477da Signed-off-by: seshukm <seshu.kumar.m@huawei.com>
Diffstat (limited to 'vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial')
-rw-r--r--vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.css154
-rw-r--r--vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.js575
-rw-r--r--vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.css6
-rw-r--r--vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.js7
4 files changed, 742 insertions, 0 deletions
diff --git a/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.css b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.css
new file mode 100644
index 00000000..9b3bf509
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.css
@@ -0,0 +1,154 @@
+/*!
+ * Angular Material Design
+ * https://github.com/angular/material
+ * @license MIT
+ * v1.1.3
+ */
+md-fab-speed-dial {
+ position: relative;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ z-index: 20;
+ /*
+ * Hide some graphics glitches if switching animation types
+ */
+ /*
+ * Handle the animations
+ */ }
+ md-fab-speed-dial.md-fab-bottom-right {
+ top: auto;
+ right: 20px;
+ bottom: 20px;
+ left: auto;
+ position: absolute; }
+ md-fab-speed-dial.md-fab-bottom-left {
+ top: auto;
+ right: auto;
+ bottom: 20px;
+ left: 20px;
+ position: absolute; }
+ md-fab-speed-dial.md-fab-top-right {
+ top: 20px;
+ right: 20px;
+ bottom: auto;
+ left: auto;
+ position: absolute; }
+ md-fab-speed-dial.md-fab-top-left {
+ top: 20px;
+ right: auto;
+ bottom: auto;
+ left: 20px;
+ position: absolute; }
+ md-fab-speed-dial:not(.md-hover-full) {
+ pointer-events: none; }
+ md-fab-speed-dial:not(.md-hover-full) md-fab-trigger, md-fab-speed-dial:not(.md-hover-full) .md-fab-action-item {
+ pointer-events: auto; }
+ md-fab-speed-dial:not(.md-hover-full).md-is-open {
+ pointer-events: auto; }
+ md-fab-speed-dial ._md-css-variables {
+ z-index: 20; }
+ md-fab-speed-dial.md-is-open .md-fab-action-item {
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center; }
+ md-fab-speed-dial md-fab-actions {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ height: auto; }
+ md-fab-speed-dial md-fab-actions .md-fab-action-item {
+ -webkit-transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
+ transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
+ md-fab-speed-dial.md-down {
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: column;
+ flex-direction: column; }
+ md-fab-speed-dial.md-down md-fab-trigger {
+ -webkit-box-ordinal-group: 2;
+ -webkit-order: 1;
+ order: 1; }
+ md-fab-speed-dial.md-down md-fab-actions {
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: column;
+ flex-direction: column;
+ -webkit-box-ordinal-group: 3;
+ -webkit-order: 2;
+ order: 2; }
+ md-fab-speed-dial.md-up {
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: column;
+ flex-direction: column; }
+ md-fab-speed-dial.md-up md-fab-trigger {
+ -webkit-box-ordinal-group: 3;
+ -webkit-order: 2;
+ order: 2; }
+ md-fab-speed-dial.md-up md-fab-actions {
+ -webkit-box-orient: vertical;
+ -webkit-box-direction: reverse;
+ -webkit-flex-direction: column-reverse;
+ flex-direction: column-reverse;
+ -webkit-box-ordinal-group: 2;
+ -webkit-order: 1;
+ order: 1; }
+ md-fab-speed-dial.md-left {
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: row;
+ flex-direction: row; }
+ md-fab-speed-dial.md-left md-fab-trigger {
+ -webkit-box-ordinal-group: 3;
+ -webkit-order: 2;
+ order: 2; }
+ md-fab-speed-dial.md-left md-fab-actions {
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: reverse;
+ -webkit-flex-direction: row-reverse;
+ flex-direction: row-reverse;
+ -webkit-box-ordinal-group: 2;
+ -webkit-order: 1;
+ order: 1; }
+ md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item {
+ -webkit-transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
+ transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
+ md-fab-speed-dial.md-right {
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: row;
+ flex-direction: row; }
+ md-fab-speed-dial.md-right md-fab-trigger {
+ -webkit-box-ordinal-group: 2;
+ -webkit-order: 1;
+ order: 1; }
+ md-fab-speed-dial.md-right md-fab-actions {
+ -webkit-box-orient: horizontal;
+ -webkit-box-direction: normal;
+ -webkit-flex-direction: row;
+ flex-direction: row;
+ -webkit-box-ordinal-group: 3;
+ -webkit-order: 2;
+ order: 2; }
+ md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item {
+ -webkit-transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
+ transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2); }
+ md-fab-speed-dial.md-fling-remove .md-fab-action-item > *, md-fab-speed-dial.md-scale-remove .md-fab-action-item > * {
+ visibility: hidden; }
+ md-fab-speed-dial.md-fling .md-fab-action-item {
+ opacity: 1; }
+ md-fab-speed-dial.md-fling.md-animations-waiting .md-fab-action-item {
+ opacity: 0;
+ -webkit-transition-duration: 0s;
+ transition-duration: 0s; }
+ md-fab-speed-dial.md-scale .md-fab-action-item {
+ -webkit-transform: scale(0);
+ transform: scale(0);
+ -webkit-transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
+ transition: all 0.3s cubic-bezier(0.55, 0, 0.55, 0.2);
+ -webkit-transition-duration: 0.14286s;
+ transition-duration: 0.14286s; }
diff --git a/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.js b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.js
new file mode 100644
index 00000000..4bda7c21
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.js
@@ -0,0 +1,575 @@
+/*!
+ * Angular Material Design
+ * https://github.com/angular/material
+ * @license MIT
+ * v1.1.3
+ */
+goog.provide('ngmaterial.components.fabShared');
+goog.require('ngmaterial.core');
+(function() {
+ 'use strict';
+
+ MdFabController['$inject'] = ["$scope", "$element", "$animate", "$mdUtil", "$mdConstant", "$timeout"];
+ angular.module('material.components.fabShared', ['material.core'])
+ .controller('MdFabController', MdFabController);
+
+ function MdFabController($scope, $element, $animate, $mdUtil, $mdConstant, $timeout) {
+ var vm = this;
+ var initialAnimationAttempts = 0;
+
+ // NOTE: We use async eval(s) below to avoid conflicts with any existing digest loops
+
+ vm.open = function() {
+ $scope.$evalAsync("vm.isOpen = true");
+ };
+
+ vm.close = function() {
+ // Async eval to avoid conflicts with existing digest loops
+ $scope.$evalAsync("vm.isOpen = false");
+
+ // Focus the trigger when the element closes so users can still tab to the next item
+ $element.find('md-fab-trigger')[0].focus();
+ };
+
+ // Toggle the open/close state when the trigger is clicked
+ vm.toggle = function() {
+ $scope.$evalAsync("vm.isOpen = !vm.isOpen");
+ };
+
+ /*
+ * Angular Lifecycle hook for newer Angular versions.
+ * Bindings are not guaranteed to have been assigned in the controller, but they are in the $onInit hook.
+ */
+ vm.$onInit = function() {
+ setupDefaults();
+ setupListeners();
+ setupWatchers();
+
+ fireInitialAnimations();
+ };
+
+ // For Angular 1.4 and older, where there are no lifecycle hooks but bindings are pre-assigned,
+ // manually call the $onInit hook.
+ if (angular.version.major === 1 && angular.version.minor <= 4) {
+ this.$onInit();
+ }
+
+ function setupDefaults() {
+ // Set the default direction to 'down' if none is specified
+ vm.direction = vm.direction || 'down';
+
+ // Set the default to be closed
+ vm.isOpen = vm.isOpen || false;
+
+ // Start the keyboard interaction at the first action
+ resetActionIndex();
+
+ // Add an animations waiting class so we know not to run
+ $element.addClass('md-animations-waiting');
+ }
+
+ function setupListeners() {
+ var eventTypes = [
+ 'click', 'focusin', 'focusout'
+ ];
+
+ // Add our listeners
+ angular.forEach(eventTypes, function(eventType) {
+ $element.on(eventType, parseEvents);
+ });
+
+ // Remove our listeners when destroyed
+ $scope.$on('$destroy', function() {
+ angular.forEach(eventTypes, function(eventType) {
+ $element.off(eventType, parseEvents);
+ });
+
+ // remove any attached keyboard handlers in case element is removed while
+ // speed dial is open
+ disableKeyboard();
+ });
+ }
+
+ var closeTimeout;
+ function parseEvents(event) {
+ // If the event is a click, just handle it
+ if (event.type == 'click') {
+ handleItemClick(event);
+ }
+
+ // If we focusout, set a timeout to close the element
+ if (event.type == 'focusout' && !closeTimeout) {
+ closeTimeout = $timeout(function() {
+ vm.close();
+ }, 100, false);
+ }
+
+ // If we see a focusin and there is a timeout about to run, cancel it so we stay open
+ if (event.type == 'focusin' && closeTimeout) {
+ $timeout.cancel(closeTimeout);
+ closeTimeout = null;
+ }
+ }
+
+ function resetActionIndex() {
+ vm.currentActionIndex = -1;
+ }
+
+ function setupWatchers() {
+ // Watch for changes to the direction and update classes/attributes
+ $scope.$watch('vm.direction', function(newDir, oldDir) {
+ // Add the appropriate classes so we can target the direction in the CSS
+ $animate.removeClass($element, 'md-' + oldDir);
+ $animate.addClass($element, 'md-' + newDir);
+
+ // Reset the action index since it may have changed
+ resetActionIndex();
+ });
+
+ var trigger, actions;
+
+ // Watch for changes to md-open
+ $scope.$watch('vm.isOpen', function(isOpen) {
+ // Reset the action index since it may have changed
+ resetActionIndex();
+
+ // We can't get the trigger/actions outside of the watch because the component hasn't been
+ // linked yet, so we wait until the first watch fires to cache them.
+ if (!trigger || !actions) {
+ trigger = getTriggerElement();
+ actions = getActionsElement();
+ }
+
+ if (isOpen) {
+ enableKeyboard();
+ } else {
+ disableKeyboard();
+ }
+
+ var toAdd = isOpen ? 'md-is-open' : '';
+ var toRemove = isOpen ? '' : 'md-is-open';
+
+ // Set the proper ARIA attributes
+ trigger.attr('aria-haspopup', true);
+ trigger.attr('aria-expanded', isOpen);
+ actions.attr('aria-hidden', !isOpen);
+
+ // Animate the CSS classes
+ $animate.setClass($element, toAdd, toRemove);
+ });
+ }
+
+ function fireInitialAnimations() {
+ // If the element is actually visible on the screen
+ if ($element[0].scrollHeight > 0) {
+ // Fire our animation
+ $animate.addClass($element, '_md-animations-ready').then(function() {
+ // Remove the waiting class
+ $element.removeClass('md-animations-waiting');
+ });
+ }
+
+ // Otherwise, try for up to 1 second before giving up
+ else if (initialAnimationAttempts < 10) {
+ $timeout(fireInitialAnimations, 100);
+
+ // Increment our counter
+ initialAnimationAttempts = initialAnimationAttempts + 1;
+ }
+ }
+
+ function enableKeyboard() {
+ $element.on('keydown', keyPressed);
+
+ // On the next tick, setup a check for outside clicks; we do this on the next tick to avoid
+ // clicks/touches that result in the isOpen attribute changing (e.g. a bound radio button)
+ $mdUtil.nextTick(function() {
+ angular.element(document).on('click touchend', checkForOutsideClick);
+ });
+
+ // TODO: On desktop, we should be able to reset the indexes so you cannot tab through, but
+ // this breaks accessibility, especially on mobile, since you have no arrow keys to press
+ //resetActionTabIndexes();
+ }
+
+ function disableKeyboard() {
+ $element.off('keydown', keyPressed);
+ angular.element(document).off('click touchend', checkForOutsideClick);
+ }
+
+ function checkForOutsideClick(event) {
+ if (event.target) {
+ var closestTrigger = $mdUtil.getClosest(event.target, 'md-fab-trigger');
+ var closestActions = $mdUtil.getClosest(event.target, 'md-fab-actions');
+
+ if (!closestTrigger && !closestActions) {
+ vm.close();
+ }
+ }
+ }
+
+ function keyPressed(event) {
+ switch (event.which) {
+ case $mdConstant.KEY_CODE.ESCAPE: vm.close(); event.preventDefault(); return false;
+ case $mdConstant.KEY_CODE.LEFT_ARROW: doKeyLeft(event); return false;
+ case $mdConstant.KEY_CODE.UP_ARROW: doKeyUp(event); return false;
+ case $mdConstant.KEY_CODE.RIGHT_ARROW: doKeyRight(event); return false;
+ case $mdConstant.KEY_CODE.DOWN_ARROW: doKeyDown(event); return false;
+ }
+ }
+
+ function doActionPrev(event) {
+ focusAction(event, -1);
+ }
+
+ function doActionNext(event) {
+ focusAction(event, 1);
+ }
+
+ function focusAction(event, direction) {
+ var actions = resetActionTabIndexes();
+
+ // Increment/decrement the counter with restrictions
+ vm.currentActionIndex = vm.currentActionIndex + direction;
+ vm.currentActionIndex = Math.min(actions.length - 1, vm.currentActionIndex);
+ vm.currentActionIndex = Math.max(0, vm.currentActionIndex);
+
+ // Focus the element
+ var focusElement = angular.element(actions[vm.currentActionIndex]).children()[0];
+ angular.element(focusElement).attr('tabindex', 0);
+ focusElement.focus();
+
+ // Make sure the event doesn't bubble and cause something else
+ event.preventDefault();
+ event.stopImmediatePropagation();
+ }
+
+ function resetActionTabIndexes() {
+ // Grab all of the actions
+ var actions = getActionsElement()[0].querySelectorAll('.md-fab-action-item');
+
+ // Disable all other actions for tabbing
+ angular.forEach(actions, function(action) {
+ angular.element(angular.element(action).children()[0]).attr('tabindex', -1);
+ });
+
+ return actions;
+ }
+
+ function doKeyLeft(event) {
+ if (vm.direction === 'left') {
+ doActionNext(event);
+ } else {
+ doActionPrev(event);
+ }
+ }
+
+ function doKeyUp(event) {
+ if (vm.direction === 'down') {
+ doActionPrev(event);
+ } else {
+ doActionNext(event);
+ }
+ }
+
+ function doKeyRight(event) {
+ if (vm.direction === 'left') {
+ doActionPrev(event);
+ } else {
+ doActionNext(event);
+ }
+ }
+
+ function doKeyDown(event) {
+ if (vm.direction === 'up') {
+ doActionPrev(event);
+ } else {
+ doActionNext(event);
+ }
+ }
+
+ function isTrigger(element) {
+ return $mdUtil.getClosest(element, 'md-fab-trigger');
+ }
+
+ function isAction(element) {
+ return $mdUtil.getClosest(element, 'md-fab-actions');
+ }
+
+ function handleItemClick(event) {
+ if (isTrigger(event.target)) {
+ vm.toggle();
+ }
+
+ if (isAction(event.target)) {
+ vm.close();
+ }
+ }
+
+ function getTriggerElement() {
+ return $element.find('md-fab-trigger');
+ }
+
+ function getActionsElement() {
+ return $element.find('md-fab-actions');
+ }
+ }
+})();
+
+(function() {
+ 'use strict';
+
+ /**
+ * The duration of the CSS animation in milliseconds.
+ *
+ * @type {number}
+ */
+ MdFabSpeedDialFlingAnimation['$inject'] = ["$timeout"];
+ MdFabSpeedDialScaleAnimation['$inject'] = ["$timeout"];
+ var cssAnimationDuration = 300;
+
+ /**
+ * @ngdoc module
+ * @name material.components.fabSpeedDial
+ */
+ angular
+ // Declare our module
+ .module('material.components.fabSpeedDial', [
+ 'material.core',
+ 'material.components.fabShared',
+ 'material.components.fabActions'
+ ])
+
+ // Register our directive
+ .directive('mdFabSpeedDial', MdFabSpeedDialDirective)
+
+ // Register our custom animations
+ .animation('.md-fling', MdFabSpeedDialFlingAnimation)
+ .animation('.md-scale', MdFabSpeedDialScaleAnimation)
+
+ // Register a service for each animation so that we can easily inject them into unit tests
+ .service('mdFabSpeedDialFlingAnimation', MdFabSpeedDialFlingAnimation)
+ .service('mdFabSpeedDialScaleAnimation', MdFabSpeedDialScaleAnimation);
+
+ /**
+ * @ngdoc directive
+ * @name mdFabSpeedDial
+ * @module material.components.fabSpeedDial
+ *
+ * @restrict E
+ *
+ * @description
+ * The `<md-fab-speed-dial>` directive is used to present a series of popup elements (usually
+ * `<md-button>`s) for quick access to common actions.
+ *
+ * There are currently two animations available by applying one of the following classes to
+ * the component:
+ *
+ * - `md-fling` - The speed dial items appear from underneath the trigger and move into their
+ * appropriate positions.
+ * - `md-scale` - The speed dial items appear in their proper places by scaling from 0% to 100%.
+ *
+ * You may also easily position the trigger by applying one one of the following classes to the
+ * `<md-fab-speed-dial>` element:
+ * - `md-fab-top-left`
+ * - `md-fab-top-right`
+ * - `md-fab-bottom-left`
+ * - `md-fab-bottom-right`
+ *
+ * These CSS classes use `position: absolute`, so you need to ensure that the container element
+ * also uses `position: absolute` or `position: relative` in order for them to work.
+ *
+ * Additionally, you may use the standard `ng-mouseenter` and `ng-mouseleave` directives to
+ * open or close the speed dial. However, if you wish to allow users to hover over the empty
+ * space where the actions will appear, you must also add the `md-hover-full` class to the speed
+ * dial element. Without this, the hover effect will only occur on top of the trigger.
+ *
+ * See the demos for more information.
+ *
+ * ## Troubleshooting
+ *
+ * If your speed dial shows the closing animation upon launch, you may need to use `ng-cloak` on
+ * the parent container to ensure that it is only visible once ready. We have plans to remove this
+ * necessity in the future.
+ *
+ * @usage
+ * <hljs lang="html">
+ * <md-fab-speed-dial md-direction="up" class="md-fling">
+ * <md-fab-trigger>
+ * <md-button aria-label="Add..."><md-icon md-svg-src="/img/icons/plus.svg"></md-icon></md-button>
+ * </md-fab-trigger>
+ *
+ * <md-fab-actions>
+ * <md-button aria-label="Add User">
+ * <md-icon md-svg-src="/img/icons/user.svg"></md-icon>
+ * </md-button>
+ *
+ * <md-button aria-label="Add Group">
+ * <md-icon md-svg-src="/img/icons/group.svg"></md-icon>
+ * </md-button>
+ * </md-fab-actions>
+ * </md-fab-speed-dial>
+ * </hljs>
+ *
+ * @param {string} md-direction From which direction you would like the speed dial to appear
+ * relative to the trigger element.
+ * @param {expression=} md-open Programmatically control whether or not the speed-dial is visible.
+ */
+ function MdFabSpeedDialDirective() {
+ return {
+ restrict: 'E',
+
+ scope: {
+ direction: '@?mdDirection',
+ isOpen: '=?mdOpen'
+ },
+
+ bindToController: true,
+ controller: 'MdFabController',
+ controllerAs: 'vm',
+
+ link: FabSpeedDialLink
+ };
+
+ function FabSpeedDialLink(scope, element) {
+ // Prepend an element to hold our CSS variables so we can use them in the animations below
+ element.prepend('<div class="_md-css-variables"></div>');
+ }
+ }
+
+ function MdFabSpeedDialFlingAnimation($timeout) {
+ function delayDone(done) { $timeout(done, cssAnimationDuration, false); }
+
+ function runAnimation(element) {
+ // Don't run if we are still waiting and we are not ready
+ if (element.hasClass('md-animations-waiting') && !element.hasClass('_md-animations-ready')) {
+ return;
+ }
+
+ var el = element[0];
+ var ctrl = element.controller('mdFabSpeedDial');
+ var items = el.querySelectorAll('.md-fab-action-item');
+
+ // Grab our trigger element
+ var triggerElement = el.querySelector('md-fab-trigger');
+
+ // Grab our element which stores CSS variables
+ var variablesElement = el.querySelector('._md-css-variables');
+
+ // Setup JS variables based on our CSS variables
+ var startZIndex = parseInt(window.getComputedStyle(variablesElement).zIndex);
+
+ // Always reset the items to their natural position/state
+ angular.forEach(items, function(item, index) {
+ var styles = item.style;
+
+ styles.transform = styles.webkitTransform = '';
+ styles.transitionDelay = '';
+ styles.opacity = 1;
+
+ // Make the items closest to the trigger have the highest z-index
+ styles.zIndex = (items.length - index) + startZIndex;
+ });
+
+ // Set the trigger to be above all of the actions so they disappear behind it.
+ triggerElement.style.zIndex = startZIndex + items.length + 1;
+
+ // If the control is closed, hide the items behind the trigger
+ if (!ctrl.isOpen) {
+ angular.forEach(items, function(item, index) {
+ var newPosition, axis;
+ var styles = item.style;
+
+ // Make sure to account for differences in the dimensions of the trigger verses the items
+ // so that we can properly center everything; this helps hide the item's shadows behind
+ // the trigger.
+ var triggerItemHeightOffset = (triggerElement.clientHeight - item.clientHeight) / 2;
+ var triggerItemWidthOffset = (triggerElement.clientWidth - item.clientWidth) / 2;
+
+ switch (ctrl.direction) {
+ case 'up':
+ newPosition = (item.scrollHeight * (index + 1) + triggerItemHeightOffset);
+ axis = 'Y';
+ break;
+ case 'down':
+ newPosition = -(item.scrollHeight * (index + 1) + triggerItemHeightOffset);
+ axis = 'Y';
+ break;
+ case 'left':
+ newPosition = (item.scrollWidth * (index + 1) + triggerItemWidthOffset);
+ axis = 'X';
+ break;
+ case 'right':
+ newPosition = -(item.scrollWidth * (index + 1) + triggerItemWidthOffset);
+ axis = 'X';
+ break;
+ }
+
+ var newTranslate = 'translate' + axis + '(' + newPosition + 'px)';
+
+ styles.transform = styles.webkitTransform = newTranslate;
+ });
+ }
+ }
+
+ return {
+ addClass: function(element, className, done) {
+ if (element.hasClass('md-fling')) {
+ runAnimation(element);
+ delayDone(done);
+ } else {
+ done();
+ }
+ },
+ removeClass: function(element, className, done) {
+ runAnimation(element);
+ delayDone(done);
+ }
+ };
+ }
+
+ function MdFabSpeedDialScaleAnimation($timeout) {
+ function delayDone(done) { $timeout(done, cssAnimationDuration, false); }
+
+ var delay = 65;
+
+ function runAnimation(element) {
+ var el = element[0];
+ var ctrl = element.controller('mdFabSpeedDial');
+ var items = el.querySelectorAll('.md-fab-action-item');
+
+ // Grab our element which stores CSS variables
+ var variablesElement = el.querySelector('._md-css-variables');
+
+ // Setup JS variables based on our CSS variables
+ var startZIndex = parseInt(window.getComputedStyle(variablesElement).zIndex);
+
+ // Always reset the items to their natural position/state
+ angular.forEach(items, function(item, index) {
+ var styles = item.style,
+ offsetDelay = index * delay;
+
+ styles.opacity = ctrl.isOpen ? 1 : 0;
+ styles.transform = styles.webkitTransform = ctrl.isOpen ? 'scale(1)' : 'scale(0)';
+ styles.transitionDelay = (ctrl.isOpen ? offsetDelay : (items.length - offsetDelay)) + 'ms';
+
+ // Make the items closest to the trigger have the highest z-index
+ styles.zIndex = (items.length - index) + startZIndex;
+ });
+ }
+
+ return {
+ addClass: function(element, className, done) {
+ runAnimation(element);
+ delayDone(done);
+ },
+
+ removeClass: function(element, className, done) {
+ runAnimation(element);
+ delayDone(done);
+ }
+ };
+ }
+})();
+
+ngmaterial.components.fabShared = angular.module("material.components.fabShared"); \ No newline at end of file
diff --git a/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.css b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.css
new file mode 100644
index 00000000..474c08bb
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.css
@@ -0,0 +1,6 @@
+/*!
+ * Angular Material Design
+ * https://github.com/angular/material
+ * @license MIT
+ * v1.1.2-master-a9ba340
+ */md-fab-speed-dial{position:relative;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-align:center;-webkit-align-items:center;align-items:center;z-index:20}md-fab-speed-dial.md-fab-bottom-right{top:auto;right:20px;bottom:20px;left:auto;position:absolute}md-fab-speed-dial.md-fab-bottom-left{top:auto;right:auto;bottom:20px;left:20px;position:absolute}md-fab-speed-dial.md-fab-top-right{top:20px;right:20px;bottom:auto;left:auto;position:absolute}md-fab-speed-dial.md-fab-top-left{top:20px;right:auto;bottom:auto;left:20px;position:absolute}md-fab-speed-dial:not(.md-hover-full){pointer-events:none}md-fab-speed-dial:not(.md-hover-full) .md-fab-action-item,md-fab-speed-dial:not(.md-hover-full).md-is-open,md-fab-speed-dial:not(.md-hover-full) md-fab-trigger{pointer-events:auto}md-fab-speed-dial ._md-css-variables{z-index:20}md-fab-speed-dial.md-is-open .md-fab-action-item{-webkit-box-align:center;-webkit-align-items:center;align-items:center}md-fab-speed-dial md-fab-actions{display:-webkit-box;display:-webkit-flex;display:flex;height:auto}md-fab-speed-dial md-fab-actions .md-fab-action-item{-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-down{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}md-fab-speed-dial.md-down md-fab-trigger{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}md-fab-speed-dial.md-down md-fab-actions{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-ordinal-group:3;-webkit-order:2;order:2}md-fab-speed-dial.md-up{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}md-fab-speed-dial.md-up md-fab-trigger{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}md-fab-speed-dial.md-up md-fab-actions{-webkit-box-orient:vertical;-webkit-box-direction:reverse;-webkit-flex-direction:column-reverse;flex-direction:column-reverse;-webkit-box-ordinal-group:2;-webkit-order:1;order:1}md-fab-speed-dial.md-left{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}md-fab-speed-dial.md-left md-fab-trigger{-webkit-box-ordinal-group:3;-webkit-order:2;order:2}md-fab-speed-dial.md-left md-fab-actions{-webkit-box-orient:horizontal;-webkit-box-direction:reverse;-webkit-flex-direction:row-reverse;flex-direction:row-reverse;-webkit-box-ordinal-group:2;-webkit-order:1;order:1}md-fab-speed-dial.md-left md-fab-actions .md-fab-action-item{-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-right{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row}md-fab-speed-dial.md-right md-fab-trigger{-webkit-box-ordinal-group:2;-webkit-order:1;order:1}md-fab-speed-dial.md-right md-fab-actions{-webkit-box-orient:horizontal;-webkit-box-direction:normal;-webkit-flex-direction:row;flex-direction:row;-webkit-box-ordinal-group:3;-webkit-order:2;order:2}md-fab-speed-dial.md-right md-fab-actions .md-fab-action-item{-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2)}md-fab-speed-dial.md-fling-remove .md-fab-action-item>*,md-fab-speed-dial.md-scale-remove .md-fab-action-item>*{visibility:hidden}md-fab-speed-dial.md-fling .md-fab-action-item{opacity:1}md-fab-speed-dial.md-fling.md-animations-waiting .md-fab-action-item{opacity:0;-webkit-transition-duration:0s;transition-duration:0s}md-fab-speed-dial.md-scale .md-fab-action-item{-webkit-transform:scale(0);transform:scale(0);-webkit-transition:all .3s cubic-bezier(.55,0,.55,.2);transition:all .3s cubic-bezier(.55,0,.55,.2);-webkit-transition-duration:.14286s;transition-duration:.14286s} \ No newline at end of file
diff --git a/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.js b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.js
new file mode 100644
index 00000000..e56d65ae
--- /dev/null
+++ b/vnfmarket/common/thirdparty/angular-material/modules/closure/fabSpeedDial/fabSpeedDial.min.js
@@ -0,0 +1,7 @@
+/*!
+ * Angular Material Design
+ * https://github.com/angular/material
+ * @license MIT
+ * v1.1.2-master-a9ba340
+ */
+goog.provide("ngmaterial.components.fabShared"),goog.require("ngmaterial.core"),function(){"use strict";function n(n,e,t,a,i,o){function r(){D.direction=D.direction||"down",D.isOpen=D.isOpen||!1,s(),e.addClass("md-animations-waiting")}function c(){var t=["click","focusin","focusout"];angular.forEach(t,function(n){e.on(n,l)}),n.$on("$destroy",function(){angular.forEach(t,function(n){e.off(n,l)}),m()})}function l(n){"click"==n.type&&$(n),"focusout"!=n.type||_||(_=o(function(){D.close()},100,!1)),"focusin"==n.type&&_&&(o.cancel(_),_=null)}function s(){D.currentActionIndex=-1}function u(){n.$watch("vm.direction",function(n,a){t.removeClass(e,"md-"+a),t.addClass(e,"md-"+n),s()});var a,i;n.$watch("vm.isOpen",function(n){s(),a&&i||(a=x(),i=I()),n?f():m();var o=n?"md-is-open":"",r=n?"":"md-is-open";a.attr("aria-haspopup",!0),a.attr("aria-expanded",n),i.attr("aria-hidden",!n),t.setClass(e,o,r)})}function d(){e[0].scrollHeight>0?t.addClass(e,"_md-animations-ready").then(function(){e.removeClass("md-animations-waiting")}):k<10&&(o(d,100),k+=1)}function f(){e.on("keydown",p),a.nextTick(function(){angular.element(document).on("click touchend",g)})}function m(){e.off("keydown",p),angular.element(document).off("click touchend",g)}function g(n){if(n.target){var e=a.getClosest(n.target,"md-fab-trigger"),t=a.getClosest(n.target,"md-fab-actions");e||t||D.close()}}function p(n){switch(n.which){case i.KEY_CODE.ESCAPE:return D.close(),n.preventDefault(),!1;case i.KEY_CODE.LEFT_ARROW:return y(n),!1;case i.KEY_CODE.UP_ARROW:return A(n),!1;case i.KEY_CODE.RIGHT_ARROW:return O(n),!1;case i.KEY_CODE.DOWN_ARROW:return S(n),!1}}function h(n){b(n,-1)}function v(n){b(n,1)}function b(n,e){var t=C();D.currentActionIndex=D.currentActionIndex+e,D.currentActionIndex=Math.min(t.length-1,D.currentActionIndex),D.currentActionIndex=Math.max(0,D.currentActionIndex);var a=angular.element(t[D.currentActionIndex]).children()[0];angular.element(a).attr("tabindex",0),a.focus(),n.preventDefault(),n.stopImmediatePropagation()}function C(){var n=I()[0].querySelectorAll(".md-fab-action-item");return angular.forEach(n,function(n){angular.element(angular.element(n).children()[0]).attr("tabindex",-1)}),n}function y(n){"left"===D.direction?v(n):h(n)}function A(n){"down"===D.direction?h(n):v(n)}function O(n){"left"===D.direction?h(n):v(n)}function S(n){"up"===D.direction?h(n):v(n)}function w(n){return a.getClosest(n,"md-fab-trigger")}function E(n){return a.getClosest(n,"md-fab-actions")}function $(n){w(n.target)&&D.toggle(),E(n.target)&&D.close()}function x(){return e.find("md-fab-trigger")}function I(){return e.find("md-fab-actions")}var D=this,k=0;D.open=function(){n.$evalAsync("vm.isOpen = true")},D.close=function(){n.$evalAsync("vm.isOpen = false"),e.find("md-fab-trigger")[0].focus()},D.toggle=function(){n.$evalAsync("vm.isOpen = !vm.isOpen")},D.$onInit=function(){r(),c(),u(),d()},1===angular.version.major&&angular.version.minor<=4&&this.$onInit();var _}n.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"],angular.module("material.components.fabShared",["material.core"]).controller("MdFabController",n)}(),function(){"use strict";function n(){function n(n,e){e.prepend('<div class="_md-css-variables"></div>')}return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:n}}function e(n){function e(e){n(e,a,!1)}function t(n){if(!n.hasClass("md-animations-waiting")||n.hasClass("_md-animations-ready")){var e=n[0],t=n.controller("mdFabSpeedDial"),a=e.querySelectorAll(".md-fab-action-item"),i=e.querySelector("md-fab-trigger"),o=e.querySelector("._md-css-variables"),r=parseInt(window.getComputedStyle(o).zIndex);angular.forEach(a,function(n,e){var t=n.style;t.transform=t.webkitTransform="",t.transitionDelay="",t.opacity=1,t.zIndex=a.length-e+r}),i.style.zIndex=r+a.length+1,t.isOpen||angular.forEach(a,function(n,e){var a,o,r=n.style,c=(i.clientHeight-n.clientHeight)/2,l=(i.clientWidth-n.clientWidth)/2;switch(t.direction){case"up":a=n.scrollHeight*(e+1)+c,o="Y";break;case"down":a=-(n.scrollHeight*(e+1)+c),o="Y";break;case"left":a=n.scrollWidth*(e+1)+l,o="X";break;case"right":a=-(n.scrollWidth*(e+1)+l),o="X"}var s="translate"+o+"("+a+"px)";r.transform=r.webkitTransform=s})}}return{addClass:function(n,a,i){n.hasClass("md-fling")?(t(n),e(i)):i()},removeClass:function(n,a,i){t(n),e(i)}}}function t(n){function e(e){n(e,a,!1)}function t(n){var e=n[0],t=n.controller("mdFabSpeedDial"),a=e.querySelectorAll(".md-fab-action-item"),o=e.querySelector("._md-css-variables"),r=parseInt(window.getComputedStyle(o).zIndex);angular.forEach(a,function(n,e){var o=n.style,c=e*i;o.opacity=t.isOpen?1:0,o.transform=o.webkitTransform=t.isOpen?"scale(1)":"scale(0)",o.transitionDelay=(t.isOpen?c:a.length-c)+"ms",o.zIndex=a.length-e+r})}var i=65;return{addClass:function(n,a,i){t(n),e(i)},removeClass:function(n,a,i){t(n),e(i)}}}e.$inject=["$timeout"],t.$inject=["$timeout"];var a=300;angular.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",n).animation(".md-fling",e).animation(".md-scale",t).service("mdFabSpeedDialFlingAnimation",e).service("mdFabSpeedDialScaleAnimation",t)}(),ngmaterial.components.fabShared=angular.module("material.components.fabShared"); \ No newline at end of file