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