satis 2.1.54 → 2.1.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 684c749b28e6dc46822dddec9f3fd51b8be43ebe8b9664e082756c0a39a0e7b7
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 31dabf84980bc8596ce6ecd5426a10412df686fd8e50a7f0c351b0e784539472
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 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= 
     | 
| 
      
 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  
     | 
| 
      
 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, : 
     | 
| 
      
 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
    
    
    
        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. 
     | 
| 
      
 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- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2025-02-05 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: browser
         
     |