').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 |
2 |
3 |
12 |
13 |
24 |
52 |
53 |
54 |
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 |
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 |
19 |
20 |
$scope.button = {{button | json}};
21 |
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 |
Examples
11 |
Add quick, dynamic navbar functionality to transition through active/inactive states.
12 |
13 |
Live demo
14 |
$location.path() = "{{$location.path()}}";
15 |
27 |
28 |
Usage
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 | Name
44 | type
45 | default
46 | description
47 |
48 |
49 |
50 |
51 | activeClass
52 | string
53 | active
54 | Class to apply when the navigation item is active
55 |
56 |
57 | routeAttr
58 | string
59 | data-match-route
60 | Attribute to test against $location.path()
61 |
62 |
63 |
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 |
--------------------------------------------------------------------------------