Skip to content

Commit 80e729f

Browse files
Merge branch 'develop' into es5-transpiling
2 parents 7c23489 + 338104b commit 80e729f

File tree

191 files changed

+4467
-868
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

191 files changed

+4467
-868
lines changed

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ gemspec
1313

1414
# To use a debugger
1515
# gem 'byebug', group: [:development, :test]
16+
# gem 'pry-byebug', group: [:development, :test]
1617

1718
gem "trailblazer"
1819
gem "trailblazer-rails"
@@ -31,6 +32,7 @@ group :development, :test do
3132
gem 'simplecov', require: false, group: :test
3233
gem 'byebug'
3334
gem 'webmock'
35+
gem 'webdrivers', '~> 4.1'
3436
end
3537

3638
group :test do

Gemfile.lock

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ GEM
133133
mimemagic (0.3.3)
134134
mini_mime (1.0.2)
135135
mini_portile2 (2.4.0)
136-
minitest (5.12.2)
136+
minitest (5.11.3)
137137
nio4r (2.5.2)
138138
nokogiri (1.10.4)
139139
mini_portile2 (~> 2.4.0)
@@ -245,7 +245,11 @@ GEM
245245
tzinfo (1.2.5)
246246
thread_safe (~> 0.1)
247247
uber (0.1.0)
248-
webmock (3.7.6)
248+
webdrivers (4.1.2)
249+
nokogiri (~> 1.6)
250+
rubyzip (~> 1.0)
251+
selenium-webdriver (>= 3.0, < 4.0)
252+
webmock (3.5.1)
249253
addressable (>= 2.3.6)
250254
crack (>= 0.3.2)
251255
hashdiff (>= 0.4.0, < 2.0.0)
@@ -279,6 +283,7 @@ DEPENDENCIES
279283
trailblazer
280284
trailblazer-cells
281285
trailblazer-rails
286+
webdrivers (~> 4.1)
282287
webmock
283288
webpacker (~> 4.0)
284289

app/concepts/matestack/ui/core/app/app.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ class App < Trailblazer::Cell
1717
include ActionView::Helpers::JavaScriptHelper
1818
include ActionView::Helpers::NumberHelper
1919
include ActionView::Helpers::OutputSafetyHelper
20-
include ActionView::Helpers::RecordTagHelper
2120
# include ActionView::Helpers::RenderingHelper
2221
include ActionView::Helpers::SanitizeHelper
2322
include ActionView::Helpers::TagHelper
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
%area{@tag_attributes}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module Matestack::Ui::Core::Area
2+
class Area < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
alt: options[:alt],
6+
coords: options[:coords].join(','),
7+
download: options[:download],
8+
href: options[:href],
9+
hreflang: options[:hreflang],
10+
media: options[:media],
11+
rel: options[:rel],
12+
shape: options[:shape],
13+
target: options[:target],
14+
type: options[:type]
15+
})
16+
end
17+
end
18+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
%aside{@tag_attributes}
2+
- if block_given?
3+
= yield
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Aside
2+
class Aside < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%b{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]

app/concepts/matestack/ui/core/b/b.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::B
2+
class B < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%cite{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Cite
2+
class Cite < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%code{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Code
2+
class Code < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end

app/concepts/matestack/ui/core/component/dynamic.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ class Dynamic < Trailblazer::Cell
1818
include ActionView::Helpers::JavaScriptHelper
1919
include ActionView::Helpers::NumberHelper
2020
include ActionView::Helpers::OutputSafetyHelper
21-
include ActionView::Helpers::RecordTagHelper
2221
# include ActionView::Helpers::RenderingHelper
2322
include ActionView::Helpers::SanitizeHelper
2423
include ActionView::Helpers::TagHelper
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%dd{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Dd
2+
class Dd < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%dl{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Dl
2+
class Dl < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%dt{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Dt
2+
class Dt < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%em{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Em
2+
class Em < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%fieldset{@tag_attributes}
2+
-if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
module Matestack::Ui::Core::Fieldset
2+
class Fieldset < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
disabled: options[:disabled]
6+
})
7+
end
8+
end
9+
end
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
%figure{@tag_attributes}
2+
- if block_given?
3+
= yield
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Figure
2+
class Figure < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end

app/concepts/matestack/ui/core/form/form.js

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,9 +104,27 @@ const componentDef = {
104104
if (self.componentConfig["success"] != undefined && self.componentConfig["success"]["emit"] != undefined) {
105105
matestackEventHub.$emit(self.componentConfig["success"]["emit"], response.data);
106106
}
107-
if (self.componentConfig["success"] != undefined && self.componentConfig["success"]["transition"] != undefined && self.$store != undefined) {
107+
if (self.componentConfig["success"] != undefined
108+
&& self.componentConfig["success"]["transition"] != undefined
109+
&& (
110+
self.componentConfig["success"]["transition"]["follow_response"] == undefined
111+
||
112+
self.componentConfig["success"]["transition"]["follow_response"] === false
113+
)
114+
&& self.$store != undefined
115+
) {
108116
let path = self.componentConfig["success"]["transition"]["path"]
109117
self.$store.dispatch('navigateTo', {url: path, backwards: false})
118+
return;
119+
}
120+
if (self.componentConfig["success"] != undefined
121+
&& self.componentConfig["success"]["transition"] != undefined
122+
&& self.componentConfig["success"]["transition"]["follow_response"] === true
123+
&& self.$store != undefined
124+
) {
125+
let path = response.data["transition_to"]
126+
self.$store.dispatch('navigateTo', {url: path, backwards: false})
127+
return;
110128
}
111129
self.setProps(self.data, null);
112130
self.initValues()

app/concepts/matestack/ui/core/img/img.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ def setup
66
src: ActionController::Base.helpers.asset_path(options[:path]),
77
height: options[:height],
88
width: options[:width],
9+
usemap: options[:usemap],
910
alt: options[:alt]
1011
})
1112
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%ins{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
module Matestack::Ui::Core::Ins
2+
class Ins < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
cite: options[:cite],
6+
datetime: options[:datetime]
7+
})
8+
end
9+
end
10+
end

app/concepts/matestack/ui/core/js/core.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import html from 'html/html'
1010
import transition from 'transition/transition'
1111
import action from 'action/action'
1212
import form from 'form/form'
13-
import view from 'view/view'
1413
import onclick from 'onclick/onclick'
1514
import collectionContent from 'collection/content/content'
1615
import collectionFilter from 'collection/filter/filter'
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%kbd{@tag_attributes}
2+
- if options[:text].blank? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Matestack::Ui::Core::Kbd
2+
class Kbd < Matestack::Ui::Core::Component::Static
3+
end
4+
end
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
module Matestack::Ui::Core::Label
22
class Label < Matestack::Ui::Core::Component::Static
3-
3+
def setup
4+
@tag_attributes.merge!({
5+
for: options[:for],
6+
form: options[:form]
7+
})
8+
end
49
end
510
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%legend{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Legend
2+
class Legend < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end

app/concepts/matestack/ui/core/link/link.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ def setup
99
"id": component_id,
1010
"method": options[:method],
1111
"target": options[:target] ||= nil,
12-
"href": link_path
12+
"href": link_path,
13+
"title": options[:title]
1314
})
1415
end
1516

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
%map{@tag_attributes}
2+
- if block_given?
3+
= yield
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Matestack::Ui::Core::Map
2+
class Map < Matestack::Ui::Core::Component::Static
3+
REQUIRED_KEYS = [:name]
4+
5+
def setup
6+
@tag_attributes.merge!({
7+
name: options[:name]
8+
})
9+
end
10+
end
11+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%mark{@tag_attributes}
2+
- if options[:text].blank? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Matestack::Ui::Core::Mark
2+
class Mark < Matestack::Ui::Core::Component::Static
3+
end
4+
end
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
%meter{@tag_attributes}
2+
- if block_given?
3+
= yield
4+
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module Matestack::Ui::Core::Meter
2+
class Meter < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
value: options[:value],
6+
min: options[:min],
7+
max: options[:max],
8+
low: options[:low],
9+
high: options[:high],
10+
optimum: options[:optimum]
11+
})
12+
end
13+
end
14+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%noscript{@tag_attributes}
2+
- if options[:text].nil? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module Matestack::Ui::Core::Noscript
2+
class Noscript < Matestack::Ui::Core::Component::Static
3+
4+
end
5+
end
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
%object{@tag_attributes}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module Matestack::Ui::Core::Object
2+
class Object < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
width: options[:width],
6+
height: options[:height],
7+
data: options[:data],
8+
form: options[:form],
9+
name: options[:name],
10+
type: options[:type],
11+
usemap: options[:usemap]
12+
})
13+
end
14+
end
15+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%output{@tag_attributes}
2+
- if options[:text].blank? && block_given?
3+
= yield
4+
- else
5+
= options[:text]

0 commit comments

Comments
 (0)