@verdocs/web-sdk 1.0.25 → 1.1.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.
- package/README.md +1 -0
- package/dist/cjs/Token-65a1dc17.js +71 -0
- package/dist/{esm/Content-97cad4ea.js → cjs/Transport-68c8b1f4.js} +431 -378
- package/dist/cjs/buffer-es6-ce0cdd81.js +1974 -0
- package/dist/cjs/index-4bf5cc66.js +46 -0
- package/dist/cjs/{index-83ab34ef.js → index-6fc067b7.js} +50 -51
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/search-box_5.cjs.entry.js +283 -0
- package/dist/cjs/search-tabs.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +175 -0
- package/dist/cjs/verdocs-button_2.cjs.entry.js +98 -0
- package/dist/cjs/verdocs-document-status.cjs.entry.js +54 -0
- package/dist/cjs/verdocs-dropdown_12.cjs.entry.js +21168 -0
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +243 -0
- package/dist/cjs/verdocs-loader.cjs.entry.js +19 -0
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +48 -0
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +22 -0
- package/dist/cjs/verdocs-search.cjs.entry.js +19 -0
- package/dist/cjs/verdocs-sign.cjs.entry.js +496 -0
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +239 -0
- package/dist/cjs/verdocs-template-card.cjs.entry.js +38 -0
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +20 -0
- package/dist/cjs/verdocs-toggle.cjs.entry.js +36 -0
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +123 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +28 -9
- package/dist/collection/components/controls/verdocs-button/verdocs-button.css +64 -0
- package/dist/collection/components/controls/verdocs-button/verdocs-button.js +133 -0
- package/dist/collection/components/controls/verdocs-button/verdocs-button.stories.js +20 -0
- package/dist/collection/components/controls/verdocs-document-status/check.svg +3 -0
- package/dist/collection/components/controls/{document-status-indicator/pending-icon.svg → verdocs-document-status/pending.svg} +0 -0
- package/dist/collection/components/controls/{document-status-indicator/cancelled-icon.svg → verdocs-document-status/stop.svg} +0 -0
- package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.css +18 -0
- package/dist/collection/components/controls/{document-status-indicator/document-status-indicator.js → verdocs-document-status/verdocs-document-status.js} +15 -15
- package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.stories.js +15 -0
- package/dist/collection/components/controls/{document-status-indicator/declined-icon.svg → verdocs-document-status/x.svg} +0 -0
- package/dist/collection/components/controls/{dropdown-menu → verdocs-dropdown}/down-arrow.svg +0 -0
- package/dist/collection/components/controls/{dropdown-menu/dropdown-menu.css → verdocs-dropdown/verdocs-dropdown.css} +17 -32
- package/dist/collection/components/controls/{dropdown-menu/dropdown-menu.js → verdocs-dropdown/verdocs-dropdown.js} +25 -32
- package/dist/collection/components/controls/{dropdown-menu/dropdown-menu.stories.js → verdocs-dropdown/verdocs-dropdown.stories.js} +5 -9
- package/dist/collection/components/controls/verdocs-loader/verdocs-loader.css +45 -0
- package/dist/collection/components/controls/verdocs-loader/verdocs-loader.js +13 -0
- package/dist/collection/components/controls/verdocs-loader/verdocs-loader.stories.js +8 -0
- package/dist/collection/components/{elements/org-popup → controls/verdocs-organization-card}/user-group.svg +0 -0
- package/dist/collection/components/{elements/org-popup/org-popup.css → controls/verdocs-organization-card/verdocs-organization-card.css} +13 -35
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.js +60 -0
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.stories.js +22 -0
- package/dist/collection/components/{elements/template-card/actions-icon.svg → controls/verdocs-template-card/actions.svg} +0 -0
- package/dist/collection/components/{elements/template-card/email-icon.svg → controls/verdocs-template-card/email.svg} +0 -0
- package/dist/collection/components/{elements/template-card/pages-icon.svg → controls/verdocs-template-card/pages.svg} +0 -0
- package/dist/collection/components/controls/verdocs-template-card/star.svg +10 -0
- package/dist/collection/components/controls/verdocs-template-card/verdocs-template-card.css +64 -0
- package/dist/collection/components/controls/verdocs-template-card/verdocs-template-card.js +58 -0
- package/dist/collection/components/controls/verdocs-template-card/verdocs-template-card.stories.js +49 -0
- package/dist/collection/components/controls/verdocs-template-tags/verdocs-template-tags.css +19 -0
- package/dist/collection/components/controls/verdocs-template-tags/verdocs-template-tags.js +34 -0
- package/dist/collection/components/controls/verdocs-template-tags/verdocs-template-tags.stories.js +10 -0
- package/dist/collection/components/controls/verdocs-text-input/test/verdocs-text-input.js +8 -0
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.css +30 -0
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.js +224 -0
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.stories.js +31 -0
- package/dist/collection/components/controls/{toggle-icon-buttons/grid-view.svg → verdocs-toggle/grid.svg} +0 -0
- package/dist/collection/components/controls/{toggle-icon-buttons/list-view.svg → verdocs-toggle/list.svg} +0 -0
- package/dist/collection/components/controls/{toggle-icon-buttons/toggle-icon-buttons.css → verdocs-toggle/verdocs-toggle.css} +11 -21
- package/dist/collection/components/controls/{toggle-icon-buttons/toggle-icon-buttons.js → verdocs-toggle/verdocs-toggle.js} +11 -7
- package/dist/collection/components/controls/{toggle-icon-buttons/toggle-icon-buttons.stories.js → verdocs-toggle/verdocs-toggle.stories.js} +12 -12
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.css +86 -0
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +329 -0
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.js +18 -0
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +48 -0
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +146 -0
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.js +20 -0
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.css +86 -0
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +325 -0
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.js +18 -0
- package/dist/collection/components/dialogs/verdocs-upload-dialog/paperclip.svg +3 -0
- package/dist/collection/components/dialogs/verdocs-upload-dialog/trash.svg +3 -0
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +99 -0
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +163 -0
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.js +18 -0
- package/dist/collection/components/elements/search-box/search-box.js +3 -0
- package/dist/collection/components/elements/search-box/search-box.stories.js +1 -1
- package/dist/collection/components/elements/search-quick-functions/search-quick-functions.js +3 -0
- package/dist/collection/components/elements/search-quick-functions/search-quick-functions.stories.js +1 -1
- package/dist/collection/components/elements/search-recent/search-recent.js +15 -3
- package/dist/collection/components/elements/search-recent/search-recent.stories.js +2 -2
- package/dist/collection/components/elements/search-saved/search-saved.js +15 -3
- package/dist/collection/components/elements/search-saved/search-saved.stories.js +2 -2
- package/dist/collection/components/elements/search-starred/search-starred.js +25 -2
- package/dist/collection/components/elements/search-starred/search-starred.stories.js +2 -2
- package/dist/collection/components/elements/search-tabs/search-tabs.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-attachment/paperclip.svg +3 -0
- package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.css +21 -0
- package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.js +163 -0
- package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.stories.js +8 -0
- package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.css +41 -0
- package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.js +131 -0
- package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.stories.js +11 -0
- package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.css +294 -0
- package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.js +245 -0
- package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.stories.js +31 -0
- package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.css +40 -0
- package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.js +216 -0
- package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.stories.js +14 -0
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.css +38 -0
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.js +155 -0
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.stories.js +10 -0
- package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.css +56 -0
- package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.js +363 -0
- package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.stories.js +8 -0
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.css +58 -0
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.js +174 -0
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.stories.js +13 -0
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.css +39 -0
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.js +155 -0
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.stories.js +10 -0
- package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.css +32 -0
- package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.js +233 -0
- package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.stories.js +14 -0
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.css +32 -0
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.js +233 -0
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.stories.js +14 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +60 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +241 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.stories.js +19 -0
- package/dist/collection/components/embeds/verdocs-search/verdocs-search.css +25 -0
- package/dist/collection/components/embeds/verdocs-search/verdocs-search.js +19 -0
- package/dist/collection/components/embeds/{search-embed/search-embed.stories.js → verdocs-search/verdocs-search.stories.js} +2 -2
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +125 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +408 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +19 -0
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +53 -0
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +297 -0
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.stories.js +21 -0
- package/dist/custom-elements/index.d.ts +156 -42
- package/dist/custom-elements/index.js +21822 -12481
- package/dist/custom-elements.json +727 -0
- package/dist/docs.json +2804 -369
- package/dist/esm/Token-a058076d.js +69 -0
- package/dist/{cjs/Content-e1c04dfa.js → esm/Transport-797d3c59.js} +426 -379
- package/dist/esm/buffer-es6-681a33da.js +1972 -0
- package/dist/esm/index-2b1938ea.js +39 -0
- package/dist/esm/{index-792f07a6.js → index-80d1b936.js} +51 -51
- package/dist/esm/loader.js +3 -3
- package/dist/esm/search-box_5.entry.js +275 -0
- package/dist/esm/search-tabs.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +171 -0
- package/dist/esm/verdocs-button_2.entry.js +93 -0
- package/dist/esm/verdocs-document-status.entry.js +50 -0
- package/dist/esm/verdocs-dropdown_12.entry.js +21153 -0
- package/dist/esm/verdocs-initial-dialog.entry.js +239 -0
- package/dist/esm/verdocs-loader.entry.js +15 -0
- package/dist/esm/verdocs-ok-dialog.entry.js +44 -0
- package/dist/esm/verdocs-organization-card.entry.js +18 -0
- package/dist/esm/verdocs-search.entry.js +15 -0
- package/dist/esm/verdocs-sign.entry.js +492 -0
- package/dist/esm/verdocs-signature-dialog.entry.js +235 -0
- package/dist/esm/verdocs-template-card.entry.js +34 -0
- package/dist/esm/verdocs-template-tags.entry.js +16 -0
- package/dist/esm/verdocs-toggle.entry.js +32 -0
- package/dist/esm/verdocs-upload-dialog.entry.js +119 -0
- package/dist/esm/verdocs-web-sdk.js +3 -3
- package/dist/esm-es5/Token-a058076d.js +1 -0
- package/dist/esm-es5/Transport-797d3c59.js +1 -0
- package/dist/esm-es5/buffer-es6-681a33da.js +7 -0
- package/dist/esm-es5/index-2b1938ea.js +1 -0
- package/dist/esm-es5/index-80d1b936.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/search-box_5.entry.js +1 -0
- package/dist/esm-es5/search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -0
- package/dist/esm-es5/verdocs-button_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-document-status.entry.js +1 -0
- package/dist/esm-es5/verdocs-dropdown_12.entry.js +23 -0
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-loader.entry.js +1 -0
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -0
- package/dist/esm-es5/verdocs-search.entry.js +1 -0
- package/dist/esm-es5/verdocs-sign.entry.js +1 -0
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -0
- package/dist/esm-es5/verdocs-toggle.entry.js +1 -0
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-button/verdocs-button.d.ts +32 -0
- package/dist/types/components/controls/verdocs-button/verdocs-button.stories.d.ts +9 -0
- package/dist/types/components/controls/{document-status-indicator/document-status-indicator.d.ts → verdocs-document-status/verdocs-document-status.d.ts} +2 -2
- package/dist/types/components/controls/{document-status-indicator/document-status-indicator.stories.d.ts → verdocs-document-status/verdocs-document-status.stories.d.ts} +1 -1
- package/dist/types/components/controls/{dropdown-menu/dropdown-menu.d.ts → verdocs-dropdown/verdocs-dropdown.d.ts} +3 -6
- package/dist/types/components/controls/verdocs-dropdown/verdocs-dropdown.stories.d.ts +7 -0
- package/dist/types/components/controls/verdocs-loader/verdocs-loader.d.ts +3 -0
- package/dist/types/components/controls/verdocs-loader/verdocs-loader.stories.d.ts +4 -0
- package/dist/types/components/controls/verdocs-organization-card/verdocs-organization-card.d.ts +11 -0
- package/dist/types/components/controls/verdocs-organization-card/verdocs-organization-card.stories.d.ts +6 -0
- package/dist/types/components/controls/verdocs-template-card/verdocs-template-card.d.ts +11 -0
- package/dist/types/components/{elements/template-card/template-card.stories.d.ts → controls/verdocs-template-card/verdocs-template-card.stories.d.ts} +1 -2
- package/dist/types/components/controls/verdocs-template-tags/verdocs-template-tags.d.ts +10 -0
- package/dist/types/components/controls/{tags-indicator/tags-indicator.stories.d.ts → verdocs-template-tags/verdocs-template-tags.stories.d.ts} +1 -1
- package/dist/types/components/controls/verdocs-text-input/test/verdocs-text-input.d.ts +1 -0
- package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.d.ts +54 -0
- package/dist/types/components/controls/verdocs-text-input/verdocs-text-input.stories.d.ts +13 -0
- package/dist/types/components/controls/{toggle-icon-buttons/toggle-icon-buttons.d.ts → verdocs-toggle/verdocs-toggle.d.ts} +2 -2
- package/dist/types/components/controls/{toggle-icon-buttons/toggle-icon-buttons.stories.d.ts → verdocs-toggle/verdocs-toggle.stories.d.ts} +1 -1
- package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.d.ts +36 -0
- package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.d.ts +8 -0
- package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +32 -0
- package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.d.ts +10 -0
- package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.d.ts +36 -0
- package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.d.ts +8 -0
- package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +34 -0
- package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.d.ts +8 -0
- package/dist/types/components/elements/search-box/search-box.d.ts +3 -0
- package/dist/types/components/elements/search-box/search-box.stories.d.ts +1 -1
- package/dist/types/components/elements/search-quick-functions/search-quick-functions.d.ts +3 -0
- package/dist/types/components/elements/search-quick-functions/search-quick-functions.stories.d.ts +1 -1
- package/dist/types/components/elements/search-recent/search-recent.d.ts +4 -0
- package/dist/types/components/elements/search-recent/search-recent.stories.d.ts +1 -1
- package/dist/types/components/elements/search-saved/search-saved.d.ts +4 -0
- package/dist/types/components/elements/search-saved/search-saved.stories.d.ts +1 -1
- package/dist/types/components/elements/search-starred/search-starred.d.ts +6 -1
- package/dist/types/components/elements/search-starred/search-starred.stories.d.ts +1 -1
- package/dist/types/components/elements/search-tabs/search-tabs.stories.d.ts +1 -1
- package/dist/types/components/elements/verdocs-field-attachment/verdocs-field-attachment.d.ts +33 -0
- package/dist/types/components/elements/verdocs-field-attachment/verdocs-field-attachment.stories.d.ts +4 -0
- package/dist/types/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.d.ts +31 -0
- package/dist/types/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.stories.d.ts +7 -0
- package/dist/types/components/elements/verdocs-field-date/verdocs-field-date.d.ts +53 -0
- package/dist/types/components/elements/verdocs-field-date/verdocs-field-date.stories.d.ts +10 -0
- package/dist/types/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.d.ts +48 -0
- package/dist/types/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.stories.d.ts +10 -0
- package/dist/types/components/elements/verdocs-field-initial/verdocs-field-initial.d.ts +31 -0
- package/dist/types/components/elements/verdocs-field-initial/verdocs-field-initial.stories.d.ts +6 -0
- package/dist/types/components/elements/verdocs-field-payment/verdocs-field-payment.d.ts +53 -0
- package/dist/types/components/elements/verdocs-field-payment/verdocs-field-payment.stories.d.ts +4 -0
- package/dist/types/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.d.ts +38 -0
- package/dist/types/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.stories.d.ts +9 -0
- package/dist/types/components/elements/verdocs-field-signature/verdocs-field-signature.d.ts +31 -0
- package/dist/types/components/elements/verdocs-field-signature/verdocs-field-signature.stories.d.ts +6 -0
- package/dist/types/components/elements/verdocs-field-textarea/verdocs-field-textarea.d.ts +52 -0
- package/dist/types/components/elements/verdocs-field-textarea/verdocs-field-textarea.stories.d.ts +10 -0
- package/dist/types/components/elements/verdocs-field-textbox/verdocs-field-textbox.d.ts +52 -0
- package/dist/types/components/elements/{org-popup/org-popup.stories.d.ts → verdocs-field-textbox/verdocs-field-textbox.stories.d.ts} +6 -4
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +69 -0
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.stories.d.ts +9 -0
- package/dist/types/components/embeds/verdocs-search/verdocs-search.d.ts +3 -0
- package/dist/types/components/embeds/{search-embed/search-embed.stories.d.ts → verdocs-search/verdocs-search.stories.d.ts} +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +46 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.stories.d.ts +9 -0
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +77 -0
- package/dist/types/components/embeds/verdocs-view/verdocs-view.stories.d.ts +6 -0
- package/dist/types/components.d.ts +1195 -246
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/verdocs-web-sdk/p-0956a3bc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-24236b87.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-29abe078.js +1 -0
- package/dist/verdocs-web-sdk/p-2ded0974.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4455e25e.entry.js → p-30d908ea.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-37b07203.system.js +1 -0
- package/dist/verdocs-web-sdk/p-3a102b59.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3b2cd409.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3c70c740.system.js +1 -0
- package/dist/verdocs-web-sdk/p-403cb7cf.js +1 -0
- package/dist/verdocs-web-sdk/p-4a538cbc.js +1 -0
- package/dist/verdocs-web-sdk/p-5a6041c0.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-62ec194f.js +1 -0
- package/dist/verdocs-web-sdk/p-6327fd83.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7f9a96d5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-80c7bc0c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-feb2f9c2.system.entry.js → p-81b15287.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-82f4cb67.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-83dbc583.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-853e30f2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8739595c.system.js +1 -0
- package/dist/verdocs-web-sdk/p-89f5fc2b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-94d6f88f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-993a0a23.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9a896baf.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a415926b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a4fc6ad9.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a73a1ff8.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-aec93cc9.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b07ae79f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b13ee3be.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ba8a7e2d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bdfa7db9.system.entry.js +23 -0
- package/dist/verdocs-web-sdk/p-cdae8dba.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cec7e9ea.js +1 -0
- package/dist/verdocs-web-sdk/p-d03d748c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d299cd16.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d82dc646.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d9474f48.system.js +7 -0
- package/dist/verdocs-web-sdk/p-eaffa4b1.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ee14709c.system.js +1 -0
- package/dist/verdocs-web-sdk/p-f4786f62.entry.js +23 -0
- package/dist/verdocs-web-sdk/p-fae1351f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fc3d921f.system.js +1 -0
- package/dist/verdocs-web-sdk/p-fcfe34db.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.css +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/package.json +26 -19
- package/dist/cjs/document-status-indicator.cjs.entry.js +0 -51
- package/dist/cjs/dropdown-menu.cjs.entry.js +0 -1807
- package/dist/cjs/org-popup.cjs.entry.js +0 -25
- package/dist/cjs/pdf-viewer.cjs.entry.js +0 -13677
- package/dist/cjs/search-box.cjs.entry.js +0 -60
- package/dist/cjs/search-embed.cjs.entry.js +0 -19
- package/dist/cjs/search-quick-functions.cjs.entry.js +0 -31
- package/dist/cjs/search-recent.cjs.entry.js +0 -39
- package/dist/cjs/search-saved.cjs.entry.js +0 -39
- package/dist/cjs/search-starred.cjs.entry.js +0 -46
- package/dist/cjs/tags-indicator.cjs.entry.js +0 -20
- package/dist/cjs/template-card.cjs.entry.js +0 -28
- package/dist/cjs/toggle-icon-buttons.cjs.entry.js +0 -32
- package/dist/collection/api/endpoint.js +0 -1
- package/dist/collection/components/controls/document-status-indicator/document-status-indicator.css +0 -23
- package/dist/collection/components/controls/document-status-indicator/document-status-indicator.stories.js +0 -12
- package/dist/collection/components/controls/document-status-indicator/finished-icon.svg +0 -1
- package/dist/collection/components/controls/tags-indicator/tags-indicator.css +0 -34
- package/dist/collection/components/controls/tags-indicator/tags-indicator.js +0 -55
- package/dist/collection/components/controls/tags-indicator/tags-indicator.stories.js +0 -13
- package/dist/collection/components/elements/org-popup/org-popup.js +0 -80
- package/dist/collection/components/elements/org-popup/org-popup.stories.js +0 -20
- package/dist/collection/components/elements/template-card/star-icon.svg +0 -1
- package/dist/collection/components/elements/template-card/template-card.css +0 -90
- package/dist/collection/components/elements/template-card/template-card.js +0 -74
- package/dist/collection/components/elements/template-card/template-card.stories.js +0 -21
- package/dist/collection/components/embeds/search-embed/search-embed.css +0 -3
- package/dist/collection/components/embeds/search-embed/search-embed.js +0 -15
- package/dist/collection/components/pdf-viewer/pdf-viewer.css +0 -20
- package/dist/collection/components/pdf-viewer/pdf-viewer.js +0 -278
- package/dist/esm/document-status-indicator.entry.js +0 -47
- package/dist/esm/dropdown-menu.entry.js +0 -1803
- package/dist/esm/org-popup.entry.js +0 -21
- package/dist/esm/pdf-viewer.entry.js +0 -13673
- package/dist/esm/search-box.entry.js +0 -56
- package/dist/esm/search-embed.entry.js +0 -15
- package/dist/esm/search-quick-functions.entry.js +0 -27
- package/dist/esm/search-recent.entry.js +0 -35
- package/dist/esm/search-saved.entry.js +0 -35
- package/dist/esm/search-starred.entry.js +0 -42
- package/dist/esm/tags-indicator.entry.js +0 -16
- package/dist/esm/template-card.entry.js +0 -24
- package/dist/esm/toggle-icon-buttons.entry.js +0 -28
- package/dist/esm-es5/Content-97cad4ea.js +0 -1
- package/dist/esm-es5/document-status-indicator.entry.js +0 -1
- package/dist/esm-es5/dropdown-menu.entry.js +0 -1
- package/dist/esm-es5/index-792f07a6.js +0 -1
- package/dist/esm-es5/org-popup.entry.js +0 -1
- package/dist/esm-es5/pdf-viewer.entry.js +0 -23
- package/dist/esm-es5/search-box.entry.js +0 -1
- package/dist/esm-es5/search-embed.entry.js +0 -1
- package/dist/esm-es5/search-quick-functions.entry.js +0 -1
- package/dist/esm-es5/search-recent.entry.js +0 -1
- package/dist/esm-es5/search-saved.entry.js +0 -1
- package/dist/esm-es5/search-starred.entry.js +0 -1
- package/dist/esm-es5/tags-indicator.entry.js +0 -1
- package/dist/esm-es5/template-card.entry.js +0 -1
- package/dist/esm-es5/toggle-icon-buttons.entry.js +0 -1
- package/dist/types/api/endpoint.d.ts +0 -1
- package/dist/types/components/controls/dropdown-menu/dropdown-menu.stories.d.ts +0 -11
- package/dist/types/components/controls/tags-indicator/tags-indicator.d.ts +0 -18
- package/dist/types/components/elements/org-popup/org-popup.d.ts +0 -18
- package/dist/types/components/elements/template-card/template-card.d.ts +0 -18
- package/dist/types/components/embeds/search-embed/search-embed.d.ts +0 -3
- package/dist/types/components/pdf-viewer/pdf-viewer.d.ts +0 -36
- package/dist/verdocs-web-sdk/p-010729d1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-082ac880.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-299fe046.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2a5b073f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2e3b87aa.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2e3de14e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-46e67698.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4d53801c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4f6c5df8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4f726e43.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-52a0475a.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-598e9062.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5f583dee.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6b117db2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6ecfe697.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7cd7db96.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-826ce4d6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-852fb42b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8fb7a85d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-92c467d9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a8ac52f9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-be074c7d.entry.js +0 -23
- package/dist/verdocs-web-sdk/p-c7794fd6.system.entry.js +0 -23
- package/dist/verdocs-web-sdk/p-c8740fbb.js +0 -1
- package/dist/verdocs-web-sdk/p-d0b756a0.system.js +0 -1
- package/dist/verdocs-web-sdk/p-df83ddb8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e724fc95.system.js +0 -1
- package/dist/verdocs-web-sdk/p-e7f1e5e6.js +0 -1
- package/dist/verdocs-web-sdk/p-e7f803f7.system.js +0 -1
- package/dist/verdocs-web-sdk/p-e9754f6b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fe3ceb31.system.entry.js +0 -1
|
@@ -1,3 +1,59 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const index = require('./index-4bf5cc66.js');
|
|
4
|
+
|
|
5
|
+
// This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
|
|
6
|
+
// an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
|
|
7
|
+
// (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
|
|
8
|
+
// tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
|
|
9
|
+
// StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
|
|
10
|
+
// when those Components load js-sdk they get a separate instance. Without messy options like having to
|
|
11
|
+
// pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
|
|
12
|
+
// have no way to access authenticated sessions unless we make the Endpoint a true global.
|
|
13
|
+
//
|
|
14
|
+
// @credit https://github.com/medikoo/es5-ext/blob/master/global.js
|
|
15
|
+
// @credit https://mathiasbynens.be/notes/globalthis
|
|
16
|
+
var naiveFallback = function () {
|
|
17
|
+
if (typeof self === 'object' && self)
|
|
18
|
+
return self;
|
|
19
|
+
if (typeof window === 'object' && window)
|
|
20
|
+
return window;
|
|
21
|
+
throw new Error('Unable to resolve global `this`');
|
|
22
|
+
};
|
|
23
|
+
var globalThis_1 = (function () {
|
|
24
|
+
if (this)
|
|
25
|
+
return this;
|
|
26
|
+
// Unexpected strict mode (may happen if e.g. bundled into ESM module)
|
|
27
|
+
// Fallback to standard globalThis if available
|
|
28
|
+
if (typeof globalThis === 'object' && globalThis)
|
|
29
|
+
return globalThis;
|
|
30
|
+
// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
|
|
31
|
+
// In all ES5+ engines global object inherits from Object.prototype
|
|
32
|
+
// (if you approached one that doesn't please report)
|
|
33
|
+
try {
|
|
34
|
+
Object.defineProperty(Object.prototype, '__global__', {
|
|
35
|
+
get: function () {
|
|
36
|
+
return this;
|
|
37
|
+
},
|
|
38
|
+
configurable: true,
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
catch (error) {
|
|
42
|
+
// Unfortunate case of updates to Object.prototype being restricted
|
|
43
|
+
// via preventExtensions, seal or freeze
|
|
44
|
+
return naiveFallback();
|
|
45
|
+
}
|
|
46
|
+
try {
|
|
47
|
+
// Safari case (window.__global__ works, but __global__ does not)
|
|
48
|
+
if (!__global__)
|
|
49
|
+
return naiveFallback();
|
|
50
|
+
return __global__;
|
|
51
|
+
}
|
|
52
|
+
finally {
|
|
53
|
+
delete Object.prototype.__global__;
|
|
54
|
+
}
|
|
55
|
+
})();
|
|
56
|
+
|
|
1
57
|
var bind = function bind(fn, thisArg) {
|
|
2
58
|
return function wrap() {
|
|
3
59
|
var args = new Array(arguments.length);
|
|
@@ -19,7 +75,7 @@ var toString = Object.prototype.toString;
|
|
|
19
75
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
20
76
|
*/
|
|
21
77
|
function isArray(val) {
|
|
22
|
-
return
|
|
78
|
+
return Array.isArray(val);
|
|
23
79
|
}
|
|
24
80
|
|
|
25
81
|
/**
|
|
@@ -60,7 +116,7 @@ function isArrayBuffer(val) {
|
|
|
60
116
|
* @returns {boolean} True if value is an FormData, otherwise false
|
|
61
117
|
*/
|
|
62
118
|
function isFormData(val) {
|
|
63
|
-
return (
|
|
119
|
+
return toString.call(val) === '[object FormData]';
|
|
64
120
|
}
|
|
65
121
|
|
|
66
122
|
/**
|
|
@@ -74,7 +130,7 @@ function isArrayBufferView(val) {
|
|
|
74
130
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
75
131
|
result = ArrayBuffer.isView(val);
|
|
76
132
|
} else {
|
|
77
|
-
result = (val) && (val.buffer) && (val.buffer
|
|
133
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
78
134
|
}
|
|
79
135
|
return result;
|
|
80
136
|
}
|
|
@@ -181,7 +237,7 @@ function isStream(val) {
|
|
|
181
237
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
182
238
|
*/
|
|
183
239
|
function isURLSearchParams(val) {
|
|
184
|
-
return
|
|
240
|
+
return toString.call(val) === '[object URLSearchParams]';
|
|
185
241
|
}
|
|
186
242
|
|
|
187
243
|
/**
|
|
@@ -516,7 +572,8 @@ var enhanceError = function enhanceError(error, config, code, request, response)
|
|
|
516
572
|
stack: this.stack,
|
|
517
573
|
// Axios
|
|
518
574
|
config: this.config,
|
|
519
|
-
code: this.code
|
|
575
|
+
code: this.code,
|
|
576
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
520
577
|
};
|
|
521
578
|
};
|
|
522
579
|
return error;
|
|
@@ -619,7 +676,7 @@ var isAbsoluteURL = function isAbsoluteURL(url) {
|
|
|
619
676
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
620
677
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
621
678
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
622
|
-
return /^([a-z][a-z\d
|
|
679
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
623
680
|
};
|
|
624
681
|
|
|
625
682
|
/**
|
|
@@ -766,11 +823,39 @@ var isURLSameOrigin = (
|
|
|
766
823
|
})()
|
|
767
824
|
);
|
|
768
825
|
|
|
826
|
+
/**
|
|
827
|
+
* A `Cancel` is an object that is thrown when an operation is canceled.
|
|
828
|
+
*
|
|
829
|
+
* @class
|
|
830
|
+
* @param {string=} message The message.
|
|
831
|
+
*/
|
|
832
|
+
function Cancel(message) {
|
|
833
|
+
this.message = message;
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
Cancel.prototype.toString = function toString() {
|
|
837
|
+
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
|
838
|
+
};
|
|
839
|
+
|
|
840
|
+
Cancel.prototype.__CANCEL__ = true;
|
|
841
|
+
|
|
842
|
+
var Cancel_1 = Cancel;
|
|
843
|
+
|
|
769
844
|
var xhr = function xhrAdapter(config) {
|
|
770
845
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
771
846
|
var requestData = config.data;
|
|
772
847
|
var requestHeaders = config.headers;
|
|
773
848
|
var responseType = config.responseType;
|
|
849
|
+
var onCanceled;
|
|
850
|
+
function done() {
|
|
851
|
+
if (config.cancelToken) {
|
|
852
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
853
|
+
}
|
|
854
|
+
|
|
855
|
+
if (config.signal) {
|
|
856
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
857
|
+
}
|
|
858
|
+
}
|
|
774
859
|
|
|
775
860
|
if (utils.isFormData(requestData)) {
|
|
776
861
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
@@ -808,7 +893,13 @@ var xhr = function xhrAdapter(config) {
|
|
|
808
893
|
request: request
|
|
809
894
|
};
|
|
810
895
|
|
|
811
|
-
settle(
|
|
896
|
+
settle(function _resolve(value) {
|
|
897
|
+
resolve(value);
|
|
898
|
+
done();
|
|
899
|
+
}, function _reject(err) {
|
|
900
|
+
reject(err);
|
|
901
|
+
done();
|
|
902
|
+
}, response);
|
|
812
903
|
|
|
813
904
|
// Clean up request
|
|
814
905
|
request = null;
|
|
@@ -861,14 +952,15 @@ var xhr = function xhrAdapter(config) {
|
|
|
861
952
|
|
|
862
953
|
// Handle timeout
|
|
863
954
|
request.ontimeout = function handleTimeout() {
|
|
864
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
955
|
+
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
956
|
+
var transitional = config.transitional || defaults_1.transitional;
|
|
865
957
|
if (config.timeoutErrorMessage) {
|
|
866
958
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
867
959
|
}
|
|
868
960
|
reject(createError(
|
|
869
961
|
timeoutErrorMessage,
|
|
870
962
|
config,
|
|
871
|
-
|
|
963
|
+
transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
|
872
964
|
request));
|
|
873
965
|
|
|
874
966
|
// Clean up request
|
|
@@ -922,18 +1014,22 @@ var xhr = function xhrAdapter(config) {
|
|
|
922
1014
|
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
923
1015
|
}
|
|
924
1016
|
|
|
925
|
-
if (config.cancelToken) {
|
|
1017
|
+
if (config.cancelToken || config.signal) {
|
|
926
1018
|
// Handle cancellation
|
|
927
|
-
|
|
1019
|
+
// eslint-disable-next-line func-names
|
|
1020
|
+
onCanceled = function(cancel) {
|
|
928
1021
|
if (!request) {
|
|
929
1022
|
return;
|
|
930
1023
|
}
|
|
931
|
-
|
|
1024
|
+
reject(!cancel || (cancel && cancel.type) ? new Cancel_1('canceled') : cancel);
|
|
932
1025
|
request.abort();
|
|
933
|
-
reject(cancel);
|
|
934
|
-
// Clean up request
|
|
935
1026
|
request = null;
|
|
936
|
-
}
|
|
1027
|
+
};
|
|
1028
|
+
|
|
1029
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
1030
|
+
if (config.signal) {
|
|
1031
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
1032
|
+
}
|
|
937
1033
|
}
|
|
938
1034
|
|
|
939
1035
|
if (!requestData) {
|
|
@@ -960,7 +1056,7 @@ function getDefaultAdapter() {
|
|
|
960
1056
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
961
1057
|
// For browsers use XHR adapter
|
|
962
1058
|
adapter = xhr;
|
|
963
|
-
} else if (typeof
|
|
1059
|
+
} else if (typeof index.process_1 !== 'undefined' && Object.prototype.toString.call(index.process_1) === '[object process]') {
|
|
964
1060
|
// For node use HTTP adapter
|
|
965
1061
|
adapter = xhr;
|
|
966
1062
|
}
|
|
@@ -1020,7 +1116,7 @@ var defaults = {
|
|
|
1020
1116
|
}],
|
|
1021
1117
|
|
|
1022
1118
|
transformResponse: [function transformResponse(data) {
|
|
1023
|
-
var transitional = this.transitional;
|
|
1119
|
+
var transitional = this.transitional || defaults.transitional;
|
|
1024
1120
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1025
1121
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1026
1122
|
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
|
@@ -1055,12 +1151,12 @@ var defaults = {
|
|
|
1055
1151
|
|
|
1056
1152
|
validateStatus: function validateStatus(status) {
|
|
1057
1153
|
return status >= 200 && status < 300;
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1154
|
+
},
|
|
1060
1155
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1156
|
+
headers: {
|
|
1157
|
+
common: {
|
|
1158
|
+
'Accept': 'application/json, text/plain, */*'
|
|
1159
|
+
}
|
|
1064
1160
|
}
|
|
1065
1161
|
};
|
|
1066
1162
|
|
|
@@ -1103,6 +1199,10 @@ function throwIfCancellationRequested(config) {
|
|
|
1103
1199
|
if (config.cancelToken) {
|
|
1104
1200
|
config.cancelToken.throwIfRequested();
|
|
1105
1201
|
}
|
|
1202
|
+
|
|
1203
|
+
if (config.signal && config.signal.aborted) {
|
|
1204
|
+
throw new Cancel_1('canceled');
|
|
1205
|
+
}
|
|
1106
1206
|
}
|
|
1107
1207
|
|
|
1108
1208
|
/**
|
|
@@ -1185,17 +1285,6 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1185
1285
|
config2 = config2 || {};
|
|
1186
1286
|
var config = {};
|
|
1187
1287
|
|
|
1188
|
-
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
|
1189
|
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
|
1190
|
-
var defaultToConfig2Keys = [
|
|
1191
|
-
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
|
1192
|
-
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
|
1193
|
-
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
|
1194
|
-
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
|
1195
|
-
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
|
1196
|
-
];
|
|
1197
|
-
var directMergeKeys = ['validateStatus'];
|
|
1198
|
-
|
|
1199
1288
|
function getMergedValue(target, source) {
|
|
1200
1289
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
1201
1290
|
return utils.merge(target, source);
|
|
@@ -1207,200 +1296,84 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1207
1296
|
return source;
|
|
1208
1297
|
}
|
|
1209
1298
|
|
|
1299
|
+
// eslint-disable-next-line consistent-return
|
|
1210
1300
|
function mergeDeepProperties(prop) {
|
|
1211
1301
|
if (!utils.isUndefined(config2[prop])) {
|
|
1212
|
-
|
|
1302
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1213
1303
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
1214
|
-
|
|
1304
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1215
1305
|
}
|
|
1216
1306
|
}
|
|
1217
1307
|
|
|
1218
|
-
|
|
1308
|
+
// eslint-disable-next-line consistent-return
|
|
1309
|
+
function valueFromConfig2(prop) {
|
|
1219
1310
|
if (!utils.isUndefined(config2[prop])) {
|
|
1220
|
-
|
|
1311
|
+
return getMergedValue(undefined, config2[prop]);
|
|
1221
1312
|
}
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
1313
|
+
}
|
|
1225
1314
|
|
|
1226
|
-
|
|
1315
|
+
// eslint-disable-next-line consistent-return
|
|
1316
|
+
function defaultToConfig2(prop) {
|
|
1227
1317
|
if (!utils.isUndefined(config2[prop])) {
|
|
1228
|
-
|
|
1318
|
+
return getMergedValue(undefined, config2[prop]);
|
|
1229
1319
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
1230
|
-
|
|
1320
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1231
1321
|
}
|
|
1232
|
-
}
|
|
1322
|
+
}
|
|
1233
1323
|
|
|
1234
|
-
|
|
1324
|
+
// eslint-disable-next-line consistent-return
|
|
1325
|
+
function mergeDirectKeys(prop) {
|
|
1235
1326
|
if (prop in config2) {
|
|
1236
|
-
|
|
1327
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1237
1328
|
} else if (prop in config1) {
|
|
1238
|
-
|
|
1329
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1239
1330
|
}
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
var axiosKeys = valueFromConfig2Keys
|
|
1243
|
-
.concat(mergeDeepPropertiesKeys)
|
|
1244
|
-
.concat(defaultToConfig2Keys)
|
|
1245
|
-
.concat(directMergeKeys);
|
|
1331
|
+
}
|
|
1246
1332
|
|
|
1247
|
-
var
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1333
|
+
var mergeMap = {
|
|
1334
|
+
'url': valueFromConfig2,
|
|
1335
|
+
'method': valueFromConfig2,
|
|
1336
|
+
'data': valueFromConfig2,
|
|
1337
|
+
'baseURL': defaultToConfig2,
|
|
1338
|
+
'transformRequest': defaultToConfig2,
|
|
1339
|
+
'transformResponse': defaultToConfig2,
|
|
1340
|
+
'paramsSerializer': defaultToConfig2,
|
|
1341
|
+
'timeout': defaultToConfig2,
|
|
1342
|
+
'timeoutMessage': defaultToConfig2,
|
|
1343
|
+
'withCredentials': defaultToConfig2,
|
|
1344
|
+
'adapter': defaultToConfig2,
|
|
1345
|
+
'responseType': defaultToConfig2,
|
|
1346
|
+
'xsrfCookieName': defaultToConfig2,
|
|
1347
|
+
'xsrfHeaderName': defaultToConfig2,
|
|
1348
|
+
'onUploadProgress': defaultToConfig2,
|
|
1349
|
+
'onDownloadProgress': defaultToConfig2,
|
|
1350
|
+
'decompress': defaultToConfig2,
|
|
1351
|
+
'maxContentLength': defaultToConfig2,
|
|
1352
|
+
'maxBodyLength': defaultToConfig2,
|
|
1353
|
+
'transport': defaultToConfig2,
|
|
1354
|
+
'httpAgent': defaultToConfig2,
|
|
1355
|
+
'httpsAgent': defaultToConfig2,
|
|
1356
|
+
'cancelToken': defaultToConfig2,
|
|
1357
|
+
'socketPath': defaultToConfig2,
|
|
1358
|
+
'responseEncoding': defaultToConfig2,
|
|
1359
|
+
'validateStatus': mergeDirectKeys
|
|
1360
|
+
};
|
|
1253
1361
|
|
|
1254
|
-
utils.forEach(
|
|
1362
|
+
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
1363
|
+
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
1364
|
+
var configValue = merge(prop);
|
|
1365
|
+
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
1366
|
+
});
|
|
1255
1367
|
|
|
1256
1368
|
return config;
|
|
1257
1369
|
};
|
|
1258
1370
|
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
const _inBundle = false;
|
|
1262
|
-
const _integrity = "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==";
|
|
1263
|
-
const _location = "/axios";
|
|
1264
|
-
const _phantomChildren = {
|
|
1265
|
-
};
|
|
1266
|
-
const _requested = {
|
|
1267
|
-
type: "range",
|
|
1268
|
-
registry: true,
|
|
1269
|
-
raw: "axios@^0.21.1",
|
|
1270
|
-
name: "axios",
|
|
1271
|
-
escapedName: "axios",
|
|
1272
|
-
rawSpec: "^0.21.1",
|
|
1273
|
-
saveSpec: null,
|
|
1274
|
-
fetchSpec: "^0.21.1"
|
|
1275
|
-
};
|
|
1276
|
-
const _requiredBy = [
|
|
1277
|
-
"/@verdocs/js-sdk"
|
|
1278
|
-
];
|
|
1279
|
-
const _resolved = "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz";
|
|
1280
|
-
const _shasum = "c67b90dc0568e5c1cf2b0b858c43ba28e2eda575";
|
|
1281
|
-
const _spec = "axios@^0.21.1";
|
|
1282
|
-
const _where = "/Users/chad/projects/verdocs/web-sdk/verdocs-web-sdk/node_modules/@verdocs/js-sdk";
|
|
1283
|
-
const author = {
|
|
1284
|
-
name: "Matt Zabriskie"
|
|
1285
|
-
};
|
|
1286
|
-
const browser = {
|
|
1287
|
-
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
1288
|
-
};
|
|
1289
|
-
const bugs = {
|
|
1290
|
-
url: "https://github.com/axios/axios/issues"
|
|
1291
|
-
};
|
|
1292
|
-
const bundleDependencies = false;
|
|
1293
|
-
const bundlesize = [
|
|
1294
|
-
{
|
|
1295
|
-
path: "./dist/axios.min.js",
|
|
1296
|
-
threshold: "5kB"
|
|
1297
|
-
}
|
|
1298
|
-
];
|
|
1299
|
-
const dependencies = {
|
|
1300
|
-
"follow-redirects": "^1.14.0"
|
|
1301
|
-
};
|
|
1302
|
-
const deprecated = false;
|
|
1303
|
-
const description = "Promise based HTTP client for the browser and node.js";
|
|
1304
|
-
const devDependencies = {
|
|
1305
|
-
coveralls: "^3.0.0",
|
|
1306
|
-
"es6-promise": "^4.2.4",
|
|
1307
|
-
grunt: "^1.3.0",
|
|
1308
|
-
"grunt-banner": "^0.6.0",
|
|
1309
|
-
"grunt-cli": "^1.2.0",
|
|
1310
|
-
"grunt-contrib-clean": "^1.1.0",
|
|
1311
|
-
"grunt-contrib-watch": "^1.0.0",
|
|
1312
|
-
"grunt-eslint": "^23.0.0",
|
|
1313
|
-
"grunt-karma": "^4.0.0",
|
|
1314
|
-
"grunt-mocha-test": "^0.13.3",
|
|
1315
|
-
"grunt-ts": "^6.0.0-beta.19",
|
|
1316
|
-
"grunt-webpack": "^4.0.2",
|
|
1317
|
-
"istanbul-instrumenter-loader": "^1.0.0",
|
|
1318
|
-
"jasmine-core": "^2.4.1",
|
|
1319
|
-
karma: "^6.3.2",
|
|
1320
|
-
"karma-chrome-launcher": "^3.1.0",
|
|
1321
|
-
"karma-firefox-launcher": "^2.1.0",
|
|
1322
|
-
"karma-jasmine": "^1.1.1",
|
|
1323
|
-
"karma-jasmine-ajax": "^0.1.13",
|
|
1324
|
-
"karma-safari-launcher": "^1.0.0",
|
|
1325
|
-
"karma-sauce-launcher": "^4.3.6",
|
|
1326
|
-
"karma-sinon": "^1.0.5",
|
|
1327
|
-
"karma-sourcemap-loader": "^0.3.8",
|
|
1328
|
-
"karma-webpack": "^4.0.2",
|
|
1329
|
-
"load-grunt-tasks": "^3.5.2",
|
|
1330
|
-
minimist: "^1.2.0",
|
|
1331
|
-
mocha: "^8.2.1",
|
|
1332
|
-
sinon: "^4.5.0",
|
|
1333
|
-
"terser-webpack-plugin": "^4.2.3",
|
|
1334
|
-
typescript: "^4.0.5",
|
|
1335
|
-
"url-search-params": "^0.10.0",
|
|
1336
|
-
webpack: "^4.44.2",
|
|
1337
|
-
"webpack-dev-server": "^3.11.0"
|
|
1338
|
-
};
|
|
1339
|
-
const homepage = "https://axios-http.com";
|
|
1340
|
-
const jsdelivr = "dist/axios.min.js";
|
|
1341
|
-
const keywords = [
|
|
1342
|
-
"xhr",
|
|
1343
|
-
"http",
|
|
1344
|
-
"ajax",
|
|
1345
|
-
"promise",
|
|
1346
|
-
"node"
|
|
1347
|
-
];
|
|
1348
|
-
const license = "MIT";
|
|
1349
|
-
const main = "index.js";
|
|
1350
|
-
const name = "axios";
|
|
1351
|
-
const repository = {
|
|
1352
|
-
type: "git",
|
|
1353
|
-
url: "git+https://github.com/axios/axios.git"
|
|
1354
|
-
};
|
|
1355
|
-
const scripts = {
|
|
1356
|
-
build: "NODE_ENV=production grunt build",
|
|
1357
|
-
coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
1358
|
-
examples: "node ./examples/server.js",
|
|
1359
|
-
fix: "eslint --fix lib/**/*.js",
|
|
1360
|
-
postversion: "git push && git push --tags",
|
|
1361
|
-
preversion: "npm test",
|
|
1362
|
-
start: "node ./sandbox/server.js",
|
|
1363
|
-
test: "grunt test",
|
|
1364
|
-
version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
|
|
1365
|
-
};
|
|
1366
|
-
const typings = "./index.d.ts";
|
|
1367
|
-
const unpkg = "dist/axios.min.js";
|
|
1368
|
-
const version = "0.21.4";
|
|
1369
|
-
const pkg = {
|
|
1370
|
-
_from: _from,
|
|
1371
|
-
_id: _id,
|
|
1372
|
-
_inBundle: _inBundle,
|
|
1373
|
-
_integrity: _integrity,
|
|
1374
|
-
_location: _location,
|
|
1375
|
-
_phantomChildren: _phantomChildren,
|
|
1376
|
-
_requested: _requested,
|
|
1377
|
-
_requiredBy: _requiredBy,
|
|
1378
|
-
_resolved: _resolved,
|
|
1379
|
-
_shasum: _shasum,
|
|
1380
|
-
_spec: _spec,
|
|
1381
|
-
_where: _where,
|
|
1382
|
-
author: author,
|
|
1383
|
-
browser: browser,
|
|
1384
|
-
bugs: bugs,
|
|
1385
|
-
bundleDependencies: bundleDependencies,
|
|
1386
|
-
bundlesize: bundlesize,
|
|
1387
|
-
dependencies: dependencies,
|
|
1388
|
-
deprecated: deprecated,
|
|
1389
|
-
description: description,
|
|
1390
|
-
devDependencies: devDependencies,
|
|
1391
|
-
homepage: homepage,
|
|
1392
|
-
jsdelivr: jsdelivr,
|
|
1393
|
-
keywords: keywords,
|
|
1394
|
-
license: license,
|
|
1395
|
-
main: main,
|
|
1396
|
-
name: name,
|
|
1397
|
-
repository: repository,
|
|
1398
|
-
scripts: scripts,
|
|
1399
|
-
typings: typings,
|
|
1400
|
-
unpkg: unpkg,
|
|
1401
|
-
version: version
|
|
1371
|
+
var data = {
|
|
1372
|
+
"version": "0.25.0"
|
|
1402
1373
|
};
|
|
1403
1374
|
|
|
1375
|
+
var VERSION = data.version;
|
|
1376
|
+
|
|
1404
1377
|
var validators$1 = {};
|
|
1405
1378
|
|
|
1406
1379
|
// eslint-disable-next-line func-names
|
|
@@ -1411,48 +1384,26 @@ var validators$1 = {};
|
|
|
1411
1384
|
});
|
|
1412
1385
|
|
|
1413
1386
|
var deprecatedWarnings = {};
|
|
1414
|
-
var currentVerArr = pkg.version.split('.');
|
|
1415
|
-
|
|
1416
|
-
/**
|
|
1417
|
-
* Compare package versions
|
|
1418
|
-
* @param {string} version
|
|
1419
|
-
* @param {string?} thanVersion
|
|
1420
|
-
* @returns {boolean}
|
|
1421
|
-
*/
|
|
1422
|
-
function isOlderVersion(version, thanVersion) {
|
|
1423
|
-
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
|
|
1424
|
-
var destVer = version.split('.');
|
|
1425
|
-
for (var i = 0; i < 3; i++) {
|
|
1426
|
-
if (pkgVersionArr[i] > destVer[i]) {
|
|
1427
|
-
return true;
|
|
1428
|
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
1429
|
-
return false;
|
|
1430
|
-
}
|
|
1431
|
-
}
|
|
1432
|
-
return false;
|
|
1433
|
-
}
|
|
1434
1387
|
|
|
1435
1388
|
/**
|
|
1436
1389
|
* Transitional option validator
|
|
1437
|
-
* @param {function|boolean?} validator
|
|
1438
|
-
* @param {string?} version
|
|
1439
|
-
* @param {string} message
|
|
1390
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
1391
|
+
* @param {string?} version - deprecated version / removed since version
|
|
1392
|
+
* @param {string?} message - some message with additional info
|
|
1440
1393
|
* @returns {function}
|
|
1441
1394
|
*/
|
|
1442
1395
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
1443
|
-
var isDeprecated = version && isOlderVersion(version);
|
|
1444
|
-
|
|
1445
1396
|
function formatMessage(opt, desc) {
|
|
1446
|
-
return '[Axios v' +
|
|
1397
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
1447
1398
|
}
|
|
1448
1399
|
|
|
1449
1400
|
// eslint-disable-next-line func-names
|
|
1450
1401
|
return function(value, opt, opts) {
|
|
1451
1402
|
if (validator === false) {
|
|
1452
|
-
throw new Error(formatMessage(opt, ' has been removed in ' + version));
|
|
1403
|
+
throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
|
|
1453
1404
|
}
|
|
1454
1405
|
|
|
1455
|
-
if (
|
|
1406
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
1456
1407
|
deprecatedWarnings[opt] = true;
|
|
1457
1408
|
// eslint-disable-next-line no-console
|
|
1458
1409
|
console.warn(
|
|
@@ -1498,7 +1449,6 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
1498
1449
|
}
|
|
1499
1450
|
|
|
1500
1451
|
var validator = {
|
|
1501
|
-
isOlderVersion: isOlderVersion,
|
|
1502
1452
|
assertOptions: assertOptions,
|
|
1503
1453
|
validators: validators$1
|
|
1504
1454
|
};
|
|
@@ -1522,14 +1472,18 @@ function Axios(instanceConfig) {
|
|
|
1522
1472
|
*
|
|
1523
1473
|
* @param {Object} config The config specific for this request (merged with this.defaults)
|
|
1524
1474
|
*/
|
|
1525
|
-
Axios.prototype.request = function request(config) {
|
|
1475
|
+
Axios.prototype.request = function request(configOrUrl, config) {
|
|
1526
1476
|
/*eslint no-param-reassign:0*/
|
|
1527
1477
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
1528
|
-
if (typeof
|
|
1529
|
-
config = arguments[1] || {};
|
|
1530
|
-
config.url = arguments[0];
|
|
1531
|
-
} else {
|
|
1478
|
+
if (typeof configOrUrl === 'string') {
|
|
1532
1479
|
config = config || {};
|
|
1480
|
+
config.url = configOrUrl;
|
|
1481
|
+
} else {
|
|
1482
|
+
config = configOrUrl || {};
|
|
1483
|
+
}
|
|
1484
|
+
|
|
1485
|
+
if (!config.url) {
|
|
1486
|
+
throw new Error('Provided config url is not valid');
|
|
1533
1487
|
}
|
|
1534
1488
|
|
|
1535
1489
|
config = mergeConfig(this.defaults, config);
|
|
@@ -1547,9 +1501,9 @@ Axios.prototype.request = function request(config) {
|
|
|
1547
1501
|
|
|
1548
1502
|
if (transitional !== undefined) {
|
|
1549
1503
|
validator.assertOptions(transitional, {
|
|
1550
|
-
silentJSONParsing: validators.transitional(validators.boolean
|
|
1551
|
-
forcedJSONParsing: validators.transitional(validators.boolean
|
|
1552
|
-
clarifyTimeoutError: validators.transitional(validators.boolean
|
|
1504
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
1505
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
1506
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
1553
1507
|
}, false);
|
|
1554
1508
|
}
|
|
1555
1509
|
|
|
@@ -1614,6 +1568,9 @@ Axios.prototype.request = function request(config) {
|
|
|
1614
1568
|
};
|
|
1615
1569
|
|
|
1616
1570
|
Axios.prototype.getUri = function getUri(config) {
|
|
1571
|
+
if (!config.url) {
|
|
1572
|
+
throw new Error('Provided config url is not valid');
|
|
1573
|
+
}
|
|
1617
1574
|
config = mergeConfig(this.defaults, config);
|
|
1618
1575
|
return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
|
|
1619
1576
|
};
|
|
@@ -1643,24 +1600,6 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
1643
1600
|
|
|
1644
1601
|
var Axios_1 = Axios;
|
|
1645
1602
|
|
|
1646
|
-
/**
|
|
1647
|
-
* A `Cancel` is an object that is thrown when an operation is canceled.
|
|
1648
|
-
*
|
|
1649
|
-
* @class
|
|
1650
|
-
* @param {string=} message The message.
|
|
1651
|
-
*/
|
|
1652
|
-
function Cancel(message) {
|
|
1653
|
-
this.message = message;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
Cancel.prototype.toString = function toString() {
|
|
1657
|
-
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
|
1658
|
-
};
|
|
1659
|
-
|
|
1660
|
-
Cancel.prototype.__CANCEL__ = true;
|
|
1661
|
-
|
|
1662
|
-
var Cancel_1 = Cancel;
|
|
1663
|
-
|
|
1664
1603
|
/**
|
|
1665
1604
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
1666
1605
|
*
|
|
@@ -1673,11 +1612,42 @@ function CancelToken(executor) {
|
|
|
1673
1612
|
}
|
|
1674
1613
|
|
|
1675
1614
|
var resolvePromise;
|
|
1615
|
+
|
|
1676
1616
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
1677
1617
|
resolvePromise = resolve;
|
|
1678
1618
|
});
|
|
1679
1619
|
|
|
1680
1620
|
var token = this;
|
|
1621
|
+
|
|
1622
|
+
// eslint-disable-next-line func-names
|
|
1623
|
+
this.promise.then(function(cancel) {
|
|
1624
|
+
if (!token._listeners) return;
|
|
1625
|
+
|
|
1626
|
+
var i;
|
|
1627
|
+
var l = token._listeners.length;
|
|
1628
|
+
|
|
1629
|
+
for (i = 0; i < l; i++) {
|
|
1630
|
+
token._listeners[i](cancel);
|
|
1631
|
+
}
|
|
1632
|
+
token._listeners = null;
|
|
1633
|
+
});
|
|
1634
|
+
|
|
1635
|
+
// eslint-disable-next-line func-names
|
|
1636
|
+
this.promise.then = function(onfulfilled) {
|
|
1637
|
+
var _resolve;
|
|
1638
|
+
// eslint-disable-next-line func-names
|
|
1639
|
+
var promise = new Promise(function(resolve) {
|
|
1640
|
+
token.subscribe(resolve);
|
|
1641
|
+
_resolve = resolve;
|
|
1642
|
+
}).then(onfulfilled);
|
|
1643
|
+
|
|
1644
|
+
promise.cancel = function reject() {
|
|
1645
|
+
token.unsubscribe(_resolve);
|
|
1646
|
+
};
|
|
1647
|
+
|
|
1648
|
+
return promise;
|
|
1649
|
+
};
|
|
1650
|
+
|
|
1681
1651
|
executor(function cancel(message) {
|
|
1682
1652
|
if (token.reason) {
|
|
1683
1653
|
// Cancellation has already been requested
|
|
@@ -1698,6 +1668,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
|
1698
1668
|
}
|
|
1699
1669
|
};
|
|
1700
1670
|
|
|
1671
|
+
/**
|
|
1672
|
+
* Subscribe to the cancel signal
|
|
1673
|
+
*/
|
|
1674
|
+
|
|
1675
|
+
CancelToken.prototype.subscribe = function subscribe(listener) {
|
|
1676
|
+
if (this.reason) {
|
|
1677
|
+
listener(this.reason);
|
|
1678
|
+
return;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
1681
|
+
if (this._listeners) {
|
|
1682
|
+
this._listeners.push(listener);
|
|
1683
|
+
} else {
|
|
1684
|
+
this._listeners = [listener];
|
|
1685
|
+
}
|
|
1686
|
+
};
|
|
1687
|
+
|
|
1688
|
+
/**
|
|
1689
|
+
* Unsubscribe from the cancel signal
|
|
1690
|
+
*/
|
|
1691
|
+
|
|
1692
|
+
CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
|
|
1693
|
+
if (!this._listeners) {
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
var index = this._listeners.indexOf(listener);
|
|
1697
|
+
if (index !== -1) {
|
|
1698
|
+
this._listeners.splice(index, 1);
|
|
1699
|
+
}
|
|
1700
|
+
};
|
|
1701
|
+
|
|
1701
1702
|
/**
|
|
1702
1703
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1703
1704
|
* cancels the `CancelToken`.
|
|
@@ -1748,7 +1749,7 @@ var spread = function spread(callback) {
|
|
|
1748
1749
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
1749
1750
|
*/
|
|
1750
1751
|
var isAxiosError = function isAxiosError(payload) {
|
|
1751
|
-
return (
|
|
1752
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
1752
1753
|
};
|
|
1753
1754
|
|
|
1754
1755
|
/**
|
|
@@ -1767,6 +1768,11 @@ function createInstance(defaultConfig) {
|
|
|
1767
1768
|
// Copy context to instance
|
|
1768
1769
|
utils.extend(instance, context);
|
|
1769
1770
|
|
|
1771
|
+
// Factory for creating new instances
|
|
1772
|
+
instance.create = function create(instanceConfig) {
|
|
1773
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
1774
|
+
};
|
|
1775
|
+
|
|
1770
1776
|
return instance;
|
|
1771
1777
|
}
|
|
1772
1778
|
|
|
@@ -1776,15 +1782,11 @@ var axios$1 = createInstance(defaults_1);
|
|
|
1776
1782
|
// Expose Axios class to allow class inheritance
|
|
1777
1783
|
axios$1.Axios = Axios_1;
|
|
1778
1784
|
|
|
1779
|
-
// Factory for creating new instances
|
|
1780
|
-
axios$1.create = function create(instanceConfig) {
|
|
1781
|
-
return createInstance(mergeConfig(axios$1.defaults, instanceConfig));
|
|
1782
|
-
};
|
|
1783
|
-
|
|
1784
1785
|
// Expose Cancel & CancelToken
|
|
1785
1786
|
axios$1.Cancel = Cancel_1;
|
|
1786
1787
|
axios$1.CancelToken = CancelToken_1;
|
|
1787
1788
|
axios$1.isCancel = isCancel;
|
|
1789
|
+
axios$1.VERSION = data.version;
|
|
1788
1790
|
|
|
1789
1791
|
// Expose all/spread
|
|
1790
1792
|
axios$1.all = function all(promises) {
|
|
@@ -1803,76 +1805,168 @@ axios_1.default = _default;
|
|
|
1803
1805
|
|
|
1804
1806
|
var axios = axios_1;
|
|
1805
1807
|
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1808
|
+
/**
|
|
1809
|
+
* A VerdocsEndpoint is a specific connection and authorization session for calling the Verdocs APIs. Where the global
|
|
1810
|
+
* Transport is generally used to simpliy standard-user operations, Endpoints can be used for isolated session tasks.
|
|
1811
|
+
* For instance, ephemeral signing sessions may be created independently of a caller's status as an authenticated user.
|
|
1812
|
+
* In that case, an Endpoint can be created and authenticated, used for calls related to signing operations, then
|
|
1813
|
+
* discarded once signing is complete.
|
|
1814
|
+
*
|
|
1815
|
+
* Note that endpoint configuration functions return the instance, so they can be chained, e.g.
|
|
1816
|
+
*
|
|
1817
|
+
* ```typescript
|
|
1818
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1819
|
+
*
|
|
1820
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1821
|
+
* endpoint
|
|
1822
|
+
* .logRequests(true)
|
|
1823
|
+
* .setClientID('1234)
|
|
1824
|
+
* .setTimeout(5000);
|
|
1825
|
+
* ```
|
|
1826
|
+
*
|
|
1827
|
+
* @module
|
|
1828
|
+
*/
|
|
1829
|
+
var requestLogger = function (r) {
|
|
1830
|
+
// tslint:disable-next-line
|
|
1831
|
+
console.debug("[JS-SDK] ".concat(r.method.toUpperCase(), " ").concat(r.baseURL).concat(r.url), r.data ? JSON.stringify(r.data) : '');
|
|
1832
|
+
return r;
|
|
1823
1833
|
};
|
|
1824
|
-
var
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
|
|
1837
|
-
|
|
1838
|
-
|
|
1839
|
-
|
|
1834
|
+
var VerdocsEndpoint = /** @class */ (function () {
|
|
1835
|
+
/**
|
|
1836
|
+
* Create a new Endpoint to call Verdocs services.
|
|
1837
|
+
*
|
|
1838
|
+
* ```typescript
|
|
1839
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1840
|
+
*
|
|
1841
|
+
* console.log('Current timeout', Transport.getEndpoint().defaults.timeout);
|
|
1842
|
+
* ```
|
|
1843
|
+
*/
|
|
1844
|
+
function VerdocsEndpoint(_a) {
|
|
1845
|
+
var _b = _a === void 0 ? {} : _a, baseURL = _b.baseURL, timeout = _b.timeout;
|
|
1846
|
+
this.requestLoggerId = null;
|
|
1847
|
+
this.api = axios.create({
|
|
1848
|
+
baseURL: baseURL || 'https://api.verdocs.com',
|
|
1849
|
+
timeout: timeout || 6000,
|
|
1840
1850
|
});
|
|
1841
1851
|
}
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
}
|
|
1856
|
-
|
|
1852
|
+
/**
|
|
1853
|
+
* Set the timeout for API calls in milliseconds. 2000-4000ms is recommended for most purposes. 3000ms is the default.
|
|
1854
|
+
*
|
|
1855
|
+
* ```typescript
|
|
1856
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1857
|
+
*
|
|
1858
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1859
|
+
* endpoint.setTimeout(3000);
|
|
1860
|
+
* ```
|
|
1861
|
+
*/
|
|
1862
|
+
VerdocsEndpoint.prototype.setTimeout = function (timeout) {
|
|
1863
|
+
this.api.defaults.timeout = timeout;
|
|
1864
|
+
return this;
|
|
1865
|
+
};
|
|
1866
|
+
/**
|
|
1867
|
+
* Set the Client ID for Verdocs API calls.
|
|
1868
|
+
*
|
|
1869
|
+
* ```typescript
|
|
1870
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1871
|
+
*
|
|
1872
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1873
|
+
* endpoint.setClientID('1234);
|
|
1874
|
+
* ```
|
|
1875
|
+
*/
|
|
1876
|
+
VerdocsEndpoint.prototype.setClientID = function (clientID) {
|
|
1877
|
+
this.api.defaults.headers.common['X-Client-ID'] = clientID;
|
|
1878
|
+
return this;
|
|
1879
|
+
};
|
|
1880
|
+
/**
|
|
1881
|
+
* Set the auth token that will be used for Verdocs API calls.
|
|
1882
|
+
*
|
|
1883
|
+
* ```typescript
|
|
1884
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1885
|
+
*
|
|
1886
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1887
|
+
* endpoint.setAuthorization(accessToken);
|
|
1888
|
+
* ```
|
|
1889
|
+
*/
|
|
1890
|
+
VerdocsEndpoint.prototype.setAuthorization = function (accessToken) {
|
|
1891
|
+
if (accessToken) {
|
|
1892
|
+
this.api.defaults.headers.common.Authorization = "Bearer ".concat(accessToken);
|
|
1893
|
+
}
|
|
1894
|
+
else {
|
|
1895
|
+
delete this.api.defaults.headers.common.Authorization;
|
|
1896
|
+
}
|
|
1897
|
+
return this;
|
|
1898
|
+
};
|
|
1899
|
+
/**
|
|
1900
|
+
* Set the auth token used for signing sessions. Separating user from signing auth allows the same endpoint to be
|
|
1901
|
+
* used for multiple operations, although it is recommended that a separate endpoint be created for each operation.
|
|
1902
|
+
*
|
|
1903
|
+
* ```typescript
|
|
1904
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1905
|
+
*
|
|
1906
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1907
|
+
* endpoint.setSigningAuthorization(accessToken);
|
|
1908
|
+
* ```
|
|
1909
|
+
*/
|
|
1910
|
+
VerdocsEndpoint.prototype.setSigningAuthorization = function (accessToken) {
|
|
1911
|
+
if (accessToken) {
|
|
1912
|
+
this.api.defaults.headers.common.signer = "Bearer ".concat(accessToken);
|
|
1913
|
+
}
|
|
1914
|
+
else {
|
|
1915
|
+
delete this.api.defaults.headers.common.signer;
|
|
1916
|
+
}
|
|
1917
|
+
return this;
|
|
1918
|
+
};
|
|
1919
|
+
/**
|
|
1920
|
+
* Set the base URL for API calls. May also be set via the constructor.
|
|
1921
|
+
*
|
|
1922
|
+
* ```typescript
|
|
1923
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1924
|
+
*
|
|
1925
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1926
|
+
* endpoint.setBaseURL('https://api.verdocs.com');
|
|
1927
|
+
* ```
|
|
1928
|
+
*/
|
|
1929
|
+
VerdocsEndpoint.prototype.setBaseURL = function (url) {
|
|
1930
|
+
this.api.defaults.baseURL = url;
|
|
1931
|
+
return this;
|
|
1932
|
+
};
|
|
1933
|
+
/**
|
|
1934
|
+
* Enable or disable request logging. This may expose sensitive data in the console log, so it should only be used for debugging.
|
|
1935
|
+
*
|
|
1936
|
+
* ```typescript
|
|
1937
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1938
|
+
*
|
|
1939
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1940
|
+
* endpoint.logRequests(true);
|
|
1941
|
+
* ```
|
|
1942
|
+
*/
|
|
1943
|
+
VerdocsEndpoint.prototype.logRequests = function (enable) {
|
|
1944
|
+
if (enable && this.requestLoggerId === null) {
|
|
1945
|
+
this.requestLoggerId = this.api.interceptors.request.use(requestLogger);
|
|
1946
|
+
}
|
|
1947
|
+
else if (!enable && this.requestLoggerId !== null) {
|
|
1948
|
+
this.api.interceptors.request.eject(this.requestLoggerId);
|
|
1949
|
+
}
|
|
1950
|
+
return this;
|
|
1951
|
+
};
|
|
1952
|
+
return VerdocsEndpoint;
|
|
1953
|
+
}());
|
|
1857
1954
|
|
|
1858
1955
|
/**
|
|
1859
|
-
* The Transport
|
|
1860
|
-
* its configuration settings are shared for all callers.
|
|
1956
|
+
* The Transport is a global singleton used to call Verdocs APIs. There can only be one Transport per application, and
|
|
1957
|
+
* its configuration settings are shared for all callers. This is a simplified form of the Endpoint class where most
|
|
1958
|
+
* tasks such as general session-token-management are handled automatically for the caller.
|
|
1861
1959
|
*
|
|
1862
1960
|
* @module
|
|
1863
1961
|
*/
|
|
1864
|
-
var DEFAULTS = {
|
|
1865
|
-
baseURL: 'https://api.verdocs.com/',
|
|
1866
|
-
timeout: 6000,
|
|
1867
|
-
headers: { 'X-Client-ID': 'NONE' },
|
|
1868
|
-
};
|
|
1869
1962
|
// @credit https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/
|
|
1870
1963
|
// Also see globalThis for comments about why we're doing this in the first place.
|
|
1871
1964
|
var ENDPOINT_KEY = Symbol.for('verdocs-api-endpoint');
|
|
1872
1965
|
if (!globalThis_1[ENDPOINT_KEY]) {
|
|
1873
|
-
globalThis_1[ENDPOINT_KEY] =
|
|
1966
|
+
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint({ baseURL: 'https://api.verdocs.com/' });
|
|
1874
1967
|
}
|
|
1875
|
-
var
|
|
1968
|
+
var globalEndpoint = globalThis_1[ENDPOINT_KEY];
|
|
1969
|
+
var activeEndpoint = globalEndpoint;
|
|
1876
1970
|
/**
|
|
1877
1971
|
* Helper to get the endpoint for direct access to HTTP functions.
|
|
1878
1972
|
*
|
|
@@ -1883,68 +1977,27 @@ var endpoint = globalThis_1[ENDPOINT_KEY];
|
|
|
1883
1977
|
* ```
|
|
1884
1978
|
*/
|
|
1885
1979
|
var getEndpoint = function () {
|
|
1886
|
-
return
|
|
1887
|
-
};
|
|
1888
|
-
|
|
1889
|
-
/**
|
|
1890
|
-
* Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
|
|
1891
|
-
* to locate items across all content types. More specific retrievals may be performed using the various "list" endpoints within
|
|
1892
|
-
* each collection (e.g. {@link Documents.Documents.searchDocuments} or {@link Templates.Templates.searchTemplates}).
|
|
1893
|
-
*
|
|
1894
|
-
* @module
|
|
1895
|
-
*/
|
|
1896
|
-
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1897
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
1898
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1899
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1900
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1901
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1902
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1903
|
-
});
|
|
1904
|
-
};
|
|
1905
|
-
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
1906
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
1907
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
1908
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
1909
|
-
function step(op) {
|
|
1910
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
1911
|
-
while (_) try {
|
|
1912
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
1913
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
1914
|
-
switch (op[0]) {
|
|
1915
|
-
case 0: case 1: t = op; break;
|
|
1916
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
1917
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
1918
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
1919
|
-
default:
|
|
1920
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
1921
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
1922
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
1923
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
1924
|
-
if (t[2]) _.ops.pop();
|
|
1925
|
-
_.trys.pop(); continue;
|
|
1926
|
-
}
|
|
1927
|
-
op = body.call(thisArg, _);
|
|
1928
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
1929
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
1930
|
-
}
|
|
1980
|
+
return activeEndpoint;
|
|
1931
1981
|
};
|
|
1932
1982
|
/**
|
|
1933
|
-
*
|
|
1934
|
-
*
|
|
1983
|
+
* Change the endpoint that will be used when making calls to Verdocs. Only one endpoint may be active at a time.
|
|
1984
|
+
* Authorization and other configuration data is specific to each endpoint, and will not be carried over when the
|
|
1985
|
+
* endpoint is changed. The typical use-case is to change to a sandboxed endpoint for signing sessions, then revert
|
|
1986
|
+
* to the global endpoint when the signing session is complete. To revert, pass `null` as the endpoint to use.
|
|
1935
1987
|
*
|
|
1936
1988
|
* ```typescript
|
|
1937
|
-
* import {
|
|
1989
|
+
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
1938
1990
|
*
|
|
1939
|
-
* const
|
|
1991
|
+
* const mySigningEndpoint = new VerdocsEndpoint();
|
|
1992
|
+
* setActiveEndpoint(mySigningEndpoint);
|
|
1993
|
+
* ... [Perform signing operations]
|
|
1994
|
+
* setActiveEndpoint(null);
|
|
1940
1995
|
* ```
|
|
1941
1996
|
*/
|
|
1942
|
-
var
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
.get('/search/history')
|
|
1946
|
-
.then(function (r) { return r.data; })];
|
|
1947
|
-
});
|
|
1948
|
-
}); };
|
|
1997
|
+
var setActiveEndpoint = function (e) {
|
|
1998
|
+
activeEndpoint = e || globalEndpoint;
|
|
1999
|
+
};
|
|
1949
2000
|
|
|
1950
|
-
|
|
2001
|
+
exports.VerdocsEndpoint = VerdocsEndpoint;
|
|
2002
|
+
exports.getEndpoint = getEndpoint;
|
|
2003
|
+
exports.setActiveEndpoint = setActiveEndpoint;
|