From d5c496adf81037f08ea17cdb78f70f0e29e649d0 Mon Sep 17 00:00:00 2001 From: Lucas Santos da Costa Date: Wed, 30 Oct 2024 16:03:10 -0300 Subject: [PATCH] =?UTF-8?q?Atualiza=20script=20da=20vers=C3=A3o=202?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- v2/embedded.js | 2 +- v2/embedded.js.map | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/v2/embedded.js b/v2/embedded.js index cfc9563..6066194 100644 --- a/v2/embedded.js +++ b/v2/embedded.js @@ -1,2 +1,2 @@ -(()=>{var a=Object.defineProperty;var r=(s,t)=>a(s,"name",{value:t,configurable:!0});var i=class{static{r(this,"Clicksign")}#t="camera;geolocation;fullscreen;gyroscope;accelerometer;magnetometer";#e="width: 100%; height: 100%;";constructor(t){this.key=t,this.origin=`${window.location.protocol}://${window.location.host}`,this.listen={},this.endpoint="https://app.clicksign.com"}eventsFor(t){let e=t.name||t.data?.name||t.data||t;return this.listen[e]||[]}eventHandler(t){this.eventsFor(t).forEach(e=>e(t.data))}mount(t){return this.target=document.getElementById(t),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("src",this.source),this.iframe.setAttribute("style",this.#e),this.iframe.setAttribute("allow",this.#t),window.addEventListener("message",e=>this.eventHandler(e)),this.target.appendChild(this.iframe)}on(t,e){return this.listen[t]||(this.listen[t]=[]),this.listen[t].push(e)}unmount(){return this.iframe&&(this.target.removeChild(this.iframe),this.target=null,this.iframe=null,window.removeEventListener("message",this.eventHandler)),!0}get source(){return`${this.endpoint}${this.path}${this.params}`}get params(){return`?embedded=true&origin=${this.origin}`}get path(){return`/notarial/compat/requests/${this.key}`}};globalThis.Clicksign=i;})(); +(()=>{var a=Object.defineProperty;var s=(r,t)=>a(r,"name",{value:t,configurable:!0});var i=class{static{s(this,"Clicksign")}#t="camera;geolocation;fullscreen;gyroscope;accelerometer;magnetometer";#e="width: 100%; height: 100%;";constructor(t){this.key=t,this.origin=`${window.location.protocol}://${window.location.host}`,this.listen={},this.endpoint="https://app.clicksign.com"}eventsFor(t){let e=t.name||t.data?.name||t.data||t;return this.listen[e]||[]}eventHandler(t){this.eventsFor(t).forEach(e=>e(t.data))}mount(t){return this.target=document.getElementById(t),this.iframe=document.createElement("iframe"),this.iframe.setAttribute("src",this.source),this.iframe.setAttribute("style",this.#e),this.iframe.setAttribute("allow",this.#t),window.addEventListener("message",e=>this.eventHandler(e)),this.target.appendChild(this.iframe)}on(t,e){return this.listen[t]||(this.listen[t]=[]),this.listen[t].push(e)}unmount(){return this.iframe&&(this.target.removeChild(this.iframe),this.target=null,this.iframe=null,window.removeEventListener("message",this.eventHandler)),!0}get source(){return`${this.endpoint}${this.path}${this.params}`}get params(){return`?embedded=true&origin=${this.origin}`}get path(){return`/notarial/widget/signatures/${this.key}/redirect`}};globalThis.Clicksign=i;})(); //# sourceMappingURL=embedded.js.map diff --git a/v2/embedded.js.map b/v2/embedded.js.map index 4dfb08c..b79c705 100644 --- a/v2/embedded.js.map +++ b/v2/embedded.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../../packages/v2/src/embedded.js", "../../packages/v2/index.js"], - "sourcesContent": ["export default class Clicksign {\n #allowed = 'camera;geolocation;fullscreen;gyroscope;accelerometer;magnetometer';\n\n #defaultStyles = 'width: 100%; height: 100%;';\n\n constructor(key) {\n this.key = key;\n this.origin = `${window.location.protocol}://${window.location.host}`;\n this.listen = {};\n this.endpoint = 'https://app.clicksign.com';\n }\n\n eventsFor(event) {\n const eventName = event.name || event.data?.name || event.data || event;\n return this.listen[eventName] || [];\n }\n\n eventHandler(event) {\n this.eventsFor(event).forEach((fn) => fn(event.data));\n }\n\n mount(id) {\n this.target = document.getElementById(id);\n\n this.iframe = document.createElement('iframe');\n this.iframe.setAttribute('src', this.source);\n this.iframe.setAttribute('style', this.#defaultStyles);\n this.iframe.setAttribute('allow', this.#allowed);\n\n window.addEventListener('message', (event) => this.eventHandler(event));\n\n return this.target.appendChild(this.iframe);\n }\n\n on(event, fn) {\n if (!this.listen[event]) { this.listen[event] = []; }\n\n return this.listen[event].push(fn);\n }\n\n unmount() {\n if (this.iframe) {\n this.target.removeChild(this.iframe);\n\n this.target = null;\n this.iframe = null;\n\n window.removeEventListener('message', this.eventHandler);\n }\n\n return true;\n }\n\n get source() {\n return `${this.endpoint}${this.path}${this.params}`;\n }\n\n get params() {\n return `?embedded=true&origin=${this.origin}`;\n }\n\n get path() {\n return `/notarial/compat/requests/${this.key}`;\n }\n}\n", "import Clicksign from \"./src/embedded\";\n\nglobalThis.Clicksign = Clicksign;\n\nexport { Clicksign }\n"], - "mappings": "qFAAA,IAAqBA,EAArB,KAA+B,CAA/B,MAA+B,CAAAC,EAAA,kBAC7BC,GAAW,qEAEXC,GAAiB,6BAEjB,YAAYC,EAAK,CACf,KAAK,IAAMA,EACX,KAAK,OAAS,GAAG,OAAO,SAAS,QAAQ,MAAM,OAAO,SAAS,IAAI,GACnE,KAAK,OAAS,CAAC,EACf,KAAK,SAAW,2BAClB,CAEA,UAAUC,EAAO,CACf,IAAMC,EAAYD,EAAM,MAAQA,EAAM,MAAM,MAAQA,EAAM,MAAQA,EAClE,OAAO,KAAK,OAAOC,CAAS,GAAK,CAAC,CACpC,CAEA,aAAaD,EAAO,CAClB,KAAK,UAAUA,CAAK,EAAE,QAASE,GAAOA,EAAGF,EAAM,IAAI,CAAC,CACtD,CAEA,MAAMG,EAAI,CACR,YAAK,OAAS,SAAS,eAAeA,CAAE,EAExC,KAAK,OAAS,SAAS,cAAc,QAAQ,EAC7C,KAAK,OAAO,aAAa,MAAO,KAAK,MAAM,EAC3C,KAAK,OAAO,aAAa,QAAS,KAAKL,EAAc,EACrD,KAAK,OAAO,aAAa,QAAS,KAAKD,EAAQ,EAE/C,OAAO,iBAAiB,UAAYG,GAAU,KAAK,aAAaA,CAAK,CAAC,EAE/D,KAAK,OAAO,YAAY,KAAK,MAAM,CAC5C,CAEA,GAAGA,EAAOE,EAAI,CACZ,OAAK,KAAK,OAAOF,CAAK,IAAK,KAAK,OAAOA,CAAK,EAAI,CAAC,GAE1C,KAAK,OAAOA,CAAK,EAAE,KAAKE,CAAE,CACnC,CAEA,SAAU,CACR,OAAI,KAAK,SACP,KAAK,OAAO,YAAY,KAAK,MAAM,EAEnC,KAAK,OAAS,KACd,KAAK,OAAS,KAEd,OAAO,oBAAoB,UAAW,KAAK,YAAY,GAGlD,EACT,CAEA,IAAI,QAAS,CACX,MAAO,GAAG,KAAK,QAAQ,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,EACnD,CAEA,IAAI,QAAS,CACX,MAAO,yBAAyB,KAAK,MAAM,EAC7C,CAEA,IAAI,MAAO,CACT,MAAO,6BAA6B,KAAK,GAAG,EAC9C,CACF,EC9DA,WAAW,UAAYE", + "sourcesContent": ["export default class Clicksign {\n #allowed = 'camera;geolocation;fullscreen;gyroscope;accelerometer;magnetometer';\n\n #defaultStyles = 'width: 100%; height: 100%;';\n\n constructor(key) {\n this.key = key;\n this.origin = `${window.location.protocol}://${window.location.host}`;\n this.listen = {};\n this.endpoint = 'https://app.clicksign.com';\n }\n\n eventsFor(event) {\n const eventName = event.name || event.data?.name || event.data || event;\n return this.listen[eventName] || [];\n }\n\n eventHandler(event) {\n this.eventsFor(event).forEach((fn) => fn(event.data));\n }\n\n mount(id) {\n this.target = document.getElementById(id);\n\n this.iframe = document.createElement('iframe');\n this.iframe.setAttribute('src', this.source);\n this.iframe.setAttribute('style', this.#defaultStyles);\n this.iframe.setAttribute('allow', this.#allowed);\n\n window.addEventListener('message', (event) => this.eventHandler(event));\n\n return this.target.appendChild(this.iframe);\n }\n\n on(event, fn) {\n if (!this.listen[event]) { this.listen[event] = []; }\n\n return this.listen[event].push(fn);\n }\n\n unmount() {\n if (this.iframe) {\n this.target.removeChild(this.iframe);\n\n this.target = null;\n this.iframe = null;\n\n window.removeEventListener('message', this.eventHandler);\n }\n\n return true;\n }\n\n get source() {\n return `${this.endpoint}${this.path}${this.params}`;\n }\n\n get params() {\n return `?embedded=true&origin=${this.origin}`;\n }\n\n get path() {\n return `/notarial/widget/signatures/${this.key}/redirect`;\n }\n}\n", "import Clicksign from \"./src/embedded\";\n\nglobalThis.Clicksign = Clicksign;\n\nexport { Clicksign }\n"], + "mappings": "qFAAA,IAAqBA,EAArB,KAA+B,CAA/B,MAA+B,CAAAC,EAAA,kBAC7BC,GAAW,qEAEXC,GAAiB,6BAEjB,YAAYC,EAAK,CACf,KAAK,IAAMA,EACX,KAAK,OAAS,GAAG,OAAO,SAAS,QAAQ,MAAM,OAAO,SAAS,IAAI,GACnE,KAAK,OAAS,CAAC,EACf,KAAK,SAAW,2BAClB,CAEA,UAAUC,EAAO,CACf,IAAMC,EAAYD,EAAM,MAAQA,EAAM,MAAM,MAAQA,EAAM,MAAQA,EAClE,OAAO,KAAK,OAAOC,CAAS,GAAK,CAAC,CACpC,CAEA,aAAaD,EAAO,CAClB,KAAK,UAAUA,CAAK,EAAE,QAASE,GAAOA,EAAGF,EAAM,IAAI,CAAC,CACtD,CAEA,MAAMG,EAAI,CACR,YAAK,OAAS,SAAS,eAAeA,CAAE,EAExC,KAAK,OAAS,SAAS,cAAc,QAAQ,EAC7C,KAAK,OAAO,aAAa,MAAO,KAAK,MAAM,EAC3C,KAAK,OAAO,aAAa,QAAS,KAAKL,EAAc,EACrD,KAAK,OAAO,aAAa,QAAS,KAAKD,EAAQ,EAE/C,OAAO,iBAAiB,UAAYG,GAAU,KAAK,aAAaA,CAAK,CAAC,EAE/D,KAAK,OAAO,YAAY,KAAK,MAAM,CAC5C,CAEA,GAAGA,EAAOE,EAAI,CACZ,OAAK,KAAK,OAAOF,CAAK,IAAK,KAAK,OAAOA,CAAK,EAAI,CAAC,GAE1C,KAAK,OAAOA,CAAK,EAAE,KAAKE,CAAE,CACnC,CAEA,SAAU,CACR,OAAI,KAAK,SACP,KAAK,OAAO,YAAY,KAAK,MAAM,EAEnC,KAAK,OAAS,KACd,KAAK,OAAS,KAEd,OAAO,oBAAoB,UAAW,KAAK,YAAY,GAGlD,EACT,CAEA,IAAI,QAAS,CACX,MAAO,GAAG,KAAK,QAAQ,GAAG,KAAK,IAAI,GAAG,KAAK,MAAM,EACnD,CAEA,IAAI,QAAS,CACX,MAAO,yBAAyB,KAAK,MAAM,EAC7C,CAEA,IAAI,MAAO,CACT,MAAO,+BAA+B,KAAK,GAAG,WAChD,CACF,EC9DA,WAAW,UAAYE", "names": ["Clicksign", "__name", "#allowed", "#defaultStyles", "key", "event", "eventName", "fn", "id", "Clicksign"] }