editmode 1.7.0.pre.2 → 1.8.1

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: 639a7a79d9adcdeac5e17b953350f0394b382fcc814be7d3f90e876e73ee4386
4
- data.tar.gz: fa62f7b43894da4c3cb00bb82061b110d0327d8459c55924e9240be99a920bce
3
+ metadata.gz: fb4e665ed5f5d15a4ced4b1995553f6f52f1da060d008901c14e7b009d4bfd7b
4
+ data.tar.gz: eabc2ebe2ddee8c496ce29195a972f81ca4e251b082c0515c66937ef3c40588b
5
5
  SHA512:
6
- metadata.gz: c71fc8c8bf0f9346788e62f3e36506861ce0d479a10662cd17be36d32cda9ec4ffc39372efb2f2c931731eb116b977c2fc4a03f84a36854ee4fee0a892453a3a
7
- data.tar.gz: f397df0a103752539063d9019e445b57efa8431de7734472392285e6b3681c114b4549918e138cbf442cfcd578e2ab2b9eec4921401d26c662a36b0cbb57b23a
6
+ metadata.gz: 215828a7449625ef0882aa2ae144b9e6377c7b270c27148868d215e8d66a4bf12787ce2f92b16774a926d64ccb8bba50dd1cae163fb71e3077d0e1903090025a
7
+ data.tar.gz: 70b071a582578c1d6964c16e2d69971cb16ed8768bae72f3a06532411f74a512a2b1421dd298c1d5d3f62ddbce5dd097ae2c352eff524c3025a8467adb895e36
data/Gemfile CHANGED
@@ -2,5 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in chunks.gemspec
4
4
  gem 'pry-rails'
5
- gem 'rails', '~> 5.2.0'
5
+ gem 'rails', '6.0.3'
6
6
  gemspec
@@ -63,27 +63,29 @@ module Editmode
63
63
  end
64
64
 
65
65
  if chunks.any?
66
- content_tag :div, class: "chunks-collection-wrapper #{parent_class}", data: {chunk_collection_identifier: collection_identifier, chunk_tags: tags.join("|")} do
66
+ return content_tag :div, class: "chunks-collection-wrapper #{parent_class}", data: {chunk_collection_identifier: collection_identifier, chunk_tags: tags.join("|")} do
67
67
  chunks.each_with_index do |chunk, index|
68
68
  @custom_field_chunk = chunk
69
- concat(content_tag(:div, class: "chunks-collection-item--wrapper #{item_class}") do
70
- yield(@custom_field_chunk, index)
71
- end)
69
+ concat(
70
+ content_tag(:div, class: "chunks-collection-item--wrapper #{item_class}") do
71
+ yield(@custom_field_chunk, index)
72
+ end
73
+ )
72
74
  end
73
-
75
+
74
76
  # Placeholder element for new collection item
75
77
  @custom_field_chunk = chunks.first.merge!({placeholder: true})
76
- concat(content_tag(:template, class: "chunks-hide chunks-col-placeholder-wrapper") do
77
- yield(@custom_field_chunk)
78
+ concat(content_tag("em-template", class: "chunks-col-placeholder-wrapper", style: "display: none") do
79
+ yield(@custom_field_chunk, 0)
78
80
  end)
79
81
  end
80
82
  else
81
- content_tag(:span, "&nbsp".html_safe)
83
+ return content_tag(:span, "&nbsp".html_safe)
82
84
  end
83
85
  end
84
86
  rescue => error
85
87
  puts error
86
- return []
88
+ return ""
87
89
  end
88
90
  end
89
91
  alias_method :c, :chunk_collection
@@ -198,7 +200,7 @@ module Editmode
198
200
  options[:variable_fallbacks] = @custom_field_chunk["variable_fallbacks"] || {}
199
201
  options[:variable_values] = options[:variables] || {}
200
202
 
201
- chunk_field_value(@custom_field_chunk, field_name, options)
203
+ chunk_field_value(@custom_field_chunk, field_name, **options)
202
204
  end
203
205
  alias_method :F, :render_custom_field
204
206
 
@@ -23,7 +23,25 @@ module Editmode
23
23
 
24
24
  def watermark_tag
25
25
  if has_watermark
26
- '<div style="z-index: 9999; bottom: 8px; right: 8px; position: fixed; opacity: 1; display: flex; align-items: center; background: rgba(255, 255, 255, 0.9); cursor: pointer; border-radius: 5px; padding: 2px 5px 2px 2px; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"><svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" viewBox="0 0 548 532" version="1.1" fill="currentColor"><g id="Page-2" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g id="Group-2-Copy" fill="#02164B" fill-rule="nonzero"><path d="M355.57238,93.227099 C421.07938,126.760445 463.228656,200.366589 458.662484,275.197013 C456.789183,321.18219 437.646387,365.465318 406.824729,398.879222 C371.729602,436.503458 321.735878,458.271766 270.922584,458.988418 C203.22031,459.764791 137.596229,421.453764 104.754918,360.956382 C83.2997657,322.496052 75.4553171,276.928922 82.5387371,233.302725 C89.0952911,193.767417 107.828303,156.501508 135.840009,128.343052 C167.861751,95.3770553 211.620895,75.6989829 256.902096,72.4143274 C290.88495,70.1150686 325.248318,77.4308922 355.57238,93.227099 Z M302.597364,108.707879 C244.580186,94.7144282 181.478422,121.295874 147.91428,172.136709 C125.753716,204.951046 116.495656,247.175826 123.079165,286.681355 C127.575938,318.48743 142.800303,348.796389 164.461226,371.680876 C195.556552,404.281339 240.406711,421.818983 284.492713,417.297082 C306.976574,415.738859 326.903446,407.153357 347.094835,397.529041 C333.927816,397.406827 321.113485,400.462166 307.975856,399.881651 C293.691992,399.33169 279.114221,397.284614 265.565123,392.487732 C232.823919,381.213532 204.168018,358.573473 185.916413,328.020087 C170.074843,302.721883 162.668395,271.465768 167.841152,241.52345 C172.896347,214.850343 187.297774,190.224314 208.429665,174.061573 C244.874093,144.791428 299.77586,145.463603 335.750037,175.344815 C370.842495,203.117843 385.273313,253.25595 370.783713,296.550099 C362.524936,322.978778 344.831754,343.357887 322.553628,358.145726 C342.069031,355.12094 360.261854,348.643622 375.985862,336.025074 C406.7285,312.315646 423.275446,271.129681 418.043907,231.715813 C408.727065,170.822914 360.320636,120.89868 302.597364,108.707879 Z M322.507627,229.728263 C308.735553,203.164192 276.64924,189.629307 248.46453,198.136949 C218.823998,206.287627 198.529842,236.927037 201.907349,268.072146 C204.498711,292.375445 220.017772,314.804683 242.932407,323.074349 C267.302864,332.68263 295.895205,325.930061 313.510648,306.148306 C331.970469,285.593129 335.813839,254.180297 322.507627,229.728263 Z" id="Combined-Shape"></path></g></g></svg><span style="font-size: 13px; font-weight: 600;">Powered by Editmode</span></div>'
26
+ '<div style="z-index: 9999; bottom: 8px; right: 8px; position: fixed; opacity: 1; display: flex; align-items: center; background: rgba(255, 255, 255, 0.9); cursor: pointer; border-radius: 5px; padding: 2px 5px 2px 2px; box-shadow: rgba(0, 0, 0, 0.1) 0px 1px 3px 0px, rgba(0, 0, 0, 0.06) 0px 1px 2px 0px;"><svg preserveAspectRatio="xMidYMid meet" version="1.0" viewBox="0 0 22 23" xmlns="http://www.w3.org/2000/svg" width="24" height="24" style="margin-right: 5px">
27
+ <g opacity=".8">
28
+ <path d="m1.6925 4.2131s6.9175-3.7666 7.5952-4.1192c0.67776-0.35253 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.92232 2.1684-0.70239 0.4428-7.9929 4.3926-8.3935 4.5953-0.40061 0.2028-1.2459-0.0997-1.2459-1.0136v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#203260" fill-rule="evenodd"></path>
29
+ <mask id="b" x="0" y="0" width="11" height="17" mask-type="alpha" maskUnits="userSpaceOnUse">
30
+ <path d="m1.6925 4.2131s6.9175-3.7666 7.5952-4.1192c0.67776-0.35253 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.92232 2.1684-0.70239 0.4428-7.9929 4.3926-8.3935 4.5953-0.40061 0.2028-1.2459-0.0997-1.2459-1.0136v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd"></path>
31
+ </mask>
32
+ <g mask="url(#b)">
33
+ <path d="m2.9346 7.9074s6.9175-3.7666 7.5952-4.1192c0.6778-0.35254 1.2739 0.35253 1.2739 1.025v8.0944c0 1.7258-0.2199 1.7258-0.9223 2.1685s-7.9929 4.3925-8.3935 4.5953-1.2458-0.0997-1.2458-1.0136v-8.4087c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#000719" fill-rule="evenodd"></path>
34
+ </g>
35
+ <path d="m6.978 7.3208s6.9175-3.7666 7.5952-4.1192c0.6778-0.35254 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.9223 2.1684-0.7023 0.4428-7.9929 4.3926-8.3935 4.5954-0.40061 0.2027-1.2459-0.0998-1.2459-1.0137v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#223464" fill-rule="evenodd"></path>
36
+ <mask id="a" x="5" y="3" width="11" height="17" mask-type="alpha" maskUnits="userSpaceOnUse">
37
+ <path d="m6.978 7.3208s6.9175-3.7666 7.5952-4.1192c0.6778-0.35254 1.2739 0.35253 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.9223 2.1684-0.7023 0.4428-7.9929 4.3926-8.3935 4.5954-0.40061 0.2027-1.2459-0.0998-1.2459-1.0137v-8.4086c0-1.5545 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#fff" fill-rule="evenodd"></path>
38
+ </mask>
39
+ <g mask="url(#a)">
40
+ <path d="m8.4483 11.062s6.9175-3.7667 7.5952-4.1192c0.6778-0.35253 1.2739 0.35254 1.2739 1.025v8.0945c0 1.7257-0.2199 1.7257-0.9222 2.1684-0.7024 0.4428-7.993 4.3926-8.3936 4.5954-0.40061 0.2027-1.2458-0.0998-1.2458-1.0136v-8.4087c0-1.5546 1.6925-2.3418 1.6925-2.3418z" clip-rule="evenodd" fill="#000719" fill-rule="evenodd"></path>
41
+ </g>
42
+ <path d="m12.543 10.883s6.9235-3.7101 7.6019-4.0573c0.6783-0.34725 1.275 0.34724 1.275 1.0096v7.9731c0 1.6998-0.2201 1.6998-0.9231 2.1359s-7.9999 4.3267-8.4009 4.5264c-0.4009 0.1997-1.2469-0.0983-1.2469-0.9984v-8.2826c0-1.5312 1.694-2.3067 1.694-2.3067z" clip-rule="evenodd" fill="#405489" fill-rule="evenodd"></path>
43
+ </g>
44
+ </svg><span style="font-size: 13px; font-weight: 600;">Powered by Editmode</span></div>'
27
45
  else
28
46
  ""
29
47
  end
@@ -43,7 +61,7 @@ module Editmode
43
61
  end
44
62
 
45
63
  def script_url
46
- ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor@^0/dist/magic-editor.js"
64
+ ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor@~1/dist/magic-editor.js"
47
65
  end
48
66
 
49
67
  end
@@ -1,3 +1,3 @@
1
1
  module Editmode
2
- VERSION = "1.7.0.pre.2"
2
+ VERSION = "1.8.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editmode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0.pre.2
4
+ version: 1.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Ennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-18 00:00:00.000000000 Z
11
+ date: 2021-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,9 +108,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - ">"
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: 1.3.1
113
+ version: '0'
114
114
  requirements: []
115
115
  rubygems_version: 3.0.3.1
116
116
  signing_key: