├── .npmignore ├── .gitattributes ├── src ├── tab │ ├── test │ │ └── .eslintrc │ ├── tab.tpl.html │ └── docs │ │ └── tab.demo.js ├── affix │ └── test │ │ └── .eslintrc ├── alert │ ├── test │ │ └── .eslintrc │ ├── docs │ │ ├── alert.demo.tpl.html │ │ └── alert.demo.js │ └── alert.tpl.html ├── aside │ ├── test │ │ └── .eslintrc │ ├── docs │ │ ├── aside.demo.js │ │ └── aside.demo.tpl.html │ ├── aside.tpl.html │ └── aside.js ├── button │ ├── test │ │ └── .eslintrc │ └── docs │ │ ├── button.demo.js │ │ └── button.demo.html ├── collapse │ ├── test │ │ └── .eslintrc │ └── docs │ │ └── collapse.demo.js ├── dropdown │ ├── test │ │ └── .eslintrc │ ├── dropdown.tpl.html │ └── docs │ │ └── dropdown.demo.js ├── helpers │ ├── test │ │ ├── .eslintrc │ │ ├── debounce.spec.js │ │ └── date-formatter.spec.js │ ├── raf.js │ ├── debounce.js │ ├── date-formatter.js │ └── parse-options.js ├── modal │ ├── test │ │ └── .eslintrc │ ├── modal.tpl.html │ └── docs │ │ ├── modal.demo.js │ │ ├── modal.tpl.content.demo.html │ │ └── modal.demo.tpl.html ├── navbar │ ├── test │ │ └── .eslintrc │ ├── docs │ │ ├── navbar.demo.js │ │ └── navbar.demo.html │ └── navbar.js ├── popover │ ├── test │ │ └── .eslintrc │ ├── popover.tpl.html │ └── docs │ │ ├── popover-content.demo.tpl.html │ │ ├── popover.demo.js │ │ └── popover.demo.tpl.html ├── scrollspy │ └── test │ │ ├── .eslintrc │ │ └── scrollspy.spec.js ├── select │ ├── test │ │ └── .eslintrc │ ├── docs │ │ └── select.demo.js │ └── select.tpl.html ├── tooltip │ ├── test │ │ └── .eslintrc │ ├── tooltip.tpl.html │ └── docs │ │ ├── tooltip.demo.tpl.html │ │ └── tooltip.demo.js ├── typeahead │ ├── test │ │ └── .eslintrc │ ├── docs │ │ ├── typeahead.demo.tpl.html │ │ └── typeahead.demo.js │ └── typeahead.tpl.html ├── datepicker │ ├── test │ │ └── .eslintrc │ ├── docs │ │ └── datepicker.demo.js │ └── datepicker.tpl.html ├── timepicker │ ├── test │ │ └── .eslintrc │ ├── docs │ │ └── timepicker.demo.js │ └── timepicker.tpl.html └── module.js ├── .bowerrc ├── docs ├── favicon.ico ├── images │ ├── snippet.png │ ├── triangular.png │ ├── snippet-logo.png │ └── triangular-red.png ├── fonts │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ ├── glyphicons-halflings-regular.woff │ └── glyphicons-halflings-regular.woff2 ├── scripts │ ├── directives │ │ ├── code.js │ │ ├── highlight-block.js │ │ └── append-source.js │ ├── controllers │ │ └── main.js │ ├── services │ │ └── indent.js │ └── app.js ├── views │ ├── sections │ │ └── old-docs.html │ ├── partials │ │ ├── aside.tpl.html │ │ ├── footer.html │ │ ├── header.html │ │ └── navbar.html │ └── home.html ├── bower.json ├── styles │ ├── docs │ │ ├── old-docs.less │ │ ├── footer.less │ │ ├── masthead.less │ │ ├── examples.less │ │ ├── sidebar.less │ │ ├── navbar.less │ │ └── docs.less │ └── main │ │ └── animations.less └── index.html ├── index.js ├── .codeclimate.yml ├── .gitignore ├── ngfactory.json ├── .eslintrc ├── test ├── .eslintrc ├── helpers.js ├── ~1.2.0 │ └── karma.conf.js ├── ~1.3.0 │ └── karma.conf.js ├── ~1.4.0 │ └── karma.conf.js ├── ~1.5.0 │ └── karma.conf.js └── ~1.6.0 │ └── karma.conf.js ├── .editorconfig ├── dist └── modules │ ├── tooltip.tpl.min.js │ ├── popover.tpl.min.js │ ├── tooltip.tpl.js │ ├── popover.tpl.js │ ├── typeahead.tpl.min.js │ ├── alert.tpl.min.js │ ├── typeahead.tpl.js │ ├── alert.tpl.js │ ├── raf.min.js │ ├── aside.tpl.min.js │ ├── debounce.min.js │ ├── tab.tpl.min.js │ ├── aside.tpl.js │ ├── modal.tpl.min.js │ ├── tab.tpl.js │ ├── dropdown.tpl.min.js │ ├── modal.tpl.js │ ├── dropdown.tpl.js │ ├── date-formatter.min.js │ ├── navbar.min.js │ ├── select.tpl.min.js │ ├── select.tpl.js │ ├── parse-options.min.js │ ├── raf.js │ ├── date-formatter.js │ ├── debounce.js │ ├── aside.min.js │ ├── raf.min.js.map │ ├── navbar.js │ ├── alert.min.js │ ├── compiler.min.js │ ├── datepicker.tpl.min.js │ ├── datepicker.tpl.js │ ├── debounce.min.js.map │ ├── button.min.js │ ├── popover.min.js │ ├── dimensions.min.js │ ├── parse-options.js │ ├── tab.min.js │ ├── navbar.min.js.map │ ├── date-formatter.min.js.map │ ├── dropdown.min.js │ ├── aside.js │ ├── timepicker.tpl.min.js │ ├── timepicker.tpl.js │ ├── affix.min.js │ ├── collapse.min.js │ ├── scrollspy.min.js │ ├── alert.js │ └── parse-options.min.js.map ├── .github ├── stale.yml └── lock.yml ├── tasks ├── helpers │ └── reporter.js ├── compat.js └── test.js ├── gulpfile.js ├── .travis.yml ├── LICENSE.md ├── angular-strap.nuspec ├── bower.json └── package.json /.npmignore: -------------------------------------------------------------------------------- 1 | yarn.lock -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | * text=auto 2 | -------------------------------------------------------------------------------- /src/tab/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/affix/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/alert/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/aside/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/button/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/collapse/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/dropdown/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/helpers/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/modal/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/navbar/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/popover/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/scrollspy/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/select/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/tooltip/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/typeahead/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "bower_components" 3 | } 4 | -------------------------------------------------------------------------------- /src/datepicker/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/timepicker/test/.eslintrc: -------------------------------------------------------------------------------- 1 | ./../../../test/.eslintrc -------------------------------------------------------------------------------- /src/typeahead/docs/typeahead.demo.tpl.html: -------------------------------------------------------------------------------- 1 |
{{pane.content}}
2 | -------------------------------------------------------------------------------- /docs/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/favicon.ico -------------------------------------------------------------------------------- /docs/images/snippet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/images/snippet.png -------------------------------------------------------------------------------- /docs/images/triangular.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/images/triangular.png -------------------------------------------------------------------------------- /docs/images/snippet-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/images/snippet-logo.png -------------------------------------------------------------------------------- /docs/images/triangular-red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/images/triangular-red.png -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | require('./dist/angular-strap.js'); 2 | require('./dist/angular-strap.tpl.min.js'); 3 | module.exports = 'mgcrea.ngStrap'; 4 | -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /docs/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mgcrea/angular-strap/HEAD/docs/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /src/tooltip/tooltip.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | languages: 2 | JavaScript: true 3 | exclude_paths: 4 | - "test/*" 5 | - "tasks/*" 6 | - "docs/*" 7 | - "dist/*" 8 | - "src/*/docs/*" 9 | - "gulpfile.js" 10 | -------------------------------------------------------------------------------- /src/tooltip/docs/tooltip.demo.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
5 | -------------------------------------------------------------------------------- /src/navbar/docs/navbar.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('NavbarDemoCtrl', function($scope, $location) { 6 | $scope.$location = $location; 7 | 8 | }); 9 | -------------------------------------------------------------------------------- /src/popover/popover.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |
5 |
6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .dev/ 2 | .tmp/ 3 | .DS_Store 4 | .idea 5 | *.log 6 | *.sublime-project 7 | *.sublime-workspace 8 | bower_components/ 9 | node_modules/ 10 | /pages/ 11 | /docs/1.0 12 | /test/coverage/ 13 | !.gitignore 14 | !dist/ 15 | *.nupkg 16 | -------------------------------------------------------------------------------- /docs/scripts/directives/code.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .directive('code', function() { 6 | 7 | return { 8 | restrict: 'E', 9 | terminal: true 10 | }; 11 | 12 | }); 13 | -------------------------------------------------------------------------------- /ngfactory.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "library", 3 | "username": "mgcrea", 4 | "branch": "~1.4.0", 5 | "module": "mgcrea.ngStrap", 6 | "transpilers": { 7 | "views": "none", 8 | "scripts": "none", 9 | "styles": "less" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/alert/docs/alert.demo.tpl.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |   4 |
5 | -------------------------------------------------------------------------------- /src/button/docs/button.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('ButtonDemoCtrl', function($scope) { 6 | $scope.button = { 7 | toggle: false, 8 | checkbox: {left: false, middle: true, right: false}, 9 | radio: 'left' 10 | }; 11 | }); 12 | -------------------------------------------------------------------------------- /docs/views/sections/old-docs.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 4 | Looking for AngularStrap v1 docs? 5 | 6 | We've moved it to a new home while we push forward with AngularStrap 2. 7 |
8 |
9 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "mgcrea/legacy", 3 | "rules": { 4 | "consistent-return": 1, 5 | "padded-blocks": 0, 6 | "no-param-reassign": 1, 7 | "no-shadow": 1, 8 | "no-underscore-dangle": 0, 9 | "space-before-function-paren": [2, "always"] 10 | }, 11 | "globals": { 12 | "angular": 1 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/typeahead/typeahead.tpl.html: -------------------------------------------------------------------------------- 1 | 6 | -------------------------------------------------------------------------------- /src/alert/alert.tpl.html: -------------------------------------------------------------------------------- 1 | 8 | -------------------------------------------------------------------------------- /docs/scripts/controllers/main.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('MainCtrl', function ($scope, $rootScope, $location, $anchorScroll, $plunkr) { 6 | 7 | $scope.$scrollTo = function(hash) { 8 | $location.hash(hash); 9 | $anchorScroll(); 10 | }; 11 | 12 | $scope.createPlunkr = function() { 13 | var myPlunkr = $plunkr(); 14 | }; 15 | 16 | }) 17 | -------------------------------------------------------------------------------- /src/aside/docs/aside.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .config(function($asideProvider) { 6 | angular.extend($asideProvider.defaults, { 7 | container: 'body', 8 | html: true 9 | }); 10 | }) 11 | 12 | .controller('AsideDemoCtrl', function($scope) { 13 | $scope.aside = {title: 'Title', content: 'Hello Aside
This is a multiline message!'}; 14 | }); 15 | -------------------------------------------------------------------------------- /test/.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "mgcrea/legacy", 3 | "env": { 4 | "browser": false, 5 | "jasmine": true, 6 | "node": true 7 | }, 8 | "rules": { 9 | "consistent-return": 1, 10 | "padded-blocks": 0, 11 | "no-param-reassign": 1, 12 | "no-shadow": 1, 13 | "space-before-function-paren": [2, "always"] 14 | }, 15 | "globals": { 16 | "angular": 1, 17 | "jQuery": 1, 18 | "$": 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /src/timepicker/docs/timepicker.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('TimepickerDemoCtrl', function($scope, $http) { 6 | $scope.time = new Date(1970, 0, 1, 10, 30, 40); 7 | $scope.selectedTimeAsNumber = 10 * 36e5 + 30 * 6e4 + 40 * 1e3; 8 | $scope.selectedTimeAsString = '10:00'; 9 | $scope.sharedDate = new Date(new Date().setMinutes(0, 0)); 10 | $scope.emptySharedDate = null; 11 | }); 12 | -------------------------------------------------------------------------------- /docs/scripts/directives/highlight-block.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .directive('highlightBlock', function($window, indent) { 6 | 7 | return { 8 | compile: function(element, attr) { 9 | element.html(indent(element.html())); 10 | return function postLink(scope, element, attr) { 11 | $window.hljs.highlightBlock(element[0]); 12 | }; 13 | } 14 | }; 15 | 16 | }); 17 | -------------------------------------------------------------------------------- /docs/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-strap-docs", 3 | "dependencies": { 4 | "angular": "~1.5", 5 | "angular-animate": "~1.5", 6 | "angular-i18n": "~1.5", 7 | "angular-motion": "^0.4.4", 8 | "angular-route": "~1.5", 9 | "bootstrap": "~3.3.6", 10 | "bootstrap-additions": "^0.3.1", 11 | "fastclick": "~1.0.6", 12 | "font-awesome": "~4.5.0", 13 | "highlightjs": "~9.2.0" 14 | }, 15 | "devDependencies": { 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /docs/styles/docs/old-docs.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Callout for 2.3.2 docs 3 | * 4 | * Only appears below page headers (not on the homepage). The homepage gets its 5 | * own link with the masthead links. 6 | */ 7 | 8 | .bs-old-docs { 9 | padding: 15px 20px; 10 | color: hsl(0, 0%, 47%); 11 | background-color: hsl(0, 0%, 98%); 12 | border-top: 1px solid hsl(0, 0%, 100%); 13 | border-bottom: 1px solid hsl(0, 0%, 90%); 14 | } 15 | .bs-old-docs strong { 16 | color: hsl(0, 0%, 33%); 17 | } 18 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig helps developers define and maintain consistent 2 | # coding styles between different editors and IDEs 3 | # editorconfig.org 4 | 5 | root = true 6 | 7 | 8 | [*] 9 | 10 | # Change these settings to your own preference 11 | indent_style = space 12 | indent_size = 2 13 | 14 | # We recommend you to keep these unchanged 15 | end_of_line = lf 16 | charset = utf-8 17 | trim_trailing_whitespace = true 18 | insert_final_newline = true 19 | 20 | [*.md] 21 | trim_trailing_whitespace = false 22 | -------------------------------------------------------------------------------- /dist/modules/tooltip.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.tooltip').run(['$templateCache',function(t){t.put('tooltip/tooltip.tpl.html','
')}]); -------------------------------------------------------------------------------- /src/tab/tab.tpl.html: -------------------------------------------------------------------------------- 1 | 6 |
7 |
8 | -------------------------------------------------------------------------------- /src/dropdown/dropdown.tpl.html: -------------------------------------------------------------------------------- 1 | 7 | -------------------------------------------------------------------------------- /src/module.js: -------------------------------------------------------------------------------- 1 | 2 | angular.module('mgcrea.ngStrap', [ 3 | 'mgcrea.ngStrap.modal', 4 | 'mgcrea.ngStrap.aside', 5 | 'mgcrea.ngStrap.alert', 6 | 'mgcrea.ngStrap.button', 7 | 'mgcrea.ngStrap.select', 8 | 'mgcrea.ngStrap.datepicker', 9 | 'mgcrea.ngStrap.timepicker', 10 | 'mgcrea.ngStrap.navbar', 11 | 'mgcrea.ngStrap.tooltip', 12 | 'mgcrea.ngStrap.popover', 13 | 'mgcrea.ngStrap.dropdown', 14 | 'mgcrea.ngStrap.typeahead', 15 | 'mgcrea.ngStrap.scrollspy', 16 | 'mgcrea.ngStrap.affix', 17 | 'mgcrea.ngStrap.tab', 18 | 'mgcrea.ngStrap.collapse' 19 | ]); 20 | -------------------------------------------------------------------------------- /dist/modules/popover.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.popover').run(['$templateCache',function(t){t.put('popover/popover.tpl.html','

')}]); -------------------------------------------------------------------------------- /src/aside/aside.tpl.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /dist/modules/tooltip.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.tooltip').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('tooltip/tooltip.tpl.html', '
'); 12 | } ]); -------------------------------------------------------------------------------- /docs/views/partials/aside.tpl.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /dist/modules/popover.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.popover').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('popover/popover.tpl.html', '

'); 12 | } ]); -------------------------------------------------------------------------------- /src/popover/docs/popover-content.demo.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |

3 |
2 + 3 = {{ 2 + 3 }}
4 |
5 |
6 |
@
7 | 8 |
9 |
10 |
11 | 12 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /src/alert/docs/alert.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('AlertDemoCtrl', function($scope, $templateCache, $timeout, $alert) { 6 | 7 | $scope.alert = {title: 'Holy guacamole!', content: 'Best check yo self, you\'re not looking too good.', type: 'info'}; 8 | 9 | // Service usage 10 | var myAlert = $alert({title: 'Holy guacamole!', content: 'Best check yo self, you\'re not looking too good.', placement: 'top', type: 'info', keyboard: true, show: false}); 11 | $scope.showAlert = function() { 12 | myAlert.show(); // or myAlert.$promise.then(myAlert.show) if you use an external html template 13 | }; 14 | 15 | }); 16 | -------------------------------------------------------------------------------- /dist/modules/typeahead.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.typeahead').run(['$templateCache',function(e){e.put('typeahead/typeahead.tpl.html','')}]); -------------------------------------------------------------------------------- /src/select/docs/select.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('SelectDemoCtrl', function($scope, $http) { 6 | 7 | $scope.selectedIcon = ''; 8 | $scope.selectedIcons = ['Globe', 'Heart']; 9 | $scope.icons = [ 10 | {value: 'Gear', label: ' Gear'}, 11 | {value: 'Globe', label: ' Globe'}, 12 | {value: 'Heart', label: ' Heart'}, 13 | {value: 'Camera', label: ' Camera'} 14 | ]; 15 | 16 | $scope.selectedMonth = 0; 17 | $scope.months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec']; 18 | 19 | }); 20 | -------------------------------------------------------------------------------- /dist/modules/alert.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.alert').run(['$templateCache',function(t){t.put('alert/alert.tpl.html','
 
')}]); -------------------------------------------------------------------------------- /src/datepicker/docs/datepicker.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .config(function($datepickerProvider) { 6 | angular.extend($datepickerProvider.defaults, { 7 | dateFormat: 'dd/MM/yyyy', 8 | startWeek: 1 9 | }); 10 | }) 11 | 12 | .controller('DatepickerDemoCtrl', function($scope, $http) { 13 | 14 | $scope.selectedDate = new Date(); 15 | $scope.selectedDateAsNumber = Date.UTC(1986, 1, 22); 16 | // $scope.fromDate = new Date(); 17 | // $scope.untilDate = new Date(); 18 | $scope.getType = function(key) { 19 | return Object.prototype.toString.call($scope[key]); 20 | }; 21 | 22 | $scope.clearDates = function() { 23 | $scope.selectedDate = null; 24 | }; 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /src/modal/modal.tpl.html: -------------------------------------------------------------------------------- 1 | 16 | -------------------------------------------------------------------------------- /.github/stale.yml: -------------------------------------------------------------------------------- 1 | # Number of days of inactivity before an issue becomes stale 2 | daysUntilStale: 60 3 | # Number of days of inactivity before a stale issue is closed 4 | daysUntilClose: 7 5 | # Issues with these labels will never be considered stale 6 | exemptLabels: 7 | - pinned 8 | - security 9 | # Label to use when marking an issue as stale 10 | staleLabel: stale 11 | # Comment to post when marking an issue as stale. Set to `false` to disable 12 | markComment: > 13 | This issue has been automatically marked as stale because it has not had 14 | recent activity. It will be closed if no further activity occurs. Thank you 15 | for your contributions. 16 | # Comment to post when closing a stale issue. Set to `false` to disable 17 | closeComment: false 18 | -------------------------------------------------------------------------------- /dist/modules/typeahead.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.typeahead').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('typeahead/typeahead.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /dist/modules/alert.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.alert').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('alert/alert.tpl.html', '
 
'); 12 | } ]); -------------------------------------------------------------------------------- /src/popover/docs/popover.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .config(function($popoverProvider) { 6 | angular.extend($popoverProvider.defaults, { 7 | html: true 8 | }); 9 | }) 10 | 11 | .controller('PopoverDemoCtrl', function($scope, $popover) { 12 | 13 | $scope.popover = {title: 'Title', content: 'Hello Popover
This is a multiline message!'}; 14 | 15 | var asAServiceOptions = { 16 | title: $scope.popover.title, 17 | content: $scope.popover.content, 18 | trigger: 'manual' 19 | } 20 | 21 | var myPopover = $popover(angular.element(document.querySelector('#popover-as-service')), asAServiceOptions); 22 | $scope.togglePopover = function() { 23 | myPopover.$promise.then(myPopover.toggle); 24 | }; 25 | }); 26 | -------------------------------------------------------------------------------- /src/tooltip/docs/tooltip.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .config(function($tooltipProvider) { 6 | angular.extend($tooltipProvider.defaults, { 7 | html: true 8 | }); 9 | }) 10 | 11 | .controller('TooltipDemoCtrl', function($scope, $q, $sce, $tooltip) { 12 | 13 | $scope.tooltip = {title: 'Hello Tooltip
This is a multiline message!', checked: false}; 14 | 15 | // Controller usage example 16 | /* 17 | var myTooltip = $tooltip(angular.element(document.querySelector('#test')), {title: 'Hello tooltip', placement: 'right'}); 18 | $scope.showTooltip = function() { 19 | myTooltip.$promise.then(myTooltip.show); 20 | }; 21 | $scope.hideTooltip = function() { 22 | myTooltip.$promise.then(myTooltip.hide); 23 | }; 24 | */ 25 | 26 | }); 27 | -------------------------------------------------------------------------------- /dist/modules/raf.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.version.minor<3&&angular.version.dot<14&&angular.module('ng').factory('$$rAF',['$window','$timeout',function(n,e){var a=n.requestAnimationFrame||n.webkitRequestAnimationFrame||n.mozRequestAnimationFrame,t=n.cancelAnimationFrame||n.webkitCancelAnimationFrame||n.mozCancelAnimationFrame||n.webkitCancelRequestAnimationFrame,i=!!a,r=i?function(n){var e=a(n);return function(){t(e)}}:function(n){var a=e(n,16.66,!1);return function(){e.cancel(a)}};return r.supported=i,r}]); 9 | //# sourceMappingURL=raf.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/aside.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.aside').run(['$templateCache',function(t){t.put('aside/aside.tpl.html','')}]); -------------------------------------------------------------------------------- /dist/modules/debounce.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.helpers.debounce',[]).factory('debounce',['$timeout',function(n){return function(t,u,r){var e=null;return function(){var l=this,a=arguments,c=r&&!e;return e&&n.cancel(e),e=n(function(){e=null,r||t.apply(l,a)},u,!1),c&&t.apply(l,a),e}}}]).factory('throttle',['$timeout',function(n){return function(t,u,r){var e=null;return r||(r={}),function(){var l=this,a=arguments;e||(r.leading!==!1&&t.apply(l,a),e=n(function(){e=null,r.trailing!==!1&&t.apply(l,a)},u,!1))}}}]); 9 | //# sourceMappingURL=debounce.min.js.map 10 | -------------------------------------------------------------------------------- /tasks/helpers/reporter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var util = require('util'); 4 | var gutil = require('gulp-util'); 5 | var through2 = require('through2'); 6 | var exec = require('child_process').exec; 7 | var path = require('path'); 8 | 9 | module.exports = function() { 10 | 11 | return through2.obj(function handleFile(file, encoding, next) { 12 | var self = this; 13 | exec(util.format('CODECLIMATE_REPO_TOKEN=%s %s < "%s"', process.env.CODE_CLIMATE_TOKEN, '$(npm bin)/codeclimate-test-reporter', file.path), function(err) { 14 | if (err) { 15 | next(new gutil.PluginError({ 16 | plugin: 'codeclimate-test-reporter', 17 | message: err 18 | })); 19 | return; 20 | } 21 | gutil.log('Coverage file posted: "%s"', file.path); 22 | self.emit('end'); 23 | }); 24 | }); 25 | }; 26 | -------------------------------------------------------------------------------- /dist/modules/tab.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.tab').run(['$templateCache',function(a){a.put('tab/tab.tpl.html','
')}]); -------------------------------------------------------------------------------- /src/select/select.tpl.html: -------------------------------------------------------------------------------- 1 | 15 | -------------------------------------------------------------------------------- /dist/modules/aside.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.aside').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('aside/aside.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /dist/modules/modal.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.modal').run(['$templateCache',function(t){t.put('modal/modal.tpl.html','')}]); -------------------------------------------------------------------------------- /dist/modules/tab.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.tab').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('tab/tab.tpl.html', '
'); 12 | } ]); -------------------------------------------------------------------------------- /dist/modules/dropdown.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.dropdown').run(['$templateCache',function(e){e.put('dropdown/dropdown.tpl.html','')}]); -------------------------------------------------------------------------------- /src/popover/docs/popover.demo.tpl.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |

4 |
5 |
6 |

7 |
2 + 3 = {{ 2 + 3 }}
8 |
9 |
10 |
@
11 | 12 |
13 |
14 |
15 | 16 | 17 |
18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /src/dropdown/docs/dropdown.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .config(function($dropdownProvider) { 6 | angular.extend($dropdownProvider.defaults, { 7 | html: true 8 | }); 9 | }) 10 | 11 | .controller('DropdownDemoCtrl', function($scope, $alert) { 12 | 13 | $scope.dropdown = [ 14 | {text: ' Another action', href: '#anotherAction', active: true}, 15 | {text: ' Display an alert', click: '$alert("Holy guacamole!")'}, 16 | {text: ' External link', href: '/auth/facebook', target: '_self'}, 17 | {divider: true}, 18 | {text: 'Separated link', href: '#separatedLink'} 19 | ]; 20 | 21 | $scope.$alert = function(title) { 22 | $alert({title: title, content: 'Best check yo self, you\'re not looking too good.', placement: 'top', type: 'info', keyboard: true, show: true}); 23 | }; 24 | 25 | }); 26 | -------------------------------------------------------------------------------- /dist/modules/modal.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.modal').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('modal/modal.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /src/modal/docs/modal.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .config(function($modalProvider) { 6 | angular.extend($modalProvider.defaults, { 7 | html: true 8 | }); 9 | }) 10 | 11 | .controller('ModalDemoCtrl', function($scope, $modal) { 12 | $scope.modal = {title: 'Title', content: 'Hello Modal
This is a multiline message!'}; 13 | 14 | // Controller usage example 15 | // 16 | function MyModalController($scope) { 17 | $scope.title = 'Some Title'; 18 | $scope.content = 'Hello Modal
This is a multiline message from a controller!'; 19 | } 20 | MyModalController.$inject = ['$scope']; 21 | var myModal = $modal({controller: MyModalController, templateUrl: 'modal/docs/modal.demo.tpl.html', show: false}); 22 | $scope.showModal = function() { 23 | myModal.$promise.then(myModal.show); 24 | }; 25 | $scope.hideModal = function() { 26 | myModal.$promise.then(myModal.hide); 27 | }; 28 | 29 | }); 30 | -------------------------------------------------------------------------------- /dist/modules/dropdown.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.dropdown').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('dropdown/dropdown.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /src/modal/docs/modal.tpl.content.demo.html: -------------------------------------------------------------------------------- 1 | 14 | 20 | -------------------------------------------------------------------------------- /docs/scripts/services/indent.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .value('indent', function(text, spaces) { 6 | 7 | if(!text) return text; 8 | var lines = text.split(/\r?\n/); 9 | var prefix = ' '.substr(0, spaces || 0); 10 | var i; 11 | 12 | // Remove any leading blank lines 13 | while(lines.length && lines[0].match(/^\s*$/)) lines.shift(); 14 | // Remove any trailing blank lines 15 | while(lines.length && lines[lines.length - 1].match(/^\s*$/)) lines.pop(); 16 | // Calculate proper indent 17 | var minIndent = 999; 18 | for(i = 0; i < lines.length; i++) { 19 | var line = lines[0]; 20 | var indent = line.match(/^\s*/)[0]; 21 | if(indent !== line && indent.length < minIndent) { 22 | minIndent = indent.length; 23 | } 24 | } 25 | 26 | for(i = 0; i < lines.length; i++) { 27 | lines[i] = prefix + lines[i].substring(minIndent).replace(/=""/g, ''); 28 | } 29 | lines.push(''); 30 | return lines.join('\n'); 31 | 32 | }); 33 | -------------------------------------------------------------------------------- /docs/scripts/directives/append-source.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .directive('appendSource', function($window, $compile, indent) { 6 | 7 | return { 8 | compile: function(element, attr) { 9 | 10 | // Directive options 11 | var options = {placement: 'after'}; 12 | angular.forEach(['placement', 'hlClass'], function(key) { 13 | if(angular.isDefined(attr[key])) options[key] = attr[key]; 14 | }); 15 | 16 | var hlElement = angular.element('
'); 17 | var codeElement = hlElement.children('pre').children('code'); 18 | var elementHtml = indent(element.html()); 19 | codeElement.text(elementHtml); 20 | if(options.hlClass) codeElement.addClass(options.hlClass); 21 | element[options.placement](hlElement); 22 | $window.hljs.highlightBlock(codeElement[0]); 23 | 24 | } 25 | }; 26 | 27 | }); 28 | -------------------------------------------------------------------------------- /dist/modules/date-formatter.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.helpers.dateFormatter',[]).service('$dateFormatter',['$locale','dateFilter',function(t,e){function r(t){return/(h+)([:\.])?(m+)([:\.])?(s*)[ ]?(a?)/i.exec(t).slice(1)}this.getDefaultLocale=function(){return t.id},this.getDatetimeFormat=function(e,r){return t.DATETIME_FORMATS[e]||e},this.weekdaysShort=function(e){return t.DATETIME_FORMATS.SHORTDAY},this.hoursFormat=function(t){return r(t)[0]},this.minutesFormat=function(t){return r(t)[2]},this.secondsFormat=function(t){return r(t)[4]},this.timeSeparator=function(t){return r(t)[1]},this.showSeconds=function(t){return!!r(t)[4]},this.showAM=function(t){return!!r(t)[5]},this.formatDate=function(t,r,n,i){return e(t,r,i)}}]); 9 | //# sourceMappingURL=date-formatter.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/navbar.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.navbar',[]).provider('$navbar',function(){var t=this.defaults={activeClass:'active',routeAttr:'data-match-route',strict:!1};this.$get=function(){return{defaults:t}}}).directive('bsNavbar',['$window','$location','$navbar',function(t,a,r){var e=r.defaults;return{restrict:'A',link:function(t,r,n,i){var c=angular.copy(e);angular.forEach(Object.keys(e),function(t){angular.isDefined(n[t])&&(c[t]=n[t])}),t.$watch(function(){return a.path()},function(t,a){var e=r[0].querySelectorAll('li['+c.routeAttr+']');angular.forEach(e,function(a){var r=angular.element(a),e=r.attr(c.routeAttr).replace('/','\\/');c.strict&&(e='^'+e+'$');var n=new RegExp(e,'i');n.test(t)?r.addClass(c.activeClass):r.removeClass(c.activeClass)})})}}}]); 9 | //# sourceMappingURL=navbar.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/select.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.select').run(['$templateCache',function(t){t.put('select/select.tpl.html','')}]); -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var gulp = require('gulp'); 4 | var path = require('path'); 5 | var config = require('ng-factory').use(gulp, { 6 | cdn: true, 7 | src: { 8 | docsViews: '*/docs/{,*/}*.tpl.{html,jade}' 9 | }, 10 | bower: { 11 | exclude: /jquery|js\/bootstrap|\.less/ 12 | } 13 | }); 14 | config.dirname = __dirname; 15 | 16 | // 17 | // Tasks 18 | 19 | gulp.task('serve', gulp.series('ng:serve')); 20 | 21 | require('./tasks/compat')(gulp, config); 22 | 23 | var del = require('del'); 24 | gulp.task('build', gulp.series('ng:build', 'compat', function afterBuild() { 25 | var paths = config.paths; 26 | // Delete useless module.* build files 27 | return del(path.join(paths.dest, 'module.*')); 28 | })); 29 | 30 | gulp.task('pages', gulp.series('ng:pages', function afterPages(done) { 31 | var paths = config.docs; 32 | return gulp.src([ 33 | 'bower_components/highlightjs/styles/github.css', 34 | '1.0/**/*' 35 | ], 36 | {cwd: paths.cwd, base: paths.cwd}) 37 | .pipe(gulp.dest(paths.dest)); 38 | })); 39 | 40 | require('./tasks/test')(gulp, config); 41 | 42 | gulp.task('default', gulp.task('build')); 43 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | sudo: false 3 | node_js: 4 | - "4" 5 | 6 | env: 7 | global: 8 | - SAUCE_USERNAME=mgcrea 9 | - SAUCE_ACCESS_KEY=ad4bb656-dfad-4a10-8c10-0a0d8b5a1ead 10 | - CODE_CLIMATE_TOKEN=b5ed978a0e88f95b003a668583ae70815e18cd71019d526023b5e9c7703ec076 11 | 12 | before_script: 13 | - export DISPLAY=:99.0 14 | - export CHROME_BIN=chromium-browser 15 | - sh -e /etc/init.d/xvfb start 16 | - sleep 3 # give xvfb some time to start 17 | - npm install -gq bower codeclimate-test-reporter # coveralls 18 | - bower install --dev --config.interactive=0 19 | - gulp --version 20 | - bower --version 21 | - date --rfc-2822 22 | 23 | script: 24 | - npm run lint 25 | - $(npm bin)/gulp karma:travis 26 | - $(npm bin)/gulp karma:travis~1.6.0 27 | - $(npm bin)/gulp karma:travis~1.5.0 28 | - $(npm bin)/gulp karma:travis~1.4.0 29 | - $(npm bin)/gulp karma:travis~1.3.0 30 | - $(npm bin)/gulp karma:travis~1.2.0 31 | 32 | after_script: 33 | - cat test/coverage/*/lcov.info | codeclimate-test-reporter 34 | 35 | addons: 36 | code_climate: 37 | repo_token: b5ed978a0e88f95b003a668583ae70815e18cd71019d526023b5e9c7703ec076 38 | -------------------------------------------------------------------------------- /dist/modules/select.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.select').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('select/select.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | The MIT License 2 | 3 | Copyright (c) 2012-2014 Olivier Louvignes http://olouv.com 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /angular-strap.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | angular-strap 5 | 2.1.6 6 | Olivier Louvignes and contributors 7 | mgcrea 8 | https://raw.github.com/mgcrea/angular-strap/master/LICENSE.md 9 | https://github.com/mgcrea/angular-strap 10 | https://raw.githubusercontent.com/mgcrea/angular-strap/gh-pages/images/snippet-logo.png 11 | false 12 | AngularStrap - AngularJS directives for Bootstrap 13 | Copyright Olivier Louvignes 2014 14 | angular bootstrap 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /src/tab/docs/tab.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('TabDemoCtrl', function($scope, $templateCache) { 6 | 7 | $scope.tabs = [ 8 | {title:'Home', content: 'Raw denim you probably haven\'t heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica.'}, 9 | {title:'Profile', content: 'Food truck fixie locavore, accusamus mcsweeney\'s marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee.'}, 10 | {title:'About', content: 'Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney\'s organic lomo retro fanny pack lo-fi farm-to-table readymade.', disabled: true} 11 | ]; 12 | 13 | $scope.pushTab = function() { 14 | $scope.tabs.push({title: 'Contact', content: 'Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid.'}); 15 | }; 16 | 17 | $scope.toggleThirdTab = function() { 18 | $scope.tabs[2].disabled = !$scope.tabs[2].disabled; 19 | }; 20 | 21 | }); 22 | -------------------------------------------------------------------------------- /dist/modules/parse-options.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.helpers.parseOptions',[]).provider('$parseOptions',function(){var n=this.defaults={regexp:/^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/};this.$get=['$parse','$q',function(r,e){function s(s,t){function a(n,r){return n.map(function(n,e){var s,t,a={};return a[$]=n,s=o(r,a),t=f(r,a),{label:s,value:t,index:e}})}var u={},i=angular.extend({},n,t);u.$values=[];var l,o,$,c,p,f,v;return u.init=function(){u.$match=l=s.match(i.regexp),o=r(l[2]||l[1]),$=l[4]||l[6],c=l[5],p=r(l[3]||''),f=r(l[2]?l[1]:$),v=r(l[7])},u.valuesFn=function(n,r){return e.when(v(n,r)).then(function(r){return angular.isArray(r)||(r=[]),u.$values=r.length?a(r,n):[],u.$values})},u.displayValue=function(n){var r={};return r[$]=n,o(r)},u.init(),u}return s}]}); 9 | //# sourceMappingURL=parse-options.min.js.map 10 | -------------------------------------------------------------------------------- /src/helpers/raf.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | if (angular.version.minor < 3 && angular.version.dot < 14) { 4 | angular.module('ng') 5 | 6 | .factory('$$rAF', function ($window, $timeout) { 7 | 8 | var requestAnimationFrame = $window.requestAnimationFrame || 9 | $window.webkitRequestAnimationFrame || 10 | $window.mozRequestAnimationFrame; 11 | 12 | var cancelAnimationFrame = $window.cancelAnimationFrame || 13 | $window.webkitCancelAnimationFrame || 14 | $window.mozCancelAnimationFrame || 15 | $window.webkitCancelRequestAnimationFrame; 16 | 17 | var rafSupported = !!requestAnimationFrame; 18 | var raf = rafSupported ? 19 | function (fn) { 20 | var id = requestAnimationFrame(fn); 21 | return function () { 22 | cancelAnimationFrame(id); 23 | }; 24 | } : 25 | function (fn) { 26 | var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666 27 | return function () { 28 | $timeout.cancel(timer); 29 | }; 30 | }; 31 | 32 | raf.supported = rafSupported; 33 | 34 | return raf; 35 | 36 | }); 37 | } 38 | -------------------------------------------------------------------------------- /dist/modules/raf.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | if (angular.version.minor < 3 && angular.version.dot < 14) { 11 | angular.module('ng').factory('$$rAF', [ '$window', '$timeout', function($window, $timeout) { 12 | var requestAnimationFrame = $window.requestAnimationFrame || $window.webkitRequestAnimationFrame || $window.mozRequestAnimationFrame; 13 | var cancelAnimationFrame = $window.cancelAnimationFrame || $window.webkitCancelAnimationFrame || $window.mozCancelAnimationFrame || $window.webkitCancelRequestAnimationFrame; 14 | var rafSupported = !!requestAnimationFrame; 15 | var raf = rafSupported ? function(fn) { 16 | var id = requestAnimationFrame(fn); 17 | return function() { 18 | cancelAnimationFrame(id); 19 | }; 20 | } : function(fn) { 21 | var timer = $timeout(fn, 16.66, false); 22 | return function() { 23 | $timeout.cancel(timer); 24 | }; 25 | }; 26 | raf.supported = rafSupported; 27 | return raf; 28 | } ]); 29 | } -------------------------------------------------------------------------------- /src/collapse/docs/collapse.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('CollapseDemoCtrl', function($scope, $templateCache) { 6 | 7 | $scope.panels = [ 8 | {title:'Collapsible Group Item #1', body: 'Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch.'}, 9 | {title:'Collapsible Group Item #2', body: 'Food truck fixie locavore, accusamus mcsweeney\'s marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee.'}, 10 | {title:'Collapsible Group Item #3', body: 'Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney\'s organic lomo retro fanny pack lo-fi farm-to-table readymade.'} 11 | ]; 12 | 13 | $scope.panels.activePanel = 1; 14 | 15 | $scope.multiplePanels = { 16 | activePanels: [0,1] 17 | }; 18 | 19 | $scope.pushPanel = function() { 20 | $scope.panels.push({title: 'Collapsible Group Item #4', body: 'Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid.'}); 21 | }; 22 | 23 | }); 24 | -------------------------------------------------------------------------------- /.github/lock.yml: -------------------------------------------------------------------------------- 1 | # Configuration for Lock Threads - https://github.com/dessant/lock-threads 2 | 3 | # Number of days of inactivity before a closed issue or pull request is locked 4 | daysUntilLock: 90 5 | 6 | # Skip issues and pull requests created before a given timestamp. Timestamp must 7 | # follow ISO 8601 (`YYYY-MM-DD`). Set to `false` to disable 8 | skipCreatedBefore: false 9 | 10 | # Issues and pull requests with these labels will be ignored. Set to `[]` to disable 11 | exemptLabels: [] 12 | 13 | # Label to add before locking, such as `outdated`. Set to `false` to disable 14 | lockLabel: 'outdated' 15 | 16 | # Comment to post before locking. Set to `false` to disable 17 | lockComment: > 18 | This thread has been automatically locked since there has not been 19 | any recent activity after it was closed. Please open a new issue for 20 | related bugs. 21 | 22 | # Assign `resolved` as the reason for locking. Set to `false` to disable 23 | setLockReason: true 24 | 25 | # Limit to only `issues` or `pulls` 26 | only: issues 27 | 28 | # Optionally, specify configuration settings just for `issues` or `pulls` 29 | # issues: 30 | # exemptLabels: 31 | # - help-wanted 32 | # lockLabel: outdated 33 | 34 | # pulls: 35 | # daysUntilLock: 30 36 | 37 | # Repository to extend settings from 38 | # _extends: repo 39 | 40 | -------------------------------------------------------------------------------- /src/helpers/test/debounce.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('debounce', function() { 4 | 5 | var $compile, $timeout, scope, debounce, throttle; 6 | 7 | beforeEach(module('mgcrea.ngStrap.helpers.debounce')); 8 | 9 | beforeEach(inject(function(_$rootScope_, _$compile_, _$timeout_, _debounce_, _throttle_) { 10 | scope = _$rootScope_; 11 | $compile = _$compile_; 12 | $timeout = _$timeout_; 13 | debounce = _debounce_; 14 | throttle = _throttle_; 15 | })); 16 | 17 | // Tests 18 | 19 | describe('debounce', function() { 20 | 21 | it('should correctly debounce a function', function() { 22 | var counter = 0; 23 | var incr = function() { counter++; }; 24 | var debouncedIncr = debounce(incr, 12); 25 | debouncedIncr(); 26 | debouncedIncr(); 27 | expect(counter).toBe(0); 28 | $timeout.flush(); 29 | expect(counter).toBe(1); 30 | }); 31 | 32 | }); 33 | 34 | describe('throttle', function() { 35 | 36 | it('should correctly throttle a function', function() { 37 | var counter = 0; 38 | var incr = function() { counter++; }; 39 | var throttledIncr = throttle(incr, 12); 40 | throttledIncr(); 41 | throttledIncr(); 42 | expect(counter).toBe(1); 43 | $timeout.flush(); 44 | expect(counter).toBe(2); 45 | }); 46 | 47 | }); 48 | 49 | }); 50 | -------------------------------------------------------------------------------- /src/aside/docs/aside.demo.tpl.html: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /src/modal/docs/modal.demo.tpl.html: -------------------------------------------------------------------------------- 1 | 28 | -------------------------------------------------------------------------------- /docs/views/partials/footer.html: -------------------------------------------------------------------------------- 1 | 23 | -------------------------------------------------------------------------------- /docs/styles/docs/footer.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Footer 3 | * 4 | * Separated section of content at the bottom of all pages, save the homepage. 5 | */ 6 | 7 | .bs-footer { 8 | padding-top: 40px; 9 | padding-bottom: 30px; 10 | margin-top: 100px; 11 | color: hsl(0, 0%, 47%); 12 | text-align: center; 13 | border-top: 1px solid hsl(0, 0%, 90%); 14 | } 15 | .footer-links { 16 | margin: 10px 0; 17 | padding-left: 0; 18 | } 19 | .footer-links li { 20 | display: inline; 21 | padding: 0 2px; 22 | } 23 | .footer-links li:first-child { 24 | padding-left: 0; 25 | } 26 | 27 | @media (min-width: 768px) { 28 | .bs-footer { 29 | text-align: left; 30 | } 31 | .bs-footer p { 32 | margin-bottom: 0; 33 | } 34 | } 35 | 36 | /* 37 | * Footer 38 | * 39 | * Separated section of content at the bottom of all pages, save the homepage. 40 | */ 41 | 42 | // .bs-footer { 43 | // padding-top: 40px; 44 | // padding-bottom: 40px; 45 | // margin-top: 100px; 46 | // color: #777; 47 | // text-align: center; 48 | // border-top: 1px solid #e5e5e5; 49 | // } 50 | // .footer-links { 51 | // margin-top: 20px; 52 | // padding-left: 0; 53 | // color: #999; 54 | // } 55 | // .footer-links li { 56 | // display: inline; 57 | // padding: 0 2px; 58 | // } 59 | // .footer-links li:first-child { 60 | // padding-left: 0; 61 | // } 62 | 63 | // @media (min-width: 768px) { 64 | // .bs-footer p { 65 | // margin-bottom: 0; 66 | // } 67 | // } 68 | -------------------------------------------------------------------------------- /docs/styles/docs/masthead.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Homepage 3 | * 4 | * Tweaks to the custom homepage and the masthead (main jumbotron). 5 | */ 6 | 7 | /* Masthead (headings and download button) */ 8 | .bs-masthead { 9 | position: relative; 10 | padding: 30px 15px; 11 | text-align: center; 12 | text-shadow: 0 1px 0 hsla(0, 0%, 0%, 0.15); 13 | } 14 | .bs-masthead h1 { 15 | font-size: 50px; 16 | line-height: 1; 17 | color: hsl(0, 0%, 100%); 18 | } 19 | .bs-masthead .btn-outline-inverse { 20 | margin: 10px; 21 | } 22 | 23 | /* Links to project-level content like the repo, Expo, etc */ 24 | .bs-masthead-links { 25 | margin-top: 20px; 26 | margin-bottom: 40px; 27 | padding: 0 15px; 28 | list-style: none; 29 | text-align: center; 30 | } 31 | .bs-masthead-links li { 32 | display: inline; 33 | } 34 | .bs-masthead-links li + li { 35 | margin-left: 20px; 36 | } 37 | .bs-masthead-links a { 38 | color: hsl(0, 0%, 100%); 39 | } 40 | 41 | @media (min-width: 768px) { 42 | .bs-masthead { 43 | text-align: left; 44 | padding-top: 140px; 45 | padding-bottom: 140px; 46 | } 47 | .bs-masthead h1 { 48 | font-size: 100px; 49 | } 50 | .bs-masthead .lead { 51 | margin-right: 25%; 52 | font-size: 30px; 53 | } 54 | .bs-masthead .btn-outline-inverse { 55 | width: auto; 56 | margin: 20px 5px 20px 0; 57 | padding: 18px 24px; 58 | font-size: 21px; 59 | } 60 | .bs-masthead-links { 61 | padding: 0; 62 | text-align: left; 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-strap", 3 | "description": "AngularStrap - AngularJS directives for Bootstrap", 4 | "version": "2.3.12", 5 | "keywords": [ 6 | "angular", 7 | "bootstrap" 8 | ], 9 | "homepage": "http://mgcrea.github.io/angular-strap", 10 | "bugs": "https://github.com/mgcrea/angular-strap/issues", 11 | "author": { 12 | "name": "Olivier Louvignes", 13 | "email": "olivier@mg-crea.com", 14 | "url": "https://github.com/mgcrea" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "https://github.com/mgcrea/angular-strap.git" 19 | }, 20 | "licenses": [ 21 | { 22 | "type": "MIT", 23 | "url": "https://github.com/mgcrea/angular-strap/blob/master/LICENSE.md" 24 | } 25 | ], 26 | "main": [ 27 | "dist/angular-strap.js", 28 | "dist/angular-strap.tpl.js" 29 | ], 30 | "ignore": [ 31 | "docs", 32 | "test", 33 | "tasks", 34 | "CONTRIBUTING.md" 35 | ], 36 | "dependencies": { 37 | "angular": "^1.2.21" 38 | }, 39 | "devDependencies": { 40 | "angular-animate": "~1.5", 41 | "angular-i18n": "~1.5", 42 | "angular-mocks": "~1.5", 43 | "angular-motion": "^0.4.3", 44 | "angular-route": "~1.5", 45 | "angular-sanitize": "~1.5", 46 | "angular-scenario": "~1.5", 47 | "bootstrap": "^3.3.6", 48 | "bootstrap-additions": "^0.3.1", 49 | "fastclick": "^1.0.6", 50 | "font-awesome": "^4.5.0", 51 | "highlightjs": "^9.1.0", 52 | "jquery": "^2.2.0" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /docs/views/home.html: -------------------------------------------------------------------------------- 1 |
2 |
3 | 6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | -------------------------------------------------------------------------------- /docs/views/partials/header.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |

AngularStrap

5 |

AngularJS 1.2+ native directives for Bootstrap 3.

6 |
7 |
8 |
    9 |
  • 10 | 11 |
  • 12 |
  • 13 | 14 |
  • 15 |
  • 16 | 17 |
  • 18 | 21 |
  • 22 |
    23 |
  • 24 |
25 |
26 |
27 |
28 | -------------------------------------------------------------------------------- /src/typeahead/docs/typeahead.demo.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs') 4 | 5 | .controller('TypeaheadDemoCtrl', function($scope, $templateCache, $http) { 6 | 7 | $scope.selectedState = ''; 8 | $scope.states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California', 'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii', 'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana', 'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota', 'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire', 'New Jersey', 'New Mexico', 'New York', 'North Dakota', 'North Carolina', 'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island', 'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont', 'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming']; 9 | 10 | $scope.selectedIcon = ''; 11 | $scope.icons = [ 12 | {value: 'Gear', label: ' Gear'}, 13 | {value: 'Globe', label: ' Globe'}, 14 | {value: 'Heart', label: ' Heart'}, 15 | {value: 'Camera', label: ' Camera'} 16 | ]; 17 | 18 | $scope.selectedAddress = ''; 19 | $scope.getAddress = function(viewValue) { 20 | var params = {address: viewValue, sensor: false}; 21 | return $http.get('http://maps.googleapis.com/maps/api/geocode/json', {params: params}) 22 | .then(function(res) { 23 | return res.data.results; 24 | }); 25 | }; 26 | 27 | }); 28 | -------------------------------------------------------------------------------- /src/helpers/debounce.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrap.helpers.debounce', []) 4 | 5 | // @source jashkenas/underscore 6 | // @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L693 7 | .factory('debounce', function ($timeout) { 8 | return function (func, wait, immediate) { 9 | var timeout = null; 10 | return function () { 11 | var context = this; 12 | var args = arguments; 13 | var callNow = immediate && !timeout; 14 | if (timeout) { 15 | $timeout.cancel(timeout); 16 | } 17 | timeout = $timeout(function later () { 18 | timeout = null; 19 | if (!immediate) { 20 | func.apply(context, args); 21 | } 22 | }, wait, false); 23 | if (callNow) { 24 | func.apply(context, args); 25 | } 26 | return timeout; 27 | }; 28 | }; 29 | }) 30 | 31 | 32 | // @source jashkenas/underscore 33 | // @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L661 34 | .factory('throttle', function ($timeout) { 35 | return function (func, wait, options) { 36 | var timeout = null; 37 | if (!options) options = {}; 38 | return function () { 39 | var context = this; 40 | var args = arguments; 41 | if (!timeout) { 42 | if (options.leading !== false) { 43 | func.apply(context, args); 44 | } 45 | timeout = $timeout(function later () { 46 | timeout = null; 47 | if (options.trailing !== false) { 48 | func.apply(context, args); 49 | } 50 | }, wait, false); 51 | } 52 | }; 53 | }; 54 | }); 55 | -------------------------------------------------------------------------------- /dist/modules/date-formatter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.helpers.dateFormatter', []).service('$dateFormatter', [ '$locale', 'dateFilter', function($locale, dateFilter) { 11 | this.getDefaultLocale = function() { 12 | return $locale.id; 13 | }; 14 | this.getDatetimeFormat = function(format, lang) { 15 | return $locale.DATETIME_FORMATS[format] || format; 16 | }; 17 | this.weekdaysShort = function(lang) { 18 | return $locale.DATETIME_FORMATS.SHORTDAY; 19 | }; 20 | function splitTimeFormat(format) { 21 | return /(h+)([:\.])?(m+)([:\.])?(s*)[ ]?(a?)/i.exec(format).slice(1); 22 | } 23 | this.hoursFormat = function(timeFormat) { 24 | return splitTimeFormat(timeFormat)[0]; 25 | }; 26 | this.minutesFormat = function(timeFormat) { 27 | return splitTimeFormat(timeFormat)[2]; 28 | }; 29 | this.secondsFormat = function(timeFormat) { 30 | return splitTimeFormat(timeFormat)[4]; 31 | }; 32 | this.timeSeparator = function(timeFormat) { 33 | return splitTimeFormat(timeFormat)[1]; 34 | }; 35 | this.showSeconds = function(timeFormat) { 36 | return !!splitTimeFormat(timeFormat)[4]; 37 | }; 38 | this.showAM = function(timeFormat) { 39 | return !!splitTimeFormat(timeFormat)[5]; 40 | }; 41 | this.formatDate = function(date, format, lang, timezone) { 42 | return dateFilter(date, format, timezone); 43 | }; 44 | } ]); -------------------------------------------------------------------------------- /dist/modules/debounce.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.helpers.debounce', []).factory('debounce', [ '$timeout', function($timeout) { 11 | return function(func, wait, immediate) { 12 | var timeout = null; 13 | return function() { 14 | var context = this; 15 | var args = arguments; 16 | var callNow = immediate && !timeout; 17 | if (timeout) { 18 | $timeout.cancel(timeout); 19 | } 20 | timeout = $timeout(function later() { 21 | timeout = null; 22 | if (!immediate) { 23 | func.apply(context, args); 24 | } 25 | }, wait, false); 26 | if (callNow) { 27 | func.apply(context, args); 28 | } 29 | return timeout; 30 | }; 31 | }; 32 | } ]).factory('throttle', [ '$timeout', function($timeout) { 33 | return function(func, wait, options) { 34 | var timeout = null; 35 | if (!options) options = {}; 36 | return function() { 37 | var context = this; 38 | var args = arguments; 39 | if (!timeout) { 40 | if (options.leading !== false) { 41 | func.apply(context, args); 42 | } 43 | timeout = $timeout(function later() { 44 | timeout = null; 45 | if (options.trailing !== false) { 46 | func.apply(context, args); 47 | } 48 | }, wait, false); 49 | } 50 | }; 51 | }; 52 | } ]); -------------------------------------------------------------------------------- /tasks/compat.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var ngAnnotate = require('gulp-ng-annotate'); 4 | var rename = require('gulp-rename'); 5 | var uglify = require('gulp-uglify'); 6 | 7 | module.exports = function(gulp, config) { 8 | 9 | gulp.task('compat', function() { 10 | var paths = config.paths; 11 | var providers = [ 12 | '$affix', '$alert', '$aside', '$button', '$collapse', '$datepicker', 'datepickerViews', 13 | '$dropdown', '$dateFormatter', '$dateParser', 'debounce', 'throttle', 'dimensions', 14 | '$parseOptions', '$modal', '$navbar', '$popover', '$scrollspy', '$select', '$tab', 15 | '$timepicker', '$tooltip', '$typeahead' 16 | ]; 17 | var compatProviders = providers.map(function(provider) { 18 | var prependBs = function(what) { 19 | var start = what.lastIndexOf('$') + 1; 20 | if (start < 1) { 21 | start = 0; 22 | } 23 | return what.substr(0, start) + 'bs' + what.substr(start, 1).toUpperCase() + 24 | what.substring(start + 1, what.length); 25 | }; 26 | return { 27 | from: provider, 28 | to: prependBs(provider) 29 | }; 30 | }); 31 | return gulp.src(paths.dest + '/angular-strap.js') 32 | .pipe(ngAnnotate({ 33 | add: true, 34 | remove: true, 35 | rename: compatProviders 36 | })) 37 | .pipe(rename(function(file) { 38 | file.extname = '.compat.js'; 39 | })) 40 | .pipe(gulp.dest(paths.dest)) 41 | .pipe(uglify({output: {indent_level: 2, quote_style: 1}})) 42 | .pipe(rename(function(file) { 43 | file.extname = '.min.js'; 44 | })) 45 | .pipe(gulp.dest(paths.dest)); 46 | }); 47 | 48 | }; 49 | -------------------------------------------------------------------------------- /dist/modules/aside.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.aside',['mgcrea.ngStrap.modal']).provider('$aside',function(){var e=this.defaults={animation:'am-fade-and-slide-right',prefixClass:'aside',prefixEvent:'aside',placement:'right',templateUrl:'aside/aside.tpl.html',contentTemplate:!1,container:!1,element:null,backdrop:!0,keyboard:!0,html:!1,show:!0};this.$get=['$modal',function(n){function t(t){var a={},r=angular.extend({},e,t);return a=n(r)}return t}]}).directive('bsAside',['$window','$sce','$aside',function(e,n,t){return{restrict:'EAC',scope:!0,link:function(e,a,r,o){var i={scope:e,element:a,show:!1};angular.forEach(['template','templateUrl','controller','controllerAs','contentTemplate','placement','backdrop','keyboard','html','container','animation'],function(e){angular.isDefined(r[e])&&(i[e]=r[e])});var l=/^(false|0|)$/i;angular.forEach(['backdrop','keyboard','html','container'],function(e){angular.isDefined(r[e])&&l.test(r[e])&&(i[e]=!1)}),angular.forEach(['onBeforeShow','onShow','onBeforeHide','onHide'],function(n){var t='bs'+n.charAt(0).toUpperCase()+n.slice(1);angular.isDefined(r[t])&&(i[n]=e.$eval(r[t]))}),angular.forEach(['title','content'],function(t){r[t]&&r.$observe(t,function(a,r){e[t]=n.trustAsHtml(a)})}),r.bsAside&&e.$watch(r.bsAside,function(n,t){angular.isObject(n)?angular.extend(e,n):e.content=n},!0);var c=t(i);a.on(r.trigger||'click',c.toggle),e.$on('$destroy',function(){c&&c.destroy(),i=null,c=null})}}}]); 9 | //# sourceMappingURL=aside.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/raf.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["modules/raf.js"],"names":["angular","version","minor","dot","cancelAnimationFrame","id","requestAnimationFrame","$window","webkitRequestAnimationFrame","mozRequestAnimationFrame","fn","rafSupported","$timeout","raf","timer","cancel","supported"],"mappings":"AAOA,YAEIA,SAWIC,QAAOC,MAAA,GAAAF,QAAAC,QAAAE,IAAA,IAVbH,QAWQI,OAAAA,MAAAA,QAAqBC,SAAAA,UAAAA,WAAAA,SAAAA,EAAAA,GAV3B,GAAIC,GAAwBC,EAAQD,uBAAyBC,EAAQC,6BAA+BD,EAAQE,yBAa1GL,EAAUM,EAAAA,sBAAAA,EAAAA,4BAAAA,EAAAA,yBAAAA,EAAAA,kCACRC,IAAYC,EACZC,EAAOF,EAAA,SAAAD,GAXT,GAYIE,GAAAA,EAAgBE,EAXpB,OAAO,YACLV,EAAqBC,KAgBzB,SAAOQ,GAbL,GAAIC,GAAQF,EAASF,EAAI,OAAO,EAChC,OAAO,YACLE,EAASG,OAAOD,IAIpB,OADAD,GAAIG,UAAYL,EACTE","file":"raf.min.js","sourcesContent":["'use strict';\n\nif (angular.version.minor < 3 && angular.version.dot < 14) {\n angular.module('ng')\n\n .factory('$$rAF', function ($window, $timeout) {\n\n var requestAnimationFrame = $window.requestAnimationFrame ||\n $window.webkitRequestAnimationFrame ||\n $window.mozRequestAnimationFrame;\n\n var cancelAnimationFrame = $window.cancelAnimationFrame ||\n $window.webkitCancelAnimationFrame ||\n $window.mozCancelAnimationFrame ||\n $window.webkitCancelRequestAnimationFrame;\n\n var rafSupported = !!requestAnimationFrame;\n var raf = rafSupported ?\n function (fn) {\n var id = requestAnimationFrame(fn);\n return function () {\n cancelAnimationFrame(id);\n };\n } :\n function (fn) {\n var timer = $timeout(fn, 16.66, false); // 1000 / 60 = 16.666\n return function () {\n $timeout.cancel(timer);\n };\n };\n\n raf.supported = rafSupported;\n\n return raf;\n\n });\n}\n"]} -------------------------------------------------------------------------------- /src/navbar/navbar.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrap.navbar', []) 4 | 5 | .provider('$navbar', function () { 6 | 7 | var defaults = this.defaults = { 8 | activeClass: 'active', 9 | routeAttr: 'data-match-route', 10 | strict: false 11 | }; 12 | 13 | this.$get = function () { 14 | return {defaults: defaults}; 15 | }; 16 | 17 | }) 18 | 19 | .directive('bsNavbar', function ($window, $location, $navbar) { 20 | 21 | var defaults = $navbar.defaults; 22 | 23 | return { 24 | restrict: 'A', 25 | link: function postLink (scope, element, attr, controller) { 26 | 27 | // Directive options 28 | var options = angular.copy(defaults); 29 | angular.forEach(Object.keys(defaults), function (key) { 30 | if (angular.isDefined(attr[key])) options[key] = attr[key]; 31 | }); 32 | 33 | // Watch for the $location 34 | scope.$watch(function () { 35 | 36 | return $location.path(); 37 | 38 | }, function (newValue, oldValue) { 39 | 40 | var liElements = element[0].querySelectorAll('li[' + options.routeAttr + ']'); 41 | 42 | angular.forEach(liElements, function (li) { 43 | 44 | var liElement = angular.element(li); 45 | var pattern = liElement.attr(options.routeAttr).replace('/', '\\/'); 46 | if (options.strict) { 47 | pattern = '^' + pattern + '$'; 48 | } 49 | var regexp = new RegExp(pattern, 'i'); 50 | 51 | if (regexp.test(newValue)) { 52 | liElement.addClass(options.activeClass); 53 | } else { 54 | liElement.removeClass(options.activeClass); 55 | } 56 | 57 | }); 58 | 59 | }); 60 | 61 | } 62 | 63 | }; 64 | 65 | }); 66 | -------------------------------------------------------------------------------- /docs/styles/main/animations.less: -------------------------------------------------------------------------------- 1 | @import (reference) "../../bower_components/angular-motion/src/fade-and-slide/fade-and-slide.less"; 2 | @import (reference) "../../bower_components/angular-motion/src/fade-and-scale/fade-and-scale.less"; 3 | 4 | .modal.disabled { 5 | 6 | animation: noop !important; 7 | 8 | &.am-fade-and-slide-top { 9 | 10 | .modal-dialog { 11 | animation-duration: @fade-and-slide-duration; 12 | animation-timing-function: @fade-and-slide-timing-function; 13 | animation-fill-mode: backwards; 14 | animation-name: fadeAndSlideFromTop; 15 | } 16 | 17 | &.ng-enter { 18 | .modal-dialog { 19 | visibility: hidden; 20 | animation-name: fadeAndSlideFromTop; 21 | } 22 | } 23 | &.ng-enter-active, &.ng-leave-active { 24 | .modal-dialog { 25 | visibility: visible; 26 | } 27 | } 28 | &.ng-leave { 29 | //@todo 30 | .modal-dialog { 31 | animation-name: fadeAndSlideToTop; 32 | } 33 | } 34 | 35 | } 36 | 37 | &.am-fade-and-scale { 38 | 39 | .modal-dialog { 40 | animation-duration: @fade-and-scale-duration; 41 | animation-timing-function: @fade-and-scale-timing-function; 42 | animation-fill-mode: backwards; 43 | animation-name: fadeAndScaleIn; 44 | } 45 | 46 | &.ng-enter { 47 | .modal-dialog { 48 | visibility: hidden; 49 | animation-name: fadeAndScaleIn; 50 | } 51 | } 52 | &.ng-enter-active, &.ng-leave-active { 53 | .modal-dialog { 54 | visibility: visible; 55 | } 56 | } 57 | &.ng-leave { 58 | //@todo 59 | .modal-dialog { 60 | animation-name: fadeAndScaleOut; 61 | } 62 | } 63 | 64 | } 65 | 66 | } 67 | 68 | @keyframes noop { 69 | from { 70 | opacity: 1; 71 | } 72 | to { 73 | opacity: 1; 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /docs/scripts/app.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrapDocs', ['mgcrea.ngStrap', 'mgcrea.ngPlunkr', 'ngRoute', 'ngAnimate']) 4 | 5 | .constant('version', 'v2.3.12') 6 | .constant('ngVersion', angular.version.full) 7 | 8 | .config(function($plunkrProvider, version) { 9 | 10 | angular.extend($plunkrProvider.defaults, { 11 | plunkrTitle: 'AngularStrap Example Plunkr', 12 | plunkrTags: ['angular', 'angular-strap'], 13 | plunkrPrivate: false, 14 | contentHtmlUrlPrefix: 'https://rawgit.com/mgcrea/angular-strap/' + version + '/src/', 15 | contentJsUrlPrefix: 'https://rawgit.com/mgcrea/angular-strap/' + version + '/src/' 16 | }); 17 | 18 | }) 19 | 20 | .config(function($routeProvider, $compileProvider, $locationProvider, $sceProvider) { 21 | 22 | // Configure html5 to get links working on jsfiddle 23 | $locationProvider.html5Mode(false); 24 | 25 | // Disable strict context 26 | $sceProvider.enabled(false); 27 | 28 | // Disable scope debug data 29 | $compileProvider.debugInfoEnabled(false); 30 | 31 | }) 32 | 33 | .run(function($window, $rootScope, $location, $anchorScroll, version, ngVersion) { 34 | 35 | $rootScope.version = version; 36 | $rootScope.ngVersion = ngVersion; 37 | 38 | // FastClick 39 | $window.FastClick.attach($window.document.body); 40 | 41 | // Support simple anchor id scrolling 42 | var bodyElement = angular.element($window.document.body); 43 | bodyElement.on('click', function(evt) { 44 | var el = angular.element(evt.target); 45 | var hash = el.attr('href'); 46 | if(!hash || hash[0] !== '#') return; 47 | if(hash.length > 1 && hash[1] === '/') return; 48 | if(evt.which !== 1) return; 49 | $location.hash(hash.substr(1)); 50 | $anchorScroll(); 51 | }); 52 | 53 | // Initial $anchorScroll() 54 | setTimeout(function() { 55 | $anchorScroll(); 56 | }, 0); 57 | 58 | }); 59 | -------------------------------------------------------------------------------- /dist/modules/navbar.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.navbar', []).provider('$navbar', function() { 11 | var defaults = this.defaults = { 12 | activeClass: 'active', 13 | routeAttr: 'data-match-route', 14 | strict: false 15 | }; 16 | this.$get = function() { 17 | return { 18 | defaults: defaults 19 | }; 20 | }; 21 | }).directive('bsNavbar', [ '$window', '$location', '$navbar', function($window, $location, $navbar) { 22 | var defaults = $navbar.defaults; 23 | return { 24 | restrict: 'A', 25 | link: function postLink(scope, element, attr, controller) { 26 | var options = angular.copy(defaults); 27 | angular.forEach(Object.keys(defaults), function(key) { 28 | if (angular.isDefined(attr[key])) options[key] = attr[key]; 29 | }); 30 | scope.$watch(function() { 31 | return $location.path(); 32 | }, function(newValue, oldValue) { 33 | var liElements = element[0].querySelectorAll('li[' + options.routeAttr + ']'); 34 | angular.forEach(liElements, function(li) { 35 | var liElement = angular.element(li); 36 | var pattern = liElement.attr(options.routeAttr).replace('/', '\\/'); 37 | if (options.strict) { 38 | pattern = '^' + pattern + '$'; 39 | } 40 | var regexp = new RegExp(pattern, 'i'); 41 | if (regexp.test(newValue)) { 42 | liElement.addClass(options.activeClass); 43 | } else { 44 | liElement.removeClass(options.activeClass); 45 | } 46 | }); 47 | }); 48 | } 49 | }; 50 | } ]); -------------------------------------------------------------------------------- /test/helpers.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | beforeEach(function() { 4 | jasmine.addMatchers({ 5 | toEquals: function(util, customEqualityTesters) { 6 | return { 7 | compare: function(actual, expected) { 8 | var result = {}; 9 | result.pass = angular.equals(actual, expected); 10 | result.message = 'Expected "' + angular.mock.dump(actual) + '" to equal "' + angular.mock.dump(expected) + '".'; 11 | return result; 12 | } 13 | }; 14 | }, 15 | toHaveClass: function(util, customEqualityTesters) { 16 | return { 17 | compare: function(actual, expected) { 18 | var result = {}; 19 | result.pass = actual.hasClass(expected); 20 | result.message = 'Expected "' + angular.mock.dump(actual) + '" to have class "' + expected + '".'; 21 | return result; 22 | } 23 | }; 24 | } 25 | }); 26 | }); 27 | 28 | /* 29 | * Counts the number of scopes beginning with the 30 | * passed in scope s. 31 | * It counts scopes recursively by traversing each 32 | * of the child scopes. 33 | * 34 | * returns the number of scopes found 35 | * 36 | * s -> scope to begin with 37 | * count -> current scope count, should begin with 0 38 | */ 39 | function countScopes(s, count) { 40 | if (s !== null) { 41 | s = s.$$childHead; 42 | while (s !== null) { 43 | count = countScopes(s, count); 44 | s = s.$$nextSibling; 45 | } 46 | } 47 | return ++count; 48 | } 49 | 50 | function d() { 51 | var args = Array.prototype.slice.call(arguments); 52 | var time = new Date().toISOString(); 53 | console.log(time + ' - ' + 'break' + ': ' + console.log.call(console, args.length === 1 ? args[0] : args, false, 10, true)); 54 | } 55 | function dd() { 56 | d.apply(null, arguments); 57 | var stack = new Error().stack.split('\n'); 58 | stack.splice(1, 1); 59 | console.log(stack.join('\n')); 60 | process.exit(1); 61 | } 62 | -------------------------------------------------------------------------------- /dist/modules/alert.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.alert',['mgcrea.ngStrap.modal']).provider('$alert',function(){var e=this.defaults={animation:'am-fade',prefixClass:'alert',prefixEvent:'alert',placement:null,templateUrl:'alert/alert.tpl.html',container:!1,element:null,backdrop:!1,keyboard:!0,show:!0,duration:!1,type:!1,dismissable:!0};this.$get=['$modal','$timeout',function(t,n){function a(a){var r={},o=angular.extend({},e,a);r=t(o),r.$scope.dismissable=!!o.dismissable,o.type&&(r.$scope.type=o.type);var l=r.show;return o.duration&&(r.show=function(){l(),n(function(){r.hide()},1e3*o.duration)}),r}return a}]}).directive('bsAlert',['$window','$sce','$alert',function(e,t,n){return{restrict:'EAC',scope:!0,link:function(e,a,r,o){var l={scope:e,element:a,show:!1};angular.forEach(['template','templateUrl','controller','controllerAs','placement','keyboard','html','container','animation','duration','dismissable'],function(e){angular.isDefined(r[e])&&(l[e]=r[e])});var i=/^(false|0|)$/i;angular.forEach(['keyboard','html','container','dismissable'],function(e){angular.isDefined(r[e])&&i.test(r[e])&&(l[e]=!1)}),angular.forEach(['onBeforeShow','onShow','onBeforeHide','onHide'],function(t){var n='bs'+t.charAt(0).toUpperCase()+t.slice(1);angular.isDefined(r[n])&&(l[t]=e.$eval(r[n]))}),e.hasOwnProperty('title')||(e.title=''),angular.forEach(['title','content','type'],function(n){r[n]&&r.$observe(n,function(a,r){e[n]=t.trustAsHtml(a)})}),r.bsAlert&&e.$watch(r.bsAlert,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t},!0);var s=n(l);a.on(r.trigger||'click',s.toggle),e.$on('$destroy',function(){s&&s.destroy(),l=null,s=null})}}}]); 9 | //# sourceMappingURL=alert.min.js.map 10 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "angular-strap", 3 | "description": "AngularStrap - AngularJS directives for Bootstrap", 4 | "version": "2.3.12", 5 | "keywords": [ 6 | "angular", 7 | "bootstrap" 8 | ], 9 | "main": "index.js", 10 | "homepage": "http://mgcrea.github.io/angular-strap", 11 | "bugs": "https://github.com/mgcrea/angular-strap/issues", 12 | "author": { 13 | "name": "Olivier Louvignes", 14 | "email": "olivier@mg-crea.com", 15 | "url": "https://github.com/mgcrea" 16 | }, 17 | "contributors": [ 18 | { 19 | "name": "Vitor Fernandes", 20 | "url": "https://github.com/vmlf01" 21 | }, 22 | { 23 | "name": "Dale Alexander Webb", 24 | "email": "dale.a.webb@gmail.com", 25 | "url": "https://github.com/DaleWebb" 26 | } 27 | ], 28 | "repository": { 29 | "type": "git", 30 | "url": "https://github.com/mgcrea/angular-strap.git" 31 | }, 32 | "license": "MIT", 33 | "dependencies": {}, 34 | "devDependencies": { 35 | "codeclimate-test-reporter": "^0.3.2", 36 | "del": "^2.2.0", 37 | "eslint": "^2.12.0", 38 | "eslint-config-mgcrea": "^8.0.0", 39 | "eslint-plugin-import": "^1.8.1", 40 | "factory-angular-channels": "^0.10.0", 41 | "gulp-ng-annotate": "^2.0.0", 42 | "gulp-pre": "^4.0.0-alpha.4", 43 | "gulp-rename": "^1.2.2", 44 | "gulp-uglify": "^1.5.3", 45 | "gulp-util": "^3.0.7", 46 | "jasmine-core": "^2.4.1", 47 | "karma": "^0.13.22", 48 | "karma-chrome-launcher": "^1.0.1", 49 | "karma-coverage": "^1.0.0", 50 | "karma-jasmine": "^1.0.2", 51 | "karma-phantomjs-launcher": "^1.0.0", 52 | "karma-sauce-launcher": "^1.0.0", 53 | "ng-factory": "^1.1.0", 54 | "phantomjs-prebuilt": "^2.1.7", 55 | "through2": "^2.0.1", 56 | "undertaker-lib-tasks": "^0.5.3" 57 | }, 58 | "scripts": { 59 | "start": "gulp serve", 60 | "compile": "gulp build", 61 | "pages": "gulp pages", 62 | "test": "gulp karma:unit", 63 | "test:watch": "npm run test -- -w", 64 | "lint": "eslint src/*/*.js" 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /dist/modules/compiler.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';function bsCompilerService(e,t,n,l,r,a){function o(e,t){return angular.element((t||document).querySelectorAll(e))}function i(e){return m[e]?m[e]:m[e]=t.get(e,{cache:a}).then(function(e){return e.data})}this.compile=function(t){t.template&&/\.html$/.test(t.template)&&(console.warn('Deprecated use of `template` option to pass a file. Please use the `templateUrl` option instead.'),t.templateUrl=t.template,t.template='');var a=t.templateUrl,m=t.template||'',c=t.controller,p=t.controllerAs,u=t.resolve||{},s=t.locals||{},g=t.transformTemplate||angular.identity,d=t.bindToController;if(angular.forEach(u,function(e,t){angular.isString(e)?u[t]=n.get(e):u[t]=n.invoke(e)}),angular.extend(u,s),m)u.$template=e.when(m);else{if(!a)throw new Error('Missing `template` / `templateUrl` option.');u.$template=i(a)}return t.titleTemplate&&(u.$template=e.all([u.$template,i(t.titleTemplate)]).then(function(e){var t=angular.element(e[0]);return o('[ng-bind="title"]',t[0]).removeAttr('ng-bind').html(e[1]),t[0].outerHTML})),t.contentTemplate&&(u.$template=e.all([u.$template,i(t.contentTemplate)]).then(function(e){var n=angular.element(e[0]),l=o('[ng-bind="content"]',n[0]).removeAttr('ng-bind').html(e[1]);return t.templateUrl||l.next().remove(),n[0].outerHTML})),e.all(u).then(function(e){var n=g(e.$template);t.html&&(n=n.replace(/ng-bind="/gi,'ng-bind-html="'));var a=angular.element('
').html(n.trim()).contents(),o=l(a);return{locals:e,element:a,link:function(t){if(e.$scope=t,c){var n=r(c,e,!0);d&&angular.extend(n.instance,e);var l=angular.isObject(n)?n:n();a.data('$ngControllerController',l),a.children().data('$ngControllerController',l),p&&(t[p]=l)}return o.apply(null,arguments)}}})};var m={}}bsCompilerService.$inject=['$q','$http','$injector','$compile','$controller','$templateCache'],angular.module('mgcrea.ngStrap.core',[]).service('$bsCompiler',bsCompilerService); 9 | //# sourceMappingURL=compiler.min.js.map 10 | -------------------------------------------------------------------------------- /src/helpers/date-formatter.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrap.helpers.dateFormatter', []) 4 | 5 | .service('$dateFormatter', function ($locale, dateFilter) { 6 | 7 | // The unused `lang` arguments are on purpose. The default implementation does not 8 | // use them and it always uses the locale loaded into the `$locale` service. 9 | // Custom implementations might use it, thus allowing different directives to 10 | // have different languages. 11 | 12 | this.getDefaultLocale = function () { 13 | return $locale.id; 14 | }; 15 | 16 | // Format is either a data format name, e.g. "shortTime" or "fullDate", or a date format 17 | // Return either the corresponding date format or the given date format. 18 | this.getDatetimeFormat = function (format, lang) { 19 | return $locale.DATETIME_FORMATS[format] || format; 20 | }; 21 | 22 | this.weekdaysShort = function (lang) { 23 | return $locale.DATETIME_FORMATS.SHORTDAY; 24 | }; 25 | 26 | function splitTimeFormat (format) { 27 | return /(h+)([:\.])?(m+)([:\.])?(s*)[ ]?(a?)/i.exec(format).slice(1); 28 | } 29 | 30 | // h:mm a => h 31 | this.hoursFormat = function (timeFormat) { 32 | return splitTimeFormat(timeFormat)[0]; 33 | }; 34 | 35 | // h:mm a => mm 36 | this.minutesFormat = function (timeFormat) { 37 | return splitTimeFormat(timeFormat)[2]; 38 | }; 39 | 40 | // h:mm:ss a => ss 41 | this.secondsFormat = function (timeFormat) { 42 | return splitTimeFormat(timeFormat)[4]; 43 | }; 44 | 45 | // h:mm a => : 46 | this.timeSeparator = function (timeFormat) { 47 | return splitTimeFormat(timeFormat)[1]; 48 | }; 49 | 50 | // h:mm:ss a => true, h:mm a => false 51 | this.showSeconds = function (timeFormat) { 52 | return !!splitTimeFormat(timeFormat)[4]; 53 | }; 54 | 55 | // h:mm a => true, H.mm => false 56 | this.showAM = function (timeFormat) { 57 | return !!splitTimeFormat(timeFormat)[5]; 58 | }; 59 | 60 | this.formatDate = function (date, format, lang, timezone) { 61 | return dateFilter(date, format, timezone); 62 | }; 63 | 64 | }); 65 | -------------------------------------------------------------------------------- /dist/modules/datepicker.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.datepicker').run(['$templateCache',function(t){t.put('datepicker/datepicker.tpl.html','')}]); -------------------------------------------------------------------------------- /dist/modules/datepicker.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.datepicker').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('datepicker/datepicker.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /dist/modules/debounce.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["modules/debounce.js"],"names":["angular","module","timeout","factory","$timeout","cancel","this","args","immediate","func","apply","context","callNow","options","leading","wait","trailing"],"mappings":"AAOA,YAEAA,SAIMC,OAAIC,sCAASC,QAAA,YAAA,WAAA,SAAAC,GAHjB,MAIMA,UAASC,EAAOH,EAAAA,GAHpB,GAAIA,GAAU,IACd,OAIEA,YAHA,GAIEA,GAAUI,KACVC,EAAKC,UACHC,EAAKC,IAAeH,CAkB1B,OArBML,IACFE,EAIOC,OAAAH,GAFTA,EAIOQ,EAAMC,WAHXT,EAAU,KAKLA,GAHHO,EAAKC,MAAMC,EAASJ,IAW7BJ,GAAQ,GACAS,GACDV,EAAAA,MAAUS,EAAAJ,GAEPL,OANNC,QASMD,YAAS,WAAA,SAAAE,GARlB,MASM,UAAIS,EAAQC,EAAAA,GARhB,GAAIZ,GASOQ,IAPX,OADKG,KAASA,MAUVX,WARF,GASIA,GAAUI,KACVC,EAAIM,SARHX,KACCW,EAAQC,WAAY,GACtBL,EASCM,MAAMJ,EAAAJ,GAPTL,EAAUE,EAAS,WACjBF,EAAU,KACNW,EAAQG,YAAa,GACvBP,EAAKC,MAAMC,EAASJ,IAErBQ,GAAM","file":"debounce.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.helpers.debounce', [])\n\n// @source jashkenas/underscore\n// @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L693\n.factory('debounce', function ($timeout) {\n return function (func, wait, immediate) {\n var timeout = null;\n return function () {\n var context = this;\n var args = arguments;\n var callNow = immediate && !timeout;\n if (timeout) {\n $timeout.cancel(timeout);\n }\n timeout = $timeout(function later () {\n timeout = null;\n if (!immediate) {\n func.apply(context, args);\n }\n }, wait, false);\n if (callNow) {\n func.apply(context, args);\n }\n return timeout;\n };\n };\n})\n\n\n// @source jashkenas/underscore\n// @url https://github.com/jashkenas/underscore/blob/1.5.2/underscore.js#L661\n.factory('throttle', function ($timeout) {\n return function (func, wait, options) {\n var timeout = null;\n if (!options) options = {};\n return function () {\n var context = this;\n var args = arguments;\n if (!timeout) {\n if (options.leading !== false) {\n func.apply(context, args);\n }\n timeout = $timeout(function later () {\n timeout = null;\n if (options.trailing !== false) {\n func.apply(context, args);\n }\n }, wait, false);\n }\n };\n };\n});\n"]} -------------------------------------------------------------------------------- /docs/styles/docs/examples.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Examples 3 | * 4 | * Isolated sections of example content for each component or feature. Usually 5 | * followed by a code snippet. 6 | */ 7 | 8 | .bs-example { 9 | position: relative; 10 | padding: 45px 15px 15px; 11 | margin: 0 -15px 15px; 12 | background-color: #fafafa; 13 | box-shadow: inset 0 3px 6px rgba(0,0,0,.05); 14 | border-color: #e5e5e5 #eee #eee; 15 | border-style: solid; 16 | border-width: 1px 0; 17 | } 18 | /* Echo out a label for the example */ 19 | .bs-example:after { 20 | content: "Example"; 21 | position: absolute; 22 | top: 15px; 23 | left: 15px; 24 | font-size: 12px; 25 | font-weight: bold; 26 | color: #bbb; 27 | text-transform: uppercase; 28 | letter-spacing: 1px; 29 | } 30 | 31 | /* Tweak display of the code snippets when following an example */ 32 | .bs-example + .highlight { 33 | margin: -15px -15px 15px; 34 | border-radius: 0; 35 | border-width: 0 0 1px; 36 | } 37 | 38 | /* Make the examples and snippets not full-width */ 39 | @media (min-width: 768px) { 40 | .bs-example { 41 | margin-left: 0; 42 | margin-right: 0; 43 | background-color: #fff; 44 | border-width: 1px; 45 | border-color: #ddd; 46 | border-radius: 4px 4px 0 0; 47 | box-shadow: none; 48 | } 49 | .bs-example + .highlight { 50 | margin-top: -16px; 51 | margin-left: 0; 52 | margin-right: 0; 53 | border-width: 1px; 54 | border-bottom-left-radius: 4px; 55 | border-bottom-right-radius: 4px; 56 | } 57 | } 58 | 59 | /* Undo width of container */ 60 | .bs-example .container { 61 | width: auto; 62 | } 63 | 64 | /* Tweak content of examples for optimum awesome */ 65 | .bs-example > p:last-child, 66 | .bs-example > ul:last-child, 67 | .bs-example > ol:last-child, 68 | .bs-example > blockquote:last-child, 69 | .bs-example > .form-control:last-child, 70 | .bs-example > .table:last-child, 71 | .bs-example > .navbar:last-child, 72 | .bs-example > .jumbotron:last-child, 73 | .bs-example > .alert:last-child, 74 | .bs-example > .panel:last-child, 75 | .bs-example > .list-group:last-child, 76 | .bs-example > .well:last-child, 77 | .bs-example > .progress:last-child, 78 | .bs-example > .table-responsive:last-child > .table { 79 | margin-bottom: 0; 80 | } 81 | .bs-example > p > .close { 82 | float: none; 83 | } 84 | 85 | .bs-example .nav-tabs { 86 | margin-bottom: 15px; 87 | } 88 | -------------------------------------------------------------------------------- /docs/views/partials/navbar.html: -------------------------------------------------------------------------------- 1 | 55 | -------------------------------------------------------------------------------- /src/scrollspy/test/scrollspy.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | // https://github.com/angular-ui/bootstrap/blob/master/src/tooltip/test/tooltip.spec.js 3 | 4 | describe('affix', function () { 5 | 6 | var $compile, scope, sandboxEl; 7 | // var mouse = effroi.mouse; 8 | 9 | beforeEach(module('ngSanitize')); 10 | beforeEach(module('mgcrea.ngStrap.scrollspy')); 11 | 12 | beforeEach(inject(function (_$rootScope_, _$compile_) { 13 | scope = _$rootScope_.$new(); 14 | $compile = _$compile_; 15 | sandboxEl = $('
').attr('id', 'sandbox').appendTo('body'); 16 | })); 17 | 18 | afterEach(function() { 19 | sandboxEl.remove(); 20 | scope.$destroy(); 21 | }); 22 | 23 | // Templates 24 | 25 | var templates = { 26 | 'default': { 27 | element: '
    ' + 28 | '
  • ' + 29 | ' Modal' + 30 | '
  • ' + 31 | '
' 32 | } 33 | }; 34 | 35 | function compileDirective(template, locals) { 36 | template = templates[template]; 37 | angular.extend(scope, template.scope, locals); 38 | var element = $(template.element).appendTo(sandboxEl); 39 | element = $compile(element)(scope); 40 | scope.$digest(); 41 | return jQuery(element[0]); 42 | } 43 | 44 | // Tests 45 | 46 | describe('default', function () { 47 | 48 | 49 | it('should support window.scrollTo', function() { 50 | var elm = compileDirective('default'); 51 | // var windowEl = angular.element(window); 52 | // windowEl.on('scroll', function() { 53 | // dump('scroll'); 54 | // }); 55 | // windowEl[0].scrollTo(0, 200); 56 | // setTimeout(function() { 57 | // mouse.scroll(0, 100); 58 | // expect(windowEl[0].pageYOffset).toEqual(100); 59 | // done(); 60 | // }, 1000); 61 | 62 | // @bug karma does not suppport scrollTo 63 | // github.com/karma-runner/karma/issues/345 64 | expect(1).toBe(1); 65 | }); 66 | 67 | it('should not throw when clicking on scroll element', function() { 68 | // IE 9 throws an error if we use 'this' instead of '$scrollspy' 69 | // in the scroll element click handler 70 | var elm = compileDirective('default'); 71 | expect(function() { angular.element(window).triggerHandler('click'); }).not.toThrow(); 72 | }); 73 | 74 | }); 75 | 76 | }); 77 | -------------------------------------------------------------------------------- /src/datepicker/datepicker.tpl.html: -------------------------------------------------------------------------------- 1 | 52 | -------------------------------------------------------------------------------- /dist/modules/button.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.button',[]).provider('$button',function(){var e=this.defaults={activeClass:'active',toggleEvent:'click'};this.$get=function(){return{defaults:e}}}).directive('bsCheckboxGroup',function(){return{restrict:'A',require:'ngModel',compile:function(e,t){e.attr('data-toggle','buttons'),e.removeAttr('ng-model');var r=e[0].querySelectorAll('input[type="checkbox"]');angular.forEach(r,function(e){var r=angular.element(e);r.attr('bs-checkbox',''),r.attr('ng-model',t.ngModel+'.'+r.attr('value'))})}}}).directive('bsCheckbox',['$button','$$rAF',function(e,t){var r=e.defaults,n=/^(true|false|\d+)$/;return{restrict:'A',require:'ngModel',link:function(e,a,u,l){var o=r,i='INPUT'===a[0].nodeName,c=i?a.parent():a,s=!angular.isDefined(u.trueValue)||u.trueValue;n.test(u.trueValue)&&(s=e.$eval(u.trueValue));var d=!!angular.isDefined(u.falseValue)&&u.falseValue;n.test(u.falseValue)&&(d=e.$eval(u.falseValue));var f='boolean'!=typeof s||'boolean'!=typeof d;f&&(l.$parsers.push(function(e){return e?s:d}),l.$formatters.push(function(e){return angular.equals(e,s)})),l.$render=function(){var e=!!l.$viewValue;t(function(){i&&(a[0].checked=e),c.toggleClass(o.activeClass,e)})},a.bind(o.toggleEvent,function(){e.$apply(function(){i||l.$setViewValue(!c.hasClass('active')),l.$render()})})}}}]).directive('bsRadioGroup',function(){return{restrict:'A',require:'ngModel',compile:function(e,t){e.attr('data-toggle','buttons'),e.removeAttr('ng-model');var r=e[0].querySelectorAll('input[type="radio"]');angular.forEach(r,function(e){angular.element(e).attr('bs-radio',''),angular.element(e).attr('ng-model',t.ngModel)})}}}).directive('bsRadio',['$button','$$rAF',function(e,t){var r=e.defaults,n=/^(true|false|\d+)$/;return{restrict:'A',require:'ngModel',link:function(e,a,u,l){var o,i=r,c='INPUT'===a[0].nodeName,s=c?a.parent():a;u.$observe('value',function(t){o='boolean'!=typeof t&&n.test(t)?e.$eval(t):t,l.$render()}),l.$render=function(){var e=angular.equals(l.$viewValue,o);t(function(){c&&(a[0].checked=e),s.toggleClass(i.activeClass,e)})},a.bind(i.toggleEvent,function(){e.$apply(function(){l.$setViewValue(o),l.$render()})})}}}]); 9 | //# sourceMappingURL=button.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/popover.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.popover',['mgcrea.ngStrap.tooltip']).provider('$popover',function(){var e=this.defaults={animation:'am-fade',customClass:'',container:!1,target:!1,placement:'right',templateUrl:'popover/popover.tpl.html',contentTemplate:!1,trigger:'click',keyboard:!0,html:!1,title:'',content:'',delay:0,autoClose:!1};this.$get=['$tooltip',function(t){function n(n,a){var o=angular.extend({},e,a),r=t(n,o);return o.content&&(r.$scope.content=o.content),r}return n}]}).directive('bsPopover',['$window','$sce','$popover',function(e,t,n){var a=e.requestAnimationFrame||e.setTimeout;return{restrict:'EAC',scope:!0,link:function(e,o,r){var i,l={scope:e};angular.forEach(['template','templateUrl','controller','controllerAs','contentTemplate','placement','container','delay','trigger','html','animation','customClass','autoClose','id','prefixClass','prefixEvent','bsEnabled'],function(e){angular.isDefined(r[e])&&(l[e]=r[e])});var c=/^(false|0|)$/i;angular.forEach(['html','container','autoClose'],function(e){angular.isDefined(r[e])&&c.test(r[e])&&(l[e]=!1)}),angular.forEach(['onBeforeShow','onShow','onBeforeHide','onHide'],function(t){var n='bs'+t.charAt(0).toUpperCase()+t.slice(1);angular.isDefined(r[n])&&(l[t]=e.$eval(r[n]))});var s=o.attr('data-target');angular.isDefined(s)&&(c.test(s)?l.target=!1:l.target=s),angular.forEach(['title','content'],function(n){r[n]&&r.$observe(n,function(o,r){e[n]=t.trustAsHtml(o),angular.isDefined(r)&&a(function(){i&&i.$applyPlacement()})})}),r.bsPopover&&e.$watch(r.bsPopover,function(t,n){angular.isObject(t)?angular.extend(e,t):e.content=t,angular.isDefined(n)&&a(function(){i&&i.$applyPlacement()})},!0),r.bsShow&&e.$watch(r.bsShow,function(e,t){i&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(popover),?/i)),e===!0?i.show():i.hide())}),r.bsEnabled&&e.$watch(r.bsEnabled,function(e){i&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|1|,?(popover),?/i)),e===!1?i.setEnabled(!1):i.setEnabled(!0))}),r.viewport&&e.$watch(r.viewport,function(e){i&&angular.isDefined(e)&&i.setViewport(e)}),i=n(o,l),e.$on('$destroy',function(){i&&i.destroy(),l=null,i=null})}}}]); 9 | //# sourceMappingURL=popover.min.js.map 10 | -------------------------------------------------------------------------------- /test/~1.2.0/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | 4 | 'use strict'; 5 | 6 | module.exports = function(config) { 7 | 8 | config.set({ 9 | 10 | // base path, that will be used to resolve files and exclude 11 | basePath: './../..', 12 | 13 | // testing framework to use (jasmine/mocha/qunit/...) 14 | frameworks: ['jasmine'], 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'test/~1.2.0/components/angular.js', 19 | 'test/~1.2.0/components/angular-animate.js', 20 | 'test/~1.2.0/components/angular-sanitize.js', 21 | 'test/~1.2.0/components/angular-mocks.js', 22 | 'bower_components/jquery/dist/jquery.js', 23 | 'src/{,*/}*.js', 24 | '.tmp/modules/*.tpl.min.js', 25 | 'test/helpers.js', 26 | // 'test/mock/**/*.js', 27 | // 'test/spec/**/*.js', 28 | 'src/{,*/}/test/*.spec.js' 29 | ], 30 | 31 | // list of files / patterns to exclude 32 | exclude: [ 33 | ], 34 | 35 | // test results reporter to use 36 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 37 | reporters: ['progress', 'coverage'], 38 | 39 | // web server port 40 | port: 8080, 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | // enable / disable watching file and executing tests whenever any file changes 47 | autoWatch: false, 48 | 49 | // Start these browsers, currently available: 50 | // - Chrome 51 | // - ChromeCanary 52 | // - Firefox 53 | // - Opera 54 | // - Safari (only Mac) 55 | // - PhantomJS 56 | // - IE (only Windows) 57 | browsers: ['Chrome'], 58 | 59 | // Continuous Integration mode 60 | // if true, it capture browsers, run tests and exit 61 | singleRun: false, 62 | 63 | preprocessors: { 64 | 'src/{,*/}*.js': 'coverage' 65 | }, 66 | 67 | plugins: [ 68 | 'karma-jasmine', 69 | 'karma-phantomjs-launcher', 70 | 'karma-coverage' 71 | ], 72 | 73 | // Coverage reporter generates the coverage 74 | coverageReporter: { 75 | reporters:[ 76 | {type: 'lcov', dir:'test/coverage/'}, 77 | {type: 'text-summary', dir:'test/coverage/'} 78 | ] 79 | } 80 | 81 | }); 82 | 83 | }; 84 | -------------------------------------------------------------------------------- /test/~1.3.0/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | 4 | 'use strict'; 5 | 6 | module.exports = function(config) { 7 | 8 | config.set({ 9 | 10 | // base path, that will be used to resolve files and exclude 11 | basePath: './../..', 12 | 13 | // testing framework to use (jasmine/mocha/qunit/...) 14 | frameworks: ['jasmine'], 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'test/~1.3.0/components/angular.js', 19 | 'test/~1.3.0/components/angular-animate.js', 20 | 'test/~1.3.0/components/angular-sanitize.js', 21 | 'test/~1.3.0/components/angular-mocks.js', 22 | 'bower_components/jquery/dist/jquery.js', 23 | 'src/{,*/}*.js', 24 | '.tmp/modules/*.tpl.min.js', 25 | 'test/helpers.js', 26 | // 'test/mock/**/*.js', 27 | // 'test/spec/**/*.js', 28 | 'src/{,*/}/test/*.spec.js' 29 | ], 30 | 31 | // list of files / patterns to exclude 32 | exclude: [ 33 | ], 34 | 35 | // test results reporter to use 36 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 37 | reporters: ['progress', 'coverage'], 38 | 39 | // web server port 40 | port: 8080, 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | // enable / disable watching file and executing tests whenever any file changes 47 | autoWatch: false, 48 | 49 | // Start these browsers, currently available: 50 | // - Chrome 51 | // - ChromeCanary 52 | // - Firefox 53 | // - Opera 54 | // - Safari (only Mac) 55 | // - PhantomJS 56 | // - IE (only Windows) 57 | browsers: ['Chrome'], 58 | 59 | // Continuous Integration mode 60 | // if true, it capture browsers, run tests and exit 61 | singleRun: false, 62 | 63 | preprocessors: { 64 | 'src/{,*/}*.js': 'coverage' 65 | }, 66 | 67 | plugins: [ 68 | 'karma-jasmine', 69 | 'karma-phantomjs-launcher', 70 | 'karma-coverage' 71 | ], 72 | 73 | // Coverage reporter generates the coverage 74 | coverageReporter: { 75 | reporters:[ 76 | {type: 'lcov', dir:'test/coverage/'}, 77 | {type: 'text-summary', dir:'test/coverage/'} 78 | ] 79 | } 80 | 81 | }); 82 | 83 | }; 84 | -------------------------------------------------------------------------------- /test/~1.4.0/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | 4 | 'use strict'; 5 | 6 | module.exports = function(config) { 7 | 8 | config.set({ 9 | 10 | // base path, that will be used to resolve files and exclude 11 | basePath: './../..', 12 | 13 | // testing framework to use (jasmine/mocha/qunit/...) 14 | frameworks: ['jasmine'], 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'test/~1.4.0/components/angular.js', 19 | 'test/~1.4.0/components/angular-animate.js', 20 | 'test/~1.4.0/components/angular-sanitize.js', 21 | 'test/~1.4.0/components/angular-mocks.js', 22 | 'bower_components/jquery/dist/jquery.js', 23 | 'src/{,*/}*.js', 24 | '.tmp/modules/*.tpl.min.js', 25 | 'test/helpers.js', 26 | // 'test/mock/**/*.js', 27 | // 'test/spec/**/*.js', 28 | 'src/{,*/}/test/*.spec.js' 29 | ], 30 | 31 | // list of files / patterns to exclude 32 | exclude: [ 33 | ], 34 | 35 | // test results reporter to use 36 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 37 | reporters: ['progress', 'coverage'], 38 | 39 | // web server port 40 | port: 8080, 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | // enable / disable watching file and executing tests whenever any file changes 47 | autoWatch: false, 48 | 49 | // Start these browsers, currently available: 50 | // - Chrome 51 | // - ChromeCanary 52 | // - Firefox 53 | // - Opera 54 | // - Safari (only Mac) 55 | // - PhantomJS 56 | // - IE (only Windows) 57 | browsers: ['Chrome'], 58 | 59 | // Continuous Integration mode 60 | // if true, it capture browsers, run tests and exit 61 | singleRun: false, 62 | 63 | preprocessors: { 64 | 'src/{,*/}*.js': 'coverage' 65 | }, 66 | 67 | plugins: [ 68 | 'karma-jasmine', 69 | 'karma-phantomjs-launcher', 70 | 'karma-coverage' 71 | ], 72 | 73 | // Coverage reporter generates the coverage 74 | coverageReporter: { 75 | reporters:[ 76 | {type: 'lcov', dir:'test/coverage/'}, 77 | {type: 'text-summary', dir:'test/coverage/'} 78 | ] 79 | } 80 | 81 | }); 82 | 83 | }; 84 | -------------------------------------------------------------------------------- /test/~1.5.0/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | 4 | 'use strict'; 5 | 6 | module.exports = function(config) { 7 | 8 | config.set({ 9 | 10 | // base path, that will be used to resolve files and exclude 11 | basePath: './../..', 12 | 13 | // testing framework to use (jasmine/mocha/qunit/...) 14 | frameworks: ['jasmine'], 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'test/~1.5.0/components/angular.js', 19 | 'test/~1.5.0/components/angular-animate.js', 20 | 'test/~1.5.0/components/angular-sanitize.js', 21 | 'test/~1.5.0/components/angular-mocks.js', 22 | 'bower_components/jquery/dist/jquery.js', 23 | 'src/{,*/}*.js', 24 | '.tmp/modules/*.tpl.min.js', 25 | 'test/helpers.js', 26 | // 'test/mock/**/*.js', 27 | // 'test/spec/**/*.js', 28 | 'src/{,*/}/test/*.spec.js' 29 | ], 30 | 31 | // list of files / patterns to exclude 32 | exclude: [ 33 | ], 34 | 35 | // test results reporter to use 36 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 37 | reporters: ['progress', 'coverage'], 38 | 39 | // web server port 40 | port: 8080, 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | // enable / disable watching file and executing tests whenever any file changes 47 | autoWatch: false, 48 | 49 | // Start these browsers, currently available: 50 | // - Chrome 51 | // - ChromeCanary 52 | // - Firefox 53 | // - Opera 54 | // - Safari (only Mac) 55 | // - PhantomJS 56 | // - IE (only Windows) 57 | browsers: ['Chrome'], 58 | 59 | // Continuous Integration mode 60 | // if true, it capture browsers, run tests and exit 61 | singleRun: false, 62 | 63 | preprocessors: { 64 | 'src/{,*/}*.js': 'coverage' 65 | }, 66 | 67 | plugins: [ 68 | 'karma-jasmine', 69 | 'karma-phantomjs-launcher', 70 | 'karma-coverage' 71 | ], 72 | 73 | // Coverage reporter generates the coverage 74 | coverageReporter: { 75 | reporters:[ 76 | {type: 'lcov', dir:'test/coverage/'}, 77 | {type: 'text-summary', dir:'test/coverage/'} 78 | ] 79 | } 80 | 81 | }); 82 | 83 | }; 84 | -------------------------------------------------------------------------------- /test/~1.6.0/karma.conf.js: -------------------------------------------------------------------------------- 1 | // Karma configuration 2 | // http://karma-runner.github.io/0.12/config/configuration-file.html 3 | 4 | 'use strict'; 5 | 6 | module.exports = function(config) { 7 | 8 | config.set({ 9 | 10 | // base path, that will be used to resolve files and exclude 11 | basePath: './../..', 12 | 13 | // testing framework to use (jasmine/mocha/qunit/...) 14 | frameworks: ['jasmine'], 15 | 16 | // list of files / patterns to load in the browser 17 | files: [ 18 | 'test/~1.6.0/components/angular.js', 19 | 'test/~1.6.0/components/angular-animate.js', 20 | 'test/~1.6.0/components/angular-sanitize.js', 21 | 'test/~1.6.0/components/angular-mocks.js', 22 | 'bower_components/jquery/dist/jquery.js', 23 | 'src/{,*/}*.js', 24 | '.tmp/modules/*.tpl.min.js', 25 | 'test/helpers.js', 26 | // 'test/mock/**/*.js', 27 | // 'test/spec/**/*.js', 28 | 'src/{,*/}/test/*.spec.js' 29 | ], 30 | 31 | // list of files / patterns to exclude 32 | exclude: [ 33 | ], 34 | 35 | // test results reporter to use 36 | // possible values: 'dots', 'progress', 'junit', 'growl', 'coverage' 37 | reporters: ['progress', 'coverage'], 38 | 39 | // web server port 40 | port: 8080, 41 | 42 | // level of logging 43 | // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG 44 | logLevel: config.LOG_INFO, 45 | 46 | // enable / disable watching file and executing tests whenever any file changes 47 | autoWatch: false, 48 | 49 | // Start these browsers, currently available: 50 | // - Chrome 51 | // - ChromeCanary 52 | // - Firefox 53 | // - Opera 54 | // - Safari (only Mac) 55 | // - PhantomJS 56 | // - IE (only Windows) 57 | browsers: ['Chrome'], 58 | 59 | // Continuous Integration mode 60 | // if true, it capture browsers, run tests and exit 61 | singleRun: false, 62 | 63 | preprocessors: { 64 | 'src/{,*/}*.js': 'coverage' 65 | }, 66 | 67 | plugins: [ 68 | 'karma-jasmine', 69 | 'karma-phantomjs-launcher', 70 | 'karma-coverage' 71 | ], 72 | 73 | // Coverage reporter generates the coverage 74 | coverageReporter: { 75 | reporters:[ 76 | {type: 'lcov', dir:'test/coverage/'}, 77 | {type: 'text-summary', dir:'test/coverage/'} 78 | ] 79 | } 80 | 81 | }); 82 | 83 | }; 84 | -------------------------------------------------------------------------------- /dist/modules/dimensions.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.helpers.dimensions',[]).factory('dimensions',function(){function t(t){var n=t.ownerDocument,s=t.offsetParent||n;if(o(s,'#document'))return n.documentElement;for(;s&&!o(s,'html')&&'static'===e.css(s,'position');)s=s.offsetParent;return s||n.documentElement}var e={},o=e.nodeName=function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()};return e.css=function(t,e,o){var n;return n=t.currentStyle?t.currentStyle[e]:window.getComputedStyle?window.getComputedStyle(t)[e]:t.style[e],o===!0?parseFloat(n)||0:n},e.offset=function(t){var e=t.getBoundingClientRect(),o=t.ownerDocument;return{width:e.width||t.offsetWidth,height:e.height||t.offsetHeight,top:e.top+(window.pageYOffset||o.documentElement.scrollTop)-(o.documentElement.clientTop||0),left:e.left+(window.pageXOffset||o.documentElement.scrollLeft)-(o.documentElement.clientLeft||0)}},e.setOffset=function(t,o,n){var s,i,r,f,c,l,d,a=e.css(t,'position'),u=angular.element(t),p={};'static'===a&&(t.style.position='relative'),c=e.offset(t),r=e.css(t,'top'),l=e.css(t,'left'),d=('absolute'===a||'fixed'===a)&&(r+l).indexOf('auto')>-1,d?(s=e.position(t),f=s.top,i=s.left):(f=parseFloat(r)||0,i=parseFloat(l)||0),angular.isFunction(o)&&(o=o.call(t,n,c)),null!==o.top&&(p.top=o.top-c.top+f),null!==o.left&&(p.left=o.left-c.left+i),'using'in o?o.using.call(u,p):u.css({top:p.top+'px',left:p.left+'px'})},e.position=function(n){var s,i,r={top:0,left:0};return'fixed'===e.css(n,'position')?i=n.getBoundingClientRect():(s=t(n),i=e.offset(n),o(s,'html')||(r=e.offset(s)),r.top+=e.css(s,'borderTopWidth',!0),r.left+=e.css(s,'borderLeftWidth',!0)),{width:n.offsetWidth,height:n.offsetHeight,top:i.top-r.top-e.css(n,'marginTop',!0),left:i.left-r.left-e.css(n,'marginLeft',!0)}},e.height=function(t,o){var n=t.offsetHeight;return o?n+=e.css(t,'marginTop',!0)+e.css(t,'marginBottom',!0):n-=e.css(t,'paddingTop',!0)+e.css(t,'paddingBottom',!0)+e.css(t,'borderTopWidth',!0)+e.css(t,'borderBottomWidth',!0),n},e.width=function(t,o){var n=t.offsetWidth;return o?n+=e.css(t,'marginLeft',!0)+e.css(t,'marginRight',!0):n-=e.css(t,'paddingLeft',!0)+e.css(t,'paddingRight',!0)+e.css(t,'borderLeftWidth',!0)+e.css(t,'borderRightWidth',!0),n},e}); 9 | //# sourceMappingURL=dimensions.min.js.map 10 | -------------------------------------------------------------------------------- /docs/styles/docs/sidebar.less: -------------------------------------------------------------------------------- 1 | /* 2 | * Side navigation 3 | * 4 | * Scrollspy and affixed enhanced navigation to highlight sections and secondary 5 | * sections of docs content. 6 | */ 7 | // @primary-color hsl(263, 29%, 46%) -> hsl(264, 34%, 36%) 8 | 9 | /* By default it's not affixed in mobile views, so undo that */ 10 | .bs-sidebar.affix { 11 | @media (max-width: @screen-sm-max) { 12 | position: static !important; 13 | } 14 | } 15 | 16 | // @media (min-width: 768px) { 17 | // .bs-sidebar { 18 | // padding-right: 20px; 19 | // margin-right: 21px; 20 | // } 21 | // } 22 | 23 | /* First level of nav */ 24 | .bs-sidenav { 25 | margin-top: 40px; 26 | margin-bottom: 20px; 27 | width: 124px; 28 | } 29 | 30 | /* All levels of nav */ 31 | .bs-sidebar .nav > li > a { 32 | display: block; 33 | font-size: 13px; 34 | font-weight: 500; 35 | color: hsl(0, 0%, 60%); 36 | padding: 4px 15px; 37 | text-align: right; 38 | } 39 | .bs-sidebar .nav > li > a:hover, 40 | .bs-sidebar .nav > li > a:focus { 41 | padding-right: 15px - 1px; 42 | color: @docs-color; 43 | text-decoration: none; 44 | background-color: transparent; 45 | border-right: 1px solid @docs-color; 46 | } 47 | .bs-sidebar .nav > .active > a, 48 | .bs-sidebar .nav > .active:hover > a, 49 | .bs-sidebar .nav > .active:focus > a { 50 | padding-right: 15px - 2px; 51 | font-weight: bold; 52 | color: @docs-color; 53 | background-color: transparent; 54 | border-right: 2px solid @docs-color; 55 | } 56 | 57 | /* Nav: second level (shown on .active) */ 58 | .bs-sidebar .nav .nav { 59 | display: none; /* Hide by default, but at >768px, show it */ 60 | padding-bottom: 10px; 61 | } 62 | .bs-sidebar .nav .nav > li > a { 63 | padding-top: 2px; 64 | padding-bottom: 2px; 65 | padding-right: 30px; 66 | font-size: 12px; 67 | font-weight: normal; 68 | } 69 | .bs-sidebar .nav .nav > li > a:hover, 70 | .bs-sidebar .nav .nav > li > a:focus { 71 | padding-right: 29px; 72 | } 73 | .bs-sidebar .nav .nav > .active > a, 74 | .bs-sidebar .nav .nav > .active:hover > a, 75 | .bs-sidebar .nav .nav > .active:focus > a { 76 | font-weight: 500; 77 | padding-right: 28px; 78 | } 79 | 80 | /* Show and affix the side nav when space allows it */ 81 | @media (min-width: 992px) { 82 | .bs-sidebar .nav > .active > ul { 83 | display: block; 84 | } 85 | .bs-sidebar.affix-bottom .bs-sidenav, 86 | .bs-sidebar.affix .bs-sidenav { 87 | margin-top: 0; 88 | margin-bottom: 0; 89 | } 90 | } 91 | @media (min-width: 1200px) { 92 | /* Widen the fixed sidebar again */ 93 | .bs-sidebar { 94 | margin-right: 30px; 95 | } 96 | } 97 | -------------------------------------------------------------------------------- /dist/modules/parse-options.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.helpers.parseOptions', []).provider('$parseOptions', function() { 11 | var defaults = this.defaults = { 12 | regexp: /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/ 13 | }; 14 | this.$get = [ '$parse', '$q', function($parse, $q) { 15 | function ParseOptionsFactory(attr, config) { 16 | var $parseOptions = {}; 17 | var options = angular.extend({}, defaults, config); 18 | $parseOptions.$values = []; 19 | var match; 20 | var displayFn; 21 | var valueName; 22 | var keyName; 23 | var groupByFn; 24 | var valueFn; 25 | var valuesFn; 26 | $parseOptions.init = function() { 27 | $parseOptions.$match = match = attr.match(options.regexp); 28 | displayFn = $parse(match[2] || match[1]); 29 | valueName = match[4] || match[6]; 30 | keyName = match[5]; 31 | groupByFn = $parse(match[3] || ''); 32 | valueFn = $parse(match[2] ? match[1] : valueName); 33 | valuesFn = $parse(match[7]); 34 | }; 35 | $parseOptions.valuesFn = function(scope, controller) { 36 | return $q.when(valuesFn(scope, controller)).then(function(values) { 37 | if (!angular.isArray(values)) { 38 | values = []; 39 | } 40 | $parseOptions.$values = values.length ? parseValues(values, scope) : []; 41 | return $parseOptions.$values; 42 | }); 43 | }; 44 | $parseOptions.displayValue = function(modelValue) { 45 | var scope = {}; 46 | scope[valueName] = modelValue; 47 | return displayFn(scope); 48 | }; 49 | function parseValues(values, scope) { 50 | return values.map(function(match, index) { 51 | var locals = {}; 52 | var label; 53 | var value; 54 | locals[valueName] = match; 55 | label = displayFn(scope, locals); 56 | value = valueFn(scope, locals); 57 | return { 58 | label: label, 59 | value: value, 60 | index: index 61 | }; 62 | }); 63 | } 64 | $parseOptions.init(); 65 | return $parseOptions; 66 | } 67 | return ParseOptionsFactory; 68 | } ]; 69 | }); -------------------------------------------------------------------------------- /dist/modules/tab.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.tab',[]).provider('$tab',function(){var e=this.defaults={animation:'am-fade',template:'tab/tab.tpl.html',navClass:'nav-tabs',activeClass:'active'},n=this.controller=function(n,a,t){var s=this;s.$options=angular.copy(e),angular.forEach(['animation','navClass','activeClass'],function(e){angular.isDefined(t[e])&&(s.$options[e]=t[e])}),n.$navClass=s.$options.navClass,n.$activeClass=s.$options.activeClass,s.$panes=n.$panes=[],s.$activePaneChangeListeners=s.$viewChangeListeners=[],s.$push=function(e){angular.isUndefined(s.$panes.$active)&&n.$setActive(e.name||0),s.$panes.push(e)},s.$remove=function(e){var n,a=s.$panes.indexOf(e),t=s.$panes.$active;n=angular.isString(t)?s.$panes.map(function(e){return e.name}).indexOf(t):s.$panes.$active,s.$panes.splice(a,1),a=0&&n li > a { 22 | .transition(color .15s linear); 23 | color: spin(desaturate(lighten(@docs-color, 46%), 5%), 1); 24 | } 25 | .bs-docs-nav .navbar-nav > li > a:hover { 26 | color: #fff; 27 | } 28 | .bs-docs-nav .navbar-nav > .active > a, 29 | .bs-docs-nav .navbar-nav > .active > a:hover { 30 | background-color: darken(@docs-color, 6%); 31 | color: #fff; 32 | } 33 | .bs-docs-nav .navbar-toggle { 34 | border-color: @docs-color; 35 | } 36 | .bs-docs-nav .navbar-toggle:hover { 37 | border-color: darken(@docs-color, 6%); 38 | background-color: darken(@docs-color, 6%); 39 | } 40 | 41 | 42 | .navbar-toggle { 43 | @media (max-width: @screen-sm-max) { 44 | margin-left: 15px; 45 | display: block !important; 46 | float: left; 47 | } 48 | } 49 | 50 | // Main navigation 51 | // 52 | // Turn the `.navbar` at the top of the docs purple. 53 | // @primary-color hsl(263, 29%, 46%); 54 | // @version 3.1.0 55 | // 56 | 57 | // .bs-docs-nav { 58 | // margin-bottom: 0; 59 | // border-bottom: 0; 60 | // background-color: #fff; 61 | // } 62 | // .bs-home-nav .bs-nav-b { 63 | // display: none; 64 | // } 65 | // .bs-docs-nav .navbar-brand, 66 | // .bs-docs-nav .navbar-nav > li > a { 67 | // // color: hsl(264, 34%, 36%); 68 | // color: spin(saturate(lighten(@docs-color, 10%), 5%), 1); 69 | // font-weight: 500; 70 | // } 71 | // .bs-docs-nav .navbar-nav > li > a:hover, 72 | // .bs-docs-nav .navbar-nav > .active > a, 73 | // .bs-docs-nav .navbar-nav > .active > a:hover { 74 | // background-color: @white-bg-color; 75 | // // color: hsl(264, 34%, 30%); 76 | // color: spin(saturate(lighten(@docs-color, 16%), 5%), 1); 77 | // } 78 | // .bs-docs-nav .navbar-toggle .icon-bar { 79 | // // background-color: hsl(264, 34%, 36%); 80 | // background-color: spin(saturate(lighten(@docs-color, 10%), 5%), 1); 81 | // } 82 | // .bs-docs-nav .navbar-header .navbar-toggle { 83 | // border-color: #fff; 84 | // } 85 | // .bs-docs-nav .navbar-header .navbar-toggle:hover, 86 | // .bs-docs-nav .navbar-header .navbar-toggle:focus { 87 | // border-color: @white-bg-color; 88 | // background-color: @white-bg-color; 89 | // } 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /src/helpers/parse-options.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | angular.module('mgcrea.ngStrap.helpers.parseOptions', []) 4 | 5 | .provider('$parseOptions', function () { 6 | 7 | var defaults = this.defaults = { 8 | regexp: /^\s*(.*?)(?:\s+as\s+(.*?))?(?:\s+group\s+by\s+(.*))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+(.*?)(?:\s+track\s+by\s+(.*?))?$/ 9 | }; 10 | 11 | this.$get = function ($parse, $q) { 12 | 13 | function ParseOptionsFactory (attr, config) { 14 | 15 | var $parseOptions = {}; 16 | 17 | // Common vars 18 | var options = angular.extend({}, defaults, config); 19 | $parseOptions.$values = []; 20 | 21 | // Private vars 22 | var match; 23 | var displayFn; 24 | var valueName; 25 | /* eslint-disable no-unused-vars */ 26 | var keyName; 27 | var groupByFn; 28 | /* eslint-enable no-unused-vars */ 29 | var valueFn; 30 | var valuesFn; 31 | 32 | $parseOptions.init = function () { 33 | $parseOptions.$match = match = attr.match(options.regexp); 34 | displayFn = $parse(match[2] || match[1]); 35 | valueName = match[4] || match[6]; 36 | keyName = match[5]; 37 | groupByFn = $parse(match[3] || ''); 38 | valueFn = $parse(match[2] ? match[1] : valueName); 39 | valuesFn = $parse(match[7]); 40 | }; 41 | 42 | $parseOptions.valuesFn = function (scope, controller) { 43 | return $q.when(valuesFn(scope, controller)) 44 | .then(function (values) { 45 | if (!angular.isArray(values)) { 46 | values = []; 47 | } 48 | $parseOptions.$values = values.length ? parseValues(values, scope) : []; 49 | return $parseOptions.$values; 50 | }); 51 | }; 52 | 53 | $parseOptions.displayValue = function (modelValue) { 54 | var scope = {}; 55 | scope[valueName] = modelValue; 56 | return displayFn(scope); 57 | }; 58 | 59 | // Private functions 60 | 61 | function parseValues (values, scope) { 62 | return values.map(function (match, index) { 63 | var locals = {}; 64 | var label; 65 | var value; 66 | locals[valueName] = match; 67 | label = displayFn(scope, locals); 68 | value = valueFn(scope, locals); 69 | return {label: label, value: value, index: index}; 70 | }); 71 | } 72 | 73 | $parseOptions.init(); 74 | return $parseOptions; 75 | 76 | } 77 | 78 | return ParseOptionsFactory; 79 | 80 | }; 81 | 82 | }); 83 | -------------------------------------------------------------------------------- /dist/modules/navbar.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["modules/navbar.js"],"names":["angular","module","provider","defaults","activeClass","routeAttr","directive","this","$get","restrict","link","isDefined","key","$navbar","oldValue","options","liElements","element","forEach","li","liElement","scope","$watch","pattern","path","newValue","RegExp","regexp","test","addClass","attr","replace","removeClass"],"mappings":"AAOA,YAEAA,SAIMC,OAAA,4BAAAC,SAAA,UAAA,WAHJ,GAGYC,GAAUA,KAAAA,UAFpBC,YAAa,SACbC,UAAW,mBAMZC,QAAAA,EAICC,MAAAC,KAAA,WACEC,OACAC,SAAMP,MAJTG,UASWN,YAAQW,UAAeC,YAAeA,UAAYA,SAAAA,EAAAA,EAAAA,GAR9D,GAAIT,GAAWU,EAAQV,QACvB,QACEM,SAYM,IAXNC,KAaO,SAAoBI,EAAAA,EAAAA,EAAAA,GAZzB,GAcIC,GAAIC,QAAaC,KAAQd,EAb7BH,SAeIA,QAAQkB,OAAQF,KAAAA,GAAsBG,SAAAA,GAEpCnB,QAAIoB,UAAYpB,EAAQiB,MAAQE,EAAAA,GAAAA,EAAAA,MAdtCE,EAgBMC,OAAIP,WAfR,MAgBMQ,GAAUC,QAff,SAASC,EAAUX,GACpB,GAgBIE,GAAaC,EAAIS,GAAOH,iBAAS,MAAAR,EAAAV,UAAA,IAfrCL,SAiBQ2B,QAAOC,EAAKH,SAAWN,GAhB7B,GAiBIC,GAAUS,QAASd,QAAQX,GAhB3BmB,EAiBKH,EAAAU,KAAAf,EAAAV,WAAA0B,QAAA,IAAA,MACLX,GAAUY,SAhBZT,EAAU,IAAMA,EAAU,IAE5B,IAAII,GAAS,GAAID,QAAOH,EAAS,IAC7BI,GAAOC,KAAKH,GACdL,EAAUS,SAASd,EAAQX,aAE3BgB,EAAUY,YAAYjB,EAAQX","file":"navbar.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.navbar', [])\n\n .provider('$navbar', function () {\n\n var defaults = this.defaults = {\n activeClass: 'active',\n routeAttr: 'data-match-route',\n strict: false\n };\n\n this.$get = function () {\n return {defaults: defaults};\n };\n\n })\n\n .directive('bsNavbar', function ($window, $location, $navbar) {\n\n var defaults = $navbar.defaults;\n\n return {\n restrict: 'A',\n link: function postLink (scope, element, attr, controller) {\n\n // Directive options\n var options = angular.copy(defaults);\n angular.forEach(Object.keys(defaults), function (key) {\n if (angular.isDefined(attr[key])) options[key] = attr[key];\n });\n\n // Watch for the $location\n scope.$watch(function () {\n\n return $location.path();\n\n }, function (newValue, oldValue) {\n\n var liElements = element[0].querySelectorAll('li[' + options.routeAttr + ']');\n\n angular.forEach(liElements, function (li) {\n\n var liElement = angular.element(li);\n var pattern = liElement.attr(options.routeAttr).replace('/', '\\\\/');\n if (options.strict) {\n pattern = '^' + pattern + '$';\n }\n var regexp = new RegExp(pattern, 'i');\n\n if (regexp.test(newValue)) {\n liElement.addClass(options.activeClass);\n } else {\n liElement.removeClass(options.activeClass);\n }\n\n });\n\n });\n\n }\n\n };\n\n });\n"]} -------------------------------------------------------------------------------- /src/helpers/test/date-formatter.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | describe('dateUtil', function () { 4 | 5 | var $dateFormatter; 6 | var $locale; 7 | var dateFilter; 8 | 9 | beforeEach(module('mgcrea.ngStrap.helpers.dateFormatter')); 10 | 11 | // mock angular's dateFileter with a spy, 12 | // since we call it directly, not a method of it, we can't use jasmine.spyOn 13 | beforeEach(function() { 14 | dateFilter = jasmine.createSpy('dateFilter'); 15 | module(function ($provide) { 16 | $provide.value('dateFilter', dateFilter); 17 | }) 18 | }); 19 | 20 | beforeEach(inject(function (_$dateFormatter_, _$locale_) { 21 | $dateFormatter = _$dateFormatter_; 22 | $locale = _$locale_; 23 | })); 24 | 25 | describe('getDefaultLocale', function() { 26 | it('should return $locale.id', function() { 27 | expect($dateFormatter.getDefaultLocale()).toBe($locale.id); 28 | 29 | $locale.id = 'fr'; 30 | expect($dateFormatter.getDefaultLocale()).toBe('fr'); 31 | 32 | $locale.id = 'he'; 33 | expect($dateFormatter.getDefaultLocale()).toBe('he'); 34 | }); 35 | }); 36 | 37 | describe('hoursFormat', function() { 38 | it('should return the hours part in a time format', function() { 39 | expect($dateFormatter.hoursFormat('h:mm a')).toBe('h'); //en 40 | expect($dateFormatter.hoursFormat('HH:mm')).toBe('HH'); // fr-fr 41 | expect($dateFormatter.hoursFormat('H.mm')).toBe('H'); // fi 42 | }); 43 | }); 44 | 45 | describe('minutesFormat', function() { 46 | it('should return the minutes part in a time format', function() { 47 | expect($dateFormatter.minutesFormat('h:mm a')).toBe('mm'); 48 | expect($dateFormatter.minutesFormat('HH:mm')).toBe('mm'); 49 | expect($dateFormatter.minutesFormat('H.mm')).toBe('mm'); 50 | }); 51 | }); 52 | 53 | describe('timeSeparator', function() { 54 | it('should return the time-separator part in a time format', function() { 55 | expect($dateFormatter.timeSeparator('h:mm a')).toBe(':'); 56 | expect($dateFormatter.timeSeparator('HH:mm')).toBe(':'); 57 | expect($dateFormatter.timeSeparator('H.mm')).toBe('.'); 58 | }); 59 | }); 60 | 61 | describe('showAM', function() { 62 | it('should return true/false if the time format contains AM/PM part', function() { 63 | expect($dateFormatter.showAM('h:mm a')).toBe(true); 64 | expect($dateFormatter.showAM('HH:mm')).toBe(false); 65 | expect($dateFormatter.showAM('H.mm')).toBe(false); 66 | }); 67 | }); 68 | 69 | describe('formatDate', function() { 70 | it('should call formatDate with only the date and format arguments', function() { 71 | $dateFormatter.formatDate('date', 'format', 'lang', 'timezone'); 72 | expect(dateFilter.calls.count()).toBe(1); 73 | expect(dateFilter.calls.argsFor(0)).toEqual([ 'date', 'format', 'timezone' ]); 74 | }); 75 | }); 76 | 77 | }); -------------------------------------------------------------------------------- /dist/modules/date-formatter.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["modules/date-formatter.js"],"names":["angular","weekdaysShort","lang","splitTimeFormat","timeFormat","exec","format","slice","this","getDefaultLocale","DATETIME_FORMATS","$locale","id","getDatetimeFormat","SHORTDAY","hoursFormat","minutesFormat","secondsFormat","timeSeparator","showSeconds","dateFilter","showAM","formatDate","date","timezone"],"mappings":"AAOA,YAEAA,SAYSC,OAAAA,2CAA0BC,QAAAA,kBAAAA,UAAAA,aAAAA,SAAAA,EAAAA,GAFjC,QAiBWC,GAAgBC,GAhBzB,MAAO,wCAAwCC,KAAKC,GAAQC,MAAM,GAVpEC,KAYIC,iBAAeC,WAXjB,MAAOC,GAAQC,IAEjBJ,KAaIK,kBAAO,SAAAP,EAAAJ,GAZT,MAAOS,GAAQD,iBAAiBJ,IAAWA,GAE7CE,KAeIP,cAAOE,SAAgBC,GAdzB,MAAOO,GAAQD,iBAAiBI,UAKlCN,KAmBIO,YAAOZ,SAAgBC,GAlBzB,MAAOD,GAAgBC,GAAY,IAErCI,KAqBIQ,cAAOb,SAAgBC,GApBzB,MAAOD,GAAgBC,GAAY,IAErCI,KAuBIS,cAASd,SAAgBC,GAtB3B,MAAOD,GAAgBC,GAAY,IAErCI,KAyBIU,cAASf,SAAgBC,GAxB3B,MAAOD,GAAgBC,GAAY,IAErCI,KA0BIW,YAAOC,SAAiBd,GAzB1B,QAASH,EAAgBC,GAAY,IAEvCI,KAAKa,OAAS,SAASjB,GACrB,QAASD,EAAgBC,GAAY,IAEvCI,KAAKc,WAAa,SAASC,EAAMjB,EAAQJ,EAAMsB,GAC7C,MAAOJ,GAAWG,EAAMjB,EAAQkB","file":"date-formatter.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.helpers.dateFormatter', [])\n\n .service('$dateFormatter', function ($locale, dateFilter) {\n\n // The unused `lang` arguments are on purpose. The default implementation does not\n // use them and it always uses the locale loaded into the `$locale` service.\n // Custom implementations might use it, thus allowing different directives to\n // have different languages.\n\n this.getDefaultLocale = function () {\n return $locale.id;\n };\n\n // Format is either a data format name, e.g. \"shortTime\" or \"fullDate\", or a date format\n // Return either the corresponding date format or the given date format.\n this.getDatetimeFormat = function (format, lang) {\n return $locale.DATETIME_FORMATS[format] || format;\n };\n\n this.weekdaysShort = function (lang) {\n return $locale.DATETIME_FORMATS.SHORTDAY;\n };\n\n function splitTimeFormat (format) {\n return /(h+)([:\\.])?(m+)([:\\.])?(s*)[ ]?(a?)/i.exec(format).slice(1);\n }\n\n // h:mm a => h\n this.hoursFormat = function (timeFormat) {\n return splitTimeFormat(timeFormat)[0];\n };\n\n // h:mm a => mm\n this.minutesFormat = function (timeFormat) {\n return splitTimeFormat(timeFormat)[2];\n };\n\n // h:mm:ss a => ss\n this.secondsFormat = function (timeFormat) {\n return splitTimeFormat(timeFormat)[4];\n };\n\n // h:mm a => :\n this.timeSeparator = function (timeFormat) {\n return splitTimeFormat(timeFormat)[1];\n };\n\n // h:mm:ss a => true, h:mm a => false\n this.showSeconds = function (timeFormat) {\n return !!splitTimeFormat(timeFormat)[4];\n };\n\n // h:mm a => true, H.mm => false\n this.showAM = function (timeFormat) {\n return !!splitTimeFormat(timeFormat)[5];\n };\n\n this.formatDate = function (date, format, lang, timezone) {\n return dateFilter(date, format, timezone);\n };\n\n });\n"]} -------------------------------------------------------------------------------- /dist/modules/dropdown.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.dropdown',['mgcrea.ngStrap.tooltip']).provider('$dropdown',function(){var e=this.defaults={animation:'am-fade',prefixClass:'dropdown',prefixEvent:'dropdown',placement:'bottom-left',templateUrl:'dropdown/dropdown.tpl.html',trigger:'click',container:!1,keyboard:!0,html:!1,delay:0};this.$get=['$window','$rootScope','$tooltip','$timeout',function(o,n,t,r){function a(o,a){function c(e){if(e.target!==o[0])return e.target!==o[0]&&d.hide()}var d={},s=angular.extend({},e,a);d.$scope=s.scope&&s.scope.$new()||n.$new(),d=t(o,s);var p=o.parent();d.$onKeyDown=function(e){if(/(38|40)/.test(e.keyCode)){e.preventDefault(),e.stopPropagation();var o=angular.element(d.$element[0].querySelectorAll('li:not(.divider) a'));if(o.length){var n;angular.forEach(o,function(e,o){i&&i.call(e,':focus')&&(n=o)}),38===e.keyCode&&n>0?n--:40===e.keyCode&&n=0&&(o.template=t.outerHTML,o.templateUrl=void 0,t.parentNode.removeChild(t))}return function(e,t,r){var a={scope:e};angular.forEach(['template','templateUrl','controller','controllerAs','placement','container','delay','trigger','keyboard','html','animation','id','autoClose'],function(e){angular.isDefined(o[e])&&(a[e]=o[e])});var l=/^(false|0|)$/i;angular.forEach(['html','container'],function(e){angular.isDefined(r[e])&&l.test(r[e])&&(a[e]=!1)}),angular.forEach(['onBeforeShow','onShow','onBeforeHide','onHide'],function(o){var n='bs'+o.charAt(0).toUpperCase()+o.slice(1);angular.isDefined(r[n])&&(a[o]=e.$eval(r[n]))}),r.bsDropdown&&e.$watch(r.bsDropdown,function(o,n){e.content=o},!0);var i=n(t,a);r.bsShow&&e.$watch(r.bsShow,function(e,o){i&&angular.isDefined(e)&&(angular.isString(e)&&(e=!!e.match(/true|,?(dropdown),?/i)),e===!0?i.show():i.hide())}),e.$on('$destroy',function(){i&&i.destroy(),a=null,i=null})}}}}]); 9 | //# sourceMappingURL=dropdown.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/aside.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.aside', [ 'mgcrea.ngStrap.modal' ]).provider('$aside', function() { 11 | var defaults = this.defaults = { 12 | animation: 'am-fade-and-slide-right', 13 | prefixClass: 'aside', 14 | prefixEvent: 'aside', 15 | placement: 'right', 16 | templateUrl: 'aside/aside.tpl.html', 17 | contentTemplate: false, 18 | container: false, 19 | element: null, 20 | backdrop: true, 21 | keyboard: true, 22 | html: false, 23 | show: true 24 | }; 25 | this.$get = [ '$modal', function($modal) { 26 | function AsideFactory(config) { 27 | var $aside = {}; 28 | var options = angular.extend({}, defaults, config); 29 | $aside = $modal(options); 30 | return $aside; 31 | } 32 | return AsideFactory; 33 | } ]; 34 | }).directive('bsAside', [ '$window', '$sce', '$aside', function($window, $sce, $aside) { 35 | return { 36 | restrict: 'EAC', 37 | scope: true, 38 | link: function postLink(scope, element, attr, transclusion) { 39 | var options = { 40 | scope: scope, 41 | element: element, 42 | show: false 43 | }; 44 | angular.forEach([ 'template', 'templateUrl', 'controller', 'controllerAs', 'contentTemplate', 'placement', 'backdrop', 'keyboard', 'html', 'container', 'animation' ], function(key) { 45 | if (angular.isDefined(attr[key])) options[key] = attr[key]; 46 | }); 47 | var falseValueRegExp = /^(false|0|)$/i; 48 | angular.forEach([ 'backdrop', 'keyboard', 'html', 'container' ], function(key) { 49 | if (angular.isDefined(attr[key]) && falseValueRegExp.test(attr[key])) options[key] = false; 50 | }); 51 | angular.forEach([ 'onBeforeShow', 'onShow', 'onBeforeHide', 'onHide' ], function(key) { 52 | var bsKey = 'bs' + key.charAt(0).toUpperCase() + key.slice(1); 53 | if (angular.isDefined(attr[bsKey])) { 54 | options[key] = scope.$eval(attr[bsKey]); 55 | } 56 | }); 57 | angular.forEach([ 'title', 'content' ], function(key) { 58 | if (attr[key]) { 59 | attr.$observe(key, function(newValue, oldValue) { 60 | scope[key] = $sce.trustAsHtml(newValue); 61 | }); 62 | } 63 | }); 64 | if (attr.bsAside) { 65 | scope.$watch(attr.bsAside, function(newValue, oldValue) { 66 | if (angular.isObject(newValue)) { 67 | angular.extend(scope, newValue); 68 | } else { 69 | scope.content = newValue; 70 | } 71 | }, true); 72 | } 73 | var aside = $aside(options); 74 | element.on(attr.trigger || 'click', aside.toggle); 75 | scope.$on('$destroy', function() { 76 | if (aside) aside.destroy(); 77 | options = null; 78 | aside = null; 79 | }); 80 | } 81 | }; 82 | } ]); -------------------------------------------------------------------------------- /docs/styles/docs/docs.less: -------------------------------------------------------------------------------- 1 | @import (reference) "../../bower_components/bootstrap/less/bootstrap"; 2 | 3 | @white-background-color: #f9f9f9; 4 | 5 | @import "examples"; 6 | @import "footer"; 7 | @import "masthead"; 8 | @import "navbar"; 9 | @import "old-docs"; 10 | @import "sidebar"; 11 | 12 | // html, body { 13 | // -webkit-font-smoothing: antialiased; 14 | // font-smoothing: antialiased; 15 | // } 16 | // button, select, textarea, input, pre { 17 | // -webkit-tap-highlight-color: rgba(0, 0, 0, 0); 18 | // font-smoothing: antialiased; 19 | // } 20 | 21 | 22 | .am-fade.aside-backdrop, .am-fade.modal-backdrop { 23 | background-color: rgba(0, 0, 0, .5); 24 | } 25 | .bs-docs-aside { 26 | min-width: 200px; 27 | } 28 | 29 | /* 30 | * Docs sections 31 | * 32 | * Content blocks for each component or feature. 33 | */ 34 | 35 | /* Space things out */ 36 | .bs-docs-section + .bs-docs-section { 37 | // padding-top: 40px; // h1 janky fix does the job 38 | } 39 | 40 | /* Janky fix for preventing navbar from overlapping */ 41 | h1[id] { 42 | padding-top: 80px; 43 | margin-top: -45px; 44 | } 45 | h2[id] { 46 | padding-top: 60px; 47 | margin-top: -45px; 48 | } 49 | 50 | /* 51 | * Page headers 52 | * 53 | * Jumbotron-esque headers at the top of every page that's not the homepage. 54 | */ 55 | 56 | 57 | /* Page headers */ 58 | .bs-header { 59 | padding: 30px 15px 40px; /* side padding builds on .container 15px, so 30px */ 60 | font-size: 16px; 61 | text-align: center; 62 | text-shadow: 0 1px 0 hsla(0, 0%, 0%, 0.15); 63 | } 64 | .bs-header h1 { 65 | color: hsl(0, 0%, 100%); 66 | } 67 | .bs-header p { 68 | font-weight: 300; 69 | line-height: 1.5; 70 | } 71 | .bs-header .container { 72 | position: relative; 73 | } 74 | 75 | @media (min-width: 768px) { 76 | .bs-header { 77 | font-size: 21px; 78 | text-align: left; 79 | } 80 | .bs-header h1 { 81 | font-size: 60px; 82 | line-height: 1; 83 | } 84 | } 85 | 86 | @media (min-width: 992px) { 87 | .bs-header h1, 88 | .bs-header p { 89 | margin-right: 300px; 90 | } 91 | } 92 | 93 | 94 | 95 | /* 96 | * Code snippets 97 | * 98 | * Generated via Pygments and Jekyll, these are snippets of HTML, CSS, and JS. 99 | */ 100 | 101 | .highlight { 102 | display: none; /* hidden by default, until >480px */ 103 | padding: 9px 14px; 104 | margin-bottom: 14px; 105 | background-color: hsl(240, 14%, 97%); 106 | border: 1px solid hsl(240, 13%, 90%); 107 | border-radius: 4px; 108 | } 109 | .highlight pre { 110 | padding: 0; 111 | margin-top: 0; 112 | margin-bottom: 0; 113 | background-color: transparent; 114 | border: 0; 115 | white-space: nowrap; 116 | } 117 | .highlight pre code { 118 | font-size: inherit; 119 | color: hsl(0, 0%, 20%); /* Effectively the base text color */ 120 | } 121 | .highlight pre .lineno { 122 | display: inline-block; 123 | width: 22px; 124 | padding-right: 5px; 125 | margin-right: 10px; 126 | text-align: right; 127 | color: hsl(240, 6%, 76%); 128 | } 129 | 130 | /* Show code snippets when we have the space */ 131 | @media (min-width: 481px) { 132 | .highlight { 133 | display: block; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /dist/modules/timepicker.tpl.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.timepicker').run(['$templateCache',function(t){t.put('timepicker/timepicker.tpl.html','')}]); -------------------------------------------------------------------------------- /src/button/docs/button.demo.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 8 | 9 | 10 |

Examples

11 |

Do more with buttons. Control button states or create groups of buttons for more components like toolbars.

12 |

This modules exposes two directives: bs-checkbox and bs-radio that can be used as attributes to trigger toggle, checkbox or radio behavior.

13 |
14 |

Group directives are also available as shortcuts

15 |

Use bs-checkbox-group and bs-radio-group to easily setup the proper markup at compile time.

16 |
17 | 18 |

Live demo clog.info

19 | 20 |
$scope.button = {{button | json}};
21 |
22 | 23 | 24 | 25 | 26 | 27 |
28 |
29 | 30 | 31 | 32 | 36 |
37 | 38 |
39 |
40 | 41 | 42 | 43 | 47 |
48 | 49 |
50 | 51 |
52 |

Type support

53 |

Theses directives can handle both strings, numbers and booleans values.

54 |
55 | 56 |
57 | -------------------------------------------------------------------------------- /dist/modules/timepicker.tpl.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.timepicker').run([ '$templateCache', function($templateCache) { 11 | $templateCache.put('timepicker/timepicker.tpl.html', ''); 12 | } ]); -------------------------------------------------------------------------------- /src/navbar/docs/navbar.demo.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 8 | 9 | 10 | 11 |

Add quick, dynamic navbar functionality to transition through active/inactive states.

12 | 13 |

Live demo

14 |
$location.path() = "{{$location.path()}}";
15 |
16 | 26 |
27 | 28 | 29 |

Append a bs-navbarattribute to any element to activate the directive.

30 |

Use data-match-route attributes to any children navigation item that should be toggled active.

31 |
32 |

Heads up!

33 |

The directives also supports HTML5 mode, you just have to drop the hash symbol from the href.

34 |
35 | 36 | 37 |

Options

38 |

Options can be passed via data attributes, append the option name to data-, as in data-route-attr="".

39 |
40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 |
Nametypedefaultdescription
activeClassstringactiveClass to apply when the navigation item is active
routeAttrstringdata-match-routeAttribute to test against $location.path()
64 |
65 |
66 |

Default options

67 |

You can override global defaults for the plugin with $navbarProvider.defaults

68 |
69 |
70 |         
71 |           angular.module('myApp')
72 |           .config(function($navbarProvider) {
73 |             angular.extend($navbarProvider.defaults, {
74 |               activeClass: 'in'
75 |             });
76 |           })
77 |         
78 |       
79 |
80 |
81 | 82 |
83 | 84 | -------------------------------------------------------------------------------- /dist/modules/affix.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.affix',['mgcrea.ngStrap.helpers.dimensions','mgcrea.ngStrap.helpers.debounce']).provider('$affix',function(){var t=this.defaults={offsetTop:'auto',inlineStyles:!0,setWidth:!0};this.$get=['$window','debounce','dimensions',function(e,o,s){function n(n,r){function c(t,e,o){var s=l(),n=a();return s<=v?'top':null!==t?s+t<=e.top?'middle':'bottom':null!==P&&e.top+o+g>=n-P?'bottom':'middle'}function l(){return h[0]===e?e.pageYOffset:h[0].scrollTop}function a(){return h[0]===e?e.document.body.scrollHeight:h[0].scrollHeight}var u={},p=angular.extend({},t,r),h=p.target,d='affix affix-top affix-bottom',m=!1,g=0,$=0,v=0,P=0,x=null,y=null,T=n.parent();if(p.offsetParent)if(p.offsetParent.match(/^\d+$/))for(var b=0;b<1*p.offsetParent-1;b++)T=T.parent();else T=angular.element(p.offsetParent);return u.init=function(){this.$parseOffsets(),$=s.offset(n[0]).top+g,m=p.setWidth&&!n[0].style.width,h.on('scroll',this.checkPosition),h.on('click',this.checkPositionWithEventLoop),f.on('resize',this.$debouncedOnResize),this.checkPosition(),this.checkPositionWithEventLoop()},u.destroy=function(){h.off('scroll',this.checkPosition),h.off('click',this.checkPositionWithEventLoop),f.off('resize',this.$debouncedOnResize)},u.checkPositionWithEventLoop=function(){setTimeout(u.checkPosition,1)},u.checkPosition=function(){var t=l(),e=s.offset(n[0]),o=s.height(n[0]),f=c(y,e,o);x!==f&&(x=f,'top'===f?(y=null,m&&n.css('width',''),p.inlineStyles&&(n.css('position',p.offsetParent?'':'relative'),n.css('top',''))):'bottom'===f?(y=p.offsetUnpin?-(1*p.offsetUnpin):e.top-t,m&&n.css('width',''),p.inlineStyles&&(n.css('position',p.offsetParent?'':'relative'),n.css('top',p.offsetParent?'':i[0].offsetHeight-P-o-$+'px'))):(y=null,m&&n.css('width',n[0].offsetWidth+'px'),p.inlineStyles&&(n.css('position','fixed'),n.css('top',g+'px'))),n.removeClass(d).addClass('affix'+('middle'!==f?'-'+f:'')))},u.$onResize=function(){u.$parseOffsets(),u.checkPosition()},u.$debouncedOnResize=o(u.$onResize,50),u.$parseOffsets=function(){var t=n[0].style.position,e=n[0].style.top;p.inlineStyles&&(n.css('position',p.offsetParent?'':'relative'),n.css('top','')),p.offsetTop&&('auto'===p.offsetTop&&(p.offsetTop='+0'),p.offsetTop.match(/^[-+]\d+$/)?(g=1*-p.offsetTop,v=p.offsetParent?s.offset(T[0]).top+1*p.offsetTop:s.offset(n[0]).top-s.css(n[0],'marginTop',!0)+1*p.offsetTop):v=1*p.offsetTop),p.offsetBottom&&(P=p.offsetParent&&p.offsetBottom.match(/^[-+]\d+$/)?a()-(s.offset(T[0]).top+s.height(T[0]))+1*p.offsetBottom+1:1*p.offsetBottom),p.inlineStyles&&(n.css('position',t),n.css('top',e))},u.init(),u}var i=angular.element(e.document.body),f=angular.element(e);return n}]}).directive('bsAffix',['$affix','$window','$timeout',function(t,e,o){return{restrict:'EAC',require:'^?bsAffixTarget',link:function(s,n,i,f){var r={scope:s,target:f?f.$element:angular.element(e)};angular.forEach(['offsetTop','offsetBottom','offsetParent','offsetUnpin','inlineStyles','setWidth'],function(t){if(angular.isDefined(i[t])){var e=i[t];/true/i.test(e)&&(e=!0),/false/i.test(e)&&(e=!1),r[t]=e}});var c;o(function(){c=t(n,r)}),s.$on('$destroy',function(){c&&c.destroy(),r=null,c=null})}}}]).directive('bsAffixTarget',function(){return{controller:['$element',function(t){this.$element=t}]}}); 9 | //# sourceMappingURL=affix.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/collapse.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.collapse',[]).provider('$collapse',function(){var e=this.defaults={animation:'am-collapse',disallowToggle:!1,activeClass:'in',startCollapsed:!1,allowMultiple:!1},t=this.controller=function(t,a,i){function s(e){for(var t=r.$targets.$active,a=0;a (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict';angular.module('mgcrea.ngStrap.scrollspy',['mgcrea.ngStrap.helpers.debounce','mgcrea.ngStrap.helpers.dimensions']).provider('$scrollspy',function(){var e=this.$$spies={},t=this.defaults={debounce:150,throttle:100,offset:100};this.$get=['$window','$document','$rootScope','dimensions','debounce','throttle',function(n,o,r,c,i,s){function a(e,t){return e[0].nodeName&&e[0].nodeName.toLowerCase()===t.toLowerCase()}function l(o){var l=angular.extend({},t,o);l.element||(l.element=p);var d=a(l.element,'body'),h=d?u:l.element,m=d?'window':l.id;if(e[m])return e[m].$$count++,e[m];var g,v,$,k,E,T,y,b,C={},S=C.$trackedElements=[],L=[];return C.init=function(){this.$$count=1,k=i(this.checkPosition,l.debounce),E=s(this.checkPosition,l.throttle),h.on('click',this.checkPositionWithEventLoop),u.on('resize',k),h.on('scroll',E),T=i(this.checkOffsets,l.debounce),g=r.$on('$viewContentLoaded',T),v=r.$on('$includeContentLoaded',T),T(),m&&(e[m]=C)},C.destroy=function(){this.$$count--,this.$$count>0||(h.off('click',this.checkPositionWithEventLoop),u.off('resize',k),h.off('scroll',E),g(),v(),m&&delete e[m])},C.checkPosition=function(){if(L.length){if(b=(d?n.pageYOffset:h.prop('scrollTop'))||0,y=Math.max(n.innerHeight,f.prop('clientHeight')),bL[e+1].offsetTop))return C.$activateElement(L[e])}},C.checkPositionWithEventLoop=function(){setTimeout(C.checkPosition,1)},C.$activateElement=function(e){if($){var t=C.$getTrackedElement($);t&&(t.source.removeClass('active'),a(t.source,'li')&&a(t.source.parent().parent(),'li')&&t.source.parent().parent().removeClass('active'))}$=e.target,e.source.addClass('active'),a(e.source,'li')&&a(e.source.parent().parent(),'li')&&e.source.parent().parent().addClass('active')},C.$getTrackedElement=function(e){return S.filter(function(t){return t.target===e})[0]},C.checkOffsets=function(){angular.forEach(S,function(e){var t=document.querySelector(e.target);e.offsetTop=t?c.offset(t).top:null,l.offset&&null!==e.offsetTop&&(e.offsetTop-=1*l.offset)}),L=S.filter(function(e){return null!==e.offsetTop}).sort(function(e,t){return e.offsetTop-t.offsetTop}),k()},C.trackElement=function(e,t){S.push({target:e,source:t})},C.untrackElement=function(e,t){for(var n,o=S.length;o--;)if(S[o].target===e&&S[o].source===t){n=o;break}S.splice(n,1)},C.activate=function(e){S[e].addClass('active')},C.init(),C}var u=angular.element(n),f=angular.element(o.prop('documentElement')),p=angular.element(n.document.body);return l}]}).directive('bsScrollspy',['$rootScope','debounce','dimensions','$scrollspy',function(e,t,n,o){return{restrict:'EAC',link:function(e,t,n){var r={scope:e};angular.forEach(['offset','target'],function(e){angular.isDefined(n[e])&&(r[e]=n[e])});var c=o(r);c.trackElement(r.target,t),e.$on('$destroy',function(){c&&(c.untrackElement(r.target,t),c.destroy()),r=null,c=null})}}}]).directive('bsScrollspyList',['$rootScope','debounce','dimensions','$scrollspy',function(e,t,n,o){return{restrict:'A',compile:function(e,t){var n=e[0].querySelectorAll('li > a[href]');angular.forEach(n,function(e){var t=angular.element(e);t.parent().attr('bs-scrollspy','').attr('data-target',t.attr('href'))})}}}]); 9 | //# sourceMappingURL=scrollspy.min.js.map 10 | -------------------------------------------------------------------------------- /dist/modules/alert.js: -------------------------------------------------------------------------------- 1 | /** 2 | * angular-strap 3 | * @version v2.3.12 - 2017-01-26 4 | * @link http://mgcrea.github.io/angular-strap 5 | * @author Olivier Louvignes (https://github.com/mgcrea) 6 | * @license MIT License, http://www.opensource.org/licenses/MIT 7 | */ 8 | 'use strict'; 9 | 10 | angular.module('mgcrea.ngStrap.alert', [ 'mgcrea.ngStrap.modal' ]).provider('$alert', function() { 11 | var defaults = this.defaults = { 12 | animation: 'am-fade', 13 | prefixClass: 'alert', 14 | prefixEvent: 'alert', 15 | placement: null, 16 | templateUrl: 'alert/alert.tpl.html', 17 | container: false, 18 | element: null, 19 | backdrop: false, 20 | keyboard: true, 21 | show: true, 22 | duration: false, 23 | type: false, 24 | dismissable: true 25 | }; 26 | this.$get = [ '$modal', '$timeout', function($modal, $timeout) { 27 | function AlertFactory(config) { 28 | var $alert = {}; 29 | var options = angular.extend({}, defaults, config); 30 | $alert = $modal(options); 31 | $alert.$scope.dismissable = !!options.dismissable; 32 | if (options.type) { 33 | $alert.$scope.type = options.type; 34 | } 35 | var show = $alert.show; 36 | if (options.duration) { 37 | $alert.show = function() { 38 | show(); 39 | $timeout(function() { 40 | $alert.hide(); 41 | }, options.duration * 1e3); 42 | }; 43 | } 44 | return $alert; 45 | } 46 | return AlertFactory; 47 | } ]; 48 | }).directive('bsAlert', [ '$window', '$sce', '$alert', function($window, $sce, $alert) { 49 | return { 50 | restrict: 'EAC', 51 | scope: true, 52 | link: function postLink(scope, element, attr, transclusion) { 53 | var options = { 54 | scope: scope, 55 | element: element, 56 | show: false 57 | }; 58 | angular.forEach([ 'template', 'templateUrl', 'controller', 'controllerAs', 'placement', 'keyboard', 'html', 'container', 'animation', 'duration', 'dismissable' ], function(key) { 59 | if (angular.isDefined(attr[key])) options[key] = attr[key]; 60 | }); 61 | var falseValueRegExp = /^(false|0|)$/i; 62 | angular.forEach([ 'keyboard', 'html', 'container', 'dismissable' ], function(key) { 63 | if (angular.isDefined(attr[key]) && falseValueRegExp.test(attr[key])) options[key] = false; 64 | }); 65 | angular.forEach([ 'onBeforeShow', 'onShow', 'onBeforeHide', 'onHide' ], function(key) { 66 | var bsKey = 'bs' + key.charAt(0).toUpperCase() + key.slice(1); 67 | if (angular.isDefined(attr[bsKey])) { 68 | options[key] = scope.$eval(attr[bsKey]); 69 | } 70 | }); 71 | if (!scope.hasOwnProperty('title')) { 72 | scope.title = ''; 73 | } 74 | angular.forEach([ 'title', 'content', 'type' ], function(key) { 75 | if (attr[key]) { 76 | attr.$observe(key, function(newValue, oldValue) { 77 | scope[key] = $sce.trustAsHtml(newValue); 78 | }); 79 | } 80 | }); 81 | if (attr.bsAlert) { 82 | scope.$watch(attr.bsAlert, function(newValue, oldValue) { 83 | if (angular.isObject(newValue)) { 84 | angular.extend(scope, newValue); 85 | } else { 86 | scope.content = newValue; 87 | } 88 | }, true); 89 | } 90 | var alert = $alert(options); 91 | element.on(attr.trigger || 'click', alert.toggle); 92 | scope.$on('$destroy', function() { 93 | if (alert) alert.destroy(); 94 | options = null; 95 | alert = null; 96 | }); 97 | } 98 | }; 99 | } ]); -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | AngularStrap - AngularJS 1.2+ native directives for Twitter Bootstrap 3. 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 |
44 |
45 |
46 |
47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 65 | 66 | 74 | 75 | 77 | 78 | 85 | 86 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /dist/modules/parse-options.min.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"sources":["modules/parse-options.js"],"names":["angular","module","options","config","$parseOptions","$values","regexp","match","this","$get","valueName","keyName","value","scope","locals","values","map","index","label","displayFn","valueFn","ParseOptionsFactory","groupByFn","valuesFn","$parse","$match","attr","when","isArray","controller","$q","then","displayValue","init"],"mappings":"AAOA,YAEAA,SAQQC,OAAIC,0CAAuCC,SAAAA,gBAAAA,WAPjD,GAQMC,GAAAA,KAAcC,UAPlBC,OAUQC,+KARVC,MAUMC,MAAIC,SAAAA,KAAAA,SAAAA,EAAAA,GATR,QAWQC,GAAAA,EAAAA,GAuBN,QAmBMC,GAAgBC,EAAOC,GAlB3B,MAmBIC,GAAAC,IAAA,SAAAT,EAAAU,GAlBF,GAkBwBL,GAAcK,EAA5BC,IAIZd,OAnBEU,GAAOJ,GAAaH,EACpBW,EAAQC,EAAUN,EAAOC,GACzBF,EAAQQ,EAAQP,EAAOC,IAkBzBI,MAAOd,EAfHQ,MAAOA,EAmBNS,MAAAA,KAnDL,GAAIC,MAEAF,EAAAA,QAAAA,UAAAA,EAAAA,EACJhB,GAAImB,UAEJnB,IAAAA,GACEA,EACAe,EACAT,EACAC,EACAW,EACAF,CA2BJ,OAvCAhB,GAaeoB,KAAOjB,WAZpBH,EAAcqB,OAASlB,EAAQmB,EAAKnB,MAAML,EAAQI,QAelDF,EAAcmB,EAAAA,EAAW,IAAAhB,EAAUM,IACjCH,EAAUiB,EAAKJ,IAASV,EAAAA,GAb1BF,EAeSX,EAAQ4B,GAdjBN,EAeMP,EAAAA,EAAAA,IAAAA,IAdNK,EAAUI,EAAOjB,EAAM,GAAKA,EAAM,GAAKG,GACvCa,EAeInB,EAAcC,EAAAA,KAbpBD,EAAcmB,SAAW,SAASV,EAAOgB,GACvC,MAAOC,GAAGH,KAAKJ,EAASV,EAAOgB,IAAaE,KAAK,SAAShB,GAKxD,MAYFX,SAAc4B,QAAAA,KACRnB,MAEJT,EAAOe,QAAUN,EAAAA,OAAAA,EAAAA,EAAAA,MAfVT,EAAcC,WAGzBD,EAmBUU,aAAAA,SAAAA,GAlBR,GAmBID,KAjBJ,OADAA,GAmBQD,GAAAA,EACJE,EAAOJ,IAFbN,EAAc6B,OACP7B,EAET,MAAOiB","file":"parse-options.min.js","sourcesContent":["'use strict';\n\nangular.module('mgcrea.ngStrap.helpers.parseOptions', [])\n\n .provider('$parseOptions', function () {\n\n var defaults = this.defaults = {\n regexp: /^\\s*(.*?)(?:\\s+as\\s+(.*?))?(?:\\s+group\\s+by\\s+(.*))?\\s+for\\s+(?:([\\$\\w][\\$\\w]*)|(?:\\(\\s*([\\$\\w][\\$\\w]*)\\s*,\\s*([\\$\\w][\\$\\w]*)\\s*\\)))\\s+in\\s+(.*?)(?:\\s+track\\s+by\\s+(.*?))?$/\n };\n\n this.$get = function ($parse, $q) {\n\n function ParseOptionsFactory (attr, config) {\n\n var $parseOptions = {};\n\n // Common vars\n var options = angular.extend({}, defaults, config);\n $parseOptions.$values = [];\n\n // Private vars\n var match;\n var displayFn;\n var valueName;\n /* eslint-disable no-unused-vars */\n var keyName;\n var groupByFn;\n /* eslint-enable no-unused-vars */\n var valueFn;\n var valuesFn;\n\n $parseOptions.init = function () {\n $parseOptions.$match = match = attr.match(options.regexp);\n displayFn = $parse(match[2] || match[1]);\n valueName = match[4] || match[6];\n keyName = match[5];\n groupByFn = $parse(match[3] || '');\n valueFn = $parse(match[2] ? match[1] : valueName);\n valuesFn = $parse(match[7]);\n };\n\n $parseOptions.valuesFn = function (scope, controller) {\n return $q.when(valuesFn(scope, controller))\n .then(function (values) {\n if (!angular.isArray(values)) {\n values = [];\n }\n $parseOptions.$values = values.length ? parseValues(values, scope) : [];\n return $parseOptions.$values;\n });\n };\n\n $parseOptions.displayValue = function (modelValue) {\n var scope = {};\n scope[valueName] = modelValue;\n return displayFn(scope);\n };\n\n // Private functions\n\n function parseValues (values, scope) {\n return values.map(function (match, index) {\n var locals = {};\n var label;\n var value;\n locals[valueName] = match;\n label = displayFn(scope, locals);\n value = valueFn(scope, locals);\n return {label: label, value: value, index: index};\n });\n }\n\n $parseOptions.init();\n return $parseOptions;\n\n }\n\n return ParseOptionsFactory;\n\n };\n\n });\n"]} -------------------------------------------------------------------------------- /src/timepicker/timepicker.tpl.html: -------------------------------------------------------------------------------- 1 | 87 | --------------------------------------------------------------------------------