@verdocs/web-sdk 2.3.9 → 2.3.11

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.
Files changed (186) hide show
  1. package/dist/cjs/{Profiles-54271244.js → Profiles-1a26e4eb.js} +0 -34
  2. package/dist/cjs/{TemplateStore-5a4a177f.js → TemplateStore-192c6cf1.js} +1 -1
  3. package/dist/cjs/{VerdocsEndpoint-feb02bbc.js → VerdocsEndpoint-33b643eb.js} +6 -30
  4. package/dist/cjs/interact.min-a61b43b3.js +12 -0
  5. package/dist/cjs/ipc-test.cjs.entry.js +2 -2
  6. package/dist/cjs/loader.cjs.js +1 -1
  7. package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
  8. package/dist/cjs/verdocs-auth.cjs.entry.js +4 -27
  9. package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
  10. package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
  11. package/dist/cjs/verdocs-contact-picker_3.cjs.entry.js +1 -1
  12. package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
  13. package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
  14. package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
  15. package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
  16. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -2
  17. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -2
  18. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  19. package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +2 -1
  20. package/dist/cjs/verdocs-preview_8.cjs.entry.js +2 -2
  21. package/dist/cjs/verdocs-quick-functions_2.cjs.entry.js +1 -1
  22. package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
  23. package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +26 -4
  24. package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
  25. package/dist/cjs/verdocs-sign.cjs.entry.js +6 -4
  26. package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
  27. package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +3 -3
  28. package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
  29. package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
  30. package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
  31. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  32. package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +20 -1
  33. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +2 -27
  34. package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +6 -3
  35. package/dist/components/VerdocsEndpoint.js +6 -30
  36. package/dist/components/interact.min.js +2 -2
  37. package/dist/components/verdocs-auth.js +8 -39
  38. package/dist/components/verdocs-ok-dialog2.js +3 -1
  39. package/dist/components/verdocs-settings-organization2.js +22 -1
  40. package/dist/components/verdocs-sign.js +6 -3
  41. package/dist/custom-elements.json +2067 -0
  42. package/dist/docs.json +18 -13
  43. package/dist/esm/{Profiles-4cc942ef.js → Profiles-d4df4d1c.js} +1 -32
  44. package/dist/esm/{TemplateStore-14f723bf.js → TemplateStore-7149eda0.js} +1 -1
  45. package/dist/esm/{VerdocsEndpoint-a59ded42.js → VerdocsEndpoint-7922d31f.js} +6 -30
  46. package/dist/esm/interact.min-6a7b19a1.js +10 -0
  47. package/dist/esm/ipc-test.entry.js +2 -2
  48. package/dist/esm/loader.js +1 -1
  49. package/dist/esm/verdocs-activity-box.entry.js +1 -1
  50. package/dist/esm/verdocs-auth.entry.js +4 -27
  51. package/dist/esm/verdocs-build.entry.js +2 -2
  52. package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
  53. package/dist/esm/verdocs-contact-picker_3.entry.js +1 -1
  54. package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
  55. package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
  56. package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
  57. package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
  58. package/dist/esm/verdocs-field-textarea.entry.js +2 -2
  59. package/dist/esm/verdocs-field-textbox.entry.js +2 -2
  60. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  61. package/dist/esm/verdocs-ok-dialog.entry.js +2 -1
  62. package/dist/esm/verdocs-preview_8.entry.js +2 -2
  63. package/dist/esm/verdocs-quick-functions_2.entry.js +1 -1
  64. package/dist/esm/verdocs-search.entry.js +1 -1
  65. package/dist/esm/verdocs-settings-api-keys_4.entry.js +24 -2
  66. package/dist/esm/verdocs-settings.entry.js +1 -1
  67. package/dist/esm/verdocs-sign.entry.js +6 -4
  68. package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
  69. package/dist/esm/verdocs-template-fields_4.entry.js +3 -3
  70. package/dist/esm/verdocs-template-star.entry.js +1 -1
  71. package/dist/esm/verdocs-templates-list.entry.js +1 -1
  72. package/dist/esm/verdocs-view.entry.js +1 -1
  73. package/dist/esm/verdocs-web-sdk.js +1 -1
  74. package/dist/esm-es5/Profiles-d4df4d1c.js +1 -0
  75. package/dist/esm-es5/{TemplateStore-14f723bf.js → TemplateStore-7149eda0.js} +1 -1
  76. package/dist/esm-es5/{VerdocsEndpoint-a59ded42.js → VerdocsEndpoint-7922d31f.js} +1 -1
  77. package/dist/esm-es5/interact.min-6a7b19a1.js +1 -0
  78. package/dist/esm-es5/ipc-test.entry.js +1 -1
  79. package/dist/esm-es5/loader.js +1 -1
  80. package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
  81. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  82. package/dist/esm-es5/verdocs-build.entry.js +1 -1
  83. package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
  84. package/dist/esm-es5/verdocs-contact-picker_3.entry.js +1 -1
  85. package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
  86. package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
  87. package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
  88. package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
  89. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  90. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  91. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  92. package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
  93. package/dist/esm-es5/verdocs-preview_8.entry.js +1 -1
  94. package/dist/esm-es5/verdocs-quick-functions_2.entry.js +1 -1
  95. package/dist/esm-es5/verdocs-search.entry.js +1 -1
  96. package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
  97. package/dist/esm-es5/verdocs-settings.entry.js +1 -1
  98. package/dist/esm-es5/verdocs-sign.entry.js +1 -1
  99. package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
  100. package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
  101. package/dist/esm-es5/verdocs-template-star.entry.js +1 -1
  102. package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
  103. package/dist/esm-es5/verdocs-view.entry.js +1 -1
  104. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  105. package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +4 -0
  106. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
  107. package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
  108. package/dist/types/components.d.ts +8 -0
  109. package/dist/types/utils/utils.d.ts +1 -1
  110. package/dist/verdocs-web-sdk/{p-845e40ca.system.entry.js → p-0419a39f.system.entry.js} +1 -1
  111. package/dist/verdocs-web-sdk/{p-b5f563b7.entry.js → p-0549358c.entry.js} +1 -1
  112. package/dist/verdocs-web-sdk/{p-c771e768.entry.js → p-05b3034f.entry.js} +1 -1
  113. package/dist/verdocs-web-sdk/{p-cb04a8a5.system.entry.js → p-06fb711b.system.entry.js} +1 -1
  114. package/dist/verdocs-web-sdk/{p-5b003315.entry.js → p-083bdbc6.entry.js} +1 -1
  115. package/dist/verdocs-web-sdk/{p-81c9f299.system.entry.js → p-0c157d55.system.entry.js} +1 -1
  116. package/dist/verdocs-web-sdk/{p-488a92e4.system.entry.js → p-14b08edd.system.entry.js} +1 -1
  117. package/dist/verdocs-web-sdk/{p-d5cb5e29.system.js → p-19ff8f86.system.js} +1 -1
  118. package/dist/verdocs-web-sdk/{p-066729d2.system.entry.js → p-1a3168af.system.entry.js} +1 -1
  119. package/dist/verdocs-web-sdk/{p-f4567d98.entry.js → p-1efd342e.entry.js} +1 -1
  120. package/dist/verdocs-web-sdk/{p-458a3445.system.js → p-1fdb236c.system.js} +1 -1
  121. package/dist/verdocs-web-sdk/{p-d97c481a.entry.js → p-2c47b92e.entry.js} +1 -1
  122. package/dist/verdocs-web-sdk/p-2fe75327.entry.js +1 -0
  123. package/dist/verdocs-web-sdk/{p-7b392b3f.entry.js → p-3019b350.entry.js} +1 -1
  124. package/dist/verdocs-web-sdk/{p-3b582da3.system.entry.js → p-345f88a3.system.entry.js} +1 -1
  125. package/dist/verdocs-web-sdk/{p-32285d2e.system.entry.js → p-38679b8e.system.entry.js} +1 -1
  126. package/dist/verdocs-web-sdk/{p-4c5ce44f.system.entry.js → p-39f3f620.system.entry.js} +1 -1
  127. package/dist/verdocs-web-sdk/p-3e607686.js +1 -0
  128. package/dist/verdocs-web-sdk/{p-c2498224.entry.js → p-3f5fb65b.entry.js} +1 -1
  129. package/dist/verdocs-web-sdk/{p-5d17a274.system.entry.js → p-3f837e30.system.entry.js} +1 -1
  130. package/dist/verdocs-web-sdk/{p-089a9c0e.system.entry.js → p-401a49cb.system.entry.js} +1 -1
  131. package/dist/verdocs-web-sdk/{p-cfde5c2b.entry.js → p-47460aa0.entry.js} +1 -1
  132. package/dist/verdocs-web-sdk/{p-09b15e4b.system.entry.js → p-4a1bc6e3.system.entry.js} +1 -1
  133. package/dist/verdocs-web-sdk/{p-bca93ee8.entry.js → p-4a3238f6.entry.js} +1 -1
  134. package/dist/verdocs-web-sdk/{p-4ee0a68f.entry.js → p-599fa850.entry.js} +1 -1
  135. package/dist/verdocs-web-sdk/{p-072714e2.system.entry.js → p-59c44eee.system.entry.js} +1 -1
  136. package/dist/verdocs-web-sdk/{p-79cec67a.js → p-5aee3e25.js} +1 -1
  137. package/dist/verdocs-web-sdk/{p-a04c9aa5.system.entry.js → p-5f434764.system.entry.js} +1 -1
  138. package/dist/verdocs-web-sdk/{p-b00e0b8f.entry.js → p-6827df7b.entry.js} +1 -1
  139. package/dist/verdocs-web-sdk/p-6a13105b.entry.js +1 -0
  140. package/dist/verdocs-web-sdk/{p-ee316cf1.entry.js → p-6b1735f4.entry.js} +1 -1
  141. package/dist/verdocs-web-sdk/{p-d3c8a413.system.entry.js → p-6d70fc87.system.entry.js} +1 -1
  142. package/dist/verdocs-web-sdk/{p-cd38f66f.system.entry.js → p-7144ab8e.system.entry.js} +1 -1
  143. package/dist/verdocs-web-sdk/{p-94abe272.entry.js → p-73b9ef06.entry.js} +1 -1
  144. package/dist/verdocs-web-sdk/{p-b20e7165.entry.js → p-7be5cb8c.entry.js} +1 -1
  145. package/dist/verdocs-web-sdk/{p-023787bb.system.entry.js → p-7cbe51d8.system.entry.js} +1 -1
  146. package/dist/verdocs-web-sdk/p-90d54d8a.system.entry.js +1 -0
  147. package/dist/verdocs-web-sdk/p-915883e6.js +1 -0
  148. package/dist/verdocs-web-sdk/{p-650acfb1.entry.js → p-974b4c02.entry.js} +1 -1
  149. package/dist/verdocs-web-sdk/{p-2e5e0966.system.entry.js → p-9c2bec77.system.entry.js} +1 -1
  150. package/dist/verdocs-web-sdk/p-9dcb8b6c.system.entry.js +1 -0
  151. package/dist/verdocs-web-sdk/{p-9efafb64.system.entry.js → p-a59064f7.system.entry.js} +1 -1
  152. package/dist/verdocs-web-sdk/{p-9c80493a.js → p-b101fae2.js} +1 -1
  153. package/dist/verdocs-web-sdk/p-cd20fb77.system.js +1 -0
  154. package/dist/verdocs-web-sdk/{p-043e7ab7.entry.js → p-ce00ee85.entry.js} +1 -1
  155. package/dist/verdocs-web-sdk/{p-013d1556.system.entry.js → p-d1ea580b.system.entry.js} +1 -1
  156. package/dist/verdocs-web-sdk/{p-9ef5c58b.system.entry.js → p-d2cee107.system.entry.js} +1 -1
  157. package/dist/verdocs-web-sdk/{p-55af24a2.system.entry.js → p-d7dbeec3.system.entry.js} +1 -1
  158. package/dist/verdocs-web-sdk/{p-1c03ac0b.system.entry.js → p-da1c0295.system.entry.js} +1 -1
  159. package/dist/verdocs-web-sdk/{p-5e45b8a2.entry.js → p-dd277e69.entry.js} +1 -1
  160. package/dist/verdocs-web-sdk/p-e2ae3679.entry.js +1 -0
  161. package/dist/verdocs-web-sdk/p-e2ff37fb.system.js +1 -0
  162. package/dist/verdocs-web-sdk/{p-79650407.entry.js → p-e6b68ad5.entry.js} +1 -1
  163. package/dist/verdocs-web-sdk/{p-627c6d20.entry.js → p-ecb7ea02.entry.js} +1 -1
  164. package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
  165. package/dist/verdocs-web-sdk/{p-352b68e9.entry.js → p-f3a1060a.entry.js} +1 -1
  166. package/dist/verdocs-web-sdk/{p-cddce91f.entry.js → p-f49cb84b.entry.js} +1 -1
  167. package/dist/verdocs-web-sdk/p-fa1621c8.system.entry.js +1 -0
  168. package/dist/verdocs-web-sdk/p-fdf0a9de.entry.js +1 -0
  169. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  170. package/package.json +4 -4
  171. package/dist/cjs/interact.min-7c05ff8a.js +0 -12
  172. package/dist/components/Organizations.js +0 -32
  173. package/dist/esm/interact.min-ef5402f3.js +0 -10
  174. package/dist/esm-es5/Profiles-4cc942ef.js +0 -1
  175. package/dist/esm-es5/interact.min-ef5402f3.js +0 -1
  176. package/dist/verdocs-web-sdk/p-04580be0.entry.js +0 -1
  177. package/dist/verdocs-web-sdk/p-22776bcd.system.entry.js +0 -1
  178. package/dist/verdocs-web-sdk/p-22cc7e6f.system.entry.js +0 -1
  179. package/dist/verdocs-web-sdk/p-4efdd0a7.system.entry.js +0 -1
  180. package/dist/verdocs-web-sdk/p-5b1271df.entry.js +0 -1
  181. package/dist/verdocs-web-sdk/p-91485eb2.entry.js +0 -1
  182. package/dist/verdocs-web-sdk/p-983da2f6.js +0 -1
  183. package/dist/verdocs-web-sdk/p-999fbe79.js +0 -1
  184. package/dist/verdocs-web-sdk/p-f65a1b9e.system.js +0 -1
  185. package/dist/verdocs-web-sdk/p-fcd0a40a.system.js +0 -1
  186. package/dist/verdocs-web-sdk/p-fde4ec0a.entry.js +0 -1
@@ -1,14 +1,10 @@
1
1
  import { Token } from '@verdocs/js-sdk/Utils';
2
2
  import { VerdocsEndpoint } from '@verdocs/js-sdk';
3
3
  import { Auth, Profiles } from '@verdocs/js-sdk/Users';
4
- import { Organizations } from '@verdocs/js-sdk/Organizations';
5
4
  import { h } from '@stencil/core';
6
5
  import { VerdocsToast } from '../../../utils/Toast';
7
6
  import { SDKError } from '../../../utils/errors';
8
7
  const RECHECK_INTERVAL = 5000;
9
- const OkIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="green"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>`;
10
- const TakenIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="red"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" /></svg>`;
11
- const InfoIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="#4a4a4a"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 01-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 01-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 01-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584zM12 18a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" /></svg>`;
12
8
  const Industries = [
13
9
  { value: '', label: '' },
14
10
  { value: 'Accounting & Tax', label: 'Accounting & Tax' },
@@ -89,7 +85,6 @@ export class VerdocsAuth {
89
85
  this.isAuthenticated = false;
90
86
  this.displayMode = 'login';
91
87
  this.orgname = '';
92
- this.orgAvailable = 'UNKNOWN';
93
88
  this.first = '';
94
89
  this.last = '';
95
90
  this.username = '';
@@ -249,23 +244,6 @@ export class VerdocsAuth {
249
244
  this.submitting = false;
250
245
  });
251
246
  }
252
- async checkAvailability(name) {
253
- this.checkingOrg = true;
254
- try {
255
- this.orgname = name;
256
- const r = await Organizations.isOrgAvailable(this.endpoint, name);
257
- this.orgAvailable = r.result;
258
- console.log('response', this.orgAvailable);
259
- // Stage: POST - https://2r8pilqa44.execute-api.us-east-1.amazonaws.com/organizations/check-availability
260
- // Prod: POST - https://lb1is9fxoc.execute-api.us-east-1.amazonaws.com/organizations/check-availability
261
- }
262
- catch (e) {
263
- // NOP
264
- // We need to trap this error because we get a 400 if the org name is invalid.
265
- this.orgAvailable = 'UNKNOWN';
266
- }
267
- this.checkingOrg = false;
268
- }
269
247
  render() {
270
248
  if (!this.visible) {
271
249
  return h("div", { style: { display: 'none' } }, "Authenticated");
@@ -274,10 +252,8 @@ export class VerdocsAuth {
274
252
  return (h("verdocs-button", { label: "Sign Out", disabled: this.submitting, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
275
253
  }
276
254
  if (this.displayMode === 'signup') {
277
- const step1Invalid = this.submitting || !this.first || !this.last || !this.username || !this.password || !this.orgname || this.orgAvailable !== 'AVAILABLE';
278
- return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Sign up for a trial account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })), this.signupStep === 1 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", required: true, value: this.first, onInput: (e) => (this.first = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", required: true, value: this.last, onInput: (e) => (this.last = e.target.value), disabled: this.submitting })), h("verdocs-text-input", { label: "Email", autocomplete: "email", required: true, value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Phone #", autocomplete: "phone", value: this.phone, onInput: (e) => (this.phone = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '10px', alignItems: 'center' } }, h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.orgname, onInput: (e) => this.checkAvailability(e.target.value), disabled: this.submitting, style: { flex: '1' }, onBlur: () => {
279
- console.log('blur');
280
- } }), !this.checkingOrg && this.orgAvailable === 'AVAILABLE' && h("verdocs-help-icon", { icon: OkIcon, text: "Organization name is available." }), !this.checkingOrg && this.orgAvailable === 'TAKEN' && h("verdocs-help-icon", { icon: TakenIcon, text: "Organization already registered." }), !this.checkingOrg && this.orgAvailable === 'UNKNOWN' && h("verdocs-help-icon", { icon: InfoIcon, text: "Organization name must be unique." }), this.checkingOrg && h("verdocs-spinner", { mode: "dark", size: 24 })), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: step1Invalid, onClick: () => (this.signupStep = 2), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.signupStep === 2 && (h("form", { onSubmit: () => this.handleSignup() }, h("verdocs-text-input", { label: "How did you hear about Verdocs?", value: this.howHear, onInput: (e) => (this.howHear = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Your Industry", options: Industries, value: this.industry, onInput: (e) => (this.industry = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Company Size", options: CompanySizes, value: this.companySize, onInput: (e) => (this.companySize = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Purpose", options: Reasons, value: this.reason, onInput: (e) => (this.reason = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Create Account", disabled: this.submitting, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.signupStep === 3 && (h("form", { onSubmit: () => this.handleSignup() }, h("p", null, "Please check your e-mail inbox for a verification code and follow the instructions provided."), h("p", null, h("em", null, "Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ", h("a", { href: "#" }, "Click Here"), " to resend it. Be sure to check your spam folder.")), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '20px' } }, h("verdocs-button", { label: "Back", disabled: this.submitting, onClick: () => {
255
+ const step1Invalid = this.submitting || !this.first || !this.last || !this.username || !this.password || !this.orgname;
256
+ return (h("div", { class: "form" }, h("a", { href: "https://verdocs.com/en/" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" })), h("h3", null, "Sign up for a trial account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })), this.signupStep === 1 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", required: true, value: this.first, onInput: (e) => (this.first = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", required: true, value: this.last, onInput: (e) => (this.last = e.target.value), disabled: this.submitting })), h("verdocs-text-input", { label: "Email", autocomplete: "email", required: true, value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Phone #", autocomplete: "phone", value: this.phone, onInput: (e) => (this.phone = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.orgname, onInput: (e) => (this.orgname = e.target.value), disabled: this.submitting, style: { flex: '1' } }), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: step1Invalid, onClick: () => (this.signupStep = 2), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.signupStep === 2 && (h("form", { onSubmit: () => this.handleSignup() }, h("verdocs-text-input", { label: "How did you hear about Verdocs?", value: this.howHear, onInput: (e) => (this.howHear = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Your Industry", options: Industries, value: this.industry, onInput: (e) => (this.industry = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Company Size", options: CompanySizes, value: this.companySize, onInput: (e) => (this.companySize = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Purpose", options: Reasons, value: this.reason, onInput: (e) => (this.reason = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Create Account", disabled: this.submitting, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.signupStep === 3 && (h("form", { onSubmit: () => this.handleSignup() }, h("p", null, "Please check your e-mail inbox for a verification code and follow the instructions provided."), h("p", null, h("em", null, "Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ", h("a", { href: "#" }, "Click Here"), " to resend it. Be sure to check your spam folder.")), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '20px' } }, h("verdocs-button", { label: "Back", disabled: this.submitting, onClick: () => {
281
257
  this.signupStep = 2;
282
258
  }, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }), h("verdocs-button", { label: "Go to Dashboard", disabled: true, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))))));
283
259
  }
@@ -374,7 +350,6 @@ export class VerdocsAuth {
374
350
  "isAuthenticated": {},
375
351
  "displayMode": {},
376
352
  "orgname": {},
377
- "orgAvailable": {},
378
353
  "first": {},
379
354
  "last": {},
380
355
  "username": {},
@@ -62,6 +62,7 @@ export class VerdocsSign {
62
62
  this.submitting = false;
63
63
  this.isDone = false;
64
64
  this.showDone = false;
65
+ this.showLoadError = false;
65
66
  this.finishLater = false;
66
67
  this.showFinishLater = false;
67
68
  this.agreed = false;
@@ -127,6 +128,7 @@ export class VerdocsSign {
127
128
  catch (e) {
128
129
  console.log('Error with signing session', e);
129
130
  (_e = this.sdkError) === null || _e === void 0 ? void 0 : _e.emit(new SDKError(e.message, (_f = e.response) === null || _f === void 0 ? void 0 : _f.status, (_g = e.response) === null || _g === void 0 ? void 0 : _g.data));
131
+ this.showLoadError = true;
130
132
  }
131
133
  }
132
134
  componentDidRender() {
@@ -253,9 +255,7 @@ export class VerdocsSign {
253
255
  if (!e.detail) {
254
256
  return;
255
257
  }
256
- console.log('Creating signature blob', e.detail);
257
258
  const signatureBlob = await (await fetch(e.detail)).blob();
258
- console.log('Created signature blob', signatureBlob);
259
259
  return createSignature(this.endpoint, 'signature', signatureBlob) //
260
260
  .then(async (newSignature) => {
261
261
  console.log('Signature update result', newSignature);
@@ -378,7 +378,6 @@ export class VerdocsSign {
378
378
  if (invalidFields.length < 1) {
379
379
  this.nextButtonLabel = 'Finish';
380
380
  if (!this.nextSubmits) {
381
- // this.showSubmitDialog = true;
382
381
  this.nextSubmits = true;
383
382
  }
384
383
  }
@@ -491,6 +490,9 @@ export class VerdocsSign {
491
490
  })), this.showFinishLater && (h("verdocs-ok-dialog", { heading: "You've saved your document to finish later.", message: `To complete the ${this.documentsSingularPlural}, use the link in the original email notification inviting you to review and finish the document.`, onNext: () => (this.showFinishLater = false) })), this.errorMessage && h("verdocs-ok-dialog", { heading: "Network Error", message: this.errorMessage, onNext: () => (this.errorMessage = '') }), this.showDone && (h("verdocs-ok-dialog", { heading: "You're Done!", message: `You can access the ${this.documentsSingularPlural} at any time by clicking on the link from the invitation email.<br /><br />After all recipients have completed their actions, you will receive an email with the document and envelope certificate attached.`, onNext: () => {
492
491
  this.showDone = false;
493
492
  this.isDone = true;
493
+ } })), this.showLoadError && (h("verdocs-ok-dialog", { heading: "Error Loading Document", message: `Please check with the sender to ensure it has not been canceled, and try again later.`, buttonLabel: "Retry", onNext: () => {
494
+ this.showLoadError = false;
495
+ window.location.reload();
494
496
  } })), this.submitting && (h("div", { class: "loading-indicator" }, h("verdocs-loader", null))), !this.agreed && (h("div", { class: "cover" }, h("div", { class: "agree" }, h("verdocs-checkbox", { name: "agree", label: "By checking this box, you:", onInput: () => this.handleClickAgree() }), h("ul", null, h("li", null, "Agree to use electronic records and signatures, and confirm you have read the", ' ', h("a", { href: "https://verdocs.com/en/electronic-record-signature-disclosure/", target: "_blank" }, "Electronic Record and Signatures Disclosure"), "."), h("li", null, "Agree to Verdocs", ' ', h("a", { href: "https://verdocs.com/en/eula", target: "_blank" }, "End User License Agreement"), ' ', "and confirm you have read Verdocs'", ' ', h("a", { href: "https://verdocs.com/en/privacy-policy/", target: "_blank" }, "Privacy Policy"), ".")))))));
495
497
  }
496
498
  static get is() { return "verdocs-sign"; }
@@ -595,6 +597,7 @@ export class VerdocsSign {
595
597
  "submitting": {},
596
598
  "isDone": {},
597
599
  "showDone": {},
600
+ "showLoadError": {},
598
601
  "finishLater": {},
599
602
  "showFinishLater": {},
600
603
  "agreed": {},
@@ -3834,7 +3834,6 @@ var requestLogger = function (r) {
3834
3834
  * .setTimeout(5000);
3835
3835
  * ```
3836
3836
  */
3837
- // TODO: Research issue with Beta URL
3838
3837
  var VerdocsEndpoint = /** @class */ (function () {
3839
3838
  /**
3840
3839
  * Create a new VerdocsEndpoint to call Verdocs platform services.
@@ -3850,7 +3849,6 @@ var VerdocsEndpoint = /** @class */ (function () {
3850
3849
  this.baseURL = (window.location.origin === 'https://beta.verdocs.com'
3851
3850
  ? 'https://stage-api.verdocs.com'
3852
3851
  : 'https://api.verdocs.com');
3853
- this.baseURLv2 = 'https://api-v2.verdocs.com';
3854
3852
  this.clientID = 'not-set';
3855
3853
  this.timeout = 60000;
3856
3854
  this.token = null;
@@ -3863,13 +3861,13 @@ var VerdocsEndpoint = /** @class */ (function () {
3863
3861
  * with Envelopes.
3864
3862
  */
3865
3863
  this.session = null;
3866
- this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || 'https://api.verdocs.com';
3867
- this.baseURLv2 = (options === null || options === void 0 ? void 0 : options.baseURLv2) || 'https://api-v2.verdocs.com';
3868
- this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || 60000;
3869
- this.environment = (options === null || options === void 0 ? void 0 : options.environment) || 'verdocs';
3870
- this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || 'user';
3871
- this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || 'not-set';
3864
+ this.baseURL = (options === null || options === void 0 ? void 0 : options.baseURL) || this.baseURL;
3865
+ this.timeout = (options === null || options === void 0 ? void 0 : options.timeout) || this.timeout;
3866
+ this.environment = (options === null || options === void 0 ? void 0 : options.environment) || this.environment;
3867
+ this.sessionType = (options === null || options === void 0 ? void 0 : options.sessionType) || this.sessionType;
3868
+ this.clientID = (options === null || options === void 0 ? void 0 : options.clientID) || this.clientID;
3872
3869
  this.api = axios.create({ baseURL: this.baseURL, timeout: this.timeout });
3870
+ window.console.log('[JS_SDK] Initializing', this.baseURL, window.location.origin);
3873
3871
  // We set the default retries to zero because we only actually want this feature on certain calls for now
3874
3872
  axiosRetry(this.api, {
3875
3873
  retries: 0,
@@ -3907,13 +3905,6 @@ var VerdocsEndpoint = /** @class */ (function () {
3907
3905
  VerdocsEndpoint.prototype.getBaseURL = function () {
3908
3906
  return this.baseURL;
3909
3907
  };
3910
- /**
3911
- * Get the current base URL for the v2 APIs.
3912
- * This should rarely be anything other than 'https://api-v2.verdocs.com'.
3913
- */
3914
- VerdocsEndpoint.prototype.getBaseURLv2 = function () {
3915
- return this.baseURLv2;
3916
- };
3917
3908
  /**
3918
3909
  * Get the current client ID, if set.
3919
3910
  */
@@ -3981,21 +3972,6 @@ var VerdocsEndpoint = /** @class */ (function () {
3981
3972
  this.api.defaults.baseURL = url;
3982
3973
  return this;
3983
3974
  };
3984
- /**
3985
- * Set the base URL for API calls. Should be called only upon direction from Verdocs Customer Solutions Engineering.
3986
- *
3987
- * ```typescript
3988
- * import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
3989
- *
3990
- * const endpoint = new VerdocsEndpoint();
3991
- * endpoint.setBaseURL('https://api.verdocs.com');
3992
- * ```
3993
- */
3994
- VerdocsEndpoint.prototype.setBaseURLv2 = function (url) {
3995
- this.baseURLv2 = url;
3996
- // NOTE: We do not set this on the Axios instance because v1 is still the standard.
3997
- return this;
3998
- };
3999
3975
  /**
4000
3976
  * Set the Client ID for Verdocs API calls.
4001
3977
  *