ui_bibz 3.0.13 → 4.0.0.beta4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (300) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +3 -3
  3. data/.github/workflows/linter.yml +13 -12
  4. data/.overcommit.yml +6 -0
  5. data/.rubocop.yml +6 -0
  6. data/.ruby-version +1 -1
  7. data/Gemfile +19 -12
  8. data/Gemfile.lock +219 -148
  9. data/app/assets/config/ui_bibz.js +14 -0
  10. data/app/assets/javascripts/controllers/combobox_controller.js +37 -0
  11. data/app/assets/javascripts/forms/formula.js +82 -0
  12. data/app/assets/javascripts/forms/input-connected.js +132 -0
  13. data/app/assets/javascripts/forms/jquery.multi-select-extend.js +52 -0
  14. data/app/assets/javascripts/forms.js +160 -0
  15. data/app/assets/javascripts/interfaces.js +56 -0
  16. data/app/assets/javascripts/tables.js +49 -0
  17. data/app/assets/javascripts/ui_bibz_js.js +37 -0
  18. data/app/assets/stylesheets/navigations/_nav.sass +2 -0
  19. data/app/assets/stylesheets/navigations/_navbar.sass +12 -0
  20. data/app/assets/stylesheets/navigations/_progress_bar.sass +2 -0
  21. data/app/assets/stylesheets/navigations/_toolbar.sass +3 -0
  22. data/app/assets/stylesheets/sass/_boxes.sass +1 -0
  23. data/app/assets/stylesheets/sass/_containers.sass +2 -0
  24. data/app/assets/stylesheets/sass/_fixes.sass +2 -0
  25. data/app/assets/stylesheets/sass/_forms.sass +9 -0
  26. data/app/assets/stylesheets/sass/_navigations.sass +4 -0
  27. data/app/assets/stylesheets/sass/_notifications.sass +4 -0
  28. data/app/assets/stylesheets/sass/_tables.sass +2 -0
  29. data/app/assets/stylesheets/sass/_variables_mixins_functions.sass +3 -0
  30. data/app/assets/stylesheets/sass/boxes/_card.sass +4 -0
  31. data/app/assets/stylesheets/sass/containers/_panel.scss +330 -0
  32. data/app/assets/stylesheets/sass/forms/_bootstrap_select.sass +5 -0
  33. data/app/assets/stylesheets/sass/forms/_button.sass +3 -0
  34. data/app/assets/stylesheets/sass/forms/_combobox.sass +32 -0
  35. data/app/assets/stylesheets/sass/forms/_date_picker.sass +3 -0
  36. data/app/assets/stylesheets/sass/forms/_form_check.sass +10 -0
  37. data/app/assets/stylesheets/sass/forms/_formula_field.sass +17 -0
  38. data/app/assets/stylesheets/sass/forms/_multiselect.sass +44 -0
  39. data/app/assets/stylesheets/sass/forms/_range.sass +44 -0
  40. data/app/assets/stylesheets/sass/forms/_slider.sass +136 -0
  41. data/app/assets/stylesheets/sass/forms/_surround_field.sass +25 -0
  42. data/app/assets/stylesheets/sass/notifications/_badge.sass +5 -0
  43. data/app/assets/stylesheets/sass/notifications/_glyph.sass +3 -0
  44. data/app/assets/stylesheets/sass/notifications/_star.sass +2 -0
  45. data/app/assets/stylesheets/sass/notifications/_toast.sass +3 -0
  46. data/app/assets/stylesheets/sass/tables/_table.sass +39 -0
  47. data/app/assets/stylesheets/sass/tables/_table_card.sass +39 -0
  48. data/app/assets/stylesheets/ui_bibz.sass +26 -0
  49. data/bin/test +3 -5
  50. data/config/importmap.rb +21 -0
  51. data/config/initializers/assets.rb +5 -0
  52. data/config/initializers/will_paginate.rb +1 -3
  53. data/lib/ui_bibz/builders/data_html_options_builder.rb +118 -0
  54. data/lib/ui_bibz/builders/html_classes_builder.rb +89 -0
  55. data/lib/ui_bibz/builders/html_options_builder.rb +22 -0
  56. data/lib/ui_bibz/factory_methods/component_initialize_factory_method.rb +33 -0
  57. data/lib/ui_bibz/helpers/ui/core/boxes_helper.rb +12 -12
  58. data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +58 -50
  59. data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +6 -6
  60. data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +2 -2
  61. data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +2 -2
  62. data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +12 -12
  63. data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +4 -4
  64. data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +10 -2
  65. data/lib/ui_bibz/helpers/ui/ux_helper.rb +2 -2
  66. data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
  67. data/lib/ui_bibz/infos.rb +3 -3
  68. data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +12 -12
  69. data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +1 -1
  70. data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_combobox_field_input.rb +15 -0
  71. data/lib/ui_bibz/rails/engine.rb +21 -4
  72. data/lib/ui_bibz/strategies/component_initialize_abstract_strategy.rb +27 -0
  73. data/lib/ui_bibz/strategies/component_initialize_block_strategy.rb +31 -0
  74. data/lib/ui_bibz/strategies/component_initialize_hash_strategy.rb +18 -0
  75. data/lib/ui_bibz/strategies/component_initialize_standard_strategy.rb +18 -0
  76. data/lib/ui_bibz/ui/concerns/card_itemable_concern.rb +4 -4
  77. data/lib/ui_bibz/ui/concerns/notification_concern.rb +1 -1
  78. data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
  79. data/lib/ui_bibz/ui/core/boxes/card_accordion.rb +4 -4
  80. data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
  81. data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
  82. data/lib/ui_bibz/ui/core/boxes/card_grid.rb +0 -3
  83. data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
  84. data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +9 -9
  85. data/lib/ui_bibz/ui/core/boxes/components/card_col.rb +2 -2
  86. data/lib/ui_bibz/ui/core/boxes/components/card_list_group.rb +1 -1
  87. data/lib/ui_bibz/ui/core/boxes/components/card_row.rb +1 -1
  88. data/lib/ui_bibz/ui/core/component.rb +13 -62
  89. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -1
  90. data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +11 -11
  91. data/lib/ui_bibz/ui/core/forms/choices/box_switch_field.rb +7 -7
  92. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +2 -2
  93. data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +5 -6
  94. data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
  95. data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +15 -15
  96. data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
  97. data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -5
  98. data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +1 -1
  99. data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +10 -10
  100. data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +2 -2
  101. data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +32 -32
  102. data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +7 -8
  103. data/lib/ui_bibz/ui/core/forms/texts/combobox_field.rb +96 -0
  104. data/lib/ui_bibz/ui/core/icons/components/glyph_text.rb +1 -1
  105. data/lib/ui_bibz/ui/core/icons/glyph.rb +4 -3
  106. data/lib/ui_bibz/ui/core/layouts/row.rb +2 -2
  107. data/lib/ui_bibz/ui/core/lists/components/list.rb +4 -4
  108. data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
  109. data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +6 -4
  110. data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -2
  111. data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +6 -5
  112. data/lib/ui_bibz/ui/core/navigations/components/toolbar_form.rb +2 -2
  113. data/lib/ui_bibz/ui/core/navigations/nav.rb +10 -6
  114. data/lib/ui_bibz/ui/core/navigations/navbar.rb +21 -19
  115. data/lib/ui_bibz/ui/core/navigations/pagination.rb +3 -3
  116. data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -5
  117. data/lib/ui_bibz/ui/core/notifications/alert.rb +4 -5
  118. data/lib/ui_bibz/ui/core/notifications/badge.rb +6 -2
  119. data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +1 -1
  120. data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +3 -3
  121. data/lib/ui_bibz/ui/core/notifications/toast.rb +8 -9
  122. data/lib/ui_bibz/ui/core/windows/components/offcanvas_body.rb +47 -0
  123. data/lib/ui_bibz/ui/core/windows/components/offcanvas_header.rb +54 -0
  124. data/lib/ui_bibz/ui/core/windows/modal.rb +9 -9
  125. data/lib/ui_bibz/ui/core/windows/offcanvas.rb +84 -0
  126. data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -20
  127. data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +11 -19
  128. data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +1 -1
  129. data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +3 -3
  130. data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +3 -3
  131. data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +3 -3
  132. data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +4 -4
  133. data/lib/ui_bibz/ui/ux/containers/panel.rb +13 -13
  134. data/lib/ui_bibz/ui/ux/tables/components/actions.rb +4 -4
  135. data/lib/ui_bibz/ui/ux/tables/components/column.rb +1 -1
  136. data/lib/ui_bibz/ui/ux/tables/components/columns.rb +2 -2
  137. data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
  138. data/lib/ui_bibz/ui/ux/tables/table.rb +5 -5
  139. data/lib/ui_bibz/ui/ux/tables/table_card.rb +6 -6
  140. data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
  141. data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +3 -3
  142. data/lib/ui_bibz/utils/screwdriver.rb +1 -1
  143. data/lib/ui_bibz/view_objects/glyph_component_view_object.rb +38 -0
  144. data/lib/ui_bibz.rb +26 -0
  145. data/test/builders/data_html_classes_builder_test.rb +37 -0
  146. data/test/builders/html_classes_builder_test.rb +76 -0
  147. data/test/dummy/Rakefile +1 -1
  148. data/test/dummy/app/assets/stylesheets/application.css +1 -15
  149. data/test/dummy/app/channels/application_cable/channel.rb +6 -0
  150. data/test/dummy/app/channels/application_cable/connection.rb +6 -0
  151. data/test/dummy/app/jobs/application_job.rb +9 -0
  152. data/test/dummy/app/mailers/application_mailer.rb +6 -0
  153. data/test/dummy/app/views/layouts/application.html.erb +10 -12
  154. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  155. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  156. data/test/dummy/bin/rails +3 -3
  157. data/test/dummy/bin/rake +2 -2
  158. data/test/dummy/bin/setup +12 -12
  159. data/test/dummy/config/application.rb +13 -17
  160. data/test/dummy/config/boot.rb +3 -3
  161. data/test/dummy/config/database.yml +2 -2
  162. data/test/dummy/config/environment.rb +1 -1
  163. data/test/dummy/config/environments/development.rb +21 -16
  164. data/test/dummy/config/environments/production.rb +16 -41
  165. data/test/dummy/config/environments/test.rb +19 -8
  166. data/test/dummy/config/importmap.rb +11 -0
  167. data/test/dummy/config/initializers/content_security_policy.rb +21 -24
  168. data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
  169. data/test/dummy/config/initializers/inflections.rb +4 -4
  170. data/test/dummy/config/initializers/permissions_policy.rb +12 -0
  171. data/test/dummy/config/locales/en.yml +13 -3
  172. data/test/dummy/config/puma.rb +7 -2
  173. data/test/dummy/config/storage.yml +5 -5
  174. data/test/dummy/config.ru +2 -1
  175. data/test/simple_form_test.rb +24 -24
  176. data/test/ui/core/boxes/card_test.rb +2 -1
  177. data/test/ui/core/component_test.rb +2 -2
  178. data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
  179. data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
  180. data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
  181. data/test/ui/core/forms/buttons/button_test.rb +2 -2
  182. data/test/ui/core/forms/choices/box_switch_field_test.rb +10 -10
  183. data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -1
  184. data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
  185. data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
  186. data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
  187. data/test/ui/core/forms/selects/dropdown_select_field_test.rb +2 -2
  188. data/test/ui/core/forms/selects/select_field_test.rb +1 -1
  189. data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
  190. data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
  191. data/test/ui/core/forms/texts/combobox_field_test.rb +19 -0
  192. data/test/ui/core/icons/glyph_test.rb +8 -4
  193. data/test/ui/core/icons/star_test.rb +12 -6
  194. data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
  195. data/test/ui/core/navigations/link_test.rb +1 -1
  196. data/test/ui/core/navigations/nav_test.rb +11 -0
  197. data/test/ui/core/notifications/alert_test.rb +1 -1
  198. data/test/ui/core/notifications/badge_test.rb +3 -3
  199. data/test/ui/core/notifications/popover_test.rb +4 -4
  200. data/test/ui/core/notifications/spinner_test.rb +1 -1
  201. data/test/ui/core/notifications/toast_test.rb +1 -1
  202. data/test/ui/core/notifications/tooltip_test.rb +4 -4
  203. data/test/ui/core/windows/offcanvas_test.rb +27 -0
  204. data/test/ui/ux/containers/panel_test.rb +1 -1
  205. data/test/ui/ux/tables/table_test.rb +3 -3
  206. data/test/view_objects/glyph_component_view_object_test.rb +17 -0
  207. data/ui_bibz.gemspec +6 -20
  208. data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
  209. data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
  210. data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
  211. data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
  212. data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
  213. data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
  214. data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
  215. data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
  216. data/vendor/assets/javascripts/bootstrap-markdown.js +1 -1555
  217. data/vendor/assets/javascripts/bootstrap-multiselect.min.js +40 -1176
  218. data/vendor/assets/javascripts/bootstrap-switch.min.js +9 -21
  219. data/vendor/assets/javascripts/bs-custom-file-input.min.js +0 -1
  220. data/vendor/assets/javascripts/debounce.js +51 -0
  221. data/vendor/assets/javascripts/fontawesome/all.js +5977 -0
  222. data/vendor/assets/javascripts/fontawesome/all.min.js +6 -0
  223. data/vendor/assets/javascripts/fontawesome/brands.js +749 -0
  224. data/vendor/assets/javascripts/fontawesome/brands.min.js +6 -0
  225. data/vendor/assets/javascripts/fontawesome/conflict-detection.js +1138 -0
  226. data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +6 -0
  227. data/vendor/assets/javascripts/fontawesome/fontawesome.js +3126 -0
  228. data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +6 -0
  229. data/vendor/assets/javascripts/fontawesome/regular.js +445 -0
  230. data/vendor/assets/javascripts/fontawesome/regular.min.js +6 -0
  231. data/vendor/assets/javascripts/fontawesome/solid.js +1672 -0
  232. data/vendor/assets/javascripts/fontawesome/solid.min.js +6 -0
  233. data/vendor/assets/javascripts/fontawesome/v4-shims.js +225 -0
  234. data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +6 -0
  235. data/vendor/assets/javascripts/fuzzysort.js +562 -0
  236. data/vendor/assets/javascripts/jquery-3.7.0.min.js +2 -0
  237. data/vendor/assets/javascripts/jquery.multi-select.min.js +725 -1
  238. data/vendor/assets/stylesheets/bootstrap-multiselect.sass +115 -0
  239. data/vendor/assets/stylesheets/bootstrap-switch.scss +211 -0
  240. data/vendor/assets/stylesheets/fontawesome/_animated.scss +142 -9
  241. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +13 -13
  242. data/vendor/assets/stylesheets/fontawesome/_core.scss +28 -6
  243. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +2 -1
  244. data/vendor/assets/stylesheets/fontawesome/_functions.scss +57 -0
  245. data/vendor/assets/stylesheets/fontawesome/_icons.scss +7 -1438
  246. data/vendor/assets/stylesheets/fontawesome/_list.scss +4 -4
  247. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +53 -34
  248. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +25 -18
  249. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +12 -3
  250. data/vendor/assets/stylesheets/fontawesome/_shims.scss +640 -664
  251. data/vendor/assets/stylesheets/fontawesome/_sizing.scss +16 -0
  252. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +5 -4
  253. data/vendor/assets/stylesheets/fontawesome/_variables.scss +4896 -1393
  254. data/vendor/assets/stylesheets/fontawesome/brands.scss +17 -10
  255. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +7 -2
  256. data/vendor/assets/stylesheets/fontawesome/regular.scss +13 -10
  257. data/vendor/assets/stylesheets/fontawesome/solid.scss +13 -11
  258. data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -1
  259. data/vendor/assets/stylesheets/multi-select.css +92 -0
  260. metadata +126 -348
  261. data/.gitlab-ci.yml +0 -17
  262. data/.travis.yml +0 -24
  263. data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +0 -70
  264. data/structure.md +0 -68
  265. data/test/dummy/README.rdoc +0 -28
  266. data/test/dummy/app/assets/javascripts/application.js +0 -13
  267. data/test/dummy/app/javascripts/packs/index.js +0 -3
  268. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -9
  269. data/test/dummy/config/initializers/assets.rb +0 -14
  270. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -8
  271. data/test/dummy/config/initializers/cookies_serializer.rb +0 -7
  272. data/test/dummy/config/initializers/mime_types.rb +0 -5
  273. data/test/dummy/config/initializers/session_store.rb +0 -5
  274. data/test/dummy/config/initializers/ui_bibz.rb +0 -5
  275. data/test/dummy/config/initializers/wrap_parameters.rb +0 -16
  276. data/test/dummy/config/secrets.yml +0 -22
  277. data/test/dummy/config/spring.rb +0 -8
  278. data/test/dummy/test/models/user_test.rb +0 -9
  279. data/vendor/assets/fonts/fa-brands-400.eot +0 -0
  280. data/vendor/assets/fonts/fa-brands-400.svg +0 -3570
  281. data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
  282. data/vendor/assets/fonts/fa-brands-400.woff +0 -0
  283. data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
  284. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  285. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  286. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  287. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  288. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  289. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  290. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  291. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  292. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  293. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  294. data/vendor/assets/javascripts/all.js +0 -4441
  295. data/vendor/assets/javascripts/all.min.js +0 -5
  296. data/vendor/assets/stylesheets/all.min.css +0 -5
  297. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  298. data/vendor/assets/stylesheets/svg-with-js.css +0 -5
  299. /data/{test/dummy/app/mailers/.keep → app/assets/stylesheets/sass/forms/_dropdown.sass} +0 -0
  300. /data/{test/dummy/app/views/users/index.html.erb → app/assets/stylesheets/sass/forms/_input_refresh_button.sass} +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 54ca4e2e0b202ae39a08094990382124d427d76eba3f660363c38c1885149b0e
4
- data.tar.gz: f0852432106832dbe47e0352eb5b429c871b915527a2521f67bee0f0cd354cc8
3
+ metadata.gz: 700d531ae188bd2c4a87404667a960cdeb73ecdb278a60e66ed216822f899bdc
4
+ data.tar.gz: 6612425d1076b9aed91259c733d5560c7a8d80d6a5d155281441874d52e1bed0
5
5
  SHA512:
6
- metadata.gz: ffbedff59c7693aa52801cdb3160c37da738f5c6f1ba108c7c70381904b33011948ab43de44441dfa8206a11d880665e115383a5cd8e1fe85d7a55c2c0db7d07
7
- data.tar.gz: 4f99eaa56f041cfec23eded17669fe997c9504d2423e10f5a636543b89d35373e3287199022936904df16d85ff71e0ec74d1f6cbd6f83fa462d74bc5313ecc8b
6
+ metadata.gz: 97cc99d6e3d772d40c6be7091e6c5a2a68e9de849952b2b016f57b42eb3801df26247103c29ddd22f5ad75b59344bf067dd328b2ec6f0de30b607bd67ef41f5b
7
+ data.tar.gz: 0e3e98b1d96c9eb7ab56eec9d1f128c261b99f3787244e6deeda56d50620956b145abc2f39f916263c38587e7547db6ea9a77ece08b9aa06695d36a56ea12399
@@ -8,7 +8,7 @@ jobs:
8
8
  runs-on: ubuntu-latest
9
9
 
10
10
  steps:
11
- - uses: actions/checkout@v2
11
+ - uses: actions/checkout@v3
12
12
 
13
13
  - name: Set up Ruby with .ruby-version file
14
14
  uses: ruby/setup-ruby@v1
@@ -17,11 +17,11 @@ jobs:
17
17
 
18
18
  - name: Install gems
19
19
  run: |
20
- gem install bundler
20
+ bundle config path vendor/bundle
21
21
  bundle install --jobs 4 --retry 3
22
22
 
23
23
  - name: Test with Rake
24
- uses: paambaati/codeclimate-action@v2.7.5
24
+ uses: paambaati/codeclimate-action@v4.0.0
25
25
  env:
26
26
  CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
27
27
  with:
@@ -1,16 +1,17 @@
1
1
  name: Linter
2
-
3
- on: [push]
4
-
2
+ on: [pull_request]
5
3
  jobs:
6
- build:
7
-
4
+ rubocop:
5
+ name: runner / rubocop
8
6
  runs-on: ubuntu-latest
9
-
10
7
  steps:
11
- - uses: actions/checkout@v2
12
-
13
- - name: Rubocop linter
14
- uses: thooams/rubocop-action@v1
15
- env:
16
- GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8
+ - name: Check out code
9
+ uses: actions/checkout@v1
10
+ - uses: ruby/setup-ruby@v1
11
+ - name: rubocop
12
+ uses: reviewdog/action-rubocop@v1
13
+ with:
14
+ rubocop_version: gemfile
15
+ rubocop_extensions: rubocop-rails:gemfile rubocop-performance:gemfile rubocop-ast:gemfile rubocop-minitest:gemfile
16
+ github_token: ${{ secrets.github_token }}
17
+ reporter: github-pr-review # Default is github-pr-check
data/.overcommit.yml CHANGED
@@ -2,4 +2,10 @@ PreCommit:
2
2
  Rubocop:
3
3
  enabled: true
4
4
  command: ['bundle', 'exec', 'rubocop']
5
+ on_warn: fail # Treat all warnings as failures
5
6
 
7
+ TrailingWhitespace:
8
+ enabled: true
9
+
10
+ Fasterer:
11
+ enabled: true
data/.rubocop.yml CHANGED
@@ -176,3 +176,9 @@ Rails/SkipsModelValidations:
176
176
 
177
177
  Style/OpenStructUse:
178
178
  Enabled: false
179
+
180
+ Naming/BlockForwarding:
181
+ Enabled: true
182
+ Exclude:
183
+ - lib/ui_bibz/ui/core/component.rb
184
+ - lib/ui_bibz/ui/core/navigations/components/nav_link.rb
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-3.0.1
1
+ ruby-3.2.2
data/Gemfile CHANGED
@@ -3,18 +3,25 @@
3
3
  source 'https://rubygems.org'
4
4
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
- # Declare your gem's dependencies in ui_bibz.gemspec.
7
- # Bundler will treat runtime dependencies like base dependencies, and
8
- # development dependencies will be added by default to the :development group.
6
+ # Specify your gem's dependencies in plugin_test.gemspec.
9
7
  gemspec
10
8
 
11
- # Declare any dependencies that are still in development here instead of in
12
- # your gemspec. These might include edge Rails or gems from your path or
13
- # Git. Remember to move these dependencies to your gemspec before releasing
14
- # your gem to rubygems.org.
9
+ gem 'puma'
10
+ gem 'sqlite3'
15
11
 
16
- # To use a debugger
17
- gem 'awesome_print', group: %i[test development]
18
- gem 'byebug', group: %i[development test]
19
- gem 'jquery-rails', '>= 3.1.0'
20
- # gem 'simple_form', group: %i[test development]
12
+ group :development, :test do
13
+ gem 'awesome_print'
14
+ gem 'byebug'
15
+ gem 'haml-rails'
16
+ gem 'importmap-rails'
17
+ gem 'minitest'
18
+ gem 'overcommit'
19
+ gem 'rubocop'
20
+ gem 'rubocop-ast'
21
+ gem 'rubocop-minitest'
22
+ gem 'rubocop-performance'
23
+ gem 'rubocop-rails'
24
+ gem 'simplecov'
25
+ gem 'simple_form'
26
+ gem 'yard'
27
+ end
data/Gemfile.lock CHANGED
@@ -1,7 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (3.0.13)
4
+ ui_bibz (4.0.0.beta4)
5
+ bootstrap (~> 5.3.0)
6
+ rails (>= 7.0.6)
5
7
  will-paginate-i18n
6
8
  will_paginate (~> 3.3.0)
7
9
  will_paginate-bootstrap4
@@ -9,229 +11,298 @@ PATH
9
11
  GEM
10
12
  remote: https://rubygems.org/
11
13
  specs:
12
- actioncable (6.1.4.4)
13
- actionpack (= 6.1.4.4)
14
- activesupport (= 6.1.4.4)
14
+ actioncable (7.1.1)
15
+ actionpack (= 7.1.1)
16
+ activesupport (= 7.1.1)
15
17
  nio4r (~> 2.0)
16
18
  websocket-driver (>= 0.6.1)
17
- actionmailbox (6.1.4.4)
18
- actionpack (= 6.1.4.4)
19
- activejob (= 6.1.4.4)
20
- activerecord (= 6.1.4.4)
21
- activestorage (= 6.1.4.4)
22
- activesupport (= 6.1.4.4)
19
+ zeitwerk (~> 2.6)
20
+ actionmailbox (7.1.1)
21
+ actionpack (= 7.1.1)
22
+ activejob (= 7.1.1)
23
+ activerecord (= 7.1.1)
24
+ activestorage (= 7.1.1)
25
+ activesupport (= 7.1.1)
23
26
  mail (>= 2.7.1)
24
- actionmailer (6.1.4.4)
25
- actionpack (= 6.1.4.4)
26
- actionview (= 6.1.4.4)
27
- activejob (= 6.1.4.4)
28
- activesupport (= 6.1.4.4)
27
+ net-imap
28
+ net-pop
29
+ net-smtp
30
+ actionmailer (7.1.1)
31
+ actionpack (= 7.1.1)
32
+ actionview (= 7.1.1)
33
+ activejob (= 7.1.1)
34
+ activesupport (= 7.1.1)
29
35
  mail (~> 2.5, >= 2.5.4)
30
- rails-dom-testing (~> 2.0)
31
- actionpack (6.1.4.4)
32
- actionview (= 6.1.4.4)
33
- activesupport (= 6.1.4.4)
34
- rack (~> 2.0, >= 2.0.9)
36
+ net-imap
37
+ net-pop
38
+ net-smtp
39
+ rails-dom-testing (~> 2.2)
40
+ actionpack (7.1.1)
41
+ actionview (= 7.1.1)
42
+ activesupport (= 7.1.1)
43
+ nokogiri (>= 1.8.5)
44
+ rack (>= 2.2.4)
45
+ rack-session (>= 1.0.1)
35
46
  rack-test (>= 0.6.3)
36
- rails-dom-testing (~> 2.0)
37
- rails-html-sanitizer (~> 1.0, >= 1.2.0)
38
- actiontext (6.1.4.4)
39
- actionpack (= 6.1.4.4)
40
- activerecord (= 6.1.4.4)
41
- activestorage (= 6.1.4.4)
42
- activesupport (= 6.1.4.4)
47
+ rails-dom-testing (~> 2.2)
48
+ rails-html-sanitizer (~> 1.6)
49
+ actiontext (7.1.1)
50
+ actionpack (= 7.1.1)
51
+ activerecord (= 7.1.1)
52
+ activestorage (= 7.1.1)
53
+ activesupport (= 7.1.1)
54
+ globalid (>= 0.6.0)
43
55
  nokogiri (>= 1.8.5)
44
- actionview (6.1.4.4)
45
- activesupport (= 6.1.4.4)
56
+ actionview (7.1.1)
57
+ activesupport (= 7.1.1)
46
58
  builder (~> 3.1)
47
- erubi (~> 1.4)
48
- rails-dom-testing (~> 2.0)
49
- rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.1.4.4)
51
- activesupport (= 6.1.4.4)
59
+ erubi (~> 1.11)
60
+ rails-dom-testing (~> 2.2)
61
+ rails-html-sanitizer (~> 1.6)
62
+ activejob (7.1.1)
63
+ activesupport (= 7.1.1)
52
64
  globalid (>= 0.3.6)
53
- activemodel (6.1.4.4)
54
- activesupport (= 6.1.4.4)
55
- activerecord (6.1.4.4)
56
- activemodel (= 6.1.4.4)
57
- activesupport (= 6.1.4.4)
58
- activestorage (6.1.4.4)
59
- actionpack (= 6.1.4.4)
60
- activejob (= 6.1.4.4)
61
- activerecord (= 6.1.4.4)
62
- activesupport (= 6.1.4.4)
63
- marcel (~> 1.0.0)
64
- mini_mime (>= 1.1.0)
65
- activesupport (6.1.4.4)
65
+ activemodel (7.1.1)
66
+ activesupport (= 7.1.1)
67
+ activerecord (7.1.1)
68
+ activemodel (= 7.1.1)
69
+ activesupport (= 7.1.1)
70
+ timeout (>= 0.4.0)
71
+ activestorage (7.1.1)
72
+ actionpack (= 7.1.1)
73
+ activejob (= 7.1.1)
74
+ activerecord (= 7.1.1)
75
+ activesupport (= 7.1.1)
76
+ marcel (~> 1.0)
77
+ activesupport (7.1.1)
78
+ base64
79
+ bigdecimal
66
80
  concurrent-ruby (~> 1.0, >= 1.0.2)
81
+ connection_pool (>= 2.2.5)
82
+ drb
67
83
  i18n (>= 1.6, < 2)
68
84
  minitest (>= 5.1)
85
+ mutex_m
69
86
  tzinfo (~> 2.0)
70
- zeitwerk (~> 2.3)
71
87
  ast (2.4.2)
88
+ autoprefixer-rails (10.4.15.0)
89
+ execjs (~> 2)
72
90
  awesome_print (1.9.2)
91
+ base64 (0.1.1)
92
+ bigdecimal (3.1.4)
93
+ bootstrap (5.3.1)
94
+ autoprefixer-rails (>= 9.1.0)
95
+ popper_js (>= 2.11.8, < 3)
96
+ sassc-rails (>= 2.0.0)
73
97
  builder (3.2.4)
74
98
  byebug (11.1.3)
75
99
  childprocess (4.1.0)
76
- concurrent-ruby (1.1.9)
100
+ concurrent-ruby (1.2.2)
101
+ connection_pool (2.4.1)
77
102
  crass (1.0.6)
103
+ date (3.3.3)
78
104
  docile (1.4.0)
79
- erubi (1.10.0)
80
- erubis (2.7.0)
105
+ drb (2.1.1)
106
+ ruby2_keywords
107
+ erubi (1.12.0)
108
+ execjs (2.9.1)
81
109
  factory_bot (4.11.1)
82
110
  activesupport (>= 3.0.0)
83
111
  factory_bot_rails (4.11.1)
84
112
  factory_bot (~> 4.11.1)
85
113
  railties (>= 3.0.0)
86
- globalid (1.0.0)
87
- activesupport (>= 5.0)
88
- haml (5.2.2)
89
- temple (>= 0.8.0)
114
+ ffi (1.16.3)
115
+ globalid (1.2.1)
116
+ activesupport (>= 6.1)
117
+ haml (6.2.3)
118
+ temple (>= 0.8.2)
119
+ thor
90
120
  tilt
91
- haml-rails (2.0.1)
121
+ haml-rails (2.1.0)
92
122
  actionpack (>= 5.1)
93
123
  activesupport (>= 5.1)
94
- haml (>= 4.0.6, < 6.0)
95
- html2haml (>= 1.0.1)
124
+ haml (>= 4.0.6)
96
125
  railties (>= 5.1)
97
- html2haml (2.2.0)
98
- erubis (~> 2.7.0)
99
- haml (>= 4.0, < 6)
100
- nokogiri (>= 1.6.0)
101
- ruby_parser (~> 3.5)
102
- i18n (1.8.11)
126
+ i18n (1.14.1)
103
127
  concurrent-ruby (~> 1.0)
128
+ importmap-rails (1.2.1)
129
+ actionpack (>= 6.0.0)
130
+ railties (>= 6.0.0)
104
131
  iniparse (1.5.0)
105
- jquery-rails (4.4.0)
106
- rails-dom-testing (>= 1, < 3)
107
- railties (>= 4.2.0)
108
- thor (>= 0.14, < 2.0)
109
- loofah (2.13.0)
132
+ io-console (0.6.0)
133
+ irb (1.8.3)
134
+ rdoc
135
+ reline (>= 0.3.8)
136
+ json (2.6.3)
137
+ language_server-protocol (3.17.0.3)
138
+ loofah (2.21.4)
110
139
  crass (~> 1.0.2)
111
- nokogiri (>= 1.5.9)
112
- mail (2.7.1)
140
+ nokogiri (>= 1.12.0)
141
+ mail (2.8.1)
113
142
  mini_mime (>= 0.1.1)
143
+ net-imap
144
+ net-pop
145
+ net-smtp
114
146
  marcel (1.0.2)
115
- method_source (1.0.0)
116
- mini_mime (1.1.2)
117
- mini_portile2 (2.6.1)
118
- minitest (5.15.0)
119
- nio4r (2.5.8)
120
- nokogiri (1.12.5)
121
- mini_portile2 (~> 2.6.1)
147
+ mini_mime (1.1.5)
148
+ minitest (5.20.0)
149
+ mutex_m (0.1.2)
150
+ net-imap (0.4.1)
151
+ date
152
+ net-protocol
153
+ net-pop (0.1.2)
154
+ net-protocol
155
+ net-protocol (0.2.1)
156
+ timeout
157
+ net-smtp (0.4.0)
158
+ net-protocol
159
+ nio4r (2.5.9)
160
+ nokogiri (1.15.4-x86_64-darwin)
161
+ racc (~> 1.4)
162
+ nokogiri (1.15.4-x86_64-linux)
122
163
  racc (~> 1.4)
123
- overcommit (0.58.0)
164
+ overcommit (0.60.0)
124
165
  childprocess (>= 0.6.3, < 5)
125
166
  iniparse (~> 1.4)
126
167
  rexml (~> 3.2)
127
- parallel (1.21.0)
128
- parser (3.0.3.2)
168
+ parallel (1.23.0)
169
+ parser (3.2.2.4)
129
170
  ast (~> 2.4.1)
130
- racc (1.6.0)
131
- rack (2.2.3)
132
- rack-test (1.1.0)
133
- rack (>= 1.0, < 3)
134
- rails (6.1.4.4)
135
- actioncable (= 6.1.4.4)
136
- actionmailbox (= 6.1.4.4)
137
- actionmailer (= 6.1.4.4)
138
- actionpack (= 6.1.4.4)
139
- actiontext (= 6.1.4.4)
140
- actionview (= 6.1.4.4)
141
- activejob (= 6.1.4.4)
142
- activemodel (= 6.1.4.4)
143
- activerecord (= 6.1.4.4)
144
- activestorage (= 6.1.4.4)
145
- activesupport (= 6.1.4.4)
171
+ racc
172
+ popper_js (2.11.8)
173
+ psych (5.1.1.1)
174
+ stringio
175
+ puma (6.4.0)
176
+ nio4r (~> 2.0)
177
+ racc (1.7.1)
178
+ rack (3.0.8)
179
+ rack-session (2.0.0)
180
+ rack (>= 3.0.0)
181
+ rack-test (2.1.0)
182
+ rack (>= 1.3)
183
+ rackup (2.1.0)
184
+ rack (>= 3)
185
+ webrick (~> 1.8)
186
+ rails (7.1.1)
187
+ actioncable (= 7.1.1)
188
+ actionmailbox (= 7.1.1)
189
+ actionmailer (= 7.1.1)
190
+ actionpack (= 7.1.1)
191
+ actiontext (= 7.1.1)
192
+ actionview (= 7.1.1)
193
+ activejob (= 7.1.1)
194
+ activemodel (= 7.1.1)
195
+ activerecord (= 7.1.1)
196
+ activestorage (= 7.1.1)
197
+ activesupport (= 7.1.1)
146
198
  bundler (>= 1.15.0)
147
- railties (= 6.1.4.4)
148
- sprockets-rails (>= 2.0.0)
149
- rails-dom-testing (2.0.3)
150
- activesupport (>= 4.2.0)
199
+ railties (= 7.1.1)
200
+ rails-dom-testing (2.2.0)
201
+ activesupport (>= 5.0.0)
202
+ minitest
151
203
  nokogiri (>= 1.6)
152
- rails-html-sanitizer (1.4.2)
153
- loofah (~> 2.3)
154
- railties (6.1.4.4)
155
- actionpack (= 6.1.4.4)
156
- activesupport (= 6.1.4.4)
157
- method_source
158
- rake (>= 0.13)
159
- thor (~> 1.0)
160
- rainbow (3.0.0)
204
+ rails-html-sanitizer (1.6.0)
205
+ loofah (~> 2.21)
206
+ nokogiri (~> 1.14)
207
+ railties (7.1.1)
208
+ actionpack (= 7.1.1)
209
+ activesupport (= 7.1.1)
210
+ irb
211
+ rackup (>= 1.0.0)
212
+ rake (>= 12.2)
213
+ thor (~> 1.0, >= 1.2.2)
214
+ zeitwerk (~> 2.6)
215
+ rainbow (3.1.1)
161
216
  rake (13.0.6)
162
- regexp_parser (2.2.0)
163
- rexml (3.2.5)
164
- rubocop (1.23.0)
217
+ rdoc (6.5.0)
218
+ psych (>= 4.0.0)
219
+ regexp_parser (2.8.2)
220
+ reline (0.3.9)
221
+ io-console (~> 0.5)
222
+ rexml (3.2.6)
223
+ rubocop (1.57.1)
224
+ base64 (~> 0.1.1)
225
+ json (~> 2.3)
226
+ language_server-protocol (>= 3.17.0)
165
227
  parallel (~> 1.10)
166
- parser (>= 3.0.0.0)
228
+ parser (>= 3.2.2.4)
167
229
  rainbow (>= 2.2.2, < 4.0)
168
230
  regexp_parser (>= 1.8, < 3.0)
169
- rexml
170
- rubocop-ast (>= 1.12.0, < 2.0)
231
+ rexml (>= 3.2.5, < 4.0)
232
+ rubocop-ast (>= 1.28.1, < 2.0)
171
233
  ruby-progressbar (~> 1.7)
172
- unicode-display_width (>= 1.4.0, < 3.0)
173
- rubocop-ast (1.15.0)
174
- parser (>= 3.0.1.1)
175
- rubocop-minitest (0.17.0)
176
- rubocop (>= 0.90, < 2.0)
177
- rubocop-performance (1.12.0)
234
+ unicode-display_width (>= 2.4.0, < 3.0)
235
+ rubocop-ast (1.29.0)
236
+ parser (>= 3.2.1.0)
237
+ rubocop-minitest (0.32.2)
238
+ rubocop (>= 1.39, < 2.0)
239
+ rubocop-performance (1.19.1)
178
240
  rubocop (>= 1.7.0, < 2.0)
179
241
  rubocop-ast (>= 0.4.0)
180
- rubocop-rails (2.12.4)
242
+ rubocop-rails (2.21.2)
181
243
  activesupport (>= 4.2.0)
182
244
  rack (>= 1.1)
183
- rubocop (>= 1.7.0, < 2.0)
184
- ruby-progressbar (1.11.0)
185
- ruby_parser (3.18.1)
186
- sexp_processor (~> 4.16)
187
- sexp_processor (4.16.0)
188
- simple_form (5.1.0)
245
+ rubocop (>= 1.33.0, < 2.0)
246
+ ruby-progressbar (1.13.0)
247
+ ruby2_keywords (0.0.5)
248
+ sassc (2.4.0)
249
+ ffi (~> 1.9)
250
+ sassc-rails (2.1.2)
251
+ railties (>= 4.0.0)
252
+ sassc (>= 2.0)
253
+ sprockets (> 3.0)
254
+ sprockets-rails
255
+ tilt
256
+ simple_form (5.3.0)
189
257
  actionpack (>= 5.2)
190
258
  activemodel (>= 5.2)
191
- simplecov (0.21.2)
259
+ simplecov (0.22.0)
192
260
  docile (~> 1.1)
193
261
  simplecov-html (~> 0.11)
194
262
  simplecov_json_formatter (~> 0.1)
195
263
  simplecov-html (0.12.3)
196
- simplecov_json_formatter (0.1.3)
197
- sprockets (4.0.2)
264
+ simplecov_json_formatter (0.1.4)
265
+ sprockets (4.2.1)
198
266
  concurrent-ruby (~> 1.0)
199
- rack (> 1, < 3)
267
+ rack (>= 2.2.4, < 4)
200
268
  sprockets-rails (3.4.2)
201
269
  actionpack (>= 5.2)
202
270
  activesupport (>= 5.2)
203
271
  sprockets (>= 3.0.0)
204
- sqlite3 (1.4.2)
205
- temple (0.8.2)
206
- thor (1.1.0)
207
- tilt (2.0.10)
208
- tzinfo (2.0.4)
272
+ sqlite3 (1.6.7-x86_64-darwin)
273
+ sqlite3 (1.6.7-x86_64-linux)
274
+ stringio (3.0.8)
275
+ temple (0.10.3)
276
+ thor (1.2.2)
277
+ tilt (2.3.0)
278
+ timeout (0.4.0)
279
+ tzinfo (2.0.6)
209
280
  concurrent-ruby (~> 1.0)
210
- unicode-display_width (2.1.0)
211
- webrick (1.7.0)
212
- websocket-driver (0.7.5)
281
+ unicode-display_width (2.5.0)
282
+ webrick (1.8.1)
283
+ websocket-driver (0.7.6)
213
284
  websocket-extensions (>= 0.1.0)
214
285
  websocket-extensions (0.1.5)
215
286
  will-paginate-i18n (0.1.15)
216
287
  will_paginate (3.3.1)
217
288
  will_paginate-bootstrap4 (0.2.2)
218
289
  will_paginate (~> 3.0, >= 3.0.0)
219
- yard (0.9.27)
220
- webrick (~> 1.7.0)
221
- zeitwerk (2.5.1)
290
+ yard (0.9.34)
291
+ zeitwerk (2.6.12)
222
292
 
223
293
  PLATFORMS
224
- ruby
294
+ x86_64-darwin-22
295
+ x86_64-linux
225
296
 
226
297
  DEPENDENCIES
227
298
  awesome_print
228
299
  byebug
229
300
  factory_bot_rails (~> 4.0)
230
301
  haml-rails
231
- jquery-rails (>= 3.1.0)
302
+ importmap-rails
232
303
  minitest
233
304
  overcommit
234
- rails (~> 6.1.3, >= 6.1.3.2)
305
+ puma
235
306
  rubocop
236
307
  rubocop-ast
237
308
  rubocop-minitest
@@ -244,4 +315,4 @@ DEPENDENCIES
244
315
  yard
245
316
 
246
317
  BUNDLED WITH
247
- 2.2.21
318
+ 2.4.10
@@ -0,0 +1,14 @@
1
+ //= link_tree ../../../vendor/assets/javascripts .js
2
+ ////= link_directory ../javascripts .js
3
+ //= link fuzzysort.js
4
+ //= link jquery.multi-select.min.js
5
+ //= link bootstrap-markdown.js
6
+ //= link bootstrap-datepicker.min.js
7
+ //= link bootstrap-switch.min.js
8
+ //= link jquery.quicksearch.min.js
9
+ //= link ui_bibz_js.js
10
+ //= link forms/jquery.multi-select-extend.js
11
+ //= link forms/input-connected.js
12
+ //= link forms/formula.js
13
+ //= link debounce.js
14
+ //= link controllers/combobox_controller.js
@@ -0,0 +1,37 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+ import debounce from "debounce"
3
+
4
+ export default class ComboboxController extends Controller {
5
+ static values = { url: String, debounce: Number };
6
+
7
+ connect(){
8
+ this.searchValue = this.searchValue.bind(this);
9
+ this.debounceValue = this.element.getAttribute("data-combobox-debounce-value")
10
+ this.debouncedSearchValue = debounce(this.searchValue, this.debounceValue)
11
+ }
12
+
13
+ search(e) {
14
+ if (this.debounceValue && Number(this.debounceValue) > 0){
15
+ this.debouncedSearchValue(e);
16
+ }else {
17
+ this.searchValue(e);
18
+ }
19
+ }
20
+
21
+ insertValue(e){
22
+ this.element.querySelector('input').value = e.target.innerText
23
+ this.element.querySelector("turbo-frame").innerHTML = ''
24
+ }
25
+
26
+ searchValue(){
27
+ let input = this.element.querySelector('input')
28
+ let query = input.value
29
+ if (query.length < 2) {
30
+ return
31
+ }
32
+
33
+ const url = this.element.getAttribute("data-combobox-url-value") + '?query=' + query;
34
+
35
+ input.nextSibling.querySelector("turbo-frame").src = url;
36
+ }
37
+ }