From 2b7bcfa65e3b3742d83b3e3065a583f0f5550ed2 Mon Sep 17 00:00:00 2001
From: Parsa Gholipour <12parsa@gmail.com>
Date: Sun, 24 Sep 2023 21:43:13 +0330
Subject: [PATCH] fix copy in fixed mode
---
...{Sharee.55f9ad49.js => Sharee.f3e8422a.js} | 32 +++++++++++--------
dist/sharee-react.js.js | 2 +-
dist/sharee-vue.js.js | 2 +-
dist/sharee.js | 2 +-
dist/sharee.min.js | 10 +++---
src/lib/strategies/FixedStrategy.ts | 7 ++++
6 files changed, 33 insertions(+), 22 deletions(-)
rename dist/{Sharee.55f9ad49.js => Sharee.f3e8422a.js} (96%)
diff --git a/dist/Sharee.55f9ad49.js b/dist/Sharee.f3e8422a.js
similarity index 96%
rename from dist/Sharee.55f9ad49.js
rename to dist/Sharee.f3e8422a.js
index 8f68370..62f4b94 100644
--- a/dist/Sharee.55f9ad49.js
+++ b/dist/Sharee.f3e8422a.js
@@ -10,13 +10,13 @@ const p = {
drivers: ["copy", "telegram", "facebook", "whatsapp", "twitter", "linkedin"],
ripple: !0,
mode: "normal"
-}, g = "rtl", E = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0644\u06AF\u0631\u0627\u0645", f = "\u06A9\u067E\u06CC \u0644\u06CC\u0646\u06A9", C = "\u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u06A9\u067E\u06CC \u0634\u062F!", L = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0648\u0627\u062A\u0633\u0627\u067E", v = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0648\u06CC\u06CC\u062A\u0631", w = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0644\u06CC\u0646\u06A9\u062F\u06CC\u0646", x = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0641\u06CC\u0633\u0628\u0648\u06A9", y = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0627\u06CC\u062A\u0627", h = {
+}, g = "rtl", E = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0644\u06AF\u0631\u0627\u0645", f = "\u06A9\u067E\u06CC \u0644\u06CC\u0646\u06A9", C = "\u0628\u0627 \u0645\u0648\u0641\u0642\u06CC\u062A \u06A9\u067E\u06CC \u0634\u062F!", v = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0648\u0627\u062A\u0633\u0627\u067E", L = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u062A\u0648\u06CC\u06CC\u062A\u0631", w = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0644\u06CC\u0646\u06A9\u062F\u06CC\u0646", x = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0641\u06CC\u0633\u0628\u0648\u06A9", y = "\u0627\u0634\u062A\u0631\u0627\u06A9 \u062F\u0631 \u0627\u06CC\u062A\u0627", h = {
Direction: g,
Telegram: E,
Copy_Link: f,
CopiedSuccessfully: C,
- Whatsapp: L,
- Twitter: v,
+ Whatsapp: v,
+ Twitter: L,
Linkedin: w,
Facebook: x,
Eitaa: y
@@ -26,8 +26,8 @@ const p = {
Telegram: E,
Copy_Link: f,
CopiedSuccessfully: C,
- Whatsapp: L,
- Twitter: v,
+ Whatsapp: v,
+ Twitter: L,
Linkedin: w,
Facebook: x,
Eitaa: y,
@@ -388,12 +388,16 @@ class O extends d {
}));
}
renderDriver(e) {
- e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e);
+ e.mainEl = document.createElement("a"), "getLink" in e && (e.mainEl.href = e.getLink()), this.initDriverStyles(e), this.listenDriverEvents(e);
const t = document.createElement("div");
t.innerHTML = e.icon;
const i = document.createElement("div");
return i.innerHTML = e.getButtonText(), e.mainEl.appendChild(t), this.options.noTitle ? (e.mainEl.title = e.getButtonText(), e.mainEl.classList.add("sharee__no-title")) : e.mainEl.appendChild(i), e.mainEl.classList.add("sharee__driver__" + e.getName()), e.mainEl;
}
+ listenDriverEvents(e) {
+ const t = this.onDriverClick(e);
+ this.driverListeners[e.buttonText] = [t], e.mainEl.addEventListener("click", t);
+ }
}
class z extends u {
constructor(s) {
@@ -502,7 +506,7 @@ class P extends a {
}
getLink() {
var e, t;
- return `whatsapp://send?text=${(e = this.options) == null ? void 0 : e.shareText}
+ return `https://wa.me?text=${(e = this.options) == null ? void 0 : e.shareText}
${(t = this.options) == null ? void 0 : t.shareLink}`;
}
}
@@ -561,16 +565,16 @@ class W extends a {
}
getLink() {
var e, t;
- return `https://twitter.com/share?text=${encodeURIComponent((e = this.options) == null ? void 0 : e.shareText)}&url=${(t = this.options) == null ? void 0 : t.shareLink}`;
+ return `https://twitter.com/intent/tweet?text=${encodeURIComponent((e = this.options) == null ? void 0 : e.shareText)}&url=${(t = this.options) == null ? void 0 : t.shareLink}`;
}
}
-const U = `\r
+const A = `\r
`;
-class A extends a {
+class U extends a {
constructor(e, t) {
super(e, t);
n(this, "buttonText", "Linkedin");
- n(this, "icon", U);
+ n(this, "icon", A);
n(this, "backgroundColor", "#0077B5");
n(this, "backgroundHoverColor", "#026092");
n(this, "textColor", "#fff");
@@ -578,7 +582,7 @@ class A extends a {
}
getLink() {
var e;
- return `https://www.linkedin.com/sharing/share-offsite/?url=${(e = this.options) == null ? void 0 : e.shareLink}`;
+ return `https://www.linkedin.com/shareArticle?url=${(e = this.options) == null ? void 0 : e.shareLink}`;
}
}
const X = `