trestle 0.10.0.pre2 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (117) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/rspec.yml +4 -0
  3. data/Gemfile +2 -2
  4. data/README.md +1 -1
  5. data/app/assets/bundle/trestle/admin.css +9 -9
  6. data/app/assets/bundle/trestle/admin.js +13 -13
  7. data/app/assets/bundle/trestle/fa-brands-400.ttf +0 -0
  8. data/app/assets/bundle/trestle/fa-brands-400.woff2 +0 -0
  9. data/app/assets/bundle/trestle/fa-regular-400.ttf +0 -0
  10. data/app/assets/bundle/trestle/fa-regular-400.woff2 +0 -0
  11. data/app/assets/bundle/trestle/fa-solid-900.ttf +0 -0
  12. data/app/assets/bundle/trestle/fa-solid-900.woff2 +0 -0
  13. data/app/assets/bundle/trestle/photoswipe-2d522a3abaa59f8a8f73.digested.js +6 -0
  14. data/app/assets/sprockets/trestle/icons/font-awesome.css.erb +1 -1
  15. data/app/controllers/concerns/trestle/controller/modal.rb +3 -1
  16. data/app/helpers/trestle/avatar_helper.rb +20 -14
  17. data/app/helpers/trestle/card_helper.rb +27 -9
  18. data/app/helpers/trestle/container_helper.rb +37 -6
  19. data/app/helpers/trestle/display_helper.rb +11 -0
  20. data/app/helpers/trestle/flash_helper.rb +1 -10
  21. data/app/helpers/trestle/form_helper.rb +32 -18
  22. data/app/helpers/trestle/format_helper.rb +47 -17
  23. data/app/helpers/trestle/gravatar_helper.rb +48 -0
  24. data/app/helpers/trestle/grid_helper.rb +12 -14
  25. data/app/helpers/trestle/headings_helper.rb +2 -23
  26. data/app/helpers/trestle/i18n_helper.rb +1 -0
  27. data/app/helpers/trestle/icon_helper.rb +16 -3
  28. data/app/helpers/trestle/layout_helper.rb +1 -0
  29. data/app/helpers/trestle/modal_helper.rb +21 -2
  30. data/app/helpers/trestle/navigation_helper.rb +1 -0
  31. data/app/helpers/trestle/pagination_helper.rb +1 -0
  32. data/app/helpers/trestle/params_helper.rb +32 -0
  33. data/app/helpers/trestle/sort_helper.rb +38 -7
  34. data/app/helpers/trestle/status_helper.rb +19 -3
  35. data/app/helpers/trestle/tab_helper.rb +42 -7
  36. data/app/helpers/trestle/table_helper.rb +23 -23
  37. data/app/helpers/trestle/timestamp_helper.rb +18 -25
  38. data/app/helpers/trestle/title_helper.rb +2 -0
  39. data/app/helpers/trestle/toolbars_helper.rb +2 -1
  40. data/app/helpers/trestle/turbo/frame_helper.rb +25 -14
  41. data/app/helpers/trestle/url_helper.rb +124 -54
  42. data/app/views/kaminari/trestle/_first_page.html.erb +1 -2
  43. data/app/views/kaminari/trestle/_gap.html.erb +0 -1
  44. data/app/views/kaminari/trestle/_last_page.html.erb +1 -2
  45. data/app/views/kaminari/trestle/_page.html.erb +1 -2
  46. data/app/views/kaminari/trestle/_paginator.html.erb +0 -1
  47. data/app/views/layouts/trestle/admin.html.erb +3 -3
  48. data/app/views/layouts/trestle/modal.html.erb +2 -2
  49. data/app/views/trestle/application/_layout.html.erb +22 -18
  50. data/app/views/trestle/application/_tabs.html.erb +1 -1
  51. data/app/views/trestle/flash/_alert.html.erb +3 -1
  52. data/app/views/trestle/flash/_flash.html.erb +7 -4
  53. data/app/views/trestle/resource/_scopes.html.erb +3 -3
  54. data/app/views/trestle/resource/create.turbo_stream.erb +1 -0
  55. data/app/views/trestle/resource/destroy.turbo_stream.erb +2 -0
  56. data/app/views/trestle/resource/index.html.erb +10 -12
  57. data/app/views/trestle/resource/update.turbo_stream.erb +1 -0
  58. data/app/views/trestle/shared/_sidebar.html.erb +8 -8
  59. data/app/views/trestle/table/_table.html.erb +2 -2
  60. data/config/locales/pt-BR.yml +13 -13
  61. data/frontend/css/components/_scopes.scss +6 -7
  62. data/frontend/css/core/_theme.scss +3 -3
  63. data/frontend/css/layout/_sidebar.scss +9 -5
  64. data/frontend/css/variables/_trestle.scss +3 -0
  65. data/frontend/js/controllers/confirm_delete_controller.js +4 -4
  66. data/frontend/js/controllers/flatpickr_controller.js +2 -2
  67. data/frontend/js/controllers/gallery_controller.js +2 -0
  68. data/frontend/js/controllers/lightbox_controller.js +3 -5
  69. data/frontend/js/controllers/modal_trigger_controller.js +2 -2
  70. data/frontend/js/controllers/sidebar_controller.js +13 -3
  71. data/frontend/js/controllers/tab_errors_controller.js +2 -2
  72. data/frontend/js/core/backdrop.js +30 -28
  73. data/frontend/js/core/error_modal.js +7 -9
  74. data/frontend/js/core/fetch.js +2 -0
  75. data/lib/trestle/admin.rb +9 -2
  76. data/lib/trestle/configuration.rb +3 -0
  77. data/lib/trestle/engine.rb +1 -1
  78. data/lib/trestle/evaluation_context.rb +2 -4
  79. data/lib/trestle/form/automatic.rb +1 -1
  80. data/lib/trestle/form/field.rb +1 -1
  81. data/lib/trestle/form/fields/check_box.rb +1 -1
  82. data/lib/trestle/form/fields/collection_check_boxes.rb +1 -1
  83. data/lib/trestle/form/fields/collection_radio_buttons.rb +1 -1
  84. data/lib/trestle/form/fields/date_select.rb +1 -1
  85. data/lib/trestle/form/fields/datetime_select.rb +1 -1
  86. data/lib/trestle/form/fields/form_control.rb +2 -2
  87. data/lib/trestle/form/fields/form_group.rb +4 -4
  88. data/lib/trestle/form/fields/radio_button.rb +1 -1
  89. data/lib/trestle/form/fields/static_field.rb +1 -1
  90. data/lib/trestle/form/fields/time_select.rb +1 -1
  91. data/lib/trestle/form/renderer.rb +3 -5
  92. data/lib/trestle/hook/helpers.rb +21 -0
  93. data/lib/trestle/navigation/block.rb +8 -15
  94. data/lib/trestle/navigation/group.rb +2 -2
  95. data/lib/trestle/navigation/item.rb +21 -4
  96. data/lib/trestle/registry.rb +14 -11
  97. data/lib/trestle/resource/builder.rb +9 -6
  98. data/lib/trestle/resource/toolbar.rb +5 -5
  99. data/lib/trestle/resource.rb +7 -5
  100. data/lib/trestle/scopes/block.rb +8 -12
  101. data/lib/trestle/scopes/definition.rb +6 -2
  102. data/lib/trestle/scopes/scope.rb +13 -10
  103. data/lib/trestle/tab.rb +2 -2
  104. data/lib/trestle/table/column.rb +4 -3
  105. data/lib/trestle/table/row.rb +1 -1
  106. data/lib/trestle/toolbar/builder.rb +6 -6
  107. data/lib/trestle/toolbar/context.rb +2 -4
  108. data/lib/trestle/toolbar/item.rb +10 -19
  109. data/lib/trestle/toolbar/menu.rb +9 -9
  110. data/lib/trestle/version.rb +1 -1
  111. data/lib/trestle.rb +2 -2
  112. data/package.json +7 -7
  113. data/trestle.gemspec +1 -1
  114. data/yarn.lock +751 -796
  115. metadata +7 -7
  116. data/app/assets/bundle/trestle/photoswipe-7aa1aec9c3c1fd65c382.digested.js +0 -6
  117. data/app/views/layouts/trestle/admin.turbo_stream.erb +0 -4
data/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trestle",
3
- "version": "0.10.0-pre2",
3
+ "version": "0.10.1",
4
4
  "description": "A modern, responsive admin framework for Ruby on Rails",
5
5
  "homepage": "https://trestle.io",
6
6
  "repository": "https://github.com/TrestleAdmin/trestle.git",
@@ -18,15 +18,15 @@
18
18
  "@babel/preset-env": "^7.20.2",
19
19
  "autoprefixer": "^10.4.13",
20
20
  "babel-loader": "^9.1.2",
21
- "copy-webpack-plugin": "^11.0.0",
22
- "css-loader": "^6.7.3",
23
- "css-minimizer-webpack-plugin": "^5.0.0",
24
- "expose-loader": "^4.0.0",
21
+ "copy-webpack-plugin": "^12.0.2",
22
+ "css-loader": "^7.1.2",
23
+ "css-minimizer-webpack-plugin": "^7.0.0",
24
+ "expose-loader": "^5.0.0",
25
25
  "mini-css-extract-plugin": "^2.7.2",
26
26
  "postcss": "^8.4.21",
27
- "postcss-loader": "^7.0.2",
27
+ "postcss-loader": "^8.1.1",
28
28
  "sass": "^1.57.1",
29
- "sass-loader": "^13.2.0",
29
+ "sass-loader": "^16.0.2",
30
30
  "webpack": "^5.75.0",
31
31
  "webpack-bundle-analyzer": "^4.7.0",
32
32
  "webpack-cli": "^5.0.1"
data/trestle.gemspec CHANGED
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
 
23
23
  spec.add_dependency "railties", ">= 6.0.0"
24
24
  spec.add_dependency "activemodel", ">= 6.0.0"
25
- spec.add_dependency "turbo-rails", ">= 2.0.0"
25
+ spec.add_dependency "turbo-rails", ">= 2.0.6"
26
26
  spec.add_dependency "kaminari", ">= 1.1.0"
27
27
 
28
28
  spec.add_development_dependency "rspec-rails", ">= 5.1.2"