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.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +3 -3
- data/.github/workflows/linter.yml +13 -12
- data/.overcommit.yml +6 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -1
- data/Gemfile +19 -12
- data/Gemfile.lock +219 -148
- data/app/assets/config/ui_bibz.js +14 -0
- data/app/assets/javascripts/controllers/combobox_controller.js +37 -0
- data/app/assets/javascripts/forms/formula.js +82 -0
- data/app/assets/javascripts/forms/input-connected.js +132 -0
- data/app/assets/javascripts/forms/jquery.multi-select-extend.js +52 -0
- data/app/assets/javascripts/forms.js +160 -0
- data/app/assets/javascripts/interfaces.js +56 -0
- data/app/assets/javascripts/tables.js +49 -0
- data/app/assets/javascripts/ui_bibz_js.js +37 -0
- data/app/assets/stylesheets/navigations/_nav.sass +2 -0
- data/app/assets/stylesheets/navigations/_navbar.sass +12 -0
- data/app/assets/stylesheets/navigations/_progress_bar.sass +2 -0
- data/app/assets/stylesheets/navigations/_toolbar.sass +3 -0
- data/app/assets/stylesheets/sass/_boxes.sass +1 -0
- data/app/assets/stylesheets/sass/_containers.sass +2 -0
- data/app/assets/stylesheets/sass/_fixes.sass +2 -0
- data/app/assets/stylesheets/sass/_forms.sass +9 -0
- data/app/assets/stylesheets/sass/_navigations.sass +4 -0
- data/app/assets/stylesheets/sass/_notifications.sass +4 -0
- data/app/assets/stylesheets/sass/_tables.sass +2 -0
- data/app/assets/stylesheets/sass/_variables_mixins_functions.sass +3 -0
- data/app/assets/stylesheets/sass/boxes/_card.sass +4 -0
- data/app/assets/stylesheets/sass/containers/_panel.scss +330 -0
- data/app/assets/stylesheets/sass/forms/_bootstrap_select.sass +5 -0
- data/app/assets/stylesheets/sass/forms/_button.sass +3 -0
- data/app/assets/stylesheets/sass/forms/_combobox.sass +32 -0
- data/app/assets/stylesheets/sass/forms/_date_picker.sass +3 -0
- data/app/assets/stylesheets/sass/forms/_form_check.sass +10 -0
- data/app/assets/stylesheets/sass/forms/_formula_field.sass +17 -0
- data/app/assets/stylesheets/sass/forms/_multiselect.sass +44 -0
- data/app/assets/stylesheets/sass/forms/_range.sass +44 -0
- data/app/assets/stylesheets/sass/forms/_slider.sass +136 -0
- data/app/assets/stylesheets/sass/forms/_surround_field.sass +25 -0
- data/app/assets/stylesheets/sass/notifications/_badge.sass +5 -0
- data/app/assets/stylesheets/sass/notifications/_glyph.sass +3 -0
- data/app/assets/stylesheets/sass/notifications/_star.sass +2 -0
- data/app/assets/stylesheets/sass/notifications/_toast.sass +3 -0
- data/app/assets/stylesheets/sass/tables/_table.sass +39 -0
- data/app/assets/stylesheets/sass/tables/_table_card.sass +39 -0
- data/app/assets/stylesheets/ui_bibz.sass +26 -0
- data/bin/test +3 -5
- data/config/importmap.rb +21 -0
- data/config/initializers/assets.rb +5 -0
- data/config/initializers/will_paginate.rb +1 -3
- data/lib/ui_bibz/builders/data_html_options_builder.rb +118 -0
- data/lib/ui_bibz/builders/html_classes_builder.rb +89 -0
- data/lib/ui_bibz/builders/html_options_builder.rb +22 -0
- data/lib/ui_bibz/factory_methods/component_initialize_factory_method.rb +33 -0
- data/lib/ui_bibz/helpers/ui/core/boxes_helper.rb +12 -12
- data/lib/ui_bibz/helpers/ui/core/forms_helper.rb +58 -50
- data/lib/ui_bibz/helpers/ui/core/icons_helper.rb +6 -6
- data/lib/ui_bibz/helpers/ui/core/layouts_helper.rb +2 -2
- data/lib/ui_bibz/helpers/ui/core/lists_helper.rb +2 -2
- data/lib/ui_bibz/helpers/ui/core/navigations_helper.rb +12 -12
- data/lib/ui_bibz/helpers/ui/core/notifications_helper.rb +4 -4
- data/lib/ui_bibz/helpers/ui/core/windows_helper.rb +10 -2
- data/lib/ui_bibz/helpers/ui/ux_helper.rb +2 -2
- data/lib/ui_bibz/helpers/utils_helper.rb +2 -2
- data/lib/ui_bibz/infos.rb +3 -3
- data/lib/ui_bibz/inputs/ui_bibz_form/ui_bibz_form_builder.rb +12 -12
- data/lib/ui_bibz/inputs/ui_bibz_inputs/collection_input.rb +1 -1
- data/lib/ui_bibz/inputs/ui_bibz_inputs/ui_combobox_field_input.rb +15 -0
- data/lib/ui_bibz/rails/engine.rb +21 -4
- data/lib/ui_bibz/strategies/component_initialize_abstract_strategy.rb +27 -0
- data/lib/ui_bibz/strategies/component_initialize_block_strategy.rb +31 -0
- data/lib/ui_bibz/strategies/component_initialize_hash_strategy.rb +18 -0
- data/lib/ui_bibz/strategies/component_initialize_standard_strategy.rb +18 -0
- data/lib/ui_bibz/ui/concerns/card_itemable_concern.rb +4 -4
- data/lib/ui_bibz/ui/concerns/notification_concern.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_accordion.rb +4 -4
- data/lib/ui_bibz/ui/core/boxes/card_column.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_deck.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/card_grid.rb +0 -3
- data/lib/ui_bibz/ui/core/boxes/card_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_body.rb +9 -9
- data/lib/ui_bibz/ui/core/boxes/components/card_col.rb +2 -2
- data/lib/ui_bibz/ui/core/boxes/components/card_list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/boxes/components/card_row.rb +1 -1
- data/lib/ui_bibz/ui/core/component.rb +13 -62
- data/lib/ui_bibz/ui/core/forms/buttons/button.rb +3 -1
- data/lib/ui_bibz/ui/core/forms/buttons/button_group.rb +11 -11
- data/lib/ui_bibz/ui/core/forms/choices/box_switch_field.rb +7 -7
- data/lib/ui_bibz/ui/core/forms/choices/checkbox_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/choices/choice_group.rb +5 -6
- data/lib/ui_bibz/ui/core/forms/choices/components/choice.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dates/date_picker_field.rb +15 -15
- data/lib/ui_bibz/ui/core/forms/dropdowns/components/dropdown_link.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/dropdowns/dropdown.rb +5 -5
- data/lib/ui_bibz/ui/core/forms/numbers/slider_field.rb +1 -1
- data/lib/ui_bibz/ui/core/forms/selects/dropdown_select_field.rb +10 -10
- data/lib/ui_bibz/ui/core/forms/selects/multi_column_field.rb +2 -2
- data/lib/ui_bibz/ui/core/forms/surrounds/surround_field.rb +32 -32
- data/lib/ui_bibz/ui/core/forms/textareas/markdown_editor_field.rb +7 -8
- data/lib/ui_bibz/ui/core/forms/texts/combobox_field.rb +96 -0
- data/lib/ui_bibz/ui/core/icons/components/glyph_text.rb +1 -1
- data/lib/ui_bibz/ui/core/icons/glyph.rb +4 -3
- data/lib/ui_bibz/ui/core/layouts/row.rb +2 -2
- data/lib/ui_bibz/ui/core/lists/components/list.rb +4 -4
- data/lib/ui_bibz/ui/core/lists/list_group.rb +1 -1
- data/lib/ui_bibz/ui/core/navigations/breadcrumb.rb +6 -4
- data/lib/ui_bibz/ui/core/navigations/components/nav_link_span.rb +1 -2
- data/lib/ui_bibz/ui/core/navigations/components/navbar_form.rb +6 -5
- data/lib/ui_bibz/ui/core/navigations/components/toolbar_form.rb +2 -2
- data/lib/ui_bibz/ui/core/navigations/nav.rb +10 -6
- data/lib/ui_bibz/ui/core/navigations/navbar.rb +21 -19
- data/lib/ui_bibz/ui/core/navigations/pagination.rb +3 -3
- data/lib/ui_bibz/ui/core/navigations/toolbar.rb +5 -5
- data/lib/ui_bibz/ui/core/notifications/alert.rb +4 -5
- data/lib/ui_bibz/ui/core/notifications/badge.rb +6 -2
- data/lib/ui_bibz/ui/core/notifications/components/toast_header.rb +1 -1
- data/lib/ui_bibz/ui/core/notifications/progress_bar.rb +3 -3
- data/lib/ui_bibz/ui/core/notifications/toast.rb +8 -9
- data/lib/ui_bibz/ui/core/windows/components/offcanvas_body.rb +47 -0
- data/lib/ui_bibz/ui/core/windows/components/offcanvas_header.rb +54 -0
- data/lib/ui_bibz/ui/core/windows/modal.rb +9 -9
- data/lib/ui_bibz/ui/core/windows/offcanvas.rb +84 -0
- data/lib/ui_bibz/ui/extensions/core/component/glyph_extension.rb +4 -20
- data/lib/ui_bibz/ui/extensions/core/component/klass_extension.rb +11 -19
- data/lib/ui_bibz/ui/extensions/core/forms/connect_extension.rb +1 -1
- data/lib/ui_bibz/ui/ux/containers/components/panel_column.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_deck.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_group.rb +3 -3
- data/lib/ui_bibz/ui/ux/containers/components/panel_header.rb +4 -4
- data/lib/ui_bibz/ui/ux/containers/panel.rb +13 -13
- data/lib/ui_bibz/ui/ux/tables/components/actions.rb +4 -4
- data/lib/ui_bibz/ui/ux/tables/components/column.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/components/columns.rb +2 -2
- data/lib/ui_bibz/ui/ux/tables/extensions/sortable.rb +1 -1
- data/lib/ui_bibz/ui/ux/tables/table.rb +5 -5
- data/lib/ui_bibz/ui/ux/tables/table_card.rb +6 -6
- data/lib/ui_bibz/ui/ux/tables/table_search_field.rb +1 -1
- data/lib/ui_bibz/utils/breakdown_class_name_generator.rb +3 -3
- data/lib/ui_bibz/utils/screwdriver.rb +1 -1
- data/lib/ui_bibz/view_objects/glyph_component_view_object.rb +38 -0
- data/lib/ui_bibz.rb +26 -0
- data/test/builders/data_html_classes_builder_test.rb +37 -0
- data/test/builders/html_classes_builder_test.rb +76 -0
- data/test/dummy/Rakefile +1 -1
- data/test/dummy/app/assets/stylesheets/application.css +1 -15
- data/test/dummy/app/channels/application_cable/channel.rb +6 -0
- data/test/dummy/app/channels/application_cable/connection.rb +6 -0
- data/test/dummy/app/jobs/application_job.rb +9 -0
- data/test/dummy/app/mailers/application_mailer.rb +6 -0
- data/test/dummy/app/views/layouts/application.html.erb +10 -12
- data/test/dummy/app/views/layouts/mailer.html.erb +13 -0
- data/test/dummy/app/views/layouts/mailer.text.erb +1 -0
- data/test/dummy/bin/rails +3 -3
- data/test/dummy/bin/rake +2 -2
- data/test/dummy/bin/setup +12 -12
- data/test/dummy/config/application.rb +13 -17
- data/test/dummy/config/boot.rb +3 -3
- data/test/dummy/config/database.yml +2 -2
- data/test/dummy/config/environment.rb +1 -1
- data/test/dummy/config/environments/development.rb +21 -16
- data/test/dummy/config/environments/production.rb +16 -41
- data/test/dummy/config/environments/test.rb +19 -8
- data/test/dummy/config/importmap.rb +11 -0
- data/test/dummy/config/initializers/content_security_policy.rb +21 -24
- data/test/dummy/config/initializers/filter_parameter_logging.rb +6 -2
- data/test/dummy/config/initializers/inflections.rb +4 -4
- data/test/dummy/config/initializers/permissions_policy.rb +12 -0
- data/test/dummy/config/locales/en.yml +13 -3
- data/test/dummy/config/puma.rb +7 -2
- data/test/dummy/config/storage.yml +5 -5
- data/test/dummy/config.ru +2 -1
- data/test/simple_form_test.rb +24 -24
- data/test/ui/core/boxes/card_test.rb +2 -1
- data/test/ui/core/component_test.rb +2 -2
- data/test/ui/core/forms/buttons/button_group_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_link_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_refresh_test.rb +1 -1
- data/test/ui/core/forms/buttons/button_test.rb +2 -2
- data/test/ui/core/forms/choices/box_switch_field_test.rb +10 -10
- data/test/ui/core/forms/choices/checkbox_field_test.rb +1 -1
- data/test/ui/core/forms/choices/choice_group_test.rb +1 -1
- data/test/ui/core/forms/dropdowns/dropdown_test.rb +1 -1
- data/test/ui/core/forms/numbers/formula_field_test.rb +1 -1
- data/test/ui/core/forms/selects/dropdown_select_field_test.rb +2 -2
- data/test/ui/core/forms/selects/select_field_test.rb +1 -1
- data/test/ui/core/forms/surrounds/surround_field_test.rb +4 -4
- data/test/ui/core/forms/texts/auto_complete_field_test.rb +2 -2
- data/test/ui/core/forms/texts/combobox_field_test.rb +19 -0
- data/test/ui/core/icons/glyph_test.rb +8 -4
- data/test/ui/core/icons/star_test.rb +12 -6
- data/test/ui/core/navigations/breadcrumb_test.rb +1 -1
- data/test/ui/core/navigations/link_test.rb +1 -1
- data/test/ui/core/navigations/nav_test.rb +11 -0
- data/test/ui/core/notifications/alert_test.rb +1 -1
- data/test/ui/core/notifications/badge_test.rb +3 -3
- data/test/ui/core/notifications/popover_test.rb +4 -4
- data/test/ui/core/notifications/spinner_test.rb +1 -1
- data/test/ui/core/notifications/toast_test.rb +1 -1
- data/test/ui/core/notifications/tooltip_test.rb +4 -4
- data/test/ui/core/windows/offcanvas_test.rb +27 -0
- data/test/ui/ux/containers/panel_test.rb +1 -1
- data/test/ui/ux/tables/table_test.rb +3 -3
- data/test/view_objects/glyph_component_view_object_test.rb +17 -0
- data/ui_bibz.gemspec +6 -20
- data/vendor/assets/fonts/fontawesome/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-solid-900.woff2 +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.ttf +0 -0
- data/vendor/assets/fonts/fontawesome/fa-v4compatibility.woff2 +0 -0
- data/vendor/assets/javascripts/bootstrap-markdown.js +1 -1555
- data/vendor/assets/javascripts/bootstrap-multiselect.min.js +40 -1176
- data/vendor/assets/javascripts/bootstrap-switch.min.js +9 -21
- data/vendor/assets/javascripts/bs-custom-file-input.min.js +0 -1
- data/vendor/assets/javascripts/debounce.js +51 -0
- data/vendor/assets/javascripts/fontawesome/all.js +5977 -0
- data/vendor/assets/javascripts/fontawesome/all.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/brands.js +749 -0
- data/vendor/assets/javascripts/fontawesome/brands.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/conflict-detection.js +1138 -0
- data/vendor/assets/javascripts/fontawesome/conflict-detection.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/fontawesome.js +3126 -0
- data/vendor/assets/javascripts/fontawesome/fontawesome.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/regular.js +445 -0
- data/vendor/assets/javascripts/fontawesome/regular.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/solid.js +1672 -0
- data/vendor/assets/javascripts/fontawesome/solid.min.js +6 -0
- data/vendor/assets/javascripts/fontawesome/v4-shims.js +225 -0
- data/vendor/assets/javascripts/fontawesome/v4-shims.min.js +6 -0
- data/vendor/assets/javascripts/fuzzysort.js +562 -0
- data/vendor/assets/javascripts/jquery-3.7.0.min.js +2 -0
- data/vendor/assets/javascripts/jquery.multi-select.min.js +725 -1
- data/vendor/assets/stylesheets/bootstrap-multiselect.sass +115 -0
- data/vendor/assets/stylesheets/bootstrap-switch.scss +211 -0
- data/vendor/assets/stylesheets/fontawesome/_animated.scss +142 -9
- data/vendor/assets/stylesheets/fontawesome/_bordered-pulled.scss +13 -13
- data/vendor/assets/stylesheets/fontawesome/_core.scss +28 -6
- data/vendor/assets/stylesheets/fontawesome/_fixed-width.scss +2 -1
- data/vendor/assets/stylesheets/fontawesome/_functions.scss +57 -0
- data/vendor/assets/stylesheets/fontawesome/_icons.scss +7 -1438
- data/vendor/assets/stylesheets/fontawesome/_list.scss +4 -4
- data/vendor/assets/stylesheets/fontawesome/_mixins.scss +53 -34
- data/vendor/assets/stylesheets/fontawesome/_rotated-flipped.scss +25 -18
- data/vendor/assets/stylesheets/fontawesome/_screen-reader.scss +12 -3
- data/vendor/assets/stylesheets/fontawesome/_shims.scss +640 -664
- data/vendor/assets/stylesheets/fontawesome/_sizing.scss +16 -0
- data/vendor/assets/stylesheets/fontawesome/_stacked.scss +5 -4
- data/vendor/assets/stylesheets/fontawesome/_variables.scss +4896 -1393
- data/vendor/assets/stylesheets/fontawesome/brands.scss +17 -10
- data/vendor/assets/stylesheets/fontawesome/fontawesome.scss +7 -2
- data/vendor/assets/stylesheets/fontawesome/regular.scss +13 -10
- data/vendor/assets/stylesheets/fontawesome/solid.scss +13 -11
- data/vendor/assets/stylesheets/fontawesome/v4-shims.scss +6 -1
- data/vendor/assets/stylesheets/multi-select.css +92 -0
- metadata +126 -348
- data/.gitlab-ci.yml +0 -17
- data/.travis.yml +0 -24
- data/lib/ui_bibz/ui/extensions/core/component/popover_extension.rb +0 -70
- data/structure.md +0 -68
- data/test/dummy/README.rdoc +0 -28
- data/test/dummy/app/assets/javascripts/application.js +0 -13
- data/test/dummy/app/javascripts/packs/index.js +0 -3
- data/test/dummy/config/initializers/application_controller_renderer.rb +0 -9
- data/test/dummy/config/initializers/assets.rb +0 -14
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -8
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -7
- data/test/dummy/config/initializers/mime_types.rb +0 -5
- data/test/dummy/config/initializers/session_store.rb +0 -5
- data/test/dummy/config/initializers/ui_bibz.rb +0 -5
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -16
- data/test/dummy/config/secrets.yml +0 -22
- data/test/dummy/config/spring.rb +0 -8
- data/test/dummy/test/models/user_test.rb +0 -9
- data/vendor/assets/fonts/fa-brands-400.eot +0 -0
- data/vendor/assets/fonts/fa-brands-400.svg +0 -3570
- data/vendor/assets/fonts/fa-brands-400.ttf +0 -0
- data/vendor/assets/fonts/fa-brands-400.woff +0 -0
- data/vendor/assets/fonts/fa-brands-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-regular-400.eot +0 -0
- data/vendor/assets/fonts/fa-regular-400.svg +0 -803
- data/vendor/assets/fonts/fa-regular-400.ttf +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff +0 -0
- data/vendor/assets/fonts/fa-regular-400.woff2 +0 -0
- data/vendor/assets/fonts/fa-solid-900.eot +0 -0
- data/vendor/assets/fonts/fa-solid-900.svg +0 -4938
- data/vendor/assets/fonts/fa-solid-900.ttf +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff +0 -0
- data/vendor/assets/fonts/fa-solid-900.woff2 +0 -0
- data/vendor/assets/javascripts/all.js +0 -4441
- data/vendor/assets/javascripts/all.min.js +0 -5
- data/vendor/assets/stylesheets/all.min.css +0 -5
- data/vendor/assets/stylesheets/fontawesome/_larger.scss +0 -23
- data/vendor/assets/stylesheets/svg-with-js.css +0 -5
- /data/{test/dummy/app/mailers/.keep → app/assets/stylesheets/sass/forms/_dropdown.sass} +0 -0
- /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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 700d531ae188bd2c4a87404667a960cdeb73ecdb278a60e66ed216822f899bdc
|
4
|
+
data.tar.gz: 6612425d1076b9aed91259c733d5560c7a8d80d6a5d155281441874d52e1bed0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 97cc99d6e3d772d40c6be7091e6c5a2a68e9de849952b2b016f57b42eb3801df26247103c29ddd22f5ad75b59344bf067dd328b2ec6f0de30b607bd67ef41f5b
|
7
|
+
data.tar.gz: 0e3e98b1d96c9eb7ab56eec9d1f128c261b99f3787244e6deeda56d50620956b145abc2f39f916263c38587e7547db6ea9a77ece08b9aa06695d36a56ea12399
|
data/.github/workflows/ci.yml
CHANGED
@@ -8,7 +8,7 @@ jobs:
|
|
8
8
|
runs-on: ubuntu-latest
|
9
9
|
|
10
10
|
steps:
|
11
|
-
- uses: actions/checkout@
|
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
|
-
|
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@
|
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
|
-
|
7
|
-
|
4
|
+
rubocop:
|
5
|
+
name: runner / rubocop
|
8
6
|
runs-on: ubuntu-latest
|
9
|
-
|
10
7
|
steps:
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
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
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ruby-3.
|
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
|
-
#
|
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
|
-
|
12
|
-
|
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
|
-
|
17
|
-
gem 'awesome_print'
|
18
|
-
gem 'byebug'
|
19
|
-
gem '
|
20
|
-
|
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 (
|
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 (
|
13
|
-
actionpack (=
|
14
|
-
activesupport (=
|
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
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
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
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
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
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
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.
|
37
|
-
rails-html-sanitizer (~> 1.
|
38
|
-
actiontext (
|
39
|
-
actionpack (=
|
40
|
-
activerecord (=
|
41
|
-
activestorage (=
|
42
|
-
activesupport (=
|
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 (
|
45
|
-
activesupport (=
|
56
|
+
actionview (7.1.1)
|
57
|
+
activesupport (= 7.1.1)
|
46
58
|
builder (~> 3.1)
|
47
|
-
erubi (~> 1.
|
48
|
-
rails-dom-testing (~> 2.
|
49
|
-
rails-html-sanitizer (~> 1.
|
50
|
-
activejob (
|
51
|
-
activesupport (=
|
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 (
|
54
|
-
activesupport (=
|
55
|
-
activerecord (
|
56
|
-
activemodel (=
|
57
|
-
activesupport (=
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
activesupport (
|
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.
|
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
|
-
|
80
|
-
|
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
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
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
|
121
|
+
haml-rails (2.1.0)
|
92
122
|
actionpack (>= 5.1)
|
93
123
|
activesupport (>= 5.1)
|
94
|
-
haml (>= 4.0.6
|
95
|
-
html2haml (>= 1.0.1)
|
124
|
+
haml (>= 4.0.6)
|
96
125
|
railties (>= 5.1)
|
97
|
-
|
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
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
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.
|
112
|
-
mail (2.
|
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
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
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.
|
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.
|
128
|
-
parser (3.
|
168
|
+
parallel (1.23.0)
|
169
|
+
parser (3.2.2.4)
|
129
170
|
ast (~> 2.4.1)
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
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 (=
|
148
|
-
|
149
|
-
|
150
|
-
|
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.
|
153
|
-
loofah (~> 2.
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
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
|
-
|
163
|
-
|
164
|
-
|
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.
|
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.
|
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 (>=
|
173
|
-
rubocop-ast (1.
|
174
|
-
parser (>= 3.
|
175
|
-
rubocop-minitest (0.
|
176
|
-
rubocop (>=
|
177
|
-
rubocop-performance (1.
|
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.
|
242
|
+
rubocop-rails (2.21.2)
|
181
243
|
activesupport (>= 4.2.0)
|
182
244
|
rack (>= 1.1)
|
183
|
-
rubocop (>= 1.
|
184
|
-
ruby-progressbar (1.
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
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.
|
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.
|
197
|
-
sprockets (4.
|
264
|
+
simplecov_json_formatter (0.1.4)
|
265
|
+
sprockets (4.2.1)
|
198
266
|
concurrent-ruby (~> 1.0)
|
199
|
-
rack (
|
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.
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
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.
|
211
|
-
webrick (1.
|
212
|
-
websocket-driver (0.7.
|
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.
|
220
|
-
|
221
|
-
zeitwerk (2.5.1)
|
290
|
+
yard (0.9.34)
|
291
|
+
zeitwerk (2.6.12)
|
222
292
|
|
223
293
|
PLATFORMS
|
224
|
-
|
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
|
-
|
302
|
+
importmap-rails
|
232
303
|
minitest
|
233
304
|
overcommit
|
234
|
-
|
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.
|
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
|
+
}
|