fomantic-ui 2.10.0-beta.1 → 2.10.0-beta.11

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 (291) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/.eslintrc.js +0 -10
  3. package/CONTRIBUTING.md +4 -1
  4. package/CONTRIBUTORS.md +1 -0
  5. package/FAQ.md +7 -2
  6. package/README.md +5 -9
  7. package/ROADMAP.md +4 -4
  8. package/SECURITY.md +8 -7
  9. package/changelog-setup.js +64 -70
  10. package/dist/components/accordion.css +1 -1
  11. package/dist/components/accordion.js +103 -142
  12. package/dist/components/accordion.min.css +1 -1
  13. package/dist/components/accordion.min.js +2 -2
  14. package/dist/components/ad.css +1 -1
  15. package/dist/components/ad.min.css +1 -1
  16. package/dist/components/api.js +157 -210
  17. package/dist/components/api.min.js +2 -2
  18. package/dist/components/breadcrumb.css +1 -1
  19. package/dist/components/breadcrumb.min.css +1 -1
  20. package/dist/components/button.css +1 -2
  21. package/dist/components/button.min.css +2 -2
  22. package/dist/components/calendar.css +1 -2
  23. package/dist/components/calendar.js +314 -352
  24. package/dist/components/calendar.min.css +2 -2
  25. package/dist/components/calendar.min.js +2 -2
  26. package/dist/components/card.css +1 -1
  27. package/dist/components/card.min.css +1 -1
  28. package/dist/components/checkbox.css +1 -2
  29. package/dist/components/checkbox.js +85 -135
  30. package/dist/components/checkbox.min.css +2 -2
  31. package/dist/components/checkbox.min.js +2 -2
  32. package/dist/components/comment.css +1 -1
  33. package/dist/components/comment.min.css +1 -1
  34. package/dist/components/container.css +2 -4
  35. package/dist/components/container.min.css +2 -2
  36. package/dist/components/dimmer.css +1 -11
  37. package/dist/components/dimmer.js +61 -94
  38. package/dist/components/dimmer.min.css +2 -2
  39. package/dist/components/dimmer.min.js +2 -2
  40. package/dist/components/divider.css +1 -2
  41. package/dist/components/divider.min.css +2 -2
  42. package/dist/components/dropdown.css +30 -51
  43. package/dist/components/dropdown.js +736 -1055
  44. package/dist/components/dropdown.min.css +2 -2
  45. package/dist/components/dropdown.min.js +2 -2
  46. package/dist/components/embed.css +1 -1
  47. package/dist/components/embed.js +85 -114
  48. package/dist/components/embed.min.css +1 -1
  49. package/dist/components/embed.min.js +2 -2
  50. package/dist/components/emoji.css +3809 -7617
  51. package/dist/components/emoji.min.css +2 -2
  52. package/dist/components/feed.css +1 -1
  53. package/dist/components/feed.min.css +1 -1
  54. package/dist/components/flag.css +1 -1
  55. package/dist/components/flag.min.css +1 -1
  56. package/dist/components/flyout.css +2 -3
  57. package/dist/components/flyout.js +226 -355
  58. package/dist/components/flyout.min.css +2 -2
  59. package/dist/components/flyout.min.js +2 -2
  60. package/dist/components/form.css +5 -95
  61. package/dist/components/form.js +335 -444
  62. package/dist/components/form.min.css +2 -2
  63. package/dist/components/form.min.js +2 -2
  64. package/dist/components/grid.css +2 -58
  65. package/dist/components/grid.min.css +2 -2
  66. package/dist/components/header.css +1 -1
  67. package/dist/components/header.min.css +1 -1
  68. package/dist/components/icon.css +4 -4
  69. package/dist/components/icon.min.css +2 -2
  70. package/dist/components/image.css +1 -1
  71. package/dist/components/image.min.css +1 -1
  72. package/dist/components/input.css +1 -536
  73. package/dist/components/input.min.css +2 -2
  74. package/dist/components/item.css +1 -1
  75. package/dist/components/item.min.css +1 -1
  76. package/dist/components/label.css +1 -1
  77. package/dist/components/label.min.css +1 -1
  78. package/dist/components/list.css +1 -3
  79. package/dist/components/list.min.css +2 -2
  80. package/dist/components/loader.css +1 -1
  81. package/dist/components/loader.min.css +1 -1
  82. package/dist/components/menu.css +40 -48
  83. package/dist/components/menu.min.css +2 -2
  84. package/dist/components/message.css +1 -1
  85. package/dist/components/message.min.css +1 -1
  86. package/dist/components/modal.css +5 -9
  87. package/dist/components/modal.js +261 -384
  88. package/dist/components/modal.min.css +2 -2
  89. package/dist/components/modal.min.js +2 -2
  90. package/dist/components/nag.css +1 -1
  91. package/dist/components/nag.js +68 -98
  92. package/dist/components/nag.min.css +1 -1
  93. package/dist/components/nag.min.js +2 -2
  94. package/dist/components/placeholder.css +1 -1
  95. package/dist/components/placeholder.min.css +1 -1
  96. package/dist/components/popup.css +1 -2
  97. package/dist/components/popup.js +198 -271
  98. package/dist/components/popup.min.css +2 -2
  99. package/dist/components/popup.min.js +2 -2
  100. package/dist/components/progress.css +1 -1
  101. package/dist/components/progress.js +109 -144
  102. package/dist/components/progress.min.css +1 -1
  103. package/dist/components/progress.min.js +2 -2
  104. package/dist/components/rail.css +1 -1
  105. package/dist/components/rail.min.css +1 -1
  106. package/dist/components/rating.css +1 -1
  107. package/dist/components/rating.js +91 -123
  108. package/dist/components/rating.min.css +1 -1
  109. package/dist/components/rating.min.js +2 -2
  110. package/dist/components/reset.css +1 -1
  111. package/dist/components/reset.min.css +1 -1
  112. package/dist/components/reveal.css +1 -1
  113. package/dist/components/reveal.min.css +1 -1
  114. package/dist/components/search.css +2 -9
  115. package/dist/components/search.js +277 -379
  116. package/dist/components/search.min.css +2 -2
  117. package/dist/components/search.min.js +2 -2
  118. package/dist/components/segment.css +2 -7
  119. package/dist/components/segment.min.css +2 -2
  120. package/dist/components/shape.css +1 -2
  121. package/dist/components/shape.js +158 -224
  122. package/dist/components/shape.min.css +2 -2
  123. package/dist/components/shape.min.js +2 -2
  124. package/dist/components/sidebar.css +2 -3
  125. package/dist/components/sidebar.js +124 -206
  126. package/dist/components/sidebar.min.css +2 -2
  127. package/dist/components/sidebar.min.js +2 -2
  128. package/dist/components/site.css +9 -25
  129. package/dist/components/site.js +38 -57
  130. package/dist/components/site.min.css +2 -2
  131. package/dist/components/site.min.js +2 -2
  132. package/dist/components/slider.css +1 -1
  133. package/dist/components/slider.js +246 -329
  134. package/dist/components/slider.min.css +1 -1
  135. package/dist/components/slider.min.js +2 -2
  136. package/dist/components/state.js +70 -100
  137. package/dist/components/state.min.js +2 -2
  138. package/dist/components/statistic.css +1 -1
  139. package/dist/components/statistic.min.css +1 -1
  140. package/dist/components/step.css +1 -1
  141. package/dist/components/step.min.css +1 -1
  142. package/dist/components/sticky.css +1 -1
  143. package/dist/components/sticky.js +135 -180
  144. package/dist/components/sticky.min.css +1 -1
  145. package/dist/components/sticky.min.js +2 -2
  146. package/dist/components/tab.css +1 -1
  147. package/dist/components/tab.js +176 -244
  148. package/dist/components/tab.min.css +1 -1
  149. package/dist/components/tab.min.js +2 -2
  150. package/dist/components/table.css +3 -37
  151. package/dist/components/table.min.css +2 -2
  152. package/dist/components/text.css +1 -1
  153. package/dist/components/text.min.css +1 -1
  154. package/dist/components/toast.css +1 -3
  155. package/dist/components/toast.js +109 -147
  156. package/dist/components/toast.min.css +1 -1
  157. package/dist/components/toast.min.js +2 -2
  158. package/dist/components/transition.css +1 -1
  159. package/dist/components/transition.js +91 -146
  160. package/dist/components/transition.min.css +1 -1
  161. package/dist/components/transition.min.js +2 -2
  162. package/dist/components/visibility.js +146 -224
  163. package/dist/components/visibility.min.js +2 -2
  164. package/dist/semantic.css +3945 -8759
  165. package/dist/semantic.js +4397 -6155
  166. package/dist/semantic.min.css +2 -2
  167. package/dist/semantic.min.js +2 -2
  168. package/examples/assets/show-examples.js +2 -4
  169. package/examples/attached.html +1 -1
  170. package/examples/components/menu.html +1 -1
  171. package/gulpfile.js +5 -7
  172. package/package.json +3 -5
  173. package/scripts/nightly-version.js +7 -10
  174. package/src/README.md +3 -3
  175. package/src/definitions/behaviors/api.js +156 -209
  176. package/src/definitions/behaviors/form.js +334 -443
  177. package/src/definitions/behaviors/state.js +69 -99
  178. package/src/definitions/behaviors/visibility.js +145 -223
  179. package/src/definitions/collections/form.less +1 -13
  180. package/src/definitions/collections/grid.less +1 -61
  181. package/src/definitions/collections/menu.less +101 -107
  182. package/src/definitions/collections/table.less +1 -35
  183. package/src/definitions/elements/input.less +1 -61
  184. package/src/definitions/elements/segment.less +0 -6
  185. package/src/definitions/globals/site.js +37 -56
  186. package/src/definitions/globals/site.less +2 -18
  187. package/src/definitions/modules/accordion.js +102 -141
  188. package/src/definitions/modules/calendar.js +313 -351
  189. package/src/definitions/modules/checkbox.js +84 -134
  190. package/src/definitions/modules/dimmer.js +60 -93
  191. package/src/definitions/modules/dimmer.less +0 -9
  192. package/src/definitions/modules/dropdown.js +735 -1054
  193. package/src/definitions/modules/dropdown.less +31 -47
  194. package/src/definitions/modules/embed.js +84 -113
  195. package/src/definitions/modules/flyout.js +225 -354
  196. package/src/definitions/modules/modal.js +260 -383
  197. package/src/definitions/modules/modal.less +1 -1
  198. package/src/definitions/modules/nag.js +67 -97
  199. package/src/definitions/modules/popup.js +197 -270
  200. package/src/definitions/modules/progress.js +108 -143
  201. package/src/definitions/modules/rating.js +90 -122
  202. package/src/definitions/modules/search.js +276 -378
  203. package/src/definitions/modules/search.less +0 -3
  204. package/src/definitions/modules/shape.js +157 -223
  205. package/src/definitions/modules/sidebar.js +123 -205
  206. package/src/definitions/modules/slider.js +245 -328
  207. package/src/definitions/modules/slider.less +1 -1
  208. package/src/definitions/modules/sticky.js +134 -179
  209. package/src/definitions/modules/tab.js +175 -243
  210. package/src/definitions/modules/toast.js +108 -146
  211. package/src/definitions/modules/toast.less +1 -1
  212. package/src/definitions/modules/transition.js +90 -145
  213. package/src/theme.less +0 -13
  214. package/src/themes/basic/elements/icon.variables +1 -1
  215. package/src/themes/chubby/collections/menu.variables +1 -1
  216. package/src/themes/default/collections/grid.variables +0 -30
  217. package/src/themes/default/collections/menu.variables +23 -23
  218. package/src/themes/default/collections/table.variables +1 -5
  219. package/src/themes/default/elements/icon.variables +3 -3
  220. package/src/themes/default/globals/site.variables +8 -15
  221. package/src/themes/default/globals/variation.variables +3 -3
  222. package/src/themes/default/modules/dropdown.variables +1 -0
  223. package/src/themes/default/modules/slider.variables +1 -1
  224. package/src/themes/github/elements/icon.variables +1 -1
  225. package/src/themes/material/elements/icon.variables +1 -1
  226. package/tasks/README.md +1 -1
  227. package/tasks/admin/components/create.js +89 -122
  228. package/tasks/admin/components/init.js +34 -65
  229. package/tasks/admin/components/update.js +50 -61
  230. package/tasks/admin/distributions/create.js +71 -111
  231. package/tasks/admin/distributions/init.js +32 -63
  232. package/tasks/admin/distributions/update.js +49 -57
  233. package/tasks/admin/publish.js +1 -1
  234. package/tasks/admin/register.js +14 -19
  235. package/tasks/admin/release.js +2 -2
  236. package/tasks/build/assets.js +14 -18
  237. package/tasks/build/css.js +59 -68
  238. package/tasks/build/javascript.js +48 -56
  239. package/tasks/build.js +4 -6
  240. package/tasks/check-install.js +5 -8
  241. package/tasks/clean.js +5 -7
  242. package/tasks/collections/admin.js +14 -16
  243. package/tasks/collections/build.js +6 -8
  244. package/tasks/collections/docs.js +4 -6
  245. package/tasks/collections/install.js +2 -4
  246. package/tasks/collections/rtl.js +2 -4
  247. package/tasks/collections/various.js +2 -4
  248. package/tasks/config/admin/github.js +9 -19
  249. package/tasks/config/admin/templates/README.md +2 -2
  250. package/tasks/config/admin/templates/bower.json +2 -4
  251. package/tasks/config/admin/templates/composer.json +1 -1
  252. package/tasks/config/admin/templates/css-package.js +1 -4
  253. package/tasks/config/admin/templates/less-package.js +1 -3
  254. package/tasks/config/defaults.js +0 -1
  255. package/tasks/config/npm/gulpfile.js +4 -6
  256. package/tasks/config/project/config.js +27 -35
  257. package/tasks/config/project/install.js +64 -82
  258. package/tasks/config/project/release.js +7 -9
  259. package/tasks/config/tasks.js +10 -21
  260. package/tasks/config/user.js +14 -20
  261. package/tasks/docs/build.js +26 -31
  262. package/tasks/docs/metadata.js +30 -39
  263. package/tasks/docs/serve.js +23 -27
  264. package/tasks/install.js +94 -128
  265. package/tasks/rtl/build.js +2 -4
  266. package/tasks/rtl/watch.js +3 -5
  267. package/tasks/watch.js +13 -13
  268. package/test/meteor/fonts.js +1 -2
  269. package/test/modules/module.spec.js +16 -18
  270. package/types/fomantic-ui-calendar.d.ts +1 -1
  271. package/types/fomantic-ui-dropdown.d.ts +45 -1
  272. package/types/fomantic-ui-embed.d.ts +1 -1
  273. package/types/fomantic-ui-flyout.d.ts +1 -1
  274. package/types/fomantic-ui-form.d.ts +0 -7
  275. package/types/fomantic-ui-modal.d.ts +1 -1
  276. package/types/fomantic-ui-search.d.ts +12 -6
  277. package/types/fomantic-ui-toast.d.ts +1 -1
  278. package/src/themes/basic/assets/fonts/icons.woff +0 -0
  279. package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
  280. package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
  281. package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
  282. package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
  283. package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
  284. package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
  285. package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
  286. package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
  287. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  288. package/src/themes/default/assets/fonts/icons.woff +0 -0
  289. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  290. package/src/themes/github/assets/fonts/octicons.woff +0 -0
  291. package/src/themes/material/assets/fonts/icons.woff +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.1+bee406e - Progress
2
+ * # Fomantic-UI 2.10.0-beta.11+6d1b302 - Progress
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -20,45 +20,41 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.progress = function (parameters) {
23
- var
24
- $allModules = $(this),
23
+ let $allModules = $(this);
25
24
 
26
- time = Date.now(),
27
- performance = [],
25
+ let time = Date.now();
26
+ let performance = [];
28
27
 
29
- query = arguments[0],
30
- methodInvoked = typeof query === 'string',
31
- queryArguments = [].slice.call(arguments, 1),
28
+ let query = arguments[0];
29
+ let methodInvoked = typeof query === 'string';
30
+ let queryArguments = [].slice.call(arguments, 1);
32
31
 
33
- returnedValue
34
- ;
32
+ let returnedValue;
35
33
 
36
34
  $allModules.each(function () {
37
- var
38
- settings = $.isPlainObject(parameters)
39
- ? $.extend(true, {}, $.fn.progress.settings, parameters)
40
- : $.extend({}, $.fn.progress.settings),
41
-
42
- className = settings.className,
43
- metadata = settings.metadata,
44
- namespace = settings.namespace,
45
- selector = settings.selector,
46
- error = settings.error,
47
-
48
- eventNamespace = '.' + namespace,
49
- moduleNamespace = 'module-' + namespace,
50
-
51
- $module = $(this),
52
- $bars = $(this).find(selector.bar),
53
- $progresses = $(this).find(selector.progress),
54
- $label = $(this).find(selector.label),
55
-
56
- element = this,
57
- instance = $module.data(moduleNamespace),
58
-
59
- animating = false,
60
- module
61
- ;
35
+ let settings = $.isPlainObject(parameters)
36
+ ? $.extend(true, {}, $.fn.progress.settings, parameters)
37
+ : $.extend({}, $.fn.progress.settings);
38
+
39
+ let className = settings.className;
40
+ let metadata = settings.metadata;
41
+ let namespace = settings.namespace;
42
+ let selector = settings.selector;
43
+ let error = settings.error;
44
+
45
+ let eventNamespace = '.' + namespace;
46
+ let moduleNamespace = 'module-' + namespace;
47
+
48
+ let $module = $(this);
49
+ let $bars = $(this).find(selector.bar);
50
+ let $progresses = $(this).find(selector.progress);
51
+ let $label = $(this).find(selector.label);
52
+
53
+ let element = this;
54
+ let instance = $module.data(moduleNamespace);
55
+
56
+ let animating = false;
57
+ let module;
62
58
  module = {
63
59
  helper: {
64
60
  sum: function (nums) {
@@ -69,13 +65,13 @@
69
65
  /**
70
66
  * Derive precision for multiple progress with total and values.
71
67
  *
72
- * This helper dervices a precision that is sufficiently large to show minimum value of multiple progress.
68
+ * This helper dervices a precision that is large enough to show the minimum value of multiple progress.
73
69
  *
74
70
  * Example1
75
71
  * - total: 1122
76
72
  * - values: [325, 111, 74, 612]
77
73
  * - min ratio: 74/1122 = 0.0659...
78
- * - required precision: 100
74
+ * - required precision: 100
79
75
  *
80
76
  * Example2
81
77
  * - total: 10541
@@ -88,9 +84,9 @@
88
84
  * @returns {number} A precision. Could be 1, 10, 100, ... 1e+10.
89
85
  */
90
86
  derivePrecision: function (min, total) {
91
- var precisionPower = 0;
92
- var precision = 1;
93
- var ratio = min / total;
87
+ let precisionPower = 0;
88
+ let precision = 1;
89
+ let ratio = min / total;
94
90
  while (precisionPower < 10) {
95
91
  ratio *= precision;
96
92
  if (ratio > 1) {
@@ -124,8 +120,7 @@
124
120
  module.verbose('Storing instance of progress', module);
125
121
  instance = module;
126
122
  $module
127
- .data(moduleNamespace, module)
128
- ;
123
+ .data(moduleNamespace, module);
129
124
  },
130
125
  destroy: function () {
131
126
  module.verbose('Destroying previous progress for', $module);
@@ -151,13 +146,11 @@
151
146
 
152
147
  read: {
153
148
  metadata: function () {
154
- var
155
- data = {
156
- percent: module.helper.forceArray($module.data(metadata.percent)),
157
- total: $module.data(metadata.total),
158
- value: module.helper.forceArray($module.data(metadata.value)),
159
- }
160
- ;
149
+ let data = {
150
+ percent: module.helper.forceArray($module.data(metadata.percent)),
151
+ total: $module.data(metadata.total),
152
+ value: module.helper.forceArray($module.data(metadata.value)),
153
+ };
161
154
  if (data.total !== undefined) {
162
155
  module.debug('Total value set from metadata', data.total);
163
156
  module.set.total(data.total);
@@ -195,8 +188,7 @@
195
188
  .one('transitionend' + eventNamespace, function (event) {
196
189
  clearTimeout(module.failSafeTimer);
197
190
  callback.call(this, event);
198
- })
199
- ;
191
+ });
200
192
  module.failSafeTimer = setTimeout(function () {
201
193
  $bars.triggerHandler('transitionend');
202
194
  }, settings.duration + settings.failSafeDelay);
@@ -205,10 +197,8 @@
205
197
  },
206
198
 
207
199
  increment: function (incrementValue) {
208
- var
209
- startValue,
210
- newValue
211
- ;
200
+ let startValue;
201
+ let newValue;
212
202
  if (module.has.total()) {
213
203
  startValue = module.get.value();
214
204
  incrementValue = incrementValue || 1;
@@ -222,11 +212,9 @@
222
212
  module.set.progress(newValue);
223
213
  },
224
214
  decrement: function (decrementValue) {
225
- var
226
- total = module.get.total(),
227
- startValue,
228
- newValue
229
- ;
215
+ let total = module.get.total();
216
+ let startValue;
217
+ let newValue;
230
218
  if (total) {
231
219
  startValue = module.get.value();
232
220
  decrementValue = decrementValue || 1;
@@ -257,24 +245,21 @@
257
245
  index = 0;
258
246
  }
259
247
 
260
- var
261
- value = module.get.value(index),
262
- total = module.get.total(),
263
- percent = animating
264
- ? module.get.displayPercent(index)
265
- : module.get.percent(index),
266
- left = total !== false
267
- ? Math.max(0, total - value)
268
- : 100 - percent
269
- ;
248
+ let value = module.get.value(index);
249
+ let total = module.get.total();
250
+ let percent = animating
251
+ ? module.get.displayPercent(index)
252
+ : module.get.percent(index);
253
+ let left = total !== false
254
+ ? Math.max(0, total - value)
255
+ : 100 - percent;
270
256
  templateText = templateText || '';
271
257
  templateText = templateText
272
258
  .replace('{value}', value)
273
259
  .replace('{total}', total || 0)
274
260
  .replace('{left}', left)
275
261
  .replace('{percent}', percent)
276
- .replace('{bar}', settings.text.bars[index] || '')
277
- ;
262
+ .replace('{bar}', settings.text.bars[index] || '');
278
263
  module.verbose('Adding variables to progress bar text', templateText);
279
264
 
280
265
  return templateText;
@@ -323,17 +308,15 @@
323
308
  : value;
324
309
  },
325
310
 
326
- // gets current displayed percentage (if animating values this is the intermediary value)
311
+ // gets current displayed percentage (if animating values, this is the intermediary value)
327
312
  displayPercent: function (index) {
328
- var
329
- $bar = $($bars[index]),
330
- barWidth = $bar.width(),
331
- totalWidth = $module.width(),
332
- minDisplay = parseInt($bar.css('min-width'), 10),
333
- displayPercent = barWidth > minDisplay
334
- ? (barWidth / totalWidth) * 100
335
- : module.percent
336
- ;
313
+ let $bar = $($bars[index]);
314
+ let barWidth = $bar.width();
315
+ let totalWidth = $module.width();
316
+ let minDisplay = parseInt($bar.css('min-width'), 10);
317
+ let displayPercent = barWidth > minDisplay
318
+ ? (barWidth / totalWidth) * 100
319
+ : module.percent;
337
320
 
338
321
  return settings.precision > 0
339
322
  ? Math.round(displayPercent * (10 * settings.precision)) / (10 * settings.precision)
@@ -421,14 +404,14 @@
421
404
  barWidth: function (values) {
422
405
  module.debug('set bar width with ', values);
423
406
  values = module.helper.forceArray(values);
424
- var firstNonZeroIndex = -1;
425
- var lastNonZeroIndex = -1;
426
- var valuesSum = module.helper.sum(values);
427
- var barCounts = $bars.length;
428
- var isMultiple = barCounts > 1;
429
- var percents = values.map(function (value, index) {
430
- var allZero = index === barCounts - 1 && valuesSum === 0;
431
- var $bar = $($bars[index]);
407
+ let firstNonZeroIndex = -1;
408
+ let lastNonZeroIndex = -1;
409
+ let valuesSum = module.helper.sum(values);
410
+ let barCounts = $bars.length;
411
+ let isMultiple = barCounts > 1;
412
+ let percents = values.map(function (value, index) {
413
+ let allZero = index === barCounts - 1 && valuesSum === 0;
414
+ let $bar = $($bars[index]);
432
415
  if (value === 0 && isMultiple && !allZero) {
433
416
  $bar.css('display', 'none');
434
417
  } else {
@@ -448,7 +431,7 @@
448
431
  return parseFloat(value);
449
432
  });
450
433
  values.forEach(function (_, index) {
451
- var $bar = $($bars[index]);
434
+ let $bar = $($bars[index]);
452
435
  $bar.css({
453
436
  borderTopLeftRadius: index === firstNonZeroIndex ? '' : '0',
454
437
  borderBottomLeftRadius: index === firstNonZeroIndex ? '' : '0',
@@ -457,8 +440,7 @@
457
440
  });
458
441
  });
459
442
  $module
460
- .attr('data-percent', percents)
461
- ;
443
+ .attr('data-percent', percents);
462
444
  },
463
445
  duration: function (duration) {
464
446
  duration = duration || settings.duration;
@@ -469,8 +451,7 @@
469
451
  $bars
470
452
  .css({
471
453
  'transition-duration': duration,
472
- })
473
- ;
454
+ });
474
455
  },
475
456
  percent: function (percents) {
476
457
  percents = module.helper.forceArray(percents).map(function (percent) {
@@ -482,31 +463,30 @@
482
463
  ? Math.max(0, Math.min(100, percent))
483
464
  : percent;
484
465
  });
485
- var hasTotal = module.has.total();
486
- var totalPercent = module.helper.sum(percents);
487
- var isMultipleValues = percents.length > 1 && hasTotal;
488
- var sumTotal = module.helper.sum(module.helper.forceArray(module.value));
466
+ let hasTotal = module.has.total();
467
+ let totalPercent = module.helper.sum(percents);
468
+ let isMultipleValues = percents.length > 1 && hasTotal;
469
+ let sumTotal = module.helper.sum(module.helper.forceArray(module.value));
489
470
  if (isMultipleValues && sumTotal > module.total) {
490
- // Sum values instead of pecents to avoid precision issues when summing floats
471
+ // Sum values instead of percents to avoid precision issues when summing floats
491
472
  module.error(error.sumExceedsTotal, sumTotal, module.total);
492
473
  } else if (!isMultipleValues && totalPercent > 100) {
493
- // Sum before rounding since sum of rounded may have error though sum of actual is fine
474
+ // Sum before rounding, since sum of rounded may have error though sum of actual is fine
494
475
  module.error(error.tooHigh, totalPercent);
495
476
  } else if (totalPercent < 0) {
496
477
  module.error(error.tooLow, totalPercent);
497
478
  } else {
498
- var autoPrecision = settings.precision > 0
479
+ let autoPrecision = settings.precision > 0
499
480
  ? settings.precision
500
481
  : (isMultipleValues
501
482
  ? module.helper.derivePrecision(Math.min.apply(null, module.value), module.total)
502
483
  : 0);
503
484
 
504
485
  // round display percentage
505
- var roundedPercents = percents.map(function (percent) {
486
+ let roundedPercents = percents.map(function (percent) {
506
487
  return autoPrecision > 0
507
488
  ? Math.round(percent * (10 * autoPrecision)) / (10 * autoPrecision)
508
- : Math.round(percent)
509
- ;
489
+ : Math.round(percent);
510
490
  });
511
491
  module.percent = roundedPercents;
512
492
  if (hasTotal) {
@@ -522,21 +502,17 @@
522
502
  settings.onChange.call(element, percents, module.value, module.total);
523
503
  },
524
504
  labelInterval: function () {
525
- var
526
- animationCallback = function () {
527
- module.verbose('Bar finished animating, removing continuous label updates');
528
- clearInterval(module.interval);
529
- animating = false;
530
- module.set.labels();
531
- }
532
- ;
505
+ let animationCallback = function () {
506
+ module.verbose('Bar finished animating, removing continuous label updates');
507
+ clearInterval(module.interval);
508
+ animating = false;
509
+ module.set.labels();
510
+ };
533
511
  clearInterval(module.interval);
534
512
  module.bind.transitionEnd(animationCallback);
535
513
  animating = true;
536
514
  module.interval = setInterval(function () {
537
- var
538
- isInDOM = $.contains(document.documentElement, element)
539
- ;
515
+ let isInDOM = $.contains(document.documentElement, element);
540
516
  if (!isInDOM) {
541
517
  clearInterval(module.interval);
542
518
  animating = false;
@@ -582,7 +558,7 @@
582
558
  },
583
559
  barLabel: function (text) {
584
560
  $progresses.each(function (index, element) {
585
- var $progress = $(element);
561
+ let $progress = $(element);
586
562
  if (text !== undefined) {
587
563
  $progress.text(module.get.text(text, index));
588
564
  } else if (settings.label === 'ratio' && module.has.total()) {
@@ -685,9 +661,7 @@
685
661
 
686
662
  update: {
687
663
  toNextValue: function () {
688
- var
689
- nextValue = module.nextValue
690
- ;
664
+ let nextValue = module.nextValue;
691
665
  if (nextValue) {
692
666
  module.debug('Update interval complete using last updated value', nextValue);
693
667
  module.update.progress(nextValue);
@@ -695,14 +669,12 @@
695
669
  }
696
670
  },
697
671
  progress: function (values) {
698
- var hasTotal = module.has.total();
672
+ let hasTotal = module.has.total();
699
673
  if (hasTotal) {
700
674
  module.set.value(values);
701
675
  }
702
- var percentCompletes = module.helper.forceArray(values).map(function (value) {
703
- var
704
- percentComplete
705
- ;
676
+ let percentCompletes = module.helper.forceArray(values).map(function (value) {
677
+ let percentComplete;
706
678
  value = module.get.numericValue(value);
707
679
  if (value === false) {
708
680
  module.error(error.nonNumeric, value);
@@ -773,11 +745,9 @@
773
745
  },
774
746
  performance: {
775
747
  log: function (message) {
776
- var
777
- currentTime,
778
- executionTime,
779
- previousTime
780
- ;
748
+ let currentTime;
749
+ let executionTime;
750
+ let previousTime;
781
751
  if (settings.performance) {
782
752
  currentTime = Date.now();
783
753
  previousTime = time || currentTime;
@@ -796,10 +766,8 @@
796
766
  }, 500);
797
767
  },
798
768
  display: function () {
799
- var
800
- title = settings.name + ':',
801
- totalTime = 0
802
- ;
769
+ let title = settings.name + ':';
770
+ let totalTime = 0;
803
771
  time = false;
804
772
  clearTimeout(module.performance.timer);
805
773
  $.each(performance, function (index, data) {
@@ -821,22 +789,19 @@
821
789
  },
822
790
  },
823
791
  invoke: function (query, passedArguments, context) {
824
- var
825
- object = instance,
826
- maxDepth,
827
- found,
828
- response
829
- ;
792
+ let object = instance;
793
+ let maxDepth;
794
+ let found;
795
+ let response;
830
796
  passedArguments = passedArguments || queryArguments;
831
797
  context = context || element;
832
798
  if (typeof query === 'string' && object !== undefined) {
833
799
  query = query.split(/[ .]/);
834
800
  maxDepth = query.length - 1;
835
801
  $.each(query, function (depth, value) {
836
- var camelCaseValue = depth !== maxDepth
802
+ let camelCaseValue = depth !== maxDepth
837
803
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
838
- : query
839
- ;
804
+ : query;
840
805
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
841
806
  object = object[camelCaseValue];
842
807
  } else if (object[camelCaseValue] !== undefined) {
@@ -922,7 +887,7 @@
922
887
  total: false,
923
888
  value: false,
924
889
 
925
- // delay in ms for fail safe animation callback
890
+ // delay in ms for fail-safe animation callback
926
891
  failSafeDelay: 100,
927
892
 
928
893
  onLabelUpdate: function (state, text, value, total) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.1+bee406e - Progress
2
+ * # Fomantic-UI 2.10.0-beta.11+6d1b302 - Progress
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.10.0-beta.1+bee406e
2
+ * # Fomantic UI - 2.10.0-beta.11+6d1b302
3
3
  * https://github.com/fomantic/Fomantic-UI
4
4
  * https://fomantic-ui.com/
5
5
  *
@@ -8,4 +8,4 @@
8
8
  * https://opensource.org/licenses/MIT
9
9
  *
10
10
  */
11
- !function(A,e,P){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,A.fn.progress=function(m){var b,e=A(this),h=Date.now(),x=[],y=m,w="string"==typeof y,V=[].slice.call(arguments,1);return e.each(function(){var i=A.isPlainObject(m)?A.extend(!0,{},A.fn.progress.settings,m):A.extend({},A.fn.progress.settings),r=i.className,t=i.metadata,e=i.namespace,n=i.selector,l=i.error,a="."+e,o="module-"+e,c=A(this),u=A(this).find(n.bar),s=A(this).find(n.progress),d=A(this).find(n.label),p=this,v=c.data(o),g=!1,f={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){for(var r=0,n=1,a=e/t;r<10&&!(1<(a*=n));)n=Math.pow(10,r++);return n},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){f.set.duration(),f.debug(p),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),v=f,c.data(o,f)},destroy:function(){f.verbose("Destroying previous progress for",c),clearInterval(v.interval),f.remove.state(),c.removeData(o),v=void 0},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(e){(void 0===f.percent||f.percent<100)&&(f.remove.progressPoll(),!0!==e&&f.set.percent(100))},read:{metadata:function(){var e={percent:f.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:f.helper.forceArray(c.data(t.value))};void 0!==e.total&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),0<e.value.length&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value)),0<e.percent.length&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent))},settings:function(){!1!==i.total&&(f.debug("Current total set in settings",i.total),f.set.total(i.total)),!1!==i.value&&(f.debug("Current value set in settings",i.value),f.set.value(i.value),f.set.progress(f.value)),!1!==i.percent&&(f.debug("Current percent set in settings",i.percent),f.set.percent(i.percent))}},bind:{transitionEnd:function(t){u.one("transitionend"+a,function(e){clearTimeout(f.failSafeTimer),t.call(this,e)}),f.failSafeTimer=setTimeout(function(){u.triggerHandler("transitionend")},i.duration+i.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){var t;e=f.has.total()?(t=f.get.value(),e||1):(t=f.get.percent(),e||f.get.randomValue()),f.debug("Incrementing percentage by",t,t=t+e,e),t=f.get.normalizedValue(t),f.set.progress(t)},decrement:function(e){var t,r;f.get.total()?(r=(t=f.get.value())-(e=e||1),f.debug("Decrementing value by",e,t)):(r=(t=f.get.percent())-(e=e||f.get.randomValue()),f.debug("Decrementing percentage by",e,t)),r=f.get.normalizedValue(r),f.set.progress(r)},has:{progressPoll:function(){return f.progressPoll},total:function(){return!1!==f.get.total()}},get:{text:function(e,t){var r=f.get.value(t=t||0),n=f.get.total(),a=g?f.get.displayPercent(t):f.get.percent(t),o=!1!==n?Math.max(0,n-r):100-a;return e=(e=e||"").replace("{value}",r).replace("{total}",n||0).replace("{left}",o).replace("{percent}",a).replace("{bar}",i.text.bars[t]||""),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(100<e)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"===i.updateInterval?i.duration:i.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*i.random.max+i.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},displayPercent:function(e){var e=A(u[e]),t=e.width(),r=c.width(),e=parseInt(e.css("min-width"),10)<t?t/r*100:f.percent;return 0<i.precision?Math.round(e*(10*i.precision))/(10*i.precision):Math.round(e)},percent:function(e){return f.percent&&f.percent[e||0]||0},value:function(e){return f.nextValue||f.value&&f.value[e||0]||0},total:function(){return void 0!==f.total&&f.total}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return c.hasClass(r.success)},warning:function(){return c.hasClass(r.warning)},error:function(){return c.hasClass(r.error)},active:function(){return c.hasClass(r.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),c.removeClass(r.active)},success:function(){f.verbose("Removing success state"),c.removeClass(r.success)},warning:function(){f.verbose("Removing warning state"),c.removeClass(r.warning)},error:function(){f.verbose("Removing error state"),c.removeClass(r.error)}},set:{barWidth:function(e){f.debug("set bar width with ",e),e=f.helper.forceArray(e);var a=-1,o=-1,i=f.helper.sum(e),s=u.length,l=1<s,t=e.map(function(e,t){var r=t===s-1&&0===i,n=A(u[t]);return 0===e&&l&&!r?n.css("display","none"):(l&&r&&n.css("background","transparent"),-1===a&&(a=t),o=t,n.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){A(u[t]).css({borderTopLeftRadius:t===a?"":"0",borderBottomLeftRadius:t===a?"":"0",borderTopRightRadius:t===o?"":"0",borderBottomRightRadius:t===o?"":"0"})}),c.attr("data-percent",t)},duration:function(e){e=e||i.duration,f.verbose("Setting progress bar transition duration",e="number"==typeof e?e+"ms":e),u.css({"transition-duration":e})},percent:function(e){e=f.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,i.limitValues?Math.max(0,Math.min(100,e)):e});var t,r=f.has.total(),n=f.helper.sum(e),a=1<e.length&&r,o=f.helper.sum(f.helper.forceArray(f.value));a&&o>f.total?f.error(l.sumExceedsTotal,o,f.total):!a&&100<n?f.error(l.tooHigh,n):n<0?f.error(l.tooLow,n):(t=0<i.precision?i.precision:a?f.helper.derivePrecision(Math.min.apply(null,f.value),f.total):0,o=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)}),f.percent=o,r&&(f.value=e.map(function(e){return 0<t?Math.round(e/100*f.total*(10*t))/(10*t):Math.round(e/100*f.total*10)/10})),f.set.barWidth(e),f.set.labelInterval()),i.onChange.call(p,e,f.value,f.total)},labelInterval:function(){clearInterval(f.interval),f.bind.transitionEnd(function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),g=!1,f.set.labels()}),g=!0,f.interval=setInterval(function(){A.contains(P.documentElement,p)||(clearInterval(f.interval),g=!1),f.set.labels()},i.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){e&&(e=f.get.text(e),f.verbose("Setting label to text",e),d.text(e))},state:function(e){100===(e=void 0!==e?e:f.helper.sum(f.percent))?i.autoSuccess&&1===u.length&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):0<e?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.remove.warning(),f.remove.error(),f.remove.success(),f.set.label(i.text.active))},barLabel:function(r){s.each(function(e,t){t=A(t);void 0!==r?t.text(f.get.text(r,e)):"ratio"===i.label&&f.has.total()?(f.verbose("Adding ratio to bar label"),t.text(f.get.text(i.text.ratio,e))):"percent"===i.label&&(f.verbose("Adding percentage to bar label"),t.text(f.get.text(i.text.percent,e)))})},active:function(e){e=e||i.text.active,f.debug("Setting active state"),i.showActivity&&!f.is.active()&&c.addClass(r.active),f.remove.warning(),f.remove.error(),f.remove.success(),(e=i.onLabelUpdate("active",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onActive.call(p,f.value,f.total)})},success:function(e,t){e=e||i.text.success||i.text.active,f.debug("Setting success state"),c.addClass(r.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(t),e=i.text.success?i.onLabelUpdate("success",e,f.value,f.total):i.onLabelUpdate("active",e,f.value,f.total),f.set.label(e),f.bind.transitionEnd(function(){i.onSuccess.call(p,f.total)})},warning:function(e,t){e=e||i.text.warning,f.debug("Setting warning state"),c.addClass(r.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(t),(e=i.onLabelUpdate("warning",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onWarning.call(p,f.value,f.total)})},error:function(e,t){e=e||i.text.error,f.debug("Setting error state"),c.addClass(r.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(t),(e=i.onLabelUpdate("error",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onError.call(p,f.value,f.total)})},total:function(e){f.total=e},value:function(e){f.value=f.helper.forceArray(e)},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){var r=f.has.total(),e=(r&&f.set.value(e),f.helper.forceArray(e).map(function(e){var t;return!1===(e=f.get.numericValue(e))&&f.error(l.nonNumeric,e),e=f.get.normalizedValue(e),r?(t=0<f.total?e/f.total*100:100,f.debug("Calculating percent complete from total",t)):(t=e,f.debug("Setting value to exact percentage value",t)),t}));f.set.percent(e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),A.isPlainObject(e))A.extend(!0,i,e);else{if(void 0===t)return i[e];A.isPlainObject(i[e])?A.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(A.isPlainObject(e))A.extend(!0,f,e);else{if(void 0===t)return f[e];f[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,i.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),f.verbose.apply(console,arguments)))},error:function(){i.silent||(f.error=Function.prototype.bind.call(console.error,console,i.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,r;i.performance&&(r=(t=Date.now())-(h||t),h=t,x.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":r})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(function(){f.performance.display()},500)},display:function(){var e=i.name+":",r=0;h=!1,clearTimeout(f.performance.timer),A.each(x,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",0<x.length&&(console.groupCollapsed(e),console.table?console.table(x):A.each(x,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),x=[]}},invoke:function(n,e,t){var a,o,r,i,s=v;return e=e||V,t=t||p,"string"==typeof n&&void 0!==s&&(n=n.split(/[ .]/),a=n.length-1,A.each(n,function(e,t){var r=e!==a?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(A.isPlainObject(s[r])&&e!==a)s=s[r];else{if(void 0!==s[r])return o=s[r],!1;{if(!A.isPlainObject(s[t])||e===a)return void 0!==s[t]?o=s[t]:f.error(l.method,n),!1;s=s[t]}}})),"function"==typeof(i=o)&&"number"!=typeof i.nodeType?r=o.apply(t,e):void 0!==o&&(r=o),Array.isArray(b)?b.push(r):void 0!==b?b=[b,r]:void 0!==r&&(b=r),o}};w?(void 0===v&&f.initialize(),f.invoke(y)):(void 0!==v&&v.invoke("destroy"),f.initialize())}),void 0!==b?b:this},A.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,r,n){return t},onChange:function(e,t,r){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multiple values exceed total"},regExp:{variable:/{\$*[\da-z]+}/gi},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document);
11
+ !function(A,e,P){"use strict";e=void 0!==e&&e.Math===Math?e:globalThis,A.fn.progress=function(m){let e=A(this),b=Date.now(),h=[],x=m,y="string"==typeof x,w=[].slice.call(arguments,1),V;return e.each(function(){let i=A.isPlainObject(m)?A.extend(!0,{},A.fn.progress.settings,m):A.extend({},A.fn.progress.settings),r=i.className,t=i.metadata;var e=i.namespace,n=i.selector;let l=i.error,a="."+e,o="module-"+e,c=A(this),u=A(this).find(n.bar),s=A(this).find(n.progress),d=A(this).find(n.label),p=this,v=c.data(o),g=!1,f;f={helper:{sum:function(e){return Array.isArray(e)?e.reduce(function(e,t){return e+Number(t)},0):0},derivePrecision:function(e,t){let r=0,n=1,a=e/t;for(;r<10&&!(1<(a*=n));)n=Math.pow(10,r++);return n},forceArray:function(e){return Array.isArray(e)?e:isNaN(e)?"string"==typeof e?e.split(","):[]:[e]}},initialize:function(){f.set.duration(),f.debug(p),f.read.metadata(),f.read.settings(),f.instantiate()},instantiate:function(){f.verbose("Storing instance of progress",f),v=f,c.data(o,f)},destroy:function(){f.verbose("Destroying previous progress for",c),clearInterval(v.interval),f.remove.state(),c.removeData(o),v=void 0},reset:function(){f.remove.nextValue(),f.update.progress(0)},complete:function(e){(void 0===f.percent||f.percent<100)&&(f.remove.progressPoll(),!0!==e&&f.set.percent(100))},read:{metadata:function(){var e={percent:f.helper.forceArray(c.data(t.percent)),total:c.data(t.total),value:f.helper.forceArray(c.data(t.value))};void 0!==e.total&&(f.debug("Total value set from metadata",e.total),f.set.total(e.total)),0<e.value.length&&(f.debug("Current value set from metadata",e.value),f.set.value(e.value),f.set.progress(e.value)),0<e.percent.length&&(f.debug("Current percent value set from metadata",e.percent),f.set.percent(e.percent))},settings:function(){!1!==i.total&&(f.debug("Current total set in settings",i.total),f.set.total(i.total)),!1!==i.value&&(f.debug("Current value set in settings",i.value),f.set.value(i.value),f.set.progress(f.value)),!1!==i.percent&&(f.debug("Current percent set in settings",i.percent),f.set.percent(i.percent))}},bind:{transitionEnd:function(t){u.one("transitionend"+a,function(e){clearTimeout(f.failSafeTimer),t.call(this,e)}),f.failSafeTimer=setTimeout(function(){u.triggerHandler("transitionend")},i.duration+i.failSafeDelay),f.verbose("Adding fail safe timer",f.timer)}},increment:function(e){let t;var r;e=f.has.total()?(t=f.get.value(),e||1):(t=f.get.percent(),e||f.get.randomValue()),r=t+e,f.debug("Incrementing percentage by",t,r,e),r=f.get.normalizedValue(r),f.set.progress(r)},decrement:function(e){let t,r;f.get.total()?(t=f.get.value(),e=e||1,r=t-e,f.debug("Decrementing value by",e,t)):(t=f.get.percent(),e=e||f.get.randomValue(),r=t-e,f.debug("Decrementing percentage by",e,t)),r=f.get.normalizedValue(r),f.set.progress(r)},has:{progressPoll:function(){return f.progressPoll},total:function(){return!1!==f.get.total()}},get:{text:function(e,t){t=t||0;var r=f.get.value(t),n=f.get.total(),a=g?f.get.displayPercent(t):f.get.percent(t),o=!1!==n?Math.max(0,n-r):100-a;return e=(e=e||"").replace("{value}",r).replace("{total}",n||0).replace("{left}",o).replace("{percent}",a).replace("{bar}",i.text.bars[t]||""),f.verbose("Adding variables to progress bar text",e),e},normalizedValue:function(e){if(e<0)return f.debug("Value cannot decrement below 0"),0;if(f.has.total()){if(e>f.total)return f.debug("Value cannot increment above total",f.total),f.total}else if(100<e)return f.debug("Value cannot increment above 100 percent"),100;return e},updateInterval:function(){return"auto"===i.updateInterval?i.duration:i.updateInterval},randomValue:function(){return f.debug("Generating random increment percentage"),Math.floor(Math.random()*i.random.max+i.random.min)},numericValue:function(e){return"string"==typeof e?""!==e.replace(/[^\d.]/g,"")&&+e.replace(/[^\d.]/g,""):e},displayPercent:function(e){let t=A(u[e]);var e=t.width(),r=c.width(),e=parseInt(t.css("min-width"),10)<e?e/r*100:f.percent;return 0<i.precision?Math.round(e*(10*i.precision))/(10*i.precision):Math.round(e)},percent:function(e){return f.percent&&f.percent[e||0]||0},value:function(e){return f.nextValue||f.value&&f.value[e||0]||0},total:function(){return void 0!==f.total&&f.total}},create:{progressPoll:function(){f.progressPoll=setTimeout(function(){f.update.toNextValue(),f.remove.progressPoll()},f.get.updateInterval())}},is:{complete:function(){return f.is.success()||f.is.warning()||f.is.error()},success:function(){return c.hasClass(r.success)},warning:function(){return c.hasClass(r.warning)},error:function(){return c.hasClass(r.error)},active:function(){return c.hasClass(r.active)},visible:function(){return c.is(":visible")}},remove:{progressPoll:function(){f.verbose("Removing progress poll timer"),f.progressPoll&&(clearTimeout(f.progressPoll),delete f.progressPoll)},nextValue:function(){f.verbose("Removing progress value stored for next update"),delete f.nextValue},state:function(){f.verbose("Removing stored state"),delete f.total,delete f.percent,delete f.value},active:function(){f.verbose("Removing active state"),c.removeClass(r.active)},success:function(){f.verbose("Removing success state"),c.removeClass(r.success)},warning:function(){f.verbose("Removing warning state"),c.removeClass(r.warning)},error:function(){f.verbose("Removing error state"),c.removeClass(r.error)}},set:{barWidth:function(e){f.debug("set bar width with ",e),e=f.helper.forceArray(e);let a=-1,o=-1,i=f.helper.sum(e),s=u.length,l=1<s;var t=e.map(function(e,t){var r=t===s-1&&0===i;let n=A(u[t]);return 0===e&&l&&!r?n.css("display","none"):(l&&r&&n.css("background","transparent"),-1===a&&(a=t),o=t,n.css({display:"block",width:e+"%"})),parseFloat(e)});e.forEach(function(e,t){let r=A(u[t]);r.css({borderTopLeftRadius:t===a?"":"0",borderBottomLeftRadius:t===a?"":"0",borderTopRightRadius:t===o?"":"0",borderBottomRightRadius:t===o?"":"0"})}),c.attr("data-percent",t)},duration:function(e){e="number"==typeof(e=e||i.duration)?e+"ms":e,f.verbose("Setting progress bar transition duration",e),u.css({"transition-duration":e})},percent:function(e){e=f.helper.forceArray(e).map(function(e){return e="string"==typeof e?+e.replace("%",""):e,i.limitValues?Math.max(0,Math.min(100,e)):e});var r=f.has.total(),t=f.helper.sum(e),n=1<e.length&&r,a=f.helper.sum(f.helper.forceArray(f.value));if(n&&a>f.total)f.error(l.sumExceedsTotal,a,f.total);else if(!n&&100<t)f.error(l.tooHigh,t);else if(t<0)f.error(l.tooLow,t);else{let t=0<i.precision?i.precision:n?f.helper.derivePrecision(Math.min.apply(null,f.value),f.total):0;a=e.map(function(e){return 0<t?Math.round(e*(10*t))/(10*t):Math.round(e)});f.percent=a,r&&(f.value=e.map(function(e){return 0<t?Math.round(e/100*f.total*(10*t))/(10*t):Math.round(e/100*f.total*10)/10})),f.set.barWidth(e),f.set.labelInterval()}i.onChange.call(p,e,f.value,f.total)},labelInterval:function(){clearInterval(f.interval),f.bind.transitionEnd(function(){f.verbose("Bar finished animating, removing continuous label updates"),clearInterval(f.interval),g=!1,f.set.labels()}),g=!0,f.interval=setInterval(function(){A.contains(P.documentElement,p)||(clearInterval(f.interval),g=!1),f.set.labels()},i.framerate)},labels:function(){f.verbose("Setting both bar progress and outer label text"),f.set.barLabel(),f.set.state()},label:function(e){e&&(e=f.get.text(e),f.verbose("Setting label to text",e),d.text(e))},state:function(e){100===(e=void 0!==e?e:f.helper.sum(f.percent))?i.autoSuccess&&1===u.length&&!(f.is.warning()||f.is.error()||f.is.success())?(f.set.success(),f.debug("Automatically triggering success at 100%")):(f.verbose("Reached 100% removing active state"),f.remove.active(),f.remove.progressPoll()):0<e?(f.verbose("Adjusting active progress bar label",e),f.set.active()):(f.remove.active(),f.remove.warning(),f.remove.error(),f.remove.success(),f.set.label(i.text.active))},barLabel:function(n){s.each(function(e,t){let r=A(t);void 0!==n?r.text(f.get.text(n,e)):"ratio"===i.label&&f.has.total()?(f.verbose("Adding ratio to bar label"),r.text(f.get.text(i.text.ratio,e))):"percent"===i.label&&(f.verbose("Adding percentage to bar label"),r.text(f.get.text(i.text.percent,e)))})},active:function(e){e=e||i.text.active,f.debug("Setting active state"),i.showActivity&&!f.is.active()&&c.addClass(r.active),f.remove.warning(),f.remove.error(),f.remove.success(),(e=i.onLabelUpdate("active",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onActive.call(p,f.value,f.total)})},success:function(e,t){e=e||i.text.success||i.text.active,f.debug("Setting success state"),c.addClass(r.success),f.remove.active(),f.remove.warning(),f.remove.error(),f.complete(t),e=i.text.success?i.onLabelUpdate("success",e,f.value,f.total):i.onLabelUpdate("active",e,f.value,f.total),f.set.label(e),f.bind.transitionEnd(function(){i.onSuccess.call(p,f.total)})},warning:function(e,t){e=e||i.text.warning,f.debug("Setting warning state"),c.addClass(r.warning),f.remove.active(),f.remove.success(),f.remove.error(),f.complete(t),(e=i.onLabelUpdate("warning",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onWarning.call(p,f.value,f.total)})},error:function(e,t){e=e||i.text.error,f.debug("Setting error state"),c.addClass(r.error),f.remove.active(),f.remove.success(),f.remove.warning(),f.complete(t),(e=i.onLabelUpdate("error",e,f.value,f.total))&&f.set.label(e),f.bind.transitionEnd(function(){i.onError.call(p,f.value,f.total)})},total:function(e){f.total=e},value:function(e){f.value=f.helper.forceArray(e)},progress:function(e){f.has.progressPoll()?(f.debug("Updated within interval, setting next update to use new value",e),f.set.nextValue(e)):(f.debug("First update in progress update interval, immediately updating",e),f.update.progress(e),f.create.progressPoll())},nextValue:function(e){f.nextValue=e}},update:{toNextValue:function(){var e=f.nextValue;e&&(f.debug("Update interval complete using last updated value",e),f.update.progress(e),f.remove.nextValue())},progress:function(e){let r=f.has.total();r&&f.set.value(e);e=f.helper.forceArray(e).map(function(e){let t;return!1===(e=f.get.numericValue(e))&&f.error(l.nonNumeric,e),e=f.get.normalizedValue(e),r?(t=0<f.total?e/f.total*100:100,f.debug("Calculating percent complete from total",t)):(t=e,f.debug("Setting value to exact percentage value",t)),t});f.set.percent(e)}},setting:function(e,t){if(f.debug("Changing setting",e,t),A.isPlainObject(e))A.extend(!0,i,e);else{if(void 0===t)return i[e];A.isPlainObject(i[e])?A.extend(!0,i[e],t):i[e]=t}},internal:function(e,t){if(A.isPlainObject(e))A.extend(!0,f,e);else{if(void 0===t)return f[e];f[e]=t}},debug:function(){!i.silent&&i.debug&&(i.performance?f.performance.log(arguments):(f.debug=Function.prototype.bind.call(console.info,console,i.name+":"),f.debug.apply(console,arguments)))},verbose:function(){!i.silent&&i.verbose&&i.debug&&(i.performance?f.performance.log(arguments):(f.verbose=Function.prototype.bind.call(console.info,console,i.name+":"),f.verbose.apply(console,arguments)))},error:function(){i.silent||(f.error=Function.prototype.bind.call(console.error,console,i.name+":"),f.error.apply(console,arguments))},performance:{log:function(e){var t,r;i.performance&&(r=(t=Date.now())-(b||t),b=t,h.push({Name:e[0],Arguments:[].slice.call(e,1)||"",Element:p,"Execution Time":r})),clearTimeout(f.performance.timer),f.performance.timer=setTimeout(function(){f.performance.display()},500)},display:function(){var e=i.name+":";let r=0;b=!1,clearTimeout(f.performance.timer),A.each(h,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",0<h.length&&(console.groupCollapsed(e),console.table?console.table(h):A.each(h,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),h=[]}},invoke:function(n,e,t){let a=v,o,i,r;var s;return e=e||w,t=t||p,"string"==typeof n&&void 0!==a&&(n=n.split(/[ .]/),o=n.length-1,A.each(n,function(e,t){var r=e!==o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(A.isPlainObject(a[r])&&e!==o)a=a[r];else{if(void 0!==a[r])return i=a[r],!1;{if(!A.isPlainObject(a[t])||e===o)return void 0!==a[t]?i=a[t]:f.error(l.method,n),!1;a=a[t]}}})),"function"==typeof(s=i)&&"number"!=typeof s.nodeType?r=i.apply(t,e):void 0!==i&&(r=i),Array.isArray(V)?V.push(r):void 0!==V?V=[V,r]:void 0!==r&&(V=r),i}},y?(void 0===v&&f.initialize(),f.invoke(x)):(void 0!==v&&v.invoke("destroy"),f.initialize())}),void 0!==V?V:this},A.fn.progress.settings={name:"Progress",namespace:"progress",silent:!1,debug:!1,verbose:!1,performance:!0,random:{min:2,max:5},duration:300,updateInterval:"auto",autoSuccess:!0,showActivity:!0,limitValues:!0,label:"percent",precision:0,framerate:1e3/30,percent:!1,total:!1,value:!1,failSafeDelay:100,onLabelUpdate:function(e,t,r,n){return t},onChange:function(e,t,r){},onSuccess:function(e){},onActive:function(e,t){},onError:function(e,t){},onWarning:function(e,t){},error:{method:"The method you called is not defined.",nonNumeric:"Progress value is non numeric",tooHigh:"Value specified is above 100%",tooLow:"Value specified is below 0%",sumExceedsTotal:"Sum of multiple values exceed total"},regExp:{variable:/{\$*[\da-z]+}/gi},metadata:{percent:"percent",total:"total",value:"value"},selector:{bar:"> .bar",label:"> .label",progress:".bar > .progress"},text:{active:!1,error:!1,success:!1,warning:!1,percent:"{percent}%",ratio:"{value} of {total}",bars:[""]},className:{active:"active",error:"error",success:"success",warning:"warning"}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.1+bee406e - Rail
2
+ * # Fomantic-UI 2.10.0-beta.11+6d1b302 - Rail
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.1+bee406e - Rail
2
+ * # Fomantic-UI 2.10.0-beta.11+6d1b302 - Rail
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.1+bee406e - Rating
2
+ * # Fomantic-UI 2.10.0-beta.11+6d1b302 - Rating
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *