satis 2.1.54 → 2.1.56

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: 684c749b28e6dc46822dddec9f3fd51b8be43ebe8b9664e082756c0a39a0e7b7
4
+ data.tar.gz: 31dabf84980bc8596ce6ecd5426a10412df686fd8e50a7f0c351b0e784539472
5
5
  SHA512:
6
- metadata.gz: 609e9ac871cbfb81c23b4bad5a60822671d1b4e26132fe2ac219ac6185ef459e7a69a5ca8f28ece3eb911588e505d93fd0206bbf0f07f338d20a0783f2f6a54e
7
- data.tar.gz: b572b8fcfb7ee048e40b729b3f56fa5f3b61cd97515b9ddce60c35c1a5a77f01544ca4b53f5f0fdc2a5fb335b3fc2969b02d71997f2d325b080aed3da7ca11b6
6
+ metadata.gz: 6464a24ce104b960cd469fb81eaa4ae848b42f7b4f39417569a50150714bbdd71fd6bd531d2feb01afb991ce0860980db082915c11deb6ae9b93906362752293
7
+ data.tar.gz: 965894517e1e1454aa5cfb1f2354ecdf94aa8c8c310902746413856aacd2a4e9888694a15badc58a825a609d374b7742cef0af97afca24268cb6602db807b981
@@ -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
@@ -9,10 +9,9 @@ export default class SignatureComponentController extends ApplicationController
9
9
  async connect() {
10
10
  this.signaturePad = new SignaturePad(this.canvasTarget)
11
11
  if (this.hasUrlValue) {
12
- let blob = await fetch(this.urlValue)
12
+ let blob = await fetch(this.urlValue, { cache: "no-store" })
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.56"
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.56
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