matestack-ui-bootstrap 2.0.1 → 3.0.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +36 -60
  3. data/lib/matestack/ui/bootstrap/base_component.rb +0 -2
  4. data/lib/matestack/ui/bootstrap/base_vue_js_component.rb +1 -3
  5. data/lib/matestack/ui/bootstrap/components/alert.js +14 -12
  6. data/lib/matestack/ui/bootstrap/components/carousel.js +17 -15
  7. data/lib/matestack/ui/bootstrap/components/collapse.js +18 -16
  8. data/lib/matestack/ui/bootstrap/components/dropdown.js +7 -5
  9. data/lib/matestack/ui/bootstrap/components/modal.js +12 -11
  10. data/lib/matestack/ui/bootstrap/components/navbar.rb +3 -3
  11. data/lib/matestack/ui/bootstrap/components/popover.js +10 -9
  12. data/lib/matestack/ui/bootstrap/components/toast.js +19 -18
  13. data/lib/matestack/ui/bootstrap/components/toast.rb +3 -3
  14. data/lib/matestack/ui/bootstrap/components/tooltip.js +9 -9
  15. data/lib/matestack/ui/bootstrap/content/smart_collection/content.rb +16 -3
  16. data/lib/matestack/ui/bootstrap/form/checkbox.rb +15 -8
  17. data/lib/matestack/ui/bootstrap/form/input.rb +7 -7
  18. data/lib/matestack/ui/bootstrap/form/radio.rb +6 -6
  19. data/lib/matestack/ui/bootstrap/form/select.rb +2 -4
  20. data/lib/matestack/ui/bootstrap/form/submit.rb +2 -2
  21. data/lib/matestack/ui/bootstrap/form/switch.rb +1 -3
  22. data/lib/matestack/ui/bootstrap/form/textarea.rb +47 -0
  23. data/lib/matestack/ui/bootstrap/index.js +26 -10
  24. data/lib/matestack/ui/bootstrap/initialize.rb +3 -0
  25. data/lib/matestack/ui/bootstrap/layout/sidebar.js +9 -8
  26. data/lib/matestack/ui/bootstrap/layout/sidebar.rb +10 -12
  27. data/lib/matestack/ui/bootstrap/{apps → layouts}/admin_template.rb +9 -11
  28. data/lib/matestack/ui/bootstrap/registry.rb +4 -0
  29. data/lib/matestack/ui/bootstrap/version.rb +1 -1
  30. data/lib/matestack/ui/bootstrap.rb +5 -2
  31. metadata +24 -14
  32. data/config/webpack/development.js +0 -5
  33. data/config/webpack/environment.js +0 -29
  34. data/config/webpack/production.js +0 -33
  35. data/config/webpack/test.js +0 -5
  36. data/config/webpacker.yml +0 -96
@@ -69,7 +69,11 @@ module Matestack::Ui::Bootstrap::Content::SmartCollection::Content
69
69
 
70
70
  def cell(data, key, value)
71
71
  td class: cell_class(value) do
72
- plain cell_text(data, key, value)
72
+ if value.is_a?(Hash) && value[:slot]
73
+ value[:slot].call(data)
74
+ else
75
+ plain cell_text(data, key, value)
76
+ end
73
77
  end
74
78
  end
75
79
 
@@ -81,8 +85,17 @@ module Matestack::Ui::Bootstrap::Content::SmartCollection::Content
81
85
  end
82
86
 
83
87
  def cell_text(data, key, value)
84
- text = data.instance_eval(key.to_s)
85
- text = value[:format].call(text) if value.is_a?(Hash) && value[:format]
88
+ if value.is_a?(Hash)
89
+ if value[:attribute].present?
90
+ text = data.instance_eval(value[:attribute].to_s)
91
+ else
92
+ text = data.instance_eval(key.to_s)
93
+ end
94
+ text = value[:format].call(text) if value[:format].present?
95
+ else
96
+ text = data.instance_eval(key.to_s)
97
+ end
98
+
86
99
  text
87
100
  end
88
101
 
@@ -1,7 +1,5 @@
1
1
  class Matestack::Ui::Bootstrap::Form::Checkbox < Matestack::Ui::VueJs::Components::Form::Checkbox
2
2
 
3
- include Matestack::Ui::Bootstrap::Registry
4
-
5
3
  vue_name "matestack-ui-core-form-checkbox"
6
4
 
7
5
  optional :form_text
@@ -10,7 +8,7 @@ class Matestack::Ui::Bootstrap::Form::Checkbox < Matestack::Ui::VueJs::Component
10
8
 
11
9
  def response
12
10
  div class: "matestack-ui-bootstrap-form-checkbox" do
13
- label input_label, class: "form-label", for: attribute_key if input_label && multiple?
11
+ label input_label, class: "form-label", ":for": id if input_label && multiple?
14
12
  render_options
15
13
  render_errors
16
14
  render_form_text unless context.form_text.nil? # otherwise renders empty div
@@ -19,6 +17,15 @@ class Matestack::Ui::Bootstrap::Form::Checkbox < Matestack::Ui::VueJs::Component
19
17
 
20
18
  private
21
19
 
20
+ def bootstrap_attributes
21
+ classes = 'form-check-input'
22
+ classes = [options[:class], classes].join(' ')
23
+ {
24
+ class: classes,
25
+ disabled: context.disabled
26
+ }
27
+ end
28
+
22
29
  def multiple?
23
30
  checkbox_options.present?
24
31
  end
@@ -28,15 +35,15 @@ class Matestack::Ui::Bootstrap::Form::Checkbox < Matestack::Ui::VueJs::Component
28
35
  if multiple?
29
36
  checkbox_options.to_a.each do |item|
30
37
  checkbox_wrapper do
31
- input options.merge(checkbox_attributes(item)).merge(class: 'form-check-input')
38
+ input options.merge(checkbox_attributes(item)).merge(bootstrap_attributes)
32
39
  bootstrap_label text: item_label(item), for_input: item_id(item)
33
40
  end
34
41
  end
35
42
  # checked/unchecked checkbox (true/false checkbox)
36
43
  else
37
44
  checkbox_wrapper do
38
- input true_false_checkbox_attributes.merge(type: :hidden, id: nil, value: 0)
39
- input true_false_checkbox_attributes.merge(type: :checkbox, id: item_id(1), class: 'form-check-input')
45
+ input true_false_checkbox_attributes.merge(type: :hidden, id: nil)
46
+ input true_false_checkbox_attributes.merge(type: :checkbox, ":id": item_id(1)).merge(bootstrap_attributes)
40
47
 
41
48
  bootstrap_label text: input_label, for_input: item_id(1)
42
49
  end
@@ -53,7 +60,7 @@ class Matestack::Ui::Bootstrap::Form::Checkbox < Matestack::Ui::VueJs::Component
53
60
  end
54
61
 
55
62
  def bootstrap_label(text:, for_input:)
56
- label text, for: for_input, class: 'form-check-label'
63
+ label text, ":for": for_input, class: 'form-check-label'
57
64
  end
58
65
 
59
66
  def render_errors
@@ -73,7 +80,7 @@ class Matestack::Ui::Bootstrap::Form::Checkbox < Matestack::Ui::VueJs::Component
73
80
  end
74
81
 
75
82
  def render_form_text
76
- div id: "form_text_for_#{attribute_key}", class: "form-text" do
83
+ div class: "form-text form-text-for-#{attribute_key}" do
77
84
  plain context.form_text
78
85
  end
79
86
  end
@@ -1,7 +1,5 @@
1
1
  class Matestack::Ui::Bootstrap::Form::Input < Matestack::Ui::VueJs::Components::Form::Input
2
2
 
3
- include Matestack::Ui::Bootstrap::Registry
4
-
5
3
  vue_name "matestack-ui-core-form-input"
6
4
 
7
5
  optional :form_text
@@ -16,12 +14,12 @@ class Matestack::Ui::Bootstrap::Form::Input < Matestack::Ui::VueJs::Components::
16
14
 
17
15
  def response
18
16
  div class: "matestack-ui-bootstrap-input" do
19
- label input_label, for: attribute_key, class: "form-label" if input_label
17
+ label input_label, ":for": id, class: "form-label" if input_label
20
18
  case context.type
21
19
  when :range
22
20
  input options.merge(input_attributes).merge(bootstrap_range_attributes)
23
21
  if context.show_value
24
- div id: attribute_key, class: "form-text" do
22
+ div class: "form-text form-text-for-#{attribute_key}" do
25
23
  plain "{{ data['#{attribute_key}'] }}"
26
24
  end
27
25
  end
@@ -37,9 +35,11 @@ class Matestack::Ui::Bootstrap::Form::Input < Matestack::Ui::VueJs::Components::
37
35
 
38
36
  def bootstrap_input_attributes
39
37
  {
40
- id: (options[:id] || attribute_key),
41
38
  class: (options[:class] || "") << (" form-control"),
42
- disabled: context.disabled
39
+ disabled: context.disabled,
40
+ min: context.min,
41
+ max: context.max,
42
+ step: context.step
43
43
  }
44
44
  end
45
45
 
@@ -108,7 +108,7 @@ class Matestack::Ui::Bootstrap::Form::Input < Matestack::Ui::VueJs::Components::
108
108
  end
109
109
 
110
110
  def render_form_text
111
- div id: "form_text_for_#{attribute_key}", class: "form-text" do
111
+ div class: "form-text form-text-for-#{attribute_key}" do
112
112
  plain context.form_text
113
113
  end
114
114
  end
@@ -1,7 +1,5 @@
1
1
  class Matestack::Ui::Bootstrap::Form::Radio < Matestack::Ui::VueJs::Components::Form::Radio
2
2
 
3
- include Matestack::Ui::Bootstrap::Registry
4
-
5
3
  vue_name "matestack-ui-core-form-radio"
6
4
 
7
5
  optional :form_text
@@ -10,12 +8,12 @@ class Matestack::Ui::Bootstrap::Form::Radio < Matestack::Ui::VueJs::Components::
10
8
 
11
9
  def response
12
10
  div class: "matestack-ui-bootstrap-radio" do
13
- label input_label, class: "form-label" if input_label
11
+ label input_label, class: "form-label", ":for": id if input_label
14
12
 
15
13
  radio_options.to_a.each_with_index do |item, index|
16
14
  div class: "form-check #{'form-check-inline' if context.variant == :inline}" do
17
15
  input options.merge(radio_attributes(item)).merge(bootstrap_radio_attributes)
18
- label item_label(item), class: "form-check-label", for: item_id(item_value(item))
16
+ label item_label(item), class: "form-check-label", ":for": item_id(item_value(item))
19
17
  if index == radio_options.to_a.size - 1
20
18
  render_errors
21
19
  end
@@ -26,16 +24,18 @@ class Matestack::Ui::Bootstrap::Form::Radio < Matestack::Ui::VueJs::Components::
26
24
 
27
25
  end
28
26
 
27
+ private
29
28
 
30
29
  def bootstrap_radio_attributes
30
+ classes = 'form-check-input'
31
31
  {
32
- class: (options[:class] || "") << (" form-check-input"),
32
+ class: (options[:class] || "") << classes,
33
33
  disabled: context.disabled
34
34
  }
35
35
  end
36
36
 
37
37
  def render_form_text
38
- div id: "form_text_for_#{attribute_key}", class: "form-text" do
38
+ div class: "form-text form-text-for-#{attribute_key}" do
39
39
  plain context.form_text
40
40
  end
41
41
  end
@@ -1,7 +1,5 @@
1
1
  class Matestack::Ui::Bootstrap::Form::Select < Matestack::Ui::VueJs::Components::Form::Select
2
2
 
3
- include Matestack::Ui::Bootstrap::Registry
4
-
5
3
  vue_name "matestack-ui-core-form-select"
6
4
 
7
5
  optional :variant
@@ -10,7 +8,7 @@ class Matestack::Ui::Bootstrap::Form::Select < Matestack::Ui::VueJs::Components:
10
8
 
11
9
  def response
12
10
  div class: "matestack-ui-bootstrap-form-select" do
13
- label input_label, for: attribute_key, class: "form-label" if input_label
11
+ label input_label, ":for": id, class: "form-label" if input_label
14
12
  select select_attributes.merge(bootstrap_select_attributes) do
15
13
  render_options
16
14
  end
@@ -55,7 +53,7 @@ class Matestack::Ui::Bootstrap::Form::Select < Matestack::Ui::VueJs::Components:
55
53
  end
56
54
 
57
55
  def render_form_text
58
- div id: "form_text_for_#{attribute_key}", class: "form-text" do
56
+ div class: "form-text form-text-for-#{attribute_key}" do
59
57
  plain context.form_text
60
58
  end
61
59
  end
@@ -8,10 +8,10 @@ class Matestack::Ui::Bootstrap::Form::Submit < Matestack::Ui::Bootstrap::BaseCom
8
8
  optional class: { as: :bs_class }
9
9
 
10
10
  def response
11
- bs_btn type: "submit", size:context.size, class: "#{context.bs_class}", variant: context.button_variant || :primary, "v-if": "!loading" do
11
+ bs_btn type: "submit", size:context.size, class: "#{context.bs_class}", variant: context.button_variant || :primary, "v-if": "!vc.loading" do
12
12
  plain context.text || "Submit"
13
13
  end
14
- bs_btn type: "submit", size: context.size, class: "#{context.bs_class} #{context.loading_class}", variant: context.button_variant || :primary, disabled: true, "v-if": "loading" do
14
+ bs_btn type: "submit", size: context.size, class: "#{context.bs_class} #{context.loading_class}", variant: context.button_variant || :primary, disabled: true, "v-if": "vc.loading" do
15
15
  bs_spinner variant: context.spinner_variant || :light, size: :sm
16
16
  plain context.loading_text || "Loading..."
17
17
  end
@@ -1,7 +1,5 @@
1
1
  class Matestack::Ui::Bootstrap::Form::Switch < Matestack::Ui::Bootstrap::Form::Checkbox
2
2
 
3
- include Matestack::Ui::Bootstrap::Registry
4
-
5
3
  vue_name "matestack-ui-core-form-checkbox"
6
4
 
7
5
  optional :form_text
@@ -10,7 +8,7 @@ class Matestack::Ui::Bootstrap::Form::Switch < Matestack::Ui::Bootstrap::Form::C
10
8
 
11
9
  def response
12
10
  div class: "matestack-ui-bootstrap-switch" do
13
- label input_label, class: "form-label", for: attribute_key if input_label && multiple?
11
+ label input_label, class: "form-label", ":for": id if input_label && multiple?
14
12
  render_options
15
13
  render_errors
16
14
  plain context.form_text
@@ -0,0 +1,47 @@
1
+ class Matestack::Ui::Bootstrap::Form::Textarea < Matestack::Ui::VueJs::Components::Form::Textarea
2
+
3
+ vue_name "matestack-ui-core-form-textarea"
4
+
5
+ optional :form_text
6
+ optional :disabled
7
+ optional :placeholder
8
+ optional :rows
9
+ optional :cols
10
+
11
+ def response
12
+ div class: "matestack-ui-bootstrap-textarea" do
13
+ label input_label, ":for": id, class: "form-label" if input_label
14
+ textarea options.merge(textarea_attributes).merge(bootstrap_textarea_attributes)
15
+ render_errors
16
+ render_form_text if context.form_text
17
+ end
18
+ end
19
+
20
+ def bootstrap_textarea_attributes
21
+ {
22
+ class: (options[:class] || "") << (" form-control"),
23
+ rows: context.rows,
24
+ cols: context.cols,
25
+ disabled: context.disabled
26
+ }
27
+ end
28
+
29
+ def render_errors
30
+ if display_errors?
31
+ div class: 'invalid-feedback', 'v-for': "error in #{error_key}" do
32
+ plain '{{ error }}'
33
+ end
34
+ end
35
+ end
36
+
37
+ def input_error_class
38
+ 'is-invalid'
39
+ end
40
+
41
+ def render_form_text
42
+ div class: "form-text form-text-for-#{attribute_key}" do
43
+ plain context.form_text
44
+ end
45
+ end
46
+
47
+ end
@@ -5,19 +5,35 @@
5
5
 
6
6
  import "./stylesheets/matestack-ui-bootstrap.scss";
7
7
 
8
- import './components/alert'
9
- import './components/carousel'
10
- import './components/collapse'
11
- import './components/dropdown'
12
- import './components/modal'
13
- import './components/toast'
14
- import './components/popover'
15
- import './components/tooltip'
16
- import './layout/sidebar'
8
+ import alertComponent from './components/alert'
9
+ import carouselComponent from './components/carousel'
10
+ import collapseComponent from './components/collapse'
11
+ import dropdownComponent from './components/dropdown'
12
+ import modalComponent from './components/modal'
13
+ import popoverComponent from './components/popover'
14
+ import toastComponent from './components/toast'
15
+ import tooltipComponent from './components/tooltip'
16
+ import sidebarComponent from './layout/sidebar'
17
17
  import './layout/sidebar.scss'
18
18
  import './content/smart_collection/collection.scss'
19
19
 
20
- const MatestackUiBootstrap = {}
20
+ const registerComponents = function(appInstance){
21
+ appInstance.component('matestack-ui-bootstrap-alert', alertComponent)
22
+ appInstance.component('matestack-ui-bootstrap-carousel', carouselComponent)
23
+ appInstance.component('matestack-ui-bootstrap-collapse', collapseComponent)
24
+ appInstance.component('matestack-ui-bootstrap-dropdown', dropdownComponent)
25
+ appInstance.component('matestack-ui-bootstrap-modal', modalComponent)
26
+ appInstance.component('matestack-ui-bootstrap-popover', popoverComponent)
27
+ appInstance.component('matestack-ui-bootstrap-toast', toastComponent)
28
+ appInstance.component('matestack-ui-bootstrap-tooltip', tooltipComponent)
29
+ appInstance.component('matestack-ui-bootstrap-sidebar', sidebarComponent)
30
+
31
+ return appInstance
32
+ }
33
+
34
+ const MatestackUiBootstrap = {
35
+ registerComponents
36
+ }
21
37
 
22
38
  window.MatestackUiBootstrap = MatestackUiBootstrap
23
39
 
@@ -0,0 +1,3 @@
1
+ class Matestack::Ui::Core::Base
2
+ include Matestack::Ui::Bootstrap::Registry
3
+ end
@@ -1,10 +1,9 @@
1
1
  import * as bootstrap from 'bootstrap'
2
- import Vue from 'vue/dist/vue.esm'
2
+ import MatestackUiVueJs from 'matestack-ui-vuejs'
3
3
 
4
- import MatestackUiCore from 'matestack-ui-core'
5
-
6
- Vue.component('matestack-ui-bootstrap-sidebar', {
7
- mixins: [MatestackUiCore.componentMixin],
4
+ const sidebarComponent = {
5
+ mixins: [MatestackUiVueJs.componentMixin],
6
+ template: MatestackUiVueJs.componentHelpers.inlineTemplate,
8
7
 
9
8
  data() {
10
9
  return {
@@ -52,16 +51,18 @@ Vue.component('matestack-ui-bootstrap-sidebar', {
52
51
  }
53
52
  window.addEventListener('resize', this.resizeCallback);
54
53
  var self = this;
55
- MatestackUiCore.matestackEventHub.$on("page_loaded", function(){
54
+ MatestackUiVueJs.eventHub.$on("page_loaded", function(){
56
55
  if (window.innerWidth <= 992){
57
56
  self.closeSideBar();
58
57
  }
59
58
  })
60
- MatestackUiCore.matestackEventHub.$on("page_loading_triggered", function(){
59
+ MatestackUiVueJs.eventHub.$on("page_loading_triggered", function(){
61
60
  if (window.innerWidth <= 992){
62
61
  self.closeSideBar();
63
62
  }
64
63
  })
65
64
  }
66
65
 
67
- });
66
+ }
67
+
68
+ export default sidebarComponent
@@ -7,20 +7,18 @@ class Matestack::Ui::Bootstrap::Layout::Sidebar < Matestack::Ui::Bootstrap::Base
7
7
  optional :sidebar_navigation_items
8
8
 
9
9
  def response
10
- div class: "sidebar-wrapper shadow-sm bg-white", id: "sidebar" do
11
- nav class: 'sidebar pt-4 px-3' do
12
- div class: "sidebar-toggler" do
13
- bs_btn variant: :link, "@click": "sidebarToggle" do
14
- bs_icon name: "list", size: 25, class: "text-muted"
15
- end
16
- end
17
- div class: "sidebar-top mb-3" do
18
- slot :sidebar_top if slots && slots[:sidebar_top].present?
19
- end
20
- div class: "sidebar-navigation my-3" do
21
- sidebar_navigation_partial
10
+ nav class: 'sidebar pt-4 px-3 shadow-sm bg-white' do
11
+ div class: "sidebar-toggler" do
12
+ bs_btn variant: :link, "@click": "vc.sidebarToggle" do
13
+ bs_icon name: "list", size: 25, class: "text-muted"
22
14
  end
23
15
  end
16
+ div class: "sidebar-top mb-3" do
17
+ slot :sidebar_top if slots && slots[:sidebar_top].present?
18
+ end
19
+ div class: "sidebar-navigation my-3" do
20
+ sidebar_navigation_partial
21
+ end
24
22
  end
25
23
  end
26
24
 
@@ -1,11 +1,9 @@
1
1
  require_relative "../registry"
2
2
 
3
- class Matestack::Ui::Bootstrap::Apps::AdminTemplate < Matestack::Ui::App
4
-
5
- include Matestack::Ui::Bootstrap::Registry
3
+ class Matestack::Ui::Bootstrap::Layouts::AdminTemplate < Matestack::Ui::Layout
6
4
 
7
5
  def response(&block)
8
- matestack do
6
+ matestack_vue_js_app do
9
7
  body_response(&block)
10
8
  end
11
9
  end
@@ -13,20 +11,20 @@ class Matestack::Ui::Bootstrap::Apps::AdminTemplate < Matestack::Ui::App
13
11
  def body_response(&block)
14
12
  div class: "d-flex flex-row" do
15
13
  if should_show_sidebar?
16
- bs_sidebar sidebar_navigation_items: sidebar_navigation_items, slots: { sidebar_top: method(:sidebar_top_slot) }
14
+ div id: "sidebar", class: "sidebar-wrapper" do
15
+ bs_sidebar sidebar_navigation_items: sidebar_navigation_items, slots: { sidebar_top: method(:sidebar_top_slot) }
16
+ end
17
17
  end
18
18
  div id: "content", class: "content-wrapper w-100 #{content_background_class}" do
19
19
  if should_show_navbar?
20
20
  bs_container do
21
- bs_navbar brand: navbar_brand_config, items: navbar_items, class: "pt-4 #{'ps-5' if should_show_sidebar?}", collapse_class: "text-end text-lg-start pe-3" do
22
- # div class: "d-flex" do
23
- # navbar_end_partial if self.respond_to?(:navbar_end_partial)
24
- # end
25
- end
21
+ bs_navbar brand: navbar_brand_config, items: navbar_items, class: "pt-4 #{'ps-5' if should_show_sidebar?}", collapse_class: "text-end text-lg-start pe-3"
26
22
  end
27
23
  end
28
24
  bs_container class: "my-5 px-4 pt-5" do
29
- yield if block_given?
25
+ page_switch do
26
+ yield if block_given?
27
+ end
30
28
  end
31
29
  end
32
30
  end
@@ -114,6 +114,10 @@ module Matestack::Ui::Bootstrap::Registry
114
114
  Matestack::Ui::Bootstrap::Form::Input.(text, options, &block)
115
115
  end
116
116
 
117
+ def bs_form_textarea(text=nil, options=nil, &block)
118
+ Matestack::Ui::Bootstrap::Form::Textarea.(text, options, &block)
119
+ end
120
+
117
121
  def bs_form_select(text=nil, options=nil, &block)
118
122
  Matestack::Ui::Bootstrap::Form::Select.(text, options, &block)
119
123
  end
@@ -1,7 +1,7 @@
1
1
  module Matestack
2
2
  module Ui
3
3
  module Bootstrap
4
- VERSION = '2.0.1'
4
+ VERSION = '3.0.0.rc2'
5
5
  end
6
6
  end
7
7
  end
@@ -1,4 +1,5 @@
1
1
  require "matestack/ui/core"
2
+ require "matestack/ui/vue_js"
2
3
 
3
4
  base_path = 'matestack/ui/bootstrap'
4
5
  require "#{base_path}/version"
@@ -16,12 +17,12 @@ require "#{base_path}/base_vue_js_component"
16
17
  module Matestack
17
18
  module Ui
18
19
  module Bootstrap
19
- module Apps
20
+ module Layouts
20
21
  end
21
22
  end
22
23
  end
23
24
  end
24
- require "#{base_path}/apps/admin_template"
25
+ require "#{base_path}/layouts/admin_template"
25
26
 
26
27
  module Matestack
27
28
  module Ui
@@ -98,9 +99,11 @@ module Matestack
98
99
  end
99
100
  require "#{base_path}/form/checkbox"
100
101
  require "#{base_path}/form/input"
102
+ require "#{base_path}/form/textarea"
101
103
  require "#{base_path}/form/radio"
102
104
  require "#{base_path}/form/select"
103
105
  require "#{base_path}/form/submit"
104
106
  require "#{base_path}/form/switch"
105
107
 
106
108
  require "#{base_path}/registry"
109
+ require "#{base_path}/initialize"
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: matestack-ui-bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 3.0.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonas Jabari
8
- - Nils Henning
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2021-04-12 00:00:00.000000000 Z
11
+ date: 2022-02-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: matestack-ui-core
@@ -17,14 +16,28 @@ dependencies:
17
16
  requirements:
18
17
  - - "~>"
19
18
  - !ruby/object:Gem::Version
20
- version: '2.0'
19
+ version: 3.0.0.rc2
21
20
  type: :runtime
22
21
  prerelease: false
23
22
  version_requirements: !ruby/object:Gem::Requirement
24
23
  requirements:
25
24
  - - "~>"
26
25
  - !ruby/object:Gem::Version
27
- version: '2.0'
26
+ version: 3.0.0.rc2
27
+ - !ruby/object:Gem::Dependency
28
+ name: matestack-ui-vuejs
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 3.0.0.rc2
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 3.0.0.rc2
28
41
  description: Bootstrap v5 components for Matestack UI
29
42
  email:
30
43
  - jonas@matestack.io
@@ -35,13 +48,7 @@ files:
35
48
  - LICENSE
36
49
  - README.md
37
50
  - Rakefile
38
- - config/webpack/development.js
39
- - config/webpack/environment.js
40
- - config/webpack/production.js
41
- - config/webpack/test.js
42
- - config/webpacker.yml
43
51
  - lib/matestack/ui/bootstrap.rb
44
- - lib/matestack/ui/bootstrap/apps/admin_template.rb
45
52
  - lib/matestack/ui/bootstrap/base_component.rb
46
53
  - lib/matestack/ui/bootstrap/base_vue_js_component.rb
47
54
  - lib/matestack/ui/bootstrap/components/accordion.rb
@@ -91,13 +98,16 @@ files:
91
98
  - lib/matestack/ui/bootstrap/form/select.rb
92
99
  - lib/matestack/ui/bootstrap/form/submit.rb
93
100
  - lib/matestack/ui/bootstrap/form/switch.rb
101
+ - lib/matestack/ui/bootstrap/form/textarea.rb
94
102
  - lib/matestack/ui/bootstrap/index.js
103
+ - lib/matestack/ui/bootstrap/initialize.rb
95
104
  - lib/matestack/ui/bootstrap/layout/column.rb
96
105
  - lib/matestack/ui/bootstrap/layout/container.rb
97
106
  - lib/matestack/ui/bootstrap/layout/row.rb
98
107
  - lib/matestack/ui/bootstrap/layout/sidebar.js
99
108
  - lib/matestack/ui/bootstrap/layout/sidebar.rb
100
109
  - lib/matestack/ui/bootstrap/layout/sidebar.scss
110
+ - lib/matestack/ui/bootstrap/layouts/admin_template.rb
101
111
  - lib/matestack/ui/bootstrap/registry.rb
102
112
  - lib/matestack/ui/bootstrap/stylesheets/matestack-ui-bootstrap.scss
103
113
  - lib/matestack/ui/bootstrap/version.rb
@@ -117,11 +127,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
117
127
  version: '0'
118
128
  required_rubygems_version: !ruby/object:Gem::Requirement
119
129
  requirements:
120
- - - ">="
130
+ - - ">"
121
131
  - !ruby/object:Gem::Version
122
- version: '0'
132
+ version: 1.3.1
123
133
  requirements: []
124
- rubygems_version: 3.1.2
134
+ rubygems_version: 3.1.4
125
135
  signing_key:
126
136
  specification_version: 4
127
137
  summary: Bootstrap v5 components for Matestack UI
@@ -1,5 +0,0 @@
1
- process.env.NODE_ENV = process.env.NODE_ENV || 'development'
2
-
3
- const environment = require('./environment')
4
-
5
- module.exports = environment.toWebpackConfig()
@@ -1,29 +0,0 @@
1
- const { environment } = require('@rails/webpacker')
2
-
3
- environment.config.merge({
4
- externals: {
5
- "matestack-ui-core": "matestack-ui-core",
6
- "chart.js": "chart.js",
7
- "bootstrap": "bootstrap",
8
- "flatpickr": "flatpickr"
9
- }
10
- })
11
-
12
- // Remove the digest from the output js filename.
13
- // https://github.com/matestack/matestack-ui-core/issues/343#issuecomment-581149092
14
- //
15
- environment.config.set("output.filename", chunkData => {
16
- return "[name].js"
17
- })
18
-
19
- // Remove the digest from the output css filename.
20
- // https://github.com/matestack/matestack-ui-core/issues/343#issuecomment-581149092
21
- //
22
- // Inspect with:
23
- //
24
- // console.log(environment.plugins)
25
- //
26
- const miniCssExtractPlugin = environment.plugins.get('MiniCssExtract')
27
- miniCssExtractPlugin.options.filename = "[name].css"
28
-
29
- module.exports = environment