shopify_app 14.3.0 → 14.4.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: 2e6d4b068e8936d9c688b668c97ab15fb09647eee15dc066fcb904b24662cb65
4
- data.tar.gz: 289b6e8e1b23b0b633189e5be740c5e32b4e3bfaf8b8c98d8609a8dcf626c12a
3
+ metadata.gz: 1f429b16cc3a7e58ffefc48b73c3e3680e99e92da9a7d9bd39d7e9ab5a4c166d
4
+ data.tar.gz: a99e5831aceacada3b406a426559a51cec1403b102272b2ec3a254215aab7164
5
5
  SHA512:
6
- metadata.gz: df4a5e39e099532a7e262e24c51a31ab0ad25023ddab9c0b01a54bf33ffa05b711d71904362c34594fdb54ba68b3ead41ce5c77505e8e22c023daeaf66b2b61d
7
- data.tar.gz: 91e53b6d7111d2833b6ccd88316c7dac3b2f91cbe9bad5f68ee1c7a6b37dee9a4f0bc64b40391ac00ac7db9f7d7b8c3b9a66e9af0db0a8aca1057b85465f3d17
6
+ metadata.gz: 24d08c9a1e4c6ef931cade3b3eb76c7d219d09a09dccb5b14b6f2c32a00c8e4684f2a6a1bf1f90211d706e22db6c598173722327071d2b28e99d1f8b7e78347c
7
+ data.tar.gz: 21e89b713d809aa19c3012fb22267a563b277f104ca080ed0b43151d726533cafd04d4df5ea9b880eac382f59bd15f572955025986e3baa907bec9d203367e84
@@ -1,3 +1,7 @@
1
+ 14.4.0
2
+ ------
3
+ * Replace script tags for ITP screens with data attributes
4
+
1
5
  14.3.0
2
6
  ------
3
7
  * Create user session if one does not exist but was expected
@@ -132,7 +132,8 @@
132
132
 
133
133
  /* ITP 2.0 solution: handles cookie partitioning */
134
134
  StorageAccessHelper.prototype.setUpHelper = function() {
135
- return new ITPHelper({redirectUrl: window.shopOrigin + "/admin/apps/" + window.apiKey + window.returnTo});
135
+ var shopifyData = document.body.dataset;
136
+ return new ITPHelper({redirectUrl: shopifyData.shopOrigin + "/admin/apps/" + shopifyData.apiKey + shopifyData.returnTo});
136
137
  }
137
138
 
138
139
  StorageAccessHelper.prototype.setCookieAndRedirect = function() {
@@ -1,7 +1,7 @@
1
1
  (function() {
2
2
  function setUpTopLevelInteraction() {
3
3
  var TopLevelInteraction = new ITPHelper({
4
- redirectUrl: window.redirectUrl,
4
+ redirectUrl: document.body.dataset.redirectUrl,
5
5
  });
6
6
 
7
7
  TopLevelInteraction.execute();
@@ -14,15 +14,10 @@
14
14
  display: none;
15
15
  }
16
16
  </style>
17
- <script>
18
- window.apiKey = "<%= ShopifyApp.configuration.api_key %>";
19
- window.shopOrigin = "https://<%= @shop %>";
20
- window.returnTo = "<%= params[:return_to] %>"
21
- </script>
22
17
 
23
18
  <%= javascript_include_tag('shopify_app/enable_cookies', crossorigin: 'anonymous', integrity: true) %>
24
19
  </head>
25
- <body>
20
+ <body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="https://<%= @shop %>" data-redirect-url="<%= @url %>">
26
21
  <%=
27
22
  content_tag(
28
23
  :div, nil,
@@ -15,15 +15,9 @@
15
15
  }
16
16
  </style>
17
17
 
18
- <script>
19
- window.apiKey = "<%= ShopifyApp.configuration.api_key %>";
20
- window.shopOrigin = "https://<%= @shop %>";
21
- window.redirectUrl = "<%= @url %>";
22
- </script>
23
-
24
18
  <%= javascript_include_tag('shopify_app/top_level', crossorigin: 'anonymous', integrity: true) %>
25
19
  </head>
26
- <body>
20
+ <body data-api-key="<%= ShopifyApp.configuration.api_key %>" data-shop-origin="https://<%= @shop %>" data-redirect-url="<%= @url %>">
27
21
  <main id="TopLevelInteractionContent">
28
22
  <div class="Polaris-Page">
29
23
  <div class="Polaris-Page__Content">
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module ShopifyApp
3
- VERSION = '14.3.0'
3
+ VERSION = '14.4.0'
4
4
  end
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shopify_app",
3
- "version": "14.3.0",
3
+ "version": "14.4.0",
4
4
  "repository": "git@github.com:Shopify/shopify_app.git",
5
5
  "author": "Shopify",
6
6
  "license": "MIT",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify_app
3
3
  version: !ruby/object:Gem::Version
4
- version: 14.3.0
4
+ version: 14.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-09-03 00:00:00.000000000 Z
11
+ date: 2020-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: browser_sniffer