mensa 0.4.0 → 0.6.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 +4 -4
- data/.zed/tasks.json +1 -1
- data/Gemfile +1 -0
- data/Gemfile.lock +12 -8
- data/README.md +30 -15
- data/app/components/mensa/add_filter/component.css +5 -3
- data/app/components/mensa/add_filter/component.html.erb +3 -3
- data/app/components/mensa/add_filter/component_controller.js +1 -0
- data/app/components/mensa/column_customizer/component.css +4 -4
- data/app/components/mensa/column_customizer/component.html.erb +4 -4
- data/app/components/mensa/column_customizer/component_controller.js +1 -1
- data/app/components/mensa/control_bar/component.css +23 -3
- data/app/components/mensa/control_bar/component.html.erb +13 -12
- data/app/components/mensa/empty_state/component.html.erb +1 -1
- data/app/components/mensa/empty_state/component.rb +1 -1
- data/app/components/mensa/filter_pill/component.html.erb +2 -2
- data/app/components/mensa/filter_pill_list/component.html.erb +2 -2
- data/app/components/mensa/header/component.html.erb +1 -1
- data/app/components/mensa/table/component.html.erb +8 -4
- data/app/components/mensa/table/component.rb +3 -3
- data/app/components/mensa/table/component_controller.js +104 -30
- data/app/components/mensa/view/component.html.erb +1 -1
- data/app/components/mensa/view/component.rb +1 -1
- data/app/components/mensa/views/component.html.erb +8 -8
- data/app/controllers/mensa/tables/exports_controller.rb +25 -5
- data/app/controllers/mensa/tables_controller.rb +8 -10
- data/app/helpers/mensa/application_helper.rb +2 -2
- data/app/jobs/mensa/export_job.rb +4 -0
- data/app/jobs/mensa/recurring_exports_job.rb +17 -0
- data/app/models/mensa/export.rb +54 -2
- data/app/tables/mensa/base.rb +55 -13
- data/app/tables/mensa/cell.rb +8 -4
- data/app/tables/mensa/column.rb +5 -0
- data/app/tables/mensa/config/column_dsl.rb +1 -0
- data/app/tables/mensa/config/dsl_logic.rb +19 -1
- data/app/tables/mensa/config/format_dsl.rb +7 -0
- data/app/tables/mensa/config/table_dsl.rb +2 -5
- data/app/tables/mensa/filter.rb +24 -1
- data/app/tables/mensa/format.rb +23 -0
- data/app/tables/mensa/scope.rb +5 -3
- data/app/views/mensa/exports/_dialog.html.erb +25 -2
- data/app/views/mensa/exports/_list.html.erb +15 -2
- data/app/views/mensa/tables/filters/show.turbo_stream.erb +4 -1
- data/app/views/mensa/tables/views/destroy.turbo_stream.erb +5 -1
- data/config/locales/en.yml +25 -0
- data/config/locales/nl.yml +24 -0
- data/config/routes.rb +1 -1
- data/db/migrate/20260612110000_add_repeat_to_mensa_exports.rb +8 -0
- data/lib/generators/mensa/templates/config/initializers/mensa.rb +29 -8
- data/lib/mensa/configuration.rb +64 -17
- data/lib/mensa/version.rb +1 -1
- data/lib/tasks/mensa_tasks.rake +7 -0
- metadata +6 -2
data/lib/mensa/configuration.rb
CHANGED
|
@@ -41,29 +41,70 @@ module Mensa
|
|
|
41
41
|
option :logger, default: Rails.logger
|
|
42
42
|
option :base_controller, default: "::ApplicationController"
|
|
43
43
|
|
|
44
|
-
# TODO: add all icons below
|
|
45
44
|
option :icons, default: {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
45
|
+
add_filter_trigger: "fa-solid fa-circle-plus",
|
|
46
|
+
add_filter_selected: "fa-solid fa-check",
|
|
47
|
+
column_customizer_toggle: "fa-solid fa-table-columns",
|
|
48
|
+
column_customizer_handle: "fa-solid fa-grip-vertical",
|
|
49
|
+
column_customizer_visibility_on: "fa-solid fa-eye",
|
|
50
|
+
column_customizer_visibility_off: "fa-solid fa-eye-slash",
|
|
51
|
+
control_bar_reset: "fa-solid fa-rotate-left",
|
|
52
|
+
control_bar_save_dropdown: "fa-solid fa-chevron-down",
|
|
53
|
+
control_bar_view_filters_show: "fa-solid fa-eye",
|
|
54
|
+
control_bar_view_filters_hide: "fa-solid fa-eye-slash",
|
|
52
55
|
control_bar_export: "fa-solid fa-file-export",
|
|
53
|
-
|
|
54
|
-
|
|
56
|
+
empty_state_icon: "fa-solid fa-magnifying-glass",
|
|
57
|
+
filter_pill_remove: "fa-solid fa-xmark",
|
|
58
|
+
filter_pill_list_search: "fa-solid fa-magnifying-glass",
|
|
59
|
+
filter_pill_list_clear: "fa-solid fa-xmark",
|
|
60
|
+
header_order_indicator_asc: "fa-solid fa-arrow-up",
|
|
61
|
+
header_order_indicator_desc: "fa-solid fa-arrow-down",
|
|
62
|
+
views_trigger: "fa-solid fa-sort",
|
|
63
|
+
views_option_selected: "fa-solid fa-check",
|
|
64
|
+
views_option_menu: "fa-solid fa-ellipsis",
|
|
65
|
+
views_option_system: "fa-solid fa-ban",
|
|
66
|
+
views_rename: "fa-solid fa-pencil",
|
|
67
|
+
views_duplicate: "fa-solid fa-copy",
|
|
68
|
+
views_delete: "fa-solid fa-trash",
|
|
69
|
+
exports_dialog_close: "fa-solid fa-xmark",
|
|
70
|
+
exports_dialog_submit: "fa-solid fa-file-export",
|
|
71
|
+
exports_list_delete: "fa-solid fa-trash",
|
|
72
|
+
exports_list_download: "fa-solid fa-download",
|
|
73
|
+
exports_list_processing: "fa-solid fa-spinner fa-spin",
|
|
74
|
+
tables_standard_error: "fa-solid fa-circle-exclamation"
|
|
55
75
|
}
|
|
56
76
|
# PRO
|
|
57
77
|
# option :icons, default: {
|
|
58
|
-
#
|
|
59
|
-
#
|
|
60
|
-
#
|
|
61
|
-
#
|
|
62
|
-
#
|
|
63
|
-
#
|
|
64
|
-
#
|
|
78
|
+
# add_filter_trigger: "fa-light fa-circle-plus",
|
|
79
|
+
# add_filter_selected: "fa-light fa-check",
|
|
80
|
+
# column_customizer_toggle: "fa-light fa-columns-3",
|
|
81
|
+
# column_customizer_handle: "fa-light fa-grip-vertical",
|
|
82
|
+
# column_customizer_visibility_on: "fa-light fa-eye",
|
|
83
|
+
# column_customizer_visibility_off: "fa-light fa-eye-slash",
|
|
84
|
+
# control_bar_reset: "fa-light fa-rotate-left",
|
|
85
|
+
# control_bar_save_dropdown: "fa-light fa-chevron-down",
|
|
86
|
+
# control_bar_view_filters_show: "fa-light fa-eye",
|
|
87
|
+
# control_bar_view_filters_hide: "fa-light fa-eye-slash",
|
|
65
88
|
# control_bar_export: "fa-light fa-file-export",
|
|
66
|
-
#
|
|
89
|
+
# empty_state_icon: "fa-light fa-magnifying-glass",
|
|
90
|
+
# filter_pill_remove: "fa-light fa-xmark",
|
|
91
|
+
# filter_pill_list_search: "fa-light fa-magnifying-glass",
|
|
92
|
+
# filter_pill_list_clear: "fa-light fa-xmark",
|
|
93
|
+
# header_order_indicator_asc: "fa-regular fa-arrow-up-short-wide",
|
|
94
|
+
# header_order_indicator_desc: "fa-regular fa-arrow-down-wide-short",
|
|
95
|
+
# views_trigger: "fa-light fa-sort",
|
|
96
|
+
# views_option_selected: "fa-light fa-check",
|
|
97
|
+
# views_option_menu: "fa-light fa-ellipsis",
|
|
98
|
+
# views_option_system: "fa-light fa-ban",
|
|
99
|
+
# views_rename: "fa-light fa-pencil",
|
|
100
|
+
# views_duplicate: "fa-light fa-copy",
|
|
101
|
+
# views_delete: "fa-light fa-trash",
|
|
102
|
+
# exports_dialog_close: "fa-light fa-xmark",
|
|
103
|
+
# exports_dialog_submit: "fa-light fa-file-export",
|
|
104
|
+
# exports_list_delete: "fa-light fa-trash",
|
|
105
|
+
# exports_list_download: "fa-light fa-download",
|
|
106
|
+
# exports_list_processing: "fa-light fa-spinner fa-spin",
|
|
107
|
+
# tables_standard_error: "fa-light fa-circle-exclamation"
|
|
67
108
|
# }
|
|
68
109
|
|
|
69
110
|
option :callbacks, default: {
|
|
@@ -72,10 +113,16 @@ module Mensa
|
|
|
72
113
|
end,
|
|
73
114
|
# Called with the Mensa::Export once the CSV has been generated and
|
|
74
115
|
# attached (export.asset). Use this to e.g. notify or email the user.
|
|
116
|
+
#
|
|
117
|
+
# UserMailer.with(
|
|
118
|
+
# user: User.find(export.user_id),
|
|
119
|
+
# export: export,
|
|
120
|
+
# ).export_email.deliver_later
|
|
75
121
|
export_complete: lambda do |export|
|
|
76
122
|
end
|
|
77
123
|
}
|
|
78
124
|
|
|
125
|
+
# :front or :back (default)
|
|
79
126
|
option :row_actions_position, default: :back
|
|
80
127
|
# It's either :basic or :fuzzy, for fuzzy search you need to have `pg_trgm` extension installed
|
|
81
128
|
option :search, default: :basic
|
data/lib/mensa/version.rb
CHANGED
data/lib/tasks/mensa_tasks.rake
CHANGED
|
@@ -5,6 +5,13 @@ namespace :mensa do
|
|
|
5
5
|
Rails::Generators.invoke("mensa:tailwind_config", ["--force"])
|
|
6
6
|
end
|
|
7
7
|
end
|
|
8
|
+
|
|
9
|
+
namespace :exports do
|
|
10
|
+
desc "Run recurring exports that are due"
|
|
11
|
+
task recurring: :environment do
|
|
12
|
+
Mensa::RecurringExportsJob.perform_now
|
|
13
|
+
end
|
|
14
|
+
end
|
|
8
15
|
end
|
|
9
16
|
|
|
10
17
|
if Rake::Task.task_defined?("tailwindcss:build")
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: mensa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tom de Grunt
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -247,6 +247,7 @@ files:
|
|
|
247
247
|
- app/javascript/mensa/controllers/link_controller.js
|
|
248
248
|
- app/jobs/mensa/application_job.rb
|
|
249
249
|
- app/jobs/mensa/export_job.rb
|
|
250
|
+
- app/jobs/mensa/recurring_exports_job.rb
|
|
250
251
|
- app/models/concerns/.keep
|
|
251
252
|
- app/models/mensa/application_record.rb
|
|
252
253
|
- app/models/mensa/export.rb
|
|
@@ -261,11 +262,13 @@ files:
|
|
|
261
262
|
- app/tables/mensa/config/column_dsl.rb
|
|
262
263
|
- app/tables/mensa/config/dsl_logic.rb
|
|
263
264
|
- app/tables/mensa/config/filter_dsl.rb
|
|
265
|
+
- app/tables/mensa/config/format_dsl.rb
|
|
264
266
|
- app/tables/mensa/config/render_dsl.rb
|
|
265
267
|
- app/tables/mensa/config/table_dsl.rb
|
|
266
268
|
- app/tables/mensa/config/view_dsl.rb
|
|
267
269
|
- app/tables/mensa/config_readers.rb
|
|
268
270
|
- app/tables/mensa/filter.rb
|
|
271
|
+
- app/tables/mensa/format.rb
|
|
269
272
|
- app/tables/mensa/row.rb
|
|
270
273
|
- app/tables/mensa/scope.rb
|
|
271
274
|
- app/tables/mensa/search.rb
|
|
@@ -290,6 +293,7 @@ files:
|
|
|
290
293
|
- db/migrate/20240201184752_create_mensa_table_views.rb
|
|
291
294
|
- db/migrate/20251112143558_add_description_to_table_view.rb
|
|
292
295
|
- db/migrate/20260604120000_create_mensa_exports.rb
|
|
296
|
+
- db/migrate/20260612110000_add_repeat_to_mensa_exports.rb
|
|
293
297
|
- docs/columns.png
|
|
294
298
|
- docs/export.png
|
|
295
299
|
- docs/filters.png
|