superglue 0.51.1 → 0.52.0

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: efd81fc43cbc5289dcb49d1a8491814d0074e59e3a6eaba4c574c8e79b0e0ad4
4
- data.tar.gz: e897edd52736ba816f661b3638484bea2131cb3ec76b2ef17293ae8dcfad39de
3
+ metadata.gz: 94703de4362e746c0d94f24ded15dbfb455022c891147b2c0763a09ac49812d5
4
+ data.tar.gz: 784a3048c3c07fe565302994ce725596f29e589390b7c592c47363c68e7f216e
5
5
  SHA512:
6
- metadata.gz: cc312d60b4dbe09ec16c419362d519ca5439ac2a52d6535fb5dd2cef8c0a978979e5bb8774eedb6d11d5205a067c82f2780d483ee96a5725e3fed96865f8c888
7
- data.tar.gz: 7a2a41329a34fd01fe4ee765b04968135ae8e7e606ec15d9080437ea679378aa4fd6d1661f8b8a2f6a2f8d9a325e39baaea156f3cd25ce41f4036fd7ac774237
6
+ metadata.gz: e76c3826966499af06badefe2aff6c891242f30c02b2bdd3c63adbf7a43d7179db2af8fec6cf757127e56cf0569d1d14cd9eca23af0f471adb6e1fb1d0ed3c3d
7
+ data.tar.gz: ecc81a26f8a3d7077afb83f99fd0260e9fc6bde3c7e17cd3f3b2c1aff53917a0c2091daf040de440c1c46bd1f6eab750f3378975c5a00c54d4b0596ba34d8aca
@@ -1,4 +1,4 @@
1
- <%% initial_state = controller.render_to_string(@virtual_path ,formats: [:json], locals: local_assigns, layout: true) %>
1
+ <%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
2
2
 
3
3
  <script type="text/javascript">
4
4
  window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
@@ -19,7 +19,7 @@ export default function <%= plural_table_name.camelize %>Edit ({
19
19
  return (
20
20
  <div>
21
21
  {messagesEl}
22
- <form {...form.props} data-sg-visit={true}>
22
+ <form {...form.props} data-sg-visit>
23
23
  {Object.values(form.extras).map((hiddenProps) => (<input {...hiddenProps} key={hiddenProps.id} type="hidden"/>))}
24
24
  <%- attributes.each do |attr| -%>
25
25
  <input {...form.inputs.<%= attr.column_name %>} type="text"/>
@@ -28,8 +28,8 @@ export default function <%= plural_table_name.camelize %>Edit ({
28
28
  <button {...form.inputs.submit} type="submit"> {...form.inputs.submit.text} </button>
29
29
  </form>
30
30
 
31
- <a href={<%= singular_table_name.camelize(:lower) %>Path} data-sg-visit={true}>Show</a>
32
- <a href={<%= plural_table_name.camelize(:lower) %>Path} data-sg-visit={true}>Back</a>
31
+ <a href={<%= singular_table_name.camelize(:lower) %>Path} data-sg-visit>Show</a>
32
+ <a href={<%= plural_table_name.camelize(:lower) %>Path} data-sg-visit>Back</a>
33
33
  </div>
34
34
  )
35
35
  }
@@ -1,4 +1,4 @@
1
- <%% initial_state = controller.render_to_string(@virtual_path ,formats: [:json], locals: local_assigns, layout: true) %>
1
+ <%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
2
2
 
3
3
  <script type="text/javascript">
4
4
  window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
@@ -17,10 +17,10 @@ export default function <%= plural_table_name.camelize %>Index({
17
17
  <%- attributes_list.select{|attr| attr != :id }.each do |attr| -%>
18
18
  <td>{<%=singular_table_name.camelize(:lower)%>.<%=attr.camelize(:lower)%>}</td>
19
19
  <%- end -%>
20
- <td><a href={ <%=singular_table_name%>.<%=singular_table_name.camelize(:lower)%>Path } data-sg-visit={true}>Show</a></td>
21
- <td><a href={ <%=singular_table_name%>.edit<%=singular_table_name.camelize%>Path } data-sg-visit={true}>Edit</a></td>
20
+ <td><a href={ <%=singular_table_name%>.<%=singular_table_name.camelize(:lower)%>Path } data-sg-visit>Show</a></td>
21
+ <td><a href={ <%=singular_table_name%>.edit<%=singular_table_name.camelize%>Path } data-sg-visit>Edit</a></td>
22
22
  <td>
23
- <form {...deleteForm.props} data-sg-visit={true}>
23
+ <form {...deleteForm.props} data-sg-visit>
24
24
  {Object.values(deleteForm.extras).map((hiddenProps) => (<input {...hiddenProps} key={hiddenProps.id} type="hidden"/>))}
25
25
  <button type="submit">Delete</button>
26
26
  </form>
@@ -50,7 +50,7 @@ export default function <%= plural_table_name.camelize %>Index({
50
50
  </tbody>
51
51
  </table>
52
52
  <br />
53
- <a href={new<%= singular_table_name.camelize %>Path} data-sg-visit={true}>New <%= singular_table_name.capitalize %></a>
53
+ <a href={new<%= singular_table_name.camelize %>Path} data-sg-visit>New <%= singular_table_name.capitalize %></a>
54
54
  </div>
55
55
  )
56
56
  }
@@ -1,4 +1,4 @@
1
- <%% initial_state = controller.render_to_string(@virtual_path ,formats: [:json], locals: local_assigns, layout: true) %>
1
+ <%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
2
2
 
3
3
  <script type="text/javascript">
4
4
  window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
@@ -18,7 +18,7 @@ export default function <%= plural_table_name.camelize %>New({
18
18
  return (
19
19
  <div>
20
20
  {messagesEl}
21
- <form {...form.props} data-sg-visit={true}>
21
+ <form {...form.props} data-sg-visit>
22
22
  {Object.values(form.extras).map((hiddenProps) => (<input {...hiddenProps} key={hiddenProps.id} type="hidden"/>))}
23
23
  <%- attributes.each do |attr| -%>
24
24
  <input {...form.inputs.<%= attr.column_name %>} type="text"/>
@@ -27,7 +27,7 @@ export default function <%= plural_table_name.camelize %>New({
27
27
  <button {...form.inputs.submit} type="submit"> {...form.inputs.submit.text} </button>
28
28
  </form>
29
29
 
30
- <a href={<%= plural_table_name.camelize(:lower) %>Path} data-sg-visit={true}>Back</a>
30
+ <a href={<%= plural_table_name.camelize(:lower) %>Path} data-sg-visit>Back</a>
31
31
  </div>
32
32
  )
33
33
  }
@@ -1,4 +1,4 @@
1
- <%% initial_state = controller.render_to_string(@virtual_path ,formats: [:json], locals: local_assigns, layout: true) %>
1
+ <%% initial_state = controller.render_to_string(formats: [:json], locals: local_assigns, layout: true) %>
2
2
 
3
3
  <script type="text/javascript">
4
4
  window.SUPERGLUE_INITIAL_PAGE_STATE=<%%= initial_state.html_safe %>;
@@ -21,8 +21,8 @@ export default function <%= plural_table_name.camelize %>Show({
21
21
  {<%=attr.camelize(:lower)%>}
22
22
  </p>
23
23
  <%- end -%>
24
- <a href={ edit<%= singular_table_name.camelize %>Path } data-sg-visit={true}>Edit</a>
25
- <a href={ <%= plural_table_name.camelize(:lower) %>Path } data-sg-visit={true}>Back</a>
24
+ <a href={ edit<%= singular_table_name.camelize %>Path } data-sg-visit>Edit</a>
25
+ <a href={ <%= plural_table_name.camelize(:lower) %>Path } data-sg-visit>Back</a>
26
26
  </div>
27
27
  )
28
28
  }
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import thunk from 'redux-thunk';
3
2
  import { Provider } from 'react-redux';
4
3
  import { createRoot } from 'react-dom/client';
5
4
  import { ApplicationBase } from '@thoughtbot/superglue';
@@ -4,7 +4,7 @@ json.data(search: path) do
4
4
  yield json
5
5
  end
6
6
 
7
- json.componentIdentifier virtual_path_of_template
7
+ json.componentIdentifier "#{controller_path}/#{action_name}"
8
8
  json.defers json.deferred!
9
9
  json.fragments json.fragments!
10
10
  json.assets [ asset_path('application.js') ]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superglue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.51.1
4
+ version: 0.52.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Johny Ho
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-26 00:00:00.000000000 Z
11
+ date: 2023-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack
@@ -30,14 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.30.0
33
+ version: 0.31.0
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.30.0
40
+ version: 0.31.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: form_props
43
43
  requirement: !ruby/object:Gem::Requirement