fomantic-ui 2.10.0-beta.62 → 2.10.0-beta.64

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 (209) hide show
  1. package/.eslintrc.js +0 -1
  2. package/changelog-setup.js +10 -10
  3. package/dist/components/accordion.css +1 -1
  4. package/dist/components/accordion.js +40 -41
  5. package/dist/components/accordion.min.css +1 -1
  6. package/dist/components/accordion.min.js +2 -2
  7. package/dist/components/ad.css +1 -1
  8. package/dist/components/ad.min.css +1 -1
  9. package/dist/components/api.js +57 -61
  10. package/dist/components/api.min.js +2 -2
  11. package/dist/components/breadcrumb.css +1 -1
  12. package/dist/components/breadcrumb.min.css +1 -1
  13. package/dist/components/button.css +1 -1
  14. package/dist/components/button.min.css +1 -1
  15. package/dist/components/calendar.css +1 -1
  16. package/dist/components/calendar.js +186 -187
  17. package/dist/components/calendar.min.css +1 -1
  18. package/dist/components/calendar.min.js +2 -2
  19. package/dist/components/card.css +1 -1
  20. package/dist/components/card.min.css +1 -1
  21. package/dist/components/checkbox.css +1 -1
  22. package/dist/components/checkbox.js +29 -30
  23. package/dist/components/checkbox.min.css +1 -1
  24. package/dist/components/checkbox.min.js +2 -2
  25. package/dist/components/comment.css +1 -1
  26. package/dist/components/comment.min.css +1 -1
  27. package/dist/components/container.css +1 -1
  28. package/dist/components/container.min.css +1 -1
  29. package/dist/components/dimmer.css +1 -1
  30. package/dist/components/dimmer.js +22 -23
  31. package/dist/components/dimmer.min.css +1 -1
  32. package/dist/components/dimmer.min.js +2 -2
  33. package/dist/components/divider.css +1 -1
  34. package/dist/components/divider.min.css +1 -1
  35. package/dist/components/dropdown.css +1 -1
  36. package/dist/components/dropdown.js +293 -337
  37. package/dist/components/dropdown.min.css +1 -1
  38. package/dist/components/dropdown.min.js +2 -2
  39. package/dist/components/embed.css +1 -1
  40. package/dist/components/embed.js +33 -35
  41. package/dist/components/embed.min.css +1 -1
  42. package/dist/components/embed.min.js +2 -2
  43. package/dist/components/emoji.css +1 -1
  44. package/dist/components/emoji.min.css +1 -1
  45. package/dist/components/feed.css +1 -1
  46. package/dist/components/feed.min.css +1 -1
  47. package/dist/components/flag.css +1 -1
  48. package/dist/components/flag.min.css +1 -1
  49. package/dist/components/flyout.css +1 -1
  50. package/dist/components/flyout.js +74 -81
  51. package/dist/components/flyout.min.css +1 -1
  52. package/dist/components/flyout.min.js +2 -2
  53. package/dist/components/form.css +1 -1
  54. package/dist/components/form.js +141 -146
  55. package/dist/components/form.min.css +1 -1
  56. package/dist/components/form.min.js +2 -2
  57. package/dist/components/grid.css +1 -1
  58. package/dist/components/grid.min.css +1 -1
  59. package/dist/components/header.css +1 -1
  60. package/dist/components/header.min.css +1 -1
  61. package/dist/components/icon.css +1 -1
  62. package/dist/components/icon.min.css +1 -1
  63. package/dist/components/image.css +1 -1
  64. package/dist/components/image.min.css +1 -1
  65. package/dist/components/input.css +1 -1
  66. package/dist/components/input.min.css +1 -1
  67. package/dist/components/item.css +1 -1
  68. package/dist/components/item.min.css +1 -1
  69. package/dist/components/label.css +1 -1
  70. package/dist/components/label.min.css +1 -1
  71. package/dist/components/list.css +1 -1
  72. package/dist/components/list.min.css +1 -1
  73. package/dist/components/loader.css +1 -1
  74. package/dist/components/loader.min.css +1 -1
  75. package/dist/components/menu.css +1 -1
  76. package/dist/components/menu.min.css +1 -1
  77. package/dist/components/message.css +1 -1
  78. package/dist/components/message.min.css +1 -1
  79. package/dist/components/modal.css +1 -1
  80. package/dist/components/modal.js +80 -81
  81. package/dist/components/modal.min.css +1 -1
  82. package/dist/components/modal.min.js +2 -2
  83. package/dist/components/nag.css +1 -1
  84. package/dist/components/nag.js +27 -28
  85. package/dist/components/nag.min.css +1 -1
  86. package/dist/components/nag.min.js +2 -2
  87. package/dist/components/placeholder.css +1 -1
  88. package/dist/components/placeholder.min.css +1 -1
  89. package/dist/components/popup.css +1 -1
  90. package/dist/components/popup.js +62 -72
  91. package/dist/components/popup.min.css +1 -1
  92. package/dist/components/popup.min.js +2 -2
  93. package/dist/components/progress.css +1 -1
  94. package/dist/components/progress.js +51 -55
  95. package/dist/components/progress.min.css +1 -1
  96. package/dist/components/progress.min.js +2 -2
  97. package/dist/components/rail.css +1 -1
  98. package/dist/components/rail.min.css +1 -1
  99. package/dist/components/rating.css +1 -1
  100. package/dist/components/rating.js +33 -34
  101. package/dist/components/rating.min.css +1 -1
  102. package/dist/components/rating.min.js +2 -2
  103. package/dist/components/reset.css +1 -1
  104. package/dist/components/reset.min.css +1 -1
  105. package/dist/components/reveal.css +1 -1
  106. package/dist/components/reveal.min.css +1 -1
  107. package/dist/components/search.css +1 -1
  108. package/dist/components/search.js +96 -109
  109. package/dist/components/search.min.css +1 -1
  110. package/dist/components/search.min.js +2 -2
  111. package/dist/components/segment.css +1 -1
  112. package/dist/components/segment.min.css +1 -1
  113. package/dist/components/shape.css +1 -1
  114. package/dist/components/shape.js +44 -45
  115. package/dist/components/shape.min.css +1 -1
  116. package/dist/components/shape.min.js +2 -2
  117. package/dist/components/sidebar.css +1 -1
  118. package/dist/components/sidebar.js +56 -64
  119. package/dist/components/sidebar.min.css +1 -1
  120. package/dist/components/sidebar.min.js +2 -2
  121. package/dist/components/site.css +1 -1
  122. package/dist/components/site.js +16 -17
  123. package/dist/components/site.min.css +1 -1
  124. package/dist/components/site.min.js +2 -2
  125. package/dist/components/slider.css +1 -1
  126. package/dist/components/slider.js +143 -148
  127. package/dist/components/slider.min.css +1 -1
  128. package/dist/components/slider.min.js +2 -2
  129. package/dist/components/state.js +24 -25
  130. package/dist/components/state.min.js +2 -2
  131. package/dist/components/statistic.css +1 -1
  132. package/dist/components/statistic.min.css +1 -1
  133. package/dist/components/step.css +1 -1
  134. package/dist/components/step.min.css +1 -1
  135. package/dist/components/sticky.css +1 -1
  136. package/dist/components/sticky.js +42 -43
  137. package/dist/components/sticky.min.css +1 -1
  138. package/dist/components/sticky.min.js +2 -2
  139. package/dist/components/tab.css +1 -1
  140. package/dist/components/tab.js +57 -66
  141. package/dist/components/tab.min.css +1 -1
  142. package/dist/components/tab.min.js +2 -2
  143. package/dist/components/table.css +1 -1
  144. package/dist/components/table.min.css +1 -1
  145. package/dist/components/text.css +1 -1
  146. package/dist/components/text.min.css +1 -1
  147. package/dist/components/toast.css +1 -1
  148. package/dist/components/toast.js +32 -33
  149. package/dist/components/toast.min.css +1 -1
  150. package/dist/components/toast.min.js +2 -2
  151. package/dist/components/transition.css +1 -1
  152. package/dist/components/transition.js +38 -45
  153. package/dist/components/transition.min.css +1 -1
  154. package/dist/components/transition.min.js +2 -2
  155. package/dist/components/visibility.js +76 -77
  156. package/dist/components/visibility.min.js +2 -2
  157. package/dist/semantic.css +53 -53
  158. package/dist/semantic.js +1753 -1884
  159. package/dist/semantic.min.css +1 -1
  160. package/dist/semantic.min.js +2 -2
  161. package/package.json +1 -1
  162. package/scripts/nightly-version.js +3 -3
  163. package/src/definitions/behaviors/api.js +56 -60
  164. package/src/definitions/behaviors/form.js +140 -145
  165. package/src/definitions/behaviors/state.js +23 -24
  166. package/src/definitions/behaviors/visibility.js +75 -76
  167. package/src/definitions/globals/site.js +15 -16
  168. package/src/definitions/modules/accordion.js +39 -40
  169. package/src/definitions/modules/calendar.js +185 -186
  170. package/src/definitions/modules/checkbox.js +28 -29
  171. package/src/definitions/modules/dimmer.js +21 -22
  172. package/src/definitions/modules/dropdown.js +292 -336
  173. package/src/definitions/modules/embed.js +32 -34
  174. package/src/definitions/modules/flyout.js +73 -80
  175. package/src/definitions/modules/modal.js +79 -80
  176. package/src/definitions/modules/nag.js +26 -27
  177. package/src/definitions/modules/popup.js +61 -71
  178. package/src/definitions/modules/progress.js +50 -54
  179. package/src/definitions/modules/rating.js +32 -33
  180. package/src/definitions/modules/search.js +95 -108
  181. package/src/definitions/modules/shape.js +43 -44
  182. package/src/definitions/modules/sidebar.js +55 -63
  183. package/src/definitions/modules/slider.js +142 -147
  184. package/src/definitions/modules/sticky.js +41 -42
  185. package/src/definitions/modules/tab.js +56 -65
  186. package/src/definitions/modules/toast.js +31 -32
  187. package/src/definitions/modules/transition.js +37 -44
  188. package/tasks/admin/components/create.js +11 -11
  189. package/tasks/admin/components/init.js +11 -12
  190. package/tasks/admin/components/update.js +19 -20
  191. package/tasks/admin/distributions/create.js +24 -36
  192. package/tasks/admin/distributions/init.js +11 -12
  193. package/tasks/admin/distributions/update.js +18 -19
  194. package/tasks/admin/register.js +7 -7
  195. package/tasks/build/assets.js +1 -1
  196. package/tasks/build/css.js +1 -1
  197. package/tasks/build/javascript.js +1 -1
  198. package/tasks/config/admin/github.js +1 -1
  199. package/tasks/config/admin/templates/css-package.js +1 -1
  200. package/tasks/config/admin/templates/less-package.js +1 -1
  201. package/tasks/config/project/config.js +6 -6
  202. package/tasks/config/project/install.js +12 -12
  203. package/tasks/config/project/release.js +5 -11
  204. package/tasks/config/tasks.js +5 -5
  205. package/tasks/config/user.js +1 -4
  206. package/tasks/docs/metadata.js +11 -12
  207. package/tasks/install.js +9 -9
  208. package/test/meteor/assets.js +1 -1
  209. package/test/modules/module.spec.js +18 -18
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.62+40c7533 - Nag
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Nag
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -20,16 +20,16 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.nag = function (...args) {
23
- let $allModules = $(this);
24
- let $body = $('body');
23
+ const $allModules = $(this);
24
+ const $body = $('body');
25
25
 
26
26
  let time = Date.now();
27
27
  let performance = [];
28
28
 
29
- let parameters = args[0];
30
- let methodInvoked = typeof parameters === 'string';
31
- let queryArguments = args.slice(1);
32
- let contextCheck = function (context, win) {
29
+ const parameters = args[0];
30
+ const methodInvoked = typeof parameters === 'string';
31
+ const queryArguments = args.slice(1);
32
+ const contextCheck = function (context, win) {
33
33
  let $context;
34
34
  if ([window, document].includes(context)) {
35
35
  $context = $(context);
@@ -44,26 +44,25 @@
44
44
  };
45
45
  let returnedValue;
46
46
  $allModules.each(function () {
47
- let settings = $.isPlainObject(parameters)
47
+ const settings = $.isPlainObject(parameters)
48
48
  ? $.extend(true, {}, $.fn.nag.settings, parameters)
49
49
  : $.extend({}, $.fn.nag.settings);
50
50
 
51
- let selector = settings.selector;
52
- let error = settings.error;
53
- let namespace = settings.namespace;
51
+ const selector = settings.selector;
52
+ const error = settings.error;
53
+ const namespace = settings.namespace;
54
54
 
55
- let eventNamespace = '.' + namespace;
56
- let moduleNamespace = namespace + '-module';
55
+ const eventNamespace = '.' + namespace;
56
+ const moduleNamespace = namespace + '-module';
57
57
 
58
- let $module = $(this);
58
+ const $module = $(this);
59
59
 
60
- let $context = settings.context ? contextCheck(settings.context, window) : $body;
60
+ const $context = settings.context ? contextCheck(settings.context, window) : $body;
61
61
 
62
- let element = this;
63
- let instance = $module.data(moduleNamespace);
62
+ const element = this;
63
+ const instance = $module.data(moduleNamespace);
64
64
  let storage;
65
- let module;
66
- module = {
65
+ const module = {
67
66
 
68
67
  initialize: function () {
69
68
  module.verbose('Initializing element');
@@ -193,7 +192,7 @@
193
192
  .replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g, decodeURIComponent);
194
193
 
195
194
  let cookieOptions = '';
196
- for (let option in options) {
195
+ for (const option in options) {
197
196
  if (Object.prototype.hasOwnProperty.call(options, option)) {
198
197
  cookieOptions += '; ' + option;
199
198
  if (typeof options[option] === 'string') {
@@ -204,10 +203,10 @@
204
203
  document.cookie = key + '=' + value + cookieOptions;
205
204
  },
206
205
  getItem: function (key) {
207
- let cookies = document.cookie.split('; ');
206
+ const cookies = document.cookie.split('; ');
208
207
  for (const c of cookies) {
209
- let parts = c.split('=');
210
- let foundKey = parts[0].replace(/(%[\da-f]{2})+/gi, decodeURIComponent);
208
+ const parts = c.split('=');
209
+ const foundKey = parts[0].replace(/(%[\da-f]{2})+/gi, decodeURIComponent);
211
210
  if (key === foundKey) {
212
211
  return parts[1] || '';
213
212
  }
@@ -219,7 +218,7 @@
219
218
  };
220
219
  },
221
220
  storageOptions: function () {
222
- let options = {};
221
+ const options = {};
223
222
  if (settings.expires) {
224
223
  options.expires = module.get.expirationDate(settings.expires);
225
224
  }
@@ -246,7 +245,7 @@
246
245
 
247
246
  storage: {
248
247
  set: function (key, value) {
249
- let options = module.get.storageOptions();
248
+ const options = module.get.storageOptions();
250
249
  if (storage === window.localStorage && options.expires) {
251
250
  module.debug('Storing expiration value in localStorage', key, options.expires);
252
251
  storage.setItem(key + settings.expirationKey, options.expires);
@@ -262,7 +261,7 @@
262
261
  let storedValue;
263
262
  storedValue = storage.getItem(key);
264
263
  if (storage === window.localStorage) {
265
- let expiration = storage.getItem(key + settings.expirationKey);
264
+ const expiration = storage.getItem(key + settings.expirationKey);
266
265
  if (expiration !== null && expiration !== undefined && new Date(expiration) < new Date()) {
267
266
  module.debug('Value in localStorage has expired. Deleting key', key);
268
267
  module.storage.remove(key);
@@ -276,7 +275,7 @@
276
275
  return storedValue;
277
276
  },
278
277
  remove: function (key) {
279
- let options = module.get.storageOptions();
278
+ const options = module.get.storageOptions();
280
279
  options.expires = module.get.expirationDate(-1);
281
280
  if (storage === window.localStorage) {
282
281
  storage.removeItem(key + settings.expirationKey);
@@ -382,7 +381,7 @@
382
381
  query = query.split(/[ .]/);
383
382
  maxDepth = query.length - 1;
384
383
  $.each(query, function (depth, value) {
385
- let camelCaseValue = depth !== maxDepth
384
+ const camelCaseValue = depth !== maxDepth
386
385
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
387
386
  : query;
388
387
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.62+40c7533 - Nag
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Nag
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.62+40c7533
2
+ * # Fomantic UI - 2.10.0-beta.64+bcb9c73
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(x,w,D){"use strict";w=void 0!==w&&w.Math===Math?w:globalThis,x.fn.nag=function(...e){let n=x(this),g=x("body"),p=Date.now(),m=[],f=e[0],h="string"==typeof f,b=e.slice(1),v=function(e,n){let t;return[w,D].includes(e)?t=x(e):0===(t=x(n.document).find(e)).length&&(t=n.frameElement?v(e,n.parent):g),t},y;return n.each(function(){let o=x.isPlainObject(f)?x.extend(!0,{},x.fn.nag.settings,f):x.extend({},x.fn.nag.settings),e=o.selector,l=o.error;var n=o.namespace;let t="."+n,i=n+"-module",a=x(this),r=o.context?v(o.context,w):g,c=this,d=a.data(i),s,u;u={initialize:function(){u.verbose("Initializing element"),"string"!=typeof o.value&&(o.value=JSON.stringify(o.value)),s=u.get.storage(),a.on("click"+t,e.close,u.dismiss).data(i,u),o.detachable&&a.parent()[0]!==r[0]&&a.detach().prependTo(r),0<o.displayTime&&setTimeout(function(){u.hide()},o.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),a.removeData(i).off(t)},show:function(){if(u.should.show()&&!a.is(":visible")){if(!1===o.onShow.call(c))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",o.animation.show),"fade"===o.animation.show?a.fadeIn(o.duration,o.easing,o.onVisible):a.slideDown(o.duration,o.easing,o.onVisible)}},hide:function(){if(!1===o.onHide.call(c))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",o.animation.hide),"fade"===o.animation.hide?a.fadeOut(o.duration,o.easing,o.onHidden):a.slideUp(o.duration,o.easing,o.onHidden)},dismiss:function(e){!1!==u.hide()&&o.storageMethod&&(u.debug("Dismissing nag",o.storageMethod,o.key,o.value,o.expires),u.storage.set(o.key,o.value)),e&&(e.stopImmediatePropagation(),e.preventDefault())},should:{show:function(){return o.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(o.key)!=o.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(o.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(o.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(l.expiresFormat)},storage:function(){return"localstorage"===o.storageMethod?(u.debug("Using local storage"),w.localStorage):"sessionstorage"===o.storageMethod?(u.debug("Using session storage"),w.sessionStorage):(u.debug("Using cookie"),{setItem:function(e,n,t){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),n=encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent);let o="";for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(o+="; "+i,"string"==typeof t[i]&&(o+="="+t[i].split(";")[0]));D.cookie=e+"="+n+o},getItem:function(n){for(const t of D.cookie.split("; ")){let e=t.split("=");if(n===e[0].replace(/(%[\da-f]{2})+/gi,decodeURIComponent))return e[1]||""}},removeItem:function(e,n){s.setItem(e,"",n)}})},storageOptions:function(){let e={};return o.expires&&(e.expires=u.get.expirationDate(o.expires)),o.domain&&(e.domain=o.domain),o.path&&(e.path=o.path),o.secure&&(e.secure=o.secure),o.samesite&&(e.samesite=o.samesite),e}},clear:function(){u.storage.remove(o.key)},storage:{set:function(e,n){var t=u.get.storageOptions();s===w.localStorage&&t.expires&&(u.debug("Storing expiration value in localStorage",e,t.expires),s.setItem(e+o.expirationKey,t.expires)),u.debug("Value stored",e,n);try{s.setItem(e,n,t)}catch(e){u.error(l.setItem,e)}},get:function(e){let n;var t;return n=s.getItem(e),s===w.localStorage&&null!=(t=s.getItem(e+o.expirationKey))&&new Date(t)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),n=null),n="undefined"!==n&&"null"!==n&&void 0!==n&&null!==n?n:void 0},remove:function(e){let n=u.get.storageOptions();n.expires=u.get.expirationDate(-1),s===w.localStorage&&s.removeItem(e+o.expirationKey),s.removeItem(e,n)}},setting:function(e,n){if(u.debug("Changing setting",e,n),x.isPlainObject(e))x.extend(!0,o,e);else{if(void 0===n)return o[e];x.isPlainObject(o[e])?x.extend(!0,o[e],n):o[e]=n}},internal:function(e,n){if(x.isPlainObject(e))x.extend(!0,u,e);else{if(void 0===n)return u[e];u[e]=n}},debug:function(...e){!o.silent&&o.debug&&(o.performance?u.performance.log(e):(u.debug=Function.prototype.bind.call(console.info,console,o.name+":"),u.debug.apply(console,e)))},verbose:function(...e){!o.silent&&o.verbose&&o.debug&&(o.performance?u.performance.log(e):(u.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),u.verbose.apply(console,e)))},error:function(...e){o.silent||(u.error=Function.prototype.bind.call(console.error,console,o.name+":"),u.error.apply(console,e))},performance:{log:function(e){var n,t;o.performance&&(t=(n=Date.now())-(p||n),p=n,m.push({Name:e[0],Arguments:e.slice(1),Element:c,"Execution Time":t})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(function(){u.performance.display()},500)},display:function(){var e=o.name+":";let t=0;p=!1,clearTimeout(u.performance.timer),x.each(m,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",0<m.length&&(console.groupCollapsed(e),console.table(m),console.groupEnd()),m=[]}},invoke:function(o,e=b,n=c){let i=d,a,r,t;var s;return"string"==typeof o&&void 0!==i&&(o=o.split(/[ .]/),a=o.length-1,x.each(o,function(e,n){var t=e!==a?n+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(x.isPlainObject(i[t])&&e!==a)i=i[t];else{if(void 0!==i[t])return r=i[t],!1;{if(!x.isPlainObject(i[n])||e===a)return void 0!==i[n]?r=i[n]:u.error(l.method,o),!1;i=i[n]}}})),"function"==typeof(s=r)&&"number"!=typeof s.nodeType?t=r.apply(n,e):void 0!==r&&(t=r),Array.isArray(y)?y.push(t):void 0!==y?y=[y,t]:void 0!==t&&(y=t),r}},h?(void 0===d&&u.initialize(),u.invoke(f)):(void 0!==d&&d.invoke("destroy"),u.initialize())}),void 0!==y?y:this},x.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},x.extend(x.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
11
+ !function(x,w,D){"use strict";w=void 0!==w&&w.Math===Math?w:globalThis,x.fn.nag=function(...e){const n=x(this),g=x("body");let p=Date.now(),m=[];const f=e[0],h="string"==typeof f,b=e.slice(1),v=function(e,n){let t;return[w,D].includes(e)?t=x(e):0===(t=x(n.document).find(e)).length&&(t=n.frameElement?v(e,n.parent):g),t};let y;return n.each(function(){const o=x.isPlainObject(f)?x.extend(!0,{},x.fn.nag.settings,f):x.extend({},x.fn.nag.settings),e=o.selector,c=o.error;var n=o.namespace;const t="."+n,i=n+"-module",a=x(this),r=o.context?v(o.context,w):g,l=this,d=a.data(i);let s;const u={initialize:function(){u.verbose("Initializing element"),"string"!=typeof o.value&&(o.value=JSON.stringify(o.value)),s=u.get.storage(),a.on("click"+t,e.close,u.dismiss).data(i,u),o.detachable&&a.parent()[0]!==r[0]&&a.detach().prependTo(r),0<o.displayTime&&setTimeout(function(){u.hide()},o.displayTime),u.show()},destroy:function(){u.verbose("Destroying instance"),a.removeData(i).off(t)},show:function(){if(u.should.show()&&!a.is(":visible")){if(!1===o.onShow.call(l))return u.debug("onShow callback returned false, cancelling nag animation"),!1;u.debug("Showing nag",o.animation.show),"fade"===o.animation.show?a.fadeIn(o.duration,o.easing,o.onVisible):a.slideDown(o.duration,o.easing,o.onVisible)}},hide:function(){if(!1===o.onHide.call(l))return u.debug("onHide callback returned false, cancelling nag animation"),!1;u.debug("Hiding nag",o.animation.hide),"fade"===o.animation.hide?a.fadeOut(o.duration,o.easing,o.onHidden):a.slideUp(o.duration,o.easing,o.onHidden)},dismiss:function(e){!1!==u.hide()&&o.storageMethod&&(u.debug("Dismissing nag",o.storageMethod,o.key,o.value,o.expires),u.storage.set(o.key,o.value)),e&&(e.stopImmediatePropagation(),e.preventDefault())},should:{show:function(){return o.persist?(u.debug("Persistent nag is set, can show nag"),!0):u.storage.get(o.key)!=o.value.toString()?(u.debug("Stored value is not set, can show nag",u.storage.get(o.key)),!0):(u.debug("Stored value is set, cannot show nag",u.storage.get(o.key)),!1)}},get:{expirationDate:function(e){if((e="number"==typeof e?new Date(Date.now()+864e5*e):e)instanceof Date&&e.getTime())return e.toUTCString();u.error(c.expiresFormat)},storage:function(){return"localstorage"===o.storageMethod?(u.debug("Using local storage"),w.localStorage):"sessionstorage"===o.storageMethod?(u.debug("Using session storage"),w.sessionStorage):(u.debug("Using cookie"),{setItem:function(e,n,t){e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape),n=encodeURIComponent(n).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[B-D])/g,decodeURIComponent);let o="";for(const i in t)Object.prototype.hasOwnProperty.call(t,i)&&(o+="; "+i,"string"==typeof t[i]&&(o+="="+t[i].split(";")[0]));D.cookie=e+"="+n+o},getItem:function(e){for(const n of D.cookie.split("; ")){const t=n.split("=");if(e===t[0].replace(/(%[\da-f]{2})+/gi,decodeURIComponent))return t[1]||""}},removeItem:function(e,n){s.setItem(e,"",n)}})},storageOptions:function(){const e={};return o.expires&&(e.expires=u.get.expirationDate(o.expires)),o.domain&&(e.domain=o.domain),o.path&&(e.path=o.path),o.secure&&(e.secure=o.secure),o.samesite&&(e.samesite=o.samesite),e}},clear:function(){u.storage.remove(o.key)},storage:{set:function(e,n){var t=u.get.storageOptions();s===w.localStorage&&t.expires&&(u.debug("Storing expiration value in localStorage",e,t.expires),s.setItem(e+o.expirationKey,t.expires)),u.debug("Value stored",e,n);try{s.setItem(e,n,t)}catch(e){u.error(c.setItem,e)}},get:function(e){let n;var t;return n=s.getItem(e),s===w.localStorage&&null!=(t=s.getItem(e+o.expirationKey))&&new Date(t)<new Date&&(u.debug("Value in localStorage has expired. Deleting key",e),u.storage.remove(e),n=null),n="undefined"!==n&&"null"!==n&&void 0!==n&&null!==n?n:void 0},remove:function(e){const n=u.get.storageOptions();n.expires=u.get.expirationDate(-1),s===w.localStorage&&s.removeItem(e+o.expirationKey),s.removeItem(e,n)}},setting:function(e,n){if(u.debug("Changing setting",e,n),x.isPlainObject(e))x.extend(!0,o,e);else{if(void 0===n)return o[e];x.isPlainObject(o[e])?x.extend(!0,o[e],n):o[e]=n}},internal:function(e,n){if(x.isPlainObject(e))x.extend(!0,u,e);else{if(void 0===n)return u[e];u[e]=n}},debug:function(...e){!o.silent&&o.debug&&(o.performance?u.performance.log(e):(u.debug=Function.prototype.bind.call(console.info,console,o.name+":"),u.debug.apply(console,e)))},verbose:function(...e){!o.silent&&o.verbose&&o.debug&&(o.performance?u.performance.log(e):(u.verbose=Function.prototype.bind.call(console.info,console,o.name+":"),u.verbose.apply(console,e)))},error:function(...e){o.silent||(u.error=Function.prototype.bind.call(console.error,console,o.name+":"),u.error.apply(console,e))},performance:{log:function(e){var n,t;o.performance&&(t=(n=Date.now())-(p||n),p=n,m.push({Name:e[0],Arguments:e.slice(1),Element:l,"Execution Time":t})),clearTimeout(u.performance.timer),u.performance.timer=setTimeout(function(){u.performance.display()},500)},display:function(){var e=o.name+":";let t=0;p=!1,clearTimeout(u.performance.timer),x.each(m,function(e,n){t+=n["Execution Time"]}),e+=" "+t+"ms",0<m.length&&(console.groupCollapsed(e),console.table(m),console.groupEnd()),m=[]}},invoke:function(o,e=b,n=l){let i=d,a,r,t;var s;return"string"==typeof o&&void 0!==i&&(o=o.split(/[ .]/),a=o.length-1,x.each(o,function(e,n){var t=e!==a?n+o[e+1].charAt(0).toUpperCase()+o[e+1].slice(1):o;if(x.isPlainObject(i[t])&&e!==a)i=i[t];else{if(void 0!==i[t])return r=i[t],!1;{if(!x.isPlainObject(i[n])||e===a)return void 0!==i[n]?r=i[n]:u.error(c.method,o),!1;i=i[n]}}})),"function"==typeof(s=r)&&"number"!=typeof s.nodeType?t=r.apply(n,e):void 0!==r&&(t=r),Array.isArray(y)?y.push(t):void 0!==y?y=[y,t]:void 0!==t&&(y=t),r}};h?(void 0===d&&u.initialize(),u.invoke(f)):(void 0!==d&&d.invoke("destroy"),u.initialize())}),void 0!==y?y:this},x.fn.nag.settings={name:"Nag",silent:!1,debug:!1,verbose:!1,performance:!0,namespace:"Nag",persist:!1,displayTime:0,animation:{show:"slide",hide:"slide"},context:!1,detachable:!1,expires:30,domain:!1,path:"/",secure:!1,samesite:!1,storageMethod:"cookie",key:"nag",value:"dismiss",expirationKey:"ExpirationDate",error:{method:"The method you called is not defined.",setItem:"Unexpected error while setting value",expiresFormat:'"expires" must be a number of days or a Date Object'},className:{bottom:"bottom",fixed:"fixed"},selector:{close:"> .close.icon"},duration:500,easing:"easeOutQuad",onShow:function(){},onVisible:function(){},onHide:function(){},onHidden:function(){}},x.extend(x.easing,{easeOutQuad:function(e){return 1-(1-e)*(1-e)}})}(jQuery,window,document);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.62+40c7533 - Placeholder
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Placeholder
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.62+40c7533 - Placeholder
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Placeholder
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.62+40c7533 - Popup
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Popup
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.62+40c7533 - Popup
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Popup
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -20,22 +20,22 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.popup = function (...args) {
23
- let $allModules = $(this);
24
- let $document = $(document);
25
- let $window = $(window);
26
- let $body = $('body');
23
+ const $allModules = $(this);
24
+ const $document = $(document);
25
+ const $window = $(window);
26
+ const $body = $('body');
27
27
 
28
- let clickEvent = 'ontouchstart' in document.documentElement
28
+ const clickEvent = 'ontouchstart' in document.documentElement
29
29
  ? 'touchstart'
30
30
  : 'click';
31
31
 
32
32
  let time = Date.now();
33
33
  let performance = [];
34
34
 
35
- let parameters = args[0];
36
- let methodInvoked = typeof parameters === 'string';
37
- let queryArguments = args.slice(1);
38
- let contextCheck = function (context, win) {
35
+ const parameters = args[0];
36
+ const methodInvoked = typeof parameters === 'string';
37
+ const queryArguments = args.slice(1);
38
+ const contextCheck = function (context, win) {
39
39
  let $context;
40
40
  if ([window, document].includes(context)) {
41
41
  $context = $(context);
@@ -51,24 +51,24 @@
51
51
 
52
52
  let returnedValue;
53
53
  $allModules.each(function () {
54
- let settings = $.isPlainObject(parameters)
54
+ const settings = $.isPlainObject(parameters)
55
55
  ? $.extend(true, {}, $.fn.popup.settings, parameters)
56
56
  : $.extend({}, $.fn.popup.settings);
57
57
 
58
- let selector = settings.selector;
59
- let className = settings.className;
60
- let error = settings.error;
61
- let metadata = settings.metadata;
62
- let namespace = settings.namespace;
58
+ const selector = settings.selector;
59
+ const className = settings.className;
60
+ const error = settings.error;
61
+ const metadata = settings.metadata;
62
+ const namespace = settings.namespace;
63
63
 
64
- let eventNamespace = '.' + settings.namespace;
65
- let moduleNamespace = 'module-' + namespace;
64
+ const eventNamespace = '.' + settings.namespace;
65
+ const moduleNamespace = 'module-' + namespace;
66
66
 
67
- let $module = $(this);
68
- let $context = contextCheck(settings.context, window);
69
- let $scrollContext = contextCheck(settings.scrollContext, window);
70
- let $boundary = contextCheck(settings.boundary, window);
71
- let $target = settings.target ? contextCheck(settings.target, window) : $module;
67
+ const $module = $(this);
68
+ const $context = contextCheck(settings.context, window);
69
+ const $scrollContext = contextCheck(settings.scrollContext, window);
70
+ const $boundary = contextCheck(settings.boundary, window);
71
+ const $target = settings.target ? contextCheck(settings.target, window) : $module;
72
72
 
73
73
  let $popup;
74
74
  let $offsetParent;
@@ -77,15 +77,14 @@
77
77
  let triedPositions = false;
78
78
  let openedWithTouch = false;
79
79
 
80
- let element = this;
80
+ const element = this;
81
81
  let instance = $module.data(moduleNamespace);
82
82
 
83
83
  let documentObserver;
84
84
  let elementNamespace;
85
85
  let id;
86
- let module;
87
86
 
88
- module = {
87
+ const module = {
89
88
 
90
89
  // binds events
91
90
  initialize: function () {
@@ -176,7 +175,7 @@
176
175
 
177
176
  event: {
178
177
  start: function (event) {
179
- let delay = $.isPlainObject(settings.delay)
178
+ const delay = $.isPlainObject(settings.delay)
180
179
  ? settings.delay.show
181
180
  : settings.delay;
182
181
  clearTimeout(module.hideTimer);
@@ -187,7 +186,7 @@
187
186
  }
188
187
  },
189
188
  end: function () {
190
- let delay = $.isPlainObject(settings.delay)
189
+ const delay = $.isPlainObject(settings.delay)
191
190
  ? settings.delay.hide
192
191
  : settings.delay;
193
192
  clearTimeout(module.showTimer);
@@ -219,9 +218,9 @@
219
218
  });
220
219
  },
221
220
  hideGracefully: function (event) {
222
- let $target = $(event.target);
223
- let isInDOM = document.documentElement.contains(event.target);
224
- let inPopup = $target.closest(selector.popup).length > 0;
221
+ const $target = $(event.target);
222
+ const isInDOM = document.documentElement.contains(event.target);
223
+ const inPopup = $target.closest(selector.popup).length > 0;
225
224
  // don't close on clicks inside popup
226
225
  if (event && !inPopup && isInDOM) {
227
226
  module.debug('Click occurred outside popup hiding popup');
@@ -234,11 +233,11 @@
234
233
 
235
234
  // generates popup html from metadata
236
235
  create: function () {
237
- let targetSibling = $target.next(selector.popup);
238
- let contentFallback = !settings.popup && targetSibling.length === 0 ? $module.attr('title') : false;
236
+ const targetSibling = $target.next(selector.popup);
237
+ const contentFallback = !settings.popup && targetSibling.length === 0 ? $module.attr('title') : false;
239
238
  let html = module.get.html();
240
- let title = module.get.title();
241
- let content = module.get.content(contentFallback);
239
+ const title = module.get.title();
240
+ const content = module.get.content(contentFallback);
242
241
 
243
242
  if (html || content || title) {
244
243
  module.debug('Creating pop-up html');
@@ -479,22 +478,20 @@
479
478
  return $popup.offset();
480
479
  },
481
480
  calculations: function () {
482
- let $popupOffsetParent = module.get.offsetParent($popup);
483
- let targetElement = $target[0];
484
- let isWindowEl = $boundary[0] === window;
485
- let targetOffset = $target.offset();
486
- let parentOffset = settings.inline || (settings.popup && settings.movePopup)
481
+ const $popupOffsetParent = module.get.offsetParent($popup);
482
+ const targetElement = $target[0];
483
+ const isWindowEl = $boundary[0] === window;
484
+ const targetOffset = $target.offset();
485
+ const parentOffset = settings.inline || (settings.popup && settings.movePopup)
487
486
  ? $target.offsetParent().offset()
488
487
  : { top: 0, left: 0 };
489
- let screenPosition = isWindowEl
488
+ const screenPosition = isWindowEl
490
489
  ? { top: 0, left: 0 }
491
490
  : $boundary.offset();
492
- let calculations = {};
493
- let scroll = isWindowEl
491
+ const scroll = isWindowEl
494
492
  ? { top: $window.scrollTop(), left: $window.scrollLeft() }
495
493
  : { top: 0, left: 0 };
496
- let screen;
497
- calculations = {
494
+ const calculations = {
498
495
  // element which is launching popup
499
496
  target: {
500
497
  element: $target[0],
@@ -529,7 +526,7 @@
529
526
 
530
527
  // if popup offset context is different from target, then adjust calculations
531
528
  if ($popupOffsetParent[0] !== $offsetParent[0]) {
532
- let popupOffset = $popupOffsetParent.offset();
529
+ const popupOffset = $popupOffsetParent.offset();
533
530
  calculations.target.top -= popupOffset.top;
534
531
  calculations.target.left -= popupOffset.left;
535
532
  calculations.parent.width = $popupOffsetParent.outerWidth();
@@ -554,7 +551,7 @@
554
551
  : parseInt(window.getComputedStyle(targetElement).getPropertyValue('margin-left'), 10))
555
552
  : 0;
556
553
  // calculate screen boundaries
557
- screen = calculations.screen;
554
+ const screen = calculations.screen;
558
555
  calculations.boundary = {
559
556
  top: screen.top + screen.scroll.top,
560
557
  bottom: screen.top + screen.scroll.top + screen.height,
@@ -592,12 +589,10 @@
592
589
  },
593
590
  distanceFromBoundary: function (offset, calculations = module.get.calculations()) {
594
591
  let distanceFromBoundary = {};
595
- let popup;
596
- let boundary;
597
592
 
598
593
  // shorthand
599
- popup = calculations.popup;
600
- boundary = calculations.boundary;
594
+ const popup = calculations.popup;
595
+ const boundary = calculations.boundary;
601
596
 
602
597
  if (offset) {
603
598
  distanceFromBoundary = {
@@ -612,7 +607,7 @@
612
607
  return distanceFromBoundary;
613
608
  },
614
609
  offsetParent: function ($element) {
615
- let element = $element !== undefined
610
+ const element = $element !== undefined
616
611
  ? $element[0]
617
612
  : $target[0];
618
613
  let parentNode = element.parentNode;
@@ -647,21 +642,21 @@
647
642
  };
648
643
  },
649
644
  nextPosition: function (position) {
650
- let positions = position.split(' ');
651
- let verticalPosition = positions[0];
652
- let horizontalPosition = positions[1];
653
- let opposite = {
645
+ const positions = position.split(' ');
646
+ const verticalPosition = positions[0];
647
+ const horizontalPosition = positions[1];
648
+ const opposite = {
654
649
  top: 'bottom',
655
650
  bottom: 'top',
656
651
  left: 'right',
657
652
  right: 'left',
658
653
  };
659
- let adjacent = {
654
+ const adjacent = {
660
655
  left: 'center',
661
656
  center: 'right',
662
657
  right: 'left',
663
658
  };
664
- let backup = {
659
+ const backup = {
665
660
  'top left': 'top center',
666
661
  'top center': 'top right',
667
662
  'top right': 'right center',
@@ -671,7 +666,7 @@
671
666
  'bottom left': 'left center',
672
667
  'left center': 'top left',
673
668
  };
674
- let adjacentsAvailable = verticalPosition === 'top' || verticalPosition === 'bottom';
669
+ const adjacentsAvailable = verticalPosition === 'top' || verticalPosition === 'bottom';
675
670
  let oppositeTried = false;
676
671
  let adjacentTried = false;
677
672
  let nextPosition = false;
@@ -714,20 +709,15 @@
714
709
  }
715
710
  let offset;
716
711
  let distanceAway;
717
- let target;
718
- let popup;
719
- let parent;
720
712
  let positioning;
721
- let popupOffset;
722
- let distanceFromBoundary;
723
713
 
724
714
  offset = $module.data(metadata.offset) || settings.offset;
725
715
  distanceAway = settings.distanceAway;
726
716
 
727
717
  // shorthand
728
- target = calculations.target;
729
- popup = calculations.popup;
730
- parent = calculations.parent;
718
+ const target = calculations.target;
719
+ const popup = calculations.popup;
720
+ const parent = calculations.parent;
731
721
 
732
722
  if (module.should.centerArrow(calculations)) {
733
723
  module.verbose('Adjusting offset to center arrow on small target element');
@@ -873,10 +863,10 @@
873
863
  .addClass(position);
874
864
  module.set.invisible();
875
865
 
876
- popupOffset = module.get.popupOffset();
866
+ const popupOffset = module.get.popupOffset();
877
867
 
878
868
  // see if any boundaries are surpassed with this tentative position
879
- distanceFromBoundary = module.get.distanceFromBoundary(popupOffset, calculations);
869
+ const distanceFromBoundary = module.get.distanceFromBoundary(popupOffset, calculations);
880
870
 
881
871
  if (!settings.forcePosition && module.is.offstage(distanceFromBoundary, position)) {
882
872
  module.debug('Position is outside viewport', position);
@@ -1069,7 +1059,7 @@
1069
1059
  return settings.closable;
1070
1060
  },
1071
1061
  offstage: function (distanceFromBoundary, position) {
1072
- let offstage = [];
1062
+ const offstage = [];
1073
1063
  // return boundaries that have been surpassed
1074
1064
  $.each(distanceFromBoundary, function (direction, distance) {
1075
1065
  if (distance < -settings.jitter) {
@@ -1213,7 +1203,7 @@
1213
1203
  query = query.split(/[ .]/);
1214
1204
  maxDepth = query.length - 1;
1215
1205
  $.each(query, function (depth, value) {
1216
- let camelCaseValue = depth !== maxDepth
1206
+ const camelCaseValue = depth !== maxDepth
1217
1207
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1218
1208
  : query;
1219
1209
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
@@ -1449,7 +1439,7 @@
1449
1439
  },
1450
1440
  popup: function (text) {
1451
1441
  let html = '';
1452
- let escape = $.fn.popup.settings.templates.escape;
1442
+ const escape = $.fn.popup.settings.templates.escape;
1453
1443
  if (text !== undefined) {
1454
1444
  if (text.title) {
1455
1445
  text.title = escape(text.title);
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.62+40c7533 - Popup
2
+ * # Fomantic-UI 2.10.0-beta.64+bcb9c73 - Popup
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *