ui_bibz 3.0.13 → 4.0.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (294) 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 +178 -138
  9. data/app/assets/config/ui_bibz.js +12 -0
  10. data/app/assets/javascripts/forms/formula.js +82 -0
  11. data/app/assets/javascripts/forms/input-connected.js +132 -0
  12. data/app/assets/javascripts/forms/jquery.multi-select-extend.js +52 -0
  13. data/app/assets/javascripts/forms.js +160 -0
  14. data/app/assets/javascripts/interfaces.js +56 -0
  15. data/app/assets/javascripts/tables.js +49 -0
  16. data/app/assets/javascripts/ui_bibz_js.js +37 -0
  17. data/app/assets/stylesheets/navigations/_nav.sass +2 -0
  18. data/app/assets/stylesheets/navigations/_navbar.sass +12 -0
  19. data/app/assets/stylesheets/navigations/_progress_bar.sass +2 -0
  20. data/app/assets/stylesheets/navigations/_toolbar.sass +3 -0
  21. data/app/assets/stylesheets/sass/_boxes.sass +1 -0
  22. data/app/assets/stylesheets/sass/_containers.sass +2 -0
  23. data/app/assets/stylesheets/sass/_fixes.sass +2 -0
  24. data/app/assets/stylesheets/sass/_forms.sass +8 -0
  25. data/app/assets/stylesheets/sass/_navigations.sass +4 -0
  26. data/app/assets/stylesheets/sass/_notifications.sass +4 -0
  27. data/app/assets/stylesheets/sass/_tables.sass +2 -0
  28. data/app/assets/stylesheets/sass/_variables_mixins_functions.sass +3 -0
  29. data/app/assets/stylesheets/sass/boxes/_card.sass +4 -0
  30. data/app/assets/stylesheets/sass/containers/_panel.scss +330 -0
  31. data/app/assets/stylesheets/sass/forms/_bootstrap_select.sass +5 -0
  32. data/app/assets/stylesheets/sass/forms/_button.sass +3 -0
  33. data/app/assets/stylesheets/sass/forms/_date_picker.sass +3 -0
  34. data/app/assets/stylesheets/sass/forms/_form_check.sass +10 -0
  35. data/app/assets/stylesheets/sass/forms/_formula_field.sass +17 -0
  36. data/app/assets/stylesheets/sass/forms/_multiselect.sass +44 -0
  37. data/app/assets/stylesheets/sass/forms/_range.sass +44 -0
  38. data/app/assets/stylesheets/sass/forms/_slider.sass +136 -0
  39. data/app/assets/stylesheets/sass/forms/_surround_field.sass +25 -0
  40. data/app/assets/stylesheets/sass/notifications/_badge.sass +5 -0
  41. data/app/assets/stylesheets/sass/notifications/_glyph.sass +3 -0
  42. data/app/assets/stylesheets/sass/notifications/_star.sass +2 -0
  43. data/app/assets/stylesheets/sass/notifications/_toast.sass +3 -0
  44. data/app/assets/stylesheets/sass/tables/_table.sass +39 -0
  45. data/app/assets/stylesheets/sass/tables/_table_card.sass +39 -0
  46. data/app/assets/stylesheets/ui_bibz.sass +26 -0
  47. data/bin/test +3 -5
  48. data/config/importmap.rb +19 -0
  49. data/config/initializers/assets.rb +5 -0
  50. data/config/initializers/will_paginate.rb +1 -3
  51. data/lib/ui_bibz/builders/data_html_options_builder.rb +118 -0
  52. data/lib/ui_bibz/builders/html_classes_builder.rb +89 -0
  53. data/lib/ui_bibz/builders/html_options_builder.rb +22 -0
  54. data/lib/ui_bibz/factory_methods/component_initialize_factory_method.rb +33 -0
  55. data/lib/ui_bibz/helpers/ui/core/boxes_helper.rb +12 -12
  56. data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +50 -50
  57. data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +6 -6
  58. data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +2 -2
  59. data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +2 -2
  60. data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +12 -12
  61. data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +4 -4
  62. data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +10 -2
  63. data/lib/ui_bibz/helpers/ui/ux_helper.rb +2 -2
  64. data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
  65. data/lib/ui_bibz/infos.rb +3 -3
  66. data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +12 -12
  67. data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +1 -1
  68. data/lib/ui_bibz/rails/engine.rb +21 -4
  69. data/lib/ui_bibz/strategies/component_initialize_abstract_strategy.rb +27 -0
  70. data/lib/ui_bibz/strategies/component_initialize_block_strategy.rb +31 -0
  71. data/lib/ui_bibz/strategies/component_initialize_hash_strategy.rb +18 -0
  72. data/lib/ui_bibz/strategies/component_initialize_standard_strategy.rb +18 -0
  73. data/lib/ui_bibz/ui/concerns/card_itemable_concern.rb +4 -4
  74. data/lib/ui_bibz/ui/concerns/notification_concern.rb +1 -1
  75. data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
  76. data/lib/ui_bibz/ui/core/boxes/card_accordion.rb +4 -4
  77. data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
  78. data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
  79. data/lib/ui_bibz/ui/core/boxes/card_grid.rb +0 -3
  80. data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
  81. data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +9 -9
  82. data/lib/ui_bibz/ui/core/boxes/components/card_col.rb +2 -2
  83. data/lib/ui_bibz/ui/core/boxes/components/card_list_group.rb +1 -1
  84. data/lib/ui_bibz/ui/core/boxes/components/card_row.rb +1 -1
  85. data/lib/ui_bibz/ui/core/component.rb +13 -62
  86. data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -1
  87. data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +11 -11
  88. data/lib/ui_bibz/ui/core/forms/choices/box_switch_field.rb +7 -7
  89. data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +2 -2
  90. data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +5 -6
  91. data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
  92. data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +15 -15
  93. data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
  94. data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -5
  95. data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +1 -1
  96. data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +10 -10
  97. data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +2 -2
  98. data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +32 -32
  99. data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +7 -8
  100. data/lib/ui_bibz/ui/core/icons/components/glyph_text.rb +1 -1
  101. data/lib/ui_bibz/ui/core/icons/glyph.rb +4 -3
  102. data/lib/ui_bibz/ui/core/layouts/row.rb +2 -2
  103. data/lib/ui_bibz/ui/core/lists/components/list.rb +4 -4
  104. data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
  105. data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +6 -4
  106. data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -2
  107. data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +6 -5
  108. data/lib/ui_bibz/ui/core/navigations/components/toolbar_form.rb +2 -2
  109. data/lib/ui_bibz/ui/core/navigations/nav.rb +10 -6
  110. data/lib/ui_bibz/ui/core/navigations/navbar.rb +21 -19
  111. data/lib/ui_bibz/ui/core/navigations/pagination.rb +3 -3
  112. data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -5
  113. data/lib/ui_bibz/ui/core/notifications/alert.rb +4 -5
  114. data/lib/ui_bibz/ui/core/notifications/badge.rb +6 -2
  115. data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +1 -1
  116. data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +3 -3
  117. data/lib/ui_bibz/ui/core/notifications/toast.rb +8 -9
  118. data/lib/ui_bibz/ui/core/windows/components/offcanvas_body.rb +47 -0
  119. data/lib/ui_bibz/ui/core/windows/components/offcanvas_header.rb +54 -0
  120. data/lib/ui_bibz/ui/core/windows/modal.rb +9 -9
  121. data/lib/ui_bibz/ui/core/windows/offcanvas.rb +84 -0
  122. data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -20
  123. data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +11 -19
  124. data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +1 -1
  125. data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +3 -3
  126. data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +3 -3
  127. data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +3 -3
  128. data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +4 -4
  129. data/lib/ui_bibz/ui/ux/containers/panel.rb +13 -13
  130. data/lib/ui_bibz/ui/ux/tables/components/actions.rb +4 -4
  131. data/lib/ui_bibz/ui/ux/tables/components/column.rb +1 -1
  132. data/lib/ui_bibz/ui/ux/tables/components/columns.rb +2 -2
  133. data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
  134. data/lib/ui_bibz/ui/ux/tables/table.rb +5 -5
  135. data/lib/ui_bibz/ui/ux/tables/table_card.rb +6 -6
  136. data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
  137. data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +3 -3
  138. data/lib/ui_bibz/utils/screwdriver.rb +1 -1
  139. data/lib/ui_bibz/view_objects/glyph_component_view_object.rb +38 -0
  140. data/lib/ui_bibz.rb +25 -0
  141. data/test/builders/data_html_classes_builder_test.rb +37 -0
  142. data/test/builders/html_classes_builder_test.rb +76 -0
  143. data/test/dummy/Rakefile +1 -1
  144. data/test/dummy/app/assets/stylesheets/application.css +1 -15
  145. data/test/dummy/app/channels/application_cable/channel.rb +6 -0
  146. data/test/dummy/app/channels/application_cable/connection.rb +6 -0
  147. data/test/dummy/app/jobs/application_job.rb +9 -0
  148. data/test/dummy/app/mailers/application_mailer.rb +6 -0
  149. data/test/dummy/app/views/layouts/application.html.erb +10 -12
  150. data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
  151. data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
  152. data/test/dummy/bin/rails +3 -3
  153. data/test/dummy/bin/rake +2 -2
  154. data/test/dummy/bin/setup +12 -12
  155. data/test/dummy/config/application.rb +13 -17
  156. data/test/dummy/config/boot.rb +3 -3
  157. data/test/dummy/config/database.yml +2 -2
  158. data/test/dummy/config/environment.rb +1 -1
  159. data/test/dummy/config/environments/development.rb +21 -16
  160. data/test/dummy/config/environments/production.rb +16 -41
  161. data/test/dummy/config/environments/test.rb +19 -8
  162. data/test/dummy/config/importmap.rb +11 -0
  163. data/test/dummy/config/initializers/content_security_policy.rb +21 -24
  164. data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
  165. data/test/dummy/config/initializers/inflections.rb +4 -4
  166. data/test/dummy/config/initializers/permissions_policy.rb +12 -0
  167. data/test/dummy/config/locales/en.yml +13 -3
  168. data/test/dummy/config/puma.rb +7 -2
  169. data/test/dummy/config/storage.yml +5 -5
  170. data/test/dummy/config.ru +2 -1
  171. data/test/simple_form_test.rb +24 -24
  172. data/test/ui/core/boxes/card_test.rb +2 -1
  173. data/test/ui/core/component_test.rb +2 -2
  174. data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
  175. data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
  176. data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
  177. data/test/ui/core/forms/buttons/button_test.rb +2 -2
  178. data/test/ui/core/forms/choices/box_switch_field_test.rb +10 -10
  179. data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -1
  180. data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
  181. data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
  182. data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
  183. data/test/ui/core/forms/selects/dropdown_select_field_test.rb +2 -2
  184. data/test/ui/core/forms/selects/select_field_test.rb +1 -1
  185. data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
  186. data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
  187. data/test/ui/core/icons/glyph_test.rb +8 -4
  188. data/test/ui/core/icons/star_test.rb +12 -6
  189. data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
  190. data/test/ui/core/navigations/link_test.rb +1 -1
  191. data/test/ui/core/navigations/nav_test.rb +11 -0
  192. data/test/ui/core/notifications/alert_test.rb +1 -1
  193. data/test/ui/core/notifications/badge_test.rb +3 -3
  194. data/test/ui/core/notifications/popover_test.rb +4 -4
  195. data/test/ui/core/notifications/spinner_test.rb +1 -1
  196. data/test/ui/core/notifications/toast_test.rb +1 -1
  197. data/test/ui/core/notifications/tooltip_test.rb +4 -4
  198. data/test/ui/core/windows/offcanvas_test.rb +27 -0
  199. data/test/ui/ux/containers/panel_test.rb +1 -1
  200. data/test/ui/ux/tables/table_test.rb +3 -3
  201. data/test/view_objects/glyph_component_view_object_test.rb +17 -0
  202. data/ui_bibz.gemspec +6 -20
  203. data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
  204. data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
  205. data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
  206. data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
  207. data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
  208. data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
  209. data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
  210. data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
  211. data/vendor/assets/javascripts/bootstrap-markdown.js +1 -1555
  212. data/vendor/assets/javascripts/bootstrap-multiselect.min.js +40 -1176
  213. data/vendor/assets/javascripts/bootstrap-switch.min.js +9 -21
  214. data/vendor/assets/javascripts/bs-custom-file-input.min.js +0 -1
  215. data/vendor/assets/javascripts/fontawesome/all.js +5977 -0
  216. data/vendor/assets/javascripts/fontawesome/all.min.js +6 -0
  217. data/vendor/assets/javascripts/fontawesome/brands.js +749 -0
  218. data/vendor/assets/javascripts/fontawesome/brands.min.js +6 -0
  219. data/vendor/assets/javascripts/fontawesome/conflict-detection.js +1138 -0
  220. data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +6 -0
  221. data/vendor/assets/javascripts/fontawesome/fontawesome.js +3126 -0
  222. data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +6 -0
  223. data/vendor/assets/javascripts/fontawesome/regular.js +445 -0
  224. data/vendor/assets/javascripts/fontawesome/regular.min.js +6 -0
  225. data/vendor/assets/javascripts/fontawesome/solid.js +1672 -0
  226. data/vendor/assets/javascripts/fontawesome/solid.min.js +6 -0
  227. data/vendor/assets/javascripts/fontawesome/v4-shims.js +225 -0
  228. data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +6 -0
  229. data/vendor/assets/javascripts/fuzzysort.js +562 -0
  230. data/vendor/assets/javascripts/jquery-3.7.0.min.js +2 -0
  231. data/vendor/assets/javascripts/jquery.multi-select.min.js +725 -1
  232. data/vendor/assets/stylesheets/bootstrap-multiselect.sass +115 -0
  233. data/vendor/assets/stylesheets/bootstrap-switch.scss +211 -0
  234. data/vendor/assets/stylesheets/fontawesome/_animated.scss +142 -9
  235. data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +13 -13
  236. data/vendor/assets/stylesheets/fontawesome/_core.scss +28 -6
  237. data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +2 -1
  238. data/vendor/assets/stylesheets/fontawesome/_functions.scss +57 -0
  239. data/vendor/assets/stylesheets/fontawesome/_icons.scss +7 -1438
  240. data/vendor/assets/stylesheets/fontawesome/_list.scss +4 -4
  241. data/vendor/assets/stylesheets/fontawesome/_mixins.scss +53 -34
  242. data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +25 -18
  243. data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +12 -3
  244. data/vendor/assets/stylesheets/fontawesome/_shims.scss +640 -664
  245. data/vendor/assets/stylesheets/fontawesome/_sizing.scss +16 -0
  246. data/vendor/assets/stylesheets/fontawesome/_stacked.scss +5 -4
  247. data/vendor/assets/stylesheets/fontawesome/_variables.scss +4896 -1393
  248. data/vendor/assets/stylesheets/fontawesome/brands.scss +17 -10
  249. data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +7 -2
  250. data/vendor/assets/stylesheets/fontawesome/regular.scss +13 -10
  251. data/vendor/assets/stylesheets/fontawesome/solid.scss +13 -11
  252. data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -1
  253. data/vendor/assets/stylesheets/multi-select.css +92 -0
  254. metadata +120 -348
  255. data/.gitlab-ci.yml +0 -17
  256. data/.travis.yml +0 -24
  257. data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +0 -70
  258. data/structure.md +0 -68
  259. data/test/dummy/README.rdoc +0 -28
  260. data/test/dummy/app/assets/javascripts/application.js +0 -13
  261. data/test/dummy/app/javascripts/packs/index.js +0 -3
  262. data/test/dummy/config/initializers/application_controller_renderer.rb +0 -9
  263. data/test/dummy/config/initializers/assets.rb +0 -14
  264. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -8
  265. data/test/dummy/config/initializers/cookies_serializer.rb +0 -7
  266. data/test/dummy/config/initializers/mime_types.rb +0 -5
  267. data/test/dummy/config/initializers/session_store.rb +0 -5
  268. data/test/dummy/config/initializers/ui_bibz.rb +0 -5
  269. data/test/dummy/config/initializers/wrap_parameters.rb +0 -16
  270. data/test/dummy/config/secrets.yml +0 -22
  271. data/test/dummy/config/spring.rb +0 -8
  272. data/test/dummy/test/models/user_test.rb +0 -9
  273. data/vendor/assets/fonts/fa-brands-400.eot +0 -0
  274. data/vendor/assets/fonts/fa-brands-400.svg +0 -3570
  275. data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
  276. data/vendor/assets/fonts/fa-brands-400.woff +0 -0
  277. data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
  278. data/vendor/assets/fonts/fa-regular-400.eot +0 -0
  279. data/vendor/assets/fonts/fa-regular-400.svg +0 -803
  280. data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
  281. data/vendor/assets/fonts/fa-regular-400.woff +0 -0
  282. data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
  283. data/vendor/assets/fonts/fa-solid-900.eot +0 -0
  284. data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
  285. data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
  286. data/vendor/assets/fonts/fa-solid-900.woff +0 -0
  287. data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
  288. data/vendor/assets/javascripts/all.js +0 -4441
  289. data/vendor/assets/javascripts/all.min.js +0 -5
  290. data/vendor/assets/stylesheets/all.min.css +0 -5
  291. data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
  292. data/vendor/assets/stylesheets/svg-with-js.css +0 -5
  293. /data/{test/dummy/app/mailers/.keep → app/assets/stylesheets/sass/forms/_dropdown.sass} +0 -0
  294. /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: 56911e4917a97e61edb91f19c9f81e66026f52c67c26b905647eed1f9bb64c31
4
+ data.tar.gz: 23779f1d51631b260c26363c77c649d70464a6a696348c6ad8e11fe271ecccc1
5
5
  SHA512:
6
- metadata.gz: ffbedff59c7693aa52801cdb3160c37da738f5c6f1ba108c7c70381904b33011948ab43de44441dfa8206a11d880665e115383a5cd8e1fe85d7a55c2c0db7d07
7
- data.tar.gz: 4f99eaa56f041cfec23eded17669fe997c9504d2423e10f5a636543b89d35373e3287199022936904df16d85ff71e0ec74d1f6cbd6f83fa462d74bc5313ecc8b
6
+ metadata.gz: 59e8545e2fa75e4da93212209b4a0b2f2e36062211acd2e4fb73ae0a7dd8c173dbb0209bf1174bda050f92af25266be0d51ba8ee495bd4ebe62619e8ed77ee5f
7
+ data.tar.gz: 2c8a2f443857a453054ac0ddf21f680d41b5f615284fa27d6ea4c94d1e677f14f79368a0bb2479d729ee3803fe6e6904163ba87761b96e90202f812868d56491
@@ -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.beta3)
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,267 @@ 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.0.8)
15
+ actionpack (= 7.0.8)
16
+ activesupport (= 7.0.8)
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
+ actionmailbox (7.0.8)
20
+ actionpack (= 7.0.8)
21
+ activejob (= 7.0.8)
22
+ activerecord (= 7.0.8)
23
+ activestorage (= 7.0.8)
24
+ activesupport (= 7.0.8)
23
25
  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)
26
+ net-imap
27
+ net-pop
28
+ net-smtp
29
+ actionmailer (7.0.8)
30
+ actionpack (= 7.0.8)
31
+ actionview (= 7.0.8)
32
+ activejob (= 7.0.8)
33
+ activesupport (= 7.0.8)
29
34
  mail (~> 2.5, >= 2.5.4)
35
+ net-imap
36
+ net-pop
37
+ net-smtp
30
38
  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)
39
+ actionpack (7.0.8)
40
+ actionview (= 7.0.8)
41
+ activesupport (= 7.0.8)
42
+ rack (~> 2.0, >= 2.2.4)
35
43
  rack-test (>= 0.6.3)
36
44
  rails-dom-testing (~> 2.0)
37
45
  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)
46
+ actiontext (7.0.8)
47
+ actionpack (= 7.0.8)
48
+ activerecord (= 7.0.8)
49
+ activestorage (= 7.0.8)
50
+ activesupport (= 7.0.8)
51
+ globalid (>= 0.6.0)
43
52
  nokogiri (>= 1.8.5)
44
- actionview (6.1.4.4)
45
- activesupport (= 6.1.4.4)
53
+ actionview (7.0.8)
54
+ activesupport (= 7.0.8)
46
55
  builder (~> 3.1)
47
56
  erubi (~> 1.4)
48
57
  rails-dom-testing (~> 2.0)
49
58
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
50
- activejob (6.1.4.4)
51
- activesupport (= 6.1.4.4)
59
+ activejob (7.0.8)
60
+ activesupport (= 7.0.8)
52
61
  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)
62
+ activemodel (7.0.8)
63
+ activesupport (= 7.0.8)
64
+ activerecord (7.0.8)
65
+ activemodel (= 7.0.8)
66
+ activesupport (= 7.0.8)
67
+ activestorage (7.0.8)
68
+ actionpack (= 7.0.8)
69
+ activejob (= 7.0.8)
70
+ activerecord (= 7.0.8)
71
+ activesupport (= 7.0.8)
72
+ marcel (~> 1.0)
64
73
  mini_mime (>= 1.1.0)
65
- activesupport (6.1.4.4)
74
+ activesupport (7.0.8)
66
75
  concurrent-ruby (~> 1.0, >= 1.0.2)
67
76
  i18n (>= 1.6, < 2)
68
77
  minitest (>= 5.1)
69
78
  tzinfo (~> 2.0)
70
- zeitwerk (~> 2.3)
71
79
  ast (2.4.2)
80
+ autoprefixer-rails (10.4.15.0)
81
+ execjs (~> 2)
72
82
  awesome_print (1.9.2)
83
+ base64 (0.1.1)
84
+ bootstrap (5.3.1)
85
+ autoprefixer-rails (>= 9.1.0)
86
+ popper_js (>= 2.11.8, < 3)
87
+ sassc-rails (>= 2.0.0)
73
88
  builder (3.2.4)
74
89
  byebug (11.1.3)
75
90
  childprocess (4.1.0)
76
- concurrent-ruby (1.1.9)
91
+ concurrent-ruby (1.2.2)
77
92
  crass (1.0.6)
93
+ date (3.3.3)
78
94
  docile (1.4.0)
79
- erubi (1.10.0)
80
- erubis (2.7.0)
95
+ erubi (1.12.0)
96
+ execjs (2.9.1)
81
97
  factory_bot (4.11.1)
82
98
  activesupport (>= 3.0.0)
83
99
  factory_bot_rails (4.11.1)
84
100
  factory_bot (~> 4.11.1)
85
101
  railties (>= 3.0.0)
86
- globalid (1.0.0)
87
- activesupport (>= 5.0)
88
- haml (5.2.2)
89
- temple (>= 0.8.0)
102
+ ffi (1.16.2)
103
+ globalid (1.2.1)
104
+ activesupport (>= 6.1)
105
+ haml (6.2.0)
106
+ temple (>= 0.8.2)
107
+ thor
90
108
  tilt
91
- haml-rails (2.0.1)
109
+ haml-rails (2.1.0)
92
110
  actionpack (>= 5.1)
93
111
  activesupport (>= 5.1)
94
- haml (>= 4.0.6, < 6.0)
95
- html2haml (>= 1.0.1)
112
+ haml (>= 4.0.6)
96
113
  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)
114
+ i18n (1.14.1)
103
115
  concurrent-ruby (~> 1.0)
116
+ importmap-rails (1.2.1)
117
+ actionpack (>= 6.0.0)
118
+ railties (>= 6.0.0)
104
119
  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)
120
+ json (2.6.3)
121
+ language_server-protocol (3.17.0.3)
122
+ loofah (2.21.3)
110
123
  crass (~> 1.0.2)
111
- nokogiri (>= 1.5.9)
112
- mail (2.7.1)
124
+ nokogiri (>= 1.12.0)
125
+ mail (2.8.1)
113
126
  mini_mime (>= 0.1.1)
127
+ net-imap
128
+ net-pop
129
+ net-smtp
114
130
  marcel (1.0.2)
115
131
  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)
132
+ mini_mime (1.1.5)
133
+ minitest (5.20.0)
134
+ net-imap (0.3.7)
135
+ date
136
+ net-protocol
137
+ net-pop (0.1.2)
138
+ net-protocol
139
+ net-protocol (0.2.1)
140
+ timeout
141
+ net-smtp (0.4.0)
142
+ net-protocol
143
+ nio4r (2.5.9)
144
+ nokogiri (1.15.4-x86_64-darwin)
122
145
  racc (~> 1.4)
123
- overcommit (0.58.0)
146
+ nokogiri (1.15.4-x86_64-linux)
147
+ racc (~> 1.4)
148
+ overcommit (0.60.0)
124
149
  childprocess (>= 0.6.3, < 5)
125
150
  iniparse (~> 1.4)
126
151
  rexml (~> 3.2)
127
- parallel (1.21.0)
128
- parser (3.0.3.2)
152
+ parallel (1.23.0)
153
+ parser (3.2.2.3)
129
154
  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)
155
+ racc
156
+ popper_js (2.11.8)
157
+ puma (6.4.0)
158
+ nio4r (~> 2.0)
159
+ racc (1.7.1)
160
+ rack (2.2.8)
161
+ rack-test (2.1.0)
162
+ rack (>= 1.3)
163
+ rails (7.0.8)
164
+ actioncable (= 7.0.8)
165
+ actionmailbox (= 7.0.8)
166
+ actionmailer (= 7.0.8)
167
+ actionpack (= 7.0.8)
168
+ actiontext (= 7.0.8)
169
+ actionview (= 7.0.8)
170
+ activejob (= 7.0.8)
171
+ activemodel (= 7.0.8)
172
+ activerecord (= 7.0.8)
173
+ activestorage (= 7.0.8)
174
+ activesupport (= 7.0.8)
146
175
  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)
176
+ railties (= 7.0.8)
177
+ rails-dom-testing (2.2.0)
178
+ activesupport (>= 5.0.0)
179
+ minitest
151
180
  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)
181
+ rails-html-sanitizer (1.6.0)
182
+ loofah (~> 2.21)
183
+ nokogiri (~> 1.14)
184
+ railties (7.0.8)
185
+ actionpack (= 7.0.8)
186
+ activesupport (= 7.0.8)
157
187
  method_source
158
- rake (>= 0.13)
188
+ rake (>= 12.2)
159
189
  thor (~> 1.0)
160
- rainbow (3.0.0)
190
+ zeitwerk (~> 2.5)
191
+ rainbow (3.1.1)
161
192
  rake (13.0.6)
162
- regexp_parser (2.2.0)
163
- rexml (3.2.5)
164
- rubocop (1.23.0)
193
+ regexp_parser (2.8.1)
194
+ rexml (3.2.6)
195
+ rubocop (1.56.4)
196
+ base64 (~> 0.1.1)
197
+ json (~> 2.3)
198
+ language_server-protocol (>= 3.17.0)
165
199
  parallel (~> 1.10)
166
- parser (>= 3.0.0.0)
200
+ parser (>= 3.2.2.3)
167
201
  rainbow (>= 2.2.2, < 4.0)
168
202
  regexp_parser (>= 1.8, < 3.0)
169
- rexml
170
- rubocop-ast (>= 1.12.0, < 2.0)
203
+ rexml (>= 3.2.5, < 4.0)
204
+ rubocop-ast (>= 1.28.1, < 2.0)
171
205
  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)
206
+ unicode-display_width (>= 2.4.0, < 3.0)
207
+ rubocop-ast (1.29.0)
208
+ parser (>= 3.2.1.0)
209
+ rubocop-minitest (0.32.2)
210
+ rubocop (>= 1.39, < 2.0)
211
+ rubocop-performance (1.19.1)
178
212
  rubocop (>= 1.7.0, < 2.0)
179
213
  rubocop-ast (>= 0.4.0)
180
- rubocop-rails (2.12.4)
214
+ rubocop-rails (2.21.2)
181
215
  activesupport (>= 4.2.0)
182
216
  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)
217
+ rubocop (>= 1.33.0, < 2.0)
218
+ ruby-progressbar (1.13.0)
219
+ sassc (2.4.0)
220
+ ffi (~> 1.9)
221
+ sassc-rails (2.1.2)
222
+ railties (>= 4.0.0)
223
+ sassc (>= 2.0)
224
+ sprockets (> 3.0)
225
+ sprockets-rails
226
+ tilt
227
+ simple_form (5.2.0)
189
228
  actionpack (>= 5.2)
190
229
  activemodel (>= 5.2)
191
- simplecov (0.21.2)
230
+ simplecov (0.22.0)
192
231
  docile (~> 1.1)
193
232
  simplecov-html (~> 0.11)
194
233
  simplecov_json_formatter (~> 0.1)
195
234
  simplecov-html (0.12.3)
196
- simplecov_json_formatter (0.1.3)
197
- sprockets (4.0.2)
235
+ simplecov_json_formatter (0.1.4)
236
+ sprockets (4.2.1)
198
237
  concurrent-ruby (~> 1.0)
199
- rack (> 1, < 3)
238
+ rack (>= 2.2.4, < 4)
200
239
  sprockets-rails (3.4.2)
201
240
  actionpack (>= 5.2)
202
241
  activesupport (>= 5.2)
203
242
  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)
243
+ sqlite3 (1.6.6-x86_64-darwin)
244
+ sqlite3 (1.6.6-x86_64-linux)
245
+ temple (0.10.2)
246
+ thor (1.2.2)
247
+ tilt (2.3.0)
248
+ timeout (0.4.0)
249
+ tzinfo (2.0.6)
209
250
  concurrent-ruby (~> 1.0)
210
- unicode-display_width (2.1.0)
211
- webrick (1.7.0)
212
- websocket-driver (0.7.5)
251
+ unicode-display_width (2.5.0)
252
+ websocket-driver (0.7.6)
213
253
  websocket-extensions (>= 0.1.0)
214
254
  websocket-extensions (0.1.5)
215
255
  will-paginate-i18n (0.1.15)
216
256
  will_paginate (3.3.1)
217
257
  will_paginate-bootstrap4 (0.2.2)
218
258
  will_paginate (~> 3.0, >= 3.0.0)
219
- yard (0.9.27)
220
- webrick (~> 1.7.0)
221
- zeitwerk (2.5.1)
259
+ yard (0.9.34)
260
+ zeitwerk (2.6.12)
222
261
 
223
262
  PLATFORMS
224
- ruby
263
+ x86_64-darwin-22
264
+ x86_64-linux
225
265
 
226
266
  DEPENDENCIES
227
267
  awesome_print
228
268
  byebug
229
269
  factory_bot_rails (~> 4.0)
230
270
  haml-rails
231
- jquery-rails (>= 3.1.0)
271
+ importmap-rails
232
272
  minitest
233
273
  overcommit
234
- rails (~> 6.1.3, >= 6.1.3.2)
274
+ puma
235
275
  rubocop
236
276
  rubocop-ast
237
277
  rubocop-minitest
@@ -244,4 +284,4 @@ DEPENDENCIES
244
284
  yard
245
285
 
246
286
  BUNDLED WITH
247
- 2.2.21
287
+ 2.4.10
@@ -0,0 +1,12 @@
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
@@ -0,0 +1,82 @@
1
+ // http://www.developpez.net/forums/d940195-2/webmasters-developpement-web/general-conception-web/contribuez/eval-calcul-risque/
2
+ export default class Formula {
3
+
4
+ constructor(){
5
+ this.res = ""
6
+
7
+ this.t = {
8
+ x: "*",
9
+ X: "*",
10
+ ":": "/"
11
+ };
12
+
13
+ this.rg = {
14
+ "/[^\\+\\*\\/\\-\\(\\)\\s\\d\\.]/": "It is not a number",
15
+ "/[\\+\\*\\/\\-\\(]\\)/": "Parenthesis ending with a incorrect expression.",
16
+ "/([\\+\\x\\*\\/\\-]{2,})|([\\+\\x\\*\\/\\-]\\s[\\+\\x\\*\\/\\-])/i": "Multiple Operators in a row.",
17
+ "/(\\D\\.)|(\\.[\\D\\s]+)|(\\.\\d+\\.)/": "Wrong Decimal.",
18
+ "/\\d\\s+\\d/": "Cut Integer.",
19
+ "/\\([\\/\\*]/": "First operator within parenthesis is wrong.",
20
+ "/^[\\*\\/]+/": "First operator within string is wrong"
21
+ };
22
+
23
+ this.rg2 = {
24
+ "/\\s+/g": " ",
25
+ "/([^\\.\\,\\;\\d]|^)0+([\\,\\.\\;\\d])/g": "$10$2",
26
+ "/[,;]/g": ".",
27
+ "/([^\\d\\.\\,\\;])0+(\\d)/g": "$1$2",
28
+ "/^(0)(\\d)/g": "$2",
29
+ "/[\\[\\]\\|\\&\\=\\!]/g": "",
30
+ "/([\\d\\)])(\\()/g": "$1*$2",
31
+ "/(\\))([\\d\\(])/g": "$1*$2",
32
+ "/\\/+/g": "/",
33
+ "/[xX:]/g"(o) {
34
+ return t[o];
35
+ },
36
+
37
+ "/\\/+/g": "/"
38
+ };
39
+ }
40
+
41
+ suite(q) {
42
+ const me = this;
43
+ const par1 = q.match(/\(/g);
44
+ const par2 = q.match(/\)/g);
45
+ if (((par1 != null) && (par2 != null) && (par1.length !== par2.length)) || ((par1 == null) && (par2 != null)) || ((par1 != null) && (par2 == null))) {
46
+ return me.res = "Unclosed parenthesis.";
47
+ } else if (/.*[\+x\*\/\-]$/.test(q)) {
48
+ return me.res = "Formula ending with an operator.";
49
+ } else {
50
+ return me.res = "Undefined Error.";
51
+ }
52
+ }
53
+
54
+ go(ch) {
55
+ let i;
56
+ const me = this;
57
+ let flag = 0;
58
+ for (i in me.rg2) {
59
+ ch = ch.replace(eval(i), me.rg2[i]);
60
+ }
61
+ const finalvalue = ch;
62
+ try {
63
+ const op = String(ch).match(/[\+x\*\/\-]{2,}/g);
64
+ ch = ch.toUpperCase();
65
+ ch = eval(ch);
66
+ if (op != null) { me.res = "Multiple Operators in a row. <br/> Result is probably wrong."; }
67
+ const dec = (!isNaN(ch) ? ch.toFixed(3) : "It is a string.");
68
+ me.res = (String(dec).search(/\.0+$/) !== -1 ? String(dec).substring(0, String(dec).indexOf(".")) : dec);
69
+ me.res = '';
70
+ } catch (er) {
71
+ for (i in me.rg) {
72
+ if (ch.match(eval(i)) != null) {
73
+ me.res = me.rg[i];
74
+ break;
75
+ }
76
+ flag++;
77
+ if (flag === 5) { me.suite(ch); }
78
+ }
79
+ }
80
+ return [me.res, finalvalue];
81
+ }
82
+ }