gloo 3.10.1 → 3.11.0

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: ff9890a2e53190076ecfa0fc7116612280f794b0a638c1446bddd73b841f707a
4
- data.tar.gz: 9ed2be8e8f613abfa2123135bb31b1882cacd5a60339d005546bed1dd0129ec9
3
+ metadata.gz: 1cda013b56c2461ca6215fd49ba94a30fae35dd356c470a6b4e8a3e5f8783ce8
4
+ data.tar.gz: c2531fc5cfbc93e1c9b6bab60e39cce92bcc09c6408a9eb59abceb6eaf4a693d
5
5
  SHA512:
6
- metadata.gz: 7171f61e6a519150b22edc3ef4fd0a1c569a70c4aa561dff52f54b3259f90036bf8b6f5f58b4751693e73c72c49da2f3862246dcef1249bfa129b0bdb7fde08f
7
- data.tar.gz: 6452827017abc68acb8318dcf783c1210bae5096ec65650b7068248bc758c086b75426e3f26fee35eb278189a62d25b5a7261faabdca9606bace5f26223ba713
6
+ metadata.gz: 622a50944de102154e63d5cd699f6325f1d0ba5f172353d1692c0e8cb1e1f02a871cb860cabc2c2ca043f6e0c971876a46c263f0785c28dffb2270ae665957b5
7
+ data.tar.gz: d7fe6d117211d1d143a7a85620f834e434250fde09120c41feea5f65ee9e04fc6e35f19c1e75e36f8f894689c4c7520ec80e335cd3be0f6183e1960a2b242594
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.10.1
1
+ 3.11.0
data/lib/VERSION_NOTES CHANGED
@@ -1,3 +1,9 @@
1
+ 3.11.0 - 2025.04.07
2
+ - Fixes issue with alias in Query results
3
+ - Adds option for table rendering to always show as rows
4
+
5
+
6
+
1
7
  3.10.1 - 2025.03.11
2
8
  Fix issue with Date parsing.
3
9
 
@@ -259,6 +259,7 @@ module Gloo
259
259
  #
260
260
  def clear_values
261
261
  get_result_can.children.each do |c|
262
+ c = Gloo::Objs::Alias.resolve_alias( @engine, c )
262
263
  c.value = nil
263
264
  end
264
265
  end
@@ -114,6 +114,7 @@ module Gloo
114
114
  row = @data[0]
115
115
  @heads.each_with_index do |h, i|
116
116
  child = @result_can.find_child h
117
+ child = Gloo::Objs::Alias.resolve_alias( @engine, child )
117
118
  child.set_value row[i] if child
118
119
  end
119
120
  end
@@ -15,6 +15,7 @@ module Gloo
15
15
  DATA = 'data'.freeze
16
16
  CELLS = 'cells'.freeze
17
17
  STYLES = 'styles'.freeze
18
+ ALWAYS_ROWS = 'always_rows'.freeze
18
19
 
19
20
  #
20
21
  # The name of the object type.
@@ -41,6 +42,16 @@ module Gloo
41
42
  return o.children.map( &:value )
42
43
  end
43
44
 
45
+ #
46
+ # Always show rows, even if only 1 row is found.
47
+ #
48
+ def always_rows
49
+ o = find_child ALWAYS_ROWS
50
+
51
+ return false unless o
52
+ return o.value
53
+ end
54
+
44
55
  #
45
56
  # Get the list of column names.
46
57
  # Returns nil if there is none.
@@ -193,6 +204,10 @@ module Gloo
193
204
  cell_renderers: self.cell_renderers
194
205
  }
195
206
 
207
+ if self.always_rows
208
+ params[ :always_rows ] = true
209
+ end
210
+
196
211
  helper = Gloo::WebSvr::TableRenderer.new( @engine )
197
212
  return helper.data_to_table params
198
213
  rescue => e
@@ -44,10 +44,13 @@ module Gloo
44
44
  #
45
45
  def data_to_table params
46
46
  data = params[ :rows ]
47
+
48
+ single_row = true if ( data.length == 1 )
49
+ single_row = false if params[ :always_rows ]
47
50
 
48
51
  if data.nil? || ( data.length == 0 )
49
52
  return "<p>No data found.</p>"
50
- elsif data.length == 1
53
+ elsif single_row
51
54
  return data_to_single_row_table( params )
52
55
  else
53
56
  return data_to_table_rows( params )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gloo
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.10.1
4
+ version: 3.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Crane
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2025-03-11 00:00:00.000000000 Z
11
+ date: 2025-04-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler