lato 3.11.7 → 3.11.9

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: df86f3c338023c7cb4253ba9fe107a7fc02ed7d0bcb8f036c408a5c1e31c9212
4
- data.tar.gz: '08ca6bc541e1519b60394dfa1ad306580bde2f6ee0740e38bd451277c33c80e9'
3
+ metadata.gz: 222f7dc438f08dabcf4d33854937700faade02f929de89cca6d1053a557214fd
4
+ data.tar.gz: 041baf847c3a2e3c81836b03c65dc24a65a99ff19c212b3a6e87f578445b9468
5
5
  SHA512:
6
- metadata.gz: a4b238b8473d9db464d0f089a9ff7263fc3c7cd6dcd97fb5b724c60933927d045ace59d08fc3e1475a46d20442ae22454fcd4f3bc39ff8e8624ececc19b24506
7
- data.tar.gz: e7f1b73a0f6c1cc42bb4d845dd2e70afb18bf29121e296f3af8cfe900b188472724fbc7e46ab2aa9d2076a1d4ddf100e5bb01addbd46753cd919ac93fca50e56
6
+ metadata.gz: d0fbc49d3448808a0de5646d77a6b351214e5e0bee58357f03558125a52e8210082e2b99f0f7ab3988b80f0b623af5b0b0fbb9b744e90ba7da5c45c72128cc74
7
+ data.tar.gz: 586f4f7b1e51c93f45e8ff805417aec787d861df059d16671363c71c2b95c9d725c1a597fd08f643203019bc99272912128ac92ef1c3cab8a8e350104bb85161
data/README.md CHANGED
@@ -2,21 +2,27 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/lato.svg)](https://badge.fury.io/rb/lato)
4
4
 
5
- Lato is a Rails Engine to deliver a full featured web panel for your Rails application.
5
+ Lato is a Rails Engine to deliver a full featured web panel for your [Rails](https://rubyonrails.org/) application.
6
6
 
7
7
  This gem includes:
8
8
  - User management with full authentication (signin, signup, recover password, email validation, Google Authenticator multi-factor authentication, ETH wallet connection);
9
- - Web panel UI (Navbar, Sidebar, Body) with Bootstrap;
9
+ - Web panel UI (Navbar, Sidebar, Body) with [Bootstrap](https://getbootstrap.com/) and [Bootstrap Icons](https://icons.getbootstrap.com/) integrated;
10
10
  - Some UI components ready to use integrated with Rails (data tables, forms, modals, async job executions);
11
11
 
12
12
  The gem is designed to be easily **customizable and extendable**. You can fully customize the UI and the functionalities of the panel. You can also add new functionalities and components to the panel on the main application or develop new engines to extend the panel.
13
13
 
14
- The gem is ready to be used with the **latest Rails 7+** features like **ESM import maps**, **Turbo** and **Stimulus**.
14
+ The gem is ready to be used with the **latest Rails 7+** features like **[ESM import maps](https://github.com/rails/importmap-rails)**, **[Turbo](https://turbo.hotwired.dev/)** and **[Stimulus](https://stimulus.hotwired.dev)**.
15
15
 
16
16
  The front-end is designed to be responsive, mobile friendly and accessible.
17
17
 
18
18
  <img src="./preview.gif" alt="Lato preview" width="100%">
19
19
 
20
+ ## Full documentation (🇮🇹 Italian only)
21
+
22
+ The full documentation is available at: 👉 👉 [THIS LINK](http://lato.gregoriogalante.com/) 👈 👈
23
+
24
+ You can also use the [Lato AI Agent](http://lato.gregoriogalante.com/AI.html) directly on your browser to generate code and get helps with the gem.
25
+
20
26
  ## Eco-system
21
27
  The idea behind Lato is to create an eco-system of engines that can improve the functionalities of the panel. The following engines are already available:
22
28
 
@@ -28,13 +34,13 @@ Add required dependencies to your application's Gemfile:
28
34
 
29
35
  ```ruby
30
36
  # Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
31
- gem "importmap-rails" # NOTE: Probably already installed in default rails 7 project
37
+ gem "importmap-rails" # NOTE: Probably already installed in default rails 7+ project
32
38
 
33
39
  # Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
34
- gem "turbo-rails" # NOTE: Probably already installed in default rails 7 project
40
+ gem "turbo-rails" # NOTE: Probably already installed in default rails 7+ project
35
41
 
36
42
  # Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
37
- gem "stimulus-rails" # NOTE: Probably already installed in default rails 7 project
43
+ gem "stimulus-rails" # NOTE: Probably already installed in default rails 7+ project
38
44
 
39
45
  # Use Sass to process CSS
40
46
  gem "sassc-rails"
@@ -116,11 +122,23 @@ $ rails db:seed
116
122
  $ foreman start -f Procfile.dev
117
123
  ```
118
124
 
119
- ## Publish
125
+ ### Publish
126
+
127
+ This script will publish the gem to rubygems.org. Make sure you have the correct permissions and that you are logged in to your rubygems account.
120
128
 
121
129
  ```shell
122
130
  $ ruby ./bin/publish.rb
123
131
  ```
124
132
 
133
+ ### Generate documentation
134
+
135
+ This script will generate the documentation for the gem by exporting the Rails rendered views to HTML files. The documentation will be generated in the **docs** folder.
136
+
137
+ Make sure to have the server running on port 3000 before running the script.
138
+
139
+ ```shell
140
+ $ ruby ./bin/generate_docs.rb
141
+ ```
142
+
125
143
  ## License
126
144
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,17 @@
1
+ import { Controller } from "@hotwired/stimulus"
2
+
3
+ export default class extends Controller {
4
+
5
+ /**
6
+ * Stimulus
7
+ */
8
+
9
+ connect() {
10
+ }
11
+
12
+ onSearchKeyUp(e) {
13
+ // Search the input with name "page" inside this.element and force value to 1
14
+ const pageInput = this.element.querySelector('input[name="page"]')
15
+ if (pageInput) pageInput.value = 1
16
+ }
17
+ }
@@ -7,7 +7,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
7
7
 
8
8
  <%= turbo_frame_tag "lato_index_#{key}_#{model_name_underscore}", class: "lato-index #{browser.device.mobile? ? 'lato-index-mob' : 'lato-index-desk'}" do %>
9
9
 
10
- <%= form_tag request.path, method: :get, data: { controller: 'lato_form', turbo_frame: '_self' } do %>
10
+ <%= form_tag request.path, method: :get, data: { controller: 'lato-form lato-index', turbo_frame: '_self' } do %>
11
11
  <%= hidden_field_tag :key, key %>
12
12
  <% params.each do |k, v| %>
13
13
  <%= hidden_field_tag k, v %>
@@ -17,7 +17,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
17
17
  <div class="d-flex mb-3">
18
18
  <% if searchable_columns.any? %>
19
19
  <div class="input-group">
20
- <input type="text" name="search" class="form-control" placeholder="<%= I18n.t('lato.search_for') %>: <%= searchable_columns.map { |c| collection.model.human_attribute_name(c) }.to_sentence %>" value="<%= params[:search] %>">
20
+ <input type="text" name="search" class="form-control" placeholder="<%= I18n.t('lato.search_for') %>: <%= searchable_columns.map { |c| collection.model.human_attribute_name(c) }.to_sentence %>" value="<%= params[:search] %>" data-action="keyup->lato-index#onSearchKeyUp" aria-label="<%= I18n.t('lato.search') %>">
21
21
  <button
22
22
  class="btn btn-outline-primary"
23
23
  type="submit"
@@ -159,7 +159,7 @@ collection_total = collection.respond_to?(:total_count) ? collection.total_count
159
159
  <div class="d-flex justify-content-end align-items-center">
160
160
  <span class="text-muted"><%= collection_total %> <%= I18n.t('lato.total_results').downcase %></span>
161
161
  <% if pagination_options %>
162
- <select name="per_page" class="ms-3 form-select form-select-sm w-auto" data-action="change->lato_form#submit" aria-label="<%= I18n.t('lato.per_page_description') %>">
162
+ <select name="per_page" class="ms-3 form-select form-select-sm w-auto" data-action="change->lato-form#submit" aria-label="<%= I18n.t('lato.per_page_description') %>">
163
163
  <% pagination_options.each do |option| %>
164
164
  <option value="<%= option %>" <%= option == params[:per_page].to_i ? 'selected' : '' %>>
165
165
  <%= option %> <%= I18n.t('lato.per_page').downcase %>
data/lib/lato/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Lato
2
- VERSION = "3.11.7"
2
+ VERSION = "3.11.9"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lato
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.11.7
4
+ version: 3.11.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gregorio Galante
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-04-05 00:00:00.000000000 Z
11
+ date: 2025-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -161,6 +161,7 @@ files:
161
161
  - app/assets/javascripts/lato/controllers/lato_form_controller.js
162
162
  - app/assets/javascripts/lato/controllers/lato_guide_controller.js
163
163
  - app/assets/javascripts/lato/controllers/lato_hello_controller.js
164
+ - app/assets/javascripts/lato/controllers/lato_index_controller.js
164
165
  - app/assets/javascripts/lato/controllers/lato_input_autocomplete2_controller.js
165
166
  - app/assets/javascripts/lato/controllers/lato_input_autocomplete_controller.js
166
167
  - app/assets/javascripts/lato/controllers/lato_network_controller.js