lanes 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (105) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -0
  3. data/client/lanes/Config.coffee +3 -1
  4. data/client/lanes/access/screens/user-management/UserManagement.cjsx +2 -2
  5. data/client/lanes/components/grid/Body.cjsx +8 -1
  6. data/client/lanes/components/grid/EditingMixin.cjsx +5 -2
  7. data/client/lanes/components/grid/Grid.cjsx +1 -1
  8. data/client/lanes/components/grid/PopOverMixin.cjsx +1 -1
  9. data/client/lanes/components/grid/row-editor.scss +6 -0
  10. data/client/lanes/components/grid/styles.scss +1 -1
  11. data/client/lanes/components/record-finder/RecordFinder.cjsx +22 -16
  12. data/client/lanes/components/select-field/SelectField.cjsx +20 -27
  13. data/client/lanes/components/shared/DateTime.cjsx +12 -23
  14. data/client/lanes/components/shared/DisplayValue.cjsx +5 -10
  15. data/client/lanes/components/shared/FieldMixin.cjsx +107 -56
  16. data/client/lanes/components/shared/FieldWrapper.cjsx +59 -6
  17. data/client/lanes/components/shared/FormGroup.cjsx +3 -8
  18. data/client/lanes/components/shared/Helpers.coffee +1 -1
  19. data/client/lanes/components/shared/Icon.cjsx +1 -1
  20. data/client/lanes/components/shared/ImageAsset.cjsx +46 -0
  21. data/client/lanes/components/shared/Input.cjsx +5 -1
  22. data/client/lanes/components/shared/InputFieldMixin.cjsx +8 -27
  23. data/client/lanes/components/shared/NumberInput.cjsx +11 -4
  24. data/client/lanes/components/shared/RadioField.cjsx +18 -8
  25. data/client/lanes/components/shared/ScreenWrapper.cjsx +1 -1
  26. data/client/lanes/components/shared/TextArea.cjsx +15 -0
  27. data/client/lanes/components/shared/ToggleField.cjsx +11 -19
  28. data/client/lanes/components/shared/fields.scss +22 -76
  29. data/client/lanes/components/shared/{image-saver.scss → image-asset.scss} +1 -1
  30. data/client/lanes/components/shared/styles.scss +1 -1
  31. data/client/lanes/components/toolbar/RemoteChangeSets.cjsx +13 -10
  32. data/client/lanes/components/toolbar/changes-notification.scss +14 -1
  33. data/client/lanes/extension/Base.coffee +5 -1
  34. data/client/lanes/models/Asset.coffee +81 -0
  35. data/client/lanes/models/AssociationMap.coffee +14 -5
  36. data/client/lanes/models/AssociationProxy.coffee +9 -6
  37. data/client/lanes/models/Base.coffee +6 -3
  38. data/client/lanes/models/Collection.coffee +1 -3
  39. data/client/lanes/models/JobStatus.coffee +3 -0
  40. data/client/lanes/models/Query.coffee +3 -2
  41. data/client/lanes/models/Sync.coffee +6 -4
  42. data/client/lanes/react/mixins/Access.coffee +1 -1
  43. data/client/lanes/react/mixins/Data.coffee +33 -31
  44. data/client/lanes/screens/Commands.coffee +0 -1
  45. data/client/lanes/screens/Definitions.coffee +1 -1
  46. data/client/lanes/screens/SystemSettings.cjsx +23 -11
  47. data/client/lanes/screens/UserPreferences.cjsx +3 -2
  48. data/client/lanes/styles/bootstrap-custom-grid.scss +6 -4
  49. data/client/lanes/styles/fonts.scss +9 -0
  50. data/client/lanes/styles/global/styles.scss +1 -0
  51. data/client/lanes/styles/variables.scss +1 -1
  52. data/client/lanes/testing/Helpers.coffee +5 -3
  53. data/client/lanes/vendor/development/base.js +17206 -19211
  54. data/client/lanes/vendor/development/calendar.js +67 -471
  55. data/client/lanes/vendor/development/commons.js +21680 -19814
  56. data/client/lanes/vendor/development/helpers.js +40 -29
  57. data/client/lanes/vendor/development/toggle.js +22 -19
  58. data/client/lanes/vendor/development/widgets.js +2476 -2625
  59. data/client/lanes/vendor/production/base.js +19034 -21038
  60. data/client/lanes/vendor/production/calendar.js +67 -471
  61. data/client/lanes/vendor/production/commons.js +21369 -19136
  62. data/client/lanes/vendor/production/toggle.js +22 -19
  63. data/client/lanes/vendor/production/widgets.js +2476 -2625
  64. data/client/lanes/vendor/styles/widgets.scss +2 -0
  65. data/client/lanes/workspace/FirstRun.cjsx +69 -0
  66. data/client/lanes/workspace/Navbar.cjsx +4 -2
  67. data/client/lanes/workspace/ScreenView.cjsx +9 -1
  68. data/client/lanes/workspace/index.js +1 -0
  69. data/client/lanes/workspace/styles/screens.scss +11 -0
  70. data/config/database.yml +2 -2
  71. data/db/migrate/01_create_system_settings.rb +0 -1
  72. data/db/migrate/02_create_assets.rb +15 -0
  73. data/lanes.gemspec +25 -28
  74. data/lib/lanes/access/authentication_provider.rb +20 -7
  75. data/lib/lanes/access/role_collection.rb +9 -2
  76. data/lib/lanes/api/default_routes.rb +4 -4
  77. data/lib/lanes/api/formatted_reply.rb +15 -11
  78. data/lib/lanes/api/handlers/asset.rb +37 -0
  79. data/lib/lanes/api/request_wrapper.rb +18 -4
  80. data/lib/lanes/api/routing.rb +17 -6
  81. data/lib/lanes/api/updates.rb +1 -1
  82. data/lib/lanes/api.rb +1 -1
  83. data/lib/lanes/asset.rb +38 -0
  84. data/lib/lanes/concerns/all.rb +1 -1
  85. data/lib/lanes/concerns/asset_uploader.rb +60 -0
  86. data/lib/lanes/configuration.rb +1 -2
  87. data/lib/lanes/extension.rb +1 -1
  88. data/lib/lanes/logger.rb +26 -16
  89. data/lib/lanes/system_settings.rb +13 -8
  90. data/lib/lanes/version.rb +1 -1
  91. data/lib/lanes.rb +1 -0
  92. data/npm-build/base.js +1 -1
  93. data/npm-build/package.json +9 -9
  94. data/spec/command-reference-files/initial/Gemfile +1 -1
  95. data/spec/fixtures/logo.png +0 -0
  96. data/spec/lanes/components/grid/PopoverEditorSpec.coffee +48 -0
  97. data/spec/server/asset_spec.rb +34 -0
  98. data/spec/server/spec_helper.rb +14 -2
  99. metadata +118 -127
  100. data/client/lanes/components/shared/ControlLabel.cjsx +0 -45
  101. data/client/lanes/components/shared/ImageSaver.cjsx +0 -33
  102. data/client/lanes/models/SystemSettings.coffee +0 -0
  103. data/client/lanes/models/mixins/FileSupport.coffee +0 -60
  104. data/lib/lanes/api/handlers/file.rb +0 -26
  105. data/lib/lanes/concerns/image_uploader.rb +0 -42
@@ -6,31 +6,31 @@ webpackJsonp([1],{
6
6
  /* WEBPACK VAR INJECTION */(function(global) {var Lanes = ( global.Lanes || (global.Lanes = {}) );
7
7
  Lanes.Vendor = ( Lanes.Vendor || {} );
8
8
 
9
- Lanes.Vendor.Dayz = __webpack_require__(895);
9
+ Lanes.Vendor.Dayz = __webpack_require__(1038);
10
10
 
11
- __webpack_require__(921);
11
+ __webpack_require__(1054);
12
12
 
13
13
  /* WEBPACK VAR INJECTION */}.call(exports, (function() { return this; }())))
14
14
 
15
15
  /***/ },
16
16
 
17
- /***/ 895:
17
+ /***/ 1038:
18
18
  /***/ function(module, exports, __webpack_require__) {
19
19
 
20
20
  'use strict';
21
21
 
22
22
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
23
23
 
24
- var React = __webpack_require__(66);
25
- var moment = __webpack_require__(695);
26
- var Layout = __webpack_require__(896);
27
- var Day = __webpack_require__(900);
28
- var XLabels = __webpack_require__(903);
29
- var YLabels = __webpack_require__(906);
24
+ var React = __webpack_require__(206);
25
+ var moment = __webpack_require__(835);
26
+ var Layout = __webpack_require__(1039);
27
+ var Day = __webpack_require__(1043);
28
+ var XLabels = __webpack_require__(1046);
29
+ var YLabels = __webpack_require__(1047);
30
30
 
31
- __webpack_require__(887); // needed in order to for range to install itself
31
+ __webpack_require__(1030); // needed in order to for range to install itself
32
32
 
33
- var EventsCollection = __webpack_require__(910);
33
+ var EventsCollection = __webpack_require__(1051);
34
34
 
35
35
  var Dayz = React.createClass({
36
36
  displayName: 'Dayz',
@@ -132,7 +132,7 @@ webpackJsonp([1],{
132
132
 
133
133
  /***/ },
134
134
 
135
- /***/ 896:
135
+ /***/ 1039:
136
136
  /***/ function(module, exports, __webpack_require__) {
137
137
 
138
138
  'use strict';
@@ -141,11 +141,11 @@ webpackJsonp([1],{
141
141
 
142
142
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
143
143
 
144
- var assign = __webpack_require__(341);
145
- var each = __webpack_require__(897);
146
- var moment = __webpack_require__(695);
147
- var EventLayout = __webpack_require__(898);
148
- var C = __webpack_require__(899);
144
+ var assign = __webpack_require__(20);
145
+ var each = __webpack_require__(1040);
146
+ var moment = __webpack_require__(835);
147
+ var EventLayout = __webpack_require__(1041);
148
+ var C = __webpack_require__(1042);
149
149
 
150
150
  function cacheKey(day) {
151
151
  return day.format('YYYYMMDD');
@@ -340,15 +340,15 @@ webpackJsonp([1],{
340
340
 
341
341
  /***/ },
342
342
 
343
- /***/ 897:
343
+ /***/ 1040:
344
344
  /***/ function(module, exports, __webpack_require__) {
345
345
 
346
- module.exports = __webpack_require__(350);
346
+ module.exports = __webpack_require__(199);
347
347
 
348
348
 
349
349
  /***/ },
350
350
 
351
- /***/ 898:
351
+ /***/ 1041:
352
352
  /***/ function(module, exports, __webpack_require__) {
353
353
 
354
354
  'use strict';
@@ -357,7 +357,7 @@ webpackJsonp([1],{
357
357
 
358
358
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
359
359
 
360
- var moment = __webpack_require__(695);
360
+ var moment = __webpack_require__(835);
361
361
 
362
362
  // an event layout describes how an event is displayed.
363
363
  // A event may be split into one or more layouts in order to be split across week boundaries
@@ -457,7 +457,7 @@ webpackJsonp([1],{
457
457
 
458
458
  /***/ },
459
459
 
460
- /***/ 899:
460
+ /***/ 1042:
461
461
  /***/ function(module, exports) {
462
462
 
463
463
  "use strict";
@@ -470,20 +470,20 @@ webpackJsonp([1],{
470
470
 
471
471
  /***/ },
472
472
 
473
- /***/ 900:
473
+ /***/ 1043:
474
474
  /***/ function(module, exports, __webpack_require__) {
475
475
 
476
476
  'use strict';
477
477
 
478
478
  var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
479
479
 
480
- var React = __webpack_require__(66);
481
- var Layout = __webpack_require__(896);
482
- var Event = __webpack_require__(901);
483
- var Label = __webpack_require__(902);
484
- var assign = __webpack_require__(341);
485
- var each = __webpack_require__(897);
486
- var ReactDOM = __webpack_require__(96);
480
+ var React = __webpack_require__(206);
481
+ var Layout = __webpack_require__(1039);
482
+ var Event = __webpack_require__(1044);
483
+ var Label = __webpack_require__(1045);
484
+ var assign = __webpack_require__(20);
485
+ var each = __webpack_require__(1040);
486
+ var ReactDOM = __webpack_require__(239);
487
487
 
488
488
  var IsDayClass = new RegExp('(\\s|^)(events|day|label)(\\s|$)');
489
489
 
@@ -615,13 +615,13 @@ webpackJsonp([1],{
615
615
 
616
616
  /***/ },
617
617
 
618
- /***/ 901:
618
+ /***/ 1044:
619
619
  /***/ function(module, exports, __webpack_require__) {
620
620
 
621
621
  'use strict';
622
622
 
623
- var React = __webpack_require__(66);
624
- var EventLayout = __webpack_require__(898);
623
+ var React = __webpack_require__(206);
624
+ var EventLayout = __webpack_require__(1041);
625
625
 
626
626
  var IsResizeClass = new RegExp('(\\s|^)event(\\s|$)');
627
627
 
@@ -694,12 +694,12 @@ webpackJsonp([1],{
694
694
 
695
695
  /***/ },
696
696
 
697
- /***/ 902:
697
+ /***/ 1045:
698
698
  /***/ function(module, exports, __webpack_require__) {
699
699
 
700
700
  'use strict';
701
701
 
702
- var React = __webpack_require__(66);
702
+ var React = __webpack_require__(206);
703
703
 
704
704
  var Label = React.createClass({
705
705
  displayName: 'Label',
@@ -722,13 +722,13 @@ webpackJsonp([1],{
722
722
 
723
723
  /***/ },
724
724
 
725
- /***/ 903:
725
+ /***/ 1046:
726
726
  /***/ function(module, exports, __webpack_require__) {
727
727
 
728
728
  'use strict';
729
729
 
730
- var React = __webpack_require__(66);
731
- var map = __webpack_require__(904);
730
+ var React = __webpack_require__(206);
731
+ var map = __webpack_require__(492);
732
732
 
733
733
  var XLabels = React.createClass({
734
734
  displayName: 'XLabels',
@@ -770,106 +770,16 @@ webpackJsonp([1],{
770
770
 
771
771
  /***/ },
772
772
 
773
- /***/ 904:
774
- /***/ function(module, exports, __webpack_require__) {
775
-
776
- var arrayMap = __webpack_require__(399),
777
- baseIteratee = __webpack_require__(357),
778
- baseMap = __webpack_require__(905),
779
- isArray = __webpack_require__(322);
780
-
781
- /**
782
- * Creates an array of values by running each element in `collection` thru
783
- * `iteratee`. The iteratee is invoked with three arguments:
784
- * (value, index|key, collection).
785
- *
786
- * Many lodash methods are guarded to work as iteratees for methods like
787
- * `_.every`, `_.filter`, `_.map`, `_.mapValues`, `_.reject`, and `_.some`.
788
- *
789
- * The guarded methods are:
790
- * `ary`, `chunk`, `curry`, `curryRight`, `drop`, `dropRight`, `every`,
791
- * `fill`, `invert`, `parseInt`, `random`, `range`, `rangeRight`, `repeat`,
792
- * `sampleSize`, `slice`, `some`, `sortBy`, `take`, `takeRight`, `template`,
793
- * `trim`, `trimEnd`, `trimStart`, and `words`
794
- *
795
- * @static
796
- * @memberOf _
797
- * @since 0.1.0
798
- * @category Collection
799
- * @param {Array|Object} collection The collection to iterate over.
800
- * @param {Array|Function|Object|string} [iteratee=_.identity]
801
- * The function invoked per iteration.
802
- * @returns {Array} Returns the new mapped array.
803
- * @example
804
- *
805
- * function square(n) {
806
- * return n * n;
807
- * }
808
- *
809
- * _.map([4, 8], square);
810
- * // => [16, 64]
811
- *
812
- * _.map({ 'a': 4, 'b': 8 }, square);
813
- * // => [16, 64] (iteration order is not guaranteed)
814
- *
815
- * var users = [
816
- * { 'user': 'barney' },
817
- * { 'user': 'fred' }
818
- * ];
819
- *
820
- * // The `_.property` iteratee shorthand.
821
- * _.map(users, 'user');
822
- * // => ['barney', 'fred']
823
- */
824
- function map(collection, iteratee) {
825
- var func = isArray(collection) ? arrayMap : baseMap;
826
- return func(collection, baseIteratee(iteratee, 3));
827
- }
828
-
829
- module.exports = map;
830
-
831
-
832
- /***/ },
833
-
834
- /***/ 905:
835
- /***/ function(module, exports, __webpack_require__) {
836
-
837
- var baseEach = __webpack_require__(352),
838
- isArrayLike = __webpack_require__(318);
839
-
840
- /**
841
- * The base implementation of `_.map` without support for iteratee shorthands.
842
- *
843
- * @private
844
- * @param {Array|Object} collection The collection to iterate over.
845
- * @param {Function} iteratee The function invoked per iteration.
846
- * @returns {Array} Returns the new mapped array.
847
- */
848
- function baseMap(collection, iteratee) {
849
- var index = -1,
850
- result = isArrayLike(collection) ? Array(collection.length) : [];
851
-
852
- baseEach(collection, function(value, key, collection) {
853
- result[++index] = iteratee(value, key, collection);
854
- });
855
- return result;
856
- }
857
-
858
- module.exports = baseMap;
859
-
860
-
861
- /***/ },
862
-
863
- /***/ 906:
773
+ /***/ 1047:
864
774
  /***/ function(module, exports, __webpack_require__) {
865
775
 
866
776
  'use strict';
867
777
 
868
- var React = __webpack_require__(66);
869
- var moment = __webpack_require__(695);
870
- var Layout = __webpack_require__(896);
871
- var each = __webpack_require__(897);
872
- var range = __webpack_require__(907);
778
+ var React = __webpack_require__(206);
779
+ var moment = __webpack_require__(835);
780
+ var Layout = __webpack_require__(1039);
781
+ var each = __webpack_require__(1040);
782
+ var range = __webpack_require__(1048);
873
783
 
874
784
  var YLabels = React.createClass({
875
785
  displayName: 'YLabels',
@@ -921,10 +831,10 @@ webpackJsonp([1],{
921
831
 
922
832
  /***/ },
923
833
 
924
- /***/ 907:
834
+ /***/ 1048:
925
835
  /***/ function(module, exports, __webpack_require__) {
926
836
 
927
- var createRange = __webpack_require__(908);
837
+ var createRange = __webpack_require__(1049);
928
838
 
929
839
  /**
930
840
  * Creates an array of numbers (positive and/or negative) progressing from
@@ -942,7 +852,8 @@ webpackJsonp([1],{
942
852
  * @param {number} [start=0] The start of the range.
943
853
  * @param {number} end The end of the range.
944
854
  * @param {number} [step=1] The value to increment or decrement by.
945
- * @returns {Array} Returns the new array of numbers.
855
+ * @returns {Array} Returns the range of numbers.
856
+ * @see _.inRange, _.rangeRight
946
857
  * @example
947
858
  *
948
859
  * _.range(4);
@@ -973,12 +884,12 @@ webpackJsonp([1],{
973
884
 
974
885
  /***/ },
975
886
 
976
- /***/ 908:
887
+ /***/ 1049:
977
888
  /***/ function(module, exports, __webpack_require__) {
978
889
 
979
- var baseRange = __webpack_require__(909),
980
- isIterateeCall = __webpack_require__(347),
981
- toNumber = __webpack_require__(305);
890
+ var baseRange = __webpack_require__(1050),
891
+ isIterateeCall = __webpack_require__(25),
892
+ toNumber = __webpack_require__(37);
982
893
 
983
894
  /**
984
895
  * Creates a `_.range` or `_.rangeRight` function.
@@ -1011,7 +922,7 @@ webpackJsonp([1],{
1011
922
 
1012
923
  /***/ },
1013
924
 
1014
- /***/ 909:
925
+ /***/ 1050:
1015
926
  /***/ function(module, exports) {
1016
927
 
1017
928
  /* Built-in method references for those with the same name as other `lodash` methods. */
@@ -1027,7 +938,7 @@ webpackJsonp([1],{
1027
938
  * @param {number} end The end of the range.
1028
939
  * @param {number} step The value to increment or decrement by.
1029
940
  * @param {boolean} [fromRight] Specify iterating from right to left.
1030
- * @returns {Array} Returns the new array of numbers.
941
+ * @returns {Array} Returns the range of numbers.
1031
942
  */
1032
943
  function baseRange(start, end, step, fromRight) {
1033
944
  var index = -1,
@@ -1046,7 +957,7 @@ webpackJsonp([1],{
1046
957
 
1047
958
  /***/ },
1048
959
 
1049
- /***/ 910:
960
+ /***/ 1051:
1050
961
  /***/ function(module, exports, __webpack_require__) {
1051
962
 
1052
963
  'use strict';
@@ -1055,11 +966,11 @@ webpackJsonp([1],{
1055
966
 
1056
967
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1057
968
 
1058
- var Event = __webpack_require__(911);
1059
- var Emitter = __webpack_require__(912);
1060
- var _each = __webpack_require__(897);
1061
- var assign = __webpack_require__(341);
1062
- var sortBy = __webpack_require__(913);
969
+ var Event = __webpack_require__(1052);
970
+ var Emitter = __webpack_require__(1053);
971
+ var _each = __webpack_require__(1040);
972
+ var assign = __webpack_require__(20);
973
+ var sortBy = __webpack_require__(517);
1063
974
 
1064
975
  function lengthCompare(event) {
1065
976
  return event.attributes.range.start.diff(event.attributes.range.end);
@@ -1122,7 +1033,7 @@ webpackJsonp([1],{
1122
1033
 
1123
1034
  /***/ },
1124
1035
 
1125
- /***/ 911:
1036
+ /***/ 1052:
1126
1037
  /***/ function(module, exports, __webpack_require__) {
1127
1038
 
1128
1039
  'use strict';
@@ -1131,10 +1042,10 @@ webpackJsonp([1],{
1131
1042
 
1132
1043
  function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
1133
1044
 
1134
- var React = __webpack_require__(66);
1135
- var assign = __webpack_require__(341);
1136
- var each = __webpack_require__(897);
1137
- var Emitter = __webpack_require__(912);
1045
+ var React = __webpack_require__(206);
1046
+ var assign = __webpack_require__(20);
1047
+ var each = __webpack_require__(1040);
1048
+ var Emitter = __webpack_require__(1053);
1138
1049
 
1139
1050
  var EVENT_COUNTER = 1;
1140
1051
 
@@ -1269,7 +1180,7 @@ webpackJsonp([1],{
1269
1180
 
1270
1181
  /***/ },
1271
1182
 
1272
- /***/ 912:
1183
+ /***/ 1053:
1273
1184
  /***/ function(module, exports) {
1274
1185
 
1275
1186
  function E () {
@@ -1342,322 +1253,7 @@ webpackJsonp([1],{
1342
1253
 
1343
1254
  /***/ },
1344
1255
 
1345
- /***/ 913:
1346
- /***/ function(module, exports, __webpack_require__) {
1347
-
1348
- var baseFlatten = __webpack_require__(914),
1349
- baseOrderBy = __webpack_require__(917),
1350
- isIterateeCall = __webpack_require__(347),
1351
- rest = __webpack_require__(348);
1352
-
1353
- /**
1354
- * Creates an array of elements, sorted in ascending order by the results of
1355
- * running each element in a collection thru each iteratee. This method
1356
- * performs a stable sort, that is, it preserves the original sort order of
1357
- * equal elements. The iteratees are invoked with one argument: (value).
1358
- *
1359
- * @static
1360
- * @memberOf _
1361
- * @since 0.1.0
1362
- * @category Collection
1363
- * @param {Array|Object} collection The collection to iterate over.
1364
- * @param {...(Array|Array[]|Function|Function[]|Object|Object[]|string|string[])}
1365
- * [iteratees=[_.identity]] The iteratees to sort by, specified individually
1366
- * or in arrays.
1367
- * @returns {Array} Returns the new sorted array.
1368
- * @example
1369
- *
1370
- * var users = [
1371
- * { 'user': 'fred', 'age': 48 },
1372
- * { 'user': 'barney', 'age': 36 },
1373
- * { 'user': 'fred', 'age': 40 },
1374
- * { 'user': 'barney', 'age': 34 }
1375
- * ];
1376
- *
1377
- * _.sortBy(users, function(o) { return o.user; });
1378
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
1379
- *
1380
- * _.sortBy(users, ['user', 'age']);
1381
- * // => objects for [['barney', 34], ['barney', 36], ['fred', 40], ['fred', 48]]
1382
- *
1383
- * _.sortBy(users, 'user', function(o) {
1384
- * return Math.floor(o.age / 10);
1385
- * });
1386
- * // => objects for [['barney', 36], ['barney', 34], ['fred', 48], ['fred', 40]]
1387
- */
1388
- var sortBy = rest(function(collection, iteratees) {
1389
- if (collection == null) {
1390
- return [];
1391
- }
1392
- var length = iteratees.length;
1393
- if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
1394
- iteratees = [];
1395
- } else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
1396
- iteratees.length = 1;
1397
- }
1398
- return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
1399
- });
1400
-
1401
- module.exports = sortBy;
1402
-
1403
-
1404
- /***/ },
1405
-
1406
- /***/ 914:
1407
- /***/ function(module, exports, __webpack_require__) {
1408
-
1409
- var arrayPush = __webpack_require__(915),
1410
- isFlattenable = __webpack_require__(916);
1411
-
1412
- /**
1413
- * The base implementation of `_.flatten` with support for restricting flattening.
1414
- *
1415
- * @private
1416
- * @param {Array} array The array to flatten.
1417
- * @param {number} depth The maximum recursion depth.
1418
- * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.
1419
- * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.
1420
- * @param {Array} [result=[]] The initial result value.
1421
- * @returns {Array} Returns the new flattened array.
1422
- */
1423
- function baseFlatten(array, depth, predicate, isStrict, result) {
1424
- var index = -1,
1425
- length = array.length;
1426
-
1427
- predicate || (predicate = isFlattenable);
1428
- result || (result = []);
1429
-
1430
- while (++index < length) {
1431
- var value = array[index];
1432
- if (depth > 0 && predicate(value)) {
1433
- if (depth > 1) {
1434
- // Recursively flatten arrays (susceptible to call stack limits).
1435
- baseFlatten(value, depth - 1, predicate, isStrict, result);
1436
- } else {
1437
- arrayPush(result, value);
1438
- }
1439
- } else if (!isStrict) {
1440
- result[result.length] = value;
1441
- }
1442
- }
1443
- return result;
1444
- }
1445
-
1446
- module.exports = baseFlatten;
1447
-
1448
-
1449
- /***/ },
1450
-
1451
- /***/ 915:
1452
- /***/ function(module, exports) {
1453
-
1454
- /**
1455
- * Appends the elements of `values` to `array`.
1456
- *
1457
- * @private
1458
- * @param {Array} array The array to modify.
1459
- * @param {Array} values The values to append.
1460
- * @returns {Array} Returns `array`.
1461
- */
1462
- function arrayPush(array, values) {
1463
- var index = -1,
1464
- length = values.length,
1465
- offset = array.length;
1466
-
1467
- while (++index < length) {
1468
- array[offset + index] = values[index];
1469
- }
1470
- return array;
1471
- }
1472
-
1473
- module.exports = arrayPush;
1474
-
1475
-
1476
- /***/ },
1477
-
1478
- /***/ 916:
1479
- /***/ function(module, exports, __webpack_require__) {
1480
-
1481
- var isArguments = __webpack_require__(316),
1482
- isArray = __webpack_require__(322),
1483
- isArrayLikeObject = __webpack_require__(317);
1484
-
1485
- /**
1486
- * Checks if `value` is a flattenable `arguments` object or array.
1487
- *
1488
- * @private
1489
- * @param {*} value The value to check.
1490
- * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.
1491
- */
1492
- function isFlattenable(value) {
1493
- return isArrayLikeObject(value) && (isArray(value) || isArguments(value));
1494
- }
1495
-
1496
- module.exports = isFlattenable;
1497
-
1498
-
1499
- /***/ },
1500
-
1501
- /***/ 917:
1502
- /***/ function(module, exports, __webpack_require__) {
1503
-
1504
- var arrayMap = __webpack_require__(399),
1505
- baseIteratee = __webpack_require__(357),
1506
- baseMap = __webpack_require__(905),
1507
- baseSortBy = __webpack_require__(918),
1508
- compareMultiple = __webpack_require__(919),
1509
- identity = __webpack_require__(412);
1510
-
1511
- /**
1512
- * The base implementation of `_.orderBy` without param guards.
1513
- *
1514
- * @private
1515
- * @param {Array|Object} collection The collection to iterate over.
1516
- * @param {Function[]|Object[]|string[]} iteratees The iteratees to sort by.
1517
- * @param {string[]} orders The sort orders of `iteratees`.
1518
- * @returns {Array} Returns the new sorted array.
1519
- */
1520
- function baseOrderBy(collection, iteratees, orders) {
1521
- var index = -1;
1522
- iteratees = arrayMap(iteratees.length ? iteratees : [identity], baseIteratee);
1523
-
1524
- var result = baseMap(collection, function(value, key, collection) {
1525
- var criteria = arrayMap(iteratees, function(iteratee) {
1526
- return iteratee(value);
1527
- });
1528
- return { 'criteria': criteria, 'index': ++index, 'value': value };
1529
- });
1530
-
1531
- return baseSortBy(result, function(object, other) {
1532
- return compareMultiple(object, other, orders);
1533
- });
1534
- }
1535
-
1536
- module.exports = baseOrderBy;
1537
-
1538
-
1539
- /***/ },
1540
-
1541
- /***/ 918:
1542
- /***/ function(module, exports) {
1543
-
1544
- /**
1545
- * The base implementation of `_.sortBy` which uses `comparer` to define the
1546
- * sort order of `array` and replaces criteria objects with their corresponding
1547
- * values.
1548
- *
1549
- * @private
1550
- * @param {Array} array The array to sort.
1551
- * @param {Function} comparer The function to define sort order.
1552
- * @returns {Array} Returns `array`.
1553
- */
1554
- function baseSortBy(array, comparer) {
1555
- var length = array.length;
1556
-
1557
- array.sort(comparer);
1558
- while (length--) {
1559
- array[length] = array[length].value;
1560
- }
1561
- return array;
1562
- }
1563
-
1564
- module.exports = baseSortBy;
1565
-
1566
-
1567
- /***/ },
1568
-
1569
- /***/ 919:
1570
- /***/ function(module, exports, __webpack_require__) {
1571
-
1572
- var compareAscending = __webpack_require__(920);
1573
-
1574
- /**
1575
- * Used by `_.orderBy` to compare multiple properties of a value to another
1576
- * and stable sort them.
1577
- *
1578
- * If `orders` is unspecified, all values are sorted in ascending order. Otherwise,
1579
- * specify an order of "desc" for descending or "asc" for ascending sort order
1580
- * of corresponding values.
1581
- *
1582
- * @private
1583
- * @param {Object} object The object to compare.
1584
- * @param {Object} other The other object to compare.
1585
- * @param {boolean[]|string[]} orders The order to sort by for each property.
1586
- * @returns {number} Returns the sort order indicator for `object`.
1587
- */
1588
- function compareMultiple(object, other, orders) {
1589
- var index = -1,
1590
- objCriteria = object.criteria,
1591
- othCriteria = other.criteria,
1592
- length = objCriteria.length,
1593
- ordersLength = orders.length;
1594
-
1595
- while (++index < length) {
1596
- var result = compareAscending(objCriteria[index], othCriteria[index]);
1597
- if (result) {
1598
- if (index >= ordersLength) {
1599
- return result;
1600
- }
1601
- var order = orders[index];
1602
- return result * (order == 'desc' ? -1 : 1);
1603
- }
1604
- }
1605
- // Fixes an `Array#sort` bug in the JS engine embedded in Adobe applications
1606
- // that causes it, under certain circumstances, to provide the same value for
1607
- // `object` and `other`. See https://github.com/jashkenas/underscore/pull/1247
1608
- // for more details.
1609
- //
1610
- // This also ensures a stable sort in V8 and other engines.
1611
- // See https://bugs.chromium.org/p/v8/issues/detail?id=90 for more details.
1612
- return object.index - other.index;
1613
- }
1614
-
1615
- module.exports = compareMultiple;
1616
-
1617
-
1618
- /***/ },
1619
-
1620
- /***/ 920:
1621
- /***/ function(module, exports) {
1622
-
1623
- /**
1624
- * Compares values to sort them in ascending order.
1625
- *
1626
- * @private
1627
- * @param {*} value The value to compare.
1628
- * @param {*} other The other value to compare.
1629
- * @returns {number} Returns the sort order indicator for `value`.
1630
- */
1631
- function compareAscending(value, other) {
1632
- if (value !== other) {
1633
- var valIsNull = value === null,
1634
- valIsUndef = value === undefined,
1635
- valIsReflexive = value === value;
1636
-
1637
- var othIsNull = other === null,
1638
- othIsUndef = other === undefined,
1639
- othIsReflexive = other === other;
1640
-
1641
- if ((value > other && !othIsNull) || !valIsReflexive ||
1642
- (valIsNull && !othIsUndef && othIsReflexive) ||
1643
- (valIsUndef && othIsReflexive)) {
1644
- return 1;
1645
- }
1646
- if ((value < other && !valIsNull) || !othIsReflexive ||
1647
- (othIsNull && !valIsUndef && valIsReflexive) ||
1648
- (othIsUndef && valIsReflexive)) {
1649
- return -1;
1650
- }
1651
- }
1652
- return 0;
1653
- }
1654
-
1655
- module.exports = compareAscending;
1656
-
1657
-
1658
- /***/ },
1659
-
1660
- /***/ 921:
1256
+ /***/ 1054:
1661
1257
  /***/ function(module, exports, __webpack_require__) {
1662
1258
 
1663
1259
  module.exports = __webpack_require__.p + "calendar.scss";