spree_admin 5.2.0.rc3 → 5.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/stylesheets/spree/admin/application.scss +1 -1
  3. data/app/assets/stylesheets/spree/admin/components/_dropdowns.scss +2 -0
  4. data/app/assets/stylesheets/spree/admin/components/_main.scss +2 -233
  5. data/app/assets/stylesheets/spree/admin/components/_sidebar.scss +693 -0
  6. data/app/assets/stylesheets/spree/admin/global/_variables.scss +1 -0
  7. data/app/assets/stylesheets/spree/admin/shared/_base.scss +7 -1
  8. data/app/assets/stylesheets/spree/admin/views/_dashboard.scss +14 -0
  9. data/app/controllers/spree/admin/integrations_controller.rb +1 -1
  10. data/app/controllers/spree/admin/metafields_controller.rb +1 -1
  11. data/app/controllers/spree/admin/page_blocks_controller.rb +1 -1
  12. data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
  13. data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
  14. data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
  15. data/app/controllers/spree/admin/promotions_controller.rb +1 -1
  16. data/app/controllers/spree/admin/reports_controller.rb +1 -1
  17. data/app/controllers/spree/admin/taxons_controller.rb +1 -1
  18. data/app/controllers/spree/admin/translations_controller.rb +1 -1
  19. data/app/helpers/spree/admin/base_helper.rb +1 -1
  20. data/app/helpers/spree/admin/drawer_helper.rb +6 -6
  21. data/app/helpers/spree/admin/dropdown_helper.rb +10 -2
  22. data/app/helpers/spree/admin/modal_helper.rb +2 -0
  23. data/app/helpers/spree/admin/navigation_helper.rb +46 -3
  24. data/app/helpers/spree/admin/orders_filters_helper.rb +1 -0
  25. data/app/helpers/spree/admin/promotion_actions_helper.rb +1 -1
  26. data/app/helpers/spree/admin/promotion_rules_helper.rb +1 -1
  27. data/app/helpers/spree/admin/translations_helper.rb +1 -1
  28. data/app/javascript/spree/admin/application.js +2 -1
  29. data/app/javascript/spree/admin/controllers/dropdown_controller.js +85 -14
  30. data/app/javascript/spree/admin/controllers/sidebar_controller.js +231 -0
  31. data/app/javascript/spree/admin/controllers/tooltip_controller.js +84 -31
  32. data/app/models/spree/admin/form_builder.rb +74 -16
  33. data/app/models/spree/admin/navigation/builder.rb +82 -0
  34. data/app/models/spree/admin/navigation/item.rb +177 -0
  35. data/app/models/spree/admin/navigation.rb +193 -0
  36. data/app/views/layouts/spree/admin.html.erb +1 -1
  37. data/app/views/spree/admin/assets/edit.html.erb +1 -1
  38. data/app/views/spree/admin/custom_domains/_form.html.erb +2 -14
  39. data/app/views/spree/admin/gift_cards/_filters.html.erb +26 -18
  40. data/app/views/spree/admin/gift_cards/index.html.erb +1 -1
  41. data/app/views/spree/admin/orders/_customer.html.erb +2 -2
  42. data/app/views/spree/admin/orders/_filters.html.erb +34 -25
  43. data/app/views/spree/admin/orders/_table_filter_dropdown.html.erb +1 -1
  44. data/app/views/spree/admin/page_blocks/forms/_image.html.erb +2 -5
  45. data/app/views/spree/admin/page_links/_form.html.erb +4 -13
  46. data/app/views/spree/admin/page_sections/forms/_header.html.erb +0 -2
  47. data/app/views/spree/admin/payments/_payment.html.erb +7 -0
  48. data/app/views/spree/admin/posts/_form.html.erb +1 -4
  49. data/app/views/spree/admin/posts/filters.html.erb +18 -8
  50. data/app/views/spree/admin/products/_bulk_operations.html.erb +1 -1
  51. data/app/views/spree/admin/products/_filters.html.erb +17 -6
  52. data/app/views/spree/admin/products/_table_filter_dropdown.html.erb +1 -1
  53. data/app/views/spree/admin/profile/edit.html.erb +9 -61
  54. data/app/views/spree/admin/promotions/_filters.html.erb +23 -13
  55. data/app/views/spree/admin/promotions/_table_filter_dropdown.html.erb +1 -1
  56. data/app/views/spree/admin/promotions/form/_settings.html.erb +2 -13
  57. data/app/views/spree/admin/refunds/_form.html.erb +1 -9
  58. data/app/views/spree/admin/return_authorizations/filters.html.erb +1 -1
  59. data/app/views/spree/admin/shared/_audit_nav.html.erb +2 -0
  60. data/app/views/spree/admin/shared/_calendar_range_picker.html.erb +2 -2
  61. data/app/views/spree/admin/shared/_content_header.html.erb +1 -1
  62. data/app/views/spree/admin/shared/_developers_nav.html.erb +2 -4
  63. data/app/views/spree/admin/shared/_header.html.erb +5 -7
  64. data/app/views/spree/admin/shared/_navigation.html.erb +5 -0
  65. data/app/views/spree/admin/shared/_navigation_item.html.erb +64 -0
  66. data/app/views/spree/admin/shared/_new_item_dropdown.html.erb +1 -1
  67. data/app/views/spree/admin/shared/_page_section_image.html.erb +2 -5
  68. data/app/views/spree/admin/shared/_page_section_logo.html.erb +1 -1
  69. data/app/views/spree/admin/shared/_returns_and_refunds_nav.html.erb +2 -3
  70. data/app/views/spree/admin/shared/_shipping_nav.html.erb +3 -2
  71. data/app/views/spree/admin/shared/_sidebar.html.erb +33 -7
  72. data/app/views/spree/admin/shared/_stock_nav.html.erb +6 -3
  73. data/app/views/spree/admin/shared/_tax_nav.html.erb +1 -2
  74. data/app/views/spree/admin/shared/_team_nav.html.erb +2 -3
  75. data/app/views/spree/admin/shared/_user_dropdown.html.erb +26 -17
  76. data/app/views/spree/admin/shared/sidebar/_customers_nav.html.erb +7 -0
  77. data/app/views/spree/admin/shared/sidebar/_orders_nav.html.erb +22 -2
  78. data/app/views/spree/admin/shared/sidebar/_products_nav.html.erb +21 -0
  79. data/app/views/spree/admin/shared/sidebar/_promotions_nav.html.erb +8 -0
  80. data/app/views/spree/admin/shared/sidebar/_returns_nav.html.erb +12 -0
  81. data/app/views/spree/admin/shared/sidebar/_store_dropdown.html.erb +3 -1
  82. data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +15 -1
  83. data/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb +25 -3
  84. data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +1 -1
  85. data/app/views/spree/admin/stock_items/_filters.html.erb +18 -8
  86. data/app/views/spree/admin/stock_locations/_table_row.html.erb +1 -1
  87. data/app/views/spree/admin/stock_transfers/_filters.html.erb +19 -9
  88. data/app/views/spree/admin/storefront/edit.html.erb +2 -14
  89. data/app/views/spree/admin/stores/form/_basic.html.erb +2 -8
  90. data/app/views/spree/admin/stores/form/_emails.html.erb +1 -1
  91. data/app/views/spree/admin/tax_rates/_form.html.erb +1 -10
  92. data/app/views/spree/admin/taxons/_form.html.erb +2 -9
  93. data/app/views/spree/admin/themes/_theme.html.erb +1 -1
  94. data/app/views/spree/admin/translations/translation_rows/_permalink_field_row.html.erb +1 -12
  95. data/app/views/spree/admin/users/_filters.html.erb +23 -13
  96. data/config/initializers/spree_admin_navigation.rb +510 -0
  97. data/config/locales/en.yml +4 -0
  98. data/lib/generators/spree/admin/scaffold/templates/controller.rb.tt +3 -1
  99. data/lib/generators/spree/admin/scaffold/templates/views/_table_row.html.erb.tt +8 -6
  100. data/lib/spree/admin/engine.rb +64 -2
  101. data/lib/spree/admin/runtime_configuration.rb +1 -0
  102. data/lib/spree/admin.rb +20 -0
  103. metadata +17 -15
  104. data/app/assets/stylesheets/spree/admin/components/_offcanvas.scss +0 -26
  105. data/app/javascript/spree/admin/helpers/canvas.js +0 -29
  106. data/app/views/spree/admin/shared/_offcanvas_nav.html.erb +0 -12
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0ef3af7b481c377e93088f7ef61e1cd421b56db13d4fe9a55ec294a5c0e79588
4
- data.tar.gz: 77c2dd8457a3acb0753c537b965e9d87913a77622b29cef116948fcbef535e6a
3
+ metadata.gz: 1084b5032793070ddd529dffb5ef08cff577830d4b4cd7836b3ebaa879a8f3fe
4
+ data.tar.gz: 9899a67d432f5d0e9edc8bd15dd44652a3550d43f54f0c8f9173ece2a3bf33ec
5
5
  SHA512:
6
- metadata.gz: c1155835ff2117a7265fe3cb6f27308ed51a23edbefcb3ed4f6a2919b42d10630de9aab7f0ffe4363a8503260e0e5bb49760ba4ee58a3dbef6c9acbf1d6e30a9
7
- data.tar.gz: d936e9e79c1161aca8750c638257055b841646636859a10310cc4c8ec2e4c9136982b989f9841845ddf444d0206c8da49b25211fdb4bbb3bb944e061f7b58251
6
+ metadata.gz: d39e9737153c19ff657e3bc812b1164a303ae3d129cb0f0c1ad3c472c6e7bbd71328fd62156f22763c1b2944d8473b1c9aaba3e885a709ac3c6963e812e35b05
7
+ data.tar.gz: a8e26462ee6cc31561f17c271b845f939b0ba98f1ec6aed080bd6a222ba5fb1cef50d4d4d2e277d6ccbb918cca4d73ad0f130c8d7cdc3837a8fc28c84ba728a2
@@ -15,13 +15,13 @@
15
15
  @import 'components/navigation';
16
16
  @import 'components/modals'; // old bootstrap modals
17
17
  @import 'components/dialogs'; // new native dialogs
18
- @import 'components/offcanvas';
19
18
  @import 'components/variants_form';
20
19
  @import 'components/media_form';
21
20
  @import 'components/seo_form';
22
21
  @import 'components/line_items_form';
23
22
  @import 'components/search_picker';
24
23
  @import 'components/sortable_tree';
24
+ @import 'components/sidebar';
25
25
  @import 'components/bulk_panel';
26
26
  @import 'components/wizard';
27
27
 
@@ -32,6 +32,7 @@
32
32
  padding: $dropdown-padding-y $dropdown-padding-x;
33
33
  font-size: $dropdown-font-size;
34
34
  color: $dropdown-color;
35
+ max-width: 20rem;
35
36
 
36
37
  .dropdown-item, .dropdown-header {
37
38
  padding-top: $dropdown-item-padding-y;
@@ -52,6 +53,7 @@
52
53
  justify-content: flex-start;
53
54
  background: transparent;
54
55
  height: 2rem;
56
+ padding-right: 2rem;
55
57
 
56
58
  transition-property: background-color, color;
57
59
  transition-duration: 0.01s;
@@ -1,7 +1,3 @@
1
- .sort-handle {
2
- cursor: grab;
3
- }
4
-
5
1
  #page-header {
6
2
  height: 80px;
7
3
  display: flex;
@@ -74,241 +70,14 @@
74
70
  }
75
71
  }
76
72
 
77
- .store-dropdown {
78
- display: flex;
79
- align-items: center;
80
- justify-content: space-between;
81
- padding-left: 0.5rem;
82
- padding-right: 0.75rem;
83
- background-color: $sidebar-bg;
84
- width: $sidebar-width;
85
- border-right: 1px solid $border-color;
86
- height: calc($header-height + 1px);
87
- }
88
-
89
- .store-dropdown-button {
90
- padding: 0.25rem;
91
- display: flex;
92
- align-items: center;
93
- justify-content: space-between;
94
- text-align: left;
95
- gap: 0.5rem;
96
- box-shadow: none !important;
97
-
98
- &:hover {
99
- background-color: $gray-50;
100
- }
101
- }
102
-
103
- .store-chooser {
104
- display: flex;
105
- flex-direction: column;
106
- gap: 0.25rem;
107
- padding: 0.25rem;
108
- margin: 0.25rem;
109
- border: 1px solid $border-color;
110
- border-radius: $border-radius-lg;
111
-
112
- .store-chooser-item {
113
- display: flex;
114
- align-items: center;
115
- gap: 0.5rem;
116
- border-radius: $border-radius;
117
- padding: 0.25rem;
118
- text-wrap: nowrap;
119
-
120
- &:hover {
121
- text-decoration: none;
122
- background-color: $dropdown-link-hover-bg;
123
- }
124
-
125
- &.active {
126
- cursor: not-allowed;
127
- background-color: $action;
128
- }
129
- }
130
- }
131
-
132
- #main-sidebar {
133
- display: flex;
134
- flex-direction: column;
135
- gap: 0.5rem;
136
- width: $sidebar-width;
137
- background-color: $sidebar-bg;
138
- box-shadow: inset -1px 0 0 $border-color;
139
- height: calc(100vh - $header-height);
140
- overflow-x: hidden;
141
- position: fixed;
142
- top: $header-height;
143
- padding-top: 0.8rem;
144
-
145
- @media (max-width: 992px) {
146
- display: none;
147
- }
148
-
149
- .nav {
150
- padding-left: 0.75rem;
151
- padding-right: 0.75rem;
152
- gap: 0.25rem;
153
- display: flex;
154
- flex-direction: column;
155
- }
156
-
157
- .nav-link {
158
- border-radius: $border-radius-lg;
159
- display: flex;
160
- align-items: center;
161
- padding-left: 0.25rem;
162
- padding-right: 0.25rem;
163
- padding-top: 0.25rem;
164
- padding-bottom: 0.25rem;
165
- color: inherit;
166
-
167
- transition: background-color 0.1s ease-in-out;
168
-
169
- .ti {
170
- margin-right: 0.5rem;
171
- border-radius: $border-radius;
172
- padding: 0.2rem 0.2rem;
173
- }
174
-
175
- &:hover {
176
- background-color: $gray-50;
177
-
178
- .ti {
179
- color: theme-color('primary');
180
- }
181
- }
182
- &.active {
183
- color: theme-color('primary');
184
- background-color: $white;
185
- box-shadow: rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0) 0px 0px 0px 0px, rgba(0, 0, 0, 0.04) 0px 0px 0px 1px, rgba(0, 0, 0, 0.04) 0px 1px 2px -1px, rgba(0, 0, 0, 0.02) 0px 2px 4px 0px;
186
- font-weight: $font-weight-medium;
187
-
188
- .ti {
189
- background-color: theme-color('primary');
190
- color: $white;
191
- }
192
- }
193
-
194
- .badge:not(.badge-info) {
195
- @extend .badge-light;
196
- border-radius: $border-radius;
197
- }
198
- }
199
-
200
- .nav-submenu {
201
- display: flex;
202
- flex-direction: column;
203
- list-style: none;
204
- padding-top: 0.25rem;
205
- padding-left: 2rem;
206
- &:before {
207
- content: '';
208
- position: absolute;
209
- left: 1rem;
210
- top: 0;
211
- bottom: 0.25rem;
212
- width: 1px;
213
- background-color: $gray-200;
214
- }
215
- position: relative;
216
-
217
- .nav-link {
218
- font-weight: 400;
219
- padding-top: 0.25rem;
220
- padding-bottom: 0.25rem;
221
-
222
- &:hover {
223
- background-color: $gray-50;
224
- }
225
- &.active, &:active, &:focus {
226
- font-weight: 600;
227
- background-color: transparent !important;
228
- box-shadow: none;
229
-
230
- &:before {
231
- content: '';
232
- position: absolute;
233
- left: calc(-1rem - 1px);
234
- top: 10%;
235
- width: 3px;
236
- height: 80%;
237
- background-color: theme-color('primary');
238
- border-radius: $border-radius-sm;
239
- }
240
- }
241
- }
242
- }
243
-
244
- .dropdown {
245
- padding-left: 0.5rem;
246
- padding-right: 0.5rem;
247
-
248
- .btn {
249
- padding: 0.25rem 0.25rem;
250
- border-radius: $border-radius;
251
- display: flex;
252
- align-items: center;
253
-
254
- &:hover, &:focus, &:active {
255
- background-color: $gray-50;
256
- }
257
- }
258
-
259
- .dropdown-menu {
260
- width: calc(100% - 1rem) !important;
261
- }
262
- }
263
- }
264
-
265
73
  #content {
74
+ transition: margin-left 0.1s ease;
75
+
266
76
  @media (min-width: 992px) {
267
77
  margin-left: $sidebar-width + 1px;
268
78
  }
269
79
  }
270
80
 
271
- #enterprise-edition-notice {
272
- @extend .alert;
273
- @extend .alert-info;
274
-
275
- background-image: none;
276
- position: relative;
277
- font-size: $font-size-sm;
278
- padding: 0.5rem 1rem;
279
- margin: 0.75rem;
280
- border-width: 1px;
281
- box-shadow: $box-shadow-xs;
282
- p {
283
- margin-bottom: 0.5rem;
284
- }
285
-
286
- .btn-close {
287
- position: absolute;
288
- right: 0.25rem;
289
- top: 0.25rem;
290
- color: inherit !important;
291
-
292
- &:hover {
293
- background-color: transparent !important;
294
- }
295
- }
296
- }
297
-
298
- #updater-notice {
299
- background-color: $white;
300
- width: 100%;
301
- display: flex;
302
- flex-direction: row;
303
- gap: 1rem;
304
- justify-content: flex-start;
305
- align-items: center;
306
- padding: 0.5rem 0.5rem;
307
- border: 1px solid $border-color;
308
- border-radius: $border-radius-lg;
309
- box-shadow: $box-shadow-xs;
310
- }
311
-
312
81
 
313
82
  .documentation-link-container {
314
83
  font-size: $font-size-sm;