samandesk 1.0.6 → 1.0.7

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.
@@ -70,7 +70,7 @@ class k {
70
70
  * اگر لینک را در ورودی ارسال نکند، خودکار به صفحه‌ی انتخاب دپارتمان می‌رویم و ادامه‌ی کار توسط سامان دسک صورت می‌گیرد
71
71
  */
72
72
  open(e) {
73
- const o = a(), n = e || `https://samandesk.com/department_selection?token=${f()}`;
73
+ const o = a(), n = e || `https://samandesk.com/department-selection?token=${f()}`;
74
74
  c(n), this.setStyle(), document.body.appendChild(o);
75
75
  }
76
76
  }
@@ -1 +1 @@
1
- (function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o.SamanDesk={}))})(this,function(o){"use strict";let s;const r=document.createElement("iframe"),m={count:0,promises:{}};function p(){return m}function f(t){s=t}function u(){return s}function y(){r.src=""}function l(t){r.src=t}function a(){return r}const h=new Event("ready");function x(){return h}function g(t){window.addEventListener("message",e=>{if(!e.data.from||e.data.from!=="SamanDesk")return;let i=!1;console.log(`message from (${e.origin})`,e);try{t[e.data.action](e.data.data),i=!0}catch{console.error("error while run event action")}const n=e.data,d=n.id,c=p();d in c.promises?(c.promises[d](n),delete c.promises[d]):i||console.error("Message from outside of frame is invalid")})}class k{async init(){g(this)}setToken(e){f(e.token),y(),window.dispatchEvent(x())}}class w{async init(e){new k().init();const n=a();l(`https://samandesk.com/setup-interoperation/${e}`),n.width="0",document.body.appendChild(n)}setStyle(){const e=a();e.style.position="fixed",e.style.bottom="12px",e.style.left="12px",e.style.boxShadow="0px 0px 100px 0px rgba(0,0,0,0.48)",e.style.maxWidth="500px",e.style.width="100%",e.style.maxHeight="640px",e.style.height="100%",e.style.zIndex="1000",e.style.borderRadius="24px",e.width="500px",e.height="640px"}open(e){const i=a(),n=e||`https://samandesk.com/department_selection?token=${u()}`;l(n),this.setStyle(),document.body.appendChild(i)}}o.SamanDesk=w,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
1
+ (function(o,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(o=typeof globalThis<"u"?globalThis:o||self,s(o.SamanDesk={}))})(this,function(o){"use strict";let s;const r=document.createElement("iframe"),m={count:0,promises:{}};function p(){return m}function f(t){s=t}function u(){return s}function y(){r.src=""}function l(t){r.src=t}function a(){return r}const h=new Event("ready");function x(){return h}function g(t){window.addEventListener("message",e=>{if(!e.data.from||e.data.from!=="SamanDesk")return;let i=!1;console.log(`message from (${e.origin})`,e);try{t[e.data.action](e.data.data),i=!0}catch{console.error("error while run event action")}const n=e.data,d=n.id,c=p();d in c.promises?(c.promises[d](n),delete c.promises[d]):i||console.error("Message from outside of frame is invalid")})}class k{async init(){g(this)}setToken(e){f(e.token),y(),window.dispatchEvent(x())}}class w{async init(e){new k().init();const n=a();l(`https://samandesk.com/setup-interoperation/${e}`),n.width="0",document.body.appendChild(n)}setStyle(){const e=a();e.style.position="fixed",e.style.bottom="12px",e.style.left="12px",e.style.boxShadow="0px 0px 100px 0px rgba(0,0,0,0.48)",e.style.maxWidth="500px",e.style.width="100%",e.style.maxHeight="640px",e.style.height="100%",e.style.zIndex="1000",e.style.borderRadius="24px",e.width="500px",e.height="640px"}open(e){const i=a(),n=e||`https://samandesk.com/department-selection?token=${u()}`;l(n),this.setStyle(),document.body.appendChild(i)}}o.SamanDesk=w,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "samandesk",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "files": [