satis 2.1.54 → 2.1.55

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: 8e4087c76633f9b2a02fc083fd95c60a4a28d9677dbe44ee11735e4fa0e29810
4
- data.tar.gz: 2ab23a72ad341b331ef4c8ea1fc1780d46e32d1657194a4a8d1fb7ca0193db37
3
+ metadata.gz: 89a9eff8bce58f2865827f0459ec2f8e05da5e6d46ea97fb8a56e56740cb5a0c
4
+ data.tar.gz: 7ea00bb6b3abf1b5e095f1ce92a58f5e400bc5571894992aa2ab06650af5feba
5
5
  SHA512:
6
- metadata.gz: 609e9ac871cbfb81c23b4bad5a60822671d1b4e26132fe2ac219ac6185ef459e7a69a5ca8f28ece3eb911588e505d93fd0206bbf0f07f338d20a0783f2f6a54e
7
- data.tar.gz: b572b8fcfb7ee048e40b729b3f56fa5f3b61cd97515b9ddce60c35c1a5a77f01544ca4b53f5f0fdc2a5fb335b3fc2969b02d71997f2d325b080aed3da7ca11b6
6
+ metadata.gz: 27c4dd12d202d26da9a3537fc20a8f94bf19cc9d1f7a7aec2fe2c0d40a7550d9bc2c0325d212713c3301364a958ff80d9a345a0732eff8e4a09afe853f26054f
7
+ data.tar.gz: bcd8a0c9175f95c3d435d97cfcc0dffe3bba46486854e13cd866883b6695d151cac0f529f33ab276429e6d84ef0754d86b91885b227dcace95d3c4d3650f4522
@@ -1,8 +1,8 @@
1
1
  div data-controller="satis-signature" data-satis-signature-url-value=(form.object.send(attribute).attached? ? helpers.main_app.url_for(form.object.send(attribute)) : nil)
2
- canvas.border-solid.border.rounded-md data-satis-signature-target="canvas" data-satis-signature-action="change->satis-signature#update" width="600" height="200"
2
+ canvas.border-solid.border.rounded-md data-satis-signature-target="canvas" data-satis-signature-action="change->satis-signature#update" width=(options[:width] || 400) height=(options[:height] || 200)
3
3
  .button
4
4
  i.fal.fa-trash data-action='click->satis-signature#clear' class='cursor-pointer'
5
5
  |<
6
6
  .button
7
7
  i.fal.fa-undo data-action='click->satis-signature#undo' class='cursor-pointer'
8
- = form.file_field :signature, data: { "satis-signature-target" => 'file' }, class: 'hidden'
8
+ = form.file_field attribute, data: { "satis-signature-target" => 'file' }, class: 'hidden'
@@ -1,13 +1,16 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # Add this to your application.rb
4
+ # ActiveStorage::Engine.config.active_storage.content_types_to_serve_as_binary.delete("image/svg+xml")
3
5
  module Satis
4
6
  module Signature
5
7
  class Component < ViewComponent::Base
6
- attr_reader :url, :form, :attribute, :title, :options
8
+ attr_reader :url, :form, :attribute, :options
7
9
 
8
10
  def initialize(form:, attribute:, **options, &block)
9
11
  @form = form
10
12
  @attribute = attribute
13
+ @options = options
11
14
  end
12
15
  end
13
16
  end
@@ -12,7 +12,6 @@ export default class SignatureComponentController extends ApplicationController
12
12
  let blob = await fetch(this.urlValue)
13
13
  .then(r => r.blob())
14
14
 
15
-
16
15
  let dataUrl = await new Promise(resolve => {
17
16
  let reader = new FileReader()
18
17
  reader.onload = () => resolve(reader.result)
data/lib/satis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Satis
2
- VERSION = "2.1.54"
2
+ VERSION = "2.1.55"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: satis
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.54
4
+ version: 2.1.55
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tom de Grunt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-02-04 00:00:00.000000000 Z
11
+ date: 2025-02-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser