@verdocs/web-sdk 1.0.25 → 1.4.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/Auth-0146ddd8.js +161 -0
- package/dist/cjs/Token-b86e5335.js +2463 -0
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/buffer-es6-b2c1c885.js +1987 -0
- package/dist/cjs/css-shim-e9231523.js +6 -0
- package/dist/cjs/dom-7fb93981.js +75 -0
- package/dist/cjs/index-9c6e5f50.js +1976 -0
- package/dist/cjs/index-a24f3b6a.js +3096 -0
- package/dist/cjs/index-b5a86b04.js +4 -0
- package/dist/cjs/index-c4be37e1.js +54 -0
- package/dist/cjs/loader.cjs.js +19 -3
- package/dist/cjs/shadow-css-abc19485.js +389 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +306 -0
- package/dist/cjs/verdocs-button.cjs.entry.js +49 -0
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +80 -0
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +59 -0
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +39 -0
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2968 -0
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +59 -0
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +52 -0
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +86 -0
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +48 -0
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +52 -0
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +63 -0
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +63 -0
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +243 -0
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +81 -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-quick-functions.cjs.entry.js +31 -0
- package/dist/cjs/verdocs-search-activity.cjs.entry.js +263 -0
- package/dist/cjs/{search-box.cjs.entry.js → verdocs-search-box.cjs.entry.js} +6 -6
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +20 -0
- package/dist/cjs/verdocs-search.cjs.entry.js +19 -0
- package/dist/cjs/verdocs-sign.cjs.entry.js +1999 -0
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +239 -0
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +7615 -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-text-input.cjs.entry.js +62 -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-view.cjs.entry.js +16122 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +117 -5
- package/dist/collection/collection-manifest.json +34 -16
- package/dist/collection/components/controls/verdocs-button/verdocs-button.css +140 -0
- package/dist/collection/components/controls/verdocs-button/verdocs-button.js +205 -0
- package/dist/collection/components/controls/verdocs-button/verdocs-button.stories.js +59 -0
- package/dist/collection/components/controls/{dropdown-menu → verdocs-dropdown}/down-arrow.svg +0 -0
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.css +62 -0
- package/dist/collection/components/controls/{dropdown-menu/dropdown-menu.js → verdocs-dropdown/verdocs-dropdown.js} +26 -47
- 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 +16 -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} +16 -40
- 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/controls/verdocs-status-indicator/accepted-dark.svg +4 -0
- package/dist/collection/components/controls/verdocs-status-indicator/accepted-light.svg +4 -0
- package/dist/collection/components/controls/verdocs-status-indicator/arrowright.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/canceled-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/canceled-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/complete-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/complete-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/declined-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/declined-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/in-progress-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/in-progress-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/opened-dark.svg +4 -0
- package/dist/collection/components/controls/verdocs-status-indicator/opened-light.svg +4 -0
- package/dist/collection/components/controls/verdocs-status-indicator/pending-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/pending-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/recipient-flow.js +218 -0
- package/dist/collection/components/controls/verdocs-status-indicator/signed-dark.svg +4 -0
- package/dist/collection/components/controls/verdocs-status-indicator/signed-light.svg +4 -0
- package/dist/collection/components/controls/verdocs-status-indicator/some-signed-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/some-signed-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/submitted-dark.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/submitted-light.svg +3 -0
- package/dist/collection/components/controls/verdocs-status-indicator/verdocs-status-indicator.css +48 -0
- package/dist/collection/components/controls/verdocs-status-indicator/verdocs-status-indicator.js +344 -0
- package/dist/collection/components/controls/verdocs-status-indicator/verdocs-status-indicator.stories.js +69 -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 +62 -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 +17 -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 +28 -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/verdocs-toggle/verdocs-toggle.css +52 -0
- 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 +85 -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-kba-dialog/question.svg +4 -0
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +95 -0
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +292 -0
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.js +36 -0
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +47 -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 +85 -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 +98 -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/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/elements/{search-quick-functions → verdocs-quick-functions}/document-icon.svg +0 -0
- package/dist/collection/components/elements/{search-quick-functions → verdocs-quick-functions}/template-icon.svg +0 -0
- package/dist/collection/components/elements/{search-quick-functions/search-quick-functions.css → verdocs-quick-functions/verdocs-quick-functions.css} +5 -5
- package/dist/collection/components/elements/{search-quick-functions/search-quick-functions.js → verdocs-quick-functions/verdocs-quick-functions.js} +12 -10
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.stories.js +15 -0
- package/dist/collection/components/elements/{search-starred → verdocs-search-activity}/document-icon.svg +0 -0
- package/dist/collection/components/elements/{search-starred/search-starred.css → verdocs-search-activity/verdocs-search-activity.css} +12 -12
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +168 -0
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +14 -0
- package/dist/collection/components/elements/{search-box → verdocs-search-box}/close.svg +0 -0
- package/dist/collection/components/elements/{search-box → verdocs-search-box}/search.svg +0 -0
- package/dist/collection/components/elements/{search-box/search-box.css → verdocs-search-box/verdocs-search-box.css} +9 -9
- package/dist/collection/components/elements/{search-box/search-box.js → verdocs-search-box/verdocs-search-box.js} +17 -15
- package/dist/collection/components/elements/{search-box/search-box.stories.js → verdocs-search-box/verdocs-search-box.stories.js} +3 -3
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.css +3 -0
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +19 -0
- package/dist/collection/components/elements/{search-tabs/search-tabs.stories.js → verdocs-search-tabs/verdocs-search-tabs.stories.js} +3 -3
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +58 -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 +23 -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 +124 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +405 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +19 -0
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +51 -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/components/Auth.js +157 -0
- package/dist/components/Token.js +2458 -0
- package/dist/components/buffer-es6.js +1985 -0
- package/dist/components/index.d.ts +53 -0
- package/dist/components/index.js +37 -0
- package/dist/components/index2.js +1 -0
- package/dist/{cjs/dropdown-menu.cjs.entry.js → components/index3.js} +307 -140
- package/dist/components/index4.js +47 -0
- package/dist/components/verdocs-auth.d.ts +11 -0
- package/dist/components/verdocs-auth.js +347 -0
- package/dist/components/verdocs-button.d.ts +11 -0
- package/dist/components/verdocs-button.js +6 -0
- package/dist/components/verdocs-button2.js +68 -0
- package/dist/components/verdocs-dropdown.d.ts +11 -0
- package/dist/components/verdocs-dropdown.js +6 -0
- package/dist/components/verdocs-dropdown2.js +94 -0
- package/dist/components/verdocs-field-attachment.d.ts +11 -0
- package/dist/components/verdocs-field-attachment.js +6 -0
- package/dist/components/verdocs-field-attachment2.js +88 -0
- package/dist/components/verdocs-field-checkbox.d.ts +11 -0
- package/dist/components/verdocs-field-checkbox.js +6 -0
- package/dist/components/verdocs-field-checkbox2.js +55 -0
- package/dist/components/verdocs-field-date.d.ts +11 -0
- package/dist/components/verdocs-field-date.js +6 -0
- package/dist/components/verdocs-field-date2.js +2987 -0
- package/dist/components/verdocs-field-dropdown.d.ts +11 -0
- package/dist/components/verdocs-field-dropdown.js +6 -0
- package/dist/components/verdocs-field-dropdown2.js +78 -0
- package/dist/components/verdocs-field-initial.d.ts +11 -0
- package/dist/components/verdocs-field-initial.js +6 -0
- package/dist/components/verdocs-field-initial2.js +86 -0
- package/dist/components/verdocs-field-payment.d.ts +11 -0
- package/dist/components/verdocs-field-payment.js +6 -0
- package/dist/components/verdocs-field-payment2.js +114 -0
- package/dist/components/verdocs-field-radio-button.d.ts +11 -0
- package/dist/components/verdocs-field-radio-button.js +6 -0
- package/dist/components/verdocs-field-radio-button2.js +66 -0
- package/dist/components/verdocs-field-signature.d.ts +11 -0
- package/dist/components/verdocs-field-signature.js +6 -0
- package/dist/components/verdocs-field-signature2.js +86 -0
- package/dist/components/verdocs-field-textarea.d.ts +11 -0
- package/dist/components/verdocs-field-textarea.js +6 -0
- package/dist/components/verdocs-field-textarea2.js +82 -0
- package/dist/components/verdocs-field-textbox.d.ts +11 -0
- package/dist/components/verdocs-field-textbox.js +6 -0
- package/dist/components/verdocs-field-textbox2.js +82 -0
- package/dist/components/verdocs-initial-dialog.d.ts +11 -0
- package/dist/components/verdocs-initial-dialog.js +6 -0
- package/dist/components/verdocs-initial-dialog2.js +272 -0
- package/dist/components/verdocs-kba-dialog.d.ts +11 -0
- package/dist/components/verdocs-kba-dialog.js +112 -0
- package/dist/components/verdocs-loader.d.ts +11 -0
- package/dist/components/verdocs-loader.js +6 -0
- package/dist/components/verdocs-loader2.js +30 -0
- package/dist/components/verdocs-ok-dialog.d.ts +11 -0
- package/dist/components/verdocs-ok-dialog.js +6 -0
- package/dist/components/verdocs-ok-dialog2.js +70 -0
- package/dist/components/verdocs-organization-card.d.ts +11 -0
- package/dist/components/verdocs-organization-card.js +38 -0
- package/dist/components/verdocs-quick-functions.d.ts +11 -0
- package/dist/components/verdocs-quick-functions.js +45 -0
- package/dist/components/verdocs-search-activity.d.ts +11 -0
- package/dist/components/verdocs-search-activity.js +6 -0
- package/dist/components/verdocs-search-activity2.js +281 -0
- package/dist/components/verdocs-search-box.d.ts +11 -0
- package/dist/components/verdocs-search-box.js +6 -0
- package/dist/components/verdocs-search-box2.js +75 -0
- package/dist/components/verdocs-search-tabs.d.ts +11 -0
- package/dist/components/verdocs-search-tabs.js +36 -0
- package/dist/components/verdocs-search.d.ts +11 -0
- package/dist/components/verdocs-search.js +45 -0
- package/dist/components/verdocs-sign.d.ts +11 -0
- package/dist/components/verdocs-sign.js +2135 -0
- package/dist/components/verdocs-signature-dialog.d.ts +11 -0
- package/dist/components/verdocs-signature-dialog.js +6 -0
- package/dist/components/verdocs-signature-dialog2.js +268 -0
- package/dist/components/verdocs-status-indicator.d.ts +11 -0
- package/dist/components/verdocs-status-indicator.js +7635 -0
- package/dist/components/verdocs-template-card.d.ts +11 -0
- package/dist/components/verdocs-template-card.js +54 -0
- package/dist/components/verdocs-template-tags.d.ts +11 -0
- package/dist/components/verdocs-template-tags.js +36 -0
- package/dist/components/verdocs-text-input.d.ts +11 -0
- package/dist/components/verdocs-text-input.js +6 -0
- package/dist/components/verdocs-text-input2.js +81 -0
- package/dist/components/verdocs-toggle.d.ts +11 -0
- package/dist/components/verdocs-toggle.js +53 -0
- package/dist/components/verdocs-upload-dialog.d.ts +11 -0
- package/dist/components/verdocs-upload-dialog.js +6 -0
- package/dist/components/verdocs-upload-dialog2.js +144 -0
- package/dist/components/verdocs-view.d.ts +11 -0
- package/dist/components/verdocs-view.js +6 -0
- package/dist/components/verdocs-view2.js +16144 -0
- package/dist/custom-elements.json +830 -0
- package/dist/docs.d.ts +3 -0
- package/dist/docs.json +3026 -334
- package/dist/esm/Auth-4b21fced.js +157 -0
- package/dist/{cjs/Content-e1c04dfa.js → esm/Token-29eea56d.js} +912 -406
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/buffer-es6-5cef4368.js +1985 -0
- package/dist/esm/css-shim-60f618b9.js +4 -0
- package/dist/esm/dom-4eeb3fee.js +73 -0
- package/dist/esm/{dropdown-menu.entry.js → index-432c65a6.js} +307 -136
- package/dist/esm/index-97ec070b.js +47 -0
- package/dist/esm/index-ddbd60b5.js +3059 -0
- package/dist/esm/index-ef172650.js +1 -0
- package/dist/esm/loader.js +19 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/shadow-css-02866686.js +387 -0
- package/dist/esm/verdocs-auth.entry.js +302 -0
- package/dist/esm/verdocs-button.entry.js +45 -0
- package/dist/esm/verdocs-dropdown.entry.js +76 -0
- package/dist/esm/verdocs-field-attachment.entry.js +55 -0
- package/dist/esm/verdocs-field-checkbox.entry.js +35 -0
- package/dist/esm/verdocs-field-date.entry.js +2964 -0
- package/dist/esm/verdocs-field-dropdown.entry.js +55 -0
- package/dist/esm/verdocs-field-initial.entry.js +48 -0
- package/dist/esm/verdocs-field-payment.entry.js +82 -0
- package/dist/esm/verdocs-field-radio-button.entry.js +44 -0
- package/dist/esm/verdocs-field-signature.entry.js +48 -0
- package/dist/esm/verdocs-field-textarea.entry.js +59 -0
- package/dist/esm/verdocs-field-textbox.entry.js +59 -0
- package/dist/esm/verdocs-initial-dialog.entry.js +239 -0
- package/dist/esm/verdocs-kba-dialog.entry.js +77 -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-quick-functions.entry.js +27 -0
- package/dist/esm/verdocs-search-activity.entry.js +259 -0
- package/dist/esm/{search-box.entry.js → verdocs-search-box.entry.js} +6 -6
- package/dist/esm/verdocs-search-tabs.entry.js +16 -0
- package/dist/esm/verdocs-search.entry.js +15 -0
- package/dist/esm/verdocs-sign.entry.js +1995 -0
- package/dist/esm/verdocs-signature-dialog.entry.js +235 -0
- package/dist/esm/verdocs-status-indicator.entry.js +7611 -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-text-input.entry.js +58 -0
- package/dist/esm/verdocs-toggle.entry.js +32 -0
- package/dist/esm/verdocs-upload-dialog.entry.js +119 -0
- package/dist/esm/verdocs-view.entry.js +16118 -0
- package/dist/esm/verdocs-web-sdk.js +117 -5
- package/dist/esm-es5/Auth-4b21fced.js +1 -0
- package/dist/esm-es5/Token-29eea56d.js +1 -0
- package/dist/esm-es5/app-globals-0f993ce5.js +1 -0
- package/dist/esm-es5/buffer-es6-5cef4368.js +7 -0
- package/dist/esm-es5/css-shim-60f618b9.js +1 -0
- package/dist/esm-es5/dom-4eeb3fee.js +21 -0
- package/dist/esm-es5/index-432c65a6.js +1 -0
- package/dist/esm-es5/index-97ec070b.js +1 -0
- package/dist/esm-es5/index-ddbd60b5.js +2 -0
- package/dist/esm-es5/index-ef172650.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/shadow-css-02866686.js +12 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -0
- package/dist/esm-es5/verdocs-button.entry.js +1 -0
- package/dist/esm-es5/verdocs-dropdown.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -0
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-kba-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-quick-functions.entry.js +1 -0
- package/dist/esm-es5/verdocs-search-activity.entry.js +1 -0
- package/dist/esm-es5/verdocs-search-box.entry.js +1 -0
- package/dist/esm-es5/verdocs-search-tabs.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-status-indicator.entry.js +11 -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-text-input.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-view.entry.js +23 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-button/verdocs-button.d.ts +52 -0
- package/dist/types/components/controls/verdocs-button/verdocs-button.stories.d.ts +12 -0
- package/dist/types/components/controls/{dropdown-menu/dropdown-menu.d.ts → verdocs-dropdown/verdocs-dropdown.d.ts} +3 -20
- package/dist/types/components/{elements/search-recent/search-recent.stories.d.ts → controls/verdocs-dropdown/verdocs-dropdown.stories.d.ts} +3 -3
- package/dist/types/components/controls/verdocs-loader/verdocs-loader.d.ts +6 -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-status-indicator/recipient-flow.d.ts +4 -0
- package/dist/types/components/controls/verdocs-status-indicator/verdocs-status-indicator.d.ts +42 -0
- package/dist/types/components/controls/verdocs-status-indicator/verdocs-status-indicator.stories.d.ts +9 -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-kba-dialog/verdocs-kba-dialog.d.ts +57 -0
- package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.d.ts +15 -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/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/elements/{search-quick-functions/search-quick-functions.d.ts → verdocs-quick-functions/verdocs-quick-functions.d.ts} +4 -1
- package/dist/types/components/elements/{search-quick-functions/search-quick-functions.stories.d.ts → verdocs-quick-functions/verdocs-quick-functions.stories.d.ts} +1 -1
- package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.d.ts +28 -0
- package/dist/types/components/elements/{search-starred/search-starred.stories.d.ts → verdocs-search-activity/verdocs-search-activity.stories.d.ts} +2 -2
- package/dist/types/components/elements/{search-box/search-box.d.ts → verdocs-search-box/verdocs-search-box.d.ts} +4 -1
- package/dist/types/components/elements/{search-box/search-box.stories.d.ts → verdocs-search-box/verdocs-search-box.stories.d.ts} +1 -1
- package/dist/types/components/elements/{search-tabs/search-tabs.d.ts → verdocs-search-tabs/verdocs-search-tabs.d.ts} +1 -1
- package/dist/types/components/elements/{search-tabs/search-tabs.stories.d.ts → verdocs-search-tabs/verdocs-search-tabs.stories.d.ts} +1 -1
- 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/{controls/document-status-indicator/document-status-indicator.stories.d.ts → embeds/verdocs-view/verdocs-view.stories.d.ts} +2 -2
- package/dist/types/components.d.ts +1387 -253
- package/dist/types/stencil-public-runtime.d.ts +6 -4
- package/dist/verdocs-web-sdk/Auth-4b21fced.js +157 -0
- package/dist/verdocs-web-sdk/Auth-82e38539.system.js +1 -0
- package/dist/{esm/Content-97cad4ea.js → verdocs-web-sdk/Token-29eea56d.js} +914 -406
- package/dist/verdocs-web-sdk/Token-c1cf309e.system.js +1 -0
- package/dist/verdocs-web-sdk/app-globals-0f993ce5.js +3 -0
- package/dist/verdocs-web-sdk/app-globals-497eb362.system.js +1 -0
- package/dist/verdocs-web-sdk/buffer-es6-5cef4368.js +1985 -0
- package/dist/verdocs-web-sdk/buffer-es6-aa11181b.system.js +7 -0
- package/dist/verdocs-web-sdk/css-shim-60f618b9.js +4 -0
- package/dist/verdocs-web-sdk/css-shim-e41ceccc.system.js +1 -0
- package/dist/verdocs-web-sdk/dom-4eeb3fee.js +73 -0
- package/dist/verdocs-web-sdk/dom-89b5deb7.system.js +21 -0
- package/dist/verdocs-web-sdk/index-027b383e.system.js +1 -0
- package/dist/verdocs-web-sdk/index-06e036a1.system.js +1 -0
- package/dist/verdocs-web-sdk/index-432c65a6.js +1974 -0
- package/dist/verdocs-web-sdk/index-5d49316f.system.js +1 -0
- package/dist/verdocs-web-sdk/index-6465280a.system.js +2 -0
- package/dist/verdocs-web-sdk/index-97ec070b.js +47 -0
- package/dist/verdocs-web-sdk/index-ddbd60b5.js +3059 -0
- package/dist/verdocs-web-sdk/index-ef172650.js +1 -0
- package/dist/verdocs-web-sdk/index.esm.js +1 -0
- package/dist/verdocs-web-sdk/{p-50ea2036.system.js → index.system.js} +0 -0
- package/dist/verdocs-web-sdk/shadow-css-02866686.js +387 -0
- package/dist/verdocs-web-sdk/shadow-css-6207e159.system.js +13 -0
- package/dist/verdocs-web-sdk/verdocs-auth.entry.js +302 -0
- package/dist/verdocs-web-sdk/verdocs-auth.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-button.entry.js +45 -0
- package/dist/verdocs-web-sdk/verdocs-button.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-dropdown.entry.js +76 -0
- package/dist/verdocs-web-sdk/verdocs-dropdown.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-attachment.entry.js +55 -0
- package/dist/verdocs-web-sdk/verdocs-field-attachment.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-checkbox.entry.js +35 -0
- package/dist/verdocs-web-sdk/verdocs-field-checkbox.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-date.entry.js +2964 -0
- package/dist/verdocs-web-sdk/verdocs-field-date.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-dropdown.entry.js +55 -0
- package/dist/verdocs-web-sdk/verdocs-field-dropdown.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-initial.entry.js +48 -0
- package/dist/verdocs-web-sdk/verdocs-field-initial.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-payment.entry.js +82 -0
- package/dist/verdocs-web-sdk/verdocs-field-payment.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-radio-button.entry.js +44 -0
- package/dist/verdocs-web-sdk/verdocs-field-radio-button.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-signature.entry.js +48 -0
- package/dist/verdocs-web-sdk/verdocs-field-signature.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-textarea.entry.js +59 -0
- package/dist/verdocs-web-sdk/verdocs-field-textarea.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-field-textbox.entry.js +59 -0
- package/dist/verdocs-web-sdk/verdocs-field-textbox.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-initial-dialog.entry.js +239 -0
- package/dist/verdocs-web-sdk/verdocs-initial-dialog.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-kba-dialog.entry.js +77 -0
- package/dist/verdocs-web-sdk/verdocs-kba-dialog.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-loader.entry.js +15 -0
- package/dist/verdocs-web-sdk/verdocs-loader.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-ok-dialog.entry.js +44 -0
- package/dist/verdocs-web-sdk/verdocs-ok-dialog.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-organization-card.entry.js +18 -0
- package/dist/verdocs-web-sdk/verdocs-organization-card.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-quick-functions.entry.js +27 -0
- package/dist/verdocs-web-sdk/verdocs-quick-functions.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-search-activity.entry.js +259 -0
- package/dist/verdocs-web-sdk/verdocs-search-activity.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-search-box.entry.js +56 -0
- package/dist/verdocs-web-sdk/verdocs-search-box.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-search-tabs.entry.js +16 -0
- package/dist/verdocs-web-sdk/verdocs-search-tabs.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-search.entry.js +15 -0
- package/dist/verdocs-web-sdk/verdocs-search.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-sign.entry.js +1995 -0
- package/dist/verdocs-web-sdk/verdocs-sign.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-signature-dialog.entry.js +235 -0
- package/dist/verdocs-web-sdk/verdocs-signature-dialog.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-status-indicator.entry.js +7611 -0
- package/dist/verdocs-web-sdk/verdocs-status-indicator.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-template-card.entry.js +34 -0
- package/dist/verdocs-web-sdk/verdocs-template-card.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-template-tags.entry.js +16 -0
- package/dist/verdocs-web-sdk/verdocs-template-tags.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-text-input.entry.js +58 -0
- package/dist/verdocs-web-sdk/verdocs-text-input.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-toggle.entry.js +32 -0
- package/dist/verdocs-web-sdk/verdocs-toggle.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-upload-dialog.entry.js +119 -0
- package/dist/verdocs-web-sdk/verdocs-upload-dialog.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-view.entry.js +16118 -0
- package/dist/verdocs-web-sdk/verdocs-view.system.entry.js +23 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.css +57 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +129 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.system.js +1 -0
- package/package.json +42 -35
- package/dist/cjs/document-status-indicator.cjs.entry.js +0 -51
- package/dist/cjs/index-83ab34ef.js +0 -1640
- package/dist/cjs/org-popup.cjs.entry.js +0 -25
- package/dist/cjs/pdf-viewer.cjs.entry.js +0 -13677
- 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/search-tabs.cjs.entry.js +0 -20
- 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/cancelled-icon.svg +0 -1
- package/dist/collection/components/controls/document-status-indicator/declined-icon.svg +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.js +0 -70
- 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/document-status-indicator/pending-icon.svg +0 -1
- package/dist/collection/components/controls/dropdown-menu/dropdown-menu.css +0 -80
- 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/controls/toggle-icon-buttons/toggle-icon-buttons.css +0 -64
- 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/search-quick-functions/search-quick-functions.stories.js +0 -15
- package/dist/collection/components/elements/search-recent/search-icon.svg +0 -1
- package/dist/collection/components/elements/search-recent/search-recent.css +0 -65
- package/dist/collection/components/elements/search-recent/search-recent.js +0 -86
- package/dist/collection/components/elements/search-recent/search-recent.stories.js +0 -12
- package/dist/collection/components/elements/search-saved/search-icon.svg +0 -1
- package/dist/collection/components/elements/search-saved/search-saved.css +0 -56
- package/dist/collection/components/elements/search-saved/search-saved.js +0 -86
- package/dist/collection/components/elements/search-saved/search-saved.stories.js +0 -12
- package/dist/collection/components/elements/search-starred/search-starred.js +0 -91
- package/dist/collection/components/elements/search-starred/search-starred.stories.js +0 -35
- package/dist/collection/components/elements/search-tabs/search-tabs.css +0 -3
- package/dist/collection/components/elements/search-tabs/search-tabs.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/custom-elements/index.d.ts +0 -123
- package/dist/custom-elements/index.js +0 -17801
- package/dist/esm/document-status-indicator.entry.js +0 -47
- package/dist/esm/index-792f07a6.js +0 -1611
- package/dist/esm/org-popup.entry.js +0 -21
- package/dist/esm/pdf-viewer.entry.js +0 -13673
- 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/search-tabs.entry.js +0 -16
- 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/search-tabs.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/document-status-indicator/document-status-indicator.d.ts +0 -11
- 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/search-recent/search-recent.d.ts +0 -21
- package/dist/types/components/elements/search-saved/search-saved.d.ts +0 -21
- package/dist/types/components/elements/search-saved/search-saved.stories.d.ts +0 -7
- package/dist/types/components/elements/search-starred/search-starred.d.ts +0 -16
- 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-4455e25e.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
- package/dist/verdocs-web-sdk/p-feb2f9c2.system.entry.js +0 -1
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
import { p as process_1 } from './index-97ec070b.js';
|
|
2
|
+
import { B as Buffer } from './buffer-es6-5cef4368.js';
|
|
3
|
+
|
|
4
|
+
'use strict';
|
|
5
|
+
|
|
1
6
|
var bind = function bind(fn, thisArg) {
|
|
2
7
|
return function wrap() {
|
|
3
8
|
var args = new Array(arguments.length);
|
|
@@ -8,10 +13,30 @@ var bind = function bind(fn, thisArg) {
|
|
|
8
13
|
};
|
|
9
14
|
};
|
|
10
15
|
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
11
20
|
// utils is a library of generic helper functions non-specific to axios
|
|
12
21
|
|
|
13
22
|
var toString = Object.prototype.toString;
|
|
14
23
|
|
|
24
|
+
// eslint-disable-next-line func-names
|
|
25
|
+
var kindOf = (function(cache) {
|
|
26
|
+
// eslint-disable-next-line func-names
|
|
27
|
+
return function(thing) {
|
|
28
|
+
var str = toString.call(thing);
|
|
29
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
30
|
+
};
|
|
31
|
+
})(Object.create(null));
|
|
32
|
+
|
|
33
|
+
function kindOfTest(type) {
|
|
34
|
+
type = type.toLowerCase();
|
|
35
|
+
return function isKindOf(thing) {
|
|
36
|
+
return kindOf(thing) === type;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
|
|
15
40
|
/**
|
|
16
41
|
* Determine if a value is an Array
|
|
17
42
|
*
|
|
@@ -19,7 +44,7 @@ var toString = Object.prototype.toString;
|
|
|
19
44
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
20
45
|
*/
|
|
21
46
|
function isArray(val) {
|
|
22
|
-
return
|
|
47
|
+
return Array.isArray(val);
|
|
23
48
|
}
|
|
24
49
|
|
|
25
50
|
/**
|
|
@@ -46,22 +71,12 @@ function isBuffer(val) {
|
|
|
46
71
|
/**
|
|
47
72
|
* Determine if a value is an ArrayBuffer
|
|
48
73
|
*
|
|
74
|
+
* @function
|
|
49
75
|
* @param {Object} val The value to test
|
|
50
76
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
51
77
|
*/
|
|
52
|
-
|
|
53
|
-
return toString.call(val) === '[object ArrayBuffer]';
|
|
54
|
-
}
|
|
78
|
+
var isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
55
79
|
|
|
56
|
-
/**
|
|
57
|
-
* Determine if a value is a FormData
|
|
58
|
-
*
|
|
59
|
-
* @param {Object} val The value to test
|
|
60
|
-
* @returns {boolean} True if value is an FormData, otherwise false
|
|
61
|
-
*/
|
|
62
|
-
function isFormData(val) {
|
|
63
|
-
return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
|
64
|
-
}
|
|
65
80
|
|
|
66
81
|
/**
|
|
67
82
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -74,7 +89,7 @@ function isArrayBufferView(val) {
|
|
|
74
89
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
75
90
|
result = ArrayBuffer.isView(val);
|
|
76
91
|
} else {
|
|
77
|
-
result = (val) && (val.buffer) && (val.buffer
|
|
92
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
78
93
|
}
|
|
79
94
|
return result;
|
|
80
95
|
}
|
|
@@ -116,7 +131,7 @@ function isObject(val) {
|
|
|
116
131
|
* @return {boolean} True if value is a plain Object, otherwise false
|
|
117
132
|
*/
|
|
118
133
|
function isPlainObject(val) {
|
|
119
|
-
if (
|
|
134
|
+
if (kindOf(val) !== 'object') {
|
|
120
135
|
return false;
|
|
121
136
|
}
|
|
122
137
|
|
|
@@ -127,32 +142,38 @@ function isPlainObject(val) {
|
|
|
127
142
|
/**
|
|
128
143
|
* Determine if a value is a Date
|
|
129
144
|
*
|
|
145
|
+
* @function
|
|
130
146
|
* @param {Object} val The value to test
|
|
131
147
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
132
148
|
*/
|
|
133
|
-
|
|
134
|
-
return toString.call(val) === '[object Date]';
|
|
135
|
-
}
|
|
149
|
+
var isDate = kindOfTest('Date');
|
|
136
150
|
|
|
137
151
|
/**
|
|
138
152
|
* Determine if a value is a File
|
|
139
153
|
*
|
|
154
|
+
* @function
|
|
140
155
|
* @param {Object} val The value to test
|
|
141
156
|
* @returns {boolean} True if value is a File, otherwise false
|
|
142
157
|
*/
|
|
143
|
-
|
|
144
|
-
return toString.call(val) === '[object File]';
|
|
145
|
-
}
|
|
158
|
+
var isFile = kindOfTest('File');
|
|
146
159
|
|
|
147
160
|
/**
|
|
148
161
|
* Determine if a value is a Blob
|
|
149
162
|
*
|
|
163
|
+
* @function
|
|
150
164
|
* @param {Object} val The value to test
|
|
151
165
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
152
166
|
*/
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
167
|
+
var isBlob = kindOfTest('Blob');
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Determine if a value is a FileList
|
|
171
|
+
*
|
|
172
|
+
* @function
|
|
173
|
+
* @param {Object} val The value to test
|
|
174
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
175
|
+
*/
|
|
176
|
+
var isFileList = kindOfTest('FileList');
|
|
156
177
|
|
|
157
178
|
/**
|
|
158
179
|
* Determine if a value is a Function
|
|
@@ -175,14 +196,27 @@ function isStream(val) {
|
|
|
175
196
|
}
|
|
176
197
|
|
|
177
198
|
/**
|
|
178
|
-
* Determine if a value is a
|
|
199
|
+
* Determine if a value is a FormData
|
|
179
200
|
*
|
|
201
|
+
* @param {Object} thing The value to test
|
|
202
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
|
203
|
+
*/
|
|
204
|
+
function isFormData(thing) {
|
|
205
|
+
var pattern = '[object FormData]';
|
|
206
|
+
return thing && (
|
|
207
|
+
(typeof FormData === 'function' && thing instanceof FormData) ||
|
|
208
|
+
toString.call(thing) === pattern ||
|
|
209
|
+
(isFunction(thing.toString) && thing.toString() === pattern)
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Determine if a value is a URLSearchParams object
|
|
215
|
+
* @function
|
|
180
216
|
* @param {Object} val The value to test
|
|
181
217
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
182
218
|
*/
|
|
183
|
-
|
|
184
|
-
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
|
185
|
-
}
|
|
219
|
+
var isURLSearchParams = kindOfTest('URLSearchParams');
|
|
186
220
|
|
|
187
221
|
/**
|
|
188
222
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -329,6 +363,94 @@ function stripBOM(content) {
|
|
|
329
363
|
return content;
|
|
330
364
|
}
|
|
331
365
|
|
|
366
|
+
/**
|
|
367
|
+
* Inherit the prototype methods from one constructor into another
|
|
368
|
+
* @param {function} constructor
|
|
369
|
+
* @param {function} superConstructor
|
|
370
|
+
* @param {object} [props]
|
|
371
|
+
* @param {object} [descriptors]
|
|
372
|
+
*/
|
|
373
|
+
|
|
374
|
+
function inherits(constructor, superConstructor, props, descriptors) {
|
|
375
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
376
|
+
constructor.prototype.constructor = constructor;
|
|
377
|
+
props && Object.assign(constructor.prototype, props);
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* Resolve object with deep prototype chain to a flat object
|
|
382
|
+
* @param {Object} sourceObj source object
|
|
383
|
+
* @param {Object} [destObj]
|
|
384
|
+
* @param {Function} [filter]
|
|
385
|
+
* @returns {Object}
|
|
386
|
+
*/
|
|
387
|
+
|
|
388
|
+
function toFlatObject(sourceObj, destObj, filter) {
|
|
389
|
+
var props;
|
|
390
|
+
var i;
|
|
391
|
+
var prop;
|
|
392
|
+
var merged = {};
|
|
393
|
+
|
|
394
|
+
destObj = destObj || {};
|
|
395
|
+
|
|
396
|
+
do {
|
|
397
|
+
props = Object.getOwnPropertyNames(sourceObj);
|
|
398
|
+
i = props.length;
|
|
399
|
+
while (i-- > 0) {
|
|
400
|
+
prop = props[i];
|
|
401
|
+
if (!merged[prop]) {
|
|
402
|
+
destObj[prop] = sourceObj[prop];
|
|
403
|
+
merged[prop] = true;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
sourceObj = Object.getPrototypeOf(sourceObj);
|
|
407
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
408
|
+
|
|
409
|
+
return destObj;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
/*
|
|
413
|
+
* determines whether a string ends with the characters of a specified string
|
|
414
|
+
* @param {String} str
|
|
415
|
+
* @param {String} searchString
|
|
416
|
+
* @param {Number} [position= 0]
|
|
417
|
+
* @returns {boolean}
|
|
418
|
+
*/
|
|
419
|
+
function endsWith(str, searchString, position) {
|
|
420
|
+
str = String(str);
|
|
421
|
+
if (position === undefined || position > str.length) {
|
|
422
|
+
position = str.length;
|
|
423
|
+
}
|
|
424
|
+
position -= searchString.length;
|
|
425
|
+
var lastIndex = str.indexOf(searchString, position);
|
|
426
|
+
return lastIndex !== -1 && lastIndex === position;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
/**
|
|
431
|
+
* Returns new array from array like object
|
|
432
|
+
* @param {*} [thing]
|
|
433
|
+
* @returns {Array}
|
|
434
|
+
*/
|
|
435
|
+
function toArray(thing) {
|
|
436
|
+
if (!thing) return null;
|
|
437
|
+
var i = thing.length;
|
|
438
|
+
if (isUndefined(i)) return null;
|
|
439
|
+
var arr = new Array(i);
|
|
440
|
+
while (i-- > 0) {
|
|
441
|
+
arr[i] = thing[i];
|
|
442
|
+
}
|
|
443
|
+
return arr;
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
// eslint-disable-next-line func-names
|
|
447
|
+
var isTypedArray = (function(TypedArray) {
|
|
448
|
+
// eslint-disable-next-line func-names
|
|
449
|
+
return function(thing) {
|
|
450
|
+
return TypedArray && thing instanceof TypedArray;
|
|
451
|
+
};
|
|
452
|
+
})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
|
|
453
|
+
|
|
332
454
|
var utils = {
|
|
333
455
|
isArray: isArray,
|
|
334
456
|
isArrayBuffer: isArrayBuffer,
|
|
@@ -351,9 +473,21 @@ var utils = {
|
|
|
351
473
|
merge: merge,
|
|
352
474
|
extend: extend,
|
|
353
475
|
trim: trim,
|
|
354
|
-
stripBOM: stripBOM
|
|
476
|
+
stripBOM: stripBOM,
|
|
477
|
+
inherits: inherits,
|
|
478
|
+
toFlatObject: toFlatObject,
|
|
479
|
+
kindOf: kindOf,
|
|
480
|
+
kindOfTest: kindOfTest,
|
|
481
|
+
endsWith: endsWith,
|
|
482
|
+
toArray: toArray,
|
|
483
|
+
isTypedArray: isTypedArray,
|
|
484
|
+
isFileList: isFileList
|
|
355
485
|
};
|
|
356
486
|
|
|
487
|
+
'use strict';
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
357
491
|
function encode(val) {
|
|
358
492
|
return encodeURIComponent(val).
|
|
359
493
|
replace(/%3A/gi, ':').
|
|
@@ -421,6 +555,10 @@ var buildURL = function buildURL(url, params, paramsSerializer) {
|
|
|
421
555
|
return url;
|
|
422
556
|
};
|
|
423
557
|
|
|
558
|
+
'use strict';
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
424
562
|
function InterceptorManager() {
|
|
425
563
|
this.handlers = [];
|
|
426
564
|
}
|
|
@@ -472,6 +610,10 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
|
472
610
|
|
|
473
611
|
var InterceptorManager_1 = InterceptorManager;
|
|
474
612
|
|
|
613
|
+
'use strict';
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
475
617
|
var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
|
|
476
618
|
utils.forEach(headers, function processHeader(value, name) {
|
|
477
619
|
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
@@ -481,27 +623,32 @@ var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName)
|
|
|
481
623
|
});
|
|
482
624
|
};
|
|
483
625
|
|
|
626
|
+
'use strict';
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
484
630
|
/**
|
|
485
|
-
*
|
|
631
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
486
632
|
*
|
|
487
|
-
* @param {
|
|
488
|
-
* @param {Object} config The config.
|
|
633
|
+
* @param {string} message The error message.
|
|
489
634
|
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
635
|
+
* @param {Object} [config] The config.
|
|
490
636
|
* @param {Object} [request] The request.
|
|
491
637
|
* @param {Object} [response] The response.
|
|
492
|
-
* @returns {Error} The error.
|
|
638
|
+
* @returns {Error} The created error.
|
|
493
639
|
*/
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
640
|
+
function AxiosError(message, code, config, request, response) {
|
|
641
|
+
Error.call(this);
|
|
642
|
+
this.message = message;
|
|
643
|
+
this.name = 'AxiosError';
|
|
644
|
+
code && (this.code = code);
|
|
645
|
+
config && (this.config = config);
|
|
646
|
+
request && (this.request = request);
|
|
647
|
+
response && (this.response = response);
|
|
648
|
+
}
|
|
503
649
|
|
|
504
|
-
|
|
650
|
+
utils.inherits(AxiosError, Error, {
|
|
651
|
+
toJSON: function toJSON() {
|
|
505
652
|
return {
|
|
506
653
|
// Standard
|
|
507
654
|
message: this.message,
|
|
@@ -516,27 +663,138 @@ var enhanceError = function enhanceError(error, config, code, request, response)
|
|
|
516
663
|
stack: this.stack,
|
|
517
664
|
// Axios
|
|
518
665
|
config: this.config,
|
|
519
|
-
code: this.code
|
|
666
|
+
code: this.code,
|
|
667
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
520
668
|
};
|
|
521
|
-
}
|
|
522
|
-
|
|
669
|
+
}
|
|
670
|
+
});
|
|
671
|
+
|
|
672
|
+
var prototype = AxiosError.prototype;
|
|
673
|
+
var descriptors = {};
|
|
674
|
+
|
|
675
|
+
[
|
|
676
|
+
'ERR_BAD_OPTION_VALUE',
|
|
677
|
+
'ERR_BAD_OPTION',
|
|
678
|
+
'ECONNABORTED',
|
|
679
|
+
'ETIMEDOUT',
|
|
680
|
+
'ERR_NETWORK',
|
|
681
|
+
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
682
|
+
'ERR_DEPRECATED',
|
|
683
|
+
'ERR_BAD_RESPONSE',
|
|
684
|
+
'ERR_BAD_REQUEST',
|
|
685
|
+
'ERR_CANCELED'
|
|
686
|
+
// eslint-disable-next-line func-names
|
|
687
|
+
].forEach(function(code) {
|
|
688
|
+
descriptors[code] = {value: code};
|
|
689
|
+
});
|
|
690
|
+
|
|
691
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
692
|
+
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
693
|
+
|
|
694
|
+
// eslint-disable-next-line func-names
|
|
695
|
+
AxiosError.from = function(error, code, config, request, response, customProps) {
|
|
696
|
+
var axiosError = Object.create(prototype);
|
|
697
|
+
|
|
698
|
+
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
699
|
+
return obj !== Error.prototype;
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
703
|
+
|
|
704
|
+
axiosError.name = error.name;
|
|
705
|
+
|
|
706
|
+
customProps && Object.assign(axiosError, customProps);
|
|
707
|
+
|
|
708
|
+
return axiosError;
|
|
523
709
|
};
|
|
524
710
|
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
* @returns {Error} The created error.
|
|
534
|
-
*/
|
|
535
|
-
var createError = function createError(message, config, code, request, response) {
|
|
536
|
-
var error = new Error(message);
|
|
537
|
-
return enhanceError(error, config, code, request, response);
|
|
711
|
+
var AxiosError_1 = AxiosError;
|
|
712
|
+
|
|
713
|
+
'use strict';
|
|
714
|
+
|
|
715
|
+
var transitional = {
|
|
716
|
+
silentJSONParsing: true,
|
|
717
|
+
forcedJSONParsing: true,
|
|
718
|
+
clarifyTimeoutError: false
|
|
538
719
|
};
|
|
539
720
|
|
|
721
|
+
'use strict';
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
|
|
725
|
+
/**
|
|
726
|
+
* Convert a data object to FormData
|
|
727
|
+
* @param {Object} obj
|
|
728
|
+
* @param {?Object} [formData]
|
|
729
|
+
* @returns {Object}
|
|
730
|
+
**/
|
|
731
|
+
|
|
732
|
+
function toFormData(obj, formData) {
|
|
733
|
+
// eslint-disable-next-line no-param-reassign
|
|
734
|
+
formData = formData || new FormData();
|
|
735
|
+
|
|
736
|
+
var stack = [];
|
|
737
|
+
|
|
738
|
+
function convertValue(value) {
|
|
739
|
+
if (value === null) return '';
|
|
740
|
+
|
|
741
|
+
if (utils.isDate(value)) {
|
|
742
|
+
return value.toISOString();
|
|
743
|
+
}
|
|
744
|
+
|
|
745
|
+
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
746
|
+
return typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
return value;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function build(data, parentKey) {
|
|
753
|
+
if (utils.isPlainObject(data) || utils.isArray(data)) {
|
|
754
|
+
if (stack.indexOf(data) !== -1) {
|
|
755
|
+
throw Error('Circular reference detected in ' + parentKey);
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
stack.push(data);
|
|
759
|
+
|
|
760
|
+
utils.forEach(data, function each(value, key) {
|
|
761
|
+
if (utils.isUndefined(value)) return;
|
|
762
|
+
var fullKey = parentKey ? parentKey + '.' + key : key;
|
|
763
|
+
var arr;
|
|
764
|
+
|
|
765
|
+
if (value && !parentKey && typeof value === 'object') {
|
|
766
|
+
if (utils.endsWith(key, '{}')) {
|
|
767
|
+
// eslint-disable-next-line no-param-reassign
|
|
768
|
+
value = JSON.stringify(value);
|
|
769
|
+
} else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
|
|
770
|
+
// eslint-disable-next-line func-names
|
|
771
|
+
arr.forEach(function(el) {
|
|
772
|
+
!utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
|
|
773
|
+
});
|
|
774
|
+
return;
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
build(value, fullKey);
|
|
779
|
+
});
|
|
780
|
+
|
|
781
|
+
stack.pop();
|
|
782
|
+
} else {
|
|
783
|
+
formData.append(parentKey, convertValue(data));
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
build(obj);
|
|
788
|
+
|
|
789
|
+
return formData;
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
var toFormData_1 = toFormData;
|
|
793
|
+
|
|
794
|
+
'use strict';
|
|
795
|
+
|
|
796
|
+
|
|
797
|
+
|
|
540
798
|
/**
|
|
541
799
|
* Resolve or reject a Promise based on response status.
|
|
542
800
|
*
|
|
@@ -549,16 +807,20 @@ var settle = function settle(resolve, reject, response) {
|
|
|
549
807
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
550
808
|
resolve(response);
|
|
551
809
|
} else {
|
|
552
|
-
reject(
|
|
810
|
+
reject(new AxiosError_1(
|
|
553
811
|
'Request failed with status code ' + response.status,
|
|
812
|
+
[AxiosError_1.ERR_BAD_REQUEST, AxiosError_1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
554
813
|
response.config,
|
|
555
|
-
null,
|
|
556
814
|
response.request,
|
|
557
815
|
response
|
|
558
816
|
));
|
|
559
817
|
}
|
|
560
818
|
};
|
|
561
819
|
|
|
820
|
+
'use strict';
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
562
824
|
var cookies = (
|
|
563
825
|
utils.isStandardBrowserEnv() ?
|
|
564
826
|
|
|
@@ -609,6 +871,8 @@ var cookies = (
|
|
|
609
871
|
})()
|
|
610
872
|
);
|
|
611
873
|
|
|
874
|
+
'use strict';
|
|
875
|
+
|
|
612
876
|
/**
|
|
613
877
|
* Determines whether the specified URL is absolute
|
|
614
878
|
*
|
|
@@ -619,9 +883,11 @@ var isAbsoluteURL = function isAbsoluteURL(url) {
|
|
|
619
883
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
620
884
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
621
885
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
622
|
-
return /^([a-z][a-z\d
|
|
886
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
623
887
|
};
|
|
624
888
|
|
|
889
|
+
'use strict';
|
|
890
|
+
|
|
625
891
|
/**
|
|
626
892
|
* Creates a new URL by combining the specified URLs
|
|
627
893
|
*
|
|
@@ -635,6 +901,11 @@ var combineURLs = function combineURLs(baseURL, relativeURL) {
|
|
|
635
901
|
: baseURL;
|
|
636
902
|
};
|
|
637
903
|
|
|
904
|
+
'use strict';
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
638
909
|
/**
|
|
639
910
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
640
911
|
* only when the requestedURL is not already an absolute URL.
|
|
@@ -651,6 +922,10 @@ var buildFullPath = function buildFullPath(baseURL, requestedURL) {
|
|
|
651
922
|
return requestedURL;
|
|
652
923
|
};
|
|
653
924
|
|
|
925
|
+
'use strict';
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
654
929
|
// Headers whose duplicates are ignored by node
|
|
655
930
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
656
931
|
var ignoreDuplicateOf = [
|
|
@@ -701,6 +976,10 @@ var parseHeaders = function parseHeaders(headers) {
|
|
|
701
976
|
return parsed;
|
|
702
977
|
};
|
|
703
978
|
|
|
979
|
+
'use strict';
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
|
|
704
983
|
var isURLSameOrigin = (
|
|
705
984
|
utils.isStandardBrowserEnv() ?
|
|
706
985
|
|
|
@@ -766,13 +1045,67 @@ var isURLSameOrigin = (
|
|
|
766
1045
|
})()
|
|
767
1046
|
);
|
|
768
1047
|
|
|
1048
|
+
'use strict';
|
|
1049
|
+
|
|
1050
|
+
|
|
1051
|
+
|
|
1052
|
+
|
|
1053
|
+
/**
|
|
1054
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1055
|
+
*
|
|
1056
|
+
* @class
|
|
1057
|
+
* @param {string=} message The message.
|
|
1058
|
+
*/
|
|
1059
|
+
function CanceledError(message) {
|
|
1060
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
1061
|
+
AxiosError_1.call(this, message == null ? 'canceled' : message, AxiosError_1.ERR_CANCELED);
|
|
1062
|
+
this.name = 'CanceledError';
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
utils.inherits(CanceledError, AxiosError_1, {
|
|
1066
|
+
__CANCEL__: true
|
|
1067
|
+
});
|
|
1068
|
+
|
|
1069
|
+
var CanceledError_1 = CanceledError;
|
|
1070
|
+
|
|
1071
|
+
'use strict';
|
|
1072
|
+
|
|
1073
|
+
var parseProtocol = function parseProtocol(url) {
|
|
1074
|
+
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
1075
|
+
return match && match[1] || '';
|
|
1076
|
+
};
|
|
1077
|
+
|
|
1078
|
+
'use strict';
|
|
1079
|
+
|
|
1080
|
+
|
|
1081
|
+
|
|
1082
|
+
|
|
1083
|
+
|
|
1084
|
+
|
|
1085
|
+
|
|
1086
|
+
|
|
1087
|
+
|
|
1088
|
+
|
|
1089
|
+
|
|
1090
|
+
|
|
1091
|
+
|
|
769
1092
|
var xhr = function xhrAdapter(config) {
|
|
770
1093
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
771
1094
|
var requestData = config.data;
|
|
772
1095
|
var requestHeaders = config.headers;
|
|
773
1096
|
var responseType = config.responseType;
|
|
1097
|
+
var onCanceled;
|
|
1098
|
+
function done() {
|
|
1099
|
+
if (config.cancelToken) {
|
|
1100
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
1101
|
+
}
|
|
774
1102
|
|
|
775
|
-
|
|
1103
|
+
if (config.signal) {
|
|
1104
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
|
776
1109
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
777
1110
|
}
|
|
778
1111
|
|
|
@@ -786,6 +1119,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
786
1119
|
}
|
|
787
1120
|
|
|
788
1121
|
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
1122
|
+
|
|
789
1123
|
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
790
1124
|
|
|
791
1125
|
// Set the request timeout in MS
|
|
@@ -808,7 +1142,13 @@ var xhr = function xhrAdapter(config) {
|
|
|
808
1142
|
request: request
|
|
809
1143
|
};
|
|
810
1144
|
|
|
811
|
-
settle(
|
|
1145
|
+
settle(function _resolve(value) {
|
|
1146
|
+
resolve(value);
|
|
1147
|
+
done();
|
|
1148
|
+
}, function _reject(err) {
|
|
1149
|
+
reject(err);
|
|
1150
|
+
done();
|
|
1151
|
+
}, response);
|
|
812
1152
|
|
|
813
1153
|
// Clean up request
|
|
814
1154
|
request = null;
|
|
@@ -843,7 +1183,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
843
1183
|
return;
|
|
844
1184
|
}
|
|
845
1185
|
|
|
846
|
-
reject(
|
|
1186
|
+
reject(new AxiosError_1('Request aborted', AxiosError_1.ECONNABORTED, config, request));
|
|
847
1187
|
|
|
848
1188
|
// Clean up request
|
|
849
1189
|
request = null;
|
|
@@ -853,7 +1193,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
853
1193
|
request.onerror = function handleError() {
|
|
854
1194
|
// Real errors are hidden from us by the browser
|
|
855
1195
|
// onerror should only fire if it's a network error
|
|
856
|
-
reject(
|
|
1196
|
+
reject(new AxiosError_1('Network Error', AxiosError_1.ERR_NETWORK, config, request, request));
|
|
857
1197
|
|
|
858
1198
|
// Clean up request
|
|
859
1199
|
request = null;
|
|
@@ -861,14 +1201,15 @@ var xhr = function xhrAdapter(config) {
|
|
|
861
1201
|
|
|
862
1202
|
// Handle timeout
|
|
863
1203
|
request.ontimeout = function handleTimeout() {
|
|
864
|
-
var timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
|
|
1204
|
+
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
1205
|
+
var transitional$1 = config.transitional || transitional;
|
|
865
1206
|
if (config.timeoutErrorMessage) {
|
|
866
1207
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
867
1208
|
}
|
|
868
|
-
reject(
|
|
1209
|
+
reject(new AxiosError_1(
|
|
869
1210
|
timeoutErrorMessage,
|
|
1211
|
+
transitional$1.clarifyTimeoutError ? AxiosError_1.ETIMEDOUT : AxiosError_1.ECONNABORTED,
|
|
870
1212
|
config,
|
|
871
|
-
config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
|
872
1213
|
request));
|
|
873
1214
|
|
|
874
1215
|
// Clean up request
|
|
@@ -922,29 +1263,52 @@ var xhr = function xhrAdapter(config) {
|
|
|
922
1263
|
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
923
1264
|
}
|
|
924
1265
|
|
|
925
|
-
if (config.cancelToken) {
|
|
1266
|
+
if (config.cancelToken || config.signal) {
|
|
926
1267
|
// Handle cancellation
|
|
927
|
-
|
|
1268
|
+
// eslint-disable-next-line func-names
|
|
1269
|
+
onCanceled = function(cancel) {
|
|
928
1270
|
if (!request) {
|
|
929
1271
|
return;
|
|
930
1272
|
}
|
|
931
|
-
|
|
1273
|
+
reject(!cancel || (cancel && cancel.type) ? new CanceledError_1() : cancel);
|
|
932
1274
|
request.abort();
|
|
933
|
-
reject(cancel);
|
|
934
|
-
// Clean up request
|
|
935
1275
|
request = null;
|
|
936
|
-
}
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
1279
|
+
if (config.signal) {
|
|
1280
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
1281
|
+
}
|
|
937
1282
|
}
|
|
938
1283
|
|
|
939
1284
|
if (!requestData) {
|
|
940
1285
|
requestData = null;
|
|
941
1286
|
}
|
|
942
1287
|
|
|
1288
|
+
var protocol = parseProtocol(fullPath);
|
|
1289
|
+
|
|
1290
|
+
if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
|
|
1291
|
+
reject(new AxiosError_1('Unsupported protocol ' + protocol + ':', AxiosError_1.ERR_BAD_REQUEST, config));
|
|
1292
|
+
return;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
|
|
943
1296
|
// Send the request
|
|
944
1297
|
request.send(requestData);
|
|
945
1298
|
});
|
|
946
1299
|
};
|
|
947
1300
|
|
|
1301
|
+
// eslint-disable-next-line strict
|
|
1302
|
+
var _null = null;
|
|
1303
|
+
|
|
1304
|
+
'use strict';
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
948
1312
|
var DEFAULT_CONTENT_TYPE = {
|
|
949
1313
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
950
1314
|
};
|
|
@@ -960,7 +1324,7 @@ function getDefaultAdapter() {
|
|
|
960
1324
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
961
1325
|
// For browsers use XHR adapter
|
|
962
1326
|
adapter = xhr;
|
|
963
|
-
} else if (typeof
|
|
1327
|
+
} else if (typeof process_1 !== 'undefined' && Object.prototype.toString.call(process_1) === '[object process]') {
|
|
964
1328
|
// For node use HTTP adapter
|
|
965
1329
|
adapter = xhr;
|
|
966
1330
|
}
|
|
@@ -984,11 +1348,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
984
1348
|
|
|
985
1349
|
var defaults = {
|
|
986
1350
|
|
|
987
|
-
transitional:
|
|
988
|
-
silentJSONParsing: true,
|
|
989
|
-
forcedJSONParsing: true,
|
|
990
|
-
clarifyTimeoutError: false
|
|
991
|
-
},
|
|
1351
|
+
transitional: transitional,
|
|
992
1352
|
|
|
993
1353
|
adapter: getDefaultAdapter(),
|
|
994
1354
|
|
|
@@ -1012,15 +1372,25 @@ var defaults = {
|
|
|
1012
1372
|
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
|
1013
1373
|
return data.toString();
|
|
1014
1374
|
}
|
|
1015
|
-
|
|
1375
|
+
|
|
1376
|
+
var isObjectPayload = utils.isObject(data);
|
|
1377
|
+
var contentType = headers && headers['Content-Type'];
|
|
1378
|
+
|
|
1379
|
+
var isFileList;
|
|
1380
|
+
|
|
1381
|
+
if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {
|
|
1382
|
+
var _FormData = this.env && this.env.FormData;
|
|
1383
|
+
return toFormData_1(isFileList ? {'files[]': data} : data, _FormData && new _FormData());
|
|
1384
|
+
} else if (isObjectPayload || contentType === 'application/json') {
|
|
1016
1385
|
setContentTypeIfUnset(headers, 'application/json');
|
|
1017
1386
|
return stringifySafely(data);
|
|
1018
1387
|
}
|
|
1388
|
+
|
|
1019
1389
|
return data;
|
|
1020
1390
|
}],
|
|
1021
1391
|
|
|
1022
1392
|
transformResponse: [function transformResponse(data) {
|
|
1023
|
-
var transitional = this.transitional;
|
|
1393
|
+
var transitional = this.transitional || defaults.transitional;
|
|
1024
1394
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1025
1395
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1026
1396
|
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
|
@@ -1031,7 +1401,7 @@ var defaults = {
|
|
|
1031
1401
|
} catch (e) {
|
|
1032
1402
|
if (strictJSONParsing) {
|
|
1033
1403
|
if (e.name === 'SyntaxError') {
|
|
1034
|
-
throw
|
|
1404
|
+
throw AxiosError_1.from(e, AxiosError_1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
1035
1405
|
}
|
|
1036
1406
|
throw e;
|
|
1037
1407
|
}
|
|
@@ -1053,14 +1423,18 @@ var defaults = {
|
|
|
1053
1423
|
maxContentLength: -1,
|
|
1054
1424
|
maxBodyLength: -1,
|
|
1055
1425
|
|
|
1426
|
+
env: {
|
|
1427
|
+
FormData: _null
|
|
1428
|
+
},
|
|
1429
|
+
|
|
1056
1430
|
validateStatus: function validateStatus(status) {
|
|
1057
1431
|
return status >= 200 && status < 300;
|
|
1058
|
-
}
|
|
1059
|
-
};
|
|
1432
|
+
},
|
|
1060
1433
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1434
|
+
headers: {
|
|
1435
|
+
common: {
|
|
1436
|
+
'Accept': 'application/json, text/plain, */*'
|
|
1437
|
+
}
|
|
1064
1438
|
}
|
|
1065
1439
|
};
|
|
1066
1440
|
|
|
@@ -1074,6 +1448,11 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
1074
1448
|
|
|
1075
1449
|
var defaults_1 = defaults;
|
|
1076
1450
|
|
|
1451
|
+
'use strict';
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1077
1456
|
/**
|
|
1078
1457
|
* Transform the data for a request or a response
|
|
1079
1458
|
*
|
|
@@ -1092,17 +1471,31 @@ var transformData = function transformData(data, headers, fns) {
|
|
|
1092
1471
|
return data;
|
|
1093
1472
|
};
|
|
1094
1473
|
|
|
1474
|
+
'use strict';
|
|
1475
|
+
|
|
1095
1476
|
var isCancel = function isCancel(value) {
|
|
1096
1477
|
return !!(value && value.__CANCEL__);
|
|
1097
1478
|
};
|
|
1098
1479
|
|
|
1480
|
+
'use strict';
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
|
|
1099
1488
|
/**
|
|
1100
|
-
* Throws a `
|
|
1489
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1101
1490
|
*/
|
|
1102
1491
|
function throwIfCancellationRequested(config) {
|
|
1103
1492
|
if (config.cancelToken) {
|
|
1104
1493
|
config.cancelToken.throwIfRequested();
|
|
1105
1494
|
}
|
|
1495
|
+
|
|
1496
|
+
if (config.signal && config.signal.aborted) {
|
|
1497
|
+
throw new CanceledError_1();
|
|
1498
|
+
}
|
|
1106
1499
|
}
|
|
1107
1500
|
|
|
1108
1501
|
/**
|
|
@@ -1172,6 +1565,10 @@ var dispatchRequest = function dispatchRequest(config) {
|
|
|
1172
1565
|
});
|
|
1173
1566
|
};
|
|
1174
1567
|
|
|
1568
|
+
'use strict';
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
|
|
1175
1572
|
/**
|
|
1176
1573
|
* Config-specific merge-function which creates a new config-object
|
|
1177
1574
|
* by merging two configuration objects together.
|
|
@@ -1185,17 +1582,6 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1185
1582
|
config2 = config2 || {};
|
|
1186
1583
|
var config = {};
|
|
1187
1584
|
|
|
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
1585
|
function getMergedValue(target, source) {
|
|
1200
1586
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
1201
1587
|
return utils.merge(target, source);
|
|
@@ -1207,200 +1593,88 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1207
1593
|
return source;
|
|
1208
1594
|
}
|
|
1209
1595
|
|
|
1596
|
+
// eslint-disable-next-line consistent-return
|
|
1210
1597
|
function mergeDeepProperties(prop) {
|
|
1211
1598
|
if (!utils.isUndefined(config2[prop])) {
|
|
1212
|
-
|
|
1599
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1213
1600
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
1214
|
-
|
|
1601
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1215
1602
|
}
|
|
1216
1603
|
}
|
|
1217
1604
|
|
|
1218
|
-
|
|
1605
|
+
// eslint-disable-next-line consistent-return
|
|
1606
|
+
function valueFromConfig2(prop) {
|
|
1219
1607
|
if (!utils.isUndefined(config2[prop])) {
|
|
1220
|
-
|
|
1608
|
+
return getMergedValue(undefined, config2[prop]);
|
|
1221
1609
|
}
|
|
1222
|
-
}
|
|
1223
|
-
|
|
1224
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
1610
|
+
}
|
|
1225
1611
|
|
|
1226
|
-
|
|
1612
|
+
// eslint-disable-next-line consistent-return
|
|
1613
|
+
function defaultToConfig2(prop) {
|
|
1227
1614
|
if (!utils.isUndefined(config2[prop])) {
|
|
1228
|
-
|
|
1615
|
+
return getMergedValue(undefined, config2[prop]);
|
|
1229
1616
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
1230
|
-
|
|
1617
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1231
1618
|
}
|
|
1232
|
-
}
|
|
1619
|
+
}
|
|
1233
1620
|
|
|
1234
|
-
|
|
1621
|
+
// eslint-disable-next-line consistent-return
|
|
1622
|
+
function mergeDirectKeys(prop) {
|
|
1235
1623
|
if (prop in config2) {
|
|
1236
|
-
|
|
1624
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1237
1625
|
} else if (prop in config1) {
|
|
1238
|
-
|
|
1626
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1239
1627
|
}
|
|
1240
|
-
}
|
|
1241
|
-
|
|
1242
|
-
var axiosKeys = valueFromConfig2Keys
|
|
1243
|
-
.concat(mergeDeepPropertiesKeys)
|
|
1244
|
-
.concat(defaultToConfig2Keys)
|
|
1245
|
-
.concat(directMergeKeys);
|
|
1628
|
+
}
|
|
1246
1629
|
|
|
1247
|
-
var
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1630
|
+
var mergeMap = {
|
|
1631
|
+
'url': valueFromConfig2,
|
|
1632
|
+
'method': valueFromConfig2,
|
|
1633
|
+
'data': valueFromConfig2,
|
|
1634
|
+
'baseURL': defaultToConfig2,
|
|
1635
|
+
'transformRequest': defaultToConfig2,
|
|
1636
|
+
'transformResponse': defaultToConfig2,
|
|
1637
|
+
'paramsSerializer': defaultToConfig2,
|
|
1638
|
+
'timeout': defaultToConfig2,
|
|
1639
|
+
'timeoutMessage': defaultToConfig2,
|
|
1640
|
+
'withCredentials': defaultToConfig2,
|
|
1641
|
+
'adapter': defaultToConfig2,
|
|
1642
|
+
'responseType': defaultToConfig2,
|
|
1643
|
+
'xsrfCookieName': defaultToConfig2,
|
|
1644
|
+
'xsrfHeaderName': defaultToConfig2,
|
|
1645
|
+
'onUploadProgress': defaultToConfig2,
|
|
1646
|
+
'onDownloadProgress': defaultToConfig2,
|
|
1647
|
+
'decompress': defaultToConfig2,
|
|
1648
|
+
'maxContentLength': defaultToConfig2,
|
|
1649
|
+
'maxBodyLength': defaultToConfig2,
|
|
1650
|
+
'beforeRedirect': defaultToConfig2,
|
|
1651
|
+
'transport': defaultToConfig2,
|
|
1652
|
+
'httpAgent': defaultToConfig2,
|
|
1653
|
+
'httpsAgent': defaultToConfig2,
|
|
1654
|
+
'cancelToken': defaultToConfig2,
|
|
1655
|
+
'socketPath': defaultToConfig2,
|
|
1656
|
+
'responseEncoding': defaultToConfig2,
|
|
1657
|
+
'validateStatus': mergeDirectKeys
|
|
1658
|
+
};
|
|
1253
1659
|
|
|
1254
|
-
utils.forEach(
|
|
1660
|
+
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
|
1661
|
+
var merge = mergeMap[prop] || mergeDeepProperties;
|
|
1662
|
+
var configValue = merge(prop);
|
|
1663
|
+
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
|
1664
|
+
});
|
|
1255
1665
|
|
|
1256
1666
|
return config;
|
|
1257
1667
|
};
|
|
1258
1668
|
|
|
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
|
|
1669
|
+
var data = {
|
|
1670
|
+
"version": "0.27.2"
|
|
1402
1671
|
};
|
|
1403
1672
|
|
|
1673
|
+
'use strict';
|
|
1674
|
+
|
|
1675
|
+
var VERSION = data.version;
|
|
1676
|
+
|
|
1677
|
+
|
|
1404
1678
|
var validators$1 = {};
|
|
1405
1679
|
|
|
1406
1680
|
// eslint-disable-next-line func-names
|
|
@@ -1411,48 +1685,29 @@ var validators$1 = {};
|
|
|
1411
1685
|
});
|
|
1412
1686
|
|
|
1413
1687
|
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
1688
|
|
|
1435
1689
|
/**
|
|
1436
1690
|
* Transitional option validator
|
|
1437
|
-
* @param {function|boolean?} validator
|
|
1438
|
-
* @param {string?} version
|
|
1439
|
-
* @param {string} message
|
|
1691
|
+
* @param {function|boolean?} validator - set to false if the transitional option has been removed
|
|
1692
|
+
* @param {string?} version - deprecated version / removed since version
|
|
1693
|
+
* @param {string?} message - some message with additional info
|
|
1440
1694
|
* @returns {function}
|
|
1441
1695
|
*/
|
|
1442
1696
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
1443
|
-
var isDeprecated = version && isOlderVersion(version);
|
|
1444
|
-
|
|
1445
1697
|
function formatMessage(opt, desc) {
|
|
1446
|
-
return '[Axios v' +
|
|
1698
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
1447
1699
|
}
|
|
1448
1700
|
|
|
1449
1701
|
// eslint-disable-next-line func-names
|
|
1450
1702
|
return function(value, opt, opts) {
|
|
1451
1703
|
if (validator === false) {
|
|
1452
|
-
throw new
|
|
1704
|
+
throw new AxiosError_1(
|
|
1705
|
+
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
1706
|
+
AxiosError_1.ERR_DEPRECATED
|
|
1707
|
+
);
|
|
1453
1708
|
}
|
|
1454
1709
|
|
|
1455
|
-
if (
|
|
1710
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
1456
1711
|
deprecatedWarnings[opt] = true;
|
|
1457
1712
|
// eslint-disable-next-line no-console
|
|
1458
1713
|
console.warn(
|
|
@@ -1476,7 +1731,7 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
1476
1731
|
|
|
1477
1732
|
function assertOptions(options, schema, allowUnknown) {
|
|
1478
1733
|
if (typeof options !== 'object') {
|
|
1479
|
-
throw new
|
|
1734
|
+
throw new AxiosError_1('options must be an object', AxiosError_1.ERR_BAD_OPTION_VALUE);
|
|
1480
1735
|
}
|
|
1481
1736
|
var keys = Object.keys(options);
|
|
1482
1737
|
var i = keys.length;
|
|
@@ -1487,22 +1742,31 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
1487
1742
|
var value = options[opt];
|
|
1488
1743
|
var result = value === undefined || validator(value, opt, options);
|
|
1489
1744
|
if (result !== true) {
|
|
1490
|
-
throw new
|
|
1745
|
+
throw new AxiosError_1('option ' + opt + ' must be ' + result, AxiosError_1.ERR_BAD_OPTION_VALUE);
|
|
1491
1746
|
}
|
|
1492
1747
|
continue;
|
|
1493
1748
|
}
|
|
1494
1749
|
if (allowUnknown !== true) {
|
|
1495
|
-
throw
|
|
1750
|
+
throw new AxiosError_1('Unknown option ' + opt, AxiosError_1.ERR_BAD_OPTION);
|
|
1496
1751
|
}
|
|
1497
1752
|
}
|
|
1498
1753
|
}
|
|
1499
1754
|
|
|
1500
1755
|
var validator = {
|
|
1501
|
-
isOlderVersion: isOlderVersion,
|
|
1502
1756
|
assertOptions: assertOptions,
|
|
1503
1757
|
validators: validators$1
|
|
1504
1758
|
};
|
|
1505
1759
|
|
|
1760
|
+
'use strict';
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
|
|
1506
1770
|
var validators = validator.validators;
|
|
1507
1771
|
/**
|
|
1508
1772
|
* Create a new instance of Axios
|
|
@@ -1522,14 +1786,14 @@ function Axios(instanceConfig) {
|
|
|
1522
1786
|
*
|
|
1523
1787
|
* @param {Object} config The config specific for this request (merged with this.defaults)
|
|
1524
1788
|
*/
|
|
1525
|
-
Axios.prototype.request = function request(config) {
|
|
1789
|
+
Axios.prototype.request = function request(configOrUrl, config) {
|
|
1526
1790
|
/*eslint no-param-reassign:0*/
|
|
1527
1791
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
1528
|
-
if (typeof
|
|
1529
|
-
config = arguments[1] || {};
|
|
1530
|
-
config.url = arguments[0];
|
|
1531
|
-
} else {
|
|
1792
|
+
if (typeof configOrUrl === 'string') {
|
|
1532
1793
|
config = config || {};
|
|
1794
|
+
config.url = configOrUrl;
|
|
1795
|
+
} else {
|
|
1796
|
+
config = configOrUrl || {};
|
|
1533
1797
|
}
|
|
1534
1798
|
|
|
1535
1799
|
config = mergeConfig(this.defaults, config);
|
|
@@ -1547,9 +1811,9 @@ Axios.prototype.request = function request(config) {
|
|
|
1547
1811
|
|
|
1548
1812
|
if (transitional !== undefined) {
|
|
1549
1813
|
validator.assertOptions(transitional, {
|
|
1550
|
-
silentJSONParsing: validators.transitional(validators.boolean
|
|
1551
|
-
forcedJSONParsing: validators.transitional(validators.boolean
|
|
1552
|
-
clarifyTimeoutError: validators.transitional(validators.boolean
|
|
1814
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
1815
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
1816
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
1553
1817
|
}, false);
|
|
1554
1818
|
}
|
|
1555
1819
|
|
|
@@ -1615,7 +1879,8 @@ Axios.prototype.request = function request(config) {
|
|
|
1615
1879
|
|
|
1616
1880
|
Axios.prototype.getUri = function getUri(config) {
|
|
1617
1881
|
config = mergeConfig(this.defaults, config);
|
|
1618
|
-
|
|
1882
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
1883
|
+
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
1619
1884
|
};
|
|
1620
1885
|
|
|
1621
1886
|
// Provide aliases for supported request methods
|
|
@@ -1632,34 +1897,30 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
1632
1897
|
|
|
1633
1898
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
1634
1899
|
/*eslint func-names:0*/
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1900
|
+
|
|
1901
|
+
function generateHTTPMethod(isForm) {
|
|
1902
|
+
return function httpMethod(url, data, config) {
|
|
1903
|
+
return this.request(mergeConfig(config || {}, {
|
|
1904
|
+
method: method,
|
|
1905
|
+
headers: isForm ? {
|
|
1906
|
+
'Content-Type': 'multipart/form-data'
|
|
1907
|
+
} : {},
|
|
1908
|
+
url: url,
|
|
1909
|
+
data: data
|
|
1910
|
+
}));
|
|
1911
|
+
};
|
|
1912
|
+
}
|
|
1913
|
+
|
|
1914
|
+
Axios.prototype[method] = generateHTTPMethod();
|
|
1915
|
+
|
|
1916
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
1642
1917
|
});
|
|
1643
1918
|
|
|
1644
1919
|
var Axios_1 = Axios;
|
|
1645
1920
|
|
|
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
|
-
}
|
|
1921
|
+
'use strict';
|
|
1655
1922
|
|
|
1656
|
-
Cancel.prototype.toString = function toString() {
|
|
1657
|
-
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
|
1658
|
-
};
|
|
1659
1923
|
|
|
1660
|
-
Cancel.prototype.__CANCEL__ = true;
|
|
1661
|
-
|
|
1662
|
-
var Cancel_1 = Cancel;
|
|
1663
1924
|
|
|
1664
1925
|
/**
|
|
1665
1926
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
@@ -1673,24 +1934,55 @@ function CancelToken(executor) {
|
|
|
1673
1934
|
}
|
|
1674
1935
|
|
|
1675
1936
|
var resolvePromise;
|
|
1937
|
+
|
|
1676
1938
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
1677
1939
|
resolvePromise = resolve;
|
|
1678
1940
|
});
|
|
1679
1941
|
|
|
1680
1942
|
var token = this;
|
|
1943
|
+
|
|
1944
|
+
// eslint-disable-next-line func-names
|
|
1945
|
+
this.promise.then(function(cancel) {
|
|
1946
|
+
if (!token._listeners) return;
|
|
1947
|
+
|
|
1948
|
+
var i;
|
|
1949
|
+
var l = token._listeners.length;
|
|
1950
|
+
|
|
1951
|
+
for (i = 0; i < l; i++) {
|
|
1952
|
+
token._listeners[i](cancel);
|
|
1953
|
+
}
|
|
1954
|
+
token._listeners = null;
|
|
1955
|
+
});
|
|
1956
|
+
|
|
1957
|
+
// eslint-disable-next-line func-names
|
|
1958
|
+
this.promise.then = function(onfulfilled) {
|
|
1959
|
+
var _resolve;
|
|
1960
|
+
// eslint-disable-next-line func-names
|
|
1961
|
+
var promise = new Promise(function(resolve) {
|
|
1962
|
+
token.subscribe(resolve);
|
|
1963
|
+
_resolve = resolve;
|
|
1964
|
+
}).then(onfulfilled);
|
|
1965
|
+
|
|
1966
|
+
promise.cancel = function reject() {
|
|
1967
|
+
token.unsubscribe(_resolve);
|
|
1968
|
+
};
|
|
1969
|
+
|
|
1970
|
+
return promise;
|
|
1971
|
+
};
|
|
1972
|
+
|
|
1681
1973
|
executor(function cancel(message) {
|
|
1682
1974
|
if (token.reason) {
|
|
1683
1975
|
// Cancellation has already been requested
|
|
1684
1976
|
return;
|
|
1685
1977
|
}
|
|
1686
1978
|
|
|
1687
|
-
token.reason = new
|
|
1979
|
+
token.reason = new CanceledError_1(message);
|
|
1688
1980
|
resolvePromise(token.reason);
|
|
1689
1981
|
});
|
|
1690
1982
|
}
|
|
1691
1983
|
|
|
1692
1984
|
/**
|
|
1693
|
-
* Throws a `
|
|
1985
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1694
1986
|
*/
|
|
1695
1987
|
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
1696
1988
|
if (this.reason) {
|
|
@@ -1698,6 +1990,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
|
1698
1990
|
}
|
|
1699
1991
|
};
|
|
1700
1992
|
|
|
1993
|
+
/**
|
|
1994
|
+
* Subscribe to the cancel signal
|
|
1995
|
+
*/
|
|
1996
|
+
|
|
1997
|
+
CancelToken.prototype.subscribe = function subscribe(listener) {
|
|
1998
|
+
if (this.reason) {
|
|
1999
|
+
listener(this.reason);
|
|
2000
|
+
return;
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
if (this._listeners) {
|
|
2004
|
+
this._listeners.push(listener);
|
|
2005
|
+
} else {
|
|
2006
|
+
this._listeners = [listener];
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
|
|
2010
|
+
/**
|
|
2011
|
+
* Unsubscribe from the cancel signal
|
|
2012
|
+
*/
|
|
2013
|
+
|
|
2014
|
+
CancelToken.prototype.unsubscribe = function unsubscribe(listener) {
|
|
2015
|
+
if (!this._listeners) {
|
|
2016
|
+
return;
|
|
2017
|
+
}
|
|
2018
|
+
var index = this._listeners.indexOf(listener);
|
|
2019
|
+
if (index !== -1) {
|
|
2020
|
+
this._listeners.splice(index, 1);
|
|
2021
|
+
}
|
|
2022
|
+
};
|
|
2023
|
+
|
|
1701
2024
|
/**
|
|
1702
2025
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1703
2026
|
* cancels the `CancelToken`.
|
|
@@ -1715,6 +2038,8 @@ CancelToken.source = function source() {
|
|
|
1715
2038
|
|
|
1716
2039
|
var CancelToken_1 = CancelToken;
|
|
1717
2040
|
|
|
2041
|
+
'use strict';
|
|
2042
|
+
|
|
1718
2043
|
/**
|
|
1719
2044
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
1720
2045
|
*
|
|
@@ -1741,6 +2066,10 @@ var spread = function spread(callback) {
|
|
|
1741
2066
|
};
|
|
1742
2067
|
};
|
|
1743
2068
|
|
|
2069
|
+
'use strict';
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
|
|
1744
2073
|
/**
|
|
1745
2074
|
* Determines whether the payload is an error thrown by Axios
|
|
1746
2075
|
*
|
|
@@ -1748,9 +2077,17 @@ var spread = function spread(callback) {
|
|
|
1748
2077
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
1749
2078
|
*/
|
|
1750
2079
|
var isAxiosError = function isAxiosError(payload) {
|
|
1751
|
-
return (
|
|
2080
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
1752
2081
|
};
|
|
1753
2082
|
|
|
2083
|
+
'use strict';
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
|
|
1754
2091
|
/**
|
|
1755
2092
|
* Create an instance of Axios
|
|
1756
2093
|
*
|
|
@@ -1767,6 +2104,11 @@ function createInstance(defaultConfig) {
|
|
|
1767
2104
|
// Copy context to instance
|
|
1768
2105
|
utils.extend(instance, context);
|
|
1769
2106
|
|
|
2107
|
+
// Factory for creating new instances
|
|
2108
|
+
instance.create = function create(instanceConfig) {
|
|
2109
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
2110
|
+
};
|
|
2111
|
+
|
|
1770
2112
|
return instance;
|
|
1771
2113
|
}
|
|
1772
2114
|
|
|
@@ -1776,15 +2118,18 @@ var axios$1 = createInstance(defaults_1);
|
|
|
1776
2118
|
// Expose Axios class to allow class inheritance
|
|
1777
2119
|
axios$1.Axios = Axios_1;
|
|
1778
2120
|
|
|
1779
|
-
// Factory for creating new instances
|
|
1780
|
-
axios$1.create = function create(instanceConfig) {
|
|
1781
|
-
return createInstance(mergeConfig(axios$1.defaults, instanceConfig));
|
|
1782
|
-
};
|
|
1783
|
-
|
|
1784
2121
|
// Expose Cancel & CancelToken
|
|
1785
|
-
axios$1.
|
|
2122
|
+
axios$1.CanceledError = CanceledError_1;
|
|
1786
2123
|
axios$1.CancelToken = CancelToken_1;
|
|
1787
2124
|
axios$1.isCancel = isCancel;
|
|
2125
|
+
axios$1.VERSION = data.version;
|
|
2126
|
+
axios$1.toFormData = toFormData_1;
|
|
2127
|
+
|
|
2128
|
+
// Expose AxiosError class
|
|
2129
|
+
axios$1.AxiosError = AxiosError_1;
|
|
2130
|
+
|
|
2131
|
+
// alias for CanceledError for backward compatibility
|
|
2132
|
+
axios$1.Cancel = axios$1.CanceledError;
|
|
1788
2133
|
|
|
1789
2134
|
// Expose all/spread
|
|
1790
2135
|
axios$1.all = function all(promises) {
|
|
@@ -1803,6 +2148,147 @@ axios_1.default = _default;
|
|
|
1803
2148
|
|
|
1804
2149
|
var axios = axios_1;
|
|
1805
2150
|
|
|
2151
|
+
var requestLogger = function (r) {
|
|
2152
|
+
// tslint:disable-next-line
|
|
2153
|
+
console.debug("[JS-SDK] ".concat(r.method.toUpperCase(), " ").concat(r.baseURL).concat(r.url), r.data ? JSON.stringify(r.data) : '');
|
|
2154
|
+
return r;
|
|
2155
|
+
};
|
|
2156
|
+
/**
|
|
2157
|
+
* VerdocsEndpoint is a class wrapper for a specific connection and authorization context for calling the Verdocs APIs.
|
|
2158
|
+
* Endpoints can be used for isolated session tasks.
|
|
2159
|
+
* For instance, ephemeral signing sessions may be created independently of a caller's status as an authenticated user.
|
|
2160
|
+
* In that case, an Endpoint can be created and authenticated, used for calls related to signing operations, then
|
|
2161
|
+
* discarded once signing is complete.
|
|
2162
|
+
*
|
|
2163
|
+
* Note that endpoint configuration functions return the instance, so they can be chained, e.g.
|
|
2164
|
+
*
|
|
2165
|
+
* ```typescript
|
|
2166
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2167
|
+
*
|
|
2168
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2169
|
+
* endpoint
|
|
2170
|
+
* .logRequests(true)
|
|
2171
|
+
* .setClientID('1234)
|
|
2172
|
+
* .setTimeout(5000);
|
|
2173
|
+
* ```
|
|
2174
|
+
*/
|
|
2175
|
+
var VerdocsEndpoint = /** @class */ (function () {
|
|
2176
|
+
/**
|
|
2177
|
+
* Create a new VerdocsEndpoint to call Verdocs platform services.
|
|
2178
|
+
*
|
|
2179
|
+
* ```typescript
|
|
2180
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2181
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2182
|
+
* ```
|
|
2183
|
+
*/
|
|
2184
|
+
function VerdocsEndpoint() {
|
|
2185
|
+
this.requestLoggerId = null;
|
|
2186
|
+
this.api = axios.create({ baseURL: 'https://api.verdocs.com', timeout: 3000 });
|
|
2187
|
+
}
|
|
2188
|
+
/**
|
|
2189
|
+
* Set the timeout for API calls in milliseconds. 2000-4000ms is recommended for most purposes. 3000ms is the default.
|
|
2190
|
+
*
|
|
2191
|
+
* ```typescript
|
|
2192
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2193
|
+
*
|
|
2194
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2195
|
+
* endpoint.setTimeout(3000);
|
|
2196
|
+
* ```
|
|
2197
|
+
*/
|
|
2198
|
+
VerdocsEndpoint.prototype.setTimeout = function (timeout) {
|
|
2199
|
+
this.api.defaults.timeout = timeout;
|
|
2200
|
+
return this;
|
|
2201
|
+
};
|
|
2202
|
+
/**
|
|
2203
|
+
* Set the Client ID for Verdocs API calls.
|
|
2204
|
+
*
|
|
2205
|
+
* ```typescript
|
|
2206
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2207
|
+
*
|
|
2208
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2209
|
+
* endpoint.setClientID('1234);
|
|
2210
|
+
* ```
|
|
2211
|
+
*/
|
|
2212
|
+
VerdocsEndpoint.prototype.setClientID = function (clientID) {
|
|
2213
|
+
this.api.defaults.headers.common['X-Client-ID'] = clientID;
|
|
2214
|
+
return this;
|
|
2215
|
+
};
|
|
2216
|
+
/**
|
|
2217
|
+
* Set the auth token that will be used for Verdocs API calls.
|
|
2218
|
+
*
|
|
2219
|
+
* ```typescript
|
|
2220
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2221
|
+
*
|
|
2222
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2223
|
+
* endpoint.setAuthorization(accessToken);
|
|
2224
|
+
* ```
|
|
2225
|
+
*/
|
|
2226
|
+
VerdocsEndpoint.prototype.setAuthorization = function (accessToken) {
|
|
2227
|
+
if (accessToken) {
|
|
2228
|
+
this.api.defaults.headers.common.Authorization = "Bearer ".concat(accessToken);
|
|
2229
|
+
}
|
|
2230
|
+
else {
|
|
2231
|
+
delete this.api.defaults.headers.common.Authorization;
|
|
2232
|
+
}
|
|
2233
|
+
return this;
|
|
2234
|
+
};
|
|
2235
|
+
/**
|
|
2236
|
+
* Set the auth token used for signing sessions. Separating user from signing auth allows the same endpoint to be
|
|
2237
|
+
* used for multiple operations, although it is recommended that a separate endpoint be created for each operation.
|
|
2238
|
+
*
|
|
2239
|
+
* ```typescript
|
|
2240
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2241
|
+
*
|
|
2242
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2243
|
+
* endpoint.setSigningAuthorization(accessToken);
|
|
2244
|
+
* ```
|
|
2245
|
+
*/
|
|
2246
|
+
VerdocsEndpoint.prototype.setSigningAuthorization = function (accessToken) {
|
|
2247
|
+
if (accessToken) {
|
|
2248
|
+
this.api.defaults.headers.common.signer = "Bearer ".concat(accessToken);
|
|
2249
|
+
}
|
|
2250
|
+
else {
|
|
2251
|
+
delete this.api.defaults.headers.common.signer;
|
|
2252
|
+
}
|
|
2253
|
+
return this;
|
|
2254
|
+
};
|
|
2255
|
+
/**
|
|
2256
|
+
* Set the base URL for API calls. May also be set via the constructor.
|
|
2257
|
+
*
|
|
2258
|
+
* ```typescript
|
|
2259
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2260
|
+
*
|
|
2261
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2262
|
+
* endpoint.setBaseURL('https://api.verdocs.com');
|
|
2263
|
+
* ```
|
|
2264
|
+
*/
|
|
2265
|
+
VerdocsEndpoint.prototype.setBaseURL = function (url) {
|
|
2266
|
+
this.api.defaults.baseURL = url;
|
|
2267
|
+
return this;
|
|
2268
|
+
};
|
|
2269
|
+
/**
|
|
2270
|
+
* Enable or disable request logging. This may expose sensitive data in the console log, so it should only be used for debugging.
|
|
2271
|
+
*
|
|
2272
|
+
* ```typescript
|
|
2273
|
+
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
2274
|
+
*
|
|
2275
|
+
* const endpoint = new VerdocsEndpoint();
|
|
2276
|
+
* endpoint.logRequests(true);
|
|
2277
|
+
* ```
|
|
2278
|
+
*/
|
|
2279
|
+
VerdocsEndpoint.prototype.logRequests = function (enable) {
|
|
2280
|
+
if (enable && this.requestLoggerId === null) {
|
|
2281
|
+
this.requestLoggerId = this.api.interceptors.request.use(requestLogger);
|
|
2282
|
+
}
|
|
2283
|
+
else if (!enable && this.requestLoggerId !== null) {
|
|
2284
|
+
this.api.interceptors.request.eject(this.requestLoggerId);
|
|
2285
|
+
}
|
|
2286
|
+
return this;
|
|
2287
|
+
};
|
|
2288
|
+
return VerdocsEndpoint;
|
|
2289
|
+
}());
|
|
2290
|
+
|
|
2291
|
+
"use strict";
|
|
1806
2292
|
// This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
|
|
1807
2293
|
// an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
|
|
1808
2294
|
// (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
|
|
@@ -1856,23 +2342,20 @@ var globalThis_1 = (function () {
|
|
|
1856
2342
|
})();
|
|
1857
2343
|
|
|
1858
2344
|
/**
|
|
1859
|
-
* The Transport
|
|
1860
|
-
* its configuration settings are shared for all callers.
|
|
2345
|
+
* The Transport is a global singleton used to call Verdocs APIs. There can only be one Transport per application, and
|
|
2346
|
+
* its configuration settings are shared for all callers. This is a simplified form of the Endpoint class where most
|
|
2347
|
+
* tasks such as general session-token-management are handled automatically for the caller.
|
|
1861
2348
|
*
|
|
1862
2349
|
* @module
|
|
1863
2350
|
*/
|
|
1864
|
-
var DEFAULTS = {
|
|
1865
|
-
baseURL: 'https://api.verdocs.com/',
|
|
1866
|
-
timeout: 6000,
|
|
1867
|
-
headers: { 'X-Client-ID': 'NONE' },
|
|
1868
|
-
};
|
|
1869
2351
|
// @credit https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/
|
|
1870
2352
|
// Also see globalThis for comments about why we're doing this in the first place.
|
|
1871
2353
|
var ENDPOINT_KEY = Symbol.for('verdocs-api-endpoint');
|
|
1872
2354
|
if (!globalThis_1[ENDPOINT_KEY]) {
|
|
1873
|
-
globalThis_1[ENDPOINT_KEY] =
|
|
2355
|
+
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
|
1874
2356
|
}
|
|
1875
|
-
var
|
|
2357
|
+
var globalEndpoint = globalThis_1[ENDPOINT_KEY];
|
|
2358
|
+
var activeEndpoint = globalEndpoint;
|
|
1876
2359
|
/**
|
|
1877
2360
|
* Helper to get the endpoint for direct access to HTTP functions.
|
|
1878
2361
|
*
|
|
@@ -1883,68 +2366,93 @@ var endpoint = globalThis_1[ENDPOINT_KEY];
|
|
|
1883
2366
|
* ```
|
|
1884
2367
|
*/
|
|
1885
2368
|
var getEndpoint = function () {
|
|
1886
|
-
return
|
|
2369
|
+
return activeEndpoint;
|
|
1887
2370
|
};
|
|
1888
|
-
|
|
1889
2371
|
/**
|
|
1890
|
-
*
|
|
1891
|
-
*
|
|
1892
|
-
*
|
|
2372
|
+
* Change the endpoint that will be used when making calls to Verdocs. Only one endpoint may be active at a time.
|
|
2373
|
+
* Authorization and other configuration data is specific to each endpoint, and will not be carried over when the
|
|
2374
|
+
* endpoint is changed. The typical use-case is to change to a sandboxed endpoint for signing sessions, then revert
|
|
2375
|
+
* to the global endpoint when the signing session is complete. To revert, pass `null` as the endpoint to use.
|
|
1893
2376
|
*
|
|
1894
|
-
*
|
|
2377
|
+
* ```typescript
|
|
2378
|
+
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
2379
|
+
*
|
|
2380
|
+
* const mySigningEndpoint = new VerdocsEndpoint();
|
|
2381
|
+
* setActiveEndpoint(mySigningEndpoint);
|
|
2382
|
+
* ... [Perform signing operations]
|
|
2383
|
+
* setActiveEndpoint(null);
|
|
2384
|
+
* ```
|
|
1895
2385
|
*/
|
|
1896
|
-
var
|
|
1897
|
-
|
|
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
|
-
});
|
|
2386
|
+
var setActiveEndpoint = function (e) {
|
|
2387
|
+
activeEndpoint = e || globalEndpoint;
|
|
1904
2388
|
};
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
2389
|
+
|
|
2390
|
+
/* tslint:disable:no-bitwise */
|
|
2391
|
+
var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
2392
|
+
// Regular expression to check formal correctness of base64 encoded strings
|
|
2393
|
+
var b64re = /^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/;
|
|
2394
|
+
/**
|
|
2395
|
+
* Simplified, Node/Browser-safe alternative to atob() for base64 decoding.
|
|
2396
|
+
* Modified from https://github.com/MaxArt2501/base64-js/blob/master/base64.js
|
|
2397
|
+
*/
|
|
2398
|
+
var AtoB = function (str) {
|
|
2399
|
+
// atob can work with strings with whitespaces, even inside the encoded part,
|
|
2400
|
+
// but only \t, \n, \f, \r and ' ', which can be stripped.
|
|
2401
|
+
str = String(str).replace(/[\t\n\f\r ]+/g, '');
|
|
2402
|
+
if (!b64re.test(str))
|
|
2403
|
+
throw new TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
|
2404
|
+
// Adding the padding if missing, for semplicity
|
|
2405
|
+
str += '=='.slice(2 - (str.length & 3));
|
|
2406
|
+
var bitmap;
|
|
2407
|
+
var result = '';
|
|
2408
|
+
var r1;
|
|
2409
|
+
var r2;
|
|
2410
|
+
var i = 0;
|
|
2411
|
+
for (; i < str.length;) {
|
|
2412
|
+
bitmap =
|
|
2413
|
+
(b64.indexOf(str.charAt(i++)) << 18) |
|
|
2414
|
+
(b64.indexOf(str.charAt(i++)) << 12) |
|
|
2415
|
+
((r1 = b64.indexOf(str.charAt(i++))) << 6) |
|
|
2416
|
+
(r2 = b64.indexOf(str.charAt(i++)));
|
|
2417
|
+
result +=
|
|
2418
|
+
r1 === 64
|
|
2419
|
+
? String.fromCharCode((bitmap >> 16) & 255)
|
|
2420
|
+
: r2 === 64
|
|
2421
|
+
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
|
2422
|
+
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
|
1930
2423
|
}
|
|
2424
|
+
return result;
|
|
1931
2425
|
};
|
|
1932
2426
|
/**
|
|
1933
|
-
*
|
|
1934
|
-
*
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
*
|
|
1939
|
-
*
|
|
1940
|
-
*
|
|
2427
|
+
* Decode the body of a JWT. This helper may allow front-end applications to avoid a dependency on `jsonwebtoken` in
|
|
2428
|
+
* many cases. Note that this should only be used for true JWTs. Opaque tokens will cause this to throw.
|
|
2429
|
+
*/
|
|
2430
|
+
var decodeTokenBody = function (token) { return JSON.parse(AtoB((token || '').split('.')[1] || '')); };
|
|
2431
|
+
/**
|
|
2432
|
+
* Decode the body of an Verdocs access token. Note that raw tokens contain namespaced fields, e.g.
|
|
2433
|
+
* `https://verdocs.com/profile_id`. To make these tokens easier to use in front-end code, this name-spacing
|
|
2434
|
+
* will be removed. Note that user and signing sessions have different access token formats. The calling
|
|
2435
|
+
* application should distinguish between the two based on the context of the authenticated session, or by
|
|
2436
|
+
* the presence of the `document_id` field, which will only be present for signing sessions.
|
|
1941
2437
|
*/
|
|
1942
|
-
var
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
2438
|
+
var decodeAccessTokenBody = function (token) {
|
|
2439
|
+
var decoded;
|
|
2440
|
+
try {
|
|
2441
|
+
decoded = decodeTokenBody(token);
|
|
2442
|
+
if (decoded === null) {
|
|
2443
|
+
return null;
|
|
2444
|
+
}
|
|
2445
|
+
}
|
|
2446
|
+
catch (e) {
|
|
2447
|
+
return null;
|
|
2448
|
+
}
|
|
2449
|
+
Object.keys(decoded).forEach(function (key) {
|
|
2450
|
+
if (typeof key === 'string' && key.startsWith('https://verdocs.com/')) {
|
|
2451
|
+
decoded[key.replace('https://verdocs.com/', '')] = decoded[key];
|
|
2452
|
+
delete decoded[key];
|
|
2453
|
+
}
|
|
1947
2454
|
});
|
|
1948
|
-
|
|
2455
|
+
return decoded;
|
|
2456
|
+
};
|
|
1949
2457
|
|
|
1950
|
-
export {
|
|
2458
|
+
export { VerdocsEndpoint as V, decodeAccessTokenBody as d, getEndpoint as g, setActiveEndpoint as s };
|