mensa 0.2.4 → 0.2.6

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.
Files changed (122) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/Dockerfile +6 -2
  3. data/.devcontainer/compose.yaml +1 -1
  4. data/.devcontainer/devcontainer.json +31 -29
  5. data/.devcontainer/postCreate.sh +8 -0
  6. data/.devcontainer/postStart.sh +9 -0
  7. data/.gitignore +3 -1
  8. data/.zed/tasks.json +12 -0
  9. data/CHANGELOG.md +6 -0
  10. data/Gemfile.lock +155 -153
  11. data/Procfile +1 -1
  12. data/README.md +95 -60
  13. data/app/assets/stylesheets/mensa/application.css +14 -11
  14. data/app/components/mensa/add_filter/component.css +110 -5
  15. data/app/components/mensa/add_filter/component.html.slim +10 -12
  16. data/app/components/mensa/add_filter/component.rb +8 -2
  17. data/app/components/mensa/add_filter/component_controller.js +697 -85
  18. data/app/components/mensa/cell/component.css +9 -0
  19. data/app/components/mensa/column_customizer/component.css +40 -0
  20. data/app/components/mensa/column_customizer/component.html.slim +14 -0
  21. data/app/components/mensa/column_customizer/component.rb +13 -0
  22. data/app/components/mensa/column_customizer/component_controller.js +383 -0
  23. data/app/components/mensa/control_bar/component.css +127 -4
  24. data/app/components/mensa/control_bar/component.html.slim +41 -14
  25. data/app/components/mensa/control_bar/component.rb +2 -6
  26. data/app/components/mensa/empty_state/component.css +20 -0
  27. data/app/components/mensa/empty_state/component.html.slim +7 -0
  28. data/app/components/mensa/empty_state/component.rb +18 -0
  29. data/app/components/mensa/filter_pill/component.css +23 -0
  30. data/app/components/mensa/filter_pill/component.html.slim +9 -0
  31. data/app/components/mensa/filter_pill/component.rb +24 -0
  32. data/app/components/mensa/filter_pill/component_controller.js +52 -0
  33. data/app/components/mensa/filter_pill_list/component.css +63 -0
  34. data/app/components/mensa/filter_pill_list/component.html.slim +11 -0
  35. data/app/components/mensa/{filter_list → filter_pill_list}/component.rb +1 -1
  36. data/app/components/mensa/filter_pill_list/component_controller.js +749 -0
  37. data/app/components/mensa/header/component.css +41 -43
  38. data/app/components/mensa/header/component.html.slim +7 -7
  39. data/app/components/mensa/header/component.rb +1 -1
  40. data/app/components/mensa/row_action/component.html.slim +2 -2
  41. data/app/components/mensa/row_action/component.rb +1 -1
  42. data/app/components/mensa/search/component.css +68 -9
  43. data/app/components/mensa/search/component.html.slim +19 -15
  44. data/app/components/mensa/search/component.rb +1 -1
  45. data/app/components/mensa/search/component_controller.js +39 -49
  46. data/app/components/mensa/selection/component_controller.js +147 -0
  47. data/app/components/mensa/table/component.css +28 -0
  48. data/app/components/mensa/table/component.html.slim +9 -6
  49. data/app/components/mensa/table/component.rb +1 -0
  50. data/app/components/mensa/table/component_controller.js +524 -76
  51. data/app/components/mensa/table_row/component.css +6 -0
  52. data/app/components/mensa/table_row/component.html.slim +8 -3
  53. data/app/components/mensa/table_row/component.rb +1 -1
  54. data/app/components/mensa/view/component.css +97 -29
  55. data/app/components/mensa/view/component.html.slim +23 -10
  56. data/app/components/mensa/view/component.rb +5 -0
  57. data/app/components/mensa/views/component.css +106 -13
  58. data/app/components/mensa/views/component.html.slim +51 -17
  59. data/app/components/mensa/views/component_controller.js +245 -20
  60. data/app/controllers/mensa/application_controller.rb +1 -1
  61. data/app/controllers/mensa/tables/batch_actions_controller.rb +24 -0
  62. data/app/controllers/mensa/tables/exports_controller.rb +96 -0
  63. data/app/controllers/mensa/tables/filters_controller.rb +6 -2
  64. data/app/controllers/mensa/tables/views_controller.rb +108 -0
  65. data/app/controllers/mensa/tables_controller.rb +5 -14
  66. data/app/helpers/mensa/application_helper.rb +4 -1
  67. data/app/javascript/mensa/application.js +2 -2
  68. data/app/javascript/mensa/controllers/application_controller.js +5 -21
  69. data/app/javascript/mensa/controllers/index.js +16 -7
  70. data/app/jobs/mensa/export_job.rb +77 -85
  71. data/app/models/mensa/export.rb +93 -0
  72. data/app/tables/mensa/action.rb +3 -1
  73. data/app/tables/mensa/base.rb +103 -17
  74. data/app/tables/mensa/batch_action.rb +27 -0
  75. data/app/tables/mensa/cell.rb +21 -6
  76. data/app/tables/mensa/column.rb +30 -25
  77. data/app/tables/mensa/config/action_dsl.rb +1 -1
  78. data/app/tables/mensa/config/batch_dsl.rb +13 -0
  79. data/app/tables/mensa/config/column_dsl.rb +1 -0
  80. data/app/tables/mensa/config/dsl_logic.rb +8 -4
  81. data/app/tables/mensa/config/filter_dsl.rb +4 -1
  82. data/app/tables/mensa/config/render_dsl.rb +1 -1
  83. data/app/tables/mensa/config/table_dsl.rb +14 -4
  84. data/app/tables/mensa/config/view_dsl.rb +2 -0
  85. data/app/tables/mensa/config_readers.rb +34 -3
  86. data/app/tables/mensa/filter.rb +94 -14
  87. data/app/tables/mensa/row.rb +1 -1
  88. data/app/tables/mensa/scope.rb +25 -13
  89. data/app/views/mensa/exports/_badge.html.slim +5 -0
  90. data/app/views/mensa/exports/_dialog.html.slim +42 -0
  91. data/app/views/mensa/exports/_list.html.slim +29 -0
  92. data/app/views/mensa/tables/filters/show.turbo_stream.slim +34 -6
  93. data/app/views/mensa/tables/show.html.slim +2 -0
  94. data/app/views/mensa/tables/show.turbo_stream.slim +1 -1
  95. data/app/views/mensa/tables/views/create.turbo_stream.slim +11 -0
  96. data/app/views/mensa/tables/views/destroy.turbo_stream.slim +11 -0
  97. data/app/views/mensa/tables/views/update.turbo_stream.slim +11 -0
  98. data/bin/setup +1 -1
  99. data/config/locales/en.yml +45 -1
  100. data/config/locales/nl.yml +46 -1
  101. data/config/routes.rb +7 -0
  102. data/db/migrate/20260604120000_create_mensa_exports.rb +25 -0
  103. data/docs/columns.png +0 -0
  104. data/docs/export.png +0 -0
  105. data/docs/filters.png +0 -0
  106. data/docs/table.png +0 -0
  107. data/lib/generators/mensa/tailwind_config_generator.rb +3 -3
  108. data/lib/generators/mensa/templates/config/initializers/mensa.rb +1 -1
  109. data/lib/mensa/configuration.rb +35 -15
  110. data/lib/mensa/engine.rb +15 -10
  111. data/lib/mensa/version.rb +1 -1
  112. data/lib/mensa.rb +2 -2
  113. data/lib/tasks/mensa_tasks.rake +1 -1
  114. data/mensa.gemspec +3 -2
  115. data/mise.toml +8 -0
  116. data/package-lock.json +0 -7
  117. metadata +60 -15
  118. data/app/components/mensa/filter/component_controller.js +0 -12
  119. data/app/components/mensa/filter_list/component.css +0 -14
  120. data/app/components/mensa/filter_list/component.html.slim +0 -14
  121. data/app/components/mensa/filter_list/component_controller.js +0 -14
  122. /data/{rubocop.yml → .rubocop.yml} +0 -0
@@ -3,9 +3,20 @@
3
3
  module Mensa
4
4
  module Options
5
5
  module ClassMethods
6
- def option(name, default: nil)
7
- attr_accessor(name)
8
- schema[name] = default
6
+ def option(name, default: nil, proc: false)
7
+ attr_writer(name)
8
+ schema[name] = {default: default, proc: proc}
9
+
10
+ if schema[name][:proc]
11
+ define_method(name) do |*params|
12
+ value = instance_variable_get(:"@#{name}")
13
+ instance_exec(*params, &value)
14
+ end
15
+ else
16
+ define_method(name) do
17
+ instance_variable_get(:"@#{name}")
18
+ end
19
+ end
9
20
  end
10
21
 
11
22
  def schema
@@ -14,8 +25,8 @@ module Mensa
14
25
  end
15
26
 
16
27
  def set_defaults!
17
- self.class.schema.each do |name, default|
18
- instance_variable_set("@#{name}", default)
28
+ self.class.schema.each do |name, options|
29
+ instance_variable_set(:"@#{name}", options[:default])
19
30
  end
20
31
  end
21
32
 
@@ -32,16 +43,15 @@ module Mensa
32
43
 
33
44
  # TODO: add all icons below
34
45
  option :icons, default: {
35
- order_indicator_asc: "fa-solid fa-sort-up",
36
- order_indicator_desc: "fa-solid fa-sort-down",
37
- order_indicator: "fa-solid fa-sort",
46
+ order_indicator_asc: "fa-solid fa-arrow-up",
47
+ order_indicator_desc: "fa-solid fa-arrow-down",
38
48
  control_bar_search: "fa-solid fa-magnifying-glass",
39
49
  control_bar_filter: "fa-solid fa-filter",
40
50
  control_bar_edit: "fa-solid fa-table-columns",
41
51
  control_bar_compress: "fa-solid fa-compress",
42
52
  control_bar_export: "fa-solid fa-file-export",
43
53
  search: "fa-solid fa-magnifying-glass",
44
- filters_add_filter: "fa-solid fa-plus",
54
+ filters_add_filter: "fa-solid fa-plus"
45
55
  }
46
56
  # PRO
47
57
  # option :icons, default: {
@@ -57,14 +67,25 @@ module Mensa
57
67
  # }
58
68
 
59
69
  option :callbacks, default: {
60
- # Callback is called when the export is started,
61
- # the return value is passed as context to the export_complete callback
62
- export_started: lambda do |user_id, table_name|
70
+ # Called with the Mensa::Export when the export job starts processing.
71
+ export_started: lambda do |export|
63
72
  end,
64
- export_complete: lambda do |user_id, table_name, context, attachment|
73
+ # Called with the Mensa::Export once the CSV has been generated and
74
+ # attached (export.asset). Use this to e.g. notify or email the user.
75
+ export_complete: lambda do |export|
65
76
  end
66
77
  }
67
78
 
79
+ option :row_actions_position, default: :back
80
+ # It's either :basic or :fuzzy, for fuzzy search you need to have `pg_trgm` extension installed
81
+ option :search, default: -> {
82
+ @_search_cache ||= begin
83
+ (ActiveRecord::Base.connection.execute("SELECT extname FROM pg_extension where extname='pg_trgm';")&.first&.[]("extname") == "pg_trgm") ? :fuzzy : :basic
84
+ rescue
85
+ :basic
86
+ end
87
+ }, proc: true
88
+
68
89
  def initialize
69
90
  set_defaults!
70
91
  end
@@ -81,11 +102,10 @@ module Mensa
81
102
  yield(config)
82
103
  end
83
104
 
84
- alias setup configure
105
+ alias_method :setup, :configure
85
106
 
86
107
  def reset_config!
87
108
  @config = Configuration.new
88
109
  end
89
110
  end
90
-
91
111
  end
data/lib/mensa/engine.rb CHANGED
@@ -1,9 +1,8 @@
1
- require 'pagy'
2
- require 'satis'
3
- require 'textacular'
4
- require 'caxlsx_rails'
5
- require 'slim'
6
- require 'tailwindcss-rails'
1
+ require "pagy"
2
+ require "satis"
3
+ require "textacular"
4
+ require "slim"
5
+ require "tailwindcss-rails"
7
6
  require "importmap-rails"
8
7
  require "turbo-rails"
9
8
  require "stimulus-rails"
@@ -12,24 +11,30 @@ module Mensa
12
11
  class Engine < ::Rails::Engine
13
12
  isolate_namespace Mensa
14
13
 
15
- initializer 'mensa.assets' do |app|
14
+ initializer "mensa.assets" do |app|
16
15
  app.config.assets.paths << root.join("app/javascript")
17
16
  app.config.assets.paths << root.join("app/components")
18
17
  app.config.assets.paths << Mensa::Engine.root.join("vendor/javascript")
19
18
  app.config.assets.precompile += %w[mensa_manifest]
20
19
  end
21
20
 
22
- initializer 'mensa.importmap', before: "importmap" do |app|
21
+ initializer "mensa.importmap", before: "importmap" do |app|
23
22
  app.config.importmap.paths << root.join("config/importmap.rb")
24
23
  app.config.importmap.cache_sweepers << root.join("app/javascript")
25
24
  app.config.importmap.cache_sweepers << root.join("app/components")
26
25
  app.config.importmap.cache_sweepers << Mensa::Engine.root.join("vendor/javascript")
27
26
  end
28
27
 
29
- initializer 'mensa.helper' do
28
+ initializer "mensa.helper" do
30
29
  Rails.application.reloader.to_prepare do
30
+ ActiveSupport.on_load(:action_view) do
31
+ include Mensa::ApplicationHelper
32
+ end
31
33
  ActiveSupport.on_load(:action_controller) do
32
- Satis.add_helper(:table, ::Mensa::Table::Component)
34
+ # Only do this if Satis is defined, this will be deprecated!
35
+ if defined?(Satis)
36
+ Satis.add_helper(:table, ::Mensa::Table::Component)
37
+ end
33
38
  end
34
39
  end
35
40
  end
data/lib/mensa/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Mensa
2
- VERSION = "0.2.4"
2
+ VERSION = "0.2.6"
3
3
  end
data/lib/mensa.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "mensa/version"
2
2
  require "mensa/engine"
3
- require 'mensa/configuration'
3
+ require "mensa/configuration"
4
4
  require "importmap-rails"
5
5
 
6
6
  module Mensa
@@ -16,7 +16,7 @@ module Mensa
16
16
  def class_for_name(name)
17
17
  class_name = "#{name}_table".camelcase
18
18
  unless class_name.safe_constantize
19
- module_class_name = name.to_s.split('_', 2).map(&:camelcase).join('::') + 'Table'
19
+ module_class_name = name.to_s.split("_", 2).map(&:camelcase).join("::") + "Table"
20
20
  class_name = module_class_name if module_class_name.safe_constantize
21
21
  end
22
22
  Kernel.const_get("::#{class_name}")
@@ -10,4 +10,4 @@ end
10
10
  if Rake::Task.task_defined?("tailwindcss:build")
11
11
  Rake::Task["tailwindcss:build"].enhance(["mensa:tailwindcss:config"])
12
12
  Rake::Task["tailwindcss:watch"].enhance(["mensa:tailwindcss:config"])
13
- end
13
+ end
data/mensa.gemspec CHANGED
@@ -23,14 +23,15 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.metadata["homepage_uri"] = spec.homepage
25
25
  spec.metadata["source_code_uri"] = "https://github.com/entdec/mensa"
26
- spec.metadata["changelog_uri"] = "https://github.com/entdec/mensa/CHANGELOG"
26
+ spec.metadata["changelog_uri"] = "https://github.com/entdec/mensa/blob/main/CHANGELOG.md"
27
27
 
28
28
  spec.files = Dir.chdir(File.expand_path("..", __FILE__)) do
29
29
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
30
30
  end
31
31
 
32
- spec.add_dependency "caxlsx_rails", "~> 0"
33
32
  spec.add_dependency "rails", ">= 7.1"
33
+ spec.add_dependency "csv"
34
+ spec.add_dependency "rubyzip", ">= 1.2.2"
34
35
  spec.add_dependency "pagy", ">=43"
35
36
  spec.add_dependency "textacular", ">=5"
36
37
  spec.add_dependency "view_component", "~> 3.11"
data/mise.toml ADDED
@@ -0,0 +1,8 @@
1
+ [tools]
2
+ node = "24"
3
+ ruby = "3.4.7"
4
+
5
+ [env]
6
+ RUBY_VERSION="3.4.7"
7
+ # SELENIUM_URL="http://selenium:4444/"
8
+ SELENIUM_URL="http://host.docker.internal:4444/"
data/package-lock.json CHANGED
@@ -305,7 +305,6 @@
305
305
  "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.15.0.tgz",
306
306
  "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==",
307
307
  "license": "MIT",
308
- "peer": true,
309
308
  "bin": {
310
309
  "acorn": "bin/acorn"
311
310
  },
@@ -1098,7 +1097,6 @@
1098
1097
  "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
1099
1098
  "deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
1100
1099
  "license": "MIT",
1101
- "peer": true,
1102
1100
  "dependencies": {
1103
1101
  "@eslint-community/eslint-utils": "^4.2.0",
1104
1102
  "@eslint-community/regexpp": "^4.6.1",
@@ -1296,7 +1294,6 @@
1296
1294
  "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.32.0.tgz",
1297
1295
  "integrity": "sha512-whOE1HFo/qJDyX4SnXzP4N6zOWn79WhnCUY/iDR0mPfQZO8wcYE4JClzI2oZrhBnnMUCBCHZhO6VQyoBU95mZA==",
1298
1296
  "license": "MIT",
1299
- "peer": true,
1300
1297
  "dependencies": {
1301
1298
  "@rtsao/scc": "^1.1.0",
1302
1299
  "array-includes": "^3.1.9",
@@ -1373,7 +1370,6 @@
1373
1370
  "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-15.7.0.tgz",
1374
1371
  "integrity": "sha512-jDex9s7D/Qial8AGVIHq4W7NswpUD5DPDL2RH8Lzd9EloWUuvUkHfv4FRLMipH5q2UtyurorBkPeNi1wVWNh3Q==",
1375
1372
  "license": "MIT",
1376
- "peer": true,
1377
1373
  "dependencies": {
1378
1374
  "builtins": "^5.0.1",
1379
1375
  "eslint-plugin-es": "^4.1.0",
@@ -1433,7 +1429,6 @@
1433
1429
  "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz",
1434
1430
  "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==",
1435
1431
  "license": "ISC",
1436
- "peer": true,
1437
1432
  "engines": {
1438
1433
  "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
1439
1434
  },
@@ -1449,7 +1444,6 @@
1449
1444
  "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.5.tgz",
1450
1445
  "integrity": "sha512-Qteup0SqU15kdocexFNAJMvCJEfa2xUKNV4CC1xsVMrIIqEy3SQ/rqyxCWNzfrd3/ldy6HMlD2e0JDVpDg2qIA==",
1451
1446
  "license": "MIT",
1452
- "peer": true,
1453
1447
  "dependencies": {
1454
1448
  "array-includes": "^3.1.8",
1455
1449
  "array.prototype.findlast": "^1.2.5",
@@ -3451,7 +3445,6 @@
3451
3445
  }
3452
3446
  ],
3453
3447
  "license": "MIT",
3454
- "peer": true,
3455
3448
  "dependencies": {
3456
3449
  "nanoid": "^3.3.11",
3457
3450
  "picocolors": "^1.1.1",
metadata CHANGED
@@ -1,43 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mensa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.6
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: 2025-11-12 00:00:00.000000000 Z
11
+ date: 2026-06-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: caxlsx_rails
14
+ name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '7.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '7.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: csv
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
18
32
  - !ruby/object:Gem::Version
19
33
  version: '0'
20
34
  type: :runtime
21
35
  prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
- - - "~>"
38
+ - - ">="
25
39
  - !ruby/object:Gem::Version
26
40
  version: '0'
27
41
  - !ruby/object:Gem::Dependency
28
- name: rails
42
+ name: rubyzip
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: '7.1'
47
+ version: 1.2.2
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
- version: '7.1'
54
+ version: 1.2.2
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: pagy
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -175,9 +189,14 @@ files:
175
189
  - ".devcontainer/Dockerfile"
176
190
  - ".devcontainer/compose.yaml"
177
191
  - ".devcontainer/devcontainer.json"
192
+ - ".devcontainer/postCreate.sh"
193
+ - ".devcontainer/postStart.sh"
178
194
  - ".gem_release.yml"
179
195
  - ".github/workflows/gem-push.yml"
180
196
  - ".gitignore"
197
+ - ".rubocop.yml"
198
+ - ".zed/tasks.json"
199
+ - CHANGELOG.md
181
200
  - Gemfile
182
201
  - Gemfile.lock
183
202
  - MIT-LICENSE
@@ -195,14 +214,24 @@ files:
195
214
  - app/components/mensa/cell/component.css
196
215
  - app/components/mensa/cell/component.html.slim
197
216
  - app/components/mensa/cell/component.rb
217
+ - app/components/mensa/column_customizer/component.css
218
+ - app/components/mensa/column_customizer/component.html.slim
219
+ - app/components/mensa/column_customizer/component.rb
220
+ - app/components/mensa/column_customizer/component_controller.js
198
221
  - app/components/mensa/control_bar/component.css
199
222
  - app/components/mensa/control_bar/component.html.slim
200
223
  - app/components/mensa/control_bar/component.rb
201
- - app/components/mensa/filter/component_controller.js
202
- - app/components/mensa/filter_list/component.css
203
- - app/components/mensa/filter_list/component.html.slim
204
- - app/components/mensa/filter_list/component.rb
205
- - app/components/mensa/filter_list/component_controller.js
224
+ - app/components/mensa/empty_state/component.css
225
+ - app/components/mensa/empty_state/component.html.slim
226
+ - app/components/mensa/empty_state/component.rb
227
+ - app/components/mensa/filter_pill/component.css
228
+ - app/components/mensa/filter_pill/component.html.slim
229
+ - app/components/mensa/filter_pill/component.rb
230
+ - app/components/mensa/filter_pill/component_controller.js
231
+ - app/components/mensa/filter_pill_list/component.css
232
+ - app/components/mensa/filter_pill_list/component.html.slim
233
+ - app/components/mensa/filter_pill_list/component.rb
234
+ - app/components/mensa/filter_pill_list/component_controller.js
206
235
  - app/components/mensa/header/component.css
207
236
  - app/components/mensa/header/component.html.slim
208
237
  - app/components/mensa/header/component.rb
@@ -213,6 +242,7 @@ files:
213
242
  - app/components/mensa/search/component.html.slim
214
243
  - app/components/mensa/search/component.rb
215
244
  - app/components/mensa/search/component_controller.js
245
+ - app/components/mensa/selection/component_controller.js
216
246
  - app/components/mensa/table/component.css
217
247
  - app/components/mensa/table/component.html.slim
218
248
  - app/components/mensa/table/component.rb
@@ -230,7 +260,10 @@ files:
230
260
  - app/components/mensa/views/component_controller.js
231
261
  - app/controllers/concerns/.keep
232
262
  - app/controllers/mensa/application_controller.rb
263
+ - app/controllers/mensa/tables/batch_actions_controller.rb
264
+ - app/controllers/mensa/tables/exports_controller.rb
233
265
  - app/controllers/mensa/tables/filters_controller.rb
266
+ - app/controllers/mensa/tables/views_controller.rb
234
267
  - app/controllers/mensa/tables_controller.rb
235
268
  - app/helpers/mensa/application_helper.rb
236
269
  - app/helpers/mensa/tables_helper.rb
@@ -243,12 +276,15 @@ files:
243
276
  - app/jobs/mensa/export_job.rb
244
277
  - app/models/concerns/.keep
245
278
  - app/models/mensa/application_record.rb
279
+ - app/models/mensa/export.rb
246
280
  - app/models/mensa/table_view.rb
247
281
  - app/tables/mensa/action.rb
248
282
  - app/tables/mensa/base.rb
283
+ - app/tables/mensa/batch_action.rb
249
284
  - app/tables/mensa/cell.rb
250
285
  - app/tables/mensa/column.rb
251
286
  - app/tables/mensa/config/action_dsl.rb
287
+ - app/tables/mensa/config/batch_dsl.rb
252
288
  - app/tables/mensa/config/column_dsl.rb
253
289
  - app/tables/mensa/config/dsl_logic.rb
254
290
  - app/tables/mensa/config/filter_dsl.rb
@@ -260,9 +296,15 @@ files:
260
296
  - app/tables/mensa/row.rb
261
297
  - app/tables/mensa/scope.rb
262
298
  - app/tables/mensa/system_view.rb
299
+ - app/views/mensa/exports/_badge.html.slim
300
+ - app/views/mensa/exports/_dialog.html.slim
301
+ - app/views/mensa/exports/_list.html.slim
263
302
  - app/views/mensa/tables/filters/show.turbo_stream.slim
264
303
  - app/views/mensa/tables/show.html.slim
265
304
  - app/views/mensa/tables/show.turbo_stream.slim
305
+ - app/views/mensa/tables/views/create.turbo_stream.slim
306
+ - app/views/mensa/tables/views/destroy.turbo_stream.slim
307
+ - app/views/mensa/tables/views/update.turbo_stream.slim
266
308
  - bin/importmap
267
309
  - bin/overmind
268
310
  - bin/rails
@@ -273,6 +315,9 @@ files:
273
315
  - config/routes.rb
274
316
  - db/migrate/20240201184752_create_mensa_table_views.rb
275
317
  - db/migrate/20251112143558_add_description_to_table_view.rb
318
+ - db/migrate/20260604120000_create_mensa_exports.rb
319
+ - docs/columns.png
320
+ - docs/export.png
276
321
  - docs/filters.png
277
322
  - docs/table.png
278
323
  - lib/generators/mensa/install_generator.rb
@@ -284,9 +329,9 @@ files:
284
329
  - lib/mensa/version.rb
285
330
  - lib/tasks/mensa_tasks.rake
286
331
  - mensa.gemspec
332
+ - mise.toml
287
333
  - package-lock.json
288
334
  - package.json
289
- - rubocop.yml
290
335
  - vendor/javascript/@rails--request.js.js
291
336
  homepage: https://github.com/entdec/mensa
292
337
  licenses:
@@ -294,7 +339,7 @@ licenses:
294
339
  metadata:
295
340
  homepage_uri: https://github.com/entdec/mensa
296
341
  source_code_uri: https://github.com/entdec/mensa
297
- changelog_uri: https://github.com/entdec/mensa/CHANGELOG
342
+ changelog_uri: https://github.com/entdec/mensa/blob/main/CHANGELOG.md
298
343
  post_install_message: |
299
344
  Mensa requires additional setup. Please run the following
300
345
  command to install the necessary files:
@@ -1,12 +0,0 @@
1
- import ApplicationController from 'mensa/controllers/application_controller'
2
-
3
- export default class FilterComponentController extends ApplicationController {
4
- static values = {
5
- columnName: String,
6
- operator: String,
7
- value: String,
8
- };
9
-
10
- connect() {
11
- }
12
- }
@@ -1,14 +0,0 @@
1
- .mensa-table {
2
- &__filters {
3
- @apply p-2 shadow-lg border-b dark:bg-gray-700 dark:border-gray-600;
4
-
5
- a.filter {
6
- @apply bg-gray-200 dark:bg-gray-500 hover:bg-gray-400 text-gray-800 rounded-md px-3 py-1.5 text-sm;
7
- }
8
-
9
- a.filter.selected {
10
- @apply bg-gray-100 text-gray-600 dark:text-gray-400 hover:text-gray-800 hover:bg-gray-200;
11
- }
12
-
13
- }
14
- }
@@ -1,14 +0,0 @@
1
- .mensa-table__filters.hidden data-mensa-table-target="filterList"
2
- .block
3
- nav
4
- .flex.space-x-2.overflow-none.whitespace-nowrap.scroll-p-0[aria-label="Tabs"]
5
- / existing filters first
6
- - table.active_filters.each do |filter|
7
- .relative data-controller="mensa-filter" data-mensa-filter-column-name-value=filter.column.name data-mensa-filter-value-value=filter.value data-mensa-filter-operator-value=filter.operator
8
- button.relative.w-full.cursor-default.rounded-md.bg-white.dark:bg-gray-800.py-1.5.pl-3.text-left.text-gray-900.dark:text-gray-400.shadow-sm.ring-1.ring-inset.ring-gray-300.dark:ring-gray-600.focus:outline-none.focus:ring-2.focus:ring-primary-600.sm:text-sm.sm:leading-6[type="button" aria-haspopup="listbox" aria-expanded="true" aria-labelledby="listbox-label"]
9
- span.block.truncate.pr-6
10
- = filter
11
- span.pointer-events-none.absolute.inset-y-0.right-0.flex.items-center.pr-2
12
- .fa.fal.fa-angle-down
13
-
14
- = render Mensa::AddFilter::Component.new(table: table)
@@ -1,14 +0,0 @@
1
- import ApplicationController from 'mensa/controllers/application_controller'
2
-
3
- export default class FilterListComponentController extends ApplicationController {
4
- static targets = [
5
- 'list',
6
- ]
7
- static values = {
8
- supportsViews: Boolean
9
- }
10
-
11
- connect() {
12
- super.connect()
13
- }
14
- }
File without changes