bullet_train 1.0.45 → 1.1.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.
- checksums.yaml +4 -4
- data/.bt-link +0 -0
- data/README.md +4 -3
- data/app/controllers/concerns/account/controllers/base.rb +9 -0
- data/app/controllers/concerns/account/invitations/controller_base.rb +11 -6
- data/app/controllers/concerns/account/teams/controller_base.rb +1 -1
- data/app/controllers/concerns/controllers/base.rb +26 -2
- data/app/controllers/concerns/registrations/controller_base.rb +4 -7
- data/app/controllers/concerns/root_redirect.rb +1 -5
- data/app/controllers/concerns/sessions/controller_base.rb +0 -6
- data/app/controllers/sessions_controller.rb +11 -0
- data/app/controllers/turbo_devise_controller.rb +19 -0
- data/app/helpers/account/dates_helper.rb +10 -8
- data/app/helpers/account/forms_helper.rb +0 -4
- data/app/helpers/account/locale_helper.rb +2 -2
- data/app/helpers/base_helper.rb +5 -1
- data/app/helpers/concerns/helpers/base.rb +18 -0
- data/app/helpers/invitations_helper.rb +0 -15
- data/app/javascript/controllers/bulk_action_form_controller.js +88 -0
- data/app/javascript/controllers/bulk_actions_controller.js +95 -0
- data/app/javascript/controllers/clipboard_controller.js +1 -1
- data/app/javascript/controllers/form_controller.js +1 -1
- data/app/javascript/controllers/index.js +7 -1
- data/app/javascript/controllers/mobile_menu_controller.js +19 -17
- data/app/javascript/controllers/text_toggle_controller.js +33 -0
- data/app/mailers/concerns/mailers/base.rb +1 -0
- data/app/models/concerns/current_attributes/base.rb +1 -1
- data/app/models/concerns/memberships/base.rb +10 -2
- data/app/models/concerns/records/base.rb +35 -0
- data/app/models/concerns/teams/base.rb +19 -0
- data/app/models/concerns/users/base.rb +12 -11
- data/app/models/invitation.rb +1 -1
- data/app/models/membership.rb +1 -1
- data/app/models/team.rb +2 -2
- data/app/models/user.rb +1 -1
- data/app/views/account/memberships/show.html.erb +3 -1
- data/app/views/account/onboarding/user_details/edit.html.erb +1 -1
- data/app/views/account/users/_oauth.html.erb +2 -0
- data/app/views/account/users/edit.html.erb +2 -3
- data/app/views/bullet_train/partial_resolver.html.erb +1 -0
- data/app/views/devise/registrations/new.html.erb +1 -1
- data/app/views/devise/sessions/new.html.erb +6 -6
- data/app/views/layouts/docs.html.erb +25 -24
- data/app/views/layouts/mailer.html.erb +1 -425
- data/config/initializers/concerns/inflections_base.rb +6 -0
- data/config/initializers/concerns/turbo_failure_app.rb +14 -0
- data/config/locales/en/billing/products.en.yml +17 -0
- data/config/locales/en/devise.en.yml +1 -0
- data/config/locales/en/framework_packages.yml +43 -0
- data/config/locales/en/invitations.en.yml +1 -0
- data/config/locales/en/teams.en.yml +1 -0
- data/docs/action-models.md +148 -0
- data/docs/authentication.md +2 -2
- data/docs/billing/stripe.md +95 -39
- data/docs/field-partials/super-select.md +70 -1
- data/docs/field-partials.md +25 -18
- data/docs/getting-started.md +12 -12
- data/docs/index.md +4 -1
- data/docs/indirection.md +30 -7
- data/docs/invitation_only.md +13 -0
- data/docs/javascript.md +18 -0
- data/docs/namespacing.md +1 -1
- data/docs/onboarding.md +10 -10
- data/docs/overriding.md +1 -1
- data/docs/permissions.md +1 -1
- data/docs/super-scaffolding/delegated-types.md +31 -3
- data/docs/super-scaffolding/sortable.md +137 -0
- data/docs/super-scaffolding.md +7 -1
- data/docs/tunneling.md +4 -4
- data/lib/bullet_train/core_ext/string_emoji_helper.rb +18 -0
- data/lib/bullet_train/resolver.rb +61 -47
- data/lib/bullet_train/version.rb +1 -1
- data/lib/bullet_train.rb +23 -9
- data/lib/tasks/bullet_train_tasks.rake +148 -7
- metadata +115 -33
- data/app/assets/javascripts/bullet-train.esm.js +0 -2
- data/app/assets/javascripts/bullet-train.esm.js.map +0 -1
- data/app/assets/javascripts/bullet-train.js +0 -2
- data/app/assets/javascripts/bullet-train.js.map +0 -1
- data/app/assets/javascripts/bullet-train.modern.js +0 -2
- data/app/assets/javascripts/bullet-train.modern.js.map +0 -1
- data/app/assets/javascripts/bullet-train.umd.js +0 -2
- data/app/assets/javascripts/bullet-train.umd.js.map +0 -1
- data/lib/string/emoji.rb +0 -10
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
require
|
|
1
|
+
require "io/wait"
|
|
2
2
|
|
|
3
3
|
namespace :bt do
|
|
4
4
|
desc "Symlink registered gems in `./tmp/gems` so their views, etc. can be inspected by Tailwind CSS."
|
|
5
|
-
task :
|
|
6
|
-
if Dir.
|
|
5
|
+
task link: :environment do
|
|
6
|
+
if Dir.exist?("tmp/gems")
|
|
7
7
|
puts "Removing previously linked gems."
|
|
8
8
|
`rm -f tmp/gems/*`
|
|
9
9
|
else
|
|
10
|
-
if File.
|
|
10
|
+
if File.exist?("tmp/gems")
|
|
11
11
|
raise "A file named `tmp/gems` already exists? It has to be removed before we can create the required directory."
|
|
12
12
|
end
|
|
13
13
|
|
|
@@ -42,18 +42,159 @@ namespace :bullet_train do
|
|
|
42
42
|
input = $stdin.gets.strip
|
|
43
43
|
$stdin.getc while $stdin.ready?
|
|
44
44
|
|
|
45
|
-
# Extract absolute paths from
|
|
46
|
-
if input
|
|
45
|
+
# Extract absolute paths from annotated views.
|
|
46
|
+
if input =~ /<!-- BEGIN (.*) -->/
|
|
47
47
|
input = $1
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
+
# Append the main application's path if the file is a local file.
|
|
51
|
+
# i.e. - app/views/layouts/_head.html.erb
|
|
52
|
+
if input.match?(/^app/)
|
|
53
|
+
input = "#{Rails.root}/#{input}"
|
|
54
|
+
end
|
|
55
|
+
|
|
50
56
|
ARGV.unshift input.strip
|
|
51
57
|
end
|
|
52
58
|
|
|
53
59
|
if ARGV.first.present?
|
|
54
60
|
BulletTrain::Resolver.new(ARGV.first).run(eject: ARGV.include?("--eject"), open: ARGV.include?("--open"), force: ARGV.include?("--force"), interactive: ARGV.include?("--interactive"))
|
|
55
61
|
else
|
|
56
|
-
|
|
62
|
+
warn "\n🚅 Usage: `bin/resolve [path, partial, or URL] (--eject) (--open)`\n".blue
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
task :develop, [:all_options] => :environment do |t, arguments|
|
|
67
|
+
def stream(command, prefix = " ")
|
|
68
|
+
puts ""
|
|
69
|
+
|
|
70
|
+
begin
|
|
71
|
+
trap("SIGINT") { throw :ctrl_c }
|
|
72
|
+
|
|
73
|
+
IO.popen(command) do |io|
|
|
74
|
+
while (line = io.gets)
|
|
75
|
+
puts "#{prefix}#{line}"
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
rescue UncaughtThrowError
|
|
79
|
+
puts "Received a <Control + C>. Exiting the child process.".blue
|
|
80
|
+
end
|
|
81
|
+
|
|
82
|
+
puts ""
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
framework_packages = I18n.t("framework_packages")
|
|
86
|
+
|
|
87
|
+
puts "Which framework package do you want to work on?".blue
|
|
88
|
+
puts ""
|
|
89
|
+
framework_packages.each do |gem, details|
|
|
90
|
+
puts " #{framework_packages.keys.find_index(gem) + 1}. #{gem}".blue
|
|
91
|
+
end
|
|
92
|
+
puts ""
|
|
93
|
+
puts "Enter a number below and hit <Enter>:".blue
|
|
94
|
+
number = $stdin.gets.chomp
|
|
95
|
+
|
|
96
|
+
gem = framework_packages.keys[number.to_i - 1]
|
|
97
|
+
|
|
98
|
+
if gem
|
|
99
|
+
details = framework_packages[gem]
|
|
100
|
+
|
|
101
|
+
puts "OK! Let's work on `#{gem}` together!".green
|
|
102
|
+
puts ""
|
|
103
|
+
|
|
104
|
+
if File.exist?("local/#{gem}")
|
|
105
|
+
puts "We found the repository in `local/#{gem}`. We will try to use what's already there.".yellow
|
|
106
|
+
puts ""
|
|
107
|
+
|
|
108
|
+
# Adding these flags enables us to execute git commands in the gem from our starter repo.
|
|
109
|
+
work_tree_flag = "--work-tree=local/#{gem}"
|
|
110
|
+
git_dir_flag = "--git-dir=local/#{gem}/.git"
|
|
111
|
+
|
|
112
|
+
git_status = `git #{work_tree_flag} #{git_dir_flag} status`
|
|
113
|
+
unless git_status.match?("nothing to commit, working tree clean")
|
|
114
|
+
puts "This package currently has uncommitted changes.".red
|
|
115
|
+
puts "Please make sure the branch is clean and try again.".red
|
|
116
|
+
exit
|
|
117
|
+
end
|
|
118
|
+
|
|
119
|
+
current_branch = `git #{work_tree_flag} #{git_dir_flag} branch`.split("\n").select { |branch_name| branch_name.match?(/^\*\s/) }.pop.gsub(/^\*\s/, "")
|
|
120
|
+
unless current_branch == "main"
|
|
121
|
+
puts "Previously on #{current_branch}.".blue
|
|
122
|
+
puts "Switching local/#{gem} to main branch.".blue
|
|
123
|
+
stream("git #{work_tree_flag} #{git_dir_flag} checkout main")
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
puts "Updating the main branch with the latest changes.".blue
|
|
127
|
+
stream("git #{work_tree_flag} #{git_dir_flag} pull origin main")
|
|
128
|
+
else
|
|
129
|
+
# Use https:// URLs when using this task in Gitpod.
|
|
130
|
+
stream "git clone #{`whoami`.chomp == "gitpod" ? "https://github.com/" : "git@github.com:"}#{details[:git]}.git local/#{gem}"
|
|
131
|
+
end
|
|
132
|
+
|
|
133
|
+
stream("git #{work_tree_flag} #{git_dir_flag} fetch")
|
|
134
|
+
stream("git #{work_tree_flag} #{git_dir_flag} branch -r")
|
|
135
|
+
puts "The above is a list of remote branches.".blue
|
|
136
|
+
puts "If there's one you'd like to work on, please enter the branch name and press <Enter>.".blue
|
|
137
|
+
puts "If not, just press <Enter> to continue.".blue
|
|
138
|
+
input = $stdin.gets.strip
|
|
139
|
+
unless input.empty?
|
|
140
|
+
puts "Switching to #{input.gsub("origin/", "")}".blue # TODO: Should we remove origin/ here if the developer types it?
|
|
141
|
+
stream("git #{work_tree_flag} #{git_dir_flag} checkout #{input}")
|
|
142
|
+
end
|
|
143
|
+
|
|
144
|
+
puts ""
|
|
145
|
+
puts "Now we'll try to link up that repository in the `Gemfile`.".blue
|
|
146
|
+
if `cat Gemfile | grep "gem \\\"#{gem}\\\", path: \\\"local/#{gem}\\\""`.chomp.present?
|
|
147
|
+
puts "This gem is already linked to a checked out copy in `local` in the `Gemfile`.".green
|
|
148
|
+
elsif `cat Gemfile | grep "gem \\\"#{gem}\\\","`.chomp.present?
|
|
149
|
+
puts "This gem already has some sort of alternative source configured in the `Gemfile`.".yellow
|
|
150
|
+
puts "We can't do anything with this. Sorry! We'll proceed, but you have to link this package yourself.".red
|
|
151
|
+
elsif `cat Gemfile | grep "gem \\\"#{gem}\\\""`.chomp.present?
|
|
152
|
+
puts "This gem is directly present in the `Gemfile`, so we'll update that line.".green
|
|
153
|
+
|
|
154
|
+
text = File.read("Gemfile")
|
|
155
|
+
new_contents = text.gsub(/gem "#{gem}"/, "gem \"#{gem}\", path: \"local/#{gem}\"")
|
|
156
|
+
File.open("Gemfile", "w") { |file| file.puts new_contents }
|
|
157
|
+
else
|
|
158
|
+
puts "This gem isn't directly present in the `Gemfile`, so we'll add it temporarily.".green
|
|
159
|
+
File.open("Gemfile", "a+") { |file|
|
|
160
|
+
file.puts
|
|
161
|
+
file.puts "gem \"#{gem}\", path: \"local/#{gem}\" # Added by \`bin/develop\`."
|
|
162
|
+
}
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
puts ""
|
|
166
|
+
puts "Now we'll run `bundle install`.".blue
|
|
167
|
+
stream "bundle install"
|
|
168
|
+
|
|
169
|
+
puts ""
|
|
170
|
+
puts "We'll restart any running Rails server now.".blue
|
|
171
|
+
stream "rails restart"
|
|
172
|
+
|
|
173
|
+
puts ""
|
|
174
|
+
puts "OK, we're opening that package in your IDE, `#{ENV["IDE"] || "code"}`. (You can configure this with `export IDE=whatever`.)".blue
|
|
175
|
+
`#{ENV["IDE"] || "code"} local/#{gem}`
|
|
176
|
+
|
|
177
|
+
puts ""
|
|
178
|
+
if details[:npm]
|
|
179
|
+
puts "This package also has an npm package, so we'll link that up as well.".blue
|
|
180
|
+
stream "cd local/#{gem} && yarn install && npm_config_yes=true npx yalc link && cd ../.. && npm_config_yes=true npx yalc link \"#{details[:npm]}\""
|
|
181
|
+
|
|
182
|
+
puts ""
|
|
183
|
+
puts "And now we're going to watch for any changes you make to the JavaScript and recompile as we go.".blue
|
|
184
|
+
puts "When you're done, you can hit <Control + C> and we'll clean all off this up.".blue
|
|
185
|
+
stream "cd local/#{gem} && yarn watch"
|
|
186
|
+
else
|
|
187
|
+
puts "This package has no npm package, so we'll just hang out here and do nothing. However, when you hit <Enter> here, we'll start the process of cleaning all of this up.".blue
|
|
188
|
+
$stdin.gets
|
|
189
|
+
end
|
|
190
|
+
|
|
191
|
+
puts ""
|
|
192
|
+
puts "OK, here's a list of things this script still doesn't do you for you:".yellow
|
|
193
|
+
puts "1. It doesn't clean up the repository that was cloned into `local`.".yellow
|
|
194
|
+
puts "2. Unless you remove it, it won't update that repository the next time you link to it.".yellow
|
|
195
|
+
else
|
|
196
|
+
puts ""
|
|
197
|
+
puts "Invalid option, \"#{number}\". Try again.".red
|
|
57
198
|
end
|
|
58
199
|
end
|
|
59
200
|
end
|
metadata
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bullet_train
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0
|
|
4
|
+
version: 1.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Andrew Culver
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-09-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
|
-
name:
|
|
14
|
+
name: standard
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
17
|
- - ">="
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version:
|
|
20
|
-
type: :
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - ">="
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
26
|
+
version: '0'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
|
-
name:
|
|
28
|
+
name: rails
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - ">="
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version:
|
|
33
|
+
version: 6.0.0
|
|
34
34
|
type: :runtime
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - ">="
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version:
|
|
40
|
+
version: 6.0.0
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: bullet_train-
|
|
42
|
+
name: bullet_train-fields
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - ">="
|
|
@@ -53,7 +53,7 @@ dependencies:
|
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '0'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
|
-
name: bullet_train-
|
|
56
|
+
name: bullet_train-roles
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - ">="
|
|
@@ -67,7 +67,7 @@ dependencies:
|
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
68
|
version: '0'
|
|
69
69
|
- !ruby/object:Gem::Dependency
|
|
70
|
-
name: bullet_train-
|
|
70
|
+
name: bullet_train-super_load_and_authorize_resource
|
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
|
72
72
|
requirements:
|
|
73
73
|
- - ">="
|
|
@@ -81,7 +81,7 @@ dependencies:
|
|
|
81
81
|
- !ruby/object:Gem::Version
|
|
82
82
|
version: '0'
|
|
83
83
|
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: bullet_train-
|
|
84
|
+
name: bullet_train-has_uuid
|
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
|
86
86
|
requirements:
|
|
87
87
|
- - ">="
|
|
@@ -95,7 +95,7 @@ dependencies:
|
|
|
95
95
|
- !ruby/object:Gem::Version
|
|
96
96
|
version: '0'
|
|
97
97
|
- !ruby/object:Gem::Dependency
|
|
98
|
-
name:
|
|
98
|
+
name: bullet_train-scope_validator
|
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
|
100
100
|
requirements:
|
|
101
101
|
- - ">="
|
|
@@ -109,7 +109,7 @@ dependencies:
|
|
|
109
109
|
- !ruby/object:Gem::Version
|
|
110
110
|
version: '0'
|
|
111
111
|
- !ruby/object:Gem::Dependency
|
|
112
|
-
name:
|
|
112
|
+
name: bullet_train-themes
|
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
|
114
114
|
requirements:
|
|
115
115
|
- - ">="
|
|
@@ -123,7 +123,7 @@ dependencies:
|
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
125
|
- !ruby/object:Gem::Dependency
|
|
126
|
-
name:
|
|
126
|
+
name: devise
|
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
|
128
128
|
requirements:
|
|
129
129
|
- - ">="
|
|
@@ -137,7 +137,7 @@ dependencies:
|
|
|
137
137
|
- !ruby/object:Gem::Version
|
|
138
138
|
version: '0'
|
|
139
139
|
- !ruby/object:Gem::Dependency
|
|
140
|
-
name:
|
|
140
|
+
name: cancancan
|
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
|
143
143
|
- - ">="
|
|
@@ -151,7 +151,7 @@ dependencies:
|
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '0'
|
|
153
153
|
- !ruby/object:Gem::Dependency
|
|
154
|
-
name:
|
|
154
|
+
name: possessive
|
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
|
156
156
|
requirements:
|
|
157
157
|
- - ">="
|
|
@@ -165,7 +165,7 @@ dependencies:
|
|
|
165
165
|
- !ruby/object:Gem::Version
|
|
166
166
|
version: '0'
|
|
167
167
|
- !ruby/object:Gem::Dependency
|
|
168
|
-
name:
|
|
168
|
+
name: sidekiq
|
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|
|
170
170
|
requirements:
|
|
171
171
|
- - ">="
|
|
@@ -179,7 +179,7 @@ dependencies:
|
|
|
179
179
|
- !ruby/object:Gem::Version
|
|
180
180
|
version: '0'
|
|
181
181
|
- !ruby/object:Gem::Dependency
|
|
182
|
-
name:
|
|
182
|
+
name: fastimage
|
|
183
183
|
requirement: !ruby/object:Gem::Requirement
|
|
184
184
|
requirements:
|
|
185
185
|
- - ">="
|
|
@@ -240,14 +240,14 @@ dependencies:
|
|
|
240
240
|
requirements:
|
|
241
241
|
- - '='
|
|
242
242
|
- !ruby/object:Gem::Version
|
|
243
|
-
version: 5.0.0.
|
|
243
|
+
version: 5.0.0.pre9
|
|
244
244
|
type: :runtime
|
|
245
245
|
prerelease: false
|
|
246
246
|
version_requirements: !ruby/object:Gem::Requirement
|
|
247
247
|
requirements:
|
|
248
248
|
- - '='
|
|
249
249
|
- !ruby/object:Gem::Version
|
|
250
|
-
version: 5.0.0.
|
|
250
|
+
version: 5.0.0.pre9
|
|
251
251
|
- !ruby/object:Gem::Dependency
|
|
252
252
|
name: hiredis
|
|
253
253
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -346,6 +346,76 @@ dependencies:
|
|
|
346
346
|
- - ">="
|
|
347
347
|
- !ruby/object:Gem::Version
|
|
348
348
|
version: '0'
|
|
349
|
+
- !ruby/object:Gem::Dependency
|
|
350
|
+
name: unicode-emoji
|
|
351
|
+
requirement: !ruby/object:Gem::Requirement
|
|
352
|
+
requirements:
|
|
353
|
+
- - ">="
|
|
354
|
+
- !ruby/object:Gem::Version
|
|
355
|
+
version: '0'
|
|
356
|
+
type: :runtime
|
|
357
|
+
prerelease: false
|
|
358
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
359
|
+
requirements:
|
|
360
|
+
- - ">="
|
|
361
|
+
- !ruby/object:Gem::Version
|
|
362
|
+
version: '0'
|
|
363
|
+
- !ruby/object:Gem::Dependency
|
|
364
|
+
name: pagy
|
|
365
|
+
requirement: !ruby/object:Gem::Requirement
|
|
366
|
+
requirements:
|
|
367
|
+
- - ">="
|
|
368
|
+
- !ruby/object:Gem::Version
|
|
369
|
+
version: '0'
|
|
370
|
+
type: :runtime
|
|
371
|
+
prerelease: false
|
|
372
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
373
|
+
requirements:
|
|
374
|
+
- - ">="
|
|
375
|
+
- !ruby/object:Gem::Version
|
|
376
|
+
version: '0'
|
|
377
|
+
- !ruby/object:Gem::Dependency
|
|
378
|
+
name: pry
|
|
379
|
+
requirement: !ruby/object:Gem::Requirement
|
|
380
|
+
requirements:
|
|
381
|
+
- - ">="
|
|
382
|
+
- !ruby/object:Gem::Version
|
|
383
|
+
version: '0'
|
|
384
|
+
type: :development
|
|
385
|
+
prerelease: false
|
|
386
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
387
|
+
requirements:
|
|
388
|
+
- - ">="
|
|
389
|
+
- !ruby/object:Gem::Version
|
|
390
|
+
version: '0'
|
|
391
|
+
- !ruby/object:Gem::Dependency
|
|
392
|
+
name: pry-stack_explorer
|
|
393
|
+
requirement: !ruby/object:Gem::Requirement
|
|
394
|
+
requirements:
|
|
395
|
+
- - ">="
|
|
396
|
+
- !ruby/object:Gem::Version
|
|
397
|
+
version: '0'
|
|
398
|
+
type: :development
|
|
399
|
+
prerelease: false
|
|
400
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
401
|
+
requirements:
|
|
402
|
+
- - ">="
|
|
403
|
+
- !ruby/object:Gem::Version
|
|
404
|
+
version: '0'
|
|
405
|
+
- !ruby/object:Gem::Dependency
|
|
406
|
+
name: devise-pwned_password
|
|
407
|
+
requirement: !ruby/object:Gem::Requirement
|
|
408
|
+
requirements:
|
|
409
|
+
- - ">="
|
|
410
|
+
- !ruby/object:Gem::Version
|
|
411
|
+
version: '0'
|
|
412
|
+
type: :runtime
|
|
413
|
+
prerelease: false
|
|
414
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
415
|
+
requirements:
|
|
416
|
+
- - ">="
|
|
417
|
+
- !ruby/object:Gem::Version
|
|
418
|
+
version: '0'
|
|
349
419
|
description: Bullet Train
|
|
350
420
|
email:
|
|
351
421
|
- andrew.culver@gmail.com
|
|
@@ -353,18 +423,11 @@ executables: []
|
|
|
353
423
|
extensions: []
|
|
354
424
|
extra_rdoc_files: []
|
|
355
425
|
files:
|
|
426
|
+
- ".bt-link"
|
|
356
427
|
- MIT-LICENSE
|
|
357
428
|
- README.md
|
|
358
429
|
- Rakefile
|
|
359
430
|
- app/assets/config/bullet_train_manifest.js
|
|
360
|
-
- app/assets/javascripts/bullet-train.esm.js
|
|
361
|
-
- app/assets/javascripts/bullet-train.esm.js.map
|
|
362
|
-
- app/assets/javascripts/bullet-train.js
|
|
363
|
-
- app/assets/javascripts/bullet-train.js.map
|
|
364
|
-
- app/assets/javascripts/bullet-train.modern.js
|
|
365
|
-
- app/assets/javascripts/bullet-train.modern.js.map
|
|
366
|
-
- app/assets/javascripts/bullet-train.umd.js
|
|
367
|
-
- app/assets/javascripts/bullet-train.umd.js.map
|
|
368
431
|
- app/controllers/account/invitations_controller.rb
|
|
369
432
|
- app/controllers/account/memberships_controller.rb
|
|
370
433
|
- app/controllers/account/onboarding/user_details_controller.rb
|
|
@@ -388,6 +451,7 @@ files:
|
|
|
388
451
|
- app/controllers/concerns/sessions/controller_base.rb
|
|
389
452
|
- app/controllers/registrations_controller.rb
|
|
390
453
|
- app/controllers/sessions_controller.rb
|
|
454
|
+
- app/controllers/turbo_devise_controller.rb
|
|
391
455
|
- app/helpers/account/buttons_helper.rb
|
|
392
456
|
- app/helpers/account/dates_helper.rb
|
|
393
457
|
- app/helpers/account/forms_helper.rb
|
|
@@ -400,14 +464,18 @@ files:
|
|
|
400
464
|
- app/helpers/account/users_helper.rb
|
|
401
465
|
- app/helpers/attributes_helper.rb
|
|
402
466
|
- app/helpers/base_helper.rb
|
|
467
|
+
- app/helpers/concerns/helpers/base.rb
|
|
403
468
|
- app/helpers/email_helper.rb
|
|
404
469
|
- app/helpers/images_helper.rb
|
|
405
470
|
- app/helpers/invitation_only_helper.rb
|
|
406
471
|
- app/helpers/invitations_helper.rb
|
|
472
|
+
- app/javascript/controllers/bulk_action_form_controller.js
|
|
473
|
+
- app/javascript/controllers/bulk_actions_controller.js
|
|
407
474
|
- app/javascript/controllers/clipboard_controller.js
|
|
408
475
|
- app/javascript/controllers/form_controller.js
|
|
409
476
|
- app/javascript/controllers/index.js
|
|
410
477
|
- app/javascript/controllers/mobile_menu_controller.js
|
|
478
|
+
- app/javascript/controllers/text_toggle_controller.js
|
|
411
479
|
- app/javascript/electron/index.js
|
|
412
480
|
- app/javascript/index.js
|
|
413
481
|
- app/mailers/concerns/mailers/base.rb
|
|
@@ -462,6 +530,7 @@ files:
|
|
|
462
530
|
- app/views/account/users/_breadcrumbs.html.erb
|
|
463
531
|
- app/views/account/users/_fields.html.erb
|
|
464
532
|
- app/views/account/users/_form.html.erb
|
|
533
|
+
- app/views/account/users/_oauth.html.erb
|
|
465
534
|
- app/views/account/users/edit.html.erb
|
|
466
535
|
- app/views/account/users/show.html.erb
|
|
467
536
|
- app/views/bullet_train/partial_resolver.html.erb
|
|
@@ -487,9 +556,13 @@ files:
|
|
|
487
556
|
- app/views/public/home/docs.html.erb
|
|
488
557
|
- app/views/user_mailer/invited.html.erb
|
|
489
558
|
- app/views/user_mailer/welcome.html.erb
|
|
559
|
+
- config/initializers/concerns/inflections_base.rb
|
|
560
|
+
- config/initializers/concerns/turbo_failure_app.rb
|
|
490
561
|
- config/locales/en/base.yml
|
|
562
|
+
- config/locales/en/billing/products.en.yml
|
|
491
563
|
- config/locales/en/devise.en.yml
|
|
492
564
|
- config/locales/en/doorkeeper.en.yml
|
|
565
|
+
- config/locales/en/framework_packages.yml
|
|
493
566
|
- config/locales/en/invitations.en.yml
|
|
494
567
|
- config/locales/en/memberships.en.yml
|
|
495
568
|
- config/locales/en/oauth.en.yml
|
|
@@ -534,6 +607,7 @@ files:
|
|
|
534
607
|
- db/migrate/20210816072508_add_locale_to_teams.rb
|
|
535
608
|
- db/migrate/20211020200855_add_doorkeeper_application_to_memberships.rb
|
|
536
609
|
- db/migrate/20211027002944_add_doorkeeper_application_to_users.rb
|
|
610
|
+
- docs/action-models.md
|
|
537
611
|
- docs/api.md
|
|
538
612
|
- docs/authentication.md
|
|
539
613
|
- docs/billing/stripe.md
|
|
@@ -547,6 +621,8 @@ files:
|
|
|
547
621
|
- docs/i18n.md
|
|
548
622
|
- docs/index.md
|
|
549
623
|
- docs/indirection.md
|
|
624
|
+
- docs/invitation_only.md
|
|
625
|
+
- docs/javascript.md
|
|
550
626
|
- docs/modeling.md
|
|
551
627
|
- docs/namespacing.md
|
|
552
628
|
- docs/oauth.md
|
|
@@ -556,6 +632,7 @@ files:
|
|
|
556
632
|
- docs/seeds.md
|
|
557
633
|
- docs/super-scaffolding.md
|
|
558
634
|
- docs/super-scaffolding/delegated-types.md
|
|
635
|
+
- docs/super-scaffolding/sortable.md
|
|
559
636
|
- docs/teams.md
|
|
560
637
|
- docs/testing.md
|
|
561
638
|
- docs/themes.md
|
|
@@ -564,11 +641,11 @@ files:
|
|
|
564
641
|
- docs/webhooks/incoming.md
|
|
565
642
|
- docs/webhooks/outgoing.md
|
|
566
643
|
- lib/bullet_train.rb
|
|
644
|
+
- lib/bullet_train/core_ext/string_emoji_helper.rb
|
|
567
645
|
- lib/bullet_train/engine.rb
|
|
568
646
|
- lib/bullet_train/resolver.rb
|
|
569
647
|
- lib/bullet_train/version.rb
|
|
570
648
|
- lib/colorizer.rb
|
|
571
|
-
- lib/string/emoji.rb
|
|
572
649
|
- lib/tasks/bullet_train_tasks.rake
|
|
573
650
|
homepage: https://github.com/bullet-train-co/bullet_train
|
|
574
651
|
licenses:
|
|
@@ -576,7 +653,12 @@ licenses:
|
|
|
576
653
|
metadata:
|
|
577
654
|
homepage_uri: https://github.com/bullet-train-co/bullet_train
|
|
578
655
|
source_code_uri: https://github.com/bullet-train-co/bullet_train
|
|
579
|
-
post_install_message:
|
|
656
|
+
post_install_message: |2
|
|
657
|
+
If you're upgrading `bullet_train-*` Ruby gems and you run into any new
|
|
658
|
+
issues, you should probably also pull in updates from the Bullet Train
|
|
659
|
+
starter repository into your local application, just to make sure
|
|
660
|
+
everything is synced up. See https://bullettrain.co/docs/upgrades for
|
|
661
|
+
details.
|
|
580
662
|
rdoc_options: []
|
|
581
663
|
require_paths:
|
|
582
664
|
- lib
|
|
@@ -591,7 +673,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
591
673
|
- !ruby/object:Gem::Version
|
|
592
674
|
version: '0'
|
|
593
675
|
requirements: []
|
|
594
|
-
rubygems_version: 3.
|
|
676
|
+
rubygems_version: 3.3.7
|
|
595
677
|
signing_key:
|
|
596
678
|
specification_version: 4
|
|
597
679
|
summary: Bullet Train
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Controller as e}from"stimulus";function t(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var i=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.copy=function(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)},t}(e);i.targets=["source","input","button"];var o=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).removeTrailingNewlines=function(e){e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",t.removeTrailingNewlines(e))},t.removeTrailingWhitespace=function(e){e.element.innerHTML.match(/ <\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",t.removeTrailingWhitespace(e)):e.element.innerHTML.match(/ <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",t.removeTrailingWhitespace(e))},t}r(t,e);var n=t.prototype;return n.resetOnSuccess=function(e){e.detail.success&&e.target.reset()},n.stripTrix=function(){var e=this;this.trixFieldTargets.forEach(function(t){e.removeTrailingNewlines(t.editor),e.removeTrailingWhitespace(t.editor),t.parentElement.querySelector("input").value=t.innerHTML})},n.submitOnReturn=function(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();var t=e.target.closest("form");this.submitForm(t)}},n.submitForm=function(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()},t}(e);o.targets=["trixField","scroll"];var a=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n,i,o=t.prototype;return o.toggle=function(){var e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))},o.showWrapper=function(){this.wrapperTarget.classList.remove(this.hiddenClass)},o.hideWrapper=function(){this.wrapperTarget.classList.add(this.hiddenClass)},n=t,(i=[{key:"isWrapperHidden",get:function(){return this.wrapperTarget.classList.contains(this.hiddenClass)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(e);a.targets=["wrapper"],a.classes=["hidden"],a.values={showEventName:String,hideEventName:String};var s=[[i,"clipboard_controller.js"],[o,"form_controller.js"],[a,"mobile_menu_controller.js"]].map(function(e){var r=e[0];return{identifier:t(e[1]),controllerConstructor:r}});document.addEventListener("turbo:load",function(){navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")});export{s as controllerDefinitions};
|
|
2
|
-
//# sourceMappingURL=bullet-train.esm.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bullet-train.esm.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/ <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/ <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","Controller","targets","removeTrailingNewlines","trixEditor","element","slice","_this","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","_this2","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","remove","hiddenClass","hideWrapper","add","contains","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"sCAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,yRCf3DC,KAAA,WACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,UAVsBG,KACpBC,QAAU,CAAC,SAAU,QAAS,oKC2BrCC,uBAAyB,SAACC,GACpBA,EAAWC,QAAQP,UAAUZ,MAAM,kBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKJ,uBAAuBC,OAIhCI,yBAA2B,SAACJ,GACtBA,EAAWC,QAAQP,UAAUZ,MAAM,mBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,IACrBA,EAAWC,QAAQP,UAAUZ,MAAM,qBAC5CkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,yCArClCK,eAAA,SAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,WAIbC,UAAA,sBACE1B,KAAK2B,iBAAiBC,QAAQ,SAAAZ,GAC5Ba,EAAKf,uBAAuBE,EAAQc,QACpCD,EAAKV,yBAAyBH,EAAQc,QAGtCd,EAAQe,cAAcC,cAAc,SAAS9B,MAAQc,EAAQP,eAIjEwB,eAAA,SAAeZ,GACb,IAAIA,EAAEa,SAAWb,EAAEc,UAA0B,IAAbd,EAAEe,QAAe,CAC/Cf,EAAEgB,iBACF,IAAIC,EAAOjB,EAAEG,OAAOe,QAAQ,QAC5BvC,KAAKwC,WAAWF,OAqBpBE,WAAA,SAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,YAlDb9B,KACpBC,QAAU,CAAC,YAAa,oHCM/B8B,OAAA,WACE,IAAMC,EAAY5C,KAAK6C,gBAAiB7C,KAAK8C,mBAAoB9C,KAAK+C,mBAClE/C,KAAK6C,iBACP7C,KAAKgD,cAGPhD,KAAKiD,cAAcC,cAAc,IAAIC,YAAYP,OAOnDI,YAAA,WACEhD,KAAKiD,cAAcG,UAAUC,OAAOrD,KAAKsD,gBAG3CC,YAAA,WACEvD,KAAKiD,cAAcG,UAAUI,IAAIxD,KAAKsD,iDATxC,WACE,YAAYL,cAAcG,UAAUK,SAASzD,KAAKsD,4PAlBzB1C,KACpBC,QAAU,CAAE,aACZ6C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,QCDNE,IAAAA,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,IACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY5E,EAHF0E,EAAE,IAIZG,sBAAuBF,KCf3B/D,SAASkE,iBAAiB,aAAc,WAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDtE,SAASuE,KAAKzB,UAAUI,IAAI"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
var e=require("stimulus");function t(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,n(e,t)}function n(e,t){return n=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},n(e,t)}var i=function(e){function t(){return e.apply(this,arguments)||this}return r(t,e),t.prototype.copy=function(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)},t}(e.Controller);i.targets=["source","input","button"];var o=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).removeTrailingNewlines=function(e){e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",t.removeTrailingNewlines(e))},t.removeTrailingWhitespace=function(e){e.element.innerHTML.match(/ <\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",t.removeTrailingWhitespace(e)):e.element.innerHTML.match(/ <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",t.removeTrailingWhitespace(e))},t}r(t,e);var n=t.prototype;return n.resetOnSuccess=function(e){e.detail.success&&e.target.reset()},n.stripTrix=function(){var e=this;this.trixFieldTargets.forEach(function(t){e.removeTrailingNewlines(t.editor),e.removeTrailingWhitespace(t.editor),t.parentElement.querySelector("input").value=t.innerHTML})},n.submitOnReturn=function(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();var t=e.target.closest("form");this.submitForm(t)}},n.submitForm=function(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()},t}(e.Controller);o.targets=["trixField","scroll"];var s=function(e){function t(){return e.apply(this,arguments)||this}r(t,e);var n,i,o=t.prototype;return o.toggle=function(){var e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))},o.showWrapper=function(){this.wrapperTarget.classList.remove(this.hiddenClass)},o.hideWrapper=function(){this.wrapperTarget.classList.add(this.hiddenClass)},n=t,(i=[{key:"isWrapperHidden",get:function(){return this.wrapperTarget.classList.contains(this.hiddenClass)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),t}(e.Controller);s.targets=["wrapper"],s.classes=["hidden"],s.values={showEventName:String,hideEventName:String};var a=[[i,"clipboard_controller.js"],[o,"form_controller.js"],[s,"mobile_menu_controller.js"]].map(function(e){var r=e[0];return{identifier:t(e[1]),controllerConstructor:r}});document.addEventListener("turbo:load",function(){navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")}),exports.controllerDefinitions=a;
|
|
2
|
-
//# sourceMappingURL=bullet-train.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bullet-train.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/ <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/ <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","Controller","targets","removeTrailingNewlines","trixEditor","element","slice","_this","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","_this2","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","remove","hiddenClass","hideWrapper","add","contains","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"0BAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,yRCf3DC,KAAA,WACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,UAVsBG,gBACpBC,QAAU,CAAC,SAAU,QAAS,oKC2BrCC,uBAAyB,SAACC,GACpBA,EAAWC,QAAQP,UAAUZ,MAAM,kBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKJ,uBAAuBC,OAIhCI,yBAA2B,SAACJ,GACtBA,EAAWC,QAAQP,UAAUZ,MAAM,mBACrCkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,IACrBA,EAAWC,QAAQP,UAAUZ,MAAM,qBAC5CkB,EAAWC,QAAQP,UAAYM,EAAWC,QAAQP,UAAUQ,MAAM,GAAI,IAAM,SAC5EC,EAAKC,yBAAyBJ,yCArClCK,eAAA,SAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,WAIbC,UAAA,sBACE1B,KAAK2B,iBAAiBC,QAAQ,SAAAZ,GAC5Ba,EAAKf,uBAAuBE,EAAQc,QACpCD,EAAKV,yBAAyBH,EAAQc,QAGtCd,EAAQe,cAAcC,cAAc,SAAS9B,MAAQc,EAAQP,eAIjEwB,eAAA,SAAeZ,GACb,IAAIA,EAAEa,SAAWb,EAAEc,UAA0B,IAAbd,EAAEe,QAAe,CAC/Cf,EAAEgB,iBACF,IAAIC,EAAOjB,EAAEG,OAAOe,QAAQ,QAC5BvC,KAAKwC,WAAWF,OAqBpBE,WAAA,SAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,YAlDb9B,gBACpBC,QAAU,CAAC,YAAa,oHCM/B8B,OAAA,WACE,IAAMC,EAAY5C,KAAK6C,gBAAiB7C,KAAK8C,mBAAoB9C,KAAK+C,mBAClE/C,KAAK6C,iBACP7C,KAAKgD,cAGPhD,KAAKiD,cAAcC,cAAc,IAAIC,YAAYP,OAOnDI,YAAA,WACEhD,KAAKiD,cAAcG,UAAUC,OAAOrD,KAAKsD,gBAG3CC,YAAA,WACEvD,KAAKiD,cAAcG,UAAUI,IAAIxD,KAAKsD,iDATxC,WACE,YAAYL,cAAcG,UAAUK,SAASzD,KAAKsD,4PAlBzB1C,gBACpBC,QAAU,CAAE,aACZ6C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,QCDNE,IAAAA,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,IACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY5E,EAHF0E,EAAE,IAIZG,sBAAuBF,KCf3B/D,SAASkE,iBAAiB,aAAc,WAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDtE,SAASuE,KAAKzB,UAAUI,IAAI"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{Controller as e}from"stimulus";function t(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}class i extends e{copy(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)}}i.targets=["source","input","button"];class r extends e{constructor(...e){super(...e),this.removeTrailingNewlines=e=>{e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",this.removeTrailingNewlines(e))},this.removeTrailingWhitespace=e=>{e.element.innerHTML.match(/ <\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",this.removeTrailingWhitespace(e)):e.element.innerHTML.match(/ <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",this.removeTrailingWhitespace(e))}}resetOnSuccess(e){e.detail.success&&e.target.reset()}stripTrix(){this.trixFieldTargets.forEach(e=>{this.removeTrailingNewlines(e.editor),this.removeTrailingWhitespace(e.editor),e.parentElement.querySelector("input").value=e.innerHTML})}submitOnReturn(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();let t=e.target.closest("form");this.submitForm(t)}}submitForm(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()}}r.targets=["trixField","scroll"];class s extends e{toggle(){const e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))}get isWrapperHidden(){return this.wrapperTarget.classList.contains(this.hiddenClass)}showWrapper(){this.wrapperTarget.classList.remove(this.hiddenClass)}hideWrapper(){this.wrapperTarget.classList.add(this.hiddenClass)}}s.targets=["wrapper"],s.classes=["hidden"],s.values={showEventName:String,hideEventName:String};const n=[[i,"clipboard_controller.js"],[r,"form_controller.js"],[s,"mobile_menu_controller.js"]].map(function(e){const i=e[0];return{identifier:t(e[1]),controllerConstructor:i}});document.addEventListener("turbo:load",()=>{navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")});export{n as controllerDefinitions};
|
|
2
|
-
//# sourceMappingURL=bullet-train.modern.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bullet-train.modern.js","sources":["../../../node_modules/@stimulus/webpack-helpers/dist/index.js","../../javascript/controllers/clipboard_controller.js","../../javascript/controllers/form_controller.js","../../javascript/controllers/mobile_menu_controller.js","../../javascript/controllers/index.js","../../javascript/electron/index.js"],"sourcesContent":["export function definitionsFromContext(context) {\n return context.keys()\n .map(function (key) { return definitionForModuleWithContextAndKey(context, key); })\n .filter(function (value) { return value; });\n}\nfunction definitionForModuleWithContextAndKey(context, key) {\n var identifier = identifierForContextKey(key);\n if (identifier) {\n return definitionForModuleAndIdentifier(context(key), identifier);\n }\n}\nfunction definitionForModuleAndIdentifier(module, identifier) {\n var controllerConstructor = module.default;\n if (typeof controllerConstructor == \"function\") {\n return { identifier: identifier, controllerConstructor: controllerConstructor };\n }\n}\nexport function identifierForContextKey(key) {\n var logicalName = (key.match(/^(?:\\.\\/)?(.+)(?:[_-]controller\\..+?)$/) || [])[1];\n if (logicalName) {\n return logicalName.replace(/_/g, \"-\").replace(/\\//g, \"--\");\n }\n}\n//# sourceMappingURL=index.js.map","import { Controller } from 'stimulus'\n\nexport default class extends Controller {\n static targets = ['source', 'input', 'button']\n\n copy() {\n this.inputTarget.value = this.sourceTarget.innerText\n this.inputTarget.select()\n document.execCommand('copy')\n this.buttonTarget.innerHTML = '<i id=\"copied\" class=\"fas fa-check w-4 h-4 block text-green-600\"></i>'\n setTimeout(function () {\n document.getElementById('copied').innerHTML = '<i class=\"far fa-copy w-4 h-4 block text-gray-600\"></i>'\n }, 1500)\n }\n}\n","import { Controller } from 'stimulus'\n\n// TODO Some of this feels really specific to the conversation messages form. Should we rename this controller?\nexport default class extends Controller {\n static targets = ['trixField', 'scroll']\n\n resetOnSuccess(e){\n if(e.detail.success) {\n e.target.reset();\n }\n }\n\n stripTrix(){\n this.trixFieldTargets.forEach(element => {\n this.removeTrailingNewlines(element.editor)\n this.removeTrailingWhitespace(element.editor)\n // When doing this as part of the form submission, Trix does not update the input element's value attribute fast enough.\n // In order to submit the stripped value, we manually update it here to fix the race condition\n element.parentElement.querySelector(\"input\").value = element.innerHTML\n })\n }\n\n submitOnReturn(e) {\n if((e.metaKey || e.ctrlKey) && e.keyCode == 13) {\n e.preventDefault();\n let form = e.target.closest(\"form\")\n this.submitForm(form)\n }\n }\n\n removeTrailingNewlines = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/<br><\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -10) + \"</div>\"\n this.removeTrailingNewlines(trixEditor)\n }\n }\n\n removeTrailingWhitespace = (trixEditor) => {\n if (trixEditor.element.innerHTML.match(/ <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -12) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n } else if (trixEditor.element.innerHTML.match(/ <\\/div>$/)) {\n trixEditor.element.innerHTML = trixEditor.element.innerHTML.slice(0, -13) + \"</div>\"\n this.removeTrailingWhitespace(trixEditor)\n }\n }\n\n submitForm(form) {\n // Right now, Safari and IE don't support the requestSubmit method which is required for Turbo\n // Doing form.submit() doesn't actually fire the submit event which Turbo needs\n if (form.requestSubmit) {\n form.requestSubmit()\n } else {\n form.querySelector(\"[type=submit]\").click()\n }\n }\n}\n","import { Controller } from \"stimulus\"\n\nexport default class extends Controller {\n static targets = [ \"wrapper\"]\n static classes = [ \"hidden\" ] // necessary because stimulus-reveal will mess with the [hidden] attribute on the wrapper\n static values = {\n showEventName: String,\n hideEventName: String,\n }\n\n toggle() {\n const eventName = this.isWrapperHidden? this.showEventNameValue: this.hideEventNameValue\n if (this.isWrapperHidden) {\n this.showWrapper()\n }\n \n this.wrapperTarget.dispatchEvent(new CustomEvent(eventName))\n }\n \n get isWrapperHidden() {\n return this.wrapperTarget.classList.contains(this.hiddenClass)\n }\n \n showWrapper() {\n this.wrapperTarget.classList.remove(this.hiddenClass)\n }\n \n hideWrapper() {\n this.wrapperTarget.classList.add(this.hiddenClass)\n }\n}","import { identifierForContextKey } from \"@stimulus/webpack-helpers\"\n\nimport ClipboardController from './clipboard_controller'\nimport FormController from './form_controller'\nimport MobileMenuController from './mobile_menu_controller'\n\nexport const controllerDefinitions = [\n [ClipboardController, 'clipboard_controller.js'],\n [FormController, 'form_controller.js'],\n [MobileMenuController, 'mobile_menu_controller.js'],\n].map(function(d) {\n const key = d[1]\n const controller = d[0]\n return {\n identifier: identifierForContextKey(key),\n controllerConstructor: controller\n }\n})\n","document.addEventListener(\"turbo:load\", () => {\n if (navigator.userAgent.toLocaleLowerCase().includes('electron')) {\n document.body.classList.add('electron')\n }\n})"],"names":["identifierForContextKey","key","logicalName","match","replace","Controller","copy","this","inputTarget","value","sourceTarget","innerText","select","document","execCommand","buttonTarget","innerHTML","setTimeout","getElementById","targets","removeTrailingNewlines","trixEditor","element","slice","removeTrailingWhitespace","resetOnSuccess","e","detail","success","target","reset","stripTrix","trixFieldTargets","forEach","editor","parentElement","querySelector","submitOnReturn","metaKey","ctrlKey","keyCode","preventDefault","form","closest","submitForm","requestSubmit","click","toggle","eventName","isWrapperHidden","showEventNameValue","hideEventNameValue","showWrapper","wrapperTarget","dispatchEvent","CustomEvent","classList","contains","hiddenClass","remove","hideWrapper","add","classes","values","showEventName","String","hideEventName","controllerDefinitions","ClipboardController","FormController","MobileMenuController","map","d","controller","identifier","controllerConstructor","addEventListener","navigator","userAgent","toLocaleLowerCase","includes","body"],"mappings":"sCAiBO,SAASA,EAAwBC,GACpC,IAAIC,GAAeD,EAAIE,MAAM,2CAA6C,IAAI,GAC9E,GAAID,EACA,OAAOA,EAAYE,QAAQ,KAAM,KAAKA,QAAQ,MAAO,sBClBhCC,EAG3BC,OACEC,KAAKC,YAAYC,MAAQF,KAAKG,aAAaC,UAC3CJ,KAAKC,YAAYI,SACjBC,SAASC,YAAY,QACrBP,KAAKQ,aAAaC,UAAY,wEAC9BC,WAAW,WACTJ,SAASK,eAAe,UAAUF,UAAY,2DAC7C,SATEG,QAAU,CAAC,SAAU,QAAS,0BCAVd,qCA2B3Be,uBAA0BC,IACpBA,EAAWC,QAAQN,UAAUb,MAAM,kBACrCkB,EAAWC,QAAQN,UAAYK,EAAWC,QAAQN,UAAUO,MAAM,GAAI,IAAM,SAC5EhB,KAAKa,uBAAuBC,UAIhCG,yBAA4BH,IACtBA,EAAWC,QAAQN,UAAUb,MAAM,mBACrCkB,EAAWC,QAAQN,UAAYK,EAAWC,QAAQN,UAAUO,MAAM,GAAI,IAAM,SAC5EhB,KAAKiB,yBAAyBH,IACrBA,EAAWC,QAAQN,UAAUb,MAAM,qBAC5CkB,EAAWC,QAAQN,UAAYK,EAAWC,QAAQN,UAAUO,MAAM,GAAI,IAAM,SAC5EhB,KAAKiB,yBAAyBH,KArClCI,eAAeC,GACVA,EAAEC,OAAOC,SACVF,EAAEG,OAAOC,QAIbC,YACExB,KAAKyB,iBAAiBC,QAAQX,IAC5Bf,KAAKa,uBAAuBE,EAAQY,QACpC3B,KAAKiB,yBAAyBF,EAAQY,QAGtCZ,EAAQa,cAAcC,cAAc,SAAS3B,MAAQa,EAAQN,YAIjEqB,eAAeX,GACb,IAAIA,EAAEY,SAAWZ,EAAEa,UAA0B,IAAbb,EAAEc,QAAe,CAC/Cd,EAAEe,iBACF,IAAIC,EAAOhB,EAAEG,OAAOc,QAAQ,QAC5BpC,KAAKqC,WAAWF,IAqBpBE,WAAWF,GAGLA,EAAKG,cACPH,EAAKG,gBAELH,EAAKN,cAAc,iBAAiBU,WAjDjC3B,QAAU,CAAC,YAAa,0BCFJd,EAQ3B0C,SACE,MAAMC,EAAYzC,KAAK0C,gBAAiB1C,KAAK2C,mBAAoB3C,KAAK4C,mBAClE5C,KAAK0C,iBACP1C,KAAK6C,cAGP7C,KAAK8C,cAAcC,cAAc,IAAIC,YAAYP,IAG/CC,sBACF,YAAYI,cAAcG,UAAUC,SAASlD,KAAKmD,aAGpDN,cACE7C,KAAK8C,cAAcG,UAAUG,OAAOpD,KAAKmD,aAG3CE,cACErD,KAAK8C,cAAcG,UAAUK,IAAItD,KAAKmD,gBAzBjCvC,QAAU,CAAE,aACZ2C,QAAU,CAAE,YACZC,OAAS,CACdC,cAAeC,OACfC,cAAeD,QCDNE,MAAAA,EAAwB,CACnC,CAACC,EAAqB,2BACtB,CAACC,EAAgB,sBACjB,CAACC,EAAsB,8BACvBC,IAAI,SAASC,GACb,MACMC,EAAaD,EAAE,GACrB,MAAO,CACLE,WAAY1E,EAHFwE,EAAE,IAIZG,sBAAuBF,KCf3B5D,SAAS+D,iBAAiB,aAAc,KAClCC,UAAUC,UAAUC,oBAAoBC,SAAS,aACnDnE,SAASoE,KAAKzB,UAAUK,IAAI"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("stimulus")):"function"==typeof define&&define.amd?define(["exports","stimulus"],t):t((e||self).bulletTrain={},e.stimulus)}(this,function(e,t){function r(e){var t=(e.match(/^(?:\.\/)?(.+)(?:[_-]controller\..+?)$/)||[])[1];if(t)return t.replace(/_/g,"-").replace(/\//g,"--")}function n(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,i(e,t)}function i(e,t){return i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},i(e,t)}var o=function(e){function t(){return e.apply(this,arguments)||this}return n(t,e),t.prototype.copy=function(){this.inputTarget.value=this.sourceTarget.innerText,this.inputTarget.select(),document.execCommand("copy"),this.buttonTarget.innerHTML='<i id="copied" class="fas fa-check w-4 h-4 block text-green-600"></i>',setTimeout(function(){document.getElementById("copied").innerHTML='<i class="far fa-copy w-4 h-4 block text-gray-600"></i>'},1500)},t}(t.Controller);o.targets=["source","input","button"];var s=function(e){function t(){for(var t,r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];return(t=e.call.apply(e,[this].concat(n))||this).removeTrailingNewlines=function(e){e.element.innerHTML.match(/<br><\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-10)+"</div>",t.removeTrailingNewlines(e))},t.removeTrailingWhitespace=function(e){e.element.innerHTML.match(/ <\/div>$/)?(e.element.innerHTML=e.element.innerHTML.slice(0,-12)+"</div>",t.removeTrailingWhitespace(e)):e.element.innerHTML.match(/ <\/div>$/)&&(e.element.innerHTML=e.element.innerHTML.slice(0,-13)+"</div>",t.removeTrailingWhitespace(e))},t}n(t,e);var r=t.prototype;return r.resetOnSuccess=function(e){e.detail.success&&e.target.reset()},r.stripTrix=function(){var e=this;this.trixFieldTargets.forEach(function(t){e.removeTrailingNewlines(t.editor),e.removeTrailingWhitespace(t.editor),t.parentElement.querySelector("input").value=t.innerHTML})},r.submitOnReturn=function(e){if((e.metaKey||e.ctrlKey)&&13==e.keyCode){e.preventDefault();var t=e.target.closest("form");this.submitForm(t)}},r.submitForm=function(e){e.requestSubmit?e.requestSubmit():e.querySelector("[type=submit]").click()},t}(t.Controller);s.targets=["trixField","scroll"];var a=function(e){function t(){return e.apply(this,arguments)||this}n(t,e);var r,i,o=t.prototype;return o.toggle=function(){var e=this.isWrapperHidden?this.showEventNameValue:this.hideEventNameValue;this.isWrapperHidden&&this.showWrapper(),this.wrapperTarget.dispatchEvent(new CustomEvent(e))},o.showWrapper=function(){this.wrapperTarget.classList.remove(this.hiddenClass)},o.hideWrapper=function(){this.wrapperTarget.classList.add(this.hiddenClass)},r=t,(i=[{key:"isWrapperHidden",get:function(){return this.wrapperTarget.classList.contains(this.hiddenClass)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(r.prototype,i),Object.defineProperty(r,"prototype",{writable:!1}),t}(t.Controller);a.targets=["wrapper"],a.classes=["hidden"],a.values={showEventName:String,hideEventName:String};var l=[[o,"clipboard_controller.js"],[s,"form_controller.js"],[a,"mobile_menu_controller.js"]].map(function(e){var t=e[0];return{identifier:r(e[1]),controllerConstructor:t}});document.addEventListener("turbo:load",function(){navigator.userAgent.toLocaleLowerCase().includes("electron")&&document.body.classList.add("electron")}),e.controllerDefinitions=l});
|
|
2
|
-
//# sourceMappingURL=bullet-train.umd.js.map
|