bullet_train-themes 1.6.38 → 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: 0d036819f37f9789169076a640dea2a48aa359d89b9da4761b21c88d8821bd23
4
- data.tar.gz: ebf6e916af7b1d33c4677257ca8c8952960266ef08bfc9e13ccf644d9c5f567d
3
+ metadata.gz: b6e56d92ce9cb17c2287a03b49e00355b1428c2f6d7224e04e0cf9b4683cf709
4
+ data.tar.gz: ca2781cdf07fc92979dd3414359fdfbe3c7ece80e4291da52c2d48bf8668ea60
5
5
  SHA512:
6
- metadata.gz: fb947112389d96417169181f642ab1d1753d8bffb29a87b0e5a24d4474efba1bb13bb10dc700996bbd33745ed305d3c560d606a114e9fece9cb976579ae4ab0e
7
- data.tar.gz: f35ac27fec13323de44b02cf83d82c07bf6e873b5b830e404d9311adb49be736c75a2f33b7e92f39d8efc6bfd96b4b37b978230b17ea824729ca3555fc89c9e0
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.38"
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.38
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-20 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