pg_rails 7.1.13 → 7.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4a90a7a62e376e482f5e3c072c38f859478a7a333d606de01c8d5481cefd8fb5
4
- data.tar.gz: ec85008cd9234bb9c7435ca6838af3ca380c2f34c43fb80bd30e9d2608d2dfc6
3
+ metadata.gz: a86bbc28d3c58f60700af25390dc43d051e14c2c9b493005554ddd3407380351
4
+ data.tar.gz: 061c9da5f9ddf70bf5b878f5a7ecc21d4916bcd6bba702d652213a80e8f085f2
5
5
  SHA512:
6
- metadata.gz: 9039afd99e6a910e4e1a47c125e8285992360d1979836a0d7df1c1f9f4b0837ee4bf8b5d266384998cabcc765dfe8bd4b0fa96143ba9baa58946b4697e97addd
7
- data.tar.gz: c2b42d1565fc804d2ef3015c197820abc54a8425d66d27f6b57f21a768779ceab9ade935dfefb85db8016bcce98988f3378b9bb1cf99a4dfc0f223a335b0a046
6
+ metadata.gz: 9da11c05db885cdf43976ff3114e4c1971a1dc27909d529b4447bcd31bf750957b84701663ae1003c7e6d993493922270a61f4512e13d67eef83f92f73ddead3
7
+ data.tar.gz: 4e66d31c2819f903c9a8dc30654e3b4522662c310fe931f98f49d3bd9ee1815017515f28dede35bc018433a531fe25ed70081333a89cdf26795852ca6c602653
@@ -3,11 +3,12 @@
3
3
  .d-flex.align-items-center.px-3.py-2
4
4
  .px-2.d-none.d-sm-inline-block
5
5
  span.bi.bi-funnel-fill
6
- = helpers.search_form_for @q, url: url_for do |f|
6
+ = helpers.search_form_for @q, url: url_for, html: { 'data-turbo-action': :advance } do |f|
7
7
  .row.g-1
8
8
  .col
9
9
  .row.g-1
10
10
  = @builder.filtros_html(form: f)
11
+ = @extra_fields
11
12
  .col-auto.gap-1.d-flex.align-items-start
12
13
  = helpers.button_tag class: 'btn btn-sm btn-primary col-auto' do
13
14
  span.bi.bi-search
@@ -7,4 +7,8 @@ class SearchBarComponent < ViewComponent::Base
7
7
 
8
8
  super
9
9
  end
10
+
11
+ def extra_fields(&)
12
+ @extra_fields = capture(&)
13
+ end
10
14
  end
@@ -22,7 +22,8 @@ module Admin
22
22
  def create
23
23
  saved = false
24
24
  ActiveRecord::Base.transaction do
25
- # FIXME: acá la transaction jode porque el ActiveJob no puede deserializar el Email
25
+ # TODO: acá la transaction jode porque el ActiveJob no puede deserializar el Email
26
+ # Con rails 7.2 esto se debería arreglar
26
27
  if (saved = @email.save)
27
28
  PgEngine::AdminMailer.with(email_object: @email).admin_mail.deliver_later
28
29
  end
@@ -162,9 +162,14 @@ module PgEngine
162
162
  def pg_respond_show(object = nil)
163
163
  object ||= instancia_modelo
164
164
  if params[:modal].present?
165
- render turbo_stream: turbo_stream.append_all(
166
- 'body', partial: 'pg_layout/modal_show', locals: { object: }
167
- )
165
+ respond_to do |format|
166
+ format.html
167
+ format.turbo_stream do
168
+ render turbo_stream: turbo_stream.append_all(
169
+ 'body', partial: 'pg_layout/modal_show', locals: { object: }
170
+ )
171
+ end
172
+ end
168
173
  else
169
174
  respond_to do |format|
170
175
  format.json { render json: object }
@@ -1 +1 @@
1
- span#tooltip data-bs-toggle="tooltip" data-bs-title="El tooltip" las cosas
1
+ span#tooltip data-controller="tooltip" data-bs-title="El tooltip" las cosas
@@ -1,16 +1,6 @@
1
1
  import * as bootstrap from 'bootstrap'
2
2
 
3
- document.addEventListener('turbo:load', bindTooltips)
4
- document.addEventListener('turbo:render', bindTooltips)
5
-
6
- const tooltipsQuery = '[data-bs-toggle="tooltip"]'
7
-
8
- function bindTooltips () {
9
- const toastElList = document.querySelectorAll(tooltipsQuery)
10
- Array.from(toastElList).map(tooltipEl => {
11
- return new bootstrap.Tooltip(tooltipEl)
12
- })
13
- }
3
+ const tooltipsQuery = '[data-controller="tooltip"]'
14
4
 
15
5
  document.addEventListener('show.bs.tooltip', (ev) => {
16
6
  const toastElList = document.querySelectorAll(tooltipsQuery)
@@ -10,6 +10,7 @@ import FiltrosController from './filtros_controller'
10
10
  import NotificationsController from './notifications_controller'
11
11
  import SelectizeController from './selectize_controller'
12
12
  import ThemeController from './theme_controller'
13
+ import TooltipController from './tooltip_controller'
13
14
 
14
15
  application.register('navbar', NavbarController)
15
16
  application.register('nested', NestedController)
@@ -21,5 +22,6 @@ application.register('filtros', FiltrosController)
21
22
  application.register('notifications', NotificationsController)
22
23
  application.register('selectize', SelectizeController)
23
24
  application.register('theme', ThemeController)
25
+ application.register('tooltip', TooltipController)
24
26
 
25
27
  // TODO: testear con capybara todo lo que se pueda
@@ -0,0 +1,14 @@
1
+ import { Controller } from '@hotwired/stimulus'
2
+ import * as bootstrap from 'bootstrap'
3
+
4
+ export default class extends Controller {
5
+ tooltip = null
6
+
7
+ connect () {
8
+ this.tooltip = new bootstrap.Tooltip(this.element)
9
+ }
10
+
11
+ disconnect () {
12
+ this.tooltip.dispose()
13
+ }
14
+ }
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.1.13'
4
+ VERSION = '7.1.14'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pg_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.1.13
4
+ version: 7.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martín Rosso
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-12 00:00:00.000000000 Z
11
+ date: 2024-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -839,6 +839,7 @@ files:
839
839
  - pg_layout/app/javascript/controllers/selectize_controller.js
840
840
  - pg_layout/app/javascript/controllers/switcher_controller.js
841
841
  - pg_layout/app/javascript/controllers/theme_controller.js
842
+ - pg_layout/app/javascript/controllers/tooltip_controller.js
842
843
  - pg_layout/app/javascript/utils/cookies.js
843
844
  - pg_layout/app/javascript/utils/utils.ts
844
845
  - pg_layout/app/lib/navbar.rb