@verdocs/web-sdk 1.2.0 → 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/dist/cjs/Auth-0146ddd8.js +161 -0
- package/dist/cjs/{Token-1ea6d834.js → Token-b86e5335.js} +554 -156
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/{buffer-es6-ce0cdd81.js → buffer-es6-b2c1c885.js} +13 -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-4bf5cc66.js → index-c4be37e1.js} +9 -1
- 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 +201 -9
- 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 +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 +2 -2
- package/dist/cjs/{verdocs-search-activity_2.cjs.entry.js → verdocs-search-activity.cjs.entry.js} +116 -63
- package/dist/cjs/verdocs-search-box.cjs.entry.js +60 -0
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-search.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-sign.cjs.entry.js +1523 -19
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +4 -4
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +7615 -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-text-input.cjs.entry.js +62 -0
- 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-dropdown_12.cjs.entry.js → verdocs-view.cjs.entry.js} +52 -5098
- package/dist/cjs/verdocs-web-sdk.cjs.js +117 -5
- 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 +85 -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 +1 -2
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.css +1 -2
- 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 +1 -2
- 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.stories.js +1 -1
- 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.stories.js +1 -1
- 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.stories.js +1 -1
- 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.stories.js +1 -1
- 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.stories.js +1 -1
- 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.stories.js +1 -1
- 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.stories.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +3 -5
- 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/components/Auth.js +157 -0
- package/dist/{esm/Token-b82a8ea3.js → components/Token.js} +554 -156
- package/dist/{esm/buffer-es6-681a33da.js → components/buffer-es6.js} +13 -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/components/index3.js +1974 -0
- package/dist/{esm/index-2b1938ea.js → components/index4.js} +10 -2
- 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/{custom-elements/index.js → components/verdocs-view2.js} +63 -11001
- package/dist/custom-elements.json +830 -0
- package/dist/docs.d.ts +3 -0
- package/dist/docs.json +407 -60
- package/dist/esm/Auth-4b21fced.js +157 -0
- package/dist/esm/Token-29eea56d.js +2458 -0
- 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/index-432c65a6.js +1974 -0
- 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 +198 -6
- 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 +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 +2 -2
- package/dist/esm/{verdocs-search-activity_2.entry.js → verdocs-search-activity.entry.js} +117 -63
- package/dist/esm/verdocs-search-box.entry.js +56 -0
- package/dist/esm/verdocs-search-tabs.entry.js +2 -2
- package/dist/esm/verdocs-search.entry.js +3 -3
- package/dist/esm/verdocs-sign.entry.js +1523 -19
- package/dist/esm/verdocs-signature-dialog.entry.js +4 -4
- package/dist/esm/verdocs-status-indicator.entry.js +7611 -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-text-input.entry.js +58 -0
- package/dist/esm/verdocs-toggle.entry.js +3 -3
- package/dist/esm/verdocs-upload-dialog.entry.js +3 -3
- package/dist/esm/{verdocs-dropdown_12.entry.js → verdocs-view.entry.js} +36 -5071
- 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 -1
- 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 -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.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 -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 +11 -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-text-input.entry.js +1 -0
- 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-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 +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.d.ts +307 -74
- package/dist/verdocs-web-sdk/Auth-4b21fced.js +157 -0
- package/dist/verdocs-web-sdk/Auth-82e38539.system.js +1 -0
- package/dist/verdocs-web-sdk/Token-29eea56d.js +2458 -0
- 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 +34 -31
- package/dist/cjs/Auth-0ba9a04b.js +0 -68
- package/dist/cjs/index-01e27102.js +0 -1287
- package/dist/cjs/verdocs-button_2.cjs.entry.js +0 -98
- 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/Auth-16761ea6.js +0 -64
- package/dist/esm/index-ade0ef1e.js +0 -1259
- package/dist/esm/verdocs-button_2.entry.js +0 -93
- 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/buffer-es6-681a33da.js +0 -7
- package/dist/esm-es5/index-2b1938ea.js +0 -1
- package/dist/esm-es5/index-ade0ef1e.js +0 -1
- package/dist/esm-es5/verdocs-button_2.entry.js +0 -1
- package/dist/esm-es5/verdocs-document-status.entry.js +0 -1
- package/dist/esm-es5/verdocs-dropdown_12.entry.js +0 -23
- package/dist/esm-es5/verdocs-search-activity_2.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-a0fcbe6e.system.entry.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-cfb1cad1.system.entry.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
|
@@ -9,11 +9,19 @@ function createCommonjsModule(fn, basedir, module) {
|
|
|
9
9
|
path: basedir,
|
|
10
10
|
exports: {},
|
|
11
11
|
require: function (path, base) {
|
|
12
|
-
return commonjsRequire();
|
|
12
|
+
return commonjsRequire(path, (base === undefined || base === null) ? module.path : base);
|
|
13
13
|
}
|
|
14
14
|
}, fn(module, module.exports), module.exports;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
function getDefaultExportFromNamespaceIfPresent (n) {
|
|
18
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') ? n['default'] : n;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function getDefaultExportFromNamespaceIfNotNamed (n) {
|
|
22
|
+
return n && Object.prototype.hasOwnProperty.call(n, 'default') && Object.keys(n).length === 1 ? n['default'] : n;
|
|
23
|
+
}
|
|
24
|
+
|
|
17
25
|
function getAugmentedNamespace(n) {
|
|
18
26
|
if (n.__esModule) return n;
|
|
19
27
|
var a = Object.defineProperty({}, '__esModule', {value: true});
|
|
@@ -36,4 +44,4 @@ function commonjsRequire () {
|
|
|
36
44
|
// for now just expose the builtin process global from node.js
|
|
37
45
|
var process_1 = commonjsGlobal.process;
|
|
38
46
|
|
|
39
|
-
export {
|
|
47
|
+
export { commonjsGlobal as a, commonjsRequire as b, createCommonjsModule as c, getDefaultExportFromCjs as d, getAugmentedNamespace as g, process_1 as p };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface VerdocsAuth extends Components.VerdocsAuth, HTMLElement {}
|
|
4
|
+
export const VerdocsAuth: {
|
|
5
|
+
prototype: VerdocsAuth;
|
|
6
|
+
new (): VerdocsAuth;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { l as loadSession, a as authenticateUser, s as setSession } from './Auth.js';
|
|
3
|
+
import { g as getEndpoint, V as VerdocsEndpoint, s as setActiveEndpoint } from './Token.js';
|
|
4
|
+
import './index2.js';
|
|
5
|
+
import { d as defineCustomElement$4 } from './verdocs-button2.js';
|
|
6
|
+
import { d as defineCustomElement$3 } from './verdocs-ok-dialog2.js';
|
|
7
|
+
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
|
8
|
+
|
|
9
|
+
// TODO
|
|
10
|
+
|
|
11
|
+
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
12
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
13
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
14
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
15
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
16
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
17
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
21
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
22
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
23
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
24
|
+
function step(op) {
|
|
25
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
26
|
+
while (_) try {
|
|
27
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
28
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
29
|
+
switch (op[0]) {
|
|
30
|
+
case 0: case 1: t = op; break;
|
|
31
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
32
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
33
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
34
|
+
default:
|
|
35
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
36
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
37
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
38
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
39
|
+
if (t[2]) _.ops.pop();
|
|
40
|
+
_.trys.pop(); continue;
|
|
41
|
+
}
|
|
42
|
+
op = body.call(thisArg, _);
|
|
43
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
44
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
var getNotifications = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
48
|
+
return __generator(this, function (_a) {
|
|
49
|
+
return [2 /*return*/, getEndpoint()
|
|
50
|
+
.api.get('/notifications')
|
|
51
|
+
.then(function (r) { return r.data; })];
|
|
52
|
+
});
|
|
53
|
+
}); };
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
|
57
|
+
*
|
|
58
|
+
* ```typescript
|
|
59
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
60
|
+
*
|
|
61
|
+
* const profiles = await Profiles.getProfiles()
|
|
62
|
+
* ```
|
|
63
|
+
*/
|
|
64
|
+
var getProfiles = function () {
|
|
65
|
+
return getEndpoint()
|
|
66
|
+
.api.get('/profiles')
|
|
67
|
+
.then(function (r) { return r.data; });
|
|
68
|
+
};
|
|
69
|
+
/**
|
|
70
|
+
* Get a list of system roles.
|
|
71
|
+
*
|
|
72
|
+
* ```typescript
|
|
73
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
74
|
+
*
|
|
75
|
+
* const roles = await Profiles.getRoles();
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
var getRoles = function () {
|
|
79
|
+
return getEndpoint()
|
|
80
|
+
.api.get('/roles')
|
|
81
|
+
.then(function (r) { return r.data; });
|
|
82
|
+
};
|
|
83
|
+
/**
|
|
84
|
+
* Get a list of system roles.
|
|
85
|
+
*
|
|
86
|
+
* ```typescript
|
|
87
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
88
|
+
*
|
|
89
|
+
* const permissions = await Profiles.getPermissions();
|
|
90
|
+
* ```
|
|
91
|
+
*/
|
|
92
|
+
var getPermissions = function () {
|
|
93
|
+
return getEndpoint()
|
|
94
|
+
.api.get('/permissions')
|
|
95
|
+
.then(function (r) { return r.data; });
|
|
96
|
+
};
|
|
97
|
+
/**
|
|
98
|
+
* Create a profile. If the caller does not have a "current" profile set, the new profile will be made current.
|
|
99
|
+
*
|
|
100
|
+
* ```typescript
|
|
101
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
102
|
+
*
|
|
103
|
+
* const newProfile = await Profiles.createProfile({ first_name: 'FIRST', last_name: 'LAST', email: 'EMAIL' });
|
|
104
|
+
* ```
|
|
105
|
+
*/
|
|
106
|
+
var createProfile = function (params) {
|
|
107
|
+
return getEndpoint()
|
|
108
|
+
.api.post('/profiles', params)
|
|
109
|
+
.then(function (r) { return r.data; });
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* Get a profile. The caller must have admin access to the given profile.
|
|
113
|
+
* TODO: Add a "public" profile endpoint for public pages
|
|
114
|
+
*
|
|
115
|
+
* ```typescript
|
|
116
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
117
|
+
*
|
|
118
|
+
* const profile = await Profiles.getProfile('PROFILEID');
|
|
119
|
+
* ```
|
|
120
|
+
*/
|
|
121
|
+
var getProfile = function (profileId) {
|
|
122
|
+
return getEndpoint()
|
|
123
|
+
.api.get("/profiles/".concat(profileId))
|
|
124
|
+
.then(function (r) { return r.data; });
|
|
125
|
+
};
|
|
126
|
+
/**
|
|
127
|
+
* Get a profile's permissions. The caller must have admin access to the given profile.
|
|
128
|
+
*
|
|
129
|
+
* ```typescript
|
|
130
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
131
|
+
*
|
|
132
|
+
* const permissions = await Profiles.getProfilePermissions('PROFILEID');
|
|
133
|
+
* ```
|
|
134
|
+
*/
|
|
135
|
+
var getProfilePermissions = function (profileId) {
|
|
136
|
+
return getEndpoint()
|
|
137
|
+
.api.get("/profiles/".concat(profileId, "/permissions"))
|
|
138
|
+
.then(function (r) { return r.data; });
|
|
139
|
+
};
|
|
140
|
+
/**
|
|
141
|
+
* Get a profile's groups.
|
|
142
|
+
*
|
|
143
|
+
* ```typescript
|
|
144
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
145
|
+
*
|
|
146
|
+
* const groups = await Profiles.getProfileGroups('PROFILEID');
|
|
147
|
+
* ```
|
|
148
|
+
*/
|
|
149
|
+
var getProfileGroups = function (profileId) {
|
|
150
|
+
return getEndpoint()
|
|
151
|
+
.api.get("/profiles/".concat(profileId, "/groups"))
|
|
152
|
+
.then(function (r) { return r.data; });
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Switch the caller's "current" profile. The current profile is used for permissions checking and profile_id field settings
|
|
156
|
+
* for most operations in Verdocs. It is important to select the appropropriate profile before calling other API functions.
|
|
157
|
+
*
|
|
158
|
+
* ```typescript
|
|
159
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
160
|
+
*
|
|
161
|
+
* const newProfile = await Profiles.switchProfile('PROFILEID');
|
|
162
|
+
* ```
|
|
163
|
+
*/
|
|
164
|
+
var switchProfile = function (profileId) {
|
|
165
|
+
return getEndpoint()
|
|
166
|
+
.api.post("/profiles/".concat(profileId, "/switch"))
|
|
167
|
+
.then(function (r) { return r.data; });
|
|
168
|
+
};
|
|
169
|
+
/**
|
|
170
|
+
* Update a profile. For future expansion, the profile ID to update is required, but currently this must also be the
|
|
171
|
+
* "current" profile for the caller.
|
|
172
|
+
*
|
|
173
|
+
* ```typescript
|
|
174
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
175
|
+
*
|
|
176
|
+
* const newProfile = await Profiles.updateProfile('PROFILEID');
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
var updateProfile = function (profileId, params) {
|
|
180
|
+
return getEndpoint()
|
|
181
|
+
.api.put("/profiles/".concat(profileId), params)
|
|
182
|
+
.then(function (r) { return r.data; });
|
|
183
|
+
};
|
|
184
|
+
/**
|
|
185
|
+
* Delete a profile. If the requested profile is the caller's curent profile, the next available profile will be selected.
|
|
186
|
+
*
|
|
187
|
+
* ```typescript
|
|
188
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
|
189
|
+
*
|
|
190
|
+
* await Profiles.deleteProfile('PROFILEID');
|
|
191
|
+
* ```
|
|
192
|
+
*/
|
|
193
|
+
var deleteProfile = function (profileId) {
|
|
194
|
+
return getEndpoint()
|
|
195
|
+
.api.delete("/profiles/".concat(profileId))
|
|
196
|
+
.then(function (r) { return r.data; });
|
|
197
|
+
};
|
|
198
|
+
|
|
199
|
+
const verdocsAuthCss = "verdocs-auth{font-family:\"Barlow\", sans-serif;background-color:#4c56cb;padding:40px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#f5f5fa;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}";
|
|
200
|
+
|
|
201
|
+
const BASE_URL = 'https://stage-api.verdocs.com/';
|
|
202
|
+
const SOURCE = 'verdocs-stage';
|
|
203
|
+
const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
204
|
+
constructor() {
|
|
205
|
+
super();
|
|
206
|
+
this.__registerHost();
|
|
207
|
+
this.authenticated = createEvent(this, "authenticated", 7);
|
|
208
|
+
/**
|
|
209
|
+
* Normally, if the user has a valid session, this embed will be invisible, otherwise it will display
|
|
210
|
+
* login / signup forms. If this is set to false, this embed will be invisible in both cases. Apps may
|
|
211
|
+
* use this to verify if a user has a valid session without needing a separate call to Verdocs JS SDK.
|
|
212
|
+
*/
|
|
213
|
+
this.visible = true;
|
|
214
|
+
/**
|
|
215
|
+
* By default, a Verdocs logo will be displayed above the login/signup forms. This may be used to
|
|
216
|
+
* override its source. (Alternatively, you may simply hide it via CSS overrides.) Logos should be
|
|
217
|
+
* in SVG format for best results.
|
|
218
|
+
*/
|
|
219
|
+
this.logo = 'https://verdocs.com/assets/blue-logo.svg';
|
|
220
|
+
/**
|
|
221
|
+
* If the user is authenticated, this embed will normally render invisibly. If debug is set true, a summary
|
|
222
|
+
* if the user's session details will be displayed instead. This may be useful while debugging authentication
|
|
223
|
+
* flows in new applications.
|
|
224
|
+
*/
|
|
225
|
+
this.debug = false;
|
|
226
|
+
this.isAuthenticated = false;
|
|
227
|
+
this.displayMode = 'login';
|
|
228
|
+
this.username = '';
|
|
229
|
+
this.password = '';
|
|
230
|
+
this.loggingIn = false;
|
|
231
|
+
this.activeSession = null;
|
|
232
|
+
this.loginError = null;
|
|
233
|
+
}
|
|
234
|
+
componentWillLoad() {
|
|
235
|
+
const staging = new VerdocsEndpoint().setBaseURL(BASE_URL);
|
|
236
|
+
setActiveEndpoint(staging);
|
|
237
|
+
console.log('Set active endpoint', getEndpoint());
|
|
238
|
+
}
|
|
239
|
+
componentDidLoad() {
|
|
240
|
+
const session = loadSession(SOURCE);
|
|
241
|
+
console.log('loaded session', session, SOURCE);
|
|
242
|
+
if (session !== null) {
|
|
243
|
+
this.isAuthenticated = true;
|
|
244
|
+
this.activeSession = session;
|
|
245
|
+
this.authenticated.emit({ authenticated: true, session });
|
|
246
|
+
}
|
|
247
|
+
else {
|
|
248
|
+
this.authenticated.emit({ authenticated: false, session: null });
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
// handleSelectOption(option: IMenuOption) {
|
|
252
|
+
// this.isAuthenticated = false;
|
|
253
|
+
// this.authenticated.emit(option);
|
|
254
|
+
// }
|
|
255
|
+
handleLogin() {
|
|
256
|
+
this.loggingIn = true;
|
|
257
|
+
authenticateUser({ username: this.username, password: this.password })
|
|
258
|
+
.then(r => {
|
|
259
|
+
this.loggingIn = false;
|
|
260
|
+
console.log('Login result', r.accessToken);
|
|
261
|
+
const session = setSession(SOURCE, r.accessToken, true);
|
|
262
|
+
this.activeSession = session;
|
|
263
|
+
this.isAuthenticated = true;
|
|
264
|
+
console.log('set session', session);
|
|
265
|
+
this.authenticated.emit({ authenticated: true, session });
|
|
266
|
+
})
|
|
267
|
+
.catch(e => {
|
|
268
|
+
var _a;
|
|
269
|
+
console.log('Login error', e.response, JSON.stringify(e));
|
|
270
|
+
this.loggingIn = false;
|
|
271
|
+
this.activeSession = null;
|
|
272
|
+
this.authenticated.emit({ authenticated: false, session: null });
|
|
273
|
+
if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 403) {
|
|
274
|
+
this.loginError = 'Please check your username and password and try again.';
|
|
275
|
+
}
|
|
276
|
+
});
|
|
277
|
+
}
|
|
278
|
+
handleLogout() {
|
|
279
|
+
// endSession(SOURCE);
|
|
280
|
+
this.isAuthenticated = false;
|
|
281
|
+
this.authenticated.emit({ authenticated: false, session: null });
|
|
282
|
+
}
|
|
283
|
+
handleClearError() {
|
|
284
|
+
this.loginError = null;
|
|
285
|
+
}
|
|
286
|
+
render() {
|
|
287
|
+
if (!this.visible) {
|
|
288
|
+
return h("div", { style: { display: 'none' } }, "Verdocs Auth Placeholder");
|
|
289
|
+
}
|
|
290
|
+
if (this.isAuthenticated) {
|
|
291
|
+
if (this.debug) {
|
|
292
|
+
return (h("div", { class: "status-result debug" }, h("verdocs-button", { label: "Logout", disabled: this.loggingIn, onPress: () => this.handleLogout() })));
|
|
293
|
+
}
|
|
294
|
+
return h("div", { class: "status-result" }, "Authenticated");
|
|
295
|
+
}
|
|
296
|
+
if (this.displayMode === 'signup') {
|
|
297
|
+
return (h("div", { class: "signup-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for an account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.loggingIn })), h("form", { onSubmit: () => this.handleLogin() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onFieldInput: e => (this.username = e.detail), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onFieldInput: e => (this.password = e.detail), disabled: this.loggingIn }), h("verdocs-button", { label: "Signup", disabled: this.loggingIn, onPress: () => this.handleLogin(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))));
|
|
298
|
+
}
|
|
299
|
+
return (h("div", { class: "login-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Log in to your account"), h("h4", null, "Don't have an account?", h("verdocs-button", { label: "Sign Up", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.loggingIn })), h("form", { onSubmit: () => this.handleLogin() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onFieldInput: e => (this.username = e.detail), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onFieldInput: e => (this.password = e.detail), disabled: this.loggingIn }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.loggingIn, style: { display: 'flex', justifyContent: 'center', margin: '10px auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.loggingIn, onPress: () => this.handleLogin(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } })), this.loginError ? h("verdocs-ok-dialog", { open: true, heading: "Login Error", message: this.loginError, onClosed: () => this.handleClearError() }) : h("div", null)));
|
|
300
|
+
}
|
|
301
|
+
static get style() { return verdocsAuthCss; }
|
|
302
|
+
}, [0, "verdocs-auth", {
|
|
303
|
+
"visible": [4],
|
|
304
|
+
"logo": [1],
|
|
305
|
+
"debug": [4],
|
|
306
|
+
"isAuthenticated": [32],
|
|
307
|
+
"displayMode": [32],
|
|
308
|
+
"username": [32],
|
|
309
|
+
"password": [32],
|
|
310
|
+
"loggingIn": [32],
|
|
311
|
+
"activeSession": [32],
|
|
312
|
+
"loginError": [32]
|
|
313
|
+
}]);
|
|
314
|
+
function defineCustomElement$1() {
|
|
315
|
+
if (typeof customElements === "undefined") {
|
|
316
|
+
return;
|
|
317
|
+
}
|
|
318
|
+
const components = ["verdocs-auth", "verdocs-button", "verdocs-ok-dialog", "verdocs-text-input"];
|
|
319
|
+
components.forEach(tagName => { switch (tagName) {
|
|
320
|
+
case "verdocs-auth":
|
|
321
|
+
if (!customElements.get(tagName)) {
|
|
322
|
+
customElements.define(tagName, VerdocsAuth$1);
|
|
323
|
+
}
|
|
324
|
+
break;
|
|
325
|
+
case "verdocs-button":
|
|
326
|
+
if (!customElements.get(tagName)) {
|
|
327
|
+
defineCustomElement$4();
|
|
328
|
+
}
|
|
329
|
+
break;
|
|
330
|
+
case "verdocs-ok-dialog":
|
|
331
|
+
if (!customElements.get(tagName)) {
|
|
332
|
+
defineCustomElement$3();
|
|
333
|
+
}
|
|
334
|
+
break;
|
|
335
|
+
case "verdocs-text-input":
|
|
336
|
+
if (!customElements.get(tagName)) {
|
|
337
|
+
defineCustomElement$2();
|
|
338
|
+
}
|
|
339
|
+
break;
|
|
340
|
+
} });
|
|
341
|
+
}
|
|
342
|
+
defineCustomElement$1(VerdocsAuth$1);
|
|
343
|
+
|
|
344
|
+
const VerdocsAuth = VerdocsAuth$1;
|
|
345
|
+
const defineCustomElement = defineCustomElement$1;
|
|
346
|
+
|
|
347
|
+
export { VerdocsAuth, defineCustomElement };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface VerdocsButton extends Components.VerdocsButton, HTMLElement {}
|
|
4
|
+
export const VerdocsButton: {
|
|
5
|
+
prototype: VerdocsButton;
|
|
6
|
+
new (): VerdocsButton;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
|
|
3
|
+
const verdocsButtonCss = "verdocs-button button{font-family:\"Barlow\", sans-serif;text-transform:uppercase;-ms-flex-pack:center;justify-content:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;font-weight:700;cursor:pointer;margin:0}verdocs-button button .icon{margin:0 12px}verdocs-button button .icon svg{fill:#fff;display:block}verdocs-button button .label{padding:0 12px}verdocs-button button:disabled{cursor:none}verdocs-button button.small{height:34px;font-size:13px}verdocs-button button.small .icon{margin:0 4px}verdocs-button button.small .icon svg{margin:2px 0 0 0;height:20px}verdocs-button button.small .label{padding:0 4px}verdocs-button button.normal{height:44px;font-size:14px}verdocs-button button.normal .icon.start{margin:0 4px 0 8px}verdocs-button button.normal .icon.end{margin:0 8px 0 4px}verdocs-button button.normal .icon svg{margin:2px 0 0 0;height:22px}verdocs-button button.normal .label{padding:0 10px}verdocs-button button.medium{height:52px;font-size:16px}verdocs-button button.medium .icon.start{margin:0 0 0 18px}verdocs-button button.medium .icon.end{margin:0 18px 0 0}verdocs-button button.medium .icon svg{margin:2px 0 0 0;height:26px}verdocs-button button.medium .label{padding:0 20px}verdocs-button button.large{height:60px;font-size:20px}verdocs-button button.large .icon.start{margin:0 0 0 24px}verdocs-button button.large .icon.end{margin:0 24px 0 0}verdocs-button button.large .icon svg{margin:2px 0 0 0;height:32px}verdocs-button button.large .label{padding:0 34px}verdocs-button button.standard{background:#55bc81;border-radius:4px;outline:none;border:none;color:white}verdocs-button button.standard:disabled{background-color:#999999;cursor:default}verdocs-button button.standard:active:not([disabled]){-webkit-filter:brightness(110%);filter:brightness(110%)}verdocs-button button.text{color:#4c56cb;background:transparent;font-weight:500;padding:0 4px;outline:none;border:none}verdocs-button button.text:disabled{color:#999999;cursor:none}verdocs-button button.text:active:not([disabled]){-webkit-filter:brightness(130%);filter:brightness(130%)}verdocs-button button.text .icon svg{fill:#4c56cb}verdocs-button button.outline{border:1px solid #4c56cb;color:#4c56cb;outline:none;background:transparent;border-radius:4px;padding:0 20px}verdocs-button button.outline:disabled{color:#999999;cursor:none;border:1px solid #999999}verdocs-button button.outline:active{background:#4c56cb;color:white}verdocs-button button.outline .icon svg{fill:#4c56cb}";
|
|
4
|
+
|
|
5
|
+
const VerdocsButton = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super();
|
|
8
|
+
this.__registerHost();
|
|
9
|
+
this.press = createEvent(this, "press", 7);
|
|
10
|
+
/**
|
|
11
|
+
* If desired, a prefix icon for the button
|
|
12
|
+
*/
|
|
13
|
+
this.startIcon = null;
|
|
14
|
+
/**
|
|
15
|
+
* If desired, a suffix icon for the button
|
|
16
|
+
*/
|
|
17
|
+
this.endIcon = null;
|
|
18
|
+
/**
|
|
19
|
+
* The size (height) of the button.
|
|
20
|
+
*/
|
|
21
|
+
this.size = 'normal';
|
|
22
|
+
/**
|
|
23
|
+
* The type of the button.
|
|
24
|
+
*/
|
|
25
|
+
this.type = 'button';
|
|
26
|
+
/**
|
|
27
|
+
* The display variant of the button.
|
|
28
|
+
*/
|
|
29
|
+
this.variant = 'standard';
|
|
30
|
+
/**
|
|
31
|
+
* Whether the button should be disabled.
|
|
32
|
+
*/
|
|
33
|
+
this.disabled = false;
|
|
34
|
+
}
|
|
35
|
+
handleClick(e) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
this.press.emit();
|
|
38
|
+
}
|
|
39
|
+
render() {
|
|
40
|
+
console.log('Rendering button', this.startIcon);
|
|
41
|
+
return (h("button", { disabled: this.disabled, type: this.type, onClick: e => this.handleClick(e), class: `${this.variant} ${this.size} ${this.type}` }, this.startIcon ? h("span", { class: "icon start", innerHTML: this.startIcon }) : null, h("span", { class: "label" }, this.label), this.endIcon ? h("span", { class: "icon end", innerHTML: this.endIcon }) : null));
|
|
42
|
+
}
|
|
43
|
+
static get style() { return verdocsButtonCss; }
|
|
44
|
+
}, [0, "verdocs-button", {
|
|
45
|
+
"label": [1],
|
|
46
|
+
"startIcon": [1, "start-icon"],
|
|
47
|
+
"endIcon": [1, "end-icon"],
|
|
48
|
+
"size": [1],
|
|
49
|
+
"type": [1],
|
|
50
|
+
"variant": [1],
|
|
51
|
+
"disabled": [4]
|
|
52
|
+
}]);
|
|
53
|
+
function defineCustomElement() {
|
|
54
|
+
if (typeof customElements === "undefined") {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const components = ["verdocs-button"];
|
|
58
|
+
components.forEach(tagName => { switch (tagName) {
|
|
59
|
+
case "verdocs-button":
|
|
60
|
+
if (!customElements.get(tagName)) {
|
|
61
|
+
customElements.define(tagName, VerdocsButton);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
} });
|
|
65
|
+
}
|
|
66
|
+
defineCustomElement(VerdocsButton);
|
|
67
|
+
|
|
68
|
+
export { VerdocsButton as V, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface VerdocsDropdown extends Components.VerdocsDropdown, HTMLElement {}
|
|
4
|
+
export const VerdocsDropdown: {
|
|
5
|
+
prototype: VerdocsDropdown;
|
|
6
|
+
new (): VerdocsDropdown;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
+
import { c as createPopper } from './index3.js';
|
|
3
|
+
|
|
4
|
+
const SortDown = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>
|
|
5
|
+
`;
|
|
6
|
+
|
|
7
|
+
const verdocsDropdownCss = "verdocs-dropdown{font-family:\"Barlow\", sans-serif;display:block}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown .items{width:200px;display:none;z-index:10000;border-radius:5px;background:#33354c;border:1px solid #654dcb}verdocs-dropdown .items[data-show]{display:block}verdocs-dropdown .option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}verdocs-dropdown .option:hover{cursor:pointer;background:#55bc81}verdocs-dropdown .option[disabled]{color:#aaaaaa}verdocs-dropdown .option[disabled]:hover{color:#aaaaaa;cursor:inherit;background:transparent}verdocs-dropdown.open .items{display:block}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}";
|
|
8
|
+
|
|
9
|
+
const VerdocsDropdown = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
this.__registerHost();
|
|
13
|
+
this.optionSelected = createEvent(this, "optionSelected", 7);
|
|
14
|
+
/**
|
|
15
|
+
* The menu options to display.
|
|
16
|
+
*/
|
|
17
|
+
this.options = [];
|
|
18
|
+
}
|
|
19
|
+
componentWillLoad() {
|
|
20
|
+
this.isOpen = !!this.open;
|
|
21
|
+
}
|
|
22
|
+
componentDidLoad() {
|
|
23
|
+
this.popper = createPopper(this.dropdownButton, this.dropdownMenu, { placement: 'bottom-start', modifiers: [{ name: 'offset', options: { offset: [0, 6] } }] });
|
|
24
|
+
}
|
|
25
|
+
handleSelectOption(option) {
|
|
26
|
+
this.isOpen = false;
|
|
27
|
+
this.optionSelected.emit(option);
|
|
28
|
+
this.hide();
|
|
29
|
+
}
|
|
30
|
+
// See https://popper.js.org/docs/v2/tutorial/
|
|
31
|
+
// What we're doing here is clearing event listeners when they aren't needed, to increase performance in lists
|
|
32
|
+
showDropdown() {
|
|
33
|
+
var _a, _b;
|
|
34
|
+
this.isOpen = true;
|
|
35
|
+
this.dropdownMenu.setAttribute('data-show', '');
|
|
36
|
+
this.dropdownMenu.removeAttribute('aria-hidden');
|
|
37
|
+
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions(options => ({
|
|
38
|
+
...options,
|
|
39
|
+
modifiers: [...options.modifiers, { name: 'eventListeners', enabled: true }],
|
|
40
|
+
}));
|
|
41
|
+
(_b = this.popper) === null || _b === void 0 ? void 0 : _b.update();
|
|
42
|
+
}
|
|
43
|
+
handleHideDropdown(e) {
|
|
44
|
+
var _a, _b;
|
|
45
|
+
if (((_a = e === null || e === void 0 ? void 0 : e.target) === null || _a === void 0 ? void 0 : _a.localName) === 'button' && ((_b = e === null || e === void 0 ? void 0 : e.target) === null || _b === void 0 ? void 0 : _b.className) === 'arrow') {
|
|
46
|
+
// This event is fired when a menu element is clicked because the button "loses focus" then too
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
this.hide();
|
|
50
|
+
}
|
|
51
|
+
toggleDropdown() {
|
|
52
|
+
if (this.isOpen) {
|
|
53
|
+
this.hide();
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
this.showDropdown();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
hide() {
|
|
60
|
+
var _a;
|
|
61
|
+
this.isOpen = false;
|
|
62
|
+
this.dropdownMenu.removeAttribute('data-show');
|
|
63
|
+
this.dropdownMenu.setAttribute('aria-hidden', 'true');
|
|
64
|
+
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions(options => ({
|
|
65
|
+
...options,
|
|
66
|
+
modifiers: [...options.modifiers, { name: 'eventListeners', enabled: false }],
|
|
67
|
+
}));
|
|
68
|
+
}
|
|
69
|
+
render() {
|
|
70
|
+
var _a;
|
|
71
|
+
return (h(Host, { class: { storybook: !!(window === null || window === void 0 ? void 0 : window['STORYBOOK_ENV']), open: !!this.isOpen } }, h("button", { class: "arrow", innerHTML: SortDown, "aria-label": "Open Menu", onClick: () => this.toggleDropdown(), onBlur: e => this.handleHideDropdown(e), ref: el => (this.dropdownButton = el) }), h("div", { class: "items", "aria-hidden": !this.open, ref: el => (this.dropdownMenu = el) }, (_a = this.options) === null || _a === void 0 ? void 0 : _a.map(option => (h("button", { onClick: () => this.handleSelectOption(option), class: "option", disabled: option.disabled }, option.label))))));
|
|
72
|
+
}
|
|
73
|
+
static get style() { return verdocsDropdownCss; }
|
|
74
|
+
}, [0, "verdocs-dropdown", {
|
|
75
|
+
"options": [16],
|
|
76
|
+
"open": [4],
|
|
77
|
+
"isOpen": [32]
|
|
78
|
+
}]);
|
|
79
|
+
function defineCustomElement() {
|
|
80
|
+
if (typeof customElements === "undefined") {
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
const components = ["verdocs-dropdown"];
|
|
84
|
+
components.forEach(tagName => { switch (tagName) {
|
|
85
|
+
case "verdocs-dropdown":
|
|
86
|
+
if (!customElements.get(tagName)) {
|
|
87
|
+
customElements.define(tagName, VerdocsDropdown);
|
|
88
|
+
}
|
|
89
|
+
break;
|
|
90
|
+
} });
|
|
91
|
+
}
|
|
92
|
+
defineCustomElement(VerdocsDropdown);
|
|
93
|
+
|
|
94
|
+
export { VerdocsDropdown as V, defineCustomElement as d };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface VerdocsFieldAttachment extends Components.VerdocsFieldAttachment, HTMLElement {}
|
|
4
|
+
export const VerdocsFieldAttachment: {
|
|
5
|
+
prototype: VerdocsFieldAttachment;
|
|
6
|
+
new (): VerdocsFieldAttachment;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { V as VerdocsFieldAttachment$1, d as defineCustomElement$1 } from './verdocs-field-attachment2.js';
|
|
2
|
+
|
|
3
|
+
const VerdocsFieldAttachment = VerdocsFieldAttachment$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { VerdocsFieldAttachment, defineCustomElement };
|