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.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/spree/admin/application.scss +1 -1
- data/app/assets/stylesheets/spree/admin/components/_dropdowns.scss +2 -0
- data/app/assets/stylesheets/spree/admin/components/_main.scss +2 -233
- data/app/assets/stylesheets/spree/admin/components/_sidebar.scss +693 -0
- data/app/assets/stylesheets/spree/admin/global/_variables.scss +1 -0
- data/app/assets/stylesheets/spree/admin/shared/_base.scss +7 -1
- data/app/assets/stylesheets/spree/admin/views/_dashboard.scss +14 -0
- data/app/controllers/spree/admin/integrations_controller.rb +1 -1
- data/app/controllers/spree/admin/metafields_controller.rb +1 -1
- data/app/controllers/spree/admin/page_blocks_controller.rb +1 -1
- data/app/controllers/spree/admin/payment_methods_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
- data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
- data/app/controllers/spree/admin/promotions_controller.rb +1 -1
- data/app/controllers/spree/admin/reports_controller.rb +1 -1
- data/app/controllers/spree/admin/taxons_controller.rb +1 -1
- data/app/controllers/spree/admin/translations_controller.rb +1 -1
- data/app/helpers/spree/admin/base_helper.rb +1 -1
- data/app/helpers/spree/admin/drawer_helper.rb +6 -6
- data/app/helpers/spree/admin/dropdown_helper.rb +10 -2
- data/app/helpers/spree/admin/modal_helper.rb +2 -0
- data/app/helpers/spree/admin/navigation_helper.rb +46 -3
- data/app/helpers/spree/admin/orders_filters_helper.rb +1 -0
- data/app/helpers/spree/admin/promotion_actions_helper.rb +1 -1
- data/app/helpers/spree/admin/promotion_rules_helper.rb +1 -1
- data/app/helpers/spree/admin/translations_helper.rb +1 -1
- data/app/javascript/spree/admin/application.js +2 -1
- data/app/javascript/spree/admin/controllers/dropdown_controller.js +85 -14
- data/app/javascript/spree/admin/controllers/sidebar_controller.js +231 -0
- data/app/javascript/spree/admin/controllers/tooltip_controller.js +84 -31
- data/app/models/spree/admin/form_builder.rb +74 -16
- data/app/models/spree/admin/navigation/builder.rb +82 -0
- data/app/models/spree/admin/navigation/item.rb +177 -0
- data/app/models/spree/admin/navigation.rb +193 -0
- data/app/views/layouts/spree/admin.html.erb +1 -1
- data/app/views/spree/admin/assets/edit.html.erb +1 -1
- data/app/views/spree/admin/custom_domains/_form.html.erb +2 -14
- data/app/views/spree/admin/gift_cards/_filters.html.erb +26 -18
- data/app/views/spree/admin/gift_cards/index.html.erb +1 -1
- data/app/views/spree/admin/orders/_customer.html.erb +2 -2
- data/app/views/spree/admin/orders/_filters.html.erb +34 -25
- data/app/views/spree/admin/orders/_table_filter_dropdown.html.erb +1 -1
- data/app/views/spree/admin/page_blocks/forms/_image.html.erb +2 -5
- data/app/views/spree/admin/page_links/_form.html.erb +4 -13
- data/app/views/spree/admin/page_sections/forms/_header.html.erb +0 -2
- data/app/views/spree/admin/payments/_payment.html.erb +7 -0
- data/app/views/spree/admin/posts/_form.html.erb +1 -4
- data/app/views/spree/admin/posts/filters.html.erb +18 -8
- data/app/views/spree/admin/products/_bulk_operations.html.erb +1 -1
- data/app/views/spree/admin/products/_filters.html.erb +17 -6
- data/app/views/spree/admin/products/_table_filter_dropdown.html.erb +1 -1
- data/app/views/spree/admin/profile/edit.html.erb +9 -61
- data/app/views/spree/admin/promotions/_filters.html.erb +23 -13
- data/app/views/spree/admin/promotions/_table_filter_dropdown.html.erb +1 -1
- data/app/views/spree/admin/promotions/form/_settings.html.erb +2 -13
- data/app/views/spree/admin/refunds/_form.html.erb +1 -9
- data/app/views/spree/admin/return_authorizations/filters.html.erb +1 -1
- data/app/views/spree/admin/shared/_audit_nav.html.erb +2 -0
- data/app/views/spree/admin/shared/_calendar_range_picker.html.erb +2 -2
- data/app/views/spree/admin/shared/_content_header.html.erb +1 -1
- data/app/views/spree/admin/shared/_developers_nav.html.erb +2 -4
- data/app/views/spree/admin/shared/_header.html.erb +5 -7
- data/app/views/spree/admin/shared/_navigation.html.erb +5 -0
- data/app/views/spree/admin/shared/_navigation_item.html.erb +64 -0
- data/app/views/spree/admin/shared/_new_item_dropdown.html.erb +1 -1
- data/app/views/spree/admin/shared/_page_section_image.html.erb +2 -5
- data/app/views/spree/admin/shared/_page_section_logo.html.erb +1 -1
- data/app/views/spree/admin/shared/_returns_and_refunds_nav.html.erb +2 -3
- data/app/views/spree/admin/shared/_shipping_nav.html.erb +3 -2
- data/app/views/spree/admin/shared/_sidebar.html.erb +33 -7
- data/app/views/spree/admin/shared/_stock_nav.html.erb +6 -3
- data/app/views/spree/admin/shared/_tax_nav.html.erb +1 -2
- data/app/views/spree/admin/shared/_team_nav.html.erb +2 -3
- data/app/views/spree/admin/shared/_user_dropdown.html.erb +26 -17
- data/app/views/spree/admin/shared/sidebar/_customers_nav.html.erb +7 -0
- data/app/views/spree/admin/shared/sidebar/_orders_nav.html.erb +22 -2
- data/app/views/spree/admin/shared/sidebar/_products_nav.html.erb +21 -0
- data/app/views/spree/admin/shared/sidebar/_promotions_nav.html.erb +8 -0
- data/app/views/spree/admin/shared/sidebar/_returns_nav.html.erb +12 -0
- data/app/views/spree/admin/shared/sidebar/_store_dropdown.html.erb +3 -1
- data/app/views/spree/admin/shared/sidebar/_store_nav.html.erb +15 -1
- data/app/views/spree/admin/shared/sidebar/_storefront_nav.html.erb +25 -3
- data/app/views/spree/admin/shared/sortable_tree/_taxonomy.html.erb +1 -1
- data/app/views/spree/admin/stock_items/_filters.html.erb +18 -8
- data/app/views/spree/admin/stock_locations/_table_row.html.erb +1 -1
- data/app/views/spree/admin/stock_transfers/_filters.html.erb +19 -9
- data/app/views/spree/admin/storefront/edit.html.erb +2 -14
- data/app/views/spree/admin/stores/form/_basic.html.erb +2 -8
- data/app/views/spree/admin/stores/form/_emails.html.erb +1 -1
- data/app/views/spree/admin/tax_rates/_form.html.erb +1 -10
- data/app/views/spree/admin/taxons/_form.html.erb +2 -9
- data/app/views/spree/admin/themes/_theme.html.erb +1 -1
- data/app/views/spree/admin/translations/translation_rows/_permalink_field_row.html.erb +1 -12
- data/app/views/spree/admin/users/_filters.html.erb +23 -13
- data/config/initializers/spree_admin_navigation.rb +510 -0
- data/config/locales/en.yml +4 -0
- data/lib/generators/spree/admin/scaffold/templates/controller.rb.tt +3 -1
- data/lib/generators/spree/admin/scaffold/templates/views/_table_row.html.erb.tt +8 -6
- data/lib/spree/admin/engine.rb +64 -2
- data/lib/spree/admin/runtime_configuration.rb +1 -0
- data/lib/spree/admin.rb +20 -0
- metadata +17 -15
- data/app/assets/stylesheets/spree/admin/components/_offcanvas.scss +0 -26
- data/app/javascript/spree/admin/helpers/canvas.js +0 -29
- data/app/views/spree/admin/shared/_offcanvas_nav.html.erb +0 -12
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spree_admin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.2.0
|
|
4
|
+
version: 5.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Vendo Connect Inc.
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: spree_core
|
|
@@ -16,28 +15,28 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 5.2.0
|
|
18
|
+
version: 5.2.0
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
23
|
- - ">="
|
|
25
24
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 5.2.0
|
|
25
|
+
version: 5.2.0
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: spree_api
|
|
29
28
|
requirement: !ruby/object:Gem::Requirement
|
|
30
29
|
requirements:
|
|
31
30
|
- - ">="
|
|
32
31
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 5.2.0
|
|
32
|
+
version: 5.2.0
|
|
34
33
|
type: :runtime
|
|
35
34
|
prerelease: false
|
|
36
35
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
36
|
requirements:
|
|
38
37
|
- - ">="
|
|
39
38
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 5.2.0
|
|
39
|
+
version: 5.2.0
|
|
41
40
|
- !ruby/object:Gem::Dependency
|
|
42
41
|
name: active_link_to
|
|
43
42
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -269,9 +268,9 @@ files:
|
|
|
269
268
|
- app/assets/stylesheets/spree/admin/components/_modals.scss
|
|
270
269
|
- app/assets/stylesheets/spree/admin/components/_navbar.scss
|
|
271
270
|
- app/assets/stylesheets/spree/admin/components/_navigation.scss
|
|
272
|
-
- app/assets/stylesheets/spree/admin/components/_offcanvas.scss
|
|
273
271
|
- app/assets/stylesheets/spree/admin/components/_search_picker.scss
|
|
274
272
|
- app/assets/stylesheets/spree/admin/components/_seo_form.scss
|
|
273
|
+
- app/assets/stylesheets/spree/admin/components/_sidebar.scss
|
|
275
274
|
- app/assets/stylesheets/spree/admin/components/_sortable_tree.scss
|
|
276
275
|
- app/assets/stylesheets/spree/admin/components/_tables.scss
|
|
277
276
|
- app/assets/stylesheets/spree/admin/components/_tooltips.scss
|
|
@@ -469,6 +468,7 @@ files:
|
|
|
469
468
|
- app/javascript/spree/admin/controllers/section_form_controller.js
|
|
470
469
|
- app/javascript/spree/admin/controllers/select_controller.js
|
|
471
470
|
- app/javascript/spree/admin/controllers/seo_form_controller.js
|
|
471
|
+
- app/javascript/spree/admin/controllers/sidebar_controller.js
|
|
472
472
|
- app/javascript/spree/admin/controllers/slug_form_controller.js
|
|
473
473
|
- app/javascript/spree/admin/controllers/sortable_auto_submit_controller.js
|
|
474
474
|
- app/javascript/spree/admin/controllers/sortable_tree_controller.js
|
|
@@ -481,12 +481,14 @@ files:
|
|
|
481
481
|
- app/javascript/spree/admin/controllers/unit_system_controller.js
|
|
482
482
|
- app/javascript/spree/admin/controllers/variants_form_controller.js
|
|
483
483
|
- app/javascript/spree/admin/helpers/bootstrap.js
|
|
484
|
-
- app/javascript/spree/admin/helpers/canvas.js
|
|
485
484
|
- app/javascript/spree/admin/helpers/index.js
|
|
486
485
|
- app/javascript/spree/admin/helpers/tinymce.js
|
|
487
486
|
- app/javascript/spree/admin/helpers/trix/video_embed.js
|
|
488
487
|
- app/javascript/spree/admin/helpers/uppy_active_storage.js
|
|
489
488
|
- app/models/spree/admin/form_builder.rb
|
|
489
|
+
- app/models/spree/admin/navigation.rb
|
|
490
|
+
- app/models/spree/admin/navigation/builder.rb
|
|
491
|
+
- app/models/spree/admin/navigation/item.rb
|
|
490
492
|
- app/models/spree/admin/resource.rb
|
|
491
493
|
- app/models/spree/admin/updater.rb
|
|
492
494
|
- app/views/active_storage/_upload_form.html.erb
|
|
@@ -982,12 +984,13 @@ files:
|
|
|
982
984
|
- app/views/spree/admin/shared/_media_form.html.erb
|
|
983
985
|
- app/views/spree/admin/shared/_modal.html.erb
|
|
984
986
|
- app/views/spree/admin/shared/_multi_product_picker.html.erb
|
|
987
|
+
- app/views/spree/admin/shared/_navigation.html.erb
|
|
988
|
+
- app/views/spree/admin/shared/_navigation_item.html.erb
|
|
985
989
|
- app/views/spree/admin/shared/_new_item_dropdown.html.erb
|
|
986
990
|
- app/views/spree/admin/shared/_new_resource.html.erb
|
|
987
991
|
- app/views/spree/admin/shared/_new_resource_links.html.erb
|
|
988
992
|
- app/views/spree/admin/shared/_no_image.html.erb
|
|
989
993
|
- app/views/spree/admin/shared/_no_resource_found.html.erb
|
|
990
|
-
- app/views/spree/admin/shared/_offcanvas_nav.html.erb
|
|
991
994
|
- app/views/spree/admin/shared/_page_alerts.html.erb
|
|
992
995
|
- app/views/spree/admin/shared/_page_section_image.html.erb
|
|
993
996
|
- app/views/spree/admin/shared/_page_section_logo.html.erb
|
|
@@ -1191,6 +1194,7 @@ files:
|
|
|
1191
1194
|
- config/initializers/dartsass.rb
|
|
1192
1195
|
- config/initializers/form_builder.rb
|
|
1193
1196
|
- config/initializers/ransack.rb
|
|
1197
|
+
- config/initializers/spree_admin_navigation.rb
|
|
1194
1198
|
- config/locales/en.yml
|
|
1195
1199
|
- config/routes.rb
|
|
1196
1200
|
- lib/generators/spree/admin/devise/devise_generator.rb
|
|
@@ -1267,10 +1271,9 @@ licenses:
|
|
|
1267
1271
|
- AGPL-3.0-or-later
|
|
1268
1272
|
metadata:
|
|
1269
1273
|
bug_tracker_uri: https://github.com/spree/spree/issues
|
|
1270
|
-
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.0
|
|
1274
|
+
changelog_uri: https://github.com/spree/spree/releases/tag/v5.2.0
|
|
1271
1275
|
documentation_uri: https://docs.spreecommerce.org/
|
|
1272
|
-
source_code_uri: https://github.com/spree/spree/tree/v5.2.0
|
|
1273
|
-
post_install_message:
|
|
1276
|
+
source_code_uri: https://github.com/spree/spree/tree/v5.2.0
|
|
1274
1277
|
rdoc_options: []
|
|
1275
1278
|
require_paths:
|
|
1276
1279
|
- lib
|
|
@@ -1285,8 +1288,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1285
1288
|
- !ruby/object:Gem::Version
|
|
1286
1289
|
version: 1.8.23
|
|
1287
1290
|
requirements: []
|
|
1288
|
-
rubygems_version: 3.
|
|
1289
|
-
signing_key:
|
|
1291
|
+
rubygems_version: 3.6.9
|
|
1290
1292
|
specification_version: 4
|
|
1291
1293
|
summary: Admin Dashboard for Spree Commerce developed by Vendo Connect Inc.
|
|
1292
1294
|
test_files: []
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
.bs-canvas-overlay {
|
|
2
|
-
opacity: $modal-backdrop-opacity;
|
|
3
|
-
z-index: 1100;
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.bs-canvas {
|
|
7
|
-
top: 0;
|
|
8
|
-
z-index: 1110;
|
|
9
|
-
overflow-x: hidden;
|
|
10
|
-
overflow-y: auto;
|
|
11
|
-
width: 330px;
|
|
12
|
-
transition: margin .2s ease-out;
|
|
13
|
-
-webkit-transition: margin .2s ease-out;
|
|
14
|
-
-moz-transition: margin .2s ease-out;
|
|
15
|
-
-ms-transition: margin .2s ease-out;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.bs-canvas-left {
|
|
19
|
-
left: 0;
|
|
20
|
-
margin-left: -330px;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.bs-canvas-right {
|
|
24
|
-
right: 0;
|
|
25
|
-
margin-right: -330px;
|
|
26
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// ugly JS copied from a tutorial :)
|
|
2
|
-
const initOffcanvas = () => {
|
|
3
|
-
document.querySelectorAll('.pull-bs-canvas-right, .pull-bs-canvas-left').forEach((element) => {
|
|
4
|
-
element.addEventListener('click', () => {
|
|
5
|
-
document.body.insertAdjacentHTML('afterbegin', '<div class="bs-canvas-overlay bg-dark position-fixed w-100 h-100"></div>');
|
|
6
|
-
if(element.classList.contains('pull-bs-canvas-right'))
|
|
7
|
-
document.querySelector('.bs-canvas-right').classList.add('mr-0');
|
|
8
|
-
else
|
|
9
|
-
document.querySelector('.bs-canvas-left').classList.add('ml-0');
|
|
10
|
-
})
|
|
11
|
-
})
|
|
12
|
-
|
|
13
|
-
document.querySelectorAll('.bs-canvas-close, .bs-canvas-overlay').forEach((element) => {
|
|
14
|
-
element.addEventListener('click', () => {
|
|
15
|
-
let elm = element.classList.contains('bs-canvas-close') ? element.closest('.bs-canvas') : document.querySelector('.bs-canvas');
|
|
16
|
-
elm.classList.remove('mr-0', 'ml-0');
|
|
17
|
-
document.querySelector('.bs-canvas-overlay').remove();
|
|
18
|
-
})
|
|
19
|
-
})
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const hideOffcanvas = () => {
|
|
23
|
-
document.querySelector('.bs-canvas')?.classList?.remove('mr-0', 'ml-0');
|
|
24
|
-
document.querySelector('.bs-canvas-overlay')?.remove();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
document.addEventListener("turbo:load", initOffcanvas)
|
|
28
|
-
document.addEventListener("turbo:click", hideOffcanvas)
|
|
29
|
-
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
<!-- Left off-canvas sidebar -->
|
|
2
|
-
<div class="bs-canvas bs-canvas-left position-fixed h-100 bg-light border-right">
|
|
3
|
-
<div class="bs-canvas-content px-2">
|
|
4
|
-
<% if try_spree_current_user.present? %>
|
|
5
|
-
<% if defined?(current_vendor) && current_vendor.present? %>
|
|
6
|
-
<%= render 'spree/admin/shared/sidebar/vendor_nav' %>
|
|
7
|
-
<% elsif defined?(current_store) && current_store&.present? %>
|
|
8
|
-
<%= render 'spree/admin/shared/sidebar/store_nav' %>
|
|
9
|
-
<% end %>
|
|
10
|
-
<% end %>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|