|
| 1 | + |
| 2 | +var schemaForm = angular.module('schemaForm', ['ngSanitize']); |
| 3 | + |
1 | 4 | (function(root, factory) {
|
2 | 5 | if (typeof define === 'function' && define.amd) {
|
3 | 6 | define(['angular', 'objectpath', 'tv4'], factory);
|
|
7 | 10 | root.schemaForm = factory(root.angular, root.objectpath, root.tv4);
|
8 | 11 | }
|
9 | 12 | }(this, function(angular, objectpath, tv4) {
|
10 |
| -// Deps is sort of a problem for us, maybe in the future we will ask the user to depend |
11 |
| -// on modules for add-ons |
12 |
| - |
13 |
| -var deps = []; |
14 |
| -try { |
15 |
| - //This throws an expection if module does not exist. |
16 |
| - angular.module('ngSanitize'); |
17 |
| - deps.push('ngSanitize'); |
18 |
| -} catch (e) {} |
19 |
| - |
20 |
| -try { |
21 |
| - //This throws an expection if module does not exist. |
22 |
| - angular.module('ui.sortable'); |
23 |
| - deps.push('ui.sortable'); |
24 |
| -} catch (e) {} |
25 |
| - |
26 |
| -try { |
27 |
| - //This throws an expection if module does not exist. |
28 |
| - angular.module('angularSpectrumColorpicker'); |
29 |
| - deps.push('angularSpectrumColorpicker'); |
30 |
| -} catch (e) {} |
31 |
| - |
32 |
| -var schemaForm = angular.module('schemaForm', deps); |
33 |
| - |
34 | 13 | angular.module('schemaForm').provider('sfPath',
|
35 | 14 | [function() {
|
36 | 15 |
|
@@ -65,6 +44,18 @@ angular.module('schemaForm').provider('sfPath',
|
65 | 44 | };
|
66 | 45 | }]);
|
67 | 46 |
|
| 47 | +return schemaForm; |
| 48 | +})); |
| 49 | + |
| 50 | +(function(root, factory) { |
| 51 | + if (typeof define === 'function' && define.amd) { |
| 52 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 53 | + } else if (typeof exports === 'object') { |
| 54 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 55 | + } else { |
| 56 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 57 | + } |
| 58 | +}(this, function(angular, objectpath, tv4) { |
68 | 59 | /**
|
69 | 60 | * @ngdoc service
|
70 | 61 | * @name sfSelect
|
@@ -140,6 +131,18 @@ angular.module('schemaForm').factory('sfSelect', ['sfPath', function(sfPath) {
|
140 | 131 | };
|
141 | 132 | }]);
|
142 | 133 |
|
| 134 | +return schemaForm; |
| 135 | +})); |
| 136 | + |
| 137 | +(function(root, factory) { |
| 138 | + if (typeof define === 'function' && define.amd) { |
| 139 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 140 | + } else if (typeof exports === 'object') { |
| 141 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 142 | + } else { |
| 143 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 144 | + } |
| 145 | +}(this, function(angular, objectpath, tv4) { |
143 | 146 |
|
144 | 147 | // FIXME: type template (using custom builder)
|
145 | 148 | angular.module('schemaForm').provider('sfBuilder', ['sfPathProvider', function(sfPathProvider) {
|
@@ -339,6 +342,18 @@ angular.module('schemaForm').provider('sfBuilder', ['sfPathProvider', function(s
|
339 | 342 |
|
340 | 343 | }]);
|
341 | 344 |
|
| 345 | +return schemaForm; |
| 346 | +})); |
| 347 | + |
| 348 | +(function(root, factory) { |
| 349 | + if (typeof define === 'function' && define.amd) { |
| 350 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 351 | + } else if (typeof exports === 'object') { |
| 352 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 353 | + } else { |
| 354 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 355 | + } |
| 356 | +}(this, function(angular, objectpath, tv4) { |
342 | 357 | angular.module('schemaForm').provider('schemaFormDecorators',
|
343 | 358 | ['$compileProvider', 'sfPathProvider', function($compileProvider, sfPathProvider) {
|
344 | 359 | var defaultDecorator = '';
|
@@ -825,6 +840,18 @@ angular.module('schemaForm').provider('schemaFormDecorators',
|
825 | 840 |
|
826 | 841 | }]);
|
827 | 842 |
|
| 843 | +return schemaForm; |
| 844 | +})); |
| 845 | + |
| 846 | +(function(root, factory) { |
| 847 | + if (typeof define === 'function' && define.amd) { |
| 848 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 849 | + } else if (typeof exports === 'object') { |
| 850 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 851 | + } else { |
| 852 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 853 | + } |
| 854 | +}(this, function(angular, objectpath, tv4) { |
828 | 855 | angular.module('schemaForm').provider('sfErrorMessage', function() {
|
829 | 856 |
|
830 | 857 | // The codes are tv4 error codes.
|
@@ -953,6 +980,18 @@ angular.module('schemaForm').provider('sfErrorMessage', function() {
|
953 | 980 |
|
954 | 981 | });
|
955 | 982 |
|
| 983 | +return schemaForm; |
| 984 | +})); |
| 985 | + |
| 986 | +(function(root, factory) { |
| 987 | + if (typeof define === 'function' && define.amd) { |
| 988 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 989 | + } else if (typeof exports === 'object') { |
| 990 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 991 | + } else { |
| 992 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 993 | + } |
| 994 | +}(this, function(angular, objectpath, tv4) { |
956 | 995 | /**
|
957 | 996 | * Schema form service.
|
958 | 997 | * This service is not that useful outside of schema form directive
|
@@ -1426,6 +1465,18 @@ angular.module('schemaForm').provider('schemaForm',
|
1426 | 1465 |
|
1427 | 1466 | }]);
|
1428 | 1467 |
|
| 1468 | +return schemaForm; |
| 1469 | +})); |
| 1470 | + |
| 1471 | +(function(root, factory) { |
| 1472 | + if (typeof define === 'function' && define.amd) { |
| 1473 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 1474 | + } else if (typeof exports === 'object') { |
| 1475 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 1476 | + } else { |
| 1477 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 1478 | + } |
| 1479 | +}(this, function(angular, objectpath, tv4) { |
1429 | 1480 | /* Common code for validating a value against its form and schema definition */
|
1430 | 1481 | /* global tv4 */
|
1431 | 1482 | angular.module('schemaForm').factory('sfValidator', [function() {
|
@@ -1485,6 +1536,18 @@ angular.module('schemaForm').factory('sfValidator', [function() {
|
1485 | 1536 | return validator;
|
1486 | 1537 | }]);
|
1487 | 1538 |
|
| 1539 | +return schemaForm; |
| 1540 | +})); |
| 1541 | + |
| 1542 | +(function(root, factory) { |
| 1543 | + if (typeof define === 'function' && define.amd) { |
| 1544 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 1545 | + } else if (typeof exports === 'object') { |
| 1546 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 1547 | + } else { |
| 1548 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 1549 | + } |
| 1550 | +}(this, function(angular, objectpath, tv4) { |
1488 | 1551 | /**
|
1489 | 1552 | * Directive that handles the model arrays
|
1490 | 1553 | */
|
@@ -1746,6 +1809,18 @@ angular.module('schemaForm').directive('sfArray', ['sfSelect', 'schemaForm', 'sf
|
1746 | 1809 | }
|
1747 | 1810 | ]);
|
1748 | 1811 |
|
| 1812 | +return schemaForm; |
| 1813 | +})); |
| 1814 | + |
| 1815 | +(function(root, factory) { |
| 1816 | + if (typeof define === 'function' && define.amd) { |
| 1817 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 1818 | + } else if (typeof exports === 'object') { |
| 1819 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 1820 | + } else { |
| 1821 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 1822 | + } |
| 1823 | +}(this, function(angular, objectpath, tv4) { |
1749 | 1824 | /**
|
1750 | 1825 | * A version of ng-changed that only listens if
|
1751 | 1826 | * there is actually a onChange defined on the form
|
@@ -1775,6 +1850,18 @@ angular.module('schemaForm').directive('sfChanged', function() {
|
1775 | 1850 | };
|
1776 | 1851 | });
|
1777 | 1852 |
|
| 1853 | +return schemaForm; |
| 1854 | +})); |
| 1855 | + |
| 1856 | +(function(root, factory) { |
| 1857 | + if (typeof define === 'function' && define.amd) { |
| 1858 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 1859 | + } else if (typeof exports === 'object') { |
| 1860 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 1861 | + } else { |
| 1862 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 1863 | + } |
| 1864 | +}(this, function(angular, objectpath, tv4) { |
1778 | 1865 | angular.module('schemaForm').directive('sfField',
|
1779 | 1866 | ['$parse', '$compile', '$http', '$templateCache', '$interpolate', '$q', 'sfErrorMessage',
|
1780 | 1867 | 'sfPath','sfSelect',
|
@@ -2017,6 +2104,18 @@ angular.module('schemaForm').directive('sfField',
|
2017 | 2104 | }
|
2018 | 2105 | ]);
|
2019 | 2106 |
|
| 2107 | +return schemaForm; |
| 2108 | +})); |
| 2109 | + |
| 2110 | +(function(root, factory) { |
| 2111 | + if (typeof define === 'function' && define.amd) { |
| 2112 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 2113 | + } else if (typeof exports === 'object') { |
| 2114 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 2115 | + } else { |
| 2116 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 2117 | + } |
| 2118 | +}(this, function(angular, objectpath, tv4) { |
2020 | 2119 | angular.module('schemaForm').directive('sfMessage',
|
2021 | 2120 | ['$injector', 'sfErrorMessage', function($injector, sfErrorMessage) {
|
2022 | 2121 | return {
|
@@ -2100,6 +2199,18 @@ angular.module('schemaForm').directive('sfMessage',
|
2100 | 2199 | };
|
2101 | 2200 | }]);
|
2102 | 2201 |
|
| 2202 | +return schemaForm; |
| 2203 | +})); |
| 2204 | + |
| 2205 | +(function(root, factory) { |
| 2206 | + if (typeof define === 'function' && define.amd) { |
| 2207 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 2208 | + } else if (typeof exports === 'object') { |
| 2209 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 2210 | + } else { |
| 2211 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 2212 | + } |
| 2213 | +}(this, function(angular, objectpath, tv4) { |
2103 | 2214 | /*
|
2104 | 2215 | FIXME: real documentation
|
2105 | 2216 | <form sf-form="form" sf-schema="schema" sf-decorator="foobar"></form>
|
@@ -2252,6 +2363,18 @@ angular.module('schemaForm')
|
2252 | 2363 | }
|
2253 | 2364 | ]);
|
2254 | 2365 |
|
| 2366 | +return schemaForm; |
| 2367 | +})); |
| 2368 | + |
| 2369 | +(function(root, factory) { |
| 2370 | + if (typeof define === 'function' && define.amd) { |
| 2371 | + define(['angular', 'objectpath', 'tv4'], factory); |
| 2372 | + } else if (typeof exports === 'object') { |
| 2373 | + module.exports = factory(require('angular'), require('objectpath'), require('tv4')); |
| 2374 | + } else { |
| 2375 | + root.schemaForm = factory(root.angular, root.objectpath, root.tv4); |
| 2376 | + } |
| 2377 | +}(this, function(angular, objectpath, tv4) { |
2255 | 2378 | angular.module('schemaForm').directive('schemaValidate', ['sfValidator', '$parse', 'sfSelect',
|
2256 | 2379 | function(sfValidator, $parse, sfSelect) {
|
2257 | 2380 |
|
|
0 commit comments