@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,6 @@
|
|
|
1
|
+
import { p as process_1 } from './index-97ec070b.js';
|
|
2
|
+
import { B as Buffer } from './buffer-es6-5cef4368.js';
|
|
3
|
+
|
|
1
4
|
'use strict';
|
|
2
5
|
|
|
3
6
|
var bind = function bind(fn, thisArg) {
|
|
@@ -10,10 +13,30 @@ var bind = function bind(fn, thisArg) {
|
|
|
10
13
|
};
|
|
11
14
|
};
|
|
12
15
|
|
|
16
|
+
'use strict';
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
13
20
|
// utils is a library of generic helper functions non-specific to axios
|
|
14
21
|
|
|
15
22
|
var toString = Object.prototype.toString;
|
|
16
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
|
+
|
|
17
40
|
/**
|
|
18
41
|
* Determine if a value is an Array
|
|
19
42
|
*
|
|
@@ -21,7 +44,7 @@ var toString = Object.prototype.toString;
|
|
|
21
44
|
* @returns {boolean} True if value is an Array, otherwise false
|
|
22
45
|
*/
|
|
23
46
|
function isArray(val) {
|
|
24
|
-
return
|
|
47
|
+
return Array.isArray(val);
|
|
25
48
|
}
|
|
26
49
|
|
|
27
50
|
/**
|
|
@@ -48,22 +71,12 @@ function isBuffer(val) {
|
|
|
48
71
|
/**
|
|
49
72
|
* Determine if a value is an ArrayBuffer
|
|
50
73
|
*
|
|
74
|
+
* @function
|
|
51
75
|
* @param {Object} val The value to test
|
|
52
76
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
53
77
|
*/
|
|
54
|
-
|
|
55
|
-
return toString.call(val) === '[object ArrayBuffer]';
|
|
56
|
-
}
|
|
78
|
+
var isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
57
79
|
|
|
58
|
-
/**
|
|
59
|
-
* Determine if a value is a FormData
|
|
60
|
-
*
|
|
61
|
-
* @param {Object} val The value to test
|
|
62
|
-
* @returns {boolean} True if value is an FormData, otherwise false
|
|
63
|
-
*/
|
|
64
|
-
function isFormData(val) {
|
|
65
|
-
return (typeof FormData !== 'undefined') && (val instanceof FormData);
|
|
66
|
-
}
|
|
67
80
|
|
|
68
81
|
/**
|
|
69
82
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -76,7 +89,7 @@ function isArrayBufferView(val) {
|
|
|
76
89
|
if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
|
|
77
90
|
result = ArrayBuffer.isView(val);
|
|
78
91
|
} else {
|
|
79
|
-
result = (val) && (val.buffer) && (val.buffer
|
|
92
|
+
result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
|
|
80
93
|
}
|
|
81
94
|
return result;
|
|
82
95
|
}
|
|
@@ -118,7 +131,7 @@ function isObject(val) {
|
|
|
118
131
|
* @return {boolean} True if value is a plain Object, otherwise false
|
|
119
132
|
*/
|
|
120
133
|
function isPlainObject(val) {
|
|
121
|
-
if (
|
|
134
|
+
if (kindOf(val) !== 'object') {
|
|
122
135
|
return false;
|
|
123
136
|
}
|
|
124
137
|
|
|
@@ -129,32 +142,38 @@ function isPlainObject(val) {
|
|
|
129
142
|
/**
|
|
130
143
|
* Determine if a value is a Date
|
|
131
144
|
*
|
|
145
|
+
* @function
|
|
132
146
|
* @param {Object} val The value to test
|
|
133
147
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
134
148
|
*/
|
|
135
|
-
|
|
136
|
-
return toString.call(val) === '[object Date]';
|
|
137
|
-
}
|
|
149
|
+
var isDate = kindOfTest('Date');
|
|
138
150
|
|
|
139
151
|
/**
|
|
140
152
|
* Determine if a value is a File
|
|
141
153
|
*
|
|
154
|
+
* @function
|
|
142
155
|
* @param {Object} val The value to test
|
|
143
156
|
* @returns {boolean} True if value is a File, otherwise false
|
|
144
157
|
*/
|
|
145
|
-
|
|
146
|
-
return toString.call(val) === '[object File]';
|
|
147
|
-
}
|
|
158
|
+
var isFile = kindOfTest('File');
|
|
148
159
|
|
|
149
160
|
/**
|
|
150
161
|
* Determine if a value is a Blob
|
|
151
162
|
*
|
|
163
|
+
* @function
|
|
152
164
|
* @param {Object} val The value to test
|
|
153
165
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
154
166
|
*/
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
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');
|
|
158
177
|
|
|
159
178
|
/**
|
|
160
179
|
* Determine if a value is a Function
|
|
@@ -177,14 +196,27 @@ function isStream(val) {
|
|
|
177
196
|
}
|
|
178
197
|
|
|
179
198
|
/**
|
|
180
|
-
* Determine if a value is a
|
|
199
|
+
* Determine if a value is a FormData
|
|
181
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
|
|
182
216
|
* @param {Object} val The value to test
|
|
183
217
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
184
218
|
*/
|
|
185
|
-
|
|
186
|
-
return typeof URLSearchParams !== 'undefined' && val instanceof URLSearchParams;
|
|
187
|
-
}
|
|
219
|
+
var isURLSearchParams = kindOfTest('URLSearchParams');
|
|
188
220
|
|
|
189
221
|
/**
|
|
190
222
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -331,6 +363,94 @@ function stripBOM(content) {
|
|
|
331
363
|
return content;
|
|
332
364
|
}
|
|
333
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
|
+
|
|
334
454
|
var utils = {
|
|
335
455
|
isArray: isArray,
|
|
336
456
|
isArrayBuffer: isArrayBuffer,
|
|
@@ -353,9 +473,21 @@ var utils = {
|
|
|
353
473
|
merge: merge,
|
|
354
474
|
extend: extend,
|
|
355
475
|
trim: trim,
|
|
356
|
-
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
|
|
357
485
|
};
|
|
358
486
|
|
|
487
|
+
'use strict';
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
359
491
|
function encode(val) {
|
|
360
492
|
return encodeURIComponent(val).
|
|
361
493
|
replace(/%3A/gi, ':').
|
|
@@ -423,6 +555,10 @@ var buildURL = function buildURL(url, params, paramsSerializer) {
|
|
|
423
555
|
return url;
|
|
424
556
|
};
|
|
425
557
|
|
|
558
|
+
'use strict';
|
|
559
|
+
|
|
560
|
+
|
|
561
|
+
|
|
426
562
|
function InterceptorManager() {
|
|
427
563
|
this.handlers = [];
|
|
428
564
|
}
|
|
@@ -474,6 +610,10 @@ InterceptorManager.prototype.forEach = function forEach(fn) {
|
|
|
474
610
|
|
|
475
611
|
var InterceptorManager_1 = InterceptorManager;
|
|
476
612
|
|
|
613
|
+
'use strict';
|
|
614
|
+
|
|
615
|
+
|
|
616
|
+
|
|
477
617
|
var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName) {
|
|
478
618
|
utils.forEach(headers, function processHeader(value, name) {
|
|
479
619
|
if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
|
|
@@ -483,27 +623,32 @@ var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName)
|
|
|
483
623
|
});
|
|
484
624
|
};
|
|
485
625
|
|
|
626
|
+
'use strict';
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
|
|
486
630
|
/**
|
|
487
|
-
*
|
|
631
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
488
632
|
*
|
|
489
|
-
* @param {
|
|
490
|
-
* @param {Object} config The config.
|
|
633
|
+
* @param {string} message The error message.
|
|
491
634
|
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
635
|
+
* @param {Object} [config] The config.
|
|
492
636
|
* @param {Object} [request] The request.
|
|
493
637
|
* @param {Object} [response] The response.
|
|
494
|
-
* @returns {Error} The error.
|
|
638
|
+
* @returns {Error} The created error.
|
|
495
639
|
*/
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
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
|
+
}
|
|
505
649
|
|
|
506
|
-
|
|
650
|
+
utils.inherits(AxiosError, Error, {
|
|
651
|
+
toJSON: function toJSON() {
|
|
507
652
|
return {
|
|
508
653
|
// Standard
|
|
509
654
|
message: this.message,
|
|
@@ -518,27 +663,138 @@ var enhanceError = function enhanceError(error, config, code, request, response)
|
|
|
518
663
|
stack: this.stack,
|
|
519
664
|
// Axios
|
|
520
665
|
config: this.config,
|
|
521
|
-
code: this.code
|
|
666
|
+
code: this.code,
|
|
667
|
+
status: this.response && this.response.status ? this.response.status : null
|
|
522
668
|
};
|
|
523
|
-
}
|
|
524
|
-
|
|
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;
|
|
525
709
|
};
|
|
526
710
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
* @returns {Error} The created error.
|
|
536
|
-
*/
|
|
537
|
-
var createError = function createError(message, config, code, request, response) {
|
|
538
|
-
var error = new Error(message);
|
|
539
|
-
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
|
|
540
719
|
};
|
|
541
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
|
+
|
|
542
798
|
/**
|
|
543
799
|
* Resolve or reject a Promise based on response status.
|
|
544
800
|
*
|
|
@@ -551,16 +807,20 @@ var settle = function settle(resolve, reject, response) {
|
|
|
551
807
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
552
808
|
resolve(response);
|
|
553
809
|
} else {
|
|
554
|
-
reject(
|
|
810
|
+
reject(new AxiosError_1(
|
|
555
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],
|
|
556
813
|
response.config,
|
|
557
|
-
null,
|
|
558
814
|
response.request,
|
|
559
815
|
response
|
|
560
816
|
));
|
|
561
817
|
}
|
|
562
818
|
};
|
|
563
819
|
|
|
820
|
+
'use strict';
|
|
821
|
+
|
|
822
|
+
|
|
823
|
+
|
|
564
824
|
var cookies = (
|
|
565
825
|
utils.isStandardBrowserEnv() ?
|
|
566
826
|
|
|
@@ -611,6 +871,8 @@ var cookies = (
|
|
|
611
871
|
})()
|
|
612
872
|
);
|
|
613
873
|
|
|
874
|
+
'use strict';
|
|
875
|
+
|
|
614
876
|
/**
|
|
615
877
|
* Determines whether the specified URL is absolute
|
|
616
878
|
*
|
|
@@ -621,9 +883,11 @@ var isAbsoluteURL = function isAbsoluteURL(url) {
|
|
|
621
883
|
// A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
|
|
622
884
|
// RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
|
|
623
885
|
// by any combination of letters, digits, plus, period, or hyphen.
|
|
624
|
-
return /^([a-z][a-z\d
|
|
886
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
|
|
625
887
|
};
|
|
626
888
|
|
|
889
|
+
'use strict';
|
|
890
|
+
|
|
627
891
|
/**
|
|
628
892
|
* Creates a new URL by combining the specified URLs
|
|
629
893
|
*
|
|
@@ -637,6 +901,11 @@ var combineURLs = function combineURLs(baseURL, relativeURL) {
|
|
|
637
901
|
: baseURL;
|
|
638
902
|
};
|
|
639
903
|
|
|
904
|
+
'use strict';
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
908
|
+
|
|
640
909
|
/**
|
|
641
910
|
* Creates a new URL by combining the baseURL with the requestedURL,
|
|
642
911
|
* only when the requestedURL is not already an absolute URL.
|
|
@@ -653,6 +922,10 @@ var buildFullPath = function buildFullPath(baseURL, requestedURL) {
|
|
|
653
922
|
return requestedURL;
|
|
654
923
|
};
|
|
655
924
|
|
|
925
|
+
'use strict';
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
|
|
656
929
|
// Headers whose duplicates are ignored by node
|
|
657
930
|
// c.f. https://nodejs.org/api/http.html#http_message_headers
|
|
658
931
|
var ignoreDuplicateOf = [
|
|
@@ -703,6 +976,10 @@ var parseHeaders = function parseHeaders(headers) {
|
|
|
703
976
|
return parsed;
|
|
704
977
|
};
|
|
705
978
|
|
|
979
|
+
'use strict';
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
|
|
706
983
|
var isURLSameOrigin = (
|
|
707
984
|
utils.isStandardBrowserEnv() ?
|
|
708
985
|
|
|
@@ -768,13 +1045,67 @@ var isURLSameOrigin = (
|
|
|
768
1045
|
})()
|
|
769
1046
|
);
|
|
770
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
|
+
|
|
771
1092
|
var xhr = function xhrAdapter(config) {
|
|
772
1093
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
773
1094
|
var requestData = config.data;
|
|
774
1095
|
var requestHeaders = config.headers;
|
|
775
1096
|
var responseType = config.responseType;
|
|
1097
|
+
var onCanceled;
|
|
1098
|
+
function done() {
|
|
1099
|
+
if (config.cancelToken) {
|
|
1100
|
+
config.cancelToken.unsubscribe(onCanceled);
|
|
1101
|
+
}
|
|
776
1102
|
|
|
777
|
-
|
|
1103
|
+
if (config.signal) {
|
|
1104
|
+
config.signal.removeEventListener('abort', onCanceled);
|
|
1105
|
+
}
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
|
778
1109
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
779
1110
|
}
|
|
780
1111
|
|
|
@@ -788,6 +1119,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
788
1119
|
}
|
|
789
1120
|
|
|
790
1121
|
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
1122
|
+
|
|
791
1123
|
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
792
1124
|
|
|
793
1125
|
// Set the request timeout in MS
|
|
@@ -810,7 +1142,13 @@ var xhr = function xhrAdapter(config) {
|
|
|
810
1142
|
request: request
|
|
811
1143
|
};
|
|
812
1144
|
|
|
813
|
-
settle(
|
|
1145
|
+
settle(function _resolve(value) {
|
|
1146
|
+
resolve(value);
|
|
1147
|
+
done();
|
|
1148
|
+
}, function _reject(err) {
|
|
1149
|
+
reject(err);
|
|
1150
|
+
done();
|
|
1151
|
+
}, response);
|
|
814
1152
|
|
|
815
1153
|
// Clean up request
|
|
816
1154
|
request = null;
|
|
@@ -845,7 +1183,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
845
1183
|
return;
|
|
846
1184
|
}
|
|
847
1185
|
|
|
848
|
-
reject(
|
|
1186
|
+
reject(new AxiosError_1('Request aborted', AxiosError_1.ECONNABORTED, config, request));
|
|
849
1187
|
|
|
850
1188
|
// Clean up request
|
|
851
1189
|
request = null;
|
|
@@ -855,7 +1193,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
855
1193
|
request.onerror = function handleError() {
|
|
856
1194
|
// Real errors are hidden from us by the browser
|
|
857
1195
|
// onerror should only fire if it's a network error
|
|
858
|
-
reject(
|
|
1196
|
+
reject(new AxiosError_1('Network Error', AxiosError_1.ERR_NETWORK, config, request, request));
|
|
859
1197
|
|
|
860
1198
|
// Clean up request
|
|
861
1199
|
request = null;
|
|
@@ -863,14 +1201,15 @@ var xhr = function xhrAdapter(config) {
|
|
|
863
1201
|
|
|
864
1202
|
// Handle timeout
|
|
865
1203
|
request.ontimeout = function handleTimeout() {
|
|
866
|
-
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;
|
|
867
1206
|
if (config.timeoutErrorMessage) {
|
|
868
1207
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
869
1208
|
}
|
|
870
|
-
reject(
|
|
1209
|
+
reject(new AxiosError_1(
|
|
871
1210
|
timeoutErrorMessage,
|
|
1211
|
+
transitional$1.clarifyTimeoutError ? AxiosError_1.ETIMEDOUT : AxiosError_1.ECONNABORTED,
|
|
872
1212
|
config,
|
|
873
|
-
config.transitional && config.transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
|
874
1213
|
request));
|
|
875
1214
|
|
|
876
1215
|
// Clean up request
|
|
@@ -924,29 +1263,52 @@ var xhr = function xhrAdapter(config) {
|
|
|
924
1263
|
request.upload.addEventListener('progress', config.onUploadProgress);
|
|
925
1264
|
}
|
|
926
1265
|
|
|
927
|
-
if (config.cancelToken) {
|
|
1266
|
+
if (config.cancelToken || config.signal) {
|
|
928
1267
|
// Handle cancellation
|
|
929
|
-
|
|
1268
|
+
// eslint-disable-next-line func-names
|
|
1269
|
+
onCanceled = function(cancel) {
|
|
930
1270
|
if (!request) {
|
|
931
1271
|
return;
|
|
932
1272
|
}
|
|
933
|
-
|
|
1273
|
+
reject(!cancel || (cancel && cancel.type) ? new CanceledError_1() : cancel);
|
|
934
1274
|
request.abort();
|
|
935
|
-
reject(cancel);
|
|
936
|
-
// Clean up request
|
|
937
1275
|
request = null;
|
|
938
|
-
}
|
|
1276
|
+
};
|
|
1277
|
+
|
|
1278
|
+
config.cancelToken && config.cancelToken.subscribe(onCanceled);
|
|
1279
|
+
if (config.signal) {
|
|
1280
|
+
config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
|
|
1281
|
+
}
|
|
939
1282
|
}
|
|
940
1283
|
|
|
941
1284
|
if (!requestData) {
|
|
942
1285
|
requestData = null;
|
|
943
1286
|
}
|
|
944
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
|
+
|
|
945
1296
|
// Send the request
|
|
946
1297
|
request.send(requestData);
|
|
947
1298
|
});
|
|
948
1299
|
};
|
|
949
1300
|
|
|
1301
|
+
// eslint-disable-next-line strict
|
|
1302
|
+
var _null = null;
|
|
1303
|
+
|
|
1304
|
+
'use strict';
|
|
1305
|
+
|
|
1306
|
+
|
|
1307
|
+
|
|
1308
|
+
|
|
1309
|
+
|
|
1310
|
+
|
|
1311
|
+
|
|
950
1312
|
var DEFAULT_CONTENT_TYPE = {
|
|
951
1313
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
952
1314
|
};
|
|
@@ -962,7 +1324,7 @@ function getDefaultAdapter() {
|
|
|
962
1324
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
963
1325
|
// For browsers use XHR adapter
|
|
964
1326
|
adapter = xhr;
|
|
965
|
-
} else if (typeof
|
|
1327
|
+
} else if (typeof process_1 !== 'undefined' && Object.prototype.toString.call(process_1) === '[object process]') {
|
|
966
1328
|
// For node use HTTP adapter
|
|
967
1329
|
adapter = xhr;
|
|
968
1330
|
}
|
|
@@ -986,11 +1348,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
986
1348
|
|
|
987
1349
|
var defaults = {
|
|
988
1350
|
|
|
989
|
-
transitional:
|
|
990
|
-
silentJSONParsing: true,
|
|
991
|
-
forcedJSONParsing: true,
|
|
992
|
-
clarifyTimeoutError: false
|
|
993
|
-
},
|
|
1351
|
+
transitional: transitional,
|
|
994
1352
|
|
|
995
1353
|
adapter: getDefaultAdapter(),
|
|
996
1354
|
|
|
@@ -1014,15 +1372,25 @@ var defaults = {
|
|
|
1014
1372
|
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
|
1015
1373
|
return data.toString();
|
|
1016
1374
|
}
|
|
1017
|
-
|
|
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') {
|
|
1018
1385
|
setContentTypeIfUnset(headers, 'application/json');
|
|
1019
1386
|
return stringifySafely(data);
|
|
1020
1387
|
}
|
|
1388
|
+
|
|
1021
1389
|
return data;
|
|
1022
1390
|
}],
|
|
1023
1391
|
|
|
1024
1392
|
transformResponse: [function transformResponse(data) {
|
|
1025
|
-
var transitional = this.transitional;
|
|
1393
|
+
var transitional = this.transitional || defaults.transitional;
|
|
1026
1394
|
var silentJSONParsing = transitional && transitional.silentJSONParsing;
|
|
1027
1395
|
var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
|
|
1028
1396
|
var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';
|
|
@@ -1033,7 +1401,7 @@ var defaults = {
|
|
|
1033
1401
|
} catch (e) {
|
|
1034
1402
|
if (strictJSONParsing) {
|
|
1035
1403
|
if (e.name === 'SyntaxError') {
|
|
1036
|
-
throw
|
|
1404
|
+
throw AxiosError_1.from(e, AxiosError_1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
1037
1405
|
}
|
|
1038
1406
|
throw e;
|
|
1039
1407
|
}
|
|
@@ -1055,14 +1423,18 @@ var defaults = {
|
|
|
1055
1423
|
maxContentLength: -1,
|
|
1056
1424
|
maxBodyLength: -1,
|
|
1057
1425
|
|
|
1426
|
+
env: {
|
|
1427
|
+
FormData: _null
|
|
1428
|
+
},
|
|
1429
|
+
|
|
1058
1430
|
validateStatus: function validateStatus(status) {
|
|
1059
1431
|
return status >= 200 && status < 300;
|
|
1060
|
-
}
|
|
1061
|
-
};
|
|
1432
|
+
},
|
|
1062
1433
|
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1434
|
+
headers: {
|
|
1435
|
+
common: {
|
|
1436
|
+
'Accept': 'application/json, text/plain, */*'
|
|
1437
|
+
}
|
|
1066
1438
|
}
|
|
1067
1439
|
};
|
|
1068
1440
|
|
|
@@ -1076,6 +1448,11 @@ utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
|
1076
1448
|
|
|
1077
1449
|
var defaults_1 = defaults;
|
|
1078
1450
|
|
|
1451
|
+
'use strict';
|
|
1452
|
+
|
|
1453
|
+
|
|
1454
|
+
|
|
1455
|
+
|
|
1079
1456
|
/**
|
|
1080
1457
|
* Transform the data for a request or a response
|
|
1081
1458
|
*
|
|
@@ -1094,17 +1471,31 @@ var transformData = function transformData(data, headers, fns) {
|
|
|
1094
1471
|
return data;
|
|
1095
1472
|
};
|
|
1096
1473
|
|
|
1474
|
+
'use strict';
|
|
1475
|
+
|
|
1097
1476
|
var isCancel = function isCancel(value) {
|
|
1098
1477
|
return !!(value && value.__CANCEL__);
|
|
1099
1478
|
};
|
|
1100
1479
|
|
|
1480
|
+
'use strict';
|
|
1481
|
+
|
|
1482
|
+
|
|
1483
|
+
|
|
1484
|
+
|
|
1485
|
+
|
|
1486
|
+
|
|
1487
|
+
|
|
1101
1488
|
/**
|
|
1102
|
-
* Throws a `
|
|
1489
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1103
1490
|
*/
|
|
1104
1491
|
function throwIfCancellationRequested(config) {
|
|
1105
1492
|
if (config.cancelToken) {
|
|
1106
1493
|
config.cancelToken.throwIfRequested();
|
|
1107
1494
|
}
|
|
1495
|
+
|
|
1496
|
+
if (config.signal && config.signal.aborted) {
|
|
1497
|
+
throw new CanceledError_1();
|
|
1498
|
+
}
|
|
1108
1499
|
}
|
|
1109
1500
|
|
|
1110
1501
|
/**
|
|
@@ -1174,6 +1565,10 @@ var dispatchRequest = function dispatchRequest(config) {
|
|
|
1174
1565
|
});
|
|
1175
1566
|
};
|
|
1176
1567
|
|
|
1568
|
+
'use strict';
|
|
1569
|
+
|
|
1570
|
+
|
|
1571
|
+
|
|
1177
1572
|
/**
|
|
1178
1573
|
* Config-specific merge-function which creates a new config-object
|
|
1179
1574
|
* by merging two configuration objects together.
|
|
@@ -1187,17 +1582,6 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1187
1582
|
config2 = config2 || {};
|
|
1188
1583
|
var config = {};
|
|
1189
1584
|
|
|
1190
|
-
var valueFromConfig2Keys = ['url', 'method', 'data'];
|
|
1191
|
-
var mergeDeepPropertiesKeys = ['headers', 'auth', 'proxy', 'params'];
|
|
1192
|
-
var defaultToConfig2Keys = [
|
|
1193
|
-
'baseURL', 'transformRequest', 'transformResponse', 'paramsSerializer',
|
|
1194
|
-
'timeout', 'timeoutMessage', 'withCredentials', 'adapter', 'responseType', 'xsrfCookieName',
|
|
1195
|
-
'xsrfHeaderName', 'onUploadProgress', 'onDownloadProgress', 'decompress',
|
|
1196
|
-
'maxContentLength', 'maxBodyLength', 'maxRedirects', 'transport', 'httpAgent',
|
|
1197
|
-
'httpsAgent', 'cancelToken', 'socketPath', 'responseEncoding'
|
|
1198
|
-
];
|
|
1199
|
-
var directMergeKeys = ['validateStatus'];
|
|
1200
|
-
|
|
1201
1585
|
function getMergedValue(target, source) {
|
|
1202
1586
|
if (utils.isPlainObject(target) && utils.isPlainObject(source)) {
|
|
1203
1587
|
return utils.merge(target, source);
|
|
@@ -1209,200 +1593,88 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1209
1593
|
return source;
|
|
1210
1594
|
}
|
|
1211
1595
|
|
|
1596
|
+
// eslint-disable-next-line consistent-return
|
|
1212
1597
|
function mergeDeepProperties(prop) {
|
|
1213
1598
|
if (!utils.isUndefined(config2[prop])) {
|
|
1214
|
-
|
|
1599
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1215
1600
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
1216
|
-
|
|
1601
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1217
1602
|
}
|
|
1218
1603
|
}
|
|
1219
1604
|
|
|
1220
|
-
|
|
1605
|
+
// eslint-disable-next-line consistent-return
|
|
1606
|
+
function valueFromConfig2(prop) {
|
|
1221
1607
|
if (!utils.isUndefined(config2[prop])) {
|
|
1222
|
-
|
|
1608
|
+
return getMergedValue(undefined, config2[prop]);
|
|
1223
1609
|
}
|
|
1224
|
-
}
|
|
1225
|
-
|
|
1226
|
-
utils.forEach(mergeDeepPropertiesKeys, mergeDeepProperties);
|
|
1610
|
+
}
|
|
1227
1611
|
|
|
1228
|
-
|
|
1612
|
+
// eslint-disable-next-line consistent-return
|
|
1613
|
+
function defaultToConfig2(prop) {
|
|
1229
1614
|
if (!utils.isUndefined(config2[prop])) {
|
|
1230
|
-
|
|
1615
|
+
return getMergedValue(undefined, config2[prop]);
|
|
1231
1616
|
} else if (!utils.isUndefined(config1[prop])) {
|
|
1232
|
-
|
|
1617
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1233
1618
|
}
|
|
1234
|
-
}
|
|
1619
|
+
}
|
|
1235
1620
|
|
|
1236
|
-
|
|
1621
|
+
// eslint-disable-next-line consistent-return
|
|
1622
|
+
function mergeDirectKeys(prop) {
|
|
1237
1623
|
if (prop in config2) {
|
|
1238
|
-
|
|
1624
|
+
return getMergedValue(config1[prop], config2[prop]);
|
|
1239
1625
|
} else if (prop in config1) {
|
|
1240
|
-
|
|
1626
|
+
return getMergedValue(undefined, config1[prop]);
|
|
1241
1627
|
}
|
|
1242
|
-
}
|
|
1243
|
-
|
|
1244
|
-
var axiosKeys = valueFromConfig2Keys
|
|
1245
|
-
.concat(mergeDeepPropertiesKeys)
|
|
1246
|
-
.concat(defaultToConfig2Keys)
|
|
1247
|
-
.concat(directMergeKeys);
|
|
1628
|
+
}
|
|
1248
1629
|
|
|
1249
|
-
var
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
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
|
+
};
|
|
1255
1659
|
|
|
1256
|
-
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
|
+
});
|
|
1257
1665
|
|
|
1258
1666
|
return config;
|
|
1259
1667
|
};
|
|
1260
1668
|
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
const _inBundle = false;
|
|
1264
|
-
const _integrity = "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==";
|
|
1265
|
-
const _location = "/axios";
|
|
1266
|
-
const _phantomChildren = {
|
|
1267
|
-
};
|
|
1268
|
-
const _requested = {
|
|
1269
|
-
type: "range",
|
|
1270
|
-
registry: true,
|
|
1271
|
-
raw: "axios@^0.21.1",
|
|
1272
|
-
name: "axios",
|
|
1273
|
-
escapedName: "axios",
|
|
1274
|
-
rawSpec: "^0.21.1",
|
|
1275
|
-
saveSpec: null,
|
|
1276
|
-
fetchSpec: "^0.21.1"
|
|
1277
|
-
};
|
|
1278
|
-
const _requiredBy = [
|
|
1279
|
-
"/@verdocs/js-sdk"
|
|
1280
|
-
];
|
|
1281
|
-
const _resolved = "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz";
|
|
1282
|
-
const _shasum = "c67b90dc0568e5c1cf2b0b858c43ba28e2eda575";
|
|
1283
|
-
const _spec = "axios@^0.21.1";
|
|
1284
|
-
const _where = "/Users/chad/projects/verdocs/web-sdk/verdocs-web-sdk/node_modules/@verdocs/js-sdk";
|
|
1285
|
-
const author = {
|
|
1286
|
-
name: "Matt Zabriskie"
|
|
1287
|
-
};
|
|
1288
|
-
const browser = {
|
|
1289
|
-
"./lib/adapters/http.js": "./lib/adapters/xhr.js"
|
|
1290
|
-
};
|
|
1291
|
-
const bugs = {
|
|
1292
|
-
url: "https://github.com/axios/axios/issues"
|
|
1293
|
-
};
|
|
1294
|
-
const bundleDependencies = false;
|
|
1295
|
-
const bundlesize = [
|
|
1296
|
-
{
|
|
1297
|
-
path: "./dist/axios.min.js",
|
|
1298
|
-
threshold: "5kB"
|
|
1299
|
-
}
|
|
1300
|
-
];
|
|
1301
|
-
const dependencies = {
|
|
1302
|
-
"follow-redirects": "^1.14.0"
|
|
1303
|
-
};
|
|
1304
|
-
const deprecated = false;
|
|
1305
|
-
const description = "Promise based HTTP client for the browser and node.js";
|
|
1306
|
-
const devDependencies = {
|
|
1307
|
-
coveralls: "^3.0.0",
|
|
1308
|
-
"es6-promise": "^4.2.4",
|
|
1309
|
-
grunt: "^1.3.0",
|
|
1310
|
-
"grunt-banner": "^0.6.0",
|
|
1311
|
-
"grunt-cli": "^1.2.0",
|
|
1312
|
-
"grunt-contrib-clean": "^1.1.0",
|
|
1313
|
-
"grunt-contrib-watch": "^1.0.0",
|
|
1314
|
-
"grunt-eslint": "^23.0.0",
|
|
1315
|
-
"grunt-karma": "^4.0.0",
|
|
1316
|
-
"grunt-mocha-test": "^0.13.3",
|
|
1317
|
-
"grunt-ts": "^6.0.0-beta.19",
|
|
1318
|
-
"grunt-webpack": "^4.0.2",
|
|
1319
|
-
"istanbul-instrumenter-loader": "^1.0.0",
|
|
1320
|
-
"jasmine-core": "^2.4.1",
|
|
1321
|
-
karma: "^6.3.2",
|
|
1322
|
-
"karma-chrome-launcher": "^3.1.0",
|
|
1323
|
-
"karma-firefox-launcher": "^2.1.0",
|
|
1324
|
-
"karma-jasmine": "^1.1.1",
|
|
1325
|
-
"karma-jasmine-ajax": "^0.1.13",
|
|
1326
|
-
"karma-safari-launcher": "^1.0.0",
|
|
1327
|
-
"karma-sauce-launcher": "^4.3.6",
|
|
1328
|
-
"karma-sinon": "^1.0.5",
|
|
1329
|
-
"karma-sourcemap-loader": "^0.3.8",
|
|
1330
|
-
"karma-webpack": "^4.0.2",
|
|
1331
|
-
"load-grunt-tasks": "^3.5.2",
|
|
1332
|
-
minimist: "^1.2.0",
|
|
1333
|
-
mocha: "^8.2.1",
|
|
1334
|
-
sinon: "^4.5.0",
|
|
1335
|
-
"terser-webpack-plugin": "^4.2.3",
|
|
1336
|
-
typescript: "^4.0.5",
|
|
1337
|
-
"url-search-params": "^0.10.0",
|
|
1338
|
-
webpack: "^4.44.2",
|
|
1339
|
-
"webpack-dev-server": "^3.11.0"
|
|
1340
|
-
};
|
|
1341
|
-
const homepage = "https://axios-http.com";
|
|
1342
|
-
const jsdelivr = "dist/axios.min.js";
|
|
1343
|
-
const keywords = [
|
|
1344
|
-
"xhr",
|
|
1345
|
-
"http",
|
|
1346
|
-
"ajax",
|
|
1347
|
-
"promise",
|
|
1348
|
-
"node"
|
|
1349
|
-
];
|
|
1350
|
-
const license = "MIT";
|
|
1351
|
-
const main = "index.js";
|
|
1352
|
-
const name = "axios";
|
|
1353
|
-
const repository = {
|
|
1354
|
-
type: "git",
|
|
1355
|
-
url: "git+https://github.com/axios/axios.git"
|
|
1356
|
-
};
|
|
1357
|
-
const scripts = {
|
|
1358
|
-
build: "NODE_ENV=production grunt build",
|
|
1359
|
-
coveralls: "cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js",
|
|
1360
|
-
examples: "node ./examples/server.js",
|
|
1361
|
-
fix: "eslint --fix lib/**/*.js",
|
|
1362
|
-
postversion: "git push && git push --tags",
|
|
1363
|
-
preversion: "npm test",
|
|
1364
|
-
start: "node ./sandbox/server.js",
|
|
1365
|
-
test: "grunt test",
|
|
1366
|
-
version: "npm run build && grunt version && git add -A dist && git add CHANGELOG.md bower.json package.json"
|
|
1367
|
-
};
|
|
1368
|
-
const typings = "./index.d.ts";
|
|
1369
|
-
const unpkg = "dist/axios.min.js";
|
|
1370
|
-
const version = "0.21.4";
|
|
1371
|
-
const pkg = {
|
|
1372
|
-
_from: _from,
|
|
1373
|
-
_id: _id,
|
|
1374
|
-
_inBundle: _inBundle,
|
|
1375
|
-
_integrity: _integrity,
|
|
1376
|
-
_location: _location,
|
|
1377
|
-
_phantomChildren: _phantomChildren,
|
|
1378
|
-
_requested: _requested,
|
|
1379
|
-
_requiredBy: _requiredBy,
|
|
1380
|
-
_resolved: _resolved,
|
|
1381
|
-
_shasum: _shasum,
|
|
1382
|
-
_spec: _spec,
|
|
1383
|
-
_where: _where,
|
|
1384
|
-
author: author,
|
|
1385
|
-
browser: browser,
|
|
1386
|
-
bugs: bugs,
|
|
1387
|
-
bundleDependencies: bundleDependencies,
|
|
1388
|
-
bundlesize: bundlesize,
|
|
1389
|
-
dependencies: dependencies,
|
|
1390
|
-
deprecated: deprecated,
|
|
1391
|
-
description: description,
|
|
1392
|
-
devDependencies: devDependencies,
|
|
1393
|
-
homepage: homepage,
|
|
1394
|
-
jsdelivr: jsdelivr,
|
|
1395
|
-
keywords: keywords,
|
|
1396
|
-
license: license,
|
|
1397
|
-
main: main,
|
|
1398
|
-
name: name,
|
|
1399
|
-
repository: repository,
|
|
1400
|
-
scripts: scripts,
|
|
1401
|
-
typings: typings,
|
|
1402
|
-
unpkg: unpkg,
|
|
1403
|
-
version: version
|
|
1669
|
+
var data = {
|
|
1670
|
+
"version": "0.27.2"
|
|
1404
1671
|
};
|
|
1405
1672
|
|
|
1673
|
+
'use strict';
|
|
1674
|
+
|
|
1675
|
+
var VERSION = data.version;
|
|
1676
|
+
|
|
1677
|
+
|
|
1406
1678
|
var validators$1 = {};
|
|
1407
1679
|
|
|
1408
1680
|
// eslint-disable-next-line func-names
|
|
@@ -1413,48 +1685,29 @@ var validators$1 = {};
|
|
|
1413
1685
|
});
|
|
1414
1686
|
|
|
1415
1687
|
var deprecatedWarnings = {};
|
|
1416
|
-
var currentVerArr = pkg.version.split('.');
|
|
1417
|
-
|
|
1418
|
-
/**
|
|
1419
|
-
* Compare package versions
|
|
1420
|
-
* @param {string} version
|
|
1421
|
-
* @param {string?} thanVersion
|
|
1422
|
-
* @returns {boolean}
|
|
1423
|
-
*/
|
|
1424
|
-
function isOlderVersion(version, thanVersion) {
|
|
1425
|
-
var pkgVersionArr = thanVersion ? thanVersion.split('.') : currentVerArr;
|
|
1426
|
-
var destVer = version.split('.');
|
|
1427
|
-
for (var i = 0; i < 3; i++) {
|
|
1428
|
-
if (pkgVersionArr[i] > destVer[i]) {
|
|
1429
|
-
return true;
|
|
1430
|
-
} else if (pkgVersionArr[i] < destVer[i]) {
|
|
1431
|
-
return false;
|
|
1432
|
-
}
|
|
1433
|
-
}
|
|
1434
|
-
return false;
|
|
1435
|
-
}
|
|
1436
1688
|
|
|
1437
1689
|
/**
|
|
1438
1690
|
* Transitional option validator
|
|
1439
|
-
* @param {function|boolean?} validator
|
|
1440
|
-
* @param {string?} version
|
|
1441
|
-
* @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
|
|
1442
1694
|
* @returns {function}
|
|
1443
1695
|
*/
|
|
1444
1696
|
validators$1.transitional = function transitional(validator, version, message) {
|
|
1445
|
-
var isDeprecated = version && isOlderVersion(version);
|
|
1446
|
-
|
|
1447
1697
|
function formatMessage(opt, desc) {
|
|
1448
|
-
return '[Axios v' +
|
|
1698
|
+
return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
|
|
1449
1699
|
}
|
|
1450
1700
|
|
|
1451
1701
|
// eslint-disable-next-line func-names
|
|
1452
1702
|
return function(value, opt, opts) {
|
|
1453
1703
|
if (validator === false) {
|
|
1454
|
-
throw new
|
|
1704
|
+
throw new AxiosError_1(
|
|
1705
|
+
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
1706
|
+
AxiosError_1.ERR_DEPRECATED
|
|
1707
|
+
);
|
|
1455
1708
|
}
|
|
1456
1709
|
|
|
1457
|
-
if (
|
|
1710
|
+
if (version && !deprecatedWarnings[opt]) {
|
|
1458
1711
|
deprecatedWarnings[opt] = true;
|
|
1459
1712
|
// eslint-disable-next-line no-console
|
|
1460
1713
|
console.warn(
|
|
@@ -1478,7 +1731,7 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
1478
1731
|
|
|
1479
1732
|
function assertOptions(options, schema, allowUnknown) {
|
|
1480
1733
|
if (typeof options !== 'object') {
|
|
1481
|
-
throw new
|
|
1734
|
+
throw new AxiosError_1('options must be an object', AxiosError_1.ERR_BAD_OPTION_VALUE);
|
|
1482
1735
|
}
|
|
1483
1736
|
var keys = Object.keys(options);
|
|
1484
1737
|
var i = keys.length;
|
|
@@ -1489,22 +1742,31 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
1489
1742
|
var value = options[opt];
|
|
1490
1743
|
var result = value === undefined || validator(value, opt, options);
|
|
1491
1744
|
if (result !== true) {
|
|
1492
|
-
throw new
|
|
1745
|
+
throw new AxiosError_1('option ' + opt + ' must be ' + result, AxiosError_1.ERR_BAD_OPTION_VALUE);
|
|
1493
1746
|
}
|
|
1494
1747
|
continue;
|
|
1495
1748
|
}
|
|
1496
1749
|
if (allowUnknown !== true) {
|
|
1497
|
-
throw
|
|
1750
|
+
throw new AxiosError_1('Unknown option ' + opt, AxiosError_1.ERR_BAD_OPTION);
|
|
1498
1751
|
}
|
|
1499
1752
|
}
|
|
1500
1753
|
}
|
|
1501
1754
|
|
|
1502
1755
|
var validator = {
|
|
1503
|
-
isOlderVersion: isOlderVersion,
|
|
1504
1756
|
assertOptions: assertOptions,
|
|
1505
1757
|
validators: validators$1
|
|
1506
1758
|
};
|
|
1507
1759
|
|
|
1760
|
+
'use strict';
|
|
1761
|
+
|
|
1762
|
+
|
|
1763
|
+
|
|
1764
|
+
|
|
1765
|
+
|
|
1766
|
+
|
|
1767
|
+
|
|
1768
|
+
|
|
1769
|
+
|
|
1508
1770
|
var validators = validator.validators;
|
|
1509
1771
|
/**
|
|
1510
1772
|
* Create a new instance of Axios
|
|
@@ -1524,14 +1786,14 @@ function Axios(instanceConfig) {
|
|
|
1524
1786
|
*
|
|
1525
1787
|
* @param {Object} config The config specific for this request (merged with this.defaults)
|
|
1526
1788
|
*/
|
|
1527
|
-
Axios.prototype.request = function request(config) {
|
|
1789
|
+
Axios.prototype.request = function request(configOrUrl, config) {
|
|
1528
1790
|
/*eslint no-param-reassign:0*/
|
|
1529
1791
|
// Allow for axios('example/url'[, config]) a la fetch API
|
|
1530
|
-
if (typeof
|
|
1531
|
-
config = arguments[1] || {};
|
|
1532
|
-
config.url = arguments[0];
|
|
1533
|
-
} else {
|
|
1792
|
+
if (typeof configOrUrl === 'string') {
|
|
1534
1793
|
config = config || {};
|
|
1794
|
+
config.url = configOrUrl;
|
|
1795
|
+
} else {
|
|
1796
|
+
config = configOrUrl || {};
|
|
1535
1797
|
}
|
|
1536
1798
|
|
|
1537
1799
|
config = mergeConfig(this.defaults, config);
|
|
@@ -1549,9 +1811,9 @@ Axios.prototype.request = function request(config) {
|
|
|
1549
1811
|
|
|
1550
1812
|
if (transitional !== undefined) {
|
|
1551
1813
|
validator.assertOptions(transitional, {
|
|
1552
|
-
silentJSONParsing: validators.transitional(validators.boolean
|
|
1553
|
-
forcedJSONParsing: validators.transitional(validators.boolean
|
|
1554
|
-
clarifyTimeoutError: validators.transitional(validators.boolean
|
|
1814
|
+
silentJSONParsing: validators.transitional(validators.boolean),
|
|
1815
|
+
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
1816
|
+
clarifyTimeoutError: validators.transitional(validators.boolean)
|
|
1555
1817
|
}, false);
|
|
1556
1818
|
}
|
|
1557
1819
|
|
|
@@ -1617,7 +1879,8 @@ Axios.prototype.request = function request(config) {
|
|
|
1617
1879
|
|
|
1618
1880
|
Axios.prototype.getUri = function getUri(config) {
|
|
1619
1881
|
config = mergeConfig(this.defaults, config);
|
|
1620
|
-
|
|
1882
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
1883
|
+
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
1621
1884
|
};
|
|
1622
1885
|
|
|
1623
1886
|
// Provide aliases for supported request methods
|
|
@@ -1634,34 +1897,30 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
1634
1897
|
|
|
1635
1898
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
1636
1899
|
/*eslint func-names:0*/
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
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);
|
|
1644
1917
|
});
|
|
1645
1918
|
|
|
1646
1919
|
var Axios_1 = Axios;
|
|
1647
1920
|
|
|
1648
|
-
|
|
1649
|
-
* A `Cancel` is an object that is thrown when an operation is canceled.
|
|
1650
|
-
*
|
|
1651
|
-
* @class
|
|
1652
|
-
* @param {string=} message The message.
|
|
1653
|
-
*/
|
|
1654
|
-
function Cancel(message) {
|
|
1655
|
-
this.message = message;
|
|
1656
|
-
}
|
|
1657
|
-
|
|
1658
|
-
Cancel.prototype.toString = function toString() {
|
|
1659
|
-
return 'Cancel' + (this.message ? ': ' + this.message : '');
|
|
1660
|
-
};
|
|
1921
|
+
'use strict';
|
|
1661
1922
|
|
|
1662
|
-
Cancel.prototype.__CANCEL__ = true;
|
|
1663
1923
|
|
|
1664
|
-
var Cancel_1 = Cancel;
|
|
1665
1924
|
|
|
1666
1925
|
/**
|
|
1667
1926
|
* A `CancelToken` is an object that can be used to request cancellation of an operation.
|
|
@@ -1675,24 +1934,55 @@ function CancelToken(executor) {
|
|
|
1675
1934
|
}
|
|
1676
1935
|
|
|
1677
1936
|
var resolvePromise;
|
|
1937
|
+
|
|
1678
1938
|
this.promise = new Promise(function promiseExecutor(resolve) {
|
|
1679
1939
|
resolvePromise = resolve;
|
|
1680
1940
|
});
|
|
1681
1941
|
|
|
1682
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
|
+
|
|
1683
1973
|
executor(function cancel(message) {
|
|
1684
1974
|
if (token.reason) {
|
|
1685
1975
|
// Cancellation has already been requested
|
|
1686
1976
|
return;
|
|
1687
1977
|
}
|
|
1688
1978
|
|
|
1689
|
-
token.reason = new
|
|
1979
|
+
token.reason = new CanceledError_1(message);
|
|
1690
1980
|
resolvePromise(token.reason);
|
|
1691
1981
|
});
|
|
1692
1982
|
}
|
|
1693
1983
|
|
|
1694
1984
|
/**
|
|
1695
|
-
* Throws a `
|
|
1985
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1696
1986
|
*/
|
|
1697
1987
|
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
1698
1988
|
if (this.reason) {
|
|
@@ -1700,6 +1990,37 @@ CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
|
1700
1990
|
}
|
|
1701
1991
|
};
|
|
1702
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
|
+
|
|
1703
2024
|
/**
|
|
1704
2025
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1705
2026
|
* cancels the `CancelToken`.
|
|
@@ -1717,6 +2038,8 @@ CancelToken.source = function source() {
|
|
|
1717
2038
|
|
|
1718
2039
|
var CancelToken_1 = CancelToken;
|
|
1719
2040
|
|
|
2041
|
+
'use strict';
|
|
2042
|
+
|
|
1720
2043
|
/**
|
|
1721
2044
|
* Syntactic sugar for invoking a function and expanding an array for arguments.
|
|
1722
2045
|
*
|
|
@@ -1743,6 +2066,10 @@ var spread = function spread(callback) {
|
|
|
1743
2066
|
};
|
|
1744
2067
|
};
|
|
1745
2068
|
|
|
2069
|
+
'use strict';
|
|
2070
|
+
|
|
2071
|
+
|
|
2072
|
+
|
|
1746
2073
|
/**
|
|
1747
2074
|
* Determines whether the payload is an error thrown by Axios
|
|
1748
2075
|
*
|
|
@@ -1750,9 +2077,17 @@ var spread = function spread(callback) {
|
|
|
1750
2077
|
* @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
|
|
1751
2078
|
*/
|
|
1752
2079
|
var isAxiosError = function isAxiosError(payload) {
|
|
1753
|
-
return (
|
|
2080
|
+
return utils.isObject(payload) && (payload.isAxiosError === true);
|
|
1754
2081
|
};
|
|
1755
2082
|
|
|
2083
|
+
'use strict';
|
|
2084
|
+
|
|
2085
|
+
|
|
2086
|
+
|
|
2087
|
+
|
|
2088
|
+
|
|
2089
|
+
|
|
2090
|
+
|
|
1756
2091
|
/**
|
|
1757
2092
|
* Create an instance of Axios
|
|
1758
2093
|
*
|
|
@@ -1769,6 +2104,11 @@ function createInstance(defaultConfig) {
|
|
|
1769
2104
|
// Copy context to instance
|
|
1770
2105
|
utils.extend(instance, context);
|
|
1771
2106
|
|
|
2107
|
+
// Factory for creating new instances
|
|
2108
|
+
instance.create = function create(instanceConfig) {
|
|
2109
|
+
return createInstance(mergeConfig(defaultConfig, instanceConfig));
|
|
2110
|
+
};
|
|
2111
|
+
|
|
1772
2112
|
return instance;
|
|
1773
2113
|
}
|
|
1774
2114
|
|
|
@@ -1778,15 +2118,18 @@ var axios$1 = createInstance(defaults_1);
|
|
|
1778
2118
|
// Expose Axios class to allow class inheritance
|
|
1779
2119
|
axios$1.Axios = Axios_1;
|
|
1780
2120
|
|
|
1781
|
-
// Factory for creating new instances
|
|
1782
|
-
axios$1.create = function create(instanceConfig) {
|
|
1783
|
-
return createInstance(mergeConfig(axios$1.defaults, instanceConfig));
|
|
1784
|
-
};
|
|
1785
|
-
|
|
1786
2121
|
// Expose Cancel & CancelToken
|
|
1787
|
-
axios$1.
|
|
2122
|
+
axios$1.CanceledError = CanceledError_1;
|
|
1788
2123
|
axios$1.CancelToken = CancelToken_1;
|
|
1789
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;
|
|
1790
2133
|
|
|
1791
2134
|
// Expose all/spread
|
|
1792
2135
|
axios$1.all = function all(promises) {
|
|
@@ -1805,6 +2148,147 @@ axios_1.default = _default;
|
|
|
1805
2148
|
|
|
1806
2149
|
var axios = axios_1;
|
|
1807
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";
|
|
1808
2292
|
// This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
|
|
1809
2293
|
// an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
|
|
1810
2294
|
// (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
|
|
@@ -1858,23 +2342,20 @@ var globalThis_1 = (function () {
|
|
|
1858
2342
|
})();
|
|
1859
2343
|
|
|
1860
2344
|
/**
|
|
1861
|
-
* The Transport
|
|
1862
|
-
* 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.
|
|
1863
2348
|
*
|
|
1864
2349
|
* @module
|
|
1865
2350
|
*/
|
|
1866
|
-
var DEFAULTS = {
|
|
1867
|
-
baseURL: 'https://api.verdocs.com/',
|
|
1868
|
-
timeout: 6000,
|
|
1869
|
-
headers: { 'X-Client-ID': 'NONE' },
|
|
1870
|
-
};
|
|
1871
2351
|
// @credit https://derickbailey.com/2016/03/09/creating-a-true-singleton-in-node-js-with-es6-symbols/
|
|
1872
2352
|
// Also see globalThis for comments about why we're doing this in the first place.
|
|
1873
2353
|
var ENDPOINT_KEY = Symbol.for('verdocs-api-endpoint');
|
|
1874
2354
|
if (!globalThis_1[ENDPOINT_KEY]) {
|
|
1875
|
-
globalThis_1[ENDPOINT_KEY] =
|
|
2355
|
+
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
|
1876
2356
|
}
|
|
1877
|
-
var
|
|
2357
|
+
var globalEndpoint = globalThis_1[ENDPOINT_KEY];
|
|
2358
|
+
var activeEndpoint = globalEndpoint;
|
|
1878
2359
|
/**
|
|
1879
2360
|
* Helper to get the endpoint for direct access to HTTP functions.
|
|
1880
2361
|
*
|
|
@@ -1885,68 +2366,93 @@ var endpoint = globalThis_1[ENDPOINT_KEY];
|
|
|
1885
2366
|
* ```
|
|
1886
2367
|
*/
|
|
1887
2368
|
var getEndpoint = function () {
|
|
1888
|
-
return
|
|
2369
|
+
return activeEndpoint;
|
|
1889
2370
|
};
|
|
1890
|
-
|
|
1891
2371
|
/**
|
|
1892
|
-
*
|
|
1893
|
-
*
|
|
1894
|
-
*
|
|
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.
|
|
1895
2376
|
*
|
|
1896
|
-
*
|
|
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
|
+
* ```
|
|
1897
2385
|
*/
|
|
1898
|
-
var
|
|
1899
|
-
|
|
1900
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1901
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1902
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1903
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
1904
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1905
|
-
});
|
|
2386
|
+
var setActiveEndpoint = function (e) {
|
|
2387
|
+
activeEndpoint = e || globalEndpoint;
|
|
1906
2388
|
};
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1923
|
-
|
|
1924
|
-
|
|
1925
|
-
|
|
1926
|
-
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
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);
|
|
1932
2423
|
}
|
|
2424
|
+
return result;
|
|
1933
2425
|
};
|
|
1934
2426
|
/**
|
|
1935
|
-
*
|
|
1936
|
-
*
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
*
|
|
1941
|
-
*
|
|
1942
|
-
*
|
|
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.
|
|
1943
2437
|
*/
|
|
1944
|
-
var
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
1948
|
-
|
|
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
|
+
}
|
|
1949
2454
|
});
|
|
1950
|
-
|
|
2455
|
+
return decoded;
|
|
2456
|
+
};
|
|
1951
2457
|
|
|
1952
|
-
|
|
2458
|
+
export { VerdocsEndpoint as V, decodeAccessTokenBody as d, getEndpoint as g, setActiveEndpoint as s };
|