polaris_view_components 2.2.4 → 2.2.5
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c816d01eaed92bdee76c9de459b95efeda2e0fa0b1fa4d39148539aff992c92
|
4
|
+
data.tar.gz: 30f8addff41d9e27c1a16cc6501d6e3ef7b63e7fe2873fd4cac8bc771651894f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ed315b60b6b900c39ca638582d47cbd47c0ff12d75af47f35cbeb4c707176fbba7259acc27148e2d3fdff3204205dc62b61ee40c6d9bc2ba5dc8a23346117a1
|
7
|
+
data.tar.gz: a40315f3b3b5dbe98120e616513290e043280896f6ab73b0f1747cce612d19061240e7c62aee7db24820f2430bd2eb961cb9eff3b631bae8e4f24f8c4cd93689
|
@@ -1,21 +1,25 @@
|
|
1
1
|
<%= render Polaris::BaseComponent.new(**system_arguments) do %>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
</th>
|
10
|
-
<% end %>
|
11
|
-
</tr>
|
12
|
-
</thead>
|
13
|
-
<tbody>
|
14
|
-
<% @data.each do |row| %>
|
15
|
-
<%= render Polaris::BaseComponent.new(**row_arguments(row)) do %>
|
2
|
+
<% if @data.empty? %>
|
3
|
+
<%= empty_state %>
|
4
|
+
<% else %>
|
5
|
+
<div class="Polaris-IndexTable-ScrollContainer">
|
6
|
+
<table class="Polaris-IndexTable__Table">
|
7
|
+
<thead>
|
8
|
+
<tr>
|
16
9
|
<% columns.each_with_index do |column, index| %>
|
17
|
-
|
18
|
-
<%= column.
|
10
|
+
<th class="Polaris-IndexTable__TableHeading">
|
11
|
+
<%= column.title %>
|
12
|
+
</th>
|
13
|
+
<% end %>
|
14
|
+
</tr>
|
15
|
+
</thead>
|
16
|
+
<tbody>
|
17
|
+
<% @data.each do |row| %>
|
18
|
+
<%= render Polaris::BaseComponent.new(**row_arguments(row)) do %>
|
19
|
+
<% columns.each_with_index do |column, index| %>
|
20
|
+
<%= render_cell(flush: column.flush, **column.system_arguments) do %>
|
21
|
+
<%= column.call(row) %>
|
22
|
+
<% end %>
|
19
23
|
<% end %>
|
20
24
|
<% end %>
|
21
25
|
<% end %>
|
@@ -54,7 +54,7 @@ module Polaris
|
|
54
54
|
if options[:error_hidden] && options[:error]
|
55
55
|
options[:error] = !!options[:error]
|
56
56
|
end
|
57
|
-
render Polaris::TextFieldComponent.new(form: self, attribute: method, **options, &block
|
57
|
+
render Polaris::TextFieldComponent.new(form: self, attribute: method, **options), &block
|
58
58
|
end
|
59
59
|
|
60
60
|
def polaris_select(method, **options, &block)
|
@@ -103,6 +103,7 @@ module Polaris
|
|
103
103
|
if value.present?
|
104
104
|
options[:selected] = value.map { |el| el.public_send(value_method) }
|
105
105
|
end
|
106
|
+
input_options = options.delete(:input_options) || {}
|
106
107
|
|
107
108
|
render Polaris::ChoiceListComponent.new(
|
108
109
|
form: self,
|
@@ -113,7 +114,11 @@ module Polaris
|
|
113
114
|
&block
|
114
115
|
) do |choice|
|
115
116
|
collection.each do |item|
|
116
|
-
choice.with_checkbox(
|
117
|
+
choice.with_checkbox(
|
118
|
+
label: item.public_send(text_method),
|
119
|
+
value: item.public_send(value_method),
|
120
|
+
input_options: input_options
|
121
|
+
)
|
117
122
|
end
|
118
123
|
end
|
119
124
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polaris_view_components
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
4
|
+
version: 2.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Gamble
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2024-
|
12
|
+
date: 2024-12-30 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|