spree_backend 4.2.4 → 4.3.0.rc3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (261) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +1 -1
  3. data/app/assets/config/spree_backend_manifest.js +129 -0
  4. data/app/assets/images/backend-arrows-fullscreen.svg +3 -0
  5. data/app/assets/images/backend-box.svg +3 -0
  6. data/app/assets/images/backend-circle-fill.svg +3 -0
  7. data/app/assets/images/backend-circle.svg +3 -0
  8. data/app/assets/images/backend-default-layout.svg +6 -0
  9. data/app/assets/images/backend-eye-slash-fill.svg +4 -0
  10. data/app/assets/images/backend-file-richtext.svg +4 -0
  11. data/app/assets/images/backend-fullscreen-exit.svg +3 -0
  12. data/app/assets/images/backend-fullscreen.svg +3 -0
  13. data/app/assets/images/backend-mobile.svg +5 -0
  14. data/app/assets/images/backend-pages.svg +10 -0
  15. data/app/assets/images/backend-phone.svg +4 -0
  16. data/app/assets/images/backend-reversed-layout.svg +6 -0
  17. data/app/assets/images/backend-spree-icon.svg +1 -0
  18. data/app/assets/images/backend-spree-logo.svg +6 -0
  19. data/app/assets/images/backend-store.svg +2 -13
  20. data/app/assets/images/backend-translate.svg +4 -0
  21. data/app/assets/images/backend-users.svg +2 -5
  22. data/app/assets/images/backend-window-sidebar.svg +4 -0
  23. data/app/assets/images/noimage/backend-missing-image.svg +4 -0
  24. data/app/assets/images/noimage/large.png +0 -0
  25. data/app/assets/images/noimage/mini.png +0 -0
  26. data/app/assets/images/noimage/product.png +0 -0
  27. data/app/assets/images/noimage/small.png +0 -0
  28. data/app/assets/javascripts/spree/backend/address_states.es6 +44 -0
  29. data/app/assets/javascripts/spree/backend/admin.js +45 -307
  30. data/app/assets/javascripts/spree/backend/checkouts/edit.js +22 -13
  31. data/app/assets/javascripts/spree/backend/cms/_index.es6 +4 -0
  32. data/app/assets/javascripts/spree/backend/cms/links.es6 +25 -0
  33. data/app/assets/javascripts/spree/backend/cms/live_preview.es6 +34 -0
  34. data/app/assets/javascripts/spree/backend/cms/page.es6 +133 -0
  35. data/app/assets/javascripts/spree/backend/cms/section.es6 +43 -0
  36. data/app/assets/javascripts/spree/backend/global/_index.js +11 -0
  37. data/app/assets/javascripts/spree/backend/global/alerts.es6 +66 -0
  38. data/app/assets/javascripts/spree/backend/global/api_functions.es6 +5 -0
  39. data/app/assets/javascripts/spree/backend/global/bootstrap.es6 +15 -0
  40. data/app/assets/javascripts/spree/backend/global/flatpickr.es6 +22 -0
  41. data/app/assets/javascripts/spree/backend/global/info_alert.es6 +38 -0
  42. data/app/assets/javascripts/spree/backend/global/radio_panel_toggle.es6 +18 -0
  43. data/app/assets/javascripts/spree/backend/global/ransack.es6 +108 -0
  44. data/app/assets/javascripts/spree/backend/global/responsive_menus.es6 +56 -0
  45. data/app/assets/javascripts/spree/backend/global/select2_autocomplete.es6 +156 -0
  46. data/app/assets/javascripts/spree/backend/global/select2_populate.es6 +61 -0
  47. data/app/assets/javascripts/spree/backend/global/side_scroll_indication.es6 +137 -0
  48. data/app/assets/javascripts/spree/backend/global/sortable.es6 +35 -0
  49. data/app/assets/javascripts/spree/backend/global/tinymce.es6 +11 -0
  50. data/app/assets/javascripts/spree/backend/menus/_index.es6 +2 -0
  51. data/app/assets/javascripts/spree/backend/menus/menu.es6 +57 -0
  52. data/app/assets/javascripts/spree/backend/menus/menu_item.es6 +26 -0
  53. data/app/assets/javascripts/spree/backend/option_type_autocomplete.js +13 -17
  54. data/app/assets/javascripts/spree/backend/option_value_picker.js +10 -22
  55. data/app/assets/javascripts/spree/backend/payments/edit.js +1 -1
  56. data/app/assets/javascripts/spree/backend/payments/new.js +18 -5
  57. data/app/assets/javascripts/spree/backend/spree-select2.js +19 -1
  58. data/app/assets/javascripts/spree/backend/stock_location.js +1 -2
  59. data/app/assets/javascripts/spree/backend/taxon_autocomplete.js +7 -1
  60. data/app/assets/javascripts/spree/backend/taxons.js +74 -73
  61. data/app/assets/javascripts/spree/backend/user_picker.js +7 -10
  62. data/app/assets/javascripts/spree/backend.js +28 -1
  63. data/app/assets/javascripts/spree.js +78 -0
  64. data/app/assets/stylesheets/spree/backend/components/_filters.scss +1 -3
  65. data/app/assets/stylesheets/spree/backend/components/_main.scss +0 -1
  66. data/app/assets/stylesheets/spree/backend/components/_navbar.scss +35 -0
  67. data/app/assets/stylesheets/spree/backend/components/_navigation.scss +13 -0
  68. data/app/assets/stylesheets/spree/backend/components/_sidebar.scss +0 -1
  69. data/app/assets/stylesheets/spree/backend/components/_tables.scss +4 -5
  70. data/app/assets/stylesheets/spree/backend/global/_mixins.scss +59 -0
  71. data/app/assets/stylesheets/spree/backend/plugins/_nav_x.scss +95 -0
  72. data/app/assets/stylesheets/spree/backend/plugins/{select2_bootstrap4.scss → _select2_bootstrap4.scss} +0 -0
  73. data/app/assets/stylesheets/spree/backend/plugins/_sweetalert2_custom.scss +100 -0
  74. data/app/assets/stylesheets/spree/backend/plugins/_tinymce_custom.scss +4 -0
  75. data/app/assets/stylesheets/spree/backend/shared/_base.scss +75 -25
  76. data/app/assets/stylesheets/spree/backend/shared/_forms.scss +8 -0
  77. data/app/assets/stylesheets/spree/backend/spree_admin.css.scss +5 -0
  78. data/app/assets/stylesheets/spree/backend/views/_cms_pages.scss +148 -0
  79. data/app/assets/stylesheets/spree/backend/views/_menus.scss +61 -0
  80. data/app/controllers/concerns/spree/admin/order_concern.rb +24 -0
  81. data/app/controllers/concerns/spree/admin/product_concern.rb +11 -0
  82. data/app/controllers/spree/admin/base_controller.rb +63 -3
  83. data/app/controllers/spree/admin/cms_pages_controller.rb +29 -0
  84. data/app/controllers/spree/admin/cms_sections_controller.rb +15 -0
  85. data/app/controllers/spree/admin/customer_returns_controller.rb +4 -5
  86. data/app/controllers/spree/admin/errors_controller.rb +11 -0
  87. data/app/controllers/spree/admin/general_settings_controller.rb +1 -1
  88. data/app/controllers/spree/admin/images_controller.rb +8 -22
  89. data/app/controllers/spree/admin/log_entries_controller.rb +4 -3
  90. data/app/controllers/spree/admin/menu_items_controller.rb +33 -0
  91. data/app/controllers/spree/admin/menus_controller.rb +32 -0
  92. data/app/controllers/spree/admin/option_types_controller.rb +1 -1
  93. data/app/controllers/spree/admin/orders/customer_details_controller.rb +6 -11
  94. data/app/controllers/spree/admin/orders_controller.rb +23 -31
  95. data/app/controllers/spree/admin/payment_methods_controller.rb +17 -4
  96. data/app/controllers/spree/admin/payments_controller.rb +5 -10
  97. data/app/controllers/spree/admin/prices_controller.rb +2 -2
  98. data/app/controllers/spree/admin/products_controller.rb +21 -10
  99. data/app/controllers/spree/admin/promotion_actions_controller.rb +1 -1
  100. data/app/controllers/spree/admin/promotion_rules_controller.rb +1 -1
  101. data/app/controllers/spree/admin/promotions_controller.rb +3 -3
  102. data/app/controllers/spree/admin/prototypes_controller.rb +1 -1
  103. data/app/controllers/spree/admin/reimbursements_controller.rb +1 -1
  104. data/app/controllers/spree/admin/reports_controller.rb +5 -1
  105. data/app/controllers/spree/admin/resource_controller.rb +32 -5
  106. data/app/controllers/spree/admin/return_index_controller.rb +1 -1
  107. data/app/controllers/spree/admin/state_changes_controller.rb +2 -7
  108. data/app/controllers/spree/admin/stock_items_controller.rb +2 -2
  109. data/app/controllers/spree/admin/stock_locations_controller.rb +2 -2
  110. data/app/controllers/spree/admin/stock_movements_controller.rb +1 -1
  111. data/app/controllers/spree/admin/stock_transfers_controller.rb +1 -1
  112. data/app/controllers/spree/admin/store_credits_controller.rb +13 -8
  113. data/app/controllers/spree/admin/stores_controller.rb +14 -17
  114. data/app/controllers/spree/admin/taxons_controller.rb +9 -5
  115. data/app/controllers/spree/admin/users_controller.rb +9 -7
  116. data/app/controllers/spree/admin/variants_controller.rb +16 -15
  117. data/app/helpers/spree/admin/base_helper.rb +52 -14
  118. data/app/helpers/spree/admin/cms_helper.rb +15 -0
  119. data/app/helpers/spree/admin/menu_helper.rb +30 -0
  120. data/app/helpers/spree/admin/stores_helper.rb +21 -0
  121. data/app/models/spree/backend_configuration.rb +2 -0
  122. data/app/views/spree/admin/adjustments/_adjustment.html.erb +7 -5
  123. data/app/views/spree/admin/cms_pages/_form.html.erb +135 -0
  124. data/app/views/spree/admin/cms_pages/_live_preview_area.html.erb +61 -0
  125. data/app/views/spree/admin/cms_pages/_section_template.html.erb +16 -0
  126. data/app/views/spree/admin/cms_pages/edit.html.erb +21 -0
  127. data/app/views/spree/admin/cms_pages/index.html.erb +84 -0
  128. data/app/views/spree/admin/cms_pages/new.html.erb +8 -0
  129. data/app/views/spree/admin/cms_sections/_form.html.erb +69 -0
  130. data/app/views/spree/admin/cms_sections/edit.html.erb +19 -0
  131. data/app/views/spree/admin/cms_sections/new.html.erb +11 -0
  132. data/app/views/spree/admin/cms_sections/types/_featured_article.html.erb +50 -0
  133. data/app/views/spree/admin/cms_sections/types/_hero_image.html.erb +62 -0
  134. data/app/views/spree/admin/cms_sections/types/_image_gallery.html.erb +177 -0
  135. data/app/views/spree/admin/cms_sections/types/_product_carousel.html.erb +5 -0
  136. data/app/views/spree/admin/cms_sections/types/_rich_text_content.html.erb +4 -0
  137. data/app/views/spree/admin/cms_sections/types/_side_by_side_images.html.erb +121 -0
  138. data/app/views/spree/admin/countries/index.html.erb +5 -3
  139. data/app/views/spree/admin/customer_returns/_reimbursements_table.html.erb +6 -4
  140. data/app/views/spree/admin/customer_returns/_return_item_decision.html.erb +9 -7
  141. data/app/views/spree/admin/customer_returns/index.html.erb +4 -2
  142. data/app/views/spree/admin/errors/forbidden.html.erb +0 -0
  143. data/app/views/spree/admin/images/index.html.erb +8 -4
  144. data/app/views/spree/admin/menu_items/_form.html.erb +115 -0
  145. data/app/views/spree/admin/menu_items/edit.html.erb +11 -0
  146. data/app/views/spree/admin/menu_items/new.html.erb +11 -0
  147. data/app/views/spree/admin/menus/_form.html.erb +19 -0
  148. data/app/views/spree/admin/menus/edit.html.erb +57 -0
  149. data/app/views/spree/admin/menus/index.html.erb +90 -0
  150. data/app/views/spree/admin/menus/nested_menu_items/_item_bar.html.erb +30 -0
  151. data/app/views/spree/admin/menus/new.html.erb +22 -0
  152. data/app/views/spree/admin/option_types/_form.html.erb +3 -0
  153. data/app/views/spree/admin/option_types/_option_value_fields.html.erb +5 -1
  154. data/app/views/spree/admin/option_types/index.html.erb +5 -3
  155. data/app/views/spree/admin/orders/_channel_form.html.erb +2 -2
  156. data/app/views/spree/admin/orders/_line_items.html.erb +10 -8
  157. data/app/views/spree/admin/orders/_shipment.html.erb +26 -18
  158. data/app/views/spree/admin/orders/_shipment_manifest.html.erb +11 -9
  159. data/app/views/spree/admin/orders/customer_details/_autocomplete.js.erb +2 -2
  160. data/app/views/spree/admin/orders/index.html.erb +100 -101
  161. data/app/views/spree/admin/payment_methods/_form.html.erb +6 -4
  162. data/app/views/spree/admin/payment_methods/edit.html.erb +1 -1
  163. data/app/views/spree/admin/payment_methods/index.html.erb +22 -3
  164. data/app/views/spree/admin/payment_methods/new.html.erb +1 -1
  165. data/app/views/spree/admin/payments/_list.html.erb +9 -7
  166. data/app/views/spree/admin/prices/_variant_prices.html.erb +7 -14
  167. data/app/views/spree/admin/product_properties/_product_property_fields.html.erb +9 -7
  168. data/app/views/spree/admin/products/_autocomplete.js.erb +10 -6
  169. data/app/views/spree/admin/products/_form.html.erb +35 -5
  170. data/app/views/spree/admin/products/index.html.erb +15 -14
  171. data/app/views/spree/admin/products/new.html.erb +6 -1
  172. data/app/views/spree/admin/products/stock.html.erb +71 -68
  173. data/app/views/spree/admin/promotion_categories/index.html.erb +5 -3
  174. data/app/views/spree/admin/promotions/_form.html.erb +7 -0
  175. data/app/views/spree/admin/promotions/actions/_create_item_adjustments.html.erb +1 -0
  176. data/app/views/spree/admin/promotions/calculators/_default_fields.html.erb +2 -1
  177. data/app/views/spree/admin/promotions/index.html.erb +33 -34
  178. data/app/views/spree/admin/properties/_form.html.erb +6 -0
  179. data/app/views/spree/admin/properties/index.html.erb +19 -3
  180. data/app/views/spree/admin/prototypes/_form.html.erb +1 -1
  181. data/app/views/spree/admin/prototypes/_prototypes.html.erb +8 -6
  182. data/app/views/spree/admin/prototypes/index.html.erb +5 -3
  183. data/app/views/spree/admin/reimbursement_types/index.html.erb +5 -3
  184. data/app/views/spree/admin/reports/index.html.erb +1 -1
  185. data/app/views/spree/admin/reports/sales_total.html.erb +1 -1
  186. data/app/views/spree/admin/return_authorizations/_form.html.erb +2 -2
  187. data/app/views/spree/admin/return_authorizations/index.html.erb +7 -5
  188. data/app/views/spree/admin/return_index/customer_returns.html.erb +4 -2
  189. data/app/views/spree/admin/return_index/return_authorizations.html.erb +5 -3
  190. data/app/views/spree/admin/roles/index.html.erb +5 -3
  191. data/app/views/spree/admin/shared/_account_nav.html.erb +5 -5
  192. data/app/views/spree/admin/shared/_address_form.html.erb +5 -4
  193. data/app/views/spree/admin/shared/_content_header.html.erb +20 -6
  194. data/app/views/spree/admin/shared/_head.html.erb +2 -1
  195. data/app/views/spree/admin/shared/_header.html.erb +7 -10
  196. data/app/views/spree/admin/shared/_link_fields.html.erb +22 -0
  197. data/app/views/spree/admin/shared/_main_menu.html.erb +19 -4
  198. data/app/views/spree/admin/shared/_order_tabs.html.erb +1 -10
  199. data/app/views/spree/admin/shared/_paths.html.erb +8 -0
  200. data/app/views/spree/admin/shared/_refunds.html.erb +4 -2
  201. data/app/views/spree/admin/shared/_sidebar.html.erb +1 -1
  202. data/app/views/spree/admin/shared/_store_switcher.html.erb +23 -0
  203. data/app/views/spree/admin/shared/_table_filter.html.erb +6 -6
  204. data/app/views/spree/admin/shared/_translations.html.erb +2 -0
  205. data/app/views/spree/admin/shared/cms/_spree_product.html.erb +14 -0
  206. data/app/views/spree/admin/shared/cms/_spree_taxon.html.erb +14 -0
  207. data/app/views/spree/admin/shared/linkables/_home_page.html.erb +3 -0
  208. data/app/views/spree/admin/shared/linkables/_spree_cms_page.erb +28 -0
  209. data/app/views/spree/admin/shared/linkables/_spree_product.html.erb +20 -0
  210. data/app/views/spree/admin/shared/linkables/_spree_taxon.html.erb +22 -0
  211. data/app/views/spree/admin/shared/linkables/_url.html.erb +16 -0
  212. data/app/views/spree/admin/shared/named_types/_index.html.erb +7 -5
  213. data/app/views/spree/admin/shared/sub_menu/_configuration.html.erb +1 -3
  214. data/app/views/spree/admin/shared/sub_menu/_content.html.erb +4 -0
  215. data/app/views/spree/admin/shared/sub_menu/_stock.html.erb +4 -0
  216. data/app/views/spree/admin/shipping_categories/index.html.erb +5 -3
  217. data/app/views/spree/admin/shipping_methods/index.html.erb +5 -3
  218. data/app/views/spree/admin/states/_state_list.html.erb +5 -3
  219. data/app/views/spree/admin/stock_locations/index.html.erb +5 -3
  220. data/app/views/spree/admin/stock_transfers/index.html.erb +5 -4
  221. data/app/views/spree/admin/stock_transfers/new.html.erb +9 -7
  222. data/app/views/spree/admin/store_credit_categories/index.html.erb +5 -3
  223. data/app/views/spree/admin/store_credits/index.html.erb +7 -5
  224. data/app/views/spree/admin/stores/_form.html.erb +12 -2
  225. data/app/views/spree/admin/stores/index.html.erb +12 -10
  226. data/app/views/spree/admin/tax_categories/index.html.erb +5 -3
  227. data/app/views/spree/admin/tax_rates/index.html.erb +5 -3
  228. data/app/views/spree/admin/taxonomies/_list.html.erb +5 -3
  229. data/app/views/spree/admin/taxons/_form.html.erb +1 -1
  230. data/app/views/spree/admin/users/_addresses_form.html.erb +2 -4
  231. data/app/views/spree/admin/users/_lifetime_stats.html.erb +16 -4
  232. data/app/views/spree/admin/users/index.html.erb +5 -3
  233. data/app/views/spree/admin/users/items.html.erb +1 -1
  234. data/app/views/spree/admin/variants/_autocomplete.js.erb +6 -2
  235. data/app/views/spree/admin/variants/_autocomplete_line_items_stock.js.erb +18 -12
  236. data/app/views/spree/admin/variants/_autocomplete_stock.js.erb +12 -8
  237. data/app/views/spree/admin/variants/_split.js.erb +9 -7
  238. data/app/views/spree/admin/variants/index.html.erb +8 -5
  239. data/app/views/spree/admin/zones/index.html.erb +5 -3
  240. data/app/views/spree/layouts/admin.html.erb +16 -16
  241. data/config/initializers/assets.rb +5 -1
  242. data/config/routes.rb +14 -2
  243. data/lib/generators/spree/backend/install/install_generator.rb +22 -0
  244. data/lib/generators/spree/backend/install/templates/vendor/assets/javascripts/spree/backend/all.js +8 -0
  245. data/lib/generators/spree/backend/install/templates/vendor/assets/stylesheets/spree/backend/all.css +9 -0
  246. data/lib/spree/backend/engine.rb +4 -11
  247. data/lib/spree/backend.rb +7 -4
  248. data/lib/spree_backend.rb +0 -2
  249. data/spec/fixtures/files/favicon.ico +0 -0
  250. data/spec/fixtures/files/icon_512x512.png +0 -0
  251. data/spree_backend.gemspec +16 -11
  252. data/vendor/assets/javascripts/cleave.js +8 -0
  253. data/vendor/assets/javascripts/jsonapi-serializer.min.js +8 -0
  254. data/vendor/assets/javascripts/jsuri.js +458 -0
  255. data/vendor/assets/javascripts/sortable.js +2 -3709
  256. data/vendor/assets/javascripts/sweetalert2.js +2 -0
  257. metadata +208 -42
  258. data/app/assets/javascripts/spree/backend/address_states.js +0 -44
  259. data/app/assets/javascripts/spree/frontend/backend.js +0 -1
  260. data/app/assets/stylesheets/spree/frontend/backend.css +0 -1
  261. data/app/views/spree/admin/orders/_store_form.html.erb +0 -18
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7e29a2b82aea0e37fa048ecc8c3457c22d80992c2d3bccc8f2d73f952bc74b2
4
- data.tar.gz: 8ad4ecc49935986629055b00fadee3a4a31fc75f7883427852676e5ea96fa23a
3
+ metadata.gz: 79ca40c018802153b873f59a98ec2707b28121385864e9e6775cf046d89030d2
4
+ data.tar.gz: 11af2a95c3a987495d29c75e7c44377b719df1fb138946e29bda7d911fce45ac
5
5
  SHA512:
6
- metadata.gz: bb2f4c19ffa278002c5d51f289bf7f6a54e65c087affd897c019b39c0f2784e8ef0ec83d753a8e817df655a05604ce2c911729a7517e900cb6e1fdad49639d2e
7
- data.tar.gz: 514d808c33f205f5b67dba1d8cf09da4626e8fa0ba3198443b07b7b5c274834ffa5da009d2c98c0b64f94a5cf1d19e57fb0b1466c1db27229f6c0241b0971730
6
+ metadata.gz: 42b3e7abd694167ebe63a3e5c514b74fd81435c8d8f0a2bffa8173ab9fbd279d1970d92617e2e3869e3397112d664eaa82b83467c83c10eb2515b5e1f919c699
7
+ data.tar.gz: 823383c304a701fd5811e07aa6ef4f036659bd778dad0287ddd4c8abf0e9d17a4d8d9b7c4ee50127d48c1973947265b74b444caeb03f2af8c32d13dfc6245a0c
data/Rakefile CHANGED
@@ -11,5 +11,5 @@ task default: :spec
11
11
  desc "Generates a dummy app for testing"
12
12
  task :test_app do
13
13
  ENV['LIB_NAME'] = 'spree/backend'
14
- Rake::Task['common:test_app'].invoke
14
+ Rake::Task['common:test_app'].execute( { install_admin: true, install_storefront: false } )
15
15
  end
@@ -0,0 +1,129 @@
1
+ //= link_tree ../images
2
+
3
+ //= link spree/backend/all.js
4
+ //= link spree/backend/all.css
5
+ //= link jquery.jstree/themes/spree/style.css
6
+
7
+ //= link select2_locale_af.js
8
+ //= link select2_locale_ar.js
9
+ //= link select2_locale_az.js
10
+ //= link select2_locale_bg.js
11
+ //= link select2_locale_bn.js
12
+ //= link select2_locale_bs.js
13
+ //= link select2_locale_ca.js
14
+ //= link select2_locale_cs.js
15
+ //= link select2_locale_da.js
16
+ //= link select2_locale_de.js
17
+ //= link select2_locale_dsb.js
18
+ //= link select2_locale_el.js
19
+ //= link select2_locale_en.js
20
+ //= link select2_locale_es.js
21
+ //= link select2_locale_et.js
22
+ //= link select2_locale_eu.js
23
+ //= link select2_locale_fa.js
24
+ //= link select2_locale_fi.js
25
+ //= link select2_locale_fr.js
26
+ //= link select2_locale_gl.js
27
+ //= link select2_locale_he.js
28
+ //= link select2_locale_hi.js
29
+ //= link select2_locale_hr.js
30
+ //= link select2_locale_hsb.js
31
+ //= link select2_locale_hu.js
32
+ //= link select2_locale_hy.js
33
+ //= link select2_locale_id.js
34
+ //= link select2_locale_is.js
35
+ //= link select2_locale_it.js
36
+ //= link select2_locale_ja.js
37
+ //= link select2_locale_ka.js
38
+ //= link select2_locale_km.js
39
+ //= link select2_locale_ko.js
40
+ //= link select2_locale_lt.js
41
+ //= link select2_locale_lv.js
42
+ //= link select2_locale_mk.js
43
+ //= link select2_locale_ms.js
44
+ //= link select2_locale_nb.js
45
+ //= link select2_locale_ne.js
46
+ //= link select2_locale_nl.js
47
+ //= link select2_locale_pl.js
48
+ //= link select2_locale_ps.js
49
+ //= link select2_locale_pt.js
50
+ //= link select2_locale_pt-BR.js
51
+ //= link select2_locale_ro.js
52
+ //= link select2_locale_ru.js
53
+ //= link select2_locale_sk.js
54
+ //= link select2_locale_sl.js
55
+ //= link select2_locale_sq.js
56
+ //= link select2_locale_sr.js
57
+ //= link select2_locale_sr-Cyrl.js
58
+ //= link select2_locale_sv.js
59
+ //= link select2_locale_th.js
60
+ //= link select2_locale_tk.js
61
+ //= link select2_locale_tr.js
62
+ //= link select2_locale_uk.js
63
+ //= link select2_locale_vi.js
64
+ //= link select2_locale_zh-CN.js
65
+ //= link select2_locale_zh-TW.js
66
+
67
+ //= link flatpickr/l10n/ar.js
68
+ //= link flatpickr/l10n/bs.js
69
+ //= link flatpickr/l10n/default.js
70
+ //= link flatpickr/l10n/fo.js
71
+ //= link flatpickr/l10n/hr.js
72
+ //= link flatpickr/l10n/ja.js
73
+ //= link flatpickr/l10n/lv.js
74
+ //= link flatpickr/l10n/no.js
75
+ //= link flatpickr/l10n/si.js
76
+ //= link flatpickr/l10n/sv.js
77
+ //= link flatpickr/l10n/vn.js
78
+ //= link flatpickr/l10n/at.js
79
+ //= link flatpickr/l10n/cat.js
80
+ //= link flatpickr/l10n/eo.js
81
+ //= link flatpickr/l10n/fr.js
82
+ //= link flatpickr/l10n/hu.js
83
+ //= link flatpickr/l10n/ka.js
84
+ //= link flatpickr/l10n/mk.js
85
+ //= link flatpickr/l10n/pa.js
86
+ //= link flatpickr/l10n/sk.js
87
+ //= link flatpickr/l10n/th.js
88
+ //= link flatpickr/l10n/zh-tw.js
89
+ //= link flatpickr/l10n/az.js
90
+ //= link flatpickr/l10n/cs.js
91
+ //= link flatpickr/l10n/es.js
92
+ //= link flatpickr/l10n/ga.js
93
+ //= link flatpickr/l10n/id.js
94
+ //= link flatpickr/l10n/km.js
95
+ //= link flatpickr/l10n/mn.js
96
+ //= link flatpickr/l10n/pl.js
97
+ //= link flatpickr/l10n/sl.js
98
+ //= link flatpickr/l10n/tr.js
99
+ //= link flatpickr/l10n/zh.js
100
+ //= link flatpickr/l10n/be.js
101
+ //= link flatpickr/l10n/cy.js
102
+ //= link flatpickr/l10n/et.js
103
+ //= link flatpickr/l10n/gr.js
104
+ //= link flatpickr/l10n/index.js
105
+ //= link flatpickr/l10n/ko.js
106
+ //= link flatpickr/l10n/ms.js
107
+ //= link flatpickr/l10n/pt.js
108
+ //= link flatpickr/l10n/sq.js
109
+ //= link flatpickr/l10n/uk.js
110
+ //= link flatpickr/l10n/bg.js
111
+ //= link flatpickr/l10n/da.js
112
+ //= link flatpickr/l10n/fa.js
113
+ //= link flatpickr/l10n/he.js
114
+ //= link flatpickr/l10n/is.js
115
+ //= link flatpickr/l10n/kz.js
116
+ //= link flatpickr/l10n/my.js
117
+ //= link flatpickr/l10n/ro.js
118
+ //= link flatpickr/l10n/sr-cyr.js
119
+ //= link flatpickr/l10n/uz.js
120
+ //= link flatpickr/l10n/bn.js
121
+ //= link flatpickr/l10n/de.js
122
+ //= link flatpickr/l10n/fi.js
123
+ //= link flatpickr/l10n/hi.js
124
+ //= link flatpickr/l10n/it.js
125
+ //= link flatpickr/l10n/lt.js
126
+ //= link flatpickr/l10n/nl.js
127
+ //= link flatpickr/l10n/ru.js
128
+ //= link flatpickr/l10n/sr.js
129
+ //= link flatpickr/l10n/uz_latn.js
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-arrows-fullscreen" viewBox="0 0 16 16">
2
+ <path fill-rule="evenodd" d="M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707zm4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707zm0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707zm-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-box-seam" viewBox="0 0 16 16">
2
+ <path d="M8.186 1.113a.5.5 0 0 0-.372 0L1.846 3.5l2.404.961L10.404 2l-2.218-.887zm3.564 1.426L5.596 5 8 5.961 14.154 3.5l-2.404-.961zm3.25 1.7-6.5 2.6v7.922l6.5-2.6V4.24zM7.5 14.762V6.838L1 4.239v7.923l6.5 2.6zM7.443.184a1.5 1.5 0 0 1 1.114 0l7.129 2.852A.5.5 0 0 1 16 3.5v8.662a1 1 0 0 1-.629.928l-7.185 2.874a.5.5 0 0 1-.372 0L.63 13.09a1 1 0 0 1-.63-.928V3.5a.5.5 0 0 1 .314-.464L7.443.184z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-circle-fill" viewBox="0 0 16 16">
2
+ <circle cx="8" cy="8" r="8"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-circle" viewBox="0 0 16 16">
2
+ <path d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"/>
3
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">
2
+ <path d="M959.135 94.233c0-34.377-27.91-62.287-62.287-62.287H605.892c-34.377 0-62.287 27.91-62.287 62.287v808.965c0 34.377 27.91 62.287 62.287 62.287h290.956c34.377 0 62.287-27.91 62.287-62.287V94.233zM456.186 94.097c0-34.447-27.967-62.414-62.414-62.414H103.07c-34.447 0-62.414 27.967-62.414 62.414v304.939c0 34.447 27.967 62.414 62.414 62.414h290.702c34.447 0 62.414-27.967 62.414-62.414V94.097zM456.214 598.525c0-34.868-28.309-63.177-63.177-63.177H103.861c-34.869 0-63.177 28.309-63.177 63.177v303.413c0 34.868 28.308 63.177 63.177 63.177h289.176c34.868 0 63.177-28.309 63.177-63.177V598.525z" fill="none" stroke="currentColor" stroke-width="41.67"/>
3
+ <text x="141.599" y="355.618" font-family="Helvetica" font-size="300">A</text>
4
+ <text x="140.455" y="860.271" font-family="Helvetica" font-size="300">C</text>
5
+ <text x="653.924" y="607.221" font-family="Helvetica" font-size="300">B</text>
6
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye-slash-fill" viewBox="0 0 16 16">
2
+ <path d="m10.79 12.912-1.614-1.615a3.5 3.5 0 0 1-4.474-4.474l-2.06-2.06C.938 6.278 0 8 0 8s3 5.5 8 5.5a7.029 7.029 0 0 0 2.79-.588zM5.21 3.088A7.028 7.028 0 0 1 8 2.5c5 0 8 5.5 8 5.5s-.939 1.721-2.641 3.238l-2.062-2.062a3.5 3.5 0 0 0-4.474-4.474L5.21 3.089z"/>
3
+ <path d="M5.525 7.646a2.5 2.5 0 0 0 2.829 2.829l-2.83-2.829zm4.95.708-2.829-2.83a2.5 2.5 0 0 1 2.829 2.829zm3.171 6-12-12 .708-.708 12 12-.708.708z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-file-richtext" viewBox="0 0 16 16">
2
+ <path d="M7 4.25a.75.75 0 1 1-1.5 0 .75.75 0 0 1 1.5 0zm-.861 1.542 1.33.886 1.854-1.855a.25.25 0 0 1 .289-.047l1.888.974V7.5a.5.5 0 0 1-.5.5H5a.5.5 0 0 1-.5-.5V7s1.54-1.274 1.639-1.208zM5 9a.5.5 0 0 0 0 1h6a.5.5 0 0 0 0-1H5zm0 2a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1H5z"/>
3
+ <path d="M2 2a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2zm10-1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1z"/>
4
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-fullscreen-exit" viewBox="0 0 16 16">
2
+ <path d="M5.5 0a.5.5 0 0 1 .5.5v4A1.5 1.5 0 0 1 4.5 6h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5zm5 0a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 10 4.5v-4a.5.5 0 0 1 .5-.5zM0 10.5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 6 11.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zm10 1a1.5 1.5 0 0 1 1.5-1.5h4a.5.5 0 0 1 0 1h-4a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4z"/>
3
+ </svg>
@@ -0,0 +1,3 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-fullscreen" viewBox="0 0 16 16">
2
+ <path d="M1.5 1a.5.5 0 0 0-.5.5v4a.5.5 0 0 1-1 0v-4A1.5 1.5 0 0 1 1.5 0h4a.5.5 0 0 1 0 1h-4zM10 .5a.5.5 0 0 1 .5-.5h4A1.5 1.5 0 0 1 16 1.5v4a.5.5 0 0 1-1 0v-4a.5.5 0 0 0-.5-.5h-4a.5.5 0 0 1-.5-.5zM.5 10a.5.5 0 0 1 .5.5v4a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 0 1h-4A1.5 1.5 0 0 1 0 14.5v-4a.5.5 0 0 1 .5-.5zm15 0a.5.5 0 0 1 .5.5v4a1.5 1.5 0 0 1-1.5 1.5h-4a.5.5 0 0 1 0-1h4a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 1 .5-.5z"/>
3
+ </svg>
@@ -0,0 +1,5 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
2
+ <path d="M298.667 25.6h-85.333c-4.71 0-8.533 3.823-8.533 8.533 0 4.71 3.823 8.533 8.533 8.533h85.333c4.71 0 8.533-3.823 8.533-8.533 0-4.71-3.823-8.533-8.533-8.533zM358.4 25.6h-8.533c-4.71 0-8.533 3.823-8.533 8.533 0 4.71 3.823 8.533 8.533 8.533h8.533c4.71 0 8.533-3.823 8.533-8.533 0-4.71-3.823-8.533-8.533-8.533zM266.598 435.2H245.41c-12.979 0-23.543 10.564-23.543 23.543v4.122c0 12.979 10.564 23.535 23.535 23.535h21.188c12.979 0 23.543-10.556 23.543-23.535v-4.122c0-12.979-10.564-23.543-23.535-23.543zm6.469 27.665c0 3.567-2.901 6.468-6.468 6.468H245.41c-3.575 0-6.477-2.901-6.477-6.468v-4.122c0-3.575 2.901-6.477 6.477-6.477h21.18c3.576 0 6.477 2.901 6.477 6.477v4.122z"/>
3
+ <path d="M370.227 0H141.781c-17.007 0-30.848 13.841-30.848 30.848v450.304c0 17.007 13.841 30.848 30.848 30.848h228.437c17.007 0 30.848-13.841 30.848-30.839V30.848C401.067 13.841 387.226 0 370.227 0zM384 481.152c0 7.595-6.178 13.781-13.773 13.781H141.781c-7.603 0-13.781-6.187-13.781-13.773V30.848c0-7.595 6.178-13.781 13.781-13.781h228.437c7.603 0 13.781 6.187 13.781 13.781v450.304z"/>
4
+ <path d="M392.533 51.2H119.467c-4.71 0-8.533 3.823-8.533 8.533v358.4c0 4.71 3.823 8.533 8.533 8.533h273.067c4.71 0 8.533-3.823 8.533-8.533v-358.4c0-4.71-3.823-8.533-8.534-8.533zM384 409.6H128V68.267h256V409.6z"/>
5
+ </svg>
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
3
+ <svg width="100%" height="100%" viewBox="0 0 512 512" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2;">
4
+ <g id="_1" transform="matrix(1.19789,0,0,1.19789,-79.2207,-40.1571)">
5
+ <g transform="matrix(1,0,0,1,2.50441,-1.66961)">
6
+ <path d="M391.89,450L163,450C135.523,449.967 112.923,427.367 112.89,399.89L112.89,98.11C112.923,70.633 135.523,48.033 163,48L313.1,48C317.077,47.998 320.897,49.578 323.71,52.39L437.61,166.27C440.422,169.083 442.002,172.903 442,176.88L442,399.88C441.973,427.361 419.371,449.967 391.89,450ZM163,78C151.972,78.011 142.901,87.082 142.89,98.11L142.89,399.89C142.901,410.918 151.972,419.989 163,420L391.89,420C402.918,419.989 411.989,410.918 412,399.89L412,183.09L306.91,78L163,78Z" style="fill:currentColor;"/>
7
+ </g>
8
+ <path d="M427,191.88L348.23,191.88C320.753,191.847 298.153,169.247 298.12,141.77L298.12,63C298.12,54.771 304.891,48 313.12,48C321.349,48 328.12,54.771 328.12,63L328.12,141.77C328.131,152.798 337.202,161.869 348.23,161.88L427,161.88C435.229,161.88 442,168.651 442,176.88C442,185.109 435.229,191.88 427,191.88Z" style="fill:currentColor;"/>
9
+ </g>
10
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-phone" viewBox="0 0 16 16">
2
+ <path d="M11 1a1 1 0 0 1 1 1v12a1 1 0 0 1-1 1H5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1h6zM5 0a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h6a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2H5z"/>
3
+ <path d="M8 14a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/>
4
+ </svg>
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 1000 1000" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linecap="round" stroke-linejoin="round" stroke-miterlimit="1.5">
2
+ <path d="M452.624 94.233c0-34.377-27.91-62.287-62.288-62.287H99.381c-34.377 0-62.287 27.91-62.287 62.287v808.965c0 34.377 27.91 62.287 62.287 62.287h290.955c34.378 0 62.288-27.91 62.288-62.287V94.233zM958.245 94.097c0-34.447-27.967-62.414-62.414-62.414H605.129c-34.447 0-62.414 27.967-62.414 62.414v304.939c0 34.447 27.967 62.414 62.414 62.414h290.702c34.447 0 62.414-27.967 62.414-62.414V94.097zM958.245 598.525c0-34.868-28.309-63.177-63.177-63.177H605.892c-34.868 0-63.177 28.309-63.177 63.177v303.413c0 34.868 28.309 63.177 63.177 63.177h289.176c34.868 0 63.177-28.309 63.177-63.177V598.525z" fill="none" stroke="currentColor" stroke-width="41.67"/>
3
+ <text x="652.782" y="355.618" font-family="Helvetica" font-size="300">A</text>
4
+ <text x="637.342" y="859.271" font-family="Helvetica" font-size="300">C</text>
5
+ <text x="139.772" y="607.221" font-family="Helvetica" font-size="300">B</text>
6
+ </svg>
@@ -0,0 +1 @@
1
+ <svg viewBox="0 0 500 500" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2"><path d="M219.139 381.189c0 13.505-10.945 24.451-24.45 24.451-13.502 0-24.448-10.946-24.448-24.451s10.946-24.451 24.448-24.451c13.505 0 24.45 10.946 24.45 24.451M321.928 381.189c0 13.505-10.948 24.451-24.45 24.451-13.503 0-24.448-10.946-24.448-24.451s10.945-24.451 24.448-24.451c13.502 0 24.45 10.946 24.45 24.451M306.461 332.291H185.71a23.944 23.944 0 01-22.136-14.808l-31.807-77.004h-24.896c-13.227 0-23.951-10.724-23.951-23.951s10.724-23.951 23.951-23.951h40.916a23.95 23.95 0 0122.137 14.808l31.806 77.004h88.869l32.729-77.208c5.164-12.182 19.22-17.858 31.402-12.705 12.176 5.164 17.864 19.22 12.703 31.399l-38.92 91.812a23.953 23.953 0 01-22.052 14.604" fill-rule="nonzero"/><path d="M333.217 113.118c-9.165-9.545-24.325-9.85-33.867-.686l-29.815 28.627V26.919c0-13.23-10.721-23.95-23.951-23.95-13.227 0-23.951 10.72-23.951 23.95v113.58l-28.693-27.95c-9.475-9.227-24.639-9.032-33.869.446-9.23 9.475-9.032 24.639.443 33.869l69.358 67.556c.318.309.659.581.988.868.174.153.342.312.521.461a24.027 24.027 0 002.539 1.83c.123.074.255.143.38.221a24.01 24.01 0 002.656 1.371c.084.036.156.087.239.123.057.024.114.042.168.063.545.228 1.096.422 1.653.605.203.069.404.149.607.212.545.162 1.099.294 1.65.419.222.051.44.117.662.159.553.111 1.11.183 1.667.252.222.027.437.074.659.092.748.075 1.497.111 2.245.111.024 0 .048.006.075.006h.003c.063 0 .129-.009.192-.009.7-.006 1.401-.036 2.095-.102.413-.039.824-.116 1.231-.176.344-.051.688-.087 1.03-.153.488-.093.97-.224 1.452-.347.254-.069.515-.117.766-.192.497-.147.979-.326 1.467-.506.234-.084.473-.155.707-.251.464-.186.916-.404 1.371-.623.248-.117.5-.225.742-.35.413-.216.815-.458 1.219-.701.275-.164.557-.32.826-.497.353-.23.695-.488 1.039-.739.305-.225.614-.446.91-.686.299-.242.587-.506.877-.763.222-.198.452-.375.668-.581l70.355-67.553c9.541-9.164 9.847-24.325.686-33.866M249.284 497.033c-23.996 0-49.024-9.035-75.93-27.103-10.981-7.374-13.906-22.253-6.532-33.234 7.373-10.979 22.253-13.904 33.237-6.533 41.938 28.163 65.634 21.379 90.282 1.311 10.26-8.349 25.346-6.808 33.696 3.452 8.35 10.26 6.805 25.346-3.455 33.696-23.268 18.942-46.74 28.411-71.298 28.411" fill-rule="nonzero"/></svg>
@@ -0,0 +1,6 @@
1
+ <svg viewBox="0 0 2075 892" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">
2
+ <g fill-rule="nonzero" fill="currentColor">
3
+ <path d="M774.897 704.867c-37.553 0-81.661-17.277-100.736-45.895-4.166-5.366-5.958-11.32-5.958-17.88 0-16.089 14.903-29.803 30.991-29.803 8.348 0 16.099 4.167 23.844 13.117 11.922 14.894 29.21 22.052 51.859 22.052 39.937 0 63.184-23.247 63.184-47.688 0-26.223-26.229-44.108-59.008-56.03-32.783-11.917-67.957-23.246-91.198-52.451-11.325-14.904-17.288-32.779-17.288-54.836 0-61.396 51.261-97.162 108.486-97.162 38.145 0 79.87 20.862 100.732 52.456 2.981 4.769 4.768 10.13 4.768 16.686 0 16.691-14.306 29.807-30.997 29.807-8.94 0-16.685-4.774-23.838-14.306-12.52-17.288-29.21-26.228-50.665-26.228-31.001 0-48.882 17.288-48.882 38.747 0 22.057 26.228 36.955 59.012 48.877 32.784 12.519 67.953 25.039 91.199 56.623 11.324 16.098 17.283 35.168 17.283 57.817 0 63.781-56.623 106.097-122.788 106.097zm226.342 84.294c0 18.518-13.734 29.863-29.858 29.863-16.123 0-29.857-11.345-29.857-29.863V466.683c0-71.064 57.325-128.389 128.39-128.389 71.069 0 128.395 57.325 128.395 128.389v110.485c0 71.059-57.326 128.39-128.395 128.39-26.871 0-49.565-8.363-68.675-25.676v109.279zm0-211.993c0 38.215 30.454 68.675 68.675 68.675 38.22 0 68.675-30.46 68.675-68.675V466.683c0-38.22-30.455-68.675-68.675-68.675-38.221 0-68.675 30.455-68.675 68.675v110.485zm426.266-153.928c-7.841 0-15.064-3.017-21.696-9.643l-1.204-1.205c-11.445-9.035-24.09-13.854-39.154-13.854-35.545 0-57.235 24.702-57.235 73.499v200.619c0 18.678-13.855 30.123-30.124 30.123s-30.123-11.445-30.123-30.123V472.037c0-75.306 42.773-133.746 117.482-133.746 28.908 0 63.851 13.252 83.739 33.135 6.024 6.626 9.036 13.257 9.036 21.083 0 16.269-14.457 30.731-30.721 30.731zm310.885 84.928c0 16.099-13.709 29.803-29.802 29.803h-166.901v38.747c0 35.761 34.576 68.545 74.513 68.545 23.839 0 42.914-7.746 57.817-22.649 6.551-8.946 14.301-13.709 23.839-13.709 16.098 0 31.002 13.709 31.002 29.797 0 11.927-6.561 19.672-13.714 26.825-24.436 26.228-57.818 39.34-98.944 39.34-69.739 0-134.123-57.215-134.123-128.149V466.444c0-70.928 57.23-128.154 128.159-128.154s128.154 57.226 128.154 128.154v41.724zm-59.604-29.802v-11.922c0-38.15-30.405-68.544-68.55-68.544-38.15 0-68.549 30.394-68.549 68.544v11.922h137.099zm357.283 29.802c0 16.099-13.709 29.803-29.802 29.803h-166.896v38.747c0 35.761 34.571 68.545 74.508 68.545 23.839 0 42.919-7.746 57.817-22.649 6.556-8.946 14.301-13.709 23.844-13.709 16.093 0 30.997 13.709 30.997 29.797 0 11.927-6.556 19.672-13.714 26.825-24.436 26.228-57.812 39.34-98.944 39.34-69.739 0-134.123-57.215-134.123-128.149V466.444c0-70.928 57.23-128.154 128.159-128.154 70.934 0 128.154 57.226 128.154 128.154v41.724zm-59.604-29.802v-11.922c0-38.15-30.405-68.544-68.55-68.544-38.15 0-68.544 30.394-68.544 68.544v11.922h137.094zM241.964 660.886c0 22.644-18.352 40.996-40.996 40.996-22.64 0-40.992-18.352-40.992-40.996 0-22.644 18.352-40.996 40.992-40.996 22.644 0 40.996 18.352 40.996 40.996M414.309 660.886c0 22.644-18.357 40.996-40.996 40.996-22.639 0-40.991-18.352-40.991-40.996 0-22.644 18.352-40.996 40.991-40.996s40.996 18.352 40.996 40.996M388.374 578.898H185.913a40.149 40.149 0 01-37.116-24.827L95.468 424.958H53.724c-22.178 0-40.158-17.981-40.158-40.158s17.98-40.158 40.158-40.158h68.604a40.156 40.156 0 0137.116 24.828l53.33 129.113H361.78l54.876-129.454c8.659-20.426 32.226-29.943 52.652-21.304 20.415 8.659 29.952 32.226 21.298 52.647l-65.256 153.94a40.164 40.164 0 01-36.976 24.486"/>
4
+ <path d="M433.236 211.413c-15.366-16.003-40.786-16.515-56.783-1.15l-49.992 47.999V66.885c0-22.183-17.976-40.158-40.158-40.158-22.177 0-40.158 17.975-40.158 40.158v190.438l-48.109-46.864c-15.887-15.471-41.312-15.144-56.788.748-15.476 15.888-15.145 41.313.743 56.788l116.292 113.271c.532.517 1.104.974 1.656 1.455.292.256.573.523.874.774a40.237 40.237 0 004.257 3.067c.205.125.426.241.637.371a40.349 40.349 0 004.453 2.299c.14.06.261.146.401.206.096.04.191.07.281.105.914.382 1.837.708 2.771 1.014.342.116.678.251 1.019.357.914.271 1.842.492 2.766.702.372.086.738.196 1.109.267.929.185 1.863.306 2.796.421.372.045.733.126 1.105.156 1.255.125 2.51.186 3.765.186.04 0 .08.01.125.01h.005c.105 0 .216-.016.321-.016 1.175-.01 2.35-.06 3.514-.17.693-.065 1.381-.196 2.063-.296.578-.086 1.155-.146 1.727-.256.818-.156 1.626-.377 2.435-.583.426-.115.863-.195 1.285-.321.833-.246 1.641-.547 2.459-.848.392-.141.793-.261 1.185-.422.778-.311 1.536-.678 2.299-1.044.417-.196.838-.376 1.245-.587.693-.362 1.365-.768 2.043-1.175.462-.276.934-.537 1.385-.833.593-.387 1.165-.818 1.742-1.24.512-.377 1.029-.748 1.526-1.15.502-.406.984-.848 1.471-1.28.372-.331.758-.627 1.119-.973l117.964-113.266c15.998-15.365 16.51-40.785 1.15-56.783M292.506 855.121c-40.233 0-82.198-15.149-127.31-45.444-18.413-12.363-23.317-37.311-10.953-55.724 12.363-18.407 37.311-23.311 55.729-10.953 70.316 47.221 110.048 35.846 151.375 2.199 17.203-14 42.497-11.415 56.497 5.788 14 17.202 11.41 42.497-5.792 56.497-39.014 31.76-78.369 47.637-119.546 47.637"/>
5
+ </g>
6
+ </svg>
@@ -1,14 +1,3 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 512 512" style="clip-rule:evenodd;fill-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;version:1">
2
- <style>
3
- .store-svg{
4
- fill:none;
5
- stroke-width:35px;
6
- stroke:currentColor;
7
- }
8
- </style>
9
- <path d="M256.7 177.1c4.5 10.2 28.3 29.3 51.9 29.3 27.1 0 48.6-18 56.8-28.7 7.6 11.5 30.6 28.2 59 28.2 28.4 0 57.1-17.9 57.1-42.7 0-6.2-1.3-10.7-3.5-16.7l-22.2-67.2 -187.1 0" class="store-svg"/>
10
- <path d="M268.6 79.3l-14.5 0 -199.2 0 -22.2 67.2c-2.3 6-3.5 10.2-3.5 16.4 0 24.8 28.8 42.9 57.2 42.9 28.4 0 51.5-16.6 59.2-28 8.2 10.7 30.1 29 57.1 29 23.5 0 49.4-19.5 53.9-29.7" class="store-svg"/>
11
- <path d="M452.8 209.2l0 194.8c0 16.7-15.5 31.7-32.2 31.7l-327.2 0c-16.7 0-33.2-15-33.2-31.7l0-200.9" class="store-svg"/>
12
- <path d="M313.9 420.6l0-121.2c0-14.6 12.6-26.8 27.2-26.8l31 0c14.6 0 26.4 12.2 26.4 26.8l0 121.2" class="store-svg"/>
13
- <path d="M247.5 369.3c0 6.7-5.4 12.1-12.1 12.1l-108.7 0c-6.7 0-12.1-5.4-12.1-12.1l0-84.6c0-6.7 5.4-12.1 12.1-12.1l108.7 0c6.7 0 12.1 5.4 12.1 12.1l0 84.6 0 0Z" class="store-svg"/>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-shop-window" viewBox="0 0 16 16">
2
+ <path d="M2.97 1.35A1 1 0 0 1 3.73 1h8.54a1 1 0 0 1 .76.35l2.609 3.044A1.5 1.5 0 0 1 16 5.37v.255a2.375 2.375 0 0 1-4.25 1.458A2.371 2.371 0 0 1 9.875 8 2.37 2.37 0 0 1 8 7.083 2.37 2.37 0 0 1 6.125 8a2.37 2.37 0 0 1-1.875-.917A2.375 2.375 0 0 1 0 5.625V5.37a1.5 1.5 0 0 1 .361-.976l2.61-3.045zm1.78 4.275a1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0 1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0 1.375 1.375 0 1 0 2.75 0V5.37a.5.5 0 0 0-.12-.325L12.27 2H3.73L1.12 5.045A.5.5 0 0 0 1 5.37v.255a1.375 1.375 0 0 0 2.75 0 .5.5 0 0 1 1 0zM1.5 8.5A.5.5 0 0 1 2 9v6h12V9a.5.5 0 0 1 1 0v6h.5a.5.5 0 0 1 0 1H.5a.5.5 0 0 1 0-1H1V9a.5.5 0 0 1 .5-.5zm2 .5a.5.5 0 0 1 .5.5V13h8V9.5a.5.5 0 0 1 1 0V13a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V9.5a.5.5 0 0 1 .5-.5z"/>
14
3
  </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-translate" viewBox="0 0 16 16">
2
+ <path d="M4.545 6.714 4.11 8H3l1.862-5h1.284L8 8H6.833l-.435-1.286H4.545zm1.634-.736L5.5 3.956h-.049l-.679 2.022H6.18z"/>
3
+ <path d="M0 2a2 2 0 0 1 2-2h7a2 2 0 0 1 2 2v3h3a2 2 0 0 1 2 2v7a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-3H2a2 2 0 0 1-2-2V2zm2-1a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V2a1 1 0 0 0-1-1H2zm7.138 9.995c.193.301.402.583.63.846-.748.575-1.673 1.001-2.768 1.292.178.217.451.635.555.867 1.125-.359 2.08-.844 2.886-1.494.777.665 1.739 1.165 2.93 1.472.133-.254.414-.673.629-.89-1.125-.253-2.057-.694-2.82-1.284.681-.747 1.222-1.651 1.621-2.757H14V8h-3v1.047h.765c-.318.844-.74 1.546-1.272 2.13a6.066 6.066 0 0 1-.415-.492 1.988 1.988 0 0 1-.94.31z"/>
4
+ </svg>
@@ -1,6 +1,3 @@
1
- <svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="2">
2
- <g fill-rule="nonzero" stroke="currentColor" stroke-width="9.5">
3
- <path fill="currentColor" d="M401.722 230.445c23.142-14.24 38.654-39.707 38.654-68.787 0-44.569-36.308-80.829-80.932-80.829-44.623 0-80.932 36.26-80.932 80.829 0 29.08 15.512 54.547 38.655 68.787-49.972 11.194-85.037 41.775-85.037 78.782 0 30.285 80.031 38.366 127.314 38.366 47.283 0 127.314-8.081 127.314-38.366 0-37.007-35.065-67.588-85.036-78.782zm-106.538-68.787c0-35.375 28.83-64.156 64.26-64.156 35.43 0 64.26 28.781 64.26 64.156 0 35.376-28.83 64.151-64.26 64.151-35.43 0-64.26-28.775-64.26-64.151zm64.26 169.262c-67.969 0-108.655-14.338-110.637-21.749.052-36.777 49.666-66.689 110.637-66.689 60.965 0 110.575 29.907 110.636 66.678-1.932 7.406-42.622 21.76-110.636 21.76z"/>
4
- <path fill="currentColor" d="M218.769 305.288c26.479-15.872 44.227-44.258 44.227-76.67 0-49.677-41.543-90.092-92.599-90.092-51.056 0-92.599 40.415-92.599 90.092 0 32.412 17.748 60.798 44.227 76.67-57.175 12.477-97.294 46.562-97.294 87.811 0 33.755 91.567 42.762 145.666 42.762 54.099 0 145.666-9.007 145.666-42.762 0-41.249-40.119-75.334-97.294-87.811zm-121.895-76.67c0-39.429 32.986-71.509 73.523-71.509s73.523 32.08 73.523 71.509c0 39.43-32.986 71.503-73.523 71.503s-73.523-32.073-73.523-71.503zm73.523 188.66c-77.767 0-124.318-15.982-126.585-24.242.059-40.991 56.825-74.331 126.585-74.331 69.753 0 126.514 33.333 126.584 74.319-2.21 8.254-48.766 24.254-126.584 24.254z"/>
5
- </g>
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-people" viewBox="0 0 16 16">
2
+ <path d="M15 14s1 0 1-1-1-4-5-4-5 3-5 4 1 1 1 1h8zm-7.978-1A.261.261 0 0 1 7 12.996c.001-.264.167-1.03.76-1.72C8.312 10.629 9.282 10 11 10c1.717 0 2.687.63 3.24 1.276.593.69.758 1.457.76 1.72l-.008.002a.274.274 0 0 1-.014.002H7.022zM11 7a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm3-2a3 3 0 1 1-6 0 3 3 0 0 1 6 0zM6.936 9.28a5.88 5.88 0 0 0-1.23-.247A7.35 7.35 0 0 0 5 9c-4 0-5 3-5 4 0 .667.333 1 1 1h4.216A2.238 2.238 0 0 1 5 13c0-1.01.377-2.042 1.09-2.904.243-.294.526-.569.846-.816zM4.92 10A5.493 5.493 0 0 0 4 13H1c0-.26.164-1.03.76-1.724.545-.636 1.492-1.256 3.16-1.275zM1.5 5.5a3 3 0 1 1 6 0 3 3 0 0 1-6 0zm3-2a2 2 0 1 0 0 4 2 2 0 0 0 0-4z"/>
6
3
  </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-window-sidebar" viewBox="0 0 16 16">
2
+ <path d="M2.5 4a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1zm2-.5a.5.5 0 1 1-1 0 .5.5 0 0 1 1 0zm1 .5a.5.5 0 1 0 0-1 .5.5 0 0 0 0 1z"/>
3
+ <path d="M2 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2H2zm12 1a1 1 0 0 1 1 1v2H1V3a1 1 0 0 1 1-1h12zM1 13V6h4v8H2a1 1 0 0 1-1-1zm5 1V6h9v7a1 1 0 0 1-1 1H6z"/>
4
+ </svg>
@@ -0,0 +1,4 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-image" viewBox="0 0 16 16">
2
+ <path d="M6.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/>
3
+ <path d="M2.002 1a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V3a2 2 0 0 0-2-2h-12zm12 1a1 1 0 0 1 1 1v6.5l-3.777-1.947a.5.5 0 0 0-.577.093l-3.71 3.71-2.66-1.772a.5.5 0 0 0-.63.062L1.002 12V3a1 1 0 0 1 1-1h12z"/>
4
+ </svg>
Binary file
Binary file
Binary file
@@ -0,0 +1,44 @@
1
+ function updateAddressState(region, successCallback) {
2
+ const countryId = $('#' + region + 'country select').val()
3
+ const stateContainer = $('#' + region + 'state').parent()
4
+ const stateSelect = $('#' + region + 'state select')
5
+ const stateInput = $('#' + region + 'state input.state_name')
6
+
7
+ fetch(Spree.routes.countries_api_v2 + '/' + countryId + '?include=states', {
8
+ headers: Spree.apiV2Authentication()
9
+ }).then((response) => {
10
+ switch (response.status) {
11
+ case 200:
12
+ response.json().then((json) => {
13
+ const states = json.included
14
+ const statesRequired = json.data.attributes.states_required
15
+ if (states.length > 0) {
16
+ stateSelect.html('')
17
+ $.each(states, function (_pos, state) {
18
+ const opt = $(document.createElement('option'))
19
+ .prop('value', state.id)
20
+ .html(state.attributes.name)
21
+ stateSelect.append(opt).trigger('change')
22
+ })
23
+ stateSelect.prop('disabled', false).show()
24
+ stateSelect.select2()
25
+ stateInput.hide().prop('disabled', true)
26
+ stateContainer.show()
27
+ } else {
28
+ stateSelect.val(null).trigger('change')
29
+ if (stateSelect.data('select2')) {
30
+ stateSelect.select2('destroy')
31
+ }
32
+ stateSelect.hide()
33
+ if (statesRequired) {
34
+ stateInput.prop('disabled', false).show()
35
+ } else {
36
+ stateContainer.hide()
37
+ }
38
+ }
39
+ if (successCallback) successCallback()
40
+ })
41
+ break
42
+ }
43
+ })
44
+ }
@@ -1,286 +1,51 @@
1
- /**
2
- This is a collection of javascript functions and whatnot
3
- under the spree namespace that do stuff we find helpful.
4
- Hopefully, this will evolve into a propper class.
5
- **/
6
-
7
- /* global AUTH_TOKEN, order_number, Sortable, flatpickr, DOMPurify */
8
- jQuery(function ($) {
9
- // Add some tips
10
- $('.with-tip').each(function() {
11
- $(this).tooltip({
12
- container: $(this)
13
- })
14
- })
15
-
16
- $('.with-tip').on('show.bs.tooltip', function(event) {
17
- if (('ontouchstart' in window)) {
18
- event.preventDefault()
19
- }
20
- })
21
-
22
- $('.js-show-index-filters').click(function () {
23
- $('.filter-well').slideToggle()
24
- $(this).parents('.filter-wrap').toggleClass('collapsed')
25
- })
26
-
27
- // Responsive Menus
28
- var body = $('body')
29
- var modalBackdrop = $('#multi-backdrop')
30
-
31
- // Fail safe on resize
32
- var resizeTimer;
33
- window.addEventListener('resize', function () {
34
- document.body.classList.remove('modal-open', 'sidebar-open', 'contextualSideMenu-open');
35
- document.body.classList.add('resize-animation-stopper');
36
- clearTimeout(resizeTimer);
37
- resizeTimer = setTimeout(function () {
38
- document.body.classList.remove('resize-animation-stopper');
39
- }, 400);
40
- });
41
-
42
- function closeAllMenus() {
43
- body.removeClass()
44
- body.addClass('admin')
45
- modalBackdrop.removeClass('show')
46
- }
47
-
48
- modalBackdrop.click(closeAllMenus)
49
-
50
- // Main Menu Functionality
51
- var sidebarOpen = $('#sidebar-open')
52
- var sidebarClose = $('#sidebar-close')
53
- var activeItem = $('#main-sidebar').find('.selected')
54
-
55
- activeItem.closest('.nav-sidebar').addClass('active-option')
56
- activeItem.closest('.nav-pills').addClass('in show')
57
-
58
- function openMenu() {
59
- closeAllMenus()
60
- body.addClass('sidebar-open modal-open')
61
- modalBackdrop.addClass('show')
62
- }
63
- sidebarOpen.click(openMenu)
64
- sidebarClose.click(closeAllMenus)
65
-
66
- // Contextual Sidebar Menu
67
- var contextualSidebarMenuToggle = $('#contextual-menu-toggle')
68
- var contextualSidebarMenuClose = $('#contextual-menu-close')
69
-
70
- function toggleContextualMenu() {
71
- if (document.body.classList.contains('contextualSideMenu-open')) {
72
- closeAllMenus()
73
- } else {
74
- closeAllMenus()
75
- body.addClass('contextualSideMenu-open modal-open')
76
- modalBackdrop.addClass('show')
77
- }
78
- }
79
- contextualSidebarMenuToggle.click(toggleContextualMenu)
80
- contextualSidebarMenuClose.click(toggleContextualMenu)
81
-
82
- // TODO: remove this js temp behaviour and fix this decent
83
- // Temp quick search
84
- // When there was a search term, copy it
85
- $('.js-quick-search').val($('.js-quick-search-target').val())
86
- // Catch the quick search form submit and submit the real form
87
- $('#quick-search').submit(function () {
88
- $('.js-quick-search-target').val($('.js-quick-search').val())
89
- $('#table-filter form').submit()
90
- return false
91
- })
92
-
93
- // Clickable ransack filters
94
- $('.js-add-filter').click(function () {
95
- var ransackField = $(this).data('ransack-field')
96
- var ransackValue = $(this).data('ransack-value')
97
-
98
- $('#' + ransackField).val(ransackValue)
99
- $('#table-filter form').submit()
100
- })
101
-
102
- $(document).on('click', '.js-delete-filter', function () {
103
- var ransackField = $(this).parents('.js-filter').data('ransack-field')
104
-
105
- $('#' + ransackField).val('')
106
- $('#table-filter form').submit()
107
- })
108
-
109
- function ransackField (value) {
110
- switch (value) {
111
- case 'Date Range':
112
- return 'Start'
113
- case '':
114
- return 'Stop'
115
- default:
116
- return value.trim()
117
- }
118
- }
119
-
120
- $('.js-filterable').each(function () {
121
- var $this = $(this)
122
-
123
- if ($this.val() !== null && $this.val() !== '' && $this.val().length !== 0 && !$this.hasClass('flatpickr-alt-input')) {
124
- var ransackValue, filter
125
- var ransackFieldId = $this.attr('id')
126
- var label = $('label[for="' + ransackFieldId + '"]')
127
-
128
- if ($this.is('select')) {
129
- ransackValue = $this.find('option:selected').toArray().map(function (option) {
130
- return option.text;
131
- }).join(', ')
132
- } else {
133
- ransackValue = $this.val()
134
- }
135
-
136
- label = ransackField(label.text()) + ': ' + ransackValue
137
- var cleanLabel = DOMPurify.sanitize(label)
138
-
139
- filter = '<span class="js-filter badge badge-secondary" data-ransack-field="' + ransackFieldId + '">' + cleanLabel + '<i class="icon icon-cancel ml-2 js-delete-filter"></i></span>'
140
- $(".js-filters").append(filter).show()
141
- }
142
- })
143
-
144
- // per page dropdown
145
- // preserves all selected filters / queries supplied by user
146
- // changes only per_page value
147
- $('.js-per-page-select').change(function () {
148
- var form = $(this).closest('.js-per-page-form')
149
- var url = form.attr('action')
150
- var value = $(this).val().toString()
151
- if (url.match(/\?/)) {
152
- url += '&per_page=' + value
153
- } else {
154
- url += '?per_page=' + value
155
- }
156
- window.location = url
157
- })
158
-
159
- // injects per_page settings to all available search forms
160
- // so when user changes some filters / queries per_page is preserved
161
- $(document).ready(function () {
162
- var perPageDropdown = $('.js-per-page-select:first')
163
- if (perPageDropdown.length) {
164
- var perPageValue = perPageDropdown.val().toString()
165
- var perPageInput = '<input type="hidden" name="per_page" value=' + perPageValue + ' />'
166
- $('#table-filter form').append(perPageInput)
167
- }
168
- })
169
- })
170
-
171
- function handleAlert (element) {
172
- element.classList.add('animate__animated', 'animate__bounceInUp')
173
- element.addEventListener('animationend', function () {
174
- element.classList.remove('animate__bounceInUp')
175
- element.classList.add('animate__fadeOutDownBig', 'animate__delay-3s')
176
- })
177
- }
178
-
179
- // Triggers alert if required on document ready.
180
- $(document).ready(function () {
181
- var element = document.querySelector('.flash-alert')
182
-
183
- if (element) {
184
- handleAlert(element)
185
- }
186
- })
187
-
188
- $.fn.visible = function (cond) { this[ cond ? 'show' : 'hide' ]() }
189
- // Triggers alerts when requested by javascript.
190
- // eslint-disable-next-line camelcase
191
- function show_flash (type, message) {
192
- var cleanMessage = DOMPurify.sanitize(message)
193
- var existingAlert = document.querySelector('.flash-alert')
194
-
195
- if (existingAlert) {
196
- existingAlert.remove()
197
- }
198
-
199
- var flashDiv = $('.alert-' + type)
200
- if (flashDiv.length === 0) {
201
- flashDiv = $('<div class="d-flex justify-content-center position-fixed flash-alert">' +
202
- '<div class="alert alert-' + type + ' mx-2">' + cleanMessage + '</div></div>')
203
-
204
- $('body').append(flashDiv)
205
-
206
- var ajaxFlashNotfication = document.querySelector('.flash-alert')
207
- handleAlert(ajaxFlashNotfication)
208
- }
209
- }
210
-
211
- // Apply to individual radio button that makes another element visible when checked
212
- $.fn.radioControlsVisibilityOfElement = function (dependentElementSelector) {
213
- if (!this.get(0)) { return }
214
- var showValue = this.get(0).value
215
- var radioGroup = $("input[name='" + this.get(0).name + "']")
216
- radioGroup.each(function () {
217
- $(this).click(function () {
218
- // eslint-disable-next-line eqeqeq
219
- $(dependentElementSelector).visible(this.checked && this.value == showValue)
220
- })
221
- if (this.checked) { this.click() }
222
- })
223
- }
224
-
225
- document.addEventListener('DOMContentLoaded', function() {
226
- flatpickr.setDefaults({
227
- altInput: true,
228
- time_24hr: true,
229
- altInputClass: 'flatpickr-alt-input',
230
- locale: Spree.translations.flatpickr_locale
231
- })
232
-
233
- var dateFrom = flatpickr('.datePickerFrom', {
234
- onChange: function(selectedDates) {
235
- dateTo.set('minDate', selectedDates[0])
236
- }
237
- })
238
-
239
- var dateTo = flatpickr('.datePickerTo', {
240
- onChange: function(selectedDates) {
241
- dateFrom.set('maxDate', selectedDates[0])
242
- }
243
- })
244
-
245
- flatpickr('.datepicker', { })
246
- })
1
+ /* global order_number, show_flash */
247
2
 
248
3
  $(document).ready(function() {
4
+ /**
5
+ OBSERVE FIELD:
6
+ **/
249
7
  $('.observe_field').on('change', function() {
250
- target = $(this).data('update')
8
+ var target = $(this).data('update')
251
9
  $(target).hide()
252
10
  $.ajax({
253
11
  dataType: 'html',
254
12
  url: $(this).data('base-url') + encodeURIComponent($(this).val()),
255
13
  type: 'GET'
256
- }).done(function (data) {
14
+ }).done(function(data) {
257
15
  $(target).html(data)
258
16
  $(target).show()
259
17
  })
260
18
  })
261
19
 
20
+ /**
21
+ ADD FIELDS
22
+ **/
262
23
  var uniqueId = 1
263
- $('.spree_add_fields').click(function () {
24
+ $('.spree_add_fields').click(function() {
264
25
  var target = $(this).data('target')
265
26
  var newTableRow = $(target + ' tr:visible:last').clone()
266
27
  var newId = new Date().getTime() + (uniqueId++)
267
- newTableRow.find('input, select').each(function () {
28
+ newTableRow.find('input, select').each(function() {
268
29
  var el = $(this)
269
30
  el.val('')
270
31
  el.prop('id', el.prop('id').replace(/\d+/, newId))
271
32
  el.prop('name', el.prop('name').replace(/\d+/, newId))
272
33
  })
34
+
273
35
  // When cloning a new row, set the href of all icons to be an empty "#"
274
36
  // This is so that clicking on them does not perform the actions for the
275
37
  // duplicated row
276
- newTableRow.find('a').each(function () {
38
+ newTableRow.find('a').each(function() {
277
39
  var el = $(this)
278
40
  el.prop('href', '#')
279
41
  })
280
42
  $(target).prepend(newTableRow)
281
43
  })
282
44
 
283
- $('body').on('click', '.delete-resource', function () {
45
+ /**
46
+ DELETE RESOURCE
47
+ **/
48
+ $('body').on('click', '.delete-resource', function() {
284
49
  var el = $(this)
285
50
  if (confirm(el.data('confirm'))) {
286
51
  $.ajax({
@@ -294,14 +59,19 @@ $(document).ready(function() {
294
59
  complete: function() {
295
60
  el.blur()
296
61
  }
297
- }).done(function () {
298
- var $flash_element = $('.alert-success')
299
- if ($flash_element.length) {
300
- el.parents('tr').fadeOut('hide', function () {
62
+ }).done(function() {
63
+ var $flashElement = $('#FlashAlertsContainer span[data-alert-type="success"]')
64
+ if ($flashElement.length) {
65
+ el.parents('tr').fadeOut('hide', function() {
66
+ $(this).remove()
67
+ })
68
+ el.closest('.removable-dom-element').fadeOut('hide', function() {
301
69
  $(this).remove()
302
70
  })
71
+ var livePreview = document.getElementById('pageLivePreview')
72
+ if (livePreview) { livePreview.contentWindow.location.reload() }
303
73
  }
304
- }).fail(function (response) {
74
+ }).fail(function(response) {
305
75
  show_flash('error', response.responseText)
306
76
  })
307
77
  } else {
@@ -310,8 +80,11 @@ $(document).ready(function() {
310
80
  return false
311
81
  })
312
82
 
313
- $('body').on('click', 'a.spree_remove_fields', function () {
314
- el = $(this)
83
+ /**
84
+ REMOVE FIELDS
85
+ **/
86
+ $('body').on('click', 'a.spree_remove_fields', function() {
87
+ var el = $(this)
315
88
  el.prev('input[type=hidden]').val('1')
316
89
  el.closest('.fields').hide()
317
90
  if (el.prop('href').substr(-1) === '#') {
@@ -324,72 +97,37 @@ $(document).ready(function() {
324
97
  _method: 'delete',
325
98
  authenticity_token: AUTH_TOKEN
326
99
  }
327
- }).done(function () {
328
- el.parents('tr').fadeOut('hide', function () {
100
+ }).done(function() {
101
+ el.parents('tr').fadeOut('hide', function() {
329
102
  $(this).remove()
330
103
  })
331
- }).fail(function (response) {
104
+ }).fail(function(response) {
332
105
  show_flash('error', response.responseText)
333
106
  })
334
107
  }
335
108
  return false
336
109
  })
337
110
 
111
+ /**
112
+ SELECT PROPERTIES FROM PROTOTYPE
113
+ **/
338
114
  $('body').on('click', '.select_properties_from_prototype', function() {
339
115
  $('#busy_indicator').show()
340
- var clicked_link = $(this)
116
+ var clickedLink = $(this)
341
117
  $.ajax({
342
118
  dataType: 'script',
343
- url: clicked_link.prop('href'),
119
+ url: clickedLink.prop('href'),
344
120
  type: 'GET'
345
- }).done(function () {
346
- clicked_link.parent('td').parent('tr').hide()
121
+ }).done(function() {
122
+ clickedLink.parent('td').parent('tr').hide()
347
123
  $('#busy_indicator').hide()
348
124
  })
349
125
  return false
350
126
  })
351
127
 
352
- // Sortable List Up-Down
353
- var parentEl = document.getElementsByClassName("sortable")[0];
354
- if (parentEl) {
355
- var element = parentEl.querySelector('tbody')
356
- }
357
-
358
- if (element) {
359
- Sortable.create(element, {
360
- handle: '.move-handle',
361
- animation: 550,
362
- ghostClass: 'bg-light',
363
- dragClass: "sortable-drag-v",
364
- easing: 'cubic-bezier(1, 0, 0, 1)',
365
- swapThreshold: 0.9,
366
- forceFallback: true,
367
- onEnd: function (evt) {
368
- var itemEl = evt.item
369
- var positions = { authenticity_token: AUTH_TOKEN }
370
- $.each($('tr', element), function(position, obj) {
371
- reg = /spree_(\w+_?)+_(\d+)/
372
- parts = reg.exec($(obj).prop('id'))
373
- if (parts) {
374
- positions['positions[' + parts[2] + ']'] = position + 1
375
- }
376
- })
377
- $.ajax({
378
- type: 'POST',
379
- dataType: 'json',
380
- url: $(itemEl).closest('table.sortable').data('sortable-link'),
381
- data: positions
382
- })
383
- }
384
- })
385
- }
386
-
387
- // Close notifications
388
- $('a.dismiss').click(function () {
389
- $(this).parent().fadeOut()
390
- })
391
-
392
- // Utility
128
+ /**
129
+ UTILITY
130
+ **/
393
131
  window.Spree.advanceOrder = function() {
394
132
  $.ajax({
395
133
  type: 'PUT',