sp-dev-fx-webparts/samples/angular-migration/angular-todo/node_modules/ng-office-ui-fabric/ngOfficeUiFabric.min.js

12 lines
152 KiB
JavaScript
Raw Normal View History

/*!
* ngOfficeUIFabric
* http://ngofficeuifabric.com
* Angular 1.x directives for Microsoft's Office UI Fabric
* https://angularjs.org & https://dev.office.com/fabric
* v0.11.0
*/
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("angular"));else if("function"==typeof define&&define.amd)define(["angular"],t);else{var i=t("object"==typeof exports?require("angular"):e.angular);for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(this,function(e){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t,i){i(1),e.exports=i(3)},function(e,t,i){"use strict";var n=i(2);t.module=n.module("officeuifabric.core",[])},function(t,i){t.exports=e},function(e,t,i){"use strict";var n=i(2),r=i(4),o=i(5),s=i(8),a=i(11),c=i(13),l=i(14),u=i(15),d=i(16),f=i(17),p=i(19),m=i(20),h=i(22),v=i(23),g=i(24),y=i(28),b=i(29),P=i(31),C=i(32),k=i(34),$=i(36),T=i(41),S=i(44),w=i(47),E=i(48),I=i(49),x=i(51),M=i(54),D=i(56),B=i(57),O=i(61);t.module=n.module("officeuifabric.components",[r.module.name,o.module.name,s.module.name,a.module.name,c.module.name,l.module.name,u.module.name,d.module.name,f.module.name,p.module.name,m.module.name,h.module.name,v.module.name,g.module.name,y.module.name,b.module.name,P.module.name,C.module.name,k.module.name,O.module.name,$.module.name,T.module.name,S.module.name,w.module.name,E.module.name,I.module.name,x.module.name,M.module.name,D.module.name,B.module.name])},function(e,t,i){"use strict";var n=i(2),r=function(){function e(){this.restrict="E",this.require="^uifBreadcrumb",this.transclude=!0,this.replace=!0,this.template='<li class="ms-Breadcrumb-listItem"><a class="ms-Breadcrumb-itemLink" ng-href="{{ngHref}}" tabindex="{{uifTabindex}}" ng-transclude></a><i class="ms-Breadcrumb-chevron ms-Icon ms-Icon--chevronRight"></i></li>',this.scope={ngHref:"@"}}return e.factory=function(){var t=function(){return new e};return t},e.prototype.link=function(e,t,i,n,r){var o=Array.prototype.indexOf.call(t.parent().children(),t[0])+2;e.uifTabindex=o},e}();t.BreadcrumbLinkDirective=r;var o=function(){function e(e,t){this.href=e,this.linkText=t}return e}();t.BreadcrumbLink=o;var s=function(){function e(t,i,r){this.$scope=t,this.$document=i,this.$window=r;var o=n.element(r);t.visibleElements=4,t.overflowMenuOpen=!1,t.isOverflow=function(){var e=!1;return e=n.isDefined(t.uifBreadcrumbLinks)&&t.uifBreadcrumbLinks.length>t.visibleElements},t.overflowElements=function(){return t.isOverflow()?t.uifBreadcrumbLinks.length-t.visibleElements:0},t.openOverflow=function(e){e.stopPropagation(),t.overflowMenuOpen=!0},i.find("html").on("click",function(e){t.overflowMenuOpen=!1,t.$apply()}),o.on("resize",function(){var i=r.innerWidth,n=i>e._breakingWidth?4:2;n!==t.visibleElements&&(t.visibleElements=n,t.$apply())})}return e.$inject=["$scope","$document","$window"],e._breakingWidth=639,e}();t.BreadcrumbController=s;var a=function(){function e(){this.restrict="E",this.replace=!0,this.template='<div class="ms-Breadcrumb" ng-class="{\'is-overflow\': isOverflow()}"><div class="ms-Breadcrumb-overflow"><div class="ms-Breadcrumb-overflowButton ms-Icon ms-Icon--ellipsis" ng-click="openOverflow($event)" tabindex="1"></div><i class="ms-Breadcrumb-chevron ms-Icon ms-Icon--chevronRight"></i><div class="ms-Breadcrumb-overflowMenu" ng-class="{\'is-open\': overflowMenuOpen}"><ul class="ms-ContextualMenu is-open"><li class="ms-ContextualMenu-item" ng-repeat="link in uifBreadcrumbLinks | limitTo:overflowElements()"><a class="ms-ContextualMenu-link" ng-href="{{link.href}}">{{link.linkText}}</a></li></ul></div></div><ul class="ms-Breadcrumb-list"><uif-breadcrumb-link ng-repeat="link in uifBreadcrumbLinks | limitTo:-visibleElements" ng-href="{{link.href}}">{{link.linkText}}</uif-breadcrumb-link></ul></div>',this.controller=s,this.require="uifBreadcrumb",this.scope={uifBreadcrumbLinks:"="}}return e.factory=function(){var t=function(){return new e};return t},e}();t.BreadcrumbDirective=a,t.module=n.module("officeuifabric.components.breadcrumb",["officeuifabric.components"]).directive("uifBreadcrumb",a.factory()).directive("uifBreadcrumbLin
}},e.prototype.hasItemContent=function(e){for(var t=0;t<e.length;t++){var i=angular.element(e[t]);if(i.hasClass("uif-content"))return!0}return!1},e.directiveName="uifContextualMenuItem",e}();t.ContextualMenuItemDirective=o;var s=function(){function e(e,t){this.$scope=e,this.$element=t}return e.prototype.setChildMenu=function(e){this.$scope.hasChildMenu=!0,this.$scope.childMenuCtrl=e},e.$inject=["$scope","$element"],e}();t.ContextualMenuItemController=s;var a=function(){function e(){this.restrict="E",this.require=e.directiveName,this.transclude=!0,this.template='<ul class="ms-ContextualMenu" ng-transclude></ul>',this.replace=!0,this.controller=c,this.scope={closeOnClick:"@uifCloseOnClick",isOpen:"=?uifIsOpen",multiselect:"@uifMultiselect"}}return e.factory=function(){var t=function(){return new e};return t},e.prototype.link=function(e,t,i,n){var s=function(t){r.isUndefined(t)?e.closeOnClick=!0:e.closeOnClick="true"===t.toString().toLowerCase()};s(e.closeOnClick),i.$observe("uifCloseOnClick",s);var a=t.controller(o.directiveName);r.isUndefined(a)||a.setChildMenu(n),r.isUndefined(e.multiselect)||"true"!==e.multiselect.toLowerCase()||t.addClass("ms-ContextualMenu--multiselect")},e.directiveName="uifContextualMenu",e}();t.ContextualMenuDirective=a;var c=function(){function e(e,t,i,n){var s=this;this.$scope=e,this.$animate=t,this.$element=i,this.$log=n,this.onRootMenuClosed=[],this.isOpenClassName="is-open",r.isUndefined(i.controller(o.directiveName))&&(e.isRootMenu=!0),e.$watch("isOpen",function(e){"boolean"!=typeof e&&void 0!==e&&s.$log.error("Error [ngOfficeUiFabric] officeuifabric.components.contextualmenu - invalid attribute type: 'uif-is-open'.\nThe type '"+typeof e+"' is not supported as valid type for 'uif-is-open' attribute for <uif-contextual-menu />. The valid type is boolean."),t[e?"addClass":"removeClass"](i,s.isOpenClassName)}),this.onRootMenuClosed.push(function(){s.closeMenu(),s.deselectItems(!0)}),e.$on("uif-menu-close",function(){e.isRootMenu&&e.closeOnClick&&s.onRootMenuClosed.forEach(function(e){e()})})}return e.prototype.deselectItems=function(e){this.$scope.$broadcast("uif-menu-deselect"),e&&this.$scope.$emit("uif-menu-deselect")},e.prototype.closeSubMenus=function(e,t){this.$scope.$broadcast("uif-menu-close",e),t&&this.$scope.$emit("uif-menu-close")},e.prototype.openMenu=function(){this.$scope.isOpen=!0},e.prototype.closeMenu=function(){this.$scope.isOpen=!1},e.prototype.isRootMenu=function(){return this.$scope.isRootMenu},e.prototype.isMultiSelectionMenu=function(){return r.isUndefined(this.$scope.multiselect)?!1:"true"===this.$scope.multiselect.toLowerCase()},e.prototype.isMenuOpened=function(){return this.$element.hasClass("is-open")},e.$inject=["$scope","$animate","$element","$log"],e}();t.ContextualMenuController=c,t.module=r.module("officeuifabric.components.contextualmenu",["officeuifabric.components"]).directive(a.directiveName,a.factory()).directive(o.directiveName,o.factory())},function(e,t,i){"use strict";var n=i(2),r=function(){function e(e,t){this.$scope=t,this.isPickingYears=!1,this.isPickingMonths=!1,this.jElement=$(e[0]),t.ctrl=this}return e.prototype.range=function(e,t,i){i=i||1;for(var n=[],r=e;t>=r;r+=i)n.push(r);return n},e.prototype.getPicker=function(){return this.jElement.find(".ms-TextField-field").pickadate("picker")},e.prototype.setValue=function(e){this.getPicker().set("select",e),this.changeHighlightedDate(e.getFullYear(),e.getMonth(),e.getDate())},e.prototype.initDatepicker=function(e){var t=this;this.jElement.find(".ms-TextField-field").pickadate({clear:"",close:"",klass:{active:"ms-DatePicker-input--active",box:"ms-DatePicker-dayPicker",day:"ms-DatePicker-day",disabled:"ms-DatePicker-day--disabled",focused:"ms-DatePicker-picker--focused",frame:"ms-DatePicker-frame",header:"ms-DatePicker-header",holder:"ms-DatePicker-holder",infocus:"ms-DatePicker-day--infocus",input:"ms-DatePicker-input",month:"ms-DatePicker-month",now:"ms-DatePicker-day--today",opened:"ms-DatePicker-picker--opened",outfocus:"ms-DatePicker-day--outfocus",picker:"ms-DatePicker-picker",selected:"ms-DatePicke
e.type){case o.ListItemTypeEnum.itemWithIcon:t.children().eq(0).addClass("ms-ListItem--document"),0===t.children().find("uif-list-item-icon").length&&n.$log.error("Error [ngOfficeUiFabric] officeuifabric.components.list. List item type itemWithIcon requires the uif-list-item-icon directive");break;case o.ListItemTypeEnum.itemWithImage:t.children().eq(0).addClass("ms-ListItem--image"),0===t.children().find("uif-list-item-image").length&&n.$log.error("Error [ngOfficeUiFabric] officeuifabric.components.list. List item type itemWithImage requires the uif-list-item-image directive")}if(void 0!==i.uifUnread&&null!==i.uifUnread){var c=i.uifUnread.toLowerCase();"true"!==c&&"false"!==c?n.$log.error("Error [ngOfficeUiFabric] officeuifabric.components.list. '"+i.uifUnread+"' is not a valid boolean value. Valid options are true|false."):"true"===c&&(e.unread=!0)}if(void 0!==i.uifUnseen&&null!==i.uifUnseen){var l=i.uifUnseen.toLowerCase();"true"!==l&&"false"!==l?n.$log.error("Error [ngOfficeUiFabric] officeuifabric.components.list. '"+i.uifUnseen+"' is not a valid boolean value. Valid options are true|false."):"true"===l&&(e.unseen=!0)}void 0!==e.item&&n.items.push(e),e.itemClick=function(t){e.selected=!e.selected,e.$apply()},e.$watch("selected",function(e,i,o){if(e===!0){if(n.itemSelectMode===r.ListItemSelectModeEnum[r.ListItemSelectModeEnum.single]&&(n.selectedItems.length=0,n.items))for(var s=0;s<n.items.length;s++)n.items[s]!==o&&(n.items[s].selected=!1);for(var a=!1,s=0;s<n.selectedItems.length;s++)if(n.selectedItems[s]===o.item){a=!0;break}a||n.selectedItems.push(o.item),t.children().eq(0).addClass("is-selected")}else{for(var s=0;s<n.selectedItems.length;s++)if(n.selectedItems[s]===o.item){n.selectedItems.splice(s,1);break}t.children().eq(0).removeClass("is-selected")}}),e.$watch("unread",function(e,i,n){e===!0?t.children().eq(0).addClass("is-unread"):t.children().eq(0).removeClass("is-unread")}),e.$watch("unseen",function(e,i,n){e===!0?t.children().eq(0).addClass("is-unseen"):t.children().eq(0).removeClass("is-unseen")}),n.itemSelectMode!==r.ListItemSelectModeEnum[r.ListItemSelectModeEnum.none]&&(t.on("click",e.itemClick),t.children().eq(0).addClass("is-selectable"))},e}();t.ListItemDirective=u;var d=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<span class="ms-ListItem-primaryText" ng-transclude></span>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemPrimaryTextDirective=d;var f=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<span class="ms-ListItem-secondaryText" ng-transclude></span>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemSecondaryTextDirective=f;var p=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<span class="ms-ListItem-tertiaryText" ng-transclude></span>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemTertiaryTextDirective=p;var m=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<span class="ms-ListItem-metaText" ng-transclude></span>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemMetaTextDirective=m;var h=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<div class="ms-ListItem-image" ng-transclude></div>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemImageDirective=h;var v=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<div class="ms-ListItem-itemIcon" ng-transclude></div>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemIconDirective=v;var g=function(){function e(){this.restrict="E",this.transclude=!0,this.template='<div class="ms-ListItem-selectionTarget" ng-transclude></div>',this.replace=!1}return e.factory=function(){var t=function(){return new e};return t},e}();t.ListItemSelectionTargetDirective=g;var y=function(){function
""):o.PlaceholderEnum[i.uifPlaceholder]===o.PlaceholderEnum.overflow?'<li class="ms-PersonaCard-overflow" ng-transclude></li>':'<li class="ms-PersonaCard-actionDetails" ng-transclude></li>'}}return e.factory=function(){var t=function(t){return new e(t)};return t.$inject=["$log"],t},e}();t.PersonaCardActionDirective=f;var p=function(){function e(){this.restrict="E",this.transclude=!0,this.replace=!0,this.scope=!1,this.template='<span class="ms-PersonaCard-detailLabel" ng-transclude></span>'}return e.factory=function(){var t=function(){return new e};return t},e}();t.PersonaCardDetailLabelDirective=p;var m=function(){function e(){this.restrict="E",this.transclude=!0,this.replace=!0,this.scope=!1,this.template='<div class="ms-PersonaCard-detailLine" ng-transclude></div>'}return e.factory=function(){var t=function(){return new e};return t},e}();t.PersonaCardDetailLineDirective=m,t.module=n.module("officeuifabric.components.personacard",["officeuifabric.components"]).directive("uifPersonaCard",c.factory()).directive("uifPersonaCardAction",f.factory()).directive("uifPersonaCardDetailLabel",p.factory()).directive("uifPersonaCardDetailLine",m.factory()).directive("uifPersonaCardPrimaryText",d.factory("primary")).directive("uifPersonaCardSecondaryText",d.factory("secondary")).directive("uifPersonaCardTertiaryText",d.factory("tertiary")).directive("uifPersonaCardOptionalText",d.factory(""))},function(e,t){"use strict";!function(e){e[e.xsmall=0]="xsmall",e[e.small=1]="small",e[e.medium=2]="medium",e[e.large=3]="large",e[e.xlarge=4]="xlarge"}(t.PersonaSize||(t.PersonaSize={}));t.PersonaSize},function(e,t){"use strict";!function(e){e[e.regular=0]="regular",e[e.topright=1]="topright",e[e.overflow=2]="overflow"}(t.PlaceholderEnum||(t.PlaceholderEnum={}));t.PlaceholderEnum},function(e,t){"use strict";!function(e){e[e.round=0]="round",e[e.square=1]="square"}(t.PersonaStyleEnum||(t.PersonaStyleEnum={}));t.PersonaStyleEnum},function(e,t){"use strict";!function(e){e[e.available=0]="available",e[e.away=1]="away",e[e.blocked=2]="blocked",e[e.busy=3]="busy",e[e.dnd=4]="dnd",e[e.offline=5]="offline"}(t.PresenceEnum||(t.PresenceEnum={}));t.PresenceEnum},function(e,t,i){"use strict";var n=i(2),r=i(39),o=i(40),s=i(42),a=i(43),c=function(){function e(e){var t=this;this.directiveType=e,this.restrict="E",this.transclude=!0,this.replace=!1,this.scope=!1,this.availableClasses={primary:"ms-Persona-primaryText",secondary:"ms-Persona-secondaryText",tertiary:"ms-Persona-tertiaryText",optional:"ms-Persona-optionalText"},this.template=function(e,i){var n='<div class="'+t.availableClasses[t.directiveType]+'" ng-transclude></div>';return n},n.isUndefined(this.availableClasses[this.directiveType])&&(this.directiveType="optional")}return e.factory=function(t){var i=function(){return new e(t)};return i},e}();t.PersonaTextDirective=c;var l=function(){function e(){this.restrict="E",this.transclude=!0,this.replace=!1,this.require=["^uifPersona"],this.scope={uifColor:"@"},this.template='<div class="ms-Persona-initials ms-Persona-initials--{{uifColor}}" ng-transclude></div> ',this.link=function(e,t,i,r){var o=r[0];n.isUndefined(i.uifColor)&&(e.uifColor=s.PersonaInitialsColor[s.PersonaInitialsColor.blue]),e.$watch("uifColor",function(e){n.isUndefined(s.PersonaInitialsColor[e])&&o.$log.error('Error [ngOfficeUiFabric] officeuifabric.components.persona - "'+e+'" is not a valid value for uifColor. It should be lightBlue, blue, darkBlue, teal, lightGreen, green, darkGreen, lightPink, pink, magenta, purple, black, orange, red or darkRed.')})}}return e.factory=function(){var t=function(){return new e};return t},e}();t.PersonaInitialsDirective=l;var u=function(){function e(){var e=this;this.restrict="E",this.transclude=!0,this.replace=!0,this.require=["uifPersona"],this.controller=d,this.scope={uifPresence:"@",uifSize:"@",uifImageUrl:"@"},this.template='<div class="ms-Persona" ng-class="getPersonaClasses()"><div class="ms-Persona-imageArea" ng-show="getImageAreaVisibility()"><img class="ms-Persona-image" ng-src="{{uifImageUrl}}" ng-if="uifImageUrl"></div><div class="ms-Persona
n.selectedItems=[],n.selectedItems.push(e.item)}n.selectMode===s.OrgChartSelectModeEnum.multiple&&(t.children().eq(0).addClass("is-selected"),n.selectedItems&&n.selectedItems.push(e.item))}else if(t.children().eq(0).removeClass("is-selected"),n.selectedItems){var o=n.selectedItems.indexOf(e.item);o>-1&&n.selectedItems.splice(o,1)}e.$apply()},n.selectMode!==s.OrgChartSelectModeEnum.single&&n.selectMode!==s.OrgChartSelectModeEnum.multiple||!e.item||t.children().eq(0).on("click",e.personaClick)},e}();t.OrgChartPersonaDirective=f;var p=function(){function e(){this.restrict="E",this.replace=!0,this.template='\n <div class="ms-Persona-imageArea">\n <i class="ms-Persona-placeholder ms-Icon ms-Icon--person"></i>\n <img class="ms-Persona-image" ng-src="{{ngSrc}}" />\n </div>\n ',this.scope={ngSrc:"="}}return e.factory=function(){var t=function(){return new e};return t},e}();t.OrgChartImageDirective=p;var m=function(){function e(){this.restrict="E",this.replace=!0,this.template='<div class="ms-Persona-presence" ></div>'}return e.factory=function(){var t=function(){return new e};return t},e.prototype.link=function(e,t,i,n){e.$parent.presence||t.css("display","none")},e}();t.OrgChartPresenceDirective=m;var h=function(){function e(){this.restrict="E",this.transclude=!0,this.replace=!0,this.template='<div class="ms-Persona-details" ng-transclude ></div>'}return e.factory=function(){var t=function(){return new e};return t},e}();t.OrgChartDetailsDirective=h;var v=function(){function e(){this.restrict="E",this.transclude=!0,this.replace=!0,this.template='<div class="ms-Persona-primaryText" ng-transclude ></div>'}return e.factory=function(){var t=function(){return new e};return t},e}();t.OrgChartPrimaryTextDirective=v;var g=function(){function e(){this.restrict="E",this.transclude=!0,this.replace=!0,this.template='<div class="ms-Persona-secondaryText" ng-transclude ></div>'}return e.factory=function(){var t=function(){return new e};return t},e}();t.OrgChartSecondaryTextDirective=g;var y=function(){function e(){}return e.factory=function(){return function(e,t){var i=[];if(e){for(var n=0;n<e.length;n++){var r=e[n][t];-1===i.indexOf(r)&&i.push(r)}return i}}},e}();t.OrgChartGroupByFilter=y,t.module=n.module("officeuifabric.components.orgchart",["officeuifabric.components"]).directive("uifOrgChart",c.factory()).directive("uifOrgChartGroup",l.factory()).directive("uifOrgChartGroupTitle",u.factory()).directive("uifOrgChartList",d.factory()).directive("uifOrgChartPersona",f.factory()).directive("uifOrgChartImage",p.factory()).directive("uifOrgChartPresence",m.factory()).directive("uifOrgChartDetails",h.factory()).directive("uifOrgChartPrimaryText",v.factory()).directive("uifOrgChartSecondaryText",g.factory()).filter("uifOrgChartGroupBy",y.factory)},function(e,t){"use strict";!function(e){e[e.available=0]="available",e[e.busy=1]="busy",e[e.away=2]="away",e[e.blocked=3]="blocked",e[e.dnd=4]="dnd",e[e.offline=5]="offline"}(t.OrgChartPresenceEnum||(t.OrgChartPresenceEnum={}));t.OrgChartPresenceEnum},function(e,t){"use strict";!function(e){e[e.standard=0]="standard",e[e.square=1]="square"}(t.OrgChartStyleEnum||(t.OrgChartStyleEnum={}));t.OrgChartStyleEnum},function(e,t){"use strict";!function(e){e[e.single=0]="single",e[e.multiple=1]="multiple"}(t.OrgChartSelectModeEnum||(t.OrgChartSelectModeEnum={}));t.OrgChartSelectModeEnum},function(e,t,i){"use strict";var n=i(2),r=i(39),o=i(43),s=i(21),a="uif-people-search",c=function(){function e(){this.people=[]}return e}();t.GroupedPeopleData=c;var l=function(){function e(e,t,i){this.$scope=e,this.$filter=t,this.$element=i}return e.prototype.getSelectedPersons=function(){return this.$scope.selectedPersons},e.prototype.pickerType=function(){var e=this.$scope.type;return n.isUndefined(e)?u[u.grouped]:this.$scope.type},e.prototype.searchQuery=function(){return this.$scope.searchQuery},e.prototype.search=function(){this.bindPeople(this.$scope.searchQuery),this.$scope.$broadcast(a,this.searchQuery())},e.prototype.bindPeople=function(e){var t=this,i=this.$scope.peopleCallback()(e);if(i=i||[],i ins