plutonium 0.14.1 → 0.15.0.pre.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (182) hide show
  1. checksums.yaml +4 -4
  2. data/README copy.md +1 -1
  3. data/README.md +1 -1
  4. data/app/assets/plutonium.css +1 -1
  5. data/app/views/{application → plutonium}/_resource_header.html copy.erb +1 -1
  6. data/app/views/{application → plutonium}/_resource_header.html.erb +1 -1
  7. data/app/views/{application → plutonium}/_resource_sidebar.html.erb +2 -0
  8. data/app/views/resource/_resource_details.html.erb +1 -36
  9. data/app/views/resource/_resource_form.html.erb +1 -5
  10. data/app/views/resource/_resource_table.html.erb +315 -85
  11. data/app/views/resource/edit.html.erb +1 -5
  12. data/app/views/resource/index.html.erb +1 -5
  13. data/app/views/resource/new.html.erb +1 -5
  14. data/app/views/resource/show.html.erb +1 -5
  15. data/config/initializers/pagy.rb +1 -0
  16. data/config/initializers/rabl.rb +27 -20
  17. data/gemfiles/rails_7.gemfile.lock +5 -1
  18. data/lib/generators/pu/core/install/templates/app/controllers/plutonium_controller.rb.tt +2 -0
  19. data/lib/generators/pu/core/install/templates/app/controllers/resource_controller.rb.tt +21 -1
  20. data/lib/generators/pu/core/install/templates/app/definitions/resource_definition.rb.tt +2 -0
  21. data/lib/generators/pu/core/install/templates/app/models/resource_record.rb.tt +0 -2
  22. data/lib/generators/pu/core/install/templates/config/initializers/plutonium.rb +1 -8
  23. data/lib/generators/pu/eject/shell/shell_generator.rb +2 -2
  24. data/lib/generators/pu/lib/plutonium_generators/concerns/actions.rb +1 -1
  25. data/lib/generators/pu/lib/plutonium_generators/concerns/logger.rb +1 -1
  26. data/lib/generators/pu/lib/plutonium_generators/generator.rb +5 -3
  27. data/lib/generators/pu/lib/plutonium_generators/model_generator_base.rb +26 -2
  28. data/lib/generators/pu/pkg/{feature/feature_generator.rb → package/package_generator.rb} +4 -4
  29. data/lib/generators/pu/pkg/{feature → package}/templates/app/controllers/resource_controller.rb.tt +0 -2
  30. data/lib/generators/pu/pkg/package/templates/app/definitions/resource_definition.rb.tt +4 -0
  31. data/lib/generators/pu/pkg/package/templates/app/query_objects/resource_query_object.rb.tt +4 -0
  32. data/lib/generators/pu/pkg/{app/app_generator.rb → portal/portal_generator.rb} +10 -8
  33. data/lib/generators/pu/pkg/{app → portal}/templates/app/controllers/concerns/controller.rb.tt +3 -7
  34. data/lib/generators/pu/pkg/{app → portal}/templates/app/controllers/dashboard_controller.rb.tt +1 -1
  35. data/lib/generators/pu/pkg/portal/templates/app/controllers/plutonium_controller.rb.tt +5 -0
  36. data/lib/generators/pu/pkg/{app/templates/app/controllers/controller.rb.tt → portal/templates/app/controllers/resource_controller.rb.tt} +1 -1
  37. data/lib/generators/pu/pkg/portal/templates/app/definitions/resource_definition.rb.tt +4 -0
  38. data/lib/generators/pu/pkg/{app → portal}/templates/app/views/package/dashboard/index.html.erb +2 -1
  39. data/lib/generators/pu/res/conn/conn_generator.rb +78 -3
  40. data/lib/generators/pu/res/conn/templates/app/controllers/resource_controller.rb.tt +1 -1
  41. data/lib/generators/pu/res/conn/templates/app/definitions/resource_definition.rb.tt +3 -0
  42. data/lib/generators/pu/res/conn/templates/app/policies/resource_policy.rb.tt +29 -1
  43. data/lib/generators/pu/res/conn/templates/app/presenters/resource_presenter.rb.tt +1 -1
  44. data/lib/generators/pu/res/conn/templates/app/query_objects/resource_query_object.rb.tt +1 -1
  45. data/lib/generators/pu/res/model/model_generator.rb +0 -7
  46. data/lib/generators/pu/res/model/templates/model.rb.tt +4 -1
  47. data/lib/generators/pu/res/scaffold/scaffold_generator.rb +22 -4
  48. data/lib/generators/pu/res/scaffold/templates/controller.rb.tt +0 -1
  49. data/lib/generators/pu/res/scaffold/templates/definition.rb.tt +4 -0
  50. data/lib/generators/pu/res/scaffold/templates/policy.rb.tt +2 -2
  51. data/lib/generators/pu/rodauth/templates/app/controllers/rodauth_controller.rb.tt +1 -1
  52. data/lib/generators/pu/rodauth/templates/app/rodauth/account_rodauth_plugin.rb.tt +270 -0
  53. data/lib/plutonium/action/README.md +0 -0
  54. data/lib/plutonium/action/base.rb +103 -0
  55. data/lib/plutonium/action/interactive.rb +117 -0
  56. data/lib/plutonium/action/route_options.rb +65 -0
  57. data/lib/plutonium/action/simple.rb +8 -0
  58. data/lib/plutonium/auth.rb +1 -1
  59. data/lib/plutonium/configuration.rb +0 -8
  60. data/lib/plutonium/core/actions/collection.rb +1 -1
  61. data/lib/plutonium/core/associations/renderers/factory.rb +3 -1
  62. data/lib/plutonium/core/controller.rb +110 -0
  63. data/lib/plutonium/core/controllers/authorizable.rb +12 -35
  64. data/lib/plutonium/core/controllers/bootable.rb +38 -7
  65. data/lib/plutonium/core/controllers/entity_scoping.rb +6 -2
  66. data/lib/plutonium/core/fields/renderers/association_renderer.rb +1 -1
  67. data/lib/plutonium/core/ui/collection.rb +1 -1
  68. data/lib/plutonium/core/ui/detail.rb +1 -1
  69. data/lib/plutonium/core/ui/form.rb +1 -1
  70. data/lib/plutonium/definition/actions.rb +50 -0
  71. data/lib/plutonium/definition/base.rb +92 -0
  72. data/lib/plutonium/definition/config_attr.rb +30 -0
  73. data/lib/plutonium/definition/defineable_props.rb +96 -0
  74. data/lib/plutonium/definition/search.rb +21 -0
  75. data/lib/plutonium/engine/validator.rb +30 -0
  76. data/lib/plutonium/engine.rb +25 -0
  77. data/lib/plutonium/helpers/form_helper.rb +1 -3
  78. data/lib/plutonium/interaction/README.md +369 -0
  79. data/lib/plutonium/interaction/base.rb +75 -0
  80. data/lib/plutonium/interaction/concerns/presentable.rb +61 -0
  81. data/lib/plutonium/interaction/concerns/workflow_dsl.rb +82 -0
  82. data/lib/plutonium/interaction/outcome.rb +129 -0
  83. data/lib/plutonium/interaction/response/base.rb +63 -0
  84. data/lib/plutonium/interaction/response/null.rb +33 -0
  85. data/lib/plutonium/interaction/response/redirect.rb +30 -0
  86. data/lib/plutonium/interaction/response/render.rb +28 -0
  87. data/lib/plutonium/lib/bit_flags.rb +70 -9
  88. data/lib/plutonium/{config → lib}/overlayed_hash.rb +1 -1
  89. data/lib/plutonium/lib/smart_cache.rb +171 -0
  90. data/lib/plutonium/models/has_cents.rb +170 -0
  91. data/lib/plutonium/{pkg/base.rb → package/engine.rb} +10 -2
  92. data/lib/plutonium/{application → portal}/controller.rb +3 -11
  93. data/lib/plutonium/{application → portal}/dynamic_controllers.rb +4 -4
  94. data/lib/plutonium/portal/engine.rb +15 -0
  95. data/lib/plutonium/railtie.rb +33 -1
  96. data/lib/plutonium/reloader.rb +5 -5
  97. data/lib/plutonium/resource/controller.rb +51 -34
  98. data/lib/plutonium/resource/controllers/authorizable.rb +128 -0
  99. data/lib/plutonium/{core → resource}/controllers/crud_actions.rb +23 -22
  100. data/lib/plutonium/resource/controllers/defineable.rb +26 -0
  101. data/lib/plutonium/{core → resource}/controllers/interactive_actions.rb +12 -12
  102. data/lib/plutonium/resource/controllers/presentable.rb +41 -0
  103. data/lib/plutonium/resource/controllers/queryable.rb +44 -0
  104. data/lib/plutonium/resource/definition.rb +6 -0
  105. data/lib/plutonium/resource/policy.rb +25 -13
  106. data/lib/plutonium/resource/query_object.rb +50 -51
  107. data/lib/plutonium/resource/record.rb +6 -89
  108. data/lib/plutonium/resource/register.rb +82 -0
  109. data/lib/plutonium/routing/mapper_extensions.rb +1 -1
  110. data/lib/plutonium/routing/resource_registration.rb +1 -1
  111. data/lib/plutonium/routing/route_set_extensions.rb +6 -18
  112. data/lib/plutonium/ui/action_button.rb +125 -0
  113. data/lib/plutonium/ui/breadcrumbs.rb +163 -0
  114. data/lib/plutonium/ui/component/base.rb +13 -0
  115. data/lib/plutonium/ui/component/behaviour.rb +38 -0
  116. data/lib/plutonium/ui/component/kit.rb +31 -0
  117. data/lib/plutonium/ui/component/methods.rb +54 -0
  118. data/lib/plutonium/ui/display/base.rb +25 -0
  119. data/lib/plutonium/ui/display/component/association.rb +26 -0
  120. data/lib/plutonium/ui/display/resource.rb +77 -0
  121. data/lib/plutonium/ui/display/theme.rb +27 -0
  122. data/lib/plutonium/ui/dyna_frame/content.rb +20 -0
  123. data/lib/plutonium/ui/empty_card.rb +20 -0
  124. data/lib/plutonium/ui/form/base.rb +37 -0
  125. data/lib/plutonium/ui/form/resource.rb +75 -0
  126. data/lib/plutonium/ui/form/theme.rb +42 -0
  127. data/lib/plutonium/ui/page/base.rb +112 -0
  128. data/lib/plutonium/ui/page/edit.rb +23 -0
  129. data/lib/plutonium/ui/page/index.rb +27 -0
  130. data/lib/plutonium/ui/page/new.rb +23 -0
  131. data/lib/plutonium/ui/page/show.rb +27 -0
  132. data/lib/plutonium/ui/page_header.rb +49 -0
  133. data/lib/plutonium/ui/table/base.rb +13 -0
  134. data/lib/plutonium/ui/table/components/pagy_info.rb +70 -0
  135. data/lib/plutonium/ui/table/components/pagy_page_info.rb +70 -0
  136. data/lib/plutonium/ui/table/components/pagy_pagination.rb +105 -0
  137. data/lib/plutonium/ui/table/components/scopes_bar.rb +136 -0
  138. data/lib/plutonium/ui/table/components/search_bar.rb +158 -0
  139. data/lib/plutonium/ui/table/display_theme.rb +21 -0
  140. data/lib/plutonium/ui/table/resource.rb +98 -0
  141. data/lib/plutonium/ui/table/theme.rb +35 -0
  142. data/lib/plutonium/ui.rb +9 -0
  143. data/lib/plutonium/version.rb +5 -1
  144. data/lib/plutonium.rb +14 -1
  145. data/package-lock.json +19 -22
  146. data/package.json +4 -4
  147. data/src/css/plutonium.css +15 -0
  148. data/tailwind.options.js +11 -3
  149. metadata +218 -81
  150. data/lib/generators/pu/core/install/templates/app/presenters/resource_presenter.rb.tt +0 -2
  151. data/lib/generators/pu/core/install/templates/app/query_objects/resource_query_object.rb.tt +0 -2
  152. data/lib/generators/pu/pkg/feature/templates/app/query_objects/resource_query_object.rb.tt +0 -4
  153. data/lib/plutonium/concerns/resource_validatable.rb +0 -34
  154. data/lib/plutonium/config.rb +0 -9
  155. data/lib/plutonium/core/controllers/base.rb +0 -101
  156. data/lib/plutonium/core/controllers/presentable.rb +0 -65
  157. data/lib/plutonium/core/controllers/queryable.rb +0 -28
  158. data/lib/plutonium/pkg/app.rb +0 -35
  159. data/lib/plutonium/pkg/concerns/resource_validatable.rb +0 -36
  160. data/lib/plutonium/pkg/feature.rb +0 -18
  161. data/lib/plutonium/policy/initializer.rb +0 -22
  162. data/lib/plutonium/policy/scope.rb +0 -19
  163. data/lib/plutonium/pundit/context.rb +0 -18
  164. data/lib/plutonium/pundit/policy_finder.rb +0 -25
  165. data/lib/plutonium/resource/policy_context.rb +0 -5
  166. data/lib/plutonium/resource_register.rb +0 -83
  167. data/lib/plutonium/smart_cache.rb +0 -151
  168. /data/app/views/{application → plutonium}/_flash.html.erb +0 -0
  169. /data/app/views/{application → plutonium}/_flash_alerts.html.erb +0 -0
  170. /data/app/views/{application → plutonium}/_flash_toasts.html.erb +0 -0
  171. /data/lib/generators/pu/pkg/{app/templates/app/views/package → package/templates}/.keep +0 -0
  172. /data/lib/generators/pu/pkg/{feature → package}/templates/app/interactions/resource_interaction.rb.tt +0 -0
  173. /data/lib/generators/pu/pkg/{feature → package}/templates/app/models/resource_record.rb.tt +0 -0
  174. /data/lib/generators/pu/pkg/{feature → package}/templates/app/policies/resource_policy.rb.tt +0 -0
  175. /data/lib/generators/pu/pkg/{feature → package}/templates/app/presenters/resource_presenter.rb.tt +0 -0
  176. /data/lib/generators/pu/pkg/{feature → package}/templates/lib/engine.rb.tt +0 -0
  177. /data/lib/generators/pu/pkg/{app → portal}/templates/app/policies/resource_policy.rb.tt +0 -0
  178. /data/lib/generators/pu/pkg/{app → portal}/templates/app/presenters/resource_presenter.rb.tt +0 -0
  179. /data/lib/generators/pu/pkg/{app → portal}/templates/app/query_objects/resource_query_object.rb.tt +0 -0
  180. /data/lib/generators/pu/pkg/{feature/templates → portal/templates/app/views/package}/.keep +0 -0
  181. /data/lib/generators/pu/pkg/{app → portal}/templates/config/routes.rb.tt +0 -0
  182. /data/lib/generators/pu/pkg/{app → portal}/templates/lib/engine.rb.tt +0 -0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plutonium
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.14.1
4
+ version: 0.15.0.pre.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Froelich
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-07-15 00:00:00.000000000 Z
11
+ date: 2024-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: zeitwerk
@@ -73,131 +73,215 @@ dependencies:
73
73
  - !ruby/object:Gem::Version
74
74
  version: '5.3'
75
75
  - !ruby/object:Gem::Dependency
76
- name: pundit
76
+ name: pagy
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '2.3'
81
+ version: '9.0'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: '2.3'
88
+ version: '9.0'
89
89
  - !ruby/object:Gem::Dependency
90
- name: pagy
90
+ name: simple_form
91
91
  requirement: !ruby/object:Gem::Requirement
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '7.0'
95
+ version: '5.3'
96
96
  type: :runtime
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: '7.0'
102
+ version: '5.3'
103
103
  - !ruby/object:Gem::Dependency
104
- name: simple_form
104
+ name: view_component
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '5.3'
109
+ version: '3'
110
110
  type: :runtime
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
114
  - - "~>"
115
115
  - !ruby/object:Gem::Version
116
- version: '5.3'
116
+ version: '3'
117
117
  - !ruby/object:Gem::Dependency
118
- name: view_component
118
+ name: dry-initializer
119
119
  requirement: !ruby/object:Gem::Requirement
120
120
  requirements:
121
121
  - - "~>"
122
122
  - !ruby/object:Gem::Version
123
- version: '3'
123
+ version: '3.1'
124
124
  type: :runtime
125
125
  prerelease: false
126
126
  version_requirements: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - "~>"
129
129
  - !ruby/object:Gem::Version
130
- version: '3'
130
+ version: '3.1'
131
131
  - !ruby/object:Gem::Dependency
132
- name: view_component-form
132
+ name: rabl
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
135
  - - "~>"
136
136
  - !ruby/object:Gem::Version
137
- version: 0.2.6
137
+ version: 0.16.1
138
138
  type: :runtime
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
142
  - - "~>"
143
143
  - !ruby/object:Gem::Version
144
- version: 0.2.6
144
+ version: 0.16.1
145
145
  - !ruby/object:Gem::Dependency
146
- name: dry-initializer
146
+ name: semantic_range
147
147
  requirement: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '3.1'
151
+ version: '3.0'
152
152
  type: :runtime
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '3.1'
158
+ version: '3.0'
159
159
  - !ruby/object:Gem::Dependency
160
- name: rabl
160
+ name: tty-prompt
161
161
  requirement: !ruby/object:Gem::Requirement
162
162
  requirements:
163
163
  - - "~>"
164
164
  - !ruby/object:Gem::Version
165
- version: 0.16.1
165
+ version: 0.23.1
166
166
  type: :runtime
167
167
  prerelease: false
168
168
  version_requirements: !ruby/object:Gem::Requirement
169
169
  requirements:
170
170
  - - "~>"
171
171
  - !ruby/object:Gem::Version
172
- version: 0.16.1
172
+ version: 0.23.1
173
173
  - !ruby/object:Gem::Dependency
174
- name: semantic_range
174
+ name: action_policy
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - "~>"
178
178
  - !ruby/object:Gem::Version
179
- version: '3.0'
179
+ version: 0.7.0
180
180
  type: :runtime
181
181
  prerelease: false
182
182
  version_requirements: !ruby/object:Gem::Requirement
183
183
  requirements:
184
184
  - - "~>"
185
185
  - !ruby/object:Gem::Version
186
- version: '3.0'
186
+ version: 0.7.0
187
187
  - !ruby/object:Gem::Dependency
188
- name: tty-prompt
188
+ name: phlex
189
189
  requirement: !ruby/object:Gem::Requirement
190
190
  requirements:
191
191
  - - "~>"
192
192
  - !ruby/object:Gem::Version
193
- version: 0.23.1
193
+ version: '1.11'
194
194
  type: :runtime
195
195
  prerelease: false
196
196
  version_requirements: !ruby/object:Gem::Requirement
197
197
  requirements:
198
198
  - - "~>"
199
199
  - !ruby/object:Gem::Version
200
- version: 0.23.1
200
+ version: '1.11'
201
+ - !ruby/object:Gem::Dependency
202
+ name: phlex-rails
203
+ requirement: !ruby/object:Gem::Requirement
204
+ requirements:
205
+ - - ">="
206
+ - !ruby/object:Gem::Version
207
+ version: '0'
208
+ type: :runtime
209
+ prerelease: false
210
+ version_requirements: !ruby/object:Gem::Requirement
211
+ requirements:
212
+ - - ">="
213
+ - !ruby/object:Gem::Version
214
+ version: '0'
215
+ - !ruby/object:Gem::Dependency
216
+ name: phlex-tabler_icons
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ type: :runtime
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ version: '0'
229
+ - !ruby/object:Gem::Dependency
230
+ name: phlexi-form
231
+ requirement: !ruby/object:Gem::Requirement
232
+ requirements:
233
+ - - ">="
234
+ - !ruby/object:Gem::Version
235
+ version: '0'
236
+ type: :runtime
237
+ prerelease: false
238
+ version_requirements: !ruby/object:Gem::Requirement
239
+ requirements:
240
+ - - ">="
241
+ - !ruby/object:Gem::Version
242
+ version: '0'
243
+ - !ruby/object:Gem::Dependency
244
+ name: phlexi-table
245
+ requirement: !ruby/object:Gem::Requirement
246
+ requirements:
247
+ - - ">="
248
+ - !ruby/object:Gem::Version
249
+ version: '0'
250
+ type: :runtime
251
+ prerelease: false
252
+ version_requirements: !ruby/object:Gem::Requirement
253
+ requirements:
254
+ - - ">="
255
+ - !ruby/object:Gem::Version
256
+ version: '0'
257
+ - !ruby/object:Gem::Dependency
258
+ name: phlexi-display
259
+ requirement: !ruby/object:Gem::Requirement
260
+ requirements:
261
+ - - ">="
262
+ - !ruby/object:Gem::Version
263
+ version: '0'
264
+ type: :runtime
265
+ prerelease: false
266
+ version_requirements: !ruby/object:Gem::Requirement
267
+ requirements:
268
+ - - ">="
269
+ - !ruby/object:Gem::Version
270
+ version: '0'
271
+ - !ruby/object:Gem::Dependency
272
+ name: tailwind_merge
273
+ requirement: !ruby/object:Gem::Requirement
274
+ requirements:
275
+ - - ">="
276
+ - !ruby/object:Gem::Version
277
+ version: '0'
278
+ type: :runtime
279
+ prerelease: false
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ requirements:
282
+ - - ">="
283
+ - !ruby/object:Gem::Version
284
+ version: '0'
201
285
  - !ruby/object:Gem::Dependency
202
286
  name: rake
203
287
  requirement: !ruby/object:Gem::Requirement
@@ -831,12 +915,6 @@ files:
831
915
  - app/assets/plutonium.min.js
832
916
  - app/assets/plutonium.min.js.map
833
917
  - app/assets/plutonium.png
834
- - app/views/application/_flash.html.erb
835
- - app/views/application/_flash_alerts.html.erb
836
- - app/views/application/_flash_toasts.html.erb
837
- - app/views/application/_resource_header.html copy.erb
838
- - app/views/application/_resource_header.html.erb
839
- - app/views/application/_resource_sidebar.html.erb
840
918
  - app/views/components/action_button/action_button_component.html.erb
841
919
  - app/views/components/action_button/action_button_component.rb
842
920
  - app/views/components/attributes.rb
@@ -901,6 +979,12 @@ files:
901
979
  - app/views/layouts/resource.html copy.erb
902
980
  - app/views/layouts/resource.html.erb
903
981
  - app/views/layouts/rodauth.html.erb
982
+ - app/views/plutonium/_flash.html.erb
983
+ - app/views/plutonium/_flash_alerts.html.erb
984
+ - app/views/plutonium/_flash_toasts.html.erb
985
+ - app/views/plutonium/_resource_header.html copy.erb
986
+ - app/views/plutonium/_resource_header.html.erb
987
+ - app/views/plutonium/_resource_sidebar.html.erb
904
988
  - app/views/resource/_interactive_resource_action_form.html.erb
905
989
  - app/views/resource/_metric_card.html.erb
906
990
  - app/views/resource/_resource_details.html.erb
@@ -974,12 +1058,12 @@ files:
974
1058
  - lib/generators/pu/core/assets/templates/tailwind.config.js
975
1059
  - lib/generators/pu/core/install/install_generator.rb
976
1060
  - lib/generators/pu/core/install/templates/.keep
1061
+ - lib/generators/pu/core/install/templates/app/controllers/plutonium_controller.rb.tt
977
1062
  - lib/generators/pu/core/install/templates/app/controllers/resource_controller.rb.tt
1063
+ - lib/generators/pu/core/install/templates/app/definitions/resource_definition.rb.tt
978
1064
  - lib/generators/pu/core/install/templates/app/interactions/resource_interaction.rb.tt
979
1065
  - lib/generators/pu/core/install/templates/app/models/resource_record.rb.tt
980
1066
  - lib/generators/pu/core/install/templates/app/policies/resource_policy.rb.tt
981
- - lib/generators/pu/core/install/templates/app/presenters/resource_presenter.rb.tt
982
- - lib/generators/pu/core/install/templates/app/query_objects/resource_query_object.rb.tt
983
1067
  - lib/generators/pu/core/install/templates/config/initializers/plutonium.rb
984
1068
  - lib/generators/pu/core/install/templates/config/packages.rb
985
1069
  - lib/generators/pu/core/ruby/ruby_generator.rb
@@ -1027,29 +1111,33 @@ files:
1027
1111
  - lib/generators/pu/lib/plutonium_generators/generator.rb
1028
1112
  - lib/generators/pu/lib/plutonium_generators/installer.rb
1029
1113
  - lib/generators/pu/lib/plutonium_generators/model_generator_base.rb
1030
- - lib/generators/pu/pkg/app/app_generator.rb
1031
- - lib/generators/pu/pkg/app/templates/app/controllers/concerns/controller.rb.tt
1032
- - lib/generators/pu/pkg/app/templates/app/controllers/controller.rb.tt
1033
- - lib/generators/pu/pkg/app/templates/app/controllers/dashboard_controller.rb.tt
1034
- - lib/generators/pu/pkg/app/templates/app/policies/resource_policy.rb.tt
1035
- - lib/generators/pu/pkg/app/templates/app/presenters/resource_presenter.rb.tt
1036
- - lib/generators/pu/pkg/app/templates/app/query_objects/resource_query_object.rb.tt
1037
- - lib/generators/pu/pkg/app/templates/app/views/package/.keep
1038
- - lib/generators/pu/pkg/app/templates/app/views/package/dashboard/index.html.erb
1039
- - lib/generators/pu/pkg/app/templates/config/routes.rb.tt
1040
- - lib/generators/pu/pkg/app/templates/lib/engine.rb.tt
1041
- - lib/generators/pu/pkg/feature/feature_generator.rb
1042
- - lib/generators/pu/pkg/feature/templates/.keep
1043
- - lib/generators/pu/pkg/feature/templates/app/controllers/resource_controller.rb.tt
1044
- - lib/generators/pu/pkg/feature/templates/app/interactions/resource_interaction.rb.tt
1045
- - lib/generators/pu/pkg/feature/templates/app/models/resource_record.rb.tt
1046
- - lib/generators/pu/pkg/feature/templates/app/policies/resource_policy.rb.tt
1047
- - lib/generators/pu/pkg/feature/templates/app/presenters/resource_presenter.rb.tt
1048
- - lib/generators/pu/pkg/feature/templates/app/query_objects/resource_query_object.rb.tt
1049
- - lib/generators/pu/pkg/feature/templates/lib/engine.rb.tt
1114
+ - lib/generators/pu/pkg/package/package_generator.rb
1115
+ - lib/generators/pu/pkg/package/templates/.keep
1116
+ - lib/generators/pu/pkg/package/templates/app/controllers/resource_controller.rb.tt
1117
+ - lib/generators/pu/pkg/package/templates/app/definitions/resource_definition.rb.tt
1118
+ - lib/generators/pu/pkg/package/templates/app/interactions/resource_interaction.rb.tt
1119
+ - lib/generators/pu/pkg/package/templates/app/models/resource_record.rb.tt
1120
+ - lib/generators/pu/pkg/package/templates/app/policies/resource_policy.rb.tt
1121
+ - lib/generators/pu/pkg/package/templates/app/presenters/resource_presenter.rb.tt
1122
+ - lib/generators/pu/pkg/package/templates/app/query_objects/resource_query_object.rb.tt
1123
+ - lib/generators/pu/pkg/package/templates/lib/engine.rb.tt
1124
+ - lib/generators/pu/pkg/portal/portal_generator.rb
1125
+ - lib/generators/pu/pkg/portal/templates/app/controllers/concerns/controller.rb.tt
1126
+ - lib/generators/pu/pkg/portal/templates/app/controllers/dashboard_controller.rb.tt
1127
+ - lib/generators/pu/pkg/portal/templates/app/controllers/plutonium_controller.rb.tt
1128
+ - lib/generators/pu/pkg/portal/templates/app/controllers/resource_controller.rb.tt
1129
+ - lib/generators/pu/pkg/portal/templates/app/definitions/resource_definition.rb.tt
1130
+ - lib/generators/pu/pkg/portal/templates/app/policies/resource_policy.rb.tt
1131
+ - lib/generators/pu/pkg/portal/templates/app/presenters/resource_presenter.rb.tt
1132
+ - lib/generators/pu/pkg/portal/templates/app/query_objects/resource_query_object.rb.tt
1133
+ - lib/generators/pu/pkg/portal/templates/app/views/package/.keep
1134
+ - lib/generators/pu/pkg/portal/templates/app/views/package/dashboard/index.html.erb
1135
+ - lib/generators/pu/pkg/portal/templates/config/routes.rb.tt
1136
+ - lib/generators/pu/pkg/portal/templates/lib/engine.rb.tt
1050
1137
  - lib/generators/pu/res/conn/conn_generator.rb
1051
1138
  - lib/generators/pu/res/conn/templates/.keep
1052
1139
  - lib/generators/pu/res/conn/templates/app/controllers/resource_controller.rb.tt
1140
+ - lib/generators/pu/res/conn/templates/app/definitions/resource_definition.rb.tt
1053
1141
  - lib/generators/pu/res/conn/templates/app/policies/resource_policy.rb.tt
1054
1142
  - lib/generators/pu/res/conn/templates/app/presenters/resource_presenter.rb.tt
1055
1143
  - lib/generators/pu/res/conn/templates/app/query_objects/resource_query_object.rb.tt
@@ -1061,6 +1149,7 @@ files:
1061
1149
  - lib/generators/pu/res/scaffold/scaffold_generator.rb
1062
1150
  - lib/generators/pu/res/scaffold/templates/.keep
1063
1151
  - lib/generators/pu/res/scaffold/templates/controller.rb.tt
1152
+ - lib/generators/pu/res/scaffold/templates/definition.rb.tt
1064
1153
  - lib/generators/pu/res/scaffold/templates/policy.rb.tt
1065
1154
  - lib/generators/pu/res/scaffold/templates/presenter.rb.tt
1066
1155
  - lib/generators/pu/res/scaffold/templates/query_object.rb.tt
@@ -1095,6 +1184,7 @@ files:
1095
1184
  - lib/generators/pu/rodauth/templates/app/mailers/account_mailer.rb.tt
1096
1185
  - lib/generators/pu/rodauth/templates/app/mailers/rodauth_mailer.rb.tt
1097
1186
  - lib/generators/pu/rodauth/templates/app/models/account.rb.tt
1187
+ - lib/generators/pu/rodauth/templates/app/rodauth/account_rodauth_plugin.rb.tt
1098
1188
  - lib/generators/pu/rodauth/templates/app/rodauth/rodauth_app.rb.tt
1099
1189
  - lib/generators/pu/rodauth/templates/app/rodauth/rodauth_plugin.rb.tt
1100
1190
  - lib/generators/pu/rodauth/templates/app/views/rodauth_mailer/email_auth.text.erb
@@ -1118,17 +1208,17 @@ files:
1118
1208
  - lib/generators/pu/service/sidekiq/templates/config/initializers/sidekiq.rb
1119
1209
  - lib/generators/pu/service/sidekiq/templates/config/sidekiq.yml
1120
1210
  - lib/plutonium.rb
1121
- - lib/plutonium/application/controller.rb
1122
- - lib/plutonium/application/dynamic_controllers.rb
1211
+ - lib/plutonium/action/README.md
1212
+ - lib/plutonium/action/base.rb
1213
+ - lib/plutonium/action/interactive.rb
1214
+ - lib/plutonium/action/route_options.rb
1215
+ - lib/plutonium/action/simple.rb
1123
1216
  - lib/plutonium/auth.rb
1124
1217
  - lib/plutonium/auth/public.rb
1125
1218
  - lib/plutonium/auth/rodauth.rb
1126
1219
  - lib/plutonium/builders/menus/sidebar_menu.rb.bk
1127
1220
  - lib/plutonium/builders/menus/sidebar_menu_item.rb.bk
1128
1221
  - lib/plutonium/component_registry.rb
1129
- - lib/plutonium/concerns/resource_validatable.rb
1130
- - lib/plutonium/config.rb
1131
- - lib/plutonium/config/overlayed_hash.rb
1132
1222
  - lib/plutonium/configuration.rb
1133
1223
  - lib/plutonium/core/.DS_Store
1134
1224
  - lib/plutonium/core/action.rb
@@ -1146,14 +1236,10 @@ files:
1146
1236
  - lib/plutonium/core/autodiscovery/discoverer.rb
1147
1237
  - lib/plutonium/core/autodiscovery/input_discoverer.rb
1148
1238
  - lib/plutonium/core/autodiscovery/renderer_discoverer.rb
1239
+ - lib/plutonium/core/controller.rb
1149
1240
  - lib/plutonium/core/controllers/authorizable.rb
1150
- - lib/plutonium/core/controllers/base.rb
1151
1241
  - lib/plutonium/core/controllers/bootable.rb
1152
- - lib/plutonium/core/controllers/crud_actions.rb
1153
1242
  - lib/plutonium/core/controllers/entity_scoping.rb
1154
- - lib/plutonium/core/controllers/interactive_actions.rb
1155
- - lib/plutonium/core/controllers/presentable.rb
1156
- - lib/plutonium/core/controllers/queryable.rb
1157
1243
  - lib/plutonium/core/definers/action_definer.rb
1158
1244
  - lib/plutonium/core/definers/association_renderer_definer.rb
1159
1245
  - lib/plutonium/core/definers/field_definer.rb
@@ -1181,6 +1267,13 @@ files:
1181
1267
  - lib/plutonium/core/ui/collection.rb
1182
1268
  - lib/plutonium/core/ui/detail.rb
1183
1269
  - lib/plutonium/core/ui/form.rb
1270
+ - lib/plutonium/definition/actions.rb
1271
+ - lib/plutonium/definition/base.rb
1272
+ - lib/plutonium/definition/config_attr.rb
1273
+ - lib/plutonium/definition/defineable_props.rb
1274
+ - lib/plutonium/definition/search.rb
1275
+ - lib/plutonium/engine.rb
1276
+ - lib/plutonium/engine/validator.rb
1184
1277
  - lib/plutonium/helpers.rb
1185
1278
  - lib/plutonium/helpers/action_buttons_helper.rb
1186
1279
  - lib/plutonium/helpers/application_helper.rb
@@ -1194,37 +1287,81 @@ files:
1194
1287
  - lib/plutonium/helpers/turbo_helper.rb
1195
1288
  - lib/plutonium/helpers/turbo_stream_actions_helper.rb
1196
1289
  - lib/plutonium/icons.rb
1290
+ - lib/plutonium/interaction/README.md
1291
+ - lib/plutonium/interaction/base.rb
1292
+ - lib/plutonium/interaction/concerns/presentable.rb
1293
+ - lib/plutonium/interaction/concerns/workflow_dsl.rb
1294
+ - lib/plutonium/interaction/outcome.rb
1295
+ - lib/plutonium/interaction/response/base.rb
1296
+ - lib/plutonium/interaction/response/null.rb
1297
+ - lib/plutonium/interaction/response/redirect.rb
1298
+ - lib/plutonium/interaction/response/render.rb
1197
1299
  - lib/plutonium/lib/after_commit.rb
1198
1300
  - lib/plutonium/lib/bit_flags.rb
1199
- - lib/plutonium/pkg/app.rb
1200
- - lib/plutonium/pkg/base.rb
1201
- - lib/plutonium/pkg/concerns/resource_validatable.rb
1202
- - lib/plutonium/pkg/feature.rb
1203
- - lib/plutonium/policy/initializer.rb
1204
- - lib/plutonium/policy/scope.rb
1301
+ - lib/plutonium/lib/overlayed_hash.rb
1302
+ - lib/plutonium/lib/smart_cache.rb
1303
+ - lib/plutonium/models/has_cents.rb
1304
+ - lib/plutonium/package/engine.rb
1305
+ - lib/plutonium/portal/controller.rb
1306
+ - lib/plutonium/portal/dynamic_controllers.rb
1307
+ - lib/plutonium/portal/engine.rb
1205
1308
  - lib/plutonium/preserved__/field.rb.bk
1206
1309
  - lib/plutonium/preserved__/input.rb.bk
1207
- - lib/plutonium/pundit/context.rb
1208
- - lib/plutonium/pundit/policy_finder.rb
1209
1310
  - lib/plutonium/railtie.rb
1210
1311
  - lib/plutonium/refinements/parameter_refinements.rb
1211
1312
  - lib/plutonium/reloader.rb
1212
1313
  - lib/plutonium/resource/context.rb
1213
1314
  - lib/plutonium/resource/controller.rb
1315
+ - lib/plutonium/resource/controllers/authorizable.rb
1316
+ - lib/plutonium/resource/controllers/crud_actions.rb
1317
+ - lib/plutonium/resource/controllers/defineable.rb
1318
+ - lib/plutonium/resource/controllers/interactive_actions.rb
1319
+ - lib/plutonium/resource/controllers/presentable.rb
1320
+ - lib/plutonium/resource/controllers/queryable.rb
1321
+ - lib/plutonium/resource/definition.rb
1214
1322
  - lib/plutonium/resource/interaction.rb
1215
1323
  - lib/plutonium/resource/policy.rb
1216
- - lib/plutonium/resource/policy_context.rb
1217
1324
  - lib/plutonium/resource/presenter.rb
1218
1325
  - lib/plutonium/resource/query_object.rb
1219
1326
  - lib/plutonium/resource/record.rb
1220
- - lib/plutonium/resource_register.rb
1327
+ - lib/plutonium/resource/register.rb
1221
1328
  - lib/plutonium/rodauth/controller_methods.rb
1222
1329
  - lib/plutonium/routing/mapper_extensions.rb
1223
1330
  - lib/plutonium/routing/resource_registration.rb
1224
1331
  - lib/plutonium/routing/route_set_extensions.rb
1225
1332
  - lib/plutonium/simple_form/attachment_component.rb
1226
1333
  - lib/plutonium/simple_form/input_group_component.rb
1227
- - lib/plutonium/smart_cache.rb
1334
+ - lib/plutonium/ui.rb
1335
+ - lib/plutonium/ui/action_button.rb
1336
+ - lib/plutonium/ui/breadcrumbs.rb
1337
+ - lib/plutonium/ui/component/base.rb
1338
+ - lib/plutonium/ui/component/behaviour.rb
1339
+ - lib/plutonium/ui/component/kit.rb
1340
+ - lib/plutonium/ui/component/methods.rb
1341
+ - lib/plutonium/ui/display/base.rb
1342
+ - lib/plutonium/ui/display/component/association.rb
1343
+ - lib/plutonium/ui/display/resource.rb
1344
+ - lib/plutonium/ui/display/theme.rb
1345
+ - lib/plutonium/ui/dyna_frame/content.rb
1346
+ - lib/plutonium/ui/empty_card.rb
1347
+ - lib/plutonium/ui/form/base.rb
1348
+ - lib/plutonium/ui/form/resource.rb
1349
+ - lib/plutonium/ui/form/theme.rb
1350
+ - lib/plutonium/ui/page/base.rb
1351
+ - lib/plutonium/ui/page/edit.rb
1352
+ - lib/plutonium/ui/page/index.rb
1353
+ - lib/plutonium/ui/page/new.rb
1354
+ - lib/plutonium/ui/page/show.rb
1355
+ - lib/plutonium/ui/page_header.rb
1356
+ - lib/plutonium/ui/table/base.rb
1357
+ - lib/plutonium/ui/table/components/pagy_info.rb
1358
+ - lib/plutonium/ui/table/components/pagy_page_info.rb
1359
+ - lib/plutonium/ui/table/components/pagy_pagination.rb
1360
+ - lib/plutonium/ui/table/components/scopes_bar.rb
1361
+ - lib/plutonium/ui/table/components/search_bar.rb
1362
+ - lib/plutonium/ui/table/display_theme.rb
1363
+ - lib/plutonium/ui/table/resource.rb
1364
+ - lib/plutonium/ui/table/theme.rb
1228
1365
  - lib/plutonium/version.rb
1229
1366
  - lib/tasks/create_rodauth_admin.rake
1230
1367
  - package-lock.json
@@ -1291,11 +1428,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
1291
1428
  version: 3.2.2
1292
1429
  required_rubygems_version: !ruby/object:Gem::Requirement
1293
1430
  requirements:
1294
- - - ">="
1431
+ - - ">"
1295
1432
  - !ruby/object:Gem::Version
1296
- version: '0'
1433
+ version: 1.3.1
1297
1434
  requirements: []
1298
- rubygems_version: 3.5.11
1435
+ rubygems_version: 3.4.10
1299
1436
  signing_key:
1300
1437
  specification_version: 4
1301
1438
  summary: The ultimate Rapid Application Development Toolkit (RADKit) for Rails application
@@ -1,2 +0,0 @@
1
- class ResourcePresenter < Plutonium::Resource::Presenter
2
- end
@@ -1,2 +0,0 @@
1
- class ResourceQueryObject < Plutonium::Resource::QueryObject
2
- end
@@ -1,4 +0,0 @@
1
- module <%= package_name %>
2
- class ResourceQueryObject < ::ResourceQueryObject
3
- end
4
- end
@@ -1,34 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Plutonium
4
- module Concerns
5
- # Provides methods for validating Plutonium resources
6
- module ResourceValidatable
7
- extend ActiveSupport::Concern
8
-
9
- # Custom error class for invalid resources
10
- class InvalidResourceError < StandardError; end
11
-
12
- private
13
-
14
- # Validates if a given resource is a valid Plutonium::Resource::Record
15
- #
16
- # @param resource [Object] The resource to validate
17
- # @raise [InvalidResourceError] If the resource is not valid
18
- # @return [void]
19
- def validate_resource!(resource)
20
- unless valid_resource?(resource)
21
- raise InvalidResourceError, "#{resource} is not a valid Plutonium::Resource::Record"
22
- end
23
- end
24
-
25
- # Checks if a given resource is a valid Plutonium::Resource::Record
26
- #
27
- # @param resource [Object] The resource to check
28
- # @return [Boolean] True if the resource is valid, false otherwise
29
- def valid_resource?(resource)
30
- resource.is_a?(Class) && resource.include?(Plutonium::Resource::Record)
31
- end
32
- end
33
- end
34
- end
@@ -1,9 +0,0 @@
1
- require "active_support"
2
- require "active_model"
3
-
4
- module Plutonium
5
- module Config
6
- mattr_accessor :logo
7
- @@logo = "plutonium-logo.png"
8
- end
9
- end