pg_rails 7.1.11 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0f6553a59df0df7aeb2906baac1974c3f2ef6f5b17bd83f4df1b4fbf3f7f2819
4
- data.tar.gz: 20e9aa024c6aebb771ebea3c3b852a2e47a6d7583d043bcbc750d3ec2642e336
3
+ metadata.gz: dfa6040427b2819258e1afc08b32b84c8e91c834752369678619c6d4fa8db024
4
+ data.tar.gz: '07198f45eabdf38b2e0d6990b82298eda1da31391973aa8190a223cbb4995e23'
5
5
  SHA512:
6
- metadata.gz: b5b1ff627eeff7269b53d81a2b8d39184118741001cb4d36d89eba76801910315551ef563d55216f5a2e5b372b7afd3ff66ef7a4bae8428f94b20a28004c727b
7
- data.tar.gz: c7af654f04ac7fba7d48e9c220f9396bb5ab24508350035447c792f0fd0afe213ccb529ed5360db4e1baa4f27cd5cbf387d6f3b4a71877edccf10395359fc8a6
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">
@@ -91,8 +91,6 @@ module PgEngine
91
91
  # real sino filtro booleano por presencia de discarded_at
92
92
  return :boolean if campo.to_s == 'discarded'
93
93
 
94
- pg_warn("no existe el campo: #{nombre_campo}")
95
-
96
94
  return
97
95
  end
98
96
  columna.type
@@ -1,3 +1,36 @@
1
- - %w[danger warning info success].each do |status|
2
- h1 class="text-#{status}" = status
3
- h1 class="text-#{status}-emphasis" = "#{status} emphasis"
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.1.11'
4
+ VERSION = '7.1.12'
5
5
  end
@@ -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.11
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-03 00:00:00.000000000 Z
11
+ date: 2024-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -838,6 +838,7 @@ files:
838
838
  - pg_layout/app/javascript/controllers/pg_form_controller.js
839
839
  - pg_layout/app/javascript/controllers/selectize_controller.js
840
840
  - pg_layout/app/javascript/controllers/switcher_controller.js
841
+ - pg_layout/app/javascript/controllers/theme_controller.js
841
842
  - pg_layout/app/javascript/utils/cookies.js
842
843
  - pg_layout/app/javascript/utils/utils.ts
843
844
  - pg_layout/app/lib/navbar.rb