active_scaffold_export 3.9.0 → 3.9.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc3eab7a75cf8bde5eb73a0e75b9c816979e98bcaf419211b3553e0de987a457
4
- data.tar.gz: 5d3a66a5a93877e0d09624a810a6c5a6673ad916893a18325af400728264ef5c
3
+ metadata.gz: d4efa340b028988b72b01057c337971ffa7afb17c6f84865992f9fc7f1be99a0
4
+ data.tar.gz: 2bd4bd6c5c5339cd8579127e9bbd39707adff96132ad61a4baf3ddba9f03745a
5
5
  SHA512:
6
- metadata.gz: 0de3ee638257fe07636eb4ca850ab50ea30d4467ed628d32909462a22090204ff79f20ca9a33bdb30722542a6c42d269b3668f89b39619e411c9eaeb6c556719
7
- data.tar.gz: ea937a583476059aa3577ae4c7f91cdbbf255f9561245629fa26578d0622d27af54b9315c97f69db4a8f87acd3b56002bef1c8cbda0cb168d236ce37276c2ab9
6
+ metadata.gz: 8f2b3155b131b1affb596f9002abc30252857a6ebc1454c73fcf8bf09ba330e246f6f158adb9357a9ec398bfd55d03489f8b2f990fa4b1e6b941404b4e1f854b
7
+ data.tar.gz: 644222fc4d6930a4d8f48f9b06365cc2be3098948e377335cc4b6ee3081208e9d94081220ba7ed3d15ac2c6d633f3313e3f3c4b5dbe86f3b7515510bf61bc00c
@@ -95,7 +95,7 @@ module ActiveScaffold::Config
95
95
  end
96
96
 
97
97
  def default_deselected_columns
98
- self.default_deselected_columns = ActiveScaffold::DataStructures::Set.new if @default_deselected_columns.nil?
98
+ @default_deselected_columns ||= ActiveScaffold::DataStructures::Set.new unless frozen?
99
99
  @default_deselected_columns
100
100
  end
101
101
 
@@ -104,5 +104,21 @@ module ActiveScaffold::Config
104
104
  def multipart?
105
105
  false
106
106
  end
107
+
108
+ UserSettings.class_eval do
109
+ user_attr :show_form, :allow_full_download, :force_quotes, :default_file_format,
110
+ :default_delimiter, :default_skip_header, :default_file_format
111
+
112
+ def default_deselected_columns=(val)
113
+ @default_deselected_columns = ActiveScaffold::DataStructures::Set.new(*val)
114
+ end
115
+
116
+ def default_deselected_columns
117
+ if @default_deselected_columns.nil? && @conf.default_deselected_columns
118
+ return @conf.default_deselected_columns
119
+ end
120
+ @default_deselected_columns ||= ActiveScaffold::DataStructures::Set.new
121
+ end
122
+ end
107
123
  end
108
124
  end
@@ -12,10 +12,10 @@ module ActiveScaffold
12
12
  def get_export_column_value(record, column, format)
13
13
  if (method = export_column_override(column))
14
14
  value, options = send(method, record, format)
15
- [value, options || column.export_options&.dig(format)]
15
+ [value, options || export_column_style(column, format)]
16
16
  elsif column.list_ui && (method = override_export_ui(column.list_ui))
17
17
  value, options = send(method, record, column, format, ui_options: column.list_ui_options || column.options)
18
- [value, options || column.export_options&.dig(format)]
18
+ [value, options || export_column_style(column, format)]
19
19
  else
20
20
  raw_value = record.send(column.name)
21
21
 
@@ -29,10 +29,15 @@ module ActiveScaffold
29
29
  format_singular_association_export_column(raw_value, format)
30
30
  end
31
31
  end
32
- [value, column.export_options&.dig(format)]
32
+ [value, export_column_style(column, format)]
33
33
  end
34
34
  end
35
35
 
36
+ def export_column_style(column, format)
37
+ style = column.export_options&.dig(format)
38
+ format = :xlsx && style.frozen? ? style.deep_dup : style
39
+ end
40
+
36
41
  def export_column_override(column)
37
42
  override_helper column, 'export_column'
38
43
  end
@@ -2,7 +2,7 @@ module ActiveScaffoldExport
2
2
  module Version
3
3
  MAJOR = 3
4
4
  MINOR = 9
5
- PATCH = 0
5
+ PATCH = 2
6
6
 
7
7
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_scaffold_export
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.9.0
4
+ version: 3.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Volker Hochstein
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2024-12-04 00:00:00.000000000 Z
13
+ date: 2025-02-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: active_scaffold