solidus_admin 0.2.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (189) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +60 -6
  3. data/Rakefile +1 -0
  4. data/app/assets/builds/solidus_admin/tailwind.css +198 -163
  5. data/app/assets/stylesheets/solidus_admin/dark.css +1 -0
  6. data/app/assets/stylesheets/solidus_admin/dimmed.css +1 -0
  7. data/app/components/solidus_admin/adjustment_reasons/edit/component.html.erb +27 -0
  8. data/app/components/solidus_admin/adjustment_reasons/edit/component.rb +12 -0
  9. data/app/components/solidus_admin/adjustment_reasons/edit/component.yml +8 -0
  10. data/app/components/solidus_admin/adjustment_reasons/index/component.rb +19 -2
  11. data/app/components/solidus_admin/adjustment_reasons/new/component.html.erb +28 -0
  12. data/app/components/solidus_admin/adjustment_reasons/new/component.rb +12 -0
  13. data/app/components/solidus_admin/adjustment_reasons/new/component.yml +8 -0
  14. data/app/components/solidus_admin/base_component.rb +0 -25
  15. data/app/components/solidus_admin/option_types/index/component.rb +1 -1
  16. data/app/components/solidus_admin/orders/index/component.rb +8 -8
  17. data/app/components/solidus_admin/orders/index/component.yml +1 -0
  18. data/app/components/solidus_admin/orders/show/address/component.html.erb +56 -54
  19. data/app/components/solidus_admin/orders/show/adjustments/index/adjustable/component.rb +27 -0
  20. data/app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_line_item/component.rb +14 -0
  21. data/app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_order/component.rb +11 -0
  22. data/app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_shipment/component.rb +15 -0
  23. data/app/components/solidus_admin/orders/show/adjustments/index/component.rb +147 -0
  24. data/app/components/solidus_admin/orders/show/adjustments/index/component.yml +21 -0
  25. data/app/components/solidus_admin/orders/show/adjustments/index/source/component.rb +26 -0
  26. data/app/components/solidus_admin/orders/show/adjustments/index/source/spree_tax_rate/component.rb +17 -0
  27. data/app/components/solidus_admin/orders/show/adjustments/index/source/spree_unit_cancel/component.rb +7 -0
  28. data/app/components/solidus_admin/orders/show/component.html.erb +7 -3
  29. data/app/components/solidus_admin/orders/show/component.rb +8 -0
  30. data/app/components/solidus_admin/orders/show/email/component.html.erb +18 -13
  31. data/app/components/solidus_admin/orders/show/email/component.rb +0 -4
  32. data/app/components/solidus_admin/orders/show/summary/component.html.erb +1 -1
  33. data/app/components/solidus_admin/payment_methods/index/component.rb +1 -1
  34. data/app/components/solidus_admin/products/index/component.rb +8 -5
  35. data/app/components/solidus_admin/products/show/component.html.erb +14 -3
  36. data/app/components/solidus_admin/products/status/component.rb +4 -1
  37. data/app/components/solidus_admin/products/status/component.yml +1 -0
  38. data/app/components/solidus_admin/properties/index/component.rb +1 -1
  39. data/app/components/solidus_admin/refund_reasons/edit/component.html.erb +27 -0
  40. data/app/components/solidus_admin/refund_reasons/edit/component.rb +12 -0
  41. data/app/components/solidus_admin/refund_reasons/edit/component.yml +8 -0
  42. data/app/components/solidus_admin/refund_reasons/index/component.rb +11 -4
  43. data/app/components/solidus_admin/refund_reasons/new/component.html.erb +27 -0
  44. data/app/components/solidus_admin/refund_reasons/new/component.rb +12 -0
  45. data/app/components/solidus_admin/refund_reasons/new/component.yml +6 -0
  46. data/app/components/solidus_admin/return_reasons/edit/component.html.erb +26 -0
  47. data/app/components/solidus_admin/return_reasons/edit/component.rb +12 -0
  48. data/app/components/solidus_admin/return_reasons/edit/component.yml +8 -0
  49. data/app/components/solidus_admin/return_reasons/index/component.rb +20 -2
  50. data/app/components/solidus_admin/return_reasons/new/component.html.erb +27 -0
  51. data/app/components/solidus_admin/return_reasons/new/component.rb +12 -0
  52. data/app/components/solidus_admin/return_reasons/new/component.yml +8 -0
  53. data/app/components/solidus_admin/roles/edit/component.html.erb +33 -0
  54. data/app/components/solidus_admin/roles/edit/component.rb +20 -0
  55. data/app/components/solidus_admin/roles/edit/component.yml +19 -0
  56. data/app/components/solidus_admin/roles/index/component.rb +70 -0
  57. data/app/components/solidus_admin/roles/index/component.yml +6 -0
  58. data/app/components/solidus_admin/roles/new/component.html.erb +33 -0
  59. data/app/components/solidus_admin/roles/new/component.rb +20 -0
  60. data/app/components/solidus_admin/roles/new/component.yml +19 -0
  61. data/app/components/solidus_admin/shipping_categories/edit/component.html.erb +16 -0
  62. data/app/components/solidus_admin/shipping_categories/edit/component.rb +12 -0
  63. data/app/components/solidus_admin/shipping_categories/edit/component.yml +6 -0
  64. data/app/components/solidus_admin/shipping_categories/index/component.rb +20 -3
  65. data/app/components/solidus_admin/shipping_categories/new/component.html.erb +17 -0
  66. data/app/components/solidus_admin/shipping_categories/new/component.rb +12 -0
  67. data/app/components/solidus_admin/shipping_categories/new/component.yml +6 -0
  68. data/app/components/solidus_admin/shipping_methods/index/component.rb +2 -2
  69. data/app/components/solidus_admin/stock_items/edit/component.html.erb +66 -72
  70. data/app/components/solidus_admin/stock_items/edit/component.rb +0 -5
  71. data/app/components/solidus_admin/stock_items/index/component.rb +5 -6
  72. data/app/components/solidus_admin/stock_locations/index/component.rb +1 -1
  73. data/app/components/solidus_admin/store_credit_reasons/edit/component.html.erb +26 -0
  74. data/app/components/solidus_admin/store_credit_reasons/edit/component.rb +12 -0
  75. data/app/components/solidus_admin/store_credit_reasons/edit/component.yml +8 -0
  76. data/app/components/solidus_admin/store_credit_reasons/index/component.rb +11 -4
  77. data/app/components/solidus_admin/store_credit_reasons/new/component.html.erb +27 -0
  78. data/app/components/solidus_admin/store_credit_reasons/new/component.rb +12 -0
  79. data/app/components/solidus_admin/store_credit_reasons/new/component.yml +8 -0
  80. data/app/components/solidus_admin/stores/index/component.rb +1 -1
  81. data/app/components/solidus_admin/tax_categories/edit/component.html.erb +28 -0
  82. data/app/components/solidus_admin/tax_categories/edit/component.rb +12 -0
  83. data/app/components/solidus_admin/tax_categories/edit/component.yml +8 -0
  84. data/app/components/solidus_admin/tax_categories/index/component.rb +11 -4
  85. data/app/components/solidus_admin/tax_categories/new/component.html.erb +28 -0
  86. data/app/components/solidus_admin/tax_categories/new/component.rb +12 -0
  87. data/app/components/solidus_admin/tax_categories/new/component.yml +8 -0
  88. data/app/components/solidus_admin/tax_rates/index/component.rb +3 -3
  89. data/app/components/solidus_admin/taxonomies/index/component.rb +1 -1
  90. data/app/components/solidus_admin/ui/button/component.rb +1 -1
  91. data/app/components/solidus_admin/ui/checkbox_row/component.html.erb +29 -0
  92. data/app/components/solidus_admin/ui/checkbox_row/component.rb +11 -0
  93. data/app/components/solidus_admin/ui/forms/address/component.html.erb +27 -9
  94. data/app/components/solidus_admin/ui/forms/address/component.js +38 -13
  95. data/app/components/solidus_admin/ui/forms/search/component.html.erb +2 -3
  96. data/app/components/solidus_admin/ui/forms/search/component.js +3 -3
  97. data/app/components/solidus_admin/ui/modal/component.html.erb +7 -7
  98. data/app/components/solidus_admin/ui/modal/component.js +7 -0
  99. data/app/components/solidus_admin/ui/modal/component.rb +1 -1
  100. data/app/components/solidus_admin/ui/pages/index/component.html.erb +17 -3
  101. data/app/components/solidus_admin/ui/pages/index/component.rb +29 -43
  102. data/app/components/solidus_admin/ui/panel/component.html.erb +5 -16
  103. data/app/components/solidus_admin/ui/panel/component.rb +11 -7
  104. data/app/components/solidus_admin/ui/table/component.js +31 -2
  105. data/app/components/solidus_admin/ui/table/component.rb +23 -7
  106. data/app/components/solidus_admin/ui/table/component.yml +1 -0
  107. data/app/components/solidus_admin/ui/thumbnail/component.rb +1 -1
  108. data/app/components/solidus_admin/ui/thumbnail_with_caption/component.html.erb +17 -0
  109. data/app/components/solidus_admin/ui/thumbnail_with_caption/component.rb +15 -0
  110. data/app/components/solidus_admin/users/addresses/component.html.erb +46 -0
  111. data/app/components/solidus_admin/users/addresses/component.rb +61 -0
  112. data/app/components/solidus_admin/users/addresses/component.yml +14 -0
  113. data/app/components/solidus_admin/users/edit/api_access/component.html.erb +49 -0
  114. data/app/components/solidus_admin/users/edit/api_access/component.js +9 -0
  115. data/app/components/solidus_admin/users/edit/api_access/component.rb +7 -0
  116. data/app/components/solidus_admin/users/edit/api_access/component.yml +10 -0
  117. data/app/components/solidus_admin/users/edit/component.html.erb +52 -0
  118. data/app/components/solidus_admin/users/edit/component.rb +51 -0
  119. data/app/components/solidus_admin/users/edit/component.yml +12 -0
  120. data/app/components/solidus_admin/users/index/component.rb +10 -8
  121. data/app/components/solidus_admin/users/items/component.html.erb +41 -0
  122. data/app/components/solidus_admin/users/items/component.rb +170 -0
  123. data/app/components/solidus_admin/users/items/component.yml +16 -0
  124. data/app/components/solidus_admin/users/orders/component.html.erb +42 -0
  125. data/app/components/solidus_admin/users/orders/component.rb +131 -0
  126. data/app/components/solidus_admin/users/orders/component.yml +12 -0
  127. data/app/components/solidus_admin/users/stats/component.html.erb +11 -0
  128. data/app/components/solidus_admin/users/stats/component.rb +9 -0
  129. data/app/components/solidus_admin/users/stats/component.yml +2 -0
  130. data/app/components/solidus_admin/users_and_roles/component.rb +24 -0
  131. data/app/components/solidus_admin/users_and_roles/component.yml +2 -0
  132. data/app/components/solidus_admin/zones/index/component.rb +1 -1
  133. data/app/controllers/solidus_admin/addresses_controller.rb +6 -1
  134. data/app/controllers/solidus_admin/adjustment_reasons_controller.rb +85 -10
  135. data/app/controllers/solidus_admin/adjustments_controller.rb +57 -0
  136. data/app/controllers/solidus_admin/customers_controller.rb +5 -1
  137. data/app/controllers/solidus_admin/orders_controller.rb +5 -1
  138. data/app/controllers/solidus_admin/products_controller.rb +11 -0
  139. data/app/controllers/solidus_admin/refund_reasons_controller.rb +85 -10
  140. data/app/controllers/solidus_admin/reimbursement_types_controller.rb +0 -5
  141. data/app/controllers/solidus_admin/return_reasons_controller.rb +85 -10
  142. data/app/controllers/solidus_admin/roles_controller.rb +118 -0
  143. data/app/controllers/solidus_admin/shipping_categories_controller.rb +87 -10
  144. data/app/controllers/solidus_admin/shipping_methods_controller.rb +0 -5
  145. data/app/controllers/solidus_admin/stock_items_controller.rb +6 -6
  146. data/app/controllers/solidus_admin/stock_locations_controller.rb +0 -5
  147. data/app/controllers/solidus_admin/store_credit_reasons_controller.rb +85 -10
  148. data/app/controllers/solidus_admin/stores_controller.rb +0 -5
  149. data/app/controllers/solidus_admin/tax_categories_controller.rb +89 -10
  150. data/app/controllers/solidus_admin/tax_rates_controller.rb +0 -5
  151. data/app/controllers/solidus_admin/users_controller.rb +85 -6
  152. data/app/controllers/solidus_admin/zones_controller.rb +0 -5
  153. data/app/helpers/solidus_admin/last_login_helper.rb +16 -0
  154. data/app/helpers/solidus_admin/permission_sets_helper.rb +32 -0
  155. data/app/views/layouts/solidus_admin/application.html.erb +2 -1
  156. data/config/locales/adjustment_reasons.en.yml +5 -1
  157. data/config/locales/adjustments.en.yml +10 -0
  158. data/config/locales/refund_reasons.en.yml +10 -0
  159. data/config/locales/return_reasons.en.yml +5 -1
  160. data/config/locales/roles.en.yml +10 -0
  161. data/config/locales/shipping_categories.en.yml +4 -0
  162. data/config/locales/store_credit_reasons.en.yml +5 -1
  163. data/config/locales/tax_categories.en.yml +4 -0
  164. data/config/locales/users.en.yml +10 -0
  165. data/config/routes.rb +24 -7
  166. data/docs/components.md +109 -0
  167. data/docs/{customizing_view_components.md → customizing_components.md} +2 -7
  168. data/docs/index_pages.md +146 -0
  169. data/docs/{customizing_menu_items.md → menu_items.md} +1 -1
  170. data/docs/stimulusjs.md +85 -0
  171. data/docs/{customizing_tailwindcss.md → tailwindcss.md} +27 -8
  172. data/lib/solidus_admin/component_registry.rb +40 -0
  173. data/lib/solidus_admin/configuration.rb +2 -26
  174. data/lib/solidus_admin/install_tailwindcss.rb +4 -2
  175. data/lib/solidus_admin/testing_support/admin_assets.rb +10 -0
  176. data/lib/solidus_admin/testing_support/component_helpers.rb +27 -0
  177. data/lib/solidus_admin/testing_support/dummy_app/rake_tasks.rb +60 -0
  178. data/lib/solidus_admin/testing_support/feature_helpers.rb +34 -0
  179. data/lib/solidus_admin/version.rb +1 -1
  180. data/solidus_admin.gemspec +7 -3
  181. metadata +108 -19
  182. data/app/components/solidus_admin/promotion_categories/index/component.rb +0 -56
  183. data/app/components/solidus_admin/promotions/index/component.rb +0 -104
  184. data/app/components/solidus_admin/promotions/index/component.yml +0 -10
  185. data/app/controllers/solidus_admin/promotion_categories_controller.rb +0 -29
  186. data/app/controllers/solidus_admin/promotions_controller.rb +0 -46
  187. data/config/locales/promotion_categories.en.yml +0 -6
  188. data/config/locales/promotions.en.yml +0 -6
  189. data/config/locales/refund_reasons_.en.yml +0 -6
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-03 00:00:00.000000000 Z
11
+ date: 2024-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: geared_pagination
@@ -92,28 +92,28 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: '1.4'
95
+ version: '2.0'
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: '1.4'
102
+ version: '2.0'
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: view_component
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
107
  - - "~>"
108
108
  - !ruby/object:Gem::Version
109
- version: '3.3'
109
+ version: '3.9'
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: '3.3'
116
+ version: '3.9'
117
117
  description: Admin interface for the Solidus e-commerce framework.
118
118
  email: contact@solidus.io
119
119
  executables: []
@@ -137,7 +137,13 @@ files:
137
137
  - app/assets/stylesheets/solidus_admin/application.tailwind.css
138
138
  - app/assets/stylesheets/solidus_admin/dark.css
139
139
  - app/assets/stylesheets/solidus_admin/dimmed.css
140
+ - app/components/solidus_admin/adjustment_reasons/edit/component.html.erb
141
+ - app/components/solidus_admin/adjustment_reasons/edit/component.rb
142
+ - app/components/solidus_admin/adjustment_reasons/edit/component.yml
140
143
  - app/components/solidus_admin/adjustment_reasons/index/component.rb
144
+ - app/components/solidus_admin/adjustment_reasons/new/component.html.erb
145
+ - app/components/solidus_admin/adjustment_reasons/new/component.rb
146
+ - app/components/solidus_admin/adjustment_reasons/new/component.yml
141
147
  - app/components/solidus_admin/base_component.rb
142
148
  - app/components/solidus_admin/layout/feedback/component.html.erb
143
149
  - app/components/solidus_admin/layout/feedback/component.rb
@@ -168,6 +174,15 @@ files:
168
174
  - app/components/solidus_admin/orders/show/address/component.js
169
175
  - app/components/solidus_admin/orders/show/address/component.rb
170
176
  - app/components/solidus_admin/orders/show/address/component.yml
177
+ - app/components/solidus_admin/orders/show/adjustments/index/adjustable/component.rb
178
+ - app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_line_item/component.rb
179
+ - app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_order/component.rb
180
+ - app/components/solidus_admin/orders/show/adjustments/index/adjustable/spree_shipment/component.rb
181
+ - app/components/solidus_admin/orders/show/adjustments/index/component.rb
182
+ - app/components/solidus_admin/orders/show/adjustments/index/component.yml
183
+ - app/components/solidus_admin/orders/show/adjustments/index/source/component.rb
184
+ - app/components/solidus_admin/orders/show/adjustments/index/source/spree_tax_rate/component.rb
185
+ - app/components/solidus_admin/orders/show/adjustments/index/source/spree_unit_cancel/component.rb
171
186
  - app/components/solidus_admin/orders/show/component.html.erb
172
187
  - app/components/solidus_admin/orders/show/component.js
173
188
  - app/components/solidus_admin/orders/show/component.rb
@@ -196,18 +211,41 @@ files:
196
211
  - app/components/solidus_admin/products/status/component.yml
197
212
  - app/components/solidus_admin/products/stock/component.rb
198
213
  - app/components/solidus_admin/products/stock/component.yml
199
- - app/components/solidus_admin/promotion_categories/index/component.rb
200
- - app/components/solidus_admin/promotions/index/component.rb
201
- - app/components/solidus_admin/promotions/index/component.yml
202
214
  - app/components/solidus_admin/properties/index/component.rb
215
+ - app/components/solidus_admin/refund_reasons/edit/component.html.erb
216
+ - app/components/solidus_admin/refund_reasons/edit/component.rb
217
+ - app/components/solidus_admin/refund_reasons/edit/component.yml
203
218
  - app/components/solidus_admin/refund_reasons/index/component.rb
219
+ - app/components/solidus_admin/refund_reasons/new/component.html.erb
220
+ - app/components/solidus_admin/refund_reasons/new/component.rb
221
+ - app/components/solidus_admin/refund_reasons/new/component.yml
204
222
  - app/components/solidus_admin/refunds_and_returns/component.rb
205
223
  - app/components/solidus_admin/refunds_and_returns/component.yml
206
224
  - app/components/solidus_admin/reimbursement_types/index/component.rb
225
+ - app/components/solidus_admin/return_reasons/edit/component.html.erb
226
+ - app/components/solidus_admin/return_reasons/edit/component.rb
227
+ - app/components/solidus_admin/return_reasons/edit/component.yml
207
228
  - app/components/solidus_admin/return_reasons/index/component.rb
229
+ - app/components/solidus_admin/return_reasons/new/component.html.erb
230
+ - app/components/solidus_admin/return_reasons/new/component.rb
231
+ - app/components/solidus_admin/return_reasons/new/component.yml
232
+ - app/components/solidus_admin/roles/edit/component.html.erb
233
+ - app/components/solidus_admin/roles/edit/component.rb
234
+ - app/components/solidus_admin/roles/edit/component.yml
235
+ - app/components/solidus_admin/roles/index/component.rb
236
+ - app/components/solidus_admin/roles/index/component.yml
237
+ - app/components/solidus_admin/roles/new/component.html.erb
238
+ - app/components/solidus_admin/roles/new/component.rb
239
+ - app/components/solidus_admin/roles/new/component.yml
208
240
  - app/components/solidus_admin/shipping/component.rb
209
241
  - app/components/solidus_admin/shipping/component.yml
242
+ - app/components/solidus_admin/shipping_categories/edit/component.html.erb
243
+ - app/components/solidus_admin/shipping_categories/edit/component.rb
244
+ - app/components/solidus_admin/shipping_categories/edit/component.yml
210
245
  - app/components/solidus_admin/shipping_categories/index/component.rb
246
+ - app/components/solidus_admin/shipping_categories/new/component.html.erb
247
+ - app/components/solidus_admin/shipping_categories/new/component.rb
248
+ - app/components/solidus_admin/shipping_categories/new/component.yml
211
249
  - app/components/solidus_admin/shipping_methods/index/component.rb
212
250
  - app/components/solidus_admin/stock_items/edit/component.html.erb
213
251
  - app/components/solidus_admin/stock_items/edit/component.js
@@ -217,9 +255,21 @@ files:
217
255
  - app/components/solidus_admin/stock_items/index/component.yml
218
256
  - app/components/solidus_admin/stock_locations/index/component.rb
219
257
  - app/components/solidus_admin/stock_locations/index/component.yml
258
+ - app/components/solidus_admin/store_credit_reasons/edit/component.html.erb
259
+ - app/components/solidus_admin/store_credit_reasons/edit/component.rb
260
+ - app/components/solidus_admin/store_credit_reasons/edit/component.yml
220
261
  - app/components/solidus_admin/store_credit_reasons/index/component.rb
262
+ - app/components/solidus_admin/store_credit_reasons/new/component.html.erb
263
+ - app/components/solidus_admin/store_credit_reasons/new/component.rb
264
+ - app/components/solidus_admin/store_credit_reasons/new/component.yml
221
265
  - app/components/solidus_admin/stores/index/component.rb
266
+ - app/components/solidus_admin/tax_categories/edit/component.html.erb
267
+ - app/components/solidus_admin/tax_categories/edit/component.rb
268
+ - app/components/solidus_admin/tax_categories/edit/component.yml
222
269
  - app/components/solidus_admin/tax_categories/index/component.rb
270
+ - app/components/solidus_admin/tax_categories/new/component.html.erb
271
+ - app/components/solidus_admin/tax_categories/new/component.rb
272
+ - app/components/solidus_admin/tax_categories/new/component.yml
223
273
  - app/components/solidus_admin/tax_rates/index/component.rb
224
274
  - app/components/solidus_admin/taxes/component.rb
225
275
  - app/components/solidus_admin/taxes/component.yml
@@ -227,6 +277,8 @@ files:
227
277
  - app/components/solidus_admin/ui/badge/component.rb
228
278
  - app/components/solidus_admin/ui/badge/component.yml
229
279
  - app/components/solidus_admin/ui/button/component.rb
280
+ - app/components/solidus_admin/ui/checkbox_row/component.html.erb
281
+ - app/components/solidus_admin/ui/checkbox_row/component.rb
230
282
  - app/components/solidus_admin/ui/details_list/component.html.erb
231
283
  - app/components/solidus_admin/ui/details_list/component.rb
232
284
  - app/components/solidus_admin/ui/dropdown/component.html.erb
@@ -256,6 +308,7 @@ files:
256
308
  - app/components/solidus_admin/ui/icon/component.rb
257
309
  - app/components/solidus_admin/ui/icon/names.txt
258
310
  - app/components/solidus_admin/ui/modal/component.html.erb
311
+ - app/components/solidus_admin/ui/modal/component.js
259
312
  - app/components/solidus_admin/ui/modal/component.rb
260
313
  - app/components/solidus_admin/ui/modal/component.yml
261
314
  - app/components/solidus_admin/ui/pages/index/component.html.erb
@@ -280,6 +333,8 @@ files:
280
333
  - app/components/solidus_admin/ui/table/ransack_filter/component.yml
281
334
  - app/components/solidus_admin/ui/table/toolbar/component.rb
282
335
  - app/components/solidus_admin/ui/thumbnail/component.rb
336
+ - app/components/solidus_admin/ui/thumbnail_with_caption/component.html.erb
337
+ - app/components/solidus_admin/ui/thumbnail_with_caption/component.rb
283
338
  - app/components/solidus_admin/ui/toast/component.html.erb
284
339
  - app/components/solidus_admin/ui/toast/component.js
285
340
  - app/components/solidus_admin/ui/toast/component.rb
@@ -288,12 +343,34 @@ files:
288
343
  - app/components/solidus_admin/ui/toggletip/component.js
289
344
  - app/components/solidus_admin/ui/toggletip/component.rb
290
345
  - app/components/solidus_admin/ui/toggletip/component.yml
346
+ - app/components/solidus_admin/users/addresses/component.html.erb
347
+ - app/components/solidus_admin/users/addresses/component.rb
348
+ - app/components/solidus_admin/users/addresses/component.yml
349
+ - app/components/solidus_admin/users/edit/api_access/component.html.erb
350
+ - app/components/solidus_admin/users/edit/api_access/component.js
351
+ - app/components/solidus_admin/users/edit/api_access/component.rb
352
+ - app/components/solidus_admin/users/edit/api_access/component.yml
353
+ - app/components/solidus_admin/users/edit/component.html.erb
354
+ - app/components/solidus_admin/users/edit/component.rb
355
+ - app/components/solidus_admin/users/edit/component.yml
291
356
  - app/components/solidus_admin/users/index/component.rb
292
357
  - app/components/solidus_admin/users/index/component.yml
358
+ - app/components/solidus_admin/users/items/component.html.erb
359
+ - app/components/solidus_admin/users/items/component.rb
360
+ - app/components/solidus_admin/users/items/component.yml
361
+ - app/components/solidus_admin/users/orders/component.html.erb
362
+ - app/components/solidus_admin/users/orders/component.rb
363
+ - app/components/solidus_admin/users/orders/component.yml
364
+ - app/components/solidus_admin/users/stats/component.html.erb
365
+ - app/components/solidus_admin/users/stats/component.rb
366
+ - app/components/solidus_admin/users/stats/component.yml
367
+ - app/components/solidus_admin/users_and_roles/component.rb
368
+ - app/components/solidus_admin/users_and_roles/component.yml
293
369
  - app/components/solidus_admin/zones/index/component.rb
294
370
  - app/controllers/solidus_admin/accounts_controller.rb
295
371
  - app/controllers/solidus_admin/addresses_controller.rb
296
372
  - app/controllers/solidus_admin/adjustment_reasons_controller.rb
373
+ - app/controllers/solidus_admin/adjustments_controller.rb
297
374
  - app/controllers/solidus_admin/authentication_adapters/backend.rb
298
375
  - app/controllers/solidus_admin/base_controller.rb
299
376
  - app/controllers/solidus_admin/controller_helpers/authentication.rb
@@ -308,12 +385,11 @@ files:
308
385
  - app/controllers/solidus_admin/orders_controller.rb
309
386
  - app/controllers/solidus_admin/payment_methods_controller.rb
310
387
  - app/controllers/solidus_admin/products_controller.rb
311
- - app/controllers/solidus_admin/promotion_categories_controller.rb
312
- - app/controllers/solidus_admin/promotions_controller.rb
313
388
  - app/controllers/solidus_admin/properties_controller.rb
314
389
  - app/controllers/solidus_admin/refund_reasons_controller.rb
315
390
  - app/controllers/solidus_admin/reimbursement_types_controller.rb
316
391
  - app/controllers/solidus_admin/return_reasons_controller.rb
392
+ - app/controllers/solidus_admin/roles_controller.rb
317
393
  - app/controllers/solidus_admin/shipping_categories_controller.rb
318
394
  - app/controllers/solidus_admin/shipping_methods_controller.rb
319
395
  - app/controllers/solidus_admin/stock_items_controller.rb
@@ -326,7 +402,9 @@ files:
326
402
  - app/controllers/solidus_admin/users_controller.rb
327
403
  - app/controllers/solidus_admin/zones_controller.rb
328
404
  - app/helpers/solidus_admin/components_helper.rb
405
+ - app/helpers/solidus_admin/last_login_helper.rb
329
406
  - app/helpers/solidus_admin/layout_helper.rb
407
+ - app/helpers/solidus_admin/permission_sets_helper.rb
330
408
  - app/javascript/solidus_admin/application.js
331
409
  - app/javascript/solidus_admin/controllers/application.js
332
410
  - app/javascript/solidus_admin/controllers/components.js
@@ -344,6 +422,7 @@ files:
344
422
  - config/importmap.rb
345
423
  - config/initializers/view_component.rb
346
424
  - config/locales/adjustment_reasons.en.yml
425
+ - config/locales/adjustments.en.yml
347
426
  - config/locales/customers.en.yml
348
427
  - config/locales/errors.en.yml
349
428
  - config/locales/line_items.en.yml
@@ -352,12 +431,11 @@ files:
352
431
  - config/locales/orders.en.yml
353
432
  - config/locales/payment_methods.en.yml
354
433
  - config/locales/products.en.yml
355
- - config/locales/promotion_categories.en.yml
356
- - config/locales/promotions.en.yml
357
434
  - config/locales/properties.en.yml
358
- - config/locales/refund_reasons_.en.yml
435
+ - config/locales/refund_reasons.en.yml
359
436
  - config/locales/reimbursement_types.en.yml
360
437
  - config/locales/return_reasons.en.yml
438
+ - config/locales/roles.en.yml
361
439
  - config/locales/shipping_categories.en.yml
362
440
  - config/locales/shipping_methods.en.yml
363
441
  - config/locales/stock_items.en.yml
@@ -371,9 +449,12 @@ files:
371
449
  - config/locales/zones.en.yml
372
450
  - config/routes.rb
373
451
  - config/tailwind.config.js
374
- - docs/customizing_menu_items.md
375
- - docs/customizing_tailwindcss.md
376
- - docs/customizing_view_components.md
452
+ - docs/components.md
453
+ - docs/customizing_components.md
454
+ - docs/index_pages.md
455
+ - docs/menu_items.md
456
+ - docs/stimulusjs.md
457
+ - docs/tailwindcss.md
377
458
  - lib/generators/solidus_admin/component/USAGE
378
459
  - lib/generators/solidus_admin/component/component_generator.rb
379
460
  - lib/generators/solidus_admin/component/templates/component.html.erb.tt
@@ -387,21 +468,29 @@ files:
387
468
  - lib/generators/solidus_admin/install/templates/config/initializers/solidus_admin.rb.tt
388
469
  - lib/solidus_admin.rb
389
470
  - lib/solidus_admin/admin_resources.rb
471
+ - lib/solidus_admin/component_registry.rb
390
472
  - lib/solidus_admin/configuration.rb
391
473
  - lib/solidus_admin/engine.rb
392
474
  - lib/solidus_admin/importmap.rb
393
475
  - lib/solidus_admin/install_tailwindcss.rb
394
476
  - lib/solidus_admin/menu_item.rb
395
477
  - lib/solidus_admin/preview.rb
478
+ - lib/solidus_admin/testing_support/admin_assets.rb
479
+ - lib/solidus_admin/testing_support/component_helpers.rb
480
+ - lib/solidus_admin/testing_support/dummy_app/rake_tasks.rb
481
+ - lib/solidus_admin/testing_support/feature_helpers.rb
396
482
  - lib/solidus_admin/version.rb
397
483
  - lib/tasks/importmap.rake
398
484
  - lib/tasks/tailwind.rake
399
485
  - solidus_admin.gemspec
400
- homepage: http://solidus.io
486
+ homepage: https://github.com/solidusio/solidus/blob/main/admin/README.md
401
487
  licenses:
402
488
  - BSD-3-Clause
403
489
  metadata:
404
490
  rubygems_mfa_required: 'true'
491
+ homepage_uri: https://github.com/solidusio/solidus/blob/main/admin/README.md
492
+ source_code_uri: https://github.com/solidusio/solidus/tree/main/api
493
+ changelog_uri: https://github.com/solidusio/solidus/releases?q=%22solidus_admin%2Fv0%22&expanded=true
405
494
  post_install_message:
406
495
  rdoc_options: []
407
496
  require_paths:
@@ -417,7 +506,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
417
506
  - !ruby/object:Gem::Version
418
507
  version: 1.8.23
419
508
  requirements: []
420
- rubygems_version: 3.5.3
509
+ rubygems_version: 3.5.16
421
510
  signing_key:
422
511
  specification_version: 4
423
512
  summary: Admin interface for the Solidus e-commerce framework.
@@ -1,56 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class SolidusAdmin::PromotionCategories::Index::Component < SolidusAdmin::UI::Pages::Index::Component
4
- def model_class
5
- Spree::PromotionCategory
6
- end
7
-
8
- def row_url(promotion_category)
9
- spree.edit_admin_promotion_category_path(promotion_category)
10
- end
11
-
12
- def page_actions
13
- render component("ui/button").new(
14
- tag: :a,
15
- text: t('.add'),
16
- href: spree.new_admin_promotion_category_path,
17
- icon: "add-line",
18
- )
19
- end
20
-
21
- def batch_actions
22
- [
23
- {
24
- display_name: t('.batch_actions.delete'),
25
- action: solidus_admin.promotion_categories_path,
26
- method: :delete,
27
- icon: 'delete-bin-7-line',
28
- },
29
- ]
30
- end
31
-
32
- def columns
33
- [
34
- name_column,
35
- code_column,
36
- ]
37
- end
38
-
39
- def name_column
40
- {
41
- header: :name,
42
- data: ->(promotion_category) do
43
- content_tag :div, promotion_category.name
44
- end
45
- }
46
- end
47
-
48
- def code_column
49
- {
50
- header: :code,
51
- data: ->(promotion_category) do
52
- content_tag :div, promotion_category.code
53
- end
54
- }
55
- end
56
- end
@@ -1,104 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class SolidusAdmin::Promotions::Index::Component < SolidusAdmin::UI::Pages::Index::Component
4
- def model_class
5
- Spree::Promotion
6
- end
7
-
8
- def search_key
9
- :name_or_codes_value_or_path_or_description_cont
10
- end
11
-
12
- def search_url
13
- solidus_admin.promotions_path
14
- end
15
-
16
- def row_url(promotion)
17
- spree.admin_promotion_path(promotion)
18
- end
19
-
20
- def page_actions
21
- render component("ui/button").new(
22
- tag: :a,
23
- text: t('.add'),
24
- href: spree.new_admin_promotion_path,
25
- icon: "add-line",
26
- )
27
- end
28
-
29
- def batch_actions
30
- [
31
- {
32
- display_name: t('.batch_actions.delete'),
33
- action: solidus_admin.promotions_path,
34
- method: :delete,
35
- icon: 'delete-bin-7-line',
36
- },
37
- ]
38
- end
39
-
40
- def scopes
41
- [
42
- { name: :active, label: t('.scopes.active'), default: true },
43
- { name: :draft, label: t('.scopes.draft') },
44
- { name: :future, label: t('.scopes.future') },
45
- { name: :expired, label: t('.scopes.expired') },
46
- { name: :all, label: t('.scopes.all') },
47
- ]
48
- end
49
-
50
- def filters
51
- [
52
- {
53
- presentation: Spree::PromotionCategory.model_name.human.pluralize,
54
- attribute: "promotion_category_id",
55
- predicate: "in",
56
- options: Spree::PromotionCategory.pluck(:name, :id)
57
- }
58
- ]
59
- end
60
-
61
- def columns
62
- [
63
- {
64
- header: :name,
65
- data: ->(promotion) do
66
- content_tag :div, promotion.name
67
- end
68
- },
69
- {
70
- header: :code,
71
- data: ->(promotion) do
72
- count = promotion.codes.count
73
- (count == 1) ? promotion.codes.pick(:value) : t('spree.number_of_codes', count: count)
74
- end
75
- },
76
- {
77
- header: :status,
78
- data: ->(promotion) do
79
- if promotion.active?
80
- render component('ui/badge').new(name: t('.status.active'), color: :green)
81
- else
82
- render component('ui/badge').new(name: t('.status.inactive'), color: :graphite_light)
83
- end
84
- end
85
- },
86
- {
87
- header: :usage_limit,
88
- data: ->(promotion) { promotion.usage_limit || icon_tag('infinity-line') }
89
- },
90
- {
91
- header: :uses,
92
- data: ->(promotion) { promotion.usage_count }
93
- },
94
- {
95
- header: :starts_at,
96
- data: ->(promotion) { promotion.starts_at ? l(promotion.starts_at, format: :long) : icon_tag('infinity-line') }
97
- },
98
- {
99
- header: :expires_at,
100
- data: ->(promotion) { promotion.expires_at ? l(promotion.expires_at, format: :long) : icon_tag('infinity-line') }
101
- },
102
- ]
103
- end
104
- end
@@ -1,10 +0,0 @@
1
- en:
2
- scopes:
3
- active: Active
4
- draft: Draft
5
- future: Future
6
- expired: Expired
7
- all: All
8
- status:
9
- active: Active
10
- inactive: Inactive
@@ -1,29 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusAdmin
4
- class PromotionCategoriesController < SolidusAdmin::BaseController
5
- include SolidusAdmin::ControllerHelpers::Search
6
-
7
- def index
8
- promotion_categories = apply_search_to(
9
- Spree::PromotionCategory.all,
10
- param: :q,
11
- )
12
-
13
- set_page_and_extract_portion_from(promotion_categories)
14
-
15
- respond_to do |format|
16
- format.html { render component('promotion_categories/index').new(page: @page) }
17
- end
18
- end
19
-
20
- def destroy
21
- @promotion_categories = Spree::PromotionCategory.where(id: params[:id])
22
-
23
- Spree::PromotionCategory.transaction { @promotion_categories.destroy_all }
24
-
25
- flash[:notice] = t('.success')
26
- redirect_back_or_to promotion_categories_path, status: :see_other
27
- end
28
- end
29
- end
@@ -1,46 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module SolidusAdmin
4
- class PromotionsController < SolidusAdmin::BaseController
5
- include SolidusAdmin::ControllerHelpers::Search
6
-
7
- search_scope(:active, default: true, &:active)
8
- search_scope(:draft) { _1.where.not(id: _1.has_actions.select(:id)) }
9
- search_scope(:future) { _1.has_actions.where(starts_at: Time.current..) }
10
- search_scope(:expired) { _1.has_actions.where(expires_at: ..Time.current) }
11
- search_scope(:all)
12
-
13
- def index
14
- promotions = apply_search_to(
15
- Spree::Promotion.order(id: :desc),
16
- param: :q,
17
- )
18
-
19
- set_page_and_extract_portion_from(promotions)
20
-
21
- respond_to do |format|
22
- format.html { render component('promotions/index').new(page: @page) }
23
- end
24
- end
25
-
26
- def destroy
27
- @promotions = Spree::Promotion.where(id: params[:id])
28
-
29
- Spree::Promotion.transaction { @promotions.destroy_all }
30
-
31
- flash[:notice] = t('.success')
32
- redirect_back_or_to promotions_path, status: :see_other
33
- end
34
-
35
- private
36
-
37
- def load_promotion
38
- @promotion = Spree::Promotion.find_by!(number: params[:id])
39
- authorize! action_name, @promotion
40
- end
41
-
42
- def promotion_params
43
- params.require(:promotion).permit(:user_id, permitted_promotion_attributes)
44
- end
45
- end
46
- end
@@ -1,6 +0,0 @@
1
- en:
2
- solidus_admin:
3
- promotion_categories:
4
- title: "Promotion Categories"
5
- destroy:
6
- success: "Promotion Categories were successfully removed."
@@ -1,6 +0,0 @@
1
- en:
2
- solidus_admin:
3
- promotions:
4
- title: "Promotions"
5
- destroy:
6
- success: "Promotions were successfully removed."
@@ -1,6 +0,0 @@
1
- en:
2
- solidus_admin:
3
- refund_reasons:
4
- title: "Refund Reasons"
5
- destroy:
6
- success: "Refund Reasons were successfully removed."