bullet_train-themes 1.6.37 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b7896179e2538f383a56c465cd6e4b3a0917b21e18db6126923ad0c1862e8d05
4
- data.tar.gz: b5694930e5dbe6da9b41fd41f6a7bf86242ed7b5938c1e90bbdb7a5e52d6723d
3
+ metadata.gz: b6e56d92ce9cb17c2287a03b49e00355b1428c2f6d7224e04e0cf9b4683cf709
4
+ data.tar.gz: ca2781cdf07fc92979dd3414359fdfbe3c7ece80e4291da52c2d48bf8668ea60
5
5
  SHA512:
6
- metadata.gz: '019c58fe043655f2ea4e546db4b9928ee12622e2630651a6096b31f0ea44e867a1f8d58eeeaa307062fa4e8604f87b2f5e32f612312f4047203834e4fe266d7b'
7
- data.tar.gz: 1d9d90e197e047292f45d0a6c8c2c18378f629157ef0fe7c8a80d0bbafe929860d0fcbf2417cc7115089556d05c38800f44bcc67d937d76a0104af82837cf238
6
+ metadata.gz: 4e062ce511f5edaa75e42d1bff78996c2646b4c5b384aa7e3b4a91cfbf04213f2b474d9a0162b02e91c0bfe6b1fbd670c82225982e2f0a77cd2d52b6927ea6f8
7
+ data.tar.gz: 890d0f162b865abb20bef7e8f5baf0593ebbb8159fcceedc36b976bf3ead31da12c762c94f27a6e6b054def1308c6621ccafa92cd39aca7f8fb08c4932c7a14e
@@ -9,9 +9,10 @@ stimulus_controller = 'fields--ckeditor'
9
9
 
10
10
  form ||= current_fields_form
11
11
  options ||= {}
12
- options = options.merge({ data: {"#{stimulus_controller}-target": 'field' }})
13
12
  other_options ||= {}
14
13
 
14
+ # TODO: Remove this if it's unneeded.
15
+ options = options.merge({ data: {"#{stimulus_controller}-target": 'field' }})
15
16
  %>
16
17
 
17
18
  <%= render 'shared/fields/field', form: form, method: method, options: options, other_options: other_options do %>
@@ -6,6 +6,7 @@ options ||= {}
6
6
 
7
7
  strong_passwords = Object.const_defined?("BulletTrain::Configuration") ? BulletTrain::Configuration.strong_passwords : true
8
8
 
9
+ # TODO: This should be `bt_options`
9
10
  if options[:show_strength_indicator] && strong_passwords
10
11
  options = options.merge({ data: {"action": "keyup->fields--password#estimateStrength" }})
11
12
  end
@@ -15,6 +16,8 @@ other_options ||= {}
15
16
 
16
17
  <div data-controller="<%= stimulus_controller %>">
17
18
  <%= render 'shared/fields/field', form: form, method: method, helper: :password_field, options: options, other_options: other_options %>
19
+
20
+ <%# TODO: This should be `bt_options` %>
18
21
  <% if options[:show_strength_indicator] %>
19
22
  <% # TODO This is the wrong place to define this kind of style, but I couldn't make this work in the `:help` content buffer. %>
20
23
  <div data-<%= stimulus_controller %>-target="strengthIndicator" class="hidden mt-1.5 text-xs text-red-500"></div>
@@ -3,9 +3,9 @@ stimulus_controller = 'fields--phone'
3
3
 
4
4
  form ||= current_fields_form
5
5
  options ||= {}
6
- options = options.merge({type: 'tel', data: {method: method, "#{stimulus_controller}-target": 'field' }})
7
6
  other_options ||= {}
8
7
 
8
+ options = options.merge({type: 'tel', data: {method: method, "#{stimulus_controller}-target": 'field' }})
9
9
  %>
10
10
 
11
11
  <div data-controller="<%= stimulus_controller %>">
@@ -6,14 +6,16 @@ options ||= {}
6
6
  other_options ||= {}
7
7
  select2_options ||= nil
8
8
  html_options ||= {}
9
+ choices_url ||= nil
10
+
9
11
  html_options[:id] ||= form.field_id(method)
10
12
  html_options[:class] = "form-control select2 #{html_options[:class]}".strip
11
- choices_url ||= nil
13
+
12
14
  if choices_url.nil?
13
15
  choices ||= options_for(form, method)&.invert
14
16
  else
15
17
  # If we have a choices_url, we're going to lazy load the choices. However, we still want to show the currently selected option.
16
- method_without_id = method.to_s.gsub("_id", "")
18
+ method_without_id = method.to_s.gsub("_id", "") # TODO: We should use /_id$/.
17
19
  if current_selection = form.object.send(method_without_id)
18
20
  choices = [[current_selection.label_string, current_selection.id]]
19
21
  else
@@ -24,6 +26,8 @@ end
24
26
  other_options[:use_browser_time_zone] = true if other_options[:use_browser_time_zone].nil?
25
27
  use_browser_time_zone = other_options[:use_browser_time_zone]
26
28
 
29
+ # TODO: Change name for `wrapper_options`, maybe to simply `wrapper`.
30
+ # This seems to be internal, so we shouldn't need to write docs or a deprecation message for it.
27
31
  wrapper_options ||= {}
28
32
  wrapper_options[:data] ||= {}
29
33
  wrapper_options[:data][:controller] ||= ""
@@ -2,6 +2,8 @@
2
2
  form ||= current_fields_form
3
3
  labels = labels_for(form, method)
4
4
  options ||= {}
5
+ other_options ||= {}
6
+
5
7
  options[:class] = "formatted_content trix-content #{options[:class]}"
6
8
  options[:placeholder] ||= labels.placeholder if labels.placeholder
7
9
  options[:data] ||= {}
@@ -16,7 +18,6 @@ options[:data][:topics] ||= []
16
18
  # current_team.scaffolding_things.map { |scaffolding_thing|
17
19
  # {key: scaffolding_thing.name, value: scaffolding_thing.id, protocol: 'bullettrain', model: 'scaffolding/things', id: scaffolding_thing.id, label: scaffolding_thing.name, photo: photo_for(scaffolding_thing)}
18
20
  # }.to_json
19
- other_options ||= {}
20
21
  %>
21
22
 
22
23
  <div class="<%= 'trix-hide-toolbar' if other_options[:hide_toolbar] %>">
@@ -1,5 +1,5 @@
1
1
  module BulletTrain
2
2
  module Themes
3
- VERSION = "1.6.37"
3
+ VERSION = "1.7.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bullet_train-themes
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.37
4
+ version: 1.7.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: 2024-03-11 00:00:00.000000000 Z
11
+ date: 2024-03-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: standard