beyond_canvas 0.15.2.pre → 0.17.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (74) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +0 -6
  3. data/Rakefile +3 -3
  4. data/app/assets/config/beyond_canvas_manifest.js +1 -0
  5. data/app/assets/images/icons/arrow_right.svg +1 -0
  6. data/app/assets/images/icons/close.svg +1 -0
  7. data/app/assets/images/icons/home.svg +1 -0
  8. data/app/assets/javascripts/beyond_canvas/base.js +120 -246
  9. data/app/assets/stylesheets/beyond_canvas/base.scss +8 -1
  10. data/app/assets/stylesheets/beyond_canvas/components/_action_bar.scss +28 -0
  11. data/app/assets/stylesheets/beyond_canvas/components/_breadcrumbs.scss +29 -0
  12. data/app/assets/stylesheets/beyond_canvas/components/_buttons.scss +1 -1
  13. data/app/assets/stylesheets/beyond_canvas/components/_debug.scss +10 -0
  14. data/app/assets/stylesheets/beyond_canvas/components/_forms.scss +11 -14
  15. data/app/assets/stylesheets/beyond_canvas/components/_main.scss +12 -13
  16. data/app/assets/stylesheets/beyond_canvas/components/_margins.scss +8 -0
  17. data/app/assets/stylesheets/beyond_canvas/components/_menu.scss +40 -0
  18. data/app/assets/stylesheets/beyond_canvas/components/_modals.scss +27 -0
  19. data/app/assets/stylesheets/beyond_canvas/components/_sidebar.scss +53 -0
  20. data/app/assets/stylesheets/beyond_canvas/components/_titles.scss +7 -0
  21. data/app/assets/stylesheets/beyond_canvas/settings/_breakpoints.scss +6 -6
  22. data/app/assets/stylesheets/beyond_canvas/settings/_variables.scss +77 -22
  23. data/app/controllers/beyond_canvas/application_controller.rb +2 -0
  24. data/app/controllers/beyond_canvas/authentications_controller.rb +69 -0
  25. data/app/controllers/concerns/beyond_canvas/authentication.rb +13 -0
  26. data/app/controllers/concerns/beyond_canvas/locale_management.rb +5 -4
  27. data/app/controllers/concerns/beyond_canvas/request_validation.rb +1 -1
  28. data/app/helpers/beyond_canvas/authentications_helper.rb +28 -0
  29. data/app/helpers/beyond_canvas/cockpit_app_helper.rb +17 -0
  30. data/app/helpers/beyond_canvas/debug_helper.rb +9 -0
  31. data/app/helpers/beyond_canvas/locale_switch_helper.rb +5 -1
  32. data/app/javascript/beyond_canvas/base.js +3 -0
  33. data/app/javascript/beyond_canvas/initializers/buttons.js +65 -19
  34. data/app/javascript/beyond_canvas/initializers/flash.js +9 -2
  35. data/app/javascript/beyond_canvas/initializers/inputs.js +4 -1
  36. data/app/javascript/beyond_canvas/initializers/modals.js +14 -0
  37. data/app/views/beyond_canvas/authentications/new.html.erb +27 -0
  38. data/app/views/beyond_canvas/shared/_action_bar.html.erb +15 -0
  39. data/app/views/beyond_canvas/shared/_breadcrumbs.html.erb +14 -0
  40. data/app/views/beyond_canvas/shared/_flash.html.erb +22 -12
  41. data/app/views/beyond_canvas/shared/_locales.html.erb +8 -0
  42. data/app/views/beyond_canvas/shared/_menu.html.erb +31 -0
  43. data/app/views/beyond_canvas/shared/_modal.html.erb +6 -0
  44. data/app/views/beyond_canvas/shared/_sidebar.html.erb +16 -0
  45. data/app/views/layouts/beyond_canvas/application.html.erb +31 -0
  46. data/app/views/layouts/beyond_canvas/public.html.erb +10 -1
  47. data/config/locales/en.yml +9 -0
  48. data/config/routes.rb +8 -1
  49. data/lib/beyond_canvas.rb +18 -2
  50. data/lib/beyond_canvas/configuration.rb +11 -3
  51. data/lib/beyond_canvas/engine.rb +6 -0
  52. data/lib/beyond_canvas/menu_item_registration.rb +19 -0
  53. data/lib/beyond_canvas/parameter_sanitizer.rb +43 -0
  54. data/lib/beyond_canvas/rails/routes.rb +22 -0
  55. data/lib/beyond_canvas/version.rb +1 -1
  56. data/lib/generators/beyond_canvas/controller/controller_generator.rb +19 -0
  57. data/lib/generators/beyond_canvas/controller/templates/controller.erb +20 -0
  58. data/lib/generators/beyond_canvas/custom_menu/custom_menu_generator.rb +13 -0
  59. data/lib/generators/beyond_canvas/custom_menu/templates/beyond_canvas_custom_menu.html.erb +32 -0
  60. data/lib/generators/beyond_canvas/custom_styles/custom_styles_generator.rb +1 -1
  61. data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.scss +199 -0
  62. data/lib/generators/beyond_canvas/install/install_generator.rb +13 -5
  63. data/lib/generators/beyond_canvas/install/templates/beyond_canvas.rb.erb +55 -6
  64. data/lib/generators/beyond_canvas/model/model_generator.rb +49 -0
  65. data/lib/generators/beyond_canvas/model/templates/migration.erb +18 -0
  66. data/lib/generators/beyond_canvas/model/templates/model.erb +5 -0
  67. data/lib/generators/beyond_canvas/views/views_generator.rb +17 -0
  68. data/lib/models/concerns/authentication.rb +57 -0
  69. data/lib/models/concerns/utils.rb +79 -0
  70. data/lib/models/shop.rb +12 -0
  71. metadata +95 -12
  72. data/app/javascript/beyond_canvas/initializers/functions.js +0 -41
  73. data/app/views/beyond_canvas/locales/_edit.html.erb +0 -8
  74. data/lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.sass +0 -123
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70836ce40a293f66cd6e356d731409917770f7a0f491778d4fa9571132454741
4
- data.tar.gz: 1c9c24f161e23c8009a463c30ccde514e84277d47db0c2f0f645915b0c716e38
3
+ metadata.gz: d68bb535d2ac13479fbf78d65485f4e4d75008ee76b717263460315c6a68fc8b
4
+ data.tar.gz: 71d0874d34489a4cf68aaac680865b70668fd95ec5acdb3570e1ac7dee5f5971
5
5
  SHA512:
6
- metadata.gz: 702fe9f4ea8fc0d26c791e2944dd0271ac3ccb3ba861d04d8f515177098513f1f694f3a758fe2d4d70cccf4adfc798b35b4e6a87bfed69f89ba6792d555a291f
7
- data.tar.gz: 97a8105ded178daa6e013b1163bd3474938248e2471091f2cd543f02336b578f061cd7ddf0757bbe77e346c042be92115c2d9ce166943cb885673a0bee01d2a7
6
+ metadata.gz: 0faf96cabf37ae07a4b4febc069a8b93a257e0341a5b1136dea1735d7d31df93e6c1f007ead4c9d90aa0ddfc28ce7555d672a8562cd4d0cf767c3241b397abe6
7
+ data.tar.gz: a3f482336565147692c27db3332314d00c290af8ce949028c0d8235f0236ad9d1fa2ea3760ea2b65fa28c26db41ec0d5447af3ce6d9b260f338617bccc89a6fe
data/README.md CHANGED
@@ -37,12 +37,6 @@
37
37
  //= require beyond_canvas
38
38
  ```
39
39
 
40
- 1. Mount the engine in your routes file:
41
-
42
- ```ruby
43
- mount BeyondCanvas::Engine => "/<your-mounting-path>"
44
- ```
45
-
46
40
  1. Run the generator:
47
41
 
48
42
  ```bash
data/Rakefile CHANGED
@@ -35,13 +35,13 @@ require 'colorize'
35
35
  namespace :release do
36
36
  desc 'Update beyond_canvas_custom_styles.sass generator template to latest version'
37
37
  task :custom_styles do |_task, _args|
38
- ORIG = 'app/assets/stylesheets/beyond_canvas/settings/_variables.sass'
39
- DEST = 'lib/generators/templates/beyond_canvas_custom_styles.sass'
38
+ ORIG = 'app/assets/stylesheets/beyond_canvas/settings/_variables.scss'
39
+ DEST = 'lib/generators/beyond_canvas/custom_styles/templates/beyond_canvas_custom_styles.scss'
40
40
 
41
41
  dest_file = File.open(DEST, 'w')
42
42
 
43
43
  File.open(ORIG, 'r').each do |line|
44
- next if line.include?('!global')
44
+ next if line.start_with?('$') && !line.include?('!default')
45
45
 
46
46
  line.start_with?('$') ? dest_file.print('// ' + line.gsub(' !default', '')) : dest_file.print(line)
47
47
  end
@@ -1 +1,2 @@
1
1
  //= link_directory ../stylesheets .css
2
+ //= link_tree ../images
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="arrow-right"><path d="M5 3l3.057-3L20 12 8.057 24 5 21l9-9z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" title="dialog.closeButton.title"><path d="M23.954 21.03l-9.184-9.095 9.092-9.174L21.03-.046l-9.09 9.179L2.764.045l-2.81 2.81L9.14 11.96.045 21.144l2.81 2.81 9.112-9.192 9.18 9.1z"></path></svg>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" class="home-icon"><path d="M12 9.185l7 6.514V22h-3v-5H8v5H5v-6.301l7-6.514zm0-2.732l-9 8.375V24h7v-5h4v5h7v-9.172l-9-8.375zm12 5.695L12 1 0 12.133l1.361 1.465L12 3.73l10.639 9.883L24 12.148z"></path></svg>
@@ -1,255 +1,129 @@
1
- /*!
2
- *
3
- * Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
4
- *
5
- * //= require jquery3
6
- * //= require_self
7
- *
1
+ /*
2
+ * Warning: This file is auto-generated, do not modify. Instead, make your changes in 'app/javascript/beyond_canvas/' and run `yarn build`
8
3
  */
9
- (function(e, a) { for(var i in a) e[i] = a[i]; }(window, /******/ (function(modules) { // webpackBootstrap
10
- /******/ // The module cache
11
- /******/ var installedModules = {};
12
- /******/
13
- /******/ // The require function
14
- /******/ function __webpack_require__(moduleId) {
15
- /******/
16
- /******/ // Check if module is in cache
17
- /******/ if(installedModules[moduleId]) {
18
- /******/ return installedModules[moduleId].exports;
19
- /******/ }
20
- /******/ // Create a new module (and put it into the cache)
21
- /******/ var module = installedModules[moduleId] = {
22
- /******/ i: moduleId,
23
- /******/ l: false,
24
- /******/ exports: {}
25
- /******/ };
26
- /******/
27
- /******/ // Execute the module function
28
- /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
29
- /******/
30
- /******/ // Flag the module as loaded
31
- /******/ module.l = true;
32
- /******/
33
- /******/ // Return the exports of the module
34
- /******/ return module.exports;
35
- /******/ }
36
- /******/
37
- /******/
38
- /******/ // expose the modules object (__webpack_modules__)
39
- /******/ __webpack_require__.m = modules;
40
- /******/
41
- /******/ // expose the module cache
42
- /******/ __webpack_require__.c = installedModules;
43
- /******/
44
- /******/ // define getter function for harmony exports
45
- /******/ __webpack_require__.d = function(exports, name, getter) {
46
- /******/ if(!__webpack_require__.o(exports, name)) {
47
- /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
48
- /******/ }
49
- /******/ };
50
- /******/
51
- /******/ // define __esModule on exports
52
- /******/ __webpack_require__.r = function(exports) {
53
- /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
54
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
55
- /******/ }
56
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
57
- /******/ };
58
- /******/
59
- /******/ // create a fake namespace object
60
- /******/ // mode & 1: value is a module id, require it
61
- /******/ // mode & 2: merge all properties of value into the ns
62
- /******/ // mode & 4: return value when already ns object
63
- /******/ // mode & 8|1: behave like require
64
- /******/ __webpack_require__.t = function(value, mode) {
65
- /******/ if(mode & 1) value = __webpack_require__(value);
66
- /******/ if(mode & 8) return value;
67
- /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
68
- /******/ var ns = Object.create(null);
69
- /******/ __webpack_require__.r(ns);
70
- /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
71
- /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
72
- /******/ return ns;
73
- /******/ };
74
- /******/
75
- /******/ // getDefaultExport function for compatibility with non-harmony modules
76
- /******/ __webpack_require__.n = function(module) {
77
- /******/ var getter = module && module.__esModule ?
78
- /******/ function getDefault() { return module['default']; } :
79
- /******/ function getModuleExports() { return module; };
80
- /******/ __webpack_require__.d(getter, 'a', getter);
81
- /******/ return getter;
82
- /******/ };
83
- /******/
84
- /******/ // Object.prototype.hasOwnProperty.call
85
- /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
86
- /******/
87
- /******/ // __webpack_public_path__
88
- /******/ __webpack_require__.p = "";
89
- /******/
90
- /******/
91
- /******/ // Load entry module and return exports
92
- /******/ return __webpack_require__(__webpack_require__.s = 1);
93
- /******/ })
94
- /************************************************************************/
95
- /******/ ([
96
- /* 0 */
97
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
98
-
99
- "use strict";
100
- __webpack_require__.r(__webpack_exports__);
101
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "showSpinner", function() { return showSpinner; });
102
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "hideSpinner", function() { return hideSpinner; });
103
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "disableActionElements", function() { return disableActionElements; });
104
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "enableActionElements", function() { return enableActionElements; });
105
- /* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "closeAlert", function() { return closeAlert; });
106
- var SPINNER_ANIMATION_TIMEOUT = 125;
107
- function showSpinner(button) {
108
- // Adjust the width of the button
109
- button.width(button.width() + $('.spinner').outerWidth(true)); // Show the spinner
110
-
111
- setTimeout(function () {
112
- button.find('.spinner').css('display', 'flex');
113
- }, SPINNER_ANIMATION_TIMEOUT);
114
- }
115
- function hideSpinner() {
116
- $('button[class^="button"]').each(function (_, button) {
117
- setTimeout(function () {
118
- // Hide the spinner
119
- $(button).find('.spinner').hide(); // Adjust the width of the button
120
-
121
- $(button).width($(button).data('oldWidth'));
122
- }, SPINNER_ANIMATION_TIMEOUT);
123
- });
124
- }
125
- function disableActionElements() {
126
- $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
127
- $(button).addClass('actions--disabled');
128
- });
129
- }
130
- function enableActionElements() {
131
- $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function (_, button) {
132
- $(button).removeClass('actions--disabled');
133
- });
134
- }
135
- function closeAlert() {
136
- $('.flash').removeClass('flash--shown').delay(700).queue(function () {
137
- $(this).remove();
138
- });
139
- }
140
-
141
- /***/ }),
142
- /* 1 */
143
- /***/ (function(module, exports, __webpack_require__) {
144
-
145
- __webpack_require__(3);
146
- module.exports = __webpack_require__(0);
147
-
148
-
149
- /***/ }),
150
- /* 2 */
151
- /***/ (function(module, exports) {
152
-
153
- (function ($) {
154
- var onDOMReady = function onDOMReady() {
155
- $('input[type="file"]').each(function () {
156
- var $input = $(this),
157
- $label = $(".input__file__text." + $input.attr('id')),
158
- labelVal = $label.html();
159
- $input.on('change', function (e) {
160
- var fileName = '';
161
- if (this.files && this.files.length > 1) fileName = (this.getAttribute('data-multiple-caption') || '').replace('{count}', this.files.length);else if (e.target.value) fileName = e.target.value.split('\\').pop();
162
- if (fileName) $label.html("<svg class=\"input__file__icon\" xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z\"/></svg>" + fileName);else $label.html(labelVal);
163
- }); // Firefox bug fix
164
-
165
- $input.on('focus', function () {
166
- $input.addClass('has-focus');
167
- }).on('blur', function () {
168
- $input.removeClass('has-focus');
4
+ //= require jquery3
5
+ //= require_self
6
+
7
+ (function(factory) {
8
+ typeof define === "function" && define.amd ? define([ "jquery" ], factory) : factory();
9
+ })(function() {
10
+ "use strict";
11
+ var SPINNER_ANIMATION_TIMEOUT = 125;
12
+ var BUTTON_SELECTORS = '[class^="button"]';
13
+ (function($) {
14
+ var onDOMReady = function onDOMReady(e) {
15
+ var inputs = $("input, textarea, select").not(":input[type=button], :input[type=submit], :input[type=reset]");
16
+ inputs.each(function() {
17
+ var input = $(this);
18
+ input.bind("invalid", function(e) {
19
+ if ($(input).is(":hidden")) {
20
+ e.preventDefault();
21
+ }
22
+ $.restoreActionElements();
23
+ });
169
24
  });
170
- });
171
- };
172
-
173
- $(document).on('ready page:load turbolinks:load', onDOMReady);
174
- })(jQuery);
175
-
176
- /***/ }),
177
- /* 3 */
178
- /***/ (function(module, __webpack_exports__, __webpack_require__) {
179
-
180
- "use strict";
181
- // ESM COMPAT FLAG
182
- __webpack_require__.r(__webpack_exports__);
183
-
184
- // EXTERNAL MODULE: ./app/javascript/beyond_canvas/initializers/functions.js
185
- var functions = __webpack_require__(0);
186
-
187
- // CONCATENATED MODULE: ./app/javascript/beyond_canvas/initializers/buttons.js
188
-
189
-
190
- (function ($) {
191
- var onDOMReady = function onDOMReady() {
192
- var inputs = $('input, textarea, select').not(':input[type=button], :input[type=submit], :input[type=reset]');
193
- inputs.each(function () {
194
- var input = $(this);
195
- input.bind('invalid', function (e) {
196
- if ($(input).is(':hidden')) {
197
- e.preventDefault();
25
+ $(BUTTON_SELECTORS).each(function() {
26
+ var button = $(this);
27
+ button.width(button.width());
28
+ button.data("oldWidth", button.width());
29
+ if (button.find(".spinner").length == 0) {
30
+ button.prepend('\n <div class="spinner">\n <div class="bounce1"></div>\n <div class="bounce2"></div>\n <div class="bounce3"></div>\n </div>');
198
31
  }
199
-
200
- Object(functions["hideSpinner"])();
201
- Object(functions["enableActionElements"])();
32
+ button.closest("form").on("ajax:success", function() {
33
+ $.restoreActionElements();
34
+ }).on("ajax:error", function() {
35
+ $.restoreActionElements();
36
+ });
202
37
  });
38
+ };
39
+ $(document).on("confirm:complete", function() {
40
+ $.restoreActionElements();
203
41
  });
204
- $('button[class^="button"]').each(function () {
205
- var button = $(this); // Add width attribute and save old width
206
-
207
- button.width(button.width());
208
- button.data('oldWidth', button.width()); // Add the spinner
209
-
210
- button.prepend("\n <div class=\"spinner\">\n <div class=\"bounce1\"></div>\n <div class=\"bounce2\"></div>\n <div class=\"bounce3\"></div>\n </div>"); // Bind ajax:success and ajax:error to the form the button belongs to
211
-
212
- button.closest('form').on('ajax:success', function () {
213
- Object(functions["hideSpinner"])();
214
- Object(functions["enableActionElements"])();
215
- }).on('ajax:error', function () {
216
- Object(functions["hideSpinner"])();
217
- Object(functions["enableActionElements"])();
218
- });
42
+ $(document).on("click", BUTTON_SELECTORS, function() {
43
+ $.disableActionElements();
44
+ $(this).showSpinner();
219
45
  });
220
- };
221
-
222
- $(document).on('click', '[class^="button"]', function () {
223
- Object(functions["disableActionElements"])();
224
- Object(functions["showSpinner"])($(this));
46
+ $(document).on("ready page:load turbolinks:load", onDOMReady);
47
+ })(jQuery);
48
+ $.extend({
49
+ restoreActionElements: function restoreActionElements() {
50
+ $(BUTTON_SELECTORS).each(function(_, button) {
51
+ setTimeout(function() {
52
+ $(button).find(".spinner").hide();
53
+ $(button).width($(button).data("oldWidth"));
54
+ }, SPINNER_ANIMATION_TIMEOUT);
55
+ });
56
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
57
+ $(this).removeClass("actions--disabled");
58
+ });
59
+ },
60
+ disableActionElements: function disableActionElements() {
61
+ $('a, input[type="submit"], input[type="button"], input[type="reset"], button').each(function() {
62
+ $(this).addClass("actions--disabled");
63
+ });
64
+ }
225
65
  });
226
- $(document).on('ready page:load turbolinks:load', onDOMReady);
227
- })(jQuery);
228
- // CONCATENATED MODULE: ./app/javascript/beyond_canvas/initializers/flash.js
229
-
230
-
231
- (function ($) {
232
- var onDOMReady = function onDOMReady() {
233
- $('.flash').each(function () {
234
- $(this).css('right', -$(this).width() + 'px');
66
+ $.fn.extend({
67
+ showSpinner: function showSpinner() {
68
+ var button = $(this);
69
+ button.width(button.width() + $(".spinner").outerWidth(true));
70
+ setTimeout(function() {
71
+ button.find(".spinner").css("display", "inline-flex");
72
+ }, SPINNER_ANIMATION_TIMEOUT);
73
+ }
74
+ });
75
+ (function($) {
76
+ var onDOMReady = function onDOMReady() {
77
+ $(".flash").each(function() {
78
+ $(this).css("right", -$(this).width() + "px");
79
+ });
80
+ setTimeout(function() {
81
+ $(".flash").addClass("flash--shown");
82
+ }, 100);
83
+ };
84
+ $(document).on("click", ".flash", function() {
85
+ closeAlert();
235
86
  });
236
- setTimeout(function () {
237
- $('.flash').addClass('flash--shown');
238
- }, 100);
239
- };
240
-
241
- $(document).on('click', '.flash', function () {
242
- Object(functions["closeAlert"])();
87
+ $(document).on("ready page:load turbolinks:load", onDOMReady);
88
+ })(jQuery);
89
+ function closeAlert() {
90
+ $(".flash").removeClass("flash--shown").delay(700).queue(function() {
91
+ $(this).remove();
92
+ });
93
+ }
94
+ (function($) {
95
+ var onDOMReady = function onDOMReady() {
96
+ $('input[type="file"]').each(function() {
97
+ var $input = $(this), $label = $(".input__file__text." + $input.attr("id")), labelVal = $label.html();
98
+ $input.on("change", function(e) {
99
+ var fileName = "";
100
+ if (this.files && this.files.length > 1) fileName = (this.getAttribute("data-multiple-caption") || "").replace("{count}", this.files.length); else if (e.target.value) fileName = e.target.value.split("\\").pop();
101
+ if (fileName) $label.html('<svg class="input__file__icon" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 2v5h5v15h-16v-20h11zm1-2h-14v24h20v-18l-6-6z"/></svg>' + fileName); else $label.html(labelVal);
102
+ });
103
+ $input.on("focus", function() {
104
+ $input.addClass("has-focus");
105
+ }).on("blur", function() {
106
+ $input.removeClass("has-focus");
107
+ });
108
+ });
109
+ };
110
+ $(document).on("ready page:load turbolinks:load", onDOMReady);
111
+ })(jQuery);
112
+ $.extend({
113
+ displayModal: function displayModal(content, options) {
114
+ if (options === void 0) {
115
+ options = {};
116
+ }
117
+ $("#modal").find("#modal__content").html(content);
118
+ $("#modal").css("display", "flex");
119
+ $.restoreActionElements();
120
+ $(document).trigger("modal:opened", options["extraEventParameters"]);
121
+ },
122
+ closeModal: function closeModal() {
123
+ $("#modal").find("#modal__content").empty();
124
+ $("#modal").css("display", "none");
125
+ $.restoreActionElements();
126
+ $(document).trigger("modal:closed");
127
+ }
243
128
  });
244
- $(document).on('ready page:load turbolinks:load', onDOMReady);
245
- })(jQuery);
246
- // EXTERNAL MODULE: ./app/javascript/beyond_canvas/initializers/inputs.js
247
- var initializers_inputs = __webpack_require__(2);
248
-
249
- // CONCATENATED MODULE: ./app/javascript/beyond_canvas/base.js
250
-
251
-
252
-
253
-
254
- /***/ })
255
- /******/ ])));
129
+ });
@@ -9,10 +9,12 @@
9
9
  @import "utilities/mixins";
10
10
 
11
11
  @import "components/actions";
12
+ @import "components/breadcrumbs";
12
13
  @import "components/buttons";
13
14
  @import "components/cards";
14
15
  @import "components/comments";
15
16
  @import "components/containers";
17
+ @import "components/debug";
16
18
  @import "components/flash";
17
19
  @import "components/forms";
18
20
  @import "components/inputs";
@@ -21,8 +23,13 @@
21
23
  @import "components/main";
22
24
  @import "components/margins";
23
25
  @import "components/markdown";
26
+ @import "components/action_bar";
27
+ @import "components/modals";
24
28
  @import "components/notices";
25
29
  @import "components/relative";
26
- @import "components/tables";
30
+ @import "components/sidebar";
27
31
  @import "components/spinner";
32
+ @import "components/menu";
33
+ @import "components/tables";
34
+ @import "components/titles";
28
35
  @import "components/texts";