pg_rails 7.0.8.pre.alpha.70 → 7.0.8.pre.alpha.72

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: 686c782a19dd3b86046c75ac7ec01619ebfe48f2034a78202187629d0b549109
4
- data.tar.gz: d37da087265f86e72e8eb35676da5b3d86f6c9054a607f34cba59287cd2fd17b
3
+ metadata.gz: adf65a3ea20e9eedfa39e8e9a2b97ae48c773b5031d5dcffa4df98f8aa3f236f
4
+ data.tar.gz: f966e9b52d9ac7f7021ff6f51f0a051397f3dc07dffd641c7cd75949c8d198a0
5
5
  SHA512:
6
- metadata.gz: ee1e4d4612d52f2cb9e77e1bf622b6d9b0ce3a726356bf1093a0629f35d775a4f26ec19f74f6b9ec00ff8133cc69f98465bf2285e99f0cfa2bb9ede4a36d6b33
7
- data.tar.gz: aead26ec923a49105ccde5e242671f72dab206124a6ea56a98e55f5b0a70dc476659a2ae67ffaaab33d882379f2c8e31f7190f7df785794f5b9cb7b7f976541c
6
+ metadata.gz: b0d877134bf17b9b0653104475e5af6471850f805eaf5822e703ec17dc544fabf939dfdb3c74044969ebb1de635283d8872ee24fb324670bba5411480b0a605a
7
+ data.tar.gz: 61af835abe1cde9a9edeab6565a6f61f6df641e2f6a3df8f4fedf869d252a7382ce6c8488bff4c080319a7eaa30c6ac40a3917f4e00bc3c77530b4920e8d11a3
@@ -31,7 +31,7 @@
31
31
  display: none;
32
32
  }
33
33
  input[type=text] {
34
- background-color: white;
34
+ background-color: #{$body-bg};
35
35
  padding-right: 2em;
36
36
  }
37
37
  &.filled {
@@ -84,7 +84,7 @@
84
84
  box-shadow: 0px 9px 13px -3px rgba(0, 0, 0, 0.5);
85
85
  // position: absolute;
86
86
  // z-index: 1;
87
- background-color: white;
87
+ background-color: #{$body-bg};
88
88
  border: 1px solid #a7b7bb;
89
89
  border-top: none;
90
90
  border-radius: 4px;
@@ -55,6 +55,12 @@ export default class extends Controller {
55
55
 
56
56
  this.input.addEventListener('blur', () => {
57
57
  this.input.placeholder = ''
58
+ setTimeout(() => {
59
+ if (!this.element.classList.contains('filled')) {
60
+ this.input.value = ''
61
+ this.resetResultados()
62
+ }
63
+ }, 200)
58
64
  })
59
65
  this.input.onfocus = () => {
60
66
  this.input.select()
@@ -94,7 +94,6 @@ input[type=datetime-local], input[type=datetime] {
94
94
  --bs-border-radius-xl: 0.45rem;
95
95
  --bs-border-radius-xxl: 0.6rem;
96
96
  --bs-border-color: #a7b7bb;
97
- --bs-body-bg: #{$light};
98
97
  }
99
98
 
100
99
  // Alerts
@@ -33,11 +33,12 @@ module PgEngine
33
33
 
34
34
  respond_to do |format|
35
35
  format.html do
36
- render 'pg_layout/error', layout: 'pg_layout/containerized'
36
+ render 'pg_layout/error', layout: 'pg_layout/containerized', status: :internal_server_error
37
37
  end
38
38
  format.turbo_stream do
39
39
  flash.now[:critical] = self.class.render(partial: 'pg_layout/default_error_message')
40
- render turbo_stream: (turbo_stream.remove_all('.modal') + render_turbo_stream_flash_messages)
40
+ render turbo_stream: (turbo_stream.remove_all('.modal') + render_turbo_stream_flash_messages),
41
+ status: :internal_server_error
41
42
  end
42
43
  end
43
44
  end
@@ -101,7 +102,7 @@ module PgEngine
101
102
  if request.path == root_path
102
103
  # TODO!: renderear un 500.html y pg_err
103
104
  sign_out(Current.user) if Current.user.present?
104
- render plain: 'Acceso no autorizado'
105
+ render plain: 'Acceso no autorizado', status: :unprocessable_entity
105
106
  else
106
107
  go_back('Acceso no autorizado')
107
108
  end
@@ -5,7 +5,7 @@ class PgFormBuilder < SimpleForm::FormBuilder
5
5
  include PgEngine::ErrorHelper
6
6
 
7
7
  def default_prefix(attribute_name)
8
- attribute_name = attribute_name.to_s.sub /_id\z/, ''
8
+ attribute_name = attribute_name.to_s.sub(/_id\z/, '')
9
9
  at_name_human = object.class.human_attribute_name(attribute_name).downcase
10
10
  "#{articulo(attribute_name)} #{at_name_human}"
11
11
  end
@@ -5,4 +5,4 @@
5
5
  h4 Gracias por tu mensaje
6
6
  p.m-0 Te responderemos a la brevedad
7
7
  .col-auto.fs-2
8
- = image_tag 'plantita-sm', width: '30px'
8
+ = image_tag 'plantita-sm.png', width: '30px'
@@ -2,7 +2,7 @@
2
2
 
3
3
  .d-none
4
4
  / Preload
5
- = image_tag 'plantita-sm'
5
+ = image_tag 'plantita-sm.png'
6
6
  .text-center
7
7
  #mensaje_contacto
8
8
  h2 Ponete en contacto
@@ -80,7 +80,7 @@ es:
80
80
  activerecord:
81
81
  attributes:
82
82
  user:
83
- remember_me: Mantener sesión abierta en este navegador
83
+ remember_me: Recordarme en este navegador
84
84
  email:
85
85
  from_name: Remitente
86
86
  to: Destinatario
@@ -47,7 +47,7 @@ describe DummyBaseController do
47
47
 
48
48
  it do
49
49
  subject
50
- expect(response).to have_http_status(:ok)
50
+ expect(response).to have_http_status(:internal_server_error)
51
51
  expect(response.body).to include 'Ocurrió algo inesperado'
52
52
  expect(response.body).to include '<html'
53
53
  expect(response.content_type).to include 'text/html'
@@ -60,7 +60,7 @@ describe DummyBaseController do
60
60
 
61
61
  it do
62
62
  subject
63
- expect(response).to have_http_status(:ok)
63
+ expect(response).to have_http_status(:internal_server_error)
64
64
  expect(response.content_type).to include 'text/vnd.turbo-stream.html'
65
65
  expect(response.body).to include 'Ocurrió algo inesperado'
66
66
  expect(response.body).to include '<turbo-stream action="remove" targets=".modal">'
@@ -93,7 +93,7 @@ describe DummyBaseController do
93
93
 
94
94
  it do
95
95
  subject
96
- expect(response).to have_http_status(:ok)
96
+ expect(response).to have_http_status(:unprocessable_entity)
97
97
  expect(response.body).to eq 'Acceso no autorizado'
98
98
  expect(controller).not_to be_user_signed_in
99
99
  end
@@ -1,6 +1,6 @@
1
1
  <%# locals: (error_msg: nil) %>
2
2
 
3
- <div class="d-flex justify-content-around mt-2">
3
+ <div class="d-flex justify-content-around mt-2" data-turbo-temporary="true">
4
4
  <div class="alert alert-danger d-flex align-items-center">
5
5
  <div>
6
6
  <span class="bi bi-emoji-dizzy fs-1 me-3"></span>
@@ -1,4 +1,5 @@
1
1
  #flash-wrapper.d-flex.justify-content-around
2
2
  #flash.flash.position-relative.w-100.d-flex.justify-content-center
3
3
  = render partial: 'pg_layout/flash'
4
- / TODO: si hay varios flashes toast, se superponen. habría que hacer un container con position absolute para los toasts
4
+ / TODO: si hay varios flashes toast, se superponen. habría que hacer un container
5
+ con position absolute para los toasts
@@ -0,0 +1,17 @@
1
+ import { Controller } from '@hotwired/stimulus'
2
+ export default class extends Controller {
3
+ static outlets: string[]
4
+ lastValue: any
5
+ subWrapper: any
6
+ elemId: any
7
+ input: any
8
+ connect(): void;
9
+ resetResultados(): void;
10
+ setMaxHeight(): void;
11
+ crearItem(): void;
12
+ escribiAlgo(): void;
13
+ buscando(): void;
14
+ selectItem(e: any): void;
15
+ doSearch(force?: boolean): void;
16
+ completarCampo(object: any): void;
17
+ }
@@ -0,0 +1,7 @@
1
+ export declare function round(value: any): number;
2
+ export declare function printCurrency(value: any, simboloMoneda?: string): string;
3
+ export declare function showPercentage(value: any): string;
4
+ export declare function numberWithDots(x: any): any;
5
+ export declare function flashMessage(message: any, flashType?: string, toast?: boolean): void;
6
+ export declare function fadeOut(e: any): void;
7
+ export declare function fadeIn(e: any): void;
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module PgRails
4
- VERSION = '7.0.8-alpha.70'
4
+ VERSION = '7.0.8-alpha.72'
5
5
  end
@@ -9,3 +9,5 @@ $warning-border-subtle: tint-color($warning, 20%);
9
9
  // $danger-border-subtle: tint-color($danger, 60%);
10
10
 
11
11
  $btn-close-focus-shadow: none;
12
+
13
+ $body-bg: $light;
@@ -218,7 +218,7 @@ RSpec.describe <%= controller_class_name %>Controller do
218
218
  <% else -%>
219
219
  put :update, params: { id: <%= file_name %>.to_param, <%= nombre_tabla_completo_singular %>: valid_attributes }
220
220
  <% end -%>
221
- expect(response).to redirect_to([:<%= ns_prefix.first %>, <%= file_name %>.decorate.target_object])
221
+ expect(response).to redirect_to([:<%= ns_prefix.first %>, <%= file_name %>])
222
222
  end
223
223
  end
224
224
  <% if attributes.any? { |at| at.required? } -%>
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.0.8.pre.alpha.70
4
+ version: 7.0.8.pre.alpha.72
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-05-14 00:00:00.000000000 Z
11
+ date: 2024-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1102,6 +1102,8 @@ files:
1102
1102
  - pg_layout/lib/pg_layout.rb
1103
1103
  - pg_layout/lib/pg_layout/engine.rb
1104
1104
  - pg_layout/spec/lib/navbar_spec.rb
1105
+ - pg_rails/dist/types/pg_associable/app/javascript/asociable_controller.d.ts
1106
+ - pg_rails/dist/types/pg_layout/app/javascript/utils/utils.d.ts
1105
1107
  - pg_rails/js/index.js
1106
1108
  - pg_rails/lib/pg_rails.rb
1107
1109
  - pg_rails/lib/pg_rails/capybara_support.rb