mensa 0.2.2 → 0.2.3

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.
data/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@entdec/mensa",
3
3
  "dependencies": {
4
- "postcss-advanced-variables": "^3.0.1",
5
- "postcss-comment": "^2.0.0",
4
+ "postcss-advanced-variables": "^4.0.0",
6
5
  "postcss-import": "^16.0.1",
7
6
  "postcss-mixins": "^9.0.4",
7
+ "standard": "^17.1.2",
8
8
  "tailwindcss": "^3.4.1"
9
9
  }
10
10
  }
data/rubocop.yml ADDED
@@ -0,0 +1,94 @@
1
+ # https://www.fastruby.io/blog/ruby/code-quality/how-we-use-rubocop-and-standardrb.html
2
+
3
+ require:
4
+ - standard
5
+
6
+ plugins:
7
+ - rubocop-rails
8
+
9
+ inherit_gem:
10
+ standard: config/base.yml
11
+
12
+ AllCops:
13
+ NewCops: enable
14
+ Exclude:
15
+ - node_modules/**/*
16
+ - public/**/*
17
+ - vendor/**/*
18
+
19
+ Rails:
20
+ Enabled: true # enable rubocop-rails cops
21
+
22
+ # https://gorails.com/episodes/organizing-rails-model-files
23
+ Layout/ClassStructure:
24
+ Enabled: true
25
+ AutoCorrect: true
26
+ Categories:
27
+ module_inclusion:
28
+ - include
29
+ - prepend
30
+ - extend
31
+ attributes:
32
+ - attribute
33
+ - attr_reader
34
+ - attr_writer
35
+ - attr_accessor
36
+ - alias_attribute
37
+ - delegate
38
+ - enum
39
+ associations:
40
+ - belongs_to
41
+ - has_one
42
+ - has_many
43
+ - has_and_belongs_to_many
44
+ validations:
45
+ - validates
46
+ - validate
47
+ - validates_with
48
+ callbacks:
49
+ - before_validation
50
+ - before_save
51
+ - before_create
52
+ - before_destroy
53
+ - after_initialize
54
+ - after_create
55
+ - after_save
56
+ - after_destroy
57
+ - after_commit
58
+ - after_create_commit
59
+ - after_update_commit
60
+ - after_destroy_commit
61
+ - around_create
62
+ other_macros:
63
+ - acts_as_paranoid
64
+ - audited
65
+ - devise
66
+ - has_paper_trail
67
+ - serialize
68
+ scopes:
69
+ - default_scope
70
+ - scope
71
+ controller_actions:
72
+ - before_action
73
+ - skip_before_action
74
+ controller_rescue:
75
+ - rescue_from
76
+ ExpectedOrder:
77
+ - module_inclusion
78
+ - constants
79
+ - attributes
80
+ - enums
81
+ - associations
82
+ - validations
83
+ - callbacks
84
+ - other_macros
85
+ - scopes
86
+ - controller_macros
87
+ - controller_actions
88
+ - controller_action_caching
89
+ - controller_rescue
90
+ - class_methods
91
+ - initializer
92
+ - public_methods
93
+ - protected_methods
94
+ - private_methods
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.2.2
4
+ version: 0.2.3
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-10 00:00:00.000000000 Z
11
+ date: 2025-11-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: caxlsx_rails
@@ -66,6 +66,20 @@ dependencies:
66
66
  - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '5'
69
+ - !ruby/object:Gem::Dependency
70
+ name: view_component
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '3.11'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '3.11'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: slim
71
85
  requirement: !ruby/object:Gem::Requirement
@@ -213,6 +227,7 @@ files:
213
227
  - app/components/mensa/views/component.css
214
228
  - app/components/mensa/views/component.html.slim
215
229
  - app/components/mensa/views/component.rb
230
+ - app/components/mensa/views/component_controller.js
216
231
  - app/controllers/concerns/.keep
217
232
  - app/controllers/mensa/application_controller.rb
218
233
  - app/controllers/mensa/tables/filters_controller.rb
@@ -239,15 +254,17 @@ files:
239
254
  - app/tables/mensa/config/filter_dsl.rb
240
255
  - app/tables/mensa/config/render_dsl.rb
241
256
  - app/tables/mensa/config/table_dsl.rb
257
+ - app/tables/mensa/config/view_dsl.rb
242
258
  - app/tables/mensa/config_readers.rb
243
259
  - app/tables/mensa/filter.rb
244
260
  - app/tables/mensa/row.rb
245
261
  - app/tables/mensa/scope.rb
262
+ - app/tables/mensa/system_view.rb
246
263
  - app/views/mensa/tables/filters/show.turbo_stream.slim
247
- - app/views/mensa/tables/index.html.slim
248
264
  - app/views/mensa/tables/show.html.slim
249
265
  - app/views/mensa/tables/show.turbo_stream.slim
250
266
  - bin/importmap
267
+ - bin/overmind
251
268
  - bin/rails
252
269
  - bin/setup
253
270
  - config/importmap.rb
@@ -255,6 +272,8 @@ files:
255
272
  - config/locales/nl.yml
256
273
  - config/routes.rb
257
274
  - db/migrate/20240201184752_create_mensa_table_views.rb
275
+ - docs/filters.png
276
+ - docs/table.png
258
277
  - lib/generators/mensa/install_generator.rb
259
278
  - lib/generators/mensa/tailwind_config_generator.rb
260
279
  - lib/generators/mensa/templates/config/initializers/mensa.rb
@@ -264,9 +283,10 @@ files:
264
283
  - lib/mensa/version.rb
265
284
  - lib/tasks/mensa_tasks.rake
266
285
  - mensa.gemspec
286
+ - package-lock.json
267
287
  - package.json
288
+ - rubocop.yml
268
289
  - vendor/javascript/@rails--request.js.js
269
- - yarn.lock
270
290
  homepage: https://github.com/entdec/mensa
271
291
  licenses:
272
292
  - MIT
@@ -1,93 +0,0 @@
1
- button data-controller="alert" data-action="alert#alert"
2
- | Click me
3
-
4
- <ul role="list" class="divide-y divide-gray-100">
5
- <li class="flex justify-between gap-x-6 py-5">
6
- <div class="flex min-w-0 gap-x-4">
7
- <img class="h-12 w-12 flex-none rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1494790108377-be9c29b29330?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
8
- <div class="min-w-0 flex-auto">
9
- <p class="text-sm font-semibold leading-6 text-gray-900">Leslie Alexander</p>
10
- <p class="mt-1 truncate text-xs leading-5 text-gray-500">leslie.alexander@example.com</p>
11
- </div>
12
- </div>
13
- <div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
14
- <p class="text-sm leading-6 text-gray-900">Co-Founder / CEO</p>
15
- <p class="mt-1 text-xs leading-5 text-gray-500">Last seen <time datetime="2023-01-23T13:23Z">3h ago</time></p>
16
- </div>
17
- </li>
18
- <li class="flex justify-between gap-x-6 py-5">
19
- <div class="flex min-w-0 gap-x-4">
20
- <img class="h-12 w-12 flex-none rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1519244703995-f4e0f30006d5?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
21
- <div class="min-w-0 flex-auto">
22
- <p class="text-sm font-semibold leading-6 text-gray-900">Michael Foster</p>
23
- <p class="mt-1 truncate text-xs leading-5 text-gray-500">michael.foster@example.com</p>
24
- </div>
25
- </div>
26
- <div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
27
- <p class="text-sm leading-6 text-gray-900">Co-Founder / CTO</p>
28
- <p class="mt-1 text-xs leading-5 text-gray-500">Last seen <time datetime="2023-01-23T13:23Z">3h ago</time></p>
29
- </div>
30
- </li>
31
- <li class="flex justify-between gap-x-6 py-5">
32
- <div class="flex min-w-0 gap-x-4">
33
- <img class="h-12 w-12 flex-none rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1506794778202-cad84cf45f1d?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
34
- <div class="min-w-0 flex-auto">
35
- <p class="text-sm font-semibold leading-6 text-gray-900">Dries Vincent</p>
36
- <p class="mt-1 truncate text-xs leading-5 text-gray-500">dries.vincent@example.com</p>
37
- </div>
38
- </div>
39
- <div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
40
- <p class="text-sm leading-6 text-gray-900">Business Relations</p>
41
- <div class="mt-1 flex items-center gap-x-1.5">
42
- <div class="flex-none rounded-full bg-emerald-500/20 p-1">
43
- <div class="h-1.5 w-1.5 rounded-full bg-emerald-500"></div>
44
- </div>
45
- <p class="text-xs leading-5 text-gray-500">Online</p>
46
- </div>
47
- </div>
48
- </li>
49
- <li class="flex justify-between gap-x-6 py-5">
50
- <div class="flex min-w-0 gap-x-4">
51
- <img class="h-12 w-12 flex-none rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1517841905240-472988babdf9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
52
- <div class="min-w-0 flex-auto">
53
- <p class="text-sm font-semibold leading-6 text-gray-900">Lindsay Walton</p>
54
- <p class="mt-1 truncate text-xs leading-5 text-gray-500">lindsay.walton@example.com</p>
55
- </div>
56
- </div>
57
- <div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
58
- <p class="text-sm leading-6 text-gray-900">Front-end Developer</p>
59
- <p class="mt-1 text-xs leading-5 text-gray-500">Last seen <time datetime="2023-01-23T13:23Z">3h ago</time></p>
60
- </div>
61
- </li>
62
- <li class="flex justify-between gap-x-6 py-5">
63
- <div class="flex min-w-0 gap-x-4">
64
- <img class="h-12 w-12 flex-none rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1438761681033-6461ffad8d80?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
65
- <div class="min-w-0 flex-auto">
66
- <p class="text-sm font-semibold leading-6 text-gray-900">Courtney Henry</p>
67
- <p class="mt-1 truncate text-xs leading-5 text-gray-500">courtney.henry@example.com</p>
68
- </div>
69
- </div>
70
- <div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
71
- <p class="text-sm leading-6 text-gray-900">Designer</p>
72
- <p class="mt-1 text-xs leading-5 text-gray-500">Last seen <time datetime="2023-01-23T13:23Z">3h ago</time></p>
73
- </div>
74
- </li>
75
- <li class="flex justify-between gap-x-6 py-5">
76
- <div class="flex min-w-0 gap-x-4">
77
- <img class="h-12 w-12 flex-none rounded-full bg-gray-50" src="https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80" alt="">
78
- <div class="min-w-0 flex-auto">
79
- <p class="text-sm font-semibold leading-6 text-gray-900">Tom Cook</p>
80
- <p class="mt-1 truncate text-xs leading-5 text-gray-500">tom.cook@example.com</p>
81
- </div>
82
- </div>
83
- <div class="hidden shrink-0 sm:flex sm:flex-col sm:items-end">
84
- <p class="text-sm leading-6 text-gray-900">Director of Product</p>
85
- <div class="mt-1 flex items-center gap-x-1.5">
86
- <div class="flex-none rounded-full bg-emerald-500/20 p-1">
87
- <div class="h-1.5 w-1.5 rounded-full bg-emerald-500"></div>
88
- </div>
89
- <p class="text-xs leading-5 text-gray-500">Online</p>
90
- </div>
91
- </div>
92
- </li>
93
- </ul>