pixflow-upgrade-planning 1.3.8 → 1.4.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.
package/index.js CHANGED
@@ -8,6 +8,22 @@ class PixflowUpgradePlanning extends HTMLElement {
8
8
  super();
9
9
  }
10
10
 
11
+ set title(value){
12
+ this.querySelector("div > window-element > div").innerHTML = value;
13
+ }
14
+
15
+ get title(){
16
+ this.querySelector("div > window-element > div").innerHTML
17
+ }
18
+
19
+ set caption(text){
20
+ this.querySelector("div > window-element > div.go-premium-btn").innerHTML = text;
21
+ }
22
+
23
+ get caption(){
24
+ return this.querySelector("div > window-element > div.go-premium-btn").innerHTML;
25
+ }
26
+
11
27
  async connectedCallback(){
12
28
  const content = fs.readFileSync(path.join(__dirname, "style.css"));
13
29
  let style = document.head.querySelector("style");
@@ -18,17 +34,63 @@ class PixflowUpgradePlanning extends HTMLElement {
18
34
  style.innerHTML = content;
19
35
  document.head.appendChild(style);
20
36
  }
37
+ const userData = JSON.parse(localStorage.getItem("init-data")).userData;
38
+ this.url = userData.upgrade_subscription_url;
21
39
 
22
40
  this.template = parse.parseFromString(fs.readFileSync(path.join(__dirname, "template.html")).toString("utf8"), "text/html");
23
41
  this.appendChild(this.template.querySelector("div"));
24
42
 
25
43
  this.querySelector("img.close").addEventListener("click", this.close_click);
26
44
 
27
- this.querySelector("img.go-premium-btn").addEventListener("click", this.go_premium_click)
45
+ this.querySelector("div.go-premium-btn").addEventListener("click", e => {
46
+ window.cep.util.openURLInDefaultBrowser(this.url);
47
+ })
28
48
 
29
49
  this.querySelector("div.block").addEventListener("click", this.close_click);
50
+
51
+ this.addEventListener("title", e => {
52
+ this.title = e.detail.text;
53
+ })
54
+
55
+ this.addEventListener("url", e => {
56
+ this.url = e.detail.url;
57
+ })
58
+
59
+ this.addEventListener("caption", e => {
60
+ this.caption = e.detail.text;
61
+ })
62
+
63
+ this.addEventListener("load", e => {
64
+ this.setTitle(e.detail.title);
65
+ this.setUrl(e.detail.url);
66
+ this.setCaption(e.detail.caption);
67
+ })
30
68
  }
31
69
 
70
+ setUrl(url){
71
+ this.dispatchEvent(new CustomEvent("url", {
72
+ detail: {
73
+ url: url
74
+ }
75
+ }));
76
+ }
77
+
78
+ setTitle(text){
79
+ this.dispatchEvent(new CustomEvent("title", {
80
+ detail: {
81
+ text: text
82
+ }
83
+ }));
84
+ }
85
+
86
+ setCaption(text){
87
+ this.dispatchEvent(new CustomEvent("caption", {
88
+ detail: {
89
+ text: text
90
+ }
91
+ }));
92
+ }
93
+
32
94
  close_click(e){
33
95
  let window = e.target.parentNode;
34
96
  if(window.tagName != "WINDOW-ELEMENT")
@@ -43,11 +105,6 @@ class PixflowUpgradePlanning extends HTMLElement {
43
105
  this.classList.add("active");
44
106
  }
45
107
 
46
- go_premium_click(e){
47
- const url = JSON.parse(localStorage.getItem("init-data")).userData.upgrade_subscription_url;
48
- window.cep.util.openURLInDefaultBrowser(url);
49
- }
50
-
51
108
  }
52
109
 
53
110
  customElements.define("pixflow-upgrade-planning", PixflowUpgradePlanning);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pixflow-upgrade-planning",
3
- "version": "1.3.8",
3
+ "version": "1.4.1",
4
4
  "description": "",
5
5
  "main": "index.js",
6
6
  "scripts": {
package/style.css CHANGED
@@ -69,9 +69,22 @@ pixflow-upgrade-planning div window-element ul li {
69
69
  pixflow-upgrade-planning div window-element ul li > img {
70
70
  margin-right: 10px;
71
71
  }
72
- pixflow-upgrade-planning div window-element img.go-premium-btn {
72
+ pixflow-upgrade-planning div window-element div.go-premium-btn {
73
73
  cursor: pointer;
74
74
  margin-bottom: 30px;
75
+ width: 332;
76
+ height: 55;
77
+ border-radius: 49px;
78
+ padding-top: 10.21px;
79
+ padding-right: 17.02px;
80
+ padding-bottom: 10.21px;
81
+ padding-left: 17.02px;
82
+ background-color: #FFFFFF;
83
+ color: #08090B;
84
+ font-family: Inter;
85
+ font-weight: 600;
86
+ font-size: 15px;
87
+ text-align: center;
75
88
  }
76
89
 
77
90
  /*# sourceMappingURL=style.css.map */
package/style.css.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;;AACA;EACI;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AAIZ;EACI;EACA","file":"style.css"}
1
+ {"version":3,"sourceRoot":"","sources":["style.scss"],"names":[],"mappings":"AAAA;EACI;;AACA;EACI;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;EACA;EACA;EACA;EACA;;AAEJ;EACI;EACA;;AAGA;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACI;;AAIZ;EACI;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA","file":"style.css"}
package/style.scss CHANGED
@@ -70,9 +70,22 @@ pixflow-upgrade-planning {
70
70
  }
71
71
  }
72
72
  }
73
- img.go-premium-btn {
73
+ div.go-premium-btn {
74
74
  cursor: pointer;
75
75
  margin-bottom: 30px;
76
+ width: 332;
77
+ height: 55;
78
+ border-radius: 49px;
79
+ padding-top: 10.21px;
80
+ padding-right: 17.02px;
81
+ padding-bottom: 10.21px;
82
+ padding-left: 17.02px;
83
+ background-color: #FFFFFF;
84
+ color: #08090B;
85
+ font-family: Inter;
86
+ font-weight: 600;
87
+ font-size: 15px;
88
+ text-align: center;
76
89
  }
77
90
  }
78
91
  }
package/template.html CHANGED
@@ -11,20 +11,23 @@
11
11
  </li>
12
12
  <li>
13
13
  <img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
14
- <div>motion factory pro</div></li>
14
+ <div>Up to 25,000 AI Credits/Mo</div></li>
15
15
  <li>
16
16
  <img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
17
- <div>Unlimited Graphic templates</div>
17
+ <div>Full Access to Video Templates</div>
18
18
  </li>
19
19
  <li>
20
20
  <img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
21
- <div>Unlimited video templates</div>
21
+ <div>Full Access To Sound Effects</div>
22
22
  </li>
23
23
  <li>
24
+ <img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
25
+ <div>Full Access to Graphic templates</div>
26
+ </li><li>
24
27
  <img src="./node_modules/pixflow-upgrade-planning/images/item-style.svg">
25
28
  <div>License With Worldwide Coverage</div>
26
29
  </li>
27
30
  </ul>
28
- <img src="./node_modules/pixflow-upgrade-planning/images/btn-go-prm.svg" class="go-premium-btn">
31
+ <div class="go-premium-btn">Go Unlimited from $14.99/mo</div>
29
32
  </window-element>
30
33
  </div>