ui_bibz 4.0.0.beta17 → 4.0.0.beta18

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: 701e9fbed51812909b28fc81168512c616ecd0e4303a7629677e15458ff2ebfe
4
- data.tar.gz: 8a13ffe8508ef5a315f5c8cfd721e06501698e767cb7e5f5657fd3f37e1aa974
3
+ metadata.gz: 55234cd5c8312bb328c5548bd848fc063f3c06ae53cf0920c5eae8ca63df2e2c
4
+ data.tar.gz: 12848022bd01b16bc0c4c5d00f8400776282f235c7d7ca27cf78a806cc2943d7
5
5
  SHA512:
6
- metadata.gz: 74d70d78e03676fc10fe43045c895d46e57a750400fc5eb8d27b8ceaf8b0989a1a5345e1c17bbbf84f34ed658347543fe834addb17589762a4a2738fd94e29ca
7
- data.tar.gz: f319c66229aaaaf1655723780949f0123be0860a56ca6e009b348f5f26582242e305cd03b21c46509118dd3e70edf766a49a827c2dd7fcf5db546ddb7c1770d5
6
+ metadata.gz: caab98f20585d7df92baa51d5a150c91280e289943cf2eea9ad7a31718e6d86ac4926273cc11eb3bc52e9b7a1aa789c7022dbd23ff7ebb8ec74e133daa5276cd
7
+ data.tar.gz: cc6866cedf7a79c282df902bac683594f95fab9941d031ee9bf3d3be38e1cea660809fc82a372d3e90fef9864c581c8c7c3e3bcc426c267453115cd05ff9094a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (4.0.0.beta17)
4
+ ui_bibz (4.0.0.beta18)
5
5
  bootstrap (~> 5.3.3)
6
6
  dartsass-rails
7
7
  rails (>= 7.1.0)
@@ -113,10 +113,10 @@ GEM
113
113
  railties (>= 3.0.0)
114
114
  globalid (1.2.1)
115
115
  activesupport (>= 6.1)
116
- google-protobuf (4.30.0-x86_64-darwin)
116
+ google-protobuf (4.30.1-x86_64-darwin)
117
117
  bigdecimal
118
118
  rake (>= 13)
119
- google-protobuf (4.30.0-x86_64-linux)
119
+ google-protobuf (4.30.1-x86_64-linux)
120
120
  bigdecimal
121
121
  rake (>= 13)
122
122
  haml (6.3.0)
@@ -165,9 +165,9 @@ GEM
165
165
  net-smtp (0.5.1)
166
166
  net-protocol
167
167
  nio4r (2.7.4)
168
- nokogiri (1.18.3-x86_64-darwin)
168
+ nokogiri (1.18.4-x86_64-darwin)
169
169
  racc (~> 1.4)
170
- nokogiri (1.18.3-x86_64-linux-gnu)
170
+ nokogiri (1.18.4-x86_64-linux-gnu)
171
171
  racc (~> 1.4)
172
172
  overcommit (0.67.1)
173
173
  childprocess (>= 0.6.3, < 6)
data/lib/ui_bibz/infos.rb CHANGED
@@ -12,6 +12,6 @@ module UiBibz
12
12
  REPO = 'git+https://github.com/thooams/ui_bibz.git'
13
13
  EMAIL = 'thomas@hummel.link'
14
14
  AUTHOR = 'Thooams [Thomas HUMMEL]'
15
- VERSION = '4.0.0.beta17'
15
+ VERSION = '4.0.0.beta18'
16
16
  AUTHORS = ['Thooams'].freeze
17
17
  end
@@ -5,6 +5,7 @@ require 'ui_bibz/ui/ux/tables/components/column'
5
5
  module UiBibz::Ui::Ux::Tables
6
6
  class Store
7
7
  attr_accessor :records
8
+ attr_reader :model
8
9
 
9
10
  # Store Use WillPaginate store methods
10
11
  def initialize(store)
@@ -16,38 +17,16 @@ module UiBibz::Ui::Ux::Tables
16
17
  @model = store.model
17
18
  end
18
19
 
19
- delegate :total_pages, to: :@records
20
-
21
- delegate :per_page, to: :@records
22
-
23
- delegate :total_entries, to: :@records
24
-
25
- delegate :id, to: :@store
26
-
27
- delegate :sort, to: :@store
28
-
29
- delegate :column_id, to: :@store
30
-
31
- delegate :direction, to: :@store
32
-
33
- delegate :searchable_attributes, to: :@store
34
-
35
- delegate :current_page, to: :@records
36
-
37
- delegate :limit_value, to: :@records
20
+ delegate :total_pages, :per_page, :total_entries, :current_page, :limit_value, to: :@records
21
+ delegate :id, :sort, :column_id, :direction, :searchable_attributes,
22
+ :search, :controller, :actions_controller, :action, :param_id, :id_key, to: :@store
38
23
 
39
24
  def columns
40
- @columns ||= Columns.new(model.attribute_names.map { |attribute_name| Column.new(attribute_name, { name: attribute_name.humanize }) })
25
+ @columns ||= Columns.new(model.attribute_names.map do |attribute_name|
26
+ Column.new(attribute_name, { name: attribute_name.humanize })
27
+ end)
41
28
  end
42
29
 
43
- attr_reader :model
44
-
45
- delegate :search, to: :@store
46
-
47
- delegate :controller, to: :@store
48
-
49
- delegate :actions_controller, to: :@store
50
-
51
30
  def params
52
31
  @store.params || {}
53
32
  end
@@ -55,11 +34,5 @@ module UiBibz::Ui::Ux::Tables
55
34
  def parameters
56
35
  @store.params.to_h
57
36
  end
58
-
59
- delegate :action, to: :@store
60
-
61
- delegate :param_id, to: :@store
62
-
63
- delegate :id_key, to: :@store
64
37
  end
65
38
  end
@@ -181,7 +181,7 @@ module UiBibz::Ui::Ux::Tables
181
181
  content = content.strftime(col.date_format) unless col.date_format.nil?
182
182
  content = link_to content, action.inject_url(col.link, record) unless col.link.nil?
183
183
  end
184
- content = col.format.call(@store.records, record) unless col.format.nil?
184
+ content = col.format.call(@store.records, record) unless col.format.nil?
185
185
  content = As.new(col, record, content, @options).render unless col.as.nil?
186
186
  content
187
187
  end
@@ -82,7 +82,7 @@ module UiBibz::Ui::Ux::Tables
82
82
  end
83
83
 
84
84
  def results_count_html
85
- "#{page_entries_info store.records} | ".html_safe
85
+ "#{page_entries_info store.records, model: store.model} | ".html_safe
86
86
  end
87
87
 
88
88
  def from_current_results
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.0.beta17
4
+ version: 4.0.0.beta18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams [Thomas HUMMEL]
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-13 00:00:00.000000000 Z
11
+ date: 2025-03-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap