spina 2.8.0 → 2.8.1
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.
Potentially problematic release.
This version of spina might be problematic. Click here for more details.
- checksums.yaml +4 -4
 - data/app/models/concerns/spina/partable.rb +1 -1
 - data/app/models/spina/parts/attachment.rb +1 -1
 - data/app/models/spina/parts/base.rb +2 -1
 - data/app/views/spina/admin/parts/attachments/_form.html.erb +2 -1
 - data/app/views/spina/admin/parts/image_collections/_form.html.erb +1 -0
 - data/app/views/spina/admin/parts/images/_form.html.erb +1 -0
 - data/app/views/spina/admin/parts/lines/_form.html.erb +1 -0
 - data/app/views/spina/admin/parts/options/_form.html.erb +2 -1
 - data/app/views/spina/admin/parts/repeaters/_form.html.erb +1 -0
 - data/app/views/spina/admin/parts/texts/_form.html.erb +1 -0
 - data/lib/generators/spina/templates/config/initializers/themes/default.rb +1 -1
 - data/lib/generators/spina/templates/config/initializers/themes/demo.rb +2 -2
 - data/lib/spina/version.rb +1 -1
 - data/lib/tasks/tailwind.rake +2 -2
 - metadata +3 -3
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA256:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 0a33df1ad26733664c8c934c479127146e661c65b6fe1e891e9b781c7d939257
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: 5028f0dd43485690835a0b311c0b1d46140b0cd3127836cc6fb45cd654bb9a42
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 024007256c2f879a3153e82ae07bfa995177733f35c6456d9c7081b825d10a9bd98c3c8ac6efe8aa6150b2b581c4062737c875a9d44e797427a24026a0757b8b
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 2a8cf99db2e2c1f594a98d460c5a9c870d88c4edf8fc9dc996b4e0aea16fbd544a4a3530349afb2ad39565c78ff527bdf010c6ac91ee789262ef214349f1b806
         
     | 
| 
         @@ -10,7 +10,7 @@ module Spina 
     | 
|
| 
       10 
10 
     | 
    
         
             
                    part = find_part(attributes[:name]) || attributes[:part_type].constantize.new
         
     | 
| 
       11 
11 
     | 
    
         | 
| 
       12 
12 
     | 
    
         
             
                    # Copy all attributes to part
         
     | 
| 
       13 
     | 
    
         
            -
                    %w(name title options).each do |attribute|
         
     | 
| 
      
 13 
     | 
    
         
            +
                    %w(name title hint options).each do |attribute|
         
     | 
| 
       14 
14 
     | 
    
         
             
                      part.public_send("#{attribute}=", attributes[attribute.to_sym]) if part.respond_to?(attribute)
         
     | 
| 
       15 
15 
     | 
    
         
             
                    end
         
     | 
| 
       16 
16 
     | 
    
         | 
| 
         @@ -1,8 +1,9 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <div class="mt-6" data-controller="attachment-picker">
         
     | 
| 
       2 
2 
     | 
    
         
             
              <label for="price" class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
         
     | 
| 
      
 3 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       3 
4 
     | 
    
         | 
| 
       4 
5 
     | 
    
         
             
              <%= f.hidden_field :signed_blob_id, data: {attachment_picker_target: 'signedBlobId'} %>
         
     | 
| 
       5 
6 
     | 
    
         
             
              <%= f.hidden_field :filename, data: {attachment_picker_target: 'filename'} %>
         
     | 
| 
       6 
7 
     | 
    
         | 
| 
       7 
     | 
    
         
            -
              <%= f.select :attachment_id, Spina::Attachment.sorted.map{|attachment| [attachment.file&.filename, attachment.id, data: {signed_blob_id: attachment.file&.blob&.signed_id, filename: attachment.file&.filename}]}, {include_blank: t("spina.attachments.choose_attachment")}, {class: "form-select", data: {action: "attachment-picker#pick"}} %>
         
     | 
| 
      
 8 
     | 
    
         
            +
              <%= f.select :attachment_id, Spina::Attachment.sorted.map{|attachment| [attachment.file&.filename, attachment.id, data: {signed_blob_id: attachment.file&.blob&.signed_id, filename: attachment.file&.filename}]}, {include_blank: t("spina.attachments.choose_attachment")}, {class: "form-select mt-1", data: {action: "attachment-picker#pick"}} %>
         
     | 
| 
       8 
9 
     | 
    
         
             
            </div>
         
     | 
| 
         @@ -10,6 +10,7 @@ 
     | 
|
| 
       10 
10 
     | 
    
         
             
              <label class="block text-sm leading-5 font-medium text-gray-700">
         
     | 
| 
       11 
11 
     | 
    
         
             
                <%= f.object.title %>
         
     | 
| 
       12 
12 
     | 
    
         
             
              </label>
         
     | 
| 
      
 13 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       13 
14 
     | 
    
         | 
| 
       14 
15 
     | 
    
         
             
              <div class="flex items-start mt-1">
         
     | 
| 
       15 
16 
     | 
    
         
             
                <div class="flex items-center" data-image-collection-target="collection">
         
     | 
| 
         @@ -2,6 +2,7 @@ 
     | 
|
| 
       2 
2 
     | 
    
         
             
              <label class="block text-sm leading-5 font-medium text-gray-700">
         
     | 
| 
       3 
3 
     | 
    
         
             
                <%= f.object.title %>
         
     | 
| 
       4 
4 
     | 
    
         
             
              </label>
         
     | 
| 
      
 5 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
       6 
7 
     | 
    
         
             
              <%= f.hidden_field :signed_blob_id, data: {media_picker_target: "signedBlobId"} %>
         
     | 
| 
       7 
8 
     | 
    
         
             
              <%= f.hidden_field :filename, data: {media_picker_target: "filename"} %>
         
     | 
| 
         @@ -1,5 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <div class="mt-6">
         
     | 
| 
       2 
2 
     | 
    
         
             
              <label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
         
     | 
| 
      
 3 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       3 
4 
     | 
    
         
             
              <div class="mt-1">
         
     | 
| 
       4 
5 
     | 
    
         
             
                <%= f.text_field :content, class: "form-input block w-full max-w-5xl sm:text-sm sm:leading-5" %>
         
     | 
| 
       5 
6 
     | 
    
         
             
              </div>
         
     | 
| 
         @@ -1,5 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <div class="mt-6">
         
     | 
| 
       2 
2 
     | 
    
         
             
              <label for="price" class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
         
     | 
| 
      
 3 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       3 
4 
     | 
    
         | 
| 
       4 
     | 
    
         
            -
              <%= f.select :value, f.object.options, {include_blank: t("spina.options.choose_option")}, class: "form-select" %>
         
     | 
| 
      
 5 
     | 
    
         
            +
              <%= f.select :value, f.object.options, {include_blank: t("spina.options.choose_option")}, class: "form-select mt-1" %>
         
     | 
| 
       5 
6 
     | 
    
         
             
            </div>
         
     | 
| 
         @@ -1,5 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <div class="mt-6" data-controller="repeater">
         
     | 
| 
       2 
2 
     | 
    
         
             
              <label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
         
     | 
| 
      
 3 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       3 
4 
     | 
    
         | 
| 
       4 
5 
     | 
    
         
             
              <div class="-mt-4 flex flex-col md:flex-row" data-controller="tabs" data-tabs-active="bg-spina-dark bg-opacity-10 text-gray-900" data-tabs-inactive="text-gray-500">
         
     | 
| 
       5 
6 
     | 
    
         
             
                <div class="md:w-64 md:pr-6">
         
     | 
| 
         @@ -1,5 +1,6 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            <div class="mt-6" data-controller="unique-id" data-unique-id="<%= f.object.object_id %>">
         
     | 
| 
       2 
2 
     | 
    
         
             
              <label class="block text-sm leading-5 font-medium text-gray-700"><%= f.object.title %></label>
         
     | 
| 
      
 3 
     | 
    
         
            +
              <div class="text-gray-400 text-sm"><%= f.object.hint %></div>
         
     | 
| 
       3 
4 
     | 
    
         
             
              <div class="mt-1 relative">
         
     | 
| 
       4 
5 
     | 
    
         
             
                <%= f.hidden_field :content, id: "#{f.object.object_id}_input" %>
         
     | 
| 
       5 
6 
     | 
    
         | 
| 
         @@ -21,7 +21,7 @@ Spina::Theme.register do |theme| 
     | 
|
| 
       21 
21 
     | 
    
         
             
              # - Option
         
     | 
| 
       22 
22 
     | 
    
         
             
              # - Repeater
         
     | 
| 
       23 
23 
     | 
    
         
             
              theme.parts = [
         
     | 
| 
       24 
     | 
    
         
            -
                {name: 'text',  title: "Body", part_type: "Spina::Parts::Text"}
         
     | 
| 
      
 24 
     | 
    
         
            +
                {name: 'text',  title: "Body", hint: "Your main content", part_type: "Spina::Parts::Text"}
         
     | 
| 
       25 
25 
     | 
    
         
             
              ]
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
              # View templates
         
     | 
| 
         @@ -23,10 +23,10 @@ Spina::Theme.register do |theme| 
     | 
|
| 
       23 
23 
     | 
    
         
             
              theme.parts = [
         
     | 
| 
       24 
24 
     | 
    
         
             
                {name: 'repeater', title: "Repeater", part_type: "Spina::Parts::Repeater", parts: %w(line image headline)}, 
         
     | 
| 
       25 
25 
     | 
    
         
             
                {name: 'line', title: "Line", part_type: "Spina::Parts::Line"}, 
         
     | 
| 
       26 
     | 
    
         
            -
                {name: 'body', title: "Body", part_type: "Spina::Parts::Text"}, 
         
     | 
| 
      
 26 
     | 
    
         
            +
                {name: 'body', title: "Body", hint: "Your content", part_type: "Spina::Parts::Text"}, 
         
     | 
| 
       27 
27 
     | 
    
         
             
                {name: "image_collection", title: "Image collection", part_type: "Spina::Parts::ImageCollection"},
         
     | 
| 
       28 
28 
     | 
    
         
             
                {name: 'image', title: "Image", part_type: "Spina::Parts::Image"}, 
         
     | 
| 
       29 
     | 
    
         
            -
                {name: 'headline', title: "Headline", part_type: "Spina::Parts::Line"}, 
         
     | 
| 
      
 29 
     | 
    
         
            +
                {name: 'headline', title: "Headline", hint: "Used in the header", part_type: "Spina::Parts::Line"}, 
         
     | 
| 
       30 
30 
     | 
    
         
             
                {name: 'footer', title: "Footer", part_type: "Spina::Parts::Text"}
         
     | 
| 
       31 
31 
     | 
    
         
             
              ]
         
     | 
| 
       32 
32 
     | 
    
         | 
    
        data/lib/spina/version.rb
    CHANGED
    
    
    
        data/lib/tasks/tailwind.rake
    CHANGED
    
    | 
         @@ -5,12 +5,12 @@ SPINA_TAILWIND_COMPILE_COMMAND = "#{Tailwindcss::Engine.root.join("exe/tailwindc 
     | 
|
| 
       5 
5 
     | 
    
         
             
            namespace :spina do
         
     | 
| 
       6 
6 
     | 
    
         
             
              namespace :tailwind do 
         
     | 
| 
       7 
7 
     | 
    
         
             
                desc "Build your Tailwind CSS"
         
     | 
| 
       8 
     | 
    
         
            -
                task : 
     | 
| 
      
 8 
     | 
    
         
            +
                task build: :environment do
         
     | 
| 
       9 
9 
     | 
    
         
             
                  Rails::Generators.invoke("spina:tailwind_config", ["--force"])
         
     | 
| 
       10 
10 
     | 
    
         
             
                  system SPINA_TAILWIND_COMPILE_COMMAND
         
     | 
| 
       11 
11 
     | 
    
         
             
                end
         
     | 
| 
       12 
12 
     | 
    
         | 
| 
       13 
     | 
    
         
            -
                task : 
     | 
| 
      
 13 
     | 
    
         
            +
                task watch: :environment do
         
     | 
| 
       14 
14 
     | 
    
         
             
                  Rails::Generators.invoke("spina:tailwind_config", ["--force"])
         
     | 
| 
       15 
15 
     | 
    
         
             
                  system "#{SPINA_TAILWIND_COMPILE_COMMAND} -w"
         
     | 
| 
       16 
16 
     | 
    
         
             
                end
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: spina
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 2.8. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 2.8.1
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Bram Jetten
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2022-01- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2022-01-29 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: rails
         
     | 
| 
         @@ -1174,7 +1174,7 @@ metadata: 
     | 
|
| 
       1174 
1174 
     | 
    
         
             
              homepage_uri: https://www.spinacms.com
         
     | 
| 
       1175 
1175 
     | 
    
         
             
              bug_tracker_uri: https://github.com/SpinaCMS/Spina/issues
         
     | 
| 
       1176 
1176 
     | 
    
         
             
              documentation_uri: https://www.spinacms.com/docs
         
     | 
| 
       1177 
     | 
    
         
            -
              changelog_uri: https://github.com/SpinaCMS/Spina/blob/ 
     | 
| 
      
 1177 
     | 
    
         
            +
              changelog_uri: https://github.com/SpinaCMS/Spina/blob/main/CHANGELOG.md
         
     | 
| 
       1178 
1178 
     | 
    
         
             
              source_code_uri: https://github.com/SpinaCMS/Spina
         
     | 
| 
       1179 
1179 
     | 
    
         
             
            post_install_message: 
         
     | 
| 
       1180 
1180 
     | 
    
         
             
            rdoc_options: []
         
     |