lesli_view 1.0.0 → 1.0.2
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/lib/lesli_view/charts/general.html.erb +5 -2
- data/lib/lesli_view/components/header.html.erb +5 -0
- data/lib/lesli_view/components/header.rb +3 -2
- data/lib/lesli_view/version.rb +2 -2
- data/readme.md +27 -30
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b114afc69536d764ebaa8448c859f64c6b0d350a4b8fd31f0f0398905c768678
|
4
|
+
data.tar.gz: f61f2cb3c174abb07566e51779955e98063b678e940e2a1d7931d8b31293b443
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 527a8b08757e60fac2db92251840d0d214cdfb6ec186783a744edb97adcba8e23724fb4fa79c0ec3a9537c5541ab0562c79c022185c6b74b5d418ebbc3a37324
|
7
|
+
data.tar.gz: 5f076153eb39ccd7548f33885b177e000f13a021ac83bfd5d424a6d61cad629f5bf1a73e53eb5b9164d20a0430108b500ca4a7df53b7c159dd9508b957bd43c1
|
@@ -4,7 +4,7 @@ document.addEventListener("turbo:load", () => {
|
|
4
4
|
const chartElement = document.getElementById(chartId);
|
5
5
|
|
6
6
|
if (!chartElement) {
|
7
|
-
console.warn("Chart element not found:", chartId);
|
7
|
+
///console.warn("Chart element not found:", chartId);
|
8
8
|
return;
|
9
9
|
}
|
10
10
|
|
@@ -42,7 +42,7 @@ document.addEventListener("turbo:load", () => {
|
|
42
42
|
},
|
43
43
|
}
|
44
44
|
},
|
45
|
-
dataLabels: { enabled: true
|
45
|
+
dataLabels: { enabled: true },
|
46
46
|
stroke: {
|
47
47
|
show: true,
|
48
48
|
curve: "smooth",
|
@@ -72,7 +72,10 @@ document.addEventListener("turbo:load", () => {
|
|
72
72
|
const label = w.globals.labels[dataPointIndex];
|
73
73
|
return `${label}: ${value}`;
|
74
74
|
}
|
75
|
+
<% elsif type == "line" %>
|
76
|
+
options.grid.padding = { top: 14, right: 0, bottom: 6, left: 0 }
|
75
77
|
<% end %>
|
78
|
+
|
76
79
|
<% end %>
|
77
80
|
|
78
81
|
const chart = new ApexCharts(chartElement, options);
|
@@ -13,6 +13,11 @@
|
|
13
13
|
<% end %>
|
14
14
|
</div>
|
15
15
|
<div class="lesli-element-header-items is-flex is-flex-grow-1 is-justify-content-end">
|
16
|
+
<% if new_path %>
|
17
|
+
<%= render ::LesliView::Elements::Button.new(
|
18
|
+
"Nuevo", url:new_path, icon:"add", solid:true
|
19
|
+
) %>
|
20
|
+
<% end %>
|
16
21
|
<%= content %>
|
17
22
|
</div>
|
18
23
|
</section>
|
@@ -35,11 +35,12 @@ Building a better future, one line of code at a time.
|
|
35
35
|
module LesliView
|
36
36
|
module Components
|
37
37
|
class Header < ViewComponent::Base
|
38
|
-
attr_reader :title, :back
|
38
|
+
attr_reader :title, :back, :new_path
|
39
39
|
|
40
|
-
def initialize(title, back:
|
40
|
+
def initialize(title, new_path:nil, back:nil)
|
41
41
|
@title = title
|
42
42
|
@back = back
|
43
|
+
@new_path = new_path
|
43
44
|
end
|
44
45
|
end
|
45
46
|
end
|
data/lib/lesli_view/version.rb
CHANGED
data/readme.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
<div align="center">
|
1
|
+
<div align="center" class="documentation-header">
|
3
2
|
<img width="100" alt="LesliView logo" src="./docs/images/view-logo.svg" />
|
4
3
|
<h3 align="center">Web Elements & Components for The Lesli Framework.</h3>
|
5
4
|
</div>
|
@@ -7,7 +6,7 @@
|
|
7
6
|
<br />
|
8
7
|
<hr/>
|
9
8
|
|
10
|
-
<
|
9
|
+
<div align="center" class="documentation-statics">
|
11
10
|
<a target="blank" href="https://rubygems.org/gems/lesli">
|
12
11
|
<img height="22" alt="Gem Version" src="https://badge.fury.io/rb/lesli.svg"/>
|
13
12
|
</a>
|
@@ -17,11 +16,12 @@
|
|
17
16
|
<a href="https://codecov.io/github/LesliTech/LesliBabel">
|
18
17
|
<img height="22" src="https://sonarcloud.io/api/project_badges/measure?project=LesliTech_LesliBabel&metric=sqale_rating"/>
|
19
18
|
</a>
|
20
|
-
</
|
19
|
+
</div>
|
21
20
|
|
22
21
|
<hr/>
|
23
22
|
<br />
|
24
23
|
|
24
|
+
|
25
25
|
### Quick start
|
26
26
|
|
27
27
|
```shell
|
@@ -29,35 +29,33 @@
|
|
29
29
|
bundle add lesli_view
|
30
30
|
```
|
31
31
|
|
32
|
-
|
33
|
-
|
34
|
-
<%= render LesliView::Layout::Container.new("shield-sessions") do %>
|
35
|
-
<%= render LesliView::Element::Header.new(title: "Sessions", back: true) do %>
|
36
|
-
<%= render(LesliView::Element::Button.new(icon: "add", solid:true)) do %>
|
37
|
-
Add new
|
38
|
-
<% end %>
|
39
|
-
<%= render(LesliView::Element::Button.new(icon: "refresh")) do %>
|
40
|
-
Reload
|
41
|
-
<% end %>
|
42
|
-
<% end %>
|
43
|
-
<%= render LesliView::Element::Toolbar.new() %>
|
44
|
-
<%= render(LesliView::Element::Table.new(
|
45
|
-
columns: columns,
|
46
|
-
records: @sessions[:records]
|
47
|
-
)) %>
|
48
|
-
<% end %>
|
49
|
-
```
|
32
|
+
|
33
|
+
### Usage
|
50
34
|
|
51
35
|
```erb
|
52
|
-
|
53
|
-
|
54
|
-
|
36
|
+
# app/views/lesli_support/tickets/index.html.erb
|
37
|
+
|
38
|
+
<%= render(LesliView::Layout::Container.new("support-tickets")) do %>
|
39
|
+
|
40
|
+
<%= render(LesliView::Components::Header.new("Tickets")) %>
|
41
|
+
<%= render(LesliView::Components::Toolbar.new()) %>
|
42
|
+
|
43
|
+
<%= render(LesliView::Elements::Table.new(
|
44
|
+
:columns => columns,
|
45
|
+
:records => @tickets.dig(:records),
|
46
|
+
link: -> (ticket) { ticket_path(ticket.id) }
|
47
|
+
)) %>
|
55
48
|
<% end %>
|
56
49
|
```
|
57
50
|
|
51
|
+
|
58
52
|
### Documentation
|
53
|
+
- **Components:**
|
54
|
+
- [Header](https://www.lesli.dev/gems/view/component-header)
|
55
|
+
|
56
|
+
|
57
|
+
### Lesli Documentation
|
59
58
|
* [website](https://www.lesli.dev/)
|
60
|
-
* [database](./docs/database.md)
|
61
59
|
* [documentation](https://www.lesli.dev/gems/view/)
|
62
60
|
|
63
61
|
|
@@ -88,8 +86,7 @@ along with this program. If not, see http://www.gnu.org/licenses/.
|
|
88
86
|
<hr />
|
89
87
|
<br />
|
90
88
|
|
91
|
-
<
|
89
|
+
<div align="center" class="has-text-centered">
|
92
90
|
<img width="200" alt="Lesli logo" src="https://cdn.lesli.tech/lesli/brand/app-logo.svg" />
|
93
|
-
<h4 align="center">Ruby on Rails SaaS Development Framework.</h4>
|
94
|
-
</
|
95
|
-
|
91
|
+
<h4 align="center" class="mt-0">Ruby on Rails SaaS Development Framework.</h4>
|
92
|
+
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lesli_view
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- The Lesli Development Team
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: view_component
|