pg_rails 7.1.10 → 7.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/pg_associable/app/javascript/modal_controller.js +1 -0
- data/pg_engine/app/components/notification_component.rb +1 -1
- data/pg_engine/app/components/search_bar_component.html.slim +17 -0
- data/pg_engine/app/components/search_bar_component.rb +10 -0
- data/pg_engine/app/components/search_bar_toggler_component.html.slim +8 -0
- data/pg_engine/app/components/search_bar_toggler_component.rb +4 -0
- data/pg_engine/app/lib/pg_engine/filtros_builder.rb +0 -2
- data/pg_engine/app/views/pg_engine/base/index.html.slim +3 -25
- data/pg_engine/config/initializers/view_component.rb +3 -0
- data/pg_engine/spec/components/previews/alert_component_preview/colours.html.slim +36 -3
- data/pg_layout/app/javascript/controllers/index.js +2 -0
- data/pg_layout/app/javascript/controllers/theme_controller.js +12 -0
- data/pg_layout/app/javascript/utils/utils.ts +2 -2
- data/pg_layout/app/views/layouts/pg_layout/base.html.slim +4 -0
- data/pg_rails/lib/version.rb +1 -1
- data/pg_rails/scss/bootstrap_overrides.scss +1 -1
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfa6040427b2819258e1afc08b32b84c8e91c834752369678619c6d4fa8db024
|
4
|
+
data.tar.gz: '07198f45eabdf38b2e0d6990b82298eda1da31391973aa8190a223cbb4995e23'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 80054255f87043cae6ca876997a4acbb0bfc5eeb0418991826c3fab5862389543f5916870b61063a6a0d88327c97a96c58ed454075559691f79f81fb4fbd3cd6
|
7
|
+
data.tar.gz: 78068cb66d350fed57c7fc3369caee7295070b0fe66c6e691792ad5ae3b5cbfbb1c36ab19316f11610e8e9f88a06a3e4d12427df339064f1250a398ad4368fe1
|
@@ -12,6 +12,7 @@ export default class extends Controller {
|
|
12
12
|
if (this.element.dataset.removeOnHide) {
|
13
13
|
this.element.addEventListener('hidden.bs.modal', (e) => {
|
14
14
|
this.element.remove()
|
15
|
+
// FIXME: handlear mejor
|
15
16
|
window.Stimulus.controllers.map((c) => { return c.calendar })
|
16
17
|
.filter((e) => { return e })
|
17
18
|
.forEach((c) => { c.refetchEvents() })
|
@@ -7,7 +7,7 @@ class NotificationComponent < BaseComponent
|
|
7
7
|
erb_template <<~ERB
|
8
8
|
<div class="notification d-flex flex-column flex-sm-row justify-content-between <%= 'unseen' if @notification.unseen? %>"
|
9
9
|
id="<%= dom_id(@notification) %>" data-id="<%= @notification.id %>">
|
10
|
-
<div class="pe-3">
|
10
|
+
<div class="pe-3 trix-content">
|
11
11
|
<%= @notification.message.html_safe %>
|
12
12
|
</div>
|
13
13
|
<div class="notification--time d-flex flex-column justify-content-end text-body-tertiary text-end">
|
@@ -0,0 +1,17 @@
|
|
1
|
+
- if helpers.show_filters?
|
2
|
+
.border-bottom#filtros
|
3
|
+
.d-flex.align-items-center.px-3.py-2
|
4
|
+
.px-2.d-none.d-sm-inline-block
|
5
|
+
span.bi.bi-funnel-fill
|
6
|
+
= helpers.search_form_for @q, url: url_for do |f|
|
7
|
+
.row.g-1
|
8
|
+
.col
|
9
|
+
.row.g-1
|
10
|
+
= @builder.filtros_html(form: f)
|
11
|
+
.col-auto.gap-1.d-flex.align-items-start
|
12
|
+
= helpers.button_tag class: 'btn btn-sm btn-primary col-auto' do
|
13
|
+
span.bi.bi-search
|
14
|
+
span.d-none.d-sm-inline
|
15
|
+
|  
|
16
|
+
span.text Buscar
|
17
|
+
= helpers.clear_filter(title: 'Limpiar', class: 'btn btn-sm btn-secondary col-auto')
|
@@ -0,0 +1,8 @@
|
|
1
|
+
- if helpers.show_filters?
|
2
|
+
= link_to url_for(ocultar_filtros: 1, cancel_filter: 'true'),
|
3
|
+
class: 'btn btn-sm btn-outline-primary col-auto' do
|
4
|
+
| Ocultar filtros
|
5
|
+
- else
|
6
|
+
= link_to url_for(mostrar_filtros: 1),
|
7
|
+
class: 'btn btn-sm btn-outline-primary col-auto' do
|
8
|
+
| Filtrar
|
@@ -3,34 +3,12 @@
|
|
3
3
|
- @actions&.each do |link_args|
|
4
4
|
= link_to(*link_args)
|
5
5
|
- if @filtros.present?
|
6
|
-
|
7
|
-
= link_to namespaced_path(@clase_modelo, ocultar_filtros: 1),
|
8
|
-
class: 'btn btn-sm btn-outline-primary col-auto' do
|
9
|
-
| Ocultar filtros
|
10
|
-
- else
|
11
|
-
= link_to namespaced_path(@clase_modelo, mostrar_filtros: 1),
|
12
|
-
class: 'btn btn-sm btn-outline-primary col-auto' do
|
13
|
-
| Filtrar
|
6
|
+
= render SearchBarTogglerComponent.new
|
14
7
|
.ms-1
|
15
8
|
= @clase_modelo.new.decorate.new_link
|
16
9
|
|
17
|
-
- if @filtros.present?
|
18
|
-
.
|
19
|
-
.d-flex.align-items-center.px-3.py-2
|
20
|
-
.px-2.d-none.d-sm-inline-block
|
21
|
-
span.bi.bi-funnel-fill
|
22
|
-
= search_form_for @q, url: namespaced_path(@clase_modelo) do |f|
|
23
|
-
.row.g-1
|
24
|
-
.col
|
25
|
-
.row.g-1
|
26
|
-
= @filtros.filtros_html(form: f)
|
27
|
-
.col-auto.gap-1.d-flex.align-items-start
|
28
|
-
= button_tag class: 'btn btn-sm btn-primary col-auto' do
|
29
|
-
span.bi.bi-search
|
30
|
-
span.d-none.d-sm-inline
|
31
|
-
|  
|
32
|
-
span.text Buscar
|
33
|
-
= clear_filter(title: 'Limpiar', class: 'btn btn-sm btn-secondary col-auto')
|
10
|
+
- if @filtros.present?
|
11
|
+
= render SearchBarComponent.new(@q, @filtros)
|
34
12
|
|
35
13
|
div
|
36
14
|
- if @collection.any?
|
@@ -1,3 +1,36 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
1
|
+
.row
|
2
|
+
.col
|
3
|
+
- %w[danger warning info success].each do |status|
|
4
|
+
h1 class="text-#{status}" = status
|
5
|
+
h1 class="text-#{status}-emphasis" = "#{status} emphasis"
|
6
|
+
|
7
|
+
.col
|
8
|
+
- %w[danger warning info success].each do |status|
|
9
|
+
.alert class="alert-#{status}"
|
10
|
+
= "Alert #{status}"
|
11
|
+
|
12
|
+
.row
|
13
|
+
.col
|
14
|
+
div class="p-3 mb-2 bg-primary text-white" .bg-primary
|
15
|
+
div class="p-3 mb-2 bg-primary-subtle text-primary-emphasis" .bg-primary-subtle
|
16
|
+
div class="p-3 mb-2 bg-secondary text-white" .bg-secondary
|
17
|
+
div class="p-3 mb-2 bg-secondary-subtle text-secondary-emphasis" .bg-secondary-subtle
|
18
|
+
div class="p-3 mb-2 bg-success text-white" .bg-success
|
19
|
+
div class="p-3 mb-2 bg-success-subtle text-success-emphasis" .bg-success-subtle
|
20
|
+
div class="p-3 mb-2 bg-danger text-white" .bg-danger
|
21
|
+
div class="p-3 mb-2 bg-danger-subtle text-danger-emphasis" .bg-danger-subtle
|
22
|
+
div class="p-3 mb-2 bg-warning text-dark" .bg-warning
|
23
|
+
div class="p-3 mb-2 bg-warning-subtle text-warning-emphasis" .bg-warning-subtle
|
24
|
+
div class="p-3 mb-2 bg-info text-dark" .bg-info
|
25
|
+
.col
|
26
|
+
div class="p-3 mb-2 bg-info-subtle text-info-emphasis" .bg-info-subtle
|
27
|
+
div class="p-3 mb-2 bg-light text-dark" .bg-light
|
28
|
+
div class="p-3 mb-2 bg-light-subtle text-light-emphasis" .bg-light-subtle
|
29
|
+
div class="p-3 mb-2 bg-dark-subtle text-dark-emphasis" .bg-dark-subtle
|
30
|
+
div class="p-3 mb-2 bg-body-secondary" .bg-body-secondary
|
31
|
+
div class="p-3 mb-2 bg-body-tertiary" .bg-body-tertiary
|
32
|
+
div class="p-3 mb-2 bg-dark text-white" .bg-dark
|
33
|
+
div class="p-3 mb-2 bg-body text-body" .bg-body
|
34
|
+
div class="p-3 mb-2 bg-black text-white" .bg-black
|
35
|
+
div class="p-3 mb-2 bg-white text-dark" .bg-white
|
36
|
+
div class="p-3 mb-2 bg-transparent text-body" .bg-transparent
|
@@ -9,6 +9,7 @@ import SwitcherController from './switcher_controller'
|
|
9
9
|
import FiltrosController from './filtros_controller'
|
10
10
|
import NotificationsController from './notifications_controller'
|
11
11
|
import SelectizeController from './selectize_controller'
|
12
|
+
import ThemeController from './theme_controller'
|
12
13
|
|
13
14
|
application.register('navbar', NavbarController)
|
14
15
|
application.register('nested', NestedController)
|
@@ -19,5 +20,6 @@ application.register('switcher', SwitcherController)
|
|
19
20
|
application.register('filtros', FiltrosController)
|
20
21
|
application.register('notifications', NotificationsController)
|
21
22
|
application.register('selectize', SelectizeController)
|
23
|
+
application.register('theme', ThemeController)
|
22
24
|
|
23
25
|
// TODO: testear con capybara todo lo que se pueda
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { Controller } from '@hotwired/stimulus'
|
2
|
+
|
3
|
+
// Connects to data-controller="theme"
|
4
|
+
export default class extends Controller {
|
5
|
+
dark () {
|
6
|
+
document.documentElement.setAttribute('data-bs-theme', 'dark')
|
7
|
+
}
|
8
|
+
|
9
|
+
light () {
|
10
|
+
document.documentElement.setAttribute('data-bs-theme', 'light')
|
11
|
+
}
|
12
|
+
}
|
@@ -81,14 +81,14 @@ export function flashMessage (message, flashType = 'warning', toast = false) {
|
|
81
81
|
}
|
82
82
|
|
83
83
|
export function fadeOut (e) {
|
84
|
-
if (window.getComputedStyle(e).visibility !== 'hidden') {
|
84
|
+
if (e && window.getComputedStyle(e).visibility !== 'hidden') {
|
85
85
|
e.classList.add('fade-out')
|
86
86
|
e.addEventListener('animationend', onAnimationEndHide, { once: true })
|
87
87
|
}
|
88
88
|
}
|
89
89
|
|
90
90
|
export function fadeIn (e) {
|
91
|
-
if (window.getComputedStyle(e).visibility !== 'visible') {
|
91
|
+
if (e && window.getComputedStyle(e).visibility !== 'visible') {
|
92
92
|
e.classList.add('fade-in')
|
93
93
|
e.addEventListener('animationend', onAnimationEndShow, { once: true })
|
94
94
|
}
|
@@ -77,6 +77,10 @@ html
|
|
77
77
|
= yield(:filtros)
|
78
78
|
= content
|
79
79
|
div style="width:100%; height: 10em"
|
80
|
+
.d-flex.gap-1.justify-content-center.opacity-50 data-controller="theme"
|
81
|
+
| (Beta) Tema:
|
82
|
+
= link_to 'Claro', 'javascript:void(0)', 'data-action': 'theme#light'
|
83
|
+
= link_to 'Oscuro', 'javascript:void(0)', 'data-action': 'theme#dark'
|
80
84
|
= render partial: 'layouts/footer'
|
81
85
|
div style="width:100%; height: 10em"
|
82
86
|
= render_turbo_stream_title
|
data/pg_rails/lib/version.rb
CHANGED
@@ -8,7 +8,7 @@ $danger-bg-subtle: tint-color($danger, 98%);
|
|
8
8
|
$warning-border-subtle: tint-color($warning, 20%);
|
9
9
|
// $danger-border-subtle: tint-color($danger, 60%);
|
10
10
|
$secondary-bg-subtle: tint-color($secondary, 92%);
|
11
|
-
$warning-bg-subtle: tint-color($warning, 40%);
|
11
|
+
// $warning-bg-subtle: tint-color($warning, 40%);
|
12
12
|
|
13
13
|
|
14
14
|
$btn-close-focus-shadow: none;
|
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.
|
4
|
+
version: 7.1.12
|
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-
|
11
|
+
date: 2024-08-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -617,6 +617,10 @@ files:
|
|
617
617
|
- pg_engine/app/components/notification_component.rb
|
618
618
|
- pg_engine/app/components/notifications_bell_component.rb
|
619
619
|
- pg_engine/app/components/page_not_found_component.rb
|
620
|
+
- pg_engine/app/components/search_bar_component.html.slim
|
621
|
+
- pg_engine/app/components/search_bar_component.rb
|
622
|
+
- pg_engine/app/components/search_bar_toggler_component.html.slim
|
623
|
+
- pg_engine/app/components/search_bar_toggler_component.rb
|
620
624
|
- pg_engine/app/controllers/admin/accounts_controller.rb
|
621
625
|
- pg_engine/app/controllers/admin/email_logs_controller.rb
|
622
626
|
- pg_engine/app/controllers/admin/emails_controller.rb
|
@@ -721,6 +725,7 @@ files:
|
|
721
725
|
- pg_engine/config/initializers/ransack_memory.rb
|
722
726
|
- pg_engine/config/initializers/rollbar.rb
|
723
727
|
- pg_engine/config/initializers/simple_form_monkey_patch.rb
|
728
|
+
- pg_engine/config/initializers/view_component.rb
|
724
729
|
- pg_engine/config/initializers/zeitwerk.rb
|
725
730
|
- pg_engine/config/locales/devise.en.yml
|
726
731
|
- pg_engine/config/locales/es.yml
|
@@ -833,6 +838,7 @@ files:
|
|
833
838
|
- pg_layout/app/javascript/controllers/pg_form_controller.js
|
834
839
|
- pg_layout/app/javascript/controllers/selectize_controller.js
|
835
840
|
- pg_layout/app/javascript/controllers/switcher_controller.js
|
841
|
+
- pg_layout/app/javascript/controllers/theme_controller.js
|
836
842
|
- pg_layout/app/javascript/utils/cookies.js
|
837
843
|
- pg_layout/app/javascript/utils/utils.ts
|
838
844
|
- pg_layout/app/lib/navbar.rb
|