@documenso/embed-vue 0.3.0 → 0.5.0

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.
@@ -21,14 +21,7 @@ export type EmbedCreateDocumentProps = {
21
21
  documentId: number;
22
22
  }) => void;
23
23
  };
24
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedCreateDocumentProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedCreateDocumentProps>>>, {}, {}>;
24
+ declare const _default: import('vue').DefineComponent<EmbedCreateDocumentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedCreateDocumentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
25
+ __iframe: HTMLIFrameElement;
26
+ }, HTMLIFrameElement>;
25
27
  export default _default;
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToOption<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
@@ -21,14 +21,7 @@ export type EmbedCreateTemplateProps = {
21
21
  templateId: number;
22
22
  }) => void;
23
23
  };
24
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedCreateTemplateProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedCreateTemplateProps>>>, {}, {}>;
24
+ declare const _default: import('vue').DefineComponent<EmbedCreateTemplateProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedCreateTemplateProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
25
+ __iframe: HTMLIFrameElement;
26
+ }, HTMLIFrameElement>;
25
27
  export default _default;
26
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
27
- type __VLS_TypePropsToOption<T> = {
28
- [K in keyof T]-?: {} extends Pick<T, K> ? {
29
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
30
- } : {
31
- type: import('vue').PropType<T[K]>;
32
- required: true;
33
- };
34
- };
@@ -22,15 +22,7 @@ export type EmbedDirectTemplateProps = {
22
22
  onFieldSigned?: () => void;
23
23
  onFieldUnsigned?: () => void;
24
24
  };
25
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedDirectTemplateProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedDirectTemplateProps>>>, {}, {}>;
25
+ declare const _default: import('vue').DefineComponent<EmbedDirectTemplateProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedDirectTemplateProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
26
+ __iframe: HTMLIFrameElement;
27
+ }, HTMLIFrameElement>;
26
28
  export default _default;
27
-
28
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
29
- type __VLS_TypePropsToOption<T> = {
30
- [K in keyof T]-?: {} extends Pick<T, K> ? {
31
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
32
- } : {
33
- type: import('vue').PropType<T[K]>;
34
- required: true;
35
- };
36
- };
package/dist/index.d.mts CHANGED
@@ -1,5 +1,9 @@
1
1
  export { default as EmbedDirectTemplate } from './direct-template.vue';
2
2
  export { default as EmbedSignDocument } from './sign-document.vue';
3
+ export { default as EmbedCreateDocumentV1 } from './create-document.vue';
4
+ export { default as EmbedCreateTemplateV1 } from './create-template.vue';
5
+ export { default as EmbedUpdateDocumentV1 } from './update-document.vue';
6
+ export { default as EmbedUpdateTemplateV1 } from './update-template.vue';
3
7
  export { default as unstable_EmbedCreateDocument } from './create-document.vue';
4
8
  export { default as unstable_EmbedCreateTemplate } from './create-template.vue';
5
9
  export { default as unstable_EmbedUpdateDocument } from './update-document.vue';
package/dist/index.d.ts CHANGED
@@ -1,5 +1,9 @@
1
1
  export { default as EmbedDirectTemplate } from './direct-template.vue';
2
2
  export { default as EmbedSignDocument } from './sign-document.vue';
3
+ export { default as EmbedCreateDocumentV1 } from './create-document.vue';
4
+ export { default as EmbedCreateTemplateV1 } from './create-template.vue';
5
+ export { default as EmbedUpdateDocumentV1 } from './update-document.vue';
6
+ export { default as EmbedUpdateTemplateV1 } from './update-template.vue';
3
7
  export { default as unstable_EmbedCreateDocument } from './create-document.vue';
4
8
  export { default as unstable_EmbedCreateTemplate } from './create-template.vue';
5
9
  export { default as unstable_EmbedUpdateDocument } from './update-document.vue';
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("vue"),i=["src"],l=t.defineComponent({__name:"direct-template",props:{className:{},host:{},token:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},email:{},lockEmail:{type:Boolean},name:{},lockName:{type:Boolean},additionalProps:{},onDocumentReady:{type:Function},onDocumentCompleted:{type:Function},onDocumentError:{type:Function},onFieldSigned:{type:Function},onFieldUnsigned:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),n=new URL(`/embed/direct/${e.token}`,o);return e.externalId&&n.searchParams.set("externalId",e.externalId),`${n}#${c}`});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(o.data.data);break;case"document-error":e.onDocumentError?.(o.data.data);break;case"field-signed":e.onFieldSigned?.();break;case"field-unsigned":e.onFieldUnsigned?.();break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,i))}}),p=["src"],u=t.defineComponent({__name:"sign-document",props:{className:{},host:{},token:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},name:{},lockName:{type:Boolean},allowDocumentRejection:{type:Boolean},additionalProps:{},onDocumentReady:{type:Function},onDocumentCompleted:{type:Function},onDocumentError:{type:Function},onDocumentRejected:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps})));return`${new URL(`/embed/sign/${e.token}`,o)}#${c}`});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(o.data.data);break;case"document-error":e.onDocumentError?.(o.data.data);break;case"document-rejected":e.onDocumentRejected?.(o.data.data);break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,p))}}),f=["src"],k=t.defineComponent({__name:"create-document",props:{className:{},host:{},presignToken:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},additionalProps:{},onDocumentCreated:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),n=new URL("/embed/v1/authoring/document/create",o);return n.searchParams.set("token",e.presignToken),n.hash=c,n.toString()});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.type){case"document-created":e.onDocumentCreated?.({documentId:o.data.documentId,externalId:o.data.externalId});break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,f))}}),_=["src"],b=t.defineComponent({__name:"create-template",props:{className:{},host:{},presignToken:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},additionalProps:{},onTemplateCreated:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),n=new URL("/embed/v1/authoring/template/create",o);return n.searchParams.set("token",e.presignToken),n.hash=c,n.toString()});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.type){case"template-created":e.onTemplateCreated?.({templateId:o.data.templateId,externalId:o.data.externalId});break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,_))}}),h=["src"],y=t.defineComponent({__name:"update-document",props:{className:{},host:{},presignToken:{},documentId:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},additionalProps:{},onDocumentUpdated:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),n=new URL(`/embed/v1/authoring/document/edit/${e.documentId}`,o);return n.searchParams.set("token",e.presignToken),n.hash=c,n.toString()});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.type){case"document-updated":e.onDocumentUpdated?.({documentId:o.data.documentId,externalId:o.data.externalId});break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,h))}}),D=["src"],g=t.defineComponent({__name:"update-template",props:{className:{},host:{},presignToken:{},templateId:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},additionalProps:{},onTemplateUpdated:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),n=new URL(`/embed/v1/authoring/template/edit/${e.templateId}`,o);return n.searchParams.set("token",e.presignToken),n.hash=c,n.toString()});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.type){case"template-updated":e.onTemplateUpdated?.({templateId:o.data.templateId,externalId:o.data.externalId});break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,D))}}),w=["src"],I=t.defineComponent({__name:"multisign-document",props:{className:{},host:{},tokens:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},name:{},lockName:{type:Boolean},allowDocumentRejection:{type:Boolean},additionalProps:{},onDocumentReady:{type:Function},onDocumentCompleted:{type:Function},onDocumentError:{type:Function},onDocumentRejected:{type:Function},onAllDocumentsCompleted:{type:Function}},setup(r){const e=r,a=t.ref();t.onMounted(()=>{window.addEventListener("message",s)}),t.onUnmounted(()=>{window.removeEventListener("message",s)});const d=t.computed(()=>{const o=e.host||"https://app.documenso.com",c=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps}))),n=new URL("/embed/v1/multisign",o);for(const m of e.tokens)n.searchParams.append("token",m);return`${n}#${c}`});function s(o){if(a.value?.contentWindow===o.source)switch(o.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(o.data.data);break;case"document-error":e.onDocumentError?.(o.data.data);break;case"document-rejected":e.onDocumentRejected?.(o.data.data);break;case"all-documents-completed":e.onAllDocumentsCompleted?.(o.data.data);break}}return(o,c)=>(t.openBlock(),t.createElementBlock("iframe",{ref_key:"__iframe",ref:a,class:t.normalizeClass(o.className),src:d.value},null,10,w))}});exports.EmbedDirectTemplate=l;exports.EmbedSignDocument=u;exports.unstable_EmbedCreateDocument=k;exports.unstable_EmbedCreateTemplate=b;exports.unstable_EmbedMultiSignDocument=I;exports.unstable_EmbedUpdateDocument=y;exports.unstable_EmbedUpdateTemplate=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),f=["src"],k=n.defineComponent({__name:"direct-template",props:{className:{},host:{},token:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},email:{},lockEmail:{type:Boolean},name:{},lockName:{type:Boolean},additionalProps:{},onDocumentReady:{type:Function},onDocumentCompleted:{type:Function},onDocumentError:{type:Function},onFieldSigned:{type:Function},onFieldUnsigned:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,email:e.email,lockEmail:e.lockEmail,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),o=new URL(`/embed/direct/${e.token}`,t);return e.externalId&&o.searchParams.set("externalId",e.externalId),`${o}#${d}`});function c(t){if(s.value?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"field-signed":e.onFieldSigned?.();break;case"field-unsigned":e.onFieldUnsigned?.();break}}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,f))}}),_=["src"],b=n.defineComponent({__name:"sign-document",props:{className:{},host:{},token:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},name:{},lockName:{type:Boolean},allowDocumentRejection:{type:Boolean},additionalProps:{},onDocumentReady:{type:Function},onDocumentCompleted:{type:Function},onDocumentError:{type:Function},onDocumentRejected:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps})));return`${new URL(`/embed/sign/${e.token}`,t)}#${d}`});function c(t){if(s.value?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break}}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,_))}}),y=["src"],l=n.defineComponent({__name:"create-document",props:{className:{},host:{},presignToken:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},additionalProps:{},onDocumentCreated:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),o=new URL("/embed/v1/authoring/document/create",t);return o.searchParams.set("token",e.presignToken),o.hash=d,o.toString()});function c(t){s.value?.contentWindow===t.source&&t.data.type==="document-created"&&e.onDocumentCreated?.({documentId:t.data.documentId,externalId:t.data.externalId})}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,y))}}),h=["src"],m=n.defineComponent({__name:"create-template",props:{className:{},host:{},presignToken:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},additionalProps:{},onTemplateCreated:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,...e.additionalProps}))),o=new URL("/embed/v1/authoring/template/create",t);return o.searchParams.set("token",e.presignToken),o.hash=d,o.toString()});function c(t){s.value?.contentWindow===t.source&&t.data.type==="template-created"&&e.onTemplateCreated?.({templateId:t.data.templateId,externalId:t.data.externalId})}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,h))}}),D=["src"],i=n.defineComponent({__name:"update-document",props:{className:{},host:{},presignToken:{},documentId:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},onlyEditFields:{type:Boolean},additionalProps:{},onDocumentUpdated:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({token:e.presignToken,externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),o=new URL(`/embed/v1/authoring/document/edit/${e.documentId}`,t);return o.searchParams.set("token",e.presignToken),o.hash=d,o.toString()});function c(t){s.value?.contentWindow===t.source&&t.data.type==="document-updated"&&e.onDocumentUpdated?.({documentId:t.data.documentId,externalId:t.data.externalId})}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,D))}}),g=["src"],u=n.defineComponent({__name:"update-template",props:{className:{},host:{},presignToken:{},templateId:{},externalId:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},features:{},onlyEditFields:{type:Boolean},additionalProps:{},onTemplateUpdated:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({externalId:e.externalId,features:e.features,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,onlyEditFields:e.onlyEditFields,...e.additionalProps}))),o=new URL(`/embed/v1/authoring/template/edit/${e.templateId}`,t);return o.searchParams.set("token",e.presignToken),o.hash=d,o.toString()});function c(t){s.value?.contentWindow===t.source&&t.data.type==="template-updated"&&e.onTemplateUpdated?.({templateId:t.data.templateId,externalId:t.data.externalId})}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,g))}}),w=["src"],E=n.defineComponent({__name:"multisign-document",props:{className:{},host:{},tokens:{},css:{},cssVars:{},darkModeDisabled:{type:Boolean},name:{},lockName:{type:Boolean},allowDocumentRejection:{type:Boolean},additionalProps:{},onDocumentReady:{type:Function},onDocumentCompleted:{type:Function},onDocumentError:{type:Function},onDocumentRejected:{type:Function},onAllDocumentsCompleted:{type:Function}},setup(a){const e=a,s=n.ref(null);n.onMounted(()=>{window.addEventListener("message",c)}),n.onUnmounted(()=>{window.removeEventListener("message",c)});const r=n.computed(()=>{const t=e.host||"https://app.documenso.com",d=btoa(encodeURIComponent(JSON.stringify({name:e.name,lockName:e.lockName,css:e.css,cssVars:e.cssVars,darkModeDisabled:e.darkModeDisabled,allowDocumentRejection:e.allowDocumentRejection,...e.additionalProps}))),o=new URL("/embed/v1/multisign",t);for(const p of e.tokens)o.searchParams.append("token",p);return`${o}#${d}`});function c(t){if(s.value?.contentWindow===t.source)switch(t.data.action){case"document-ready":e.onDocumentReady?.();break;case"document-completed":e.onDocumentCompleted?.(t.data.data);break;case"document-error":e.onDocumentError?.(t.data.data);break;case"document-rejected":e.onDocumentRejected?.(t.data.data);break;case"all-documents-completed":e.onAllDocumentsCompleted?.(t.data.data);break}}return(t,d)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"__iframe",ref:s,class:n.normalizeClass(a.className),src:r.value},null,10,w))}});exports.EmbedCreateDocumentV1=l;exports.EmbedCreateTemplateV1=m;exports.EmbedDirectTemplate=k;exports.EmbedSignDocument=b;exports.EmbedUpdateDocumentV1=i;exports.EmbedUpdateTemplateV1=u;exports.unstable_EmbedCreateDocument=l;exports.unstable_EmbedCreateTemplate=m;exports.unstable_EmbedMultiSignDocument=E;exports.unstable_EmbedUpdateDocument=i;exports.unstable_EmbedUpdateTemplate=u;
package/dist/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
- import { defineComponent as d, ref as i, onMounted as m, onUnmounted as l, computed as p, createElementBlock as u, openBlock as _, normalizeClass as f } from "vue";
2
- const h = ["src"], U = /* @__PURE__ */ d({
1
+ import { defineComponent as r, ref as i, onMounted as l, onUnmounted as m, computed as u, openBlock as p, createElementBlock as f, normalizeClass as k } from "vue";
2
+ const b = ["src"], U = /* @__PURE__ */ r({
3
3
  __name: "direct-template",
4
4
  props: {
5
5
  className: {},
@@ -20,15 +20,15 @@ const h = ["src"], U = /* @__PURE__ */ d({
20
20
  onFieldSigned: { type: Function },
21
21
  onFieldUnsigned: { type: Function }
22
22
  },
23
- setup(c) {
24
- const e = c, s = i();
25
- m(() => {
23
+ setup(s) {
24
+ const e = s, n = i(null);
25
+ l(() => {
26
26
  window.addEventListener("message", o);
27
- }), l(() => {
27
+ }), m(() => {
28
28
  window.removeEventListener("message", o);
29
29
  });
30
- const r = p(() => {
31
- const t = e.host || "https://app.documenso.com", n = btoa(
30
+ const d = u(() => {
31
+ const t = e.host || "https://app.documenso.com", c = btoa(
32
32
  encodeURIComponent(
33
33
  JSON.stringify({
34
34
  name: e.name,
@@ -42,10 +42,10 @@ const h = ["src"], U = /* @__PURE__ */ d({
42
42
  })
43
43
  )
44
44
  ), a = new URL(`/embed/direct/${e.token}`, t);
45
- return e.externalId && a.searchParams.set("externalId", e.externalId), `${a}#${n}`;
45
+ return e.externalId && a.searchParams.set("externalId", e.externalId), `${a}#${c}`;
46
46
  });
47
47
  function o(t) {
48
- if (s.value?.contentWindow === t.source)
48
+ if (n.value?.contentWindow === t.source)
49
49
  switch (t.data.action) {
50
50
  case "document-ready":
51
51
  e.onDocumentReady?.();
@@ -64,14 +64,14 @@ const h = ["src"], U = /* @__PURE__ */ d({
64
64
  break;
65
65
  }
66
66
  }
67
- return (t, n) => (_(), u("iframe", {
67
+ return (t, c) => (p(), f("iframe", {
68
68
  ref_key: "__iframe",
69
- ref: s,
70
- class: f(t.className),
71
- src: r.value
72
- }, null, 10, h));
69
+ ref: n,
70
+ class: k(s.className),
71
+ src: d.value
72
+ }, null, 10, b));
73
73
  }
74
- }), b = ["src"], M = /* @__PURE__ */ d({
74
+ }), h = ["src"], x = /* @__PURE__ */ r({
75
75
  __name: "sign-document",
76
76
  props: {
77
77
  className: {},
@@ -89,15 +89,15 @@ const h = ["src"], U = /* @__PURE__ */ d({
89
89
  onDocumentError: { type: Function },
90
90
  onDocumentRejected: { type: Function }
91
91
  },
92
- setup(c) {
93
- const e = c, s = i();
94
- m(() => {
92
+ setup(s) {
93
+ const e = s, n = i(null);
94
+ l(() => {
95
95
  window.addEventListener("message", o);
96
- }), l(() => {
96
+ }), m(() => {
97
97
  window.removeEventListener("message", o);
98
98
  });
99
- const r = p(() => {
100
- const t = e.host || "https://app.documenso.com", n = btoa(
99
+ const d = u(() => {
100
+ const t = e.host || "https://app.documenso.com", c = btoa(
101
101
  encodeURIComponent(
102
102
  JSON.stringify({
103
103
  name: e.name,
@@ -110,10 +110,10 @@ const h = ["src"], U = /* @__PURE__ */ d({
110
110
  })
111
111
  )
112
112
  );
113
- return `${new URL(`/embed/sign/${e.token}`, t)}#${n}`;
113
+ return `${new URL(`/embed/sign/${e.token}`, t)}#${c}`;
114
114
  });
115
115
  function o(t) {
116
- if (s.value?.contentWindow === t.source)
116
+ if (n.value?.contentWindow === t.source)
117
117
  switch (t.data.action) {
118
118
  case "document-ready":
119
119
  e.onDocumentReady?.();
@@ -129,14 +129,14 @@ const h = ["src"], U = /* @__PURE__ */ d({
129
129
  break;
130
130
  }
131
131
  }
132
- return (t, n) => (_(), u("iframe", {
132
+ return (t, c) => (p(), f("iframe", {
133
133
  ref_key: "__iframe",
134
- ref: s,
135
- class: f(t.className),
136
- src: r.value
137
- }, null, 10, b));
134
+ ref: n,
135
+ class: k(s.className),
136
+ src: d.value
137
+ }, null, 10, h));
138
138
  }
139
- }), D = ["src"], N = /* @__PURE__ */ d({
139
+ }), y = ["src"], M = /* @__PURE__ */ r({
140
140
  __name: "create-document",
141
141
  props: {
142
142
  className: {},
@@ -150,15 +150,15 @@ const h = ["src"], U = /* @__PURE__ */ d({
150
150
  additionalProps: {},
151
151
  onDocumentCreated: { type: Function }
152
152
  },
153
- setup(c) {
154
- const e = c, s = i();
155
- m(() => {
153
+ setup(s) {
154
+ const e = s, n = i(null);
155
+ l(() => {
156
156
  window.addEventListener("message", o);
157
- }), l(() => {
157
+ }), m(() => {
158
158
  window.removeEventListener("message", o);
159
159
  });
160
- const r = p(() => {
161
- const t = e.host || "https://app.documenso.com", n = btoa(
160
+ const d = u(() => {
161
+ const t = e.host || "https://app.documenso.com", c = btoa(
162
162
  encodeURIComponent(
163
163
  JSON.stringify({
164
164
  externalId: e.externalId,
@@ -170,27 +170,22 @@ const h = ["src"], U = /* @__PURE__ */ d({
170
170
  })
171
171
  )
172
172
  ), a = new URL("/embed/v1/authoring/document/create", t);
173
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
173
+ return a.searchParams.set("token", e.presignToken), a.hash = c, a.toString();
174
174
  });
175
175
  function o(t) {
176
- if (s.value?.contentWindow === t.source)
177
- switch (t.data.type) {
178
- case "document-created":
179
- e.onDocumentCreated?.({
180
- documentId: t.data.documentId,
181
- externalId: t.data.externalId
182
- });
183
- break;
184
- }
176
+ n.value?.contentWindow === t.source && t.data.type === "document-created" && e.onDocumentCreated?.({
177
+ documentId: t.data.documentId,
178
+ externalId: t.data.externalId
179
+ });
185
180
  }
186
- return (t, n) => (_(), u("iframe", {
181
+ return (t, c) => (p(), f("iframe", {
187
182
  ref_key: "__iframe",
188
- ref: s,
189
- class: f(t.className),
190
- src: r.value
191
- }, null, 10, D));
183
+ ref: n,
184
+ class: k(s.className),
185
+ src: d.value
186
+ }, null, 10, y));
192
187
  }
193
- }), y = ["src"], R = /* @__PURE__ */ d({
188
+ }), D = ["src"], N = /* @__PURE__ */ r({
194
189
  __name: "create-template",
195
190
  props: {
196
191
  className: {},
@@ -204,15 +199,15 @@ const h = ["src"], U = /* @__PURE__ */ d({
204
199
  additionalProps: {},
205
200
  onTemplateCreated: { type: Function }
206
201
  },
207
- setup(c) {
208
- const e = c, s = i();
209
- m(() => {
202
+ setup(s) {
203
+ const e = s, n = i(null);
204
+ l(() => {
210
205
  window.addEventListener("message", o);
211
- }), l(() => {
206
+ }), m(() => {
212
207
  window.removeEventListener("message", o);
213
208
  });
214
- const r = p(() => {
215
- const t = e.host || "https://app.documenso.com", n = btoa(
209
+ const d = u(() => {
210
+ const t = e.host || "https://app.documenso.com", c = btoa(
216
211
  encodeURIComponent(
217
212
  JSON.stringify({
218
213
  externalId: e.externalId,
@@ -224,27 +219,22 @@ const h = ["src"], U = /* @__PURE__ */ d({
224
219
  })
225
220
  )
226
221
  ), a = new URL("/embed/v1/authoring/template/create", t);
227
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
222
+ return a.searchParams.set("token", e.presignToken), a.hash = c, a.toString();
228
223
  });
229
224
  function o(t) {
230
- if (s.value?.contentWindow === t.source)
231
- switch (t.data.type) {
232
- case "template-created":
233
- e.onTemplateCreated?.({
234
- templateId: t.data.templateId,
235
- externalId: t.data.externalId
236
- });
237
- break;
238
- }
225
+ n.value?.contentWindow === t.source && t.data.type === "template-created" && e.onTemplateCreated?.({
226
+ templateId: t.data.templateId,
227
+ externalId: t.data.externalId
228
+ });
239
229
  }
240
- return (t, n) => (_(), u("iframe", {
230
+ return (t, c) => (p(), f("iframe", {
241
231
  ref_key: "__iframe",
242
- ref: s,
243
- class: f(t.className),
244
- src: r.value
245
- }, null, 10, y));
232
+ ref: n,
233
+ class: k(s.className),
234
+ src: d.value
235
+ }, null, 10, D));
246
236
  }
247
- }), g = ["src"], x = /* @__PURE__ */ d({
237
+ }), g = ["src"], R = /* @__PURE__ */ r({
248
238
  __name: "update-document",
249
239
  props: {
250
240
  className: {},
@@ -256,18 +246,19 @@ const h = ["src"], U = /* @__PURE__ */ d({
256
246
  cssVars: {},
257
247
  darkModeDisabled: { type: Boolean },
258
248
  features: {},
249
+ onlyEditFields: { type: Boolean },
259
250
  additionalProps: {},
260
251
  onDocumentUpdated: { type: Function }
261
252
  },
262
- setup(c) {
263
- const e = c, s = i();
264
- m(() => {
253
+ setup(s) {
254
+ const e = s, n = i(null);
255
+ l(() => {
265
256
  window.addEventListener("message", o);
266
- }), l(() => {
257
+ }), m(() => {
267
258
  window.removeEventListener("message", o);
268
259
  });
269
- const r = p(() => {
270
- const t = e.host || "https://app.documenso.com", n = btoa(
260
+ const d = u(() => {
261
+ const t = e.host || "https://app.documenso.com", c = btoa(
271
262
  encodeURIComponent(
272
263
  JSON.stringify({
273
264
  token: e.presignToken,
@@ -276,6 +267,7 @@ const h = ["src"], U = /* @__PURE__ */ d({
276
267
  css: e.css,
277
268
  cssVars: e.cssVars,
278
269
  darkModeDisabled: e.darkModeDisabled,
270
+ onlyEditFields: e.onlyEditFields,
279
271
  ...e.additionalProps
280
272
  })
281
273
  )
@@ -283,27 +275,22 @@ const h = ["src"], U = /* @__PURE__ */ d({
283
275
  `/embed/v1/authoring/document/edit/${e.documentId}`,
284
276
  t
285
277
  );
286
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
278
+ return a.searchParams.set("token", e.presignToken), a.hash = c, a.toString();
287
279
  });
288
280
  function o(t) {
289
- if (s.value?.contentWindow === t.source)
290
- switch (t.data.type) {
291
- case "document-updated":
292
- e.onDocumentUpdated?.({
293
- documentId: t.data.documentId,
294
- externalId: t.data.externalId
295
- });
296
- break;
297
- }
281
+ n.value?.contentWindow === t.source && t.data.type === "document-updated" && e.onDocumentUpdated?.({
282
+ documentId: t.data.documentId,
283
+ externalId: t.data.externalId
284
+ });
298
285
  }
299
- return (t, n) => (_(), u("iframe", {
286
+ return (t, c) => (p(), f("iframe", {
300
287
  ref_key: "__iframe",
301
- ref: s,
302
- class: f(t.className),
303
- src: r.value
288
+ ref: n,
289
+ class: k(s.className),
290
+ src: d.value
304
291
  }, null, 10, g));
305
292
  }
306
- }), w = ["src"], C = /* @__PURE__ */ d({
293
+ }), w = ["src"], F = /* @__PURE__ */ r({
307
294
  __name: "update-template",
308
295
  props: {
309
296
  className: {},
@@ -315,18 +302,19 @@ const h = ["src"], U = /* @__PURE__ */ d({
315
302
  cssVars: {},
316
303
  darkModeDisabled: { type: Boolean },
317
304
  features: {},
305
+ onlyEditFields: { type: Boolean },
318
306
  additionalProps: {},
319
307
  onTemplateUpdated: { type: Function }
320
308
  },
321
- setup(c) {
322
- const e = c, s = i();
323
- m(() => {
309
+ setup(s) {
310
+ const e = s, n = i(null);
311
+ l(() => {
324
312
  window.addEventListener("message", o);
325
- }), l(() => {
313
+ }), m(() => {
326
314
  window.removeEventListener("message", o);
327
315
  });
328
- const r = p(() => {
329
- const t = e.host || "https://app.documenso.com", n = btoa(
316
+ const d = u(() => {
317
+ const t = e.host || "https://app.documenso.com", c = btoa(
330
318
  encodeURIComponent(
331
319
  JSON.stringify({
332
320
  externalId: e.externalId,
@@ -334,6 +322,7 @@ const h = ["src"], U = /* @__PURE__ */ d({
334
322
  css: e.css,
335
323
  cssVars: e.cssVars,
336
324
  darkModeDisabled: e.darkModeDisabled,
325
+ onlyEditFields: e.onlyEditFields,
337
326
  ...e.additionalProps
338
327
  })
339
328
  )
@@ -341,27 +330,22 @@ const h = ["src"], U = /* @__PURE__ */ d({
341
330
  `/embed/v1/authoring/template/edit/${e.templateId}`,
342
331
  t
343
332
  );
344
- return a.searchParams.set("token", e.presignToken), a.hash = n, a.toString();
333
+ return a.searchParams.set("token", e.presignToken), a.hash = c, a.toString();
345
334
  });
346
335
  function o(t) {
347
- if (s.value?.contentWindow === t.source)
348
- switch (t.data.type) {
349
- case "template-updated":
350
- e.onTemplateUpdated?.({
351
- templateId: t.data.templateId,
352
- externalId: t.data.externalId
353
- });
354
- break;
355
- }
336
+ n.value?.contentWindow === t.source && t.data.type === "template-updated" && e.onTemplateUpdated?.({
337
+ templateId: t.data.templateId,
338
+ externalId: t.data.externalId
339
+ });
356
340
  }
357
- return (t, n) => (_(), u("iframe", {
341
+ return (t, c) => (p(), f("iframe", {
358
342
  ref_key: "__iframe",
359
- ref: s,
360
- class: f(t.className),
361
- src: r.value
343
+ ref: n,
344
+ class: k(s.className),
345
+ src: d.value
362
346
  }, null, 10, w));
363
347
  }
364
- }), I = ["src"], F = /* @__PURE__ */ d({
348
+ }), I = ["src"], C = /* @__PURE__ */ r({
365
349
  __name: "multisign-document",
366
350
  props: {
367
351
  className: {},
@@ -380,15 +364,15 @@ const h = ["src"], U = /* @__PURE__ */ d({
380
364
  onDocumentRejected: { type: Function },
381
365
  onAllDocumentsCompleted: { type: Function }
382
366
  },
383
- setup(c) {
384
- const e = c, s = i();
385
- m(() => {
367
+ setup(s) {
368
+ const e = s, n = i(null);
369
+ l(() => {
386
370
  window.addEventListener("message", o);
387
- }), l(() => {
371
+ }), m(() => {
388
372
  window.removeEventListener("message", o);
389
373
  });
390
- const r = p(() => {
391
- const t = e.host || "https://app.documenso.com", n = btoa(
374
+ const d = u(() => {
375
+ const t = e.host || "https://app.documenso.com", c = btoa(
392
376
  encodeURIComponent(
393
377
  JSON.stringify({
394
378
  name: e.name,
@@ -401,12 +385,12 @@ const h = ["src"], U = /* @__PURE__ */ d({
401
385
  })
402
386
  )
403
387
  ), a = new URL("/embed/v1/multisign", t);
404
- for (const k of e.tokens)
405
- a.searchParams.append("token", k);
406
- return `${a}#${n}`;
388
+ for (const _ of e.tokens)
389
+ a.searchParams.append("token", _);
390
+ return `${a}#${c}`;
407
391
  });
408
392
  function o(t) {
409
- if (s.value?.contentWindow === t.source)
393
+ if (n.value?.contentWindow === t.source)
410
394
  switch (t.data.action) {
411
395
  case "document-ready":
412
396
  e.onDocumentReady?.();
@@ -425,20 +409,24 @@ const h = ["src"], U = /* @__PURE__ */ d({
425
409
  break;
426
410
  }
427
411
  }
428
- return (t, n) => (_(), u("iframe", {
412
+ return (t, c) => (p(), f("iframe", {
429
413
  ref_key: "__iframe",
430
- ref: s,
431
- class: f(t.className),
432
- src: r.value
414
+ ref: n,
415
+ class: k(s.className),
416
+ src: d.value
433
417
  }, null, 10, I));
434
418
  }
435
419
  });
436
420
  export {
421
+ M as EmbedCreateDocumentV1,
422
+ N as EmbedCreateTemplateV1,
437
423
  U as EmbedDirectTemplate,
438
- M as EmbedSignDocument,
439
- N as unstable_EmbedCreateDocument,
440
- R as unstable_EmbedCreateTemplate,
441
- F as unstable_EmbedMultiSignDocument,
442
- x as unstable_EmbedUpdateDocument,
443
- C as unstable_EmbedUpdateTemplate
424
+ x as EmbedSignDocument,
425
+ R as EmbedUpdateDocumentV1,
426
+ F as EmbedUpdateTemplateV1,
427
+ M as unstable_EmbedCreateDocument,
428
+ N as unstable_EmbedCreateTemplate,
429
+ C as unstable_EmbedMultiSignDocument,
430
+ R as unstable_EmbedUpdateDocument,
431
+ F as unstable_EmbedUpdateTemplate
444
432
  };
@@ -33,14 +33,7 @@ export type EmbedMultiSignDocumentProps = {
33
33
  }>;
34
34
  }) => void;
35
35
  };
36
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedMultiSignDocumentProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedMultiSignDocumentProps>>>, {}, {}>;
36
+ declare const _default: import('vue').DefineComponent<EmbedMultiSignDocumentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedMultiSignDocumentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
37
+ __iframe: HTMLIFrameElement;
38
+ }, HTMLIFrameElement>;
37
39
  export default _default;
38
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
39
- type __VLS_TypePropsToOption<T> = {
40
- [K in keyof T]-?: {} extends Pick<T, K> ? {
41
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
42
- } : {
43
- type: import('vue').PropType<T[K]>;
44
- required: true;
45
- };
46
- };
@@ -24,14 +24,7 @@ export type EmbedSignDocumentProps = {
24
24
  reason: string;
25
25
  }) => void;
26
26
  };
27
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedSignDocumentProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedSignDocumentProps>>>, {}, {}>;
27
+ declare const _default: import('vue').DefineComponent<EmbedSignDocumentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedSignDocumentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
28
+ __iframe: HTMLIFrameElement;
29
+ }, HTMLIFrameElement>;
28
30
  export default _default;
29
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
30
- type __VLS_TypePropsToOption<T> = {
31
- [K in keyof T]-?: {} extends Pick<T, K> ? {
32
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
33
- } : {
34
- type: import('vue').PropType<T[K]>;
35
- required: true;
36
- };
37
- };
@@ -16,20 +16,14 @@ export type EmbedUpdateDocumentProps = {
16
16
  allowConfigureRedirectUrl?: boolean;
17
17
  allowConfigureCommunication?: boolean;
18
18
  };
19
+ onlyEditFields?: boolean | undefined;
19
20
  additionalProps?: Record<string, string | number | boolean> | undefined;
20
21
  onDocumentUpdated?: (data: {
21
22
  externalId: string;
22
23
  documentId: number;
23
24
  }) => void;
24
25
  };
25
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedUpdateDocumentProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedUpdateDocumentProps>>>, {}, {}>;
26
+ declare const _default: import('vue').DefineComponent<EmbedUpdateDocumentProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedUpdateDocumentProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ __iframe: HTMLIFrameElement;
28
+ }, HTMLIFrameElement>;
26
29
  export default _default;
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: import('vue').PropType<T[K]>;
33
- required: true;
34
- };
35
- };
@@ -16,20 +16,14 @@ export type EmbedUpdateTemplateProps = {
16
16
  allowConfigureRedirectUrl?: boolean;
17
17
  allowConfigureCommunication?: boolean;
18
18
  };
19
+ onlyEditFields?: boolean | undefined;
19
20
  additionalProps?: Record<string, string | number | boolean> | undefined;
20
21
  onTemplateUpdated?: (data: {
21
22
  externalId: string;
22
23
  templateId: number;
23
24
  }) => void;
24
25
  };
25
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToOption<EmbedUpdateTemplateProps>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<globalThis.ExtractPropTypes<__VLS_TypePropsToOption<EmbedUpdateTemplateProps>>>, {}, {}>;
26
+ declare const _default: import('vue').DefineComponent<EmbedUpdateTemplateProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<EmbedUpdateTemplateProps> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ __iframe: HTMLIFrameElement;
28
+ }, HTMLIFrameElement>;
26
29
  export default _default;
27
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
28
- type __VLS_TypePropsToOption<T> = {
29
- [K in keyof T]-?: {} extends Pick<T, K> ? {
30
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
31
- } : {
32
- type: import('vue').PropType<T[K]>;
33
- required: true;
34
- };
35
- };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@documenso/embed-vue",
3
- "version": "0.3.0",
3
+ "version": "0.5.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "dist"
@@ -36,9 +36,10 @@
36
36
  },
37
37
  "devDependencies": {
38
38
  "@documenso/embed": "*",
39
- "@vitejs/plugin-vue": "^5.1.3",
40
- "unplugin-auto-import": "^0.18.2",
41
- "vite": "7.0.2",
42
- "vite-plugin-dts": "^4.1.0"
39
+ "@vitejs/plugin-vue": "^5.0.0",
40
+ "unplugin-auto-import": "^0.18.0",
41
+ "vite": "^7.0.0",
42
+ "vite-plugin-dts": "^4.0.0",
43
+ "vue": "^3.0.0"
43
44
  }
44
45
  }