fomantic-ui 2.10.0-beta.0 → 2.10.0-beta.10

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 (288) hide show
  1. package/.all-contributorsrc +9 -0
  2. package/.eslintrc.js +0 -10
  3. package/.github/workflows/ci.yml +3 -3
  4. package/CONTRIBUTING.md +4 -1
  5. package/CONTRIBUTORS.md +1 -0
  6. package/FAQ.md +7 -2
  7. package/README.md +5 -9
  8. package/ROADMAP.md +4 -4
  9. package/SECURITY.md +8 -7
  10. package/changelog-setup.js +64 -70
  11. package/dist/components/accordion.css +1 -1
  12. package/dist/components/accordion.js +103 -142
  13. package/dist/components/accordion.min.css +1 -1
  14. package/dist/components/accordion.min.js +2 -2
  15. package/dist/components/ad.css +1 -1
  16. package/dist/components/ad.min.css +1 -1
  17. package/dist/components/api.js +157 -210
  18. package/dist/components/api.min.js +2 -2
  19. package/dist/components/breadcrumb.css +1 -1
  20. package/dist/components/breadcrumb.min.css +1 -1
  21. package/dist/components/button.css +1 -2
  22. package/dist/components/button.min.css +2 -2
  23. package/dist/components/calendar.css +1 -2
  24. package/dist/components/calendar.js +314 -352
  25. package/dist/components/calendar.min.css +2 -2
  26. package/dist/components/calendar.min.js +2 -2
  27. package/dist/components/card.css +1 -1
  28. package/dist/components/card.min.css +1 -1
  29. package/dist/components/checkbox.css +1 -2
  30. package/dist/components/checkbox.js +85 -135
  31. package/dist/components/checkbox.min.css +2 -2
  32. package/dist/components/checkbox.min.js +2 -2
  33. package/dist/components/comment.css +1 -1
  34. package/dist/components/comment.min.css +1 -1
  35. package/dist/components/container.css +2 -4
  36. package/dist/components/container.min.css +2 -2
  37. package/dist/components/dimmer.css +1 -11
  38. package/dist/components/dimmer.js +61 -94
  39. package/dist/components/dimmer.min.css +2 -2
  40. package/dist/components/dimmer.min.js +2 -2
  41. package/dist/components/divider.css +1 -2
  42. package/dist/components/divider.min.css +2 -2
  43. package/dist/components/dropdown.css +30 -51
  44. package/dist/components/dropdown.js +736 -1055
  45. package/dist/components/dropdown.min.css +2 -2
  46. package/dist/components/dropdown.min.js +2 -2
  47. package/dist/components/embed.css +1 -1
  48. package/dist/components/embed.js +85 -114
  49. package/dist/components/embed.min.css +1 -1
  50. package/dist/components/embed.min.js +2 -2
  51. package/dist/components/emoji.css +3809 -7617
  52. package/dist/components/emoji.min.css +2 -2
  53. package/dist/components/feed.css +1 -1
  54. package/dist/components/feed.min.css +1 -1
  55. package/dist/components/flag.css +1 -1
  56. package/dist/components/flag.min.css +1 -1
  57. package/dist/components/flyout.css +2 -3
  58. package/dist/components/flyout.js +226 -355
  59. package/dist/components/flyout.min.css +2 -2
  60. package/dist/components/flyout.min.js +2 -2
  61. package/dist/components/form.css +5 -95
  62. package/dist/components/form.js +335 -444
  63. package/dist/components/form.min.css +2 -2
  64. package/dist/components/form.min.js +2 -2
  65. package/dist/components/grid.css +2 -58
  66. package/dist/components/grid.min.css +2 -2
  67. package/dist/components/header.css +1 -1
  68. package/dist/components/header.min.css +1 -1
  69. package/dist/components/icon.css +4 -4
  70. package/dist/components/icon.min.css +2 -2
  71. package/dist/components/image.css +1 -1
  72. package/dist/components/image.min.css +1 -1
  73. package/dist/components/input.css +1 -536
  74. package/dist/components/input.min.css +2 -2
  75. package/dist/components/item.css +1 -1
  76. package/dist/components/item.min.css +1 -1
  77. package/dist/components/label.css +1 -1
  78. package/dist/components/label.min.css +1 -1
  79. package/dist/components/list.css +1 -3
  80. package/dist/components/list.min.css +2 -2
  81. package/dist/components/loader.css +1 -1
  82. package/dist/components/loader.min.css +1 -1
  83. package/dist/components/menu.css +1 -9
  84. package/dist/components/menu.min.css +2 -2
  85. package/dist/components/message.css +1 -1
  86. package/dist/components/message.min.css +1 -1
  87. package/dist/components/modal.css +5 -9
  88. package/dist/components/modal.js +261 -384
  89. package/dist/components/modal.min.css +2 -2
  90. package/dist/components/modal.min.js +2 -2
  91. package/dist/components/nag.css +1 -1
  92. package/dist/components/nag.js +68 -98
  93. package/dist/components/nag.min.css +1 -1
  94. package/dist/components/nag.min.js +2 -2
  95. package/dist/components/placeholder.css +1 -1
  96. package/dist/components/placeholder.min.css +1 -1
  97. package/dist/components/popup.css +1 -2
  98. package/dist/components/popup.js +198 -271
  99. package/dist/components/popup.min.css +2 -2
  100. package/dist/components/popup.min.js +2 -2
  101. package/dist/components/progress.css +1 -1
  102. package/dist/components/progress.js +109 -144
  103. package/dist/components/progress.min.css +1 -1
  104. package/dist/components/progress.min.js +2 -2
  105. package/dist/components/rail.css +1 -1
  106. package/dist/components/rail.min.css +1 -1
  107. package/dist/components/rating.css +1 -1
  108. package/dist/components/rating.js +91 -123
  109. package/dist/components/rating.min.css +1 -1
  110. package/dist/components/rating.min.js +2 -2
  111. package/dist/components/reset.css +1 -1
  112. package/dist/components/reset.min.css +1 -1
  113. package/dist/components/reveal.css +1 -1
  114. package/dist/components/reveal.min.css +1 -1
  115. package/dist/components/search.css +2 -9
  116. package/dist/components/search.js +277 -379
  117. package/dist/components/search.min.css +2 -2
  118. package/dist/components/search.min.js +2 -2
  119. package/dist/components/segment.css +2 -7
  120. package/dist/components/segment.min.css +2 -2
  121. package/dist/components/shape.css +1 -2
  122. package/dist/components/shape.js +158 -224
  123. package/dist/components/shape.min.css +2 -2
  124. package/dist/components/shape.min.js +2 -2
  125. package/dist/components/sidebar.css +2 -3
  126. package/dist/components/sidebar.js +124 -206
  127. package/dist/components/sidebar.min.css +2 -2
  128. package/dist/components/sidebar.min.js +2 -2
  129. package/dist/components/site.css +9 -25
  130. package/dist/components/site.js +38 -57
  131. package/dist/components/site.min.css +2 -2
  132. package/dist/components/site.min.js +2 -2
  133. package/dist/components/slider.css +1 -1
  134. package/dist/components/slider.js +246 -329
  135. package/dist/components/slider.min.css +1 -1
  136. package/dist/components/slider.min.js +2 -2
  137. package/dist/components/state.js +70 -100
  138. package/dist/components/state.min.js +2 -2
  139. package/dist/components/statistic.css +1 -1
  140. package/dist/components/statistic.min.css +1 -1
  141. package/dist/components/step.css +1 -1
  142. package/dist/components/step.min.css +1 -1
  143. package/dist/components/sticky.css +1 -1
  144. package/dist/components/sticky.js +135 -180
  145. package/dist/components/sticky.min.css +1 -1
  146. package/dist/components/sticky.min.js +2 -2
  147. package/dist/components/tab.css +1 -1
  148. package/dist/components/tab.js +176 -244
  149. package/dist/components/tab.min.css +1 -1
  150. package/dist/components/tab.min.js +2 -2
  151. package/dist/components/table.css +3 -37
  152. package/dist/components/table.min.css +2 -2
  153. package/dist/components/text.css +1 -1
  154. package/dist/components/text.min.css +1 -1
  155. package/dist/components/toast.css +1 -3
  156. package/dist/components/toast.js +109 -147
  157. package/dist/components/toast.min.css +1 -1
  158. package/dist/components/toast.min.js +2 -2
  159. package/dist/components/transition.css +1 -1
  160. package/dist/components/transition.js +91 -146
  161. package/dist/components/transition.min.css +1 -1
  162. package/dist/components/transition.min.js +2 -2
  163. package/dist/components/visibility.js +146 -224
  164. package/dist/components/visibility.min.js +2 -2
  165. package/dist/semantic.css +3906 -8720
  166. package/dist/semantic.js +4397 -6155
  167. package/dist/semantic.min.css +2 -2
  168. package/dist/semantic.min.js +2 -2
  169. package/examples/assets/show-examples.js +2 -4
  170. package/gulpfile.js +5 -7
  171. package/package.json +20 -16
  172. package/scripts/nightly-version.js +7 -10
  173. package/src/README.md +3 -3
  174. package/src/definitions/behaviors/api.js +156 -209
  175. package/src/definitions/behaviors/form.js +334 -443
  176. package/src/definitions/behaviors/state.js +69 -99
  177. package/src/definitions/behaviors/visibility.js +145 -223
  178. package/src/definitions/collections/form.less +1 -13
  179. package/src/definitions/collections/grid.less +1 -61
  180. package/src/definitions/collections/menu.less +0 -11
  181. package/src/definitions/collections/table.less +1 -35
  182. package/src/definitions/elements/input.less +1 -61
  183. package/src/definitions/elements/segment.less +0 -6
  184. package/src/definitions/globals/site.js +37 -56
  185. package/src/definitions/globals/site.less +2 -18
  186. package/src/definitions/modules/accordion.js +102 -141
  187. package/src/definitions/modules/calendar.js +313 -351
  188. package/src/definitions/modules/checkbox.js +84 -134
  189. package/src/definitions/modules/dimmer.js +60 -93
  190. package/src/definitions/modules/dimmer.less +0 -9
  191. package/src/definitions/modules/dropdown.js +735 -1054
  192. package/src/definitions/modules/dropdown.less +31 -47
  193. package/src/definitions/modules/embed.js +84 -113
  194. package/src/definitions/modules/flyout.js +225 -354
  195. package/src/definitions/modules/modal.js +260 -383
  196. package/src/definitions/modules/modal.less +1 -1
  197. package/src/definitions/modules/nag.js +67 -97
  198. package/src/definitions/modules/popup.js +197 -270
  199. package/src/definitions/modules/progress.js +108 -143
  200. package/src/definitions/modules/rating.js +90 -122
  201. package/src/definitions/modules/search.js +276 -378
  202. package/src/definitions/modules/search.less +0 -3
  203. package/src/definitions/modules/shape.js +157 -223
  204. package/src/definitions/modules/sidebar.js +123 -205
  205. package/src/definitions/modules/slider.js +245 -328
  206. package/src/definitions/modules/slider.less +1 -1
  207. package/src/definitions/modules/sticky.js +134 -179
  208. package/src/definitions/modules/tab.js +175 -243
  209. package/src/definitions/modules/toast.js +108 -146
  210. package/src/definitions/modules/toast.less +1 -1
  211. package/src/definitions/modules/transition.js +90 -145
  212. package/src/theme.less +0 -13
  213. package/src/themes/basic/elements/icon.variables +1 -1
  214. package/src/themes/default/collections/grid.variables +0 -30
  215. package/src/themes/default/collections/table.variables +1 -5
  216. package/src/themes/default/elements/icon.variables +3 -3
  217. package/src/themes/default/globals/site.variables +8 -15
  218. package/src/themes/default/globals/variation.variables +1 -2
  219. package/src/themes/default/modules/dropdown.variables +1 -0
  220. package/src/themes/default/modules/slider.variables +1 -1
  221. package/src/themes/github/elements/icon.variables +1 -1
  222. package/src/themes/material/elements/icon.variables +1 -1
  223. package/tasks/README.md +1 -1
  224. package/tasks/admin/components/create.js +89 -122
  225. package/tasks/admin/components/init.js +34 -65
  226. package/tasks/admin/components/update.js +50 -61
  227. package/tasks/admin/distributions/create.js +71 -111
  228. package/tasks/admin/distributions/init.js +32 -63
  229. package/tasks/admin/distributions/update.js +49 -57
  230. package/tasks/admin/publish.js +1 -1
  231. package/tasks/admin/register.js +14 -19
  232. package/tasks/admin/release.js +2 -2
  233. package/tasks/build/assets.js +14 -18
  234. package/tasks/build/css.js +59 -68
  235. package/tasks/build/javascript.js +48 -56
  236. package/tasks/build.js +4 -6
  237. package/tasks/check-install.js +5 -8
  238. package/tasks/clean.js +5 -7
  239. package/tasks/collections/admin.js +14 -16
  240. package/tasks/collections/build.js +6 -8
  241. package/tasks/collections/docs.js +4 -6
  242. package/tasks/collections/install.js +2 -4
  243. package/tasks/collections/rtl.js +2 -4
  244. package/tasks/collections/various.js +2 -4
  245. package/tasks/config/admin/github.js +9 -19
  246. package/tasks/config/admin/templates/README.md +2 -2
  247. package/tasks/config/admin/templates/bower.json +2 -4
  248. package/tasks/config/admin/templates/composer.json +1 -1
  249. package/tasks/config/admin/templates/css-package.js +1 -4
  250. package/tasks/config/admin/templates/less-package.js +1 -3
  251. package/tasks/config/defaults.js +0 -1
  252. package/tasks/config/npm/gulpfile.js +4 -6
  253. package/tasks/config/project/config.js +27 -35
  254. package/tasks/config/project/install.js +64 -82
  255. package/tasks/config/project/release.js +7 -9
  256. package/tasks/config/tasks.js +16 -30
  257. package/tasks/config/user.js +14 -20
  258. package/tasks/docs/build.js +26 -31
  259. package/tasks/docs/metadata.js +30 -39
  260. package/tasks/docs/serve.js +23 -27
  261. package/tasks/install.js +94 -128
  262. package/tasks/rtl/build.js +2 -4
  263. package/tasks/rtl/watch.js +3 -5
  264. package/tasks/watch.js +13 -13
  265. package/test/meteor/fonts.js +1 -2
  266. package/test/modules/module.spec.js +16 -18
  267. package/types/fomantic-ui-calendar.d.ts +1 -1
  268. package/types/fomantic-ui-dropdown.d.ts +45 -1
  269. package/types/fomantic-ui-embed.d.ts +1 -1
  270. package/types/fomantic-ui-flyout.d.ts +1 -1
  271. package/types/fomantic-ui-form.d.ts +0 -7
  272. package/types/fomantic-ui-modal.d.ts +1 -1
  273. package/types/fomantic-ui-search.d.ts +12 -6
  274. package/types/fomantic-ui-toast.d.ts +1 -1
  275. package/src/themes/basic/assets/fonts/icons.woff +0 -0
  276. package/src/themes/default/assets/fonts/Lato-Bold.woff +0 -0
  277. package/src/themes/default/assets/fonts/Lato-BoldItalic.woff +0 -0
  278. package/src/themes/default/assets/fonts/Lato-Italic.woff +0 -0
  279. package/src/themes/default/assets/fonts/Lato-Regular.woff +0 -0
  280. package/src/themes/default/assets/fonts/LatoLatin-Bold.woff +0 -0
  281. package/src/themes/default/assets/fonts/LatoLatin-BoldItalic.woff +0 -0
  282. package/src/themes/default/assets/fonts/LatoLatin-Italic.woff +0 -0
  283. package/src/themes/default/assets/fonts/LatoLatin-Regular.woff +0 -0
  284. package/src/themes/default/assets/fonts/brand-icons.woff +0 -0
  285. package/src/themes/default/assets/fonts/icons.woff +0 -0
  286. package/src/themes/default/assets/fonts/outline-icons.woff +0 -0
  287. package/src/themes/github/assets/fonts/octicons.woff +0 -0
  288. package/src/themes/material/assets/fonts/icons.woff +0 -0
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * # Fomantic-UI 2.10.0-beta.0+f24b47e - Flyout
2
+ * # Fomantic-UI 2.10.0-beta.10+3ca268e - Flyout
3
3
  * https://github.com/fomantic/Fomantic-UI/
4
4
  *
5
5
  *
@@ -20,82 +20,78 @@
20
20
  : globalThis;
21
21
 
22
22
  $.fn.flyout = function (parameters) {
23
- var
24
- $allModules = $(this),
25
- $window = $(window),
26
- $document = $(document),
27
- $html = $('html'),
28
- $head = $('head'),
29
- $body = $('body'),
30
-
31
- time = Date.now(),
32
- performance = [],
33
-
34
- query = arguments[0],
35
- methodInvoked = typeof query === 'string',
36
- queryArguments = [].slice.call(arguments, 1),
37
- contextCheck = function (context, win) {
38
- var $context;
39
- if ([window, document].indexOf(context) >= 0) {
40
- $context = $body;
41
- } else {
42
- $context = $(win.document).find(context);
43
- if ($context.length === 0) {
44
- $context = win.frameElement ? contextCheck(context, win.parent) : $body;
45
- }
23
+ let $allModules = $(this);
24
+ let $window = $(window);
25
+ let $document = $(document);
26
+ let $html = $('html');
27
+ let $head = $('head');
28
+ let $body = $('body');
29
+
30
+ let time = Date.now();
31
+ let performance = [];
32
+
33
+ let query = arguments[0];
34
+ let methodInvoked = typeof query === 'string';
35
+ let queryArguments = [].slice.call(arguments, 1);
36
+ let contextCheck = function (context, win) {
37
+ let $context;
38
+ if ([window, document].indexOf(context) >= 0) {
39
+ $context = $body;
40
+ } else {
41
+ $context = $(win.document).find(context);
42
+ if ($context.length === 0) {
43
+ $context = win.frameElement ? contextCheck(context, win.parent) : $body;
46
44
  }
45
+ }
47
46
 
48
- return $context;
49
- },
50
- returnedValue
51
- ;
47
+ return $context;
48
+ };
49
+ let returnedValue;
52
50
 
53
51
  $allModules.each(function () {
54
- var
55
- settings = $.isPlainObject(parameters)
56
- ? $.extend(true, {}, $.fn.flyout.settings, parameters)
57
- : $.extend({}, $.fn.flyout.settings),
58
-
59
- selector = settings.selector,
60
- className = settings.className,
61
- namespace = settings.namespace,
62
- fields = settings.fields,
63
- regExp = settings.regExp,
64
- error = settings.error,
65
-
66
- eventNamespace = '.' + namespace,
67
- moduleNamespace = 'module-' + namespace,
68
-
69
- $module = $(this),
70
- $context = contextCheck(settings.context, window),
71
- $closeIcon = $module.find(selector.close),
72
- $inputs,
73
- $focusedElement,
74
-
75
- $flyouts = $module.children(selector.flyout),
76
- $pusher = $context.children(selector.pusher),
77
- $style,
78
-
79
- isFlyoutComponent = $module.hasClass('flyout'),
80
-
81
- element = this,
82
- instance = isFlyoutComponent ? $module.data(moduleNamespace) : undefined,
83
-
84
- ignoreRepeatedEvents = false,
85
- isBody = $context[0] === $body[0],
86
- initialBodyMargin = '',
87
- tempBodyMargin = '',
88
- hadScrollbar = false,
89
- windowRefocused = false,
90
-
91
- elementNamespace,
92
- id,
93
- observer,
94
- observeAttributes = false,
95
- currentScroll,
96
-
97
- module
98
- ;
52
+ let settings = $.isPlainObject(parameters)
53
+ ? $.extend(true, {}, $.fn.flyout.settings, parameters)
54
+ : $.extend({}, $.fn.flyout.settings);
55
+
56
+ let selector = settings.selector;
57
+ let className = settings.className;
58
+ let namespace = settings.namespace;
59
+ let fields = settings.fields;
60
+ let regExp = settings.regExp;
61
+ let error = settings.error;
62
+
63
+ let eventNamespace = '.' + namespace;
64
+ let moduleNamespace = 'module-' + namespace;
65
+
66
+ let $module = $(this);
67
+ let $context = contextCheck(settings.context, window);
68
+ let $closeIcon = $module.find(selector.close);
69
+ let $inputs;
70
+ let $focusedElement;
71
+
72
+ let $flyouts = $module.children(selector.flyout);
73
+ let $pusher = $context.children(selector.pusher);
74
+ let $style;
75
+
76
+ let isFlyoutComponent = $module.hasClass('flyout');
77
+
78
+ let element = this;
79
+ let instance = isFlyoutComponent ? $module.data(moduleNamespace) : undefined;
80
+
81
+ let ignoreRepeatedEvents = false;
82
+ let isBody = $context[0] === $body[0];
83
+ let initialBodyMargin = '';
84
+ let tempBodyMargin = '';
85
+ let hadScrollbar = false;
86
+ let windowRefocused = false;
87
+
88
+ let elementNamespace;
89
+ let id;
90
+ let observer;
91
+ let observeAttributes = false;
92
+ let currentScroll;
93
+
94
+ let module;
99
95
 
100
96
  module = {
101
97
 
@@ -117,29 +113,27 @@
117
113
  }
118
114
  $module.addClass(settings.class);
119
115
  if (settings.title !== '') {
120
- $module.find(selector.header).html(module.helpers.escape(settings.title, settings.preserveHTML)).addClass(settings.classTitle);
116
+ $module.find(selector.header).html(module.helpers.escape(settings.title, settings)).addClass(settings.classTitle);
121
117
  }
122
118
  if (settings.content !== '') {
123
- $module.find(selector.content).html(module.helpers.escape(settings.content, settings.preserveHTML)).addClass(settings.classContent);
119
+ $module.find(selector.content).html(module.helpers.escape(settings.content, settings)).addClass(settings.classContent);
124
120
  }
125
121
  if (module.has.configActions()) {
126
- var $actions = $module.find(selector.actions).addClass(settings.classActions);
122
+ let $actions = $module.find(selector.actions).addClass(settings.classActions);
127
123
  if ($actions.length === 0) {
128
124
  $actions = $('<div/>', { class: className.actions + ' ' + (settings.classActions || '') }).appendTo($module);
129
125
  } else {
130
126
  $actions.empty();
131
127
  }
132
128
  settings.actions.forEach(function (el) {
133
- var
134
- icon = el[fields.icon]
135
- ? '<i ' + (el[fields.text] ? 'aria-hidden="true"' : '') + ' class="' + module.helpers.deQuote(el[fields.icon]) + ' icon"></i>'
136
- : '',
137
- text = module.helpers.escape(el[fields.text] || '', settings.preserveHTML),
138
- cls = module.helpers.deQuote(el[fields.class] || ''),
139
- click = el[fields.click] && isFunction(el[fields.click])
140
- ? el[fields.click]
141
- : function () {}
142
- ;
129
+ let icon = el[fields.icon]
130
+ ? '<i ' + (el[fields.text] ? 'aria-hidden="true"' : '') + ' class="' + module.helpers.escape(el[fields.icon]) + ' icon"></i>'
131
+ : '';
132
+ let text = module.helpers.escape(el[fields.text] || '', settings);
133
+ let cls = module.helpers.escape(el[fields.class] || '');
134
+ let click = el[fields.click] && isFunction(el[fields.click])
135
+ ? el[fields.click]
136
+ : function () {};
143
137
  $actions.append($('<button/>', {
144
138
  html: icon + text,
145
139
  'aria-label': (el[fields.text] || el[fields.icon] || '').replace(/<[^>]+(>|$)/g, ''),
@@ -184,13 +178,12 @@
184
178
  module.verbose('Storing instance of module', module);
185
179
  instance = module;
186
180
  $module
187
- .data(moduleNamespace, instance)
188
- ;
181
+ .data(moduleNamespace, instance);
189
182
  },
190
183
 
191
184
  create: {
192
185
  flyout: function () {
193
- module.verbose('Programmaticaly create flyout', $context);
186
+ module.verbose('Programmatically create flyout', $context);
194
187
  $module = $('<div/>', { class: className.flyout, role: 'dialog', 'aria-modal': settings.dimPage });
195
188
  if (settings.closeIcon) {
196
189
  $closeIcon = $('<i/>', {
@@ -202,12 +195,12 @@
202
195
  $module.append($closeIcon);
203
196
  }
204
197
  if (settings.title !== '') {
205
- var titleId = '_' + module.get.id() + 'title';
198
+ let titleId = '_' + module.get.id() + 'title';
206
199
  $module.attr('aria-labelledby', titleId);
207
200
  $('<div/>', { class: className.header, id: titleId }).appendTo($module);
208
201
  }
209
202
  if (settings.content !== '') {
210
- var descId = '_' + module.get.id() + 'desc';
203
+ let descId = '_' + module.get.id() + 'desc';
211
204
  $module.attr('aria-describedby', descId);
212
205
  $('<div/>', { class: className.content, id: descId }).appendTo($module);
213
206
  }
@@ -231,8 +224,7 @@
231
224
  module.verbose('Destroying previous module for', $module);
232
225
  $module
233
226
  .off(eventNamespace)
234
- .removeData(moduleNamespace)
235
- ;
227
+ .removeData(moduleNamespace);
236
228
  $closeIcon.off(elementNamespace);
237
229
  if ($inputs) {
238
230
  $inputs.off(elementNamespace);
@@ -245,9 +237,7 @@
245
237
 
246
238
  event: {
247
239
  keyboard: function (event) {
248
- var
249
- keyCode = event.which
250
- ;
240
+ let keyCode = event.which;
251
241
  if (keyCode === settings.keys.escape) {
252
242
  if (settings.closable) {
253
243
  module.debug('Escape key pressed hiding flyout');
@@ -272,10 +262,8 @@
272
262
  },
273
263
  clickaway: function (event) {
274
264
  if (settings.closable) {
275
- var
276
- clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target),
277
- clickedContext = $context.is(event.target)
278
- ;
265
+ let clickedInPusher = $pusher.find(event.target).length > 0 || $pusher.is(event.target);
266
+ let clickedContext = $context.is(event.target);
279
267
  if (clickedInPusher) {
280
268
  module.verbose('User clicked on dimmed page');
281
269
  module.hide();
@@ -290,27 +278,21 @@
290
278
  module.hide();
291
279
  },
292
280
  closeKeyUp: function (event) {
293
- var
294
- keyCode = event.which
295
- ;
281
+ let keyCode = event.which;
296
282
  if (keyCode === settings.keys.enter || keyCode === settings.keys.space) {
297
283
  module.hide();
298
284
  }
299
285
  },
300
286
  inputKeyDown: {
301
287
  first: function (event) {
302
- var
303
- keyCode = event.which
304
- ;
288
+ let keyCode = event.which;
305
289
  if (keyCode === settings.keys.tab && event.shiftKey) {
306
290
  $inputs.last().trigger('focus');
307
291
  event.preventDefault();
308
292
  }
309
293
  },
310
294
  last: function (event) {
311
- var
312
- keyCode = event.which
313
- ;
295
+ let keyCode = event.which;
314
296
  if (keyCode === settings.keys.tab && !event.shiftKey) {
315
297
  $inputs.first().trigger('focus');
316
298
  event.preventDefault();
@@ -367,24 +349,19 @@
367
349
  $module
368
350
  .on('click' + eventNamespace, selector.close, module.event.close)
369
351
  .on('click' + eventNamespace, selector.approve, module.event.approve)
370
- .on('click' + eventNamespace, selector.deny, module.event.deny)
371
- ;
352
+ .on('click' + eventNamespace, selector.deny, module.event.deny);
372
353
  $closeIcon
373
- .on('keyup' + elementNamespace, module.event.closeKeyUp)
374
- ;
354
+ .on('keyup' + elementNamespace, module.event.closeKeyUp);
375
355
  $window
376
- .on('focus' + elementNamespace, module.event.focus)
377
- ;
356
+ .on('focus' + elementNamespace, module.event.focus);
378
357
  $context
379
- .on('click' + elementNamespace, module.event.click)
380
- ;
358
+ .on('click' + elementNamespace, module.event.click);
381
359
  },
382
360
  clickaway: function () {
383
361
  module.verbose('Adding clickaway events to context', $context);
384
362
  $context
385
363
  .on('click' + elementNamespace, module.event.clickaway)
386
- .on('touchend' + elementNamespace, module.event.clickaway)
387
- ;
364
+ .on('touchend' + elementNamespace, module.event.clickaway);
388
365
  },
389
366
  scrollLock: function () {
390
367
  if (settings.scrollLock) {
@@ -398,11 +375,9 @@
398
375
  }
399
376
  module.verbose('Adding events to contain flyout scroll');
400
377
  $document
401
- .on('touchmove' + elementNamespace, module.event.touch)
402
- ;
378
+ .on('touchmove' + elementNamespace, module.event.touch);
403
379
  $module
404
- .on('scroll' + eventNamespace, module.event.containScroll)
405
- ;
380
+ .on('scroll' + eventNamespace, module.event.containScroll);
406
381
  },
407
382
  },
408
383
  unbind: {
@@ -423,19 +398,17 @@
423
398
 
424
399
  add: {
425
400
  inlineCSS: function () {
426
- var
427
- width = module.cache.width || $module.outerWidth(),
428
- height = module.cache.height || $module.outerHeight(),
429
- isRTL = module.is.rtl(),
430
- direction = module.get.direction(),
431
- distance = {
432
- left: width,
433
- right: -width,
434
- top: height,
435
- bottom: -height,
436
- },
437
- style
438
- ;
401
+ let width = module.cache.width || $module.outerWidth();
402
+ let height = module.cache.height || $module.outerHeight();
403
+ let isRTL = module.is.rtl();
404
+ let direction = module.get.direction();
405
+ let distance = {
406
+ left: width,
407
+ right: -width,
408
+ top: height,
409
+ bottom: -height,
410
+ };
411
+ let style;
439
412
 
440
413
  if (isRTL) {
441
414
  module.verbose('RTL detected, flipping widths');
@@ -460,89 +433,62 @@
460
433
  + ' }';
461
434
  }
462
435
 
463
- /* IE is only browser not to create context with transforms */
464
- /* https://www.w3.org/Bugs/Public/show_bug.cgi?id=16328 */
465
- if (module.is.ie()) {
466
- if (direction === 'left' || direction === 'right') {
467
- module.debug('Adding CSS rules for animation distance', width);
468
- style += ''
469
- + ' body.pushable > .ui.visible.' + direction + '.flyout ~ .pusher::after {'
470
- + ' transform: translate3d(' + distance[direction] + 'px, 0, 0);'
471
- + ' }';
472
- } else if (direction === 'top' || direction === 'bottom') {
473
- style += ''
474
- + ' body.pushable > .ui.visible.' + direction + '.flyout ~ .pusher::after {'
475
- + ' transform: translate3d(0, ' + distance[direction] + 'px, 0);'
476
- + ' }';
477
- }
478
- /* opposite sides visible forces content overlay */
479
- style += ''
480
- + ' body.pushable > .ui.visible.left.flyout ~ .ui.visible.right.flyout ~ .pusher::after,'
481
- + ' body.pushable > .ui.visible.right.flyout ~ .ui.visible.left.flyout ~ .pusher::after {'
482
- + ' transform: translate3d(0, 0, 0);'
483
- + ' }';
484
- }
485
436
  style += '</style>';
486
437
  $style = $(style)
487
- .appendTo($head)
488
- ;
438
+ .appendTo($head);
489
439
  module.debug('Adding sizing css to head', $style);
490
440
  },
491
441
  keyboardShortcuts: function () {
492
442
  module.verbose('Adding keyboard shortcuts');
493
443
  $document
494
- .on('keydown' + eventNamespace, module.event.keyboard)
495
- ;
444
+ .on('keydown' + eventNamespace, module.event.keyboard);
496
445
  },
497
446
  },
498
447
  observeChanges: function () {
499
- if ('MutationObserver' in window) {
500
- observer = new MutationObserver(function (mutations) {
501
- var collectNodes = function (parent) {
502
- var nodes = [];
503
- for (var c = 0, cl = parent.length; c < cl; c++) {
504
- Array.prototype.push.apply(nodes, collectNodes(parent[c].childNodes));
505
- nodes.push(parent[c]);
506
- }
448
+ observer = new MutationObserver(function (mutations) {
449
+ let collectNodes = function (parent) {
450
+ let nodes = [];
451
+ for (let c = 0, cl = parent.length; c < cl; c++) {
452
+ Array.prototype.push.apply(nodes, collectNodes(parent[c].childNodes));
453
+ nodes.push(parent[c]);
454
+ }
507
455
 
508
- return nodes;
509
- },
510
- shouldRefreshInputs = false,
511
- ignoreAutofocus = true
512
- ;
513
- mutations.every(function (mutation) {
514
- if (mutation.type === 'attributes') {
515
- if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
516
- shouldRefreshInputs = true;
517
- }
518
- } else {
519
- // mutationobserver only provides the parent nodes
520
- // so let's collect all childs as well to find nested inputs
521
- var $addedInputs = $(collectNodes(mutation.addedNodes)).filter('a[href], [tabindex], :input:enabled').filter(':visible'),
522
- $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
523
- if ($addedInputs.length > 0 || $removedInputs.length > 0) {
524
- shouldRefreshInputs = true;
525
- if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
526
- ignoreAutofocus = false;
527
- }
456
+ return nodes;
457
+ };
458
+ let shouldRefreshInputs = false;
459
+ let ignoreAutofocus = true;
460
+ mutations.every(function (mutation) {
461
+ if (mutation.type === 'attributes') {
462
+ if (observeAttributes && (mutation.attributeName === 'disabled' || $(mutation.target).find(':input').addBack(':input').filter(':visible').length > 0)) {
463
+ shouldRefreshInputs = true;
464
+ }
465
+ } else {
466
+ // mutationobserver only provides the parent nodes,
467
+ // so let's collect all childs as well to find nested inputs
468
+ let $addedInputs = $(collectNodes(mutation.addedNodes)).filter('a[href], [tabindex], :input:enabled').filter(':visible');
469
+ let $removedInputs = $(collectNodes(mutation.removedNodes)).filter('a[href], [tabindex], :input');
470
+ if ($addedInputs.length > 0 || $removedInputs.length > 0) {
471
+ shouldRefreshInputs = true;
472
+ if ($addedInputs.filter(':input').length > 0 || $removedInputs.filter(':input').length > 0) {
473
+ ignoreAutofocus = false;
528
474
  }
529
475
  }
530
-
531
- return !shouldRefreshInputs;
532
- });
533
-
534
- if (shouldRefreshInputs) {
535
- module.refreshInputs(ignoreAutofocus);
536
476
  }
477
+
478
+ return !shouldRefreshInputs;
537
479
  });
538
- observer.observe(element, {
539
- attributeFilter: ['class', 'disabled'],
540
- attributes: true,
541
- childList: true,
542
- subtree: true,
543
- });
544
- module.debug('Setting up mutation observer', observer);
545
- }
480
+
481
+ if (shouldRefreshInputs) {
482
+ module.refreshInputs(ignoreAutofocus);
483
+ }
484
+ });
485
+ observer.observe(element, {
486
+ attributeFilter: ['class', 'disabled'],
487
+ attributes: true,
488
+ childList: true,
489
+ subtree: true,
490
+ });
491
+ module.debug('Setting up mutation observer', observer);
546
492
  },
547
493
  refresh: function () {
548
494
  module.verbose('Refreshing selector cache');
@@ -560,8 +506,7 @@
560
506
  refreshInputs: function (ignoreAutofocus) {
561
507
  if ($inputs) {
562
508
  $inputs
563
- .off('keydown' + elementNamespace)
564
- ;
509
+ .off('keydown' + elementNamespace);
565
510
  }
566
511
  if (!settings.dimPage) {
567
512
  return;
@@ -576,11 +521,9 @@
576
521
  $module.removeAttr('tabindex');
577
522
  }
578
523
  $inputs.first()
579
- .on('keydown' + elementNamespace, module.event.inputKeyDown.first)
580
- ;
524
+ .on('keydown' + elementNamespace, module.event.inputKeyDown.first);
581
525
  $inputs.last()
582
- .on('keydown' + elementNamespace, module.event.inputKeyDown.last)
583
- ;
526
+ .on('keydown' + elementNamespace, module.event.inputKeyDown.last);
584
527
  if (!ignoreAutofocus && settings.autofocus && $inputs.filter(':focus').length === 0) {
585
528
  module.set.autofocus();
586
529
  }
@@ -602,8 +545,7 @@
602
545
  .children()
603
546
  .not(selector.omitted)
604
547
  .not($flyouts)
605
- .wrapAll($pusher)
606
- ;
548
+ .wrapAll($pusher);
607
549
  module.refresh();
608
550
  }
609
551
  if ($module.nextAll(selector.pusher).length === 0 || $module.nextAll(selector.pusher)[0] !== $pusher[0]) {
@@ -621,12 +563,10 @@
621
563
  },
622
564
  heights: function () {
623
565
  module.debug('Setting up heights', $module);
624
- var
625
- $header = $module.children(selector.header),
626
- $content = $module.children(selector.content),
627
- $actions = $module.children(selector.actions),
628
- newContentHeight = ($context.height() || 0) - ($header.outerHeight() || 0) - ($actions.outerHeight() || 0)
629
- ;
566
+ let $header = $module.children(selector.header);
567
+ let $content = $module.children(selector.content);
568
+ let $actions = $module.children(selector.actions);
569
+ let newContentHeight = ($context.height() || 0) - ($header.outerHeight() || 0) - ($actions.outerHeight() || 0);
630
570
  if (newContentHeight > 0) {
631
571
  $content.css('min-height', String(newContentHeight) + 'px');
632
572
  }
@@ -634,17 +574,14 @@
634
574
  },
635
575
 
636
576
  attachEvents: function (selector, event) {
637
- var
638
- $toggle = $(selector)
639
- ;
577
+ let $toggle = $(selector);
640
578
  event = isFunction(module[event])
641
579
  ? module[event]
642
580
  : module.toggle;
643
581
  if ($toggle.length > 0) {
644
582
  module.debug('Attaching flyout events to element', selector, event);
645
583
  $toggle
646
- .on('click' + eventNamespace, event)
647
- ;
584
+ .on('click' + eventNamespace, event);
648
585
  } else {
649
586
  module.error(error.notFound, selector);
650
587
  }
@@ -723,11 +660,9 @@
723
660
  },
724
661
 
725
662
  hideOthers: function (callback) {
726
- var
727
- $otherFlyouts = $flyouts.not($module).filter('.' + className.visible),
728
- flyoutCount = $otherFlyouts.length,
729
- callbackCount = 0
730
- ;
663
+ let $otherFlyouts = $flyouts.not($module).filter('.' + className.visible);
664
+ let flyoutCount = $otherFlyouts.length;
665
+ let callbackCount = 0;
731
666
  callback = callback || function () {};
732
667
  $otherFlyouts
733
668
  .flyout('hide', function () {
@@ -735,8 +670,7 @@
735
670
  if (callbackCount === flyoutCount) {
736
671
  callback();
737
672
  }
738
- })
739
- ;
673
+ });
740
674
  },
741
675
 
742
676
  toggle: function () {
@@ -749,11 +683,9 @@
749
683
  },
750
684
 
751
685
  pushPage: function (callback) {
752
- var
753
- animate,
754
- dim,
755
- transitionEnd
756
- ;
686
+ let animate;
687
+ let dim;
688
+ let transitionEnd;
757
689
  callback = isFunction(callback)
758
690
  ? callback
759
691
  : function () {};
@@ -787,10 +719,8 @@
787
719
  },
788
720
 
789
721
  pullPage: function (callback) {
790
- var
791
- animate,
792
- transitionEnd
793
- ;
722
+ let animate;
723
+ let transitionEnd;
794
724
  callback = isFunction(callback)
795
725
  ? callback
796
726
  : function () {};
@@ -856,16 +786,14 @@
856
786
  observeAttributes = state !== false;
857
787
  },
858
788
  autofocus: function () {
859
- var
860
- $autofocus = $inputs.filter('[autofocus]'),
861
- $rawInputs = $inputs.filter(':input'),
862
- $input = ($autofocus.length > 0
863
- ? $autofocus
864
- : ($rawInputs.length > 0
865
- ? $rawInputs
866
- : $module)
867
- ).first()
868
- ;
789
+ let $autofocus = $inputs.filter('[autofocus]');
790
+ let $rawInputs = $inputs.filter(':input');
791
+ let $input = ($autofocus.length > 0
792
+ ? $autofocus
793
+ : ($rawInputs.length > 0
794
+ ? $rawInputs
795
+ : $module)
796
+ ).first();
869
797
  $input.trigger('focus');
870
798
  },
871
799
  dimmerStyles: function () {
@@ -876,13 +804,11 @@
876
804
  }
877
805
  },
878
806
  bodyMargin: function () {
879
- var position = module.can.leftBodyScrollbar() ? 'left' : 'right';
807
+ let position = module.can.leftBodyScrollbar() ? 'left' : 'right';
880
808
  $context.css((isBody ? 'margin-' : 'padding-') + position, tempBodyMargin + 'px');
881
809
  $context.find(selector.bodyFixed.replace('right', position)).each(function () {
882
- var
883
- el = $(this),
884
- attribute = el.css('position') === 'fixed' ? 'padding-' + position : position
885
- ;
810
+ let el = $(this);
811
+ let attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
886
812
  el.css(attribute, 'calc(' + el.css(attribute) + ' + ' + tempBodyMargin + 'px)');
887
813
  });
888
814
  },
@@ -932,8 +858,7 @@
932
858
  keyboardShortcuts: function () {
933
859
  module.verbose('Removing keyboard shortcuts');
934
860
  $document
935
- .off('keydown' + eventNamespace)
936
- ;
861
+ .off('keydown' + eventNamespace);
937
862
  },
938
863
 
939
864
  // context
@@ -994,7 +919,7 @@
994
919
  can: {
995
920
  leftBodyScrollbar: function () {
996
921
  if (module.cache.leftBodyScrollbar === undefined) {
997
- module.cache.leftBodyScrollbar = module.is.rtl() && ((module.is.iframe && !module.is.firefox()) || module.is.safari() || module.is.edge() || module.is.ie());
922
+ module.cache.leftBodyScrollbar = module.is.rtl() && ((module.is.iframe && !module.is.firefox()) || module.is.safari());
998
923
  }
999
924
 
1000
925
  return module.cache.leftBodyScrollbar;
@@ -1003,20 +928,16 @@
1003
928
 
1004
929
  save: {
1005
930
  focus: function () {
1006
- var
1007
- $activeElement = $(document.activeElement),
1008
- inCurrentFlyout = $activeElement.closest($module).length > 0
1009
- ;
931
+ let $activeElement = $(document.activeElement);
932
+ let inCurrentFlyout = $activeElement.closest($module).length > 0;
1010
933
  if (!inCurrentFlyout) {
1011
934
  $focusedElement = $(document.activeElement).trigger('blur');
1012
935
  }
1013
936
  },
1014
937
  bodyMargin: function () {
1015
938
  initialBodyMargin = $context.css((isBody ? 'margin-' : 'padding-') + (module.can.leftBodyScrollbar() ? 'left' : 'right'));
1016
- var
1017
- bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10),
1018
- bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth
1019
- ;
939
+ let bodyMarginRightPixel = parseInt(initialBodyMargin.replace(/[^\d.]/g, ''), 10);
940
+ let bodyScrollbarWidth = isBody ? window.innerWidth - document.documentElement.clientWidth : $context[0].offsetWidth - $context[0].clientWidth;
1020
941
  tempBodyMargin = bodyMarginRightPixel + bodyScrollbarWidth;
1021
942
  },
1022
943
  },
@@ -1029,13 +950,6 @@
1029
950
 
1030
951
  return module.cache.isSafari;
1031
952
  },
1032
- edge: function () {
1033
- if (module.cache.isEdge === undefined) {
1034
- module.cache.isEdge = !!window.setImmediate && !module.is.ie();
1035
- }
1036
-
1037
- return module.cache.isEdge;
1038
- },
1039
953
  firefox: function () {
1040
954
  if (module.cache.isFirefox === undefined) {
1041
955
  module.cache.isFirefox = !!window.InstallTrigger;
@@ -1046,22 +960,9 @@
1046
960
  iframe: function () {
1047
961
  return !(self === top);
1048
962
  },
1049
- ie: function () {
1050
- if (module.cache.isIE === undefined) {
1051
- var
1052
- isIE11 = !window.ActiveXObject && 'ActiveXObject' in window,
1053
- isIE = 'ActiveXObject' in window
1054
- ;
1055
- module.cache.isIE = isIE11 || isIE;
1056
- }
1057
-
1058
- return module.cache.isIE;
1059
- },
1060
963
  mobile: function () {
1061
- var
1062
- userAgent = navigator.userAgent,
1063
- isMobile = userAgent.match(regExp.mobile)
1064
- ;
964
+ let userAgent = navigator.userAgent;
965
+ let isMobile = userAgent.match(regExp.mobile);
1065
966
  if (isMobile) {
1066
967
  module.verbose('Browser was found to be mobile', userAgent);
1067
968
 
@@ -1106,47 +1007,32 @@
1106
1007
  }
1107
1008
  },
1108
1009
  bodyMargin: function () {
1109
- var position = module.can.leftBodyScrollbar() ? 'left' : 'right';
1010
+ let position = module.can.leftBodyScrollbar() ? 'left' : 'right';
1110
1011
  $context.css((isBody ? 'margin-' : 'padding-') + position, initialBodyMargin);
1111
1012
  $context.find(selector.bodyFixed.replace('right', position)).each(function () {
1112
- var
1113
- el = $(this),
1114
- attribute = el.css('position') === 'fixed' ? 'padding-' + position : position
1115
- ;
1013
+ let el = $(this);
1014
+ let attribute = el.css('position') === 'fixed' ? 'padding-' + position : position;
1116
1015
  el.css(attribute, '');
1117
1016
  });
1118
1017
  },
1119
1018
  },
1120
1019
 
1121
1020
  helpers: {
1122
- deQuote: function (string) {
1123
- return String(string).replace(/"/g, '');
1124
- },
1125
- escape: function (string, preserveHTML) {
1126
- if (preserveHTML) {
1021
+ escape: function (string, settings) {
1022
+ if (settings !== undefined && settings.preserveHTML) {
1127
1023
  return string;
1128
1024
  }
1129
- var
1130
- badChars = /["'<>`]/g,
1131
- shouldEscape = /["&'<>`]/,
1132
- escape = {
1133
- '<': '&lt;',
1134
- '>': '&gt;',
1135
- '"': '&quot;',
1136
- "'": '&#x27;',
1137
- '`': '&#x60;',
1138
- },
1139
- escapedChar = function (chr) {
1140
- return escape[chr];
1141
- }
1142
- ;
1143
- if (shouldEscape.test(string)) {
1144
- string = string.replace(/&(?![\d#a-z]{1,12};)/gi, '&amp;');
1145
1025
 
1146
- return string.replace(badChars, escapedChar);
1147
- }
1026
+ const badChars = /["'<>]|&(?![\d#A-Za-z]{1,12};)/g;
1027
+ const escape = {
1028
+ '"': '&quot;',
1029
+ '&': '&amp;',
1030
+ "'": '&apos;',
1031
+ '<': '&lt;',
1032
+ '>': '&gt;',
1033
+ };
1148
1034
 
1149
- return string;
1035
+ return String(string).replace(badChars, (chr) => escape[chr]);
1150
1036
  },
1151
1037
  },
1152
1038
 
@@ -1201,11 +1087,9 @@
1201
1087
  },
1202
1088
  performance: {
1203
1089
  log: function (message) {
1204
- var
1205
- currentTime,
1206
- executionTime,
1207
- previousTime
1208
- ;
1090
+ let currentTime;
1091
+ let executionTime;
1092
+ let previousTime;
1209
1093
  if (settings.performance) {
1210
1094
  currentTime = Date.now();
1211
1095
  previousTime = time || currentTime;
@@ -1224,10 +1108,8 @@
1224
1108
  }, 500);
1225
1109
  },
1226
1110
  display: function () {
1227
- var
1228
- title = settings.name + ':',
1229
- totalTime = 0
1230
- ;
1111
+ let title = settings.name + ':';
1112
+ let totalTime = 0;
1231
1113
  time = false;
1232
1114
  clearTimeout(module.performance.timer);
1233
1115
  $.each(performance, function (index, data) {
@@ -1249,22 +1131,19 @@
1249
1131
  },
1250
1132
  },
1251
1133
  invoke: function (query, passedArguments, context) {
1252
- var
1253
- object = instance,
1254
- maxDepth,
1255
- found,
1256
- response
1257
- ;
1134
+ let object = instance;
1135
+ let maxDepth;
1136
+ let found;
1137
+ let response;
1258
1138
  passedArguments = passedArguments || queryArguments;
1259
1139
  context = element || context;
1260
1140
  if (typeof query === 'string' && object !== undefined) {
1261
1141
  query = query.split(/[ .]/);
1262
1142
  maxDepth = query.length - 1;
1263
1143
  $.each(query, function (depth, value) {
1264
- var camelCaseValue = depth !== maxDepth
1144
+ let camelCaseValue = depth !== maxDepth
1265
1145
  ? value + query[depth + 1].charAt(0).toUpperCase() + query[depth + 1].slice(1)
1266
- : query
1267
- ;
1146
+ : query;
1268
1147
  if ($.isPlainObject(object[camelCaseValue]) && (depth !== maxDepth)) {
1269
1148
  object = object[camelCaseValue];
1270
1149
  } else if (object[camelCaseValue] !== undefined) {
@@ -1366,7 +1245,7 @@
1366
1245
  classActions: '',
1367
1246
  closeIcon: false,
1368
1247
  actions: false,
1369
- preserveHTML: true,
1248
+ preserveHTML: false,
1370
1249
 
1371
1250
  fields: {
1372
1251
  class: 'class',
@@ -1456,7 +1335,7 @@
1456
1335
 
1457
1336
  $.fn.flyout.settings.templates = {
1458
1337
  getArguments: function (args) {
1459
- var queryArguments = [].slice.call(args);
1338
+ let queryArguments = [].slice.call(args);
1460
1339
  if ($.isPlainObject(queryArguments[0])) {
1461
1340
  return $.extend({
1462
1341
  handler: function () {},
@@ -1475,10 +1354,8 @@
1475
1354
  };
1476
1355
  },
1477
1356
  alert: function () {
1478
- var
1479
- settings = this.get.settings(),
1480
- args = settings.templates.getArguments(arguments)
1481
- ;
1357
+ let settings = this.get.settings();
1358
+ let args = settings.templates.getArguments(arguments);
1482
1359
 
1483
1360
  return {
1484
1361
  title: args.title,
@@ -1491,10 +1368,8 @@
1491
1368
  };
1492
1369
  },
1493
1370
  confirm: function () {
1494
- var
1495
- settings = this.get.settings(),
1496
- args = settings.templates.getArguments(arguments)
1497
- ;
1371
+ let settings = this.get.settings();
1372
+ let args = settings.templates.getArguments(arguments);
1498
1373
 
1499
1374
  return {
1500
1375
  title: args.title,
@@ -1515,14 +1390,12 @@
1515
1390
  };
1516
1391
  },
1517
1392
  prompt: function () {
1518
- var
1519
- $this = this,
1520
- settings = this.get.settings(),
1521
- args = settings.templates.getArguments(arguments),
1522
- input = $($.parseHTML(args.content)).filter('.ui.input')
1523
- ;
1393
+ let $this = this;
1394
+ let settings = this.get.settings();
1395
+ let args = settings.templates.getArguments(arguments);
1396
+ let input = $($.parseHTML(args.content)).filter('.ui.input');
1524
1397
  if (input.length === 0) {
1525
- args.content += '<p><div class="' + settings.className.prompt + '"><input placeholder="' + this.helpers.deQuote(args.placeholder || '') + '" type="text" value="' + this.helpers.deQuote(args.defaultValue || '') + '"></div></p>';
1398
+ args.content += '<p><div class="' + settings.className.prompt + '"><input placeholder="' + this.helpers.escape(args.placeholder || '') + '" type="text" value="' + this.helpers.escape(args.defaultValue || '') + '"></div></p>';
1526
1399
  }
1527
1400
 
1528
1401
  return {
@@ -1532,10 +1405,8 @@
1532
1405
  text: settings.text.ok,
1533
1406
  class: settings.className.ok,
1534
1407
  click: function () {
1535
- var
1536
- settings = $this.get.settings(),
1537
- inputField = $this.get.element().find(settings.selector.prompt)[0]
1538
- ;
1408
+ let settings = $this.get.settings();
1409
+ let inputField = $this.get.element().find(settings.selector.prompt)[0];
1539
1410
  args.handler($(inputField).val());
1540
1411
  },
1541
1412
  }, {