polaris_view_components 0.13.4 → 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: b7d052a6fa246f0e105b8b14d20eaf63e9026e41d62914e98142319cbb369d7b
4
- data.tar.gz: db839814e647f792b4bbce8de63ef599bec70865750e5a2fefb51e4aacc875fc
3
+ metadata.gz: 698b7a02b189512d9a813ea75ba8ed484eea039957a756c302716e8344d4d303
4
+ data.tar.gz: a5ce311d26cf0f89c07e3c3e04ac184a854b52029e95c387fcf1c74dd93cfec0
5
5
  SHA512:
6
- metadata.gz: fb725f2d852a297e88d3cb5eb42be10e4c19045b8ca7392f5263a233b90a43ba2ec2bcac6c73b7ad2a593dba3e746f610780f59aab65e85a25ca76c31f6175ad
7
- data.tar.gz: 3509e930ba377b466ac97cf13e12386ae1495ae80dd61ff65a1043e0ce5076a627e72bae003d6e9102e5c13d90312dcdac8335a891fe592acb5d9048cc605cd9
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.4"
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.4
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-24 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
@@ -32,6 +32,9 @@ dependencies:
32
32
  - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 2.0.0
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: 3.0.0
35
38
  type: :runtime
36
39
  prerelease: false
37
40
  version_requirements: !ruby/object:Gem::Requirement
@@ -39,6 +42,9 @@ dependencies:
39
42
  - - ">="
40
43
  - !ruby/object:Gem::Version
41
44
  version: 2.0.0
45
+ - - "<"
46
+ - !ruby/object:Gem::Version
47
+ version: 3.0.0
42
48
  - !ruby/object:Gem::Dependency
43
49
  name: capybara
44
50
  requirement: !ruby/object:Gem::Requirement