@oat-sa/tao-core-ui 1.62.0 → 1.63.0

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 (215) hide show
  1. package/dist/actionbar.js +3 -3
  2. package/dist/animable/absorbable/css/absorb.css.map +1 -1
  3. package/dist/animable/pulsable/css/pulse.css.map +1 -1
  4. package/dist/autocomplete/css/autocomplete.css.map +1 -1
  5. package/dist/autocomplete.js +8 -10
  6. package/dist/badge/css/badge.css.map +1 -1
  7. package/dist/breadcrumbs/css/breadcrumbs.css.map +1 -1
  8. package/dist/breadcrumbs.js +17 -17
  9. package/dist/btngrouper.js +3 -3
  10. package/dist/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
  11. package/dist/calculator/css/calculator.css.map +1 -1
  12. package/dist/calculator.js +1 -1
  13. package/dist/cascadingComboBox.js +5 -5
  14. package/dist/ckeditor/ckConfigurator.js +9 -1
  15. package/dist/ckeditor/dtdHandler.js +4 -4
  16. package/dist/class/css/selector.css.map +1 -1
  17. package/dist/component/css/components.css.map +1 -1
  18. package/dist/component/css/windowComponent.css.map +1 -1
  19. package/dist/contextualPopup/css/contextualPopup.css.map +1 -1
  20. package/dist/contextualPopup.js +7 -7
  21. package/dist/dashboard/css/dashboard.css.map +1 -1
  22. package/dist/dashboard.js +3 -2
  23. package/dist/datalist/css/datalist.css.map +1 -1
  24. package/dist/datatable/css/datatable.css.map +1 -1
  25. package/dist/datatable/filterStrategy/single.js +2 -2
  26. package/dist/datatable.js +4 -4
  27. package/dist/dateRange/css/dateRange.css.map +1 -1
  28. package/dist/datetime/css/picker.css.map +1 -1
  29. package/dist/deleter.js +9 -9
  30. package/dist/destination/css/selector.css.map +1 -1
  31. package/dist/dialog.js +3 -5
  32. package/dist/documentViewer/css/documentViewer.css.map +1 -1
  33. package/dist/dropdown/css/dropdown.css.map +1 -1
  34. package/dist/durationer.js +6 -8
  35. package/dist/dynamicComponent/css/dynamicComponent.css.map +1 -1
  36. package/dist/dynamicComponent.js +2 -3
  37. package/dist/filesender.js +6 -8
  38. package/dist/filter.js +6 -10
  39. package/dist/form/css/dropdownForm.css.map +1 -1
  40. package/dist/form/css/form.css.map +1 -1
  41. package/dist/form/validator/css/validator.css.map +1 -1
  42. package/dist/form/widget/css/widget.css.map +1 -1
  43. package/dist/form.js +3 -3
  44. package/dist/formValidator/highlighters/highlighter.js +5 -4
  45. package/dist/formValidator/highlighters/message.js +1 -3
  46. package/dist/generis/form/css/form.css.map +1 -1
  47. package/dist/generis/validator/css/validator.css.map +1 -1
  48. package/dist/generis/widget/comboBox/comboBox.js +2 -2
  49. package/dist/generis/widget/css/widget.css.map +1 -1
  50. package/dist/generis/widget/hiddenBox/hiddenBox.js +2 -2
  51. package/dist/generis/widget/textBox/textBox.js +2 -2
  52. package/dist/groupedComboBox.js +3 -3
  53. package/dist/highlighter.js +49 -47
  54. package/dist/incrementer.js +17 -16
  55. package/dist/inplacer.js +4 -4
  56. package/dist/itemButtonList/css/item-button-list.css.map +1 -1
  57. package/dist/listbox/css/listbox.css.map +1 -1
  58. package/dist/listbox.js +1 -0
  59. package/dist/liststyler.js +1 -1
  60. package/dist/loadingButton/css/button.css.map +1 -1
  61. package/dist/lock.js +4 -4
  62. package/dist/login/login.js +4 -4
  63. package/dist/maths/calculator/css/calculator.css.map +1 -1
  64. package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +2 -2
  65. package/dist/mediaEditor/plugins/mediaDimension/helper.js +4 -4
  66. package/dist/mediaplayer/css/player.css.map +1 -1
  67. package/dist/mediaplayer/players/youtube.js +1 -1
  68. package/dist/mediaplayer/youtubeManager.js +1 -1
  69. package/dist/mediaplayer.js +3 -3
  70. package/dist/modal.js +1 -1
  71. package/dist/pageSizeSelector.js +3 -3
  72. package/dist/pagination/css/pagination.css.map +1 -1
  73. package/dist/pagination.js +5 -5
  74. package/dist/propertySelector/css/propertySelector.css.map +1 -1
  75. package/dist/propertySelector/propertySelector.js +3 -3
  76. package/dist/resource/css/selector.css.map +1 -1
  77. package/dist/resourcemgr/css/resourcemgr.css.map +1 -1
  78. package/dist/resourcemgr/fileSelector.js +6 -4
  79. package/dist/searchModal/css/advancedSearch.css.map +1 -1
  80. package/dist/searchModal/css/searchModal.css.map +1 -1
  81. package/dist/searchModal.js +16 -17
  82. package/dist/switch/css/switch.css.map +1 -1
  83. package/dist/tabs/css/tabs.css.map +1 -1
  84. package/dist/taskQueue/css/taskQueue.css.map +1 -1
  85. package/dist/taskQueue/status.js +4 -4
  86. package/dist/taskQueue/table.js +1 -1
  87. package/dist/taskQueue.js +7 -7
  88. package/dist/taskQueueButton/css/taskable.css.map +1 -1
  89. package/dist/taskQueueButton/css/treeButton.css.map +1 -1
  90. package/dist/taskQueueButton/treeButton.js +2 -2
  91. package/dist/toggler.js +4 -4
  92. package/dist/transformer.js +2 -2
  93. package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
  94. package/dist/validator/Validator.js +4 -4
  95. package/dist/validator/validators.js +3 -5
  96. package/dist/validator.js +54 -54
  97. package/dist/waitingDialog/css/waitingDialog.css.map +1 -1
  98. package/package.json +3 -2
  99. package/scss/.DS_Store +0 -0
  100. package/scss/ckeditor/.DS_Store +0 -0
  101. package/scss/ckeditor/skins/.DS_Store +0 -0
  102. package/scss/ckeditor/skins/tao/.DS_Store +0 -0
  103. package/scss/ckeditor/skins/tao/scss/.DS_Store +0 -0
  104. package/scss/ckeditor/skins/tao/scss/inc/_ck-icons.scss +1 -0
  105. package/scss/font/.DS_Store +0 -0
  106. package/scss/font/tao/tao.svg +1 -0
  107. package/scss/font/tao/tao.ttf +0 -0
  108. package/scss/font/tao/tao.woff +0 -0
  109. package/scss/inc/.DS_Store +0 -0
  110. package/scss/inc/fonts/_tao-icon-classes.scss +2 -1
  111. package/scss/inc/fonts/_tao-icon-def.scss +3 -3
  112. package/scss/inc/fonts/_tao-icon-vars.scss +2 -1
  113. package/src/actionbar.js +7 -7
  114. package/src/animable/absorbable/css/absorb.css.map +1 -1
  115. package/src/animable/pulsable/css/pulse.css.map +1 -1
  116. package/src/autocomplete/css/autocomplete.css.map +1 -1
  117. package/src/autocomplete.js +74 -76
  118. package/src/badge/css/badge.css.map +1 -1
  119. package/src/breadcrumbs/css/breadcrumbs.css.map +1 -1
  120. package/src/breadcrumbs.js +17 -17
  121. package/src/btngrouper.js +14 -14
  122. package/src/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
  123. package/src/calculator/css/calculator.css.map +1 -1
  124. package/src/calculator.js +11 -11
  125. package/src/cascadingComboBox.js +9 -9
  126. package/src/ckeditor/ckConfigurator.js +6 -0
  127. package/src/ckeditor/dtdHandler.js +15 -15
  128. package/src/class/css/selector.css.map +1 -1
  129. package/src/component/css/components.css.map +1 -1
  130. package/src/component/css/windowComponent.css.map +1 -1
  131. package/src/contextualPopup/css/contextualPopup.css.map +1 -1
  132. package/src/contextualPopup.js +11 -14
  133. package/src/css/basic.css +19 -5
  134. package/src/css/basic.css.map +1 -1
  135. package/src/dashboard/css/dashboard.css.map +1 -1
  136. package/src/dashboard.js +9 -14
  137. package/src/datalist/css/datalist.css.map +1 -1
  138. package/src/datatable/css/datatable.css.map +1 -1
  139. package/src/datatable/filterStrategy/single.js +7 -7
  140. package/src/datatable.js +6 -6
  141. package/src/dateRange/css/dateRange.css.map +1 -1
  142. package/src/datetime/css/picker.css.map +1 -1
  143. package/src/deleter.js +21 -21
  144. package/src/destination/css/selector.css.map +1 -1
  145. package/src/dialog.js +25 -25
  146. package/src/documentViewer/css/documentViewer.css.map +1 -1
  147. package/src/dropdown/css/dropdown.css.map +1 -1
  148. package/src/durationer.js +18 -20
  149. package/src/dynamicComponent/css/dynamicComponent.css.map +1 -1
  150. package/src/dynamicComponent.js +22 -23
  151. package/src/filesender.js +9 -11
  152. package/src/filter.js +8 -14
  153. package/src/form/css/dropdownForm.css.map +1 -1
  154. package/src/form/css/form.css.map +1 -1
  155. package/src/form/validator/css/validator.css.map +1 -1
  156. package/src/form/widget/css/widget.css.map +1 -1
  157. package/src/form.js +5 -11
  158. package/src/formValidator/highlighters/highlighter.js +6 -5
  159. package/src/formValidator/highlighters/message.js +1 -3
  160. package/src/generis/form/css/form.css.map +1 -1
  161. package/src/generis/validator/css/validator.css.map +1 -1
  162. package/src/generis/widget/comboBox/comboBox.js +0 -1
  163. package/src/generis/widget/css/widget.css.map +1 -1
  164. package/src/generis/widget/hiddenBox/hiddenBox.js +2 -3
  165. package/src/generis/widget/textBox/textBox.js +0 -1
  166. package/src/groupedComboBox.js +5 -5
  167. package/src/highlighter.js +99 -73
  168. package/src/incrementer.js +41 -52
  169. package/src/inplacer.js +21 -22
  170. package/src/itemButtonList/css/item-button-list.css.map +1 -1
  171. package/src/keyNavigation/navigableDomElement.js +22 -19
  172. package/src/keyNavigation/navigator.js +18 -26
  173. package/src/listbox/css/listbox.css.map +1 -1
  174. package/src/listbox.js +3 -2
  175. package/src/liststyler.js +7 -7
  176. package/src/loadingButton/css/button.css.map +1 -1
  177. package/src/lock.js +17 -19
  178. package/src/login/login.js +14 -19
  179. package/src/maths/calculator/css/calculator.css.map +1 -1
  180. package/src/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +7 -8
  181. package/src/mediaEditor/plugins/mediaDimension/helper.js +5 -4
  182. package/src/mediaplayer/css/player.css.map +1 -1
  183. package/src/mediaplayer/players/youtube.js +1 -1
  184. package/src/mediaplayer/youtubeManager.js +1 -1
  185. package/src/mediaplayer.js +3 -3
  186. package/src/modal.js +18 -18
  187. package/src/pageSizeSelector.js +7 -8
  188. package/src/pagination/css/pagination.css.map +1 -1
  189. package/src/pagination.js +14 -14
  190. package/src/propertySelector/css/propertySelector.css.map +1 -1
  191. package/src/propertySelector/propertySelector.js +3 -3
  192. package/src/resource/css/selector.css.map +1 -1
  193. package/src/resource/list.js +11 -11
  194. package/src/resource/tree.js +15 -17
  195. package/src/resourcemgr/css/resourcemgr.css.map +1 -1
  196. package/src/resourcemgr/fileSelector.js +46 -72
  197. package/src/searchModal/css/advancedSearch.css.map +1 -1
  198. package/src/searchModal/css/searchModal.css.map +1 -1
  199. package/src/searchModal.js +24 -25
  200. package/src/switch/css/switch.css.map +1 -1
  201. package/src/tabs/css/tabs.css.map +1 -1
  202. package/src/taskQueue/css/taskQueue.css.map +1 -1
  203. package/src/taskQueue/status.js +12 -12
  204. package/src/taskQueue/table.js +15 -15
  205. package/src/taskQueue.js +13 -15
  206. package/src/taskQueueButton/css/taskable.css.map +1 -1
  207. package/src/taskQueueButton/css/treeButton.css.map +1 -1
  208. package/src/taskQueueButton/treeButton.js +2 -3
  209. package/src/toggler.js +13 -13
  210. package/src/transformer.js +6 -6
  211. package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
  212. package/src/validator/Validator.js +15 -15
  213. package/src/validator/validators.js +10 -13
  214. package/src/validator.js +70 -72
  215. package/src/waitingDialog/css/waitingDialog.css.map +1 -1
@@ -227,7 +227,7 @@ var autocompleter = {
227
227
  * The complete list of plugin options can be found at: https://github.com/devbridge/jQuery-Autocomplete
228
228
  * @returns {autocompleter} this
229
229
  */
230
- init: function(element, options) {
230
+ init: function (element, options) {
231
231
  // fetch the element to handle, we need an input element
232
232
  this.$element = $(element);
233
233
  if (!this.$element.is(':input')) {
@@ -274,7 +274,7 @@ var autocompleter = {
274
274
  * The value is conserved.
275
275
  * @returns {autocompleter} this
276
276
  */
277
- destroy: function() {
277
+ destroy: function () {
278
278
  this.applyPlugin('dispose');
279
279
  if (this.$element) {
280
280
  this.$element.off('.' + NS);
@@ -292,12 +292,12 @@ var autocompleter = {
292
292
  * The complete list of plugin options can be found at: https://github.com/devbridge/jQuery-Autocomplete
293
293
  * @returns {Object} Returns the list of plugin options and their values.
294
294
  */
295
- parseOptions: function(options) {
295
+ parseOptions: function (options) {
296
296
  var self = this;
297
297
  var pluginOptions = {};
298
298
 
299
299
  // filter the options
300
- _.forOwn(options, function(value, name) {
300
+ _.forOwn(options, function (value, name) {
301
301
  var setterName = 'set' + capitalize(name);
302
302
  if (self[setterName]) {
303
303
  // a setter exists for this option
@@ -343,7 +343,7 @@ var autocompleter = {
343
343
  * The complete list of plugin options can be found at: https://github.com/devbridge/jQuery-Autocomplete
344
344
  * @returns {autocompleter} this
345
345
  */
346
- setOptions: function(options) {
346
+ setOptions: function (options) {
347
347
  this.applyPlugin('setOptions', [this.parseOptions(options)]);
348
348
  return this;
349
349
  },
@@ -354,7 +354,7 @@ var autocompleter = {
354
354
  * @param {Array} [params] A list of optional params to pass to the called method
355
355
  * @returns {*} Returns the callee result
356
356
  */
357
- applyElement: function(action, params) {
357
+ applyElement: function (action, params) {
358
358
  var $element = this.$element;
359
359
 
360
360
  if ($element) {
@@ -368,7 +368,7 @@ var autocompleter = {
368
368
  * @param {Array} [params] A list of optional params to pass to the called method
369
369
  * @returns {*} Returns the callee result
370
370
  */
371
- applyPlugin: function(action, params) {
371
+ applyPlugin: function (action, params) {
372
372
  var $element = this.$element;
373
373
  var $plugin = $element && $element[this.pluginName]();
374
374
 
@@ -380,7 +380,7 @@ var autocompleter = {
380
380
  /**
381
381
  * Shows the tooltip displayed when the server returns less records than available
382
382
  */
383
- showTooltipTooMany: function() {
383
+ showTooltipTooMany: function () {
384
384
  if (this.$element) {
385
385
  this.tooltip.show();
386
386
  }
@@ -389,7 +389,7 @@ var autocompleter = {
389
389
  /**
390
390
  * Hides the tooltip displayed when the server returns less records than available
391
391
  */
392
- hideTooltipTooMany: function() {
392
+ hideTooltipTooMany: function () {
393
393
  if (this.$element) {
394
394
  this.tooltip.hide();
395
395
  }
@@ -401,7 +401,7 @@ var autocompleter = {
401
401
  * @param {Array} [params] A list of optional parameters
402
402
  * @returns {*} Returns the call result
403
403
  */
404
- trigger: function(eventName, params) {
404
+ trigger: function (eventName, params) {
405
405
  return this.applyElement('triggerHandler', [adjustEventName(eventName), params]);
406
406
  },
407
407
 
@@ -411,7 +411,7 @@ var autocompleter = {
411
411
  * @param {Function } callback The function called back when the event occurs
412
412
  * @returns {autocompleter} this
413
413
  */
414
- on: function(eventName, callback) {
414
+ on: function (eventName, callback) {
415
415
  this.applyElement('on', [adjustEventName(eventName), callback]);
416
416
  return this;
417
417
  },
@@ -422,7 +422,7 @@ var autocompleter = {
422
422
  * @param {Function } [callback] The callback provided at install
423
423
  * @returns {autocompleter} this
424
424
  */
425
- off: function(eventName, callback) {
425
+ off: function (eventName, callback) {
426
426
  this.applyElement('off', [adjustEventName(eventName), callback]);
427
427
  return this;
428
428
  },
@@ -431,7 +431,7 @@ var autocompleter = {
431
431
  * Gets the nested element on which the component is installed.
432
432
  * @returns {*|jQuery|HTMLElement}
433
433
  */
434
- getElement: function() {
434
+ getElement: function () {
435
435
  return this.$element;
436
436
  },
437
437
 
@@ -439,7 +439,7 @@ var autocompleter = {
439
439
  * Checks if the server can provide more suggestions than displayed for the current query
440
440
  * @returns {Boolean}
441
441
  */
442
- hasTooManySuggestions: function() {
442
+ hasTooManySuggestions: function () {
443
443
  return !!this.tooManySuggestions;
444
444
  },
445
445
 
@@ -447,7 +447,7 @@ var autocompleter = {
447
447
  * Gets the field value.
448
448
  * @returns {String}
449
449
  */
450
- getValue: function() {
450
+ getValue: function () {
451
451
  return this.value;
452
452
  },
453
453
 
@@ -457,7 +457,7 @@ var autocompleter = {
457
457
  * @param {String} label The label to display inside the field
458
458
  * @returns {autocompleter} this
459
459
  */
460
- setValue: function(value, label) {
460
+ setValue: function (value, label) {
461
461
  this.value = value;
462
462
  if (!_.isUndefined(label)) {
463
463
  this.setLabel(label);
@@ -469,7 +469,7 @@ var autocompleter = {
469
469
  * Gets the displayed label.
470
470
  * @returns {String}
471
471
  */
472
- getLabel: function() {
472
+ getLabel: function () {
473
473
  return this.label;
474
474
  },
475
475
 
@@ -478,7 +478,7 @@ var autocompleter = {
478
478
  * @param {String} label The label to display inside the field
479
479
  * @returns {autocompleter} this
480
480
  */
481
- setLabel: function(label) {
481
+ setLabel: function (label) {
482
482
  this.label = label;
483
483
  if (this.$element) {
484
484
  this.$element.val(label);
@@ -490,7 +490,7 @@ var autocompleter = {
490
490
  * Gets the URI of the target ontology.
491
491
  * @returns {String}
492
492
  */
493
- getOntology: function() {
493
+ getOntology: function () {
494
494
  return this.ontology;
495
495
  },
496
496
 
@@ -499,7 +499,7 @@ var autocompleter = {
499
499
  * @param {String} ontology
500
500
  * @returns {autocompleter} this
501
501
  */
502
- setOntology: function(ontology) {
502
+ setOntology: function (ontology) {
503
503
  this.ontology = ontology;
504
504
  return this;
505
505
  },
@@ -508,7 +508,7 @@ var autocompleter = {
508
508
  * Gets the name of the field containing the value within the received data.
509
509
  * @returns {String}
510
510
  */
511
- getValueField: function() {
511
+ getValueField: function () {
512
512
  return this.valueField;
513
513
  },
514
514
 
@@ -517,7 +517,7 @@ var autocompleter = {
517
517
  * @param {String} valueField
518
518
  * @returns {autocompleter} this
519
519
  */
520
- setValueField: function(valueField) {
520
+ setValueField: function (valueField) {
521
521
  this.valueField = valueField;
522
522
  return this;
523
523
  },
@@ -526,7 +526,7 @@ var autocompleter = {
526
526
  * Gets the name of the field containing the label within the received data.
527
527
  * @returns {String}
528
528
  */
529
- getLabelField: function() {
529
+ getLabelField: function () {
530
530
  return this.labelField;
531
531
  },
532
532
 
@@ -535,7 +535,7 @@ var autocompleter = {
535
535
  * @param {String} labelField
536
536
  * @returns {autocompleter} this
537
537
  */
538
- setLabelField: function(labelField) {
538
+ setLabelField: function (labelField) {
539
539
  this.labelField = labelField;
540
540
  return this;
541
541
  },
@@ -548,7 +548,7 @@ var autocompleter = {
548
548
  * has to take care of the selected value and to add it in its own list.
549
549
  * @returns {Boolean}
550
550
  */
551
- getIsProvider: function() {
551
+ getIsProvider: function () {
552
552
  return this.isProvider;
553
553
  },
554
554
 
@@ -561,7 +561,7 @@ var autocompleter = {
561
561
  * @param {Boolean} isProvider
562
562
  * @returns {autocompleter} this
563
563
  */
564
- setIsProvider: function(isProvider) {
564
+ setIsProvider: function (isProvider) {
565
565
  this.isProvider = toBoolean(isProvider);
566
566
  return this;
567
567
  },
@@ -571,7 +571,7 @@ var autocompleter = {
571
571
  * When set to true the component prevents auto submit when the user hit enter on the text box.
572
572
  * @returns {Boolean}
573
573
  */
574
- getPreventSubmit: function() {
574
+ getPreventSubmit: function () {
575
575
  return this.preventSubmit;
576
576
  },
577
577
 
@@ -581,7 +581,7 @@ var autocompleter = {
581
581
  * @param {Boolean} preventSubmit
582
582
  * @returns {autocompleter} this
583
583
  */
584
- setPreventSubmit: function(preventSubmit) {
584
+ setPreventSubmit: function (preventSubmit) {
585
585
  this.preventSubmit = toBoolean(preventSubmit);
586
586
  return this;
587
587
  },
@@ -591,7 +591,7 @@ var autocompleter = {
591
591
  * When provided, all the search params are wrapped under the same root.
592
592
  * @returns {String}
593
593
  */
594
- getParamsRoot: function() {
594
+ getParamsRoot: function () {
595
595
  return this.paramsRoot;
596
596
  },
597
597
 
@@ -601,7 +601,7 @@ var autocompleter = {
601
601
  * @param {String} paramsRoot
602
602
  * @returns {autocompleter} this
603
603
  */
604
- setParamsRoot: function(paramsRoot) {
604
+ setParamsRoot: function (paramsRoot) {
605
605
  this.paramsRoot = paramsRoot;
606
606
  return this;
607
607
  },
@@ -610,7 +610,7 @@ var autocompleter = {
610
610
  * Gets the list of extra params to be sent with the query.
611
611
  * @returns {Object}
612
612
  */
613
- getParams: function() {
613
+ getParams: function () {
614
614
  var params = _.merge({}, this.params || {});
615
615
  var searchParams = params;
616
616
 
@@ -621,12 +621,12 @@ var autocompleter = {
621
621
 
622
622
  if (this.ontology) {
623
623
  if (!Array.isArray(this.ontologyParam)) {
624
- searchParams[this.ontologyParam] = this.ontology;
624
+ searchParams[this.ontologyParam] = this.ontology;
625
625
  } else {
626
- this.ontologyParam.forEach(p => {
627
- searchParams[p] = this.ontology;
628
- })
629
- }
626
+ this.ontologyParam.forEach(p => {
627
+ searchParams[p] = this.ontology;
628
+ });
629
+ }
630
630
  }
631
631
 
632
632
  return params;
@@ -637,7 +637,7 @@ var autocompleter = {
637
637
  * @param {Object} params
638
638
  * @returns {autocompleter} this
639
639
  */
640
- setParams: function(params) {
640
+ setParams: function (params) {
641
641
  this.params = params;
642
642
  return this;
643
643
  },
@@ -647,7 +647,7 @@ var autocompleter = {
647
647
  * If paramsRoot has been defined, the param name will be wrapped.
648
648
  * @returns {String}
649
649
  */
650
- getQueryParam: function() {
650
+ getQueryParam: function () {
651
651
  return this.adjustParam(this.queryParam);
652
652
  },
653
653
 
@@ -656,7 +656,7 @@ var autocompleter = {
656
656
  * @param {String} queryParam
657
657
  * @returns {autocompleter} this
658
658
  */
659
- setQueryParam: function(queryParam) {
659
+ setQueryParam: function (queryParam) {
660
660
  this.queryParam = queryParam;
661
661
  return this;
662
662
  },
@@ -666,7 +666,7 @@ var autocompleter = {
666
666
  * If paramsRoot has been defined, the param name will be wrapped.
667
667
  * @returns {String}
668
668
  */
669
- getOntologyParam: function() {
669
+ getOntologyParam: function () {
670
670
  const p = Array.isArray(this.ontologyParam) ? this.ontologyParam[0] : this.ontologyParam;
671
671
  return this.adjustParam(p);
672
672
  },
@@ -676,7 +676,7 @@ var autocompleter = {
676
676
  * @param {String} ontologyParam
677
677
  * @returns {autocompleter} this
678
678
  */
679
- setOntologyParam: function(ontologyParam) {
679
+ setOntologyParam: function (ontologyParam) {
680
680
  this.ontologyParam = ontologyParam;
681
681
  return this;
682
682
  },
@@ -685,7 +685,7 @@ var autocompleter = {
685
685
  * Gets the URL to data source
686
686
  * @returns {String}
687
687
  */
688
- getUrl: function() {
688
+ getUrl: function () {
689
689
  return this.url;
690
690
  },
691
691
 
@@ -694,7 +694,7 @@ var autocompleter = {
694
694
  * @param {String} url
695
695
  * @returns {autocompleter} this
696
696
  */
697
- setUrl: function(url) {
697
+ setUrl: function (url) {
698
698
  this.url = url;
699
699
  return this;
700
700
  },
@@ -703,7 +703,7 @@ var autocompleter = {
703
703
  * Gets the request method. Can be either GET or POST, default to GET.
704
704
  * @returns {String}
705
705
  */
706
- getType: function() {
706
+ getType: function () {
707
707
  return this.type || 'GET';
708
708
  },
709
709
 
@@ -712,7 +712,7 @@ var autocompleter = {
712
712
  * @param {String} type
713
713
  * @returns {autocompleter} this
714
714
  */
715
- setType: function(type) {
715
+ setType: function (type) {
716
716
  this.type = type;
717
717
  return this;
718
718
  },
@@ -721,7 +721,7 @@ var autocompleter = {
721
721
  * Gets the number of miliseconds to defer ajax request.
722
722
  * @returns {number}
723
723
  */
724
- getDelay: function() {
724
+ getDelay: function () {
725
725
  return this.delay;
726
726
  },
727
727
 
@@ -730,7 +730,7 @@ var autocompleter = {
730
730
  * @param {Number} delay
731
731
  * @returns {autocompleter}
732
732
  */
733
- setDelay: function(delay) {
733
+ setDelay: function (delay) {
734
734
  this.delay = Math.max(0, Number(delay));
735
735
  return this;
736
736
  },
@@ -739,7 +739,7 @@ var autocompleter = {
739
739
  * Gets the minimum number of characters required to trigger the ajax request.
740
740
  * @returns {number}
741
741
  */
742
- getMinChars: function() {
742
+ getMinChars: function () {
743
743
  return this.minChars;
744
744
  },
745
745
 
@@ -748,7 +748,7 @@ var autocompleter = {
748
748
  * @param {Number} minChars
749
749
  * @returns {autocompleter} this
750
750
  */
751
- setMinChars: function(minChars) {
751
+ setMinChars: function (minChars) {
752
752
  this.minChars = Math.max(1, Number(minChars));
753
753
  return this;
754
754
  },
@@ -757,7 +757,7 @@ var autocompleter = {
757
757
  * Activates the component if it was deactivated before.
758
758
  * @returns {autocompleter} this
759
759
  */
760
- enable: function() {
760
+ enable: function () {
761
761
  this.applyPlugin('enable');
762
762
  return this;
763
763
  },
@@ -766,7 +766,7 @@ var autocompleter = {
766
766
  * Deactivates the component.
767
767
  * @returns {autocompleter} this
768
768
  */
769
- disable: function() {
769
+ disable: function () {
770
770
  this.applyPlugin('disable');
771
771
  return this;
772
772
  },
@@ -775,7 +775,7 @@ var autocompleter = {
775
775
  * Hides suggestions.
776
776
  * @returns {autocompleter} this
777
777
  */
778
- hide: function() {
778
+ hide: function () {
779
779
  this.applyPlugin('hide');
780
780
  return this;
781
781
  },
@@ -784,7 +784,7 @@ var autocompleter = {
784
784
  * Clears suggestion cache and current suggestions.
785
785
  * @returns {autocompleter} this
786
786
  */
787
- clear: function() {
787
+ clear: function () {
788
788
  this.tooManySuggestions = false;
789
789
  this.applyPlugin('clear');
790
790
  return this;
@@ -794,7 +794,7 @@ var autocompleter = {
794
794
  * Clears suggestion cache.
795
795
  * @returns {autocompleter} this
796
796
  */
797
- clearCache: function() {
797
+ clearCache: function () {
798
798
  this.applyPlugin('clearCache');
799
799
  return this;
800
800
  },
@@ -806,7 +806,7 @@ var autocompleter = {
806
806
  * - hides suggestions.
807
807
  * @returns {autocompleter} this
808
808
  */
809
- reset: function() {
809
+ reset: function () {
810
810
  this.setValue(null, '');
811
811
  this.clear();
812
812
  this.applyPlugin('hide');
@@ -818,7 +818,7 @@ var autocompleter = {
818
818
  * @param {Event} event
819
819
  * @private
820
820
  */
821
- _onKeyEvent: function(event) {
821
+ _onKeyEvent: function (event) {
822
822
  // prevent auto submit when the option preventSubmit is enabled
823
823
  if (this.preventSubmit && 13 === event.which) {
824
824
  event.preventDefault();
@@ -830,7 +830,7 @@ var autocompleter = {
830
830
  * @param {Object} suggestion
831
831
  * @private
832
832
  */
833
- _onSelect: function(suggestion) {
833
+ _onSelect: function (suggestion) {
834
834
  var value = suggestion && suggestion.data;
835
835
  var label = suggestion && suggestion.value;
836
836
 
@@ -854,7 +854,7 @@ var autocompleter = {
854
854
  * @param {Object} params The list of params which will be bound the query
855
855
  * @private
856
856
  */
857
- _onSearchStart: function(params) {
857
+ _onSearchStart: function (params) {
858
858
  var queryParam = this.getQueryParam();
859
859
  var query;
860
860
 
@@ -877,7 +877,7 @@ var autocompleter = {
877
877
  * @param {Object} suggestions An array containing the results.
878
878
  * @private
879
879
  */
880
- _onSearchComplete: function(query, suggestions) {
880
+ _onSearchComplete: function (query, suggestions) {
881
881
  // clear cache when the query returns no records :
882
882
  // this avoids to have to reload the page when the server has a temporary failure
883
883
  if (!suggestions || !suggestions.length) {
@@ -895,7 +895,7 @@ var autocompleter = {
895
895
  * @param {Exception} errorThrown
896
896
  * @private
897
897
  */
898
- _onSearchError: function(query, jqXHR, textStatus, errorThrown) {
898
+ _onSearchError: function (query, jqXHR, textStatus, errorThrown) {
899
899
  return this.trigger('searchError', [query, jqXHR, textStatus, errorThrown, this]);
900
900
  },
901
901
 
@@ -903,7 +903,7 @@ var autocompleter = {
903
903
  * Fired when input is altered after selection has been made.
904
904
  * @private
905
905
  */
906
- _onInvalidateSelection: function() {
906
+ _onInvalidateSelection: function () {
907
907
  return this.trigger('invalidateSelection', [this]);
908
908
  },
909
909
 
@@ -913,16 +913,15 @@ var autocompleter = {
913
913
  * @param {jQuery} $container
914
914
  * @private
915
915
  */
916
- _onBeforeRender: function($container) {
916
+ _onBeforeRender: function ($container) {
917
917
  this.trigger('beforeRender', [$container, this]);
918
918
  },
919
919
 
920
920
  /**
921
921
  * Fired when the input element has the focus
922
- * @param {Event} event
923
922
  * @private
924
923
  */
925
- _onFocus: function(event) {
924
+ _onFocus: function () {
926
925
  if (this.hasTooManySuggestions()) {
927
926
  this.showTooltipTooMany();
928
927
  }
@@ -930,10 +929,9 @@ var autocompleter = {
930
929
 
931
930
  /**
932
931
  * Fired when the input element lose the focus
933
- * @param {Event} event
934
932
  * @private
935
933
  */
936
- _onBlur: function(event) {
934
+ _onBlur: function () {
937
935
  this.hideTooltipTooMany();
938
936
  },
939
937
 
@@ -942,7 +940,7 @@ var autocompleter = {
942
940
  * @param response
943
941
  * @returns {{suggestions: Array}}
944
942
  */
945
- _transformResult: function(response) {
943
+ _transformResult: function (response) {
946
944
  var self = this;
947
945
  var results = {
948
946
  suggestions: []
@@ -952,7 +950,7 @@ var autocompleter = {
952
950
  response = JSON.parse(response);
953
951
  }
954
952
  if (response.records) {
955
- results.suggestions = _.map(response.data, function(dataItem) {
953
+ results.suggestions = _.map(response.data, function (dataItem) {
956
954
  return {
957
955
  value: dataItem[self.labelField],
958
956
  data: dataItem[self.valueField]
@@ -976,7 +974,7 @@ var autocompleter = {
976
974
  * @param {String} param
977
975
  * @returns {String}
978
976
  */
979
- adjustParam: function(param) {
977
+ adjustParam: function (param) {
980
978
  if (this.paramsRoot) {
981
979
  param = this.paramsRoot + '[' + param + ']';
982
980
  }
@@ -989,8 +987,8 @@ var autocompleter = {
989
987
  * @param {string} eventName
990
988
  * @returns {string}
991
989
  */
992
- var adjustEventName = function(eventName) {
993
- var names = _(eventName.split(' ')).map(function(name) {
990
+ function adjustEventName(eventName) {
991
+ var names = _(eventName.split(' ')).map(function (name) {
994
992
  name = name.toLowerCase();
995
993
  if (-1 === name.indexOf('.')) {
996
994
  name += '.' + NS;
@@ -998,21 +996,21 @@ var adjustEventName = function(eventName) {
998
996
  return name;
999
997
  });
1000
998
  return names.join(' ');
1001
- };
999
+ }
1002
1000
 
1003
1001
  /**
1004
1002
  * Converts a value to boolean
1005
1003
  * @param value
1006
1004
  * @returns {Boolean}
1007
1005
  */
1008
- var toBoolean = function(value) {
1006
+ function toBoolean(value) {
1009
1007
  if (_.isString(value)) {
1010
1008
  if ('false' === value.toLowerCase() || '0' === value) {
1011
1009
  value = false;
1012
1010
  }
1013
1011
  }
1014
1012
  return !!value;
1015
- };
1013
+ }
1016
1014
 
1017
1015
  /**
1018
1016
  * Installs the autocompleter onto an element.
@@ -1020,10 +1018,10 @@ var toBoolean = function(value) {
1020
1018
  * @param {Object} options A list of options to set
1021
1019
  * @returns {autocompleter} Returns the instance of the autocompleter component
1022
1020
  */
1023
- var autocompleteFactory = function(element, options) {
1021
+ function autocompleteFactory(element, options) {
1024
1022
  var autocomplete = _.clone(autocompleter, true);
1025
1023
  _.defaults(autocomplete, defaults);
1026
1024
  return autocomplete.init(element, options);
1027
- };
1025
+ }
1028
1026
 
1029
1027
  export default autocompleteFactory;