matestack-ui-core 0.7.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of matestack-ui-core might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/app/concepts/matestack/ui/core/abbr/abbr.haml +5 -0
- data/app/concepts/matestack/ui/core/abbr/abbr.rb +12 -0
- data/app/concepts/matestack/ui/core/address/address.haml +5 -0
- data/app/concepts/matestack/ui/core/address/address.rb +5 -0
- data/app/concepts/matestack/ui/core/app/app.rb +1 -2
- data/app/concepts/matestack/ui/core/app/store.js +0 -1
- data/app/concepts/matestack/ui/core/article/article.haml +5 -0
- data/app/concepts/matestack/ui/core/article/article.rb +5 -0
- data/app/concepts/matestack/ui/core/async/async.haml +1 -1
- data/app/concepts/matestack/ui/core/async/async.js +3 -2
- data/app/concepts/matestack/ui/core/async/async.rb +8 -6
- data/app/concepts/matestack/ui/core/blockquote/blockquote.rb +3 -1
- data/app/concepts/matestack/ui/core/button/button.haml +4 -6
- data/app/concepts/matestack/ui/core/caption/caption.haml +2 -3
- data/app/concepts/matestack/ui/core/collection/content/content.js +0 -2
- data/app/concepts/matestack/ui/core/collection/content/content.rb +1 -1
- data/app/concepts/matestack/ui/core/collection/filter/filter.js +0 -2
- data/app/concepts/matestack/ui/core/collection/filter/filter.rb +1 -1
- data/app/concepts/matestack/ui/core/collection/filter/input/input.haml +1 -7
- data/app/concepts/matestack/ui/core/collection/filter/input/input.rb +12 -0
- data/app/concepts/matestack/ui/core/collection/helper.rb +0 -1
- data/app/concepts/matestack/ui/core/collection/order/order.js +0 -2
- data/app/concepts/matestack/ui/core/collection/order/order.rb +1 -1
- data/app/concepts/matestack/ui/core/collection/order/toggle/indicator/indicator.rb +3 -1
- data/app/concepts/matestack/ui/core/collection/order/toggle/toggle.rb +0 -1
- data/app/concepts/matestack/ui/core/component/component.js +0 -1
- data/app/concepts/matestack/ui/core/component/dynamic.rb +5 -8
- data/app/concepts/matestack/ui/core/details/details.rb +1 -0
- data/app/concepts/matestack/ui/core/div/div.rb +0 -1
- data/app/concepts/matestack/ui/core/form/input/input.haml +4 -6
- data/app/concepts/matestack/ui/core/form/select/select.haml +10 -6
- data/app/concepts/matestack/ui/core/icon/icon.haml +2 -3
- data/app/concepts/matestack/ui/core/img/img.haml +1 -1
- data/app/concepts/matestack/ui/core/isolate/isolate.haml +2 -0
- data/app/concepts/matestack/ui/core/isolate/isolate.rb +11 -0
- data/app/concepts/matestack/ui/core/label/label.haml +4 -6
- data/app/concepts/matestack/ui/core/li/li.haml +2 -3
- data/app/concepts/matestack/ui/core/onclick/onclick.haml +1 -1
- data/app/concepts/matestack/ui/core/onclick/onclick.rb +1 -2
- data/app/concepts/matestack/ui/core/page/page.rb +30 -6
- data/app/concepts/matestack/ui/core/paragraph/paragraph.haml +4 -7
- data/app/concepts/matestack/ui/core/pg/pg.haml +4 -7
- data/app/concepts/matestack/ui/core/plain/plain.rb +0 -1
- data/app/concepts/matestack/ui/core/sub/sub.haml +5 -0
- data/app/concepts/matestack/ui/core/sub/sub.rb +5 -0
- data/app/concepts/matestack/ui/core/summary/summary.haml +2 -3
- data/app/concepts/matestack/ui/core/summary/summary.rb +1 -0
- data/app/concepts/matestack/ui/core/tbody/tbody.haml +3 -0
- data/app/concepts/matestack/ui/core/tbody/tbody.rb +5 -0
- data/app/concepts/matestack/ui/core/td/td.haml +4 -7
- data/app/concepts/matestack/ui/core/tfoot/tfoot.haml +3 -0
- data/app/concepts/matestack/ui/core/tfoot/tfoot.rb +5 -0
- data/app/concepts/matestack/ui/core/th/th.haml +4 -7
- data/app/concepts/matestack/ui/core/thead/thead.haml +3 -0
- data/app/concepts/matestack/ui/core/thead/thead.rb +5 -0
- data/app/concepts/matestack/ui/core/transition/transition.haml +4 -6
- data/app/concepts/matestack/ui/core/video/video.haml +1 -1
- data/app/concepts/matestack/ui/core/view/view.rb +1 -3
- data/app/concepts/matestack/ui/core/youtube/youtube.haml +1 -0
- data/app/concepts/matestack/ui/core/youtube/youtube.rb +26 -0
- data/app/lib/matestack/ui/core/component_node.rb +5 -1
- data/app/lib/matestack/ui/core/page_node.rb +21 -0
- data/app/lib/matestack/ui/core/to_cell.rb +3 -1
- data/lib/generators/matestack_page/matestack_page_generator.rb +3 -3
- data/lib/matestack/ui/core/version.rb +1 -1
- data/vendor/assets/javascripts/matestack-ui-core.js +53 -136
- data/vendor/assets/javascripts/matestack-ui-core.js.map +1 -1
- metadata +20 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af1594c493057f5f1ef5e9548d9485d2fcac014a9c79519554ed53d61de90703
|
4
|
+
data.tar.gz: 1441194ad2d3da09a0d4ebb60def765442042e77d069afe7a75abae9ab565464
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70bf6d472b902d96adde03e06ca5ac062fed60f79220ac4de499f996c391198e64fbe8e72fb0a2a7d8c2b08c75de4cb328a9a81b23cf2c2bb92a137de4a92f70
|
7
|
+
data.tar.gz: 141ce7ca2f0857b8c2f4ec3c740d0e89f23c009340b041a4145e8f04000744bacf2fa948c7ac99bb64294f4b5a4321de0713b27bd4feb3f851c8848350f1dc4e
|
@@ -53,7 +53,6 @@ module Matestack::Ui::Core::App
|
|
53
53
|
return ""
|
54
54
|
end
|
55
55
|
|
56
|
-
|
57
56
|
def initialize(model=nil, options={})
|
58
57
|
super
|
59
58
|
@nodes = {}
|
@@ -87,7 +86,7 @@ module Matestack::Ui::Core::App
|
|
87
86
|
@nodes = Matestack::Ui::Core::AppNode.build(self, &block)
|
88
87
|
|
89
88
|
@nodes.each do |key, node|
|
90
|
-
@cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], nil)
|
89
|
+
@cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], nil, node["cached_params"])
|
91
90
|
end
|
92
91
|
end
|
93
92
|
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%div{
|
1
|
+
%div{@tag_attributes}
|
2
2
|
= yield
|
@@ -1,7 +1,5 @@
|
|
1
1
|
import Vue from 'vue/dist/vue.esm'
|
2
|
-
|
3
2
|
import matestackEventHub from 'js/event-hub'
|
4
|
-
|
5
3
|
import componentMixin from 'component/component'
|
6
4
|
|
7
5
|
const componentDef = {
|
@@ -60,6 +58,9 @@ const componentDef = {
|
|
60
58
|
}
|
61
59
|
}
|
62
60
|
}
|
61
|
+
if(this.componentConfig["init_show"] == true){
|
62
|
+
this.showing = true
|
63
|
+
}
|
63
64
|
},
|
64
65
|
beforeDestroy: function() {
|
65
66
|
const self = this
|
@@ -1,10 +1,12 @@
|
|
1
1
|
module Matestack::Ui::Core::Async
|
2
|
-
|
3
|
-
|
4
|
-
def setup
|
5
|
-
@rerender = true
|
6
|
-
end
|
7
|
-
|
2
|
+
class Async < Matestack::Ui::Core::Component::Dynamic
|
8
3
|
|
4
|
+
def setup
|
5
|
+
@rerender = true
|
6
|
+
@tag_attributes.merge!({
|
7
|
+
"v-if": "showing"
|
8
|
+
})
|
9
9
|
end
|
10
|
+
|
10
11
|
end
|
12
|
+
end
|
@@ -1,8 +1,2 @@
|
|
1
1
|
- if [:text, :number, :email, :date, :password].include?(options[:type])
|
2
|
-
%input{
|
3
|
-
type: options[:type],
|
4
|
-
class: options[:class],
|
5
|
-
id: component_id,
|
6
|
-
"@keyup.enter": "submitFilter()",
|
7
|
-
ref: "filter.#{attr_key}",
|
8
|
-
placeholder: options[:placeholder]}
|
2
|
+
%input{@tag_attributes}
|
@@ -1,6 +1,18 @@
|
|
1
1
|
module Matestack::Ui::Core::Collection::Filter::Input
|
2
2
|
class Input < Matestack::Ui::Core::Component::Static
|
3
3
|
|
4
|
+
def setup
|
5
|
+
@tag_attributes.merge!({
|
6
|
+
"v-model#{'.number' if options[:type] == :number}": input_key,
|
7
|
+
type: options[:type],
|
8
|
+
class: options[:class],
|
9
|
+
id: component_id,
|
10
|
+
"@keyup.enter": "submitFilter()",
|
11
|
+
ref: "filter.#{attr_key}",
|
12
|
+
placeholder: options[:placeholder]
|
13
|
+
})
|
14
|
+
end
|
15
|
+
|
4
16
|
def input_key
|
5
17
|
'filter["' + options[:key].to_s + '"]'
|
6
18
|
end
|
@@ -3,7 +3,9 @@ module Matestack::Ui::Core::Collection::Order::Toggle::Indicator
|
|
3
3
|
|
4
4
|
def response
|
5
5
|
components {
|
6
|
-
|
6
|
+
span @tag_attributes do
|
7
|
+
plain "{{orderIndicator( '#{@component_config[:key]}', {asc: '#{@component_config[:asc]}', desc: '#{@component_config[:desc]}'} ) }}"
|
8
|
+
end
|
7
9
|
}
|
8
10
|
end
|
9
11
|
|
@@ -1,7 +1,6 @@
|
|
1
1
|
module Matestack::Ui::Core::Component
|
2
2
|
class Dynamic < Trailblazer::Cell
|
3
3
|
|
4
|
-
|
5
4
|
include ActionView::Helpers::ActiveModelHelper
|
6
5
|
include ActionView::Helpers::ActiveModelInstanceTag
|
7
6
|
include ActionView::Helpers::AssetTagHelper
|
@@ -26,8 +25,6 @@ module Matestack::Ui::Core::Component
|
|
26
25
|
include ActionView::Helpers::TextHelper
|
27
26
|
include ActionView::Helpers::TranslationHelper
|
28
27
|
include ActionView::Helpers::UrlHelper
|
29
|
-
# include ActionView::Helpers::UrlHelper
|
30
|
-
# include ActionView::Helpers::TranslationHelper
|
31
28
|
include ::Cell::Haml
|
32
29
|
include Matestack::Ui::Core::ApplicationHelper
|
33
30
|
include Matestack::Ui::Core::ToCell
|
@@ -69,13 +66,14 @@ module Matestack::Ui::Core::Component
|
|
69
66
|
@nodes = {}
|
70
67
|
@cells = {}
|
71
68
|
@included_config = options[:included_config]
|
69
|
+
@cached_params = options[:cached_params]
|
72
70
|
@rerender = false
|
73
71
|
@options = options
|
72
|
+
set_tag_attributes
|
73
|
+
setup
|
74
74
|
generate_component_name
|
75
75
|
generate_children_cells
|
76
|
-
set_tag_attributes
|
77
76
|
validate_options
|
78
|
-
setup
|
79
77
|
end
|
80
78
|
|
81
79
|
def validate_options
|
@@ -160,7 +158,7 @@ module Matestack::Ui::Core::Component
|
|
160
158
|
@nodes = Matestack::Ui::Core::ComponentNode.build(self, nil, &block)
|
161
159
|
|
162
160
|
@nodes.each do |key, node|
|
163
|
-
@cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
|
161
|
+
@cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
|
164
162
|
end
|
165
163
|
end
|
166
164
|
|
@@ -193,7 +191,6 @@ module Matestack::Ui::Core::Component
|
|
193
191
|
result.join(" ")
|
194
192
|
end
|
195
193
|
|
196
|
-
|
197
194
|
private
|
198
195
|
|
199
196
|
def generate_children_cells
|
@@ -201,7 +198,7 @@ module Matestack::Ui::Core::Component
|
|
201
198
|
#needs refactoring --> in some cases, :component_key, :children, :origin_url, :url_params, :included_config get passed into options[:children] which causes errors
|
202
199
|
#quickfix: except them from iteration
|
203
200
|
options[:children].except(:component_key, :children, :origin_url, :url_params, :included_config).each do |key, node|
|
204
|
-
@children_cells[key] = to_cell("#{@component_key}__#{key}", node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
|
201
|
+
@children_cells[key] = to_cell("#{@component_key}__#{key}", node["component_name"], node["config"], node["argument"], node["components"], node["included_config"], node["cached_params"])
|
205
202
|
end
|
206
203
|
end
|
207
204
|
end
|
@@ -2,10 +2,9 @@
|
|
2
2
|
%label=options[:label]
|
3
3
|
|
4
4
|
- if [:text, :number, :email, :date, :password].include?(options[:type])
|
5
|
-
%input{
|
5
|
+
%input{@tag_attributes,
|
6
|
+
"v-model#{'.number' if options[:type] == :number}": input_key,
|
6
7
|
type: options[:type],
|
7
|
-
class: options[:class],
|
8
|
-
id: component_id,
|
9
8
|
"@change": "inputChanged(\"#{attr_key}\")",
|
10
9
|
ref: "input.#{attr_key}",
|
11
10
|
placeholder: options[:placeholder],
|
@@ -15,9 +14,8 @@
|
|
15
14
|
{{ error }}
|
16
15
|
|
17
16
|
- if options[:type] == :textarea
|
18
|
-
%textarea{
|
19
|
-
|
20
|
-
id: component_id,
|
17
|
+
%textarea{@tag_attributes,
|
18
|
+
"v-model": input_key,
|
21
19
|
"@change": "inputChanged(\"#{attr_key}\")",
|
22
20
|
ref: "input.#{attr_key}",
|
23
21
|
placeholder: options[:placeholder],
|
@@ -4,8 +4,8 @@
|
|
4
4
|
|
5
5
|
- if options[:type] == :dropdown
|
6
6
|
|
7
|
-
%select{
|
8
|
-
|
7
|
+
%select{@tag_attributes,
|
8
|
+
"#{model_binding}" => input_key,
|
9
9
|
ref: "select.#{attr_key}",
|
10
10
|
"@change": "inputChanged(\"#{attr_key}\")",
|
11
11
|
"init-value": init_value,
|
@@ -26,7 +26,8 @@
|
|
26
26
|
%div{id: component_id, ref: "select.multiple.#{attr_key}", "init-value": init_value}
|
27
27
|
- if options[:options].is_a?(Hash)
|
28
28
|
- options[:options].each do |key, value|
|
29
|
-
%input{
|
29
|
+
%input{@tag_attributes,
|
30
|
+
type: :checkbox,
|
30
31
|
"#{model_binding}": input_key,
|
31
32
|
"@change": "inputChanged(\"#{attr_key}\")",
|
32
33
|
"value-type": options_type,
|
@@ -35,7 +36,8 @@
|
|
35
36
|
%label=value
|
36
37
|
- if options[:options].is_a?(Array)
|
37
38
|
- options[:options].each do |value|
|
38
|
-
%input{
|
39
|
+
%input{@tag_attributes,
|
40
|
+
type: :checkbox,
|
39
41
|
"#{model_binding}": input_key,
|
40
42
|
"@change": "inputChanged(\"#{attr_key}\")",
|
41
43
|
"value-type": options_type,
|
@@ -51,7 +53,8 @@
|
|
51
53
|
%div{id: component_id, ref: "select.#{attr_key}", "init-value": init_value}
|
52
54
|
- if options[:options].is_a?(Hash)
|
53
55
|
- options[:options].each do |key, value|
|
54
|
-
%input{
|
56
|
+
%input{@tag_attributes,
|
57
|
+
type: :radio,
|
55
58
|
"#{model_binding}": input_key,
|
56
59
|
"@change": "inputChanged(\"#{attr_key}\")",
|
57
60
|
"value-type": options_type,
|
@@ -60,7 +63,8 @@
|
|
60
63
|
%label=value
|
61
64
|
- if options[:options].is_a?(Array)
|
62
65
|
- options[:options].each do |value|
|
63
|
-
%input{
|
66
|
+
%input{@tag_attributes,
|
67
|
+
type: :radio,
|
64
68
|
"#{model_binding}": input_key,
|
65
69
|
"@change": "inputChanged(\"#{attr_key}\")",
|
66
70
|
"value-type": options_type,
|