polaris_view_components 0.13.5 → 0.13.6

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: a730ab674aafb0d5e8b04d918ef88c417561b7d767083a5a66e5e92bb8cd9c65
4
- data.tar.gz: e68647fbfa2cca7f989c15f729bc9e415b9ff56ae6bf15e54372f181e79b503e
3
+ metadata.gz: 698b7a02b189512d9a813ea75ba8ed484eea039957a756c302716e8344d4d303
4
+ data.tar.gz: a5ce311d26cf0f89c07e3c3e04ac184a854b52029e95c387fcf1c74dd93cfec0
5
5
  SHA512:
6
- metadata.gz: b82fa6bfb1b8e44de4560c2285cb747ecd3216645e289b6776fd9b60ba7e6b1710d93f1e0c2f1fa3e7c66a24298c18b182b8e8655d8f6409fa03a117ae061dff
7
- data.tar.gz: 55290b4196b73cf0c09e5382c245409870a12d726c8d7bb37cf517211fb42f68cab0d146da094c6354181a28236af23b1b44ca889e31e6faf7cf623afbd2a1c2
6
+ metadata.gz: 65503522d88e0bb5e94bd551c7994295564d66ee02b9d3b7bbcd887d8834e5d458441fee533ed1d03760f188dac129099877ef5e86aa8601ef6fe60699f3bb55
7
+ data.tar.gz: e8f8299e79e132f66d6a9df2797b9d174222c0ec73cc6b4d87660954cfb664f4e73299d9709914d54661a24ed741c477363f45eae5b9681cef3d067d335a56f7
@@ -36,7 +36,8 @@ export default class extends Controller {
36
36
  if (!this.multipleValue) {
37
37
  this.popoverController.forceHide()
38
38
  this.inputTarget.value = label
39
- this.hiddenInputTarget.value = input.value
39
+ if (this.hasHiddenInputTarget)
40
+ this.hiddenInputTarget.value = input.value
40
41
  }
41
42
  }
42
43
 
@@ -207,7 +207,7 @@ class Autocomplete extends Controller {
207
207
  if (!this.multipleValue) {
208
208
  this.popoverController.forceHide();
209
209
  this.inputTarget.value = label;
210
- this.hiddenInputTarget.value = input.value;
210
+ if (this.hasHiddenInputTarget) this.hiddenInputTarget.value = input.value;
211
211
  }
212
212
  }
213
213
  onInputChange=debounce$1((() => {
@@ -26,12 +26,14 @@ module Polaris
26
26
  url: nil,
27
27
  name: nil,
28
28
  selected: [],
29
+ popover_arguments: {},
29
30
  **system_arguments
30
31
  )
31
32
  @multiple = multiple
32
33
  @url = url
33
34
  @name = name
34
35
  @selected = selected
36
+ @popover_arguments = popover_arguments
35
37
  @system_arguments = system_arguments
36
38
  end
37
39
 
@@ -53,10 +55,11 @@ module Polaris
53
55
  alignment: :left,
54
56
  full_width: true,
55
57
  inline: false,
56
- wrapper_arguments: {
57
- data: {polaris_autocomplete_target: "popover"}
58
- }
59
- }
58
+ wrapper_arguments: {}
59
+ }.deep_merge(@popover_arguments).tap do |opts|
60
+ opts[:wrapper_arguments][:data] ||= {}
61
+ prepend_option(opts[:wrapper_arguments][:data], :polaris_autocomplete_target, "popover")
62
+ end
60
63
  end
61
64
 
62
65
  def option_list_arguments
@@ -31,7 +31,7 @@ module Polaris
31
31
  def call
32
32
  render(Polaris::BaseComponent.new(**@system_arguments)) do
33
33
  safe_join [
34
- content.strip.html_safe,
34
+ content&.strip&.html_safe,
35
35
  (external_icon if @external)
36
36
  ].compact
37
37
  end
@@ -1,5 +1,5 @@
1
1
  module Polaris
2
2
  module ViewComponents
3
- VERSION = "0.13.5"
3
+ VERSION = "0.13.6"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: polaris_view_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.5
4
+ version: 0.13.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Gamble
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-04-25 00:00:00.000000000 Z
12
+ date: 2023-05-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails