fomantic-ui 2.9.1-beta.20 → 2.9.1-beta.22

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 (365) hide show
  1. package/.eslintrc.js +143 -70
  2. package/.github/workflows/ci.yml +3 -3
  3. package/.github/workflows/nightly.yml +1 -1
  4. package/.github/workflows/release.yml +1 -1
  5. package/.stylelintrc.js +35 -21
  6. package/dist/components/accordion.css +1 -1
  7. package/dist/components/accordion.js +1 -1
  8. package/dist/components/accordion.min.css +1 -1
  9. package/dist/components/accordion.min.js +1 -1
  10. package/dist/components/ad.css +1 -1
  11. package/dist/components/ad.min.css +1 -1
  12. package/dist/components/api.js +1 -6
  13. package/dist/components/api.min.js +2 -2
  14. package/dist/components/breadcrumb.css +1 -1
  15. package/dist/components/breadcrumb.min.css +1 -1
  16. package/dist/components/button.css +1 -1
  17. package/dist/components/button.min.css +1 -1
  18. package/dist/components/calendar.css +1 -1
  19. package/dist/components/calendar.js +37 -29
  20. package/dist/components/calendar.min.css +1 -1
  21. package/dist/components/calendar.min.js +2 -2
  22. package/dist/components/card.css +1 -1
  23. package/dist/components/card.min.css +1 -1
  24. package/dist/components/checkbox.css +1 -1
  25. package/dist/components/checkbox.js +1 -1
  26. package/dist/components/checkbox.min.css +1 -1
  27. package/dist/components/checkbox.min.js +1 -1
  28. package/dist/components/comment.css +1 -1
  29. package/dist/components/comment.min.css +1 -1
  30. package/dist/components/container.css +1 -1
  31. package/dist/components/container.min.css +1 -1
  32. package/dist/components/dimmer.css +1 -1
  33. package/dist/components/dimmer.js +1 -1
  34. package/dist/components/dimmer.min.css +1 -1
  35. package/dist/components/dimmer.min.js +1 -1
  36. package/dist/components/divider.css +1 -1
  37. package/dist/components/divider.min.css +1 -1
  38. package/dist/components/dropdown.css +1 -1
  39. package/dist/components/dropdown.js +2 -2
  40. package/dist/components/dropdown.min.css +1 -1
  41. package/dist/components/dropdown.min.js +2 -2
  42. package/dist/components/embed.css +1 -1
  43. package/dist/components/embed.js +1 -1
  44. package/dist/components/embed.min.css +1 -1
  45. package/dist/components/embed.min.js +1 -1
  46. package/dist/components/feed.css +1 -1
  47. package/dist/components/feed.min.css +1 -1
  48. package/dist/components/flag.css +1 -1
  49. package/dist/components/flag.min.css +1 -1
  50. package/dist/components/flyout.css +1 -1
  51. package/dist/components/flyout.js +1 -1
  52. package/dist/components/flyout.min.css +1 -1
  53. package/dist/components/flyout.min.js +1 -1
  54. package/dist/components/form.css +1 -1
  55. package/dist/components/form.js +1 -1
  56. package/dist/components/form.min.css +1 -1
  57. package/dist/components/form.min.js +1 -1
  58. package/dist/components/grid.css +1 -1
  59. package/dist/components/grid.min.css +1 -1
  60. package/dist/components/header.css +1 -1
  61. package/dist/components/header.min.css +1 -1
  62. package/dist/components/icon.css +1 -1
  63. package/dist/components/icon.min.css +1 -1
  64. package/dist/components/image.css +1 -1
  65. package/dist/components/image.min.css +1 -1
  66. package/dist/components/input.css +1 -1
  67. package/dist/components/input.min.css +1 -1
  68. package/dist/components/item.css +1 -1
  69. package/dist/components/item.min.css +1 -1
  70. package/dist/components/label.css +1 -1
  71. package/dist/components/label.min.css +1 -1
  72. package/dist/components/list.css +1 -1
  73. package/dist/components/list.min.css +1 -1
  74. package/dist/components/loader.css +1 -1
  75. package/dist/components/loader.min.css +1 -1
  76. package/dist/components/message.css +1 -1
  77. package/dist/components/message.min.css +1 -1
  78. package/dist/components/modal.css +1 -1
  79. package/dist/components/modal.js +1 -1
  80. package/dist/components/modal.min.css +1 -1
  81. package/dist/components/modal.min.js +1 -1
  82. package/dist/components/nag.css +1 -1
  83. package/dist/components/nag.js +1 -1
  84. package/dist/components/nag.min.css +1 -1
  85. package/dist/components/nag.min.js +1 -1
  86. package/dist/components/placeholder.css +1 -1
  87. package/dist/components/placeholder.min.css +1 -1
  88. package/dist/components/popup.css +1 -1
  89. package/dist/components/popup.js +4 -4
  90. package/dist/components/popup.min.css +1 -1
  91. package/dist/components/popup.min.js +2 -2
  92. package/dist/components/progress.css +1 -1
  93. package/dist/components/progress.js +2 -2
  94. package/dist/components/progress.min.css +1 -1
  95. package/dist/components/progress.min.js +2 -2
  96. package/dist/components/rail.css +1 -1
  97. package/dist/components/rail.min.css +1 -1
  98. package/dist/components/rating.css +1 -1
  99. package/dist/components/rating.js +1 -1
  100. package/dist/components/rating.min.css +1 -1
  101. package/dist/components/rating.min.js +1 -1
  102. package/dist/components/reset.css +1 -1
  103. package/dist/components/reset.min.css +1 -1
  104. package/dist/components/reveal.css +1 -1
  105. package/dist/components/reveal.min.css +1 -1
  106. package/dist/components/search.css +1 -1
  107. package/dist/components/search.js +2 -2
  108. package/dist/components/search.min.css +1 -1
  109. package/dist/components/search.min.js +2 -2
  110. package/dist/components/segment.css +1 -1
  111. package/dist/components/segment.min.css +1 -1
  112. package/dist/components/shape.css +1 -1
  113. package/dist/components/shape.js +1 -1
  114. package/dist/components/shape.min.css +1 -1
  115. package/dist/components/shape.min.js +1 -1
  116. package/dist/components/sidebar.css +1 -1
  117. package/dist/components/sidebar.js +1 -1
  118. package/dist/components/sidebar.min.css +1 -1
  119. package/dist/components/sidebar.min.js +1 -1
  120. package/dist/components/site.css +1 -1
  121. package/dist/components/site.js +1 -1
  122. package/dist/components/site.min.css +1 -1
  123. package/dist/components/site.min.js +1 -1
  124. package/dist/components/slider.js +1 -1
  125. package/dist/components/slider.min.js +1 -1
  126. package/dist/components/state.js +1 -1
  127. package/dist/components/state.min.js +1 -1
  128. package/dist/components/statistic.css +1 -1
  129. package/dist/components/statistic.min.css +1 -1
  130. package/dist/components/step.css +1 -1
  131. package/dist/components/step.min.css +1 -1
  132. package/dist/components/sticky.css +1 -1
  133. package/dist/components/sticky.js +1 -1
  134. package/dist/components/sticky.min.css +1 -1
  135. package/dist/components/sticky.min.js +1 -1
  136. package/dist/components/tab.css +1 -1
  137. package/dist/components/tab.js +1 -1
  138. package/dist/components/tab.min.css +1 -1
  139. package/dist/components/tab.min.js +1 -1
  140. package/dist/components/table.css +1 -1
  141. package/dist/components/table.min.css +1 -1
  142. package/dist/components/text.css +1 -1
  143. package/dist/components/text.min.css +1 -1
  144. package/dist/components/toast.css +1 -1
  145. package/dist/components/toast.js +1 -1
  146. package/dist/components/toast.min.css +1 -1
  147. package/dist/components/toast.min.js +1 -1
  148. package/dist/components/transition.css +30 -40
  149. package/dist/components/transition.js +1 -1
  150. package/dist/components/transition.min.css +1 -1
  151. package/dist/components/transition.min.js +1 -1
  152. package/dist/components/visibility.js +3 -3
  153. package/dist/components/visibility.min.js +2 -2
  154. package/dist/semantic.css +79 -79
  155. package/dist/semantic.js +70 -67
  156. package/dist/semantic.min.css +1 -1
  157. package/dist/semantic.min.js +2 -2
  158. package/examples/.eslintrc.js +6 -0
  159. package/package.json +7 -6
  160. package/src/_site/collections/menu.overrides +1 -1
  161. package/src/_site/elements/flag.variables +2 -2
  162. package/src/_site/globals/site.variables +1 -1
  163. package/src/definitions/behaviors/api.js +0 -5
  164. package/src/definitions/behaviors/visibility.js +2 -2
  165. package/src/definitions/collections/breadcrumb.less +0 -1
  166. package/src/definitions/collections/form.less +0 -8
  167. package/src/definitions/collections/grid.less +0 -3
  168. package/src/definitions/collections/menu.less +2 -10
  169. package/src/definitions/collections/message.less +5 -5
  170. package/src/definitions/elements/button.less +0 -22
  171. package/src/definitions/elements/divider.less +0 -8
  172. package/src/definitions/elements/emoji.less +0 -1
  173. package/src/definitions/elements/icon.less +0 -8
  174. package/src/definitions/elements/image.less +0 -2
  175. package/src/definitions/elements/input.less +0 -10
  176. package/src/definitions/elements/label.less +0 -31
  177. package/src/definitions/elements/list.less +0 -4
  178. package/src/definitions/elements/loader.less +0 -3
  179. package/src/definitions/elements/reveal.less +0 -2
  180. package/src/definitions/elements/segment.less +0 -6
  181. package/src/definitions/elements/step.less +0 -3
  182. package/src/definitions/modules/calendar.js +36 -28
  183. package/src/definitions/modules/checkbox.less +0 -15
  184. package/src/definitions/modules/dimmer.less +0 -6
  185. package/src/definitions/modules/dropdown.js +1 -1
  186. package/src/definitions/modules/dropdown.less +1 -15
  187. package/src/definitions/modules/embed.less +0 -1
  188. package/src/definitions/modules/flyout.less +0 -4
  189. package/src/definitions/modules/modal.less +0 -6
  190. package/src/definitions/modules/nag.less +0 -9
  191. package/src/definitions/modules/popup.js +3 -3
  192. package/src/definitions/modules/popup.less +0 -12
  193. package/src/definitions/modules/progress.js +1 -1
  194. package/src/definitions/modules/progress.less +0 -3
  195. package/src/definitions/modules/search.js +1 -1
  196. package/src/definitions/modules/search.less +0 -12
  197. package/src/definitions/modules/shape.less +0 -4
  198. package/src/definitions/modules/sidebar.less +0 -3
  199. package/src/definitions/modules/sticky.less +1 -0
  200. package/src/definitions/modules/tab.less +0 -5
  201. package/src/definitions/views/ad.less +0 -1
  202. package/src/definitions/views/card.less +1 -5
  203. package/src/definitions/views/item.less +0 -1
  204. package/src/themes/amazon/elements/button.overrides +23 -24
  205. package/src/themes/amazon/elements/button.variables +11 -11
  206. package/src/themes/amazon/globals/site.variables +2 -3
  207. package/src/themes/basic/collections/table.overrides +0 -1
  208. package/src/themes/basic/collections/table.variables +3 -3
  209. package/src/themes/basic/elements/button.overrides +0 -1
  210. package/src/themes/basic/elements/button.variables +2 -2
  211. package/src/themes/basic/elements/icon.overrides +12 -13
  212. package/src/themes/basic/elements/icon.variables +13 -13
  213. package/src/themes/basic/elements/step.overrides +2 -2
  214. package/src/themes/basic/elements/step.variables +2 -2
  215. package/src/themes/basic/globals/reset.overrides +1 -1
  216. package/src/themes/basic/globals/reset.variables +1 -1
  217. package/src/themes/basic/views/card.overrides +0 -1
  218. package/src/themes/basic/views/card.variables +3 -3
  219. package/src/themes/bookish/elements/header.overrides +3 -3
  220. package/src/themes/bookish/elements/header.variables +2 -2
  221. package/src/themes/bootstrap3/elements/button.variables +7 -8
  222. package/src/themes/chubby/collections/form.overrides +9 -9
  223. package/src/themes/chubby/collections/form.variables +3 -3
  224. package/src/themes/chubby/collections/menu.variables +1 -1
  225. package/src/themes/chubby/elements/button.overrides +7 -9
  226. package/src/themes/chubby/elements/button.variables +2 -2
  227. package/src/themes/chubby/elements/header.variables +3 -3
  228. package/src/themes/chubby/modules/accordion.overrides +2 -2
  229. package/src/themes/chubby/modules/accordion.variables +3 -3
  230. package/src/themes/chubby/views/comment.overrides +5 -5
  231. package/src/themes/chubby/views/comment.variables +4 -4
  232. package/src/themes/classic/collections/table.variables +2 -2
  233. package/src/themes/classic/elements/button.variables +20 -21
  234. package/src/themes/classic/elements/header.variables +3 -3
  235. package/src/themes/classic/modules/progress.variables +1 -1
  236. package/src/themes/classic/views/card.overrides +14 -14
  237. package/src/themes/classic/views/card.variables +4 -4
  238. package/src/themes/colored/modules/checkbox.variables +1 -1
  239. package/src/themes/default/collections/breadcrumb.variables +4 -4
  240. package/src/themes/default/collections/form.variables +12 -12
  241. package/src/themes/default/collections/grid.overrides +0 -1
  242. package/src/themes/default/collections/grid.variables +14 -16
  243. package/src/themes/default/collections/menu.variables +19 -31
  244. package/src/themes/default/collections/message.variables +83 -84
  245. package/src/themes/default/collections/table.variables +16 -18
  246. package/src/themes/default/elements/button.variables +30 -31
  247. package/src/themes/default/elements/container.variables +4 -5
  248. package/src/themes/default/elements/divider.overrides +8 -9
  249. package/src/themes/default/elements/divider.variables +4 -5
  250. package/src/themes/default/elements/emoji.overrides +0 -1
  251. package/src/themes/default/elements/emoji.variables +3555 -3555
  252. package/src/themes/default/elements/flag.variables +1594 -1594
  253. package/src/themes/default/elements/header.overrides +0 -1
  254. package/src/themes/default/elements/header.variables +16 -16
  255. package/src/themes/default/elements/icon.variables +2002 -2004
  256. package/src/themes/default/elements/image.variables +6 -7
  257. package/src/themes/default/elements/input.variables +10 -10
  258. package/src/themes/default/elements/label.variables +19 -20
  259. package/src/themes/default/elements/list.variables +16 -16
  260. package/src/themes/default/elements/loader.variables +15 -16
  261. package/src/themes/default/elements/placeholder.variables +6 -7
  262. package/src/themes/default/elements/rail.variables +4 -5
  263. package/src/themes/default/elements/segment.variables +18 -22
  264. package/src/themes/default/elements/step.overrides +4 -4
  265. package/src/themes/default/elements/step.variables +14 -16
  266. package/src/themes/default/elements/text.variables +2 -3
  267. package/src/themes/default/globals/colors.less +22 -22
  268. package/src/themes/default/globals/reset.overrides +57 -57
  269. package/src/themes/default/globals/reset.variables +1 -1
  270. package/src/themes/default/globals/site.variables +861 -875
  271. package/src/themes/default/globals/variation.variables +0 -3
  272. package/src/themes/default/modules/accordion.overrides +11 -11
  273. package/src/themes/default/modules/accordion.variables +14 -15
  274. package/src/themes/default/modules/chatroom.variables +1 -1
  275. package/src/themes/default/modules/checkbox.overrides +6 -7
  276. package/src/themes/default/modules/checkbox.variables +17 -22
  277. package/src/themes/default/modules/dimmer.variables +7 -8
  278. package/src/themes/default/modules/dropdown.overrides +17 -17
  279. package/src/themes/default/modules/dropdown.variables +20 -21
  280. package/src/themes/default/modules/embed.variables +9 -10
  281. package/src/themes/default/modules/flyout.variables +6 -6
  282. package/src/themes/default/modules/modal.variables +18 -18
  283. package/src/themes/default/modules/nag.variables +10 -13
  284. package/src/themes/default/modules/popup.variables +12 -13
  285. package/src/themes/default/modules/progress.variables +10 -11
  286. package/src/themes/default/modules/rating.variables +10 -11
  287. package/src/themes/default/modules/search.variables +9 -11
  288. package/src/themes/default/modules/shape.variables +6 -6
  289. package/src/themes/default/modules/sidebar.variables +4 -4
  290. package/src/themes/default/modules/slider.variables +48 -49
  291. package/src/themes/default/modules/sticky.variables +1 -1
  292. package/src/themes/default/modules/toast.variables +1 -1
  293. package/src/themes/default/modules/transition.overrides +936 -915
  294. package/src/themes/default/views/card.variables +20 -22
  295. package/src/themes/default/views/comment.variables +6 -8
  296. package/src/themes/default/views/feed.variables +6 -6
  297. package/src/themes/default/views/item.variables +6 -9
  298. package/src/themes/default/views/statistic.variables +8 -8
  299. package/src/themes/duo/elements/loader.variables +1 -1
  300. package/src/themes/famfamfam/elements/flag.overrides +263 -268
  301. package/src/themes/famfamfam/elements/flag.variables +3 -3
  302. package/src/themes/fixed-width/collections/grid.variables +1 -1
  303. package/src/themes/fixed-width/modules/modal.variables +3 -5
  304. package/src/themes/flat/collections/form.overrides +9 -9
  305. package/src/themes/flat/collections/form.variables +4 -5
  306. package/src/themes/flat/globals/site.variables +61 -66
  307. package/src/themes/github/collections/breadcrumb.variables +0 -1
  308. package/src/themes/github/collections/form.overrides +7 -8
  309. package/src/themes/github/collections/form.variables +12 -13
  310. package/src/themes/github/collections/grid.variables +1 -2
  311. package/src/themes/github/collections/menu.overrides +2 -2
  312. package/src/themes/github/collections/menu.variables +11 -12
  313. package/src/themes/github/collections/message.overrides +3 -3
  314. package/src/themes/github/collections/message.variables +5 -5
  315. package/src/themes/github/collections/table.variables +1 -1
  316. package/src/themes/github/elements/button.overrides +0 -1
  317. package/src/themes/github/elements/button.variables +14 -14
  318. package/src/themes/github/elements/header.variables +2 -2
  319. package/src/themes/github/elements/icon.overrides +179 -179
  320. package/src/themes/github/elements/icon.variables +10 -10
  321. package/src/themes/github/elements/image.variables +1 -1
  322. package/src/themes/github/elements/input.overrides +16 -16
  323. package/src/themes/github/elements/input.variables +3 -3
  324. package/src/themes/github/elements/label.overrides +3 -3
  325. package/src/themes/github/elements/label.variables +0 -1
  326. package/src/themes/github/elements/segment.variables +2 -3
  327. package/src/themes/github/elements/step.overrides +13 -13
  328. package/src/themes/github/elements/step.variables +2 -2
  329. package/src/themes/github/globals/site.variables +2 -2
  330. package/src/themes/github/modules/dropdown.overrides +18 -19
  331. package/src/themes/github/modules/dropdown.variables +1 -1
  332. package/src/themes/github/modules/popup.variables +0 -2
  333. package/src/themes/instagram/views/card.overrides +3 -4
  334. package/src/themes/instagram/views/card.variables +3 -4
  335. package/src/themes/joypixels/elements/emoji.overrides +0 -2
  336. package/src/themes/joypixels/elements/emoji.variables +3554 -3554
  337. package/src/themes/material/collections/menu.variables +1 -1
  338. package/src/themes/material/elements/button.overrides +6 -8
  339. package/src/themes/material/elements/button.variables +28 -28
  340. package/src/themes/material/elements/header.overrides +2 -2
  341. package/src/themes/material/elements/header.variables +2 -4
  342. package/src/themes/material/elements/icon.overrides +932 -932
  343. package/src/themes/material/elements/icon.variables +11 -11
  344. package/src/themes/material/globals/site.variables +78 -79
  345. package/src/themes/material/modules/dropdown.overrides +1 -1
  346. package/src/themes/material/modules/dropdown.variables +1 -1
  347. package/src/themes/material/modules/modal.overrides +2 -2
  348. package/src/themes/material/modules/modal.variables +1 -2
  349. package/src/themes/pulsar/elements/loader.overrides +58 -58
  350. package/src/themes/raised/elements/button.variables +8 -8
  351. package/src/themes/resetcss/globals/reset.overrides +115 -33
  352. package/src/themes/resetcss/globals/reset.variables +1 -1
  353. package/src/themes/round/elements/button.variables +11 -14
  354. package/src/themes/rtl/globals/site.variables +5 -6
  355. package/src/themes/striped/modules/progress.overrides +20 -16
  356. package/src/themes/systemfont/globals/reset.overrides +1 -1
  357. package/src/themes/systemfont/globals/site.variables +5 -5
  358. package/src/themes/timeline/views/feed.overrides +12 -12
  359. package/src/themes/timeline/views/feed.variables +4 -4
  360. package/src/themes/twitter/elements/button.overrides +4 -5
  361. package/src/themes/twitter/elements/button.variables +6 -7
  362. package/src/themes/twitter/elements/emoji.variables +3555 -3555
  363. package/tasks/.eslintrc.js +9 -0
  364. package/tasks/docs/metadata.js +2 -2
  365. package/test/.eslintrc.js +27 -0
package/.eslintrc.js CHANGED
@@ -4,6 +4,8 @@ module.exports = {
4
4
  es6: true,
5
5
  },
6
6
  extends: [
7
+ 'airbnb-base',
8
+ 'plugin:unicorn/recommended',
7
9
  ],
8
10
  parserOptions: {
9
11
  ecmaVersion: '2020',
@@ -17,43 +19,48 @@ module.exports = {
17
19
  '/test/helpers',
18
20
  ],
19
21
  rules: {
20
- indent: ['error', 4, { SwitchCase: 1 }],
21
- 'keyword-spacing': ['error'],
22
- 'space-in-parens': ['error'],
23
- 'comma-spacing': ['error'],
24
- 'comma-style': ['error', 'last', {
25
- // https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L54
22
+ 'class-methods-use-this': 'off',
23
+ 'comma-dangle': ['error', {
24
+ arrays: 'always-multiline',
25
+ objects: 'always-multiline',
26
+ functions: 'never',
27
+ imports: 'always-multiline',
28
+ exports: 'always-multiline',
29
+ }],
30
+ 'consistent-return': 'off',
31
+ curly: ['error', 'all'],
32
+ 'default-case': 'off',
33
+ 'func-names': 'off',
34
+ 'import/no-unresolved': 'off',
35
+ 'import/prefer-default-export': 'off',
36
+ indent: ['error', 4, {
37
+ SwitchCase: 1,
38
+ }],
39
+ 'linebreak-style': ['error', 'unix'],
40
+ 'max-len': 'off',
41
+ 'no-console': 'off',
42
+ 'no-continue': 'off',
43
+ 'no-lonely-if': 'off',
44
+ 'no-multi-spaces': ['error', {
26
45
  exceptions: {
27
- ArrayExpression: false,
28
- ArrayPattern: false,
29
- ArrowFunctionExpression: false,
30
- CallExpression: false,
31
- FunctionDeclaration: false,
32
- FunctionExpression: false,
33
- ImportDeclaration: false,
34
- ObjectExpression: false,
35
- ObjectPattern: false,
36
- VariableDeclaration: false,
37
- NewExpression: false,
46
+ Property: true,
47
+ VariableDeclarator: true,
38
48
  },
39
49
  }],
40
- 'space-before-function-paren': ['error', {
41
- named: 'never',
42
- anonymous: 'always',
43
- asyncArrow: 'always',
44
- }],
45
- 'space-infix-ops': ['error'],
46
- 'array-bracket-spacing': ['error', 'never'],
47
- 'object-curly-spacing': ['error', 'always'],
48
- 'computed-property-spacing': ['error', 'never'],
49
- 'space-before-blocks': ['error'],
50
- 'one-var-declaration-per-line': ['error', 'always'],
51
- 'function-paren-newline': ['error', 'multiline-arguments'],
50
+ 'no-nested-ternary': 'off',
51
+ 'no-param-reassign': 'off',
52
+ 'no-plusplus': 'off',
53
+ 'no-restricted-syntax': 'off',
54
+ 'no-underscore-dangle': 'off',
55
+ 'no-unused-vars': 'off',
56
+ 'object-shorthand': ['error', 'never'],
52
57
  'padding-line-between-statements': ['error', {
53
58
  blankLine: 'always',
54
59
  prev: '*',
55
60
  next: ['continue', 'break', 'export', 'return', 'throw'],
56
61
  }],
62
+ 'prefer-destructuring': 'off',
63
+ 'prefer-template': 'off',
57
64
  'spaced-comment': ['error', 'always', {
58
65
  line: {
59
66
  markers: ['/'],
@@ -65,46 +72,112 @@ module.exports = {
65
72
  balanced: true,
66
73
  },
67
74
  }],
68
- 'padded-blocks': ['error', 'never'],
69
- 'no-multiple-empty-lines': ['error', {
70
- max: 1,
71
- maxBOF: 0,
72
- maxEOF: 0,
73
- }],
74
- 'no-multi-spaces': ['error', {
75
- exceptions: {
76
- Property: true,
77
- VariableDeclarator: true,
78
- },
79
- }],
80
- 'brace-style': ['error'],
81
- curly: ['error'],
82
- 'object-shorthand': ['error', 'never'],
83
- 'object-curly-newline': ['error', {
84
- // https://github.com/airbnb/javascript/blob/eslint-config-airbnb-v19.0.4/packages/eslint-config-airbnb-base/rules/style.js#L395
85
- ObjectExpression: { minProperties: 4, multiline: true, consistent: true },
86
- ObjectPattern: { minProperties: 4, multiline: true, consistent: true },
87
- ImportDeclaration: { minProperties: 4, multiline: true, consistent: true },
88
- ExportDeclaration: { minProperties: 4, multiline: true, consistent: true },
89
- }],
90
- 'operator-linebreak': ['error', 'before', { overrides: { '=': 'none' } }],
91
- 'dot-notation': ['error', { allowKeywords: true }],
92
- 'arrow-parens': ['error'],
93
- quotes: ['error', 'single', { avoidEscape: true }],
94
- 'quote-props': ['error', 'as-needed', {
95
- keywords: false,
96
- numbers: false,
97
- }],
98
- 'comma-dangle': ['error', {
99
- arrays: 'always-multiline',
100
- objects: 'always-multiline',
101
- functions: 'never',
102
- imports: 'always-multiline',
103
- exports: 'always-multiline',
104
- }],
105
- semi: ['error'],
106
- 'no-extra-semi': ['error'],
107
- 'no-trailing-spaces': ['error'],
75
+ strict: 'off',
76
+ 'unicorn/catch-error-name': 'off',
77
+ 'unicorn/no-array-callback-reference': 'off',
78
+ 'unicorn/no-lonely-if': 'off',
79
+ 'unicorn/no-negated-condition': 'off',
80
+ 'unicorn/no-null': 'off',
81
+ 'unicorn/no-this-assignment': 'off',
82
+ 'unicorn/numeric-separators-style': 'off',
83
+ 'unicorn/prefer-array-some': 'off', // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2007
84
+ 'unicorn/prefer-module': 'off',
85
+ 'unicorn/prevent-abbreviations': 'off',
86
+ 'unicorn/switch-case-braces': ['error', 'avoid'],
87
+ 'wrap-iife': ['error', 'inside'],
88
+
89
+ // TODO rules to be removed/fixed in v2.10.0 as fixes are not compatible with IE11
90
+ 'guard-for-in': 'off', // refactor to "for of"
91
+ 'no-restricted-globals': 'off',
92
+ 'no-restricted-properties': 'off',
93
+ 'no-var': 'off', // https://github.com/fomantic/Fomantic-UI/pull/2584
94
+ 'one-var': 'off',
95
+ 'prefer-const': 'off',
96
+ 'prefer-exponentiation-operator': 'off',
97
+ 'prefer-spread': 'off',
98
+ 'semi-style': 'off',
99
+ 'unicorn/no-array-for-each': 'off',
100
+ 'unicorn/no-for-loop': 'off', // autofixes to "for of"
101
+ 'unicorn/prefer-code-point': 'off',
102
+ 'unicorn/prefer-includes': 'off',
103
+ 'unicorn/prefer-node-protocol': 'off', // needs Node 14+
104
+ 'unicorn/prefer-number-properties': 'off',
105
+ 'unicorn/prefer-optional-catch-binding': 'off',
106
+ 'unicorn/prefer-prototype-methods': 'off',
107
+ 'unicorn/prefer-reflect-apply': 'off',
108
+ 'unicorn/prefer-spread': 'off',
109
+ 'unicorn/prefer-top-level-await': 'off', // needs Node 14+
110
+ 'vars-on-top': 'off',
111
+
112
+ // TODO rules with a lot of errors to be fixed manually, fix in a separate PR
113
+ eqeqeq: 'off', // about 300 errors to be fixed manually
114
+ 'global-require': 'off', // about 30 errors to be fixed manually
115
+ 'no-shadow': 'off', // about 220 errors to be fixed manually
116
+ 'prefer-arrow-callback': 'off', // about 350 errors (all autofixable)
117
+ 'prefer-rest-params': 'off', // about 180 errors to be fixed manually
118
+ 'unicorn/no-nested-ternary': 'off', // about 80 errors (except 14 nested ternary operators autofixable)
119
+
120
+ // TODO
121
+ 'import/extensions': 'off',
122
+ 'import/no-dynamic-require': 'off',
123
+ 'no-bitwise': 'off',
124
+ 'no-cond-assign': 'off',
125
+ 'no-else-return': 'off',
126
+ 'no-empty': 'off',
127
+ 'no-labels': 'off',
128
+ 'no-loop-func': 'off',
129
+ 'no-mixed-operators': 'off',
130
+ 'no-multi-assign': 'off',
131
+ 'no-new-func': 'off',
132
+ 'no-path-concat': 'off',
133
+ 'no-prototype-builtins': 'off',
134
+ 'no-return-assign': 'off',
135
+ 'no-self-assign': 'off',
136
+ 'no-shadow-restricted-names': 'off',
137
+ 'no-unused-expressions': 'off',
138
+ 'no-use-before-define': 'off',
139
+ 'no-useless-concat': 'off',
140
+ 'no-useless-escape': 'off',
141
+ radix: 'off',
142
+ 'unicorn/better-regex': 'off',
143
+ 'unicorn/consistent-function-scoping': 'off',
144
+ 'unicorn/empty-brace-spaces': 'off',
145
+ 'unicorn/escape-case': 'off',
146
+ 'unicorn/explicit-length-check': 'off',
147
+ 'unicorn/new-for-builtins': 'off',
148
+ 'unicorn/no-hex-escape': 'off',
149
+ 'unicorn/no-instanceof-array': 'off',
150
+ 'unicorn/no-process-exit': 'off',
151
+ 'unicorn/no-typeof-undefined': 'off',
152
+ 'unicorn/no-useless-switch-case': 'off',
153
+ 'unicorn/no-useless-undefined': 'off',
154
+ 'unicorn/prefer-array-find': 'off',
155
+ 'unicorn/prefer-date-now': 'off',
156
+ 'unicorn/prefer-default-parameters': 'off',
157
+ 'unicorn/prefer-logical-operator-over-ternary': 'off',
158
+ 'unicorn/prefer-native-coercion-functions': 'off',
159
+ 'unicorn/prefer-negative-index': 'off',
160
+ 'unicorn/prefer-regexp-test': 'off',
161
+ 'unicorn/prefer-switch': 'off',
162
+ 'unicorn/prefer-ternary': 'off',
163
+
164
+ // TODO rare errors
165
+ 'arrow-body-style': 'off',
166
+ 'block-scoped-var': 'off',
167
+ 'import/no-extraneous-dependencies': 'off',
168
+ 'import/order': 'off',
169
+ 'new-cap': 'off',
170
+ 'newline-per-chained-call': 'off',
171
+ 'no-extra-boolean-cast': 'off',
172
+ 'no-redeclare': 'off',
173
+ 'no-unneeded-ternary': 'off',
174
+ 'no-useless-return': 'off',
175
+ 'operator-assignment': 'off',
176
+ 'unicorn/no-console-spaces': 'off',
177
+ yoda: 'off',
108
178
  },
109
179
  reportUnusedDisableDirectives: true,
110
- };
180
+ globals: {
181
+ jQuery: true,
182
+ },
183
+ };
@@ -11,8 +11,8 @@ jobs:
11
11
  - uses: actions/checkout@v3
12
12
  - uses: actions/setup-node@v3
13
13
  - name: Install dependencies
14
- run: yarn
15
- - name: Lint JS files
14
+ run: yarn && yarn add -D eslint-config-airbnb-base eslint-plugin-unicorn eslint-plugin-jest@^26.9.0 @typescript-eslint/eslint-plugin @typescript-eslint/parser typescript
15
+ - name: Lint JS and CSS/LESS files
16
16
  run: npm run lint
17
17
  test:
18
18
  name: Test build process on node ${{ matrix.node-version }}
@@ -20,7 +20,7 @@ jobs:
20
20
  strategy:
21
21
  fail-fast: false
22
22
  matrix:
23
- node-version: [12, 14, 16, 18]
23
+ node-version: [12, 14, 16, 18, latest]
24
24
  steps:
25
25
  - uses: actions/checkout@v3
26
26
  - name: Setup Node.js ${{ matrix.node-version }}
@@ -18,7 +18,7 @@ jobs:
18
18
  ref: develop
19
19
  - uses: actions/setup-node@v3
20
20
  with:
21
- node-version: 16
21
+ node-version: 18
22
22
  registry-url: https://registry.npmjs.org/
23
23
  - name: pre-setup
24
24
  run: sh ./scripts/preinstall.sh
@@ -16,7 +16,7 @@ jobs:
16
16
  ref: master
17
17
  - uses: actions/setup-node@v3
18
18
  with:
19
- node-version: 14
19
+ node-version: 18
20
20
  registry-url: https://registry.npmjs.org/
21
21
  - name: pre-setup
22
22
  run: sh ./scripts/preinstall.sh
package/.stylelintrc.js CHANGED
@@ -8,39 +8,53 @@ module.exports = {
8
8
  'test/coverage/**',
9
9
  ],
10
10
  rules: {
11
- indentation: 4,
12
11
  'at-rule-empty-line-before': null,
13
- 'block-closing-brace-newline-before': null,
14
- 'declaration-block-trailing-semicolon': null, // bad formatting with "each()"
15
- 'declaration-empty-line-before': null,
12
+ 'block-closing-brace-newline-before': null, // fix bad formatting with "each()"
13
+ 'declaration-block-trailing-semicolon': null, // fix bad formatting with "each()"
14
+ indentation: null, // TODO change to "4" once https://github.com/fomantic/Fomantic-UI/pull/2593#discussion_r1045131096 is fixed
15
+ linebreaks: 'unix',
16
16
  'max-line-length': null,
17
+ 'no-descending-specificity': null,
18
+ 'no-extra-semicolons': null, // fix GH-1832 - workaround for wikimedia/less.php parser
17
19
  'rule-empty-line-before': null,
18
20
 
19
21
  // TODO
20
- 'no-descending-specificity': null, // 11532 errors
21
- 'property-case': null, // 338 errors
22
- 'string-quotes': null, // 249 errors
23
- 'no-duplicate-selectors': null, // 212 errors
22
+ 'string-quotes': null, // 1676 errors
23
+ 'at-rule-no-unknown': null, // 1081 errors
24
+ 'property-case': null, // 866 errors
25
+ 'at-rule-name-case': null, // 764 errors
26
+ 'no-duplicate-selectors': null, // 224 errors
24
27
  'selector-not-notation': null, // 169 errors
25
28
  'no-invalid-position-at-import-rule': null, // 104 errors
26
- 'at-rule-no-unknown': null, // 104 errors
27
- 'import-notation': null, // 55 errors
28
- 'function-no-unknown': null, // 43 errors
29
- 'property-no-vendor-prefix': null, // 31 errors
29
+ 'function-no-unknown': null, // 67 errors
30
+ 'length-zero-no-unit': null, // 64 errors
31
+ 'import-notation': null, // 56 errors
32
+ 'keyframes-name-pattern': null, // 50 errors
33
+ 'property-no-vendor-prefix': null, // 49 errors
34
+ 'number-leading-zero': null, // 49 errors
35
+ 'color-function-notation': null, // 32 errors
36
+ 'alpha-value-notation': null, // 32 errors
37
+ 'color-hex-case': null, // 32 errors
38
+ 'block-no-empty': null, // 25 errors
30
39
  'selector-no-vendor-prefix': null, // 19 errors
31
- 'number-leading-zero': null, // 19 errors
40
+ 'selector-class-pattern': null, // 19 errors
41
+ 'number-no-trailing-zeros': null, // 16 errors
42
+ 'font-family-name-quotes': null, // 13 errors
32
43
  'declaration-block-no-redundant-longhand-properties': null, // 12 errors
33
- 'value-keyword-case': null, // 11 errors
44
+ 'value-keyword-case': null, // 12 errors
34
45
  'value-no-vendor-prefix': null, // 9 errors
35
- 'keyframes-name-pattern': null, // 9 errors
36
- 'color-function-notation': null, // 8 errors
37
- 'alpha-value-notation': null, // 8 errors
46
+ 'color-hex-length': null, // 9 errors
47
+ 'no-empty-source': null, // 8 errors
48
+ 'font-family-no-missing-generic-family-keyword': null, // 8 errors
49
+ 'number-max-precision': null, // 7 errors
38
50
  'selector-attribute-quotes': null, // 7 errors
39
- 'number-no-trailing-zeros': null, // 6 errors
40
51
  'shorthand-property-no-redundant-values': null, // 5 errors
52
+ 'function-url-quotes': null, // 5 errors
41
53
  'declaration-block-no-duplicate-properties': null, // 2 errors
42
- 'number-max-precision': null, // 2 errors
43
- 'color-hex-case': null, // 1 error
44
- 'color-hex-length': null, // 1 error
54
+ 'font-family-no-duplicate-names': null, // 2 errors
55
+ 'function-linear-gradient-no-nonstandard-direction': null, // 1 error
56
+ 'at-rule-no-vendor-prefix': null, // 1 error
57
+ 'declaration-block-no-shorthand-property-overrides': null, // 1 error
45
58
  },
59
+ reportNeedlessDisables: true,
46
60
  };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.20+d4987bf - Accordion
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Accordion
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Accordion
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf
2
+ * # Fomantic UI - 2.9.1-beta.22+6a42d01
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.20+d4987bf - Ad
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Ad
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - API
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - API
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -157,11 +157,6 @@
157
157
  },
158
158
  write: {
159
159
  cachedResponse: function (url, response) {
160
- if (response && response === '') {
161
- module.debug('Response empty, not caching', response);
162
-
163
- return;
164
- }
165
160
  if (window.Storage === undefined) {
166
161
  module.error(error.noStorage);
167
162
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * # Fomantic UI - 2.9.1-beta.20+d4987bf
2
+ * # Fomantic UI - 2.9.1-beta.22+6a42d01
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(P,w,j,C){"use strict";function E(e){return null!=e&&e===e.window}function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}w=void 0!==w&&w.Math==Math?w:globalThis,P.api=P.fn.api=function(q){var x,e=F(this)?P(w):P(this),A=e.selector||"",k=(new Date).getTime(),S=[],T=q,D="string"==typeof T,O=[].slice.call(arguments,1);return e.each(function(){var a,n,r,e,s,o,f=P.isPlainObject(q)?P.extend(!0,{},P.fn.api.settings,q):P.extend({},P.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=P(this),m=g.closest(u.form),b=f.stateContext?[w,j].indexOf(f.stateContext)<0?P(j).find(f.stateContext):P(f.stateContext):g,v=this,h=b[0],y=g.data(p),R={initialize:function(){D||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",v),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"==f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==C&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(w.Storage!==C)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){t&&""===t?R.debug("Response empty, not caching",t):w.Storage===C?R.error(c.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&P.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=P.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"==R.request.state()},abortedRequest:function(e){return e&&e.readyState!==C&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&F(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"==R.request.state()},failure:function(){return R.request&&"rejected"==R.request.state()},complete:function(){return R.request&&("resolved"==R.request.state()||"rejected"==R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];if(n===C)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];o=n!==C?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=P.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',m),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r,n="checkbox"===P('[name="'+t.name+'"]',m).attr("type"),o=parseFloat(t.value),a=n&&"on"===t.value||"true"===t.value||(String(o)===t.value?o:"false"!==t.value&&t.value),s=t.name.match(f.regExp.key)||[],i=t.name.replace(/\[\]$/,"");i in u?Array.isArray(c[i])?c[i].push(a):c[i]=[c[i],a]:(u[i]=0,c[i]=a),-1===i.indexOf("[]")&&(a=c[i]);for(;(r=s.pop())!==C;)""!=r||Array.isArray(a)?f.regExp.fixed.test(r)?a=d([],r,a):f.regExp.named.test(r)&&(a=d({},r,a)):a=d([],u[i]++,a);l=P.extend(!0,l,a)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=(new Date).getTime()-s,o=f.loadingDuration-o,a=!!F(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,P.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"==t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"==t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"==t&&e!==C&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==C&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return P.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=P.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=F(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):F(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=P.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),s=(new Date).getTime()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&e.error!==C?e.error:f.error[t]!==C?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(e.success!==C&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==C&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==C&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===C&&R.error(c.noReturnedValue),!1===e?e:e!==C?P.extend(!0,{},e):P.extend(!0,{},f)},urlEncodedValue:function(e){var t=w.decodeURIComponent(e),r=w.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return E(v)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return E(v)||"now"==f.on?(R.debug("API called without element, no events attached"),!1):"auto"==f.on?g.is("input")?v.oninput!==C?"input":v.onpropertychange!==C?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||g.data(i.action)||f.action||!1,r=g.data(i.url)||f.url||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===C&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,f,e);else{if(t===C)return f[e];P.isPlainObject(f[e])?P.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,R,e);else{if(t===C)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=(new Date).getTime())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==C||console.table!==C)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||O,t=t||v,"string"==typeof n&&s!==C&&(n=n.split(/[\. ]/),o=n.length-1,P.each(n,function(e,t){var r=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(s[r])&&e!=o)s=s[r];else{if(s[r]!==C)return a=s[r],!1;{if(!P.isPlainObject(s[t])||e==o)return s[t]!==C?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),F(a)?r=a.apply(t,e):a!==C&&(r=a),Array.isArray(x)?x.push(r):x!==C?x=[x,r]:r!==C&&(x=r),a}};D?(y===C&&R.initialize(),R.invoke(T)):(y!==C&&y.invoke("destroy"),R.initialize())}),x!==C?x:this},P.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[a-z0-9]+\}/gi,optional:/\{\/\$*[a-z0-9]+\}/gi,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
11
+ !function(P,w,j,C){"use strict";function E(e){return null!=e&&e===e.window}function F(e){return"function"==typeof e&&"number"!=typeof e.nodeType}w=void 0!==w&&w.Math==Math?w:globalThis,P.api=P.fn.api=function(q){var x,e=F(this)?P(w):P(this),A=e.selector||"",k=(new Date).getTime(),S=[],T=q,D="string"==typeof T,O=[].slice.call(arguments,1);return e.each(function(){var a,n,r,e,s,o,f=P.isPlainObject(q)?P.extend(!0,{},P.fn.api.settings,q):P.extend({},P.fn.api.settings),t=f.namespace,i=f.metadata,u=f.selector,c=f.error,d=f.className,l="."+t,p="module-"+t,g=P(this),m=g.closest(u.form),b=f.stateContext?[w,j].indexOf(f.stateContext)<0?P(j).find(f.stateContext):P(f.stateContext):g,v=this,h=b[0],y=g.data(p),R={initialize:function(){D||(o=f.data,R.bind.events()),R.instantiate()},instantiate:function(){R.verbose("Storing instance of module",R),y=R,g.data(p,y)},destroy:function(){R.verbose("Destroying previous module for",v),g.removeData(p).off(l)},bind:{events:function(){var e=R.get.event();e?(R.verbose("Attaching API events to element",e),g.on(e+l,R.event.trigger)):"now"==f.on&&(R.debug("Querying API endpoint immediately"),R.query())}},decode:{json:function(e){if(e!==C&&"string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}},read:{cachedResponse:function(e){var t;if(w.Storage!==C)return t=sessionStorage.getItem(e+R.get.normalizedData()),R.debug("Using cached response",e,f.data,t),R.decode.json(t);R.error(c.noStorage)}},write:{cachedResponse:function(e,t){w.Storage===C?R.error(c.noStorage):(P.isPlainObject(t)&&(t=JSON.stringify(t)),sessionStorage.setItem(e+R.get.normalizedData(),t),R.verbose("Storing cached response for url",e,f.data,t))}},query:function(){if(R.is.disabled())R.debug("Element is disabled API request aborted");else{if(R.is.loading()){if(!f.interruptRequests)return void R.debug("Cancelling request, previous request is still pending");R.debug("Interrupting previous request"),R.abort()}if(f.defaultData&&P.extend(!0,f.urlData,R.get.defaultData()),f.serializeForm&&(f.data=R.add.formData(o||f.data)),!1===(n=R.get.settings()))return R.cancelled=!0,void R.error(c.beforeSend);if(R.cancelled=!1,(r=R.get.templatedURL())||R.is.mocked()){if((r=R.add.urlData(r))||R.is.mocked()){if(n.url=f.base+r,a=P.extend(!0,{},f,{type:f.method||f.type,data:e,url:f.base+r,beforeSend:f.beforeXHR,success:function(){},failure:function(){},complete:function(){}}),R.debug("Querying URL",a.url),R.verbose("Using AJAX settings",a),"local"===f.cache&&R.read.cachedResponse(r))return R.debug("Response returned from local cache"),R.request=R.create.request(),void R.request.resolveWith(h,[R.read.cachedResponse(r)]);f.throttle?f.throttleFirstRequest||R.timer?(R.debug("Throttling request",f.throttle),clearTimeout(R.timer),R.timer=setTimeout(function(){R.timer&&delete R.timer,R.debug("Sending throttled request",e,a.method),R.send.request()},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request(),R.timer=setTimeout(function(){},f.throttle)):(R.debug("Sending request",e,a.method),R.send.request())}}else R.error(c.missingURL)}},should:{removeError:function(){return!0===f.hideError||"auto"===f.hideError&&!R.is.form()}},is:{disabled:function(){return 0<g.filter(u.disabled).length},expectingJSON:function(){return"json"===f.dataType||"jsonp"===f.dataType},form:function(){return g.is("form")||b.is("form")},mocked:function(){return f.mockResponse||f.mockResponseAsync||f.response||f.responseAsync},input:function(){return g.is("input")},loading:function(){return!!R.request&&"pending"==R.request.state()},abortedRequest:function(e){return e&&e.readyState!==C&&0===e.readyState?(R.verbose("XHR request determined to be aborted"),!0):(R.verbose("XHR request was not aborted"),!1)},validResponse:function(e){return R.is.expectingJSON()&&F(f.successTest)?(R.debug("Checking JSON returned success",f.successTest,e),f.successTest(e)?(R.debug("Response passed success test",e),!0):(R.debug("Response failed success test",e),!1)):(R.verbose("Response is not JSON, skipping validation",f.successTest,e),!0)}},was:{cancelled:function(){return R.cancelled||!1},successful:function(){return R.request&&"resolved"==R.request.state()},failure:function(){return R.request&&"rejected"==R.request.state()},complete:function(){return R.request&&("resolved"==R.request.state()||"rejected"==R.request.state())}},add:{urlData:function(o,a){var e,t;return o&&(e=o.match(f.regExp.required),t=o.match(f.regExp.optional),a=a||f.urlData,e&&(R.debug("Looking for required URL variables",e),P.each(e,function(e,t){var r=-1!==t.indexOf("$")?t.slice(2,-1):t.slice(1,-1),n=P.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];if(n===C)return R.error(c.requiredParameter,r,o),o=!1;R.verbose("Found required variable",r,n),n=f.encodeParameters?R.get.urlEncodedValue(n):n,o=o.replace(t,n)})),t&&(R.debug("Looking for optional URL variables",e),P.each(t,function(e,t){var r=-1!==t.indexOf("$")?t.slice(3,-1):t.slice(2,-1),n=P.isPlainObject(a)&&a[r]!==C?a[r]:g.data(r)!==C?g.data(r):b.data(r)!==C?b.data(r):a[r];o=n!==C?(R.verbose("Optional variable Found",r,n),o.replace(t,n)):(R.verbose("Optional variable not found",r),-1!==o.indexOf("/"+t)?o.replace("/"+t,""):o.replace(t,""))}))),o},formData:function(r){var e,n,u,c,d,l={},t="formdata"===f.serializeForm;return r=r||o||f.data,e=P.isPlainObject(r),t?(l=new FormData(m[0]),f.processData=void 0!==f.processData&&f.processData,f.contentType=void 0!==f.contentType&&f.contentType):(n=m.serializeArray(),u={},c={},d=function(e,t,r){return e[t]=r,e},P.each(P('input[type="file"]',m),function(e,r){P.each(P(r)[0].files,function(e,t){n.push({name:r.name,value:t})})}),P.each(n,function(e,t){if(f.regExp.validate.test(t.name)){var r,n="checkbox"===P('[name="'+t.name+'"]',m).attr("type"),o=parseFloat(t.value),a=n&&"on"===t.value||"true"===t.value||(String(o)===t.value?o:"false"!==t.value&&t.value),s=t.name.match(f.regExp.key)||[],i=t.name.replace(/\[\]$/,"");i in u?Array.isArray(c[i])?c[i].push(a):c[i]=[c[i],a]:(u[i]=0,c[i]=a),-1===i.indexOf("[]")&&(a=c[i]);for(;(r=s.pop())!==C;)""!=r||Array.isArray(a)?f.regExp.fixed.test(r)?a=d([],r,a):f.regExp.named.test(r)&&(a=d({},r,a)):a=d([],u[i]++,a);l=P.extend(!0,l,a)}})),r=e?(R.debug("Extending existing data with form data",r,l),t?(P.each(Object.keys(r),function(e,t){l.append(t,r[t])}),l):P.extend(!0,{},r,l)):(R.debug("Adding form data",l),l)}},send:{request:function(){R.set.loading(),R.request=R.create.request(),R.is.mocked()?R.mockedXHR=R.create.mockedXHR():R.xhr=R.create.xhr(),f.onRequest.call(h,R.request,R.xhr)}},event:{trigger:function(e){R.query(),"submit"!=e.type&&"click"!=e.type||e.preventDefault()},xhr:{always:function(){},done:function(e,t,r){var n=this,o=(new Date).getTime()-s,o=f.loadingDuration-o,a=!!F(f.onResponse)&&(R.is.expectingJSON()&&!f.rawResponse?f.onResponse.call(n,P.extend(!0,{},e)):f.onResponse.call(n,e)),o=0<o?o:0;a&&(R.debug("Modified API response in onResponse callback",f.onResponse,a,e),e=a),0<o&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.validResponse(e)?R.request.resolveWith(n,[e,r]):R.request.rejectWith(n,[r,"invalid"])},o)},fail:function(e,t,r){var n=this,o=(new Date).getTime()-s,o=f.loadingDuration-o;0<(o=0<o?o:0)&&R.debug("Response completed early delaying state change by",o),setTimeout(function(){R.is.abortedRequest(e)?R.request.rejectWith(n,[e,"aborted",r]):R.request.rejectWith(n,[e,"error",t,r])},o)}},request:{done:function(e,t){R.debug("Successful API Response",e),"local"===f.cache&&r&&(R.write.cachedResponse(r,e),R.debug("Saving server response locally",R.cache)),f.onSuccess.call(h,e,g,t)},complete:function(e,t){var r,n;R.was.successful()?(n=e,r=t):n=R.get.responseFromXHR(r=e),R.remove.loading(),f.onComplete.call(h,n,g,r)},fail:function(e,t,r){var n=R.get.responseFromXHR(e),o=R.get.errorFromRequest(n,t,r);if("aborted"==t)return R.debug("XHR Aborted (Most likely caused by page navigation or CORS Policy)",t,r),f.onAbort.call(h,t,g,e),!0;"invalid"==t?R.debug("JSON did not pass success test. A server-side error has most likely occurred",n):"error"==t&&e!==C&&(R.debug("XHR produced a server error",t,r),(e.status<200||300<=e.status)&&r!==C&&""!==r&&R.error(c.statusMessage+r,a.url),f.onError.call(h,o,g,e)),f.errorDuration&&"aborted"!==t&&(R.debug("Adding error state"),R.set.error(),R.should.removeError()&&setTimeout(R.remove.error,f.errorDuration)),R.debug("API Request failed",o,e),f.onFailure.call(h,n,g,e)}}},create:{request:function(){return P.Deferred().always(R.event.request.complete).done(R.event.request.done).fail(R.event.request.fail)},mockedXHR:function(){var e=f.mockResponse||f.response,t=f.mockResponseAsync||f.responseAsync,r=P.Deferred().always(R.event.xhr.complete).done(R.event.xhr.done).fail(R.event.xhr.fail);return e?(e=F(e)?(R.debug("Using specified synchronous callback",e),e.call(h,n)):(R.debug("Using settings specified response",e),e),r.resolveWith(h,[e,!1,{responseText:e}])):F(t)&&(e=function(e){R.debug("Async callback returned response",e),e?r.resolveWith(h,[e,!1,{responseText:e}]):r.rejectWith(h,[{responseText:e},!1,!1])},R.debug("Using specified async response callback",t),t.call(h,n,e)),r},xhr:function(){var e=P.ajax(a).always(R.event.xhr.always).done(R.event.xhr.done).fail(R.event.xhr.fail);return R.verbose("Created server request",e,a),e}},set:{error:function(){R.verbose("Adding error state to element",b),b.addClass(d.error)},loading:function(){R.verbose("Adding loading state to element",b),b.addClass(d.loading),s=(new Date).getTime()}},remove:{error:function(){R.verbose("Removing error state from element",b),b.removeClass(d.error)},loading:function(){R.verbose("Removing loading state from element",b),b.removeClass(d.loading)}},get:{normalizedData:function(){return"string"==typeof f.data?f.data:JSON.stringify(f.data,Object.keys(f.data).sort())},responseFromXHR:function(e){return!!P.isPlainObject(e)&&(R.is.expectingJSON()?R.decode.json(e.responseText):e.responseText)},errorFromRequest:function(e,t,r){return P.isPlainObject(e)&&e.error!==C?e.error:f.error[t]!==C?f.error[t]:r},request:function(){return R.request||!1},xhr:function(){return R.xhr||!1},settings:function(){var e=f.beforeSend.call(g,f);return e&&(e.success!==C&&(R.debug("Legacy success callback detected",e),R.error(c.legacyParameters,e.success),e.onSuccess=e.success),e.failure!==C&&(R.debug("Legacy failure callback detected",e),R.error(c.legacyParameters,e.failure),e.onFailure=e.failure),e.complete!==C&&(R.debug("Legacy complete callback detected",e),R.error(c.legacyParameters,e.complete),e.onComplete=e.complete)),e===C&&R.error(c.noReturnedValue),!1===e?e:e!==C?P.extend(!0,{},e):P.extend(!0,{},f)},urlEncodedValue:function(e){var t=w.decodeURIComponent(e),r=w.encodeURIComponent(e);return t!==e?(R.debug("URL value is already encoded, avoiding double encoding",e),e):(R.verbose("Encoding value using encodeURIComponent",e,r),r)},defaultData:function(){var e={};return E(v)||(R.is.input()?e.value=g.val():R.is.form()||(e.text=g.text())),e},event:function(){return E(v)||"now"==f.on?(R.debug("API called without element, no events attached"),!1):"auto"==f.on?g.is("input")?v.oninput!==C?"input":v.onpropertychange!==C?"propertychange":"keyup":g.is("form")?"submit":"click":f.on},templatedURL:function(e){if(e=e||g.data(i.action)||f.action||!1,r=g.data(i.url)||f.url||!1)return R.debug("Using specified url",r),r;if(e){if(R.debug("Looking up url for action",e,f.api),f.api[e]===C&&!R.is.mocked())return void R.error(c.missingAction,f.action,f.api);r=f.api[e]}else R.is.form()&&(r=g.attr("action")||b.attr("action")||!1,R.debug("No url or action specified, defaulting to form action",r));return r}},abort:function(){var e=R.get.xhr();e&&"resolved"!==e.state()&&(R.debug("Cancelling API request"),e.abort())},reset:function(){R.remove.error(),R.remove.loading()},setting:function(e,t){if(R.debug("Changing setting",e,t),P.isPlainObject(e))P.extend(!0,f,e);else{if(t===C)return f[e];P.isPlainObject(f[e])?P.extend(!0,f[e],t):f[e]=t}},internal:function(e,t){if(P.isPlainObject(e))P.extend(!0,R,e);else{if(t===C)return R[e];R[e]=t}},debug:function(){!f.silent&&f.debug&&(f.performance?R.performance.log(arguments):(R.debug=Function.prototype.bind.call(console.info,console,f.name+":"),R.debug.apply(console,arguments)))},verbose:function(){!f.silent&&f.verbose&&f.debug&&(f.performance?R.performance.log(arguments):(R.verbose=Function.prototype.bind.call(console.info,console,f.name+":"),R.verbose.apply(console,arguments)))},error:function(){f.silent||(R.error=Function.prototype.bind.call(console.error,console,f.name+":"),R.error.apply(console,arguments))},performance:{log:function(e){var t,r;f.performance&&(r=(t=(new Date).getTime())-(k||t),k=t,S.push({Name:e[0],Arguments:[].slice.call(e,1)||"","Execution Time":r})),clearTimeout(R.performance.timer),R.performance.timer=setTimeout(R.performance.display,500)},display:function(){var e=f.name+":",r=0;k=!1,clearTimeout(R.performance.timer),P.each(S,function(e,t){r+=t["Execution Time"]}),e+=" "+r+"ms",A&&(e+=" '"+A+"'"),(console.group!==C||console.table!==C)&&0<S.length&&(console.groupCollapsed(e),console.table?console.table(S):P.each(S,function(e,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd()),S=[]}},invoke:function(n,e,t){var o,a,r,s=y;return e=e||O,t=t||v,"string"==typeof n&&s!==C&&(n=n.split(/[\. ]/),o=n.length-1,P.each(n,function(e,t){var r=e!=o?t+n[e+1].charAt(0).toUpperCase()+n[e+1].slice(1):n;if(P.isPlainObject(s[r])&&e!=o)s=s[r];else{if(s[r]!==C)return a=s[r],!1;{if(!P.isPlainObject(s[t])||e==o)return s[t]!==C?a=s[t]:R.error(c.method,n),!1;s=s[t]}}})),F(a)?r=a.apply(t,e):a!==C&&(r=a),Array.isArray(x)?x.push(r):x!==C?x=[x,r]:r!==C&&(x=r),a}};D?(y===C&&R.initialize(),R.invoke(T)):(y!==C&&y.invoke("destroy"),R.initialize())}),x!==C?x:this},P.api.settings={name:"API",namespace:"api",debug:!1,verbose:!1,performance:!0,api:{},cache:!0,interruptRequests:!0,on:"auto",stateContext:!1,loadingDuration:0,hideError:"auto",errorDuration:2e3,encodeParameters:!0,action:!1,url:!1,base:"",urlData:{},defaultData:!0,serializeForm:!1,throttle:0,throttleFirstRequest:!0,method:"get",data:{},dataType:"json",mockResponse:!1,mockResponseAsync:!1,response:!1,responseAsync:!1,rawResponse:!0,beforeSend:function(e){return e},beforeXHR:function(e){},onRequest:function(e,t){},onResponse:!1,onSuccess:function(e,t){},onComplete:function(e,t){},onFailure:function(e,t){},onError:function(e,t){},onAbort:function(e,t){},successTest:!1,error:{beforeSend:"The before send function has aborted the request",error:"There was an error with your request",exitConditions:"API Request Aborted. Exit conditions met",JSONParse:"JSON could not be parsed during error handling",legacyParameters:"You are using legacy API success callback names",method:"The method you called is not defined",missingAction:"API action used but no url was defined",missingURL:"No URL specified for api event",noReturnedValue:"The beforeSend callback must return a settings object, beforeSend ignored.",noStorage:"Caching responses locally requires session storage",parseError:"There was an error parsing your request",requiredParameter:"Missing a required URL parameter: ",statusMessage:"Server gave an error: ",timeout:"Your request timed out"},regExp:{required:/\{\$*[a-z0-9]+\}/gi,optional:/\{\/\$*[a-z0-9]+\}/gi,validate:/^[a-z_][a-z0-9_-]*(?:\[[a-z0-9_-]*\])*$/i,key:/[a-z0-9_-]+|(?=\[\])/gi,push:/^$/,fixed:/^\d+$/,named:/^[a-z0-9_-]+$/i},className:{loading:"loading",error:"error"},selector:{disabled:".disabled",form:"form"},metadata:{action:"action",url:"url"}}}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.9.1-beta.20+d4987bf - Breadcrumb
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Breadcrumb
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Button
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Button
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - 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.20+d4987bf - Calendar
2
+ * # Fomantic-UI 2.9.1-beta.22+6a42d01 - Calendar
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *