matestack-ui-core 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of matestack-ui-core might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +230 -0
- data/Rakefile +34 -0
- data/app/assets/config/basemate_ui_core_manifest.js +2 -0
- data/app/assets/javascripts/basemate/ui/core/application.js +15 -0
- data/app/assets/stylesheets/basemate/ui/core/application.css +15 -0
- data/app/concepts/absolute/cell/absolute.rb +17 -0
- data/app/concepts/absolute/view/absolute.haml +3 -0
- data/app/concepts/action/cell/action.rb +52 -0
- data/app/concepts/action/js/action.js +49 -0
- data/app/concepts/action/view/action.haml +3 -0
- data/app/concepts/app/cell/app.rb +76 -0
- data/app/concepts/app/js/app.js +27 -0
- data/app/concepts/app/js/store.js +71 -0
- data/app/concepts/app/utils/app_node.rb +53 -0
- data/app/concepts/app/view/app.haml +4 -0
- data/app/concepts/async/cell/async.rb +10 -0
- data/app/concepts/async/js/async.js +57 -0
- data/app/concepts/async/view/async.haml +2 -0
- data/app/concepts/br/cell/br.rb +5 -0
- data/app/concepts/br/view/br.haml +5 -0
- data/app/concepts/button/cell/button.rb +5 -0
- data/app/concepts/button/view/button.haml +7 -0
- data/app/concepts/component/cell/dynamic.rb +226 -0
- data/app/concepts/component/cell/static.rb +16 -0
- data/app/concepts/component/js/anonym-dynamic-component.js +10 -0
- data/app/concepts/component/js/component.js +60 -0
- data/app/concepts/component/utils/component_node.rb +69 -0
- data/app/concepts/component/view/children.haml +2 -0
- data/app/concepts/component/view/dynamic.haml +6 -0
- data/app/concepts/component/view/dynamic_without_rerender.haml +2 -0
- data/app/concepts/component/view/response.haml +2 -0
- data/app/concepts/component/view/response_dynamic.haml +7 -0
- data/app/concepts/component/view/response_dynamic_without_rerender.haml +3 -0
- data/app/concepts/component/view/static.haml +1 -0
- data/app/concepts/core/js/core.js +27 -0
- data/app/concepts/core/js/event-hub.js +5 -0
- data/app/concepts/div/cell/div.rb +6 -0
- data/app/concepts/div/view/div.haml +3 -0
- data/app/concepts/footer/cell/footer.rb +5 -0
- data/app/concepts/footer/view/footer.haml +3 -0
- data/app/concepts/form/cell/form.rb +71 -0
- data/app/concepts/form/cell/inline.rb +9 -0
- data/app/concepts/form/cell/input.rb +74 -0
- data/app/concepts/form/cell/select.rb +73 -0
- data/app/concepts/form/cell/submit.rb +9 -0
- data/app/concepts/form/js/form.js +136 -0
- data/app/concepts/form/view/form.haml +2 -0
- data/app/concepts/form/view/inline.haml +6 -0
- data/app/concepts/form/view/input.haml +29 -0
- data/app/concepts/form/view/select.haml +72 -0
- data/app/concepts/form/view/submit.haml +3 -0
- data/app/concepts/header/cell/header.rb +5 -0
- data/app/concepts/header/view/header.haml +3 -0
- data/app/concepts/heading/cell/heading.rb +5 -0
- data/app/concepts/heading/view/heading.haml +50 -0
- data/app/concepts/html/cell/html.rb +17 -0
- data/app/concepts/html/js/html.js +10 -0
- data/app/concepts/html/view/html.haml +3 -0
- data/app/concepts/icon/cell/icon.rb +5 -0
- data/app/concepts/icon/view/icon.haml +6 -0
- data/app/concepts/img/cell/img.rb +5 -0
- data/app/concepts/img/view/img.haml +1 -0
- data/app/concepts/input/cell/input.rb +5 -0
- data/app/concepts/input/view/input.haml +3 -0
- data/app/concepts/label/cell/label.rb +5 -0
- data/app/concepts/label/view/label.haml +7 -0
- data/app/concepts/li/cell/li.rb +5 -0
- data/app/concepts/li/view/li.haml +6 -0
- data/app/concepts/link/cell/link.rb +24 -0
- data/app/concepts/link/view/link.haml +6 -0
- data/app/concepts/main/cell/main.rb +5 -0
- data/app/concepts/main/view/main.haml +3 -0
- data/app/concepts/nav/cell/nav.rb +5 -0
- data/app/concepts/nav/view/nav.haml +3 -0
- data/app/concepts/ol/cell/ol.rb +5 -0
- data/app/concepts/ol/view/ol.haml +3 -0
- data/app/concepts/onclick/cell/onclick.rb +6 -0
- data/app/concepts/onclick/js/onclick.js +21 -0
- data/app/concepts/onclick/view/onclick.haml +2 -0
- data/app/concepts/page/cell/content.rb +5 -0
- data/app/concepts/page/cell/page.rb +128 -0
- data/app/concepts/page/js/content.js +17 -0
- data/app/concepts/page/utils/page_node.rb +66 -0
- data/app/concepts/page/view/content.haml +7 -0
- data/app/concepts/page/view/page.haml +9 -0
- data/app/concepts/partial/cell/partial.rb +5 -0
- data/app/concepts/partial/view/partial.haml +2 -0
- data/app/concepts/pg/cell/pg.rb +5 -0
- data/app/concepts/pg/view/pg.haml +8 -0
- data/app/concepts/plain/cell/plain.rb +10 -0
- data/app/concepts/progress/cell/progress.rb +5 -0
- data/app/concepts/progress/view/progress.haml +3 -0
- data/app/concepts/section/cell/section.rb +5 -0
- data/app/concepts/section/view/section.haml +3 -0
- data/app/concepts/shared/utils/to_cell.rb +126 -0
- data/app/concepts/slot/cell/slot.rb +10 -0
- data/app/concepts/slot/view/slot.haml +2 -0
- data/app/concepts/span/cell/span.rb +5 -0
- data/app/concepts/span/view/span.haml +3 -0
- data/app/concepts/table/cell/table.rb +5 -0
- data/app/concepts/table/view/table.haml +3 -0
- data/app/concepts/td/cell/td.rb +5 -0
- data/app/concepts/td/view/td.haml +8 -0
- data/app/concepts/th/cell/th.rb +5 -0
- data/app/concepts/th/view/th.haml +8 -0
- data/app/concepts/tr/cell/tr.rb +5 -0
- data/app/concepts/tr/view/tr.haml +3 -0
- data/app/concepts/transition/cell/transition.rb +31 -0
- data/app/concepts/transition/js/transition.js +26 -0
- data/app/concepts/transition/view/transition.haml +7 -0
- data/app/concepts/ul/cell/ul.rb +5 -0
- data/app/concepts/ul/view/ul.haml +3 -0
- data/app/concepts/view/cell/view.rb +7 -0
- data/app/concepts/view/js/view.js +42 -0
- data/app/concepts/view/view/view.haml +2 -0
- data/app/controllers/basemate/ui/core/application_controller.rb +9 -0
- data/app/controllers/basemate/ui/core/docs_controller.rb +17 -0
- data/app/helpers/matestack/ui/core/application_helper.rb +35 -0
- data/config/routes.rb +3 -0
- data/lib/matestack/ui/core.rb +15 -0
- data/lib/matestack/ui/core/engine.rb +19 -0
- data/lib/matestack/ui/core/version.rb +7 -0
- data/lib/tasks/matestack/ui/core_tasks.rake +4 -0
- data/vendor/assets/javascripts/manifest.json +4 -0
- data/vendor/assets/javascripts/matestack-ui-core.js +15055 -0
- data/vendor/assets/javascripts/matestack-ui-core.js.map +1 -0
- metadata +277 -0
@@ -0,0 +1,24 @@
|
|
1
|
+
module Link::Cell
|
2
|
+
class Link < Component::Cell::Static
|
3
|
+
|
4
|
+
REQUIRED_KEYS = [:path]
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@tag_attributes.merge!({ "class": options[:class],
|
8
|
+
"id": component_id,
|
9
|
+
"method": options[:method],
|
10
|
+
"target": options[:target] ||= nil
|
11
|
+
})
|
12
|
+
end
|
13
|
+
|
14
|
+
def link_path
|
15
|
+
if options[:path].is_a?(Symbol)
|
16
|
+
return ::Rails.application.routes.url_helpers.send(options[:path], options[:params])
|
17
|
+
end
|
18
|
+
if options[:path].is_a?(String)
|
19
|
+
return options[:path]
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import Vue from 'vue/dist/vue.esm'
|
2
|
+
|
3
|
+
import matestackEventHub from 'core/js/event-hub'
|
4
|
+
|
5
|
+
import componentMixin from 'component/js/component'
|
6
|
+
|
7
|
+
const componentDef = {
|
8
|
+
mixins: [componentMixin],
|
9
|
+
data: function(){
|
10
|
+
return { }
|
11
|
+
},
|
12
|
+
methods: {
|
13
|
+
perform: function(){
|
14
|
+
matestackEventHub.$emit(this.componentConfig["emit"], this.componentConfig["data"])
|
15
|
+
}
|
16
|
+
}
|
17
|
+
}
|
18
|
+
|
19
|
+
let component = Vue.component('onclick-cell', componentDef)
|
20
|
+
|
21
|
+
export default componentDef
|
@@ -0,0 +1,128 @@
|
|
1
|
+
module Page::Cell
|
2
|
+
class Page < Trailblazer::Cell
|
3
|
+
|
4
|
+
include ActionView::Helpers::TranslationHelper
|
5
|
+
include ::Cell::Haml
|
6
|
+
include ::Matestack::Ui::Core::ApplicationHelper
|
7
|
+
include ::Shared::Utils::ToCell
|
8
|
+
|
9
|
+
view_paths << "#{Matestack::Ui::Core::Engine.root}/app/concepts"
|
10
|
+
|
11
|
+
def initialize(model=nil, options={})
|
12
|
+
super
|
13
|
+
generate_page_name
|
14
|
+
set_app_class
|
15
|
+
@nodes = {}
|
16
|
+
@cells = {}
|
17
|
+
options[:controller_instance].instance_variables.each do |controller_instance_var_key|
|
18
|
+
unless controller_instance_var_key.to_s.start_with?("@_")
|
19
|
+
self.instance_variable_set(controller_instance_var_key, options[:controller_instance].instance_variable_get(controller_instance_var_key))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def prepare
|
25
|
+
true
|
26
|
+
end
|
27
|
+
|
28
|
+
def components(&block)
|
29
|
+
@nodes = ::Page::Utils::PageNode.build(self, nil, &block)
|
30
|
+
end
|
31
|
+
|
32
|
+
def nodes_to_cell
|
33
|
+
@nodes.each do |key, node|
|
34
|
+
@cells[key] = to_cell(key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
def partial(&block)
|
39
|
+
return block
|
40
|
+
# ::Page::Utils::PageNode.build(self, included, &block)
|
41
|
+
end
|
42
|
+
|
43
|
+
def slot(&block)
|
44
|
+
# return block
|
45
|
+
::Page::Utils::PageNode.build(self, nil, &block)
|
46
|
+
end
|
47
|
+
|
48
|
+
|
49
|
+
def show(component_key=nil, only_page=false)
|
50
|
+
prepare
|
51
|
+
response
|
52
|
+
|
53
|
+
render_mode = nil
|
54
|
+
render_mode = :only_page if only_page == true
|
55
|
+
render_mode = :render_page_with_app if !@app_class.nil? && only_page == false
|
56
|
+
render_mode = :only_page if @app_class.nil? && only_page == false
|
57
|
+
render_mode = :render_component if !component_key.nil?
|
58
|
+
|
59
|
+
case render_mode
|
60
|
+
|
61
|
+
when :only_page
|
62
|
+
nodes_to_cell
|
63
|
+
# keys_array = ["div_2","components", "partial_1", "components", "form_1"]
|
64
|
+
# puts @nodes.dig(*keys_array)
|
65
|
+
render :page
|
66
|
+
when :render_page_with_app
|
67
|
+
concept(@app_class).call(:show, @page_id, @nodes)
|
68
|
+
when :render_component
|
69
|
+
if component_key.include?("__")
|
70
|
+
keys_array = component_key.gsub("__", "__components__").split("__").map {|k| k.to_s}
|
71
|
+
page_content_keys = keys_array.select{|key| key.match(/^page_content_/)}
|
72
|
+
if page_content_keys.any?
|
73
|
+
keys_array = keys_array.drop(keys_array.find_index(page_content_keys[0])+2)
|
74
|
+
end
|
75
|
+
node = @nodes.dig(*keys_array)
|
76
|
+
cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
|
77
|
+
return cell.render_content
|
78
|
+
else
|
79
|
+
node = @nodes[component_key]
|
80
|
+
cell = to_cell(component_key, node["component_name"], node["config"], node["argument"], node["components"], node["included_config"])
|
81
|
+
return cell.render_content
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
|
87
|
+
def page_id
|
88
|
+
@custom_page_id ||= @page_id
|
89
|
+
end
|
90
|
+
|
91
|
+
private
|
92
|
+
|
93
|
+
def generate_page_name
|
94
|
+
name_parts = self.class.name.split("::").map { |name| name.underscore }
|
95
|
+
@page_id = name_parts.join("_")
|
96
|
+
end
|
97
|
+
|
98
|
+
def set_app_class
|
99
|
+
class_name = self.class.name
|
100
|
+
name_parts = class_name.split("::")
|
101
|
+
if name_parts.count <= 2
|
102
|
+
@app_class = nil
|
103
|
+
return
|
104
|
+
end
|
105
|
+
|
106
|
+
app_name = "#{name_parts[1]}"
|
107
|
+
begin
|
108
|
+
app_class = Apps.const_get(app_name)
|
109
|
+
if app_class.is_a?(Class)
|
110
|
+
@app_class = app_class
|
111
|
+
else
|
112
|
+
require_dependency "apps/#{app_name.underscore}"
|
113
|
+
app_class = Apps.const_get(app_name)
|
114
|
+
if app_class.is_a?(Class)
|
115
|
+
@app_class = app_class
|
116
|
+
else
|
117
|
+
@app_class = nil
|
118
|
+
end
|
119
|
+
end
|
120
|
+
rescue
|
121
|
+
@app_class = nil
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
|
126
|
+
end
|
127
|
+
|
128
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import Vue from 'vue/dist/vue.esm'
|
2
|
+
import Vuex from 'vuex'
|
3
|
+
import componentMixin from 'component/js/component'
|
4
|
+
|
5
|
+
const componentDef = {
|
6
|
+
mixins: [componentMixin],
|
7
|
+
data: function(){
|
8
|
+
return {}
|
9
|
+
},
|
10
|
+
computed: Vuex.mapState({
|
11
|
+
asyncPageTemplate: state => state.pageTemplate,
|
12
|
+
})
|
13
|
+
}
|
14
|
+
|
15
|
+
let component = Vue.component('page-content-cell', componentDef)
|
16
|
+
|
17
|
+
export default componentDef
|
@@ -0,0 +1,66 @@
|
|
1
|
+
module Page::Utils
|
2
|
+
class PageNode
|
3
|
+
|
4
|
+
def self.build(page_instance, included_config, &block)
|
5
|
+
node = PageNode.new(page_instance, included_config)
|
6
|
+
node.instance_eval(&block)
|
7
|
+
node.hash
|
8
|
+
end
|
9
|
+
|
10
|
+
attr_reader :hash
|
11
|
+
|
12
|
+
def initialize(page_instance, included_config)
|
13
|
+
@hash = {}
|
14
|
+
@node_start_id = 0
|
15
|
+
@included_config = included_config
|
16
|
+
@page_instance = page_instance
|
17
|
+
page_instance.instance_variables.each do |page_instance_var_key|
|
18
|
+
self.instance_variable_set(page_instance_var_key, page_instance.instance_variable_get(page_instance_var_key))
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def method_missing meth, *args, &block
|
23
|
+
begin
|
24
|
+
@page_instance.send(meth, *args, &block)
|
25
|
+
rescue
|
26
|
+
node_id = @node_start_id + 1
|
27
|
+
@node_start_id = node_id
|
28
|
+
current_node = "#{meth}_#{@node_start_id}"
|
29
|
+
@hash[current_node] = {}
|
30
|
+
@hash[current_node]["component_name"] = meth.to_s
|
31
|
+
@hash[current_node]["config"] = {}
|
32
|
+
@hash[current_node]["included_config"] = @included_config
|
33
|
+
@hash[current_node]["argument"] = nil
|
34
|
+
|
35
|
+
if args.second == :include
|
36
|
+
included = args.first
|
37
|
+
else
|
38
|
+
unless @included_config.nil?
|
39
|
+
included = @included_config
|
40
|
+
else
|
41
|
+
included = nil
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
if meth == :partial
|
46
|
+
partial_block = @page_instance.send(args.first, *args.drop(1))
|
47
|
+
@hash[current_node]["components"] = PageNode.build(
|
48
|
+
@page_instance, included, &partial_block
|
49
|
+
)
|
50
|
+
else
|
51
|
+
if args.first.is_a?(Hash)
|
52
|
+
@hash[current_node]["config"] = args.first
|
53
|
+
else
|
54
|
+
@hash[current_node]["argument"] = args.first
|
55
|
+
end
|
56
|
+
|
57
|
+
if block_given?
|
58
|
+
@hash[current_node]["components"] = PageNode.build(@page_instance, included, &block)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
end
|
64
|
+
|
65
|
+
end
|
66
|
+
end
|
@@ -0,0 +1,7 @@
|
|
1
|
+
%div{"class": "matestack_page"}
|
2
|
+
%div{"v-if": "asyncPageTemplate == null"}
|
3
|
+
%div{"class": "matestack_page_content"}
|
4
|
+
- @children_cells.each do |key, cell|
|
5
|
+
= cell.call(:show)
|
6
|
+
%div{"v-if": "asyncPageTemplate != null"}
|
7
|
+
%v-runtime-template{":template":"asyncPageTemplate"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
- if context[:params][:only_page] == "true"
|
2
|
+
%div{class: "matestack_page_content"}
|
3
|
+
- @cells.each do |key, cell|
|
4
|
+
= cell.call(:show)
|
5
|
+
- else
|
6
|
+
%div{class: "matestack_page"}
|
7
|
+
%div{class: "matestack_page_content"}
|
8
|
+
- @cells.each do |key, cell|
|
9
|
+
= cell.call(:show)
|
@@ -0,0 +1,126 @@
|
|
1
|
+
module Shared::Utils::ToCell
|
2
|
+
|
3
|
+
def to_cell(key, component_name, config, argument, children, included_config)
|
4
|
+
request_uri = context[:request].env["REQUEST_URI"]
|
5
|
+
query_string = context[:request].env["QUERY_STRING"]
|
6
|
+
|
7
|
+
config.merge!(component_key: key)
|
8
|
+
config.merge!(children: children)
|
9
|
+
config.merge!(origin_url: request_uri.gsub("?" + query_string, ""))
|
10
|
+
config.merge!(url_params: context[:params])
|
11
|
+
config.merge!(included_config: included_config)
|
12
|
+
|
13
|
+
if component_name.start_with?("custom")
|
14
|
+
return resolve_custom_component(component_name, argument, config)
|
15
|
+
else
|
16
|
+
return resolve_core_component(component_name, argument, config)
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def resolve_custom_component(component_name, argument, config)
|
24
|
+
name = component_name.gsub("_", "/")
|
25
|
+
|
26
|
+
path = name.split("/")[1..-1]
|
27
|
+
path_camelized = path.map { |x| x.camelize }
|
28
|
+
|
29
|
+
if path_camelized.count == 1
|
30
|
+
class_name = "#{path_camelized[0]}::Cell::#{path_camelized[0]}"
|
31
|
+
rewritten_path = [path[0], "cell", path[0]]
|
32
|
+
else
|
33
|
+
class_name = path_camelized[0..-2].join("::")
|
34
|
+
class_name += "::Cell::#{path_camelized[-1]}"
|
35
|
+
rewritten_path = path[0..-2]
|
36
|
+
rewritten_path << "cell"
|
37
|
+
rewritten_path << path[-1]
|
38
|
+
end
|
39
|
+
|
40
|
+
custom_component_class_name = "Components::" + class_name
|
41
|
+
|
42
|
+
begin
|
43
|
+
begin
|
44
|
+
component_class = Object.const_get(custom_component_class_name, false)
|
45
|
+
rescue => e
|
46
|
+
raise "#{e.message.nil? ? '': 'Got Error: '+e.message}. \
|
47
|
+
Make sure to define your custom component class correctly \
|
48
|
+
in \"matestack/components/#{rewritten_path.join('/')}.rb\""
|
49
|
+
end
|
50
|
+
if component_class.is_a?(Class)
|
51
|
+
return concept(component_class, argument, config)
|
52
|
+
else
|
53
|
+
raise "Given component #{component_class} is not a class. \
|
54
|
+
You might forget to add the component name to your component call"
|
55
|
+
end
|
56
|
+
rescue => e
|
57
|
+
raise "#{component_name} > #{e.message}"
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
61
|
+
|
62
|
+
def resolve_core_component(component_name, argument, config)
|
63
|
+
name = component_name.gsub("_", "/")
|
64
|
+
|
65
|
+
if name.include?("/")
|
66
|
+
name = name.gsub("/", "/cell/")
|
67
|
+
else
|
68
|
+
name = "#{name}/cell/#{name}"
|
69
|
+
end
|
70
|
+
|
71
|
+
path = name.split("/")
|
72
|
+
path_camelized = path.map { |x| x.camelize }
|
73
|
+
class_name = path_camelized.join("::")
|
74
|
+
|
75
|
+
begin
|
76
|
+
begin
|
77
|
+
component_class = Object.const_get(class_name, false)
|
78
|
+
rescue => e
|
79
|
+
begin
|
80
|
+
return resolve_namespaced_component(component_name, argument, config)
|
81
|
+
rescue => e
|
82
|
+
raise "#{e.message.nil? ? '': 'Got Error: '+e.message}. \
|
83
|
+
Component '#{component_name}' not found. Looking for Class '#{class_name}'. \
|
84
|
+
Make sure to prefix a custom component with 'custom_'"
|
85
|
+
end
|
86
|
+
end
|
87
|
+
return concept(component_class, argument, config)
|
88
|
+
rescue => e
|
89
|
+
raise "#{component_name} > #{e.message}"
|
90
|
+
end
|
91
|
+
|
92
|
+
end
|
93
|
+
|
94
|
+
def resolve_namespaced_component(component_name, argument, config)
|
95
|
+
name = component_name.gsub("_", "/")
|
96
|
+
|
97
|
+
path = name.split("/")[1..-1]
|
98
|
+
namespace = name.split("/")[0].camelize
|
99
|
+
path_camelized = path.map { |x| x.camelize }
|
100
|
+
|
101
|
+
if path_camelized.count == 1
|
102
|
+
class_name = "#{path_camelized[0]}::Cell::#{path_camelized[0]}"
|
103
|
+
rewritten_path = [path[0], "cell", path[0]]
|
104
|
+
else
|
105
|
+
class_name = path_camelized[0..-2].join("::")
|
106
|
+
class_name += "::Cell::#{path_camelized[-1]}"
|
107
|
+
rewritten_path = path[0..-2]
|
108
|
+
rewritten_path << "cell"
|
109
|
+
rewritten_path << path[-1]
|
110
|
+
end
|
111
|
+
|
112
|
+
namespaced_class_name = namespace + "::" + class_name
|
113
|
+
|
114
|
+
begin
|
115
|
+
begin
|
116
|
+
component_class = Object.const_get(namespaced_class_name, false)
|
117
|
+
rescue => e
|
118
|
+
raise "#{e.message}"
|
119
|
+
end
|
120
|
+
return concept(component_class, argument, config)
|
121
|
+
rescue => e
|
122
|
+
raise "#{e.message}"
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
126
|
+
end
|