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
@@ -0,0 +1,23 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'no-extra-parens': require('./no-extra-parens-rule'),
4
+ },
5
+ configs: {
6
+ recommended: {
7
+ plugins: [
8
+ '@internal/eslint-plugin',
9
+ ],
10
+ rules: {
11
+ // https://github.com/eslint/eslint/issues/16626
12
+ // https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/errors.js#L66
13
+ '@internal/no-extra-parens': ['error', 'all', {
14
+ conditionalAssign: true,
15
+ enforceForArrowConditionals: false,
16
+ ignoreJSX: 'all',
17
+ nestedBinaryExpressions: false,
18
+ returnAssign: false,
19
+ }],
20
+ },
21
+ },
22
+ },
23
+ };
@@ -0,0 +1,17 @@
1
+ const eslint = require('eslint');
2
+ const ruleComposer = require('eslint-rule-composer');
3
+
4
+ const rule = new eslint.Linter().getRules().get('no-extra-parens');
5
+
6
+ module.exports = ruleComposer.filterReports(
7
+ rule,
8
+ (problem) => {
9
+ if (problem.node.type === 'ConditionalExpression'
10
+ && (problem.node.parent.type === 'ConditionalExpression' || problem.node.parent.type === 'SpreadElement')
11
+ ) {
12
+ return false;
13
+ }
14
+
15
+ return problem;
16
+ }
17
+ );
@@ -0,0 +1,11 @@
1
+ {
2
+ "name": "@internal/eslint-plugin",
3
+ "version": "1.0.0",
4
+ "private": true,
5
+ "dependencies": {
6
+ "eslint-rule-composer": "^0.3.0"
7
+ },
8
+ "peerDependencies": {
9
+ "eslint": "*"
10
+ }
11
+ }
package/.eslintrc.js CHANGED
@@ -6,6 +6,7 @@ module.exports = {
6
6
  extends: [
7
7
  'airbnb-base',
8
8
  'plugin:unicorn/recommended',
9
+ 'plugin:@internal/eslint-plugin/recommended',
9
10
  ],
10
11
  parserOptions: {
11
12
  ecmaVersion: '2020',
@@ -22,10 +23,10 @@ module.exports = {
22
23
  'class-methods-use-this': 'off',
23
24
  'comma-dangle': ['error', {
24
25
  arrays: 'always-multiline',
25
- objects: 'always-multiline',
26
+ exports: 'always-multiline',
26
27
  functions: 'never',
27
28
  imports: 'always-multiline',
28
- exports: 'always-multiline',
29
+ objects: 'always-multiline',
29
30
  }],
30
31
  'consistent-return': 'off',
31
32
  curly: ['error', 'all'],
@@ -56,8 +57,8 @@ module.exports = {
56
57
  'object-shorthand': ['error', 'never'],
57
58
  'padding-line-between-statements': ['error', {
58
59
  blankLine: 'always',
59
- prev: '*',
60
60
  next: ['continue', 'break', 'export', 'return', 'throw'],
61
+ prev: '*',
61
62
  }],
62
63
  'prefer-destructuring': 'off',
63
64
  'prefer-template': 'off',
@@ -95,6 +96,7 @@ module.exports = {
95
96
  'one-var': 'off',
96
97
  'prefer-const': 'off',
97
98
  'prefer-exponentiation-operator': 'off',
99
+ 'prefer-rest-params': 'off',
98
100
  'prefer-spread': 'off',
99
101
  'semi-style': 'off',
100
102
  'unicorn/no-array-for-each': 'off',
@@ -114,15 +116,8 @@ module.exports = {
114
116
  eqeqeq: 'off', // about 300 errors to be fixed manually
115
117
  'global-require': 'off', // about 30 errors to be fixed manually
116
118
  'no-shadow': 'off', // about 220 errors to be fixed manually
119
+ 'no-shadow-restricted-names': 'off', // TODO https://github.com/fomantic/Fomantic-UI/pull/2604
117
120
  'prefer-arrow-callback': 'off', // about 350 errors (all autofixable)
118
- 'prefer-rest-params': 'off', // about 180 errors to be fixed manually
119
- 'unicorn/no-nested-ternary': 'off', // about 80 errors (except 14 nested ternary operators autofixable)
120
-
121
- // TODO
122
- 'no-return-assign': 'off',
123
- 'no-shadow-restricted-names': 'off',
124
- 'no-use-before-define': 'off',
125
- 'unicorn/prefer-negative-index': 'off',
126
121
  },
127
122
  reportUnusedDisableDirectives: true,
128
123
  globals: {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Accordion
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Accordion
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 - Accordion
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Accordion
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
 
@@ -27,14 +27,14 @@
27
27
  performance = [],
28
28
 
29
29
  query = arguments[0],
30
- methodInvoked = (typeof query === 'string'),
30
+ methodInvoked = typeof query === 'string',
31
31
  queryArguments = [].slice.call(arguments, 1),
32
32
 
33
33
  returnedValue
34
34
  ;
35
35
  $allModules.each(function () {
36
36
  var
37
- settings = ($.isPlainObject(parameters))
37
+ settings = $.isPlainObject(parameters)
38
38
  ? $.extend(true, {}, $.fn.accordion.settings, parameters)
39
39
  : $.extend({}, $.fn.accordion.settings),
40
40
 
@@ -121,16 +121,16 @@
121
121
 
122
122
  toggle: function (query) {
123
123
  var
124
- $activeTitle = (query !== undefined)
125
- ? (typeof query === 'number')
124
+ $activeTitle = query !== undefined
125
+ ? (typeof query === 'number'
126
126
  ? $title.eq(query)
127
- : $(query).closest(selector.title)
127
+ : $(query).closest(selector.title))
128
128
  : $(this).closest(selector.title),
129
129
  $activeContent = $activeTitle.next($content),
130
130
  isAnimating = $activeContent.hasClass(className.animating),
131
131
  isActive = $activeContent.hasClass(className.active),
132
- isOpen = (isActive && !isAnimating),
133
- isOpening = (!isActive && isAnimating)
132
+ isOpen = isActive && !isAnimating,
133
+ isOpening = !isActive && isAnimating
134
134
  ;
135
135
  module.debug('Toggling visibility of content', $activeTitle);
136
136
  if (isOpen || isOpening) {
@@ -146,15 +146,15 @@
146
146
 
147
147
  open: function (query) {
148
148
  var
149
- $activeTitle = (query !== undefined)
150
- ? (typeof query === 'number')
149
+ $activeTitle = query !== undefined
150
+ ? (typeof query === 'number'
151
151
  ? $title.eq(query)
152
- : $(query).closest(selector.title)
152
+ : $(query).closest(selector.title))
153
153
  : $(this).closest(selector.title),
154
154
  $activeContent = $activeTitle.next($content),
155
155
  isAnimating = $activeContent.hasClass(className.animating),
156
156
  isActive = $activeContent.hasClass(className.active),
157
- isOpen = (isActive || isAnimating)
157
+ isOpen = isActive || isAnimating
158
158
  ;
159
159
  if (isOpen) {
160
160
  module.debug('Accordion already open, skipping', $activeContent);
@@ -216,16 +216,16 @@
216
216
 
217
217
  close: function (query) {
218
218
  var
219
- $activeTitle = (query !== undefined)
220
- ? (typeof query === 'number')
219
+ $activeTitle = query !== undefined
220
+ ? (typeof query === 'number'
221
221
  ? $title.eq(query)
222
- : $(query).closest(selector.title)
222
+ : $(query).closest(selector.title))
223
223
  : $(this).closest(selector.title),
224
224
  $activeContent = $activeTitle.next($content),
225
225
  isAnimating = $activeContent.hasClass(className.animating),
226
226
  isActive = $activeContent.hasClass(className.active),
227
- isOpening = (!isActive && isAnimating),
228
- isClosing = (isActive && isAnimating)
227
+ isOpening = !isActive && isAnimating,
228
+ isClosing = isActive && isAnimating
229
229
  ;
230
230
  if ((isActive || isOpening) && !isClosing) {
231
231
  module.debug('Closing accordion content', $activeContent);
@@ -278,7 +278,7 @@
278
278
 
279
279
  closeOthers: function (index) {
280
280
  var
281
- $activeTitle = (index !== undefined)
281
+ $activeTitle = index !== undefined
282
282
  ? $title.eq(index)
283
283
  : $(this).closest(selector.title),
284
284
  $parentTitles = $activeTitle.parents(selector.content).prev(selector.title),
@@ -298,7 +298,7 @@
298
298
  $openTitles = $openTitles.not($nestedTitles);
299
299
  $openContents = $openTitles.next($content);
300
300
  }
301
- if (($openTitles.length > 0)) {
301
+ if ($openTitles.length > 0) {
302
302
  module.debug('Exclusive enabled, closing other content', $openTitles);
303
303
  $openTitles
304
304
  .removeClass(className.active)
@@ -482,7 +482,7 @@
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
488
  if ($.isPlainObject(object[camelCaseValue]) && (depth != maxDepth)) {
@@ -533,7 +533,7 @@
533
533
  }
534
534
  });
535
535
 
536
- return (returnedValue !== undefined)
536
+ return returnedValue !== undefined
537
537
  ? returnedValue
538
538
  : this;
539
539
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.23+27384cb - Accordion
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Accordion
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 - Ad
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Ad
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 - Ad
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Ad
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 - API
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - API
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -19,7 +19,7 @@
19
19
  return typeof obj === 'function' && typeof obj.nodeType !== 'number';
20
20
  }
21
21
 
22
- window = (window !== undefined && window.Math === Math)
22
+ window = window !== undefined && window.Math === Math
23
23
  ? window
24
24
  : globalThis;
25
25
 
@@ -34,7 +34,7 @@
34
34
  performance = [],
35
35
 
36
36
  query = arguments[0],
37
- methodInvoked = (typeof query === 'string'),
37
+ methodInvoked = typeof query === 'string',
38
38
  queryArguments = [].slice.call(arguments, 1),
39
39
 
40
40
  returnedValue
@@ -42,7 +42,7 @@
42
42
 
43
43
  $allModules.each(function () {
44
44
  var
45
- settings = ($.isPlainObject(parameters))
45
+ settings = $.isPlainObject(parameters)
46
46
  ? $.extend(true, {}, $.fn.api.settings, parameters)
47
47
  : $.extend({}, $.fn.api.settings),
48
48
 
@@ -62,7 +62,7 @@
62
62
  $form = $module.closest(selector.form),
63
63
 
64
64
  // context used for state
65
- $context = (settings.stateContext)
65
+ $context = settings.stateContext
66
66
  ? ([window, document].indexOf(settings.stateContext) < 0 ? $(document).find(settings.stateContext) : $(settings.stateContext))
67
67
  : $module,
68
68
 
@@ -274,13 +274,13 @@
274
274
 
275
275
  should: {
276
276
  removeError: function () {
277
- return (settings.hideError === true || (settings.hideError === 'auto' && !module.is.form()));
277
+ return settings.hideError === true || (settings.hideError === 'auto' && !module.is.form());
278
278
  },
279
279
  },
280
280
 
281
281
  is: {
282
282
  disabled: function () {
283
- return ($module.filter(selector.disabled).length > 0);
283
+ return $module.filter(selector.disabled).length > 0;
284
284
  },
285
285
  expectingJSON: function () {
286
286
  return settings.dataType === 'json' || settings.dataType === 'jsonp';
@@ -289,14 +289,14 @@
289
289
  return $module.is('form') || $context.is('form');
290
290
  },
291
291
  mocked: function () {
292
- return (settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync);
292
+ return settings.mockResponse || settings.mockResponseAsync || settings.response || settings.responseAsync;
293
293
  },
294
294
  input: function () {
295
295
  return $module.is('input');
296
296
  },
297
297
  loading: function () {
298
- return (module.request)
299
- ? (module.request.state() == 'pending')
298
+ return module.request
299
+ ? module.request.state() == 'pending'
300
300
  : false;
301
301
  },
302
302
  abortedRequest: function (xhr) {
@@ -311,7 +311,7 @@
311
311
  return false;
312
312
  },
313
313
  validResponse: function (response) {
314
- if ((!module.is.expectingJSON()) || !isFunction(settings.successTest)) {
314
+ if (!module.is.expectingJSON() || !isFunction(settings.successTest)) {
315
315
  module.verbose('Response is not JSON, skipping validation', settings.successTest, response);
316
316
 
317
317
  return true;
@@ -331,16 +331,16 @@
331
331
 
332
332
  was: {
333
333
  cancelled: function () {
334
- return (module.cancelled || false);
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
 
@@ -359,16 +359,16 @@
359
359
  $.each(requiredVariables, function (index, templatedString) {
360
360
  var
361
361
  // allow legacy {$var} style
362
- variable = (templatedString.indexOf('$') !== -1)
362
+ variable = templatedString.indexOf('$') !== -1
363
363
  ? templatedString.slice(2, -1)
364
364
  : templatedString.slice(1, -1),
365
- value = ($.isPlainObject(urlData) && urlData[variable] !== undefined)
365
+ value = $.isPlainObject(urlData) && urlData[variable] !== undefined
366
366
  ? urlData[variable]
367
- : ($module.data(variable) !== undefined)
367
+ : ($module.data(variable) !== undefined
368
368
  ? $module.data(variable)
369
- : ($context.data(variable) !== undefined)
369
+ : ($context.data(variable) !== undefined // eslint-disable-line unicorn/no-nested-ternary
370
370
  ? $context.data(variable)
371
- : urlData[variable]
371
+ : urlData[variable]))
372
372
  ;
373
373
  // remove value
374
374
  if (value === undefined) {
@@ -379,7 +379,7 @@
379
379
  }
380
380
 
381
381
  module.verbose('Found required variable', variable, value);
382
- value = (settings.encodeParameters)
382
+ value = settings.encodeParameters
383
383
  ? module.get.urlEncodedValue(value)
384
384
  : value;
385
385
  url = url.replace(templatedString, value);
@@ -390,16 +390,16 @@
390
390
  $.each(optionalVariables, function (index, templatedString) {
391
391
  var
392
392
  // allow legacy {/$var} style
393
- variable = (templatedString.indexOf('$') !== -1)
393
+ variable = templatedString.indexOf('$') !== -1
394
394
  ? templatedString.slice(3, -1)
395
395
  : templatedString.slice(2, -1),
396
- value = ($.isPlainObject(urlData) && urlData[variable] !== undefined)
396
+ value = $.isPlainObject(urlData) && urlData[variable] !== undefined
397
397
  ? urlData[variable]
398
- : ($module.data(variable) !== undefined)
398
+ : ($module.data(variable) !== undefined
399
399
  ? $module.data(variable)
400
- : ($context.data(variable) !== undefined)
400
+ : ($context.data(variable) !== undefined // eslint-disable-line unicorn/no-nested-ternary
401
401
  ? $context.data(variable)
402
- : urlData[variable]
402
+ : urlData[variable]))
403
403
  ;
404
404
  // optional replacement
405
405
  if (value !== undefined) {
@@ -536,15 +536,15 @@
536
536
  done: function (response, textStatus, xhr) {
537
537
  var
538
538
  context = this,
539
- elapsedTime = (Date.now() - requestStartTime),
540
- timeLeft = (settings.loadingDuration - elapsedTime),
541
- translatedResponse = (isFunction(settings.onResponse))
542
- ? module.is.expectingJSON() && !settings.rawResponse
539
+ elapsedTime = Date.now() - requestStartTime,
540
+ timeLeft = settings.loadingDuration - elapsedTime,
541
+ translatedResponse = isFunction(settings.onResponse)
542
+ ? (module.is.expectingJSON() && !settings.rawResponse
543
543
  ? settings.onResponse.call(context, $.extend(true, {}, response))
544
- : settings.onResponse.call(context, response)
544
+ : settings.onResponse.call(context, response))
545
545
  : false
546
546
  ;
547
- timeLeft = (timeLeft > 0)
547
+ timeLeft = timeLeft > 0
548
548
  ? timeLeft
549
549
  : 0;
550
550
  if (translatedResponse) {
@@ -565,10 +565,10 @@
565
565
  fail: function (xhr, status, httpMessage) {
566
566
  var
567
567
  context = this,
568
- elapsedTime = (Date.now() - requestStartTime),
569
- timeLeft = (settings.loadingDuration - elapsedTime)
568
+ elapsedTime = Date.now() - requestStartTime,
569
+ timeLeft = settings.loadingDuration - elapsedTime
570
570
  ;
571
- timeLeft = (timeLeft > 0)
571
+ timeLeft = timeLeft > 0
572
572
  ? timeLeft
573
573
  : 0;
574
574
  if (timeLeft > 0) {
@@ -748,17 +748,17 @@
748
748
  },
749
749
  responseFromXHR: function (xhr) {
750
750
  return $.isPlainObject(xhr)
751
- ? (module.is.expectingJSON())
751
+ ? (module.is.expectingJSON()
752
752
  ? module.decode.json(xhr.responseText)
753
- : xhr.responseText
753
+ : xhr.responseText)
754
754
  : false;
755
755
  },
756
756
  errorFromRequest: function (response, status, httpMessage) {
757
- return ($.isPlainObject(response) && response.error !== undefined)
757
+ return $.isPlainObject(response) && response.error !== undefined
758
758
  ? response.error // use json error message
759
- : (settings.error[status] !== undefined) // use server error message
759
+ : (settings.error[status] !== undefined // use server error message
760
760
  ? settings.error[status]
761
- : httpMessage;
761
+ : httpMessage);
762
762
  },
763
763
  request: function () {
764
764
  return module.request || false;
@@ -795,7 +795,7 @@
795
795
  return runSettings;
796
796
  }
797
797
 
798
- return (runSettings !== undefined)
798
+ return runSettings !== undefined
799
799
  ? $.extend(true, {}, runSettings)
800
800
  : $.extend(true, {}, settings);
801
801
  },
@@ -803,7 +803,7 @@
803
803
  var
804
804
  decodedValue = window.decodeURIComponent(value),
805
805
  encodedValue = window.encodeURIComponent(value),
806
- alreadyEncoded = (decodedValue !== value)
806
+ alreadyEncoded = decodedValue !== value
807
807
  ;
808
808
  if (alreadyEncoded) {
809
809
  module.debug('URL value is already encoded, avoiding double encoding', value);
@@ -836,11 +836,11 @@
836
836
  }
837
837
  if (settings.on == 'auto') {
838
838
  if ($module.is('input')) {
839
- return (element.oninput !== undefined)
839
+ return element.oninput !== undefined
840
840
  ? 'input'
841
- : (element.onpropertychange !== undefined)
841
+ : (element.onpropertychange !== undefined
842
842
  ? 'propertychange'
843
- : 'keyup';
843
+ : 'keyup');
844
844
  }
845
845
  if ($module.is('form')) {
846
846
  return 'submit';
@@ -1004,7 +1004,7 @@
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
  ;
@@ -1057,7 +1057,7 @@
1057
1057
  }
1058
1058
  });
1059
1059
 
1060
- return (returnedValue !== undefined)
1060
+ return returnedValue !== undefined
1061
1061
  ? returnedValue
1062
1062
  : this;
1063
1063
  };
@@ -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 - Breadcrumb
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Breadcrumb
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 - Breadcrumb
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Breadcrumb
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 - Button
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Button
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 - Button
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Button
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 - Calendar
2
+ * # Fomantic-UI 2.9.1-beta.24+029436f - Calendar
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *