Skip to content

Commit b438fda

Browse files
committed
Merge branch 'develop' into sf/action-confirm-option-issue-257
2 parents 3e3a6c4 + b58de2e commit b438fda

Some content is hidden

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

65 files changed

+1687
-18
lines changed

Gemfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ gemspec
1111
# Git. Remember to move these dependencies to your gemspec before releasing
1212
# your gem to rubygems.org.
1313

14-
# To use a debugger
15-
# gem 'byebug', group: [:development, :test]
16-
# gem 'pry-byebug', group: [:development, :test]
17-
1814
gem "trailblazer"
1915
gem "trailblazer-rails"
2016
gem "trailblazer-cells"
@@ -31,6 +27,7 @@ group :development, :test do
3127
gem 'puma'
3228
gem 'simplecov', require: false, group: :test
3329
gem 'byebug'
30+
# gem 'pry-byebug'
3431
gem 'webmock'
3532
gem 'webdrivers', '~> 4.1'
3633
end

Gemfile.lock

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
matestack-ui-core (0.7.2.1)
4+
matestack-ui-core (0.7.3)
55
cells-haml
66
cells-rails
77
haml
@@ -84,7 +84,7 @@ GEM
8484
concurrent-ruby (1.1.5)
8585
crack (0.4.3)
8686
safe_yaml (~> 1.0.0)
87-
crass (1.0.4)
87+
crass (1.0.5)
8888
declarative (0.0.10)
8989
declarative-builder (0.1.0)
9090
declarative-option (< 0.2.0)
@@ -111,7 +111,7 @@ GEM
111111
i18n (1.6.0)
112112
concurrent-ruby (~> 1.0)
113113
json (2.1.0)
114-
loofah (2.2.3)
114+
loofah (2.3.1)
115115
crass (~> 1.0.2)
116116
nokogiri (>= 1.5.9)
117117
mail (2.7.1)
@@ -124,16 +124,17 @@ GEM
124124
mini_portile2 (2.4.0)
125125
minitest (5.11.3)
126126
nio4r (2.5.2)
127-
nokogiri (1.10.4)
127+
nokogiri (1.10.5)
128128
mini_portile2 (~> 2.4.0)
129129
pipetree (0.1.1)
130130
poltergeist (1.18.1)
131131
capybara (>= 2.1, < 4)
132132
cliver (~> 0.3.1)
133133
websocket-driver (>= 0.2.0)
134134
public_suffix (3.0.3)
135-
puma (3.12.0)
136-
rack (2.0.7)
135+
puma (4.3.1)
136+
nio4r (~> 2.0)
137+
rack (2.0.8)
137138
rack-proxy (0.6.5)
138139
rack
139140
rack-test (1.1.0)
@@ -191,7 +192,7 @@ GEM
191192
rspec-mocks (~> 3.8.0)
192193
rspec-support (~> 3.8.0)
193194
rspec-support (3.8.0)
194-
rubyzip (1.2.2)
195+
rubyzip (1.3.0)
195196
safe_yaml (1.0.5)
196197
selenium-webdriver (3.14.1)
197198
childprocess (~> 0.5)
@@ -201,7 +202,7 @@ GEM
201202
json (>= 1.8, < 3)
202203
simplecov-html (~> 0.10.0)
203204
simplecov-html (0.10.2)
204-
sprockets (3.7.2)
205+
sprockets (4.0.0)
205206
concurrent-ruby (~> 1.0)
206207
rack (> 1, < 3)
207208
sprockets-rails (3.2.1)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Click here to see how you can add Matestack UI to your existing Rails applicatio
4242
class Pages::MyPage < Matestack::Ui::Page
4343

4444
def prepare
45-
@technologies = ["Rails", "Vue.js", "Trailblazer", "Rspec", "Capybara"]
45+
@technologies = ["Rails", "Vue.js", "Trailblazer", "RSpec", "Capybara"]
4646
end
4747

4848
def response

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

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,27 @@ const componentDef = {
3030
if (self.componentConfig["success"] != undefined && self.componentConfig["success"]["emit"] != undefined) {
3131
matestackEventHub.$emit(self.componentConfig["success"]["emit"], response.data);
3232
}
33-
if (self.componentConfig["success"] != undefined && self.componentConfig["success"]["transition"] != undefined && self.$store != undefined) {
33+
if (self.componentConfig["success"] != undefined
34+
&& self.componentConfig["success"]["transition"] != undefined
35+
&& (
36+
self.componentConfig["success"]["transition"]["follow_response"] == undefined
37+
||
38+
self.componentConfig["success"]["transition"]["follow_response"] === false
39+
)
40+
&& self.$store != undefined
41+
) {
3442
let path = self.componentConfig["success"]["transition"]["path"]
3543
self.$store.dispatch('navigateTo', {url: path, backwards: false})
44+
return;
45+
}
46+
if (self.componentConfig["success"] != undefined
47+
&& self.componentConfig["success"]["transition"] != undefined
48+
&& self.componentConfig["success"]["transition"]["follow_response"] === true
49+
&& self.$store != undefined
50+
) {
51+
let path = response.data["transition_to"] || response.request.responseURL;
52+
self.$store.dispatch('navigateTo', {url: path, backwards: false});
53+
return;
3654
}
3755
})
3856
.catch(function(error){
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%bdi{@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::Bdi
2+
class Bdi < Matestack::Ui::Core::Component::Static
3+
end
4+
end
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
%bdo{@tag_attributes}
2+
- if options[:text].blank? && block_given?
3+
= yield
4+
- else
5+
= options[:text]
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Matestack::Ui::Core::Bdo
2+
class Bdo < Matestack::Ui::Core::Component::Static
3+
REQUIRED_KEYS = [:dir]
4+
5+
def setup
6+
@tag_attributes.merge!({
7+
"dir": options[:dir]
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+
%data{@tag_attributes}
2+
- if options[:text].blank? && 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::Data
2+
class Data < Matestack::Ui::Core::Component::Static
3+
def setup
4+
@tag_attributes.merge!({
5+
"value": options[:value] ||= nil
6+
})
7+
end
8+
end
9+
end

0 commit comments

Comments
 (0)