fomantic-ui 2.9.1-beta.24 → 2.9.1-beta.25

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (193) hide show
  1. package/.eslint/eqeqeq-rule.js +18 -0
  2. package/.eslint/index.js +3 -0
  3. package/.eslintrc.js +1 -2
  4. package/dist/components/accordion.css +1 -1
  5. package/dist/components/accordion.js +4 -4
  6. package/dist/components/accordion.min.css +1 -1
  7. package/dist/components/accordion.min.js +2 -2
  8. package/dist/components/ad.css +1 -1
  9. package/dist/components/ad.min.css +1 -1
  10. package/dist/components/api.js +17 -17
  11. package/dist/components/api.min.js +2 -2
  12. package/dist/components/breadcrumb.css +1 -1
  13. package/dist/components/breadcrumb.min.css +1 -1
  14. package/dist/components/button.css +1 -1
  15. package/dist/components/button.min.css +1 -1
  16. package/dist/components/calendar.css +1 -1
  17. package/dist/components/calendar.js +18 -17
  18. package/dist/components/calendar.min.css +1 -1
  19. package/dist/components/calendar.min.js +2 -2
  20. package/dist/components/card.css +1 -1
  21. package/dist/components/card.min.css +1 -1
  22. package/dist/components/checkbox.css +1 -1
  23. package/dist/components/checkbox.js +11 -11
  24. package/dist/components/checkbox.min.css +1 -1
  25. package/dist/components/checkbox.min.js +2 -2
  26. package/dist/components/comment.css +1 -1
  27. package/dist/components/comment.min.css +1 -1
  28. package/dist/components/container.css +1 -1
  29. package/dist/components/container.min.css +1 -1
  30. package/dist/components/dimmer.css +1 -1
  31. package/dist/components/dimmer.js +9 -9
  32. package/dist/components/dimmer.min.css +1 -1
  33. package/dist/components/dimmer.min.js +2 -2
  34. package/dist/components/divider.css +1 -1
  35. package/dist/components/divider.min.css +1 -1
  36. package/dist/components/dropdown.css +1 -1
  37. package/dist/components/dropdown.js +103 -91
  38. package/dist/components/dropdown.min.css +1 -1
  39. package/dist/components/dropdown.min.js +2 -2
  40. package/dist/components/embed.css +1 -1
  41. package/dist/components/embed.js +5 -5
  42. package/dist/components/embed.min.css +1 -1
  43. package/dist/components/embed.min.js +2 -2
  44. package/dist/components/feed.css +1 -1
  45. package/dist/components/feed.min.css +1 -1
  46. package/dist/components/flag.css +1 -1
  47. package/dist/components/flag.min.css +1 -1
  48. package/dist/components/flyout.css +1 -1
  49. package/dist/components/flyout.js +10 -10
  50. package/dist/components/flyout.min.css +1 -1
  51. package/dist/components/flyout.min.js +2 -2
  52. package/dist/components/form.css +1 -1
  53. package/dist/components/form.js +77 -60
  54. package/dist/components/form.min.css +1 -1
  55. package/dist/components/form.min.js +2 -2
  56. package/dist/components/grid.css +1 -1
  57. package/dist/components/grid.min.css +1 -1
  58. package/dist/components/header.css +1 -1
  59. package/dist/components/header.min.css +1 -1
  60. package/dist/components/icon.css +1 -1
  61. package/dist/components/icon.min.css +1 -1
  62. package/dist/components/image.css +1 -1
  63. package/dist/components/image.min.css +1 -1
  64. package/dist/components/input.css +1 -1
  65. package/dist/components/input.min.css +1 -1
  66. package/dist/components/item.css +1 -1
  67. package/dist/components/item.min.css +1 -1
  68. package/dist/components/label.css +1 -1
  69. package/dist/components/label.min.css +1 -1
  70. package/dist/components/list.css +1 -1
  71. package/dist/components/list.min.css +1 -1
  72. package/dist/components/loader.css +1 -1
  73. package/dist/components/loader.min.css +1 -1
  74. package/dist/components/message.css +1 -1
  75. package/dist/components/message.min.css +1 -1
  76. package/dist/components/modal.css +1 -1
  77. package/dist/components/modal.js +4 -4
  78. package/dist/components/modal.min.css +1 -1
  79. package/dist/components/modal.min.js +2 -2
  80. package/dist/components/nag.css +1 -1
  81. package/dist/components/nag.js +5 -5
  82. package/dist/components/nag.min.css +1 -1
  83. package/dist/components/nag.min.js +2 -2
  84. package/dist/components/placeholder.css +1 -1
  85. package/dist/components/placeholder.min.css +1 -1
  86. package/dist/components/popup.css +1 -1
  87. package/dist/components/popup.js +39 -31
  88. package/dist/components/popup.min.css +1 -1
  89. package/dist/components/popup.min.js +2 -2
  90. package/dist/components/progress.css +1 -1
  91. package/dist/components/progress.js +12 -12
  92. package/dist/components/progress.min.css +1 -1
  93. package/dist/components/progress.min.js +2 -2
  94. package/dist/components/rail.css +1 -1
  95. package/dist/components/rail.min.css +1 -1
  96. package/dist/components/rating.css +1 -1
  97. package/dist/components/rating.js +6 -6
  98. package/dist/components/rating.min.css +1 -1
  99. package/dist/components/rating.min.js +2 -2
  100. package/dist/components/reset.css +1 -1
  101. package/dist/components/reset.min.css +1 -1
  102. package/dist/components/reveal.css +1 -1
  103. package/dist/components/reveal.min.css +1 -1
  104. package/dist/components/search.css +1 -1
  105. package/dist/components/search.js +16 -16
  106. package/dist/components/search.min.css +1 -1
  107. package/dist/components/search.min.js +2 -2
  108. package/dist/components/segment.css +1 -1
  109. package/dist/components/segment.min.css +1 -1
  110. package/dist/components/shape.css +1 -1
  111. package/dist/components/shape.js +5 -5
  112. package/dist/components/shape.min.css +1 -1
  113. package/dist/components/shape.min.js +2 -2
  114. package/dist/components/sidebar.css +1 -1
  115. package/dist/components/sidebar.js +13 -13
  116. package/dist/components/sidebar.min.css +1 -1
  117. package/dist/components/sidebar.min.js +2 -2
  118. package/dist/components/site.css +1 -1
  119. package/dist/components/site.js +4 -4
  120. package/dist/components/site.min.css +1 -1
  121. package/dist/components/site.min.js +2 -2
  122. package/dist/components/slider.js +50 -37
  123. package/dist/components/slider.min.js +2 -2
  124. package/dist/components/state.js +5 -5
  125. package/dist/components/state.min.js +2 -2
  126. package/dist/components/statistic.css +1 -1
  127. package/dist/components/statistic.min.css +1 -1
  128. package/dist/components/step.css +1 -1
  129. package/dist/components/step.min.css +1 -1
  130. package/dist/components/sticky.css +1 -1
  131. package/dist/components/sticky.js +8 -8
  132. package/dist/components/sticky.min.css +1 -1
  133. package/dist/components/sticky.min.js +2 -2
  134. package/dist/components/tab.css +1 -1
  135. package/dist/components/tab.js +17 -17
  136. package/dist/components/tab.min.css +1 -1
  137. package/dist/components/tab.min.js +2 -2
  138. package/dist/components/table.css +1 -1
  139. package/dist/components/table.min.css +1 -1
  140. package/dist/components/text.css +1 -1
  141. package/dist/components/text.min.css +1 -1
  142. package/dist/components/toast.css +1 -1
  143. package/dist/components/toast.js +4 -4
  144. package/dist/components/toast.min.css +1 -1
  145. package/dist/components/toast.min.js +2 -2
  146. package/dist/components/transition.css +1 -1
  147. package/dist/components/transition.js +8 -8
  148. package/dist/components/transition.min.css +1 -1
  149. package/dist/components/transition.min.js +2 -2
  150. package/dist/components/visibility.js +12 -12
  151. package/dist/components/visibility.min.js +2 -2
  152. package/dist/semantic.css +50 -50
  153. package/dist/semantic.js +462 -411
  154. package/dist/semantic.min.css +1 -1
  155. package/dist/semantic.min.js +2 -2
  156. package/package.json +1 -1
  157. package/src/definitions/behaviors/api.js +16 -16
  158. package/src/definitions/behaviors/form.js +76 -59
  159. package/src/definitions/behaviors/state.js +4 -4
  160. package/src/definitions/behaviors/visibility.js +11 -11
  161. package/src/definitions/globals/site.js +3 -3
  162. package/src/definitions/modules/accordion.js +3 -3
  163. package/src/definitions/modules/calendar.js +17 -16
  164. package/src/definitions/modules/checkbox.js +10 -10
  165. package/src/definitions/modules/dimmer.js +8 -8
  166. package/src/definitions/modules/dropdown.js +102 -90
  167. package/src/definitions/modules/embed.js +4 -4
  168. package/src/definitions/modules/flyout.js +9 -9
  169. package/src/definitions/modules/modal.js +3 -3
  170. package/src/definitions/modules/nag.js +4 -4
  171. package/src/definitions/modules/popup.js +38 -30
  172. package/src/definitions/modules/progress.js +11 -11
  173. package/src/definitions/modules/rating.js +5 -5
  174. package/src/definitions/modules/search.js +15 -15
  175. package/src/definitions/modules/shape.js +4 -4
  176. package/src/definitions/modules/sidebar.js +12 -12
  177. package/src/definitions/modules/slider.js +49 -36
  178. package/src/definitions/modules/sticky.js +7 -7
  179. package/src/definitions/modules/tab.js +16 -16
  180. package/src/definitions/modules/toast.js +3 -3
  181. package/src/definitions/modules/transition.js +7 -7
  182. package/tasks/admin/components/init.js +1 -1
  183. package/tasks/admin/components/update.js +1 -1
  184. package/tasks/admin/distributions/create.js +4 -5
  185. package/tasks/admin/distributions/init.js +1 -1
  186. package/tasks/admin/distributions/update.js +1 -1
  187. package/tasks/config/project/config.js +2 -2
  188. package/tasks/config/project/install.js +8 -8
  189. package/tasks/config/project/release.js +1 -1
  190. package/tasks/config/tasks.js +2 -2
  191. package/tasks/docs/metadata.js +1 -1
  192. package/tasks/install.js +2 -2
  193. package/test/modules/module.spec.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fomantic-ui",
3
- "version": "2.9.1-beta.24+029436f",
3
+ "version": "2.9.1-beta.25+bbe4e58",
4
4
  "description": "Fomantic empowers designers and developers by creating a shared vocabulary for UI.",
5
5
  "keywords": [
6
6
  "fomantic-ui",
@@ -12,7 +12,7 @@
12
12
  'use strict';
13
13
 
14
14
  function isWindow(obj) {
15
- return obj != null && obj === obj.window;
15
+ return obj !== null && obj === obj.window;
16
16
  }
17
17
 
18
18
  function isFunction(obj) {
@@ -117,7 +117,7 @@
117
117
  $module
118
118
  .on(triggerEvent + eventNamespace, module.event.trigger)
119
119
  ;
120
- } else if (settings.on == 'now') {
120
+ } else if (settings.on === 'now') {
121
121
  module.debug('Querying API endpoint immediately');
122
122
  module.query();
123
123
  }
@@ -296,7 +296,7 @@
296
296
  },
297
297
  loading: function () {
298
298
  return module.request
299
- ? module.request.state() == 'pending'
299
+ ? module.request.state() === 'pending'
300
300
  : false;
301
301
  },
302
302
  abortedRequest: function (xhr) {
@@ -334,13 +334,13 @@
334
334
  return module.cancelled || false;
335
335
  },
336
336
  successful: function () {
337
- return module.request && module.request.state() == 'resolved';
337
+ return module.request && module.request.state() === 'resolved';
338
338
  },
339
339
  failure: function () {
340
- return module.request && module.request.state() == 'rejected';
340
+ return module.request && module.request.state() === 'rejected';
341
341
  },
342
342
  complete: function () {
343
- return module.request && (module.request.state() == 'resolved' || module.request.state() == 'rejected');
343
+ return module.request && (module.request.state() === 'resolved' || module.request.state() === 'rejected');
344
344
  },
345
345
  },
346
346
 
@@ -478,7 +478,7 @@
478
478
  while (nameKeys.length > 0) {
479
479
  var k = nameKeys.pop();
480
480
 
481
- if (k == '' && !Array.isArray(value)) { // foo[]
481
+ if (k === '' && !Array.isArray(value)) { // foo[]
482
482
  value = build([], pushes[pushKey]++, value);
483
483
  } else if (settings.regExp.fixed.test(k)) { // foo[n]
484
484
  value = build([], k, value);
@@ -525,7 +525,7 @@
525
525
  event: {
526
526
  trigger: function (event) {
527
527
  module.query();
528
- if (event.type == 'submit' || event.type == 'click') {
528
+ if (event.type === 'submit' || event.type === 'click') {
529
529
  event.preventDefault();
530
530
  }
531
531
  },
@@ -614,15 +614,15 @@
614
614
  response = module.get.responseFromXHR(xhr),
615
615
  errorMessage = module.get.errorFromRequest(response, status, httpMessage)
616
616
  ;
617
- if (status == 'aborted') {
617
+ if (status === 'aborted') {
618
618
  module.debug('XHR Aborted (Most likely caused by page navigation or CORS Policy)', status, httpMessage);
619
619
  settings.onAbort.call(context, status, $module, xhr);
620
620
 
621
621
  return true;
622
622
  }
623
- if (status == 'invalid') {
623
+ if (status === 'invalid') {
624
624
  module.debug('JSON did not pass success test. A server-side error has most likely occurred', response);
625
- } else if (status == 'error') {
625
+ } else if (status === 'error') {
626
626
  if (xhr !== undefined) {
627
627
  module.debug('XHR produced a server error', status, httpMessage);
628
628
  // make sure we have an error to display to console
@@ -829,12 +829,12 @@
829
829
  return data;
830
830
  },
831
831
  event: function () {
832
- if (isWindow(element) || settings.on == 'now') {
832
+ if (isWindow(element) || settings.on === 'now') {
833
833
  module.debug('API called without element, no events attached');
834
834
 
835
835
  return false;
836
836
  }
837
- if (settings.on == 'auto') {
837
+ if (settings.on === 'auto') {
838
838
  if ($module.is('input')) {
839
839
  return element.oninput !== undefined
840
840
  ? 'input'
@@ -1004,17 +1004,17 @@
1004
1004
  query = query.split(/[ .]/);
1005
1005
  maxDepth = query.length - 1;
1006
1006
  $.each(query, function (depth, value) {
1007
- var camelCaseValue = depth != maxDepth
1007
+ var camelCaseValue = depth !== maxDepth
1008
1008
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1009
1009
  : query
1010
1010
  ;
1011
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
1011
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
1012
1012
  object = object[camelCaseValue];
1013
1013
  } else if (object[camelCaseValue] !== undefined) {
1014
1014
  found = object[camelCaseValue];
1015
1015
 
1016
1016
  return false;
1017
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
1017
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
1018
1018
  object = object[value];
1019
1019
  } else if (object[value] !== undefined) {
1020
1020
  found = object[value];
@@ -345,14 +345,14 @@
345
345
  },
346
346
  fieldDirty: function ($el) {
347
347
  var initialValue = $el.data(metadata.defaultValue);
348
- // Explicitly check for null/undefined here as value may be `false`, so ($el.data(dataInitialValue) || '') would not work
349
- if (initialValue == null) {
348
+ // Explicitly check for undefined/null here as value may be `false`, so ($el.data(dataInitialValue) || '') would not work
349
+ if (initialValue === undefined || initialValue === null) {
350
350
  initialValue = '';
351
351
  } else if (Array.isArray(initialValue)) {
352
352
  initialValue = initialValue.toString();
353
353
  }
354
354
  var currentValue = $el.val();
355
- if (currentValue == null) {
355
+ if (currentValue === undefined || currentValue === null) {
356
356
  currentValue = '';
357
357
  } else if (Array.isArray(currentValue)) {
358
358
  // multiple select values are returned as arrays which are never equal, so do string conversion first
@@ -403,13 +403,13 @@
403
403
  escape: 27,
404
404
  }
405
405
  ;
406
- if (key == keyCode.escape) {
406
+ if (key === keyCode.escape) {
407
407
  module.verbose('Escape key pressed blurring field');
408
408
  $field[0]
409
409
  .blur()
410
410
  ;
411
411
  }
412
- if (!event.ctrlKey && key == keyCode.enter && isInput && !isInDropdown && !isCheckbox) {
412
+ if (!event.ctrlKey && key === keyCode.enter && isInput && !isInDropdown && !isCheckbox) {
413
413
  if (!keyHeldDown) {
414
414
  $field.one('keyup' + eventNamespace, module.event.field.keyup);
415
415
  module.submit();
@@ -428,7 +428,7 @@
428
428
  $fieldGroup = $field.closest($group),
429
429
  validationRules = module.get.validation($field)
430
430
  ;
431
- if (validationRules && (settings.on == 'blur' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
431
+ if (validationRules && (settings.on === 'blur' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
432
432
  module.debug('Revalidating field', $field, validationRules);
433
433
  module.validate.field(validationRules);
434
434
  if (!settings.inline) {
@@ -442,7 +442,7 @@
442
442
  $fieldGroup = $field.closest($group),
443
443
  validationRules = module.get.validation($field)
444
444
  ;
445
- if (validationRules && (settings.on == 'change' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
445
+ if (validationRules && (settings.on === 'change' || ($fieldGroup.hasClass(className.error) && settings.revalidate))) {
446
446
  clearTimeout(module.timer);
447
447
  module.timer = setTimeout(function () {
448
448
  module.debug('Revalidating field', $field, validationRules);
@@ -488,7 +488,7 @@
488
488
  return rule.type;
489
489
  },
490
490
  changeEvent: function (type, $input) {
491
- if (type == 'checkbox' || type == 'radio' || type == 'hidden' || $input.is('select')) {
491
+ if (type === 'checkbox' || type === 'radio' || type === 'hidden' || $input.is('select')) {
492
492
  return 'change';
493
493
  }
494
494
 
@@ -557,7 +557,7 @@
557
557
  }
558
558
  if (requiresName) {
559
559
  $label = $field.closest(selector.group).find('label').eq(0);
560
- name = $label.length == 1
560
+ name = $label.length === 1
561
561
  ? $label.text()
562
562
  : $field.prop('placeholder') || settings.text.unspecifiedField;
563
563
  prompt = prompt.replace(/{name}/g, name);
@@ -730,42 +730,53 @@
730
730
  var date = $calendar.calendar('get date');
731
731
 
732
732
  if (date !== null) {
733
- if (settings.dateHandling == 'date') {
734
- values[name] = date;
735
- } else if (settings.dateHandling == 'input') {
736
- values[name] = $calendar.calendar('get input date');
737
- } else if (settings.dateHandling == 'formatter') {
738
- var type = $calendar.calendar('setting', 'type');
733
+ switch (settings.dateHandling) {
734
+ case 'date': {
735
+ values[name] = date;
739
736
 
740
- switch (type) {
741
- case 'date':
742
- values[name] = settings.formatter.date(date);
743
-
744
- break;
745
-
746
- case 'datetime':
747
- values[name] = settings.formatter.datetime(date);
748
-
749
- break;
750
-
751
- case 'time':
752
- values[name] = settings.formatter.time(date);
753
-
754
- break;
755
-
756
- case 'month':
757
- values[name] = settings.formatter.month(date);
758
-
759
- break;
760
-
761
- case 'year':
762
- values[name] = settings.formatter.year(date);
763
-
764
- break;
737
+ break;
738
+ }
739
+ case 'input': {
740
+ values[name] = $calendar.calendar('get input date');
765
741
 
766
- default:
767
- module.debug('Wrong calendar mode', $calendar, type);
768
- values[name] = '';
742
+ break;
743
+ }
744
+ case 'formatter': {
745
+ var type = $calendar.calendar('setting', 'type');
746
+
747
+ switch (type) {
748
+ case 'date': {
749
+ values[name] = settings.formatter.date(date);
750
+
751
+ break;
752
+ }
753
+ case 'datetime': {
754
+ values[name] = settings.formatter.datetime(date);
755
+
756
+ break;
757
+ }
758
+ case 'time': {
759
+ values[name] = settings.formatter.time(date);
760
+
761
+ break;
762
+ }
763
+ case 'month': {
764
+ values[name] = settings.formatter.month(date);
765
+
766
+ break;
767
+ }
768
+ case 'year': {
769
+ values[name] = settings.formatter.year(date);
770
+
771
+ break;
772
+ }
773
+ default: {
774
+ module.debug('Wrong calendar mode', $calendar, type);
775
+ values[name] = '';
776
+ }
777
+ }
778
+
779
+ break;
769
780
  }
770
781
  }
771
782
  } else {
@@ -854,7 +865,7 @@
854
865
  // For each new rule, check if there's not already one with the same type
855
866
  $.each(newValidation.rules, function (_index, rule) {
856
867
  if ($.grep(validation[name].rules, function (item) {
857
- return item.type == rule.type;
868
+ return item.type === rule.type;
858
869
  }).length === 0) {
859
870
  validation[name].rules.push(rule);
860
871
  }
@@ -1139,7 +1150,7 @@
1139
1150
  validation = module.get.validation($el),
1140
1151
  hasEmptyRule = validation
1141
1152
  ? $.grep(validation.rules, function (rule) {
1142
- return rule.type == 'empty';
1153
+ return rule.type === 'empty';
1143
1154
  }) !== 0
1144
1155
  : false,
1145
1156
  identifier = validation.identifier || $el.attr('id') || $el.attr('name') || $el.data(metadata.validate)
@@ -1158,7 +1169,7 @@
1158
1169
  optional: function (identifier, bool) {
1159
1170
  bool = bool !== false;
1160
1171
  $.each(validation, function (fieldName, field) {
1161
- if (identifier == fieldName || identifier == field.identifier) {
1172
+ if (identifier === fieldName || identifier === field.identifier) {
1162
1173
  field.optional = bool;
1163
1174
  }
1164
1175
  });
@@ -1442,16 +1453,16 @@
1442
1453
  query = query.split(/[ .]/);
1443
1454
  maxDepth = query.length - 1;
1444
1455
  $.each(query, function (depth, value) {
1445
- var camelCaseValue = depth != maxDepth
1456
+ var camelCaseValue = depth !== maxDepth
1446
1457
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1447
1458
  : query;
1448
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
1459
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
1449
1460
  object = object[camelCaseValue];
1450
1461
  } else if (object[camelCaseValue] !== undefined) {
1451
1462
  found = object[camelCaseValue];
1452
1463
 
1453
1464
  return false;
1454
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
1465
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
1455
1466
  object = object[value];
1456
1467
  } else if (object[value] !== undefined) {
1457
1468
  found = object[value];
@@ -1748,7 +1759,7 @@
1748
1759
  if (!range || ['', '..'].indexOf(range) !== -1) {
1749
1760
 
1750
1761
  // do nothing
1751
- } else if (range.indexOf('..') == -1) {
1762
+ } else if (range.indexOf('..') === -1) {
1752
1763
  if (regExp.test(range)) {
1753
1764
  min = range - 0;
1754
1765
  max = min;
@@ -1856,7 +1867,7 @@
1856
1867
  // is exactly length
1857
1868
  exactLength: function (value, requiredLength) {
1858
1869
  return value !== undefined
1859
- ? value.length == requiredLength
1870
+ ? value.length === Number(requiredLength)
1860
1871
  : false;
1861
1872
  },
1862
1873
 
@@ -1894,7 +1905,7 @@
1894
1905
  }
1895
1906
 
1896
1907
  return matchingValue !== undefined
1897
- ? value.toString() == matchingValue.toString()
1908
+ ? value.toString() === matchingValue.toString()
1898
1909
  : false;
1899
1910
  },
1900
1911
 
@@ -2039,10 +2050,12 @@
2039
2050
  },
2040
2051
 
2041
2052
  minCount: function (value, minCount) {
2042
- if (minCount == 0) {
2053
+ minCount = Number(minCount);
2054
+
2055
+ if (minCount === 0) {
2043
2056
  return true;
2044
2057
  }
2045
- if (minCount == 1) {
2058
+ if (minCount === 1) {
2046
2059
  return value !== '';
2047
2060
  }
2048
2061
 
@@ -2050,21 +2063,25 @@
2050
2063
  },
2051
2064
 
2052
2065
  exactCount: function (value, exactCount) {
2053
- if (exactCount == 0) {
2066
+ exactCount = Number(exactCount);
2067
+
2068
+ if (exactCount === 0) {
2054
2069
  return value === '';
2055
2070
  }
2056
- if (exactCount == 1) {
2071
+ if (exactCount === 1) {
2057
2072
  return value !== '' && value.search(',') === -1;
2058
2073
  }
2059
2074
 
2060
- return value.split(',').length == exactCount;
2075
+ return value.split(',').length === exactCount;
2061
2076
  },
2062
2077
 
2063
2078
  maxCount: function (value, maxCount) {
2064
- if (maxCount == 0) {
2079
+ maxCount = Number(maxCount);
2080
+
2081
+ if (maxCount === 0) {
2065
2082
  return false;
2066
2083
  }
2067
- if (maxCount == 1) {
2084
+ if (maxCount === 1) {
2068
2085
  return value.search(',') === -1;
2069
2086
  }
2070
2087
 
@@ -233,7 +233,7 @@
233
233
  }
234
234
  $.when(apiRequest)
235
235
  .then(function () {
236
- if (apiRequest.state() == 'resolved') {
236
+ if (apiRequest.state() === 'resolved') {
237
237
  module.debug('API request succeeded');
238
238
  settings.activateTest = function () {
239
239
  return true;
@@ -519,17 +519,17 @@
519
519
  query = query.split(/[ .]/);
520
520
  maxDepth = query.length - 1;
521
521
  $.each(query, function (depth, value) {
522
- var camelCaseValue = depth != maxDepth
522
+ var camelCaseValue = depth !== maxDepth
523
523
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
524
524
  : query
525
525
  ;
526
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
526
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
527
527
  object = object[camelCaseValue];
528
528
  } else if (object[camelCaseValue] !== undefined) {
529
529
  found = object[camelCaseValue];
530
530
 
531
531
  return false;
532
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
532
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
533
533
  object = object[value];
534
534
  } else if (object[value] !== undefined) {
535
535
  found = object[value];
@@ -83,10 +83,10 @@
83
83
  module.setup.cache();
84
84
 
85
85
  if (module.should.trackChanges()) {
86
- if (settings.type == 'image') {
86
+ if (settings.type === 'image') {
87
87
  module.setup.image();
88
88
  }
89
- if (settings.type == 'fixed') {
89
+ if (settings.type === 'fixed') {
90
90
  module.setup.fixed();
91
91
  }
92
92
 
@@ -131,7 +131,7 @@
131
131
  .off('scroll' + eventNamespace, module.event.scroll)
132
132
  .off('scrollchange' + eventNamespace, module.event.scrollchange)
133
133
  ;
134
- if (settings.type == 'fixed') {
134
+ if (settings.type === 'fixed') {
135
135
  module.resetFixed();
136
136
  module.remove.placeholder();
137
137
  }
@@ -189,7 +189,7 @@
189
189
  [].forEach.call(mutations, function (mutation) {
190
190
  if (mutation.removedNodes) {
191
191
  [].forEach.call(mutation.removedNodes, function (node) {
192
- if (node == element || $(node).find(element).length > 0) {
192
+ if (node === element || $(node).find(element).length > 0) {
193
193
  module.debug('Element removed from DOM, tearing down events');
194
194
  module.destroy();
195
195
  }
@@ -299,7 +299,7 @@
299
299
  module.precache(src, function () {
300
300
  module.set.image(src, function () {
301
301
  loadedCount++;
302
- if (loadedCount == moduleCount) {
302
+ if (loadedCount === moduleCount) {
303
303
  settings.onAllLoaded.call(this);
304
304
  }
305
305
  settings.onLoad.call(this);
@@ -432,7 +432,7 @@
432
432
  : false
433
433
  ;
434
434
 
435
- return overflowY == 'auto' || overflowY == 'scroll';
435
+ return overflowY === 'auto' || overflowY === 'scroll';
436
436
  },
437
437
  horizontallyScrollableContext: function () {
438
438
  var
@@ -441,13 +441,13 @@
441
441
  : false
442
442
  ;
443
443
 
444
- return overflowX == 'auto' || overflowX == 'scroll';
444
+ return overflowX === 'auto' || overflowX === 'scroll';
445
445
  },
446
446
  },
447
447
 
448
448
  refresh: function () {
449
449
  module.debug('Refreshing constants (width/height)');
450
- if (settings.type == 'fixed') {
450
+ if (settings.type === 'fixed') {
451
451
  module.resetFixed();
452
452
  }
453
453
  module.reset();
@@ -1127,17 +1127,17 @@
1127
1127
  query = query.split(/[ .]/);
1128
1128
  maxDepth = query.length - 1;
1129
1129
  $.each(query, function (depth, value) {
1130
- var camelCaseValue = depth != maxDepth
1130
+ var camelCaseValue = depth !== maxDepth
1131
1131
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1132
1132
  : query
1133
1133
  ;
1134
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
1134
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
1135
1135
  object = object[camelCaseValue];
1136
1136
  } else if (object[camelCaseValue] !== undefined) {
1137
1137
  found = object[camelCaseValue];
1138
1138
 
1139
1139
  return false;
1140
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
1140
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
1141
1141
  object = object[value];
1142
1142
  } else if (object[value] !== undefined) {
1143
1143
  found = object[value];
@@ -361,17 +361,17 @@
361
361
  query = query.split(/[ .]/);
362
362
  maxDepth = query.length - 1;
363
363
  $.each(query, function (depth, value) {
364
- var camelCaseValue = depth != maxDepth
364
+ var camelCaseValue = depth !== maxDepth
365
365
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
366
366
  : query
367
367
  ;
368
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
368
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
369
369
  object = object[camelCaseValue];
370
370
  } else if (object[camelCaseValue] !== undefined) {
371
371
  found = object[camelCaseValue];
372
372
 
373
373
  return false;
374
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
374
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
375
375
  object = object[value];
376
376
  } else if (object[value] !== undefined) {
377
377
  found = object[value];
@@ -482,16 +482,16 @@
482
482
  query = query.split(/[ .]/);
483
483
  maxDepth = query.length - 1;
484
484
  $.each(query, function (depth, value) {
485
- var camelCaseValue = depth != maxDepth
485
+ var camelCaseValue = depth !== maxDepth
486
486
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
487
487
  : query;
488
- if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
488
+ if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
489
489
  object = object[camelCaseValue];
490
490
  } else if (object[camelCaseValue] !== undefined) {
491
491
  found = object[camelCaseValue];
492
492
 
493
493
  return false;
494
- } else if ($.isPlainObject(object[value]) && (depth != maxDepth)) {
494
+ } else if ($.isPlainObject(object[value]) && (depth !== maxDepth)) {
495
495
  object = object[value];
496
496
  } else if (object[value] !== undefined) {
497
497
  found = object[value];