@oat-sa/tao-core-ui 1.60.2 → 1.62.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 (783) hide show
  1. package/LICENSE +339 -339
  2. package/README.md +23 -18
  3. package/dist/actionbar.js +393 -410
  4. package/dist/adder.js +143 -156
  5. package/dist/animable/absorbable/absorbable.js +208 -211
  6. package/dist/animable/absorbable/css/absorb.css +7 -8
  7. package/dist/animable/absorbable/css/absorb.css.map +1 -1
  8. package/dist/animable/pulsable/css/pulse.css +7 -7
  9. package/dist/animable/pulsable/css/pulse.css.map +1 -1
  10. package/dist/animable/pulsable/pulsable.js +174 -174
  11. package/dist/areaBroker.js +59 -72
  12. package/dist/autocomplete/css/autocomplete.css +7 -8
  13. package/dist/autocomplete/css/autocomplete.css.map +1 -1
  14. package/dist/autocomplete.js +494 -604
  15. package/dist/autoscroll.js +23 -25
  16. package/dist/badge/badge.js +201 -199
  17. package/dist/badge/css/badge.css +7 -8
  18. package/dist/badge/css/badge.css.map +1 -1
  19. package/dist/breadcrumbs/css/breadcrumbs.css +7 -7
  20. package/dist/breadcrumbs/css/breadcrumbs.css.map +1 -1
  21. package/dist/breadcrumbs.js +286 -285
  22. package/dist/btngrouper.js +83 -95
  23. package/dist/bulkActionPopup/css/bulkActionPopup.css +7 -7
  24. package/dist/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
  25. package/dist/bulkActionPopup.js +503 -503
  26. package/dist/button.js +300 -293
  27. package/dist/calculator/css/calculator.css +10 -10
  28. package/dist/calculator/css/calculator.css.map +1 -1
  29. package/dist/calculator.js +59 -72
  30. package/dist/cascadingComboBox.js +257 -256
  31. package/dist/ckeditor/ckConfigurator.js +130 -154
  32. package/dist/ckeditor/dtdHandler.js +305 -345
  33. package/dist/class/css/selector.css +7 -7
  34. package/dist/class/css/selector.css.map +1 -1
  35. package/dist/class/selector.js +437 -470
  36. package/dist/component/alignable.js +97 -121
  37. package/dist/component/containable.js +53 -58
  38. package/dist/component/css/components.css +7 -7
  39. package/dist/component/css/components.css.map +1 -1
  40. package/dist/component/css/windowComponent.css +7 -7
  41. package/dist/component/css/windowComponent.css.map +1 -1
  42. package/dist/component/draggable.js +34 -36
  43. package/dist/component/placeable.js +84 -102
  44. package/dist/component/resizable.js +79 -89
  45. package/dist/component/stackable.js +21 -27
  46. package/dist/component/windowed.js +284 -297
  47. package/dist/component.js +439 -467
  48. package/dist/container.js +79 -98
  49. package/dist/contextualPopup/css/contextualPopup.css +7 -7
  50. package/dist/contextualPopup/css/contextualPopup.css.map +1 -1
  51. package/dist/contextualPopup.js +417 -436
  52. package/dist/dashboard/css/dashboard.css +7 -7
  53. package/dist/dashboard/css/dashboard.css.map +1 -1
  54. package/dist/dashboard.js +302 -305
  55. package/dist/datalist/css/datalist.css +7 -7
  56. package/dist/datalist/css/datalist.css.map +1 -1
  57. package/dist/datalist.js +783 -791
  58. package/dist/datatable/css/datatable.css +11 -7
  59. package/dist/datatable/css/datatable.css.map +1 -1
  60. package/dist/datatable/filterStrategy/filterStrategy.js +28 -30
  61. package/dist/datatable/filterStrategy/multiple.js +26 -45
  62. package/dist/datatable/filterStrategy/single.js +28 -40
  63. package/dist/datatable.js +1591 -1616
  64. package/dist/dateRange/css/dateRange.css +7 -7
  65. package/dist/dateRange/css/dateRange.css.map +1 -1
  66. package/dist/dateRange/dateRange.js +398 -412
  67. package/dist/datetime/css/picker.css +7 -7
  68. package/dist/datetime/css/picker.css.map +1 -1
  69. package/dist/datetime/picker.js +670 -703
  70. package/dist/deleter.js +383 -398
  71. package/dist/destination/css/selector.css +7 -7
  72. package/dist/destination/css/selector.css.map +1 -1
  73. package/dist/destination/selector.js +295 -293
  74. package/dist/dialog/alert.js +30 -32
  75. package/dist/dialog/confirm.js +29 -32
  76. package/dist/dialog/confirmDelete.js +223 -221
  77. package/dist/dialog.js +651 -695
  78. package/dist/disabler.js +108 -119
  79. package/dist/documentViewer/css/documentViewer.css +7 -7
  80. package/dist/documentViewer/css/documentViewer.css.map +1 -1
  81. package/dist/documentViewer/providers/pdfViewer/fallback/viewer.js +172 -169
  82. package/dist/documentViewer/providers/pdfViewer/pdfjs/areaBroker.js +32 -29
  83. package/dist/documentViewer/providers/pdfViewer/pdfjs/findBar.js +523 -564
  84. package/dist/documentViewer/providers/pdfViewer/pdfjs/pageView.js +376 -393
  85. package/dist/documentViewer/providers/pdfViewer/pdfjs/pagesManager.js +53 -68
  86. package/dist/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +517 -567
  87. package/dist/documentViewer/providers/pdfViewer/pdfjs/textManager.js +73 -96
  88. package/dist/documentViewer/providers/pdfViewer/pdfjs/viewer.js +381 -392
  89. package/dist/documentViewer/providers/pdfViewer/pdfjs/wrapper.js +125 -152
  90. package/dist/documentViewer/providers/pdfViewer.js +189 -191
  91. package/dist/documentViewer/viewerFactory.js +76 -81
  92. package/dist/documentViewer.js +303 -311
  93. package/dist/dropdown/css/dropdown.css +7 -7
  94. package/dist/dropdown/css/dropdown.css.map +1 -1
  95. package/dist/dropdown.js +392 -412
  96. package/dist/durationer.js +77 -85
  97. package/dist/dynamicComponent/css/dynamicComponent.css +7 -7
  98. package/dist/dynamicComponent/css/dynamicComponent.css.map +1 -1
  99. package/dist/dynamicComponent.js +595 -630
  100. package/dist/feedback.js +365 -375
  101. package/dist/figure/FigureStateActive.js +246 -296
  102. package/dist/filesender.js +44 -54
  103. package/dist/filter.js +244 -240
  104. package/dist/form/css/dropdownForm.css +7 -7
  105. package/dist/form/css/dropdownForm.css.map +1 -1
  106. package/dist/form/css/form.css +7 -7
  107. package/dist/form/css/form.css.map +1 -1
  108. package/dist/form/dropdownForm.js +357 -362
  109. package/dist/form/form.js +703 -984
  110. package/dist/form/simpleForm.js +74 -77
  111. package/dist/form/validator/css/validator.css +7 -7
  112. package/dist/form/validator/css/validator.css.map +1 -1
  113. package/dist/form/validator/renderer.js +235 -241
  114. package/dist/form/validator/validator.js +181 -267
  115. package/dist/form/widget/css/widget.css +7 -7
  116. package/dist/form/widget/css/widget.css.map +1 -1
  117. package/dist/form/widget/definitions.js +27 -28
  118. package/dist/form/widget/loader.js +16 -16
  119. package/dist/form/widget/providers/checkBox.js +257 -264
  120. package/dist/form/widget/providers/comboBox.js +194 -193
  121. package/dist/form/widget/providers/default.js +44 -50
  122. package/dist/form/widget/providers/hidden.js +179 -176
  123. package/dist/form/widget/providers/hiddenBox.js +262 -272
  124. package/dist/form/widget/providers/radioBox.js +222 -223
  125. package/dist/form/widget/providers/textArea.js +197 -193
  126. package/dist/form/widget/providers/textBox.js +36 -37
  127. package/dist/form/widget/widget.js +480 -508
  128. package/dist/form.js +12 -17
  129. package/dist/formValidator/formValidator.js +74 -91
  130. package/dist/formValidator/highlighters/highlighter.js +43 -51
  131. package/dist/formValidator/highlighters/message.js +31 -32
  132. package/dist/formValidator/highlighters/tooltip.js +33 -35
  133. package/dist/generis/form/css/form.css +7 -7
  134. package/dist/generis/form/css/form.css.map +1 -1
  135. package/dist/generis/form/form.js +323 -331
  136. package/dist/generis/validator/css/validator.css +7 -7
  137. package/dist/generis/validator/css/validator.css.map +1 -1
  138. package/dist/generis/validator/validator.js +215 -216
  139. package/dist/generis/widget/checkBox/checkBox.js +227 -225
  140. package/dist/generis/widget/comboBox/comboBox.js +189 -183
  141. package/dist/generis/widget/css/widget.css +7 -7
  142. package/dist/generis/widget/css/widget.css.map +1 -1
  143. package/dist/generis/widget/hiddenBox/hiddenBox.js +231 -232
  144. package/dist/generis/widget/loader.js +21 -23
  145. package/dist/generis/widget/textBox/textBox.js +178 -172
  146. package/dist/generis/widget/widget.js +255 -266
  147. package/dist/groupedComboBox.js +231 -226
  148. package/dist/groupvalidator.js +30 -34
  149. package/dist/hider.js +43 -50
  150. package/dist/highlighter.js +946 -1057
  151. package/dist/image/ImgStateActive/extractLabel.js +20 -21
  152. package/dist/image/ImgStateActive/helper.js +21 -25
  153. package/dist/image/ImgStateActive/initHelper.js +133 -162
  154. package/dist/image/ImgStateActive/initMediaEditor.js +72 -92
  155. package/dist/image/ImgStateActive/mediaSizer.js +48 -58
  156. package/dist/image/ImgStateActive.js +185 -215
  157. package/dist/incrementer.js +91 -110
  158. package/dist/inplacer.js +108 -132
  159. package/dist/interactUtils.js +56 -67
  160. package/dist/itemButtonList/css/item-button-list.css +23 -24
  161. package/dist/itemButtonList/css/item-button-list.css.map +1 -1
  162. package/dist/itemButtonList.js +444 -469
  163. package/dist/keyNavigation/navigableDomElement.js +124 -158
  164. package/dist/keyNavigation/navigator.js +235 -312
  165. package/dist/listbox/css/listbox.css +7 -7
  166. package/dist/listbox/css/listbox.css.map +1 -1
  167. package/dist/listbox.js +463 -476
  168. package/dist/liststyler.js +75 -76
  169. package/dist/loadingButton/css/button.css +7 -7
  170. package/dist/loadingButton/css/button.css.map +1 -1
  171. package/dist/loadingButton/loadingButton.js +219 -218
  172. package/dist/lock.js +484 -509
  173. package/dist/login/login.js +471 -486
  174. package/dist/maths/calculator/basicCalculator.js +247 -242
  175. package/dist/maths/calculator/calculatorComponent.js +34 -36
  176. package/dist/maths/calculator/core/areaBroker.js +30 -28
  177. package/dist/maths/calculator/core/board.js +805 -872
  178. package/dist/maths/calculator/core/expression.js +500 -518
  179. package/dist/maths/calculator/core/labels.js +240 -235
  180. package/dist/maths/calculator/core/plugin.js +20 -20
  181. package/dist/maths/calculator/core/terms.js +27 -27
  182. package/dist/maths/calculator/core/tokenizer.js +119 -132
  183. package/dist/maths/calculator/core/tokens.js +157 -168
  184. package/dist/maths/calculator/css/calculator.css +7 -7
  185. package/dist/maths/calculator/css/calculator.css.map +1 -1
  186. package/dist/maths/calculator/defaultCalculator.js +24 -27
  187. package/dist/maths/calculator/plugins/core/degrad.js +22 -30
  188. package/dist/maths/calculator/plugins/core/history.js +55 -67
  189. package/dist/maths/calculator/plugins/core/remind.js +22 -25
  190. package/dist/maths/calculator/plugins/core/stepNavigation.js +33 -49
  191. package/dist/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +255 -258
  192. package/dist/maths/calculator/plugins/modifiers/pow10.js +47 -52
  193. package/dist/maths/calculator/plugins/modifiers/sign.js +103 -130
  194. package/dist/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +288 -293
  195. package/dist/maths/calculator/pluginsLoader.js +22 -22
  196. package/dist/maths/calculator/scientificCalculator.js +339 -334
  197. package/dist/mediaEditor/mediaEditorComponent.js +244 -249
  198. package/dist/mediaEditor/plugins/mediaAlignment/helper.js +28 -33
  199. package/dist/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +228 -236
  200. package/dist/mediaEditor/plugins/mediaAlignment/style.css +7 -7
  201. package/dist/mediaEditor/plugins/mediaDimension/helper.js +81 -106
  202. package/dist/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +597 -635
  203. package/dist/mediaEditor/plugins/mediaDimension/style.css +141 -141
  204. package/dist/mediaplayer/css/player.css +7 -7
  205. package/dist/mediaplayer/css/player.css.map +1 -1
  206. package/dist/mediaplayer/players/html5.js +646 -706
  207. package/dist/mediaplayer/players/youtube.js +393 -438
  208. package/dist/mediaplayer/players.js +19 -19
  209. package/dist/mediaplayer/support.js +66 -79
  210. package/dist/mediaplayer/utils/reminder.js +117 -128
  211. package/dist/mediaplayer/utils/timeObserver.js +106 -109
  212. package/dist/mediaplayer/youtubeManager.js +142 -170
  213. package/dist/mediaplayer.js +1484 -1774
  214. package/dist/mediasizer.js +633 -676
  215. package/dist/modal.js +137 -153
  216. package/dist/movableComponent.js +37 -37
  217. package/dist/pageSizeSelector.js +231 -224
  218. package/dist/pageStatus.js +43 -46
  219. package/dist/pagination/css/pagination.css +7 -7
  220. package/dist/pagination/css/pagination.css.map +1 -1
  221. package/dist/pagination/paginationStrategy.js +24 -25
  222. package/dist/pagination/providers/pages.js +281 -291
  223. package/dist/pagination/providers/simple.js +202 -196
  224. package/dist/pagination.js +49 -72
  225. package/dist/previewer.js +113 -138
  226. package/dist/progressbar.js +70 -80
  227. package/dist/propertySelector/css/propertySelector.css +74 -0
  228. package/dist/propertySelector/css/propertySelector.css.map +1 -0
  229. package/dist/propertySelector/propertySelector.js +489 -0
  230. package/dist/report.js +356 -359
  231. package/dist/resource/css/selector.css +7 -7
  232. package/dist/resource/css/selector.css.map +1 -1
  233. package/dist/resource/filters.js +275 -289
  234. package/dist/resource/list.js +1589 -1371
  235. package/dist/resource/selectable.js +101 -136
  236. package/dist/resource/selector.js +855 -914
  237. package/dist/resource/tree.js +1796 -1612
  238. package/dist/resourcemgr/css/resourcemgr.css +7 -7
  239. package/dist/resourcemgr/css/resourcemgr.css.map +1 -1
  240. package/dist/resourcemgr/fileBrowser.js +540 -587
  241. package/dist/resourcemgr/filePreview.js +16 -25
  242. package/dist/resourcemgr/fileSelector.js +520 -547
  243. package/dist/resourcemgr/util/updatePermissions.js +10 -18
  244. package/dist/resourcemgr.js +325 -332
  245. package/dist/scroller.js +29 -33
  246. package/dist/searchModal/advancedSearch.js +949 -833
  247. package/dist/searchModal/css/advancedSearch.css +7 -14
  248. package/dist/searchModal/css/advancedSearch.css.map +1 -1
  249. package/dist/searchModal/css/searchModal.css +28 -8
  250. package/dist/searchModal/css/searchModal.css.map +1 -1
  251. package/dist/searchModal.js +616 -335
  252. package/dist/selecter.js +21 -28
  253. package/dist/stacker.js +52 -60
  254. package/dist/switch/css/switch.css +7 -7
  255. package/dist/switch/css/switch.css.map +1 -1
  256. package/dist/switch/switch.js +305 -311
  257. package/dist/tableModel.js +39 -49
  258. package/dist/tabs/css/tabs.css +12 -12
  259. package/dist/tabs/css/tabs.css.map +1 -1
  260. package/dist/tabs.js +588 -639
  261. package/dist/taskQueue/css/taskQueue.css +7 -7
  262. package/dist/taskQueue/css/taskQueue.css.map +1 -1
  263. package/dist/taskQueue/status.js +317 -322
  264. package/dist/taskQueue/table.js +383 -394
  265. package/dist/taskQueue/taskQueue.js +19 -19
  266. package/dist/taskQueue/taskQueueModel.js +459 -538
  267. package/dist/taskQueue.js +49 -67
  268. package/dist/taskQueueButton/css/taskable.css +7 -7
  269. package/dist/taskQueueButton/css/taskable.css.map +1 -1
  270. package/dist/taskQueueButton/css/treeButton.css +7 -7
  271. package/dist/taskQueueButton/css/treeButton.css.map +1 -1
  272. package/dist/taskQueueButton/standardButton.js +45 -43
  273. package/dist/taskQueueButton/taskable.js +267 -272
  274. package/dist/taskQueueButton/treeButton.js +200 -198
  275. package/dist/themeLoader.js +109 -129
  276. package/dist/themes.js +86 -100
  277. package/dist/toggler.js +76 -88
  278. package/dist/tooltip.js +296 -311
  279. package/dist/tooltipster.js +17 -17
  280. package/dist/transformer.js +140 -169
  281. package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css +7 -7
  282. package/dist/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
  283. package/dist/tristateCheckboxGroup.js +319 -325
  284. package/dist/uploader.js +691 -724
  285. package/dist/validator/Report.js +1 -2
  286. package/dist/validator/Validator.js +6 -25
  287. package/dist/validator/validators.js +66 -80
  288. package/dist/validator.js +218 -254
  289. package/dist/waitForMedia.js +45 -51
  290. package/dist/waitingDialog/css/waitingDialog.css +7 -7
  291. package/dist/waitingDialog/css/waitingDialog.css.map +1 -1
  292. package/dist/waitingDialog/waitingDialog.js +59 -77
  293. package/package.json +109 -107
  294. package/scss/basic.scss +16 -16
  295. package/scss/ckeditor/skins/tao/scss/inc/_ck-icons.scss +59 -59
  296. package/scss/ckeditor/skins/tao/scss/inc/_tao.scss +59 -59
  297. package/scss/font/tao/tao.svg +234 -234
  298. package/scss/inc/_base.scss +495 -495
  299. package/scss/inc/_bootstrap.scss +6 -6
  300. package/scss/inc/_buttons.scss +114 -114
  301. package/scss/inc/_colors.scss +93 -88
  302. package/scss/inc/_feedback.scss +150 -150
  303. package/scss/inc/_flex-grid.scss +15 -15
  304. package/scss/inc/_fonts.scss +4 -4
  305. package/scss/inc/_forms.scss +832 -832
  306. package/scss/inc/_functions.scss +283 -283
  307. package/scss/inc/_jquery.nouislider.scss +254 -254
  308. package/scss/inc/_normalize.scss +528 -528
  309. package/scss/inc/_report.scss +67 -67
  310. package/scss/inc/_secondary-properties.scss +89 -89
  311. package/scss/inc/_select2.scss +634 -634
  312. package/scss/inc/_toolbars.scss +155 -155
  313. package/scss/inc/_tooltip.scss +312 -312
  314. package/scss/inc/_variables.scss +21 -21
  315. package/scss/inc/base/_highlight.scss +5 -5
  316. package/scss/inc/base/_list-style.scss +58 -58
  317. package/scss/inc/base/_svg.scss +3 -3
  318. package/scss/inc/base/_table.scss +62 -62
  319. package/scss/inc/fonts/_source-sans-pro.scss +29 -29
  320. package/scss/inc/fonts/_tao-icon-classes.scss +226 -226
  321. package/scss/inc/fonts/_tao-icon-def.scss +12 -12
  322. package/scss/inc/fonts/_tao-icon-vars.scss +240 -240
  323. package/src/actionbar/tpl/main.tpl +8 -8
  324. package/src/actionbar.js +251 -251
  325. package/src/adder.js +250 -250
  326. package/src/animable/absorbable/absorbable.js +134 -134
  327. package/src/animable/absorbable/css/absorb.css +7 -8
  328. package/src/animable/absorbable/css/absorb.css.map +1 -1
  329. package/src/animable/absorbable/scss/absorb.scss +37 -37
  330. package/src/animable/pulsable/css/pulse.css +7 -7
  331. package/src/animable/pulsable/css/pulse.css.map +1 -1
  332. package/src/animable/pulsable/pulsable.js +90 -90
  333. package/src/animable/pulsable/scss/pulse.scss +22 -22
  334. package/src/areaBroker.js +160 -160
  335. package/src/autocomplete/css/autocomplete.css +7 -8
  336. package/src/autocomplete/css/autocomplete.css.map +1 -1
  337. package/src/autocomplete/scss/autocomplete.scss +37 -37
  338. package/src/autocomplete.js +1029 -1029
  339. package/src/autoscroll.js +57 -57
  340. package/src/badge/badge.js +119 -119
  341. package/src/badge/css/badge.css +7 -8
  342. package/src/badge/css/badge.css.map +1 -1
  343. package/src/badge/scss/badge.scss +92 -92
  344. package/src/badge/tpl/badge.tpl +4 -4
  345. package/src/breadcrumbs/css/breadcrumbs.css +7 -7
  346. package/src/breadcrumbs/css/breadcrumbs.css.map +1 -1
  347. package/src/breadcrumbs/scss/breadcrumbs.scss +52 -52
  348. package/src/breadcrumbs/tpl/breadcrumbs.tpl +20 -20
  349. package/src/breadcrumbs.js +99 -99
  350. package/src/btngrouper.js +213 -213
  351. package/src/bulkActionPopup/css/bulkActionPopup.css +7 -7
  352. package/src/bulkActionPopup/css/bulkActionPopup.css.map +1 -1
  353. package/src/bulkActionPopup/scss/bulkActionPopup.scss +63 -63
  354. package/src/bulkActionPopup/tpl/layout.tpl +76 -76
  355. package/src/bulkActionPopup/tpl/select.tpl +8 -8
  356. package/src/bulkActionPopup.js +274 -274
  357. package/src/button/tpl/button.tpl +4 -4
  358. package/src/button.js +135 -135
  359. package/src/calculator/css/calculator.css +10 -10
  360. package/src/calculator/css/calculator.css.map +1 -1
  361. package/src/calculator/scss/calculator.scss +139 -139
  362. package/src/calculator.js +188 -188
  363. package/src/cascadingComboBox.js +126 -126
  364. package/src/ckeditor/ckConfigurator.js +736 -736
  365. package/src/ckeditor/dtdHandler.js +1030 -1030
  366. package/src/class/css/selector.css +7 -7
  367. package/src/class/css/selector.css.map +1 -1
  368. package/src/class/scss/selector.scss +101 -101
  369. package/src/class/selector.js +329 -329
  370. package/src/class/tpl/listItem.tpl +9 -9
  371. package/src/class/tpl/selector.tpl +10 -10
  372. package/src/component/alignable.js +274 -274
  373. package/src/component/containable.js +122 -122
  374. package/src/component/css/components.css +7 -7
  375. package/src/component/css/components.css.map +1 -1
  376. package/src/component/css/windowComponent.css +7 -7
  377. package/src/component/css/windowComponent.css.map +1 -1
  378. package/src/component/draggable.js +104 -104
  379. package/src/component/placeable.js +233 -233
  380. package/src/component/resizable.js +195 -195
  381. package/src/component/scss/components.scss +507 -507
  382. package/src/component/scss/windowComponent.scss +62 -62
  383. package/src/component/stackable.js +67 -67
  384. package/src/component/tpl/window.tpl +7 -7
  385. package/src/component/windowed.js +206 -206
  386. package/src/component.js +401 -401
  387. package/src/container.js +200 -200
  388. package/src/contextualPopup/css/contextualPopup.css +7 -7
  389. package/src/contextualPopup/css/contextualPopup.css.map +1 -1
  390. package/src/contextualPopup/scss/contextualPopup.scss +78 -78
  391. package/src/contextualPopup/tpl/popup.tpl +10 -10
  392. package/src/contextualPopup.js +297 -297
  393. package/src/css/basic.css +103 -106
  394. package/src/css/basic.css.map +1 -1
  395. package/src/dashboard/css/dashboard.css +7 -7
  396. package/src/dashboard/css/dashboard.css.map +1 -1
  397. package/src/dashboard/scss/dashboard.scss +93 -93
  398. package/src/dashboard/tpl/dashboard.tpl +16 -16
  399. package/src/dashboard/tpl/dashboardMetricsList.tpl +15 -15
  400. package/src/dashboard.js +184 -184
  401. package/src/datalist/css/datalist.css +7 -7
  402. package/src/datalist/css/datalist.css.map +1 -1
  403. package/src/datalist/scss/datalist.scss +116 -116
  404. package/src/datalist/tpl/list.tpl +24 -24
  405. package/src/datalist/tpl/main.tpl +44 -44
  406. package/src/datalist.js +500 -500
  407. package/src/datatable/css/datatable.css +11 -7
  408. package/src/datatable/css/datatable.css.map +1 -1
  409. package/src/datatable/filterStrategy/filterStrategy.js +70 -70
  410. package/src/datatable/filterStrategy/multiple.js +126 -126
  411. package/src/datatable/filterStrategy/single.js +108 -108
  412. package/src/datatable/scss/datatable.scss +149 -146
  413. package/src/datatable/tpl/button.tpl +6 -6
  414. package/src/datatable/tpl/layout.tpl +158 -158
  415. package/src/datatable.js +1056 -1056
  416. package/src/dateRange/css/dateRange.css +7 -7
  417. package/src/dateRange/css/dateRange.css.map +1 -1
  418. package/src/dateRange/dateRange.js +341 -341
  419. package/src/dateRange/scss/dateRange.scss +7 -7
  420. package/src/dateRange/tpl/select.tpl +18 -18
  421. package/src/datetime/css/picker.css +7 -7
  422. package/src/datetime/css/picker.css.map +1 -1
  423. package/src/datetime/picker.js +576 -576
  424. package/src/datetime/scss/picker.scss +192 -192
  425. package/src/datetime/tpl/picker.tpl +18 -18
  426. package/src/deleter/undo.tpl +6 -6
  427. package/src/deleter.js +296 -296
  428. package/src/destination/css/selector.css +7 -7
  429. package/src/destination/css/selector.css.map +1 -1
  430. package/src/destination/scss/selector.scss +36 -36
  431. package/src/destination/selector.js +195 -195
  432. package/src/destination/tpl/selector.tpl +13 -13
  433. package/src/dialog/alert.js +70 -70
  434. package/src/dialog/confirm.js +85 -85
  435. package/src/dialog/confirmDelete.js +95 -95
  436. package/src/dialog/tpl/body.tpl +24 -24
  437. package/src/dialog/tpl/buttons.tpl +6 -6
  438. package/src/dialog/tpl/checkbox.tpl +5 -5
  439. package/src/dialog.js +517 -517
  440. package/src/disabler.js +230 -230
  441. package/src/documentViewer/css/documentViewer.css +7 -7
  442. package/src/documentViewer/css/documentViewer.css.map +1 -1
  443. package/src/documentViewer/providers/pdfViewer/fallback/viewer.js +69 -69
  444. package/src/documentViewer/providers/pdfViewer/pdfjs/areaBroker.js +41 -41
  445. package/src/documentViewer/providers/pdfViewer/pdfjs/findBar.js +475 -475
  446. package/src/documentViewer/providers/pdfViewer/pdfjs/findBar.tpl +20 -20
  447. package/src/documentViewer/providers/pdfViewer/pdfjs/match.tpl +1 -1
  448. package/src/documentViewer/providers/pdfViewer/pdfjs/page.tpl +4 -4
  449. package/src/documentViewer/providers/pdfViewer/pdfjs/pageView.js +318 -318
  450. package/src/documentViewer/providers/pdfViewer/pdfjs/pagesManager.js +167 -167
  451. package/src/documentViewer/providers/pdfViewer/pdfjs/searchEngine.js +451 -451
  452. package/src/documentViewer/providers/pdfViewer/pdfjs/textManager.js +252 -252
  453. package/src/documentViewer/providers/pdfViewer/pdfjs/viewer.js +299 -299
  454. package/src/documentViewer/providers/pdfViewer/pdfjs/viewer.tpl +16 -16
  455. package/src/documentViewer/providers/pdfViewer/pdfjs/wrapper.js +351 -351
  456. package/src/documentViewer/providers/pdfViewer.js +93 -93
  457. package/src/documentViewer/scss/documentViewer.scss +184 -184
  458. package/src/documentViewer/viewerFactory.js +191 -191
  459. package/src/documentViewer.js +238 -238
  460. package/src/dropdown/css/dropdown.css +7 -7
  461. package/src/dropdown/css/dropdown.css.map +1 -1
  462. package/src/dropdown/scss/dropdown.scss +99 -99
  463. package/src/dropdown/tpl/dropdown.tpl +8 -8
  464. package/src/dropdown/tpl/list-item.tpl +4 -4
  465. package/src/dropdown.js +255 -255
  466. package/src/durationer.js +222 -222
  467. package/src/dynamicComponent/css/dynamicComponent.css +7 -7
  468. package/src/dynamicComponent/css/dynamicComponent.css.map +1 -1
  469. package/src/dynamicComponent/scss/dynamicComponent.scss +98 -98
  470. package/src/dynamicComponent/tpl/layout.tpl +17 -17
  471. package/src/dynamicComponent.js +554 -554
  472. package/src/feedback/feedback.tpl +7 -7
  473. package/src/feedback.js +295 -295
  474. package/src/figure/FigureStateActive.js +174 -174
  475. package/src/filesender.js +114 -114
  476. package/src/filter/template.tpl +5 -5
  477. package/src/filter.js +135 -135
  478. package/src/form/css/dropdownForm.css +7 -7
  479. package/src/form/css/dropdownForm.css.map +1 -1
  480. package/src/form/css/form.css +7 -7
  481. package/src/form/css/form.css.map +1 -1
  482. package/src/form/dropdownForm.js +281 -281
  483. package/src/form/form.js +688 -688
  484. package/src/form/scss/dropdownForm.scss +60 -60
  485. package/src/form/scss/form.scss +25 -25
  486. package/src/form/simpleForm.js +125 -125
  487. package/src/form/tpl/dropdownForm.tpl +4 -4
  488. package/src/form/tpl/form.tpl +7 -7
  489. package/src/form/validator/css/validator.css +7 -7
  490. package/src/form/validator/css/validator.css.map +1 -1
  491. package/src/form/validator/renderer.js +118 -118
  492. package/src/form/validator/scss/validator.scss +14 -14
  493. package/src/form/validator/tpl/message.tpl +1 -1
  494. package/src/form/validator/tpl/validator.tpl +1 -1
  495. package/src/form/validator/validator.js +220 -220
  496. package/src/form/widget/css/widget.css +7 -7
  497. package/src/form/widget/css/widget.css.map +1 -1
  498. package/src/form/widget/definitions.js +51 -51
  499. package/src/form/widget/loader.js +40 -40
  500. package/src/form/widget/providers/checkBox.js +138 -138
  501. package/src/form/widget/providers/comboBox.js +63 -63
  502. package/src/form/widget/providers/default.js +90 -90
  503. package/src/form/widget/providers/hidden.js +62 -62
  504. package/src/form/widget/providers/hiddenBox.js +152 -152
  505. package/src/form/widget/providers/radioBox.js +99 -99
  506. package/src/form/widget/providers/textArea.js +52 -52
  507. package/src/form/widget/providers/textBox.js +48 -48
  508. package/src/form/widget/scss/widget.scss +55 -55
  509. package/src/form/widget/tpl/checkBox.tpl +25 -25
  510. package/src/form/widget/tpl/comboBox.tpl +13 -13
  511. package/src/form/widget/tpl/hidden.tpl +1 -1
  512. package/src/form/widget/tpl/hiddenBox.tpl +17 -17
  513. package/src/form/widget/tpl/label.tpl +6 -6
  514. package/src/form/widget/tpl/radioBox.tpl +25 -25
  515. package/src/form/widget/tpl/textArea.tpl +8 -8
  516. package/src/form/widget/tpl/widget.tpl +8 -8
  517. package/src/form/widget/widget.js +372 -372
  518. package/src/form.js +53 -53
  519. package/src/formValidator/formValidator.js +253 -253
  520. package/src/formValidator/highlighters/highlighter.js +102 -102
  521. package/src/formValidator/highlighters/message.js +70 -70
  522. package/src/formValidator/highlighters/tooltip.js +78 -78
  523. package/src/generis/form/css/form.css +7 -7
  524. package/src/generis/form/css/form.css.map +1 -1
  525. package/src/generis/form/form.js +239 -239
  526. package/src/generis/form/readme.md +70 -70
  527. package/src/generis/form/scss/form.scss +23 -23
  528. package/src/generis/form/tpl/form.tpl +16 -16
  529. package/src/generis/validator/css/validator.css +7 -7
  530. package/src/generis/validator/css/validator.css.map +1 -1
  531. package/src/generis/validator/readme.md +46 -46
  532. package/src/generis/validator/scss/validator.scss +13 -13
  533. package/src/generis/validator/validator.js +128 -128
  534. package/src/generis/widget/checkBox/checkBox.js +112 -112
  535. package/src/generis/widget/checkBox/checkBox.tpl +18 -18
  536. package/src/generis/widget/comboBox/comboBox.js +67 -67
  537. package/src/generis/widget/comboBox/comboBox.tpl +12 -12
  538. package/src/generis/widget/css/widget.css +7 -7
  539. package/src/generis/widget/css/widget.css.map +1 -1
  540. package/src/generis/widget/hiddenBox/hiddenBox.js +132 -132
  541. package/src/generis/widget/hiddenBox/hiddenBox.tpl +16 -16
  542. package/src/generis/widget/loader.js +49 -49
  543. package/src/generis/widget/readme.md +59 -59
  544. package/src/generis/widget/scss/widget.scss +61 -61
  545. package/src/generis/widget/textBox/textBox.js +65 -65
  546. package/src/generis/widget/textBox/textBox.tpl +7 -7
  547. package/src/generis/widget/widget.js +164 -164
  548. package/src/generis/widget/widget.tpl +5 -5
  549. package/src/groupedComboBox.js +99 -99
  550. package/src/groupvalidator.js +84 -84
  551. package/src/hider.js +88 -88
  552. package/src/highlighter.js +1166 -1166
  553. package/src/image/ImgStateActive/extractLabel.js +29 -29
  554. package/src/image/ImgStateActive/helper.js +36 -36
  555. package/src/image/ImgStateActive/initHelper.js +137 -137
  556. package/src/image/ImgStateActive/initMediaEditor.js +92 -92
  557. package/src/image/ImgStateActive/mediaSizer.js +63 -63
  558. package/src/image/ImgStateActive.js +115 -115
  559. package/src/incrementer.js +319 -319
  560. package/src/inplacer.js +316 -316
  561. package/src/interactUtils.js +140 -140
  562. package/src/itemButtonList/css/item-button-list.css +23 -24
  563. package/src/itemButtonList/css/item-button-list.css.map +1 -1
  564. package/src/itemButtonList/scss/item-button-list.scss +236 -236
  565. package/src/itemButtonList/tpl/itemButtonList.tpl +21 -21
  566. package/src/itemButtonList.js +274 -274
  567. package/src/keyNavigation/navigableDomElement.js +282 -282
  568. package/src/keyNavigation/navigator.js +543 -543
  569. package/src/listbox/css/listbox.css +7 -7
  570. package/src/listbox/css/listbox.css.map +1 -1
  571. package/src/listbox/scss/listbox.scss +116 -116
  572. package/src/listbox/tpl/list.tpl +14 -14
  573. package/src/listbox/tpl/main.tpl +9 -9
  574. package/src/listbox.js +251 -251
  575. package/src/liststyler.js +155 -155
  576. package/src/loadingButton/css/button.css +7 -7
  577. package/src/loadingButton/css/button.css.map +1 -1
  578. package/src/loadingButton/loadingButton.js +110 -110
  579. package/src/loadingButton/scss/button.scss +41 -41
  580. package/src/loadingButton/tpl/button.tpl +5 -5
  581. package/src/lock/lock.tpl +16 -16
  582. package/src/lock.js +395 -395
  583. package/src/login/login.js +322 -322
  584. package/src/login/tpl/login.tpl +29 -29
  585. package/src/login/tpl/passwordReveal.tpl +7 -7
  586. package/src/maths/calculator/basicCalculator.js +55 -55
  587. package/src/maths/calculator/calculatorComponent.js +128 -128
  588. package/src/maths/calculator/core/areaBroker.js +38 -38
  589. package/src/maths/calculator/core/board.js +841 -841
  590. package/src/maths/calculator/core/expression.js +430 -430
  591. package/src/maths/calculator/core/labels.js +116 -116
  592. package/src/maths/calculator/core/plugin.js +40 -40
  593. package/src/maths/calculator/core/terms.js +459 -459
  594. package/src/maths/calculator/core/tokenizer.js +245 -245
  595. package/src/maths/calculator/core/tokens.js +178 -178
  596. package/src/maths/calculator/core/tpl/board.tpl +4 -4
  597. package/src/maths/calculator/css/calculator.css +7 -7
  598. package/src/maths/calculator/css/calculator.css.map +1 -1
  599. package/src/maths/calculator/defaultCalculator.js +66 -66
  600. package/src/maths/calculator/plugins/core/degrad.js +90 -90
  601. package/src/maths/calculator/plugins/core/history.js +166 -166
  602. package/src/maths/calculator/plugins/core/remind.js +96 -96
  603. package/src/maths/calculator/plugins/core/stepNavigation.js +175 -175
  604. package/src/maths/calculator/plugins/keyboard/templateKeyboard/defaultTemplate.tpl +36 -36
  605. package/src/maths/calculator/plugins/keyboard/templateKeyboard/templateKeyboard.js +91 -91
  606. package/src/maths/calculator/plugins/modifiers/pow10.js +143 -143
  607. package/src/maths/calculator/plugins/modifiers/sign.js +339 -339
  608. package/src/maths/calculator/plugins/screen/simpleScreen/defaultTemplate.tpl +3 -3
  609. package/src/maths/calculator/plugins/screen/simpleScreen/history.tpl +3 -3
  610. package/src/maths/calculator/plugins/screen/simpleScreen/simpleScreen.js +191 -191
  611. package/src/maths/calculator/pluginsLoader.js +46 -46
  612. package/src/maths/calculator/scientificCalculator.js +74 -74
  613. package/src/maths/calculator/scss/calculator.scss +396 -396
  614. package/src/maths/calculator/tpl/basicKeyboard.tpl +37 -37
  615. package/src/maths/calculator/tpl/basicScreen.tpl +2 -2
  616. package/src/maths/calculator/tpl/scientificKeyboard.tpl +61 -61
  617. package/src/maths/calculator/tpl/scientificScreen.tpl +3 -3
  618. package/src/mediaEditor/mediaEditorComponent.js +141 -141
  619. package/src/mediaEditor/plugins/mediaAlignment/helper.js +62 -62
  620. package/src/mediaEditor/plugins/mediaAlignment/mediaAlignmentComponent.js +99 -99
  621. package/src/mediaEditor/plugins/mediaAlignment/style.css +7 -7
  622. package/src/mediaEditor/plugins/mediaAlignment/tpl/mediaAlignment.tpl +25 -25
  623. package/src/mediaEditor/plugins/mediaDimension/helper.js +189 -189
  624. package/src/mediaEditor/plugins/mediaDimension/mediaDimensionComponent.js +561 -561
  625. package/src/mediaEditor/plugins/mediaDimension/style.css +141 -141
  626. package/src/mediaEditor/plugins/mediaDimension/tpl/mediaDimension.tpl +55 -55
  627. package/src/mediaEditor/tpl/editor.tpl +4 -4
  628. package/src/mediaplayer/css/player.css +7 -7
  629. package/src/mediaplayer/css/player.css.map +1 -1
  630. package/src/mediaplayer/players/html5.js +564 -564
  631. package/src/mediaplayer/players/youtube.js +323 -323
  632. package/src/mediaplayer/players.js +29 -29
  633. package/src/mediaplayer/readme.md +305 -305
  634. package/src/mediaplayer/scss/player.scss +569 -569
  635. package/src/mediaplayer/support.js +126 -126
  636. package/src/mediaplayer/tpl/audio.tpl +6 -6
  637. package/src/mediaplayer/tpl/player.tpl +37 -37
  638. package/src/mediaplayer/tpl/source.tpl +1 -1
  639. package/src/mediaplayer/tpl/video.tpl +6 -6
  640. package/src/mediaplayer/tpl/youtube.tpl +1 -1
  641. package/src/mediaplayer/utils/reminder.js +184 -184
  642. package/src/mediaplayer/utils/timeObserver.js +143 -143
  643. package/src/mediaplayer/youtubeManager.js +161 -161
  644. package/src/mediaplayer.js +1606 -1606
  645. package/src/mediasizer/mediasizer.tpl +55 -55
  646. package/src/mediasizer.js +635 -635
  647. package/src/modal.js +365 -365
  648. package/src/movableComponent.js +78 -78
  649. package/src/pageSizeSelector/tpl/pageSizeSelector.tpl +9 -9
  650. package/src/pageSizeSelector.js +107 -107
  651. package/src/pageStatus.js +147 -147
  652. package/src/pagination/css/pagination.css +7 -7
  653. package/src/pagination/css/pagination.css.map +1 -1
  654. package/src/pagination/paginationStrategy.js +53 -53
  655. package/src/pagination/providers/pages.js +161 -161
  656. package/src/pagination/providers/simple.js +74 -74
  657. package/src/pagination/providers/tpl/pages/page.tpl +1 -1
  658. package/src/pagination/providers/tpl/pages.tpl +8 -8
  659. package/src/pagination/providers/tpl/simple.tpl +7 -7
  660. package/src/pagination/scss/pagination.scss +111 -111
  661. package/src/pagination.js +237 -237
  662. package/src/previewer.js +300 -300
  663. package/src/progressbar.js +165 -165
  664. package/src/propertySelector/css/propertySelector.css +74 -0
  665. package/src/propertySelector/css/propertySelector.css.map +1 -0
  666. package/src/propertySelector/propertySelector.js +286 -0
  667. package/src/propertySelector/scss/propertySelector.scss +66 -0
  668. package/src/propertySelector/tpl/highlighted-text.tpl +1 -0
  669. package/src/propertySelector/tpl/property-description.tpl +13 -0
  670. package/src/propertySelector/tpl/property-selector.tpl +7 -0
  671. package/src/report/feedback.tpl +11 -11
  672. package/src/report/layout.tpl +10 -10
  673. package/src/report.js +184 -184
  674. package/src/resource/css/selector.css +7 -7
  675. package/src/resource/css/selector.css.map +1 -1
  676. package/src/resource/filters.js +208 -208
  677. package/src/resource/list.js +200 -200
  678. package/src/resource/scss/_filters.scss +26 -26
  679. package/src/resource/scss/_resource-list.scss +107 -107
  680. package/src/resource/scss/_resource-tree.scss +205 -205
  681. package/src/resource/scss/selector.scss +187 -187
  682. package/src/resource/selectable.js +322 -322
  683. package/src/resource/selector.js +871 -871
  684. package/src/resource/tpl/filters.tpl +2 -2
  685. package/src/resource/tpl/list.tpl +7 -7
  686. package/src/resource/tpl/listNode.tpl +4 -4
  687. package/src/resource/tpl/selector.tpl +46 -46
  688. package/src/resource/tpl/tree.tpl +4 -4
  689. package/src/resource/tpl/treeNode.tpl +30 -30
  690. package/src/resource/tree.js +400 -400
  691. package/src/resourcemgr/css/resourcemgr.css +7 -7
  692. package/src/resourcemgr/css/resourcemgr.css.map +1 -1
  693. package/src/resourcemgr/fileBrowser.js +381 -381
  694. package/src/resourcemgr/filePreview.js +73 -73
  695. package/src/resourcemgr/fileSelector.js +348 -348
  696. package/src/resourcemgr/scss/resourcemgr.scss +254 -254
  697. package/src/resourcemgr/tpl/fileSelect.tpl +39 -39
  698. package/src/resourcemgr/tpl/folder.tpl +11 -11
  699. package/src/resourcemgr/tpl/layout.tpl +84 -84
  700. package/src/resourcemgr/tpl/rootFolder.tpl +13 -13
  701. package/src/resourcemgr/util/updatePermissions.js +53 -53
  702. package/src/resourcemgr.js +216 -216
  703. package/src/scroller.js +94 -94
  704. package/src/scss/basic.scss +16 -16
  705. package/src/searchModal/advancedSearch.js +638 -601
  706. package/src/searchModal/css/advancedSearch.css +7 -14
  707. package/src/searchModal/css/advancedSearch.css.map +1 -1
  708. package/src/searchModal/css/searchModal.css +28 -8
  709. package/src/searchModal/css/searchModal.css.map +1 -1
  710. package/src/searchModal/scss/advancedSearch.scss +171 -177
  711. package/src/searchModal/scss/searchModal.scss +393 -375
  712. package/src/searchModal/tpl/advanced-search.tpl +9 -9
  713. package/src/searchModal/tpl/criteria-alias.tpl +1 -0
  714. package/src/searchModal/tpl/criteria-class-label.tpl +1 -0
  715. package/src/searchModal/tpl/criteria-label.tpl +1 -0
  716. package/src/searchModal/tpl/highlighted-text.tpl +1 -0
  717. package/src/searchModal/tpl/info-message.tpl +3 -3
  718. package/src/searchModal/tpl/invalid-criteria-warning.tpl +10 -10
  719. package/src/searchModal/tpl/layout.tpl +27 -25
  720. package/src/searchModal/tpl/list-checkbox-criterion.tpl +17 -12
  721. package/src/searchModal/tpl/list-select-criterion.tpl +12 -6
  722. package/src/searchModal/tpl/property-select-button.tpl +1 -0
  723. package/src/searchModal/tpl/results-container.tpl +1 -0
  724. package/src/searchModal/tpl/text-criterion.tpl +11 -6
  725. package/src/searchModal.js +761 -496
  726. package/src/selecter.js +43 -43
  727. package/src/stacker.js +133 -133
  728. package/src/switch/css/switch.css +7 -7
  729. package/src/switch/css/switch.css.map +1 -1
  730. package/src/switch/scss/switch.scss +83 -83
  731. package/src/switch/switch.js +195 -195
  732. package/src/switch/tpl/switch.tpl +7 -7
  733. package/src/tableModel.js +112 -112
  734. package/src/tabs/css/tabs.css +12 -12
  735. package/src/tabs/css/tabs.css.map +1 -1
  736. package/src/tabs/scss/tabs.scss +50 -50
  737. package/src/tabs/tpl/panel.tpl +3 -3
  738. package/src/tabs/tpl/tabs.tpl +10 -10
  739. package/src/tabs.js +528 -528
  740. package/src/taskQueue/css/taskQueue.css +7 -7
  741. package/src/taskQueue/css/taskQueue.css.map +1 -1
  742. package/src/taskQueue/scss/taskQueue.scss +47 -47
  743. package/src/taskQueue/status.js +228 -228
  744. package/src/taskQueue/table.js +350 -350
  745. package/src/taskQueue/taskQueue.js +33 -33
  746. package/src/taskQueue/taskQueueModel.js +548 -548
  747. package/src/taskQueue/tpl/statusMessage.tpl +7 -7
  748. package/src/taskQueue.js +218 -218
  749. package/src/taskQueueButton/css/taskable.css +7 -7
  750. package/src/taskQueueButton/css/taskable.css.map +1 -1
  751. package/src/taskQueueButton/css/treeButton.css +7 -7
  752. package/src/taskQueueButton/css/treeButton.css.map +1 -1
  753. package/src/taskQueueButton/scss/taskable.scss +4 -4
  754. package/src/taskQueueButton/scss/treeButton.scss +34 -34
  755. package/src/taskQueueButton/standardButton.js +108 -108
  756. package/src/taskQueueButton/taskable.js +202 -202
  757. package/src/taskQueueButton/tpl/report.tpl +5 -5
  758. package/src/taskQueueButton/tpl/treeButton.tpl +6 -6
  759. package/src/taskQueueButton/treeButton.js +109 -109
  760. package/src/themeLoader.js +252 -252
  761. package/src/themes.js +162 -162
  762. package/src/toggler.js +200 -200
  763. package/src/tooltip/default.tpl +3 -3
  764. package/src/tooltip.js +160 -160
  765. package/src/tooltipster.js +25 -25
  766. package/src/transformer.js +327 -327
  767. package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css +7 -7
  768. package/src/tristateCheckboxGroup/css/tristateCheckboxGroup.css.map +1 -1
  769. package/src/tristateCheckboxGroup/scss/tristateCheckboxGroup.scss +15 -15
  770. package/src/tristateCheckboxGroup/tpl/li.tpl +6 -6
  771. package/src/tristateCheckboxGroup.js +207 -207
  772. package/src/uploader/fileEntry.tpl +6 -6
  773. package/src/uploader/uploader.tpl +32 -32
  774. package/src/uploader.js +594 -594
  775. package/src/validator/Report.js +10 -10
  776. package/src/validator/Validator.js +108 -108
  777. package/src/validator/validators.js +220 -220
  778. package/src/validator.js +264 -264
  779. package/src/waitForMedia.js +82 -82
  780. package/src/waitingDialog/css/waitingDialog.css +7 -7
  781. package/src/waitingDialog/css/waitingDialog.css.map +1 -1
  782. package/src/waitingDialog/scss/waitingDialog.scss +34 -34
  783. package/src/waitingDialog/waitingDialog.js +240 -240
package/dist/datatable.js CHANGED
@@ -1,1765 +1,1740 @@
1
1
  define(['jquery', 'lodash', 'i18n', 'core/pluginifier', 'handlebars', 'lib/dompurify/purify', 'ui/datatable/filterStrategy/filterStrategy', 'ui/pagination', 'layout/loading-bar', 'core/logger', 'util/httpErrorParser', 'ui/pageSizeSelector', 'css!ui/datatable/css/datatable.css'], function ($$1, _, __, Pluginifier, Handlebars, DOMPurify, filterStrategyFactory, paginationComponent, loadingBar, loggerFactory, httpErrorParser, pageSizeSelector, datatable_css) { 'use strict';
2
2
 
3
- $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
4
- _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
5
- __ = __ && Object.prototype.hasOwnProperty.call(__, 'default') ? __['default'] : __;
6
- Pluginifier = Pluginifier && Object.prototype.hasOwnProperty.call(Pluginifier, 'default') ? Pluginifier['default'] : Pluginifier;
7
- Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
8
- DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
9
- filterStrategyFactory = filterStrategyFactory && Object.prototype.hasOwnProperty.call(filterStrategyFactory, 'default') ? filterStrategyFactory['default'] : filterStrategyFactory;
10
- paginationComponent = paginationComponent && Object.prototype.hasOwnProperty.call(paginationComponent, 'default') ? paginationComponent['default'] : paginationComponent;
11
- loadingBar = loadingBar && Object.prototype.hasOwnProperty.call(loadingBar, 'default') ? loadingBar['default'] : loadingBar;
12
- loggerFactory = loggerFactory && Object.prototype.hasOwnProperty.call(loggerFactory, 'default') ? loggerFactory['default'] : loggerFactory;
13
- httpErrorParser = httpErrorParser && Object.prototype.hasOwnProperty.call(httpErrorParser, 'default') ? httpErrorParser['default'] : httpErrorParser;
14
- pageSizeSelector = pageSizeSelector && Object.prototype.hasOwnProperty.call(pageSizeSelector, 'default') ? pageSizeSelector['default'] : pageSizeSelector;
15
-
16
- function _typeof(obj) {
17
- "@babel/helpers - typeof";
18
-
19
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
20
- return typeof obj;
21
- } : function (obj) {
22
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
23
- }, _typeof(obj);
24
- }
25
-
26
- function Helpers0 (hb) {
27
- //register a i18n helper
28
- hb.registerHelper('__', function (key) {
29
- return __(key);
30
- });
31
- /**
32
- * Register dompurify helper
33
- *
34
- * https://github.com/cure53/DOMPurify
35
- * with config SAFE_FOR_TEMPLATES: true
36
- * to make output safe for template systems
37
- */
38
-
39
- hb.registerHelper('dompurify', function (context) {
40
- return DOMPurify.sanitize(context);
41
- });
42
- /**
43
- * Register join helper
44
- *
45
- * Example :
46
- * var values = {a:v1, b:v2, c:v3};
47
- * Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
48
- * Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
3
+ $$1 = $$1 && Object.prototype.hasOwnProperty.call($$1, 'default') ? $$1['default'] : $$1;
4
+ _ = _ && Object.prototype.hasOwnProperty.call(_, 'default') ? _['default'] : _;
5
+ __ = __ && Object.prototype.hasOwnProperty.call(__, 'default') ? __['default'] : __;
6
+ Pluginifier = Pluginifier && Object.prototype.hasOwnProperty.call(Pluginifier, 'default') ? Pluginifier['default'] : Pluginifier;
7
+ Handlebars = Handlebars && Object.prototype.hasOwnProperty.call(Handlebars, 'default') ? Handlebars['default'] : Handlebars;
8
+ DOMPurify = DOMPurify && Object.prototype.hasOwnProperty.call(DOMPurify, 'default') ? DOMPurify['default'] : DOMPurify;
9
+ filterStrategyFactory = filterStrategyFactory && Object.prototype.hasOwnProperty.call(filterStrategyFactory, 'default') ? filterStrategyFactory['default'] : filterStrategyFactory;
10
+ paginationComponent = paginationComponent && Object.prototype.hasOwnProperty.call(paginationComponent, 'default') ? paginationComponent['default'] : paginationComponent;
11
+ loadingBar = loadingBar && Object.prototype.hasOwnProperty.call(loadingBar, 'default') ? loadingBar['default'] : loadingBar;
12
+ loggerFactory = loggerFactory && Object.prototype.hasOwnProperty.call(loggerFactory, 'default') ? loggerFactory['default'] : loggerFactory;
13
+ httpErrorParser = httpErrorParser && Object.prototype.hasOwnProperty.call(httpErrorParser, 'default') ? httpErrorParser['default'] : httpErrorParser;
14
+ pageSizeSelector = pageSizeSelector && Object.prototype.hasOwnProperty.call(pageSizeSelector, 'default') ? pageSizeSelector['default'] : pageSizeSelector;
15
+
16
+ /**
17
+ * This program is free software; you can redistribute it and/or
18
+ * modify it under the terms of the GNU General Public License
19
+ * as published by the Free Software Foundation; under version 2
20
+ * of the License (non-upgradable).
21
+ *
22
+ * This program is distributed in the hope that it will be useful,
23
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
+ * GNU General Public License for more details.
26
+ *
27
+ * You should have received a copy of the GNU General Public License
28
+ * along with this program; if not, write to the Free Software
29
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
30
+ *
31
+ * Copyright (c) 2013-2019 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
32
+ *
33
+ *
49
34
  */
35
+ function Helpers0 (hb) {
36
+ //register a i18n helper
37
+ hb.registerHelper('__', function (key) {
38
+ return __(key);
39
+ });
50
40
 
51
- hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
52
- var fragments = [];
53
- keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
54
- fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
55
- wrapper = typeof wrapper === 'string' ? wrapper : '"';
56
-
57
- _.forIn(arr, function (value, key) {
58
- var fragment = '';
41
+ /**
42
+ * Register dompurify helper
43
+ *
44
+ * https://github.com/cure53/DOMPurify
45
+ * with config SAFE_FOR_TEMPLATES: true
46
+ * to make output safe for template systems
47
+ */
48
+ hb.registerHelper('dompurify', function (context) {
49
+ return DOMPurify.sanitize(context);
50
+ });
59
51
 
60
- if (value !== null || value !== undefined) {
61
- if (typeof value === 'boolean') {
62
- value = value ? 'true' : 'false';
63
- } else if (_typeof(value) === 'object') {
64
- value = _.values(value).join(' ');
52
+ /**
53
+ * Register join helper
54
+ *
55
+ * Example :
56
+ * var values = {a:v1, b:v2, c:v3};
57
+ * Using {{{join attributes '=' ' ' '"'}}} will return : a="v1" b="v2" c="v3"
58
+ * Using {{{join values null ' or ' '*'}}} will return : *v1* or *v2* or *v3*
59
+ */
60
+ hb.registerHelper('join', function (arr, keyValueGlue, fragmentGlue, wrapper) {
61
+ var fragments = [];
62
+ keyValueGlue = typeof keyValueGlue === 'string' ? keyValueGlue : undefined;
63
+ fragmentGlue = typeof fragmentGlue === 'string' ? fragmentGlue : ' ';
64
+ wrapper = typeof wrapper === 'string' ? wrapper : '"';
65
+ _.forIn(arr, function (value, key) {
66
+ var fragment = '';
67
+ if (value !== null || value !== undefined) {
68
+ if (typeof value === 'boolean') {
69
+ value = value ? 'true' : 'false';
70
+ } else if (typeof value === 'object') {
71
+ value = _.values(value).join(' ');
72
+ }
73
+ } else {
74
+ value = '';
65
75
  }
66
- } else {
67
- value = '';
68
- }
76
+ if (keyValueGlue !== undefined) {
77
+ fragment += key + keyValueGlue;
78
+ }
79
+ fragment += wrapper + value + wrapper;
80
+ fragments.push(fragment);
81
+ });
82
+ return fragments.join(fragmentGlue);
83
+ });
69
84
 
70
- if (keyValueGlue !== undefined) {
71
- fragment += key + keyValueGlue;
85
+ //register a classic "for loop" helper
86
+ //it also adds a local variable "i" as the index in each iteration loop
87
+ hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
88
+ var ret = '';
89
+ startIndex = parseInt(startIndex);
90
+ stopIndex = parseInt(stopIndex);
91
+ increment = parseInt(increment);
92
+ for (var i = startIndex; i < stopIndex; i += increment) {
93
+ ret += options.fn(_.extend({}, this, {
94
+ i: i
95
+ }));
96
+ }
97
+ return ret;
98
+ });
99
+ hb.registerHelper('equal', function (var1, var2, options) {
100
+ if (var1 == var2) {
101
+ return options.fn(this);
102
+ } else {
103
+ return options.inverse(this);
72
104
  }
73
-
74
- fragment += wrapper + value + wrapper;
75
- fragments.push(fragment);
76
105
  });
77
106
 
78
- return fragments.join(fragmentGlue);
79
- }); //register a classic "for loop" helper
80
- //it also adds a local variable "i" as the index in each iteration loop
107
+ // register a "get property" helper
108
+ // it gets the named property from the provided context
109
+ hb.registerHelper('property', function (name, context) {
110
+ return context[name] || '';
111
+ });
81
112
 
82
- hb.registerHelper('for', function (startIndex, stopIndex, increment, options) {
83
- var ret = '';
84
- startIndex = parseInt(startIndex);
85
- stopIndex = parseInt(stopIndex);
86
- increment = parseInt(increment);
113
+ // register an 'includes' helper
114
+ // it checks if value is in array
115
+ hb.registerHelper('includes', function (haystack, needle, options) {
116
+ if (_.contains(haystack, needle)) {
117
+ return options.fn(this);
118
+ }
119
+ });
120
+ }
87
121
 
88
- for (var i = startIndex; i < stopIndex; i += increment) {
89
- ret += options.fn(_.extend({}, this, {
90
- i: i
91
- }));
122
+ if (!Helpers0.__initialized) {
123
+ Helpers0(Handlebars);
124
+ Helpers0.__initialized = true;
125
+ }
126
+ var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
127
+ this.compilerInfo = [4,'>= 1.0.0'];
128
+ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
129
+ var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;
130
+
131
+ function program1(depth0,data) {
132
+
133
+ var buffer = "", stack1;
134
+ buffer += "\n <aside class=\"filter\" data-column=\""
135
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),stack1 == null || stack1 === false ? stack1 : stack1.columns)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
136
+ + "\">\n <input type=\"text\" value=\"\" name=\"filter\" placeholder=\""
137
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
138
+ + "\">\n <button class=\"icon-find\" type=\"button\"></button>\n </aside>\n ";
139
+ return buffer;
92
140
  }
93
141
 
94
- return ret;
95
- });
96
- hb.registerHelper('equal', function (var1, var2, options) {
97
- if (var1 == var2) {
98
- return options.fn(this);
99
- } else {
100
- return options.inverse(this);
142
+ function program3(depth0,data,depth1) {
143
+
144
+ var buffer = "", stack1, helper;
145
+ buffer += "\n <h2>\n <span class=\"empty-list hidden\">";
146
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.empty), {hash:{},inverse:self.programWithDepth(6, program6, data, depth1),fn:self.program(4, program4, data),data:data});
147
+ if(stack1 || stack1 === 0) { buffer += stack1; }
148
+ buffer += "</span>\n <span class=\"available-list hidden\">\n <span class=\"text\">";
149
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.available), {hash:{},inverse:self.programWithDepth(10, program10, data, depth1),fn:self.program(8, program8, data),data:data});
150
+ if(stack1 || stack1 === 0) { buffer += stack1; }
151
+ buffer += "</span>:\n <span class=\"count\">";
152
+ if (helper = helpers.count) { stack1 = helper.call(depth0, {hash:{},data:data}); }
153
+ else { helper = (depth0 && depth0.count); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
154
+ buffer += escapeExpression(stack1)
155
+ + "</span>\n </span>\n <span class=\"loading\">";
156
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.loading), {hash:{},inverse:self.programWithDepth(14, program14, data, depth1),fn:self.program(12, program12, data),data:data});
157
+ if(stack1 || stack1 === 0) { buffer += stack1; }
158
+ buffer += "...</span>\n </h2>\n ";
159
+ return buffer;
160
+ }
161
+ function program4(depth0,data) {
162
+
163
+ var stack1, helper;
164
+ if (helper = helpers.empty) { stack1 = helper.call(depth0, {hash:{},data:data}); }
165
+ else { helper = (depth0 && depth0.empty); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
166
+ return escapeExpression(stack1);
101
167
  }
102
- }); // register a "get property" helper
103
- // it gets the named property from the provided context
104
-
105
- hb.registerHelper('property', function (name, context) {
106
- return context[name] || '';
107
- }); // register an 'includes' helper
108
- // it checks if value is in array
109
168
 
110
- hb.registerHelper('includes', function (haystack, needle, options) {
111
- if (_.contains(haystack, needle)) {
112
- return options.fn(this);
169
+ function program6(depth0,data,depth2) {
170
+
171
+ var stack1;
172
+ return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.empty)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
113
173
  }
114
- });
115
- }
116
-
117
- if (!Helpers0.__initialized) {
118
- Helpers0(Handlebars);
119
- Helpers0.__initialized = true;
120
- }
121
- var Template = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
122
- this.compilerInfo = [4,'>= 1.0.0'];
123
- helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
124
- var buffer = "", stack1, functionType="function", escapeExpression=this.escapeExpression, self=this, helperMissing=helpers.helperMissing;
125
-
126
- function program1(depth0,data) {
127
-
128
- var buffer = "", stack1;
129
- buffer += "\r\n <aside class=\"filter\" data-column=\""
130
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),stack1 == null || stack1 === false ? stack1 : stack1.columns)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
131
- + "\">\r\n <input type=\"text\" value=\"\" name=\"filter\" placeholder=\""
132
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.filter)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
133
- + "\">\r\n <button class=\"icon-find\" type=\"button\"></button>\r\n </aside>\r\n ";
134
- return buffer;
135
- }
136
174
 
137
- function program3(depth0,data,depth1) {
138
-
139
- var buffer = "", stack1, helper;
140
- buffer += "\r\n <h2>\r\n <span class=\"empty-list hidden\">";
141
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.empty), {hash:{},inverse:self.programWithDepth(6, program6, data, depth1),fn:self.program(4, program4, data),data:data});
142
- if(stack1 || stack1 === 0) { buffer += stack1; }
143
- buffer += "</span>\r\n <span class=\"available-list hidden\">\r\n <span class=\"text\">";
144
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.available), {hash:{},inverse:self.programWithDepth(10, program10, data, depth1),fn:self.program(8, program8, data),data:data});
145
- if(stack1 || stack1 === 0) { buffer += stack1; }
146
- buffer += "</span>:\r\n <span class=\"count\">";
147
- if (helper = helpers.count) { stack1 = helper.call(depth0, {hash:{},data:data}); }
148
- else { helper = (depth0 && depth0.count); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
149
- buffer += escapeExpression(stack1)
150
- + "</span>\r\n </span>\r\n <span class=\"loading\">";
151
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.loading), {hash:{},inverse:self.programWithDepth(14, program14, data, depth1),fn:self.program(12, program12, data),data:data});
152
- if(stack1 || stack1 === 0) { buffer += stack1; }
153
- buffer += "...</span>\r\n </h2>\r\n ";
154
- return buffer;
155
- }
156
- function program4(depth0,data) {
157
-
158
- var stack1, helper;
159
- if (helper = helpers.empty) { stack1 = helper.call(depth0, {hash:{},data:data}); }
160
- else { helper = (depth0 && depth0.empty); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
161
- return escapeExpression(stack1);
162
- }
175
+ function program8(depth0,data) {
176
+
177
+ var stack1, helper;
178
+ if (helper = helpers.available) { stack1 = helper.call(depth0, {hash:{},data:data}); }
179
+ else { helper = (depth0 && depth0.available); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
180
+ return escapeExpression(stack1);
181
+ }
163
182
 
164
- function program6(depth0,data,depth2) {
165
-
166
- var stack1;
167
- return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.empty)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
168
- }
183
+ function program10(depth0,data,depth2) {
184
+
185
+ var stack1;
186
+ return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.available)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
187
+ }
169
188
 
170
- function program8(depth0,data) {
171
-
172
- var stack1, helper;
173
- if (helper = helpers.available) { stack1 = helper.call(depth0, {hash:{},data:data}); }
174
- else { helper = (depth0 && depth0.available); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
175
- return escapeExpression(stack1);
176
- }
189
+ function program12(depth0,data) {
190
+
191
+ var stack1, helper;
192
+ if (helper = helpers.loading) { stack1 = helper.call(depth0, {hash:{},data:data}); }
193
+ else { helper = (depth0 && depth0.loading); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
194
+ return escapeExpression(stack1);
195
+ }
177
196
 
178
- function program10(depth0,data,depth2) {
179
-
180
- var stack1;
181
- return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.available)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
182
- }
197
+ function program14(depth0,data,depth2) {
198
+
199
+ var stack1;
200
+ return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.loading)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
201
+ }
183
202
 
184
- function program12(depth0,data) {
185
-
186
- var stack1, helper;
187
- if (helper = helpers.loading) { stack1 = helper.call(depth0, {hash:{},data:data}); }
188
- else { helper = (depth0 && depth0.loading); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
189
- return escapeExpression(stack1);
190
- }
203
+ function program16(depth0,data) {
204
+
205
+
206
+ return "\n <div class=\"toolbox-container\"></div>\n ";
207
+ }
191
208
 
192
- function program14(depth0,data,depth2) {
193
-
194
- var stack1;
195
- return escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth2 && depth2.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.loading)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
196
- }
209
+ function program18(depth0,data) {
210
+
211
+ var buffer = "", stack1;
212
+ buffer += "\n <aside class=\"action-bar clearfix\">\n ";
213
+ stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.tools), {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data});
214
+ if(stack1 || stack1 === 0) { buffer += stack1; }
215
+ buffer += "\n </aside>\n ";
216
+ return buffer;
217
+ }
218
+ function program19(depth0,data) {
219
+
220
+ var buffer = "", stack1;
221
+ buffer += "\n <button class=\"btn-info small tool-";
222
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(22, program22, data),fn:self.program(20, program20, data),data:data});
223
+ if(stack1 || stack1 === 0) { buffer += stack1; }
224
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.massAction), {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data});
225
+ if(stack1 || stack1 === 0) { buffer += stack1; }
226
+ buffer += "\"\n ";
227
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
228
+ if(stack1 || stack1 === 0) { buffer += stack1; }
229
+ buffer += ">\n <span class=\"icon-";
230
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.program(30, program30, data),fn:self.program(28, program28, data),data:data});
231
+ if(stack1 || stack1 === 0) { buffer += stack1; }
232
+ buffer += "\"></span>\n ";
233
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.program(35, program35, data),fn:self.program(33, program33, data),data:data});
234
+ if(stack1 || stack1 === 0) { buffer += stack1; }
235
+ buffer += "\n </button>\n ";
236
+ return buffer;
237
+ }
238
+ function program20(depth0,data) {
239
+
240
+ var stack1, helper;
241
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
242
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
243
+ return escapeExpression(stack1);
244
+ }
197
245
 
198
- function program16(depth0,data) {
199
-
200
-
201
- return "\r\n <div class=\"toolbox-container\"></div>\r\n ";
202
- }
246
+ function program22(depth0,data) {
247
+
248
+ var stack1;
249
+ return escapeExpression(((stack1 = (data == null || data === false ? data : data.index)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
250
+ }
203
251
 
204
- function program18(depth0,data) {
205
-
206
- var buffer = "", stack1;
207
- buffer += "\r\n <aside class=\"action-bar clearfix\">\r\n ";
208
- stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.tools), {hash:{},inverse:self.noop,fn:self.program(19, program19, data),data:data});
209
- if(stack1 || stack1 === 0) { buffer += stack1; }
210
- buffer += "\r\n </aside>\r\n ";
211
- return buffer;
212
- }
213
- function program19(depth0,data) {
214
-
215
- var buffer = "", stack1;
216
- buffer += "\r\n <button class=\"btn-info small tool-";
217
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(22, program22, data),fn:self.program(20, program20, data),data:data});
218
- if(stack1 || stack1 === 0) { buffer += stack1; }
219
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.massAction), {hash:{},inverse:self.noop,fn:self.program(24, program24, data),data:data});
220
- if(stack1 || stack1 === 0) { buffer += stack1; }
221
- buffer += "\"\r\n ";
222
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
223
- if(stack1 || stack1 === 0) { buffer += stack1; }
224
- buffer += ">\r\n <span class=\"icon-";
225
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.program(30, program30, data),fn:self.program(28, program28, data),data:data});
226
- if(stack1 || stack1 === 0) { buffer += stack1; }
227
- buffer += "\"></span>\r\n ";
228
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.program(35, program35, data),fn:self.program(33, program33, data),data:data});
229
- if(stack1 || stack1 === 0) { buffer += stack1; }
230
- buffer += "\r\n </button>\r\n ";
231
- return buffer;
232
- }
233
- function program20(depth0,data) {
234
-
235
- var stack1, helper;
236
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
237
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
238
- return escapeExpression(stack1);
239
- }
252
+ function program24(depth0,data) {
253
+
254
+
255
+ return " invisible";
256
+ }
240
257
 
241
- function program22(depth0,data) {
242
-
243
- var stack1;
244
- return escapeExpression(((stack1 = (data == null || data === false ? data : data.index)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
245
- }
258
+ function program26(depth0,data) {
259
+
260
+ var buffer = "", stack1, helper;
261
+ buffer += " title=\"";
262
+ if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
263
+ else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
264
+ buffer += escapeExpression(stack1)
265
+ + "\"";
266
+ return buffer;
267
+ }
246
268
 
247
- function program24(depth0,data) {
248
-
249
-
250
- return " invisible";
251
- }
269
+ function program28(depth0,data) {
270
+
271
+ var stack1, helper;
272
+ if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
273
+ else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
274
+ return escapeExpression(stack1);
275
+ }
252
276
 
253
- function program26(depth0,data) {
254
-
255
- var buffer = "", stack1, helper;
256
- buffer += " title=\"";
257
- if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
258
- else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
259
- buffer += escapeExpression(stack1)
260
- + "\"";
261
- return buffer;
262
- }
277
+ function program30(depth0,data) {
278
+
279
+ var stack1;
280
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(31, program31, data),fn:self.program(20, program20, data),data:data});
281
+ if(stack1 || stack1 === 0) { return stack1; }
282
+ else { return ''; }
283
+ }
284
+ function program31(depth0,data) {
285
+
286
+ var stack1;
287
+ return escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
288
+ }
263
289
 
264
- function program28(depth0,data) {
265
-
266
- var stack1, helper;
267
- if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
268
- else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
269
- return escapeExpression(stack1);
270
- }
290
+ function program33(depth0,data) {
291
+
292
+ var stack1, helper;
293
+ if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
294
+ else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
295
+ return escapeExpression(stack1);
296
+ }
271
297
 
272
- function program30(depth0,data) {
273
-
274
- var stack1;
275
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(31, program31, data),fn:self.program(20, program20, data),data:data});
276
- if(stack1 || stack1 === 0) { return stack1; }
277
- else { return ''; }
278
- }
279
- function program31(depth0,data) {
280
-
281
- var stack1;
282
- return escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1));
283
- }
298
+ function program35(depth0,data) {
299
+
300
+ var stack1;
301
+ stack1 = helpers.unless.call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.noop,fn:self.program(31, program31, data),data:data});
302
+ if(stack1 || stack1 === 0) { return stack1; }
303
+ else { return ''; }
304
+ }
284
305
 
285
- function program33(depth0,data) {
286
-
287
- var stack1, helper;
288
- if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
289
- else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
290
- return escapeExpression(stack1);
291
- }
306
+ function program37(depth0,data) {
307
+
308
+
309
+ return "\n <col/>\n ";
310
+ }
292
311
 
293
- function program35(depth0,data) {
294
-
295
- var stack1;
296
- stack1 = helpers.unless.call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.noop,fn:self.program(31, program31, data),data:data});
297
- if(stack1 || stack1 === 0) { return stack1; }
298
- else { return ''; }
299
- }
312
+ function program39(depth0,data) {
313
+
314
+
315
+ return "\n </col>\n ";
316
+ }
300
317
 
301
- function program37(depth0,data) {
302
-
303
-
304
- return "\r\n <col/>\r\n ";
305
- }
318
+ function program41(depth0,data) {
319
+
320
+
321
+ return "\n <th class=\"checkboxes\"><input type=\"checkbox\" name=\"checkall\" value=\"1\" /></th>\n ";
322
+ }
306
323
 
307
- function program39(depth0,data) {
308
-
309
-
310
- return "\r\n </col>\r\n ";
311
- }
324
+ function program43(depth0,data) {
325
+
326
+ var buffer = "", stack1, helper;
327
+ buffer += "\n <th";
328
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.type), {hash:{},inverse:self.noop,fn:self.program(44, program44, data),data:data});
329
+ if(stack1 || stack1 === 0) { buffer += stack1; }
330
+ buffer += ">\n <div\n ";
331
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.sortable), {hash:{},inverse:self.noop,fn:self.program(46, program46, data),data:data});
332
+ if(stack1 || stack1 === 0) { buffer += stack1; }
333
+ buffer += ">";
334
+ if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
335
+ else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
336
+ buffer += escapeExpression(stack1);
337
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.alias), {hash:{},inverse:self.noop,fn:self.program(51, program51, data),data:data});
338
+ if(stack1 || stack1 === 0) { buffer += stack1; }
339
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.comment), {hash:{},inverse:self.noop,fn:self.program(53, program53, data),data:data});
340
+ if(stack1 || stack1 === 0) { buffer += stack1; }
341
+ buffer += "</div>\n ";
342
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.filterable), {hash:{},inverse:self.noop,fn:self.program(55, program55, data),data:data});
343
+ if(stack1 || stack1 === 0) { buffer += stack1; }
344
+ buffer += "\n </th>\n ";
345
+ return buffer;
346
+ }
347
+ function program44(depth0,data) {
348
+
349
+
350
+ return " class=\"actions\"";
351
+ }
312
352
 
313
- function program41(depth0,data) {
314
-
315
-
316
- return "\r\n <th class=\"checkboxes\"><input type=\"checkbox\" name=\"checkall\" value=\"1\" /></th>\r\n ";
317
- }
353
+ function program46(depth0,data) {
354
+
355
+ var buffer = "", stack1;
356
+ buffer += "\n class=\"sortable\"\n data-sort-by=\"";
357
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.sortId), {hash:{},inverse:self.program(20, program20, data),fn:self.program(47, program47, data),data:data});
358
+ if(stack1 || stack1 === 0) { buffer += stack1; }
359
+ buffer += "\"\n ";
360
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.sorttype), {hash:{},inverse:self.noop,fn:self.program(49, program49, data),data:data});
361
+ if(stack1 || stack1 === 0) { buffer += stack1; }
362
+ buffer += "\n tabindex=\"0\"\n ";
363
+ return buffer;
364
+ }
365
+ function program47(depth0,data) {
366
+
367
+ var stack1, helper;
368
+ if (helper = helpers.sortId) { stack1 = helper.call(depth0, {hash:{},data:data}); }
369
+ else { helper = (depth0 && depth0.sortId); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
370
+ return escapeExpression(stack1);
371
+ }
318
372
 
319
- function program43(depth0,data) {
320
-
321
- var buffer = "", stack1, helper;
322
- buffer += "\r\n <th";
323
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.type), {hash:{},inverse:self.noop,fn:self.program(44, program44, data),data:data});
324
- if(stack1 || stack1 === 0) { buffer += stack1; }
325
- buffer += ">\r\n <div\r\n ";
326
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.sortable), {hash:{},inverse:self.noop,fn:self.program(46, program46, data),data:data});
327
- if(stack1 || stack1 === 0) { buffer += stack1; }
328
- buffer += ">";
329
- if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
330
- else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
331
- buffer += escapeExpression(stack1)
332
- + "</div>\r\n ";
333
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.filterable), {hash:{},inverse:self.noop,fn:self.program(49, program49, data),data:data});
334
- if(stack1 || stack1 === 0) { buffer += stack1; }
335
- buffer += "\r\n </th>\r\n ";
336
- return buffer;
337
- }
338
- function program44(depth0,data) {
339
-
340
-
341
- return " class=\"actions\"";
342
- }
373
+ function program49(depth0,data) {
374
+
375
+ var buffer = "", stack1, helper;
376
+ buffer += "data-sort-type=\"";
377
+ if (helper = helpers.sorttype) { stack1 = helper.call(depth0, {hash:{},data:data}); }
378
+ else { helper = (depth0 && depth0.sorttype); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
379
+ buffer += escapeExpression(stack1)
380
+ + "\"";
381
+ return buffer;
382
+ }
343
383
 
344
- function program46(depth0,data) {
345
-
346
- var buffer = "", stack1, helper;
347
- buffer += "\r\n class=\"sortable\"\r\n data-sort-by=\"";
348
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
349
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
350
- buffer += escapeExpression(stack1)
351
- + "\"\r\n ";
352
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.sorttype), {hash:{},inverse:self.noop,fn:self.program(47, program47, data),data:data});
353
- if(stack1 || stack1 === 0) { buffer += stack1; }
354
- buffer += "\r\n tabindex=\"0\"\r\n ";
355
- return buffer;
356
- }
357
- function program47(depth0,data) {
358
-
359
- var buffer = "", stack1, helper;
360
- buffer += "data-sort-type=\"";
361
- if (helper = helpers.sorttype) { stack1 = helper.call(depth0, {hash:{},data:data}); }
362
- else { helper = (depth0 && depth0.sorttype); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
363
- buffer += escapeExpression(stack1)
364
- + "\"";
365
- return buffer;
366
- }
384
+ function program51(depth0,data) {
385
+
386
+ var buffer = "", stack1, helper;
387
+ buffer += " <span class=\"alias\">(";
388
+ if (helper = helpers.alias) { stack1 = helper.call(depth0, {hash:{},data:data}); }
389
+ else { helper = (depth0 && depth0.alias); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
390
+ buffer += escapeExpression(stack1)
391
+ + ")</span>";
392
+ return buffer;
393
+ }
367
394
 
368
- function program49(depth0,data) {
369
-
370
- var buffer = "", stack1, helper;
371
- buffer += "\r\n <aside data-column=\"";
372
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
373
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
374
- buffer += escapeExpression(stack1)
375
- + "\" class=\"filter column\r\n ";
376
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.customFilter), {hash:{},inverse:self.program(52, program52, data),fn:self.program(50, program50, data),data:data});
377
- if(stack1 || stack1 === 0) { buffer += stack1; }
378
- buffer += "\r\n </aside>\r\n ";
379
- return buffer;
380
- }
381
- function program50(depth0,data) {
382
-
383
- var buffer = "", stack1;
384
- buffer += " customInput\" >\r\n ";
385
- stack1 = ((stack1 = ((stack1 = (depth0 && depth0.customFilter)),stack1 == null || stack1 === false ? stack1 : stack1.template)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
386
- if(stack1 || stack1 === 0) { buffer += stack1; }
387
- buffer += "\r\n ";
388
- return buffer;
389
- }
395
+ function program53(depth0,data) {
396
+
397
+ var buffer = "", stack1, helper;
398
+ buffer += " <span class=\"comment\">/ ";
399
+ if (helper = helpers.comment) { stack1 = helper.call(depth0, {hash:{},data:data}); }
400
+ else { helper = (depth0 && depth0.comment); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
401
+ buffer += escapeExpression(stack1)
402
+ + "</span>";
403
+ return buffer;
404
+ }
390
405
 
391
- function program52(depth0,data) {
392
-
393
- var buffer = "", stack1, helper;
394
- buffer += " \">\r\n <input type=\"text\" value=\"\" name=\"filter[";
395
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
396
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
397
- buffer += escapeExpression(stack1)
398
- + "]\" placeholder=\""
399
- + escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.filterable)),stack1 == null || stack1 === false ? stack1 : stack1.placeholder)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
400
- + "\">\r\n <button class=\"icon-find\" type=\"button\"></button>\r\n ";
401
- return buffer;
402
- }
406
+ function program55(depth0,data) {
407
+
408
+ var buffer = "", stack1, helper;
409
+ buffer += "\n <aside data-column=\"";
410
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
411
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
412
+ buffer += escapeExpression(stack1)
413
+ + "\" class=\"filter column\n ";
414
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.customFilter), {hash:{},inverse:self.program(58, program58, data),fn:self.program(56, program56, data),data:data});
415
+ if(stack1 || stack1 === 0) { buffer += stack1; }
416
+ buffer += "\n </aside>\n ";
417
+ return buffer;
418
+ }
419
+ function program56(depth0,data) {
420
+
421
+ var buffer = "", stack1;
422
+ buffer += " customInput\" >\n ";
423
+ stack1 = ((stack1 = ((stack1 = (depth0 && depth0.customFilter)),stack1 == null || stack1 === false ? stack1 : stack1.template)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1);
424
+ if(stack1 || stack1 === 0) { buffer += stack1; }
425
+ buffer += "\n ";
426
+ return buffer;
427
+ }
403
428
 
404
- function program54(depth0,data) {
405
-
406
- var buffer = "", stack1;
407
- buffer += "\r\n <th class=\"actions\">"
408
- + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.actions)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
409
- + "</th>\r\n ";
410
- return buffer;
411
- }
429
+ function program58(depth0,data) {
430
+
431
+ var buffer = "", stack1, helper;
432
+ buffer += " \">\n <input type=\"text\" value=\"\" name=\"filter[";
433
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
434
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
435
+ buffer += escapeExpression(stack1)
436
+ + "]\" placeholder=\""
437
+ + escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.filterable)),stack1 == null || stack1 === false ? stack1 : stack1.placeholder)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
438
+ + "\">\n <button class=\"icon-find\" type=\"button\"></button>\n ";
439
+ return buffer;
440
+ }
412
441
 
413
- function program56(depth0,data,depth1) {
414
-
415
- var buffer = "", stack1, helper;
416
- buffer += "\r\n <tr data-item-identifier=\"";
417
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
418
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
419
- buffer += escapeExpression(stack1)
420
- + "\">\r\n ";
421
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(57, program57, data),data:data});
422
- if(stack1 || stack1 === 0) { buffer += stack1; }
423
- buffer += "\r\n\r\n ";
424
- stack1 = helpers.each.call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.programWithDepth(59, program59, data, depth0),data:data});
425
- if(stack1 || stack1 === 0) { buffer += stack1; }
426
- buffer += "\r\n\r\n ";
427
- stack1 = helpers['with'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(76, program76, data, depth0),data:data});
428
- if(stack1 || stack1 === 0) { buffer += stack1; }
429
- buffer += "\r\n </tr>\r\n ";
430
- return buffer;
431
- }
432
- function program57(depth0,data) {
433
-
434
- var buffer = "", stack1, helper;
435
- buffer += "\r\n <td class=\"checkboxes\"><input type=\"checkbox\" name=\"cb[";
436
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
437
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
438
- buffer += escapeExpression(stack1)
439
- + "]\" value=\"1\" /></td>\r\n ";
440
- return buffer;
441
- }
442
+ function program60(depth0,data) {
443
+
444
+ var buffer = "", stack1;
445
+ buffer += "\n <th class=\"actions\">"
446
+ + escapeExpression(((stack1 = ((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.labels)),stack1 == null || stack1 === false ? stack1 : stack1.actions)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
447
+ + "</th>\n ";
448
+ return buffer;
449
+ }
442
450
 
443
- function program59(depth0,data,depth1) {
444
-
445
- var buffer = "", stack1;
446
- buffer += "\r\n ";
447
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.type), {hash:{},inverse:self.programWithDepth(74, program74, data, depth1),fn:self.programWithDepth(60, program60, data, depth0, depth1),data:data});
448
- if(stack1 || stack1 === 0) { buffer += stack1; }
449
- buffer += "\r\n\r\n ";
450
- return buffer;
451
- }
452
- function program60(depth0,data,depth1,depth2) {
453
-
454
- var buffer = "", stack1, helper;
455
- buffer += "\r\n <td class=\"actions ";
456
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
457
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
458
- buffer += escapeExpression(stack1)
459
- + "\">\r\n ";
460
- stack1 = helpers.each.call(depth0, (depth1 && depth1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(61, program61, data, depth2),data:data});
461
- if(stack1 || stack1 === 0) { buffer += stack1; }
462
- buffer += "\r\n </td>\r\n ";
463
- return buffer;
464
- }
465
- function program61(depth0,data,depth3) {
466
-
467
- var buffer = "", stack1;
468
- buffer += "\r\n ";
469
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(71, program71, data),fn:self.programWithDepth(62, program62, data, depth3),data:data});
470
- if(stack1 || stack1 === 0) { buffer += stack1; }
471
- buffer += "\r\n\r\n ";
472
- return buffer;
473
- }
474
- function program62(depth0,data,depth4) {
475
-
476
- var buffer = "", stack1;
477
- buffer += "\r\n ";
478
- stack1 = helpers['with'].call(depth0, depth4, {hash:{},inverse:self.noop,fn:self.programWithDepth(63, program63, data, depth0),data:data});
479
- if(stack1 || stack1 === 0) { buffer += stack1; }
480
- buffer += "\r\n ";
481
- return buffer;
482
- }
483
- function program63(depth0,data,depth1) {
484
-
485
- var buffer = "", stack1;
486
- buffer += "\r\n ";
487
- stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(64, program64, data, depth1),data:data});
488
- if(stack1 || stack1 === 0) { buffer += stack1; }
489
- buffer += "\r\n ";
490
- return buffer;
491
- }
492
- function program64(depth0,data,depth2) {
493
-
494
- var buffer = "", stack1;
495
- buffer += "\r\n <button class=\"btn-info small "
496
- + escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
497
- + "\"\r\n ";
498
- stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(65, program65, data, depth2),data:data});
499
- if(stack1 || stack1 === 0) { buffer += stack1; }
500
- buffer += "\r\n ";
501
- stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(67, program67, data),data:data});
502
- if(stack1 || stack1 === 0) { buffer += stack1; }
503
- buffer += ">\r\n ";
504
- stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(69, program69, data, depth2),data:data});
505
- if(stack1 || stack1 === 0) { buffer += stack1; }
506
- buffer += "\r\n "
507
- + escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
508
- + "\r\n </button>\r\n ";
509
- return buffer;
510
- }
511
- function program65(depth0,data,depth3) {
512
-
513
- var buffer = "", stack1;
514
- buffer += " title=\""
515
- + escapeExpression(((stack1 = (depth3 && depth3.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
516
- + "\"";
517
- return buffer;
518
- }
451
+ function program62(depth0,data,depth1) {
452
+
453
+ var buffer = "", stack1, helper;
454
+ buffer += "\n <tr data-item-identifier=\"";
455
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
456
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
457
+ buffer += escapeExpression(stack1)
458
+ + "\">\n ";
459
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(63, program63, data),data:data});
460
+ if(stack1 || stack1 === 0) { buffer += stack1; }
461
+ buffer += "\n\n ";
462
+ stack1 = helpers.each.call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.programWithDepth(65, program65, data, depth0),data:data});
463
+ if(stack1 || stack1 === 0) { buffer += stack1; }
464
+ buffer += "\n\n ";
465
+ stack1 = helpers['with'].call(depth0, ((stack1 = (depth1 && depth1.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(82, program82, data, depth0),data:data});
466
+ if(stack1 || stack1 === 0) { buffer += stack1; }
467
+ buffer += "\n </tr>\n ";
468
+ return buffer;
469
+ }
470
+ function program63(depth0,data) {
471
+
472
+ var buffer = "", stack1, helper;
473
+ buffer += "\n <td class=\"checkboxes\"><input type=\"checkbox\" name=\"cb[";
474
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
475
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
476
+ buffer += escapeExpression(stack1)
477
+ + "]\" value=\"1\" /></td>\n ";
478
+ return buffer;
479
+ }
519
480
 
520
- function program67(depth0,data) {
521
-
522
-
523
- return " disabled=\"disabled\"";
524
- }
481
+ function program65(depth0,data,depth1) {
482
+
483
+ var buffer = "", stack1;
484
+ buffer += "\n ";
485
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.type), {hash:{},inverse:self.programWithDepth(80, program80, data, depth1),fn:self.programWithDepth(66, program66, data, depth0, depth1),data:data});
486
+ if(stack1 || stack1 === 0) { buffer += stack1; }
487
+ buffer += "\n\n ";
488
+ return buffer;
489
+ }
490
+ function program66(depth0,data,depth1,depth2) {
491
+
492
+ var buffer = "", stack1, helper;
493
+ buffer += "\n <td class=\"actions ";
494
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
495
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
496
+ buffer += escapeExpression(stack1)
497
+ + "\">\n ";
498
+ stack1 = helpers.each.call(depth0, (depth1 && depth1.actions), {hash:{},inverse:self.noop,fn:self.programWithDepth(67, program67, data, depth2),data:data});
499
+ if(stack1 || stack1 === 0) { buffer += stack1; }
500
+ buffer += "\n </td>\n ";
501
+ return buffer;
502
+ }
503
+ function program67(depth0,data,depth3) {
504
+
505
+ var buffer = "", stack1;
506
+ buffer += "\n ";
507
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(77, program77, data),fn:self.programWithDepth(68, program68, data, depth3),data:data});
508
+ if(stack1 || stack1 === 0) { buffer += stack1; }
509
+ buffer += "\n\n ";
510
+ return buffer;
511
+ }
512
+ function program68(depth0,data,depth4) {
513
+
514
+ var buffer = "", stack1;
515
+ buffer += "\n ";
516
+ stack1 = helpers['with'].call(depth0, depth4, {hash:{},inverse:self.noop,fn:self.programWithDepth(69, program69, data, depth0),data:data});
517
+ if(stack1 || stack1 === 0) { buffer += stack1; }
518
+ buffer += "\n ";
519
+ return buffer;
520
+ }
521
+ function program69(depth0,data,depth1) {
522
+
523
+ var buffer = "", stack1;
524
+ buffer += "\n ";
525
+ stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(70, program70, data, depth1),data:data});
526
+ if(stack1 || stack1 === 0) { buffer += stack1; }
527
+ buffer += "\n ";
528
+ return buffer;
529
+ }
530
+ function program70(depth0,data,depth2) {
531
+
532
+ var buffer = "", stack1;
533
+ buffer += "\n <button class=\"btn-info small "
534
+ + escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
535
+ + "\"\n ";
536
+ stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(71, program71, data, depth2),data:data});
537
+ if(stack1 || stack1 === 0) { buffer += stack1; }
538
+ buffer += "\n ";
539
+ stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(73, program73, data),data:data});
540
+ if(stack1 || stack1 === 0) { buffer += stack1; }
541
+ buffer += ">\n ";
542
+ stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(75, program75, data, depth2),data:data});
543
+ if(stack1 || stack1 === 0) { buffer += stack1; }
544
+ buffer += "\n "
545
+ + escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
546
+ + "\n </button>\n ";
547
+ return buffer;
548
+ }
549
+ function program71(depth0,data,depth3) {
550
+
551
+ var buffer = "", stack1;
552
+ buffer += " title=\""
553
+ + escapeExpression(((stack1 = (depth3 && depth3.title)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
554
+ + "\"";
555
+ return buffer;
556
+ }
525
557
 
526
- function program69(depth0,data,depth3) {
527
-
528
- var buffer = "", stack1;
529
- buffer += "<span class=\"icon-"
530
- + escapeExpression(((stack1 = (depth3 && depth3.icon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
531
- + "\"></span>";
532
- return buffer;
533
- }
558
+ function program73(depth0,data) {
559
+
560
+
561
+ return " disabled=\"disabled\"";
562
+ }
534
563
 
535
- function program71(depth0,data) {
536
-
537
- var buffer = "", stack1, helper;
538
- buffer += "\r\n <button class=\"btn-info small "
539
- + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
540
- + "\"\r\n ";
541
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
542
- if(stack1 || stack1 === 0) { buffer += stack1; }
543
- buffer += ">\r\n ";
544
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(72, program72, data),data:data});
545
- if(stack1 || stack1 === 0) { buffer += stack1; }
546
- buffer += "\r\n ";
547
- if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
548
- else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
549
- buffer += escapeExpression(stack1)
550
- + "\r\n </button>\r\n ";
551
- return buffer;
552
- }
553
- function program72(depth0,data) {
554
-
555
- var buffer = "", stack1, helper;
556
- buffer += "<span class=\"icon-";
557
- if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
558
- else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
559
- buffer += escapeExpression(stack1)
560
- + "\"></span> ";
561
- return buffer;
562
- }
564
+ function program75(depth0,data,depth3) {
565
+
566
+ var buffer = "", stack1;
567
+ buffer += "<span class=\"icon-"
568
+ + escapeExpression(((stack1 = (depth3 && depth3.icon)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
569
+ + "\"></span>";
570
+ return buffer;
571
+ }
563
572
 
564
- function program74(depth0,data,depth2) {
565
-
566
- var buffer = "", stack1, helper, options;
567
- buffer += "\r\n <td class=\"";
568
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
569
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
570
- buffer += escapeExpression(stack1)
571
- + "\">";
572
- stack1 = (helper = helpers.property || (depth0 && depth0.property),options={hash:{},data:data},helper ? helper.call(depth0, (depth0 && depth0.id), depth2, options) : helperMissing.call(depth0, "property", (depth0 && depth0.id), depth2, options));
573
- stack1 = (helper = helpers.dompurify || (depth0 && depth0.dompurify),options={hash:{},data:data},helper ? helper.call(depth0, stack1, options) : helperMissing.call(depth0, "dompurify", stack1, options));
574
- if(stack1 || stack1 === 0) { buffer += stack1; }
575
- buffer += "</td>\r\n ";
576
- return buffer;
577
- }
573
+ function program77(depth0,data) {
574
+
575
+ var buffer = "", stack1, helper;
576
+ buffer += "\n <button class=\"btn-info small "
577
+ + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
578
+ + "\"\n ";
579
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(26, program26, data),data:data});
580
+ if(stack1 || stack1 === 0) { buffer += stack1; }
581
+ buffer += ">\n ";
582
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(78, program78, data),data:data});
583
+ if(stack1 || stack1 === 0) { buffer += stack1; }
584
+ buffer += "\n ";
585
+ if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
586
+ else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
587
+ buffer += escapeExpression(stack1)
588
+ + "\n </button>\n ";
589
+ return buffer;
590
+ }
591
+ function program78(depth0,data) {
592
+
593
+ var buffer = "", stack1, helper;
594
+ buffer += "<span class=\"icon-";
595
+ if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
596
+ else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
597
+ buffer += escapeExpression(stack1)
598
+ + "\"></span> ";
599
+ return buffer;
600
+ }
578
601
 
579
- function program76(depth0,data,depth1) {
580
-
581
- var buffer = "", stack1;
582
- buffer += "\r\n <td class=\"actions\">\r\n ";
583
- stack1 = helpers.each.call(depth0, depth0, {hash:{},inverse:self.noop,fn:self.programWithDepth(77, program77, data, depth1),data:data});
584
- if(stack1 || stack1 === 0) { buffer += stack1; }
585
- buffer += "\r\n </td>\r\n ";
586
- return buffer;
587
- }
588
- function program77(depth0,data,depth2) {
589
-
590
- var buffer = "", stack1;
591
- buffer += "\r\n ";
592
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(82, program82, data),fn:self.programWithDepth(78, program78, data, depth2),data:data});
593
- if(stack1 || stack1 === 0) { buffer += stack1; }
594
- buffer += "\r\n ";
595
- return buffer;
596
- }
597
- function program78(depth0,data,depth3) {
598
-
599
- var buffer = "", stack1;
600
- buffer += "\r\n ";
601
- stack1 = helpers['with'].call(depth0, depth3, {hash:{},inverse:self.noop,fn:self.programWithDepth(79, program79, data, depth0),data:data});
602
- if(stack1 || stack1 === 0) { buffer += stack1; }
603
- buffer += "\r\n ";
604
- return buffer;
605
- }
606
- function program79(depth0,data,depth1) {
607
-
608
- var buffer = "", stack1;
609
- buffer += "\r\n ";
610
- stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(80, program80, data, depth1),data:data});
611
- if(stack1 || stack1 === 0) { buffer += stack1; }
612
- buffer += "\r\n ";
613
- return buffer;
614
- }
615
- function program80(depth0,data,depth2) {
616
-
617
- var buffer = "", stack1;
618
- buffer += "\r\n <button class=\"btn-info small "
619
- + escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
620
- + "\"\r\n ";
621
- stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(65, program65, data, depth2),data:data});
622
- if(stack1 || stack1 === 0) { buffer += stack1; }
623
- buffer += "\r\n ";
624
- stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(67, program67, data),data:data});
625
- if(stack1 || stack1 === 0) { buffer += stack1; }
626
- buffer += ">\r\n ";
627
- stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(69, program69, data, depth2),data:data});
628
- if(stack1 || stack1 === 0) { buffer += stack1; }
629
- buffer += "\r\n "
630
- + escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
631
- + "\r\n </button>\r\n ";
632
- return buffer;
633
- }
602
+ function program80(depth0,data,depth2) {
603
+
604
+ var buffer = "", stack1, helper, options;
605
+ buffer += "\n <td class=\"";
606
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
607
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
608
+ buffer += escapeExpression(stack1)
609
+ + "\">";
610
+ stack1 = (helper = helpers.property || (depth0 && depth0.property),options={hash:{},data:data},helper ? helper.call(depth0, (depth0 && depth0.id), depth2, options) : helperMissing.call(depth0, "property", (depth0 && depth0.id), depth2, options));
611
+ stack1 = (helper = helpers.dompurify || (depth0 && depth0.dompurify),options={hash:{},data:data},helper ? helper.call(depth0, stack1, options) : helperMissing.call(depth0, "dompurify", stack1, options));
612
+ if(stack1 || stack1 === 0) { buffer += stack1; }
613
+ buffer += "</td>\n ";
614
+ return buffer;
615
+ }
634
616
 
635
- function program82(depth0,data) {
636
-
637
- var buffer = "", stack1;
638
- buffer += "\r\n <button class=\"btn-info small "
639
- + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
640
- + "\"><span class=\"icon-"
641
- + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
642
- + "\"></span> "
643
- + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
644
- + "</button>\r\n ";
645
- return buffer;
646
- }
617
+ function program82(depth0,data,depth1) {
618
+
619
+ var buffer = "", stack1;
620
+ buffer += "\n <td class=\"actions\">\n ";
621
+ stack1 = helpers.each.call(depth0, depth0, {hash:{},inverse:self.noop,fn:self.programWithDepth(83, program83, data, depth1),data:data});
622
+ if(stack1 || stack1 === 0) { buffer += stack1; }
623
+ buffer += "\n </td>\n ";
624
+ return buffer;
625
+ }
626
+ function program83(depth0,data,depth2) {
627
+
628
+ var buffer = "", stack1;
629
+ buffer += "\n ";
630
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.id), {hash:{},inverse:self.program(88, program88, data),fn:self.programWithDepth(84, program84, data, depth2),data:data});
631
+ if(stack1 || stack1 === 0) { buffer += stack1; }
632
+ buffer += "\n ";
633
+ return buffer;
634
+ }
635
+ function program84(depth0,data,depth3) {
636
+
637
+ var buffer = "", stack1;
638
+ buffer += "\n ";
639
+ stack1 = helpers['with'].call(depth0, depth3, {hash:{},inverse:self.noop,fn:self.programWithDepth(85, program85, data, depth0),data:data});
640
+ if(stack1 || stack1 === 0) { buffer += stack1; }
641
+ buffer += "\n ";
642
+ return buffer;
643
+ }
644
+ function program85(depth0,data,depth1) {
645
+
646
+ var buffer = "", stack1;
647
+ buffer += "\n ";
648
+ stack1 = helpers.unless.call(depth0, (depth1 && depth1.hidden), {hash:{},inverse:self.noop,fn:self.programWithDepth(86, program86, data, depth1),data:data});
649
+ if(stack1 || stack1 === 0) { buffer += stack1; }
650
+ buffer += "\n ";
651
+ return buffer;
652
+ }
653
+ function program86(depth0,data,depth2) {
654
+
655
+ var buffer = "", stack1;
656
+ buffer += "\n <button class=\"btn-info small "
657
+ + escapeExpression(((stack1 = (depth2 && depth2.id)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
658
+ + "\"\n ";
659
+ stack1 = helpers['if'].call(depth0, (depth2 && depth2.title), {hash:{},inverse:self.noop,fn:self.programWithDepth(71, program71, data, depth2),data:data});
660
+ if(stack1 || stack1 === 0) { buffer += stack1; }
661
+ buffer += "\n ";
662
+ stack1 = helpers['if'].call(depth0, (depth2 && depth2.disabled), {hash:{},inverse:self.noop,fn:self.program(73, program73, data),data:data});
663
+ if(stack1 || stack1 === 0) { buffer += stack1; }
664
+ buffer += ">\n ";
665
+ stack1 = helpers['if'].call(depth0, (depth2 && depth2.icon), {hash:{},inverse:self.noop,fn:self.programWithDepth(75, program75, data, depth2),data:data});
666
+ if(stack1 || stack1 === 0) { buffer += stack1; }
667
+ buffer += "\n "
668
+ + escapeExpression(((stack1 = (depth2 && depth2.label)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
669
+ + "\n </button>\n ";
670
+ return buffer;
671
+ }
647
672
 
648
- function program84(depth0,data) {
649
-
650
- var buffer = "", stack1;
651
- buffer += "\r\n ";
652
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText), {hash:{},inverse:self.noop,fn:self.program(85, program85, data),data:data});
653
- if(stack1 || stack1 === 0) { buffer += stack1; }
654
- buffer += "\r\n ";
655
- return buffer;
656
- }
657
- function program85(depth0,data) {
658
-
659
- var buffer = "", stack1;
660
- buffer += "\r\n <div class=\"empty\">\r\n "
661
- + escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
662
- + "\r\n </div>\r\n ";
663
- return buffer;
664
- }
673
+ function program88(depth0,data) {
674
+
675
+ var buffer = "", stack1;
676
+ buffer += "\n <button class=\"btn-info small "
677
+ + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
678
+ + "\"><span class=\"icon-"
679
+ + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
680
+ + "\"></span> "
681
+ + escapeExpression(((stack1 = (data == null || data === false ? data : data.key)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
682
+ + "</button>\n ";
683
+ return buffer;
684
+ }
665
685
 
666
- buffer += "<div class=\"datatable-wrapper\">\r\n\r\n ";
667
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
668
- if(stack1 || stack1 === 0) { buffer += stack1; }
669
- buffer += "\r\n\r\n <div class=\"datatable-header\">\r\n ";
670
- stack1 = helpers['with'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.status), {hash:{},inverse:self.noop,fn:self.programWithDepth(3, program3, data, depth0),data:data});
671
- if(stack1 || stack1 === 0) { buffer += stack1; }
672
- buffer += "\r\n\r\n ";
673
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.pageSizeSelector), {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
674
- if(stack1 || stack1 === 0) { buffer += stack1; }
675
- buffer += "\r\n </div>\r\n\r\n ";
676
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.tools), {hash:{},inverse:self.noop,fn:self.program(18, program18, data),data:data});
677
- if(stack1 || stack1 === 0) { buffer += stack1; }
678
- buffer += "\r\n\r\n <div class=\"datatable-pagination-top\"></div>\r\n\r\n <div class=\"datatable-container\">\r\n <table class=\"matrix datatable\">\r\n <colgroup>\r\n ";
679
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(37, program37, data),data:data});
680
- if(stack1 || stack1 === 0) { buffer += stack1; }
681
- buffer += "\r\n ";
682
- stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(37, program37, data),data:data});
683
- if(stack1 || stack1 === 0) { buffer += stack1; }
684
- buffer += "\r\n ";
685
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(39, program39, data),data:data});
686
- if(stack1 || stack1 === 0) { buffer += stack1; }
687
- buffer += "\r\n </colgroup>\r\n <thead>\r\n <tr>\r\n ";
688
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(41, program41, data),data:data});
689
- if(stack1 || stack1 === 0) { buffer += stack1; }
690
- buffer += "\r\n ";
691
- stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(43, program43, data),data:data});
692
- if(stack1 || stack1 === 0) { buffer += stack1; }
693
- buffer += "\r\n ";
694
- stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(54, program54, data),data:data});
695
- if(stack1 || stack1 === 0) { buffer += stack1; }
696
- buffer += "\r\n </tr>\r\n </thead>\r\n <tbody>\r\n ";
697
- stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.programWithDepth(56, program56, data, depth0),data:data});
698
- if(stack1 || stack1 === 0) { buffer += stack1; }
699
- buffer += "\r\n </tbody>\r\n </table>\r\n ";
700
- stack1 = helpers.unless.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.program(84, program84, data),data:data});
701
- if(stack1 || stack1 === 0) { buffer += stack1; }
702
- buffer += "\r\n </div>\r\n <div class=\"datatable-pagination-bottom\"></div>\r\n</div>\r\n";
703
- return buffer;
704
- });
705
- function layout(data, options, asString) {
706
- var html = Template(data, options);
707
- return (asString || true) ? html : $(html);
708
- }
709
-
710
- if (!Helpers0.__initialized) {
711
- Helpers0(Handlebars);
712
- Helpers0.__initialized = true;
713
- }
714
- var Template$1 = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
715
- this.compilerInfo = [4,'>= 1.0.0'];
716
- helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
717
- var buffer = "", stack1, helper, functionType="function", escapeExpression=this.escapeExpression, self=this;
718
-
719
- function program1(depth0,data) {
720
-
721
- var buffer = "", stack1, helper;
722
- buffer += " title=\"";
723
- if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
724
- else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
725
- buffer += escapeExpression(stack1)
726
- + "\"";
727
- return buffer;
728
- }
686
+ function program90(depth0,data) {
687
+
688
+ var buffer = "", stack1;
689
+ buffer += "\n ";
690
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText), {hash:{},inverse:self.noop,fn:self.program(91, program91, data),data:data});
691
+ if(stack1 || stack1 === 0) { buffer += stack1; }
692
+ buffer += "\n ";
693
+ return buffer;
694
+ }
695
+ function program91(depth0,data) {
696
+
697
+ var buffer = "", stack1;
698
+ buffer += "\n <div class=\"empty\">\n "
699
+ + escapeExpression(((stack1 = ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.emptyText)),typeof stack1 === functionType ? stack1.apply(depth0) : stack1))
700
+ + "\n </div>\n ";
701
+ return buffer;
702
+ }
729
703
 
730
- function program3(depth0,data) {
731
-
732
-
733
- return " disabled=\"disabled\"";
704
+ buffer += "<div class=\"datatable-wrapper\">\n\n ";
705
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.filter), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
706
+ if(stack1 || stack1 === 0) { buffer += stack1; }
707
+ buffer += "\n\n <div class=\"datatable-header\">\n ";
708
+ stack1 = helpers['with'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.status), {hash:{},inverse:self.noop,fn:self.programWithDepth(3, program3, data, depth0),data:data});
709
+ if(stack1 || stack1 === 0) { buffer += stack1; }
710
+ buffer += "\n\n ";
711
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.pageSizeSelector), {hash:{},inverse:self.noop,fn:self.program(16, program16, data),data:data});
712
+ if(stack1 || stack1 === 0) { buffer += stack1; }
713
+ buffer += "\n </div>\n\n ";
714
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.tools), {hash:{},inverse:self.noop,fn:self.program(18, program18, data),data:data});
715
+ if(stack1 || stack1 === 0) { buffer += stack1; }
716
+ buffer += "\n\n <div class=\"datatable-pagination-top\"></div>\n\n <div class=\"datatable-container\">\n <table class=\"matrix datatable\">\n <colgroup>\n ";
717
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(37, program37, data),data:data});
718
+ if(stack1 || stack1 === 0) { buffer += stack1; }
719
+ buffer += "\n ";
720
+ stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(37, program37, data),data:data});
721
+ if(stack1 || stack1 === 0) { buffer += stack1; }
722
+ buffer += "\n ";
723
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(39, program39, data),data:data});
724
+ if(stack1 || stack1 === 0) { buffer += stack1; }
725
+ buffer += "\n </colgroup>\n <thead>\n <tr>\n ";
726
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.selectable), {hash:{},inverse:self.noop,fn:self.program(41, program41, data),data:data});
727
+ if(stack1 || stack1 === 0) { buffer += stack1; }
728
+ buffer += "\n ";
729
+ stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.model), {hash:{},inverse:self.noop,fn:self.program(43, program43, data),data:data});
730
+ if(stack1 || stack1 === 0) { buffer += stack1; }
731
+ buffer += "\n ";
732
+ stack1 = helpers['if'].call(depth0, ((stack1 = (depth0 && depth0.options)),stack1 == null || stack1 === false ? stack1 : stack1.actions), {hash:{},inverse:self.noop,fn:self.program(60, program60, data),data:data});
733
+ if(stack1 || stack1 === 0) { buffer += stack1; }
734
+ buffer += "\n </tr>\n </thead>\n <tbody>\n ";
735
+ stack1 = helpers.each.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.programWithDepth(62, program62, data, depth0),data:data});
736
+ if(stack1 || stack1 === 0) { buffer += stack1; }
737
+ buffer += "\n </tbody>\n </table>\n ";
738
+ stack1 = helpers.unless.call(depth0, ((stack1 = (depth0 && depth0.dataset)),stack1 == null || stack1 === false ? stack1 : stack1.data), {hash:{},inverse:self.noop,fn:self.program(90, program90, data),data:data});
739
+ if(stack1 || stack1 === 0) { buffer += stack1; }
740
+ buffer += "\n </div>\n <div class=\"datatable-pagination-bottom\"></div>\n</div>\n";
741
+ return buffer;
742
+ });
743
+ function layout(data, options, asString) {
744
+ var html = Template(data, options);
745
+ return (asString || true) ? html : $(html);
734
746
  }
735
747
 
736
- function program5(depth0,data) {
737
-
738
- var buffer = "", stack1, helper;
739
- buffer += "<span class=\"icon-";
740
- if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
741
- else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
742
- buffer += escapeExpression(stack1)
743
- + "\"></span>";
744
- return buffer;
748
+ if (!Helpers0.__initialized) {
749
+ Helpers0(Handlebars);
750
+ Helpers0.__initialized = true;
745
751
  }
752
+ var Template$1 = Handlebars.template(function (Handlebars,depth0,helpers,partials,data) {
753
+ this.compilerInfo = [4,'>= 1.0.0'];
754
+ helpers = this.merge(helpers, Handlebars.helpers); data = data || {};
755
+ var buffer = "", stack1, helper, functionType="function", escapeExpression=this.escapeExpression, self=this;
756
+
757
+ function program1(depth0,data) {
758
+
759
+ var buffer = "", stack1, helper;
760
+ buffer += " title=\"";
761
+ if (helper = helpers.title) { stack1 = helper.call(depth0, {hash:{},data:data}); }
762
+ else { helper = (depth0 && depth0.title); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
763
+ buffer += escapeExpression(stack1)
764
+ + "\"";
765
+ return buffer;
766
+ }
746
767
 
747
- function program7(depth0,data) {
748
-
749
- var stack1, helper;
750
- if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
751
- else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
752
- return escapeExpression(stack1);
753
- }
768
+ function program3(depth0,data) {
769
+
770
+
771
+ return " disabled=\"disabled\"";
772
+ }
754
773
 
755
- buffer += "<button class=\"btn-info small ";
756
- if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
757
- else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
758
- buffer += escapeExpression(stack1)
759
- + "\"\r\n ";
760
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
761
- if(stack1 || stack1 === 0) { buffer += stack1; }
762
- buffer += "\r\n ";
763
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.disabled), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
764
- if(stack1 || stack1 === 0) { buffer += stack1; }
765
- buffer += ">\r\n ";
766
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
767
- if(stack1 || stack1 === 0) { buffer += stack1; }
768
- buffer += "\r\n ";
769
- stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
770
- if(stack1 || stack1 === 0) { buffer += stack1; }
771
- buffer += "\r\n</button>\r\n";
772
- return buffer;
773
- });
774
- function buttonTpl(data, options, asString) {
775
- var html = Template$1(data, options);
776
- return (asString || true) ? html : $(html);
777
- }
778
-
779
- var ns = 'datatable';
780
- var dataNs = 'ui.' + ns;
781
- var defaults = {
782
- atomicUpdate: false,
783
- start: 0,
784
- rows: 25,
785
- page: 1,
786
- sortby: 'id',
787
- sortorder: 'asc',
788
- sorttype: 'string',
789
- paginationStrategyTop: 'none',
790
- paginationStrategyBottom: 'simple',
791
- labels: {
792
- filter: __('Filter'),
793
- empty: __('Nothing to list!'),
794
- available: __('Available'),
795
- loading: __('Loading'),
796
- actions: __('Actions')
797
- },
798
- pageSizeSelector: false
799
- };
800
- var logger = loggerFactory('ui/datatable');
801
- /**
802
- * The CSS class used to hide an element
803
- * @type {String}
804
- */
805
-
806
- var hiddenCls = 'hidden';
807
- /**
808
- * Deactivate pagination's
809
- * @param {Array} pagination
810
- */
811
-
812
- var disablePagination = function disablePagination(pagination) {
813
- if (pagination && pagination.length) {
814
- pagination.forEach(function (step) {
815
- step.disable();
816
- });
817
- }
818
- };
819
- /**
820
- * Activate pagination's
821
- * @param {Array} pagination
822
- */
774
+ function program5(depth0,data) {
775
+
776
+ var buffer = "", stack1, helper;
777
+ buffer += "<span class=\"icon-";
778
+ if (helper = helpers.icon) { stack1 = helper.call(depth0, {hash:{},data:data}); }
779
+ else { helper = (depth0 && depth0.icon); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
780
+ buffer += escapeExpression(stack1)
781
+ + "\"></span>";
782
+ return buffer;
783
+ }
823
784
 
785
+ function program7(depth0,data) {
786
+
787
+ var stack1, helper;
788
+ if (helper = helpers.label) { stack1 = helper.call(depth0, {hash:{},data:data}); }
789
+ else { helper = (depth0 && depth0.label); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
790
+ return escapeExpression(stack1);
791
+ }
824
792
 
825
- var enablePagination = function enablePagination(pagination) {
826
- if (pagination && pagination.length) {
827
- pagination.forEach(function (step) {
828
- step.enable();
793
+ buffer += "<button class=\"btn-info small ";
794
+ if (helper = helpers.id) { stack1 = helper.call(depth0, {hash:{},data:data}); }
795
+ else { helper = (depth0 && depth0.id); stack1 = typeof helper === functionType ? helper.call(depth0, {hash:{},data:data}) : helper; }
796
+ buffer += escapeExpression(stack1)
797
+ + "\"\n ";
798
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.title), {hash:{},inverse:self.noop,fn:self.program(1, program1, data),data:data});
799
+ if(stack1 || stack1 === 0) { buffer += stack1; }
800
+ buffer += "\n ";
801
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.disabled), {hash:{},inverse:self.noop,fn:self.program(3, program3, data),data:data});
802
+ if(stack1 || stack1 === 0) { buffer += stack1; }
803
+ buffer += ">\n ";
804
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.icon), {hash:{},inverse:self.noop,fn:self.program(5, program5, data),data:data});
805
+ if(stack1 || stack1 === 0) { buffer += stack1; }
806
+ buffer += "\n ";
807
+ stack1 = helpers['if'].call(depth0, (depth0 && depth0.label), {hash:{},inverse:self.noop,fn:self.program(7, program7, data),data:data});
808
+ if(stack1 || stack1 === 0) { buffer += stack1; }
809
+ buffer += "\n</button>\n";
810
+ return buffer;
829
811
  });
812
+ function buttonTpl(data, options, asString) {
813
+ var html = Template$1(data, options);
814
+ return (asString || true) ? html : $(html);
830
815
  }
831
- };
832
- /**
833
- * Helper for reading actions value in context
834
- *
835
- * @param {String} property
836
- * @param {Object} action
837
- * @param {Object} context
838
- */
839
-
840
-
841
- var getPropertyValue = function getPropertyValue(property, action, context) {
842
- var value = action[property];
843
- return _.isFunction(value) ? value.apply(context) : value;
844
- };
845
- /**
846
- * Update the data table status in the header
847
- *
848
- * @param {Object} options
849
- * @param {jQueryElement} $container
850
- * @param {Object} dataset
851
- */
852
-
853
-
854
- var updateHeaderStatus = function updateHeaderStatus(options, $container, dataset) {
855
- if (!options.status) {
856
- return;
857
- }
858
-
859
- var $statusEmpty = $container.find('.empty-list');
860
- var $statusAvailable = $container.find('.available-list');
861
- var $statusCount = $statusAvailable.find('.count');
862
- $container.find('.loading').addClass(hiddenCls); // when the status is enabled, the response must contain the total amount of records
863
-
864
- var amount = dataset.amount || dataset.length;
865
816
 
866
- if (amount) {
867
- $statusCount.text(amount);
868
- $statusAvailable.removeClass(hiddenCls);
869
- $statusEmpty.addClass(hiddenCls);
870
- } else {
871
- $statusEmpty.removeClass(hiddenCls);
872
- $statusAvailable.addClass(hiddenCls);
873
- }
874
- };
875
- /**
876
- * The dataTable component makes you able to browse items and bind specific
877
- * actions to undertake for edition and removal of them.
878
- *
879
- * Parameters that will be send to backend by component:
880
- *
881
- * Pagination
882
- * @param {Number} rows - count of rows, that should be returned from backend, in other words limit.
883
- * @param {Number} page - number of page, that should be requested.
884
- *
885
- * Sorting
886
- * @param {String} sortby - name of column
887
- * @param {String} sortorder - order of sorting, can be 'asc' or 'desc' for ascending sorting and descending sorting respectively.
888
- * @param {String} sorttype - type of sorting, can be 'string' or 'numeric' for proper sorting numeric and string values.
889
- *
890
- * Filtering
891
- * @param {String} filterstrategy - filtering strategy. Default is single (see ui/datatable/filterStrategy/single.js).
892
- * @param {String} filterquery - query string for filtering of rows.
893
- * @param {String[]} filtercolumns[] - array of columns, in which will be implemented search during filtering process.
894
- * For column filter it will be only one item with column name, but component has ability define list of columns for default filter (in top toolbar).
895
- * Backend should correctly receive this list of columns and do search in accordance with this parameters.
896
- * By default, columns are not defined, so this parameter not will be sent. If filtercolumns[] not exists, backend should search by all columns.
897
- *
898
- * @example of query (GET): rows=25&page=1&sortby=login&sortorder=asc&filterquery=loginame&filtercolumns[]=login
899
- *
900
- * @exports ui/datatable
901
- */
902
-
903
-
904
- var dataTable = {
905
- /**
906
- * Used for generating action button action button
907
- * @typedef Action
908
- * @type {Object}
909
- * @property {String} id ID is added to the button class
910
- * @property {String} [title] Button title
911
- * @property {Boolean} [disabled] When present, button should be disabled
912
- * @property {String} [icon] Generate button icon
913
- * @property {Boolean} [hidden] When present, button is hidden
914
- * @property {Function} [action] Handler on button click
817
+ /**
818
+ * This program is free software; you can redistribute it and/or
819
+ * modify it under the terms of the GNU General Public License
820
+ * as published by the Free Software Foundation; under version 2
821
+ * of the License (non-upgradable).
822
+ *
823
+ * This program is distributed in the hope that it will be useful,
824
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
825
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
826
+ * GNU General Public License for more details.
827
+ *
828
+ * You should have received a copy of the GNU General Public License
829
+ * along with this program; if not, write to the Free Software
830
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
831
+ *
832
+ * Copyright (c) 2015-2020 (original work) Open Assessment Technologies SA;
915
833
  */
916
-
917
- /**
918
- * Used for generating action button from Object
919
- * @deprecated
920
- * @typedef {{
921
- * [key: Action.id & Action.icon & Action.title ]: Action.action,
922
- * }} ActionsObject
923
- *
924
- * @example
925
- * {
926
- * actions: {
927
- * edit: editUser,
928
- * remove: removeUser,
929
- * }
930
- * }
931
- *
932
- * ! IMPORTANT USE INSTEAD:
933
- * {
934
- * actions: [
935
- * {
936
- * id: "edit",
937
- * title: __("Edit"),
938
- * icon: "edit",
939
- * action: editUser
940
- * },
941
- * {
942
- * id: "edit",
943
- * title: __("Edit"),
944
- * icon: "edit",
945
- * action: editUser
946
- * }
947
- * ]
948
- * }
834
+ const ns = 'datatable';
835
+ const dataNs = 'ui.' + ns;
836
+ const defaults = {
837
+ atomicUpdate: false,
838
+ start: 0,
839
+ rows: 25,
840
+ page: 1,
841
+ sortby: 'id',
842
+ sortorder: 'asc',
843
+ sorttype: 'string',
844
+ paginationStrategyTop: 'none',
845
+ paginationStrategyBottom: 'simple',
846
+ labels: {
847
+ filter: __('Filter'),
848
+ empty: __('Nothing to list!'),
849
+ available: __('Available'),
850
+ loading: __('Loading'),
851
+ actions: __('Actions')
852
+ },
853
+ pageSizeSelector: false
854
+ };
855
+ const logger = loggerFactory('ui/datatable');
856
+
857
+ /**
858
+ * The CSS class used to hide an element
859
+ * @type {String}
949
860
  */
861
+ const hiddenCls = 'hidden';
950
862
 
951
- /**
952
- * Initialize the plugin.
953
- *
954
- * Called the jQuery way once registered by the Pluginifier.
955
- * @example $('selector').datatable([], {});
956
- *
957
- * @constructor
958
- * @param {Object} options - the plugin options.
959
- * @param {String} options.url - the URL of the service used to retrieve the resources.
960
- * @param {Object[]} options.model - the model definition.
961
- * @param {ActionsObject | Action[]} options.actions - Generates action buttons
962
- * @param {Function} options.listeners.xxx - the callback function for event xxx, parameters depends to event trigger call.
963
- * @param {Boolean} options.selectable - enables the selection of rows using checkboxes.
964
- * @param {Boolean} options.rowSelection - enables the selection of rows by clicking on them.
965
- * @param {Object} options.tools - a list of tool buttons to display above the table.
966
- * @param {Object|Boolean} options.status - allow to display a status bar.
967
- * @param {Object|Boolean} options.filter - allow to display a filter bar.
968
- * @param {String} options.filterStrategy - 'multiple' | 'single' -- filtered by all filters together or filtering allowed only by one field at the moment (default 'single'),
969
- * @param {String} options.filterSelector - css selector for search of filter inputs, by defaul 'select, input'
970
- * @param {String} options.filterTransform - transform filter value before send to server.
971
- * @param {String[]} options.filter.columns - a list of columns that will be used for default filter. Can be overridden by column filter.
972
- * @param {String} options.filterquery - a query string for filtering, using only in runtime.
973
- * @param {String[]} options.filtercolumns - a list of columns, in that should be done search, using only in runtime.
974
- * @param {String} options.paginationStrategyTop - 'none' | 'pages' | 'simple' -- 'none' by default (next/prev), 'pages' show pages and extended control for pagination
975
- * @param {String} options.paginationStrategyBottom - 'none' | 'pages' | 'simple' -- 'simple' by default (next/prev), 'pages' show pages and extended control for pagination
976
- * @param {Object} options.labels - list of labels in datatable interface, that can be overridden by incoming options
977
- * @param {String} options.emptyText - text that will be shown when no data found for showing in the grid.
978
- * @param {Boolean} options.pageSizeSelector - flag that indicates if control for changing page size should be displayed
979
- * @param {Boolean} options.atomicUpdate - allowed to keep the datatable state to be able on "render" event, compare with new state and atomically update the table cells.
980
- * @param {Function} options.requestInterceptor - Intercept sending AJAX request. The call of function must returns promise with provided data.
981
- * @param {Object} [data] - inject predefined data to avoid the first query.
982
- * @fires dataTable#create.datatable
983
- * @returns {jQueryElement} for chaining
863
+ /**
864
+ * Deactivate pagination's
865
+ * @param {Array} pagination
984
866
  */
985
- init: function init(options, data) {
986
- options = _.defaults(options, defaults);
987
- return this.each(function () {
988
- var $elt = $$1(this);
989
- var currentOptions = $elt.data(dataNs);
990
-
991
- if (options.atomicUpdate && data) {
992
- $elt.data("".concat(dataNs, "state"), data.data);
993
- } // implement encapsulated pages for the datatable
994
-
995
-
996
- $elt.paginations = [];
997
-
998
- if (!currentOptions) {
999
- //add data to the element
1000
- $elt.data(dataNs, options);
1001
- $elt.one('load.' + ns, function () {
1002
- /**
1003
- * @event dataTable#create.datatable
1004
- */
1005
- $elt.trigger('create.' + ns);
1006
- });
1007
-
1008
- if (data) {
1009
- dataTable._render($elt, data);
1010
- } else {
1011
- dataTable._query($elt);
1012
- }
1013
- } else {
1014
- // update existing options
1015
- $elt.data(dataNs, _.merge(currentOptions, options));
867
+ const disablePagination = pagination => {
868
+ if (pagination && pagination.length) {
869
+ pagination.forEach(step => {
870
+ step.disable();
871
+ });
872
+ }
873
+ };
1016
874
 
1017
- dataTable._refresh($elt, data);
1018
- }
1019
- });
1020
- },
1021
-
1022
- /**
1023
- * Refresh the data table using current options
1024
- *
1025
- * Called the jQuery way once registered by the Pluginifier.
1026
- * @example $('selector').datatable('refresh');
1027
- *
1028
- * @param {jQueryElement} $elt - plugin's element
1029
- * @param {Object} [data] - Data to render immediately, prevents the query to be made.
875
+ /**
876
+ * Activate pagination's
877
+ * @param {Array} pagination
1030
878
  */
1031
- _refresh: function _refresh($elt, data) {
1032
- if (data) {
1033
- this._render($elt, data);
1034
- } else {
1035
- this._query($elt);
879
+ const enablePagination = pagination => {
880
+ if (pagination && pagination.length) {
881
+ pagination.forEach(step => {
882
+ step.enable();
883
+ });
1036
884
  }
1037
- },
1038
-
1039
- /**
1040
- * Query the server for data and load the table.
1041
- *
1042
- * @private
1043
- * @param {jQueryElement} $elt - plugin's element
1044
- * @param $filter
1045
- * @fires dataTable#query.datatable
885
+ };
886
+
887
+ /**
888
+ * Helper for reading actions value in context
889
+ *
890
+ * @param {String} property
891
+ * @param {Object} action
892
+ * @param {Object} context
1046
893
  */
1047
- _query: function _query($elt, $filter) {
1048
- var self = this;
1049
- var options = $elt.data(dataNs);
1050
- loadingBar.start();
1051
-
1052
- if (!$filter) {
1053
- $filter = $$1('.filter', $elt);
894
+ const getPropertyValue = (property, action, context) => {
895
+ const value = action[property];
896
+ return _.isFunction(value) ? value.apply(context) : value;
897
+ };
898
+
899
+ /**
900
+ * Update the data table status in the header
901
+ *
902
+ * @param {Object} options
903
+ * @param {jQueryElement} $container
904
+ * @param {Object} dataset
905
+ */
906
+ const updateHeaderStatus = (options, $container, dataset) => {
907
+ if (!options.status) {
908
+ return;
1054
909
  }
1055
-
1056
- options = _.assign({}, options, this._getFilterStrategy($elt).getQueryData($elt, $filter, options));
1057
-
1058
- var parameters = _.merge({}, _.pick(options, ['rows', 'page', 'sortby', 'sortorder', 'sorttype', 'filterquery', 'filtercolumns']), options.params || {});
1059
-
1060
- var ajaxConfig = {
1061
- url: options.url,
1062
- data: parameters,
1063
- dataType: 'json',
1064
- type: options.querytype || 'GET'
1065
- }; // disable pagination to not press multiple on it
1066
-
1067
- disablePagination($elt.paginations);
1068
- /**
1069
- * @event dataTable#query.datatable
1070
- * @param {Object} ajaxConfig - The config object used to setup the AJAX request
1071
- */
1072
-
1073
- $elt.trigger('query.' + ns, [ajaxConfig]); // display the loading state
1074
-
1075
- if (options.status) {
1076
- $elt.find('.loading').removeClass(hiddenCls);
910
+ const $statusEmpty = $container.find('.empty-list');
911
+ const $statusAvailable = $container.find('.available-list');
912
+ const $statusCount = $statusAvailable.find('.count');
913
+ $container.find('.loading').addClass(hiddenCls);
914
+
915
+ // when the status is enabled, the response must contain the total amount of records
916
+ const amount = dataset.amount || dataset.length;
917
+ if (amount) {
918
+ $statusCount.text(amount);
919
+ $statusAvailable.removeClass(hiddenCls);
920
+ $statusEmpty.addClass(hiddenCls);
921
+ } else {
922
+ $statusEmpty.removeClass(hiddenCls);
923
+ $statusAvailable.addClass(hiddenCls);
1077
924
  }
925
+ };
926
+
927
+ /**
928
+ * The dataTable component makes you able to browse items and bind specific
929
+ * actions to undertake for edition and removal of them.
930
+ *
931
+ * Parameters that will be send to backend by component:
932
+ *
933
+ * Pagination
934
+ * @param {Number} rows - count of rows, that should be returned from backend, in other words limit.
935
+ * @param {Number} page - number of page, that should be requested.
936
+ *
937
+ * Sorting
938
+ * @param {String} sortby - name of column
939
+ * @param {String} sortorder - order of sorting, can be 'asc' or 'desc' for ascending sorting and descending sorting respectively.
940
+ * @param {String} sorttype - type of sorting, can be 'string' or 'numeric' for proper sorting numeric and string values.
941
+ *
942
+ * Filtering
943
+ * @param {String} filterstrategy - filtering strategy. Default is single (see ui/datatable/filterStrategy/single.js).
944
+ * @param {String} filterquery - query string for filtering of rows.
945
+ * @param {String[]} filtercolumns[] - array of columns, in which will be implemented search during filtering process.
946
+ * For column filter it will be only one item with column name, but component has ability define list of columns for default filter (in top toolbar).
947
+ * Backend should correctly receive this list of columns and do search in accordance with this parameters.
948
+ * By default, columns are not defined, so this parameter not will be sent. If filtercolumns[] not exists, backend should search by all columns.
949
+ *
950
+ * @example of query (GET): rows=25&page=1&sortby=login&sortorder=asc&filterquery=loginame&filtercolumns[]=login
951
+ *
952
+ * @exports ui/datatable
953
+ */
954
+ const dataTable = {
955
+ /**
956
+ * Used for generating action button action button
957
+ * @typedef Action
958
+ * @type {Object}
959
+ * @property {String} id ID is added to the button class
960
+ * @property {String} [title] Button title
961
+ * @property {Boolean} [disabled] When present, button should be disabled
962
+ * @property {String} [icon] Generate button icon
963
+ * @property {Boolean} [hidden] When present, button is hidden
964
+ * @property {Function} [action] Handler on button click
965
+ */
1078
966
 
1079
- if (typeof options.requestInterceptor === 'function') {
1080
- Promise.resolve(options.requestInterceptor(parameters)).then(function (data) {
1081
- self._render($elt, data);
1082
- }).catch(function (error) {
1083
- $elt.trigger('error.' + ns, [error]);
967
+ /**
968
+ * Used for generating action button from Object
969
+ * @deprecated
970
+ * @typedef {{
971
+ * [key: Action.id & Action.icon & Action.title ]: Action.action,
972
+ * }} ActionsObject
973
+ *
974
+ * @example
975
+ * {
976
+ * actions: {
977
+ * edit: editUser,
978
+ * remove: removeUser,
979
+ * }
980
+ * }
981
+ *
982
+ * ! IMPORTANT USE INSTEAD:
983
+ * {
984
+ * actions: [
985
+ * {
986
+ * id: "edit",
987
+ * title: __("Edit"),
988
+ * icon: "edit",
989
+ * action: editUser
990
+ * },
991
+ * {
992
+ * id: "edit",
993
+ * title: __("Edit"),
994
+ * icon: "edit",
995
+ * action: editUser
996
+ * }
997
+ * ]
998
+ * }
999
+ */
1084
1000
 
1085
- self._render($elt, {});
1001
+ /**
1002
+ * Initialize the plugin.
1003
+ *
1004
+ * Called the jQuery way once registered by the Pluginifier.
1005
+ * @example $('selector').datatable([], {});
1006
+ *
1007
+ * @constructor
1008
+ * @param {Object} options - the plugin options.
1009
+ * @param {String} options.url - the URL of the service used to retrieve the resources.
1010
+ * @param {Object[]} options.model - the model definition.
1011
+ * @param {ActionsObject | Action[]} options.actions - Generates action buttons
1012
+ * @param {Function} options.listeners.xxx - the callback function for event xxx, parameters depends to event trigger call.
1013
+ * @param {Boolean} options.selectable - enables the selection of rows using checkboxes.
1014
+ * @param {Boolean} options.rowSelection - enables the selection of rows by clicking on them.
1015
+ * @param {Object} options.tools - a list of tool buttons to display above the table.
1016
+ * @param {Object|Boolean} options.status - allow to display a status bar.
1017
+ * @param {Object|Boolean} options.filter - allow to display a filter bar.
1018
+ * @param {String} options.filterStrategy - 'multiple' | 'single' -- filtered by all filters together or filtering allowed only by one field at the moment (default 'single'),
1019
+ * @param {String} options.filterSelector - css selector for search of filter inputs, by defaul 'select, input'
1020
+ * @param {String} options.filterTransform - transform filter value before send to server.
1021
+ * @param {String[]} options.filter.columns - a list of columns that will be used for default filter. Can be overridden by column filter.
1022
+ * @param {String} options.filterquery - a query string for filtering, using only in runtime.
1023
+ * @param {String[]} options.filtercolumns - a list of columns, in that should be done search, using only in runtime.
1024
+ * @param {String} options.paginationStrategyTop - 'none' | 'pages' | 'simple' -- 'none' by default (next/prev), 'pages' show pages and extended control for pagination
1025
+ * @param {String} options.paginationStrategyBottom - 'none' | 'pages' | 'simple' -- 'simple' by default (next/prev), 'pages' show pages and extended control for pagination
1026
+ * @param {Object} options.labels - list of labels in datatable interface, that can be overridden by incoming options
1027
+ * @param {String} options.emptyText - text that will be shown when no data found for showing in the grid.
1028
+ * @param {Boolean} options.pageSizeSelector - flag that indicates if control for changing page size should be displayed
1029
+ * @param {Boolean} options.atomicUpdate - allowed to keep the datatable state to be able on "render" event, compare with new state and atomically update the table cells.
1030
+ * @param {Function} options.requestInterceptor - Intercept sending AJAX request. The call of function must returns promise with provided data.
1031
+ * @param {Object} [data] - inject predefined data to avoid the first query.
1032
+ * @fires dataTable#create.datatable
1033
+ * @returns {jQueryElement} for chaining
1034
+ */
1035
+ init(options, data) {
1036
+ options = _.defaults(options, defaults);
1037
+ return this.each(function () {
1038
+ const $elt = $$1(this);
1039
+ const currentOptions = $elt.data(dataNs);
1040
+ if (options.atomicUpdate && data) {
1041
+ $elt.data(`${dataNs}state`, data.data);
1042
+ }
1043
+ // implement encapsulated pages for the datatable
1044
+ $elt.paginations = [];
1045
+ if (!currentOptions) {
1046
+ //add data to the element
1047
+ $elt.data(dataNs, options);
1048
+ $elt.one('load.' + ns, function () {
1049
+ /**
1050
+ * @event dataTable#create.datatable
1051
+ */
1052
+ $elt.trigger('create.' + ns);
1053
+ });
1054
+ if (data) {
1055
+ dataTable._render($elt, data);
1056
+ } else {
1057
+ dataTable._query($elt);
1058
+ }
1059
+ } else {
1060
+ // update existing options
1061
+ $elt.data(dataNs, _.merge(currentOptions, options));
1062
+ dataTable._refresh($elt, data);
1063
+ }
1086
1064
  });
1087
- return;
1088
- }
1089
-
1090
- $$1.ajax(ajaxConfig).done(function (response) {
1091
- if ($elt && _typeof($elt.data(dataNs)) !== 'object') {
1092
- return $elt.trigger("error.".concat(ns), [new Error("Unable to load data attached to the element")]);
1065
+ },
1066
+ /**
1067
+ * Refresh the data table using current options
1068
+ *
1069
+ * Called the jQuery way once registered by the Pluginifier.
1070
+ * @example $('selector').datatable('refresh');
1071
+ *
1072
+ * @param {jQueryElement} $elt - plugin's element
1073
+ * @param {Object} [data] - Data to render immediately, prevents the query to be made.
1074
+ */
1075
+ _refresh($elt, data) {
1076
+ if (data) {
1077
+ this._render($elt, data);
1078
+ } else {
1079
+ this._query($elt);
1093
1080
  }
1094
-
1095
- self._render($elt, response);
1096
- }).fail(function (response, option, err) {
1097
- var requestErr = httpErrorParser.parse(response, option, err);
1098
- logger.error(requestErr.message);
1099
- requestErr.code = response.status;
1100
- enablePagination(this.paginations);
1101
- $elt.trigger('error.' + ns, [requestErr]);
1102
-
1103
- self._render($elt, {});
1104
- });
1105
- },
1106
-
1107
- /**
1108
- * Renders the table using the provided data set
1109
- *
1110
- * @param {jQueryElement} $elt - plugin's element
1111
- * @param {Object} dataset - the data set to render
1112
- * @private
1113
- * @fires dataTable#beforeload.datatable
1114
- * @fires dataTable#load.datatable
1115
- */
1116
- _render: function _render($elt) {
1117
- var dataset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1118
- var self = this;
1119
-
1120
- var options = _.cloneDeep($elt.data(dataNs));
1121
-
1122
- if (typeof options === 'undefined') {
1123
- return $elt.trigger("error.".concat(ns), [new Error("Unable to load data attached to the element")]);
1124
- }
1125
-
1126
- var model = [];
1127
- var $massActionBtns = $$1();
1128
- /**
1129
- * @event dataTable#beforeload.datatable
1130
- * @param {Object} dataset - The data set object used to render the table
1081
+ },
1082
+ /**
1083
+ * Query the server for data and load the table.
1084
+ *
1085
+ * @private
1086
+ * @param {jQueryElement} $elt - plugin's element
1087
+ * @param $filter
1088
+ * @fires dataTable#query.datatable
1131
1089
  */
1132
-
1133
- $elt.trigger('beforeload.' + ns, [_.cloneDeep(dataset)]); // overrides column options
1134
-
1135
- _.forEach(options.model, function (field, key) {
1136
- if (!options.filter) {
1137
- field.filterable = false;
1090
+ _query($elt, $filter) {
1091
+ const self = this;
1092
+ let options = $elt.data(dataNs);
1093
+ loadingBar.start();
1094
+ if (!$filter) {
1095
+ $filter = $$1('.filter', $elt);
1138
1096
  }
1097
+ options = _.assign({}, options, this._getFilterStrategy($elt).getQueryData($elt, $filter, options));
1098
+ const parameters = _.merge({}, _.pick(options, ['rows', 'page', 'sortby', 'sortorder', 'sorttype', 'filterquery', 'filtercolumns']), options.params || {});
1099
+ const ajaxConfig = {
1100
+ url: options.url,
1101
+ data: parameters,
1102
+ dataType: 'json',
1103
+ type: options.querytype || 'GET'
1104
+ };
1105
+
1106
+ // disable pagination to not press multiple on it
1107
+ disablePagination($elt.paginations);
1108
+
1109
+ /**
1110
+ * @event dataTable#query.datatable
1111
+ * @param {Object} ajaxConfig - The config object used to setup the AJAX request
1112
+ */
1113
+ $elt.trigger('query.' + ns, [ajaxConfig]);
1139
1114
 
1140
- if (_.isUndefined(field.order)) {
1141
- field.order = key + 1;
1115
+ // display the loading state
1116
+ if (options.status) {
1117
+ $elt.find('.loading').removeClass(hiddenCls);
1142
1118
  }
1143
-
1144
- if (field.filterable && _typeof(field.filterable) !== 'object') {
1145
- field.filterable = {
1146
- placeholder: __('Filter')
1147
- };
1119
+ if (typeof options.requestInterceptor === 'function') {
1120
+ Promise.resolve(options.requestInterceptor(parameters)).then(data => {
1121
+ self._render($elt, data);
1122
+ }).catch(error => {
1123
+ $elt.trigger('error.' + ns, [error]);
1124
+ self._render($elt, {});
1125
+ });
1126
+ return;
1148
1127
  }
1149
-
1150
- if (typeof field.visible === 'undefined') {
1151
- model.push(field);
1152
- } else if (typeof field.visible === 'function' && field.visible()) {
1153
- model.push(field);
1154
- } else if (field.visible === true) {
1155
- model.push(field);
1128
+ $$1.ajax(ajaxConfig).done(function (response) {
1129
+ if ($elt && typeof $elt.data(dataNs) !== 'object') {
1130
+ return $elt.trigger(`error.${ns}`, [new Error(`Unable to load data attached to the element`)]);
1131
+ }
1132
+ self._render($elt, response);
1133
+ }).fail(function (response, option, err) {
1134
+ const requestErr = httpErrorParser.parse(response, option, err);
1135
+ logger.error(requestErr.message);
1136
+ requestErr.code = response.status;
1137
+ enablePagination(this.paginations);
1138
+ $elt.trigger('error.' + ns, [requestErr]);
1139
+ self._render($elt, {});
1140
+ });
1141
+ },
1142
+ /**
1143
+ * Renders the table using the provided data set
1144
+ *
1145
+ * @param {jQueryElement} $elt - plugin's element
1146
+ * @param {Object} dataset - the data set to render
1147
+ * @private
1148
+ * @fires dataTable#beforeload.datatable
1149
+ * @fires dataTable#load.datatable
1150
+ */
1151
+ _render($elt) {
1152
+ let dataset = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
1153
+ const self = this;
1154
+ let options = _.cloneDeep($elt.data(dataNs));
1155
+ if (typeof options === 'undefined') {
1156
+ return $elt.trigger(`error.${ns}`, [new Error(`Unable to load data attached to the element`)]);
1156
1157
  }
1157
- });
1158
+ const model = [];
1159
+ let $massActionBtns = $$1();
1158
1160
 
1159
- model.sort(function (a, b) {
1160
- return a.order - b.order;
1161
- });
1161
+ /**
1162
+ * @event dataTable#beforeload.datatable
1163
+ * @param {Object} dataset - The data set object used to render the table
1164
+ */
1165
+ $elt.trigger('beforeload.' + ns, [_.cloneDeep(dataset)]);
1162
1166
 
1163
- if (options.sortby) {
1164
- options = this._sortOptions($elt, options.sortby, options.sortorder, options.sorttype);
1165
- } // process data by model rules
1167
+ // overrides column options
1168
+ _.forEach(options.model, function (field, key) {
1169
+ if (!options.filter) {
1170
+ field.filterable = false;
1171
+ }
1172
+ if (_.isUndefined(field.order)) {
1173
+ field.order = key + 1;
1174
+ }
1175
+ if (field.filterable && typeof field.filterable !== 'object') {
1176
+ field.filterable = {
1177
+ placeholder: __('Filter')
1178
+ };
1179
+ }
1180
+ if (typeof field.visible === 'undefined') {
1181
+ model.push(field);
1182
+ } else if (typeof field.visible === 'function' && field.visible()) {
1183
+ model.push(field);
1184
+ } else if (field.visible === true) {
1185
+ model.push(field);
1186
+ }
1187
+ });
1188
+ model.sort(function (a, b) {
1189
+ return a.order - b.order;
1190
+ });
1191
+ if (options.sortby) {
1192
+ options = this._sortOptions($elt, options.sortby, options.sortorder, options.sorttype);
1193
+ }
1166
1194
 
1195
+ // process data by model rules
1196
+ if (_.some(model, 'transform')) {
1197
+ const transforms = _.where(model, 'transform');
1198
+ _.forEach(dataset.data, (row, index) => {
1199
+ _.forEach(transforms, field => {
1200
+ if (_.isFunction(field.transform)) {
1201
+ row[field.id] = field.transform(row[field.id], row, field, index, dataset.data);
1202
+ }
1203
+ });
1204
+ });
1205
+ }
1206
+ options.model = model;
1207
+ if (options.atomicUpdate) {
1208
+ const skipForceUpdate = this._shallowUpdate($elt, dataset, options);
1209
+ if (skipForceUpdate) {
1210
+ updateHeaderStatus(options, $elt, dataset);
1211
+ loadingBar.stop();
1212
+ $elt.trigger(`load.${ns}`, [dataset]);
1213
+ return;
1214
+ }
1215
+ }
1167
1216
 
1168
- if (_.some(model, 'transform')) {
1169
- var transforms = _.where(model, 'transform');
1217
+ // Call the rendering
1218
+ const $rendering = $$1(layout({
1219
+ options: options,
1220
+ dataset: dataset
1221
+ }));
1170
1222
 
1171
- _.forEach(dataset.data, function (row, index) {
1172
- _.forEach(transforms, function (field) {
1173
- if (_.isFunction(field.transform)) {
1174
- row[field.id] = field.transform(row[field.id], row, field, index, dataset.data);
1223
+ // the readonly property contains an associative array where keys are the ids of the items (lines)
1224
+ // the value can be a boolean (true for disable buttons, false to enable)
1225
+ // it can also bo an array that let you disable/enable the action you want
1226
+ // readonly = {
1227
+ // id1 : {'view':true, 'delete':false},
1228
+ // id2 : true
1229
+ //}
1230
+ _.forEach(dataset.readonly, function (values, id) {
1231
+ if (values === true) {
1232
+ $$1('[data-item-identifier="' + id + '"] button', $rendering).addClass('disabled');
1233
+ } else if (values && typeof values === 'object') {
1234
+ for (const action in values) {
1235
+ if (values.hasOwnProperty(action) && values[action] === true) {
1236
+ $$1(`[data-item-identifier="${id}"] button.${action}`, $rendering).addClass('disabled');
1237
+ }
1175
1238
  }
1176
- });
1239
+ }
1177
1240
  });
1178
- }
1179
-
1180
- options.model = model;
1181
1241
 
1182
- if (options.atomicUpdate) {
1183
- var skipForceUpdate = this._shallowUpdate($elt, dataset, options);
1184
-
1185
- if (skipForceUpdate) {
1186
- updateHeaderStatus(options, $elt, dataset);
1187
- loadingBar.stop();
1188
- $elt.trigger("load.".concat(ns), [dataset]);
1189
- return;
1190
- }
1191
- } // Call the rendering
1192
-
1193
-
1194
- var $rendering = $$1(layout({
1195
- options: options,
1196
- dataset: dataset
1197
- })); // the readonly property contains an associative array where keys are the ids of the items (lines)
1198
- // the value can be a boolean (true for disable buttons, false to enable)
1199
- // it can also bo an array that let you disable/enable the action you want
1200
- // readonly = {
1201
- // id1 : {'view':true, 'delete':false},
1202
- // id2 : true
1203
- //}
1204
-
1205
- _.forEach(dataset.readonly, function (values, id) {
1206
- if (values === true) {
1207
- $$1('[data-item-identifier="' + id + '"] button', $rendering).addClass('disabled');
1208
- } else if (values && _typeof(values) === 'object') {
1209
- for (var action in values) {
1210
- if (values.hasOwnProperty(action) && values[action] === true) {
1211
- $$1("[data-item-identifier=\"".concat(id, "\"] button.").concat(action), $rendering).addClass('disabled');
1242
+ /**
1243
+ * Attach handlers on the action buttons
1244
+ * @param {ActionsObject | Action[]} actions
1245
+ */
1246
+ const attachActionListeners = actions => {
1247
+ // Attach a listener to every action button created
1248
+ _.forEach(actions, (action, name) => {
1249
+ if (!_.isFunction(action)) {
1250
+ name = action.id || name;
1251
+ action = action.action || function () {};
1212
1252
  }
1213
- }
1253
+ const css = `.${name}`;
1254
+ $rendering.off('click', css).on('click', css, function (e) {
1255
+ e.preventDefault();
1256
+ const $btn = $$1(this);
1257
+ if (!$btn.hasClass('disabled')) {
1258
+ const identifier = $btn.closest('[data-item-identifier]').data('item-identifier');
1259
+ action.apply($btn, [identifier, _.first(_.where(dataset.data, {
1260
+ id: identifier
1261
+ }))]);
1262
+ }
1263
+ });
1264
+ });
1265
+ };
1266
+ if (options.actions) {
1267
+ attachActionListeners(options.actions);
1214
1268
  }
1215
- });
1216
- /**
1217
- * Attach handlers on the action buttons
1218
- * @param {ActionsObject | Action[]} actions
1219
- */
1220
1269
 
1270
+ // Attach listeners to model.type = action
1271
+ if (_.some(options.model, 'type')) {
1272
+ const types = _.where(options.model, 'type');
1273
+ _.forEach(types, field => {
1274
+ if (field.type === 'actions' && field.actions) {
1275
+ attachActionListeners(field.actions);
1276
+ }
1277
+ });
1278
+ }
1221
1279
 
1222
- var attachActionListeners = function attachActionListeners(actions) {
1223
- // Attach a listener to every action button created
1224
- _.forEach(actions, function (action, name) {
1280
+ // Attach a listener to every tool button created
1281
+ _.forEach(options.tools, (action, name) => {
1282
+ let isMassAction = true;
1225
1283
  if (!_.isFunction(action)) {
1226
1284
  name = action.id || name;
1227
-
1285
+ isMassAction = action.massAction;
1228
1286
  action = action.action || function () {};
1229
1287
  }
1230
-
1231
- var css = ".".concat(name);
1288
+ const css = `.tool-${name}`;
1289
+ if (isMassAction) {
1290
+ $massActionBtns = $massActionBtns.add($rendering.find(css));
1291
+ }
1232
1292
  $rendering.off('click', css).on('click', css, function (e) {
1233
1293
  e.preventDefault();
1234
- var $btn = $$1(this);
1235
-
1294
+ const $btn = $$1(this);
1236
1295
  if (!$btn.hasClass('disabled')) {
1237
- var identifier = $btn.closest('[data-item-identifier]').data('item-identifier');
1238
- action.apply($btn, [identifier, _.first(_.where(dataset.data, {
1239
- id: identifier
1240
- }))]);
1296
+ action.apply($btn, [self._selection($elt)]);
1241
1297
  }
1242
1298
  });
1243
1299
  });
1244
- };
1245
-
1246
- if (options.actions) {
1247
- attachActionListeners(options.actions);
1248
- } // Attach listeners to model.type = action
1249
-
1250
-
1251
- if (_.some(options.model, 'type')) {
1252
- var types = _.where(options.model, 'type');
1253
1300
 
1254
- _.forEach(types, function (field) {
1255
- if (field.type === 'actions' && field.actions) {
1256
- attachActionListeners(field.actions);
1257
- }
1301
+ // bind listeners to events
1302
+ _.forEach(options.listeners, (callback, event) => {
1303
+ const ev = [event, ns].join('.');
1304
+ $elt.off(ev).on(ev, callback);
1258
1305
  });
1259
- } // Attach a listener to every tool button created
1260
-
1261
-
1262
- _.forEach(options.tools, function (action, name) {
1263
- var isMassAction = true;
1264
-
1265
- if (!_.isFunction(action)) {
1266
- name = action.id || name;
1267
- isMassAction = action.massAction;
1268
-
1269
- action = action.action || function () {};
1306
+ function renderPagination($container, mode) {
1307
+ return paginationComponent({
1308
+ mode: mode,
1309
+ activePage: dataset.page,
1310
+ totalPages: dataset.total
1311
+ }).on('change', function () {
1312
+ self._setPage($elt, this.getActivePage());
1313
+ }).on('prev', function () {
1314
+ /**
1315
+ * @event dataTable#backward.dataTable
1316
+ */
1317
+ $elt.trigger('backward.' + ns);
1318
+ }).on('next', function () {
1319
+ /**
1320
+ * @event dataTable#forward.dataTable
1321
+ */
1322
+ $elt.trigger('forward.' + ns);
1323
+ }).render($container);
1270
1324
  }
1271
-
1272
- var css = ".tool-".concat(name);
1273
-
1274
- if (isMassAction) {
1275
- $massActionBtns = $massActionBtns.add($rendering.find(css));
1325
+ $elt.paginations = [];
1326
+ if (options.paginationStrategyTop !== 'none') {
1327
+ // bind pagination component to the datatable
1328
+ $elt.paginations.push(renderPagination($$1('.datatable-pagination-top', $rendering), options.paginationStrategyTop));
1276
1329
  }
1277
-
1278
- $rendering.off('click', css).on('click', css, function (e) {
1279
- e.preventDefault();
1280
- var $btn = $$1(this);
1281
-
1282
- if (!$btn.hasClass('disabled')) {
1283
- action.apply($btn, [self._selection($elt)]);
1330
+ if (options.paginationStrategyBottom !== 'none') {
1331
+ // bind pagination component to the datatable
1332
+ $elt.paginations.push(renderPagination($$1('.datatable-pagination-bottom', $rendering), options.paginationStrategyBottom));
1333
+ }
1334
+ disablePagination($elt.paginations);
1335
+
1336
+ // Now $rendering takes the place of $elt...
1337
+ const $rows = $rendering.find('tbody tr');
1338
+ const $sortBy = $rendering.find('th [data-sort-by]');
1339
+ const $sortElement = $rendering.find('[data-sort-by="' + options.sortby + '"]');
1340
+ const $checkAll = $rendering.find('th.checkboxes input');
1341
+ const $checkboxes = $rendering.find('td.checkboxes input');
1342
+ if (options.rowSelection) {
1343
+ $$1('table.datatable', $rendering).addClass('hoverable');
1344
+ $rendering.on('click', 'tbody td', function (e) {
1345
+ // exclude from processing columns with actions
1346
+ if ($$1(e.target).hasClass('checkboxes') || $$1(e.target).hasClass('actions')) {
1347
+ return false;
1348
+ }
1349
+ const currentRow = $$1(this).parent();
1350
+ $rows.removeClass('selected');
1351
+ currentRow.toggleClass('selected');
1352
+ $elt.trigger('selected.' + ns, _.where(dataset.data, {
1353
+ id: currentRow.data('item-identifier')
1354
+ }));
1355
+ });
1356
+ }
1357
+ $sortBy.on('click keyup', function (e) {
1358
+ if (e.type === 'keyup' && e.keyCode !== 13) {
1359
+ return;
1284
1360
  }
1361
+ e.preventDefault();
1362
+ const column = $$1(this).data('sort-by');
1363
+ const type = $$1(this).data('sort-type');
1364
+ self._sort($elt, column, undefined, type);
1285
1365
  });
1286
- }); // bind listeners to events
1287
1366
 
1367
+ // Add the filter behavior
1368
+ if (options.filter) {
1369
+ self._getFilterStrategy($elt).render($rendering, options);
1370
+ _.forEach($$1('.filter', $rendering), function (filter) {
1371
+ const $filter = $$1(filter);
1372
+ const $filterBtn = $$1('button', $filter);
1373
+ const $filterInput = $$1('select, input', $filter);
1374
+ if ($filterInput.is('select')) {
1375
+ $filterInput.on('change', function () {
1376
+ self._filter($elt, $filter);
1377
+ });
1378
+ } else {
1379
+ // clicking the button trigger the request
1380
+ $filterBtn.off('click').on('click', function (e) {
1381
+ e.preventDefault();
1382
+ self._filter($elt, $filter);
1383
+ });
1384
+
1385
+ // or press ENTER
1386
+ $filterInput.off('keypress').on('keypress', function (e) {
1387
+ if (e.which === 13) {
1388
+ e.preventDefault();
1389
+ self._filter($elt, $filter);
1390
+ }
1391
+ });
1392
+ }
1393
+ });
1394
+ }
1288
1395
 
1289
- _.forEach(options.listeners, function (callback, event) {
1290
- var ev = [event, ns].join('.');
1291
- $elt.off(ev).on(ev, callback);
1292
- });
1396
+ // check/uncheck all checkboxes
1397
+ $checkAll.click(function () {
1398
+ if (this.checked) {
1399
+ $checkAll.prop('checked', true);
1400
+ $checkboxes.prop('checked', true);
1401
+ } else {
1402
+ $checkAll.prop('checked', false);
1403
+ $checkboxes.prop('checked', false);
1404
+ }
1405
+ if ($massActionBtns.length) {
1406
+ $massActionBtns.toggleClass('invisible', !$checkboxes.filter(':checked').length);
1407
+ }
1293
1408
 
1294
- function renderPagination($container, mode) {
1295
- return paginationComponent({
1296
- mode: mode,
1297
- activePage: dataset.page,
1298
- totalPages: dataset.total
1299
- }).on('change', function () {
1300
- self._setPage($elt, this.getActivePage());
1301
- }).on('prev', function () {
1302
- /**
1303
- * @event dataTable#backward.dataTable
1304
- */
1305
- $elt.trigger('backward.' + ns);
1306
- }).on('next', function () {
1307
- /**
1308
- * @event dataTable#forward.dataTable
1409
+ /**
1410
+ * @event dataTable#select.dataTable
1309
1411
  */
1310
- $elt.trigger('forward.' + ns);
1311
- }).render($container);
1312
- }
1313
-
1314
- $elt.paginations = [];
1315
-
1316
- if (options.paginationStrategyTop !== 'none') {
1317
- // bind pagination component to the datatable
1318
- $elt.paginations.push(renderPagination($$1('.datatable-pagination-top', $rendering), options.paginationStrategyTop));
1319
- }
1320
-
1321
- if (options.paginationStrategyBottom !== 'none') {
1322
- // bind pagination component to the datatable
1323
- $elt.paginations.push(renderPagination($$1('.datatable-pagination-bottom', $rendering), options.paginationStrategyBottom));
1324
- }
1325
-
1326
- disablePagination($elt.paginations); // Now $rendering takes the place of $elt...
1327
-
1328
- var $rows = $rendering.find('tbody tr');
1329
- var $sortBy = $rendering.find('th [data-sort-by]');
1330
- var $sortElement = $rendering.find('[data-sort-by="' + options.sortby + '"]');
1331
- var $checkAll = $rendering.find('th.checkboxes input');
1332
- var $checkboxes = $rendering.find('td.checkboxes input');
1412
+ $elt.trigger('select.' + ns);
1413
+ });
1333
1414
 
1334
- if (options.rowSelection) {
1335
- $$1('table.datatable', $rendering).addClass('hoverable');
1336
- $rendering.on('click', 'tbody td', function (e) {
1337
- // exclude from processing columns with actions
1338
- if ($$1(e.target).hasClass('checkboxes') || $$1(e.target).hasClass('actions')) {
1339
- return false;
1415
+ // when check/uncheck a box, toggle the check/uncheck all
1416
+ $checkboxes.click(function () {
1417
+ const $checked = $checkboxes.filter(':checked');
1418
+ if ($checked.length === $checkboxes.length) {
1419
+ $checkAll.prop('checked', true);
1420
+ } else {
1421
+ $checkAll.prop('checked', false);
1422
+ }
1423
+ if ($massActionBtns.length) {
1424
+ $massActionBtns.toggleClass('invisible', !$checkboxes.filter(':checked').length);
1340
1425
  }
1341
1426
 
1342
- var currentRow = $$1(this).parent();
1343
- $rows.removeClass('selected');
1344
- currentRow.toggleClass('selected');
1345
- $elt.trigger('selected.' + ns, _.where(dataset.data, {
1346
- id: currentRow.data('item-identifier')
1347
- }));
1427
+ /**
1428
+ * @event dataTable#select.dataTable
1429
+ */
1430
+ $elt.trigger('select.' + ns);
1348
1431
  });
1349
- }
1350
-
1351
- $sortBy.on('click keyup', function (e) {
1352
- if (e.type === 'keyup' && e.keyCode !== 13) {
1353
- return;
1354
- }
1355
1432
 
1356
- e.preventDefault();
1357
- var column = $$1(this).data('sort-by');
1358
- var type = $$1(this).data('sort-type');
1433
+ // Remove sorted class from all th
1434
+ $$1('th.sorted', $rendering).removeClass('sorted');
1435
+ // Add the sorted class to the sorted element and the order class
1436
+ $sortElement.addClass('sorted').addClass('sorted_' + options.sortorder);
1359
1437
 
1360
- self._sort($elt, column, undefined, type);
1361
- }); // Add the filter behavior
1438
+ // Update the status
1362
1439
 
1363
- if (options.filter) {
1364
- self._getFilterStrategy($elt).render($rendering, options);
1440
+ updateHeaderStatus(options, $rendering, dataset);
1441
+ $elt.html($rendering);
1365
1442
 
1366
- _.forEach($$1('.filter', $rendering), function (filter) {
1367
- var $filter = $$1(filter);
1368
- var $filterBtn = $$1('button', $filter);
1369
- var $filterInput = $$1('select, input', $filter);
1370
-
1371
- if ($filterInput.is('select')) {
1372
- $filterInput.on('change', function () {
1373
- self._filter($elt, $filter);
1374
- });
1375
- } else {
1376
- // clicking the button trigger the request
1377
- $filterBtn.off('click').on('click', function (e) {
1378
- e.preventDefault();
1379
-
1380
- self._filter($elt, $filter);
1381
- }); // or press ENTER
1382
-
1383
- $filterInput.off('keypress').on('keypress', function (e) {
1384
- if (e.which === 13) {
1385
- e.preventDefault();
1386
-
1387
- self._filter($elt, $filter);
1388
- }
1389
- });
1390
- }
1391
- });
1392
- } // check/uncheck all checkboxes
1393
-
1394
-
1395
- $checkAll.click(function () {
1396
- if (this.checked) {
1397
- $checkAll.prop('checked', true);
1398
- $checkboxes.prop('checked', true);
1399
- } else {
1400
- $checkAll.prop('checked', false);
1401
- $checkboxes.prop('checked', false);
1443
+ // if the filter is enabled and a value is present, set the focus on the input field
1444
+ if (options.filter && options.filterquery) {
1445
+ $rendering.find('[name=filter].focused').focus();
1402
1446
  }
1403
1447
 
1404
- if ($massActionBtns.length) {
1405
- $massActionBtns.toggleClass('invisible', !$checkboxes.filter(':checked').length);
1448
+ // restore pagination's after data loaded
1449
+ enablePagination($elt.paginations);
1450
+ if (options.pageSizeSelector) {
1451
+ pageSizeSelector({
1452
+ renderTo: $$1('.toolbox-container', $rendering),
1453
+ defaultSize: options.rows
1454
+ }).on('change', function (val) {
1455
+ self._setRows($elt, val);
1456
+ });
1406
1457
  }
1407
- /**
1408
- * @event dataTable#select.dataTable
1409
- */
1410
-
1458
+ loadingBar.stop();
1411
1459
 
1412
- $elt.trigger('select.' + ns);
1413
- }); // when check/uncheck a box, toggle the check/uncheck all
1460
+ /**
1461
+ * @event dataTable#load.dataTable
1462
+ * @param {Object} dataset - The data set used to render the table
1463
+ */
1464
+ $elt.trigger('load.' + ns, [dataset]);
1465
+ },
1466
+ /**
1467
+ * Query set new page
1468
+ *
1469
+ * @param $elt
1470
+ * @param page
1471
+ * @fires dataTable#setpage.datatable
1472
+ */
1473
+ _setPage($elt, page) {
1474
+ const options = $elt.data(dataNs);
1475
+ if (options.page !== page) {
1476
+ // set new page value
1477
+ options.page = page;
1414
1478
 
1415
- $checkboxes.click(function () {
1416
- var $checked = $checkboxes.filter(':checked');
1479
+ //rebind options to the elt
1480
+ $elt.data(dataNs, options);
1417
1481
 
1418
- if ($checked.length === $checkboxes.length) {
1419
- $checkAll.prop('checked', true);
1420
- } else {
1421
- $checkAll.prop('checked', false);
1422
- }
1482
+ /**
1483
+ * @event dataTable#setpage.dataTable
1484
+ */
1485
+ $elt.trigger('setpage.' + ns);
1423
1486
 
1424
- if ($massActionBtns.length) {
1425
- $massActionBtns.toggleClass('invisible', !$checkboxes.filter(':checked').length);
1487
+ // Call the query
1488
+ this._query($elt);
1426
1489
  }
1427
- /**
1428
- * @event dataTable#select.dataTable
1490
+ },
1491
+ /**
1492
+ * Query filtered list of items
1493
+ *
1494
+ * @param {jQueryElement} $elt - plugin's element
1495
+ * @param {jQueryElement} $filter - the filter input
1496
+ * @fires dataTable#filter.datatable
1497
+ * @fires dataTable#sort.datatable
1498
+ * @private
1499
+ */
1500
+ _filter($elt, $filter) {
1501
+ const options = $elt.data(dataNs);
1502
+ const filtersData = this._getFilterStrategy($elt).getFiltersData($elt, $filter, options);
1503
+ options.page = 1;
1504
+ $elt.data(dataNs, _.assign(options, filtersData));
1505
+
1506
+ /**
1507
+ * @event dataTable#filter.datatable
1508
+ * @param {Object} options - The options list
1429
1509
  */
1430
-
1431
-
1432
- $elt.trigger('select.' + ns);
1433
- }); // Remove sorted class from all th
1434
-
1435
- $$1('th.sorted', $rendering).removeClass('sorted'); // Add the sorted class to the sorted element and the order class
1436
-
1437
- $sortElement.addClass('sorted').addClass('sorted_' + options.sortorder); // Update the status
1438
-
1439
- updateHeaderStatus(options, $rendering, dataset);
1440
- $elt.html($rendering); // if the filter is enabled and a value is present, set the focus on the input field
1441
-
1442
- if (options.filter && options.filterquery) {
1443
- $rendering.find('[name=filter].focused').focus();
1444
- } // restore pagination's after data loaded
1445
-
1446
-
1447
- enablePagination($elt.paginations);
1448
-
1449
- if (options.pageSizeSelector) {
1450
- pageSizeSelector({
1451
- renderTo: $$1('.toolbox-container', $rendering),
1452
- defaultSize: options.rows
1453
- }).on('change', function (val) {
1454
- self._setRows($elt, val);
1455
- });
1456
- }
1457
-
1458
- loadingBar.stop();
1459
- /**
1460
- * @event dataTable#load.dataTable
1461
- * @param {Object} dataset - The data set used to render the table
1510
+ $elt.trigger('filter.' + ns, [options]);
1511
+
1512
+ // Call the query
1513
+ this._query($elt, $filter);
1514
+ },
1515
+ _getFilterStrategy($elt) {
1516
+ const options = $elt.data(dataNs);
1517
+ return filterStrategyFactory(options);
1518
+ },
1519
+ /**
1520
+ * Query the previous page
1521
+ *
1522
+ * Called the jQuery way once registered by the Pluginifier.
1523
+ * @example $('selector').datatable('sort', 'firstname', false);
1524
+ *
1525
+ * @param {jQueryElement} $elt - plugin's element
1526
+ * @param {String} sortBy - the model id of the col to sort
1527
+ * @param {Boolean} [asc] - sort direction true for asc of deduced
1528
+ * @param {String} sortType - type of sorting, numeric or string
1529
+ * @fires dataTable#sort.datatable
1462
1530
  */
1463
-
1464
- $elt.trigger('load.' + ns, [dataset]);
1465
- },
1466
-
1467
- /**
1468
- * Query set new page
1469
- *
1470
- * @param $elt
1471
- * @param page
1472
- * @fires dataTable#setpage.datatable
1473
- */
1474
- _setPage: function _setPage($elt, page) {
1475
- var options = $elt.data(dataNs);
1476
-
1477
- if (options.page !== page) {
1478
- // set new page value
1479
- options.page = page; //rebind options to the elt
1480
-
1481
- $elt.data(dataNs, options);
1482
- /**
1483
- * @event dataTable#setpage.dataTable
1531
+ _sort($elt, sortBy, asc, sortType) {
1532
+ const options = this._sortOptions($elt, sortBy, asc, sortType);
1533
+
1534
+ /**
1535
+ * @event dataTable#sort.datatable
1536
+ * @param {String} column - The name of the column to sort
1537
+ * @param {String} direction - The sort direction
1538
+ * @param {String} type - The type of sorting field, string or numeric
1484
1539
  */
1485
-
1486
- $elt.trigger('setpage.' + ns); // Call the query
1487
-
1540
+ $elt.trigger('sort.' + ns, [options.sortby, options.sortorder, options.sorttype]);
1488
1541
  this._query($elt);
1489
- }
1490
- },
1491
-
1492
- /**
1493
- * Query filtered list of items
1494
- *
1495
- * @param {jQueryElement} $elt - plugin's element
1496
- * @param {jQueryElement} $filter - the filter input
1497
- * @fires dataTable#filter.datatable
1498
- * @fires dataTable#sort.datatable
1499
- * @private
1500
- */
1501
- _filter: function _filter($elt, $filter) {
1502
- var options = $elt.data(dataNs);
1503
-
1504
- var filtersData = this._getFilterStrategy($elt).getFiltersData($elt, $filter, options);
1505
-
1506
- options.page = 1;
1507
- $elt.data(dataNs, _.assign(options, filtersData));
1508
- /**
1509
- * @event dataTable#filter.datatable
1510
- * @param {Object} options - The options list
1542
+ },
1543
+ /**
1544
+ * Compared current and next number of row and identifiers order of rows.
1545
+ *
1546
+ * @param {dataset} currentState
1547
+ * @param {dataset} nextState
1548
+ * @returns {Boolean}
1511
1549
  */
1512
-
1513
- $elt.trigger('filter.' + ns, [options]); // Call the query
1514
-
1515
- this._query($elt, $filter);
1516
- },
1517
- _getFilterStrategy: function _getFilterStrategy($elt) {
1518
- var options = $elt.data(dataNs);
1519
- return filterStrategyFactory(options);
1520
- },
1521
-
1522
- /**
1523
- * Query the previous page
1524
- *
1525
- * Called the jQuery way once registered by the Pluginifier.
1526
- * @example $('selector').datatable('sort', 'firstname', false);
1527
- *
1528
- * @param {jQueryElement} $elt - plugin's element
1529
- * @param {String} sortBy - the model id of the col to sort
1530
- * @param {Boolean} [asc] - sort direction true for asc of deduced
1531
- * @param {String} sortType - type of sorting, numeric or string
1532
- * @fires dataTable#sort.datatable
1533
- */
1534
- _sort: function _sort($elt, sortBy, asc, sortType) {
1535
- var options = this._sortOptions($elt, sortBy, asc, sortType);
1536
- /**
1537
- * @event dataTable#sort.datatable
1538
- * @param {String} column - The name of the column to sort
1539
- * @param {String} direction - The sort direction
1540
- * @param {String} type - The type of sorting field, string or numeric
1550
+ _canApplyShallowUpdate(currentState, nextState) {
1551
+ const isStatesHasData = _.has(currentState, 'data') && _.has(nextState, 'data');
1552
+ if (!isStatesHasData) {
1553
+ return false;
1554
+ }
1555
+ const currentData = currentState.data;
1556
+ const nextData = nextState.data;
1557
+ if (currentData.length !== nextData.length) {
1558
+ return false;
1559
+ }
1560
+ return _.isEqual(currentData.map(data => data.id), nextData.map(data => data.id));
1561
+ },
1562
+ /**
1563
+ * Check possibility of atomic update data in datatable.
1564
+ *
1565
+ * @param {jQueryElement} $container Data table container element
1566
+ * @param {Object} nextState Data to be set to the data table
1567
+ * @param {Object} options Data table options
1568
+ * @returns {Boolean} Return true when data in table can be atomically updated
1541
1569
  */
1570
+ _shallowUpdate($container, nextState, options) {
1571
+ const currentState = $container.data(`${dataNs}state`);
1542
1572
 
1573
+ // Always update data state
1574
+ $container.data(`${dataNs}state`, nextState);
1575
+ if (!this._canApplyShallowUpdate(currentState, nextState)) {
1576
+ return;
1577
+ }
1543
1578
 
1544
- $elt.trigger('sort.' + ns, [options.sortby, options.sortorder, options.sorttype]);
1545
-
1546
- this._query($elt);
1547
- },
1548
-
1549
- /**
1550
- * Compared current and next number of row and identifiers order of rows.
1551
- *
1552
- * @param {dataset} currentState
1553
- * @param {dataset} nextState
1554
- * @returns {Boolean}
1555
- */
1556
- _canApplyShallowUpdate: function _canApplyShallowUpdate(currentState, nextState) {
1557
- var isStatesHasData = _.has(currentState, 'data') && _.has(nextState, 'data');
1558
-
1559
- if (!isStatesHasData) {
1560
- return false;
1561
- }
1562
-
1563
- var currentData = currentState.data;
1564
- var nextData = nextState.data;
1565
-
1566
- if (currentData.length !== nextData.length) {
1567
- return false;
1568
- }
1569
-
1570
- return _.isEqual(currentData.map(function (data) {
1571
- return data.id;
1572
- }), nextData.map(function (data) {
1573
- return data.id;
1574
- }));
1575
- },
1576
-
1577
- /**
1578
- * Check possibility of atomic update data in datatable.
1579
- *
1580
- * @param {jQueryElement} $container Data table container element
1581
- * @param {Object} nextState Data to be set to the data table
1582
- * @param {Object} options Data table options
1583
- * @returns {Boolean} Return true when data in table can be atomically updated
1584
- */
1585
- _shallowUpdate: function _shallowUpdate($container, nextState, options) {
1586
- var currentState = $container.data("".concat(dataNs, "state")); // Always update data state
1587
-
1588
- $container.data("".concat(dataNs, "state"), nextState);
1589
-
1590
- if (!this._canApplyShallowUpdate(currentState, nextState)) {
1591
- return;
1592
- } // NOTE: The code above generate the table cell. With updating handlebars to the version > 2.*, please move it to the dedicated template to reuse it in layout.tpl as well
1593
-
1594
-
1595
- nextState.data.forEach(function (nextData, index) {
1596
- var $row = $container.find("tr[data-item-identifier=\"".concat(nextData.id, "\"]"));
1597
- options.model.forEach(function (model) {
1598
- var cellId = model.id;
1599
-
1600
- if (model.type) {
1601
- var $actionCell = $row.find("td.actions.".concat(cellId));
1602
- $actionCell.html('');
1603
- model.actions.forEach(function (action) {
1604
- var id = action.id;
1605
- var hidden = getPropertyValue('hidden', action, nextData);
1606
- var title = getPropertyValue('title', action, nextData);
1607
- var disabled = getPropertyValue('disabled', action, nextData);
1608
- var icon = getPropertyValue('icon', action, nextData);
1609
- var label = getPropertyValue('label', action, nextData);
1610
- var $actionButton = $$1(buttonTpl({
1611
- id: id,
1612
- icon: icon,
1613
- label: label,
1614
- title: title,
1615
- disabled: disabled
1616
- }));
1617
-
1618
- if (!hidden) {
1619
- $actionCell.append('\n').append($actionButton);
1620
- }
1621
- });
1622
- } else {
1623
- var nextContent = nextData[cellId];
1624
- $row.find("td.".concat(cellId)).html(DOMPurify.sanitize(nextContent));
1625
- }
1579
+ // NOTE: The code above generate the table cell. With updating handlebars to the version > 2.*, please move it to the dedicated template to reuse it in layout.tpl as well
1580
+ nextState.data.forEach((nextData, index) => {
1581
+ const $row = $container.find(`tr[data-item-identifier="${nextData.id}"]`);
1582
+ options.model.forEach(model => {
1583
+ const cellId = model.id;
1584
+ if (model.type) {
1585
+ const $actionCell = $row.find(`td.actions.${cellId}`);
1586
+ $actionCell.html('');
1587
+ model.actions.forEach(action => {
1588
+ const id = action.id;
1589
+ const hidden = getPropertyValue('hidden', action, nextData);
1590
+ const title = getPropertyValue('title', action, nextData);
1591
+ const disabled = getPropertyValue('disabled', action, nextData);
1592
+ const icon = getPropertyValue('icon', action, nextData);
1593
+ const label = getPropertyValue('label', action, nextData);
1594
+ const $actionButton = $$1(buttonTpl({
1595
+ id,
1596
+ icon,
1597
+ label,
1598
+ title,
1599
+ disabled
1600
+ }));
1601
+ if (!hidden) {
1602
+ $actionCell.append('\n').append($actionButton);
1603
+ }
1604
+ });
1605
+ } else {
1606
+ const nextContent = nextData[cellId];
1607
+ $row.find(`td.${cellId}`).html(DOMPurify.sanitize(nextContent));
1608
+ }
1609
+ });
1626
1610
  });
1627
- });
1628
- return true;
1629
- },
1630
-
1631
- /**
1632
- * Set the sort options.
1633
- *
1634
- * @param {jQueryElement} $elt - plugin's element
1635
- * @param {String} sortBy - the model id of the col to sort
1636
- * @param {Boolean|String} [asc] - sort direction true for asc of deduced
1637
- * @param {String} sortType - sorting type, numeric or string sorting
1638
- * @returns {Object} - returns the options
1639
- * @private
1640
- */
1641
- _sortOptions: function _sortOptions($elt, sortBy, asc, sortType) {
1642
- var options = $elt.data(dataNs);
1643
-
1644
- if (typeof asc !== 'undefined') {
1645
- if ('asc' !== asc && 'desc' !== asc) {
1646
- asc = !!asc ? 'asc' : 'desc';
1611
+ return true;
1612
+ },
1613
+ /**
1614
+ * Set the sort options.
1615
+ *
1616
+ * @param {jQueryElement} $elt - plugin's element
1617
+ * @param {String} sortBy - the model id of the col to sort
1618
+ * @param {Boolean|String} [asc] - sort direction true for asc of deduced
1619
+ * @param {String} sortType - sorting type, numeric or string sorting
1620
+ * @returns {Object} - returns the options
1621
+ * @private
1622
+ */
1623
+ _sortOptions($elt, sortBy, asc, sortType) {
1624
+ const options = $elt.data(dataNs);
1625
+ if (typeof asc !== 'undefined') {
1626
+ if ('asc' !== asc && 'desc' !== asc) {
1627
+ asc = !!asc ? 'asc' : 'desc';
1628
+ }
1629
+ options.sortorder = asc;
1630
+ } else if (options.sortorder === 'asc' && options.sortby === sortBy) {
1631
+ // If I already sort asc this element
1632
+ options.sortorder = 'desc';
1633
+ } else {
1634
+ // If I never sort by this element or
1635
+ // I sort by this element & the order was desc
1636
+ options.sortorder = 'asc';
1647
1637
  }
1648
1638
 
1649
- options.sortorder = asc;
1650
- } else if (options.sortorder === 'asc' && options.sortby === sortBy) {
1651
- // If I already sort asc this element
1652
- options.sortorder = 'desc';
1653
- } else {
1654
- // If I never sort by this element or
1655
- // I sort by this element & the order was desc
1656
- options.sortorder = 'asc';
1657
- } // Change the sorting element anyway.
1658
-
1659
-
1660
- options.sortby = sortBy; // define sorting type
1661
-
1662
- options.sorttype = sortType; //rebind options to the elt
1639
+ // Change the sorting element anyway.
1640
+ options.sortby = sortBy;
1663
1641
 
1664
- $elt.data(dataNs, options);
1665
- return _.cloneDeep(options);
1666
- },
1667
-
1668
- /**
1669
- * Gets the selected items. Returns an array of identifiers.
1670
- *
1671
- * @param {jQueryElement} $elt - plugin's element
1672
- * @returns {Array} - Returns an array of identifiers.
1673
- */
1674
- _selection: function _selection($elt) {
1675
- var $selected = $elt.find('[data-item-identifier]').has('td.checkboxes input:checked');
1676
- var selection = [];
1677
- $selected.each(function () {
1678
- selection.push($$1(this).data('item-identifier'));
1679
- });
1680
- return selection;
1681
- },
1682
- _highlightRows: function _highlightRows($elt, rowIds) {
1683
- var _this = this;
1684
-
1685
- $elt.find('[data-item-identifier]').removeClass('highlight');
1686
- rowIds.forEach(function (rowId) {
1687
- _this._highlightRow($elt, rowId);
1688
- });
1689
- },
1690
-
1691
- /**
1692
- * Highlight the row with identifier
1693
- *
1694
- * @param $elt
1695
- * @param rowId
1696
- * @deprecated Use highlightRows instead
1697
- */
1698
- _highlightRow: function _highlightRow($elt, rowId) {
1699
- this._addRowClass($elt, rowId, 'highlight');
1700
- },
1701
-
1702
- /**
1703
- * Css class add to the row with id
1704
- *
1705
- * @param $elt
1706
- * @param rowId
1707
- * @param className
1708
- * @private
1709
- */
1710
- _addRowClass: function _addRowClass($elt, rowId, className) {
1711
- var $row = $elt.find('[data-item-identifier="' + rowId + '"]');
1642
+ // define sorting type
1643
+ options.sorttype = sortType;
1712
1644
 
1713
- if (!$row.hasClass(className)) {
1714
- $row.addClass(className);
1715
- }
1716
- },
1717
-
1718
- /**
1719
- * Css class remove from the row with id
1720
- *
1721
- * @param $elt
1722
- * @param rowId
1723
- * @param className
1724
- * @private
1725
- */
1726
- _removeRowClass: function _removeRowClass($elt, rowId, className) {
1727
- var $row = $elt.find('[data-item-identifier="' + rowId + '"]');
1728
-
1729
- if ($row.hasClass(className)) {
1730
- $row.removeClass(className);
1731
- }
1732
- },
1733
-
1734
- /**
1735
- * Update amount items per page
1736
- *
1737
- * @param $elt
1738
- * @param rows
1739
- * @fires dataTable#setpage.datatable
1740
- */
1741
- _setRows: function _setRows($elt, rows) {
1742
- var options = $elt.data(dataNs);
1743
-
1744
- if (options.rows !== rows) {
1745
- // set new amount of items per page
1746
- options.rows = rows; // set page to the first one
1645
+ //rebind options to the elt
1646
+ $elt.data(dataNs, options);
1647
+ return _.cloneDeep(options);
1648
+ },
1649
+ /**
1650
+ * Gets the selected items. Returns an array of identifiers.
1651
+ *
1652
+ * @param {jQueryElement} $elt - plugin's element
1653
+ * @returns {Array} - Returns an array of identifiers.
1654
+ */
1655
+ _selection($elt) {
1656
+ const $selected = $elt.find('[data-item-identifier]').has('td.checkboxes input:checked');
1657
+ const selection = [];
1658
+ $selected.each(function () {
1659
+ selection.push($$1(this).data('item-identifier'));
1660
+ });
1661
+ return selection;
1662
+ },
1663
+ _highlightRows($elt, rowIds) {
1664
+ $elt.find('[data-item-identifier]').removeClass('highlight');
1665
+ rowIds.forEach(rowId => {
1666
+ this._highlightRow($elt, rowId);
1667
+ });
1668
+ },
1669
+ /**
1670
+ * Highlight the row with identifier
1671
+ *
1672
+ * @param $elt
1673
+ * @param rowId
1674
+ * @deprecated Use highlightRows instead
1675
+ */
1676
+ _highlightRow($elt, rowId) {
1677
+ this._addRowClass($elt, rowId, 'highlight');
1678
+ },
1679
+ /**
1680
+ * Css class add to the row with id
1681
+ *
1682
+ * @param $elt
1683
+ * @param rowId
1684
+ * @param className
1685
+ * @private
1686
+ */
1687
+ _addRowClass($elt, rowId, className) {
1688
+ const $row = $elt.find('[data-item-identifier="' + rowId + '"]');
1689
+ if (!$row.hasClass(className)) {
1690
+ $row.addClass(className);
1691
+ }
1692
+ },
1693
+ /**
1694
+ * Css class remove from the row with id
1695
+ *
1696
+ * @param $elt
1697
+ * @param rowId
1698
+ * @param className
1699
+ * @private
1700
+ */
1701
+ _removeRowClass($elt, rowId, className) {
1702
+ const $row = $elt.find('[data-item-identifier="' + rowId + '"]');
1703
+ if ($row.hasClass(className)) {
1704
+ $row.removeClass(className);
1705
+ }
1706
+ },
1707
+ /**
1708
+ * Update amount items per page
1709
+ *
1710
+ * @param $elt
1711
+ * @param rows
1712
+ * @fires dataTable#setpage.datatable
1713
+ */
1714
+ _setRows($elt, rows) {
1715
+ const options = $elt.data(dataNs);
1716
+ if (options.rows !== rows) {
1717
+ // set new amount of items per page
1718
+ options.rows = rows;
1747
1719
 
1748
- options.page = 1; //rebind options to the elt
1720
+ // set page to the first one
1721
+ options.page = 1;
1749
1722
 
1750
- $elt.data(dataNs, options);
1751
- /**
1752
- * @event dataTable#setpage.dataTable
1753
- */
1723
+ //rebind options to the elt
1724
+ $elt.data(dataNs, options);
1754
1725
 
1755
- $elt.trigger('setpage.' + ns); // Call the query
1726
+ /**
1727
+ * @event dataTable#setpage.dataTable
1728
+ */
1729
+ $elt.trigger('setpage.' + ns);
1756
1730
 
1757
- this._query($elt);
1731
+ // Call the query
1732
+ this._query($elt);
1733
+ }
1758
1734
  }
1759
- }
1760
- };
1761
- Pluginifier.register(ns, dataTable, {
1762
- expose: ['refresh', 'sort', 'filter', 'selection', 'render', 'highlightRow', 'highlightRows', 'addRowClass', 'removeRowClass']
1763
- });
1735
+ };
1736
+ Pluginifier.register(ns, dataTable, {
1737
+ expose: ['refresh', 'sort', 'filter', 'selection', 'render', 'highlightRow', 'highlightRows', 'addRowClass', 'removeRowClass']
1738
+ });
1764
1739
 
1765
1740
  });