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

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 (214) hide show
  1. package/.eslint/index.js +23 -0
  2. package/.eslint/no-extra-parens-rule.js +17 -0
  3. package/.eslint/package.json +11 -0
  4. package/.eslintrc.js +6 -11
  5. package/dist/components/accordion.css +1 -1
  6. package/dist/components/accordion.js +22 -22
  7. package/dist/components/accordion.min.css +1 -1
  8. package/dist/components/accordion.min.js +1 -1
  9. package/dist/components/ad.css +1 -1
  10. package/dist/components/ad.min.css +1 -1
  11. package/dist/components/api.js +47 -47
  12. package/dist/components/api.min.js +1 -1
  13. package/dist/components/breadcrumb.css +1 -1
  14. package/dist/components/breadcrumb.min.css +1 -1
  15. package/dist/components/button.css +1 -1
  16. package/dist/components/button.min.css +1 -1
  17. package/dist/components/calendar.css +1 -1
  18. package/dist/components/calendar.js +69 -58
  19. package/dist/components/calendar.min.css +1 -1
  20. package/dist/components/calendar.min.js +2 -2
  21. package/dist/components/card.css +1 -1
  22. package/dist/components/card.min.css +1 -1
  23. package/dist/components/checkbox.css +1 -1
  24. package/dist/components/checkbox.js +9 -9
  25. package/dist/components/checkbox.min.css +1 -1
  26. package/dist/components/checkbox.min.js +1 -1
  27. package/dist/components/comment.css +1 -1
  28. package/dist/components/comment.min.css +1 -1
  29. package/dist/components/container.css +1 -1
  30. package/dist/components/container.min.css +1 -1
  31. package/dist/components/dimmer.css +1 -1
  32. package/dist/components/dimmer.js +11 -11
  33. package/dist/components/dimmer.min.css +1 -1
  34. package/dist/components/dimmer.min.js +1 -1
  35. package/dist/components/divider.css +1 -1
  36. package/dist/components/divider.min.css +1 -1
  37. package/dist/components/dropdown.css +1 -1
  38. package/dist/components/dropdown.js +171 -173
  39. package/dist/components/dropdown.min.css +1 -1
  40. package/dist/components/dropdown.min.js +1 -1
  41. package/dist/components/embed.css +1 -1
  42. package/dist/components/embed.js +16 -16
  43. package/dist/components/embed.min.css +1 -1
  44. package/dist/components/embed.min.js +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +21 -17
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +1 -1
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +87 -87
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +1 -1
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/message.css +1 -1
  76. package/dist/components/message.min.css +1 -1
  77. package/dist/components/modal.css +1 -1
  78. package/dist/components/modal.js +30 -26
  79. package/dist/components/modal.min.css +1 -1
  80. package/dist/components/modal.min.js +1 -1
  81. package/dist/components/nag.css +1 -1
  82. package/dist/components/nag.js +7 -7
  83. package/dist/components/nag.min.css +1 -1
  84. package/dist/components/nag.min.js +1 -1
  85. package/dist/components/placeholder.css +1 -1
  86. package/dist/components/placeholder.min.css +1 -1
  87. package/dist/components/popup.css +1 -1
  88. package/dist/components/popup.js +45 -45
  89. package/dist/components/popup.min.css +1 -1
  90. package/dist/components/popup.min.js +1 -1
  91. package/dist/components/progress.css +1 -1
  92. package/dist/components/progress.js +30 -32
  93. package/dist/components/progress.min.css +1 -1
  94. package/dist/components/progress.min.js +1 -1
  95. package/dist/components/rail.css +1 -1
  96. package/dist/components/rail.min.css +1 -1
  97. package/dist/components/rating.css +1 -1
  98. package/dist/components/rating.js +10 -10
  99. package/dist/components/rating.min.css +1 -1
  100. package/dist/components/rating.min.js +1 -1
  101. package/dist/components/reset.css +1 -1
  102. package/dist/components/reset.min.css +1 -1
  103. package/dist/components/reveal.css +1 -1
  104. package/dist/components/reveal.min.css +1 -1
  105. package/dist/components/search.css +1 -1
  106. package/dist/components/search.js +31 -31
  107. package/dist/components/search.min.css +1 -1
  108. package/dist/components/search.min.js +1 -1
  109. package/dist/components/segment.css +1 -1
  110. package/dist/components/segment.min.css +1 -1
  111. package/dist/components/shape.css +1 -1
  112. package/dist/components/shape.js +34 -34
  113. package/dist/components/shape.min.css +1 -1
  114. package/dist/components/shape.min.js +1 -1
  115. package/dist/components/sidebar.css +1 -1
  116. package/dist/components/sidebar.js +21 -21
  117. package/dist/components/sidebar.min.css +1 -1
  118. package/dist/components/sidebar.min.js +1 -1
  119. package/dist/components/site.css +1 -1
  120. package/dist/components/site.js +14 -14
  121. package/dist/components/site.min.css +1 -1
  122. package/dist/components/site.min.js +1 -1
  123. package/dist/components/slider.js +33 -25
  124. package/dist/components/slider.min.js +1 -1
  125. package/dist/components/state.js +11 -11
  126. package/dist/components/state.min.js +1 -1
  127. package/dist/components/statistic.css +1 -1
  128. package/dist/components/statistic.min.css +1 -1
  129. package/dist/components/step.css +1 -1
  130. package/dist/components/step.min.css +1 -1
  131. package/dist/components/sticky.css +1 -1
  132. package/dist/components/sticky.js +21 -21
  133. package/dist/components/sticky.min.css +1 -1
  134. package/dist/components/sticky.min.js +1 -1
  135. package/dist/components/tab.css +1 -1
  136. package/dist/components/tab.js +23 -23
  137. package/dist/components/tab.min.css +1 -1
  138. package/dist/components/tab.min.js +1 -1
  139. package/dist/components/table.css +1 -1
  140. package/dist/components/table.min.css +1 -1
  141. package/dist/components/text.css +1 -1
  142. package/dist/components/text.min.css +1 -1
  143. package/dist/components/toast.css +1 -1
  144. package/dist/components/toast.js +41 -17
  145. package/dist/components/toast.min.css +1 -1
  146. package/dist/components/toast.min.js +1 -1
  147. package/dist/components/transition.css +1 -1
  148. package/dist/components/transition.js +21 -21
  149. package/dist/components/transition.min.css +1 -1
  150. package/dist/components/transition.min.js +1 -1
  151. package/dist/components/visibility.js +21 -21
  152. package/dist/components/visibility.min.js +1 -1
  153. package/dist/semantic.css +50 -50
  154. package/dist/semantic.js +847 -800
  155. package/dist/semantic.min.css +1 -1
  156. package/dist/semantic.min.js +2 -2
  157. package/gulpfile.js +1 -1
  158. package/package.json +2 -1
  159. package/scripts/nightly-version.js +3 -1
  160. package/src/definitions/behaviors/api.js +46 -46
  161. package/src/definitions/behaviors/form.js +86 -86
  162. package/src/definitions/behaviors/state.js +10 -10
  163. package/src/definitions/behaviors/visibility.js +20 -20
  164. package/src/definitions/globals/site.js +13 -13
  165. package/src/definitions/modules/accordion.js +21 -21
  166. package/src/definitions/modules/calendar.js +68 -57
  167. package/src/definitions/modules/checkbox.js +8 -8
  168. package/src/definitions/modules/dimmer.js +10 -10
  169. package/src/definitions/modules/dropdown.js +170 -172
  170. package/src/definitions/modules/embed.js +15 -15
  171. package/src/definitions/modules/flyout.js +20 -16
  172. package/src/definitions/modules/modal.js +29 -25
  173. package/src/definitions/modules/nag.js +6 -6
  174. package/src/definitions/modules/popup.js +44 -44
  175. package/src/definitions/modules/progress.js +29 -31
  176. package/src/definitions/modules/rating.js +9 -9
  177. package/src/definitions/modules/search.js +30 -30
  178. package/src/definitions/modules/shape.js +33 -33
  179. package/src/definitions/modules/sidebar.js +20 -20
  180. package/src/definitions/modules/slider.js +32 -24
  181. package/src/definitions/modules/sticky.js +20 -20
  182. package/src/definitions/modules/tab.js +22 -22
  183. package/src/definitions/modules/toast.js +40 -16
  184. package/src/definitions/modules/transition.js +20 -20
  185. package/tasks/admin/components/create.js +1 -1
  186. package/tasks/admin/components/init.js +1 -1
  187. package/tasks/admin/components/update.js +4 -4
  188. package/tasks/admin/distributions/create.js +2 -2
  189. package/tasks/admin/distributions/init.js +1 -1
  190. package/tasks/admin/distributions/update.js +4 -4
  191. package/tasks/admin/publish.js +1 -3
  192. package/tasks/admin/register.js +5 -5
  193. package/tasks/admin/release.js +1 -3
  194. package/tasks/build/assets.js +1 -1
  195. package/tasks/build.js +1 -1
  196. package/tasks/check-install.js +1 -1
  197. package/tasks/clean.js +1 -1
  198. package/tasks/collections/admin.js +1 -1
  199. package/tasks/collections/rtl.js +1 -1
  200. package/tasks/config/admin/github.js +3 -4
  201. package/tasks/config/npm/gulpfile.js +1 -1
  202. package/tasks/config/project/config.js +8 -6
  203. package/tasks/config/project/install.js +10 -10
  204. package/tasks/config/project/release.js +3 -2
  205. package/tasks/config/tasks.js +2 -2
  206. package/tasks/config/user.js +5 -3
  207. package/tasks/docs/build.js +1 -1
  208. package/tasks/docs/metadata.js +1 -1
  209. package/tasks/docs/serve.js +2 -1
  210. package/tasks/install.js +2 -2
  211. package/tasks/rtl/build.js +1 -3
  212. package/tasks/rtl/watch.js +1 -3
  213. package/tasks/version.js +1 -3
  214. package/tasks/watch.js +1 -1
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Form Validation
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Form Validation
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -15,7 +15,7 @@
15
15
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
16
16
  }
17
17
 
18
- window = (window !== undefined && window.Math === Math)
18
+ window = window !== undefined && window.Math === Math
19
19
  ? window
20
20
  : globalThis;
21
21
 
@@ -29,7 +29,7 @@
29
29
 
30
30
  query = arguments[0],
31
31
  legacyParameters = arguments[1],
32
- methodInvoked = (typeof query === 'string'),
32
+ methodInvoked = typeof query === 'string',
33
33
  queryArguments = [].slice.call(arguments, 1),
34
34
  returnedValue
35
35
  ;
@@ -196,7 +196,7 @@
196
196
  defaultValue = $field.data(metadata.defaultValue) || '',
197
197
  isCheckbox = $element.is(selector.uiCheckbox),
198
198
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
199
- isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
199
+ isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
200
200
  isErrored = $fieldGroup.hasClass(className.error)
201
201
  ;
202
202
  if (isErrored) {
@@ -230,7 +230,7 @@
230
230
  defaultValue = $field.data(metadata.defaultValue),
231
231
  isCheckbox = $element.is(selector.uiCheckbox),
232
232
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
233
- isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
233
+ isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
234
234
  isErrored = $fieldGroup.hasClass(className.error)
235
235
  ;
236
236
  if (defaultValue === undefined) {
@@ -263,7 +263,7 @@
263
263
  allValid = true
264
264
  ;
265
265
  $.each(validation, function (fieldName, field) {
266
- if (!(module.validate.field(field, fieldName, true))) {
266
+ if (!module.validate.field(field, fieldName, true)) {
267
267
  allValid = false;
268
268
  }
269
269
  });
@@ -276,7 +276,7 @@
276
276
  $field.each(function (index, el) {
277
277
  var
278
278
  $el = $(el),
279
- isCheckbox = ($el.filter(selector.checkbox).length > 0),
279
+ isCheckbox = $el.filter(selector.checkbox).length > 0,
280
280
  isDirty
281
281
  ;
282
282
 
@@ -299,11 +299,11 @@
299
299
 
300
300
  is: {
301
301
  bracketedRule: function (rule) {
302
- return (rule.type && rule.type.match(settings.regExp.bracket));
302
+ return rule.type && rule.type.match(settings.regExp.bracket);
303
303
  },
304
304
  // duck type rule test
305
305
  shorthandRules: function (rules) {
306
- return (typeof rules === 'string' || Array.isArray(rules));
306
+ return typeof rules === 'string' || Array.isArray(rules);
307
307
  },
308
308
  empty: function ($field) {
309
309
  if (!$field || $field.length === 0) {
@@ -376,10 +376,10 @@
376
376
  return initialValue !== currentValue;
377
377
  },
378
378
  justDirty: function () {
379
- return (history[0] === 'dirty');
379
+ return history[0] === 'dirty';
380
380
  },
381
381
  justClean: function () {
382
- return (history[0] === 'clean');
382
+ return history[0] === 'clean';
383
383
  },
384
384
  },
385
385
 
@@ -397,7 +397,7 @@
397
397
  key = event.which,
398
398
  isInput = $field.is(selector.input),
399
399
  isCheckbox = $field.is(selector.checkbox),
400
- isInDropdown = ($field.closest(selector.uiDropdown).length > 0),
400
+ isInDropdown = $field.closest(selector.uiDropdown).length > 0,
401
401
  keyCode = {
402
402
  enter: 13,
403
403
  escape: 27,
@@ -476,7 +476,7 @@
476
476
  return false;
477
477
  }
478
478
 
479
- return (rule.value !== undefined)
479
+ return rule.value !== undefined
480
480
  ? rule.value
481
481
  : rule.type.match(settings.regExp.bracket)[1] + '';
482
482
  },
@@ -495,11 +495,11 @@
495
495
  return module.get.inputEvent();
496
496
  },
497
497
  inputEvent: function () {
498
- return (document.createElement('input').oninput !== undefined)
498
+ return document.createElement('input').oninput !== undefined
499
499
  ? 'input'
500
- : (document.createElement('input').onpropertychange !== undefined)
500
+ : (document.createElement('input').onpropertychange !== undefined
501
501
  ? 'propertychange'
502
- : 'keyup';
502
+ : 'keyup');
503
503
  },
504
504
  fieldsFromShorthand: function (fields) {
505
505
  var
@@ -532,8 +532,8 @@
532
532
  prompt = isFunction(rule.prompt)
533
533
  ? rule.prompt(value)
534
534
  : rule.prompt || settings.prompt[ruleName] || settings.text.unspecifiedRule,
535
- requiresValue = (prompt.search('{value}') !== -1),
536
- requiresName = (prompt.search('{name}') !== -1),
535
+ requiresValue = prompt.search('{value}') !== -1,
536
+ requiresName = prompt.search('{name}') !== -1,
537
537
  $label,
538
538
  name,
539
539
  parts,
@@ -542,13 +542,11 @@
542
542
  if (ancillary && ['integer', 'decimal', 'number'].indexOf(ruleName) >= 0 && ancillary.indexOf('..') >= 0) {
543
543
  parts = ancillary.split('..', 2);
544
544
  if (!rule.prompt) {
545
- suffixPrompt = (
546
- parts[0] === ''
547
- ? settings.prompt.maxValue.replace(/{ruleValue}/g, '{max}')
548
- : parts[1] === ''
549
- ? settings.prompt.minValue.replace(/{ruleValue}/g, '{min}')
550
- : settings.prompt.range
551
- );
545
+ suffixPrompt = parts[0] === ''
546
+ ? settings.prompt.maxValue.replace(/{ruleValue}/g, '{max}')
547
+ : (parts[1] === ''
548
+ ? settings.prompt.minValue.replace(/{ruleValue}/g, '{min}')
549
+ : settings.prompt.range);
552
550
  prompt += suffixPrompt.replace(/{name}/g, ' ' + settings.text.and);
553
551
  }
554
552
  prompt = prompt.replace(/{min}/g, parts[0]);
@@ -559,7 +557,7 @@
559
557
  }
560
558
  if (requiresName) {
561
559
  $label = $field.closest(selector.group).find('label').eq(0);
562
- name = ($label.length == 1)
560
+ name = $label.length == 1
563
561
  ? $label.text()
564
562
  : $field.prop('placeholder') || settings.text.unspecifiedField;
565
563
  prompt = prompt.replace(/{name}/g, name);
@@ -576,8 +574,8 @@
576
574
  if ($.isPlainObject(parameters)) {
577
575
  var
578
576
  keys = Object.keys(parameters),
579
- isLegacySettings = (keys.length > 0)
580
- ? (parameters[keys[0]].identifier !== undefined && parameters[keys[0]].rules !== undefined)
577
+ isLegacySettings = keys.length > 0
578
+ ? parameters[keys[0]].identifier !== undefined && parameters[keys[0]].rules !== undefined
581
579
  : false
582
580
  ;
583
581
  if (isLegacySettings) {
@@ -698,9 +696,9 @@
698
696
  value = $field.val(),
699
697
  isCheckbox = $field.is(selector.checkbox),
700
698
  isRadio = $field.is(selector.radio),
701
- isMultiple = (name.indexOf('[]') !== -1),
702
- isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
703
- isChecked = (isCheckbox)
699
+ isMultiple = name.indexOf('[]') !== -1,
700
+ isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
701
+ isChecked = isCheckbox
704
702
  ? $field.is(':checked')
705
703
  : false
706
704
  ;
@@ -722,7 +720,7 @@
722
720
  } else {
723
721
  if (isRadio) {
724
722
  if (values[name] === undefined || values[name] === false) {
725
- values[name] = (isChecked)
723
+ values[name] = isChecked
726
724
  ? value || true
727
725
  : false;
728
726
  }
@@ -873,9 +871,9 @@
873
871
  $field = module.get.field(identifier),
874
872
  $fieldGroup = $field.closest($group),
875
873
  $prompt = $fieldGroup.children(selector.prompt),
876
- promptExists = ($prompt.length > 0)
874
+ promptExists = $prompt.length > 0
877
875
  ;
878
- errors = (typeof errors === 'string')
876
+ errors = typeof errors === 'string'
879
877
  ? [errors]
880
878
  : errors;
881
879
  module.verbose('Adding field error state', identifier);
@@ -1014,11 +1012,11 @@
1014
1012
  var
1015
1013
  $el = $(el),
1016
1014
  $parent = $el.parent(),
1017
- isCheckbox = ($el.filter(selector.checkbox).length > 0),
1015
+ isCheckbox = $el.filter(selector.checkbox).length > 0,
1018
1016
  isDropdown = $parent.is(selector.uiDropdown) && module.can.useElement('dropdown'),
1019
1017
  $calendar = $el.closest(selector.uiCalendar),
1020
- isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
1021
- value = (isCheckbox)
1018
+ isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
1019
+ value = isCheckbox
1022
1020
  ? $el.is(':checked')
1023
1021
  : $el.val()
1024
1022
  ;
@@ -1057,9 +1055,9 @@
1057
1055
  isMultiple = Array.isArray(value),
1058
1056
  isCheckbox = $element.is(selector.uiCheckbox) && module.can.useElement('checkbox'),
1059
1057
  isDropdown = $element.is(selector.uiDropdown) && module.can.useElement('dropdown'),
1060
- isRadio = ($field.is(selector.radio) && isCheckbox),
1061
- isCalendar = ($calendar.length > 0 && module.can.useElement('calendar')),
1062
- fieldExists = ($field.length > 0),
1058
+ isRadio = $field.is(selector.radio) && isCheckbox,
1059
+ isCalendar = $calendar.length > 0 && module.can.useElement('calendar'),
1060
+ fieldExists = $field.length > 0,
1063
1061
  $multipleField
1064
1062
  ;
1065
1063
  if (fieldExists) {
@@ -1135,7 +1133,7 @@
1135
1133
  var
1136
1134
  $el = $(el),
1137
1135
  $elGroup = $el.closest($group),
1138
- isCheckbox = ($el.filter(selector.checkbox).length > 0),
1136
+ isCheckbox = $el.filter(selector.checkbox).length > 0,
1139
1137
  isRequired = $el.prop('required') || $elGroup.hasClass(className.required) || $elGroup.parent().hasClass(className.required),
1140
1138
  isDisabled = $el.is(':disabled') || $elGroup.hasClass(className.disabled) || $elGroup.parent().hasClass(className.disabled),
1141
1139
  validation = module.get.validation($el),
@@ -1158,7 +1156,7 @@
1158
1156
  });
1159
1157
  },
1160
1158
  optional: function (identifier, bool) {
1161
- bool = (bool !== false);
1159
+ bool = bool !== false;
1162
1160
  $.each(validation, function (fieldName, field) {
1163
1161
  if (identifier == fieldName || identifier == field.identifier) {
1164
1162
  field.optional = bool;
@@ -1228,7 +1226,7 @@
1228
1226
 
1229
1227
  // takes a validation object and returns whether field passes validation
1230
1228
  field: function (field, fieldName, showErrors) {
1231
- showErrors = (showErrors !== undefined)
1229
+ showErrors = showErrors !== undefined
1232
1230
  ? showErrors
1233
1231
  : true;
1234
1232
  if (typeof field === 'string') {
@@ -1239,7 +1237,7 @@
1239
1237
  var
1240
1238
  identifier = field.identifier || fieldName,
1241
1239
  $field = module.get.field(identifier),
1242
- $dependsField = (field.depends)
1240
+ $dependsField = field.depends
1243
1241
  ? module.get.field(field.depends)
1244
1242
  : false,
1245
1243
  fieldValid = true,
@@ -1302,11 +1300,13 @@
1302
1300
  invalidFields = [],
1303
1301
  isCheckbox = $field.is(selector.checkbox),
1304
1302
  isValid = function (field) {
1305
- var value = (isCheckbox ? $(field).filter(':checked').val() : $(field).val());
1303
+ var value = isCheckbox ? $(field).filter(':checked').val() : $(field).val();
1306
1304
  // cast to string avoiding encoding special values
1307
- value = (value === undefined || value === '' || value === null)
1305
+ value = value === undefined || value === '' || value === null
1308
1306
  ? ''
1309
- : (settings.shouldTrim && rule.shouldTrim !== false) || rule.shouldTrim ? String(value + '').trim() : String(value + '');
1307
+ : ((settings.shouldTrim && rule.shouldTrim !== false) || rule.shouldTrim
1308
+ ? String(value + '').trim()
1309
+ : String(value + ''));
1310
1310
 
1311
1311
  return ruleFunction.call(field, value, ancillary, $module);
1312
1312
  }
@@ -1442,7 +1442,7 @@
1442
1442
  query = query.split(/[ .]/);
1443
1443
  maxDepth = query.length - 1;
1444
1444
  $.each(query, function (depth, value) {
1445
- var camelCaseValue = (depth != maxDepth)
1445
+ var camelCaseValue = depth != maxDepth
1446
1446
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1447
1447
  : query;
1448
1448
  if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
@@ -1481,7 +1481,7 @@
1481
1481
  module.initialize();
1482
1482
  });
1483
1483
 
1484
- return (returnedValue !== undefined)
1484
+ return returnedValue !== undefined
1485
1485
  ? returnedValue
1486
1486
  : this;
1487
1487
  };
@@ -1689,7 +1689,7 @@
1689
1689
 
1690
1690
  // checkbox checked
1691
1691
  checked: function () {
1692
- return ($(this).filter(':checked').length > 0);
1692
+ return $(this).filter(':checked').length > 0;
1693
1693
  },
1694
1694
 
1695
1695
  // is most likely an email
@@ -1713,10 +1713,10 @@
1713
1713
  ;
1714
1714
  // regular expression specified as /baz/gi (flags)
1715
1715
  if (regExpParts) {
1716
- regExp = (regExpParts.length >= 2)
1716
+ regExp = regExpParts.length >= 2
1717
1717
  ? regExpParts[1]
1718
1718
  : regExp;
1719
- flags = (regExpParts.length >= 3)
1719
+ flags = regExpParts.length >= 3
1720
1720
  ? regExpParts[2]
1721
1721
  : '';
1722
1722
  }
@@ -1782,36 +1782,36 @@
1782
1782
 
1783
1783
  // is value (case insensitive)
1784
1784
  is: function (value, text) {
1785
- text = (typeof text === 'string')
1785
+ text = typeof text === 'string'
1786
1786
  ? text.toLowerCase()
1787
1787
  : text;
1788
- value = (typeof value === 'string')
1788
+ value = typeof value === 'string'
1789
1789
  ? value.toLowerCase()
1790
1790
  : value;
1791
1791
 
1792
- return (value == text);
1792
+ return value == text;
1793
1793
  },
1794
1794
 
1795
1795
  // is value
1796
1796
  isExactly: function (value, text) {
1797
- return (value == text);
1797
+ return value == text;
1798
1798
  },
1799
1799
 
1800
1800
  // value is not another value (case insensitive)
1801
1801
  not: function (value, notValue) {
1802
- value = (typeof value === 'string')
1802
+ value = typeof value === 'string'
1803
1803
  ? value.toLowerCase()
1804
1804
  : value;
1805
- notValue = (typeof notValue === 'string')
1805
+ notValue = typeof notValue === 'string'
1806
1806
  ? notValue.toLowerCase()
1807
1807
  : notValue;
1808
1808
 
1809
- return (value != notValue);
1809
+ return value != notValue;
1810
1810
  },
1811
1811
 
1812
1812
  // value is not another value (case sensitive)
1813
1813
  notExactly: function (value, notValue) {
1814
- return (value != notValue);
1814
+ return value != notValue;
1815
1815
  },
1816
1816
 
1817
1817
  // value contains text (insensitive)
@@ -1819,7 +1819,7 @@
1819
1819
  // escape regex characters
1820
1820
  text = text.replace($.fn.form.settings.regExp.escape, '\\$&');
1821
1821
 
1822
- return (value.search(new RegExp(text, 'i')) !== -1);
1822
+ return value.search(new RegExp(text, 'i')) !== -1;
1823
1823
  },
1824
1824
 
1825
1825
  // value contains text (case sensitive)
@@ -1827,7 +1827,7 @@
1827
1827
  // escape regex characters
1828
1828
  text = text.replace($.fn.form.settings.regExp.escape, '\\$&');
1829
1829
 
1830
- return (value.search(new RegExp(text)) !== -1);
1830
+ return value.search(new RegExp(text)) !== -1;
1831
1831
  },
1832
1832
 
1833
1833
  // value contains text (insensitive)
@@ -1835,7 +1835,7 @@
1835
1835
  // escape regex characters
1836
1836
  text = text.replace($.fn.form.settings.regExp.escape, '\\$&');
1837
1837
 
1838
- return (value.search(new RegExp(text, 'i')) === -1);
1838
+ return value.search(new RegExp(text, 'i')) === -1;
1839
1839
  },
1840
1840
 
1841
1841
  // value contains text (case sensitive)
@@ -1843,27 +1843,27 @@
1843
1843
  // escape regex characters
1844
1844
  text = text.replace($.fn.form.settings.regExp.escape, '\\$&');
1845
1845
 
1846
- return (value.search(new RegExp(text)) === -1);
1846
+ return value.search(new RegExp(text)) === -1;
1847
1847
  },
1848
1848
 
1849
1849
  // is at least string length
1850
1850
  minLength: function (value, requiredLength) {
1851
- return (value !== undefined)
1852
- ? (value.length >= requiredLength)
1851
+ return value !== undefined
1852
+ ? value.length >= requiredLength
1853
1853
  : false;
1854
1854
  },
1855
1855
 
1856
1856
  // is exactly length
1857
1857
  exactLength: function (value, requiredLength) {
1858
- return (value !== undefined)
1859
- ? (value.length == requiredLength)
1858
+ return value !== undefined
1859
+ ? value.length == requiredLength
1860
1860
  : false;
1861
1861
  },
1862
1862
 
1863
1863
  // is less than length
1864
1864
  maxLength: function (value, maxLength) {
1865
- return (value !== undefined)
1866
- ? (value.length <= maxLength)
1865
+ return value !== undefined
1866
+ ? value.length <= maxLength
1867
1867
  : false;
1868
1868
  },
1869
1869
 
@@ -1893,8 +1893,8 @@
1893
1893
  }
1894
1894
  }
1895
1895
 
1896
- return (matchingValue !== undefined)
1897
- ? (value.toString() == matchingValue.toString())
1896
+ return matchingValue !== undefined
1897
+ ? value.toString() == matchingValue.toString()
1898
1898
  : false;
1899
1899
  },
1900
1900
 
@@ -1925,8 +1925,8 @@
1925
1925
  }
1926
1926
  }
1927
1927
 
1928
- return (matchingValue !== undefined)
1929
- ? (value.toString() !== matchingValue.toString())
1928
+ return matchingValue !== undefined
1929
+ ? value.toString() !== matchingValue.toString()
1930
1930
  : false;
1931
1931
  },
1932
1932
 
@@ -1976,7 +1976,7 @@
1976
1976
  },
1977
1977
  valid = {},
1978
1978
  validCard = false,
1979
- requiredTypes = (typeof cardTypes === 'string')
1979
+ requiredTypes = typeof cardTypes === 'string'
1980
1980
  ? cardTypes.split(',')
1981
1981
  : false,
1982
1982
  unionPay,
@@ -1997,8 +1997,8 @@
1997
1997
  validation = cards[type];
1998
1998
  if (validation) {
1999
1999
  valid = {
2000
- length: ($.inArray(cardNumber.length, validation.length) !== -1),
2001
- pattern: (cardNumber.search(validation.pattern) !== -1),
2000
+ length: $.inArray(cardNumber.length, validation.length) !== -1,
2001
+ pattern: cardNumber.search(validation.pattern) !== -1,
2002
2002
  };
2003
2003
  if (valid.length > 0 && valid.pattern) {
2004
2004
  validCard = true;
@@ -2013,8 +2013,8 @@
2013
2013
 
2014
2014
  // skip luhn for UnionPay
2015
2015
  unionPay = {
2016
- number: ($.inArray(cardNumber.length, cards.unionPay.length) !== -1),
2017
- pattern: (cardNumber.search(cards.unionPay.pattern) !== -1),
2016
+ number: $.inArray(cardNumber.length, cards.unionPay.length) !== -1,
2017
+ pattern: cardNumber.search(cards.unionPay.pattern) !== -1,
2018
2018
  };
2019
2019
  if (unionPay.number && unionPay.pattern) {
2020
2020
  return true;
@@ -2035,7 +2035,7 @@
2035
2035
  multiple ^= 1; // eslint-disable-line no-bitwise
2036
2036
  }
2037
2037
 
2038
- return (sum % 10 === 0 && sum > 0);
2038
+ return sum % 10 === 0 && sum > 0;
2039
2039
  },
2040
2040
 
2041
2041
  minCount: function (value, minCount) {
@@ -2043,21 +2043,21 @@
2043
2043
  return true;
2044
2044
  }
2045
2045
  if (minCount == 1) {
2046
- return (value !== '');
2046
+ return value !== '';
2047
2047
  }
2048
2048
 
2049
- return (value.split(',').length >= minCount);
2049
+ return value.split(',').length >= minCount;
2050
2050
  },
2051
2051
 
2052
2052
  exactCount: function (value, exactCount) {
2053
2053
  if (exactCount == 0) {
2054
- return (value === '');
2054
+ return value === '';
2055
2055
  }
2056
2056
  if (exactCount == 1) {
2057
- return (value !== '' && value.search(',') === -1);
2057
+ return value !== '' && value.search(',') === -1;
2058
2058
  }
2059
2059
 
2060
- return (value.split(',').length == exactCount);
2060
+ return value.split(',').length == exactCount;
2061
2061
  },
2062
2062
 
2063
2063
  maxCount: function (value, maxCount) {
@@ -2065,10 +2065,10 @@
2065
2065
  return false;
2066
2066
  }
2067
2067
  if (maxCount == 1) {
2068
- return (value.search(',') === -1);
2068
+ return value.search(',') === -1;
2069
2069
  }
2070
2070
 
2071
- return (value.split(',').length <= maxCount);
2071
+ return value.split(',').length <= maxCount;
2072
2072
  },
2073
2073
  },
2074
2074
 
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Form
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Form
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.1-beta.23+27384cb
2
+ * # Fomantic UI - 2.9.1-beta.24+029436f
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Grid
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Grid
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Grid
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Grid
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Header
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Header
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Header
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Header
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Icon
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Icon
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Icon
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Icon
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Image
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Image
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Image
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Image
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Input
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Input
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Input
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Input
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Item
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Item
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Item
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Item
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Label
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Label
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Label
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Label
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *