@verdocs/web-sdk 1.2.0 → 1.4.6
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/dist/cjs/{Auth-0ba9a04b.js → Auth-e68977a3.js} +23 -1
- package/dist/cjs/{Token-1ea6d834.js → Token-1ec62bd3.js} +424 -159
- package/dist/cjs/buffer-es6-bc8199b1.js +2018 -0
- package/dist/cjs/{index-01e27102.js → index-589f3be8.js} +78 -9
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/cjs/popper-71bf3058.js +1790 -0
- package/dist/cjs/verdocs-auth.cjs.entry.js +8 -12
- package/dist/cjs/verdocs-button_2.cjs.entry.js +16 -10
- package/dist/cjs/verdocs-dropdown_12.cjs.entry.js +36 -1819
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +81 -0
- package/dist/cjs/verdocs-loader.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-search-activity_2.cjs.entry.js +26 -8
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-search.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-sign.cjs.entry.js +15 -19
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +7529 -0
- package/dist/cjs/verdocs-template-card.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-toggle.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-web-sdk.cjs.js +3 -3
- package/dist/collection/collection-manifest.json +4 -3
- package/dist/collection/components/controls/verdocs-button/verdocs-button.css +110 -34
- package/dist/collection/components/controls/verdocs-button/verdocs-button.js +84 -13
- package/dist/collection/components/controls/verdocs-button/verdocs-button.stories.js +41 -2
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.css +7 -10
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -15
- package/dist/collection/components/controls/verdocs-loader/verdocs-loader.js +3 -0
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.css +4 -6
- 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/controls/verdocs-template-card/verdocs-template-card.css +5 -7
- package/dist/collection/components/controls/verdocs-template-tags/verdocs-template-tags.css +5 -7
- package/dist/collection/components/controls/verdocs-text-input/verdocs-text-input.css +4 -6
- package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.css +4 -6
- package/dist/collection/components/controls/verdocs-toggle/verdocs-toggle.stories.js +1 -1
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.css +3 -4
- 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 +3 -4
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.css +5 -6
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +2 -2
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.css +3 -4
- package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.css +2 -4
- package/dist/collection/components/elements/verdocs-field-attachment/verdocs-field-attachment.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.css +1 -3
- package/dist/collection/components/elements/verdocs-field-checkbox-group/verdocs-field-checkbox.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.css +1 -3
- package/dist/collection/components/elements/verdocs-field-date/verdocs-field-date.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.css +1 -3
- package/dist/collection/components/elements/verdocs-field-dropdown/verdocs-field-dropdown.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.css +1 -3
- package/dist/collection/components/elements/verdocs-field-initial/verdocs-field-initial.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.css +1 -3
- package/dist/collection/components/elements/verdocs-field-payment/verdocs-field-payment.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.css +1 -3
- package/dist/collection/components/elements/verdocs-field-radio-button-group/verdocs-field-radio-button.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.css +1 -3
- package/dist/collection/components/elements/verdocs-field-signature/verdocs-field-signature.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.css +1 -3
- package/dist/collection/components/elements/verdocs-field-textarea/verdocs-field-textarea.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.css +1 -3
- package/dist/collection/components/elements/verdocs-field-textbox/verdocs-field-textbox.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.css +1 -3
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.css +1 -3
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.css +1 -3
- package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.stories.js +1 -1
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.css +1 -0
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.stories.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +3 -5
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +7 -9
- package/dist/collection/components/embeds/verdocs-search/verdocs-search.css +2 -4
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +2 -3
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +2 -5
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +2 -2
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.css +1 -3
- package/dist/{esm/Auth-16761ea6.js → components/Auth.js} +23 -2
- package/dist/{esm/Token-b82a8ea3.js → components/Token.js} +423 -158
- package/dist/{cjs/buffer-es6-ce0cdd81.js → components/buffer-es6.js} +38 -2
- package/dist/components/index.d.ts +53 -0
- package/dist/components/index.js +33 -0
- package/dist/components/popper.js +1788 -0
- package/dist/components/verdocs-auth.d.ts +11 -0
- package/dist/components/verdocs-auth.js +152 -0
- package/dist/components/verdocs-button.d.ts +11 -0
- package/dist/components/verdocs-button.js +6 -0
- package/dist/components/verdocs-button2.js +67 -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 +2775 -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 +193 -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 +628 -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 +7550 -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/{custom-elements/index.js → components/verdocs-view2.js} +32 -10997
- package/dist/docs.d.ts +3 -0
- package/dist/docs.json +408 -61
- package/dist/esm/Auth-b330f209.js +85 -0
- package/dist/esm/Token-a587e3ad.js +2325 -0
- package/dist/esm/{buffer-es6-681a33da.js → buffer-es6-136673c8.js} +39 -1
- package/dist/esm/{index-ade0ef1e.js → index-859bc689.js} +78 -10
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/esm/popper-93ecb064.js +1788 -0
- package/dist/esm/verdocs-auth.entry.js +8 -12
- package/dist/esm/verdocs-button_2.entry.js +16 -10
- package/dist/esm/verdocs-dropdown_12.entry.js +28 -1811
- package/dist/esm/verdocs-initial-dialog.entry.js +3 -3
- package/dist/esm/verdocs-kba-dialog.entry.js +77 -0
- package/dist/esm/verdocs-loader.entry.js +2 -2
- package/dist/esm/verdocs-ok-dialog.entry.js +3 -3
- package/dist/esm/verdocs-organization-card.entry.js +3 -3
- package/dist/esm/verdocs-quick-functions.entry.js +3 -3
- package/dist/esm/verdocs-search-activity_2.entry.js +26 -8
- package/dist/esm/verdocs-search-tabs.entry.js +3 -3
- package/dist/esm/verdocs-search.entry.js +3 -3
- package/dist/esm/verdocs-sign.entry.js +15 -19
- package/dist/esm/verdocs-signature-dialog.entry.js +4 -4
- package/dist/esm/verdocs-status-indicator.entry.js +7525 -0
- package/dist/esm/verdocs-template-card.entry.js +3 -3
- package/dist/esm/verdocs-template-tags.entry.js +3 -3
- package/dist/esm/verdocs-toggle.entry.js +3 -3
- package/dist/esm/verdocs-upload-dialog.entry.js +3 -3
- package/dist/esm/verdocs-web-sdk.js +3 -3
- package/dist/esm-es5/Auth-b330f209.js +1 -0
- package/dist/esm-es5/Token-a587e3ad.js +1 -0
- package/dist/esm-es5/{buffer-es6-681a33da.js → buffer-es6-136673c8.js} +2 -2
- package/dist/esm-es5/index-859bc689.js +2 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/popper-93ecb064.js +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_12.entry.js +2 -2
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -0
- package/dist/esm-es5/verdocs-loader.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-activity_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-button/verdocs-button.d.ts +26 -6
- package/dist/types/components/controls/verdocs-button/verdocs-button.stories.d.ts +4 -1
- package/dist/types/components/controls/verdocs-dropdown/verdocs-dropdown.d.ts +0 -14
- package/dist/types/components/controls/verdocs-loader/verdocs-loader.d.ts +3 -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-document-status/verdocs-document-status.stories.d.ts → verdocs-status-indicator/verdocs-status-indicator.stories.d.ts} +4 -1
- 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/embeds/verdocs-auth/verdocs-auth.d.ts +4 -2
- package/dist/types/components.d.ts +307 -74
- package/dist/verdocs-web-sdk/p-0353c423.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0b1fb53f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0c30002e.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cfb1cad1.system.entry.js → p-144e0842.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-15b7ed4d.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a0fcbe6e.system.entry.js → p-1f55d8ac.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-203fd748.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-216a4759.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2bc58746.js +2 -0
- package/dist/verdocs-web-sdk/p-2c161242.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3820c9a2.js +1 -0
- package/dist/verdocs-web-sdk/p-39633a02.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-432c3151.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-4368df79.system.entry.js +23 -0
- package/dist/verdocs-web-sdk/p-4c66f794.js +1 -0
- package/dist/verdocs-web-sdk/p-5dfd73f9.system.js +7 -0
- package/dist/verdocs-web-sdk/p-6348272c.js +1 -0
- package/dist/verdocs-web-sdk/p-6393b2b4.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-66b19637.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6802ef91.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6fa6fb3c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-829b235c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-88a300c5.system.js +1 -0
- package/dist/verdocs-web-sdk/p-9428614b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-96c0bf40.system.js +1 -0
- package/dist/verdocs-web-sdk/p-9b34c794.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9d8d8c78.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a1143ddb.entry.js +23 -0
- package/dist/verdocs-web-sdk/p-bf2620cb.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c2f97ef9.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-caed7818.system.js +2 -0
- package/dist/verdocs-web-sdk/p-cc127684.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cd6a2c40.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d14a6057.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d6206c17.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-da667373.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-da850d97.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e2e643c5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e3659c64.system.js +1 -0
- package/dist/verdocs-web-sdk/p-e719f9ca.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e93ac86f.system.js +1 -0
- package/dist/verdocs-web-sdk/p-ed5baeb4.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ef932a87.js +1 -0
- package/dist/verdocs-web-sdk/p-f0d0f959.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f0e6fde0.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f4219236.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f7e26fbd.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f814d5cc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fd853e54.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +2 -1
- package/package.json +34 -31
- package/dist/cjs/index-4bf5cc66.js +0 -46
- package/dist/cjs/verdocs-document-status.cjs.entry.js +0 -54
- package/dist/collection/components/controls/verdocs-document-status/check.svg +0 -3
- package/dist/collection/components/controls/verdocs-document-status/pending.svg +0 -1
- package/dist/collection/components/controls/verdocs-document-status/stop.svg +0 -1
- package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.css +0 -18
- package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.js +0 -70
- package/dist/collection/components/controls/verdocs-document-status/verdocs-document-status.stories.js +0 -15
- package/dist/collection/components/controls/verdocs-document-status/x.svg +0 -1
- package/dist/custom-elements/index.d.ts +0 -225
- package/dist/esm/index-2b1938ea.js +0 -39
- package/dist/esm/verdocs-document-status.entry.js +0 -50
- package/dist/esm-es5/Auth-16761ea6.js +0 -1
- package/dist/esm-es5/Token-b82a8ea3.js +0 -1
- package/dist/esm-es5/index-2b1938ea.js +0 -1
- package/dist/esm-es5/index-ade0ef1e.js +0 -1
- package/dist/esm-es5/verdocs-document-status.entry.js +0 -1
- package/dist/types/components/controls/verdocs-document-status/verdocs-document-status.d.ts +0 -11
- package/dist/verdocs-web-sdk/p-063c4c71.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-10e7c953.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-183c7338.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-25a138c4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-28b3017f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-29abe078.js +0 -1
- package/dist/verdocs-web-sdk/p-2ec1d8d8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3ced6e3a.system.js +0 -1
- package/dist/verdocs-web-sdk/p-41383ebc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-44b75396.system.js +0 -1
- package/dist/verdocs-web-sdk/p-48b73707.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4bfe13e6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-556f577f.system.js +0 -1
- package/dist/verdocs-web-sdk/p-6e95da9d.js +0 -1
- package/dist/verdocs-web-sdk/p-6ef8ca10.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-72ebb6e3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-817302a8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8a1b9ad0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-91f87fa8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-95880bac.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9e0a07a7.js +0 -1
- package/dist/verdocs-web-sdk/p-ae37b970.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b3c30059.system.js +0 -1
- package/dist/verdocs-web-sdk/p-b567001f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b8f5af91.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bc61d0ce.entry.js +0 -23
- package/dist/verdocs-web-sdk/p-c4add613.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ccad2089.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cec7e9ea.js +0 -1
- package/dist/verdocs-web-sdk/p-d3a4e22e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d3ae5318.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d9474f48.system.js +0 -7
- package/dist/verdocs-web-sdk/p-dc1f3572.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dcf25d2c.system.entry.js +0 -23
- package/dist/verdocs-web-sdk/p-df4ae522.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e0091c19.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e1887a75.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e9f5d6a6.js +0 -1
- package/dist/verdocs-web-sdk/p-ee14709c.system.js +0 -1
- package/dist/verdocs-web-sdk/p-efffddab.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f0d20c75.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f35c796c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f5109d69.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f6938563.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fa8ae849.entry.js +0 -1
|
@@ -1,58 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
// This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
|
|
6
|
-
// an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
|
|
7
|
-
// (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
|
|
8
|
-
// tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
|
|
9
|
-
// StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
|
|
10
|
-
// when those Components load js-sdk they get a separate instance. Without messy options like having to
|
|
11
|
-
// pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
|
|
12
|
-
// have no way to access authenticated sessions unless we make the Endpoint a true global.
|
|
13
|
-
//
|
|
14
|
-
// @credit https://github.com/medikoo/es5-ext/blob/master/global.js
|
|
15
|
-
// @credit https://mathiasbynens.be/notes/globalthis
|
|
16
|
-
var naiveFallback = function () {
|
|
17
|
-
if (typeof self === 'object' && self)
|
|
18
|
-
return self;
|
|
19
|
-
if (typeof window === 'object' && window)
|
|
20
|
-
return window;
|
|
21
|
-
throw new Error('Unable to resolve global `this`');
|
|
22
|
-
};
|
|
23
|
-
var globalThis_1 = (function () {
|
|
24
|
-
if (this)
|
|
25
|
-
return this;
|
|
26
|
-
// Unexpected strict mode (may happen if e.g. bundled into ESM module)
|
|
27
|
-
// Fallback to standard globalThis if available
|
|
28
|
-
if (typeof globalThis === 'object' && globalThis)
|
|
29
|
-
return globalThis;
|
|
30
|
-
// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
|
|
31
|
-
// In all ES5+ engines global object inherits from Object.prototype
|
|
32
|
-
// (if you approached one that doesn't please report)
|
|
33
|
-
try {
|
|
34
|
-
Object.defineProperty(Object.prototype, '__global__', {
|
|
35
|
-
get: function () {
|
|
36
|
-
return this;
|
|
37
|
-
},
|
|
38
|
-
configurable: true,
|
|
39
|
-
});
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
// Unfortunate case of updates to Object.prototype being restricted
|
|
43
|
-
// via preventExtensions, seal or freeze
|
|
44
|
-
return naiveFallback();
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
// Safari case (window.__global__ works, but __global__ does not)
|
|
48
|
-
if (!__global__)
|
|
49
|
-
return naiveFallback();
|
|
50
|
-
return __global__;
|
|
51
|
-
}
|
|
52
|
-
finally {
|
|
53
|
-
delete Object.prototype.__global__;
|
|
54
|
-
}
|
|
55
|
-
})();
|
|
3
|
+
const bufferEs6 = require('./buffer-es6-bc8199b1.js');
|
|
56
4
|
|
|
57
5
|
var bind = function bind(fn, thisArg) {
|
|
58
6
|
return function wrap() {
|
|
@@ -68,6 +16,22 @@ var bind = function bind(fn, thisArg) {
|
|
|
68
16
|
|
|
69
17
|
var toString = Object.prototype.toString;
|
|
70
18
|
|
|
19
|
+
// eslint-disable-next-line func-names
|
|
20
|
+
var kindOf = (function(cache) {
|
|
21
|
+
// eslint-disable-next-line func-names
|
|
22
|
+
return function(thing) {
|
|
23
|
+
var str = toString.call(thing);
|
|
24
|
+
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
25
|
+
};
|
|
26
|
+
})(Object.create(null));
|
|
27
|
+
|
|
28
|
+
function kindOfTest(type) {
|
|
29
|
+
type = type.toLowerCase();
|
|
30
|
+
return function isKindOf(thing) {
|
|
31
|
+
return kindOf(thing) === type;
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
71
35
|
/**
|
|
72
36
|
* Determine if a value is an Array
|
|
73
37
|
*
|
|
@@ -102,22 +66,12 @@ function isBuffer(val) {
|
|
|
102
66
|
/**
|
|
103
67
|
* Determine if a value is an ArrayBuffer
|
|
104
68
|
*
|
|
69
|
+
* @function
|
|
105
70
|
* @param {Object} val The value to test
|
|
106
71
|
* @returns {boolean} True if value is an ArrayBuffer, otherwise false
|
|
107
72
|
*/
|
|
108
|
-
|
|
109
|
-
return toString.call(val) === '[object ArrayBuffer]';
|
|
110
|
-
}
|
|
73
|
+
var isArrayBuffer = kindOfTest('ArrayBuffer');
|
|
111
74
|
|
|
112
|
-
/**
|
|
113
|
-
* Determine if a value is a FormData
|
|
114
|
-
*
|
|
115
|
-
* @param {Object} val The value to test
|
|
116
|
-
* @returns {boolean} True if value is an FormData, otherwise false
|
|
117
|
-
*/
|
|
118
|
-
function isFormData(val) {
|
|
119
|
-
return toString.call(val) === '[object FormData]';
|
|
120
|
-
}
|
|
121
75
|
|
|
122
76
|
/**
|
|
123
77
|
* Determine if a value is a view on an ArrayBuffer
|
|
@@ -172,7 +126,7 @@ function isObject(val) {
|
|
|
172
126
|
* @return {boolean} True if value is a plain Object, otherwise false
|
|
173
127
|
*/
|
|
174
128
|
function isPlainObject(val) {
|
|
175
|
-
if (
|
|
129
|
+
if (kindOf(val) !== 'object') {
|
|
176
130
|
return false;
|
|
177
131
|
}
|
|
178
132
|
|
|
@@ -183,32 +137,38 @@ function isPlainObject(val) {
|
|
|
183
137
|
/**
|
|
184
138
|
* Determine if a value is a Date
|
|
185
139
|
*
|
|
140
|
+
* @function
|
|
186
141
|
* @param {Object} val The value to test
|
|
187
142
|
* @returns {boolean} True if value is a Date, otherwise false
|
|
188
143
|
*/
|
|
189
|
-
|
|
190
|
-
return toString.call(val) === '[object Date]';
|
|
191
|
-
}
|
|
144
|
+
var isDate = kindOfTest('Date');
|
|
192
145
|
|
|
193
146
|
/**
|
|
194
147
|
* Determine if a value is a File
|
|
195
148
|
*
|
|
149
|
+
* @function
|
|
196
150
|
* @param {Object} val The value to test
|
|
197
151
|
* @returns {boolean} True if value is a File, otherwise false
|
|
198
152
|
*/
|
|
199
|
-
|
|
200
|
-
return toString.call(val) === '[object File]';
|
|
201
|
-
}
|
|
153
|
+
var isFile = kindOfTest('File');
|
|
202
154
|
|
|
203
155
|
/**
|
|
204
156
|
* Determine if a value is a Blob
|
|
205
157
|
*
|
|
158
|
+
* @function
|
|
206
159
|
* @param {Object} val The value to test
|
|
207
160
|
* @returns {boolean} True if value is a Blob, otherwise false
|
|
208
161
|
*/
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
162
|
+
var isBlob = kindOfTest('Blob');
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Determine if a value is a FileList
|
|
166
|
+
*
|
|
167
|
+
* @function
|
|
168
|
+
* @param {Object} val The value to test
|
|
169
|
+
* @returns {boolean} True if value is a File, otherwise false
|
|
170
|
+
*/
|
|
171
|
+
var isFileList = kindOfTest('FileList');
|
|
212
172
|
|
|
213
173
|
/**
|
|
214
174
|
* Determine if a value is a Function
|
|
@@ -231,14 +191,27 @@ function isStream(val) {
|
|
|
231
191
|
}
|
|
232
192
|
|
|
233
193
|
/**
|
|
234
|
-
* Determine if a value is a
|
|
194
|
+
* Determine if a value is a FormData
|
|
235
195
|
*
|
|
196
|
+
* @param {Object} thing The value to test
|
|
197
|
+
* @returns {boolean} True if value is an FormData, otherwise false
|
|
198
|
+
*/
|
|
199
|
+
function isFormData(thing) {
|
|
200
|
+
var pattern = '[object FormData]';
|
|
201
|
+
return thing && (
|
|
202
|
+
(typeof FormData === 'function' && thing instanceof FormData) ||
|
|
203
|
+
toString.call(thing) === pattern ||
|
|
204
|
+
(isFunction(thing.toString) && thing.toString() === pattern)
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
/**
|
|
209
|
+
* Determine if a value is a URLSearchParams object
|
|
210
|
+
* @function
|
|
236
211
|
* @param {Object} val The value to test
|
|
237
212
|
* @returns {boolean} True if value is a URLSearchParams object, otherwise false
|
|
238
213
|
*/
|
|
239
|
-
|
|
240
|
-
return toString.call(val) === '[object URLSearchParams]';
|
|
241
|
-
}
|
|
214
|
+
var isURLSearchParams = kindOfTest('URLSearchParams');
|
|
242
215
|
|
|
243
216
|
/**
|
|
244
217
|
* Trim excess whitespace off the beginning and end of a string
|
|
@@ -385,6 +358,94 @@ function stripBOM(content) {
|
|
|
385
358
|
return content;
|
|
386
359
|
}
|
|
387
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Inherit the prototype methods from one constructor into another
|
|
363
|
+
* @param {function} constructor
|
|
364
|
+
* @param {function} superConstructor
|
|
365
|
+
* @param {object} [props]
|
|
366
|
+
* @param {object} [descriptors]
|
|
367
|
+
*/
|
|
368
|
+
|
|
369
|
+
function inherits(constructor, superConstructor, props, descriptors) {
|
|
370
|
+
constructor.prototype = Object.create(superConstructor.prototype, descriptors);
|
|
371
|
+
constructor.prototype.constructor = constructor;
|
|
372
|
+
props && Object.assign(constructor.prototype, props);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
/**
|
|
376
|
+
* Resolve object with deep prototype chain to a flat object
|
|
377
|
+
* @param {Object} sourceObj source object
|
|
378
|
+
* @param {Object} [destObj]
|
|
379
|
+
* @param {Function} [filter]
|
|
380
|
+
* @returns {Object}
|
|
381
|
+
*/
|
|
382
|
+
|
|
383
|
+
function toFlatObject(sourceObj, destObj, filter) {
|
|
384
|
+
var props;
|
|
385
|
+
var i;
|
|
386
|
+
var prop;
|
|
387
|
+
var merged = {};
|
|
388
|
+
|
|
389
|
+
destObj = destObj || {};
|
|
390
|
+
|
|
391
|
+
do {
|
|
392
|
+
props = Object.getOwnPropertyNames(sourceObj);
|
|
393
|
+
i = props.length;
|
|
394
|
+
while (i-- > 0) {
|
|
395
|
+
prop = props[i];
|
|
396
|
+
if (!merged[prop]) {
|
|
397
|
+
destObj[prop] = sourceObj[prop];
|
|
398
|
+
merged[prop] = true;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
sourceObj = Object.getPrototypeOf(sourceObj);
|
|
402
|
+
} while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);
|
|
403
|
+
|
|
404
|
+
return destObj;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/*
|
|
408
|
+
* determines whether a string ends with the characters of a specified string
|
|
409
|
+
* @param {String} str
|
|
410
|
+
* @param {String} searchString
|
|
411
|
+
* @param {Number} [position= 0]
|
|
412
|
+
* @returns {boolean}
|
|
413
|
+
*/
|
|
414
|
+
function endsWith(str, searchString, position) {
|
|
415
|
+
str = String(str);
|
|
416
|
+
if (position === undefined || position > str.length) {
|
|
417
|
+
position = str.length;
|
|
418
|
+
}
|
|
419
|
+
position -= searchString.length;
|
|
420
|
+
var lastIndex = str.indexOf(searchString, position);
|
|
421
|
+
return lastIndex !== -1 && lastIndex === position;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* Returns new array from array like object
|
|
427
|
+
* @param {*} [thing]
|
|
428
|
+
* @returns {Array}
|
|
429
|
+
*/
|
|
430
|
+
function toArray(thing) {
|
|
431
|
+
if (!thing) return null;
|
|
432
|
+
var i = thing.length;
|
|
433
|
+
if (isUndefined(i)) return null;
|
|
434
|
+
var arr = new Array(i);
|
|
435
|
+
while (i-- > 0) {
|
|
436
|
+
arr[i] = thing[i];
|
|
437
|
+
}
|
|
438
|
+
return arr;
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
// eslint-disable-next-line func-names
|
|
442
|
+
var isTypedArray = (function(TypedArray) {
|
|
443
|
+
// eslint-disable-next-line func-names
|
|
444
|
+
return function(thing) {
|
|
445
|
+
return TypedArray && thing instanceof TypedArray;
|
|
446
|
+
};
|
|
447
|
+
})(typeof Uint8Array !== 'undefined' && Object.getPrototypeOf(Uint8Array));
|
|
448
|
+
|
|
388
449
|
var utils = {
|
|
389
450
|
isArray: isArray,
|
|
390
451
|
isArrayBuffer: isArrayBuffer,
|
|
@@ -407,7 +468,15 @@ var utils = {
|
|
|
407
468
|
merge: merge,
|
|
408
469
|
extend: extend,
|
|
409
470
|
trim: trim,
|
|
410
|
-
stripBOM: stripBOM
|
|
471
|
+
stripBOM: stripBOM,
|
|
472
|
+
inherits: inherits,
|
|
473
|
+
toFlatObject: toFlatObject,
|
|
474
|
+
kindOf: kindOf,
|
|
475
|
+
kindOfTest: kindOfTest,
|
|
476
|
+
endsWith: endsWith,
|
|
477
|
+
toArray: toArray,
|
|
478
|
+
isTypedArray: isTypedArray,
|
|
479
|
+
isFileList: isFileList
|
|
411
480
|
};
|
|
412
481
|
|
|
413
482
|
function encode(val) {
|
|
@@ -538,26 +607,27 @@ var normalizeHeaderName = function normalizeHeaderName(headers, normalizedName)
|
|
|
538
607
|
};
|
|
539
608
|
|
|
540
609
|
/**
|
|
541
|
-
*
|
|
610
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
542
611
|
*
|
|
543
|
-
* @param {
|
|
544
|
-
* @param {Object} config The config.
|
|
612
|
+
* @param {string} message The error message.
|
|
545
613
|
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
614
|
+
* @param {Object} [config] The config.
|
|
546
615
|
* @param {Object} [request] The request.
|
|
547
616
|
* @param {Object} [response] The response.
|
|
548
|
-
* @returns {Error} The error.
|
|
617
|
+
* @returns {Error} The created error.
|
|
549
618
|
*/
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
619
|
+
function AxiosError(message, code, config, request, response) {
|
|
620
|
+
Error.call(this);
|
|
621
|
+
this.message = message;
|
|
622
|
+
this.name = 'AxiosError';
|
|
623
|
+
code && (this.code = code);
|
|
624
|
+
config && (this.config = config);
|
|
625
|
+
request && (this.request = request);
|
|
626
|
+
response && (this.response = response);
|
|
627
|
+
}
|
|
559
628
|
|
|
560
|
-
|
|
629
|
+
utils.inherits(AxiosError, Error, {
|
|
630
|
+
toJSON: function toJSON() {
|
|
561
631
|
return {
|
|
562
632
|
// Standard
|
|
563
633
|
message: this.message,
|
|
@@ -575,25 +645,125 @@ var enhanceError = function enhanceError(error, config, code, request, response)
|
|
|
575
645
|
code: this.code,
|
|
576
646
|
status: this.response && this.response.status ? this.response.status : null
|
|
577
647
|
};
|
|
578
|
-
}
|
|
579
|
-
|
|
648
|
+
}
|
|
649
|
+
});
|
|
650
|
+
|
|
651
|
+
var prototype = AxiosError.prototype;
|
|
652
|
+
var descriptors = {};
|
|
653
|
+
|
|
654
|
+
[
|
|
655
|
+
'ERR_BAD_OPTION_VALUE',
|
|
656
|
+
'ERR_BAD_OPTION',
|
|
657
|
+
'ECONNABORTED',
|
|
658
|
+
'ETIMEDOUT',
|
|
659
|
+
'ERR_NETWORK',
|
|
660
|
+
'ERR_FR_TOO_MANY_REDIRECTS',
|
|
661
|
+
'ERR_DEPRECATED',
|
|
662
|
+
'ERR_BAD_RESPONSE',
|
|
663
|
+
'ERR_BAD_REQUEST',
|
|
664
|
+
'ERR_CANCELED'
|
|
665
|
+
// eslint-disable-next-line func-names
|
|
666
|
+
].forEach(function(code) {
|
|
667
|
+
descriptors[code] = {value: code};
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
Object.defineProperties(AxiosError, descriptors);
|
|
671
|
+
Object.defineProperty(prototype, 'isAxiosError', {value: true});
|
|
672
|
+
|
|
673
|
+
// eslint-disable-next-line func-names
|
|
674
|
+
AxiosError.from = function(error, code, config, request, response, customProps) {
|
|
675
|
+
var axiosError = Object.create(prototype);
|
|
676
|
+
|
|
677
|
+
utils.toFlatObject(error, axiosError, function filter(obj) {
|
|
678
|
+
return obj !== Error.prototype;
|
|
679
|
+
});
|
|
680
|
+
|
|
681
|
+
AxiosError.call(axiosError, error.message, code, config, request, response);
|
|
682
|
+
|
|
683
|
+
axiosError.name = error.name;
|
|
684
|
+
|
|
685
|
+
customProps && Object.assign(axiosError, customProps);
|
|
686
|
+
|
|
687
|
+
return axiosError;
|
|
580
688
|
};
|
|
581
689
|
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
* @param {Object} [request] The request.
|
|
589
|
-
* @param {Object} [response] The response.
|
|
590
|
-
* @returns {Error} The created error.
|
|
591
|
-
*/
|
|
592
|
-
var createError = function createError(message, config, code, request, response) {
|
|
593
|
-
var error = new Error(message);
|
|
594
|
-
return enhanceError(error, config, code, request, response);
|
|
690
|
+
var AxiosError_1 = AxiosError;
|
|
691
|
+
|
|
692
|
+
var transitional = {
|
|
693
|
+
silentJSONParsing: true,
|
|
694
|
+
forcedJSONParsing: true,
|
|
695
|
+
clarifyTimeoutError: false
|
|
595
696
|
};
|
|
596
697
|
|
|
698
|
+
/**
|
|
699
|
+
* Convert a data object to FormData
|
|
700
|
+
* @param {Object} obj
|
|
701
|
+
* @param {?Object} [formData]
|
|
702
|
+
* @returns {Object}
|
|
703
|
+
**/
|
|
704
|
+
|
|
705
|
+
function toFormData(obj, formData) {
|
|
706
|
+
// eslint-disable-next-line no-param-reassign
|
|
707
|
+
formData = formData || new FormData();
|
|
708
|
+
|
|
709
|
+
var stack = [];
|
|
710
|
+
|
|
711
|
+
function convertValue(value) {
|
|
712
|
+
if (value === null) return '';
|
|
713
|
+
|
|
714
|
+
if (utils.isDate(value)) {
|
|
715
|
+
return value.toISOString();
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {
|
|
719
|
+
return typeof Blob === 'function' ? new Blob([value]) : bufferEs6.Buffer.from(value);
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
return value;
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function build(data, parentKey) {
|
|
726
|
+
if (utils.isPlainObject(data) || utils.isArray(data)) {
|
|
727
|
+
if (stack.indexOf(data) !== -1) {
|
|
728
|
+
throw Error('Circular reference detected in ' + parentKey);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
stack.push(data);
|
|
732
|
+
|
|
733
|
+
utils.forEach(data, function each(value, key) {
|
|
734
|
+
if (utils.isUndefined(value)) return;
|
|
735
|
+
var fullKey = parentKey ? parentKey + '.' + key : key;
|
|
736
|
+
var arr;
|
|
737
|
+
|
|
738
|
+
if (value && !parentKey && typeof value === 'object') {
|
|
739
|
+
if (utils.endsWith(key, '{}')) {
|
|
740
|
+
// eslint-disable-next-line no-param-reassign
|
|
741
|
+
value = JSON.stringify(value);
|
|
742
|
+
} else if (utils.endsWith(key, '[]') && (arr = utils.toArray(value))) {
|
|
743
|
+
// eslint-disable-next-line func-names
|
|
744
|
+
arr.forEach(function(el) {
|
|
745
|
+
!utils.isUndefined(el) && formData.append(fullKey, convertValue(el));
|
|
746
|
+
});
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
build(value, fullKey);
|
|
752
|
+
});
|
|
753
|
+
|
|
754
|
+
stack.pop();
|
|
755
|
+
} else {
|
|
756
|
+
formData.append(parentKey, convertValue(data));
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
|
|
760
|
+
build(obj);
|
|
761
|
+
|
|
762
|
+
return formData;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
var toFormData_1 = toFormData;
|
|
766
|
+
|
|
597
767
|
/**
|
|
598
768
|
* Resolve or reject a Promise based on response status.
|
|
599
769
|
*
|
|
@@ -606,10 +776,10 @@ var settle = function settle(resolve, reject, response) {
|
|
|
606
776
|
if (!response.status || !validateStatus || validateStatus(response.status)) {
|
|
607
777
|
resolve(response);
|
|
608
778
|
} else {
|
|
609
|
-
reject(
|
|
779
|
+
reject(new AxiosError_1(
|
|
610
780
|
'Request failed with status code ' + response.status,
|
|
781
|
+
[AxiosError_1.ERR_BAD_REQUEST, AxiosError_1.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],
|
|
611
782
|
response.config,
|
|
612
|
-
null,
|
|
613
783
|
response.request,
|
|
614
784
|
response
|
|
615
785
|
));
|
|
@@ -824,22 +994,27 @@ var isURLSameOrigin = (
|
|
|
824
994
|
);
|
|
825
995
|
|
|
826
996
|
/**
|
|
827
|
-
* A `
|
|
997
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
828
998
|
*
|
|
829
999
|
* @class
|
|
830
1000
|
* @param {string=} message The message.
|
|
831
1001
|
*/
|
|
832
|
-
function
|
|
833
|
-
|
|
1002
|
+
function CanceledError(message) {
|
|
1003
|
+
// eslint-disable-next-line no-eq-null,eqeqeq
|
|
1004
|
+
AxiosError_1.call(this, message == null ? 'canceled' : message, AxiosError_1.ERR_CANCELED);
|
|
1005
|
+
this.name = 'CanceledError';
|
|
834
1006
|
}
|
|
835
1007
|
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
};
|
|
1008
|
+
utils.inherits(CanceledError, AxiosError_1, {
|
|
1009
|
+
__CANCEL__: true
|
|
1010
|
+
});
|
|
839
1011
|
|
|
840
|
-
|
|
1012
|
+
var CanceledError_1 = CanceledError;
|
|
841
1013
|
|
|
842
|
-
var
|
|
1014
|
+
var parseProtocol = function parseProtocol(url) {
|
|
1015
|
+
var match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
|
1016
|
+
return match && match[1] || '';
|
|
1017
|
+
};
|
|
843
1018
|
|
|
844
1019
|
var xhr = function xhrAdapter(config) {
|
|
845
1020
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -857,7 +1032,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
857
1032
|
}
|
|
858
1033
|
}
|
|
859
1034
|
|
|
860
|
-
if (utils.isFormData(requestData)) {
|
|
1035
|
+
if (utils.isFormData(requestData) && utils.isStandardBrowserEnv()) {
|
|
861
1036
|
delete requestHeaders['Content-Type']; // Let the browser set it
|
|
862
1037
|
}
|
|
863
1038
|
|
|
@@ -871,6 +1046,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
871
1046
|
}
|
|
872
1047
|
|
|
873
1048
|
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
1049
|
+
|
|
874
1050
|
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
|
875
1051
|
|
|
876
1052
|
// Set the request timeout in MS
|
|
@@ -934,7 +1110,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
934
1110
|
return;
|
|
935
1111
|
}
|
|
936
1112
|
|
|
937
|
-
reject(
|
|
1113
|
+
reject(new AxiosError_1('Request aborted', AxiosError_1.ECONNABORTED, config, request));
|
|
938
1114
|
|
|
939
1115
|
// Clean up request
|
|
940
1116
|
request = null;
|
|
@@ -944,7 +1120,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
944
1120
|
request.onerror = function handleError() {
|
|
945
1121
|
// Real errors are hidden from us by the browser
|
|
946
1122
|
// onerror should only fire if it's a network error
|
|
947
|
-
reject(
|
|
1123
|
+
reject(new AxiosError_1('Network Error', AxiosError_1.ERR_NETWORK, config, request, request));
|
|
948
1124
|
|
|
949
1125
|
// Clean up request
|
|
950
1126
|
request = null;
|
|
@@ -953,14 +1129,14 @@ var xhr = function xhrAdapter(config) {
|
|
|
953
1129
|
// Handle timeout
|
|
954
1130
|
request.ontimeout = function handleTimeout() {
|
|
955
1131
|
var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
|
|
956
|
-
var transitional = config.transitional ||
|
|
1132
|
+
var transitional$1 = config.transitional || transitional;
|
|
957
1133
|
if (config.timeoutErrorMessage) {
|
|
958
1134
|
timeoutErrorMessage = config.timeoutErrorMessage;
|
|
959
1135
|
}
|
|
960
|
-
reject(
|
|
1136
|
+
reject(new AxiosError_1(
|
|
961
1137
|
timeoutErrorMessage,
|
|
1138
|
+
transitional$1.clarifyTimeoutError ? AxiosError_1.ETIMEDOUT : AxiosError_1.ECONNABORTED,
|
|
962
1139
|
config,
|
|
963
|
-
transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
|
|
964
1140
|
request));
|
|
965
1141
|
|
|
966
1142
|
// Clean up request
|
|
@@ -1021,7 +1197,7 @@ var xhr = function xhrAdapter(config) {
|
|
|
1021
1197
|
if (!request) {
|
|
1022
1198
|
return;
|
|
1023
1199
|
}
|
|
1024
|
-
reject(!cancel || (cancel && cancel.type) ? new
|
|
1200
|
+
reject(!cancel || (cancel && cancel.type) ? new CanceledError_1() : cancel);
|
|
1025
1201
|
request.abort();
|
|
1026
1202
|
request = null;
|
|
1027
1203
|
};
|
|
@@ -1036,11 +1212,22 @@ var xhr = function xhrAdapter(config) {
|
|
|
1036
1212
|
requestData = null;
|
|
1037
1213
|
}
|
|
1038
1214
|
|
|
1215
|
+
var protocol = parseProtocol(fullPath);
|
|
1216
|
+
|
|
1217
|
+
if (protocol && [ 'http', 'https', 'file' ].indexOf(protocol) === -1) {
|
|
1218
|
+
reject(new AxiosError_1('Unsupported protocol ' + protocol + ':', AxiosError_1.ERR_BAD_REQUEST, config));
|
|
1219
|
+
return;
|
|
1220
|
+
}
|
|
1221
|
+
|
|
1222
|
+
|
|
1039
1223
|
// Send the request
|
|
1040
1224
|
request.send(requestData);
|
|
1041
1225
|
});
|
|
1042
1226
|
};
|
|
1043
1227
|
|
|
1228
|
+
// eslint-disable-next-line strict
|
|
1229
|
+
var _null = null;
|
|
1230
|
+
|
|
1044
1231
|
var DEFAULT_CONTENT_TYPE = {
|
|
1045
1232
|
'Content-Type': 'application/x-www-form-urlencoded'
|
|
1046
1233
|
};
|
|
@@ -1056,7 +1243,7 @@ function getDefaultAdapter() {
|
|
|
1056
1243
|
if (typeof XMLHttpRequest !== 'undefined') {
|
|
1057
1244
|
// For browsers use XHR adapter
|
|
1058
1245
|
adapter = xhr;
|
|
1059
|
-
} else if (typeof
|
|
1246
|
+
} else if (typeof bufferEs6.process_1 !== 'undefined' && Object.prototype.toString.call(bufferEs6.process_1) === '[object process]') {
|
|
1060
1247
|
// For node use HTTP adapter
|
|
1061
1248
|
adapter = xhr;
|
|
1062
1249
|
}
|
|
@@ -1080,11 +1267,7 @@ function stringifySafely(rawValue, parser, encoder) {
|
|
|
1080
1267
|
|
|
1081
1268
|
var defaults = {
|
|
1082
1269
|
|
|
1083
|
-
transitional:
|
|
1084
|
-
silentJSONParsing: true,
|
|
1085
|
-
forcedJSONParsing: true,
|
|
1086
|
-
clarifyTimeoutError: false
|
|
1087
|
-
},
|
|
1270
|
+
transitional: transitional,
|
|
1088
1271
|
|
|
1089
1272
|
adapter: getDefaultAdapter(),
|
|
1090
1273
|
|
|
@@ -1108,10 +1291,20 @@ var defaults = {
|
|
|
1108
1291
|
setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
|
|
1109
1292
|
return data.toString();
|
|
1110
1293
|
}
|
|
1111
|
-
|
|
1294
|
+
|
|
1295
|
+
var isObjectPayload = utils.isObject(data);
|
|
1296
|
+
var contentType = headers && headers['Content-Type'];
|
|
1297
|
+
|
|
1298
|
+
var isFileList;
|
|
1299
|
+
|
|
1300
|
+
if ((isFileList = utils.isFileList(data)) || (isObjectPayload && contentType === 'multipart/form-data')) {
|
|
1301
|
+
var _FormData = this.env && this.env.FormData;
|
|
1302
|
+
return toFormData_1(isFileList ? {'files[]': data} : data, _FormData && new _FormData());
|
|
1303
|
+
} else if (isObjectPayload || contentType === 'application/json') {
|
|
1112
1304
|
setContentTypeIfUnset(headers, 'application/json');
|
|
1113
1305
|
return stringifySafely(data);
|
|
1114
1306
|
}
|
|
1307
|
+
|
|
1115
1308
|
return data;
|
|
1116
1309
|
}],
|
|
1117
1310
|
|
|
@@ -1127,7 +1320,7 @@ var defaults = {
|
|
|
1127
1320
|
} catch (e) {
|
|
1128
1321
|
if (strictJSONParsing) {
|
|
1129
1322
|
if (e.name === 'SyntaxError') {
|
|
1130
|
-
throw
|
|
1323
|
+
throw AxiosError_1.from(e, AxiosError_1.ERR_BAD_RESPONSE, this, null, this.response);
|
|
1131
1324
|
}
|
|
1132
1325
|
throw e;
|
|
1133
1326
|
}
|
|
@@ -1149,6 +1342,10 @@ var defaults = {
|
|
|
1149
1342
|
maxContentLength: -1,
|
|
1150
1343
|
maxBodyLength: -1,
|
|
1151
1344
|
|
|
1345
|
+
env: {
|
|
1346
|
+
FormData: _null
|
|
1347
|
+
},
|
|
1348
|
+
|
|
1152
1349
|
validateStatus: function validateStatus(status) {
|
|
1153
1350
|
return status >= 200 && status < 300;
|
|
1154
1351
|
},
|
|
@@ -1193,7 +1390,7 @@ var isCancel = function isCancel(value) {
|
|
|
1193
1390
|
};
|
|
1194
1391
|
|
|
1195
1392
|
/**
|
|
1196
|
-
* Throws a `
|
|
1393
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1197
1394
|
*/
|
|
1198
1395
|
function throwIfCancellationRequested(config) {
|
|
1199
1396
|
if (config.cancelToken) {
|
|
@@ -1201,7 +1398,7 @@ function throwIfCancellationRequested(config) {
|
|
|
1201
1398
|
}
|
|
1202
1399
|
|
|
1203
1400
|
if (config.signal && config.signal.aborted) {
|
|
1204
|
-
throw new
|
|
1401
|
+
throw new CanceledError_1();
|
|
1205
1402
|
}
|
|
1206
1403
|
}
|
|
1207
1404
|
|
|
@@ -1350,6 +1547,7 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1350
1547
|
'decompress': defaultToConfig2,
|
|
1351
1548
|
'maxContentLength': defaultToConfig2,
|
|
1352
1549
|
'maxBodyLength': defaultToConfig2,
|
|
1550
|
+
'beforeRedirect': defaultToConfig2,
|
|
1353
1551
|
'transport': defaultToConfig2,
|
|
1354
1552
|
'httpAgent': defaultToConfig2,
|
|
1355
1553
|
'httpsAgent': defaultToConfig2,
|
|
@@ -1369,11 +1567,12 @@ var mergeConfig = function mergeConfig(config1, config2) {
|
|
|
1369
1567
|
};
|
|
1370
1568
|
|
|
1371
1569
|
var data = {
|
|
1372
|
-
"version": "0.
|
|
1570
|
+
"version": "0.27.2"
|
|
1373
1571
|
};
|
|
1374
1572
|
|
|
1375
1573
|
var VERSION = data.version;
|
|
1376
1574
|
|
|
1575
|
+
|
|
1377
1576
|
var validators$1 = {};
|
|
1378
1577
|
|
|
1379
1578
|
// eslint-disable-next-line func-names
|
|
@@ -1400,7 +1599,10 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
1400
1599
|
// eslint-disable-next-line func-names
|
|
1401
1600
|
return function(value, opt, opts) {
|
|
1402
1601
|
if (validator === false) {
|
|
1403
|
-
throw new
|
|
1602
|
+
throw new AxiosError_1(
|
|
1603
|
+
formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),
|
|
1604
|
+
AxiosError_1.ERR_DEPRECATED
|
|
1605
|
+
);
|
|
1404
1606
|
}
|
|
1405
1607
|
|
|
1406
1608
|
if (version && !deprecatedWarnings[opt]) {
|
|
@@ -1427,7 +1629,7 @@ validators$1.transitional = function transitional(validator, version, message) {
|
|
|
1427
1629
|
|
|
1428
1630
|
function assertOptions(options, schema, allowUnknown) {
|
|
1429
1631
|
if (typeof options !== 'object') {
|
|
1430
|
-
throw new
|
|
1632
|
+
throw new AxiosError_1('options must be an object', AxiosError_1.ERR_BAD_OPTION_VALUE);
|
|
1431
1633
|
}
|
|
1432
1634
|
var keys = Object.keys(options);
|
|
1433
1635
|
var i = keys.length;
|
|
@@ -1438,12 +1640,12 @@ function assertOptions(options, schema, allowUnknown) {
|
|
|
1438
1640
|
var value = options[opt];
|
|
1439
1641
|
var result = value === undefined || validator(value, opt, options);
|
|
1440
1642
|
if (result !== true) {
|
|
1441
|
-
throw new
|
|
1643
|
+
throw new AxiosError_1('option ' + opt + ' must be ' + result, AxiosError_1.ERR_BAD_OPTION_VALUE);
|
|
1442
1644
|
}
|
|
1443
1645
|
continue;
|
|
1444
1646
|
}
|
|
1445
1647
|
if (allowUnknown !== true) {
|
|
1446
|
-
throw
|
|
1648
|
+
throw new AxiosError_1('Unknown option ' + opt, AxiosError_1.ERR_BAD_OPTION);
|
|
1447
1649
|
}
|
|
1448
1650
|
}
|
|
1449
1651
|
}
|
|
@@ -1482,10 +1684,6 @@ Axios.prototype.request = function request(configOrUrl, config) {
|
|
|
1482
1684
|
config = configOrUrl || {};
|
|
1483
1685
|
}
|
|
1484
1686
|
|
|
1485
|
-
if (!config.url) {
|
|
1486
|
-
throw new Error('Provided config url is not valid');
|
|
1487
|
-
}
|
|
1488
|
-
|
|
1489
1687
|
config = mergeConfig(this.defaults, config);
|
|
1490
1688
|
|
|
1491
1689
|
// Set config.method
|
|
@@ -1568,11 +1766,9 @@ Axios.prototype.request = function request(configOrUrl, config) {
|
|
|
1568
1766
|
};
|
|
1569
1767
|
|
|
1570
1768
|
Axios.prototype.getUri = function getUri(config) {
|
|
1571
|
-
if (!config.url) {
|
|
1572
|
-
throw new Error('Provided config url is not valid');
|
|
1573
|
-
}
|
|
1574
1769
|
config = mergeConfig(this.defaults, config);
|
|
1575
|
-
|
|
1770
|
+
var fullPath = buildFullPath(config.baseURL, config.url);
|
|
1771
|
+
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
1576
1772
|
};
|
|
1577
1773
|
|
|
1578
1774
|
// Provide aliases for supported request methods
|
|
@@ -1589,13 +1785,23 @@ utils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData
|
|
|
1589
1785
|
|
|
1590
1786
|
utils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
|
|
1591
1787
|
/*eslint func-names:0*/
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1788
|
+
|
|
1789
|
+
function generateHTTPMethod(isForm) {
|
|
1790
|
+
return function httpMethod(url, data, config) {
|
|
1791
|
+
return this.request(mergeConfig(config || {}, {
|
|
1792
|
+
method: method,
|
|
1793
|
+
headers: isForm ? {
|
|
1794
|
+
'Content-Type': 'multipart/form-data'
|
|
1795
|
+
} : {},
|
|
1796
|
+
url: url,
|
|
1797
|
+
data: data
|
|
1798
|
+
}));
|
|
1799
|
+
};
|
|
1800
|
+
}
|
|
1801
|
+
|
|
1802
|
+
Axios.prototype[method] = generateHTTPMethod();
|
|
1803
|
+
|
|
1804
|
+
Axios.prototype[method + 'Form'] = generateHTTPMethod(true);
|
|
1599
1805
|
});
|
|
1600
1806
|
|
|
1601
1807
|
var Axios_1 = Axios;
|
|
@@ -1654,13 +1860,13 @@ function CancelToken(executor) {
|
|
|
1654
1860
|
return;
|
|
1655
1861
|
}
|
|
1656
1862
|
|
|
1657
|
-
token.reason = new
|
|
1863
|
+
token.reason = new CanceledError_1(message);
|
|
1658
1864
|
resolvePromise(token.reason);
|
|
1659
1865
|
});
|
|
1660
1866
|
}
|
|
1661
1867
|
|
|
1662
1868
|
/**
|
|
1663
|
-
* Throws a `
|
|
1869
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
1664
1870
|
*/
|
|
1665
1871
|
CancelToken.prototype.throwIfRequested = function throwIfRequested() {
|
|
1666
1872
|
if (this.reason) {
|
|
@@ -1783,10 +1989,17 @@ var axios$1 = createInstance(defaults_1);
|
|
|
1783
1989
|
axios$1.Axios = Axios_1;
|
|
1784
1990
|
|
|
1785
1991
|
// Expose Cancel & CancelToken
|
|
1786
|
-
axios$1.
|
|
1992
|
+
axios$1.CanceledError = CanceledError_1;
|
|
1787
1993
|
axios$1.CancelToken = CancelToken_1;
|
|
1788
1994
|
axios$1.isCancel = isCancel;
|
|
1789
1995
|
axios$1.VERSION = data.version;
|
|
1996
|
+
axios$1.toFormData = toFormData_1;
|
|
1997
|
+
|
|
1998
|
+
// Expose AxiosError class
|
|
1999
|
+
axios$1.AxiosError = AxiosError_1;
|
|
2000
|
+
|
|
2001
|
+
// alias for CanceledError for backward compatibility
|
|
2002
|
+
axios$1.Cancel = axios$1.CanceledError;
|
|
1790
2003
|
|
|
1791
2004
|
// Expose all/spread
|
|
1792
2005
|
axios$1.all = function all(promises) {
|
|
@@ -1945,6 +2158,58 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
|
1945
2158
|
return VerdocsEndpoint;
|
|
1946
2159
|
}());
|
|
1947
2160
|
|
|
2161
|
+
// This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
|
|
2162
|
+
// an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
|
|
2163
|
+
// (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
|
|
2164
|
+
// tokens only need to be tracked in one place). The trouble is, one of those libraries is based on
|
|
2165
|
+
// StencilJS and is compiling its modules into Web Components. Because of how module resolution works,
|
|
2166
|
+
// when those Components load js-sdk they get a separate instance. Without messy options like having to
|
|
2167
|
+
// pass raw data from the caller to each Component, or pass around references to a common Endpoint, they
|
|
2168
|
+
// have no way to access authenticated sessions unless we make the Endpoint a true global.
|
|
2169
|
+
//
|
|
2170
|
+
// @credit https://github.com/medikoo/es5-ext/blob/master/global.js
|
|
2171
|
+
// @credit https://mathiasbynens.be/notes/globalthis
|
|
2172
|
+
var naiveFallback = function () {
|
|
2173
|
+
if (typeof self === 'object' && self)
|
|
2174
|
+
return self;
|
|
2175
|
+
if (typeof window === 'object' && window)
|
|
2176
|
+
return window;
|
|
2177
|
+
throw new Error('Unable to resolve global `this`');
|
|
2178
|
+
};
|
|
2179
|
+
var globalThis_1 = (function () {
|
|
2180
|
+
if (this)
|
|
2181
|
+
return this;
|
|
2182
|
+
// Unexpected strict mode (may happen if e.g. bundled into ESM module)
|
|
2183
|
+
// Fallback to standard globalThis if available
|
|
2184
|
+
if (typeof globalThis === 'object' && globalThis)
|
|
2185
|
+
return globalThis;
|
|
2186
|
+
// Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
|
|
2187
|
+
// In all ES5+ engines global object inherits from Object.prototype
|
|
2188
|
+
// (if you approached one that doesn't please report)
|
|
2189
|
+
try {
|
|
2190
|
+
Object.defineProperty(Object.prototype, '__global__', {
|
|
2191
|
+
get: function () {
|
|
2192
|
+
return this;
|
|
2193
|
+
},
|
|
2194
|
+
configurable: true,
|
|
2195
|
+
});
|
|
2196
|
+
}
|
|
2197
|
+
catch (error) {
|
|
2198
|
+
// Unfortunate case of updates to Object.prototype being restricted
|
|
2199
|
+
// via preventExtensions, seal or freeze
|
|
2200
|
+
return naiveFallback();
|
|
2201
|
+
}
|
|
2202
|
+
try {
|
|
2203
|
+
// Safari case (window.__global__ works, but __global__ does not)
|
|
2204
|
+
if (!__global__)
|
|
2205
|
+
return naiveFallback();
|
|
2206
|
+
return __global__;
|
|
2207
|
+
}
|
|
2208
|
+
finally {
|
|
2209
|
+
delete Object.prototype.__global__;
|
|
2210
|
+
}
|
|
2211
|
+
})();
|
|
2212
|
+
|
|
1948
2213
|
/**
|
|
1949
2214
|
* The Transport is a global singleton used to call Verdocs APIs. There can only be one Transport per application, and
|
|
1950
2215
|
* its configuration settings are shared for all callers. This is a simplified form of the Endpoint class where most
|